@nuxt/devtools 0.2.5 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/README.md +3 -3
  2. package/dist/chunks/module-main.mjs +692 -258
  3. package/dist/chunks/plugin-metrics.mjs +56 -0
  4. package/dist/chunks/vite-inspect.mjs +12 -13
  5. package/dist/chunks/vscode.mjs +44 -26
  6. package/dist/chunks/vue-inspector.mjs +2 -2
  7. package/dist/cli.mjs +5 -4
  8. package/dist/client/200.html +2 -2
  9. package/dist/client/404.html +2 -2
  10. package/dist/client/__inspecting/index.html +2 -2
  11. package/dist/client/_nuxt/Badge.ec308af3.js +1 -0
  12. package/dist/client/_nuxt/DrawerRight.vue.a85afa62.js +1 -0
  13. package/dist/client/_nuxt/DurationDisplay.vue.9b5b62d4.js +1 -0
  14. package/dist/client/_nuxt/FilepathItem.vue.178a1de3.js +1 -0
  15. package/dist/client/_nuxt/LaunchPage.vue.a0bbd67e.js +1 -0
  16. package/dist/client/_nuxt/NCheckbox.vue.4a02f339.js +1 -0
  17. package/dist/client/_nuxt/NCodeBlock.vue.593cb41f.js +1 -0
  18. package/dist/client/_nuxt/NIconButton.vue.a83f99ea.js +1 -0
  19. package/dist/client/_nuxt/NIconTitle.vue.ce90e41b.js +1 -0
  20. package/dist/client/_nuxt/NMarkdown.vue.11f68fad.js +1 -0
  21. package/dist/client/_nuxt/NSectionBlock.c955e75e.js +1 -0
  22. package/dist/client/_nuxt/NSelect.vue.e19311d6.js +1 -0
  23. package/dist/client/_nuxt/NSwitch.vue.76c93e66.js +1 -0
  24. package/dist/client/_nuxt/NTextInput.vue.d770ca6c.js +1 -0
  25. package/dist/client/_nuxt/NTip.vue.ac67cde4.js +1 -0
  26. package/dist/client/_nuxt/NpmVersionCheck.vue.0eab98c7.js +1 -0
  27. package/dist/client/_nuxt/{NuxtLogo.8111403f.js → NuxtLogo.38adb408.js} +1 -1
  28. package/dist/client/_nuxt/{PanelLeftRight.vue.56b5906c.js → PanelLeftRight.vue.90cdedcf.js} +1 -1
  29. package/dist/client/_nuxt/StateEditor.vue.c57dfe46.js +1 -0
  30. package/dist/client/_nuxt/{TabIcon.vue.30ae65eb.js → TabIcon.vue.8236980c.js} +1 -1
  31. package/dist/client/_nuxt/{__inspecting.8819ade8.js → __inspecting.143a746c.js} +1 -1
  32. package/dist/client/_nuxt/assets.d6a1ab2b.js +16 -0
  33. package/dist/client/_nuxt/components.1b7f02b2.js +1 -0
  34. package/dist/client/_nuxt/context.fe69916a.js +1 -0
  35. package/dist/client/_nuxt/custom-_name_.02ebd30e.js +1 -0
  36. package/dist/client/_nuxt/default.e6b60844.js +1 -0
  37. package/dist/client/_nuxt/editor.e10c09a2.js +1 -0
  38. package/dist/client/_nuxt/entry.216b69f8.js +259 -0
  39. package/dist/client/_nuxt/entry.654353dc.css +32 -0
  40. package/dist/client/_nuxt/error-404.51bdc645.js +1 -0
  41. package/dist/client/_nuxt/{error-500.8f6cefc5.js → error-500.15ac1dfe.js} +1 -1
  42. package/dist/client/_nuxt/error-component.0a7a48e4.js +3 -0
  43. package/dist/client/_nuxt/hooks.aa487478.js +1 -0
  44. package/dist/client/_nuxt/icons.43eaabec.js +1 -0
  45. package/dist/client/_nuxt/imports.01c0f8be.js +1 -0
  46. package/dist/client/_nuxt/{index.a6656ecb.js → index.3b3b7aca.js} +5 -5
  47. package/dist/client/_nuxt/index.517491fb.js +1 -0
  48. package/dist/client/_nuxt/index.c769634a.js +3 -0
  49. package/dist/client/_nuxt/layouts.e447e192.js +1 -0
  50. package/dist/client/_nuxt/middleware.e73473f1.js +1 -0
  51. package/dist/client/_nuxt/modules.304ea21e.js +1 -0
  52. package/dist/client/_nuxt/{none.394b52e6.js → none.3e2499ec.js} +1 -1
  53. package/dist/client/_nuxt/overview.b79bf694.js +1 -0
  54. package/dist/client/_nuxt/pages.fafa9fe0.js +1 -0
  55. package/dist/client/_nuxt/payload.ee430f3a.js +1 -0
  56. package/dist/client/_nuxt/plugins.5095ec46.js +1 -0
  57. package/dist/client/_nuxt/runtime-configs.b20fbeb6.js +1 -0
  58. package/dist/client/_nuxt/server-routes.7352d340.js +1 -0
  59. package/dist/client/_nuxt/settings.b6d3cae9.js +1 -0
  60. package/dist/client/_nuxt/storage.2e73159a.js +1 -0
  61. package/dist/client/_nuxt/terminals.4329aeb9.css +1 -0
  62. package/dist/client/_nuxt/terminals.65080a19.js +1 -0
  63. package/dist/client/_nuxt/{unocss-runtime.daeb320e.js → unocss-runtime.5708ce83.js} +2 -2
  64. package/dist/client/_nuxt/virtual-files.9eb05502.js +1 -0
  65. package/dist/client/index.html +2 -2
  66. package/dist/client/modules/assets/index.html +7 -0
  67. package/dist/client/modules/components/index.html +2 -2
  68. package/dist/client/modules/hooks/index.html +2 -2
  69. package/dist/client/modules/imports/index.html +2 -2
  70. package/dist/client/modules/layouts/index.html +2 -2
  71. package/dist/client/modules/middleware/index.html +2 -2
  72. package/dist/client/modules/modules/index.html +2 -2
  73. package/dist/client/modules/overview/index.html +2 -2
  74. package/dist/client/modules/pages/index.html +2 -2
  75. package/dist/client/modules/payload/index.html +2 -2
  76. package/dist/client/modules/plugins/index.html +2 -2
  77. package/dist/client/modules/runtime-configs/index.html +2 -2
  78. package/dist/client/modules/server-routes/index.html +2 -2
  79. package/dist/client/modules/storage/index.html +2 -2
  80. package/dist/client/modules/terminals/index.html +7 -0
  81. package/dist/client/modules/virtual-files/index.html +2 -2
  82. package/dist/client/settings/index.html +7 -0
  83. package/dist/dirs.mjs +2 -2
  84. package/dist/module.d.ts +3 -33
  85. package/dist/module.json +1 -1
  86. package/dist/module.mjs +2 -2
  87. package/dist/runtime/plugins/devtools.client.mjs +7 -1
  88. package/dist/shared/{devtools.258c6e2e.mjs → devtools.696fb428.mjs} +1 -1
  89. package/dist/types.d.ts +4 -337
  90. package/dist/types.mjs +1 -1
  91. package/package.json +36 -35
  92. package/dist/client/_nuxt/Badge.4f16da14.js +0 -1
  93. package/dist/client/_nuxt/FilepathItem.vue.235fa07d.js +0 -1
  94. package/dist/client/_nuxt/LaunchPage.vue.86f00e85.js +0 -1
  95. package/dist/client/_nuxt/NButton.a7fda268.css +0 -1
  96. package/dist/client/_nuxt/NButton.vue.76dccbb9.js +0 -100
  97. package/dist/client/_nuxt/NCheckbox.vue.60126ccb.js +0 -1
  98. package/dist/client/_nuxt/NMarkdown.vue.abb154b8.js +0 -1
  99. package/dist/client/_nuxt/NSectionBlock.58837776.js +0 -1
  100. package/dist/client/_nuxt/NSectionBlock.891fa081.css +0 -1
  101. package/dist/client/_nuxt/NTextInput.vue.1fd15b74.js +0 -1
  102. package/dist/client/_nuxt/StateEditor.vue.bdb7e5c8.js +0 -1
  103. package/dist/client/_nuxt/asyncData.103aad72.js +0 -1
  104. package/dist/client/_nuxt/client.9c41f495.js +0 -1
  105. package/dist/client/_nuxt/components.43dee80b.js +0 -1
  106. package/dist/client/_nuxt/context.55688cca.js +0 -1
  107. package/dist/client/_nuxt/custom-_name_.8832be9d.js +0 -1
  108. package/dist/client/_nuxt/default.c29c3e74.js +0 -1
  109. package/dist/client/_nuxt/editor.66e59505.js +0 -1
  110. package/dist/client/_nuxt/entry.3a404c59.css +0 -1
  111. package/dist/client/_nuxt/entry.883bcfe6.js +0 -11
  112. package/dist/client/_nuxt/error-404.d027ece6.js +0 -1
  113. package/dist/client/_nuxt/error-component.ee11a8ba.js +0 -3
  114. package/dist/client/_nuxt/hooks.427abdcd.js +0 -1
  115. package/dist/client/_nuxt/icons.7b11eba5.js +0 -1
  116. package/dist/client/_nuxt/imports.2dc7174b.js +0 -1
  117. package/dist/client/_nuxt/index.0d6abd2a.js +0 -1
  118. package/dist/client/_nuxt/json-editor-vue.a65019ca.js +0 -137
  119. package/dist/client/_nuxt/layouts.4db8e1e6.js +0 -1
  120. package/dist/client/_nuxt/middleware.c4f2a57b.js +0 -1
  121. package/dist/client/_nuxt/modules.a2209d2d.js +0 -1
  122. package/dist/client/_nuxt/nuxt-link.a34a1045.js +0 -1
  123. package/dist/client/_nuxt/overview.5053fd45.js +0 -1
  124. package/dist/client/_nuxt/pages.9a1a9ac3.js +0 -1
  125. package/dist/client/_nuxt/payload.ed4c5688.js +0 -1
  126. package/dist/client/_nuxt/plugins.95c9e3e6.js +0 -1
  127. package/dist/client/_nuxt/runtime-configs.7ebddf6f.js +0 -1
  128. package/dist/client/_nuxt/server-routes.5337ffc6.js +0 -1
  129. package/dist/client/_nuxt/state.1f523208.js +0 -1
  130. package/dist/client/_nuxt/storage.4459d7bf.js +0 -1
  131. package/dist/client/_nuxt/virtual-files.a15894d9.js +0 -3
  132. package/dist/iframe-client.d.ts +0 -15
  133. package/dist/iframe-client.mjs +0 -32
  134. package/iframe-client.d.ts +0 -1
@@ -1,100 +0,0 @@
1
- import{a as AE,c as pc,w as ME,a0 as DE,C as RE,u as FE,o as gc,r as yc,m as NE,D as BE}from"./entry.883bcfe6.js";import{_ as LE}from"./nuxt-link.a34a1045.js";/* empty css */import"./client.9c41f495.js";import"./json-editor-vue.a65019ca.js";/**
2
- * vis-data
3
- * http://visjs.org/
4
- *
5
- * Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data.
6
- *
7
- * @version 7.1.4
8
- * @date 2022-03-15T15:23:59.245Z
9
- *
10
- * @copyright (c) 2011-2017 Almende B.V, http://almende.com
11
- * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
12
- *
13
- * @license
14
- * vis.js is dual licensed under both
15
- *
16
- * 1. The Apache 2.0 License
17
- * http://www.apache.org/licenses/LICENSE-2.0
18
- *
19
- * and
20
- *
21
- * 2. The MIT License
22
- * http://opensource.org/licenses/MIT
23
- *
24
- * vis.js may be distributed under either license.
25
- */function As(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}var mc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ym={exports:{}},po=function(r){return r&&r.Math==Math&&r},Y=po(typeof globalThis=="object"&&globalThis)||po(typeof window=="object"&&window)||po(typeof self=="object"&&self)||po(typeof mc=="object"&&mc)||function(){return this}()||Function("return this")(),ge=function(r){try{return!!r()}catch{return!0}},zE=ge,ga=!zE(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),jE=ga,Xm=Function.prototype,bc=Xm.apply,$c=Xm.call,fn=typeof Reflect=="object"&&Reflect.apply||(jE?$c.bind(bc):function(){return $c.apply(bc,arguments)}),Qm=ga,Zm=Function.prototype,HE=Zm.bind,Dh=Zm.call,WE=Qm&&HE.bind(Dh,Dh),de=Qm?function(r){return r&&WE(r)}:function(r){return r&&function(){return Dh.apply(r,arguments)}},Ke=function(r){return typeof r=="function"},ya={},VE=ge,ze=!VE(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),UE=ga,go=Function.prototype.call,tr=UE?go.bind(go):function(){return go.apply(go,arguments)},ma={},Jm={}.propertyIsEnumerable,eb=Object.getOwnPropertyDescriptor,GE=eb&&!Jm.call({1:2},1);ma.f=GE?function(n){var e=eb(this,n);return!!e&&e.enumerable}:Jm;var ba=function(r,n){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:n}},tb=de,KE=tb({}.toString),qE=tb("".slice),Ei=function(r){return qE(KE(r),8,-1)},YE=Y,XE=de,QE=ge,ZE=Ei,Ru=YE.Object,JE=XE("".split),Ms=QE(function(){return!Ru("z").propertyIsEnumerable(0)})?function(r){return ZE(r)=="String"?JE(r,""):Ru(r)}:Ru,eS=Y,tS=eS.TypeError,$a=function(r){if(r==null)throw tS("Can't call method on "+r);return r},rS=Ms,iS=$a,jt=function(r){return rS(iS(r))},nS=Ke,st=function(r){return typeof r=="object"?r!==null:nS(r)},$e={},Fu=$e,Nu=Y,aS=Ke,wc=function(r){return aS(r)?r:void 0},br=function(r,n){return arguments.length<2?wc(Fu[r])||wc(Nu[r]):Fu[r]&&Fu[r][n]||Nu[r]&&Nu[r][n]},oS=de,je=oS({}.isPrototypeOf),sS=br,wa=sS("navigator","userAgent")||"",rb=Y,Bu=wa,_c=rb.process,Ec=rb.Deno,Sc=_c&&_c.versions||Ec&&Ec.version,Oc=Sc&&Sc.v8,Mt,ss;Oc&&(Mt=Oc.split("."),ss=Mt[0]>0&&Mt[0]<4?1:+(Mt[0]+Mt[1]));!ss&&Bu&&(Mt=Bu.match(/Edge\/(\d+)/),(!Mt||Mt[1]>=74)&&(Mt=Bu.match(/Chrome\/(\d+)/),Mt&&(ss=+Mt[1])));var _a=ss,Tc=_a,uS=ge,Vd=!!Object.getOwnPropertySymbols&&!uS(function(){var r=Symbol();return!String(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&Tc&&Tc<41}),lS=Vd,ib=lS&&!Symbol.sham&&typeof Symbol.iterator=="symbol",hS=Y,dS=br,fS=Ke,cS=je,vS=ib,pS=hS.Object,Ud=vS?function(r){return typeof r=="symbol"}:function(r){var n=dS("Symbol");return fS(n)&&cS(n.prototype,pS(r))},gS=Y,yS=gS.String,Ds=function(r){try{return yS(r)}catch{return"Object"}},mS=Y,bS=Ke,$S=Ds,wS=mS.TypeError,Si=function(r){if(bS(r))return r;throw wS($S(r)+" is not a function")},_S=Si,Gd=function(r,n){var e=r[n];return e==null?void 0:_S(e)},ES=Y,Lu=tr,zu=Ke,ju=st,SS=ES.TypeError,OS=function(r,n){var e,t;if(n==="string"&&zu(e=r.toString)&&!ju(t=Lu(e,r))||zu(e=r.valueOf)&&!ju(t=Lu(e,r))||n!=="string"&&zu(e=r.toString)&&!ju(t=Lu(e,r)))return t;throw SS("Can't convert object to primitive value")},Rs={exports:{}},kc=Y,TS=Object.defineProperty,kS=function(r,n){try{TS(kc,r,{value:n,configurable:!0,writable:!0})}catch{kc[r]=n}return n},IS=Y,PS=kS,Ic="__core-js_shared__",CS=IS[Ic]||PS(Ic,{}),Kd=CS,Pc=Kd;(Rs.exports=function(r,n){return Pc[r]||(Pc[r]=n!==void 0?n:{})})("versions",[]).push({version:"3.21.1",mode:"pure",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE",source:"https://github.com/zloirock/core-js"});var xS=Y,AS=$a,MS=xS.Object,mt=function(r){return MS(AS(r))},DS=de,RS=mt,FS=DS({}.hasOwnProperty),et=Object.hasOwn||function(n,e){return FS(RS(n),e)},NS=de,BS=0,LS=Math.random(),zS=NS(1 .toString),Fs=function(r){return"Symbol("+(r===void 0?"":r)+")_"+zS(++BS+LS,36)},jS=Y,HS=Rs.exports,Cc=et,WS=Fs,xc=Vd,nb=ib,Mi=HS("wks"),ai=jS.Symbol,Ac=ai&&ai.for,VS=nb?ai:ai&&ai.withoutSetter||WS,Re=function(r){if(!Cc(Mi,r)||!(xc||typeof Mi[r]=="string")){var n="Symbol."+r;xc&&Cc(ai,r)?Mi[r]=ai[r]:nb&&Ac?Mi[r]=Ac(n):Mi[r]=VS(n)}return Mi[r]},US=Y,GS=tr,Mc=st,Dc=Ud,KS=Gd,qS=OS,YS=Re,XS=US.TypeError,QS=YS("toPrimitive"),ZS=function(r,n){if(!Mc(r)||Dc(r))return r;var e=KS(r,QS),t;if(e){if(n===void 0&&(n="default"),t=GS(e,r,n),!Mc(t)||Dc(t))return t;throw XS("Can't convert object to primitive value")}return n===void 0&&(n="number"),qS(r,n)},JS=ZS,eO=Ud,Ns=function(r){var n=JS(r,"string");return eO(n)?n:n+""},tO=Y,Rc=st,Rh=tO.document,rO=Rc(Rh)&&Rc(Rh.createElement),ab=function(r){return rO?Rh.createElement(r):{}},iO=ze,nO=ge,aO=ab,ob=!iO&&!nO(function(){return Object.defineProperty(aO("div"),"a",{get:function(){return 7}}).a!=7}),oO=ze,sO=tr,uO=ma,lO=ba,hO=jt,dO=Ns,fO=et,cO=ob,Fc=Object.getOwnPropertyDescriptor;ya.f=oO?Fc:function(n,e){if(n=hO(n),e=dO(e),cO)try{return Fc(n,e)}catch{}if(fO(n,e))return lO(!sO(uO.f,n,e),n[e])};var vO=ge,pO=Ke,gO=/#|\.prototype\./,Ea=function(r,n){var e=mO[yO(r)];return e==$O?!0:e==bO?!1:pO(n)?vO(n):!!n},yO=Ea.normalize=function(r){return String(r).replace(gO,".").toLowerCase()},mO=Ea.data={},bO=Ea.NATIVE="N",$O=Ea.POLYFILL="P",wO=Ea,Nc=de,_O=Si,EO=ga,SO=Nc(Nc.bind),cn=function(r,n){return _O(r),n===void 0?r:EO?SO(r,n):function(){return r.apply(n,arguments)}},wt={},OO=ze,TO=ge,sb=OO&&TO(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),ub=Y,kO=st,IO=ub.String,PO=ub.TypeError,Ht=function(r){if(kO(r))return r;throw PO(IO(r)+" is not an object")},CO=Y,xO=ze,AO=ob,MO=sb,yo=Ht,Bc=Ns,DO=CO.TypeError,Hu=Object.defineProperty,RO=Object.getOwnPropertyDescriptor,Wu="enumerable",Vu="configurable",Uu="writable";wt.f=xO?MO?function(n,e,t){if(yo(n),e=Bc(e),yo(t),typeof n=="function"&&e==="prototype"&&"value"in t&&Uu in t&&!t[Uu]){var i=RO(n,e);i&&i[Uu]&&(n[e]=t.value,t={configurable:Vu in t?t[Vu]:i[Vu],enumerable:Wu in t?t[Wu]:i[Wu],writable:!1})}return Hu(n,e,t)}:Hu:function(n,e,t){if(yo(n),e=Bc(e),yo(t),AO)try{return Hu(n,e,t)}catch{}if("get"in t||"set"in t)throw DO("Accessors not supported");return"value"in t&&(n[e]=t.value),n};var FO=ze,NO=wt,BO=ba,vn=FO?function(r,n,e){return NO.f(r,n,BO(1,e))}:function(r,n,e){return r[n]=e,r},mo=Y,LO=fn,zO=de,jO=Ke,HO=ya.f,WO=wO,Di=$e,VO=cn,Ri=vn,Lc=et,UO=function(r){var n=function(e,t,i){if(this instanceof n){switch(arguments.length){case 0:return new r;case 1:return new r(e);case 2:return new r(e,t)}return new r(e,t,i)}return LO(r,this,arguments)};return n.prototype=r.prototype,n},ee=function(r,n){var e=r.target,t=r.global,i=r.stat,a=r.proto,o=t?mo:i?mo[e]:(mo[e]||{}).prototype,s=t?Di:Di[e]||Ri(Di,e,{})[e],u=s.prototype,l,h,d,f,c,v,g,b,p;for(f in n)l=WO(t?f:e+(i?".":"#")+f,r.forced),h=!l&&o&&Lc(o,f),v=s[f],h&&(r.noTargetGet?(p=HO(o,f),g=p&&p.value):g=o[f]),c=h&&g?g:n[f],!(h&&typeof v==typeof c)&&(r.bind&&h?b=VO(c,mo):r.wrap&&h?b=UO(c):a&&jO(c)?b=zO(c):b=c,(r.sham||c&&c.sham||v&&v.sham)&&Ri(b,"sham",!0),Ri(s,f,b),a&&(d=e+"Prototype",Lc(Di,d)||Ri(Di,d,{}),Ri(Di[d],f,c),r.real&&u&&!u[f]&&Ri(u,f,c)))},GO=ee,KO=ze,zc=wt.f;GO({target:"Object",stat:!0,forced:Object.defineProperty!==zc,sham:!KO},{defineProperty:zc});var qO=$e,lb=qO.Object,YO=Ym.exports=function(n,e,t){return lb.defineProperty(n,e,t)};lb.defineProperty.sham&&(YO.sham=!0);var XO=Ym.exports,hb=XO,QO=hb,ZO=QO,JO=ZO,eT=JO,Bs=eT;function jc(r,n){for(var e=0;e<n.length;e++){var t=n[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Bs(r,t.key,t)}}function Ls(r,n,e){return n&&jc(r.prototype,n),e&&jc(r,e),Bs(r,"prototype",{writable:!1}),r}function Se(r,n,e){return n in r?Bs(r,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[n]=e,r}var tT=de,zs=tT([].slice),rT=Y,db=de,iT=Si,nT=st,aT=et,Hc=zs,oT=ga,fb=rT.Function,sT=db([].concat),uT=db([].join),Gu={},lT=function(r,n,e){if(!aT(Gu,n)){for(var t=[],i=0;i<n;i++)t[i]="a["+i+"]";Gu[n]=fb("C,a","return new C("+uT(t,",")+")")}return Gu[n](r,e)},cb=oT?fb.bind:function(n){var e=iT(this),t=e.prototype,i=Hc(arguments,1),a=function(){var s=sT(i,Hc(arguments));return this instanceof a?lT(e,s.length,s):e.apply(n,s)};return nT(t)&&(a.prototype=t),a},hT=ee,Wc=cb;hT({target:"Function",proto:!0,forced:Function.bind!==Wc},{bind:Wc});var dT=$e,De=function(r){return dT[r+"Prototype"]},fT=De,cT=fT("Function").bind,vT=je,pT=cT,Ku=Function.prototype,gT=function(r){var n=r.bind;return r===Ku||vT(Ku,r)&&n===Ku.bind?pT:n},yT=gT,mT=yT,vb=mT,bT=Math.ceil,$T=Math.floor,js=function(r){var n=+r;return n!==n||n===0?0:(n>0?$T:bT)(n)},wT=js,_T=Math.min,ET=function(r){return r>0?_T(wT(r),9007199254740991):0},ST=ET,_t=function(r){return ST(r.length)},OT=Y,TT=Si,kT=mt,IT=Ms,PT=_t,CT=OT.TypeError,Vc=function(r){return function(n,e,t,i){TT(e);var a=kT(n),o=IT(a),s=PT(a),u=r?s-1:0,l=r?-1:1;if(t<2)for(;;){if(u in o){i=o[u],u+=l;break}if(u+=l,r?u<0:s<=u)throw CT("Reduce of empty array with no initial value")}for(;r?u>=0:s>u;u+=l)u in o&&(i=e(i,o[u],u,a));return i}},xT={left:Vc(!1),right:Vc(!0)},AT=ge,Sa=function(r,n){var e=[][r];return!!e&&AT(function(){e.call(null,n||function(){return 1},1)})},MT=Ei,DT=Y,RT=MT(DT.process)=="process",FT=ee,NT=xT.left,BT=Sa,Uc=_a,LT=RT,zT=BT("reduce"),jT=!LT&&Uc>79&&Uc<83;FT({target:"Array",proto:!0,forced:!zT||jT},{reduce:function(n){var e=arguments.length;return NT(this,n,e,e>1?arguments[1]:void 0)}});var HT=De,WT=HT("Array").reduce,VT=je,UT=WT,qu=Array.prototype,GT=function(r){var n=r.reduce;return r===qu||VT(qu,r)&&n===qu.reduce?UT:n},KT=GT,qT=KT,YT=qT,XT=Ei,Oi=Array.isArray||function(n){return XT(n)=="Array"},QT=Re,ZT=QT("toStringTag"),pb={};pb[ZT]="z";var qd=String(pb)==="[object z]",JT=Y,ek=qd,tk=Ke,Go=Ei,rk=Re,ik=rk("toStringTag"),nk=JT.Object,ak=Go(function(){return arguments}())=="Arguments",ok=function(r,n){try{return r[n]}catch{}},$r=ek?Go:function(r){var n,e,t;return r===void 0?"Undefined":r===null?"Null":typeof(e=ok(n=nk(r),ik))=="string"?e:ak?Go(n):(t=Go(n))=="Object"&&tk(n.callee)?"Arguments":t},sk=de,uk=Ke,Fh=Kd,lk=sk(Function.toString);uk(Fh.inspectSource)||(Fh.inspectSource=function(r){return lk(r)});var gb=Fh.inspectSource,hk=de,dk=ge,yb=Ke,fk=$r,ck=br,vk=gb,mb=function(){},pk=[],bb=ck("Reflect","construct"),Yd=/^\s*(?:class|function)\b/,gk=hk(Yd.exec),yk=!Yd.exec(mb),Mn=function(n){if(!yb(n))return!1;try{return bb(mb,pk,n),!0}catch{return!1}},$b=function(n){if(!yb(n))return!1;switch(fk(n)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return yk||!!gk(Yd,vk(n))}catch{return!0}};$b.sham=!0;var Hs=!bb||dk(function(){var r;return Mn(Mn.call)||!Mn(Object)||!Mn(function(){r=!0})||r})?$b:Mn,mk=Y,Gc=Oi,bk=Hs,$k=st,wk=Re,_k=wk("species"),Kc=mk.Array,Ek=function(r){var n;return Gc(r)&&(n=r.constructor,bk(n)&&(n===Kc||Gc(n.prototype))?n=void 0:$k(n)&&(n=n[_k],n===null&&(n=void 0))),n===void 0?Kc:n},Sk=Ek,Ws=function(r,n){return new(Sk(r))(n===0?0:n)},Ok=cn,Tk=de,kk=Ms,Ik=mt,Pk=_t,Ck=Ws,qc=Tk([].push),Er=function(r){var n=r==1,e=r==2,t=r==3,i=r==4,a=r==6,o=r==7,s=r==5||a;return function(u,l,h,d){for(var f=Ik(u),c=kk(f),v=Ok(l,h),g=Pk(c),b=0,p=d||Ck,$=n?p(u,g):e||o?p(u,0):void 0,y,m;g>b;b++)if((s||b in c)&&(y=c[b],m=v(y,b,f),r))if(n)$[b]=m;else if(m)switch(r){case 3:return!0;case 5:return y;case 6:return b;case 2:qc($,y)}else switch(r){case 4:return!1;case 7:qc($,y)}return a?-1:t||i?i:$}},pn={forEach:Er(0),map:Er(1),filter:Er(2),some:Er(3),every:Er(4),find:Er(5),findIndex:Er(6),filterReject:Er(7)},xk=ge,Ak=Re,Mk=_a,Dk=Ak("species"),Oa=function(r){return Mk>=51||!xk(function(){var n=[],e=n.constructor={};return e[Dk]=function(){return{foo:1}},n[r](Boolean).foo!==1})},Rk=ee,Fk=pn.filter,Nk=Oa,Bk=Nk("filter");Rk({target:"Array",proto:!0,forced:!Bk},{filter:function(n){return Fk(this,n,arguments.length>1?arguments[1]:void 0)}});var Lk=De,zk=Lk("Array").filter,jk=je,Hk=zk,Yu=Array.prototype,Wk=function(r){var n=r.filter;return r===Yu||jk(Yu,r)&&n===Yu.filter?Hk:n},Vk=Wk,Uk=Vk,Ui=Uk,Gk=ee,Kk=pn.map,qk=Oa,Yk=qk("map");Gk({target:"Array",proto:!0,forced:!Yk},{map:function(n){return Kk(this,n,arguments.length>1?arguments[1]:void 0)}});var Xk=De,Qk=Xk("Array").map,Zk=je,Jk=Qk,Xu=Array.prototype,eI=function(r){var n=r.map;return r===Xu||Zk(Xu,r)&&n===Xu.map?Jk:n},tI=eI,rI=tI,Dt=rI,iI=Y,nI=Oi,aI=_t,oI=cn,sI=iI.TypeError,wb=function(r,n,e,t,i,a,o,s){for(var u=i,l=0,h=o?oI(o,s):!1,d,f;l<t;){if(l in e){if(d=h?h(e[l],l,n):e[l],a>0&&nI(d))f=aI(d),u=wb(r,n,d,f,u,a-1)-1;else{if(u>=9007199254740991)throw sI("Exceed the acceptable array length");r[u]=d}u++}l++}return u},uI=wb,lI=ee,hI=uI,dI=Si,fI=mt,cI=_t,vI=Ws;lI({target:"Array",proto:!0},{flatMap:function(n){var e=fI(this),t=cI(e),i;return dI(n),i=vI(e,0),i.length=hI(i,e,e,t,0,1,n,arguments.length>1?arguments[1]:void 0),i}});var pI=De;pI("Array").flatMap;var gI=Y,yI=$r,mI=gI.String,Ti=function(r){if(yI(r)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return mI(r)},Xd=de,bI=js,$I=Ti,wI=$a,_I=Xd("".charAt),Yc=Xd("".charCodeAt),EI=Xd("".slice),Xc=function(r){return function(n,e){var t=$I(wI(n)),i=bI(e),a=t.length,o,s;return i<0||i>=a?r?"":void 0:(o=Yc(t,i),o<55296||o>56319||i+1===a||(s=Yc(t,i+1))<56320||s>57343?r?_I(t,i):o:r?EI(t,i,i+2):(o-55296<<10)+(s-56320)+65536)}},SI={codeAt:Xc(!1),charAt:Xc(!0)},OI=Y,TI=Ke,kI=gb,Qc=OI.WeakMap,II=TI(Qc)&&/native code/.test(kI(Qc)),PI=Rs.exports,CI=Fs,Zc=PI("keys"),Vs=function(r){return Zc[r]||(Zc[r]=CI(r))},Ta={},xI=II,_b=Y,Qu=de,AI=st,MI=vn,Zu=et,Ju=Kd,DI=Vs,RI=Ta,Jc="Object already initialized",Nh=_b.TypeError,FI=_b.WeakMap,us,ea,ls,NI=function(r){return ls(r)?ea(r):us(r,{})},BI=function(r){return function(n){var e;if(!AI(n)||(e=ea(n)).type!==r)throw Nh("Incompatible receiver, "+r+" required");return e}};if(xI||Ju.state){var Qr=Ju.state||(Ju.state=new FI),LI=Qu(Qr.get),ev=Qu(Qr.has),zI=Qu(Qr.set);us=function(r,n){if(ev(Qr,r))throw new Nh(Jc);return n.facade=r,zI(Qr,r,n),n},ea=function(r){return LI(Qr,r)||{}},ls=function(r){return ev(Qr,r)}}else{var Fi=DI("state");RI[Fi]=!0,us=function(r,n){if(Zu(r,Fi))throw new Nh(Jc);return n.facade=r,MI(r,Fi,n),n},ea=function(r){return Zu(r,Fi)?r[Fi]:{}},ls=function(r){return Zu(r,Fi)}}var ka={set:us,get:ea,has:ls,enforce:NI,getterFor:BI},Bh=ze,jI=et,Eb=Function.prototype,HI=Bh&&Object.getOwnPropertyDescriptor,Qd=jI(Eb,"name"),WI=Qd&&function(){}.name==="something",VI=Qd&&(!Bh||Bh&&HI(Eb,"name").configurable),Sb={EXISTS:Qd,PROPER:WI,CONFIGURABLE:VI},Us={},UI=js,GI=Math.max,KI=Math.min,Ia=function(r,n){var e=UI(r);return e<0?GI(e+n,0):KI(e,n)},qI=jt,YI=Ia,XI=_t,tv=function(r){return function(n,e,t){var i=qI(n),a=XI(i),o=YI(t,a),s;if(r&&e!=e){for(;a>o;)if(s=i[o++],s!=s)return!0}else for(;a>o;o++)if((r||o in i)&&i[o]===e)return r||o||0;return!r&&-1}},Zd={includes:tv(!0),indexOf:tv(!1)},QI=de,el=et,ZI=jt,JI=Zd.indexOf,eP=Ta,rv=QI([].push),Ob=function(r,n){var e=ZI(r),t=0,i=[],a;for(a in e)!el(eP,a)&&el(e,a)&&rv(i,a);for(;n.length>t;)el(e,a=n[t++])&&(~JI(i,a)||rv(i,a));return i},Jd=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],tP=Ob,rP=Jd,Pa=Object.keys||function(n){return tP(n,rP)},iP=ze,nP=sb,aP=wt,oP=Ht,sP=jt,uP=Pa;Us.f=iP&&!nP?Object.defineProperties:function(n,e){oP(n);for(var t=sP(e),i=uP(e),a=i.length,o=0,s;a>o;)aP.f(n,s=i[o++],t[s]);return n};var lP=br,hP=lP("document","documentElement"),dP=Ht,fP=Us,iv=Jd,cP=Ta,vP=hP,pP=ab,gP=Vs,nv=">",av="<",Lh="prototype",zh="script",Tb=gP("IE_PROTO"),tl=function(){},kb=function(r){return av+zh+nv+r+av+"/"+zh+nv},ov=function(r){r.write(kb("")),r.close();var n=r.parentWindow.Object;return r=null,n},yP=function(){var r=pP("iframe"),n="java"+zh+":",e;return r.style.display="none",vP.appendChild(r),r.src=String(n),e=r.contentWindow.document,e.open(),e.write(kb("document.F=Object")),e.close(),e.F},bo,Ko=function(){try{bo=new ActiveXObject("htmlfile")}catch{}Ko=typeof document<"u"?document.domain&&bo?ov(bo):yP():ov(bo);for(var r=iv.length;r--;)delete Ko[Lh][iv[r]];return Ko()};cP[Tb]=!0;var gn=Object.create||function(n,e){var t;return n!==null?(tl[Lh]=dP(n),t=new tl,tl[Lh]=null,t[Tb]=n):t=Ko(),e===void 0?t:fP.f(t,e)},mP=ge,Ib=!mP(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}),bP=Y,$P=et,wP=Ke,_P=mt,EP=Vs,SP=Ib,sv=EP("IE_PROTO"),jh=bP.Object,OP=jh.prototype,ef=SP?jh.getPrototypeOf:function(r){var n=_P(r);if($P(n,sv))return n[sv];var e=n.constructor;return wP(e)&&n instanceof e?e.prototype:n instanceof jh?OP:null},TP=vn,Gs=function(r,n,e,t){t&&t.enumerable?r[n]=e:TP(r,n,e)},kP=ge,IP=Ke,PP=gn,uv=ef,CP=Gs,xP=Re,Hh=xP("iterator"),Pb=!1,nr,rl,il;[].keys&&(il=[].keys(),"next"in il?(rl=uv(uv(il)),rl!==Object.prototype&&(nr=rl)):Pb=!0);var AP=nr==null||kP(function(){var r={};return nr[Hh].call(r)!==r});AP?nr={}:nr=PP(nr);IP(nr[Hh])||CP(nr,Hh,function(){return this});var Cb={IteratorPrototype:nr,BUGGY_SAFARI_ITERATORS:Pb},MP=qd,DP=$r,RP=MP?{}.toString:function(){return"[object "+DP(this)+"]"},FP=qd,NP=wt.f,BP=vn,LP=et,zP=RP,jP=Re,lv=jP("toStringTag"),Ca=function(r,n,e,t){if(r){var i=e?r:r.prototype;LP(i,lv)||NP(i,lv,{configurable:!0,value:n}),t&&!FP&&BP(i,"toString",zP)}},yn={},HP=Cb.IteratorPrototype,WP=gn,VP=ba,UP=Ca,GP=yn,KP=function(){return this},qP=function(r,n,e,t){var i=n+" Iterator";return r.prototype=WP(HP,{next:VP(+!t,e)}),UP(r,i,!1,!0),GP[i]=KP,r},xb=Y,YP=Ke,XP=xb.String,QP=xb.TypeError,ZP=function(r){if(typeof r=="object"||YP(r))return r;throw QP("Can't set "+XP(r)+" as a prototype")},JP=de,eC=Ht,tC=ZP,rC=Object.setPrototypeOf||("__proto__"in{}?function(){var r=!1,n={},e;try{e=JP(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),e(n,[]),r=n instanceof Array}catch{}return function(i,a){return eC(i),tC(a),r?e(i,a):i.__proto__=a,i}}():void 0),iC=ee,nC=tr,aC=Sb,oC=qP,sC=ef,uC=Ca,hv=Gs,lC=Re,dv=yn,hC=Cb,dC=aC.PROPER,$o=hC.BUGGY_SAFARI_ITERATORS,nl=lC("iterator"),fv="keys",wo="values",cv="entries",fC=function(){return this},tf=function(r,n,e,t,i,a,o){oC(e,n,t);var s=function(p){if(p===i&&f)return f;if(!$o&&p in h)return h[p];switch(p){case fv:return function(){return new e(this,p)};case wo:return function(){return new e(this,p)};case cv:return function(){return new e(this,p)}}return function(){return new e(this)}},u=n+" Iterator",l=!1,h=r.prototype,d=h[nl]||h["@@iterator"]||i&&h[i],f=!$o&&d||s(i),c=n=="Array"&&h.entries||d,v,g,b;if(c&&(v=sC(c.call(new r)),v!==Object.prototype&&v.next&&(uC(v,u,!0,!0),dv[u]=fC)),dC&&i==wo&&d&&d.name!==wo&&(l=!0,f=function(){return nC(d,this)}),i)if(g={values:s(wo),keys:a?f:s(fv),entries:s(cv)},o)for(b in g)($o||l||!(b in h))&&hv(h,b,g[b]);else iC({target:n,proto:!0,forced:$o||l},g);return o&&h[nl]!==f&&hv(h,nl,f,{name:i}),dv[n]=f,g},cC=SI.charAt,vC=Ti,Ab=ka,pC=tf,Mb="String Iterator",gC=Ab.set,yC=Ab.getterFor(Mb);pC(String,"String",function(r){gC(this,{type:Mb,string:vC(r),index:0})},function(){var n=yC(this),e=n.string,t=n.index,i;return t>=e.length?{value:void 0,done:!0}:(i=cC(e,t),n.index+=i.length,{value:i,done:!1})});var mC=tr,vv=Ht,bC=Gd,Db=function(r,n,e){var t,i;vv(r);try{if(t=bC(r,"return"),!t){if(n==="throw")throw e;return e}t=mC(t,r)}catch(a){i=!0,t=a}if(n==="throw")throw e;if(i)throw t;return vv(t),e},$C=Ht,wC=Db,_C=function(r,n,e,t){try{return t?n($C(e)[0],e[1]):n(e)}catch(i){wC(r,"throw",i)}},EC=Re,SC=yn,OC=EC("iterator"),TC=Array.prototype,Rb=function(r){return r!==void 0&&(SC.Array===r||TC[OC]===r)},kC=Ns,IC=wt,PC=ba,mn=function(r,n,e){var t=kC(n);t in r?IC.f(r,t,PC(0,e)):r[t]=e},CC=$r,pv=Gd,xC=yn,AC=Re,MC=AC("iterator"),Ks=function(r){if(r!=null)return pv(r,MC)||pv(r,"@@iterator")||xC[CC(r)]},DC=Y,RC=tr,FC=Si,NC=Ht,BC=Ds,LC=Ks,zC=DC.TypeError,rf=function(r,n){var e=arguments.length<2?LC(r):n;if(FC(e))return NC(RC(e,r));throw zC(BC(r)+" is not iterable")},jC=Y,HC=cn,WC=tr,VC=mt,UC=_C,GC=Rb,KC=Hs,qC=_t,gv=mn,YC=rf,XC=Ks,yv=jC.Array,QC=function(n){var e=VC(n),t=KC(this),i=arguments.length,a=i>1?arguments[1]:void 0,o=a!==void 0;o&&(a=HC(a,i>2?arguments[2]:void 0));var s=XC(e),u=0,l,h,d,f,c,v;if(s&&!(this==yv&&GC(s)))for(f=YC(e,s),c=f.next,h=t?new this:[];!(d=WC(c,f)).done;u++)v=o?UC(f,a,[d.value,u],!0):d.value,gv(h,u,v);else for(l=qC(e),h=t?new this(l):yv(l);l>u;u++)v=o?a(e[u],u):e[u],gv(h,u,v);return h.length=u,h},ZC=Re,Fb=ZC("iterator"),Nb=!1;try{var JC=0,mv={next:function(){return{done:!!JC++}},return:function(){Nb=!0}};mv[Fb]=function(){return this},Array.from(mv,function(){throw 2})}catch{}var ex=function(r,n){if(!n&&!Nb)return!1;var e=!1;try{var t={};t[Fb]=function(){return{next:function(){return{done:e=!0}}}},r(t)}catch{}return e},tx=ee,rx=QC,ix=ex,nx=!ix(function(r){Array.from(r)});tx({target:"Array",stat:!0,forced:nx},{from:rx});var ax=$e,ox=ax.Array.from,sx=ox,Bb=sx,nf=Bb,ux=jt,bv=yn,Lb=ka;wt.f;var lx=tf,zb="Array Iterator",hx=Lb.set,dx=Lb.getterFor(zb);lx(Array,"Array",function(r,n){hx(this,{type:zb,target:ux(r),index:0,kind:n})},function(){var r=dx(this),n=r.target,e=r.kind,t=r.index++;return!n||t>=n.length?(r.target=void 0,{value:void 0,done:!0}):e=="keys"?{value:t,done:!1}:e=="values"?{value:n[t],done:!1}:{value:[t,n[t]],done:!1}},"values");bv.Arguments=bv.Array;var fx=Ks,cx=fx,vx={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},px=vx,gx=Y,yx=$r,mx=vn,$v=yn,bx=Re,wv=bx("toStringTag");for(var al in px){var _v=gx[al],ol=_v&&_v.prototype;ol&&yx(ol)!==wv&&mx(ol,wv,al),$v[al]=$v.Array}var $x=cx,wx=$x,_x=wx,Ex=_x,Sx=Ex,Ox=Sx,xa=Ox,Aa={},Tx=Ob,kx=Jd,Ix=kx.concat("length","prototype");Aa.f=Object.getOwnPropertyNames||function(n){return Tx(n,Ix)};var af={},Px=Y,Ev=Ia,Cx=_t,xx=mn,Ax=Px.Array,Mx=Math.max,jb=function(r,n,e){for(var t=Cx(r),i=Ev(n,t),a=Ev(e===void 0?t:e,t),o=Ax(Mx(a-i,0)),s=0;i<a;i++,s++)xx(o,s,r[i]);return o.length=s,o},Dx=Ei,Rx=jt,Hb=Aa.f,Fx=jb,Wb=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Nx=function(r){try{return Hb(r)}catch{return Fx(Wb)}};af.f=function(n){return Wb&&Dx(n)=="Window"?Nx(n):Hb(Rx(n))};var qs={};qs.f=Object.getOwnPropertySymbols;var Ys={},Bx=Re;Ys.f=Bx;var Sv=$e,Lx=et,zx=Ys,jx=wt.f,Te=function(r){var n=Sv.Symbol||(Sv.Symbol={});Lx(n,r)||jx(n,r,{value:zx.f(r)})},bn=ee,of=Y,Hx=br,Wx=fn,Ma=tr,Vx=de,tn=ze,ci=Vd,sf=ge,Pe=et,Ux=Oi,Gx=Ke,Kx=st,qx=je,Wh=Ud,Vh=Ht,Yx=mt,Xs=jt,uf=Ns,Vb=Ti,Uh=ba,ta=gn,Ub=Pa,Xx=Aa,Gb=af,Gh=qs,Kb=ya,qb=wt,Qx=Us,Yb=ma,Zx=zs,Kh=Gs,Da=Rs.exports,Jx=Vs,Xb=Ta,Ov=Fs,Qb=Re,eA=Ys,tA=Te,rA=Ca,Zb=ka,Qs=pn.forEach,dt=Jx("hidden"),Zs="Symbol",ra="prototype",Tv=Qb("toPrimitive"),iA=Zb.set,kv=Zb.getterFor(Zs),Nt=Object[ra],ar=of.Symbol,Ar=ar&&ar[ra],Jb=of.TypeError,sl=of.QObject,Dn=Hx("JSON","stringify"),e$=Kb.f,Pr=qb.f,t$=Gb.f,nA=Yb.f,r$=Vx([].push),pr=Da("symbols"),Ra=Da("op-symbols"),ul=Da("string-to-symbol-registry"),ll=Da("symbol-to-string-registry"),aA=Da("wks"),qh=!sl||!sl[ra]||!sl[ra].findChild,Yh=tn&&sf(function(){return ta(Pr({},"a",{get:function(){return Pr(this,"a",{value:7}).a}})).a!=7})?function(r,n,e){var t=e$(Nt,n);t&&delete Nt[n],Pr(r,n,e),t&&r!==Nt&&Pr(Nt,n,t)}:Pr,hl=function(r,n){var e=pr[r]=ta(Ar);return iA(e,{type:Zs,tag:r,description:n}),tn||(e.description=n),e},Js=function(n,e,t){n===Nt&&Js(Ra,e,t),Vh(n);var i=uf(e);return Vh(t),Pe(pr,i)?(t.enumerable?(Pe(n,dt)&&n[dt][i]&&(n[dt][i]=!1),t=ta(t,{enumerable:Uh(0,!1)})):(Pe(n,dt)||Pr(n,dt,Uh(1,{})),n[dt][i]=!0),Yh(n,i,t)):Pr(n,i,t)},lf=function(n,e){Vh(n);var t=Xs(e),i=Ub(t).concat(hf(t));return Qs(i,function(a){(!tn||Ma(i$,t,a))&&Js(n,a,t[a])}),n},oA=function(n,e){return e===void 0?ta(n):lf(ta(n),e)},i$=function(n){var e=uf(n),t=Ma(nA,this,e);return this===Nt&&Pe(pr,e)&&!Pe(Ra,e)?!1:t||!Pe(this,e)||!Pe(pr,e)||Pe(this,dt)&&this[dt][e]?t:!0},n$=function(n,e){var t=Xs(n),i=uf(e);if(!(t===Nt&&Pe(pr,i)&&!Pe(Ra,i))){var a=e$(t,i);return a&&Pe(pr,i)&&!(Pe(t,dt)&&t[dt][i])&&(a.enumerable=!0),a}},a$=function(n){var e=t$(Xs(n)),t=[];return Qs(e,function(i){!Pe(pr,i)&&!Pe(Xb,i)&&r$(t,i)}),t},hf=function(n){var e=n===Nt,t=t$(e?Ra:Xs(n)),i=[];return Qs(t,function(a){Pe(pr,a)&&(!e||Pe(Nt,a))&&r$(i,pr[a])}),i};ci||(ar=function(){if(qx(Ar,this))throw Jb("Symbol is not a constructor");var n=!arguments.length||arguments[0]===void 0?void 0:Vb(arguments[0]),e=Ov(n),t=function(i){this===Nt&&Ma(t,Ra,i),Pe(this,dt)&&Pe(this[dt],e)&&(this[dt][e]=!1),Yh(this,e,Uh(1,i))};return tn&&qh&&Yh(Nt,e,{configurable:!0,set:t}),hl(e,n)},Ar=ar[ra],Kh(Ar,"toString",function(){return kv(this).tag}),Kh(ar,"withoutSetter",function(r){return hl(Ov(r),r)}),Yb.f=i$,qb.f=Js,Qx.f=lf,Kb.f=n$,Xx.f=Gb.f=a$,Gh.f=hf,eA.f=function(r){return hl(Qb(r),r)},tn&&Pr(Ar,"description",{configurable:!0,get:function(){return kv(this).description}}));bn({global:!0,wrap:!0,forced:!ci,sham:!ci},{Symbol:ar});Qs(Ub(aA),function(r){tA(r)});bn({target:Zs,stat:!0,forced:!ci},{for:function(r){var n=Vb(r);if(Pe(ul,n))return ul[n];var e=ar(n);return ul[n]=e,ll[e]=n,e},keyFor:function(n){if(!Wh(n))throw Jb(n+" is not a symbol");if(Pe(ll,n))return ll[n]},useSetter:function(){qh=!0},useSimple:function(){qh=!1}});bn({target:"Object",stat:!0,forced:!ci,sham:!tn},{create:oA,defineProperty:Js,defineProperties:lf,getOwnPropertyDescriptor:n$});bn({target:"Object",stat:!0,forced:!ci},{getOwnPropertyNames:a$,getOwnPropertySymbols:hf});bn({target:"Object",stat:!0,forced:sf(function(){Gh.f(1)})},{getOwnPropertySymbols:function(n){return Gh.f(Yx(n))}});if(Dn){var sA=!ci||sf(function(){var r=ar();return Dn([r])!="[null]"||Dn({a:r})!="{}"||Dn(Object(r))!="{}"});bn({target:"JSON",stat:!0,forced:sA},{stringify:function(n,e,t){var i=Zx(arguments),a=e;if(!(!Kx(e)&&n===void 0||Wh(n)))return Ux(e)||(e=function(o,s){if(Gx(a)&&(s=Ma(a,this,o,s)),!Wh(s))return s}),i[1]=e,Wx(Dn,null,i)}})}if(!Ar[Tv]){var uA=Ar.valueOf;Kh(Ar,Tv,function(r){return Ma(uA,this)})}rA(ar,Zs);Xb[dt]=!0;var lA=$e,hA=lA.Object.getOwnPropertySymbols,dA=hA,fA=dA,Iv=fA,o$={exports:{}},cA=ee,vA=ge,pA=jt,s$=ya.f,u$=ze,gA=vA(function(){s$(1)}),yA=!u$||gA;cA({target:"Object",stat:!0,forced:yA,sham:!u$},{getOwnPropertyDescriptor:function(n,e){return s$(pA(n),e)}});var mA=$e,l$=mA.Object,bA=o$.exports=function(n,e){return l$.getOwnPropertyDescriptor(n,e)};l$.getOwnPropertyDescriptor.sham&&(bA.sham=!0);var $A=o$.exports,wA=$A,h$=wA,_A=br,EA=de,SA=Aa,OA=qs,TA=Ht,kA=EA([].concat),d$=_A("Reflect","ownKeys")||function(n){var e=SA.f(TA(n)),t=OA.f;return t?kA(e,t(n)):e},IA=ee,PA=ze,CA=d$,xA=jt,AA=ya,MA=mn;IA({target:"Object",stat:!0,sham:!PA},{getOwnPropertyDescriptors:function(n){for(var e=xA(n),t=AA.f,i=CA(e),a={},o=0,s,u;i.length>o;)u=t(e,s=i[o++]),u!==void 0&&MA(a,s,u);return a}});var DA=$e,RA=DA.Object.getOwnPropertyDescriptors,FA=RA,NA=FA,Pv=NA,f$={exports:{}},BA=ee,LA=ze,Cv=Us.f;BA({target:"Object",stat:!0,forced:Object.defineProperties!==Cv,sham:!LA},{defineProperties:Cv});var zA=$e,c$=zA.Object,jA=f$.exports=function(n,e){return c$.defineProperties(n,e)};c$.defineProperties.sham&&(jA.sham=!0);var HA=f$.exports,WA=HA,VA=WA,UA=hb,GA=ee,KA=Oi;GA({target:"Array",stat:!0},{isArray:KA});var qA=$e,YA=qA.Array.isArray,XA=YA,v$=XA,QA=v$,ZA=QA,JA=ZA,eM=JA,p$=eM;function tM(r){if(p$(r))return r}var rM=ee,iM=Y,nM=ge,aM=Oi,oM=st,sM=mt,uM=_t,xv=mn,lM=Ws,hM=Oa,dM=Re,fM=_a,g$=dM("isConcatSpreadable"),Av=9007199254740991,Mv="Maximum allowed index exceeded",Dv=iM.TypeError,cM=fM>=51||!nM(function(){var r=[];return r[g$]=!1,r.concat()[0]!==r}),vM=hM("concat"),pM=function(r){if(!oM(r))return!1;var n=r[g$];return n!==void 0?!!n:aM(r)},gM=!cM||!vM;rM({target:"Array",proto:!0,forced:gM},{concat:function(n){var e=sM(this),t=lM(e,0),i=0,a,o,s,u,l;for(a=-1,s=arguments.length;a<s;a++)if(l=a===-1?e:arguments[a],pM(l)){if(u=uM(l),i+u>Av)throw Dv(Mv);for(o=0;o<u;o++,i++)o in l&&xv(t,i,l[o])}else{if(i>=Av)throw Dv(Mv);xv(t,i++,l)}return t.length=i,t}});var yM=Te;yM("asyncIterator");var mM=Te;mM("hasInstance");var bM=Te;bM("isConcatSpreadable");var $M=Te;$M("iterator");var wM=Te;wM("match");var _M=Te;_M("matchAll");var EM=Te;EM("replace");var SM=Te;SM("search");var OM=Te;OM("species");var TM=Te;TM("split");var kM=Te;kM("toPrimitive");var IM=Te;IM("toStringTag");var PM=Te;PM("unscopables");var CM=Y,xM=Ca;xM(CM.JSON,"JSON",!0);var AM=$e,MM=AM.Symbol,DM=MM,y$=DM,RM=y$,FM=RM,NM=Te;NM("asyncDispose");var BM=Te;BM("dispose");var LM=Te;LM("matcher");var zM=Te;zM("metadata");var jM=Te;jM("observable");var HM=Te;HM("patternMatch");var WM=Te;WM("replaceAll");var VM=FM,UM=VM,Gi=UM;function GM(r,n){var e=r==null?null:typeof Gi<"u"&&xa(r)||r["@@iterator"];if(e!=null){var t=[],i=!0,a=!1,o,s;try{for(e=e.call(r);!(i=(o=e.next()).done)&&(t.push(o.value),!(n&&t.length===n));i=!0);}catch(u){a=!0,s=u}finally{try{!i&&e.return!=null&&e.return()}finally{if(a)throw s}}return t}}var KM=ee,qM=Y,Rv=Oi,YM=Hs,XM=st,Fv=Ia,QM=_t,ZM=jt,JM=mn,eD=Re,tD=Oa,rD=zs,iD=tD("slice"),nD=eD("species"),dl=qM.Array,aD=Math.max;KM({target:"Array",proto:!0,forced:!iD},{slice:function(n,e){var t=ZM(this),i=QM(t),a=Fv(n,i),o=Fv(e===void 0?i:e,i),s,u,l;if(Rv(t)&&(s=t.constructor,YM(s)&&(s===dl||Rv(s.prototype))?s=void 0:XM(s)&&(s=s[nD],s===null&&(s=void 0)),s===dl||s===void 0))return rD(t,a,o);for(u=new(s===void 0?dl:s)(aD(o-a,0)),l=0;a<o;a++,l++)a in t&&JM(u,l,t[a]);return u.length=l,u}});var oD=De,sD=oD("Array").slice,uD=je,lD=sD,fl=Array.prototype,hD=function(r){var n=r.slice;return r===fl||uD(fl,r)&&n===fl.slice?lD:n},dD=hD,m$=dD,fD=m$,cD=fD,vD=cD,pD=vD,gD=pD,yD=Bb,mD=yD,bD=mD,$D=bD,b$=$D;function Xh(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}function $$(r,n){var e;if(r){if(typeof r=="string")return Xh(r,n);var t=gD(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return b$(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Xh(r,n)}}function wD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
26
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ut(r,n){return tM(r)||GM(r,n)||$$(r,n)||wD()}var _D=Ys,ED=_D.f("iterator"),SD=ED,w$=SD,OD=w$,TD=OD,kD=TD,ID=kD,PD=ID;function vt(r){return vt=typeof Gi=="function"&&typeof PD=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Gi=="function"&&n.constructor===Gi&&n!==Gi.prototype?"symbol":typeof n},vt(r)}function CD(r){if(p$(r))return Xh(r)}function xD(r){if(typeof Gi<"u"&&xa(r)!=null||r["@@iterator"]!=null)return b$(r)}function AD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
27
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ft(r){return CD(r)||xD(r)||$$(r)||AD()}var eu=y$,MD=De,DD=MD("Array").concat,RD=je,FD=DD,cl=Array.prototype,ND=function(r){var n=r.concat;return r===cl||RD(cl,r)&&n===cl.concat?FD:n},BD=ND,LD=BD,tu=LD,ru=m$,zD=ee,jD=d$;zD({target:"Reflect",stat:!0},{ownKeys:jD});var HD=$e,WD=HD.Reflect.ownKeys,VD=WD,UD=VD,GD=UD,$t=v$,KD=ee,qD=mt,_$=Pa,YD=ge,XD=YD(function(){_$(1)});KD({target:"Object",stat:!0,forced:XD},{keys:function(n){return _$(qD(n))}});var QD=$e,ZD=QD.Object.keys,JD=ZD,e2=JD,df=e2,t2=ee,r2=Y,i2=de,E$=r2.Date,n2=i2(E$.prototype.getTime);t2({target:"Date",stat:!0},{now:function(){return n2(new E$)}});var a2=$e;a2.Date.now;var o2=pn.forEach,s2=Sa,u2=s2("forEach"),l2=u2?[].forEach:function(n){return o2(this,n,arguments.length>1?arguments[1]:void 0)},h2=ee,Nv=l2;h2({target:"Array",proto:!0,forced:[].forEach!=Nv},{forEach:Nv});var d2=De,f2=d2("Array").forEach,c2=f2,v2=c2,p2=$r,g2=et,y2=je,m2=v2,vl=Array.prototype,b2={DOMTokenList:!0,NodeList:!0},$2=function(r){var n=r.forEach;return r===vl||y2(vl,r)&&n===vl.forEach||g2(b2,p2(r))?m2:n},vi=$2,w2=ee,_2=de,E2=Oi,S2=_2([].reverse),Bv=[1,2];w2({target:"Array",proto:!0,forced:String(Bv)===String(Bv.reverse())},{reverse:function(){return E2(this)&&(this.length=this.length),S2(this)}});var O2=De,T2=O2("Array").reverse,k2=je,I2=T2,pl=Array.prototype,P2=function(r){var n=r.reverse;return r===pl||k2(pl,r)&&n===pl.reverse?I2:n},C2=P2,x2=C2,A2=x2,M2=ee,D2=Y,R2=Ia,F2=js,N2=_t,B2=mt,L2=Ws,z2=mn,j2=Oa,H2=j2("splice"),W2=D2.TypeError,V2=Math.max,U2=Math.min,G2=9007199254740991,K2="Maximum allowed length exceeded";M2({target:"Array",proto:!0,forced:!H2},{splice:function(n,e){var t=B2(this),i=N2(t),a=R2(n,i),o=arguments.length,s,u,l,h,d,f;if(o===0?s=u=0:o===1?(s=0,u=i-a):(s=o-2,u=U2(V2(F2(e),0),i-a)),i+s-u>G2)throw W2(K2);for(l=L2(t,u),h=0;h<u;h++)d=a+h,d in t&&z2(l,h,t[d]);if(l.length=u,s<u){for(h=a;h<i-u;h++)d=h+u,f=h+s,d in t?t[f]=t[d]:delete t[f];for(h=i;h>i-u+s;h--)delete t[h-1]}else if(s>u)for(h=i-u;h>a;h--)d=h+u-1,f=h+s-1,d in t?t[f]=t[d]:delete t[f];for(h=0;h<s;h++)t[h+a]=arguments[h+2];return t.length=i-u+s,l}});var q2=De,Y2=q2("Array").splice,X2=je,Q2=Y2,gl=Array.prototype,Z2=function(r){var n=r.splice;return r===gl||X2(gl,r)&&n===gl.splice?Q2:n},J2=Z2,eR=J2,S$=eR,Lv=ze,tR=de,rR=tr,iR=ge,yl=Pa,nR=qs,aR=ma,oR=mt,sR=Ms,Ni=Object.assign,zv=Object.defineProperty,uR=tR([].concat),lR=!Ni||iR(function(){if(Lv&&Ni({b:1},Ni(zv({},"a",{enumerable:!0,get:function(){zv(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var r={},n={},e=Symbol(),t="abcdefghijklmnopqrst";return r[e]=7,t.split("").forEach(function(i){n[i]=i}),Ni({},r)[e]!=7||yl(Ni({},n)).join("")!=t})?function(n,e){for(var t=oR(n),i=arguments.length,a=1,o=nR.f,s=aR.f;i>a;)for(var u=sR(arguments[a++]),l=o?uR(yl(u),o(u)):yl(u),h=l.length,d=0,f;h>d;)f=l[d++],(!Lv||rR(s,u,f))&&(t[f]=u[f]);return t}:Ni,hR=ee,jv=lR;hR({target:"Object",stat:!0,forced:Object.assign!==jv},{assign:jv});var dR=$e,fR=dR.Object.assign,cR=fR,vR=cR,pR=vR,gR=ee,yR=Zd.includes;gR({target:"Array",proto:!0},{includes:function(n){return yR(this,n,arguments.length>1?arguments[1]:void 0)}});var mR=De;mR("Array").includes;var bR=st,$R=Ei,wR=Re,_R=wR("match"),ER=function(r){var n;return bR(r)&&((n=r[_R])!==void 0?!!n:$R(r)=="RegExp")},SR=Y,OR=ER,TR=SR.TypeError,kR=function(r){if(OR(r))throw TR("The method doesn't accept regular expressions");return r},IR=Re,PR=IR("match"),CR=function(r){var n=/./;try{"/./"[r](n)}catch{try{return n[PR]=!1,"/./"[r](n)}catch{}}return!1},xR=ee,AR=de,MR=kR,DR=$a,Hv=Ti,RR=CR,FR=AR("".indexOf);xR({target:"String",proto:!0,forced:!RR("includes")},{includes:function(n){return!!~FR(Hv(DR(this)),Hv(MR(n)),arguments.length>1?arguments[1]:void 0)}});var NR=De;NR("String").includes;var BR=ee,LR=ge,zR=mt,O$=ef,jR=Ib,HR=LR(function(){O$(1)});BR({target:"Object",stat:!0,forced:HR,sham:!jR},{getPrototypeOf:function(n){return O$(zR(n))}});var WR=$e,VR=WR.Object.getPrototypeOf,UR=VR,GR=UR,KR=ze,T$=de,qR=Pa,YR=jt,XR=ma.f,QR=T$(XR),ZR=T$([].push),Wv=function(r){return function(n){for(var e=YR(n),t=qR(e),i=t.length,a=0,o=[],s;i>a;)s=t[a++],(!KR||QR(e,s))&&ZR(o,r?[s,e[s]]:e[s]);return o}},JR={entries:Wv(!0),values:Wv(!1)},eF=ee,tF=JR.values;eF({target:"Object",stat:!0},{values:function(n){return tF(n)}});var rF=$e;rF.Object.values;var ff=`
28
- \v\f\r                 \u2028\u2029\uFEFF`,iF=de,nF=$a,aF=Ti,oF=ff,Vv=iF("".replace),hs="["+oF+"]",sF=RegExp("^"+hs+hs+"*"),uF=RegExp(hs+hs+"*$"),ml=function(r){return function(n){var e=aF(nF(n));return r&1&&(e=Vv(e,sF,"")),r&2&&(e=Vv(e,uF,"")),e}},k$={start:ml(1),end:ml(2),trim:ml(3)},I$=Y,lF=ge,hF=de,dF=Ti,fF=k$.trim,Uv=ff,Un=I$.parseInt,Gv=I$.Symbol,Kv=Gv&&Gv.iterator,P$=/^[+-]?0x/i,cF=hF(P$.exec),vF=Un(Uv+"08")!==8||Un(Uv+"0x16")!==22||Kv&&!lF(function(){Un(Object(Kv))}),pF=vF?function(n,e){var t=fF(dF(n));return Un(t,e>>>0||(cF(P$,t)?16:10))}:Un,gF=ee,qv=pF;gF({global:!0,forced:parseInt!=qv},{parseInt:qv});var yF=$e;yF.parseInt;var mF=ee,bF=de,$F=Zd.indexOf,wF=Sa,Qh=bF([].indexOf),Yv=!!Qh&&1/Qh([1],1,-0)<0,_F=wF("indexOf");mF({target:"Array",proto:!0,forced:Yv||!_F},{indexOf:function(n){var e=arguments.length>1?arguments[1]:void 0;return Yv?Qh(this,n,e)||0:$F(this,n,e)}});var EF=De;EF("Array").indexOf;var SF=Sb.PROPER,OF=ge,Xv=ff,Qv="​…᠎",TF=function(r){return OF(function(){return!!Xv[r]()||Qv[r]()!==Qv||SF&&Xv[r].name!==r})},kF=ee,IF=k$.trim,PF=TF;kF({target:"String",proto:!0,forced:PF("trim")},{trim:function(){return IF(this)}});var CF=De;CF("String").trim;var xF=ee,AF=ze,MF=gn;xF({target:"Object",stat:!0,sham:!AF},{create:MF});var DF=$e,RF=DF.Object,FF=function(n,e){return RF.create(n,e)},NF=FF,C$=NF,BF=C$,LF=ee,zF=Y,jF=br,HF=fn,Fa=de,WF=ge,VF=zF.Array,ds=jF("JSON","stringify"),_o=Fa(/./.exec),Zv=Fa("".charAt),UF=Fa("".charCodeAt),GF=Fa("".replace),KF=Fa(1 .toString),qF=/[\uD800-\uDFFF]/g,Jv=/^[\uD800-\uDBFF]$/,ep=/^[\uDC00-\uDFFF]$/,YF=function(r,n,e){var t=Zv(e,n-1),i=Zv(e,n+1);return _o(Jv,r)&&!_o(ep,i)||_o(ep,r)&&!_o(Jv,t)?"\\u"+KF(UF(r,0),16):r},XF=WF(function(){return ds("\uDF06\uD834")!=='"\\udf06\\ud834"'||ds("\uDEAD")!=='"\\udead"'});ds&&LF({target:"JSON",stat:!0,forced:XF},{stringify:function(n,e,t){for(var i=0,a=arguments.length,o=VF(a);i<a;i++)o[i]=arguments[i];var s=HF(ds,null,o);return typeof s=="string"?GF(s,qF,YF):s}});var Zh=$e,QF=fn;Zh.JSON||(Zh.JSON={stringify:JSON.stringify});var ZF=function(n,e,t){return QF(Zh.JSON.stringify,null,arguments)},JF=ZF,eN=JF,tN=eN,rN=Y,iN=rN.TypeError,nN=function(r,n){if(r<n)throw iN("Not enough arguments");return r},aN=ee,Jh=Y,oN=fn,sN=Ke,uN=wa,lN=zs,hN=nN,dN=/MSIE .\./.test(uN),fN=Jh.Function,tp=function(r){return function(n,e){var t=hN(arguments.length,1)>2,i=sN(n)?n:fN(n),a=t?lN(arguments,2):void 0;return r(t?function(){oN(i,this,a)}:i,e)}};aN({global:!0,bind:!0,forced:dN},{setTimeout:tp(Jh.setTimeout),setInterval:tp(Jh.setInterval)});var cN=$e,vN=cN.setTimeout,pN=vN,gN=mt,rp=Ia,yN=_t,mN=function(n){for(var e=gN(this),t=yN(e),i=arguments.length,a=rp(i>1?arguments[1]:void 0,t),o=i>2?arguments[2]:void 0,s=o===void 0?t:rp(o,t);s>a;)e[a++]=n;return e},bN=ee,$N=mN;bN({target:"Array",proto:!0},{fill:$N});var wN=De;wN("Array").fill;var x$={exports:{}};(function(r){r.exports=n;function n(t){if(t)return e(t)}function e(t){for(var i in n.prototype)t[i]=n.prototype[i];return t}n.prototype.on=n.prototype.addEventListener=function(t,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(i),this},n.prototype.once=function(t,i){function a(){this.off(t,a),i.apply(this,arguments)}return a.fn=i,this.on(t,a),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(t,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var a=this._callbacks["$"+t];if(!a)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var o,s=0;s<a.length;s++)if(o=a[s],o===i||o.fn===i){a.splice(s,1);break}return a.length===0&&delete this._callbacks["$"+t],this},n.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),a=this._callbacks["$"+t],o=1;o<arguments.length;o++)i[o-1]=arguments[o];if(a){a=a.slice(0);for(var o=0,s=a.length;o<s;++o)a[o].apply(this,i)}return this},n.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},n.prototype.hasListeners=function(t){return!!this.listeners(t).length}})(x$);var _N=x$.exports;/*! Hammer.JS - v2.0.17-rc - 2019-12-16
29
- * http://naver.github.io/egjs
30
- *
31
- * Forked By Naver egjs
32
- * Copyright (c) hammerjs
33
- * Licensed under the MIT license */function Lt(){return Lt=Object.assign||function(r){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}return r},Lt.apply(this,arguments)}function xt(r,n){r.prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n}function Eo(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}var ed;typeof Object.assign!="function"?ed=function(n){if(n==null)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(n),t=1;t<arguments.length;t++){var i=arguments[t];if(i!=null)for(var a in i)i.hasOwnProperty(a)&&(e[a]=i[a])}return e}:ed=Object.assign;var pi=ed,ip=["","webkit","Moz","MS","ms","o"],EN=typeof document>"u"?{style:{}}:document.createElement("div"),SN="function",Ki=Math.round,gi=Math.abs,cf=Date.now;function iu(r,n){for(var e,t,i=n[0].toUpperCase()+n.slice(1),a=0;a<ip.length;){if(e=ip[a],t=e?e+i:n,t in r)return t;a++}}var or;typeof window>"u"?or={}:or=window;var A$=iu(EN.style,"touchAction"),M$=A$!==void 0;function ON(){if(!M$)return!1;var r={},n=or.CSS&&or.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return r[e]=n?or.CSS.supports("touch-action",e):!0}),r}var D$="compute",R$="auto",td="manipulation",oi="none",ia="pan-x",na="pan-y",So=ON(),TN=/mobile|tablet|ip(ad|hone|od)|android/i,F$="ontouchstart"in or,kN=iu(or,"PointerEvent")!==void 0,IN=F$&&TN.test(navigator.userAgent),Na="touch",PN="pen",vf="mouse",CN="kinect",xN=25,at=1,ki=2,xe=4,gt=8,fs=1,Ba=2,La=4,za=8,rn=16,Qt=Ba|La,si=za|rn,N$=Qt|si,B$=["x","y"],cs=["clientX","clientY"];function sr(r,n,e){var t;if(r)if(r.forEach)r.forEach(n,e);else if(r.length!==void 0)for(t=0;t<r.length;)n.call(e,r[t],t,r),t++;else for(t in r)r.hasOwnProperty(t)&&n.call(e,r[t],t,r)}function nu(r,n){return typeof r===SN?r.apply(n&&n[0]||void 0,n):r}function ri(r,n){return r.indexOf(n)>-1}function AN(r){if(ri(r,oi))return oi;var n=ri(r,ia),e=ri(r,na);return n&&e?oi:n||e?n?ia:na:ri(r,td)?td:R$}var L$=function(){function r(e,t){this.manager=e,this.set(t)}var n=r.prototype;return n.set=function(t){t===D$&&(t=this.compute()),M$&&this.manager.element.style&&So[t]&&(this.manager.element.style[A$]=t),this.actions=t.toLowerCase().trim()},n.update=function(){this.set(this.manager.options.touchAction)},n.compute=function(){var t=[];return sr(this.manager.recognizers,function(i){nu(i.options.enable,[i])&&(t=t.concat(i.getTouchAction()))}),AN(t.join(" "))},n.preventDefaults=function(t){var i=t.srcEvent,a=t.offsetDirection;if(this.manager.session.prevented){i.preventDefault();return}var o=this.actions,s=ri(o,oi)&&!So[oi],u=ri(o,na)&&!So[na],l=ri(o,ia)&&!So[ia];if(s){var h=t.pointers.length===1,d=t.distance<2,f=t.deltaTime<250;if(h&&d&&f)return}if(!(l&&u)&&(s||u&&a&Qt||l&&a&si))return this.preventSrc(i)},n.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},r}();function pf(r,n){for(;r;){if(r===n)return!0;r=r.parentNode}return!1}function z$(r){var n=r.length;if(n===1)return{x:Ki(r[0].clientX),y:Ki(r[0].clientY)};for(var e=0,t=0,i=0;i<n;)e+=r[i].clientX,t+=r[i].clientY,i++;return{x:Ki(e/n),y:Ki(t/n)}}function np(r){for(var n=[],e=0;e<r.pointers.length;)n[e]={clientX:Ki(r.pointers[e].clientX),clientY:Ki(r.pointers[e].clientY)},e++;return{timeStamp:cf(),pointers:n,center:z$(n),deltaX:r.deltaX,deltaY:r.deltaY}}function vs(r,n,e){e||(e=B$);var t=n[e[0]]-r[e[0]],i=n[e[1]]-r[e[1]];return Math.sqrt(t*t+i*i)}function rd(r,n,e){e||(e=B$);var t=n[e[0]]-r[e[0]],i=n[e[1]]-r[e[1]];return Math.atan2(i,t)*180/Math.PI}function j$(r,n){return r===n?fs:gi(r)>=gi(n)?r<0?Ba:La:n<0?za:rn}function MN(r,n){var e=n.center,t=r.offsetDelta||{},i=r.prevDelta||{},a=r.prevInput||{};(n.eventType===at||a.eventType===xe)&&(i=r.prevDelta={x:a.deltaX||0,y:a.deltaY||0},t=r.offsetDelta={x:e.x,y:e.y}),n.deltaX=i.x+(e.x-t.x),n.deltaY=i.y+(e.y-t.y)}function H$(r,n,e){return{x:n/r||0,y:e/r||0}}function DN(r,n){return vs(n[0],n[1],cs)/vs(r[0],r[1],cs)}function RN(r,n){return rd(n[1],n[0],cs)+rd(r[1],r[0],cs)}function FN(r,n){var e=r.lastInterval||n,t=n.timeStamp-e.timeStamp,i,a,o,s;if(n.eventType!==gt&&(t>xN||e.velocity===void 0)){var u=n.deltaX-e.deltaX,l=n.deltaY-e.deltaY,h=H$(t,u,l);a=h.x,o=h.y,i=gi(h.x)>gi(h.y)?h.x:h.y,s=j$(u,l),r.lastInterval=n}else i=e.velocity,a=e.velocityX,o=e.velocityY,s=e.direction;n.velocity=i,n.velocityX=a,n.velocityY=o,n.direction=s}function NN(r,n){var e=r.session,t=n.pointers,i=t.length;e.firstInput||(e.firstInput=np(n)),i>1&&!e.firstMultiple?e.firstMultiple=np(n):i===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,u=n.center=z$(t);n.timeStamp=cf(),n.deltaTime=n.timeStamp-a.timeStamp,n.angle=rd(s,u),n.distance=vs(s,u),MN(e,n),n.offsetDirection=j$(n.deltaX,n.deltaY);var l=H$(n.deltaTime,n.deltaX,n.deltaY);n.overallVelocityX=l.x,n.overallVelocityY=l.y,n.overallVelocity=gi(l.x)>gi(l.y)?l.x:l.y,n.scale=o?DN(o.pointers,t):1,n.rotation=o?RN(o.pointers,t):0,n.maxPointers=e.prevInput?n.pointers.length>e.prevInput.maxPointers?n.pointers.length:e.prevInput.maxPointers:n.pointers.length,FN(e,n);var h=r.element,d=n.srcEvent,f;d.composedPath?f=d.composedPath()[0]:d.path?f=d.path[0]:f=d.target,pf(f,h)&&(h=f),n.target=h}function BN(r,n,e){var t=e.pointers.length,i=e.changedPointers.length,a=n&at&&t-i===0,o=n&(xe|gt)&&t-i===0;e.isFirst=!!a,e.isFinal=!!o,a&&(r.session={}),e.eventType=n,NN(r,e),r.emit("hammer.input",e),r.recognize(e),r.session.prevInput=e}function aa(r){return r.trim().split(/\s+/g)}function Gn(r,n,e){sr(aa(n),function(t){r.addEventListener(t,e,!1)})}function Kn(r,n,e){sr(aa(n),function(t){r.removeEventListener(t,e,!1)})}function ap(r){var n=r.ownerDocument||r;return n.defaultView||n.parentWindow||window}var $n=function(){function r(e,t){var i=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(a){nu(e.options.enable,[e])&&i.handler(a)},this.init()}var n=r.prototype;return n.handler=function(){},n.init=function(){this.evEl&&Gn(this.element,this.evEl,this.domHandler),this.evTarget&&Gn(this.target,this.evTarget,this.domHandler),this.evWin&&Gn(ap(this.element),this.evWin,this.domHandler)},n.destroy=function(){this.evEl&&Kn(this.element,this.evEl,this.domHandler),this.evTarget&&Kn(this.target,this.evTarget,this.domHandler),this.evWin&&Kn(ap(this.element),this.evWin,this.domHandler)},r}();function yi(r,n,e){if(r.indexOf&&!e)return r.indexOf(n);for(var t=0;t<r.length;){if(e&&r[t][e]==n||!e&&r[t]===n)return t;t++}return-1}var LN={pointerdown:at,pointermove:ki,pointerup:xe,pointercancel:gt,pointerout:gt},zN={2:Na,3:PN,4:vf,5:CN},W$="pointerdown",V$="pointermove pointerup pointercancel";or.MSPointerEvent&&!or.PointerEvent&&(W$="MSPointerDown",V$="MSPointerMove MSPointerUp MSPointerCancel");var U$=function(r){xt(n,r);function n(){var t,i=n.prototype;return i.evEl=W$,i.evWin=V$,t=r.apply(this,arguments)||this,t.store=t.manager.session.pointerEvents=[],t}var e=n.prototype;return e.handler=function(i){var a=this.store,o=!1,s=i.type.toLowerCase().replace("ms",""),u=LN[s],l=zN[i.pointerType]||i.pointerType,h=l===Na,d=yi(a,i.pointerId,"pointerId");u&at&&(i.button===0||h)?d<0&&(a.push(i),d=a.length-1):u&(xe|gt)&&(o=!0),!(d<0)&&(a[d]=i,this.callback(this.manager,u,{pointers:a,changedPointers:[i],pointerType:l,srcEvent:i}),o&&a.splice(d,1))},n}($n);function oa(r){return Array.prototype.slice.call(r,0)}function gf(r,n,e){for(var t=[],i=[],a=0;a<r.length;){var o=n?r[a][n]:r[a];yi(i,o)<0&&t.push(r[a]),i[a]=o,a++}return e&&(n?t=t.sort(function(s,u){return s[n]>u[n]}):t=t.sort()),t}var jN={touchstart:at,touchmove:ki,touchend:xe,touchcancel:gt},HN="touchstart touchmove touchend touchcancel",yf=function(r){xt(n,r);function n(){var t;return n.prototype.evTarget=HN,t=r.apply(this,arguments)||this,t.targetIds={},t}var e=n.prototype;return e.handler=function(i){var a=jN[i.type],o=WN.call(this,i,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:Na,srcEvent:i})},n}($n);function WN(r,n){var e=oa(r.touches),t=this.targetIds;if(n&(at|ki)&&e.length===1)return t[e[0].identifier]=!0,[e,e];var i,a,o=oa(r.changedTouches),s=[],u=this.target;if(a=e.filter(function(l){return pf(l.target,u)}),n===at)for(i=0;i<a.length;)t[a[i].identifier]=!0,i++;for(i=0;i<o.length;)t[o[i].identifier]&&s.push(o[i]),n&(xe|gt)&&delete t[o[i].identifier],i++;if(s.length)return[gf(a.concat(s),"identifier",!0),s]}var VN={mousedown:at,mousemove:ki,mouseup:xe},UN="mousedown",GN="mousemove mouseup",mf=function(r){xt(n,r);function n(){var t,i=n.prototype;return i.evEl=UN,i.evWin=GN,t=r.apply(this,arguments)||this,t.pressed=!1,t}var e=n.prototype;return e.handler=function(i){var a=VN[i.type];a&at&&i.button===0&&(this.pressed=!0),a&ki&&i.which!==1&&(a=xe),this.pressed&&(a&xe&&(this.pressed=!1),this.callback(this.manager,a,{pointers:[i],changedPointers:[i],pointerType:vf,srcEvent:i}))},n}($n),KN=2500,op=25;function sp(r){var n=r.changedPointers,e=n[0];if(e.identifier===this.primaryTouch){var t={x:e.clientX,y:e.clientY},i=this.lastTouches;this.lastTouches.push(t);var a=function(){var s=i.indexOf(t);s>-1&&i.splice(s,1)};setTimeout(a,KN)}}function qN(r,n){r&at?(this.primaryTouch=n.changedPointers[0].identifier,sp.call(this,n)):r&(xe|gt)&&sp.call(this,n)}function YN(r){for(var n=r.srcEvent.clientX,e=r.srcEvent.clientY,t=0;t<this.lastTouches.length;t++){var i=this.lastTouches[t],a=Math.abs(n-i.x),o=Math.abs(e-i.y);if(a<=op&&o<=op)return!0}return!1}var G$=function(){var r=function(n){xt(e,n);function e(i,a){var o;return o=n.call(this,i,a)||this,o.handler=function(s,u,l){var h=l.pointerType===Na,d=l.pointerType===vf;if(!(d&&l.sourceCapabilities&&l.sourceCapabilities.firesTouchEvents)){if(h)qN.call(Eo(Eo(o)),u,l);else if(d&&YN.call(Eo(Eo(o)),l))return;o.callback(s,u,l)}},o.touch=new yf(o.manager,o.handler),o.mouse=new mf(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}var t=e.prototype;return t.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}($n);return r}();function XN(r){var n,e=r.options.inputClass;return e?n=e:kN?n=U$:IN?n=yf:F$?n=G$:n=mf,new n(r,BN)}function qi(r,n,e){return Array.isArray(r)?(sr(r,e[n],e),!0):!1}var qo=1,Pt=2,nn=4,Br=8,ur=Br,sa=16,qt=32,QN=1;function ZN(){return QN++}function Oo(r,n){var e=n.manager;return e?e.get(r):r}function up(r){return r&sa?"cancel":r&Br?"end":r&nn?"move":r&Pt?"start":""}var ja=function(){function r(e){e===void 0&&(e={}),this.options=Lt({enable:!0},e),this.id=ZN(),this.manager=null,this.state=qo,this.simultaneous={},this.requireFail=[]}var n=r.prototype;return n.set=function(t){return pi(this.options,t),this.manager&&this.manager.touchAction.update(),this},n.recognizeWith=function(t){if(qi(t,"recognizeWith",this))return this;var i=this.simultaneous;return t=Oo(t,this),i[t.id]||(i[t.id]=t,t.recognizeWith(this)),this},n.dropRecognizeWith=function(t){return qi(t,"dropRecognizeWith",this)?this:(t=Oo(t,this),delete this.simultaneous[t.id],this)},n.requireFailure=function(t){if(qi(t,"requireFailure",this))return this;var i=this.requireFail;return t=Oo(t,this),yi(i,t)===-1&&(i.push(t),t.requireFailure(this)),this},n.dropRequireFailure=function(t){if(qi(t,"dropRequireFailure",this))return this;t=Oo(t,this);var i=yi(this.requireFail,t);return i>-1&&this.requireFail.splice(i,1),this},n.hasRequireFailures=function(){return this.requireFail.length>0},n.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},n.emit=function(t){var i=this,a=this.state;function o(s){i.manager.emit(s,t)}a<Br&&o(i.options.event+up(a)),o(i.options.event),t.additionalEvent&&o(t.additionalEvent),a>=Br&&o(i.options.event+up(a))},n.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=qt},n.canEmit=function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(qt|qo)))return!1;t++}return!0},n.recognize=function(t){var i=pi({},t);if(!nu(this.options.enable,[this,i])){this.reset(),this.state=qt;return}this.state&(ur|sa|qt)&&(this.state=qo),this.state=this.process(i),this.state&(Pt|nn|Br|sa)&&this.tryEmit(i)},n.process=function(t){},n.getTouchAction=function(){},n.reset=function(){},r}(),id=function(r){xt(n,r);function n(t){var i;return t===void 0&&(t={}),i=r.call(this,Lt({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this,i.pTime=!1,i.pCenter=!1,i._timer=null,i._input=null,i.count=0,i}var e=n.prototype;return e.getTouchAction=function(){return[td]},e.process=function(i){var a=this,o=this.options,s=i.pointers.length===o.pointers,u=i.distance<o.threshold,l=i.deltaTime<o.time;if(this.reset(),i.eventType&at&&this.count===0)return this.failTimeout();if(u&&l&&s){if(i.eventType!==xe)return this.failTimeout();var h=this.pTime?i.timeStamp-this.pTime<o.interval:!0,d=!this.pCenter||vs(this.pCenter,i.center)<o.posThreshold;this.pTime=i.timeStamp,this.pCenter=i.center,!d||!h?this.count=1:this.count+=1,this._input=i;var f=this.count%o.taps;if(f===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){a.state=ur,a.tryEmit()},o.interval),Pt):ur}return qt},e.failTimeout=function(){var i=this;return this._timer=setTimeout(function(){i.state=qt},this.options.interval),qt},e.reset=function(){clearTimeout(this._timer)},e.emit=function(){this.state===ur&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},n}(ja),an=function(r){xt(n,r);function n(t){return t===void 0&&(t={}),r.call(this,Lt({pointers:1},t))||this}var e=n.prototype;return e.attrTest=function(i){var a=this.options.pointers;return a===0||i.pointers.length===a},e.process=function(i){var a=this.state,o=i.eventType,s=a&(Pt|nn),u=this.attrTest(i);return s&&(o&gt||!u)?a|sa:s||u?o&xe?a|Br:a&Pt?a|nn:Pt:qt},n}(ja);function K$(r){return r===rn?"down":r===za?"up":r===Ba?"left":r===La?"right":""}var bf=function(r){xt(n,r);function n(t){var i;return t===void 0&&(t={}),i=r.call(this,Lt({event:"pan",threshold:10,pointers:1,direction:N$},t))||this,i.pX=null,i.pY=null,i}var e=n.prototype;return e.getTouchAction=function(){var i=this.options.direction,a=[];return i&Qt&&a.push(na),i&si&&a.push(ia),a},e.directionTest=function(i){var a=this.options,o=!0,s=i.distance,u=i.direction,l=i.deltaX,h=i.deltaY;return u&a.direction||(a.direction&Qt?(u=l===0?fs:l<0?Ba:La,o=l!==this.pX,s=Math.abs(i.deltaX)):(u=h===0?fs:h<0?za:rn,o=h!==this.pY,s=Math.abs(i.deltaY))),i.direction=u,o&&s>a.threshold&&u&a.direction},e.attrTest=function(i){return an.prototype.attrTest.call(this,i)&&(this.state&Pt||!(this.state&Pt)&&this.directionTest(i))},e.emit=function(i){this.pX=i.deltaX,this.pY=i.deltaY;var a=K$(i.direction);a&&(i.additionalEvent=this.options.event+a),r.prototype.emit.call(this,i)},n}(an),q$=function(r){xt(n,r);function n(t){return t===void 0&&(t={}),r.call(this,Lt({event:"swipe",threshold:10,velocity:.3,direction:Qt|si,pointers:1},t))||this}var e=n.prototype;return e.getTouchAction=function(){return bf.prototype.getTouchAction.call(this)},e.attrTest=function(i){var a=this.options.direction,o;return a&(Qt|si)?o=i.overallVelocity:a&Qt?o=i.overallVelocityX:a&si&&(o=i.overallVelocityY),r.prototype.attrTest.call(this,i)&&a&i.offsetDirection&&i.distance>this.options.threshold&&i.maxPointers===this.options.pointers&&gi(o)>this.options.velocity&&i.eventType&xe},e.emit=function(i){var a=K$(i.offsetDirection);a&&this.manager.emit(this.options.event+a,i),this.manager.emit(this.options.event,i)},n}(an),Y$=function(r){xt(n,r);function n(t){return t===void 0&&(t={}),r.call(this,Lt({event:"pinch",threshold:0,pointers:2},t))||this}var e=n.prototype;return e.getTouchAction=function(){return[oi]},e.attrTest=function(i){return r.prototype.attrTest.call(this,i)&&(Math.abs(i.scale-1)>this.options.threshold||this.state&Pt)},e.emit=function(i){if(i.scale!==1){var a=i.scale<1?"in":"out";i.additionalEvent=this.options.event+a}r.prototype.emit.call(this,i)},n}(an),X$=function(r){xt(n,r);function n(t){return t===void 0&&(t={}),r.call(this,Lt({event:"rotate",threshold:0,pointers:2},t))||this}var e=n.prototype;return e.getTouchAction=function(){return[oi]},e.attrTest=function(i){return r.prototype.attrTest.call(this,i)&&(Math.abs(i.rotation)>this.options.threshold||this.state&Pt)},n}(an),Q$=function(r){xt(n,r);function n(t){var i;return t===void 0&&(t={}),i=r.call(this,Lt({event:"press",pointers:1,time:251,threshold:9},t))||this,i._timer=null,i._input=null,i}var e=n.prototype;return e.getTouchAction=function(){return[R$]},e.process=function(i){var a=this,o=this.options,s=i.pointers.length===o.pointers,u=i.distance<o.threshold,l=i.deltaTime>o.time;if(this._input=i,!u||!s||i.eventType&(xe|gt)&&!l)this.reset();else if(i.eventType&at)this.reset(),this._timer=setTimeout(function(){a.state=ur,a.tryEmit()},o.time);else if(i.eventType&xe)return ur;return qt},e.reset=function(){clearTimeout(this._timer)},e.emit=function(i){this.state===ur&&(i&&i.eventType&xe?this.manager.emit(this.options.event+"up",i):(this._input.timeStamp=cf(),this.manager.emit(this.options.event,this._input)))},n}(ja),Z$={domEvents:!1,touchAction:D$,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},lp=[[X$,{enable:!1}],[Y$,{enable:!1},["rotate"]],[q$,{direction:Qt}],[bf,{direction:Qt},["swipe"]],[id],[id,{event:"doubletap",taps:2},["tap"]],[Q$]],JN=1,hp=2;function dp(r,n){var e=r.element;if(e.style){var t;sr(r.options.cssProps,function(i,a){t=iu(e.style,a),n?(r.oldCssProps[t]=e.style[t],e.style[t]=i):e.style[t]=r.oldCssProps[t]||""}),n||(r.oldCssProps={})}}function eB(r,n){var e=document.createEvent("Event");e.initEvent(r,!0,!0),e.gesture=n,n.target.dispatchEvent(e)}var fp=function(){function r(e,t){var i=this;this.options=pi({},Z$,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=XN(this),this.touchAction=new L$(this,this.options.touchAction),dp(this,!0),sr(this.options.recognizers,function(a){var o=i.add(new a[0](a[1]));a[2]&&o.recognizeWith(a[2]),a[3]&&o.requireFailure(a[3])},this)}var n=r.prototype;return n.set=function(t){return pi(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},n.stop=function(t){this.session.stopped=t?hp:JN},n.recognize=function(t){var i=this.session;if(!i.stopped){this.touchAction.preventDefaults(t);var a,o=this.recognizers,s=i.curRecognizer;(!s||s&&s.state&ur)&&(i.curRecognizer=null,s=null);for(var u=0;u<o.length;)a=o[u],i.stopped!==hp&&(!s||a===s||a.canRecognizeWith(s))?a.recognize(t):a.reset(),!s&&a.state&(Pt|nn|Br)&&(i.curRecognizer=a,s=a),u++}},n.get=function(t){if(t instanceof ja)return t;for(var i=this.recognizers,a=0;a<i.length;a++)if(i[a].options.event===t)return i[a];return null},n.add=function(t){if(qi(t,"add",this))return this;var i=this.get(t.options.event);return i&&this.remove(i),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},n.remove=function(t){if(qi(t,"remove",this))return this;var i=this.get(t);if(t){var a=this.recognizers,o=yi(a,i);o!==-1&&(a.splice(o,1),this.touchAction.update())}return this},n.on=function(t,i){if(t===void 0||i===void 0)return this;var a=this.handlers;return sr(aa(t),function(o){a[o]=a[o]||[],a[o].push(i)}),this},n.off=function(t,i){if(t===void 0)return this;var a=this.handlers;return sr(aa(t),function(o){i?a[o]&&a[o].splice(yi(a[o],i),1):delete a[o]}),this},n.emit=function(t,i){this.options.domEvents&&eB(t,i);var a=this.handlers[t]&&this.handlers[t].slice();if(!(!a||!a.length)){i.type=t,i.preventDefault=function(){i.srcEvent.preventDefault()};for(var o=0;o<a.length;)a[o](i),o++}},n.destroy=function(){this.element&&dp(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},r}(),tB={touchstart:at,touchmove:ki,touchend:xe,touchcancel:gt},rB="touchstart",iB="touchstart touchmove touchend touchcancel",nB=function(r){xt(n,r);function n(){var t,i=n.prototype;return i.evTarget=rB,i.evWin=iB,t=r.apply(this,arguments)||this,t.started=!1,t}var e=n.prototype;return e.handler=function(i){var a=tB[i.type];if(a===at&&(this.started=!0),!!this.started){var o=aB.call(this,i,a);a&(xe|gt)&&o[0].length-o[1].length===0&&(this.started=!1),this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:Na,srcEvent:i})}},n}($n);function aB(r,n){var e=oa(r.touches),t=oa(r.changedTouches);return n&(xe|gt)&&(e=gf(e.concat(t),"identifier",!0)),[e,t]}function J$(r,n,e){var t="DEPRECATED METHOD: "+n+`
34
- `+e+` AT
35
- `;return function(){var i=new Error("get-stack-trace"),a=i&&i.stack?i.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,t,a),r.apply(this,arguments)}}var e1=J$(function(r,n,e){for(var t=Object.keys(n),i=0;i<t.length;)(!e||e&&r[t[i]]===void 0)&&(r[t[i]]=n[t[i]]),i++;return r},"extend","Use `assign`."),oB=J$(function(r,n){return e1(r,n,!0)},"merge","Use `assign`.");function sB(r,n,e){var t=n.prototype,i;i=r.prototype=Object.create(t),i.constructor=r,i._super=t,e&&pi(i,e)}function cp(r,n){return function(){return r.apply(n,arguments)}}var uB=function(){var r=function(e,t){return t===void 0&&(t={}),new fp(e,Lt({recognizers:lp.concat()},t))};return r.VERSION="2.0.17-rc",r.DIRECTION_ALL=N$,r.DIRECTION_DOWN=rn,r.DIRECTION_LEFT=Ba,r.DIRECTION_RIGHT=La,r.DIRECTION_UP=za,r.DIRECTION_HORIZONTAL=Qt,r.DIRECTION_VERTICAL=si,r.DIRECTION_NONE=fs,r.DIRECTION_DOWN=rn,r.INPUT_START=at,r.INPUT_MOVE=ki,r.INPUT_END=xe,r.INPUT_CANCEL=gt,r.STATE_POSSIBLE=qo,r.STATE_BEGAN=Pt,r.STATE_CHANGED=nn,r.STATE_ENDED=Br,r.STATE_RECOGNIZED=ur,r.STATE_CANCELLED=sa,r.STATE_FAILED=qt,r.Manager=fp,r.Input=$n,r.TouchAction=L$,r.TouchInput=yf,r.MouseInput=mf,r.PointerEventInput=U$,r.TouchMouseInput=G$,r.SingleTouchInput=nB,r.Recognizer=ja,r.AttrRecognizer=an,r.Tap=id,r.Pan=bf,r.Swipe=q$,r.Pinch=Y$,r.Rotate=X$,r.Press=Q$,r.on=Gn,r.off=Kn,r.each=sr,r.merge=oB,r.extend=e1,r.bindFn=cp,r.assign=pi,r.inherit=sB,r.bindFn=cp,r.prefixed=iu,r.toArray=oa,r.inArray=yi,r.uniqueArray=gf,r.splitStr=aa,r.boolOrFn=nu,r.hasParent=pf,r.addEventListeners=Gn,r.removeEventListeners=Kn,r.defaults=pi({},Z$,{preset:lp}),r}(),lB=uB;function t1(r,n){var e=typeof eu<"u"&&xa(r)||r["@@iterator"];if(!e){if($t(r)||(e=hB(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
36
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function hB(r,n){var e;if(r){if(typeof r=="string")return vp(r,n);var t=ru(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return nf(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return vp(r,n)}}function vp(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}var r1=eu("DELETE");function dB(r){for(var n,e=arguments.length,t=new Array(e>1?e-1:0),i=1;i<e;i++)t[i-1]=arguments[i];return i1.apply(void 0,tu(n=[{},r]).call(n,t))}function i1(){var r=ps.apply(void 0,arguments);return a1(r),r}function ps(){for(var r=arguments.length,n=new Array(r),e=0;e<r;e++)n[e]=arguments[e];if(n.length<2)return n[0];if(n.length>2){var t;return ps.apply(void 0,tu(t=[i1(n[0],n[1])]).call(t,ft(ru(n).call(n,2))))}var i=n[0],a=n[1],o=t1(GD(a)),s;try{for(o.s();!(s=o.n()).done;){var u=s.value;Object.prototype.propertyIsEnumerable.call(a,u)&&(a[u]===r1?delete i[u]:i[u]!==null&&a[u]!==null&&vt(i[u])==="object"&&vt(a[u])==="object"&&!$t(i[u])&&!$t(a[u])?i[u]=ps(i[u],a[u]):i[u]=n1(a[u]))}}catch(l){o.e(l)}finally{o.f()}return i}function n1(r){return $t(r)?Dt(r).call(r,function(n){return n1(n)}):vt(r)==="object"&&r!==null?ps({},r):r}function a1(r){for(var n=0,e=df(r);n<e.length;n++){var t=e[n];r[t]===r1?delete r[t]:vt(r[t])==="object"&&r[t]!==null&&a1(r[t])}}function fB(){var r=function(){};return{on:r,off:r,destroy:r,emit:r,get:function(){return{set:r}}}}var cB=typeof window<"u"?window.Hammer||lB:function(){return fB()};function ir(r){var n=this,e;this._cleanupQueue=[],this.active=!1,this._dom={container:r,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(function(){n._dom.overlay.parentNode.removeChild(n._dom.overlay)});var t=cB(this._dom.overlay);t.on("tap",vb(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(function(){t.destroy()});var i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];vi(i).call(i,function(a){t.on(a,function(o){o.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(a){vB(a.target,r)||n.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(function(){document.body.removeEventListener("click",n._onClick)})),this._escListener=function(a){("key"in a?a.key==="Escape":a.keyCode===27)&&n.deactivate()}}_N(ir.prototype);ir.current=null;ir.prototype.destroy=function(){var r,n;this.deactivate();var e=t1(A2(r=S$(n=this._cleanupQueue).call(n,0)).call(r)),t;try{for(e.s();!(t=e.n()).done;){var i=t.value;i()}}catch(a){e.e(a)}finally{e.f()}};ir.prototype.activate=function(){ir.current&&ir.current.deactivate(),ir.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)};ir.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")};ir.prototype._onTapOverlay=function(r){this.activate(),r.srcEvent.stopPropagation()};function vB(r,n){for(;r;){if(r===n)return!0;r=r.parentNode}return!1}var pB=Y,gB=Hs,yB=Ds,mB=pB.TypeError,bB=function(r){if(gB(r))return r;throw mB(yB(r)+" is not a constructor")},$B=ee,wB=br,bl=fn,_B=cb,pp=bB,EB=Ht,gp=st,SB=gn,o1=ge,$f=wB("Reflect","construct"),OB=Object.prototype,TB=[].push,s1=o1(function(){function r(){}return!($f(function(){},[],r)instanceof r)}),u1=!o1(function(){$f(function(){})}),yp=s1||u1;$B({target:"Reflect",stat:!0,forced:yp,sham:yp},{construct:function(n,e){pp(n),EB(e);var t=arguments.length<3?n:pp(arguments[2]);if(u1&&!s1)return $f(n,e,t);if(n==t){switch(e.length){case 0:return new n;case 1:return new n(e[0]);case 2:return new n(e[0],e[1]);case 3:return new n(e[0],e[1],e[2]);case 4:return new n(e[0],e[1],e[2],e[3])}var i=[null];return bl(TB,i,e),new(bl(_B,n,i))}var a=t.prototype,o=SB(gp(a)?a:OB),s=bl(n,o,e);return gp(s)?s:o}});var kB=$e,IB=kB.Reflect.construct,PB=IB,CB=PB,Yo=CB;function Jr(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}var xB=C$,AB=xB,MB=AB,DB=MB,RB=DB,FB=ee,NB=rC;FB({target:"Object",stat:!0},{setPrototypeOf:NB});var BB=$e,LB=BB.Object.setPrototypeOf,zB=LB,jB=zB,HB=jB,WB=HB,VB=WB,UB=VB,l1=UB;function nd(r,n){return nd=l1||function(t,i){return t.__proto__=i,t},nd(r,n)}function GB(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=RB(n&&n.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Bs(r,"prototype",{writable:!1}),n&&nd(r,n)}function KB(r,n){if(n&&(vt(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jr(r)}var qB=GR,YB=qB,XB=YB,QB=XB,mp=QB;function gs(r){return gs=l1?mp:function(e){return e.__proto__||mp(e)},gs(r)}var h1={exports:{}};(function(r){var n=function(e){var t=Object.prototype,i=t.hasOwnProperty,a,o=typeof Symbol=="function"?Symbol:{},s=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function h(C,I,N){return Object.defineProperty(C,I,{value:N,enumerable:!0,configurable:!0,writable:!0}),C[I]}try{h({},"")}catch{h=function(I,N,V){return I[N]=V}}function d(C,I,N,V){var B=I&&I.prototype instanceof $?I:$,Z=Object.create(B.prototype),ne=new Q(V||[]);return Z._invoke=F(C,N,ne),Z}e.wrap=d;function f(C,I,N){try{return{type:"normal",arg:C.call(I,N)}}catch(V){return{type:"throw",arg:V}}}var c="suspendedStart",v="suspendedYield",g="executing",b="completed",p={};function $(){}function y(){}function m(){}var _={};h(_,s,function(){return this});var O=Object.getPrototypeOf,k=O&&O(O(re([])));k&&k!==t&&i.call(k,s)&&(_=k);var S=m.prototype=$.prototype=Object.create(_);y.prototype=m,h(S,"constructor",m),h(m,"constructor",y),y.displayName=h(m,l,"GeneratorFunction");function w(C){["next","throw","return"].forEach(function(I){h(C,I,function(N){return this._invoke(I,N)})})}e.isGeneratorFunction=function(C){var I=typeof C=="function"&&C.constructor;return I?I===y||(I.displayName||I.name)==="GeneratorFunction":!1},e.mark=function(C){return Object.setPrototypeOf?Object.setPrototypeOf(C,m):(C.__proto__=m,h(C,l,"GeneratorFunction")),C.prototype=Object.create(S),C},e.awrap=function(C){return{__await:C}};function E(C,I){function N(Z,ne,he,Ne){var we=f(C[Z],C,ne);if(we.type==="throw")Ne(we.arg);else{var Ye=we.arg,Yr=Ye.value;return Yr&&typeof Yr=="object"&&i.call(Yr,"__await")?I.resolve(Yr.__await).then(function(Xr){N("next",Xr,he,Ne)},function(Xr){N("throw",Xr,he,Ne)}):I.resolve(Yr).then(function(Xr){Ye.value=Xr,he(Ye)},function(Xr){return N("throw",Xr,he,Ne)})}}var V;function B(Z,ne){function he(){return new I(function(Ne,we){N(Z,ne,Ne,we)})}return V=V?V.then(he,he):he()}this._invoke=B}w(E.prototype),h(E.prototype,u,function(){return this}),e.AsyncIterator=E,e.async=function(C,I,N,V,B){B===void 0&&(B=Promise);var Z=new E(d(C,I,N,V),B);return e.isGeneratorFunction(I)?Z:Z.next().then(function(ne){return ne.done?ne.value:Z.next()})};function F(C,I,N){var V=c;return function(Z,ne){if(V===g)throw new Error("Generator is already running");if(V===b){if(Z==="throw")throw ne;return ae()}for(N.method=Z,N.arg=ne;;){var he=N.delegate;if(he){var Ne=H(he,N);if(Ne){if(Ne===p)continue;return Ne}}if(N.method==="next")N.sent=N._sent=N.arg;else if(N.method==="throw"){if(V===c)throw V=b,N.arg;N.dispatchException(N.arg)}else N.method==="return"&&N.abrupt("return",N.arg);V=g;var we=f(C,I,N);if(we.type==="normal"){if(V=N.done?b:v,we.arg===p)continue;return{value:we.arg,done:N.done}}else we.type==="throw"&&(V=b,N.method="throw",N.arg=we.arg)}}}function H(C,I){var N=C.iterator[I.method];if(N===a){if(I.delegate=null,I.method==="throw"){if(C.iterator.return&&(I.method="return",I.arg=a,H(C,I),I.method==="throw"))return p;I.method="throw",I.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var V=f(N,C.iterator,I.arg);if(V.type==="throw")return I.method="throw",I.arg=V.arg,I.delegate=null,p;var B=V.arg;if(!B)return I.method="throw",I.arg=new TypeError("iterator result is not an object"),I.delegate=null,p;if(B.done)I[C.resultName]=B.value,I.next=C.nextLoc,I.method!=="return"&&(I.method="next",I.arg=a);else return B;return I.delegate=null,p}w(S),h(S,l,"Generator"),h(S,s,function(){return this}),h(S,"toString",function(){return"[object Generator]"});function z(C){var I={tryLoc:C[0]};1 in C&&(I.catchLoc=C[1]),2 in C&&(I.finallyLoc=C[2],I.afterLoc=C[3]),this.tryEntries.push(I)}function q(C){var I=C.completion||{};I.type="normal",delete I.arg,C.completion=I}function Q(C){this.tryEntries=[{tryLoc:"root"}],C.forEach(z,this),this.reset(!0)}e.keys=function(C){var I=[];for(var N in C)I.push(N);return I.reverse(),function V(){for(;I.length;){var B=I.pop();if(B in C)return V.value=B,V.done=!1,V}return V.done=!0,V}};function re(C){if(C){var I=C[s];if(I)return I.call(C);if(typeof C.next=="function")return C;if(!isNaN(C.length)){var N=-1,V=function B(){for(;++N<C.length;)if(i.call(C,N))return B.value=C[N],B.done=!1,B;return B.value=a,B.done=!0,B};return V.next=V}}return{next:ae}}e.values=re;function ae(){return{value:a,done:!0}}return Q.prototype={constructor:Q,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach(q),!C)for(var I in this)I.charAt(0)==="t"&&i.call(this,I)&&!isNaN(+I.slice(1))&&(this[I]=a)},stop:function(){this.done=!0;var C=this.tryEntries[0],I=C.completion;if(I.type==="throw")throw I.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var I=this;function N(Ne,we){return Z.type="throw",Z.arg=C,I.next=Ne,we&&(I.method="next",I.arg=a),!!we}for(var V=this.tryEntries.length-1;V>=0;--V){var B=this.tryEntries[V],Z=B.completion;if(B.tryLoc==="root")return N("end");if(B.tryLoc<=this.prev){var ne=i.call(B,"catchLoc"),he=i.call(B,"finallyLoc");if(ne&&he){if(this.prev<B.catchLoc)return N(B.catchLoc,!0);if(this.prev<B.finallyLoc)return N(B.finallyLoc)}else if(ne){if(this.prev<B.catchLoc)return N(B.catchLoc,!0)}else if(he){if(this.prev<B.finallyLoc)return N(B.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(C,I){for(var N=this.tryEntries.length-1;N>=0;--N){var V=this.tryEntries[N];if(V.tryLoc<=this.prev&&i.call(V,"finallyLoc")&&this.prev<V.finallyLoc){var B=V;break}}B&&(C==="break"||C==="continue")&&B.tryLoc<=I&&I<=B.finallyLoc&&(B=null);var Z=B?B.completion:{};return Z.type=C,Z.arg=I,B?(this.method="next",this.next=B.finallyLoc,p):this.complete(Z)},complete:function(C,I){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&I&&(this.next=I),p},finish:function(C){for(var I=this.tryEntries.length-1;I>=0;--I){var N=this.tryEntries[I];if(N.finallyLoc===C)return this.complete(N.completion,N.afterLoc),q(N),p}},catch:function(C){for(var I=this.tryEntries.length-1;I>=0;--I){var N=this.tryEntries[I];if(N.tryLoc===C){var V=N.completion;if(V.type==="throw"){var B=V.arg;q(N)}return B}}throw new Error("illegal catch attempt")},delegateYield:function(C,I,N){return this.delegate={iterator:re(C),resultName:I,nextLoc:N},this.method==="next"&&(this.arg=a),p}},e}(r.exports);try{regeneratorRuntime=n}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}})(h1);var lt=h1.exports,wf={exports:{}},ZB=ge,JB=ZB(function(){if(typeof ArrayBuffer=="function"){var r=new ArrayBuffer(8);Object.isExtensible(r)&&Object.defineProperty(r,"a",{value:8})}}),eL=ge,tL=st,rL=Ei,bp=JB,Xo=Object.isExtensible,iL=eL(function(){Xo(1)}),nL=iL||bp?function(n){return!tL(n)||bp&&rL(n)=="ArrayBuffer"?!1:Xo?Xo(n):!0}:Xo,aL=ge,oL=!aL(function(){return Object.isExtensible(Object.preventExtensions({}))}),sL=ee,uL=de,lL=Ta,hL=st,_f=et,dL=wt.f,$p=Aa,fL=af,Ef=nL,cL=Fs,vL=oL,d1=!1,gr=cL("meta"),pL=0,Sf=function(r){dL(r,gr,{value:{objectID:"O"+pL++,weakData:{}}})},gL=function(r,n){if(!hL(r))return typeof r=="symbol"?r:(typeof r=="string"?"S":"P")+r;if(!_f(r,gr)){if(!Ef(r))return"F";if(!n)return"E";Sf(r)}return r[gr].objectID},yL=function(r,n){if(!_f(r,gr)){if(!Ef(r))return!0;if(!n)return!1;Sf(r)}return r[gr].weakData},mL=function(r){return vL&&d1&&Ef(r)&&!_f(r,gr)&&Sf(r),r},bL=function(){$L.enable=function(){},d1=!0;var r=$p.f,n=uL([].splice),e={};e[gr]=1,r(e).length&&($p.f=function(t){for(var i=r(t),a=0,o=i.length;a<o;a++)if(i[a]===gr){n(i,a,1);break}return i},sL({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:fL.f}))},$L=wf.exports={enable:bL,fastKey:gL,getWeakData:yL,onFreeze:mL};lL[gr]=!0;var wL=Y,_L=cn,EL=tr,SL=Ht,OL=Ds,TL=Rb,kL=_t,wp=je,IL=rf,PL=Ks,_p=Db,CL=wL.TypeError,Qo=function(r,n){this.stopped=r,this.result=n},Ep=Qo.prototype,f1=function(r,n,e){var t=e&&e.that,i=!!(e&&e.AS_ENTRIES),a=!!(e&&e.IS_ITERATOR),o=!!(e&&e.INTERRUPTED),s=_L(n,t),u,l,h,d,f,c,v,g=function(p){return u&&_p(u,"normal",p),new Qo(!0,p)},b=function(p){return i?(SL(p),o?s(p[0],p[1],g):s(p[0],p[1])):o?s(p,g):s(p)};if(a)u=r;else{if(l=PL(r),!l)throw CL(OL(r)+" is not iterable");if(TL(l)){for(h=0,d=kL(r);d>h;h++)if(f=b(r[h]),f&&wp(Ep,f))return f;return new Qo(!1)}u=IL(r,l)}for(c=u.next;!(v=EL(c,u)).done;){try{f=b(v.value)}catch(p){_p(u,"throw",p)}if(typeof f=="object"&&f&&wp(Ep,f))return f}return new Qo(!1)},xL=Y,AL=je,ML=xL.TypeError,c1=function(r,n){if(AL(n,r))return r;throw ML("Incorrect invocation")},DL=ee,RL=Y,FL=wf.exports,NL=ge,BL=vn,LL=f1,zL=c1,jL=Ke,HL=st,WL=Ca,VL=wt.f,UL=pn.forEach,GL=ze,v1=ka,KL=v1.set,qL=v1.getterFor,p1=function(r,n,e){var t=r.indexOf("Map")!==-1,i=r.indexOf("Weak")!==-1,a=t?"set":"add",o=RL[r],s=o&&o.prototype,u={},l;if(!GL||!jL(o)||!(i||s.forEach&&!NL(function(){new o().entries().next()})))l=e.getConstructor(n,r,t,a),FL.enable();else{l=n(function(f,c){KL(zL(f,h),{type:r,collection:new o}),c!=null&&LL(c,f[a],{that:f,AS_ENTRIES:t})});var h=l.prototype,d=qL(r);UL(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(f){var c=f=="add"||f=="set";f in s&&!(i&&f=="clear")&&BL(h,f,function(v,g){var b=d(this).collection;if(!c&&i&&!HL(v))return f=="get"?void 0:!1;var p=b[f](v===0?0:v,g);return c?this:p})}),i||VL(h,"size",{configurable:!0,get:function(){return d(this).collection.size}})}return WL(l,r,!1,!0),u[r]=l,DL({global:!0,forced:!0},u),i||e.setStrong(l,r,t),l},YL=Gs,XL=function(r,n,e){for(var t in n)e&&e.unsafe&&r[t]?r[t]=n[t]:YL(r,t,n[t],e);return r},QL=br,ZL=wt,JL=Re,ez=ze,Sp=JL("species"),tz=function(r){var n=QL(r),e=ZL.f;ez&&n&&!n[Sp]&&e(n,Sp,{configurable:!0,get:function(){return this}})},rz=wt.f,iz=gn,Op=XL,nz=cn,az=c1,oz=f1,sz=tf,uz=tz,Rn=ze,Tp=wf.exports.fastKey,g1=ka,kp=g1.set,$l=g1.getterFor,y1={getConstructor:function(r,n,e,t){var i=r(function(l,h){az(l,a),kp(l,{type:n,index:iz(null),first:void 0,last:void 0,size:0}),Rn||(l.size=0),h!=null&&oz(h,l[t],{that:l,AS_ENTRIES:e})}),a=i.prototype,o=$l(n),s=function(l,h,d){var f=o(l),c=u(l,h),v,g;return c?c.value=d:(f.last=c={index:g=Tp(h,!0),key:h,value:d,previous:v=f.last,next:void 0,removed:!1},f.first||(f.first=c),v&&(v.next=c),Rn?f.size++:l.size++,g!=="F"&&(f.index[g]=c)),l},u=function(l,h){var d=o(l),f=Tp(h),c;if(f!=="F")return d.index[f];for(c=d.first;c;c=c.next)if(c.key==h)return c};return Op(a,{clear:function(){for(var h=this,d=o(h),f=d.index,c=d.first;c;)c.removed=!0,c.previous&&(c.previous=c.previous.next=void 0),delete f[c.index],c=c.next;d.first=d.last=void 0,Rn?d.size=0:h.size=0},delete:function(l){var h=this,d=o(h),f=u(h,l);if(f){var c=f.next,v=f.previous;delete d.index[f.index],f.removed=!0,v&&(v.next=c),c&&(c.previous=v),d.first==f&&(d.first=c),d.last==f&&(d.last=v),Rn?d.size--:h.size--}return!!f},forEach:function(h){for(var d=o(this),f=nz(h,arguments.length>1?arguments[1]:void 0),c;c=c?c.next:d.first;)for(f(c.value,c.key,this);c&&c.removed;)c=c.previous},has:function(h){return!!u(this,h)}}),Op(a,e?{get:function(h){var d=u(this,h);return d&&d.value},set:function(h,d){return s(this,h===0?0:h,d)}}:{add:function(h){return s(this,h=h===0?0:h,h)}}),Rn&&rz(a,"size",{get:function(){return o(this).size}}),i},setStrong:function(r,n,e){var t=n+" Iterator",i=$l(n),a=$l(t);sz(r,n,function(o,s){kp(this,{type:t,target:o,state:i(o),kind:s,last:void 0})},function(){for(var o=a(this),s=o.kind,u=o.last;u&&u.removed;)u=u.previous;return!o.target||!(o.last=u=u?u.next:o.state.first)?(o.target=void 0,{value:void 0,done:!0}):s=="keys"?{value:u.key,done:!1}:s=="values"?{value:u.value,done:!1}:{value:[u.key,u.value],done:!1}},e?"entries":"values",!e,!0),uz(n)}},lz=p1,hz=y1;lz("Map",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},hz);var dz=$e,fz=dz.Map,cz=fz,vz=cz,m1=vz,pz=ee,gz=pn.some,yz=Sa,mz=yz("some");pz({target:"Array",proto:!0,forced:!mz},{some:function(n){return gz(this,n,arguments.length>1?arguments[1]:void 0)}});var bz=De,$z=bz("Array").some,wz=je,_z=$z,wl=Array.prototype,Ez=function(r){var n=r.some;return r===wl||wz(wl,r)&&n===wl.some?_z:n},Sz=Ez,Oz=Sz,Tz=Oz,kz=De,Iz=kz("Array").keys,Pz=Iz,Cz=Pz,xz=$r,Az=et,Mz=je,Dz=Cz,_l=Array.prototype,Rz={DOMTokenList:!0,NodeList:!0},Fz=function(r){var n=r.keys;return r===_l||Mz(_l,r)&&n===_l.keys||Az(Rz,xz(r))?Dz:n},Bi=Fz,Ip=jb,Nz=Math.floor,ad=function(r,n){var e=r.length,t=Nz(e/2);return e<8?Bz(r,n):Lz(r,ad(Ip(r,0,t),n),ad(Ip(r,t),n),n)},Bz=function(r,n){for(var e=r.length,t=1,i,a;t<e;){for(a=t,i=r[t];a&&n(r[a-1],i)>0;)r[a]=r[--a];a!==t++&&(r[a]=i)}return r},Lz=function(r,n,e,t){for(var i=n.length,a=e.length,o=0,s=0;o<i||s<a;)r[o+s]=o<i&&s<a?t(n[o],e[s])<=0?n[o++]:e[s++]:o<i?n[o++]:e[s++];return r},zz=ad,jz=wa,Pp=jz.match(/firefox\/(\d+)/i),Hz=!!Pp&&+Pp[1],Wz=wa,Vz=/MSIE|Trident/.test(Wz),Uz=wa,Cp=Uz.match(/AppleWebKit\/(\d+)\./),Gz=!!Cp&&+Cp[1],Kz=ee,b1=de,qz=Si,Yz=mt,Xz=_t,xp=Ti,Of=ge,Qz=zz,Zz=Sa,Ap=Hz,Jz=Vz,Mp=_a,Dp=Gz,Mr=[],Rp=b1(Mr.sort),e3=b1(Mr.push),t3=Of(function(){Mr.sort(void 0)}),r3=Of(function(){Mr.sort(null)}),i3=Zz("sort"),$1=!Of(function(){if(Mp)return Mp<70;if(!(Ap&&Ap>3)){if(Jz)return!0;if(Dp)return Dp<603;var r="",n,e,t,i;for(n=65;n<76;n++){switch(e=String.fromCharCode(n),n){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(i=0;i<47;i++)Mr.push({k:e+i,v:t})}for(Mr.sort(function(a,o){return o.v-a.v}),i=0;i<Mr.length;i++)e=Mr[i].k.charAt(0),r.charAt(r.length-1)!==e&&(r+=e);return r!=="DGBEFHACIJK"}}),n3=t3||!r3||!i3||!$1,a3=function(r){return function(n,e){return e===void 0?-1:n===void 0?1:r!==void 0?+r(n,e)||0:xp(n)>xp(e)?1:-1}};Kz({target:"Array",proto:!0,forced:n3},{sort:function(n){n!==void 0&&qz(n);var e=Yz(this);if($1)return n===void 0?Rp(e):Rp(e,n);var t=[],i=Xz(e),a,o;for(o=0;o<i;o++)o in e&&e3(t,e[o]);for(Qz(t,a3(n)),a=t.length,o=0;o<a;)e[o]=t[o++];for(;o<i;)delete e[o++];return e}});var o3=De,s3=o3("Array").sort,u3=je,l3=s3,El=Array.prototype,h3=function(r){var n=r.sort;return r===El||u3(El,r)&&n===El.sort?l3:n},d3=h3,f3=d3,od=f3,c3=De,v3=c3("Array").values,p3=v3,g3=p3,y3=$r,m3=et,b3=je,$3=g3,Sl=Array.prototype,w3={DOMTokenList:!0,NodeList:!0},_3=function(r){var n=r.values;return r===Sl||b3(Sl,r)&&n===Sl.values||m3(w3,y3(r))?$3:n},Fp=_3,Zi=w$,E3=De,S3=E3("Array").entries,O3=S3,T3=O3,k3=$r,I3=et,P3=je,C3=T3,Ol=Array.prototype,x3={DOMTokenList:!0,NodeList:!0},A3=function(r){var n=r.entries;return r===Ol||P3(Ol,r)&&n===Ol.entries||I3(x3,k3(r))?C3:n},M3=A3,To,D3=new Uint8Array(16);function R3(){if(!To&&(To=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!To))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return To(D3)}var F3=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function N3(r){return typeof r=="string"&&F3.test(r)}var Ue=[];for(var Tl=0;Tl<256;++Tl)Ue.push((Tl+256).toString(16).substr(1));function B3(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=(Ue[r[n+0]]+Ue[r[n+1]]+Ue[r[n+2]]+Ue[r[n+3]]+"-"+Ue[r[n+4]]+Ue[r[n+5]]+"-"+Ue[r[n+6]]+Ue[r[n+7]]+"-"+Ue[r[n+8]]+Ue[r[n+9]]+"-"+Ue[r[n+10]]+Ue[r[n+11]]+Ue[r[n+12]]+Ue[r[n+13]]+Ue[r[n+14]]+Ue[r[n+15]]).toLowerCase();if(!N3(e))throw TypeError("Stringified UUID is invalid");return e}function L3(r,n,e){r=r||{};var t=r.random||(r.rng||R3)();if(t[6]=t[6]&15|64,t[8]=t[8]&63|128,n){e=e||0;for(var i=0;i<16;++i)n[e+i]=t[i];return n}return B3(t)}function Np(r){return typeof r=="string"||typeof r=="number"}var z3=function(){function r(n){As(this,r),Se(this,"delay",void 0),Se(this,"max",void 0),Se(this,"_queue",[]),Se(this,"_timeout",null),Se(this,"_extended",null),this.delay=null,this.max=1/0,this.setOptions(n)}return Ls(r,[{key:"setOptions",value:function(e){e&&typeof e.delay<"u"&&(this.delay=e.delay),e&&typeof e.max<"u"&&(this.max=e.max),this._flushIfNeeded()}},{key:"destroy",value:function(){if(this.flush(),this._extended){for(var e=this._extended.object,t=this._extended.methods,i=0;i<t.length;i++){var a=t[i];a.original?e[a.name]=a.original:delete e[a.name]}this._extended=null}}},{key:"replace",value:function(e,t){var i=this,a=e[t];if(!a)throw new Error("Method "+t+" undefined");e[t]=function(){for(var o=arguments.length,s=new Array(o),u=0;u<o;u++)s[u]=arguments[u];i.queue({args:s,fn:a,context:this})}}},{key:"queue",value:function(e){typeof e=="function"?this._queue.push({fn:e}):this._queue.push(e),this._flushIfNeeded()}},{key:"_flushIfNeeded",value:function(){var e=this;this._queue.length>this.max&&this.flush(),this._timeout!=null&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&typeof this.delay=="number"&&(this._timeout=pN(function(){e.flush()},this.delay))}},{key:"flush",value:function(){var e,t;vi(e=S$(t=this._queue).call(t,0)).call(e,function(i){i.fn.apply(i.context||i.fn,i.args||[])})}}],[{key:"extend",value:function(e,t){var i=new r(t);if(e.flush!==void 0)throw new Error("Target object already has a property flush");e.flush=function(){i.flush()};var a=[{name:"flush",original:void 0}];if(t&&t.replace)for(var o=0;o<t.replace.length;o++){var s=t.replace[o];a.push({name:s,original:e[s]}),i.replace(e,s)}return i._extended={object:e,methods:a},i}}]),r}(),j3=function(){function r(){As(this,r),Se(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),Se(this,"subscribe",r.prototype.on),Se(this,"unsubscribe",r.prototype.off)}return Ls(r,[{key:"_trigger",value:function(e,t,i){var a,o;if(e==="*")throw new Error("Cannot trigger event *");vi(a=tu(o=[]).call(o,ft(this._subscribers[e]),ft(this._subscribers["*"]))).call(a,function(s){s(e,t,i??null)})}},{key:"on",value:function(e,t){typeof t=="function"&&this._subscribers[e].push(t)}},{key:"off",value:function(e,t){var i;this._subscribers[e]=Ui(i=this._subscribers[e]).call(i,function(a){return a!==t})}}]),r}(),H3=p1,W3=y1;H3("Set",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},W3);var V3=$e,U3=V3.Set,G3=U3,K3=G3,kl=K3,q3=rf,Y3=q3,X3=Y3,Q3=X3,Z3=Q3,J3=Z3,e5=J3,t5=e5,Il=t5,w1;function Gt(r,n){var e=typeof eu<"u"&&xa(r)||r["@@iterator"];if(!e){if($t(r)||(e=r5(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
37
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function r5(r,n){var e;if(r){if(typeof r=="string")return Bp(r,n);var t=ru(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return nf(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Bp(r,n)}}function Bp(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}w1=Zi;var Lp=function(){function r(n){As(this,r),Se(this,"_pairs",void 0),this._pairs=n}return Ls(r,[{key:w1,value:lt.mark(function n(){var e,t,i,a,o;return lt.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:e=Gt(this._pairs),u.prev=1,e.s();case 3:if((t=e.n()).done){u.next=9;break}return i=ut(t.value,2),a=i[0],o=i[1],u.next=7,[a,o];case 7:u.next=3;break;case 9:u.next=14;break;case 11:u.prev=11,u.t0=u.catch(1),e.e(u.t0);case 14:return u.prev=14,e.f(),u.finish(14);case 17:case"end":return u.stop()}},n,this,[[1,11,14,17]])})},{key:"entries",value:lt.mark(function n(){var e,t,i,a,o;return lt.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:e=Gt(this._pairs),u.prev=1,e.s();case 3:if((t=e.n()).done){u.next=9;break}return i=ut(t.value,2),a=i[0],o=i[1],u.next=7,[a,o];case 7:u.next=3;break;case 9:u.next=14;break;case 11:u.prev=11,u.t0=u.catch(1),e.e(u.t0);case 14:return u.prev=14,e.f(),u.finish(14);case 17:case"end":return u.stop()}},n,this,[[1,11,14,17]])})},{key:"keys",value:lt.mark(function n(){var e,t,i,a;return lt.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:e=Gt(this._pairs),s.prev=1,e.s();case 3:if((t=e.n()).done){s.next=9;break}return i=ut(t.value,1),a=i[0],s.next=7,a;case 7:s.next=3;break;case 9:s.next=14;break;case 11:s.prev=11,s.t0=s.catch(1),e.e(s.t0);case 14:return s.prev=14,e.f(),s.finish(14);case 17:case"end":return s.stop()}},n,this,[[1,11,14,17]])})},{key:"values",value:lt.mark(function n(){var e,t,i,a;return lt.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:e=Gt(this._pairs),s.prev=1,e.s();case 3:if((t=e.n()).done){s.next=9;break}return i=ut(t.value,2),a=i[1],s.next=7,a;case 7:s.next=3;break;case 9:s.next=14;break;case 11:s.prev=11,s.t0=s.catch(1),e.e(s.t0);case 14:return s.prev=14,e.f(),s.finish(14);case 17:case"end":return s.stop()}},n,this,[[1,11,14,17]])})},{key:"toIdArray",value:function(){var e;return Dt(e=ft(this._pairs)).call(e,function(t){return t[0]})}},{key:"toItemArray",value:function(){var e;return Dt(e=ft(this._pairs)).call(e,function(t){return t[1]})}},{key:"toEntryArray",value:function(){return ft(this._pairs)}},{key:"toObjectMap",value:function(){var e=BF(null),t=Gt(this._pairs),i;try{for(t.s();!(i=t.n()).done;){var a=ut(i.value,2),o=a[0],s=a[1];e[o]=s}}catch(u){t.e(u)}finally{t.f()}return e}},{key:"toMap",value:function(){return new m1(this._pairs)}},{key:"toIdSet",value:function(){return new kl(this.toIdArray())}},{key:"toItemSet",value:function(){return new kl(this.toItemArray())}},{key:"cache",value:function(){return new r(ft(this._pairs))}},{key:"distinct",value:function(e){var t=new kl,i=Gt(this._pairs),a;try{for(i.s();!(a=i.n()).done;){var o=ut(a.value,2),s=o[0],u=o[1];t.add(e(u,s))}}catch(l){i.e(l)}finally{i.f()}return t}},{key:"filter",value:function(e){var t=this._pairs;return new r(Se({},Zi,lt.mark(function i(){var a,o,s,u,l;return lt.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:a=Gt(t),d.prev=1,a.s();case 3:if((o=a.n()).done){d.next=10;break}if(s=ut(o.value,2),u=s[0],l=s[1],!e(l,u)){d.next=8;break}return d.next=8,[u,l];case 8:d.next=3;break;case 10:d.next=15;break;case 12:d.prev=12,d.t0=d.catch(1),a.e(d.t0);case 15:return d.prev=15,a.f(),d.finish(15);case 18:case"end":return d.stop()}},i,null,[[1,12,15,18]])})))}},{key:"forEach",value:function(e){var t=Gt(this._pairs),i;try{for(t.s();!(i=t.n()).done;){var a=ut(i.value,2),o=a[0],s=a[1];e(s,o)}}catch(u){t.e(u)}finally{t.f()}}},{key:"map",value:function(e){var t=this._pairs;return new r(Se({},Zi,lt.mark(function i(){var a,o,s,u,l;return lt.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:a=Gt(t),d.prev=1,a.s();case 3:if((o=a.n()).done){d.next=9;break}return s=ut(o.value,2),u=s[0],l=s[1],d.next=7,[u,e(l,u)];case 7:d.next=3;break;case 9:d.next=14;break;case 11:d.prev=11,d.t0=d.catch(1),a.e(d.t0);case 14:return d.prev=14,a.f(),d.finish(14);case 17:case"end":return d.stop()}},i,null,[[1,11,14,17]])})))}},{key:"max",value:function(e){var t=Il(this._pairs),i=t.next();if(i.done)return null;for(var a=i.value[1],o=e(i.value[1],i.value[0]);!(i=t.next()).done;){var s=ut(i.value,2),u=s[0],l=s[1],h=e(l,u);h>o&&(o=h,a=l)}return a}},{key:"min",value:function(e){var t=Il(this._pairs),i=t.next();if(i.done)return null;for(var a=i.value[1],o=e(i.value[1],i.value[0]);!(i=t.next()).done;){var s=ut(i.value,2),u=s[0],l=s[1],h=e(l,u);h<o&&(o=h,a=l)}return a}},{key:"reduce",value:function(e,t){var i=Gt(this._pairs),a;try{for(i.s();!(a=i.n()).done;){var o=ut(a.value,2),s=o[0],u=o[1];t=e(t,u,s)}}catch(l){i.e(l)}finally{i.f()}return t}},{key:"sort",value:function(e){var t=this;return new r(Se({},Zi,function(){var i;return Il(od(i=ft(t._pairs)).call(i,function(a,o){var s=ut(a,2),u=s[0],l=s[1],h=ut(o,2),d=h[0],f=h[1];return e(l,f,u,d)}))}))}}]),r}();function zp(r,n){var e=df(r);if(Iv){var t=Iv(r);n&&(t=Ui(t).call(t,function(i){return h$(r,i).enumerable})),e.push.apply(e,t)}return e}function jp(r){for(var n=1;n<arguments.length;n++){var e,t,i=arguments[n]!=null?arguments[n]:{};n%2?vi(e=zp(Object(i),!0)).call(e,function(a){Se(r,a,i[a])}):Pv?VA(r,Pv(i)):vi(t=zp(Object(i))).call(t,function(a){UA(r,a,h$(i,a))})}return r}function Pl(r,n){var e=typeof eu<"u"&&xa(r)||r["@@iterator"];if(!e){if($t(r)||(e=i5(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
38
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function i5(r,n){var e;if(r){if(typeof r=="string")return Hp(r,n);var t=ru(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return nf(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Hp(r,n)}}function Hp(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}function n5(r){var n=a5();return function(){var t=gs(r),i;if(n){var a=gs(this).constructor;i=Yo(t,arguments,a)}else i=t.apply(this,arguments);return KB(this,i)}}function a5(){if(typeof Reflect>"u"||!Yo||Yo.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Yo(Boolean,[],function(){})),!0}catch{return!1}}function o5(r,n){return r[n]==null&&(r[n]=L3()),r}var ys=function(r){GB(e,r);var n=n5(e);function e(t,i){var a;return As(this,e),a=n.call(this),Se(Jr(a),"flush",void 0),Se(Jr(a),"length",void 0),Se(Jr(a),"_options",void 0),Se(Jr(a),"_data",void 0),Se(Jr(a),"_idProp",void 0),Se(Jr(a),"_queue",null),t&&!$t(t)&&(i=t,t=[]),a._options=i||{},a._data=new m1,a.length=0,a._idProp=a._options.fieldId||"id",t&&t.length&&a.add(t),a.setOptions(i),a}return Ls(e,[{key:"idProp",get:function(){return this._idProp}},{key:"setOptions",value:function(i){i&&i.queue!==void 0&&(i.queue===!1?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=z3.extend(this,{replace:["add","update","remove"]})),i.queue&&vt(i.queue)==="object"&&this._queue.setOptions(i.queue)))}},{key:"add",value:function(i,a){var o=this,s=[],u;if($t(i)){var l=Dt(i).call(i,function(f){return f[o._idProp]});if(Tz(l).call(l,function(f){return o._data.has(f)}))throw new Error("A duplicate id was found in the parameter array.");for(var h=0,d=i.length;h<d;h++)u=this._addItem(i[h]),s.push(u)}else if(i&&vt(i)==="object")u=this._addItem(i),s.push(u);else throw new Error("Unknown dataType");return s.length&&this._trigger("add",{items:s},a),s}},{key:"update",value:function(i,a){var o=this,s=[],u=[],l=[],h=[],d=this._idProp,f=function(p){var $=p[d];if($!=null&&o._data.has($)){var y=p,m=pR({},o._data.get($)),_=o._updateItem(y);u.push(_),h.push(y),l.push(m)}else{var O=o._addItem(p);s.push(O)}};if($t(i))for(var c=0,v=i.length;c<v;c++)i[c]&&vt(i[c])==="object"?f(i[c]):console.warn("Ignoring input item, which is not an object at index "+c);else if(i&&vt(i)==="object")f(i);else throw new Error("Unknown dataType");if(s.length&&this._trigger("add",{items:s},a),u.length){var g={items:u,oldData:l,data:h};this._trigger("update",g,a)}return tu(s).call(s,u)}},{key:"updateOnly",value:function(i,a){var o,s=this;$t(i)||(i=[i]);var u=Dt(o=Dt(i).call(i,function(h){var d=s._data.get(h[s._idProp]);if(d==null)throw new Error("Updating non-existent items is not allowed.");return{oldData:d,update:h}})).call(o,function(h){var d=h.oldData,f=h.update,c=d[s._idProp],v=dB(d,f);return s._data.set(c,v),{id:c,oldData:d,updatedData:v}});if(u.length){var l={items:Dt(u).call(u,function(h){return h.id}),oldData:Dt(u).call(u,function(h){return h.oldData}),data:Dt(u).call(u,function(h){return h.updatedData})};return this._trigger("update",l,a),l.items}else return[]}},{key:"get",value:function(i,a){var o=void 0,s=void 0,u=void 0;Np(i)?(o=i,u=a):$t(i)?(s=i,u=a):u=i;var l=u&&u.returnType==="Object"?"Object":"Array",h=u&&Ui(u),d=[],f=void 0,c=void 0,v=void 0;if(o!=null)f=this._data.get(o),f&&h&&!h(f)&&(f=void 0);else if(s!=null)for(var g=0,b=s.length;g<b;g++)f=this._data.get(s[g]),f!=null&&(!h||h(f))&&d.push(f);else{var p;c=ft(Bi(p=this._data).call(p));for(var $=0,y=c.length;$<y;$++)v=c[$],f=this._data.get(v),f!=null&&(!h||h(f))&&d.push(f)}if(u&&u.order&&o==null&&this._sort(d,u.order),u&&u.fields){var m=u.fields;if(o!=null&&f!=null)f=this._filterFields(f,m);else for(var _=0,O=d.length;_<O;_++)d[_]=this._filterFields(d[_],m)}if(l=="Object"){for(var k={},S=0,w=d.length;S<w;S++){var E=d[S],F=E[this._idProp];k[F]=E}return k}else if(o!=null){var H;return(H=f)!==null&&H!==void 0?H:null}else return d}},{key:"getIds",value:function(i){var a=this._data,o=i&&Ui(i),s=i&&i.order,u=ft(Bi(a).call(a)),l=[];if(o)if(s){for(var h=[],d=0,f=u.length;d<f;d++){var c=u[d],v=this._data.get(c);v!=null&&o(v)&&h.push(v)}this._sort(h,s);for(var g=0,b=h.length;g<b;g++)l.push(h[g][this._idProp])}else for(var p=0,$=u.length;p<$;p++){var y=u[p],m=this._data.get(y);m!=null&&o(m)&&l.push(m[this._idProp])}else if(s){for(var _=[],O=0,k=u.length;O<k;O++){var S=u[O];_.push(a.get(S))}this._sort(_,s);for(var w=0,E=_.length;w<E;w++)l.push(_[w][this._idProp])}else for(var F=0,H=u.length;F<H;F++){var z=u[F],q=a.get(z);q!=null&&l.push(q[this._idProp])}return l}},{key:"getDataSet",value:function(){return this}},{key:"forEach",value:function(i,a){var o=a&&Ui(a),s=this._data,u=ft(Bi(s).call(s));if(a&&a.order)for(var l=this.get(a),h=0,d=l.length;h<d;h++){var f=l[h],c=f[this._idProp];i(f,c)}else for(var v=0,g=u.length;v<g;v++){var b=u[v],p=this._data.get(b);p!=null&&(!o||o(p))&&i(p,b)}}},{key:"map",value:function(i,a){for(var o=a&&Ui(a),s=[],u=this._data,l=ft(Bi(u).call(u)),h=0,d=l.length;h<d;h++){var f=l[h],c=this._data.get(f);c!=null&&(!o||o(c))&&s.push(i(c,f))}return a&&a.order&&this._sort(s,a.order),s}},{key:"_filterFields",value:function(i,a){var o;return i&&YT(o=$t(a)?a:df(a)).call(o,function(s,u){return s[u]=i[u],s},{})}},{key:"_sort",value:function(i,a){if(typeof a=="string"){var o=a;od(i).call(i,function(s,u){var l=s[o],h=u[o];return l>h?1:l<h?-1:0})}else if(typeof a=="function")od(i).call(i,a);else throw new TypeError("Order must be a function or a string")}},{key:"remove",value:function(i,a){for(var o=[],s=[],u=$t(i)?i:[i],l=0,h=u.length;l<h;l++){var d=this._remove(u[l]);if(d){var f=d[this._idProp];f!=null&&(o.push(f),s.push(d))}}return o.length&&this._trigger("remove",{items:o,oldData:s},a),o}},{key:"_remove",value:function(i){var a;if(Np(i)?a=i:i&&vt(i)==="object"&&(a=i[this._idProp]),a!=null&&this._data.has(a)){var o=this._data.get(a)||null;return this._data.delete(a),--this.length,o}return null}},{key:"clear",value:function(i){for(var a,o=ft(Bi(a=this._data).call(a)),s=[],u=0,l=o.length;u<l;u++)s.push(this._data.get(o[u]));return this._data.clear(),this.length=0,this._trigger("remove",{items:o,oldData:s},i),o}},{key:"max",value:function(i){var a,o=null,s=null,u=Pl(Fp(a=this._data).call(a)),l;try{for(u.s();!(l=u.n()).done;){var h=l.value,d=h[i];typeof d=="number"&&(s==null||d>s)&&(o=h,s=d)}}catch(f){u.e(f)}finally{u.f()}return o||null}},{key:"min",value:function(i){var a,o=null,s=null,u=Pl(Fp(a=this._data).call(a)),l;try{for(u.s();!(l=u.n()).done;){var h=l.value,d=h[i];typeof d=="number"&&(s==null||d<s)&&(o=h,s=d)}}catch(f){u.e(f)}finally{u.f()}return o||null}},{key:"distinct",value:function(i){for(var a=this._data,o=ft(Bi(a).call(a)),s=[],u=0,l=0,h=o.length;l<h;l++){for(var d=o[l],f=a.get(d),c=f[i],v=!1,g=0;g<u;g++)if(s[g]==c){v=!0;break}!v&&c!==void 0&&(s[u]=c,u++)}return s}},{key:"_addItem",value:function(i){var a=o5(i,this._idProp),o=a[this._idProp];if(this._data.has(o))throw new Error("Cannot add item: item with id "+o+" already exists");return this._data.set(o,a),++this.length,o}},{key:"_updateItem",value:function(i){var a=i[this._idProp];if(a==null)throw new Error("Cannot update item: item has no id (item: "+tN(i)+")");var o=this._data.get(a);if(!o)throw new Error("Cannot update item: no item with id "+a+" found");return this._data.set(a,jp(jp({},o),i)),a}},{key:"stream",value:function(i){if(i){var a=this._data;return new Lp(Se({},Zi,lt.mark(function s(){var u,l,h,d;return lt.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:u=Pl(i),c.prev=1,u.s();case 3:if((l=u.n()).done){c.next=11;break}if(h=l.value,d=a.get(h),d==null){c.next=9;break}return c.next=9,[h,d];case 9:c.next=3;break;case 11:c.next=16;break;case 13:c.prev=13,c.t0=c.catch(1),u.e(c.t0);case 16:return c.prev=16,u.f(),c.finish(16);case 19:case"end":return c.stop()}},s,null,[[1,13,16,19]])})))}else{var o;return new Lp(Se({},Zi,vb(o=M3(this._data)).call(o,this._data)))}}}]),e}(j3);function s5(r,n){return vt(n)==="object"&&n!==null&&r===n.idProp&&typeof n.add=="function"&&typeof n.clear=="function"&&typeof n.distinct=="function"&&typeof vi(n)=="function"&&typeof n.get=="function"&&typeof n.getDataSet=="function"&&typeof n.getIds=="function"&&typeof n.length=="number"&&typeof Dt(n)=="function"&&typeof n.max=="function"&&typeof n.min=="function"&&typeof n.off=="function"&&typeof n.on=="function"&&typeof n.remove=="function"&&typeof n.setOptions=="function"&&typeof n.stream=="function"&&typeof n.update=="function"&&typeof n.updateOnly=="function"}function _1(r,n){return vt(n)==="object"&&n!==null&&r===n.idProp&&typeof vi(n)=="function"&&typeof n.get=="function"&&typeof n.getDataSet=="function"&&typeof n.getIds=="function"&&typeof n.length=="number"&&typeof Dt(n)=="function"&&typeof n.off=="function"&&typeof n.on=="function"&&typeof n.stream=="function"&&s5(r,n.getDataSet())}/**
39
- * vis-network
40
- * https://visjs.github.io/vis-network/
41
- *
42
- * A dynamic, browser-based visualization library.
43
- *
44
- * @version 9.1.4
45
- * @date 2023-02-24T18:18:24.755Z
46
- *
47
- * @copyright (c) 2011-2017 Almende B.V, http://almende.com
48
- * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
49
- *
50
- * @license
51
- * vis.js is dual licensed under both
52
- *
53
- * 1. The Apache 2.0 License
54
- * http://www.apache.org/licenses/LICENSE-2.0
55
- *
56
- * and
57
- *
58
- * 2. The MIT License
59
- * http://opensource.org/licenses/MIT
60
- *
61
- * vis.js may be distributed under either license.
62
- */var sd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function U(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var E1={exports:{}},ko=function(r){return r&&r.Math==Math&&r},K=ko(typeof globalThis=="object"&&globalThis)||ko(typeof window=="object"&&window)||ko(typeof self=="object"&&self)||ko(typeof sd=="object"&&sd)||function(){return this}()||Function("return this")(),fe=function(r){try{return!!r()}catch{return!0}},u5=fe,Ha=!u5(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),l5=Ha,S1=Function.prototype,Wp=S1.apply,Vp=S1.call,wn=typeof Reflect=="object"&&Reflect.apply||(l5?Vp.bind(Wp):function(){return Vp.apply(Wp,arguments)}),O1=Ha,T1=Function.prototype,h5=T1.bind,ud=T1.call,d5=O1&&h5.bind(ud,ud),se=O1?function(r){return r&&d5(r)}:function(r){return r&&function(){return ud.apply(r,arguments)}},qe=function(r){return typeof r=="function"},_n={},f5=fe,He=!f5(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),c5=Ha,Io=Function.prototype.call,Wt=c5?Io.bind(Io):function(){return Io.apply(Io,arguments)},Wa={},k1={}.propertyIsEnumerable,I1=Object.getOwnPropertyDescriptor,v5=I1&&!k1.call({1:2},1);Wa.f=v5?function(n){var e=I1(this,n);return!!e&&e.enumerable}:k1;var Va=function(r,n){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:n}},P1=se,p5=P1({}.toString),g5=P1("".slice),Ii=function(r){return g5(p5(r),8,-1)},y5=K,m5=se,b5=fe,$5=Ii,Cl=y5.Object,w5=m5("".split),au=b5(function(){return!Cl("z").propertyIsEnumerable(0)})?function(r){return $5(r)=="String"?w5(r,""):Cl(r)}:Cl,_5=K,E5=_5.TypeError,Ua=function(r){if(r==null)throw E5("Can't call method on "+r);return r},S5=au,O5=Ua,Vt=function(r){return S5(O5(r))},T5=qe,We=function(r){return typeof r=="object"?r!==null:T5(r)},ie={},xl=ie,Al=K,k5=qe,Up=function(r){return k5(r)?r:void 0},wr=function(r,n){return arguments.length<2?Up(xl[r])||Up(Al[r]):xl[r]&&xl[r][n]||Al[r]&&Al[r][n]},I5=se,ke=I5({}.isPrototypeOf),P5=wr,Ga=P5("navigator","userAgent")||"",C1=K,Ml=Ga,Gp=C1.process,Kp=C1.Deno,qp=Gp&&Gp.versions||Kp&&Kp.version,Yp=qp&&qp.v8,Rt,ms;Yp&&(Rt=Yp.split("."),ms=Rt[0]>0&&Rt[0]<4?1:+(Rt[0]+Rt[1]));!ms&&Ml&&(Rt=Ml.match(/Edge\/(\d+)/),(!Rt||Rt[1]>=74)&&(Rt=Ml.match(/Chrome\/(\d+)/),Rt&&(ms=+Rt[1])));var Ka=ms,Xp=Ka,C5=fe,Tf=!!Object.getOwnPropertySymbols&&!C5(function(){var r=Symbol();return!String(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&Xp&&Xp<41}),x5=Tf,x1=x5&&!Symbol.sham&&typeof Symbol.iterator=="symbol",A5=K,M5=wr,D5=qe,R5=ke,F5=x1,N5=A5.Object,kf=F5?function(r){return typeof r=="symbol"}:function(r){var n=M5("Symbol");return D5(n)&&R5(n.prototype,N5(r))},B5=K,L5=B5.String,ou=function(r){try{return L5(r)}catch{return"Object"}},z5=K,j5=qe,H5=ou,W5=z5.TypeError,En=function(r){if(j5(r))return r;throw W5(H5(r)+" is not a function")},V5=En,If=function(r,n){var e=r[n];return e==null?void 0:V5(e)},U5=K,Dl=Wt,Rl=qe,Fl=We,G5=U5.TypeError,K5=function(r,n){var e,t;if(n==="string"&&Rl(e=r.toString)&&!Fl(t=Dl(e,r))||Rl(e=r.valueOf)&&!Fl(t=Dl(e,r))||n!=="string"&&Rl(e=r.toString)&&!Fl(t=Dl(e,r)))return t;throw G5("Can't convert object to primitive value")},su={exports:{}},Qp=K,q5=Object.defineProperty,Y5=function(r,n){try{q5(Qp,r,{value:n,configurable:!0,writable:!0})}catch{Qp[r]=n}return n},X5=K,Q5=Y5,Zp="__core-js_shared__",Z5=X5[Zp]||Q5(Zp,{}),Pf=Z5,Jp=Pf;(su.exports=function(r,n){return Jp[r]||(Jp[r]=n!==void 0?n:{})})("versions",[]).push({version:"3.21.1",mode:"pure",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE",source:"https://github.com/zloirock/core-js"});var J5=K,ej=Ua,tj=J5.Object,Et=function(r){return tj(ej(r))},rj=se,ij=Et,nj=rj({}.hasOwnProperty),tt=Object.hasOwn||function(n,e){return nj(ij(n),e)},aj=se,oj=0,sj=Math.random(),uj=aj(1 .toString),uu=function(r){return"Symbol("+(r===void 0?"":r)+")_"+uj(++oj+sj,36)},lj=K,hj=su.exports,eg=tt,dj=uu,tg=Tf,A1=x1,Li=hj("wks"),ui=lj.Symbol,rg=ui&&ui.for,fj=A1?ui:ui&&ui.withoutSetter||dj,Fe=function(r){if(!eg(Li,r)||!(tg||typeof Li[r]=="string")){var n="Symbol."+r;tg&&eg(ui,r)?Li[r]=ui[r]:A1&&rg?Li[r]=rg(n):Li[r]=fj(n)}return Li[r]},cj=K,vj=Wt,ig=We,ng=kf,pj=If,gj=K5,yj=Fe,mj=cj.TypeError,bj=yj("toPrimitive"),$j=function(r,n){if(!ig(r)||ng(r))return r;var e=pj(r,bj),t;if(e){if(n===void 0&&(n="default"),t=vj(e,r,n),!ig(t)||ng(t))return t;throw mj("Can't convert object to primitive value")}return n===void 0&&(n="number"),gj(r,n)},wj=$j,_j=kf,lu=function(r){var n=wj(r,"string");return _j(n)?n:n+""},Ej=K,ag=We,ld=Ej.document,Sj=ag(ld)&&ag(ld.createElement),M1=function(r){return Sj?ld.createElement(r):{}},Oj=He,Tj=fe,kj=M1,D1=!Oj&&!Tj(function(){return Object.defineProperty(kj("div"),"a",{get:function(){return 7}}).a!=7}),Ij=He,Pj=Wt,Cj=Wa,xj=Va,Aj=Vt,Mj=lu,Dj=tt,Rj=D1,og=Object.getOwnPropertyDescriptor;_n.f=Ij?og:function(n,e){if(n=Aj(n),e=Mj(e),Rj)try{return og(n,e)}catch{}if(Dj(n,e))return xj(!Pj(Cj.f,n,e),n[e])};var Fj=fe,Nj=qe,Bj=/#|\.prototype\./,qa=function(r,n){var e=zj[Lj(r)];return e==Hj?!0:e==jj?!1:Nj(n)?Fj(n):!!n},Lj=qa.normalize=function(r){return String(r).replace(Bj,".").toLowerCase()},zj=qa.data={},jj=qa.NATIVE="N",Hj=qa.POLYFILL="P",Wj=qa,sg=se,Vj=En,Uj=Ha,Gj=sg(sg.bind),Ya=function(r,n){return Vj(r),n===void 0?r:Uj?Gj(r,n):function(){return r.apply(n,arguments)}},St={},Kj=He,qj=fe,R1=Kj&&qj(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),F1=K,Yj=We,Xj=F1.String,Qj=F1.TypeError,Ot=function(r){if(Yj(r))return r;throw Qj(Xj(r)+" is not an object")},Zj=K,Jj=He,e4=D1,t4=R1,Po=Ot,ug=lu,r4=Zj.TypeError,Nl=Object.defineProperty,i4=Object.getOwnPropertyDescriptor,Bl="enumerable",Ll="configurable",zl="writable";St.f=Jj?t4?function(n,e,t){if(Po(n),e=ug(e),Po(t),typeof n=="function"&&e==="prototype"&&"value"in t&&zl in t&&!t[zl]){var i=i4(n,e);i&&i[zl]&&(n[e]=t.value,t={configurable:Ll in t?t[Ll]:i[Ll],enumerable:Bl in t?t[Bl]:i[Bl],writable:!1})}return Nl(n,e,t)}:Nl:function(n,e,t){if(Po(n),e=ug(e),Po(t),e4)try{return Nl(n,e,t)}catch{}if("get"in t||"set"in t)throw r4("Accessors not supported");return"value"in t&&(n[e]=t.value),n};var n4=He,a4=St,o4=Va,Sn=n4?function(r,n,e){return a4.f(r,n,o4(1,e))}:function(r,n,e){return r[n]=e,r},Co=K,s4=wn,u4=se,l4=qe,h4=_n.f,d4=Wj,zi=ie,f4=Ya,ji=Sn,lg=tt,c4=function(r){var n=function(e,t,i){if(this instanceof n){switch(arguments.length){case 0:return new r;case 1:return new r(e);case 2:return new r(e,t)}return new r(e,t,i)}return s4(r,this,arguments)};return n.prototype=r.prototype,n},X=function(r,n){var e=r.target,t=r.global,i=r.stat,a=r.proto,o=t?Co:i?Co[e]:(Co[e]||{}).prototype,s=t?zi:zi[e]||ji(zi,e,{})[e],u=s.prototype,l,h,d,f,c,v,g,b,p;for(f in n)l=d4(t?f:e+(i?".":"#")+f,r.forced),h=!l&&o&&lg(o,f),v=s[f],h&&(r.noTargetGet?(p=h4(o,f),g=p&&p.value):g=o[f]),c=h&&g?g:n[f],!(h&&typeof v==typeof c)&&(r.bind&&h?b=f4(c,Co):r.wrap&&h?b=c4(c):a&&l4(c)?b=u4(c):b=c,(r.sham||c&&c.sham||v&&v.sham)&&ji(b,"sham",!0),ji(s,f,b),a&&(d=e+"Prototype",lg(zi,d)||ji(zi,d,{}),ji(zi[d],f,c),r.real&&u&&!u[f]&&ji(u,f,c)))},v4=Math.ceil,p4=Math.floor,hu=function(r){var n=+r;return n!==n||n===0?0:(n>0?p4:v4)(n)},g4=hu,y4=Math.max,m4=Math.min,Xa=function(r,n){var e=g4(r);return e<0?y4(e+n,0):m4(e,n)},b4=hu,$4=Math.min,w4=function(r){return r>0?$4(b4(r),9007199254740991):0},_4=w4,Ut=function(r){return _4(r.length)},E4=Vt,S4=Xa,O4=Ut,hg=function(r){return function(n,e,t){var i=E4(n),a=O4(i),o=S4(t,a),s;if(r&&e!=e){for(;a>o;)if(s=i[o++],s!=s)return!0}else for(;a>o;o++)if((r||o in i)&&i[o]===e)return r||o||0;return!r&&-1}},Cf={includes:hg(!0),indexOf:hg(!1)},Qa={},T4=se,jl=tt,k4=Vt,I4=Cf.indexOf,P4=Qa,dg=T4([].push),N1=function(r,n){var e=k4(r),t=0,i=[],a;for(a in e)!jl(P4,a)&&jl(e,a)&&dg(i,a);for(;n.length>t;)jl(e,a=n[t++])&&(~I4(i,a)||dg(i,a));return i},xf=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],C4=N1,x4=xf,Za=Object.keys||function(n){return C4(n,x4)},du={};du.f=Object.getOwnPropertySymbols;var fg=He,A4=se,M4=Wt,D4=fe,Hl=Za,R4=du,F4=Wa,N4=Et,B4=au,Hi=Object.assign,cg=Object.defineProperty,L4=A4([].concat),z4=!Hi||D4(function(){if(fg&&Hi({b:1},Hi(cg({},"a",{enumerable:!0,get:function(){cg(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var r={},n={},e=Symbol(),t="abcdefghijklmnopqrst";return r[e]=7,t.split("").forEach(function(i){n[i]=i}),Hi({},r)[e]!=7||Hl(Hi({},n)).join("")!=t})?function(n,e){for(var t=N4(n),i=arguments.length,a=1,o=R4.f,s=F4.f;i>a;)for(var u=B4(arguments[a++]),l=o?L4(Hl(u),o(u)):Hl(u),h=l.length,d=0,f;h>d;)f=l[d++],(!fg||M4(s,u,f))&&(t[f]=u[f]);return t}:Hi,j4=X,vg=z4;j4({target:"Object",stat:!0,forced:Object.assign!==vg},{assign:vg});var H4=ie,W4=H4.Object.assign,V4=W4,U4=V4;(function(r){r.exports=U4})(E1);var Ae=U(E1.exports),B1={exports:{}},G4=se,fu=G4([].slice),K4=K,L1=se,q4=En,Y4=We,X4=tt,pg=fu,Q4=Ha,z1=K4.Function,Z4=L1([].concat),J4=L1([].join),Wl={},eH=function(r,n,e){if(!X4(Wl,n)){for(var t=[],i=0;i<n;i++)t[i]="a["+i+"]";Wl[n]=z1("C,a","return new C("+J4(t,",")+")")}return Wl[n](r,e)},j1=Q4?z1.bind:function(n){var e=q4(this),t=e.prototype,i=pg(arguments,1),a=function(){var s=Z4(i,pg(arguments));return this instanceof a?eH(e,s.length,s):e.apply(n,s)};return Y4(t)&&(a.prototype=t),a},tH=X,gg=j1;tH({target:"Function",proto:!0,forced:Function.bind!==gg},{bind:gg});var rH=ie,Ve=function(r){return rH[r+"Prototype"]},iH=Ve,nH=iH("Function").bind,aH=ke,oH=nH,Vl=Function.prototype,sH=function(r){var n=r.bind;return r===Vl||aH(Vl,r)&&n===Vl.bind?oH:n},uH=sH,H1=uH;(function(r){r.exports=H1})(B1);var A=U(B1.exports);function Af(r,n,e,t){r.beginPath(),r.arc(n,e,t,0,2*Math.PI,!1),r.closePath()}function lH(r,n,e,t){r.beginPath(),r.rect(n-t,e-t,t*2,t*2),r.closePath()}function hH(r,n,e,t){r.beginPath(),t*=1.15,e+=.275*t;var i=t*2,a=i/2,o=Math.sqrt(3)/6*i,s=Math.sqrt(i*i-a*a);r.moveTo(n,e-(s-o)),r.lineTo(n+a,e+o),r.lineTo(n-a,e+o),r.lineTo(n,e-(s-o)),r.closePath()}function dH(r,n,e,t){r.beginPath(),t*=1.15,e-=.275*t;var i=t*2,a=i/2,o=Math.sqrt(3)/6*i,s=Math.sqrt(i*i-a*a);r.moveTo(n,e+(s-o)),r.lineTo(n+a,e-o),r.lineTo(n-a,e-o),r.lineTo(n,e+(s-o)),r.closePath()}function fH(r,n,e,t){r.beginPath(),t*=.82,e+=.1*t;for(var i=0;i<10;i++){var a=i%2===0?t*1.3:t*.5;r.lineTo(n+a*Math.sin(i*2*Math.PI/10),e-a*Math.cos(i*2*Math.PI/10))}r.closePath()}function cH(r,n,e,t){r.beginPath(),r.lineTo(n,e+t),r.lineTo(n+t,e),r.lineTo(n,e-t),r.lineTo(n-t,e),r.closePath()}function W1(r,n,e,t,i,a){var o=Math.PI/180;t-2*a<0&&(a=t/2),i-2*a<0&&(a=i/2),r.beginPath(),r.moveTo(n+a,e),r.lineTo(n+t-a,e),r.arc(n+t-a,e+a,a,o*270,o*360,!1),r.lineTo(n+t,e+i-a),r.arc(n+t-a,e+i-a,a,0,o*90,!1),r.lineTo(n+a,e+i),r.arc(n+a,e+i-a,a,o*90,o*180,!1),r.lineTo(n,e+a),r.arc(n+a,e+a,a,o*180,o*270,!1),r.closePath()}function hd(r,n,e,t,i){var a=.5522848,o=t/2*a,s=i/2*a,u=n+t,l=e+i,h=n+t/2,d=e+i/2;r.beginPath(),r.moveTo(n,d),r.bezierCurveTo(n,d-s,h-o,e,h,e),r.bezierCurveTo(h+o,e,u,d-s,u,d),r.bezierCurveTo(u,d+s,h+o,l,h,l),r.bezierCurveTo(h-o,l,n,d+s,n,d),r.closePath()}function V1(r,n,e,t,i){var a=.3333333333333333,o=t,s=i*a,u=.5522848,l=o/2*u,h=s/2*u,d=n+o,f=e+s,c=n+o/2,v=e+s/2,g=e+(i-s/2),b=e+i;r.beginPath(),r.moveTo(d,v),r.bezierCurveTo(d,v+h,c+l,f,c,f),r.bezierCurveTo(c-l,f,n,v+h,n,v),r.bezierCurveTo(n,v-h,c-l,e,c,e),r.bezierCurveTo(c+l,e,d,v-h,d,v),r.lineTo(d,g),r.bezierCurveTo(d,g+h,c+l,b,c,b),r.bezierCurveTo(c-l,b,n,g+h,n,g),r.lineTo(n,v)}function U1(r,n,e,t,i,a){r.beginPath(),r.moveTo(n,e);for(var o=a.length,s=t-n,u=i-e,l=u/s,h=Math.sqrt(s*s+u*u),d=0,f=!0,c=0,v=+a[0];h>=.1;)v=+a[d++%o],v>h&&(v=h),c=Math.sqrt(v*v/(1+l*l)),c=s<0?-c:c,n+=c,e+=l*c,f===!0?r.lineTo(n,e):r.moveTo(n,e),h-=v,f=!f}function vH(r,n,e,t){r.beginPath();var i=6,a=Math.PI*2/i;r.moveTo(n+t,e);for(var o=1;o<i;o++)r.lineTo(n+t*Math.cos(a*o),e+t*Math.sin(a*o));r.closePath()}var yg={circle:Af,dashedLine:U1,database:V1,diamond:cH,ellipse:hd,ellipse_vis:hd,hexagon:vH,roundRect:W1,square:lH,star:fH,triangle:hH,triangleDown:dH};function pH(r){return Object.prototype.hasOwnProperty.call(yg,r)?yg[r]:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),i=1;i<e;i++)t[i-1]=arguments[i];CanvasRenderingContext2D.prototype[r].call(n,t)}}var G1={exports:{}};(function(r){r.exports=n;function n(t){if(t)return e(t)}function e(t){for(var i in n.prototype)t[i]=n.prototype[i];return t}n.prototype.on=n.prototype.addEventListener=function(t,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(i),this},n.prototype.once=function(t,i){function a(){this.off(t,a),i.apply(this,arguments)}return a.fn=i,this.on(t,a),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(t,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var a=this._callbacks["$"+t];if(!a)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var o,s=0;s<a.length;s++)if(o=a[s],o===i||o.fn===i){a.splice(s,1);break}return a.length===0&&delete this._callbacks["$"+t],this},n.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),a=this._callbacks["$"+t],o=1;o<arguments.length;o++)i[o-1]=arguments[o];if(a){a=a.slice(0);for(var o=0,s=a.length;o<s;++o)a[o].apply(this,i)}return this},n.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},n.prototype.hasListeners=function(t){return!!this.listeners(t).length}})(G1);var K1=G1.exports,q1={exports:{}},gH=Fe,yH=gH("toStringTag"),Y1={};Y1[yH]="z";var Mf=String(Y1)==="[object z]",mH=K,bH=Mf,$H=qe,Zo=Ii,wH=Fe,_H=wH("toStringTag"),EH=mH.Object,SH=Zo(function(){return arguments}())=="Arguments",OH=function(r,n){try{return r[n]}catch{}},Pi=bH?Zo:function(r){var n,e,t;return r===void 0?"Undefined":r===null?"Null":typeof(e=OH(n=EH(r),_H))=="string"?e:SH?Zo(n):(t=Zo(n))=="Object"&&$H(n.callee)?"Arguments":t},TH=K,kH=Pi,IH=TH.String,Vr=function(r){if(kH(r)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return IH(r)},Df=se,PH=hu,CH=Vr,xH=Ua,AH=Df("".charAt),mg=Df("".charCodeAt),MH=Df("".slice),bg=function(r){return function(n,e){var t=CH(xH(n)),i=PH(e),a=t.length,o,s;return i<0||i>=a?r?"":void 0:(o=mg(t,i),o<55296||o>56319||i+1===a||(s=mg(t,i+1))<56320||s>57343?r?AH(t,i):o:r?MH(t,i,i+2):(o-55296<<10)+(s-56320)+65536)}},DH={codeAt:bg(!1),charAt:bg(!0)},RH=se,FH=qe,dd=Pf,NH=RH(Function.toString);FH(dd.inspectSource)||(dd.inspectSource=function(r){return NH(r)});var X1=dd.inspectSource,BH=K,LH=qe,zH=X1,$g=BH.WeakMap,Q1=LH($g)&&/native code/.test(zH($g)),jH=su.exports,HH=uu,wg=jH("keys"),cu=function(r){return wg[r]||(wg[r]=HH(r))},WH=Q1,Z1=K,Ul=se,VH=We,UH=Sn,Gl=tt,Kl=Pf,GH=cu,KH=Qa,_g="Object already initialized",fd=Z1.TypeError,qH=Z1.WeakMap,bs,ua,$s,YH=function(r){return $s(r)?ua(r):bs(r,{})},XH=function(r){return function(n){var e;if(!VH(n)||(e=ua(n)).type!==r)throw fd("Incompatible receiver, "+r+" required");return e}};if(WH||Kl.state){var Zr=Kl.state||(Kl.state=new qH),QH=Ul(Zr.get),Eg=Ul(Zr.has),ZH=Ul(Zr.set);bs=function(r,n){if(Eg(Zr,r))throw new fd(_g);return n.facade=r,ZH(Zr,r,n),n},ua=function(r){return QH(Zr,r)||{}},$s=function(r){return Eg(Zr,r)}}else{var Wi=GH("state");KH[Wi]=!0,bs=function(r,n){if(Gl(r,Wi))throw new fd(_g);return n.facade=r,UH(r,Wi,n),n},ua=function(r){return Gl(r,Wi)?r[Wi]:{}},$s=function(r){return Gl(r,Wi)}}var Ci={set:bs,get:ua,has:$s,enforce:YH,getterFor:XH},cd=He,JH=tt,J1=Function.prototype,e6=cd&&Object.getOwnPropertyDescriptor,Rf=JH(J1,"name"),t6=Rf&&function(){}.name==="something",r6=Rf&&(!cd||cd&&e6(J1,"name").configurable),e0={EXISTS:Rf,PROPER:t6,CONFIGURABLE:r6},vu={},i6=He,n6=R1,a6=St,o6=Ot,s6=Vt,u6=Za;vu.f=i6&&!n6?Object.defineProperties:function(n,e){o6(n);for(var t=s6(e),i=u6(e),a=i.length,o=0,s;a>o;)a6.f(n,s=i[o++],t[s]);return n};var l6=wr,h6=l6("document","documentElement"),d6=Ot,f6=vu,Sg=xf,c6=Qa,v6=h6,p6=M1,g6=cu,Og=">",Tg="<",vd="prototype",pd="script",t0=g6("IE_PROTO"),ql=function(){},r0=function(r){return Tg+pd+Og+r+Tg+"/"+pd+Og},kg=function(r){r.write(r0("")),r.close();var n=r.parentWindow.Object;return r=null,n},y6=function(){var r=p6("iframe"),n="java"+pd+":",e;return r.style.display="none",v6.appendChild(r),r.src=String(n),e=r.contentWindow.document,e.open(),e.write(r0("document.F=Object")),e.close(),e.F},xo,Jo=function(){try{xo=new ActiveXObject("htmlfile")}catch{}Jo=typeof document<"u"?document.domain&&xo?kg(xo):y6():kg(xo);for(var r=Sg.length;r--;)delete Jo[vd][Sg[r]];return Jo()};c6[t0]=!0;var On=Object.create||function(n,e){var t;return n!==null?(ql[vd]=d6(n),t=new ql,ql[vd]=null,t[t0]=n):t=Jo(),e===void 0?t:f6.f(t,e)},m6=fe,i0=!m6(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}),b6=K,$6=tt,w6=qe,_6=Et,E6=cu,S6=i0,Ig=E6("IE_PROTO"),gd=b6.Object,O6=gd.prototype,pu=S6?gd.getPrototypeOf:function(r){var n=_6(r);if($6(n,Ig))return n[Ig];var e=n.constructor;return w6(e)&&n instanceof e?e.prototype:n instanceof gd?O6:null},T6=Sn,gu=function(r,n,e,t){t&&t.enumerable?r[n]=e:T6(r,n,e)},k6=fe,I6=qe,P6=On,Pg=pu,C6=gu,x6=Fe,yd=x6("iterator"),n0=!1,lr,Yl,Xl;[].keys&&(Xl=[].keys(),"next"in Xl?(Yl=Pg(Pg(Xl)),Yl!==Object.prototype&&(lr=Yl)):n0=!0);var A6=lr==null||k6(function(){var r={};return lr[yd].call(r)!==r});A6?lr={}:lr=P6(lr);I6(lr[yd])||C6(lr,yd,function(){return this});var a0={IteratorPrototype:lr,BUGGY_SAFARI_ITERATORS:n0},M6=Mf,D6=Pi,R6=M6?{}.toString:function(){return"[object "+D6(this)+"]"},F6=Mf,N6=St.f,B6=Sn,L6=tt,z6=R6,j6=Fe,Cg=j6("toStringTag"),Ja=function(r,n,e,t){if(r){var i=e?r:r.prototype;L6(i,Cg)||N6(i,Cg,{configurable:!0,value:n}),t&&!F6&&B6(i,"toString",z6)}},Tn={},H6=a0.IteratorPrototype,W6=On,V6=Va,U6=Ja,G6=Tn,K6=function(){return this},q6=function(r,n,e,t){var i=n+" Iterator";return r.prototype=W6(H6,{next:V6(+!t,e)}),U6(r,i,!1,!0),G6[i]=K6,r},o0=K,Y6=qe,X6=o0.String,Q6=o0.TypeError,Z6=function(r){if(typeof r=="object"||Y6(r))return r;throw Q6("Can't set "+X6(r)+" as a prototype")},J6=se,e8=Ot,t8=Z6,r8=Object.setPrototypeOf||("__proto__"in{}?function(){var r=!1,n={},e;try{e=J6(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),e(n,[]),r=n instanceof Array}catch{}return function(i,a){return e8(i),t8(a),r?e(i,a):i.__proto__=a,i}}():void 0),i8=X,n8=Wt,a8=e0,o8=q6,s8=pu,u8=Ja,xg=gu,l8=Fe,Ag=Tn,h8=a0,d8=a8.PROPER,Ao=h8.BUGGY_SAFARI_ITERATORS,Ql=l8("iterator"),Mg="keys",Mo="values",Dg="entries",f8=function(){return this},Ff=function(r,n,e,t,i,a,o){o8(e,n,t);var s=function(p){if(p===i&&f)return f;if(!Ao&&p in h)return h[p];switch(p){case Mg:return function(){return new e(this,p)};case Mo:return function(){return new e(this,p)};case Dg:return function(){return new e(this,p)}}return function(){return new e(this)}},u=n+" Iterator",l=!1,h=r.prototype,d=h[Ql]||h["@@iterator"]||i&&h[i],f=!Ao&&d||s(i),c=n=="Array"&&h.entries||d,v,g,b;if(c&&(v=s8(c.call(new r)),v!==Object.prototype&&v.next&&(u8(v,u,!0,!0),Ag[u]=f8)),d8&&i==Mo&&d&&d.name!==Mo&&(l=!0,f=function(){return n8(d,this)}),i)if(g={values:s(Mo),keys:a?f:s(Mg),entries:s(Dg)},o)for(b in g)(Ao||l||!(b in h))&&xg(h,b,g[b]);else i8({target:n,proto:!0,forced:Ao||l},g);return o&&h[Ql]!==f&&xg(h,Ql,f,{name:i}),Ag[n]=f,g},c8=DH.charAt,v8=Vr,s0=Ci,p8=Ff,u0="String Iterator",g8=s0.set,y8=s0.getterFor(u0);p8(String,"String",function(r){g8(this,{type:u0,string:v8(r),index:0})},function(){var n=y8(this),e=n.string,t=n.index,i;return t>=e.length?{value:void 0,done:!0}:(i=c8(e,t),n.index+=i.length,{value:i,done:!1})});var m8=Wt,Rg=Ot,b8=If,l0=function(r,n,e){var t,i;Rg(r);try{if(t=b8(r,"return"),!t){if(n==="throw")throw e;return e}t=m8(t,r)}catch(a){i=!0,t=a}if(n==="throw")throw e;if(i)throw t;return Rg(t),e},$8=Ot,w8=l0,_8=function(r,n,e,t){try{return t?n($8(e)[0],e[1]):n(e)}catch(i){w8(r,"throw",i)}},E8=Fe,S8=Tn,O8=E8("iterator"),T8=Array.prototype,h0=function(r){return r!==void 0&&(S8.Array===r||T8[O8]===r)},k8=se,I8=fe,d0=qe,P8=Pi,C8=wr,x8=X1,f0=function(){},A8=[],c0=C8("Reflect","construct"),Nf=/^\s*(?:class|function)\b/,M8=k8(Nf.exec),D8=!Nf.exec(f0),Fn=function(n){if(!d0(n))return!1;try{return c0(f0,A8,n),!0}catch{return!1}},v0=function(n){if(!d0(n))return!1;switch(P8(n)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return D8||!!M8(Nf,x8(n))}catch{return!0}};v0.sham=!0;var yu=!c0||I8(function(){var r;return Fn(Fn.call)||!Fn(Object)||!Fn(function(){r=!0})||r})?v0:Fn,R8=lu,F8=St,N8=Va,kn=function(r,n,e){var t=R8(n);t in r?F8.f(r,t,N8(0,e)):r[t]=e},B8=Pi,Fg=If,L8=Tn,z8=Fe,j8=z8("iterator"),mu=function(r){if(r!=null)return Fg(r,j8)||Fg(r,"@@iterator")||L8[B8(r)]},H8=K,W8=Wt,V8=En,U8=Ot,G8=ou,K8=mu,q8=H8.TypeError,p0=function(r,n){var e=arguments.length<2?K8(r):n;if(V8(e))return U8(W8(e,r));throw q8(G8(r)+" is not iterable")},Y8=K,X8=Ya,Q8=Wt,Z8=Et,J8=_8,eW=h0,tW=yu,rW=Ut,Ng=kn,iW=p0,nW=mu,Bg=Y8.Array,aW=function(n){var e=Z8(n),t=tW(this),i=arguments.length,a=i>1?arguments[1]:void 0,o=a!==void 0;o&&(a=X8(a,i>2?arguments[2]:void 0));var s=nW(e),u=0,l,h,d,f,c,v;if(s&&!(this==Bg&&eW(s)))for(f=iW(e,s),c=f.next,h=t?new this:[];!(d=Q8(c,f)).done;u++)v=o?J8(f,a,[d.value,u],!0):d.value,Ng(h,u,v);else for(l=rW(e),h=t?new this(l):Bg(l);l>u;u++)v=o?a(e[u],u):e[u],Ng(h,u,v);return h.length=u,h},oW=Fe,g0=oW("iterator"),y0=!1;try{var sW=0,Lg={next:function(){return{done:!!sW++}},return:function(){y0=!0}};Lg[g0]=function(){return this},Array.from(Lg,function(){throw 2})}catch{}var uW=function(r,n){if(!n&&!y0)return!1;var e=!1;try{var t={};t[g0]=function(){return{next:function(){return{done:e=!0}}}},r(t)}catch{}return e},lW=X,hW=aW,dW=uW,fW=!dW(function(r){Array.from(r)});lW({target:"Array",stat:!0,forced:fW},{from:hW});var cW=ie,vW=cW.Array.from,pW=vW,m0=pW;(function(r){r.exports=m0})(q1);var Ur=U(q1.exports),b0={exports:{}},gW=Vt,zg=Tn,$0=Ci;St.f;var yW=Ff,w0="Array Iterator",mW=$0.set,bW=$0.getterFor(w0);yW(Array,"Array",function(r,n){mW(this,{type:w0,target:gW(r),index:0,kind:n})},function(){var r=bW(this),n=r.target,e=r.kind,t=r.index++;return!n||t>=n.length?(r.target=void 0,{value:void 0,done:!0}):e=="keys"?{value:t,done:!1}:e=="values"?{value:n[t],done:!1}:{value:[t,n[t]],done:!1}},"values");zg.Arguments=zg.Array;var $W=mu,wW=$W,_W={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},EW=_W,SW=K,OW=Pi,TW=Sn,jg=Tn,kW=Fe,Hg=kW("toStringTag");for(var Zl in EW){var Wg=SW[Zl],Jl=Wg&&Wg.prototype;Jl&&OW(Jl)!==Hg&&TW(Jl,Hg,Zl),jg[Zl]=jg.Array}var IW=wW,PW=IW,CW=PW,xW=CW,AW=xW,MW=AW;(function(r){r.exports=MW})(b0);var rr=U(b0.exports),_0={exports:{}},DW=Ii,In=Array.isArray||function(n){return DW(n)=="Array"},eo={},RW=N1,FW=xf,NW=FW.concat("length","prototype");eo.f=Object.getOwnPropertyNames||function(n){return RW(n,NW)};var bu={},BW=K,Vg=Xa,LW=Ut,zW=kn,jW=BW.Array,HW=Math.max,E0=function(r,n,e){for(var t=LW(r),i=Vg(n,t),a=Vg(e===void 0?t:e,t),o=jW(HW(a-i,0)),s=0;i<a;i++,s++)zW(o,s,r[i]);return o.length=s,o},WW=Ii,VW=Vt,S0=eo.f,UW=E0,O0=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],GW=function(r){try{return S0(r)}catch{return UW(O0)}};bu.f=function(n){return O0&&WW(n)=="Window"?GW(n):S0(VW(n))};var $u={},KW=Fe;$u.f=KW;var Ug=ie,qW=tt,YW=$u,XW=St.f,Ie=function(r){var n=Ug.Symbol||(Ug.Symbol={});qW(n,r)||XW(n,r,{value:YW.f(r)})},QW=K,Gg=In,ZW=yu,JW=We,e9=Fe,t9=e9("species"),Kg=QW.Array,r9=function(r){var n;return Gg(r)&&(n=r.constructor,ZW(n)&&(n===Kg||Gg(n.prototype))?n=void 0:JW(n)&&(n=n[t9],n===null&&(n=void 0))),n===void 0?Kg:n},i9=r9,Bf=function(r,n){return new(i9(r))(n===0?0:n)},n9=Ya,a9=se,o9=au,s9=Et,u9=Ut,l9=Bf,qg=a9([].push),Sr=function(r){var n=r==1,e=r==2,t=r==3,i=r==4,a=r==6,o=r==7,s=r==5||a;return function(u,l,h,d){for(var f=s9(u),c=o9(f),v=n9(l,h),g=u9(c),b=0,p=d||l9,$=n?p(u,g):e||o?p(u,0):void 0,y,m;g>b;b++)if((s||b in c)&&(y=c[b],m=v(y,b,f),r))if(n)$[b]=m;else if(m)switch(r){case 3:return!0;case 5:return y;case 6:return b;case 2:qg($,y)}else switch(r){case 4:return!1;case 7:qg($,y)}return a?-1:t||i?i:$}},Gr={forEach:Sr(0),map:Sr(1),filter:Sr(2),some:Sr(3),every:Sr(4),find:Sr(5),findIndex:Sr(6),filterReject:Sr(7)},Pn=X,Lf=K,h9=wr,d9=wn,to=Wt,f9=se,on=He,mi=Tf,zf=fe,Ce=tt,c9=In,v9=qe,p9=We,g9=ke,md=kf,bd=Ot,y9=Et,wu=Vt,jf=lu,T0=Vr,$d=Va,la=On,k0=Za,m9=eo,I0=bu,wd=du,P0=_n,C0=St,b9=vu,x0=Wa,$9=fu,_d=gu,ro=su.exports,w9=cu,A0=Qa,Yg=uu,M0=Fe,_9=$u,E9=Ie,S9=Ja,D0=Ci,_u=Gr.forEach,ct=w9("hidden"),Eu="Symbol",ha="prototype",Xg=M0("toPrimitive"),O9=D0.set,Qg=D0.getterFor(Eu),Bt=Object[ha],hr=Lf.Symbol,Dr=hr&&hr[ha],R0=Lf.TypeError,eh=Lf.QObject,Nn=h9("JSON","stringify"),F0=P0.f,Cr=C0.f,N0=I0.f,T9=x0.f,B0=f9([].push),yr=ro("symbols"),io=ro("op-symbols"),th=ro("string-to-symbol-registry"),rh=ro("symbol-to-string-registry"),k9=ro("wks"),Ed=!eh||!eh[ha]||!eh[ha].findChild,Sd=on&&zf(function(){return la(Cr({},"a",{get:function(){return Cr(this,"a",{value:7}).a}})).a!=7})?function(r,n,e){var t=F0(Bt,n);t&&delete Bt[n],Cr(r,n,e),t&&r!==Bt&&Cr(Bt,n,t)}:Cr,ih=function(r,n){var e=yr[r]=la(Dr);return O9(e,{type:Eu,tag:r,description:n}),on||(e.description=n),e},Su=function(n,e,t){n===Bt&&Su(io,e,t),bd(n);var i=jf(e);return bd(t),Ce(yr,i)?(t.enumerable?(Ce(n,ct)&&n[ct][i]&&(n[ct][i]=!1),t=la(t,{enumerable:$d(0,!1)})):(Ce(n,ct)||Cr(n,ct,$d(1,{})),n[ct][i]=!0),Sd(n,i,t)):Cr(n,i,t)},Hf=function(n,e){bd(n);var t=wu(e),i=k0(t).concat(Wf(t));return _u(i,function(a){(!on||to(L0,t,a))&&Su(n,a,t[a])}),n},I9=function(n,e){return e===void 0?la(n):Hf(la(n),e)},L0=function(n){var e=jf(n),t=to(T9,this,e);return this===Bt&&Ce(yr,e)&&!Ce(io,e)?!1:t||!Ce(this,e)||!Ce(yr,e)||Ce(this,ct)&&this[ct][e]?t:!0},z0=function(n,e){var t=wu(n),i=jf(e);if(!(t===Bt&&Ce(yr,i)&&!Ce(io,i))){var a=F0(t,i);return a&&Ce(yr,i)&&!(Ce(t,ct)&&t[ct][i])&&(a.enumerable=!0),a}},j0=function(n){var e=N0(wu(n)),t=[];return _u(e,function(i){!Ce(yr,i)&&!Ce(A0,i)&&B0(t,i)}),t},Wf=function(n){var e=n===Bt,t=N0(e?io:wu(n)),i=[];return _u(t,function(a){Ce(yr,a)&&(!e||Ce(Bt,a))&&B0(i,yr[a])}),i};mi||(hr=function(){if(g9(Dr,this))throw R0("Symbol is not a constructor");var n=!arguments.length||arguments[0]===void 0?void 0:T0(arguments[0]),e=Yg(n),t=function(i){this===Bt&&to(t,io,i),Ce(this,ct)&&Ce(this[ct],e)&&(this[ct][e]=!1),Sd(this,e,$d(1,i))};return on&&Ed&&Sd(Bt,e,{configurable:!0,set:t}),ih(e,n)},Dr=hr[ha],_d(Dr,"toString",function(){return Qg(this).tag}),_d(hr,"withoutSetter",function(r){return ih(Yg(r),r)}),x0.f=L0,C0.f=Su,b9.f=Hf,P0.f=z0,m9.f=I0.f=j0,wd.f=Wf,_9.f=function(r){return ih(M0(r),r)},on&&Cr(Dr,"description",{configurable:!0,get:function(){return Qg(this).description}}));Pn({global:!0,wrap:!0,forced:!mi,sham:!mi},{Symbol:hr});_u(k0(k9),function(r){E9(r)});Pn({target:Eu,stat:!0,forced:!mi},{for:function(r){var n=T0(r);if(Ce(th,n))return th[n];var e=hr(n);return th[n]=e,rh[e]=n,e},keyFor:function(n){if(!md(n))throw R0(n+" is not a symbol");if(Ce(rh,n))return rh[n]},useSetter:function(){Ed=!0},useSimple:function(){Ed=!1}});Pn({target:"Object",stat:!0,forced:!mi,sham:!on},{create:I9,defineProperty:Su,defineProperties:Hf,getOwnPropertyDescriptor:z0});Pn({target:"Object",stat:!0,forced:!mi},{getOwnPropertyNames:j0,getOwnPropertySymbols:Wf});Pn({target:"Object",stat:!0,forced:zf(function(){wd.f(1)})},{getOwnPropertySymbols:function(n){return wd.f(y9(n))}});if(Nn){var P9=!mi||zf(function(){var r=hr();return Nn([r])!="[null]"||Nn({a:r})!="{}"||Nn(Object(r))!="{}"});Pn({target:"JSON",stat:!0,forced:P9},{stringify:function(n,e,t){var i=$9(arguments),a=e;if(!(!p9(e)&&n===void 0||md(n)))return c9(e)||(e=function(o,s){if(v9(a)&&(s=to(a,this,o,s)),!md(s))return s}),i[1]=e,d9(Nn,null,i)}})}if(!Dr[Xg]){var C9=Dr.valueOf;_d(Dr,Xg,function(r){return to(C9,this)})}S9(hr,Eu);A0[ct]=!0;var x9=ie,A9=x9.Object.getOwnPropertySymbols,M9=A9,D9=M9;(function(r){r.exports=D9})(_0);var jr=U(_0.exports),H0={exports:{}},W0={exports:{}},R9=X,F9=fe,N9=Vt,V0=_n.f,U0=He,B9=F9(function(){V0(1)}),L9=!U0||B9;R9({target:"Object",stat:!0,forced:L9,sham:!U0},{getOwnPropertyDescriptor:function(n,e){return V0(N9(n),e)}});var z9=ie,G0=z9.Object,j9=W0.exports=function(n,e){return G0.getOwnPropertyDescriptor(n,e)};G0.getOwnPropertyDescriptor.sham&&(j9.sham=!0);var H9=W0.exports,K0=H9;(function(r){r.exports=K0})(H0);var Kr=U(H0.exports),q0={exports:{}},W9=wr,V9=se,U9=eo,G9=du,K9=Ot,q9=V9([].concat),Y0=W9("Reflect","ownKeys")||function(n){var e=U9.f(K9(n)),t=G9.f;return t?q9(e,t(n)):e},Y9=X,X9=He,Q9=Y0,Z9=Vt,J9=_n,eV=kn;Y9({target:"Object",stat:!0,sham:!X9},{getOwnPropertyDescriptors:function(n){for(var e=Z9(n),t=J9.f,i=Q9(e),a={},o=0,s,u;i.length>o;)u=t(e,s=i[o++]),u!==void 0&&eV(a,s,u);return a}});var tV=ie,rV=tV.Object.getOwnPropertyDescriptors,iV=rV,nV=iV;(function(r){r.exports=nV})(q0);var Hr=U(q0.exports),X0={exports:{}},Q0={exports:{}},aV=X,oV=He,Zg=vu.f;aV({target:"Object",stat:!0,forced:Object.defineProperties!==Zg,sham:!oV},{defineProperties:Zg});var sV=ie,Z0=sV.Object,uV=Q0.exports=function(n,e){return Z0.defineProperties(n,e)};Z0.defineProperties.sham&&(uV.sham=!0);var lV=Q0.exports,hV=lV;(function(r){r.exports=hV})(X0);var Ou=U(X0.exports),J0={exports:{}},ew={exports:{}},dV=X,fV=He,Jg=St.f;dV({target:"Object",stat:!0,forced:Object.defineProperty!==Jg,sham:!fV},{defineProperty:Jg});var cV=ie,tw=cV.Object,vV=ew.exports=function(n,e,t){return tw.defineProperty(n,e,t)};tw.defineProperty.sham&&(vV.sham=!0);var pV=ew.exports,rw=pV;(function(r){r.exports=rw})(J0);var Tu=U(J0.exports);function D(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}var iw={exports:{}},gV=rw,yV=gV,mV=yV,bV=mV;(function(r){r.exports=bV})(iw);var ku=U(iw.exports);function ey(r,n){for(var e=0;e<n.length;e++){var t=n[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),ku(r,t.key,t)}}function R(r,n,e){return n&&ey(r.prototype,n),e&&ey(r,e),ku(r,"prototype",{writable:!1}),r}function Iu(r,n,e){return n in r?ku(r,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[n]=e,r}var nw={exports:{}},$V=X,wV=In;$V({target:"Array",stat:!0},{isArray:wV});var _V=ie,EV=_V.Array.isArray,SV=EV,aw=SV,OV=aw,TV=OV,kV=TV,IV=kV;(function(r){r.exports=IV})(nw);var ow=U(nw.exports);function PV(r){if(ow(r))return r}var sw={exports:{}},CV=fe,xV=Fe,AV=Ka,MV=xV("species"),no=function(r){return AV>=51||!CV(function(){var n=[],e=n.constructor={};return e[MV]=function(){return{foo:1}},n[r](Boolean).foo!==1})},DV=X,RV=K,FV=fe,NV=In,BV=We,LV=Et,zV=Ut,ty=kn,jV=Bf,HV=no,WV=Fe,VV=Ka,uw=WV("isConcatSpreadable"),ry=9007199254740991,iy="Maximum allowed index exceeded",ny=RV.TypeError,UV=VV>=51||!FV(function(){var r=[];return r[uw]=!1,r.concat()[0]!==r}),GV=HV("concat"),KV=function(r){if(!BV(r))return!1;var n=r[uw];return n!==void 0?!!n:NV(r)},qV=!UV||!GV;DV({target:"Array",proto:!0,forced:qV},{concat:function(n){var e=LV(this),t=jV(e,0),i=0,a,o,s,u,l;for(a=-1,s=arguments.length;a<s;a++)if(l=a===-1?e:arguments[a],KV(l)){if(u=zV(l),i+u>ry)throw ny(iy);for(o=0;o<u;o++,i++)o in l&&ty(t,i,l[o])}else{if(i>=ry)throw ny(iy);ty(t,i++,l)}return t.length=i,t}});var YV=Ie;YV("asyncIterator");var XV=Ie;XV("hasInstance");var QV=Ie;QV("isConcatSpreadable");var ZV=Ie;ZV("iterator");var JV=Ie;JV("match");var e7=Ie;e7("matchAll");var t7=Ie;t7("replace");var r7=Ie;r7("search");var i7=Ie;i7("species");var n7=Ie;n7("split");var a7=Ie;a7("toPrimitive");var o7=Ie;o7("toStringTag");var s7=Ie;s7("unscopables");var u7=K,l7=Ja;l7(u7.JSON,"JSON",!0);var h7=ie,d7=h7.Symbol,f7=d7,lw=f7,c7=lw,v7=c7,p7=Ie;p7("asyncDispose");var g7=Ie;g7("dispose");var y7=Ie;y7("matcher");var m7=Ie;m7("metadata");var b7=Ie;b7("observable");var $7=Ie;$7("patternMatch");var w7=Ie;w7("replaceAll");var _7=v7,E7=_7;(function(r){r.exports=E7})(sw);var Yi=U(sw.exports);function S7(r,n){var e=r==null?null:typeof Yi<"u"&&rr(r)||r["@@iterator"];if(e!=null){var t=[],i=!0,a=!1,o,s;try{for(e=e.call(r);!(i=(o=e.next()).done)&&(t.push(o.value),!(n&&t.length===n));i=!0);}catch(u){a=!0,s=u}finally{try{!i&&e.return!=null&&e.return()}finally{if(a)throw s}}return t}}var hw={exports:{}},O7=X,T7=K,ay=In,k7=yu,I7=We,oy=Xa,P7=Ut,C7=Vt,x7=kn,A7=Fe,M7=no,D7=fu,R7=M7("slice"),F7=A7("species"),nh=T7.Array,N7=Math.max;O7({target:"Array",proto:!0,forced:!R7},{slice:function(n,e){var t=C7(this),i=P7(t),a=oy(n,i),o=oy(e===void 0?i:e,i),s,u,l;if(ay(t)&&(s=t.constructor,k7(s)&&(s===nh||ay(s.prototype))?s=void 0:I7(s)&&(s=s[F7],s===null&&(s=void 0)),s===nh||s===void 0))return D7(t,a,o);for(u=new(s===void 0?nh:s)(N7(o-a,0)),l=0;a<o;a++,l++)a in t&&x7(u,l,t[a]);return u.length=l,u}});var B7=Ve,L7=B7("Array").slice,z7=ke,j7=L7,ah=Array.prototype,H7=function(r){var n=r.slice;return r===ah||z7(ah,r)&&n===ah.slice?j7:n},W7=H7,dw=W7,V7=dw,U7=V7,G7=U7,K7=G7;(function(r){r.exports=K7})(hw);var q7=U(hw.exports),fw={exports:{}},Y7=m0,X7=Y7,Q7=X7,Z7=Q7;(function(r){r.exports=Z7})(fw);var cw=U(fw.exports);function Od(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}function vw(r,n){var e;if(r){if(typeof r=="string")return Od(r,n);var t=q7(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return cw(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Od(r,n)}}function J7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
63
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ee(r,n){return PV(r)||S7(r,n)||vw(r,n)||J7()}var pw={exports:{}},eU=$u,tU=eU.f("iterator"),rU=tU,iU=rU,nU=iU,aU=nU,oU=aU,sU=oU;(function(r){r.exports=sU})(pw);var uU=U(pw.exports);function ve(r){return ve=typeof Yi=="function"&&typeof uU=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Yi=="function"&&n.constructor===Yi&&n!==Yi.prototype?"symbol":typeof n},ve(r)}function lU(r){if(ow(r))return Od(r)}function hU(r){if(typeof Yi<"u"&&rr(r)!=null||r["@@iterator"]!=null)return cw(r)}function dU(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
64
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kt(r){return lU(r)||hU(r)||vw(r)||dU()}var gw={exports:{}};(function(r){r.exports=lw})(gw);var _r=U(gw.exports),yw={exports:{}},fU=Ve,cU=fU("Array").concat,vU=ke,pU=cU,oh=Array.prototype,gU=function(r){var n=r.concat;return r===oh||vU(oh,r)&&n===oh.concat?pU:n},yU=gU,mU=yU;(function(r){r.exports=mU})(yw);var Vf=U(yw.exports),mw={exports:{}};(function(r){r.exports=dw})(mw);var Le=U(mw.exports),bU={exports:{}},$U=X,wU=Y0;$U({target:"Reflect",stat:!0},{ownKeys:wU});var _U=ie,EU=_U.Reflect.ownKeys,SU=EU,OU=SU;(function(r){r.exports=OU})(bU);var bw={exports:{}};(function(r){r.exports=aw})(bw);var le=U(bw.exports),$w={exports:{}},TU=X,kU=Gr.map,IU=no,PU=IU("map");TU({target:"Array",proto:!0,forced:!PU},{map:function(n){return kU(this,n,arguments.length>1?arguments[1]:void 0)}});var CU=Ve,xU=CU("Array").map,AU=ke,MU=xU,sh=Array.prototype,DU=function(r){var n=r.map;return r===sh||AU(sh,r)&&n===sh.map?MU:n},RU=DU,FU=RU;(function(r){r.exports=FU})($w);var sn=U($w.exports),ww={exports:{}},NU=X,BU=Et,_w=Za,LU=fe,zU=LU(function(){_w(1)});NU({target:"Object",stat:!0,forced:zU},{keys:function(n){return _w(BU(n))}});var jU=ie,HU=jU.Object.keys,WU=HU,VU=WU;(function(r){r.exports=VU})(ww);var _e=U(ww.exports),Ew={exports:{}},UU=X,GU=K,KU=se,Sw=GU.Date,qU=KU(Sw.prototype.getTime);UU({target:"Date",stat:!0},{now:function(){return qU(new Sw)}});var YU=ie,XU=YU.Date.now,QU=XU,ZU=QU;(function(r){r.exports=ZU})(Ew);var ws=U(Ew.exports),Ow={exports:{}},JU=fe,Cn=function(r,n){var e=[][r];return!!e&&JU(function(){e.call(null,n||function(){return 1},1)})},eG=Gr.forEach,tG=Cn,rG=tG("forEach"),iG=rG?[].forEach:function(n){return eG(this,n,arguments.length>1?arguments[1]:void 0)},nG=X,sy=iG;nG({target:"Array",proto:!0,forced:[].forEach!=sy},{forEach:sy});var aG=Ve,oG=aG("Array").forEach,sG=oG,uG=sG,lG=Pi,hG=tt,dG=ke,fG=uG,uh=Array.prototype,cG={DOMTokenList:!0,NodeList:!0},vG=function(r){var n=r.forEach;return r===uh||dG(uh,r)&&n===uh.forEach||hG(cG,lG(r))?fG:n};(function(r){r.exports=vG})(Ow);var pe=U(Ow.exports),Tw={exports:{}},pG=X,gG=se,yG=In,mG=gG([].reverse),uy=[1,2];pG({target:"Array",proto:!0,forced:String(uy)===String(uy.reverse())},{reverse:function(){return yG(this)&&(this.length=this.length),mG(this)}});var bG=Ve,$G=bG("Array").reverse,wG=ke,_G=$G,lh=Array.prototype,EG=function(r){var n=r.reverse;return r===lh||wG(lh,r)&&n===lh.reverse?_G:n},SG=EG,OG=SG;(function(r){r.exports=OG})(Tw);var li=U(Tw.exports),kw={exports:{}},TG=X,kG=K,IG=Xa,PG=hu,CG=Ut,xG=Et,AG=Bf,MG=kn,DG=no,RG=DG("splice"),FG=kG.TypeError,NG=Math.max,BG=Math.min,LG=9007199254740991,zG="Maximum allowed length exceeded";TG({target:"Array",proto:!0,forced:!RG},{splice:function(n,e){var t=xG(this),i=CG(t),a=IG(n,i),o=arguments.length,s,u,l,h,d,f;if(o===0?s=u=0:o===1?(s=0,u=i-a):(s=o-2,u=BG(NG(PG(e),0),i-a)),i+s-u>LG)throw FG(zG);for(l=AG(t,u),h=0;h<u;h++)d=a+h,d in t&&MG(l,h,t[d]);if(l.length=u,s<u){for(h=a;h<i-u;h++)d=h+u,f=h+s,d in t?t[f]=t[d]:delete t[f];for(h=i;h>i-u+s;h--)delete t[h-1]}else if(s>u)for(h=i-u;h>a;h--)d=h+u-1,f=h+s-1,d in t?t[f]=t[d]:delete t[f];for(h=0;h<s;h++)t[h+a]=arguments[h+2];return t.length=i-u+s,l}});var jG=Ve,HG=jG("Array").splice,WG=ke,VG=HG,hh=Array.prototype,UG=function(r){var n=r.splice;return r===hh||WG(hh,r)&&n===hh.splice?VG:n},GG=UG,KG=GG;(function(r){r.exports=KG})(kw);var dr=U(kw.exports),Iw={exports:{}},qG=X,YG=Cf.includes;qG({target:"Array",proto:!0},{includes:function(n){return YG(this,n,arguments.length>1?arguments[1]:void 0)}});var XG=Ve,QG=XG("Array").includes,ZG=We,JG=Ii,eK=Fe,tK=eK("match"),rK=function(r){var n;return ZG(r)&&((n=r[tK])!==void 0?!!n:JG(r)=="RegExp")},iK=K,nK=rK,aK=iK.TypeError,oK=function(r){if(nK(r))throw aK("The method doesn't accept regular expressions");return r},sK=Fe,uK=sK("match"),lK=function(r){var n=/./;try{"/./"[r](n)}catch{try{return n[uK]=!1,"/./"[r](n)}catch{}}return!1},hK=X,dK=se,fK=oK,cK=Ua,ly=Vr,vK=lK,pK=dK("".indexOf);hK({target:"String",proto:!0,forced:!vK("includes")},{includes:function(n){return!!~pK(ly(cK(this)),ly(fK(n)),arguments.length>1?arguments[1]:void 0)}});var gK=Ve,yK=gK("String").includes,hy=ke,mK=QG,bK=yK,dh=Array.prototype,fh=String.prototype,$K=function(r){var n=r.includes;return r===dh||hy(dh,r)&&n===dh.includes?mK:typeof r=="string"||r===fh||hy(fh,r)&&n===fh.includes?bK:n},wK=$K,_K=wK;(function(r){r.exports=_K})(Iw);var Zt=U(Iw.exports),Pw={exports:{}},EK=X,SK=fe,OK=Et,Cw=pu,TK=i0,kK=SK(function(){Cw(1)});EK({target:"Object",stat:!0,forced:kK,sham:!TK},{getPrototypeOf:function(n){return Cw(OK(n))}});var IK=ie,PK=IK.Object.getPrototypeOf,CK=PK,xw=CK;(function(r){r.exports=xw})(Pw);var dy=U(Pw.exports),Aw={exports:{}},xK=X,AK=Gr.filter,MK=no,DK=MK("filter");xK({target:"Array",proto:!0,forced:!DK},{filter:function(n){return AK(this,n,arguments.length>1?arguments[1]:void 0)}});var RK=Ve,FK=RK("Array").filter,NK=ke,BK=FK,ch=Array.prototype,LK=function(r){var n=r.filter;return r===ch||NK(ch,r)&&n===ch.filter?BK:n},zK=LK,jK=zK;(function(r){r.exports=jK})(Aw);var pt=U(Aw.exports),HK={exports:{}},WK=He,Mw=se,VK=Za,UK=Vt,GK=Wa.f,KK=Mw(GK),qK=Mw([].push),fy=function(r){return function(n){for(var e=UK(n),t=VK(e),i=t.length,a=0,o=[],s;i>a;)s=t[a++],(!WK||KK(e,s))&&qK(o,r?[s,e[s]]:e[s]);return o}},YK={entries:fy(!0),values:fy(!1)},XK=X,QK=YK.values;XK({target:"Object",stat:!0},{values:function(n){return QK(n)}});var ZK=ie,JK=ZK.Object.values,eq=JK,tq=eq;(function(r){r.exports=tq})(HK);var Dw={exports:{}},Pu=`
65
- \v\f\r                 \u2028\u2029\uFEFF`,rq=se,iq=Ua,nq=Vr,aq=Pu,cy=rq("".replace),_s="["+aq+"]",oq=RegExp("^"+_s+_s+"*"),sq=RegExp(_s+_s+"*$"),vh=function(r){return function(n){var e=nq(iq(n));return r&1&&(e=cy(e,oq,"")),r&2&&(e=cy(e,sq,"")),e}},Uf={start:vh(1),end:vh(2),trim:vh(3)},Rw=K,uq=fe,lq=se,hq=Vr,dq=Uf.trim,vy=Pu,qn=Rw.parseInt,py=Rw.Symbol,gy=py&&py.iterator,Fw=/^[+-]?0x/i,fq=lq(Fw.exec),cq=qn(vy+"08")!==8||qn(vy+"0x16")!==22||gy&&!uq(function(){qn(Object(gy))}),vq=cq?function(n,e){var t=dq(hq(n));return qn(t,e>>>0||(fq(Fw,t)?16:10))}:qn,pq=X,yy=vq;pq({global:!0,forced:parseInt!=yy},{parseInt:yy});var gq=ie,yq=gq.parseInt,mq=yq,bq=mq;(function(r){r.exports=bq})(Dw);var Ft=U(Dw.exports),Nw={exports:{}},$q=X,wq=se,_q=Cf.indexOf,Eq=Cn,Td=wq([].indexOf),my=!!Td&&1/Td([1],1,-0)<0,Sq=Eq("indexOf");$q({target:"Array",proto:!0,forced:my||!Sq},{indexOf:function(n){var e=arguments.length>1?arguments[1]:void 0;return my?Td(this,n,e)||0:_q(this,n,e)}});var Oq=Ve,Tq=Oq("Array").indexOf,kq=ke,Iq=Tq,ph=Array.prototype,Pq=function(r){var n=r.indexOf;return r===ph||kq(ph,r)&&n===ph.indexOf?Iq:n},Cq=Pq,xq=Cq;(function(r){r.exports=xq})(Nw);var oe=U(Nw.exports),Aq={exports:{}},Mq=e0.PROPER,Dq=fe,by=Pu,$y="​…᠎",Rq=function(r){return Dq(function(){return!!by[r]()||$y[r]()!==$y||Mq&&by[r].name!==r})},Fq=X,Nq=Uf.trim,Bq=Rq;Fq({target:"String",proto:!0,forced:Bq("trim")},{trim:function(){return Nq(this)}});var Lq=Ve,zq=Lq("String").trim,jq=ke,Hq=zq,gh=String.prototype,Wq=function(r){var n=r.trim;return typeof r=="string"||r===gh||jq(gh,r)&&n===gh.trim?Hq:n},Vq=Wq,Uq=Vq;(function(r){r.exports=Uq})(Aq);var Bw={exports:{}},Gq=X,Kq=He,qq=On;Gq({target:"Object",stat:!0,sham:!Kq},{create:qq});var Yq=ie,Xq=Yq.Object,Qq=function(n,e){return Xq.create(n,e)},Zq=Qq,Lw=Zq;(function(r){r.exports=Lw})(Bw);var hi=U(Bw.exports),zw={exports:{}},Jq=X,eY=K,tY=wr,rY=wn,ao=se,iY=fe,nY=eY.Array,Es=tY("JSON","stringify"),Do=ao(/./.exec),wy=ao("".charAt),aY=ao("".charCodeAt),oY=ao("".replace),sY=ao(1 .toString),uY=/[\uD800-\uDFFF]/g,_y=/^[\uD800-\uDBFF]$/,Ey=/^[\uDC00-\uDFFF]$/,lY=function(r,n,e){var t=wy(e,n-1),i=wy(e,n+1);return Do(_y,r)&&!Do(Ey,i)||Do(Ey,r)&&!Do(_y,t)?"\\u"+sY(aY(r,0),16):r},hY=iY(function(){return Es("\uDF06\uD834")!=='"\\udf06\\ud834"'||Es("\uDEAD")!=='"\\udead"'});Es&&Jq({target:"JSON",stat:!0,forced:hY},{stringify:function(n,e,t){for(var i=0,a=arguments.length,o=nY(a);i<a;i++)o[i]=arguments[i];var s=rY(Es,null,o);return typeof s=="string"?oY(s,uY,lY):s}});var kd=ie,dY=wn;kd.JSON||(kd.JSON={stringify:JSON.stringify});var fY=function(n,e,t){return dY(kd.JSON.stringify,null,arguments)},cY=fY,vY=cY;(function(r){r.exports=vY})(zw);var oo=U(zw.exports),jw={exports:{}},pY=K,gY=pY.TypeError,yY=function(r,n){if(r<n)throw gY("Not enough arguments");return r},mY=X,Id=K,bY=wn,$Y=qe,wY=Ga,_Y=fu,EY=yY,SY=/MSIE .\./.test(wY),OY=Id.Function,Sy=function(r){return function(n,e){var t=EY(arguments.length,1)>2,i=$Y(n)?n:OY(n),a=t?_Y(arguments,2):void 0;return r(t?function(){bY(i,this,a)}:i,e)}};mY({global:!0,bind:!0,forced:SY},{setTimeout:Sy(Id.setTimeout),setInterval:Sy(Id.setInterval)});var TY=ie,kY=TY.setTimeout;(function(r){r.exports=kY})(jw);var Jt=U(jw.exports),Hw={exports:{}},IY=Et,Oy=Xa,PY=Ut,CY=function(n){for(var e=IY(this),t=PY(e),i=arguments.length,a=Oy(i>1?arguments[1]:void 0,t),o=i>2?arguments[2]:void 0,s=o===void 0?t:Oy(o,t);s>a;)e[a++]=n;return e},xY=X,AY=CY;xY({target:"Array",proto:!0},{fill:AY});var MY=Ve,DY=MY("Array").fill,RY=ke,FY=DY,yh=Array.prototype,NY=function(r){var n=r.fill;return r===yh||RY(yh,r)&&n===yh.fill?FY:n},BY=NY,LY=BY;(function(r){r.exports=LY})(Hw);var so=U(Hw.exports);/*! Hammer.JS - v2.0.17-rc - 2019-12-16
66
- * http://naver.github.io/egjs
67
- *
68
- * Forked By Naver egjs
69
- * Copyright (c) hammerjs
70
- * Licensed under the MIT license */function zt(){return zt=Object.assign||function(r){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}return r},zt.apply(this,arguments)}function At(r,n){r.prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n}function Ro(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}var Pd;typeof Object.assign!="function"?Pd=function(n){if(n==null)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(n),t=1;t<arguments.length;t++){var i=arguments[t];if(i!=null)for(var a in i)i.hasOwnProperty(a)&&(e[a]=i[a])}return e}:Pd=Object.assign;var bi=Pd,Ty=["","webkit","Moz","MS","ms","o"],zY=typeof document>"u"?{style:{}}:document.createElement("div"),jY="function",Xi=Math.round,$i=Math.abs,Gf=Date.now;function Cu(r,n){for(var e,t,i=n[0].toUpperCase()+n.slice(1),a=0;a<Ty.length;){if(e=Ty[a],t=e?e+i:n,t in r)return t;a++}}var fr;typeof window>"u"?fr={}:fr=window;var Ww=Cu(zY.style,"touchAction"),Vw=Ww!==void 0;function HY(){if(!Vw)return!1;var r={},n=fr.CSS&&fr.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return r[e]=n?fr.CSS.supports("touch-action",e):!0}),r}var Uw="compute",Gw="auto",Cd="manipulation",di="none",da="pan-x",fa="pan-y",Fo=HY(),WY=/mobile|tablet|ip(ad|hone|od)|android/i,Kw="ontouchstart"in fr,VY=Cu(fr,"PointerEvent")!==void 0,UY=Kw&&WY.test(navigator.userAgent),uo="touch",GY="pen",Kf="mouse",KY="kinect",qY=25,ot=1,xi=2,Me=4,yt=8,Ss=1,lo=2,ho=4,fo=8,un=16,er=lo|ho,fi=fo|un,qw=er|fi,Yw=["x","y"],Os=["clientX","clientY"];function cr(r,n,e){var t;if(r)if(r.forEach)r.forEach(n,e);else if(r.length!==void 0)for(t=0;t<r.length;)n.call(e,r[t],t,r),t++;else for(t in r)r.hasOwnProperty(t)&&n.call(e,r[t],t,r)}function xu(r,n){return typeof r===jY?r.apply(n&&n[0]||void 0,n):r}function ii(r,n){return r.indexOf(n)>-1}function YY(r){if(ii(r,di))return di;var n=ii(r,da),e=ii(r,fa);return n&&e?di:n||e?n?da:fa:ii(r,Cd)?Cd:Gw}var Xw=function(){function r(e,t){this.manager=e,this.set(t)}var n=r.prototype;return n.set=function(t){t===Uw&&(t=this.compute()),Vw&&this.manager.element.style&&Fo[t]&&(this.manager.element.style[Ww]=t),this.actions=t.toLowerCase().trim()},n.update=function(){this.set(this.manager.options.touchAction)},n.compute=function(){var t=[];return cr(this.manager.recognizers,function(i){xu(i.options.enable,[i])&&(t=t.concat(i.getTouchAction()))}),YY(t.join(" "))},n.preventDefaults=function(t){var i=t.srcEvent,a=t.offsetDirection;if(this.manager.session.prevented){i.preventDefault();return}var o=this.actions,s=ii(o,di)&&!Fo[di],u=ii(o,fa)&&!Fo[fa],l=ii(o,da)&&!Fo[da];if(s){var h=t.pointers.length===1,d=t.distance<2,f=t.deltaTime<250;if(h&&d&&f)return}if(!(l&&u)&&(s||u&&a&er||l&&a&fi))return this.preventSrc(i)},n.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},r}();function qf(r,n){for(;r;){if(r===n)return!0;r=r.parentNode}return!1}function Qw(r){var n=r.length;if(n===1)return{x:Xi(r[0].clientX),y:Xi(r[0].clientY)};for(var e=0,t=0,i=0;i<n;)e+=r[i].clientX,t+=r[i].clientY,i++;return{x:Xi(e/n),y:Xi(t/n)}}function ky(r){for(var n=[],e=0;e<r.pointers.length;)n[e]={clientX:Xi(r.pointers[e].clientX),clientY:Xi(r.pointers[e].clientY)},e++;return{timeStamp:Gf(),pointers:n,center:Qw(n),deltaX:r.deltaX,deltaY:r.deltaY}}function Ts(r,n,e){e||(e=Yw);var t=n[e[0]]-r[e[0]],i=n[e[1]]-r[e[1]];return Math.sqrt(t*t+i*i)}function xd(r,n,e){e||(e=Yw);var t=n[e[0]]-r[e[0]],i=n[e[1]]-r[e[1]];return Math.atan2(i,t)*180/Math.PI}function Zw(r,n){return r===n?Ss:$i(r)>=$i(n)?r<0?lo:ho:n<0?fo:un}function XY(r,n){var e=n.center,t=r.offsetDelta||{},i=r.prevDelta||{},a=r.prevInput||{};(n.eventType===ot||a.eventType===Me)&&(i=r.prevDelta={x:a.deltaX||0,y:a.deltaY||0},t=r.offsetDelta={x:e.x,y:e.y}),n.deltaX=i.x+(e.x-t.x),n.deltaY=i.y+(e.y-t.y)}function Jw(r,n,e){return{x:n/r||0,y:e/r||0}}function QY(r,n){return Ts(n[0],n[1],Os)/Ts(r[0],r[1],Os)}function ZY(r,n){return xd(n[1],n[0],Os)+xd(r[1],r[0],Os)}function JY(r,n){var e=r.lastInterval||n,t=n.timeStamp-e.timeStamp,i,a,o,s;if(n.eventType!==yt&&(t>qY||e.velocity===void 0)){var u=n.deltaX-e.deltaX,l=n.deltaY-e.deltaY,h=Jw(t,u,l);a=h.x,o=h.y,i=$i(h.x)>$i(h.y)?h.x:h.y,s=Zw(u,l),r.lastInterval=n}else i=e.velocity,a=e.velocityX,o=e.velocityY,s=e.direction;n.velocity=i,n.velocityX=a,n.velocityY=o,n.direction=s}function eX(r,n){var e=r.session,t=n.pointers,i=t.length;e.firstInput||(e.firstInput=ky(n)),i>1&&!e.firstMultiple?e.firstMultiple=ky(n):i===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,u=n.center=Qw(t);n.timeStamp=Gf(),n.deltaTime=n.timeStamp-a.timeStamp,n.angle=xd(s,u),n.distance=Ts(s,u),XY(e,n),n.offsetDirection=Zw(n.deltaX,n.deltaY);var l=Jw(n.deltaTime,n.deltaX,n.deltaY);n.overallVelocityX=l.x,n.overallVelocityY=l.y,n.overallVelocity=$i(l.x)>$i(l.y)?l.x:l.y,n.scale=o?QY(o.pointers,t):1,n.rotation=o?ZY(o.pointers,t):0,n.maxPointers=e.prevInput?n.pointers.length>e.prevInput.maxPointers?n.pointers.length:e.prevInput.maxPointers:n.pointers.length,JY(e,n);var h=r.element,d=n.srcEvent,f;d.composedPath?f=d.composedPath()[0]:d.path?f=d.path[0]:f=d.target,qf(f,h)&&(h=f),n.target=h}function tX(r,n,e){var t=e.pointers.length,i=e.changedPointers.length,a=n&ot&&t-i===0,o=n&(Me|yt)&&t-i===0;e.isFirst=!!a,e.isFinal=!!o,a&&(r.session={}),e.eventType=n,eX(r,e),r.emit("hammer.input",e),r.recognize(e),r.session.prevInput=e}function ca(r){return r.trim().split(/\s+/g)}function Yn(r,n,e){cr(ca(n),function(t){r.addEventListener(t,e,!1)})}function Xn(r,n,e){cr(ca(n),function(t){r.removeEventListener(t,e,!1)})}function Iy(r){var n=r.ownerDocument||r;return n.defaultView||n.parentWindow||window}var xn=function(){function r(e,t){var i=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(a){xu(e.options.enable,[e])&&i.handler(a)},this.init()}var n=r.prototype;return n.handler=function(){},n.init=function(){this.evEl&&Yn(this.element,this.evEl,this.domHandler),this.evTarget&&Yn(this.target,this.evTarget,this.domHandler),this.evWin&&Yn(Iy(this.element),this.evWin,this.domHandler)},n.destroy=function(){this.evEl&&Xn(this.element,this.evEl,this.domHandler),this.evTarget&&Xn(this.target,this.evTarget,this.domHandler),this.evWin&&Xn(Iy(this.element),this.evWin,this.domHandler)},r}();function wi(r,n,e){if(r.indexOf&&!e)return r.indexOf(n);for(var t=0;t<r.length;){if(e&&r[t][e]==n||!e&&r[t]===n)return t;t++}return-1}var rX={pointerdown:ot,pointermove:xi,pointerup:Me,pointercancel:yt,pointerout:yt},iX={2:uo,3:GY,4:Kf,5:KY},e_="pointerdown",t_="pointermove pointerup pointercancel";fr.MSPointerEvent&&!fr.PointerEvent&&(e_="MSPointerDown",t_="MSPointerMove MSPointerUp MSPointerCancel");var r_=function(r){At(n,r);function n(){var t,i=n.prototype;return i.evEl=e_,i.evWin=t_,t=r.apply(this,arguments)||this,t.store=t.manager.session.pointerEvents=[],t}var e=n.prototype;return e.handler=function(i){var a=this.store,o=!1,s=i.type.toLowerCase().replace("ms",""),u=rX[s],l=iX[i.pointerType]||i.pointerType,h=l===uo,d=wi(a,i.pointerId,"pointerId");u&ot&&(i.button===0||h)?d<0&&(a.push(i),d=a.length-1):u&(Me|yt)&&(o=!0),!(d<0)&&(a[d]=i,this.callback(this.manager,u,{pointers:a,changedPointers:[i],pointerType:l,srcEvent:i}),o&&a.splice(d,1))},n}(xn);function va(r){return Array.prototype.slice.call(r,0)}function Yf(r,n,e){for(var t=[],i=[],a=0;a<r.length;){var o=n?r[a][n]:r[a];wi(i,o)<0&&t.push(r[a]),i[a]=o,a++}return e&&(n?t=t.sort(function(s,u){return s[n]>u[n]}):t=t.sort()),t}var nX={touchstart:ot,touchmove:xi,touchend:Me,touchcancel:yt},aX="touchstart touchmove touchend touchcancel",Xf=function(r){At(n,r);function n(){var t;return n.prototype.evTarget=aX,t=r.apply(this,arguments)||this,t.targetIds={},t}var e=n.prototype;return e.handler=function(i){var a=nX[i.type],o=oX.call(this,i,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:uo,srcEvent:i})},n}(xn);function oX(r,n){var e=va(r.touches),t=this.targetIds;if(n&(ot|xi)&&e.length===1)return t[e[0].identifier]=!0,[e,e];var i,a,o=va(r.changedTouches),s=[],u=this.target;if(a=e.filter(function(l){return qf(l.target,u)}),n===ot)for(i=0;i<a.length;)t[a[i].identifier]=!0,i++;for(i=0;i<o.length;)t[o[i].identifier]&&s.push(o[i]),n&(Me|yt)&&delete t[o[i].identifier],i++;if(s.length)return[Yf(a.concat(s),"identifier",!0),s]}var sX={mousedown:ot,mousemove:xi,mouseup:Me},uX="mousedown",lX="mousemove mouseup",Qf=function(r){At(n,r);function n(){var t,i=n.prototype;return i.evEl=uX,i.evWin=lX,t=r.apply(this,arguments)||this,t.pressed=!1,t}var e=n.prototype;return e.handler=function(i){var a=sX[i.type];a&ot&&i.button===0&&(this.pressed=!0),a&xi&&i.which!==1&&(a=Me),this.pressed&&(a&Me&&(this.pressed=!1),this.callback(this.manager,a,{pointers:[i],changedPointers:[i],pointerType:Kf,srcEvent:i}))},n}(xn),hX=2500,Py=25;function Cy(r){var n=r.changedPointers,e=n[0];if(e.identifier===this.primaryTouch){var t={x:e.clientX,y:e.clientY},i=this.lastTouches;this.lastTouches.push(t);var a=function(){var s=i.indexOf(t);s>-1&&i.splice(s,1)};setTimeout(a,hX)}}function dX(r,n){r&ot?(this.primaryTouch=n.changedPointers[0].identifier,Cy.call(this,n)):r&(Me|yt)&&Cy.call(this,n)}function fX(r){for(var n=r.srcEvent.clientX,e=r.srcEvent.clientY,t=0;t<this.lastTouches.length;t++){var i=this.lastTouches[t],a=Math.abs(n-i.x),o=Math.abs(e-i.y);if(a<=Py&&o<=Py)return!0}return!1}var i_=function(){var r=function(n){At(e,n);function e(i,a){var o;return o=n.call(this,i,a)||this,o.handler=function(s,u,l){var h=l.pointerType===uo,d=l.pointerType===Kf;if(!(d&&l.sourceCapabilities&&l.sourceCapabilities.firesTouchEvents)){if(h)dX.call(Ro(Ro(o)),u,l);else if(d&&fX.call(Ro(Ro(o)),l))return;o.callback(s,u,l)}},o.touch=new Xf(o.manager,o.handler),o.mouse=new Qf(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}var t=e.prototype;return t.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(xn);return r}();function cX(r){var n,e=r.options.inputClass;return e?n=e:VY?n=r_:UY?n=Xf:Kw?n=i_:n=Qf,new n(r,tX)}function Qi(r,n,e){return Array.isArray(r)?(cr(r,e[n],e),!0):!1}var es=1,Ct=2,ln=4,Lr=8,vr=Lr,pa=16,Yt=32,vX=1;function pX(){return vX++}function No(r,n){var e=n.manager;return e?e.get(r):r}function xy(r){return r&pa?"cancel":r&Lr?"end":r&ln?"move":r&Ct?"start":""}var co=function(){function r(e){e===void 0&&(e={}),this.options=zt({enable:!0},e),this.id=pX(),this.manager=null,this.state=es,this.simultaneous={},this.requireFail=[]}var n=r.prototype;return n.set=function(t){return bi(this.options,t),this.manager&&this.manager.touchAction.update(),this},n.recognizeWith=function(t){if(Qi(t,"recognizeWith",this))return this;var i=this.simultaneous;return t=No(t,this),i[t.id]||(i[t.id]=t,t.recognizeWith(this)),this},n.dropRecognizeWith=function(t){return Qi(t,"dropRecognizeWith",this)?this:(t=No(t,this),delete this.simultaneous[t.id],this)},n.requireFailure=function(t){if(Qi(t,"requireFailure",this))return this;var i=this.requireFail;return t=No(t,this),wi(i,t)===-1&&(i.push(t),t.requireFailure(this)),this},n.dropRequireFailure=function(t){if(Qi(t,"dropRequireFailure",this))return this;t=No(t,this);var i=wi(this.requireFail,t);return i>-1&&this.requireFail.splice(i,1),this},n.hasRequireFailures=function(){return this.requireFail.length>0},n.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},n.emit=function(t){var i=this,a=this.state;function o(s){i.manager.emit(s,t)}a<Lr&&o(i.options.event+xy(a)),o(i.options.event),t.additionalEvent&&o(t.additionalEvent),a>=Lr&&o(i.options.event+xy(a))},n.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=Yt},n.canEmit=function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(Yt|es)))return!1;t++}return!0},n.recognize=function(t){var i=bi({},t);if(!xu(this.options.enable,[this,i])){this.reset(),this.state=Yt;return}this.state&(vr|pa|Yt)&&(this.state=es),this.state=this.process(i),this.state&(Ct|ln|Lr|pa)&&this.tryEmit(i)},n.process=function(t){},n.getTouchAction=function(){},n.reset=function(){},r}(),Ad=function(r){At(n,r);function n(t){var i;return t===void 0&&(t={}),i=r.call(this,zt({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this,i.pTime=!1,i.pCenter=!1,i._timer=null,i._input=null,i.count=0,i}var e=n.prototype;return e.getTouchAction=function(){return[Cd]},e.process=function(i){var a=this,o=this.options,s=i.pointers.length===o.pointers,u=i.distance<o.threshold,l=i.deltaTime<o.time;if(this.reset(),i.eventType&ot&&this.count===0)return this.failTimeout();if(u&&l&&s){if(i.eventType!==Me)return this.failTimeout();var h=this.pTime?i.timeStamp-this.pTime<o.interval:!0,d=!this.pCenter||Ts(this.pCenter,i.center)<o.posThreshold;this.pTime=i.timeStamp,this.pCenter=i.center,!d||!h?this.count=1:this.count+=1,this._input=i;var f=this.count%o.taps;if(f===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){a.state=vr,a.tryEmit()},o.interval),Ct):vr}return Yt},e.failTimeout=function(){var i=this;return this._timer=setTimeout(function(){i.state=Yt},this.options.interval),Yt},e.reset=function(){clearTimeout(this._timer)},e.emit=function(){this.state===vr&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},n}(co),hn=function(r){At(n,r);function n(t){return t===void 0&&(t={}),r.call(this,zt({pointers:1},t))||this}var e=n.prototype;return e.attrTest=function(i){var a=this.options.pointers;return a===0||i.pointers.length===a},e.process=function(i){var a=this.state,o=i.eventType,s=a&(Ct|ln),u=this.attrTest(i);return s&&(o&yt||!u)?a|pa:s||u?o&Me?a|Lr:a&Ct?a|ln:Ct:Yt},n}(co);function n_(r){return r===un?"down":r===fo?"up":r===lo?"left":r===ho?"right":""}var Zf=function(r){At(n,r);function n(t){var i;return t===void 0&&(t={}),i=r.call(this,zt({event:"pan",threshold:10,pointers:1,direction:qw},t))||this,i.pX=null,i.pY=null,i}var e=n.prototype;return e.getTouchAction=function(){var i=this.options.direction,a=[];return i&er&&a.push(fa),i&fi&&a.push(da),a},e.directionTest=function(i){var a=this.options,o=!0,s=i.distance,u=i.direction,l=i.deltaX,h=i.deltaY;return u&a.direction||(a.direction&er?(u=l===0?Ss:l<0?lo:ho,o=l!==this.pX,s=Math.abs(i.deltaX)):(u=h===0?Ss:h<0?fo:un,o=h!==this.pY,s=Math.abs(i.deltaY))),i.direction=u,o&&s>a.threshold&&u&a.direction},e.attrTest=function(i){return hn.prototype.attrTest.call(this,i)&&(this.state&Ct||!(this.state&Ct)&&this.directionTest(i))},e.emit=function(i){this.pX=i.deltaX,this.pY=i.deltaY;var a=n_(i.direction);a&&(i.additionalEvent=this.options.event+a),r.prototype.emit.call(this,i)},n}(hn),a_=function(r){At(n,r);function n(t){return t===void 0&&(t={}),r.call(this,zt({event:"swipe",threshold:10,velocity:.3,direction:er|fi,pointers:1},t))||this}var e=n.prototype;return e.getTouchAction=function(){return Zf.prototype.getTouchAction.call(this)},e.attrTest=function(i){var a=this.options.direction,o;return a&(er|fi)?o=i.overallVelocity:a&er?o=i.overallVelocityX:a&fi&&(o=i.overallVelocityY),r.prototype.attrTest.call(this,i)&&a&i.offsetDirection&&i.distance>this.options.threshold&&i.maxPointers===this.options.pointers&&$i(o)>this.options.velocity&&i.eventType&Me},e.emit=function(i){var a=n_(i.offsetDirection);a&&this.manager.emit(this.options.event+a,i),this.manager.emit(this.options.event,i)},n}(hn),o_=function(r){At(n,r);function n(t){return t===void 0&&(t={}),r.call(this,zt({event:"pinch",threshold:0,pointers:2},t))||this}var e=n.prototype;return e.getTouchAction=function(){return[di]},e.attrTest=function(i){return r.prototype.attrTest.call(this,i)&&(Math.abs(i.scale-1)>this.options.threshold||this.state&Ct)},e.emit=function(i){if(i.scale!==1){var a=i.scale<1?"in":"out";i.additionalEvent=this.options.event+a}r.prototype.emit.call(this,i)},n}(hn),s_=function(r){At(n,r);function n(t){return t===void 0&&(t={}),r.call(this,zt({event:"rotate",threshold:0,pointers:2},t))||this}var e=n.prototype;return e.getTouchAction=function(){return[di]},e.attrTest=function(i){return r.prototype.attrTest.call(this,i)&&(Math.abs(i.rotation)>this.options.threshold||this.state&Ct)},n}(hn),u_=function(r){At(n,r);function n(t){var i;return t===void 0&&(t={}),i=r.call(this,zt({event:"press",pointers:1,time:251,threshold:9},t))||this,i._timer=null,i._input=null,i}var e=n.prototype;return e.getTouchAction=function(){return[Gw]},e.process=function(i){var a=this,o=this.options,s=i.pointers.length===o.pointers,u=i.distance<o.threshold,l=i.deltaTime>o.time;if(this._input=i,!u||!s||i.eventType&(Me|yt)&&!l)this.reset();else if(i.eventType&ot)this.reset(),this._timer=setTimeout(function(){a.state=vr,a.tryEmit()},o.time);else if(i.eventType&Me)return vr;return Yt},e.reset=function(){clearTimeout(this._timer)},e.emit=function(i){this.state===vr&&(i&&i.eventType&Me?this.manager.emit(this.options.event+"up",i):(this._input.timeStamp=Gf(),this.manager.emit(this.options.event,this._input)))},n}(co),l_={domEvents:!1,touchAction:Uw,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Ay=[[s_,{enable:!1}],[o_,{enable:!1},["rotate"]],[a_,{direction:er}],[Zf,{direction:er},["swipe"]],[Ad],[Ad,{event:"doubletap",taps:2},["tap"]],[u_]],gX=1,My=2;function Dy(r,n){var e=r.element;if(e.style){var t;cr(r.options.cssProps,function(i,a){t=Cu(e.style,a),n?(r.oldCssProps[t]=e.style[t],e.style[t]=i):e.style[t]=r.oldCssProps[t]||""}),n||(r.oldCssProps={})}}function yX(r,n){var e=document.createEvent("Event");e.initEvent(r,!0,!0),e.gesture=n,n.target.dispatchEvent(e)}var Ry=function(){function r(e,t){var i=this;this.options=bi({},l_,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=cX(this),this.touchAction=new Xw(this,this.options.touchAction),Dy(this,!0),cr(this.options.recognizers,function(a){var o=i.add(new a[0](a[1]));a[2]&&o.recognizeWith(a[2]),a[3]&&o.requireFailure(a[3])},this)}var n=r.prototype;return n.set=function(t){return bi(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},n.stop=function(t){this.session.stopped=t?My:gX},n.recognize=function(t){var i=this.session;if(!i.stopped){this.touchAction.preventDefaults(t);var a,o=this.recognizers,s=i.curRecognizer;(!s||s&&s.state&vr)&&(i.curRecognizer=null,s=null);for(var u=0;u<o.length;)a=o[u],i.stopped!==My&&(!s||a===s||a.canRecognizeWith(s))?a.recognize(t):a.reset(),!s&&a.state&(Ct|ln|Lr)&&(i.curRecognizer=a,s=a),u++}},n.get=function(t){if(t instanceof co)return t;for(var i=this.recognizers,a=0;a<i.length;a++)if(i[a].options.event===t)return i[a];return null},n.add=function(t){if(Qi(t,"add",this))return this;var i=this.get(t.options.event);return i&&this.remove(i),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},n.remove=function(t){if(Qi(t,"remove",this))return this;var i=this.get(t);if(t){var a=this.recognizers,o=wi(a,i);o!==-1&&(a.splice(o,1),this.touchAction.update())}return this},n.on=function(t,i){if(t===void 0||i===void 0)return this;var a=this.handlers;return cr(ca(t),function(o){a[o]=a[o]||[],a[o].push(i)}),this},n.off=function(t,i){if(t===void 0)return this;var a=this.handlers;return cr(ca(t),function(o){i?a[o]&&a[o].splice(wi(a[o],i),1):delete a[o]}),this},n.emit=function(t,i){this.options.domEvents&&yX(t,i);var a=this.handlers[t]&&this.handlers[t].slice();if(!(!a||!a.length)){i.type=t,i.preventDefault=function(){i.srcEvent.preventDefault()};for(var o=0;o<a.length;)a[o](i),o++}},n.destroy=function(){this.element&&Dy(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},r}(),mX={touchstart:ot,touchmove:xi,touchend:Me,touchcancel:yt},bX="touchstart",$X="touchstart touchmove touchend touchcancel",wX=function(r){At(n,r);function n(){var t,i=n.prototype;return i.evTarget=bX,i.evWin=$X,t=r.apply(this,arguments)||this,t.started=!1,t}var e=n.prototype;return e.handler=function(i){var a=mX[i.type];if(a===ot&&(this.started=!0),!!this.started){var o=_X.call(this,i,a);a&(Me|yt)&&o[0].length-o[1].length===0&&(this.started=!1),this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:uo,srcEvent:i})}},n}(xn);function _X(r,n){var e=va(r.touches),t=va(r.changedTouches);return n&(Me|yt)&&(e=Yf(e.concat(t),"identifier",!0)),[e,t]}function h_(r,n,e){var t="DEPRECATED METHOD: "+n+`
71
- `+e+` AT
72
- `;return function(){var i=new Error("get-stack-trace"),a=i&&i.stack?i.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,t,a),r.apply(this,arguments)}}var d_=h_(function(r,n,e){for(var t=Object.keys(n),i=0;i<t.length;)(!e||e&&r[t[i]]===void 0)&&(r[t[i]]=n[t[i]]),i++;return r},"extend","Use `assign`."),EX=h_(function(r,n){return d_(r,n,!0)},"merge","Use `assign`.");function SX(r,n,e){var t=n.prototype,i;i=r.prototype=Object.create(t),i.constructor=r,i._super=t,e&&bi(i,e)}function Fy(r,n){return function(){return r.apply(n,arguments)}}var f_=function(){var r=function(e,t){return t===void 0&&(t={}),new Ry(e,zt({recognizers:Ay.concat()},t))};return r.VERSION="2.0.17-rc",r.DIRECTION_ALL=qw,r.DIRECTION_DOWN=un,r.DIRECTION_LEFT=lo,r.DIRECTION_RIGHT=ho,r.DIRECTION_UP=fo,r.DIRECTION_HORIZONTAL=er,r.DIRECTION_VERTICAL=fi,r.DIRECTION_NONE=Ss,r.DIRECTION_DOWN=un,r.INPUT_START=ot,r.INPUT_MOVE=xi,r.INPUT_END=Me,r.INPUT_CANCEL=yt,r.STATE_POSSIBLE=es,r.STATE_BEGAN=Ct,r.STATE_CHANGED=ln,r.STATE_ENDED=Lr,r.STATE_RECOGNIZED=vr,r.STATE_CANCELLED=pa,r.STATE_FAILED=Yt,r.Manager=Ry,r.Input=xn,r.TouchAction=Xw,r.TouchInput=Xf,r.MouseInput=Qf,r.PointerEventInput=r_,r.TouchMouseInput=i_,r.SingleTouchInput=wX,r.Recognizer=co,r.AttrRecognizer=hn,r.Tap=Ad,r.Pan=Zf,r.Swipe=a_,r.Pinch=o_,r.Rotate=s_,r.Press=u_,r.on=Yn,r.off=Xn,r.each=cr,r.merge=EX,r.extend=d_,r.bindFn=Fy,r.assign=bi,r.inherit=SX,r.bindFn=Fy,r.prefixed=Cu,r.toArray=va,r.inArray=wi,r.uniqueArray=Yf,r.splitStr=ca,r.boolOrFn=xu,r.hasParent=qf,r.addEventListeners=Yn,r.removeEventListeners=Xn,r.defaults=bi({},l_,{preset:Ay}),r}();f_.defaults;function c_(r,n){var e=typeof _r<"u"&&rr(r)||r["@@iterator"];if(!e){if(le(r)||(e=OX(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
73
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function OX(r,n){var e;if(r){if(typeof r=="string")return Ny(r,n);var t=Le(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Ur(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ny(r,n)}}function Ny(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}_r("DELETE");function Au(){for(var r=arguments.length,n=new Array(r),e=0;e<r;e++)n[e]=arguments[e];return TX(n.length?n:[ws()])}function TX(r){var n=kX(r),e=Ee(n,3),t=e[0],i=e[1],a=e[2],o=1,s=function(){var l=2091639*t+o*23283064365386963e-26;return t=i,i=a,a=l-(o=l|0)};return s.uint32=function(){return s()*4294967296},s.fract53=function(){return s()+(s()*2097152|0)*11102230246251565e-32},s.algorithm="Alea",s.seed=r,s.version="0.9",s}function kX(){for(var r=IX(),n=r(" "),e=r(" "),t=r(" "),i=0;i<arguments.length;i++)n-=r(i<0||arguments.length<=i?void 0:arguments[i]),n<0&&(n+=1),e-=r(i<0||arguments.length<=i?void 0:arguments[i]),e<0&&(e+=1),t-=r(i<0||arguments.length<=i?void 0:arguments[i]),t<0&&(t+=1);return[n,e,t]}function IX(){var r=4022871197;return function(n){for(var e=n.toString(),t=0;t<e.length;t++){r+=e.charCodeAt(t);var i=.02519603282416938*r;r=i>>>0,i-=r,i*=r,r=i>>>0,i-=r,r+=i*4294967296}return(r>>>0)*23283064365386963e-26}}function PX(){var r=function(){};return{on:r,off:r,destroy:r,emit:r,get:function(){return{set:r}}}}var Jf=typeof window<"u"?window.Hammer||f_:function(){return PX()};function Xt(r){var n=this,e;this._cleanupQueue=[],this.active=!1,this._dom={container:r,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(function(){n._dom.overlay.parentNode.removeChild(n._dom.overlay)});var t=Jf(this._dom.overlay);t.on("tap",A(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(function(){t.destroy()});var i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];pe(i).call(i,function(a){t.on(a,function(o){o.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(a){CX(a.target,r)||n.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(function(){document.body.removeEventListener("click",n._onClick)})),this._escListener=function(a){("key"in a?a.key==="Escape":a.keyCode===27)&&n.deactivate()}}K1(Xt.prototype);Xt.current=null;Xt.prototype.destroy=function(){var r,n;this.deactivate();var e=c_(li(r=dr(n=this._cleanupQueue).call(n,0)).call(r)),t;try{for(e.s();!(t=e.n()).done;){var i=t.value;i()}}catch(a){e.e(a)}finally{e.f()}};Xt.prototype.activate=function(){Xt.current&&Xt.current.deactivate(),Xt.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)};Xt.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")};Xt.prototype._onTapOverlay=function(r){this.activate(),r.srcEvent.stopPropagation()};function CX(r,n){for(;r;){if(r===n)return!0;r=r.parentNode}return!1}var xX=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,AX=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,MX=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,DX=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function kr(r){if(r)for(;r.hasChildNodes()===!0;){var n=r.firstChild;n&&(kr(n),r.removeChild(n))}}function xr(r){return r instanceof String||typeof r=="string"}function By(r){return ve(r)==="object"&&r!==null}function _i(r,n,e,t){var i=!1;t===!0&&(i=n[e]===null&&r[e]!==void 0),i?delete r[e]:r[e]=n[e]}function v_(r,n){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;for(var t in r)if(n[t]!==void 0)if(n[t]===null||ve(n[t])!=="object")_i(r,n,t,e);else{var i=r[t],a=n[t];By(i)&&By(a)&&v_(i,a,e)}}function An(r,n,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(le(e))throw new TypeError("Arrays are not supported by deepExtend");for(var i=0;i<r.length;i++){var a=r[i];if(Object.prototype.hasOwnProperty.call(e,a))if(e[a]&&e[a].constructor===Object)n[a]===void 0&&(n[a]={}),n[a].constructor===Object?me(n[a],e[a],!1,t):_i(n,e,a,t);else{if(le(e[a]))throw new TypeError("Arrays are not supported by deepExtend");_i(n,e,a,t)}}return n}function ks(r,n,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(le(e))throw new TypeError("Arrays are not supported by deepExtend");for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&!Zt(r).call(r,i))if(e[i]&&e[i].constructor===Object)n[i]===void 0&&(n[i]={}),n[i].constructor===Object?me(n[i],e[i]):_i(n,e,i,t);else if(le(e[i])){n[i]=[];for(var a=0;a<e[i].length;a++)n[i].push(e[i][a])}else _i(n,e,i,t);return n}function me(r,n){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)||e===!0)if(ve(n[i])==="object"&&n[i]!==null&&dy(n[i])===Object.prototype)r[i]===void 0?r[i]=me({},n[i],e):ve(r[i])==="object"&&r[i]!==null&&dy(r[i])===Object.prototype?me(r[i],n[i],e):_i(r,n,i,t);else if(le(n[i])){var a;r[i]=Le(a=n[i]).call(a)}else _i(r,n,i,t);return r}function Is(r,n){var e;return Vf(e=[]).call(e,Kt(r),[n])}function RX(r){return Le(r).call(r)}function FX(r){return r.getBoundingClientRect().left}function NX(r){return r.getBoundingClientRect().top}function te(r,n){if(le(r))for(var e=r.length,t=0;t<e;t++)n(r[t],t,r);else for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&n(r[i],i,r)}function BX(r,n,e,t){if(r.addEventListener){var i;t===void 0&&(t=!1),n==="mousewheel"&&Zt(i=navigator.userAgent).call(i,"Firefox")&&(n="DOMMouseScroll"),r.addEventListener(n,e,t)}else r.attachEvent("on"+n,e)}function LX(r,n,e,t){if(r.removeEventListener){var i;t===void 0&&(t=!1),n==="mousewheel"&&Zt(i=navigator.userAgent).call(i,"Firefox")&&(n="DOMMouseScroll"),r.removeEventListener(n,e,t)}else r.detachEvent("on"+n,e)}function ec(r){var n;switch(r.length){case 3:case 4:return n=AX.exec(r),n?{r:Ft(n[1]+n[1],16),g:Ft(n[2]+n[2],16),b:Ft(n[3]+n[3],16)}:null;case 6:case 7:return n=xX.exec(r),n?{r:Ft(n[1],16),g:Ft(n[2],16),b:Ft(n[3],16)}:null;default:return null}}function It(r,n){if(Zt(r).call(r,"rgba"))return r;if(Zt(r).call(r,"rgb")){var e=r.substr(oe(r).call(r,"(")+1).replace(")","").split(",");return"rgba("+e[0]+","+e[1]+","+e[2]+","+n+")"}else{var t=ec(r);return t==null?r:"rgba("+t.r+","+t.g+","+t.b+","+n+")"}}function p_(r,n,e){var t;return"#"+Le(t=((1<<24)+(r<<16)+(n<<8)+e).toString(16)).call(t,1)}function Md(r,n){if(xr(r)){var e=r;if(y_(e)){var t,i=sn(t=e.substr(4).substr(0,e.length-5).split(",")).call(t,function(f){return Ft(f)});e=p_(i[0],i[1],i[2])}if(g_(e)===!0){var a=zX(e),o={h:a.h,s:a.s*.8,v:Math.min(1,a.v*1.02)},s={h:a.h,s:Math.min(1,a.s*1.25),v:a.v*.8},u=Dd(s.h,s.s,s.v),l=Dd(o.h,o.s,o.v);return{background:e,border:u,highlight:{background:l,border:u},hover:{background:l,border:u}}}else return{background:e,border:e,highlight:{background:e,border:e},hover:{background:e,border:e}}}else if(n){var h={background:r.background||n.background,border:r.border||n.border,highlight:xr(r.highlight)?{border:r.highlight,background:r.highlight}:{background:r.highlight&&r.highlight.background||n.highlight.background,border:r.highlight&&r.highlight.border||n.highlight.border},hover:xr(r.hover)?{border:r.hover,background:r.hover}:{border:r.hover&&r.hover.border||n.hover.border,background:r.hover&&r.hover.background||n.hover.background}};return h}else{var d={background:r.background||void 0,border:r.border||void 0,highlight:xr(r.highlight)?{border:r.highlight,background:r.highlight}:{background:r.highlight&&r.highlight.background||void 0,border:r.highlight&&r.highlight.border||void 0},hover:xr(r.hover)?{border:r.hover,background:r.hover}:{border:r.hover&&r.hover.border||void 0,background:r.hover&&r.hover.background||void 0}};return d}}function Wn(r,n,e){r=r/255,n=n/255,e=e/255;var t=Math.min(r,Math.min(n,e)),i=Math.max(r,Math.max(n,e));if(t===i)return{h:0,s:0,v:t};var a=r===t?n-e:e===t?r-n:e-r,o=r===t?3:e===t?1:5,s=60*(o-a/(i-t))/360,u=(i-t)/i,l=i;return{h:s,s:u,v:l}}function ts(r,n,e){var t,i,a,o=Math.floor(r*6),s=r*6-o,u=e*(1-n),l=e*(1-s*n),h=e*(1-(1-s)*n);switch(o%6){case 0:t=e,i=h,a=u;break;case 1:t=l,i=e,a=u;break;case 2:t=u,i=e,a=h;break;case 3:t=u,i=l,a=e;break;case 4:t=h,i=u,a=e;break;case 5:t=e,i=u,a=l;break}return{r:Math.floor(t*255),g:Math.floor(i*255),b:Math.floor(a*255)}}function Dd(r,n,e){var t=ts(r,n,e);return p_(t.r,t.g,t.b)}function zX(r){var n=ec(r);if(!n)throw new TypeError("'".concat(r,"' is not a valid color."));return Wn(n.r,n.g,n.b)}function g_(r){var n=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(r);return n}function y_(r){return MX.test(r)}function jX(r){return DX.test(r)}function zr(r){if(r===null||ve(r)!=="object")return null;if(r instanceof Element)return r;var n=hi(r);for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&ve(r[e])=="object"&&(n[e]=zr(r[e]));return n}function kt(r,n,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=function(v){return v!=null},a=function(v){return v!==null&&ve(v)==="object"},o=function(v){for(var g in v)if(Object.prototype.hasOwnProperty.call(v,g))return!1;return!0};if(!a(r))throw new Error("Parameter mergeTarget must be an object");if(!a(n))throw new Error("Parameter options must be an object");if(!i(e))throw new Error("Parameter option must have a value");if(!a(t))throw new Error("Parameter globalOptions must be an object");var s=function(v,g,b){a(v[b])||(v[b]={});var p=g[b],$=v[b];for(var y in p)Object.prototype.hasOwnProperty.call(p,y)&&($[y]=p[y])},u=n[e],l=a(t)&&!o(t),h=l?t[e]:void 0,d=h?h.enabled:void 0;if(u!==void 0){if(typeof u=="boolean"){a(r[e])||(r[e]={}),r[e].enabled=u;return}if(u===null&&!a(r[e]))if(i(h))r[e]=hi(h);else return;if(a(u)){var f=!0;u.enabled!==void 0?f=u.enabled:d!==void 0&&(f=h.enabled),s(r,n,e),r[e].enabled=f}}}var HX={linear:function(n){return n},easeInQuad:function(n){return n*n},easeOutQuad:function(n){return n*(2-n)},easeInOutQuad:function(n){return n<.5?2*n*n:-1+(4-2*n)*n},easeInCubic:function(n){return n*n*n},easeOutCubic:function(n){return--n*n*n+1},easeInOutCubic:function(n){return n<.5?4*n*n*n:(n-1)*(2*n-2)*(2*n-2)+1},easeInQuart:function(n){return n*n*n*n},easeOutQuart:function(n){return 1- --n*n*n*n},easeInOutQuart:function(n){return n<.5?8*n*n*n*n:1-8*--n*n*n*n},easeInQuint:function(n){return n*n*n*n*n},easeOutQuint:function(n){return 1+--n*n*n*n*n},easeInOutQuint:function(n){return n<.5?16*n*n*n*n*n:1+16*--n*n*n*n*n}};function Ir(r,n){var e;le(n)||(n=[n]);var t=c_(r),i;try{for(t.s();!(i=t.n()).done;){var a=i.value;if(a){e=a[n[0]];for(var o=1;o<n.length;o++)e&&(e=e[n[o]]);if(typeof e<"u")break}}}catch(s){t.e(s)}finally{t.f()}return e}var WX={black:"#000000",navy:"#000080",darkblue:"#00008B",mediumblue:"#0000CD",blue:"#0000FF",darkgreen:"#006400",green:"#008000",teal:"#008080",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",lime:"#00FF00",springgreen:"#00FF7F",aqua:"#00FFFF",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",mediumaquamarine:"#66CDAA",dimgray:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",lightslategray:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",maroon:"#800000",purple:"#800080",olive:"#808000",gray:"#808080",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370D8",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",silver:"#C0C0C0",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgrey:"#D3D3D3",palevioletred:"#D87093",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",red:"#FF0000",fuchsia:"#FF00FF",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",yellow:"#FFFF00",lightyellow:"#FFFFE0",ivory:"#FFFFF0",white:"#FFFFFF"},VX=function(){function r(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;D(this,r),this.pixelRatio=n,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return R(r,[{key:"insertTo",value:function(e){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(e){if(typeof e=="function")this.updateCallback=e;else throw new Error("Function attempted to set as colorPicker update callback is not a function.")}},{key:"setCloseCallback",value:function(e){if(typeof e=="function")this.closeCallback=e;else throw new Error("Function attempted to set as colorPicker closing callback is not a function.")}},{key:"_isColorString",value:function(e){if(typeof e=="string")return WX[e]}},{key:"setColor",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e!=="none"){var i,a=this._isColorString(e);if(a!==void 0&&(e=a),xr(e)===!0){if(y_(e)===!0){var o=e.substr(4).substr(0,e.length-5).split(",");i={r:o[0],g:o[1],b:o[2],a:1}}else if(jX(e)===!0){var s=e.substr(5).substr(0,e.length-6).split(",");i={r:s[0],g:s[1],b:s[2],a:s[3]}}else if(g_(e)===!0){var u=ec(e);i={r:u.r,g:u.g,b:u.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){var l=e.a!==void 0?e.a:"1.0";i={r:e.r,g:e.g,b:e.b,a:l}}if(i===void 0)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+oo(e));this._setColor(i,t)}}},{key:"show",value:function(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;t===!0&&(this.previousColor=Ae({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",Jt(function(){e.closeCallback!==void 0&&(e.closeCallback(),e.closeCallback=void 0)},0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){this.previousColor!==void 0?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;t===!0&&(this.initialColor=Ae({},e)),this.color=e;var i=Wn(e.r,e.g,e.b),a=2*Math.PI,o=this.r*i.s,s=this.centerCoordinates.x+o*Math.sin(a*i.h),u=this.centerCoordinates.y+o*Math.cos(a*i.h);this.colorPickerSelector.style.left=s-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=u-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(e)}},{key:"_setOpacity",value:function(e){this.color.a=e/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(e){var t=Wn(this.color.r,this.color.g,this.color.b);t.v=e/100;var i=ts(t.h,t.s,t.v);i.a=this.color.a,this.color=i,this._updatePicker()}},{key:"_updatePicker",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color,t=Wn(e.r,e.g,e.b),i=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1)),i.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var a=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,a,o),i.putImageData(this.hueCircle,0,0),i.fillStyle="rgba(0,0,0,"+(1-t.v)+")",i.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),so(i).call(i),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){var e,t,i,a;if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){var s=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(s.webkitBackingStorePixelRatio||s.mozBackingStorePixelRatio||s.msBackingStorePixelRatio||s.oBackingStorePixelRatio||s.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var o=document.createElement("DIV");o.style.color="red",o.style.fontWeight="bold",o.style.padding="10px",o.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(o)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch{}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch{}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var u=this;this.opacityRange.onchange=function(){u._setOpacity(this.value)},this.opacityRange.oninput=function(){u._setOpacity(this.value)},this.brightnessRange.onchange=function(){u._setBrightness(this.value)},this.brightnessRange.oninput=function(){u._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerText="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerText="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerText="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerText="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerText="cancel",this.cancelButton.onclick=A(e=this._hide).call(e,this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerText="apply",this.applyButton.onclick=A(t=this._apply).call(t,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=A(i=this._save).call(i,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=A(a=this._loadLast).call(a,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var e=this;this.drag={},this.pinch={},this.hammer=new Jf(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",function(t){t.isFirst&&e._moveSelector(t)}),this.hammer.on("tap",function(t){e._moveSelector(t)}),this.hammer.on("panstart",function(t){e._moveSelector(t)}),this.hammer.on("panmove",function(t){e._moveSelector(t)}),this.hammer.on("panend",function(t){e._moveSelector(t)})}},{key:"_generateHueCircle",value:function(){if(this.generated===!1){var e=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)),e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var t=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,i);var a,o,s,u;this.centerCoordinates={x:t*.5,y:i*.5},this.r=.49*t;var l=2*Math.PI/360,h=1/360,d=1/this.r,f;for(s=0;s<360;s++)for(u=0;u<this.r;u++)a=this.centerCoordinates.x+u*Math.sin(l*s),o=this.centerCoordinates.y+u*Math.cos(l*s),f=ts(s*h,u*d,1),e.fillStyle="rgb("+f.r+","+f.g+","+f.b+")",e.fillRect(a-.5,o-.5,2,2);e.strokeStyle="rgba(0,0,0,1)",e.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),e.stroke(),this.hueCircle=e.getImageData(0,0,t,i)}this.generated=!0}},{key:"_moveSelector",value:function(e){var t=this.colorPickerDiv.getBoundingClientRect(),i=e.center.x-t.left,a=e.center.y-t.top,o=.5*this.colorPickerDiv.clientHeight,s=.5*this.colorPickerDiv.clientWidth,u=i-s,l=a-o,h=Math.atan2(u,l),d=.98*Math.min(Math.sqrt(u*u+l*l),s),f=Math.cos(h)*d+o,c=Math.sin(h)*d+s;this.colorPickerSelector.style.top=f-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=c-.5*this.colorPickerSelector.clientWidth+"px";var v=h/(2*Math.PI);v=v<0?v+1:v;var g=d/this.r,b=Wn(this.color.r,this.color.g,this.color.b);b.h=v,b.s=g;var p=ts(b.h,b.s,b.v);p.a=this.color.a,this.color=p,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}}]),r}();function Rd(){for(var r=arguments.length,n=new Array(r),e=0;e<r;e++)n[e]=arguments[e];if(n.length<1)throw new TypeError("Invalid arguments.");if(n.length===1)return document.createTextNode(n[0]);var t=document.createElement(n[0]);return t.appendChild(Rd.apply(void 0,Kt(Le(n).call(n,1)))),t}var UX=function(){function r(n,e,t){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:function(){return!1};D(this,r),this.parent=n,this.changedOptions=[],this.container=e,this.allowCreation=!1,this.hideOption=a,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},Ae(this.options,this.defaultOptions),this.configureOptions=t,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new VX(i),this.wrapper=void 0}return R(r,[{key:"setOptions",value:function(e){if(e!==void 0){this.popupHistory={},this._removePopup();var t=!0;if(typeof e=="string")this.options.filter=e;else if(le(e))this.options.filter=e.join();else if(ve(e)==="object"){if(e==null)throw new TypeError("options cannot be null");e.container!==void 0&&(this.options.container=e.container),pt(e)!==void 0&&(this.options.filter=pt(e)),e.showButton!==void 0&&(this.options.showButton=e.showButton),e.enabled!==void 0&&(t=e.enabled)}else typeof e=="boolean"?(this.options.filter=!0,t=e):typeof e=="function"&&(this.options.filter=e,t=!0);pt(this.options)===!1&&(t=!1),this.options.enabled=t}this._clean()}},{key:"setModuleOptions",value:function(e){this.moduleOptions=e,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}},{key:"_create",value:function(){this._clean(),this.changedOptions=[];var e=pt(this.options),t=0,i=!1;for(var a in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,a)&&(this.allowCreation=!1,i=!1,typeof e=="function"?(i=e(a,[]),i=i||this._handleObject(this.configureOptions[a],[a],!0)):(e===!0||oe(e).call(e,a)!==-1)&&(i=!0),i!==!1&&(this.allowCreation=!0,t>0&&this._makeItem([]),this._makeHeader(a),this._handleObject(this.configureOptions[a],[a])),t++);this._makeButton(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var e=0;e<this.domElements.length;e++)this.wrapper.appendChild(this.domElements[e]);this._showPopupIfNeeded()}},{key:"_clean",value:function(){for(var e=0;e<this.domElements.length;e++)this.wrapper.removeChild(this.domElements[e]);this.wrapper!==void 0&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}},{key:"_getValue",value:function(e){for(var t=this.moduleOptions,i=0;i<e.length;i++)if(t[e[i]]!==void 0)t=t[e[i]];else{t=void 0;break}return t}},{key:"_makeItem",value:function(e){if(this.allowCreation===!0){var t=document.createElement("div");t.className="vis-configuration vis-config-item vis-config-s"+e.length;for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];return pe(a).call(a,function(s){t.appendChild(s)}),this.domElements.push(t),this.domElements.length}return 0}},{key:"_makeHeader",value:function(e){var t=document.createElement("div");t.className="vis-configuration vis-config-header",t.innerText=e,this._makeItem([],t)}},{key:"_makeLabel",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=document.createElement("div");if(a.className="vis-configuration vis-config-label vis-config-s"+t.length,i===!0){for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(Rd("i","b",e))}else a.innerText=e+":";return a}},{key:"_makeDropdown",value:function(e,t,i){var a=document.createElement("select");a.className="vis-configuration vis-config-select";var o=0;t!==void 0&&oe(e).call(e,t)!==-1&&(o=oe(e).call(e,t));for(var s=0;s<e.length;s++){var u=document.createElement("option");u.value=e[s],s===o&&(u.selected="selected"),u.innerText=e[s],a.appendChild(u)}var l=this;a.onchange=function(){l._update(this.value,i)};var h=this._makeLabel(i[i.length-1],i);this._makeItem(i,h,a)}},{key:"_makeRange",value:function(e,t,i){var a=e[0],o=e[1],s=e[2],u=e[3],l=document.createElement("input");l.className="vis-configuration vis-config-range";try{l.type="range",l.min=o,l.max=s}catch{}l.step=u;var h="",d=0;if(t!==void 0){var f=1.2;t<0&&t*f<o?(l.min=Math.ceil(t*f),d=l.min,h="range increased"):t/f<o&&(l.min=Math.ceil(t/f),d=l.min,h="range increased"),t*f>s&&s!==1&&(l.max=Math.ceil(t*f),d=l.max,h="range increased"),l.value=t}else l.value=a;var c=document.createElement("input");c.className="vis-configuration vis-config-rangeinput",c.value=l.value;var v=this;l.onchange=function(){c.value=this.value,v._update(Number(this.value),i)},l.oninput=function(){c.value=this.value};var g=this._makeLabel(i[i.length-1],i),b=this._makeItem(i,g,l,c);h!==""&&this.popupHistory[b]!==d&&(this.popupHistory[b]=d,this._setupPopup(h,b))}},{key:"_makeButton",value:function(){var e=this;if(this.options.showButton===!0){var t=document.createElement("div");t.className="vis-configuration vis-config-button",t.innerText="generate options",t.onclick=function(){e._printOptions()},t.onmouseover=function(){t.className="vis-configuration vis-config-button hover"},t.onmouseout=function(){t.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(t)}}},{key:"_setupPopup",value:function(e,t){var i=this;if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter<this.popupLimit){var a=document.createElement("div");a.id="vis-configuration-popup",a.className="vis-configuration-popup",a.innerText=e,a.onclick=function(){i._removePopup()},this.popupCounter+=1,this.popupDiv={html:a,index:t}}}},{key:"_removePopup",value:function(){this.popupDiv.html!==void 0&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}},{key:"_showPopupIfNeeded",value:function(){var e=this;if(this.popupDiv.html!==void 0){var t=this.domElements[this.popupDiv.index],i=t.getBoundingClientRect();this.popupDiv.html.style.left=i.left+"px",this.popupDiv.html.style.top=i.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=Jt(function(){e.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=Jt(function(){e._removePopup()},1800)}}},{key:"_makeCheckbox",value:function(e,t,i){var a=document.createElement("input");a.type="checkbox",a.className="vis-configuration vis-config-checkbox",a.checked=e,t!==void 0&&(a.checked=t,t!==e&&(ve(e)==="object"?t!==e.enabled&&this.changedOptions.push({path:i,value:t}):this.changedOptions.push({path:i,value:t})));var o=this;a.onchange=function(){o._update(this.checked,i)};var s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,a)}},{key:"_makeTextInput",value:function(e,t,i){var a=document.createElement("input");a.type="text",a.className="vis-configuration vis-config-text",a.value=t,t!==e&&this.changedOptions.push({path:i,value:t});var o=this;a.onchange=function(){o._update(this.value,i)};var s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,a)}},{key:"_makeColorField",value:function(e,t,i){var a=this,o=e[1],s=document.createElement("div");t=t===void 0?o:t,t!=="none"?(s.className="vis-configuration vis-config-colorBlock",s.style.backgroundColor=t):s.className="vis-configuration vis-config-colorBlock none",t=t===void 0?o:t,s.onclick=function(){a._showColorPicker(t,s,i)};var u=this._makeLabel(i[i.length-1],i);this._makeItem(i,u,s)}},{key:"_showColorPicker",value:function(e,t,i){var a=this;t.onclick=function(){},this.colorPicker.insertTo(t),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback(function(o){var s="rgba("+o.r+","+o.g+","+o.b+","+o.a+")";t.style.backgroundColor=s,a._update(s,i)}),this.colorPicker.setCloseCallback(function(){t.onclick=function(){a._showColorPicker(e,t,i)}})}},{key:"_handleObject",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=!1,o=pt(this.options),s=!1;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){a=!0;var l=e[u],h=Is(t,u);if(typeof o=="function"&&(a=o(u,t),a===!1&&!le(l)&&typeof l!="string"&&typeof l!="boolean"&&l instanceof Object&&(this.allowCreation=!1,a=this._handleObject(l,h,!0),this.allowCreation=i===!1)),a!==!1){s=!0;var d=this._getValue(h);if(le(l))this._handleArray(l,d,h);else if(typeof l=="string")this._makeTextInput(l,d,h);else if(typeof l=="boolean")this._makeCheckbox(l,d,h);else if(l instanceof Object){if(!this.hideOption(t,u,this.moduleOptions))if(l.enabled!==void 0){var f=Is(h,"enabled"),c=this._getValue(f);if(c===!0){var v=this._makeLabel(u,h,!0);this._makeItem(h,v),s=this._handleObject(l,h)||s}else this._makeCheckbox(l,c,h)}else{var g=this._makeLabel(u,h,!0);this._makeItem(h,g),s=this._handleObject(l,h)||s}}else console.error("dont know how to handle",l,u,h)}}return s}},{key:"_handleArray",value:function(e,t,i){typeof e[0]=="string"&&e[0]==="color"?(this._makeColorField(e,t,i),e[1]!==t&&this.changedOptions.push({path:i,value:t})):typeof e[0]=="string"?(this._makeDropdown(e,t,i),e[0]!==t&&this.changedOptions.push({path:i,value:t})):typeof e[0]=="number"&&(this._makeRange(e,t,i),e[0]!==t&&this.changedOptions.push({path:i,value:Number(t)}))}},{key:"_update",value:function(e,t){var i=this._constructOptions(e,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i),this.initialized=!0,this.parent.setOptions(i)}},{key:"_constructOptions",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=i;e=e==="true"?!0:e,e=e==="false"?!1:e;for(var o=0;o<t.length;o++)t[o]!=="global"&&(a[t[o]]===void 0&&(a[t[o]]={}),o!==t.length-1?a=a[t[o]]:a[t[o]]=e);return i}},{key:"_printOptions",value:function(){for(var e=this.getOptions();this.optionsContainer.firstChild;)this.optionsContainer.removeChild(this.optionsContainer.firstChild);this.optionsContainer.appendChild(Rd("pre","const options = "+oo(e,null,2)))}},{key:"getOptions",value:function(){for(var e={},t=0;t<this.changedOptions.length;t++)this._constructOptions(this.changedOptions[t].value,this.changedOptions[t].path,e);return e}}]),r}(),GX=function(){function r(n,e){D(this,r),this.container=n,this.overflowMethod=e||"cap",this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement("div"),this.frame.className="vis-tooltip",this.container.appendChild(this.frame)}return R(r,[{key:"setPosition",value:function(e,t){this.x=Ft(e),this.y=Ft(t)}},{key:"setText",value:function(e){if(e instanceof Element){for(;this.frame.firstChild;)this.frame.removeChild(this.frame.firstChild);this.frame.appendChild(e)}else this.frame.innerText=e}},{key:"show",value:function(e){if(e===void 0&&(e=!0),e===!0){var t=this.frame.clientHeight,i=this.frame.clientWidth,a=this.frame.parentNode.clientHeight,o=this.frame.parentNode.clientWidth,s=0,u=0;if(this.overflowMethod=="flip"){var l=!1,h=!0;this.y-t<this.padding&&(h=!1),this.x+i>o-this.padding&&(l=!0),l?s=this.x-i:s=this.x,h?u=this.y-t:u=this.y}else u=this.y-t,u+t+this.padding>a&&(u=a-t-this.padding),u<this.padding&&(u=this.padding),s=this.x,s+i+this.padding>o&&(s=o-i-this.padding),s<this.padding&&(s=this.padding);this.frame.style.left=s+"px",this.frame.style.top=u+"px",this.frame.style.visibility="visible",this.hidden=!1}else this.hide()}},{key:"hide",value:function(){this.hidden=!0,this.frame.style.left="0",this.frame.style.top="0",this.frame.style.visibility="hidden"}},{key:"destroy",value:function(){this.frame.parentNode.removeChild(this.frame)}}]),r}(),Bn=!1,Ly,Fd="background: #FFeeee; color: #dd0000",KX=function(){function r(){D(this,r)}return R(r,null,[{key:"validate",value:function(e,t,i){Bn=!1,Ly=t;var a=t;return i!==void 0&&(a=t[i]),r.parse(e,a,[]),Bn}},{key:"parse",value:function(e,t,i){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&r.check(a,e,t,i)}},{key:"check",value:function(e,t,i,a){if(i[e]===void 0&&i.__any__===void 0){r.getSuggestion(e,i,a);return}var o=e,s=!0;i[e]===void 0&&i.__any__!==void 0&&(o="__any__",s=r.getType(t[e])==="object");var u=i[o];s&&u.__type__!==void 0&&(u=u.__type__),r.checkFields(e,t,i,o,u,a)}},{key:"checkFields",value:function(e,t,i,a,o,s){var u=function(f){console.error("%c"+f+r.printLocation(s,e),Fd)},l=r.getType(t[e]),h=o[l];h!==void 0?r.getType(h)==="array"&&oe(h).call(h,t[e])===-1?(u('Invalid option detected in "'+e+'". Allowed values are:'+r.print(h)+' not "'+t[e]+'". '),Bn=!0):l==="object"&&a!=="__any__"&&(s=Is(s,e),r.parse(t[e],i[a],s)):o.any===void 0&&(u('Invalid type received for "'+e+'". Expected: '+r.print(_e(o))+". Received ["+l+'] "'+t[e]+'"'),Bn=!0)}},{key:"getType",value:function(e){var t=ve(e);return t==="object"?e===null?"null":e instanceof Boolean?"boolean":e instanceof Number?"number":e instanceof String?"string":le(e)?"array":e instanceof Date?"date":e.nodeType!==void 0?"dom":e._isAMomentObject===!0?"moment":"object":t==="number"?"number":t==="boolean"?"boolean":t==="string"?"string":t===void 0?"undefined":t}},{key:"getSuggestion",value:function(e,t,i){var a=r.findInOptions(e,t,i,!1),o=r.findInOptions(e,Ly,[],!0),s=8,u=4,l;a.indexMatch!==void 0?l=" in "+r.printLocation(a.path,e,"")+'Perhaps it was incomplete? Did you mean: "'+a.indexMatch+`"?
74
-
75
- `:o.distance<=u&&a.distance>o.distance?l=" in "+r.printLocation(a.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+r.printLocation(o.path,o.closestMatch,""):a.distance<=s?l='. Did you mean "'+a.closestMatch+'"?'+r.printLocation(a.path,e):l=". Did you mean one of these: "+r.print(_e(t))+r.printLocation(i,e),console.error('%cUnknown option detected: "'+e+'"'+l,Fd),Bn=!0}},{key:"findInOptions",value:function(e,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=1e9,s="",u=[],l=e.toLowerCase(),h=void 0;for(var d in t){var f=void 0;if(t[d].__type__!==void 0&&a===!0){var c=r.findInOptions(e,t[d],Is(i,d));o>c.distance&&(s=c.closestMatch,u=c.path,o=c.distance,h=c.indexMatch)}else{var v;oe(v=d.toLowerCase()).call(v,l)!==-1&&(h=d),f=r.levenshteinDistance(e,d),o>f&&(s=d,u=RX(i),o=f)}}return{closestMatch:s,path:u,distance:o,indexMatch:h}}},{key:"printLocation",value:function(e,t){for(var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at:
76
- `,a=`
77
-
78
- `+i+`options = {
79
- `,o=0;o<e.length;o++){for(var s=0;s<o+1;s++)a+=" ";a+=e[o]+`: {
80
- `}for(var u=0;u<e.length+1;u++)a+=" ";a+=t+`
81
- `;for(var l=0;l<e.length+1;l++){for(var h=0;h<e.length-l;h++)a+=" ";a+=`}
82
- `}return a+`
83
-
84
- `}},{key:"print",value:function(e){return oo(e).replace(/(")|(\[)|(\])|(,"__type__")/g,"").replace(/(,)/g,", ")}},{key:"levenshteinDistance",value:function(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;var i=[],a;for(a=0;a<=t.length;a++)i[a]=[a];var o;for(o=0;o<=e.length;o++)i[0][o]=o;for(a=1;a<=t.length;a++)for(o=1;o<=e.length;o++)t.charAt(a-1)==e.charAt(o-1)?i[a][o]=i[a-1][o-1]:i[a][o]=Math.min(i[a-1][o-1]+1,Math.min(i[a][o-1]+1,i[a-1][o]+1));return i[t.length][e.length]}}]),r}(),qX=Xt,YX=UX,Ji=Jf,XX=GX,m_=Fd,QX=KX;function ZX(r){return Rr=r,rQ()}var b_={fontsize:"font.size",fontcolor:"font.color",labelfontcolor:"font.color",fontname:"font.face",color:["color.border","color.background"],fillcolor:"color.background",tooltip:"title",labeltooltip:"title"},tc=hi(b_);tc.color="color.color";tc.style="dashes";var rt={NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3},zy={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},Rr="",dn=0,J="",G="",ht=rt.NULL;function JX(){dn=0,J=Rr.charAt(0)}function Be(){dn++,J=Rr.charAt(dn)}function Vi(){return Rr.charAt(dn+1)}function jy(r){var n=r.charCodeAt(0);return n<47?n===35||n===46:n<59?n>47:n<91?n>64:n<96?n===95:n<123?n>96:!1}function Wr(r,n){if(r||(r={}),n)for(var e in n)n.hasOwnProperty(e)&&(r[e]=n[e]);return r}function eQ(r,n,e){for(var t=n.split("."),i=r;t.length;){var a=t.shift();t.length?(i[a]||(i[a]={}),i=i[a]):i[a]=e}}function $_(r,n){for(var e,t,i=null,a=[r],o=r;o.parent;)a.push(o.parent),o=o.parent;if(o.nodes){for(e=0,t=o.nodes.length;e<t;e++)if(n.id===o.nodes[e].id){i=o.nodes[e];break}}for(i||(i={id:n.id},r.node&&(i.attr=Wr(i.attr,r.node))),e=a.length-1;e>=0;e--){var s,u=a[e];u.nodes||(u.nodes=[]),oe(s=u.nodes).call(s,i)===-1&&u.nodes.push(i)}n.attr&&(i.attr=Wr(i.attr,n.attr))}function tQ(r,n){if(r.edges||(r.edges=[]),r.edges.push(n),r.edge){var e=Wr({},r.edge);n.attr=Wr(e,n.attr)}}function w_(r,n,e,t,i){var a={from:n,to:e,type:t};return r.edge&&(a.attr=Wr({},r.edge)),a.attr=Wr(a.attr||{},i),i!=null&&i.hasOwnProperty("arrows")&&i.arrows!=null&&(a.arrows={to:{enabled:!0,type:i.arrows.type}},i.arrows=null),a}function be(){for(ht=rt.NULL,G="";J===" "||J===" "||J===`
85
- `||J==="\r";)Be();do{var r=!1;if(J==="#"){for(var n=dn-1;Rr.charAt(n)===" "||Rr.charAt(n)===" ";)n--;if(Rr.charAt(n)===`
86
- `||Rr.charAt(n)===""){for(;J!=""&&J!=`
87
- `;)Be();r=!0}}if(J==="/"&&Vi()==="/"){for(;J!=""&&J!=`
88
- `;)Be();r=!0}if(J==="/"&&Vi()==="*"){for(;J!="";)if(J==="*"&&Vi()==="/"){Be(),Be();break}else Be();r=!0}for(;J===" "||J===" "||J===`
89
- `||J==="\r";)Be()}while(r);if(J===""){ht=rt.DELIMITER;return}var e=J+Vi();if(zy[e]){ht=rt.DELIMITER,G=e,Be(),Be();return}if(zy[J]){ht=rt.DELIMITER,G=J,Be();return}if(jy(J)||J==="-"){for(G+=J,Be();jy(J);)G+=J,Be();G==="false"?G=!1:G==="true"?G=!0:isNaN(Number(G))||(G=Number(G)),ht=rt.IDENTIFIER;return}if(J==='"'){for(Be();J!=""&&(J!='"'||J==='"'&&Vi()==='"');)J==='"'?(G+=J,Be()):J==="\\"&&Vi()==="n"?(G+=`
90
- `,Be()):G+=J,Be();if(J!='"')throw it('End of string " expected');Be(),ht=rt.IDENTIFIER;return}for(ht=rt.UNKNOWN;J!="";)G+=J,Be();throw new SyntaxError('Syntax error in part "'+O_(G,30)+'"')}function rQ(){var r={};if(JX(),be(),G==="strict"&&(r.strict=!0,be()),(G==="graph"||G==="digraph")&&(r.type=G,be()),ht===rt.IDENTIFIER&&(r.id=G,be()),G!="{")throw it("Angle bracket { expected");if(be(),__(r),G!="}")throw it("Angle bracket } expected");if(be(),G!=="")throw it("End of file expected");return be(),delete r.node,delete r.edge,delete r.graph,r}function __(r){for(;G!==""&&G!="}";)iQ(r),G===";"&&be()}function iQ(r){var n=E_(r);if(n){S_(r,n);return}var e=nQ(r);if(!e){if(ht!=rt.IDENTIFIER)throw it("Identifier expected");var t=G;if(be(),G==="="){if(be(),ht!=rt.IDENTIFIER)throw it("Identifier expected");r[t]=G,be()}else aQ(r,t)}}function E_(r){var n=null;if(G==="subgraph"&&(n={},n.type="subgraph",be(),ht===rt.IDENTIFIER&&(n.id=G,be())),G==="{"){if(be(),n||(n={}),n.parent=r,n.node=r.node,n.edge=r.edge,n.graph=r.graph,__(n),G!="}")throw it("Angle bracket } expected");be(),delete n.node,delete n.edge,delete n.graph,delete n.parent,r.subgraphs||(r.subgraphs=[]),r.subgraphs.push(n)}return n}function nQ(r){return G==="node"?(be(),r.node=Qn(),"node"):G==="edge"?(be(),r.edge=Qn(),"edge"):G==="graph"?(be(),r.graph=Qn(),"graph"):null}function aQ(r,n){var e={id:n},t=Qn();t&&(e.attr=t),$_(r,e),S_(r,n)}function S_(r,n){for(;G==="->"||G==="--";){var e,t=G;be();var i=E_(r);if(i)e=i;else{if(ht!=rt.IDENTIFIER)throw it("Identifier or subgraph expected");e=G,$_(r,{id:e}),be()}var a=Qn(),o=w_(r,n,e,t,a);tQ(r,o),n=e}}function Qn(){for(var r,n=null,e={dashed:!0,solid:!1,dotted:[1,5]},t={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},i=new Array,a=new Array;G==="[";){for(be(),n={};G!==""&&G!="]";){if(ht!=rt.IDENTIFIER)throw it("Attribute name expected");var o=G;if(be(),G!="=")throw it("Equal sign = expected");if(be(),ht!=rt.IDENTIFIER)throw it("Attribute value expected");var s=G;o==="style"&&(s=e[s]);var u;o==="arrowhead"&&(u=t[s],o="arrows",s={to:{enabled:!0,type:u}}),o==="arrowtail"&&(u=t[s],o="arrows",s={from:{enabled:!0,type:u}}),i.push({attr:n,name:o,value:s}),a.push(o),be(),G==","&&be()}if(G!="]")throw it("Bracket ] expected");be()}if(Zt(a).call(a,"dir")){var l={};for(l.arrows={},r=0;r<i.length;r++)if(i[r].name==="arrows")if(i[r].value.to!=null)l.arrows.to=r;else if(i[r].value.from!=null)l.arrows.from=r;else throw it("Invalid value of arrows");else i[r].name==="dir"&&(l.dir=r);var h=i[l.dir].value;if(!Zt(a).call(a,"arrows"))if(h==="both")i.push({attr:i[l.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),l.arrows.to=i.length-1,i.push({attr:i[l.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),l.arrows.from=i.length-1;else if(h==="forward")i.push({attr:i[l.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),l.arrows.to=i.length-1;else if(h==="back")i.push({attr:i[l.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),l.arrows.from=i.length-1;else if(h==="none")i.push({attr:i[l.dir].attr,name:"arrows",value:""}),l.arrows.to=i.length-1;else throw it('Invalid dir type "'+h+'"');var d,f;if(h==="both")l.arrows.to&&l.arrows.from?(f=i[l.arrows.to].value.to.type,d=i[l.arrows.from].value.from.type,i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:d}}},dr(i).call(i,l.arrows.from,1)):l.arrows.to?(f=i[l.arrows.to].value.to.type,d="arrow",i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:d}}}):l.arrows.from&&(f="arrow",d=i[l.arrows.from].value.from.type,i[l.arrows.from]={attr:i[l.arrows.from].attr,name:i[l.arrows.from].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:d}}});else if(h==="back")l.arrows.to&&l.arrows.from?(f="",d=i[l.arrows.from].value.from.type,i[l.arrows.from]={attr:i[l.arrows.from].attr,name:i[l.arrows.from].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:d}}}):l.arrows.to?(f="",d="arrow",l.arrows.from=l.arrows.to,i[l.arrows.from]={attr:i[l.arrows.from].attr,name:i[l.arrows.from].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:d}}}):l.arrows.from&&(f="",d=i[l.arrows.from].value.from.type,i[l.arrows.to]={attr:i[l.arrows.from].attr,name:i[l.arrows.from].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:d}}}),i[l.arrows.from]={attr:i[l.arrows.from].attr,name:i[l.arrows.from].name,value:{from:{enabled:!0,type:i[l.arrows.from].value.from.type}}};else if(h==="none"){var c;l.arrows.to?c=l.arrows.to:c=l.arrows.from,i[c]={attr:i[c].attr,name:i[c].name,value:""}}else if(h==="forward")l.arrows.to&&l.arrows.from?(f=i[l.arrows.to].value.to.type,d="",i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:d}}}):l.arrows.to?(f=i[l.arrows.to].value.to.type,d="",i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:d}}}):l.arrows.from&&(f="arrow",d="",l.arrows.to=l.arrows.from,i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:d}}}),i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:i[l.arrows.to].value.to.type}}};else throw it('Invalid dir type "'+h+'"');dr(i).call(i,l.dir,1)}var v;if(Zt(a).call(a,"penwidth")){var g=[];for(v=i.length,r=0;r<v;r++)i[r].name!=="width"&&(i[r].name==="penwidth"&&(i[r].name="width"),g.push(i[r]));i=g}for(v=i.length,r=0;r<v;r++)eQ(i[r].attr,i[r].name,i[r].value);return n}function it(r){return new SyntaxError(r+', got "'+O_(G,30)+'" (char '+dn+")")}function O_(r,n){return r.length<=n?r:r.substr(0,27)+"..."}function oQ(r,n,e){le(r)?pe(r).call(r,function(t){le(n)?pe(n).call(n,function(i){e(t,i)}):e(t,n)}):le(n)?pe(n).call(n,function(t){e(r,t)}):e(r,n)}function mh(r,n,e){for(var t=n.split("."),i=t.pop(),a=r,o=0;o<t.length;o++){var s=t[o];s in a||(a[s]={}),a=a[s]}return a[i]=e,r}function Hy(r,n){var e={};for(var t in r)if(r.hasOwnProperty(t)){var i=n[t];le(i)?pe(i).call(i,function(a){mh(e,a,r[t])}):typeof i=="string"?mh(e,i,r[t]):mh(e,t,r[t])}return e}function sQ(r){var n=ZX(r),e={nodes:[],edges:[],options:{}};if(n.nodes){var t;pe(t=n.nodes).call(t,function(o){var s={id:o.id,label:String(o.label||o.id)};Wr(s,Hy(o.attr,b_)),s.image&&(s.shape="image"),e.nodes.push(s)})}if(n.edges){var i,a=function(s){var u={from:s.from,to:s.to};return Wr(u,Hy(s.attr,tc)),u.arrows==null&&s.type==="->"&&(u.arrows="to"),u};pe(i=n.edges).call(i,function(o){var s,u;if(o.from instanceof Object?s=o.from.nodes:s={id:o.from},o.to instanceof Object?u=o.to.nodes:u={id:o.to},o.from instanceof Object&&o.from.edges){var l;pe(l=o.from.edges).call(l,function(d){var f=a(d);e.edges.push(f)})}if(oQ(s,u,function(d,f){var c=w_(e,d.id,f.id,o.type,o.attr),v=a(c);e.edges.push(v)}),o.to instanceof Object&&o.to.edges){var h;pe(h=o.to.edges).call(h,function(d){var f=a(d);e.edges.push(f)})}})}return n.attr&&(e.options=n.attr),e}function uQ(r,n){var e,t={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};n!=null&&(n.fixed!=null&&(t.nodes.fixed=n.fixed),n.parseColor!=null&&(t.nodes.parseColor=n.parseColor),n.inheritColor!=null&&(t.edges.inheritColor=n.inheritColor));var i=r.edges,a=sn(i).call(i,function(s){var u={from:s.source,id:s.id,to:s.target};return s.attributes!=null&&(u.attributes=s.attributes),s.label!=null&&(u.label=s.label),s.attributes!=null&&s.attributes.title!=null&&(u.title=s.attributes.title),s.type==="Directed"&&(u.arrows="to"),s.color&&t.edges.inheritColor===!1&&(u.color=s.color),u}),o=sn(e=r.nodes).call(e,function(s){var u={id:s.id,fixed:t.nodes.fixed&&s.x!=null&&s.y!=null};return s.attributes!=null&&(u.attributes=s.attributes),s.label!=null&&(u.label=s.label),s.size!=null&&(u.size=s.size),s.attributes!=null&&s.attributes.title!=null&&(u.title=s.attributes.title),s.title!=null&&(u.title=s.title),s.x!=null&&(u.x=s.x),s.y!=null&&(u.y=s.y),s.color!=null&&(t.nodes.parseColor===!0?u.color=s.color:u.color={background:s.color,border:s.color,highlight:{background:s.color,border:s.color},hover:{background:s.color,border:s.color}}),u});return{nodes:o,edges:a}}var lQ={addDescription:"Click in an empty space to place a new node.",addEdge:"Add Edge",addNode:"Add Node",back:"Back",close:"Close",createEdgeError:"Cannot link edges to a cluster.",del:"Delete selected",deleteClusterError:"Clusters cannot be deleted.",edgeDescription:"Click on a node and drag the edge to another node to connect them.",edit:"Edit",editClusterError:"Clusters cannot be edited.",editEdge:"Edit Edge",editEdgeDescription:"Click on the control points and drag them to a node to connect to it.",editNode:"Edit Node"},hQ={addDescription:"Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.",addEdge:"Kante hinzufügen",addNode:"Knoten hinzufügen",back:"Zurück",close:"Schließen",createEdgeError:"Es ist nicht möglich, Kanten mit Clustern zu verbinden.",del:"Lösche Auswahl",deleteClusterError:"Cluster können nicht gelöscht werden.",edgeDescription:"Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.",edit:"Editieren",editClusterError:"Cluster können nicht editiert werden.",editEdge:"Kante editieren",editEdgeDescription:"Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.",editNode:"Knoten editieren"},dQ={addDescription:"Haga clic en un lugar vacío para colocar un nuevo nodo.",addEdge:"Añadir arista",addNode:"Añadir nodo",back:"Atrás",close:"Cerrar",createEdgeError:"No se puede conectar una arista a un grupo.",del:"Eliminar selección",deleteClusterError:"No es posible eliminar grupos.",edgeDescription:"Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.",edit:"Editar",editClusterError:"No es posible editar grupos.",editEdge:"Editar arista",editEdgeDescription:"Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.",editNode:"Editar nodo"},fQ={addDescription:"Clicca per aggiungere un nuovo nodo",addEdge:"Aggiungi un vertice",addNode:"Aggiungi un nodo",back:"Indietro",close:"Chiudere",createEdgeError:"Non si possono collegare vertici ad un cluster",del:"Cancella la selezione",deleteClusterError:"I cluster non possono essere cancellati",edgeDescription:"Clicca su un nodo e trascinalo ad un altro nodo per connetterli.",edit:"Modifica",editClusterError:"I clusters non possono essere modificati.",editEdge:"Modifica il vertice",editEdgeDescription:"Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.",editNode:"Modifica il nodo"},cQ={addDescription:"Klik op een leeg gebied om een nieuwe node te maken.",addEdge:"Link toevoegen",addNode:"Node toevoegen",back:"Terug",close:"Sluiten",createEdgeError:"Kan geen link maken naar een cluster.",del:"Selectie verwijderen",deleteClusterError:"Clusters kunnen niet worden verwijderd.",edgeDescription:"Klik op een node en sleep de link naar een andere node om ze te verbinden.",edit:"Wijzigen",editClusterError:"Clusters kunnen niet worden aangepast.",editEdge:"Link wijzigen",editEdgeDescription:"Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.",editNode:"Node wijzigen"},vQ={addDescription:"Clique em um espaço em branco para adicionar um novo nó",addEdge:"Adicionar aresta",addNode:"Adicionar nó",back:"Voltar",close:"Fechar",createEdgeError:"Não foi possível linkar arestas a um cluster.",del:"Remover selecionado",deleteClusterError:"Clusters não puderam ser removidos.",edgeDescription:"Clique em um nó e arraste a aresta até outro nó para conectá-los",edit:"Editar",editClusterError:"Clusters não puderam ser editados.",editEdge:"Editar aresta",editEdgeDescription:"Clique nos pontos de controle e os arraste para um nó para conectá-los",editNode:"Editar nó"},pQ={addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},gQ={addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},yQ={addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},mQ={addDescription:"Cliquez dans un endroit vide pour placer un nœud.",addEdge:"Ajouter un lien",addNode:"Ajouter un nœud",back:"Retour",close:"Fermer",createEdgeError:"Impossible de créer un lien vers un cluster.",del:"Effacer la sélection",deleteClusterError:"Les clusters ne peuvent pas être effacés.",edgeDescription:"Cliquez sur un nœud et glissez le lien vers un autre nœud pour les connecter.",edit:"Éditer",editClusterError:"Les clusters ne peuvent pas être édités.",editEdge:"Éditer le lien",editEdgeDescription:"Cliquez sur les points de contrôle et glissez-les pour connecter un nœud.",editNode:"Éditer le nœud"},bQ={addDescription:"Kluknutím do prázdného prostoru můžete přidat nový vrchol.",addEdge:"Přidat hranu",addNode:"Přidat vrchol",back:"Zpět",close:"Zavřít",createEdgeError:"Nelze připojit hranu ke shluku.",del:"Smazat výběr",deleteClusterError:"Nelze mazat shluky.",edgeDescription:"Přetažením z jednoho vrcholu do druhého můžete spojit tyto vrcholy novou hranou.",edit:"Upravit",editClusterError:"Nelze upravovat shluky.",editEdge:"Upravit hranu",editEdgeDescription:"Přetažením kontrolního vrcholu hrany ji můžete připojit k jinému vrcholu.",editNode:"Upravit vrchol"},$Q=Object.freeze({__proto__:null,en:lQ,de:hQ,es:dQ,it:fQ,nl:cQ,pt:vQ,ru:pQ,cn:gQ,uk:yQ,fr:mQ,cs:bQ});function wQ(r,n){try{var e=n.split(/[-_ /]/,2),t=Ee(e,2),i=t[0],a=t[1],o=i!=null?i.toLowerCase():null,s=a!=null?a.toUpperCase():null;if(o&&s){var u=o+"-"+s;if(Object.prototype.hasOwnProperty.call(r,u))return u;var l;console.warn(Vf(l="Unknown variant ".concat(s," of language ")).call(l,o,"."))}if(o){var h=o;if(Object.prototype.hasOwnProperty.call(r,h))return h;console.warn("Unknown language ".concat(o))}return console.warn("Unknown locale ".concat(n,", falling back to English.")),"en"}catch(d){return console.error(d),console.warn("Unexpected error while normalizing locale ".concat(n,", falling back to English.")),"en"}}var _Q=function(){function r(){D(this,r),this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}return R(r,[{key:"init",value:function(){if(!this.initialized()){this.src=this.image.src;var e=this.image.width,t=this.image.height;this.width=e,this.height=t;var i=Math.floor(t/2),a=Math.floor(t/4),o=Math.floor(t/8),s=Math.floor(t/16),u=Math.floor(e/2),l=Math.floor(e/4),h=Math.floor(e/8),d=Math.floor(e/16);this.canvas.width=3*l,this.canvas.height=i,this.coordinates=[[0,0,u,i],[u,0,l,a],[u,a,h,o],[5*h,a,d,s]],this._fillMipMap()}}},{key:"initialized",value:function(){return this.coordinates!==void 0}},{key:"_fillMipMap",value:function(){var e=this.canvas.getContext("2d"),t=this.coordinates[0];e.drawImage(this.image,t[0],t[1],t[2],t[3]);for(var i=1;i<this.NUM_ITERATIONS;i++){var a=this.coordinates[i-1],o=this.coordinates[i];e.drawImage(this.canvas,a[0],a[1],a[2],a[3],o[0],o[1],o[2],o[3])}}},{key:"drawImageAtPosition",value:function(e,t,i,a,o,s){if(this.initialized())if(t>2){t*=.5;for(var u=0;t>2&&u<this.NUM_ITERATIONS;)t*=.5,u+=1;u>=this.NUM_ITERATIONS&&(u=this.NUM_ITERATIONS-1);var l=this.coordinates[u];e.drawImage(this.canvas,l[0],l[1],l[2],l[3],i,a,o,s)}else e.drawImage(this.image,i,a,o,s)}}]),r}(),EQ=function(){function r(n){D(this,r),this.images={},this.imageBroken={},this.callback=n}return R(r,[{key:"_tryloadBrokenUrl",value:function(e,t,i){if(!(e===void 0||i===void 0)){if(t===void 0){console.warn("No broken url image defined");return}i.image.onerror=function(){console.error("Could not load brokenImage:",t)},i.image.src=t}}},{key:"_redrawWithImage",value:function(e){this.callback&&this.callback(e)}},{key:"load",value:function(e,t){var i=this,a=this.images[e];if(a)return a;var o=new _Q;return this.images[e]=o,o.image.onload=function(){i._fixImageCoordinates(o.image),o.init(),i._redrawWithImage(o)},o.image.onerror=function(){console.error("Could not load image:",e),i._tryloadBrokenUrl(e,t,o)},o.image.src=e,o}},{key:"_fixImageCoordinates",value:function(e){e.width===0&&(document.body.appendChild(e),e.width=e.offsetWidth,e.height=e.offsetHeight,document.body.removeChild(e))}}]),r}(),T_={exports:{}},vo={exports:{}},SQ=fe,OQ=SQ(function(){if(typeof ArrayBuffer=="function"){var r=new ArrayBuffer(8);Object.isExtensible(r)&&Object.defineProperty(r,"a",{value:8})}}),TQ=fe,kQ=We,IQ=Ii,Wy=OQ,rs=Object.isExtensible,PQ=TQ(function(){rs(1)}),k_=PQ||Wy?function(n){return!kQ(n)||Wy&&IQ(n)=="ArrayBuffer"?!1:rs?rs(n):!0}:rs,CQ=fe,xQ=!CQ(function(){return Object.isExtensible(Object.preventExtensions({}))}),AQ=X,MQ=se,DQ=Qa,RQ=We,rc=tt,FQ=St.f,Vy=eo,NQ=bu,ic=k_,BQ=uu,LQ=xQ,I_=!1,mr=BQ("meta"),zQ=0,nc=function(r){FQ(r,mr,{value:{objectID:"O"+zQ++,weakData:{}}})},jQ=function(r,n){if(!RQ(r))return typeof r=="symbol"?r:(typeof r=="string"?"S":"P")+r;if(!rc(r,mr)){if(!ic(r))return"F";if(!n)return"E";nc(r)}return r[mr].objectID},HQ=function(r,n){if(!rc(r,mr)){if(!ic(r))return!0;if(!n)return!1;nc(r)}return r[mr].weakData},WQ=function(r){return LQ&&I_&&ic(r)&&!rc(r,mr)&&nc(r),r},VQ=function(){UQ.enable=function(){},I_=!0;var r=Vy.f,n=MQ([].splice),e={};e[mr]=1,r(e).length&&(Vy.f=function(t){for(var i=r(t),a=0,o=i.length;a<o;a++)if(i[a]===mr){n(i,a,1);break}return i},AQ({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:NQ.f}))},UQ=vo.exports={enable:VQ,fastKey:jQ,getWeakData:HQ,onFreeze:WQ};DQ[mr]=!0;var GQ=K,KQ=Ya,qQ=Wt,YQ=Ot,XQ=ou,QQ=h0,ZQ=Ut,Uy=ke,JQ=p0,eZ=mu,Gy=l0,tZ=GQ.TypeError,is=function(r,n){this.stopped=r,this.result=n},Ky=is.prototype,ac=function(r,n,e){var t=e&&e.that,i=!!(e&&e.AS_ENTRIES),a=!!(e&&e.IS_ITERATOR),o=!!(e&&e.INTERRUPTED),s=KQ(n,t),u,l,h,d,f,c,v,g=function(p){return u&&Gy(u,"normal",p),new is(!0,p)},b=function(p){return i?(YQ(p),o?s(p[0],p[1],g):s(p[0],p[1])):o?s(p,g):s(p)};if(a)u=r;else{if(l=eZ(r),!l)throw tZ(XQ(r)+" is not iterable");if(QQ(l)){for(h=0,d=ZQ(r);d>h;h++)if(f=b(r[h]),f&&Uy(Ky,f))return f;return new is(!1)}u=JQ(r,l)}for(c=u.next;!(v=qQ(c,u)).done;){try{f=b(v.value)}catch(p){Gy(u,"throw",p)}if(typeof f=="object"&&f&&Uy(Ky,f))return f}return new is(!1)},rZ=K,iZ=ke,nZ=rZ.TypeError,oc=function(r,n){if(iZ(n,r))return r;throw nZ("Incorrect invocation")},aZ=X,oZ=K,sZ=vo.exports,uZ=fe,lZ=Sn,hZ=ac,dZ=oc,fZ=qe,cZ=We,vZ=Ja,pZ=St.f,gZ=Gr.forEach,yZ=He,P_=Ci,mZ=P_.set,bZ=P_.getterFor,sc=function(r,n,e){var t=r.indexOf("Map")!==-1,i=r.indexOf("Weak")!==-1,a=t?"set":"add",o=oZ[r],s=o&&o.prototype,u={},l;if(!yZ||!fZ(o)||!(i||s.forEach&&!uZ(function(){new o().entries().next()})))l=e.getConstructor(n,r,t,a),sZ.enable();else{l=n(function(f,c){mZ(dZ(f,h),{type:r,collection:new o}),c!=null&&hZ(c,f[a],{that:f,AS_ENTRIES:t})});var h=l.prototype,d=bZ(r);gZ(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(f){var c=f=="add"||f=="set";f in s&&!(i&&f=="clear")&&lZ(h,f,function(v,g){var b=d(this).collection;if(!c&&i&&!cZ(v))return f=="get"?void 0:!1;var p=b[f](v===0?0:v,g);return c?this:p})}),i||pZ(h,"size",{configurable:!0,get:function(){return d(this).collection.size}})}return vZ(l,r,!1,!0),u[r]=l,aZ({global:!0,forced:!0},u),i||e.setStrong(l,r,t),l},$Z=gu,uc=function(r,n,e){for(var t in n)e&&e.unsafe&&r[t]?r[t]=n[t]:$Z(r,t,n[t],e);return r},wZ=wr,_Z=St,EZ=Fe,SZ=He,qy=EZ("species"),OZ=function(r){var n=wZ(r),e=_Z.f;SZ&&n&&!n[qy]&&e(n,qy,{configurable:!0,get:function(){return this}})},TZ=St.f,kZ=On,Yy=uc,IZ=Ya,PZ=oc,CZ=ac,xZ=Ff,AZ=OZ,Ln=He,Xy=vo.exports.fastKey,C_=Ci,Qy=C_.set,bh=C_.getterFor,x_={getConstructor:function(r,n,e,t){var i=r(function(l,h){PZ(l,a),Qy(l,{type:n,index:kZ(null),first:void 0,last:void 0,size:0}),Ln||(l.size=0),h!=null&&CZ(h,l[t],{that:l,AS_ENTRIES:e})}),a=i.prototype,o=bh(n),s=function(l,h,d){var f=o(l),c=u(l,h),v,g;return c?c.value=d:(f.last=c={index:g=Xy(h,!0),key:h,value:d,previous:v=f.last,next:void 0,removed:!1},f.first||(f.first=c),v&&(v.next=c),Ln?f.size++:l.size++,g!=="F"&&(f.index[g]=c)),l},u=function(l,h){var d=o(l),f=Xy(h),c;if(f!=="F")return d.index[f];for(c=d.first;c;c=c.next)if(c.key==h)return c};return Yy(a,{clear:function(){for(var h=this,d=o(h),f=d.index,c=d.first;c;)c.removed=!0,c.previous&&(c.previous=c.previous.next=void 0),delete f[c.index],c=c.next;d.first=d.last=void 0,Ln?d.size=0:h.size=0},delete:function(l){var h=this,d=o(h),f=u(h,l);if(f){var c=f.next,v=f.previous;delete d.index[f.index],f.removed=!0,v&&(v.next=c),c&&(c.previous=v),d.first==f&&(d.first=c),d.last==f&&(d.last=v),Ln?d.size--:h.size--}return!!f},forEach:function(h){for(var d=o(this),f=IZ(h,arguments.length>1?arguments[1]:void 0),c;c=c?c.next:d.first;)for(f(c.value,c.key,this);c&&c.removed;)c=c.previous},has:function(h){return!!u(this,h)}}),Yy(a,e?{get:function(h){var d=u(this,h);return d&&d.value},set:function(h,d){return s(this,h===0?0:h,d)}}:{add:function(h){return s(this,h=h===0?0:h,h)}}),Ln&&TZ(a,"size",{get:function(){return o(this).size}}),i},setStrong:function(r,n,e){var t=n+" Iterator",i=bh(n),a=bh(t);xZ(r,n,function(o,s){Qy(this,{type:t,target:o,state:i(o),kind:s,last:void 0})},function(){for(var o=a(this),s=o.kind,u=o.last;u&&u.removed;)u=u.previous;return!o.target||!(o.last=u=u?u.next:o.state.first)?(o.target=void 0,{value:void 0,done:!0}):s=="keys"?{value:u.key,done:!1}:s=="values"?{value:u.value,done:!1}:{value:[u.key,u.value],done:!1}},e?"entries":"values",!e,!0),AZ(n)}},MZ=sc,DZ=x_;MZ("Map",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},DZ);var RZ=ie,FZ=RZ.Map,NZ=FZ,BZ=NZ;(function(r){r.exports=BZ})(T_);var A_=U(T_.exports),LZ=function(){function r(){D(this,r),this.clear(),this._defaultIndex=0,this._groupIndex=0,this._defaultGroups=[{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},{border:"#FFA500",background:"#FFFF00",highlight:{border:"#FFA500",background:"#FFFFA3"},hover:{border:"#FFA500",background:"#FFFFA3"}},{border:"#FA0A10",background:"#FB7E81",highlight:{border:"#FA0A10",background:"#FFAFB1"},hover:{border:"#FA0A10",background:"#FFAFB1"}},{border:"#41A906",background:"#7BE141",highlight:{border:"#41A906",background:"#A1EC76"},hover:{border:"#41A906",background:"#A1EC76"}},{border:"#E129F0",background:"#EB7DF4",highlight:{border:"#E129F0",background:"#F0B3F5"},hover:{border:"#E129F0",background:"#F0B3F5"}},{border:"#7C29F0",background:"#AD85E4",highlight:{border:"#7C29F0",background:"#D3BDF0"},hover:{border:"#7C29F0",background:"#D3BDF0"}},{border:"#C37F00",background:"#FFA807",highlight:{border:"#C37F00",background:"#FFCA66"},hover:{border:"#C37F00",background:"#FFCA66"}},{border:"#4220FB",background:"#6E6EFD",highlight:{border:"#4220FB",background:"#9B9BFD"},hover:{border:"#4220FB",background:"#9B9BFD"}},{border:"#FD5A77",background:"#FFC0CB",highlight:{border:"#FD5A77",background:"#FFD1D9"},hover:{border:"#FD5A77",background:"#FFD1D9"}},{border:"#4AD63A",background:"#C2FABC",highlight:{border:"#4AD63A",background:"#E6FFE3"},hover:{border:"#4AD63A",background:"#E6FFE3"}},{border:"#990000",background:"#EE0000",highlight:{border:"#BB0000",background:"#FF3333"},hover:{border:"#BB0000",background:"#FF3333"}},{border:"#FF6000",background:"#FF6000",highlight:{border:"#FF6000",background:"#FF6000"},hover:{border:"#FF6000",background:"#FF6000"}},{border:"#97C2FC",background:"#2B7CE9",highlight:{border:"#D2E5FF",background:"#2B7CE9"},hover:{border:"#D2E5FF",background:"#2B7CE9"}},{border:"#399605",background:"#255C03",highlight:{border:"#399605",background:"#255C03"},hover:{border:"#399605",background:"#255C03"}},{border:"#B70054",background:"#FF007E",highlight:{border:"#B70054",background:"#FF007E"},hover:{border:"#B70054",background:"#FF007E"}},{border:"#AD85E4",background:"#7C29F0",highlight:{border:"#D3BDF0",background:"#7C29F0"},hover:{border:"#D3BDF0",background:"#7C29F0"}},{border:"#4557FA",background:"#000EA1",highlight:{border:"#6E6EFD",background:"#000EA1"},hover:{border:"#6E6EFD",background:"#000EA1"}},{border:"#FFC0CB",background:"#FD5A77",highlight:{border:"#FFD1D9",background:"#FD5A77"},hover:{border:"#FFD1D9",background:"#FD5A77"}},{border:"#C2FABC",background:"#74D66A",highlight:{border:"#E6FFE3",background:"#74D66A"},hover:{border:"#E6FFE3",background:"#74D66A"}},{border:"#EE0000",background:"#990000",highlight:{border:"#FF3333",background:"#BB0000"},hover:{border:"#FF3333",background:"#BB0000"}}],this.options={},this.defaultOptions={useDefaultGroups:!0},Ae(this.options,this.defaultOptions)}return R(r,[{key:"setOptions",value:function(e){var t=["useDefaultGroups"];if(e!==void 0){for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&oe(t).call(t,i)===-1){var a=e[i];this.add(i,a)}}}},{key:"clear",value:function(){this._groups=new A_,this._groupNames=[]}},{key:"get",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=this._groups.get(e);if(i===void 0&&t)if(this.options.useDefaultGroups===!1&&this._groupNames.length>0){var a=this._groupIndex%this._groupNames.length;++this._groupIndex,i={},i.color=this._groups.get(this._groupNames[a]),this._groups.set(e,i)}else{var o=this._defaultIndex%this._defaultGroups.length;this._defaultIndex++,i={},i.color=this._defaultGroups[o],this._groups.set(e,i)}return i}},{key:"add",value:function(e,t){return this._groups.has(e)||this._groupNames.push(e),this._groups.set(e,t),t}}]),r}(),M_={exports:{}},zZ=X;zZ({target:"Number",stat:!0},{isNaN:function(n){return n!=n}});var jZ=ie,HZ=jZ.Number.isNaN,WZ=HZ,VZ=WZ;(function(r){r.exports=VZ})(M_);var Nd=U(M_.exports),D_={exports:{}},UZ=K,GZ=UZ.isFinite,KZ=Number.isFinite||function(n){return typeof n=="number"&&GZ(n)},qZ=X,YZ=KZ;qZ({target:"Number",stat:!0},{isFinite:YZ});var XZ=ie,QZ=XZ.Number.isFinite,ZZ=QZ,JZ=ZZ;(function(r){r.exports=JZ})(D_);var ni=U(D_.exports),R_={exports:{}},eJ=X,tJ=Gr.some,rJ=Cn,iJ=rJ("some");eJ({target:"Array",proto:!0,forced:!iJ},{some:function(n){return tJ(this,n,arguments.length>1?arguments[1]:void 0)}});var nJ=Ve,aJ=nJ("Array").some,oJ=ke,sJ=aJ,$h=Array.prototype,uJ=function(r){var n=r.some;return r===$h||oJ($h,r)&&n===$h.some?sJ:n},lJ=uJ,hJ=lJ;(function(r){r.exports=hJ})(R_);var dJ=U(R_.exports),F_={exports:{}},N_=K,fJ=fe,cJ=se,vJ=Vr,pJ=Uf.trim,gJ=Pu,yJ=cJ("".charAt),Ps=N_.parseFloat,Zy=N_.Symbol,Jy=Zy&&Zy.iterator,mJ=1/Ps(gJ+"-0")!==-1/0||Jy&&!fJ(function(){Ps(Object(Jy))}),bJ=mJ?function(n){var e=pJ(vJ(n)),t=Ps(e);return t===0&&yJ(e,0)=="-"?-0:t}:Ps,$J=X,em=bJ;$J({global:!0,forced:parseFloat!=em},{parseFloat:em});var wJ=ie,_J=wJ.parseFloat,EJ=_J,SJ=EJ;(function(r){r.exports=SJ})(F_);var B_=U(F_.exports),L_={exports:{}},OJ=X,TJ=fe,kJ=bu.f,IJ=TJ(function(){return!Object.getOwnPropertyNames(1)});OJ({target:"Object",stat:!0,forced:IJ},{getOwnPropertyNames:kJ});var PJ=ie,CJ=PJ.Object,xJ=function(n){return CJ.getOwnPropertyNames(n)},AJ=xJ,MJ=AJ;(function(r){r.exports=MJ})(L_);var DJ=U(L_.exports);function lc(r,n){var e=["node","edge","label"],t=!0,i=Ir(n,"chosen");if(typeof i=="boolean")t=i;else if(ve(i)==="object"){if(oe(e).call(e,r)===-1)throw new Error("choosify: subOption '"+r+"' should be one of '"+e.join("', '")+"'");var a=Ir(n,["chosen",r]);(typeof a=="boolean"||typeof a=="function")&&(t=a)}return t}function Bd(r,n,e){if(r.width<=0||r.height<=0)return!1;if(e!==void 0){var t={x:n.x-e.x,y:n.y-e.y};if(e.angle!==0){var i=-e.angle,a={x:Math.cos(i)*t.x-Math.sin(i)*t.y,y:Math.sin(i)*t.x+Math.cos(i)*t.y};n=a}else n=t}var o=r.x+r.width,s=r.y+r.width;return r.left<n.x&&o>n.x&&r.top<n.y&&s>n.y}function Cs(r){return typeof r=="string"&&r!==""}function z_(r,n,e,t){var i=t.x,a=t.y;if(typeof t.distanceToBorder=="function"){var o=t.distanceToBorder(r,n),s=Math.sin(n)*o,u=Math.cos(n)*o;u===o?(i+=o,a=t.y):s===o?(i=t.x,a-=o):(i+=u,a-=s)}else t.shape.width>t.shape.height?(i=t.x+t.shape.width*.5,a=t.y-e):(i=t.x+e,a=t.y-t.shape.height*.5);return{x:i,y:a}}var j_={exports:{}},RJ=Ve,FJ=RJ("Array").values,NJ=FJ,BJ=NJ,LJ=Pi,zJ=tt,jJ=ke,HJ=BJ,wh=Array.prototype,WJ={DOMTokenList:!0,NodeList:!0},VJ=function(r){var n=r.values;return r===wh||jJ(wh,r)&&n===wh.values||zJ(WJ,LJ(r))?HJ:n};(function(r){r.exports=VJ})(j_);var H_=U(j_.exports),UJ=function(){function r(n){D(this,r),this.measureText=n,this.current=0,this.width=0,this.height=0,this.lines=[]}return R(r,[{key:"_add",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"normal";this.lines[e]===void 0&&(this.lines[e]={width:0,height:0,blocks:[]});var a=t;(t===void 0||t==="")&&(a=" ");var o=this.measureText(a,i),s=Ae({},H_(o));s.text=t,s.width=o.width,s.mod=i,(t===void 0||t==="")&&(s.width=0),this.lines[e].blocks.push(s),this.lines[e].width+=s.width}},{key:"curWidth",value:function(){var e=this.lines[this.current];return e===void 0?0:e.width}},{key:"append",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,t)}},{key:"newLine",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,t),this.current++}},{key:"determineLineHeights",value:function(){for(var e=0;e<this.lines.length;e++){var t=this.lines[e],i=0;if(t.blocks!==void 0)for(var a=0;a<t.blocks.length;a++){var o=t.blocks[a];i<o.height&&(i=o.height)}t.height=i}}},{key:"determineLabelSize",value:function(){for(var e=0,t=0,i=0;i<this.lines.length;i++){var a=this.lines[i];a.width>e&&(e=a.width),t+=a.height}this.width=e,this.height=t}},{key:"removeEmptyBlocks",value:function(){for(var e=[],t=0;t<this.lines.length;t++){var i=this.lines[t];if(i.blocks.length!==0&&!(t===this.lines.length-1&&i.width===0)){var a={};Ae(a,i),a.blocks=[];for(var o=void 0,s=[],u=0;u<i.blocks.length;u++){var l=i.blocks[u];l.width!==0?s.push(l):o===void 0&&(o=l)}s.length===0&&o!==void 0&&s.push(o),a.blocks=s,e.push(a)}}return e}},{key:"finalize",value:function(){this.determineLineHeights(),this.determineLabelSize();var e=this.removeEmptyBlocks();return{width:this.width,height:this.height,lines:e}}}]),r}(),GJ={"<b>":/<b>/,"<i>":/<i>/,"<code>":/<code>/,"</b>":/<\/b>/,"</i>":/<\/i>/,"</code>":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/},tm=function(){function r(n){D(this,r),this.text=n,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}return R(r,[{key:"mod",value:function(){return this.modStack.length===0?"normal":this.modStack[0]}},{key:"modName",value:function(){if(this.modStack.length===0)return"normal";if(this.modStack[0]==="mono")return"mono";if(this.bold&&this.ital)return"boldital";if(this.bold)return"bold";if(this.ital)return"ital"}},{key:"emitBlock",value:function(){this.spacing&&(this.add(" "),this.spacing=!1),this.buffer.length>0&&(this.blocks.push({text:this.buffer,mod:this.modName()}),this.buffer="")}},{key:"add",value:function(e){e===" "&&(this.spacing=!0),this.spacing&&(this.buffer+=" ",this.spacing=!1),e!=" "&&(this.buffer+=e)}},{key:"parseWS",value:function(e){return/[ \t]/.test(e)?(this.mono?this.add(e):this.spacing=!0,!0):!1}},{key:"setTag",value:function(e){this.emitBlock(),this[e]=!0,this.modStack.unshift(e)}},{key:"unsetTag",value:function(e){this.emitBlock(),this[e]=!1,this.modStack.shift()}},{key:"parseStartTag",value:function(e,t){return!this.mono&&!this[e]&&this.match(t)?(this.setTag(e),!0):!1}},{key:"match",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=this.prepareRegExp(e),a=Ee(i,2),o=a[0],s=a[1],u=o.test(this.text.substr(this.position,s));return u&&t&&(this.position+=s-1),u}},{key:"parseEndTag",value:function(e,t,i){var a=this.mod()===e;return e==="mono"?a=a&&this.mono:a=a&&!this.mono,a&&this.match(t)?(i!==void 0?(this.position===this.text.length-1||this.match(i,!1))&&this.unsetTag(e):this.unsetTag(e),!0):!1}},{key:"replace",value:function(e,t){return this.match(e)?(this.add(t),this.position+=length-1,!0):!1}},{key:"prepareRegExp",value:function(e){var t,i;if(e instanceof RegExp)i=e,t=1;else{var a=GJ[e];a!==void 0?i=a:i=new RegExp(e),t=e.length}return[i,t]}}]),r}(),KJ=function(){function r(n,e,t,i){var a=this;D(this,r),this.ctx=n,this.parent=e,this.selected=t,this.hover=i;var o=function(u,l){if(u===void 0)return 0;var h=a.parent.getFormattingValues(n,t,i,l),d=0;if(u!==""){var f=a.ctx.measureText(u);d=f.width}return{width:d,values:h}};this.lines=new UJ(o)}return R(r,[{key:"process",value:function(e){if(!Cs(e))return this.lines.finalize();var t=this.parent.fontOptions;e=e.replace(/\r\n/g,`
91
- `),e=e.replace(/\r/g,`
92
- `);var i=String(e).split(`
93
- `),a=i.length;if(t.multi)for(var o=0;o<a;o++){var s=this.splitBlocks(i[o],t.multi);if(s!==void 0){if(s.length===0){this.lines.newLine("");continue}if(t.maxWdt>0)for(var u=0;u<s.length;u++){var l=s[u].mod,h=s[u].text;this.splitStringIntoLines(h,l,!0)}else for(var d=0;d<s.length;d++){var f=s[d].mod,c=s[d].text;this.lines.append(c,f)}this.lines.newLine()}}else if(t.maxWdt>0)for(var v=0;v<a;v++)this.splitStringIntoLines(i[v]);else for(var g=0;g<a;g++)this.lines.newLine(i[g]);return this.lines.finalize()}},{key:"decodeMarkupSystem",value:function(e){var t="none";return e==="markdown"||e==="md"?t="markdown":(e===!0||e==="html")&&(t="html"),t}},{key:"splitHtmlBlocks",value:function(e){for(var t=new tm(e),i=function(u){if(/&/.test(u)){var l=t.replace(t.text,"&lt;","<")||t.replace(t.text,"&amp;","&");return l||t.add("&"),!0}return!1};t.position<t.text.length;){var a=t.text.charAt(t.position),o=t.parseWS(a)||/</.test(a)&&(t.parseStartTag("bold","<b>")||t.parseStartTag("ital","<i>")||t.parseStartTag("mono","<code>")||t.parseEndTag("bold","</b>")||t.parseEndTag("ital","</i>")||t.parseEndTag("mono","</code>"))||i(a);o||t.add(a),t.position++}return t.emitBlock(),t.blocks}},{key:"splitMarkdownBlocks",value:function(e){for(var t=this,i=new tm(e),a=!0,o=function(h){return/\\/.test(h)?(i.position<t.text.length+1&&(i.position++,h=t.text.charAt(i.position),/ \t/.test(h)?i.spacing=!0:(i.add(h),a=!1)),!0):!1};i.position<i.text.length;){var s=i.text.charAt(i.position),u=i.parseWS(s)||o(s)||(a||i.spacing)&&(i.parseStartTag("bold","*")||i.parseStartTag("ital","_")||i.parseStartTag("mono","`"))||i.parseEndTag("bold","*","afterBold")||i.parseEndTag("ital","_","afterItal")||i.parseEndTag("mono","`","afterMono");u||(i.add(s),a=!1),i.position++}return i.emitBlock(),i.blocks}},{key:"splitBlocks",value:function(e,t){var i=this.decodeMarkupSystem(t);if(i==="none")return[{text:e,mod:"normal"}];if(i==="markdown")return this.splitMarkdownBlocks(e);if(i==="html")return this.splitHtmlBlocks(e)}},{key:"overMaxWidth",value:function(e){var t=this.ctx.measureText(e).width;return this.lines.curWidth()+t>this.parent.fontOptions.maxWdt}},{key:"getLongestFit",value:function(e){for(var t="",i=0;i<e.length;){var a=t===""?"":" ",o=t+a+e[i];if(this.overMaxWidth(o))break;t=o,i++}return i}},{key:"getLongestFitWord",value:function(e){for(var t=0;t<e.length&&!this.overMaxWidth(Le(e).call(e,0,t));)t++;return t}},{key:"splitStringIntoLines",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal",i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.parent.getFormattingValues(this.ctx,this.selected,this.hover,t),e=e.replace(/^( +)/g,"$1\r"),e=e.replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r");for(var a=e.split("\r");a.length>0;){var o=this.getLongestFit(a);if(o===0){var s=a[0],u=this.getLongestFitWord(s);this.lines.newLine(Le(s).call(s,0,u),t),a[0]=Le(s).call(s,u)}else{var l=o;a[o-1]===" "?o--:a[l]===" "&&l++;var h=Le(a).call(a,0,o).join("");o==a.length&&i?this.lines.append(h,t):this.lines.newLine(h,t),a=Le(a).call(a,l)}}}}]),r}(),zn=["bold","ital","boldital","mono"],W_=function(){function r(n,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;D(this,r),this.body=n,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(e),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=t}return R(r,[{key:"setOptions",value:function(e){if(this.elementOptions=e,this.initFontOptions(e.font),Cs(e.label)?this.labelDirty=!0:e.label=void 0,e.font!==void 0&&e.font!==null){if(typeof e.font=="string")this.baseSize=this.fontOptions.size;else if(ve(e.font)==="object"){var t=e.font.size;t!==void 0&&(this.baseSize=t)}}}},{key:"initFontOptions",value:function(e){var t=this;if(te(zn,function(i){t.fontOptions[i]={}}),r.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}te(e,function(i,a){i!=null&&ve(i)!=="object"&&(t.fontOptions[a]=i)})}},{key:"constrain",value:function(e){var t={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},i=Ir(e,"widthConstraint");if(typeof i=="number")t.maxWdt=Number(i),t.minWdt=Number(i);else if(ve(i)==="object"){var a=Ir(e,["widthConstraint","maximum"]);typeof a=="number"&&(t.maxWdt=Number(a));var o=Ir(e,["widthConstraint","minimum"]);typeof o=="number"&&(t.minWdt=Number(o))}var s=Ir(e,"heightConstraint");if(typeof s=="number")t.minHgt=Number(s);else if(ve(s)==="object"){var u=Ir(e,["heightConstraint","minimum"]);typeof u=="number"&&(t.minHgt=Number(u));var l=Ir(e,["heightConstraint","valign"]);typeof l=="string"&&(l==="top"||l==="bottom")&&(t.valign=l)}return t}},{key:"update",value:function(e,t){this.setOptions(e,!0),this.propagateFonts(t),me(this.fontOptions,this.constrain(t)),this.fontOptions.chooser=lc("label",t)}},{key:"adjustSizes",value:function(e){var t=e?e.right+e.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=t,this.fontOptions.minWdt-=t);var i=e?e.top+e.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=i)}},{key:"addFontOptionsToPile",value:function(e,t){for(var i=0;i<t.length;++i)this.addFontToPile(e,t[i])}},{key:"addFontToPile",value:function(e,t){if(t!==void 0&&!(t.font===void 0||t.font===null)){var i=t.font;e.push(i)}}},{key:"getBasicOptions",value:function(e){for(var t={},i=0;i<e.length;++i){var a=e[i],o={};r.parseFontString(o,a)&&(a=o),te(a,function(s,u){s!==void 0&&(Object.prototype.hasOwnProperty.call(t,u)||(oe(zn).call(zn,u)!==-1?t[u]={}:t[u]=s))})}return t}},{key:"getFontOption",value:function(e,t,i){for(var a,o=0;o<e.length;++o){var s=e[o];if(Object.prototype.hasOwnProperty.call(s,t)){if(a=s[t],a==null)continue;var u={};if(r.parseFontString(u,a)&&(a=u),Object.prototype.hasOwnProperty.call(a,i))return a[i]}}if(Object.prototype.hasOwnProperty.call(this.fontOptions,i))return this.fontOptions[i];throw new Error("Did not find value for multi-font for property: '"+i+"'")}},{key:"getFontOptions",value:function(e,t){for(var i={},a=["color","size","face","mod","vadjust"],o=0;o<a.length;++o){var s=a[o];i[s]=this.getFontOption(e,t,s)}return i}},{key:"propagateFonts",value:function(e){var t=this,i=[];this.addFontOptionsToPile(i,e),this.fontOptions=this.getBasicOptions(i);for(var a=function(u){var l=zn[u],h=t.fontOptions[l],d=t.getFontOptions(i,l);te(d,function(f,c){h[c]=f}),h.size=Number(h.size),h.vadjust=Number(h.vadjust)},o=0;o<zn.length;++o)a(o)}},{key:"draw",value:function(e,t,i,a,o){var s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";if(this.elementOptions.label!==void 0){var u=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&u<this.elementOptions.scaling.label.drawThreshold-1||(u>=this.elementOptions.scaling.label.maxVisible&&(u=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(e,a,o,t,i,s),this._drawBackground(e),this._drawText(e,t,this.size.yLine,s,u))}}},{key:"_drawBackground",value:function(e){if(this.fontOptions.background!==void 0&&this.fontOptions.background!=="none"){e.fillStyle=this.fontOptions.background;var t=this.getSize();e.fillRect(t.left,t.top,t.width,t.height)}}},{key:"_drawText",value:function(e,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"middle",o=arguments.length>4?arguments[4]:void 0,s=this._setAlignment(e,t,i,a),u=Ee(s,2);t=u[0],i=u[1],e.textAlign="left",t=t-this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&(this.fontOptions.valign==="top"&&(i-=(this.size.height-this.size.labelHeight)/2),this.fontOptions.valign==="bottom"&&(i+=(this.size.height-this.size.labelHeight)/2));for(var l=0;l<this.lineCount;l++){var h=this.lines[l];if(h&&h.blocks){var d=0;this.isEdgeLabel||this.fontOptions.align==="center"?d+=(this.size.width-h.width)/2:this.fontOptions.align==="right"&&(d+=this.size.width-h.width);for(var f=0;f<h.blocks.length;f++){var c=h.blocks[f];e.font=c.font;var v=this._getColor(c.color,o,c.strokeColor),g=Ee(v,2),b=g[0],p=g[1];c.strokeWidth>0&&(e.lineWidth=c.strokeWidth,e.strokeStyle=p,e.lineJoin="round"),e.fillStyle=b,c.strokeWidth>0&&e.strokeText(c.text,t+d,i+c.vadjust),e.fillText(c.text,t+d,i+c.vadjust),d+=c.width}i+=h.height}}}},{key:"_setAlignment",value:function(e,t,i,a){if(this.isEdgeLabel&&this.fontOptions.align!=="horizontal"&&this.pointToSelf===!1){t=0,i=0;var o=2;this.fontOptions.align==="top"?(e.textBaseline="alphabetic",i-=2*o):this.fontOptions.align==="bottom"?(e.textBaseline="hanging",i+=2*o):e.textBaseline="middle"}else e.textBaseline=a;return[t,i]}},{key:"_getColor",value:function(e,t,i){var a=e||"#000000",o=i||"#ffffff";if(t<=this.elementOptions.scaling.label.drawThreshold){var s=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-t)));a=It(a,s),o=It(o,s)}return[a,o]}},{key:"getTextSize",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this._processLabel(e,t,i),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}},{key:"getSize",value:function(){var e=2,t=this.size.left,i=this.size.top-.5*e;if(this.isEdgeLabel){var a=-this.size.width*.5;switch(this.fontOptions.align){case"middle":t=a,i=-this.size.height*.5;break;case"top":t=a,i=-(this.size.height+e);break;case"bottom":t=a,i=e;break}}var o={left:t,top:i,width:this.size.width,height:this.size.height};return o}},{key:"calculateLabelSize",value:function(e,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";this._processLabel(e,t,i),this.size.left=a-this.size.width*.5,this.size.top=o-this.size.height*.5,this.size.yLine=o+(1-this.lineCount)*.5*this.fontOptions.size,s==="hanging"&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}},{key:"getFormattingValues",value:function(e,t,i,a){var o=function(h,d,f){return d==="normal"?f==="mod"?"":h[f]:h[d][f]!==void 0?h[d][f]:h[f]},s={color:o(this.fontOptions,a,"color"),size:o(this.fontOptions,a,"size"),face:o(this.fontOptions,a,"face"),mod:o(this.fontOptions,a,"mod"),vadjust:o(this.fontOptions,a,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(t||i)&&(a==="normal"&&this.fontOptions.chooser===!0&&this.elementOptions.labelHighlightBold?s.mod="bold":typeof this.fontOptions.chooser=="function"&&this.fontOptions.chooser(s,this.elementOptions.id,t,i));var u="";return s.mod!==void 0&&s.mod!==""&&(u+=s.mod+" "),u+=s.size+"px "+s.face,e.font=u.replace(/"/g,""),s.font=e.font,s.height=s.size,s}},{key:"differentState",value:function(e,t){return e!==this.selectedState||t!==this.hoverState}},{key:"_processLabelText",value:function(e,t,i,a){var o=new KJ(e,this,t,i);return o.process(a)}},{key:"_processLabel",value:function(e,t,i){if(!(this.labelDirty===!1&&!this.differentState(t,i))){var a=this._processLabelText(e,t,i,this.elementOptions.label);this.fontOptions.minWdt>0&&a.width<this.fontOptions.minWdt&&(a.width=this.fontOptions.minWdt),this.size.labelHeight=a.height,this.fontOptions.minHgt>0&&a.height<this.fontOptions.minHgt&&(a.height=this.fontOptions.minHgt),this.lines=a.lines,this.lineCount=a.lines.length,this.size.width=a.width,this.size.height=a.height,this.selectedState=t,this.hoverState=i,this.labelDirty=!1}}},{key:"visible",value:function(){if(this.size.width===0||this.size.height===0||this.elementOptions.label===void 0)return!1;var e=this.fontOptions.size*this.body.view.scale;return!(e<this.elementOptions.scaling.label.drawThreshold-1)}}],[{key:"parseFontString",value:function(e,t){if(!t||typeof t!="string")return!1;var i=t.split(" ");return e.size=+i[0].replace("px",""),e.face=i[1],e.color=i[2],!0}}]),r}(),V_={exports:{}},qJ=K,YJ=yu,XJ=ou,QJ=qJ.TypeError,ZJ=function(r){if(YJ(r))return r;throw QJ(XJ(r)+" is not a constructor")},JJ=X,eee=wr,_h=wn,tee=j1,rm=ZJ,ree=Ot,im=We,iee=On,U_=fe,hc=eee("Reflect","construct"),nee=Object.prototype,aee=[].push,G_=U_(function(){function r(){}return!(hc(function(){},[],r)instanceof r)}),K_=!U_(function(){hc(function(){})}),nm=G_||K_;JJ({target:"Reflect",stat:!0,forced:nm,sham:nm},{construct:function(n,e){rm(n),ree(e);var t=arguments.length<3?n:rm(arguments[2]);if(K_&&!G_)return hc(n,e,t);if(n==t){switch(e.length){case 0:return new n;case 1:return new n(e[0]);case 2:return new n(e[0],e[1]);case 3:return new n(e[0],e[1],e[2]);case 4:return new n(e[0],e[1],e[2],e[3])}var i=[null];return _h(aee,i,e),new(_h(tee,n,i))}var a=t.prototype,o=iee(im(a)?a:nee),s=_h(n,o,e);return im(s)?s:o}});var oee=ie,see=oee.Reflect.construct,uee=see,lee=uee;(function(r){r.exports=lee})(V_);var P=U(V_.exports),q_={exports:{}},hee=Lw,dee=hee,fee=dee,cee=fee;(function(r){r.exports=cee})(q_);var vee=U(q_.exports),Y_={exports:{}},pee=X,gee=r8;pee({target:"Object",stat:!0},{setPrototypeOf:gee});var yee=ie,mee=yee.Object.setPrototypeOf,bee=mee,$ee=bee,wee=$ee,_ee=wee,Eee=_ee,See=Eee;(function(r){r.exports=See})(Y_);var Ld=U(Y_.exports),X_={exports:{}},Oee=H1,Tee=Oee,kee=Tee,Iee=kee;(function(r){r.exports=Iee})(X_);var dc=U(X_.exports);function zd(r,n){var e;return zd=Ld?dc(e=Ld).call(e):function(i,a){return i.__proto__=a,i},zd(r,n)}function ue(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=vee(n&&n.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),ku(r,"prototype",{writable:!1}),n&&zd(r,n)}function Pee(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function ce(r,n){if(n&&(ve(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Pee(r)}var Q_={exports:{}},Cee=xw,xee=Cee,Aee=xee,Mee=Aee;(function(r){r.exports=Mee})(Q_);var am=U(Q_.exports);function L(r){var n;return L=Ld?dc(n=am).call(n):function(t){return t.__proto__||am(t)},L(r)}var Ai=function(){function r(n,e,t){D(this,r),this.body=e,this.labelModule=t,this.setOptions(n),this.top=void 0,this.left=void 0,this.height=void 0,this.width=void 0,this.radius=void 0,this.margin=void 0,this.refreshNeeded=!0,this.boundingBox={top:0,left:0,right:0,bottom:0}}return R(r,[{key:"setOptions",value:function(e){this.options=e}},{key:"_setMargins",value:function(e){this.margin={},this.options.margin&&(ve(this.options.margin)=="object"?(this.margin.top=this.options.margin.top,this.margin.right=this.options.margin.right,this.margin.bottom=this.options.margin.bottom,this.margin.left=this.options.margin.left):(this.margin.top=this.options.margin,this.margin.right=this.options.margin,this.margin.bottom=this.options.margin,this.margin.left=this.options.margin)),e.adjustSizes(this.margin)}},{key:"_distanceToBorder",value:function(e,t){var i=this.options.borderWidth;return e&&this.resize(e),Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+i}},{key:"enableShadow",value:function(e,t){t.shadow&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}},{key:"disableShadow",value:function(e,t){t.shadow&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}},{key:"enableBorderDashes",value:function(e,t){if(t.borderDashes!==!1)if(e.setLineDash!==void 0){var i=t.borderDashes;i===!0&&(i=[5,15]),e.setLineDash(i)}else console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,t.borderDashes=!1}},{key:"disableBorderDashes",value:function(e,t){t.borderDashes!==!1&&(e.setLineDash!==void 0?e.setLineDash([0]):(console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,t.borderDashes=!1))}},{key:"needsRefresh",value:function(e,t){return this.refreshNeeded===!0?(this.refreshNeeded=!1,!0):this.width===void 0||this.labelModule.differentState(e,t)}},{key:"initContextForDraw",value:function(e,t){var i=t.borderWidth/this.body.view.scale;e.lineWidth=Math.min(this.width,i),e.strokeStyle=t.borderColor,e.fillStyle=t.color}},{key:"performStroke",value:function(e,t){var i=t.borderWidth/this.body.view.scale;e.save(),i>0&&(this.enableBorderDashes(e,t),e.stroke(),this.disableBorderDashes(e,t)),e.restore()}},{key:"performFill",value:function(e,t){e.save(),e.fillStyle=t.color,this.enableShadow(e,t),so(e).call(e),this.disableShadow(e,t),e.restore(),this.performStroke(e,t)}},{key:"_addBoundingBoxMargin",value:function(e){this.boundingBox.left-=e,this.boundingBox.top-=e,this.boundingBox.bottom+=e,this.boundingBox.right+=e}},{key:"_updateBoundingBox",value:function(e,t,i,a,o){i!==void 0&&this.resize(i,a,o),this.left=e-this.width/2,this.top=t-this.height/2,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}},{key:"updateBoundingBox",value:function(e,t,i,a,o){this._updateBoundingBox(e,t,i,a,o)}},{key:"getDimensionsFromLabel",value:function(e,t,i){this.textSize=this.labelModule.getTextSize(e,t,i);var a=this.textSize.width,o=this.textSize.height,s=14;return a===0&&(a=s,o=s),{width:a,height:o}}}]),r}();function Dee(r){var n=Ree();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function Ree(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Fee=function(r){ue(e,r);var n=Dee(e);function e(t,i,a){var o;return D(this,e),o=n.call(this,t,i,a),o._setMargins(a),o}return R(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(i,a,o);this.width=s.width+this.margin.right+this.margin.left,this.height=s.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}},{key:"draw",value:function(i,a,o,s,u,l){this.resize(i,s,u),this.left=a-this.width/2,this.top=o-this.height/2,this.initContextForDraw(i,l),W1(i,this.left,this.top,this.width,this.height,l.borderRadius),this.performFill(i,l),this.updateBoundingBox(a,o,i,s,u),this.labelModule.draw(i,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,u)}},{key:"updateBoundingBox",value:function(i,a,o,s,u){this._updateBoundingBox(i,a,o,s,u);var l=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(l)}},{key:"distanceToBorder",value:function(i,a){i&&this.resize(i);var o=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(a)),Math.abs(this.height/2/Math.sin(a)))+o}}]),e}(Ai);function Nee(r){var n=Bee();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function Bee(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var fc=function(r){ue(e,r);var n=Nee(e);function e(t,i,a){var o;return D(this,e),o=n.call(this,t,i,a),o.labelOffset=0,o.selected=!1,o}return R(e,[{key:"setOptions",value:function(i,a,o){this.options=i,a===void 0&&o===void 0||this.setImages(a,o)}},{key:"setImages",value:function(i,a){a&&this.selected?(this.imageObj=a,this.imageObjAlt=i):(this.imageObj=i,this.imageObjAlt=a)}},{key:"switchImages",value:function(i){var a=i&&!this.selected||!i&&this.selected;if(this.selected=i,this.imageObjAlt!==void 0&&a){var o=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=o}}},{key:"_getImagePadding",value:function(){var i={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){var a=this.options.imagePadding;ve(a)=="object"?(i.top=a.top,i.right=a.right,i.bottom=a.bottom,i.left=a.left):(i.top=a,i.right=a,i.bottom=a,i.left=a)}return i}},{key:"_resizeImage",value:function(){var i,a;if(this.options.shapeProperties.useImageSize===!1){var o=1,s=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?o=this.imageObj.width/this.imageObj.height:s=this.imageObj.height/this.imageObj.width),i=this.options.size*2*o,a=this.options.size*2*s}else{var u=this._getImagePadding();i=this.imageObj.width+u.left+u.right,a=this.imageObj.height+u.top+u.bottom}this.width=i,this.height=a,this.radius=.5*this.width}},{key:"_drawRawCircle",value:function(i,a,o,s){this.initContextForDraw(i,s),Af(i,a,o,s.size),this.performFill(i,s)}},{key:"_drawImageAtPosition",value:function(i,a){if(this.imageObj.width!=0){i.globalAlpha=a.opacity!==void 0?a.opacity:1,this.enableShadow(i,a);var o=1;this.options.shapeProperties.interpolation===!0&&(o=this.imageObj.width/this.width/this.body.view.scale);var s=this._getImagePadding(),u=this.left+s.left,l=this.top+s.top,h=this.width-s.left-s.right,d=this.height-s.top-s.bottom;this.imageObj.drawImageAtPosition(i,o,u,l,h,d),this.disableShadow(i,a)}}},{key:"_drawImageLabel",value:function(i,a,o,s,u){var l=0;if(this.height!==void 0){l=this.height*.5;var h=this.labelModule.getTextSize(i,s,u);h.lineCount>=1&&(l+=h.height/2)}var d=o+l;this.options.label&&(this.labelOffset=l),this.labelModule.draw(i,a,d,s,u,"hanging")}}]),e}(Ai);function Lee(r){var n=zee();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function zee(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var jee=function(r){ue(e,r);var n=Lee(e);function e(t,i,a){var o;return D(this,e),o=n.call(this,t,i,a),o._setMargins(a),o}return R(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(i,a,o),u=Math.max(s.width+this.margin.right+this.margin.left,s.height+this.margin.top+this.margin.bottom);this.options.size=u/2,this.width=u,this.height=u,this.radius=this.width/2}}},{key:"draw",value:function(i,a,o,s,u,l){this.resize(i,s,u),this.left=a-this.width/2,this.top=o-this.height/2,this._drawRawCircle(i,a,o,l),this.updateBoundingBox(a,o),this.labelModule.draw(i,this.left+this.textSize.width/2+this.margin.left,o,s,u)}},{key:"updateBoundingBox",value:function(i,a){this.boundingBox.top=a-this.options.size,this.boundingBox.left=i-this.options.size,this.boundingBox.right=i+this.options.size,this.boundingBox.bottom=a+this.options.size}},{key:"distanceToBorder",value:function(i){return i&&this.resize(i),this.width*.5}}]),e}(fc);function Hee(r){var n=Wee();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function Wee(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Vee=function(r){ue(e,r);var n=Hee(e);function e(t,i,a,o,s){var u;return D(this,e),u=n.call(this,t,i,a),u.setImages(o,s),u}return R(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,s=this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0;if(s){var u=this.options.size*2;this.width=u,this.height=u,this.radius=.5*this.width;return}this.needsRefresh(a,o)&&this._resizeImage()}},{key:"draw",value:function(i,a,o,s,u,l){this.switchImages(s),this.resize();var h=a,d=o;this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=a,this.top=o,h+=this.width/2,d+=this.height/2):(this.left=a-this.width/2,this.top=o-this.height/2),this._drawRawCircle(i,h,d,l),i.save(),i.clip(),this._drawImageAtPosition(i,l),i.restore(),this._drawImageLabel(i,h,d,s,u),this.updateBoundingBox(a,o)}},{key:"updateBoundingBox",value:function(i,a){this.options.shapeProperties.coordinateOrigin==="top-left"?(this.boundingBox.top=a,this.boundingBox.left=i,this.boundingBox.right=i+this.options.size*2,this.boundingBox.bottom=a+this.options.size*2):(this.boundingBox.top=a-this.options.size,this.boundingBox.left=i-this.options.size,this.boundingBox.right=i+this.options.size,this.boundingBox.bottom=a+this.options.size),this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}},{key:"distanceToBorder",value:function(i){return i&&this.resize(i),this.width*.5}}]),e}(fc);function Uee(r){var n=Gee();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function Gee(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var qr=function(r){ue(e,r);var n=Uee(e);function e(t,i,a){return D(this,e),n.call(this,t,i,a)}return R(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{size:this.options.size};if(this.needsRefresh(a,o)){var u,l;this.labelModule.getTextSize(i,a,o);var h=2*s.size;this.width=(u=this.customSizeWidth)!==null&&u!==void 0?u:h,this.height=(l=this.customSizeHeight)!==null&&l!==void 0?l:h,this.radius=.5*this.width}}},{key:"_drawShape",value:function(i,a,o,s,u,l,h,d){var f=this;return this.resize(i,l,h,d),this.left=s-this.width/2,this.top=u-this.height/2,this.initContextForDraw(i,d),pH(a)(i,s,u,d.size),this.performFill(i,d),this.options.icon!==void 0&&this.options.icon.code!==void 0&&(i.font=(l?"bold ":"")+this.height/2+"px "+(this.options.icon.face||"FontAwesome"),i.fillStyle=this.options.icon.color||"black",i.textAlign="center",i.textBaseline="middle",i.fillText(this.options.icon.code,s,u)),{drawExternalLabel:function(){if(f.options.label!==void 0){f.labelModule.calculateLabelSize(i,l,h,s,u,"hanging");var v=u+.5*f.height+.5*f.labelModule.size.height;f.labelModule.draw(i,s,v,l,h,"hanging")}f.updateBoundingBox(s,u)}}}},{key:"updateBoundingBox",value:function(i,a){this.boundingBox.top=a-this.options.size,this.boundingBox.left=i-this.options.size,this.boundingBox.right=i+this.options.size,this.boundingBox.bottom=a+this.options.size,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height))}}]),e}(Ai);function om(r,n){var e=_e(r);if(jr){var t=jr(r);n&&(t=pt(t).call(t,function(i){return Kr(r,i).enumerable})),e.push.apply(e,t)}return e}function Kee(r){for(var n=1;n<arguments.length;n++){var e,t,i=arguments[n]!=null?arguments[n]:{};n%2?pe(e=om(Object(i),!0)).call(e,function(a){Iu(r,a,i[a])}):Hr?Ou(r,Hr(i)):pe(t=om(Object(i))).call(t,function(a){Tu(r,a,Kr(i,a))})}return r}function qee(r){var n=Yee();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function Yee(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Xee=function(r){ue(e,r);var n=qee(e);function e(t,i,a,o){var s;return D(this,e),s=n.call(this,t,i,a,o),s.ctxRenderer=o,s}return R(e,[{key:"draw",value:function(i,a,o,s,u,l){this.resize(i,s,u,l),this.left=a-this.width/2,this.top=o-this.height/2,i.save();var h=this.ctxRenderer({ctx:i,id:this.options.id,x:a,y:o,state:{selected:s,hover:u},style:Kee({},l),label:this.options.label});if(h.drawNode!=null&&h.drawNode(),i.restore(),h.drawExternalLabel){var d=h.drawExternalLabel;h.drawExternalLabel=function(){i.save(),d(),i.restore()}}return h.nodeDimensions&&(this.customSizeWidth=h.nodeDimensions.width,this.customSizeHeight=h.nodeDimensions.height),h}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(qr);function Qee(r){var n=Zee();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function Zee(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Jee=function(r){ue(e,r);var n=Qee(e);function e(t,i,a){var o;return D(this,e),o=n.call(this,t,i,a),o._setMargins(a),o}return R(e,[{key:"resize",value:function(i,a,o){if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(i,a,o),u=s.width+this.margin.right+this.margin.left;this.width=u,this.height=u,this.radius=this.width/2}}},{key:"draw",value:function(i,a,o,s,u,l){this.resize(i,s,u),this.left=a-this.width/2,this.top=o-this.height/2,this.initContextForDraw(i,l),V1(i,a-this.width/2,o-this.height/2,this.width,this.height),this.performFill(i,l),this.updateBoundingBox(a,o,i,s,u),this.labelModule.draw(i,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,u)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(Ai);function ete(r){var n=tte();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function tte(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var rte=function(r){ue(e,r);var n=ete(e);function e(t,i,a){return D(this,e),n.call(this,t,i,a)}return R(e,[{key:"draw",value:function(i,a,o,s,u,l){return this._drawShape(i,"diamond",4,a,o,s,u,l)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(qr);function ite(r){var n=nte();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function nte(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var ate=function(r){ue(e,r);var n=ite(e);function e(t,i,a){return D(this,e),n.call(this,t,i,a)}return R(e,[{key:"draw",value:function(i,a,o,s,u,l){return this._drawShape(i,"circle",2,a,o,s,u,l)}},{key:"distanceToBorder",value:function(i){return i&&this.resize(i),this.options.size}}]),e}(qr);function ote(r){var n=ste();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function ste(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var sm=function(r){ue(e,r);var n=ote(e);function e(t,i,a){return D(this,e),n.call(this,t,i,a)}return R(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(i,a,o);this.height=s.height*2,this.width=s.width+s.height,this.radius=.5*this.width}}},{key:"draw",value:function(i,a,o,s,u,l){this.resize(i,s,u),this.left=a-this.width*.5,this.top=o-this.height*.5,this.initContextForDraw(i,l),hd(i,this.left,this.top,this.width,this.height),this.performFill(i,l),this.updateBoundingBox(a,o,i,s,u),this.labelModule.draw(i,a,o,s,u)}},{key:"distanceToBorder",value:function(i,a){i&&this.resize(i);var o=this.width*.5,s=this.height*.5,u=Math.sin(a)*o,l=Math.cos(a)*s;return o*s/Math.sqrt(u*u+l*l)}}]),e}(Ai);function ute(r){var n=lte();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function lte(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var hte=function(r){ue(e,r);var n=ute(e);function e(t,i,a){var o;return D(this,e),o=n.call(this,t,i,a),o._setMargins(a),o}return R(e,[{key:"resize",value:function(i,a,o){this.needsRefresh(a,o)&&(this.iconSize={width:Number(this.options.icon.size),height:Number(this.options.icon.size)},this.width=this.iconSize.width+this.margin.right+this.margin.left,this.height=this.iconSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(i,a,o,s,u,l){var h=this;return this.resize(i,s,u),this.options.icon.size=this.options.icon.size||50,this.left=a-this.width/2,this.top=o-this.height/2,this._icon(i,a,o,s,u,l),{drawExternalLabel:function(){if(h.options.label!==void 0){var f=5;h.labelModule.draw(i,h.left+h.iconSize.width/2+h.margin.left,o+h.height/2+f,s)}h.updateBoundingBox(a,o)}}}},{key:"updateBoundingBox",value:function(i,a){if(this.boundingBox.top=a-this.options.icon.size*.5,this.boundingBox.left=i-this.options.icon.size*.5,this.boundingBox.right=i+this.options.icon.size*.5,this.boundingBox.bottom=a+this.options.icon.size*.5,this.options.label!==void 0&&this.labelModule.size.width>0){var o=5;this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+o)}}},{key:"_icon",value:function(i,a,o,s,u,l){var h=Number(this.options.icon.size);this.options.icon.code!==void 0?(i.font=[this.options.icon.weight!=null?this.options.icon.weight:s?"bold":"",(this.options.icon.weight!=null&&s?5:0)+h+"px",this.options.icon.face].join(" "),i.fillStyle=this.options.icon.color||"black",i.textAlign="center",i.textBaseline="middle",this.enableShadow(i,l),i.fillText(this.options.icon.code,a,o),this.disableShadow(i,l)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(Ai);function dte(r){var n=fte();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function fte(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var cte=function(r){ue(e,r);var n=dte(e);function e(t,i,a,o,s){var u;return D(this,e),u=n.call(this,t,i,a),u.setImages(o,s),u}return R(e,[{key:"resize",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,s=this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0;if(s){var u=this.options.size*2;this.width=u,this.height=u;return}this.needsRefresh(a,o)&&this._resizeImage()}},{key:"draw",value:function(i,a,o,s,u,l){i.save(),this.switchImages(s),this.resize();var h=a,d=o;if(this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=a,this.top=o,h+=this.width/2,d+=this.height/2):(this.left=a-this.width/2,this.top=o-this.height/2),this.options.shapeProperties.useBorderWithImage===!0){var f=this.options.borderWidth,c=this.options.borderWidthSelected||2*this.options.borderWidth,v=(s?c:f)/this.body.view.scale;i.lineWidth=Math.min(this.width,v),i.beginPath();var g=s?this.options.color.highlight.border:u?this.options.color.hover.border:this.options.color.border,b=s?this.options.color.highlight.background:u?this.options.color.hover.background:this.options.color.background;l.opacity!==void 0&&(g=It(g,l.opacity),b=It(b,l.opacity)),i.strokeStyle=g,i.fillStyle=b,i.rect(this.left-.5*i.lineWidth,this.top-.5*i.lineWidth,this.width+i.lineWidth,this.height+i.lineWidth),so(i).call(i),this.performStroke(i,l),i.closePath()}this._drawImageAtPosition(i,l),this._drawImageLabel(i,h,d,s,u),this.updateBoundingBox(a,o),i.restore()}},{key:"updateBoundingBox",value:function(i,a){this.resize(),this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=i,this.top=a):(this.left=i-this.width/2,this.top=a-this.height/2),this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(fc);function vte(r){var n=pte();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function pte(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var gte=function(r){ue(e,r);var n=vte(e);function e(t,i,a){return D(this,e),n.call(this,t,i,a)}return R(e,[{key:"draw",value:function(i,a,o,s,u,l){return this._drawShape(i,"square",2,a,o,s,u,l)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(qr);function yte(r){var n=mte();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function mte(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var bte=function(r){ue(e,r);var n=yte(e);function e(t,i,a){return D(this,e),n.call(this,t,i,a)}return R(e,[{key:"draw",value:function(i,a,o,s,u,l){return this._drawShape(i,"hexagon",4,a,o,s,u,l)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(qr);function $te(r){var n=wte();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function wte(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var _te=function(r){ue(e,r);var n=$te(e);function e(t,i,a){return D(this,e),n.call(this,t,i,a)}return R(e,[{key:"draw",value:function(i,a,o,s,u,l){return this._drawShape(i,"star",4,a,o,s,u,l)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(qr);function Ete(r){var n=Ste();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function Ste(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Ote=function(r){ue(e,r);var n=Ete(e);function e(t,i,a){var o;return D(this,e),o=n.call(this,t,i,a),o._setMargins(a),o}return R(e,[{key:"resize",value:function(i,a,o){this.needsRefresh(a,o)&&(this.textSize=this.labelModule.getTextSize(i,a,o),this.width=this.textSize.width+this.margin.right+this.margin.left,this.height=this.textSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(i,a,o,s,u,l){this.resize(i,s,u),this.left=a-this.width/2,this.top=o-this.height/2,this.enableShadow(i,l),this.labelModule.draw(i,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,u),this.disableShadow(i,l),this.updateBoundingBox(a,o,i,s,u)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(Ai);function Tte(r){var n=kte();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function kte(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Ite=function(r){ue(e,r);var n=Tte(e);function e(t,i,a){return D(this,e),n.call(this,t,i,a)}return R(e,[{key:"draw",value:function(i,a,o,s,u,l){return this._drawShape(i,"triangle",3,a,o,s,u,l)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(qr);function Pte(r){var n=Cte();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function Cte(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var xte=function(r){ue(e,r);var n=Pte(e);function e(t,i,a){return D(this,e),n.call(this,t,i,a)}return R(e,[{key:"draw",value:function(i,a,o,s,u,l){return this._drawShape(i,"triangleDown",3,a,o,s,u,l)}},{key:"distanceToBorder",value:function(i,a){return this._distanceToBorder(i,a)}}]),e}(qr);function um(r,n){var e=_e(r);if(jr){var t=jr(r);n&&(t=pt(t).call(t,function(i){return Kr(r,i).enumerable})),e.push.apply(e,t)}return e}function lm(r){for(var n=1;n<arguments.length;n++){var e,t,i=arguments[n]!=null?arguments[n]:{};n%2?pe(e=um(Object(i),!0)).call(e,function(a){Iu(r,a,i[a])}):Hr?Ou(r,Hr(i)):pe(t=um(Object(i))).call(t,function(a){Tu(r,a,Kr(i,a))})}return r}var bt=function(){function r(n,e,t,i,a,o){D(this,r),this.options=zr(a),this.globalOptions=a,this.defaultOptions=o,this.body=e,this.edges=[],this.id=void 0,this.imagelist=t,this.grouplist=i,this.x=void 0,this.y=void 0,this.baseSize=this.options.size,this.baseFontSize=this.options.font.size,this.predefinedPosition=!1,this.selected=!1,this.hover=!1,this.labelModule=new W_(this.body,this.options,!1),this.setOptions(n)}return R(r,[{key:"attachEdge",value:function(e){var t;oe(t=this.edges).call(t,e)===-1&&this.edges.push(e)}},{key:"detachEdge",value:function(e){var t,i=oe(t=this.edges).call(t,e);if(i!=-1){var a;dr(a=this.edges).call(a,i,1)}}},{key:"setOptions",value:function(e){var t=this.options.shape;if(e){if(typeof e.color<"u"&&(this._localColor=e.color),e.id!==void 0&&(this.id=e.id),this.id===void 0)throw new Error("Node must have an id");r.checkMass(e,this.id),e.x!==void 0&&(e.x===null?(this.x=void 0,this.predefinedPosition=!1):(this.x=Ft(e.x),this.predefinedPosition=!0)),e.y!==void 0&&(e.y===null?(this.y=void 0,this.predefinedPosition=!1):(this.y=Ft(e.y),this.predefinedPosition=!0)),e.size!==void 0&&(this.baseSize=e.size),e.value!==void 0&&(e.value=B_(e.value)),r.parseOptions(this.options,e,!0,this.globalOptions,this.grouplist);var i=[e,this.options,this.defaultOptions];return this.chooser=lc("node",i),this._load_images(),this.updateLabelModule(e),e.opacity!==void 0&&r.checkOpacity(e.opacity)&&(this.options.opacity=e.opacity),this.updateShape(t),e.hidden!==void 0||e.physics!==void 0}}},{key:"_load_images",value:function(){if((this.options.shape==="circularImage"||this.options.shape==="image")&&this.options.image===void 0)throw new Error("Option image must be defined for node type '"+this.options.shape+"'");if(this.options.image!==void 0){if(this.imagelist===void 0)throw new Error("Internal Error: No images provided");if(typeof this.options.image=="string")this.imageObj=this.imagelist.load(this.options.image,this.options.brokenImage,this.id);else{if(this.options.image.unselected===void 0)throw new Error("No unselected image provided");this.imageObj=this.imagelist.load(this.options.image.unselected,this.options.brokenImage,this.id),this.options.image.selected!==void 0?this.imageObjAlt=this.imagelist.load(this.options.image.selected,this.options.brokenImage,this.id):this.imageObjAlt=void 0}}}},{key:"getFormattingValues",value:function(){var e={color:this.options.color.background,opacity:this.options.opacity,borderWidth:this.options.borderWidth,borderColor:this.options.color.border,size:this.options.size,borderDashes:this.options.shapeProperties.borderDashes,borderRadius:this.options.shapeProperties.borderRadius,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y};if(this.selected||this.hover?this.chooser===!0?this.selected?(this.options.borderWidthSelected!=null?e.borderWidth=this.options.borderWidthSelected:e.borderWidth*=2,e.color=this.options.color.highlight.background,e.borderColor=this.options.color.highlight.border,e.shadow=this.options.shadow.enabled):this.hover&&(e.color=this.options.color.hover.background,e.borderColor=this.options.color.hover.border,e.shadow=this.options.shadow.enabled):typeof this.chooser=="function"&&(this.chooser(e,this.options.id,this.selected,this.hover),e.shadow===!1&&(e.shadowColor!==this.options.shadow.color||e.shadowSize!==this.options.shadow.size||e.shadowX!==this.options.shadow.x||e.shadowY!==this.options.shadow.y)&&(e.shadow=!0)):e.shadow=this.options.shadow.enabled,this.options.opacity!==void 0){var t=this.options.opacity;e.borderColor=It(e.borderColor,t),e.color=It(e.color,t),e.shadowColor=It(e.shadowColor,t)}return e}},{key:"updateLabelModule",value:function(e){(this.options.label===void 0||this.options.label===null)&&(this.options.label=""),r.updateGroupOptions(this.options,lm(lm({},e),{},{color:e&&e.color||this._localColor||void 0}),this.grouplist);var t=this.grouplist.get(this.options.group,!1),i=[e,this.options,t,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,i),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateShape",value:function(e){if(e===this.options.shape&&this.shape)this.shape.setOptions(this.options,this.imageObj,this.imageObjAlt);else switch(this.options.shape){case"box":this.shape=new Fee(this.options,this.body,this.labelModule);break;case"circle":this.shape=new jee(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new Vee(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"custom":this.shape=new Xee(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case"database":this.shape=new Jee(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new rte(this.options,this.body,this.labelModule);break;case"dot":this.shape=new ate(this.options,this.body,this.labelModule);break;case"ellipse":this.shape=new sm(this.options,this.body,this.labelModule);break;case"icon":this.shape=new hte(this.options,this.body,this.labelModule);break;case"image":this.shape=new cte(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new gte(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new bte(this.options,this.body,this.labelModule);break;case"star":this.shape=new _te(this.options,this.body,this.labelModule);break;case"text":this.shape=new Ote(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new Ite(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new xte(this.options,this.body,this.labelModule);break;default:this.shape=new sm(this.options,this.body,this.labelModule);break}this.needsRefresh()}},{key:"select",value:function(){this.selected=!0,this.needsRefresh()}},{key:"unselect",value:function(){this.selected=!1,this.needsRefresh()}},{key:"needsRefresh",value:function(){this.shape.refreshNeeded=!0}},{key:"getTitle",value:function(){return this.options.title}},{key:"distanceToBorder",value:function(e,t){return this.shape.distanceToBorder(e,t)}},{key:"isFixed",value:function(){return this.options.fixed.x&&this.options.fixed.y}},{key:"isSelected",value:function(){return this.selected}},{key:"getValue",value:function(){return this.options.value}},{key:"getLabelSize",value:function(){return this.labelModule.size()}},{key:"setValueRange",value:function(e,t,i){if(this.options.value!==void 0){var a=this.options.scaling.customScalingFunction(e,t,i,this.options.value),o=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){var s=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+a*s}this.options.size=this.options.scaling.min+a*o}else this.options.size=this.baseSize,this.options.font.size=this.baseFontSize;this.updateLabelModule()}},{key:"draw",value:function(e){var t=this.getFormattingValues();return this.shape.draw(e,this.x,this.y,this.selected,this.hover,t)||{}}},{key:"updateBoundingBox",value:function(e){this.shape.updateBoundingBox(this.x,this.y,e)}},{key:"resize",value:function(e){var t=this.getFormattingValues();this.shape.resize(e,this.selected,this.hover,t)}},{key:"getItemsOnPoint",value:function(e){var t=[];return this.labelModule.visible()&&Bd(this.labelModule.getSize(),e)&&t.push({nodeId:this.id,labelId:0}),Bd(this.shape.boundingBox,e)&&t.push({nodeId:this.id}),t}},{key:"isOverlappingWith",value:function(e){return this.shape.left<e.right&&this.shape.left+this.shape.width>e.left&&this.shape.top<e.bottom&&this.shape.top+this.shape.height>e.top}},{key:"isBoundingBoxOverlappingWith",value:function(e){return this.shape.boundingBox.left<e.right&&this.shape.boundingBox.right>e.left&&this.shape.boundingBox.top<e.bottom&&this.shape.boundingBox.bottom>e.top}}],[{key:"checkOpacity",value:function(e){return 0<=e&&e<=1}},{key:"checkCoordinateOrigin",value:function(e){return e===void 0||e==="center"||e==="top-left"}},{key:"updateGroupOptions",value:function(e,t,i){var a;if(i!==void 0){var o=e.group;if(t!==void 0&&t.group!==void 0&&o!==t.group)throw new Error("updateGroupOptions: group values in options don't match.");var s=typeof o=="number"||typeof o=="string"&&o!="";if(s){var u=i.get(o);u.opacity!==void 0&&t.opacity===void 0&&(r.checkOpacity(u.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+u.opacity),u.opacity=void 0));var l=pt(a=DJ(t)).call(a,function(h){return t[h]!=null});l.push("font"),ks(l,e,u),e.color=Md(e.color)}}}},{key:"parseOptions",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0,s=["color","fixed","shadow"];if(ks(s,e,t,i),r.checkMass(t),e.opacity!==void 0&&(r.checkOpacity(e.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity),e.opacity=void 0)),t.opacity!==void 0&&(r.checkOpacity(t.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+t.opacity),t.opacity=void 0)),t.shapeProperties&&!r.checkCoordinateOrigin(t.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+t.shapeProperties.coordinateOrigin),kt(e,t,"shadow",a),t.color!==void 0&&t.color!==null){var u=Md(t.color);v_(e.color,u)}else i===!0&&t.color===null&&(e.color=zr(a.color));t.fixed!==void 0&&t.fixed!==null&&(typeof t.fixed=="boolean"?(e.fixed.x=t.fixed,e.fixed.y=t.fixed):(t.fixed.x!==void 0&&typeof t.fixed.x=="boolean"&&(e.fixed.x=t.fixed.x),t.fixed.y!==void 0&&typeof t.fixed.y=="boolean"&&(e.fixed.y=t.fixed.y))),i===!0&&t.font===null&&(e.font=zr(a.font)),r.updateGroupOptions(e,t,o),t.scaling!==void 0&&kt(e.scaling,t.scaling,"label",a.scaling)}},{key:"checkMass",value:function(e,t){if(e.mass!==void 0&&e.mass<=0){var i="";t!==void 0&&(i=" in node id: "+t),console.error("%cNegative or zero mass disallowed"+i+", setting mass to 1.",m_),e.mass=1}}}]),r}();function Ate(r,n){var e=typeof _r<"u"&&rr(r)||r["@@iterator"];if(!e){if(le(r)||(e=Mte(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
94
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Mte(r,n){var e;if(r){if(typeof r=="string")return hm(r,n);var t=Le(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Ur(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return hm(r,n)}}function hm(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}var Dte=function(){function r(n,e,t,i){var a,o=this;if(D(this,r),this.body=n,this.images=e,this.groups=t,this.layoutEngine=i,this.body.functions.createNode=A(a=this.create).call(a,this),this.nodesListeners={add:function(u,l){o.add(l.items)},update:function(u,l){o.update(l.items,l.data,l.oldData)},remove:function(u,l){o.remove(l.items)}},this.defaultOptions={borderWidth:1,borderWidthSelected:void 0,brokenImage:void 0,color:{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},opacity:void 0,fixed:{x:!1,y:!1},font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:0,strokeColor:"#ffffff",align:"center",vadjust:0,multi:!1,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"monospace",vadjust:2}},group:void 0,hidden:!1,icon:{face:"FontAwesome",code:void 0,size:50,color:"#2B7CE9"},image:void 0,imagePadding:{top:0,right:0,bottom:0,left:0},label:void 0,labelHighlightBold:!0,level:void 0,margin:{top:5,right:5,bottom:5,left:5},mass:1,physics:!0,scaling:{min:10,max:30,label:{enabled:!1,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(u,l,h,d){if(l===u)return .5;var f=1/(l-u);return Math.max(0,(d-u)*f)}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},shape:"ellipse",shapeProperties:{borderDashes:!1,borderRadius:6,interpolation:!0,useImageSize:!1,useBorderWithImage:!1,coordinateOrigin:"center"},size:25,title:void 0,value:void 0,x:void 0,y:void 0},this.defaultOptions.mass<=0)throw"Internal error: mass in defaultOptions of NodesHandler may not be zero or negative";this.options=zr(this.defaultOptions),this.bindEventListeners()}return R(r,[{key:"bindEventListeners",value:function(){var e,t,i=this;this.body.emitter.on("refreshNodes",A(e=this.refresh).call(e,this)),this.body.emitter.on("refresh",A(t=this.refresh).call(t,this)),this.body.emitter.on("destroy",function(){te(i.nodesListeners,function(a,o){i.body.data.nodes&&i.body.data.nodes.off(o,a)}),delete i.body.functions.createNode,delete i.nodesListeners.add,delete i.nodesListeners.update,delete i.nodesListeners.remove,delete i.nodesListeners})}},{key:"setOptions",value:function(e){if(e!==void 0){if(bt.parseOptions(this.options,e),e.opacity!==void 0&&(Nd(e.opacity)||!ni(e.opacity)||e.opacity<0||e.opacity>1?console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity):this.options.opacity=e.opacity),e.shape!==void 0)for(var t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&this.body.nodes[t].updateShape();if(typeof e.font<"u"||typeof e.widthConstraint<"u"||typeof e.heightConstraint<"u")for(var i=0,a=_e(this.body.nodes);i<a.length;i++){var o=a[i];this.body.nodes[o].updateLabelModule(),this.body.nodes[o].needsRefresh()}if(e.size!==void 0)for(var s in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,s)&&this.body.nodes[s].needsRefresh();(e.hidden!==void 0||e.physics!==void 0)&&this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=this.body.data.nodes;if(_1("id",e))this.body.data.nodes=e;else if(le(e))this.body.data.nodes=new ys,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new ys;else throw new TypeError("Array or DataSet expected");if(i&&te(this.nodesListeners,function(s,u){i.off(u,s)}),this.body.nodes={},this.body.data.nodes){var a=this;te(this.nodesListeners,function(s,u){a.body.data.nodes.on(u,s)});var o=this.body.data.nodes.getIds();this.add(o,!0)}t===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i,a=[],o=0;o<e.length;o++){i=e[o];var s=this.body.data.nodes.get(i),u=this.create(s);a.push(u),this.body.nodes[i]=u}this.layoutEngine.positionInitially(a),t===!1&&this.body.emitter.emit("_dataChanged")}},{key:"update",value:function(e,t,i){for(var a=this.body.nodes,o=!1,s=0;s<e.length;s++){var u=e[s],l=a[u],h=t[s];l!==void 0?l.setOptions(h)&&(o=!0):(o=!0,l=this.create(h),a[u]=l)}!o&&i!==void 0&&(o=dJ(t).call(t,function(d,f){var c=i[f];return c&&c.level!==d.level})),o===!0?this.body.emitter.emit("_dataChanged"):this.body.emitter.emit("_dataUpdated")}},{key:"remove",value:function(e){for(var t=this.body.nodes,i=0;i<e.length;i++){var a=e[i];delete t[a]}this.body.emitter.emit("_dataChanged")}},{key:"create",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:bt;return new t(e,this.body,this.images,this.groups,this.options,this.defaultOptions)}},{key:"refresh",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;te(this.body.nodes,function(i,a){var o=e.body.data.nodes.get(a);o!==void 0&&(t===!0&&i.setOptions({x:null,y:null}),i.setOptions({fixed:!1}),i.setOptions(o))})}},{key:"getPositions",value:function(e){var t={};if(e!==void 0){if(le(e)===!0){for(var i=0;i<e.length;i++)if(this.body.nodes[e[i]]!==void 0){var a=this.body.nodes[e[i]];t[e[i]]={x:Math.round(a.x),y:Math.round(a.y)}}}else if(this.body.nodes[e]!==void 0){var o=this.body.nodes[e];t[e]={x:Math.round(o.x),y:Math.round(o.y)}}}else for(var s=0;s<this.body.nodeIndices.length;s++){var u=this.body.nodes[this.body.nodeIndices[s]];t[this.body.nodeIndices[s]]={x:Math.round(u.x),y:Math.round(u.y)}}return t}},{key:"getPosition",value:function(e){if(e==null)throw new TypeError("No id was specified for getPosition method.");if(this.body.nodes[e]==null)throw new ReferenceError("NodeId provided for getPosition does not exist. Provided: ".concat(e));return{x:Math.round(this.body.nodes[e].x),y:Math.round(this.body.nodes[e].y)}}},{key:"storePositions",value:function(){var e=[],t=this.body.data.nodes.getDataSet(),i=Ate(t.get()),a;try{for(i.s();!(a=i.n()).done;){var o=a.value,s=o.id,u=this.body.nodes[s],l=Math.round(u.x),h=Math.round(u.y);(o.x!==l||o.y!==h)&&e.push({id:s,x:l,y:h})}}catch(d){i.e(d)}finally{i.f()}t.update(e)}},{key:"getBoundingBox",value:function(e){if(this.body.nodes[e]!==void 0)return this.body.nodes[e].shape.boundingBox}},{key:"getConnectedNodes",value:function(e,t){var i=[];if(this.body.nodes[e]!==void 0)for(var a=this.body.nodes[e],o={},s=0;s<a.edges.length;s++){var u=a.edges[s];t!=="to"&&u.toId==a.id?o[u.fromId]===void 0&&(i.push(u.fromId),o[u.fromId]=!0):t!=="from"&&u.fromId==a.id&&o[u.toId]===void 0&&(i.push(u.toId),o[u.toId]=!0)}return i}},{key:"getConnectedEdges",value:function(e){var t=[];if(this.body.nodes[e]!==void 0)for(var i=this.body.nodes[e],a=0;a<i.edges.length;a++)t.push(i.edges[a].id);else console.error("NodeId provided for getConnectedEdges does not exist. Provided: ",e);return t}},{key:"moveNode",value:function(e,t,i){var a=this;this.body.nodes[e]!==void 0?(this.body.nodes[e].x=Number(t),this.body.nodes[e].y=Number(i),Jt(function(){a.body.emitter.emit("startSimulation")},0)):console.error("Node id supplied to moveNode does not exist. Provided: ",e)}}]),r}(),Z_={exports:{}},dm=tt,Rte=function(r){return r!==void 0&&(dm(r,"value")||dm(r,"writable"))},Fte=X,Nte=Wt,Bte=We,Lte=Ot,zte=Rte,jte=_n,Hte=pu;function J_(r,n){var e=arguments.length<3?r:arguments[2],t,i;if(Lte(r)===e)return r[n];if(t=jte.f(r,n),t)return zte(t)?t.value:t.get===void 0?void 0:Nte(t.get,e);if(Bte(i=Hte(r)))return J_(i,n,e)}Fte({target:"Reflect",stat:!0},{get:J_});var Wte=ie,Vte=Wte.Reflect.get,Ute=Vte,Gte=Ute,Kte=Gte,qte=Kte,Yte=qte,Xte=Yte;(function(r){r.exports=Xte})(Z_);var fm=U(Z_.exports),eE={exports:{}},Qte=K0,Zte=Qte,Jte=Zte,ere=Jte;(function(r){r.exports=ere})(eE);var tre=U(eE.exports);function rre(r,n){for(;!Object.prototype.hasOwnProperty.call(r,n)&&(r=L(r),r!==null););return r}function ns(){if(typeof Reflect<"u"&&fm){var r;ns=dc(r=fm).call(r)}else ns=function(e,t,i){var a=rre(e,t);if(a){var o=tre(a,t);return o.get?o.get.call(arguments.length<3?e:i):o.value}};return ns.apply(this,arguments)}var tE={exports:{}},ire=X,cm=Math.hypot,nre=Math.abs,are=Math.sqrt,ore=!!cm&&cm(1/0,NaN)!==1/0;ire({target:"Math",stat:!0,forced:ore},{hypot:function(n,e){for(var t=0,i=0,a=arguments.length,o=0,s,u;i<a;)s=nre(arguments[i++]),o<s?(u=o/s,t=t*u*u+1,o=s):s>0?(u=s/o,t+=u*u):t+=s;return o===1/0?1/0:o*are(t)}});var sre=ie,ure=sre.Math.hypot,lre=ure,hre=lre;(function(r){r.exports=hre})(tE);var dre=U(tE.exports);function rE(r){var n=fre();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function fre(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Oe=function(){function r(){D(this,r)}return R(r,null,[{key:"transform",value:function(e,t){le(e)||(e=[e]);for(var i=t.point.x,a=t.point.y,o=t.angle,s=t.length,u=0;u<e.length;++u){var l=e[u],h=l.x*Math.cos(o)-l.y*Math.sin(o),d=l.x*Math.sin(o)+l.y*Math.cos(o);l.x=i+s*h,l.y=a+s*d}}},{key:"drawPath",value:function(e,t){e.beginPath(),e.moveTo(t[0].x,t[0].y);for(var i=1;i<t.length;++i)e.lineTo(t[i].x,t[i].y);e.closePath()}}]),r}(),cre=function(r){ue(e,r);var n=rE(e);function e(){return D(this,e),n.apply(this,arguments)}return R(e,null,[{key:"draw",value:function(i,a){if(a.image){i.save(),i.translate(a.point.x,a.point.y),i.rotate(Math.PI/2+a.angle);var o=a.imageWidth!=null?a.imageWidth:a.image.width,s=a.imageHeight!=null?a.imageHeight:a.image.height;a.image.drawImageAtPosition(i,1,-o/2,0,o,s),i.restore()}return!1}}]),e}(Oe),vre=function(r){ue(e,r);var n=rE(e);function e(){return D(this,e),n.apply(this,arguments)}return R(e,null,[{key:"draw",value:function(i,a){var o=[{x:0,y:0},{x:-1,y:.3},{x:-.9,y:0},{x:-1,y:-.3}];return Oe.transform(o,a),Oe.drawPath(i,o),!0}}]),e}(Oe),pre=function(){function r(){D(this,r)}return R(r,null,[{key:"draw",value:function(e,t){var i=[{x:-1,y:0},{x:0,y:.3},{x:-.4,y:0},{x:0,y:-.3}];return Oe.transform(i,t),Oe.drawPath(e,i),!0}}]),r}(),gre=function(){function r(){D(this,r)}return R(r,null,[{key:"draw",value:function(e,t){var i={x:-.4,y:0};Oe.transform(i,t),e.strokeStyle=e.fillStyle,e.fillStyle="rgba(0, 0, 0, 0)";var a=Math.PI,o=t.angle-a/2,s=t.angle+a/2;return e.beginPath(),e.arc(i.x,i.y,t.length*.4,o,s,!1),e.stroke(),!0}}]),r}(),yre=function(){function r(){D(this,r)}return R(r,null,[{key:"draw",value:function(e,t){var i={x:-.3,y:0};Oe.transform(i,t),e.strokeStyle=e.fillStyle,e.fillStyle="rgba(0, 0, 0, 0)";var a=Math.PI,o=t.angle+a/2,s=t.angle+3*a/2;return e.beginPath(),e.arc(i.x,i.y,t.length*.4,o,s,!1),e.stroke(),!0}}]),r}(),mre=function(){function r(){D(this,r)}return R(r,null,[{key:"draw",value:function(e,t){var i=[{x:.02,y:0},{x:-1,y:.3},{x:-1,y:-.3}];return Oe.transform(i,t),Oe.drawPath(e,i),!0}}]),r}(),bre=function(){function r(){D(this,r)}return R(r,null,[{key:"draw",value:function(e,t){var i=[{x:0,y:.3},{x:0,y:-.3},{x:-1,y:0}];return Oe.transform(i,t),Oe.drawPath(e,i),!0}}]),r}(),$re=function(){function r(){D(this,r)}return R(r,null,[{key:"draw",value:function(e,t){var i={x:-.4,y:0};return Oe.transform(i,t),Af(e,i.x,i.y,t.length*.4),!0}}]),r}(),wre=function(){function r(){D(this,r)}return R(r,null,[{key:"draw",value:function(e,t){var i=[{x:0,y:.5},{x:0,y:-.5},{x:-.15,y:-.5},{x:-.15,y:.5}];return Oe.transform(i,t),Oe.drawPath(e,i),!0}}]),r}(),_re=function(){function r(){D(this,r)}return R(r,null,[{key:"draw",value:function(e,t){var i=[{x:0,y:.3},{x:0,y:-.3},{x:-.6,y:-.3},{x:-.6,y:.3}];return Oe.transform(i,t),Oe.drawPath(e,i),!0}}]),r}(),Ere=function(){function r(){D(this,r)}return R(r,null,[{key:"draw",value:function(e,t){var i=[{x:0,y:0},{x:-.5,y:-.3},{x:-1,y:0},{x:-.5,y:.3}];return Oe.transform(i,t),Oe.drawPath(e,i),!0}}]),r}(),Sre=function(){function r(){D(this,r)}return R(r,null,[{key:"draw",value:function(e,t){var i=[{x:-1,y:.3},{x:-.5,y:0},{x:-1,y:-.3},{x:0,y:0}];return Oe.transform(i,t),Oe.drawPath(e,i),!0}}]),r}(),iE=function(){function r(){D(this,r)}return R(r,null,[{key:"draw",value:function(e,t){var i;switch(t.type&&(i=t.type.toLowerCase()),i){case"image":return cre.draw(e,t);case"circle":return $re.draw(e,t);case"box":return _re.draw(e,t);case"crow":return pre.draw(e,t);case"curve":return gre.draw(e,t);case"diamond":return Ere.draw(e,t);case"inv_curve":return yre.draw(e,t);case"triangle":return mre.draw(e,t);case"inv_triangle":return bre.draw(e,t);case"bar":return wre.draw(e,t);case"vee":return Sre.draw(e,t);case"arrow":default:return vre.draw(e,t)}}}]),r}();function vm(r,n){var e=_e(r);if(jr){var t=jr(r);n&&(t=pt(t).call(t,function(i){return Kr(r,i).enumerable})),e.push.apply(e,t)}return e}function pm(r){for(var n=1;n<arguments.length;n++){var e,t,i=arguments[n]!=null?arguments[n]:{};n%2?pe(e=vm(Object(i),!0)).call(e,function(a){Iu(r,a,i[a])}):Hr?Ou(r,Hr(i)):pe(t=vm(Object(i))).call(t,function(a){Tu(r,a,Kr(i,a))})}return r}var nE=function(){function r(n,e,t){D(this,r),this._body=e,this._labelModule=t,this.color={},this.colorDirty=!0,this.hoverWidth=1.5,this.selectionWidth=2,this.setOptions(n),this.fromPoint=this.from,this.toPoint=this.to}return R(r,[{key:"connect",value:function(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to]}},{key:"cleanup",value:function(){return!1}},{key:"setOptions",value:function(e){this.options=e,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.id=this.options.id}},{key:"drawLine",value:function(e,t,i,a){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.getViaNode();e.strokeStyle=this.getColor(e,t),e.lineWidth=t.width,t.dashes!==!1?this._drawDashedLine(e,t,o):this._drawLine(e,t,o)}},{key:"_drawLine",value:function(e,t,i,a,o){if(this.from!=this.to)this._line(e,t,i,a,o);else{var s=this._getCircleData(e),u=Ee(s,3),l=u[0],h=u[1],d=u[2];this._circle(e,t,l,h,d)}}},{key:"_drawDashedLine",value:function(e,t,i,a,o){e.lineCap="round";var s=le(t.dashes)?t.dashes:[5,5];if(e.setLineDash!==void 0){if(e.save(),e.setLineDash(s),e.lineDashOffset=0,this.from!=this.to)this._line(e,t,i);else{var u=this._getCircleData(e),l=Ee(u,3),h=l[0],d=l[1],f=l[2];this._circle(e,t,h,d,f)}e.setLineDash([0]),e.lineDashOffset=0,e.restore()}else{if(this.from!=this.to)U1(e,this.from.x,this.from.y,this.to.x,this.to.y,s);else{var c=this._getCircleData(e),v=Ee(c,3),g=v[0],b=v[1],p=v[2];this._circle(e,t,g,b,p)}this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}}},{key:"findBorderPosition",value:function(e,t,i){return this.from!=this.to?this._findBorderPosition(e,t,i):this._findBorderPositionCircle(e,t,i)}},{key:"findBorderPositions",value:function(e){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,e),to:this._findBorderPosition(this.to,e)};var t,i=Le(t=this._getCircleData(e)).call(t,0,2),a=Ee(i,2),o=a[0],s=a[1];return{from:this._findBorderPositionCircle(this.from,e,{x:o,y:s,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,e,{x:o,y:s,low:.6,high:.8,direction:1})}}},{key:"_getCircleData",value:function(e){var t=this.options.selfReference.size;e!==void 0&&this.from.shape.width===void 0&&this.from.shape.resize(e);var i=z_(e,this.options.selfReference.angle,t,this.from);return[i.x,i.y,t]}},{key:"_pointOnCircle",value:function(e,t,i,a){var o=a*2*Math.PI;return{x:e+i*Math.cos(o),y:t-i*Math.sin(o)}}},{key:"_findBorderPositionCircle",value:function(e,t,i){var a=i.x,o=i.y,s=i.low,u=i.high,l=i.direction,h=10,d=this.options.selfReference.size,f=.05,c,v=(s+u)*.5,g=0;this.options.arrowStrikethrough===!0&&(l===-1?g=this.options.endPointOffset.from:l===1&&(g=this.options.endPointOffset.to));var b=0;do{v=(s+u)*.5,c=this._pointOnCircle(a,o,d,v);var p=Math.atan2(e.y-c.y,e.x-c.x),$=e.distanceToBorder(t,p)+g,y=Math.sqrt(Math.pow(c.x-e.x,2)+Math.pow(c.y-e.y,2)),m=$-y;if(Math.abs(m)<f)break;m>0?l>0?s=v:u=v:l>0?u=v:s=v,++b}while(s<=u&&b<h);return pm(pm({},c),{},{t:v})}},{key:"getLineWidth",value:function(e,t){return e===!0?Math.max(this.selectionWidth,.3/this._body.view.scale):t===!0?Math.max(this.hoverWidth,.3/this._body.view.scale):Math.max(this.options.width,.3/this._body.view.scale)}},{key:"getColor",value:function(e,t){if(t.inheritsColor!==!1){if(t.inheritsColor==="both"&&this.from.id!==this.to.id){var i=e.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y),a=this.from.options.color.highlight.border,o=this.to.options.color.highlight.border;return this.from.selected===!1&&this.to.selected===!1?(a=It(this.from.options.color.border,t.opacity),o=It(this.to.options.color.border,t.opacity)):this.from.selected===!0&&this.to.selected===!1?o=this.to.options.color.border:this.from.selected===!1&&this.to.selected===!0&&(a=this.from.options.color.border),i.addColorStop(0,a),i.addColorStop(1,o),i}return t.inheritsColor==="to"?It(this.to.options.color.border,t.opacity):It(this.from.options.color.border,t.opacity)}else return It(t.color,t.opacity)}},{key:"_circle",value:function(e,t,i,a,o){this.enableShadow(e,t);var s=0,u=Math.PI*2;if(!this.options.selfReference.renderBehindTheNode){var l=this.options.selfReference.angle,h=this.options.selfReference.angle+Math.PI,d=this._findBorderPositionCircle(this.from,e,{x:i,y:a,low:l,high:h,direction:-1}),f=this._findBorderPositionCircle(this.from,e,{x:i,y:a,low:l,high:h,direction:1});s=Math.atan2(d.y-a,d.x-i),u=Math.atan2(f.y-a,f.x-i)}e.beginPath(),e.arc(i,a,o,s,u,!1),e.stroke(),this.disableShadow(e,t)}},{key:"getDistanceToEdge",value:function(e,t,i,a,o,s){if(this.from!=this.to)return this._getDistanceToEdge(e,t,i,a,o,s);var u=this._getCircleData(void 0),l=Ee(u,3),h=l[0],d=l[1],f=l[2],c=h-o,v=d-s;return Math.abs(Math.sqrt(c*c+v*v)-f)}},{key:"_getDistanceToLine",value:function(e,t,i,a,o,s){var u=i-e,l=a-t,h=u*u+l*l,d=((o-e)*u+(s-t)*l)/h;d>1?d=1:d<0&&(d=0);var f=e+d*u,c=t+d*l,v=f-o,g=c-s;return Math.sqrt(v*v+g*g)}},{key:"getArrowData",value:function(e,t,i,a,o,s){var u,l,h,d,f,c,v,g=s.width;t==="from"?(h=this.from,d=this.to,f=s.fromArrowScale<0,c=Math.abs(s.fromArrowScale),v=s.fromArrowType):t==="to"?(h=this.to,d=this.from,f=s.toArrowScale<0,c=Math.abs(s.toArrowScale),v=s.toArrowType):(h=this.to,d=this.from,f=s.middleArrowScale<0,c=Math.abs(s.middleArrowScale),v=s.middleArrowType);var b=15*c+3*g;if(h!=d){var p=dre(h.x-d.x,h.y-d.y),$=b/p;if(t!=="middle")if(this.options.smooth.enabled===!0){var y=this._findBorderPosition(h,e,{via:i}),m=this.getPoint(y.t+$*(t==="from"?1:-1),i);u=Math.atan2(y.y-m.y,y.x-m.x),l=y}else u=Math.atan2(h.y-d.y,h.x-d.x),l=this._findBorderPosition(h,e);else{var _=(f?-$:$)/2,O=this.getPoint(.5+_,i),k=this.getPoint(.5-_,i);u=Math.atan2(O.y-k.y,O.x-k.x),l=this.getPoint(.5,i)}}else{var S=this._getCircleData(e),w=Ee(S,3),E=w[0],F=w[1],H=w[2];if(t==="from"){var z=this.options.selfReference.angle,q=this.options.selfReference.angle+Math.PI,Q=this._findBorderPositionCircle(this.from,e,{x:E,y:F,low:z,high:q,direction:-1});u=Q.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,l=Q}else if(t==="to"){var re=this.options.selfReference.angle,ae=this.options.selfReference.angle+Math.PI,C=this._findBorderPositionCircle(this.from,e,{x:E,y:F,low:re,high:ae,direction:1});u=C.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,l=C}else{var I=this.options.selfReference.angle/(2*Math.PI);l=this._pointOnCircle(E,F,H,I),u=I*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}var N=l.x-b*.9*Math.cos(u),V=l.y-b*.9*Math.sin(u),B={x:N,y:V};return{point:l,core:B,angle:u,length:b,type:v}}},{key:"drawArrowHead",value:function(e,t,i,a,o){e.strokeStyle=this.getColor(e,t),e.fillStyle=e.strokeStyle,e.lineWidth=t.width;var s=iE.draw(e,o);s&&(this.enableShadow(e,t),so(e).call(e),this.disableShadow(e,t))}},{key:"enableShadow",value:function(e,t){t.shadow===!0&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}},{key:"disableShadow",value:function(e,t){t.shadow===!0&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}},{key:"drawBackground",value:function(e,t){if(t.background!==!1){var i={strokeStyle:e.strokeStyle,lineWidth:e.lineWidth,dashes:e.dashes};e.strokeStyle=t.backgroundColor,e.lineWidth=t.backgroundSize,this.setStrokeDashed(e,t.backgroundDashes),e.stroke(),e.strokeStyle=i.strokeStyle,e.lineWidth=i.lineWidth,e.dashes=i.dashes,this.setStrokeDashed(e,t.dashes)}}},{key:"setStrokeDashed",value:function(e,t){if(t!==!1)if(e.setLineDash!==void 0){var i=le(t)?t:[5,5];e.setLineDash(i)}else console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.");else e.setLineDash!==void 0?e.setLineDash([]):console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}}]),r}();function gm(r,n){var e=_e(r);if(jr){var t=jr(r);n&&(t=pt(t).call(t,function(i){return Kr(r,i).enumerable})),e.push.apply(e,t)}return e}function ym(r){for(var n=1;n<arguments.length;n++){var e,t,i=arguments[n]!=null?arguments[n]:{};n%2?pe(e=gm(Object(i),!0)).call(e,function(a){Iu(r,a,i[a])}):Hr?Ou(r,Hr(i)):pe(t=gm(Object(i))).call(t,function(a){Tu(r,a,Kr(i,a))})}return r}function Ore(r){var n=Tre();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function Tre(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var cc=function(r){ue(e,r);var n=Ore(e);function e(t,i,a){return D(this,e),n.call(this,t,i,a)}return R(e,[{key:"_findBorderPositionBezier",value:function(i,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates(),s=10,u=.2,l=!1,h=1,d=0,f=this.to,c,v,g=this.options.endPointOffset?this.options.endPointOffset.to:0;i.id===this.from.id&&(f=this.from,l=!0,g=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(g=0);var b=0;do{v=(d+h)*.5,c=this.getPoint(v,o);var p=Math.atan2(f.y-c.y,f.x-c.x),$=f.distanceToBorder(a,p)+g,y=Math.sqrt(Math.pow(c.x-f.x,2)+Math.pow(c.y-f.y,2)),m=$-y;if(Math.abs(m)<u)break;m<0?l===!1?d=v:h=v:l===!1?h=v:d=v,++b}while(d<=h&&b<s);return ym(ym({},c),{},{t:v})}},{key:"_getDistanceToBezierEdge",value:function(i,a,o,s,u,l,h){var d=1e9,f,c,v,g,b,p=i,$=a;for(c=1;c<10;c++)v=.1*c,g=Math.pow(1-v,2)*i+2*v*(1-v)*h.x+Math.pow(v,2)*o,b=Math.pow(1-v,2)*a+2*v*(1-v)*h.y+Math.pow(v,2)*s,c>0&&(f=this._getDistanceToLine(p,$,g,b,u,l),d=f<d?f:d),p=g,$=b;return d}},{key:"_bezierCurve",value:function(i,a,o,s){i.beginPath(),i.moveTo(this.fromPoint.x,this.fromPoint.y),o!=null&&o.x!=null?s!=null&&s.x!=null?i.bezierCurveTo(o.x,o.y,s.x,s.y,this.toPoint.x,this.toPoint.y):i.quadraticCurveTo(o.x,o.y,this.toPoint.x,this.toPoint.y):i.lineTo(this.toPoint.x,this.toPoint.y),this.drawBackground(i,a),this.enableShadow(i,a),i.stroke(),this.disableShadow(i,a)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}}]),e}(nE);function kre(r){var n=Ire();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function Ire(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var mm=function(r){ue(e,r);var n=kre(e);function e(t,i,a){var o;return D(this,e),o=n.call(this,t,i,a),o.via=o.via,o._boundFunction=function(){o.positionBezierNode()},o._body.emitter.on("_repositionBezierNodes",o._boundFunction),o}return R(e,[{key:"setOptions",value:function(i){ns(L(e.prototype),"setOptions",this).call(this,i);var a=!1;this.options.physics!==i.physics&&(a=!0),this.options=i,this.id=this.options.id,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.setupSupportNode(),this.connect(),a===!0&&(this.via.setOptions({physics:this.options.physics}),this.positionBezierNode())}},{key:"connect",value:function(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.from===void 0||this.to===void 0||this.options.physics===!1?this.via.setOptions({physics:!1}):this.from.id===this.to.id?this.via.setOptions({physics:!1}):this.via.setOptions({physics:!0})}},{key:"cleanup",value:function(){return this._body.emitter.off("_repositionBezierNodes",this._boundFunction),this.via!==void 0?(delete this._body.nodes[this.via.id],this.via=void 0,!0):!1}},{key:"setupSupportNode",value:function(){if(this.via===void 0){var i="edgeId:"+this.id,a=this._body.functions.createNode({id:i,shape:"circle",physics:!0,hidden:!0});this._body.nodes[i]=a,this.via=a,this.via.parentEdgeId=this.id,this.positionBezierNode()}}},{key:"positionBezierNode",value:function(){this.via!==void 0&&this.from!==void 0&&this.to!==void 0?(this.via.x=.5*(this.from.x+this.to.x),this.via.y=.5*(this.from.y+this.to.y)):this.via!==void 0&&(this.via.x=0,this.via.y=0)}},{key:"_line",value:function(i,a,o){this._bezierCurve(i,a,o)}},{key:"_getViaCoordinates",value:function(){return this.via}},{key:"getViaNode",value:function(){return this.via}},{key:"getPoint",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.via;if(this.from===this.to){var o=this._getCircleData(),s=Ee(o,3),u=s[0],l=s[1],h=s[2],d=2*Math.PI*(1-i);return{x:u+h*Math.sin(d),y:l+h-h*(1-Math.cos(d))}}else return{x:Math.pow(1-i,2)*this.fromPoint.x+2*i*(1-i)*a.x+Math.pow(i,2)*this.toPoint.x,y:Math.pow(1-i,2)*this.fromPoint.y+2*i*(1-i)*a.y+Math.pow(i,2)*this.toPoint.y}}},{key:"_findBorderPosition",value:function(i,a){return this._findBorderPositionBezier(i,a,this.via)}},{key:"_getDistanceToEdge",value:function(i,a,o,s,u,l){return this._getDistanceToBezierEdge(i,a,o,s,u,l,this.via)}}]),e}(cc);function Pre(r){var n=Cre();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function Cre(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var bm=function(r){ue(e,r);var n=Pre(e);function e(t,i,a){return D(this,e),n.call(this,t,i,a)}return R(e,[{key:"_line",value:function(i,a,o){this._bezierCurve(i,a,o)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_getViaCoordinates",value:function(){var i=this.options.smooth.roundness,a=this.options.smooth.type,o=Math.abs(this.from.x-this.to.x),s=Math.abs(this.from.y-this.to.y);if(a==="discrete"||a==="diagonalCross"){var u,l;o<=s?u=l=i*s:u=l=i*o,this.from.x>this.to.x&&(u=-u),this.from.y>=this.to.y&&(l=-l);var h=this.from.x+u,d=this.from.y+l;return a==="discrete"&&(o<=s?h=o<i*s?this.from.x:h:d=s<i*o?this.from.y:d),{x:h,y:d}}else if(a==="straightCross"){var f=(1-i)*o,c=(1-i)*s;return o<=s?(f=0,this.from.y<this.to.y&&(c=-c)):(this.from.x<this.to.x&&(f=-f),c=0),{x:this.to.x+f,y:this.to.y+c}}else if(a==="horizontal"){var v=(1-i)*o;return this.from.x<this.to.x&&(v=-v),{x:this.to.x+v,y:this.from.y}}else if(a==="vertical"){var g=(1-i)*s;return this.from.y<this.to.y&&(g=-g),{x:this.from.x,y:this.to.y+g}}else if(a==="curvedCW"){o=this.to.x-this.from.x,s=this.from.y-this.to.y;var b=Math.sqrt(o*o+s*s),p=Math.PI,$=Math.atan2(s,o),y=($+(i*.5+.5)*p)%(2*p);return{x:this.from.x+(i*.5+.5)*b*Math.sin(y),y:this.from.y+(i*.5+.5)*b*Math.cos(y)}}else if(a==="curvedCCW"){o=this.to.x-this.from.x,s=this.from.y-this.to.y;var m=Math.sqrt(o*o+s*s),_=Math.PI,O=Math.atan2(s,o),k=(O+(-i*.5+.5)*_)%(2*_);return{x:this.from.x+(i*.5+.5)*m*Math.sin(k),y:this.from.y+(i*.5+.5)*m*Math.cos(k)}}else{var S,w;o<=s?S=w=i*s:S=w=i*o,this.from.x>this.to.x&&(S=-S),this.from.y>=this.to.y&&(w=-w);var E=this.from.x+S,F=this.from.y+w;return o<=s?this.from.x<=this.to.x?E=this.to.x<E?this.to.x:E:E=this.to.x>E?this.to.x:E:this.from.y>=this.to.y?F=this.to.y>F?this.to.y:F:F=this.to.y<F?this.to.y:F,{x:E,y:F}}}},{key:"_findBorderPosition",value:function(i,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(i,a,o.via)}},{key:"_getDistanceToEdge",value:function(i,a,o,s,u,l){var h=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(i,a,o,s,u,l,h)}},{key:"getPoint",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),o=i,s=Math.pow(1-o,2)*this.fromPoint.x+2*o*(1-o)*a.x+Math.pow(o,2)*this.toPoint.x,u=Math.pow(1-o,2)*this.fromPoint.y+2*o*(1-o)*a.y+Math.pow(o,2)*this.toPoint.y;return{x:s,y:u}}}]),e}(cc);function xre(r){var n=Are();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function Are(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Mre=function(r){ue(e,r);var n=xre(e);function e(t,i,a){return D(this,e),n.call(this,t,i,a)}return R(e,[{key:"_getDistanceToBezierEdge2",value:function(i,a,o,s,u,l,h,d){for(var f=1e9,c=i,v=a,g=[0,0,0,0],b=1;b<10;b++){var p=.1*b;g[0]=Math.pow(1-p,3),g[1]=3*p*Math.pow(1-p,2),g[2]=3*Math.pow(p,2)*(1-p),g[3]=Math.pow(p,3);var $=g[0]*i+g[1]*h.x+g[2]*d.x+g[3]*o,y=g[0]*a+g[1]*h.y+g[2]*d.y+g[3]*s;if(b>0){var m=this._getDistanceToLine(c,v,$,y,u,l);f=m<f?m:f}c=$,v=y}return f}}]),e}(cc);function Dre(r){var n=Rre();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function Rre(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var $m=function(r){ue(e,r);var n=Dre(e);function e(t,i,a){return D(this,e),n.call(this,t,i,a)}return R(e,[{key:"_line",value:function(i,a,o){var s=o[0],u=o[1];this._bezierCurve(i,a,s,u)}},{key:"_getViaCoordinates",value:function(){var i=this.from.x-this.to.x,a=this.from.y-this.to.y,o,s,u,l,h=this.options.smooth.roundness;return(Math.abs(i)>Math.abs(a)||this.options.smooth.forceDirection===!0||this.options.smooth.forceDirection==="horizontal")&&this.options.smooth.forceDirection!=="vertical"?(s=this.from.y,l=this.to.y,o=this.from.x-h*i,u=this.to.x+h*i):(s=this.from.y-h*a,l=this.to.y+h*a,o=this.from.x,u=this.to.x),[{x:o,y:s},{x:u,y:l}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(i,a){return this._findBorderPositionBezier(i,a)}},{key:"_getDistanceToEdge",value:function(i,a,o,s,u,l){var h=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates(),d=Ee(h,2),f=d[0],c=d[1];return this._getDistanceToBezierEdge2(i,a,o,s,u,l,f,c)}},{key:"getPoint",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),o=Ee(a,2),s=o[0],u=o[1],l=i,h=[Math.pow(1-l,3),3*l*Math.pow(1-l,2),3*Math.pow(l,2)*(1-l),Math.pow(l,3)],d=h[0]*this.fromPoint.x+h[1]*s.x+h[2]*u.x+h[3]*this.toPoint.x,f=h[0]*this.fromPoint.y+h[1]*s.y+h[2]*u.y+h[3]*this.toPoint.y;return{x:d,y:f}}}]),e}(Mre);function Fre(r){var n=Nre();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function Nre(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var wm=function(r){ue(e,r);var n=Fre(e);function e(t,i,a){return D(this,e),n.call(this,t,i,a)}return R(e,[{key:"_line",value:function(i,a){i.beginPath(),i.moveTo(this.fromPoint.x,this.fromPoint.y),i.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(i,a),i.stroke(),this.disableShadow(i,a)}},{key:"getViaNode",value:function(){}},{key:"getPoint",value:function(i){return{x:(1-i)*this.fromPoint.x+i*this.toPoint.x,y:(1-i)*this.fromPoint.y+i*this.toPoint.y}}},{key:"_findBorderPosition",value:function(i,a){var o=this.to,s=this.from;i.id===this.from.id&&(o=this.from,s=this.to);var u=Math.atan2(o.y-s.y,o.x-s.x),l=o.x-s.x,h=o.y-s.y,d=Math.sqrt(l*l+h*h),f=i.distanceToBorder(a,u),c=(d-f)/d;return{x:(1-c)*s.x+c*o.x,y:(1-c)*s.y+c*o.y,t:0}}},{key:"_getDistanceToEdge",value:function(i,a,o,s,u,l){return this._getDistanceToLine(i,a,o,s,u,l)}}]),e}(nE),en=function(){function r(n,e,t,i,a){if(D(this,r),e===void 0)throw new Error("No body provided");this.options=zr(i),this.globalOptions=i,this.defaultOptions=a,this.body=e,this.imagelist=t,this.id=void 0,this.fromId=void 0,this.toId=void 0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void 0,this.to=void 0,this.edgeType=void 0,this.connected=!1,this.labelModule=new W_(this.body,this.options,!0),this.setOptions(n)}return R(r,[{key:"setOptions",value:function(e){if(e){var t=typeof e.physics<"u"&&this.options.physics!==e.physics||typeof e.hidden<"u"&&(this.options.hidden||!1)!==(e.hidden||!1)||typeof e.from<"u"&&this.options.from!==e.from||typeof e.to<"u"&&this.options.to!==e.to;r.parseOptions(this.options,e,!0,this.globalOptions),e.id!==void 0&&(this.id=e.id),e.from!==void 0&&(this.fromId=e.from),e.to!==void 0&&(this.toId=e.to),e.title!==void 0&&(this.title=e.title),e.value!==void 0&&(e.value=B_(e.value));var i=[e,this.options,this.defaultOptions];return this.chooser=lc("edge",i),this.updateLabelModule(e),t=this.updateEdgeType()||t,this._setInteractionWidths(),this.connect(),t}}},{key:"getFormattingValues",value:function(){var e=this.options.arrows.to===!0||this.options.arrows.to.enabled===!0,t=this.options.arrows.from===!0||this.options.arrows.from.enabled===!0,i=this.options.arrows.middle===!0||this.options.arrows.middle.enabled===!0,a=this.options.color.inherit,o={toArrow:e,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,toArrowSrc:this.options.arrows.to.src,toArrowImageWidth:this.options.arrows.to.imageWidth,toArrowImageHeight:this.options.arrows.to.imageHeight,middleArrow:i,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,middleArrowSrc:this.options.arrows.middle.src,middleArrowImageWidth:this.options.arrows.middle.imageWidth,middleArrowImageHeight:this.options.arrows.middle.imageHeight,fromArrow:t,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,fromArrowSrc:this.options.arrows.from.src,fromArrowImageWidth:this.options.arrows.from.imageWidth,fromArrowImageHeight:this.options.arrows.from.imageHeight,arrowStrikethrough:this.options.arrowStrikethrough,color:a?void 0:this.options.color.color,inheritsColor:a,opacity:this.options.color.opacity,hidden:this.options.hidden,length:this.options.length,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y,dashes:this.options.dashes,width:this.options.width,background:this.options.background.enabled,backgroundColor:this.options.background.color,backgroundSize:this.options.background.size,backgroundDashes:this.options.background.dashes};if(this.selected||this.hover)if(this.chooser===!0){if(this.selected){var s=this.options.selectionWidth;typeof s=="function"?o.width=s(o.width):typeof s=="number"&&(o.width+=s),o.width=Math.max(o.width,.3/this.body.view.scale),o.color=this.options.color.highlight,o.shadow=this.options.shadow.enabled}else if(this.hover){var u=this.options.hoverWidth;typeof u=="function"?o.width=u(o.width):typeof u=="number"&&(o.width+=u),o.width=Math.max(o.width,.3/this.body.view.scale),o.color=this.options.color.hover,o.shadow=this.options.shadow.enabled}}else typeof this.chooser=="function"&&(this.chooser(o,this.options.id,this.selected,this.hover),o.color!==void 0&&(o.inheritsColor=!1),o.shadow===!1&&(o.shadowColor!==this.options.shadow.color||o.shadowSize!==this.options.shadow.size||o.shadowX!==this.options.shadow.x||o.shadowY!==this.options.shadow.y)&&(o.shadow=!0));else o.shadow=this.options.shadow.enabled,o.width=Math.max(o.width,.3/this.body.view.scale);return o}},{key:"updateLabelModule",value:function(e){var t=[e,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,t),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateEdgeType",value:function(){var e=this.options.smooth,t=!1,i=!0;return this.edgeType!==void 0&&((this.edgeType instanceof mm&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof $m&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof bm&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof wm&&e.type.enabled===!1)&&(i=!1),i===!0&&(t=this.cleanup())),i===!0?e.enabled===!0?e.type==="dynamic"?(t=!0,this.edgeType=new mm(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new $m(this.options,this.body,this.labelModule):this.edgeType=new bm(this.options,this.body,this.labelModule):this.edgeType=new wm(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),t}},{key:"connect",value:function(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=this.from!==void 0&&this.to!==void 0,this.connected===!0?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}},{key:"disconnect",value:function(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}},{key:"getTitle",value:function(){return this.title}},{key:"isSelected",value:function(){return this.selected}},{key:"getValue",value:function(){return this.options.value}},{key:"setValueRange",value:function(e,t,i){if(this.options.value!==void 0){var a=this.options.scaling.customScalingFunction(e,t,i,this.options.value),o=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){var s=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+a*s}this.options.width=this.options.scaling.min+a*o}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}},{key:"_setInteractionWidths",value:function(){typeof this.options.hoverWidth=="function"?this.edgeType.hoverWidth=this.options.hoverWidth(this.options.width):this.edgeType.hoverWidth=this.options.hoverWidth+this.options.width,typeof this.options.selectionWidth=="function"?this.edgeType.selectionWidth=this.options.selectionWidth(this.options.width):this.edgeType.selectionWidth=this.options.selectionWidth+this.options.width}},{key:"draw",value:function(e){var t=this.getFormattingValues();if(!t.hidden){var i=this.edgeType.getViaNode();this.edgeType.drawLine(e,t,this.selected,this.hover,i),this.drawLabel(e,i)}}},{key:"drawArrows",value:function(e){var t=this.getFormattingValues();if(!t.hidden){var i=this.edgeType.getViaNode(),a={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,t.fromArrow&&(a.from=this.edgeType.getArrowData(e,"from",i,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.fromPoint=a.from.core),t.fromArrowSrc&&(a.from.image=this.imagelist.load(t.fromArrowSrc)),t.fromArrowImageWidth&&(a.from.imageWidth=t.fromArrowImageWidth),t.fromArrowImageHeight&&(a.from.imageHeight=t.fromArrowImageHeight)),t.toArrow&&(a.to=this.edgeType.getArrowData(e,"to",i,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.toPoint=a.to.core),t.toArrowSrc&&(a.to.image=this.imagelist.load(t.toArrowSrc)),t.toArrowImageWidth&&(a.to.imageWidth=t.toArrowImageWidth),t.toArrowImageHeight&&(a.to.imageHeight=t.toArrowImageHeight)),t.middleArrow&&(a.middle=this.edgeType.getArrowData(e,"middle",i,this.selected,this.hover,t),t.middleArrowSrc&&(a.middle.image=this.imagelist.load(t.middleArrowSrc)),t.middleArrowImageWidth&&(a.middle.imageWidth=t.middleArrowImageWidth),t.middleArrowImageHeight&&(a.middle.imageHeight=t.middleArrowImageHeight)),t.fromArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,a.from),t.middleArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,a.middle),t.toArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,a.to)}}},{key:"drawLabel",value:function(e,t){if(this.options.label!==void 0){var i=this.from,a=this.to;this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(e,this.selected,this.hover);var o;if(i.id!=a.id){this.labelModule.pointToSelf=!1,o=this.edgeType.getPoint(.5,t),e.save();var s=this._getRotation(e);s.angle!=0&&(e.translate(s.x,s.y),e.rotate(s.angle)),this.labelModule.draw(e,o.x,o.y,this.selected,this.hover),e.restore()}else{this.labelModule.pointToSelf=!0;var u=z_(e,this.options.selfReference.angle,this.options.selfReference.size,i);o=this._pointOnCircle(u.x,u.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(e,o.x,o.y,this.selected,this.hover)}}}},{key:"getItemsOnPoint",value:function(e){var t=[];if(this.labelModule.visible()){var i=this._getRotation();Bd(this.labelModule.getSize(),e,i)&&t.push({edgeId:this.id,labelId:0})}var a={left:e.x,top:e.y};return this.isOverlappingWith(a)&&t.push({edgeId:this.id}),t}},{key:"isOverlappingWith",value:function(e){if(this.connected){var t=10,i=this.from.x,a=this.from.y,o=this.to.x,s=this.to.y,u=e.left,l=e.top,h=this.edgeType.getDistanceToEdge(i,a,o,s,u,l);return h<t}else return!1}},{key:"_getRotation",value:function(e){var t=this.edgeType.getViaNode(),i=this.edgeType.getPoint(.5,t);e!==void 0&&this.labelModule.calculateLabelSize(e,this.selected,this.hover,i.x,i.y);var a={x:i.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible()||this.options.font.align==="horizontal")return a;var o=this.from.y-this.to.y,s=this.from.x-this.to.x,u=Math.atan2(o,s);return(u<-1&&s<0||u>0&&s<0)&&(u+=Math.PI),a.angle=u,a}},{key:"_pointOnCircle",value:function(e,t,i,a){return{x:e+i*Math.cos(a),y:t-i*Math.sin(a)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}},{key:"remove",value:function(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}},{key:"endPointsValid",value:function(){return this.body.nodes[this.fromId]!==void 0&&this.body.nodes[this.toId]!==void 0}}],[{key:"parseOptions",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,s=["endPointOffset","arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","selfReference","to","title","value","width","font","chosen","widthConstraint"];if(An(s,e,t,i),t.endPointOffset!==void 0&&t.endPointOffset.from!==void 0&&(ni(t.endPointOffset.from)?e.endPointOffset.from=t.endPointOffset.from:(e.endPointOffset.from=a.endPointOffset.from!==void 0?a.endPointOffset.from:0,console.error("endPointOffset.from is not a valid number"))),t.endPointOffset!==void 0&&t.endPointOffset.to!==void 0&&(ni(t.endPointOffset.to)?e.endPointOffset.to=t.endPointOffset.to:(e.endPointOffset.to=a.endPointOffset.to!==void 0?a.endPointOffset.to:0,console.error("endPointOffset.to is not a valid number"))),Cs(t.label)?e.label=t.label:Cs(e.label)||(e.label=void 0),kt(e,t,"smooth",a),kt(e,t,"shadow",a),kt(e,t,"background",a),t.dashes!==void 0&&t.dashes!==null?e.dashes=t.dashes:i===!0&&t.dashes===null&&(e.dashes=hi(a.dashes)),t.scaling!==void 0&&t.scaling!==null?(t.scaling.min!==void 0&&(e.scaling.min=t.scaling.min),t.scaling.max!==void 0&&(e.scaling.max=t.scaling.max),kt(e.scaling,t.scaling,"label",a.scaling)):i===!0&&t.scaling===null&&(e.scaling=hi(a.scaling)),t.arrows!==void 0&&t.arrows!==null)if(typeof t.arrows=="string"){var u=t.arrows.toLowerCase();e.arrows.to.enabled=oe(u).call(u,"to")!=-1,e.arrows.middle.enabled=oe(u).call(u,"middle")!=-1,e.arrows.from.enabled=oe(u).call(u,"from")!=-1}else if(ve(t.arrows)==="object")kt(e.arrows,t.arrows,"to",a.arrows),kt(e.arrows,t.arrows,"middle",a.arrows),kt(e.arrows,t.arrows,"from",a.arrows);else throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+oo(t.arrows));else i===!0&&t.arrows===null&&(e.arrows=hi(a.arrows));if(t.color!==void 0&&t.color!==null){var l=xr(t.color)?{color:t.color,highlight:t.color,hover:t.color,inherit:!1,opacity:1}:t.color,h=e.color;if(o)me(h,a.color,!1,i);else for(var d in h)Object.prototype.hasOwnProperty.call(h,d)&&delete h[d];if(xr(h))h.color=h,h.highlight=h,h.hover=h,h.inherit=!1,l.opacity===void 0&&(h.opacity=1);else{var f=!1;l.color!==void 0&&(h.color=l.color,f=!0),l.highlight!==void 0&&(h.highlight=l.highlight,f=!0),l.hover!==void 0&&(h.hover=l.hover,f=!0),l.inherit!==void 0&&(h.inherit=l.inherit),l.opacity!==void 0&&(h.opacity=Math.min(1,Math.max(0,l.opacity))),f===!0?h.inherit=!1:h.inherit===void 0&&(h.inherit="from")}}else i===!0&&t.color===null&&(e.color=zr(a.color));i===!0&&t.font===null&&(e.font=zr(a.font)),Object.prototype.hasOwnProperty.call(t,"selfReferenceSize")&&(console.warn("The selfReferenceSize property has been deprecated. Please use selfReference property instead. The selfReference can be set like thise selfReference:{size:30, angle:Math.PI / 4}"),e.selfReference.size=t.selfReferenceSize)}}]),r}(),Bre=function(){function r(n,e,t){var i,a=this;D(this,r),this.body=n,this.images=e,this.groups=t,this.body.functions.createEdge=A(i=this.create).call(i,this),this.edgesListeners={add:function(s,u){a.add(u.items)},update:function(s,u){a.update(u.items)},remove:function(s,u){a.remove(u.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},endPointOffset:{from:0,to:0},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(s,u,l,h){if(u===s)return .5;var d=1/(u-s);return Math.max(0,(h-s)*d)}},selectionWidth:1.5,selfReference:{size:20,angle:Math.PI/4,renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},background:{enabled:!1,color:"rgba(111,111,111,1)",size:10,dashes:!1},smooth:{enabled:!0,type:"dynamic",forceDirection:"none",roundness:.5},title:void 0,width:1,value:void 0},me(this.options,this.defaultOptions),this.bindEventListeners()}return R(r,[{key:"bindEventListeners",value:function(){var e=this,t,i;this.body.emitter.on("_forceDisableDynamicCurves",function(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;a==="dynamic"&&(a="continuous");var s=!1;for(var u in e.body.edges)if(Object.prototype.hasOwnProperty.call(e.body.edges,u)){var l=e.body.edges[u],h=e.body.data.edges.get(u);if(h!=null){var d=h.smooth;d!==void 0&&d.enabled===!0&&d.type==="dynamic"&&(a===void 0?l.setOptions({smooth:!1}):l.setOptions({smooth:{type:a}}),s=!0)}}o===!0&&s===!0&&e.body.emitter.emit("_dataChanged")}),this.body.emitter.on("_dataUpdated",function(){e.reconnectEdges()}),this.body.emitter.on("refreshEdges",A(t=this.refresh).call(t,this)),this.body.emitter.on("refresh",A(i=this.refresh).call(i,this)),this.body.emitter.on("destroy",function(){te(e.edgesListeners,function(a,o){e.body.data.edges&&e.body.data.edges.off(o,a)}),delete e.body.functions.createEdge,delete e.edgesListeners.add,delete e.edgesListeners.update,delete e.edgesListeners.remove,delete e.edgesListeners})}},{key:"setOptions",value:function(e){if(e!==void 0){en.parseOptions(this.options,e,!0,this.defaultOptions,!0);var t=!1;if(e.smooth!==void 0)for(var i in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,i)&&(t=this.body.edges[i].updateEdgeType()||t);if(e.font!==void 0)for(var a in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,a)&&this.body.edges[a].updateLabelModule();(e.hidden!==void 0||e.physics!==void 0||t===!0)&&this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(e){var t=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.body.data.edges;if(_1("id",e))this.body.data.edges=e;else if(le(e))this.body.data.edges=new ys,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new ys;else throw new TypeError("Array or DataSet expected");if(a&&te(this.edgesListeners,function(s,u){a.off(u,s)}),this.body.edges={},this.body.data.edges){te(this.edgesListeners,function(s,u){t.body.data.edges.on(u,s)});var o=this.body.data.edges.getIds();this.add(o,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),i===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=this.body.edges,a=this.body.data.edges,o=0;o<e.length;o++){var s=e[o],u=i[s];u&&u.disconnect();var l=a.get(s,{showInternalIds:!0});i[s]=this.create(l)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),t===!1&&this.body.emitter.emit("_dataChanged")}},{key:"update",value:function(e){for(var t=this.body.edges,i=this.body.data.edges,a=!1,o=0;o<e.length;o++){var s=e[o],u=i.get(s),l=t[s];l!==void 0?(l.disconnect(),a=l.setOptions(u)||a,l.connect()):(this.body.edges[s]=this.create(u),a=!0)}a===!0?(this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),this.body.emitter.emit("_dataChanged")):this.body.emitter.emit("_dataUpdated")}},{key:"remove",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.length!==0){var i=this.body.edges;te(e,function(a){var o=i[a];o!==void 0&&o.remove()}),t&&this.body.emitter.emit("_dataChanged")}}},{key:"refresh",value:function(){var e=this;te(this.body.edges,function(t,i){var a=e.body.data.edges.get(i);a!==void 0&&t.setOptions(a)})}},{key:"create",value:function(e){return new en(e,this.body,this.images,this.options,this.defaultOptions)}},{key:"reconnectEdges",value:function(){var e,t=this.body.nodes,i=this.body.edges;for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e].edges=[]);for(e in i)if(Object.prototype.hasOwnProperty.call(i,e)){var a=i[e];a.from=null,a.to=null,a.connect()}}},{key:"getConnectedNodes",value:function(e){var t=[];if(this.body.edges[e]!==void 0){var i=this.body.edges[e];i.fromId!==void 0&&t.push(i.fromId),i.toId!==void 0&&t.push(i.toId)}return t}},{key:"_updateState",value:function(){this._addMissingEdges(),this._removeInvalidEdges()}},{key:"_removeInvalidEdges",value:function(){var e=this,t=[];te(this.body.edges,function(i,a){var o=e.body.nodes[i.toId],s=e.body.nodes[i.fromId];o!==void 0&&o.isCluster===!0||s!==void 0&&s.isCluster===!0||(o===void 0||s===void 0)&&t.push(a)}),this.remove(t,!1)}},{key:"_addMissingEdges",value:function(){var e=this.body.data.edges;if(e!=null){var t=this.body.edges,i=[];pe(e).call(e,function(a,o){var s=t[o];s===void 0&&i.push(o)}),this.add(i,!0)}}}]),r}(),aE=function(){function r(n,e,t){D(this,r),this.body=n,this.physicsBody=e,this.barnesHutTree,this.setOptions(t),this._rng=Au("BARNES HUT SOLVER")}return R(r,[{key:"setOptions",value:function(e){this.options=e,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}},{key:"solve",value:function(){if(this.options.gravitationalConstant!==0&&this.physicsBody.physicsNodeIndices.length>0){var e,t=this.body.nodes,i=this.physicsBody.physicsNodeIndices,a=i.length,o=this._formBarnesHutTree(t,i);this.barnesHutTree=o;for(var s=0;s<a;s++)e=t[i[s]],e.options.mass>0&&this._getForceContributions(o.root,e)}}},{key:"_getForceContributions",value:function(e,t){this._getForceContribution(e.children.NW,t),this._getForceContribution(e.children.NE,t),this._getForceContribution(e.children.SW,t),this._getForceContribution(e.children.SE,t)}},{key:"_getForceContribution",value:function(e,t){if(e.childrenCount>0){var i=e.centerOfMass.x-t.x,a=e.centerOfMass.y-t.y,o=Math.sqrt(i*i+a*a);o*e.calcSize>this.thetaInversed?this._calculateForces(o,i,a,t,e):e.childrenCount===4?this._getForceContributions(e,t):e.children.data.id!=t.id&&this._calculateForces(o,i,a,t,e)}}},{key:"_calculateForces",value:function(e,t,i,a,o){e===0&&(e=.1,t=e),this.overlapAvoidanceFactor<1&&a.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*a.shape.radius,e-a.shape.radius));var s=this.options.gravitationalConstant*o.mass*a.options.mass/Math.pow(e,3),u=t*s,l=i*s;this.physicsBody.forces[a.id].x+=u,this.physicsBody.forces[a.id].y+=l}},{key:"_formBarnesHutTree",value:function(e,t){for(var i,a=t.length,o=e[t[0]].x,s=e[t[0]].y,u=e[t[0]].x,l=e[t[0]].y,h=1;h<a;h++){var d=e[t[h]],f=d.x,c=d.y;d.options.mass>0&&(f<o&&(o=f),f>u&&(u=f),c<s&&(s=c),c>l&&(l=c))}var v=Math.abs(u-o)-Math.abs(l-s);v>0?(s-=.5*v,l+=.5*v):(o+=.5*v,u-=.5*v);var g=1e-5,b=Math.max(g,Math.abs(u-o)),p=.5*b,$=.5*(o+u),y=.5*(s+l),m={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:$-p,maxX:$+p,minY:y-p,maxY:y+p},size:b,calcSize:1/b,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(m.root);for(var _=0;_<a;_++)i=e[t[_]],i.options.mass>0&&this._placeInTree(m.root,i);return m}},{key:"_updateBranchMass",value:function(e,t){var i=e.centerOfMass,a=e.mass+t.options.mass,o=1/a;i.x=i.x*e.mass+t.x*t.options.mass,i.x*=o,i.y=i.y*e.mass+t.y*t.options.mass,i.y*=o,e.mass=a;var s=Math.max(Math.max(t.height,t.radius),t.width);e.maxWidth=e.maxWidth<s?s:e.maxWidth}},{key:"_placeInTree",value:function(e,t,i){(i!=!0||i===void 0)&&this._updateBranchMass(e,t);var a=e.children.NW.range,o;a.maxX>t.x?a.maxY>t.y?o="NW":o="SW":a.maxY>t.y?o="NE":o="SE",this._placeInRegion(e,t,o)}},{key:"_placeInRegion",value:function(e,t,i){var a=e.children[i];switch(a.childrenCount){case 0:a.children.data=t,a.childrenCount=1,this._updateBranchMass(a,t);break;case 1:a.children.data.x===t.x&&a.children.data.y===t.y?(t.x+=this._rng(),t.y+=this._rng()):(this._splitBranch(a),this._placeInTree(a,t));break;case 4:this._placeInTree(a,t);break}}},{key:"_splitBranch",value:function(e){var t=null;e.childrenCount===1&&(t=e.children.data,e.mass=0,e.centerOfMass.x=0,e.centerOfMass.y=0),e.childrenCount=4,e.children.data=null,this._insertRegion(e,"NW"),this._insertRegion(e,"NE"),this._insertRegion(e,"SW"),this._insertRegion(e,"SE"),t!=null&&this._placeInTree(e,t)}},{key:"_insertRegion",value:function(e,t){var i,a,o,s,u=.5*e.size;switch(t){case"NW":i=e.range.minX,a=e.range.minX+u,o=e.range.minY,s=e.range.minY+u;break;case"NE":i=e.range.minX+u,a=e.range.maxX,o=e.range.minY,s=e.range.minY+u;break;case"SW":i=e.range.minX,a=e.range.minX+u,o=e.range.minY+u,s=e.range.maxY;break;case"SE":i=e.range.minX+u,a=e.range.maxX,o=e.range.minY+u,s=e.range.maxY;break}e.children[t]={centerOfMass:{x:0,y:0},mass:0,range:{minX:i,maxX:a,minY:o,maxY:s},size:.5*e.size,calcSize:2*e.calcSize,children:{data:null},maxWidth:0,level:e.level+1,childrenCount:0}}},{key:"_debug",value:function(e,t){this.barnesHutTree!==void 0&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,t))}},{key:"_drawBranch",value:function(e,t,i){i===void 0&&(i="#FF0000"),e.childrenCount===4&&(this._drawBranch(e.children.NW,t),this._drawBranch(e.children.NE,t),this._drawBranch(e.children.SE,t),this._drawBranch(e.children.SW,t)),t.strokeStyle=i,t.beginPath(),t.moveTo(e.range.minX,e.range.minY),t.lineTo(e.range.maxX,e.range.minY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.minY),t.lineTo(e.range.maxX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.maxY),t.lineTo(e.range.minX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.minX,e.range.maxY),t.lineTo(e.range.minX,e.range.minY),t.stroke()}}]),r}(),Lre=function(){function r(n,e,t){D(this,r),this._rng=Au("REPULSION SOLVER"),this.body=n,this.physicsBody=e,this.setOptions(t)}return R(r,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,t,i,a,o,s,u,l,h=this.body.nodes,d=this.physicsBody.physicsNodeIndices,f=this.physicsBody.forces,c=this.options.nodeDistance,v=-2/3/c,g=4/3,b=0;b<d.length-1;b++){u=h[d[b]];for(var p=b+1;p<d.length;p++)l=h[d[p]],e=l.x-u.x,t=l.y-u.y,i=Math.sqrt(e*e+t*t),i===0&&(i=.1*this._rng(),e=i),i<2*c&&(i<.5*c?s=1:s=v*i+g,s=s/i,a=e*s,o=t*s,f[u.id].x-=a,f[u.id].y-=o,f[l.id].x+=a,f[l.id].y+=o)}}}]),r}(),zre=function(){function r(n,e,t){D(this,r),this.body=n,this.physicsBody=e,this.setOptions(t)}return R(r,[{key:"setOptions",value:function(e){this.options=e,this.overlapAvoidanceFactor=Math.max(0,Math.min(1,this.options.avoidOverlap||0))}},{key:"solve",value:function(){for(var e=this.body.nodes,t=this.physicsBody.physicsNodeIndices,i=this.physicsBody.forces,a=this.options.nodeDistance,o=0;o<t.length-1;o++)for(var s=e[t[o]],u=o+1;u<t.length;u++){var l=e[t[u]];if(s.level===l.level){var h=a+this.overlapAvoidanceFactor*((s.shape.radius||0)/2+(l.shape.radius||0)/2),d=l.x-s.x,f=l.y-s.y,c=Math.sqrt(d*d+f*f),v=.05,g=void 0;c<h?g=-Math.pow(v*c,2)+Math.pow(v*h,2):g=0,c!==0&&(g=g/c);var b=d*g,p=f*g;i[s.id].x-=b,i[s.id].y-=p,i[l.id].x+=b,i[l.id].y+=p}}}}]),r}(),Eh=function(){function r(n,e,t){D(this,r),this.body=n,this.physicsBody=e,this.setOptions(t)}return R(r,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,t,i=this.physicsBody.physicsEdgeIndices,a=this.body.edges,o,s,u,l=0;l<i.length;l++)t=a[i[l]],t.connected===!0&&t.toId!==t.fromId&&this.body.nodes[t.toId]!==void 0&&this.body.nodes[t.fromId]!==void 0&&(t.edgeType.via!==void 0?(e=t.options.length===void 0?this.options.springLength:t.options.length,o=t.to,s=t.edgeType.via,u=t.from,this._calculateSpringForce(o,s,.5*e),this._calculateSpringForce(s,u,.5*e)):(e=t.options.length===void 0?this.options.springLength*1.5:t.options.length,this._calculateSpringForce(t.from,t.to,e)))}},{key:"_calculateSpringForce",value:function(e,t,i){var a=e.x-t.x,o=e.y-t.y,s=Math.max(Math.sqrt(a*a+o*o),.01),u=this.options.springConstant*(i-s)/s,l=a*u,h=o*u;this.physicsBody.forces[e.id]!==void 0&&(this.physicsBody.forces[e.id].x+=l,this.physicsBody.forces[e.id].y+=h),this.physicsBody.forces[t.id]!==void 0&&(this.physicsBody.forces[t.id].x-=l,this.physicsBody.forces[t.id].y-=h)}}]),r}(),jre=function(){function r(n,e,t){D(this,r),this.body=n,this.physicsBody=e,this.setOptions(t)}return R(r,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,t,i,a,o,s,u,l,h=this.body.edges,d=.5,f=this.physicsBody.physicsEdgeIndices,c=this.physicsBody.physicsNodeIndices,v=this.physicsBody.forces,g=0;g<c.length;g++){var b=c[g];v[b].springFx=0,v[b].springFy=0}for(var p=0;p<f.length;p++)t=h[f[p]],t.connected===!0&&(e=t.options.length===void 0?this.options.springLength:t.options.length,i=t.from.x-t.to.x,a=t.from.y-t.to.y,l=Math.sqrt(i*i+a*a),l=l===0?.01:l,u=this.options.springConstant*(e-l)/l,o=i*u,s=a*u,t.to.level!=t.from.level?(v[t.toId]!==void 0&&(v[t.toId].springFx-=o,v[t.toId].springFy-=s),v[t.fromId]!==void 0&&(v[t.fromId].springFx+=o,v[t.fromId].springFy+=s)):(v[t.toId]!==void 0&&(v[t.toId].x-=d*o,v[t.toId].y-=d*s),v[t.fromId]!==void 0&&(v[t.fromId].x+=d*o,v[t.fromId].y+=d*s)));u=1;for(var $,y,m=0;m<c.length;m++){var _=c[m];$=Math.min(u,Math.max(-u,v[_].springFx)),y=Math.min(u,Math.max(-u,v[_].springFy)),v[_].x+=$,v[_].y+=y}for(var O=0,k=0,S=0;S<c.length;S++){var w=c[S];O+=v[w].x,k+=v[w].y}for(var E=O/c.length,F=k/c.length,H=0;H<c.length;H++){var z=c[H];v[z].x-=E,v[z].y-=F}}}]),r}(),as=function(){function r(n,e,t){D(this,r),this.body=n,this.physicsBody=e,this.setOptions(t)}return R(r,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,t,i,a,o=this.body.nodes,s=this.physicsBody.physicsNodeIndices,u=this.physicsBody.forces,l=0;l<s.length;l++){var h=s[l];a=o[h],e=-a.x,t=-a.y,i=Math.sqrt(e*e+t*t),this._calculateForces(i,e,t,u,a)}}},{key:"_calculateForces",value:function(e,t,i,a,o){var s=e===0?0:this.options.centralGravity/e;a[o.id].x=t*s,a[o.id].y=i*s}}]),r}();function Hre(r){var n=Wre();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function Wre(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Vre=function(r){ue(e,r);var n=Hre(e);function e(t,i,a){var o;return D(this,e),o=n.call(this,t,i,a),o._rng=Au("FORCE ATLAS 2 BASED REPULSION SOLVER"),o}return R(e,[{key:"_calculateForces",value:function(i,a,o,s,u){i===0&&(i=.1*this._rng(),a=i),this.overlapAvoidanceFactor<1&&s.shape.radius&&(i=Math.max(.1+this.overlapAvoidanceFactor*s.shape.radius,i-s.shape.radius));var l=s.edges.length+1,h=this.options.gravitationalConstant*u.mass*s.options.mass*l/Math.pow(i,2),d=a*h,f=o*h;this.physicsBody.forces[s.id].x+=d,this.physicsBody.forces[s.id].y+=f}}]),e}(aE);function Ure(r){var n=Gre();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function Gre(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Kre=function(r){ue(e,r);var n=Ure(e);function e(t,i,a){return D(this,e),n.call(this,t,i,a)}return R(e,[{key:"_calculateForces",value:function(i,a,o,s,u){if(i>0){var l=u.edges.length+1,h=this.options.centralGravity*l*u.options.mass;s[u.id].x=a*h,s[u.id].y=o*h}}}]),e}(as),qre=function(){function r(n){D(this,r),this.body=n,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void 0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this.startedStabilization=!1,this.stabilizationIterations=0,this.ready=!1,this.options={},this.defaultOptions={enabled:!0,barnesHut:{theta:.5,gravitationalConstant:-2e3,centralGravity:.3,springLength:95,springConstant:.04,damping:.09,avoidOverlap:0},forceAtlas2Based:{theta:.5,gravitationalConstant:-50,centralGravity:.01,springConstant:.08,springLength:100,damping:.4,avoidOverlap:0},repulsion:{centralGravity:.2,springLength:200,springConstant:.05,nodeDistance:100,damping:.09,avoidOverlap:0},hierarchicalRepulsion:{centralGravity:0,springLength:100,springConstant:.01,nodeDistance:120,damping:.09},maxVelocity:50,minVelocity:.75,solver:"barnesHut",stabilization:{enabled:!0,iterations:1e3,updateInterval:50,onlyDynamicEdges:!1,fit:!0},timestep:.5,adaptiveTimestep:!0,wind:{x:0,y:0}},Ae(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}return R(r,[{key:"bindEventListeners",value:function(){var e=this;this.body.emitter.on("initPhysics",function(){e.initPhysics()}),this.body.emitter.on("_layoutFailed",function(){e.layoutFailed=!0}),this.body.emitter.on("resetPhysics",function(){e.stopSimulation(),e.ready=!1}),this.body.emitter.on("disablePhysics",function(){e.physicsEnabled=!1,e.stopSimulation()}),this.body.emitter.on("restorePhysics",function(){e.setOptions(e.options),e.ready===!0&&e.startSimulation()}),this.body.emitter.on("startSimulation",function(){e.ready===!0&&e.startSimulation()}),this.body.emitter.on("stopSimulation",function(){e.stopSimulation()}),this.body.emitter.on("destroy",function(){e.stopSimulation(!1),e.body.emitter.off()}),this.body.emitter.on("_dataChanged",function(){e.updatePhysicsData()})}},{key:"setOptions",value:function(e){if(e!==void 0)if(e===!1)this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation();else if(e===!0)this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation();else{this.physicsEnabled=!0,ks(["stabilization"],this.options,e),kt(this.options,e,"stabilization"),e.enabled===void 0&&(this.options.enabled=!0),this.options.enabled===!1&&(this.physicsEnabled=!1,this.stopSimulation());var t=this.options.wind;t&&((typeof t.x!="number"||Nd(t.x))&&(t.x=0),(typeof t.y!="number"||Nd(t.y))&&(t.y=0)),this.timestep=this.options.timestep}this.init()}},{key:"init",value:function(){var e;this.options.solver==="forceAtlas2Based"?(e=this.options.forceAtlas2Based,this.nodesSolver=new Vre(this.body,this.physicsBody,e),this.edgesSolver=new Eh(this.body,this.physicsBody,e),this.gravitySolver=new Kre(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new Lre(this.body,this.physicsBody,e),this.edgesSolver=new Eh(this.body,this.physicsBody,e),this.gravitySolver=new as(this.body,this.physicsBody,e)):this.options.solver==="hierarchicalRepulsion"?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new zre(this.body,this.physicsBody,e),this.edgesSolver=new jre(this.body,this.physicsBody,e),this.gravitySolver=new as(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new aE(this.body,this.physicsBody,e),this.edgesSolver=new Eh(this.body,this.physicsBody,e),this.gravitySolver=new as(this.body,this.physicsBody,e)),this.modelOptions=e}},{key:"initPhysics",value:function(){this.physicsEnabled===!0&&this.options.enabled===!0?this.options.stabilization.enabled===!0?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit("fit",{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit("fit"))}},{key:"startSimulation",value:function(){if(this.physicsEnabled===!0&&this.options.enabled===!0){if(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),this.viewFunction===void 0){var e;this.viewFunction=A(e=this.simulationStep).call(e,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}else this.body.emitter.emit("_redraw")}},{key:"stopSimulation",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.stabilized=!0,e===!0&&this._emitStabilized(),this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,e===!0&&this.body.emitter.emit("_stopRendering"))}},{key:"simulationStep",value:function(){var e=ws();this.physicsTick();var t=ws()-e;(t<.4*this.simulationInterval||this.runDoubleSpeed===!0)&&this.stabilized===!1&&(this.physicsTick(),this.runDoubleSpeed=!0),this.stabilized===!0&&this.stopSimulation()}},{key:"_emitStabilized",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||this.startedStabilization===!0)&&Jt(function(){e.body.emitter.emit("stabilized",{iterations:t}),e.startedStabilization=!1,e.stabilizationIterations=0},0)}},{key:"physicsStep",value:function(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}},{key:"adjustTimeStep",value:function(){var e=1.2;this._evaluateStepQuality()===!0?this.timestep=e*this.timestep:this.timestep/e<this.options.timestep?this.timestep=this.options.timestep:(this.adaptiveCounter=-1,this.timestep=Math.max(this.options.timestep,this.timestep/e))}},{key:"physicsTick",value:function(){if(this._startStabilizing(),this.stabilized!==!0){if(this.adaptiveTimestep===!0&&this.adaptiveTimestepEnabled===!0){var e=this.adaptiveCounter%this.adaptiveInterval===0;e?(this.timestep=2*this.timestep,this.physicsStep(),this.revert(),this.timestep=.5*this.timestep,this.physicsStep(),this.physicsStep(),this.adjustTimeStep()):this.physicsStep(),this.adaptiveCounter+=1}else this.timestep=this.options.timestep,this.physicsStep();this.stabilized===!0&&this.revert(),this.stabilizationIterations++}}},{key:"updatePhysicsData",value:function(){this.physicsBody.forces={},this.physicsBody.physicsNodeIndices=[],this.physicsBody.physicsEdgeIndices=[];var e=this.body.nodes,t=this.body.edges;for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&e[i].options.physics===!0&&this.physicsBody.physicsNodeIndices.push(e[i].id);for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&t[a].options.physics===!0&&this.physicsBody.physicsEdgeIndices.push(t[a].id);for(var o=0;o<this.physicsBody.physicsNodeIndices.length;o++){var s=this.physicsBody.physicsNodeIndices[o];this.physicsBody.forces[s]={x:0,y:0},this.physicsBody.velocities[s]===void 0&&(this.physicsBody.velocities[s]={x:0,y:0})}for(var u in this.physicsBody.velocities)e[u]===void 0&&delete this.physicsBody.velocities[u]}},{key:"revert",value:function(){var e=_e(this.previousStates),t=this.body.nodes,i=this.physicsBody.velocities;this.referenceState={};for(var a=0;a<e.length;a++){var o=e[a];t[o]!==void 0?t[o].options.physics===!0&&(this.referenceState[o]={positions:{x:t[o].x,y:t[o].y}},i[o].x=this.previousStates[o].vx,i[o].y=this.previousStates[o].vy,t[o].x=this.previousStates[o].x,t[o].y=this.previousStates[o].y):delete this.previousStates[o]}}},{key:"_evaluateStepQuality",value:function(){var e,t,i,a=this.body.nodes,o=this.referenceState,s=.3;for(var u in this.referenceState)if(Object.prototype.hasOwnProperty.call(this.referenceState,u)&&a[u]!==void 0&&(e=a[u].x-o[u].positions.x,t=a[u].y-o[u].positions.y,i=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),i>s))return!1;return!0}},{key:"moveNodes",value:function(){for(var e=this.physicsBody.physicsNodeIndices,t=0,i=0,a=5,o=0;o<e.length;o++){var s=e[o],u=this._performStep(s);t=Math.max(t,u),i+=u}this.adaptiveTimestepEnabled=i/e.length<a,this.stabilized=t<this.options.minVelocity}},{key:"calculateComponentVelocity",value:function(e,t,i){var a=this.modelOptions.damping*e,o=(t-a)/i;e+=o*this.timestep;var s=this.options.maxVelocity||1e9;return Math.abs(e)>s&&(e=e>0?s:-s),e}},{key:"_performStep",value:function(e){var t=this.body.nodes[e],i=this.physicsBody.forces[e];this.options.wind&&(i.x+=this.options.wind.x,i.y+=this.options.wind.y);var a=this.physicsBody.velocities[e];this.previousStates[e]={x:t.x,y:t.y,vx:a.x,vy:a.y},t.options.fixed.x===!1?(a.x=this.calculateComponentVelocity(a.x,i.x,t.options.mass),t.x+=a.x*this.timestep):(i.x=0,a.x=0),t.options.fixed.y===!1?(a.y=this.calculateComponentVelocity(a.y,i.y,t.options.mass),t.y+=a.y*this.timestep):(i.y=0,a.y=0);var o=Math.sqrt(Math.pow(a.x,2)+Math.pow(a.y,2));return o}},{key:"_freezeNodes",value:function(){var e=this.body.nodes;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].x&&e[t].y){var i=e[t].options.fixed;this.freezeCache[t]={x:i.x,y:i.y},i.x=!0,i.y=!0}}},{key:"_restoreFrozenNodes",value:function(){var e=this.body.nodes;for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.freezeCache[t]!==void 0&&(e[t].options.fixed.x=this.freezeCache[t].x,e[t].options.fixed.y=this.freezeCache[t].y);this.freezeCache={}}},{key:"stabilize",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.stabilization.iterations;if(typeof t!="number"&&(t=this.options.stabilization.iterations,console.error("The stabilize method needs a numeric amount of iterations. Switching to default: ",t)),this.physicsBody.physicsNodeIndices.length===0){this.ready=!0;return}this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=t,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,Jt(function(){return e._stabilizationBatch()},0)}},{key:"_startStabilizing",value:function(){return this.startedStabilization===!0?!1:(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}},{key:"_stabilizationBatch",value:function(){var e=this,t=function(){return e.stabilized===!1&&e.stabilizationIterations<e.targetIterations},i=function(){e.body.emitter.emit("stabilizationProgress",{iterations:e.stabilizationIterations,total:e.targetIterations})};this._startStabilizing()&&i();for(var a=0;t()&&a<this.options.stabilization.updateInterval;)this.physicsTick(),a++;if(i(),t()){var o;Jt(A(o=this._stabilizationBatch).call(o,this),0)}else this._finalizeStabilization()}},{key:"_finalizeStabilization",value:function(){this.body.emitter.emit("_allowRedraw"),this.options.stabilization.fit===!0&&this.body.emitter.emit("fit"),this.options.stabilization.onlyDynamicEdges===!0&&this._restoreFrozenNodes(),this.body.emitter.emit("stabilizationIterationsDone"),this.body.emitter.emit("_requestRedraw"),this.stabilized===!0?this._emitStabilized():this.startSimulation(),this.ready=!0}},{key:"_drawForces",value:function(e){for(var t=0;t<this.physicsBody.physicsNodeIndices.length;t++){var i=this.physicsBody.physicsNodeIndices[t],a=this.body.nodes[i],o=this.physicsBody.forces[i],s=20,u=.03,l=Math.sqrt(Math.pow(o.x,2)+Math.pow(o.x,2)),h=Math.min(Math.max(5,l),15),d=3*h,f=Dd((180-Math.min(1,Math.max(0,u*l))*180)/360,1,1),c={x:a.x+s*o.x,y:a.y+s*o.y};e.lineWidth=h,e.strokeStyle=f,e.beginPath(),e.moveTo(a.x,a.y),e.lineTo(c.x,c.y),e.stroke();var v=Math.atan2(o.y,o.x);e.fillStyle=f,iE.draw(e,{type:"arrow",point:c,angle:v,length:d}),so(e).call(e)}}}]),r}(),Bo,Yre=new Uint8Array(16);function Xre(){if(!Bo&&(Bo=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Bo))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Bo(Yre)}var Qre=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function oE(r){return typeof r=="string"&&Qre.test(r)}var Ge=[];for(var Sh=0;Sh<256;++Sh)Ge.push((Sh+256).toString(16).substr(1));function sE(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=(Ge[r[n+0]]+Ge[r[n+1]]+Ge[r[n+2]]+Ge[r[n+3]]+"-"+Ge[r[n+4]]+Ge[r[n+5]]+"-"+Ge[r[n+6]]+Ge[r[n+7]]+"-"+Ge[r[n+8]]+Ge[r[n+9]]+"-"+Ge[r[n+10]]+Ge[r[n+11]]+Ge[r[n+12]]+Ge[r[n+13]]+Ge[r[n+14]]+Ge[r[n+15]]).toLowerCase();if(!oE(e))throw TypeError("Stringified UUID is invalid");return e}function Zre(r){if(!oE(r))throw TypeError("Invalid UUID");var n,e=new Uint8Array(16);return e[0]=(n=parseInt(r.slice(0,8),16))>>>24,e[1]=n>>>16&255,e[2]=n>>>8&255,e[3]=n&255,e[4]=(n=parseInt(r.slice(9,13),16))>>>8,e[5]=n&255,e[6]=(n=parseInt(r.slice(14,18),16))>>>8,e[7]=n&255,e[8]=(n=parseInt(r.slice(19,23),16))>>>8,e[9]=n&255,e[10]=(n=parseInt(r.slice(24,36),16))/1099511627776&255,e[11]=n/4294967296&255,e[12]=n>>>24&255,e[13]=n>>>16&255,e[14]=n>>>8&255,e[15]=n&255,e}function Jre(r){r=unescape(encodeURIComponent(r));for(var n=[],e=0;e<r.length;++e)n.push(r.charCodeAt(e));return n}var eie="6ba7b810-9dad-11d1-80b4-00c04fd430c8",tie="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function uE(r,n,e){function t(i,a,o,s){if(typeof i=="string"&&(i=Jre(i)),typeof a=="string"&&(a=Zre(a)),a.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var u=new Uint8Array(16+i.length);if(u.set(a),u.set(i,a.length),u=e(u),u[6]=u[6]&15|n,u[8]=u[8]&63|128,o){s=s||0;for(var l=0;l<16;++l)o[s+l]=u[l];return o}return sE(u)}try{t.name=r}catch{}return t.DNS=eie,t.URL=tie,t}function rie(r){if(typeof r=="string"){var n=unescape(encodeURIComponent(r));r=new Uint8Array(n.length);for(var e=0;e<n.length;++e)r[e]=n.charCodeAt(e)}return iie(nie(aie(r),r.length*8))}function iie(r){for(var n=[],e=r.length*32,t="0123456789abcdef",i=0;i<e;i+=8){var a=r[i>>5]>>>i%32&255,o=parseInt(t.charAt(a>>>4&15)+t.charAt(a&15),16);n.push(o)}return n}function lE(r){return(r+64>>>9<<4)+14+1}function nie(r,n){r[n>>5]|=128<<n%32,r[lE(n)-1]=n;for(var e=1732584193,t=-271733879,i=-1732584194,a=271733878,o=0;o<r.length;o+=16){var s=e,u=t,l=i,h=a;e=Xe(e,t,i,a,r[o],7,-680876936),a=Xe(a,e,t,i,r[o+1],12,-389564586),i=Xe(i,a,e,t,r[o+2],17,606105819),t=Xe(t,i,a,e,r[o+3],22,-1044525330),e=Xe(e,t,i,a,r[o+4],7,-176418897),a=Xe(a,e,t,i,r[o+5],12,1200080426),i=Xe(i,a,e,t,r[o+6],17,-1473231341),t=Xe(t,i,a,e,r[o+7],22,-45705983),e=Xe(e,t,i,a,r[o+8],7,1770035416),a=Xe(a,e,t,i,r[o+9],12,-1958414417),i=Xe(i,a,e,t,r[o+10],17,-42063),t=Xe(t,i,a,e,r[o+11],22,-1990404162),e=Xe(e,t,i,a,r[o+12],7,1804603682),a=Xe(a,e,t,i,r[o+13],12,-40341101),i=Xe(i,a,e,t,r[o+14],17,-1502002290),t=Xe(t,i,a,e,r[o+15],22,1236535329),e=Qe(e,t,i,a,r[o+1],5,-165796510),a=Qe(a,e,t,i,r[o+6],9,-1069501632),i=Qe(i,a,e,t,r[o+11],14,643717713),t=Qe(t,i,a,e,r[o],20,-373897302),e=Qe(e,t,i,a,r[o+5],5,-701558691),a=Qe(a,e,t,i,r[o+10],9,38016083),i=Qe(i,a,e,t,r[o+15],14,-660478335),t=Qe(t,i,a,e,r[o+4],20,-405537848),e=Qe(e,t,i,a,r[o+9],5,568446438),a=Qe(a,e,t,i,r[o+14],9,-1019803690),i=Qe(i,a,e,t,r[o+3],14,-187363961),t=Qe(t,i,a,e,r[o+8],20,1163531501),e=Qe(e,t,i,a,r[o+13],5,-1444681467),a=Qe(a,e,t,i,r[o+2],9,-51403784),i=Qe(i,a,e,t,r[o+7],14,1735328473),t=Qe(t,i,a,e,r[o+12],20,-1926607734),e=Ze(e,t,i,a,r[o+5],4,-378558),a=Ze(a,e,t,i,r[o+8],11,-2022574463),i=Ze(i,a,e,t,r[o+11],16,1839030562),t=Ze(t,i,a,e,r[o+14],23,-35309556),e=Ze(e,t,i,a,r[o+1],4,-1530992060),a=Ze(a,e,t,i,r[o+4],11,1272893353),i=Ze(i,a,e,t,r[o+7],16,-155497632),t=Ze(t,i,a,e,r[o+10],23,-1094730640),e=Ze(e,t,i,a,r[o+13],4,681279174),a=Ze(a,e,t,i,r[o],11,-358537222),i=Ze(i,a,e,t,r[o+3],16,-722521979),t=Ze(t,i,a,e,r[o+6],23,76029189),e=Ze(e,t,i,a,r[o+9],4,-640364487),a=Ze(a,e,t,i,r[o+12],11,-421815835),i=Ze(i,a,e,t,r[o+15],16,530742520),t=Ze(t,i,a,e,r[o+2],23,-995338651),e=Je(e,t,i,a,r[o],6,-198630844),a=Je(a,e,t,i,r[o+7],10,1126891415),i=Je(i,a,e,t,r[o+14],15,-1416354905),t=Je(t,i,a,e,r[o+5],21,-57434055),e=Je(e,t,i,a,r[o+12],6,1700485571),a=Je(a,e,t,i,r[o+3],10,-1894986606),i=Je(i,a,e,t,r[o+10],15,-1051523),t=Je(t,i,a,e,r[o+1],21,-2054922799),e=Je(e,t,i,a,r[o+8],6,1873313359),a=Je(a,e,t,i,r[o+15],10,-30611744),i=Je(i,a,e,t,r[o+6],15,-1560198380),t=Je(t,i,a,e,r[o+13],21,1309151649),e=Je(e,t,i,a,r[o+4],6,-145523070),a=Je(a,e,t,i,r[o+11],10,-1120210379),i=Je(i,a,e,t,r[o+2],15,718787259),t=Je(t,i,a,e,r[o+9],21,-343485551),e=Fr(e,s),t=Fr(t,u),i=Fr(i,l),a=Fr(a,h)}return[e,t,i,a]}function aie(r){if(r.length===0)return[];for(var n=r.length*8,e=new Uint32Array(lE(n)),t=0;t<n;t+=8)e[t>>5]|=(r[t/8]&255)<<t%32;return e}function Fr(r,n){var e=(r&65535)+(n&65535),t=(r>>16)+(n>>16)+(e>>16);return t<<16|e&65535}function oie(r,n){return r<<n|r>>>32-n}function Mu(r,n,e,t,i,a){return Fr(oie(Fr(Fr(n,r),Fr(t,a)),i),e)}function Xe(r,n,e,t,i,a,o){return Mu(n&e|~n&t,r,n,i,a,o)}function Qe(r,n,e,t,i,a,o){return Mu(n&t|e&~t,r,n,i,a,o)}function Ze(r,n,e,t,i,a,o){return Mu(n^e^t,r,n,i,a,o)}function Je(r,n,e,t,i,a,o){return Mu(e^(n|~t),r,n,i,a,o)}uE("v3",48,rie);function Zn(r,n,e){r=r||{};var t=r.random||(r.rng||Xre)();if(t[6]=t[6]&15|64,t[8]=t[8]&63|128,n){e=e||0;for(var i=0;i<16;++i)n[e+i]=t[i];return n}return sE(t)}function sie(r,n,e,t){switch(r){case 0:return n&e^~n&t;case 1:return n^e^t;case 2:return n&e^n&t^e&t;case 3:return n^e^t}}function Oh(r,n){return r<<n|r>>>32-n}function uie(r){var n=[1518500249,1859775393,2400959708,3395469782],e=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof r=="string"){var t=unescape(encodeURIComponent(r));r=[];for(var i=0;i<t.length;++i)r.push(t.charCodeAt(i))}else Array.isArray(r)||(r=Array.prototype.slice.call(r));r.push(128);for(var a=r.length/4+2,o=Math.ceil(a/16),s=new Array(o),u=0;u<o;++u){for(var l=new Uint32Array(16),h=0;h<16;++h)l[h]=r[u*64+h*4]<<24|r[u*64+h*4+1]<<16|r[u*64+h*4+2]<<8|r[u*64+h*4+3];s[u]=l}s[o-1][14]=(r.length-1)*8/Math.pow(2,32),s[o-1][14]=Math.floor(s[o-1][14]),s[o-1][15]=(r.length-1)*8&4294967295;for(var d=0;d<o;++d){for(var f=new Uint32Array(80),c=0;c<16;++c)f[c]=s[d][c];for(var v=16;v<80;++v)f[v]=Oh(f[v-3]^f[v-8]^f[v-14]^f[v-16],1);for(var g=e[0],b=e[1],p=e[2],$=e[3],y=e[4],m=0;m<80;++m){var _=Math.floor(m/20),O=Oh(g,5)+sie(_,b,p,$)+y+n[_]+f[m]>>>0;y=$,$=p,p=Oh(b,30)>>>0,b=g,g=O}e[0]=e[0]+g>>>0,e[1]=e[1]+b>>>0,e[2]=e[2]+p>>>0,e[3]=e[3]+$>>>0,e[4]=e[4]+y>>>0}return[e[0]>>24&255,e[0]>>16&255,e[0]>>8&255,e[0]&255,e[1]>>24&255,e[1]>>16&255,e[1]>>8&255,e[1]&255,e[2]>>24&255,e[2]>>16&255,e[2]>>8&255,e[2]&255,e[3]>>24&255,e[3]>>16&255,e[3]>>8&255,e[3]&255,e[4]>>24&255,e[4]>>16&255,e[4]>>8&255,e[4]&255]}uE("v5",80,uie);var nt=function(){function r(){D(this,r)}return R(r,null,[{key:"getRange",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=1e9,a=-1e9,o=1e9,s=-1e9,u;if(t.length>0)for(var l=0;l<t.length;l++)u=e[t[l]],o>u.shape.boundingBox.left&&(o=u.shape.boundingBox.left),s<u.shape.boundingBox.right&&(s=u.shape.boundingBox.right),i>u.shape.boundingBox.top&&(i=u.shape.boundingBox.top),a<u.shape.boundingBox.bottom&&(a=u.shape.boundingBox.bottom);return o===1e9&&s===-1e9&&i===1e9&&a===-1e9&&(i=0,a=0,o=0,s=0),{minX:o,maxX:s,minY:i,maxY:a}}},{key:"getRangeCore",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=1e9,a=-1e9,o=1e9,s=-1e9,u;if(t.length>0)for(var l=0;l<t.length;l++)u=e[t[l]],o>u.x&&(o=u.x),s<u.x&&(s=u.x),i>u.y&&(i=u.y),a<u.y&&(a=u.y);return o===1e9&&s===-1e9&&i===1e9&&a===-1e9&&(i=0,a=0,o=0,s=0),{minX:o,maxX:s,minY:i,maxY:a}}},{key:"findCenter",value:function(e){return{x:.5*(e.maxX+e.minX),y:.5*(e.maxY+e.minY)}}},{key:"cloneOptions",value:function(e,t){var i={};return t===void 0||t==="node"?(me(i,e.options,!0),i.x=e.x,i.y=e.y,i.amountOfConnections=e.edges.length):me(i,e.options,!0),i}}]),r}();function lie(r){var n=hie();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function hie(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var die=function(r){ue(e,r);var n=lie(e);function e(t,i,a,o,s,u){var l;return D(this,e),l=n.call(this,t,i,a,o,s,u),l.isCluster=!0,l.containedNodes={},l.containedEdges={},l}return R(e,[{key:"_openChildCluster",value:function(i){var a=this,o=this.body.nodes[i];if(this.containedNodes[i]===void 0)throw new Error("node with id: "+i+" not in current cluster");if(!o.isCluster)throw new Error("node with id: "+i+" is not a cluster");delete this.containedNodes[i],te(o.edges,function(s){delete a.containedEdges[s.id]}),te(o.containedNodes,function(s,u){a.containedNodes[u]=s}),o.containedNodes={},te(o.containedEdges,function(s,u){a.containedEdges[u]=s}),o.containedEdges={},te(o.edges,function(s){te(a.edges,function(u){var l,h,d=oe(l=u.clusteringEdgeReplacingIds).call(l,s.id);d!==-1&&(te(s.clusteringEdgeReplacingIds,function(f){u.clusteringEdgeReplacingIds.push(f),a.body.edges[f].edgeReplacedById=u.id}),dr(h=u.clusteringEdgeReplacingIds).call(h,d,1))})}),o.edges=[]}}]),e}(bt),fie=function(){function r(n){var e=this;D(this,r),this.body=n,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},Ae(this.options,this.defaultOptions),this.body.emitter.on("_resetData",function(){e.clusteredNodes={},e.clusteredEdges={}})}return R(r,[{key:"clusterByHubsize",value:function(e,t){e===void 0?e=this._getHubSize():ve(e)==="object"&&(t=this._checkOptions(e),e=this._getHubSize());for(var i=[],a=0;a<this.body.nodeIndices.length;a++){var o=this.body.nodes[this.body.nodeIndices[a]];o.edges.length>=e&&i.push(o.id)}for(var s=0;s<i.length;s++)this.clusterByConnection(i[s],t,!0);this.body.emitter.emit("_dataChanged")}},{key:"cluster",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(t.joinCondition===void 0)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");t=this._checkOptions(t);var a={},o={};te(this.body.nodes,function(s,u){s.options&&t.joinCondition(s.options)===!0&&(a[u]=s,te(s.edges,function(l){e.clusteredEdges[l.id]===void 0&&(o[l.id]=l)}))}),this._cluster(a,o,t,i)}},{key:"clusterByEdgeCount",value:function(e,t){var i=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;t=this._checkOptions(t);for(var o=[],s={},u,l,h,d=function(g){var b={},p={},$=i.body.nodeIndices[g],y=i.body.nodes[$];if(s[$]===void 0){h=0,l=[];for(var m=0;m<y.edges.length;m++)u=y.edges[m],i.clusteredEdges[u.id]===void 0&&(u.toId!==u.fromId&&h++,l.push(u));if(h===e){for(var _=function(q){if(t.joinCondition===void 0||t.joinCondition===null)return!0;var Q=nt.cloneOptions(q);return t.joinCondition(Q)},O=!0,k=0;k<l.length;k++){u=l[k];var S=i._getConnectedId(u,$);if(_(y))p[u.id]=u,b[$]=y,b[S]=i.body.nodes[S],s[$]=!0;else{O=!1;break}}if(_e(b).length>0&&_e(p).length>0&&O===!0){var w=function(){for(var q=0;q<o.length;++q)for(var Q in b)if(o[q].nodes[Q]!==void 0)return o[q]},E=w();if(E!==void 0){for(var F in b)E.nodes[F]===void 0&&(E.nodes[F]=b[F]);for(var H in p)E.edges[H]===void 0&&(E.edges[H]=p[H])}else o.push({nodes:b,edges:p})}}}},f=0;f<this.body.nodeIndices.length;f++)d(f);for(var c=0;c<o.length;c++)this._cluster(o[c].nodes,o[c].edges,t,!1);a===!0&&this.body.emitter.emit("_dataChanged")}},{key:"clusterOutliers",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(1,e,t)}},{key:"clusterBridges",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(2,e,t)}},{key:"clusterByConnection",value:function(e,t){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No nodeId supplied to clusterByConnection!");if(this.body.nodes[e]===void 0)throw new Error("The nodeId given to clusterByConnection does not exist!");var o=this.body.nodes[e];t=this._checkOptions(t,o),t.clusterNodeProperties.x===void 0&&(t.clusterNodeProperties.x=o.x),t.clusterNodeProperties.y===void 0&&(t.clusterNodeProperties.y=o.y),t.clusterNodeProperties.fixed===void 0&&(t.clusterNodeProperties.fixed={},t.clusterNodeProperties.fixed.x=o.options.fixed.x,t.clusterNodeProperties.fixed.y=o.options.fixed.y);var s={},u={},l=o.id,h=nt.cloneOptions(o);s[l]=o;for(var d=0;d<o.edges.length;d++){var f=o.edges[d];if(this.clusteredEdges[f.id]===void 0){var c=this._getConnectedId(f,l);if(this.clusteredNodes[c]===void 0)if(c!==l)if(t.joinCondition===void 0)u[f.id]=f,s[c]=this.body.nodes[c];else{var v=nt.cloneOptions(this.body.nodes[c]);t.joinCondition(h,v)===!0&&(u[f.id]=f,s[c]=this.body.nodes[c])}else u[f.id]=f}}var g=sn(i=_e(s)).call(i,function(m){return s[m].id});for(var b in s)if(Object.prototype.hasOwnProperty.call(s,b))for(var p=s[b],$=0;$<p.edges.length;$++){var y=p.edges[$];oe(g).call(g,this._getConnectedId(y,p.id))>-1&&(u[y.id]=y)}this._cluster(s,u,t,a)}},{key:"_createClusterEdges",value:function(e,t,i,a){for(var o,s,u,l,h,d,f=_e(e),c=[],v=0;v<f.length;v++){s=f[v],u=e[s];for(var g=0;g<u.edges.length;g++)o=u.edges[g],this.clusteredEdges[o.id]===void 0&&(o.toId==o.fromId?t[o.id]=o:o.toId==s?(l=i.id,h=o.fromId,d=h):(l=o.toId,h=i.id,d=l),e[d]===void 0&&c.push({edge:o,fromId:h,toId:l}))}for(var b=[],p=function(k){for(var S=0;S<b.length;S++){var w=b[S],E=k.fromId===w.fromId&&k.toId===w.toId,F=k.fromId===w.toId&&k.toId===w.fromId;if(E||F)return w}return null},$=0;$<c.length;$++){var y=c[$],m=y.edge,_=p(y);_===null?(_=this._createClusteredEdge(y.fromId,y.toId,m,a),b.push(_)):_.clusteringEdgeReplacingIds.push(m.id),this.body.edges[m.id].edgeReplacedById=_.id,this._backupEdgeOptions(m),m.setOptions({physics:!1})}}},{key:"_checkOptions",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e.clusterEdgeProperties===void 0&&(e.clusterEdgeProperties={}),e.clusterNodeProperties===void 0&&(e.clusterNodeProperties={}),e}},{key:"_cluster",value:function(e,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,o=[];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&this.clusteredNodes[s]!==void 0&&o.push(s);for(var u=0;u<o.length;++u)delete e[o[u]];if(_e(e).length!=0&&!(_e(e).length==1&&i.clusterNodeProperties.allowSingleNodeCluster!=!0)){var l=me({},i.clusterNodeProperties);if(i.processProperties!==void 0){var h=[];for(var d in e)if(Object.prototype.hasOwnProperty.call(e,d)){var f=nt.cloneOptions(e[d]);h.push(f)}var c=[];for(var v in t)if(Object.prototype.hasOwnProperty.call(t,v)&&v.substr(0,12)!=="clusterEdge:"){var g=nt.cloneOptions(t[v],"edge");c.push(g)}if(l=i.processProperties(l,h,c),!l)throw new Error("The processProperties function does not return properties!")}l.id===void 0&&(l.id="cluster:"+Zn());var b=l.id;l.label===void 0&&(l.label="cluster");var p=void 0;l.x===void 0&&(p=this._getClusterPosition(e),l.x=p.x),l.y===void 0&&(p===void 0&&(p=this._getClusterPosition(e)),l.y=p.y),l.id=b;var $=this.body.functions.createNode(l,die);$.containedNodes=e,$.containedEdges=t,$.clusterEdgeProperties=i.clusterEdgeProperties,this.body.nodes[l.id]=$,this._clusterEdges(e,t,l,i.clusterEdgeProperties),l.id=void 0,a===!0&&this.body.emitter.emit("_dataChanged")}}},{key:"_backupEdgeOptions",value:function(e){this.clusteredEdges[e.id]===void 0&&(this.clusteredEdges[e.id]={physics:e.options.physics})}},{key:"_restoreEdge",value:function(e){var t=this.clusteredEdges[e.id];t!==void 0&&(e.setOptions({physics:t.physics}),delete this.clusteredEdges[e.id])}},{key:"isCluster",value:function(e){return this.body.nodes[e]!==void 0?this.body.nodes[e].isCluster===!0:(console.error("Node does not exist."),!1)}},{key:"_getClusterPosition",value:function(e){for(var t=_e(e),i=e[t[0]].x,a=e[t[0]].x,o=e[t[0]].y,s=e[t[0]].y,u,l=1;l<t.length;l++)u=e[t[l]],i=u.x<i?u.x:i,a=u.x>a?u.x:a,o=u.y<o?u.y:o,s=u.y>s?u.y:s;return{x:.5*(i+a),y:.5*(o+s)}}},{key:"openCluster",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No clusterNodeId supplied to openCluster.");var a=this.body.nodes[e];if(a===void 0)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(a.isCluster!==!0||a.containedNodes===void 0||a.containedEdges===void 0)throw new Error("The node:"+e+" is not a valid cluster.");var o=this.findNode(e),s=oe(o).call(o,e)-1;if(s>=0){var u=o[s],l=this.body.nodes[u];l._openChildCluster(e),delete this.body.nodes[e],i===!0&&this.body.emitter.emit("_dataChanged");return}var h=a.containedNodes,d=a.containedEdges;if(t!==void 0&&t.releaseFunction!==void 0&&typeof t.releaseFunction=="function"){var f={},c={x:a.x,y:a.y};for(var v in h)if(Object.prototype.hasOwnProperty.call(h,v)){var g=this.body.nodes[v];f[v]={x:g.x,y:g.y}}var b=t.releaseFunction(c,f);for(var p in h)if(Object.prototype.hasOwnProperty.call(h,p)){var $=this.body.nodes[p];b[p]!==void 0&&($.x=b[p].x===void 0?a.x:b[p].x,$.y=b[p].y===void 0?a.y:b[p].y)}}else te(h,function(C){C.options.fixed.x===!1&&(C.x=a.x),C.options.fixed.y===!1&&(C.y=a.y)});for(var y in h)if(Object.prototype.hasOwnProperty.call(h,y)){var m=this.body.nodes[y];m.vx=a.vx,m.vy=a.vy,m.setOptions({physics:!0}),delete this.clusteredNodes[y]}for(var _=[],O=0;O<a.edges.length;O++)_.push(a.edges[O]);for(var k=0;k<_.length;k++){for(var S=_[k],w=this._getConnectedId(S,e),E=this.clusteredNodes[w],F=0;F<S.clusteringEdgeReplacingIds.length;F++){var H=S.clusteringEdgeReplacingIds[F],z=this.body.edges[H];if(z!==void 0)if(E!==void 0){var q=this.body.nodes[E.clusterId];q.containedEdges[z.id]=z,delete d[z.id];var Q=z.fromId,re=z.toId;z.toId==w?re=E.clusterId:Q=E.clusterId,this._createClusteredEdge(Q,re,z,q.clusterEdgeProperties,{hidden:!1,physics:!0})}else this._restoreEdge(z)}S.remove()}for(var ae in d)Object.prototype.hasOwnProperty.call(d,ae)&&this._restoreEdge(d[ae]);delete this.body.nodes[e],i===!0&&this.body.emitter.emit("_dataChanged")}},{key:"getNodesInCluster",value:function(e){var t=[];if(this.isCluster(e)===!0){var i=this.body.nodes[e].containedNodes;for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&t.push(this.body.nodes[a].id)}return t}},{key:"findNode",value:function(e){for(var t=[],i=100,a=0,o;this.clusteredNodes[e]!==void 0&&a<i;){if(o=this.body.nodes[e],o===void 0)return[];t.push(o.id),e=this.clusteredNodes[e].clusterId,a++}return o=this.body.nodes[e],o===void 0?[]:(t.push(o.id),li(t).call(t),t)}},{key:"updateClusteredNode",value:function(e,t){if(e===void 0)throw new Error("No clusteredNodeId supplied to updateClusteredNode.");if(t===void 0)throw new Error("No newOptions supplied to updateClusteredNode.");if(this.body.nodes[e]===void 0)throw new Error("The clusteredNodeId supplied to updateClusteredNode does not exist.");this.body.nodes[e].setOptions(t),this.body.emitter.emit("_dataChanged")}},{key:"updateEdge",value:function(e,t){if(e===void 0)throw new Error("No startEdgeId supplied to updateEdge.");if(t===void 0)throw new Error("No newOptions supplied to updateEdge.");if(this.body.edges[e]===void 0)throw new Error("The startEdgeId supplied to updateEdge does not exist.");for(var i=this.getClusteredEdges(e),a=0;a<i.length;a++){var o=this.body.edges[i[a]];o.setOptions(t)}this.body.emitter.emit("_dataChanged")}},{key:"getClusteredEdges",value:function(e){for(var t=[],i=100,a=0;e!==void 0&&this.body.edges[e]!==void 0&&a<i;)t.push(this.body.edges[e].id),e=this.body.edges[e].edgeReplacedById,a++;return li(t).call(t),t}},{key:"getBaseEdge",value:function(e){return this.getBaseEdges(e)[0]}},{key:"getBaseEdges",value:function(e){for(var t=[e],i=[],a=[],o=100,s=0;t.length>0&&s<o;){var u=t.pop();if(u!==void 0){var l=this.body.edges[u];if(l!==void 0){s++;var h=l.clusteringEdgeReplacingIds;if(h===void 0)a.push(u);else for(var d=0;d<h.length;++d){var f=h[d];oe(t).call(t,h)!==-1||oe(i).call(i,h)!==-1||t.push(f)}i.push(u)}}}return a}},{key:"_getConnectedId",value:function(e,t){return e.toId!=t?e.toId:(e.fromId!=t,e.fromId)}},{key:"_getHubSize",value:function(){for(var e=0,t=0,i=0,a=0,o=0;o<this.body.nodeIndices.length;o++){var s=this.body.nodes[this.body.nodeIndices[o]];s.edges.length>a&&(a=s.edges.length),e+=s.edges.length,t+=Math.pow(s.edges.length,2),i+=1}e=e/i,t=t/i;var u=t-Math.pow(e,2),l=Math.sqrt(u),h=Math.floor(e+2*l);return h>a&&(h=a),h}},{key:"_createClusteredEdge",value:function(e,t,i,a,o){var s=nt.cloneOptions(i,"edge");me(s,a),s.from=e,s.to=t,s.id="clusterEdge:"+Zn(),o!==void 0&&me(s,o);var u=this.body.functions.createEdge(s);return u.clusteringEdgeReplacingIds=[i.id],u.connect(),this.body.edges[u.id]=u,u}},{key:"_clusterEdges",value:function(e,t,i,a){if(t instanceof en){var o=t,s={};s[o.id]=o,t=s}if(e instanceof bt){var u=e,l={};l[u.id]=u,e=l}if(i==null)throw new Error("_clusterEdges: parameter clusterNode required");a===void 0&&(a=i.clusterEdgeProperties),this._createClusterEdges(e,t,i,a);for(var h in t)if(Object.prototype.hasOwnProperty.call(t,h)&&this.body.edges[h]!==void 0){var d=this.body.edges[h];this._backupEdgeOptions(d),d.setOptions({physics:!1})}for(var f in e)Object.prototype.hasOwnProperty.call(e,f)&&(this.clusteredNodes[f]={clusterId:i.id,node:this.body.nodes[f]},this.body.nodes[f].setOptions({physics:!1}))}},{key:"_getClusterNodeForNode",value:function(e){if(e!==void 0){var t=this.clusteredNodes[e];if(t!==void 0){var i=t.clusterId;if(i!==void 0)return this.body.nodes[i]}}}},{key:"_filter",value:function(e,t){var i=[];return te(e,function(a){t(a)&&i.push(a)}),i}},{key:"_updateState",value:function(){var e=this,t,i=[],a={},o=function(v){te(e.body.nodes,function(g){g.isCluster===!0&&v(g)})};for(t in this.clusteredNodes)if(Object.prototype.hasOwnProperty.call(this.clusteredNodes,t)){var s=this.body.nodes[t];s===void 0&&i.push(t)}o(function(c){for(var v=0;v<i.length;v++)delete c.containedNodes[i[v]]});for(var u=0;u<i.length;u++)delete this.clusteredNodes[i[u]];te(this.clusteredEdges,function(c){var v=e.body.edges[c];(v===void 0||!v.endPointsValid())&&(a[c]=c)}),o(function(c){te(c.containedEdges,function(v,g){!v.endPointsValid()&&!a[g]&&(a[g]=g)})}),te(this.body.edges,function(c,v){var g=!0,b=c.clusteringEdgeReplacingIds;if(b!==void 0){var p=0;te(b,function($){var y=e.body.edges[$];y!==void 0&&y.endPointsValid()&&(p+=1)}),g=p>0}(!c.endPointsValid()||!g)&&(a[v]=v)}),o(function(c){te(a,function(v){delete c.containedEdges[v],te(c.edges,function(g,b){if(g.id===v){c.edges[b]=null;return}g.clusteringEdgeReplacingIds=e._filter(g.clusteringEdgeReplacingIds,function(p){return!a[p]})}),c.edges=e._filter(c.edges,function(g){return g!==null})})}),te(a,function(c){delete e.clusteredEdges[c]}),te(a,function(c){delete e.body.edges[c]});var l=_e(this.body.edges);te(l,function(c){var v=e.body.edges[c],g=e._isClusteredNode(v.fromId)||e._isClusteredNode(v.toId);if(g!==e._isClusteredEdge(v.id))if(g){var b=e._getClusterNodeForNode(v.fromId);b!==void 0&&e._clusterEdges(e.body.nodes[v.fromId],v,b);var p=e._getClusterNodeForNode(v.toId);p!==void 0&&e._clusterEdges(e.body.nodes[v.toId],v,p)}else delete e._clusterEdges[c],e._restoreEdge(v)});for(var h=!1,d=!0,f=function(){var v=[];o(function(b){var p=_e(b.containedNodes).length,$=b.options.allowSingleNodeCluster===!0;($&&p<1||!$&&p<2)&&v.push(b.id)});for(var g=0;g<v.length;++g)e.openCluster(v[g],{},!1);d=v.length>0,h=h||d};d;)f();h&&this._updateState()}},{key:"_isClusteredNode",value:function(e){return this.clusteredNodes[e]!==void 0}},{key:"_isClusteredEdge",value:function(e){return this.clusteredEdges[e]!==void 0}}]),r}();function cie(r,n){var e=typeof _r<"u"&&rr(r)||r["@@iterator"];if(!e){if(le(r)||(e=vie(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
95
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function vie(r,n){var e;if(r){if(typeof r=="string")return _m(r,n);var t=Le(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Ur(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return _m(r,n)}}function _m(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}function pie(){var r;window!==void 0&&(r=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),r===void 0?window.requestAnimationFrame=function(n){n()}:window.requestAnimationFrame=r}var gie=function(){function r(n,e){D(this,r),pie(),this.body=n,this.canvas=e,this.redrawRequested=!1,this.renderTimer=void 0,this.requiresTimeout=!0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.zooming=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1},Ae(this.options,this.defaultOptions),this._determineBrowserMethod(),this.bindEventListeners()}return R(r,[{key:"bindEventListeners",value:function(){var e=this,t;this.body.emitter.on("dragStart",function(){e.dragging=!0}),this.body.emitter.on("dragEnd",function(){e.dragging=!1}),this.body.emitter.on("zoom",function(){e.zooming=!0,window.clearTimeout(e.zoomTimeoutId),e.zoomTimeoutId=Jt(function(){var i;e.zooming=!1,A(i=e._requestRedraw).call(i,e)()},250)}),this.body.emitter.on("_resizeNodes",function(){e._resizeNodes()}),this.body.emitter.on("_redraw",function(){e.renderingActive===!1&&e._redraw()}),this.body.emitter.on("_blockRedraw",function(){e.allowRedraw=!1}),this.body.emitter.on("_allowRedraw",function(){e.allowRedraw=!0,e.redrawRequested=!1}),this.body.emitter.on("_requestRedraw",A(t=this._requestRedraw).call(t,this)),this.body.emitter.on("_startRendering",function(){e.renderRequests+=1,e.renderingActive=!0,e._startRendering()}),this.body.emitter.on("_stopRendering",function(){e.renderRequests-=1,e.renderingActive=e.renderRequests>0,e.renderTimer=void 0}),this.body.emitter.on("destroy",function(){e.renderRequests=0,e.allowRedraw=!1,e.renderingActive=!1,e.requiresTimeout===!0?clearTimeout(e.renderTimer):window.cancelAnimationFrame(e.renderTimer),e.body.emitter.off()})}},{key:"setOptions",value:function(e){if(e!==void 0){var t=["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"];An(t,this.options,e)}}},{key:"_requestNextFrame",value:function(e,t){if(!(typeof window>"u")){var i,a=window;return this.requiresTimeout===!0?i=Jt(e,t):a.requestAnimationFrame&&(i=a.requestAnimationFrame(e)),i}}},{key:"_startRendering",value:function(){if(this.renderingActive===!0&&this.renderTimer===void 0){var e;this.renderTimer=this._requestNextFrame(A(e=this._renderStep).call(e,this),this.simulationInterval)}}},{key:"_renderStep",value:function(){this.renderingActive===!0&&(this.renderTimer=void 0,this.requiresTimeout===!0&&this._startRendering(),this._redraw(),this.requiresTimeout===!1&&this._startRendering())}},{key:"redraw",value:function(){this.body.emitter.emit("setSize"),this._redraw()}},{key:"_requestRedraw",value:function(){var e=this;this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,this._requestNextFrame(function(){e._redraw(!1)},0))}},{key:"_redraw",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.allowRedraw===!0){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;var t={drawExternalLabels:null};(this.canvas.frame.canvas.width===0||this.canvas.frame.canvas.height===0)&&this.canvas.setSize(),this.canvas.setTransform();var i=this.canvas.getContext(),a=this.canvas.frame.canvas.clientWidth,o=this.canvas.frame.canvas.clientHeight;if(i.clearRect(0,0,a,o),this.canvas.frame.clientWidth===0)return;if(i.save(),i.translate(this.body.view.translation.x,this.body.view.translation.y),i.scale(this.body.view.scale,this.body.view.scale),i.beginPath(),this.body.emitter.emit("beforeDrawing",i),i.closePath(),e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawEdges(i),this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1){var s=this._drawNodes(i,e),u=s.drawExternalLabels;t.drawExternalLabels=u}e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawArrows(i),t.drawExternalLabels!=null&&t.drawExternalLabels(),e===!1&&this._drawSelectionBox(i),i.beginPath(),this.body.emitter.emit("afterDrawing",i),i.closePath(),i.restore(),e===!0&&i.clearRect(0,0,a,o)}}},{key:"_resizeNodes",value:function(){this.canvas.setTransform();var e=this.canvas.getContext();e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale);var t=this.body.nodes,i;for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(i=t[a],i.resize(e),i.updateBoundingBox(e,i.selected));e.restore()}},{key:"_drawNodes",value:function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=this.body.nodes,a=this.body.nodeIndices,o,s=[],u=[],l=20,h=this.canvas.DOMtoCanvas({x:-l,y:-l}),d=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+l,y:this.canvas.frame.canvas.clientHeight+l}),f={top:h.y,left:h.x,bottom:d.y,right:d.x},c=[],v=0;v<a.length;v++)if(o=i[a[v]],o.hover)u.push(a[v]);else if(o.isSelected())s.push(a[v]);else if(t===!0){var g=o.draw(e);g.drawExternalLabel!=null&&c.push(g.drawExternalLabel)}else if(o.isBoundingBoxOverlappingWith(f)===!0){var b=o.draw(e);b.drawExternalLabel!=null&&c.push(b.drawExternalLabel)}else o.updateBoundingBox(e,o.selected);var p,$=s.length,y=u.length;for(p=0;p<$;p++){o=i[s[p]];var m=o.draw(e);m.drawExternalLabel!=null&&c.push(m.drawExternalLabel)}for(p=0;p<y;p++){o=i[u[p]];var _=o.draw(e);_.drawExternalLabel!=null&&c.push(_.drawExternalLabel)}return{drawExternalLabels:function(){var k=cie(c),S;try{for(k.s();!(S=k.n()).done;){var w=S.value;w()}}catch(E){k.e(E)}finally{k.f()}}}}},{key:"_drawEdges",value:function(e){for(var t=this.body.edges,i=this.body.edgeIndices,a=0;a<i.length;a++){var o=t[i[a]];o.connected===!0&&o.draw(e)}}},{key:"_drawArrows",value:function(e){for(var t=this.body.edges,i=this.body.edgeIndices,a=0;a<i.length;a++){var o=t[i[a]];o.connected===!0&&o.drawArrows(e)}}},{key:"_determineBrowserMethod",value:function(){if(typeof window<"u"){var e=navigator.userAgent.toLowerCase();this.requiresTimeout=!1,oe(e).call(e,"msie 9.0")!=-1?this.requiresTimeout=!0:oe(e).call(e,"safari")!=-1&&oe(e).call(e,"chrome")<=-1&&(this.requiresTimeout=!0)}else this.requiresTimeout=!0}},{key:"_drawSelectionBox",value:function(e){if(this.body.selectionBox.show){e.beginPath();var t=this.body.selectionBox.position.end.x-this.body.selectionBox.position.start.x,i=this.body.selectionBox.position.end.y-this.body.selectionBox.position.start.y;e.rect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,t,i),e.fillStyle="rgba(151, 194, 252, 0.2)",e.fillRect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,t,i),e.strokeStyle="rgba(151, 194, 252, 1)",e.stroke()}else e.closePath()}}]),r}(),hE={exports:{}},yie=ie,mie=yie.setInterval;(function(r){r.exports=mie})(hE);var bie=U(hE.exports);function xs(r,n){n.inputHandler=function(e){e.isFirst&&n(e)},r.on("hammer.input",n.inputHandler)}function dE(r,n){return n.inputHandler=function(e){e.isFinal&&n(e)},r.on("hammer.input",n.inputHandler)}var $ie=function(){function r(n){D(this,r),this.body=n,this.pixelRatio=1,this.cameraState={},this.initialized=!1,this.canvasViewCenter={},this._cleanupCallbacks=[],this.options={},this.defaultOptions={autoResize:!0,height:"100%",width:"100%"},Ae(this.options,this.defaultOptions),this.bindEventListeners()}return R(r,[{key:"bindEventListeners",value:function(){var e=this,t;this.body.emitter.once("resize",function(i){i.width!==0&&(e.body.view.translation.x=i.width*.5),i.height!==0&&(e.body.view.translation.y=i.height*.5)}),this.body.emitter.on("setSize",A(t=this.setSize).call(t,this)),this.body.emitter.on("destroy",function(){e.hammerFrame.destroy(),e.hammer.destroy(),e._cleanUp()})}},{key:"setOptions",value:function(e){var t=this;if(e!==void 0){var i=["width","height","autoResize"];An(i,this.options,e)}if(this._cleanUp(),this.options.autoResize===!0){var a;if(window.ResizeObserver){var o=new ResizeObserver(function(){var h=t.setSize();h===!0&&t.body.emitter.emit("_requestRedraw")}),s=this.frame;o.observe(s),this._cleanupCallbacks.push(function(){o.unobserve(s)})}else{var u=bie(function(){var h=t.setSize();h===!0&&t.body.emitter.emit("_requestRedraw")},1e3);this._cleanupCallbacks.push(function(){clearInterval(u)})}var l=A(a=this._onResize).call(a,this);BX(window,"resize",l),this._cleanupCallbacks.push(function(){LX(window,"resize",l)})}}},{key:"_cleanUp",value:function(){var e,t,i;pe(e=li(t=dr(i=this._cleanupCallbacks).call(i,0)).call(t)).call(e,function(a){try{a()}catch(o){console.error(o)}})}},{key:"_onResize",value:function(){this.setSize(),this.body.emitter.emit("_redraw")}},{key:"_getCameraState",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.pixelRatio;this.initialized===!0&&(this.cameraState.previousWidth=this.frame.canvas.width/e,this.cameraState.previousHeight=this.frame.canvas.height/e,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/e,y:.5*this.frame.canvas.height/e}))}},{key:"_setCameraState",value:function(){if(this.cameraState.scale!==void 0&&this.frame.canvas.clientWidth!==0&&this.frame.canvas.clientHeight!==0&&this.pixelRatio!==0&&this.cameraState.previousWidth>0&&this.cameraState.previousHeight>0){var e=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,t=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,i=this.cameraState.scale;e!=1&&t!=1?i=this.cameraState.scale*.5*(e+t):e!=1?i=this.cameraState.scale*e:t!=1&&(i=this.cameraState.scale*t),this.body.view.scale=i;var a=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),o={x:a.x-this.cameraState.position.x,y:a.y-this.cameraState.position.y};this.body.view.translation.x+=o.x*this.body.view.scale,this.body.view.translation.y+=o.y*this.body.view.scale}}},{key:"_prepareValue",value:function(e){if(typeof e=="number")return e+"px";if(typeof e=="string"){if(oe(e).call(e,"%")!==-1||oe(e).call(e,"px")!==-1)return e;if(oe(e).call(e,"%")===-1)return e+"px"}throw new Error("Could not use the value supplied for width or height:"+e)}},{key:"_create",value:function(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=0,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext)this._setPixelRatio(),this.setTransform();else{var e=document.createElement("DIV");e.style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerText="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(e)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}},{key:"_bindHammer",value:function(){var e=this;this.hammer!==void 0&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new Ji(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:Ji.DIRECTION_ALL}),xs(this.hammer,function(t){e.body.eventListeners.onTouch(t)}),this.hammer.on("tap",function(t){e.body.eventListeners.onTap(t)}),this.hammer.on("doubletap",function(t){e.body.eventListeners.onDoubleTap(t)}),this.hammer.on("press",function(t){e.body.eventListeners.onHold(t)}),this.hammer.on("panstart",function(t){e.body.eventListeners.onDragStart(t)}),this.hammer.on("panmove",function(t){e.body.eventListeners.onDrag(t)}),this.hammer.on("panend",function(t){e.body.eventListeners.onDragEnd(t)}),this.hammer.on("pinch",function(t){e.body.eventListeners.onPinch(t)}),this.frame.canvas.addEventListener("wheel",function(t){e.body.eventListeners.onMouseWheel(t)}),this.frame.canvas.addEventListener("mousemove",function(t){e.body.eventListeners.onMouseMove(t)}),this.frame.canvas.addEventListener("contextmenu",function(t){e.body.eventListeners.onContext(t)}),this.hammerFrame=new Ji(this.frame),dE(this.hammerFrame,function(t){e.body.eventListeners.onRelease(t)})}},{key:"setSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.width,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.height;e=this._prepareValue(e),t=this._prepareValue(t);var i=!1,a=this.frame.canvas.width,o=this.frame.canvas.height,s=this.pixelRatio;if(this._setPixelRatio(),e!=this.options.width||t!=this.options.height||this.frame.style.width!=e||this.frame.style.height!=t)this._getCameraState(s),this.frame.style.width=e,this.frame.style.height=t,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=e,this.options.height=t,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},i=!0;else{var u=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),l=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);(this.frame.canvas.width!==u||this.frame.canvas.height!==l)&&this._getCameraState(s),this.frame.canvas.width!==u&&(this.frame.canvas.width=u,i=!0),this.frame.canvas.height!==l&&(this.frame.canvas.height=l,i=!0)}return i===!0&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(a/this.pixelRatio),oldHeight:Math.round(o/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,i}},{key:"getContext",value:function(){return this.frame.canvas.getContext("2d")}},{key:"_determinePixelRatio",value:function(){var e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");var t=1;typeof window<"u"&&(t=window.devicePixelRatio||1);var i=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/i}},{key:"_setPixelRatio",value:function(){this.pixelRatio=this._determinePixelRatio()}},{key:"setTransform",value:function(){var e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}},{key:"_XconvertDOMtoCanvas",value:function(e){return(e-this.body.view.translation.x)/this.body.view.scale}},{key:"_XconvertCanvasToDOM",value:function(e){return e*this.body.view.scale+this.body.view.translation.x}},{key:"_YconvertDOMtoCanvas",value:function(e){return(e-this.body.view.translation.y)/this.body.view.scale}},{key:"_YconvertCanvasToDOM",value:function(e){return e*this.body.view.scale+this.body.view.translation.y}},{key:"canvasToDOM",value:function(e){return{x:this._XconvertCanvasToDOM(e.x),y:this._YconvertCanvasToDOM(e.y)}}},{key:"DOMtoCanvas",value:function(e){return{x:this._XconvertDOMtoCanvas(e.x),y:this._YconvertDOMtoCanvas(e.y)}}}]),r}();function wie(r,n){var e=Ae({nodes:n,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},r??{});if(!le(e.nodes))throw new TypeError("Nodes has to be an array of ids.");if(e.nodes.length===0&&(e.nodes=n),!(typeof e.minZoomLevel=="number"&&e.minZoomLevel>0))throw new TypeError("Min zoom level has to be a number higher than zero.");if(!(typeof e.maxZoomLevel=="number"&&e.minZoomLevel<=e.maxZoomLevel))throw new TypeError("Max zoom level has to be a number higher than min zoom level.");return e}var _ie=function(){function r(n,e){var t,i=this,a;D(this,r),this.body=n,this.canvas=e,this.animationSpeed=1/this.renderRefreshRate,this.animationEasingFunction="easeInOutQuint",this.easingTime=0,this.sourceScale=0,this.targetScale=0,this.sourceTranslation=0,this.targetTranslation=0,this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0,this.touchTime=0,this.viewFunction=void 0,this.body.emitter.on("fit",A(t=this.fit).call(t,this)),this.body.emitter.on("animationFinished",function(){i.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",A(a=this.releaseNode).call(a,this))}return R(r,[{key:"setOptions",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=e}},{key:"fit",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;e=wie(e,this.body.nodeIndices);var i=this.canvas.frame.canvas.clientWidth,a=this.canvas.frame.canvas.clientHeight,o,s;if(i===0||a===0)s=1,o=nt.getRange(this.body.nodes,e.nodes);else if(t===!0){var u=0;for(var l in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,l)){var h=this.body.nodes[l];h.predefinedPosition===!0&&(u+=1)}if(u>.5*this.body.nodeIndices.length){this.fit(e,!1);return}o=nt.getRange(this.body.nodes,e.nodes);var d=this.body.nodeIndices.length;s=12.662/(d+7.4147)+.0964822;var f=Math.min(i/600,a/600);s*=f}else{this.body.emitter.emit("_resizeNodes"),o=nt.getRange(this.body.nodes,e.nodes);var c=Math.abs(o.maxX-o.minX)*1.1,v=Math.abs(o.maxY-o.minY)*1.1,g=i/c,b=a/v;s=g<=b?g:b}s>e.maxZoomLevel?s=e.maxZoomLevel:s<e.minZoomLevel&&(s=e.minZoomLevel);var p=nt.findCenter(o),$={position:p,scale:s,animation:e.animation};this.moveTo($)}},{key:"focus",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.body.nodes[e]!==void 0){var i={x:this.body.nodes[e].x,y:this.body.nodes[e].y};t.position=i,t.lockedOnNode=e,this.moveTo(t)}else console.error("Node: "+e+" cannot be found.")}},{key:"moveTo",value:function(e){if(e===void 0){e={};return}if(e.offset!=null){if(e.offset.x!=null){if(e.offset.x=+e.offset.x,!ni(e.offset.x))throw new TypeError('The option "offset.x" has to be a finite number.')}else e.offset.x=0;if(e.offset.y!=null){if(e.offset.y=+e.offset.y,!ni(e.offset.y))throw new TypeError('The option "offset.y" has to be a finite number.')}else e.offset.x=0}else e.offset={x:0,y:0};if(e.position!=null){if(e.position.x!=null){if(e.position.x=+e.position.x,!ni(e.position.x))throw new TypeError('The option "position.x" has to be a finite number.')}else e.position.x=0;if(e.position.y!=null){if(e.position.y=+e.position.y,!ni(e.position.y))throw new TypeError('The option "position.y" has to be a finite number.')}else e.position.x=0}else e.position=this.getViewPosition();if(e.scale!=null){if(e.scale=+e.scale,!(e.scale>0))throw new TypeError('The option "scale" has to be a number greater than zero.')}else e.scale=this.body.view.scale;e.animation===void 0&&(e.animation={duration:0}),e.animation===!1&&(e.animation={duration:0}),e.animation===!0&&(e.animation={}),e.animation.duration===void 0&&(e.animation.duration=1e3),e.animation.easingFunction===void 0&&(e.animation.easingFunction="easeInOutQuad"),this.animateView(e)}},{key:"animateView",value:function(e){if(e!==void 0){this.animationEasingFunction=e.animation.easingFunction,this.releaseNode(),e.locked===!0&&(this.lockedOnNodeId=e.lockedOnNode,this.lockedOnNodeOffset=e.offset),this.easingTime!=0&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=e.scale,this.body.view.scale=this.targetScale;var t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:t.x-e.position.x,y:t.y-e.position.y};if(this.targetTranslation={x:this.sourceTranslation.x+i.x*this.targetScale+e.offset.x,y:this.sourceTranslation.y+i.y*this.targetScale+e.offset.y},e.animation.duration===0)if(this.lockedOnNodeId!=null){var a;this.viewFunction=A(a=this._lockedRedraw).call(a,this),this.body.emitter.on("initRedraw",this.viewFunction)}else this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw");else{var o;this.animationSpeed=1/(60*e.animation.duration*.001)||1/60,this.animationEasingFunction=e.animation.easingFunction,this.viewFunction=A(o=this._transitionRedraw).call(o,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}}},{key:"_lockedRedraw",value:function(){var e={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:t.x-e.x,y:t.y-e.y},a=this.body.view.translation,o={x:a.x+i.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:a.y+i.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=o}},{key:"releaseNode",value:function(){this.lockedOnNodeId!==void 0&&this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}},{key:"_transitionRedraw",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.easingTime+=this.animationSpeed,this.easingTime=e===!0?1:this.easingTime;var t=HX[this.animationEasingFunction](this.easingTime);if(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*t,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*t,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*t},this.easingTime>=1){if(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,this.lockedOnNodeId!=null){var i;this.viewFunction=A(i=this._lockedRedraw).call(i,this),this.body.emitter.on("initRedraw",this.viewFunction)}this.body.emitter.emit("animationFinished")}}},{key:"getScale",value:function(){return this.body.view.scale}},{key:"getViewPosition",value:function(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}]),r}();function Em(r){var n=r&&r.preventDefault||!1,e=r&&r.container||window,t={},i={keydown:{},keyup:{}},a={},o;for(o=97;o<=122;o++)a[String.fromCharCode(o)]={code:65+(o-97),shift:!1};for(o=65;o<=90;o++)a[String.fromCharCode(o)]={code:o,shift:!0};for(o=0;o<=9;o++)a[""+o]={code:48+o,shift:!1};for(o=1;o<=12;o++)a["F"+o]={code:111+o,shift:!1};for(o=0;o<=9;o++)a["num"+o]={code:96+o,shift:!1};a["num*"]={code:106,shift:!1},a["num+"]={code:107,shift:!1},a["num-"]={code:109,shift:!1},a["num/"]={code:111,shift:!1},a["num."]={code:110,shift:!1},a.left={code:37,shift:!1},a.up={code:38,shift:!1},a.right={code:39,shift:!1},a.down={code:40,shift:!1},a.space={code:32,shift:!1},a.enter={code:13,shift:!1},a.shift={code:16,shift:void 0},a.esc={code:27,shift:!1},a.backspace={code:8,shift:!1},a.tab={code:9,shift:!1},a.ctrl={code:17,shift:!1},a.alt={code:18,shift:!1},a.delete={code:46,shift:!1},a.pageup={code:33,shift:!1},a.pagedown={code:34,shift:!1},a["="]={code:187,shift:!1},a["-"]={code:189,shift:!1},a["]"]={code:221,shift:!1},a["["]={code:219,shift:!1};var s=function(h){l(h,"keydown")},u=function(h){l(h,"keyup")},l=function(h,d){if(i[d][h.keyCode]!==void 0){for(var f=i[d][h.keyCode],c=0;c<f.length;c++)(f[c].shift===void 0||f[c].shift==!0&&h.shiftKey==!0||f[c].shift==!1&&h.shiftKey==!1)&&f[c].fn(h);n==!0&&h.preventDefault()}};return t.bind=function(h,d,f){if(f===void 0&&(f="keydown"),a[h]===void 0)throw new Error("unsupported key: "+h);i[f][a[h].code]===void 0&&(i[f][a[h].code]=[]),i[f][a[h].code].push({fn:d,shift:a[h].shift})},t.bindAll=function(h,d){d===void 0&&(d="keydown");for(var f in a)a.hasOwnProperty(f)&&t.bind(f,h,d)},t.getKey=function(h){for(var d in a)if(a.hasOwnProperty(d)){if(h.shiftKey==!0&&a[d].shift==!0&&h.keyCode==a[d].code)return d;if(h.shiftKey==!1&&a[d].shift==!1&&h.keyCode==a[d].code)return d;if(h.keyCode==a[d].code&&d=="shift")return d}return"unknown key, currently not supported"},t.unbind=function(h,d,f){if(f===void 0&&(f="keydown"),a[h]===void 0)throw new Error("unsupported key: "+h);if(d!==void 0){var c=[],v=i[f][a[h].code];if(v!==void 0)for(var g=0;g<v.length;g++)v[g].fn==d&&v[g].shift==a[h].shift||c.push(i[f][a[h].code][g]);i[f][a[h].code]=c}else i[f][a[h].code]=[]},t.reset=function(){i={keydown:{},keyup:{}}},t.destroy=function(){i={keydown:{},keyup:{}},e.removeEventListener("keydown",s,!0),e.removeEventListener("keyup",u,!0)},e.addEventListener("keydown",s,!0),e.addEventListener("keyup",u,!0),t}var Eie=function(){function r(n,e){var t=this;D(this,r),this.body=n,this.canvas=e,this.iconsCreated=!1,this.navigationHammers=[],this.boundFunctions={},this.touchTime=0,this.activated=!1,this.body.emitter.on("activate",function(){t.activated=!0,t.configureKeyboardBindings()}),this.body.emitter.on("deactivate",function(){t.activated=!1,t.configureKeyboardBindings()}),this.body.emitter.on("destroy",function(){t.keycharm!==void 0&&t.keycharm.destroy()}),this.options={}}return R(r,[{key:"setOptions",value:function(e){e!==void 0&&(this.options=e,this.create())}},{key:"create",value:function(){this.options.navigationButtons===!0?this.iconsCreated===!1&&this.loadNavigationElements():this.iconsCreated===!0&&this.cleanNavigation(),this.configureKeyboardBindings()}},{key:"cleanNavigation",value:function(){if(this.navigationHammers.length!=0){for(var e=0;e<this.navigationHammers.length;e++)this.navigationHammers[e].destroy();this.navigationHammers=[]}this.navigationDOM&&this.navigationDOM.wrapper&&this.navigationDOM.wrapper.parentNode&&this.navigationDOM.wrapper.parentNode.removeChild(this.navigationDOM.wrapper),this.iconsCreated=!1}},{key:"loadNavigationElements",value:function(){var e=this;this.cleanNavigation(),this.navigationDOM={};var t=["up","down","left","right","zoomIn","zoomOut","zoomExtends"],i=["_moveUp","_moveDown","_moveLeft","_moveRight","_zoomIn","_zoomOut","_fit"];this.navigationDOM.wrapper=document.createElement("div"),this.navigationDOM.wrapper.className="vis-navigation",this.canvas.frame.appendChild(this.navigationDOM.wrapper);for(var a=0;a<t.length;a++){this.navigationDOM[t[a]]=document.createElement("div"),this.navigationDOM[t[a]].className="vis-button vis-"+t[a],this.navigationDOM.wrapper.appendChild(this.navigationDOM[t[a]]);var o=new Ji(this.navigationDOM[t[a]]);if(i[a]==="_fit"){var s;xs(o,A(s=this._fit).call(s,this))}else{var u;xs(o,A(u=this.bindToRedraw).call(u,this,i[a]))}this.navigationHammers.push(o)}var l=new Ji(this.canvas.frame);dE(l,function(){e._stopMovement()}),this.navigationHammers.push(l),this.iconsCreated=!0}},{key:"bindToRedraw",value:function(e){if(this.boundFunctions[e]===void 0){var t;this.boundFunctions[e]=A(t=this[e]).call(t,this),this.body.emitter.on("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_startRendering")}}},{key:"unbindFromRedraw",value:function(e){this.boundFunctions[e]!==void 0&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"),delete this.boundFunctions[e])}},{key:"_fit",value:function(){new Date().valueOf()-this.touchTime>700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=new Date().valueOf())}},{key:"_stopMovement",value:function(){for(var e in this.boundFunctions)Object.prototype.hasOwnProperty.call(this.boundFunctions,e)&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}},{key:"_moveUp",value:function(){this.body.view.translation.y+=this.options.keyboard.speed.y}},{key:"_moveDown",value:function(){this.body.view.translation.y-=this.options.keyboard.speed.y}},{key:"_moveLeft",value:function(){this.body.view.translation.x+=this.options.keyboard.speed.x}},{key:"_moveRight",value:function(){this.body.view.translation.x-=this.options.keyboard.speed.x}},{key:"_zoomIn",value:function(){var e=this.body.view.scale,t=this.body.view.scale*(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,a=t/e,o=(1-a)*this.canvas.canvasViewCenter.x+i.x*a,s=(1-a)*this.canvas.canvasViewCenter.y+i.y*a;this.body.view.scale=t,this.body.view.translation={x:o,y:s},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}},{key:"_zoomOut",value:function(){var e=this.body.view.scale,t=this.body.view.scale/(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,a=t/e,o=(1-a)*this.canvas.canvasViewCenter.x+i.x*a,s=(1-a)*this.canvas.canvasViewCenter.y+i.y*a;this.body.view.scale=t,this.body.view.translation={x:o,y:s},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}},{key:"configureKeyboardBindings",value:function(){var e=this;if(this.keycharm!==void 0&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=Em({container:window,preventDefault:!0}):this.keycharm=Em({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0)){var t,i,a,o,s,u,l,h,d,f,c,v,g,b,p,$,y,m,_,O,k,S,w,E;A(t=this.keycharm).call(t,"up",function(){e.bindToRedraw("_moveUp")},"keydown"),A(i=this.keycharm).call(i,"down",function(){e.bindToRedraw("_moveDown")},"keydown"),A(a=this.keycharm).call(a,"left",function(){e.bindToRedraw("_moveLeft")},"keydown"),A(o=this.keycharm).call(o,"right",function(){e.bindToRedraw("_moveRight")},"keydown"),A(s=this.keycharm).call(s,"=",function(){e.bindToRedraw("_zoomIn")},"keydown"),A(u=this.keycharm).call(u,"num+",function(){e.bindToRedraw("_zoomIn")},"keydown"),A(l=this.keycharm).call(l,"num-",function(){e.bindToRedraw("_zoomOut")},"keydown"),A(h=this.keycharm).call(h,"-",function(){e.bindToRedraw("_zoomOut")},"keydown"),A(d=this.keycharm).call(d,"[",function(){e.bindToRedraw("_zoomOut")},"keydown"),A(f=this.keycharm).call(f,"]",function(){e.bindToRedraw("_zoomIn")},"keydown"),A(c=this.keycharm).call(c,"pageup",function(){e.bindToRedraw("_zoomIn")},"keydown"),A(v=this.keycharm).call(v,"pagedown",function(){e.bindToRedraw("_zoomOut")},"keydown"),A(g=this.keycharm).call(g,"up",function(){e.unbindFromRedraw("_moveUp")},"keyup"),A(b=this.keycharm).call(b,"down",function(){e.unbindFromRedraw("_moveDown")},"keyup"),A(p=this.keycharm).call(p,"left",function(){e.unbindFromRedraw("_moveLeft")},"keyup"),A($=this.keycharm).call($,"right",function(){e.unbindFromRedraw("_moveRight")},"keyup"),A(y=this.keycharm).call(y,"=",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),A(m=this.keycharm).call(m,"num+",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),A(_=this.keycharm).call(_,"num-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),A(O=this.keycharm).call(O,"-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),A(k=this.keycharm).call(k,"[",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),A(S=this.keycharm).call(S,"]",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),A(w=this.keycharm).call(w,"pageup",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),A(E=this.keycharm).call(E,"pagedown",function(){e.unbindFromRedraw("_zoomOut")},"keyup")}}}]),r}();function Sie(r,n){var e=typeof _r<"u"&&rr(r)||r["@@iterator"];if(!e){if(le(r)||(e=Oie(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
96
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Oie(r,n){var e;if(r){if(typeof r=="string")return Sm(r,n);var t=Le(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Ur(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Sm(r,n)}}function Sm(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}var Tie=function(){function r(n,e,t){var i,a,o,s,u,l,h,d,f,c,v,g,b;D(this,r),this.body=n,this.canvas=e,this.selectionHandler=t,this.navigationHandler=new Eie(n,e),this.body.eventListeners.onTap=A(i=this.onTap).call(i,this),this.body.eventListeners.onTouch=A(a=this.onTouch).call(a,this),this.body.eventListeners.onDoubleTap=A(o=this.onDoubleTap).call(o,this),this.body.eventListeners.onHold=A(s=this.onHold).call(s,this),this.body.eventListeners.onDragStart=A(u=this.onDragStart).call(u,this),this.body.eventListeners.onDrag=A(l=this.onDrag).call(l,this),this.body.eventListeners.onDragEnd=A(h=this.onDragEnd).call(h,this),this.body.eventListeners.onMouseWheel=A(d=this.onMouseWheel).call(d,this),this.body.eventListeners.onPinch=A(f=this.onPinch).call(f,this),this.body.eventListeners.onMouseMove=A(c=this.onMouseMove).call(c,this),this.body.eventListeners.onRelease=A(v=this.onRelease).call(v,this),this.body.eventListeners.onContext=A(g=this.onContext).call(g,this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=A(b=this.getPointer).call(b,this),this.options={},this.defaultOptions={dragNodes:!0,dragView:!0,hover:!1,keyboard:{enabled:!1,speed:{x:10,y:10,zoom:.02},bindToWindow:!0,autoFocus:!0},navigationButtons:!1,tooltipDelay:300,zoomView:!0,zoomSpeed:1},Ae(this.options,this.defaultOptions),this.bindEventListeners()}return R(r,[{key:"bindEventListeners",value:function(){var e=this;this.body.emitter.on("destroy",function(){clearTimeout(e.popupTimer),delete e.body.functions.getPointer})}},{key:"setOptions",value:function(e){if(e!==void 0){var t=["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"];ks(t,this.options,e),kt(this.options,e,"keyboard"),e.tooltip&&(Ae(this.options.tooltip,e.tooltip),e.tooltip.color&&(this.options.tooltip.color=Md(e.tooltip.color)))}this.navigationHandler.setOptions(this.options)}},{key:"getPointer",value:function(e){return{x:e.x-FX(this.canvas.frame.canvas),y:e.y-NX(this.canvas.frame.canvas)}}},{key:"onTouch",value:function(e){new Date().valueOf()-this.touchTime>50&&(this.drag.pointer=this.getPointer(e.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=new Date().valueOf())}},{key:"onTap",value:function(e){var t=this.getPointer(e.center),i=this.selectionHandler.options.multiselect&&(e.changedPointers[0].ctrlKey||e.changedPointers[0].metaKey);this.checkSelectionChanges(t,i),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t)}},{key:"onDoubleTap",value:function(e){var t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("doubleClick",e,t)}},{key:"onHold",value:function(e){var t=this.getPointer(e.center),i=this.selectionHandler.options.multiselect;this.checkSelectionChanges(t,i),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t),this.selectionHandler.generateClickEvent("hold",e,t)}},{key:"onRelease",value:function(e){if(new Date().valueOf()-this.touchTime>10){var t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("release",e,t),this.touchTime=new Date().valueOf()}}},{key:"onContext",value:function(e){var t=this.getPointer({x:e.clientX,y:e.clientY});this.selectionHandler.generateClickEvent("oncontext",e,t)}},{key:"checkSelectionChanges",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;t===!0?this.selectionHandler.selectAdditionalOnPoint(e):this.selectionHandler.selectOnPoint(e)}},{key:"_determineDifference",value:function(e,t){var i=function(o,s){for(var u=[],l=0;l<o.length;l++){var h=o[l];oe(s).call(s,h)===-1&&u.push(h)}return u};return{nodes:i(e.nodes,t.nodes),edges:i(e.edges,t.edges)}}},{key:"onDragStart",value:function(e){if(!this.drag.dragging){this.drag.pointer===void 0&&this.onTouch(e);var t=this.selectionHandler.getNodeAt(this.drag.pointer);if(this.drag.dragging=!0,this.drag.selection=[],this.drag.translation=Ae({},this.body.view.translation),this.drag.nodeId=void 0,e.srcEvent.shiftKey){this.body.selectionBox.show=!0;var i=this.getPointer(e.center);this.body.selectionBox.position.start={x:this.canvas._XconvertDOMtoCanvas(i.x),y:this.canvas._YconvertDOMtoCanvas(i.y)},this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(i.x),y:this.canvas._YconvertDOMtoCanvas(i.y)}}else if(t!==void 0&&this.options.dragNodes===!0){this.drag.nodeId=t.id,t.isSelected()===!1&&this.selectionHandler.setSelection({nodes:[t.id]}),this.selectionHandler.generateClickEvent("dragStart",e,this.drag.pointer);var a=Sie(this.selectionHandler.getSelectedNodes()),o;try{for(a.s();!(o=a.n()).done;){var s=o.value,u={id:s.id,node:s,x:s.x,y:s.y,xFixed:s.options.fixed.x,yFixed:s.options.fixed.y};s.options.fixed.x=!0,s.options.fixed.y=!0,this.drag.selection.push(u)}}catch(l){a.e(l)}finally{a.f()}}else this.selectionHandler.generateClickEvent("dragStart",e,this.drag.pointer,void 0,!0)}}},{key:"onDrag",value:function(e){var t=this;if(this.drag.pinched!==!0){this.body.emitter.emit("unlockNode");var i=this.getPointer(e.center),a=this.drag.selection;if(a&&a.length&&this.options.dragNodes===!0){this.selectionHandler.generateClickEvent("dragging",e,i);var o=i.x-this.drag.pointer.x,s=i.y-this.drag.pointer.y;pe(a).call(a,function(h){var d=h.node;h.xFixed===!1&&(d.x=t.canvas._XconvertDOMtoCanvas(t.canvas._XconvertCanvasToDOM(h.x)+o)),h.yFixed===!1&&(d.y=t.canvas._YconvertDOMtoCanvas(t.canvas._YconvertCanvasToDOM(h.y)+s))}),this.body.emitter.emit("startSimulation")}else{if(e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,i,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(i.x),y:this.canvas._YconvertDOMtoCanvas(i.y)},this.body.emitter.emit("_requestRedraw")}if(this.options.dragView===!0&&!e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,i,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}var u=i.x-this.drag.pointer.x,l=i.y-this.drag.pointer.y;this.body.view.translation={x:this.drag.translation.x+u,y:this.drag.translation.y+l},this.body.emitter.emit("_requestRedraw")}}}}},{key:"onDragEnd",value:function(e){var t=this;if(this.drag.dragging=!1,this.body.selectionBox.show){var i;this.body.selectionBox.show=!1;var a=this.body.selectionBox.position,o={minX:Math.min(a.start.x,a.end.x),minY:Math.min(a.start.y,a.end.y),maxX:Math.max(a.start.x,a.end.x),maxY:Math.max(a.start.y,a.end.y)},s=pt(i=this.body.nodeIndices).call(i,function(h){var d=t.body.nodes[h];return d.x>=o.minX&&d.x<=o.maxX&&d.y>=o.minY&&d.y<=o.maxY});pe(s).call(s,function(h){return t.selectionHandler.selectObject(t.body.nodes[h])});var u=this.getPointer(e.center);this.selectionHandler.commitAndEmit(u,e),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw")}else{var l=this.drag.selection;l&&l.length?(pe(l).call(l,function(h){h.node.options.fixed.x=h.xFixed,h.node.options.fixed.y=h.yFixed}),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center)),this.body.emitter.emit("startSimulation")):(this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw"))}}},{key:"onPinch",value:function(e){var t=this.getPointer(e.center);this.drag.pinched=!0,this.pinch.scale===void 0&&(this.pinch.scale=1);var i=this.pinch.scale*e.scale;this.zoom(i,t)}},{key:"zoom",value:function(e,t){if(this.options.zoomView===!0){var i=this.body.view.scale;e<1e-5&&(e=1e-5),e>10&&(e=10);var a=void 0;this.drag!==void 0&&this.drag.dragging===!0&&(a=this.canvas.DOMtoCanvas(this.drag.pointer));var o=this.body.view.translation,s=e/i,u=(1-s)*t.x+o.x*s,l=(1-s)*t.y+o.y*s;if(this.body.view.scale=e,this.body.view.translation={x:u,y:l},a!=null){var h=this.canvas.canvasToDOM(a);this.drag.pointer.x=h.x,this.drag.pointer.y=h.y}this.body.emitter.emit("_requestRedraw"),i<e?this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:t}):this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:t})}}},{key:"onMouseWheel",value:function(e){if(this.options.zoomView===!0){if(e.deltaY!==0){var t=this.body.view.scale;t*=1+(e.deltaY<0?1:-1)*(this.options.zoomSpeed*.1);var i=this.getPointer({x:e.clientX,y:e.clientY});this.zoom(t,i)}e.preventDefault()}}},{key:"onMouseMove",value:function(e){var t=this,i=this.getPointer({x:e.clientX,y:e.clientY}),a=!1;this.popup!==void 0&&(this.popup.hidden===!1&&this._checkHidePopup(i),this.popup.hidden===!1&&(a=!0,this.popup.setPosition(i.x+3,i.y-5),this.popup.show())),this.options.keyboard.autoFocus&&this.options.keyboard.bindToWindow===!1&&this.options.keyboard.enabled===!0&&this.canvas.frame.focus(),a===!1&&(this.popupTimer!==void 0&&(clearInterval(this.popupTimer),this.popupTimer=void 0),this.drag.dragging||(this.popupTimer=Jt(function(){return t._checkShowPopup(i)},this.options.tooltipDelay))),this.options.hover===!0&&this.selectionHandler.hoverObject(e,i)}},{key:"_checkShowPopup",value:function(e){var t=this.canvas._XconvertDOMtoCanvas(e.x),i=this.canvas._YconvertDOMtoCanvas(e.y),a={left:t,top:i,right:t,bottom:i},o=this.popupObj===void 0?void 0:this.popupObj.id,s=!1,u="node";if(this.popupObj===void 0){for(var l=this.body.nodeIndices,h=this.body.nodes,d,f=[],c=0;c<l.length;c++)d=h[l[c]],d.isOverlappingWith(a)===!0&&(s=!0,d.getTitle()!==void 0&&f.push(l[c]));f.length>0&&(this.popupObj=h[f[f.length-1]],s=!0)}if(this.popupObj===void 0&&s===!1){for(var v=this.body.edgeIndices,g=this.body.edges,b,p=[],$=0;$<v.length;$++)b=g[v[$]],b.isOverlappingWith(a)===!0&&b.connected===!0&&b.getTitle()!==void 0&&p.push(v[$]);p.length>0&&(this.popupObj=g[p[p.length-1]],u="edge")}this.popupObj!==void 0?this.popupObj.id!==o&&(this.popup===void 0&&(this.popup=new XX(this.canvas.frame)),this.popup.popupTargetType=u,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(e.x+3,e.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):this.popup!==void 0&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}},{key:"_checkHidePopup",value:function(e){var t=this.selectionHandler._pointerToPositionObject(e),i=!1;if(this.popup.popupTargetType==="node"){if(this.body.nodes[this.popup.popupTargetId]!==void 0&&(i=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(t),i===!0)){var a=this.selectionHandler.getNodeAt(e);i=a===void 0?!1:a.id===this.popup.popupTargetId}}else this.selectionHandler.getNodeAt(e)===void 0&&this.body.edges[this.popup.popupTargetId]!==void 0&&(i=this.body.edges[this.popup.popupTargetId].isOverlappingWith(t));i===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),r}(),fE={exports:{}},kie=sc,Iie=x_;kie("Set",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},Iie);var Pie=ie,Cie=Pie.Set,xie=Cie,Aie=xie;(function(r){r.exports=Aie})(fE);var ti=U(fE.exports),cE={exports:{}},Mie=se,Om=uc,Lo=vo.exports.getWeakData,Die=Ot,Th=We,Rie=oc,Fie=ac,vE=Gr,Tm=tt,pE=Ci,Nie=pE.set,Bie=pE.getterFor,Lie=vE.find,zie=vE.findIndex,jie=Mie([].splice),Hie=0,zo=function(r){return r.frozen||(r.frozen=new gE)},gE=function(){this.entries=[]},kh=function(r,n){return Lie(r.entries,function(e){return e[0]===n})};gE.prototype={get:function(r){var n=kh(this,r);if(n)return n[1]},has:function(r){return!!kh(this,r)},set:function(r,n){var e=kh(this,r);e?e[1]=n:this.entries.push([r,n])},delete:function(r){var n=zie(this.entries,function(e){return e[0]===r});return~n&&jie(this.entries,n,1),!!~n}};var Wie={getConstructor:function(r,n,e,t){var i=r(function(u,l){Rie(u,a),Nie(u,{type:n,id:Hie++,frozen:void 0}),l!=null&&Fie(l,u[t],{that:u,AS_ENTRIES:e})}),a=i.prototype,o=Bie(n),s=function(u,l,h){var d=o(u),f=Lo(Die(l),!0);return f===!0?zo(d).set(l,h):f[d.id]=h,u};return Om(a,{delete:function(u){var l=o(this);if(!Th(u))return!1;var h=Lo(u);return h===!0?zo(l).delete(u):h&&Tm(h,l.id)&&delete h[l.id]},has:function(l){var h=o(this);if(!Th(l))return!1;var d=Lo(l);return d===!0?zo(h).has(l):d&&Tm(d,h.id)}}),Om(a,e?{get:function(l){var h=o(this);if(Th(l)){var d=Lo(l);return d===!0?zo(h).get(l):d?d[h.id]:void 0}},set:function(l,h){return s(this,l,h)}}:{add:function(l){return s(this,l,!0)}}),i}},km=K,jo=se,Vie=uc,Uie=vo.exports,Gie=sc,yE=Wie,Ho=We,Wo=k_,Vo=Ci.enforce,Kie=Q1,qie=!km.ActiveXObject&&"ActiveXObject"in km,jn,mE=function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},Yie=Gie("WeakMap",mE,yE);if(Kie&&qie){jn=yE.getConstructor(mE,"WeakMap",!0),Uie.enable();var Hn=Yie.prototype,Im=jo(Hn.delete),Uo=jo(Hn.has),Pm=jo(Hn.get),Cm=jo(Hn.set);Vie(Hn,{delete:function(r){if(Ho(r)&&!Wo(r)){var n=Vo(this);return n.frozen||(n.frozen=new jn),Im(this,r)||n.frozen.delete(r)}return Im(this,r)},has:function(n){if(Ho(n)&&!Wo(n)){var e=Vo(this);return e.frozen||(e.frozen=new jn),Uo(this,n)||e.frozen.has(n)}return Uo(this,n)},get:function(n){if(Ho(n)&&!Wo(n)){var e=Vo(this);return e.frozen||(e.frozen=new jn),Uo(this,n)?Pm(this,n):e.frozen.get(n)}return Pm(this,n)},set:function(n,e){if(Ho(n)&&!Wo(n)){var t=Vo(this);t.frozen||(t.frozen=new jn),Uo(this,n)?Cm(this,n,e):t.frozen.set(n,e)}else Cm(this,n,e);return this}})}var Xie=ie,Qie=Xie.WeakMap,Zie=Qie,Jie=Zie;(function(r){r.exports=Jie})(cE);var Jn=U(cE.exports);function ye(r,n,e,t){if(e==="a"&&!t)throw new TypeError("Private accessor was defined without a getter");if(typeof n=="function"?r!==n||!t:!n.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?t:e==="a"?t.call(r):t?t.value:n.get(r)}function jd(r,n,e,t,i){if(t==="m")throw new TypeError("Private method is not writable");if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof n=="function"?r!==n||!i:!n.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t==="a"?i.call(r,e):i?i.value=e:n.set(r,e),e}function Hd(r,n){var e=typeof _r<"u"&&rr(r)||r["@@iterator"];if(!e){if(le(r)||(e=ene(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
97
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function ene(r,n){var e;if(r){if(typeof r=="string")return xm(r,n);var t=Le(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Ur(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return xm(r,n)}}function xm(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}var ei,Tt,Or,Tr,os;function Am(r,n){var e=new ti,t=Hd(n),i;try{for(t.s();!(i=t.n()).done;){var a=i.value;r.has(a)||e.add(a)}}catch(o){t.e(o)}finally{t.f()}return e}var Mm=function(){function r(){D(this,r),ei.set(this,new ti),Tt.set(this,new ti)}return R(r,[{key:"size",get:function(){return ye(this,Tt,"f").size}},{key:"add",value:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];for(var a=0,o=t;a<o.length;a++){var s=o[a];ye(this,Tt,"f").add(s)}}},{key:"delete",value:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];for(var a=0,o=t;a<o.length;a++){var s=o[a];ye(this,Tt,"f").delete(s)}}},{key:"clear",value:function(){ye(this,Tt,"f").clear()}},{key:"getSelection",value:function(){return Kt(ye(this,Tt,"f"))}},{key:"getChanges",value:function(){return{added:Kt(Am(ye(this,ei,"f"),ye(this,Tt,"f"))),deleted:Kt(Am(ye(this,Tt,"f"),ye(this,ei,"f"))),previous:Kt(new ti(ye(this,ei,"f"))),current:Kt(new ti(ye(this,Tt,"f")))}}},{key:"commit",value:function(){var e=this.getChanges();jd(this,ei,ye(this,Tt,"f"),"f"),jd(this,Tt,new ti(ye(this,ei,"f")),"f");var t=Hd(e.added),i;try{for(t.s();!(i=t.n()).done;){var a=i.value;a.select()}}catch(l){t.e(l)}finally{t.f()}var o=Hd(e.deleted),s;try{for(o.s();!(s=o.n()).done;){var u=s.value;u.unselect()}}catch(l){o.e(l)}finally{o.f()}return e}}]),r}();ei=new Jn,Tt=new Jn;var tne=function(){function r(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){};D(this,r),Or.set(this,new Mm),Tr.set(this,new Mm),os.set(this,void 0),jd(this,os,n,"f")}return R(r,[{key:"sizeNodes",get:function(){return ye(this,Or,"f").size}},{key:"sizeEdges",get:function(){return ye(this,Tr,"f").size}},{key:"getNodes",value:function(){return ye(this,Or,"f").getSelection()}},{key:"getEdges",value:function(){return ye(this,Tr,"f").getSelection()}},{key:"addNodes",value:function(){var e;(e=ye(this,Or,"f")).add.apply(e,arguments)}},{key:"addEdges",value:function(){var e;(e=ye(this,Tr,"f")).add.apply(e,arguments)}},{key:"deleteNodes",value:function(e){ye(this,Or,"f").delete(e)}},{key:"deleteEdges",value:function(e){ye(this,Tr,"f").delete(e)}},{key:"clear",value:function(){ye(this,Or,"f").clear(),ye(this,Tr,"f").clear()}},{key:"commit",value:function(){for(var e,t,i={nodes:ye(this,Or,"f").commit(),edges:ye(this,Tr,"f").commit()},a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return(e=ye(this,os,"f")).call.apply(e,Vf(t=[this,i]).call(t,o)),i}}]),r}();Or=new Jn,Tr=new Jn,os=new Jn;function Dm(r,n){var e=typeof _r<"u"&&rr(r)||r["@@iterator"];if(!e){if(le(r)||(e=rne(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
98
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function rne(r,n){var e;if(r){if(typeof r=="string")return Rm(r,n);var t=Le(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Ur(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Rm(r,n)}}function Rm(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}var ine=function(){function r(n,e){var t=this;D(this,r),this.body=n,this.canvas=e,this._selectionAccumulator=new tne,this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},Ae(this.options,this.defaultOptions),this.body.emitter.on("_dataChanged",function(){t.updateSelection()})}return R(r,[{key:"setOptions",value:function(e){if(e!==void 0){var t=["multiselect","hoverConnectedEdges","selectable","selectConnectedEdges"];An(t,this.options,e)}}},{key:"selectOnPoint",value:function(e){var t=!1;if(this.options.selectable===!0){var i=this.getNodeAt(e)||this.getEdgeAt(e);this.unselectAll(),i!==void 0&&(t=this.selectObject(i)),this.body.emitter.emit("_requestRedraw")}return t}},{key:"selectAdditionalOnPoint",value:function(e){var t=!1;if(this.options.selectable===!0){var i=this.getNodeAt(e)||this.getEdgeAt(e);i!==void 0&&(t=!0,i.isSelected()===!0?this.deselectObject(i):this.selectObject(i),this.body.emitter.emit("_requestRedraw"))}return t}},{key:"_initBaseEvent",value:function(e,t){var i={};return i.pointer={DOM:{x:t.x,y:t.y},canvas:this.canvas.DOMtoCanvas(t)},i.event=e,i}},{key:"generateClickEvent",value:function(e,t,i,a){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,s=this._initBaseEvent(t,i);if(o===!0)s.nodes=[],s.edges=[];else{var u=this.getSelection();s.nodes=u.nodes,s.edges=u.edges}a!==void 0&&(s.previousSelection=a),e=="click"&&(s.items=this.getClickedItems(i)),t.controlEdge!==void 0&&(s.controlEdge=t.controlEdge),this.body.emitter.emit(e,s)}},{key:"selectObject",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.selectConnectedEdges;if(e!==void 0){if(e instanceof bt){if(t===!0){var i;(i=this._selectionAccumulator).addEdges.apply(i,Kt(e.edges))}this._selectionAccumulator.addNodes(e)}else this._selectionAccumulator.addEdges(e);return!0}return!1}},{key:"deselectObject",value:function(e){e.isSelected()===!0&&(e.selected=!1,this._removeFromSelection(e))}},{key:"_getAllNodesOverlappingWith",value:function(e){for(var t=[],i=this.body.nodes,a=0;a<this.body.nodeIndices.length;a++){var o=this.body.nodeIndices[a];i[o].isOverlappingWith(e)&&t.push(o)}return t}},{key:"_pointerToPositionObject",value:function(e){var t=this.canvas.DOMtoCanvas(e);return{left:t.x-1,top:t.y+1,right:t.x+1,bottom:t.y-1}}},{key:"getNodeAt",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=this._pointerToPositionObject(e),a=this._getAllNodesOverlappingWith(i);if(a.length>0)return t===!0?this.body.nodes[a[a.length-1]]:a[a.length-1]}},{key:"_getEdgesOverlappingWith",value:function(e,t){for(var i=this.body.edges,a=0;a<this.body.edgeIndices.length;a++){var o=this.body.edgeIndices[a];i[o].isOverlappingWith(e)&&t.push(o)}}},{key:"_getAllEdgesOverlappingWith",value:function(e){var t=[];return this._getEdgesOverlappingWith(e,t),t}},{key:"getEdgeAt",value:function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=this.canvas.DOMtoCanvas(e),a=10,o=null,s=this.body.edges,u=0;u<this.body.edgeIndices.length;u++){var l=this.body.edgeIndices[u],h=s[l];if(h.connected){var d=h.from.x,f=h.from.y,c=h.to.x,v=h.to.y,g=h.edgeType.getDistanceToEdge(d,f,c,v,i.x,i.y);g<a&&(o=l,a=g)}}if(o!==null)return t===!0?this.body.edges[o]:o}},{key:"_addToHover",value:function(e){e instanceof bt?this.hoverObj.nodes[e.id]=e:this.hoverObj.edges[e.id]=e}},{key:"_removeFromSelection",value:function(e){if(e instanceof bt){var t;this._selectionAccumulator.deleteNodes(e),(t=this._selectionAccumulator).deleteEdges.apply(t,Kt(e.edges))}else this._selectionAccumulator.deleteEdges(e)}},{key:"unselectAll",value:function(){this._selectionAccumulator.clear()}},{key:"getSelectedNodeCount",value:function(){return this._selectionAccumulator.sizeNodes}},{key:"getSelectedEdgeCount",value:function(){return this._selectionAccumulator.sizeEdges}},{key:"_hoverConnectedEdges",value:function(e){for(var t=0;t<e.edges.length;t++){var i=e.edges[t];i.hover=!0,this._addToHover(i)}}},{key:"emitBlurEvent",value:function(e,t,i){var a=this._initBaseEvent(e,t);i.hover===!0&&(i.hover=!1,i instanceof bt?(a.node=i.id,this.body.emitter.emit("blurNode",a)):(a.edge=i.id,this.body.emitter.emit("blurEdge",a)))}},{key:"emitHoverEvent",value:function(e,t,i){var a=this._initBaseEvent(e,t),o=!1;return i.hover===!1&&(i.hover=!0,this._addToHover(i),o=!0,i instanceof bt?(a.node=i.id,this.body.emitter.emit("hoverNode",a)):(a.edge=i.id,this.body.emitter.emit("hoverEdge",a))),o}},{key:"hoverObject",value:function(e,t){var i=this.getNodeAt(t);i===void 0&&(i=this.getEdgeAt(t));var a=!1;for(var o in this.hoverObj.nodes)Object.prototype.hasOwnProperty.call(this.hoverObj.nodes,o)&&(i===void 0||i instanceof bt&&i.id!=o||i instanceof en)&&(this.emitBlurEvent(e,t,this.hoverObj.nodes[o]),delete this.hoverObj.nodes[o],a=!0);for(var s in this.hoverObj.edges)Object.prototype.hasOwnProperty.call(this.hoverObj.edges,s)&&(a===!0?(this.hoverObj.edges[s].hover=!1,delete this.hoverObj.edges[s]):(i===void 0||i instanceof en&&i.id!=s||i instanceof bt&&!i.hover)&&(this.emitBlurEvent(e,t,this.hoverObj.edges[s]),delete this.hoverObj.edges[s],a=!0));if(i!==void 0){var u=_e(this.hoverObj.edges).length,l=_e(this.hoverObj.nodes).length,h=i instanceof en&&u===0&&l===0,d=i instanceof bt&&u===0&&l===0;(a||h||d)&&(a=this.emitHoverEvent(e,t,i)),i instanceof bt&&this.options.hoverConnectedEdges===!0&&this._hoverConnectedEdges(i)}a===!0&&this.body.emitter.emit("_requestRedraw")}},{key:"commitWithoutEmitting",value:function(){this._selectionAccumulator.commit()}},{key:"commitAndEmit",value:function(e,t){var i=!1,a=this._selectionAccumulator.commit(),o={nodes:a.nodes.previous,edges:a.edges.previous};a.edges.deleted.length>0&&(this.generateClickEvent("deselectEdge",t,e,o),i=!0),a.nodes.deleted.length>0&&(this.generateClickEvent("deselectNode",t,e,o),i=!0),a.nodes.added.length>0&&(this.generateClickEvent("selectNode",t,e),i=!0),a.edges.added.length>0&&(this.generateClickEvent("selectEdge",t,e),i=!0),i===!0&&this.generateClickEvent("select",t,e)}},{key:"getSelection",value:function(){return{nodes:this.getSelectedNodeIds(),edges:this.getSelectedEdgeIds()}}},{key:"getSelectedNodes",value:function(){return this._selectionAccumulator.getNodes()}},{key:"getSelectedEdges",value:function(){return this._selectionAccumulator.getEdges()}},{key:"getSelectedNodeIds",value:function(){var e;return sn(e=this._selectionAccumulator.getNodes()).call(e,function(t){return t.id})}},{key:"getSelectedEdgeIds",value:function(){var e;return sn(e=this._selectionAccumulator.getEdges()).call(e,function(t){return t.id})}},{key:"setSelection",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!e||!e.nodes&&!e.edges)throw new TypeError("Selection must be an object with nodes and/or edges properties");if((t.unselectAll||t.unselectAll===void 0)&&this.unselectAll(),e.nodes){var i=Dm(e.nodes),a;try{for(i.s();!(a=i.n()).done;){var o=a.value,s=this.body.nodes[o];if(!s)throw new RangeError('Node with id "'+o+'" not found');this.selectObject(s,t.highlightEdges)}}catch(f){i.e(f)}finally{i.f()}}if(e.edges){var u=Dm(e.edges),l;try{for(u.s();!(l=u.n()).done;){var h=l.value,d=this.body.edges[h];if(!d)throw new RangeError('Edge with id "'+h+'" not found');this.selectObject(d)}}catch(f){u.e(f)}finally{u.f()}}this.body.emitter.emit("_requestRedraw"),this._selectionAccumulator.commit()}},{key:"selectNodes",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({nodes:e},{highlightEdges:t})}},{key:"selectEdges",value:function(e){if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({edges:e})}},{key:"updateSelection",value:function(){for(var e in this._selectionAccumulator.getNodes())Object.prototype.hasOwnProperty.call(this.body.nodes,e.id)||this._selectionAccumulator.deleteNodes(e);for(var t in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,t.id)||this._selectionAccumulator.deleteEdges(t)}},{key:"getClickedItems",value:function(e){for(var t=this.canvas.DOMtoCanvas(e),i=[],a=this.body.nodeIndices,o=this.body.nodes,s=a.length-1;s>=0;s--){var u=o[a[s]],l=u.getItemsOnPoint(t);i.push.apply(i,l)}for(var h=this.body.edgeIndices,d=this.body.edges,f=h.length-1;f>=0;f--){var c=d[h[f]],v=c.getItemsOnPoint(t);i.push.apply(i,v)}return i}}]),r}(),bE={exports:{}},Fm=E0,nne=Math.floor,Wd=function(r,n){var e=r.length,t=nne(e/2);return e<8?ane(r,n):one(r,Wd(Fm(r,0,t),n),Wd(Fm(r,t),n),n)},ane=function(r,n){for(var e=r.length,t=1,i,a;t<e;){for(a=t,i=r[t];a&&n(r[a-1],i)>0;)r[a]=r[--a];a!==t++&&(r[a]=i)}return r},one=function(r,n,e,t){for(var i=n.length,a=e.length,o=0,s=0;o<i||s<a;)r[o+s]=o<i&&s<a?t(n[o],e[s])<=0?n[o++]:e[s++]:o<i?n[o++]:e[s++];return r},sne=Wd,une=Ga,Nm=une.match(/firefox\/(\d+)/i),lne=!!Nm&&+Nm[1],hne=Ga,dne=/MSIE|Trident/.test(hne),fne=Ga,Bm=fne.match(/AppleWebKit\/(\d+)\./),cne=!!Bm&&+Bm[1],vne=X,$E=se,pne=En,gne=Et,yne=Ut,Lm=Vr,vc=fe,mne=sne,bne=Cn,zm=lne,$ne=dne,jm=Ka,Hm=cne,Nr=[],Wm=$E(Nr.sort),wne=$E(Nr.push),_ne=vc(function(){Nr.sort(void 0)}),Ene=vc(function(){Nr.sort(null)}),Sne=bne("sort"),wE=!vc(function(){if(jm)return jm<70;if(!(zm&&zm>3)){if($ne)return!0;if(Hm)return Hm<603;var r="",n,e,t,i;for(n=65;n<76;n++){switch(e=String.fromCharCode(n),n){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(i=0;i<47;i++)Nr.push({k:e+i,v:t})}for(Nr.sort(function(a,o){return o.v-a.v}),i=0;i<Nr.length;i++)e=Nr[i].k.charAt(0),r.charAt(r.length-1)!==e&&(r+=e);return r!=="DGBEFHACIJK"}}),One=_ne||!Ene||!Sne||!wE,Tne=function(r){return function(n,e){return e===void 0?-1:n===void 0?1:r!==void 0?+r(n,e)||0:Lm(n)>Lm(e)?1:-1}};vne({target:"Array",proto:!0,forced:One},{sort:function(n){n!==void 0&&pne(n);var e=gne(this);if(wE)return n===void 0?Wm(e):Wm(e,n);var t=[],i=yne(e),a,o;for(o=0;o<i;o++)o in e&&wne(t,e[o]);for(mne(t,Tne(n)),a=t.length,o=0;o<a;)e[o]=t[o++];for(;o<i;)delete e[o++];return e}});var kne=Ve,Ine=kne("Array").sort,Pne=ke,Cne=Ine,Ih=Array.prototype,xne=function(r){var n=r.sort;return r===Ih||Pne(Ih,r)&&n===Ih.sort?Cne:n},Ane=xne,Mne=Ane;(function(r){r.exports=Mne})(bE);var Ph=U(bE.exports),_E={exports:{}},Dne=K,Rne=En,Fne=Et,Nne=au,Bne=Ut,Lne=Dne.TypeError,Vm=function(r){return function(n,e,t,i){Rne(e);var a=Fne(n),o=Nne(a),s=Bne(a),u=r?s-1:0,l=r?-1:1;if(t<2)for(;;){if(u in o){i=o[u],u+=l;break}if(u+=l,r?u<0:s<=u)throw Lne("Reduce of empty array with no initial value")}for(;r?u>=0:s>u;u+=l)u in o&&(i=e(i,o[u],u,a));return i}},zne={left:Vm(!1),right:Vm(!0)},jne=Ii,Hne=K,Wne=jne(Hne.process)=="process",Vne=X,Une=zne.left,Gne=Cn,Um=Ka,Kne=Wne,qne=Gne("reduce"),Yne=!Kne&&Um>79&&Um<83;Vne({target:"Array",proto:!0,forced:!qne||Yne},{reduce:function(n){var e=arguments.length;return Une(this,n,e,e>1?arguments[1]:void 0)}});var Xne=Ve,Qne=Xne("Array").reduce,Zne=ke,Jne=Qne,Ch=Array.prototype,eae=function(r){var n=r.reduce;return r===Ch||Zne(Ch,r)&&n===Ch.reduce?Jne:n},tae=eae,rae=tae;(function(r){r.exports=rae})(_E);var EE=U(_E.exports),Du={exports:{}},SE={};(function(r){(function(n,e){e(r)})(sd,function(n){n.__esModule=!0,n.sort=b;function e(p,$){if(!(p instanceof $))throw new TypeError("Cannot call a class as a function")}var t=32,i=7,a=256,o=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9];function s(p){return p<1e5?p<100?p<10?0:1:p<1e4?p<1e3?2:3:4:p<1e7?p<1e6?5:6:p<1e9?p<1e8?7:8:9}function u(p,$){if(p===$)return 0;if(~~p===p&&~~$===$){if(p===0||$===0)return p<$?-1:1;if(p<0||$<0){if($>=0)return-1;if(p>=0)return 1;p=-p,$=-$}var y=s(p),m=s($),_=0;return y<m?(p*=o[m-y-1],$/=10,_=-1):y>m&&($*=o[y-m-1],p/=10,_=1),p===$?_:p<$?-1:1}var O=String(p),k=String($);return O===k?0:O<k?-1:1}function l(p){for(var $=0;p>=t;)$|=p&1,p>>=1;return p+$}function h(p,$,y,m){var _=$+1;if(_===y)return 1;if(m(p[_++],p[$])<0){for(;_<y&&m(p[_],p[_-1])<0;)_++;d(p,$,_)}else for(;_<y&&m(p[_],p[_-1])>=0;)_++;return _-$}function d(p,$,y){for(y--;$<y;){var m=p[$];p[$++]=p[y],p[y--]=m}}function f(p,$,y,m,_){for(m===$&&m++;m<y;m++){for(var O=p[m],k=$,S=m;k<S;){var w=k+S>>>1;_(O,p[w])<0?S=w:k=w+1}var E=m-k;switch(E){case 3:p[k+3]=p[k+2];case 2:p[k+2]=p[k+1];case 1:p[k+1]=p[k];break;default:for(;E>0;)p[k+E]=p[k+E-1],E--}p[k]=O}}function c(p,$,y,m,_,O){var k=0,S=0,w=1;if(O(p,$[y+_])>0){for(S=m-_;w<S&&O(p,$[y+_+w])>0;)k=w,w=(w<<1)+1,w<=0&&(w=S);w>S&&(w=S),k+=_,w+=_}else{for(S=_+1;w<S&&O(p,$[y+_-w])<=0;)k=w,w=(w<<1)+1,w<=0&&(w=S);w>S&&(w=S);var E=k;k=_-w,w=_-E}for(k++;k<w;){var F=k+(w-k>>>1);O(p,$[y+F])>0?k=F+1:w=F}return w}function v(p,$,y,m,_,O){var k=0,S=0,w=1;if(O(p,$[y+_])<0){for(S=_+1;w<S&&O(p,$[y+_-w])<0;)k=w,w=(w<<1)+1,w<=0&&(w=S);w>S&&(w=S);var E=k;k=_-w,w=_-E}else{for(S=m-_;w<S&&O(p,$[y+_+w])>=0;)k=w,w=(w<<1)+1,w<=0&&(w=S);w>S&&(w=S),k+=_,w+=_}for(k++;k<w;){var F=k+(w-k>>>1);O(p,$[y+F])<0?w=F:k=F+1}return w}var g=function(){function p($,y){e(this,p),this.array=null,this.compare=null,this.minGallop=i,this.length=0,this.tmpStorageLength=a,this.stackLength=0,this.runStart=null,this.runLength=null,this.stackSize=0,this.array=$,this.compare=y,this.length=$.length,this.length<2*a&&(this.tmpStorageLength=this.length>>>1),this.tmp=new Array(this.tmpStorageLength),this.stackLength=this.length<120?5:this.length<1542?10:this.length<119151?19:40,this.runStart=new Array(this.stackLength),this.runLength=new Array(this.stackLength)}return p.prototype.pushRun=function(y,m){this.runStart[this.stackSize]=y,this.runLength[this.stackSize]=m,this.stackSize+=1},p.prototype.mergeRuns=function(){for(;this.stackSize>1;){var y=this.stackSize-2;if(y>=1&&this.runLength[y-1]<=this.runLength[y]+this.runLength[y+1]||y>=2&&this.runLength[y-2]<=this.runLength[y]+this.runLength[y-1])this.runLength[y-1]<this.runLength[y+1]&&y--;else if(this.runLength[y]>this.runLength[y+1])break;this.mergeAt(y)}},p.prototype.forceMergeRuns=function(){for(;this.stackSize>1;){var y=this.stackSize-2;y>0&&this.runLength[y-1]<this.runLength[y+1]&&y--,this.mergeAt(y)}},p.prototype.mergeAt=function(y){var m=this.compare,_=this.array,O=this.runStart[y],k=this.runLength[y],S=this.runStart[y+1],w=this.runLength[y+1];this.runLength[y]=k+w,y===this.stackSize-3&&(this.runStart[y+1]=this.runStart[y+2],this.runLength[y+1]=this.runLength[y+2]),this.stackSize--;var E=v(_[S],_,O,k,0,m);O+=E,k-=E,k!==0&&(w=c(_[O+k-1],_,S,w,w-1,m),w!==0&&(k<=w?this.mergeLow(O,k,S,w):this.mergeHigh(O,k,S,w)))},p.prototype.mergeLow=function(y,m,_,O){var k=this.compare,S=this.array,w=this.tmp,E=0;for(E=0;E<m;E++)w[E]=S[y+E];var F=0,H=_,z=y;if(S[z++]=S[H++],--O===0){for(E=0;E<m;E++)S[z+E]=w[F+E];return}if(m===1){for(E=0;E<O;E++)S[z+E]=S[H+E];S[z+O]=w[F];return}for(var q=this.minGallop;;){var Q=0,re=0,ae=!1;do if(k(S[H],w[F])<0){if(S[z++]=S[H++],re++,Q=0,--O===0){ae=!0;break}}else if(S[z++]=w[F++],Q++,re=0,--m===1){ae=!0;break}while((Q|re)<q);if(ae)break;do{if(Q=v(S[H],w,F,m,0,k),Q!==0){for(E=0;E<Q;E++)S[z+E]=w[F+E];if(z+=Q,F+=Q,m-=Q,m<=1){ae=!0;break}}if(S[z++]=S[H++],--O===0){ae=!0;break}if(re=c(w[F],S,H,O,0,k),re!==0){for(E=0;E<re;E++)S[z+E]=S[H+E];if(z+=re,H+=re,O-=re,O===0){ae=!0;break}}if(S[z++]=w[F++],--m===1){ae=!0;break}q--}while(Q>=i||re>=i);if(ae)break;q<0&&(q=0),q+=2}if(this.minGallop=q,q<1&&(this.minGallop=1),m===1){for(E=0;E<O;E++)S[z+E]=S[H+E];S[z+O]=w[F]}else{if(m===0)throw new Error("mergeLow preconditions were not respected");for(E=0;E<m;E++)S[z+E]=w[F+E]}},p.prototype.mergeHigh=function(y,m,_,O){var k=this.compare,S=this.array,w=this.tmp,E=0;for(E=0;E<O;E++)w[E]=S[_+E];var F=y+m-1,H=O-1,z=_+O-1,q=0,Q=0;if(S[z--]=S[F--],--m===0){for(q=z-(O-1),E=0;E<O;E++)S[q+E]=w[E];return}if(O===1){for(z-=m,F-=m,Q=z+1,q=F+1,E=m-1;E>=0;E--)S[Q+E]=S[q+E];S[z]=w[H];return}for(var re=this.minGallop;;){var ae=0,C=0,I=!1;do if(k(w[H],S[F])<0){if(S[z--]=S[F--],ae++,C=0,--m===0){I=!0;break}}else if(S[z--]=w[H--],C++,ae=0,--O===1){I=!0;break}while((ae|C)<re);if(I)break;do{if(ae=m-v(w[H],S,y,m,m-1,k),ae!==0){for(z-=ae,F-=ae,m-=ae,Q=z+1,q=F+1,E=ae-1;E>=0;E--)S[Q+E]=S[q+E];if(m===0){I=!0;break}}if(S[z--]=w[H--],--O===1){I=!0;break}if(C=O-c(S[F],w,0,O,O-1,k),C!==0){for(z-=C,H-=C,O-=C,Q=z+1,q=H+1,E=0;E<C;E++)S[Q+E]=w[q+E];if(O<=1){I=!0;break}}if(S[z--]=S[F--],--m===0){I=!0;break}re--}while(ae>=i||C>=i);if(I)break;re<0&&(re=0),re+=2}if(this.minGallop=re,re<1&&(this.minGallop=1),O===1){for(z-=m,F-=m,Q=z+1,q=F+1,E=m-1;E>=0;E--)S[Q+E]=S[q+E];S[z]=w[H]}else{if(O===0)throw new Error("mergeHigh preconditions were not respected");for(q=z-(O-1),E=0;E<O;E++)S[q+E]=w[E]}},p}();function b(p,$,y,m){if(!Array.isArray(p))throw new TypeError("Can only sort arrays");$?typeof $!="function"&&(m=y,y=$,$=u):$=u,y||(y=0),m||(m=p.length);var _=m-y;if(!(_<2)){var O=0;if(_<t){O=h(p,y,m,$),f(p,y,m,y+O,$);return}var k=new g(p,$),S=l(_);do{if(O=h(p,y,m,$),O<S){var w=_;w>S&&(w=S),f(p,y,y+w,y+O,$),O=w}k.pushRun(y,O),k.mergeRuns(),_-=O,y+=O}while(_!==0);k.forceMergeRuns()}}})})(SE);(function(r){r.exports=SE})(Du);var Gm=U(Du.exports);function OE(r){var n=iae();return function(){var t=L(r),i;if(n){var a=L(this).constructor;i=P(t,arguments,a)}else i=t.apply(this,arguments);return ce(this,i)}}function iae(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var TE=function(){function r(){D(this,r)}return R(r,[{key:"abstract",value:function(){throw new Error("Can't instantiate abstract class!")}},{key:"fake_use",value:function(){}},{key:"curveType",value:function(){return this.abstract()}},{key:"getPosition",value:function(e){return this.fake_use(e),this.abstract()}},{key:"setPosition",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(e,t,i),this.abstract()}},{key:"getTreeSize",value:function(e){return this.fake_use(e),this.abstract()}},{key:"sort",value:function(e){this.fake_use(e),this.abstract()}},{key:"fix",value:function(e,t){this.fake_use(e,t),this.abstract()}},{key:"shift",value:function(e,t){this.fake_use(e,t),this.abstract()}}]),r}(),nae=function(r){ue(e,r);var n=OE(e);function e(t){var i;return D(this,e),i=n.call(this),i.layout=t,i}return R(e,[{key:"curveType",value:function(){return"horizontal"}},{key:"getPosition",value:function(i){return i.x}},{key:"setPosition",value:function(i,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;o!==void 0&&this.layout.hierarchical.addToOrdering(i,o),i.x=a}},{key:"getTreeSize",value:function(i){var a=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,i);return{min:a.min_x,max:a.max_x}}},{key:"sort",value:function(i){Du.exports.sort(i,function(a,o){return a.x-o.x})}},{key:"fix",value:function(i,a){i.y=this.layout.options.hierarchical.levelSeparation*a,i.options.fixed.y=!0}},{key:"shift",value:function(i,a){this.layout.body.nodes[i].x+=a}}]),e}(TE),aae=function(r){ue(e,r);var n=OE(e);function e(t){var i;return D(this,e),i=n.call(this),i.layout=t,i}return R(e,[{key:"curveType",value:function(){return"vertical"}},{key:"getPosition",value:function(i){return i.y}},{key:"setPosition",value:function(i,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;o!==void 0&&this.layout.hierarchical.addToOrdering(i,o),i.y=a}},{key:"getTreeSize",value:function(i){var a=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,i);return{min:a.min_y,max:a.max_y}}},{key:"sort",value:function(i){Du.exports.sort(i,function(a,o){return a.y-o.y})}},{key:"fix",value:function(i,a){i.x=this.layout.options.hierarchical.levelSeparation*a,i.options.fixed.x=!0}},{key:"shift",value:function(i,a){this.layout.body.nodes[i].y+=a}}]),e}(TE),kE={exports:{}},oae=X,sae=Gr.every,uae=Cn,lae=uae("every");oae({target:"Array",proto:!0,forced:!lae},{every:function(n){return sae(this,n,arguments.length>1?arguments[1]:void 0)}});var hae=Ve,dae=hae("Array").every,fae=ke,cae=dae,xh=Array.prototype,vae=function(r){var n=r.every;return r===xh||fae(xh,r)&&n===xh.every?cae:n},pae=vae,gae=pae;(function(r){r.exports=gae})(kE);var IE=U(kE.exports);function yae(r,n){var e=typeof _r<"u"&&rr(r)||r["@@iterator"];if(!e){if(le(r)||(e=mae(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
99
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function mae(r,n){var e;if(r){if(typeof r=="string")return Km(r,n);var t=Le(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Ur(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Km(r,n)}}function Km(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}function bae(r,n){var e=new ti;return pe(r).call(r,function(t){var i;pe(i=t.edges).call(i,function(a){a.connected&&e.add(a)})}),pe(e).call(e,function(t){var i=t.from.id,a=t.to.id;n[i]==null&&(n[i]=0),(n[a]==null||n[i]>=n[a])&&(n[a]=n[i]+1)}),n}function $ae(r){return PE(function(n){var e,t;return IE(e=pt(t=n.edges).call(t,function(i){return r.has(i.toId)})).call(e,function(i){return i.to===n})},function(n,e){return e>n},"from",r)}function wae(r){return PE(function(n){var e,t;return IE(e=pt(t=n.edges).call(t,function(i){return r.has(i.toId)})).call(e,function(i){return i.from===n})},function(n,e){return e<n},"to",r)}function PE(r,n,e,t){var i,a=hi(null),o=EE(i=Kt(H_(t).call(t))).call(i,function(c,v){return c+1+v.edges.length},0),s=e+"Id",u=e==="to"?1:-1,l=yae(t),h;try{var d=function(){var v=Ee(h.value,2),g=v[0],b=v[1];if(!t.has(g)||!r(b))return"continue";a[g]=0;for(var p=[b],$=0,y=void 0,m=function(){var k,S;if(!t.has(g))return"continue";var w=a[y.id]+u;if(pe(k=pt(S=y.edges).call(S,function(E){return E.connected&&E.to!==E.from&&E[e]!==y&&t.has(E.toId)&&t.has(E.fromId)})).call(k,function(E){var F=E[s],H=a[F];(H==null||n(w,H))&&(a[F]=w,p.push(E[e]))}),$>o)return{v:{v:bae(t,a)}};++$};y=p.pop();){var _=m();if(_!=="continue"&&ve(_)==="object")return _.v}};for(l.s();!(h=l.n()).done;){var f=d();if(f!=="continue"&&ve(f)==="object")return f.v}}catch(c){l.e(c)}finally{l.f()}return a}var _ae=function(){function r(){D(this,r),this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}return R(r,[{key:"addRelation",value:function(e,t){this.childrenReference[e]===void 0&&(this.childrenReference[e]=[]),this.childrenReference[e].push(t),this.parentReference[t]===void 0&&(this.parentReference[t]=[]),this.parentReference[t].push(e)}},{key:"checkIfTree",value:function(){for(var e in this.parentReference)if(this.parentReference[e].length>1){this.isTree=!1;return}this.isTree=!0}},{key:"numTrees",value:function(){return this.treeIndex+1}},{key:"setTreeIndex",value:function(e,t){t!==void 0&&this.trees[e.id]===void 0&&(this.trees[e.id]=t,this.treeIndex=Math.max(t,this.treeIndex))}},{key:"ensureLevel",value:function(e){this.levels[e]===void 0&&(this.levels[e]=0)}},{key:"getMaxLevel",value:function(e){var t=this,i={},a=function o(s){if(i[s]!==void 0)return i[s];var u=t.levels[s];if(t.childrenReference[s]){var l=t.childrenReference[s];if(l.length>0)for(var h=0;h<l.length;h++)u=Math.max(u,o(l[h]))}return i[s]=u,u};return a(e)}},{key:"levelDownstream",value:function(e,t){this.levels[t.id]===void 0&&(this.levels[e.id]===void 0&&(this.levels[e.id]=0),this.levels[t.id]=this.levels[e.id]+1)}},{key:"setMinLevelToZero",value:function(e){var t=1e9;for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&this.levels[i]!==void 0&&(t=Math.min(this.levels[i],t));for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&this.levels[a]!==void 0&&(this.levels[a]-=t)}},{key:"getTreeSize",value:function(e,t){var i=1e9,a=-1e9,o=1e9,s=-1e9;for(var u in this.trees)if(Object.prototype.hasOwnProperty.call(this.trees,u)&&this.trees[u]===t){var l=e[u];i=Math.min(l.x,i),a=Math.max(l.x,a),o=Math.min(l.y,o),s=Math.max(l.y,s)}return{min_x:i,max_x:a,min_y:o,max_y:s}}},{key:"hasSameParent",value:function(e,t){var i=this.parentReference[e.id],a=this.parentReference[t.id];if(i===void 0||a===void 0)return!1;for(var o=0;o<i.length;o++)for(var s=0;s<a.length;s++)if(i[o]==a[s])return!0;return!1}},{key:"inSameSubNetwork",value:function(e,t){return this.trees[e.id]===this.trees[t.id]}},{key:"getLevels",value:function(){return _e(this.distributionOrdering)}},{key:"addToOrdering",value:function(e,t){this.distributionOrdering[t]===void 0&&(this.distributionOrdering[t]=[]);var i=!1,a=this.distributionOrdering[t];for(var o in a)if(a[o]===e){i=!0;break}i||(this.distributionOrdering[t].push(e),this.distributionIndex[e.id]=this.distributionOrdering[t].length-1)}}]),r}(),Eae=function(){function r(n){D(this,r),this.body=n,this._resetRNG(Math.random()+":"+ws()),this.setPhysics=!1,this.options={},this.optionsBackup={physics:{}},this.defaultOptions={randomSeed:void 0,improvedLayout:!0,clusterThreshold:150,hierarchical:{enabled:!1,levelSeparation:150,nodeSpacing:100,treeSpacing:200,blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:"UD",sortMethod:"hubsize"}},Ae(this.options,this.defaultOptions),this.bindEventListeners()}return R(r,[{key:"bindEventListeners",value:function(){var e=this;this.body.emitter.on("_dataChanged",function(){e.setupHierarchicalLayout()}),this.body.emitter.on("_dataLoaded",function(){e.layoutNetwork()}),this.body.emitter.on("_resetHierarchicalLayout",function(){e.setupHierarchicalLayout()}),this.body.emitter.on("_adjustEdgesForHierarchicalLayout",function(){if(e.options.hierarchical.enabled===!0){var t=e.direction.curveType();e.body.emitter.emit("_forceDisableDynamicCurves",t,!1)}})}},{key:"setOptions",value:function(e,t){if(e!==void 0){var i=this.options.hierarchical,a=i.enabled;if(An(["randomSeed","improvedLayout","clusterThreshold"],this.options,e),kt(this.options,e,"hierarchical"),e.randomSeed!==void 0&&this._resetRNG(e.randomSeed),i.enabled===!0)return a===!0&&this.body.emitter.emit("refresh",!0),i.direction==="RL"||i.direction==="DU"?i.levelSeparation>0&&(i.levelSeparation*=-1):i.levelSeparation<0&&(i.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(t);if(a===!0)return this.body.emitter.emit("refresh"),me(t,this.optionsBackup)}return t}},{key:"_resetRNG",value:function(e){this.initialRandomSeed=e,this._rng=Au(this.initialRandomSeed)}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(e){if(this.options.hierarchical.enabled===!0){var t=this.optionsBackup.physics;e.physics===void 0||e.physics===!0?(e.physics={enabled:t.enabled===void 0?!0:t.enabled,solver:"hierarchicalRepulsion"},t.enabled=t.enabled===void 0?!0:t.enabled,t.solver=t.solver||"barnesHut"):ve(e.physics)==="object"?(t.enabled=e.physics.enabled===void 0?!0:e.physics.enabled,t.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):e.physics!==!1&&(t.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"});var i=this.direction.curveType();if(e.edges===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges={smooth:!1};else if(e.edges.smooth===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges.smooth=!1;else if(typeof e.edges.smooth=="boolean")this.optionsBackup.edges={smooth:e.edges.smooth},e.edges.smooth={enabled:e.edges.smooth,type:i};else{var a=e.edges.smooth;a.type!==void 0&&a.type!=="dynamic"&&(i=a.type),this.optionsBackup.edges={smooth:{enabled:a.enabled===void 0?!0:a.enabled,type:a.type===void 0?"dynamic":a.type,roundness:a.roundness===void 0?.5:a.roundness,forceDirection:a.forceDirection===void 0?!1:a.forceDirection}},e.edges.smooth={enabled:a.enabled===void 0?!0:a.enabled,type:i,roundness:a.roundness===void 0?.5:a.roundness,forceDirection:a.forceDirection===void 0?!1:a.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",i)}return e}},{key:"positionInitially",value:function(e){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);for(var t=e.length+50,i=0;i<e.length;i++){var a=e[i],o=2*Math.PI*this._rng();a.x===void 0&&(a.x=t*Math.cos(o)),a.y===void 0&&(a.y=t*Math.sin(o))}}}},{key:"layoutNetwork",value:function(){if(this.options.hierarchical.enabled!==!0&&this.options.improvedLayout===!0){for(var e=this.body.nodeIndices,t=0,i=0;i<e.length;i++){var a=this.body.nodes[e[i]];a.predefinedPosition===!0&&(t+=1)}if(t<.5*e.length){var o=10,s=0,u=this.options.clusterThreshold,l={clusterNodeProperties:{shape:"ellipse",label:"",group:"",font:{multi:!1}},clusterEdgeProperties:{label:"",font:{multi:!1},smooth:{enabled:!1}}};if(e.length>u){for(var h=e.length;e.length>u&&s<=o;){s+=1;var d=e.length;s%3===0?this.body.modules.clustering.clusterBridges(l):this.body.modules.clustering.clusterOutliers(l);var f=e.length;if(d==f&&s%3!==0){this._declusterAll(),this.body.emitter.emit("_layoutFailed"),console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.");return}}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*h)})}s>o&&console.info("The clustering didn't succeed within the amount of interations allowed, progressing with partial result."),this.body.modules.kamadaKawai.solve(e,this.body.edgeIndices,!0),this._shiftToCenter();for(var c=70,v=0;v<e.length;v++){var g=this.body.nodes[e[v]];g.predefinedPosition===!1&&(g.x+=(.5-this._rng())*c,g.y+=(.5-this._rng())*c)}this._declusterAll(),this.body.emitter.emit("_repositionBezierNodes")}}}},{key:"_shiftToCenter",value:function(){for(var e=nt.getRangeCore(this.body.nodes,this.body.nodeIndices),t=nt.findCenter(e),i=0;i<this.body.nodeIndices.length;i++){var a=this.body.nodes[this.body.nodeIndices[i]];a.x-=t.x,a.y-=t.y}}},{key:"_declusterAll",value:function(){for(var e=!0;e===!0;){e=!1;for(var t=0;t<this.body.nodeIndices.length;t++)this.body.nodes[this.body.nodeIndices[t]].isCluster===!0&&(e=!0,this.body.modules.clustering.openCluster(this.body.nodeIndices[t],{},!1));e===!0&&this.body.emitter.emit("_dataChanged")}}},{key:"getSeed",value:function(){return this.initialRandomSeed}},{key:"setupHierarchicalLayout",value:function(){if(this.options.hierarchical.enabled===!0&&this.body.nodeIndices.length>0){var e,t,i=!1,a=!1;this.lastNodeOnLevel={},this.hierarchical=new _ae;for(t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&(e=this.body.nodes[t],e.options.level!==void 0?(i=!0,this.hierarchical.levels[t]=e.options.level):a=!0);if(a===!0&&i===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");if(a===!0){var o=this.options.hierarchical.sortMethod;o==="hubsize"?this._determineLevelsByHubsize():o==="directed"?this._determineLevelsDirected():o==="custom"&&this._determineLevelsCustomCallback()}for(var s in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,s)&&this.hierarchical.ensureLevel(s);var u=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(u),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){var e=this,t=!1,i={},a=function(){for(var y=s(),m=0,_=0;_<y.length-1;_++){var O=y[_].max-y[_+1].min;m+=O+e.options.hierarchical.treeSpacing,o(_+1,m)}},o=function(y,m){var _=e.hierarchical.trees;for(var O in _)Object.prototype.hasOwnProperty.call(_,O)&&_[O]===y&&e.direction.shift(O,m)},s=function(){for(var y=[],m=0;m<e.hierarchical.numTrees();m++)y.push(e.direction.getTreeSize(m));return y},u=function $(y,m){if(!m[y.id]&&(m[y.id]=!0,e.hierarchical.childrenReference[y.id])){var _=e.hierarchical.childrenReference[y.id];if(_.length>0)for(var O=0;O<_.length;O++)$(e.body.nodes[_[O]],m)}},l=function(y){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e9,_=1e9,O=1e9,k=1e9,S=-1e9;for(var w in y)if(Object.prototype.hasOwnProperty.call(y,w)){var E=e.body.nodes[w],F=e.hierarchical.levels[E.id],H=e.direction.getPosition(E),z=e._getSpaceAroundNode(E,y),q=Ee(z,2),Q=q[0],re=q[1];_=Math.min(Q,_),O=Math.min(re,O),F<=m&&(k=Math.min(H,k),S=Math.max(H,S))}return[k,S,_,O]},h=function(y,m){var _=e.hierarchical.getMaxLevel(y.id),O=e.hierarchical.getMaxLevel(m.id);return Math.min(_,O)},d=function(y,m,_){for(var O=e.hierarchical,k=0;k<m.length;k++){var S=m[k],w=O.distributionOrdering[S];if(w.length>1)for(var E=0;E<w.length-1;E++){var F=w[E],H=w[E+1];O.hasSameParent(F,H)&&O.inSameSubNetwork(F,H)&&y(F,H,_)}}},f=function(y,m){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,O=e.direction.getPosition(y),k=e.direction.getPosition(m),S=Math.abs(k-O),w=e.options.hierarchical.nodeSpacing;if(S>w){var E={},F={};u(y,E),u(m,F);var H=h(y,m),z=l(E,H),q=l(F,H),Q=z[1],re=q[0],ae=q[2],C=Math.abs(Q-re);if(C>w){var I=Q-re+w;I<-ae+w&&(I=-ae+w),I<0&&(e._shiftBlock(m.id,I),t=!0,_===!0&&e._centerParent(m))}}},c=function(y,m){for(var _=m.id,O=m.edges,k=e.hierarchical.levels[m.id],S=e.options.hierarchical.levelSeparation*e.options.hierarchical.levelSeparation,w={},E=[],F=0;F<O.length;F++){var H=O[F];if(H.toId!=H.fromId){var z=H.toId==_?H.from:H.to;w[O[F].id]=z,e.hierarchical.levels[z.id]<k&&E.push(H)}}var q=function(V,B){for(var Z=0,ne=0;ne<B.length;ne++)if(w[B[ne].id]!==void 0){var he=e.direction.getPosition(w[B[ne].id])-V;Z+=he/Math.sqrt(he*he+S)}return Z},Q=function(V,B){for(var Z=0,ne=0;ne<B.length;ne++)if(w[B[ne].id]!==void 0){var he=e.direction.getPosition(w[B[ne].id])-V;Z-=S*Math.pow(he*he+S,-1.5)}return Z},re=function(V,B){for(var Z=e.direction.getPosition(m),ne={},he=0;he<V;he++){var Ne=q(Z,B),we=Q(Z,B),Ye=40,Yr=Math.max(-Ye,Math.min(Ye,Math.round(Ne/we)));if(Z=Z-Yr,ne[Z]!==void 0)break;ne[Z]=he}return Z},ae=function(V){var B=e.direction.getPosition(m);if(i[m.id]===void 0){var Z={};u(m,Z),i[m.id]=Z}var ne=l(i[m.id]),he=ne[2],Ne=ne[3],we=V-B,Ye=0;we>0?Ye=Math.min(we,Ne-e.options.hierarchical.nodeSpacing):we<0&&(Ye=-Math.min(-we,he-e.options.hierarchical.nodeSpacing)),Ye!=0&&(e._shiftBlock(m.id,Ye),t=!0)},C=function(V){var B=e.direction.getPosition(m),Z=e._getSpaceAroundNode(m),ne=Ee(Z,2),he=ne[0],Ne=ne[1],we=V-B,Ye=B;we>0?Ye=Math.min(B+(Ne-e.options.hierarchical.nodeSpacing),V):we<0&&(Ye=Math.max(B-(he-e.options.hierarchical.nodeSpacing),V)),Ye!==B&&(e.direction.setPosition(m,Ye),t=!0)},I=re(y,E);ae(I),I=re(y,O),C(I)},v=function(y){var m=e.hierarchical.getLevels();m=li(m).call(m);for(var _=0;_<y;_++){t=!1;for(var O=0;O<m.length;O++)for(var k=m[O],S=e.hierarchical.distributionOrdering[k],w=0;w<S.length;w++)c(1e3,S[w]);if(t!==!0)break}},g=function(y){var m=e.hierarchical.getLevels();m=li(m).call(m);for(var _=0;_<y&&(t=!1,d(f,m,!0),t===!0);_++);},b=function(){for(var y in e.body.nodes)Object.prototype.hasOwnProperty.call(e.body.nodes,y)&&e._centerParent(e.body.nodes[y])},p=function(){var y=e.hierarchical.getLevels();y=li(y).call(y);for(var m=0;m<y.length;m++)for(var _=y[m],O=e.hierarchical.distributionOrdering[_],k=0;k<O.length;k++)e._centerParent(O[k])};this.options.hierarchical.blockShifting===!0&&(g(5),b()),this.options.hierarchical.edgeMinimization===!0&&v(20),this.options.hierarchical.parentCentralization===!0&&p(),a()}},{key:"_getSpaceAroundNode",value:function(e,t){var i=!0;t===void 0&&(i=!1);var a=this.hierarchical.levels[e.id];if(a!==void 0){var o=this.hierarchical.distributionIndex[e.id],s=this.direction.getPosition(e),u=this.hierarchical.distributionOrdering[a],l=1e9,h=1e9;if(o!==0){var d=u[o-1];if(i===!0&&t[d.id]===void 0||i===!1){var f=this.direction.getPosition(d);l=s-f}}if(o!=u.length-1){var c=u[o+1];if(i===!0&&t[c.id]===void 0||i===!1){var v=this.direction.getPosition(c);h=Math.min(h,v-s)}}return[l,h]}else return[0,0]}},{key:"_centerParent",value:function(e){if(this.hierarchical.parentReference[e.id])for(var t=this.hierarchical.parentReference[e.id],i=0;i<t.length;i++){var a=t[i],o=this.body.nodes[a],s=this.hierarchical.childrenReference[a];if(s!==void 0){var u=this._getCenterPosition(s),l=this.direction.getPosition(o),h=this._getSpaceAroundNode(o),d=Ee(h,2),f=d[0],c=d[1],v=l-u;(v<0&&Math.abs(v)<c-this.options.hierarchical.nodeSpacing||v>0&&Math.abs(v)<f-this.options.hierarchical.nodeSpacing)&&this.direction.setPosition(o,u)}}}},{key:"_placeNodesByHierarchy",value:function(e){this.positionedNodes={};for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var i,a=_e(e[t]);a=this._indexArrayToNodes(a),Ph(i=this.direction).call(i,a);for(var o=0,s=0;s<a.length;s++){var u=a[s];if(this.positionedNodes[u.id]===void 0){var l=this.options.hierarchical.nodeSpacing,h=l*o;o>0&&(h=this.direction.getPosition(a[s-1])+l),this.direction.setPosition(u,h,t),this._validatePositionAndContinue(u,t,h),o++}}}}},{key:"_placeBranchNodes",value:function(e,t){var i,a=this.hierarchical.childrenReference[e];if(a!==void 0){for(var o=[],s=0;s<a.length;s++)o.push(this.body.nodes[a[s]]);Ph(i=this.direction).call(i,o);for(var u=0;u<o.length;u++){var l=o[u],h=this.hierarchical.levels[l.id];if(h>t&&this.positionedNodes[l.id]===void 0){var d=this.options.hierarchical.nodeSpacing,f=void 0;u===0?f=this.direction.getPosition(this.body.nodes[e]):f=this.direction.getPosition(o[u-1])+d,this.direction.setPosition(l,f,h),this._validatePositionAndContinue(l,h,f)}else return}var c=this._getCenterPosition(o);this.direction.setPosition(this.body.nodes[e],c,t)}}},{key:"_validatePositionAndContinue",value:function(e,t,i){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[t]!==void 0){var a=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[t]]);if(i-a<this.options.hierarchical.nodeSpacing){var o=a+this.options.hierarchical.nodeSpacing-i,s=this._findCommonParent(this.lastNodeOnLevel[t],e.id);this._shiftBlock(s.withChild,o)}}this.lastNodeOnLevel[t]=e.id,this.positionedNodes[e.id]=!0,this._placeBranchNodes(e.id,t)}}},{key:"_indexArrayToNodes",value:function(e){for(var t=[],i=0;i<e.length;i++)t.push(this.body.nodes[e[i]]);return t}},{key:"_getDistribution",value:function(){var e={},t,i;for(t in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,t)){i=this.body.nodes[t];var a=this.hierarchical.levels[t]===void 0?0:this.hierarchical.levels[t];this.direction.fix(i,a),e[a]===void 0&&(e[a]={}),e[a][t]=i}return e}},{key:"_getActiveEdges",value:function(e){var t=this,i=[];return te(e.edges,function(a){var o;oe(o=t.body.edgeIndices).call(o,a.id)!==-1&&i.push(a)}),i}},{key:"_getHubSizes",value:function(){var e=this,t={},i=this.body.nodeIndices;te(i,function(o){var s=e.body.nodes[o],u=e._getActiveEdges(s).length;t[u]=!0});var a=[];return te(t,function(o){a.push(Number(o))}),Ph(Gm).call(Gm,a,function(o,s){return s-o}),a}},{key:"_determineLevelsByHubsize",value:function(){for(var e=this,t=function(l,h){e.hierarchical.levelDownstream(l,h)},i=this._getHubSizes(),a=function(l){var h=i[l];if(h===0)return"break";te(e.body.nodeIndices,function(d){var f=e.body.nodes[d];h===e._getActiveEdges(f).length&&e._crawlNetwork(t,d)})},o=0;o<i.length;++o){var s=a(o);if(s==="break")break}}},{key:"_determineLevelsCustomCallback",value:function(){var e=this,t=1e5,i=function(s,u,l){},a=function(s,u,l){var h=e.hierarchical.levels[s.id];h===void 0&&(h=e.hierarchical.levels[s.id]=t);var d=i(nt.cloneOptions(s,"node"),nt.cloneOptions(u,"node"),nt.cloneOptions(l,"edge"));e.hierarchical.levels[u.id]=h+d};this._crawlNetwork(a),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_determineLevelsDirected",value:function(){var e,t=this,i=EE(e=this.body.nodeIndices).call(e,function(a,o){return a.set(o,t.body.nodes[o]),a},new A_);this.options.hierarchical.shakeTowards==="roots"?this.hierarchical.levels=wae(i):this.hierarchical.levels=$ae(i),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_generateMap",value:function(){var e=this,t=function(a,o){e.hierarchical.levels[o.id]>e.hierarchical.levels[a.id]&&e.hierarchical.addRelation(a.id,o.id)};this._crawlNetwork(t),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},i=arguments.length>1?arguments[1]:void 0,a={},o=function f(c,v){if(a[c.id]===void 0){e.hierarchical.setTreeIndex(c,v),a[c.id]=!0;for(var g,b=e._getActiveEdges(c),p=0;p<b.length;p++){var $=b[p];$.connected===!0&&($.toId==c.id?g=$.from:g=$.to,c.id!=g.id&&(t(c,g,$),f(g,v)))}}};if(i===void 0)for(var s=0,u=0;u<this.body.nodeIndices.length;u++){var l=this.body.nodeIndices[u];if(a[l]===void 0){var h=this.body.nodes[l];o(h,s),s+=1}}else{var d=this.body.nodes[i];if(d===void 0){console.error("Node not found:",i);return}o(d)}}},{key:"_shiftBlock",value:function(e,t){var i=this,a={},o=function s(u){if(!a[u]){a[u]=!0,i.direction.shift(u,t);var l=i.hierarchical.childrenReference[u];if(l!==void 0)for(var h=0;h<l.length;h++)s(l[h])}};o(e)}},{key:"_findCommonParent",value:function(e,t){var i=this,a={},o=function u(l,h){var d=i.hierarchical.parentReference[h];if(d!==void 0)for(var f=0;f<d.length;f++){var c=d[f];l[c]=!0,u(l,c)}},s=function u(l,h){var d=i.hierarchical.parentReference[h];if(d!==void 0)for(var f=0;f<d.length;f++){var c=d[f];if(l[c]!==void 0)return{foundParent:c,withChild:h};var v=u(l,c);if(v.foundParent!==null)return v}return{foundParent:null,withChild:h}};return o(a,e),s(a,t)}},{key:"setDirectionStrategy",value:function(){var e=this.options.hierarchical.direction==="UD"||this.options.hierarchical.direction==="DU";e?this.direction=new nae(this):this.direction=new aae(this)}},{key:"_getCenterPosition",value:function(e){for(var t=1e9,i=-1e9,a=0;a<e.length;a++){var o=void 0;if(e[a].id!==void 0)o=e[a];else{var s=e[a];o=this.body.nodes[s]}var u=this.direction.getPosition(o);t=Math.min(t,u),i=Math.max(i,u)}return .5*(t+i)}}]),r}();function Sae(r,n){var e=typeof _r<"u"&&rr(r)||r["@@iterator"];if(!e){if(le(r)||(e=Oae(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
100
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(r)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Oae(r,n){var e;if(r){if(typeof r=="string")return qm(r,n);var t=Le(e=Object.prototype.toString.call(r)).call(e,8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Ur(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return qm(r,n)}}function qm(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}var Tae=function(){function r(n,e,t,i){var a=this,o,s;D(this,r),this.body=n,this.canvas=e,this.selectionHandler=t,this.interactionHandler=i,this.editMode=!1,this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0,this._domEventListenerCleanupQueue=[],this.temporaryUIFunctions={},this.temporaryEventFunctions=[],this.touchTime=0,this.temporaryIds={nodes:[],edges:[]},this.guiEnabled=!1,this.inMode=!1,this.selectedControlNode=void 0,this.options={},this.defaultOptions={enabled:!1,initiallyActive:!1,addNode:!0,addEdge:!0,editNode:void 0,editEdge:!0,deleteNode:!0,deleteEdge:!0,controlNodeStyle:{shape:"dot",size:6,color:{background:"#ff0000",border:"#3c3c3c",highlight:{background:"#07f968",border:"#3c3c3c"}},borderWidth:2,borderWidthSelected:2}},Ae(this.options,this.defaultOptions),this.body.emitter.on("destroy",function(){a._clean()}),this.body.emitter.on("_dataChanged",A(o=this._restore).call(o,this)),this.body.emitter.on("_resetData",A(s=this._restore).call(s,this))}return R(r,[{key:"_restore",value:function(){this.inMode!==!1&&(this.options.initiallyActive===!0?this.enableEditMode():this.disableEditMode())}},{key:"setOptions",value:function(e,t,i){t!==void 0&&(t.locale!==void 0?this.options.locale=t.locale:this.options.locale=i.locale,t.locales!==void 0?this.options.locales=t.locales:this.options.locales=i.locales),e!==void 0&&(typeof e=="boolean"?this.options.enabled=e:(this.options.enabled=!0,me(this.options,e)),this.options.initiallyActive===!0&&(this.editMode=!0),this._setup())}},{key:"toggleEditMode",value:function(){this.editMode===!0?this.disableEditMode():this.enableEditMode()}},{key:"enableEditMode",value:function(){this.editMode=!0,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="block",this.closeDiv.style.display="block",this.editModeDiv.style.display="none",this.showManipulatorToolbar())}},{key:"disableEditMode",value:function(){this.editMode=!1,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="none",this.closeDiv.style.display="none",this.editModeDiv.style.display="block",this._createEditButton())}},{key:"showManipulatorToolbar",value:function(){if(this._clean(),this.manipulationDOM={},this.guiEnabled===!0){var e,t;this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block";var i=this.selectionHandler.getSelectedNodeCount(),a=this.selectionHandler.getSelectedEdgeCount(),o=i+a,s=this.options.locales[this.options.locale],u=!1;this.options.addNode!==!1&&(this._createAddNodeButton(s),u=!0),this.options.addEdge!==!1&&(u===!0?this._createSeperator(1):u=!0,this._createAddEdgeButton(s)),i===1&&typeof this.options.editNode=="function"?(u===!0?this._createSeperator(2):u=!0,this._createEditNodeButton(s)):a===1&&i===0&&this.options.editEdge!==!1&&(u===!0?this._createSeperator(3):u=!0,this._createEditEdgeButton(s)),o!==0&&(i>0&&this.options.deleteNode!==!1?(u===!0&&this._createSeperator(4),this._createDeleteButton(s)):i===0&&this.options.deleteEdge!==!1&&(u===!0&&this._createSeperator(4),this._createDeleteButton(s))),this._bindElementEvents(this.closeDiv,A(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",A(t=this.showManipulatorToolbar).call(t,this))}this.body.emitter.emit("_redraw")}},{key:"addNodeMode",value:function(){var e;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var t,i=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(i),this._createSeperator(),this._createDescription(i.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,A(t=this.toggleEditMode).call(t,this))}this._temporaryBindEvent("click",A(e=this._performAddNode).call(e,this))}},{key:"editNode",value:function(){var e=this;this.editMode!==!0&&this.enableEditMode(),this._clean();var t=this.selectionHandler.getSelectedNodes()[0];if(t!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(t.isCluster!==!0){var i=me({},t.options,!1);if(i.x=t.x,i.y=t.y,this.options.editNode.length===2)this.options.editNode(i,function(a){a!=null&&e.inMode==="editNode"&&e.body.data.nodes.getDataSet().update(a),e.showManipulatorToolbar()});else throw new Error("The function for edit does not support two arguments (data, callback)")}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError);else throw new Error("No function has been configured to handle the editing of nodes.");else this.showManipulatorToolbar()}},{key:"addEdgeMode",value:function(){var e,t,i,a,o;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var s,u=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(u),this._createSeperator(),this._createDescription(u.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,A(s=this.toggleEditMode).call(s,this))}this._temporaryBindUI("onTouch",A(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",A(t=this._finishConnect).call(t,this)),this._temporaryBindUI("onDrag",A(i=this._dragControlNode).call(i,this)),this._temporaryBindUI("onRelease",A(a=this._finishConnect).call(a,this)),this._temporaryBindUI("onDragStart",A(o=this._dragStartEdge).call(o,this)),this._temporaryBindUI("onHold",function(){})}},{key:"editEdgeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",ve(this.options.editEdge)==="object"&&typeof this.options.editEdge.editWithoutDrag=="function"&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0)){var e=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(e.from.id,e.to.id);return}if(this.guiEnabled===!0){var t,i=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(i),this._createSeperator(),this._createDescription(i.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,A(t=this.toggleEditMode).call(t,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var a,o,s,u,l=this.body.edges[this.edgeBeingEditedId],h=this._getNewTargetNode(l.from.x,l.from.y),d=this._getNewTargetNode(l.to.x,l.to.y);this.temporaryIds.nodes.push(h.id),this.temporaryIds.nodes.push(d.id),this.body.nodes[h.id]=h,this.body.nodeIndices.push(h.id),this.body.nodes[d.id]=d,this.body.nodeIndices.push(d.id),this._temporaryBindUI("onTouch",A(a=this._controlNodeTouch).call(a,this)),this._temporaryBindUI("onTap",function(){}),this._temporaryBindUI("onHold",function(){}),this._temporaryBindUI("onDragStart",A(o=this._controlNodeDragStart).call(o,this)),this._temporaryBindUI("onDrag",A(s=this._controlNodeDrag).call(s,this)),this._temporaryBindUI("onDragEnd",A(u=this._controlNodeDragEnd).call(u,this)),this._temporaryBindUI("onMouseMove",function(){}),this._temporaryBindEvent("beforeDrawing",function(f){var c=l.edgeType.findBorderPositions(f);h.selected===!1&&(h.x=c.from.x,h.y=c.from.y),d.selected===!1&&(d.x=c.to.x,d.y=c.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}},{key:"deleteSelected",value:function(){var e=this;this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";var t=this.selectionHandler.getSelectedNodeIds(),i=this.selectionHandler.getSelectedEdgeIds(),a=void 0;if(t.length>0){for(var o=0;o<t.length;o++)if(this.body.nodes[t[o]].isCluster===!0){alert(this.options.locales[this.options.locale].deleteClusterError||this.options.locales.en.deleteClusterError);return}typeof this.options.deleteNode=="function"&&(a=this.options.deleteNode)}else i.length>0&&typeof this.options.deleteEdge=="function"&&(a=this.options.deleteEdge);if(typeof a=="function"){var s={nodes:t,edges:i};if(a.length===2)a(s,function(u){u!=null&&e.inMode==="delete"?(e.body.data.edges.getDataSet().remove(u.edges),e.body.data.nodes.getDataSet().remove(u.nodes),e.body.emitter.emit("startSimulation"),e.showManipulatorToolbar()):(e.body.emitter.emit("startSimulation"),e.showManipulatorToolbar())});else throw new Error("The function for delete does not support two arguments (data, callback)")}else this.body.data.edges.getDataSet().remove(i),this.body.data.nodes.getDataSet().remove(t),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:"_createWrappers",value:function(){if(this.manipulationDiv===void 0&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),this.editModeDiv===void 0&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",this.editMode===!0?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),this.closeDiv===void 0){var e,t;this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",(e=(t=this.options.locales[this.options.locale])===null||t===void 0?void 0:t.close)!==null&&e!==void 0?e:this.options.locales.en.close),this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv)}}},{key:"_getNewTargetNode",value:function(e,t){var i=me({},this.options.controlNodeStyle);i.id="targetNode"+Zn(),i.hidden=!1,i.physics=!1,i.x=e,i.y=t;var a=this.body.functions.createNode(i);return a.shape.boundingBox={left:e,right:e,top:t,bottom:t},a}},{key:"_createEditButton",value:function(){var e;this._clean(),this.manipulationDOM={},kr(this.editModeDiv);var t=this.options.locales[this.options.locale],i=this._createButton("editMode","vis-edit vis-edit-mode",t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(i),this._bindElementEvents(i,A(e=this.toggleEditMode).call(e,this))}},{key:"_clean",value:function(){this.inMode=!1,this.guiEnabled===!0&&(kr(this.editModeDiv),kr(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanupDOMEventListeners",value:function(){var e,t=Sae(dr(e=this._domEventListenerCleanupQueue).call(e,0)),i;try{for(t.s();!(i=t.n()).done;){var a=i.value;a()}}catch(o){t.e(o)}finally{t.f()}}},{key:"_removeManipulationDOM",value:function(){this._clean(),kr(this.manipulationDiv),kr(this.editModeDiv),kr(this.closeDiv),this.manipulationDiv&&this.canvas.frame.removeChild(this.manipulationDiv),this.editModeDiv&&this.canvas.frame.removeChild(this.editModeDiv),this.closeDiv&&this.canvas.frame.removeChild(this.closeDiv),this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0}},{key:"_createSeperator",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+e]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+e].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+e])}},{key:"_createAddNodeButton",value:function(e){var t,i=this._createButton("addNode","vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,A(t=this.addNodeMode).call(t,this))}},{key:"_createAddEdgeButton",value:function(e){var t,i=this._createButton("addEdge","vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,A(t=this.addEdgeMode).call(t,this))}},{key:"_createEditNodeButton",value:function(e){var t,i=this._createButton("editNode","vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,A(t=this.editNode).call(t,this))}},{key:"_createEditEdgeButton",value:function(e){var t,i=this._createButton("editEdge","vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,A(t=this.editEdgeMode).call(t,this))}},{key:"_createDeleteButton",value:function(e){var t,i;this.options.rtl?i="vis-delete-rtl":i="vis-delete";var a=this._createButton("delete",i,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(a),this._bindElementEvents(a,A(t=this.deleteSelected).call(t,this))}},{key:"_createBackButton",value:function(e){var t,i=this._createButton("back","vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,A(t=this.showManipulatorToolbar).call(t,this))}},{key:"_createButton",value:function(e,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"vis-label";return this.manipulationDOM[e+"Div"]=document.createElement("button"),this.manipulationDOM[e+"Div"].className="vis-button "+t,this.manipulationDOM[e+"Label"]=document.createElement("div"),this.manipulationDOM[e+"Label"].className=a,this.manipulationDOM[e+"Label"].innerText=i,this.manipulationDOM[e+"Div"].appendChild(this.manipulationDOM[e+"Label"]),this.manipulationDOM[e+"Div"]}},{key:"_createDescription",value:function(e){this.manipulationDOM.descriptionLabel=document.createElement("div"),this.manipulationDOM.descriptionLabel.className="vis-none",this.manipulationDOM.descriptionLabel.innerText=e,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}},{key:"_temporaryBindEvent",value:function(e,t){this.temporaryEventFunctions.push({event:e,boundFunction:t}),this.body.emitter.on(e,t)}},{key:"_temporaryBindUI",value:function(e,t){if(this.body.eventListeners[e]!==void 0)this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=t;else throw new Error("This UI function does not exist. Typo? You tried: "+e+" possible are: "+oo(_e(this.body.eventListeners)))}},{key:"_unbindTemporaryUIs",value:function(){for(var e in this.temporaryUIFunctions)Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions,e)&&(this.body.eventListeners[e]=this.temporaryUIFunctions[e],delete this.temporaryUIFunctions[e]);this.temporaryUIFunctions={}}},{key:"_unbindTemporaryEvents",value:function(){for(var e=0;e<this.temporaryEventFunctions.length;e++){var t=this.temporaryEventFunctions[e].event,i=this.temporaryEventFunctions[e].boundFunction;this.body.emitter.off(t,i)}this.temporaryEventFunctions=[]}},{key:"_bindElementEvents",value:function(e,t){var i=new Ji(e,{});xs(i,t),this._domEventListenerCleanupQueue.push(function(){i.destroy()});var a=function(s){var u=s.keyCode,l=s.key;(l==="Enter"||l===" "||u===13||u===32)&&t()};e.addEventListener("keyup",a,!1),this._domEventListenerCleanupQueue.push(function(){e.removeEventListener("keyup",a,!1)})}},{key:"_cleanupTemporaryNodesAndEdges",value:function(){for(var e=0;e<this.temporaryIds.edges.length;e++){var t;this.body.edges[this.temporaryIds.edges[e]].disconnect(),delete this.body.edges[this.temporaryIds.edges[e]];var i=oe(t=this.body.edgeIndices).call(t,this.temporaryIds.edges[e]);if(i!==-1){var a;dr(a=this.body.edgeIndices).call(a,i,1)}}for(var o=0;o<this.temporaryIds.nodes.length;o++){var s;delete this.body.nodes[this.temporaryIds.nodes[o]];var u=oe(s=this.body.nodeIndices).call(s,this.temporaryIds.nodes[o]);if(u!==-1){var l;dr(l=this.body.nodeIndices).call(l,u,1)}}this.temporaryIds={nodes:[],edges:[]}}},{key:"_controlNodeTouch",value:function(e){this.selectionHandler.unselectAll(),this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=Ae({},this.body.view.translation)}},{key:"_controlNodeDragStart",value:function(){var e=this.lastTouch,t=this.selectionHandler._pointerToPositionObject(e),i=this.body.nodes[this.temporaryIds.nodes[0]],a=this.body.nodes[this.temporaryIds.nodes[1]],o=this.body.edges[this.edgeBeingEditedId];this.selectedControlNode=void 0;var s=i.isOverlappingWith(t),u=a.isOverlappingWith(t);s===!0?(this.selectedControlNode=i,o.edgeType.from=i):u===!0&&(this.selectedControlNode=a,o.edgeType.to=a),this.selectedControlNode!==void 0&&this.selectionHandler.selectObject(this.selectedControlNode),this.body.emitter.emit("_redraw")}},{key:"_controlNodeDrag",value:function(e){this.body.emitter.emit("disablePhysics");var t=this.body.functions.getPointer(e.center),i=this.canvas.DOMtoCanvas(t);this.selectedControlNode!==void 0?(this.selectedControlNode.x=i.x,this.selectedControlNode.y=i.y):this.interactionHandler.onDrag(e),this.body.emitter.emit("_redraw")}},{key:"_controlNodeDragEnd",value:function(e){var t=this.body.functions.getPointer(e.center),i=this.selectionHandler._pointerToPositionObject(t),a=this.body.edges[this.edgeBeingEditedId];if(this.selectedControlNode!==void 0){this.selectionHandler.unselectAll();for(var o=this.selectionHandler._getAllNodesOverlappingWith(i),s=void 0,u=o.length-1;u>=0;u--)if(o[u]!==this.selectedControlNode.id){s=this.body.nodes[o[u]];break}if(s!==void 0&&this.selectedControlNode!==void 0)if(s.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var l=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===l.id?this._performEditEdge(s.id,a.to.id):this._performEditEdge(a.from.id,s.id)}else a.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(e){if(new Date().valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=Ae({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;var t=this.lastTouch,i=this.selectionHandler.getNodeAt(t);if(i!==void 0)if(i.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var a=this._getNewTargetNode(i.x,i.y);this.body.nodes[a.id]=a,this.body.nodeIndices.push(a.id);var o=this.body.functions.createEdge({id:"connectionEdge"+Zn(),from:i.id,to:a.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[o.id]=o,this.body.edgeIndices.push(o.id),this.temporaryIds.nodes.push(a.id),this.temporaryIds.edges.push(o.id)}this.touchTime=new Date().valueOf()}}},{key:"_dragControlNode",value:function(e){var t=this.body.functions.getPointer(e.center),i=this.selectionHandler._pointerToPositionObject(t),a=void 0;this.temporaryIds.edges[0]!==void 0&&(a=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(i),s=void 0,u=o.length-1;u>=0;u--){var l;if(oe(l=this.temporaryIds.nodes).call(l,o[u])===-1){s=this.body.nodes[o[u]];break}}if(e.controlEdge={from:a,to:s?s.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragging",e,t),this.temporaryIds.nodes[0]!==void 0){var h=this.body.nodes[this.temporaryIds.nodes[0]];h.x=this.canvas._XconvertDOMtoCanvas(t.x),h.y=this.canvas._YconvertDOMtoCanvas(t.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(e)}},{key:"_finishConnect",value:function(e){var t=this.body.functions.getPointer(e.center),i=this.selectionHandler._pointerToPositionObject(t),a=void 0;this.temporaryIds.edges[0]!==void 0&&(a=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(i),s=void 0,u=o.length-1;u>=0;u--){var l;if(oe(l=this.temporaryIds.nodes).call(l,o[u])===-1){s=this.body.nodes[o[u]];break}}this._cleanupTemporaryNodesAndEdges(),s!==void 0&&(s.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[a]!==void 0&&this.body.nodes[s.id]!==void 0&&this._performAddEdge(a,s.id)),e.controlEdge={from:a,to:s?s.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragEnd",e,t),this.body.emitter.emit("_redraw")}},{key:"_dragStartEdge",value:function(e){var t=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",e,t,void 0,!0)}},{key:"_performAddNode",value:function(e){var t=this,i={id:Zn(),x:e.pointer.canvas.x,y:e.pointer.canvas.y,label:"new"};if(typeof this.options.addNode=="function")if(this.options.addNode.length===2)this.options.addNode(i,function(a){a!=null&&t.inMode==="addNode"&&t.body.data.nodes.getDataSet().add(a),t.showManipulatorToolbar()});else throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");else this.body.data.nodes.getDataSet().add(i),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(e,t){var i=this,a={from:e,to:t};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(a,function(o){o!=null&&i.inMode==="addEdge"&&(i.body.data.edges.getDataSet().add(o),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())});else throw new Error("The function for connect does not support two arguments (data,callback)");else this.body.data.edges.getDataSet().add(a),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(e,t){var i=this,a={id:this.edgeBeingEditedId,from:e,to:t,label:this.body.data.edges.get(this.edgeBeingEditedId).label},o=this.options.editEdge;if(ve(o)==="object"&&(o=o.editWithoutDrag),typeof o=="function")if(o.length===2)o(a,function(s){s==null||i.inMode!=="editEdge"?(i.body.edges[a.id].updateEdgeType(),i.body.emitter.emit("_redraw"),i.showManipulatorToolbar()):(i.body.data.edges.getDataSet().update(s),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())});else throw new Error("The function for edit does not support two arguments (data, callback)");else this.body.data.edges.getDataSet().update(a),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),r}(),M="string",x="boolean",T="number",Vn="array",W="object",CE="dom",kae="any",Ah=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],Mh={borderWidth:{number:T},borderWidthSelected:{number:T,undefined:"undefined"},brokenImage:{string:M,undefined:"undefined"},chosen:{label:{boolean:x,function:"function"},node:{boolean:x,function:"function"},__type__:{object:W,boolean:x}},color:{border:{string:M},background:{string:M},highlight:{border:{string:M},background:{string:M},__type__:{object:W,string:M}},hover:{border:{string:M},background:{string:M},__type__:{object:W,string:M}},__type__:{object:W,string:M}},opacity:{number:T,undefined:"undefined"},fixed:{x:{boolean:x},y:{boolean:x},__type__:{object:W,boolean:x}},font:{align:{string:M},color:{string:M},size:{number:T},face:{string:M},background:{string:M},strokeWidth:{number:T},strokeColor:{string:M},vadjust:{number:T},multi:{boolean:x,string:M},bold:{color:{string:M},size:{number:T},face:{string:M},mod:{string:M},vadjust:{number:T},__type__:{object:W,string:M}},boldital:{color:{string:M},size:{number:T},face:{string:M},mod:{string:M},vadjust:{number:T},__type__:{object:W,string:M}},ital:{color:{string:M},size:{number:T},face:{string:M},mod:{string:M},vadjust:{number:T},__type__:{object:W,string:M}},mono:{color:{string:M},size:{number:T},face:{string:M},mod:{string:M},vadjust:{number:T},__type__:{object:W,string:M}},__type__:{object:W,string:M}},group:{string:M,number:T,undefined:"undefined"},heightConstraint:{minimum:{number:T},valign:{string:M},__type__:{object:W,boolean:x,number:T}},hidden:{boolean:x},icon:{face:{string:M},code:{string:M},size:{number:T},color:{string:M},weight:{string:M,number:T},__type__:{object:W}},id:{string:M,number:T},image:{selected:{string:M,undefined:"undefined"},unselected:{string:M,undefined:"undefined"},__type__:{object:W,string:M}},imagePadding:{top:{number:T},right:{number:T},bottom:{number:T},left:{number:T},__type__:{object:W,number:T}},label:{string:M,undefined:"undefined"},labelHighlightBold:{boolean:x},level:{number:T,undefined:"undefined"},margin:{top:{number:T},right:{number:T},bottom:{number:T},left:{number:T},__type__:{object:W,number:T}},mass:{number:T},physics:{boolean:x},scaling:{min:{number:T},max:{number:T},label:{enabled:{boolean:x},min:{number:T},max:{number:T},maxVisible:{number:T},drawThreshold:{number:T},__type__:{object:W,boolean:x}},customScalingFunction:{function:"function"},__type__:{object:W}},shadow:{enabled:{boolean:x},color:{string:M},size:{number:T},x:{number:T},y:{number:T},__type__:{object:W,boolean:x}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:x,array:Vn},borderRadius:{number:T},interpolation:{boolean:x},useImageSize:{boolean:x},useBorderWithImage:{boolean:x},coordinateOrigin:{string:["center","top-left"]},__type__:{object:W}},size:{number:T},title:{string:M,dom:CE,undefined:"undefined"},value:{number:T,undefined:"undefined"},widthConstraint:{minimum:{number:T},maximum:{number:T},__type__:{object:W,boolean:x,number:T}},x:{number:T},y:{number:T},__type__:{object:W}},Iae={configure:{enabled:{boolean:x},filter:{boolean:x,string:M,array:Vn,function:"function"},container:{dom:CE},showButton:{boolean:x},__type__:{object:W,boolean:x,string:M,array:Vn,function:"function"}},edges:{arrows:{to:{enabled:{boolean:x},scaleFactor:{number:T},type:{string:Ah},imageHeight:{number:T},imageWidth:{number:T},src:{string:M},__type__:{object:W,boolean:x}},middle:{enabled:{boolean:x},scaleFactor:{number:T},type:{string:Ah},imageWidth:{number:T},imageHeight:{number:T},src:{string:M},__type__:{object:W,boolean:x}},from:{enabled:{boolean:x},scaleFactor:{number:T},type:{string:Ah},imageWidth:{number:T},imageHeight:{number:T},src:{string:M},__type__:{object:W,boolean:x}},__type__:{string:["from","to","middle"],object:W}},endPointOffset:{from:{number:T},to:{number:T},__type__:{object:W,number:T}},arrowStrikethrough:{boolean:x},background:{enabled:{boolean:x},color:{string:M},size:{number:T},dashes:{boolean:x,array:Vn},__type__:{object:W,boolean:x}},chosen:{label:{boolean:x,function:"function"},edge:{boolean:x,function:"function"},__type__:{object:W,boolean:x}},color:{color:{string:M},highlight:{string:M},hover:{string:M},inherit:{string:["from","to","both"],boolean:x},opacity:{number:T},__type__:{object:W,string:M}},dashes:{boolean:x,array:Vn},font:{color:{string:M},size:{number:T},face:{string:M},background:{string:M},strokeWidth:{number:T},strokeColor:{string:M},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:T},multi:{boolean:x,string:M},bold:{color:{string:M},size:{number:T},face:{string:M},mod:{string:M},vadjust:{number:T},__type__:{object:W,string:M}},boldital:{color:{string:M},size:{number:T},face:{string:M},mod:{string:M},vadjust:{number:T},__type__:{object:W,string:M}},ital:{color:{string:M},size:{number:T},face:{string:M},mod:{string:M},vadjust:{number:T},__type__:{object:W,string:M}},mono:{color:{string:M},size:{number:T},face:{string:M},mod:{string:M},vadjust:{number:T},__type__:{object:W,string:M}},__type__:{object:W,string:M}},hidden:{boolean:x},hoverWidth:{function:"function",number:T},label:{string:M,undefined:"undefined"},labelHighlightBold:{boolean:x},length:{number:T,undefined:"undefined"},physics:{boolean:x},scaling:{min:{number:T},max:{number:T},label:{enabled:{boolean:x},min:{number:T},max:{number:T},maxVisible:{number:T},drawThreshold:{number:T},__type__:{object:W,boolean:x}},customScalingFunction:{function:"function"},__type__:{object:W}},selectionWidth:{function:"function",number:T},selfReferenceSize:{number:T},selfReference:{size:{number:T},angle:{number:T},renderBehindTheNode:{boolean:x},__type__:{object:W}},shadow:{enabled:{boolean:x},color:{string:M},size:{number:T},x:{number:T},y:{number:T},__type__:{object:W,boolean:x}},smooth:{enabled:{boolean:x},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:T},forceDirection:{string:["horizontal","vertical","none"],boolean:x},__type__:{object:W,boolean:x}},title:{string:M,undefined:"undefined"},width:{number:T},widthConstraint:{maximum:{number:T},__type__:{object:W,boolean:x,number:T}},value:{number:T,undefined:"undefined"},__type__:{object:W}},groups:{useDefaultGroups:{boolean:x},__any__:Mh,__type__:{object:W}},interaction:{dragNodes:{boolean:x},dragView:{boolean:x},hideEdgesOnDrag:{boolean:x},hideEdgesOnZoom:{boolean:x},hideNodesOnDrag:{boolean:x},hover:{boolean:x},keyboard:{enabled:{boolean:x},speed:{x:{number:T},y:{number:T},zoom:{number:T},__type__:{object:W}},bindToWindow:{boolean:x},autoFocus:{boolean:x},__type__:{object:W,boolean:x}},multiselect:{boolean:x},navigationButtons:{boolean:x},selectable:{boolean:x},selectConnectedEdges:{boolean:x},hoverConnectedEdges:{boolean:x},tooltipDelay:{number:T},zoomView:{boolean:x},zoomSpeed:{number:T},__type__:{object:W}},layout:{randomSeed:{undefined:"undefined",number:T,string:M},improvedLayout:{boolean:x},clusterThreshold:{number:T},hierarchical:{enabled:{boolean:x},levelSeparation:{number:T},nodeSpacing:{number:T},treeSpacing:{number:T},blockShifting:{boolean:x},edgeMinimization:{boolean:x},parentCentralization:{boolean:x},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:W,boolean:x}},__type__:{object:W}},manipulation:{enabled:{boolean:x},initiallyActive:{boolean:x},addNode:{boolean:x,function:"function"},addEdge:{boolean:x,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:W,boolean:x,function:"function"}},deleteNode:{boolean:x,function:"function"},deleteEdge:{boolean:x,function:"function"},controlNodeStyle:Mh,__type__:{object:W,boolean:x}},nodes:Mh,physics:{enabled:{boolean:x},barnesHut:{theta:{number:T},gravitationalConstant:{number:T},centralGravity:{number:T},springLength:{number:T},springConstant:{number:T},damping:{number:T},avoidOverlap:{number:T},__type__:{object:W}},forceAtlas2Based:{theta:{number:T},gravitationalConstant:{number:T},centralGravity:{number:T},springLength:{number:T},springConstant:{number:T},damping:{number:T},avoidOverlap:{number:T},__type__:{object:W}},repulsion:{centralGravity:{number:T},springLength:{number:T},springConstant:{number:T},nodeDistance:{number:T},damping:{number:T},__type__:{object:W}},hierarchicalRepulsion:{centralGravity:{number:T},springLength:{number:T},springConstant:{number:T},nodeDistance:{number:T},damping:{number:T},avoidOverlap:{number:T},__type__:{object:W}},maxVelocity:{number:T},minVelocity:{number:T},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:x},iterations:{number:T},updateInterval:{number:T},onlyDynamicEdges:{boolean:x},fit:{boolean:x},__type__:{object:W,boolean:x}},timestep:{number:T},adaptiveTimestep:{boolean:x},wind:{x:{number:T},y:{number:T},__type__:{object:W}},__type__:{object:W,boolean:x}},autoResize:{boolean:x},clickToUse:{boolean:x},locale:{string:M},locales:{__any__:{any:kae},__type__:{object:W}},height:{string:M},width:{string:M},__type__:{object:W}},xE={nodes:{borderWidth:[1,0,10,1],borderWidthSelected:[2,0,10,1],color:{border:["color","#2B7CE9"],background:["color","#97C2FC"],highlight:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]},hover:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]}},opacity:[0,0,1,.1],fixed:{x:!1,y:!1},font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[0,0,50,1],strokeColor:["color","#ffffff"]},hidden:!1,labelHighlightBold:!0,physics:!0,scaling:{min:[10,0,200,1],max:[30,0,200,1],label:{enabled:!1,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},shape:["ellipse","box","circle","database","diamond","dot","square","star","text","triangle","triangleDown","hexagon"],shapeProperties:{borderDashes:!1,borderRadius:[6,0,20,1],interpolation:!0,useImageSize:!1},size:[25,0,200,1]},edges:{arrows:{to:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},middle:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},from:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"}},endPointOffset:{from:[0,-10,10,1],to:[0,-10,10,1]},arrowStrikethrough:!0,color:{color:["color","#848484"],highlight:["color","#848484"],hover:["color","#848484"],inherit:["from","to","both",!0,!1],opacity:[1,0,1,.05]},dashes:!1,font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[2,0,50,1],strokeColor:["color","#ffffff"],align:["horizontal","top","middle","bottom"]},hidden:!1,hoverWidth:[1.5,0,5,.1],labelHighlightBold:!0,physics:!0,scaling:{min:[1,0,100,1],max:[15,0,100,1],label:{enabled:!0,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},selectionWidth:[1.5,0,5,.1],selfReferenceSize:[20,0,200,1],selfReference:{size:[20,0,200,1],angle:[Math.PI/2,-6*Math.PI,6*Math.PI,Math.PI/8],renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},smooth:{enabled:!0,type:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"],forceDirection:["horizontal","vertical","none"],roundness:[.5,0,1,.05]},width:[1,0,30,1]},layout:{hierarchical:{enabled:!1,levelSeparation:[150,20,500,5],nodeSpacing:[100,20,500,5],treeSpacing:[200,20,500,5],blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:["UD","DU","LR","RL"],sortMethod:["hubsize","directed"],shakeTowards:["leaves","roots"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1,hover:!1,keyboard:{enabled:!1,speed:{x:[10,0,40,1],y:[10,0,40,1],zoom:[.02,0,.1,.005]},bindToWindow:!0,autoFocus:!0},multiselect:!1,navigationButtons:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0,tooltipDelay:[300,0,1e3,25],zoomView:!0,zoomSpeed:[1,.1,2,.1]},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{theta:[.5,.1,1,.05],gravitationalConstant:[-2e3,-3e4,0,50],centralGravity:[.3,0,10,.05],springLength:[95,0,500,5],springConstant:[.04,0,1.2,.005],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},forceAtlas2Based:{theta:[.5,.1,1,.05],gravitationalConstant:[-50,-500,0,1],centralGravity:[.01,0,1,.005],springLength:[95,0,500,5],springConstant:[.08,0,1.2,.005],damping:[.4,0,1,.01],avoidOverlap:[0,0,1,.01]},repulsion:{centralGravity:[.2,0,10,.05],springLength:[200,0,500,5],springConstant:[.05,0,1.2,.005],nodeDistance:[100,0,500,5],damping:[.09,0,1,.01]},hierarchicalRepulsion:{centralGravity:[.2,0,10,.05],springLength:[100,0,500,5],springConstant:[.01,0,1.2,.005],nodeDistance:[120,0,500,5],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01],wind:{x:[0,-10,10,.1],y:[0,-10,10,.1]}}},Pae=function(n,e,t){var i;return!!(Zt(n).call(n,"physics")&&Zt(i=xE.physics.solver).call(i,e)&&t.physics.solver!==e&&e!=="wind")},Cae=function(){function r(){D(this,r)}return R(r,[{key:"getDistances",value:function(e,t,i){for(var a={},o=e.edges,s=0;s<t.length;s++){var u=t[s],l={};a[u]=l;for(var h=0;h<t.length;h++)l[t[h]]=s==h?0:1e9}for(var d=0;d<i.length;d++){var f=o[i[d]];f.connected===!0&&a[f.fromId]!==void 0&&a[f.toId]!==void 0&&(a[f.fromId][f.toId]=1,a[f.toId][f.fromId]=1)}for(var c=t.length,v=0;v<c;v++)for(var g=t[v],b=a[g],p=0;p<c-1;p++)for(var $=t[p],y=a[$],m=p+1;m<c;m++){var _=t[m],O=a[_],k=Math.min(y[_],y[g]+b[_]);y[_]=k,O[$]=k}return a}}]),r}(),xae=function(){function r(n,e,t){D(this,r),this.body=n,this.springLength=e,this.springConstant=t,this.distanceSolver=new Cae}return R(r,[{key:"setOptions",value:function(e){e&&(e.springLength&&(this.springLength=e.springLength),e.springConstant&&(this.springConstant=e.springConstant))}},{key:"solve",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=this.distanceSolver.getDistances(this.body,e,t);this._createL_matrix(a),this._createK_matrix(a),this._createE_matrix();for(var o=.01,s=1,u=0,l=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),h=5,d=1e9,f=0,c=0,v=0,g=0,b=0;d>o&&u<l;){u+=1;var p=this._getHighestEnergyNode(i),$=Ee(p,4);for(f=$[0],d=$[1],c=$[2],v=$[3],g=d,b=0;g>s&&b<h;){b+=1,this._moveNode(f,c,v);var y=this._getEnergy(f),m=Ee(y,3);g=m[0],c=m[1],v=m[2]}}}},{key:"_getHighestEnergyNode",value:function(e){for(var t=this.body.nodeIndices,i=this.body.nodes,a=0,o=t[0],s=0,u=0,l=0;l<t.length;l++){var h=t[l];if(i[h].predefinedPosition!==!0||i[h].isCluster===!0&&e===!0||i[h].options.fixed.x!==!0||i[h].options.fixed.y!==!0){var d=this._getEnergy(h),f=Ee(d,3),c=f[0],v=f[1],g=f[2];a<c&&(a=c,o=h,s=v,u=g)}}return[o,a,s,u]}},{key:"_getEnergy",value:function(e){var t=Ee(this.E_sums[e],2),i=t[0],a=t[1],o=Math.sqrt(Math.pow(i,2)+Math.pow(a,2));return[o,i,a]}},{key:"_moveNode",value:function(e,t,i){for(var a=this.body.nodeIndices,o=this.body.nodes,s=0,u=0,l=0,h=o[e].x,d=o[e].y,f=this.K_matrix[e],c=this.L_matrix[e],v=0;v<a.length;v++){var g=a[v];if(g!==e){var b=o[g].x,p=o[g].y,$=f[g],y=c[g],m=1/Math.pow(Math.pow(h-b,2)+Math.pow(d-p,2),1.5);s+=$*(1-y*Math.pow(d-p,2)*m),u+=$*(y*(h-b)*(d-p)*m),l+=$*(1-y*Math.pow(h-b,2)*m)}}var _=s,O=u,k=t,S=l,w=i,E=(k/_+w/O)/(O/_-S/O),F=-(O*E+k)/_;o[e].x+=F,o[e].y+=E,this._updateE_matrix(e)}},{key:"_createL_matrix",value:function(e){var t=this.body.nodeIndices,i=this.springLength;this.L_matrix=[];for(var a=0;a<t.length;a++){this.L_matrix[t[a]]={};for(var o=0;o<t.length;o++)this.L_matrix[t[a]][t[o]]=i*e[t[a]][t[o]]}}},{key:"_createK_matrix",value:function(e){var t=this.body.nodeIndices,i=this.springConstant;this.K_matrix=[];for(var a=0;a<t.length;a++){this.K_matrix[t[a]]={};for(var o=0;o<t.length;o++)this.K_matrix[t[a]][t[o]]=i*Math.pow(e[t[a]][t[o]],-2)}}},{key:"_createE_matrix",value:function(){var e=this.body.nodeIndices,t=this.body.nodes;this.E_matrix={},this.E_sums={};for(var i=0;i<e.length;i++)this.E_matrix[e[i]]=[];for(var a=0;a<e.length;a++){for(var o=e[a],s=t[o].x,u=t[o].y,l=0,h=0,d=a;d<e.length;d++){var f=e[d];if(f!==o){var c=t[f].x,v=t[f].y,g=1/Math.sqrt(Math.pow(s-c,2)+Math.pow(u-v,2));this.E_matrix[o][d]=[this.K_matrix[o][f]*(s-c-this.L_matrix[o][f]*(s-c)*g),this.K_matrix[o][f]*(u-v-this.L_matrix[o][f]*(u-v)*g)],this.E_matrix[f][a]=this.E_matrix[o][d],l+=this.E_matrix[o][d][0],h+=this.E_matrix[o][d][1]}}this.E_sums[o]=[l,h]}}},{key:"_updateE_matrix",value:function(e){for(var t=this.body.nodeIndices,i=this.body.nodes,a=this.E_matrix[e],o=this.K_matrix[e],s=this.L_matrix[e],u=i[e].x,l=i[e].y,h=0,d=0,f=0;f<t.length;f++){var c=t[f];if(c!==e){var v=a[f],g=v[0],b=v[1],p=i[c].x,$=i[c].y,y=1/Math.sqrt(Math.pow(u-p,2)+Math.pow(l-$,2)),m=o[c]*(u-p-s[c]*(u-p)*y),_=o[c]*(l-$-s[c]*(l-$)*y);a[f]=[m,_],h+=m,d+=_;var O=this.E_sums[c];O[0]+=m-g,O[1]+=_-b}}this.E_sums[e]=[h,d]}}]),r}();function j(r,n,e){var t,i,a,o,s=this;if(!(this instanceof j))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:$Q,clickToUse:!1},Ae(this.options,this.defaultOptions),this.body={container:r,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:A(t=this.on).call(t,this),off:A(i=this.off).call(i,this),emit:A(a=this.emit).call(a,this),once:A(o=this.once).call(o,this)},eventListeners:{onTap:function(){},onTouch:function(){},onDoubleTap:function(){},onHold:function(){},onDragStart:function(){},onDrag:function(){},onDragEnd:function(){},onMouseWheel:function(){},onPinch:function(){},onMouseMove:function(){},onRelease:function(){},onContext:function(){}},data:{nodes:null,edges:null},functions:{createNode:function(){},createEdge:function(){},getPointer:function(){}},modules:{},view:{scale:1,translation:{x:0,y:0}},selectionBox:{show:!1,position:{start:{x:0,y:0},end:{x:0,y:0}}}},this.bindEventListeners(),this.images=new EQ(function(){return s.body.emitter.emit("_requestRedraw")}),this.groups=new LZ,this.canvas=new $ie(this.body),this.selectionHandler=new ine(this.body,this.canvas),this.interactionHandler=new Tie(this.body,this.canvas,this.selectionHandler),this.view=new _ie(this.body,this.canvas),this.renderer=new gie(this.body,this.canvas),this.physics=new qre(this.body),this.layoutEngine=new Eae(this.body),this.clustering=new fie(this.body),this.manipulation=new Tae(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new Dte(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new Bre(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new xae(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(e),this.setData(n)}K1(j.prototype);j.prototype.setOptions=function(r){var n=this;if(r===null&&(r=void 0),r!==void 0){var e=QX.validate(r,Iae);e===!0&&console.error("%cErrors have been found in the supplied options object.",m_);var t=["locale","locales","clickToUse"];if(An(t,this.options,r),r.locale!==void 0&&(r.locale=wQ(r.locales||this.options.locales,r.locale)),r=this.layoutEngine.setOptions(r.layout,r),this.canvas.setOptions(r),this.groups.setOptions(r.groups),this.nodesHandler.setOptions(r.nodes),this.edgesHandler.setOptions(r.edges),this.physics.setOptions(r.physics),this.manipulation.setOptions(r.manipulation,r,this.options),this.interactionHandler.setOptions(r.interaction),this.renderer.setOptions(r.interaction),this.selectionHandler.setOptions(r.interaction),r.groups!==void 0&&this.body.emitter.emit("refreshNodes"),"configure"in r&&(this.configurator||(this.configurator=new YX(this,this.body.container,xE,this.canvas.pixelRatio,Pae)),this.configurator.setOptions(r.configure)),this.configurator&&this.configurator.options.enabled===!0){var i={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};me(i.nodes,this.nodesHandler.options),me(i.edges,this.edgesHandler.options),me(i.layout,this.layoutEngine.options),me(i.interaction,this.selectionHandler.options),me(i.interaction,this.renderer.options),me(i.interaction,this.interactionHandler.options),me(i.manipulation,this.manipulation.options),me(i.physics,this.physics.options),me(i.global,this.canvas.options),me(i.global,this.options),this.configurator.setModuleOptions(i)}r.clickToUse!==void 0?r.clickToUse===!0?this.activator===void 0&&(this.activator=new qX(this.canvas.frame),this.activator.on("change",function(){n.body.emitter.emit("activate")})):(this.activator!==void 0&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit("activate")):this.body.emitter.emit("activate"),this.canvas.setSize(),this.body.emitter.emit("startSimulation")}};j.prototype._updateVisibleIndices=function(){var r=this.body.nodes,n=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&!this.clustering._isClusteredNode(e)&&r[e].options.hidden===!1&&this.body.nodeIndices.push(r[e].id);for(var t in n)if(Object.prototype.hasOwnProperty.call(n,t)){var i=n[t],a=r[i.fromId],o=r[i.toId],s=a!==void 0&&o!==void 0,u=!this.clustering._isClusteredEdge(t)&&i.options.hidden===!1&&s&&a.options.hidden===!1&&o.options.hidden===!1;u&&this.body.edgeIndices.push(i.id)}};j.prototype.bindEventListeners=function(){var r=this;this.body.emitter.on("_dataChanged",function(){r.edgesHandler._updateState(),r.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",function(){r.clustering._updateState(),r._updateVisibleIndices(),r._updateValueRange(r.body.nodes),r._updateValueRange(r.body.edges),r.body.emitter.emit("startSimulation"),r.body.emitter.emit("_requestRedraw")})};j.prototype.setData=function(r){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),r&&r.dot&&(r.nodes||r.edges))throw new SyntaxError('Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.');if(this.setOptions(r&&r.options),r&&r.dot){console.warn("The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);");var n=sQ(r.dot);this.setData(n);return}else if(r&&r.gephi){console.warn("The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);");var e=uQ(r.gephi);this.setData(e);return}else this.nodesHandler.setData(r&&r.nodes,!0),this.edgesHandler.setData(r&&r.edges,!0);this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")};j.prototype.destroy=function(){this.body.emitter.emit("destroy"),this.body.emitter.off(),this.off(),delete this.groups,delete this.canvas,delete this.selectionHandler,delete this.interactionHandler,delete this.view,delete this.renderer,delete this.physics,delete this.layoutEngine,delete this.clustering,delete this.manipulation,delete this.nodesHandler,delete this.edgesHandler,delete this.configurator,delete this.images;for(var r in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,r)&&delete this.body.nodes[r];for(var n in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,n)&&delete this.body.edges[n];kr(this.body.container)};j.prototype._updateValueRange=function(r){var n,e=void 0,t=void 0,i=0;for(n in r)if(Object.prototype.hasOwnProperty.call(r,n)){var a=r[n].getValue();a!==void 0&&(e=e===void 0?a:Math.min(a,e),t=t===void 0?a:Math.max(a,t),i+=a)}if(e!==void 0&&t!==void 0)for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&r[n].setValueRange(e,t,i)};j.prototype.isActive=function(){return!this.activator||this.activator.active};j.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)};j.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)};j.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)};j.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)};j.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)};j.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)};j.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)};j.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)};j.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)};j.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)};j.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)};j.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)};j.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)};j.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)};j.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)};j.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)};j.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)};j.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)};j.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)};j.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)};j.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)};j.prototype.editNodeMode=function(){return console.warn("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)};j.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)};j.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)};j.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)};j.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)};j.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)};j.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)};j.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)};j.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)};j.prototype.getConnectedNodes=function(r){return this.body.nodes[r]!==void 0?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)};j.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)};j.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)};j.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)};j.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)};j.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)};j.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)};j.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)};j.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)};j.prototype.getNodeAt=function(){var r=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return r!==void 0&&r.id!==void 0?r.id:r};j.prototype.getEdgeAt=function(){var r=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return r!==void 0&&r.id!==void 0?r.id:r};j.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)};j.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)};j.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()};j.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)};j.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)};j.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)};j.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)};j.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)};j.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)};j.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)};j.prototype.getOptionsFromConfigurator=function(){var r={};return this.configurator&&(r=this.configurator.getOptions.apply(this.configurator)),r};const Nae=AE({__name:"NButton",props:{to:null,icon:null},setup(r){return(n,e)=>{const t=BE;return gc(),pc(RE(r.to?FE(LE):"button"),DE({to:r.to},n.$attrs,{class:"n-transition n-button n-button-base hover:n-button-hover active:n-button-active focus-visible:n-focus-base n-disabled:n-disabled"}),{default:ME(()=>[yc(n.$slots,"icon",{},()=>[r.icon?(gc(),pc(t,{key:0,icon:r.icon,class:"n-button-icon"},null,8,["icon"])):NE("",!0)]),yc(n.$slots,"default")]),_:3},16,["to"])}}});export{j as N,Nae as _};