diff --git a/1895.7b173883.async.js b/9572.21fdba64.async.js similarity index 53% rename from 1895.7b173883.async.js rename to 9572.21fdba64.async.js index 375e88f232..b653a269fa 100644 --- a/1895.7b173883.async.js +++ b/9572.21fdba64.async.js @@ -1,4 +1,4 @@ -(self.webpackChunk=self.webpackChunk||[]).push([[1895],{89489:function(Mn,Sn,xt){"use strict";xt.d(Sn,{Z:function(){return Be}});var Ot=xt(96663),Ht=xt(59301),qt={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"},Le=qt,Vt=xt(7657),me=function(Jt,ce){return Ht.createElement(Vt.Z,(0,Ot.Z)({},Jt,{ref:ce,icon:Le}))},Tt=Ht.forwardRef(me),Be=Tt},59477:function(Mn,Sn,xt){"use strict";xt.d(Sn,{Z:function(){return Be}});var Ot=xt(96663),Ht=xt(59301),qt={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"},Le=qt,Vt=xt(7657),me=function(Jt,ce){return Ht.createElement(Vt.Z,(0,Ot.Z)({},Jt,{ref:ce,icon:Le}))},Tt=Ht.forwardRef(me),Be=Tt},40001:function(Mn,Sn,xt){"use strict";xt.d(Sn,{Z:function(){return Be}});var Ot=xt(96663),Ht=xt(59301),qt={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"},Le=qt,Vt=xt(7657),me=function(Jt,ce){return Ht.createElement(Vt.Z,(0,Ot.Z)({},Jt,{ref:ce,icon:Le}))},Tt=Ht.forwardRef(me),Be=Tt},49198:function(Mn,Sn,xt){"use strict";xt.d(Sn,{Z:function(){return Be}});var Ot=xt(96663),Ht=xt(59301),qt={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"},Le=qt,Vt=xt(7657),me=function(Jt,ce){return Ht.createElement(Vt.Z,(0,Ot.Z)({},Jt,{ref:ce,icon:Le}))},Tt=Ht.forwardRef(me),Be=Tt},73331:function(Mn,Sn,xt){"use strict";xt.d(Sn,{Z:function(){return Be}});var Ot=xt(96663),Ht=xt(59301),qt={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"},Le=qt,Vt=xt(7657),me=function(Jt,ce){return Ht.createElement(Vt.Z,(0,Ot.Z)({},Jt,{ref:ce,icon:Le}))},Tt=Ht.forwardRef(me),Be=Tt},15277:function(Mn,Sn,xt){"use strict";xt.d(Sn,{Z:function(){return Be}});var Ot=xt(96663),Ht=xt(59301),qt={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"},Le=qt,Vt=xt(7657),me=function(Jt,ce){return Ht.createElement(Vt.Z,(0,Ot.Z)({},Jt,{ref:ce,icon:Le}))},Tt=Ht.forwardRef(me),Be=Tt},52671:function(Mn,Sn,xt){"use strict";xt.d(Sn,{Z:function(){return Be}});var Ot=xt(96663),Ht=xt(59301),qt={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"},Le=qt,Vt=xt(7657),me=function(Jt,ce){return Ht.createElement(Vt.Z,(0,Ot.Z)({},Jt,{ref:ce,icon:Le}))},Tt=Ht.forwardRef(me),Be=Tt},8657:function(Mn,Sn,xt){"use strict";xt.d(Sn,{Z:function(){return Be}});var Ot=xt(96663),Ht=xt(59301),qt={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"},Le=qt,Vt=xt(7657),me=function(Jt,ce){return Ht.createElement(Vt.Z,(0,Ot.Z)({},Jt,{ref:ce,icon:Le}))},Tt=Ht.forwardRef(me),Be=Tt},56082:function(Mn,Sn,xt){"use strict";xt.d(Sn,{Z:function(){return Be}});var Ot=xt(96663),Ht=xt(59301),qt={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"},Le=qt,Vt=xt(7657),me=function(Jt,ce){return Ht.createElement(Vt.Z,(0,Ot.Z)({},Jt,{ref:ce,icon:Le}))},Tt=Ht.forwardRef(me),Be=Tt},33853:function(Mn,Sn,xt){"use strict";xt.d(Sn,{Z:function(){return Be}});var Ot=xt(96663),Ht=xt(59301),qt={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"},Le=qt,Vt=xt(7657),me=function(Jt,ce){return Ht.createElement(Vt.Z,(0,Ot.Z)({},Jt,{ref:ce,icon:Le}))},Tt=Ht.forwardRef(me),Be=Tt},12893:function(Mn,Sn,xt){"use strict";xt.d(Sn,{Z:function(){return Be}});var Ot=xt(96663),Ht=xt(59301),qt={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"},Le=qt,Vt=xt(7657),me=function(Jt,ce){return Ht.createElement(Vt.Z,(0,Ot.Z)({},Jt,{ref:ce,icon:Le}))},Tt=Ht.forwardRef(me),Be=Tt},15075:function(Mn,Sn,xt){"use strict";xt.d(Sn,{Z:function(){return Be}});var Ot=xt(96663),Ht=xt(59301),qt={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"},Le=qt,Vt=xt(7657),me=function(Jt,ce){return Ht.createElement(Vt.Z,(0,Ot.Z)({},Jt,{ref:ce,icon:Le}))},Tt=Ht.forwardRef(me),Be=Tt},43531:function(Mn,Sn,xt){"use strict";xt.d(Sn,{Z:function(){return Be}});var Ot=xt(96663),Ht=xt(59301),qt={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"},Le=qt,Vt=xt(7657),me=function(Jt,ce){return Ht.createElement(Vt.Z,(0,Ot.Z)({},Jt,{ref:ce,icon:Le}))},Tt=Ht.forwardRef(me),Be=Tt},61485:function(Mn,Sn,xt){"use strict";xt.d(Sn,{Z:function(){return Be}});var Ot=xt(96663),Ht=xt(59301),qt={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"},Le=qt,Vt=xt(7657),me=function(Jt,ce){return Ht.createElement(Vt.Z,(0,Ot.Z)({},Jt,{ref:ce,icon:Le}))},Tt=Ht.forwardRef(me),Be=Tt},38819:function(Mn,Sn,xt){"use strict";xt.d(Sn,{Z:function(){return Be}});var Ot=xt(96663),Ht=xt(59301),qt={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"},Le=qt,Vt=xt(7657),me=function(Jt,ce){return Ht.createElement(Vt.Z,(0,Ot.Z)({},Jt,{ref:ce,icon:Le}))},Tt=Ht.forwardRef(me),Be=Tt},47472:function(Mn,Sn,xt){"use strict";xt.d(Sn,{Z:function(){return Be}});var Ot=xt(96663),Ht=xt(59301),qt={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"},Le=qt,Vt=xt(7657),me=function(Jt,ce){return Ht.createElement(Vt.Z,(0,Ot.Z)({},Jt,{ref:ce,icon:Le}))},Tt=Ht.forwardRef(me),Be=Tt},37036:function(){"use strict"},88010:function(Mn,Sn){"use strict";Sn.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},84287:function(Mn,Sn,xt){"use strict";var Ot=xt(59301),Ht=Object.defineProperty,qt=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,Vt=Object.prototype.propertyIsEnumerable,me=(Ce,Jt,ce)=>Jt in Ce?Ht(Ce,Jt,{enumerable:!0,configurable:!0,writable:!0,value:ce}):Ce[Jt]=ce,Tt=(Ce,Jt)=>{for(var ce in Jt||(Jt={}))Le.call(Jt,ce)&&me(Ce,ce,Jt[ce]);if(qt)for(var ce of qt(Jt))Vt.call(Jt,ce)&&me(Ce,ce,Jt[ce]);return Ce};const Be=Ce=>React.createElement("svg",Tt({className:"jiangxu_svg__icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:32,height:32},Ce),React.createElement("path",{d:"M365.714 73.143H1024v73.143H365.714zm0 292.571H1024v73.143H365.714zm0 292.572H1024v73.143H365.714zm0 292.571H1024V1024H365.714v-73.143z",fill:"#98BDF7"}),React.createElement("path",{d:"m248.686 803.182-65.829 75.922V658.286h-73.143v220.818l-65.828-75.995L0 851.383 146.286 1024 292.57 851.53z",fill:"#145DFF"}),React.createElement("path",{d:"M146.286 0 0 158.72l43.886 55.223 65.828-75.922v227.693h73.143V138.021l65.829 75.922 43.885-55.223z",fill:"#98BDF7"}));Sn.Z="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiPjxwYXRoIGQ9Ik0zNjUuNzE0IDczLjE0M0gxMDI0djczLjE0M0gzNjUuNzE0em0wIDI5Mi41NzFIMTAyNHY3My4xNDNIMzY1LjcxNHptMCAyOTIuNTcySDEwMjR2NzMuMTQzSDM2NS43MTR6bTAgMjkyLjU3MUgxMDI0VjEwMjRIMzY1LjcxNHYtNzMuMTQzeiIgZmlsbD0iIzk4QkRGNyIvPjxwYXRoIGQ9Im0yNDguNjg2IDgwMy4xODItNjUuODI5IDc1LjkyMlY2NTguMjg2aC03My4xNDN2MjIwLjgxOGwtNjUuODI4LTc1Ljk5NUwwIDg1MS4zODMgMTQ2LjI4NiAxMDI0IDI5Mi41NyA4NTEuNTN6IiBmaWxsPSIjMTQ1REZGIi8+PHBhdGggZD0iTTE0Ni4yODYgMCAwIDE1OC43Mmw0My44ODYgNTUuMjIzIDY1LjgyOC03NS45MjJ2MjI3LjY5M2g3My4xNDNWMTM4LjAyMWw2NS44MjkgNzUuOTIyIDQzLjg4NS01NS4yMjN6IiBmaWxsPSIjOThCREY3Ii8+PC9zdmc+"},86087:function(Mn,Sn,xt){"use strict";var Ot=xt(59301),Ht=Object.defineProperty,qt=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,Vt=Object.prototype.propertyIsEnumerable,me=(Ce,Jt,ce)=>Jt in Ce?Ht(Ce,Jt,{enumerable:!0,configurable:!0,writable:!0,value:ce}):Ce[Jt]=ce,Tt=(Ce,Jt)=>{for(var ce in Jt||(Jt={}))Le.call(Jt,ce)&&me(Ce,ce,Jt[ce]);if(qt)for(var ce of qt(Jt))Vt.call(Jt,ce)&&me(Ce,ce,Jt[ce]);return Ce};const Be=Ce=>React.createElement("svg",Tt({className:"shengxu_svg__icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:32,height:32},Ce),React.createElement("path",{d:"M365.714 73.143H1024v73.143H365.714zm0 292.571H1024v73.143H365.714zm0 292.572H1024v73.143H365.714zm0 292.571H1024V1024H365.714v-73.143zM248.686 803.182l-65.829 75.922V658.286h-73.143v220.818l-65.828-75.995L0 851.383 146.286 1024 292.57 851.53z",fill:"#98BDF7"}),React.createElement("path",{d:"M146.286 0 0 158.72l43.886 55.223 65.828-75.922v227.693h73.143V138.021l65.829 75.922 43.885-55.223z",fill:"#145DFF"}));Sn.Z="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiPjxwYXRoIGQ9Ik0zNjUuNzE0IDczLjE0M0gxMDI0djczLjE0M0gzNjUuNzE0em0wIDI5Mi41NzFIMTAyNHY3My4xNDNIMzY1LjcxNHptMCAyOTIuNTcySDEwMjR2NzMuMTQzSDM2NS43MTR6bTAgMjkyLjU3MUgxMDI0VjEwMjRIMzY1LjcxNHYtNzMuMTQzek0yNDguNjg2IDgwMy4xODJsLTY1LjgyOSA3NS45MjJWNjU4LjI4NmgtNzMuMTQzdjIyMC44MThsLTY1LjgyOC03NS45OTVMMCA4NTEuMzgzIDE0Ni4yODYgMTAyNCAyOTIuNTcgODUxLjUzeiIgZmlsbD0iIzk4QkRGNyIvPjxwYXRoIGQ9Ik0xNDYuMjg2IDAgMCAxNTguNzJsNDMuODg2IDU1LjIyMyA2NS44MjgtNzUuOTIydjIyNy42OTNoNzMuMTQzVjEzOC4wMjFsNjUuODI5IDc1LjkyMiA0My44ODUtNTUuMjIzeiIgZmlsbD0iIzE0NURGRiIvPjwvc3ZnPg=="},74413:function(){"use strict";function Mn(Nt,et,nt,ht){nt===void 0&&(nt=0),ht===void 0&&(ht=1/0),this._name=Nt,this._defaultValue=et,this._minimum=nt,this._maximum=ht}Object.defineProperty(Mn.prototype,"name",{get:function(){return this._name},set:function(Nt){if(typeof Nt!="string"||Nt==="")throw new Error("Shape name must be a valid string.");this._name=Nt}}),Object.defineProperty(Mn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(Nt){if(typeof Nt!="number"||isNaN(Nt))throw new Error("The default value must be a real number, not: "+Nt);this._defaultValue=Nt}}),Object.defineProperty(Mn.prototype,"minimum",{get:function(){return this._minimum},set:function(Nt){if(typeof Nt!="number"||isNaN(Nt))throw new Error("Minimum must be a real number, not: "+Nt);this._minimum=Nt}}),Object.defineProperty(Mn.prototype,"maximum",{get:function(){return this._maximum},set:function(Nt){if(typeof Nt!="number"||isNaN(Nt))throw new Error("Maximum must be a real number, not: "+Nt);this._maximum=Nt}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(Nt,et){var nt=go.Shape._FigureParameters[Nt];return nt?nt[et]:null},go.Shape.setFigureParameter=function(Nt,et,nt){if(!(nt instanceof Mn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+nt);if(nt.defaultValuent.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+nt.defaultValue);var ht=go.Shape._FigureParameters[Nt];ht||(ht=[],go.Shape._FigureParameters[Nt]=ht),ht[et]=nt};var Sn=[];function xt(Nt,et){var nt=Sn.pop();return nt===void 0?new go.Point(Nt,et):(nt.x=Nt,nt.y=et,nt)}function Ot(){var Nt=Sn.pop();return Nt===void 0?new go.Point:Nt}function Ht(Nt){Sn.push(Nt)}function qt(Nt,et,nt,ht,st,gt,vt,wt,Ft){Ft||(Ft=new go.Point);var It=Nt-nt,Rt=st-vt,Kt=NaN,oe=NaN;if(It===0)if(Rt===0)Nt===nt&&(Kt=Nt,oe=et);else{var ee=(gt-wt)/Rt,ve=gt-ee*st;Kt=Nt,oe=ee*Kt+ve}else if(Rt===0){var _t=(et-ht)/It,Ne=et-_t*Nt;Kt=st,oe=_t*Kt+Ne}else{var _t=(et-ht)/It,ee=(gt-wt)/Rt,Ne=et-_t*Nt,ve=gt-ee*st;Kt=(ve-Ne)/(_t-ee),oe=_t*Kt+Ne}return Ft.x=Kt,Ft.y=oe,Ft}function Le(Nt,et,nt,ht,st,gt,vt,wt,Ft,It,Rt,Kt,oe,ee){var ve=1-Ft,_t=Ft,Ne=Nt*ve+nt*_t,he=et*ve+ht*_t,Ze=nt*ve+st*_t,Ue=ht*ve+gt*_t,Ye=st*ve+vt*_t,un=gt*ve+wt*_t,Ln=Ne*ve+Ze*_t,Pe=he*ve+Ue*_t,Gt=Ze*ve+Ye*_t,qe=Ue*ve+un*_t,Bn=Ln*ve+Gt*_t,zn=Pe*ve+qe*_t;It.x=Ne,It.y=he,Rt.x=Ln,Rt.y=Pe,Kt.x=Bn,Kt.y=zn,oe.x=Gt,oe.y=qe,ee.x=Ye,ee.y=un}var Vt=new go.Spot(.156,.156),me=new go.Spot(.844,.844),Tt=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new Mn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=5),ht=Math.min(ht,et/3),ht=Math.min(ht,nt/3);var st=ht*Tt,gt=new go.Geometry().add(new go.PathFigure(ht,0,!0).add(new go.PathSegment(go.PathSegment.Line,et-ht,0)).add(new go.PathSegment(go.PathSegment.Bezier,et,ht,et-st,0,et,st)).add(new go.PathSegment(go.PathSegment.Line,et,nt-ht)).add(new go.PathSegment(go.PathSegment.Bezier,et-ht,nt,et,nt-st,et-st,nt)).add(new go.PathSegment(go.PathSegment.Line,ht,nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,nt-ht,st,nt,0,nt-st)).add(new go.PathSegment(go.PathSegment.Line,0,ht)).add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,st,st,0).close()));return st>1&&(gt.spot1=new go.Spot(0,0,st,st),gt.spot2=new go.Spot(1,1,-st,-st)),gt}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(et,nt).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(et,nt).add(new go.PathSegment(go.PathSegment.Line,0,nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(Nt,et,nt){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=0,ht.startY=nt/2,ht.endX=et,ht.endY=nt/2,ht}),go.Shape.defineFigureGenerator("LineV",function(Nt,et,nt){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=et/2,ht.startY=0,ht.endX=et/2,ht.endY=nt,ht}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt/2,!1).add(new go.PathSegment(go.PathSegment.Line,et,nt/2)).add(new go.PathSegment(go.PathSegment.Move,et/2,0)).add(new go.PathSegment(go.PathSegment.Line,et/2,nt)))}),go.Shape.defineFigureGenerator("XLine",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)))}),go.Shape.defineFigureGenerator("LineRight",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(.25*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.25*et,nt)))}),go.Shape.defineFigureGenerator("LineDown",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(0,.25*nt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,.75*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)))}),go.Shape.defineFigureGenerator("LineLeft",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(.75*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.75*et,nt)))}),go.Shape.defineFigureGenerator("LineUp",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(0,.75*nt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,.25*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(Nt,et,nt){var ht=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(ht*et,(1-ht)*nt,!1).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,ht*nt)).add(new go.PathSegment(go.PathSegment.Move,ht*et,ht*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,(1-ht)*nt)).add(new go.PathSegment(go.PathSegment.Move,0,nt/2)).add(new go.PathSegment(go.PathSegment.Line,et,nt/2)).add(new go.PathSegment(go.PathSegment.Move,et/2,0)).add(new go.PathSegment(go.PathSegment.Line,et/2,nt)))}),go.Shape.defineFigureGenerator("CircleLine",function(Nt,et,nt){var ht=et/2,st=new go.Geometry().add(new go.PathFigure(et,et/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,ht,ht,ht,ht).close()));return st.spot1=Vt,st.spot2=me,st.defaultStretch=go.GraphObject.Uniform,st}),go.Shape.defineFigureGenerator("Line1",function(Nt,et,nt){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=0,ht.startY=0,ht.endX=et,ht.endY=nt,ht}),go.Shape.defineFigureGenerator("Line2",function(Nt,et,nt){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=et,ht.startY=0,ht.endX=0,ht.endY=nt,ht}),go.Shape.defineFigureGenerator("Curve1",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,et,nt,Tt*et,0,et,(1-Tt)*nt)))}),go.Shape.defineFigureGenerator("Curve2",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,et,nt,0,Tt*nt,(1-Tt)*et,nt)))}),go.Shape.defineFigureGenerator("Curve3",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,Tt*nt,Tt*et,nt)))}),go.Shape.defineFigureGenerator("Curve4",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,(1-Tt)*et,0,0,(1-Tt)*nt)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new Mn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)?ht=.1:ht<-1?ht=-1:ht>1&&(ht=1);var st=Math.abs(ht)*et;if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(st,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-st,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et-st,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,st,nt).close())),stet&&(ht=et);var st=Math.abs(ht);if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(st,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-st,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et-st,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,st,nt).close())),st.5&&(ht=.5);var st=Math.abs(ht)*et;if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(st,0).add(new go.PathSegment(go.PathSegment.Line,et-st,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-st,nt)).add(new go.PathSegment(go.PathSegment.Line,st,nt).close())),stet&&(ht=et/2);var st=Math.abs(ht);if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(st,0).add(new go.PathSegment(go.PathSegment.Line,et-st,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-st,nt)).add(new go.PathSegment(go.PathSegment.Line,st,nt).close())),stet&&(ht=et/2);var st=Math.abs(ht);if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-st,nt)).add(new go.PathSegment(go.PathSegment.Line,st,nt).close())):gt.add(new go.PathFigure(st,0).add(new go.PathSegment(go.PathSegment.Line,et-st,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())),st0&&(vt.add(new go.PathSegment(go.PathSegment.Move,et/2+wt,et/2)),vt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,st,st,wt,wt).close())),gt.spot1=Vt,gt.spot2=me,gt.defaultStretch=go.GraphObject.Uniform,gt}),go.Shape.defineFigureGenerator("Cloud",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(.08034461*et,.1944299*nt,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*et,.05349299*nt,-.09239631*et,.07836421*nt,.1406031*et,-.0542823*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*et,.074219*nt,.2450511*et,-.00697547*nt,.3776197*et,-.01112067*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*et,.07004196*nt,.4539471*et,0,.6066018*et,-.02526587*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*et,.08370865*nt,.6914277*et,-.01904177*nt,.8921095*et,-.01220843*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*et,.3194596*nt,1.036446*et,.04105738*nt,1.020377*et,.3022052*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*et,.562044*nt,1.04448*et,.360238*nt,.992256*et,.5219009*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*et,.8217117*nt,1.032337*et,.5771781*nt,1.018411*et,.8120651*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*et,.9156953*nt,1.028411*et,.9571472*nt,.8556702*et,1.052487*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*et,.9310455*nt,.7431877*et,1.009325*nt,.5624123*et,1.021761*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*et,.9344623*nt,.4820677*et,1.031761*nt,.3030112*et,1.002796*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*et,.870098*nt,.2329994*et,1.01518*nt,.03213784*et,1.01518*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*et,.6545475*nt,-.02812061*et,.9032597*nt,-.01205169*et,.6835638*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*et,.4265613*nt,-.01812061*et,.6089503*nt,-.00606892*et,.4555777*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*et,.1944299*nt,-.01606892*et,.3892545*nt,-.01205169*et,.1944299*nt))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(Nt,et,nt){var ht=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(ht*et,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,0)).add(new go.PathSegment(go.PathSegment.Line,et,ht*nt)).add(new go.PathSegment(go.PathSegment.Line,et,(1-ht)*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,nt)).add(new go.PathSegment(go.PathSegment.Line,ht*et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,(1-ht)*nt)).add(new go.PathSegment(go.PathSegment.Line,0,ht*nt).close())).setSpots(ht/2,ht/2,1-ht/2,1-ht/2)}),go.Shape.setFigureParameter("Pie",0,new Mn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new Mn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN,st=Nt?Nt.parameter2:NaN;isNaN(ht)&&(ht=0),isNaN(st)&&(st=315);var gt=ht%360;gt<0&&(gt+=360);var vt=st%360,wt=Math.min(et,nt)/2;return new go.Geometry().add(new go.PathFigure(wt,wt).add(new go.PathSegment(go.PathSegment.Arc,gt,vt,wt,wt,wt,wt).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(Nt,et,nt){var ht=Tt/Math.SQRT2*.5,st=Math.SQRT2/2,gt=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(et,nt,!0).add(new go.PathSegment(go.PathSegment.Bezier,st*et,gt*nt,et,(1-ht)*nt,(st+ht)*et,(gt+ht)*nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close()))}),go.Shape.setFigureParameter("ThickCross",0,new Mn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=30);var st=Math.min(ht,et)/2,gt=et/2,vt=nt/2;return new go.Geometry().add(new go.PathFigure(gt-st,0,!0).add(new go.PathSegment(go.PathSegment.Line,gt+st,0)).add(new go.PathSegment(go.PathSegment.Line,gt+st,vt-st)).add(new go.PathSegment(go.PathSegment.Line,et,vt-st)).add(new go.PathSegment(go.PathSegment.Line,et,vt+st)).add(new go.PathSegment(go.PathSegment.Line,gt+st,vt+st)).add(new go.PathSegment(go.PathSegment.Line,gt+st,nt)).add(new go.PathSegment(go.PathSegment.Line,gt-st,nt)).add(new go.PathSegment(go.PathSegment.Line,gt-st,vt+st)).add(new go.PathSegment(go.PathSegment.Line,0,vt+st)).add(new go.PathSegment(go.PathSegment.Line,0,vt-st)).add(new go.PathSegment(go.PathSegment.Line,gt-st,vt-st).close()))}),go.Shape.setFigureParameter("ThinCross",0,new Mn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=10);var st=Math.min(ht,et)/2,gt=et/2,vt=nt/2;return new go.Geometry().add(new go.PathFigure(gt-st,0,!0).add(new go.PathSegment(go.PathSegment.Line,gt+st,0)).add(new go.PathSegment(go.PathSegment.Line,gt+st,vt-st)).add(new go.PathSegment(go.PathSegment.Line,et,vt-st)).add(new go.PathSegment(go.PathSegment.Line,et,vt+st)).add(new go.PathSegment(go.PathSegment.Line,gt+st,vt+st)).add(new go.PathSegment(go.PathSegment.Line,gt+st,nt)).add(new go.PathSegment(go.PathSegment.Line,gt-st,nt)).add(new go.PathSegment(go.PathSegment.Line,gt-st,vt+st)).add(new go.PathSegment(go.PathSegment.Line,0,vt+st)).add(new go.PathSegment(go.PathSegment.Line,0,vt-st)).add(new go.PathSegment(go.PathSegment.Line,gt-st,vt-st).close()))}),go.Shape.setFigureParameter("ThickX",0,new Mn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;if((isNaN(ht)||ht<0)&&(ht=30),et===0||nt===0){var st=new go.Geometry(go.Geometry.Rectangle);return st.startX=0,st.startY=0,st.endX=et,st.endY=nt,st}else{var gt=et/2,vt=nt/2,wt=Math.atan2(nt,et),Ft=ht-Math.min(Math.cos(wt)*ht/2,gt),It=ht-Math.min(Math.sin(wt)*ht/2,vt),st=new go.Geometry,Rt=new go.PathFigure(Ft,0,!0);return st.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Line,gt,.2*nt)),Rt.add(new go.PathSegment(go.PathSegment.Line,et-Ft,0)),Rt.add(new go.PathSegment(go.PathSegment.Line,et,It)),Rt.add(new go.PathSegment(go.PathSegment.Line,.8*et,vt)),Rt.add(new go.PathSegment(go.PathSegment.Line,et,nt-It)),Rt.add(new go.PathSegment(go.PathSegment.Line,et-Ft,nt)),Rt.add(new go.PathSegment(go.PathSegment.Line,gt,.8*nt)),Rt.add(new go.PathSegment(go.PathSegment.Line,Ft,nt)),Rt.add(new go.PathSegment(go.PathSegment.Line,0,nt-It)),Rt.add(new go.PathSegment(go.PathSegment.Line,.2*et,vt)),Rt.add(new go.PathSegment(go.PathSegment.Line,0,It).close()),st}}),go.Shape.setFigureParameter("ThinX",0,new Mn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=10);var st=new go.Geometry,gt=new go.PathFigure(.1*et,0,!0);return st.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.9*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt).close()),st}),go.Shape.setFigureParameter("SquareIBeam",0,new Mn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=.2);var st=new go.Geometry,gt=new go.PathFigure(0,0,!0);return st.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,ht*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5+ht/2)*et,ht*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5+ht/2)*et,(1-ht)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,(1-ht)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,(1-ht)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5-ht/2)*et,(1-ht)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5-ht/2)*et,ht*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,ht*nt).close()),st}),go.Shape.setFigureParameter("RoundedIBeam",0,new Mn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=.5);var st=new go.Geometry,gt=new go.PathFigure(0,0,!0);return st.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,et,nt,Math.abs(1-ht)*et,.25*nt,Math.abs(1-ht)*et,.75*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ht*et,.75*nt,ht*et,.25*nt).close()),st}),go.Shape.defineFigureGenerator("HalfEllipse",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,Tt*et,0,et,(.5-Tt/2)*nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,(.5+Tt/2)*nt,Tt*et,nt).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,0,et,nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*et,.75*nt,.5*et,.25*nt).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,nt,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*nt,.1*et,.8*nt,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.3*nt,0,0,.45*et,0)).add(new go.PathSegment(go.PathSegment.Bezier,et,.3*nt,.55*et,0,et,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,.5*nt,.9*et,.8*nt).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*et,.01*nt)).add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,.6*et,.2*nt,et,.25*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.55*et,.7*nt,et,.8*nt,.6*et,.8*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.75*et,nt,.5*et,.75*nt,.55*et,.95*nt)).add(new go.PathSegment(go.PathSegment.Line,.25*et,nt)).add(new go.PathSegment(go.PathSegment.Bezier,.45*et,.7*nt,.45*et,.95*nt,.5*et,.75*nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,.4*et,.8*nt,0,.8*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.49*et,.01*nt,0,.25*nt,.4*et,.2*nt).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.4*et,.6*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Bezier,.15*et,nt,.5*et,.75*nt,.45*et,.95*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.85*et,nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.6*et,.6*nt,.55*et,.95*nt,.5*et,.75*nt));var gt=.2,vt=.3,wt=0,Ft=gt*Tt;return st.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*et,(.5+gt+wt)*nt,(.5-gt+vt)*et,(.5+Ft+wt)*nt,(.5-Ft+vt)*et,(.5+gt+wt)*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+gt+vt)*et,(.5+wt)*nt,(.5+Ft+vt)*et,(.5+gt+wt)*nt,(.5+gt+vt)*et,(.5+Ft+wt)*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*et,(.5-gt+wt)*nt,(1-.5+gt+vt)*et,(.5-Ft+wt)*nt,(.5+Ft+vt)*et,(.5-gt+wt)*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.65*et,.36771243*nt,(.5-Ft+vt)*et,(.5-gt+wt)*nt,(.5-gt+vt+.05)*et,(.5-Ft+wt-.02)*nt)),gt=.2,vt=0,wt=-.3,Ft=gt*Tt,st.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+gt+vt)*et,(.5+wt)*nt,(.5+Ft+vt)*et,(.5+gt+wt)*nt,(.5+gt+vt)*et,(.5+Ft+wt)*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*et,(.5-gt+wt)*nt,(1-.5+gt+vt)*et,(.5-Ft+wt)*nt,(.5+Ft+vt)*et,(.5-gt+wt)*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,(.5-gt+vt)*et,(.5+wt)*nt,(.5-Ft+vt)*et,(.5-gt+wt)*nt,(.5-gt+vt)*et,(.5-Ft+wt)*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Ft+vt)*et,(.5+gt+wt)*nt,(.5-gt+vt)*et,(.5+Ft+wt)*nt,(.5-Ft+vt)*et,(.5+gt+wt)*nt)),gt=.2,vt=-.3,wt=0,Ft=gt*Tt,st.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*et,(.5-gt+wt)*nt,(1-.5+gt+vt-.05)*et,(.5-Ft+wt-.02)*nt,(.5+Ft+vt)*et,(.5-gt+wt)*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,(.5-gt+vt)*et,(.5+wt)*nt,(.5-Ft+vt)*et,(.5-gt+wt)*nt,(.5-gt+vt)*et,(.5-Ft+wt)*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*et,(.5+gt+wt)*nt,(.5-gt+vt)*et,(.5+Ft+wt)*nt,(.5-Ft+vt)*et,(.5+gt+wt)*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,.6*nt,(.5+Ft+vt)*et,(.5+gt+wt)*nt,(.5+gt+vt)*et,(.5+Ft+wt)*nt).close()),ht.setSpots(.06,.33,.93,.68),ht}),go.Shape.defineFigureGenerator("YinYang",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*.5,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Arc,270,180,et*.5,et*.5,et*.5,et*.5)),st.add(new go.PathSegment(go.PathSegment.Arc,90,-180,et*.5,et*.75,et*.25,et*.25)),st.add(new go.PathSegment(go.PathSegment.Arc,90,180,et*.5,et*.25,et*.25,et*.25));var gt=.1,vt=.5,wt=.25;return st.add(new go.PathSegment(go.PathSegment.Move,(vt+gt)*et,wt*nt)),st.add(new go.PathSegment(go.PathSegment.Arc,0,-360,et*vt,nt*wt,gt*et,gt*et).close()),st=new go.PathFigure(et*.5,0,!1),ht.add(st),st.add(new go.PathSegment(go.PathSegment.Arc,270,-180,et*.5,et*.5,et*.5,et*.5)),wt=.75,st=new go.PathFigure((vt+gt)*et,wt*nt,!0),ht.add(st),st.add(new go.PathSegment(go.PathSegment.Arc,0,360,et*vt,nt*wt,gt*et,gt*et).close()),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("Peace",function(Nt,et,nt){var ht=.8535533905932737,st=.5*et,gt=.5*nt;return new go.Geometry().add(new go.PathFigure(st,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,st,gt,st,gt)).add(new go.PathSegment(go.PathSegment.Line,st,nt)).add(new go.PathSegment(go.PathSegment.Move,st,gt)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,ht*nt)).add(new go.PathSegment(go.PathSegment.Move,st,gt)).add(new go.PathSegment(go.PathSegment.Line,ht*et,ht*nt)))}),go.Shape.defineFigureGenerator("NotAllowed",function(Nt,et,nt){var ht=new go.Geometry,st=Tt*.5,gt=.5,vt=.5,wt=.5,Ft=new go.PathFigure(vt*et,(wt-gt)*nt);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,wt*nt,(vt-st)*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+gt)*nt,(vt-gt)*et,(wt+st)*nt,(vt-st)*et,(wt+gt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,wt*nt,(vt+st)*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-gt)*nt,(vt+gt)*et,(wt-st)*nt,(vt+st)*et,(wt-gt)*nt)),gt=.4,st=Tt*.4;var It=Ot(),Rt=Ot(),Kt=Ot(),oe=Ot();Le(vt,wt-gt,vt+st,wt-gt,vt+gt,wt-st,vt+gt,wt,.42,It,Rt,Kt,oe,oe);var ee=Ot(),ve=Ot(),_t=Ot();Le(vt,wt-gt,vt+st,wt-gt,vt+gt,wt-st,vt+gt,wt,.58,oe,oe,_t,ee,ve);var Ne=Ot(),he=Ot(),Ze=Ot();Le(vt,wt+gt,vt-st,wt+gt,vt-gt,wt+st,vt-gt,wt,.42,Ne,he,Ze,oe,oe);var Ue=Ot(),Ye=Ot(),un=Ot();return Le(vt,wt+gt,vt-st,wt+gt,vt-gt,wt+st,vt-gt,wt,.58,oe,oe,un,Ue,Ye),Ft.add(new go.PathSegment(go.PathSegment.Move,un.x*et,un.y*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,wt*nt,Ue.x*et,Ue.y*nt,Ye.x*et,Ye.y*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,Kt.x*et,Kt.y*nt,It.x*et,It.y*nt,Rt.x*et,Rt.y*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,un.x*et,un.y*nt).close()),Ft.add(new go.PathSegment(go.PathSegment.Move,Ze.x*et,Ze.y*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,_t.x*et,_t.y*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,wt*nt,ee.x*et,ee.y*nt,ve.x*et,ve.y*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,Ze.x*et,Ze.y*nt,Ne.x*et,Ne.y*nt,he.x*et,he.y*nt).close()),Ht(It),Ht(Rt),Ht(Kt),Ht(oe),Ht(ee),Ht(ve),Ht(_t),Ht(Ne),Ht(he),Ht(Ze),Ht(Ue),Ht(Ye),Ht(un),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("Fragile",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*et,0)).add(new go.PathSegment(go.PathSegment.Line,.2*et,.15*nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.25*nt)).add(new go.PathSegment(go.PathSegment.Line,.29*et,.33*nt)).add(new go.PathSegment(go.PathSegment.Line,.35*et,.25*nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.15*nt)).add(new go.PathSegment(go.PathSegment.Line,.4*et,0)).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*et,.5*nt,et,.25*nt,.75*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.55*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.45*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.45*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.5*nt,0,.25*nt).close()))}),go.Shape.setFigureParameter("HourGlass",0,new Mn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=30),ht>et&&(ht=et);var st=(et-ht)/2,gt=st+ht;return new go.Geometry().add(new go.PathFigure(gt,.5*nt).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt)).add(new go.PathSegment(go.PathSegment.Line,st,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,et,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(0,.55*nt).add(new go.PathSegment(go.PathSegment.Line,.6*et,0)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.45*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.45*nt)).add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.55*nt).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(Nt,et,nt){var ht=new go.Geometry,st=Tt*.4,gt=.4,vt=.5,wt=.5,Ft=Ot(),It=Ot(),Rt=Ot(),Kt=Ot(),oe=new go.PathFigure((vt-gt)*et,wt*nt,!1);ht.add(oe),oe.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt)),Le(vt,wt-gt,vt+st,wt-gt,vt+gt,wt-st,vt+gt,wt,.44,Rt,Kt,It,Ft,Ft),oe.add(new go.PathSegment(go.PathSegment.Bezier,It.x*et,It.y*nt,Rt.x*et,Rt.y*nt,Kt.x*et,Kt.y*nt));var ee=xt(It.x,It.y);Le(vt,wt-gt,vt+st,wt-gt,vt+gt,wt-st,vt+gt,wt,.56,Ft,Ft,It,Rt,Kt);var ve=xt(It.x,It.y);oe.add(new go.PathSegment(go.PathSegment.Line,(ee.x*.1+.95*.9)*et,ee.y*.1*nt)),oe.add(new go.PathSegment(go.PathSegment.Line,.85*et,ee.y*.1*nt)),oe.add(new go.PathSegment(go.PathSegment.Line,.85*et,0)),oe.add(new go.PathSegment(go.PathSegment.Line,et,0)),oe.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),oe.add(new go.PathSegment(go.PathSegment.Line,(ve.x*.1+.9)*et,.15*nt)),oe.add(new go.PathSegment(go.PathSegment.Line,(ve.x*.1+.9)*et,(ve.y*.1+.05*.9)*nt)),oe.add(new go.PathSegment(go.PathSegment.Line,ve.x*et,ve.y*nt)),oe.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,wt*nt,Rt.x*et,Rt.y*nt,Kt.x*et,Kt.y*nt)),oe.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt)),oe.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,wt*nt,(vt-st)*et,(wt+gt)*nt,(vt-gt)*et,(wt+st)*nt)),gt=.35,st=Tt*.35;var _t=new go.PathFigure(vt*et,(wt-gt)*nt,!1);ht.add(_t),_t.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,wt*nt,(vt-st)*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+gt)*nt,(vt-gt)*et,(wt+st)*nt,(vt-st)*et,(wt+gt)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,wt*nt,(vt+st)*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-gt)*nt,(vt+gt)*et,(wt-st)*nt,(vt+st)*et,(wt-gt)*nt));var Ne=new go.PathFigure((vt-gt)*et,wt*nt,!1);return ht.add(Ne),Ht(Ft),Ht(It),Ht(Rt),Ht(Kt),Ht(ee),Ht(ve),ht.spot1=new go.Spot(.202,.257),ht.spot2=new go.Spot(.792,.739),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("GenderFemale",function(Nt,et,nt){var ht=new go.Geometry,st=.375,gt=0,vt=-.125,wt=st*Tt,Ft=new go.PathFigure((.525+gt)*et,(.5+st+vt)*nt,!1);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+st+gt)*et,(.5+vt)*nt,(.5+wt+gt)*et,(.5+st+vt)*nt,(.5+st+gt)*et,(.5+wt+vt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*et,(.5-st+vt)*nt,(1-.5+st+gt)*et,(.5-wt+vt)*nt,(.5+wt+gt)*et,(.5-st+vt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(.5-st+gt)*et,(.5+vt)*nt,(.5-wt+gt)*et,(.5-st+vt)*nt,(.5-st+gt)*et,(.5-wt+vt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(.475+gt)*et,(.5+st+vt)*nt,(.5-st+gt)*et,(.5+wt+vt)*nt,(.5-wt+gt)*et,(.5+st+vt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.475*et,.85*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.425*et,.85*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.425*et,.9*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.475*et,.9*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.475*et,nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.525*et,nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.525*et,.9*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.575*et,.9*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.575*et,.85*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.525*et,.85*nt).close()),st=.325,gt=0,vt=-.125,wt=st*Tt;var Ft=new go.PathFigure((1-.5+st+gt)*et,(.5+vt)*nt,!1);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*et,(.5+st+vt)*nt,(.5+st+gt)*et,(.5+wt+vt)*nt,(.5+wt+gt)*et,(.5+st+vt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(.5-st+gt)*et,(.5+vt)*nt,(.5-wt+gt)*et,(.5+st+vt)*nt,(.5-st+gt)*et,(.5+wt+vt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*et,(.5-st+vt)*nt,(.5-st+gt)*et,(.5-wt+vt)*nt,(.5-wt+gt)*et,(.5-st+vt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+st+gt)*et,(.5+vt)*nt,(.5+wt+gt)*et,(.5-st+vt)*nt,(1-.5+st+gt)*et,(.5-wt+vt)*nt));var Ft=new go.PathFigure((.525+gt)*et,(.5+st+vt)*nt,!1);return ht.add(Ft),ht.spot1=new go.Spot(.232,.136),ht.spot2=new go.Spot(.682,.611),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("LogicImplies",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;return isNaN(ht)&&(ht=.2),new go.Geometry().add(new go.PathFigure((1-ht)*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,nt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;return isNaN(ht)&&(ht=.2),new go.Geometry().add(new go.PathFigure((1-ht)*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,nt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Move,ht*et,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,ht*et,nt))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)))}),go.Shape.defineFigureGenerator("LogicAnd",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,et,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(Nt,et,nt){var ht=new go.Geometry().add(new go.PathFigure(.5*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*et,.5*nt,.5*et,.5*nt)));return ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("LogicTruth",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,.5*et,0)).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Move,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Move,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt)))}),go.Shape.defineFigureGenerator("LogicForAll",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,.25*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.75*et,.5*nt))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Move,0,nt)).add(new go.PathSegment(go.PathSegment.Line,et,nt))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(Nt,et,nt){var ht=.5;return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,0,ht*nt)).add(new go.PathSegment(go.PathSegment.Arc,180,180,ht*et,ht*nt,ht*et,ht*nt)).add(new go.PathSegment(go.PathSegment.Line,et,nt))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(Nt,et,nt){var ht=.5;return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,ht*nt)).add(new go.PathSegment(go.PathSegment.Arc,0,180,ht*et,ht*nt,ht*et,ht*nt)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new Mn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new Mn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=.3);var st=Nt?Nt.parameter2:NaN;isNaN(st)&&(st=.3);var gt=(1-ht)*et,vt=(.5-st/2)*nt,wt=(.5+st/2)*nt,Ft=new go.Geometry,It=new go.PathFigure(0,vt,!0);Ft.add(It),It.add(new go.PathSegment(go.PathSegment.Line,gt,vt)),It.add(new go.PathSegment(go.PathSegment.Line,gt,0)),It.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),It.add(new go.PathSegment(go.PathSegment.Line,gt,nt)),It.add(new go.PathSegment(go.PathSegment.Line,gt,wt)),It.add(new go.PathSegment(go.PathSegment.Line,0,wt).close()),Ft.spot1=new go.Spot(0,vt/nt);var Rt=qt(0,wt/nt,1,wt/nt,gt/et,1,1,.5,Ot());return Ft.spot2=new go.Spot(Rt.x,Rt.y),Ht(Rt),Ft}),go.Shape.setFigureParameter("Arrow2",0,new Mn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Mn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=30),ht>et&&(ht=et);var st=Nt?Nt.parameter2:NaN;isNaN(st)&&(st=30),st=Math.min(st,nt/2);var gt=et-ht,vt=(nt-st)/2,wt=vt+st,Ft=new go.Geometry,It=new go.PathFigure(0,vt,!0);Ft.add(It),It.add(new go.PathSegment(go.PathSegment.Line,gt,vt)),It.add(new go.PathSegment(go.PathSegment.Line,gt,0)),It.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),It.add(new go.PathSegment(go.PathSegment.Line,gt,nt)),It.add(new go.PathSegment(go.PathSegment.Line,gt,wt)),It.add(new go.PathSegment(go.PathSegment.Line,0,wt).close()),Ft.spot1=new go.Spot(0,vt/nt);var Rt=qt(0,wt/nt,1,wt/nt,gt/et,1,1,.5,Ot());return Ft.spot2=new go.Spot(Rt.x,Rt.y),Ht(Rt),Ft}),go.Shape.defineFigureGenerator("Chevron",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt).close()),ht}),go.Shape.defineFigureGenerator("DoubleArrow",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.3*et,.214*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.3*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,1*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.3*et,1*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.3*et,.786*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,1*nt).close()),ht}),go.Shape.setFigureParameter("DoubleEndArrow",0,new Mn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=.3);var st=(.5-ht/2)*nt,gt=(.5+ht/2)*nt,vt=new go.Geometry,wt=new go.PathFigure(et,.5*nt,!0);vt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,.3*et,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,.3*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.3*et,0)),wt.add(new go.PathSegment(go.PathSegment.Line,.3*et,st)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,st)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close());var Ft=qt(0,.5,.3,0,0,st/nt,.1,st/nt,Ot());return vt.spot1=new go.Spot(Ft.x,Ft.y),Ft=qt(.7,1,1,.5,0,gt/nt,1,gt/nt,Ft),vt.spot2=new go.Spot(Ft.x,Ft.y),Ht(Ft),vt}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new Mn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Mn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=40);var st=Nt?Nt.parameter2:NaN;isNaN(st)&&(st=100);var gt=(nt-ht)/2,vt=gt+ht,wt=(nt-st)/2,Ft=wt+st;(ht>nt||st>nt)&&(st>ht?(ht=ht*nt/st,gt=(nt-ht)/2,vt=gt+ht,wt=0,Ft=nt):(gt=0,vt=nt,wt=0,Ft=nt));var It=new go.Geometry,Rt=new go.PathFigure(et,.5*nt,!0);It.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Line,.7*et,Ft)),Rt.add(new go.PathSegment(go.PathSegment.Line,.7*et,vt)),Rt.add(new go.PathSegment(go.PathSegment.Line,.3*et,vt)),Rt.add(new go.PathSegment(go.PathSegment.Line,.3*et,Ft)),Rt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),Rt.add(new go.PathSegment(go.PathSegment.Line,.3*et,wt)),Rt.add(new go.PathSegment(go.PathSegment.Line,.3*et,gt)),Rt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),Rt.add(new go.PathSegment(go.PathSegment.Line,.7*et,wt).close());var Kt=qt(0,.5,.3,wt/nt,0,gt/nt,1,gt/nt,Ot());return It.spot1=new go.Spot(Kt.x,Kt.y),Kt=qt(.7,Ft/nt,1,.5,0,vt/nt,1,vt/nt,Kt),It.spot2=new go.Spot(Kt.x,Kt.y),Ht(Kt),It}),go.Shape.setFigureParameter("IBeamArrow",0,new Mn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=.3);var st=(.5-ht/2)*nt,gt=(.5+ht/2)*nt,vt=new go.Geometry,wt=new go.PathFigure(et,.5*nt,!0);vt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,0)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,0)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,st)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,st)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),vt.spot1=new go.Spot(0,st/nt);var Ft=qt(.7,1,1,.5,0,gt/nt,1,gt/nt,Ot());return vt.spot2=new go.Spot(Ft.x,Ft.y),Ht(Ft),vt}),go.Shape.setFigureParameter("IBeamArrow2",0,new Mn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Mn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=40);var st=Nt?Nt.parameter2:NaN;isNaN(st)&&(st=100);var gt=(nt-ht)/2,vt=gt+ht,wt=(nt-st)/2,Ft=wt+st;(ht>nt||st>nt)&&(st>ht?(ht=ht*nt/st,gt=(nt-ht)/2,vt=gt+ht,wt=0,Ft=nt):(gt=0,vt=nt,wt=0,Ft=nt));var It=new go.Geometry,Rt=new go.PathFigure(et,.5*nt,!0);It.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Line,.7*et,Ft)),Rt.add(new go.PathSegment(go.PathSegment.Line,.7*et,vt)),Rt.add(new go.PathSegment(go.PathSegment.Line,.2*et,vt)),Rt.add(new go.PathSegment(go.PathSegment.Line,.2*et,Ft)),Rt.add(new go.PathSegment(go.PathSegment.Line,0,Ft)),Rt.add(new go.PathSegment(go.PathSegment.Line,0,wt)),Rt.add(new go.PathSegment(go.PathSegment.Line,.2*et,wt)),Rt.add(new go.PathSegment(go.PathSegment.Line,.2*et,gt)),Rt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),Rt.add(new go.PathSegment(go.PathSegment.Line,.7*et,wt).close()),It.spot1=new go.Spot(0,gt/nt);var Kt=qt(.7,Ft/nt,1,.5,0,vt/nt,1,vt/nt,Ot());return It.spot2=new go.Spot(Kt.x,Kt.y),Ht(Kt),It}),go.Shape.setFigureParameter("Pointer",0,new Mn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=.1);var st=new go.Geometry,gt=new go.PathFigure(et,.5*nt,!0);st.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,ht*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),st.spot1=new go.Spot(ht,.35);var vt=qt(.2,.65,1,.65,0,1,1,.5,Ot());return st.spot2=new go.Spot(vt.x,vt.y),Ht(vt),st}),go.Shape.setFigureParameter("RoundedPointer",0,new Mn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=.3);var st=new go.Geometry,gt=new go.PathFigure(et,.5*nt,!0);st.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ht*et,.75*nt,ht*et,.25*nt).close()),st.spot1=new go.Spot(ht,.35);var vt=qt(0,.65,1,.65,0,1,1,.5,Ot());return st.spot2=new go.Spot(vt.x,vt.y),Ht(vt),st}),go.Shape.setFigureParameter("SplitEndArrow",0,new Mn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=.4);var st=(.5-ht/2)*nt,gt=(.5+ht/2)*nt,vt=new go.Geometry,wt=new go.PathFigure(et,.5*nt,!0);vt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,st)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,st)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),vt.spot1=new go.Spot(.2,.3);var Ft=qt(.7,1,1,.5,0,gt/nt,1,gt/nt,Ot());return vt.spot2=new go.Spot(Ft.x,Ft.y),Ht(Ft),vt}),go.Shape.setFigureParameter("SplitEndArrow2",0,new Mn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=50);var st=(nt-ht)/2,gt=st+ht;ht>nt&&(st=0,gt=nt);var vt=new go.Geometry,wt=new go.PathFigure(et,.5*nt,!0);vt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,st)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,st)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),vt.spot1=new go.Spot(.2,st/nt);var Ft=qt(.7,1,1,.5,0,gt/nt,1,gt/nt,Ot());return vt.spot2=new go.Spot(Ft.x,Ft.y),Ht(Ft),vt}),go.Shape.setFigureParameter("SquareArrow",0,new Mn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=.7);var st=new go.Geometry,gt=new go.PathFigure(et,.5*nt,!0);return st.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,ht*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,0)),gt.add(new go.PathSegment(go.PathSegment.Line,ht*et,0).close()),st.spot1=go.Spot.TopLeft,st.spot2=new go.Spot(ht,1),st}),go.Shape.defineFigureGenerator("Cone1",function(Nt,et,nt){var ht=new go.Geometry,st=Tt*.5,gt=Tt*.1,vt=new go.PathFigure(0,.9*nt,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.9+gt)*nt,(.5+st)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-st)*et,nt,0,(.9+gt)*nt).close()),ht.spot1=new go.Spot(.25,.5),ht.spot2=new go.Spot(.75,.97),ht}),go.Shape.defineFigureGenerator("Cone2",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.9*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Bezier,et,.9*nt,(1-.85/.9)*et,nt,.85/.9*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,0,.9*nt).close());var gt=new go.PathFigure(0,.9*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,et,.9*nt,(1-.85/.9)*et,.8*nt,.85/.9*et,.8*nt)),ht.spot1=new go.Spot(.25,.5),ht.spot2=new go.Spot(.75,.82),ht}),go.Shape.defineFigureGenerator("Cube1",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.5*et,nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,0,.15*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.85*nt).close());var gt=new go.PathFigure(.5*et,nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.15*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),ht.spot1=new go.Spot(0,.3),ht.spot2=new go.Spot(.5,.85),ht}),go.Shape.defineFigureGenerator("Cube2",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.3*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.3*et,0).close());var gt=new go.PathFigure(0,.3*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Move,.7*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),ht.spot1=new go.Spot(0,.3),ht.spot2=new go.Spot(.7,1),ht}),go.Shape.defineFigureGenerator("Cylinder1",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,nt/3);var st=new go.Geometry,gt=Tt*.5,vt=new go.PathFigure(0,ht,!0);st.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,Tt*ht,(.5-gt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,1*et,ht,(.5+gt)*et,0,1*et,Tt*ht)),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt-ht)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,1*nt,1*et,nt-Tt*ht,(.5+gt)*et,1*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-ht,(.5-gt)*et,1*nt,0,nt-Tt*ht)),vt.add(new go.PathSegment(go.PathSegment.Line,0,ht));var wt=new go.PathFigure(et,ht,!1);return st.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,2*ht,1*et,2*ht-Tt*ht,(.5+gt)*et,2*ht)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,ht,(.5-gt)*et,2*ht,0,2*ht-Tt*ht)),st.spot1=new go.Spot(0,0,0,2*ht),st.spot2=new go.Spot(1,1),st}),go.Shape.defineFigureGenerator("Cylinder2",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,nt/3);var st=new go.Geometry,gt=Tt*.5,vt=new go.PathFigure(0,nt-ht,!0);st.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,0,ht)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,Tt*ht,(.5-gt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,ht,(.5+gt)*et,0,et,Tt*ht)),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt-ht)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,nt-Tt*ht,(.5+gt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-ht,(.5-gt)*et,nt,0,nt-Tt*ht));var wt=new go.PathFigure(0,nt-ht,!1);return st.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt-2*ht,0,nt-ht-Tt*ht,(.5-gt)*et,nt-2*ht)),wt.add(new go.PathSegment(go.PathSegment.Bezier,et,nt-ht,(.5+gt)*et,nt-2*ht,et,nt-ht-Tt*ht)),st.spot1=new go.Spot(0,0),st.spot2=new go.Spot(1,1,0,-2*ht),st}),go.Shape.defineFigureGenerator("Cylinder3",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,et/3);var st=new go.Geometry,gt=Tt*.5,vt=new go.PathFigure(ht,0,!0);st.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et-ht,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,et-Tt*ht,0,et,(.5-gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et-ht,nt,et,(.5+gt)*nt,et-Tt*ht,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,ht,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,Tt*ht,nt,0,(.5+gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,(.5-gt)*nt,Tt*ht,0));var wt=new go.PathFigure(ht,0,!1);return st.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,2*ht,.5*nt,ht+Tt*ht,0,2*ht,(.5-gt)*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,ht,nt,2*ht,(.5+gt)*nt,ht+Tt*ht,nt)),st.spot1=new go.Spot(0,0,2*ht,0),st.spot2=new go.Spot(1,1),st}),go.Shape.defineFigureGenerator("Cylinder4",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,et/3);var st=new go.Geometry,gt=Tt*.5,vt=new go.PathFigure(et-ht,0,!0);st.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,et-Tt*ht,0,et,(.5-gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et-ht,nt,et,(.5+gt)*nt,et-Tt*ht,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,ht,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,Tt*ht,nt,0,(.5+gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,(.5-gt)*nt,Tt*ht,0)),vt.add(new go.PathSegment(go.PathSegment.Line,et-ht,0));var wt=new go.PathFigure(et-ht,0,!1);return st.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,et-2*ht,.5*nt,et-ht-Tt*ht,0,et-2*ht,(.5-gt)*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,et-ht,nt,et-2*ht,(.5+gt)*nt,et-ht-Tt*ht,nt)),st.spot1=new go.Spot(0,0),st.spot2=new go.Spot(1,1,-2*ht,0),st}),go.Shape.defineFigureGenerator("Prism1",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.25*et,.25*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var gt=new go.PathFigure(.25*et,.25*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),ht.spot1=new go.Spot(.408,.172),ht.spot2=new go.Spot(.833,.662),ht}),go.Shape.defineFigureGenerator("Prism2",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.25*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var gt=new go.PathFigure(0,nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,0,.25*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.5*nt)),ht.spot1=new go.Spot(.25,.5),ht.spot2=new go.Spot(.75,.75),ht}),go.Shape.defineFigureGenerator("Pyramid1",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.5*et,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.75*nt).close());var gt=new go.PathFigure(.5*et,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),ht.spot1=new go.Spot(.25,.367),ht.spot2=new go.Spot(.75,.875),ht}),go.Shape.defineFigureGenerator("Pyramid2",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.5*et,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.85*nt).close());var gt=new go.PathFigure(.5*et,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.7*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.85*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.7*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),ht.spot1=new go.Spot(.25,.367),ht.spot2=new go.Spot(.75,.875),ht}),go.Shape.defineFigureGenerator("Actor",function(Nt,et,nt){var ht=new go.Geometry,st=.2,gt=.1,vt=Tt*st,wt=Tt*gt,Ft=.5,It=.1,Rt=new go.PathFigure(Ft*et,(It+gt)*nt,!0);ht.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-st)*et,It*nt,(Ft-vt)*et,(It+gt)*nt,(Ft-st)*et,(It+wt)*nt)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It-gt)*nt,(Ft-st)*et,(It-wt)*nt,(Ft-vt)*et,(It-gt)*nt)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+st)*et,It*nt,(Ft+vt)*et,(It-gt)*nt,(Ft+st)*et,(It-wt)*nt)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It+gt)*nt,(Ft+st)*et,(It+wt)*nt,(Ft+vt)*et,(It+gt)*nt));var Kt=.05,oe=Tt*Kt;Ft=.05,It=.25;var ee=new go.PathFigure(.5*et,.2*nt,!0);return ht.add(ee),ee.add(new go.PathSegment(go.PathSegment.Line,.95*et,.2*nt)),Ft=.95,It=.25,ee.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+Kt)*et,It*nt,(Ft+oe)*et,(It-Kt)*nt,(Ft+Kt)*et,(It-oe)*nt)),ee.add(new go.PathSegment(go.PathSegment.Line,et,.6*nt)),ee.add(new go.PathSegment(go.PathSegment.Line,.85*et,.6*nt)),ee.add(new go.PathSegment(go.PathSegment.Line,.85*et,.35*nt)),Kt=.025,oe=Tt*Kt,Ft=.825,It=.35,ee.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It-Kt)*nt,(Ft+Kt)*et,(It-oe)*nt,(Ft+oe)*et,(It-Kt)*nt)),ee.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-Kt)*et,It*nt,(Ft-oe)*et,(It-Kt)*nt,(Ft-Kt)*et,(It-oe)*nt)),ee.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),ee.add(new go.PathSegment(go.PathSegment.Line,.55*et,nt)),ee.add(new go.PathSegment(go.PathSegment.Line,.55*et,.7*nt)),Kt=.05,oe=Tt*Kt,Ft=.5,It=.7,ee.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It-Kt)*nt,(Ft+Kt)*et,(It-oe)*nt,(Ft+oe)*et,(It-Kt)*nt)),ee.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-Kt)*et,It*nt,(Ft-oe)*et,(It-Kt)*nt,(Ft-Kt)*et,(It-oe)*nt)),ee.add(new go.PathSegment(go.PathSegment.Line,.45*et,nt)),ee.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),ee.add(new go.PathSegment(go.PathSegment.Line,.2*et,.35*nt)),Kt=.025,oe=Tt*Kt,Ft=.175,It=.35,ee.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It-Kt)*nt,(Ft+Kt)*et,(It-oe)*nt,(Ft+oe)*et,(It-Kt)*nt)),ee.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-Kt)*et,It*nt,(Ft-oe)*et,(It-Kt)*nt,(Ft-Kt)*et,(It-oe)*nt)),ee.add(new go.PathSegment(go.PathSegment.Line,.15*et,.6*nt)),ee.add(new go.PathSegment(go.PathSegment.Line,0,.6*nt)),ee.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),Kt=.05,oe=Tt*Kt,Ft=.05,It=.25,ee.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It-Kt)*nt,(Ft-Kt)*et,(It-oe)*nt,(Ft-oe)*et,(It-Kt)*nt)),ee.add(new go.PathSegment(go.PathSegment.Line,.5*et,.2*nt)),ht.spot1=new go.Spot(.2,.2),ht.spot2=new go.Spot(.8,.65),ht}),go.Shape.setFigureParameter("Card",0,new Mn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;isNaN(ht)&&(ht=.2);var st=new go.Geometry,gt=new go.PathFigure(et,0,!0);return st.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,ht*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,ht*et,0).close()),st.spot1=new go.Spot(0,ht),st.spot2=go.Spot.BottomRight,st}),go.Shape.defineFigureGenerator("Collate",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.5*et,.5*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt));var gt=new go.PathFigure(.5*et,.5*nt,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),ht.spot1=new go.Spot(.25,0),ht.spot2=new go.Spot(.75,.25),ht}),go.Shape.defineFigureGenerator("CreateRequest",function(Nt,et,nt){var ht=new go.Geometry,st=Nt?Nt.parameter1:NaN;isNaN(st)&&(st=.1);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var vt=new go.PathFigure(0,st*nt,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,st*nt)),vt.add(new go.PathSegment(go.PathSegment.Move,0,(1-st)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,(1-st)*nt)),ht}),go.Shape.defineFigureGenerator("Database",function(Nt,et,nt){var ht=new go.Geometry,st=Tt*.5,gt=Tt*.1,vt=new go.PathFigure(et,.1*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.9+gt)*nt,(.5+st)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-st)*et,nt,0,(.9+gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,(.1-gt)*nt,(.5-st)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.1*nt,(.5+st)*et,0,et,(.1-gt)*nt));var wt=new go.PathFigure(et,.1*nt,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,et,(.1+gt)*nt,(.5+st)*et,.2*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*nt,(.5-st)*et,.2*nt,0,(.1+gt)*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,et,.2*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.3*nt,et,(.2+gt)*nt,(.5+st)*et,.3*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*nt,(.5-st)*et,.3*nt,0,(.2+gt)*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,et,.3*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.4*nt,et,(.3+gt)*nt,(.5+st)*et,.4*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*nt,(.5-st)*et,.4*nt,0,(.3+gt)*nt)),ht.spot1=new go.Spot(0,.4),ht.spot2=new go.Spot(1,.9),ht}),go.Shape.defineFigureGenerator("DataStorage",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),st.add(new go.PathSegment(go.PathSegment.Bezier,.75*et,nt,et,0,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.9*nt,.25*et,.1*nt).close()),ht.spot1=new go.Spot(.226,0),ht.spot2=new go.Spot(.81,1),ht}),go.Shape.defineFigureGenerator("DiskStorage",function(Nt,et,nt){var ht=new go.Geometry,st=Tt*.5,gt=Tt*.1,vt=new go.PathFigure(et,.1*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.9+gt)*nt,(.5+st)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-st)*et,nt,0,(.9+gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,(.1-gt)*nt,(.5-st)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.1*nt,(.5+st)*et,0,et,(.1-gt)*nt));var wt=new go.PathFigure(et,.1*nt,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,et,(.1+gt)*nt,(.5+st)*et,.2*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*nt,(.5-st)*et,.2*nt,0,(.1+gt)*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,et,.2*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.3*nt,et,(.2+gt)*nt,(.5+st)*et,.3*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*nt,(.5-st)*et,.3*nt,0,(.2+gt)*nt)),ht.spot1=new go.Spot(0,.3),ht.spot2=new go.Spot(1,.9),ht}),go.Shape.defineFigureGenerator("Display",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.25*et,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),st.add(new go.PathSegment(go.PathSegment.Bezier,.75*et,nt,et,0,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.25*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt).close()),ht.spot1=new go.Spot(.25,0),ht.spot2=new go.Spot(.75,1),ht}),go.Shape.defineFigureGenerator("DividedEvent",function(Nt,et,nt){var ht=new go.Geometry,st=Nt?Nt.parameter1:NaN;isNaN(st)?st=.2:st<.15&&(st=.15);var gt=Tt*.2,vt=new go.PathFigure(0,.2*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,0,(.2-gt)*nt,(.2-gt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,.8*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.2*nt,(.8+gt)*et,0,et,(.2-gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,nt,et,(.8+gt)*nt,(.8+gt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*nt,(.2-gt)*et,nt,0,(.8+gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt));var wt=new go.PathFigure(0,st*nt,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et,st*nt)),ht}),go.Shape.defineFigureGenerator("DividedProcess",function(Nt,et,nt){var ht=new go.Geometry,st=Nt?Nt.parameter1:NaN;(isNaN(st)||st<.1)&&(st=.1);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var vt=new go.PathFigure(0,st*nt,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,st*nt)),ht}),go.Shape.defineFigureGenerator("Document",function(Nt,et,nt){var ht=new go.Geometry;nt=nt/.8;var st=new go.PathFigure(0,.7*nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.5*et,.4*nt,.5*et,nt).close()),ht.spot1=go.Spot.TopLeft,ht.spot2=new go.Spot(1,.6),ht}),go.Shape.defineFigureGenerator("ExternalOrganization",function(Nt,et,nt){var ht=new go.Geometry,st=Nt?Nt.parameter1:NaN;(isNaN(st)||st<.2)&&(st=.2);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var vt=new go.PathFigure(st*et,0,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,0,st*nt)),vt.add(new go.PathSegment(go.PathSegment.Move,et,st*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,(1-st)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Move,0,(1-st)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,st*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Move,(1-st)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,(1-st)*nt)),ht}),go.Shape.defineFigureGenerator("ExternalProcess",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.5*et,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt).close());var gt=new go.PathFigure(.1*et,.4*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.9*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.6*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.4*et,.9*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.9*nt)),ht.spot1=new go.Spot(.25,.25),ht.spot2=new go.Spot(.75,.75),ht}),go.Shape.defineFigureGenerator("File",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var gt=new go.PathFigure(.75*et,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.25*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),ht.spot1=new go.Spot(0,.25),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("Interrupt",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et,.5*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt));var gt=new go.PathFigure(et,.5*nt,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt));var vt=new go.PathFigure(et,.5*nt,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,0)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.5,.75),ht}),go.Shape.defineFigureGenerator("InternalStorage",function(Nt,et,nt){var ht=new go.Geometry,st=Nt?Nt.parameter1:NaN,gt=Nt?Nt.parameter2:NaN;isNaN(st)&&(st=.1),isNaN(gt)&&(gt=.1);var vt=new go.PathFigure(0,0,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var wt=new go.PathFigure(st*et,0,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,st*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Move,0,gt*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,et,gt*nt)),ht}),go.Shape.defineFigureGenerator("Junction",function(Nt,et,nt){var ht=new go.Geometry,st=1/Math.SQRT2,gt=(1-1/Math.SQRT2)/2,vt=Tt*.5,wt=.5,Ft=new go.PathFigure(et,wt*nt,!0);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,wt*et,nt,et,(wt+vt)*nt,(wt+vt)*et,nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,0,wt*nt,(wt-vt)*et,nt,0,(wt+vt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,wt*et,0,0,(wt-vt)*nt,(wt-vt)*et,0)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,et,wt*nt,(wt+vt)*et,0,et,(wt-vt)*nt));var It=new go.PathFigure((gt+st)*et,(gt+st)*nt,!1);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Line,gt*et,gt*nt)),It.add(new go.PathSegment(go.PathSegment.Move,gt*et,(gt+st)*nt)),It.add(new go.PathSegment(go.PathSegment.Line,(gt+st)*et,gt*nt)),ht}),go.Shape.defineFigureGenerator("LinedDocument",function(Nt,et,nt){var ht=new go.Geometry;nt=nt/.8;var st=new go.PathFigure(0,.7*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.5*et,.4*nt,.5*et,nt).close());var gt=new go.PathFigure(.1*et,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.75*nt)),ht.spot1=new go.Spot(.1,0),ht.spot2=new go.Spot(1,.6),ht}),go.Shape.defineFigureGenerator("LoopLimit",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.25*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("MagneticTape",function(Nt,et,nt){var ht=new go.Geometry,st=Tt*.5,gt=.5,vt=new go.PathFigure(.5*et,nt,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*nt,(gt-st)*et,nt,0,(gt+st)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,0,0,(gt-st)*nt,(gt-st)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,gt*nt,(gt+st)*et,0,et,(gt-st)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+.1)*et,.9*nt,et,(gt+st)*nt,(gt+st)*et,.9*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),ht.spot1=new go.Spot(.15,.15),ht.spot2=new go.Spot(.85,.8),ht}),go.Shape.defineFigureGenerator("ManualInput",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("MessageFromUser",function(Nt,et,nt){var ht=new go.Geometry,st=Nt?Nt.parameter1:NaN;isNaN(st)&&(st=.7);var gt=new go.PathFigure(0,0,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,st*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht.spot1=go.Spot.TopLeft,ht}),go.Shape.defineFigureGenerator("MicroformProcessing",function(Nt,et,nt){var ht=new go.Geometry,st=Nt?Nt.parameter1:NaN;isNaN(st)&&(st=.25);var gt=new go.PathFigure(0,0,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,st*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,(1-st)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht}),go.Shape.defineFigureGenerator("MicroformRecording",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(1,.75),ht}),go.Shape.defineFigureGenerator("MultiDocument",function(Nt,et,nt){var ht=new go.Geometry;nt=nt/.8;var st=new go.PathFigure(et,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,.44*nt,.96*et,.47*nt,.93*et,.45*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.9*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.54*nt,.86*et,.57*nt,.83*et,.55*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.4*et,.4*nt,.4*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,.1*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,.1*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,0).close());var gt=new go.PathFigure(.1*et,.2*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.54*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.44*nt)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.8,.77),ht}),go.Shape.defineFigureGenerator("MultiProcess",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.1*et,.1*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,.1*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.9*et,.9*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,.9*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,.2*nt).close());var gt=new go.PathFigure(.2*et,.1*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.1*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.9*nt)),ht.spot1=new go.Spot(0,.2),ht.spot2=new go.Spot(.8,1),ht}),go.Shape.defineFigureGenerator("OfflineStorage",function(Nt,et,nt){var ht=new go.Geometry,st=Nt?Nt.parameter1:NaN;isNaN(st)&&(st=.1);var gt=1-st,vt=new go.PathFigure(0,0,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt).close());var wt=new go.PathFigure(.5*st*et,st*nt,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,(1-.5*st)*et,st*nt)),ht}),go.Shape.defineFigureGenerator("OffPageConnector",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht.spot1=go.Spot.TopLeft,ht.spot2=new go.Spot(.75,1),ht}),go.Shape.defineFigureGenerator("Or",function(Nt,et,nt){var ht=new go.Geometry,st=Tt*.5,gt=.5,vt=new go.PathFigure(et,gt*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,nt,et,(gt+st)*nt,(gt+st)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*nt,(gt-st)*et,nt,0,(gt+st)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,0,0,(gt-st)*nt,(gt-st)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,gt*nt,(gt+st)*et,0,et,(gt-st)*nt));var wt=new go.PathFigure(et,.5*nt,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,.5*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),ht}),go.Shape.defineFigureGenerator("PaperTape",function(Nt,et,nt){var ht=new go.Geometry;nt=nt/.8;var st=new go.PathFigure(0,.7*nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,.3*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,et,.3*nt,.5*et,.6*nt,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.5*et,.4*nt,.5*et,nt).close()),ht.spot1=new go.Spot(0,.49),ht.spot2=new go.Spot(1,.75),ht}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(Nt,et,nt){var ht=new go.Geometry,st=Nt?Nt.parameter1:NaN,gt=Nt?Nt.parameter2:NaN;isNaN(st)&&(st=.1),isNaN(gt)&&(gt=.3);var vt=new go.PathFigure(0,0,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*et,.5*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(Nt,et,nt){var ht=new go.Geometry,st=Nt?Nt.parameter1:NaN,gt=Nt?Nt.parameter2:NaN;isNaN(st)&&(st=.1),isNaN(gt)&&(gt=.3);var vt=new go.PathFigure(0,0,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht}),go.Shape.defineFigureGenerator("Procedure",function(Nt,et,nt){var ht=new go.Geometry,st=Nt?Nt.parameter1:NaN;isNaN(st)&&(st=.1);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var vt=new go.PathFigure((1-st)*et,0,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,(1-st)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Move,st*et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,st*et,nt)),ht}),go.Shape.defineFigureGenerator("Process",function(Nt,et,nt){var ht=new go.Geometry,st=Nt?Nt.parameter1:NaN;isNaN(st)&&(st=.1);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var vt=new go.PathFigure(st*et,0,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,st*et,nt)),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("Sort",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.5*et,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt).close());var gt=new go.PathFigure(0,.5*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),ht.spot1=new go.Spot(.25,.25),ht.spot2=new go.Spot(.75,.5),ht}),go.Shape.defineFigureGenerator("Start",function(Nt,et,nt){var ht=new go.Geometry,st=Nt?Nt.parameter1:NaN;isNaN(st)&&(st=.25);var gt=new go.PathFigure(st*et,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*et,.5*nt,.25*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*et,.5*nt,.25*et,.5*nt));var vt=new go.PathFigure(st*et,0,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,st*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Move,(1-st)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,(1-st)*et,nt)),ht.spot1=new go.Spot(st,0),ht.spot2=new go.Spot(1-st,1),ht}),go.Shape.defineFigureGenerator("Terminator",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.25*et,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*et,.5*nt,.25*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*et,.5*nt,.25*et,.5*nt)),ht.spot1=new go.Spot(.23,0),ht.spot2=new go.Spot(.77,1),ht}),go.Shape.defineFigureGenerator("TransmittalTape",function(Nt,et,nt){var ht=new go.Geometry,st=Nt?Nt.parameter1:NaN;isNaN(st)&&(st=.1);var gt=new go.PathFigure(0,0,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.75*et,(1-st)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,(1-st)*nt).close()),ht.spot1=go.Spot.TopLeft,ht}),go.Shape.defineFigureGenerator("AndGate",function(Nt,et,nt){var ht=new go.Geometry,st=Tt*.5,gt=new go.PathFigure(0,0,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(.5+st)*et,0,et,(.5-st)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.5+st)*nt,(.5+st)*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht.spot1=go.Spot.TopLeft,ht.spot2=new go.Spot(.55,1),ht}),go.Shape.defineFigureGenerator("Buffer",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.5,.75),ht}),go.Shape.defineFigureGenerator("Clock",function(Nt,et,nt){var ht=new go.Geometry,st=Tt*.5,gt=.5,vt=new go.PathFigure(et,gt*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,nt,et,(gt+st)*nt,(gt+st)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*nt,(gt-st)*et,nt,0,(gt+st)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,0,0,(gt-st)*nt,(gt-st)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,gt*nt,(gt+st)*et,0,et,(gt-st)*nt));var wt=new go.PathFigure(et,gt*nt,!1);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et,gt*nt));var Ft=new go.PathFigure(.8*et,.75*nt,!1);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Line,.8*et,.25*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.6*et,.25*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.6*et,.75*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.4*et,.75*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.4*et,.25*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.2*et,.25*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.2*et,.75*nt)),ht}),go.Shape.defineFigureGenerator("Ground",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.5*et,0,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.2*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.3*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.7*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.4*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.6*et,nt)),ht}),go.Shape.defineFigureGenerator("Inverter",function(Nt,et,nt){var ht=new go.Geometry,st=Tt*.1,gt=.1,vt=.9,wt=.5,Ft=new go.PathFigure(.8*et,.5*nt,!0);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Line,0,nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,0,0)),Ft.add(new go.PathSegment(go.PathSegment.Line,.8*et,.5*nt));var It=new go.PathFigure((vt+gt)*et,wt*nt,!0);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,wt*nt,(vt-st)*et,(wt+gt)*nt,(vt-gt)*et,(wt+st)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,wt*nt,(vt+st)*et,(wt-gt)*nt,(vt+gt)*et,(wt-st)*nt)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.4,.75),ht}),go.Shape.defineFigureGenerator("NandGate",function(Nt,et,nt){var ht=new go.Geometry,st=Tt*.5,gt=Tt*.4,vt=Tt*.1,wt=.1,Ft=.9,It=.5,Rt=new go.PathFigure(.8*et,.5*nt,!0);ht.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,nt,.8*et,(.5+gt)*nt,(.4+st)*et,nt)),Rt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),Rt.add(new go.PathSegment(go.PathSegment.Line,0,0)),Rt.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(.4+st)*et,0,.8*et,(.5-gt)*nt));var Kt=new go.PathFigure((Ft+wt)*et,It*nt,!0);return ht.add(Kt),Kt.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It+wt)*nt,(Ft+wt)*et,(It+vt)*nt,(Ft+vt)*et,(It+wt)*nt)),Kt.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-wt)*et,It*nt,(Ft-vt)*et,(It+wt)*nt,(Ft-wt)*et,(It+vt)*nt)),Kt.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It-wt)*nt,(Ft-wt)*et,(It-vt)*nt,(Ft-vt)*et,(It-wt)*nt)),Kt.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+wt)*et,It*nt,(Ft+vt)*et,(It-wt)*nt,(Ft+wt)*et,(It-vt)*nt)),ht.spot1=new go.Spot(0,.05),ht.spot2=new go.Spot(.55,.95),ht}),go.Shape.defineFigureGenerator("NorGate",function(Nt,et,nt){var ht=new go.Geometry,st=.5,gt=Tt*st,vt=0,wt=.5,Ft=new go.PathFigure(.8*et,.5*nt,!0);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.7*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.75*nt,.25*et,.25*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(vt+gt)*et,(wt-st)*nt,.7*et,(wt-gt)*nt)),st=.1,gt=Tt*.1,vt=.9,wt=.5;var It=new go.PathFigure((vt-st)*et,wt*nt,!0);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(vt+st)*et,wt*nt,(vt+gt)*et,(wt-st)*nt,(vt+st)*et,(wt-gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(vt-st)*et,wt*nt,(vt-gt)*et,(wt+st)*nt,(vt-st)*et,(wt+gt)*nt)),ht.spot1=new go.Spot(.2,.25),ht.spot2=new go.Spot(.6,.75),ht}),go.Shape.defineFigureGenerator("OrGate",function(Nt,et,nt){var ht=new go.Geometry,st=.5,gt=Tt*st,vt=0,wt=.5,Ft=new go.PathFigure(0,0,!0);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(vt+gt+gt)*et,(wt-st)*nt,.8*et,(wt-gt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.8*et,(wt+gt)*nt,(vt+gt+gt)*et,(wt+st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.75*nt,.25*et,.25*nt).close()),ht.spot1=new go.Spot(.2,.25),ht.spot2=new go.Spot(.75,.75),ht}),go.Shape.defineFigureGenerator("XnorGate",function(Nt,et,nt){var ht=new go.Geometry,st=.5,gt=Tt*st,vt=.2,wt=.5,Ft=new go.PathFigure(.1*et,0,!1);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,nt,.35*et,.25*nt,.35*et,.75*nt));var It=new go.PathFigure(.8*et,.5*nt,!0);ht.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,nt,.7*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,.45*et,.75*nt,.45*et,.25*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(vt+gt)*et,(wt-st)*nt,.7*et,(wt-gt)*nt)),st=.1,gt=Tt*.1,vt=.9,wt=.5;var Rt=new go.PathFigure((vt-st)*et,wt*nt,!0);return ht.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+st)*et,wt*nt,(vt+gt)*et,(wt-st)*nt,(vt+st)*et,(wt-gt)*nt)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-st)*et,wt*nt,(vt-gt)*et,(wt+st)*nt,(vt-st)*et,(wt+gt)*nt)),ht.spot1=new go.Spot(.4,.25),ht.spot2=new go.Spot(.65,.75),ht}),go.Shape.defineFigureGenerator("XorGate",function(Nt,et,nt){var ht=new go.Geometry,st=.5,gt=Tt*st,vt=.2,wt=.5,Ft=new go.PathFigure(.1*et,0,!1);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,nt,.35*et,.25*nt,.35*et,.75*nt));var It=new go.PathFigure(.2*et,0,!0);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(vt+gt)*et,(wt-st)*nt,.9*et,(wt-gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,nt,.9*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,.45*et,.75*nt,.45*et,.25*nt).close()),ht.spot1=new go.Spot(.4,.25),ht.spot2=new go.Spot(.8,.75),ht}),go.Shape.defineFigureGenerator("Capacitor",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Move,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ht}),go.Shape.defineFigureGenerator("Resistor",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.5*nt,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.3*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.6*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.7*et,.5*nt)),ht}),go.Shape.defineFigureGenerator("Inductor",function(Nt,et,nt){var ht=new go.Geometry,st=Tt*.1,gt=.1,vt=.1,wt=.5,Ft=new go.PathFigure((vt-st*.5)*et,nt,!1);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,0,(vt-st)*et,nt,(vt-gt)*et,0)),vt=.3,Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,nt,(vt+gt)*et,0,(vt+st)*et,nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,0,(vt-st)*et,nt,(vt-gt)*et,0)),vt=.5,Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,nt,(vt+gt)*et,0,(vt+st)*et,nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,0,(vt-st)*et,nt,(vt-gt)*et,0)),vt=.7,Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,nt,(vt+gt)*et,0,(vt+st)*et,nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,0,(vt-st)*et,nt,(vt-gt)*et,0)),vt=.9,Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+st*.5)*et,nt,(vt+gt)*et,0,(vt+st)*et,nt)),ht}),go.Shape.defineFigureGenerator("ACvoltageSource",function(Nt,et,nt){var ht=new go.Geometry,st=Tt*.5,gt=.5,vt=.5,wt=.5,Ft=new go.PathFigure((vt-gt)*et,wt*nt,!1);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,wt*nt,(vt+st)*et,(wt-gt)*nt,(vt+gt)*et,(wt-st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,wt*nt,(vt-st)*et,(wt+gt)*nt,(vt-gt)*et,(wt+st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Move,(vt-gt+.1)*et,wt*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt-.1)*et,wt*nt,vt*et,(wt-gt)*nt,vt*et,(wt+gt)*nt)),ht}),go.Shape.defineFigureGenerator("DCvoltageSource",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.75*nt,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Move,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ht}),go.Shape.defineFigureGenerator("Diode",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et,0,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.5,.75),ht}),go.Shape.defineFigureGenerator("Wifi",function(Nt,et,nt){var ht=new go.Geometry,st=et,gt=nt;et=et*.38,nt=nt*.6;var vt=Tt*.8,wt=.8,Ft=0,It=.5,Rt=(st-et)/2,Kt=(gt-nt)/2,oe=new go.PathFigure(Ft*et+Rt,(It+wt)*nt+Kt,!0);ht.add(oe),oe.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-wt)*et+Rt,It*nt+Kt,(Ft-vt)*et+Rt,(It+wt)*nt+Kt,(Ft-wt)*et+Rt,(It+vt)*nt+Kt)),oe.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+Rt,(It-wt)*nt+Kt,(Ft-wt)*et+Rt,(It-vt)*nt+Kt,(Ft-vt)*et+Rt,(It-wt)*nt+Kt)),oe.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-wt+vt*.5)*et+Rt,It*nt+Kt,Ft*et+Rt,(It-wt)*nt+Kt,(Ft-wt+vt*.5)*et+Rt,(It-vt)*nt+Kt)),oe.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+Rt,(It+wt)*nt+Kt,(Ft-wt+vt*.5)*et+Rt,(It+vt)*nt+Kt,Ft*et+Rt,(It+wt)*nt+Kt).close()),vt=Tt*.4,wt=.4,Ft=.2,It=.5;var ee=new go.PathFigure(Ft*et+Rt,(It+wt)*nt+Kt,!0);ht.add(ee),ee.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-wt)*et+Rt,It*nt+Kt,(Ft-vt)*et+Rt,(It+wt)*nt+Kt,(Ft-wt)*et+Rt,(It+vt)*nt+Kt)),ee.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+Rt,(It-wt)*nt+Kt,(Ft-wt)*et+Rt,(It-vt)*nt+Kt,(Ft-vt)*et+Rt,(It-wt)*nt+Kt)),ee.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-wt+vt*.5)*et+Rt,It*nt+Kt,Ft*et+Rt,(It-wt)*nt+Kt,(Ft-wt+vt*.5)*et+Rt,(It-vt)*nt+Kt)),ee.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+Rt,(It+wt)*nt+Kt,(Ft-wt+vt*.5)*et+Rt,(It+vt)*nt+Kt,Ft*et+Rt,(It+wt)*nt+Kt).close()),vt=Tt*.2,wt=.2,Ft=.5,It=.5;var ve=new go.PathFigure((Ft-wt)*et+Rt,It*nt+Kt,!0);ht.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+Rt,(It-wt)*nt+Kt,(Ft-wt)*et+Rt,(It-vt)*nt+Kt,(Ft-vt)*et+Rt,(It-wt)*nt+Kt)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+wt)*et+Rt,It*nt+Kt,(Ft+vt)*et+Rt,(It-wt)*nt+Kt,(Ft+wt)*et+Rt,(It-vt)*nt+Kt)),ve.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+Rt,(It+wt)*nt+Kt,(Ft+wt)*et+Rt,(It+vt)*nt+Kt,(Ft+vt)*et+Rt,(It+wt)*nt+Kt)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-wt)*et+Rt,It*nt+Kt,(Ft-vt)*et+Rt,(It+wt)*nt+Kt,(Ft-wt)*et+Rt,(It+vt)*nt+Kt)),vt=Tt*.4,wt=.4,Ft=.8,It=.5;var _t=new go.PathFigure(Ft*et+Rt,(It-wt)*nt+Kt,!0);ht.add(_t),_t.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+wt)*et+Rt,It*nt+Kt,(Ft+vt)*et+Rt,(It-wt)*nt+Kt,(Ft+wt)*et+Rt,(It-vt)*nt+Kt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+Rt,(It+wt)*nt+Kt,(Ft+wt)*et+Rt,(It+vt)*nt+Kt,(Ft+vt)*et+Rt,(It+wt)*nt+Kt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+wt-vt*.5)*et+Rt,It*nt+Kt,Ft*et+Rt,(It+wt)*nt+Kt,(Ft+wt-vt*.5)*et+Rt,(It+vt)*nt+Kt)),_t.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+Rt,(It-wt)*nt+Kt,(Ft+wt-vt*.5)*et+Rt,(It-vt)*nt+Kt,Ft*et+Rt,(It-wt)*nt+Kt).close()),vt=Tt*.8,wt=.8,Ft=1,It=.5;var Ne=new go.PathFigure(Ft*et+Rt,(It-wt)*nt+Kt,!0);return ht.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+wt)*et+Rt,It*nt+Kt,(Ft+vt)*et+Rt,(It-wt)*nt+Kt,(Ft+wt)*et+Rt,(It-vt)*nt+Kt)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+Rt,(It+wt)*nt+Kt,(Ft+wt)*et+Rt,(It+vt)*nt+Kt,(Ft+vt)*et+Rt,(It+wt)*nt+Kt)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+wt-vt*.5)*et+Rt,It*nt+Kt,Ft*et+Rt,(It+wt)*nt+Kt,(Ft+wt-vt*.5)*et+Rt,(It+vt)*nt+Kt)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+Rt,(It-wt)*nt+Kt,(Ft+wt-vt*.5)*et+Rt,(It-vt)*nt+Kt,Ft*et+Rt,(It-wt)*nt+Kt).close()),ht}),go.Shape.defineFigureGenerator("Email",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(0,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Move,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.54*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.54*nt)),ht}),go.Shape.defineFigureGenerator("Ethernet",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.35*et,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.65*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.65*et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.35*et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.35*et,0).close());var gt=new go.PathFigure(.1*et,nt,!0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,nt).close());var vt=new go.PathFigure(.6*et,nt,!0,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.6*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.6*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.6*et,nt).close());var wt=new go.PathFigure(0,.5*nt,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.4*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,.75*et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.6*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,.25*et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.6*nt)),ht}),go.Shape.defineFigureGenerator("Power",function(Nt,et,nt){var ht=new go.Geometry,st=Tt*.4,gt=.4,vt=.5,wt=.5,Ft=Ot(),It=Ot(),Rt=Ot(),Kt=Ot();Le(vt,wt-gt,vt+st,wt-gt,vt+gt,wt-st,vt+gt,wt,.5,Ft,Ft,It,Rt,Kt);var oe=xt(It.x,It.y),ee=new go.PathFigure(It.x*et,It.y*nt,!0);ht.add(ee),ee.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,wt*nt,Rt.x*et,Rt.y*nt,Kt.x*et,Kt.y*nt)),ee.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt)),ee.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,wt*nt,(vt-st)*et,(wt+gt)*nt,(vt-gt)*et,(wt+st)*nt)),Le(vt-gt,wt,vt-gt,wt-st,vt-st,wt-gt,vt,wt-gt,.5,Rt,Kt,It,Ft,Ft),ee.add(new go.PathSegment(go.PathSegment.Bezier,It.x*et,It.y*nt,Rt.x*et,Rt.y*nt,Kt.x*et,Kt.y*nt)),st=Tt*.3,gt=.3,Le(vt-gt,wt,vt-gt,wt-st,vt-st,wt-gt,vt,wt-gt,.5,Rt,Kt,It,Ft,Ft),ee.add(new go.PathSegment(go.PathSegment.Line,It.x*et,It.y*nt)),ee.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,wt*nt,Kt.x*et,Kt.y*nt,Rt.x*et,Rt.y*nt)),ee.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+gt)*nt,(vt-gt)*et,(wt+st)*nt,(vt-st)*et,(wt+gt)*nt)),ee.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,wt*nt,(vt+st)*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),Le(vt,wt-gt,vt+st,wt-gt,vt+gt,wt-st,vt+gt,wt,.5,Ft,Ft,It,Rt,Kt),ee.add(new go.PathSegment(go.PathSegment.Bezier,It.x*et,It.y*nt,Kt.x*et,Kt.y*nt,Rt.x*et,Rt.y*nt).close());var ee=new go.PathFigure(.45*et,0,!0);return ht.add(ee),ee.add(new go.PathSegment(go.PathSegment.Line,.45*et,.5*nt)),ee.add(new go.PathSegment(go.PathSegment.Line,.55*et,.5*nt)),ee.add(new go.PathSegment(go.PathSegment.Line,.55*et,0).close()),Ht(Ft),Ht(It),Ht(Rt),Ht(Kt),Ht(oe),ht.spot1=new go.Spot(.25,.45),ht.spot2=new go.Spot(.75,.8),ht}),go.Shape.defineFigureGenerator("Fallout",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,nt/2,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Arc,180,360,et/2,nt/2,et/2,nt/2));function gt(vt,wt,Ft){vt.add(new go.PathSegment(go.PathSegment.Move,(.3+wt)*et,(.8+Ft)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,(.5+wt)*et,(.5+Ft)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,(.1+wt)*et,(.5+Ft)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,(.3+wt)*et,(.8+Ft)*nt).close())}return gt(st,0,0),gt(st,.4,0),gt(st,.2,-.3),ht}),go.Shape.defineFigureGenerator("IrritationHazard",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.2*et,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.3*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.7*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.3*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt).close()),ht.spot1=new go.Spot(.3,.3),ht.spot2=new go.Spot(.7,.7),ht}),go.Shape.defineFigureGenerator("ElectricalHazard",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.37*et,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.11*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.77*et,.04*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.33*et,.49*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.37*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.63*et,.86*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.77*et,.91*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.34*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.34*et,.78*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.44*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.65*et,.56*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.68*nt).close()),ht}),go.Shape.defineFigureGenerator("FireHazard",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.1*et,nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Bezier,.29*et,0,-.25*et,.63*nt,.45*et,.44*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.51*et,.42*nt,.48*et,.17*nt,.54*et,.35*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.59*et,.18*nt,.59*et,.29*nt,.58*et,.28*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.75*et,.6*nt,.8*et,.34*nt,.88*et,.43*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.88*et,.31*nt,.87*et,.48*nt,.88*et,.43*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,nt,1.17*et,.76*nt,.82*et,.8*nt).close()),ht.spot1=new go.Spot(.07,.445),ht.spot2=new go.Spot(.884,.958),ht}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(Nt,et,nt){var ht=new go.Geometry,st=.5,gt=0,vt=0,wt=st*Tt,Ft=.4*Math.SQRT2/2+.5,It=.5-.5*Math.SQRT2/2,Rt=1,Kt=.5,oe=.5,ee=0,ve=new go.PathFigure(Ft*et,(1-It)*nt,!1);return ht.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,Rt*et,Kt*nt,Rt*et,.7*nt,Rt*et,Kt*nt)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(oe+gt)*et,(ee+gt)*nt,(.5+st+gt)*et,(.5-wt+gt)*nt,(.5+wt+gt)*et,(.5-st+gt)*nt)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(.5-st+gt)*et,(.5+vt)*nt,(.5-wt+gt)*et,(.5-st+vt)*nt,(.5-st+gt)*et,(.5-wt+vt)*nt)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(.35+gt)*et,.9*nt,(.5-st+gt)*et,(.5+wt+vt)*nt,(.5-wt+gt)*et,.9*nt)),ve.add(new go.PathSegment(go.PathSegment.Move,(.25+gt)*et,.8*nt)),ve.add(new go.PathSegment(go.PathSegment.Line,(.35+gt)*et,.9*nt)),ve.add(new go.PathSegment(go.PathSegment.Line,(.2+gt)*et,.95*nt)),ht}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Move,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Move,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ht}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Move,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ht}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!1);ht.add(st);var gt=new go.PathFigure(et,nt,!1);ht.add(gt);var vt=new go.PathFigure(0,.5*nt,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.5*nt,.2*et,.35*nt,.3*et,.35*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,.7*et,.65*nt,.8*et,.65*nt)),ht}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.5*nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt).close()),ht}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.2*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt).close());var st=new go.PathFigure(0,.2*nt,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),ht}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.7*et,nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.3*et,nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,0,.6*et,.5*nt,0,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.7*et,0)),st.add(new go.PathSegment(go.PathSegment.Bezier,.7*et,nt,.4*et,.5*nt,et,.5*nt).close());var gt=new go.PathFigure(.45*et,.73*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.73*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.38*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.63*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.31*et,.27*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.56*et,.27*nt)),ht}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!1);ht.add(st);var gt=new go.PathFigure(.335*et,(1-.555)*nt,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.335*et,(1-.405)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.405)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.555)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,et,.68*nt,(1-.12)*et,.46*nt,(1-.02)*et,.54*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.68*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.335*et,(1-.555)*nt,.02*et,.54*nt,.12*et,.46*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.365*et,(1-.595)*nt));var vt=.5-.285,wt=.5,Ft=vt,It=Math.PI/4,Rt=4*(1-Math.cos(It))/(3*Math.sin(It)),Kt=Rt*.5,oe=vt,ee=vt,ve=Rt*oe,_t=Rt*ee;gt.add(new go.PathSegment(go.PathSegment.Bezier,(wt-oe)*et,Ft*nt,(wt-(ve+oe)/2)*et,(Ft+(ee+_t)/2)*nt,(wt-oe)*et,(Ft+_t)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,wt*et,(Ft-ee)*nt,(wt-oe)*et,(Ft-_t)*nt,(wt-ve)*et,(Ft-ee)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(wt+oe)*et,Ft*nt,(wt+ve)*et,(Ft-ee)*nt,(wt+oe)*et,(Ft-_t)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*et,(1-.595)*nt,(wt+oe)*et,(Ft+_t)*nt,(wt+(ve+oe)/2)*et,(Ft+(ee+_t)/2)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*et,(1-.595)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.555)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.405)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.335*et,(1-.405)*nt));var Ne=new go.PathFigure(.2*et,nt,!1);ht.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Line,.2*et,.8*nt));var he=new go.PathFigure(.8*et,nt,!1);return ht.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.8*et,.8*nt)),ht}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.1*et,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.9*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,nt).close());var gt=new go.PathFigure(.2*et,.2*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.8*nt)),ht}),go.Shape.defineFigureGenerator("BpmnEventError",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.33*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.66*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.66*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.33*et,.5*nt).close()),ht}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!1);ht.add(st);var gt=new go.PathFigure(et,nt,!1);ht.add(gt);var vt=new go.PathFigure(.1*et,nt,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt).close()),ht}),go.Shape.defineFigureGenerator("Caution",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.05*et,nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,.8*nt,0,nt,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.45*et,.1*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.55*et,.1*nt,.5*et,0,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.95*et,.9*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,nt,et,nt,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.05*et,nt));var gt=.05;return st.add(new go.PathSegment(go.PathSegment.Move,(.5-gt)*et,.875*nt)),st.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*et,.875*nt,gt*et,gt*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.5*et,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.325*nt,.575*et,.725*nt,.625*et,.375*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.75*nt,.375*et,.375*nt,.425*et,.725*nt)),ht}),go.Shape.defineFigureGenerator("Recycle",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.45*et,.95*nt,!1);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,.95*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.185*et,.85*nt,.17*et,.95*nt,.15*et,.9*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.235*et,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.3*et,.625*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.35*et,.65*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.275*et,.45*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.05*et,.45*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.05*et,.575*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.1875*et,.95*nt,0,.675*nt,0,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.45*et,.95*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.45*et,.775*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.22*et,.775*nt));var gt=new go.PathFigure(.475*et,.2*nt,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.225*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.275*et,.175*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.325*et,.05*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,.05*nt,.35*et,0,.375*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.575*et,.375*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.525*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.475*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.315*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.32*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.05*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.575*et,0,.65*et,.05*nt,.625*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.38*et,.0105*nt));var vt=new go.PathFigure(.675*et,.575*nt,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.875*et,.525*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,.775*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.85*et,.95*nt,et,.8*nt,et,.85*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.95*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.65*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.85*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.725*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.775*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.775*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,.775*nt)),vt.add(new go.PathSegment(go.PathSegment.Move,.675*et,.575*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.775*et,.775*nt)),ht}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(Nt,et,nt){var ht=new go.Geometry,st=.5,gt=Tt*.5,vt=new go.PathFigure(et,st*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,st*et,nt,et,(st+gt)*nt,(st+gt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,st*nt,(st-gt)*et,nt,0,(st+gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,st*et,0,0,(st-gt)*nt,(st-gt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,st*nt,(st+gt)*et,0,et,(st-gt)*nt));var wt=new go.PathFigure(st*et,0,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,st*et,.15*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,st*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,st*et,.85*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,0,st*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.15*et,st*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,et,st*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.85*et,st*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,st*et,st*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.58*et,.1*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,st*et,st*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.78*et,.54*nt)),ht}),go.Shape.defineFigureGenerator("Package",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.15*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var gt=new go.PathFigure(0,.15*nt,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.15*nt).close()),ht.spot1=new go.Spot(0,.1),ht.spot2=new go.Spot(1,1),ht}),go.Shape.defineFigureGenerator("Class",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(0,.2*nt,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt).close());var vt=new go.PathFigure(0,.5*nt,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt).close()),ht}),go.Shape.defineFigureGenerator("Component",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et,nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.15*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.15*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt).close());var gt=new go.PathFigure(0,.2*nt,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt).close());var vt=new go.PathFigure(0,.6*nt,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.6*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.8*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.6*nt).close()),ht}),go.Shape.defineFigureGenerator("Boat Shipment",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.15*et,.6*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.15*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.15*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.85*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.85*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.15*et,.6*nt));var gt=new go.PathFigure(.15*et,.6*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.6*nt)),ht}),go.Shape.defineFigureGenerator("Customer/Supplier",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et,nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.66*et,.33*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.66*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.33*et,.33*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.33*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,0,.33*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt).close()),ht}),go.Shape.defineFigureGenerator("Workcell",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.65*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.65*et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.35*et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.35*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht}),go.Shape.defineFigureGenerator("Supermarket",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.33*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.33*nt)),st.add(new go.PathSegment(go.PathSegment.Move,et,.33*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.66*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.66*nt)),st.add(new go.PathSegment(go.PathSegment.Move,et,.66*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),ht}),go.Shape.defineFigureGenerator("TruckShipment",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.6*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.6*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(et,.8*nt,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt).close());var vt=.1,wt=Tt*.1,Ft=.2,It=.9,Rt=new go.PathFigure((Ft-vt)*et,It*nt,!0);ht.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It-vt)*nt,(Ft-vt)*et,(It-wt)*nt,(Ft-wt)*et,(It-vt)*nt)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+vt)*et,It*nt,(Ft+wt)*et,(It-vt)*nt,(Ft+vt)*et,(It-wt)*nt)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It+vt)*nt,(Ft+vt)*et,(It+wt)*nt,(Ft+wt)*et,(It+vt)*nt)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-vt)*et,It*nt,(Ft-wt)*et,(It+vt)*nt,(Ft-vt)*et,(It+wt)*nt).close()),vt=.1,wt=Tt*.1,Ft=.8,It=.9;var Kt=new go.PathFigure((Ft-vt)*et,It*nt,!0);return ht.add(Kt),Kt.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It-vt)*nt,(Ft-vt)*et,(It-wt)*nt,(Ft-wt)*et,(It-vt)*nt)),Kt.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+vt)*et,It*nt,(Ft+wt)*et,(It-vt)*nt,(Ft+vt)*et,(It-wt)*nt)),Kt.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It+vt)*nt,(Ft+vt)*et,(It+wt)*nt,(Ft+wt)*et,(It+vt)*nt)),Kt.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-vt)*et,It*nt,(Ft-wt)*et,(It+vt)*nt,(Ft-vt)*et,(It+wt)*nt).close()),ht}),go.Shape.defineFigureGenerator("KanbanPost",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.2*et,0,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,0)),st.add(new go.PathSegment(go.PathSegment.Move,.5*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),st.add(new go.PathSegment(go.PathSegment.Move,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),ht}),go.Shape.defineFigureGenerator("Forklift",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,0,0));var gt=new go.PathFigure(0,.5*nt,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt));var vt=new go.PathFigure(.5*et,.8*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.1*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.1*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.8*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.8*nt));var wt=new go.PathFigure(.5*et,.7*nt,!1);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt));var Ft=.1,It=Tt*.1,Rt=.1,Kt=.9,oe=new go.PathFigure((Rt-Ft)*et,Kt*nt,!0);ht.add(oe),oe.add(new go.PathSegment(go.PathSegment.Bezier,Rt*et,(Kt-Ft)*nt,(Rt-Ft)*et,(Kt-It)*nt,(Rt-It)*et,(Kt-Ft)*nt)),oe.add(new go.PathSegment(go.PathSegment.Bezier,(Rt+Ft)*et,Kt*nt,(Rt+It)*et,(Kt-Ft)*nt,(Rt+Ft)*et,(Kt-It)*nt)),oe.add(new go.PathSegment(go.PathSegment.Bezier,Rt*et,(Kt+Ft)*nt,(Rt+Ft)*et,(Kt+It)*nt,(Rt+It)*et,(Kt+Ft)*nt)),oe.add(new go.PathSegment(go.PathSegment.Bezier,(Rt-Ft)*et,Kt*nt,(Rt-It)*et,(Kt+Ft)*nt,(Rt-Ft)*et,(Kt+It)*nt)),Ft=.1,It=Tt*.1,Rt=.4,Kt=.9;var ee=new go.PathFigure((Rt-Ft)*et,Kt*nt,!0);return ht.add(ee),ee.add(new go.PathSegment(go.PathSegment.Bezier,Rt*et,(Kt-Ft)*nt,(Rt-Ft)*et,(Kt-It)*nt,(Rt-It)*et,(Kt-Ft)*nt)),ee.add(new go.PathSegment(go.PathSegment.Bezier,(Rt+Ft)*et,Kt*nt,(Rt+It)*et,(Kt-Ft)*nt,(Rt+Ft)*et,(Kt-It)*nt)),ee.add(new go.PathSegment(go.PathSegment.Bezier,Rt*et,(Kt+Ft)*nt,(Rt+Ft)*et,(Kt+It)*nt,(Rt+It)*et,(Kt+Ft)*nt)),ee.add(new go.PathSegment(go.PathSegment.Bezier,(Rt-Ft)*et,Kt*nt,(Rt-It)*et,(Kt+Ft)*nt,(Rt-Ft)*et,(Kt+It)*nt)),ht}),go.Shape.defineFigureGenerator("RailShipment",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.1*et,.4*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.45*et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.45*et,.9*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,.9*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,.4*nt).close());var gt=new go.PathFigure(.45*et,.7*nt,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.7*nt));var vt=new go.PathFigure(.55*et,.4*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.9*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.9*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.4*nt).close());var Rt=.05,Kt=Tt*.05,oe=.175,ee=.95,wt=new go.PathFigure((oe-Rt)*et,ee*nt,!0);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,oe*et,(ee-Rt)*nt,(oe-Rt)*et,(ee-Kt)*nt,(oe-Kt)*et,(ee-Rt)*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,(oe+Rt)*et,ee*nt,(oe+Kt)*et,(ee-Rt)*nt,(oe+Rt)*et,(ee-Kt)*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,oe*et,(ee+Rt)*nt,(oe+Rt)*et,(ee+Kt)*nt,(oe+Kt)*et,(ee+Rt)*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,(oe-Rt)*et,ee*nt,(oe-Kt)*et,(ee+Rt)*nt,(oe-Rt)*et,(ee+Kt)*nt));var Rt=.05,Kt=Tt*.05,oe=.375,ee=.95,Ft=new go.PathFigure((oe-Rt)*et,ee*nt,!0);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,oe*et,(ee-Rt)*nt,(oe-Rt)*et,(ee-Kt)*nt,(oe-Kt)*et,(ee-Rt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(oe+Rt)*et,ee*nt,(oe+Kt)*et,(ee-Rt)*nt,(oe+Rt)*et,(ee-Kt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,oe*et,(ee+Rt)*nt,(oe+Rt)*et,(ee+Kt)*nt,(oe+Kt)*et,(ee+Rt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(oe-Rt)*et,ee*nt,(oe-Kt)*et,(ee+Rt)*nt,(oe-Rt)*et,(ee+Kt)*nt));var Rt=.05,Kt=Tt*.05,oe=.625,ee=.95,It=new go.PathFigure((oe-Rt)*et,ee*nt,!0);ht.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,oe*et,(ee-Rt)*nt,(oe-Rt)*et,(ee-Kt)*nt,(oe-Kt)*et,(ee-Rt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(oe+Rt)*et,ee*nt,(oe+Kt)*et,(ee-Rt)*nt,(oe+Rt)*et,(ee-Kt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,oe*et,(ee+Rt)*nt,(oe+Rt)*et,(ee+Kt)*nt,(oe+Kt)*et,(ee+Rt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(oe-Rt)*et,ee*nt,(oe-Kt)*et,(ee+Rt)*nt,(oe-Rt)*et,(ee+Kt)*nt));var Rt=.05,Kt=Tt*.05,oe=.825,ee=.95,ve=new go.PathFigure((oe-Rt)*et,ee*nt,!0);ht.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,oe*et,(ee-Rt)*nt,(oe-Rt)*et,(ee-Kt)*nt,(oe-Kt)*et,(ee-Rt)*nt)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(oe+Rt)*et,ee*nt,(oe+Kt)*et,(ee-Rt)*nt,(oe+Rt)*et,(ee-Kt)*nt)),ve.add(new go.PathSegment(go.PathSegment.Bezier,oe*et,(ee+Rt)*nt,(oe+Rt)*et,(ee+Kt)*nt,(oe+Kt)*et,(ee+Rt)*nt)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(oe-Rt)*et,ee*nt,(oe-Kt)*et,(ee+Rt)*nt,(oe-Rt)*et,(ee+Kt)*nt).close());var _t=new go.PathFigure(0,nt,!1);return ht.add(_t),_t.add(new go.PathSegment(go.PathSegment.Line,et,nt).close()),ht}),go.Shape.defineFigureGenerator("Warehouse",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(0,.2*nt,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt).close());var vt=new go.PathFigure(.15*et,nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.15*et,.5*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.5*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.15*et,nt).close());var wt=.05,Ft=Tt*.05,It=.35,Rt=.775,Kt=new go.PathFigure((It-wt)*et,Rt*nt,!0);return ht.add(Kt),Kt.add(new go.PathSegment(go.PathSegment.Bezier,It*et,(Rt-wt)*nt,(It-wt)*et,(Rt-Ft)*nt,(It-Ft)*et,(Rt-wt)*nt)),Kt.add(new go.PathSegment(go.PathSegment.Bezier,(It+wt)*et,Rt*nt,(It+Ft)*et,(Rt-wt)*nt,(It+wt)*et,(Rt-Ft)*nt)),Kt.add(new go.PathSegment(go.PathSegment.Bezier,It*et,(Rt+wt)*nt,(It+wt)*et,(Rt+Ft)*nt,(It+Ft)*et,(Rt+wt)*nt)),Kt.add(new go.PathSegment(go.PathSegment.Bezier,(It-wt)*et,Rt*nt,(It-Ft)*et,(Rt+wt)*nt,(It-wt)*et,(Rt+Ft)*nt).close()),ht}),go.Shape.defineFigureGenerator("ControlCenter",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.9*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Move,.1*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt).close()),ht}),go.Shape.defineFigureGenerator("Bluetooth",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.75*nt,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),ht}),go.Shape.defineFigureGenerator("Bookmark",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,0,0)),st.add(new go.PathSegment(go.PathSegment.Move,.2*et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.2*et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,.4*nt)),ht}),go.Shape.defineFigureGenerator("Bookmark",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,0,0)),st.add(new go.PathSegment(go.PathSegment.Move,.2*et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.2*et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,.4*nt)),ht}),go.Shape.defineFigureGenerator("Globe",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.5*et,0,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,.75*et,0,et,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,.75*nt,.75*et,nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,.25*et,nt,0,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,.25*nt,.25*et,0)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,.15*et,.25*nt,.15*et,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,.85*et,.75*nt,.85*et,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.1675*et,.15*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.8325*et,.15*nt,.35*et,.3*nt,.65*et,.3*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.1675*et,.85*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.8325*et,.85*nt,.35*et,.7*nt,.65*et,.7*nt)),ht}),go.Shape.defineFigureGenerator("Wave",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.25*nt,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.25*nt,.1*et,0,.2*et,0)),st.add(new go.PathSegment(go.PathSegment.Bezier,.7*et,.25*nt,.425*et,.5*nt,.575*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,et,.25*nt,.8*et,0,.9*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Move,0,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.75*nt,.1*et,.5*nt,.2*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.7*et,.75*nt,.425*et,nt,.575*et,nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,et,.75*nt,.8*et,.5*nt,.9*et,.5*nt)),ht}),go.Shape.defineFigureGenerator("Operator",function(Nt,et,nt){var ht=new go.Geometry,st=.3,gt=Tt*.3,vt=.5,wt=.7,Ft=new go.PathFigure((vt-st)*et,wt*nt,!0);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+st)*et,wt*nt,(vt+gt)*et,(wt-st)*nt,(vt+st)*et,(wt-gt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt-st)*et,wt*nt,(vt-gt)*et,(wt+st)*nt,(vt-st)*et,(wt+gt)*nt));var It=new go.PathFigure(0,.7*nt,!1);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,et,.7*nt,0,0,et,0)),ht}),go.Shape.defineFigureGenerator("TripleFanBlades",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.5*et,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.65*nt,.65*et,.3*nt,.65*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,.35*et,.5*nt,.35*et,.3*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.5*et,.65*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.3*et,.6*nt,.1*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.65*nt,.2*et,nt,.35*et,.95*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.5*et,.65*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,et,nt,.7*et,.6*nt,.9*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.65*nt,.8*et,nt,.65*et,.95*nt)),ht}),go.Shape.defineFigureGenerator("CentrifugalPump",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,0,.075*nt,0,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,nt,0,nt,.4*et,nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.4*nt,.8*et,nt,.85*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),ht}),go.Shape.defineFigureGenerator("Battery",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.1*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Move,.4*et,.1*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.6*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.6*et,.1*nt));var gt=new go.PathFigure(0,.6*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Move,0,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.4*nt)),ht}),go.Shape.defineFigureGenerator("Delete",function(Nt,et,nt){var ht=new go.Geometry,st=.5,gt=Tt*.5,vt=.5,wt=.5,Ft=new go.PathFigure((vt-st)*et,wt*nt,!0);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+st)*et,wt*nt,(vt+gt)*et,(wt-st)*nt,(vt+st)*et,(wt-gt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt-st)*et,wt*nt,(vt-gt)*et,(wt+st)*nt,(vt-st)*et,(wt+gt)*nt));var It=new go.PathFigure(.15*et,.5*nt,!1);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Line,.85*et,.5*nt)),ht}),go.Shape.defineFigureGenerator("Flag",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.1*nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Move,0,.1*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.1*nt,.15*et,0,.35*et,0)),st.add(new go.PathSegment(go.PathSegment.Bezier,et,.1*nt,.65*et,.2*nt,.85*et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.5*nt,.85*et,.6*nt,.65*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,.35*et,.4*nt,.15*et,.4*nt).close()),ht}),go.Shape.defineFigureGenerator("Help",function(Nt,et,nt){var ht=new go.Geometry,st=.5,gt=Tt*.5,vt=.5,wt=.5,Ft=new go.PathFigure((vt-st)*et,wt*nt,!1);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+st)*et,wt*nt,(vt+gt)*et,(wt-st)*nt,(vt+st)*et,(wt-gt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt-st)*et,wt*nt,(vt-gt)*et,(wt+st)*nt,(vt-st)*et,(wt+gt)*nt).close()),st=.05,gt=Tt*.05,vt=.5,wt=.8;var It=new go.PathFigure((vt-st)*et,wt*nt,!1);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(vt+st)*et,wt*nt,(vt+gt)*et,(wt-st)*nt,(vt+st)*et,(wt-gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(vt-st)*et,wt*nt,(vt-gt)*et,(wt+st)*nt,(vt-st)*et,(wt+gt)*nt).close()),It.add(new go.PathSegment(go.PathSegment.Move,.5*et,.7*nt)),It.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,.75*et,.475*nt,.75*et,.225*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.35*nt,.4*et,.2*nt,.3*et,.25*nt)),ht}),go.Shape.defineFigureGenerator("Location",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,nt,!0).add(new go.PathSegment(go.PathSegment.Line,.75*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,.975*et,.025*nt,.5*et,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*et,.5*nt,.5*et,0,.025*et,.025*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.5*et,.2*nt)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*et,.3*nt,.1*et,.1*nt).close()))}),go.Shape.defineFigureGenerator("Lock",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.5*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt));var gt=new go.PathFigure(.2*et,.5*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.3*nt,.25*et,0,.75*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.3*nt)),ht}),go.Shape.defineFigureGenerator("Unlocked",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.5*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt));var gt=new go.PathFigure(.2*et,.5*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.3*nt,.25*et,0,.75*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.35*nt)),ht}),go.Shape.defineFigureGenerator("Gear",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(.9375*et,.56246875*nt,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*et,.4375*nt)).add(new go.PathSegment(go.PathSegment.Line,.80621875*et,.4375*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.763*et,.3316875*nt,.79840625*et,.39915625*nt,.7834375*et,.3635*nt)).add(new go.PathSegment(go.PathSegment.Line,.8566875*et,.23796875*nt)).add(new go.PathSegment(go.PathSegment.Line,.76825*et,.14959375*nt)).add(new go.PathSegment(go.PathSegment.Line,.67596875*et,.24184375*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*et,.19378125*nt,.64228125*et,.2188125*nt,.603875*et,.2021875*nt)).add(new go.PathSegment(go.PathSegment.Line,.5625*et,.0625*nt)).add(new go.PathSegment(go.PathSegment.Line,.4375*et,.0625*nt)).add(new go.PathSegment(go.PathSegment.Line,.4375*et,.19378125*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*et,.239375*nt,.39759375*et,.20190625*nt,.36053125*et,.2176875*nt)).add(new go.PathSegment(go.PathSegment.Line,.2379375*et,.14959375*nt)).add(new go.PathSegment(go.PathSegment.Line,.14953125*et,.2379375*nt)).add(new go.PathSegment(go.PathSegment.Line,.23934375*et,.3278125*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*et,.4375*nt,.21765625*et,.36059375*nt,.201875*et,.397625*nt)).add(new go.PathSegment(go.PathSegment.Line,.0625*et,.4375*nt)).add(new go.PathSegment(go.PathSegment.Line,.0625*et,.5625*nt)).add(new go.PathSegment(go.PathSegment.Line,.1938125*et,.5625*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*et,.67596875*nt,.20221875*et,.603875*nt,.21884375*et,.64228125*nt)).add(new go.PathSegment(go.PathSegment.Line,.1495625*et,.76825*nt)).add(new go.PathSegment(go.PathSegment.Line,.238*et,.8566875*nt)).add(new go.PathSegment(go.PathSegment.Line,.3316875*et,.76296875*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*et,.80621875*nt,.36353125*et,.78340625*nt,.3991875*et,.79840625*nt)).add(new go.PathSegment(go.PathSegment.Line,.43753125*et,.9375*nt)).add(new go.PathSegment(go.PathSegment.Line,.5625*et,.9375*nt)).add(new go.PathSegment(go.PathSegment.Line,.5625*et,.80621875*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*et,.760625*nt,.602375*et,.79809375*nt,.63946875*et,.78234375*nt)).add(new go.PathSegment(go.PathSegment.Line,.76828125*et,.8566875*nt)).add(new go.PathSegment(go.PathSegment.Line,.85671875*et,.76825*nt)).add(new go.PathSegment(go.PathSegment.Line,.76065625*et,.67221875*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*et,.56246875*nt,.78234375*et,.63940625*nt,.798125*et,.602375*nt)).add(new go.PathSegment(go.PathSegment.Line,.9375*et,.56246875*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.5*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*et,.5*nt,.1*et,.1*nt).close()))}),go.Shape.defineFigureGenerator("Hand",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.5*nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,.3*nt,0,.375*nt,.05*et,.325*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.45*et,.075*nt,.3*et,.225*nt,.4*et,.175*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.525*et,.075*nt,.46*et,.05*nt,.525*et,.05*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.4*nt,.525*et,.275*nt,.475*et,.325*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,.55*nt,et,.4*nt,et,.55*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.425*et,.55*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.6*et,.55*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.6*et,.7*nt,.675*et,.55*nt,.675*et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.4*et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.575*et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.575*et,.85*nt,.65*et,.7*nt,.65*et,.85*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.4*et,.85*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.525*et,.85*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.535*et,nt,.61*et,.85*nt,.61*et,nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,.435*et,nt,0,nt).close()),ht}),go.Shape.defineFigureGenerator("Map",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.2*nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.25*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.25*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),st.add(new go.PathSegment(go.PathSegment.Move,.25*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.25*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.5*et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Move,.75*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,.8*nt)),ht}),go.Shape.defineFigureGenerator("Eject",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt*.7)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt*.7).close());var gt=new go.PathFigure(0,nt*.6,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0).close()),ht}),go.Shape.defineFigureGenerator("Pencil",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*et,.1*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.1*et,.2*nt).close()))}),go.Shape.defineFigureGenerator("Building",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*1,nt*1,!1);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt*.85)),st.add(new go.PathSegment(go.PathSegment.Line,.046*et,nt*.85)),st.add(new go.PathSegment(go.PathSegment.Line,.046*et,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt*.3)),st.add(new go.PathSegment(go.PathSegment.Line,.046*et,nt*.3)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*et,nt*.3)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt*.3)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*et,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*et,nt*.85)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt*.85).close());var gt=new go.PathFigure(.126*et,.85*nt,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.126*et,.45*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.322*et,.45*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.322*et,.85*nt).close());var vt=new go.PathFigure(.402*et,.85*nt,!1);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.402*et,.45*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.598*et,.45*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.598*et,.85*nt).close());var wt=new go.PathFigure(.678*et,.85*nt,!1);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,.678*et,.45*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.874*et,.45*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.874*et,.85*nt).close());var Ft=new go.PathFigure(.5*et,.1*nt,!1);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*et,.3*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*et,.3*nt).close()),ht}),go.Shape.defineFigureGenerator("Staircase",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,nt*1,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*.8)),st.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.8)),st.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.6)),st.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.6)),st.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.4)),st.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*.4)),st.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*.2)),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.2)),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.15)),st.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.15)),st.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.35)),st.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.35)),st.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.55)),st.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.55)),st.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.15,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.15,nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt*.95).close()),ht}),go.Shape.defineFigureGenerator("5Bars",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,nt*1,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et*.184,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.184,nt*(1-.184)).close());var gt=new go.PathFigure(et*.204,nt,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.204,nt*(1-.184))),gt.add(new go.PathSegment(go.PathSegment.Line,et*.388,nt*(1-.184*2))),gt.add(new go.PathSegment(go.PathSegment.Line,et*.388,nt*1).close());var vt=new go.PathFigure(et*.408,nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et*.408,nt*(1-.184*2))),vt.add(new go.PathSegment(go.PathSegment.Line,et*.592,nt*(1-.184*3))),vt.add(new go.PathSegment(go.PathSegment.Line,et*.592,nt*1).close());var wt=new go.PathFigure(et*.612,nt,!0);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et*.612,nt*(1-.184*3))),wt.add(new go.PathSegment(go.PathSegment.Line,et*.796,nt*(1-.184*4))),wt.add(new go.PathSegment(go.PathSegment.Line,et*.796,nt*1).close());var Ft=new go.PathFigure(et*.816,nt,!0);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Line,et*.816,nt*(1-.184*4))),Ft.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-.184*5))),Ft.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1).close()),ht}),go.Shape.defineFigureGenerator("PC",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.3,0).close());var gt=new go.PathFigure(et*.055,.07*nt,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.07)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.055,nt*.1).close());var vt=new go.PathFigure(et*.055,.13*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.13)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.16)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.055,nt*.16).close());var wt=new go.PathFigure(et*.055,.18*nt,!0);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.18)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.21)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.055,nt*.21).close());var Ft=new go.PathFigure(et*1,0,!0);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Line,et*.4,0)),Ft.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.65)),Ft.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.65).close()),ht}),go.Shape.defineFigureGenerator("Plane",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.55*et,nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.4*et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,.475*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.35*et,.525*nt,0,.4*nt,.225*et,.45*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.4*et,.475*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.15*et,.35*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,.325*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.6*et,.325*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.85*et,.1*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,.2*nt,.975*et,0,et,.08*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.7*et,.45*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.6*et,.95*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.55*et,nt).close()),ht}),go.Shape.defineFigureGenerator("Key",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*1,nt*.5,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et*.9,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.5,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.5,.35*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.45,.35*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.3,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.15,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.35*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.65*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.15,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.3,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.45,.65*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.5,.65*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.5,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.6,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.65,.55*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.7,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.75,.55*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.8,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.85,.575*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.9,.6*nt).close()),st.add(new go.PathSegment(go.PathSegment.Move,.17*et,.425*nt)),st.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*et,.5*nt,.075*et,.075*nt).close()),ht}),go.Shape.defineFigureGenerator("FilmTape",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!1);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Arc,270,180,et*0,et*.3,et*.055)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.08,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.08,nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*1),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*1),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*2),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*2),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*3),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*3),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*4),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*4),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*5),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*5),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*6),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*6),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*7),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*7),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*8),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*8),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*9),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*9),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*10),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*10),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*11),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*11),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*12),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*12),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*13),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*13),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*14),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*14),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*15),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*15),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1));var gt=new go.PathFigure(0,0,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*0)),gt.add(new go.PathSegment(go.PathSegment.Arc,270,-180,et*1,et*.3,et*.055)),gt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1));var vt=new go.PathFigure(et*.11,nt*.1,!1);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*1+.028*0),nt*.1)),vt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*1+.028*0),nt*.8)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.11,nt*.8).close());var wt=new go.PathFigure(et*(.11+.24133333*1+.028*1),nt*.1,!1);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*1),nt*.1)),wt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*1),nt*.8)),wt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*1+.028*1),nt*.8).close());var Ft=new go.PathFigure(et*(.11+.24133333*2+.028*2),nt*.1,!1);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*3+.028*2),nt*.1)),Ft.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*3+.028*2),nt*.8)),Ft.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*2),nt*.8).close()),ht}),go.Shape.defineFigureGenerator("FloppyDisk",function(Nt,et,nt){var ht=new go.Geometry,st=8,gt=st*Tt,vt=new go.PathFigure(st,0,!1);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et*.86,0)),vt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.14)),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt-st)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et-st,nt,et,nt-gt,et-gt,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,st,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-st,gt,nt,0,nt-gt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,st)),vt.add(new go.PathSegment(go.PathSegment.Bezier,st,0,0,gt,gt,0).close());var wt=new go.PathFigure(et*.83,0,!1);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et*.83,nt*.3)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*.3)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*0).close());var Ft=new go.PathFigure(et*.83,nt*1,!1);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Line,et*.83,nt*.5)),Ft.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*.5)),Ft.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*1).close());var It=new go.PathFigure(et*.78,nt*.05,!1);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.05)),It.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.25)),It.add(new go.PathSegment(go.PathSegment.Line,et*.78,nt*.25).close()),ht}),go.Shape.defineFigureGenerator("SpeechBubble",function(Nt,et,nt){var ht=Nt?Nt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=15),ht=Math.min(ht,et/3),ht=Math.min(ht,nt/3);var st=ht*Tt,gt=nt*.8,vt=new go.Geometry,wt=new go.PathFigure(ht,0,!0);return vt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et-ht,0)),wt.add(new go.PathSegment(go.PathSegment.Bezier,et,ht,et-st,0,et,st)),wt.add(new go.PathSegment(go.PathSegment.Line,et,gt-ht)),wt.add(new go.PathSegment(go.PathSegment.Bezier,et-ht,gt,et,gt-st,et-st,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.7,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.55,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,ht,gt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt-ht,st,gt,0,gt-st)),wt.add(new go.PathSegment(go.PathSegment.Line,0,ht)),wt.add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,st,st,0).close()),st>1?(vt.spot1=new go.Spot(0,0,st,st),vt.spot2=new go.Spot(1,.8,-st,-st)):(vt.spot1=go.Spot.TopLeft,vt.spot2=new go.Spot(1,.8)),vt}),go.Shape.defineFigureGenerator("Repeat",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*0,nt*.45,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*.9)),st.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.9)),st.add(new go.PathSegment(go.PathSegment.Line,et*.65,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*.45).close());var gt=new go.PathFigure(et*1,nt*.55,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*1)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.55)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*.55)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*0)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*.55).close()),ht}),go.Shape.defineFigureGenerator("Windows",function(Nt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close()).add(new go.PathSegment(go.PathSegment.Move,.4*et,.4*nt)).add(new go.PathSegment(go.PathSegment.Line,.4*et,.8*nt)).add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)).add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.2*et,.1*nt)).add(new go.PathSegment(go.PathSegment.Line,.2*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.1*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.1*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Line,.1*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt).close()))}),go.Shape.defineFigureGenerator("Terminal",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*0,nt*.1,!1);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.1)),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.9)),st.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*.9).close());var gt=new go.PathFigure(et*.1,nt*.2,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.1,nt*.25)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.22,nt*.285)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.1,nt*.32)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.1,nt*.37)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.275,nt*.32)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.275,nt*.25).close());var vt=new go.PathFigure(et*.28,nt*.37,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.37)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.41)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.28,nt*.41).close()),ht}),go.Shape.defineFigureGenerator("Beaker",function(Nt,et,nt){var ht=new go.Geometry,st=15,gt=st*Tt,vt=new go.PathFigure(et*.62,nt*.475,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt-st)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et-st,nt,et,nt-gt,et-gt,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,st,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-st,gt,nt,0,nt-gt)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.38,nt*.475)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.38,nt*.03)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*0)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*0)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.62,nt*.03).close()),gt>1?(ht.spot1=new go.Spot(0,0,gt,gt),ht.spot2=new go.Spot(1,1,-gt,-gt)):(ht.spot1=go.Spot.TopLeft,ht.spot2=go.Spot.BottomRight),ht}),go.Shape.defineFigureGenerator("Download",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*0,nt*1,!0);ht.add(st);var gt=.1/.3;st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*.755,nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*.93,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.61,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.39,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.07,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.755),nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.8),nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*(1-gt)).close());var vt=new go.PathFigure(et*.4,nt*0,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.44)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.26,nt*.44)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.66)),vt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.26),nt*.44)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.44)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*0).close()),ht}),go.Shape.defineFigureGenerator("Bin",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*0,nt*1,!0);ht.add(st);var gt=.1/.3;return st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*.755,nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*.93,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.61,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.39,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.07,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.755),nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.8),nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*(1-gt)).close()),ht}),go.Shape.defineFigureGenerator("Upload",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*0,nt*1,!0);ht.add(st);var gt=.1/.3;st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*.755,nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*.93,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.61,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.39,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.07,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.755),nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.8),nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*(1-gt)).close());var vt=new go.PathFigure(et*.5,nt*0,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et*.26,nt*.25)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.25)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.63)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.63)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.25)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.74,nt*.25).close()),ht}),go.Shape.defineFigureGenerator("EmptyDrink",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*.15,nt*0,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et*.85,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*1).close()),ht}),go.Shape.defineFigureGenerator("Drink",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*.15,nt*0,!1);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et*.85,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*1).close());var gt=new go.PathFigure(et*.235,nt*.28,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.765,nt*.28)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.655,nt*.97)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.345,nt*.97).close()),ht}),go.Shape.defineFigureGenerator("4Arrows",function(Nt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*.5,nt*0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et*.65,nt*.25)),st.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.25)),st.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.35)),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.5)),st.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.65)),st.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.55)),st.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.55)),st.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.65,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.55)),st.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.55)),st.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.65)),st.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*.5)),st.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.35)),st.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.25)),st.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.25).close()),ht}),go.Shape.defineFigureGenerator("Connector","Ellipse"),go.Shape.defineFigureGenerator("Alternative","TriangleUp"),go.Shape.defineFigureGenerator("Merge","TriangleUp"),go.Shape.defineFigureGenerator("Decision","Diamond"),go.Shape.defineFigureGenerator("DataTransmissions","Hexagon"),go.Shape.defineFigureGenerator("Gate","Crescent"),go.Shape.defineFigureGenerator("Delay","HalfEllipse"),go.Shape.defineFigureGenerator("Input","Parallelogram1"),go.Shape.defineFigureGenerator("ManualLoop","ManualOperation"),go.Shape.defineFigureGenerator("ISOProcess","Chevron"),go.Shape.defineFigureGenerator("MessageToUser","SquareArrow"),go.Shape.defineFigureGenerator("MagneticData","Cylinder1"),go.Shape.defineFigureGenerator("DirectData","Cylinder4"),go.Shape.defineFigureGenerator("StoredData","DataStorage"),go.Shape.defineFigureGenerator("SequentialData","MagneticTape"),go.Shape.defineFigureGenerator("Subroutine","Procedure")},80727:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var Mn={},Sn="5.0",xt={},Ot=null,Ht=!1,qt=!1,Le=null,Vt=!1,me=null,Tt=null,Be=0;Be4?parseFloat(He):5};Mn.setHTML5Codebase=function(He,Fe){Tt=He,qe(He,Fe)},Mn.setJavaCodebase=Mn.setJavaCodebaseVersion=Mn.isCompiledInstalled=Mn.setPreCompiledScriptPath=Mn.setPreCompiledResourcePath=function(){},Mn.setHTML5CodebaseVersion=function(He,Fe){var cn=parseFloat(He);if(cn!==NaN&&cn<5){console.log("The GeoGebra HTML5 codebase version "+cn+" is deprecated. Using version latest instead.");return}me=He,Gt(He,Fe)},Mn.getHTML5CodebaseVersion=function(){return Nt},Mn.getParameters=function(){return xt},Mn.setFontsCSSURL=function(He){vt=He},Mn.setGiacJSURL=function(He){},Mn.setJNLPFile=function(He){Jt=He},Mn.setJNLPBaseDir=function(He){},Mn.inject=function(){function He(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Fe="auto",cn=xt.id,Wn,fn=!1,dn=0;dn=5)return!0;var He=Mn.getAppletObject();return He&&typeof He.recalculateEnvironments=="function"?(He.recalculateEnvironments(),!0):!1},Mn.startAnimation=function(){var He=Mn.getAppletObject();return He&&typeof He.startAnimation=="function"?(He.startAnimation(),!0):!1},Mn.stopAnimation=function(){var He=Mn.getAppletObject();return He&&typeof He.stopAnimation=="function"?(He.stopAnimation(),!0):!1},Mn.getAppletObject=function(){var He=xt.id!==void 0?xt.id:"ggbApplet";return window[He]},Mn.resize=function(){};var ve=function(He,Fe,cn){var Wn=document.createElement("param");Wn.setAttribute("name",Fe),Wn.setAttribute("value",cn),He.appendChild(Wn)},_t=function(He){return He&&He!=="false"},Ne=function(He,Fe,cn){Ft(Nt)<=4.2&&(cn=!0);var Wn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Nt||ggbHTML5LoadedCodebaseIsWebSimple&&!nt)&&(Wn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var fn=document.createElement("div");fn.classList.add("appletParameters","notranslate");var dn=Fe.width,de=Fe.height;if(Fe.disableAutoScale=Fe.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Fe.disableAutoScale,Fe.width!==void 0)if(Ft(Nt)<=4.4)_t(Fe.showToolBar)&&(Fe.height-=7),_t(Fe.showAlgebraInput)&&(Fe.height-=37),Fe.width<605&&_t(Fe.showToolBar)&&(Fe.width=605,dn=605);else{var mn=100;(_t(Fe.showToolBar)||_t(Fe.showMenuBar))&&(Fe.hasOwnProperty("customToolBar")&&(Fe.customToolbar=Fe.customToolBar),mn=_t(Fe.showMenuBar)?245:155),dn=5?(Fe.appletOnLoad=function(mt){var kt=He.querySelector(".ggb_preview");kt&&kt.parentNode.removeChild(kt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(wn),window.GGBT_wsf_view&&$(window).trigger("resize"),Qe(mt)},Oe||wn.appendChild(we)):fn.appendChild(we),wn.appendChild(fn),Oe||He.appendChild(wn),setTimeout(function(){Mn.resize()},1)}else{var ne=document.createElement("div");ne.className="applet_scaler",ne.style.position="relative",ne.style.display="block",ne.appendChild(fn),He.appendChild(ne),Fe.appletOnLoad=function(mt){Mn.resize(),Qe(mt)}}function Dt(mt,kt){kt&&typeof kt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(mt,kt.appletOnLoad):renderGGBElement(mt),Bn("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",kt)}function ge(mt,kt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:mt,params:kt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(jt){Dt(jt.article,jt.params)}),html5AppletsToProcess=null)},Ft(Nt)<5&&(mt.className+=" geogebraweb")):Dt(mt,kt)}if(Wn){scriptLoadStarted=!0;for(var xe=0;xe0?(Tn.remove(),wn.attr("id","fullscreencontent").show(),jQuery(Qe).append(wn),window.dispatchEvent(new Event("resize"))):Ne(Tn,Fe,!1),window.GGBT_wsf_view.launchFullScreen(Qe)}else Ie=Wn,Ne(He,Fe,!1);if(!window.GGBT_wsf_view)for(de=0;deHe/4*3&&(Tn=He/4*3),Qe=Tn/5.8,mn.setAttribute("src",st),mn.setAttribute("width",Tn),mn.setAttribute("height",Qe);var wn=(He-Tn)/2,Oe=(Fe-Qe)/2;mn.style.left=wn+"px",mn.style.top=Oe+"px",fn.appendChild(mn)}}return fn.appendChild(de),fn},Ln=function(He){return He=He.toLowerCase(),He==="html5"||He==="screenshot"?He:"html5"},Pe=["web","webSimple","web3d","tablet","tablet3d","phone"],Gt=function(He,Fe){if(Nt=He,Fe){qe(Nt,!0);return}var cn=!Ht;if(cn){var Wn=Ft(Nt);!isNaN(Wn)&&Wn<4.4&&(cn=!1)}var fn,dn;window.location.protocol.substr(0,4)==="http"?fn=window.location.protocol:fn="http:";var de=Nt.indexOf("//");de>0?dn=Nt:de===0?dn=fn+Nt:dn="https://www.geogebra.org/apps/5.2.814.0/";for(var mn in Pe)if(Nt.slice(Pe[mn].length*-1)===Pe[mn]||Nt.slice((Pe[mn].length+1)*-1)===Pe[mn]+"/"){qe(dn,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&cn&&!Ot.is3D&&!Ot.AV&&!Ot.SV&&!Ot.CV&&!Ot.EV2&&!Ot.CP&&!Ot.PC&&!Ot.DA&&!Ot.FI&&!Ot.PV&&!_t(xt.showToolBar)&&!_t(xt.showMenuBar)&&!_t(xt.showAlgebraInput)&&!_t(xt.enableRightClick)&&(!xt.appName||xt.appName=="classic")?dn+="webSimple/":dn+="web3d/",qe(dn,!1)},qe=function(He,Fe){if(He.requirejs){ce=He;return}He.slice(-1)!=="/"&&(He+="/"),ce=He,Fe===null&&(Fe=He.indexOf("http")===-1),Ee=Fe,et="web.nocache.js",nt=!1;var cn=ce.split("/");cn.length>1&&(!Fe&&cn[cn.length-2]==="webSimple"?(et="webSimple.nocache.js",nt=!0):Pe.indexOf(cn[cn.length-2])>=0&&(et=cn[cn.length-2]+".nocache.js")),cn=He.split("/"),Nt=cn[cn.length-3],Nt.substr(0,4)==="test"?Nt=Nt.substr(4,1)+"."+Nt.substr(5,1):(Nt.substr(0,3)==="war"||Nt.substr(0,4)==="beta")&&(Nt="5.0");var Wn=parseFloat(Nt);Wn!==NaN&&Wn<5&&He.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Wn+" is deprecated. Using version latest instead."),Gt("5.0",Fe))},Bn=function(He,Fe){window.console&&window.console.log&&(!Fe||typeof Fe.showLogging=="undefined"||Fe.showLogging&&Fe.showLogging!=="false")&&console.log(He)};xt.material_id!==void 0?Kt(zn):zn();function zn(){var He=Sn;me!==null?He=me:parseFloat(He)<5&&(He="5.0"),Gt(He,!1),Tt!==null&&qe(Tt,Ee),Vt=!0}return Mn},GGBAppletUtils=function(){"use strict";function Mn(){return window.GGBT_wsf_edit!==void 0}function Sn(Vt,me){me!=1?(Vt.style.transformOrigin="0% 0% 0px",Vt.style.webkitTransformOrigin="0% 0% 0px",Vt.style.transform="scale("+me+","+me+")",Vt.style.webkitTransform="scale("+me+","+me+")",Vt.style.maxWidth="initial",Vt.querySelector(".ggb_preview")!==null&&(Vt.querySelector(".ggb_preview").style.maxWidth="initial"),Vt.querySelectorAll(".ggb_preview img")[0]!==void 0&&(Vt.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),Vt.querySelectorAll(".ggb_preview img")[1]!==void 0&&(Vt.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(Vt.style.transform="none",Vt.style.webkitTransform="none")}function xt(Vt,me,Tt,Be,Ce,Jt){var ce=null;if(Jt!=null&&Jt!="")for(var Ee=Vt.parentNode;Ee!=null;)if((" "+Ee.className+" ").indexOf(" "+Jt+" ")>-1){ce=Ee;break}else Ee=Ee.parentNode;var Ie=0,Nt=0,et=0,nt=0,ht=0,st=0,gt=0;if(ce)Ie=ce.offsetWidth,Nt=Math.max(Be?ce.offsetWidth:0,ce.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(Ie=Math.min(window.innerWidth,document.documentElement.clientWidth),Nt=Math.min(window.innerHeight,document.documentElement.clientHeight),et=Ie):(Ie=window.innerWidth,Nt=window.innerHeight,et=window.innerWidth),Vt){var vt=Vt.getBoundingClientRect();vt.left>0&&vt.left<=Ie&&(Ce===void 0||!Ce)&&(document.dir==="rtl"?(ht=Ie-vt.width-vt.left,st=et<=480?10:30):(st=vt.left,ht=et<=480?10:30),nt=st+ht)}if(Vt&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var wt=Vt.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(nt=40,gt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(nt=0,gt=40)}}return Vt&&((Tt===void 0||!Tt)&&me>0&&me+nt1&&(Jt=!0)),me&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Jt=!0),!(Vt.hasOwnProperty("disableAutoScale")&&Vt.disableAutoScale))Ce=Ot(Vt,me,Jt,Tt,Vt.scaleContainerClass);else return Be;return Jt&&(!Vt.hasOwnProperty("scale")||Be===1)?Ce:Math.min(Be,Ce)}function qt(Vt){var me=Math.min(window.innerWidth,document.documentElement.clientWidth),Tt=Math.min(window.innerHeight,document.documentElement.clientHeight),Be=Vt.getBoundingClientRect(),Ce=(me-Be.width)/2,Jt=(Tt-Be.height)/2;Jt<0&&(Jt=0),Vt.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Ce<40?Vt.style.left="40px":Vt.style.left=Ce+"px",Vt.style.top=Jt+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Jt<40?Vt.style.top="40px":Vt.style.top=Jt+"px",Vt.style.left=Ce+"px")}function Le(Vt,me){var Tt=Vt.querySelector(".appletParameters");if(Tt){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(me.id!==Tt.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Vt)}if(Tt.parentElement&&/fullscreen/.test(Tt.parentElement.className))return;var Be=Ht(me,Vt);Mn()&&Tt.setAttribute("data-param-scale",Be);for(var Ce=null,Jt=0;Jt=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(Mn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Mn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Mn){var Sn=c[Mn];return Sn==null?null:Sn},r=d,webModule.__errFn=e}function B(){function Mn(Vt){var me=Vt.lastIndexOf(rb);me==-1&&(me=Vt.length);var Tt=Vt.indexOf(sb);Tt==-1&&(Tt=Vt.length);var Be=Vt.lastIndexOf(tb,Math.min(Tt,me));return Be>=O?Vt.substring(O,Be+P):W}function Sn(Vt){if(!Vt.match(/^\w+:\/\//)){var me=o.createElement(ub);me.src=Vt+vb,Vt=Mn(me.src)}return Vt}function xt(){var Vt=__gwt_getMetaProperty(wb);return Vt!=null?Vt:W}function Ot(){for(var Vt=o.getElementsByTagName(_),me=O;meO?Vt[Vt.length-P].href:W}function qt(){var Vt=o.location;return Vt.href==Vt.protocol+zb+Vt.host+Vt.pathname+Vt.search+Vt.hash}var Le=xt();return Le==W&&(Le=Ot()),Le==W&&(Le=Ht()),Le==W&&qt()&&(Le=Mn(o.location.href)),Le=Sn(Le),Le}function C(Mn){return Mn.match(/^\//)||Mn.match(/^[a-zA-Z]+:\/\//)?Mn:webModule.__moduleBase+Mn}function D(){var Mn=[],Sn=O,xt=[],Ot=[];function Ht(Vt){var me=Ot[Vt](),Tt=xt[Vt];if(me in Tt)return me;var Be=[];for(var Ce in Tt)Be[Tt[Ce]]=Ce;throw r&&r(Vt,Be,me),null}if(__gwt_isKnownPropertyValue=function(Vt,me){return me in xt[Vt]},webModule.__getPropMap=function(){var Vt={};for(var me in xt)xt.hasOwnProperty(me)&&(Vt[me]=Ht(me));return Vt},webModule.__computePropValue=Ht,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var qt;try{qt=Cb;var Le=qt.indexOf(Db);Le!=-1&&(Sn=parseInt(qt.substring(Le+P),$),qt=qt.substring(O,Le))}catch(Vt){}return webModule.__softPermutationId=Sn,C(qt+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},77903:function(Mn,Sn,xt){"use strict";xt.d(Sn,{Ax:function(){return Le},Ds:function(){return Vt},KI:function(){return Tt},SI:function(){return qt},f1:function(){return Ht}});var Ot=xt(3294);function Ht(Be){let Ce=!0;if(Be.length>0){for(let Jt=0;Jt{const Ce=Le.createElement("div",{className:Ht.wrap,onClick:Jt=>{Jt.preventDefault(),Jt.stopPropagation()}},Le.createElement("p",null,Tt==="shixun"||Tt==="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",Le.createElement("br",null),"\u6839\u636E\u5E73\u53F0\u4F7F\u7528\u89C4\u5219\uFF0C\u9700\u8981\u6388\u6743\u624D\u80FD\u4F7F\u7528\u3002",Tt==="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"),Le.createElement("div",{className:Ht.contact},Le.createElement("div",{className:Ht.img},Le.createElement("img",{src:qt,width:"124px",height:"124px"})),Le.createElement("div",{className:"tc font14 mt10",style:{color:"#777A93"}},"\u626B\u4E00\u626B\uFF0C\u83B7\u53D6\u6388\u6743\u7801")));return Le.createElement(Ot.Z,{content:Ce},Le.createElement("span",{className:Ht.text,style:Be},"\u9AD8\u6D88\u8017"))}},16406:function(Mn,Sn,xt){"use strict";xt.d(Sn,{Z:function(){return Ut}});var Ot=xt(59301),Ht={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},qt=xt(92310),Le=xt.n(qt),Vt=xt(71418);var me=function(Lt,St){return(me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(mt,kt){mt.__proto__=kt}||function(mt,kt){for(var jt in kt)Object.prototype.hasOwnProperty.call(kt,jt)&&(mt[jt]=kt[jt])})(Lt,St)};function Tt(Lt,St){function mt(){this.constructor=Lt}me(Lt,St),Lt.prototype=St===null?Object.create(St):(mt.prototype=St.prototype,new mt)}function Be(Lt,St,mt,kt){return new(mt||(mt=Promise))(function(jt,Et){function le(en){try{ln(kt.next(en))}catch(Fn){Et(Fn)}}function We(en){try{ln(kt.throw(en))}catch(Fn){Et(Fn)}}function ln(en){var Fn;en.done?jt(en.value):(Fn=en.value,Fn instanceof mt?Fn:new mt(function(ni){ni(Fn)})).then(le,We)}ln((kt=kt.apply(Lt,St||[])).next())})}function Ce(Lt,St){var mt,kt,jt,Et,le={label:0,sent:function(){if(1&jt[0])throw jt[1];return jt[1]},trys:[],ops:[]};return Et={next:We(0),throw:We(1),return:We(2)},typeof Symbol=="function"&&(Et[Symbol.iterator]=function(){return this}),Et;function We(ln){return function(en){return function(Fn){if(mt)throw new TypeError("Generator is already executing.");for(;le;)try{if(mt=1,kt&&(jt=2&Fn[0]?kt.return:Fn[0]?kt.throw||((jt=kt.return)&&jt.call(kt),0):kt.next)&&!(jt=jt.call(kt,Fn[1])).done)return jt;switch(kt=0,jt&&(Fn=[2&Fn[0],jt.value]),Fn[0]){case 0:case 1:jt=Fn;break;case 4:return le.label++,{value:Fn[1],done:!1};case 5:le.label++,kt=Fn[1],Fn=[0];continue;case 7:Fn=le.ops.pop(),le.trys.pop();continue;default:if(jt=le.trys,!((jt=jt.length>0&&jt[jt.length-1])||Fn[0]!==6&&Fn[0]!==2)){le=0;continue}if(Fn[0]===3&&(!jt||Fn[1]>jt[0]&&Fn[1]qt in we?jt(we,qt,{enumerable:!0,configurable:!0,writable:!0,value:ce}):we[qt]=ce,Nt=(we,qt)=>{for(var ce in qt||(qt={}))Me.call(qt,ce)&&pe(we,ce,qt[ce]);if(Qt)for(var ce of Qt(qt))Ut.call(qt,ce)&&pe(we,ce,qt[ce]);return we};const Ie=we=>React.createElement("svg",Nt({className:"jiangxu_svg__icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:32,height:32},we),React.createElement("path",{d:"M365.714 73.143H1024v73.143H365.714zm0 292.571H1024v73.143H365.714zm0 292.572H1024v73.143H365.714zm0 292.571H1024V1024H365.714v-73.143z",fill:"#98BDF7"}),React.createElement("path",{d:"m248.686 803.182-65.829 75.922V658.286h-73.143v220.818l-65.828-75.995L0 851.383 146.286 1024 292.57 851.53z",fill:"#145DFF"}),React.createElement("path",{d:"M146.286 0 0 158.72l43.886 55.223 65.828-75.922v227.693h73.143V138.021l65.829 75.922 43.885-55.223z",fill:"#98BDF7"}));yn.Z="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiPjxwYXRoIGQ9Ik0zNjUuNzE0IDczLjE0M0gxMDI0djczLjE0M0gzNjUuNzE0em0wIDI5Mi41NzFIMTAyNHY3My4xNDNIMzY1LjcxNHptMCAyOTIuNTcySDEwMjR2NzMuMTQzSDM2NS43MTR6bTAgMjkyLjU3MUgxMDI0VjEwMjRIMzY1LjcxNHYtNzMuMTQzeiIgZmlsbD0iIzk4QkRGNyIvPjxwYXRoIGQ9Im0yNDguNjg2IDgwMy4xODItNjUuODI5IDc1LjkyMlY2NTguMjg2aC03My4xNDN2MjIwLjgxOGwtNjUuODI4LTc1Ljk5NUwwIDg1MS4zODMgMTQ2LjI4NiAxMDI0IDI5Mi41NyA4NTEuNTN6IiBmaWxsPSIjMTQ1REZGIi8+PHBhdGggZD0iTTE0Ni4yODYgMCAwIDE1OC43Mmw0My44ODYgNTUuMjIzIDY1LjgyOC03NS45MjJ2MjI3LjY5M2g3My4xNDNWMTM4LjAyMWw2NS44MjkgNzUuOTIyIDQzLjg4NS01NS4yMjN6IiBmaWxsPSIjOThCREY3Ii8+PC9zdmc+"},86087:function(En,yn,xt){"use strict";var Ot=xt(59301),jt=Object.defineProperty,Qt=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,Ut=Object.prototype.propertyIsEnumerable,pe=(we,qt,ce)=>qt in we?jt(we,qt,{enumerable:!0,configurable:!0,writable:!0,value:ce}):we[qt]=ce,Nt=(we,qt)=>{for(var ce in qt||(qt={}))Me.call(qt,ce)&&pe(we,ce,qt[ce]);if(Qt)for(var ce of Qt(qt))Ut.call(qt,ce)&&pe(we,ce,qt[ce]);return we};const Ie=we=>React.createElement("svg",Nt({className:"shengxu_svg__icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:32,height:32},we),React.createElement("path",{d:"M365.714 73.143H1024v73.143H365.714zm0 292.571H1024v73.143H365.714zm0 292.572H1024v73.143H365.714zm0 292.571H1024V1024H365.714v-73.143zM248.686 803.182l-65.829 75.922V658.286h-73.143v220.818l-65.828-75.995L0 851.383 146.286 1024 292.57 851.53z",fill:"#98BDF7"}),React.createElement("path",{d:"M146.286 0 0 158.72l43.886 55.223 65.828-75.922v227.693h73.143V138.021l65.829 75.922 43.885-55.223z",fill:"#145DFF"}));yn.Z="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiPjxwYXRoIGQ9Ik0zNjUuNzE0IDczLjE0M0gxMDI0djczLjE0M0gzNjUuNzE0em0wIDI5Mi41NzFIMTAyNHY3My4xNDNIMzY1LjcxNHptMCAyOTIuNTcySDEwMjR2NzMuMTQzSDM2NS43MTR6bTAgMjkyLjU3MUgxMDI0VjEwMjRIMzY1LjcxNHYtNzMuMTQzek0yNDguNjg2IDgwMy4xODJsLTY1LjgyOSA3NS45MjJWNjU4LjI4NmgtNzMuMTQzdjIyMC44MThsLTY1LjgyOC03NS45OTVMMCA4NTEuMzgzIDE0Ni4yODYgMTAyNCAyOTIuNTcgODUxLjUzeiIgZmlsbD0iIzk4QkRGNyIvPjxwYXRoIGQ9Ik0xNDYuMjg2IDAgMCAxNTguNzJsNDMuODg2IDU1LjIyMyA2NS44MjgtNzUuOTIydjIyNy42OTNoNzMuMTQzVjEzOC4wMjFsNjUuODI5IDc1LjkyMiA0My44ODUtNTUuMjIzeiIgZmlsbD0iIzE0NURGRiIvPjwvc3ZnPg=="},74413:function(){"use strict";function En(Tt,et,nt,ht){nt===void 0&&(nt=0),ht===void 0&&(ht=1/0),this._name=Tt,this._defaultValue=et,this._minimum=nt,this._maximum=ht}Object.defineProperty(En.prototype,"name",{get:function(){return this._name},set:function(Tt){if(typeof Tt!="string"||Tt==="")throw new Error("Shape name must be a valid string.");this._name=Tt}}),Object.defineProperty(En.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(Tt){if(typeof Tt!="number"||isNaN(Tt))throw new Error("The default value must be a real number, not: "+Tt);this._defaultValue=Tt}}),Object.defineProperty(En.prototype,"minimum",{get:function(){return this._minimum},set:function(Tt){if(typeof Tt!="number"||isNaN(Tt))throw new Error("Minimum must be a real number, not: "+Tt);this._minimum=Tt}}),Object.defineProperty(En.prototype,"maximum",{get:function(){return this._maximum},set:function(Tt){if(typeof Tt!="number"||isNaN(Tt))throw new Error("Maximum must be a real number, not: "+Tt);this._maximum=Tt}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(Tt,et){var nt=go.Shape._FigureParameters[Tt];return nt?nt[et]:null},go.Shape.setFigureParameter=function(Tt,et,nt){if(!(nt instanceof En))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+nt);if(nt.defaultValuent.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+nt.defaultValue);var ht=go.Shape._FigureParameters[Tt];ht||(ht=[],go.Shape._FigureParameters[Tt]=ht),ht[et]=nt};var yn=[];function xt(Tt,et){var nt=yn.pop();return nt===void 0?new go.Point(Tt,et):(nt.x=Tt,nt.y=et,nt)}function Ot(){var Tt=yn.pop();return Tt===void 0?new go.Point:Tt}function jt(Tt){yn.push(Tt)}function Qt(Tt,et,nt,ht,st,gt,vt,wt,Ft){Ft||(Ft=new go.Point);var It=Tt-nt,At=st-vt,Wt=NaN,re=NaN;if(It===0)if(At===0)Tt===nt&&(Wt=Tt,re=et);else{var ne=(gt-wt)/At,me=gt-ne*st;Wt=Tt,re=ne*Wt+me}else if(At===0){var Vt=(et-ht)/It,Le=et-Vt*Tt;Wt=st,re=Vt*Wt+Le}else{var Vt=(et-ht)/It,ne=(gt-wt)/At,Le=et-Vt*Tt,me=gt-ne*st;Wt=(me-Le)/(Vt-ne),re=Vt*Wt+Le}return Ft.x=Wt,Ft.y=re,Ft}function Me(Tt,et,nt,ht,st,gt,vt,wt,Ft,It,At,Wt,re,ne){var me=1-Ft,Vt=Ft,Le=Tt*me+nt*Vt,he=et*me+ht*Vt,He=nt*me+st*Vt,Ke=ht*me+gt*Vt,Ve=st*me+vt*Vt,sn=gt*me+wt*Vt,Mn=Le*me+He*Vt,xe=he*me+Ke*Vt,Ht=He*me+Ve*Vt,Je=Ke*me+sn*Vt,Tn=Mn*me+Ht*Vt,An=xe*me+Je*Vt;It.x=Le,It.y=he,At.x=Mn,At.y=xe,Wt.x=Tn,Wt.y=An,re.x=Ht,re.y=Je,ne.x=Ve,ne.y=sn}var Ut=new go.Spot(.156,.156),pe=new go.Spot(.844,.844),Nt=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new En("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=5),ht=Math.min(ht,et/3),ht=Math.min(ht,nt/3);var st=ht*Nt,gt=new go.Geometry().add(new go.PathFigure(ht,0,!0).add(new go.PathSegment(go.PathSegment.Line,et-ht,0)).add(new go.PathSegment(go.PathSegment.Bezier,et,ht,et-st,0,et,st)).add(new go.PathSegment(go.PathSegment.Line,et,nt-ht)).add(new go.PathSegment(go.PathSegment.Bezier,et-ht,nt,et,nt-st,et-st,nt)).add(new go.PathSegment(go.PathSegment.Line,ht,nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,nt-ht,st,nt,0,nt-st)).add(new go.PathSegment(go.PathSegment.Line,0,ht)).add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,st,st,0).close()));return st>1&&(gt.spot1=new go.Spot(0,0,st,st),gt.spot2=new go.Spot(1,1,-st,-st)),gt}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(et,nt).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(et,nt).add(new go.PathSegment(go.PathSegment.Line,0,nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(Tt,et,nt){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=0,ht.startY=nt/2,ht.endX=et,ht.endY=nt/2,ht}),go.Shape.defineFigureGenerator("LineV",function(Tt,et,nt){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=et/2,ht.startY=0,ht.endX=et/2,ht.endY=nt,ht}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt/2,!1).add(new go.PathSegment(go.PathSegment.Line,et,nt/2)).add(new go.PathSegment(go.PathSegment.Move,et/2,0)).add(new go.PathSegment(go.PathSegment.Line,et/2,nt)))}),go.Shape.defineFigureGenerator("XLine",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)))}),go.Shape.defineFigureGenerator("LineRight",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(.25*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.25*et,nt)))}),go.Shape.defineFigureGenerator("LineDown",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,.25*nt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,.75*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)))}),go.Shape.defineFigureGenerator("LineLeft",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(.75*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.75*et,nt)))}),go.Shape.defineFigureGenerator("LineUp",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,.75*nt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,.25*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(Tt,et,nt){var ht=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(ht*et,(1-ht)*nt,!1).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,ht*nt)).add(new go.PathSegment(go.PathSegment.Move,ht*et,ht*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,(1-ht)*nt)).add(new go.PathSegment(go.PathSegment.Move,0,nt/2)).add(new go.PathSegment(go.PathSegment.Line,et,nt/2)).add(new go.PathSegment(go.PathSegment.Move,et/2,0)).add(new go.PathSegment(go.PathSegment.Line,et/2,nt)))}),go.Shape.defineFigureGenerator("CircleLine",function(Tt,et,nt){var ht=et/2,st=new go.Geometry().add(new go.PathFigure(et,et/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,ht,ht,ht,ht).close()));return st.spot1=Ut,st.spot2=pe,st.defaultStretch=go.GraphObject.Uniform,st}),go.Shape.defineFigureGenerator("Line1",function(Tt,et,nt){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=0,ht.startY=0,ht.endX=et,ht.endY=nt,ht}),go.Shape.defineFigureGenerator("Line2",function(Tt,et,nt){var ht=new go.Geometry(go.Geometry.Line);return ht.startX=et,ht.startY=0,ht.endX=0,ht.endY=nt,ht}),go.Shape.defineFigureGenerator("Curve1",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,et,nt,Nt*et,0,et,(1-Nt)*nt)))}),go.Shape.defineFigureGenerator("Curve2",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,et,nt,0,Nt*nt,(1-Nt)*et,nt)))}),go.Shape.defineFigureGenerator("Curve3",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,Nt*nt,Nt*et,nt)))}),go.Shape.defineFigureGenerator("Curve4",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,(1-Nt)*et,0,0,(1-Nt)*nt)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(et,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new En("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)?ht=.1:ht<-1?ht=-1:ht>1&&(ht=1);var st=Math.abs(ht)*et;if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(st,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-st,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et-st,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,st,nt).close())),stet&&(ht=et);var st=Math.abs(ht);if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(st,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-st,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et-st,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,st,nt).close())),st.5&&(ht=.5);var st=Math.abs(ht)*et;if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(st,0).add(new go.PathSegment(go.PathSegment.Line,et-st,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-st,nt)).add(new go.PathSegment(go.PathSegment.Line,st,nt).close())),stet&&(ht=et/2);var st=Math.abs(ht);if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(st,0).add(new go.PathSegment(go.PathSegment.Line,et-st,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())):gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-st,nt)).add(new go.PathSegment(go.PathSegment.Line,st,nt).close())),stet&&(ht=et/2);var st=Math.abs(ht);if(ht===0){var gt=new go.Geometry(go.Geometry.Rectangle);return gt.startX=0,gt.startY=0,gt.endX=et,gt.endY=nt,gt}else{var gt=new go.Geometry;return ht>0?gt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et-st,nt)).add(new go.PathSegment(go.PathSegment.Line,st,nt).close())):gt.add(new go.PathFigure(st,0).add(new go.PathSegment(go.PathSegment.Line,et-st,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close())),st0&&(vt.add(new go.PathSegment(go.PathSegment.Move,et/2+wt,et/2)),vt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,st,st,wt,wt).close())),gt.spot1=Ut,gt.spot2=pe,gt.defaultStretch=go.GraphObject.Uniform,gt}),go.Shape.defineFigureGenerator("Cloud",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(.08034461*et,.1944299*nt,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*et,.05349299*nt,-.09239631*et,.07836421*nt,.1406031*et,-.0542823*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*et,.074219*nt,.2450511*et,-.00697547*nt,.3776197*et,-.01112067*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*et,.07004196*nt,.4539471*et,0,.6066018*et,-.02526587*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*et,.08370865*nt,.6914277*et,-.01904177*nt,.8921095*et,-.01220843*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*et,.3194596*nt,1.036446*et,.04105738*nt,1.020377*et,.3022052*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*et,.562044*nt,1.04448*et,.360238*nt,.992256*et,.5219009*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*et,.8217117*nt,1.032337*et,.5771781*nt,1.018411*et,.8120651*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*et,.9156953*nt,1.028411*et,.9571472*nt,.8556702*et,1.052487*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*et,.9310455*nt,.7431877*et,1.009325*nt,.5624123*et,1.021761*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*et,.9344623*nt,.4820677*et,1.031761*nt,.3030112*et,1.002796*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*et,.870098*nt,.2329994*et,1.01518*nt,.03213784*et,1.01518*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*et,.6545475*nt,-.02812061*et,.9032597*nt,-.01205169*et,.6835638*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*et,.4265613*nt,-.01812061*et,.6089503*nt,-.00606892*et,.4555777*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*et,.1944299*nt,-.01606892*et,.3892545*nt,-.01205169*et,.1944299*nt))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(Tt,et,nt){var ht=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(ht*et,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,0)).add(new go.PathSegment(go.PathSegment.Line,et,ht*nt)).add(new go.PathSegment(go.PathSegment.Line,et,(1-ht)*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,nt)).add(new go.PathSegment(go.PathSegment.Line,ht*et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,(1-ht)*nt)).add(new go.PathSegment(go.PathSegment.Line,0,ht*nt).close())).setSpots(ht/2,ht/2,1-ht/2,1-ht/2)}),go.Shape.setFigureParameter("Pie",0,new En("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new En("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN,st=Tt?Tt.parameter2:NaN;isNaN(ht)&&(ht=0),isNaN(st)&&(st=315);var gt=ht%360;gt<0&&(gt+=360);var vt=st%360,wt=Math.min(et,nt)/2;return new go.Geometry().add(new go.PathFigure(wt,wt).add(new go.PathSegment(go.PathSegment.Arc,gt,vt,wt,wt,wt,wt).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(Tt,et,nt){var ht=Nt/Math.SQRT2*.5,st=Math.SQRT2/2,gt=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(et,nt,!0).add(new go.PathSegment(go.PathSegment.Bezier,st*et,gt*nt,et,(1-ht)*nt,(st+ht)*et,(gt+ht)*nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close()))}),go.Shape.setFigureParameter("ThickCross",0,new En("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=30);var st=Math.min(ht,et)/2,gt=et/2,vt=nt/2;return new go.Geometry().add(new go.PathFigure(gt-st,0,!0).add(new go.PathSegment(go.PathSegment.Line,gt+st,0)).add(new go.PathSegment(go.PathSegment.Line,gt+st,vt-st)).add(new go.PathSegment(go.PathSegment.Line,et,vt-st)).add(new go.PathSegment(go.PathSegment.Line,et,vt+st)).add(new go.PathSegment(go.PathSegment.Line,gt+st,vt+st)).add(new go.PathSegment(go.PathSegment.Line,gt+st,nt)).add(new go.PathSegment(go.PathSegment.Line,gt-st,nt)).add(new go.PathSegment(go.PathSegment.Line,gt-st,vt+st)).add(new go.PathSegment(go.PathSegment.Line,0,vt+st)).add(new go.PathSegment(go.PathSegment.Line,0,vt-st)).add(new go.PathSegment(go.PathSegment.Line,gt-st,vt-st).close()))}),go.Shape.setFigureParameter("ThinCross",0,new En("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=10);var st=Math.min(ht,et)/2,gt=et/2,vt=nt/2;return new go.Geometry().add(new go.PathFigure(gt-st,0,!0).add(new go.PathSegment(go.PathSegment.Line,gt+st,0)).add(new go.PathSegment(go.PathSegment.Line,gt+st,vt-st)).add(new go.PathSegment(go.PathSegment.Line,et,vt-st)).add(new go.PathSegment(go.PathSegment.Line,et,vt+st)).add(new go.PathSegment(go.PathSegment.Line,gt+st,vt+st)).add(new go.PathSegment(go.PathSegment.Line,gt+st,nt)).add(new go.PathSegment(go.PathSegment.Line,gt-st,nt)).add(new go.PathSegment(go.PathSegment.Line,gt-st,vt+st)).add(new go.PathSegment(go.PathSegment.Line,0,vt+st)).add(new go.PathSegment(go.PathSegment.Line,0,vt-st)).add(new go.PathSegment(go.PathSegment.Line,gt-st,vt-st).close()))}),go.Shape.setFigureParameter("ThickX",0,new En("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;if((isNaN(ht)||ht<0)&&(ht=30),et===0||nt===0){var st=new go.Geometry(go.Geometry.Rectangle);return st.startX=0,st.startY=0,st.endX=et,st.endY=nt,st}else{var gt=et/2,vt=nt/2,wt=Math.atan2(nt,et),Ft=ht-Math.min(Math.cos(wt)*ht/2,gt),It=ht-Math.min(Math.sin(wt)*ht/2,vt),st=new go.Geometry,At=new go.PathFigure(Ft,0,!0);return st.add(At),At.add(new go.PathSegment(go.PathSegment.Line,gt,.2*nt)),At.add(new go.PathSegment(go.PathSegment.Line,et-Ft,0)),At.add(new go.PathSegment(go.PathSegment.Line,et,It)),At.add(new go.PathSegment(go.PathSegment.Line,.8*et,vt)),At.add(new go.PathSegment(go.PathSegment.Line,et,nt-It)),At.add(new go.PathSegment(go.PathSegment.Line,et-Ft,nt)),At.add(new go.PathSegment(go.PathSegment.Line,gt,.8*nt)),At.add(new go.PathSegment(go.PathSegment.Line,Ft,nt)),At.add(new go.PathSegment(go.PathSegment.Line,0,nt-It)),At.add(new go.PathSegment(go.PathSegment.Line,.2*et,vt)),At.add(new go.PathSegment(go.PathSegment.Line,0,It).close()),st}}),go.Shape.setFigureParameter("ThinX",0,new En("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=10);var st=new go.Geometry,gt=new go.PathFigure(.1*et,0,!0);return st.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.9*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt).close()),st}),go.Shape.setFigureParameter("SquareIBeam",0,new En("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=.2);var st=new go.Geometry,gt=new go.PathFigure(0,0,!0);return st.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,ht*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5+ht/2)*et,ht*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5+ht/2)*et,(1-ht)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,(1-ht)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,(1-ht)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5-ht/2)*et,(1-ht)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5-ht/2)*et,ht*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,ht*nt).close()),st}),go.Shape.setFigureParameter("RoundedIBeam",0,new En("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=.5);var st=new go.Geometry,gt=new go.PathFigure(0,0,!0);return st.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,et,nt,Math.abs(1-ht)*et,.25*nt,Math.abs(1-ht)*et,.75*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ht*et,.75*nt,ht*et,.25*nt).close()),st}),go.Shape.defineFigureGenerator("HalfEllipse",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,Nt*et,0,et,(.5-Nt/2)*nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,(.5+Nt/2)*nt,Nt*et,nt).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,nt,et,0,et,nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*et,.75*nt,.5*et,.25*nt).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,nt,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*nt,.1*et,.8*nt,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.3*nt,0,0,.45*et,0)).add(new go.PathSegment(go.PathSegment.Bezier,et,.3*nt,.55*et,0,et,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,.5*nt,.9*et,.8*nt).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*et,.01*nt)).add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,.6*et,.2*nt,et,.25*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.55*et,.7*nt,et,.8*nt,.6*et,.8*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.75*et,nt,.5*et,.75*nt,.55*et,.95*nt)).add(new go.PathSegment(go.PathSegment.Line,.25*et,nt)).add(new go.PathSegment(go.PathSegment.Bezier,.45*et,.7*nt,.45*et,.95*nt,.5*et,.75*nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,.4*et,.8*nt,0,.8*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.49*et,.01*nt,0,.25*nt,.4*et,.2*nt).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.4*et,.6*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Bezier,.15*et,nt,.5*et,.75*nt,.45*et,.95*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.85*et,nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.6*et,.6*nt,.55*et,.95*nt,.5*et,.75*nt));var gt=.2,vt=.3,wt=0,Ft=gt*Nt;return st.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*et,(.5+gt+wt)*nt,(.5-gt+vt)*et,(.5+Ft+wt)*nt,(.5-Ft+vt)*et,(.5+gt+wt)*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+gt+vt)*et,(.5+wt)*nt,(.5+Ft+vt)*et,(.5+gt+wt)*nt,(.5+gt+vt)*et,(.5+Ft+wt)*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*et,(.5-gt+wt)*nt,(1-.5+gt+vt)*et,(.5-Ft+wt)*nt,(.5+Ft+vt)*et,(.5-gt+wt)*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.65*et,.36771243*nt,(.5-Ft+vt)*et,(.5-gt+wt)*nt,(.5-gt+vt+.05)*et,(.5-Ft+wt-.02)*nt)),gt=.2,vt=0,wt=-.3,Ft=gt*Nt,st.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+gt+vt)*et,(.5+wt)*nt,(.5+Ft+vt)*et,(.5+gt+wt)*nt,(.5+gt+vt)*et,(.5+Ft+wt)*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*et,(.5-gt+wt)*nt,(1-.5+gt+vt)*et,(.5-Ft+wt)*nt,(.5+Ft+vt)*et,(.5-gt+wt)*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,(.5-gt+vt)*et,(.5+wt)*nt,(.5-Ft+vt)*et,(.5-gt+wt)*nt,(.5-gt+vt)*et,(.5-Ft+wt)*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Ft+vt)*et,(.5+gt+wt)*nt,(.5-gt+vt)*et,(.5+Ft+wt)*nt,(.5-Ft+vt)*et,(.5+gt+wt)*nt)),gt=.2,vt=-.3,wt=0,Ft=gt*Nt,st.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*et,(.5-gt+wt)*nt,(1-.5+gt+vt-.05)*et,(.5-Ft+wt-.02)*nt,(.5+Ft+vt)*et,(.5-gt+wt)*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,(.5-gt+vt)*et,(.5+wt)*nt,(.5-Ft+vt)*et,(.5-gt+wt)*nt,(.5-gt+vt)*et,(.5-Ft+wt)*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,(.5+vt)*et,(.5+gt+wt)*nt,(.5-gt+vt)*et,(.5+Ft+wt)*nt,(.5-Ft+vt)*et,(.5+gt+wt)*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,.6*nt,(.5+Ft+vt)*et,(.5+gt+wt)*nt,(.5+gt+vt)*et,(.5+Ft+wt)*nt).close()),ht.setSpots(.06,.33,.93,.68),ht}),go.Shape.defineFigureGenerator("YinYang",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*.5,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Arc,270,180,et*.5,et*.5,et*.5,et*.5)),st.add(new go.PathSegment(go.PathSegment.Arc,90,-180,et*.5,et*.75,et*.25,et*.25)),st.add(new go.PathSegment(go.PathSegment.Arc,90,180,et*.5,et*.25,et*.25,et*.25));var gt=.1,vt=.5,wt=.25;return st.add(new go.PathSegment(go.PathSegment.Move,(vt+gt)*et,wt*nt)),st.add(new go.PathSegment(go.PathSegment.Arc,0,-360,et*vt,nt*wt,gt*et,gt*et).close()),st=new go.PathFigure(et*.5,0,!1),ht.add(st),st.add(new go.PathSegment(go.PathSegment.Arc,270,-180,et*.5,et*.5,et*.5,et*.5)),wt=.75,st=new go.PathFigure((vt+gt)*et,wt*nt,!0),ht.add(st),st.add(new go.PathSegment(go.PathSegment.Arc,0,360,et*vt,nt*wt,gt*et,gt*et).close()),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("Peace",function(Tt,et,nt){var ht=.8535533905932737,st=.5*et,gt=.5*nt;return new go.Geometry().add(new go.PathFigure(st,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,st,gt,st,gt)).add(new go.PathSegment(go.PathSegment.Line,st,nt)).add(new go.PathSegment(go.PathSegment.Move,st,gt)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,ht*nt)).add(new go.PathSegment(go.PathSegment.Move,st,gt)).add(new go.PathSegment(go.PathSegment.Line,ht*et,ht*nt)))}),go.Shape.defineFigureGenerator("NotAllowed",function(Tt,et,nt){var ht=new go.Geometry,st=Nt*.5,gt=.5,vt=.5,wt=.5,Ft=new go.PathFigure(vt*et,(wt-gt)*nt);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,wt*nt,(vt-st)*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+gt)*nt,(vt-gt)*et,(wt+st)*nt,(vt-st)*et,(wt+gt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,wt*nt,(vt+st)*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-gt)*nt,(vt+gt)*et,(wt-st)*nt,(vt+st)*et,(wt-gt)*nt)),gt=.4,st=Nt*.4;var It=Ot(),At=Ot(),Wt=Ot(),re=Ot();Me(vt,wt-gt,vt+st,wt-gt,vt+gt,wt-st,vt+gt,wt,.42,It,At,Wt,re,re);var ne=Ot(),me=Ot(),Vt=Ot();Me(vt,wt-gt,vt+st,wt-gt,vt+gt,wt-st,vt+gt,wt,.58,re,re,Vt,ne,me);var Le=Ot(),he=Ot(),He=Ot();Me(vt,wt+gt,vt-st,wt+gt,vt-gt,wt+st,vt-gt,wt,.42,Le,he,He,re,re);var Ke=Ot(),Ve=Ot(),sn=Ot();return Me(vt,wt+gt,vt-st,wt+gt,vt-gt,wt+st,vt-gt,wt,.58,re,re,sn,Ke,Ve),Ft.add(new go.PathSegment(go.PathSegment.Move,sn.x*et,sn.y*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,wt*nt,Ke.x*et,Ke.y*nt,Ve.x*et,Ve.y*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,Wt.x*et,Wt.y*nt,It.x*et,It.y*nt,At.x*et,At.y*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,sn.x*et,sn.y*nt).close()),Ft.add(new go.PathSegment(go.PathSegment.Move,He.x*et,He.y*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,Vt.x*et,Vt.y*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,wt*nt,ne.x*et,ne.y*nt,me.x*et,me.y*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,He.x*et,He.y*nt,Le.x*et,Le.y*nt,he.x*et,he.y*nt).close()),jt(It),jt(At),jt(Wt),jt(re),jt(ne),jt(me),jt(Vt),jt(Le),jt(he),jt(He),jt(Ke),jt(Ve),jt(sn),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("Fragile",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*et,0)).add(new go.PathSegment(go.PathSegment.Line,.2*et,.15*nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.25*nt)).add(new go.PathSegment(go.PathSegment.Line,.29*et,.33*nt)).add(new go.PathSegment(go.PathSegment.Line,.35*et,.25*nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.15*nt)).add(new go.PathSegment(go.PathSegment.Line,.4*et,0)).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*et,.5*nt,et,.25*nt,.75*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.55*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.45*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.45*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.5*nt,0,.25*nt).close()))}),go.Shape.setFigureParameter("HourGlass",0,new En("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=30),ht>et&&(ht=et);var st=(et-ht)/2,gt=st+ht;return new go.Geometry().add(new go.PathFigure(gt,.5*nt).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt)).add(new go.PathSegment(go.PathSegment.Line,st,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,et,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,.55*nt).add(new go.PathSegment(go.PathSegment.Line,.6*et,0)).add(new go.PathSegment(go.PathSegment.Line,.3*et,.45*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.45*nt)).add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.55*nt).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(Tt,et,nt){var ht=new go.Geometry,st=Nt*.4,gt=.4,vt=.5,wt=.5,Ft=Ot(),It=Ot(),At=Ot(),Wt=Ot(),re=new go.PathFigure((vt-gt)*et,wt*nt,!1);ht.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt)),Me(vt,wt-gt,vt+st,wt-gt,vt+gt,wt-st,vt+gt,wt,.44,At,Wt,It,Ft,Ft),re.add(new go.PathSegment(go.PathSegment.Bezier,It.x*et,It.y*nt,At.x*et,At.y*nt,Wt.x*et,Wt.y*nt));var ne=xt(It.x,It.y);Me(vt,wt-gt,vt+st,wt-gt,vt+gt,wt-st,vt+gt,wt,.56,Ft,Ft,It,At,Wt);var me=xt(It.x,It.y);re.add(new go.PathSegment(go.PathSegment.Line,(ne.x*.1+.95*.9)*et,ne.y*.1*nt)),re.add(new go.PathSegment(go.PathSegment.Line,.85*et,ne.y*.1*nt)),re.add(new go.PathSegment(go.PathSegment.Line,.85*et,0)),re.add(new go.PathSegment(go.PathSegment.Line,et,0)),re.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),re.add(new go.PathSegment(go.PathSegment.Line,(me.x*.1+.9)*et,.15*nt)),re.add(new go.PathSegment(go.PathSegment.Line,(me.x*.1+.9)*et,(me.y*.1+.05*.9)*nt)),re.add(new go.PathSegment(go.PathSegment.Line,me.x*et,me.y*nt)),re.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,wt*nt,At.x*et,At.y*nt,Wt.x*et,Wt.y*nt)),re.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt)),re.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,wt*nt,(vt-st)*et,(wt+gt)*nt,(vt-gt)*et,(wt+st)*nt)),gt=.35,st=Nt*.35;var Vt=new go.PathFigure(vt*et,(wt-gt)*nt,!1);ht.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,wt*nt,(vt-st)*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+gt)*nt,(vt-gt)*et,(wt+st)*nt,(vt-st)*et,(wt+gt)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,wt*nt,(vt+st)*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-gt)*nt,(vt+gt)*et,(wt-st)*nt,(vt+st)*et,(wt-gt)*nt));var Le=new go.PathFigure((vt-gt)*et,wt*nt,!1);return ht.add(Le),jt(Ft),jt(It),jt(At),jt(Wt),jt(ne),jt(me),ht.spot1=new go.Spot(.202,.257),ht.spot2=new go.Spot(.792,.739),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("GenderFemale",function(Tt,et,nt){var ht=new go.Geometry,st=.375,gt=0,vt=-.125,wt=st*Nt,Ft=new go.PathFigure((.525+gt)*et,(.5+st+vt)*nt,!1);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+st+gt)*et,(.5+vt)*nt,(.5+wt+gt)*et,(.5+st+vt)*nt,(.5+st+gt)*et,(.5+wt+vt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*et,(.5-st+vt)*nt,(1-.5+st+gt)*et,(.5-wt+vt)*nt,(.5+wt+gt)*et,(.5-st+vt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(.5-st+gt)*et,(.5+vt)*nt,(.5-wt+gt)*et,(.5-st+vt)*nt,(.5-st+gt)*et,(.5-wt+vt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(.475+gt)*et,(.5+st+vt)*nt,(.5-st+gt)*et,(.5+wt+vt)*nt,(.5-wt+gt)*et,(.5+st+vt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.475*et,.85*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.425*et,.85*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.425*et,.9*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.475*et,.9*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.475*et,nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.525*et,nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.525*et,.9*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.575*et,.9*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.575*et,.85*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.525*et,.85*nt).close()),st=.325,gt=0,vt=-.125,wt=st*Nt;var Ft=new go.PathFigure((1-.5+st+gt)*et,(.5+vt)*nt,!1);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*et,(.5+st+vt)*nt,(.5+st+gt)*et,(.5+wt+vt)*nt,(.5+wt+gt)*et,(.5+st+vt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(.5-st+gt)*et,(.5+vt)*nt,(.5-wt+gt)*et,(.5+st+vt)*nt,(.5-st+gt)*et,(.5+wt+vt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*et,(.5-st+vt)*nt,(.5-st+gt)*et,(.5-wt+vt)*nt,(.5-wt+gt)*et,(.5-st+vt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+st+gt)*et,(.5+vt)*nt,(.5+wt+gt)*et,(.5-st+vt)*nt,(1-.5+st+gt)*et,(.5-wt+vt)*nt));var Ft=new go.PathFigure((.525+gt)*et,(.5+st+vt)*nt,!1);return ht.add(Ft),ht.spot1=new go.Spot(.232,.136),ht.spot2=new go.Spot(.682,.611),ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("LogicImplies",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;return isNaN(ht)&&(ht=.2),new go.Geometry().add(new go.PathFigure((1-ht)*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,nt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;return isNaN(ht)&&(ht=.2),new go.Geometry().add(new go.PathFigure((1-ht)*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,(1-ht)*et,nt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Move,ht*et,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,ht*et,nt))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)))}),go.Shape.defineFigureGenerator("LogicAnd",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,et,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(Tt,et,nt){var ht=new go.Geometry().add(new go.PathFigure(.5*et,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*et,.5*nt,.5*et,.5*nt)));return ht.defaultStretch=go.GraphObject.Uniform,ht}),go.Shape.defineFigureGenerator("LogicTruth",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,.5*et,0)).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Move,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Move,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt)))}),go.Shape.defineFigureGenerator("LogicForAll",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,.25*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,.75*et,.5*nt))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)).add(new go.PathSegment(go.PathSegment.Move,0,nt)).add(new go.PathSegment(go.PathSegment.Line,et,nt))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(Tt,et,nt){var ht=.5;return new go.Geometry().add(new go.PathFigure(0,nt,!1).add(new go.PathSegment(go.PathSegment.Line,0,ht*nt)).add(new go.PathSegment(go.PathSegment.Arc,180,180,ht*et,ht*nt,ht*et,ht*nt)).add(new go.PathSegment(go.PathSegment.Line,et,nt))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(Tt,et,nt){var ht=.5;return new go.Geometry().add(new go.PathFigure(et,0,!1).add(new go.PathSegment(go.PathSegment.Line,et,ht*nt)).add(new go.PathSegment(go.PathSegment.Arc,0,180,ht*et,ht*nt,ht*et,ht*nt)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new En("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new En("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=.3);var st=Tt?Tt.parameter2:NaN;isNaN(st)&&(st=.3);var gt=(1-ht)*et,vt=(.5-st/2)*nt,wt=(.5+st/2)*nt,Ft=new go.Geometry,It=new go.PathFigure(0,vt,!0);Ft.add(It),It.add(new go.PathSegment(go.PathSegment.Line,gt,vt)),It.add(new go.PathSegment(go.PathSegment.Line,gt,0)),It.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),It.add(new go.PathSegment(go.PathSegment.Line,gt,nt)),It.add(new go.PathSegment(go.PathSegment.Line,gt,wt)),It.add(new go.PathSegment(go.PathSegment.Line,0,wt).close()),Ft.spot1=new go.Spot(0,vt/nt);var At=Qt(0,wt/nt,1,wt/nt,gt/et,1,1,.5,Ot());return Ft.spot2=new go.Spot(At.x,At.y),jt(At),Ft}),go.Shape.setFigureParameter("Arrow2",0,new En("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new En("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=30),ht>et&&(ht=et);var st=Tt?Tt.parameter2:NaN;isNaN(st)&&(st=30),st=Math.min(st,nt/2);var gt=et-ht,vt=(nt-st)/2,wt=vt+st,Ft=new go.Geometry,It=new go.PathFigure(0,vt,!0);Ft.add(It),It.add(new go.PathSegment(go.PathSegment.Line,gt,vt)),It.add(new go.PathSegment(go.PathSegment.Line,gt,0)),It.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),It.add(new go.PathSegment(go.PathSegment.Line,gt,nt)),It.add(new go.PathSegment(go.PathSegment.Line,gt,wt)),It.add(new go.PathSegment(go.PathSegment.Line,0,wt).close()),Ft.spot1=new go.Spot(0,vt/nt);var At=Qt(0,wt/nt,1,wt/nt,gt/et,1,1,.5,Ot());return Ft.spot2=new go.Spot(At.x,At.y),jt(At),Ft}),go.Shape.defineFigureGenerator("Chevron",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt).close()),ht}),go.Shape.defineFigureGenerator("DoubleArrow",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.3*et,.214*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.3*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,1*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.3*et,1*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.3*et,.786*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,1*nt).close()),ht}),go.Shape.setFigureParameter("DoubleEndArrow",0,new En("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=.3);var st=(.5-ht/2)*nt,gt=(.5+ht/2)*nt,vt=new go.Geometry,wt=new go.PathFigure(et,.5*nt,!0);vt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,.3*et,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,.3*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.3*et,0)),wt.add(new go.PathSegment(go.PathSegment.Line,.3*et,st)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,st)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close());var Ft=Qt(0,.5,.3,0,0,st/nt,.1,st/nt,Ot());return vt.spot1=new go.Spot(Ft.x,Ft.y),Ft=Qt(.7,1,1,.5,0,gt/nt,1,gt/nt,Ft),vt.spot2=new go.Spot(Ft.x,Ft.y),jt(Ft),vt}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new En("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new En("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=40);var st=Tt?Tt.parameter2:NaN;isNaN(st)&&(st=100);var gt=(nt-ht)/2,vt=gt+ht,wt=(nt-st)/2,Ft=wt+st;(ht>nt||st>nt)&&(st>ht?(ht=ht*nt/st,gt=(nt-ht)/2,vt=gt+ht,wt=0,Ft=nt):(gt=0,vt=nt,wt=0,Ft=nt));var It=new go.Geometry,At=new go.PathFigure(et,.5*nt,!0);It.add(At),At.add(new go.PathSegment(go.PathSegment.Line,.7*et,Ft)),At.add(new go.PathSegment(go.PathSegment.Line,.7*et,vt)),At.add(new go.PathSegment(go.PathSegment.Line,.3*et,vt)),At.add(new go.PathSegment(go.PathSegment.Line,.3*et,Ft)),At.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),At.add(new go.PathSegment(go.PathSegment.Line,.3*et,wt)),At.add(new go.PathSegment(go.PathSegment.Line,.3*et,gt)),At.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),At.add(new go.PathSegment(go.PathSegment.Line,.7*et,wt).close());var Wt=Qt(0,.5,.3,wt/nt,0,gt/nt,1,gt/nt,Ot());return It.spot1=new go.Spot(Wt.x,Wt.y),Wt=Qt(.7,Ft/nt,1,.5,0,vt/nt,1,vt/nt,Wt),It.spot2=new go.Spot(Wt.x,Wt.y),jt(Wt),It}),go.Shape.setFigureParameter("IBeamArrow",0,new En("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=.3);var st=(.5-ht/2)*nt,gt=(.5+ht/2)*nt,vt=new go.Geometry,wt=new go.PathFigure(et,.5*nt,!0);vt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,0)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,0)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,st)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,st)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),vt.spot1=new go.Spot(0,st/nt);var Ft=Qt(.7,1,1,.5,0,gt/nt,1,gt/nt,Ot());return vt.spot2=new go.Spot(Ft.x,Ft.y),jt(Ft),vt}),go.Shape.setFigureParameter("IBeamArrow2",0,new En("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new En("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=40);var st=Tt?Tt.parameter2:NaN;isNaN(st)&&(st=100);var gt=(nt-ht)/2,vt=gt+ht,wt=(nt-st)/2,Ft=wt+st;(ht>nt||st>nt)&&(st>ht?(ht=ht*nt/st,gt=(nt-ht)/2,vt=gt+ht,wt=0,Ft=nt):(gt=0,vt=nt,wt=0,Ft=nt));var It=new go.Geometry,At=new go.PathFigure(et,.5*nt,!0);It.add(At),At.add(new go.PathSegment(go.PathSegment.Line,.7*et,Ft)),At.add(new go.PathSegment(go.PathSegment.Line,.7*et,vt)),At.add(new go.PathSegment(go.PathSegment.Line,.2*et,vt)),At.add(new go.PathSegment(go.PathSegment.Line,.2*et,Ft)),At.add(new go.PathSegment(go.PathSegment.Line,0,Ft)),At.add(new go.PathSegment(go.PathSegment.Line,0,wt)),At.add(new go.PathSegment(go.PathSegment.Line,.2*et,wt)),At.add(new go.PathSegment(go.PathSegment.Line,.2*et,gt)),At.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),At.add(new go.PathSegment(go.PathSegment.Line,.7*et,wt).close()),It.spot1=new go.Spot(0,gt/nt);var Wt=Qt(.7,Ft/nt,1,.5,0,vt/nt,1,vt/nt,Ot());return It.spot2=new go.Spot(Wt.x,Wt.y),jt(Wt),It}),go.Shape.setFigureParameter("Pointer",0,new En("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=.1);var st=new go.Geometry,gt=new go.PathFigure(et,.5*nt,!0);st.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,ht*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),st.spot1=new go.Spot(ht,.35);var vt=Qt(.2,.65,1,.65,0,1,1,.5,Ot());return st.spot2=new go.Spot(vt.x,vt.y),jt(vt),st}),go.Shape.setFigureParameter("RoundedPointer",0,new En("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=.3);var st=new go.Geometry,gt=new go.PathFigure(et,.5*nt,!0);st.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ht*et,.75*nt,ht*et,.25*nt).close()),st.spot1=new go.Spot(ht,.35);var vt=Qt(0,.65,1,.65,0,1,1,.5,Ot());return st.spot2=new go.Spot(vt.x,vt.y),jt(vt),st}),go.Shape.setFigureParameter("SplitEndArrow",0,new En("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=.4);var st=(.5-ht/2)*nt,gt=(.5+ht/2)*nt,vt=new go.Geometry,wt=new go.PathFigure(et,.5*nt,!0);vt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,st)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,st)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),vt.spot1=new go.Spot(.2,.3);var Ft=Qt(.7,1,1,.5,0,gt/nt,1,gt/nt,Ot());return vt.spot2=new go.Spot(Ft.x,Ft.y),jt(Ft),vt}),go.Shape.setFigureParameter("SplitEndArrow2",0,new En("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=50);var st=(nt-ht)/2,gt=st+ht;ht>nt&&(st=0,gt=nt);var vt=new go.Geometry,wt=new go.PathFigure(et,.5*nt,!0);vt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,0,st)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,st)),wt.add(new go.PathSegment(go.PathSegment.Line,.7*et,0).close()),vt.spot1=new go.Spot(.2,st/nt);var Ft=Qt(.7,1,1,.5,0,gt/nt,1,gt/nt,Ot());return vt.spot2=new go.Spot(Ft.x,Ft.y),jt(Ft),vt}),go.Shape.setFigureParameter("SquareArrow",0,new En("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=.7);var st=new go.Geometry,gt=new go.PathFigure(et,.5*nt,!0);return st.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,ht*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,0)),gt.add(new go.PathSegment(go.PathSegment.Line,ht*et,0).close()),st.spot1=go.Spot.TopLeft,st.spot2=new go.Spot(ht,1),st}),go.Shape.defineFigureGenerator("Cone1",function(Tt,et,nt){var ht=new go.Geometry,st=Nt*.5,gt=Nt*.1,vt=new go.PathFigure(0,.9*nt,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.9+gt)*nt,(.5+st)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-st)*et,nt,0,(.9+gt)*nt).close()),ht.spot1=new go.Spot(.25,.5),ht.spot2=new go.Spot(.75,.97),ht}),go.Shape.defineFigureGenerator("Cone2",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.9*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Bezier,et,.9*nt,(1-.85/.9)*et,nt,.85/.9*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,0,.9*nt).close());var gt=new go.PathFigure(0,.9*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,et,.9*nt,(1-.85/.9)*et,.8*nt,.85/.9*et,.8*nt)),ht.spot1=new go.Spot(.25,.5),ht.spot2=new go.Spot(.75,.82),ht}),go.Shape.defineFigureGenerator("Cube1",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.5*et,nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,0,.15*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.85*nt).close());var gt=new go.PathFigure(.5*et,nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.15*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),ht.spot1=new go.Spot(0,.3),ht.spot2=new go.Spot(.5,.85),ht}),go.Shape.defineFigureGenerator("Cube2",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.3*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.3*et,0).close());var gt=new go.PathFigure(0,.3*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Move,.7*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.7*et,nt)),ht.spot1=new go.Spot(0,.3),ht.spot2=new go.Spot(.7,1),ht}),go.Shape.defineFigureGenerator("Cylinder1",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,nt/3);var st=new go.Geometry,gt=Nt*.5,vt=new go.PathFigure(0,ht,!0);st.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,Nt*ht,(.5-gt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,1*et,ht,(.5+gt)*et,0,1*et,Nt*ht)),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt-ht)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,1*nt,1*et,nt-Nt*ht,(.5+gt)*et,1*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-ht,(.5-gt)*et,1*nt,0,nt-Nt*ht)),vt.add(new go.PathSegment(go.PathSegment.Line,0,ht));var wt=new go.PathFigure(et,ht,!1);return st.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,2*ht,1*et,2*ht-Nt*ht,(.5+gt)*et,2*ht)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,ht,(.5-gt)*et,2*ht,0,2*ht-Nt*ht)),st.spot1=new go.Spot(0,0,0,2*ht),st.spot2=new go.Spot(1,1),st}),go.Shape.defineFigureGenerator("Cylinder2",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,nt/3);var st=new go.Geometry,gt=Nt*.5,vt=new go.PathFigure(0,nt-ht,!0);st.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,0,ht)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,Nt*ht,(.5-gt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,ht,(.5+gt)*et,0,et,Nt*ht)),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt-ht)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,nt-Nt*ht,(.5+gt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-ht,(.5-gt)*et,nt,0,nt-Nt*ht));var wt=new go.PathFigure(0,nt-ht,!1);return st.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt-2*ht,0,nt-ht-Nt*ht,(.5-gt)*et,nt-2*ht)),wt.add(new go.PathSegment(go.PathSegment.Bezier,et,nt-ht,(.5+gt)*et,nt-2*ht,et,nt-ht-Nt*ht)),st.spot1=new go.Spot(0,0),st.spot2=new go.Spot(1,1,0,-2*ht),st}),go.Shape.defineFigureGenerator("Cylinder3",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,et/3);var st=new go.Geometry,gt=Nt*.5,vt=new go.PathFigure(ht,0,!0);st.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et-ht,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,et-Nt*ht,0,et,(.5-gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et-ht,nt,et,(.5+gt)*nt,et-Nt*ht,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,ht,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,Nt*ht,nt,0,(.5+gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,(.5-gt)*nt,Nt*ht,0));var wt=new go.PathFigure(ht,0,!1);return st.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,2*ht,.5*nt,ht+Nt*ht,0,2*ht,(.5-gt)*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,ht,nt,2*ht,(.5+gt)*nt,ht+Nt*ht,nt)),st.spot1=new go.Spot(0,0,2*ht,0),st.spot2=new go.Spot(1,1),st}),go.Shape.defineFigureGenerator("Cylinder4",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=5),ht=Math.min(ht,et/3);var st=new go.Geometry,gt=Nt*.5,vt=new go.PathFigure(et-ht,0,!0);st.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,et-Nt*ht,0,et,(.5-gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et-ht,nt,et,(.5+gt)*nt,et-Nt*ht,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,ht,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,Nt*ht,nt,0,(.5+gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,(.5-gt)*nt,Nt*ht,0)),vt.add(new go.PathSegment(go.PathSegment.Line,et-ht,0));var wt=new go.PathFigure(et-ht,0,!1);return st.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,et-2*ht,.5*nt,et-ht-Nt*ht,0,et-2*ht,(.5-gt)*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,et-ht,nt,et-2*ht,(.5+gt)*nt,et-ht-Nt*ht,nt)),st.spot1=new go.Spot(0,0),st.spot2=new go.Spot(1,1,-2*ht,0),st}),go.Shape.defineFigureGenerator("Prism1",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.25*et,.25*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var gt=new go.PathFigure(.25*et,.25*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),ht.spot1=new go.Spot(.408,.172),ht.spot2=new go.Spot(.833,.662),ht}),go.Shape.defineFigureGenerator("Prism2",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.25*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var gt=new go.PathFigure(0,nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,0,.25*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.5*nt)),ht.spot1=new go.Spot(.25,.5),ht.spot2=new go.Spot(.75,.75),ht}),go.Shape.defineFigureGenerator("Pyramid1",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.5*et,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.75*nt).close());var gt=new go.PathFigure(.5*et,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),ht.spot1=new go.Spot(.25,.367),ht.spot2=new go.Spot(.75,.875),ht}),go.Shape.defineFigureGenerator("Pyramid2",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.5*et,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.85*nt).close());var gt=new go.PathFigure(.5*et,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.7*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.85*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.7*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),ht.spot1=new go.Spot(.25,.367),ht.spot2=new go.Spot(.75,.875),ht}),go.Shape.defineFigureGenerator("Actor",function(Tt,et,nt){var ht=new go.Geometry,st=.2,gt=.1,vt=Nt*st,wt=Nt*gt,Ft=.5,It=.1,At=new go.PathFigure(Ft*et,(It+gt)*nt,!0);ht.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-st)*et,It*nt,(Ft-vt)*et,(It+gt)*nt,(Ft-st)*et,(It+wt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It-gt)*nt,(Ft-st)*et,(It-wt)*nt,(Ft-vt)*et,(It-gt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+st)*et,It*nt,(Ft+vt)*et,(It-gt)*nt,(Ft+st)*et,(It-wt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It+gt)*nt,(Ft+st)*et,(It+wt)*nt,(Ft+vt)*et,(It+gt)*nt));var Wt=.05,re=Nt*Wt;Ft=.05,It=.25;var ne=new go.PathFigure(.5*et,.2*nt,!0);return ht.add(ne),ne.add(new go.PathSegment(go.PathSegment.Line,.95*et,.2*nt)),Ft=.95,It=.25,ne.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+Wt)*et,It*nt,(Ft+re)*et,(It-Wt)*nt,(Ft+Wt)*et,(It-re)*nt)),ne.add(new go.PathSegment(go.PathSegment.Line,et,.6*nt)),ne.add(new go.PathSegment(go.PathSegment.Line,.85*et,.6*nt)),ne.add(new go.PathSegment(go.PathSegment.Line,.85*et,.35*nt)),Wt=.025,re=Nt*Wt,Ft=.825,It=.35,ne.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It-Wt)*nt,(Ft+Wt)*et,(It-re)*nt,(Ft+re)*et,(It-Wt)*nt)),ne.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-Wt)*et,It*nt,(Ft-re)*et,(It-Wt)*nt,(Ft-Wt)*et,(It-re)*nt)),ne.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),ne.add(new go.PathSegment(go.PathSegment.Line,.55*et,nt)),ne.add(new go.PathSegment(go.PathSegment.Line,.55*et,.7*nt)),Wt=.05,re=Nt*Wt,Ft=.5,It=.7,ne.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It-Wt)*nt,(Ft+Wt)*et,(It-re)*nt,(Ft+re)*et,(It-Wt)*nt)),ne.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-Wt)*et,It*nt,(Ft-re)*et,(It-Wt)*nt,(Ft-Wt)*et,(It-re)*nt)),ne.add(new go.PathSegment(go.PathSegment.Line,.45*et,nt)),ne.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),ne.add(new go.PathSegment(go.PathSegment.Line,.2*et,.35*nt)),Wt=.025,re=Nt*Wt,Ft=.175,It=.35,ne.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It-Wt)*nt,(Ft+Wt)*et,(It-re)*nt,(Ft+re)*et,(It-Wt)*nt)),ne.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-Wt)*et,It*nt,(Ft-re)*et,(It-Wt)*nt,(Ft-Wt)*et,(It-re)*nt)),ne.add(new go.PathSegment(go.PathSegment.Line,.15*et,.6*nt)),ne.add(new go.PathSegment(go.PathSegment.Line,0,.6*nt)),ne.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),Wt=.05,re=Nt*Wt,Ft=.05,It=.25,ne.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It-Wt)*nt,(Ft-Wt)*et,(It-re)*nt,(Ft-re)*et,(It-Wt)*nt)),ne.add(new go.PathSegment(go.PathSegment.Line,.5*et,.2*nt)),ht.spot1=new go.Spot(.2,.2),ht.spot2=new go.Spot(.8,.65),ht}),go.Shape.setFigureParameter("Card",0,new En("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;isNaN(ht)&&(ht=.2);var st=new go.Geometry,gt=new go.PathFigure(et,0,!0);return st.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,ht*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,ht*et,0).close()),st.spot1=new go.Spot(0,ht),st.spot2=go.Spot.BottomRight,st}),go.Shape.defineFigureGenerator("Collate",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.5*et,.5*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt));var gt=new go.PathFigure(.5*et,.5*nt,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),ht.spot1=new go.Spot(.25,0),ht.spot2=new go.Spot(.75,.25),ht}),go.Shape.defineFigureGenerator("CreateRequest",function(Tt,et,nt){var ht=new go.Geometry,st=Tt?Tt.parameter1:NaN;isNaN(st)&&(st=.1);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var vt=new go.PathFigure(0,st*nt,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,st*nt)),vt.add(new go.PathSegment(go.PathSegment.Move,0,(1-st)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,(1-st)*nt)),ht}),go.Shape.defineFigureGenerator("Database",function(Tt,et,nt){var ht=new go.Geometry,st=Nt*.5,gt=Nt*.1,vt=new go.PathFigure(et,.1*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.9+gt)*nt,(.5+st)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-st)*et,nt,0,(.9+gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,(.1-gt)*nt,(.5-st)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.1*nt,(.5+st)*et,0,et,(.1-gt)*nt));var wt=new go.PathFigure(et,.1*nt,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,et,(.1+gt)*nt,(.5+st)*et,.2*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*nt,(.5-st)*et,.2*nt,0,(.1+gt)*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,et,.2*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.3*nt,et,(.2+gt)*nt,(.5+st)*et,.3*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*nt,(.5-st)*et,.3*nt,0,(.2+gt)*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,et,.3*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.4*nt,et,(.3+gt)*nt,(.5+st)*et,.4*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*nt,(.5-st)*et,.4*nt,0,(.3+gt)*nt)),ht.spot1=new go.Spot(0,.4),ht.spot2=new go.Spot(1,.9),ht}),go.Shape.defineFigureGenerator("DataStorage",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),st.add(new go.PathSegment(go.PathSegment.Bezier,.75*et,nt,et,0,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.9*nt,.25*et,.1*nt).close()),ht.spot1=new go.Spot(.226,0),ht.spot2=new go.Spot(.81,1),ht}),go.Shape.defineFigureGenerator("DiskStorage",function(Tt,et,nt){var ht=new go.Geometry,st=Nt*.5,gt=Nt*.1,vt=new go.PathFigure(et,.1*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.9+gt)*nt,(.5+st)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,(.5-st)*et,nt,0,(.9+gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,(.1-gt)*nt,(.5-st)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.1*nt,(.5+st)*et,0,et,(.1-gt)*nt));var wt=new go.PathFigure(et,.1*nt,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,et,(.1+gt)*nt,(.5+st)*et,.2*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*nt,(.5-st)*et,.2*nt,0,(.1+gt)*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,et,.2*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.3*nt,et,(.2+gt)*nt,(.5+st)*et,.3*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*nt,(.5-st)*et,.3*nt,0,(.2+gt)*nt)),ht.spot1=new go.Spot(0,.3),ht.spot2=new go.Spot(1,.9),ht}),go.Shape.defineFigureGenerator("Display",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.25*et,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),st.add(new go.PathSegment(go.PathSegment.Bezier,.75*et,nt,et,0,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.25*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt).close()),ht.spot1=new go.Spot(.25,0),ht.spot2=new go.Spot(.75,1),ht}),go.Shape.defineFigureGenerator("DividedEvent",function(Tt,et,nt){var ht=new go.Geometry,st=Tt?Tt.parameter1:NaN;isNaN(st)?st=.2:st<.15&&(st=.15);var gt=Nt*.2,vt=new go.PathFigure(0,.2*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,0,(.2-gt)*nt,(.2-gt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,.8*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.2*nt,(.8+gt)*et,0,et,(.2-gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,nt,et,(.8+gt)*nt,(.8+gt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*nt,(.2-gt)*et,nt,0,(.8+gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt));var wt=new go.PathFigure(0,st*nt,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et,st*nt)),ht}),go.Shape.defineFigureGenerator("DividedProcess",function(Tt,et,nt){var ht=new go.Geometry,st=Tt?Tt.parameter1:NaN;(isNaN(st)||st<.1)&&(st=.1);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var vt=new go.PathFigure(0,st*nt,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,st*nt)),ht}),go.Shape.defineFigureGenerator("Document",function(Tt,et,nt){var ht=new go.Geometry;nt=nt/.8;var st=new go.PathFigure(0,.7*nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.5*et,.4*nt,.5*et,nt).close()),ht.spot1=go.Spot.TopLeft,ht.spot2=new go.Spot(1,.6),ht}),go.Shape.defineFigureGenerator("ExternalOrganization",function(Tt,et,nt){var ht=new go.Geometry,st=Tt?Tt.parameter1:NaN;(isNaN(st)||st<.2)&&(st=.2);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var vt=new go.PathFigure(st*et,0,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,0,st*nt)),vt.add(new go.PathSegment(go.PathSegment.Move,et,st*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,(1-st)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Move,0,(1-st)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,st*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Move,(1-st)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,(1-st)*nt)),ht}),go.Shape.defineFigureGenerator("ExternalProcess",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.5*et,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt).close());var gt=new go.PathFigure(.1*et,.4*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.9*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.6*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.4*et,.9*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.9*nt)),ht.spot1=new go.Spot(.25,.25),ht.spot2=new go.Spot(.75,.75),ht}),go.Shape.defineFigureGenerator("File",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var gt=new go.PathFigure(.75*et,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.25*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),ht.spot1=new go.Spot(0,.25),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("Interrupt",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et,.5*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt));var gt=new go.PathFigure(et,.5*nt,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt));var vt=new go.PathFigure(et,.5*nt,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,0)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.5,.75),ht}),go.Shape.defineFigureGenerator("InternalStorage",function(Tt,et,nt){var ht=new go.Geometry,st=Tt?Tt.parameter1:NaN,gt=Tt?Tt.parameter2:NaN;isNaN(st)&&(st=.1),isNaN(gt)&&(gt=.1);var vt=new go.PathFigure(0,0,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var wt=new go.PathFigure(st*et,0,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,st*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Move,0,gt*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,et,gt*nt)),ht}),go.Shape.defineFigureGenerator("Junction",function(Tt,et,nt){var ht=new go.Geometry,st=1/Math.SQRT2,gt=(1-1/Math.SQRT2)/2,vt=Nt*.5,wt=.5,Ft=new go.PathFigure(et,wt*nt,!0);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,wt*et,nt,et,(wt+vt)*nt,(wt+vt)*et,nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,0,wt*nt,(wt-vt)*et,nt,0,(wt+vt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,wt*et,0,0,(wt-vt)*nt,(wt-vt)*et,0)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,et,wt*nt,(wt+vt)*et,0,et,(wt-vt)*nt));var It=new go.PathFigure((gt+st)*et,(gt+st)*nt,!1);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Line,gt*et,gt*nt)),It.add(new go.PathSegment(go.PathSegment.Move,gt*et,(gt+st)*nt)),It.add(new go.PathSegment(go.PathSegment.Line,(gt+st)*et,gt*nt)),ht}),go.Shape.defineFigureGenerator("LinedDocument",function(Tt,et,nt){var ht=new go.Geometry;nt=nt/.8;var st=new go.PathFigure(0,.7*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.5*et,.4*nt,.5*et,nt).close());var gt=new go.PathFigure(.1*et,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.75*nt)),ht.spot1=new go.Spot(.1,0),ht.spot2=new go.Spot(1,.6),ht}),go.Shape.defineFigureGenerator("LoopLimit",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.25*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("MagneticTape",function(Tt,et,nt){var ht=new go.Geometry,st=Nt*.5,gt=.5,vt=new go.PathFigure(.5*et,nt,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*nt,(gt-st)*et,nt,0,(gt+st)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,0,0,(gt-st)*nt,(gt-st)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,gt*nt,(gt+st)*et,0,et,(gt-st)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+.1)*et,.9*nt,et,(gt+st)*nt,(gt+st)*et,.9*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),ht.spot1=new go.Spot(.15,.15),ht.spot2=new go.Spot(.85,.8),ht}),go.Shape.defineFigureGenerator("ManualInput",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("MessageFromUser",function(Tt,et,nt){var ht=new go.Geometry,st=Tt?Tt.parameter1:NaN;isNaN(st)&&(st=.7);var gt=new go.PathFigure(0,0,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,st*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht.spot1=go.Spot.TopLeft,ht}),go.Shape.defineFigureGenerator("MicroformProcessing",function(Tt,et,nt){var ht=new go.Geometry,st=Tt?Tt.parameter1:NaN;isNaN(st)&&(st=.25);var gt=new go.PathFigure(0,0,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,st*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,(1-st)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht}),go.Shape.defineFigureGenerator("MicroformRecording",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.85*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(1,.75),ht}),go.Shape.defineFigureGenerator("MultiDocument",function(Tt,et,nt){var ht=new go.Geometry;nt=nt/.8;var st=new go.PathFigure(et,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,.44*nt,.96*et,.47*nt,.93*et,.45*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.9*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.54*nt,.86*et,.57*nt,.83*et,.55*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.4*et,.4*nt,.4*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,.1*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,.1*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,0).close());var gt=new go.PathFigure(.1*et,.2*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.54*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.44*nt)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.8,.77),ht}),go.Shape.defineFigureGenerator("MultiProcess",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.1*et,.1*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,.1*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.9*et,.9*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,.9*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,.2*nt).close());var gt=new go.PathFigure(.2*et,.1*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.1*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.1*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.9*nt)),ht.spot1=new go.Spot(0,.2),ht.spot2=new go.Spot(.8,1),ht}),go.Shape.defineFigureGenerator("OfflineStorage",function(Tt,et,nt){var ht=new go.Geometry,st=Tt?Tt.parameter1:NaN;isNaN(st)&&(st=.1);var gt=1-st,vt=new go.PathFigure(0,0,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt).close());var wt=new go.PathFigure(.5*st*et,st*nt,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,(1-.5*st)*et,st*nt)),ht}),go.Shape.defineFigureGenerator("OffPageConnector",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht.spot1=go.Spot.TopLeft,ht.spot2=new go.Spot(.75,1),ht}),go.Shape.defineFigureGenerator("Or",function(Tt,et,nt){var ht=new go.Geometry,st=Nt*.5,gt=.5,vt=new go.PathFigure(et,gt*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,nt,et,(gt+st)*nt,(gt+st)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*nt,(gt-st)*et,nt,0,(gt+st)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,0,0,(gt-st)*nt,(gt-st)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,gt*nt,(gt+st)*et,0,et,(gt-st)*nt));var wt=new go.PathFigure(et,.5*nt,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,.5*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),ht}),go.Shape.defineFigureGenerator("PaperTape",function(Tt,et,nt){var ht=new go.Geometry;nt=nt/.8;var st=new go.PathFigure(0,.7*nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,.3*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,et,.3*nt,.5*et,.6*nt,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*nt,.5*et,.4*nt,.5*et,nt).close()),ht.spot1=new go.Spot(0,.49),ht.spot2=new go.Spot(1,.75),ht}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(Tt,et,nt){var ht=new go.Geometry,st=Tt?Tt.parameter1:NaN,gt=Tt?Tt.parameter2:NaN;isNaN(st)&&(st=.1),isNaN(gt)&&(gt=.3);var vt=new go.PathFigure(0,0,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*et,.5*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(Tt,et,nt){var ht=new go.Geometry,st=Tt?Tt.parameter1:NaN,gt=Tt?Tt.parameter2:NaN;isNaN(st)&&(st=.1),isNaN(gt)&&(gt=.3);var vt=new go.PathFigure(0,0,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,(1-gt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht}),go.Shape.defineFigureGenerator("Procedure",function(Tt,et,nt){var ht=new go.Geometry,st=Tt?Tt.parameter1:NaN;isNaN(st)&&(st=.1);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var vt=new go.PathFigure((1-st)*et,0,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,(1-st)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Move,st*et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,st*et,nt)),ht}),go.Shape.defineFigureGenerator("Process",function(Tt,et,nt){var ht=new go.Geometry,st=Tt?Tt.parameter1:NaN;isNaN(st)&&(st=.1);var gt=new go.PathFigure(0,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var vt=new go.PathFigure(st*et,0,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,st*et,nt)),ht.spot2=go.Spot.BottomRight,ht}),go.Shape.defineFigureGenerator("Sort",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.5*et,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt).close());var gt=new go.PathFigure(0,.5*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),ht.spot1=new go.Spot(.25,.25),ht.spot2=new go.Spot(.75,.5),ht}),go.Shape.defineFigureGenerator("Start",function(Tt,et,nt){var ht=new go.Geometry,st=Tt?Tt.parameter1:NaN;isNaN(st)&&(st=.25);var gt=new go.PathFigure(st*et,0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*et,.5*nt,.25*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*et,.5*nt,.25*et,.5*nt));var vt=new go.PathFigure(st*et,0,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,st*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Move,(1-st)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,(1-st)*et,nt)),ht.spot1=new go.Spot(st,0),ht.spot2=new go.Spot(1-st,1),ht}),go.Shape.defineFigureGenerator("Terminator",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.25*et,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*et,.5*nt,.25*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*et,.5*nt,.25*et,.5*nt)),ht.spot1=new go.Spot(.23,0),ht.spot2=new go.Spot(.77,1),ht}),go.Shape.defineFigureGenerator("TransmittalTape",function(Tt,et,nt){var ht=new go.Geometry,st=Tt?Tt.parameter1:NaN;isNaN(st)&&(st=.1);var gt=new go.PathFigure(0,0,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.75*et,(1-st)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,(1-st)*nt).close()),ht.spot1=go.Spot.TopLeft,ht}),go.Shape.defineFigureGenerator("AndGate",function(Tt,et,nt){var ht=new go.Geometry,st=Nt*.5,gt=new go.PathFigure(0,0,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(.5+st)*et,0,et,(.5-st)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,(.5+st)*nt,(.5+st)*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht.spot1=go.Spot.TopLeft,ht.spot2=new go.Spot(.55,1),ht}),go.Shape.defineFigureGenerator("Buffer",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.5,.75),ht}),go.Shape.defineFigureGenerator("Clock",function(Tt,et,nt){var ht=new go.Geometry,st=Nt*.5,gt=.5,vt=new go.PathFigure(et,gt*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,nt,et,(gt+st)*nt,(gt+st)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt*nt,(gt-st)*et,nt,0,(gt+st)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,gt*et,0,0,(gt-st)*nt,(gt-st)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,gt*nt,(gt+st)*et,0,et,(gt-st)*nt));var wt=new go.PathFigure(et,gt*nt,!1);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et,gt*nt));var Ft=new go.PathFigure(.8*et,.75*nt,!1);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Line,.8*et,.25*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.6*et,.25*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.6*et,.75*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.4*et,.75*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.4*et,.25*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.2*et,.25*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,.2*et,.75*nt)),ht}),go.Shape.defineFigureGenerator("Ground",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.5*et,0,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.2*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.3*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.7*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.4*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.6*et,nt)),ht}),go.Shape.defineFigureGenerator("Inverter",function(Tt,et,nt){var ht=new go.Geometry,st=Nt*.1,gt=.1,vt=.9,wt=.5,Ft=new go.PathFigure(.8*et,.5*nt,!0);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Line,0,nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,0,0)),Ft.add(new go.PathSegment(go.PathSegment.Line,.8*et,.5*nt));var It=new go.PathFigure((vt+gt)*et,wt*nt,!0);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,wt*nt,(vt-st)*et,(wt+gt)*nt,(vt-gt)*et,(wt+st)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,wt*nt,(vt+st)*et,(wt-gt)*nt,(vt+gt)*et,(wt-st)*nt)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.4,.75),ht}),go.Shape.defineFigureGenerator("NandGate",function(Tt,et,nt){var ht=new go.Geometry,st=Nt*.5,gt=Nt*.4,vt=Nt*.1,wt=.1,Ft=.9,It=.5,At=new go.PathFigure(.8*et,.5*nt,!0);ht.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,nt,.8*et,(.5+gt)*nt,(.4+st)*et,nt)),At.add(new go.PathSegment(go.PathSegment.Line,0,nt)),At.add(new go.PathSegment(go.PathSegment.Line,0,0)),At.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),At.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(.4+st)*et,0,.8*et,(.5-gt)*nt));var Wt=new go.PathFigure((Ft+wt)*et,It*nt,!0);return ht.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It+wt)*nt,(Ft+wt)*et,(It+vt)*nt,(Ft+vt)*et,(It+wt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-wt)*et,It*nt,(Ft-vt)*et,(It+wt)*nt,(Ft-wt)*et,(It+vt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It-wt)*nt,(Ft-wt)*et,(It-vt)*nt,(Ft-vt)*et,(It-wt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+wt)*et,It*nt,(Ft+vt)*et,(It-wt)*nt,(Ft+wt)*et,(It-vt)*nt)),ht.spot1=new go.Spot(0,.05),ht.spot2=new go.Spot(.55,.95),ht}),go.Shape.defineFigureGenerator("NorGate",function(Tt,et,nt){var ht=new go.Geometry,st=.5,gt=Nt*st,vt=0,wt=.5,Ft=new go.PathFigure(.8*et,.5*nt,!0);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.7*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.75*nt,.25*et,.25*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(vt+gt)*et,(wt-st)*nt,.7*et,(wt-gt)*nt)),st=.1,gt=Nt*.1,vt=.9,wt=.5;var It=new go.PathFigure((vt-st)*et,wt*nt,!0);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(vt+st)*et,wt*nt,(vt+gt)*et,(wt-st)*nt,(vt+st)*et,(wt-gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(vt-st)*et,wt*nt,(vt-gt)*et,(wt+st)*nt,(vt-st)*et,(wt+gt)*nt)),ht.spot1=new go.Spot(.2,.25),ht.spot2=new go.Spot(.6,.75),ht}),go.Shape.defineFigureGenerator("OrGate",function(Tt,et,nt){var ht=new go.Geometry,st=.5,gt=Nt*st,vt=0,wt=.5,Ft=new go.PathFigure(0,0,!0);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(vt+gt+gt)*et,(wt-st)*nt,.8*et,(wt-gt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.8*et,(wt+gt)*nt,(vt+gt+gt)*et,(wt+st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*et,.75*nt,.25*et,.25*nt).close()),ht.spot1=new go.Spot(.2,.25),ht.spot2=new go.Spot(.75,.75),ht}),go.Shape.defineFigureGenerator("XnorGate",function(Tt,et,nt){var ht=new go.Geometry,st=.5,gt=Nt*st,vt=.2,wt=.5,Ft=new go.PathFigure(.1*et,0,!1);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,nt,.35*et,.25*nt,.35*et,.75*nt));var It=new go.PathFigure(.8*et,.5*nt,!0);ht.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,nt,.7*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,.45*et,.75*nt,.45*et,.25*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.5*nt,(vt+gt)*et,(wt-st)*nt,.7*et,(wt-gt)*nt)),st=.1,gt=Nt*.1,vt=.9,wt=.5;var At=new go.PathFigure((vt-st)*et,wt*nt,!0);return ht.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(vt+st)*et,wt*nt,(vt+gt)*et,(wt-st)*nt,(vt+st)*et,(wt-gt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(vt-st)*et,wt*nt,(vt-gt)*et,(wt+st)*nt,(vt-st)*et,(wt+gt)*nt)),ht.spot1=new go.Spot(.4,.25),ht.spot2=new go.Spot(.65,.75),ht}),go.Shape.defineFigureGenerator("XorGate",function(Tt,et,nt){var ht=new go.Geometry,st=.5,gt=Nt*st,vt=.2,wt=.5,Ft=new go.PathFigure(.1*et,0,!1);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,nt,.35*et,.25*nt,.35*et,.75*nt));var It=new go.PathFigure(.2*et,0,!0);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,(vt+gt)*et,(wt-st)*nt,.9*et,(wt-gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,nt,.9*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,.2*et,0,.45*et,.75*nt,.45*et,.25*nt).close()),ht.spot1=new go.Spot(.4,.25),ht.spot2=new go.Spot(.8,.75),ht}),go.Shape.defineFigureGenerator("Capacitor",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Move,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ht}),go.Shape.defineFigureGenerator("Resistor",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.5*nt,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.3*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.6*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.7*et,.5*nt)),ht}),go.Shape.defineFigureGenerator("Inductor",function(Tt,et,nt){var ht=new go.Geometry,st=Nt*.1,gt=.1,vt=.1,wt=.5,Ft=new go.PathFigure((vt-st*.5)*et,nt,!1);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,0,(vt-st)*et,nt,(vt-gt)*et,0)),vt=.3,Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,nt,(vt+gt)*et,0,(vt+st)*et,nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,0,(vt-st)*et,nt,(vt-gt)*et,0)),vt=.5,Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,nt,(vt+gt)*et,0,(vt+st)*et,nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,0,(vt-st)*et,nt,(vt-gt)*et,0)),vt=.7,Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,nt,(vt+gt)*et,0,(vt+st)*et,nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,0,(vt-st)*et,nt,(vt-gt)*et,0)),vt=.9,Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+st*.5)*et,nt,(vt+gt)*et,0,(vt+st)*et,nt)),ht}),go.Shape.defineFigureGenerator("ACvoltageSource",function(Tt,et,nt){var ht=new go.Geometry,st=Nt*.5,gt=.5,vt=.5,wt=.5,Ft=new go.PathFigure((vt-gt)*et,wt*nt,!1);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,wt*nt,(vt+st)*et,(wt-gt)*nt,(vt+gt)*et,(wt-st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,wt*nt,(vt-st)*et,(wt+gt)*nt,(vt-gt)*et,(wt+st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Move,(vt-gt+.1)*et,wt*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt-.1)*et,wt*nt,vt*et,(wt-gt)*nt,vt*et,(wt+gt)*nt)),ht}),go.Shape.defineFigureGenerator("DCvoltageSource",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.75*nt,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Move,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ht}),go.Shape.defineFigureGenerator("Diode",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et,0,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ht.spot1=new go.Spot(0,.25),ht.spot2=new go.Spot(.5,.75),ht}),go.Shape.defineFigureGenerator("Wifi",function(Tt,et,nt){var ht=new go.Geometry,st=et,gt=nt;et=et*.38,nt=nt*.6;var vt=Nt*.8,wt=.8,Ft=0,It=.5,At=(st-et)/2,Wt=(gt-nt)/2,re=new go.PathFigure(Ft*et+At,(It+wt)*nt+Wt,!0);ht.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-wt)*et+At,It*nt+Wt,(Ft-vt)*et+At,(It+wt)*nt+Wt,(Ft-wt)*et+At,(It+vt)*nt+Wt)),re.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+At,(It-wt)*nt+Wt,(Ft-wt)*et+At,(It-vt)*nt+Wt,(Ft-vt)*et+At,(It-wt)*nt+Wt)),re.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-wt+vt*.5)*et+At,It*nt+Wt,Ft*et+At,(It-wt)*nt+Wt,(Ft-wt+vt*.5)*et+At,(It-vt)*nt+Wt)),re.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+At,(It+wt)*nt+Wt,(Ft-wt+vt*.5)*et+At,(It+vt)*nt+Wt,Ft*et+At,(It+wt)*nt+Wt).close()),vt=Nt*.4,wt=.4,Ft=.2,It=.5;var ne=new go.PathFigure(Ft*et+At,(It+wt)*nt+Wt,!0);ht.add(ne),ne.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-wt)*et+At,It*nt+Wt,(Ft-vt)*et+At,(It+wt)*nt+Wt,(Ft-wt)*et+At,(It+vt)*nt+Wt)),ne.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+At,(It-wt)*nt+Wt,(Ft-wt)*et+At,(It-vt)*nt+Wt,(Ft-vt)*et+At,(It-wt)*nt+Wt)),ne.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-wt+vt*.5)*et+At,It*nt+Wt,Ft*et+At,(It-wt)*nt+Wt,(Ft-wt+vt*.5)*et+At,(It-vt)*nt+Wt)),ne.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+At,(It+wt)*nt+Wt,(Ft-wt+vt*.5)*et+At,(It+vt)*nt+Wt,Ft*et+At,(It+wt)*nt+Wt).close()),vt=Nt*.2,wt=.2,Ft=.5,It=.5;var me=new go.PathFigure((Ft-wt)*et+At,It*nt+Wt,!0);ht.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+At,(It-wt)*nt+Wt,(Ft-wt)*et+At,(It-vt)*nt+Wt,(Ft-vt)*et+At,(It-wt)*nt+Wt)),me.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+wt)*et+At,It*nt+Wt,(Ft+vt)*et+At,(It-wt)*nt+Wt,(Ft+wt)*et+At,(It-vt)*nt+Wt)),me.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+At,(It+wt)*nt+Wt,(Ft+wt)*et+At,(It+vt)*nt+Wt,(Ft+vt)*et+At,(It+wt)*nt+Wt)),me.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-wt)*et+At,It*nt+Wt,(Ft-vt)*et+At,(It+wt)*nt+Wt,(Ft-wt)*et+At,(It+vt)*nt+Wt)),vt=Nt*.4,wt=.4,Ft=.8,It=.5;var Vt=new go.PathFigure(Ft*et+At,(It-wt)*nt+Wt,!0);ht.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+wt)*et+At,It*nt+Wt,(Ft+vt)*et+At,(It-wt)*nt+Wt,(Ft+wt)*et+At,(It-vt)*nt+Wt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+At,(It+wt)*nt+Wt,(Ft+wt)*et+At,(It+vt)*nt+Wt,(Ft+vt)*et+At,(It+wt)*nt+Wt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+wt-vt*.5)*et+At,It*nt+Wt,Ft*et+At,(It+wt)*nt+Wt,(Ft+wt-vt*.5)*et+At,(It+vt)*nt+Wt)),Vt.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+At,(It-wt)*nt+Wt,(Ft+wt-vt*.5)*et+At,(It-vt)*nt+Wt,Ft*et+At,(It-wt)*nt+Wt).close()),vt=Nt*.8,wt=.8,Ft=1,It=.5;var Le=new go.PathFigure(Ft*et+At,(It-wt)*nt+Wt,!0);return ht.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+wt)*et+At,It*nt+Wt,(Ft+vt)*et+At,(It-wt)*nt+Wt,(Ft+wt)*et+At,(It-vt)*nt+Wt)),Le.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+At,(It+wt)*nt+Wt,(Ft+wt)*et+At,(It+vt)*nt+Wt,(Ft+vt)*et+At,(It+wt)*nt+Wt)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+wt-vt*.5)*et+At,It*nt+Wt,Ft*et+At,(It+wt)*nt+Wt,(Ft+wt-vt*.5)*et+At,(It+vt)*nt+Wt)),Le.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et+At,(It-wt)*nt+Wt,(Ft+wt-vt*.5)*et+At,(It-vt)*nt+Wt,Ft*et+At,(It-wt)*nt+Wt).close()),ht}),go.Shape.defineFigureGenerator("Email",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(0,0,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,0)),gt.add(new go.PathSegment(go.PathSegment.Move,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.54*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.54*nt)),ht}),go.Shape.defineFigureGenerator("Ethernet",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.35*et,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.65*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.65*et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.35*et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.35*et,0).close());var gt=new go.PathFigure(.1*et,nt,!0,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.1*et,nt).close());var vt=new go.PathFigure(.6*et,nt,!0,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.6*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.6*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.6*et,nt).close());var wt=new go.PathFigure(0,.5*nt,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,.5*et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.4*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,.75*et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.6*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,.25*et,.5*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.25*et,.6*nt)),ht}),go.Shape.defineFigureGenerator("Power",function(Tt,et,nt){var ht=new go.Geometry,st=Nt*.4,gt=.4,vt=.5,wt=.5,Ft=Ot(),It=Ot(),At=Ot(),Wt=Ot();Me(vt,wt-gt,vt+st,wt-gt,vt+gt,wt-st,vt+gt,wt,.5,Ft,Ft,It,At,Wt);var re=xt(It.x,It.y),ne=new go.PathFigure(It.x*et,It.y*nt,!0);ht.add(ne),ne.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,wt*nt,At.x*et,At.y*nt,Wt.x*et,Wt.y*nt)),ne.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt)),ne.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,wt*nt,(vt-st)*et,(wt+gt)*nt,(vt-gt)*et,(wt+st)*nt)),Me(vt-gt,wt,vt-gt,wt-st,vt-st,wt-gt,vt,wt-gt,.5,At,Wt,It,Ft,Ft),ne.add(new go.PathSegment(go.PathSegment.Bezier,It.x*et,It.y*nt,At.x*et,At.y*nt,Wt.x*et,Wt.y*nt)),st=Nt*.3,gt=.3,Me(vt-gt,wt,vt-gt,wt-st,vt-st,wt-gt,vt,wt-gt,.5,At,Wt,It,Ft,Ft),ne.add(new go.PathSegment(go.PathSegment.Line,It.x*et,It.y*nt)),ne.add(new go.PathSegment(go.PathSegment.Bezier,(vt-gt)*et,wt*nt,Wt.x*et,Wt.y*nt,At.x*et,At.y*nt)),ne.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+gt)*nt,(vt-gt)*et,(wt+st)*nt,(vt-st)*et,(wt+gt)*nt)),ne.add(new go.PathSegment(go.PathSegment.Bezier,(vt+gt)*et,wt*nt,(vt+st)*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),Me(vt,wt-gt,vt+st,wt-gt,vt+gt,wt-st,vt+gt,wt,.5,Ft,Ft,It,At,Wt),ne.add(new go.PathSegment(go.PathSegment.Bezier,It.x*et,It.y*nt,Wt.x*et,Wt.y*nt,At.x*et,At.y*nt).close());var ne=new go.PathFigure(.45*et,0,!0);return ht.add(ne),ne.add(new go.PathSegment(go.PathSegment.Line,.45*et,.5*nt)),ne.add(new go.PathSegment(go.PathSegment.Line,.55*et,.5*nt)),ne.add(new go.PathSegment(go.PathSegment.Line,.55*et,0).close()),jt(Ft),jt(It),jt(At),jt(Wt),jt(re),ht.spot1=new go.Spot(.25,.45),ht.spot2=new go.Spot(.75,.8),ht}),go.Shape.defineFigureGenerator("Fallout",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,nt/2,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Arc,180,360,et/2,nt/2,et/2,nt/2));function gt(vt,wt,Ft){vt.add(new go.PathSegment(go.PathSegment.Move,(.3+wt)*et,(.8+Ft)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,(.5+wt)*et,(.5+Ft)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,(.1+wt)*et,(.5+Ft)*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,(.3+wt)*et,(.8+Ft)*nt).close())}return gt(st,0,0),gt(st,.4,0),gt(st,.2,-.3),ht}),go.Shape.defineFigureGenerator("IrritationHazard",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.2*et,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.3*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.7*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.3*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt).close()),ht.spot1=new go.Spot(.3,.3),ht.spot2=new go.Spot(.7,.7),ht}),go.Shape.defineFigureGenerator("ElectricalHazard",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.37*et,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.11*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.77*et,.04*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.33*et,.49*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.37*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.63*et,.86*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.77*et,.91*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.34*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.34*et,.78*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.44*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.65*et,.56*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.68*nt).close()),ht}),go.Shape.defineFigureGenerator("FireHazard",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.1*et,nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Bezier,.29*et,0,-.25*et,.63*nt,.45*et,.44*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.51*et,.42*nt,.48*et,.17*nt,.54*et,.35*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.59*et,.18*nt,.59*et,.29*nt,.58*et,.28*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.75*et,.6*nt,.8*et,.34*nt,.88*et,.43*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.88*et,.31*nt,.87*et,.48*nt,.88*et,.43*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,nt,1.17*et,.76*nt,.82*et,.8*nt).close()),ht.spot1=new go.Spot(.07,.445),ht.spot2=new go.Spot(.884,.958),ht}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(Tt,et,nt){var ht=new go.Geometry,st=.5,gt=0,vt=0,wt=st*Nt,Ft=.4*Math.SQRT2/2+.5,It=.5-.5*Math.SQRT2/2,At=1,Wt=.5,re=.5,ne=0,me=new go.PathFigure(Ft*et,(1-It)*nt,!1);return ht.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,At*et,Wt*nt,At*et,.7*nt,At*et,Wt*nt)),me.add(new go.PathSegment(go.PathSegment.Bezier,(re+gt)*et,(ne+gt)*nt,(.5+st+gt)*et,(.5-wt+gt)*nt,(.5+wt+gt)*et,(.5-st+gt)*nt)),me.add(new go.PathSegment(go.PathSegment.Bezier,(.5-st+gt)*et,(.5+vt)*nt,(.5-wt+gt)*et,(.5-st+vt)*nt,(.5-st+gt)*et,(.5-wt+vt)*nt)),me.add(new go.PathSegment(go.PathSegment.Bezier,(.35+gt)*et,.9*nt,(.5-st+gt)*et,(.5+wt+vt)*nt,(.5-wt+gt)*et,.9*nt)),me.add(new go.PathSegment(go.PathSegment.Move,(.25+gt)*et,.8*nt)),me.add(new go.PathSegment(go.PathSegment.Line,(.35+gt)*et,.9*nt)),me.add(new go.PathSegment(go.PathSegment.Line,(.2+gt)*et,.95*nt)),ht}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Move,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Move,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ht}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Move,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),ht}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!1);ht.add(st);var gt=new go.PathFigure(et,nt,!1);ht.add(gt);var vt=new go.PathFigure(0,.5*nt,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.5*nt,.2*et,.35*nt,.3*et,.35*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,.7*et,.65*nt,.8*et,.65*nt)),ht}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.5*nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt).close()),ht}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.2*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt).close());var st=new go.PathFigure(0,.2*nt,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),ht}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.7*et,nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.3*et,nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,0,.6*et,.5*nt,0,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.7*et,0)),st.add(new go.PathSegment(go.PathSegment.Bezier,.7*et,nt,.4*et,.5*nt,et,.5*nt).close());var gt=new go.PathFigure(.45*et,.73*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.73*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.38*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.63*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.31*et,.27*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.56*et,.27*nt)),ht}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!1);ht.add(st);var gt=new go.PathFigure(.335*et,(1-.555)*nt,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.335*et,(1-.405)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.405)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.555)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,et,.68*nt,(1-.12)*et,.46*nt,(1-.02)*et,.54*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.68*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.335*et,(1-.555)*nt,.02*et,.54*nt,.12*et,.46*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.365*et,(1-.595)*nt));var vt=.5-.285,wt=.5,Ft=vt,It=Math.PI/4,At=4*(1-Math.cos(It))/(3*Math.sin(It)),Wt=At*.5,re=vt,ne=vt,me=At*re,Vt=At*ne;gt.add(new go.PathSegment(go.PathSegment.Bezier,(wt-re)*et,Ft*nt,(wt-(me+re)/2)*et,(Ft+(ne+Vt)/2)*nt,(wt-re)*et,(Ft+Vt)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,wt*et,(Ft-ne)*nt,(wt-re)*et,(Ft-Vt)*nt,(wt-me)*et,(Ft-ne)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(wt+re)*et,Ft*nt,(wt+me)*et,(Ft-ne)*nt,(wt+re)*et,(Ft-Vt)*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*et,(1-.595)*nt,(wt+re)*et,(Ft+Vt)*nt,(wt+(me+re)/2)*et,(Ft+(ne+Vt)/2)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*et,(1-.595)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.555)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*et,(1-.405)*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.335*et,(1-.405)*nt));var Le=new go.PathFigure(.2*et,nt,!1);ht.add(Le),Le.add(new go.PathSegment(go.PathSegment.Line,.2*et,.8*nt));var he=new go.PathFigure(.8*et,nt,!1);return ht.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.8*et,.8*nt)),ht}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.1*et,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.9*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,nt).close());var gt=new go.PathFigure(.2*et,.2*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.8*nt)),ht}),go.Shape.defineFigureGenerator("BpmnEventError",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.33*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.66*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.66*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.33*et,.5*nt).close()),ht}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!1);ht.add(st);var gt=new go.PathFigure(et,nt,!1);ht.add(gt);var vt=new go.PathFigure(.1*et,nt,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),vt.add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt).close()),ht}),go.Shape.defineFigureGenerator("Caution",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.05*et,nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,.8*nt,0,nt,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.45*et,.1*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.55*et,.1*nt,.5*et,0,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.95*et,.9*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,nt,et,nt,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.05*et,nt));var gt=.05;return st.add(new go.PathSegment(go.PathSegment.Move,(.5-gt)*et,.875*nt)),st.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*et,.875*nt,gt*et,gt*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.5*et,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.325*nt,.575*et,.725*nt,.625*et,.375*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.75*nt,.375*et,.375*nt,.425*et,.725*nt)),ht}),go.Shape.defineFigureGenerator("Recycle",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.45*et,.95*nt,!1);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,.95*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.185*et,.85*nt,.17*et,.95*nt,.15*et,.9*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.235*et,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.3*et,.625*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.35*et,.65*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.275*et,.45*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.05*et,.45*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.05*et,.575*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.1875*et,.95*nt,0,.675*nt,0,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.45*et,.95*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.45*et,.775*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.22*et,.775*nt));var gt=new go.PathFigure(.475*et,.2*nt,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.225*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.275*et,.175*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.325*et,.05*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,.05*nt,.35*et,0,.375*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.575*et,.375*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.525*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.75*et,.475*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.315*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.32*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.05*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.575*et,0,.65*et,.05*nt,.625*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.38*et,.0105*nt));var vt=new go.PathFigure(.675*et,.575*nt,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.875*et,.525*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,.775*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,.85*et,.95*nt,et,.8*nt,et,.85*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.95*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.65*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.85*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.725*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.775*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.7*et,.775*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,et,.775*nt)),vt.add(new go.PathSegment(go.PathSegment.Move,.675*et,.575*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.775*et,.775*nt)),ht}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(Tt,et,nt){var ht=new go.Geometry,st=.5,gt=Nt*.5,vt=new go.PathFigure(et,st*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Bezier,st*et,nt,et,(st+gt)*nt,(st+gt)*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,st*nt,(st-gt)*et,nt,0,(st+gt)*nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,st*et,0,0,(st-gt)*nt,(st-gt)*et,0)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et,st*nt,(st+gt)*et,0,et,(st-gt)*nt));var wt=new go.PathFigure(st*et,0,!1);return ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,st*et,.15*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,st*et,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,st*et,.85*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,0,st*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.15*et,st*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,et,st*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.85*et,st*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,st*et,st*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.58*et,.1*nt)),wt.add(new go.PathSegment(go.PathSegment.Move,st*et,st*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.78*et,.54*nt)),ht}),go.Shape.defineFigureGenerator("Package",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.15*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,.15*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt).close());var gt=new go.PathFigure(0,.15*nt,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.65*et,.15*nt).close()),ht.spot1=new go.Spot(0,.1),ht.spot2=new go.Spot(1,1),ht}),go.Shape.defineFigureGenerator("Class",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(0,.2*nt,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt).close());var vt=new go.PathFigure(0,.5*nt,!1);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt).close()),ht}),go.Shape.defineFigureGenerator("Component",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et,nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.15*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.15*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt).close());var gt=new go.PathFigure(0,.2*nt,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.2*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.2*nt).close());var vt=new go.PathFigure(0,.6*nt,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.6*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.45*et,.8*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,.6*nt).close()),ht}),go.Shape.defineFigureGenerator("Boat Shipment",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.15*et,.6*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.15*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.15*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.85*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.85*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.15*et,.6*nt));var gt=new go.PathFigure(.15*et,.6*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.85*et,.6*nt)),ht}),go.Shape.defineFigureGenerator("Customer/Supplier",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et,nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.66*et,.33*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.66*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.33*et,.33*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.33*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,0,.33*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt).close()),ht}),go.Shape.defineFigureGenerator("Workcell",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.65*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.65*et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.35*et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.35*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),ht}),go.Shape.defineFigureGenerator("Supermarket",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.33*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.33*nt)),st.add(new go.PathSegment(go.PathSegment.Move,et,.33*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.66*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.66*nt)),st.add(new go.PathSegment(go.PathSegment.Move,et,.66*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),ht}),go.Shape.defineFigureGenerator("TruckShipment",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.6*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.6*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(et,.8*nt,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*et,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt).close());var vt=.1,wt=Nt*.1,Ft=.2,It=.9,At=new go.PathFigure((Ft-vt)*et,It*nt,!0);ht.add(At),At.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It-vt)*nt,(Ft-vt)*et,(It-wt)*nt,(Ft-wt)*et,(It-vt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+vt)*et,It*nt,(Ft+wt)*et,(It-vt)*nt,(Ft+vt)*et,(It-wt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It+vt)*nt,(Ft+vt)*et,(It+wt)*nt,(Ft+wt)*et,(It+vt)*nt)),At.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-vt)*et,It*nt,(Ft-wt)*et,(It+vt)*nt,(Ft-vt)*et,(It+wt)*nt).close()),vt=.1,wt=Nt*.1,Ft=.8,It=.9;var Wt=new go.PathFigure((Ft-vt)*et,It*nt,!0);return ht.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It-vt)*nt,(Ft-vt)*et,(It-wt)*nt,(Ft-wt)*et,(It-vt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(Ft+vt)*et,It*nt,(Ft+wt)*et,(It-vt)*nt,(Ft+vt)*et,(It-wt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,Ft*et,(It+vt)*nt,(Ft+vt)*et,(It+wt)*nt,(Ft+wt)*et,(It+vt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(Ft-vt)*et,It*nt,(Ft-wt)*et,(It+vt)*nt,(Ft-vt)*et,(It+wt)*nt).close()),ht}),go.Shape.defineFigureGenerator("KanbanPost",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.2*et,0,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,0)),st.add(new go.PathSegment(go.PathSegment.Move,.5*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,nt)),st.add(new go.PathSegment(go.PathSegment.Move,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,nt)),ht}),go.Shape.defineFigureGenerator("Forklift",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,0,0));var gt=new go.PathFigure(0,.5*nt,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.8*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt));var vt=new go.PathFigure(.5*et,.8*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.1*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.1*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.8*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.5*et,.8*nt));var wt=new go.PathFigure(.5*et,.7*nt,!1);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et,.7*nt));var Ft=.1,It=Nt*.1,At=.1,Wt=.9,re=new go.PathFigure((At-Ft)*et,Wt*nt,!0);ht.add(re),re.add(new go.PathSegment(go.PathSegment.Bezier,At*et,(Wt-Ft)*nt,(At-Ft)*et,(Wt-It)*nt,(At-It)*et,(Wt-Ft)*nt)),re.add(new go.PathSegment(go.PathSegment.Bezier,(At+Ft)*et,Wt*nt,(At+It)*et,(Wt-Ft)*nt,(At+Ft)*et,(Wt-It)*nt)),re.add(new go.PathSegment(go.PathSegment.Bezier,At*et,(Wt+Ft)*nt,(At+Ft)*et,(Wt+It)*nt,(At+It)*et,(Wt+Ft)*nt)),re.add(new go.PathSegment(go.PathSegment.Bezier,(At-Ft)*et,Wt*nt,(At-It)*et,(Wt+Ft)*nt,(At-Ft)*et,(Wt+It)*nt)),Ft=.1,It=Nt*.1,At=.4,Wt=.9;var ne=new go.PathFigure((At-Ft)*et,Wt*nt,!0);return ht.add(ne),ne.add(new go.PathSegment(go.PathSegment.Bezier,At*et,(Wt-Ft)*nt,(At-Ft)*et,(Wt-It)*nt,(At-It)*et,(Wt-Ft)*nt)),ne.add(new go.PathSegment(go.PathSegment.Bezier,(At+Ft)*et,Wt*nt,(At+It)*et,(Wt-Ft)*nt,(At+Ft)*et,(Wt-It)*nt)),ne.add(new go.PathSegment(go.PathSegment.Bezier,At*et,(Wt+Ft)*nt,(At+Ft)*et,(Wt+It)*nt,(At+It)*et,(Wt+Ft)*nt)),ne.add(new go.PathSegment(go.PathSegment.Bezier,(At-Ft)*et,Wt*nt,(At-It)*et,(Wt+Ft)*nt,(At-Ft)*et,(Wt+It)*nt)),ht}),go.Shape.defineFigureGenerator("RailShipment",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.1*et,.4*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.45*et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.45*et,.9*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,.9*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,.4*nt).close());var gt=new go.PathFigure(.45*et,.7*nt,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.7*nt));var vt=new go.PathFigure(.55*et,.4*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.9*et,.9*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.9*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.55*et,.4*nt).close());var At=.05,Wt=Nt*.05,re=.175,ne=.95,wt=new go.PathFigure((re-At)*et,ne*nt,!0);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Bezier,re*et,(ne-At)*nt,(re-At)*et,(ne-Wt)*nt,(re-Wt)*et,(ne-At)*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,(re+At)*et,ne*nt,(re+Wt)*et,(ne-At)*nt,(re+At)*et,(ne-Wt)*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,re*et,(ne+At)*nt,(re+At)*et,(ne+Wt)*nt,(re+Wt)*et,(ne+At)*nt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,(re-At)*et,ne*nt,(re-Wt)*et,(ne+At)*nt,(re-At)*et,(ne+Wt)*nt));var At=.05,Wt=Nt*.05,re=.375,ne=.95,Ft=new go.PathFigure((re-At)*et,ne*nt,!0);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,re*et,(ne-At)*nt,(re-At)*et,(ne-Wt)*nt,(re-Wt)*et,(ne-At)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(re+At)*et,ne*nt,(re+Wt)*et,(ne-At)*nt,(re+At)*et,(ne-Wt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,re*et,(ne+At)*nt,(re+At)*et,(ne+Wt)*nt,(re+Wt)*et,(ne+At)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(re-At)*et,ne*nt,(re-Wt)*et,(ne+At)*nt,(re-At)*et,(ne+Wt)*nt));var At=.05,Wt=Nt*.05,re=.625,ne=.95,It=new go.PathFigure((re-At)*et,ne*nt,!0);ht.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,re*et,(ne-At)*nt,(re-At)*et,(ne-Wt)*nt,(re-Wt)*et,(ne-At)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(re+At)*et,ne*nt,(re+Wt)*et,(ne-At)*nt,(re+At)*et,(ne-Wt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,re*et,(ne+At)*nt,(re+At)*et,(ne+Wt)*nt,(re+Wt)*et,(ne+At)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(re-At)*et,ne*nt,(re-Wt)*et,(ne+At)*nt,(re-At)*et,(ne+Wt)*nt));var At=.05,Wt=Nt*.05,re=.825,ne=.95,me=new go.PathFigure((re-At)*et,ne*nt,!0);ht.add(me),me.add(new go.PathSegment(go.PathSegment.Bezier,re*et,(ne-At)*nt,(re-At)*et,(ne-Wt)*nt,(re-Wt)*et,(ne-At)*nt)),me.add(new go.PathSegment(go.PathSegment.Bezier,(re+At)*et,ne*nt,(re+Wt)*et,(ne-At)*nt,(re+At)*et,(ne-Wt)*nt)),me.add(new go.PathSegment(go.PathSegment.Bezier,re*et,(ne+At)*nt,(re+At)*et,(ne+Wt)*nt,(re+Wt)*et,(ne+At)*nt)),me.add(new go.PathSegment(go.PathSegment.Bezier,(re-At)*et,ne*nt,(re-Wt)*et,(ne+At)*nt,(re-At)*et,(ne+Wt)*nt).close());var Vt=new go.PathFigure(0,nt,!1);return ht.add(Vt),Vt.add(new go.PathSegment(go.PathSegment.Line,et,nt).close()),ht}),go.Shape.defineFigureGenerator("Warehouse",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var gt=new go.PathFigure(0,.2*nt,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt).close());var vt=new go.PathFigure(.15*et,nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.15*et,.5*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.4*et,.5*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.4*et,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.15*et,nt).close());var wt=.05,Ft=Nt*.05,It=.35,At=.775,Wt=new go.PathFigure((It-wt)*et,At*nt,!0);return ht.add(Wt),Wt.add(new go.PathSegment(go.PathSegment.Bezier,It*et,(At-wt)*nt,(It-wt)*et,(At-Ft)*nt,(It-Ft)*et,(At-wt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(It+wt)*et,At*nt,(It+Ft)*et,(At-wt)*nt,(It+wt)*et,(At-Ft)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,It*et,(At+wt)*nt,(It+wt)*et,(At+Ft)*nt,(It+Ft)*et,(At+wt)*nt)),Wt.add(new go.PathSegment(go.PathSegment.Bezier,(It-wt)*et,At*nt,(It-Ft)*et,(At+wt)*nt,(It-wt)*et,(At+Ft)*nt).close()),ht}),go.Shape.defineFigureGenerator("ControlCenter",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.9*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Move,.1*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt).close()),ht}),go.Shape.defineFigureGenerator("Bluetooth",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.75*nt,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.25*nt)),ht}),go.Shape.defineFigureGenerator("Bookmark",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,0,0)),st.add(new go.PathSegment(go.PathSegment.Move,.2*et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.2*et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,.4*nt)),ht}),go.Shape.defineFigureGenerator("Bookmark",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),st.add(new go.PathSegment(go.PathSegment.Line,0,0)),st.add(new go.PathSegment(go.PathSegment.Move,.2*et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.2*et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.8*et,.4*nt)),ht}),go.Shape.defineFigureGenerator("Globe",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.5*et,0,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Move,0,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.5*et,0)),st.add(new go.PathSegment(go.PathSegment.Bezier,et,.5*nt,.75*et,0,et,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,et,.75*nt,.75*et,nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,.25*et,nt,0,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,0,.25*nt,.25*et,0)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,nt,.15*et,.25*nt,.15*et,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,.85*et,.75*nt,.85*et,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.1675*et,.15*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.8325*et,.15*nt,.35*et,.3*nt,.65*et,.3*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.1675*et,.85*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.8325*et,.85*nt,.35*et,.7*nt,.65*et,.7*nt)),ht}),go.Shape.defineFigureGenerator("Wave",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.25*nt,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.25*nt,.1*et,0,.2*et,0)),st.add(new go.PathSegment(go.PathSegment.Bezier,.7*et,.25*nt,.425*et,.5*nt,.575*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,et,.25*nt,.8*et,0,.9*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Move,0,.25*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.75*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.75*nt,.1*et,.5*nt,.2*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.7*et,.75*nt,.425*et,nt,.575*et,nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,et,.75*nt,.8*et,.5*nt,.9*et,.5*nt)),ht}),go.Shape.defineFigureGenerator("Operator",function(Tt,et,nt){var ht=new go.Geometry,st=.3,gt=Nt*.3,vt=.5,wt=.7,Ft=new go.PathFigure((vt-st)*et,wt*nt,!0);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+st)*et,wt*nt,(vt+gt)*et,(wt-st)*nt,(vt+st)*et,(wt-gt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt-st)*et,wt*nt,(vt-gt)*et,(wt+st)*nt,(vt-st)*et,(wt+gt)*nt));var It=new go.PathFigure(0,.7*nt,!1);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,et,.7*nt,0,0,et,0)),ht}),go.Shape.defineFigureGenerator("TripleFanBlades",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.5*et,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.65*nt,.65*et,.3*nt,.65*et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,.35*et,.5*nt,.35*et,.3*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.5*et,.65*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,nt,.3*et,.6*nt,.1*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.65*nt,.2*et,nt,.35*et,.95*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.5*et,.65*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,et,nt,.7*et,.6*nt,.9*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.65*nt,.8*et,nt,.65*et,.95*nt)),ht}),go.Shape.defineFigureGenerator("CentrifugalPump",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et,0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,0,.075*nt,0,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.4*et,nt,0,nt,.4*et,nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.4*nt,.8*et,nt,.85*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,0)),ht}),go.Shape.defineFigureGenerator("Battery",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,.1*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.1*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Move,.4*et,.1*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.4*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.6*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.6*et,.1*nt));var gt=new go.PathFigure(0,.6*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Move,0,.4*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,et,.4*nt)),ht}),go.Shape.defineFigureGenerator("Delete",function(Tt,et,nt){var ht=new go.Geometry,st=.5,gt=Nt*.5,vt=.5,wt=.5,Ft=new go.PathFigure((vt-st)*et,wt*nt,!0);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+st)*et,wt*nt,(vt+gt)*et,(wt-st)*nt,(vt+st)*et,(wt-gt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt-st)*et,wt*nt,(vt-gt)*et,(wt+st)*nt,(vt-st)*et,(wt+gt)*nt));var It=new go.PathFigure(.15*et,.5*nt,!1);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Line,.85*et,.5*nt)),ht}),go.Shape.defineFigureGenerator("Flag",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.1*nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Move,0,.1*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.1*nt,.15*et,0,.35*et,0)),st.add(new go.PathSegment(go.PathSegment.Bezier,et,.1*nt,.65*et,.2*nt,.85*et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.5*nt,.85*et,.6*nt,.65*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*nt,.35*et,.4*nt,.15*et,.4*nt).close()),ht}),go.Shape.defineFigureGenerator("Help",function(Tt,et,nt){var ht=new go.Geometry,st=.5,gt=Nt*.5,vt=.5,wt=.5,Ft=new go.PathFigure((vt-st)*et,wt*nt,!1);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt+st)*et,wt*nt,(vt+gt)*et,(wt-st)*nt,(vt+st)*et,(wt-gt)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),Ft.add(new go.PathSegment(go.PathSegment.Bezier,(vt-st)*et,wt*nt,(vt-gt)*et,(wt+st)*nt,(vt-st)*et,(wt+gt)*nt).close()),st=.05,gt=Nt*.05,vt=.5,wt=.8;var It=new go.PathFigure((vt-st)*et,wt*nt,!1);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt-st)*nt,(vt-st)*et,(wt-gt)*nt,(vt-gt)*et,(wt-st)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(vt+st)*et,wt*nt,(vt+gt)*et,(wt-st)*nt,(vt+st)*et,(wt-gt)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,vt*et,(wt+st)*nt,(vt+st)*et,(wt+gt)*nt,(vt+gt)*et,(wt+st)*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,(vt-st)*et,wt*nt,(vt-gt)*et,(wt+st)*nt,(vt-st)*et,(wt+gt)*nt).close()),It.add(new go.PathSegment(go.PathSegment.Move,.5*et,.7*nt)),It.add(new go.PathSegment(go.PathSegment.Line,.5*et,.5*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,.5*et,.2*nt,.75*et,.475*nt,.75*et,.225*nt)),It.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.35*nt,.4*et,.2*nt,.3*et,.25*nt)),ht}),go.Shape.defineFigureGenerator("Location",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(.5*et,nt,!0).add(new go.PathSegment(go.PathSegment.Line,.75*et,.5*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5*et,0,.975*et,.025*nt,.5*et,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*et,.5*nt,.5*et,0,.025*et,.025*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.5*et,.2*nt)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*et,.3*nt,.1*et,.1*nt).close()))}),go.Shape.defineFigureGenerator("Lock",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.5*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt));var gt=new go.PathFigure(.2*et,.5*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.3*nt,.25*et,0,.75*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.3*nt)),ht}),go.Shape.defineFigureGenerator("Unlocked",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.5*nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,.5*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.5*nt));var gt=new go.PathFigure(.2*et,.5*nt,!1);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Move,.2*et,.5*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.2*et,.3*nt)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.8*et,.3*nt,.25*et,0,.75*et,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*et,.35*nt)),ht}),go.Shape.defineFigureGenerator("Gear",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(.9375*et,.56246875*nt,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*et,.4375*nt)).add(new go.PathSegment(go.PathSegment.Line,.80621875*et,.4375*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.763*et,.3316875*nt,.79840625*et,.39915625*nt,.7834375*et,.3635*nt)).add(new go.PathSegment(go.PathSegment.Line,.8566875*et,.23796875*nt)).add(new go.PathSegment(go.PathSegment.Line,.76825*et,.14959375*nt)).add(new go.PathSegment(go.PathSegment.Line,.67596875*et,.24184375*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*et,.19378125*nt,.64228125*et,.2188125*nt,.603875*et,.2021875*nt)).add(new go.PathSegment(go.PathSegment.Line,.5625*et,.0625*nt)).add(new go.PathSegment(go.PathSegment.Line,.4375*et,.0625*nt)).add(new go.PathSegment(go.PathSegment.Line,.4375*et,.19378125*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*et,.239375*nt,.39759375*et,.20190625*nt,.36053125*et,.2176875*nt)).add(new go.PathSegment(go.PathSegment.Line,.2379375*et,.14959375*nt)).add(new go.PathSegment(go.PathSegment.Line,.14953125*et,.2379375*nt)).add(new go.PathSegment(go.PathSegment.Line,.23934375*et,.3278125*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*et,.4375*nt,.21765625*et,.36059375*nt,.201875*et,.397625*nt)).add(new go.PathSegment(go.PathSegment.Line,.0625*et,.4375*nt)).add(new go.PathSegment(go.PathSegment.Line,.0625*et,.5625*nt)).add(new go.PathSegment(go.PathSegment.Line,.1938125*et,.5625*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*et,.67596875*nt,.20221875*et,.603875*nt,.21884375*et,.64228125*nt)).add(new go.PathSegment(go.PathSegment.Line,.1495625*et,.76825*nt)).add(new go.PathSegment(go.PathSegment.Line,.238*et,.8566875*nt)).add(new go.PathSegment(go.PathSegment.Line,.3316875*et,.76296875*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*et,.80621875*nt,.36353125*et,.78340625*nt,.3991875*et,.79840625*nt)).add(new go.PathSegment(go.PathSegment.Line,.43753125*et,.9375*nt)).add(new go.PathSegment(go.PathSegment.Line,.5625*et,.9375*nt)).add(new go.PathSegment(go.PathSegment.Line,.5625*et,.80621875*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*et,.760625*nt,.602375*et,.79809375*nt,.63946875*et,.78234375*nt)).add(new go.PathSegment(go.PathSegment.Line,.76828125*et,.8566875*nt)).add(new go.PathSegment(go.PathSegment.Line,.85671875*et,.76825*nt)).add(new go.PathSegment(go.PathSegment.Line,.76065625*et,.67221875*nt)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*et,.56246875*nt,.78234375*et,.63940625*nt,.798125*et,.602375*nt)).add(new go.PathSegment(go.PathSegment.Line,.9375*et,.56246875*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.5*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*et,.5*nt,.1*et,.1*nt).close()))}),go.Shape.defineFigureGenerator("Hand",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.5*nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Bezier,.1*et,.3*nt,0,.375*nt,.05*et,.325*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.45*et,.075*nt,.3*et,.225*nt,.4*et,.175*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.525*et,.075*nt,.46*et,.05*nt,.525*et,.05*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.3*et,.4*nt,.525*et,.275*nt,.475*et,.325*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,.55*nt,et,.4*nt,et,.55*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.425*et,.55*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.6*et,.55*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.6*et,.7*nt,.675*et,.55*nt,.675*et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.4*et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.575*et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.575*et,.85*nt,.65*et,.7*nt,.65*et,.85*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.4*et,.85*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.525*et,.85*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.535*et,nt,.61*et,.85*nt,.61*et,nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*nt,.435*et,nt,0,nt).close()),ht}),go.Shape.defineFigureGenerator("Map",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,.2*nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.25*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,.25*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt).close()),st.add(new go.PathSegment(go.PathSegment.Move,.25*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.25*et,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Move,.5*et,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt)),st.add(new go.PathSegment(go.PathSegment.Move,.75*et,0)),st.add(new go.PathSegment(go.PathSegment.Line,.75*et,.8*nt)),ht}),go.Shape.defineFigureGenerator("Eject",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,nt,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et,nt)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt*.7)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt*.7).close());var gt=new go.PathFigure(0,nt*.6,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et,.6*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*et,0).close()),ht}),go.Shape.defineFigureGenerator("Pencil",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*et,.1*nt)).add(new go.PathSegment(go.PathSegment.Line,et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.9*et,nt)).add(new go.PathSegment(go.PathSegment.Line,.1*et,.2*nt).close()))}),go.Shape.defineFigureGenerator("Building",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*1,nt*1,!1);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt*.85)),st.add(new go.PathSegment(go.PathSegment.Line,.046*et,nt*.85)),st.add(new go.PathSegment(go.PathSegment.Line,.046*et,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt*.3)),st.add(new go.PathSegment(go.PathSegment.Line,.046*et,nt*.3)),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*et,nt*.3)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt*.3)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*et,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*et,nt*.85)),st.add(new go.PathSegment(go.PathSegment.Line,et,nt*.85).close());var gt=new go.PathFigure(.126*et,.85*nt,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.126*et,.45*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.322*et,.45*nt)),gt.add(new go.PathSegment(go.PathSegment.Line,.322*et,.85*nt).close());var vt=new go.PathFigure(.402*et,.85*nt,!1);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,.402*et,.45*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.598*et,.45*nt)),vt.add(new go.PathSegment(go.PathSegment.Line,.598*et,.85*nt).close());var wt=new go.PathFigure(.678*et,.85*nt,!1);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,.678*et,.45*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.874*et,.45*nt)),wt.add(new go.PathSegment(go.PathSegment.Line,.874*et,.85*nt).close());var Ft=new go.PathFigure(.5*et,.1*nt,!1);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*et,.3*nt)),Ft.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*et,.3*nt).close()),ht}),go.Shape.defineFigureGenerator("Staircase",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,nt*1,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*.8)),st.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.8)),st.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.6)),st.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.6)),st.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.4)),st.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*.4)),st.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*.2)),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.2)),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.15)),st.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.15)),st.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.35)),st.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.35)),st.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.55)),st.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.55)),st.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.15,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.15,nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt*.95).close()),ht}),go.Shape.defineFigureGenerator("5Bars",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,nt*1,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et*.184,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.184,nt*(1-.184)).close());var gt=new go.PathFigure(et*.204,nt,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.204,nt*(1-.184))),gt.add(new go.PathSegment(go.PathSegment.Line,et*.388,nt*(1-.184*2))),gt.add(new go.PathSegment(go.PathSegment.Line,et*.388,nt*1).close());var vt=new go.PathFigure(et*.408,nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et*.408,nt*(1-.184*2))),vt.add(new go.PathSegment(go.PathSegment.Line,et*.592,nt*(1-.184*3))),vt.add(new go.PathSegment(go.PathSegment.Line,et*.592,nt*1).close());var wt=new go.PathFigure(et*.612,nt,!0);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et*.612,nt*(1-.184*3))),wt.add(new go.PathSegment(go.PathSegment.Line,et*.796,nt*(1-.184*4))),wt.add(new go.PathSegment(go.PathSegment.Line,et*.796,nt*1).close());var Ft=new go.PathFigure(et*.816,nt,!0);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Line,et*.816,nt*(1-.184*4))),Ft.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-.184*5))),Ft.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1).close()),ht}),go.Shape.defineFigureGenerator("PC",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,0,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.3,0).close());var gt=new go.PathFigure(et*.055,.07*nt,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.07)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.055,nt*.1).close());var vt=new go.PathFigure(et*.055,.13*nt,!0);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.13)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.16)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.055,nt*.16).close());var wt=new go.PathFigure(et*.055,.18*nt,!0);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.18)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.245,nt*.21)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.055,nt*.21).close());var Ft=new go.PathFigure(et*1,0,!0);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Line,et*.4,0)),Ft.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.65)),Ft.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.65).close()),ht}),go.Shape.defineFigureGenerator("Plane",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(.55*et,nt,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.4*et,.7*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.1*et,.475*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.35*et,.525*nt,0,.4*nt,.225*et,.45*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.4*et,.475*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.15*et,.35*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.2*et,.325*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.6*et,.325*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.85*et,.1*nt)),st.add(new go.PathSegment(go.PathSegment.Bezier,.9*et,.2*nt,.975*et,0,et,.08*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.7*et,.45*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.6*et,.95*nt)),st.add(new go.PathSegment(go.PathSegment.Line,.55*et,nt).close()),ht}),go.Shape.defineFigureGenerator("Key",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*1,nt*.5,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et*.9,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.5,.4*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.5,.35*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.45,.35*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.3,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.15,.2*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.35*nt)),st.add(new go.PathSegment(go.PathSegment.Line,0,.65*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.15,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.3,.8*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.45,.65*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.5,.65*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.5,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.6,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.65,.55*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.7,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.75,.55*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.8,.6*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.85,.575*nt)),st.add(new go.PathSegment(go.PathSegment.Line,et*.9,.6*nt).close()),st.add(new go.PathSegment(go.PathSegment.Move,.17*et,.425*nt)),st.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*et,.5*nt,.075*et,.075*nt).close()),ht}),go.Shape.defineFigureGenerator("FilmTape",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(0,0,!1);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Arc,270,180,et*0,et*.3,et*.055)),st.add(new go.PathSegment(go.PathSegment.Line,0,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.08,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.08,nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*1),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*1),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*2),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*2),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*3),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*3),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*4),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*4),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*5),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*5),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*6),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*6),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*7),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*7),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*8),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*8),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*9),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*9),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*10),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*10),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*11),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*11),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*12),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*12),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*13),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*13),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*14),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*14),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*15),nt*.95)),st.add(new go.PathSegment(go.PathSegment.Line,et*(.08+.056*15),nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1));var gt=new go.PathFigure(0,0,!1);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*0)),gt.add(new go.PathSegment(go.PathSegment.Arc,270,-180,et*1,et*.3,et*.055)),gt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1));var vt=new go.PathFigure(et*.11,nt*.1,!1);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*1+.028*0),nt*.1)),vt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*1+.028*0),nt*.8)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.11,nt*.8).close());var wt=new go.PathFigure(et*(.11+.24133333*1+.028*1),nt*.1,!1);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*1),nt*.1)),wt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*1),nt*.8)),wt.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*1+.028*1),nt*.8).close());var Ft=new go.PathFigure(et*(.11+.24133333*2+.028*2),nt*.1,!1);return ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*3+.028*2),nt*.1)),Ft.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*3+.028*2),nt*.8)),Ft.add(new go.PathSegment(go.PathSegment.Line,et*(.11+.24133333*2+.028*2),nt*.8).close()),ht}),go.Shape.defineFigureGenerator("FloppyDisk",function(Tt,et,nt){var ht=new go.Geometry,st=8,gt=st*Nt,vt=new go.PathFigure(st,0,!1);ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et*.86,0)),vt.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.14)),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt-st)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et-st,nt,et,nt-gt,et-gt,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,st,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-st,gt,nt,0,nt-gt)),vt.add(new go.PathSegment(go.PathSegment.Line,0,st)),vt.add(new go.PathSegment(go.PathSegment.Bezier,st,0,0,gt,gt,0).close());var wt=new go.PathFigure(et*.83,0,!1);ht.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et*.83,nt*.3)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*.3)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*0).close());var Ft=new go.PathFigure(et*.83,nt*1,!1);ht.add(Ft),Ft.add(new go.PathSegment(go.PathSegment.Line,et*.83,nt*.5)),Ft.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*.5)),Ft.add(new go.PathSegment(go.PathSegment.Line,et*.17,nt*1).close());var It=new go.PathFigure(et*.78,nt*.05,!1);return ht.add(It),It.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.05)),It.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.25)),It.add(new go.PathSegment(go.PathSegment.Line,et*.78,nt*.25).close()),ht}),go.Shape.defineFigureGenerator("SpeechBubble",function(Tt,et,nt){var ht=Tt?Tt.parameter1:NaN;(isNaN(ht)||ht<0)&&(ht=15),ht=Math.min(ht,et/3),ht=Math.min(ht,nt/3);var st=ht*Nt,gt=nt*.8,vt=new go.Geometry,wt=new go.PathFigure(ht,0,!0);return vt.add(wt),wt.add(new go.PathSegment(go.PathSegment.Line,et-ht,0)),wt.add(new go.PathSegment(go.PathSegment.Bezier,et,ht,et-st,0,et,st)),wt.add(new go.PathSegment(go.PathSegment.Line,et,gt-ht)),wt.add(new go.PathSegment(go.PathSegment.Bezier,et-ht,gt,et,gt-st,et-st,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.7,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt)),wt.add(new go.PathSegment(go.PathSegment.Line,et*.55,gt)),wt.add(new go.PathSegment(go.PathSegment.Line,ht,gt)),wt.add(new go.PathSegment(go.PathSegment.Bezier,0,gt-ht,st,gt,0,gt-st)),wt.add(new go.PathSegment(go.PathSegment.Line,0,ht)),wt.add(new go.PathSegment(go.PathSegment.Bezier,ht,0,0,st,st,0).close()),st>1?(vt.spot1=new go.Spot(0,0,st,st),vt.spot2=new go.Spot(1,.8,-st,-st)):(vt.spot1=go.Spot.TopLeft,vt.spot2=new go.Spot(1,.8)),vt}),go.Shape.defineFigureGenerator("Repeat",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*0,nt*.45,!0);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*.9)),st.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.9)),st.add(new go.PathSegment(go.PathSegment.Line,et*.65,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.2,nt*.45).close());var gt=new go.PathFigure(et*1,nt*.55,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*1)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.55)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*.55)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*0)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*.55).close()),ht}),go.Shape.defineFigureGenerator("Windows",function(Tt,et,nt){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,et,0)).add(new go.PathSegment(go.PathSegment.Line,et,nt)).add(new go.PathSegment(go.PathSegment.Line,0,nt).close()).add(new go.PathSegment(go.PathSegment.Move,.4*et,.4*nt)).add(new go.PathSegment(go.PathSegment.Line,.4*et,.8*nt)).add(new go.PathSegment(go.PathSegment.Line,.9*et,.8*nt)).add(new go.PathSegment(go.PathSegment.Line,.9*et,.4*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.2*et,.1*nt)).add(new go.PathSegment(go.PathSegment.Line,.2*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Line,.7*et,.1*nt).close()).add(new go.PathSegment(go.PathSegment.Move,.1*et,.6*nt)).add(new go.PathSegment(go.PathSegment.Line,.1*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,.9*nt)).add(new go.PathSegment(go.PathSegment.Line,.5*et,.6*nt).close()))}),go.Shape.defineFigureGenerator("Terminal",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*0,nt*.1,!1);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.1)),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.9)),st.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*.9).close());var gt=new go.PathFigure(et*.1,nt*.2,!0);ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.1,nt*.25)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.22,nt*.285)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.1,nt*.32)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.1,nt*.37)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.275,nt*.32)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.275,nt*.25).close());var vt=new go.PathFigure(et*.28,nt*.37,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.37)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.41)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.28,nt*.41).close()),ht}),go.Shape.defineFigureGenerator("Beaker",function(Tt,et,nt){var ht=new go.Geometry,st=15,gt=st*Nt,vt=new go.PathFigure(et*.62,nt*.475,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et,nt-st)),vt.add(new go.PathSegment(go.PathSegment.Bezier,et-st,nt,et,nt-gt,et-gt,nt)),vt.add(new go.PathSegment(go.PathSegment.Line,st,nt)),vt.add(new go.PathSegment(go.PathSegment.Bezier,0,nt-st,gt,nt,0,nt-gt)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.38,nt*.475)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.38,nt*.03)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*0)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*0)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.62,nt*.03).close()),gt>1?(ht.spot1=new go.Spot(0,0,gt,gt),ht.spot2=new go.Spot(1,1,-gt,-gt)):(ht.spot1=go.Spot.TopLeft,ht.spot2=go.Spot.BottomRight),ht}),go.Shape.defineFigureGenerator("Download",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*0,nt*1,!0);ht.add(st);var gt=.1/.3;st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*.755,nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*.93,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.61,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.39,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.07,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.755),nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.8),nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*(1-gt)).close());var vt=new go.PathFigure(et*.4,nt*0,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.44)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.26,nt*.44)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.66)),vt.add(new go.PathSegment(go.PathSegment.Line,et*(1-.26),nt*.44)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.44)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*0).close()),ht}),go.Shape.defineFigureGenerator("Bin",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*0,nt*1,!0);ht.add(st);var gt=.1/.3;return st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*.755,nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*.93,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.61,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.39,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.07,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.755),nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.8),nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*(1-gt)).close()),ht}),go.Shape.defineFigureGenerator("Upload",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*0,nt*1,!0);ht.add(st);var gt=.1/.3;st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.8,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*.66,nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*.755,nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*.93,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.64,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.61,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.39,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.36,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*.07,nt*(1-gt))),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.755),nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*.055)),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.66),nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*(1-.8),nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*(1-gt)).close());var vt=new go.PathFigure(et*.5,nt*0,!0);return ht.add(vt),vt.add(new go.PathSegment(go.PathSegment.Line,et*.26,nt*.25)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.25)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.4,nt*.63)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.63)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.6,nt*.25)),vt.add(new go.PathSegment(go.PathSegment.Line,et*.74,nt*.25).close()),ht}),go.Shape.defineFigureGenerator("EmptyDrink",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*.15,nt*0,!1);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et*.85,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*1).close()),ht}),go.Shape.defineFigureGenerator("Drink",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*.15,nt*0,!1);ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et*.85,nt*0)),st.add(new go.PathSegment(go.PathSegment.Line,et*.7,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.3,nt*1).close());var gt=new go.PathFigure(et*.235,nt*.28,!0);return ht.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,et*.765,nt*.28)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.655,nt*.97)),gt.add(new go.PathSegment(go.PathSegment.Line,et*.345,nt*.97).close()),ht}),go.Shape.defineFigureGenerator("4Arrows",function(Tt,et,nt){var ht=new go.Geometry,st=new go.PathFigure(et*.5,nt*0,!0);return ht.add(st),st.add(new go.PathSegment(go.PathSegment.Line,et*.65,nt*.25)),st.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.25)),st.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.35)),st.add(new go.PathSegment(go.PathSegment.Line,et*1,nt*.5)),st.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.65)),st.add(new go.PathSegment(go.PathSegment.Line,et*.75,nt*.55)),st.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.55)),st.add(new go.PathSegment(go.PathSegment.Line,et*.55,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.65,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.5,nt*1)),st.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.75)),st.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.55)),st.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.55)),st.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.65)),st.add(new go.PathSegment(go.PathSegment.Line,et*0,nt*.5)),st.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.35)),st.add(new go.PathSegment(go.PathSegment.Line,et*.25,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.45)),st.add(new go.PathSegment(go.PathSegment.Line,et*.45,nt*.25)),st.add(new go.PathSegment(go.PathSegment.Line,et*.35,nt*.25).close()),ht}),go.Shape.defineFigureGenerator("Connector","Ellipse"),go.Shape.defineFigureGenerator("Alternative","TriangleUp"),go.Shape.defineFigureGenerator("Merge","TriangleUp"),go.Shape.defineFigureGenerator("Decision","Diamond"),go.Shape.defineFigureGenerator("DataTransmissions","Hexagon"),go.Shape.defineFigureGenerator("Gate","Crescent"),go.Shape.defineFigureGenerator("Delay","HalfEllipse"),go.Shape.defineFigureGenerator("Input","Parallelogram1"),go.Shape.defineFigureGenerator("ManualLoop","ManualOperation"),go.Shape.defineFigureGenerator("ISOProcess","Chevron"),go.Shape.defineFigureGenerator("MessageToUser","SquareArrow"),go.Shape.defineFigureGenerator("MagneticData","Cylinder1"),go.Shape.defineFigureGenerator("DirectData","Cylinder4"),go.Shape.defineFigureGenerator("StoredData","DataStorage"),go.Shape.defineFigureGenerator("SequentialData","MagneticTape"),go.Shape.defineFigureGenerator("Subroutine","Procedure")},80727:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var En={},yn="5.0",xt={},Ot=null,jt=!1,Qt=!1,Me=null,Ut=!1,pe=null,Nt=null,Ie=0;Ie4?parseFloat(ze):5};En.setHTML5Codebase=function(ze,Te){Nt=ze,Je(ze,Te)},En.setJavaCodebase=En.setJavaCodebaseVersion=En.isCompiledInstalled=En.setPreCompiledScriptPath=En.setPreCompiledResourcePath=function(){},En.setHTML5CodebaseVersion=function(ze,Te){var dn=parseFloat(ze);if(dn!==NaN&&dn<5){console.log("The GeoGebra HTML5 codebase version "+dn+" is deprecated. Using version latest instead.");return}pe=ze,Ht(ze,Te)},En.getHTML5CodebaseVersion=function(){return Tt},En.getParameters=function(){return xt},En.setFontsCSSURL=function(ze){vt=ze},En.setGiacJSURL=function(ze){},En.setJNLPFile=function(ze){qt=ze},En.setJNLPBaseDir=function(ze){},En.inject=function(){function ze(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Te="auto",dn=xt.id,Hn,hn=!1,pn=0;pn=5)return!0;var ze=En.getAppletObject();return ze&&typeof ze.recalculateEnvironments=="function"?(ze.recalculateEnvironments(),!0):!1},En.startAnimation=function(){var ze=En.getAppletObject();return ze&&typeof ze.startAnimation=="function"?(ze.startAnimation(),!0):!1},En.stopAnimation=function(){var ze=En.getAppletObject();return ze&&typeof ze.stopAnimation=="function"?(ze.stopAnimation(),!0):!1},En.getAppletObject=function(){var ze=xt.id!==void 0?xt.id:"ggbApplet";return window[ze]},En.resize=function(){};var me=function(ze,Te,dn){var Hn=document.createElement("param");Hn.setAttribute("name",Te),Hn.setAttribute("value",dn),ze.appendChild(Hn)},Vt=function(ze){return ze&&ze!=="false"},Le=function(ze,Te,dn){Ft(Tt)<=4.2&&(dn=!0);var Hn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Tt||ggbHTML5LoadedCodebaseIsWebSimple&&!nt)&&(Hn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var hn=document.createElement("div");hn.classList.add("appletParameters","notranslate");var pn=Te.width,de=Te.height;if(Te.disableAutoScale=Te.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Te.disableAutoScale,Te.width!==void 0)if(Ft(Tt)<=4.4)Vt(Te.showToolBar)&&(Te.height-=7),Vt(Te.showAlgebraInput)&&(Te.height-=37),Te.width<605&&Vt(Te.showToolBar)&&(Te.width=605,pn=605);else{var vn=100;(Vt(Te.showToolBar)||Vt(Te.showMenuBar))&&(Te.hasOwnProperty("customToolBar")&&(Te.customToolbar=Te.customToolBar),vn=Vt(Te.showMenuBar)?245:155),pn=5?(Te.appletOnLoad=function(mt){var Lt=ze.querySelector(".ggb_preview");Lt&&Lt.parentNode.removeChild(Lt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Pn),window.GGBT_wsf_view&&$(window).trigger("resize"),Qe(mt)},Ne||Pn.appendChild(Pe)):hn.appendChild(Pe),Pn.appendChild(hn),Ne||ze.appendChild(Pn),setTimeout(function(){En.resize()},1)}else{var ie=document.createElement("div");ie.className="applet_scaler",ie.style.position="relative",ie.style.display="block",ie.appendChild(hn),ze.appendChild(ie),Te.appletOnLoad=function(mt){En.resize(),Qe(mt)}}function Dt(mt,Lt){Lt&&typeof Lt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(mt,Lt.appletOnLoad):renderGGBElement(mt),Tn("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Lt)}function fe(mt,Lt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:mt,params:Lt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(zt){Dt(zt.article,zt.params)}),html5AppletsToProcess=null)},Ft(Tt)<5&&(mt.className+=" geogebraweb")):Dt(mt,Lt)}if(Hn){scriptLoadStarted=!0;for(var Se=0;Se0?(bn.remove(),Pn.attr("id","fullscreencontent").show(),jQuery(Qe).append(Pn),window.dispatchEvent(new Event("resize"))):Le(bn,Te,!1),window.GGBT_wsf_view.launchFullScreen(Qe)}else Be=Hn,Le(ze,Te,!1);if(!window.GGBT_wsf_view)for(de=0;deze/4*3&&(bn=ze/4*3),Qe=bn/5.8,vn.setAttribute("src",st),vn.setAttribute("width",bn),vn.setAttribute("height",Qe);var Pn=(ze-bn)/2,Ne=(Te-Qe)/2;vn.style.left=Pn+"px",vn.style.top=Ne+"px",hn.appendChild(vn)}}return hn.appendChild(de),hn},Mn=function(ze){return ze=ze.toLowerCase(),ze==="html5"||ze==="screenshot"?ze:"html5"},xe=["web","webSimple","web3d","tablet","tablet3d","phone"],Ht=function(ze,Te){if(Tt=ze,Te){Je(Tt,!0);return}var dn=!jt;if(dn){var Hn=Ft(Tt);!isNaN(Hn)&&Hn<4.4&&(dn=!1)}var hn,pn;window.location.protocol.substr(0,4)==="http"?hn=window.location.protocol:hn="http:";var de=Tt.indexOf("//");de>0?pn=Tt:de===0?pn=hn+Tt:pn="https://www.geogebra.org/apps/5.2.814.0/";for(var vn in xe)if(Tt.slice(xe[vn].length*-1)===xe[vn]||Tt.slice((xe[vn].length+1)*-1)===xe[vn]+"/"){Je(pn,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&dn&&!Ot.is3D&&!Ot.AV&&!Ot.SV&&!Ot.CV&&!Ot.EV2&&!Ot.CP&&!Ot.PC&&!Ot.DA&&!Ot.FI&&!Ot.PV&&!Vt(xt.showToolBar)&&!Vt(xt.showMenuBar)&&!Vt(xt.showAlgebraInput)&&!Vt(xt.enableRightClick)&&(!xt.appName||xt.appName=="classic")?pn+="webSimple/":pn+="web3d/",Je(pn,!1)},Je=function(ze,Te){if(ze.requirejs){ce=ze;return}ze.slice(-1)!=="/"&&(ze+="/"),ce=ze,Te===null&&(Te=ze.indexOf("http")===-1),Ce=Te,et="web.nocache.js",nt=!1;var dn=ce.split("/");dn.length>1&&(!Te&&dn[dn.length-2]==="webSimple"?(et="webSimple.nocache.js",nt=!0):xe.indexOf(dn[dn.length-2])>=0&&(et=dn[dn.length-2]+".nocache.js")),dn=ze.split("/"),Tt=dn[dn.length-3],Tt.substr(0,4)==="test"?Tt=Tt.substr(4,1)+"."+Tt.substr(5,1):(Tt.substr(0,3)==="war"||Tt.substr(0,4)==="beta")&&(Tt="5.0");var Hn=parseFloat(Tt);Hn!==NaN&&Hn<5&&ze.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Hn+" is deprecated. Using version latest instead."),Ht("5.0",Te))},Tn=function(ze,Te){window.console&&window.console.log&&(!Te||typeof Te.showLogging=="undefined"||Te.showLogging&&Te.showLogging!=="false")&&console.log(ze)};xt.material_id!==void 0?Wt(An):An();function An(){var ze=yn;pe!==null?ze=pe:parseFloat(ze)<5&&(ze="5.0"),Ht(ze,!1),Nt!==null&&Je(Nt,Ce),Ut=!0}return En},GGBAppletUtils=function(){"use strict";function En(){return window.GGBT_wsf_edit!==void 0}function yn(Ut,pe){pe!=1?(Ut.style.transformOrigin="0% 0% 0px",Ut.style.webkitTransformOrigin="0% 0% 0px",Ut.style.transform="scale("+pe+","+pe+")",Ut.style.webkitTransform="scale("+pe+","+pe+")",Ut.style.maxWidth="initial",Ut.querySelector(".ggb_preview")!==null&&(Ut.querySelector(".ggb_preview").style.maxWidth="initial"),Ut.querySelectorAll(".ggb_preview img")[0]!==void 0&&(Ut.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),Ut.querySelectorAll(".ggb_preview img")[1]!==void 0&&(Ut.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(Ut.style.transform="none",Ut.style.webkitTransform="none")}function xt(Ut,pe,Nt,Ie,we,qt){var ce=null;if(qt!=null&&qt!="")for(var Ce=Ut.parentNode;Ce!=null;)if((" "+Ce.className+" ").indexOf(" "+qt+" ")>-1){ce=Ce;break}else Ce=Ce.parentNode;var Be=0,Tt=0,et=0,nt=0,ht=0,st=0,gt=0;if(ce)Be=ce.offsetWidth,Tt=Math.max(Ie?ce.offsetWidth:0,ce.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(Be=Math.min(window.innerWidth,document.documentElement.clientWidth),Tt=Math.min(window.innerHeight,document.documentElement.clientHeight),et=Be):(Be=window.innerWidth,Tt=window.innerHeight,et=window.innerWidth),Ut){var vt=Ut.getBoundingClientRect();vt.left>0&&vt.left<=Be&&(we===void 0||!we)&&(document.dir==="rtl"?(ht=Be-vt.width-vt.left,st=et<=480?10:30):(st=vt.left,ht=et<=480?10:30),nt=st+ht)}if(Ut&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var wt=Ut.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(nt=40,gt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(nt=0,gt=40)}}return Ut&&((Nt===void 0||!Nt)&&pe>0&&pe+nt1&&(qt=!0)),pe&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(qt=!0),!(Ut.hasOwnProperty("disableAutoScale")&&Ut.disableAutoScale))we=Ot(Ut,pe,qt,Nt,Ut.scaleContainerClass);else return Ie;return qt&&(!Ut.hasOwnProperty("scale")||Ie===1)?we:Math.min(Ie,we)}function Qt(Ut){var pe=Math.min(window.innerWidth,document.documentElement.clientWidth),Nt=Math.min(window.innerHeight,document.documentElement.clientHeight),Ie=Ut.getBoundingClientRect(),we=(pe-Ie.width)/2,qt=(Nt-Ie.height)/2;qt<0&&(qt=0),Ut.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(we<40?Ut.style.left="40px":Ut.style.left=we+"px",Ut.style.top=qt+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(qt<40?Ut.style.top="40px":Ut.style.top=qt+"px",Ut.style.left=we+"px")}function Me(Ut,pe){var Nt=Ut.querySelector(".appletParameters");if(Nt){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(pe.id!==Nt.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(Ut)}if(Nt.parentElement&&/fullscreen/.test(Nt.parentElement.className))return;var Ie=jt(pe,Ut);En()&&Nt.setAttribute("data-param-scale",Ie);for(var we=null,qt=0;qt=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(En){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(En){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(En){var yn=c[En];return yn==null?null:yn},r=d,webModule.__errFn=e}function B(){function En(Ut){var pe=Ut.lastIndexOf(rb);pe==-1&&(pe=Ut.length);var Nt=Ut.indexOf(sb);Nt==-1&&(Nt=Ut.length);var Ie=Ut.lastIndexOf(tb,Math.min(Nt,pe));return Ie>=O?Ut.substring(O,Ie+P):W}function yn(Ut){if(!Ut.match(/^\w+:\/\//)){var pe=o.createElement(ub);pe.src=Ut+vb,Ut=En(pe.src)}return Ut}function xt(){var Ut=__gwt_getMetaProperty(wb);return Ut!=null?Ut:W}function Ot(){for(var Ut=o.getElementsByTagName(_),pe=O;peO?Ut[Ut.length-P].href:W}function Qt(){var Ut=o.location;return Ut.href==Ut.protocol+zb+Ut.host+Ut.pathname+Ut.search+Ut.hash}var Me=xt();return Me==W&&(Me=Ot()),Me==W&&(Me=jt()),Me==W&&Qt()&&(Me=En(o.location.href)),Me=yn(Me),Me}function C(En){return En.match(/^\//)||En.match(/^[a-zA-Z]+:\/\//)?En:webModule.__moduleBase+En}function D(){var En=[],yn=O,xt=[],Ot=[];function jt(Ut){var pe=Ot[Ut](),Nt=xt[Ut];if(pe in Nt)return pe;var Ie=[];for(var we in Nt)Ie[Nt[we]]=we;throw r&&r(Ut,Ie,pe),null}if(__gwt_isKnownPropertyValue=function(Ut,pe){return pe in xt[Ut]},webModule.__getPropMap=function(){var Ut={};for(var pe in xt)xt.hasOwnProperty(pe)&&(Ut[pe]=jt(pe));return Ut},webModule.__computePropValue=jt,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Qt;try{Qt=Cb;var Me=Qt.indexOf(Db);Me!=-1&&(yn=parseInt(Qt.substring(Me+P),$),Qt=Qt.substring(O,Me))}catch(Ut){}return webModule.__softPermutationId=yn,C(Qt+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},77903:function(En,yn,xt){"use strict";xt.d(yn,{Ax:function(){return Me},Ds:function(){return Ut},KI:function(){return Nt},SI:function(){return Qt},f1:function(){return jt}});var Ot=xt(3294);function jt(Ie){let we=!0;if(Ie.length>0){for(let qt=0;qt{const we=Me.createElement("div",{className:jt.wrap,onClick:qt=>{qt.preventDefault(),qt.stopPropagation()}},Me.createElement("p",null,Nt==="shixun"||Nt==="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",Me.createElement("br",null),"\u6839\u636E\u5E73\u53F0\u4F7F\u7528\u89C4\u5219\uFF0C\u9700\u8981\u6388\u6743\u624D\u80FD\u4F7F\u7528\u3002",Nt==="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"),Me.createElement("div",{className:jt.contact},Me.createElement("div",{className:jt.img},Me.createElement("img",{src:Qt,width:"124px",height:"124px"})),Me.createElement("div",{className:"tc font14 mt10",style:{color:"#777A93"}},"\u626B\u4E00\u626B\uFF0C\u83B7\u53D6\u6388\u6743\u7801")));return Me.createElement(Ot.Z,{content:we},Me.createElement("span",{className:jt.text,style:Ie},"\u9AD8\u6D88\u8017"))}},16406:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Kt}});var Ot=xt(59301),jt={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Qt=xt(92310),Me=xt.n(Qt),Ut=xt(71418);var pe=function(kt,St){return(pe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(mt,Lt){mt.__proto__=Lt}||function(mt,Lt){for(var zt in Lt)Object.prototype.hasOwnProperty.call(Lt,zt)&&(mt[zt]=Lt[zt])})(kt,St)};function Nt(kt,St){function mt(){this.constructor=kt}pe(kt,St),kt.prototype=St===null?Object.create(St):(mt.prototype=St.prototype,new mt)}function Ie(kt,St,mt,Lt){return new(mt||(mt=Promise))(function(zt,Et){function Yt(qe){try{ln(Lt.next(qe))}catch(Nn){Et(Nn)}}function Ge(qe){try{ln(Lt.throw(qe))}catch(Nn){Et(Nn)}}function ln(qe){var Nn;qe.done?zt(qe.value):(Nn=qe.value,Nn instanceof mt?Nn:new mt(function(ai){ai(Nn)})).then(Yt,Ge)}ln((Lt=Lt.apply(kt,St||[])).next())})}function we(kt,St){var mt,Lt,zt,Et,Yt={label:0,sent:function(){if(1&zt[0])throw zt[1];return zt[1]},trys:[],ops:[]};return Et={next:Ge(0),throw:Ge(1),return:Ge(2)},typeof Symbol=="function"&&(Et[Symbol.iterator]=function(){return this}),Et;function Ge(ln){return function(qe){return function(Nn){if(mt)throw new TypeError("Generator is already executing.");for(;Yt;)try{if(mt=1,Lt&&(zt=2&Nn[0]?Lt.return:Nn[0]?Lt.throw||((zt=Lt.return)&&zt.call(Lt),0):Lt.next)&&!(zt=zt.call(Lt,Nn[1])).done)return zt;switch(Lt=0,zt&&(Nn=[2&Nn[0],zt.value]),Nn[0]){case 0:case 1:zt=Nn;break;case 4:return Yt.label++,{value:Nn[1],done:!1};case 5:Yt.label++,Lt=Nn[1],Nn=[0];continue;case 7:Nn=Yt.ops.pop(),Yt.trys.pop();continue;default:if(zt=Yt.trys,!((zt=zt.length>0&&zt[zt.length-1])||Nn[0]!==6&&Nn[0]!==2)){Yt=0;continue}if(Nn[0]===3&&(!zt||Nn[1]>zt[0]&&Nn[1]',"select"),this.addActionButton(kt,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(kt,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(kt,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(kt,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(kt,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(kt,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(kt,'',"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(Et){var le=document.createElement("div");le.className=""+mt.toolbarButtonStyleClass.name,le.setAttribute("data-type-name",Et.typeName),le.innerHTML=Et.icon,le.addEventListener("click",function(){mt.markerToolbarButtonClicked(le,Et)}),mt.buttons.push(le),mt.markerButtons.push(le)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var jt=document.createElement("div");jt.className=this.toolbarBlockStyleClass.name,jt.style.whiteSpace="nowrap",jt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(jt),this.addActionButton(jt,'',"render"),this.addActionButton(jt,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},Lt.prototype.addButtonClickListener=function(St){this.buttonClickListeners.push(St)},Lt.prototype.removeButtonClickListener=function(St){this.buttonClickListeners.indexOf(St)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(St),1)},Lt.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Lt.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var St=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var mt=0;mt',"select"),this.addActionButton(Lt,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(Lt,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(Lt,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(Lt,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(Lt,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(Lt,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(Lt,'',"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(Et){var Yt=document.createElement("div");Yt.className=""+mt.toolbarButtonStyleClass.name,Yt.setAttribute("data-type-name",Et.typeName),Yt.innerHTML=Et.icon,Yt.addEventListener("click",function(){mt.markerToolbarButtonClicked(Yt,Et)}),mt.buttons.push(Yt),mt.markerButtons.push(Yt)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var zt=document.createElement("div");zt.className=this.toolbarBlockStyleClass.name,zt.style.whiteSpace="nowrap",zt.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(zt),this.addActionButton(zt,'',"render"),this.addActionButton(zt,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},kt.prototype.addButtonClickListener=function(St){this.buttonClickListeners.push(St)},kt.prototype.removeButtonClickListener=function(St){this.buttonClickListeners.indexOf(St)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(St),1)},kt.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},kt.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var St=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var mt=0;mt0&&this.buttonClickListeners.forEach(function(kt){return kt("marker",mt)}),this.markerButtonOverflowBlock.style.display="none"},Lt.prototype.actionToolbarButtonClicked=function(St,mt){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(kt){return kt("action",mt)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Lt.prototype.setActiveButton=function(St){this.resetButtonStyles(),St.className=St.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),St.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Lt.prototype.setActiveMarkerButton=function(St){var mt=this.markerButtons.find(function(kt){return kt.getAttribute("data-type-name")===St});mt&&this.setActiveButton(mt)},Lt.prototype.setCurrentMarker=function(St){var mt=this;this.currentMarker=St,this.buttons.filter(function(kt){return/delete|notes/.test(kt.getAttribute("data-action"))}).forEach(function(kt){mt.currentMarker===void 0?(kt.style.fillOpacity="0.4",kt.style.pointerEvents="none"):(kt.style.fillOpacity="1",kt.style.pointerEvents="all")})},Lt}(),gt=function(){function Lt(St,mt,kt,jt){this.panels=[],this.panelButtons=[],this.markerjsContainer=St,this.displayMode=mt,this.uiStyleSettings=kt,this.styles=jt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Lt.prototype.addStyles=function(){var St;this.toolboxStyleClass=this.styles.addClass(new ht("toolbox",` + `))},kt.prototype.markerToolbarButtonClicked=function(St,mt){this.setActiveButton(St),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Lt){return Lt("marker",mt)}),this.markerButtonOverflowBlock.style.display="none"},kt.prototype.actionToolbarButtonClicked=function(St,mt){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Lt){return Lt("action",mt)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},kt.prototype.setActiveButton=function(St){this.resetButtonStyles(),St.className=St.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),St.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},kt.prototype.setActiveMarkerButton=function(St){var mt=this.markerButtons.find(function(Lt){return Lt.getAttribute("data-type-name")===St});mt&&this.setActiveButton(mt)},kt.prototype.setCurrentMarker=function(St){var mt=this;this.currentMarker=St,this.buttons.filter(function(Lt){return/delete|notes/.test(Lt.getAttribute("data-action"))}).forEach(function(Lt){mt.currentMarker===void 0?(Lt.style.fillOpacity="0.4",Lt.style.pointerEvents="none"):(Lt.style.fillOpacity="1",Lt.style.pointerEvents="all")})},kt}(),gt=function(){function kt(St,mt,Lt,zt){this.panels=[],this.panelButtons=[],this.markerjsContainer=St,this.displayMode=mt,this.uiStyleSettings=Lt,this.styles=zt,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return kt.prototype.addStyles=function(){var St;this.toolboxStyleClass=this.styles.addClass(new ht("toolbox",` width: 100%; flex-shrink: 0; display: flex; @@ -103,15 +103,15 @@ background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+` `)),this.styles.addRule(new nt("."+this.toolboxButtonStyleClass.name+" svg",` height: `+this.uiStyleSettings.toolbarHeight/2+`px; - `))},Lt.prototype.show=function(St){var mt;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=St,this.uiContainer.className=this.toolboxStyleClass.name+" "+((mt=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&mt!==void 0?mt:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Lt.prototype.setPanelButtons=function(St){var mt,kt,jt=this;this.panels=St,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((mt=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&mt!==void 0?mt:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((kt=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&kt!==void 0?kt:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Et){var le;Et.uiStyleSettings=jt.uiStyleSettings;var We=document.createElement("div");We.className=jt.toolboxButtonStyleClass.name+" "+((le=jt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&le!==void 0?le:jt.toolboxButtonStyleColorsClass.name),We.innerHTML=Et.icon,We.title=Et.title,We.addEventListener("click",function(){jt.panelButtonClick(Et)}),jt.panelButtons.push(We),jt.buttonRow.appendChild(We)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Lt.prototype.panelButtonClick=function(St){var mt=this,kt=-1;if(St!==this.activePanel){kt=this.panels.indexOf(St),this.panelRow.innerHTML="";var jt=St.getUi();jt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(jt),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=St}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){mt.displayMode==="inline"?mt.panelRow.style.display="none":mt.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Et,le){var We,ln;Et.className=mt.toolboxButtonStyleClass.name+" "+(le===kt?""+((We=mt.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&We!==void 0?We:mt.toolboxActiveButtonStyleColorsClass.name):""+((ln=mt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ln!==void 0?ln:mt.toolboxButtonStyleColorsClass.name))})},Lt}(),vt=function(Lt,St){this.title=Lt,this.icon=St},wt=function(Lt){function St(mt,kt,jt,Et){var le=Lt.call(this,mt,Et||'')||this;return le.colors=[],le.addTransparent=!1,le.colorBoxes=[],le.colors=kt,le.currentColor=jt,le.setCurrentColor=le.setCurrentColor.bind(le),le.getColorBox=le.getColorBox.bind(le),le}return Tt(St,Lt),St.prototype.getUi=function(){var mt=this,kt=document.createElement("div");return kt.style.overflow="hidden",kt.style.whiteSpace="nowrap",this.colors.forEach(function(jt){var Et=mt.getColorBox(jt);kt.appendChild(Et),mt.colorBoxes.push(Et)}),kt},St.prototype.getColorBox=function(mt){var kt=this,jt=this.uiStyleSettings.toolbarHeight/4,Et=this.uiStyleSettings.toolbarHeight-jt,le=document.createElement("div");le.style.display="inline-block",le.style.boxSizing="content-box",le.style.width=Et-2+"px",le.style.height=Et-2+"px",le.style.padding="1px",le.style.marginRight="2px",le.style.marginBottom="2px",le.style.borderWidth="2px",le.style.borderStyle="solid",le.style.borderRadius=(Et+2)/2+"px",le.style.borderColor=mt===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",le.addEventListener("click",function(){kt.setCurrentColor(mt,le)});var We=document.createElement("div");return We.style.display="inline-block",We.style.width=Et-2+"px",We.style.height=Et-2+"px",We.style.backgroundColor=mt,We.style.borderRadius=Et/2+"px",mt==="transparent"&&(We.style.fill=this.uiStyleSettings.toolboxAccentColor,We.innerHTML=` + `))},kt.prototype.show=function(St){var mt;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=St,this.uiContainer.className=this.toolboxStyleClass.name+" "+((mt=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&mt!==void 0?mt:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},kt.prototype.setPanelButtons=function(St){var mt,Lt,zt=this;this.panels=St,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((mt=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&mt!==void 0?mt:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Lt=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Lt!==void 0?Lt:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Et){var Yt;Et.uiStyleSettings=zt.uiStyleSettings;var Ge=document.createElement("div");Ge.className=zt.toolboxButtonStyleClass.name+" "+((Yt=zt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Yt!==void 0?Yt:zt.toolboxButtonStyleColorsClass.name),Ge.innerHTML=Et.icon,Ge.title=Et.title,Ge.addEventListener("click",function(){zt.panelButtonClick(Et)}),zt.panelButtons.push(Ge),zt.buttonRow.appendChild(Ge)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},kt.prototype.panelButtonClick=function(St){var mt=this,Lt=-1;if(St!==this.activePanel){Lt=this.panels.indexOf(St),this.panelRow.innerHTML="";var zt=St.getUi();zt.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(zt),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=St}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){mt.displayMode==="inline"?mt.panelRow.style.display="none":mt.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Et,Yt){var Ge,ln;Et.className=mt.toolboxButtonStyleClass.name+" "+(Yt===Lt?""+((Ge=mt.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ge!==void 0?Ge:mt.toolboxActiveButtonStyleColorsClass.name):""+((ln=mt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ln!==void 0?ln:mt.toolboxButtonStyleColorsClass.name))})},kt}(),vt=function(kt,St){this.title=kt,this.icon=St},wt=function(kt){function St(mt,Lt,zt,Et){var Yt=kt.call(this,mt,Et||'')||this;return Yt.colors=[],Yt.addTransparent=!1,Yt.colorBoxes=[],Yt.colors=Lt,Yt.currentColor=zt,Yt.setCurrentColor=Yt.setCurrentColor.bind(Yt),Yt.getColorBox=Yt.getColorBox.bind(Yt),Yt}return Nt(St,kt),St.prototype.getUi=function(){var mt=this,Lt=document.createElement("div");return Lt.style.overflow="hidden",Lt.style.whiteSpace="nowrap",this.colors.forEach(function(zt){var Et=mt.getColorBox(zt);Lt.appendChild(Et),mt.colorBoxes.push(Et)}),Lt},St.prototype.getColorBox=function(mt){var Lt=this,zt=this.uiStyleSettings.toolbarHeight/4,Et=this.uiStyleSettings.toolbarHeight-zt,Yt=document.createElement("div");Yt.style.display="inline-block",Yt.style.boxSizing="content-box",Yt.style.width=Et-2+"px",Yt.style.height=Et-2+"px",Yt.style.padding="1px",Yt.style.marginRight="2px",Yt.style.marginBottom="2px",Yt.style.borderWidth="2px",Yt.style.borderStyle="solid",Yt.style.borderRadius=(Et+2)/2+"px",Yt.style.borderColor=mt===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Yt.addEventListener("click",function(){Lt.setCurrentColor(mt,Yt)});var Ge=document.createElement("div");return Ge.style.display="inline-block",Ge.style.width=Et-2+"px",Ge.style.height=Et-2+"px",Ge.style.backgroundColor=mt,Ge.style.borderRadius=Et/2+"px",mt==="transparent"&&(Ge.style.fill=this.uiStyleSettings.toolboxAccentColor,Ge.innerHTML=` - `),le.appendChild(We),le},St.prototype.setCurrentColor=function(mt,kt){var jt=this;this.currentColor=mt,this.colorBoxes.forEach(function(Et){Et.style.borderColor=Et===kt?jt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(mt)},St}(vt),Ft=function(){function Lt(St,mt,kt){this._state="new",this._isSelected=!1,this._container=St,this._overlayContainer=mt,this.globalSettings=kt,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Lt.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Lt.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Lt.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Lt.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Lt.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Lt.prototype.ownsTarget=function(St){return!1},Object.defineProperty(Lt.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Lt.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Lt.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Lt.prototype.pointerDown=function(St,mt){},Lt.prototype.dblClick=function(St,mt){},Lt.prototype.manipulate=function(St){},Lt.prototype.pointerUp=function(St){this.stateChanged()},Lt.prototype.dispose=function(){},Lt.prototype.addMarkerVisualToContainer=function(St){this.container.childNodes.length>0?this.container.insertBefore(St,this.container.childNodes[0]):this.container.appendChild(St)},Lt.prototype.getState=function(){return{typeName:Lt.typeName,state:this.state,notes:this.notes}},Lt.prototype.restoreState=function(St){this._state=St.state,this.notes=St.notes},Lt.prototype.scale=function(St,mt){},Lt.prototype.colorChanged=function(St){this.onColorChanged&&this.onColorChanged(St),this.stateChanged()},Lt.prototype.fillColorChanged=function(St){this.onFillColorChanged&&this.onFillColorChanged(St),this.stateChanged()},Lt.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var St=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),St.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(St)&&this.onStateChanged(this)}},Lt.typeName="MarkerBase",Lt}(),It=function(){function Lt(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Lt.prototype.findGripByVisual=function(St){return this.topLeft.ownsTarget(St)?this.topLeft:this.topCenter.ownsTarget(St)?this.topCenter:this.topRight.ownsTarget(St)?this.topRight:this.centerLeft.ownsTarget(St)?this.centerLeft:this.centerRight.ownsTarget(St)?this.centerRight:this.bottomLeft.ownsTarget(St)?this.bottomLeft:this.bottomCenter.ownsTarget(St)?this.bottomCenter:this.bottomRight.ownsTarget(St)?this.bottomRight:void 0},Lt}(),Rt=function(){function Lt(){this.GRIP_SIZE=10,this.visual=ce.createGroup(),this.visual.appendChild(ce.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ce.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Lt.prototype.ownsTarget=function(St){return St===this.visual||St===this.visual.childNodes[0]||St===this.visual.childNodes[1]},Lt}(),Kt=function(){function Lt(){}return Lt.toITransformMatrix=function(St){return{a:St.a,b:St.b,c:St.c,d:St.d,e:St.e,f:St.f}},Lt.toSVGMatrix=function(St,mt){return St.a=mt.a,St.b=mt.b,St.c=mt.c,St.d=mt.d,St.e=mt.e,St.f=mt.f,St},Lt}(),oe=function(Lt){function St(mt,kt,jt){var Et=Lt.call(this,mt,kt,jt)||this;return Et.left=0,Et.top=0,Et.width=0,Et.height=0,Et.defaultSize={x:50,y:20},Et.offsetX=0,Et.offsetY=0,Et.rotationAngle=0,Et.CB_DISTANCE=10,Et._suppressMarkerCreateEvent=!1,Et.container.transform.baseVal.appendItem(ce.createTransform()),Et.setupControlBox(),Et}return Tt(St,Lt),Object.defineProperty(St.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(St.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(St.prototype,"visual",{get:function(){return this._visual},set:function(mt){this._visual=mt;var kt=ce.createTransform();this._visual.transform.baseVal.appendItem(kt)},enumerable:!1,configurable:!0}),St.prototype.ownsTarget=function(mt){return!!Lt.prototype.ownsTarget.call(this,mt)||!!(this.controlGrips.findGripByVisual(mt)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(mt))},St.prototype.pointerDown=function(mt,kt){Lt.prototype.pointerDown.call(this,mt,kt),this.state==="new"&&(this.left=mt.x,this.top=mt.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var jt=this.unrotatePoint(mt);if(this.manipulationStartX=jt.x,this.manipulationStartY=jt.y,this.offsetX=jt.x-this.left,this.offsetY=jt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(kt),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(kt)){this.activeGrip=this.rotatorGrip;var Et=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Et.x-this.width/2,this.top=Et.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var le=this.container.transform.baseVal.getItem(0);le.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(le,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},St.prototype.pointerUp=function(mt){var kt=this.state;Lt.prototype.pointerUp.call(this,mt),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(mt),this._state="select",kt==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},St.prototype.moveVisual=function(mt){this.visual.style.transform="translate("+mt.x+"px, "+mt.y+"px)"},St.prototype.manipulate=function(mt){var kt=this.unrotatePoint(mt);this.state==="creating"?this.resize(mt):this.state==="move"?(this.left=this.manipulationStartLeft+(kt.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(kt.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(kt):this.state==="rotate"&&this.rotate(mt)},St.prototype.resize=function(mt){var kt=this.manipulationStartLeft,jt=this.manipulationStartWidth,Et=this.manipulationStartTop,le=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:kt=this.manipulationStartLeft+mt.x-this.manipulationStartX,jt=this.manipulationStartWidth+this.manipulationStartLeft-kt;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:jt=this.manipulationStartWidth+mt.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Et=this.manipulationStartTop+mt.y-this.manipulationStartY,le=this.manipulationStartHeight+this.manipulationStartTop-Et;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:le=this.manipulationStartHeight+mt.y-this.manipulationStartY}jt>=0?(this.left=kt,this.width=jt):(this.left=kt+jt,this.width=-jt),le>=0?(this.top=Et,this.height=le):(this.top=Et+le,this.height=-le),this.setSize()},St.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},St.prototype.rotate=function(mt){if(Math.abs(mt.x-this.centerX)>.1){var kt=Math.sign(mt.x-this.centerX);this.rotationAngle=180*Math.atan((mt.y-this.centerY)/(mt.x-this.centerX))/Math.PI+90*kt,this.applyRotation()}},St.prototype.applyRotation=function(){var mt=this.container.transform.baseVal.getItem(0);mt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(mt,0)},St.prototype.rotatePoint=function(mt){if(this.rotationAngle===0)return mt;var kt=this.container.getCTM(),jt=ce.createPoint(mt.x,mt.y);return{x:(jt=jt.matrixTransform(kt)).x,y:jt.y}},St.prototype.unrotatePoint=function(mt){if(this.rotationAngle===0)return mt;var kt=this.container.getCTM();kt=kt.inverse();var jt=ce.createPoint(mt.x,mt.y);return{x:(jt=jt.matrixTransform(kt)).x,y:jt.y}},St.prototype.select=function(){Lt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},St.prototype.deselect=function(){Lt.prototype.deselect.call(this),this.controlBox.style.display="none"},St.prototype.setupControlBox=function(){this.controlBox=ce.createGroup();var mt=ce.createTransform();mt.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(mt),this.container.appendChild(this.controlBox),this.controlRect=ce.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=ce.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 It,this.addControlGrips(),this.controlBox.style.display="none"},St.prototype.adjustControlBox=function(){var mt=this.controlBox.transform.baseVal.getItem(0);mt.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(mt,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()},St.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()},St.prototype.createGrip=function(){var mt=new Rt;return mt.visual.transform.baseVal.appendItem(ce.createTransform()),this.controlBox.appendChild(mt.visual),mt},St.prototype.positionGrips=function(){var mt=this.controlGrips.topLeft.GRIP_SIZE,kt=-mt/2,jt=kt,Et=(this.width+this.CB_DISTANCE)/2-mt/2,le=(this.height+this.CB_DISTANCE)/2-mt/2,We=this.height+this.CB_DISTANCE-mt/2,ln=this.width+this.CB_DISTANCE-mt/2;this.positionGrip(this.controlGrips.topLeft.visual,kt,jt),this.positionGrip(this.controlGrips.topCenter.visual,Et,jt),this.positionGrip(this.controlGrips.topRight.visual,ln,jt),this.positionGrip(this.controlGrips.centerLeft.visual,kt,le),this.positionGrip(this.controlGrips.centerRight.visual,ln,le),this.positionGrip(this.controlGrips.bottomLeft.visual,kt,We),this.positionGrip(this.controlGrips.bottomCenter.visual,Et,We),this.positionGrip(this.controlGrips.bottomRight.visual,ln,We),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Et,jt-3*this.CB_DISTANCE)},St.prototype.positionGrip=function(mt,kt,jt){var Et=mt.transform.baseVal.getItem(0);Et.setTranslate(kt,jt),mt.transform.baseVal.replaceItem(Et,0)},St.prototype.hideControlBox=function(){this.controlBox.style.display="none"},St.prototype.showControlBox=function(){this.controlBox.style.display=""},St.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Kt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Kt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Lt.prototype.getState.call(this))},St.prototype.restoreState=function(mt){Lt.prototype.restoreState.call(this,mt);var kt=mt;this.left=kt.left,this.top=kt.top,this.width=kt.width,this.height=kt.height,this.rotationAngle=kt.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Kt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,kt.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Kt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,kt.containerTransformMatrix))},St.prototype.scale=function(mt,kt){Lt.prototype.scale.call(this,mt,kt);var jt=this.rotatePoint({x:this.left,y:this.top}),Et=this.unrotatePoint({x:jt.x*mt,y:jt.y*kt});this.left=Et.x,this.top=Et.y,this.width=this.width*mt,this.height=this.height*kt,this.adjustControlBox()},St}(Ft),ee=function(Lt){function St(mt,kt,jt){var Et=Lt.call(this,mt,kt,jt)||this;return Et.fillColor="transparent",Et.strokeColor="transparent",Et.strokeWidth=0,Et.strokeDasharray="",Et.opacity=1,Et.setStrokeColor=Et.setStrokeColor.bind(Et),Et.setFillColor=Et.setFillColor.bind(Et),Et.setStrokeWidth=Et.setStrokeWidth.bind(Et),Et.setStrokeDasharray=Et.setStrokeDasharray.bind(Et),Et.createVisual=Et.createVisual.bind(Et),Et}return Tt(St,Lt),St.prototype.ownsTarget=function(mt){return!(!Lt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual)},St.prototype.createVisual=function(){this.visual=ce.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)},St.prototype.pointerDown=function(mt,kt){Lt.prototype.pointerDown.call(this,mt,kt),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},St.prototype.manipulate=function(mt){Lt.prototype.manipulate.call(this,mt)},St.prototype.resize=function(mt){Lt.prototype.resize.call(this,mt),this.setSize()},St.prototype.setSize=function(){Lt.prototype.setSize.call(this),ce.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},St.prototype.pointerUp=function(mt){Lt.prototype.pointerUp.call(this,mt),this.setSize()},St.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.visual&&ce.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(mt),this.stateChanged()},St.prototype.setFillColor=function(mt){this.fillColor=mt,this.visual&&ce.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},St.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.visual&&ce.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},St.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.visual&&ce.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},St.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Lt.prototype.getState.call(this))},St.prototype.restoreState=function(mt){var kt=mt;this.fillColor=kt.fillColor,this.strokeColor=kt.strokeColor,this.strokeWidth=kt.strokeWidth,this.strokeDasharray=kt.strokeDasharray,this.opacity=kt.opacity,this.createVisual(),Lt.prototype.restoreState.call(this,mt),this.setSize()},St.prototype.scale=function(mt,kt){Lt.prototype.scale.call(this,mt,kt),this.setSize()},St.title="Rectangle marker",St}(oe),ve=function(Lt){function St(mt,kt,jt,Et){var le=Lt.call(this,mt,Et||'')||this;return le.widths=[],le.widthBoxes=[],le.widths=kt,le.currentWidth=jt,le.setCurrentWidth=le.setCurrentWidth.bind(le),le}return Tt(St,Lt),St.prototype.getUi=function(){var mt=this,kt=document.createElement("div");return kt.style.display="flex",kt.style.overflow="hidden",kt.style.flexGrow="2",this.widths.forEach(function(jt){var Et=document.createElement("div");Et.style.display="flex",Et.style.flexGrow="2",Et.style.alignItems="center",Et.style.justifyContent="space-between",Et.style.padding="5px",Et.style.borderWidth="2px",Et.style.borderStyle="solid",Et.style.borderColor=jt===mt.currentWidth?mt.uiStyleSettings.toolboxAccentColor:"transparent",Et.addEventListener("click",function(){mt.setCurrentWidth(jt,Et)}),kt.appendChild(Et);var le=document.createElement("div");le.innerText=jt.toString(),le.style.marginRight="5px",Et.appendChild(le);var We=document.createElement("div");We.style.minHeight="20px",We.style.flexGrow="2",We.style.display="flex",We.style.alignItems="center";var ln=document.createElement("hr");ln.style.minWidth="20px",ln.style.border="0px",ln.style.borderTop=jt+"px solid "+mt.uiStyleSettings.toolboxColor,ln.style.flexGrow="2",We.appendChild(ln),Et.appendChild(We),mt.widthBoxes.push(Et)}),kt},St.prototype.setCurrentWidth=function(mt,kt){var jt=this;this.currentWidth=mt,this.widthBoxes.forEach(function(Et){Et.style.borderColor=Et===kt?jt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},St}(vt),_t=function(Lt){function St(mt,kt,jt,Et){var le=Lt.call(this,mt,Et||'')||this;return le.styles=[],le.styleBoxes=[],le.styles=kt,le.currentStyle=jt,le.setCurrentStyle=le.setCurrentStyle.bind(le),le}return Tt(St,Lt),St.prototype.getUi=function(){var mt=this,kt=document.createElement("div");return kt.style.display="flex",kt.style.overflow="hidden",kt.style.flexGrow="2",this.styles.forEach(function(jt){var Et=document.createElement("div");Et.style.display="flex",Et.style.alignItems="center",Et.style.justifyContent="space-between",Et.style.padding="5px",Et.style.borderWidth="2px",Et.style.borderStyle="solid",Et.style.overflow="hidden",Et.style.maxWidth=100/mt.styles.length-5+"%",Et.style.borderColor=jt===mt.currentStyle?mt.uiStyleSettings.toolboxAccentColor:"transparent",Et.addEventListener("click",function(){mt.setCurrentStyle(jt,Et)}),kt.appendChild(Et);var le=document.createElement("div");le.style.minHeight="20px",le.style.flexGrow="2",le.style.overflow="hidden";var We=` - - `;le.innerHTML=We,Et.appendChild(le),mt.styleBoxes.push(Et)}),kt},St.prototype.setCurrentStyle=function(mt,kt){var jt=this;this.currentStyle=mt,this.styleBoxes.forEach(function(Et){Et.style.borderColor=Et===kt?jt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},St}(vt),Ne=function(Lt){function St(mt,kt,jt){var Et=Lt.call(this,mt,kt,jt)||this;return Et.strokeColor=jt.defaultColor,Et.strokeWidth=jt.defaultStrokeWidth,Et.strokeDasharray=jt.defaultStrokeDasharray,Et.strokePanel=new wt("Line color",jt.defaultColorSet,jt.defaultColor),Et.strokePanel.onColorChanged=Et.setStrokeColor,Et.strokeWidthPanel=new ve("Line width",jt.defaultStrokeWidths,jt.defaultStrokeWidth),Et.strokeWidthPanel.onWidthChanged=Et.setStrokeWidth,Et.strokeStylePanel=new _t("Line style",jt.defaultStrokeDasharrays,jt.defaultStrokeDasharray),Et.strokeStylePanel.onStyleChanged=Et.setStrokeDasharray,Et}return Tt(St,Lt),Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Lt.prototype.getState.call(this);return mt.typeName=St.typeName,mt},St.typeName="FrameMarker",St.title="Frame marker",St.icon='',St}(ee),he=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"},Ze=function(Lt){function St(mt,kt,jt){var Et=Lt.call(this,mt,kt,jt)||this;return Et.x1=0,Et.y1=0,Et.x2=0,Et.y2=0,Et.defaultLength=50,Et.manipulationStartX=0,Et.manipulationStartY=0,Et.manipulationStartX1=0,Et.manipulationStartY1=0,Et.manipulationStartX2=0,Et.manipulationStartY2=0,Et.setupControlBox(),Et}return Tt(St,Lt),St.prototype.ownsTarget=function(mt){return!!Lt.prototype.ownsTarget.call(this,mt)||!(!this.grip1.ownsTarget(mt)&&!this.grip2.ownsTarget(mt))},St.prototype.pointerDown=function(mt,kt){Lt.prototype.pointerDown.call(this,mt,kt),this.manipulationStartX=mt.x,this.manipulationStartY=mt.y,this.state==="new"&&(this.x1=mt.x,this.y1=mt.y,this.x2=mt.x,this.y2=mt.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(kt)?this.activeGrip=this.grip1:this.grip2.ownsTarget(kt)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},St.prototype.pointerUp=function(mt){var kt=this.state;Lt.prototype.pointerUp.call(this,mt),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(mt),this._state="select",kt==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},St.prototype.adjustVisual=function(){},St.prototype.manipulate=function(mt){this.state==="creating"?this.resize(mt):this.state==="move"?(this.x1=this.manipulationStartX1+mt.x-this.manipulationStartX,this.y1=this.manipulationStartY1+mt.y-this.manipulationStartY,this.x2=this.manipulationStartX2+mt.x-this.manipulationStartX,this.y2=this.manipulationStartY2+mt.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(mt)},St.prototype.resize=function(mt){switch(this.activeGrip){case this.grip1:this.x1=mt.x,this.y1=mt.y;break;case this.grip2:case void 0:this.x2=mt.x,this.y2=mt.y}this.adjustVisual(),this.adjustControlBox()},St.prototype.select=function(){Lt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},St.prototype.deselect=function(){Lt.prototype.deselect.call(this),this.controlBox.style.display="none"},St.prototype.setupControlBox=function(){this.controlBox=ce.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},St.prototype.adjustControlBox=function(){this.positionGrips()},St.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},St.prototype.createGrip=function(){var mt=new Rt;return mt.visual.transform.baseVal.appendItem(ce.createTransform()),this.controlBox.appendChild(mt.visual),mt},St.prototype.positionGrips=function(){var mt=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-mt/2,this.y1-mt/2),this.positionGrip(this.grip2.visual,this.x2-mt/2,this.y2-mt/2)},St.prototype.positionGrip=function(mt,kt,jt){var Et=mt.transform.baseVal.getItem(0);Et.setTranslate(kt,jt),mt.transform.baseVal.replaceItem(Et,0)},St.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Lt.prototype.getState.call(this))},St.prototype.restoreState=function(mt){Lt.prototype.restoreState.call(this,mt);var kt=mt;this.x1=kt.x1,this.y1=kt.y1,this.x2=kt.x2,this.y2=kt.y2},St.prototype.scale=function(mt,kt){Lt.prototype.scale.call(this,mt,kt),this.x1=this.x1*mt,this.y1=this.y1*kt,this.x2=this.x2*mt,this.y2=this.y2*kt,this.adjustVisual(),this.adjustControlBox()},St}(Ft),Ue=function(Lt){function St(mt,kt,jt){var Et=Lt.call(this,mt,kt,jt)||this;return Et.strokeColor="transparent",Et.strokeWidth=0,Et.strokeDasharray="",Et.setStrokeColor=Et.setStrokeColor.bind(Et),Et.setStrokeWidth=Et.setStrokeWidth.bind(Et),Et.setStrokeDasharray=Et.setStrokeDasharray.bind(Et),Et.strokeColor=jt.defaultColor,Et.strokeWidth=jt.defaultStrokeWidth,Et.strokeDasharray=jt.defaultStrokeDasharray,Et.strokePanel=new wt("Line color",jt.defaultColorSet,jt.defaultColor),Et.strokePanel.onColorChanged=Et.setStrokeColor,Et.strokeWidthPanel=new ve("Line width",jt.defaultStrokeWidths,jt.defaultStrokeWidth),Et.strokeWidthPanel.onWidthChanged=Et.setStrokeWidth,Et.strokeStylePanel=new _t("Line style",jt.defaultStrokeDasharrays,jt.defaultStrokeDasharray),Et.strokeStylePanel.onStyleChanged=Et.setStrokeDasharray,Et}return Tt(St,Lt),St.prototype.ownsTarget=function(mt){return!(!Lt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.selectorLine&&mt!==this.visibleLine)},St.prototype.createVisual=function(){this.visual=ce.createGroup(),this.selectorLine=ce.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ce.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)},St.prototype.pointerDown=function(mt,kt){Lt.prototype.pointerDown.call(this,mt,kt),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},St.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()),ce.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ce.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ce.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},St.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.adjustVisual(),this.colorChanged(mt)},St.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.adjustVisual()},St.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Lt.prototype.getState.call(this));return mt.typeName=St.typeName,mt},St.prototype.restoreState=function(mt){Lt.prototype.restoreState.call(this,mt);var kt=mt;this.strokeColor=kt.strokeColor,this.strokeWidth=kt.strokeWidth,this.strokeDasharray=kt.strokeDasharray,this.createVisual(),this.adjustVisual()},St.typeName="LineMarker",St.title="Line marker",St.icon='',St}(Ze),Ye=function(Lt){function St(mt,kt,jt,Et){var le=Lt.call(this,mt,Et||'')||this;return le.fonts=[],le.fontBoxes=[],le.fonts=kt,le.currentFont=jt,le.setCurrentFont=le.setCurrentFont.bind(le),le}return Tt(St,Lt),St.prototype.getUi=function(){var mt=this,kt=document.createElement("div");return kt.style.overflow="hidden",kt.style.flexGrow="2",this.fonts.forEach(function(jt){var Et=document.createElement("div");Et.style.display="inline-block",Et.style.alignItems="center",Et.style.justifyContent="space-between",Et.style.padding="5px",Et.style.borderWidth="2px",Et.style.borderStyle="solid",Et.style.overflow="hidden",Et.style.maxWidth=100/mt.fonts.length-5+"%",Et.style.borderColor=jt===mt.currentFont?mt.uiStyleSettings.toolboxAccentColor:"transparent",Et.addEventListener("click",function(){mt.setCurrentFont(jt,Et)}),kt.appendChild(Et);var le=document.createElement("div");le.style.display="flex",le.style.minHeight="20px",le.style.flexGrow="2",le.style.fontFamily=jt,le.style.overflow="hidden";var We=document.createElement("div");We.style.whiteSpace="nowrap",We.style.overflow="hidden",We.style.textOverflow="ellipsis",We.innerHTML="The quick brown fox jumps over the lazy dog",le.appendChild(We),Et.appendChild(le),mt.fontBoxes.push(Et)}),kt},St.prototype.setCurrentFont=function(mt,kt){var jt=this;this.currentFont=mt,this.fontBoxes.forEach(function(Et){Et.style.borderColor=Et===kt?jt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},St}(vt),un=function(Lt){function St(mt,kt,jt){var Et=Lt.call(this,mt,kt,jt)||this;return Et.color="transparent",Et.padding=5,Et.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Et.text=Et.DEFAULT_TEXT,Et.isMoved=!1,Et.color=jt.defaultColor,Et.fontFamily=jt.defaultFontFamily,Et.defaultSize={x:100,y:30},Et.setColor=Et.setColor.bind(Et),Et.setFont=Et.setFont.bind(Et),Et.renderText=Et.renderText.bind(Et),Et.sizeText=Et.sizeText.bind(Et),Et.textEditDivClicked=Et.textEditDivClicked.bind(Et),Et.showTextEditor=Et.showTextEditor.bind(Et),Et.setSize=Et.setSize.bind(Et),Et.positionTextEditor=Et.positionTextEditor.bind(Et),Et.colorPanel=new wt("Color",jt.defaultColorSet,jt.defaultColor),Et.colorPanel.onColorChanged=Et.setColor,Et.fontFamilyPanel=new Ye("Font",jt.defaultFontFamilies,jt.defaultFontFamily),Et.fontFamilyPanel.onFontChanged=Et.setFont,Et}return Tt(St,Lt),St.prototype.ownsTarget=function(mt){if(Lt.prototype.ownsTarget.call(this,mt)||mt===this.visual||mt===this.textElement||mt===this.bgRectangle)return!0;var kt=!1;return this.textElement.childNodes.forEach(function(jt){jt===mt&&(kt=!0)}),kt},St.prototype.createVisual=function(){this.visual=ce.createGroup(),this.bgRectangle=ce.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ce.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ce.createTransform()),this.textElement.transform.baseVal.appendItem(ce.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},St.prototype.pointerDown=function(mt,kt){Lt.prototype.pointerDown.call(this,mt,kt),this.isMoved=!1,this.pointerDownPoint=mt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},St.prototype.renderText=function(){var mt=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(kt){mt.textElement.appendChild(ce.createTSpan(kt.trim()===""?" ":kt.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},St.prototype.getTextScale=function(){var mt=this.textElement.getBBox(),kt=1;if(mt.width>0&&mt.height>0){var jt=(1*this.width-this.width*this.padding*2/100)/mt.width,Et=(1*this.height-this.height*this.padding*2/100)/mt.height;kt=Math.min(jt,Et)}return kt},St.prototype.getTextPosition=function(mt){var kt=this.textElement.getBBox(),jt=0,Et=0;return kt.width>0&&kt.height>0&&(jt=(this.width-kt.width*mt)/2,Et=this.height/2-kt.height*mt/2),{x:jt,y:Et}},St.prototype.sizeText=function(){var mt=this.textElement.getBBox(),kt=this.getTextScale(),jt=this.getTextPosition(kt);jt.y-=mt.y*kt,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+jt.x+"px, "+jt.y+"px) scale("+kt+", "+kt+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(jt.x,jt.y),this.textElement.transform.baseVal.getItem(1).setScale(kt,kt))},St.prototype.manipulate=function(mt){Lt.prototype.manipulate.call(this,mt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(mt.x-this.pointerDownPoint.x)>5||Math.abs(mt.y-this.pointerDownPoint.y)>5)},St.prototype.resize=function(mt){Lt.prototype.resize.call(this,mt),this.isMoved=!0,this.setSize(),this.sizeText()},St.prototype.setSize=function(){Lt.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ce.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ce.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},St.prototype.pointerUp=function(mt){var kt=this.state;kt==="creating"&&(this._suppressMarkerCreateEvent=!0),Lt.prototype.pointerUp.call(this,mt),this.setSize(),(kt==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},St.prototype.showTextEditor=function(){var mt=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(kt){kt.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var kt=Number.parseFloat(mt.textEditor.style.fontSize);mt.textEditor.clientWidth>=Number.parseInt(mt.textEditor.style.maxWidth)&&kt>.9;)kt-=.1,mt.textEditor.style.fontSize=Math.max(kt,.9)+"em"}),this.textEditor.addEventListener("keyup",function(kt){kt.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(kt){if(kt.clipboardData){var jt=kt.clipboardData.getData("text"),Et=window.getSelection();if(!Et.rangeCount)return!1;Et.deleteFromDocument(),Et.getRangeAt(0).insertNode(document.createTextNode(jt)),kt.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){mt.textEditDivClicked(mt.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},St.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var mt=this.getTextScale(),kt=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),jt=this.textElement.getBBox(),Et={x:jt.width*mt,y:jt.height*mt};kt.x-=Et.x/2,kt.y-=Et.y/2,this.textEditor.style.top=kt.y+"px",this.textEditor.style.left=kt.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-kt.x+"px",this.textEditor.style.fontSize=Math.max(16*mt,12)+"px",this.textElement.style.display="none"}},St.prototype.textEditDivClicked=function(mt){this.text=mt.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},St.prototype.select=function(){Lt.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},St.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Lt.prototype.deselect.call(this)},St.prototype.dblClick=function(mt,kt){Lt.prototype.dblClick.call(this,mt,kt),this.showTextEditor()},St.prototype.setColor=function(mt){this.textElement&&ce.setAttributes(this.textElement,[["fill",mt]]),this.color=mt,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(mt)},St.prototype.setFont=function(mt){this.textElement&&ce.setAttributes(this.textElement,[["font-family",mt]]),this.fontFamily=mt,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},St.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},St.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Lt.prototype.getState.call(this));return mt.typeName=St.typeName,mt},St.prototype.restoreState=function(mt){var kt=mt;this.color=kt.color,this.fontFamily=kt.fontFamily,this.padding=kt.padding,this.text=kt.text,this.createVisual(),Lt.prototype.restoreState.call(this,mt),this.setSize()},St.prototype.scale=function(mt,kt){Lt.prototype.scale.call(this,mt,kt),this.setSize(),this.sizeText(),this.positionTextEditor()},St.typeName="TextMarker",St.title="Text marker",St.icon='',St}(oe),Ln=function(Lt){function St(mt,kt,jt){var Et=Lt.call(this,mt,kt,jt)||this;return Et.color="transparent",Et.lineWidth=3,Et.drawing=!1,Et.pixelRatio=1,Et.color=jt.defaultColor,Et.lineWidth=jt.defaultStrokeWidth,Et.pixelRatio=jt.freehandPixelRatio,Et.setColor=Et.setColor.bind(Et),Et.addCanvas=Et.addCanvas.bind(Et),Et.finishCreation=Et.finishCreation.bind(Et),Et.setLineWidth=Et.setLineWidth.bind(Et),Et.colorPanel=new wt("Color",jt.defaultColorSet,jt.defaultColor),Et.colorPanel.onColorChanged=Et.setColor,Et.lineWidthPanel=new ve("Line width",jt.defaultStrokeWidths,jt.defaultStrokeWidth),Et.lineWidthPanel.onWidthChanged=Et.setLineWidth,Et}return Tt(St,Lt),St.prototype.ownsTarget=function(mt){return!(!Lt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.drawingImage)},St.prototype.createVisual=function(){this.visual=ce.createGroup(),this.drawingImage=ce.createImage(),this.visual.appendChild(this.drawingImage);var mt=ce.createTransform();this.visual.transform.baseVal.appendItem(mt),this.addMarkerVisualToContainer(this.visual)},St.prototype.pointerDown=function(mt,kt){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(mt.x,mt.y),this.drawing=!0):Lt.prototype.pointerDown.call(this,mt,kt)},St.prototype.manipulate=function(mt){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(mt.x,mt.y),this.canvasContext.stroke()):Lt.prototype.manipulate.call(this,mt)},St.prototype.resize=function(mt){Lt.prototype.resize.call(this,mt),ce.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ce.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},St.prototype.pointerUp=function(mt){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Lt.prototype.pointerUp.call(this,mt)},St.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)},St.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Lt.prototype.select.call(this)},St.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Lt.prototype.deselect.call(this)},St.prototype.finishCreation=function(){for(var mt=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),kt=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],jt=kt[0],Et=kt[1],le=kt[2],We=kt[3],ln=!1,en=0;en0&&(ln=!0,enWe&&(We=en),Fn>le&&(le=Fn));if(ln){this.left=jt/this.pixelRatio,this.top=Et/this.pixelRatio,this.width=(le-jt)/this.pixelRatio,this.height=(We-Et)/this.pixelRatio;var ni=document.createElement("canvas");ni.width=le-jt,ni.height=We-Et,ni.getContext("2d").putImageData(this.canvasContext.getImageData(jt,Et,le-jt,We-Et),0,0),this.drawingImgUrl=ni.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},St.prototype.setDrawingImage=function(){ce.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ce.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},St.prototype.setColor=function(mt){this.color=mt,this.colorChanged(mt)},St.prototype.setLineWidth=function(mt){this.lineWidth=mt},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Object.assign({drawingImgUrl:this.drawingImgUrl},Lt.prototype.getState.call(this));return mt.typeName=St.typeName,mt},St.prototype.restoreState=function(mt){this.createVisual(),Lt.prototype.restoreState.call(this,mt),this.drawingImgUrl=mt.drawingImgUrl,this.setDrawingImage()},St.prototype.scale=function(mt,kt){Lt.prototype.scale.call(this,mt,kt),this.setDrawingImage()},St.typeName="FreehandMarker",St.title="Freehand marker",St.icon='',St}(oe),Pe=function(Lt){function St(mt,kt,jt){var Et=Lt.call(this,mt,jt||'')||this;return Et.typeBoxes=[],Et.currentType=kt,Et.setCurrentType=Et.setCurrentType.bind(Et),Et}return Tt(St,Lt),St.prototype.getUi=function(){var mt=this,kt=document.createElement("div");kt.style.display="flex",kt.style.overflow="hidden",kt.style.flexGrow="2";for(var jt=function(We){var ln="both";switch(We){case 0:ln="both";break;case 1:ln="start";break;case 2:ln="end";break;case 3:ln="none"}var en=document.createElement("div");if(en.style.display="flex",en.style.flexGrow="2",en.style.alignItems="center",en.style.justifyContent="space-between",en.style.padding="5px",en.style.borderWidth="2px",en.style.borderStyle="solid",en.style.borderColor=ln===Et.currentType?Et.uiStyleSettings.toolboxAccentColor:"transparent",en.addEventListener("click",function(){mt.setCurrentType(ln,en)}),kt.appendChild(en),ln==="both"||ln==="start"){var Fn=document.createElement("div");Fn.style.display="flex",Fn.style.alignItems="center",Fn.style.minHeight="20px",Fn.innerHTML=` + `),Yt.appendChild(Ge),Yt},St.prototype.setCurrentColor=function(mt,Lt){var zt=this;this.currentColor=mt,this.colorBoxes.forEach(function(Et){Et.style.borderColor=Et===Lt?zt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(mt)},St}(vt),Ft=function(){function kt(St,mt,Lt){this._state="new",this._isSelected=!1,this._container=St,this._overlayContainer=mt,this.globalSettings=Lt,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(kt.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),kt.prototype.ownsTarget=function(St){return!1},Object.defineProperty(kt.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),kt.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},kt.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},kt.prototype.pointerDown=function(St,mt){},kt.prototype.dblClick=function(St,mt){},kt.prototype.manipulate=function(St){},kt.prototype.pointerUp=function(St){this.stateChanged()},kt.prototype.dispose=function(){},kt.prototype.addMarkerVisualToContainer=function(St){this.container.childNodes.length>0?this.container.insertBefore(St,this.container.childNodes[0]):this.container.appendChild(St)},kt.prototype.getState=function(){return{typeName:kt.typeName,state:this.state,notes:this.notes}},kt.prototype.restoreState=function(St){this._state=St.state,this.notes=St.notes},kt.prototype.scale=function(St,mt){},kt.prototype.colorChanged=function(St){this.onColorChanged&&this.onColorChanged(St),this.stateChanged()},kt.prototype.fillColorChanged=function(St){this.onFillColorChanged&&this.onFillColorChanged(St),this.stateChanged()},kt.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var St=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),St.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(St)&&this.onStateChanged(this)}},kt.typeName="MarkerBase",kt}(),It=function(){function kt(){this.findGripByVisual=this.findGripByVisual.bind(this)}return kt.prototype.findGripByVisual=function(St){return this.topLeft.ownsTarget(St)?this.topLeft:this.topCenter.ownsTarget(St)?this.topCenter:this.topRight.ownsTarget(St)?this.topRight:this.centerLeft.ownsTarget(St)?this.centerLeft:this.centerRight.ownsTarget(St)?this.centerRight:this.bottomLeft.ownsTarget(St)?this.bottomLeft:this.bottomCenter.ownsTarget(St)?this.bottomCenter:this.bottomRight.ownsTarget(St)?this.bottomRight:void 0},kt}(),At=function(){function kt(){this.GRIP_SIZE=10,this.visual=ce.createGroup(),this.visual.appendChild(ce.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ce.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return kt.prototype.ownsTarget=function(St){return St===this.visual||St===this.visual.childNodes[0]||St===this.visual.childNodes[1]},kt}(),Wt=function(){function kt(){}return kt.toITransformMatrix=function(St){return{a:St.a,b:St.b,c:St.c,d:St.d,e:St.e,f:St.f}},kt.toSVGMatrix=function(St,mt){return St.a=mt.a,St.b=mt.b,St.c=mt.c,St.d=mt.d,St.e=mt.e,St.f=mt.f,St},kt}(),re=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.left=0,Et.top=0,Et.width=0,Et.height=0,Et.defaultSize={x:50,y:20},Et.offsetX=0,Et.offsetY=0,Et.rotationAngle=0,Et.CB_DISTANCE=10,Et._suppressMarkerCreateEvent=!1,Et.container.transform.baseVal.appendItem(ce.createTransform()),Et.setupControlBox(),Et}return Nt(St,kt),Object.defineProperty(St.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(St.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(St.prototype,"visual",{get:function(){return this._visual},set:function(mt){this._visual=mt;var Lt=ce.createTransform();this._visual.transform.baseVal.appendItem(Lt)},enumerable:!1,configurable:!0}),St.prototype.ownsTarget=function(mt){return!!kt.prototype.ownsTarget.call(this,mt)||!!(this.controlGrips.findGripByVisual(mt)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(mt))},St.prototype.pointerDown=function(mt,Lt){kt.prototype.pointerDown.call(this,mt,Lt),this.state==="new"&&(this.left=mt.x,this.top=mt.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var zt=this.unrotatePoint(mt);if(this.manipulationStartX=zt.x,this.manipulationStartY=zt.y,this.offsetX=zt.x-this.left,this.offsetY=zt.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Lt),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Lt)){this.activeGrip=this.rotatorGrip;var Et=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Et.x-this.width/2,this.top=Et.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Yt=this.container.transform.baseVal.getItem(0);Yt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Yt,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},St.prototype.pointerUp=function(mt){var Lt=this.state;kt.prototype.pointerUp.call(this,mt),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(mt),this._state="select",Lt==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},St.prototype.moveVisual=function(mt){this.visual.style.transform="translate("+mt.x+"px, "+mt.y+"px)"},St.prototype.manipulate=function(mt){var Lt=this.unrotatePoint(mt);this.state==="creating"?this.resize(mt):this.state==="move"?(this.left=this.manipulationStartLeft+(Lt.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Lt.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Lt):this.state==="rotate"&&this.rotate(mt)},St.prototype.resize=function(mt){var Lt=this.manipulationStartLeft,zt=this.manipulationStartWidth,Et=this.manipulationStartTop,Yt=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Lt=this.manipulationStartLeft+mt.x-this.manipulationStartX,zt=this.manipulationStartWidth+this.manipulationStartLeft-Lt;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:zt=this.manipulationStartWidth+mt.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Et=this.manipulationStartTop+mt.y-this.manipulationStartY,Yt=this.manipulationStartHeight+this.manipulationStartTop-Et;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Yt=this.manipulationStartHeight+mt.y-this.manipulationStartY}zt>=0?(this.left=Lt,this.width=zt):(this.left=Lt+zt,this.width=-zt),Yt>=0?(this.top=Et,this.height=Yt):(this.top=Et+Yt,this.height=-Yt),this.setSize()},St.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},St.prototype.rotate=function(mt){if(Math.abs(mt.x-this.centerX)>.1){var Lt=Math.sign(mt.x-this.centerX);this.rotationAngle=180*Math.atan((mt.y-this.centerY)/(mt.x-this.centerX))/Math.PI+90*Lt,this.applyRotation()}},St.prototype.applyRotation=function(){var mt=this.container.transform.baseVal.getItem(0);mt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(mt,0)},St.prototype.rotatePoint=function(mt){if(this.rotationAngle===0)return mt;var Lt=this.container.getCTM(),zt=ce.createPoint(mt.x,mt.y);return{x:(zt=zt.matrixTransform(Lt)).x,y:zt.y}},St.prototype.unrotatePoint=function(mt){if(this.rotationAngle===0)return mt;var Lt=this.container.getCTM();Lt=Lt.inverse();var zt=ce.createPoint(mt.x,mt.y);return{x:(zt=zt.matrixTransform(Lt)).x,y:zt.y}},St.prototype.select=function(){kt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},St.prototype.deselect=function(){kt.prototype.deselect.call(this),this.controlBox.style.display="none"},St.prototype.setupControlBox=function(){this.controlBox=ce.createGroup();var mt=ce.createTransform();mt.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(mt),this.container.appendChild(this.controlBox),this.controlRect=ce.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=ce.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 It,this.addControlGrips(),this.controlBox.style.display="none"},St.prototype.adjustControlBox=function(){var mt=this.controlBox.transform.baseVal.getItem(0);mt.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(mt,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()},St.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()},St.prototype.createGrip=function(){var mt=new At;return mt.visual.transform.baseVal.appendItem(ce.createTransform()),this.controlBox.appendChild(mt.visual),mt},St.prototype.positionGrips=function(){var mt=this.controlGrips.topLeft.GRIP_SIZE,Lt=-mt/2,zt=Lt,Et=(this.width+this.CB_DISTANCE)/2-mt/2,Yt=(this.height+this.CB_DISTANCE)/2-mt/2,Ge=this.height+this.CB_DISTANCE-mt/2,ln=this.width+this.CB_DISTANCE-mt/2;this.positionGrip(this.controlGrips.topLeft.visual,Lt,zt),this.positionGrip(this.controlGrips.topCenter.visual,Et,zt),this.positionGrip(this.controlGrips.topRight.visual,ln,zt),this.positionGrip(this.controlGrips.centerLeft.visual,Lt,Yt),this.positionGrip(this.controlGrips.centerRight.visual,ln,Yt),this.positionGrip(this.controlGrips.bottomLeft.visual,Lt,Ge),this.positionGrip(this.controlGrips.bottomCenter.visual,Et,Ge),this.positionGrip(this.controlGrips.bottomRight.visual,ln,Ge),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Et,zt-3*this.CB_DISTANCE)},St.prototype.positionGrip=function(mt,Lt,zt){var Et=mt.transform.baseVal.getItem(0);Et.setTranslate(Lt,zt),mt.transform.baseVal.replaceItem(Et,0)},St.prototype.hideControlBox=function(){this.controlBox.style.display="none"},St.prototype.showControlBox=function(){this.controlBox.style.display=""},St.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Wt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Wt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},kt.prototype.getState.call(this))},St.prototype.restoreState=function(mt){kt.prototype.restoreState.call(this,mt);var Lt=mt;this.left=Lt.left,this.top=Lt.top,this.width=Lt.width,this.height=Lt.height,this.rotationAngle=Lt.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(Wt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Lt.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Wt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Lt.containerTransformMatrix))},St.prototype.scale=function(mt,Lt){kt.prototype.scale.call(this,mt,Lt);var zt=this.rotatePoint({x:this.left,y:this.top}),Et=this.unrotatePoint({x:zt.x*mt,y:zt.y*Lt});this.left=Et.x,this.top=Et.y,this.width=this.width*mt,this.height=this.height*Lt,this.adjustControlBox()},St}(Ft),ne=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.fillColor="transparent",Et.strokeColor="transparent",Et.strokeWidth=0,Et.strokeDasharray="",Et.opacity=1,Et.setStrokeColor=Et.setStrokeColor.bind(Et),Et.setFillColor=Et.setFillColor.bind(Et),Et.setStrokeWidth=Et.setStrokeWidth.bind(Et),Et.setStrokeDasharray=Et.setStrokeDasharray.bind(Et),Et.createVisual=Et.createVisual.bind(Et),Et}return Nt(St,kt),St.prototype.ownsTarget=function(mt){return!(!kt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual)},St.prototype.createVisual=function(){this.visual=ce.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)},St.prototype.pointerDown=function(mt,Lt){kt.prototype.pointerDown.call(this,mt,Lt),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},St.prototype.manipulate=function(mt){kt.prototype.manipulate.call(this,mt)},St.prototype.resize=function(mt){kt.prototype.resize.call(this,mt),this.setSize()},St.prototype.setSize=function(){kt.prototype.setSize.call(this),ce.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},St.prototype.pointerUp=function(mt){kt.prototype.pointerUp.call(this,mt),this.setSize()},St.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.visual&&ce.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(mt),this.stateChanged()},St.prototype.setFillColor=function(mt){this.fillColor=mt,this.visual&&ce.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},St.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.visual&&ce.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},St.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.visual&&ce.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},St.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},kt.prototype.getState.call(this))},St.prototype.restoreState=function(mt){var Lt=mt;this.fillColor=Lt.fillColor,this.strokeColor=Lt.strokeColor,this.strokeWidth=Lt.strokeWidth,this.strokeDasharray=Lt.strokeDasharray,this.opacity=Lt.opacity,this.createVisual(),kt.prototype.restoreState.call(this,mt),this.setSize()},St.prototype.scale=function(mt,Lt){kt.prototype.scale.call(this,mt,Lt),this.setSize()},St.title="Rectangle marker",St}(re),me=function(kt){function St(mt,Lt,zt,Et){var Yt=kt.call(this,mt,Et||'')||this;return Yt.widths=[],Yt.widthBoxes=[],Yt.widths=Lt,Yt.currentWidth=zt,Yt.setCurrentWidth=Yt.setCurrentWidth.bind(Yt),Yt}return Nt(St,kt),St.prototype.getUi=function(){var mt=this,Lt=document.createElement("div");return Lt.style.display="flex",Lt.style.overflow="hidden",Lt.style.flexGrow="2",this.widths.forEach(function(zt){var Et=document.createElement("div");Et.style.display="flex",Et.style.flexGrow="2",Et.style.alignItems="center",Et.style.justifyContent="space-between",Et.style.padding="5px",Et.style.borderWidth="2px",Et.style.borderStyle="solid",Et.style.borderColor=zt===mt.currentWidth?mt.uiStyleSettings.toolboxAccentColor:"transparent",Et.addEventListener("click",function(){mt.setCurrentWidth(zt,Et)}),Lt.appendChild(Et);var Yt=document.createElement("div");Yt.innerText=zt.toString(),Yt.style.marginRight="5px",Et.appendChild(Yt);var Ge=document.createElement("div");Ge.style.minHeight="20px",Ge.style.flexGrow="2",Ge.style.display="flex",Ge.style.alignItems="center";var ln=document.createElement("hr");ln.style.minWidth="20px",ln.style.border="0px",ln.style.borderTop=zt+"px solid "+mt.uiStyleSettings.toolboxColor,ln.style.flexGrow="2",Ge.appendChild(ln),Et.appendChild(Ge),mt.widthBoxes.push(Et)}),Lt},St.prototype.setCurrentWidth=function(mt,Lt){var zt=this;this.currentWidth=mt,this.widthBoxes.forEach(function(Et){Et.style.borderColor=Et===Lt?zt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},St}(vt),Vt=function(kt){function St(mt,Lt,zt,Et){var Yt=kt.call(this,mt,Et||'')||this;return Yt.styles=[],Yt.styleBoxes=[],Yt.styles=Lt,Yt.currentStyle=zt,Yt.setCurrentStyle=Yt.setCurrentStyle.bind(Yt),Yt}return Nt(St,kt),St.prototype.getUi=function(){var mt=this,Lt=document.createElement("div");return Lt.style.display="flex",Lt.style.overflow="hidden",Lt.style.flexGrow="2",this.styles.forEach(function(zt){var Et=document.createElement("div");Et.style.display="flex",Et.style.alignItems="center",Et.style.justifyContent="space-between",Et.style.padding="5px",Et.style.borderWidth="2px",Et.style.borderStyle="solid",Et.style.overflow="hidden",Et.style.maxWidth=100/mt.styles.length-5+"%",Et.style.borderColor=zt===mt.currentStyle?mt.uiStyleSettings.toolboxAccentColor:"transparent",Et.addEventListener("click",function(){mt.setCurrentStyle(zt,Et)}),Lt.appendChild(Et);var Yt=document.createElement("div");Yt.style.minHeight="20px",Yt.style.flexGrow="2",Yt.style.overflow="hidden";var Ge=` + + `;Yt.innerHTML=Ge,Et.appendChild(Yt),mt.styleBoxes.push(Et)}),Lt},St.prototype.setCurrentStyle=function(mt,Lt){var zt=this;this.currentStyle=mt,this.styleBoxes.forEach(function(Et){Et.style.borderColor=Et===Lt?zt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},St}(vt),Le=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.strokeColor=zt.defaultColor,Et.strokeWidth=zt.defaultStrokeWidth,Et.strokeDasharray=zt.defaultStrokeDasharray,Et.strokePanel=new wt("Line color",zt.defaultColorSet,zt.defaultColor),Et.strokePanel.onColorChanged=Et.setStrokeColor,Et.strokeWidthPanel=new me("Line width",zt.defaultStrokeWidths,zt.defaultStrokeWidth),Et.strokeWidthPanel.onWidthChanged=Et.setStrokeWidth,Et.strokeStylePanel=new Vt("Line style",zt.defaultStrokeDasharrays,zt.defaultStrokeDasharray),Et.strokeStylePanel.onStyleChanged=Et.setStrokeDasharray,Et}return Nt(St,kt),Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=kt.prototype.getState.call(this);return mt.typeName=St.typeName,mt},St.typeName="FrameMarker",St.title="Frame marker",St.icon='',St}(ne),he=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"},He=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.x1=0,Et.y1=0,Et.x2=0,Et.y2=0,Et.defaultLength=50,Et.manipulationStartX=0,Et.manipulationStartY=0,Et.manipulationStartX1=0,Et.manipulationStartY1=0,Et.manipulationStartX2=0,Et.manipulationStartY2=0,Et.setupControlBox(),Et}return Nt(St,kt),St.prototype.ownsTarget=function(mt){return!!kt.prototype.ownsTarget.call(this,mt)||!(!this.grip1.ownsTarget(mt)&&!this.grip2.ownsTarget(mt))},St.prototype.pointerDown=function(mt,Lt){kt.prototype.pointerDown.call(this,mt,Lt),this.manipulationStartX=mt.x,this.manipulationStartY=mt.y,this.state==="new"&&(this.x1=mt.x,this.y1=mt.y,this.x2=mt.x,this.y2=mt.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(Lt)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Lt)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},St.prototype.pointerUp=function(mt){var Lt=this.state;kt.prototype.pointerUp.call(this,mt),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(mt),this._state="select",Lt==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},St.prototype.adjustVisual=function(){},St.prototype.manipulate=function(mt){this.state==="creating"?this.resize(mt):this.state==="move"?(this.x1=this.manipulationStartX1+mt.x-this.manipulationStartX,this.y1=this.manipulationStartY1+mt.y-this.manipulationStartY,this.x2=this.manipulationStartX2+mt.x-this.manipulationStartX,this.y2=this.manipulationStartY2+mt.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(mt)},St.prototype.resize=function(mt){switch(this.activeGrip){case this.grip1:this.x1=mt.x,this.y1=mt.y;break;case this.grip2:case void 0:this.x2=mt.x,this.y2=mt.y}this.adjustVisual(),this.adjustControlBox()},St.prototype.select=function(){kt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},St.prototype.deselect=function(){kt.prototype.deselect.call(this),this.controlBox.style.display="none"},St.prototype.setupControlBox=function(){this.controlBox=ce.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},St.prototype.adjustControlBox=function(){this.positionGrips()},St.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},St.prototype.createGrip=function(){var mt=new At;return mt.visual.transform.baseVal.appendItem(ce.createTransform()),this.controlBox.appendChild(mt.visual),mt},St.prototype.positionGrips=function(){var mt=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-mt/2,this.y1-mt/2),this.positionGrip(this.grip2.visual,this.x2-mt/2,this.y2-mt/2)},St.prototype.positionGrip=function(mt,Lt,zt){var Et=mt.transform.baseVal.getItem(0);Et.setTranslate(Lt,zt),mt.transform.baseVal.replaceItem(Et,0)},St.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},kt.prototype.getState.call(this))},St.prototype.restoreState=function(mt){kt.prototype.restoreState.call(this,mt);var Lt=mt;this.x1=Lt.x1,this.y1=Lt.y1,this.x2=Lt.x2,this.y2=Lt.y2},St.prototype.scale=function(mt,Lt){kt.prototype.scale.call(this,mt,Lt),this.x1=this.x1*mt,this.y1=this.y1*Lt,this.x2=this.x2*mt,this.y2=this.y2*Lt,this.adjustVisual(),this.adjustControlBox()},St}(Ft),Ke=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.strokeColor="transparent",Et.strokeWidth=0,Et.strokeDasharray="",Et.setStrokeColor=Et.setStrokeColor.bind(Et),Et.setStrokeWidth=Et.setStrokeWidth.bind(Et),Et.setStrokeDasharray=Et.setStrokeDasharray.bind(Et),Et.strokeColor=zt.defaultColor,Et.strokeWidth=zt.defaultStrokeWidth,Et.strokeDasharray=zt.defaultStrokeDasharray,Et.strokePanel=new wt("Line color",zt.defaultColorSet,zt.defaultColor),Et.strokePanel.onColorChanged=Et.setStrokeColor,Et.strokeWidthPanel=new me("Line width",zt.defaultStrokeWidths,zt.defaultStrokeWidth),Et.strokeWidthPanel.onWidthChanged=Et.setStrokeWidth,Et.strokeStylePanel=new Vt("Line style",zt.defaultStrokeDasharrays,zt.defaultStrokeDasharray),Et.strokeStylePanel.onStyleChanged=Et.setStrokeDasharray,Et}return Nt(St,kt),St.prototype.ownsTarget=function(mt){return!(!kt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.selectorLine&&mt!==this.visibleLine)},St.prototype.createVisual=function(){this.visual=ce.createGroup(),this.selectorLine=ce.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ce.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)},St.prototype.pointerDown=function(mt,Lt){kt.prototype.pointerDown.call(this,mt,Lt),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},St.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()),ce.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ce.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ce.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},St.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.adjustVisual(),this.colorChanged(mt)},St.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.adjustVisual()},St.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},kt.prototype.getState.call(this));return mt.typeName=St.typeName,mt},St.prototype.restoreState=function(mt){kt.prototype.restoreState.call(this,mt);var Lt=mt;this.strokeColor=Lt.strokeColor,this.strokeWidth=Lt.strokeWidth,this.strokeDasharray=Lt.strokeDasharray,this.createVisual(),this.adjustVisual()},St.typeName="LineMarker",St.title="Line marker",St.icon='',St}(He),Ve=function(kt){function St(mt,Lt,zt,Et){var Yt=kt.call(this,mt,Et||'')||this;return Yt.fonts=[],Yt.fontBoxes=[],Yt.fonts=Lt,Yt.currentFont=zt,Yt.setCurrentFont=Yt.setCurrentFont.bind(Yt),Yt}return Nt(St,kt),St.prototype.getUi=function(){var mt=this,Lt=document.createElement("div");return Lt.style.overflow="hidden",Lt.style.flexGrow="2",this.fonts.forEach(function(zt){var Et=document.createElement("div");Et.style.display="inline-block",Et.style.alignItems="center",Et.style.justifyContent="space-between",Et.style.padding="5px",Et.style.borderWidth="2px",Et.style.borderStyle="solid",Et.style.overflow="hidden",Et.style.maxWidth=100/mt.fonts.length-5+"%",Et.style.borderColor=zt===mt.currentFont?mt.uiStyleSettings.toolboxAccentColor:"transparent",Et.addEventListener("click",function(){mt.setCurrentFont(zt,Et)}),Lt.appendChild(Et);var Yt=document.createElement("div");Yt.style.display="flex",Yt.style.minHeight="20px",Yt.style.flexGrow="2",Yt.style.fontFamily=zt,Yt.style.overflow="hidden";var Ge=document.createElement("div");Ge.style.whiteSpace="nowrap",Ge.style.overflow="hidden",Ge.style.textOverflow="ellipsis",Ge.innerHTML="The quick brown fox jumps over the lazy dog",Yt.appendChild(Ge),Et.appendChild(Yt),mt.fontBoxes.push(Et)}),Lt},St.prototype.setCurrentFont=function(mt,Lt){var zt=this;this.currentFont=mt,this.fontBoxes.forEach(function(Et){Et.style.borderColor=Et===Lt?zt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},St}(vt),sn=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.color="transparent",Et.padding=5,Et.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Et.text=Et.DEFAULT_TEXT,Et.isMoved=!1,Et.color=zt.defaultColor,Et.fontFamily=zt.defaultFontFamily,Et.defaultSize={x:100,y:30},Et.setColor=Et.setColor.bind(Et),Et.setFont=Et.setFont.bind(Et),Et.renderText=Et.renderText.bind(Et),Et.sizeText=Et.sizeText.bind(Et),Et.textEditDivClicked=Et.textEditDivClicked.bind(Et),Et.showTextEditor=Et.showTextEditor.bind(Et),Et.setSize=Et.setSize.bind(Et),Et.positionTextEditor=Et.positionTextEditor.bind(Et),Et.colorPanel=new wt("Color",zt.defaultColorSet,zt.defaultColor),Et.colorPanel.onColorChanged=Et.setColor,Et.fontFamilyPanel=new Ve("Font",zt.defaultFontFamilies,zt.defaultFontFamily),Et.fontFamilyPanel.onFontChanged=Et.setFont,Et}return Nt(St,kt),St.prototype.ownsTarget=function(mt){if(kt.prototype.ownsTarget.call(this,mt)||mt===this.visual||mt===this.textElement||mt===this.bgRectangle)return!0;var Lt=!1;return this.textElement.childNodes.forEach(function(zt){zt===mt&&(Lt=!0)}),Lt},St.prototype.createVisual=function(){this.visual=ce.createGroup(),this.bgRectangle=ce.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ce.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ce.createTransform()),this.textElement.transform.baseVal.appendItem(ce.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},St.prototype.pointerDown=function(mt,Lt){kt.prototype.pointerDown.call(this,mt,Lt),this.isMoved=!1,this.pointerDownPoint=mt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},St.prototype.renderText=function(){var mt=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(Lt){mt.textElement.appendChild(ce.createTSpan(Lt.trim()===""?" ":Lt.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},St.prototype.getTextScale=function(){var mt=this.textElement.getBBox(),Lt=1;if(mt.width>0&&mt.height>0){var zt=(1*this.width-this.width*this.padding*2/100)/mt.width,Et=(1*this.height-this.height*this.padding*2/100)/mt.height;Lt=Math.min(zt,Et)}return Lt},St.prototype.getTextPosition=function(mt){var Lt=this.textElement.getBBox(),zt=0,Et=0;return Lt.width>0&&Lt.height>0&&(zt=(this.width-Lt.width*mt)/2,Et=this.height/2-Lt.height*mt/2),{x:zt,y:Et}},St.prototype.sizeText=function(){var mt=this.textElement.getBBox(),Lt=this.getTextScale(),zt=this.getTextPosition(Lt);zt.y-=mt.y*Lt,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+zt.x+"px, "+zt.y+"px) scale("+Lt+", "+Lt+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(zt.x,zt.y),this.textElement.transform.baseVal.getItem(1).setScale(Lt,Lt))},St.prototype.manipulate=function(mt){kt.prototype.manipulate.call(this,mt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(mt.x-this.pointerDownPoint.x)>5||Math.abs(mt.y-this.pointerDownPoint.y)>5)},St.prototype.resize=function(mt){kt.prototype.resize.call(this,mt),this.isMoved=!0,this.setSize(),this.sizeText()},St.prototype.setSize=function(){kt.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ce.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ce.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},St.prototype.pointerUp=function(mt){var Lt=this.state;Lt==="creating"&&(this._suppressMarkerCreateEvent=!0),kt.prototype.pointerUp.call(this,mt),this.setSize(),(Lt==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},St.prototype.showTextEditor=function(){var mt=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(Lt){Lt.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Lt=Number.parseFloat(mt.textEditor.style.fontSize);mt.textEditor.clientWidth>=Number.parseInt(mt.textEditor.style.maxWidth)&&Lt>.9;)Lt-=.1,mt.textEditor.style.fontSize=Math.max(Lt,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Lt){Lt.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Lt){if(Lt.clipboardData){var zt=Lt.clipboardData.getData("text"),Et=window.getSelection();if(!Et.rangeCount)return!1;Et.deleteFromDocument(),Et.getRangeAt(0).insertNode(document.createTextNode(zt)),Lt.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){mt.textEditDivClicked(mt.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},St.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var mt=this.getTextScale(),Lt=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),zt=this.textElement.getBBox(),Et={x:zt.width*mt,y:zt.height*mt};Lt.x-=Et.x/2,Lt.y-=Et.y/2,this.textEditor.style.top=Lt.y+"px",this.textEditor.style.left=Lt.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Lt.x+"px",this.textEditor.style.fontSize=Math.max(16*mt,12)+"px",this.textElement.style.display="none"}},St.prototype.textEditDivClicked=function(mt){this.text=mt.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},St.prototype.select=function(){kt.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},St.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),kt.prototype.deselect.call(this)},St.prototype.dblClick=function(mt,Lt){kt.prototype.dblClick.call(this,mt,Lt),this.showTextEditor()},St.prototype.setColor=function(mt){this.textElement&&ce.setAttributes(this.textElement,[["fill",mt]]),this.color=mt,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(mt)},St.prototype.setFont=function(mt){this.textElement&&ce.setAttributes(this.textElement,[["font-family",mt]]),this.fontFamily=mt,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},St.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},St.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},kt.prototype.getState.call(this));return mt.typeName=St.typeName,mt},St.prototype.restoreState=function(mt){var Lt=mt;this.color=Lt.color,this.fontFamily=Lt.fontFamily,this.padding=Lt.padding,this.text=Lt.text,this.createVisual(),kt.prototype.restoreState.call(this,mt),this.setSize()},St.prototype.scale=function(mt,Lt){kt.prototype.scale.call(this,mt,Lt),this.setSize(),this.sizeText(),this.positionTextEditor()},St.typeName="TextMarker",St.title="Text marker",St.icon='',St}(re),Mn=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.color="transparent",Et.lineWidth=3,Et.drawing=!1,Et.pixelRatio=1,Et.color=zt.defaultColor,Et.lineWidth=zt.defaultStrokeWidth,Et.pixelRatio=zt.freehandPixelRatio,Et.setColor=Et.setColor.bind(Et),Et.addCanvas=Et.addCanvas.bind(Et),Et.finishCreation=Et.finishCreation.bind(Et),Et.setLineWidth=Et.setLineWidth.bind(Et),Et.colorPanel=new wt("Color",zt.defaultColorSet,zt.defaultColor),Et.colorPanel.onColorChanged=Et.setColor,Et.lineWidthPanel=new me("Line width",zt.defaultStrokeWidths,zt.defaultStrokeWidth),Et.lineWidthPanel.onWidthChanged=Et.setLineWidth,Et}return Nt(St,kt),St.prototype.ownsTarget=function(mt){return!(!kt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.drawingImage)},St.prototype.createVisual=function(){this.visual=ce.createGroup(),this.drawingImage=ce.createImage(),this.visual.appendChild(this.drawingImage);var mt=ce.createTransform();this.visual.transform.baseVal.appendItem(mt),this.addMarkerVisualToContainer(this.visual)},St.prototype.pointerDown=function(mt,Lt){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(mt.x,mt.y),this.drawing=!0):kt.prototype.pointerDown.call(this,mt,Lt)},St.prototype.manipulate=function(mt){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(mt.x,mt.y),this.canvasContext.stroke()):kt.prototype.manipulate.call(this,mt)},St.prototype.resize=function(mt){kt.prototype.resize.call(this,mt),ce.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ce.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},St.prototype.pointerUp=function(mt){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):kt.prototype.pointerUp.call(this,mt)},St.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)},St.prototype.select=function(){this.state==="creating"&&this.finishCreation(),kt.prototype.select.call(this)},St.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),kt.prototype.deselect.call(this)},St.prototype.finishCreation=function(){for(var mt=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Lt=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],zt=Lt[0],Et=Lt[1],Yt=Lt[2],Ge=Lt[3],ln=!1,qe=0;qe0&&(ln=!0,qeGe&&(Ge=qe),Nn>Yt&&(Yt=Nn));if(ln){this.left=zt/this.pixelRatio,this.top=Et/this.pixelRatio,this.width=(Yt-zt)/this.pixelRatio,this.height=(Ge-Et)/this.pixelRatio;var ai=document.createElement("canvas");ai.width=Yt-zt,ai.height=Ge-Et,ai.getContext("2d").putImageData(this.canvasContext.getImageData(zt,Et,Yt-zt,Ge-Et),0,0),this.drawingImgUrl=ai.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},St.prototype.setDrawingImage=function(){ce.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ce.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},St.prototype.setColor=function(mt){this.color=mt,this.colorChanged(mt)},St.prototype.setLineWidth=function(mt){this.lineWidth=mt},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Object.assign({drawingImgUrl:this.drawingImgUrl},kt.prototype.getState.call(this));return mt.typeName=St.typeName,mt},St.prototype.restoreState=function(mt){this.createVisual(),kt.prototype.restoreState.call(this,mt),this.drawingImgUrl=mt.drawingImgUrl,this.setDrawingImage()},St.prototype.scale=function(mt,Lt){kt.prototype.scale.call(this,mt,Lt),this.setDrawingImage()},St.typeName="FreehandMarker",St.title="Freehand marker",St.icon='',St}(re),xe=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,zt||'')||this;return Et.typeBoxes=[],Et.currentType=Lt,Et.setCurrentType=Et.setCurrentType.bind(Et),Et}return Nt(St,kt),St.prototype.getUi=function(){var mt=this,Lt=document.createElement("div");Lt.style.display="flex",Lt.style.overflow="hidden",Lt.style.flexGrow="2";for(var zt=function(Ge){var ln="both";switch(Ge){case 0:ln="both";break;case 1:ln="start";break;case 2:ln="end";break;case 3:ln="none"}var qe=document.createElement("div");if(qe.style.display="flex",qe.style.flexGrow="2",qe.style.alignItems="center",qe.style.justifyContent="space-between",qe.style.padding="5px",qe.style.borderWidth="2px",qe.style.borderStyle="solid",qe.style.borderColor=ln===Et.currentType?Et.uiStyleSettings.toolboxAccentColor:"transparent",qe.addEventListener("click",function(){mt.setCurrentType(ln,qe)}),Lt.appendChild(qe),ln==="both"||ln==="start"){var Nn=document.createElement("div");Nn.style.display="flex",Nn.style.alignItems="center",Nn.style.minHeight="20px",Nn.innerHTML=` - `,Fn.style.marginLeft="5px",en.appendChild(Fn)}var ni=document.createElement("div");ni.style.display="flex",ni.style.alignItems="center",ni.style.minHeight="20px",ni.style.flexGrow="2";var _n=document.createElement("hr");if(_n.style.minWidth="20px",_n.style.border="0px",_n.style.borderTop="3px solid "+(Et.uiStyleSettings!==void 0?Et.uiStyleSettings.toolboxColor:"#eeeeee"),_n.style.flexGrow="2",ni.appendChild(_n),en.appendChild(ni),ln==="both"||ln==="end"){var li=document.createElement("div");li.style.display="flex",li.style.alignItems="center",li.style.minHeight="20px",li.innerHTML=` + `,Nn.style.marginLeft="5px",qe.appendChild(Nn)}var ai=document.createElement("div");ai.style.display="flex",ai.style.alignItems="center",ai.style.minHeight="20px",ai.style.flexGrow="2";var Kn=document.createElement("hr");if(Kn.style.minWidth="20px",Kn.style.border="0px",Kn.style.borderTop="3px solid "+(Et.uiStyleSettings!==void 0?Et.uiStyleSettings.toolboxColor:"#eeeeee"),Kn.style.flexGrow="2",ai.appendChild(Kn),qe.appendChild(ai),ln==="both"||ln==="end"){var ci=document.createElement("div");ci.style.display="flex",ci.style.alignItems="center",ci.style.minHeight="20px",ci.innerHTML=` - `,li.style.marginRight="5px",en.appendChild(li)}Et.typeBoxes.push(en)},Et=this,le=0;le<4;le++)jt(le);return kt},St.prototype.setCurrentType=function(mt,kt){var jt=this;this.currentType=mt,this.typeBoxes.forEach(function(Et){Et.style.borderColor=Et===kt?jt.uiStyleSettings!==void 0?jt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},St}(vt),Gt=function(Lt){function St(mt,kt,jt){var Et=Lt.call(this,mt,kt,jt)||this;return Et.arrowType="end",Et.arrowBaseHeight=10,Et.arrowBaseWidth=10,Et.getArrowPoints=Et.getArrowPoints.bind(Et),Et.setArrowType=Et.setArrowType.bind(Et),Et.arrowTypePanel=new Pe("Arrow type","end"),Et.arrowTypePanel.onArrowTypeChanged=Et.setArrowType,Et}return Tt(St,Lt),St.prototype.ownsTarget=function(mt){return!(!Lt.prototype.ownsTarget.call(this,mt)&&mt!==this.arrow1&&mt!==this.arrow2)},St.prototype.getArrowPoints=function(mt,kt){var jt=this.arrowBaseWidth+2*this.strokeWidth,Et=this.arrowBaseHeight+2*this.strokeWidth;return mt-jt/2+","+(kt+Et/2)+" "+mt+","+(kt-Et/2)+" "+(mt+jt/2)+","+(kt+Et/2)},St.prototype.createTips=function(){this.arrow1=ce.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ce.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ce.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ce.createTransform()),this.visual.appendChild(this.arrow2)},St.prototype.pointerDown=function(mt,kt){Lt.prototype.pointerDown.call(this,mt,kt),this.state==="creating"&&this.createTips()},St.prototype.adjustVisual=function(){if(Lt.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",ce.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ce.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var mt=0;Math.abs(this.x1-this.x2)>.1&&(mt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var kt=this.arrow1.transform.baseVal.getItem(0);kt.setRotate(mt,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(kt,0);var jt=this.arrow2.transform.baseVal.getItem(0);jt.setRotate(mt+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(jt,0)}},St.prototype.setArrowType=function(mt){this.arrowType=mt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Object.assign({arrowType:this.arrowType},Lt.prototype.getState.call(this));return mt.typeName=St.typeName,mt},St.prototype.restoreState=function(mt){Lt.prototype.restoreState.call(this,mt);var kt=mt;this.arrowType=kt.arrowType,this.createTips(),this.adjustVisual()},St.typeName="ArrowMarker",St.title="Arrow marker",St.icon='',St}(Ue),qe=function(Lt){function St(mt,kt,jt){var Et=Lt.call(this,mt,kt,jt)||this;return Et.fillColor=jt.defaultFillColor,Et.strokeWidth=0,Et.fillPanel=new wt("Color",jt.defaultColorSet,jt.defaultFillColor),Et.fillPanel.onColorChanged=Et.setFillColor,Et}return Tt(St,Lt),Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Lt.prototype.getState.call(this);return mt.typeName=St.typeName,mt},St.typeName="CoverMarker",St.title="Cover marker",St.icon='',St}(ee),Bn=function(Lt){function St(mt,kt,jt,Et){var le=Lt.call(this,mt,Et||'')||this;return le.opacities=[],le.opacityBoxes=[],le.opacities=kt,le.currentOpacity=jt,le.setCurrentOpacity=le.setCurrentOpacity.bind(le),le}return Tt(St,Lt),St.prototype.getUi=function(){var mt=this,kt=document.createElement("div");return kt.style.display="flex",kt.style.overflow="hidden",kt.style.flexGrow="2",kt.style.justifyContent="space-between",this.opacities.forEach(function(jt){var Et=document.createElement("div");Et.style.display="flex",Et.style.alignItems="center",Et.style.justifyContent="center",Et.style.padding="5px",Et.style.borderWidth="2px",Et.style.borderStyle="solid",Et.style.borderColor=jt===mt.currentOpacity?mt.uiStyleSettings.toolboxAccentColor:"transparent",Et.addEventListener("click",function(){mt.setCurrentOpacity(jt,Et)}),kt.appendChild(Et);var le=document.createElement("div");le.innerText=100*jt+"%",Et.appendChild(le),mt.opacityBoxes.push(Et)}),kt},St.prototype.setCurrentOpacity=function(mt,kt){var jt=this;this.currentOpacity=mt,this.opacityBoxes.forEach(function(Et){Et.style.borderColor=Et===kt?jt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},St}(vt),zn=function(Lt){function St(mt,kt,jt){var Et=Lt.call(this,mt,kt,jt)||this;return Et.setOpacity=Et.setOpacity.bind(Et),Et.fillColor=jt.defaultHighlightColor,Et.strokeWidth=0,Et.opacity=jt.defaultHighlightOpacity,Et.fillPanel=new wt("Color",jt.defaultColorSet,Et.fillColor),Et.fillPanel.onColorChanged=Et.setFillColor,Et.opacityPanel=new Bn("Opacity",jt.defaultOpacitySteps,Et.opacity),Et.opacityPanel.onOpacityChanged=Et.setOpacity,Et}return Tt(St,Lt),St.prototype.setOpacity=function(mt){this.opacity=mt,this.visual&&ce.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Lt.prototype.getState.call(this);return mt.typeName=St.typeName,mt},St.typeName="HighlightMarker",St.title="Highlight marker",St.icon='',St}(qe),He='',Fe='',cn=function(Lt){function St(mt,kt,jt){var Et=Lt.call(this,mt,kt,jt)||this;return Et.bgColor="transparent",Et.tipPosition={x:0,y:0},Et.tipBase1Position={x:0,y:0},Et.tipBase2Position={x:0,y:0},Et.tipMoving=!1,Et.color=jt.defaultStrokeColor,Et.bgColor=jt.defaultFillColor,Et.fontFamily=jt.defaultFontFamily,Et.defaultSize={x:100,y:30},Et.setBgColor=Et.setBgColor.bind(Et),Et.getTipPoints=Et.getTipPoints.bind(Et),Et.positionTip=Et.positionTip.bind(Et),Et.setTipPoints=Et.setTipPoints.bind(Et),Et.colorPanel=new wt("Text color",jt.defaultColorSet,Et.color,He),Et.colorPanel.onColorChanged=Et.setColor,Et.bgColorPanel=new wt("Fill color",jt.defaultColorSet,Et.bgColor,Fe),Et.bgColorPanel.onColorChanged=Et.setBgColor,Et.fontFamilyPanel=new Ye("Font",jt.defaultFontFamilies,jt.defaultFontFamily),Et.fontFamilyPanel.onFontChanged=Et.setFont,Et.tipGrip=new Rt,Et.tipGrip.visual.transform.baseVal.appendItem(ce.createTransform()),Et.controlBox.appendChild(Et.tipGrip.visual),Et}return Tt(St,Lt),St.prototype.ownsTarget=function(mt){return Lt.prototype.ownsTarget.call(this,mt)||this.tipGrip.ownsTarget(mt)||this.tip===mt},St.prototype.createTip=function(){ce.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ce.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},St.prototype.pointerDown=function(mt,kt){this.state==="new"&&Lt.prototype.pointerDown.call(this,mt,kt),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(kt)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Lt.prototype.pointerDown.call(this,mt,kt)},St.prototype.pointerUp=function(mt){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Lt.prototype.pointerUp.call(this,mt);else{var kt=this.state==="creating";Lt.prototype.pointerUp.call(this,mt),this.setTipPoints(kt),this.positionTip()}},St.prototype.manipulate=function(mt){if(this.tipMoving){var kt=this.unrotatePoint(mt);this.tipPosition={x:kt.x-this.manipulationStartLeft,y:kt.y-this.manipulationStartTop},this.positionTip()}else Lt.prototype.manipulate.call(this,mt)},St.prototype.setBgColor=function(mt){this.bgRectangle&&this.tip&&(ce.setAttributes(this.bgRectangle,[["fill",mt]]),ce.setAttributes(this.tip,[["fill",mt]])),this.bgColor=mt,this.fillColorChanged(mt)},St.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},St.prototype.setTipPoints=function(mt){mt===void 0&&(mt=!1);var kt=Math.min(this.height/2,15),jt=this.height/5;mt&&(this.tipPosition={x:kt+jt/2,y:this.height+20});var Et=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?Et.1)){var mt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),kt=this.tip1.transform.baseVal.getItem(0);kt.setRotate(mt,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(kt,0);var jt=this.tip2.transform.baseVal.getItem(0);jt.setRotate(mt+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(jt,0)}},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Lt.prototype.getState.call(this);return mt.typeName=St.typeName,mt},St.prototype.restoreState=function(mt){Lt.prototype.restoreState.call(this,mt),this.createTips(),this.adjustVisual()},St.typeName="MeasurementMarker",St.title="Measurement marker",St.icon='',St}(Ue),dn=function(Lt){function St(mt,kt,jt){var Et=Lt.call(this,mt,kt,jt)||this;return Et.strokePanel.colors=jt.defaultColorSet,Et.fillColor="transparent",Et}return Tt(St,Lt),Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Lt.prototype.getState.call(this);return mt.typeName=St.typeName,mt},St.typeName="EllipseFrameMarker",St.title="Ellipse frame marker",St.icon='',St}(Wn),de=function(){function Lt(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Lt.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Lt.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Lt.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Lt.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Lt.prototype.addUndoStep=function(St){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(St)||(this.undoStack.push(St),JSON.stringify(this.lastRedoStep)!==JSON.stringify(St)&&this.redoStack.splice(0,this.redoStack.length))},Lt.prototype.replaceLastUndoStep=function(St){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=St)},Lt.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Lt.prototype.undo=function(){if(this.undoStack.length>1){var St=this.undoStack.pop();return St!==void 0&&this.redoStack.push(St),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Lt.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Lt}(),mn=function(Lt){function St(mt,kt,jt){var Et=Lt.call(this,mt,kt,jt)||this;return Et.strokeColor="transparent",Et.strokeWidth=0,Et.strokeDasharray="",Et.curveX=0,Et.curveY=0,Et.manipulationStartCurveX=0,Et.manipulationStartCurveY=0,Et.setStrokeColor=Et.setStrokeColor.bind(Et),Et.setStrokeWidth=Et.setStrokeWidth.bind(Et),Et.setStrokeDasharray=Et.setStrokeDasharray.bind(Et),Et.positionGrips=Et.positionGrips.bind(Et),Et.addControlGrips=Et.addControlGrips.bind(Et),Et.adjustVisual=Et.adjustVisual.bind(Et),Et.setupControlBox=Et.setupControlBox.bind(Et),Et.resize=Et.resize.bind(Et),Et.strokeColor=jt.defaultColor,Et.strokeWidth=jt.defaultStrokeWidth,Et.strokeDasharray=jt.defaultStrokeDasharray,Et.strokePanel=new wt("Line color",jt.defaultColorSet,jt.defaultColor),Et.strokePanel.onColorChanged=Et.setStrokeColor,Et.strokeWidthPanel=new ve("Line width",jt.defaultStrokeWidths,jt.defaultStrokeWidth),Et.strokeWidthPanel.onWidthChanged=Et.setStrokeWidth,Et.strokeStylePanel=new _t("Line style",jt.defaultStrokeDasharrays,jt.defaultStrokeDasharray),Et.strokeStylePanel.onStyleChanged=Et.setStrokeDasharray,Et}return Tt(St,Lt),St.prototype.ownsTarget=function(mt){return!(!Lt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.selectorCurve&&mt!==this.visibleCurve&&!this.curveGrip.ownsTarget(mt))},St.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},St.prototype.createVisual=function(){this.visual=ce.createGroup(),this.selectorCurve=ce.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ce.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)},St.prototype.pointerDown=function(mt,kt){Lt.prototype.pointerDown.call(this,mt,kt),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=mt.x,this.curveY=mt.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(kt)&&(this.activeGrip=this.curveGrip,this._state="resize")},St.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ce.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ce.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ce.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},St.prototype.setupControlBox=function(){Lt.prototype.setupControlBox.call(this),this.curveControlLine1=ce.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ce.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)},St.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Lt.prototype.addControlGrips.call(this)},St.prototype.positionGrips=function(){Lt.prototype.positionGrips.call(this);var mt=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-mt/2,this.curveY-mt/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()))},St.prototype.manipulate=function(mt){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+mt.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+mt.y-this.manipulationStartY),Lt.prototype.manipulate.call(this,mt)},St.prototype.resize=function(mt){this.activeGrip===this.curveGrip&&(this.curveX=mt.x,this.curveY=mt.y),Lt.prototype.resize.call(this,mt),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},St.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.adjustVisual(),this.colorChanged(mt)},St.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.adjustVisual()},St.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.adjustVisual()},St.prototype.scale=function(mt,kt){this.curveX=this.curveX*mt,this.curveY=this.curveY*kt,Lt.prototype.scale.call(this,mt,kt)},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Lt.prototype.getState.call(this));return mt.typeName=St.typeName,mt},St.prototype.restoreState=function(mt){Lt.prototype.restoreState.call(this,mt);var kt=mt;this.strokeColor=kt.strokeColor,this.strokeWidth=kt.strokeWidth,this.strokeDasharray=kt.strokeDasharray,this.curveX=kt.curveX,this.curveY=kt.curveY,this.createVisual(),this.adjustVisual()},St.typeName="CurveMarker",St.title="Curve marker",St.icon='',St}(Ze),Tn=function(Lt){function St(mt,kt,jt){var Et=Lt.call(this,mt,kt,jt)||this;return Et.fillColor="transparent",Et.strokeColor="transparent",Et.strokeWidth=0,Et.strokeDasharray="",Et.textColor="transparent",Et.fontSize="1rem",Et.isMoved=!1,Et.captionText="Caption",Et.PADDING=5,Et.captionBoxWidth=0,Et.captionBoxHeight=0,Et.strokeColor=jt.defaultColor,Et.strokeWidth=jt.defaultStrokeWidth,Et.strokeDasharray=jt.defaultStrokeDasharray,Et.fillColor=jt.defaultFillColor,Et.textColor=jt.defaultStrokeColor,Et.fontFamily=jt.defaultFontFamily,Et.fontSize=jt.defaultCaptionFontSize,Et.captionText=jt.defaultCaptionText,Et.setStrokeColor=Et.setStrokeColor.bind(Et),Et.setFillColor=Et.setFillColor.bind(Et),Et.setStrokeWidth=Et.setStrokeWidth.bind(Et),Et.setStrokeDasharray=Et.setStrokeDasharray.bind(Et),Et.createVisual=Et.createVisual.bind(Et),Et.sizeCaption=Et.sizeCaption.bind(Et),Et.setCaptionText=Et.setCaptionText.bind(Et),Et.showTextEditor=Et.showTextEditor.bind(Et),Et.positionTextEditor=Et.positionTextEditor.bind(Et),Et.finishTextEditing=Et.finishTextEditing.bind(Et),Et.setFont=Et.setFont.bind(Et),Et.setTextColor=Et.setTextColor.bind(Et),Et.strokePanel=new wt("Line color",Jt(jt.defaultColorSet,["transparent"]),Et.strokeColor),Et.strokePanel.onColorChanged=Et.setStrokeColor,Et.fillPanel=new wt("Fill color",Jt(jt.defaultColorSet,["transparent"]),Et.fillColor,Fe),Et.fillPanel.onColorChanged=Et.setFillColor,Et.strokeWidthPanel=new ve("Line width",jt.defaultStrokeWidths,jt.defaultStrokeWidth),Et.strokeWidthPanel.onWidthChanged=Et.setStrokeWidth,Et.strokeStylePanel=new _t("Line style",jt.defaultStrokeDasharrays,jt.defaultStrokeDasharray),Et.strokeStylePanel.onStyleChanged=Et.setStrokeDasharray,Et.fontFamilyPanel=new Ye("Font",jt.defaultFontFamilies,jt.defaultFontFamily),Et.fontFamilyPanel.onFontChanged=Et.setFont,Et.textColorPanel=new wt("Text color",jt.defaultColorSet,Et.textColor,He),Et.textColorPanel.onColorChanged=Et.setTextColor,Et}return Tt(St,Lt),St.prototype.ownsTarget=function(mt){return!(!Lt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.frame&&mt!==this.captionBg&&mt!==this.captionElement)},St.prototype.createVisual=function(){this.visual=ce.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=ce.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=ce.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=ce.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()},St.prototype.setCaptionText=function(mt){this.captionText=mt,this.captionElement.textContent=this.captionText,this.sizeCaption()},St.prototype.pointerDown=function(mt,kt){Lt.prototype.pointerDown.call(this,mt,kt),this.isMoved=!1,this.pointerDownPoint=mt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},St.prototype.manipulate=function(mt){Lt.prototype.manipulate.call(this,mt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(mt.x-this.pointerDownPoint.x)>5||Math.abs(mt.y-this.pointerDownPoint.y)>5)},St.prototype.resize=function(mt){Lt.prototype.resize.call(this,mt),this.setSize()},St.prototype.sizeCaption=function(){var mt=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=mt.width+2*this.PADDING,this.captionBoxHeight=mt.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),ce.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')"]]),ce.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')"]])},St.prototype.showTextEditor=function(){var mt=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(kt){kt.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(kt){kt.key==="Enter"&&mt.finishTextEditing(mt.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(kt){kt.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){mt.finishTextEditing(mt.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){mt.finishTextEditing(mt.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},St.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"))},St.prototype.finishTextEditing=function(mt){this.setCaptionText(mt.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},St.prototype.setFont=function(mt){this.captionElement&&ce.setAttributes(this.captionElement,[["font-family",mt]]),this.fontFamily=mt,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},St.prototype.setTextColor=function(mt){this.captionElement&&ce.setAttributes(this.captionElement,[["fill",mt]]),this.textColor=mt,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},St.prototype.setSize=function(){Lt.prototype.setSize.call(this),ce.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},St.prototype.pointerUp=function(mt){Lt.prototype.pointerUp.call(this,mt),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},St.prototype.dblClick=function(mt,kt){Lt.prototype.dblClick.call(this,mt,kt),this.showTextEditor()},St.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.frame&&ce.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(mt),this.stateChanged()},St.prototype.setFillColor=function(mt){this.fillColor=mt,this.captionBg&&ce.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(mt),this.stateChanged()},St.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.frame&&ce.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},St.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.frame&&ce.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=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},Lt.prototype.getState.call(this));return mt.typeName=this.typeName,mt},St.prototype.restoreState=function(mt){var kt=mt;this.fillColor=kt.fillColor,this.strokeColor=kt.strokeColor,this.strokeWidth=kt.strokeWidth,this.strokeDasharray=kt.strokeDasharray,this.textColor=kt.textColor,this.fontFamily=kt.fontFamily,this.captionText=kt.captionText,this.fontSize=kt.fontSize,this.createVisual(),Lt.prototype.restoreState.call(this,mt),this.setSize()},St.prototype.scale=function(mt,kt){Lt.prototype.scale.call(this,mt,kt),this.setSize()},St.typeName="CaptionFrameMarker",St.title="Caption frame marker",St.icon='',St}(oe),Qe=function(){function Lt(St,mt){mt===void 0&&(mt=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=St,this.cancelable=mt}return Object.defineProperty(Lt.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Lt.prototype.preventDefault=function(){this._defaultPrevented=!0},Lt}(),wn=function(Lt){function St(mt,kt,jt){var Et=Lt.call(this,mt,!1)||this;return Et.dataUrl=kt,Et.state=jt,Et}return Tt(St,Lt),St}(Qe),Oe=function(Lt){function St(mt,kt,jt){jt===void 0&&(jt=!1);var Et=Lt.call(this,mt,jt)||this;return Et.marker=kt,Et}return Tt(St,Lt),St}(Qe),we=function(){function Lt(){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 Lt.prototype.addEventListener=function(St,mt){this[St].push(mt)},Lt.prototype.removeEventListener=function(St,mt){var kt=this[St].indexOf(mt);kt>-1&&this[St].splice(kt,1)},Lt}(),ne=function(){function Lt(St){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new he,this._isOpen=!1,this.undoRedoManager=new de,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 we,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Lt.instanceCounter++,this.styles=new et(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=St,this.targetRoot=document.body,this.width=St.clientWidth,this.height=St.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(Lt.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ne,Ln,Gt,un,dn,Wn,zn,cn,fn,qe,Ue,mn,Tn]},enumerable:!1,configurable:!0}),Object.defineProperty(Lt.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ne,Ln,Gt,un,Wn,zn,cn]},enumerable:!1,configurable:!0}),Object.defineProperty(Lt.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ne,Ln,Gt,un,zn]},enumerable:!1,configurable:!0}),Object.defineProperty(Lt.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(St){var mt=this;this._availableMarkerTypes.splice(0),St.forEach(function(kt){if(typeof kt=="string"){var jt=mt.ALL_MARKER_TYPES.find(function(Et){return Et.typeName===kt});jt!==void 0&&mt._availableMarkerTypes.push(jt)}else mt._availableMarkerTypes.push(kt)})},enumerable:!1,configurable:!0}),Object.defineProperty(Lt.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Lt.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Lt.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Lt.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Lt.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(St){this._zoomLevel=St,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(Lt.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Lt.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Ee.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Lt.prototype.show=function(){var St=this;this.styles.styleSheetRoot===void 0&&Nt.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Nt.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(mt){return mt(new Qe(St))})},Lt.prototype.render=function(){return Be(this,void 0,void 0,function(){var St;return Ce(this,function(mt){switch(mt.label){case 0:return this.setCurrentMarker(),(St=new Ie).naturalSize=this.renderAtNaturalSize,St.imageType=this.renderImageType,St.imageQuality=this.renderImageQuality,St.markersOnly=this.renderMarkersOnly,St.width=this.renderWidth,St.height=this.renderHeight,[4,St.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return mt.sent(),[4,St.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,mt.sent()]}})})},Lt.prototype.close=function(St){var mt=this;if(St===void 0&&(St=!1),this.isOpen){var kt=!1;St||this.eventListeners.beforeclose.forEach(function(jt){var Et=new Qe(mt,!0);jt(Et),Et.defaultPrevented&&(kt=!0)}),kt||(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(jt){return jt(new Qe(mt))}),this.detachEvents(),this._isOpen=!1)}},Lt.prototype.addMarkersToToolbar=function(){for(var St,mt=[],kt=0;ktthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*St:this.editorCanvas.clientWidth,kt=mt',St.title="Powered by marker.js",St.style.display="grid",St.style.alignItems="center",St.style.justifyItems="center",St.style.padding="3px",St.style.width="20px",St.style.height="20px",this.logoUI.appendChild(St),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Lt.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")},Lt.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"},Lt.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Lt.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 St=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=St+"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 st(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-1&&this.markers.splice(this.markers.indexOf(St),1),St.dispose()},Lt.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())},Lt.prototype.toolbarButtonClicked=function(St,mt){if(St==="marker"&&mt!==void 0)this.createNewMarker(mt);else if(St==="action")switch(mt){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()}},Lt.prototype.deleteSelectedMarker=function(){var St=this;if(this._currentMarker!==void 0){var mt=!1;if(this.eventListeners.markerbeforedelete.forEach(function(jt){var Et=new Oe(St,St._currentMarker,!0);jt(Et),Et.defaultPrevented&&(mt=!0)}),!mt){var kt=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(jt){return jt(new Oe(St,kt))})}}},Lt.prototype.clear=function(){var St=this,mt=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(le){var We=new Oe(St,void 0,!0);le(We),We.defaultPrevented&&(mt=!0)}),!mt)){this.setCurrentMarker();for(var kt=function(le){var We=jt.markers[le];jt.setCurrentMarker(jt.markers[le]),jt._currentMarker.dispose(),jt.markerImage.removeChild(jt._currentMarker.container),jt.markers.splice(jt.markers.indexOf(jt._currentMarker),1),jt.eventListeners.markerdelete.forEach(function(ln){return ln(new Oe(St,We))})},jt=this,Et=this.markers.length-1;Et>=0;Et--)kt(Et);this.addUndoStep()}},Object.defineProperty(Lt.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Lt.prototype.showNotesEditor=function(){var St;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=(St=this._currentMarker.notes)!==null&&St!==void 0?St:"",this.overlayContainer.appendChild(this.notesArea))},Lt.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)},Lt.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Lt.prototype.addUndoStep=function(){var St=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var mt=this.getState(),kt=this.undoRedoManager.getLastUndoStep();if(!kt||kt.width===mt.width&&kt.height===mt.height){var jt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(mt),jt1&&this.panTo({x:St.clientX,y:St.clientY}))},Lt.prototype.onPointerUp=function(St){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(St.clientX,St.clientY)),this.isDragging=!1,this.addUndoStep()},Lt.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Lt.prototype.onKeyUp=function(St){this._currentMarker===void 0||this.notesArea!==void 0||St.key!=="Delete"&&St.key!=="Backspace"||this.deleteSelectedMarker()},Lt.prototype.clientToLocalCoordinates=function(St,mt){var kt=this.markerImage.getBoundingClientRect();return{x:(St-kt.left)/this.zoomLevel,y:(mt-kt.top)/this.zoomLevel}},Lt.prototype.onWindowResize=function(){this.positionUI()},Lt.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var St=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=St+"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()},Lt.prototype.addLicenseKey=function(St){Ee.addKey(St)},Lt.prototype.addEventListener=function(St,mt){this.eventListeners.addEventListener(St,mt)},Lt.prototype.removeEventListener=function(St,mt){this.eventListeners.removeEventListener(St,mt)},Lt.prototype.renderState=function(St){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(St),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Lt.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Lt.prototype.focus=function(){var St=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(mt){return mt(new Qe(St))}))},Lt.prototype.blur=function(){var St=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(mt){return mt(new Qe(St))}))},Lt.instanceCounter=0,Lt}(),Dt=xt(99064),ge=xt(955),xe=(Lt,St,mt)=>new Promise((kt,jt)=>{var Et=ln=>{try{We(mt.next(ln))}catch(en){jt(en)}},le=ln=>{try{We(mt.throw(ln))}catch(en){jt(en)}},We=ln=>ln.done?kt(ln.value):Promise.resolve(ln.value).then(Et,le);We((mt=mt.apply(Lt,St)).next())}),Ut=({data:Lt,className:St,fullWidth:mt,style:kt={},onClose:jt,onOk:Et,showFullTools:le,noAssociationId:We})=>{const ln=(0,Ot.useRef)(null),en=(0,Ot.useRef)(null),Fn=(0,Ot.useRef)(null),ni=(0,Ot.useRef)(null),[_n,li]=(0,Ot.useState)(!1),[si,Vi]=(0,Ot.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,Ot.useEffect)(()=>(Fn.current||(Fn.current=document.createElement("style"),document.head.appendChild(Fn.current)),Lt!=null&&Lt.visible?(document.body.setAttribute("data-custom","y-hidden"),Fn.current.innerHTML=" html { overflow-y: hidden; }",Lt!=null&&Lt.src&&Ni()):(document.body.removeAttribute("data-custom"),Fn.current&&(document.head.removeChild(Fn.current),Fn.current=null)),()=>{document.body.removeAttribute("data-custom"),Fn.current&&(document.head.removeChild(Fn.current),Fn.current=null)}),[Lt==null?void 0:Lt.visible]);const Ni=()=>xe(void 0,null,function*(){li(!0),Vi("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Lo=yield(0,ge.ZJ)(Lt==null?void 0:Lt.src);ln.current.src="",ln.current.src=Lo,ln.current.onload=function(){Do()},li(!1),Vi("")}),po=Lo=>xe(void 0,null,function*(){li(!0),Vi("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Vo=yield(0,Dt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Lt.title,file:Lo.dataUrl}});Vo!=null&&Vo.id&&!We?(yield(0,Dt.ZP)(`/api/attachments/${Lt.id}/add_subitem.json`,{method:"post",body:{subitem_id:Vo==null?void 0:Vo.id,settings:JSON.stringify(Lo.state)}})).status===0&&Et():Vo!=null&&Vo.id&&Et(Vo),li(!1),Vi("")}),Oo=()=>{const Lo=document.querySelector('a[href="https://markerjs.com/"]');Lo&&Lo.parentNode&&(Lo.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(Fo=>{const no=document.querySelector(Fo.name);no&&no.setAttribute("title",Fo.title)})},Do=()=>{en.current=new ne(ln.current),en.current.targetRoot=ni.current,en.current.addEventListener("render",po),en.current.addEventListener("beforeclose",jt),le&&(en.current.availableMarkerTypes=en.current.ALL_MARKER_TYPES,en.current.uiStyleSettings.redoButtonVisible=!0,en.current.uiStyleSettings.notesButtonVisible=!0,en.current.uiStyleSettings.zoomButtonVisible=!0,en.current.uiStyleSettings.zoomOutButtonVisible=!0,en.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=en.current.uiStyleSettings,en.current.show(),Lt!=null&&Lt.snapshotData&&en.current.restoreState(Lt.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Oo()},300)};return Ot.createElement(Ot.Fragment,null,(Lt==null?void 0:Lt.visible)&&Ot.createElement(Vt.Z,{spinning:_n,tip:si,style:{position:"absolute",width:"100vw"}},Ot.createElement("div",{ref:ni,className:Le()(Ht.imageDimensions,St,mt?Ht.fullWidth:""),style:kt},Ot.createElement("img",{className:Ht.img,ref:ln}))))}},41588:function(Mn,Sn,xt){"use strict";var Ot=xt(59301),Ht=xt(95237),qt=xt(43604),Le=xt(99313),Vt=xt(3113),me=xt(85149),Tt=xt(88010),Be=xt(48136),Ce=xt(59301);const Jt=(0,Ot.forwardRef)(({callback:ce,showSaveButton:Ee,value:Ie=""},Nt)=>{const et=(0,Ot.useRef)(),nt=[{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 "}]}]}],ht=[{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 + `,ci.style.marginRight="5px",qe.appendChild(ci)}Et.typeBoxes.push(qe)},Et=this,Yt=0;Yt<4;Yt++)zt(Yt);return Lt},St.prototype.setCurrentType=function(mt,Lt){var zt=this;this.currentType=mt,this.typeBoxes.forEach(function(Et){Et.style.borderColor=Et===Lt?zt.uiStyleSettings!==void 0?zt.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},St}(vt),Ht=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.arrowType="end",Et.arrowBaseHeight=10,Et.arrowBaseWidth=10,Et.getArrowPoints=Et.getArrowPoints.bind(Et),Et.setArrowType=Et.setArrowType.bind(Et),Et.arrowTypePanel=new xe("Arrow type","end"),Et.arrowTypePanel.onArrowTypeChanged=Et.setArrowType,Et}return Nt(St,kt),St.prototype.ownsTarget=function(mt){return!(!kt.prototype.ownsTarget.call(this,mt)&&mt!==this.arrow1&&mt!==this.arrow2)},St.prototype.getArrowPoints=function(mt,Lt){var zt=this.arrowBaseWidth+2*this.strokeWidth,Et=this.arrowBaseHeight+2*this.strokeWidth;return mt-zt/2+","+(Lt+Et/2)+" "+mt+","+(Lt-Et/2)+" "+(mt+zt/2)+","+(Lt+Et/2)},St.prototype.createTips=function(){this.arrow1=ce.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ce.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ce.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ce.createTransform()),this.visual.appendChild(this.arrow2)},St.prototype.pointerDown=function(mt,Lt){kt.prototype.pointerDown.call(this,mt,Lt),this.state==="creating"&&this.createTips()},St.prototype.adjustVisual=function(){if(kt.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",ce.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ce.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var mt=0;Math.abs(this.x1-this.x2)>.1&&(mt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Lt=this.arrow1.transform.baseVal.getItem(0);Lt.setRotate(mt,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Lt,0);var zt=this.arrow2.transform.baseVal.getItem(0);zt.setRotate(mt+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(zt,0)}},St.prototype.setArrowType=function(mt){this.arrowType=mt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Object.assign({arrowType:this.arrowType},kt.prototype.getState.call(this));return mt.typeName=St.typeName,mt},St.prototype.restoreState=function(mt){kt.prototype.restoreState.call(this,mt);var Lt=mt;this.arrowType=Lt.arrowType,this.createTips(),this.adjustVisual()},St.typeName="ArrowMarker",St.title="Arrow marker",St.icon='',St}(Ke),Je=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.fillColor=zt.defaultFillColor,Et.strokeWidth=0,Et.fillPanel=new wt("Color",zt.defaultColorSet,zt.defaultFillColor),Et.fillPanel.onColorChanged=Et.setFillColor,Et}return Nt(St,kt),Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=kt.prototype.getState.call(this);return mt.typeName=St.typeName,mt},St.typeName="CoverMarker",St.title="Cover marker",St.icon='',St}(ne),Tn=function(kt){function St(mt,Lt,zt,Et){var Yt=kt.call(this,mt,Et||'')||this;return Yt.opacities=[],Yt.opacityBoxes=[],Yt.opacities=Lt,Yt.currentOpacity=zt,Yt.setCurrentOpacity=Yt.setCurrentOpacity.bind(Yt),Yt}return Nt(St,kt),St.prototype.getUi=function(){var mt=this,Lt=document.createElement("div");return Lt.style.display="flex",Lt.style.overflow="hidden",Lt.style.flexGrow="2",Lt.style.justifyContent="space-between",this.opacities.forEach(function(zt){var Et=document.createElement("div");Et.style.display="flex",Et.style.alignItems="center",Et.style.justifyContent="center",Et.style.padding="5px",Et.style.borderWidth="2px",Et.style.borderStyle="solid",Et.style.borderColor=zt===mt.currentOpacity?mt.uiStyleSettings.toolboxAccentColor:"transparent",Et.addEventListener("click",function(){mt.setCurrentOpacity(zt,Et)}),Lt.appendChild(Et);var Yt=document.createElement("div");Yt.innerText=100*zt+"%",Et.appendChild(Yt),mt.opacityBoxes.push(Et)}),Lt},St.prototype.setCurrentOpacity=function(mt,Lt){var zt=this;this.currentOpacity=mt,this.opacityBoxes.forEach(function(Et){Et.style.borderColor=Et===Lt?zt.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},St}(vt),An=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.setOpacity=Et.setOpacity.bind(Et),Et.fillColor=zt.defaultHighlightColor,Et.strokeWidth=0,Et.opacity=zt.defaultHighlightOpacity,Et.fillPanel=new wt("Color",zt.defaultColorSet,Et.fillColor),Et.fillPanel.onColorChanged=Et.setFillColor,Et.opacityPanel=new Tn("Opacity",zt.defaultOpacitySteps,Et.opacity),Et.opacityPanel.onOpacityChanged=Et.setOpacity,Et}return Nt(St,kt),St.prototype.setOpacity=function(mt){this.opacity=mt,this.visual&&ce.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=kt.prototype.getState.call(this);return mt.typeName=St.typeName,mt},St.typeName="HighlightMarker",St.title="Highlight marker",St.icon='',St}(Je),ze='',Te='',dn=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.bgColor="transparent",Et.tipPosition={x:0,y:0},Et.tipBase1Position={x:0,y:0},Et.tipBase2Position={x:0,y:0},Et.tipMoving=!1,Et.color=zt.defaultStrokeColor,Et.bgColor=zt.defaultFillColor,Et.fontFamily=zt.defaultFontFamily,Et.defaultSize={x:100,y:30},Et.setBgColor=Et.setBgColor.bind(Et),Et.getTipPoints=Et.getTipPoints.bind(Et),Et.positionTip=Et.positionTip.bind(Et),Et.setTipPoints=Et.setTipPoints.bind(Et),Et.colorPanel=new wt("Text color",zt.defaultColorSet,Et.color,ze),Et.colorPanel.onColorChanged=Et.setColor,Et.bgColorPanel=new wt("Fill color",zt.defaultColorSet,Et.bgColor,Te),Et.bgColorPanel.onColorChanged=Et.setBgColor,Et.fontFamilyPanel=new Ve("Font",zt.defaultFontFamilies,zt.defaultFontFamily),Et.fontFamilyPanel.onFontChanged=Et.setFont,Et.tipGrip=new At,Et.tipGrip.visual.transform.baseVal.appendItem(ce.createTransform()),Et.controlBox.appendChild(Et.tipGrip.visual),Et}return Nt(St,kt),St.prototype.ownsTarget=function(mt){return kt.prototype.ownsTarget.call(this,mt)||this.tipGrip.ownsTarget(mt)||this.tip===mt},St.prototype.createTip=function(){ce.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ce.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},St.prototype.pointerDown=function(mt,Lt){this.state==="new"&&kt.prototype.pointerDown.call(this,mt,Lt),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Lt)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):kt.prototype.pointerDown.call(this,mt,Lt)},St.prototype.pointerUp=function(mt){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,kt.prototype.pointerUp.call(this,mt);else{var Lt=this.state==="creating";kt.prototype.pointerUp.call(this,mt),this.setTipPoints(Lt),this.positionTip()}},St.prototype.manipulate=function(mt){if(this.tipMoving){var Lt=this.unrotatePoint(mt);this.tipPosition={x:Lt.x-this.manipulationStartLeft,y:Lt.y-this.manipulationStartTop},this.positionTip()}else kt.prototype.manipulate.call(this,mt)},St.prototype.setBgColor=function(mt){this.bgRectangle&&this.tip&&(ce.setAttributes(this.bgRectangle,[["fill",mt]]),ce.setAttributes(this.tip,[["fill",mt]])),this.bgColor=mt,this.fillColorChanged(mt)},St.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},St.prototype.setTipPoints=function(mt){mt===void 0&&(mt=!1);var Lt=Math.min(this.height/2,15),zt=this.height/5;mt&&(this.tipPosition={x:Lt+zt/2,y:this.height+20});var Et=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?Et.1)){var mt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Lt=this.tip1.transform.baseVal.getItem(0);Lt.setRotate(mt,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Lt,0);var zt=this.tip2.transform.baseVal.getItem(0);zt.setRotate(mt+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(zt,0)}},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=kt.prototype.getState.call(this);return mt.typeName=St.typeName,mt},St.prototype.restoreState=function(mt){kt.prototype.restoreState.call(this,mt),this.createTips(),this.adjustVisual()},St.typeName="MeasurementMarker",St.title="Measurement marker",St.icon='',St}(Ke),pn=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.strokePanel.colors=zt.defaultColorSet,Et.fillColor="transparent",Et}return Nt(St,kt),Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=kt.prototype.getState.call(this);return mt.typeName=St.typeName,mt},St.typeName="EllipseFrameMarker",St.title="Ellipse frame marker",St.icon='',St}(Hn),de=function(){function kt(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(kt.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),kt.prototype.addUndoStep=function(St){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(St)||(this.undoStack.push(St),JSON.stringify(this.lastRedoStep)!==JSON.stringify(St)&&this.redoStack.splice(0,this.redoStack.length))},kt.prototype.replaceLastUndoStep=function(St){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=St)},kt.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},kt.prototype.undo=function(){if(this.undoStack.length>1){var St=this.undoStack.pop();return St!==void 0&&this.redoStack.push(St),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},kt.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},kt}(),vn=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.strokeColor="transparent",Et.strokeWidth=0,Et.strokeDasharray="",Et.curveX=0,Et.curveY=0,Et.manipulationStartCurveX=0,Et.manipulationStartCurveY=0,Et.setStrokeColor=Et.setStrokeColor.bind(Et),Et.setStrokeWidth=Et.setStrokeWidth.bind(Et),Et.setStrokeDasharray=Et.setStrokeDasharray.bind(Et),Et.positionGrips=Et.positionGrips.bind(Et),Et.addControlGrips=Et.addControlGrips.bind(Et),Et.adjustVisual=Et.adjustVisual.bind(Et),Et.setupControlBox=Et.setupControlBox.bind(Et),Et.resize=Et.resize.bind(Et),Et.strokeColor=zt.defaultColor,Et.strokeWidth=zt.defaultStrokeWidth,Et.strokeDasharray=zt.defaultStrokeDasharray,Et.strokePanel=new wt("Line color",zt.defaultColorSet,zt.defaultColor),Et.strokePanel.onColorChanged=Et.setStrokeColor,Et.strokeWidthPanel=new me("Line width",zt.defaultStrokeWidths,zt.defaultStrokeWidth),Et.strokeWidthPanel.onWidthChanged=Et.setStrokeWidth,Et.strokeStylePanel=new Vt("Line style",zt.defaultStrokeDasharrays,zt.defaultStrokeDasharray),Et.strokeStylePanel.onStyleChanged=Et.setStrokeDasharray,Et}return Nt(St,kt),St.prototype.ownsTarget=function(mt){return!(!kt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.selectorCurve&&mt!==this.visibleCurve&&!this.curveGrip.ownsTarget(mt))},St.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},St.prototype.createVisual=function(){this.visual=ce.createGroup(),this.selectorCurve=ce.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ce.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)},St.prototype.pointerDown=function(mt,Lt){kt.prototype.pointerDown.call(this,mt,Lt),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=mt.x,this.curveY=mt.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Lt)&&(this.activeGrip=this.curveGrip,this._state="resize")},St.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ce.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ce.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ce.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},St.prototype.setupControlBox=function(){kt.prototype.setupControlBox.call(this),this.curveControlLine1=ce.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ce.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)},St.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,kt.prototype.addControlGrips.call(this)},St.prototype.positionGrips=function(){kt.prototype.positionGrips.call(this);var mt=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-mt/2,this.curveY-mt/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()))},St.prototype.manipulate=function(mt){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+mt.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+mt.y-this.manipulationStartY),kt.prototype.manipulate.call(this,mt)},St.prototype.resize=function(mt){this.activeGrip===this.curveGrip&&(this.curveX=mt.x,this.curveY=mt.y),kt.prototype.resize.call(this,mt),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},St.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.adjustVisual(),this.colorChanged(mt)},St.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.adjustVisual()},St.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.adjustVisual()},St.prototype.scale=function(mt,Lt){this.curveX=this.curveX*mt,this.curveY=this.curveY*Lt,kt.prototype.scale.call(this,mt,Lt)},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},kt.prototype.getState.call(this));return mt.typeName=St.typeName,mt},St.prototype.restoreState=function(mt){kt.prototype.restoreState.call(this,mt);var Lt=mt;this.strokeColor=Lt.strokeColor,this.strokeWidth=Lt.strokeWidth,this.strokeDasharray=Lt.strokeDasharray,this.curveX=Lt.curveX,this.curveY=Lt.curveY,this.createVisual(),this.adjustVisual()},St.typeName="CurveMarker",St.title="Curve marker",St.icon='',St}(He),bn=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,Lt,zt)||this;return Et.fillColor="transparent",Et.strokeColor="transparent",Et.strokeWidth=0,Et.strokeDasharray="",Et.textColor="transparent",Et.fontSize="1rem",Et.isMoved=!1,Et.captionText="Caption",Et.PADDING=5,Et.captionBoxWidth=0,Et.captionBoxHeight=0,Et.strokeColor=zt.defaultColor,Et.strokeWidth=zt.defaultStrokeWidth,Et.strokeDasharray=zt.defaultStrokeDasharray,Et.fillColor=zt.defaultFillColor,Et.textColor=zt.defaultStrokeColor,Et.fontFamily=zt.defaultFontFamily,Et.fontSize=zt.defaultCaptionFontSize,Et.captionText=zt.defaultCaptionText,Et.setStrokeColor=Et.setStrokeColor.bind(Et),Et.setFillColor=Et.setFillColor.bind(Et),Et.setStrokeWidth=Et.setStrokeWidth.bind(Et),Et.setStrokeDasharray=Et.setStrokeDasharray.bind(Et),Et.createVisual=Et.createVisual.bind(Et),Et.sizeCaption=Et.sizeCaption.bind(Et),Et.setCaptionText=Et.setCaptionText.bind(Et),Et.showTextEditor=Et.showTextEditor.bind(Et),Et.positionTextEditor=Et.positionTextEditor.bind(Et),Et.finishTextEditing=Et.finishTextEditing.bind(Et),Et.setFont=Et.setFont.bind(Et),Et.setTextColor=Et.setTextColor.bind(Et),Et.strokePanel=new wt("Line color",qt(zt.defaultColorSet,["transparent"]),Et.strokeColor),Et.strokePanel.onColorChanged=Et.setStrokeColor,Et.fillPanel=new wt("Fill color",qt(zt.defaultColorSet,["transparent"]),Et.fillColor,Te),Et.fillPanel.onColorChanged=Et.setFillColor,Et.strokeWidthPanel=new me("Line width",zt.defaultStrokeWidths,zt.defaultStrokeWidth),Et.strokeWidthPanel.onWidthChanged=Et.setStrokeWidth,Et.strokeStylePanel=new Vt("Line style",zt.defaultStrokeDasharrays,zt.defaultStrokeDasharray),Et.strokeStylePanel.onStyleChanged=Et.setStrokeDasharray,Et.fontFamilyPanel=new Ve("Font",zt.defaultFontFamilies,zt.defaultFontFamily),Et.fontFamilyPanel.onFontChanged=Et.setFont,Et.textColorPanel=new wt("Text color",zt.defaultColorSet,Et.textColor,ze),Et.textColorPanel.onColorChanged=Et.setTextColor,Et}return Nt(St,kt),St.prototype.ownsTarget=function(mt){return!(!kt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.frame&&mt!==this.captionBg&&mt!==this.captionElement)},St.prototype.createVisual=function(){this.visual=ce.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=ce.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=ce.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=ce.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()},St.prototype.setCaptionText=function(mt){this.captionText=mt,this.captionElement.textContent=this.captionText,this.sizeCaption()},St.prototype.pointerDown=function(mt,Lt){kt.prototype.pointerDown.call(this,mt,Lt),this.isMoved=!1,this.pointerDownPoint=mt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},St.prototype.manipulate=function(mt){kt.prototype.manipulate.call(this,mt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(mt.x-this.pointerDownPoint.x)>5||Math.abs(mt.y-this.pointerDownPoint.y)>5)},St.prototype.resize=function(mt){kt.prototype.resize.call(this,mt),this.setSize()},St.prototype.sizeCaption=function(){var mt=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=mt.width+2*this.PADDING,this.captionBoxHeight=mt.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),ce.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')"]]),ce.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')"]])},St.prototype.showTextEditor=function(){var mt=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(Lt){Lt.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Lt){Lt.key==="Enter"&&mt.finishTextEditing(mt.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Lt){Lt.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){mt.finishTextEditing(mt.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){mt.finishTextEditing(mt.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},St.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"))},St.prototype.finishTextEditing=function(mt){this.setCaptionText(mt.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},St.prototype.setFont=function(mt){this.captionElement&&ce.setAttributes(this.captionElement,[["font-family",mt]]),this.fontFamily=mt,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},St.prototype.setTextColor=function(mt){this.captionElement&&ce.setAttributes(this.captionElement,[["fill",mt]]),this.textColor=mt,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},St.prototype.setSize=function(){kt.prototype.setSize.call(this),ce.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},St.prototype.pointerUp=function(mt){kt.prototype.pointerUp.call(this,mt),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},St.prototype.dblClick=function(mt,Lt){kt.prototype.dblClick.call(this,mt,Lt),this.showTextEditor()},St.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.frame&&ce.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(mt),this.stateChanged()},St.prototype.setFillColor=function(mt){this.fillColor=mt,this.captionBg&&ce.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(mt),this.stateChanged()},St.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.frame&&ce.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},St.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.frame&&ce.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(St.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),St.prototype.getState=function(){var mt=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},kt.prototype.getState.call(this));return mt.typeName=this.typeName,mt},St.prototype.restoreState=function(mt){var Lt=mt;this.fillColor=Lt.fillColor,this.strokeColor=Lt.strokeColor,this.strokeWidth=Lt.strokeWidth,this.strokeDasharray=Lt.strokeDasharray,this.textColor=Lt.textColor,this.fontFamily=Lt.fontFamily,this.captionText=Lt.captionText,this.fontSize=Lt.fontSize,this.createVisual(),kt.prototype.restoreState.call(this,mt),this.setSize()},St.prototype.scale=function(mt,Lt){kt.prototype.scale.call(this,mt,Lt),this.setSize()},St.typeName="CaptionFrameMarker",St.title="Caption frame marker",St.icon='',St}(re),Qe=function(){function kt(St,mt){mt===void 0&&(mt=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=St,this.cancelable=mt}return Object.defineProperty(kt.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),kt.prototype.preventDefault=function(){this._defaultPrevented=!0},kt}(),Pn=function(kt){function St(mt,Lt,zt){var Et=kt.call(this,mt,!1)||this;return Et.dataUrl=Lt,Et.state=zt,Et}return Nt(St,kt),St}(Qe),Ne=function(kt){function St(mt,Lt,zt){zt===void 0&&(zt=!1);var Et=kt.call(this,mt,zt)||this;return Et.marker=Lt,Et}return Nt(St,kt),St}(Qe),Pe=function(){function kt(){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 kt.prototype.addEventListener=function(St,mt){this[St].push(mt)},kt.prototype.removeEventListener=function(St,mt){var Lt=this[St].indexOf(mt);Lt>-1&&this[St].splice(Lt,1)},kt}(),ie=function(){function kt(St){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new he,this._isOpen=!1,this.undoRedoManager=new de,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 Pe,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=kt.instanceCounter++,this.styles=new et(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=St,this.targetRoot=document.body,this.width=St.clientWidth,this.height=St.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(kt.prototype,"ALL_MARKER_TYPES",{get:function(){return[Le,Mn,Ht,sn,pn,Hn,An,dn,hn,Je,Ke,vn,bn]},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Le,Mn,Ht,sn,Hn,An,dn]},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Le,Mn,Ht,sn,An]},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(St){var mt=this;this._availableMarkerTypes.splice(0),St.forEach(function(Lt){if(typeof Lt=="string"){var zt=mt.ALL_MARKER_TYPES.find(function(Et){return Et.typeName===Lt});zt!==void 0&&mt._availableMarkerTypes.push(zt)}else mt._availableMarkerTypes.push(Lt)})},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(kt.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(St){this._zoomLevel=St,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(kt.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),kt.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Ce.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},kt.prototype.show=function(){var St=this;this.styles.styleSheetRoot===void 0&&Tt.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Tt.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(mt){return mt(new Qe(St))})},kt.prototype.render=function(){return Ie(this,void 0,void 0,function(){var St;return we(this,function(mt){switch(mt.label){case 0:return this.setCurrentMarker(),(St=new Be).naturalSize=this.renderAtNaturalSize,St.imageType=this.renderImageType,St.imageQuality=this.renderImageQuality,St.markersOnly=this.renderMarkersOnly,St.width=this.renderWidth,St.height=this.renderHeight,[4,St.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return mt.sent(),[4,St.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,mt.sent()]}})})},kt.prototype.close=function(St){var mt=this;if(St===void 0&&(St=!1),this.isOpen){var Lt=!1;St||this.eventListeners.beforeclose.forEach(function(zt){var Et=new Qe(mt,!0);zt(Et),Et.defaultPrevented&&(Lt=!0)}),Lt||(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(zt){return zt(new Qe(mt))}),this.detachEvents(),this._isOpen=!1)}},kt.prototype.addMarkersToToolbar=function(){for(var St,mt=[],Lt=0;Ltthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*St:this.editorCanvas.clientWidth,Lt=mt',St.title="Powered by marker.js",St.style.display="grid",St.style.alignItems="center",St.style.justifyItems="center",St.style.padding="3px",St.style.width="20px",St.style.height="20px",this.logoUI.appendChild(St),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},kt.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")},kt.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"},kt.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},kt.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 St=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=St+"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 st(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-1&&this.markers.splice(this.markers.indexOf(St),1),St.dispose()},kt.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())},kt.prototype.toolbarButtonClicked=function(St,mt){if(St==="marker"&&mt!==void 0)this.createNewMarker(mt);else if(St==="action")switch(mt){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()}},kt.prototype.deleteSelectedMarker=function(){var St=this;if(this._currentMarker!==void 0){var mt=!1;if(this.eventListeners.markerbeforedelete.forEach(function(zt){var Et=new Ne(St,St._currentMarker,!0);zt(Et),Et.defaultPrevented&&(mt=!0)}),!mt){var Lt=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(zt){return zt(new Ne(St,Lt))})}}},kt.prototype.clear=function(){var St=this,mt=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Yt){var Ge=new Ne(St,void 0,!0);Yt(Ge),Ge.defaultPrevented&&(mt=!0)}),!mt)){this.setCurrentMarker();for(var Lt=function(Yt){var Ge=zt.markers[Yt];zt.setCurrentMarker(zt.markers[Yt]),zt._currentMarker.dispose(),zt.markerImage.removeChild(zt._currentMarker.container),zt.markers.splice(zt.markers.indexOf(zt._currentMarker),1),zt.eventListeners.markerdelete.forEach(function(ln){return ln(new Ne(St,Ge))})},zt=this,Et=this.markers.length-1;Et>=0;Et--)Lt(Et);this.addUndoStep()}},Object.defineProperty(kt.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),kt.prototype.showNotesEditor=function(){var St;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=(St=this._currentMarker.notes)!==null&&St!==void 0?St:"",this.overlayContainer.appendChild(this.notesArea))},kt.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)},kt.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},kt.prototype.addUndoStep=function(){var St=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var mt=this.getState(),Lt=this.undoRedoManager.getLastUndoStep();if(!Lt||Lt.width===mt.width&&Lt.height===mt.height){var zt=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(mt),zt1&&this.panTo({x:St.clientX,y:St.clientY}))},kt.prototype.onPointerUp=function(St){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(St.clientX,St.clientY)),this.isDragging=!1,this.addUndoStep()},kt.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},kt.prototype.onKeyUp=function(St){this._currentMarker===void 0||this.notesArea!==void 0||St.key!=="Delete"&&St.key!=="Backspace"||this.deleteSelectedMarker()},kt.prototype.clientToLocalCoordinates=function(St,mt){var Lt=this.markerImage.getBoundingClientRect();return{x:(St-Lt.left)/this.zoomLevel,y:(mt-Lt.top)/this.zoomLevel}},kt.prototype.onWindowResize=function(){this.positionUI()},kt.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var St=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=St+"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()},kt.prototype.addLicenseKey=function(St){Ce.addKey(St)},kt.prototype.addEventListener=function(St,mt){this.eventListeners.addEventListener(St,mt)},kt.prototype.removeEventListener=function(St,mt){this.eventListeners.removeEventListener(St,mt)},kt.prototype.renderState=function(St){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(St),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(kt.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),kt.prototype.focus=function(){var St=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(mt){return mt(new Qe(St))}))},kt.prototype.blur=function(){var St=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(mt){return mt(new Qe(St))}))},kt.instanceCounter=0,kt}(),Dt=xt(99064),fe=xt(955),Se=(kt,St,mt)=>new Promise((Lt,zt)=>{var Et=ln=>{try{Ge(mt.next(ln))}catch(qe){zt(qe)}},Yt=ln=>{try{Ge(mt.throw(ln))}catch(qe){zt(qe)}},Ge=ln=>ln.done?Lt(ln.value):Promise.resolve(ln.value).then(Et,Yt);Ge((mt=mt.apply(kt,St)).next())}),Kt=({data:kt,className:St,fullWidth:mt,style:Lt={},onClose:zt,onOk:Et,showFullTools:Yt,noAssociationId:Ge})=>{const ln=(0,Ot.useRef)(null),qe=(0,Ot.useRef)(null),Nn=(0,Ot.useRef)(null),ai=(0,Ot.useRef)(null),[Kn,ci]=(0,Ot.useState)(!1),[Ci,Zi]=(0,Ot.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,Ot.useEffect)(()=>(Nn.current||(Nn.current=document.createElement("style"),document.head.appendChild(Nn.current)),kt!=null&&kt.visible?(document.body.setAttribute("data-custom","y-hidden"),Nn.current.innerHTML=" html { overflow-y: hidden; }",kt!=null&&kt.src&&Oi()):(document.body.removeAttribute("data-custom"),Nn.current&&(document.head.removeChild(Nn.current),Nn.current=null)),()=>{document.body.removeAttribute("data-custom"),Nn.current&&(document.head.removeChild(Nn.current),Nn.current=null)}),[kt==null?void 0:kt.visible]);const Oi=()=>Se(void 0,null,function*(){ci(!0),Zi("\u6B63\u5728\u52A0\u8F7D\u4E2D");const ri=yield(0,fe.ZJ)(kt==null?void 0:kt.src);ln.current.src="",ln.current.src=ri,ln.current.onload=function(){Ao()},ci(!1),Zi("")}),po=ri=>Se(void 0,null,function*(){ci(!0),Zi("\u6B63\u5728\u4FDD\u5B58\u4E2D");const fi=yield(0,Dt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:kt.title,file:ri.dataUrl}});fi!=null&&fi.id&&!Ge?(yield(0,Dt.ZP)(`/api/attachments/${kt.id}/add_subitem.json`,{method:"post",body:{subitem_id:fi==null?void 0:fi.id,settings:JSON.stringify(ri.state)}})).status===0&&Et():fi!=null&&fi.id&&Et(fi),ci(!1),Zi("")}),Bo=()=>{const ri=document.querySelector('a[href="https://markerjs.com/"]');ri&&ri.parentNode&&(ri.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(hi=>{const mi=document.querySelector(hi.name);mi&&mi.setAttribute("title",hi.title)})},Ao=()=>{qe.current=new ie(ln.current),qe.current.targetRoot=ai.current,qe.current.addEventListener("render",po),qe.current.addEventListener("beforeclose",zt),Yt&&(qe.current.availableMarkerTypes=qe.current.ALL_MARKER_TYPES,qe.current.uiStyleSettings.redoButtonVisible=!0,qe.current.uiStyleSettings.notesButtonVisible=!0,qe.current.uiStyleSettings.zoomButtonVisible=!0,qe.current.uiStyleSettings.zoomOutButtonVisible=!0,qe.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=qe.current.uiStyleSettings,qe.current.show(),kt!=null&&kt.snapshotData&&qe.current.restoreState(kt.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Bo()},300)};return Ot.createElement(Ot.Fragment,null,(kt==null?void 0:kt.visible)&&Ot.createElement(Ut.Z,{spinning:Kn,tip:Ci,style:{position:"absolute",width:"100vw"}},Ot.createElement("div",{ref:ai,className:Me()(jt.imageDimensions,St,mt?jt.fullWidth:""),style:Lt},Ot.createElement("img",{className:jt.img,ref:ln}))))}},41588:function(En,yn,xt){"use strict";var Ot=xt(59301),jt=xt(95237),Qt=xt(43604),Me=xt(99313),Ut=xt(3113),pe=xt(85149),Nt=xt(88010),Ie=xt(48136),we=xt(59301);const qt=(0,Ot.forwardRef)(({callback:ce,showSaveButton:Ce,value:Be=""},Tt)=>{const et=(0,Ot.useRef)(),nt=[{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 "}]}]}],ht=[{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 @@ -179,7 +179,7 @@ \\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}`}]}]}],st=wt=>{et.current.setValue(et.current.getValue()+" "+wt.value+" ")},gt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Ce.createElement(Ht.Z,{className:Tt.Z.lists,gutter:[10,10]},nt.map((wt,Ft)=>Ce.createElement(qt.Z,{flex:"110px",className:Tt.Z.item},Ce.createElement("div",null,Ce.createElement(me.Z,{value:`$$${wt.value}$$`}),wt.name),Ce.createElement("div",{className:Tt.Z.children},wt.children.map((It,Rt)=>Ce.createElement("div",{key:Rt},Ce.createElement("h1",null,It.name),Ce.createElement(Ht.Z,{gutter:[10,10]},It.data.map((Kt,oe)=>Ce.createElement(qt.Z,{key:oe,onClick:()=>st(Kt),className:Tt.Z.diamond},Ce.createElement(me.Z,{value:"`$$"+Kt.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Ce.createElement(Ht.Z,{className:Tt.Z.lists,gutter:[10,10]},ht.map((wt,Ft)=>Ce.createElement(qt.Z,{flex:"110px",className:Tt.Z.item},Ce.createElement("div",null,Ce.createElement(me.Z,{value:"`$$"+wt.value+"$$`"}),wt.name),Ce.createElement("div",{className:Tt.Z.children},wt.children.map((It,Rt)=>Ce.createElement("div",{key:Rt},It.name&&Ce.createElement("h1",null,It.name),Ce.createElement(Ht.Z,{gutter:[10,10]},It.data.map((Kt,oe)=>Ce.createElement(qt.Z,{key:oe,onClick:()=>st(Kt),className:Tt.Z.diamond},Ce.createElement(me.Z,{value:"`$$"+Kt.value+"$$`"}))))))))))}],vt=()=>{var wt=document.createElement("div");wt.innerHTML=et.current.getValue();var Ft=wt.innerText;return ce&&ce(Ft),Ft};return(0,Ot.useImperativeHandle)(Nt,()=>({getData:vt})),Ce.createElement("div",{className:Tt.Z.mathWrap},Ce.createElement(Le.default,{defaultActiveKey:"1",items:gt}),Ce.createElement("math-field",{locale:"zh_cn",className:Tt.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:et,style:{width:800,marginTop:30,fontSize:18}},Ie||""),Ee&&Ce.createElement("div",{className:Tt.Z.button},Ce.createElement(Vt.ZP,{size:"large",onClick:vt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Sn.Z=Jt},8797:function(Mn,Sn,xt){"use strict";var Ot=xt(59301),Ht=xt(93314),qt=xt(3113),Le=Object.defineProperty,Vt=Object.defineProperties,me=Object.getOwnPropertyDescriptors,Tt=Object.getOwnPropertySymbols,Be=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,Jt=(Nt,et,nt)=>et in Nt?Le(Nt,et,{enumerable:!0,configurable:!0,writable:!0,value:nt}):Nt[et]=nt,ce=(Nt,et)=>{for(var nt in et||(et={}))Be.call(et,nt)&&Jt(Nt,nt,et[nt]);if(Tt)for(var nt of Tt(et))Ce.call(et,nt)&&Jt(Nt,nt,et[nt]);return Nt},Ee=(Nt,et)=>Vt(Nt,me(et));const Ie=({img:Nt,buttonProps:et={},styles:nt={},customText:ht,ButtonText:st,ButtonClick:gt,Buttonclass:vt,ButtonTwo:wt,imgStyles:Ft,loading:It=!1,className:Rt=""})=>Ot.createElement("section",{className:`tc animated fadeIn ${Rt}`,style:ce({color:"#999",margin:"100px auto",visibility:It?"hidden":"visible"},nt)},Ot.createElement("img",{src:Nt||Ht,style:Ee(ce({},Ft),{pointerEvents:"none",userSelect:"none"})}),Ot.createElement("p",{className:"mt20 font14"},ht||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),st&&Ot.createElement(qt.ZP,ce({className:vt,onClick:gt},et),st),wt&&wt);Sn.Z=Ie},23210:function(Mn,Sn,xt){"use strict";xt.d(Sn,{Z:function(){return vt}});var Ot=xt(59301),Ht={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},qt=xt(3113),Le=xt(70557),Vt=xt(23954),me=xt(6848),Tt=xt(955),Be=xt(94941),Ce=xt(8797),Jt=xt(3294),ce=xt(19381),Ee=xt(59301),Ie=Object.defineProperty,Nt=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,ht=(wt,Ft,It)=>Ft in wt?Ie(wt,Ft,{enumerable:!0,configurable:!0,writable:!0,value:It}):wt[Ft]=It,st=(wt,Ft)=>{for(var It in Ft||(Ft={}))et.call(Ft,It)&&ht(wt,It,Ft[It]);if(Nt)for(var It of Nt(Ft))nt.call(Ft,It)&&ht(wt,It,Ft[It]);return wt},gt=(wt,Ft,It)=>new Promise((Rt,Kt)=>{var oe=_t=>{try{ve(It.next(_t))}catch(Ne){Kt(Ne)}},ee=_t=>{try{ve(It.throw(_t))}catch(Ne){Kt(Ne)}},ve=_t=>_t.done?Rt(_t.value):Promise.resolve(_t.value).then(oe,ee);ve((It=It.apply(wt,Ft)).next())}),vt=({editOffice:wt="view",data:Ft,theme:It,type:Rt,filename:Kt,monacoEditor:oe,className:ee,style:ve,close:_t,onClose:Ne,hasMask:he,disabledDownload:Ze,onImgDimensions:Ue,showNodata:Ye,recordInfo:un})=>{const[Ln,Pe]=(0,Ot.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Gt,qe]=(0,Ot.useState)(""),[Bn,zn]=(0,Ot.useState)(),He=window.ENV==="build"?"/react/build":"",Fe=location.host.startsWith("localhost")?Jt.Z.PROXY_SERVER:Jt.Z.API_SERVER,Wn=10*(1024*1024),fn=(0,Ot.useRef)();Ft!=null&&Ft.startsWith("/api")&&Rt!=="txt"&&(Ft=Jt.Z.API_SERVER+Ft);const dn=Qe=>Qe.substring(Qe.lastIndexOf("/")+1).split(".").pop();Kt&&oe&&(oe.filename=Kt),(0,Ot.useEffect)(()=>{var Qe,wn;const Oe=(wn=(Qe=document.cookie)==null?void 0:Qe.replace(/\s/g,""))==null?void 0:wn.split(";");Oe==null||Oe.map(we=>{let ne=we.split("=");ne[0]==="_educoder_session"&&qe(ne[1])})},[]),(0,Ot.useEffect)(()=>{Rt==="office"&&(Ft.indexOf("bigfilescdn.")>-1||Ft.indexOf("bigfiles1")>-1?zn({url:Ft,fileType:dn(Ft),model:Ft.indexOf("model=edit")?"edit":"view"}):de())},[Rt,Ft]);const de=()=>gt(void 0,null,function*(){console.log("data:",Ft);let Qe=Ft;Ft.startsWith("http")||(Qe=location.origin+Qe);let wn=new URL(Qe).pathname.split("/").pop();const Oe=yield(0,Be.gJ)({attachment_id:wn});Oe.url=Fe+Oe.url,zn(Oe)}),mn=()=>{if(Ft.startsWith("http")||Ft.startsWith("blob:")){Tn();return}(0,Tt.Sv)(Kt||"educoder",Ft,Kt)},Tn=()=>{un&&(0,ce.fc)({id:un==null?void 0:un.id,watch_type:1,course_id:un==null?void 0:un.course_id}),(0,Tt.Nd)(Kt||"educoder",decodeURIComponent(Ft))};return Ee.createElement("div",{style:st({},ve||{}),className:`${he&&Ht.bgBlack} ${Rt?Ht.wrp:"hide"}`},_t&&Ee.createElement("div",{className:Ht.close,ref:fn},!!Ue&&Ee.createElement(me.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>fn.current},Ee.createElement("span",{onClick:()=>{Ne(),Ue()}},Ee.createElement("i",{className:"icon-yulanpizhu"}))),!Ze&&Ee.createElement(me.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>fn.current},Ee.createElement("span",{onClick:Tn},Ee.createElement("i",{className:"icon-quxiaozhiding"}))),Ee.createElement(me.Z,{title:"\u5173\u95ED",getPopupContainer:()=>fn.current},Ee.createElement("span",{className:"",onClick:Ne},Ee.createElement("i",{className:"icon-guanbi1"})))),Ee.createElement("div",{className:`${Ht[ee]} ${ee} ${Ht.monaco} ${Rt==="txt"?"show":"hide"}`},Rt==="txt"&&Ee.createElement(Ee.Fragment,null,Ee.createElement(Vt.ZP,st({},oe)))),Rt==="audio"&&Ee.createElement("audio",{src:`${(Ft==null?void 0:Ft.indexOf("http://"))>-1||(Ft==null?void 0:Ft.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Ft}`,autoPlay:!0}),Rt==="video"&&Ee.createElement(Ee.Fragment,null,(Ft==null?void 0:Ft.indexOf("http"))>-1?Ee.createElement("video",{controls:!0,src:`${Ft}`,autoPlay:!0}):Ee.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Ft}`,autoPlay:!0})),Rt==="office"&&Bn&&Ee.createElement("iframe",{src:`${He}/office.html?key=${Bn.key}&url=${btoa(Bn.url)}&callbackUrl=${Fe+(Bn.callbackUrl||"")}&fileType=${Bn.fileType}&title=${Bn.title||""}&model=${wt}&officeServer=${Jt.Z.ONLYOFFICE}&disabledDownload=${!!Ze}`}),Rt==="html"&&Ee.createElement("iframe",{src:Ft+"&disposition=inline"}),Rt==="pdf"&&Ee.createElement("iframe",{src:`${He}/js/pdfview/index.html?filename=${Kt||"educoder.pdf"}&url=${encodeURIComponent(Ft)}&disabledDownload=${!!Ze}`}),Rt==="image"&&Ee.createElement("img",{src:`${(Ft==null?void 0:Ft.indexOf("http://"))>-1||(Ft==null?void 0:Ft.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Ft}`}),(Rt==="other"||Rt==="download")&&Ee.createElement(Ee.Fragment,null,Ye?Ee.createElement(Ce.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:Ee.createElement(qt.ZP,{icon:Ee.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:mn,disabled:Ze},"\u4E0B\u8F7D")}):Ee.createElement(qt.ZP,{type:"primary",size:"middle",onClick:mn,disabled:Ze},Ee.createElement(Le.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},85149:function(Mn,Sn,xt){"use strict";xt.d(Sn,{z:function(){return Rt},Z:function(){return Kt}});var Ot=xt(59301),Ht=xt(50304),qt=xt(24768),Le=xt(64018),Vt=xt(40846),me=xt(3294),Tt=xt(955),Be=xt(15342),Ce=xt(1012),Jt=xt(23210),ce=xt(59301),Ie=({html:oe})=>{const ee=(0,Ot.useRef)(null),ve=(0,Ot.useRef)(null),_t=`.markdown-body p { +\\end{array}`}]}]}],st=wt=>{et.current.setValue(et.current.getValue()+" "+wt.value+" ")},gt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:we.createElement(jt.Z,{className:Nt.Z.lists,gutter:[10,10]},nt.map((wt,Ft)=>we.createElement(Qt.Z,{flex:"110px",className:Nt.Z.item},we.createElement("div",null,we.createElement(pe.Z,{value:`$$${wt.value}$$`}),wt.name),we.createElement("div",{className:Nt.Z.children},wt.children.map((It,At)=>we.createElement("div",{key:At},we.createElement("h1",null,It.name),we.createElement(jt.Z,{gutter:[10,10]},It.data.map((Wt,re)=>we.createElement(Qt.Z,{key:re,onClick:()=>st(Wt),className:Nt.Z.diamond},we.createElement(pe.Z,{value:"`$$"+Wt.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:we.createElement(jt.Z,{className:Nt.Z.lists,gutter:[10,10]},ht.map((wt,Ft)=>we.createElement(Qt.Z,{flex:"110px",className:Nt.Z.item},we.createElement("div",null,we.createElement(pe.Z,{value:"`$$"+wt.value+"$$`"}),wt.name),we.createElement("div",{className:Nt.Z.children},wt.children.map((It,At)=>we.createElement("div",{key:At},It.name&&we.createElement("h1",null,It.name),we.createElement(jt.Z,{gutter:[10,10]},It.data.map((Wt,re)=>we.createElement(Qt.Z,{key:re,onClick:()=>st(Wt),className:Nt.Z.diamond},we.createElement(pe.Z,{value:"`$$"+Wt.value+"$$`"}))))))))))}],vt=()=>{var wt=document.createElement("div");wt.innerHTML=et.current.getValue();var Ft=wt.innerText;return ce&&ce(Ft),Ft};return(0,Ot.useImperativeHandle)(Tt,()=>({getData:vt})),we.createElement("div",{className:Nt.Z.mathWrap},we.createElement(Me.default,{defaultActiveKey:"1",items:gt}),we.createElement("math-field",{locale:"zh_cn",className:Nt.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:et,style:{width:800,marginTop:30,fontSize:18}},Be||""),Ce&&we.createElement("div",{className:Nt.Z.button},we.createElement(Ut.ZP,{size:"large",onClick:vt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});yn.Z=qt},8797:function(En,yn,xt){"use strict";var Ot=xt(59301),jt=xt(93314),Qt=xt(3113),Me=Object.defineProperty,Ut=Object.defineProperties,pe=Object.getOwnPropertyDescriptors,Nt=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,qt=(Tt,et,nt)=>et in Tt?Me(Tt,et,{enumerable:!0,configurable:!0,writable:!0,value:nt}):Tt[et]=nt,ce=(Tt,et)=>{for(var nt in et||(et={}))Ie.call(et,nt)&&qt(Tt,nt,et[nt]);if(Nt)for(var nt of Nt(et))we.call(et,nt)&&qt(Tt,nt,et[nt]);return Tt},Ce=(Tt,et)=>Ut(Tt,pe(et));const Be=({img:Tt,buttonProps:et={},styles:nt={},customText:ht,ButtonText:st,ButtonClick:gt,Buttonclass:vt,ButtonTwo:wt,imgStyles:Ft,loading:It=!1,className:At=""})=>Ot.createElement("section",{className:`tc animated fadeIn ${At}`,style:ce({color:"#999",margin:"100px auto",visibility:It?"hidden":"visible"},nt)},Ot.createElement("img",{src:Tt||jt,style:Ce(ce({},Ft),{pointerEvents:"none",userSelect:"none"})}),Ot.createElement("p",{className:"mt20 font14"},ht||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),st&&Ot.createElement(Qt.ZP,ce({className:vt,onClick:gt},et),st),wt&&wt);yn.Z=Be},23210:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return vt}});var Ot=xt(59301),jt={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Qt=xt(3113),Me=xt(70557),Ut=xt(23954),pe=xt(6848),Nt=xt(955),Ie=xt(94941),we=xt(8797),qt=xt(3294),ce=xt(19381),Ce=xt(59301),Be=Object.defineProperty,Tt=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,ht=(wt,Ft,It)=>Ft in wt?Be(wt,Ft,{enumerable:!0,configurable:!0,writable:!0,value:It}):wt[Ft]=It,st=(wt,Ft)=>{for(var It in Ft||(Ft={}))et.call(Ft,It)&&ht(wt,It,Ft[It]);if(Tt)for(var It of Tt(Ft))nt.call(Ft,It)&&ht(wt,It,Ft[It]);return wt},gt=(wt,Ft,It)=>new Promise((At,Wt)=>{var re=Vt=>{try{me(It.next(Vt))}catch(Le){Wt(Le)}},ne=Vt=>{try{me(It.throw(Vt))}catch(Le){Wt(Le)}},me=Vt=>Vt.done?At(Vt.value):Promise.resolve(Vt.value).then(re,ne);me((It=It.apply(wt,Ft)).next())}),vt=({editOffice:wt="view",data:Ft,theme:It,type:At,filename:Wt,monacoEditor:re,className:ne,style:me,close:Vt,onClose:Le,hasMask:he,disabledDownload:He,onImgDimensions:Ke,showNodata:Ve,recordInfo:sn})=>{const[Mn,xe]=(0,Ot.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Ht,Je]=(0,Ot.useState)(""),[Tn,An]=(0,Ot.useState)(),ze=window.ENV==="build"?"/react/build":"",Te=location.host.startsWith("localhost")?qt.Z.PROXY_SERVER:qt.Z.API_SERVER,Hn=10*(1024*1024),hn=(0,Ot.useRef)();Ft!=null&&Ft.startsWith("/api")&&At!=="txt"&&(Ft=qt.Z.API_SERVER+Ft);const pn=Qe=>Qe.substring(Qe.lastIndexOf("/")+1).split(".").pop();Wt&&re&&(re.filename=Wt),(0,Ot.useEffect)(()=>{var Qe,Pn;const Ne=(Pn=(Qe=document.cookie)==null?void 0:Qe.replace(/\s/g,""))==null?void 0:Pn.split(";");Ne==null||Ne.map(Pe=>{let ie=Pe.split("=");ie[0]==="_educoder_session"&&Je(ie[1])})},[]),(0,Ot.useEffect)(()=>{At==="office"&&(Ft.indexOf("bigfilescdn.")>-1||Ft.indexOf("bigfiles1")>-1?An({url:Ft,fileType:pn(Ft),model:Ft.indexOf("model=edit")?"edit":"view"}):de())},[At,Ft]);const de=()=>gt(void 0,null,function*(){console.log("data:",Ft);let Qe=Ft;Ft.startsWith("http")||(Qe=location.origin+Qe);let Pn=new URL(Qe).pathname.split("/").pop();const Ne=yield(0,Ie.gJ)({attachment_id:Pn});Ne.url=Te+Ne.url,An(Ne)}),vn=()=>{if(Ft.startsWith("http")||Ft.startsWith("blob:")){bn();return}(0,Nt.Sv)(Wt||"educoder",Ft,Wt)},bn=()=>{sn&&(0,ce.fc)({id:sn==null?void 0:sn.id,watch_type:1,course_id:sn==null?void 0:sn.course_id}),(0,Nt.Nd)(Wt||"educoder",decodeURIComponent(Ft))};return Ce.createElement("div",{style:st({},me||{}),className:`${he&&jt.bgBlack} ${At?jt.wrp:"hide"}`},Vt&&Ce.createElement("div",{className:jt.close,ref:hn},!!Ke&&Ce.createElement(pe.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>hn.current},Ce.createElement("span",{onClick:()=>{Le(),Ke()}},Ce.createElement("i",{className:"icon-yulanpizhu"}))),!He&&Ce.createElement(pe.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>hn.current},Ce.createElement("span",{onClick:bn},Ce.createElement("i",{className:"icon-quxiaozhiding"}))),Ce.createElement(pe.Z,{title:"\u5173\u95ED",getPopupContainer:()=>hn.current},Ce.createElement("span",{className:"",onClick:Le},Ce.createElement("i",{className:"icon-guanbi1"})))),Ce.createElement("div",{className:`${jt[ne]} ${ne} ${jt.monaco} ${At==="txt"?"show":"hide"}`},At==="txt"&&Ce.createElement(Ce.Fragment,null,Ce.createElement(Ut.ZP,st({},re)))),At==="audio"&&Ce.createElement("audio",{src:`${(Ft==null?void 0:Ft.indexOf("http://"))>-1||(Ft==null?void 0:Ft.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Ft}`,autoPlay:!0}),At==="video"&&Ce.createElement(Ce.Fragment,null,(Ft==null?void 0:Ft.indexOf("http"))>-1?Ce.createElement("video",{controls:!0,src:`${Ft}`,autoPlay:!0}):Ce.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Ft}`,autoPlay:!0})),At==="office"&&Tn&&Ce.createElement("iframe",{src:`${ze}/office.html?key=${Tn.key}&url=${btoa(Tn.url)}&callbackUrl=${Te+(Tn.callbackUrl||"")}&fileType=${Tn.fileType}&title=${Tn.title||""}&model=${wt}&officeServer=${qt.Z.ONLYOFFICE}&disabledDownload=${!!He}`}),At==="html"&&Ce.createElement("iframe",{src:Ft+"&disposition=inline"}),At==="pdf"&&Ce.createElement("iframe",{src:`${ze}/js/pdfview/index.html?filename=${Wt||"educoder.pdf"}&url=${encodeURIComponent(Ft)}&disabledDownload=${!!He}`}),At==="image"&&Ce.createElement("img",{src:`${(Ft==null?void 0:Ft.indexOf("http://"))>-1||(Ft==null?void 0:Ft.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Ft}`}),(At==="other"||At==="download")&&Ce.createElement(Ce.Fragment,null,Ve?Ce.createElement(we.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:Ce.createElement(Qt.ZP,{icon:Ce.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:vn,disabled:He},"\u4E0B\u8F7D")}):Ce.createElement(Qt.ZP,{type:"primary",size:"middle",onClick:vn,disabled:He},Ce.createElement(Me.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},85149:function(En,yn,xt){"use strict";xt.d(yn,{z:function(){return At},Z:function(){return Wt}});var Ot=xt(59301),jt=xt(50304),Qt=xt(24768),Me=xt(64018),Ut=xt(40846),pe=xt(3294),Nt=xt(955),Ie=xt(15342),we=xt(1012),qt=xt(23210),ce=xt(59301),Be=({html:re})=>{const ne=(0,Ot.useRef)(null),me=(0,Ot.useRef)(null),Vt=`.markdown-body p { margin: 0 0 16px 0 !important; line-height: 28px; white-space: pre-wrap; @@ -1026,9 +1026,9 @@ .markdown-body pre { margin-top: 0; margin-bottom: 16px; - }`;return(0,Ot.useEffect)(()=>{const Ne=ee.current.attachShadow({mode:"open"});ve.current=document.createElement("div"),ve.current.className="markdown-body",ve.current.innerHTML=oe,Ne.appendChild(ve.current);const he=document.createElement("style");return he.textContent=_t,Ne.appendChild(he),()=>{Ne.innerHTML=""}},[]),(0,Ot.useEffect)(()=>{ve.current&&(ve.current.innerHTML=oe)},[oe]),ce.createElement("div",{ref:ee})},Nt=Object.defineProperty,et=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,st=(oe,ee,ve)=>ee in oe?Nt(oe,ee,{enumerable:!0,configurable:!0,writable:!0,value:ve}):oe[ee]=ve,gt=(oe,ee)=>{for(var ve in ee||(ee={}))nt.call(ee,ve)&&st(oe,ve,ee[ve]);if(et)for(var ve of et(ee))ht.call(ee,ve)&&st(oe,ve,ee[ve]);return oe};const vt="@\u2581\u2581@",wt="@\u2581@",Ft=/]*>/g;function It(oe){let ee=document.createElement("div");return ee.innerHTML=oe,ee.childNodes.length===0?"":ee.childNodes[0].nodeValue}const Rt=(oe,ee)=>{oe=oe||"";const ve=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,_t=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ne=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,he=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return ee?oe.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(ve,(Ze,Ue,Ye,un,Ln,Pe,Gt)=>{const qe=Ue||un||Pe,Bn=Ye||Ln||Gt||"?";return me.Z.API_SERVER+"/api/attachments/"+qe+Bn+"&t="+(0,Tt.Jn)(qe,Date.now())+(Ze.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(oe=oe.replace(he,(Ze,Ue,Ye,un,Ln,Pe,Gt)=>{const qe=Ue||un||Pe,Bn=Ye||Ln||Gt||"?";return me.Z.API_SERVER+"/attachments/download/"+qe+Bn+"&t="+(0,Tt.Jn)(qe,Date.now())+(Ze.indexOf(")")>-1?")":"&")}).replace(ve,(Ze,Ue,Ye,un,Ln,Pe,Gt)=>{const qe=Ue||un||Pe,Bn=Ye||Ln||Gt||"?";return me.Z.API_SERVER+"/api/attachments/"+qe+Bn+"&t="+(0,Tt.Jn)(qe,Date.now())+(Ze.indexOf(")")>-1?")":"&")}).replace(_t,(Ze,Ue,Ye,un,Ln)=>{const Pe=Ue||un,Gt=Ye||Ln||"";return'"'+me.Z.API_SERVER+"/api/attachments/"+Pe+Gt+Pe+Gt+"&t="+(0,Tt.Jn)(Pe,Date.now())}).replace(Ne,(Ze,Ue,Ye,un,Ln)=>{const Pe=Ue||un,Gt=Ye||Ln||"";return"("+me.Z.API_SERVER+"/files/uploads/"+Pe+Gt+Pe+Gt+"&t="+(0,Tt.Jn)(Pe,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,` -`),oe)};var Kt=({value:oe="",className:ee,showTextOnly:ve,showLines:_t,style:Ne={},stylesPrev:he={},highlightKeywords:Ze,showProgramFill:Ue,isProgramFill:Ye,disabledFill:un=!1,programFillValue:Ln,onFillChange:Pe=Bn=>{},onFillBlur:Gt=()=>{},onFillFocus:qe=()=>{}})=>{let Bn=String(oe);const[zn,He]=(0,Ot.useState)(""),[Fe,cn]=(0,Ot.useState)("office"),[Wn,fn]=(0,Ot.useState)([]),dn=(0,Ot.useRef)("a"+(0,Ce.Z)()),de={},mn=(Lt,St,mt)=>{const kt=document.createElement(Lt===wt?"input":"textarea");kt.style.width="100%",kt.style.height=Lt===wt?"40px":"151px",kt.rows=5,kt.spellcheck=!1,kt.name="edu-program-fill",kt.placeholder="\u8BF7\u8F93\u5165",kt.dataset.id=St;const jt=Object.keys(de).length;return de[jt]=kt,`${kt.outerHTML}`};function Tn(Lt){return Lt=Lt.replace(/!\[.*?\]\(.*?\)/g,""),Lt=Lt.replace(/\[.*?\]\(.*?\)/g,""),Lt=Lt.replace(new RegExp("","gs"),""),Lt=Lt.replace(//g,""),Lt=Lt.replace(//g,""),Lt=Lt.replace(new RegExp(".*?<\\/video>","gs"),""),Lt=Lt.replace(new RegExp(".*?<\\/audio>","gs"),""),Lt=Lt.replace(new RegExp(".*?<\\/style>","gs"),""),Lt=Lt.replace(new RegExp(".*?<\\/script>","gs"),""),Lt}const Qe=Lt=>Lt.replace(/([\s\S]+?)<\/style>/gim,function(St,mt){let kt=mt.replace(/(\n|\r)/g,"").split("}"),jt=[];return kt.map(Et=>{Et!=""&&jt.push(`.${dn.current} ${Et}`)}),``}),wn=(0,Ot.useMemo)(()=>{try{const kt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,jt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Et=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,le=/\(\/attachments\/download\//g;Bn=Bn.replace(le,"("+me.Z.API_SERVER+"/attachments/download/").replace(kt,"("+me.Z.API_SERVER+"/api/attachments/").replace(jt,'"'+me.Z.API_SERVER+"/api/attachments/").replace(Et,'"'+me.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,` -`)}catch(kt){}if(Ue){let kt=-1;return Bn=Bn.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(jt,Et,le){var We;return++kt,mn(jt,kt,(We=Ln==null?void 0:Ln[kt])==null?void 0:We.value.replaceAll("<","<").replaceAll(">",">"))}),`
${Qe(Bn||"")}
`}let Lt=Qe(Bn);Lt=(0,qt.ZP)(Lt);const St=(0,qt.ez)();Bn.match(/\[TOC\]/)&&(Lt=Lt.replace("

[TOC]

",(0,qt.Qv)()),(0,qt.Iy)()),Lt=Lt.replace(/(__special_katext_id_\d+__)/g,(kt,jt)=>{const{type:Et,expression:le}=St[jt];return(0,Be.renderToString)(It(le)||"",{displayMode:Et==="block",throwOnError:!1,output:"html"})}),Lt=Lt.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,qt.AL)();const mt=document.createElement("div");if(mt.innerHTML=Lt,ve)return mt.innerText;if(Ze){const kt=Ze.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Dt(mt,kt),mt.innerHTML}return setTimeout(()=>te(),500),mt.innerHTML},[Bn,Ze]);(0,Ot.useEffect)(()=>{ge.current&&ge.current.querySelectorAll(["input","textarea"]).forEach(St=>{St.oninput=Oe,St.onblur=we,St.onfocus=ne})},[Wn]),(0,Ot.useEffect)(()=>{var Lt,St,mt,kt,jt;if(Ln!=null&&Ln.length)try{const Et=ge.current.querySelectorAll(".edu-program-fill-score"),le=ge.current.querySelectorAll('[name="edu-program-fill"]');for(const[We,ln]of le.entries())ln.value=((Lt=Ln==null?void 0:Ln[We])==null?void 0:Lt.value)||"",((St=Ln==null?void 0:Ln[We])==null?void 0:St.type)==="warning"?ln.className="program-fill-warning":((mt=Ln==null?void 0:Ln[We])==null?void 0:mt.type)==="success"?ln.className="program-fill-success":ln.className="";for(const[We,ln]of Et.entries())ln.innerHTML=(kt=Ln==null?void 0:Ln[We])!=null&&kt.score?`${(jt=Ln==null?void 0:Ln[We])==null?void 0:jt.score}\u5206`:"";fn(Ln)}catch(Et){console.log(Et,"error")}},[Ln]);const Oe=Lt=>{Wn[Lt.target.dataset.id]=Wn[Lt.target.dataset.id]||{},Wn[Lt.target.dataset.id].value=Lt.target.value,fn([...Wn]),Pe(Wn,Lt.target.dataset.id)},we=Lt=>{Wn[Lt.target.dataset.id]=Wn[Lt.target.dataset.id]||{},Wn[Lt.target.dataset.id].value=Lt.target.value,fn([...Wn]),Gt(Wn,Lt.target.dataset.id)},ne=Lt=>{Wn[Lt.target.dataset.id]=Wn[Lt.target.dataset.id]||{},Wn[Lt.target.dataset.id].value=Lt.target.value,fn([...Wn]),qe(Wn,Lt.target.dataset.id)};function Dt(Lt,St){return Lt.childNodes.forEach(mt=>{var kt;if(mt.childNodes.length>0)Dt(mt,St);else if(mt.nodeName!=="IMG")if(mt.innerHTML)mt.innerHTML=(kt=mt.innerHTML)==null?void 0:kt.replace(new RegExp(St,"gi"),'$&');else{const jt=document.createElement("span");jt.innerHTML=mt.textContent.replace(new RegExp(St,"gi"),'$&'),mt.replaceWith(jt)}})}const ge=(0,Ot.useRef)();qt.jb.WebkitLineClamp=_t,_t&&(Ne=gt(gt({},Ne),qt.jb));function xe(Lt){let St=Lt.target;if(St.tagName.toUpperCase()==="A"){let mt=St.getAttribute("href");if(mt.indexOf("office")>-1)Lt.preventDefault(),He(mt),cn("office");else if(mt.indexOf("application/pdf")>-1)Lt.preventDefault(),He(mt),cn("pdf");else if(mt.indexOf("text/html")>-1)Lt.preventDefault(),He(mt),cn("html");else if(mt.startsWith("#")){Lt.preventDefault();let kt=document.getElementById(mt.replace("#",""));kt&&kt.scrollIntoView(!0)}}}const te=()=>{var Lt;const St=(Lt=ge.current)==null?void 0:Lt.querySelectorAll("video");St==null||St.forEach(mt=>{if(mt.oncontextmenu=()=>!1,mt.src.indexOf(".m3u8")>-1&&!mt.canPlayType("application/vnd.apple.mpegurl")){if(Vt.ZP.isSupported()){var kt=new Vt.ZP;kt.loadSource(mt.src),kt.attachMedia(mt)}}})};(0,Ot.useEffect)(()=>{if(ge.current&&wn&&wn.match(Ft)&&window.PR.prettyPrint(),ge.current)return ge.current.addEventListener("click",xe),()=>{var Lt;(Lt=ge.current)==null||Lt.removeEventListener("click",xe),(0,qt.AL)(),(0,qt.Iy)()}},[wn,ge.current,xe]),(0,Ot.useEffect)(()=>{var Lt;const St=mt=>{mt.preventDefault(),mt.clipboardData.setData("text",window.getSelection().toString())};return(Lt=ge.current)==null||Lt.addEventListener("copy",St),()=>{var mt;(mt=ge.current)==null||mt.removeEventListener("copy",St)}},[ge.current]);const Ut=Lt=>//i.test(Lt||"");return Ot.createElement(Ot.Fragment,null,ve&&Ot.createElement("div",{ref:ge},wn),!ve&&!Ut(wn)&&Ot.createElement("div",{ref:ge,style:gt({},Ne),className:`${ee||""} ${un?"disabled-fill":""} markdown-body ${dn.current}`,dangerouslySetInnerHTML:{__html:wn}}),!ve&&Ut(wn)&&Ot.createElement(Ie,{html:wn}),Ot.createElement(Jt.Z,{close:!0,data:zn,type:zn!=null&&zn.length?Fe:"",style:gt({},he),onClose:()=>He("")}))}},53932:function(Mn,Sn,xt){"use strict";xt.d(Sn,{h:function(){return wt},Z:function(){return vt}});var Ot=xt(59301),Ht=xt(57809),qt=xt(78241),Le=xt(3113),Vt=xt(89780),me=xt.n(Vt),Tt=xt(37036),Be=Object.defineProperty,Ce=Object.defineProperties,Jt=Object.getOwnPropertyDescriptors,ce=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,Ie=Object.prototype.propertyIsEnumerable,Nt=(Ft,It,Rt)=>It in Ft?Be(Ft,It,{enumerable:!0,configurable:!0,writable:!0,value:Rt}):Ft[It]=Rt,et=(Ft,It)=>{for(var Rt in It||(It={}))Ee.call(It,Rt)&&Nt(Ft,Rt,It[Rt]);if(ce)for(var Rt of ce(It))Ie.call(It,Rt)&&Nt(Ft,Rt,It[Rt]);return Ft},nt=(Ft,It)=>Ce(Ft,Jt(It));const ht=Ht.default.Option,st={labelCol:{span:4},wrapperCol:{span:20}},gt={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};var vt=({callback:Ft,onCancel:It})=>{const[Rt,Kt]=(0,Ot.useState)("python");function oe(ve){Kt(gt[ve][1])}function ee(ve){Ft(ve)}return Ot.createElement(qt.default,nt(et({},st),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:ee,style:{width:500}}),Ot.createElement(qt.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},Ot.createElement(Ht.default,{getPopupContainer:ve=>ve.parentNode,onChange:oe},Object.keys(gt).map(ve=>Ot.createElement(ht,{key:ve,value:ve},gt[ve][0])))),Ot.createElement(qt.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},Ot.createElement(wt,{mode:Rt})),Ot.createElement("div",{className:"flex-container flex-end"},Ot.createElement(Le.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Ot.createElement(Le.ZP,{type:"ghost",onClick:It},"\u53D6\u6D88")))};function wt({value:Ft,onChange:It,mode:Rt,options:Kt={}}){const oe=(0,Ot.useRef)(),[ee,ve]=(0,Ot.useState)();return(0,Ot.useEffect)(()=>{if(ee){let _t=function(Ne){const he=Ne.getValue();It&&It(he)};return ee.on("change",_t),()=>{ee.off("change",_t)}}},[ee,It]),(0,Ot.useEffect)(()=>{ee&&ee.setOption("mode",Rt)},[ee,Rt]),(0,Ot.useEffect)(()=>{ee&&(Ft!==ee.getValue()||Ft==="")&&setTimeout(()=>{ee.setValue(Ft||"")},300)},[ee,Ft]),(0,Ot.useEffect)(()=>{if(oe.current&&!ee){const _t=me().fromTextArea(oe.current,et({mode:Rt,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Kt));ve(_t)}},[oe.current,ee]),Ot.createElement("div",{className:"my-codemirror-container"},Ot.createElement("textarea",{ref:oe}))}},12290:function(Mn,Sn,xt){"use strict";xt.d(Sn,{Z:function(){return gi}});var Ot=xt(59301),Ht=xt(89780),qt=xt.n(Ht),Le=xt(76374),Vt=xt(37036),me=xt(6313),Tt=xt(25717),Be=xt(99498),Ce=xt(25419),Jt=xt(67549),ce=xt(85149),Ee=({value:Re="",className:je,showTextOnly:Zt,showLines:Ve,style:vn={}})=>{const Se=(0,Ot.useMemo)(()=>"",[Re]);return Ot.createElement(Ot.Fragment,null,Ot.createElement("div",{dangerouslySetInnerHTML:{__html:Se}}))},Ie=xt(59301),Nt=Object.defineProperty,et=Object.defineProperties,nt=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,st=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable,vt=(Re,je,Zt)=>je in Re?Nt(Re,je,{enumerable:!0,configurable:!0,writable:!0,value:Zt}):Re[je]=Zt,wt=(Re,je)=>{for(var Zt in je||(je={}))st.call(je,Zt)&&vt(Re,Zt,je[Zt]);if(ht)for(var Zt of ht(je))gt.call(je,Zt)&&vt(Re,Zt,je[Zt]);return Re},Ft=(Re,je)=>et(Re,nt(je));let It=[{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 Rt({onActionCallback:Re,title:je,icon:Zt,actionName:Ve,className:vn="",children:Se}){function ae(){Re(Ve)}return Ie.createElement("a",{title:je,className:vn,onClick:ae},Ie.createElement("i",{className:`${Zt}`}),Se)}var Kt=({watch:Re,showNullButton:je,showNullProgramButton:Zt,onActionCallback:Ve,fullScreen:vn,insertTemp:Se,hidetoolBar:ae,extraUse:Je})=>{const pn=[...It,{title:`${Re?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Re?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return Ie.createElement("ul",{className:"markdown-toolbar-container"},!ae&&pn.map((Ge,fe)=>Ie.createElement("li",{key:fe},Ge.actionName?Ie.createElement(Rt,Ft(wt({},Ge),{onActionCallback:Ve})):Ie.createElement("span",{className:"v-line"}))),je?Ie.createElement("li",null,Ie.createElement(Rt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ve},Ie.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Zt?Ie.createElement(Ie.Fragment,null,Ie.createElement("li",null,Ie.createElement(Rt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Ve},Ie.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),Ie.createElement("li",null,Ie.createElement(Rt,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Ve},Ie.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,Se&&Ie.createElement("li",null,Ie.createElement(Rt,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Se}`,onActionCallback:Ve},Ie.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Je&&Ie.createElement("li",null,Je),Ie.createElement("li",{className:"btn-full-screen"},Ie.createElement(Rt,{icon:`${vn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:vn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ve})))},oe=xt(79346),ee=xt(78241),ve=xt(92832),_t=xt(3113),Ne=Object.defineProperty,he=Object.defineProperties,Ze=Object.getOwnPropertyDescriptors,Ue=Object.getOwnPropertySymbols,Ye=Object.prototype.hasOwnProperty,un=Object.prototype.propertyIsEnumerable,Ln=(Re,je,Zt)=>je in Re?Ne(Re,je,{enumerable:!0,configurable:!0,writable:!0,value:Zt}):Re[je]=Zt,Pe=(Re,je)=>{for(var Zt in je||(je={}))Ye.call(je,Zt)&&Ln(Re,Zt,je[Zt]);if(Ue)for(var Zt of Ue(je))un.call(je,Zt)&&Ln(Re,Zt,je[Zt]);return Re},Gt=(Re,je)=>he(Re,Ze(je));const qe={labelCol:{span:4},wrapperCol:{span:20}};var Bn=({callback:Re,onCancel:je})=>{function Zt(Ve){Re(Ve)}return Ot.createElement(ee.default,Gt(Pe({},qe),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Zt,style:{width:500}}),Ot.createElement(ee.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},Ot.createElement(ve.default,null)),Ot.createElement(ee.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},Ot.createElement(ve.default,null)),Ot.createElement("div",{className:"flex-container flex-end"},Ot.createElement(_t.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Ot.createElement(_t.ZP,{type:"ghost",onClick:je},"\u53D6\u6D88")))},zn=xt(53932),He=xt(28451),Fe=xt(43418),cn=xt(95237),Wn=xt(16406),fn=xt(59301),dn=({callback:Re,onCancel:je})=>{const Zt=document.createElement("canvas"),Ve=Zt.getContext("2d");Zt.width=1e3,Zt.height=800,Ve.fillStyle="#ffffff",Ve.fillRect(0,0,Zt.width,Zt.height);const vn=Zt.toDataURL("image/png");return fn.createElement(Fe.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},fn.createElement(cn.Z,{style:{height:"100vh"}},fn.createElement(Wn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:vn,visible:!0,title:String(Date.now())},onOk:Se=>{Re({src:Se.url})},onClose:je})))},de=xt(12378);function mn(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(mn,go.CommandHandler),mn.prototype.canAlignSelection=function(){var Re=this.diagram;return!(Re===null||Re.isReadOnly||Re.isModelReadOnly||Re.selection.count<2)},mn.prototype.alignLeft=function(){var Re=this.diagram;Re.startTransaction("aligning left");var je=1/0;Re.selection.each(function(Zt){Zt instanceof go.Link||(je=Math.min(Zt.position.x,je))}),Re.selection.each(function(Zt){Zt instanceof go.Link||Zt.move(new go.Point(je,Zt.position.y))}),Re.commitTransaction("aligning left")},mn.prototype.alignRight=function(){var Re=this.diagram;Re.startTransaction("aligning right");var je=-1/0;Re.selection.each(function(Zt){if(!(Zt instanceof go.Link)){var Ve=Zt.actualBounds.x+Zt.actualBounds.width;je=Math.max(Ve,je)}}),Re.selection.each(function(Zt){Zt instanceof go.Link||Zt.move(new go.Point(je-Zt.actualBounds.width,Zt.position.y))}),Re.commitTransaction("aligning right")},mn.prototype.alignTop=function(){var Re=this.diagram;Re.startTransaction("alignTop");var je=1/0;Re.selection.each(function(Zt){Zt instanceof go.Link||(je=Math.min(Zt.position.y,je))}),Re.selection.each(function(Zt){Zt instanceof go.Link||Zt.move(new go.Point(Zt.position.x,je))}),Re.commitTransaction("alignTop")},mn.prototype.alignBottom=function(){var Re=this.diagram;Re.startTransaction("aligning bottom");var je=-1/0;Re.selection.each(function(Zt){if(!(Zt instanceof go.Link)){var Ve=Zt.actualBounds.y+Zt.actualBounds.height;je=Math.max(Ve,je)}}),Re.selection.each(function(Zt){Zt instanceof go.Link||Zt.move(new go.Point(Zt.actualBounds.x,je-Zt.actualBounds.height))}),Re.commitTransaction("aligning bottom")},mn.prototype.alignCenterX=function(){var Re=this.diagram,je=Re.selection.first();if(je){Re.startTransaction("aligning Center X");var Zt=je.actualBounds.x+je.actualBounds.width/2;Re.selection.each(function(Ve){Ve instanceof go.Link||Ve.move(new go.Point(Zt-Ve.actualBounds.width/2,Ve.actualBounds.y))}),Re.commitTransaction("aligning Center X")}},mn.prototype.alignCenterY=function(){var Re=this.diagram,je=Re.selection.first();if(je){Re.startTransaction("aligning Center Y");var Zt=je.actualBounds.y+je.actualBounds.height/2;Re.selection.each(function(Ve){Ve instanceof go.Link||Ve.move(new go.Point(Ve.actualBounds.x,Zt-Ve.actualBounds.height/2))}),Re.commitTransaction("aligning Center Y")}},mn.prototype.alignColumn=function(Re){var je=this.diagram;je.startTransaction("align Column"),Re===void 0&&(Re=0),Re=parseFloat(Re);var Zt=new Array;je.selection.each(function(Je){Je instanceof go.Link||Zt.push(Je)});for(var Ve=0;Ve0){for(var Je=Se.elt(ae-1);Je!==null&&Je.isTreeExpanded&&!Je.isTreeLeaf;){var pn=this._sortTreeChildrenByY(Je);Je=pn.last()}Je!==null&&Re.select(Je)}else Re.select(vn)}}else if(Zt.key==="Down")if(je.isTreeExpanded&&!je.isTreeLeaf){var Ve=this._sortTreeChildrenByY(je).first();Ve!==null&&Re.select(Ve)}else for(;je!==null;){var vn=je.findTreeParentNode();if(vn===null)break;var Se=this._sortTreeChildrenByY(vn),ae=Se.indexOf(je);if(aeSe.y?1:vn.xSe.x?1:0}),je},mn.prototype.copyToClipboard=function(Re){go.CommandHandler.prototype.copyToClipboard.call(this,Re),this._lastPasteOffset.set(this.pasteOffset)},mn.prototype.pasteFromClipboard=function(){var Re=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(Re,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),Re},Object.defineProperty(mn.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(Re){if(Re!=="move"&&Re!=="select"&&Re!=="scroll"&&Re!=="tree"&&Re!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+Re);this._arrowKeyBehavior=Re}}),Object.defineProperty(mn.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(Re){if(!(Re instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+Re);this._pasteOffset.set(Re)}});var Tn=mn,Qe=xt(74413),wn=xt(43604),Oe=xt(99064),we={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},ne=xt(24065),Dt=xt(59301),ge=(Re,je,Zt)=>new Promise((Ve,vn)=>{var Se=pn=>{try{Je(Zt.next(pn))}catch(Ge){vn(Ge)}},ae=pn=>{try{Je(Zt.throw(pn))}catch(Ge){vn(Ge)}},Je=pn=>pn.done?Ve(pn.value):Promise.resolve(pn.value).then(Se,ae);Je((Zt=Zt.apply(Re,je)).next())});function xe({onCancel:Re,callback:je}){let Zt=(0,Ot.useRef)(),Ve=(0,Ot.useRef)(),vn=(0,Ot.useRef)(),Se=(0,Ot.useRef)(!1);const ae=(0,Ot.useRef)(!1),[Je,pn]=(0,Ot.useState)(0);function Ge(){const At=de.bx.make,Ae={red:"#ff3333",blue:"#3358ff",green:"#25ad23",magenta:"#d533ff",purple:"#7d33ff",orange:"#ff6233",brown:"#8e571e",white:"#ffffff",black:"#000000",beige:"#fffcd5",extralightblue:"#d5ebff",extralightred:"#f2dfe0",lightblue:"#a5d2fa",lightgray:"#cccccc",lightgreen:"#b3e6b3",lightred:"#fcbbbd"};Zt.current=new de.S0(Ve.current,{padding:20,grid:At(de.s_,"Grid",At(de.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),At(de.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Rn=>{var ui=Rn.diagram.commandHandler.addTopLevelParts(Rn.diagram.selection,!0);ui||Rn.diagram.currentTool.doCancel()},commandHandler:At(Tn),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Rn=>{var ui=Rn.subject;ui.location=ui.location.copy().snapToGridPoint(Rn.diagram.grid.gridOrigin,Rn.diagram.grid.gridCellSize),setTimeout(()=>{Rn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Rn=>{var ui=Rn.subject;setTimeout(()=>{Rn.diagram.commandHandler.editTextBlock()})},LinkRelinked:Rn=>{var ui=Rn.parameter.part;ui.invalidateConnectedLinks();var Si=Rn.subject;Rn.diagram.toolManager.linkingTool.isForwards?Si.toNode.invalidateConnectedLinks():Si.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Zt.current.nodeTemplate=At(de.NB,"Auto",{locationSpot:de.z6.Center,locationObjectName:"SHAPE",desiredSize:new de.$u(120,60),minSize:new de.$u(40,40),resizable:!0,resizeCellSize:new de.$u(10,10),rotatable:!0},new de.KX("location","loc",de.E9.parse).makeTwoWay(de.E9.stringify),new de.KX("desiredSize","size",de.$u.parse).makeTwoWay(de.$u.stringify),At(de.bn,{name:"SHAPE",fill:Ae.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:de.z6.AllSides,toSpot:de.z6.AllSides},new de.KX("figure"),new de.KX("fill"),new de.KX("stroke","borderColor"),new de.KX("strokeWidth","thickness"),new de.KX("strokeDashArray","dash")),At(de.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),At(de.al,{margin:1,textAlign:"center",overflow:de.al.OverflowEllipsis,editable:!0},new de.KX("text").makeTwoWay(),new de.KX("stroke","color"))),Zt.current.nodeTemplate.toolTip=At("ToolTip",At(de.s_,"Vertical",{maxSize:new de.$u(200,NaN)},At(de.al,{font:"bold 10pt sans-serif",textAlign:"center"},new de.KX("text")),At(de.al,{font:"10pt sans-serif",textAlign:"center"},new de.KX("text","details"))));function on(Rn,ui){var Si=(fi,Mi)=>{fi.handled=!0,fi.diagram.model.commit($i=>{var Bi=Mi.part.adornedPart,zi=new de.E9().setRectSpot(Bi.actualBounds,Rn);zi.subtract(Bi.location),zi.scale(2,2),zi.x+=Math.sign(zi.x)*130,zi.y+=Math.sign(zi.y)*130,zi.add(Bi.location),zi.snapToGridPoint(fi.diagram.grid.gridOrigin,fi.diagram.grid.gridCellSize);var qi=$i.copyNodeData(Bi.data);$i.setGroupKeyForNodeData(qi,$i.getGroupKeyForNodeData(Bi.data)),$i.addNodeData(qi);var yn={from:Bi.key,to:$i.getKeyForNodeData(qi)};$i.addLinkData(yn);var Eo=fi.diagram.findNodeForData(qi);Eo.location=zi,fi.diagram.select(Eo),setTimeout(()=>{fi.diagram.commandHandler.editTextBlock()},20)})};return At(de.bn,{figure:ui,alignment:Rn,alignmentFocus:Rn.opposite(),width:Rn.equals(de.z6.Top)||Rn.equals(de.z6.Bottom)?25:18,height:Rn.equals(de.z6.Top)||Rn.equals(de.z6.Bottom)?18:25,fill:"orange",stroke:Ae.white,strokeWidth:4,mouseEnter:(fi,Mi)=>Mi.fill="dodgerblue",mouseLeave:(fi,Mi)=>Mi.fill="orange",isActionable:!0,click:Si,contextClick:Si})}function bn(Rn){return At(de.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,Si)=>Si.fill="dodgerblue",mouseLeave:(ui,Si)=>Si.fill="orange",click:(ui,Si)=>{ui.diagram.commandHandler.showContextMenu(Si.part.adornedPart)}},Rn||{})}Zt.current.nodeTemplate.selectionAdornmentTemplate=At(de.uz,"Spot",At(de.Vm,{padding:10}),on(de.z6.Top,"TriangleUp"),on(de.z6.Left,"TriangleLeft"),on(de.z6.Right,"TriangleRight"),on(de.z6.Bottom,"TriangleDown"),bn({alignment:new de.z6(.75,0)}));function be(Rn,ui){return(Si,fi)=>{Si.handled=!0,Si.diagram.model.commit(Mi=>{Mi.set(fi.part.adornedPart.data,Rn,ui)})}}function De(Rn,ui){return ui||(ui="color"),At(de.bn,{width:16,height:16,stroke:"lightgray",fill:Rn,margin:1,background:"transparent",mouseEnter:(Si,fi)=>fi.stroke="dodgerblue",mouseLeave:(Si,fi)=>fi.stroke="lightgray",click:be(ui,Rn),contextClick:be(ui,Rn)})}function On(){return[At("ContextMenuButton",At(de.s_,"Horizontal",De(Ae.white,"fill"),De(Ae.beige,"fill"),De(Ae.extralightblue,"fill"),De(Ae.extralightred,"fill"))),At("ContextMenuButton",At(de.s_,"Horizontal",De(Ae.lightgray,"fill"),De(Ae.lightgreen,"fill"),De(Ae.lightblue,"fill"),De(Ae.lightred,"fill")))]}function Zn(){return[At("ContextMenuButton",At(de.s_,"Horizontal",De(Ae.black),De(Ae.green),De(Ae.blue),De(Ae.red))),At("ContextMenuButton",At(de.s_,"Horizontal",De(Ae.white),De(Ae.magenta),De(Ae.purple),De(Ae.orange)))]}function Vn(Rn,ui){return ui||(ui="thickness"),At(de.bn,"LineH",{width:16,height:16,strokeWidth:Rn,margin:1,background:"transparent",mouseEnter:(Si,fi)=>fi.background="dodgerblue",mouseLeave:(Si,fi)=>fi.background="transparent",click:be(ui,Rn),contextClick:be(ui,Rn)})}function $n(Rn,ui){return ui||(ui="dash"),At(de.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Rn,margin:1,background:"transparent",mouseEnter:(Si,fi)=>fi.background="dodgerblue",mouseLeave:(Si,fi)=>fi.background="transparent",click:be(ui,Rn),contextClick:be(ui,Rn)})}function Xn(){return[At("ContextMenuButton",At(de.s_,"Horizontal",Vn(1),Vn(2),Vn(3),Vn(4))),At("ContextMenuButton",At(de.s_,"Horizontal",$n(null),$n([2,4]),$n([4,4])))]}function Un(Rn,ui){return ui||(ui="figure"),At(de.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Rn,margin:1,background:"transparent",mouseEnter:(Si,fi)=>fi.fill="dodgerblue",mouseLeave:(Si,fi)=>fi.fill="lightgray",click:be(ui,Rn),contextClick:be(ui,Rn)})}Zt.current.nodeTemplate.contextMenu=At("ContextMenu",At("ContextMenuButton",At(de.s_,"Horizontal",Un("Rectangle"),Un("RoundedRectangle"),Un("Ellipse"),Un("Diamond"))),At("ContextMenuButton",At(de.s_,"Horizontal",Un("Parallelogram2"),Un("ManualOperation"),Un("Procedure"),Un("Cylinder1"))),At("ContextMenuButton",At(de.s_,"Horizontal",Un("Terminator"),Un("CreateRequest"),Un("Document"),Un("TriangleDown"))),On(),Zn(),Xn()),Zt.current.groupTemplate=At(de.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:de.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Rn,ui)=>{var Si=ui.addMembers(ui.diagram.selection,!0);Si||ui.diagram.currentTool.doCancel()},avoidable:!1},new de.KX("location","loc",de.E9.parse).makeTwoWay(de.E9.stringify),At(de.s_,"Auto",{name:"BODY"},At(de.bn,{parameter1:10,fill:Ae.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:de.z6.AllSides,toSpot:de.z6.AllSides},new de.KX("fill"),new de.KX("stroke","color"),new de.KX("strokeWidth","thickness"),new de.KX("strokeDashArray","dash")),At(de.Vm,{background:"transparent",margin:20})),At(de.al,{alignment:de.z6.Top,alignmentFocus:de.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new de.KX("text"),new de.KX("stroke","color"))),Zt.current.groupTemplate.selectionAdornmentTemplate=At(de.uz,"Spot",At(de.s_,"Auto",At(de.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),At(de.Vm,{margin:1.5})),bn({alignment:de.z6.TopRight,alignmentFocus:de.z6.BottomRight})),Zt.current.groupTemplate.contextMenu=At("ContextMenu",On(),Zn(),Xn()),Zt.current.linkTemplate=At(de.rU,{layerName:"Foreground",routing:de.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new de.KX("fromSpot","fromSpot",de.z6.parse),new de.KX("toSpot","toSpot",de.z6.parse),new de.KX("fromShortLength","dir",Rn=>Rn>=1?10:0),new de.KX("toShortLength","dir",Rn=>Rn>=1?10:0),new de.KX("points").makeTwoWay(),At(de.bn,{strokeWidth:2},new de.KX("stroke","color"),new de.KX("strokeWidth","thickness"),new de.KX("strokeDashArray","dash")),At(de.bn,{segmentIndex:0,segmentOffset:new de.E9(15,0),segmentOrientation:de.rU.OrientAlong,alignmentFocus:de.z6.Right,figure:"circle",width:10,strokeWidth:0},new de.KX("fill","color"),new de.KX("visible","dir",Rn=>Rn===1)),At(de.bn,{segmentIndex:-1,segmentOffset:new de.E9(-10,6),segmentOrientation:de.rU.OrientPlus90,alignmentFocus:de.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new de.KX("fill","color"),new de.KX("visible","dir",Rn=>Rn>=1),new de.KX("width","thickness",Rn=>7+3*Rn),new de.KX("height","thickness",Rn=>7+3*Rn),new de.KX("segmentOffset","thickness",Rn=>new de.E9(-15,4+1.5*Rn))),At(de.bn,{segmentIndex:0,segmentOffset:new de.E9(15,-6),segmentOrientation:de.rU.OrientMinus90,alignmentFocus:de.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new de.KX("fill","color"),new de.KX("visible","dir",Rn=>Rn===2),new de.KX("width","thickness",Rn=>7+3*Rn),new de.KX("height","thickness",Rn=>7+3*Rn),new de.KX("segmentOffset","thickness",Rn=>new de.E9(-15,4+1.5*Rn))),At(de.al,{alignmentFocus:new de.z6(0,1,-4,0),editable:!0},new de.KX("text").makeTwoWay(),new de.KX("stroke","color"))),Zt.current.linkTemplate.selectionAdornmentTemplate=At(de.uz,At(de.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:di(2)},new de.KX("pathPattern","thickness",di)),bn({alignmentFocus:new de.z6(0,0,-6,-4)}));function di(Rn){return At(de.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Rn+4).toString()+" H3"})}function ki(Rn){var ui="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Rn===0?ui="M0 0 M16 16 M0 8 L16 8":Rn===2&&(ui="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),At(de.bn,{geometryString:ui,margin:2,background:"transparent",mouseEnter:(Si,fi)=>fi.background="dodgerblue",mouseLeave:(Si,fi)=>fi.background="transparent",click:be("dir",Rn),contextClick:be("dir",Rn)})}function Ti(Rn){var ui=(Si,fi)=>{Si.handled=!0,Si.diagram.model.commit(Mi=>{var $i=fi.part.adornedPart;Mi.set($i.data,Rn?"toSpot":"fromSpot",de.z6.stringify(de.z6.AllSides)),(Rn?$i.toNode:$i.fromNode).invalidateConnectedLinks()})};return At(de.bn,{width:12,height:12,fill:"transparent",mouseEnter:(Si,fi)=>fi.background="dodgerblue",mouseLeave:(Si,fi)=>fi.background="transparent",click:ui,contextClick:ui})}function hn(Rn,ui){var Si=0,fi=de.z6.RightSide;Rn.equals(de.z6.Top)?(Si=270,fi=de.z6.TopSide):Rn.equals(de.z6.Left)?(Si=180,fi=de.z6.LeftSide):Rn.equals(de.z6.Bottom)&&(Si=90,fi=de.z6.BottomSide),ui||(Si-=180);var Mi=($i,Bi)=>{$i.handled=!0,$i.diagram.model.commit(zi=>{var qi=Bi.part.adornedPart;zi.set(qi.data,ui?"toSpot":"fromSpot",de.z6.stringify(fi)),(ui?qi.toNode:qi.fromNode).invalidateConnectedLinks()})};return At(de.bn,{alignment:Rn,alignmentFocus:Rn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:Si,background:"transparent",mouseEnter:($i,Bi)=>Bi.background="dodgerblue",mouseLeave:($i,Bi)=>Bi.background="transparent",click:Mi,contextClick:Mi})}Zt.current.linkTemplate.contextMenu=At("ContextMenu",Zn(),Xn(),At("ContextMenuButton",At(de.s_,"Horizontal",ki(0),ki(1),ki(2))),At("ContextMenuButton",At(de.s_,"Horizontal",At(de.s_,"Spot",Ti(!1),hn(de.z6.Top,!1),hn(de.z6.Left,!1),hn(de.z6.Right,!1),hn(de.z6.Bottom,!1)),At(de.s_,"Spot",{margin:new de.Zt(0,0,0,2)},Ti(!0),hn(de.z6.Top,!0),hn(de.z6.Left,!0),hn(de.z6.Right,!0),hn(de.z6.Bottom,!0)))));const Hi=`{ "class": "GraphLinksModel", + }`;return(0,Ot.useEffect)(()=>{const Le=ne.current.attachShadow({mode:"open"});me.current=document.createElement("div"),me.current.className="markdown-body",me.current.innerHTML=re,Le.appendChild(me.current);const he=document.createElement("style");return he.textContent=Vt,Le.appendChild(he),()=>{Le.innerHTML=""}},[]),(0,Ot.useEffect)(()=>{me.current&&(me.current.innerHTML=re)},[re]),ce.createElement("div",{ref:ne})},Tt=Object.defineProperty,et=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,st=(re,ne,me)=>ne in re?Tt(re,ne,{enumerable:!0,configurable:!0,writable:!0,value:me}):re[ne]=me,gt=(re,ne)=>{for(var me in ne||(ne={}))nt.call(ne,me)&&st(re,me,ne[me]);if(et)for(var me of et(ne))ht.call(ne,me)&&st(re,me,ne[me]);return re};const vt="@\u2581\u2581@",wt="@\u2581@",Ft=/]*>/g;function It(re){let ne=document.createElement("div");return ne.innerHTML=re,ne.childNodes.length===0?"":ne.childNodes[0].nodeValue}const At=(re,ne)=>{re=re||"";const me=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Vt=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Le=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,he=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return ne?re.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(me,(He,Ke,Ve,sn,Mn,xe,Ht)=>{const Je=Ke||sn||xe,Tn=Ve||Mn||Ht||"?";return pe.Z.API_SERVER+"/api/attachments/"+Je+Tn+"&t="+(0,Nt.Jn)(Je,Date.now())+(He.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(re=re.replace(he,(He,Ke,Ve,sn,Mn,xe,Ht)=>{const Je=Ke||sn||xe,Tn=Ve||Mn||Ht||"?";return pe.Z.API_SERVER+"/attachments/download/"+Je+Tn+"&t="+(0,Nt.Jn)(Je,Date.now())+(He.indexOf(")")>-1?")":"&")}).replace(me,(He,Ke,Ve,sn,Mn,xe,Ht)=>{const Je=Ke||sn||xe,Tn=Ve||Mn||Ht||"?";return pe.Z.API_SERVER+"/api/attachments/"+Je+Tn+"&t="+(0,Nt.Jn)(Je,Date.now())+(He.indexOf(")")>-1?")":"&")}).replace(Vt,(He,Ke,Ve,sn,Mn)=>{const xe=Ke||sn,Ht=Ve||Mn||"";return'"'+pe.Z.API_SERVER+"/api/attachments/"+xe+Ht+xe+Ht+"&t="+(0,Nt.Jn)(xe,Date.now())}).replace(Le,(He,Ke,Ve,sn,Mn)=>{const xe=Ke||sn,Ht=Ve||Mn||"";return"("+pe.Z.API_SERVER+"/files/uploads/"+xe+Ht+xe+Ht+"&t="+(0,Nt.Jn)(xe,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,` +`),re)};var Wt=({value:re="",className:ne,showTextOnly:me,showLines:Vt,style:Le={},stylesPrev:he={},highlightKeywords:He,showProgramFill:Ke,isProgramFill:Ve,disabledFill:sn=!1,programFillValue:Mn,onFillChange:xe=Tn=>{},onFillBlur:Ht=()=>{},onFillFocus:Je=()=>{}})=>{let Tn=String(re);const[An,ze]=(0,Ot.useState)(""),[Te,dn]=(0,Ot.useState)("office"),[Hn,hn]=(0,Ot.useState)([]),pn=(0,Ot.useRef)("a"+(0,we.Z)()),de={},vn=(kt,St,mt)=>{const Lt=document.createElement(kt===wt?"input":"textarea");Lt.style.width="100%",Lt.style.height=kt===wt?"40px":"151px",Lt.rows=5,Lt.spellcheck=!1,Lt.name="edu-program-fill",Lt.placeholder="\u8BF7\u8F93\u5165",Lt.dataset.id=St;const zt=Object.keys(de).length;return de[zt]=Lt,`${Lt.outerHTML}`};function bn(kt){return kt=kt.replace(/!\[.*?\]\(.*?\)/g,""),kt=kt.replace(/\[.*?\]\(.*?\)/g,""),kt=kt.replace(new RegExp("","gs"),""),kt=kt.replace(//g,""),kt=kt.replace(//g,""),kt=kt.replace(new RegExp(".*?<\\/video>","gs"),""),kt=kt.replace(new RegExp(".*?<\\/audio>","gs"),""),kt=kt.replace(new RegExp(".*?<\\/style>","gs"),""),kt=kt.replace(new RegExp(".*?<\\/script>","gs"),""),kt}const Qe=kt=>kt.replace(/([\s\S]+?)<\/style>/gim,function(St,mt){let Lt=mt.replace(/(\n|\r)/g,"").split("}"),zt=[];return Lt.map(Et=>{Et!=""&&zt.push(`.${pn.current} ${Et}`)}),``}),Pn=(0,Ot.useMemo)(()=>{try{const Lt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,zt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Et=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Yt=/\(\/attachments\/download\//g;Tn=Tn.replace(Yt,"("+pe.Z.API_SERVER+"/attachments/download/").replace(Lt,"("+pe.Z.API_SERVER+"/api/attachments/").replace(zt,'"'+pe.Z.API_SERVER+"/api/attachments/").replace(Et,'"'+pe.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(Lt){}if(Ke){let Lt=-1;return Tn=Tn.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(zt,Et,Yt){var Ge;return++Lt,vn(zt,Lt,(Ge=Mn==null?void 0:Mn[Lt])==null?void 0:Ge.value.replaceAll("<","<").replaceAll(">",">"))}),`
${Qe(Tn||"")}
`}let kt=Qe(Tn);kt=(0,Qt.ZP)(kt);const St=(0,Qt.ez)();Tn.match(/\[TOC\]/)&&(kt=kt.replace("

[TOC]

",(0,Qt.Qv)()),(0,Qt.Iy)()),kt=kt.replace(/(__special_katext_id_\d+__)/g,(Lt,zt)=>{const{type:Et,expression:Yt}=St[zt];return(0,Ie.renderToString)(It(Yt)||"",{displayMode:Et==="block",throwOnError:!1,output:"html"})}),kt=kt.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Qt.AL)();const mt=document.createElement("div");if(mt.innerHTML=kt,me)return mt.innerText;if(He){const Lt=He.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Dt(mt,Lt),mt.innerHTML}return setTimeout(()=>ee(),500),mt.innerHTML},[Tn,He]);(0,Ot.useEffect)(()=>{fe.current&&fe.current.querySelectorAll(["input","textarea"]).forEach(St=>{St.oninput=Ne,St.onblur=Pe,St.onfocus=ie})},[Hn]),(0,Ot.useEffect)(()=>{var kt,St,mt,Lt,zt;if(Mn!=null&&Mn.length)try{const Et=fe.current.querySelectorAll(".edu-program-fill-score"),Yt=fe.current.querySelectorAll('[name="edu-program-fill"]');for(const[Ge,ln]of Yt.entries())ln.value=((kt=Mn==null?void 0:Mn[Ge])==null?void 0:kt.value)||"",((St=Mn==null?void 0:Mn[Ge])==null?void 0:St.type)==="warning"?ln.className="program-fill-warning":((mt=Mn==null?void 0:Mn[Ge])==null?void 0:mt.type)==="success"?ln.className="program-fill-success":ln.className="";for(const[Ge,ln]of Et.entries())ln.innerHTML=(Lt=Mn==null?void 0:Mn[Ge])!=null&&Lt.score?`${(zt=Mn==null?void 0:Mn[Ge])==null?void 0:zt.score}\u5206`:"";hn(Mn)}catch(Et){console.log(Et,"error")}},[Mn]);const Ne=kt=>{Hn[kt.target.dataset.id]=Hn[kt.target.dataset.id]||{},Hn[kt.target.dataset.id].value=kt.target.value,hn([...Hn]),xe(Hn,kt.target.dataset.id)},Pe=kt=>{Hn[kt.target.dataset.id]=Hn[kt.target.dataset.id]||{},Hn[kt.target.dataset.id].value=kt.target.value,hn([...Hn]),Ht(Hn,kt.target.dataset.id)},ie=kt=>{Hn[kt.target.dataset.id]=Hn[kt.target.dataset.id]||{},Hn[kt.target.dataset.id].value=kt.target.value,hn([...Hn]),Je(Hn,kt.target.dataset.id)};function Dt(kt,St){return kt.childNodes.forEach(mt=>{var Lt;if(mt.childNodes.length>0)Dt(mt,St);else if(mt.nodeName!=="IMG")if(mt.innerHTML)mt.innerHTML=(Lt=mt.innerHTML)==null?void 0:Lt.replace(new RegExp(St,"gi"),'$&');else{const zt=document.createElement("span");zt.innerHTML=mt.textContent.replace(new RegExp(St,"gi"),'$&'),mt.replaceWith(zt)}})}const fe=(0,Ot.useRef)();Qt.jb.WebkitLineClamp=Vt,Vt&&(Le=gt(gt({},Le),Qt.jb));function Se(kt){let St=kt.target;if(St.tagName.toUpperCase()==="A"){let mt=St.getAttribute("href");if(mt.indexOf("office")>-1)kt.preventDefault(),ze(mt),dn("office");else if(mt.indexOf("application/pdf")>-1)kt.preventDefault(),ze(mt),dn("pdf");else if(mt.indexOf("text/html")>-1)kt.preventDefault(),ze(mt),dn("html");else if(mt.startsWith("#")){kt.preventDefault();let Lt=document.getElementById(mt.replace("#",""));Lt&&Lt.scrollIntoView(!0)}}}const ee=()=>{var kt;const St=(kt=fe.current)==null?void 0:kt.querySelectorAll("video");St==null||St.forEach(mt=>{if(mt.oncontextmenu=()=>!1,mt.src.indexOf(".m3u8")>-1&&!mt.canPlayType("application/vnd.apple.mpegurl")){if(Ut.ZP.isSupported()){var Lt=new Ut.ZP;Lt.loadSource(mt.src),Lt.attachMedia(mt)}}})};(0,Ot.useEffect)(()=>{if(fe.current&&Pn&&Pn.match(Ft)&&window.PR.prettyPrint(),fe.current)return fe.current.addEventListener("click",Se),()=>{var kt;(kt=fe.current)==null||kt.removeEventListener("click",Se),(0,Qt.AL)(),(0,Qt.Iy)()}},[Pn,fe.current,Se]),(0,Ot.useEffect)(()=>{var kt;const St=mt=>{mt.preventDefault(),mt.clipboardData.setData("text",window.getSelection().toString())};return(kt=fe.current)==null||kt.addEventListener("copy",St),()=>{var mt;(mt=fe.current)==null||mt.removeEventListener("copy",St)}},[fe.current]);const Kt=kt=>//i.test(kt||"");return Ot.createElement(Ot.Fragment,null,me&&Ot.createElement("div",{ref:fe},Pn),!me&&!Kt(Pn)&&Ot.createElement("div",{ref:fe,style:gt({},Le),className:`${ne||""} ${sn?"disabled-fill":""} markdown-body ${pn.current}`,dangerouslySetInnerHTML:{__html:Pn}}),!me&&Kt(Pn)&&Ot.createElement(Be,{html:Pn}),Ot.createElement(qt.Z,{close:!0,data:An,type:An!=null&&An.length?Te:"",style:gt({},he),onClose:()=>ze("")}))}},53932:function(En,yn,xt){"use strict";xt.d(yn,{h:function(){return wt},Z:function(){return vt}});var Ot=xt(59301),jt=xt(57809),Qt=xt(78241),Me=xt(3113),Ut=xt(89780),pe=xt.n(Ut),Nt=xt(37036),Ie=Object.defineProperty,we=Object.defineProperties,qt=Object.getOwnPropertyDescriptors,ce=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Be=Object.prototype.propertyIsEnumerable,Tt=(Ft,It,At)=>It in Ft?Ie(Ft,It,{enumerable:!0,configurable:!0,writable:!0,value:At}):Ft[It]=At,et=(Ft,It)=>{for(var At in It||(It={}))Ce.call(It,At)&&Tt(Ft,At,It[At]);if(ce)for(var At of ce(It))Be.call(It,At)&&Tt(Ft,At,It[At]);return Ft},nt=(Ft,It)=>we(Ft,qt(It));const ht=jt.default.Option,st={labelCol:{span:4},wrapperCol:{span:20}},gt={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};var vt=({callback:Ft,onCancel:It})=>{const[At,Wt]=(0,Ot.useState)("python");function re(me){Wt(gt[me][1])}function ne(me){Ft(me)}return Ot.createElement(Qt.default,nt(et({},st),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:ne,style:{width:500}}),Ot.createElement(Qt.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},Ot.createElement(jt.default,{getPopupContainer:me=>me.parentNode,onChange:re},Object.keys(gt).map(me=>Ot.createElement(ht,{key:me,value:me},gt[me][0])))),Ot.createElement(Qt.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},Ot.createElement(wt,{mode:At})),Ot.createElement("div",{className:"flex-container flex-end"},Ot.createElement(Me.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Ot.createElement(Me.ZP,{type:"ghost",onClick:It},"\u53D6\u6D88")))};function wt({value:Ft,onChange:It,mode:At,options:Wt={}}){const re=(0,Ot.useRef)(),[ne,me]=(0,Ot.useState)();return(0,Ot.useEffect)(()=>{if(ne){let Vt=function(Le){const he=Le.getValue();It&&It(he)};return ne.on("change",Vt),()=>{ne.off("change",Vt)}}},[ne,It]),(0,Ot.useEffect)(()=>{ne&&ne.setOption("mode",At)},[ne,At]),(0,Ot.useEffect)(()=>{ne&&(Ft!==ne.getValue()||Ft==="")&&setTimeout(()=>{ne.setValue(Ft||"")},300)},[ne,Ft]),(0,Ot.useEffect)(()=>{if(re.current&&!ne){const Vt=pe().fromTextArea(re.current,et({mode:At,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Wt));me(Vt)}},[re.current,ne]),Ot.createElement("div",{className:"my-codemirror-container"},Ot.createElement("textarea",{ref:re}))}},12290:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return di}});var Ot=xt(59301),jt=xt(89780),Qt=xt.n(jt),Me=xt(76374),Ut=xt(37036),pe=xt(6313),Nt=xt(25717),Ie=xt(99498),we=xt(25419),qt=xt(67549),ce=xt(85149),Ce=({value:Fe="",className:Ae,showTextOnly:Zt,showLines:$e,style:fn={}})=>{const ye=(0,Ot.useMemo)(()=>"",[Fe]);return Ot.createElement(Ot.Fragment,null,Ot.createElement("div",{dangerouslySetInnerHTML:{__html:ye}}))},Be=xt(59301),Tt=Object.defineProperty,et=Object.defineProperties,nt=Object.getOwnPropertyDescriptors,ht=Object.getOwnPropertySymbols,st=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable,vt=(Fe,Ae,Zt)=>Ae in Fe?Tt(Fe,Ae,{enumerable:!0,configurable:!0,writable:!0,value:Zt}):Fe[Ae]=Zt,wt=(Fe,Ae)=>{for(var Zt in Ae||(Ae={}))st.call(Ae,Zt)&&vt(Fe,Zt,Ae[Zt]);if(ht)for(var Zt of ht(Ae))gt.call(Ae,Zt)&&vt(Fe,Zt,Ae[Zt]);return Fe},Ft=(Fe,Ae)=>et(Fe,nt(Ae));let It=[{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 At({onActionCallback:Fe,title:Ae,icon:Zt,actionName:$e,className:fn="",children:ye}){function ae(){Fe($e)}return Be.createElement("a",{title:Ae,className:fn,onClick:ae},Be.createElement("i",{className:`${Zt}`}),ye)}var Wt=({watch:Fe,showNullButton:Ae,showNullProgramButton:Zt,onActionCallback:$e,fullScreen:fn,insertTemp:ye,hidetoolBar:ae,extraUse:Ye})=>{const gn=[...It,{title:`${Fe?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Fe?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return Be.createElement("ul",{className:"markdown-toolbar-container"},!ae&&gn.map((In,Re)=>Be.createElement("li",{key:Re},In.actionName?Be.createElement(At,Ft(wt({},In),{onActionCallback:$e})):Be.createElement("span",{className:"v-line"}))),Ae?Be.createElement("li",null,Be.createElement(At,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:$e},Be.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Zt?Be.createElement(Be.Fragment,null,Be.createElement("li",null,Be.createElement(At,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:$e},Be.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),Be.createElement("li",null,Be.createElement(At,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:$e},Be.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,ye&&Be.createElement("li",null,Be.createElement(At,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${ye}`,onActionCallback:$e},Be.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Ye&&Be.createElement("li",null,Ye),Be.createElement("li",{className:"btn-full-screen"},Be.createElement(At,{icon:`${fn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:fn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:$e})))},re=xt(79346),ne=xt(78241),me=xt(92832),Vt=xt(3113),Le=Object.defineProperty,he=Object.defineProperties,He=Object.getOwnPropertyDescriptors,Ke=Object.getOwnPropertySymbols,Ve=Object.prototype.hasOwnProperty,sn=Object.prototype.propertyIsEnumerable,Mn=(Fe,Ae,Zt)=>Ae in Fe?Le(Fe,Ae,{enumerable:!0,configurable:!0,writable:!0,value:Zt}):Fe[Ae]=Zt,xe=(Fe,Ae)=>{for(var Zt in Ae||(Ae={}))Ve.call(Ae,Zt)&&Mn(Fe,Zt,Ae[Zt]);if(Ke)for(var Zt of Ke(Ae))sn.call(Ae,Zt)&&Mn(Fe,Zt,Ae[Zt]);return Fe},Ht=(Fe,Ae)=>he(Fe,He(Ae));const Je={labelCol:{span:4},wrapperCol:{span:20}};var Tn=({callback:Fe,onCancel:Ae})=>{function Zt($e){Fe($e)}return Ot.createElement(ne.default,Ht(xe({},Je),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Zt,style:{width:500}}),Ot.createElement(ne.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},Ot.createElement(me.default,null)),Ot.createElement(ne.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},Ot.createElement(me.default,null)),Ot.createElement("div",{className:"flex-container flex-end"},Ot.createElement(Vt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Ot.createElement(Vt.ZP,{type:"ghost",onClick:Ae},"\u53D6\u6D88")))},An=xt(53932),ze=xt(28451),Te=xt(43418),dn=xt(95237),Hn=xt(16406),hn=xt(59301),pn=({callback:Fe,onCancel:Ae})=>{const Zt=document.createElement("canvas"),$e=Zt.getContext("2d");Zt.width=1e3,Zt.height=800,$e.fillStyle="#ffffff",$e.fillRect(0,0,Zt.width,Zt.height);const fn=Zt.toDataURL("image/png");return hn.createElement(Te.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},hn.createElement(dn.Z,{style:{height:"100vh"}},hn.createElement(Hn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:fn,visible:!0,title:String(Date.now())},onOk:ye=>{Fe({src:ye.url})},onClose:Ae})))},de=xt(12378);function vn(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(vn,go.CommandHandler),vn.prototype.canAlignSelection=function(){var Fe=this.diagram;return!(Fe===null||Fe.isReadOnly||Fe.isModelReadOnly||Fe.selection.count<2)},vn.prototype.alignLeft=function(){var Fe=this.diagram;Fe.startTransaction("aligning left");var Ae=1/0;Fe.selection.each(function(Zt){Zt instanceof go.Link||(Ae=Math.min(Zt.position.x,Ae))}),Fe.selection.each(function(Zt){Zt instanceof go.Link||Zt.move(new go.Point(Ae,Zt.position.y))}),Fe.commitTransaction("aligning left")},vn.prototype.alignRight=function(){var Fe=this.diagram;Fe.startTransaction("aligning right");var Ae=-1/0;Fe.selection.each(function(Zt){if(!(Zt instanceof go.Link)){var $e=Zt.actualBounds.x+Zt.actualBounds.width;Ae=Math.max($e,Ae)}}),Fe.selection.each(function(Zt){Zt instanceof go.Link||Zt.move(new go.Point(Ae-Zt.actualBounds.width,Zt.position.y))}),Fe.commitTransaction("aligning right")},vn.prototype.alignTop=function(){var Fe=this.diagram;Fe.startTransaction("alignTop");var Ae=1/0;Fe.selection.each(function(Zt){Zt instanceof go.Link||(Ae=Math.min(Zt.position.y,Ae))}),Fe.selection.each(function(Zt){Zt instanceof go.Link||Zt.move(new go.Point(Zt.position.x,Ae))}),Fe.commitTransaction("alignTop")},vn.prototype.alignBottom=function(){var Fe=this.diagram;Fe.startTransaction("aligning bottom");var Ae=-1/0;Fe.selection.each(function(Zt){if(!(Zt instanceof go.Link)){var $e=Zt.actualBounds.y+Zt.actualBounds.height;Ae=Math.max($e,Ae)}}),Fe.selection.each(function(Zt){Zt instanceof go.Link||Zt.move(new go.Point(Zt.actualBounds.x,Ae-Zt.actualBounds.height))}),Fe.commitTransaction("aligning bottom")},vn.prototype.alignCenterX=function(){var Fe=this.diagram,Ae=Fe.selection.first();if(Ae){Fe.startTransaction("aligning Center X");var Zt=Ae.actualBounds.x+Ae.actualBounds.width/2;Fe.selection.each(function($e){$e instanceof go.Link||$e.move(new go.Point(Zt-$e.actualBounds.width/2,$e.actualBounds.y))}),Fe.commitTransaction("aligning Center X")}},vn.prototype.alignCenterY=function(){var Fe=this.diagram,Ae=Fe.selection.first();if(Ae){Fe.startTransaction("aligning Center Y");var Zt=Ae.actualBounds.y+Ae.actualBounds.height/2;Fe.selection.each(function($e){$e instanceof go.Link||$e.move(new go.Point($e.actualBounds.x,Zt-$e.actualBounds.height/2))}),Fe.commitTransaction("aligning Center Y")}},vn.prototype.alignColumn=function(Fe){var Ae=this.diagram;Ae.startTransaction("align Column"),Fe===void 0&&(Fe=0),Fe=parseFloat(Fe);var Zt=new Array;Ae.selection.each(function(Ye){Ye instanceof go.Link||Zt.push(Ye)});for(var $e=0;$e0){for(var Ye=ye.elt(ae-1);Ye!==null&&Ye.isTreeExpanded&&!Ye.isTreeLeaf;){var gn=this._sortTreeChildrenByY(Ye);Ye=gn.last()}Ye!==null&&Fe.select(Ye)}else Fe.select(fn)}}else if(Zt.key==="Down")if(Ae.isTreeExpanded&&!Ae.isTreeLeaf){var $e=this._sortTreeChildrenByY(Ae).first();$e!==null&&Fe.select($e)}else for(;Ae!==null;){var fn=Ae.findTreeParentNode();if(fn===null)break;var ye=this._sortTreeChildrenByY(fn),ae=ye.indexOf(Ae);if(aeye.y?1:fn.xye.x?1:0}),Ae},vn.prototype.copyToClipboard=function(Fe){go.CommandHandler.prototype.copyToClipboard.call(this,Fe),this._lastPasteOffset.set(this.pasteOffset)},vn.prototype.pasteFromClipboard=function(){var Fe=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(Fe,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),Fe},Object.defineProperty(vn.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(Fe){if(Fe!=="move"&&Fe!=="select"&&Fe!=="scroll"&&Fe!=="tree"&&Fe!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+Fe);this._arrowKeyBehavior=Fe}}),Object.defineProperty(vn.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(Fe){if(!(Fe instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+Fe);this._pasteOffset.set(Fe)}});var bn=vn,Qe=xt(74413),Pn=xt(43604),Ne=xt(99064),Pe={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},ie=xt(24065),Dt=xt(59301),fe=(Fe,Ae,Zt)=>new Promise(($e,fn)=>{var ye=gn=>{try{Ye(Zt.next(gn))}catch(In){fn(In)}},ae=gn=>{try{Ye(Zt.throw(gn))}catch(In){fn(In)}},Ye=gn=>gn.done?$e(gn.value):Promise.resolve(gn.value).then(ye,ae);Ye((Zt=Zt.apply(Fe,Ae)).next())});function Se({onCancel:Fe,callback:Ae}){let Zt=(0,Ot.useRef)(),$e=(0,Ot.useRef)(),fn=(0,Ot.useRef)(),ye=(0,Ot.useRef)(!1);const ae=(0,Ot.useRef)(!1),[Ye,gn]=(0,Ot.useState)(0);function In(){const _t=de.bx.make,nn={red:"#ff3333",blue:"#3358ff",green:"#25ad23",magenta:"#d533ff",purple:"#7d33ff",orange:"#ff6233",brown:"#8e571e",white:"#ffffff",black:"#000000",beige:"#fffcd5",extralightblue:"#d5ebff",extralightred:"#f2dfe0",lightblue:"#a5d2fa",lightgray:"#cccccc",lightgreen:"#b3e6b3",lightred:"#fcbbbd"};Zt.current=new de.S0($e.current,{padding:20,grid:_t(de.s_,"Grid",_t(de.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),_t(de.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Dn=>{var gi=Dn.diagram.commandHandler.addTopLevelParts(Dn.diagram.selection,!0);gi||Dn.diagram.currentTool.doCancel()},commandHandler:_t(bn),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Dn=>{var gi=Dn.subject;gi.location=gi.location.copy().snapToGridPoint(Dn.diagram.grid.gridOrigin,Dn.diagram.grid.gridCellSize),setTimeout(()=>{Dn.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Dn=>{var gi=Dn.subject;setTimeout(()=>{Dn.diagram.commandHandler.editTextBlock()})},LinkRelinked:Dn=>{var gi=Dn.parameter.part;gi.invalidateConnectedLinks();var ki=Dn.subject;Dn.diagram.toolManager.linkingTool.isForwards?ki.toNode.invalidateConnectedLinks():ki.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Zt.current.nodeTemplate=_t(de.NB,"Auto",{locationSpot:de.z6.Center,locationObjectName:"SHAPE",desiredSize:new de.$u(120,60),minSize:new de.$u(40,40),resizable:!0,resizeCellSize:new de.$u(10,10),rotatable:!0},new de.KX("location","loc",de.E9.parse).makeTwoWay(de.E9.stringify),new de.KX("desiredSize","size",de.$u.parse).makeTwoWay(de.$u.stringify),_t(de.bn,{name:"SHAPE",fill:nn.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:de.z6.AllSides,toSpot:de.z6.AllSides},new de.KX("figure"),new de.KX("fill"),new de.KX("stroke","borderColor"),new de.KX("strokeWidth","thickness"),new de.KX("strokeDashArray","dash")),_t(de.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),_t(de.al,{margin:1,textAlign:"center",overflow:de.al.OverflowEllipsis,editable:!0},new de.KX("text").makeTwoWay(),new de.KX("stroke","color"))),Zt.current.nodeTemplate.toolTip=_t("ToolTip",_t(de.s_,"Vertical",{maxSize:new de.$u(200,NaN)},_t(de.al,{font:"bold 10pt sans-serif",textAlign:"center"},new de.KX("text")),_t(de.al,{font:"10pt sans-serif",textAlign:"center"},new de.KX("text","details"))));function cn(Dn,gi){var ki=(Pi,Di)=>{Pi.handled=!0,Pi.diagram.model.commit(_i=>{var zi=Di.part.adornedPart,$i=new de.E9().setRectSpot(zi.actualBounds,Dn);$i.subtract(zi.location),$i.scale(2,2),$i.x+=Math.sign($i.x)*130,$i.y+=Math.sign($i.y)*130,$i.add(zi.location),$i.snapToGridPoint(Pi.diagram.grid.gridOrigin,Pi.diagram.grid.gridCellSize);var qi=_i.copyNodeData(zi.data);_i.setGroupKeyForNodeData(qi,_i.getGroupKeyForNodeData(zi.data)),_i.addNodeData(qi);var mn={from:zi.key,to:_i.getKeyForNodeData(qi)};_i.addLinkData(mn);var Lo=Pi.diagram.findNodeForData(qi);Lo.location=$i,Pi.diagram.select(Lo),setTimeout(()=>{Pi.diagram.commandHandler.editTextBlock()},20)})};return _t(de.bn,{figure:gi,alignment:Dn,alignmentFocus:Dn.opposite(),width:Dn.equals(de.z6.Top)||Dn.equals(de.z6.Bottom)?25:18,height:Dn.equals(de.z6.Top)||Dn.equals(de.z6.Bottom)?18:25,fill:"orange",stroke:nn.white,strokeWidth:4,mouseEnter:(Pi,Di)=>Di.fill="dodgerblue",mouseLeave:(Pi,Di)=>Di.fill="orange",isActionable:!0,click:ki,contextClick:ki})}function Bn(Dn){return _t(de.bn,{fill:"orange",stroke:"rgba(0, 0, 0, 0)",strokeWidth:15,background:"transparent",geometryString:"F1 M0 0 b 0 360 -4 0 4 z M10 0 b 0 360 -4 0 4 z M20 0 b 0 360 -4 0 4",isActionable:!0,cursor:"context-menu",mouseEnter:(gi,ki)=>ki.fill="dodgerblue",mouseLeave:(gi,ki)=>ki.fill="orange",click:(gi,ki)=>{gi.diagram.commandHandler.showContextMenu(ki.part.adornedPart)}},Dn||{})}Zt.current.nodeTemplate.selectionAdornmentTemplate=_t(de.uz,"Spot",_t(de.Vm,{padding:10}),cn(de.z6.Top,"TriangleUp"),cn(de.z6.Left,"TriangleLeft"),cn(de.z6.Right,"TriangleRight"),cn(de.z6.Bottom,"TriangleDown"),Bn({alignment:new de.z6(.75,0)}));function Oe(Dn,gi){return(ki,Pi)=>{ki.handled=!0,ki.diagram.model.commit(Di=>{Di.set(Pi.part.adornedPart.data,Dn,gi)})}}function Xe(Dn,gi){return gi||(gi="color"),_t(de.bn,{width:16,height:16,stroke:"lightgray",fill:Dn,margin:1,background:"transparent",mouseEnter:(ki,Pi)=>Pi.stroke="dodgerblue",mouseLeave:(ki,Pi)=>Pi.stroke="lightgray",click:Oe(gi,Dn),contextClick:Oe(gi,Dn)})}function Gn(){return[_t("ContextMenuButton",_t(de.s_,"Horizontal",Xe(nn.white,"fill"),Xe(nn.beige,"fill"),Xe(nn.extralightblue,"fill"),Xe(nn.extralightred,"fill"))),_t("ContextMenuButton",_t(de.s_,"Horizontal",Xe(nn.lightgray,"fill"),Xe(nn.lightgreen,"fill"),Xe(nn.lightblue,"fill"),Xe(nn.lightred,"fill")))]}function Yn(){return[_t("ContextMenuButton",_t(de.s_,"Horizontal",Xe(nn.black),Xe(nn.green),Xe(nn.blue),Xe(nn.red))),_t("ContextMenuButton",_t(de.s_,"Horizontal",Xe(nn.white),Xe(nn.magenta),Xe(nn.purple),Xe(nn.orange)))]}function Xn(Dn,gi){return gi||(gi="thickness"),_t(de.bn,"LineH",{width:16,height:16,strokeWidth:Dn,margin:1,background:"transparent",mouseEnter:(ki,Pi)=>Pi.background="dodgerblue",mouseLeave:(ki,Pi)=>Pi.background="transparent",click:Oe(gi,Dn),contextClick:Oe(gi,Dn)})}function Rn(Dn,gi){return gi||(gi="dash"),_t(de.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Dn,margin:1,background:"transparent",mouseEnter:(ki,Pi)=>Pi.background="dodgerblue",mouseLeave:(ki,Pi)=>Pi.background="transparent",click:Oe(gi,Dn),contextClick:Oe(gi,Dn)})}function ii(){return[_t("ContextMenuButton",_t(de.s_,"Horizontal",Xn(1),Xn(2),Xn(3),Xn(4))),_t("ContextMenuButton",_t(de.s_,"Horizontal",Rn(null),Rn([2,4]),Rn([4,4])))]}function Jn(Dn,gi){return gi||(gi="figure"),_t(de.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Dn,margin:1,background:"transparent",mouseEnter:(ki,Pi)=>Pi.fill="dodgerblue",mouseLeave:(ki,Pi)=>Pi.fill="lightgray",click:Oe(gi,Dn),contextClick:Oe(gi,Dn)})}Zt.current.nodeTemplate.contextMenu=_t("ContextMenu",_t("ContextMenuButton",_t(de.s_,"Horizontal",Jn("Rectangle"),Jn("RoundedRectangle"),Jn("Ellipse"),Jn("Diamond"))),_t("ContextMenuButton",_t(de.s_,"Horizontal",Jn("Parallelogram2"),Jn("ManualOperation"),Jn("Procedure"),Jn("Cylinder1"))),_t("ContextMenuButton",_t(de.s_,"Horizontal",Jn("Terminator"),Jn("CreateRequest"),Jn("Document"),Jn("TriangleDown"))),Gn(),Yn(),ii()),Zt.current.groupTemplate=_t(de.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:de.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Dn,gi)=>{var ki=gi.addMembers(gi.diagram.selection,!0);ki||gi.diagram.currentTool.doCancel()},avoidable:!1},new de.KX("location","loc",de.E9.parse).makeTwoWay(de.E9.stringify),_t(de.s_,"Auto",{name:"BODY"},_t(de.bn,{parameter1:10,fill:nn.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:de.z6.AllSides,toSpot:de.z6.AllSides},new de.KX("fill"),new de.KX("stroke","color"),new de.KX("strokeWidth","thickness"),new de.KX("strokeDashArray","dash")),_t(de.Vm,{background:"transparent",margin:20})),_t(de.al,{alignment:de.z6.Top,alignmentFocus:de.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new de.KX("text"),new de.KX("stroke","color"))),Zt.current.groupTemplate.selectionAdornmentTemplate=_t(de.uz,"Spot",_t(de.s_,"Auto",_t(de.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),_t(de.Vm,{margin:1.5})),Bn({alignment:de.z6.TopRight,alignmentFocus:de.z6.BottomRight})),Zt.current.groupTemplate.contextMenu=_t("ContextMenu",Gn(),Yn(),ii()),Zt.current.linkTemplate=_t(de.rU,{layerName:"Foreground",routing:de.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new de.KX("fromSpot","fromSpot",de.z6.parse),new de.KX("toSpot","toSpot",de.z6.parse),new de.KX("fromShortLength","dir",Dn=>Dn>=1?10:0),new de.KX("toShortLength","dir",Dn=>Dn>=1?10:0),new de.KX("points").makeTwoWay(),_t(de.bn,{strokeWidth:2},new de.KX("stroke","color"),new de.KX("strokeWidth","thickness"),new de.KX("strokeDashArray","dash")),_t(de.bn,{segmentIndex:0,segmentOffset:new de.E9(15,0),segmentOrientation:de.rU.OrientAlong,alignmentFocus:de.z6.Right,figure:"circle",width:10,strokeWidth:0},new de.KX("fill","color"),new de.KX("visible","dir",Dn=>Dn===1)),_t(de.bn,{segmentIndex:-1,segmentOffset:new de.E9(-10,6),segmentOrientation:de.rU.OrientPlus90,alignmentFocus:de.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new de.KX("fill","color"),new de.KX("visible","dir",Dn=>Dn>=1),new de.KX("width","thickness",Dn=>7+3*Dn),new de.KX("height","thickness",Dn=>7+3*Dn),new de.KX("segmentOffset","thickness",Dn=>new de.E9(-15,4+1.5*Dn))),_t(de.bn,{segmentIndex:0,segmentOffset:new de.E9(15,-6),segmentOrientation:de.rU.OrientMinus90,alignmentFocus:de.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new de.KX("fill","color"),new de.KX("visible","dir",Dn=>Dn===2),new de.KX("width","thickness",Dn=>7+3*Dn),new de.KX("height","thickness",Dn=>7+3*Dn),new de.KX("segmentOffset","thickness",Dn=>new de.E9(-15,4+1.5*Dn))),_t(de.al,{alignmentFocus:new de.z6(0,1,-4,0),editable:!0},new de.KX("text").makeTwoWay(),new de.KX("stroke","color"))),Zt.current.linkTemplate.selectionAdornmentTemplate=_t(de.uz,_t(de.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Qn(2)},new de.KX("pathPattern","thickness",Qn)),Bn({alignmentFocus:new de.z6(0,0,-6,-4)}));function Qn(Dn){return _t(de.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Dn+4).toString()+" H3"})}function yi(Dn){var gi="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Dn===0?gi="M0 0 M16 16 M0 8 L16 8":Dn===2&&(gi="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),_t(de.bn,{geometryString:gi,margin:2,background:"transparent",mouseEnter:(ki,Pi)=>Pi.background="dodgerblue",mouseLeave:(ki,Pi)=>Pi.background="transparent",click:Oe("dir",Dn),contextClick:Oe("dir",Dn)})}function Vi(Dn){var gi=(ki,Pi)=>{ki.handled=!0,ki.diagram.model.commit(Di=>{var _i=Pi.part.adornedPart;Di.set(_i.data,Dn?"toSpot":"fromSpot",de.z6.stringify(de.z6.AllSides)),(Dn?_i.toNode:_i.fromNode).invalidateConnectedLinks()})};return _t(de.bn,{width:12,height:12,fill:"transparent",mouseEnter:(ki,Pi)=>Pi.background="dodgerblue",mouseLeave:(ki,Pi)=>Pi.background="transparent",click:gi,contextClick:gi})}function un(Dn,gi){var ki=0,Pi=de.z6.RightSide;Dn.equals(de.z6.Top)?(ki=270,Pi=de.z6.TopSide):Dn.equals(de.z6.Left)?(ki=180,Pi=de.z6.LeftSide):Dn.equals(de.z6.Bottom)&&(ki=90,Pi=de.z6.BottomSide),gi||(ki-=180);var Di=(_i,zi)=>{_i.handled=!0,_i.diagram.model.commit($i=>{var qi=zi.part.adornedPart;$i.set(qi.data,gi?"toSpot":"fromSpot",de.z6.stringify(Pi)),(gi?qi.toNode:qi.fromNode).invalidateConnectedLinks()})};return _t(de.bn,{alignment:Dn,alignmentFocus:Dn.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:ki,background:"transparent",mouseEnter:(_i,zi)=>zi.background="dodgerblue",mouseLeave:(_i,zi)=>zi.background="transparent",click:Di,contextClick:Di})}Zt.current.linkTemplate.contextMenu=_t("ContextMenu",Yn(),ii(),_t("ContextMenuButton",_t(de.s_,"Horizontal",yi(0),yi(1),yi(2))),_t("ContextMenuButton",_t(de.s_,"Horizontal",_t(de.s_,"Spot",Vi(!1),un(de.z6.Top,!1),un(de.z6.Left,!1),un(de.z6.Right,!1),un(de.z6.Bottom,!1)),_t(de.s_,"Spot",{margin:new de.Zt(0,0,0,2)},Vi(!0),un(de.z6.Top,!0),un(de.z6.Left,!0),un(de.z6.Right,!0),un(de.z6.Bottom,!0)))));const lo=`{ "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"}, @@ -1048,21 +1048,21 @@ {"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 Wi=["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 Ri(Rn){return console.log("shapeName:",Rn),Wi.indexOf(Rn)>=0}var nn=new de.YI(vn.current,{maxSelectionCount:1,linkTemplate:At(de.rU,{locationSpot:de.z6.Center,selectionAdornmentTemplate:At(de.uz,"Link",{locationSpot:de.z6.Center},At(de.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),At(de.bn,{toArrow:"Standard",stroke:null}))},{routing:de.rU.AvoidsNodes,curve:de.rU.JumpOver,corner:5,toShortLength:4},new de.KX("points"),At(de.bn,{isPanelMain:!0,strokeWidth:2}),At(de.bn,{toArrow:"Standard",stroke:null})),model:new de.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...de.bn.getFigureGenerators().toArray().map(Rn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Rn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Zt.current.addDiagramListener("TextEdited",function(Rn){var ui;const Si=Rn.subject.part;var fi=(ui=document.activeElement)==null?void 0:ui.value;typeof fi=="string"&&fi.trim()===""&&Zt.current.model.commit(function(Mi){Mi.set(Si.data,"text","\u672A\u547D\u540D"),Zt.current.commandHandler.stopCommand()},"increment")}),nn.nodeTemplate=At(de.NB,"Auto",{locationSpot:de.z6.Center},new de.KX("location","location",de.E9.parse).makeTwoWay(de.E9.stringify),At(de.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 de.KX("stroke").makeTwoWay(),new de.KX("fill").makeTwoWay(),new de.KX("figure")),At(de.al,{margin:new de.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new de.$u(16,16),maxSize:new de.$u(10,NaN),textAlign:"center",editable:!0},new de.KX("key").makeTwoWay())),setTimeout(()=>{Zt.current.grid=At(de.s_,"Grid",At(de.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),At(de.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Zt.current.grid.visible=!0,Zt.current.grid.gridCellStroke="darkgray",Zt.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Zt.current,Zt.current}const fe=()=>ge(this,null,function*(){var At,Ae=Zt.current.makeImage();const on=yield(0,Oe.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:Ae.src,file_data:JSON.stringify({login:(At=(0,ne.eY)())==null?void 0:At.login,data:JSON.parse(Zt.current.model.toJson())})}});je({src:on.url})});return(0,Ot.useEffect)(()=>(setTimeout(()=>{Ge()},500),pn(Je+1),()=>{Zt.current=null}),[]),Dt.createElement("div",{ref:ae,className:Se.current?`${we.maxH60} body-overflow-initial`:"body-overflow-initial"},Dt.createElement(Fe.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!Je,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:Dt.createElement(cn.Z,null,Dt.createElement(wn.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Dt.createElement(wn.Z,{onClick:()=>{var At,Ae,on=Zt.current.selection.first();if(Se.current=!Se.current,document.activeElement&&on){let bn=(Ae=(At=document.activeElement)==null?void 0:At.value)==null?void 0:Ae.trim();typeof bn=="string"&&Zt.current.model.commit(function(be){be.set(on.data,"text",bn||"\u672A\u547D\u540D"),Zt.current.commandHandler.stopCommand()},"increment")}pn(Je+1)}},Dt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:Re},Dt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:we.flowChartWrp},Dt.createElement("div",{style:{display:"flex",height:"100%"}},Dt.createElement("div",{style:{width:"300px",height:"100%"}},Dt.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),Dt.createElement("div",{style:{height:"calc(100% - 50px)"},className:we.myPaletteDiv,ref:vn})),Dt.createElement("div",{style:{flex:1,position:"relative"}},Dt.createElement("div",{ref:Ve,style:{height:"80vh"}}))),Dt.createElement("div",{className:"tr"},Dt.createElement(_t.ZP,{size:"large",onClick:fe,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var te=xe,Ut=xt(5112),Lt=xt(5871);const St=Ut.ZP.Group,mt={margin:"0 8px"};var kt=({callback:Re,onCancel:je})=>{function Zt(Ve){Re(Ve)}return Ot.createElement(ee.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Zt},Ot.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},Ot.createElement("span",{style:mt},"\u5355\u5143\u683C\u6570\uFF1A"),Ot.createElement("span",{style:mt},"\u884C\u6570"),Ot.createElement(ee.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},Ot.createElement(Lt.Z,null)),Ot.createElement("span",{style:mt},"\u5217\u6570"),Ot.createElement(ee.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},Ot.createElement(Lt.Z,null))),Ot.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},Ot.createElement("span",{style:mt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),Ot.createElement(ee.default.Item,{name:"align"},Ot.createElement(St,null,Ot.createElement(Ut.ZP,{value:"default"},Ot.createElement("i",{className:"fa fa-align-justify"})),Ot.createElement(Ut.ZP,{value:"left"},Ot.createElement("i",{className:"fa fa-align-left"})),Ot.createElement(Ut.ZP,{value:"center"},Ot.createElement("i",{className:"fa fa-align-center"})),Ot.createElement(Ut.ZP,{value:"right"},Ot.createElement("i",{className:"fa fa-align-right"}))))),Ot.createElement("div",{className:"flex-container flex-end"},Ot.createElement(_t.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Ot.createElement(_t.ZP,{type:"ghost",onClick:je},"\u53D6\u6D88")))},jt=xt(78673),Et=xt(80727),le=xt.n(Et),ln=(0,Ot.forwardRef)(({use3d:Re,width:je,height:Zt,callback:Ve,showSaveButton:vn},Se)=>{const ae=(0,Ot.useRef)(),Je=(0,Ot.useRef)(),[pn,Ge]=(0,Ot.useState)(!1),fe=(0,Ot.useRef)({id:ae,appName:"graphing",width:je||1e3,height:Zt||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,Ot.useEffect)(()=>{Je.current=new(le())(fe.current,!0),window.onload=function(){Je.current.inject("applet_container")}},[]);const At=()=>{var Ae=window.ggbApplet.getPNGBase64(1,!0,72);return Ve&&Ve(Ae),Ae};return(0,Ot.useEffect)(()=>{fe.current.appName=pn?"3D":"graphing",Je.current.inject("applet_container")},[pn]),(0,Ot.useEffect)(()=>{Ge(Re)},[Re]),(0,Ot.useImperativeHandle)(Se,()=>({getImgData:At})),Ot.createElement(Ot.Fragment,null,Ot.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:ae}),Ot.createElement(cn.Z,{align:"middle"},Ot.createElement(wn.Z,{flex:1},Ot.createElement(jt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:pn,onChange:Ae=>Ge(Ae)})),Ot.createElement(wn.Z,null,Ot.createElement(_t.ZP,{size:"large",onClick:At,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),en=xt(41588),Fn=xt(8591);const ni="link",_n="upload-image",li="add-flowchart",si="draw-image",Vi="add-flowchart",Ni="code-block",po="add-table",Oo="------------",Do={default:Oo,left:`:${Oo}`,center:`:${Oo}:`,right:`${Oo}:`};var Lo=xt(58856);function Vo(){}let Fo=0;const no=1e4,Xo="\u2581",In="@\u2581\u2581@",Ct="@\u2581@",Li=` +]}`;var to=["Rectangle","Square","RoundedRectangle","Border","Ellipse","Circle","TriangleRight","TriangleDown","TriangleLeft","TriangleUp","Triangle","Diamond","LineH","LineV","None","BarH","BarV","MinusLine","PlusLine","XLine","LineRight","LineDown","LineLeft","LineUp"];function Wi(Dn){return console.log("shapeName:",Dn),to.indexOf(Dn)>=0}var en=new de.YI(fn.current,{maxSelectionCount:1,linkTemplate:_t(de.rU,{locationSpot:de.z6.Center,selectionAdornmentTemplate:_t(de.uz,"Link",{locationSpot:de.z6.Center},_t(de.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),_t(de.bn,{toArrow:"Standard",stroke:null}))},{routing:de.rU.AvoidsNodes,curve:de.rU.JumpOver,corner:5,toShortLength:4},new de.KX("points"),_t(de.bn,{isPanelMain:!0,strokeWidth:2}),_t(de.bn,{toArrow:"Standard",stroke:null})),model:new de.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...de.bn.getFigureGenerators().toArray().map(Dn=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Dn.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Zt.current.addDiagramListener("TextEdited",function(Dn){var gi;const ki=Dn.subject.part;var Pi=(gi=document.activeElement)==null?void 0:gi.value;typeof Pi=="string"&&Pi.trim()===""&&Zt.current.model.commit(function(Di){Di.set(ki.data,"text","\u672A\u547D\u540D"),Zt.current.commandHandler.stopCommand()},"increment")}),en.nodeTemplate=_t(de.NB,"Auto",{locationSpot:de.z6.Center},new de.KX("location","location",de.E9.parse).makeTwoWay(de.E9.stringify),_t(de.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 de.KX("stroke").makeTwoWay(),new de.KX("fill").makeTwoWay(),new de.KX("figure")),_t(de.al,{margin:new de.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new de.$u(16,16),maxSize:new de.$u(10,NaN),textAlign:"center",editable:!0},new de.KX("key").makeTwoWay())),setTimeout(()=>{Zt.current.grid=_t(de.s_,"Grid",_t(de.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),_t(de.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Zt.current.grid.visible=!0,Zt.current.grid.gridCellStroke="darkgray",Zt.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Zt.current,Zt.current}const Re=()=>fe(this,null,function*(){var _t,nn=Zt.current.makeImage();const cn=yield(0,Ne.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:nn.src,file_data:JSON.stringify({login:(_t=(0,ie.eY)())==null?void 0:_t.login,data:JSON.parse(Zt.current.model.toJson())})}});Ae({src:cn.url})});return(0,Ot.useEffect)(()=>(setTimeout(()=>{In()},500),gn(Ye+1),()=>{Zt.current=null}),[]),Dt.createElement("div",{ref:ae,className:ye.current?`${Pe.maxH60} body-overflow-initial`:"body-overflow-initial"},Dt.createElement(Te.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!Ye,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:Dt.createElement(dn.Z,null,Dt.createElement(Pn.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Dt.createElement(Pn.Z,{onClick:()=>{var _t,nn,cn=Zt.current.selection.first();if(ye.current=!ye.current,document.activeElement&&cn){let Bn=(nn=(_t=document.activeElement)==null?void 0:_t.value)==null?void 0:nn.trim();typeof Bn=="string"&&Zt.current.model.commit(function(Oe){Oe.set(cn.data,"text",Bn||"\u672A\u547D\u540D"),Zt.current.commandHandler.stopCommand()},"increment")}gn(Ye+1)}},Dt.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:Fe},Dt.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:Pe.flowChartWrp},Dt.createElement("div",{style:{display:"flex",height:"100%"}},Dt.createElement("div",{style:{width:"300px",height:"100%"}},Dt.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),Dt.createElement("div",{style:{height:"calc(100% - 50px)"},className:Pe.myPaletteDiv,ref:fn})),Dt.createElement("div",{style:{flex:1,position:"relative"}},Dt.createElement("div",{ref:$e,style:{height:"80vh"}}))),Dt.createElement("div",{className:"tr"},Dt.createElement(Vt.ZP,{size:"large",onClick:Re,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var ee=Se,Kt=xt(5112),kt=xt(5871);const St=Kt.ZP.Group,mt={margin:"0 8px"};var Lt=({callback:Fe,onCancel:Ae})=>{function Zt($e){Fe($e)}return Ot.createElement(ne.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Zt},Ot.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},Ot.createElement("span",{style:mt},"\u5355\u5143\u683C\u6570\uFF1A"),Ot.createElement("span",{style:mt},"\u884C\u6570"),Ot.createElement(ne.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},Ot.createElement(kt.Z,null)),Ot.createElement("span",{style:mt},"\u5217\u6570"),Ot.createElement(ne.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},Ot.createElement(kt.Z,null))),Ot.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},Ot.createElement("span",{style:mt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),Ot.createElement(ne.default.Item,{name:"align"},Ot.createElement(St,null,Ot.createElement(Kt.ZP,{value:"default"},Ot.createElement("i",{className:"fa fa-align-justify"})),Ot.createElement(Kt.ZP,{value:"left"},Ot.createElement("i",{className:"fa fa-align-left"})),Ot.createElement(Kt.ZP,{value:"center"},Ot.createElement("i",{className:"fa fa-align-center"})),Ot.createElement(Kt.ZP,{value:"right"},Ot.createElement("i",{className:"fa fa-align-right"}))))),Ot.createElement("div",{className:"flex-container flex-end"},Ot.createElement(Vt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Ot.createElement(Vt.ZP,{type:"ghost",onClick:Ae},"\u53D6\u6D88")))},zt=xt(78673),Et=xt(80727),Yt=xt.n(Et),ln=(0,Ot.forwardRef)(({use3d:Fe,width:Ae,height:Zt,callback:$e,showSaveButton:fn},ye)=>{const ae=(0,Ot.useRef)(),Ye=(0,Ot.useRef)(),[gn,In]=(0,Ot.useState)(!1),Re=(0,Ot.useRef)({id:ae,appName:"graphing",width:Ae||1e3,height:Zt||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,Ot.useEffect)(()=>{Ye.current=new(Yt())(Re.current,!0),window.onload=function(){Ye.current.inject("applet_container")}},[]);const _t=()=>{var nn=window.ggbApplet.getPNGBase64(1,!0,72);return $e&&$e(nn),nn};return(0,Ot.useEffect)(()=>{Re.current.appName=gn?"3D":"graphing",Ye.current.inject("applet_container")},[gn]),(0,Ot.useEffect)(()=>{In(Fe)},[Fe]),(0,Ot.useImperativeHandle)(ye,()=>({getImgData:_t})),Ot.createElement(Ot.Fragment,null,Ot.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:ae}),Ot.createElement(dn.Z,{align:"middle"},Ot.createElement(Pn.Z,{flex:1},Ot.createElement(zt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:gn,onChange:nn=>In(nn)})),Ot.createElement(Pn.Z,null,Ot.createElement(Vt.ZP,{size:"large",onClick:_t,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),qe=xt(41588),Nn=xt(8591);const ai="link",Kn="upload-image",ci="add-flowchart",Ci="draw-image",Zi="add-flowchart",Oi="code-block",po="add-table",Bo="------------",Ao={default:Bo,left:`:${Bo}`,center:`:${Bo}:`,right:`${Bo}:`};var ri=xt(58856);function fi(){}let hi=0;const mi=1e4,mo="\u2581",Sn="@\u2581\u2581@",Ct="@\u2581@",ti=` **\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`,wi=["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 tn(Re){return/^\d+$/.test(Re)?`${Re}px`:Re}const Qn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",ai={[Qn+"-B"]:"bold",[Qn+"-I"]:"italic"},ii={[ni]:"\u6DFB\u52A0\u94FE\u63A5",[Ni]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[_n]:"\u6DFB\u52A0\u56FE\u7247",[si]:"\u6DFB\u52A0\u753B\u56FE",[li]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[po]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var gi=({defaultValue:Re="",onChange:je,width:Zt="100%",height:Ve=400,miniToolbar:vn=!1,isFocus:Se=!1,watch:ae,insertTemp:Je,mode:pn="markdown",id:Ge="markdown-editor-id",showResizeBar:fe=!1,noStorage:At=!1,showNullButton:Ae=!1,showNullProgramButton:on=!1,hidetoolBar:bn=!1,fullScreen:be=!1,onBlur:De,onCMBeforeChange:On,onFullScreen:Zn,className:Vn="",disablePaste:$n=!1,disabled:Xn=!1,disabledFill:Un=!1,placeholder:di="",values:ki="",extraUse:Ti})=>{const[hn,Hi]=(0,Ot.useState)(null),[Wi,Ri]=(0,Ot.useState)(Re),[nn,Rn]=(0,Ot.useState)(ae),[ui,Si]=(0,Ot.useState)(be),[fi,Mi]=(0,Ot.useState)(""),[$i,Bi]=(0,Ot.useState)(0),[zi,qi]=(0,Ot.useState)(Ve),[yn,Eo]=(0,Ot.useState)(!1),[gn,Qi]=(0,Ot.useState)(0),[To,Yi]=(0,Ot.useState)(0),Zi=(0,Ot.useRef)(),Di=(0,Ot.useRef)(),Oi=(0,Ot.useRef)(),Ai=(0,Ot.useRef)();(0,Ot.useEffect)(()=>{const io=window.scrollY||window.pageYOffset;Ri(ki),hn==null||hn.setValue(ki),window.scrollTo(0,io)},[ki]),(0,Ot.useEffect)(()=>{Zn==null||Zn(ui)},[ui]),(0,Ot.useEffect)(()=>{if(Zi.current){let io=function(Gn,Fi){var $o;if($n){Fi.preventDefault();return}const Pr=Fi.clipboardData;if(Pr){const or=Pr.types.toString(),Jo=Pr.items;if(or==="Files"||Pr.types.indexOf("Files")>-1){if(Fi.preventDefault(),pn=="stex")return;try{let Sr=Jo[1];(($o=Jo[0])==null?void 0:$o.kind)==="file"&&(Sr=Jo[0]);const wr=Sr.getAsFile(),oa=wr.name.split(".").pop();(0,He.I)(wr,ca=>{var Ca,sn,ea;ca.id?((Ca=wr==null?void 0:wr.type)==null?void 0:Ca.indexOf("image"))>-1?_i.replaceSelection(``):((sn=wr==null?void 0:wr.type)==null?void 0:sn.indexOf("video"))>-1?_i.replaceSelection(``):((ea=wr==null?void 0:wr.type)==null?void 0:ea.indexOf("pdf"))>-1?_i.replaceSelection(`${wr.name}`):wi.includes(oa)?_i.replaceSelection(`${wr.name}`):_i.replaceSelection(`[${wr.name}](/api/attachments/${ca.id}?type=${ca.content_type})`):(ca==null?void 0:ca.status)===401&&(document.location.href="/user/login")})}catch(Sr){Fn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const _i=qt().fromTextArea(Zi.current,{mode:pn,lineNumbers:!vn,lineWrapping:!0,value:Re,autoCloseTags:!0,autoCloseBrackets:!0});return _i.on("keyup",function(Gn,Fi){Fi.keyCode===8&&(Gn.getValue()==""?_i.setOption("placeholder",di):_i.setOption("placeholder",null))}),_i.on("keydown",function(Gn,Fi){if(Fi.keyCode===8){var $o=So(Gn);$o&&Fi.preventDefault()}}),Se&&_i.focus(),_i.on("paste",io),Xn&&_i.on("beforeChange",function(Gn,Fi){(Fi.origin==="paste"||Fi.origin==="+input")&&Fi.cancel()}),Hi(_i),()=>{_i.off("paste",io)}}},[]);const Gi=(0,Ot.useCallback)(()=>{if(Di.current)try{}catch(io){console.log(io,"---- to set md editor body height")}},[zi,Di,ui]);(0,Ot.useEffect)(()=>{function io(){let _i=new Le.Z(Gn=>{for(let Fi of Gn)(Fi.target.offsetHeight>0||Fi.target.offsetWidth>0)&&(Gi(),hn.setSize("100%","100%"),hn.refresh())});return _i.observe(Zi.current.parentElement),_i}if(hn){const _i=io();return()=>{var Gn,Fi;(Gn=Zi.current)!=null&&Gn.parentElement&&_i.unobserve((Fi=Zi.current)==null?void 0:Fi.parentElement)}}},[hn,Gi]),(0,Ot.useEffect)(()=>{if(hn){let io=[];for(const[_i,Gn]of Object.entries(ai)){let Fi={[_i]:()=>{oi(Gn)}};io.push(Fi),hn.addKeyMap(Fi)}return()=>{for(let _i of io)hn.removeKeyMap(_i)}}},[hn]),(0,Ot.useEffect)(()=>{be!==ui&&Si(be)},[be]),(0,Lo.Z)(()=>{if(!At&&$i>0){let io=new Date().getTime(),_i=window.sessionStorage.getItem(Ge);io>=$i+no&&(!_i||_i!==Wi)&&(window.sessionStorage.setItem(Ge,Wi),Eo(!0))}},no),(0,Ot.useEffect)(()=>{Rn(ae)},[hn,ae]),(0,Ot.useEffect)(()=>{hn&&Se&&hn.focus()},[hn,Se]),(0,Ot.useEffect)(()=>{if(nn&&hn){let io=function(Gn){let Fi=Gn.target;if(Ai.current){let $o=Fi.scrollTop/Fi.scrollHeight;Ai.current.scrollTop=Ai.current.scrollHeight*$o}};const _i=hn.getScrollerElement();return _i.addEventListener("scroll",io),()=>{_i.removeEventListener("scroll",io)}}},[hn,nn]),(0,Ot.useEffect)(()=>{if(hn&&On){let io=function(_i,Gn){On(_i,Gn)};return hn.on("beforeChange",io),()=>{hn.off("beforeChange",io)}}},[hn,On]),(0,Ot.useEffect)(()=>{if(hn&&De){let io=function(){De(hn.getValue())};return hn.on("blur",io),()=>{hn.off("blur",io)}}},[hn,De]);function So(io,_i){var Gn=io.getDoc(),Fi=Gn.getCursor(),$o=Gn.getLine(Fi.line),Pr=$o.charAt(Fi.ch-1),or=$o.lastIndexOf("@\u2581@",Fi.ch),Jo=$o.lastIndexOf("@\u2581\u2581@",Fi.ch),Sr=or>Jo?or:Jo,wr=or>Jo?3:4;if(In.indexOf(Pr)===-1)return null;if(console.log("change1:",_i,io,$o,Fi,Sr,or,Jo,Pr),Sr>=0&&Fi.ch-Sr<5){var oa=Sr+wr;return Gn.replaceRange("",{line:Fi.line,ch:Sr},{line:Fi.line,ch:oa}),{line:Fi.line,ch:oa}}return null}(0,Ot.useEffect)(()=>{if(hn){let io=function(_i,Gn){const Fi=_i.getValue();Ri(Fi),Bi(new Date().getTime()),_i.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),je&&(on?je(Fi,mo(Fi)):je(Fi))};return hn.on("change",io),()=>{hn.off("change",io)}}},[hn,je]),(0,Ot.useEffect)(()=>{if(hn)if(Re==null)hn.setValue(""),Ri("");else{const io=window.scrollY||window.pageYOffset;Re!==hn.getValue()&&(hn.setValue(Re),Ri(Re),hn.setCursor(Xn?1:hn.lineCount(),0),window.scrollTo(0,io))}},[hn,Re]);const oi=(0,Ot.useCallback)(io=>{const _i=hn.getCursor(),Gn=hn.getSelection();let Fi=Gn.split(` -`);switch(io){case"bold":return hn.replaceSelection("**"+Gn+"**"),Gn===""&&hn.setCursor(_i.line,_i.ch+2),hn.focus();case"italic":return hn.replaceSelection("*"+Gn+"*"),Gn===""&&hn.setCursor(_i.line,_i.ch+1),hn.focus();case"code":return hn.replaceSelection("`"+Gn+"`"),Gn===""&&hn.setCursor(_i.line,_i.ch+1),hn.focus();case"inline-latex":return Mi("inline-latex"),hn.focus();case"latex":return hn.replaceSelection("```latex\n"+Gn+"\n```"),hn.setCursor(_i.line+1,Gn.length+1),hn.focus();case"line-break":return hn.replaceSelection(`
-`),hn.focus();case"list-ul":return Gn===""?hn.replaceSelection("- "+Gn):hn.replaceSelection(Fi.map($o=>$o===""?"":`- ${$o}`).join(` -`)),hn.focus();case"list-ol":return Gn===""?hn.replaceSelection("1. "+Gn):hn.replaceSelection(Fi.map(($o,Pr)=>$o===""?"":`${Pr+1}. ${$o}`).join(` -`)),hn.focus();case"add-null-ch":return Gn===""&&hn.setCursor(_i.line,_i.ch),hn.replaceSelection(Xo),hn.focus();case"add-signal":return Gn===""&&hn.setCursor(_i.line,_i.ch),hn.replaceSelection(Ct),hn.focus();case"add-multiple":return Gn===""&&hn.setCursor(_i.line,_i.ch),hn.replaceSelection(In),hn.focus();case"inster-template-1":return Gn===""&&hn.setCursor(_i.line,_i.ch),hn.replaceSelection(Li),hn.focus();case"eraser":return hn.setValue(""),hn.focus();case"trigger-watch":return Rn(!nn),hn.focus();case"trigger-full-screen":return Si(!ui),hn.focus();case ni:Mi(ni);return;case Ni:Mi(Ni);return;case _n:Mi(_n);return;case si:Mi(si);return;case"maths-latex":Mi("maths-latex");return;case li:Mi(li);return;case po:Mi(po);return;default:throw new Error}},[hn,nn,ui]),Wt=(0,Ot.useCallback)((io,_i)=>{var Gn,Fi,$o,Pr,or,Jo;switch(Mi(""),fi){case ni:const{title:Ca,link:sn}=io;return hn.replaceSelection(`[${Ca}](${sn})`),hn.focus();case Ni:const{language:ea,content:$s}=io;return hn.replaceSelection(["```"+ea,$s,"```"].join(` -`)),hn.focus();case"maths-latex":for(var Sr=atob(io),wr=new Uint8Array(Sr.length),oa=0;oa{co.id?hn.replaceSelection(`![,](/api/attachments/${co.id}?type=${co.content_type})`):(co==null?void 0:co.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":hn.replaceSelection("`$$"+io+"$$`");break;case _n:case si:case Vi:const{src:vs,alt:Bs}=io,Ur=_i,gl=($o=(Fi=(Gn=Ur==null?void 0:Ur.name)==null?void 0:Gn.split("."))==null?void 0:Fi.pop)==null?void 0:$o.call(Fi);return((Pr=Ur==null?void 0:Ur.type)==null?void 0:Pr.indexOf("image"))>-1||!(Ur!=null&&Ur.type)?Ur!=null&&Ur.align||Ur!=null&&Ur.width?hn.replaceSelection(`

${Bs||

`):hn.replaceSelection(`${Bs||`):((or=Ur==null?void 0:Ur.type)==null?void 0:or.indexOf("video"))>-1?hn.replaceSelection(``):((Jo=Ur==null?void 0:Ur.type)==null?void 0:Jo.indexOf("pdf"))>-1?hn.replaceSelection(`${Ur.name}`):wi.includes(gl)?hn.replaceSelection(`${Ur.name}`):hn.replaceSelection(`[${Ur.name}](${vs})`),hn.focus();case po:const{row:Nr,col:Go,align:hr}=io;let Yr=` -`;for(let co=0;co{switch(fi){case ni:return Ot.createElement(Bn,{callback:Wt,onCancel:lr});case Ni:return Ot.createElement(zn.Z,{callback:Wt,onCancel:lr});case _n:return Ot.createElement(He.Z,{callback:Wt,onCancel:lr});case li:return Ot.createElement(te,{callback:Wt,onCancel:lr});case po:return Ot.createElement(kt,{callback:Wt,onCancel:lr});case"maths-latex":return Ot.createElement(ln,{showSaveButton:!0,callback:Wt});case"inline-latex":return Ot.createElement(en.Z,{showSaveButton:!0,callback:Wt});default:return null}},[fi]);function lr(){Mi("")}(0,Ot.useEffect)(()=>{if(Oi.current){let io=function(or){$o=!0,Pr=or.pageY},_i=function(){$o=!1},Gn=function(or){if($o){let Jo=or.pageY-Pr;Jo<0&&(Jo=0),Jo>300&&(Jo=300);let Sr=Ve+Jo+"px";qi(Sr)}},Fi=Oi.current,$o=!1,Pr=0;return Fi.addEventListener("mousedown",io),document.addEventListener("mousemove",Gn),document.addEventListener("mouseup",_i),()=>{Fi.removeEventListener("mousedown",io),document.removeEventListener("mousemove",Gn),document.removeEventListener("mouseup",_i)}}},[hn,Oi]),(0,Ot.useEffect)(()=>{qi(Ve)},[Ve]);const br=tn(Zt),Dr=tn(zi),gr={width:br,height:Dr},eo=(0,Ot.useMemo)(()=>{if($i){let io=new Date($i),_i=io.getHours(),Gn=io.getMinutes(),Fi=io.getSeconds();return _i=_i<10?"0"+_i:_i,Gn=Gn<10?"0"+Gn:Gn,Fi=Fi<10?"0"+Fi:Fi,`${_i}:${Gn}:${Fi}`}return 0},[$i]),mo=io=>{const _i=[];if(on){let Gn=-1;io=io.replace(/(@▁▁@|@▁@)/g,function(Fi,$o,Pr){_i.push({multiLine:Fi!==Ct})})}return _i};function Ki(){window.sessionStorage.removeItem(Ge),Eo(!1),Bi(0)}function Xi(){Eo(!1),Bi(0),hn.setValue(window.sessionStorage.getItem(Ge))}(0,Ot.useEffect)(()=>{ii[fi]&&fi!==si&&fi!==li&&setTimeout(()=>{const io=document.getElementsByClassName("markdown-popup-form")[0],_i=window.innerWidth/2-io.offsetWidth/2,Gn=window.innerHeight/2-io.offsetHeight/2;Qi(_i),Yi(Gn)},0)},[fi]);const Mo=io=>{io.preventDefault();const _i=io.clientX-gn,Gn=io.clientY-To;document.body.onmousemove=Fi=>{let $o=Fi.clientX-_i,Pr=Fi.clientY-Gn;const or=document.getElementsByClassName("markdown-popup-form")[0],Jo=window.innerWidth-or.offsetWidth,Sr=window.innerHeight-or.offsetHeight;$o=Math.max(0,Math.min($o,Jo)),Pr=Math.max(0,Math.min(Pr,Sr)),Ar(Fi.clientX,Fi.clientY,_i,Gn)&&(Qi($o),Yi(Pr))},document.body.onmouseup=function(){document.body.onmousemove=null}},Ar=(io,_i,Gn,Fi)=>{const $o=document.body.clientHeight,Pr=document.body.clientWidth;return io<20&&Gn>io||io>Pr-20&&Gn_i||_i>$o-20&&Fi<_i?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return Ot.createElement(Ot.Fragment,null,Ot.createElement("div",{className:"markdown-editor-wrapper",ref:Di},Ot.createElement("div",{className:`markdown-editor-container ${Vn} ${nn?"on-preview":""} ${vn?"mini":""} ${ui?"full-screen":""}`,style:gr},Ot.createElement(Kt,{insertTemp:Je,watch:nn,fullScreen:ui,showNullButton:Ae,showNullProgramButton:on,onActionCallback:oi,hidetoolBar:bn,extraUse:Ti}),Ot.createElement("div",{className:"markdown-editor-body"},Ot.createElement("div",{className:"codemirror-container"},Ot.createElement("textarea",{ref:Zi,placeholder:di})),nn?Ot.createElement("div",{ref:Ai,className:"preview-container"},pn==="stex"&&Ot.createElement(Ee,{value:Wi}),pn!=="stex"&&Ot.createElement(ce.Z,{disabledFill:Un,showProgramFill:on,value:Wi})):null))),fe?Ot.createElement("a",{ref:Oi,className:"editor-resize"}):null,fi===si&&Ot.createElement(dn,{callback:Wt,onCancel:lr}),fi===li&&Ot.createElement(te,{callback:Wt,onCancel:lr}),Ot.createElement(oe.Z,null,ii[fi]&&fi!==si&&fi!==li?Ot.createElement(Fe.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:gn,top:To},title:Ot.createElement("div",{style:{cursor:"move"},onMouseDown:Mo},ii[fi]),open:!0,onCancel:lr,footer:null,destroyOnClose:!0,width:fi===li?"1200px":null,height:fi===li?"80vh":null,className:"markdown-popup-form"},Ro):null))}},28451:function(Mn,Sn,xt){"use strict";xt.d(Sn,{Z:function(){return It},I:function(){return Kt}});var Ot=xt(78241),Ht=xt(8591),qt=xt(92832),Le=xt(81327),Vt=xt(5871),me=xt(5112),Tt=xt(3113),Be=xt(77903),Ce=xt(59301),Jt=xt(59301),ce=Object.defineProperty,Ee=Object.defineProperties,Ie=Object.getOwnPropertyDescriptors,Nt=Object.getOwnPropertySymbols,et=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,ht=(oe,ee,ve)=>ee in oe?ce(oe,ee,{enumerable:!0,configurable:!0,writable:!0,value:ve}):oe[ee]=ve,st=(oe,ee)=>{for(var ve in ee||(ee={}))et.call(ee,ve)&&ht(oe,ve,ee[ve]);if(Nt)for(var ve of Nt(ee))nt.call(ee,ve)&&ht(oe,ve,ee[ve]);return oe},gt=(oe,ee)=>Ee(oe,Ie(ee));const{useForm:vt}=Ot.default,wt={width:280,marginRight:10},Ft={labelCol:{span:5},wrapperCol:{span:19}};var It=({callback:oe,onCancel:ee})=>{const[ve]=vt();let _t=(0,Ce.useRef)();function Ne(Ue){_t.current.width=ve.getFieldValue("width"),_t.current.align=ve.getFieldValue("align"),oe(Ue,_t.current)}function he(Ue,Ye){if(Ue.status===-1){Ht.ZP.error(Ue.message);return}ve.setFieldsValue({src:`/api/attachments/${Ue.id}`,type:Ye.type})}function Ze(Ue){let Ye=Ue.target.files[0];_t.current=Ye,Kt(Ye,he)}return Jt.createElement(Ot.default,gt(st({form:ve},Ft),{className:"upload-image-panel",onFinish:Ne,style:{width:470,overflow:"hidden"}}),Jt.createElement(Ot.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},Jt.createElement("div",{className:"flex-container"},Jt.createElement(Ot.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},Jt.createElement(qt.default,{style:wt})),Jt.createElement(Rt,{onFileChange:Ze}))),Jt.createElement(Ot.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},Jt.createElement(qt.default,{style:{width:264}})),Jt.createElement(Ot.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},Jt.createElement(Le.Z,null,Jt.createElement(Ot.default.Item,{name:"width",style:{margin:0}},Jt.createElement(Vt.Z,{style:{width:264}})),Jt.createElement("span",{className:"ml8"},"%"))),Jt.createElement(Ot.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},Jt.createElement(me.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"}]})),Jt.createElement("aside",null,Jt.createElement(Ot.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},Jt.createElement(Tt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Jt.createElement(Tt.ZP,{type:"default",onClick:ee},"\u53D6\u6D88"))))};function Rt({onFileChange:oe}){return Jt.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",Jt.createElement("input",{type:"file",onChange:oe}))}function Kt(oe,ee){if(!oe)throw new String("\u6CA1\u6709\u6587\u4EF6");let ve=new FormData;ve.append("editormd-image-file",oe),ve.append("file_param_name","editormd-image-file"),ve.append("byxhr","true");var _t=new window.XMLHttpRequest;_t.withCredentials=!0,_t.addEventListener("load",function(Ne){ee(JSON.parse(Ne.target.responseText),oe)},!1),_t.addEventListener("error",function(Ne){console.error(Ne)},!1),_t.open("POST",`${Be.KI}/api/attachments.json`),_t.send(ve)}},79346:function(Mn,Sn,xt){"use strict";xt.d(Sn,{Z:function(){return qt}});var Ot=xt(59301),Ht=xt(4676);class qt extends Ot.Component{constructor(Vt){super(Vt);const me=window.document;this.node=me.createElement("div"),me.body.appendChild(this.node)}render(){const{children:Vt}=this.props;return(0,Ht.createPortal)(Vt,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},23954:function(Mn,Sn,xt){"use strict";xt.d(Sn,{SV:function(){return ge},ZP:function(){return Dt}});var Ot=xt(59301),Ht=xt(76374);const qt={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"]},Le={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(` +\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`,Si=["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 _e(Fe){return/^\d+$/.test(Fe)?`${Fe}px`:Fe}const _n=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",si={[_n+"-B"]:"bold",[_n+"-I"]:"italic"},ei={[ai]:"\u6DFB\u52A0\u94FE\u63A5",[Oi]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Kn]:"\u6DFB\u52A0\u56FE\u7247",[Ci]:"\u6DFB\u52A0\u753B\u56FE",[ci]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[po]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var di=({defaultValue:Fe="",onChange:Ae,width:Zt="100%",height:$e=400,miniToolbar:fn=!1,isFocus:ye=!1,watch:ae,insertTemp:Ye,mode:gn="markdown",id:In="markdown-editor-id",showResizeBar:Re=!1,noStorage:_t=!1,showNullButton:nn=!1,showNullProgramButton:cn=!1,hidetoolBar:Bn=!1,fullScreen:Oe=!1,onBlur:Xe,onCMBeforeChange:Gn,onFullScreen:Yn,className:Xn="",disablePaste:Rn=!1,disabled:ii=!1,disabledFill:Jn=!1,placeholder:Qn="",values:yi="",extraUse:Vi})=>{const[un,lo]=(0,Ot.useState)(null),[to,Wi]=(0,Ot.useState)(Fe),[en,Dn]=(0,Ot.useState)(ae),[gi,ki]=(0,Ot.useState)(Oe),[Pi,Di]=(0,Ot.useState)(""),[_i,zi]=(0,Ot.useState)(0),[$i,qi]=(0,Ot.useState)($e),[mn,Lo]=(0,Ot.useState)(!1),[tn,Gi]=(0,Ot.useState)(0),[Yi,ji]=(0,Ot.useState)(0),No=(0,Ot.useRef)(),Mo=(0,Ot.useRef)(),Ii=(0,Ot.useRef)(),Ni=(0,Ot.useRef)();(0,Ot.useEffect)(()=>{const So=window.scrollY||window.pageYOffset;Wi(yi),un==null||un.setValue(yi),window.scrollTo(0,So)},[yi]),(0,Ot.useEffect)(()=>{Yn==null||Yn(gi)},[gi]),(0,Ot.useEffect)(()=>{if(No.current){let So=function(Zn,Ji){var qo;if(Rn){Ji.preventDefault();return}const Or=Ji.clipboardData;if(Or){const ur=Or.types.toString(),Yo=Or.items;if(ur==="Files"||Or.types.indexOf("Files")>-1){if(Ji.preventDefault(),gn=="stex")return;try{let xr=Yo[1];((qo=Yo[0])==null?void 0:qo.kind)==="file"&&(xr=Yo[0]);const wr=xr.getAsFile(),ta=wr.name.split(".").pop();(0,ze.I)(wr,da=>{var wa,an,Jr;da.id?((wa=wr==null?void 0:wr.type)==null?void 0:wa.indexOf("image"))>-1?Xi.replaceSelection(``):((an=wr==null?void 0:wr.type)==null?void 0:an.indexOf("video"))>-1?Xi.replaceSelection(``):((Jr=wr==null?void 0:wr.type)==null?void 0:Jr.indexOf("pdf"))>-1?Xi.replaceSelection(`${wr.name}`):Si.includes(ta)?Xi.replaceSelection(`${wr.name}`):Xi.replaceSelection(`[${wr.name}](/api/attachments/${da.id}?type=${da.content_type})`):(da==null?void 0:da.status)===401&&(document.location.href="/user/login")})}catch(xr){Nn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Xi=Qt().fromTextArea(No.current,{mode:gn,lineNumbers:!fn,lineWrapping:!0,value:Fe,autoCloseTags:!0,autoCloseBrackets:!0});return Xi.on("keyup",function(Zn,Ji){Ji.keyCode===8&&(Zn.getValue()==""?Xi.setOption("placeholder",Qn):Xi.setOption("placeholder",null))}),Xi.on("keydown",function(Zn,Ji){if(Ji.keyCode===8){var qo=uo(Zn);qo&&Ji.preventDefault()}}),ye&&Xi.focus(),Xi.on("paste",So),ii&&Xi.on("beforeChange",function(Zn,Ji){(Ji.origin==="paste"||Ji.origin==="+input")&&Ji.cancel()}),lo(Xi),()=>{Xi.off("paste",So)}}},[]);const Ri=(0,Ot.useCallback)(()=>{if(Mo.current)try{}catch(So){console.log(So,"---- to set md editor body height")}},[$i,Mo,gi]);(0,Ot.useEffect)(()=>{function So(){let Xi=new Me.Z(Zn=>{for(let Ji of Zn)(Ji.target.offsetHeight>0||Ji.target.offsetWidth>0)&&(Ri(),un.setSize("100%","100%"),un.refresh())});return Xi.observe(No.current.parentElement),Xi}if(un){const Xi=So();return()=>{var Zn,Ji;(Zn=No.current)!=null&&Zn.parentElement&&Xi.unobserve((Ji=No.current)==null?void 0:Ji.parentElement)}}},[un,Ri]),(0,Ot.useEffect)(()=>{if(un){let So=[];for(const[Xi,Zn]of Object.entries(si)){let Ji={[Xi]:()=>{li(Zn)}};So.push(Ji),un.addKeyMap(Ji)}return()=>{for(let Xi of So)un.removeKeyMap(Xi)}}},[un]),(0,Ot.useEffect)(()=>{Oe!==gi&&ki(Oe)},[Oe]),(0,ri.Z)(()=>{if(!_t&&_i>0){let So=new Date().getTime(),Xi=window.sessionStorage.getItem(In);So>=_i+mi&&(!Xi||Xi!==to)&&(window.sessionStorage.setItem(In,to),Lo(!0))}},mi),(0,Ot.useEffect)(()=>{Dn(ae)},[un,ae]),(0,Ot.useEffect)(()=>{un&&ye&&un.focus()},[un,ye]),(0,Ot.useEffect)(()=>{if(en&&un){let So=function(Zn){let Ji=Zn.target;if(Ni.current){let qo=Ji.scrollTop/Ji.scrollHeight;Ni.current.scrollTop=Ni.current.scrollHeight*qo}};const Xi=un.getScrollerElement();return Xi.addEventListener("scroll",So),()=>{Xi.removeEventListener("scroll",So)}}},[un,en]),(0,Ot.useEffect)(()=>{if(un&&Gn){let So=function(Xi,Zn){Gn(Xi,Zn)};return un.on("beforeChange",So),()=>{un.off("beforeChange",So)}}},[un,Gn]),(0,Ot.useEffect)(()=>{if(un&&Xe){let So=function(){Xe(un.getValue())};return un.on("blur",So),()=>{un.off("blur",So)}}},[un,Xe]);function uo(So,Xi){var Zn=So.getDoc(),Ji=Zn.getCursor(),qo=Zn.getLine(Ji.line),Or=qo.charAt(Ji.ch-1),ur=qo.lastIndexOf("@\u2581@",Ji.ch),Yo=qo.lastIndexOf("@\u2581\u2581@",Ji.ch),xr=ur>Yo?ur:Yo,wr=ur>Yo?3:4;if(Sn.indexOf(Or)===-1)return null;if(console.log("change1:",Xi,So,qo,Ji,xr,ur,Yo,Or),xr>=0&&Ji.ch-xr<5){var ta=xr+wr;return Zn.replaceRange("",{line:Ji.line,ch:xr},{line:Ji.line,ch:ta}),{line:Ji.line,ch:ta}}return null}(0,Ot.useEffect)(()=>{if(un){let So=function(Xi,Zn){const Ji=Xi.getValue();Wi(Ji),zi(new Date().getTime()),Xi.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ae&&(cn?Ae(Ji,co(Ji)):Ae(Ji))};return un.on("change",So),()=>{un.off("change",So)}}},[un,Ae]),(0,Ot.useEffect)(()=>{if(un)if(Fe==null)un.setValue(""),Wi("");else{const So=window.scrollY||window.pageYOffset;Fe!==un.getValue()&&(un.setValue(Fe),Wi(Fe),un.setCursor(ii?1:un.lineCount(),0),window.scrollTo(0,So))}},[un,Fe]);const li=(0,Ot.useCallback)(So=>{const Xi=un.getCursor(),Zn=un.getSelection();let Ji=Zn.split(` +`);switch(So){case"bold":return un.replaceSelection("**"+Zn+"**"),Zn===""&&un.setCursor(Xi.line,Xi.ch+2),un.focus();case"italic":return un.replaceSelection("*"+Zn+"*"),Zn===""&&un.setCursor(Xi.line,Xi.ch+1),un.focus();case"code":return un.replaceSelection("`"+Zn+"`"),Zn===""&&un.setCursor(Xi.line,Xi.ch+1),un.focus();case"inline-latex":return Di("inline-latex"),un.focus();case"latex":return un.replaceSelection("```latex\n"+Zn+"\n```"),un.setCursor(Xi.line+1,Zn.length+1),un.focus();case"line-break":return un.replaceSelection(`
+`),un.focus();case"list-ul":return Zn===""?un.replaceSelection("- "+Zn):un.replaceSelection(Ji.map(qo=>qo===""?"":`- ${qo}`).join(` +`)),un.focus();case"list-ol":return Zn===""?un.replaceSelection("1. "+Zn):un.replaceSelection(Ji.map((qo,Or)=>qo===""?"":`${Or+1}. ${qo}`).join(` +`)),un.focus();case"add-null-ch":return Zn===""&&un.setCursor(Xi.line,Xi.ch),un.replaceSelection(mo),un.focus();case"add-signal":return Zn===""&&un.setCursor(Xi.line,Xi.ch),un.replaceSelection(Ct),un.focus();case"add-multiple":return Zn===""&&un.setCursor(Xi.line,Xi.ch),un.replaceSelection(Sn),un.focus();case"inster-template-1":return Zn===""&&un.setCursor(Xi.line,Xi.ch),un.replaceSelection(ti),un.focus();case"eraser":return un.setValue(""),un.focus();case"trigger-watch":return Dn(!en),un.focus();case"trigger-full-screen":return ki(!gi),un.focus();case ai:Di(ai);return;case Oi:Di(Oi);return;case Kn:Di(Kn);return;case Ci:Di(Ci);return;case"maths-latex":Di("maths-latex");return;case ci:Di(ci);return;case po:Di(po);return;default:throw new Error}},[un,en,gi]),$t=(0,Ot.useCallback)((So,Xi)=>{var Zn,Ji,qo,Or,ur,Yo;switch(Di(""),Pi){case ai:const{title:wa,link:an}=So;return un.replaceSelection(`[${wa}](${an})`),un.focus();case Oi:const{language:Jr,content:Zs}=So;return un.replaceSelection(["```"+Jr,Zs,"```"].join(` +`)),un.focus();case"maths-latex":for(var xr=atob(So),wr=new Uint8Array(xr.length),ta=0;ta{xo.id?un.replaceSelection(`![,](/api/attachments/${xo.id}?type=${xo.content_type})`):(xo==null?void 0:xo.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":un.replaceSelection("`$$"+So+"$$`");break;case Kn:case Ci:case Zi:const{src:ps,alt:Ds}=So,$o=Xi,Ms=(qo=(Ji=(Zn=$o==null?void 0:$o.name)==null?void 0:Zn.split("."))==null?void 0:Ji.pop)==null?void 0:qo.call(Ji);return((Or=$o==null?void 0:$o.type)==null?void 0:Or.indexOf("image"))>-1||!($o!=null&&$o.type)?$o!=null&&$o.align||$o!=null&&$o.width?un.replaceSelection(`

${Ds||

`):un.replaceSelection(`${Ds||`):((ur=$o==null?void 0:$o.type)==null?void 0:ur.indexOf("video"))>-1?un.replaceSelection(``):((Yo=$o==null?void 0:$o.type)==null?void 0:Yo.indexOf("pdf"))>-1?un.replaceSelection(`${$o.name}`):Si.includes(Ms)?un.replaceSelection(`${$o.name}`):un.replaceSelection(`[${$o.name}](${ps})`),un.focus();case po:const{row:Nr,col:Go,align:fr}=So;let aa=` +`;for(let xo=0;xo{switch(Pi){case ai:return Ot.createElement(Tn,{callback:$t,onCancel:or});case Oi:return Ot.createElement(An.Z,{callback:$t,onCancel:or});case Kn:return Ot.createElement(ze.Z,{callback:$t,onCancel:or});case ci:return Ot.createElement(ee,{callback:$t,onCancel:or});case po:return Ot.createElement(Lt,{callback:$t,onCancel:or});case"maths-latex":return Ot.createElement(ln,{showSaveButton:!0,callback:$t});case"inline-latex":return Ot.createElement(qe.Z,{showSaveButton:!0,callback:$t});default:return null}},[Pi]);function or(){Di("")}(0,Ot.useEffect)(()=>{if(Ii.current){let So=function(ur){qo=!0,Or=ur.pageY},Xi=function(){qo=!1},Zn=function(ur){if(qo){let Yo=ur.pageY-Or;Yo<0&&(Yo=0),Yo>300&&(Yo=300);let xr=$e+Yo+"px";qi(xr)}},Ji=Ii.current,qo=!1,Or=0;return Ji.addEventListener("mousedown",So),document.addEventListener("mousemove",Zn),document.addEventListener("mouseup",Xi),()=>{Ji.removeEventListener("mousedown",So),document.removeEventListener("mousemove",Zn),document.removeEventListener("mouseup",Xi)}}},[un,Ii]),(0,Ot.useEffect)(()=>{qi($e)},[$e]);const Cr=_e(Zt),Fr=_e($i),cr={width:Cr,height:Fr},oo=(0,Ot.useMemo)(()=>{if(_i){let So=new Date(_i),Xi=So.getHours(),Zn=So.getMinutes(),Ji=So.getSeconds();return Xi=Xi<10?"0"+Xi:Xi,Zn=Zn<10?"0"+Zn:Zn,Ji=Ji<10?"0"+Ji:Ji,`${Xi}:${Zn}:${Ji}`}return 0},[_i]),co=So=>{const Xi=[];if(cn){let Zn=-1;So=So.replace(/(@▁▁@|@▁@)/g,function(Ji,qo,Or){Xi.push({multiLine:Ji!==Ct})})}return Xi};function _o(){window.sessionStorage.removeItem(In),Lo(!1),zi(0)}function Co(){Lo(!1),zi(0),un.setValue(window.sessionStorage.getItem(In))}(0,Ot.useEffect)(()=>{ei[Pi]&&Pi!==Ci&&Pi!==ci&&setTimeout(()=>{const So=document.getElementsByClassName("markdown-popup-form")[0],Xi=window.innerWidth/2-So.offsetWidth/2,Zn=window.innerHeight/2-So.offsetHeight/2;Gi(Xi),ji(Zn)},0)},[Pi]);const lr=So=>{So.preventDefault();const Xi=So.clientX-tn,Zn=So.clientY-Yi;document.body.onmousemove=Ji=>{let qo=Ji.clientX-Xi,Or=Ji.clientY-Zn;const ur=document.getElementsByClassName("markdown-popup-form")[0],Yo=window.innerWidth-ur.offsetWidth,xr=window.innerHeight-ur.offsetHeight;qo=Math.max(0,Math.min(qo,Yo)),Or=Math.max(0,Math.min(Or,xr)),ha(Ji.clientX,Ji.clientY,Xi,Zn)&&(Gi(qo),ji(Or))},document.body.onmouseup=function(){document.body.onmousemove=null}},ha=(So,Xi,Zn,Ji)=>{const qo=document.body.clientHeight,Or=document.body.clientWidth;return So<20&&Zn>So||So>Or-20&&ZnXi||Xi>qo-20&&Jine in re?ce(re,ne,{enumerable:!0,configurable:!0,writable:!0,value:me}):re[ne]=me,st=(re,ne)=>{for(var me in ne||(ne={}))et.call(ne,me)&&ht(re,me,ne[me]);if(Tt)for(var me of Tt(ne))nt.call(ne,me)&&ht(re,me,ne[me]);return re},gt=(re,ne)=>Ce(re,Be(ne));const{useForm:vt}=Ot.default,wt={width:280,marginRight:10},Ft={labelCol:{span:5},wrapperCol:{span:19}};var It=({callback:re,onCancel:ne})=>{const[me]=vt();let Vt=(0,we.useRef)();function Le(Ke){Vt.current.width=me.getFieldValue("width"),Vt.current.align=me.getFieldValue("align"),re(Ke,Vt.current)}function he(Ke,Ve){if(Ke.status===-1){jt.ZP.error(Ke.message);return}me.setFieldsValue({src:`/api/attachments/${Ke.id}`,type:Ve.type})}function He(Ke){let Ve=Ke.target.files[0];Vt.current=Ve,Wt(Ve,he)}return qt.createElement(Ot.default,gt(st({form:me},Ft),{className:"upload-image-panel",onFinish:Le,style:{width:470,overflow:"hidden"}}),qt.createElement(Ot.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},qt.createElement("div",{className:"flex-container"},qt.createElement(Ot.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},qt.createElement(Qt.default,{style:wt})),qt.createElement(At,{onFileChange:He}))),qt.createElement(Ot.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},qt.createElement(Qt.default,{style:{width:264}})),qt.createElement(Ot.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},qt.createElement(Me.Z,null,qt.createElement(Ot.default.Item,{name:"width",style:{margin:0}},qt.createElement(Ut.Z,{style:{width:264}})),qt.createElement("span",{className:"ml8"},"%"))),qt.createElement(Ot.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},qt.createElement(pe.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"}]})),qt.createElement("aside",null,qt.createElement(Ot.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},qt.createElement(Nt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),qt.createElement(Nt.ZP,{type:"default",onClick:ne},"\u53D6\u6D88"))))};function At({onFileChange:re}){return qt.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",qt.createElement("input",{type:"file",onChange:re}))}function Wt(re,ne){if(!re)throw new String("\u6CA1\u6709\u6587\u4EF6");let me=new FormData;me.append("editormd-image-file",re),me.append("file_param_name","editormd-image-file"),me.append("byxhr","true");var Vt=new window.XMLHttpRequest;Vt.withCredentials=!0,Vt.addEventListener("load",function(Le){ne(JSON.parse(Le.target.responseText),re)},!1),Vt.addEventListener("error",function(Le){console.error(Le)},!1),Vt.open("POST",`${Ie.KI}/api/attachments.json`),Vt.send(me)}},79346:function(En,yn,xt){"use strict";xt.d(yn,{Z:function(){return Qt}});var Ot=xt(59301),jt=xt(4676);class Qt extends Ot.Component{constructor(Ut){super(Ut);const pe=window.document;this.node=pe.createElement("div"),pe.body.appendChild(this.node)}render(){const{children:Ut}=this.props;return(0,jt.createPortal)(Ut,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},23954:function(En,yn,xt){"use strict";xt.d(yn,{SV:function(){return fe},ZP:function(){return Dt}});var Ot=xt(59301),jt=xt(76374);const Qt={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"]},Me={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"]},Vt={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(` +`)}],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"]},Ut={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(` @@ -1077,193 +1077,193 @@ `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` -`)}]},me={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(` -`)}]},Tt={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 Be=xt(53184),Ce=xt.n(Be),Jt=Object.defineProperty,ce=Object.defineProperties,Ee=Object.getOwnPropertyDescriptors,Ie=Object.getOwnPropertySymbols,Nt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,nt=(xe,te,Ut)=>te in xe?Jt(xe,te,{enumerable:!0,configurable:!0,writable:!0,value:Ut}):xe[te]=Ut,ht=(xe,te)=>{for(var Ut in te||(te={}))Nt.call(te,Ut)&&nt(xe,Ut,te[Ut]);if(Ie)for(var Ut of Ie(te))et.call(te,Ut)&&nt(xe,Ut,te[Ut]);return xe},st=(xe,te)=>ce(xe,Ee(te)),gt=(xe,te,Ut)=>new Promise((Lt,St)=>{var mt=Et=>{try{jt(Ut.next(Et))}catch(le){St(le)}},kt=Et=>{try{jt(Ut.throw(Et))}catch(le){St(le)}},jt=Et=>Et.done?Lt(Et.value):Promise.resolve(Et.value).then(mt,kt);jt((Ut=Ut.apply(xe,te)).next())});const vt={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"]}},wt=(xe,te)=>te.map(Ut=>({label:Ut,kind:xe.languages.CompletionItemKind.Keyword,insertText:Ut})),Ft=xe=>Object.keys(vt.tables).map(te=>({label:te,kind:xe.languages.CompletionItemKind.Variable,insertText:te})),It=(xe,te)=>{const Ut=vt.tables[xe];return Ut?Ut.map(Lt=>({label:Lt,kind:te.languages.CompletionItemKind.Field,insertText:Lt})):[]};function Rt(xe,te,Ut,Lt,St){let mt=te.getWordUntilPosition(Ut),kt={startLineNumber:Ut.lineNumber,endLineNumber:Ut.lineNumber,startColumn:mt.startColumn,endColumn:mt.endColumn},jt=Lt.map(Et=>({label:Et,kind:xe.languages.CompletionItemKind.Keyword,insertText:Et,insertTextRules:xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:kt}));return St.map(Et=>{jt.push(st(ht({},Et),{range:kt}))}),jt}var Kt=xe=>{vt.languages.map(St=>(xe.languages.registerDocumentFormattingEditProvider(St,{provideDocumentFormattingEdits(mt,kt,jt){return gt(this,null,function*(){const Et=Ce()(mt.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:mt.getFullModelRange(),text:Et}]})}}),St));const te=Vt.quickKey.map(St=>({label:St.label,kind:xe.languages.CompletionItemKind.Method,insertText:St.content,insertTextRules:xe.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Ut=me.quickKey.map(St=>({label:St.label,kind:xe.languages.CompletionItemKind.Method,insertText:St.content,insertTextRules:xe.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Lt=Le.quickKey.map(St=>({label:St.label,kind:xe.languages.CompletionItemKind.Method,insertText:St.content,insertTextRules:xe.languages.CompletionItemInsertTextRule.InsertAsSnippet}));xe.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(St,mt){var kt=St.getWordUntilPosition(mt),jt={startLineNumber:mt.lineNumber,endLineNumber:mt.lineNumber,startColumn:kt.startColumn,endColumn:kt.endColumn},Et=St.getLineContent(mt.lineNumber).substring(kt.startColumn-2,kt.endColumn);return{suggestions:[...Vt.keywords.map(le=>({label:le,kind:xe.languages.CompletionItemKind.Function,documentation:le,insertText:le,insertTextRules:xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:jt})),...Vt.quickKey.map(le=>({label:le.label,kind:xe.languages.CompletionItemKind.Function,documentation:le.content,insertText:Et.startsWith("#")?le.content.replace(/#/,""):le.content,insertTextRules:xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:jt}))]}}}),xe.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(St,mt){var kt=St.getWordUntilPosition(mt),jt={startLineNumber:mt.lineNumber,endLineNumber:mt.lineNumber,startColumn:kt.startColumn,endColumn:kt.endColumn};return{suggestions:[...qt.keywords.map(Et=>({label:Et,kind:xe.languages.CompletionItemKind.Function,documentation:Et,insertText:Et,insertTextRules:xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:jt}))]}}}),xe.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(St,mt){var kt=St.getWordUntilPosition(mt),jt={startLineNumber:mt.lineNumber,endLineNumber:mt.lineNumber,startColumn:kt.startColumn,endColumn:kt.endColumn},Et=St.getLineContent(mt.lineNumber).substring(kt.startColumn-2,kt.endColumn);return{suggestions:[...Le.keywords.map(le=>({label:le,kind:xe.languages.CompletionItemKind.Function,documentation:le,insertText:le,insertTextRules:xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:jt})),...Le.quickKey.map(le=>({label:le.label,kind:xe.languages.CompletionItemKind.Function,documentation:le.content,insertText:Et.startsWith("#")?le.content.replace(/#/,""):le.content,insertTextRules:xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:jt}))]}}}),xe.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(St,mt){var kt=St.getWordUntilPosition(mt),jt={startLineNumber:mt.lineNumber,endLineNumber:mt.lineNumber,startColumn:kt.startColumn,endColumn:kt.endColumn},Et=St.getLineContent(mt.lineNumber).substring(kt.startColumn-2,kt.endColumn);return{suggestions:[...Tt.keywords.map(le=>({label:le,kind:xe.languages.CompletionItemKind.Function,documentation:le,insertText:le,insertTextRules:xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:jt})),...Tt.quickKey.map(le=>({label:le.label,kind:xe.languages.CompletionItemKind.Function,documentation:le.content,insertText:Et.startsWith("#")?le.content.replace(/#/,""):le.content,insertTextRules:xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:jt}))]}}}),xe.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(St,mt){var kt=St.getWordUntilPosition(mt),jt={startLineNumber:mt.lineNumber,endLineNumber:mt.lineNumber,startColumn:kt.startColumn,endColumn:kt.endColumn},Et=St.getLineContent(mt.lineNumber).substring(kt.startColumn-2,kt.endColumn);return{suggestions:[...me.keywords.map(le=>({label:le,kind:xe.languages.CompletionItemKind.Function,documentation:le,insertText:le,insertTextRules:xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:jt})),...me.quickKey.map(le=>({label:le.label,kind:xe.languages.CompletionItemKind.Function,documentation:le.content,insertText:Et.startsWith("#")?le.content.replace(/#/,""):le.content,insertTextRules:xe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:jt}))]}}})};const oe="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var ee=Object.defineProperty,ve=(xe,te,Ut)=>te in xe?ee(xe,te,{enumerable:!0,configurable:!0,writable:!0,value:Ut}):xe[te]=Ut,_t=(xe,te,Ut)=>ve(xe,typeof te!="symbol"?te+"":te,Ut);const Ne=class px{constructor(te,Ut,Lt){this.placeholder=te,this.editor=Ut,this.monaco=Lt,Ut.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return px.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};_t(Ne,"ID","editor.widget.placeholderHint");var Ze=Ne,Ue=xt(96236),Ye=xt(8591),un=xt(6848),Ln=xt(89392),Pe=xt(34604),Gt=xt(56102),qe=Object.defineProperty,Bn=Object.defineProperties,zn=Object.getOwnPropertyDescriptors,He=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,cn=Object.prototype.propertyIsEnumerable,Wn=(xe,te,Ut)=>te in xe?qe(xe,te,{enumerable:!0,configurable:!0,writable:!0,value:Ut}):xe[te]=Ut,fn=(xe,te)=>{for(var Ut in te||(te={}))Fe.call(te,Ut)&&Wn(xe,Ut,te[Ut]);if(He)for(var Ut of He(te))cn.call(te,Ut)&&Wn(xe,Ut,te[Ut]);return xe},dn=(xe,te)=>Bn(xe,zn(te)),de=(xe,te)=>{var Ut={};for(var Lt in xe)Fe.call(xe,Lt)&&te.indexOf(Lt)<0&&(Ut[Lt]=xe[Lt]);if(xe!=null&&He)for(var Lt of He(xe))te.indexOf(Lt)<0&&cn.call(xe,Lt)&&(Ut[Lt]=xe[Lt]);return Ut},mn=(xe,te,Ut)=>new Promise((Lt,St)=>{var mt=Et=>{try{jt(Ut.next(Et))}catch(le){St(le)}},kt=Et=>{try{jt(Ut.throw(Et))}catch(le){St(le)}},jt=Et=>Et.done?Lt(Et.value):Promise.resolve(Et.value).then(mt,kt);jt((Ut=Ut.apply(xe,te)).next())});function Tn(xe){return/^\d+$/.test(xe)?`${xe}px`:xe}function Qe(){}let wn=!1;const Oe={"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 we(xe=[]){let te=xe;if(Array.isArray(xe)){for(let Ut=0;Ut{var te=xe,{width:Ut="100%",height:Lt="100%",value:St,language:mt="javascript",style:kt={},options:jt={},overrideServices:Et={},theme:le="vs-dark",onEditBlur:We,isCopy:ln=!1,onSave:en,autoHeight:Fn=!1,forbidCopy:ni=!1,onChange:_n=Qe,editorDidMount:li=Qe,onFocus:si=Qe,onBreakPoint:Vi=Qe,breakPointValue:Ni=[],filename:po="educoder.txt",errorLine:Oo,errorContent:Do="",highlightLine:Lo,openBreakPoint:Vo=!1,placeholder:Fo=""}=te,no=de(te,["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 Xo=(0,Ot.useRef)(),In=(0,Ot.useRef)({}),Ct=(0,Ot.useRef)(),Li=(0,Ot.useRef)(),wi=(0,Ot.useRef)([]),tn=(0,Ot.useRef)(!1),xn=(0,Ot.useRef)(),Qn=(0,Ot.useRef)(),ai=(0,Ot.useRef)(!1),[ii,gi]=(0,Ot.useState)(!1);function Re(){let be;return Xo.current&&(be=new Ht.Z(De=>{for(let On of De)(On.target.offsetHeight>0||On.target.offsetWidth>0)&&In.current.instance.layout()}),be.observe(Xo.current)),be}function je(){Ye.ZP.warning({content:decodeURIComponent(oe),key:"monaco-editor-tip"})}const Zt=()=>{let be=In.current.instance;if(St!=null&&be&&ii){const De=be.getModel();De&&St!==De.getValue()&&(wn=!0,De.setValue(St),be.layout(),wn=!1)}};(0,Ot.useEffect)(()=>{const be=Pe.Z.subscribe("formatDocument",De=>{var On;let Zn=In.current.instance;(On=Zn==null?void 0:Zn.getAction)==null||On.call(Zn,"editor.action.formatDocument").run()});return window.updateMonacoValue=De=>{_n(De)},be},[]),(0,Ot.useEffect)(()=>{var be;let De=In.current.instance;Li.current&&clearTimeout(Li.current),Li.current=setTimeout(()=>{Zt()},500),St&&(St!=null&&St.length)&&((be=De==null?void 0:De.updateOptions)==null||be.call(De,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(St.split(/\r\n|\r|\n/g).length))+3,5)}))},[St,ii,In.current]),(0,Ot.useEffect)(()=>{if(Oo&&In.current&&In.current.instance){let De=In.current.instance;De.changeViewZones(function(On){var Zn=document.createElement("div");Zn.style.padding="10px 20px",Zn.style.width="calc(100% - 20px)",Zn.className="my-error-line-wrp",Zn.innerHTML=Do,On.addZone({afterLineNumber:Oo||11,heightInLines:3,domNode:Zn})});var be={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}};De.addOverlayWidget(be),De.revealPositionInCenter({lineNumber:20,column:1})}},[Oo,In.current,ii]);const Ve=(be="",De)=>{if(!be||be.trim()==="")return!0;const Zn=In.current.instance.getModel().getLineTokens(De);let Vn=!1;for(let $n=0;$n<2;$n++)Zn.getStandardTokenType($n)===1&&(Vn=!0);return Vn};(0,Ot.useEffect)(()=>{var be;const De=(be=In.current)==null?void 0:be.instance;if(De&&ii&&ni){const On=De.onDidBlurEditorWidget(()=>{ai.current=!1}),Zn=De.onDidFocusEditorText(()=>{ai.current=!0});return()=>{On.dispose(),Zn.dispose()}}},[In.current,ii,ni]),(0,Ot.useEffect)(()=>{var be;if((be=In.current)!=null&&be.instance&&ii&&Vo){let De=In.current.instance,On=De.getModel();if(!On)return;(()=>{var Ri;let nn=[],Rn=[];const ui=On.getAllDecorations();for(let fi of ui)fi.options.className==="highlighted-line"&&(nn.push((Ri=fi==null?void 0:fi.range)==null?void 0:Ri.startLineNumber),Rn.push(fi==null?void 0:fi.id));if(Lo===nn[0])return;On.deltaDecorations(Rn,[]);const Si=On.getLineCount();Lo&&Lo<=Si&&(De.deltaDecorations([],[{range:new ne.Range(Lo,1,Lo,On.getLineMaxColumn(Lo)),options:{isWholeLine:!0,className:"highlighted-line"}}]),De.revealLineInCenter(Lo))})();const Vn=(Ri=!1)=>{var nn;let Rn=[],ui=[];const Si=On.getAllDecorations();for(let fi of Si)fi.options.linesDecorationsClassName==="breakpoints-select"&&(Rn.push((nn=fi==null?void 0:fi.range)==null?void 0:nn.startLineNumber),ui.push(fi==null?void 0:fi.id));if(Ri)return{lines:Rn,ids:ui};Vi(Rn)},$n=Ri=>mn(void 0,null,function*(){let nn={range:new ne.Range(Ri,1,Ri,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield On.deltaDecorations([],[nn]),Vn()}),Xn=Ri=>mn(void 0,null,function*(){let nn=[];const Rn=De.getLineDecorations(Ri);for(let ui of Rn)ui.options.linesDecorationsClassName==="breakpoints-select"&&nn.push(ui.id);yield On.deltaDecorations(nn,[]),Vn()}),Un=Ri=>{let nn=De.getLineDecorations(Ri);for(let Rn of nn)if(Rn.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Ln.isEqual)(Ni,Vn(!0).lines)){On.deltaDecorations(Vn(!0).ids,[]);const Ri=Ni.map(nn=>({range:new ne.Range(nn,1,nn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));On.deltaDecorations([],Ri)}const di=De.onDidChangeModelContent(Ri=>{let nn=De.getPosition();if(nn){let Rn=nn.lineNumber;clearTimeout(Qn.current),Qn.current=setTimeout(()=>{Ve(On.getLineContent(Rn),Rn)?Xn(Rn):Un(Rn)?(Xn(Rn),$n(Rn)):Vn()},100)}}),ki=De.onMouseDown(Ri=>{var nn,Rn,ui;if(Ri.target.detail&&((ui=(Rn=(nn=Ri.target)==null?void 0:nn.element)==null?void 0:Rn.className)!=null&&ui.includes("line-numbers"))){let Si=Ri.target.position.lineNumber;if(Ve(On.getLineContent(Si),Si))return;Un(Si)?Xn(Si):$n(Si)}}),Ti=Ri=>{let nn={range:new ne.Range(Ri,1,Ri,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};wi.current=De.deltaDecorations(wi.current,[nn])},hn=()=>{wi.current=De.deltaDecorations(wi.current,[])},Hi=De.onMouseMove(Ri=>{var nn,Rn,ui;if(hn(),Ri.target.detail&&((ui=(Rn=(nn=Ri.target)==null?void 0:nn.element)==null?void 0:Rn.className)!=null&&ui.includes("line-numbers"))){let Si=Ri.target.position.lineNumber;if(Ve(On.getLineContent(Si),Si))return;Ti(Si)}}),Wi=De.onMouseLeave(()=>{hn()});return()=>{di.dispose(),ki.dispose(),Hi.dispose(),Wi.dispose()}}},[In.current,ii,Ni,Lo,Vo,mt]),(0,Ot.useEffect)(()=>{var be;(be=In.current)!=null&&be.instance&&Vo&&In.current.instance.setPosition({lineNumber:0,column:0})},[Lo]);function vn(){let be=In.current.instance;if(be){const De=be.getSelection(),On=In.current.pastePos||{},Zn=new ne.Range(On.startLineNumber||De.endLineNumber,On.startColumn||De.endColumn,On.endLineNumber||De.endLineNumber,On.endColumn||De.endColumn);setTimeout(()=>{be.executeEdits("",[{range:Zn,text:""}])},300)}}function Se(be){(window.navigator.platform.match("Mac")?be.metaKey:be.ctrlKey)&&be.keyCode==83&&(be.preventDefault(),en())}const ae=()=>{if(Fn&&In.current.instance){const be=In.current.instance.getContentHeight();on(be{if(!ai.current)return;const{keyCode:De,ctrlKey:On,metaKey:Zn,target:Vn,type:$n}=be;return($n==="paste"||(De===67||De===86)&&(Zn||On))&&Vn.nodeName==="TEXTAREA"&&(je(),be.preventDefault()),!1};function Ge(be,De){var On=window.URL||window.webkitURL||window,Zn=new Blob([De]),Vn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Vn.href=On.createObjectURL(Zn),Vn.download=be,Je(Vn)}(0,Ot.useEffect)(()=>{ae()},[ae]),(0,Ot.useEffect)(()=>{Xo.current&&!ii&&Promise.all([xt.e(8909),xt.e(3267)]).then(xt.bind(xt,71448)).then(be=>{try{ne=be,In.current.instance=ne.editor.create(Xo.current,{value:St,language:we(mt),theme:le,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},Et);const De=In.current.instance;let Vn=[...Ue.BH._menuItems].find(di=>di[0]._debugName=="EditorContext")[1],$n=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Xn=(di,ki)=>{var Ti,hn;let Hi=di._first;do ki.includes((hn=(Ti=Hi.element)==null?void 0:Ti.command)==null?void 0:hn.id)&&di._remove(Hi);while(Hi=Hi.next)};if(li(De,ne),setTimeout(()=>{ae(),In.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Ge(po||"educoder.txt",De.getValue())}})},500),In.current.subscription=De.onDidChangeModelContent(di=>{tn.current?clearTimeout(xn.current):(ae(),_n(De.getValue(),di)),xn.current=setTimeout(()=>{tn.current=!1},500)}),window.Monaco||Kt(ne,we(mt)),ni&&(Xn(Vn,$n),Xo.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",pn),window.removeEventListener("paste",pn),window.addEventListener("keydown",pn),window.addEventListener("paste",pn)),window.Monaco=ne,We&&De.onDidBlurEditorWidget(()=>{We(De.getValue())}),si&&De.onDidFocusEditorText(()=>{si(De.getValue())}),ni)try{De.onDidPaste(di=>{const ki=De.getSelection(),Ti=In.current.pastePos||{},hn=new ne.Range(Ti.startLineNumber||ki.endLineNumber,Ti.startColumn||ki.endColumn,Ti.endLineNumber||ki.endLineNumber,Ti.endColumn||ki.endColumn);De.executeEdits("",[{range:di.range,text:""}])})}catch(di){}let Un=Re();return Fo&&typeof Fo=="string"&&new Ze(Fo,De,ne),gi(!0),()=>{const di=In.current.instance;di.dispose();const ki=di.getModel();ki&&ki.dispose(),In.current.subscription&&In.current.subscription.dispose(),Un.unobserve(Xo.current)}}catch(De){}})},[]),(0,Ot.useEffect)(()=>{if(In.current.instance&&ii)return document.addEventListener("keydown",Se,!1),()=>{document.removeEventListener("keydown",Se)}},[en,ii]),(0,Ot.useEffect)(()=>{let be=In.current.instance;if(be&&ii){let De=we(mt);ne.editor.setModelLanguage(be.getModel(),De)}},[mt,ii]),(0,Ot.useEffect)(()=>{In.current.instance&&ii&&ne.editor.setTheme(le)},[le,ii]),(0,Ot.useEffect)(()=>{let be=In.current.instance;Ct.current=jt,be&&ii&&(be.updateOptions(fn({},jt)),setTimeout(()=>{be.getModel().updateOptions(fn({},jt))},200))},[JSON.stringify(jt),ii]),(0,Ot.useEffect)(()=>{let be=In.current.instance;be&&ii&&be.layout()},[Ut,Lt,ii]);const[fe,At]=(0,Ot.useState)(Tn(Ut)),[Ae,on]=(0,Ot.useState)(Tn(Lt)),bn=dn(fn({},kt),{width:fe,height:Ae,position:"relative"});return Ot.createElement("div",{className:"my-monaco-editor",ref:Xo,style:bn},ln&&Ot.createElement(Gt.CopyToClipboard,{text:St,onCopy:()=>Ye.ZP.success("\u590D\u5236\u6210\u529F")},Ot.createElement(un.Z,{title:"\u590D\u5236\u4EE3\u7801"},Ot.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},Ot.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function ge({width:xe="100%",height:te="100%",original:Ut,modified:Lt,language:St,options:mt={}}){const kt=(0,Ot.useRef)(),[jt,Et]=(0,Ot.useState)(null);function le(Fn){let ni;return kt.current&&(ni=new Ht.Z(_n=>{for(let li of _n)(li.target.offsetHeight>0||li.target.offsetWidth>0)&&Fn.layout()}),ni.observe(kt.current)),ni}(0,Ot.useEffect)(()=>(kt.current&&Promise.all([xt.e(8909),xt.e(9404)]).then(xt.bind(xt,2550)).then(Fn=>{ne=Fn;const ni=ne.editor.createDiffEditor(kt.current,dn(fn({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},mt),{wordWrap:!0}));Et(ni);let _n=le(ni);return()=>{ni.dispose();const li=ni.getModel();li&&li.dispose(),_n.unobserve(kt.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,Ot.useEffect)(()=>{jt&&jt.setModel({original:ne.editor.createModel(Ut,St),modified:ne.editor.createModel(Lt,St)})},[Ut,Lt,St,jt]);const We=Tn(xe),ln=Tn(te),en={width:We,height:ln};return Ot.createElement("div",{className:"my-diff-editor",ref:kt,style:en})}},58856:function(Mn,Sn,xt){"use strict";xt.d(Sn,{Z:function(){return Ht}});var Ot=xt(59301);function Ht(qt,Le){const Vt=(0,Ot.useRef)();(0,Ot.useEffect)(()=>{Vt.current=qt}),(0,Ot.useEffect)(()=>{function me(){Vt.current()}if(Le!==null){let Tt=setInterval(me,Le);return()=>clearInterval(Tt)}},[Le])}},61895:function(Mn,Sn,xt){"use strict";xt.r(Sn),xt.d(Sn,{default:function(){return pn}});var Ot=xt(59301),Ht=xt(89070),qt={box:"box___akyrK",formWrap:"formWrap___y92V8",box_header:"box_header___jersL",header_title:"header_title___Jrz8Q",ewm:"ewm___Ccwyw",ewm_img:"ewm_img___qYpk1",ewm_text:"ewm_text____v5jw",box_miaoshu:"box_miaoshu___BqRGY",question_button:"question_button___MvZyz",select_question:"select_question___LvjKa",question_right:"question_right___sDC9L",question_right_title:"question_right_title___ek4Hb",question_right_content:"question_right_content___FyEMX",save_button:"save_button___dLwXn",start_button:"start_button___ta6xr",submit_button:"submit_button___E6iWE",staticWrap:"staticWrap___WAzhb",title:"title___xZVjz",subTitle:"subTitle___Y2dsw",erweima:"erweima___6VmbC"},Le=xt(78241),Vt=xt(8591),me=xt(71418),Tt=xt(6848),Be=xt(57809),Ce=xt(1710),Jt=xt(43418),ce=xt(9122),Ee=xt(79285),Ie=xt(95237),Nt=xt(43604),et={wrap:"wrap___xb1NT",deleteIcon:"deleteIcon___cM9xv",keywordTag:"keywordTag___UL5M3",questionTitleEditorWrap:"questionTitleEditorWrap___KCJQj",choiceListWrap:"choiceListWrap___YUFJN",choiceWrap:"choiceWrap___OLt1d",choiceIndex:"choiceIndex___v8tLz",judgementIndex:"judgementIndex___GFeej",setAnswerBtn:"setAnswerBtn___pBwSA",activeAnswer:"activeAnswer___d0iL0",activeJudgementAnswer:"activeJudgementAnswer___hUIzE",actionWrapper:"actionWrapper___KnaNE",addIcon:"addIcon___fbmnO",inputBorder:"inputBorder___vbVXA",placeholder:"placeholder___ECmuB",blankInputNumberWrapper:"blankInputNumberWrapper___uIbUU",addBtn:"addBtn___c1VkJ",blankIndex:"blankIndex___ek3fY",baseInputWrapper:"baseInputWrapper___zlGHK",collapseWrapper:"collapseWrapper___QtpR6",panelHeader:"panelHeader___ZsUo0",open:"open___q9CQo",close:"close___Ju5ls",hide:"hide___BmCWZ"},nt=xt(12893),ht=xt(12290),st=xt(85149),gt=xt(59301),vt=Object.defineProperty,wt=Object.defineProperties,Ft=Object.getOwnPropertyDescriptors,It=Object.getOwnPropertySymbols,Rt=Object.prototype.hasOwnProperty,Kt=Object.prototype.propertyIsEnumerable,oe=(Ge,fe,At)=>fe in Ge?vt(Ge,fe,{enumerable:!0,configurable:!0,writable:!0,value:At}):Ge[fe]=At,ee=(Ge,fe)=>{for(var At in fe||(fe={}))Rt.call(fe,At)&&oe(Ge,At,fe[At]);if(It)for(var At of It(fe))Kt.call(fe,At)&&oe(Ge,At,fe[At]);return Ge},ve=(Ge,fe)=>wt(Ge,Ft(fe)),_t=(Ge,fe)=>{var At={};for(var Ae in Ge)Rt.call(Ge,Ae)&&fe.indexOf(Ae)<0&&(At[Ae]=Ge[Ae]);if(Ge!=null&&It)for(var Ae of It(Ge))fe.indexOf(Ae)<0&&Kt.call(Ge,Ae)&&(At[Ae]=Ge[Ae]);return At};const Ne=Ge=>{var fe=Ge,{value:At,onChange:Ae,scrollId:on}=fe,bn=_t(fe,["value","onChange","scrollId"]);return gt.createElement("div",{id:on||""},gt.createElement(ht.Z,ve(ee({},bn),{defaultValue:At,onChange:(be,De)=>{De!=null&&De.length?Ae(be,De):Ae(be)}})))},he=({value:Ge,onChange:fe,placeholder:At,height:Ae=150,isEdit:on,miniToolbar:bn,watch:be=!0})=>on?gt.createElement(ht.Z,{isFocus:!0,height:Ae||void 0,placeholder:At,defaultValue:Ge,onChange:fe,miniToolbar:bn}):gt.createElement("div",{style:{cursor:"pointer"}},Ge?gt.createElement(st.Z,{className:et.inputBorder,value:Ge}):gt.createElement("div",{className:`${et.inputBorder} ${et.placeholder} inputBorderError`},At));var Ze=xt(59301),Ue=Object.defineProperty,Ye=Object.defineProperties,un=Object.getOwnPropertyDescriptors,Ln=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,Gt=Object.prototype.propertyIsEnumerable,qe=(Ge,fe,At)=>fe in Ge?Ue(Ge,fe,{enumerable:!0,configurable:!0,writable:!0,value:At}):Ge[fe]=At,Bn=(Ge,fe)=>{for(var At in fe||(fe={}))Pe.call(fe,At)&&qe(Ge,At,fe[At]);if(Ln)for(var At of Ln(fe))Gt.call(fe,At)&&qe(Ge,At,fe[At]);return Ge},zn=(Ge,fe)=>Ye(Ge,un(fe)),He=(Ge,fe)=>{var At={};for(var Ae in Ge)Pe.call(Ge,Ae)&&fe.indexOf(Ae)<0&&(At[Ae]=Ge[Ae]);if(Ge!=null&&Ln)for(var Ae of Ln(Ge))fe.indexOf(Ae)<0&&Gt.call(Ge,Ae)&&(At[Ae]=Ge[Ae]);return At};const Fe=["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"],cn=({value:Ge,onChange:fe,choiceTextKey:At,answerKey:Ae,index:on,isEdit:bn,setInputActive:be,form:De,choiceOptionsPath:On,allowChangeMode:Zn,showAddIcon:Vn,addItem:$n,deleteItem:Xn})=>{const Un=(Ge==null?void 0:Ge[Ae])===1,di=()=>{const Ti=De.getFieldValue(On);De.setFieldValue(On,Ti.map(hn=>zn(Bn({},hn),{[Ae]:0})))},ki=()=>{Un?fe(zn(Bn({},Ge),{[Ae]:0})):(Zn||di(),fe(zn(Bn({},Ge),{[Ae]:1})))};return Ze.createElement(Ie.Z,{className:et.choiceWrap,align:"middle",wrap:!1},Ze.createElement(Nt.Z,{onClick:ki,className:`${et.choiceIndex} ${Un?et.activeAnswer:""}`},Fe[on]),Ze.createElement(Nt.Z,{flex:1,className:`${et.editorWrap} ml15`,onClick:be},Ze.createElement(he,{height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",isEdit:bn,value:Ge==null?void 0:Ge[At],onChange:Ti=>{fe(zn(Bn({},Ge),{[At]:Ti}))}})),Ze.createElement(Nt.Z,{className:et.actionWrapper},Ze.createElement(Tt.Z,{title:"\u5220\u9664"},Ze.createElement(nt.Z,{className:et.deleteIcon,onClick:Xn,style:{visibility:on>1?"visible":"hidden"}}))))},Wn=({questionTitlePlaceholder:Ge,titleKey:fe,choiceKey:At,analysisKey:Ae,choiceTextKey:on,answerKey:bn,choiceOptionsPath:be,allowChangeMode:De=!0,form:On,showAnalysis:Zn=!0})=>{const[Vn,$n]=(0,Ot.useState)(),[Xn,Un]=(0,Ot.useState)(!1);return Ze.createElement("div",{className:et.wrap},Ze.createElement("div",{className:et.questionTitleEditorWrap},Ze.createElement(Le.default.Item,{label:"\u9898\u5E72",name:fe,labelCol:{span:24},rules:[{required:!0}]},Ze.createElement(Ne,{scrollId:Array.isArray(fe)?fe.join("_"):`${fe}`,height:150,placeholder:Ge}))),Ze.createElement(Le.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),Ze.createElement(Le.default.List,{name:At,rules:[{validator(di,ki){const Ti=ki.some(Hi=>Hi[bn]===1),hn=ki.findIndex(Hi=>{var Wi;return((Wi=Hi[on])==null?void 0:Wi.length)<=0});return hn!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${Fe[hn]}\u9009\u9879\u7684\u5185\u5BB9`)):Ti?Promise.resolve():(Vt.ZP.error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"),Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848")))}}]},(di,{add:ki,remove:Ti})=>Ze.createElement("div",{id:Array.isArray(be)?be.join("_"):`${be}`,style:{marginTop:"-20px"}},di.map((hn,Hi)=>{var Wi=hn,{key:Ri,name:nn}=Wi,Rn=He(Wi,["key","name"]);const ui=Vn===Ri,Si=()=>{$n(Ri)},fi=Hi<7&&Hi===di.length-1,Mi=()=>ki({[on]:"",[bn]:0}),$i=()=>Ti(nn);return Ze.createElement(Le.default.Item,zn(Bn({},Rn),{key:Ri,name:nn,className:et.choiceListWrap,rules:[{validator(Bi,zi){return zi!=null&&zi.choice_text?Promise.resolve():Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${Fe[Hi]}\u9009\u9879\u7684\u5185\u5BB9`))}}]}),Ze.createElement(cn,{choiceTextKey:on,answerKey:bn,index:Hi,isEdit:ui,setInputActive:Si,form:On,choiceOptionsPath:be,allowChangeMode:De,showAddIcon:fi,addItem:Mi,deleteItem:$i}))}),di.length<8&&Ze.createElement("div",{className:`${et.addBtn} mb30`,onClick:()=>ki({[on]:"",[bn]:0})},Ze.createElement("i",{className:"iconfont icon-tianjiatixing mr5 font12"}),"\u6DFB\u52A0\u9009\u9879"))),Zn&&Ze.createElement("div",{onClick:()=>Un(!0)},Ze.createElement(Le.default.Item,{name:Ae,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Ze.createElement(he,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Xn}))))};var fn=xt(92832),dn=xt(59301),de=Object.defineProperty,mn=Object.defineProperties,Tn=Object.getOwnPropertyDescriptors,Qe=Object.getOwnPropertySymbols,wn=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,we=(Ge,fe,At)=>fe in Ge?de(Ge,fe,{enumerable:!0,configurable:!0,writable:!0,value:At}):Ge[fe]=At,ne=(Ge,fe)=>{for(var At in fe||(fe={}))wn.call(fe,At)&&we(Ge,At,fe[At]);if(Qe)for(var At of Qe(fe))Oe.call(fe,At)&&we(Ge,At,fe[At]);return Ge},Dt=(Ge,fe)=>mn(Ge,Tn(fe)),ge=(Ge,fe)=>{var At={};for(var Ae in Ge)wn.call(Ge,Ae)&&fe.indexOf(Ae)<0&&(At[Ae]=Ge[Ae]);if(Ge!=null&&Qe)for(var Ae of Qe(Ge))fe.indexOf(Ae)<0&&Oe.call(Ge,Ae)&&(At[Ae]=Ge[Ae]);return At};const xe=["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"],te=({value:Ge,onChange:fe,choiceTextKey:At,answerKey:Ae,index:on,isEdit:bn,setInputActive:be,form:De,choiceOptionsPath:On,allowChangeMode:Zn,showAddIcon:Vn,addItem:$n,deleteItem:Xn})=>{const Un=(Ge==null?void 0:Ge[Ae])===1,di=()=>{const ki=De.getFieldValue(On);De.setFieldValue(On,ki.map(Ti=>Dt(ne({},Ti),{[Ae]:0})))};return dn.createElement(Ie.Z,{className:et.choiceWrap,align:"middle",wrap:!1},dn.createElement(Nt.Z,{className:`${et.choiceIndex} ${Un?et.activeAnswer:""}`,style:{cursor:"no-drop",opacity:"0.7"}},xe[on]),dn.createElement(Nt.Z,{flex:1,className:`${et.editorWrap} ml15`,onClick:be},dn.createElement(fn.default,{size:"large",disabled:!0,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",value:Ge==null?void 0:Ge[At]})))},Ut=({questionTitlePlaceholder:Ge,titleKey:fe,choiceKey:At,analysisKey:Ae,choiceTextKey:on,answerKey:bn,choiceOptionsPath:be,allowChangeMode:De=!0,form:On,showAnalysis:Zn=!0})=>{const[Vn,$n]=(0,Ot.useState)(),[Xn,Un]=(0,Ot.useState)(!1);return dn.createElement("div",{className:et.wrap},dn.createElement("div",{className:et.questionTitleEditorWrap},dn.createElement(Le.default.Item,{label:"\u9898\u5E72",name:fe,labelCol:{span:24},rules:[{required:!0}]},dn.createElement(fn.default,{size:"large",disabled:!0}))),dn.createElement(Le.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),dn.createElement(Le.default.List,{name:At,rules:[{validator(di,ki){const Ti=ki.some(Hi=>Hi[bn]===1),hn=ki.findIndex(Hi=>{var Wi;return((Wi=Hi[on])==null?void 0:Wi.length)<=0});return hn!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${xe[hn]}\u9009\u9879\u7684\u5185\u5BB9`)):Ti?Promise.resolve():(Vt.ZP.error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"),Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848")))}}]},(di,{add:ki,remove:Ti})=>dn.createElement("div",{id:Array.isArray(be)?be.join("_"):`${be}`,style:{marginTop:"-20px"}},di.map((hn,Hi)=>{var Wi=hn,{key:Ri,name:nn}=Wi,Rn=ge(Wi,["key","name"]);const ui=Vn===Ri,Si=()=>{$n(Ri)},fi=Hi<7&&Hi===di.length-1,Mi=()=>ki({[on]:"",[bn]:0}),$i=()=>Ti(nn);return dn.createElement(Le.default.Item,Dt(ne({},Rn),{key:Ri,name:nn,className:et.choiceListWrap}),dn.createElement(te,{choiceTextKey:on,answerKey:bn,index:Hi,isEdit:ui,setInputActive:Si,form:On,choiceOptionsPath:be,allowChangeMode:De,showAddIcon:fi,addItem:Mi,deleteItem:$i}))}))),Zn&&dn.createElement("div",{onClick:()=>Un(!0)},dn.createElement(Le.default.Item,{name:Ae,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},dn.createElement(fn.default,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",disabled:!0,size:"large"}))))};var Lt=xt(59301),St=Object.defineProperty,mt=Object.defineProperties,kt=Object.getOwnPropertyDescriptors,jt=Object.getOwnPropertySymbols,Et=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable,We=(Ge,fe,At)=>fe in Ge?St(Ge,fe,{enumerable:!0,configurable:!0,writable:!0,value:At}):Ge[fe]=At,ln=(Ge,fe)=>{for(var At in fe||(fe={}))Et.call(fe,At)&&We(Ge,At,fe[At]);if(jt)for(var At of jt(fe))le.call(fe,At)&&We(Ge,At,fe[At]);return Ge},en=(Ge,fe)=>mt(Ge,kt(fe)),Fn=(Ge,fe)=>{var At={};for(var Ae in Ge)Et.call(Ge,Ae)&&fe.indexOf(Ae)<0&&(At[Ae]=Ge[Ae]);if(Ge!=null&&jt)for(var Ae of jt(Ge))fe.indexOf(Ae)<0&&le.call(Ge,Ae)&&(At[Ae]=Ge[Ae]);return At};const ni={\u6B63\u786E:"T",\u9519\u8BEF:"F"},_n=({value:Ge,onChange:fe,form:At})=>{const Ae=(Ge==null?void 0:Ge.is_answer)===1,on=Ge==null?void 0:Ge.choice_text,bn=()=>{const be=At.getFieldsValue().choices.map(De=>({choice_text:De.choice_text,is_answer:0}));At.setFieldsValue({choices:be}),fe(en(ln({},Ge),{is_answer:1}))};return Lt.createElement(Ie.Z,{className:et.choiceWrap,align:"middle",wrap:!1,style:{marginBottom:"20px"}},Lt.createElement(Nt.Z,{onClick:bn,className:`${et.choiceIndex} ${et.judgementIndex} ${Ae?et.activeAnswer:""}`},ni[on]),Lt.createElement(Nt.Z,{flex:1,className:`${et.editorWrap} ml15`},Lt.createElement("div",{className:`${et.inputBorder} ${et.placeholder} ${Ae?et.activeJudgementAnswer:""}`},on)))},li=({questionTitlePlaceholder:Ge,choiceKey:fe,form:At})=>{const[Ae,on]=(0,Ot.useState)(!1);return Lt.createElement("div",{className:et.wrap},Lt.createElement("div",{className:et.questionTitleEditorWrap},Lt.createElement(Le.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},Lt.createElement(Ne,{scrollId:"name",height:140,placeholder:Ge}))),Lt.createElement(Le.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},Lt.createElement(Le.default.List,{name:"choices",rules:[{validator(bn,be){return be.some(On=>(On==null?void 0:On.is_answer)===1)?Promise.resolve():(Vt.ZP.error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"),Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848")))}}]},bn=>Lt.createElement("div",{id:"choices"},bn.map(be=>{var De=be,{key:On,name:Zn}=De,Vn=Fn(De,["key","name"]);return Lt.createElement(Le.default.Item,en(ln({},Vn),{key:On,name:Zn,noStyle:!0}),Lt.createElement(_n,{form:At}))})))),Lt.createElement("div",{onClick:()=>on(!0)},Lt.createElement(Le.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Lt.createElement(he,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Ae}))))};var si=xt(59301),Vi=Object.defineProperty,Ni=Object.defineProperties,po=Object.getOwnPropertyDescriptors,Oo=Object.getOwnPropertySymbols,Do=Object.prototype.hasOwnProperty,Lo=Object.prototype.propertyIsEnumerable,Vo=(Ge,fe,At)=>fe in Ge?Vi(Ge,fe,{enumerable:!0,configurable:!0,writable:!0,value:At}):Ge[fe]=At,Fo=(Ge,fe)=>{for(var At in fe||(fe={}))Do.call(fe,At)&&Vo(Ge,At,fe[At]);if(Oo)for(var At of Oo(fe))Lo.call(fe,At)&&Vo(Ge,At,fe[At]);return Ge},no=(Ge,fe)=>Ni(Ge,po(fe)),Xo=(Ge,fe)=>{var At={};for(var Ae in Ge)Do.call(Ge,Ae)&&fe.indexOf(Ae)<0&&(At[Ae]=Ge[Ae]);if(Ge!=null&&Oo)for(var Ae of Oo(Ge))fe.indexOf(Ae)<0&&Lo.call(Ge,Ae)&&(At[Ae]=Ge[Ae]);return At};const In={\u6B63\u786E:"T",\u9519\u8BEF:"F"},Ct=({value:Ge,onChange:fe,form:At})=>{const Ae=(Ge==null?void 0:Ge.is_answer)===1,on=Ge==null?void 0:Ge.choice_text,bn=()=>{const be=At.getFieldsValue().choices.map(De=>({choice_text:De.choice_text,is_answer:0}));At.setFieldsValue({choices:be}),fe(no(Fo({},Ge),{is_answer:1}))};return si.createElement(Ie.Z,{className:et.choiceWrap,align:"middle",wrap:!1,style:{marginBottom:"20px"}},si.createElement(Nt.Z,{className:`${et.choiceIndex} ${et.judgementIndex} ${Ae?et.activeAnswer:""}`,style:{cursor:"no-drop",opacity:"0.7"}},In[on]),si.createElement(Nt.Z,{flex:1,className:`${et.editorWrap} ml15`,style:{cursor:"no-drop",opacity:"0.7"}},si.createElement("div",{className:`${et.inputBorder} ${et.placeholder} ${Ae?et.activeJudgementAnswer:""}`},on)))},Li=({questionTitlePlaceholder:Ge,choiceKey:fe,form:At})=>{const[Ae,on]=(0,Ot.useState)(!1);return si.createElement("div",{className:et.wrap},si.createElement("div",{className:et.questionTitleEditorWrap},si.createElement(Le.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},si.createElement(fn.default,{size:"large",disabled:!0}))),si.createElement(Le.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},si.createElement(Le.default.List,{name:"choices",rules:[{validator(bn,be){return be.some(On=>(On==null?void 0:On.is_answer)===1)?Promise.resolve():(Vt.ZP.error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"),Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848")))}}]},bn=>si.createElement("div",{id:"choices"},bn.map(be=>{var De=be,{key:On,name:Zn}=De,Vn=Xo(De,["key","name"]);return si.createElement(Le.default.Item,no(Fo({},Vn),{key:On,name:Zn,noStyle:!0}),si.createElement(Ct,{form:At}))})))),si.createElement("div",{onClick:()=>on(!0)},si.createElement(Le.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},si.createElement(fn.default,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",disabled:!0,size:"large"}))))};var wi=xt(99064),tn=xt(3294),xn=xt(59301),Qn=Object.defineProperty,ai=Object.defineProperties,ii=Object.getOwnPropertyDescriptors,gi=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,Zt=(Ge,fe,At)=>fe in Ge?Qn(Ge,fe,{enumerable:!0,configurable:!0,writable:!0,value:At}):Ge[fe]=At,Ve=(Ge,fe)=>{for(var At in fe||(fe={}))Re.call(fe,At)&&Zt(Ge,At,fe[At]);if(gi)for(var At of gi(fe))je.call(fe,At)&&Zt(Ge,At,fe[At]);return Ge},vn=(Ge,fe)=>ai(Ge,ii(fe)),Se=(Ge,fe,At)=>new Promise((Ae,on)=>{var bn=On=>{try{De(At.next(On))}catch(Zn){on(Zn)}},be=On=>{try{De(At.throw(On))}catch(Zn){on(Zn)}},De=On=>On.done?Ae(On.value):Promise.resolve(On.value).then(bn,be);De((At=At.apply(Ge,fe)).next())});const ae=["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"],Je=({user:Ge,classroomList:fe,globalSetting:At,loading:Ae,problemset:on,dispatch:bn,pageNum:be,pptInfo:De,deletePage:On,openEwm:Zn})=>{var Vn,$n,Xn,Un,di,ki,Ti,hn,Hi,Wi,Ri,nn,Rn,ui,Si,fi,Mi,$i,Bi;const[zi,qi]=(0,Ot.useState)(null),[yn,Eo]=(0,Ot.useState)(""),gn=(0,Ot.useRef)(),[Qi]=Le.default.useForm(),[To,Yi]=(0,Ot.useState)(!1),Zi=(0,Ht.useParams)(),[Di,Oi]=(0,Ot.useState)({}),[Ai,Gi]=(0,Ot.useState)(!0),[So,oi]=(0,Ot.useState)(!1),[Wt,Ro]=(0,Ot.useState)({summary:[],details:[]}),[lr,br]=(0,Ot.useState)(1);(0,Ot.useEffect)(()=>{be&&(Qi.setFieldsValue({choices:[],name:"",is_answer:0,analysis:""}),eo(),oi(!1))},[be]),(0,Ot.useEffect)(()=>{On&&Dr()},[On]),(0,Ot.useEffect)(()=>{Zn&&Yi(!0)},[Zn]);const Dr=()=>Se(void 0,null,function*(){let Ki=yield(0,wi.ZP)(`/api/courses/${Zi==null?void 0:Zi.coursesId}/smart_plans/${Zi==null?void 0:Zi.id}/delete_page.json`,{method:"delete",body:{position:On}});(Ki==null?void 0:Ki.status)==0&&(Vt.ZP.success("\u5220\u9664\u6210\u529F"),eo())}),gr=(Ki,Xi,Mo)=>{(0,wi.ZP)(`/api/courses/${Zi==null?void 0:Zi.coursesId}/smart_plans/${Zi==null?void 0:Zi.id}/set_page_cache.json`,{method:"post",body:{type:0,data:{page:Ki,allow_answer:Xi,is_end:Mo,randomData:lr}}})},eo=()=>Se(void 0,null,function*(){var Ki,Xi,Mo,Ar,io,_i,Gn,Fi,$o,Pr,or,Jo,Sr,wr,oa,ca,Ca,sn,ea,$s,vs,Bs,Ur,gl,Nr,Go,hr,Yr,co,_o,wo,hi,Fr,Xr,$a;Gi(!0);let Tr=yield(0,wi.ZP)(`/api/courses/${Zi==null?void 0:Zi.coursesId}/smart_plans/${Zi==null?void 0:Zi.id}/item_banks.json`,{method:"get",params:{position:be}});Gi(!1),(Tr==null?void 0:Tr.status)==0&&(Oi(Tr==null?void 0:Tr.data),(De==null?void 0:De.status)!=="ended"&&gr(be,((Mo=(Xi=(Ki=Tr==null?void 0:Tr.data)==null?void 0:Ki.item_banks)==null?void 0:Xi[0])==null?void 0:Mo.status)=="in_progress",(De==null?void 0:De.status)=="ended"),((Ar=Tr==null?void 0:Tr.data)==null?void 0:Ar.count)>0&&((((Gn=(_i=(io=Tr==null?void 0:Tr.data)==null?void 0:io.item_banks)==null?void 0:_i[0])==null?void 0:Gn.status)=="in_progress"||((Pr=($o=(Fi=Tr==null?void 0:Tr.data)==null?void 0:Fi.item_banks)==null?void 0:$o[0])==null?void 0:Pr.status)=="ended")&&mo((Sr=(Jo=(or=Tr==null?void 0:Tr.data)==null?void 0:or.item_banks)==null?void 0:Jo[0])==null?void 0:Sr.smart_plan_item_bank_id),Eo(((ca=(oa=(wr=Tr==null?void 0:Tr.data)==null?void 0:wr.item_banks)==null?void 0:oa[0])==null?void 0:ca.item_type)=="SINGLE"||((ea=(sn=(Ca=Tr==null?void 0:Tr.data)==null?void 0:Ca.item_banks)==null?void 0:sn[0])==null?void 0:ea.item_type)=="MULTIPLE"?"SELECT":"JUDGMENT"),Qi.setFieldsValue({item_type:((Bs=(vs=($s=Tr==null?void 0:Tr.data)==null?void 0:$s.item_banks)==null?void 0:vs[0])==null?void 0:Bs.item_type)=="SINGLE"||((Nr=(gl=(Ur=Tr==null?void 0:Tr.data)==null?void 0:Ur.item_banks)==null?void 0:gl[0])==null?void 0:Nr.item_type)=="MULTIPLE"?"SELECT":"JUDGMENT",choices:(co=(Yr=(hr=(Go=Tr==null?void 0:Tr.data)==null?void 0:Go.item_banks)==null?void 0:hr[0])==null?void 0:Yr.choices)==null?void 0:co.map(rs=>(rs.is_answer=rs.is_answer?1:0,rs)),analysis:(hi=(wo=(_o=Tr==null?void 0:Tr.data)==null?void 0:_o.item_banks)==null?void 0:wo[0])==null?void 0:hi.analysis,name:($a=(Xr=(Fr=Tr==null?void 0:Tr.data)==null?void 0:Fr.item_banks)==null?void 0:Xr[0])==null?void 0:$a.name})))}),mo=Ki=>Se(void 0,null,function*(){var Xi,Mo,Ar,io,_i,Gn;let Fi=yield(0,wi.ZP)(`/api/courses/${Zi==null?void 0:Zi.coursesId}/smart_plans/${Zi==null?void 0:Zi.id}/item_bank_statistics.json`,{method:"get",params:{smart_plan_item_bank_id:Ki}});if((Fi==null?void 0:Fi.status)==0){const $o={class_num:(Xi=Fi==null?void 0:Fi.data)==null?void 0:Xi.class_num,answerd_num:(Mo=Fi==null?void 0:Fi.data)==null?void 0:Mo.answerd_num,correctly_num:(Ar=Fi==null?void 0:Fi.data)==null?void 0:Ar.correctly_num,submitted_rate:(io=Fi==null?void 0:Fi.data)==null?void 0:io.submitted_rate,correct_rate:(_i=Fi==null?void 0:Fi.data)==null?void 0:_i.correct_rate};Ro({summary:[$o],details:(Gn=Fi==null?void 0:Fi.data)==null?void 0:Gn.choice_list})}});return xn.createElement("section",null,xn.createElement(me.Z,{spinning:Ai},xn.createElement("div",{className:qt.box},xn.createElement("div",{className:qt.box_header},xn.createElement("div",{className:qt.header_title},"\u5B66\u4E60\u4E92\u52A8\u9875"),xn.createElement("i",{className:"iconfont icon-guanbi11",style:{fontSize:"13px",cursor:"pointer",marginLeft:"auto"},onClick:()=>{Ht.history.push(`/classrooms/${Zi==null?void 0:Zi.coursesId}/smart_plan`)}})),(Di==null?void 0:Di.count)==0&&!So&&xn.createElement(xn.Fragment,null,xn.createElement("div",{className:qt.box_miaoshu},"\u6559\u5E08\u53EF\u4E3A\u6BCF\u9875PPT\u7075\u6D3B\u6DFB\u52A0\u8BD5\u9898\uFF0C\u642D\u914D\u8C03\u67E5\u95EE\u5377\u4E0E\u4E92\u52A8\u8BA8\u8BBA\uFF0C\u5B9E\u65F6\u638C\u63E1\u5B66\u751F\u5B66\u4E60\u6548\u679C\uFF0C\u8BA9\u8BFE\u5802\u5185\u5BB9\u66F4\u4E30\u5BCC\u3001\u4E92\u52A8\u66F4\u7CBE\u5F69\uFF0C\u6559\u5B66\u6548\u679C\u4E8B\u534A\u529F\u500D\uFF01"),xn.createElement("div",{className:qt.question_button},xn.createElement(Tt.Z,{title:(De==null?void 0:De.status)=="ended"?"\u5F53\u524D\u8BFE\u4EF6\u5DF2\u7ED3\u675F\u6388\u8BFE\uFF0C\u4E0D\u53EF\u65B0\u589E\u8BD5\u9898":""},xn.createElement("div",{className:qt.select_question,style:{cursor:(De==null?void 0:De.status)!="ended"?"pointer":"no-drop"},onClick:()=>{(De==null?void 0:De.status)!="ended"&&qi(!0)}},xn.createElement("img",{src:xt(43301),style:{width:"30px",height:"30px"}}),xn.createElement("div",{className:qt.question_right},xn.createElement("div",{className:qt.question_right_title},"\u9898\u5E93\u9009\u9898"),xn.createElement("div",{className:qt.question_right_content},"\u4ECE\u5E73\u53F0\u8BD5\u9898\u5E93\u4E2D\u6309\u77E5\u8BC6\u70B9\u3001\u96BE\u5EA6\u7B49\u6761\u4EF6\u7CBE\u51C6\u7B5B\u9009\uFF0C\u5FEB\u901F\u6DFB\u52A0\u8BD5\u9898\u5230\u8BFE\u4EF6\u6D4B\u9A8C")))),xn.createElement(Tt.Z,{title:(De==null?void 0:De.status)=="ended"?"\u5F53\u524D\u8BFE\u4EF6\u5DF2\u7ED3\u675F\u6388\u8BFE\uFF0C\u4E0D\u53EF\u65B0\u589E\u8BD5\u9898":""},xn.createElement("div",{className:qt.select_question,style:{cursor:(De==null?void 0:De.status)!="ended"?"pointer":"no-drop"},onClick:()=>{(De==null?void 0:De.status)!="ended"&&(oi(!0),Eo("SELECT"),Qi.setFieldsValue({item_type:"SELECT",choices:Array.from({length:4},()=>({choice_text:"",is_answer:0}))}))}},xn.createElement("img",{src:xt(96542),style:{width:"30px",height:"30px"}}),xn.createElement("div",{className:qt.question_right},xn.createElement("div",{className:qt.question_right_title},"\u81EA\u4E3B\u5EFA\u9898"),xn.createElement("div",{className:qt.question_right_content},"\u6839\u636E\u6559\u5B66\u9700\u6C42\uFF0C\u81EA\u4E3B\u8BBE\u8BA1\u5355\u9009\u3001\u591A\u9009\u548C\u5224\u65AD\u9898\u7684\u9898\u76EE\u5185\u5BB9\u3001\u9009\u9879\u53CA\u7B54\u6848\uFF0C\u6EE1\u8DB3\u6559\u5B66\u9700\u6C42")))))),((Di==null?void 0:Di.count)>0||So)&&xn.createElement(Le.default,{form:Qi,className:qt.formWrap,layout:"vertical",colon:!1},xn.createElement(Le.default.Item,{name:"item_type",label:"\u9898\u578B"},xn.createElement(Be.default,{size:"large",onChange:Ki=>{switch(Qi.setFieldsValue({choices:[],name:"",is_answer:0,analysis:""}),Eo(Ki),Ki){case"SELECT":Qi.setFieldsValue({choices:Array.from({length:4},()=>({choice_text:"",is_answer:0}))});break;case"JUDGMENT":Qi.setFieldsValue({choices:[{choice_text:"\u6B63\u786E",is_answer:0},{choice_text:"\u9519\u8BEF",is_answer:0}]});break}},disabled:(($n=(Vn=Di==null?void 0:Di.item_banks)==null?void 0:Vn[0])==null?void 0:$n.status)=="ended"||((Un=(Xn=Di==null?void 0:Di.item_banks)==null?void 0:Xn[0])==null?void 0:Un.status)=="in_progress"||(De==null?void 0:De.status)=="ended"},xn.createElement(Be.default.Option,{value:"SELECT"},"\u9009\u62E9\u9898"),xn.createElement(Be.default.Option,{value:"JUDGMENT"},"\u5224\u65AD\u9898"))),yn=="SELECT"&&(((ki=(di=Di==null?void 0:Di.item_banks)==null?void 0:di[0])==null?void 0:ki.status)=="ended"||(De==null?void 0:De.status)=="ended"?xn.createElement(Ut,{form:Qi,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9009\u62E9\u9898\u9898\u5E72\u5185\u5BB9",titleKey:"name",choiceKey:"choices",analysisKey:"analysis",choiceOptionsPath:"choices",choiceTextKey:"choice_text",answerKey:"is_answer",allowChangeMode:!0}):xn.createElement(Wn,{form:Qi,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9009\u62E9\u9898\u9898\u5E72\u5185\u5BB9",titleKey:"name",choiceKey:"choices",analysisKey:"analysis",choiceOptionsPath:"choices",choiceTextKey:"choice_text",answerKey:"is_answer",allowChangeMode:!0})),yn=="JUDGMENT"&&(((hn=(Ti=Di==null?void 0:Di.item_banks)==null?void 0:Ti[0])==null?void 0:hn.status)=="ended"||(De==null?void 0:De.status)=="ended"?xn.createElement(Li,{form:Qi,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u5224\u65AD\u9898\u9898\u5E72\u5185\u5BB9",choiceKey:"choices"}):xn.createElement(li,{form:Qi,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u5224\u65AD\u9898\u9898\u5E72\u5185\u5BB9",choiceKey:"choices"})),(Di==null?void 0:Di.count)>0&&(((Wi=(Hi=Di==null?void 0:Di.item_banks)==null?void 0:Hi[0])==null?void 0:Wi.status)=="in_progress"||((nn=(Ri=Di==null?void 0:Di.item_banks)==null?void 0:Ri[0])==null?void 0:nn.status)=="ended")&&xn.createElement("div",{className:qt.staticWrap},xn.createElement("div",{className:qt.title},"\u7B54\u9898\u7EDF\u8BA1"),xn.createElement("div",{className:qt.subTitle},"\u7B54\u9898\u6982\u89C8"),xn.createElement(Ce.default,{pagination:!1,dataSource:(Wt==null?void 0:Wt.summary)||[],columns:[{title:"\u542C\u8BFE\u4EBA\u6570",align:"left",width:100,dataIndex:"class_num",ellipsis:!0,render:Ki=>xn.createElement("span",{style:{color:"#000"}},Ki||"0")},{title:"\u7B54\u9898\u4EBA\u6570",align:"left",width:110,dataIndex:"answerd_num",ellipsis:!0,render:Ki=>xn.createElement("span",{style:{color:"#000"}},Ki||"0")},{title:"\u7B54\u5BF9\u4EBA\u6570",align:"left",ellipsis:!0,width:130,dataIndex:"correctly_num",render:Ki=>xn.createElement("span",{style:{color:"#000"}},Ki||"0")},{title:"\u63D0\u4EA4\u7387",align:"left",width:120,dataIndex:"submitted_rate",ellipsis:!0,render:Ki=>xn.createElement("span",{style:{color:"#000"}},Ki||"0")},{title:"\u6B63\u786E\u7387",align:"right",dataIndex:"correct_rate",render:(Ki,Xi)=>xn.createElement("span",{style:{color:"#000"}},Ki||"0")}]}),xn.createElement("div",{className:qt.subTitle},"\u7B54\u9898\u8BE6\u60C5"),xn.createElement(Ce.default,{pagination:!1,dataSource:(Wt==null?void 0:Wt.details)||[],columns:[{title:"\u9009\u9879",align:"left",dataIndex:"choice_text",ellipsis:!0,render:(Ki,Xi,Mo)=>{var Ar,io;return xn.createElement("span",{style:{color:"#000"}},((io=(Ar=Di==null?void 0:Di.item_banks)==null?void 0:Ar[0])==null?void 0:io.item_type)=="JUDGMENT"?xn.createElement(st.Z,{className:"font14",value:Ki}):xn.createElement("span",{style:{display:"flex"}},ae[Mo],"\u3001",xn.createElement(st.Z,{className:"font14",value:Ki})))}},{title:"\u9009\u62E9\u4EBA\u6570",align:"left",width:110,dataIndex:"user_num",ellipsis:!0,render:Ki=>xn.createElement("span",{style:{color:"#000"}},Ki||"--")},{title:"\u4EBA\u6570\u6BD4\u4F8B",align:"right",ellipsis:!0,width:130,dataIndex:"rate",render:Ki=>xn.createElement("span",{style:{color:"#000"}},Ki||"--")}]})),(De==null?void 0:De.status)!="ended"&&xn.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:"20px",position:"sticky",bottom:0,background:"#FFF",paddingBottom:24}},((De==null?void 0:De.status)=="not_started"||((ui=(Rn=Di==null?void 0:Di.item_banks)==null?void 0:Rn[0])==null?void 0:ui.status)!="ended")&&xn.createElement("div",{className:qt.save_button,onClick:()=>Se(void 0,null,function*(){var Ki,Xi,Mo,Ar,io,_i;yield Qi.validateFields();let Gn="";Qi.getFieldValue("item_type")=="SELECT"?Qi.getFieldValue("choices").filter(Pr=>Pr.is_answer==1).length>1?Gn="MULTIPLE":Gn="SINGLE":Gn=Qi.getFieldValue("item_type");const Fi=vn(Ve({},Qi.getFieldsValue()),{item_type:Gn,position:be,smart_plan_id:Zi==null?void 0:Zi.id,difficulty:2}),$o=(Xi=(Ki=Di==null?void 0:Di.item_banks)==null?void 0:Ki[0])!=null&&Xi.smart_plan_item_bank_id?`/api/smart_plan_item_banks/${(Ar=(Mo=Di==null?void 0:Di.item_banks)==null?void 0:Mo[0])==null?void 0:Ar.smart_plan_item_bank_id}.json`:`/api/courses/${Zi==null?void 0:Zi.coursesId}/smart_plans/${Zi==null?void 0:Zi.id}/create_item_banks.json`;try{const Pr=yield(0,wi.ZP)($o,{method:(_i=(io=Di==null?void 0:Di.item_banks)==null?void 0:io[0])!=null&&_i.smart_plan_item_bank_id?"put":"post",body:Fi});(Pr==null?void 0:Pr.status)===0?(Vt.ZP.success("\u4FDD\u5B58\u6210\u529F"),(De==null?void 0:De.status)!=="in_progress"&&br(or=>or+1),eo(),oi(!1)):Vt.ZP.error("\u4FDD\u5B58\u5931\u8D25")}catch(Pr){Vt.ZP.error("\u8BF7\u6C42\u51FA\u9519")}})},"\u4FDD\u5B58"),(De==null?void 0:De.status)=="in_progress"&&((fi=(Si=Di==null?void 0:Di.item_banks)==null?void 0:Si[0])==null?void 0:fi.status)=="not_started"&&xn.createElement("div",{className:qt.start_button,onClick:()=>Se(void 0,null,function*(){var Ki,Xi;let Mo=yield(0,wi.ZP)(`/api/courses/${Zi==null?void 0:Zi.coursesId}/smart_plans/${Zi==null?void 0:Zi.id}/change_item_banks.json`,{method:"post",body:{smart_plan_item_bank_id:(Xi=(Ki=Di==null?void 0:Di.item_banks)==null?void 0:Ki[0])==null?void 0:Xi.smart_plan_item_bank_id}});(Mo==null?void 0:Mo.status)==0&&(Vt.ZP.success("\u5DF2\u542F\u52A8\u7B54\u9898"),eo(),Ro(Mo==null?void 0:Mo.data))})},xn.createElement("i",{className:"iconfont icon-qidongdati mr10 font14"}),"\u542F\u52A8\u7B54\u9898"),(De==null?void 0:De.status)=="in_progress"&&(($i=(Mi=Di==null?void 0:Di.item_banks)==null?void 0:Mi[0])==null?void 0:$i.status)=="in_progress"&&xn.createElement("div",{className:qt.submit_button,onClick:()=>Se(void 0,null,function*(){var Ki,Xi;let Mo=yield(0,wi.ZP)(`/api/courses/${Zi==null?void 0:Zi.coursesId}/smart_plans/${Zi==null?void 0:Zi.id}/change_item_banks.json`,{method:"post",body:{smart_plan_item_bank_id:(Xi=(Ki=Di==null?void 0:Di.item_banks)==null?void 0:Ki[0])==null?void 0:Xi.smart_plan_item_bank_id}});(Mo==null?void 0:Mo.status)==0&&(Vt.ZP.success("\u5DF2\u7ED3\u675F\u7B54\u9898"),eo(),Ro(Mo==null?void 0:Mo.data))})},xn.createElement("i",{className:"iconfont icon-jieshushouke mr10 font14"}),"\u7ED3\u675F\u7B54\u9898"))))),zi&&xn.createElement(Ee.Z,{ispptModal:!0,setScoreShow:qi,isshixuns:!1,ScoreShow:!!zi,isloadings:!1,onOk:Ki=>Se(void 0,null,function*(){if(!Ki.length){Vt.ZP.warning("\u8BF7\u9009\u62E9\u8BD5\u9898");return}let Xi=yield(0,wi.ZP)(`/api/courses/${Zi==null?void 0:Zi.coursesId}/smart_plans/${Zi==null?void 0:Zi.id}/add_item_banks.json`,{method:"post",body:{item_bank_ids:Ki,position:be,is_smart_plan:!0}});(Xi==null?void 0:Xi.status)==0&&(Vt.ZP.success("\u9009\u9898\u6210\u529F"),qi(!1),eo())})}),xn.createElement(Jt.default,{centered:!0,keyboard:!1,open:To,title:Di==null?void 0:Di.smart_plan_name,width:600,forceRender:!0,footer:null,onOk:()=>{Yi(!1)},onCancel:()=>{Yi(!1)}},xn.createElement("div",{className:qt.modal},"\u8BF7\u6253\u5F00\u624B\u673A\u626B\u7801\u529F\u80FD\uFF0C\u626B\u63CF\u5C4F\u5E55\u4E0A\u7684\u4E8C\u7EF4\u7801\uFF0C\u5373\u53EF\u8FDB\u5165\u8BFE\u4EF6\u9875\u9762\uFF0C\u5F00\u542F\u667A\u6167\u5B66\u4E60\u65B0\u4F53\u9A8C\uFF01"),xn.createElement("div",{className:qt.erweima},xn.createElement(ce.Z,{errorLevel:"H",value:`${location.origin}/miniprogram/courseware/study?course_id=${Zi==null?void 0:Zi.coursesId}&id=${Zi==null?void 0:Zi.id}`,bgColor:"#FFF",size:360,icon:`${tn.Z.IMG_SERVER}/${(Bi=At==null?void 0:At.setting)==null?void 0:Bi.tab_logo_url}`}))))};var pn=(0,Ht.connect)(({user:Ge,classroomList:fe,loading:At,globalSetting:Ae,problemset:on})=>({user:Ge,classroomList:fe,globalSetting:Ae,loading:At.effects,problemset:on}))(Je)},79285:function(Mn,Sn,xt){"use strict";xt.d(Sn,{Z:function(){return He}});var Ot=xt(59301),Ht=xt(78241),qt=xt(8591),Le=xt(43418),Vt=xt(99313),me=xt(57809),Tt=xt(19842),Be=xt(98228),Ce=xt(92832),Jt=xt(1710),ce=xt(6848),Ee=xt(58421),Ie=xt(3113),Nt=xt(99064),et={flex_box_center:"flex_box_center___kuaVT",flex_space_between:"flex_space_between___exKHH",flex_box_vertical_center:"flex_box_vertical_center___BzvkN",flex_box_center_end:"flex_box_center_end___Ss2DJ",flex_box_column:"flex_box_column___p1LEr",scoremodal:"scoremodal___upTFR",selectWrapper:"selectWrapper___HH3RX",selectWrappers:"selectWrappers___fUWwr",allqingchu:"allqingchu___BFF1D",title:"title___hFasb",score:"score___DXG3o",close:"close___kEIiB",content:"content___Mco8L",items:"items___j98jk",bottom:"bottom___A1n1C",yes:"yes___P1zzb",no:"no___xZqXd",titlecount:"titlecount___fqA9P",add:"add___MqV0R",search:"search___NREgv",searchIcon:"searchIcon___qny3A",tabWrap:"tabWrap___dR18c",previewModal:"previewModal___uSiGS",q_title:"q_title___a9NY9"},nt=xt(26422),ht={flex_box_center:"flex_box_center___nnwwA",flex_space_between:"flex_space_between___cRir9",flex_box_vertical_center:"flex_box_vertical_center___FqTZ8",flex_box_center_end:"flex_box_center_end___WU5_v",flex_box_column:"flex_box_column___QZFa1",warp:"warp___aLZwN",shixunbutton:"shixunbutton___Eoa1i",redio:"redio___LJ4js",redioitem:"redioitem___YicCC",redioitemyes:"redioitemyes___lX4Nr",title:"title___pi1jH",titleyes:"titleyes___jiEh7",yestag:"yestag___DLWoP",qcount:"qcount___U9kkL",score:"score___vLK4B",qtitle:"qtitle___kyg0t",checkbox:"checkbox___vjiBw",checkboxitem:"checkboxitem___HW3CP",checkboxitemyes:"checkboxitemyes___kpjek",bottom:"bottom___uG8Zq",bottomitem:"bottomitem___TnJQQ",left:"left___M8WXX",right:"right____dkCI",completion:"completion___H6RmA",content:"content___a2hGC",items:"items___D8mLd",simple:"simple___fQ0OS",shixun:"shixun___nB6Jk",combination:"combination___YrOdz",program:"program___lG0JA"},st=xt(85149),gt=xt(955),vt=xt(24334);const wt=["A\uFF0E","B\uFF0E","C\uFF0E","D\uFF0E","E\uFF0E","F\uFF0E","G\uFF0E","H\uFF0E","I\uFF0E","J\uFF0E","K\uFF0E","L\uFF0E","M\uFF0E","N\uFF0E","O\uFF0E","P\uFF0E","Q\uFF0E","R\uFF0E","S\uFF0E","T\uFF0E","U\uFF0E","V\uFF0E","W\uFF0E","X\uFF0E","Y\uFF0E","Z\uFF0E"];var It=({qitem:Fe})=>{var cn,Wn,fn,dn,de,mn,Tn,Qe,wn,Oe;return Ot.createElement("div",{className:ht.warp},Ot.createElement("div",{className:ht.mainPart},Ot.createElement("div",{className:ht.qcount},(Fe==null?void 0:Fe.question_type)===8&&Ot.createElement(st.Z,{className:ht.content,showProgramFill:!0,value:(cn=Fe==null?void 0:Fe.program_attr)==null?void 0:cn.description}),(Fe==null?void 0:Fe.question_type)!=8&&Ot.createElement(st.Z,{className:ht.qtitle,value:(Fe==null?void 0:Fe.name)||(Fe==null?void 0:Fe.title)})),((Fe==null?void 0:Fe.question_type)===0||(Fe==null?void 0:Fe.question_type)===2)&&Ot.createElement("div",null,(Wn=Fe==null?void 0:Fe.choices)==null?void 0:Wn.map((we,ne)=>Ot.createElement("div",{className:ht.redio},!(we!=null&&we.is_answer)&&Ot.createElement("span",{className:ht.redioitem}),(we==null?void 0:we.is_answer)&&Ot.createElement("i",{className:`${ht.redioitemyes} icon-duigou1`}),Ot.createElement(st.Z,{className:we!=null&&we.is_answer?ht.titleyes:ht.title,value:wt[ne]+(we==null?void 0:we.choice_text)}),(we==null?void 0:we.is_answer)&&Ot.createElement("div",{className:ht.yestag},"\u6B63\u786E\u7B54\u6848")))),(Fe==null?void 0:Fe.question_type)===1&&Ot.createElement("div",null,(fn=Fe==null?void 0:Fe.choices)==null?void 0:fn.map((we,ne)=>Ot.createElement("div",{className:ht.checkbox},!(we!=null&&we.is_answer)&&Ot.createElement("span",{className:ht.checkboxitem}),(we==null?void 0:we.is_answer)&&Ot.createElement("i",{className:`${ht.checkboxitemyes} icon-duigou1`}),Ot.createElement(st.Z,{className:we!=null&&we.is_answer?ht.titleyes:ht.title,value:wt[ne]+(we==null?void 0:we.choice_text)}),(we==null?void 0:we.is_answer)&&Ot.createElement("div",{className:ht.yestag},"\u6B63\u786E\u7B54\u6848")))),(Fe==null?void 0:Fe.question_type)===3&&Ot.createElement("div",{className:ht.completion},(dn=Fe==null?void 0:Fe.standard_answer)==null?void 0:dn.map((we,ne)=>{var Dt;return Ot.createElement("div",{style:{display:"flex"}},Ot.createElement("span",{className:ht.title},"\u586B\u7A7A\u9879",ne+1),Ot.createElement("div",{className:ht.content},(Dt=we==null?void 0:we.answer_text)==null?void 0:Dt.map((ge,xe)=>Ot.createElement("div",{className:ht.items},ge))))})),(Fe==null?void 0:Fe.question_type)===4&&Ot.createElement("div",{className:ht.simple},Ot.createElement("div",{className:ht.title},"\u53C2\u8003\u7B54\u6848"),Ot.createElement("div",{className:"mt10",style:{fontSize:"16px"}},(de=Fe==null?void 0:Fe.answer_texts)!=null&&de[0]?Ot.createElement(st.Z,{className:ht.content,value:(mn=Fe==null?void 0:Fe.answer_texts)==null?void 0:mn[0]}):Ot.createElement("div",{style:{color:"#C1C1C1"}},"\u6682\u672A\u8BBE\u7F6E~"))),(Fe==null?void 0:Fe.question_type)===5&&((Tn=Fe==null?void 0:Fe.challenge_names)==null?void 0:Tn.map((we,ne)=>Ot.createElement("div",{className:ht.shixun},Ot.createElement("span",{className:ht.qtitle},Ot.createElement("span",{style:{marginRight:10}},"\u7B2C",(0,gt.EM)(ne+1),"\u9898"),we)))),(Fe==null?void 0:Fe.question_type)===6&&Ot.createElement("div",{className:ht.program},Ot.createElement(st.Z,{className:ht.content,value:((Qe=Fe==null?void 0:Fe.program_attr)==null?void 0:Qe.description)||"- -"})),(Fe==null?void 0:Fe.question_type)===7&&((wn=Fe==null?void 0:Fe.sub_item_banks)==null?void 0:wn.map((we,ne)=>{var Dt,ge,xe,te,Ut;return Ot.createElement("div",null,Ot.createElement("div",{className:ht.combination},Ot.createElement("span",{className:ht.qtitle},we==null?void 0:we.name)),Ot.createElement("div",{className:ht.warp,style:{padding:"0px",paddingTop:20}},Ot.createElement("div",null,((we==null?void 0:we.item_type)=="SINGLE"||(we==null?void 0:we.item_type)=="JUDGMENT")&&((Dt=we==null?void 0:we.choices)==null?void 0:Dt.map((Lt,St)=>Ot.createElement("div",{className:ht.redio},!(Lt!=null&&Lt.is_answer)&&Ot.createElement("span",{className:ht.redioitem}),(Lt==null?void 0:Lt.is_answer)&&Ot.createElement("i",{className:`${ht.redioitemyes} icon-duigou1`}),Ot.createElement(st.Z,{className:Lt!=null&&Lt.is_answer?ht.titleyes:ht.title,value:wt[St]+(Lt==null?void 0:Lt.choice_text)}),(Lt==null?void 0:Lt.is_answer)&&Ot.createElement("div",{className:ht.yestag},"\u6B63\u786E\u7B54\u6848")))),(we==null?void 0:we.item_type)=="MULTIPLE"&&((ge=we==null?void 0:we.choices)==null?void 0:ge.map((Lt,St)=>Ot.createElement("div",{className:ht.checkbox},!(Lt!=null&&Lt.is_answer)&&Ot.createElement("span",{className:ht.checkboxitem}),(Lt==null?void 0:Lt.is_answer)&&Ot.createElement("i",{className:`${ht.checkboxitemyes} icon-duigou1`}),Ot.createElement(st.Z,{className:Lt!=null&&Lt.is_answer?ht.titleyes:ht.title,value:wt[St]+(Lt==null?void 0:Lt.choice_text)}),(Lt==null?void 0:Lt.is_answer)&&Ot.createElement("div",{className:ht.yestag},"\u6B63\u786E\u7B54\u6848")))),(we==null?void 0:we.item_type)=="COMPLETION"&&Ot.createElement("div",{className:ht.completion},(xe=we==null?void 0:we.standard_answer)==null?void 0:xe.map((Lt,St)=>{var mt;return Ot.createElement("div",{style:{display:"flex"}},Ot.createElement("span",{className:ht.title},"\u586B\u7A7A\u9879",St+1),Ot.createElement("div",{className:ht.content},(mt=Lt==null?void 0:Lt.answer_text)==null?void 0:mt.map((kt,jt)=>Ot.createElement("div",{className:ht.items},kt))))})),(we==null?void 0:we.item_type)=="SUBJECTIVE"&&Ot.createElement("div",{className:ht.simple},Ot.createElement("div",{className:ht.title},"\u53C2\u8003\u7B54\u6848"),Ot.createElement("div",{className:"mt10",style:{fontSize:"16px"}},(te=we==null?void 0:we.answer_texts)!=null&&te[0]?Ot.createElement(st.Z,{className:ht.content,value:(Ut=we==null?void 0:we.answer_texts)==null?void 0:Ut[0]}):Ot.createElement("div",{style:{color:"#C1C1C1"}},"\u6682\u672A\u8BBE\u7F6E~"))))))})),(Fe==null?void 0:Fe.question_type)===8&&Ot.createElement("div",null,Ot.createElement(st.Z,{disabledFill:!0,className:ht.content,showProgramFill:!0,value:vt.Base64.decode(((Oe=Fe==null?void 0:Fe.program_attr)==null?void 0:Oe.code)||"")})),(Fe==null?void 0:Fe.question_type)===5&&Ot.createElement("div",{style:{background:"#F6F7F9",padding:"0px 20px",height:46,lineHeight:"46px",marginTop:40,display:"flex",alignItems:"center"}},Ot.createElement("div",{style:{flex:1,alignItems:"center",display:"flex"}},Ot.createElement("div",{style:{marginRight:30}},Ot.createElement("span",{style:{marginRight:10}},"\u521B\u5EFA\u8005"),Ot.createElement("span",{style:{color:"#000000"}},(Fe==null?void 0:Fe.author_name)||"- -")),Ot.createElement("div",{style:{marginRight:30}},Ot.createElement("span",{style:{marginRight:10}},"\u6240\u5C5E\u5355\u4F4D"),Ot.createElement("span",{style:{color:"#000000"}},(Fe==null?void 0:Fe.author_school_name)||"- -")),Ot.createElement("div",{style:{marginRight:30}},Ot.createElement("span",{style:{marginRight:10}},"\u5B66\u4E60\u4EBA\u6570"),Ot.createElement("span",{style:{color:"#000000"}},(Fe==null?void 0:Fe.study_count)||"0"))),Ot.createElement("a",{className:ht.shixunbutton,href:`/shixuns/${Fe==null?void 0:Fe.identifier}/challenges?exercise=true`,target:"_blank"},Ot.createElement("i",{onClick:()=>{},style:{marginRight:20},className:"iconfont icon-shixunkecheng mr5 "}),"\u5B9E\u8BAD\u8BE6\u60C5"))),((Fe==null?void 0:Fe.question_type)<=4||[6,8].includes(Fe==null?void 0:Fe.question_type))&&Ot.createElement("div",{className:ht.bottom},Ot.createElement("div",{className:ht.bottomitem},Ot.createElement("span",{className:ht.left},"\u89E3\u6790"),Ot.createElement("span",{className:ht.right},Fe!=null&&Fe.analysis?Ot.createElement(st.Z,{value:Fe==null?void 0:Fe.analysis}):Ot.createElement("span",{style:{color:"#C1C1C1"}},"\u6682\u672A\u8BBE\u7F6E~"))),Ot.createElement("div",{className:ht.bottomitem},Ot.createElement("span",{className:ht.left},"\u96BE\u5EA6"),Ot.createElement("span",{className:ht.right},(Fe==null?void 0:Fe.difficulty)===1?"\u7B80\u5355":(Fe==null?void 0:Fe.difficulty)===2?"\u9002\u4E2D":"\u56F0\u96BE")),Ot.createElement("div",{className:ht.bottomitem},Ot.createElement("span",{className:ht.left},"\u77E5\u8BC6\u70B9"),Ot.createElement("span",{className:ht.right},Fe!=null&&Fe.tag_discipline?Fe==null?void 0:Fe.tag_discipline:Ot.createElement("span",{style:{color:"#C1C1C1"}},"\u6682\u672A\u8BBE\u7F6E~")))))},Rt=xt(86087),Kt=xt(84287),oe=xt(89070),ee=xt(61485),ve=xt(32570),_t=xt(16149),Ne=xt(59301),he=Object.defineProperty,Ze=Object.defineProperties,Ue=Object.getOwnPropertyDescriptors,Ye=Object.getOwnPropertySymbols,un=Object.prototype.hasOwnProperty,Ln=Object.prototype.propertyIsEnumerable,Pe=(Fe,cn,Wn)=>cn in Fe?he(Fe,cn,{enumerable:!0,configurable:!0,writable:!0,value:Wn}):Fe[cn]=Wn,Gt=(Fe,cn)=>{for(var Wn in cn||(cn={}))un.call(cn,Wn)&&Pe(Fe,Wn,cn[Wn]);if(Ye)for(var Wn of Ye(cn))Ln.call(cn,Wn)&&Pe(Fe,Wn,cn[Wn]);return Fe},qe=(Fe,cn)=>Ze(Fe,Ue(cn)),Bn=(Fe,cn,Wn)=>new Promise((fn,dn)=>{var de=Qe=>{try{Tn(Wn.next(Qe))}catch(wn){dn(wn)}},mn=Qe=>{try{Tn(Wn.throw(Qe))}catch(wn){dn(wn)}},Tn=Qe=>Qe.done?fn(Qe.value):Promise.resolve(Qe.value).then(de,mn);Tn((Wn=Wn.apply(Fe,cn)).next())});const zn=({setScoreShow:Fe,ScoreShow:cn,onOk:Wn,isshixuns:fn,isloadings:dn,dispatch:de,isIntelligentAssistant:mn=!1,ispptModal:Tn=!1,newExercisePaper:Qe,shixunsDetail:wn})=>{var Oe,we,ne;let[Dt,ge]=(0,Ot.useState)({type:"0",page:1,updated_at:"",quotes:"",item_type:null,per_page:10,courseid:"",tag_discipline_id:null,difficulty:null,keyword:null,bigmodel:mn,is_smart_plan:Tn,group_id:[]}),[xe,te]=(0,Ot.useState)([]),[Ut,Lt]=(0,Ot.useState)([]),[St,mt]=(0,Ot.useState)([]),[kt,jt]=(0,Ot.useState)([]);const[Et,le]=(0,Ot.useState)(!1),[We]=Ht.default.useForm(),[ln,en]=(0,Ot.useState)(),[Fn,ni]=(0,Ot.useState)(!1);let[_n,li]=(0,Ot.useState)(fn);const[si,Vi]=(0,Ot.useState)([]),[Ni,po]=(0,Ot.useState)(0),[Oo,Do]=(0,Ot.useState)(!0),[Lo,Vo]=(0,Ot.useState)([]),[Fo,no]=(0,Ot.useState)([]),Xo=[{name:"\u5168\u90E8",value:"",question_type:0},{name:"\u5355\u9009\u9898",value:"SINGLE",question_type:0},{name:"\u591A\u9009\u9898",value:"MULTIPLE",question_type:1},{name:"\u5224\u65AD\u9898",value:"JUDGMENT",question_type:2},{name:"\u586B\u7A7A\u9898",value:"COMPLETION",question_type:3},{name:"\u7B80\u7B54\u9898",value:"SUBJECTIVE",question_type:4},{name:"\u5B9E\u8BAD\u9898",value:"SHIXUN",question_type:5},{name:"\u7F16\u7A0B\u9898",value:"PROGRAM",question_type:6},{name:"\u7EC4\u5408\u9898",value:"COMBINATION",question_type:7},{name:"\u7A0B\u5E8F\u586B\u7A7A\u9898",value:"BPROGRAM",question_type:8}];let[In,Ct]=(0,Ot.useState)({gg:{type:"1",page:1,updated_at:"",quotes:"",item_type:null,courseid:"",per_page:10,tag_discipline_id:null,difficulty:null,keyword:null},ttgx:{type:"3",page:1,updated_at:"",quotes:"",item_type:null,per_page:10,courseid:"",tag_discipline_id:null,difficulty:null,keyword:null,group_id:[]},scj:{type:"2",page:1,updated_at:"",quotes:"",item_type:null,per_page:10,courseid:"",tag_discipline_id:null,difficulty:null,keyword:null},wcjd:{type:"0",page:1,updated_at:"",quotes:"",item_type:null,per_page:10,courseid:"",tag_discipline_id:null,difficulty:null,keyword:null,group_id:[]},yx:{type:"5",page:1,updated_at:"",quotes:"",item_type:null,per_page:10,courseid:"",tag_discipline_id:null,difficulty:null,keyword:null,group_id:null}});const Li=(0,Ot.useRef)(new Set),wi=(0,Ot.useRef)(new Set),tn=[{name:"\u7B80\u5355",value:1},{name:"\u9002\u4E2D",value:2},{name:"\u56F0\u96BE",value:3}],xn=[{name:"\u521D\u7EA7",value:1},{name:"\u4E2D\u7EA7",value:2},{name:"\u4E2D\u9AD8\u7EA7",value:3},{name:"\u9AD8\u7EA7",value:4}],Qn=[{name:"\u672A\u53D1\u5E03",value:"unpublish"},{name:"\u9759\u9ED8\u53D1\u5E03",value:"silent_publish"},{name:"\u516C\u5F00\u53D1\u5E03",value:"public_publish"}],[ai,ii]=(0,Ot.useState)(!1),gi=()=>{We.resetFields(),_n=!1,li(!1),ii(!1),We.submit()};(0,Ot.useEffect)(()=>{var fe,At,Ae,on,bn,be,De,On,Zn,Vn;(((Ae=(At=(fe=Qe==null?void 0:Qe.editData)==null?void 0:fe.exercise)==null?void 0:At.exist_item_bank_ids)==null?void 0:Ae.length)>0||((be=(bn=(on=Qe==null?void 0:Qe.editData)==null?void 0:on.exercise)==null?void 0:bn.exist_item_bank_shixun_ids)==null?void 0:be.length)>0)&&no([...(On=(De=Qe==null?void 0:Qe.editData)==null?void 0:De.exercise)==null?void 0:On.exist_item_bank_ids,...(Vn=(Zn=Qe==null?void 0:Qe.editData)==null?void 0:Zn.exercise)==null?void 0:Vn.exist_item_bank_shixun_ids])},[(we=(Oe=Qe==null?void 0:Qe.editData)==null?void 0:Oe.exercise)==null?void 0:we.exist_item_bank_ids]),(0,Ot.useEffect)(()=>{cn&&(We.setFieldsValue({item_type:"",courseid:"",tag_discipline_id:null,difficulty:null,keyword:null}),Oo&&_n&&(We.setFieldsValue({item_type:"SHIXUN"}),Dt.item_type="SHIXUN",ge(Gt({},Dt)),Do(!1)),Re(Dt),je(),Zt({group_id:0,page:1,per_page:20,sort_by:"updated_at",sort_direction:"desc",type:"0"}))},[cn]),(0,Ot.useEffect)(()=>{Ni>0&&setTimeout(()=>{po(0)},2e3)},[Ni]);function Re(fe){return Bn(this,null,function*(){var At,Ae,on;if(le(!0),ge(Gt({},fe)),(St==null?void 0:St.length)<=0&&fe.type==="5"){jt([]),le(!1);return}console.log("----",St,si);let bn=fe.type==="5"?St==null?void 0:St.filter(On=>!si.includes(On)):null,be=fe.type==="5"?St==null?void 0:St.filter(On=>si.includes(On)):null,De=yield(0,Nt.ZP)("/api/item_banks.json",{method:"get",params:qe(Gt({},fe),{discipline_id:((At=fe==null?void 0:fe.courseid)==null?void 0:At[0])||null,sub_discipline_id:((Ae=fe==null?void 0:fe.courseid)==null?void 0:Ae[1])||null,ids:bn,shixun_ids:be,include_shixuns:!mn,group_id:((on=fe.group_id)==null?void 0:on.map(On=>On==null?void 0:On.value))||null,keyword:fe.keyword?encodeURIComponent(fe.keyword):fe.keyword,type:fe.type==="5"?null:fe.type,clazz:fe.type==="3"?"ItemBanksGroup":null,bigmodel:mn,is_smart_plan:Tn})});jt(De),le(!1)})}function je(){return Bn(this,null,function*(){let fe=yield(0,Nt.ZP)("/api/disciplines.json",{method:"get",params:{source:"question",group_id:0,group_type:Dt.type==="5"?null:Dt.type,clazz:"ItemBanksGroup"}});te((0,nt.L)(fe==null?void 0:fe.disciplines))})}function Zt(fe){return Bn(this,null,function*(){var At;let Ae=yield(0,Nt.ZP)("/api/item_banks_groups/for_problemset.json",{method:"post",body:fe}),on=[{title:"\u6839\u76EE\u5F55",id:0,pid:0,value:0,key:0,isLeaf:!1,children:(At=Ae==null?void 0:Ae.data)==null?void 0:At.map(bn=>({title:bn.name,id:bn.id,pid:bn.id,value:bn.id,key:bn.id,isLeaf:!bn.have_child}))}];Vo(on)})}function Ve(fe){return Bn(this,null,function*(){var At,Ae,on,bn;le(!0);let be=(At=fe.list)==null?void 0:At.filter(Zn=>!si.includes(Zn)),De=(Ae=fe.list)==null?void 0:Ae.filter(Zn=>si.includes(Zn));if(be.length===0&&De.length===0){le(!1),jt([]);return}let On=yield(0,Nt.ZP)("/api/item_banks.json",{method:"get",params:qe(Gt({},fe),{discipline_id:((on=fe==null?void 0:fe.courseid)==null?void 0:on[0])||null,sub_discipline_id:((bn=fe==null?void 0:fe.courseid)==null?void 0:bn[1])||null,ids:be,shixun_ids:De,type:fe.type==="5"?null:fe.type,clazz:fe.type==="3"?"ItemBanksGroup":null})});le(!1),jt(On)})}const vn=fe=>Bn(void 0,null,function*(){const At=yield de({type:"shixunsDetail/release",payload:{id:fe}});let Ae=At==null?void 0:At.tag_position,on=(At==null?void 0:At.evaluation_set_position)||[],bn=At.status;return bn===0?(qt.ZP.success("\u53D1\u5E03\u6210\u529F"),Re(Dt),!0):(bn===2?qt.ZP.error(`\u7B2C${on.join(",")}\u5173\u5C1A\u672A\u5B8C\u6210\uFF0C\u65E0\u6CD5\u7533\u8BF7\u53D1\u5E03`):bn===3?qt.ZP.error(`\u6BCF\u4E00\u4E2A\u5173\u5361\u81F3\u5C11\u9700\u8981\u4E00\u4E2A\u6280\u80FD\u6807\u7B7E, \u7B2C${Ae.join(",")}\u5173\u5C1A\u672A\u8BBE\u7F6E\u6280\u80FD\u6807\u7B7E\uFF0C\u8BF7\u8865\u5145`):qt.ZP.error("\u5C1A\u672A\u521B\u5EFA\u4EFB\u52A1\u7684\u5B9E\u8BAD\uFF0C\u4E0D\u80FD\u7533\u8BF7\u53D1\u5E03"),!1)}),Se=fe=>(fe==null?void 0:fe.shixun_tag_num)===1?"\u672A\u53D1\u5E03\u7684\u5B9E\u8DF5\u9879\u76EE\u4E0D\u80FD\u88AB\u9009\u7528\uFF0C\u8BF7\u5148\u8FDB\u884C\u53D1\u5E03":"",ae=(fe,At,Ae)=>fe.map(on=>on.key===At?Gt(Gt({},on),Ae):on.children?qe(Gt({},on),{children:ae(on.children,At,Ae)}):on),Je=fe=>Bn(void 0,null,function*(){const{key:At}=fe;let Ae=Dt.type;const on=yield(0,_t.ex)({page:1,per_page:20,sort_by:"updated_at",sort_direction:"desc",group_id:Math.abs(At),type:Ae}),{data:bn,total_count:be}=on||{};be>0&&Vo(De=>ae(De,At,{children:bn.map(On=>({title:On.name,id:On.id,pid:On.id,value:On.id,key:On.id,isLeaf:!On.have_child}))}))});function pn(fe){console.log("----",Dt),fe==="1"&&(In.gg=Gt({},Dt)),fe==="2"&&(In.scj=Gt({},Dt)),fe==="3"&&(In.ttgx=Gt({},Dt)),fe==="0"&&(In.wcjd=Gt({},Dt)),fe==="5"&&(In.yx=Gt({},Dt)),Ct(Gt({},In))}function Ge(){Dt.type==="1"&&(Dt=In.gg),Dt.type==="2"&&(Dt=In.scj),Dt.type==="3"&&(Dt=In.ttgx),Dt.type==="0"&&(Dt=In.wcjd),Dt.type==="5"&&(Dt=In.yx),(Dt==null?void 0:Dt.item_type)==="SHIXUN"?(_n=!0,li(!0)):(_n=!1,li(!1)),We.setFieldsValue(Gt({},Dt)),ge(Gt({},Dt)),Re(Gt({},Dt))}return Ne.createElement("div",null,Ne.createElement(Le.default,{title:!1,footer:!1,open:cn,width:1200,centered:!0,className:et.scoremodal,onCancel:()=>{Fe(!1)}},Ne.createElement("div",{style:{display:"flex",alignItems:"center"}},Ne.createElement("div",{className:et.title},mn?"\u4EE5\u9898\u6362\u9898":"\u9898\u5E93\u9009\u9898")),mn&&Ne.createElement("div",{style:{padding:10,background:"#F6F7F9",borderRadius:4,marginTop:14}},"\u6839\u636E\u73B0\u6709\u8BD5\u9898\u7684\u9898\u578B\u3001\u65B9\u5411\u3001\u77E5\u8BC6\u70B9\u3001\u96BE\u6613\u5EA6\uFF0C\u5FEB\u901F\u751F\u6210\u65B0\u7684\u8BD5\u9898\uFF0C\u589E\u52A0\u8BD5\u9898\u7684\u4E30\u5BCC\u5EA6"),Ne.createElement(Vt.default,{className:et.tabWrap,activeKey:Dt.type,onChange:fe=>{fe==="3"?(Dt.show_all_share=!0,Zt({group_id:0,page:1,per_page:20,sort_by:"updated_at",sort_direction:"desc",type:"3"})):Dt.show_all_share=null,fe==="0"&&Zt({group_id:0,page:1,per_page:20,sort_by:"updated_at",sort_direction:"desc",type:"0"}),pn(Dt.type),Dt.type=fe,(Dt==null?void 0:Dt.item_type)==="SHIXUN"&&Dt.type!=="5"&&(_n=!0,li(!0)),ii(!1),Dt.type==="5"&&(_n=!1,li(!1)),Ge(),je()},items:[{label:"\u516C\u5171",key:"1"},{label:"\u56E2\u961F\u5171\u4EAB",key:"3"},{label:"\u6536\u85CF\u5939",key:"2"},{label:"\u6211\u521B\u5EFA\u7684",key:"0"},{label:Ne.createElement("div",null,"\u5DF2\u9009",St.length>0&&Ne.createElement("span",{className:et.titlecount},St.length),Ni>0&&Ne.createElement("span",{className:et.add},"+",Ni)),key:"5"}]}),Ne.createElement(Ht.default,{layout:"inline",form:We,onValuesChange:(fe,At)=>{const Ae=Object.values(At).some(bn=>bn!==null&&bn!==""&&bn!==void 0),on=At.keyword==="";if(ii(Ae||!on),Dt.page=1,(At==null?void 0:At.item_type)==="SHIXUN"){if(Dt.type==="5"?li(!1):li(!0),fe.keyword||fe.keyword==="")return;We.submit()}else{if(fe!=null&&fe.courseid&&We.setFieldsValue({tag_discipline_id:""}),li(!1),fe.keyword||fe.keyword==="")return;We.submit()}},onFinish:fe=>{var At;Dt.type==="3"&&(!fe.group_id||((At=fe==null?void 0:fe.group_id)==null?void 0:At.length)===0)?Dt.show_all_share=!0:Dt.show_all_share=null,ge(Gt(Gt({},Dt),fe)),Re(Gt(Gt({},Dt),fe))}},Ne.createElement(Ht.default.Item,{name:"item_type"},Ne.createElement(me.default,{className:et.selectWrapper,placeholder:"\u9898\u578B",style:{width:110},size:"middle"},(mn?Xo.slice(0,6):Tn?Xo.slice(0,4):Xo).map(fe=>Ne.createElement(me.default.Option,{key:fe.value},fe.name)))),Ne.createElement(Ht.default.Item,{name:"courseid"},Ne.createElement(Tt.Z,{className:et.selectWrapper,style:{width:160},size:"middle",placeholder:"\u65B9\u5411&\u8BFE\u7A0B",options:xe})),!_n&&Ne.createElement(Ht.default.Item,{name:"tag_discipline_id"},Ne.createElement(me.default,{className:et.selectWrapper,placeholder:"\u77E5\u8BC6\u70B9",style:{width:160},size:"middle",allowClear:!0},(ne=kt==null?void 0:kt.tag_disciplines)==null?void 0:ne.map(fe=>Ne.createElement(me.default.Option,{key:fe.id},fe.name)))),Ne.createElement(Ht.default.Item,{name:_n?"diff":"difficulty"},Ne.createElement(me.default,{className:et.selectWrapper,placeholder:"\u96BE\u5EA6",style:{width:118},size:"middle",allowClear:!0},!_n&&tn.map(fe=>Ne.createElement(me.default.Option,{key:fe.value},fe.name)),_n&&xn.map(fe=>Ne.createElement(me.default.Option,{key:fe.value},fe.name)))),_n&&Ne.createElement(Ht.default.Item,{name:"shixun_publish_status"},Ne.createElement(me.default,{className:et.selectWrapper,placeholder:"\u5168\u90E8\u72B6\u6001",style:{width:118},size:"middle",allowClear:!0},Qn.map(fe=>Ne.createElement(me.default.Option,{key:fe.value},fe.name)))),(Dt.type==="3"||Dt.type==="0")&&!_n&&Ne.createElement(Ht.default.Item,{name:"group_id"},Ne.createElement(Be.default,{treeDataSimpleMode:!0,style:{width:118},className:et.selectWrappers,multiple:!0,allowClear:!0,showSearch:!0,filterTreeNode:(fe,At)=>At.title.toUpperCase().indexOf(fe.toUpperCase())!==-1,dropdownStyle:{maxHeight:400,width:500,overflow:"auto"},placeholder:"\u8BF7\u9009\u62E9\u6587\u4EF6\u5939",treeCheckStrictly:!0,loadData:Je,treeDefaultExpandedKeys:[0],maxTagCount:0,treeCheckable:!0,treeData:Lo})),ai&&Ne.createElement("span",{className:et.allqingchu,onClick:gi},Ne.createElement("i",{className:"iconfont icon-guanbi4"}),Ne.createElement("span",null,"\u6E05\u9664\u7B5B\u9009\u6761\u4EF6")),Ne.createElement(Ht.default.Item,{style:{flex:"0 0 auto",marginRight:0,marginLeft:"auto"},name:"keyword"},Ne.createElement(Ce.default.Search,{className:et.search,placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22",allowClear:!0,suffix:Ne.createElement("i",{className:`iconfont icon-sousuo9 font14 ${et.searchIcon}`,onClick:()=>We.submit()}),onSearch:fe=>{We.submit()}}))),Ne.createElement("div",{style:{background:"#F6F7F9",display:"flex",alignItems:"center",marginTop:18,height:40,paddingLeft:10,paddingRight:20}},Ne.createElement("div",{onClick:()=>{Dt.updated_at==="asc"?Dt.updated_at="desc":Dt.updated_at="asc",ge(qe(Gt({},Dt),{page:1})),Re(qe(Gt({},Dt),{page:1}))}}," ",Dt.updated_at?Ne.createElement("img",{src:Dt.updated_at==="asc"?Rt.Z:Kt.Z,style:{width:"15px",verticalAlign:"text-bottom"},className:"font14 mr5 c-light-primary"}):Ne.createElement("i",{style:{fontSize:"14px"},className:"iconfont icon-jiangxu mr5 c-light-primary"}),"\u6309\u66F4\u65B0\u65F6\u95F4\u6392\u5E8F"),Ne.createElement("div",{onClick:()=>{Dt.quotes==="asc"?Dt.quotes="desc":Dt.quotes="asc",ge(qe(Gt({},Dt),{page:1})),Re(qe(Gt({},Dt),{page:1}))},style:{marginLeft:20}}," ",Dt.quotes?Ne.createElement("img",{src:Dt.quotes==="asc"?Rt.Z:Kt.Z,style:{width:"15px",verticalAlign:"text-bottom"},className:"font14 mr5 c-light-primary"}):Ne.createElement("i",{style:{fontSize:"14px"},className:"iconfont icon-jiangxu mr5 c-light-primary"}),"\u6309\u4F7F\u7528\u6B21\u6570\u6392\u5E8F")),Ne.createElement(Jt.default,{style:{marginTop:2,marginBottom:20},scroll:{y:260},dataSource:(kt==null?void 0:kt.items)||(kt==null?void 0:kt.shixun_list),pagination:!1,loading:Et,rowKey:fe=>fe.id,rowSelection:{type:mn||Tn?"radio":"checkbox",selectedRowKeys:Ut,getCheckboxProps:fe=>({disabled:fe.shixun_tag_num===1||(Fo==null?void 0:Fo.find(At=>fe.id===At))}),onSelect(fe,At,Ae){if(mn||Tn){Lt([fe.id]),wi.current=new Set([fe.id]),po(1),mt([fe.id]);return}if(At)_n&&Vi([...si,fe.id]),Lt([...Ut,fe.id]),fe.identifier?Li.current.add(fe.id):wi.current.add(fe.id),po(1),mt([...St,fe.id]);else{fe.identifier?Li.current.delete(fe.id):wi.current.delete(fe.id);let on=St.filter(bn=>bn!==fe.id);if(Lt(on),mt(on),_n){let bn=si.filter(be=>be!==fe.id);Vi([...bn])}if(Dt.type==="5"){Ve(qe(Gt({},Dt),{list:[...on]}));return}}},onSelectAll(fe,At,Ae){if(fe){const on=Ae.map(bn=>bn.id);_n&&Vi([...si,...on]),Lt([...Ut,...on]),mt([...St,...on]);for(const bn of Ae)bn.identifier?Li.current.add(bn.id):wi.current.add(bn.id)}else{const on=Ae.map(be=>be.id),bn=Ut.filter(be=>!on.some(De=>De===be));if(Lt([...bn]),mt([...bn]),_n){let be=si.filter(De=>!on.some(On=>On===De.id));Vi([...be])}Dt.type==="5"&&Ve(qe(Gt({},Dt),{list:[...bn]}));for(const be of on)be.identifier?Li.current.delete(be):wi.current.delete(be)}}},columns:[{title:"\u9898\u578B",dataIndex:"item_type",key:"item_type",render:(fe,At,Ae)=>{var on,bn;return Ne.createElement(ce.Z,{title:Se(At)},Ne.createElement("div",null,_n||At!=null&&At.challenge_names?"\u5B9E\u8BAD\u9898":(bn=(on=Xo==null?void 0:Xo.filter(be=>be.value===fe))==null?void 0:on[0])==null?void 0:bn.name))}},{title:"\u8BD5\u9898\u540D\u79F0",dataIndex:"name",width:_n?"30%":"60%",key:"name",render:(fe,At,Ae)=>{var on;return Ne.createElement("div",{style:{display:"flex",alignItems:"center"}},Ne.createElement(ce.Z,{title:Se(At)},Ne.createElement("div",{className:At!=null&&At.high_resources_consume?et.q_title:""},Ne.createElement(st.Z,{key:1,showLines:1,showTextOnly:!0,value:_n||At!=null&&At.challenge_names?At!=null&&At.title||fe===null?"--":fe:(At==null?void 0:At.item_type)=="BPROGRAM"?(on=At==null?void 0:At.program_attr)==null?void 0:on.description:fe}))),(At==null?void 0:At.high_resources_consume)&&Ne.createElement(ve.Z,{type:"shixun",style:{marginLeft:10}}))}},{title:"\u521B\u5EFA\u8005",dataIndex:"author_name",key:"author_name",hidden:!_n,render:(fe,At,Ae)=>{var on;return Ne.createElement(ce.Z,{title:Se(At)},Ne.createElement("span",null,fe?(on=fe==null?void 0:fe.split("\u3001"))==null?void 0:on[0]:"- -"))}},{title:"\u6240\u5C5E\u5355\u4F4D",dataIndex:"author_school_name",key:"author_school_name",hidden:!_n,render:(fe,At,Ae)=>Ne.createElement(ce.Z,{title:Se(At)},Ne.createElement("span",null,fe||"- -"))},{title:"\u96BE\u5EA6",dataIndex:"difficulty",key:"difficulty",render:(fe,At,Ae)=>{var on,bn,be,De;return Ne.createElement(ce.Z,{title:Se(At)},Ne.createElement("div",null,_n||At!=null&&At.challenge_names?(At==null?void 0:At.level)||((bn=(on=tn==null?void 0:tn.filter(On=>On.value===fe))==null?void 0:on[0])==null?void 0:bn.name):(De=(be=tn==null?void 0:tn.filter(On=>On.value===fe))==null?void 0:be[0])==null?void 0:De.name))}},{title:"\u5173\u5361\u6570\u91CF",dataIndex:"challenges_count",key:"challenges_count",hidden:!_n,render:(fe,At,Ae)=>Ne.createElement(ce.Z,{title:Se(At)},Ne.createElement("div",null,fe||"- -"))},{title:"\u4F7F\u7528\u6B21\u6570",dataIndex:"quotes",key:"quotes",render:(fe,At,Ae)=>Ne.createElement(ce.Z,{title:Se(At)},Ne.createElement("div",null,_n||At!=null&&At.challenge_names?(At==null?void 0:At.study_count)||(At==null?void 0:At.stu_num):fe))},{title:Ne.createElement("span",null,"\u53D1\u5E03\u72B6\u6001 ",Ne.createElement(ce.Z,{title:"\u672A\u53D1\u5E03\u7684\u5B9E\u8DF5\u9879\u76EE\u4E0D\u80FD\u88AB\u9009\u7528"},Ne.createElement(ee.Z,null))),dataIndex:"shixun_tag_num_name",key:"shixun_tag_num_name",hidden:!_n,render:(fe,At,Ae)=>Ne.createElement(ce.Z,{title:Se(At)},Ne.createElement("div",null,fe||"- -"))},{title:"\u64CD\u4F5C",dataIndex:"id",key:"item_type",render:(fe,At,Ae)=>Ne.createElement(ce.Z,{title:Se(At)},Ne.createElement("div",{style:{flex:1,textAlign:"start"}},Ne.createElement("a",{onClick:()=>{var on,bn;en(qe(Gt({},At),{question_type:_n||At!=null&&At.challenge_names?5:(bn=(on=Xo==null?void 0:Xo.filter(be=>be.value===(At==null?void 0:At.item_type)))==null?void 0:on[0])==null?void 0:bn.question_type})),ni(!0)}},"\u67E5\u770B"),(At==null?void 0:At.shixun_tag_num)===1&&Ne.createElement("a",{style:{marginLeft:10},onClick:()=>{Le.default.confirm({title:"\u63D0\u793A",icon:null,centered:!0,width:400,content:Ne.createElement("div",null,"\u662F\u5426\u786E\u5B9A\u53D1\u5E03",Ne.createElement("span",{style:{cursor:"pointer",color:"#3061D0"},onClick:()=>{window.open(`/shixuns/${At==null?void 0:At.identifier}/challenges`)}},(At==null?void 0:At.shixun_name)||"--"),"\uFF1F"),onOk:()=>Bn(void 0,null,function*(){if(!vn(At==null?void 0:At.identifier))return new Promise((on,bn)=>{bn()})})})}},"\u53D1\u5E03")))}].filter(fe=>!fe.hidden)}),Ne.createElement(Ee.Z,{current:Dt.page,total:(kt==null?void 0:kt.items_count)||(kt==null?void 0:kt.shixuns_count),style:{marginBottom:20},defaultPageSize:Dt.per_page,showTotal:fe=>Ne.createElement("span",null,"\u5171\xA0",Ne.createElement("span",{style:{color:"#165DFF"}},fe),"\xA0\u6761\u6570\u636E"),pageSize:Dt.per_page,onChange:(fe,At)=>{Dt.page=fe,Dt.per_page=At,ge(Gt({},Dt)),Re(Gt({},Dt))}}),Ne.createElement("div",{className:et.bottom},Ne.createElement(Ie.ZP,{className:et.no,onClick:()=>{Fe(!1)}},"\u53D6\u6D88"),Ne.createElement(Ie.ZP,{loading:dn,style:{width:dn&&75},className:et.yes,onClick:()=>Bn(void 0,null,function*(){if((St==null?void 0:St.length)<=0){qt.ZP.info(mn||Tn?"\u8BF7\u9009\u62E9\u4E00\u9053\u8BD5\u9898":"\u5F53\u524D\u6682\u672A\u9009\u62E9\u6570\u636E");return}Wn([...wi.current],[...Li.current],!0,St==null?void 0:St.length)})},mn?"\u5F00\u59CB\u6362\u9898":"\u786E\u8BA4"))),Ne.createElement(Le.default,{open:Fn,title:"\u9898\u76EE\u8BE6\u60C5",footer:!1,className:et.previewModal,width:1e3,centered:!0,onCancel:()=>{ni(!1)},onOk:()=>{ni(!1)}},Ne.createElement(It,{qitem:ln})))};var He=(0,oe.connect)(({shixunsDetail:Fe,newExercisePaper:cn})=>({shixunsDetail:Fe,newExercisePaper:cn}))(zn)},24768:function(Mn,Sn,xt){"use strict";xt.d(Sn,{AL:function(){return wt},Iy:function(){return ce},Qv:function(){return Nt},ez:function(){return vt},jb:function(){return Ee}});var Ot=xt(32834),Ht=xt.n(Ot),qt=xt(11690),Le=xt.n(qt);let Vt=1;function me(oe,ee){const ve=oe.match(/^(\s+)(?:```)/);if(ve===null)return ee;const _t=ve[1];return ee.split(` -`).map(Ne=>{const he=Ne.match(/^\s+/);if(he===null)return Ne;const[Ze]=he;return Ze.length>=_t.length?Ne.slice(_t.length):Ne}).join(` -`)}let Tt=[],Be=["