@nuxt/devtools 0.5.3 → 0.5.5

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 (105) hide show
  1. package/dist/chunks/module-main.mjs +90 -32
  2. package/dist/chunks/vscode.mjs +4 -5
  3. package/dist/client/200.html +2 -2
  4. package/dist/client/404.html +2 -2
  5. package/dist/client/__inspecting/index.html +2 -2
  6. package/dist/client/_nuxt/{Badge.0ce662e4.js → Badge.e58c5f84.js} +1 -1
  7. package/dist/client/_nuxt/CodeSnippets.vue.22b03a10.js +1 -0
  8. package/dist/client/_nuxt/{DrawerRight.vue.eb026405.js → DrawerRight.vue.58044cee.js} +1 -1
  9. package/dist/client/_nuxt/{DurationDisplay.vue.9fa7b27d.js → DurationDisplay.vue.0d87f5bf.js} +1 -1
  10. package/dist/client/_nuxt/{FilepathItem.vue.7eb51d4e.js → FilepathItem.vue.063a2cdd.js} +1 -1
  11. package/dist/client/_nuxt/{HelpFab.vue.ebcc1356.js → HelpFab.vue.044c905c.js} +1 -1
  12. package/dist/client/_nuxt/{LaunchPage.vue.63709998.js → LaunchPage.vue.59383ce6.js} +1 -1
  13. package/dist/client/_nuxt/{NCheckbox.vue.a470be6e.js → NCheckbox.vue.f53d5fde.js} +1 -1
  14. package/dist/client/_nuxt/{NCodeBlock.vue.3fea7f9d.js → NCodeBlock.vue.e2044e41.js} +1 -1
  15. package/dist/client/_nuxt/{NIconButton.vue.13275ce3.js → NIconButton.vue.6924c323.js} +1 -1
  16. package/dist/client/_nuxt/{NIconTitle.vue.811968a5.js → NIconTitle.vue.19793f87.js} +1 -1
  17. package/dist/client/_nuxt/NLink.vue.dddf8805.js +1 -0
  18. package/dist/client/_nuxt/{NMarkdown.vue.f8a61172.js → NMarkdown.vue.2a7f337d.js} +1 -1
  19. package/dist/client/_nuxt/{NPanelGrids.afa6e237.js → NPanelGrids.923427b0.js} +1 -1
  20. package/dist/client/_nuxt/{NSectionBlock.4824dc31.js → NSectionBlock.2937e558.js} +1 -1
  21. package/dist/client/_nuxt/{NSelect.vue.2f75a7b4.js → NSelect.vue.6bc1e782.js} +1 -1
  22. package/dist/client/_nuxt/{NSwitch.vue.ae05571e.js → NSwitch.vue.e15ba847.js} +1 -1
  23. package/dist/client/_nuxt/{NTip.vue.6c00393e.js → NTip.vue.16191ba5.js} +1 -1
  24. package/dist/client/_nuxt/Navbar.vue.1eab843e.js +1 -0
  25. package/dist/client/_nuxt/NpmVersionCheck.vue.47b612aa.js +1 -0
  26. package/dist/client/_nuxt/{PanelLeftRight.vue.9e8aa6b8.js → PanelLeftRight.vue.5807516f.js} +1 -1
  27. package/dist/client/_nuxt/StateEditor.vue.d28666b8.js +1 -0
  28. package/dist/client/_nuxt/{__inspecting.689fc045.js → __inspecting.324d8c7c.js} +1 -1
  29. package/dist/client/_nuxt/analyze-build.9257b30a.js +1 -0
  30. package/dist/client/_nuxt/assets.c3e8e0f3.js +16 -0
  31. package/dist/client/_nuxt/{client.ce74bb6b.js → client.4ef5790f.js} +1 -1
  32. package/dist/client/_nuxt/{components.212338f5.js → components.1cc22fdb.js} +3 -3
  33. package/dist/client/_nuxt/custom-_name_.e1ada273.js +1 -0
  34. package/dist/client/_nuxt/{default.b5c163f2.js → default.2805e636.js} +1 -1
  35. package/dist/client/_nuxt/{editor.6dcc09c7.js → editor.721868d4.js} +1 -1
  36. package/dist/client/_nuxt/{entry.5cc961cc.css → entry.bf8a0e33.css} +1 -1
  37. package/dist/client/_nuxt/entry.f02d2ccc.js +19 -0
  38. package/dist/client/_nuxt/{error-404.67a51e0c.js → error-404.61da4836.js} +1 -1
  39. package/dist/client/_nuxt/{error-500.811aab1a.js → error-500.68195134.js} +1 -1
  40. package/dist/client/_nuxt/{error-component.74964985.js → error-component.db5245e7.js} +2 -2
  41. package/dist/client/_nuxt/{full.1ccd4009.js → full.cfa15ba5.js} +1 -1
  42. package/dist/client/_nuxt/{hooks.310738c8.js → hooks.a0b5858b.js} +1 -1
  43. package/dist/client/_nuxt/imports.c13274b4.js +1 -0
  44. package/dist/client/_nuxt/{index.a86d9a7f.js → index.476fd219.js} +1 -1
  45. package/dist/client/_nuxt/{index.5d80161c.js → index.e17aa9ce.js} +1 -1
  46. package/dist/client/_nuxt/{json-editor-vue.cb8f6785.js → json-editor-vue.3c153669.js} +1 -1
  47. package/dist/client/_nuxt/{middleware.c10051f6.js → middleware.10bb56a6.js} +1 -1
  48. package/dist/client/_nuxt/modules.41d22931.js +4 -0
  49. package/dist/client/_nuxt/{none.1d054cdf.js → none.a68953c7.js} +1 -1
  50. package/dist/client/_nuxt/open-graph.87c9ce95.js +3 -0
  51. package/dist/client/_nuxt/overview.e078ddfd.js +1 -0
  52. package/dist/client/_nuxt/pages.2011bfab.js +1 -0
  53. package/dist/client/_nuxt/{payload.4878fb79.js → payload.aa12c647.js} +1 -1
  54. package/dist/client/_nuxt/{plugins.92e36c4c.js → plugins.2722f367.js} +1 -1
  55. package/dist/client/_nuxt/{runtime-configs.c13ac314.js → runtime-configs.1c597722.js} +1 -1
  56. package/dist/client/_nuxt/server-routes.be515b73.js +9 -0
  57. package/dist/client/_nuxt/{settings.fcb97906.js → settings.bdc2ea51.js} +1 -1
  58. package/dist/client/_nuxt/state-components.97be2043.js +1 -0
  59. package/dist/client/_nuxt/storage.b1a77fa3.js +1 -0
  60. package/dist/client/_nuxt/{terminals.dcdca739.js → terminals.ce48c24d.js} +1 -1
  61. package/dist/client/_nuxt/{unocss-runtime.cfd98600.js → unocss-runtime.7eface6f.js} +1 -1
  62. package/dist/client/_nuxt/virtual-files.3e66a8af.js +1 -0
  63. package/dist/client/index.html +2 -2
  64. package/dist/client/modules/analyze-build/index.html +2 -2
  65. package/dist/client/modules/assets/index.html +2 -2
  66. package/dist/client/modules/components/index.html +2 -2
  67. package/dist/client/modules/hooks/index.html +2 -2
  68. package/dist/client/modules/imports/index.html +2 -2
  69. package/dist/client/modules/middleware/index.html +2 -2
  70. package/dist/client/modules/modules/index.html +2 -2
  71. package/dist/client/modules/open-graph/index.html +2 -2
  72. package/dist/client/modules/overview/index.html +2 -2
  73. package/dist/client/modules/pages/index.html +2 -2
  74. package/dist/client/modules/payload/index.html +2 -2
  75. package/dist/client/modules/plugins/index.html +2 -2
  76. package/dist/client/modules/runtime-configs/index.html +2 -2
  77. package/dist/client/modules/server-routes/index.html +2 -2
  78. package/dist/client/modules/storage/index.html +2 -2
  79. package/dist/client/modules/terminals/index.html +2 -2
  80. package/dist/client/modules/virtual-files/index.html +2 -2
  81. package/dist/client/settings/index.html +2 -2
  82. package/dist/module.json +1 -1
  83. package/dist/module.mjs +1 -1
  84. package/dist/shared/{devtools.a2798b81.mjs → devtools.345c630c.mjs} +2 -2
  85. package/dist/types.d.ts +12 -1
  86. package/package.json +8 -9
  87. package/dist/client/_nuxt/CodeSnippets.vue.63e1babe.js +0 -1
  88. package/dist/client/_nuxt/NLink.vue.8becbaf2.js +0 -1
  89. package/dist/client/_nuxt/NTextInput.vue.efd43a47.js +0 -1
  90. package/dist/client/_nuxt/Navbar.vue.76f856f0.js +0 -1
  91. package/dist/client/_nuxt/NpmVersionCheck.vue.9ff03721.js +0 -1
  92. package/dist/client/_nuxt/StateEditor.vue.b9b04885.js +0 -1
  93. package/dist/client/_nuxt/analyze-build.8d6d1198.js +0 -1
  94. package/dist/client/_nuxt/assets.b6f9866b.js +0 -16
  95. package/dist/client/_nuxt/custom-_name_.87eb6297.js +0 -1
  96. package/dist/client/_nuxt/entry.3c854225.js +0 -19
  97. package/dist/client/_nuxt/fuse.esm.88e2763d.js +0 -1
  98. package/dist/client/_nuxt/imports.ccc44d22.js +0 -1
  99. package/dist/client/_nuxt/modules.9cc1fa1d.js +0 -4
  100. package/dist/client/_nuxt/open-graph.4ea7bb24.js +0 -3
  101. package/dist/client/_nuxt/overview.9f34e07f.js +0 -1
  102. package/dist/client/_nuxt/pages.a55d4866.js +0 -1
  103. package/dist/client/_nuxt/server-routes.dae9cba0.js +0 -9
  104. package/dist/client/_nuxt/storage.d543849f.js +0 -1
  105. package/dist/client/_nuxt/virtual-files.3a24df07.js +0 -1
@@ -1,4 +1,4 @@
1
- import{_ as g_}from"./NIconButton.vue.13275ce3.js";import{o as fe,h as lt,f as ne,l as ja,a as Ui,p as rn,t as ok,u as Z,i as Ve,c as $t,v as Qt,V as Vu,r as Ea,W as sk,X as uk,R as lk,Y as ck,Z as hk,a0 as dk,a1 as fk,w as at,F as Vr,a2 as y_,a3 as vk,G as Sa,k as pk,a4 as gk,a5 as yk,a6 as mk,q as pa,b as $k,D as bk,a7 as wk,a8 as _k}from"./entry.3c854225.js";import{_ as Ek}from"./HelpFab.vue.ebcc1356.js";import{_ as Sk}from"./NCheckbox.vue.a470be6e.js";import{_ as m_}from"./Navbar.vue.76f856f0.js";import{_ as $_}from"./Badge.0ce662e4.js";import{_ as b_}from"./FilepathItem.vue.7eb51d4e.js";import{a as Ok}from"./editor.6dcc09c7.js";import{_ as Tk}from"./DrawerRight.vue.eb026405.js";import{_ as xk}from"./NSectionBlock.4824dc31.js";import{_ as Pk}from"./NIconTitle.vue.811968a5.js";import{D as jl}from"./constants.d7bcda3c.js";import{F as kk}from"./fuse.esm.88e2763d.js";import"./NTextInput.vue.efd43a47.js";const Ik={class:"markdown-body"},Ck=ne("h1",null,"Components",-1),Ak=ne("p",null,[ja("Vue components under the "),ne("code",null,"components/"),ja(" directory are automatically registered and can be used in your templates without importing them.")],-1),Rk=ne("p",null,[ne("a",{href:"https://nuxt.com/docs/guide/directory-structure/components",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Dk=[Ck,Ak,Rk],Mk={__name:"components",setup(t,{expose:i}){return i({frontmatter:{}}),(r,n)=>(fe(),lt("div",Ik,Dk))}},Nk=/\d/,Fk=["-","_","/","."];function Bk(t=""){if(!Nk.test(t))return t.toUpperCase()===t}function Lk(t,i){const e=i??Fk,r=[];if(!t||typeof t!="string")return r;let n="",a,o;for(const s of t){const u=e.includes(s);if(u===!0){r.push(n),n="",a=void 0;continue}const l=Bk(s);if(o===!1){if(a===!1&&l===!0){r.push(n),n=s,a=l;continue}if(a===!0&&l===!1&&n.length>1){const c=n[n.length-1];r.push(n.slice(0,Math.max(0,n.length-1))),n=c+s,a=l;continue}}n+=s,a=l,o=u}return r.push(n),r}function jk(t){return t?t[0].toUpperCase()+t.slice(1):""}function w_(t){return t?(Array.isArray(t)?t:Lk(t)).map(i=>jk(i)).join(""):""}const zk={"font-mono":"","text-sm":""},Hk=ne("span",{mr1:"",op20:""},"<",-1),Wk=ne("span",{ml1:"",op20:""},"/>",-1),__=Ui({__name:"ComponentName",props:{component:null},setup(t){const i=t,e=rn(()=>i.component.pascalName||w_(i.component.name||i.component.__name||i.component.kebabName||""));return(r,n)=>(fe(),lt("code",zk,[Hk,ja(ok(Z(e)),1),Wk]))}}),Vk={flex:"~ col gap1","items-start":"","of-hidden":""},Uk={flex:"~ gap2"},E_=Ui({__name:"ComponentDetails",props:{component:null},setup(t){const i=t,e=rn(()=>i.component.pascalName||w_(i.component.name||i.component.__name||i.component.kebabName||"")),r=rn(()=>i.component.filePath||i.component.file||i.component.__file||""),n=Ok();return(a,o)=>{const s=__,u=g_,l=$_,c=b_;return fe(),lt("div",Vk,[ne("div",Uk,[Ve(s,{component:t.component},null,8,["component"]),Ve(u,{title:"Copy name","flex-none":"",icon:"carbon-copy",onClick:o[0]||(o[0]=h=>Z(n)(`<${Z(e)}></${Z(e)}>`))}),t.component.global?(fe(),$t(l,{key:0,"bg-green-400:10":"","text-green-400":"",title:"Registered at runtime as a global component",textContent:"runtime"})):Qt("",!0)]),ne("div",null,[Z(r)?(fe(),$t(c,{key:0,filepath:Z(r),"w-full":"","text-sm":"",op25:"","group-hover:op75":""},null,8,["filepath"])):Qt("",!0)]),Vu(a.$slots,"default")])}}});/**
1
+ import{_ as g_}from"./NIconButton.vue.6924c323.js";import{o as fe,h as lt,f as ne,l as ja,a as Ui,p as rn,t as ok,u as Z,i as Ve,c as $t,v as Qt,Z as Vu,r as Ea,a0 as sk,a1 as uk,U as lk,a2 as ck,a3 as hk,a4 as dk,w as at,F as Vr,a5 as y_,a6 as fk,I as Sa,k as vk,a7 as pk,X as gk,a8 as yk,a9 as mk,q as pa,b as $k,D as bk,aa as wk}from"./entry.f02d2ccc.js";import{_ as _k}from"./HelpFab.vue.044c905c.js";import{u as Ek,a as Sk}from"./state-components.97be2043.js";import{_ as Ok}from"./NCheckbox.vue.f53d5fde.js";import{_ as m_}from"./Navbar.vue.1eab843e.js";import{_ as $_}from"./Badge.e58c5f84.js";import{_ as b_}from"./FilepathItem.vue.063a2cdd.js";import{a as Tk}from"./editor.721868d4.js";import{_ as xk}from"./DrawerRight.vue.58044cee.js";import{_ as Pk}from"./NSectionBlock.2937e558.js";import{_ as kk}from"./NIconTitle.vue.19793f87.js";import{D as jl}from"./constants.d7bcda3c.js";const Ik={class:"markdown-body"},Ck=ne("h1",null,"Components",-1),Ak=ne("p",null,[ja("Vue components under the "),ne("code",null,"components/"),ja(" directory are automatically registered and can be used in your templates without importing them.")],-1),Rk=ne("p",null,[ne("a",{href:"https://nuxt.com/docs/guide/directory-structure/components",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Dk=[Ck,Ak,Rk],Mk={__name:"components",setup(t,{expose:i}){return i({frontmatter:{}}),(r,n)=>(fe(),lt("div",Ik,Dk))}},Nk=/\d/,Fk=["-","_","/","."];function Bk(t=""){if(!Nk.test(t))return t.toUpperCase()===t}function Lk(t,i){const e=i??Fk,r=[];if(!t||typeof t!="string")return r;let n="",a,o;for(const s of t){const u=e.includes(s);if(u===!0){r.push(n),n="",a=void 0;continue}const l=Bk(s);if(o===!1){if(a===!1&&l===!0){r.push(n),n=s,a=l;continue}if(a===!0&&l===!1&&n.length>1){const c=n[n.length-1];r.push(n.slice(0,Math.max(0,n.length-1))),n=c+s,a=l;continue}}n+=s,a=l,o=u}return r.push(n),r}function jk(t){return t?t[0].toUpperCase()+t.slice(1):""}function w_(t){return t?(Array.isArray(t)?t:Lk(t)).map(i=>jk(i)).join(""):""}const zk={"font-mono":"","text-sm":""},Hk=ne("span",{mr1:"",op20:""},"<",-1),Wk=ne("span",{ml1:"",op20:""},"/>",-1),__=Ui({__name:"ComponentName",props:{component:null},setup(t){const i=t,e=rn(()=>i.component.pascalName||w_(i.component.name||i.component.__name||i.component.kebabName||""));return(r,n)=>(fe(),lt("code",zk,[Hk,ja(ok(Z(e)),1),Wk]))}}),Vk={flex:"~ col gap1","items-start":"","of-hidden":""},Uk={flex:"~ gap2"},E_=Ui({__name:"ComponentDetails",props:{component:null},setup(t){const i=t,e=rn(()=>i.component.pascalName||w_(i.component.name||i.component.__name||i.component.kebabName||"")),r=rn(()=>i.component.filePath||i.component.file||i.component.__file||""),n=Tk();return(a,o)=>{const s=__,u=g_,l=$_,c=b_;return fe(),lt("div",Vk,[ne("div",Uk,[Ve(s,{component:t.component},null,8,["component"]),Ve(u,{title:"Copy name","flex-none":"",icon:"carbon-copy",onClick:o[0]||(o[0]=h=>Z(n)(`<${Z(e)}></${Z(e)}>`))}),t.component.global?(fe(),$t(l,{key:0,"bg-green-400:10":"","text-green-400":"",title:"Registered at runtime as a global component",textContent:"runtime"})):Qt("",!0)]),ne("div",null,[Z(r)?(fe(),$t(c,{key:0,filepath:Z(r),"w-full":"","text-sm":"",op25:"","group-hover:op75":""},null,8,["filepath"])):Qt("",!0)]),Vu(a.$slots,"default")])}}});/**
2
2
  * vis-data
3
3
  * http://visjs.org/
4
4
  *
@@ -33,7 +33,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
33
33
  * Licensed under the MIT license */function er(){return er=Object.assign||function(t){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},er.apply(this,arguments)}function Wt(t,i){t.prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i}function ys(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var cf;typeof Object.assign!="function"?cf=function(i){if(i==null)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(i),r=1;r<arguments.length;r++){var n=arguments[r];if(n!=null)for(var a in n)n.hasOwnProperty(a)&&(e[a]=n[a])}return e}:cf=Object.assign;var Fn=cf,N$=["","webkit","Moz","MS","ms","o"],QH=typeof document>"u"?{style:{}}:document.createElement("div"),ZH="function",$i=Math.round,Bn=Math.abs,Sg=Date.now;function dl(t,i){for(var e,r,n=i[0].toUpperCase()+i.slice(1),a=0;a<N$.length;){if(e=N$[a],r=e?e+n:i,r in t)return r;a++}}var wr;typeof window>"u"?wr={}:wr=window;var TS=dl(QH.style,"touchAction"),xS=TS!==void 0;function JH(){if(!xS)return!1;var t={},i=wr.CSS&&wr.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return t[e]=i?wr.CSS.supports("touch-action",e):!0}),t}var PS="compute",kS="auto",hf="manipulation",kn="none",Ua="pan-x",Ga="pan-y",ms=JH(),eW=/mobile|tablet|ip(ad|hone|od)|android/i,IS="ontouchstart"in wr,tW=dl(wr,"PointerEvent")!==void 0,rW=IS&&eW.test(navigator.userAgent),To="touch",nW="pen",Og="mouse",iW="kinect",aW=25,ft=1,Yn=2,Be=4,Ot=8,mu=1,xo=2,Po=4,ko=8,Ri=16,fr=xo|Po,In=ko|Ri,CS=fr|In,AS=["x","y"],$u=["clientX","clientY"];function _r(t,i,e){var r;if(t)if(t.forEach)t.forEach(i,e);else if(t.length!==void 0)for(r=0;r<t.length;)i.call(e,t[r],r,t),r++;else for(r in t)t.hasOwnProperty(r)&&i.call(e,t[r],r,t)}function fl(t,i){return typeof t===ZH?t.apply(i&&i[0]||void 0,i):t}function On(t,i){return t.indexOf(i)>-1}function oW(t){if(On(t,kn))return kn;var i=On(t,Ua),e=On(t,Ga);return i&&e?kn:i||e?i?Ua:Ga:On(t,hf)?hf:kS}var RS=function(){function t(e,r){this.manager=e,this.set(r)}var i=t.prototype;return i.set=function(r){r===PS&&(r=this.compute()),xS&&this.manager.element.style&&ms[r]&&(this.manager.element.style[TS]=r),this.actions=r.toLowerCase().trim()},i.update=function(){this.set(this.manager.options.touchAction)},i.compute=function(){var r=[];return _r(this.manager.recognizers,function(n){fl(n.options.enable,[n])&&(r=r.concat(n.getTouchAction()))}),oW(r.join(" "))},i.preventDefaults=function(r){var n=r.srcEvent,a=r.offsetDirection;if(this.manager.session.prevented){n.preventDefault();return}var o=this.actions,s=On(o,kn)&&!ms[kn],u=On(o,Ga)&&!ms[Ga],l=On(o,Ua)&&!ms[Ua];if(s){var c=r.pointers.length===1,h=r.distance<2,d=r.deltaTime<250;if(c&&h&&d)return}if(!(l&&u)&&(s||u&&a&fr||l&&a&In))return this.preventSrc(n)},i.preventSrc=function(r){this.manager.session.prevented=!0,r.preventDefault()},t}();function Tg(t,i){for(;t;){if(t===i)return!0;t=t.parentNode}return!1}function DS(t){var i=t.length;if(i===1)return{x:$i(t[0].clientX),y:$i(t[0].clientY)};for(var e=0,r=0,n=0;n<i;)e+=t[n].clientX,r+=t[n].clientY,n++;return{x:$i(e/i),y:$i(r/i)}}function F$(t){for(var i=[],e=0;e<t.pointers.length;)i[e]={clientX:$i(t.pointers[e].clientX),clientY:$i(t.pointers[e].clientY)},e++;return{timeStamp:Sg(),pointers:i,center:DS(i),deltaX:t.deltaX,deltaY:t.deltaY}}function bu(t,i,e){e||(e=AS);var r=i[e[0]]-t[e[0]],n=i[e[1]]-t[e[1]];return Math.sqrt(r*r+n*n)}function df(t,i,e){e||(e=AS);var r=i[e[0]]-t[e[0]],n=i[e[1]]-t[e[1]];return Math.atan2(n,r)*180/Math.PI}function MS(t,i){return t===i?mu:Bn(t)>=Bn(i)?t<0?xo:Po:i<0?ko:Ri}function sW(t,i){var e=i.center,r=t.offsetDelta||{},n=t.prevDelta||{},a=t.prevInput||{};(i.eventType===ft||a.eventType===Be)&&(n=t.prevDelta={x:a.deltaX||0,y:a.deltaY||0},r=t.offsetDelta={x:e.x,y:e.y}),i.deltaX=n.x+(e.x-r.x),i.deltaY=n.y+(e.y-r.y)}function NS(t,i,e){return{x:i/t||0,y:e/t||0}}function uW(t,i){return bu(i[0],i[1],$u)/bu(t[0],t[1],$u)}function lW(t,i){return df(i[1],i[0],$u)+df(t[1],t[0],$u)}function cW(t,i){var e=t.lastInterval||i,r=i.timeStamp-e.timeStamp,n,a,o,s;if(i.eventType!==Ot&&(r>aW||e.velocity===void 0)){var u=i.deltaX-e.deltaX,l=i.deltaY-e.deltaY,c=NS(r,u,l);a=c.x,o=c.y,n=Bn(c.x)>Bn(c.y)?c.x:c.y,s=MS(u,l),t.lastInterval=i}else n=e.velocity,a=e.velocityX,o=e.velocityY,s=e.direction;i.velocity=n,i.velocityX=a,i.velocityY=o,i.direction=s}function hW(t,i){var e=t.session,r=i.pointers,n=r.length;e.firstInput||(e.firstInput=F$(i)),n>1&&!e.firstMultiple?e.firstMultiple=F$(i):n===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,u=i.center=DS(r);i.timeStamp=Sg(),i.deltaTime=i.timeStamp-a.timeStamp,i.angle=df(s,u),i.distance=bu(s,u),sW(e,i),i.offsetDirection=MS(i.deltaX,i.deltaY);var l=NS(i.deltaTime,i.deltaX,i.deltaY);i.overallVelocityX=l.x,i.overallVelocityY=l.y,i.overallVelocity=Bn(l.x)>Bn(l.y)?l.x:l.y,i.scale=o?uW(o.pointers,r):1,i.rotation=o?lW(o.pointers,r):0,i.maxPointers=e.prevInput?i.pointers.length>e.prevInput.maxPointers?i.pointers.length:e.prevInput.maxPointers:i.pointers.length,cW(e,i);var c=t.element,h=i.srcEvent,d;h.composedPath?d=h.composedPath()[0]:h.path?d=h.path[0]:d=h.target,Tg(d,c)&&(c=d),i.target=c}function dW(t,i,e){var r=e.pointers.length,n=e.changedPointers.length,a=i&ft&&r-n===0,o=i&(Be|Ot)&&r-n===0;e.isFirst=!!a,e.isFinal=!!o,a&&(t.session={}),e.eventType=i,hW(t,e),t.emit("hammer.input",e),t.recognize(e),t.session.prevInput=e}function Ka(t){return t.trim().split(/\s+/g)}function Ia(t,i,e){_r(Ka(i),function(r){t.addEventListener(r,e,!1)})}function Ca(t,i,e){_r(Ka(i),function(r){t.removeEventListener(r,e,!1)})}function B$(t){var i=t.ownerDocument||t;return i.defaultView||i.parentWindow||window}var ta=function(){function t(e,r){var n=this;this.manager=e,this.callback=r,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(a){fl(e.options.enable,[e])&&n.handler(a)},this.init()}var i=t.prototype;return i.handler=function(){},i.init=function(){this.evEl&&Ia(this.element,this.evEl,this.domHandler),this.evTarget&&Ia(this.target,this.evTarget,this.domHandler),this.evWin&&Ia(B$(this.element),this.evWin,this.domHandler)},i.destroy=function(){this.evEl&&Ca(this.element,this.evEl,this.domHandler),this.evTarget&&Ca(this.target,this.evTarget,this.domHandler),this.evWin&&Ca(B$(this.element),this.evWin,this.domHandler)},t}();function Ln(t,i,e){if(t.indexOf&&!e)return t.indexOf(i);for(var r=0;r<t.length;){if(e&&t[r][e]==i||!e&&t[r]===i)return r;r++}return-1}var fW={pointerdown:ft,pointermove:Yn,pointerup:Be,pointercancel:Ot,pointerout:Ot},vW={2:To,3:nW,4:Og,5:iW},FS="pointerdown",BS="pointermove pointerup pointercancel";wr.MSPointerEvent&&!wr.PointerEvent&&(FS="MSPointerDown",BS="MSPointerMove MSPointerUp MSPointerCancel");var LS=function(t){Wt(i,t);function i(){var r,n=i.prototype;return n.evEl=FS,n.evWin=BS,r=t.apply(this,arguments)||this,r.store=r.manager.session.pointerEvents=[],r}var e=i.prototype;return e.handler=function(n){var a=this.store,o=!1,s=n.type.toLowerCase().replace("ms",""),u=fW[s],l=vW[n.pointerType]||n.pointerType,c=l===To,h=Ln(a,n.pointerId,"pointerId");u&ft&&(n.button===0||c)?h<0&&(a.push(n),h=a.length-1):u&(Be|Ot)&&(o=!0),!(h<0)&&(a[h]=n,this.callback(this.manager,u,{pointers:a,changedPointers:[n],pointerType:l,srcEvent:n}),o&&a.splice(h,1))},i}(ta);function qa(t){return Array.prototype.slice.call(t,0)}function xg(t,i,e){for(var r=[],n=[],a=0;a<t.length;){var o=i?t[a][i]:t[a];Ln(n,o)<0&&r.push(t[a]),n[a]=o,a++}return e&&(i?r=r.sort(function(s,u){return s[i]>u[i]}):r=r.sort()),r}var pW={touchstart:ft,touchmove:Yn,touchend:Be,touchcancel:Ot},gW="touchstart touchmove touchend touchcancel",Pg=function(t){Wt(i,t);function i(){var r;return i.prototype.evTarget=gW,r=t.apply(this,arguments)||this,r.targetIds={},r}var e=i.prototype;return e.handler=function(n){var a=pW[n.type],o=yW.call(this,n,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:To,srcEvent:n})},i}(ta);function yW(t,i){var e=qa(t.touches),r=this.targetIds;if(i&(ft|Yn)&&e.length===1)return r[e[0].identifier]=!0,[e,e];var n,a,o=qa(t.changedTouches),s=[],u=this.target;if(a=e.filter(function(l){return Tg(l.target,u)}),i===ft)for(n=0;n<a.length;)r[a[n].identifier]=!0,n++;for(n=0;n<o.length;)r[o[n].identifier]&&s.push(o[n]),i&(Be|Ot)&&delete r[o[n].identifier],n++;if(s.length)return[xg(a.concat(s),"identifier",!0),s]}var mW={mousedown:ft,mousemove:Yn,mouseup:Be},$W="mousedown",bW="mousemove mouseup",kg=function(t){Wt(i,t);function i(){var r,n=i.prototype;return n.evEl=$W,n.evWin=bW,r=t.apply(this,arguments)||this,r.pressed=!1,r}var e=i.prototype;return e.handler=function(n){var a=mW[n.type];a&ft&&n.button===0&&(this.pressed=!0),a&Yn&&n.which!==1&&(a=Be),this.pressed&&(a&Be&&(this.pressed=!1),this.callback(this.manager,a,{pointers:[n],changedPointers:[n],pointerType:Og,srcEvent:n}))},i}(ta),wW=2500,L$=25;function j$(t){var i=t.changedPointers,e=i[0];if(e.identifier===this.primaryTouch){var r={x:e.clientX,y:e.clientY},n=this.lastTouches;this.lastTouches.push(r);var a=function(){var s=n.indexOf(r);s>-1&&n.splice(s,1)};setTimeout(a,wW)}}function _W(t,i){t&ft?(this.primaryTouch=i.changedPointers[0].identifier,j$.call(this,i)):t&(Be|Ot)&&j$.call(this,i)}function EW(t){for(var i=t.srcEvent.clientX,e=t.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var n=this.lastTouches[r],a=Math.abs(i-n.x),o=Math.abs(e-n.y);if(a<=L$&&o<=L$)return!0}return!1}var jS=function(){var t=function(i){Wt(e,i);function e(n,a){var o;return o=i.call(this,n,a)||this,o.handler=function(s,u,l){var c=l.pointerType===To,h=l.pointerType===Og;if(!(h&&l.sourceCapabilities&&l.sourceCapabilities.firesTouchEvents)){if(c)_W.call(ys(ys(o)),u,l);else if(h&&EW.call(ys(ys(o)),l))return;o.callback(s,u,l)}},o.touch=new Pg(o.manager,o.handler),o.mouse=new kg(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}var r=e.prototype;return r.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(ta);return t}();function SW(t){var i,e=t.options.inputClass;return e?i=e:tW?i=LS:rW?i=Pg:IS?i=jS:i=kg,new i(t,dW)}function bi(t,i,e){return Array.isArray(t)?(_r(t,e[i],e),!0):!1}var Ys=1,zt=2,Di=4,Zr=8,Er=Zr,Ya=16,cr=32,OW=1;function TW(){return OW++}function $s(t,i){var e=i.manager;return e?e.get(t):t}function z$(t){return t&Ya?"cancel":t&Zr?"end":t&Di?"move":t&zt?"start":""}var Io=function(){function t(e){e===void 0&&(e={}),this.options=er({enable:!0},e),this.id=TW(),this.manager=null,this.state=Ys,this.simultaneous={},this.requireFail=[]}var i=t.prototype;return i.set=function(r){return Fn(this.options,r),this.manager&&this.manager.touchAction.update(),this},i.recognizeWith=function(r){if(bi(r,"recognizeWith",this))return this;var n=this.simultaneous;return r=$s(r,this),n[r.id]||(n[r.id]=r,r.recognizeWith(this)),this},i.dropRecognizeWith=function(r){return bi(r,"dropRecognizeWith",this)?this:(r=$s(r,this),delete this.simultaneous[r.id],this)},i.requireFailure=function(r){if(bi(r,"requireFailure",this))return this;var n=this.requireFail;return r=$s(r,this),Ln(n,r)===-1&&(n.push(r),r.requireFailure(this)),this},i.dropRequireFailure=function(r){if(bi(r,"dropRequireFailure",this))return this;r=$s(r,this);var n=Ln(this.requireFail,r);return n>-1&&this.requireFail.splice(n,1),this},i.hasRequireFailures=function(){return this.requireFail.length>0},i.canRecognizeWith=function(r){return!!this.simultaneous[r.id]},i.emit=function(r){var n=this,a=this.state;function o(s){n.manager.emit(s,r)}a<Zr&&o(n.options.event+z$(a)),o(n.options.event),r.additionalEvent&&o(r.additionalEvent),a>=Zr&&o(n.options.event+z$(a))},i.tryEmit=function(r){if(this.canEmit())return this.emit(r);this.state=cr},i.canEmit=function(){for(var r=0;r<this.requireFail.length;){if(!(this.requireFail[r].state&(cr|Ys)))return!1;r++}return!0},i.recognize=function(r){var n=Fn({},r);if(!fl(this.options.enable,[this,n])){this.reset(),this.state=cr;return}this.state&(Er|Ya|cr)&&(this.state=Ys),this.state=this.process(n),this.state&(zt|Di|Zr|Ya)&&this.tryEmit(n)},i.process=function(r){},i.getTouchAction=function(){},i.reset=function(){},t}(),ff=function(t){Wt(i,t);function i(r){var n;return r===void 0&&(r={}),n=t.call(this,er({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},r))||this,n.pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}var e=i.prototype;return e.getTouchAction=function(){return[hf]},e.process=function(n){var a=this,o=this.options,s=n.pointers.length===o.pointers,u=n.distance<o.threshold,l=n.deltaTime<o.time;if(this.reset(),n.eventType&ft&&this.count===0)return this.failTimeout();if(u&&l&&s){if(n.eventType!==Be)return this.failTimeout();var c=this.pTime?n.timeStamp-this.pTime<o.interval:!0,h=!this.pCenter||bu(this.pCenter,n.center)<o.posThreshold;this.pTime=n.timeStamp,this.pCenter=n.center,!h||!c?this.count=1:this.count+=1,this._input=n;var d=this.count%o.taps;if(d===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){a.state=Er,a.tryEmit()},o.interval),zt):Er}return cr},e.failTimeout=function(){var n=this;return this._timer=setTimeout(function(){n.state=cr},this.options.interval),cr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(){this.state===Er&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},i}(Io),Mi=function(t){Wt(i,t);function i(r){return r===void 0&&(r={}),t.call(this,er({pointers:1},r))||this}var e=i.prototype;return e.attrTest=function(n){var a=this.options.pointers;return a===0||n.pointers.length===a},e.process=function(n){var a=this.state,o=n.eventType,s=a&(zt|Di),u=this.attrTest(n);return s&&(o&Ot||!u)?a|Ya:s||u?o&Be?a|Zr:a&zt?a|Di:zt:cr},i}(Io);function zS(t){return t===Ri?"down":t===ko?"up":t===xo?"left":t===Po?"right":""}var Ig=function(t){Wt(i,t);function i(r){var n;return r===void 0&&(r={}),n=t.call(this,er({event:"pan",threshold:10,pointers:1,direction:CS},r))||this,n.pX=null,n.pY=null,n}var e=i.prototype;return e.getTouchAction=function(){var n=this.options.direction,a=[];return n&fr&&a.push(Ga),n&In&&a.push(Ua),a},e.directionTest=function(n){var a=this.options,o=!0,s=n.distance,u=n.direction,l=n.deltaX,c=n.deltaY;return u&a.direction||(a.direction&fr?(u=l===0?mu:l<0?xo:Po,o=l!==this.pX,s=Math.abs(n.deltaX)):(u=c===0?mu:c<0?ko:Ri,o=c!==this.pY,s=Math.abs(n.deltaY))),n.direction=u,o&&s>a.threshold&&u&a.direction},e.attrTest=function(n){return Mi.prototype.attrTest.call(this,n)&&(this.state&zt||!(this.state&zt)&&this.directionTest(n))},e.emit=function(n){this.pX=n.deltaX,this.pY=n.deltaY;var a=zS(n.direction);a&&(n.additionalEvent=this.options.event+a),t.prototype.emit.call(this,n)},i}(Mi),HS=function(t){Wt(i,t);function i(r){return r===void 0&&(r={}),t.call(this,er({event:"swipe",threshold:10,velocity:.3,direction:fr|In,pointers:1},r))||this}var e=i.prototype;return e.getTouchAction=function(){return Ig.prototype.getTouchAction.call(this)},e.attrTest=function(n){var a=this.options.direction,o;return a&(fr|In)?o=n.overallVelocity:a&fr?o=n.overallVelocityX:a&In&&(o=n.overallVelocityY),t.prototype.attrTest.call(this,n)&&a&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&Bn(o)>this.options.velocity&&n.eventType&Be},e.emit=function(n){var a=zS(n.offsetDirection);a&&this.manager.emit(this.options.event+a,n),this.manager.emit(this.options.event,n)},i}(Mi),WS=function(t){Wt(i,t);function i(r){return r===void 0&&(r={}),t.call(this,er({event:"pinch",threshold:0,pointers:2},r))||this}var e=i.prototype;return e.getTouchAction=function(){return[kn]},e.attrTest=function(n){return t.prototype.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&zt)},e.emit=function(n){if(n.scale!==1){var a=n.scale<1?"in":"out";n.additionalEvent=this.options.event+a}t.prototype.emit.call(this,n)},i}(Mi),VS=function(t){Wt(i,t);function i(r){return r===void 0&&(r={}),t.call(this,er({event:"rotate",threshold:0,pointers:2},r))||this}var e=i.prototype;return e.getTouchAction=function(){return[kn]},e.attrTest=function(n){return t.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&zt)},i}(Mi),US=function(t){Wt(i,t);function i(r){var n;return r===void 0&&(r={}),n=t.call(this,er({event:"press",pointers:1,time:251,threshold:9},r))||this,n._timer=null,n._input=null,n}var e=i.prototype;return e.getTouchAction=function(){return[kS]},e.process=function(n){var a=this,o=this.options,s=n.pointers.length===o.pointers,u=n.distance<o.threshold,l=n.deltaTime>o.time;if(this._input=n,!u||!s||n.eventType&(Be|Ot)&&!l)this.reset();else if(n.eventType&ft)this.reset(),this._timer=setTimeout(function(){a.state=Er,a.tryEmit()},o.time);else if(n.eventType&Be)return Er;return cr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(n){this.state===Er&&(n&&n.eventType&Be?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=Sg(),this.manager.emit(this.options.event,this._input)))},i}(Io),GS={domEvents:!1,touchAction:PS,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},H$=[[VS,{enable:!1}],[WS,{enable:!1},["rotate"]],[HS,{direction:fr}],[Ig,{direction:fr},["swipe"]],[ff],[ff,{event:"doubletap",taps:2},["tap"]],[US]],xW=1,W$=2;function V$(t,i){var e=t.element;if(e.style){var r;_r(t.options.cssProps,function(n,a){r=dl(e.style,a),i?(t.oldCssProps[r]=e.style[r],e.style[r]=n):e.style[r]=t.oldCssProps[r]||""}),i||(t.oldCssProps={})}}function PW(t,i){var e=document.createEvent("Event");e.initEvent(t,!0,!0),e.gesture=i,i.target.dispatchEvent(e)}var U$=function(){function t(e,r){var n=this;this.options=Fn({},GS,r||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=SW(this),this.touchAction=new RS(this,this.options.touchAction),V$(this,!0),_r(this.options.recognizers,function(a){var o=n.add(new a[0](a[1]));a[2]&&o.recognizeWith(a[2]),a[3]&&o.requireFailure(a[3])},this)}var i=t.prototype;return i.set=function(r){return Fn(this.options,r),r.touchAction&&this.touchAction.update(),r.inputTarget&&(this.input.destroy(),this.input.target=r.inputTarget,this.input.init()),this},i.stop=function(r){this.session.stopped=r?W$:xW},i.recognize=function(r){var n=this.session;if(!n.stopped){this.touchAction.preventDefaults(r);var a,o=this.recognizers,s=n.curRecognizer;(!s||s&&s.state&Er)&&(n.curRecognizer=null,s=null);for(var u=0;u<o.length;)a=o[u],n.stopped!==W$&&(!s||a===s||a.canRecognizeWith(s))?a.recognize(r):a.reset(),!s&&a.state&(zt|Di|Zr)&&(n.curRecognizer=a,s=a),u++}},i.get=function(r){if(r instanceof Io)return r;for(var n=this.recognizers,a=0;a<n.length;a++)if(n[a].options.event===r)return n[a];return null},i.add=function(r){if(bi(r,"add",this))return this;var n=this.get(r.options.event);return n&&this.remove(n),this.recognizers.push(r),r.manager=this,this.touchAction.update(),r},i.remove=function(r){if(bi(r,"remove",this))return this;var n=this.get(r);if(r){var a=this.recognizers,o=Ln(a,n);o!==-1&&(a.splice(o,1),this.touchAction.update())}return this},i.on=function(r,n){if(r===void 0||n===void 0)return this;var a=this.handlers;return _r(Ka(r),function(o){a[o]=a[o]||[],a[o].push(n)}),this},i.off=function(r,n){if(r===void 0)return this;var a=this.handlers;return _r(Ka(r),function(o){n?a[o]&&a[o].splice(Ln(a[o],n),1):delete a[o]}),this},i.emit=function(r,n){this.options.domEvents&&PW(r,n);var a=this.handlers[r]&&this.handlers[r].slice();if(!(!a||!a.length)){n.type=r,n.preventDefault=function(){n.srcEvent.preventDefault()};for(var o=0;o<a.length;)a[o](n),o++}},i.destroy=function(){this.element&&V$(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}(),kW={touchstart:ft,touchmove:Yn,touchend:Be,touchcancel:Ot},IW="touchstart",CW="touchstart touchmove touchend touchcancel",AW=function(t){Wt(i,t);function i(){var r,n=i.prototype;return n.evTarget=IW,n.evWin=CW,r=t.apply(this,arguments)||this,r.started=!1,r}var e=i.prototype;return e.handler=function(n){var a=kW[n.type];if(a===ft&&(this.started=!0),!!this.started){var o=RW.call(this,n,a);a&(Be|Ot)&&o[0].length-o[1].length===0&&(this.started=!1),this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:To,srcEvent:n})}},i}(ta);function RW(t,i){var e=qa(t.touches),r=qa(t.changedTouches);return i&(Be|Ot)&&(e=xg(e.concat(r),"identifier",!0)),[e,r]}function KS(t,i,e){var r="DEPRECATED METHOD: "+i+`
34
34
  `+e+` AT
35
35
  `;return function(){var n=new Error("get-stack-trace"),a=n&&n.stack?n.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,r,a),t.apply(this,arguments)}}var qS=KS(function(t,i,e){for(var r=Object.keys(i),n=0;n<r.length;)(!e||e&&t[r[n]]===void 0)&&(t[r[n]]=i[r[n]]),n++;return t},"extend","Use `assign`."),DW=KS(function(t,i){return qS(t,i,!0)},"merge","Use `assign`.");function MW(t,i,e){var r=i.prototype,n;n=t.prototype=Object.create(r),n.constructor=t,n._super=r,e&&Fn(n,e)}function G$(t,i){return function(){return t.apply(i,arguments)}}var NW=function(){var t=function(e,r){return r===void 0&&(r={}),new U$(e,er({recognizers:H$.concat()},r))};return t.VERSION="2.0.17-rc",t.DIRECTION_ALL=CS,t.DIRECTION_DOWN=Ri,t.DIRECTION_LEFT=xo,t.DIRECTION_RIGHT=Po,t.DIRECTION_UP=ko,t.DIRECTION_HORIZONTAL=fr,t.DIRECTION_VERTICAL=In,t.DIRECTION_NONE=mu,t.DIRECTION_DOWN=Ri,t.INPUT_START=ft,t.INPUT_MOVE=Yn,t.INPUT_END=Be,t.INPUT_CANCEL=Ot,t.STATE_POSSIBLE=Ys,t.STATE_BEGAN=zt,t.STATE_CHANGED=Di,t.STATE_ENDED=Zr,t.STATE_RECOGNIZED=Er,t.STATE_CANCELLED=Ya,t.STATE_FAILED=cr,t.Manager=U$,t.Input=ta,t.TouchAction=RS,t.TouchInput=Pg,t.MouseInput=kg,t.PointerEventInput=LS,t.TouchMouseInput=jS,t.SingleTouchInput=AW,t.Recognizer=Io,t.AttrRecognizer=Mi,t.Tap=ff,t.Pan=Ig,t.Swipe=HS,t.Pinch=WS,t.Rotate=VS,t.Press=US,t.on=Ia,t.off=Ca,t.each=_r,t.merge=DW,t.extend=qS,t.bindFn=G$,t.assign=Fn,t.inherit=MW,t.bindFn=G$,t.prefixed=dl,t.toArray=qa,t.inArray=Ln,t.uniqueArray=xg,t.splitStr=Ka,t.boolOrFn=fl,t.hasParent=Tg,t.addEventListeners=Ia,t.removeEventListeners=Ca,t.defaults=Fn({},GS,{preset:H$}),t}(),FW=NW;function YS(t,i){var e=typeof ll<"u"&&Oo(t)||t["@@iterator"];if(!e){if(It(t)||(e=BW(t))||i&&t&&typeof t.length=="number"){e&&(t=e);var r=0,n=function(){};return{s:n,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:n}}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(t)},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 BW(t,i){var e;if(t){if(typeof t=="string")return K$(t,i);var r=hl(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return bg(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return K$(t,i)}}function K$(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,r=new Array(i);e<i;e++)r[e]=t[e];return r}var XS=ll("DELETE");function LW(t){for(var i,e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return QS.apply(void 0,cl(i=[{},t]).call(i,r))}function QS(){var t=wu.apply(void 0,arguments);return JS(t),t}function wu(){for(var t=arguments.length,i=new Array(t),e=0;e<t;e++)i[e]=arguments[e];if(i.length<2)return i[0];if(i.length>2){var r;return wu.apply(void 0,cl(r=[QS(i[0],i[1])]).call(r,_t(hl(i).call(i,2))))}var n=i[0],a=i[1],o=YS(Iz(a)),s;try{for(o.s();!(s=o.n()).done;){var u=s.value;Object.prototype.propertyIsEnumerable.call(a,u)&&(a[u]===XS?delete n[u]:n[u]!==null&&a[u]!==null&&ot(n[u])==="object"&&ot(a[u])==="object"&&!It(n[u])&&!It(a[u])?n[u]=wu(n[u],a[u]):n[u]=ZS(a[u]))}}catch(l){o.e(l)}finally{o.f()}return n}function ZS(t){return It(t)?qt(t).call(t,function(i){return ZS(i)}):ot(t)==="object"&&t!==null?wu({},t):t}function JS(t){for(var i=0,e=_g(t);i<e.length;i++){var r=e[i];t[r]===XS?delete t[r]:ot(t[r])==="object"&&t[r]!==null&&JS(t[r])}}function jW(){var t=function(){};return{on:t,off:t,destroy:t,emit:t,get:function(){return{set:t}}}}var zW=typeof window<"u"?window.Hammer||FW:function(){return jW()};function $r(t){var i=this,e;this._cleanupQueue=[],this.active=!1,this._dom={container:t,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(function(){i._dom.overlay.parentNode.removeChild(i._dom.overlay)});var r=zW(this._dom.overlay);r.on("tap",WE(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(function(){r.destroy()});var n=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Nn(n).call(n,function(a){r.on(a,function(o){o.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(a){HW(a.target,t)||i.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(function(){document.body.removeEventListener("click",i._onClick)})),this._escListener=function(a){("key"in a?a.key==="Escape":a.keyCode===27)&&i.deactivate()}}XH($r.prototype);$r.current=null;$r.prototype.destroy=function(){var t,i;this.deactivate();var e=YS(w3(t=dS(i=this._cleanupQueue).call(i,0)).call(t)),r;try{for(e.s();!(r=e.n()).done;){var n=r.value;n()}}catch(a){e.e(a)}finally{e.f()}};$r.prototype.activate=function(){$r.current&&$r.current.deactivate(),$r.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)};$r.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")};$r.prototype._onTapOverlay=function(t){this.activate(),t.srcEvent.stopPropagation()};function HW(t,i){for(;t;){if(t===i)return!0;t=t.parentNode}return!1}var vf={},WW={get exports(){return vf},set exports(t){vf=t}},VW=Qu,UW=Yi,GW=TypeError,eO=function(t){if(VW(t))return t;throw GW(UW(t)+" is not a constructor")},KW=U,qW=pt,Ac=Gi,YW=zE,q$=eO,XW=Rt,Y$=Qe,QW=Kn,tO=oe,Cg=qW("Reflect","construct"),ZW=Object.prototype,JW=[].push,rO=tO(function(){function t(){}return!(Cg(function(){},[],t)instanceof t)}),nO=!tO(function(){Cg(function(){})}),X$=rO||nO;KW({target:"Reflect",stat:!0,forced:X$,sham:X$},{construct:function(i,e){q$(i),XW(e);var r=arguments.length<3?i:q$(arguments[2]);if(nO&&!rO)return Cg(i,e,r);if(i==r){switch(e.length){case 0:return new i;case 1:return new i(e[0]);case 2:return new i(e[0],e[1]);case 3:return new i(e[0],e[1],e[2]);case 4:return new i(e[0],e[1],e[2],e[3])}var n=[null];return Ac(JW,n,e),new(Ac(YW,i,n))}var a=r.prototype,o=QW(Y$(a)?a:ZW),s=Ac(i,o,e);return Y$(s)?s:o}});var e6=ye,t6=e6.Reflect.construct,r6=t6,n6=r6;(function(t){t.exports=n6})(WW);var Xs=Q(vf);function bn(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var _u={},i6={get exports(){return _u},set exports(t){_u=t}},pf={},a6={get exports(){return pf},set exports(t){pf=t}},o6=bS,s6=o6,u6=s6,l6=u6;(function(t){t.exports=l6})(a6);(function(t){t.exports=pf})(i6);var c6=Q(_u),Eu={},h6={get exports(){return Eu},set exports(t){Eu=t}},gf={},d6={get exports(){return gf},set exports(t){gf=t}},f6=U,v6=PE;f6({target:"Object",stat:!0},{setPrototypeOf:v6});var p6=ye,g6=p6.Object.setPrototypeOf,y6=g6,m6=y6,$6=m6,b6=$6,w6=b6,_6=w6;(function(t){t.exports=_6})(d6);(function(t){t.exports=gf})(h6);var yf=Q(Eu),mf={},E6={get exports(){return mf},set exports(t){mf=t}},$f={},S6={get exports(){return $f},set exports(t){$f=t}},O6=HE,T6=O6,x6=T6,P6=x6;(function(t){t.exports=P6})(S6);(function(t){t.exports=$f})(E6);var iO=Q(mf);function bf(t,i){var e;return bf=yf?iO(e=yf).call(e):function(n,a){return n.__proto__=a,n},bf(t,i)}function k6(t,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=c6(i&&i.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Yu(t,"prototype",{writable:!1}),i&&bf(t,i)}function I6(t,i){if(i&&(ot(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bn(t)}var Su={},C6={get exports(){return Su},set exports(t){Su=t}},wf={},A6={get exports(){return wf},set exports(t){wf=t}},R6=vS,D6=R6,M6=D6,N6=M6;(function(t){t.exports=N6})(A6);(function(t){t.exports=wf})(C6);var Q$=Q(Su);function Ou(t){var i;return Ou=yf?iO(i=Q$).call(i):function(r){return r.__proto__||Q$(r)},Ou(t)}var _f={},F6={get exports(){return _f},set exports(t){_f=t}},Ef={},B6={get exports(){return Ef},set exports(t){Ef=t}};(function(t){var i=za,e=gu;function r(n){"@babel/helpers - typeof";return t.exports=r=typeof i=="function"&&typeof e=="symbol"?function(a){return typeof a}:function(a){return a&&typeof i=="function"&&a.constructor===i&&a!==i.prototype?"symbol":typeof a},t.exports.__esModule=!0,t.exports.default=t.exports,r(n)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})(B6);var Sf={},L6={get exports(){return Sf},set exports(t){Sf=t}},Of={},j6={get exports(){return Of},set exports(t){Of=t}},z6=lS,H6=z6,W6=H6,V6=W6;(function(t){t.exports=V6})(j6);(function(t){t.exports=Of})(L6);var Tf={},U6={get exports(){return Tf},set exports(t){Tf=t}},xf={},G6={get exports(){return xf},set exports(t){xf=t}},Z$=ze,K6=wg,q6=Un,Y6=At,X6=function(t,i,e){for(var r=K6(i),n=Y6.f,a=q6.f,o=0;o<r.length;o++){var s=r[o];!Z$(t,s)&&!(e&&Z$(e,s))&&n(t,s,a(i,s))}},Q6=Qe,Z6=Dr,J6=function(t,i){Q6(i)&&"cause"in i&&Z6(t,"cause",i.cause)},eV=de,aO=Error,tV=eV("".replace),rV=function(t){return String(aO(t).stack)}("zxcasd"),oO=/\n\s*at [^:]*:[^\n]*/,nV=oO.test(rV),iV=function(t,i){if(nV&&typeof t=="string"&&!aO.prepareStackTrace)for(;i--;)t=tV(t,oO,"");return t},aV=oe,oV=Gn,sV=!aV(function(){var t=Error("a");return"stack"in t?(Object.defineProperty(t,"stack",oV(1,7)),t.stack!==7):!0}),uV=Dr,lV=iV,cV=sV,J$=Error.captureStackTrace,hV=function(t,i,e,r){cV&&(J$?J$(t,i):uV(t,"stack",lV(e,r)))},dV=hn,fV=Xe,vV=Rt,pV=Yi,gV=GE,yV=Dt,eb=Ee,mV=$g,$V=ul,tb=UE,bV=TypeError,Qs=function(t,i){this.stopped=t,this.result=i},rb=Qs.prototype,Xn=function(t,i,e){var r=e&&e.that,n=!!(e&&e.AS_ENTRIES),a=!!(e&&e.IS_RECORD),o=!!(e&&e.IS_ITERATOR),s=!!(e&&e.INTERRUPTED),u=dV(i,r),l,c,h,d,f,v,g,b=function($){return l&&tb(l,"normal",$),new Qs(!0,$)},p=function($){return n?(vV($),s?u($[0],$[1],b):u($[0],$[1])):s?u($,b):u($)};if(a)l=t.iterator;else if(o)l=t;else{if(c=$V(t),!c)throw bV(pV(t)+" is not iterable");if(gV(c)){for(h=0,d=yV(t);d>h;h++)if(f=p(t[h]),f&&eb(rb,f))return f;return new Qs(!1)}l=mV(t,c)}for(v=a?t.next:l.next;!(g=fV(v,l)).done;){try{f=p(g.value)}catch($){tb(l,"throw",$)}if(typeof f=="object"&&f&&eb(rb,f))return f}return new Qs(!1)},wV=yr,_V=function(t,i){return t===void 0?arguments.length<2?"":i:wV(t)},EV=U,SV=Ee,OV=ol,Tu=PE,TV=X6,sO=Kn,Rc=Dr,Dc=Gn,xV=J6,PV=hV,kV=Xn,IV=_V,CV=Se,AV=CV("toStringTag"),xu=Error,RV=[].push,Ni=function(i,e){var r=SV(Mc,this),n;Tu?n=Tu(xu(),r?OV(this):Mc):(n=r?this:sO(Mc),Rc(n,AV,"Error")),e!==void 0&&Rc(n,"message",IV(e)),PV(n,Ni,n.stack,1),arguments.length>2&&xV(n,arguments[2]);var a=[];return kV(i,RV,{that:a}),Rc(n,"errors",a),n};Tu?Tu(Ni,xu):TV(Ni,xu,{name:!0});var Mc=Ni.prototype=sO(xu.prototype,{constructor:Dc(1,Ni),message:Dc(1,""),name:Dc(1,"AggregateError")});EV({global:!0,constructor:!0,arity:2},{AggregateError:Ni});var DV=pt,MV=lg,NV=Se,FV=Ue,nb=NV("species"),uO=function(t){var i=DV(t);FV&&i&&!i[nb]&&MV(i,nb,{configurable:!0,get:function(){return this}})},BV=Ee,LV=TypeError,Ag=function(t,i){if(BV(i,t))return t;throw LV("Incorrect invocation")},ib=Rt,jV=eO,zV=uo,HV=Se,WV=HV("species"),lO=function(t,i){var e=ib(t).constructor,r;return e===void 0||zV(r=ib(e)[WV])?i:jV(r)},VV=cn,cO=/(?:ipad|iphone|ipod).*applewebkit/i.test(VV),Ct=Pe,UV=Gi,GV=hn,ab=ke,KV=ze,hO=oe,ob=q_,qV=wo,sb=rg,YV=wS,XV=cO,QV=So,Pf=Ct.setImmediate,kf=Ct.clearImmediate,ZV=Ct.process,Nc=Ct.Dispatch,JV=Ct.Function,ub=Ct.MessageChannel,e8=Ct.String,Fc=0,Aa={},lb="onreadystatechange",Xa,$n,Bc,Lc;hO(function(){Xa=Ct.location});var Rg=function(t){if(KV(Aa,t)){var i=Aa[t];delete Aa[t],i()}},jc=function(t){return function(){Rg(t)}},cb=function(t){Rg(t.data)},hb=function(t){Ct.postMessage(e8(t),Xa.protocol+"//"+Xa.host)};(!Pf||!kf)&&(Pf=function(i){YV(arguments.length,1);var e=ab(i)?i:JV(i),r=qV(arguments,1);return Aa[++Fc]=function(){UV(e,void 0,r)},$n(Fc),Fc},kf=function(i){delete Aa[i]},QV?$n=function(t){ZV.nextTick(jc(t))}:Nc&&Nc.now?$n=function(t){Nc.now(jc(t))}:ub&&!XV?(Bc=new ub,Lc=Bc.port2,Bc.port1.onmessage=cb,$n=GV(Lc.postMessage,Lc)):Ct.addEventListener&&ab(Ct.postMessage)&&!Ct.importScripts&&Xa&&Xa.protocol!=="file:"&&!hO(hb)?($n=hb,Ct.addEventListener("message",cb,!1)):lb in sb("script")?$n=function(t){ob.appendChild(sb("script"))[lb]=function(){ob.removeChild(this),Rg(t)}}:$n=function(t){setTimeout(jc(t),0)});var dO={set:Pf,clear:kf},fO=function(){this.head=null,this.tail=null};fO.prototype={add:function(t){var i={item:t,next:null},e=this.tail;e?e.next=i:this.head=i,this.tail=i},get:function(){var t=this.head;if(t){var i=this.head=t.next;return i===null&&(this.tail=null),t.item}}};var vO=fO,t8=cn,r8=/ipad|iphone|ipod/i.test(t8)&&typeof Pebble<"u",n8=cn,i8=/web0s(?!.*chrome)/i.test(n8),jn=Pe,db=hn,a8=Un.f,zc=dO.set,o8=vO,s8=cO,u8=r8,l8=i8,Hc=So,fb=jn.MutationObserver||jn.WebKitMutationObserver,vb=jn.document,pb=jn.process,bs=jn.Promise,gb=a8(jn,"queueMicrotask"),If=gb&&gb.value,ui,Wc,Vc,ws,yb;if(!If){var _s=new o8,Es=function(){var t,i;for(Hc&&(t=pb.domain)&&t.exit();i=_s.get();)try{i()}catch(e){throw _s.head&&ui(),e}t&&t.enter()};!s8&&!Hc&&!l8&&fb&&vb?(Wc=!0,Vc=vb.createTextNode(""),new fb(Es).observe(Vc,{characterData:!0}),ui=function(){Vc.data=Wc=!Wc}):!u8&&bs&&bs.resolve?(ws=bs.resolve(void 0),ws.constructor=bs,yb=db(ws.then,ws),ui=function(){yb(Es)}):Hc?ui=function(){pb.nextTick(Es)}:(zc=db(zc,jn),ui=function(){zc(Es)}),If=function(t){_s.head||ui(),_s.add(t)}}var c8=If,h8=function(t,i){try{arguments.length==1?console.error(t):console.error(t,i)}catch{}},ra=function(t){try{return{error:!1,value:t()}}catch(i){return{error:!0,value:i}}},d8=Pe,na=d8.Promise,pO=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",f8=pO,v8=So,p8=!f8&&!v8&&typeof window=="object"&&typeof document=="object",g8=Pe,Ra=na,y8=ke,m8=N_,$8=z_,b8=Se,w8=p8,_8=pO,Uc=Ki,mb=Ra&&Ra.prototype,E8=b8("species"),Cf=!1,gO=y8(g8.PromiseRejectionEvent),S8=m8("Promise",function(){var t=$8(Ra),i=t!==String(Ra);if(!i&&Uc===66||!(mb.catch&&mb.finally))return!0;if(!Uc||Uc<51||!/native code/.test(t)){var e=new Ra(function(a){a(1)}),r=function(a){a(function(){},function(){})},n=e.constructor={};if(n[E8]=r,Cf=e.then(function(){})instanceof r,!Cf)return!0}return!i&&(w8||_8)&&!gO}),Co={CONSTRUCTOR:S8,REJECTION_EVENT:gO,SUBCLASSING:Cf},Nr={},$b=xt,O8=TypeError,T8=function(t){var i,e;this.promise=new t(function(r,n){if(i!==void 0||e!==void 0)throw O8("Bad Promise constructor");i=r,e=n}),this.resolve=$b(i),this.reject=$b(e)};Nr.f=function(t){return new T8(t)};var x8=U,Pu=So,an=Pe,Ao=Xe,P8=Qi,k8=qn,I8=uO,C8=xt,Af=ke,A8=Qe,R8=Ag,D8=lO,yO=dO.set,Dg=c8,M8=h8,N8=ra,F8=vO,mO=Zi,Rf=na,$O=Co,bO=Nr,vl="Promise",wO=$O.CONSTRUCTOR,B8=$O.REJECTION_EVENT,Gc=mO.getterFor(vl),L8=mO.set,j8=Rf&&Rf.prototype,wi=Rf,Kc=j8,_O=an.TypeError,Df=an.document,Mg=an.process,Mf=bO.f,z8=Mf,H8=!!(Df&&Df.createEvent&&an.dispatchEvent),EO="unhandledrejection",W8="rejectionhandled",bb=0,SO=1,V8=2,Ng=1,OO=2,Ss,wb,U8,TO=function(t){var i;return A8(t)&&Af(i=t.then)?i:!1},xO=function(t,i){var e=i.value,r=i.state==SO,n=r?t.ok:t.fail,a=t.resolve,o=t.reject,s=t.domain,u,l,c;try{n?(r||(i.rejection===OO&&K8(i),i.rejection=Ng),n===!0?u=e:(s&&s.enter(),u=n(e),s&&(s.exit(),c=!0)),u===t.promise?o(_O("Promise-chain cycle")):(l=TO(u))?Ao(l,u,a,o):a(u)):o(e)}catch(h){s&&!c&&s.exit(),o(h)}},PO=function(t,i){t.notified||(t.notified=!0,Dg(function(){for(var e=t.reactions,r;r=e.get();)xO(r,t);t.notified=!1,i&&!t.rejection&&G8(t)}))},kO=function(t,i,e){var r,n;H8?(r=Df.createEvent("Event"),r.promise=i,r.reason=e,r.initEvent(t,!1,!0),an.dispatchEvent(r)):r={promise:i,reason:e},!B8&&(n=an["on"+t])?n(r):t===EO&&M8("Unhandled promise rejection",e)},G8=function(t){Ao(yO,an,function(){var i=t.facade,e=t.value,r=_b(t),n;if(r&&(n=N8(function(){Pu?Mg.emit("unhandledRejection",e,i):kO(EO,i,e)}),t.rejection=Pu||_b(t)?OO:Ng,n.error))throw n.value})},_b=function(t){return t.rejection!==Ng&&!t.parent},K8=function(t){Ao(yO,an,function(){var i=t.facade;Pu?Mg.emit("rejectionHandled",i):kO(W8,i,t.value)})},_i=function(t,i,e){return function(r){t(i,r,e)}},xi=function(t,i,e){t.done||(t.done=!0,e&&(t=e),t.value=i,t.state=V8,PO(t,!0))},Nf=function(t,i,e){if(!t.done){t.done=!0,e&&(t=e);try{if(t.facade===i)throw _O("Promise can't be resolved itself");var r=TO(i);r?Dg(function(){var n={done:!1};try{Ao(r,i,_i(Nf,n,t),_i(xi,n,t))}catch(a){xi(n,a,t)}}):(t.value=i,t.state=SO,PO(t,!1))}catch(n){xi({done:!1},n,t)}}};wO&&(wi=function(i){R8(this,Kc),C8(i),Ao(Ss,this);var e=Gc(this);try{i(_i(Nf,e),_i(xi,e))}catch(r){xi(e,r)}},Kc=wi.prototype,Ss=function(i){L8(this,{type:vl,done:!1,notified:!1,parent:!1,reactions:new F8,rejection:!1,state:bb,value:void 0})},Ss.prototype=P8(Kc,"then",function(i,e){var r=Gc(this),n=Mf(D8(this,wi));return r.parent=!0,n.ok=Af(i)?i:!0,n.fail=Af(e)&&e,n.domain=Pu?Mg.domain:void 0,r.state==bb?r.reactions.add(n):Dg(function(){xO(n,r)}),n.promise}),wb=function(){var t=new Ss,i=Gc(t);this.promise=t,this.resolve=_i(Nf,i),this.reject=_i(xi,i)},bO.f=Mf=function(t){return t===wi||t===U8?new wb(t):z8(t)});x8({global:!0,constructor:!0,wrap:!0,forced:wO},{Promise:wi});k8(wi,vl,!1,!0);I8(vl);var q8=na,Y8=YE,X8=Co.CONSTRUCTOR,pl=X8||!Y8(function(t){q8.all(t).then(void 0,function(){})}),Q8=U,Z8=Xe,J8=xt,eU=Nr,tU=ra,rU=Xn,nU=pl;Q8({target:"Promise",stat:!0,forced:nU},{all:function(i){var e=this,r=eU.f(e),n=r.resolve,a=r.reject,o=tU(function(){var s=J8(e.resolve),u=[],l=0,c=1;rU(i,function(h){var d=l++,f=!1;c++,Z8(s,e,h).then(function(v){f||(f=!0,u[d]=v,--c||n(u))},a)}),--c||n(u)});return o.error&&a(o.value),r.promise}});var iU=U,aU=Co.CONSTRUCTOR,Eb=na;Eb&&Eb.prototype;iU({target:"Promise",proto:!0,forced:aU,real:!0},{catch:function(t){return this.then(void 0,t)}});var oU=U,sU=Xe,uU=xt,lU=Nr,cU=ra,hU=Xn,dU=pl;oU({target:"Promise",stat:!0,forced:dU},{race:function(i){var e=this,r=lU.f(e),n=r.reject,a=cU(function(){var o=uU(e.resolve);hU(i,function(s){sU(o,e,s).then(r.resolve,n)})});return a.error&&n(a.value),r.promise}});var fU=U,vU=Xe,pU=Nr,gU=Co.CONSTRUCTOR;fU({target:"Promise",stat:!0,forced:gU},{reject:function(i){var e=pU.f(this);return vU(e.reject,void 0,i),e.promise}});var yU=Rt,mU=Qe,$U=Nr,IO=function(t,i){if(yU(t),mU(i)&&i.constructor===t)return i;var e=$U.f(t),r=e.resolve;return r(i),e.promise},bU=U,wU=pt,_U=DI,EU=na,SU=Co.CONSTRUCTOR,OU=IO,TU=wU("Promise"),xU=!SU;bU({target:"Promise",stat:!0,forced:_U},{resolve:function(i){return OU(xU&&this===TU?EU:this,i)}});var PU=U,kU=Xe,IU=xt,CU=Nr,AU=ra,RU=Xn,DU=pl;PU({target:"Promise",stat:!0,forced:DU},{allSettled:function(i){var e=this,r=CU.f(e),n=r.resolve,a=r.reject,o=AU(function(){var s=IU(e.resolve),u=[],l=0,c=1;RU(i,function(h){var d=l++,f=!1;c++,kU(s,e,h).then(function(v){f||(f=!0,u[d]={status:"fulfilled",value:v},--c||n(u))},function(v){f||(f=!0,u[d]={status:"rejected",reason:v},--c||n(u))})}),--c||n(u)});return o.error&&a(o.value),r.promise}});var MU=U,NU=Xe,FU=xt,BU=pt,LU=Nr,jU=ra,zU=Xn,HU=pl,Sb="No one promise resolved";MU({target:"Promise",stat:!0,forced:HU},{any:function(i){var e=this,r=BU("AggregateError"),n=LU.f(e),a=n.resolve,o=n.reject,s=jU(function(){var u=FU(e.resolve),l=[],c=0,h=1,d=!1;zU(i,function(f){var v=c++,g=!1;h++,NU(u,e,f).then(function(b){g||d||(d=!0,a(b))},function(b){g||d||(g=!0,l[v]=b,--h||o(new r(l,Sb)))})}),--h||o(new r(l,Sb))});return s.error&&o(s.value),n.promise}});var WU=U,Ff=na,VU=oe,UU=pt,GU=ke,KU=lO,Ob=IO,qU=Ff&&Ff.prototype,YU=!!Ff&&VU(function(){qU.finally.call({then:function(){}},function(){})});WU({target:"Promise",proto:!0,real:!0,forced:YU},{finally:function(t){var i=KU(this,UU("Promise")),e=GU(t);return this.then(e?function(r){return Ob(i,t()).then(function(){return r})}:t,e?function(r){return Ob(i,t()).then(function(){throw r})}:t)}});var XU=ye,QU=XU.Promise,ZU=QU,JU=ZU,eG=JU,tG=eG,rG=U,nG=Nr,iG=ra;rG({target:"Promise",stat:!0,forced:!0},{try:function(t){var i=nG.f(this),e=iG(t);return(e.error?i.reject:i.resolve)(e.value),i.promise}});var aG=tG,oG=aG;(function(t){t.exports=oG})(G6);(function(t){t.exports=xf})(U6);var Bf={},sG={get exports(){return Bf},set exports(t){Bf=t}},Lf={},uG={get exports(){return Lf},set exports(t){Lf=t}},lG=cS,cG=lG,hG=cG,dG=hG;(function(t){t.exports=dG})(uG);(function(t){t.exports=Lf})(sG);(function(t){var i=Ef.default,e=hu,r=za,n=_u,a=Su,o=Sf,s=Eu,u=Tf,l=Bf,c=yu;function h(){t.exports=h=function(){return d},t.exports.__esModule=!0,t.exports.default=t.exports;var d={},f=Object.prototype,v=f.hasOwnProperty,g=e||function(R,k,D){R[k]=D.value},b=typeof r=="function"?r:{},p=b.iterator||"@@iterator",$=b.asyncIterator||"@@asyncIterator",y=b.toStringTag||"@@toStringTag";function m(R,k,D){return e(R,k,{value:D,enumerable:!0,configurable:!0,writable:!0}),R[k]}try{m({},"")}catch{m=function(D,L,G){return D[L]=G}}function _(R,k,D,L){var G=k&&k.prototype instanceof O?k:O,Y=n(G.prototype),Re=new rt(L||[]);return g(Y,"_invoke",{value:le(R,D,Re)}),Y}function S(R,k,D){try{return{type:"normal",arg:R.call(k,D)}}catch(L){return{type:"throw",arg:L}}}d.wrap=_;var T={};function O(){}function w(){}function E(){}var A={};m(A,p,function(){return this});var H=a,B=H&&H(H(_e([])));B&&B!==f&&v.call(B,p)&&(A=B);var X=E.prototype=O.prototype=n(A);function re(R){var k;o(k=["next","throw","return"]).call(k,function(D){m(R,D,function(L){return this._invoke(D,L)})})}function te(R,k){function D(G,Y,Re,ut){var gt=S(R[G],R,Y);if(gt.type!=="throw"){var yn=gt.arg,Lr=yn.value;return Lr&&i(Lr)=="object"&&v.call(Lr,"__await")?k.resolve(Lr.__await).then(function(mn){D("next",mn,Re,ut)},function(mn){D("throw",mn,Re,ut)}):k.resolve(Lr).then(function(mn){yn.value=mn,Re(yn)},function(mn){return D("throw",mn,Re,ut)})}ut(gt.arg)}var L;g(this,"_invoke",{value:function(Y,Re){function ut(){return new k(function(gt,yn){D(Y,Re,gt,yn)})}return L=L?L.then(ut,ut):ut()}})}function le(R,k,D){var L="suspendedStart";return function(G,Y){if(L==="executing")throw new Error("Generator is already running");if(L==="completed"){if(G==="throw")throw Y;return Ae()}for(D.method=G,D.arg=Y;;){var Re=D.delegate;if(Re){var ut=we(Re,D);if(ut){if(ut===T)continue;return ut}}if(D.method==="next")D.sent=D._sent=D.arg;else if(D.method==="throw"){if(L==="suspendedStart")throw L="completed",D.arg;D.dispatchException(D.arg)}else D.method==="return"&&D.abrupt("return",D.arg);L="executing";var gt=S(R,k,D);if(gt.type==="normal"){if(L=D.done?"completed":"suspendedYield",gt.arg===T)continue;return{value:gt.arg,done:D.done}}gt.type==="throw"&&(L="completed",D.method="throw",D.arg=gt.arg)}}}function we(R,k){var D=k.method,L=R.iterator[D];if(L===void 0)return k.delegate=null,D==="throw"&&R.iterator.return&&(k.method="return",k.arg=void 0,we(R,k),k.method==="throw")||D!=="return"&&(k.method="throw",k.arg=new TypeError("The iterator does not provide a '"+D+"' method")),T;var G=S(L,R.iterator,k.arg);if(G.type==="throw")return k.method="throw",k.arg=G.arg,k.delegate=null,T;var Y=G.arg;return Y?Y.done?(k[R.resultName]=Y.value,k.next=R.nextLoc,k.method!=="return"&&(k.method="next",k.arg=void 0),k.delegate=null,T):Y:(k.method="throw",k.arg=new TypeError("iterator result is not an object"),k.delegate=null,T)}function Oe(R){var k={tryLoc:R[0]};1 in R&&(k.catchLoc=R[1]),2 in R&&(k.finallyLoc=R[2],k.afterLoc=R[3]),this.tryEntries.push(k)}function ar(R){var k=R.completion||{};k.type="normal",delete k.arg,R.completion=k}function rt(R){this.tryEntries=[{tryLoc:"root"}],o(R).call(R,Oe,this),this.reset(!0)}function _e(R){if(R){var k=R[p];if(k)return k.call(R);if(typeof R.next=="function")return R;if(!isNaN(R.length)){var D=-1,L=function G(){for(;++D<R.length;)if(v.call(R,D))return G.value=R[D],G.done=!1,G;return G.value=void 0,G.done=!0,G};return L.next=L}}return{next:Ae}}function Ae(){return{value:void 0,done:!0}}return w.prototype=E,g(X,"constructor",{value:E,configurable:!0}),g(E,"constructor",{value:w,configurable:!0}),w.displayName=m(E,y,"GeneratorFunction"),d.isGeneratorFunction=function(R){var k=typeof R=="function"&&R.constructor;return!!k&&(k===w||(k.displayName||k.name)==="GeneratorFunction")},d.mark=function(R){return s?s(R,E):(R.__proto__=E,m(R,y,"GeneratorFunction")),R.prototype=n(X),R},d.awrap=function(R){return{__await:R}},re(te.prototype),m(te.prototype,$,function(){return this}),d.AsyncIterator=te,d.async=function(R,k,D,L,G){G===void 0&&(G=u);var Y=new te(_(R,k,D,L),G);return d.isGeneratorFunction(k)?Y:Y.next().then(function(Re){return Re.done?Re.value:Y.next()})},re(X),m(X,y,"Generator"),m(X,p,function(){return this}),m(X,"toString",function(){return"[object Generator]"}),d.keys=function(R){var k=Object(R),D=[];for(var L in k)D.push(L);return l(D).call(D),function G(){for(;D.length;){var Y=D.pop();if(Y in k)return G.value=Y,G.done=!1,G}return G.done=!0,G}},d.values=_e,rt.prototype={constructor:rt,reset:function(k){var D;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,o(D=this.tryEntries).call(D,ar),!k)for(var L in this)L.charAt(0)==="t"&&v.call(this,L)&&!isNaN(+c(L).call(L,1))&&(this[L]=void 0)},stop:function(){this.done=!0;var k=this.tryEntries[0].completion;if(k.type==="throw")throw k.arg;return this.rval},dispatchException:function(k){if(this.done)throw k;var D=this;function L(yn,Lr){return Re.type="throw",Re.arg=k,D.next=yn,Lr&&(D.method="next",D.arg=void 0),!!Lr}for(var G=this.tryEntries.length-1;G>=0;--G){var Y=this.tryEntries[G],Re=Y.completion;if(Y.tryLoc==="root")return L("end");if(Y.tryLoc<=this.prev){var ut=v.call(Y,"catchLoc"),gt=v.call(Y,"finallyLoc");if(ut&&gt){if(this.prev<Y.catchLoc)return L(Y.catchLoc,!0);if(this.prev<Y.finallyLoc)return L(Y.finallyLoc)}else if(ut){if(this.prev<Y.catchLoc)return L(Y.catchLoc,!0)}else{if(!gt)throw new Error("try statement without catch or finally");if(this.prev<Y.finallyLoc)return L(Y.finallyLoc)}}}},abrupt:function(k,D){for(var L=this.tryEntries.length-1;L>=0;--L){var G=this.tryEntries[L];if(G.tryLoc<=this.prev&&v.call(G,"finallyLoc")&&this.prev<G.finallyLoc){var Y=G;break}}Y&&(k==="break"||k==="continue")&&Y.tryLoc<=D&&D<=Y.finallyLoc&&(Y=null);var Re=Y?Y.completion:{};return Re.type=k,Re.arg=D,Y?(this.method="next",this.next=Y.finallyLoc,T):this.complete(Re)},complete:function(k,D){if(k.type==="throw")throw k.arg;return k.type==="break"||k.type==="continue"?this.next=k.arg:k.type==="return"?(this.rval=this.arg=k.arg,this.method="return",this.next="end"):k.type==="normal"&&D&&(this.next=D),T},finish:function(k){for(var D=this.tryEntries.length-1;D>=0;--D){var L=this.tryEntries[D];if(L.finallyLoc===k)return this.complete(L.completion,L.afterLoc),ar(L),T}},catch:function(k){for(var D=this.tryEntries.length-1;D>=0;--D){var L=this.tryEntries[D];if(L.tryLoc===k){var G=L.completion;if(G.type==="throw"){var Y=G.arg;ar(L)}return Y}}throw new Error("illegal catch attempt")},delegateYield:function(k,D,L){return this.delegate={iterator:_e(k),resultName:D,nextLoc:L},this.method==="next"&&(this.arg=void 0),T}},d}t.exports=h,t.exports.__esModule=!0,t.exports.default=t.exports})(F6);var Zs=_f(),mt=Zs;try{regeneratorRuntime=Zs}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Zs:Function("r","regeneratorRuntime = r")(Zs)}var jf={},fG={get exports(){return jf},set exports(t){jf=t}},ku={},vG={get exports(){return ku},set exports(t){ku=t}},pG=oe,gG=pG(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),yG=oe,mG=Qe,$G=Rr,Tb=gG,Js=Object.isExtensible,bG=yG(function(){Js(1)}),wG=bG||Tb?function(i){return!mG(i)||Tb&&$G(i)=="ArrayBuffer"?!1:Js?Js(i):!0}:Js,_G=oe,EG=!_G(function(){return Object.isExtensible(Object.preventExtensions({}))}),SG=U,OG=de,TG=po,xG=Qe,Fg=ze,PG=At.f,xb=yo,kG=ug,Bg=wG,IG=Ku,CG=EG,CO=!1,Ir=IG("meta"),AG=0,Lg=function(t){PG(t,Ir,{value:{objectID:"O"+AG++,weakData:{}}})},RG=function(t,i){if(!xG(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!Fg(t,Ir)){if(!Bg(t))return"F";if(!i)return"E";Lg(t)}return t[Ir].objectID},DG=function(t,i){if(!Fg(t,Ir)){if(!Bg(t))return!0;if(!i)return!1;Lg(t)}return t[Ir].weakData},MG=function(t){return CG&&CO&&Bg(t)&&!Fg(t,Ir)&&Lg(t),t},NG=function(){FG.enable=function(){},CO=!0;var t=xb.f,i=OG([].splice),e={};e[Ir]=1,t(e).length&&(xb.f=function(r){for(var n=t(r),a=0,o=n.length;a<o;a++)if(n[a]===Ir){i(n,a,1);break}return n},SG({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:kG.f}))},FG=vG.exports={enable:NG,fastKey:RG,getWeakData:DG,onFreeze:MG};TG[Ir]=!0;var BG=U,LG=Pe,jG=ku,zG=oe,HG=Dr,WG=Xn,VG=Ag,UG=ke,GG=Qe,KG=qn,qG=At.f,YG=Ji.forEach,XG=Ue,AO=Zi,QG=AO.set,ZG=AO.getterFor,RO=function(t,i,e){var r=t.indexOf("Map")!==-1,n=t.indexOf("Weak")!==-1,a=r?"set":"add",o=LG[t],s=o&&o.prototype,u={},l;if(!XG||!UG(o)||!(n||s.forEach&&!zG(function(){new o().entries().next()})))l=e.getConstructor(i,t,r,a),jG.enable();else{l=i(function(d,f){QG(VG(d,c),{type:t,collection:new o}),f!=null&&WG(f,d[a],{that:d,AS_ENTRIES:r})});var c=l.prototype,h=ZG(t);YG(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(d){var f=d=="add"||d=="set";d in s&&!(n&&d=="clear")&&HG(c,d,function(v,g){var b=h(this).collection;if(!f&&n&&!GG(v))return d=="get"?void 0:!1;var p=b[d](v===0?0:v,g);return f?this:p})}),n||qG(c,"size",{configurable:!0,get:function(){return h(this).collection.size}})}return KG(l,t,!1,!0),u[t]=l,BG({global:!0,forced:!0},u),n||e.setStrong(l,t,r),l},JG=Qi,e9=function(t,i,e){for(var r in i)e&&e.unsafe&&t[r]?t[r]=i[r]:JG(t,r,i[r],e);return t},t9=Kn,r9=lg,Pb=e9,n9=hn,i9=Ag,a9=uo,o9=Xn,s9=gg,Os=yg,u9=uO,ya=Ue,kb=ku.fastKey,DO=Zi,Ib=DO.set,qc=DO.getterFor,MO={getConstructor:function(t,i,e,r){var n=t(function(l,c){i9(l,a),Ib(l,{type:i,index:t9(null),first:void 0,last:void 0,size:0}),ya||(l.size=0),a9(c)||o9(c,l[r],{that:l,AS_ENTRIES:e})}),a=n.prototype,o=qc(i),s=function(l,c,h){var d=o(l),f=u(l,c),v,g;return f?f.value=h:(d.last=f={index:g=kb(c,!0),key:c,value:h,previous:v=d.last,next:void 0,removed:!1},d.first||(d.first=f),v&&(v.next=f),ya?d.size++:l.size++,g!=="F"&&(d.index[g]=f)),l},u=function(l,c){var h=o(l),d=kb(c),f;if(d!=="F")return h.index[d];for(f=h.first;f;f=f.next)if(f.key==c)return f};return Pb(a,{clear:function(){for(var c=this,h=o(c),d=h.index,f=h.first;f;)f.removed=!0,f.previous&&(f.previous=f.previous.next=void 0),delete d[f.index],f=f.next;h.first=h.last=void 0,ya?h.size=0:c.size=0},delete:function(l){var c=this,h=o(c),d=u(c,l);if(d){var f=d.next,v=d.previous;delete h.index[d.index],d.removed=!0,v&&(v.next=f),f&&(f.previous=v),h.first==d&&(h.first=f),h.last==d&&(h.last=v),ya?h.size--:c.size--}return!!d},forEach:function(c){for(var h=o(this),d=n9(c,arguments.length>1?arguments[1]:void 0),f;f=f?f.next:h.first;)for(d(f.value,f.key,this);f&&f.removed;)f=f.previous},has:function(c){return!!u(this,c)}}),Pb(a,e?{get:function(c){var h=u(this,c);return h&&h.value},set:function(c,h){return s(this,c===0?0:c,h)}}:{add:function(c){return s(this,c=c===0?0:c,c)}}),ya&&r9(a,"size",{configurable:!0,get:function(){return o(this).size}}),n},setStrong:function(t,i,e){var r=i+" Iterator",n=qc(i),a=qc(r);s9(t,i,function(o,s){Ib(this,{type:r,target:o,state:n(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,Os(void 0,!0)):s=="keys"?Os(u.key,!1):s=="values"?Os(u.value,!1):Os([u.key,u.value],!1)},e?"entries":"values",!e,!0),u9(i)}},l9=RO,c9=MO;l9("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},c9);var h9=ye,d9=h9.Map,f9=d9,v9=f9;(function(t){t.exports=v9})(fG);var NO=Q(jf),zf={},p9={get exports(){return zf},set exports(t){zf=t}},g9=U,y9=Ji.some,m9=Eo,$9=m9("some");g9({target:"Array",proto:!0,forced:!$9},{some:function(i){return y9(this,i,arguments.length>1?arguments[1]:void 0)}});var b9=He,w9=b9("Array").some,_9=Ee,E9=w9,Yc=Array.prototype,S9=function(t){var i=t.some;return t===Yc||_9(Yc,t)&&i===Yc.some?E9:i},O9=S9,T9=O9;(function(t){t.exports=T9})(p9);var x9=Q(zf),Hf={},P9={get exports(){return Hf},set exports(t){Hf=t}},k9=He,I9=k9("Array").keys,C9=I9,A9=C9,R9=Mr,D9=ze,M9=Ee,N9=A9,Xc=Array.prototype,F9={DOMTokenList:!0,NodeList:!0},B9=function(t){var i=t.keys;return t===Xc||M9(Xc,t)&&i===Xc.keys||D9(F9,R9(t))?N9:i};(function(t){t.exports=B9})(P9);var li=Q(Hf),Wf={},L9={get exports(){return Wf},set exports(t){Wf=t}},Cb=Q_,j9=Math.floor,Vf=function(t,i){var e=t.length,r=j9(e/2);return e<8?z9(t,i):H9(t,Vf(Cb(t,0,r),i),Vf(Cb(t,r),i),i)},z9=function(t,i){for(var e=t.length,r=1,n,a;r<e;){for(a=r,n=t[r];a&&i(t[a-1],n)>0;)t[a]=t[--a];a!==r++&&(t[a]=n)}return t},H9=function(t,i,e,r){for(var n=i.length,a=e.length,o=0,s=0;o<n||s<a;)t[o+s]=o<n&&s<a?r(i[o],e[s])<=0?i[o++]:e[s++]:o<n?i[o++]:e[s++];return t},W9=Vf,V9=cn,Ab=V9.match(/firefox\/(\d+)/i),U9=!!Ab&&+Ab[1],G9=cn,K9=/MSIE|Trident/.test(G9),q9=cn,Rb=q9.match(/AppleWebKit\/(\d+)\./),Y9=!!Rb&&+Rb[1],X9=U,FO=de,Q9=xt,Z9=Pt,Db=Dt,J9=hS,Mb=yr,jg=oe,e7=W9,t7=Eo,Nb=U9,r7=K9,Fb=Ki,Bb=Y9,qr=[],Lb=FO(qr.sort),n7=FO(qr.push),i7=jg(function(){qr.sort(void 0)}),a7=jg(function(){qr.sort(null)}),o7=t7("sort"),BO=!jg(function(){if(Fb)return Fb<70;if(!(Nb&&Nb>3)){if(r7)return!0;if(Bb)return Bb<603;var t="",i,e,r,n;for(i=65;i<76;i++){switch(e=String.fromCharCode(i),i){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)qr.push({k:e+n,v:r})}for(qr.sort(function(a,o){return o.v-a.v}),n=0;n<qr.length;n++)e=qr[n].k.charAt(0),t.charAt(t.length-1)!==e&&(t+=e);return t!=="DGBEFHACIJK"}}),s7=i7||!a7||!o7||!BO,u7=function(t){return function(i,e){return e===void 0?-1:i===void 0?1:t!==void 0?+t(i,e)||0:Mb(i)>Mb(e)?1:-1}};X9({target:"Array",proto:!0,forced:s7},{sort:function(i){i!==void 0&&Q9(i);var e=Z9(this);if(BO)return i===void 0?Lb(e):Lb(e,i);var r=[],n=Db(e),a,o;for(o=0;o<n;o++)o in e&&n7(r,e[o]);for(e7(r,u7(i)),a=Db(r),o=0;o<a;)e[o]=r[o++];for(;o<n;)J9(e,o++);return e}});var l7=He,c7=l7("Array").sort,h7=Ee,d7=c7,Qc=Array.prototype,f7=function(t){var i=t.sort;return t===Qc||h7(Qc,t)&&i===Qc.sort?d7:i},v7=f7,p7=v7;(function(t){t.exports=p7})(L9);var Uf=Q(Wf),Gf={},g7={get exports(){return Gf},set exports(t){Gf=t}},y7=He,m7=y7("Array").values,$7=m7,b7=$7,w7=Mr,_7=ze,E7=Ee,S7=b7,Zc=Array.prototype,O7={DOMTokenList:!0,NodeList:!0},T7=function(t){var i=t.values;return t===Zc||E7(Zc,t)&&i===Zc.values||_7(O7,w7(t))?S7:i};(function(t){t.exports=T7})(g7);var jb=Q(Gf),Kf={},x7={get exports(){return Kf},set exports(t){Kf=t}};(function(t){t.exports=FE})(x7);var Pi=Q(Kf),qf={},P7={get exports(){return qf},set exports(t){qf=t}},k7=He,I7=k7("Array").entries,C7=I7,A7=C7,R7=Mr,D7=ze,M7=Ee,N7=A7,Jc=Array.prototype,F7={DOMTokenList:!0,NodeList:!0},B7=function(t){var i=t.entries;return t===Jc||M7(Jc,t)&&i===Jc.entries||D7(F7,R7(t))?N7:i};(function(t){t.exports=B7})(P7);var L7=Q(qf);let Ts;const j7=new Uint8Array(16);function z7(){if(!Ts&&(Ts=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ts))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ts(j7)}const nt=[];for(let t=0;t<256;++t)nt.push((t+256).toString(16).slice(1));function H7(t,i=0){return(nt[t[i+0]]+nt[t[i+1]]+nt[t[i+2]]+nt[t[i+3]]+"-"+nt[t[i+4]]+nt[t[i+5]]+"-"+nt[t[i+6]]+nt[t[i+7]]+"-"+nt[t[i+8]]+nt[t[i+9]]+"-"+nt[t[i+10]]+nt[t[i+11]]+nt[t[i+12]]+nt[t[i+13]]+nt[t[i+14]]+nt[t[i+15]]).toLowerCase()}const W7=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var zb={randomUUID:W7};function V7(t,i,e){if(zb.randomUUID&&!i&&!t)return zb.randomUUID();t=t||{};const r=t.random||(t.rng||z7)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,i){e=e||0;for(let n=0;n<16;++n)i[e+n]=r[n];return i}return H7(r)}function Hb(t){return typeof t=="string"||typeof t=="number"}var U7=function(){function t(i){Uu(this,t),De(this,"delay",void 0),De(this,"max",void 0),De(this,"_queue",[]),De(this,"_timeout",null),De(this,"_extended",null),this.delay=null,this.max=1/0,this.setOptions(i)}return sl(t,[{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,r=this._extended.methods,n=0;n<r.length;n++){var a=r[n];a.original?e[a.name]=a.original:delete e[a.name]}this._extended=null}}},{key:"replace",value:function(e,r){var n=this,a=e[r];if(!a)throw new Error("Method "+r+" undefined");e[r]=function(){for(var o=arguments.length,s=new Array(o),u=0;u<o;u++)s[u]=arguments[u];n.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=MH(function(){e.flush()},this.delay))}},{key:"flush",value:function(){var e,r;Nn(e=dS(r=this._queue).call(r,0)).call(e,function(n){n.fn.apply(n.context||n.fn,n.args||[])})}}],[{key:"extend",value:function(e,r){var n=new t(r);if(e.flush!==void 0)throw new Error("Target object already has a property flush");e.flush=function(){n.flush()};var a=[{name:"flush",original:void 0}];if(r&&r.replace)for(var o=0;o<r.replace.length;o++){var s=r.replace[o];a.push({name:s,original:e[s]}),n.replace(e,s)}return n._extended={object:e,methods:a},n}}]),t}(),G7=function(){function t(){Uu(this,t),De(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),De(this,"subscribe",t.prototype.on),De(this,"unsubscribe",t.prototype.off)}return sl(t,[{key:"_trigger",value:function(e,r,n){var a,o;if(e==="*")throw new Error("Cannot trigger event *");Nn(a=cl(o=[]).call(o,_t(this._subscribers[e]),_t(this._subscribers["*"]))).call(a,function(s){s(e,r,n??null)})}},{key:"on",value:function(e,r){typeof r=="function"&&this._subscribers[e].push(r)}},{key:"off",value:function(e,r){var n;this._subscribers[e]=mi(n=this._subscribers[e]).call(n,function(a){return a!==r})}}]),t}(),Yf={},K7={get exports(){return Yf},set exports(t){Yf=t}},q7=RO,Y7=MO;q7("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Y7);var X7=ye,Q7=X7.Set,Z7=Q7,J7=Z7;(function(t){t.exports=J7})(K7);var eh=Q(Yf),Xf={},eK={get exports(){return Xf},set exports(t){Xf=t}},Qf={},tK={get exports(){return Qf},set exports(t){Qf=t}},rK=$g,nK=rK,iK=nK,aK=iK,oK=aK,sK=oK,uK=sK,lK=uK;(function(t){t.exports=lK})(tK);(function(t){t.exports=Qf})(eK);var th=Q(Xf),LO;function sr(t,i){var e=typeof ll<"u"&&Oo(t)||t["@@iterator"];if(!e){if(It(t)||(e=cK(t))||i&&t&&typeof t.length=="number"){e&&(t=e);var r=0,n=function(){};return{s:n,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:n}}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(t)},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 BW(t,i){var e;if(t){if(typeof t=="string")return K$(t,i);var r=hl(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return bg(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return K$(t,i)}}function K$(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,r=new Array(i);e<i;e++)r[e]=t[e];return r}var XS=ll("DELETE");function LW(t){for(var i,e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return QS.apply(void 0,cl(i=[{},t]).call(i,r))}function QS(){var t=wu.apply(void 0,arguments);return JS(t),t}function wu(){for(var t=arguments.length,i=new Array(t),e=0;e<t;e++)i[e]=arguments[e];if(i.length<2)return i[0];if(i.length>2){var r;return wu.apply(void 0,cl(r=[QS(i[0],i[1])]).call(r,_t(hl(i).call(i,2))))}var n=i[0],a=i[1],o=YS(Iz(a)),s;try{for(o.s();!(s=o.n()).done;){var u=s.value;Object.prototype.propertyIsEnumerable.call(a,u)&&(a[u]===XS?delete n[u]:n[u]!==null&&a[u]!==null&&ot(n[u])==="object"&&ot(a[u])==="object"&&!It(n[u])&&!It(a[u])?n[u]=wu(n[u],a[u]):n[u]=ZS(a[u]))}}catch(l){o.e(l)}finally{o.f()}return n}function ZS(t){return It(t)?qt(t).call(t,function(i){return ZS(i)}):ot(t)==="object"&&t!==null?wu({},t):t}function JS(t){for(var i=0,e=_g(t);i<e.length;i++){var r=e[i];t[r]===XS?delete t[r]:ot(t[r])==="object"&&t[r]!==null&&JS(t[r])}}function jW(){var t=function(){};return{on:t,off:t,destroy:t,emit:t,get:function(){return{set:t}}}}var zW=typeof window<"u"?window.Hammer||FW:function(){return jW()};function $r(t){var i=this,e;this._cleanupQueue=[],this.active=!1,this._dom={container:t,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(function(){i._dom.overlay.parentNode.removeChild(i._dom.overlay)});var r=zW(this._dom.overlay);r.on("tap",WE(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(function(){r.destroy()});var n=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Nn(n).call(n,function(a){r.on(a,function(o){o.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(a){HW(a.target,t)||i.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(function(){document.body.removeEventListener("click",i._onClick)})),this._escListener=function(a){("key"in a?a.key==="Escape":a.keyCode===27)&&i.deactivate()}}XH($r.prototype);$r.current=null;$r.prototype.destroy=function(){var t,i;this.deactivate();var e=YS(w3(t=dS(i=this._cleanupQueue).call(i,0)).call(t)),r;try{for(e.s();!(r=e.n()).done;){var n=r.value;n()}}catch(a){e.e(a)}finally{e.f()}};$r.prototype.activate=function(){$r.current&&$r.current.deactivate(),$r.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)};$r.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")};$r.prototype._onTapOverlay=function(t){this.activate(),t.srcEvent.stopPropagation()};function HW(t,i){for(;t;){if(t===i)return!0;t=t.parentNode}return!1}var vf={},WW={get exports(){return vf},set exports(t){vf=t}},VW=Qu,UW=Yi,GW=TypeError,eO=function(t){if(VW(t))return t;throw GW(UW(t)+" is not a constructor")},KW=U,qW=pt,Ac=Gi,YW=zE,q$=eO,XW=Rt,Y$=Qe,QW=Kn,tO=oe,Cg=qW("Reflect","construct"),ZW=Object.prototype,JW=[].push,rO=tO(function(){function t(){}return!(Cg(function(){},[],t)instanceof t)}),nO=!tO(function(){Cg(function(){})}),X$=rO||nO;KW({target:"Reflect",stat:!0,forced:X$,sham:X$},{construct:function(i,e){q$(i),XW(e);var r=arguments.length<3?i:q$(arguments[2]);if(nO&&!rO)return Cg(i,e,r);if(i==r){switch(e.length){case 0:return new i;case 1:return new i(e[0]);case 2:return new i(e[0],e[1]);case 3:return new i(e[0],e[1],e[2]);case 4:return new i(e[0],e[1],e[2],e[3])}var n=[null];return Ac(JW,n,e),new(Ac(YW,i,n))}var a=r.prototype,o=QW(Y$(a)?a:ZW),s=Ac(i,o,e);return Y$(s)?s:o}});var e6=ye,t6=e6.Reflect.construct,r6=t6,n6=r6;(function(t){t.exports=n6})(WW);var Xs=Q(vf);function bn(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var _u={},i6={get exports(){return _u},set exports(t){_u=t}},pf={},a6={get exports(){return pf},set exports(t){pf=t}},o6=bS,s6=o6,u6=s6,l6=u6;(function(t){t.exports=l6})(a6);(function(t){t.exports=pf})(i6);var c6=Q(_u),Eu={},h6={get exports(){return Eu},set exports(t){Eu=t}},gf={},d6={get exports(){return gf},set exports(t){gf=t}},f6=U,v6=PE;f6({target:"Object",stat:!0},{setPrototypeOf:v6});var p6=ye,g6=p6.Object.setPrototypeOf,y6=g6,m6=y6,$6=m6,b6=$6,w6=b6,_6=w6;(function(t){t.exports=_6})(d6);(function(t){t.exports=gf})(h6);var yf=Q(Eu),mf={},E6={get exports(){return mf},set exports(t){mf=t}},$f={},S6={get exports(){return $f},set exports(t){$f=t}},O6=HE,T6=O6,x6=T6,P6=x6;(function(t){t.exports=P6})(S6);(function(t){t.exports=$f})(E6);var iO=Q(mf);function bf(t,i){var e;return bf=yf?iO(e=yf).call(e):function(n,a){return n.__proto__=a,n},bf(t,i)}function k6(t,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=c6(i&&i.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Yu(t,"prototype",{writable:!1}),i&&bf(t,i)}function I6(t,i){if(i&&(ot(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bn(t)}var Su={},C6={get exports(){return Su},set exports(t){Su=t}},wf={},A6={get exports(){return wf},set exports(t){wf=t}},R6=vS,D6=R6,M6=D6,N6=M6;(function(t){t.exports=N6})(A6);(function(t){t.exports=wf})(C6);var Q$=Q(Su);function Ou(t){var i;return Ou=yf?iO(i=Q$).call(i):function(r){return r.__proto__||Q$(r)},Ou(t)}var _f={},F6={get exports(){return _f},set exports(t){_f=t}},Ef={},B6={get exports(){return Ef},set exports(t){Ef=t}};(function(t){var i=za,e=gu;function r(n){"@babel/helpers - typeof";return t.exports=r=typeof i=="function"&&typeof e=="symbol"?function(a){return typeof a}:function(a){return a&&typeof i=="function"&&a.constructor===i&&a!==i.prototype?"symbol":typeof a},t.exports.__esModule=!0,t.exports.default=t.exports,r(n)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})(B6);var Sf={},L6={get exports(){return Sf},set exports(t){Sf=t}},Of={},j6={get exports(){return Of},set exports(t){Of=t}},z6=lS,H6=z6,W6=H6,V6=W6;(function(t){t.exports=V6})(j6);(function(t){t.exports=Of})(L6);var Tf={},U6={get exports(){return Tf},set exports(t){Tf=t}},xf={},G6={get exports(){return xf},set exports(t){xf=t}},Z$=ze,K6=wg,q6=Un,Y6=At,X6=function(t,i,e){for(var r=K6(i),n=Y6.f,a=q6.f,o=0;o<r.length;o++){var s=r[o];!Z$(t,s)&&!(e&&Z$(e,s))&&n(t,s,a(i,s))}},Q6=Qe,Z6=Dr,J6=function(t,i){Q6(i)&&"cause"in i&&Z6(t,"cause",i.cause)},e8=de,aO=Error,t8=e8("".replace),r8=function(t){return String(aO(t).stack)}("zxcasd"),oO=/\n\s*at [^:]*:[^\n]*/,n8=oO.test(r8),i8=function(t,i){if(n8&&typeof t=="string"&&!aO.prepareStackTrace)for(;i--;)t=t8(t,oO,"");return t},a8=oe,o8=Gn,s8=!a8(function(){var t=Error("a");return"stack"in t?(Object.defineProperty(t,"stack",o8(1,7)),t.stack!==7):!0}),u8=Dr,l8=i8,c8=s8,J$=Error.captureStackTrace,h8=function(t,i,e,r){c8&&(J$?J$(t,i):u8(t,"stack",l8(e,r)))},d8=hn,f8=Xe,v8=Rt,p8=Yi,g8=GE,y8=Dt,eb=Ee,m8=$g,$8=ul,tb=UE,b8=TypeError,Qs=function(t,i){this.stopped=t,this.result=i},rb=Qs.prototype,Xn=function(t,i,e){var r=e&&e.that,n=!!(e&&e.AS_ENTRIES),a=!!(e&&e.IS_RECORD),o=!!(e&&e.IS_ITERATOR),s=!!(e&&e.INTERRUPTED),u=d8(i,r),l,c,h,d,f,v,g,b=function($){return l&&tb(l,"normal",$),new Qs(!0,$)},p=function($){return n?(v8($),s?u($[0],$[1],b):u($[0],$[1])):s?u($,b):u($)};if(a)l=t.iterator;else if(o)l=t;else{if(c=$8(t),!c)throw b8(p8(t)+" is not iterable");if(g8(c)){for(h=0,d=y8(t);d>h;h++)if(f=p(t[h]),f&&eb(rb,f))return f;return new Qs(!1)}l=m8(t,c)}for(v=a?t.next:l.next;!(g=f8(v,l)).done;){try{f=p(g.value)}catch($){tb(l,"throw",$)}if(typeof f=="object"&&f&&eb(rb,f))return f}return new Qs(!1)},w8=yr,_8=function(t,i){return t===void 0?arguments.length<2?"":i:w8(t)},E8=U,S8=Ee,O8=ol,Tu=PE,T8=X6,sO=Kn,Rc=Dr,Dc=Gn,x8=J6,P8=h8,k8=Xn,I8=_8,C8=Se,A8=C8("toStringTag"),xu=Error,R8=[].push,Ni=function(i,e){var r=S8(Mc,this),n;Tu?n=Tu(xu(),r?O8(this):Mc):(n=r?this:sO(Mc),Rc(n,A8,"Error")),e!==void 0&&Rc(n,"message",I8(e)),P8(n,Ni,n.stack,1),arguments.length>2&&x8(n,arguments[2]);var a=[];return k8(i,R8,{that:a}),Rc(n,"errors",a),n};Tu?Tu(Ni,xu):T8(Ni,xu,{name:!0});var Mc=Ni.prototype=sO(xu.prototype,{constructor:Dc(1,Ni),message:Dc(1,""),name:Dc(1,"AggregateError")});E8({global:!0,constructor:!0,arity:2},{AggregateError:Ni});var D8=pt,M8=lg,N8=Se,F8=Ue,nb=N8("species"),uO=function(t){var i=D8(t);F8&&i&&!i[nb]&&M8(i,nb,{configurable:!0,get:function(){return this}})},B8=Ee,L8=TypeError,Ag=function(t,i){if(B8(i,t))return t;throw L8("Incorrect invocation")},ib=Rt,j8=eO,z8=uo,H8=Se,W8=H8("species"),lO=function(t,i){var e=ib(t).constructor,r;return e===void 0||z8(r=ib(e)[W8])?i:j8(r)},V8=cn,cO=/(?:ipad|iphone|ipod).*applewebkit/i.test(V8),Ct=Pe,U8=Gi,G8=hn,ab=ke,K8=ze,hO=oe,ob=q_,q8=wo,sb=rg,Y8=wS,X8=cO,Q8=So,Pf=Ct.setImmediate,kf=Ct.clearImmediate,Z8=Ct.process,Nc=Ct.Dispatch,J8=Ct.Function,ub=Ct.MessageChannel,eV=Ct.String,Fc=0,Aa={},lb="onreadystatechange",Xa,$n,Bc,Lc;hO(function(){Xa=Ct.location});var Rg=function(t){if(K8(Aa,t)){var i=Aa[t];delete Aa[t],i()}},jc=function(t){return function(){Rg(t)}},cb=function(t){Rg(t.data)},hb=function(t){Ct.postMessage(eV(t),Xa.protocol+"//"+Xa.host)};(!Pf||!kf)&&(Pf=function(i){Y8(arguments.length,1);var e=ab(i)?i:J8(i),r=q8(arguments,1);return Aa[++Fc]=function(){U8(e,void 0,r)},$n(Fc),Fc},kf=function(i){delete Aa[i]},Q8?$n=function(t){Z8.nextTick(jc(t))}:Nc&&Nc.now?$n=function(t){Nc.now(jc(t))}:ub&&!X8?(Bc=new ub,Lc=Bc.port2,Bc.port1.onmessage=cb,$n=G8(Lc.postMessage,Lc)):Ct.addEventListener&&ab(Ct.postMessage)&&!Ct.importScripts&&Xa&&Xa.protocol!=="file:"&&!hO(hb)?($n=hb,Ct.addEventListener("message",cb,!1)):lb in sb("script")?$n=function(t){ob.appendChild(sb("script"))[lb]=function(){ob.removeChild(this),Rg(t)}}:$n=function(t){setTimeout(jc(t),0)});var dO={set:Pf,clear:kf},fO=function(){this.head=null,this.tail=null};fO.prototype={add:function(t){var i={item:t,next:null},e=this.tail;e?e.next=i:this.head=i,this.tail=i},get:function(){var t=this.head;if(t){var i=this.head=t.next;return i===null&&(this.tail=null),t.item}}};var vO=fO,tV=cn,rV=/ipad|iphone|ipod/i.test(tV)&&typeof Pebble<"u",nV=cn,iV=/web0s(?!.*chrome)/i.test(nV),jn=Pe,db=hn,aV=Un.f,zc=dO.set,oV=vO,sV=cO,uV=rV,lV=iV,Hc=So,fb=jn.MutationObserver||jn.WebKitMutationObserver,vb=jn.document,pb=jn.process,bs=jn.Promise,gb=aV(jn,"queueMicrotask"),If=gb&&gb.value,ui,Wc,Vc,ws,yb;if(!If){var _s=new oV,Es=function(){var t,i;for(Hc&&(t=pb.domain)&&t.exit();i=_s.get();)try{i()}catch(e){throw _s.head&&ui(),e}t&&t.enter()};!sV&&!Hc&&!lV&&fb&&vb?(Wc=!0,Vc=vb.createTextNode(""),new fb(Es).observe(Vc,{characterData:!0}),ui=function(){Vc.data=Wc=!Wc}):!uV&&bs&&bs.resolve?(ws=bs.resolve(void 0),ws.constructor=bs,yb=db(ws.then,ws),ui=function(){yb(Es)}):Hc?ui=function(){pb.nextTick(Es)}:(zc=db(zc,jn),ui=function(){zc(Es)}),If=function(t){_s.head||ui(),_s.add(t)}}var cV=If,hV=function(t,i){try{arguments.length==1?console.error(t):console.error(t,i)}catch{}},ra=function(t){try{return{error:!1,value:t()}}catch(i){return{error:!0,value:i}}},dV=Pe,na=dV.Promise,pO=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",fV=pO,vV=So,pV=!fV&&!vV&&typeof window=="object"&&typeof document=="object",gV=Pe,Ra=na,yV=ke,mV=N_,$V=z_,bV=Se,wV=pV,_V=pO,Uc=Ki,mb=Ra&&Ra.prototype,EV=bV("species"),Cf=!1,gO=yV(gV.PromiseRejectionEvent),SV=mV("Promise",function(){var t=$V(Ra),i=t!==String(Ra);if(!i&&Uc===66||!(mb.catch&&mb.finally))return!0;if(!Uc||Uc<51||!/native code/.test(t)){var e=new Ra(function(a){a(1)}),r=function(a){a(function(){},function(){})},n=e.constructor={};if(n[EV]=r,Cf=e.then(function(){})instanceof r,!Cf)return!0}return!i&&(wV||_V)&&!gO}),Co={CONSTRUCTOR:SV,REJECTION_EVENT:gO,SUBCLASSING:Cf},Nr={},$b=xt,OV=TypeError,TV=function(t){var i,e;this.promise=new t(function(r,n){if(i!==void 0||e!==void 0)throw OV("Bad Promise constructor");i=r,e=n}),this.resolve=$b(i),this.reject=$b(e)};Nr.f=function(t){return new TV(t)};var xV=U,Pu=So,an=Pe,Ao=Xe,PV=Qi,kV=qn,IV=uO,CV=xt,Af=ke,AV=Qe,RV=Ag,DV=lO,yO=dO.set,Dg=cV,MV=hV,NV=ra,FV=vO,mO=Zi,Rf=na,$O=Co,bO=Nr,vl="Promise",wO=$O.CONSTRUCTOR,BV=$O.REJECTION_EVENT,Gc=mO.getterFor(vl),LV=mO.set,jV=Rf&&Rf.prototype,wi=Rf,Kc=jV,_O=an.TypeError,Df=an.document,Mg=an.process,Mf=bO.f,zV=Mf,HV=!!(Df&&Df.createEvent&&an.dispatchEvent),EO="unhandledrejection",WV="rejectionhandled",bb=0,SO=1,VV=2,Ng=1,OO=2,Ss,wb,UV,TO=function(t){var i;return AV(t)&&Af(i=t.then)?i:!1},xO=function(t,i){var e=i.value,r=i.state==SO,n=r?t.ok:t.fail,a=t.resolve,o=t.reject,s=t.domain,u,l,c;try{n?(r||(i.rejection===OO&&KV(i),i.rejection=Ng),n===!0?u=e:(s&&s.enter(),u=n(e),s&&(s.exit(),c=!0)),u===t.promise?o(_O("Promise-chain cycle")):(l=TO(u))?Ao(l,u,a,o):a(u)):o(e)}catch(h){s&&!c&&s.exit(),o(h)}},PO=function(t,i){t.notified||(t.notified=!0,Dg(function(){for(var e=t.reactions,r;r=e.get();)xO(r,t);t.notified=!1,i&&!t.rejection&&GV(t)}))},kO=function(t,i,e){var r,n;HV?(r=Df.createEvent("Event"),r.promise=i,r.reason=e,r.initEvent(t,!1,!0),an.dispatchEvent(r)):r={promise:i,reason:e},!BV&&(n=an["on"+t])?n(r):t===EO&&MV("Unhandled promise rejection",e)},GV=function(t){Ao(yO,an,function(){var i=t.facade,e=t.value,r=_b(t),n;if(r&&(n=NV(function(){Pu?Mg.emit("unhandledRejection",e,i):kO(EO,i,e)}),t.rejection=Pu||_b(t)?OO:Ng,n.error))throw n.value})},_b=function(t){return t.rejection!==Ng&&!t.parent},KV=function(t){Ao(yO,an,function(){var i=t.facade;Pu?Mg.emit("rejectionHandled",i):kO(WV,i,t.value)})},_i=function(t,i,e){return function(r){t(i,r,e)}},xi=function(t,i,e){t.done||(t.done=!0,e&&(t=e),t.value=i,t.state=VV,PO(t,!0))},Nf=function(t,i,e){if(!t.done){t.done=!0,e&&(t=e);try{if(t.facade===i)throw _O("Promise can't be resolved itself");var r=TO(i);r?Dg(function(){var n={done:!1};try{Ao(r,i,_i(Nf,n,t),_i(xi,n,t))}catch(a){xi(n,a,t)}}):(t.value=i,t.state=SO,PO(t,!1))}catch(n){xi({done:!1},n,t)}}};wO&&(wi=function(i){RV(this,Kc),CV(i),Ao(Ss,this);var e=Gc(this);try{i(_i(Nf,e),_i(xi,e))}catch(r){xi(e,r)}},Kc=wi.prototype,Ss=function(i){LV(this,{type:vl,done:!1,notified:!1,parent:!1,reactions:new FV,rejection:!1,state:bb,value:void 0})},Ss.prototype=PV(Kc,"then",function(i,e){var r=Gc(this),n=Mf(DV(this,wi));return r.parent=!0,n.ok=Af(i)?i:!0,n.fail=Af(e)&&e,n.domain=Pu?Mg.domain:void 0,r.state==bb?r.reactions.add(n):Dg(function(){xO(n,r)}),n.promise}),wb=function(){var t=new Ss,i=Gc(t);this.promise=t,this.resolve=_i(Nf,i),this.reject=_i(xi,i)},bO.f=Mf=function(t){return t===wi||t===UV?new wb(t):zV(t)});xV({global:!0,constructor:!0,wrap:!0,forced:wO},{Promise:wi});kV(wi,vl,!1,!0);IV(vl);var qV=na,YV=YE,XV=Co.CONSTRUCTOR,pl=XV||!YV(function(t){qV.all(t).then(void 0,function(){})}),QV=U,ZV=Xe,JV=xt,eU=Nr,tU=ra,rU=Xn,nU=pl;QV({target:"Promise",stat:!0,forced:nU},{all:function(i){var e=this,r=eU.f(e),n=r.resolve,a=r.reject,o=tU(function(){var s=JV(e.resolve),u=[],l=0,c=1;rU(i,function(h){var d=l++,f=!1;c++,ZV(s,e,h).then(function(v){f||(f=!0,u[d]=v,--c||n(u))},a)}),--c||n(u)});return o.error&&a(o.value),r.promise}});var iU=U,aU=Co.CONSTRUCTOR,Eb=na;Eb&&Eb.prototype;iU({target:"Promise",proto:!0,forced:aU,real:!0},{catch:function(t){return this.then(void 0,t)}});var oU=U,sU=Xe,uU=xt,lU=Nr,cU=ra,hU=Xn,dU=pl;oU({target:"Promise",stat:!0,forced:dU},{race:function(i){var e=this,r=lU.f(e),n=r.reject,a=cU(function(){var o=uU(e.resolve);hU(i,function(s){sU(o,e,s).then(r.resolve,n)})});return a.error&&n(a.value),r.promise}});var fU=U,vU=Xe,pU=Nr,gU=Co.CONSTRUCTOR;fU({target:"Promise",stat:!0,forced:gU},{reject:function(i){var e=pU.f(this);return vU(e.reject,void 0,i),e.promise}});var yU=Rt,mU=Qe,$U=Nr,IO=function(t,i){if(yU(t),mU(i)&&i.constructor===t)return i;var e=$U.f(t),r=e.resolve;return r(i),e.promise},bU=U,wU=pt,_U=DI,EU=na,SU=Co.CONSTRUCTOR,OU=IO,TU=wU("Promise"),xU=!SU;bU({target:"Promise",stat:!0,forced:_U},{resolve:function(i){return OU(xU&&this===TU?EU:this,i)}});var PU=U,kU=Xe,IU=xt,CU=Nr,AU=ra,RU=Xn,DU=pl;PU({target:"Promise",stat:!0,forced:DU},{allSettled:function(i){var e=this,r=CU.f(e),n=r.resolve,a=r.reject,o=AU(function(){var s=IU(e.resolve),u=[],l=0,c=1;RU(i,function(h){var d=l++,f=!1;c++,kU(s,e,h).then(function(v){f||(f=!0,u[d]={status:"fulfilled",value:v},--c||n(u))},function(v){f||(f=!0,u[d]={status:"rejected",reason:v},--c||n(u))})}),--c||n(u)});return o.error&&a(o.value),r.promise}});var MU=U,NU=Xe,FU=xt,BU=pt,LU=Nr,jU=ra,zU=Xn,HU=pl,Sb="No one promise resolved";MU({target:"Promise",stat:!0,forced:HU},{any:function(i){var e=this,r=BU("AggregateError"),n=LU.f(e),a=n.resolve,o=n.reject,s=jU(function(){var u=FU(e.resolve),l=[],c=0,h=1,d=!1;zU(i,function(f){var v=c++,g=!1;h++,NU(u,e,f).then(function(b){g||d||(d=!0,a(b))},function(b){g||d||(g=!0,l[v]=b,--h||o(new r(l,Sb)))})}),--h||o(new r(l,Sb))});return s.error&&o(s.value),n.promise}});var WU=U,Ff=na,VU=oe,UU=pt,GU=ke,KU=lO,Ob=IO,qU=Ff&&Ff.prototype,YU=!!Ff&&VU(function(){qU.finally.call({then:function(){}},function(){})});WU({target:"Promise",proto:!0,real:!0,forced:YU},{finally:function(t){var i=KU(this,UU("Promise")),e=GU(t);return this.then(e?function(r){return Ob(i,t()).then(function(){return r})}:t,e?function(r){return Ob(i,t()).then(function(){throw r})}:t)}});var XU=ye,QU=XU.Promise,ZU=QU,JU=ZU,eG=JU,tG=eG,rG=U,nG=Nr,iG=ra;rG({target:"Promise",stat:!0,forced:!0},{try:function(t){var i=nG.f(this),e=iG(t);return(e.error?i.reject:i.resolve)(e.value),i.promise}});var aG=tG,oG=aG;(function(t){t.exports=oG})(G6);(function(t){t.exports=xf})(U6);var Bf={},sG={get exports(){return Bf},set exports(t){Bf=t}},Lf={},uG={get exports(){return Lf},set exports(t){Lf=t}},lG=cS,cG=lG,hG=cG,dG=hG;(function(t){t.exports=dG})(uG);(function(t){t.exports=Lf})(sG);(function(t){var i=Ef.default,e=hu,r=za,n=_u,a=Su,o=Sf,s=Eu,u=Tf,l=Bf,c=yu;function h(){t.exports=h=function(){return d},t.exports.__esModule=!0,t.exports.default=t.exports;var d={},f=Object.prototype,v=f.hasOwnProperty,g=e||function(R,k,D){R[k]=D.value},b=typeof r=="function"?r:{},p=b.iterator||"@@iterator",$=b.asyncIterator||"@@asyncIterator",y=b.toStringTag||"@@toStringTag";function m(R,k,D){return e(R,k,{value:D,enumerable:!0,configurable:!0,writable:!0}),R[k]}try{m({},"")}catch{m=function(D,L,G){return D[L]=G}}function _(R,k,D,L){var G=k&&k.prototype instanceof O?k:O,Y=n(G.prototype),Re=new rt(L||[]);return g(Y,"_invoke",{value:le(R,D,Re)}),Y}function S(R,k,D){try{return{type:"normal",arg:R.call(k,D)}}catch(L){return{type:"throw",arg:L}}}d.wrap=_;var T={};function O(){}function w(){}function E(){}var A={};m(A,p,function(){return this});var H=a,B=H&&H(H(_e([])));B&&B!==f&&v.call(B,p)&&(A=B);var X=E.prototype=O.prototype=n(A);function re(R){var k;o(k=["next","throw","return"]).call(k,function(D){m(R,D,function(L){return this._invoke(D,L)})})}function te(R,k){function D(G,Y,Re,ut){var gt=S(R[G],R,Y);if(gt.type!=="throw"){var yn=gt.arg,Lr=yn.value;return Lr&&i(Lr)=="object"&&v.call(Lr,"__await")?k.resolve(Lr.__await).then(function(mn){D("next",mn,Re,ut)},function(mn){D("throw",mn,Re,ut)}):k.resolve(Lr).then(function(mn){yn.value=mn,Re(yn)},function(mn){return D("throw",mn,Re,ut)})}ut(gt.arg)}var L;g(this,"_invoke",{value:function(Y,Re){function ut(){return new k(function(gt,yn){D(Y,Re,gt,yn)})}return L=L?L.then(ut,ut):ut()}})}function le(R,k,D){var L="suspendedStart";return function(G,Y){if(L==="executing")throw new Error("Generator is already running");if(L==="completed"){if(G==="throw")throw Y;return Ae()}for(D.method=G,D.arg=Y;;){var Re=D.delegate;if(Re){var ut=we(Re,D);if(ut){if(ut===T)continue;return ut}}if(D.method==="next")D.sent=D._sent=D.arg;else if(D.method==="throw"){if(L==="suspendedStart")throw L="completed",D.arg;D.dispatchException(D.arg)}else D.method==="return"&&D.abrupt("return",D.arg);L="executing";var gt=S(R,k,D);if(gt.type==="normal"){if(L=D.done?"completed":"suspendedYield",gt.arg===T)continue;return{value:gt.arg,done:D.done}}gt.type==="throw"&&(L="completed",D.method="throw",D.arg=gt.arg)}}}function we(R,k){var D=k.method,L=R.iterator[D];if(L===void 0)return k.delegate=null,D==="throw"&&R.iterator.return&&(k.method="return",k.arg=void 0,we(R,k),k.method==="throw")||D!=="return"&&(k.method="throw",k.arg=new TypeError("The iterator does not provide a '"+D+"' method")),T;var G=S(L,R.iterator,k.arg);if(G.type==="throw")return k.method="throw",k.arg=G.arg,k.delegate=null,T;var Y=G.arg;return Y?Y.done?(k[R.resultName]=Y.value,k.next=R.nextLoc,k.method!=="return"&&(k.method="next",k.arg=void 0),k.delegate=null,T):Y:(k.method="throw",k.arg=new TypeError("iterator result is not an object"),k.delegate=null,T)}function Oe(R){var k={tryLoc:R[0]};1 in R&&(k.catchLoc=R[1]),2 in R&&(k.finallyLoc=R[2],k.afterLoc=R[3]),this.tryEntries.push(k)}function ar(R){var k=R.completion||{};k.type="normal",delete k.arg,R.completion=k}function rt(R){this.tryEntries=[{tryLoc:"root"}],o(R).call(R,Oe,this),this.reset(!0)}function _e(R){if(R){var k=R[p];if(k)return k.call(R);if(typeof R.next=="function")return R;if(!isNaN(R.length)){var D=-1,L=function G(){for(;++D<R.length;)if(v.call(R,D))return G.value=R[D],G.done=!1,G;return G.value=void 0,G.done=!0,G};return L.next=L}}return{next:Ae}}function Ae(){return{value:void 0,done:!0}}return w.prototype=E,g(X,"constructor",{value:E,configurable:!0}),g(E,"constructor",{value:w,configurable:!0}),w.displayName=m(E,y,"GeneratorFunction"),d.isGeneratorFunction=function(R){var k=typeof R=="function"&&R.constructor;return!!k&&(k===w||(k.displayName||k.name)==="GeneratorFunction")},d.mark=function(R){return s?s(R,E):(R.__proto__=E,m(R,y,"GeneratorFunction")),R.prototype=n(X),R},d.awrap=function(R){return{__await:R}},re(te.prototype),m(te.prototype,$,function(){return this}),d.AsyncIterator=te,d.async=function(R,k,D,L,G){G===void 0&&(G=u);var Y=new te(_(R,k,D,L),G);return d.isGeneratorFunction(k)?Y:Y.next().then(function(Re){return Re.done?Re.value:Y.next()})},re(X),m(X,y,"Generator"),m(X,p,function(){return this}),m(X,"toString",function(){return"[object Generator]"}),d.keys=function(R){var k=Object(R),D=[];for(var L in k)D.push(L);return l(D).call(D),function G(){for(;D.length;){var Y=D.pop();if(Y in k)return G.value=Y,G.done=!1,G}return G.done=!0,G}},d.values=_e,rt.prototype={constructor:rt,reset:function(k){var D;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,o(D=this.tryEntries).call(D,ar),!k)for(var L in this)L.charAt(0)==="t"&&v.call(this,L)&&!isNaN(+c(L).call(L,1))&&(this[L]=void 0)},stop:function(){this.done=!0;var k=this.tryEntries[0].completion;if(k.type==="throw")throw k.arg;return this.rval},dispatchException:function(k){if(this.done)throw k;var D=this;function L(yn,Lr){return Re.type="throw",Re.arg=k,D.next=yn,Lr&&(D.method="next",D.arg=void 0),!!Lr}for(var G=this.tryEntries.length-1;G>=0;--G){var Y=this.tryEntries[G],Re=Y.completion;if(Y.tryLoc==="root")return L("end");if(Y.tryLoc<=this.prev){var ut=v.call(Y,"catchLoc"),gt=v.call(Y,"finallyLoc");if(ut&&gt){if(this.prev<Y.catchLoc)return L(Y.catchLoc,!0);if(this.prev<Y.finallyLoc)return L(Y.finallyLoc)}else if(ut){if(this.prev<Y.catchLoc)return L(Y.catchLoc,!0)}else{if(!gt)throw new Error("try statement without catch or finally");if(this.prev<Y.finallyLoc)return L(Y.finallyLoc)}}}},abrupt:function(k,D){for(var L=this.tryEntries.length-1;L>=0;--L){var G=this.tryEntries[L];if(G.tryLoc<=this.prev&&v.call(G,"finallyLoc")&&this.prev<G.finallyLoc){var Y=G;break}}Y&&(k==="break"||k==="continue")&&Y.tryLoc<=D&&D<=Y.finallyLoc&&(Y=null);var Re=Y?Y.completion:{};return Re.type=k,Re.arg=D,Y?(this.method="next",this.next=Y.finallyLoc,T):this.complete(Re)},complete:function(k,D){if(k.type==="throw")throw k.arg;return k.type==="break"||k.type==="continue"?this.next=k.arg:k.type==="return"?(this.rval=this.arg=k.arg,this.method="return",this.next="end"):k.type==="normal"&&D&&(this.next=D),T},finish:function(k){for(var D=this.tryEntries.length-1;D>=0;--D){var L=this.tryEntries[D];if(L.finallyLoc===k)return this.complete(L.completion,L.afterLoc),ar(L),T}},catch:function(k){for(var D=this.tryEntries.length-1;D>=0;--D){var L=this.tryEntries[D];if(L.tryLoc===k){var G=L.completion;if(G.type==="throw"){var Y=G.arg;ar(L)}return Y}}throw new Error("illegal catch attempt")},delegateYield:function(k,D,L){return this.delegate={iterator:_e(k),resultName:D,nextLoc:L},this.method==="next"&&(this.arg=void 0),T}},d}t.exports=h,t.exports.__esModule=!0,t.exports.default=t.exports})(F6);var Zs=_f(),mt=Zs;try{regeneratorRuntime=Zs}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Zs:Function("r","regeneratorRuntime = r")(Zs)}var jf={},fG={get exports(){return jf},set exports(t){jf=t}},ku={},vG={get exports(){return ku},set exports(t){ku=t}},pG=oe,gG=pG(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),yG=oe,mG=Qe,$G=Rr,Tb=gG,Js=Object.isExtensible,bG=yG(function(){Js(1)}),wG=bG||Tb?function(i){return!mG(i)||Tb&&$G(i)=="ArrayBuffer"?!1:Js?Js(i):!0}:Js,_G=oe,EG=!_G(function(){return Object.isExtensible(Object.preventExtensions({}))}),SG=U,OG=de,TG=po,xG=Qe,Fg=ze,PG=At.f,xb=yo,kG=ug,Bg=wG,IG=Ku,CG=EG,CO=!1,Ir=IG("meta"),AG=0,Lg=function(t){PG(t,Ir,{value:{objectID:"O"+AG++,weakData:{}}})},RG=function(t,i){if(!xG(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!Fg(t,Ir)){if(!Bg(t))return"F";if(!i)return"E";Lg(t)}return t[Ir].objectID},DG=function(t,i){if(!Fg(t,Ir)){if(!Bg(t))return!0;if(!i)return!1;Lg(t)}return t[Ir].weakData},MG=function(t){return CG&&CO&&Bg(t)&&!Fg(t,Ir)&&Lg(t),t},NG=function(){FG.enable=function(){},CO=!0;var t=xb.f,i=OG([].splice),e={};e[Ir]=1,t(e).length&&(xb.f=function(r){for(var n=t(r),a=0,o=n.length;a<o;a++)if(n[a]===Ir){i(n,a,1);break}return n},SG({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:kG.f}))},FG=vG.exports={enable:NG,fastKey:RG,getWeakData:DG,onFreeze:MG};TG[Ir]=!0;var BG=U,LG=Pe,jG=ku,zG=oe,HG=Dr,WG=Xn,VG=Ag,UG=ke,GG=Qe,KG=qn,qG=At.f,YG=Ji.forEach,XG=Ue,AO=Zi,QG=AO.set,ZG=AO.getterFor,RO=function(t,i,e){var r=t.indexOf("Map")!==-1,n=t.indexOf("Weak")!==-1,a=r?"set":"add",o=LG[t],s=o&&o.prototype,u={},l;if(!XG||!UG(o)||!(n||s.forEach&&!zG(function(){new o().entries().next()})))l=e.getConstructor(i,t,r,a),jG.enable();else{l=i(function(d,f){QG(VG(d,c),{type:t,collection:new o}),f!=null&&WG(f,d[a],{that:d,AS_ENTRIES:r})});var c=l.prototype,h=ZG(t);YG(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(d){var f=d=="add"||d=="set";d in s&&!(n&&d=="clear")&&HG(c,d,function(v,g){var b=h(this).collection;if(!f&&n&&!GG(v))return d=="get"?void 0:!1;var p=b[d](v===0?0:v,g);return f?this:p})}),n||qG(c,"size",{configurable:!0,get:function(){return h(this).collection.size}})}return KG(l,t,!1,!0),u[t]=l,BG({global:!0,forced:!0},u),n||e.setStrong(l,t,r),l},JG=Qi,e9=function(t,i,e){for(var r in i)e&&e.unsafe&&t[r]?t[r]=i[r]:JG(t,r,i[r],e);return t},t9=Kn,r9=lg,Pb=e9,n9=hn,i9=Ag,a9=uo,o9=Xn,s9=gg,Os=yg,u9=uO,ya=Ue,kb=ku.fastKey,DO=Zi,Ib=DO.set,qc=DO.getterFor,MO={getConstructor:function(t,i,e,r){var n=t(function(l,c){i9(l,a),Ib(l,{type:i,index:t9(null),first:void 0,last:void 0,size:0}),ya||(l.size=0),a9(c)||o9(c,l[r],{that:l,AS_ENTRIES:e})}),a=n.prototype,o=qc(i),s=function(l,c,h){var d=o(l),f=u(l,c),v,g;return f?f.value=h:(d.last=f={index:g=kb(c,!0),key:c,value:h,previous:v=d.last,next:void 0,removed:!1},d.first||(d.first=f),v&&(v.next=f),ya?d.size++:l.size++,g!=="F"&&(d.index[g]=f)),l},u=function(l,c){var h=o(l),d=kb(c),f;if(d!=="F")return h.index[d];for(f=h.first;f;f=f.next)if(f.key==c)return f};return Pb(a,{clear:function(){for(var c=this,h=o(c),d=h.index,f=h.first;f;)f.removed=!0,f.previous&&(f.previous=f.previous.next=void 0),delete d[f.index],f=f.next;h.first=h.last=void 0,ya?h.size=0:c.size=0},delete:function(l){var c=this,h=o(c),d=u(c,l);if(d){var f=d.next,v=d.previous;delete h.index[d.index],d.removed=!0,v&&(v.next=f),f&&(f.previous=v),h.first==d&&(h.first=f),h.last==d&&(h.last=v),ya?h.size--:c.size--}return!!d},forEach:function(c){for(var h=o(this),d=n9(c,arguments.length>1?arguments[1]:void 0),f;f=f?f.next:h.first;)for(d(f.value,f.key,this);f&&f.removed;)f=f.previous},has:function(c){return!!u(this,c)}}),Pb(a,e?{get:function(c){var h=u(this,c);return h&&h.value},set:function(c,h){return s(this,c===0?0:c,h)}}:{add:function(c){return s(this,c=c===0?0:c,c)}}),ya&&r9(a,"size",{configurable:!0,get:function(){return o(this).size}}),n},setStrong:function(t,i,e){var r=i+" Iterator",n=qc(i),a=qc(r);s9(t,i,function(o,s){Ib(this,{type:r,target:o,state:n(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,Os(void 0,!0)):s=="keys"?Os(u.key,!1):s=="values"?Os(u.value,!1):Os([u.key,u.value],!1)},e?"entries":"values",!e,!0),u9(i)}},l9=RO,c9=MO;l9("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},c9);var h9=ye,d9=h9.Map,f9=d9,v9=f9;(function(t){t.exports=v9})(fG);var NO=Q(jf),zf={},p9={get exports(){return zf},set exports(t){zf=t}},g9=U,y9=Ji.some,m9=Eo,$9=m9("some");g9({target:"Array",proto:!0,forced:!$9},{some:function(i){return y9(this,i,arguments.length>1?arguments[1]:void 0)}});var b9=He,w9=b9("Array").some,_9=Ee,E9=w9,Yc=Array.prototype,S9=function(t){var i=t.some;return t===Yc||_9(Yc,t)&&i===Yc.some?E9:i},O9=S9,T9=O9;(function(t){t.exports=T9})(p9);var x9=Q(zf),Hf={},P9={get exports(){return Hf},set exports(t){Hf=t}},k9=He,I9=k9("Array").keys,C9=I9,A9=C9,R9=Mr,D9=ze,M9=Ee,N9=A9,Xc=Array.prototype,F9={DOMTokenList:!0,NodeList:!0},B9=function(t){var i=t.keys;return t===Xc||M9(Xc,t)&&i===Xc.keys||D9(F9,R9(t))?N9:i};(function(t){t.exports=B9})(P9);var li=Q(Hf),Wf={},L9={get exports(){return Wf},set exports(t){Wf=t}},Cb=Q_,j9=Math.floor,Vf=function(t,i){var e=t.length,r=j9(e/2);return e<8?z9(t,i):H9(t,Vf(Cb(t,0,r),i),Vf(Cb(t,r),i),i)},z9=function(t,i){for(var e=t.length,r=1,n,a;r<e;){for(a=r,n=t[r];a&&i(t[a-1],n)>0;)t[a]=t[--a];a!==r++&&(t[a]=n)}return t},H9=function(t,i,e,r){for(var n=i.length,a=e.length,o=0,s=0;o<n||s<a;)t[o+s]=o<n&&s<a?r(i[o],e[s])<=0?i[o++]:e[s++]:o<n?i[o++]:e[s++];return t},W9=Vf,V9=cn,Ab=V9.match(/firefox\/(\d+)/i),U9=!!Ab&&+Ab[1],G9=cn,K9=/MSIE|Trident/.test(G9),q9=cn,Rb=q9.match(/AppleWebKit\/(\d+)\./),Y9=!!Rb&&+Rb[1],X9=U,FO=de,Q9=xt,Z9=Pt,Db=Dt,J9=hS,Mb=yr,jg=oe,e7=W9,t7=Eo,Nb=U9,r7=K9,Fb=Ki,Bb=Y9,qr=[],Lb=FO(qr.sort),n7=FO(qr.push),i7=jg(function(){qr.sort(void 0)}),a7=jg(function(){qr.sort(null)}),o7=t7("sort"),BO=!jg(function(){if(Fb)return Fb<70;if(!(Nb&&Nb>3)){if(r7)return!0;if(Bb)return Bb<603;var t="",i,e,r,n;for(i=65;i<76;i++){switch(e=String.fromCharCode(i),i){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)qr.push({k:e+n,v:r})}for(qr.sort(function(a,o){return o.v-a.v}),n=0;n<qr.length;n++)e=qr[n].k.charAt(0),t.charAt(t.length-1)!==e&&(t+=e);return t!=="DGBEFHACIJK"}}),s7=i7||!a7||!o7||!BO,u7=function(t){return function(i,e){return e===void 0?-1:i===void 0?1:t!==void 0?+t(i,e)||0:Mb(i)>Mb(e)?1:-1}};X9({target:"Array",proto:!0,forced:s7},{sort:function(i){i!==void 0&&Q9(i);var e=Z9(this);if(BO)return i===void 0?Lb(e):Lb(e,i);var r=[],n=Db(e),a,o;for(o=0;o<n;o++)o in e&&n7(r,e[o]);for(e7(r,u7(i)),a=Db(r),o=0;o<a;)e[o]=r[o++];for(;o<n;)J9(e,o++);return e}});var l7=He,c7=l7("Array").sort,h7=Ee,d7=c7,Qc=Array.prototype,f7=function(t){var i=t.sort;return t===Qc||h7(Qc,t)&&i===Qc.sort?d7:i},v7=f7,p7=v7;(function(t){t.exports=p7})(L9);var Uf=Q(Wf),Gf={},g7={get exports(){return Gf},set exports(t){Gf=t}},y7=He,m7=y7("Array").values,$7=m7,b7=$7,w7=Mr,_7=ze,E7=Ee,S7=b7,Zc=Array.prototype,O7={DOMTokenList:!0,NodeList:!0},T7=function(t){var i=t.values;return t===Zc||E7(Zc,t)&&i===Zc.values||_7(O7,w7(t))?S7:i};(function(t){t.exports=T7})(g7);var jb=Q(Gf),Kf={},x7={get exports(){return Kf},set exports(t){Kf=t}};(function(t){t.exports=FE})(x7);var Pi=Q(Kf),qf={},P7={get exports(){return qf},set exports(t){qf=t}},k7=He,I7=k7("Array").entries,C7=I7,A7=C7,R7=Mr,D7=ze,M7=Ee,N7=A7,Jc=Array.prototype,F7={DOMTokenList:!0,NodeList:!0},B7=function(t){var i=t.entries;return t===Jc||M7(Jc,t)&&i===Jc.entries||D7(F7,R7(t))?N7:i};(function(t){t.exports=B7})(P7);var L7=Q(qf);let Ts;const j7=new Uint8Array(16);function z7(){if(!Ts&&(Ts=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ts))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ts(j7)}const nt=[];for(let t=0;t<256;++t)nt.push((t+256).toString(16).slice(1));function H7(t,i=0){return(nt[t[i+0]]+nt[t[i+1]]+nt[t[i+2]]+nt[t[i+3]]+"-"+nt[t[i+4]]+nt[t[i+5]]+"-"+nt[t[i+6]]+nt[t[i+7]]+"-"+nt[t[i+8]]+nt[t[i+9]]+"-"+nt[t[i+10]]+nt[t[i+11]]+nt[t[i+12]]+nt[t[i+13]]+nt[t[i+14]]+nt[t[i+15]]).toLowerCase()}const W7=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var zb={randomUUID:W7};function V7(t,i,e){if(zb.randomUUID&&!i&&!t)return zb.randomUUID();t=t||{};const r=t.random||(t.rng||z7)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,i){e=e||0;for(let n=0;n<16;++n)i[e+n]=r[n];return i}return H7(r)}function Hb(t){return typeof t=="string"||typeof t=="number"}var U7=function(){function t(i){Uu(this,t),De(this,"delay",void 0),De(this,"max",void 0),De(this,"_queue",[]),De(this,"_timeout",null),De(this,"_extended",null),this.delay=null,this.max=1/0,this.setOptions(i)}return sl(t,[{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,r=this._extended.methods,n=0;n<r.length;n++){var a=r[n];a.original?e[a.name]=a.original:delete e[a.name]}this._extended=null}}},{key:"replace",value:function(e,r){var n=this,a=e[r];if(!a)throw new Error("Method "+r+" undefined");e[r]=function(){for(var o=arguments.length,s=new Array(o),u=0;u<o;u++)s[u]=arguments[u];n.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=MH(function(){e.flush()},this.delay))}},{key:"flush",value:function(){var e,r;Nn(e=dS(r=this._queue).call(r,0)).call(e,function(n){n.fn.apply(n.context||n.fn,n.args||[])})}}],[{key:"extend",value:function(e,r){var n=new t(r);if(e.flush!==void 0)throw new Error("Target object already has a property flush");e.flush=function(){n.flush()};var a=[{name:"flush",original:void 0}];if(r&&r.replace)for(var o=0;o<r.replace.length;o++){var s=r.replace[o];a.push({name:s,original:e[s]}),n.replace(e,s)}return n._extended={object:e,methods:a},n}}]),t}(),G7=function(){function t(){Uu(this,t),De(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),De(this,"subscribe",t.prototype.on),De(this,"unsubscribe",t.prototype.off)}return sl(t,[{key:"_trigger",value:function(e,r,n){var a,o;if(e==="*")throw new Error("Cannot trigger event *");Nn(a=cl(o=[]).call(o,_t(this._subscribers[e]),_t(this._subscribers["*"]))).call(a,function(s){s(e,r,n??null)})}},{key:"on",value:function(e,r){typeof r=="function"&&this._subscribers[e].push(r)}},{key:"off",value:function(e,r){var n;this._subscribers[e]=mi(n=this._subscribers[e]).call(n,function(a){return a!==r})}}]),t}(),Yf={},K7={get exports(){return Yf},set exports(t){Yf=t}},q7=RO,Y7=MO;q7("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Y7);var X7=ye,Q7=X7.Set,Z7=Q7,J7=Z7;(function(t){t.exports=J7})(K7);var eh=Q(Yf),Xf={},eK={get exports(){return Xf},set exports(t){Xf=t}},Qf={},tK={get exports(){return Qf},set exports(t){Qf=t}},rK=$g,nK=rK,iK=nK,aK=iK,oK=aK,sK=oK,uK=sK,lK=uK;(function(t){t.exports=lK})(tK);(function(t){t.exports=Qf})(eK);var th=Q(Xf),LO;function sr(t,i){var e=typeof ll<"u"&&Oo(t)||t["@@iterator"];if(!e){if(It(t)||(e=cK(t))||i&&t&&typeof t.length=="number"){e&&(t=e);var r=0,n=function(){};return{s:n,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
37
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(t)},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 cK(t,i){var e;if(t){if(typeof t=="string")return Wb(t,i);var r=hl(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return bg(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Wb(t,i)}}function Wb(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,r=new Array(i);e<i;e++)r[e]=t[e];return r}LO=Pi;var Vb=function(){function t(i){Uu(this,t),De(this,"_pairs",void 0),this._pairs=i}return sl(t,[{key:LO,value:mt.mark(function i(){var e,r,n,a,o;return mt.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:e=sr(this._pairs),u.prev=1,e.s();case 3:if((r=e.n()).done){u.next=9;break}return n=yt(r.value,2),a=n[0],o=n[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()}},i,this,[[1,11,14,17]])})},{key:"entries",value:mt.mark(function i(){var e,r,n,a,o;return mt.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:e=sr(this._pairs),u.prev=1,e.s();case 3:if((r=e.n()).done){u.next=9;break}return n=yt(r.value,2),a=n[0],o=n[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()}},i,this,[[1,11,14,17]])})},{key:"keys",value:mt.mark(function i(){var e,r,n,a;return mt.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:e=sr(this._pairs),s.prev=1,e.s();case 3:if((r=e.n()).done){s.next=9;break}return n=yt(r.value,1),a=n[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()}},i,this,[[1,11,14,17]])})},{key:"values",value:mt.mark(function i(){var e,r,n,a;return mt.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:e=sr(this._pairs),s.prev=1,e.s();case 3:if((r=e.n()).done){s.next=9;break}return n=yt(r.value,2),a=n[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()}},i,this,[[1,11,14,17]])})},{key:"toIdArray",value:function(){var e;return qt(e=_t(this._pairs)).call(e,function(r){return r[0]})}},{key:"toItemArray",value:function(){var e;return qt(e=_t(this._pairs)).call(e,function(r){return r[1]})}},{key:"toEntryArray",value:function(){return _t(this._pairs)}},{key:"toObjectMap",value:function(){var e=hH(null),r=sr(this._pairs),n;try{for(r.s();!(n=r.n()).done;){var a=yt(n.value,2),o=a[0],s=a[1];e[o]=s}}catch(u){r.e(u)}finally{r.f()}return e}},{key:"toMap",value:function(){return new NO(this._pairs)}},{key:"toIdSet",value:function(){return new eh(this.toIdArray())}},{key:"toItemSet",value:function(){return new eh(this.toItemArray())}},{key:"cache",value:function(){return new t(_t(this._pairs))}},{key:"distinct",value:function(e){var r=new eh,n=sr(this._pairs),a;try{for(n.s();!(a=n.n()).done;){var o=yt(a.value,2),s=o[0],u=o[1];r.add(e(u,s))}}catch(l){n.e(l)}finally{n.f()}return r}},{key:"filter",value:function(e){var r=this._pairs;return new t(De({},Pi,mt.mark(function n(){var a,o,s,u,l;return mt.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:a=sr(r),h.prev=1,a.s();case 3:if((o=a.n()).done){h.next=10;break}if(s=yt(o.value,2),u=s[0],l=s[1],!e(l,u)){h.next=8;break}return h.next=8,[u,l];case 8:h.next=3;break;case 10:h.next=15;break;case 12:h.prev=12,h.t0=h.catch(1),a.e(h.t0);case 15:return h.prev=15,a.f(),h.finish(15);case 18:case"end":return h.stop()}},n,null,[[1,12,15,18]])})))}},{key:"forEach",value:function(e){var r=sr(this._pairs),n;try{for(r.s();!(n=r.n()).done;){var a=yt(n.value,2),o=a[0],s=a[1];e(s,o)}}catch(u){r.e(u)}finally{r.f()}}},{key:"map",value:function(e){var r=this._pairs;return new t(De({},Pi,mt.mark(function n(){var a,o,s,u,l;return mt.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:a=sr(r),h.prev=1,a.s();case 3:if((o=a.n()).done){h.next=9;break}return s=yt(o.value,2),u=s[0],l=s[1],h.next=7,[u,e(l,u)];case 7:h.next=3;break;case 9:h.next=14;break;case 11:h.prev=11,h.t0=h.catch(1),a.e(h.t0);case 14:return h.prev=14,a.f(),h.finish(14);case 17:case"end":return h.stop()}},n,null,[[1,11,14,17]])})))}},{key:"max",value:function(e){var r=th(this._pairs),n=r.next();if(n.done)return null;for(var a=n.value[1],o=e(n.value[1],n.value[0]);!(n=r.next()).done;){var s=yt(n.value,2),u=s[0],l=s[1],c=e(l,u);c>o&&(o=c,a=l)}return a}},{key:"min",value:function(e){var r=th(this._pairs),n=r.next();if(n.done)return null;for(var a=n.value[1],o=e(n.value[1],n.value[0]);!(n=r.next()).done;){var s=yt(n.value,2),u=s[0],l=s[1],c=e(l,u);c<o&&(o=c,a=l)}return a}},{key:"reduce",value:function(e,r){var n=sr(this._pairs),a;try{for(n.s();!(a=n.n()).done;){var o=yt(a.value,2),s=o[0],u=o[1];r=e(r,u,s)}}catch(l){n.e(l)}finally{n.f()}return r}},{key:"sort",value:function(e){var r=this;return new t(De({},Pi,function(){var n;return th(Uf(n=_t(r._pairs)).call(n,function(a,o){var s=yt(a,2),u=s[0],l=s[1],c=yt(o,2),h=c[0],d=c[1];return e(l,d,u,h)}))}))}}]),t}();function Ub(t,i){var e=_g(t);if(i$){var r=i$(t);i&&(r=mi(r).call(r,function(n){return eS(t,n).enumerable})),e.push.apply(e,r)}return e}function Gb(t){for(var i=1;i<arguments.length;i++){var e,r,n=arguments[i]!=null?arguments[i]:{};i%2?Nn(e=Ub(Object(n),!0)).call(e,function(a){De(t,a,n[a])}):a$?gj(t,a$(n)):Nn(r=Ub(Object(n))).call(r,function(a){mj(t,a,eS(n,a))})}return t}function rh(t,i){var e=typeof ll<"u"&&Oo(t)||t["@@iterator"];if(!e){if(It(t)||(e=hK(t))||i&&t&&typeof t.length=="number"){e&&(t=e);var r=0,n=function(){};return{s:n,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
38
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(t)},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 hK(t,i){var e;if(t){if(typeof t=="string")return Kb(t,i);var r=hl(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return bg(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Kb(t,i)}}function Kb(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,r=new Array(i);e<i;e++)r[e]=t[e];return r}function dK(t){var i=fK();return function(){var r=Ou(t),n;if(i){var a=Ou(this).constructor;n=Xs(r,arguments,a)}else n=r.apply(this,arguments);return I6(this,n)}}function fK(){if(typeof Reflect>"u"||!Xs||Xs.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Xs(Boolean,[],function(){})),!0}catch{return!1}}function vK(t,i){return t[i]==null&&(t[i]=V7()),t}var Iu=function(t){k6(e,t);var i=dK(e);function e(r,n){var a;return Uu(this,e),a=i.call(this),De(bn(a),"flush",void 0),De(bn(a),"length",void 0),De(bn(a),"_options",void 0),De(bn(a),"_data",void 0),De(bn(a),"_idProp",void 0),De(bn(a),"_queue",null),r&&!It(r)&&(n=r,r=[]),a._options=n||{},a._data=new NO,a.length=0,a._idProp=a._options.fieldId||"id",r&&r.length&&a.add(r),a.setOptions(n),a}return sl(e,[{key:"idProp",get:function(){return this._idProp}},{key:"setOptions",value:function(n){n&&n.queue!==void 0&&(n.queue===!1?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=U7.extend(this,{replace:["add","update","remove"]})),n.queue&&ot(n.queue)==="object"&&this._queue.setOptions(n.queue)))}},{key:"add",value:function(n,a){var o=this,s=[],u;if(It(n)){var l=qt(n).call(n,function(d){return d[o._idProp]});if(x9(l).call(l,function(d){return o._data.has(d)}))throw new Error("A duplicate id was found in the parameter array.");for(var c=0,h=n.length;c<h;c++)u=this._addItem(n[c]),s.push(u)}else if(n&&ot(n)==="object")u=this._addItem(n),s.push(u);else throw new Error("Unknown dataType");return s.length&&this._trigger("add",{items:s},a),s}},{key:"update",value:function(n,a){var o=this,s=[],u=[],l=[],c=[],h=this._idProp,d=function(p){var $=p[h];if($!=null&&o._data.has($)){var y=p,m=h5({},o._data.get($)),_=o._updateItem(y);u.push(_),c.push(y),l.push(m)}else{var S=o._addItem(p);s.push(S)}};if(It(n))for(var f=0,v=n.length;f<v;f++)n[f]&&ot(n[f])==="object"?d(n[f]):console.warn("Ignoring input item, which is not an object at index "+f);else if(n&&ot(n)==="object")d(n);else throw new Error("Unknown dataType");if(s.length&&this._trigger("add",{items:s},a),u.length){var g={items:u,oldData:l,data:c};this._trigger("update",g,a)}return cl(s).call(s,u)}},{key:"updateOnly",value:function(n,a){var o,s=this;It(n)||(n=[n]);var u=qt(o=qt(n).call(n,function(c){var h=s._data.get(c[s._idProp]);if(h==null)throw new Error("Updating non-existent items is not allowed.");return{oldData:h,update:c}})).call(o,function(c){var h=c.oldData,d=c.update,f=h[s._idProp],v=LW(h,d);return s._data.set(f,v),{id:f,oldData:h,updatedData:v}});if(u.length){var l={items:qt(u).call(u,function(c){return c.id}),oldData:qt(u).call(u,function(c){return c.oldData}),data:qt(u).call(u,function(c){return c.updatedData})};return this._trigger("update",l,a),l.items}else return[]}},{key:"get",value:function(n,a){var o=void 0,s=void 0,u=void 0;Hb(n)?(o=n,u=a):It(n)?(s=n,u=a):u=n;var l=u&&u.returnType==="Object"?"Object":"Array",c=u&&mi(u),h=[],d=void 0,f=void 0,v=void 0;if(o!=null)d=this._data.get(o),d&&c&&!c(d)&&(d=void 0);else if(s!=null)for(var g=0,b=s.length;g<b;g++)d=this._data.get(s[g]),d!=null&&(!c||c(d))&&h.push(d);else{var p;f=_t(li(p=this._data).call(p));for(var $=0,y=f.length;$<y;$++)v=f[$],d=this._data.get(v),d!=null&&(!c||c(d))&&h.push(d)}if(u&&u.order&&o==null&&this._sort(h,u.order),u&&u.fields){var m=u.fields;if(o!=null&&d!=null)d=this._filterFields(d,m);else for(var _=0,S=h.length;_<S;_++)h[_]=this._filterFields(h[_],m)}if(l=="Object"){for(var T={},O=0,w=h.length;O<w;O++){var E=h[O],A=E[this._idProp];T[A]=E}return T}else if(o!=null){var H;return(H=d)!==null&&H!==void 0?H:null}else return h}},{key:"getIds",value:function(n){var a=this._data,o=n&&mi(n),s=n&&n.order,u=_t(li(a).call(a)),l=[];if(o)if(s){for(var c=[],h=0,d=u.length;h<d;h++){var f=u[h],v=this._data.get(f);v!=null&&o(v)&&c.push(v)}this._sort(c,s);for(var g=0,b=c.length;g<b;g++)l.push(c[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 _=[],S=0,T=u.length;S<T;S++){var O=u[S];_.push(a.get(O))}this._sort(_,s);for(var w=0,E=_.length;w<E;w++)l.push(_[w][this._idProp])}else for(var A=0,H=u.length;A<H;A++){var B=u[A],X=a.get(B);X!=null&&l.push(X[this._idProp])}return l}},{key:"getDataSet",value:function(){return this}},{key:"forEach",value:function(n,a){var o=a&&mi(a),s=this._data,u=_t(li(s).call(s));if(a&&a.order)for(var l=this.get(a),c=0,h=l.length;c<h;c++){var d=l[c],f=d[this._idProp];n(d,f)}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))&&n(p,b)}}},{key:"map",value:function(n,a){for(var o=a&&mi(a),s=[],u=this._data,l=_t(li(u).call(u)),c=0,h=l.length;c<h;c++){var d=l[c],f=this._data.get(d);f!=null&&(!o||o(f))&&s.push(n(f,d))}return a&&a.order&&this._sort(s,a.order),s}},{key:"_filterFields",value:function(n,a){var o;return n&&VF(o=It(a)?a:_g(a)).call(o,function(s,u){return s[u]=n[u],s},{})}},{key:"_sort",value:function(n,a){if(typeof a=="string"){var o=a;Uf(n).call(n,function(s,u){var l=s[o],c=u[o];return l>c?1:l<c?-1:0})}else if(typeof a=="function")Uf(n).call(n,a);else throw new TypeError("Order must be a function or a string")}},{key:"remove",value:function(n,a){for(var o=[],s=[],u=It(n)?n:[n],l=0,c=u.length;l<c;l++){var h=this._remove(u[l]);if(h){var d=h[this._idProp];d!=null&&(o.push(d),s.push(h))}}return o.length&&this._trigger("remove",{items:o,oldData:s},a),o}},{key:"_remove",value:function(n){var a;if(Hb(n)?a=n:n&&ot(n)==="object"&&(a=n[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(n){for(var a,o=_t(li(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},n),o}},{key:"max",value:function(n){var a,o=null,s=null,u=rh(jb(a=this._data).call(a)),l;try{for(u.s();!(l=u.n()).done;){var c=l.value,h=c[n];typeof h=="number"&&(s==null||h>s)&&(o=c,s=h)}}catch(d){u.e(d)}finally{u.f()}return o||null}},{key:"min",value:function(n){var a,o=null,s=null,u=rh(jb(a=this._data).call(a)),l;try{for(u.s();!(l=u.n()).done;){var c=l.value,h=c[n];typeof h=="number"&&(s==null||h<s)&&(o=c,s=h)}}catch(d){u.e(d)}finally{u.f()}return o||null}},{key:"distinct",value:function(n){for(var a=this._data,o=_t(li(a).call(a)),s=[],u=0,l=0,c=o.length;l<c;l++){for(var h=o[l],d=a.get(h),f=d[n],v=!1,g=0;g<u;g++)if(s[g]==f){v=!0;break}!v&&f!==void 0&&(s[u]=f,u++)}return s}},{key:"_addItem",value:function(n){var a=vK(n,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(n){var a=n[this._idProp];if(a==null)throw new Error("Cannot update item: item has no id (item: "+yH(n)+")");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,Gb(Gb({},o),n)),a}},{key:"stream",value:function(n){if(n){var a=this._data;return new Vb(De({},Pi,mt.mark(function s(){var u,l,c,h;return mt.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:u=rh(n),f.prev=1,u.s();case 3:if((l=u.n()).done){f.next=11;break}if(c=l.value,h=a.get(c),h==null){f.next=9;break}return f.next=9,[c,h];case 9:f.next=3;break;case 11:f.next=16;break;case 13:f.prev=13,f.t0=f.catch(1),u.e(f.t0);case 16:return f.prev=16,u.f(),f.finish(16);case 19:case"end":return f.stop()}},s,null,[[1,13,16,19]])})))}else{var o;return new Vb(De({},Pi,WE(o=L7(this._data)).call(o,this._data)))}}}]),e}(G7);function pK(t,i){return ot(i)==="object"&&i!==null&&t===i.idProp&&typeof i.add=="function"&&typeof i.clear=="function"&&typeof i.distinct=="function"&&typeof Nn(i)=="function"&&typeof i.get=="function"&&typeof i.getDataSet=="function"&&typeof i.getIds=="function"&&typeof i.length=="number"&&typeof qt(i)=="function"&&typeof i.max=="function"&&typeof i.min=="function"&&typeof i.off=="function"&&typeof i.on=="function"&&typeof i.remove=="function"&&typeof i.setOptions=="function"&&typeof i.stream=="function"&&typeof i.update=="function"&&typeof i.updateOnly=="function"}function jO(t,i){return ot(i)==="object"&&i!==null&&t===i.idProp&&typeof Nn(i)=="function"&&typeof i.get=="function"&&typeof i.getDataSet=="function"&&typeof i.getIds=="function"&&typeof i.length=="number"&&typeof qt(i)=="function"&&typeof i.off=="function"&&typeof i.on=="function"&&typeof i.stream=="function"&&pK(t,i.getDataSet())}/**
39
39
  * vis-network
@@ -96,4 +96,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
96
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(t)},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 pme(t,i){var e;if(t){if(typeof t=="string")return Q0(t,i);var r=st(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return ei(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Q0(t,i)}}function Q0(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,r=new Array(i);e<i;e++)r[e]=t[e];return r}var wn,Bt,Hr,Wr,cu;function Z0(t,i){var e=new Sn,r=qp(i),n;try{for(r.s();!(n=r.n()).done;){var a=n.value;t.has(a)||e.add(a)}}catch(o){r.e(o)}finally{r.f()}return e}var J0=function(){function t(){N(this,t),wn.set(this,new Sn),Bt.set(this,new Sn)}return F(t,[{key:"size",get:function(){return me(this,Bt,"f").size}},{key:"add",value:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];for(var a=0,o=r;a<o.length;a++){var s=o[a];me(this,Bt,"f").add(s)}}},{key:"delete",value:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];for(var a=0,o=r;a<o.length;a++){var s=o[a];me(this,Bt,"f").delete(s)}}},{key:"clear",value:function(){me(this,Bt,"f").clear()}},{key:"getSelection",value:function(){return lr(me(this,Bt,"f"))}},{key:"getChanges",value:function(){return{added:lr(Z0(me(this,wn,"f"),me(this,Bt,"f"))),deleted:lr(Z0(me(this,Bt,"f"),me(this,wn,"f"))),previous:lr(new Sn(me(this,wn,"f"))),current:lr(new Sn(me(this,Bt,"f")))}}},{key:"commit",value:function(){var e=this.getChanges();Kp(this,wn,me(this,Bt,"f"),"f"),Kp(this,Bt,new Sn(me(this,wn,"f")),"f");var r=qp(e.added),n;try{for(r.s();!(n=r.n()).done;){var a=n.value;a.select()}}catch(l){r.e(l)}finally{r.f()}var o=qp(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}}]),t}();wn=new La,Bt=new La;var gme=function(){function t(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){};N(this,t),Hr.set(this,new J0),Wr.set(this,new J0),cu.set(this,void 0),Kp(this,cu,i,"f")}return F(t,[{key:"sizeNodes",get:function(){return me(this,Hr,"f").size}},{key:"sizeEdges",get:function(){return me(this,Wr,"f").size}},{key:"getNodes",value:function(){return me(this,Hr,"f").getSelection()}},{key:"getEdges",value:function(){return me(this,Wr,"f").getSelection()}},{key:"addNodes",value:function(){var e;(e=me(this,Hr,"f")).add.apply(e,arguments)}},{key:"addEdges",value:function(){var e;(e=me(this,Wr,"f")).add.apply(e,arguments)}},{key:"deleteNodes",value:function(e){me(this,Hr,"f").delete(e)}},{key:"deleteEdges",value:function(e){me(this,Wr,"f").delete(e)}},{key:"clear",value:function(){me(this,Hr,"f").clear(),me(this,Wr,"f").clear()}},{key:"commit",value:function(){for(var e,r,n={nodes:me(this,Hr,"f").commit(),edges:me(this,Wr,"f").commit()},a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return(e=me(this,cu,"f")).call.apply(e,oy(r=[this,n]).call(r,o)),n}}]),t}();Hr=new La,Wr=new La,cu=new La;function e_(t,i){var e=typeof pn<"u"&&Br(t)||t["@@iterator"];if(!e){if(ve(t)||(e=yme(t))||i&&t&&typeof t.length=="number"){e&&(t=e);var r=0,n=function(){};return{s:n,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
97
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(t)},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 yme(t,i){var e;if(t){if(typeof t=="string")return t_(t,i);var r=st(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return ei(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t_(t,i)}}function t_(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,r=new Array(i);e<i;e++)r[e]=t[e];return r}var mme=function(){function t(i,e){var r=this;N(this,t),this.body=i,this.canvas=e,this._selectionAccumulator=new gme,this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},Le(this.options,this.defaultOptions),this.body.emitter.on("_dataChanged",function(){r.updateSelection()})}return F(t,[{key:"setOptions",value:function(e){if(e!==void 0){var r=["multiselect","hoverConnectedEdges","selectable","selectConnectedEdges"];va(r,this.options,e)}}},{key:"selectOnPoint",value:function(e){var r=!1;if(this.options.selectable===!0){var n=this.getNodeAt(e)||this.getEdgeAt(e);this.unselectAll(),n!==void 0&&(r=this.selectObject(n)),this.body.emitter.emit("_requestRedraw")}return r}},{key:"selectAdditionalOnPoint",value:function(e){var r=!1;if(this.options.selectable===!0){var n=this.getNodeAt(e)||this.getEdgeAt(e);n!==void 0&&(r=!0,n.isSelected()===!0?this.deselectObject(n):this.selectObject(n),this.body.emitter.emit("_requestRedraw"))}return r}},{key:"_initBaseEvent",value:function(e,r){var n={};return n.pointer={DOM:{x:r.x,y:r.y},canvas:this.canvas.DOMtoCanvas(r)},n.event=e,n}},{key:"generateClickEvent",value:function(e,r,n,a){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,s=this._initBaseEvent(r,n);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(n)),r.controlEdge!==void 0&&(s.controlEdge=r.controlEdge),this.body.emitter.emit(e,s)}},{key:"selectObject",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.selectConnectedEdges;if(e!==void 0){if(e instanceof kt){if(r===!0){var n;(n=this._selectionAccumulator).addEdges.apply(n,lr(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 r=[],n=this.body.nodes,a=0;a<this.body.nodeIndices.length;a++){var o=this.body.nodeIndices[a];n[o].isOverlappingWith(e)&&r.push(o)}return r}},{key:"_pointerToPositionObject",value:function(e){var r=this.canvas.DOMtoCanvas(e);return{left:r.x-1,top:r.y+1,right:r.x+1,bottom:r.y-1}}},{key:"getNodeAt",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this._pointerToPositionObject(e),a=this._getAllNodesOverlappingWith(n);if(a.length>0)return r===!0?this.body.nodes[a[a.length-1]]:a[a.length-1]}},{key:"_getEdgesOverlappingWith",value:function(e,r){for(var n=this.body.edges,a=0;a<this.body.edgeIndices.length;a++){var o=this.body.edgeIndices[a];n[o].isOverlappingWith(e)&&r.push(o)}}},{key:"_getAllEdgesOverlappingWith",value:function(e){var r=[];return this._getEdgesOverlappingWith(e,r),r}},{key:"getEdgeAt",value:function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=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],c=s[l];if(c.connected){var h=c.from.x,d=c.from.y,f=c.to.x,v=c.to.y,g=c.edgeType.getDistanceToEdge(h,d,f,v,n.x,n.y);g<a&&(o=l,a=g)}}if(o!==null)return r===!0?this.body.edges[o]:o}},{key:"_addToHover",value:function(e){e instanceof kt?this.hoverObj.nodes[e.id]=e:this.hoverObj.edges[e.id]=e}},{key:"_removeFromSelection",value:function(e){if(e instanceof kt){var r;this._selectionAccumulator.deleteNodes(e),(r=this._selectionAccumulator).deleteEdges.apply(r,lr(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 r=0;r<e.edges.length;r++){var n=e.edges[r];n.hover=!0,this._addToHover(n)}}},{key:"emitBlurEvent",value:function(e,r,n){var a=this._initBaseEvent(e,r);n.hover===!0&&(n.hover=!1,n instanceof kt?(a.node=n.id,this.body.emitter.emit("blurNode",a)):(a.edge=n.id,this.body.emitter.emit("blurEdge",a)))}},{key:"emitHoverEvent",value:function(e,r,n){var a=this._initBaseEvent(e,r),o=!1;return n.hover===!1&&(n.hover=!0,this._addToHover(n),o=!0,n instanceof kt?(a.node=n.id,this.body.emitter.emit("hoverNode",a)):(a.edge=n.id,this.body.emitter.emit("hoverEdge",a))),o}},{key:"hoverObject",value:function(e,r){var n=this.getNodeAt(r);n===void 0&&(n=this.getEdgeAt(r));var a=!1;for(var o in this.hoverObj.nodes)Object.prototype.hasOwnProperty.call(this.hoverObj.nodes,o)&&(n===void 0||n instanceof kt&&n.id!=o||n instanceof Ii)&&(this.emitBlurEvent(e,r,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]):(n===void 0||n instanceof Ii&&n.id!=s||n instanceof kt&&!n.hover)&&(this.emitBlurEvent(e,r,this.hoverObj.edges[s]),delete this.hoverObj.edges[s],a=!0));if(n!==void 0){var u=Te(this.hoverObj.edges).length,l=Te(this.hoverObj.nodes).length,c=n instanceof Ii&&u===0&&l===0,h=n instanceof kt&&u===0&&l===0;(a||c||h)&&(a=this.emitHoverEvent(e,r,n)),n instanceof kt&&this.options.hoverConnectedEdges===!0&&this._hoverConnectedEdges(n)}a===!0&&this.body.emitter.emit("_requestRedraw")}},{key:"commitWithoutEmitting",value:function(){this._selectionAccumulator.commit()}},{key:"commitAndEmit",value:function(e,r){var n=!1,a=this._selectionAccumulator.commit(),o={nodes:a.nodes.previous,edges:a.edges.previous};a.edges.deleted.length>0&&(this.generateClickEvent("deselectEdge",r,e,o),n=!0),a.nodes.deleted.length>0&&(this.generateClickEvent("deselectNode",r,e,o),n=!0),a.nodes.added.length>0&&(this.generateClickEvent("selectNode",r,e),n=!0),a.edges.added.length>0&&(this.generateClickEvent("selectEdge",r,e),n=!0),n===!0&&this.generateClickEvent("select",r,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 Li(e=this._selectionAccumulator.getNodes()).call(e,function(r){return r.id})}},{key:"getSelectedEdgeIds",value:function(){var e;return Li(e=this._selectionAccumulator.getEdges()).call(e,function(r){return r.id})}},{key:"setSelection",value:function(e){var r=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((r.unselectAll||r.unselectAll===void 0)&&this.unselectAll(),e.nodes){var n=e_(e.nodes),a;try{for(n.s();!(a=n.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,r.highlightEdges)}}catch(d){n.e(d)}finally{n.f()}}if(e.edges){var u=e_(e.edges),l;try{for(u.s();!(l=u.n()).done;){var c=l.value,h=this.body.edges[c];if(!h)throw new RangeError('Edge with id "'+c+'" not found');this.selectObject(h)}}catch(d){u.e(d)}finally{u.f()}}this.body.emitter.emit("_requestRedraw"),this._selectionAccumulator.commit()}},{key:"selectNodes",value:function(e){var r=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:r})}},{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 r in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,r.id)||this._selectionAccumulator.deleteEdges(r)}},{key:"getClickedItems",value:function(e){for(var r=this.canvas.DOMtoCanvas(e),n=[],a=this.body.nodeIndices,o=this.body.nodes,s=a.length-1;s>=0;s--){var u=o[a[s]],l=u.getItemsOnPoint(r);n.push.apply(n,l)}for(var c=this.body.edgeIndices,h=this.body.edges,d=c.length-1;d>=0;d--){var f=h[c[d]],v=f.getItemsOnPoint(r);n.push.apply(n,v)}return n}}]),t}(),Yp={},$me={get exports(){return Yp},set exports(t){Yp=t}},r_=DT,bme=Math.floor,Xp=function(t,i){var e=t.length,r=bme(e/2);return e<8?wme(t,i):_me(t,Xp(r_(t,0,r),i),Xp(r_(t,r),i),i)},wme=function(t,i){for(var e=t.length,r=1,n,a;r<e;){for(a=r,n=t[r];a&&i(t[a-1],n)>0;)t[a]=t[--a];a!==r++&&(t[a]=n)}return t},_me=function(t,i,e,r){for(var n=i.length,a=e.length,o=0,s=0;o<n||s<a;)t[o+s]=o<n&&s<a?r(i[o],e[s])<=0?i[o++]:e[s++]:o<n?i[o++]:e[s++];return t},Eme=Xp,Sme=Lo,n_=Sme.match(/firefox\/(\d+)/i),Ome=!!n_&&+n_[1],Tme=Lo,xme=/MSIE|Trident/.test(Tme),Pme=Lo,i_=Pme.match(/AppleWebKit\/(\d+)\./),kme=!!i_&&+i_[1],Ime=q,XP=ue,Cme=Qn,Ame=Nt,a_=ir,Rme=xx,o_=mr,Iy=se,Dme=Eme,Mme=da,s_=Ome,Nme=xme,u_=jo,l_=kme,Xr=[],c_=XP(Xr.sort),Fme=XP(Xr.push),Bme=Iy(function(){Xr.sort(void 0)}),Lme=Iy(function(){Xr.sort(null)}),jme=Mme("sort"),QP=!Iy(function(){if(u_)return u_<70;if(!(s_&&s_>3)){if(Nme)return!0;if(l_)return l_<603;var t="",i,e,r,n;for(i=65;i<76;i++){switch(e=String.fromCharCode(i),i){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)Xr.push({k:e+n,v:r})}for(Xr.sort(function(a,o){return o.v-a.v}),n=0;n<Xr.length;n++)e=Xr[n].k.charAt(0),t.charAt(t.length-1)!==e&&(t+=e);return t!=="DGBEFHACIJK"}}),zme=Bme||!Lme||!jme||!QP,Hme=function(t){return function(i,e){return e===void 0?-1:i===void 0?1:t!==void 0?+t(i,e)||0:o_(i)>o_(e)?1:-1}};Ime({target:"Array",proto:!0,forced:zme},{sort:function(i){i!==void 0&&Cme(i);var e=Ame(this);if(QP)return i===void 0?c_(e):c_(e,i);var r=[],n=a_(e),a,o;for(o=0;o<n;o++)o in e&&Fme(r,e[o]);for(Dme(r,Hme(i)),a=a_(r),o=0;o<a;)e[o]=r[o++];for(;o<n;)Rme(e,o++);return e}});var Wme=tt,Vme=Wme("Array").sort,Ume=Ne,Gme=Vme,ed=Array.prototype,Kme=function(t){var i=t.sort;return t===ed||Ume(ed,t)&&i===ed.sort?Gme:i},qme=Kme,Yme=qme;(function(t){t.exports=Yme})($me);var td=V(Yp),Qp={},Xme={get exports(){return Qp},set exports(t){Qp=t}},Qme=Qn,Zme=Nt,Jme=gl,e$e=ir,t$e=TypeError,h_=function(t){return function(i,e,r,n){Qme(e);var a=Zme(i),o=Jme(a),s=e$e(a),u=t?s-1:0,l=t?-1:1;if(r<2)for(;;){if(u in o){n=o[u],u+=l;break}if(u+=l,t?u<0:s<=u)throw t$e("Reduce of empty array with no initial value")}for(;t?u>=0:s>u;u+=l)u in o&&(n=e(n,o[u],u,a));return n}},r$e={left:h_(!1),right:h_(!0)},n$e=Fr,i$e=typeof process<"u"&&n$e(process)=="process",a$e=q,o$e=r$e.left,s$e=da,d_=jo,u$e=i$e,l$e=!u$e&&d_>79&&d_<83,c$e=l$e||!s$e("reduce");a$e({target:"Array",proto:!0,forced:c$e},{reduce:function(i){var e=arguments.length;return o$e(this,i,e,e>1?arguments[1]:void 0)}});var h$e=tt,d$e=h$e("Array").reduce,f$e=Ne,v$e=d$e,rd=Array.prototype,p$e=function(t){var i=t.reduce;return t===rd||f$e(rd,t)&&i===rd.reduce?v$e:i},g$e=p$e,y$e=g$e;(function(t){t.exports=y$e})(Xme);var ZP=V(Qp),ao={},m$e={get exports(){return ao},set exports(t){ao=t}},JP={};(function(t){(function(i,e){e(t)})(Zf,function(i){i.__esModule=!0,i.sort=b;function e(p,$){if(!(p instanceof $))throw new TypeError("Cannot call a class as a function")}var r=32,n=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 S=String(p),T=String($);return S===T?0:S<T?-1:1}function l(p){for(var $=0;p>=r;)$|=p&1,p>>=1;return p+$}function c(p,$,y,m){var _=$+1;if(_===y)return 1;if(m(p[_++],p[$])<0){for(;_<y&&m(p[_],p[_-1])<0;)_++;h(p,$,_)}else for(;_<y&&m(p[_],p[_-1])>=0;)_++;return _-$}function h(p,$,y){for(y--;$<y;){var m=p[$];p[$++]=p[y],p[y--]=m}}function d(p,$,y,m,_){for(m===$&&m++;m<y;m++){for(var S=p[m],T=$,O=m;T<O;){var w=T+O>>>1;_(S,p[w])<0?O=w:T=w+1}var E=m-T;switch(E){case 3:p[T+3]=p[T+2];case 2:p[T+2]=p[T+1];case 1:p[T+1]=p[T];break;default:for(;E>0;)p[T+E]=p[T+E-1],E--}p[T]=S}}function f(p,$,y,m,_,S){var T=0,O=0,w=1;if(S(p,$[y+_])>0){for(O=m-_;w<O&&S(p,$[y+_+w])>0;)T=w,w=(w<<1)+1,w<=0&&(w=O);w>O&&(w=O),T+=_,w+=_}else{for(O=_+1;w<O&&S(p,$[y+_-w])<=0;)T=w,w=(w<<1)+1,w<=0&&(w=O);w>O&&(w=O);var E=T;T=_-w,w=_-E}for(T++;T<w;){var A=T+(w-T>>>1);S(p,$[y+A])>0?T=A+1:w=A}return w}function v(p,$,y,m,_,S){var T=0,O=0,w=1;if(S(p,$[y+_])<0){for(O=_+1;w<O&&S(p,$[y+_-w])<0;)T=w,w=(w<<1)+1,w<=0&&(w=O);w>O&&(w=O);var E=T;T=_-w,w=_-E}else{for(O=m-_;w<O&&S(p,$[y+_+w])>=0;)T=w,w=(w<<1)+1,w<=0&&(w=O);w>O&&(w=O),T+=_,w+=_}for(T++;T<w;){var A=T+(w-T>>>1);S(p,$[y+A])<0?w=A:T=A+1}return w}var g=function(){function p($,y){e(this,p),this.array=null,this.compare=null,this.minGallop=n,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,S=this.runStart[y],T=this.runLength[y],O=this.runStart[y+1],w=this.runLength[y+1];this.runLength[y]=T+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(_[O],_,S,T,0,m);S+=E,T-=E,T!==0&&(w=f(_[S+T-1],_,O,w,w-1,m),w!==0&&(T<=w?this.mergeLow(S,T,O,w):this.mergeHigh(S,T,O,w)))},p.prototype.mergeLow=function(y,m,_,S){var T=this.compare,O=this.array,w=this.tmp,E=0;for(E=0;E<m;E++)w[E]=O[y+E];var A=0,H=_,B=y;if(O[B++]=O[H++],--S===0){for(E=0;E<m;E++)O[B+E]=w[A+E];return}if(m===1){for(E=0;E<S;E++)O[B+E]=O[H+E];O[B+S]=w[A];return}for(var X=this.minGallop;;){var re=0,te=0,le=!1;do if(T(O[H],w[A])<0){if(O[B++]=O[H++],te++,re=0,--S===0){le=!0;break}}else if(O[B++]=w[A++],re++,te=0,--m===1){le=!0;break}while((re|te)<X);if(le)break;do{if(re=v(O[H],w,A,m,0,T),re!==0){for(E=0;E<re;E++)O[B+E]=w[A+E];if(B+=re,A+=re,m-=re,m<=1){le=!0;break}}if(O[B++]=O[H++],--S===0){le=!0;break}if(te=f(w[A],O,H,S,0,T),te!==0){for(E=0;E<te;E++)O[B+E]=O[H+E];if(B+=te,H+=te,S-=te,S===0){le=!0;break}}if(O[B++]=w[A++],--m===1){le=!0;break}X--}while(re>=n||te>=n);if(le)break;X<0&&(X=0),X+=2}if(this.minGallop=X,X<1&&(this.minGallop=1),m===1){for(E=0;E<S;E++)O[B+E]=O[H+E];O[B+S]=w[A]}else{if(m===0)throw new Error("mergeLow preconditions were not respected");for(E=0;E<m;E++)O[B+E]=w[A+E]}},p.prototype.mergeHigh=function(y,m,_,S){var T=this.compare,O=this.array,w=this.tmp,E=0;for(E=0;E<S;E++)w[E]=O[_+E];var A=y+m-1,H=S-1,B=_+S-1,X=0,re=0;if(O[B--]=O[A--],--m===0){for(X=B-(S-1),E=0;E<S;E++)O[X+E]=w[E];return}if(S===1){for(B-=m,A-=m,re=B+1,X=A+1,E=m-1;E>=0;E--)O[re+E]=O[X+E];O[B]=w[H];return}for(var te=this.minGallop;;){var le=0,we=0,Oe=!1;do if(T(w[H],O[A])<0){if(O[B--]=O[A--],le++,we=0,--m===0){Oe=!0;break}}else if(O[B--]=w[H--],we++,le=0,--S===1){Oe=!0;break}while((le|we)<te);if(Oe)break;do{if(le=m-v(w[H],O,y,m,m-1,T),le!==0){for(B-=le,A-=le,m-=le,re=B+1,X=A+1,E=le-1;E>=0;E--)O[re+E]=O[X+E];if(m===0){Oe=!0;break}}if(O[B--]=w[H--],--S===1){Oe=!0;break}if(we=S-f(O[A],w,0,S,S-1,T),we!==0){for(B-=we,H-=we,S-=we,re=B+1,X=H+1,E=0;E<we;E++)O[re+E]=w[X+E];if(S<=1){Oe=!0;break}}if(O[B--]=O[A--],--m===0){Oe=!0;break}te--}while(le>=n||we>=n);if(Oe)break;te<0&&(te=0),te+=2}if(this.minGallop=te,te<1&&(this.minGallop=1),S===1){for(B-=m,A-=m,re=B+1,X=A+1,E=m-1;E>=0;E--)O[re+E]=O[X+E];O[B]=w[H]}else{if(S===0)throw new Error("mergeHigh preconditions were not respected");for(X=B-(S-1),E=0;E<S;E++)O[X+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 S=0;if(_<r){S=c(p,y,m,$),d(p,y,m,y+S,$);return}var T=new g(p,$),O=l(_);do{if(S=c(p,y,m,$),S<O){var w=_;w>O&&(w=O),d(p,y,y+w,y+S,$),S=w}T.pushRun(y,S),T.mergeRuns(),_-=S,y+=S}while(_!==0);T.forceMergeRuns()}}})})(JP);(function(t){t.exports=JP})(m$e);var f_=V(ao);function ek(t){var i=$$e();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function $$e(){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 tk=function(){function t(){N(this,t)}return F(t,[{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,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(e,r,n),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,r){this.fake_use(e,r),this.abstract()}},{key:"shift",value:function(e,r){this.fake_use(e,r),this.abstract()}}]),t}(),b$e=function(t){ce(e,t);var i=ek(e);function e(r){var n;return N(this,e),n=i.call(this),n.layout=r,n}return F(e,[{key:"curveType",value:function(){return"horizontal"}},{key:"getPosition",value:function(n){return n.x}},{key:"setPosition",value:function(n,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;o!==void 0&&this.layout.hierarchical.addToOrdering(n,o),n.x=a}},{key:"getTreeSize",value:function(n){var a=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,n);return{min:a.min_x,max:a.max_x}}},{key:"sort",value:function(n){ao.sort(n,function(a,o){return a.x-o.x})}},{key:"fix",value:function(n,a){n.y=this.layout.options.hierarchical.levelSeparation*a,n.options.fixed.y=!0}},{key:"shift",value:function(n,a){this.layout.body.nodes[n].x+=a}}]),e}(tk),w$e=function(t){ce(e,t);var i=ek(e);function e(r){var n;return N(this,e),n=i.call(this),n.layout=r,n}return F(e,[{key:"curveType",value:function(){return"vertical"}},{key:"getPosition",value:function(n){return n.y}},{key:"setPosition",value:function(n,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;o!==void 0&&this.layout.hierarchical.addToOrdering(n,o),n.y=a}},{key:"getTreeSize",value:function(n){var a=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,n);return{min:a.min_y,max:a.max_y}}},{key:"sort",value:function(n){ao.sort(n,function(a,o){return a.y-o.y})}},{key:"fix",value:function(n,a){n.x=this.layout.options.hierarchical.levelSeparation*a,n.options.fixed.x=!0}},{key:"shift",value:function(n,a){this.layout.body.nodes[n].y+=a}}]),e}(tk),Zp={},_$e={get exports(){return Zp},set exports(t){Zp=t}},E$e=q,S$e=fn.every,O$e=da,T$e=O$e("every");E$e({target:"Array",proto:!0,forced:!T$e},{every:function(i){return S$e(this,i,arguments.length>1?arguments[1]:void 0)}});var x$e=tt,P$e=x$e("Array").every,k$e=Ne,I$e=P$e,nd=Array.prototype,C$e=function(t){var i=t.every;return t===nd||k$e(nd,t)&&i===nd.every?I$e:i},A$e=C$e,R$e=A$e;(function(t){t.exports=R$e})(_$e);var rk=V(Zp);function D$e(t,i){var e=typeof pn<"u"&&Br(t)||t["@@iterator"];if(!e){if(ve(t)||(e=M$e(t))||i&&t&&typeof t.length=="number"){e&&(t=e);var r=0,n=function(){};return{s:n,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
98
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(t)},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 M$e(t,i){var e;if(t){if(typeof t=="string")return v_(t,i);var r=st(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return ei(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return v_(t,i)}}function v_(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,r=new Array(i);e<i;e++)r[e]=t[e];return r}function N$e(t,i){var e=new Sn;return ge(t).call(t,function(r){var n;ge(n=r.edges).call(n,function(a){a.connected&&e.add(a)})}),ge(e).call(e,function(r){var n=r.from.id,a=r.to.id;i[n]==null&&(i[n]=0),(i[a]==null||i[n]>=i[a])&&(i[a]=i[n]+1)}),i}function F$e(t){return nk(function(i){var e,r;return rk(e=St(r=i.edges).call(r,function(n){return t.has(n.toId)})).call(e,function(n){return n.to===i})},function(i,e){return e>i},"from",t)}function B$e(t){return nk(function(i){var e,r;return rk(e=St(r=i.edges).call(r,function(n){return t.has(n.toId)})).call(e,function(n){return n.from===i})},function(i,e){return e<i},"to",t)}function nk(t,i,e,r){var n,a=Rn(null),o=ZP(n=lr(CP(r).call(r))).call(n,function(f,v){return f+1+v.edges.length},0),s=e+"Id",u=e==="to"?1:-1,l=D$e(r),c;try{var h=function(){var v=xe(c.value,2),g=v[0],b=v[1];if(!r.has(g)||!t(b))return"continue";a[g]=0;for(var p=[b],$=0,y,m=function(){var T,O;if(!r.has(g))return"continue";var w=a[y.id]+u;if(ge(T=St(O=y.edges).call(O,function(E){return E.connected&&E.to!==E.from&&E[e]!==y&&r.has(E.toId)&&r.has(E.fromId)})).call(T,function(E){var A=E[s],H=a[A];(H==null||i(w,H))&&(a[A]=w,p.push(E[e]))}),$>o)return{v:{v:N$e(r,a)}};++$};y=p.pop();){var _=m();if(_!=="continue"&&he(_)==="object")return _.v}};for(l.s();!(c=l.n()).done;){var d=h();if(d!=="continue"&&he(d)==="object")return d.v}}catch(f){l.e(f)}finally{l.f()}return a}var L$e=function(){function t(){N(this,t),this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}return F(t,[{key:"addRelation",value:function(e,r){this.childrenReference[e]===void 0&&(this.childrenReference[e]=[]),this.childrenReference[e].push(r),this.parentReference[r]===void 0&&(this.parentReference[r]=[]),this.parentReference[r].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,r){r!==void 0&&this.trees[e.id]===void 0&&(this.trees[e.id]=r,this.treeIndex=Math.max(r,this.treeIndex))}},{key:"ensureLevel",value:function(e){this.levels[e]===void 0&&(this.levels[e]=0)}},{key:"getMaxLevel",value:function(e){var r=this,n={},a=function o(s){if(n[s]!==void 0)return n[s];var u=r.levels[s];if(r.childrenReference[s]){var l=r.childrenReference[s];if(l.length>0)for(var c=0;c<l.length;c++)u=Math.max(u,o(l[c]))}return n[s]=u,u};return a(e)}},{key:"levelDownstream",value:function(e,r){this.levels[r.id]===void 0&&(this.levels[e.id]===void 0&&(this.levels[e.id]=0),this.levels[r.id]=this.levels[e.id]+1)}},{key:"setMinLevelToZero",value:function(e){var r=1e9;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.levels[n]!==void 0&&(r=Math.min(this.levels[n],r));for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&this.levels[a]!==void 0&&(this.levels[a]-=r)}},{key:"getTreeSize",value:function(e,r){var n=1e9,a=-1e9,o=1e9,s=-1e9;for(var u in this.trees)if(Object.prototype.hasOwnProperty.call(this.trees,u)&&this.trees[u]===r){var l=e[u];n=Math.min(l.x,n),a=Math.max(l.x,a),o=Math.min(l.y,o),s=Math.max(l.y,s)}return{min_x:n,max_x:a,min_y:o,max_y:s}}},{key:"hasSameParent",value:function(e,r){var n=this.parentReference[e.id],a=this.parentReference[r.id];if(n===void 0||a===void 0)return!1;for(var o=0;o<n.length;o++)for(var s=0;s<a.length;s++)if(n[o]==a[s])return!0;return!1}},{key:"inSameSubNetwork",value:function(e,r){return this.trees[e.id]===this.trees[r.id]}},{key:"getLevels",value:function(){return Te(this.distributionOrdering)}},{key:"addToOrdering",value:function(e,r){this.distributionOrdering[r]===void 0&&(this.distributionOrdering[r]=[]);var n=!1,a=this.distributionOrdering[r];for(var o in a)if(a[o]===e){n=!0;break}n||(this.distributionOrdering[r].push(e),this.distributionIndex[e.id]=this.distributionOrdering[r].length-1)}}]),t}(),j$e=function(){function t(i){N(this,t),this.body=i,this._resetRNG(Math.random()+":"+Mu()),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"}},Le(this.options,this.defaultOptions),this.bindEventListeners()}return F(t,[{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 r=e.direction.curveType();e.body.emitter.emit("_forceDisableDynamicCurves",r,!1)}})}},{key:"setOptions",value:function(e,r){if(e!==void 0){var n=this.options.hierarchical,a=n.enabled;if(va(["randomSeed","improvedLayout","clusterThreshold"],this.options,e),Lt(this.options,e,"hierarchical"),e.randomSeed!==void 0&&this._resetRNG(e.randomSeed),n.enabled===!0)return a===!0&&this.body.emitter.emit("refresh",!0),n.direction==="RL"||n.direction==="DU"?n.levelSeparation>0&&(n.levelSeparation*=-1):n.levelSeparation<0&&(n.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(r);if(a===!0)return this.body.emitter.emit("refresh"),$e(r,this.optionsBackup)}return r}},{key:"_resetRNG",value:function(e){this.initialRandomSeed=e,this._rng=Ll(this.initialRandomSeed)}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(e){if(this.options.hierarchical.enabled===!0){var r=this.optionsBackup.physics;e.physics===void 0||e.physics===!0?(e.physics={enabled:r.enabled===void 0?!0:r.enabled,solver:"hierarchicalRepulsion"},r.enabled=r.enabled===void 0?!0:r.enabled,r.solver=r.solver||"barnesHut"):he(e.physics)==="object"?(r.enabled=e.physics.enabled===void 0?!0:e.physics.enabled,r.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):e.physics!==!1&&(r.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"});var n=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:n};else{var a=e.edges.smooth;a.type!==void 0&&a.type!=="dynamic"&&(n=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:n,roundness:a.roundness===void 0?.5:a.roundness,forceDirection:a.forceDirection===void 0?!1:a.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",n)}return e}},{key:"positionInitially",value:function(e){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);for(var r=e.length+50,n=0;n<e.length;n++){var a=e[n],o=2*Math.PI*this._rng();a.x===void 0&&(a.x=r*Math.cos(o)),a.y===void 0&&(a.y=r*Math.sin(o))}}}},{key:"layoutNetwork",value:function(){if(this.options.hierarchical.enabled!==!0&&this.options.improvedLayout===!0){for(var e=this.body.nodeIndices,r=0,n=0;n<e.length;n++){var a=this.body.nodes[e[n]];a.predefinedPosition===!0&&(r+=1)}if(r<.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 c=e.length;e.length>u&&s<=o;){s+=1;var h=e.length;s%3===0?this.body.modules.clustering.clusterBridges(l):this.body.modules.clustering.clusterOutliers(l);var d=e.length;if(h==d&&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*c)})}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 f=70,v=0;v<e.length;v++){var g=this.body.nodes[e[v]];g.predefinedPosition===!1&&(g.x+=(.5-this._rng())*f,g.y+=(.5-this._rng())*f)}this._declusterAll(),this.body.emitter.emit("_repositionBezierNodes")}}}},{key:"_shiftToCenter",value:function(){for(var e=dt.getRangeCore(this.body.nodes,this.body.nodeIndices),r=dt.findCenter(e),n=0;n<this.body.nodeIndices.length;n++){var a=this.body.nodes[this.body.nodeIndices[n]];a.x-=r.x,a.y-=r.y}}},{key:"_declusterAll",value:function(){for(var e=!0;e===!0;){e=!1;for(var r=0;r<this.body.nodeIndices.length;r++)this.body.nodes[this.body.nodeIndices[r]].isCluster===!0&&(e=!0,this.body.modules.clustering.openCluster(this.body.nodeIndices[r],{},!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,r,n=!1,a=!1;this.lastNodeOnLevel={},this.hierarchical=new L$e;for(r in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,r)&&(e=this.body.nodes[r],e.options.level!==void 0?(n=!0,this.hierarchical.levels[r]=e.options.level):a=!0);if(a===!0&&n===!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,r=!1,n={},a=function(){for(var y=s(),m=0,_=0;_<y.length-1;_++){var S=y[_].max-y[_+1].min;m+=S+e.options.hierarchical.treeSpacing,o(_+1,m)}},o=function(y,m){var _=e.hierarchical.trees;for(var S in _)Object.prototype.hasOwnProperty.call(_,S)&&_[S]===y&&e.direction.shift(S,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 S=0;S<_.length;S++)$(e.body.nodes[_[S]],m)}},l=function(y){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e9,_=1e9,S=1e9,T=1e9,O=-1e9;for(var w in y)if(Object.prototype.hasOwnProperty.call(y,w)){var E=e.body.nodes[w],A=e.hierarchical.levels[E.id],H=e.direction.getPosition(E),B=e._getSpaceAroundNode(E,y),X=xe(B,2),re=X[0],te=X[1];_=Math.min(re,_),S=Math.min(te,S),A<=m&&(T=Math.min(H,T),O=Math.max(H,O))}return[T,O,_,S]},c=function(y,m){var _=e.hierarchical.getMaxLevel(y.id),S=e.hierarchical.getMaxLevel(m.id);return Math.min(_,S)},h=function(y,m,_){for(var S=e.hierarchical,T=0;T<m.length;T++){var O=m[T],w=S.distributionOrdering[O];if(w.length>1)for(var E=0;E<w.length-1;E++){var A=w[E],H=w[E+1];S.hasSameParent(A,H)&&S.inSameSubNetwork(A,H)&&y(A,H,_)}}},d=function(y,m){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,S=e.direction.getPosition(y),T=e.direction.getPosition(m),O=Math.abs(T-S),w=e.options.hierarchical.nodeSpacing;if(O>w){var E={},A={};u(y,E),u(m,A);var H=c(y,m),B=l(E,H),X=l(A,H),re=B[1],te=X[0],le=X[2],we=Math.abs(re-te);if(we>w){var Oe=re-te+w;Oe<-le+w&&(Oe=-le+w),Oe<0&&(e._shiftBlock(m.id,Oe),r=!0,_===!0&&e._centerParent(m))}}},f=function(y,m){for(var _=m.id,S=m.edges,T=e.hierarchical.levels[m.id],O=e.options.hierarchical.levelSeparation*e.options.hierarchical.levelSeparation,w={},E=[],A=0;A<S.length;A++){var H=S[A];if(H.toId!=H.fromId){var B=H.toId==_?H.from:H.to;w[S[A].id]=B,e.hierarchical.levels[B.id]<T&&E.push(H)}}var X=function(rt,_e){for(var Ae=0,R=0;R<_e.length;R++)if(w[_e[R].id]!==void 0){var k=e.direction.getPosition(w[_e[R].id])-rt;Ae+=k/Math.sqrt(k*k+O)}return Ae},re=function(rt,_e){for(var Ae=0,R=0;R<_e.length;R++)if(w[_e[R].id]!==void 0){var k=e.direction.getPosition(w[_e[R].id])-rt;Ae-=O*Math.pow(k*k+O,-1.5)}return Ae},te=function(rt,_e){for(var Ae=e.direction.getPosition(m),R={},k=0;k<rt;k++){var D=X(Ae,_e),L=re(Ae,_e),G=40,Y=Math.max(-G,Math.min(G,Math.round(D/L)));if(Ae=Ae-Y,R[Ae]!==void 0)break;R[Ae]=k}return Ae},le=function(rt){var _e=e.direction.getPosition(m);if(n[m.id]===void 0){var Ae={};u(m,Ae),n[m.id]=Ae}var R=l(n[m.id]),k=R[2],D=R[3],L=rt-_e,G=0;L>0?G=Math.min(L,D-e.options.hierarchical.nodeSpacing):L<0&&(G=-Math.min(-L,k-e.options.hierarchical.nodeSpacing)),G!=0&&(e._shiftBlock(m.id,G),r=!0)},we=function(rt){var _e=e.direction.getPosition(m),Ae=e._getSpaceAroundNode(m),R=xe(Ae,2),k=R[0],D=R[1],L=rt-_e,G=_e;L>0?G=Math.min(_e+(D-e.options.hierarchical.nodeSpacing),rt):L<0&&(G=Math.max(_e-(k-e.options.hierarchical.nodeSpacing),rt)),G!==_e&&(e.direction.setPosition(m,G),r=!0)},Oe=te(y,E);le(Oe),Oe=te(y,S),we(Oe)},v=function(y){var m=e.hierarchical.getLevels();m=An(m).call(m);for(var _=0;_<y;_++){r=!1;for(var S=0;S<m.length;S++)for(var T=m[S],O=e.hierarchical.distributionOrdering[T],w=0;w<O.length;w++)f(1e3,O[w]);if(r!==!0)break}},g=function(y){var m=e.hierarchical.getLevels();m=An(m).call(m);for(var _=0;_<y&&(r=!1,h(d,m,!0),r===!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=An(y).call(y);for(var m=0;m<y.length;m++)for(var _=y[m],S=e.hierarchical.distributionOrdering[_],T=0;T<S.length;T++)e._centerParent(S[T])};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,r){var n=!0;r===void 0&&(n=!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,c=1e9;if(o!==0){var h=u[o-1];if(n===!0&&r[h.id]===void 0||n===!1){var d=this.direction.getPosition(h);l=s-d}}if(o!=u.length-1){var f=u[o+1];if(n===!0&&r[f.id]===void 0||n===!1){var v=this.direction.getPosition(f);c=Math.min(c,v-s)}}return[l,c]}else return[0,0]}},{key:"_centerParent",value:function(e){if(this.hierarchical.parentReference[e.id])for(var r=this.hierarchical.parentReference[e.id],n=0;n<r.length;n++){var a=r[n],o=this.body.nodes[a],s=this.hierarchical.childrenReference[a];if(s!==void 0){var u=this._getCenterPosition(s),l=this.direction.getPosition(o),c=this._getSpaceAroundNode(o),h=xe(c,2),d=h[0],f=h[1],v=l-u;(v<0&&Math.abs(v)<f-this.options.hierarchical.nodeSpacing||v>0&&Math.abs(v)<d-this.options.hierarchical.nodeSpacing)&&this.direction.setPosition(o,u)}}}},{key:"_placeNodesByHierarchy",value:function(e){this.positionedNodes={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n,a=Te(e[r]);a=this._indexArrayToNodes(a),td(n=this.direction).call(n,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,c=l*o;o>0&&(c=this.direction.getPosition(a[s-1])+l),this.direction.setPosition(u,c,r),this._validatePositionAndContinue(u,r,c),o++}}}}},{key:"_placeBranchNodes",value:function(e,r){var n,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]]);td(n=this.direction).call(n,o);for(var u=0;u<o.length;u++){var l=o[u],c=this.hierarchical.levels[l.id];if(c>r&&this.positionedNodes[l.id]===void 0){var h=this.options.hierarchical.nodeSpacing,d=void 0;u===0?d=this.direction.getPosition(this.body.nodes[e]):d=this.direction.getPosition(o[u-1])+h,this.direction.setPosition(l,d,c),this._validatePositionAndContinue(l,c,d)}else return}var f=this._getCenterPosition(o);this.direction.setPosition(this.body.nodes[e],f,r)}}},{key:"_validatePositionAndContinue",value:function(e,r,n){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[r]!==void 0){var a=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[r]]);if(n-a<this.options.hierarchical.nodeSpacing){var o=a+this.options.hierarchical.nodeSpacing-n,s=this._findCommonParent(this.lastNodeOnLevel[r],e.id);this._shiftBlock(s.withChild,o)}}this.lastNodeOnLevel[r]=e.id,this.positionedNodes[e.id]=!0,this._placeBranchNodes(e.id,r)}}},{key:"_indexArrayToNodes",value:function(e){for(var r=[],n=0;n<e.length;n++)r.push(this.body.nodes[e[n]]);return r}},{key:"_getDistribution",value:function(){var e={},r,n;for(r in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,r)){n=this.body.nodes[r];var a=this.hierarchical.levels[r]===void 0?0:this.hierarchical.levels[r];this.direction.fix(n,a),e[a]===void 0&&(e[a]={}),e[a][r]=n}return e}},{key:"_getActiveEdges",value:function(e){var r=this,n=[];return ee(e.edges,function(a){var o;ae(o=r.body.edgeIndices).call(o,a.id)!==-1&&n.push(a)}),n}},{key:"_getHubSizes",value:function(){var e=this,r={},n=this.body.nodeIndices;ee(n,function(o){var s=e.body.nodes[o],u=e._getActiveEdges(s).length;r[u]=!0});var a=[];return ee(r,function(o){a.push(Number(o))}),td(f_).call(f_,a,function(o,s){return s-o}),a}},{key:"_determineLevelsByHubsize",value:function(){for(var e=this,r=function(l,c){e.hierarchical.levelDownstream(l,c)},n=this._getHubSizes(),a=function(){var l=n[o];if(l===0)return"break";ee(e.body.nodeIndices,function(c){var h=e.body.nodes[c];l===e._getActiveEdges(h).length&&e._crawlNetwork(r,c)})},o=0;o<n.length;++o){var s=a();if(s==="break")break}}},{key:"_determineLevelsCustomCallback",value:function(){var e=this,r=1e5,n=function(s,u,l){},a=function(s,u,l){var c=e.hierarchical.levels[s.id];c===void 0&&(c=e.hierarchical.levels[s.id]=r);var h=n(dt.cloneOptions(s,"node"),dt.cloneOptions(u,"node"),dt.cloneOptions(l,"edge"));e.hierarchical.levels[u.id]=c+h};this._crawlNetwork(a),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_determineLevelsDirected",value:function(){var e,r=this,n=ZP(e=this.body.nodeIndices).call(e,function(a,o){return a.set(o,r.body.nodes[o]),a},new xP);this.options.hierarchical.shakeTowards==="roots"?this.hierarchical.levels=B$e(n):this.hierarchical.levels=F$e(n),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_generateMap",value:function(){var e=this,r=function(a,o){e.hierarchical.levels[o.id]>e.hierarchical.levels[a.id]&&e.hierarchical.addRelation(a.id,o.id)};this._crawlNetwork(r),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(){var e=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},n=arguments.length>1?arguments[1]:void 0,a={},o=function d(f,v){if(a[f.id]===void 0){e.hierarchical.setTreeIndex(f,v),a[f.id]=!0;for(var g,b=e._getActiveEdges(f),p=0;p<b.length;p++){var $=b[p];$.connected===!0&&($.toId==f.id?g=$.from:g=$.to,f.id!=g.id&&(r(f,g,$),d(g,v)))}}};if(n===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 c=this.body.nodes[l];o(c,s),s+=1}}else{var h=this.body.nodes[n];if(h===void 0){console.error("Node not found:",n);return}o(h)}}},{key:"_shiftBlock",value:function(e,r){var n=this,a={},o=function s(u){if(!a[u]){a[u]=!0,n.direction.shift(u,r);var l=n.hierarchical.childrenReference[u];if(l!==void 0)for(var c=0;c<l.length;c++)s(l[c])}};o(e)}},{key:"_findCommonParent",value:function(e,r){var n=this,a={},o=function u(l,c){var h=n.hierarchical.parentReference[c];if(h!==void 0)for(var d=0;d<h.length;d++){var f=h[d];l[f]=!0,u(l,f)}},s=function u(l,c){var h=n.hierarchical.parentReference[c];if(h!==void 0)for(var d=0;d<h.length;d++){var f=h[d];if(l[f]!==void 0)return{foundParent:f,withChild:c};var v=u(l,f);if(v.foundParent!==null)return v}return{foundParent:null,withChild:c}};return o(a,e),s(a,r)}},{key:"setDirectionStrategy",value:function(){var e=this.options.hierarchical.direction==="UD"||this.options.hierarchical.direction==="DU";e?this.direction=new b$e(this):this.direction=new w$e(this)}},{key:"_getCenterPosition",value:function(e){for(var r=1e9,n=-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);r=Math.min(r,u),n=Math.max(n,u)}return .5*(r+n)}}]),t}();function z$e(t,i){var e=typeof pn<"u"&&Br(t)||t["@@iterator"];if(!e){if(ve(t)||(e=H$e(t))||i&&t&&typeof t.length=="number"){e&&(t=e);var r=0,n=function(){};return{s:n,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:n}}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(t)},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 H$e(t,i){var e;if(t){if(typeof t=="string")return p_(t,i);var r=st(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return ei(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p_(t,i)}}function p_(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,r=new Array(i);e<i;e++)r[e]=t[e];return r}var W$e=function(){function t(i,e,r,n){var a=this,o,s;N(this,t),this.body=i,this.canvas=e,this.selectionHandler=r,this.interactionHandler=n,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}},Le(this.options,this.defaultOptions),this.body.emitter.on("destroy",function(){a._clean()}),this.body.emitter.on("_dataChanged",C(o=this._restore).call(o,this)),this.body.emitter.on("_resetData",C(s=this._restore).call(s,this))}return F(t,[{key:"_restore",value:function(){this.inMode!==!1&&(this.options.initiallyActive===!0?this.enableEditMode():this.disableEditMode())}},{key:"setOptions",value:function(e,r,n){r!==void 0&&(r.locale!==void 0?this.options.locale=r.locale:this.options.locale=n.locale,r.locales!==void 0?this.options.locales=r.locales:this.options.locales=n.locales),e!==void 0&&(typeof e=="boolean"?this.options.enabled=e:(this.options.enabled=!0,$e(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,r;this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block";var n=this.selectionHandler.getSelectedNodeCount(),a=this.selectionHandler.getSelectedEdgeCount(),o=n+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)),n===1&&typeof this.options.editNode=="function"?(u===!0?this._createSeperator(2):u=!0,this._createEditNodeButton(s)):a===1&&n===0&&this.options.editEdge!==!1&&(u===!0?this._createSeperator(3):u=!0,this._createEditEdgeButton(s)),o!==0&&(n>0&&this.options.deleteNode!==!1?(u===!0&&this._createSeperator(4),this._createDeleteButton(s)):n===0&&this.options.deleteEdge!==!1&&(u===!0&&this._createSeperator(4),this._createDeleteButton(s))),this._bindElementEvents(this.closeDiv,C(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",C(r=this.showManipulatorToolbar).call(r,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 r,n=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(n),this._createSeperator(),this._createDescription(n.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,C(r=this.toggleEditMode).call(r,this))}this._temporaryBindEvent("click",C(e=this._performAddNode).call(e,this))}},{key:"editNode",value:function(){var e=this;this.editMode!==!0&&this.enableEditMode(),this._clean();var r=this.selectionHandler.getSelectedNodes()[0];if(r!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(r.isCluster!==!0){var n=$e({},r.options,!1);if(n.x=r.x,n.y=r.y,this.options.editNode.length===2)this.options.editNode(n,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,r,n,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,C(s=this.toggleEditMode).call(s,this))}this._temporaryBindUI("onTouch",C(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",C(r=this._finishConnect).call(r,this)),this._temporaryBindUI("onDrag",C(n=this._dragControlNode).call(n,this)),this._temporaryBindUI("onRelease",C(a=this._finishConnect).call(a,this)),this._temporaryBindUI("onDragStart",C(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",he(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 r,n=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(n),this._createSeperator(),this._createDescription(n.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,C(r=this.toggleEditMode).call(r,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var a,o,s,u,l=this.body.edges[this.edgeBeingEditedId],c=this._getNewTargetNode(l.from.x,l.from.y),h=this._getNewTargetNode(l.to.x,l.to.y);this.temporaryIds.nodes.push(c.id),this.temporaryIds.nodes.push(h.id),this.body.nodes[c.id]=c,this.body.nodeIndices.push(c.id),this.body.nodes[h.id]=h,this.body.nodeIndices.push(h.id),this._temporaryBindUI("onTouch",C(a=this._controlNodeTouch).call(a,this)),this._temporaryBindUI("onTap",function(){}),this._temporaryBindUI("onHold",function(){}),this._temporaryBindUI("onDragStart",C(o=this._controlNodeDragStart).call(o,this)),this._temporaryBindUI("onDrag",C(s=this._controlNodeDrag).call(s,this)),this._temporaryBindUI("onDragEnd",C(u=this._controlNodeDragEnd).call(u,this)),this._temporaryBindUI("onMouseMove",function(){}),this._temporaryBindEvent("beforeDrawing",function(d){var f=l.edgeType.findBorderPositions(d);c.selected===!1&&(c.x=f.from.x,c.y=f.from.y),h.selected===!1&&(h.x=f.to.x,h.y=f.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 r=this.selectionHandler.getSelectedNodeIds(),n=this.selectionHandler.getSelectedEdgeIds(),a=void 0;if(r.length>0){for(var o=0;o<r.length;o++)if(this.body.nodes[r[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 n.length>0&&typeof this.options.deleteEdge=="function"&&(a=this.options.deleteEdge);if(typeof a=="function"){var s={nodes:r,edges:n};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(n),this.body.data.nodes.getDataSet().remove(r),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,r;this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",(e=(r=this.options.locales[this.options.locale])===null||r===void 0?void 0:r.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,r){var n=$e({},this.options.controlNodeStyle);n.id="targetNode"+Ba(),n.hidden=!1,n.physics=!1,n.x=e,n.y=r;var a=this.body.functions.createNode(n);return a.shape.boundingBox={left:e,right:e,top:r,bottom:r},a}},{key:"_createEditButton",value:function(){var e;this._clean(),this.manipulationDOM={},Ur(this.editModeDiv);var r=this.options.locales[this.options.locale],n=this._createButton("editMode","vis-edit vis-edit-mode",r.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(n),this._bindElementEvents(n,C(e=this.toggleEditMode).call(e,this))}},{key:"_clean",value:function(){this.inMode=!1,this.guiEnabled===!0&&(Ur(this.editModeDiv),Ur(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanupDOMEventListeners",value:function(){var e,r=z$e(Or(e=this._domEventListenerCleanupQueue).call(e,0)),n;try{for(r.s();!(n=r.n()).done;){var a=n.value;a()}}catch(o){r.e(o)}finally{r.f()}}},{key:"_removeManipulationDOM",value:function(){this._clean(),Ur(this.manipulationDiv),Ur(this.editModeDiv),Ur(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 r,n=this._createButton("addNode","vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,C(r=this.addNodeMode).call(r,this))}},{key:"_createAddEdgeButton",value:function(e){var r,n=this._createButton("addEdge","vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,C(r=this.addEdgeMode).call(r,this))}},{key:"_createEditNodeButton",value:function(e){var r,n=this._createButton("editNode","vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,C(r=this.editNode).call(r,this))}},{key:"_createEditEdgeButton",value:function(e){var r,n=this._createButton("editEdge","vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,C(r=this.editEdgeMode).call(r,this))}},{key:"_createDeleteButton",value:function(e){var r,n;this.options.rtl?n="vis-delete-rtl":n="vis-delete";var a=this._createButton("delete",n,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(a),this._bindElementEvents(a,C(r=this.deleteSelected).call(r,this))}},{key:"_createBackButton",value:function(e){var r,n=this._createButton("back","vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,C(r=this.showManipulatorToolbar).call(r,this))}},{key:"_createButton",value:function(e,r,n){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 "+r,this.manipulationDOM[e+"Label"]=document.createElement("div"),this.manipulationDOM[e+"Label"].className=a,this.manipulationDOM[e+"Label"].innerText=n,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,r){this.temporaryEventFunctions.push({event:e,boundFunction:r}),this.body.emitter.on(e,r)}},{key:"_temporaryBindUI",value:function(e,r){if(this.body.eventListeners[e]!==void 0)this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=r;else throw new Error("This UI function does not exist. Typo? You tried: "+e+" possible are: "+es(Te(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 r=this.temporaryEventFunctions[e].event,n=this.temporaryEventFunctions[e].boundFunction;this.body.emitter.off(r,n)}this.temporaryEventFunctions=[]}},{key:"_bindElementEvents",value:function(e,r){var n=new ki(e,{});Wu(n,r),this._domEventListenerCleanupQueue.push(function(){n.destroy()});var a=function(s){var u=s.keyCode,l=s.key;(l==="Enter"||l===" "||u===13||u===32)&&r()};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 r;this.body.edges[this.temporaryIds.edges[e]].disconnect(),delete this.body.edges[this.temporaryIds.edges[e]];var n=ae(r=this.body.edgeIndices).call(r,this.temporaryIds.edges[e]);if(n!==-1){var a;Or(a=this.body.edgeIndices).call(a,n,1)}}for(var o=0;o<this.temporaryIds.nodes.length;o++){var s;delete this.body.nodes[this.temporaryIds.nodes[o]];var u=ae(s=this.body.nodeIndices).call(s,this.temporaryIds.nodes[o]);if(u!==-1){var l;Or(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=Le({},this.body.view.translation)}},{key:"_controlNodeDragStart",value:function(){var e=this.lastTouch,r=this.selectionHandler._pointerToPositionObject(e),n=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=n.isOverlappingWith(r),u=a.isOverlappingWith(r);s===!0?(this.selectedControlNode=n,o.edgeType.from=n):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 r=this.body.functions.getPointer(e.center),n=this.canvas.DOMtoCanvas(r);this.selectedControlNode!==void 0?(this.selectedControlNode.x=n.x,this.selectedControlNode.y=n.y):this.interactionHandler.onDrag(e),this.body.emitter.emit("_redraw")}},{key:"_controlNodeDragEnd",value:function(e){var r=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(r),a=this.body.edges[this.edgeBeingEditedId];if(this.selectedControlNode!==void 0){this.selectionHandler.unselectAll();for(var o=this.selectionHandler._getAllNodesOverlappingWith(n),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=Le({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;var r=this.lastTouch,n=this.selectionHandler.getNodeAt(r);if(n!==void 0)if(n.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var a=this._getNewTargetNode(n.x,n.y);this.body.nodes[a.id]=a,this.body.nodeIndices.push(a.id);var o=this.body.functions.createEdge({id:"connectionEdge"+Ba(),from:n.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 r=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(r),a=void 0;this.temporaryIds.edges[0]!==void 0&&(a=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(n),s=void 0,u=o.length-1;u>=0;u--){var l;if(ae(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,r),this.temporaryIds.nodes[0]!==void 0){var c=this.body.nodes[this.temporaryIds.nodes[0]];c.x=this.canvas._XconvertDOMtoCanvas(r.x),c.y=this.canvas._YconvertDOMtoCanvas(r.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(e)}},{key:"_finishConnect",value:function(e){var r=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(r),a=void 0;this.temporaryIds.edges[0]!==void 0&&(a=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(n),s=void 0,u=o.length-1;u>=0;u--){var l;if(ae(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,r),this.body.emitter.emit("_redraw")}},{key:"_dragStartEdge",value:function(e){var r=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",e,r,void 0,!0)}},{key:"_performAddNode",value:function(e){var r=this,n={id:Ba(),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(n,function(a){a!=null&&r.inMode==="addNode"&&r.body.data.nodes.getDataSet().add(a),r.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(n),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(e,r){var n=this,a={from:e,to:r};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(a,function(o){o!=null&&n.inMode==="addEdge"&&(n.body.data.edges.getDataSet().add(o),n.selectionHandler.unselectAll(),n.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,r){var n=this,a={id:this.edgeBeingEditedId,from:e,to:r,label:this.body.data.edges.get(this.edgeBeingEditedId).label},o=this.options.editEdge;if(he(o)==="object"&&(o=o.editWithoutDrag),typeof o=="function")if(o.length===2)o(a,function(s){s==null||n.inMode!=="editEdge"?(n.body.edges[a.id].updateEdgeType(),n.body.emitter.emit("_redraw"),n.showManipulatorToolbar()):(n.body.data.edges.getDataSet().update(s),n.selectionHandler.unselectAll(),n.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()}}]),t}(),M="string",I="boolean",x="number",Pa="array",W="object",ik="dom",V$e="any",id=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],ad={borderWidth:{number:x},borderWidthSelected:{number:x,undefined:"undefined"},brokenImage:{string:M,undefined:"undefined"},chosen:{label:{boolean:I,function:"function"},node:{boolean:I,function:"function"},__type__:{object:W,boolean:I}},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:x,undefined:"undefined"},fixed:{x:{boolean:I},y:{boolean:I},__type__:{object:W,boolean:I}},font:{align:{string:M},color:{string:M},size:{number:x},face:{string:M},background:{string:M},strokeWidth:{number:x},strokeColor:{string:M},vadjust:{number:x},multi:{boolean:I,string:M},bold:{color:{string:M},size:{number:x},face:{string:M},mod:{string:M},vadjust:{number:x},__type__:{object:W,string:M}},boldital:{color:{string:M},size:{number:x},face:{string:M},mod:{string:M},vadjust:{number:x},__type__:{object:W,string:M}},ital:{color:{string:M},size:{number:x},face:{string:M},mod:{string:M},vadjust:{number:x},__type__:{object:W,string:M}},mono:{color:{string:M},size:{number:x},face:{string:M},mod:{string:M},vadjust:{number:x},__type__:{object:W,string:M}},__type__:{object:W,string:M}},group:{string:M,number:x,undefined:"undefined"},heightConstraint:{minimum:{number:x},valign:{string:M},__type__:{object:W,boolean:I,number:x}},hidden:{boolean:I},icon:{face:{string:M},code:{string:M},size:{number:x},color:{string:M},weight:{string:M,number:x},__type__:{object:W}},id:{string:M,number:x},image:{selected:{string:M,undefined:"undefined"},unselected:{string:M,undefined:"undefined"},__type__:{object:W,string:M}},imagePadding:{top:{number:x},right:{number:x},bottom:{number:x},left:{number:x},__type__:{object:W,number:x}},label:{string:M,undefined:"undefined"},labelHighlightBold:{boolean:I},level:{number:x,undefined:"undefined"},margin:{top:{number:x},right:{number:x},bottom:{number:x},left:{number:x},__type__:{object:W,number:x}},mass:{number:x},physics:{boolean:I},scaling:{min:{number:x},max:{number:x},label:{enabled:{boolean:I},min:{number:x},max:{number:x},maxVisible:{number:x},drawThreshold:{number:x},__type__:{object:W,boolean:I}},customScalingFunction:{function:"function"},__type__:{object:W}},shadow:{enabled:{boolean:I},color:{string:M},size:{number:x},x:{number:x},y:{number:x},__type__:{object:W,boolean:I}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:I,array:Pa},borderRadius:{number:x},interpolation:{boolean:I},useImageSize:{boolean:I},useBorderWithImage:{boolean:I},coordinateOrigin:{string:["center","top-left"]},__type__:{object:W}},size:{number:x},title:{string:M,dom:ik,undefined:"undefined"},value:{number:x,undefined:"undefined"},widthConstraint:{minimum:{number:x},maximum:{number:x},__type__:{object:W,boolean:I,number:x}},x:{number:x},y:{number:x},__type__:{object:W}},U$e={configure:{enabled:{boolean:I},filter:{boolean:I,string:M,array:Pa,function:"function"},container:{dom:ik},showButton:{boolean:I},__type__:{object:W,boolean:I,string:M,array:Pa,function:"function"}},edges:{arrows:{to:{enabled:{boolean:I},scaleFactor:{number:x},type:{string:id},imageHeight:{number:x},imageWidth:{number:x},src:{string:M},__type__:{object:W,boolean:I}},middle:{enabled:{boolean:I},scaleFactor:{number:x},type:{string:id},imageWidth:{number:x},imageHeight:{number:x},src:{string:M},__type__:{object:W,boolean:I}},from:{enabled:{boolean:I},scaleFactor:{number:x},type:{string:id},imageWidth:{number:x},imageHeight:{number:x},src:{string:M},__type__:{object:W,boolean:I}},__type__:{string:["from","to","middle"],object:W}},endPointOffset:{from:{number:x},to:{number:x},__type__:{object:W,number:x}},arrowStrikethrough:{boolean:I},background:{enabled:{boolean:I},color:{string:M},size:{number:x},dashes:{boolean:I,array:Pa},__type__:{object:W,boolean:I}},chosen:{label:{boolean:I,function:"function"},edge:{boolean:I,function:"function"},__type__:{object:W,boolean:I}},color:{color:{string:M},highlight:{string:M},hover:{string:M},inherit:{string:["from","to","both"],boolean:I},opacity:{number:x},__type__:{object:W,string:M}},dashes:{boolean:I,array:Pa},font:{color:{string:M},size:{number:x},face:{string:M},background:{string:M},strokeWidth:{number:x},strokeColor:{string:M},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:x},multi:{boolean:I,string:M},bold:{color:{string:M},size:{number:x},face:{string:M},mod:{string:M},vadjust:{number:x},__type__:{object:W,string:M}},boldital:{color:{string:M},size:{number:x},face:{string:M},mod:{string:M},vadjust:{number:x},__type__:{object:W,string:M}},ital:{color:{string:M},size:{number:x},face:{string:M},mod:{string:M},vadjust:{number:x},__type__:{object:W,string:M}},mono:{color:{string:M},size:{number:x},face:{string:M},mod:{string:M},vadjust:{number:x},__type__:{object:W,string:M}},__type__:{object:W,string:M}},hidden:{boolean:I},hoverWidth:{function:"function",number:x},label:{string:M,undefined:"undefined"},labelHighlightBold:{boolean:I},length:{number:x,undefined:"undefined"},physics:{boolean:I},scaling:{min:{number:x},max:{number:x},label:{enabled:{boolean:I},min:{number:x},max:{number:x},maxVisible:{number:x},drawThreshold:{number:x},__type__:{object:W,boolean:I}},customScalingFunction:{function:"function"},__type__:{object:W}},selectionWidth:{function:"function",number:x},selfReferenceSize:{number:x},selfReference:{size:{number:x},angle:{number:x},renderBehindTheNode:{boolean:I},__type__:{object:W}},shadow:{enabled:{boolean:I},color:{string:M},size:{number:x},x:{number:x},y:{number:x},__type__:{object:W,boolean:I}},smooth:{enabled:{boolean:I},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:x},forceDirection:{string:["horizontal","vertical","none"],boolean:I},__type__:{object:W,boolean:I}},title:{string:M,undefined:"undefined"},width:{number:x},widthConstraint:{maximum:{number:x},__type__:{object:W,boolean:I,number:x}},value:{number:x,undefined:"undefined"},__type__:{object:W}},groups:{useDefaultGroups:{boolean:I},__any__:ad,__type__:{object:W}},interaction:{dragNodes:{boolean:I},dragView:{boolean:I},hideEdgesOnDrag:{boolean:I},hideEdgesOnZoom:{boolean:I},hideNodesOnDrag:{boolean:I},hover:{boolean:I},keyboard:{enabled:{boolean:I},speed:{x:{number:x},y:{number:x},zoom:{number:x},__type__:{object:W}},bindToWindow:{boolean:I},autoFocus:{boolean:I},__type__:{object:W,boolean:I}},multiselect:{boolean:I},navigationButtons:{boolean:I},selectable:{boolean:I},selectConnectedEdges:{boolean:I},hoverConnectedEdges:{boolean:I},tooltipDelay:{number:x},zoomView:{boolean:I},zoomSpeed:{number:x},__type__:{object:W}},layout:{randomSeed:{undefined:"undefined",number:x,string:M},improvedLayout:{boolean:I},clusterThreshold:{number:x},hierarchical:{enabled:{boolean:I},levelSeparation:{number:x},nodeSpacing:{number:x},treeSpacing:{number:x},blockShifting:{boolean:I},edgeMinimization:{boolean:I},parentCentralization:{boolean:I},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:W,boolean:I}},__type__:{object:W}},manipulation:{enabled:{boolean:I},initiallyActive:{boolean:I},addNode:{boolean:I,function:"function"},addEdge:{boolean:I,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:W,boolean:I,function:"function"}},deleteNode:{boolean:I,function:"function"},deleteEdge:{boolean:I,function:"function"},controlNodeStyle:ad,__type__:{object:W,boolean:I}},nodes:ad,physics:{enabled:{boolean:I},barnesHut:{theta:{number:x},gravitationalConstant:{number:x},centralGravity:{number:x},springLength:{number:x},springConstant:{number:x},damping:{number:x},avoidOverlap:{number:x},__type__:{object:W}},forceAtlas2Based:{theta:{number:x},gravitationalConstant:{number:x},centralGravity:{number:x},springLength:{number:x},springConstant:{number:x},damping:{number:x},avoidOverlap:{number:x},__type__:{object:W}},repulsion:{centralGravity:{number:x},springLength:{number:x},springConstant:{number:x},nodeDistance:{number:x},damping:{number:x},__type__:{object:W}},hierarchicalRepulsion:{centralGravity:{number:x},springLength:{number:x},springConstant:{number:x},nodeDistance:{number:x},damping:{number:x},avoidOverlap:{number:x},__type__:{object:W}},maxVelocity:{number:x},minVelocity:{number:x},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:I},iterations:{number:x},updateInterval:{number:x},onlyDynamicEdges:{boolean:I},fit:{boolean:I},__type__:{object:W,boolean:I}},timestep:{number:x},adaptiveTimestep:{boolean:I},wind:{x:{number:x},y:{number:x},__type__:{object:W}},__type__:{object:W,boolean:I}},autoResize:{boolean:I},clickToUse:{boolean:I},locale:{string:M},locales:{__any__:{any:V$e},__type__:{object:W}},height:{string:M},width:{string:M},__type__:{object:W}},ak={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]}}},G$e=function(i,e,r){var n;return!!(vr(i).call(i,"physics")&&vr(n=ak.physics.solver).call(n,e)&&r.physics.solver!==e&&e!=="wind")},K$e=function(){function t(){N(this,t)}return F(t,[{key:"getDistances",value:function(e,r,n){for(var a={},o=e.edges,s=0;s<r.length;s++){var u=r[s],l={};a[u]=l;for(var c=0;c<r.length;c++)l[r[c]]=s==c?0:1e9}for(var h=0;h<n.length;h++){var d=o[n[h]];d.connected===!0&&a[d.fromId]!==void 0&&a[d.toId]!==void 0&&(a[d.fromId][d.toId]=1,a[d.toId][d.fromId]=1)}for(var f=r.length,v=0;v<f;v++)for(var g=r[v],b=a[g],p=0;p<f-1;p++)for(var $=r[p],y=a[$],m=p+1;m<f;m++){var _=r[m],S=a[_],T=Math.min(y[_],y[g]+b[_]);y[_]=T,S[$]=T}return a}}]),t}(),q$e=function(){function t(i,e,r){N(this,t),this.body=i,this.springLength=e,this.springConstant=r,this.distanceSolver=new K$e}return F(t,[{key:"setOptions",value:function(e){e&&(e.springLength&&(this.springLength=e.springLength),e.springConstant&&(this.springConstant=e.springConstant))}},{key:"solve",value:function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=this.distanceSolver.getDistances(this.body,e,r);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)),c=5,h=1e9,d=0,f=0,v=0,g=0,b=0;h>o&&u<l;){u+=1;var p=this._getHighestEnergyNode(n),$=xe(p,4);for(d=$[0],h=$[1],f=$[2],v=$[3],g=h,b=0;g>s&&b<c;){b+=1,this._moveNode(d,f,v);var y=this._getEnergy(d),m=xe(y,3);g=m[0],f=m[1],v=m[2]}}}},{key:"_getHighestEnergyNode",value:function(e){for(var r=this.body.nodeIndices,n=this.body.nodes,a=0,o=r[0],s=0,u=0,l=0;l<r.length;l++){var c=r[l];if(n[c].predefinedPosition!==!0||n[c].isCluster===!0&&e===!0||n[c].options.fixed.x!==!0||n[c].options.fixed.y!==!0){var h=this._getEnergy(c),d=xe(h,3),f=d[0],v=d[1],g=d[2];a<f&&(a=f,o=c,s=v,u=g)}}return[o,a,s,u]}},{key:"_getEnergy",value:function(e){var r=xe(this.E_sums[e],2),n=r[0],a=r[1],o=Math.sqrt(Math.pow(n,2)+Math.pow(a,2));return[o,n,a]}},{key:"_moveNode",value:function(e,r,n){for(var a=this.body.nodeIndices,o=this.body.nodes,s=0,u=0,l=0,c=o[e].x,h=o[e].y,d=this.K_matrix[e],f=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,$=d[g],y=f[g],m=1/Math.pow(Math.pow(c-b,2)+Math.pow(h-p,2),1.5);s+=$*(1-y*Math.pow(h-p,2)*m),u+=$*(y*(c-b)*(h-p)*m),l+=$*(1-y*Math.pow(c-b,2)*m)}}var _=s,S=u,T=r,O=l,w=n,E=(T/_+w/S)/(S/_-O/S),A=-(S*E+T)/_;o[e].x+=A,o[e].y+=E,this._updateE_matrix(e)}},{key:"_createL_matrix",value:function(e){var r=this.body.nodeIndices,n=this.springLength;this.L_matrix=[];for(var a=0;a<r.length;a++){this.L_matrix[r[a]]={};for(var o=0;o<r.length;o++)this.L_matrix[r[a]][r[o]]=n*e[r[a]][r[o]]}}},{key:"_createK_matrix",value:function(e){var r=this.body.nodeIndices,n=this.springConstant;this.K_matrix=[];for(var a=0;a<r.length;a++){this.K_matrix[r[a]]={};for(var o=0;o<r.length;o++)this.K_matrix[r[a]][r[o]]=n*Math.pow(e[r[a]][r[o]],-2)}}},{key:"_createE_matrix",value:function(){var e=this.body.nodeIndices,r=this.body.nodes;this.E_matrix={},this.E_sums={};for(var n=0;n<e.length;n++)this.E_matrix[e[n]]=[];for(var a=0;a<e.length;a++){for(var o=e[a],s=r[o].x,u=r[o].y,l=0,c=0,h=a;h<e.length;h++){var d=e[h];if(d!==o){var f=r[d].x,v=r[d].y,g=1/Math.sqrt(Math.pow(s-f,2)+Math.pow(u-v,2));this.E_matrix[o][h]=[this.K_matrix[o][d]*(s-f-this.L_matrix[o][d]*(s-f)*g),this.K_matrix[o][d]*(u-v-this.L_matrix[o][d]*(u-v)*g)],this.E_matrix[d][a]=this.E_matrix[o][h],l+=this.E_matrix[o][h][0],c+=this.E_matrix[o][h][1]}}this.E_sums[o]=[l,c]}}},{key:"_updateE_matrix",value:function(e){for(var r=this.body.nodeIndices,n=this.body.nodes,a=this.E_matrix[e],o=this.K_matrix[e],s=this.L_matrix[e],u=n[e].x,l=n[e].y,c=0,h=0,d=0;d<r.length;d++){var f=r[d];if(f!==e){var v=a[d],g=v[0],b=v[1],p=n[f].x,$=n[f].y,y=1/Math.sqrt(Math.pow(u-p,2)+Math.pow(l-$,2)),m=o[f]*(u-p-s[f]*(u-p)*y),_=o[f]*(l-$-s[f]*(l-$)*y);a[d]=[m,_],c+=m,h+=_;var S=this.E_sums[f];S[0]+=m-g,S[1]+=_-b}}this.E_sums[e]=[c,h]}}]),t}();function z(t,i,e){var r,n,a,o,s=this;if(!(this instanceof z))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:$he,clickToUse:!1},Le(this.options,this.defaultOptions),this.body={container:t,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:C(r=this.on).call(r,this),off:C(n=this.off).call(n,this),emit:C(a=this.emit).call(a,this),once:C(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 _he(function(){return s.body.emitter.emit("_requestRedraw")}),this.groups=new Lde,this.canvas=new Pye(this.body),this.selectionHandler=new mme(this.body,this.canvas),this.interactionHandler=new Dye(this.body,this.canvas,this.selectionHandler),this.view=new Iye(this.body,this.canvas),this.renderer=new Eye(this.body,this.canvas),this.physics=new fye(this.body),this.layoutEngine=new j$e(this.body),this.clustering=new wye(this.body),this.manipulation=new W$e(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new qpe(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new nye(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new q$e(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(e),this.setData(i)}lT(z.prototype);z.prototype.setOptions=function(t){var i=this;if(t===null&&(t=void 0),t!==void 0){var e=Xce.validate(t,U$e);e===!0&&console.error("%cErrors have been found in the supplied options object.",vP);var r=["locale","locales","clickToUse"];if(va(r,this.options,t),t.locale!==void 0&&(t.locale=bhe(t.locales||this.options.locales,t.locale)),t=this.layoutEngine.setOptions(t.layout,t),this.canvas.setOptions(t),this.groups.setOptions(t.groups),this.nodesHandler.setOptions(t.nodes),this.edgesHandler.setOptions(t.edges),this.physics.setOptions(t.physics),this.manipulation.setOptions(t.manipulation,t,this.options),this.interactionHandler.setOptions(t.interaction),this.renderer.setOptions(t.interaction),this.selectionHandler.setOptions(t.interaction),t.groups!==void 0&&this.body.emitter.emit("refreshNodes"),"configure"in t&&(this.configurator||(this.configurator=new qce(this,this.body.container,ak,this.canvas.pixelRatio,G$e)),this.configurator.setOptions(t.configure)),this.configurator&&this.configurator.options.enabled===!0){var n={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};$e(n.nodes,this.nodesHandler.options),$e(n.edges,this.edgesHandler.options),$e(n.layout,this.layoutEngine.options),$e(n.interaction,this.selectionHandler.options),$e(n.interaction,this.renderer.options),$e(n.interaction,this.interactionHandler.options),$e(n.manipulation,this.manipulation.options),$e(n.physics,this.physics.options),$e(n.global,this.canvas.options),$e(n.global,this.options),this.configurator.setModuleOptions(n)}t.clickToUse!==void 0?t.clickToUse===!0?this.activator===void 0&&(this.activator=new Kce(this.canvas.frame),this.activator.on("change",function(){i.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")}};z.prototype._updateVisibleIndices=function(){var t=this.body.nodes,i=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&!this.clustering._isClusteredNode(e)&&t[e].options.hidden===!1&&this.body.nodeIndices.push(t[e].id);for(var r in i)if(Object.prototype.hasOwnProperty.call(i,r)){var n=i[r],a=t[n.fromId],o=t[n.toId],s=a!==void 0&&o!==void 0,u=!this.clustering._isClusteredEdge(r)&&n.options.hidden===!1&&s&&a.options.hidden===!1&&o.options.hidden===!1;u&&this.body.edgeIndices.push(n.id)}};z.prototype.bindEventListeners=function(){var t=this;this.body.emitter.on("_dataChanged",function(){t.edgesHandler._updateState(),t.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",function(){t.clustering._updateState(),t._updateVisibleIndices(),t._updateValueRange(t.body.nodes),t._updateValueRange(t.body.edges),t.body.emitter.emit("startSimulation"),t.body.emitter.emit("_requestRedraw")})};z.prototype.setData=function(t){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),t&&t.dot&&(t.nodes||t.edges))throw new SyntaxError('Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.');if(this.setOptions(t&&t.options),t&&t.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 i=ohe(t.dot);this.setData(i);return}else if(t&&t.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=she(t.gephi);this.setData(e);return}else this.nodesHandler.setData(t&&t.nodes,!0),this.edgesHandler.setData(t&&t.edges,!0);this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")};z.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 t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&delete this.body.nodes[t];for(var i in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,i)&&delete this.body.edges[i];Ur(this.body.container)};z.prototype._updateValueRange=function(t){var i,e=void 0,r=void 0,n=0;for(i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var a=t[i].getValue();a!==void 0&&(e=e===void 0?a:Math.min(a,e),r=r===void 0?a:Math.max(a,r),n+=a)}if(e!==void 0&&r!==void 0)for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&t[i].setValueRange(e,r,n)};z.prototype.isActive=function(){return!this.activator||this.activator.active};z.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)};z.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)};z.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)};z.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)};z.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)};z.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)};z.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)};z.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)};z.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)};z.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)};z.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)};z.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)};z.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)};z.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)};z.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)};z.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)};z.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)};z.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)};z.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)};z.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)};z.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)};z.prototype.editNodeMode=function(){return console.warn("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)};z.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)};z.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)};z.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)};z.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)};z.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)};z.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)};z.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)};z.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)};z.prototype.getConnectedNodes=function(t){return this.body.nodes[t]!==void 0?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)};z.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)};z.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)};z.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)};z.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)};z.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)};z.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)};z.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)};z.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)};z.prototype.getNodeAt=function(){var t=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return t!==void 0&&t.id!==void 0?t.id:t};z.prototype.getEdgeAt=function(){var t=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return t!==void 0&&t.id!==void 0?t.id:t};z.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)};z.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)};z.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()};z.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)};z.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)};z.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)};z.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)};z.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)};z.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)};z.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)};z.prototype.getOptionsFromConfigurator=function(){var t={};return this.configurator&&(t=this.configurator.getOptions.apply(this.configurator)),t};const Y$e=ne("span",{op75:""},"Show pages",-1),X$e=ne("span",{op75:""},"Show layouts",-1),Q$e=ne("span",{op75:""},"Show workspace",-1),Z$e=ne("span",{op75:""},"Show node_modules",-1),J$e=ne("div",{"i-carbon-close":""},null,-1),ebe=ne("div",{"flex-auto":""},null,-1),tbe={relative:"","h-full":"","w-full":""},rbe=ne("div",{grid:"~ cols-[20px_1fr] items-center gap-y-1"},[ne("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-42b883":""}),ne("div",{op50:""}," Component "),ne("div",{"h-3":"","w-3":"","bg-hex-42b2b8":""}),ne("div",{op50:""}," Page "),ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 726 628","ml--1px":"","h-3":""},[ne("path",{fill:"#4256b8","stroke-width":"4",d:"M723 314 543 625.8H183L3 314 183 2.2h360L723 314z"})]),ne("div",{op50:""}," Layout "),ne("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b4b842":""}),ne("div",{op50:""}," Library Component "),ne("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b86542":""}),ne("div",{op50:""}," Unknown ")],-1),nbe={key:0,p4:"",pr10:"",pt4:"",flex:"~ col gap4"},ibe=Ui({__name:"ComponentsGraph",props:{components:null},setup(t){const i=t,e=Ea(),r=Ea(),n=sk(),a=Ea(),o=uk(),s=lk(),u=ck(),l=hk(),{componentsGraphShowNodeModules:c,componentsGraphShowPages:h,componentsGraphShowLayouts:d,componentsGraphShowWorkspace:f}=y_(),v=Ea(),g=rn(()=>{const $=l.value||[];if(v.value){let y=function(_){!_||m.has(_)||(m.add(_),_.deps.forEach(S=>{y($.find(T=>T.id===S))}))};const m=new Set;return $.find(_=>_.id===a.value?.id),y(v.value),Array.from(m)}return $}),b=rn(()=>{const $=g.value.map(m=>{const _=i.components.find(A=>A.filePath===m.id),S=o.value?.find(A=>A.file===m.id),T=u.value?.find(A=>A.file===m.id),O=m.id.replace(/\?.*$/,"").replace(/\#.*$/,""),w=m.id.includes("/node_modules/")?"lib":_?"user":T?"layout":S?"page":"unknown";if(!c.value&&w==="lib"||!h.value&&w==="page"||!d.value&&w==="layout"||!f.value&&w==="user"&&s.value&&!m.id.startsWith(s.value.rootDir))return null;const E=w==="layout"?"hexagon":w==="page"?"square":"dot";return{id:m.id,label:O.split("/").splice(-1)[0].replace(/\.\w+$/,""),group:w,shape:E,size:15+Math.min(m.deps.length/2,8),font:{color:n.value==="dark"?"white":"black"},color:v.value?.id===m.id?"#82c742":void 0,extra:{id:m.id,component:_,page:S,layout:T,relationship:m}}}).filter(m=>!!m),y=g.value.flatMap(m=>m.deps.map(_=>({from:m.id,to:_,arrows:{to:{enabled:!0,scaleFactor:.8}}})));return{nodes:$,edges:y}});dk(()=>{const $={nodes:{shape:"dot",size:16},physics:{repulsion:{centralGravity:.7,springLength:100,springConstant:.01},maxVelocity:146,solver:"forceAtlas2Based",timestep:.35,stabilization:{enabled:!0,iterations:200}},groups:{user:{color:"#42b883"},unknown:{color:"#b86542"},lib:{color:"#b4b842"},page:{color:"#42b2b8"},layout:{color:"#4256b8"}}},y=new z(e.value,b.value,$);y.on("click",m=>{const _=m.nodes?.[0],S=b.value.nodes?.find(T=>T.id===_)?.extra;S&&(a.value=S)}),fk(b,()=>{y.setData(b.value)})});function p(){v.value=a.value?.relationship,a.value=void 0}return($,y)=>{const m=Sk,_=m_,S=vk,T=E_,O=pk,w=Tk;return fe(),lt(Vr,null,[Ve(_,{ref_key:"navbar",ref:r,absolute:"","left-0":"","right-0":"","top-0":""},{search:at(()=>[Ve(m,{modelValue:Z(h),"onUpdate:modelValue":y[0]||(y[0]=E=>Sa(h)?h.value=E:null),n:"primary sm"},{default:at(()=>[Y$e]),_:1},8,["modelValue"]),Ve(m,{modelValue:Z(d),"onUpdate:modelValue":y[1]||(y[1]=E=>Sa(d)?d.value=E:null),n:"primary sm"},{default:at(()=>[X$e]),_:1},8,["modelValue"]),Ve(m,{modelValue:Z(f),"onUpdate:modelValue":y[2]||(y[2]=E=>Sa(f)?f.value=E:null),n:"primary sm"},{default:at(()=>[Q$e]),_:1},8,["modelValue"]),Ve(m,{modelValue:Z(c),"onUpdate:modelValue":y[3]||(y[3]=E=>Sa(c)?c.value=E:null),n:"primary sm"},{default:at(()=>[Z$e]),_:1},8,["modelValue"]),Z(v)?(fe(),lt("button",{key:0,flex:"~ gap-1","items-center":"","rounded-full":"","bg-gray:20":"",py1:"",pl3:"",pr2:"","text-xs":"",op50:"","hover:op100":"",onClick:y[4]||(y[4]=E=>v.value=void 0)},[ja(" Clear filter "),J$e])):Qt("",!0),ebe,Vu($.$slots,"default")]),_:3},512),ne("div",tbe,[ne("div",{ref_key:"container",ref:e,"h-full":"","w-full":""},null,512),Ve(S,{absolute:"","bottom-3":"","left-3":"","border-0":"",p2:"",px3:"","text-sm":"","glass-effect":""},{default:at(()=>[rbe]),_:1}),Ve(w,{"model-value":!!(Z(a)&&Z(a).component),navbar:Z(r),"w-80":"",onClose:y[6]||(y[6]=E=>a.value=void 0)},{default:at(()=>[Z(a)&&Z(a).component?(fe(),lt("div",nbe,[Ve(T,{component:Z(a).component},null,8,["component"]),ne("div",null,[Ve(O,{n:"primary solid",onClick:y[5]||(y[5]=E=>p())},{default:at(()=>[ja(" Filter to this component ")]),_:1})])])):Qt("",!0)]),_:1},8,["model-value","navbar"])])],64)}}}),abe={hover:"bg-active",class:"group",flex:"~ gap2","w-full":"","items-center":"",rounded:"",px2:"",py1:""},obe={"hover:text-primary":""},sbe=Ui({__name:"ComponentItem",props:{component:null},setup(t){const i=t,e=rn(()=>i.component.filePath||i.component.file||i.component.__file||"");return(r,n)=>{const a=__,o=E_,s=gk("VDropdown"),u=$_,l=b_;return fe(),lt("div",abe,[Ve(s,null,{popper:at(()=>[Ve(o,{component:t.component,p4:""},null,8,["component"])]),default:at(()=>[ne("button",obe,[Ve(a,{component:t.component},null,8,["component"])])]),_:1}),t.component.global?(fe(),$t(u,{key:0,"bg-green-400:10":"","text-green-400":"",title:"Registered at runtime as a global component",textContent:"runtime"})):Qt("",!0),Vu(r.$slots,"default"),Z(e)?(fe(),$t(l,{key:1,filepath:Z(e),"text-sm":"",op25:"","group-hover:op75":""},null,8,["filepath"])):Qt("",!0)])}}}),ube={pl4:""},lbe=Ui({__name:"ComponentsList",props:{components:null},setup(t){const i=t,e=Ea(""),r=rn(()=>new kk(i.components,{keys:["pascalName","filePath","kebabName"]})),n=rn(()=>{const a=[],o=new Map,s=[],u=[],l={user:0,lib:0,builtin:0,runtime:0};return(e.value?r.value.search(e.value).map(h=>h.item):i.components).forEach(h=>{if(h.filePath&&yk(h.filePath)){const d=mk(h.filePath);if(!d)return;d==="nuxt"?(s.push(h),l.builtin++):(o.has(d)||o.set(d,[]),o.get(d).push(h),l.lib++)}else h.global&&!h.filePath?(u.push(h),l.runtime++):(a.push(h),l.user++)}),{count:l,user:a,builtin:s,lib:o,runtime:u}});return(a,o)=>{const s=m_,u=sbe,l=xk,c=Pk;return fe(),lt(Vr,null,[Ve(s,{search:Z(e),"onUpdate:search":o[0]||(o[0]=h=>Sa(e)?e.value=h:null)},{actions:at(()=>[Vu(a.$slots,"default")]),_:3},8,["search"]),Z(n).user.length?(fe(),$t(l,{key:0,icon:"carbon-nominal",text:"User components",open:Z(n).user.length<=("DETAILS_MAX_ITEMS"in a?a.DETAILS_MAX_ITEMS:Z(jl)),description:`Total components: ${Z(n).count.user}`},{default:at(()=>[(fe(!0),lt(Vr,null,pa(Z(n).user,h=>(fe(),$t(u,{key:h.filePath,component:h},null,8,["component"]))),128))]),_:1},8,["open","description"])):Qt("",!0),Z(n).runtime.length?(fe(),$t(l,{key:1,icon:"carbon-load-balancer-global",open:Z(n).runtime.length<=("DETAILS_MAX_ITEMS"in a?a.DETAILS_MAX_ITEMS:Z(jl)),text:"Runtime components",description:`Total components: ${Z(n).count.runtime}`},{default:at(()=>[(fe(!0),lt(Vr,null,pa(Z(n).runtime,h=>(fe(),$t(u,{key:h.filePath,component:h},null,8,["component"]))),128))]),_:1},8,["open","description"])):Qt("",!0),Z(n).builtin.length?(fe(),$t(l,{key:2,icon:"simple-icons-nuxtdotjs",text:"Built-in components",description:`Total components: ${Z(n).count.builtin}`},{default:at(()=>[(fe(!0),lt(Vr,null,pa(Z(n).builtin,h=>(fe(),$t(u,{key:h.filePath,component:h},null,8,["component"]))),128))]),_:1},8,["description"])):Qt("",!0),Z(n).lib.size?(fe(),$t(l,{key:3,open:Z(n).count.lib<=("DETAILS_MAX_ITEMS"in a?a.DETAILS_MAX_ITEMS:Z(jl)),icon:"carbon-3d-mpr-toggle",text:"Components from libraries",description:`${Z(n).count.lib} components from ${Z(n).lib.size} packages`},{default:at(()=>[(fe(!0),lt(Vr,null,pa(Z(n).lib.entries(),([h,d])=>(fe(),lt("div",{key:h,"ml-2":""},[Ve(c,{text:`${h} (${d.length})`,py1:"",op50:""},null,8,["text"]),ne("div",ube,[(fe(!0),lt(Vr,null,pa(d,f=>(fe(),$t(u,{key:f.filePath,component:f},null,8,["component"]))),128))])]))),128))]),_:1},8,["open","description"])):Qt("",!0)],64)}}}),cbe={relative:"","h-full":"","of-auto":""},hbe={"flex-none":"",flex:"~ gap3"},Tbe=Ui({__name:"components",setup(t){const i=$k(),e=bk(),r=wk(),{componentsView:n}=y_();function a(){i.value?.inspector?.instance&&(i.value.inspector.enable(),e.push("/__inspecting"))}function o(){n.value=n.value==="list"?"graph":"list"}return(s,u)=>{const l=g_,c=Mk,h=Ek;return fe(),lt(Vr,null,[ne("div",cbe,[(fe(),$t(_k(Z(n)==="list"?lbe:ibe),{components:Z(r)},{default:at(()=>[ne("div",hbe,[Ve(l,{"text-lg":"",icon:Z(n)==="graph"?"i-carbon-list":"i-carbon-network-4",title:"Toggle view",onClick:o},null,8,["icon"]),Z(i)?.inspector?.instance?(fe(),$t(l,{key:0,"text-lg":"",icon:"i-carbon-select-window",title:"Inspect Vue components",onClick:a})):Qt("",!0)])]),_:1},8,["components"]))]),Ve(h,null,{default:at(()=>[Ve(c)]),_:1})],64)}}});export{Tbe as default};
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(t)},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 H$e(t,i){var e;if(t){if(typeof t=="string")return p_(t,i);var r=st(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return ei(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p_(t,i)}}function p_(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,r=new Array(i);e<i;e++)r[e]=t[e];return r}var W$e=function(){function t(i,e,r,n){var a=this,o,s;N(this,t),this.body=i,this.canvas=e,this.selectionHandler=r,this.interactionHandler=n,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}},Le(this.options,this.defaultOptions),this.body.emitter.on("destroy",function(){a._clean()}),this.body.emitter.on("_dataChanged",C(o=this._restore).call(o,this)),this.body.emitter.on("_resetData",C(s=this._restore).call(s,this))}return F(t,[{key:"_restore",value:function(){this.inMode!==!1&&(this.options.initiallyActive===!0?this.enableEditMode():this.disableEditMode())}},{key:"setOptions",value:function(e,r,n){r!==void 0&&(r.locale!==void 0?this.options.locale=r.locale:this.options.locale=n.locale,r.locales!==void 0?this.options.locales=r.locales:this.options.locales=n.locales),e!==void 0&&(typeof e=="boolean"?this.options.enabled=e:(this.options.enabled=!0,$e(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,r;this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block";var n=this.selectionHandler.getSelectedNodeCount(),a=this.selectionHandler.getSelectedEdgeCount(),o=n+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)),n===1&&typeof this.options.editNode=="function"?(u===!0?this._createSeperator(2):u=!0,this._createEditNodeButton(s)):a===1&&n===0&&this.options.editEdge!==!1&&(u===!0?this._createSeperator(3):u=!0,this._createEditEdgeButton(s)),o!==0&&(n>0&&this.options.deleteNode!==!1?(u===!0&&this._createSeperator(4),this._createDeleteButton(s)):n===0&&this.options.deleteEdge!==!1&&(u===!0&&this._createSeperator(4),this._createDeleteButton(s))),this._bindElementEvents(this.closeDiv,C(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",C(r=this.showManipulatorToolbar).call(r,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 r,n=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(n),this._createSeperator(),this._createDescription(n.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,C(r=this.toggleEditMode).call(r,this))}this._temporaryBindEvent("click",C(e=this._performAddNode).call(e,this))}},{key:"editNode",value:function(){var e=this;this.editMode!==!0&&this.enableEditMode(),this._clean();var r=this.selectionHandler.getSelectedNodes()[0];if(r!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(r.isCluster!==!0){var n=$e({},r.options,!1);if(n.x=r.x,n.y=r.y,this.options.editNode.length===2)this.options.editNode(n,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,r,n,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,C(s=this.toggleEditMode).call(s,this))}this._temporaryBindUI("onTouch",C(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",C(r=this._finishConnect).call(r,this)),this._temporaryBindUI("onDrag",C(n=this._dragControlNode).call(n,this)),this._temporaryBindUI("onRelease",C(a=this._finishConnect).call(a,this)),this._temporaryBindUI("onDragStart",C(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",he(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 r,n=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(n),this._createSeperator(),this._createDescription(n.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,C(r=this.toggleEditMode).call(r,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var a,o,s,u,l=this.body.edges[this.edgeBeingEditedId],c=this._getNewTargetNode(l.from.x,l.from.y),h=this._getNewTargetNode(l.to.x,l.to.y);this.temporaryIds.nodes.push(c.id),this.temporaryIds.nodes.push(h.id),this.body.nodes[c.id]=c,this.body.nodeIndices.push(c.id),this.body.nodes[h.id]=h,this.body.nodeIndices.push(h.id),this._temporaryBindUI("onTouch",C(a=this._controlNodeTouch).call(a,this)),this._temporaryBindUI("onTap",function(){}),this._temporaryBindUI("onHold",function(){}),this._temporaryBindUI("onDragStart",C(o=this._controlNodeDragStart).call(o,this)),this._temporaryBindUI("onDrag",C(s=this._controlNodeDrag).call(s,this)),this._temporaryBindUI("onDragEnd",C(u=this._controlNodeDragEnd).call(u,this)),this._temporaryBindUI("onMouseMove",function(){}),this._temporaryBindEvent("beforeDrawing",function(d){var f=l.edgeType.findBorderPositions(d);c.selected===!1&&(c.x=f.from.x,c.y=f.from.y),h.selected===!1&&(h.x=f.to.x,h.y=f.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 r=this.selectionHandler.getSelectedNodeIds(),n=this.selectionHandler.getSelectedEdgeIds(),a=void 0;if(r.length>0){for(var o=0;o<r.length;o++)if(this.body.nodes[r[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 n.length>0&&typeof this.options.deleteEdge=="function"&&(a=this.options.deleteEdge);if(typeof a=="function"){var s={nodes:r,edges:n};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(n),this.body.data.nodes.getDataSet().remove(r),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,r;this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",(e=(r=this.options.locales[this.options.locale])===null||r===void 0?void 0:r.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,r){var n=$e({},this.options.controlNodeStyle);n.id="targetNode"+Ba(),n.hidden=!1,n.physics=!1,n.x=e,n.y=r;var a=this.body.functions.createNode(n);return a.shape.boundingBox={left:e,right:e,top:r,bottom:r},a}},{key:"_createEditButton",value:function(){var e;this._clean(),this.manipulationDOM={},Ur(this.editModeDiv);var r=this.options.locales[this.options.locale],n=this._createButton("editMode","vis-edit vis-edit-mode",r.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(n),this._bindElementEvents(n,C(e=this.toggleEditMode).call(e,this))}},{key:"_clean",value:function(){this.inMode=!1,this.guiEnabled===!0&&(Ur(this.editModeDiv),Ur(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanupDOMEventListeners",value:function(){var e,r=z$e(Or(e=this._domEventListenerCleanupQueue).call(e,0)),n;try{for(r.s();!(n=r.n()).done;){var a=n.value;a()}}catch(o){r.e(o)}finally{r.f()}}},{key:"_removeManipulationDOM",value:function(){this._clean(),Ur(this.manipulationDiv),Ur(this.editModeDiv),Ur(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 r,n=this._createButton("addNode","vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,C(r=this.addNodeMode).call(r,this))}},{key:"_createAddEdgeButton",value:function(e){var r,n=this._createButton("addEdge","vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,C(r=this.addEdgeMode).call(r,this))}},{key:"_createEditNodeButton",value:function(e){var r,n=this._createButton("editNode","vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,C(r=this.editNode).call(r,this))}},{key:"_createEditEdgeButton",value:function(e){var r,n=this._createButton("editEdge","vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,C(r=this.editEdgeMode).call(r,this))}},{key:"_createDeleteButton",value:function(e){var r,n;this.options.rtl?n="vis-delete-rtl":n="vis-delete";var a=this._createButton("delete",n,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(a),this._bindElementEvents(a,C(r=this.deleteSelected).call(r,this))}},{key:"_createBackButton",value:function(e){var r,n=this._createButton("back","vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,C(r=this.showManipulatorToolbar).call(r,this))}},{key:"_createButton",value:function(e,r,n){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 "+r,this.manipulationDOM[e+"Label"]=document.createElement("div"),this.manipulationDOM[e+"Label"].className=a,this.manipulationDOM[e+"Label"].innerText=n,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,r){this.temporaryEventFunctions.push({event:e,boundFunction:r}),this.body.emitter.on(e,r)}},{key:"_temporaryBindUI",value:function(e,r){if(this.body.eventListeners[e]!==void 0)this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=r;else throw new Error("This UI function does not exist. Typo? You tried: "+e+" possible are: "+es(Te(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 r=this.temporaryEventFunctions[e].event,n=this.temporaryEventFunctions[e].boundFunction;this.body.emitter.off(r,n)}this.temporaryEventFunctions=[]}},{key:"_bindElementEvents",value:function(e,r){var n=new ki(e,{});Wu(n,r),this._domEventListenerCleanupQueue.push(function(){n.destroy()});var a=function(s){var u=s.keyCode,l=s.key;(l==="Enter"||l===" "||u===13||u===32)&&r()};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 r;this.body.edges[this.temporaryIds.edges[e]].disconnect(),delete this.body.edges[this.temporaryIds.edges[e]];var n=ae(r=this.body.edgeIndices).call(r,this.temporaryIds.edges[e]);if(n!==-1){var a;Or(a=this.body.edgeIndices).call(a,n,1)}}for(var o=0;o<this.temporaryIds.nodes.length;o++){var s;delete this.body.nodes[this.temporaryIds.nodes[o]];var u=ae(s=this.body.nodeIndices).call(s,this.temporaryIds.nodes[o]);if(u!==-1){var l;Or(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=Le({},this.body.view.translation)}},{key:"_controlNodeDragStart",value:function(){var e=this.lastTouch,r=this.selectionHandler._pointerToPositionObject(e),n=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=n.isOverlappingWith(r),u=a.isOverlappingWith(r);s===!0?(this.selectedControlNode=n,o.edgeType.from=n):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 r=this.body.functions.getPointer(e.center),n=this.canvas.DOMtoCanvas(r);this.selectedControlNode!==void 0?(this.selectedControlNode.x=n.x,this.selectedControlNode.y=n.y):this.interactionHandler.onDrag(e),this.body.emitter.emit("_redraw")}},{key:"_controlNodeDragEnd",value:function(e){var r=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(r),a=this.body.edges[this.edgeBeingEditedId];if(this.selectedControlNode!==void 0){this.selectionHandler.unselectAll();for(var o=this.selectionHandler._getAllNodesOverlappingWith(n),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=Le({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;var r=this.lastTouch,n=this.selectionHandler.getNodeAt(r);if(n!==void 0)if(n.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var a=this._getNewTargetNode(n.x,n.y);this.body.nodes[a.id]=a,this.body.nodeIndices.push(a.id);var o=this.body.functions.createEdge({id:"connectionEdge"+Ba(),from:n.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 r=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(r),a=void 0;this.temporaryIds.edges[0]!==void 0&&(a=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(n),s=void 0,u=o.length-1;u>=0;u--){var l;if(ae(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,r),this.temporaryIds.nodes[0]!==void 0){var c=this.body.nodes[this.temporaryIds.nodes[0]];c.x=this.canvas._XconvertDOMtoCanvas(r.x),c.y=this.canvas._YconvertDOMtoCanvas(r.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(e)}},{key:"_finishConnect",value:function(e){var r=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(r),a=void 0;this.temporaryIds.edges[0]!==void 0&&(a=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(n),s=void 0,u=o.length-1;u>=0;u--){var l;if(ae(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,r),this.body.emitter.emit("_redraw")}},{key:"_dragStartEdge",value:function(e){var r=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",e,r,void 0,!0)}},{key:"_performAddNode",value:function(e){var r=this,n={id:Ba(),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(n,function(a){a!=null&&r.inMode==="addNode"&&r.body.data.nodes.getDataSet().add(a),r.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(n),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(e,r){var n=this,a={from:e,to:r};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(a,function(o){o!=null&&n.inMode==="addEdge"&&(n.body.data.edges.getDataSet().add(o),n.selectionHandler.unselectAll(),n.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,r){var n=this,a={id:this.edgeBeingEditedId,from:e,to:r,label:this.body.data.edges.get(this.edgeBeingEditedId).label},o=this.options.editEdge;if(he(o)==="object"&&(o=o.editWithoutDrag),typeof o=="function")if(o.length===2)o(a,function(s){s==null||n.inMode!=="editEdge"?(n.body.edges[a.id].updateEdgeType(),n.body.emitter.emit("_redraw"),n.showManipulatorToolbar()):(n.body.data.edges.getDataSet().update(s),n.selectionHandler.unselectAll(),n.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()}}]),t}(),M="string",I="boolean",x="number",Pa="array",W="object",ik="dom",V$e="any",id=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],ad={borderWidth:{number:x},borderWidthSelected:{number:x,undefined:"undefined"},brokenImage:{string:M,undefined:"undefined"},chosen:{label:{boolean:I,function:"function"},node:{boolean:I,function:"function"},__type__:{object:W,boolean:I}},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:x,undefined:"undefined"},fixed:{x:{boolean:I},y:{boolean:I},__type__:{object:W,boolean:I}},font:{align:{string:M},color:{string:M},size:{number:x},face:{string:M},background:{string:M},strokeWidth:{number:x},strokeColor:{string:M},vadjust:{number:x},multi:{boolean:I,string:M},bold:{color:{string:M},size:{number:x},face:{string:M},mod:{string:M},vadjust:{number:x},__type__:{object:W,string:M}},boldital:{color:{string:M},size:{number:x},face:{string:M},mod:{string:M},vadjust:{number:x},__type__:{object:W,string:M}},ital:{color:{string:M},size:{number:x},face:{string:M},mod:{string:M},vadjust:{number:x},__type__:{object:W,string:M}},mono:{color:{string:M},size:{number:x},face:{string:M},mod:{string:M},vadjust:{number:x},__type__:{object:W,string:M}},__type__:{object:W,string:M}},group:{string:M,number:x,undefined:"undefined"},heightConstraint:{minimum:{number:x},valign:{string:M},__type__:{object:W,boolean:I,number:x}},hidden:{boolean:I},icon:{face:{string:M},code:{string:M},size:{number:x},color:{string:M},weight:{string:M,number:x},__type__:{object:W}},id:{string:M,number:x},image:{selected:{string:M,undefined:"undefined"},unselected:{string:M,undefined:"undefined"},__type__:{object:W,string:M}},imagePadding:{top:{number:x},right:{number:x},bottom:{number:x},left:{number:x},__type__:{object:W,number:x}},label:{string:M,undefined:"undefined"},labelHighlightBold:{boolean:I},level:{number:x,undefined:"undefined"},margin:{top:{number:x},right:{number:x},bottom:{number:x},left:{number:x},__type__:{object:W,number:x}},mass:{number:x},physics:{boolean:I},scaling:{min:{number:x},max:{number:x},label:{enabled:{boolean:I},min:{number:x},max:{number:x},maxVisible:{number:x},drawThreshold:{number:x},__type__:{object:W,boolean:I}},customScalingFunction:{function:"function"},__type__:{object:W}},shadow:{enabled:{boolean:I},color:{string:M},size:{number:x},x:{number:x},y:{number:x},__type__:{object:W,boolean:I}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:I,array:Pa},borderRadius:{number:x},interpolation:{boolean:I},useImageSize:{boolean:I},useBorderWithImage:{boolean:I},coordinateOrigin:{string:["center","top-left"]},__type__:{object:W}},size:{number:x},title:{string:M,dom:ik,undefined:"undefined"},value:{number:x,undefined:"undefined"},widthConstraint:{minimum:{number:x},maximum:{number:x},__type__:{object:W,boolean:I,number:x}},x:{number:x},y:{number:x},__type__:{object:W}},U$e={configure:{enabled:{boolean:I},filter:{boolean:I,string:M,array:Pa,function:"function"},container:{dom:ik},showButton:{boolean:I},__type__:{object:W,boolean:I,string:M,array:Pa,function:"function"}},edges:{arrows:{to:{enabled:{boolean:I},scaleFactor:{number:x},type:{string:id},imageHeight:{number:x},imageWidth:{number:x},src:{string:M},__type__:{object:W,boolean:I}},middle:{enabled:{boolean:I},scaleFactor:{number:x},type:{string:id},imageWidth:{number:x},imageHeight:{number:x},src:{string:M},__type__:{object:W,boolean:I}},from:{enabled:{boolean:I},scaleFactor:{number:x},type:{string:id},imageWidth:{number:x},imageHeight:{number:x},src:{string:M},__type__:{object:W,boolean:I}},__type__:{string:["from","to","middle"],object:W}},endPointOffset:{from:{number:x},to:{number:x},__type__:{object:W,number:x}},arrowStrikethrough:{boolean:I},background:{enabled:{boolean:I},color:{string:M},size:{number:x},dashes:{boolean:I,array:Pa},__type__:{object:W,boolean:I}},chosen:{label:{boolean:I,function:"function"},edge:{boolean:I,function:"function"},__type__:{object:W,boolean:I}},color:{color:{string:M},highlight:{string:M},hover:{string:M},inherit:{string:["from","to","both"],boolean:I},opacity:{number:x},__type__:{object:W,string:M}},dashes:{boolean:I,array:Pa},font:{color:{string:M},size:{number:x},face:{string:M},background:{string:M},strokeWidth:{number:x},strokeColor:{string:M},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:x},multi:{boolean:I,string:M},bold:{color:{string:M},size:{number:x},face:{string:M},mod:{string:M},vadjust:{number:x},__type__:{object:W,string:M}},boldital:{color:{string:M},size:{number:x},face:{string:M},mod:{string:M},vadjust:{number:x},__type__:{object:W,string:M}},ital:{color:{string:M},size:{number:x},face:{string:M},mod:{string:M},vadjust:{number:x},__type__:{object:W,string:M}},mono:{color:{string:M},size:{number:x},face:{string:M},mod:{string:M},vadjust:{number:x},__type__:{object:W,string:M}},__type__:{object:W,string:M}},hidden:{boolean:I},hoverWidth:{function:"function",number:x},label:{string:M,undefined:"undefined"},labelHighlightBold:{boolean:I},length:{number:x,undefined:"undefined"},physics:{boolean:I},scaling:{min:{number:x},max:{number:x},label:{enabled:{boolean:I},min:{number:x},max:{number:x},maxVisible:{number:x},drawThreshold:{number:x},__type__:{object:W,boolean:I}},customScalingFunction:{function:"function"},__type__:{object:W}},selectionWidth:{function:"function",number:x},selfReferenceSize:{number:x},selfReference:{size:{number:x},angle:{number:x},renderBehindTheNode:{boolean:I},__type__:{object:W}},shadow:{enabled:{boolean:I},color:{string:M},size:{number:x},x:{number:x},y:{number:x},__type__:{object:W,boolean:I}},smooth:{enabled:{boolean:I},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:x},forceDirection:{string:["horizontal","vertical","none"],boolean:I},__type__:{object:W,boolean:I}},title:{string:M,undefined:"undefined"},width:{number:x},widthConstraint:{maximum:{number:x},__type__:{object:W,boolean:I,number:x}},value:{number:x,undefined:"undefined"},__type__:{object:W}},groups:{useDefaultGroups:{boolean:I},__any__:ad,__type__:{object:W}},interaction:{dragNodes:{boolean:I},dragView:{boolean:I},hideEdgesOnDrag:{boolean:I},hideEdgesOnZoom:{boolean:I},hideNodesOnDrag:{boolean:I},hover:{boolean:I},keyboard:{enabled:{boolean:I},speed:{x:{number:x},y:{number:x},zoom:{number:x},__type__:{object:W}},bindToWindow:{boolean:I},autoFocus:{boolean:I},__type__:{object:W,boolean:I}},multiselect:{boolean:I},navigationButtons:{boolean:I},selectable:{boolean:I},selectConnectedEdges:{boolean:I},hoverConnectedEdges:{boolean:I},tooltipDelay:{number:x},zoomView:{boolean:I},zoomSpeed:{number:x},__type__:{object:W}},layout:{randomSeed:{undefined:"undefined",number:x,string:M},improvedLayout:{boolean:I},clusterThreshold:{number:x},hierarchical:{enabled:{boolean:I},levelSeparation:{number:x},nodeSpacing:{number:x},treeSpacing:{number:x},blockShifting:{boolean:I},edgeMinimization:{boolean:I},parentCentralization:{boolean:I},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:W,boolean:I}},__type__:{object:W}},manipulation:{enabled:{boolean:I},initiallyActive:{boolean:I},addNode:{boolean:I,function:"function"},addEdge:{boolean:I,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:W,boolean:I,function:"function"}},deleteNode:{boolean:I,function:"function"},deleteEdge:{boolean:I,function:"function"},controlNodeStyle:ad,__type__:{object:W,boolean:I}},nodes:ad,physics:{enabled:{boolean:I},barnesHut:{theta:{number:x},gravitationalConstant:{number:x},centralGravity:{number:x},springLength:{number:x},springConstant:{number:x},damping:{number:x},avoidOverlap:{number:x},__type__:{object:W}},forceAtlas2Based:{theta:{number:x},gravitationalConstant:{number:x},centralGravity:{number:x},springLength:{number:x},springConstant:{number:x},damping:{number:x},avoidOverlap:{number:x},__type__:{object:W}},repulsion:{centralGravity:{number:x},springLength:{number:x},springConstant:{number:x},nodeDistance:{number:x},damping:{number:x},__type__:{object:W}},hierarchicalRepulsion:{centralGravity:{number:x},springLength:{number:x},springConstant:{number:x},nodeDistance:{number:x},damping:{number:x},avoidOverlap:{number:x},__type__:{object:W}},maxVelocity:{number:x},minVelocity:{number:x},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:I},iterations:{number:x},updateInterval:{number:x},onlyDynamicEdges:{boolean:I},fit:{boolean:I},__type__:{object:W,boolean:I}},timestep:{number:x},adaptiveTimestep:{boolean:I},wind:{x:{number:x},y:{number:x},__type__:{object:W}},__type__:{object:W,boolean:I}},autoResize:{boolean:I},clickToUse:{boolean:I},locale:{string:M},locales:{__any__:{any:V$e},__type__:{object:W}},height:{string:M},width:{string:M},__type__:{object:W}},ak={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]}}},G$e=function(i,e,r){var n;return!!(vr(i).call(i,"physics")&&vr(n=ak.physics.solver).call(n,e)&&r.physics.solver!==e&&e!=="wind")},K$e=function(){function t(){N(this,t)}return F(t,[{key:"getDistances",value:function(e,r,n){for(var a={},o=e.edges,s=0;s<r.length;s++){var u=r[s],l={};a[u]=l;for(var c=0;c<r.length;c++)l[r[c]]=s==c?0:1e9}for(var h=0;h<n.length;h++){var d=o[n[h]];d.connected===!0&&a[d.fromId]!==void 0&&a[d.toId]!==void 0&&(a[d.fromId][d.toId]=1,a[d.toId][d.fromId]=1)}for(var f=r.length,v=0;v<f;v++)for(var g=r[v],b=a[g],p=0;p<f-1;p++)for(var $=r[p],y=a[$],m=p+1;m<f;m++){var _=r[m],S=a[_],T=Math.min(y[_],y[g]+b[_]);y[_]=T,S[$]=T}return a}}]),t}(),q$e=function(){function t(i,e,r){N(this,t),this.body=i,this.springLength=e,this.springConstant=r,this.distanceSolver=new K$e}return F(t,[{key:"setOptions",value:function(e){e&&(e.springLength&&(this.springLength=e.springLength),e.springConstant&&(this.springConstant=e.springConstant))}},{key:"solve",value:function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=this.distanceSolver.getDistances(this.body,e,r);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)),c=5,h=1e9,d=0,f=0,v=0,g=0,b=0;h>o&&u<l;){u+=1;var p=this._getHighestEnergyNode(n),$=xe(p,4);for(d=$[0],h=$[1],f=$[2],v=$[3],g=h,b=0;g>s&&b<c;){b+=1,this._moveNode(d,f,v);var y=this._getEnergy(d),m=xe(y,3);g=m[0],f=m[1],v=m[2]}}}},{key:"_getHighestEnergyNode",value:function(e){for(var r=this.body.nodeIndices,n=this.body.nodes,a=0,o=r[0],s=0,u=0,l=0;l<r.length;l++){var c=r[l];if(n[c].predefinedPosition!==!0||n[c].isCluster===!0&&e===!0||n[c].options.fixed.x!==!0||n[c].options.fixed.y!==!0){var h=this._getEnergy(c),d=xe(h,3),f=d[0],v=d[1],g=d[2];a<f&&(a=f,o=c,s=v,u=g)}}return[o,a,s,u]}},{key:"_getEnergy",value:function(e){var r=xe(this.E_sums[e],2),n=r[0],a=r[1],o=Math.sqrt(Math.pow(n,2)+Math.pow(a,2));return[o,n,a]}},{key:"_moveNode",value:function(e,r,n){for(var a=this.body.nodeIndices,o=this.body.nodes,s=0,u=0,l=0,c=o[e].x,h=o[e].y,d=this.K_matrix[e],f=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,$=d[g],y=f[g],m=1/Math.pow(Math.pow(c-b,2)+Math.pow(h-p,2),1.5);s+=$*(1-y*Math.pow(h-p,2)*m),u+=$*(y*(c-b)*(h-p)*m),l+=$*(1-y*Math.pow(c-b,2)*m)}}var _=s,S=u,T=r,O=l,w=n,E=(T/_+w/S)/(S/_-O/S),A=-(S*E+T)/_;o[e].x+=A,o[e].y+=E,this._updateE_matrix(e)}},{key:"_createL_matrix",value:function(e){var r=this.body.nodeIndices,n=this.springLength;this.L_matrix=[];for(var a=0;a<r.length;a++){this.L_matrix[r[a]]={};for(var o=0;o<r.length;o++)this.L_matrix[r[a]][r[o]]=n*e[r[a]][r[o]]}}},{key:"_createK_matrix",value:function(e){var r=this.body.nodeIndices,n=this.springConstant;this.K_matrix=[];for(var a=0;a<r.length;a++){this.K_matrix[r[a]]={};for(var o=0;o<r.length;o++)this.K_matrix[r[a]][r[o]]=n*Math.pow(e[r[a]][r[o]],-2)}}},{key:"_createE_matrix",value:function(){var e=this.body.nodeIndices,r=this.body.nodes;this.E_matrix={},this.E_sums={};for(var n=0;n<e.length;n++)this.E_matrix[e[n]]=[];for(var a=0;a<e.length;a++){for(var o=e[a],s=r[o].x,u=r[o].y,l=0,c=0,h=a;h<e.length;h++){var d=e[h];if(d!==o){var f=r[d].x,v=r[d].y,g=1/Math.sqrt(Math.pow(s-f,2)+Math.pow(u-v,2));this.E_matrix[o][h]=[this.K_matrix[o][d]*(s-f-this.L_matrix[o][d]*(s-f)*g),this.K_matrix[o][d]*(u-v-this.L_matrix[o][d]*(u-v)*g)],this.E_matrix[d][a]=this.E_matrix[o][h],l+=this.E_matrix[o][h][0],c+=this.E_matrix[o][h][1]}}this.E_sums[o]=[l,c]}}},{key:"_updateE_matrix",value:function(e){for(var r=this.body.nodeIndices,n=this.body.nodes,a=this.E_matrix[e],o=this.K_matrix[e],s=this.L_matrix[e],u=n[e].x,l=n[e].y,c=0,h=0,d=0;d<r.length;d++){var f=r[d];if(f!==e){var v=a[d],g=v[0],b=v[1],p=n[f].x,$=n[f].y,y=1/Math.sqrt(Math.pow(u-p,2)+Math.pow(l-$,2)),m=o[f]*(u-p-s[f]*(u-p)*y),_=o[f]*(l-$-s[f]*(l-$)*y);a[d]=[m,_],c+=m,h+=_;var S=this.E_sums[f];S[0]+=m-g,S[1]+=_-b}}this.E_sums[e]=[c,h]}}]),t}();function z(t,i,e){var r,n,a,o,s=this;if(!(this instanceof z))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:$he,clickToUse:!1},Le(this.options,this.defaultOptions),this.body={container:t,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:C(r=this.on).call(r,this),off:C(n=this.off).call(n,this),emit:C(a=this.emit).call(a,this),once:C(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 _he(function(){return s.body.emitter.emit("_requestRedraw")}),this.groups=new Lde,this.canvas=new Pye(this.body),this.selectionHandler=new mme(this.body,this.canvas),this.interactionHandler=new Dye(this.body,this.canvas,this.selectionHandler),this.view=new Iye(this.body,this.canvas),this.renderer=new Eye(this.body,this.canvas),this.physics=new fye(this.body),this.layoutEngine=new j$e(this.body),this.clustering=new wye(this.body),this.manipulation=new W$e(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new qpe(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new nye(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new q$e(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(e),this.setData(i)}lT(z.prototype);z.prototype.setOptions=function(t){var i=this;if(t===null&&(t=void 0),t!==void 0){var e=Xce.validate(t,U$e);e===!0&&console.error("%cErrors have been found in the supplied options object.",vP);var r=["locale","locales","clickToUse"];if(va(r,this.options,t),t.locale!==void 0&&(t.locale=bhe(t.locales||this.options.locales,t.locale)),t=this.layoutEngine.setOptions(t.layout,t),this.canvas.setOptions(t),this.groups.setOptions(t.groups),this.nodesHandler.setOptions(t.nodes),this.edgesHandler.setOptions(t.edges),this.physics.setOptions(t.physics),this.manipulation.setOptions(t.manipulation,t,this.options),this.interactionHandler.setOptions(t.interaction),this.renderer.setOptions(t.interaction),this.selectionHandler.setOptions(t.interaction),t.groups!==void 0&&this.body.emitter.emit("refreshNodes"),"configure"in t&&(this.configurator||(this.configurator=new qce(this,this.body.container,ak,this.canvas.pixelRatio,G$e)),this.configurator.setOptions(t.configure)),this.configurator&&this.configurator.options.enabled===!0){var n={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};$e(n.nodes,this.nodesHandler.options),$e(n.edges,this.edgesHandler.options),$e(n.layout,this.layoutEngine.options),$e(n.interaction,this.selectionHandler.options),$e(n.interaction,this.renderer.options),$e(n.interaction,this.interactionHandler.options),$e(n.manipulation,this.manipulation.options),$e(n.physics,this.physics.options),$e(n.global,this.canvas.options),$e(n.global,this.options),this.configurator.setModuleOptions(n)}t.clickToUse!==void 0?t.clickToUse===!0?this.activator===void 0&&(this.activator=new Kce(this.canvas.frame),this.activator.on("change",function(){i.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")}};z.prototype._updateVisibleIndices=function(){var t=this.body.nodes,i=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&!this.clustering._isClusteredNode(e)&&t[e].options.hidden===!1&&this.body.nodeIndices.push(t[e].id);for(var r in i)if(Object.prototype.hasOwnProperty.call(i,r)){var n=i[r],a=t[n.fromId],o=t[n.toId],s=a!==void 0&&o!==void 0,u=!this.clustering._isClusteredEdge(r)&&n.options.hidden===!1&&s&&a.options.hidden===!1&&o.options.hidden===!1;u&&this.body.edgeIndices.push(n.id)}};z.prototype.bindEventListeners=function(){var t=this;this.body.emitter.on("_dataChanged",function(){t.edgesHandler._updateState(),t.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",function(){t.clustering._updateState(),t._updateVisibleIndices(),t._updateValueRange(t.body.nodes),t._updateValueRange(t.body.edges),t.body.emitter.emit("startSimulation"),t.body.emitter.emit("_requestRedraw")})};z.prototype.setData=function(t){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),t&&t.dot&&(t.nodes||t.edges))throw new SyntaxError('Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.');if(this.setOptions(t&&t.options),t&&t.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 i=ohe(t.dot);this.setData(i);return}else if(t&&t.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=she(t.gephi);this.setData(e);return}else this.nodesHandler.setData(t&&t.nodes,!0),this.edgesHandler.setData(t&&t.edges,!0);this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")};z.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 t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&delete this.body.nodes[t];for(var i in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,i)&&delete this.body.edges[i];Ur(this.body.container)};z.prototype._updateValueRange=function(t){var i,e=void 0,r=void 0,n=0;for(i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var a=t[i].getValue();a!==void 0&&(e=e===void 0?a:Math.min(a,e),r=r===void 0?a:Math.max(a,r),n+=a)}if(e!==void 0&&r!==void 0)for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&t[i].setValueRange(e,r,n)};z.prototype.isActive=function(){return!this.activator||this.activator.active};z.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)};z.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)};z.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)};z.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)};z.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)};z.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)};z.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)};z.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)};z.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)};z.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)};z.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)};z.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)};z.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)};z.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)};z.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)};z.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)};z.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)};z.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)};z.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)};z.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)};z.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)};z.prototype.editNodeMode=function(){return console.warn("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)};z.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)};z.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)};z.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)};z.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)};z.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)};z.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)};z.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)};z.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)};z.prototype.getConnectedNodes=function(t){return this.body.nodes[t]!==void 0?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)};z.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)};z.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)};z.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)};z.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)};z.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)};z.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)};z.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)};z.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)};z.prototype.getNodeAt=function(){var t=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return t!==void 0&&t.id!==void 0?t.id:t};z.prototype.getEdgeAt=function(){var t=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return t!==void 0&&t.id!==void 0?t.id:t};z.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)};z.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)};z.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()};z.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)};z.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)};z.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)};z.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)};z.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)};z.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)};z.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)};z.prototype.getOptionsFromConfigurator=function(){var t={};return this.configurator&&(t=this.configurator.getOptions.apply(this.configurator)),t};const Y$e=ne("span",{op75:""},"Show pages",-1),X$e=ne("span",{op75:""},"Show layouts",-1),Q$e=ne("span",{op75:""},"Show workspace",-1),Z$e=ne("span",{op75:""},"Show node_modules",-1),J$e=ne("div",{"i-carbon-close":""},null,-1),ebe=ne("div",{"flex-auto":""},null,-1),tbe={relative:"","h-full":"","w-full":""},rbe=ne("div",{grid:"~ cols-[20px_1fr] items-center gap-y-1"},[ne("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-42b883":""}),ne("div",{op50:""}," Component "),ne("div",{"h-3":"","w-3":"","bg-hex-42b2b8":""}),ne("div",{op50:""}," Page "),ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 726 628","ml--1px":"","h-3":""},[ne("path",{fill:"#4256b8","stroke-width":"4",d:"M723 314 543 625.8H183L3 314 183 2.2h360L723 314z"})]),ne("div",{op50:""}," Layout "),ne("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b4b842":""}),ne("div",{op50:""}," Library Component "),ne("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b86542":""}),ne("div",{op50:""}," Unknown ")],-1),nbe={key:0,p4:"",pr10:"",pt4:"",flex:"~ col gap4"},ibe=Ui({__name:"ComponentsGraph",props:{components:null},setup(t){const i=t,e=Ea(),r=Ea(),n=sk(),a=Ea(),o=uk(),s=lk(),u=ck(),l=Ek(),{componentsGraphShowNodeModules:c,componentsGraphShowPages:h,componentsGraphShowLayouts:d,componentsGraphShowWorkspace:f}=y_(),v=Ea(),g=rn(()=>{const $=l.value||[];if(v.value){let y=function(_){!_||m.has(_)||(m.add(_),_.deps.forEach(S=>{y($.find(T=>T.id===S))}))};const m=new Set;return $.find(_=>_.id===a.value?.id),y(v.value),Array.from(m)}return $}),b=rn(()=>{const $=g.value.map(m=>{const _=i.components.find(A=>A.filePath===m.id),S=o.value?.find(A=>A.file===m.id),T=u.value?.find(A=>A.file===m.id),O=m.id.replace(/\?.*$/,"").replace(/\#.*$/,""),w=m.id.includes("/node_modules/")?"lib":_?"user":T?"layout":S?"page":"unknown";if(!c.value&&w==="lib"||!h.value&&w==="page"||!d.value&&w==="layout"||!f.value&&w==="user"&&s.value&&!m.id.startsWith(s.value.rootDir))return null;const E=w==="layout"?"hexagon":w==="page"?"square":"dot";return{id:m.id,label:O.split("/").splice(-1)[0].replace(/\.\w+$/,""),group:w,shape:E,size:15+Math.min(m.deps.length/2,8),font:{color:n.value==="dark"?"white":"black"},color:v.value?.id===m.id?"#82c742":void 0,extra:{id:m.id,component:_,page:S,layout:T,relationship:m}}}).filter(m=>!!m),y=g.value.flatMap(m=>m.deps.map(_=>({from:m.id,to:_,arrows:{to:{enabled:!0,scaleFactor:.8}}})));return{nodes:$,edges:y}});hk(()=>{const $={nodes:{shape:"dot",size:16},physics:{repulsion:{centralGravity:.7,springLength:100,springConstant:.01},maxVelocity:146,solver:"forceAtlas2Based",timestep:.35,stabilization:{enabled:!0,iterations:200}},groups:{user:{color:"#42b883"},unknown:{color:"#b86542"},lib:{color:"#b4b842"},page:{color:"#42b2b8"},layout:{color:"#4256b8"}}},y=new z(e.value,b.value,$);y.on("click",m=>{const _=m.nodes?.[0],S=b.value.nodes?.find(T=>T.id===_)?.extra;S&&(a.value=S)}),dk(b,()=>{y.setData(b.value)})});function p(){v.value=a.value?.relationship,a.value=void 0}return($,y)=>{const m=Ok,_=m_,S=fk,T=E_,O=vk,w=xk;return fe(),lt(Vr,null,[Ve(_,{ref_key:"navbar",ref:r,absolute:"","left-0":"","right-0":"","top-0":""},{search:at(()=>[Ve(m,{modelValue:Z(h),"onUpdate:modelValue":y[0]||(y[0]=E=>Sa(h)?h.value=E:null),n:"primary sm"},{default:at(()=>[Y$e]),_:1},8,["modelValue"]),Ve(m,{modelValue:Z(d),"onUpdate:modelValue":y[1]||(y[1]=E=>Sa(d)?d.value=E:null),n:"primary sm"},{default:at(()=>[X$e]),_:1},8,["modelValue"]),Ve(m,{modelValue:Z(f),"onUpdate:modelValue":y[2]||(y[2]=E=>Sa(f)?f.value=E:null),n:"primary sm"},{default:at(()=>[Q$e]),_:1},8,["modelValue"]),Ve(m,{modelValue:Z(c),"onUpdate:modelValue":y[3]||(y[3]=E=>Sa(c)?c.value=E:null),n:"primary sm"},{default:at(()=>[Z$e]),_:1},8,["modelValue"]),Z(v)?(fe(),lt("button",{key:0,flex:"~ gap-1","items-center":"","rounded-full":"","bg-gray:20":"",py1:"",pl3:"",pr2:"","text-xs":"",op50:"","hover:op100":"",onClick:y[4]||(y[4]=E=>v.value=void 0)},[ja(" Clear filter "),J$e])):Qt("",!0),ebe,Vu($.$slots,"default")]),_:3},512),ne("div",tbe,[ne("div",{ref_key:"container",ref:e,"h-full":"","w-full":""},null,512),Ve(S,{absolute:"","bottom-3":"","left-3":"","border-0":"",p2:"",px3:"","text-sm":"","glass-effect":""},{default:at(()=>[rbe]),_:1}),Ve(w,{"model-value":!!(Z(a)&&Z(a).component),navbar:Z(r),"w-80":"",onClose:y[6]||(y[6]=E=>a.value=void 0)},{default:at(()=>[Z(a)&&Z(a).component?(fe(),lt("div",nbe,[Ve(T,{component:Z(a).component},null,8,["component"]),ne("div",null,[Ve(O,{n:"primary solid",onClick:y[5]||(y[5]=E=>p())},{default:at(()=>[ja(" Filter to this component ")]),_:1})])])):Qt("",!0)]),_:1},8,["model-value","navbar"])])],64)}}}),abe={hover:"bg-active",class:"group",flex:"~ gap2","w-full":"","items-center":"",rounded:"",px2:"",py1:""},obe={"hover:text-primary":""},sbe=Ui({__name:"ComponentItem",props:{component:null},setup(t){const i=t,e=rn(()=>i.component.filePath||i.component.file||i.component.__file||"");return(r,n)=>{const a=__,o=E_,s=pk("VDropdown"),u=$_,l=b_;return fe(),lt("div",abe,[Ve(s,null,{popper:at(()=>[Ve(o,{component:t.component,p4:""},null,8,["component"])]),default:at(()=>[ne("button",obe,[Ve(a,{component:t.component},null,8,["component"])])]),_:1}),t.component.global?(fe(),$t(u,{key:0,"bg-green-400:10":"","text-green-400":"",title:"Registered at runtime as a global component",textContent:"runtime"})):Qt("",!0),Vu(r.$slots,"default"),Z(e)?(fe(),$t(l,{key:1,filepath:Z(e),"text-sm":"",op25:"","group-hover:op75":""},null,8,["filepath"])):Qt("",!0)])}}}),ube={pl4:""},lbe=Ui({__name:"ComponentsList",props:{components:null},setup(t){const i=t,e=Ea(""),r=rn(()=>new gk(i.components,{keys:["pascalName","filePath","kebabName"]})),n=rn(()=>{const a=[],o=new Map,s=[],u=[],l={user:0,lib:0,builtin:0,runtime:0};return(e.value?r.value.search(e.value).map(h=>h.item):i.components).forEach(h=>{if(h.filePath&&yk(h.filePath)){const d=mk(h.filePath);if(!d)return;d==="nuxt"?(s.push(h),l.builtin++):(o.has(d)||o.set(d,[]),o.get(d).push(h),l.lib++)}else h.global&&!h.filePath?(u.push(h),l.runtime++):(a.push(h),l.user++)}),{count:l,user:a,builtin:s,lib:o,runtime:u}});return(a,o)=>{const s=m_,u=sbe,l=Pk,c=kk;return fe(),lt(Vr,null,[Ve(s,{search:Z(e),"onUpdate:search":o[0]||(o[0]=h=>Sa(e)?e.value=h:null)},{actions:at(()=>[Vu(a.$slots,"default")]),_:3},8,["search"]),Z(n).user.length?(fe(),$t(l,{key:0,icon:"carbon-nominal",text:"User components",open:Z(n).user.length<=("DETAILS_MAX_ITEMS"in a?a.DETAILS_MAX_ITEMS:Z(jl)),description:`Total components: ${Z(n).count.user}`},{default:at(()=>[(fe(!0),lt(Vr,null,pa(Z(n).user,h=>(fe(),$t(u,{key:h.filePath,component:h},null,8,["component"]))),128))]),_:1},8,["open","description"])):Qt("",!0),Z(n).runtime.length?(fe(),$t(l,{key:1,icon:"carbon-load-balancer-global",open:Z(n).runtime.length<=("DETAILS_MAX_ITEMS"in a?a.DETAILS_MAX_ITEMS:Z(jl)),text:"Runtime components",description:`Total components: ${Z(n).count.runtime}`},{default:at(()=>[(fe(!0),lt(Vr,null,pa(Z(n).runtime,h=>(fe(),$t(u,{key:h.filePath,component:h},null,8,["component"]))),128))]),_:1},8,["open","description"])):Qt("",!0),Z(n).builtin.length?(fe(),$t(l,{key:2,icon:"simple-icons-nuxtdotjs",text:"Built-in components",description:`Total components: ${Z(n).count.builtin}`},{default:at(()=>[(fe(!0),lt(Vr,null,pa(Z(n).builtin,h=>(fe(),$t(u,{key:h.filePath,component:h},null,8,["component"]))),128))]),_:1},8,["description"])):Qt("",!0),Z(n).lib.size?(fe(),$t(l,{key:3,open:Z(n).count.lib<=("DETAILS_MAX_ITEMS"in a?a.DETAILS_MAX_ITEMS:Z(jl)),icon:"carbon-3d-mpr-toggle",text:"Components from libraries",description:`${Z(n).count.lib} components from ${Z(n).lib.size} packages`},{default:at(()=>[(fe(!0),lt(Vr,null,pa(Z(n).lib.entries(),([h,d])=>(fe(),lt("div",{key:h,"ml-2":""},[Ve(c,{text:`${h} (${d.length})`,py1:"",op50:""},null,8,["text"]),ne("div",ube,[(fe(!0),lt(Vr,null,pa(d,f=>(fe(),$t(u,{key:f.filePath,component:f},null,8,["component"]))),128))])]))),128))]),_:1},8,["open","description"])):Qt("",!0)],64)}}}),cbe={relative:"","h-full":"","of-auto":""},hbe={"flex-none":"",flex:"~ gap3"},Obe=Ui({__name:"components",setup(t){const i=$k(),e=bk(),r=Sk(),{componentsView:n}=y_();function a(){i.value?.inspector?.instance&&(i.value.inspector.enable(),e.push("/__inspecting"))}function o(){n.value=n.value==="list"?"graph":"list"}return(s,u)=>{const l=g_,c=Mk,h=_k;return fe(),lt(Vr,null,[ne("div",cbe,[(fe(),$t(wk(Z(n)==="list"?lbe:ibe),{components:Z(r)},{default:at(()=>[ne("div",hbe,[Ve(l,{"text-lg":"",icon:Z(n)==="graph"?"i-carbon-list":"i-carbon-network-4",title:"Toggle view",onClick:o},null,8,["icon"]),Z(i)?.inspector?.instance?(fe(),$t(l,{key:0,"text-lg":"",icon:"i-carbon-select-window",title:"Inspect Vue components",onClick:a})):Qt("",!0)])]),_:1},8,["components"]))]),Ve(h,null,{default:at(()=>[Ve(c)]),_:1})],64)}}});export{Obe as default};