@nuxt/devtools 4.0.0-alpha.10 → 4.0.0-alpha.11
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.
- package/README.md +2 -0
- package/dist/chunks/analyze-build.mjs +1 -2
- package/dist/chunks/code-server.mjs +1 -2
- package/dist/chunks/data-inspector.mjs +82 -0
- package/dist/chunks/module-main.mjs +24 -94
- package/dist/chunks/vite-inspect.mjs +1 -2
- package/dist/client/200.html +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/__blank-ki8oaugs.js +1 -0
- package/dist/client/_nuxt/analyze-build-ne41xjd4.js +1 -0
- package/dist/client/_nuxt/{assets-fyld29gf.js → assets-f8xklgq9.js} +2 -2
- package/dist/client/_nuxt/{auth-required-panel-mm5lidl3.js → auth-required-panel-hlhmg87z.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/491c94f8-60b1-4f88-a55c-3cb1bf18dd79.json +1 -0
- package/dist/client/_nuxt/cd81saaa.js +2 -0
- package/dist/client/_nuxt/{client-botfq0nw.js → client-iet3i2jx.js} +1 -1
- package/dist/client/_nuxt/code-diff-f21wjzw6.js +8 -0
- package/dist/client/_nuxt/code-snippets-e28cw1b6.js +1 -0
- package/dist/client/_nuxt/{components-k5rsm3c3.js → components-o6uyjkn7.js} +1 -1
- package/dist/client/_nuxt/{composable-item-o8crh7o9.js → composable-item-ocorhvb4.js} +1 -1
- package/dist/client/_nuxt/composables-li5sexni.js +1 -0
- package/dist/client/_nuxt/{custom-_name_-j6w4b10b.js → custom-_name_-m5d1q22j.js} +1 -1
- package/dist/client/_nuxt/{data-schema-button-j2dsypzz.js → data-schema-button-kil5d35s.js} +1 -1
- package/dist/client/_nuxt/{data-schema-drawer-9s1351p5.js → data-schema-drawer-pb9ef6ns.js} +1 -1
- package/dist/client/_nuxt/{debug-muupfuzb.js → debug-nrr1l0ts.js} +1 -1
- package/dist/client/_nuxt/{default-k6jiq1wt.js → default-m4s11ttb.js} +1 -1
- package/dist/client/_nuxt/dialog-loe55arg.js +1 -0
- package/dist/client/_nuxt/dist-gklva25a.js +1 -0
- package/dist/client/_nuxt/{duration-display-kup58tqe.js → duration-display-fjuy04uz.js} +1 -1
- package/dist/client/_nuxt/{editor-bzxz1rcq.js → editor-eakm7xzk.js} +1 -1
- package/dist/client/_nuxt/{error-404-25vom0cq.js → error-404-nauqrial.js} +1 -1
- package/dist/client/_nuxt/error-404.css-k0vnbfeq.css +1 -0
- package/dist/client/_nuxt/{error-500-htafeoa3.js → error-500-h4c50p0t.js} +1 -1
- package/dist/client/_nuxt/error-500.css-lhh2zs4d.css +1 -0
- package/dist/client/_nuxt/{error-lj28vdr1.js → error-nukkk3mr.js} +1 -1
- package/dist/client/_nuxt/{filepath-item-jdy5gc4m.js → filepath-item-l8m3u23m.js} +1 -1
- package/dist/client/_nuxt/full-kcw32vsy.js +1 -0
- package/dist/client/_nuxt/fuse-ipb957gg.js +1 -0
- package/dist/client/_nuxt/{help-fab-ll6mbhgs.js → help-fab-ccbj2zxc.js} +1 -1
- package/dist/client/_nuxt/{hooks-hgffr865.js → hooks-d7ream10.js} +1 -1
- package/dist/client/_nuxt/{imports-i2fnwttt.js → imports-eqmikopw.js} +1 -1
- package/dist/client/_nuxt/{launch-page-ksxhzp2z.js → launch-page-l2e581he.js} +1 -1
- package/dist/client/_nuxt/modules-j9bs520l.js +1 -0
- package/dist/client/_nuxt/nbadge-n73p68uz.js +1 -0
- package/dist/client/_nuxt/{nbutton-mtj8qzr9.js → nbutton-np26z5og.js} +1 -1
- package/dist/client/_nuxt/ncard-kyrmtdmn.js +1 -0
- package/dist/client/_nuxt/{ncheckbox-mksfz5p0.js → ncheckbox-hmazj87n.js} +1 -1
- package/dist/client/_nuxt/{ncode-block-pfi5niis.js → ncode-block-ltlsxf5u.js} +1 -1
- package/dist/client/_nuxt/ndialog-mpi6dkdo.js +3 -0
- package/dist/client/_nuxt/{ndrawer-h46qfenr.js → ndrawer-hw8gqgye.js} +1 -1
- package/dist/client/_nuxt/{ndropdown-ow0z3stn.js → ndropdown-l76w9qwv.js} +1 -1
- package/dist/client/_nuxt/nicon-co5pnhft.js +4 -0
- package/dist/client/_nuxt/{nicon-title-e2gzkzl3.js → nicon-title-ejbxuupx.js} +1 -1
- package/dist/client/_nuxt/{nlink-j55iyj5x.js → nlink-h3jrz76l.js} +1 -1
- package/dist/client/_nuxt/{nloading-k4sy0f8c.js → nloading-lhpm96ki.js} +1 -1
- package/dist/client/_nuxt/{nmarkdown-mnxob7ua.js → nmarkdown-7qnv8atx.js} +1 -1
- package/dist/client/_nuxt/{nnavbar-dwxbkqvw.js → nnavbar-g38amume.js} +1 -1
- package/dist/client/_nuxt/none-ju85xmqv.js +1 -0
- package/dist/client/_nuxt/npanel-grids-fa3ah9jo.js +1 -0
- package/dist/client/_nuxt/npm-napoklx5.js +1 -0
- package/dist/client/_nuxt/{nsection-block-cb29dqkc.js → nsection-block-kzcj1vk3.js} +1 -1
- package/dist/client/_nuxt/{nselect-glgbbae4.js → nselect-md65qzv8.js} +1 -1
- package/dist/client/_nuxt/{nselect-tabs-jzyd56a1.js → nselect-tabs-brv0wfuv.js} +1 -1
- package/dist/client/_nuxt/{nsplit-pane-b5ki4jwa.js → nsplit-pane-bs5dfe16.js} +1 -1
- package/dist/client/_nuxt/{ntext-input-lzyyx3ym.js → ntext-input-obq09i2s.js} +1 -1
- package/dist/client/_nuxt/{ntip-oohvtkqd.js → ntip-nv65xhm1.js} +1 -1
- package/dist/client/_nuxt/{nuxt-f4tmbbs7.js → nuxt-hj3jyofn.js} +1 -1
- package/dist/client/_nuxt/{nuxt-link-dgri2bli.js → nuxt-link-nsgkom6k.js} +1 -1
- package/dist/client/_nuxt/{nuxt-logo-gzcu6lh0.js → nuxt-logo-dead1uws.js} +1 -1
- package/dist/client/_nuxt/{open-graph-mc8dh9qn.js → open-graph-d1iodawb.js} +1 -1
- package/dist/client/_nuxt/{overview-lpfgamus.js → overview-cbabgv3v.js} +1 -1
- package/dist/client/_nuxt/{pages-bv99uu3p.js → pages-oi6j0pbk.js} +1 -1
- package/dist/client/_nuxt/{payload-k2hrsm04.js → payload-ie12v3te.js} +1 -1
- package/dist/client/_nuxt/{plugins-ljid8ktq.js → plugins-20xi1djl.js} +1 -1
- package/dist/client/_nuxt/ready-ikhds7hc.js +2 -0
- package/dist/client/_nuxt/rolldown-runtime-f96lzs6p.js +1 -0
- package/dist/client/_nuxt/{runtime-configs-lvgzbcdu.js → runtime-configs-fq4qn3y8.js} +1 -1
- package/dist/client/_nuxt/{server-route-inputs-iwv9ewrw.js → server-route-inputs-c90qumt8.js} +1 -1
- package/dist/client/_nuxt/{server-routes-mkqbltfh.js → server-routes-mcizq24b.js} +1 -1
- package/dist/client/_nuxt/server-tasks-cicwbkvm.js +1 -0
- package/dist/client/_nuxt/{settings-ngc5p8qn.js → settings-noeex3c7.js} +1 -1
- package/dist/client/_nuxt/{stacktrace-list-chmjyp53.js → stacktrace-list-gmhj3wmk.js} +1 -1
- package/dist/client/_nuxt/{state-commands-f4h87cfl.js → state-commands-bzr47er3.js} +1 -1
- package/dist/client/_nuxt/{state-components-jymg7dj7.js → state-components-jvq23n80.js} +1 -1
- package/dist/client/_nuxt/state-editor-h7d9pjpa.js +1 -0
- package/dist/client/_nuxt/{state-modules-bewlxq5o.js → state-modules-fie7gkqb.js} +1 -1
- package/dist/client/_nuxt/{state-routes-f5cna95h.js → state-routes-ntw79bv6.js} +1 -1
- package/dist/client/_nuxt/state-schema-eifqm6o4.js +1 -0
- package/dist/client/_nuxt/{state-tabs-m7neqayd.js → state-tabs-dhcec3o6.js} +1 -1
- package/dist/client/_nuxt/storage-m9yh2hjt.js +1 -0
- package/dist/client/_nuxt/{tab-icon-nktg799o.js → tab-icon-bw4o7q2t.js} +1 -1
- package/dist/client/_nuxt/telemetry-mienojg2.js +1 -0
- package/dist/client/_nuxt/{timeline-o9hhhb94.js → timeline-ce3m8i2h.js} +1 -1
- package/dist/client/_nuxt/unhead.dnki-vlv7-jmz34zx6.js +1 -0
- package/dist/client/_nuxt/{unocss-runtime-bjggyd5e.js → unocss-runtime-htk43m9c.js} +1 -1
- package/dist/client/_nuxt/utils-d6zq4cvn.js +1 -0
- package/dist/client/_nuxt/vendor/json-editor-vue-h1waqukq.js +3862 -0
- package/dist/client/_nuxt/vendor/{markdown-exit-n4f1gsja.js → markdown-exit-nzr6hp55.js} +6 -6
- package/dist/client/_nuxt/vendor/quicktype-core-lz5bp16m.js +929 -0
- package/dist/client/_nuxt/vendor/shiki-g3svwmfz.js +152 -0
- package/dist/client/_nuxt/vendor/unocss-hvwio62w.js +3 -0
- package/dist/client/_nuxt/vendor/vis-bjkylbfi.js +30 -0
- package/dist/client/_nuxt/{virtual-files-kcs310xn.js → virtual-files-la0ohl9t.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/plugins/vite-devtools.client.js +5 -1
- package/dist/shared/{devtools.CCWq4fFE.mjs → devtools.BNZC-DT8.mjs} +1 -0
- package/package.json +23 -23
- package/dist/client/_nuxt/__blank-dil3nwfh.js +0 -1
- package/dist/client/_nuxt/analyze-build-2e03hfez.js +0 -1
- package/dist/client/_nuxt/builds/meta/dbb6f1eb-fdec-4078-b409-19d1ed6035a2.json +0 -1
- package/dist/client/_nuxt/code-diff-oxve94ak.js +0 -8
- package/dist/client/_nuxt/code-snippets-mcrkbsd4.js +0 -1
- package/dist/client/_nuxt/composables-ml69kqh9.js +0 -1
- package/dist/client/_nuxt/dialog-c7wnj3nl.js +0 -1
- package/dist/client/_nuxt/dist-d6zuldkp.js +0 -1
- package/dist/client/_nuxt/error-404.css-mpcol2vk.css +0 -1
- package/dist/client/_nuxt/error-500.css-273x0c3h.css +0 -1
- package/dist/client/_nuxt/full-gpj1mlf5.js +0 -1
- package/dist/client/_nuxt/fuse-blwyun20.js +0 -1
- package/dist/client/_nuxt/modules-dae72omf.js +0 -1
- package/dist/client/_nuxt/nbadge-oyy0wjng.js +0 -1
- package/dist/client/_nuxt/ncard-mtvdl2wf.js +0 -1
- package/dist/client/_nuxt/ndialog-dj1ywkc1.js +0 -3
- package/dist/client/_nuxt/nicon-obdu3k9r.js +0 -3
- package/dist/client/_nuxt/nju74r39.js +0 -2
- package/dist/client/_nuxt/none-md25735q.js +0 -1
- package/dist/client/_nuxt/npanel-grids-ga8arlvs.js +0 -1
- package/dist/client/_nuxt/npm-febdntx4.js +0 -1
- package/dist/client/_nuxt/ready-h6bi8le4.js +0 -1
- package/dist/client/_nuxt/rolldown-runtime-ln9q81id.js +0 -1
- package/dist/client/_nuxt/server-tasks-kbf4txeq.js +0 -1
- package/dist/client/_nuxt/state-editor-bg13n53w.js +0 -1
- package/dist/client/_nuxt/state-schema-espdew31.js +0 -1
- package/dist/client/_nuxt/storage-cep8dxy9.js +0 -1
- package/dist/client/_nuxt/telemetry-9f19c0i9.js +0 -1
- package/dist/client/_nuxt/unhead.dgx-hwv-uc-gaht5h60.js +0 -1
- package/dist/client/_nuxt/utils-bisj7255.js +0 -1
- package/dist/client/_nuxt/vendor/json-editor-vue-lmhxk84q.js +0 -3862
- package/dist/client/_nuxt/vendor/quicktype-core-b6sxxdgw.js +0 -929
- package/dist/client/_nuxt/vendor/shiki-abzmnals.js +0 -152
- package/dist/client/_nuxt/vendor/unocss-hqrnsbiy.js +0 -3
- package/dist/client/_nuxt/vendor/vis-i54ppuvk.js +0 -26
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var n={exports:{}},r={},i,a;function o(){if(a)return i;a=1;var t=function(e){return e&&e.Math===Math&&e};return i=t(typeof globalThis==`object`&&globalThis)||t(typeof window==`object`&&window)||t(typeof self==`object`&&self)||t(typeof e==`object`&&e)||t(typeof i==`object`&&i)||(function(){return this})()||Function(`return this`)(),i}var s,c;function l(){return c?s:(c=1,s=function(e){try{return!!e()}catch{return!0}},s)}var u,d;function f(){return d?u:(d=1,u=!l()(function(){var e=(function(){}).bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)}),u)}var p,m;function h(){if(m)return p;m=1;var e=f(),t=Function.prototype,n=t.apply,r=t.call;return p=typeof Reflect==`object`&&Reflect.apply||(e?r.bind(n):function(){return r.apply(n,arguments)}),p}var g,_;function v(){if(_)return g;_=1;var e=f(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return g=e?r:function(e){return function(){return n.apply(e,arguments)}},g}var y,b;function x(){if(b)return y;b=1;var e=v(),t=e({}.toString),n=e(``.slice);return y=function(e){return n(t(e),8,-1)},y}var S,C;function w(){if(C)return S;C=1;var e=x(),t=v();return S=function(n){if(e(n)===`Function`)return t(n)},S}var T,E;function D(){if(E)return T;E=1;var e=typeof document==`object`&&document.all;return T=e===void 0&&e!==void 0?function(t){return typeof t==`function`||t===e}:function(e){return typeof e==`function`},T}var ee={},te,O;function k(){return O?te:(O=1,te=!l()(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),te)}var ne,re;function A(){if(re)return ne;re=1;var e=f(),t=Function.prototype.call;return ne=e?t.bind(t):function(){return t.apply(t,arguments)},ne}var ie={},ae;function oe(){if(ae)return ie;ae=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor;return ie.f=t&&!e.call({1:2},1)?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,ie}var se,ce;function le(){return ce?se:(ce=1,se=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},se)}var ue,de;function fe(){if(de)return ue;de=1;var e=v(),t=l(),n=x(),r=Object,i=e(``.split);return ue=t(function(){return!r(`z`).propertyIsEnumerable(0)})?function(e){return n(e)===`String`?i(e,``):r(e)}:r,ue}var pe,me;function he(){return me?pe:(me=1,pe=function(e){return e==null},pe)}var ge,_e;function j(){if(_e)return ge;_e=1;var e=he(),t=TypeError;return ge=function(n){if(e(n))throw new t(`Can't call method on `+n);return n},ge}var ve,ye;function be(){if(ye)return ve;ye=1;var e=fe(),t=j();return ve=function(n){return e(t(n))},ve}var xe,Se;function Ce(){if(Se)return xe;Se=1;var e=D();return xe=function(t){return typeof t==`object`?t!==null:e(t)},xe}var we,Te;function M(){return Te?we:(Te=1,we={},we)}var Ee,De;function N(){if(De)return Ee;De=1;var e=M(),t=o(),n=D(),r=function(e){return n(e)?e:void 0};return Ee=function(n,i){return arguments.length<2?r(e[n])||r(t[n]):e[n]&&e[n][i]||t[n]&&t[n][i]},Ee}var Oe,ke;function Ae(){return ke?Oe:(ke=1,Oe=v()({}.isPrototypeOf),Oe)}var je,Me;function Ne(){if(Me)return je;Me=1;var e=o().navigator,t=e&&e.userAgent;return je=t?String(t):``,je}var Pe,Fe;function Ie(){if(Fe)return Pe;Fe=1;var e=o(),t=Ne(),n=e.process,r=e.Deno,i=n&&n.versions||r&&r.version,a=i&&i.v8,s,c;return a&&(s=a.split(`.`),c=s[0]>0&&s[0]<4?1:+(s[0]+s[1])),!c&&t&&(s=t.match(/Edge\/(\d+)/),(!s||s[1]>=74)&&(s=t.match(/Chrome\/(\d+)/),s&&(c=+s[1]))),Pe=c,Pe}var Le,Re;function ze(){if(Re)return Le;Re=1;var e=Ie(),t=l(),n=o().String;return Le=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol(`symbol detection`);return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Le}var Be,Ve;function He(){return Ve?Be:(Ve=1,Be=ze()&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,Be)}var Ue,We;function Ge(){if(We)return Ue;We=1;var e=N(),t=D(),n=Ae(),r=He(),i=Object;return Ue=r?function(e){return typeof e==`symbol`}:function(r){var a=e(`Symbol`);return t(a)&&n(a.prototype,i(r))},Ue}var Ke,qe;function Je(){if(qe)return Ke;qe=1;var e=String;return Ke=function(t){try{return e(t)}catch{return`Object`}},Ke}var Ye,Xe;function Ze(){if(Xe)return Ye;Xe=1;var e=D(),t=Je(),n=TypeError;return Ye=function(r){if(e(r))return r;throw new n(t(r)+` is not a function`)},Ye}var Qe,$e;function et(){if($e)return Qe;$e=1;var e=Ze(),t=he();return Qe=function(n,r){var i=n[r];return t(i)?void 0:e(i)},Qe}var tt,nt;function rt(){if(nt)return tt;nt=1;var e=A(),t=D(),n=Ce(),r=TypeError;return tt=function(i,a){var o,s;if(a===`string`&&t(o=i.toString)&&!n(s=e(o,i))||t(o=i.valueOf)&&!n(s=e(o,i))||a!==`string`&&t(o=i.toString)&&!n(s=e(o,i)))return s;throw new r(`Can't convert object to primitive value`)},tt}var it={exports:{}},at,ot;function st(){return ot?at:(ot=1,at=!0,at)}var ct,lt;function ut(){if(lt)return ct;lt=1;var e=o(),t=Object.defineProperty;return ct=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch{e[n]=r}return r},ct}var dt;function ft(){if(dt)return it.exports;dt=1;var e=st(),t=o(),n=ut(),r=`__core-js_shared__`,i=it.exports=t[r]||n(r,{});return(i.versions||=[]).push({version:`3.44.0`,mode:e?`pure`:`global`,copyright:`© 2014-2025 Denis Pushkarev (zloirock.ru)`,license:`https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE`,source:`https://github.com/zloirock/core-js`}),it.exports}var pt,mt;function ht(){if(mt)return pt;mt=1;var e=ft();return pt=function(t,n){return e[t]||(e[t]=n||{})},pt}var gt,_t;function vt(){if(_t)return gt;_t=1;var e=j(),t=Object;return gt=function(n){return t(e(n))},gt}var yt,bt;function xt(){if(bt)return yt;bt=1;var e=v(),t=vt(),n=e({}.hasOwnProperty);return yt=Object.hasOwn||function(e,r){return n(t(e),r)},yt}var St,Ct;function wt(){if(Ct)return St;Ct=1;var e=v(),t=0,n=Math.random(),r=e(1.1.toString);return St=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+r(++t+n,36)},St}var Tt,Et;function Dt(){if(Et)return Tt;Et=1;var e=o(),t=ht(),n=xt(),r=wt(),i=ze(),a=He(),s=e.Symbol,c=t(`wks`),l=a?s.for||s:s&&s.withoutSetter||r;return Tt=function(e){return n(c,e)||(c[e]=i&&n(s,e)?s[e]:l(`Symbol.`+e)),c[e]},Tt}var Ot,kt;function At(){if(kt)return Ot;kt=1;var e=A(),t=Ce(),n=Ge(),r=et(),i=rt(),a=Dt(),o=TypeError,s=a(`toPrimitive`);return Ot=function(a,c){if(!t(a)||n(a))return a;var l=r(a,s),u;if(l){if(c===void 0&&(c=`default`),u=e(l,a,c),!t(u)||n(u))return u;throw new o(`Can't convert object to primitive value`)}return c===void 0&&(c=`number`),i(a,c)},Ot}var jt,Mt;function Nt(){if(Mt)return jt;Mt=1;var e=At(),t=Ge();return jt=function(n){var r=e(n,`string`);return t(r)?r:r+``},jt}var Pt,Ft;function It(){if(Ft)return Pt;Ft=1;var e=o(),t=Ce(),n=e.document,r=t(n)&&t(n.createElement);return Pt=function(e){return r?n.createElement(e):{}},Pt}var Lt,Rt;function zt(){if(Rt)return Lt;Rt=1;var e=k(),t=l(),n=It();return Lt=!e&&!t(function(){return Object.defineProperty(n(`div`),"a",{get:function(){return 7}}).a!==7}),Lt}var Bt;function Vt(){if(Bt)return ee;Bt=1;var e=k(),t=A(),n=oe(),r=le(),i=be(),a=Nt(),o=xt(),s=zt(),c=Object.getOwnPropertyDescriptor;return ee.f=e?c:function(e,l){if(e=i(e),l=a(l),s)try{return c(e,l)}catch{}if(o(e,l))return r(!t(n.f,e,l),e[l])},ee}var Ht,Ut;function Wt(){if(Ut)return Ht;Ut=1;var e=l(),t=D(),n=/#|\.prototype\./,r=function(n,r){var c=a[i(n)];return c===s?!0:c===o?!1:t(r)?e(r):!!r},i=r.normalize=function(e){return String(e).replace(n,`.`).toLowerCase()},a=r.data={},o=r.NATIVE=`N`,s=r.POLYFILL=`P`;return Ht=r,Ht}var Gt,Kt;function qt(){if(Kt)return Gt;Kt=1;var e=w(),t=Ze(),n=f(),r=e(e.bind);return Gt=function(e,i){return t(e),i===void 0?e:n?r(e,i):function(){return e.apply(i,arguments)}},Gt}var Jt={},Yt,Xt;function Zt(){return Xt?Yt:(Xt=1,Yt=k()&&l()(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Yt)}var Qt,$t;function en(){if($t)return Qt;$t=1;var e=Ce(),t=String,n=TypeError;return Qt=function(r){if(e(r))return r;throw new n(t(r)+` is not an object`)},Qt}var tn;function nn(){if(tn)return Jt;tn=1;var e=k(),t=zt(),n=Zt(),r=en(),i=Nt(),a=TypeError,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=`enumerable`,l=`configurable`,u=`writable`;return Jt.f=e?n?function(e,t,n){if(r(e),t=i(t),r(n),typeof e==`function`&&t===`prototype`&&`value`in n&&u in n&&!n[u]){var a=s(e,t);a&&a[u]&&(e[t]=n.value,n={configurable:l in n?n[l]:a[l],enumerable:c in n?n[c]:a[c],writable:!1})}return o(e,t,n)}:o:function(e,n,s){if(r(e),n=i(n),r(s),t)try{return o(e,n,s)}catch{}if(`get`in s||`set`in s)throw new a(`Accessors not supported`);return`value`in s&&(e[n]=s.value),e},Jt}var rn,an;function on(){if(an)return rn;an=1;var e=k(),t=nn(),n=le();return rn=e?function(e,r,i){return t.f(e,r,n(1,i))}:function(e,t,n){return e[t]=n,e},rn}var sn,cn;function P(){if(cn)return sn;cn=1;var e=o(),t=h(),n=w(),r=D(),i=Vt().f,a=Wt(),s=M(),c=qt(),l=on(),u=xt(),d=function(e){var n=function(r,i,a){if(this instanceof n){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,i)}return new e(r,i,a)}return t(e,this,arguments)};return n.prototype=e.prototype,n};return sn=function(t,o){var f=t.target,p=t.global,m=t.stat,h=t.proto,g=p?e:m?e[f]:e[f]&&e[f].prototype,_=p?s:s[f]||l(s,f,{})[f],v=_.prototype,y,b,x,S,C,w,T,E,D;for(S in o)y=a(p?S:f+(m?`.`:`#`)+S,t.forced),b=!y&&g&&u(g,S),w=_[S],b&&(t.dontCallGetSet?(D=i(g,S),T=D&&D.value):T=g[S]),C=b&&T?T:o[S],!(!y&&!h&&typeof w==typeof C)&&(E=t.bind&&b?c(C,e):t.wrap&&b?d(C):h&&r(C)?n(C):C,(t.sham||C&&C.sham||w&&w.sham)&&l(E,`sham`,!0),l(_,S,E),h&&(x=f+`Prototype`,u(s,x)||l(s,x,{}),l(s[x],S,C),t.real&&v&&(y||!v[S])&&l(v,S,C)))},sn}var ln;function un(){if(ln)return r;ln=1;var e=P(),t=k(),n=nn().f;return e({target:`Object`,stat:!0,forced:Object.defineProperty!==n,sham:!t},{defineProperty:n}),r}var dn;function fn(){if(dn)return n.exports;dn=1,un();var e=M().Object,t=n.exports=function(t,n,r){return e.defineProperty(t,n,r)};return e.defineProperty.sham&&(t.sham=!0),n.exports}var pn,mn;function hn(){return mn?pn:(mn=1,pn=fn(),pn)}var gn,_n;function vn(){return _n?gn:(_n=1,gn=hn(),gn)}var yn,bn;function xn(){return bn?yn:(bn=1,yn=vn(),yn)}var Sn,Cn;function wn(){return Cn?Sn:(Cn=1,Sn=xn(),Sn)}var Tn=t(wn()),En={},Dn,On;function kn(){if(On)return Dn;On=1;var e=x();return Dn=Array.isArray||function(t){return e(t)===`Array`},Dn}var An,jn;function Mn(){if(jn)return An;jn=1;var e=Math.ceil,t=Math.floor;return An=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},An}var Nn,Pn;function Fn(){if(Pn)return Nn;Pn=1;var e=Mn();return Nn=function(t){var n=+t;return n!==n||n===0?0:e(n)},Nn}var In,Ln;function Rn(){if(Ln)return In;Ln=1;var e=Fn(),t=Math.min;return In=function(n){var r=e(n);return r>0?t(r,9007199254740991):0},In}var zn,Bn;function Vn(){if(Bn)return zn;Bn=1;var e=Rn();return zn=function(t){return e(t.length)},zn}var Hn,Un;function Wn(){if(Un)return Hn;Un=1;var e=TypeError,t=9007199254740991;return Hn=function(n){if(n>t)throw e(`Maximum allowed index exceeded`);return n},Hn}var Gn,Kn;function qn(){if(Kn)return Gn;Kn=1;var e=k(),t=nn(),n=le();return Gn=function(r,i,a){e?t.f(r,i,n(0,a)):r[i]=a},Gn}var Jn,Yn;function Xn(){if(Yn)return Jn;Yn=1;var e=Dt()(`toStringTag`),t={};return t[e]=`z`,Jn=String(t)===`[object z]`,Jn}var Zn,Qn;function $n(){if(Qn)return Zn;Qn=1;var e=Xn(),t=D(),n=x(),r=Dt()(`toStringTag`),i=Object,a=n(function(){return arguments}())===`Arguments`,o=function(e,t){try{return e[t]}catch{}};return Zn=e?n:function(e){var s,c,l;return e===void 0?`Undefined`:e===null?`Null`:typeof(c=o(s=i(e),r))==`string`?c:a?n(s):(l=n(s))===`Object`&&t(s.callee)?`Arguments`:l},Zn}var er,tr;function nr(){if(tr)return er;tr=1;var e=v(),t=D(),n=ft(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),er=n.inspectSource,er}var rr,ir;function ar(){if(ir)return rr;ir=1;var e=v(),t=l(),n=D(),r=$n(),i=N(),a=nr(),o=function(){},s=i(`Reflect`,`construct`),c=/^\s*(?:class|function)\b/,u=e(c.exec),d=!c.test(o),f=function(e){if(!n(e))return!1;try{return s(o,[],e),!0}catch{return!1}},p=function(e){if(!n(e))return!1;switch(r(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return d||!!u(c,a(e))}catch{return!0}};return p.sham=!0,rr=!s||t(function(){var e;return f(f.call)||!f(Object)||!f(function(){e=!0})||e})?p:f,rr}var or,sr;function cr(){if(sr)return or;sr=1;var e=kn(),t=ar(),n=Ce(),r=Dt()(`species`),i=Array;return or=function(a){var o;return e(a)&&(o=a.constructor,t(o)&&(o===i||e(o.prototype))?o=void 0:n(o)&&(o=o[r],o===null&&(o=void 0))),o===void 0?i:o},or}var lr,ur;function dr(){if(ur)return lr;ur=1;var e=cr();return lr=function(t,n){return new(e(t))(n===0?0:n)},lr}var fr,pr;function mr(){if(pr)return fr;pr=1;var e=l(),t=Dt(),n=Ie(),r=t(`species`);return fr=function(t){return n>=51||!e(function(){var e=[],n=e.constructor={};return n[r]=function(){return{foo:1}},e[t](Boolean).foo!==1})},fr}var hr;function gr(){if(hr)return En;hr=1;var e=P(),t=l(),n=kn(),r=Ce(),i=vt(),a=Vn(),o=Wn(),s=qn(),c=dr(),u=mr(),d=Dt(),f=Ie(),p=d(`isConcatSpreadable`),m=f>=51||!t(function(){var e=[];return e[p]=!1,e.concat()[0]!==e}),h=function(e){if(!r(e))return!1;var t=e[p];return t===void 0?n(e):!!t};return e({target:`Array`,proto:!0,arity:1,forced:!m||!u(`concat`)},{concat:function(e){var t=i(this),n=c(t,0),r=0,l,u,d,f,p;for(l=-1,d=arguments.length;l<d;l++)if(p=l===-1?t:arguments[l],h(p))for(f=a(p),o(r+f),u=0;u<f;u++,r++)u in p&&s(n,r,p[u]);else o(r+1),s(n,r++,p);return n.length=r,n}}),En}var _r={},vr={},yr,br;function xr(){if(br)return yr;br=1;var e=$n(),t=String;return yr=function(n){if(e(n)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return t(n)},yr}var Sr={},Cr,wr;function Tr(){if(wr)return Cr;wr=1;var e=Fn(),t=Math.max,n=Math.min;return Cr=function(r,i){var a=e(r);return a<0?t(a+i,0):n(a,i)},Cr}var Er,Dr;function Or(){if(Dr)return Er;Dr=1;var e=be(),t=Tr(),n=Vn(),r=function(r){return function(i,a,o){var s=e(i),c=n(s);if(c===0)return!r&&-1;var l=t(o,c),u;if(r&&a!==a){for(;c>l;)if(u=s[l++],u!==u)return!0}else for(;c>l;l++)if((r||l in s)&&s[l]===a)return r||l||0;return!r&&-1}};return Er={includes:r(!0),indexOf:r(!1)},Er}var kr,Ar;function jr(){return Ar?kr:(Ar=1,kr={},kr)}var Mr,Nr;function Pr(){if(Nr)return Mr;Nr=1;var e=v(),t=xt(),n=be(),r=Or().indexOf,i=jr(),a=e([].push);return Mr=function(e,o){var s=n(e),c=0,l=[],u;for(u in s)!t(i,u)&&t(s,u)&&a(l,u);for(;o.length>c;)t(s,u=o[c++])&&(~r(l,u)||a(l,u));return l},Mr}var Fr,Ir;function Lr(){return Ir?Fr:(Ir=1,Fr=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],Fr)}var Rr,zr;function Br(){if(zr)return Rr;zr=1;var e=Pr(),t=Lr();return Rr=Object.keys||function(n){return e(n,t)},Rr}var Vr;function Hr(){if(Vr)return Sr;Vr=1;var e=k(),t=Zt(),n=nn(),r=en(),i=be(),a=Br();return Sr.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var o=i(t),s=a(t),c=s.length,l=0,u;c>l;)n.f(e,u=s[l++],o[u]);return e},Sr}var Ur,Wr;function Gr(){return Wr?Ur:(Wr=1,Ur=N()(`document`,`documentElement`),Ur)}var Kr,qr;function Jr(){if(qr)return Kr;qr=1;var e=ht(),t=wt(),n=e(`keys`);return Kr=function(e){return n[e]||(n[e]=t(e))},Kr}var Yr,Xr;function Zr(){if(Xr)return Yr;Xr=1;var e=en(),t=Hr(),n=Lr(),r=jr(),i=Gr(),a=It(),o=Jr(),s=`>`,c=`<`,l=`prototype`,u=`script`,d=o(`IE_PROTO`),f=function(){},p=function(e){return c+u+s+e+c+`/`+u+s},m=function(e){e.write(p(``)),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){var e=a(`iframe`),t=`java`+u+`:`,n;return e.style.display=`none`,i.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(p(`document.F=Object`)),n.close(),n.F},g,_=function(){try{g=new ActiveXObject(`htmlfile`)}catch{}_=typeof document<`u`?document.domain&&g?m(g):h():m(g);for(var e=n.length;e--;)delete _[l][n[e]];return _()};return r[d]=!0,Yr=Object.create||function(n,r){var i;return n===null?i=_():(f[l]=e(n),i=new f,f[l]=null,i[d]=n),r===void 0?i:t.f(i,r)},Yr}var Qr={},$r;function ei(){if($r)return Qr;$r=1;var e=Pr(),t=Lr().concat(`length`,`prototype`);return Qr.f=Object.getOwnPropertyNames||function(n){return e(n,t)},Qr}var ti={},ni,ri;function ii(){return ri?ni:(ri=1,ni=v()([].slice),ni)}var ai;function oi(){if(ai)return ti;ai=1;var e=x(),t=be(),n=ei().f,r=ii(),i=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(e){try{return n(e)}catch{return r(i)}};return ti.f=function(r){return i&&e(r)===`Window`?a(r):n(t(r))},ti}var si={},ci;function li(){return ci?si:(ci=1,si.f=Object.getOwnPropertySymbols,si)}var ui,di;function fi(){if(di)return ui;di=1;var e=on();return ui=function(t,n,r,i){return i&&i.enumerable?t[n]=r:e(t,n,r),t},ui}var pi,mi;function hi(){if(mi)return pi;mi=1;var e=nn();return pi=function(t,n,r){return e.f(t,n,r)},pi}var gi={},_i;function vi(){return _i?gi:(_i=1,gi.f=Dt(),gi)}var yi,bi;function xi(){if(bi)return yi;bi=1;var e=M(),t=xt(),n=vi(),r=nn().f;return yi=function(i){var a=e.Symbol||={};t(a,i)||r(a,i,{value:n.f(i)})},yi}var Si,Ci;function wi(){if(Ci)return Si;Ci=1;var e=A(),t=N(),n=Dt(),r=fi();return Si=function(){var i=t(`Symbol`),a=i&&i.prototype,o=a&&a.valueOf,s=n(`toPrimitive`);a&&!a[s]&&r(a,s,function(t){return e(o,this)},{arity:1})},Si}var Ti,Ei;function Di(){if(Ei)return Ti;Ei=1;var e=Xn(),t=$n();return Ti=e?{}.toString:function(){return`[object `+t(this)+`]`},Ti}var Oi,ki;function Ai(){if(ki)return Oi;ki=1;var e=Xn(),t=nn().f,n=on(),r=xt(),i=Di(),a=Dt()(`toStringTag`);return Oi=function(o,s,c,l){var u=c?o:o&&o.prototype;u&&(r(u,a)||t(u,a,{configurable:!0,value:s}),l&&!e&&n(u,`toString`,i))},Oi}var ji,Mi;function Ni(){if(Mi)return ji;Mi=1;var e=o(),t=D(),n=e.WeakMap;return ji=t(n)&&/native code/.test(String(n)),ji}var Pi,Fi;function Ii(){if(Fi)return Pi;Fi=1;var e=Ni(),t=o(),n=Ce(),r=on(),i=xt(),a=ft(),s=Jr(),c=jr(),l=`Object already initialized`,u=t.TypeError,d=t.WeakMap,f,p,m,h=function(e){return m(e)?p(e):f(e,{})},g=function(e){return function(t){var r;if(!n(t)||(r=p(t)).type!==e)throw new u(`Incompatible receiver, `+e+` required`);return r}};if(e||a.state){var _=a.state||=new d;_.get=_.get,_.has=_.has,_.set=_.set,f=function(e,t){if(_.has(e))throw new u(l);return t.facade=e,_.set(e,t),t},p=function(e){return _.get(e)||{}},m=function(e){return _.has(e)}}else{var v=s(`state`);c[v]=!0,f=function(e,t){if(i(e,v))throw new u(l);return t.facade=e,r(e,v,t),t},p=function(e){return i(e,v)?e[v]:{}},m=function(e){return i(e,v)}}return Pi={set:f,get:p,has:m,enforce:h,getterFor:g},Pi}var Li,Ri;function zi(){if(Ri)return Li;Ri=1;var e=qt(),t=v(),n=fe(),r=vt(),i=Vn(),a=dr(),o=t([].push),s=function(t){var s=t===1,c=t===2,l=t===3,u=t===4,d=t===6,f=t===7,p=t===5||d;return function(m,h,g,_){for(var v=r(m),y=n(v),b=i(y),x=e(h,g),S=0,C=_||a,w=s?C(m,b):c||f?C(m,0):void 0,T,E;b>S;S++)if((p||S in y)&&(T=y[S],E=x(T,S,v),t))if(s)w[S]=E;else if(E)switch(t){case 3:return!0;case 5:return T;case 6:return S;case 2:o(w,T)}else switch(t){case 4:return!1;case 7:o(w,T)}return d?-1:l||u?u:w}};return Li={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)},Li}var Bi;function Vi(){if(Bi)return vr;Bi=1;var e=P(),t=o(),n=A(),r=v(),i=st(),a=k(),s=ze(),c=l(),u=xt(),d=Ae(),f=en(),p=be(),m=Nt(),h=xr(),g=le(),_=Zr(),y=Br(),b=ei(),x=oi(),S=li(),C=Vt(),w=nn(),T=Hr(),E=oe(),D=fi(),ee=hi(),te=ht(),O=Jr(),ne=jr(),re=wt(),ie=Dt(),ae=vi(),se=xi(),ce=wi(),ue=Ai(),de=Ii(),fe=zi().forEach,pe=O(`hidden`),me=`Symbol`,he=`prototype`,ge=de.set,_e=de.getterFor(me),j=Object[he],ve=t.Symbol,ye=ve&&ve[he],xe=t.RangeError,Se=t.TypeError,Ce=t.QObject,we=C.f,Te=w.f,M=x.f,Ee=E.f,De=r([].push),N=te(`symbols`),Oe=te(`op-symbols`),ke=te(`wks`),je=!Ce||!Ce[he]||!Ce[he].findChild,Me=function(e,t,n){var r=we(j,t);r&&delete j[t],Te(e,t,n),r&&e!==j&&Te(j,t,r)},Ne=a&&c(function(){return _(Te({},`a`,{get:function(){return Te(this,`a`,{value:7}).a}})).a!==7})?Me:Te,Pe=function(e,t){var n=N[e]=_(ye);return ge(n,{type:me,tag:e,description:t}),a||(n.description=t),n},Fe=function(e,t,n){e===j&&Fe(Oe,t,n),f(e);var r=m(t);return f(n),u(N,r)?(n.enumerable?(u(e,pe)&&e[pe][r]&&(e[pe][r]=!1),n=_(n,{enumerable:g(0,!1)})):(u(e,pe)||Te(e,pe,g(1,_(null))),e[pe][r]=!0),Ne(e,r,n)):Te(e,r,n)},Ie=function(e,t){f(e);var r=p(t);return fe(y(r).concat(He(r)),function(t){(!a||n(Re,r,t))&&Fe(e,t,r[t])}),e},Le=function(e,t){return t===void 0?_(e):Ie(_(e),t)},Re=function(e){var t=m(e),r=n(Ee,this,t);return this===j&&u(N,t)&&!u(Oe,t)?!1:r||!u(this,t)||!u(N,t)||u(this,pe)&&this[pe][t]?r:!0},Be=function(e,t){var n=p(e),r=m(t);if(!(n===j&&u(N,r)&&!u(Oe,r))){var i=we(n,r);return i&&u(N,r)&&!(u(n,pe)&&n[pe][r])&&(i.enumerable=!0),i}},Ve=function(e){var t=M(p(e)),n=[];return fe(t,function(e){!u(N,e)&&!u(ne,e)&&De(n,e)}),n},He=function(e){var t=e===j,n=M(t?Oe:p(e)),r=[];return fe(n,function(e){u(N,e)&&(!t||u(j,e))&&De(r,N[e])}),r};return s||(ve=function(){if(d(ye,this))throw new Se(`Symbol is not a constructor`);var e=!arguments.length||arguments[0]===void 0?void 0:h(arguments[0]),r=re(e),i=function(e){var a=this===void 0?t:this;a===j&&n(i,Oe,e),u(a,pe)&&u(a[pe],r)&&(a[pe][r]=!1);var o=g(1,e);try{Ne(a,r,o)}catch(e){if(!(e instanceof xe))throw e;Me(a,r,o)}};return a&&je&&Ne(j,r,{configurable:!0,set:i}),Pe(r,e)},ye=ve[he],D(ye,`toString`,function(){return _e(this).tag}),D(ve,`withoutSetter`,function(e){return Pe(re(e),e)}),E.f=Re,w.f=Fe,T.f=Ie,C.f=Be,b.f=x.f=Ve,S.f=He,ae.f=function(e){return Pe(ie(e),e)},a&&(ee(ye,`description`,{configurable:!0,get:function(){return _e(this).description}}),i||D(j,`propertyIsEnumerable`,Re,{unsafe:!0}))),e({global:!0,constructor:!0,wrap:!0,forced:!s,sham:!s},{Symbol:ve}),fe(y(ke),function(e){se(e)}),e({target:me,stat:!0,forced:!s},{useSetter:function(){je=!0},useSimple:function(){je=!1}}),e({target:`Object`,stat:!0,forced:!s,sham:!a},{create:Le,defineProperty:Fe,defineProperties:Ie,getOwnPropertyDescriptor:Be}),e({target:`Object`,stat:!0,forced:!s},{getOwnPropertyNames:Ve}),ce(),ue(ve,me),ne[pe]=!0,vr}var Hi={},Ui,Wi;function Gi(){return Wi?Ui:(Wi=1,Ui=ze()&&!!Symbol.for&&!!Symbol.keyFor,Ui)}var Ki;function qi(){if(Ki)return Hi;Ki=1;var e=P(),t=N(),n=xt(),r=xr(),i=ht(),a=Gi(),o=i(`string-to-symbol-registry`),s=i(`symbol-to-string-registry`);return e({target:`Symbol`,stat:!0,forced:!a},{for:function(e){var i=r(e);if(n(o,i))return o[i];var a=t(`Symbol`)(i);return o[i]=a,s[a]=i,a}}),Hi}var Ji={},Yi;function Xi(){if(Yi)return Ji;Yi=1;var e=P(),t=xt(),n=Ge(),r=Je(),i=ht(),a=Gi(),o=i(`symbol-to-string-registry`);return e({target:`Symbol`,stat:!0,forced:!a},{keyFor:function(e){if(!n(e))throw TypeError(r(e)+` is not a symbol`);if(t(o,e))return o[e]}}),Ji}var Zi={},Qi,$i;function ea(){if($i)return Qi;$i=1;var e=v(),t=kn(),n=D(),r=x(),i=xr(),a=e([].push);return Qi=function(e){if(n(e))return e;if(t(e)){for(var o=e.length,s=[],c=0;c<o;c++){var l=e[c];typeof l==`string`?a(s,l):(typeof l==`number`||r(l)===`Number`||r(l)===`String`)&&a(s,i(l))}var u=s.length,d=!0;return function(e,n){if(d)return d=!1,n;if(t(this))return n;for(var r=0;r<u;r++)if(s[r]===e)return n}}},Qi}var ta;function na(){if(ta)return Zi;ta=1;var e=P(),t=N(),n=h(),r=A(),i=v(),a=l(),o=D(),s=Ge(),c=ii(),u=ea(),d=ze(),f=String,p=t(`JSON`,`stringify`),m=i(/./.exec),g=i(``.charAt),_=i(``.charCodeAt),y=i(``.replace),b=i(1.1.toString),x=/[\uD800-\uDFFF]/g,S=/^[\uD800-\uDBFF]$/,C=/^[\uDC00-\uDFFF]$/,w=!d||a(function(){var e=t(`Symbol`)(`stringify detection`);return p([e])!==`[null]`||p({a:e})!==`{}`||p(Object(e))!==`{}`}),T=a(function(){return p(`\udf06\ud834`)!==`"\\udf06\\ud834"`||p(`\udead`)!==`"\\udead"`}),E=function(e,t){var i=c(arguments),a=u(t);if(!(!o(a)&&(e===void 0||s(e))))return i[1]=function(e,t){if(o(a)&&(t=r(a,this,f(e),t)),!s(t))return t},n(p,null,i)},ee=function(e,t,n){var r=g(n,t-1),i=g(n,t+1);return m(S,e)&&!m(C,i)||m(C,e)&&!m(S,r)?`\\u`+b(_(e,0),16):e};return p&&e({target:`JSON`,stat:!0,arity:3,forced:w||T},{stringify:function(e,t,r){var i=c(arguments),a=n(w?E:p,null,i);return T&&typeof a==`string`?y(a,x,ee):a}}),Zi}var ra={},ia;function aa(){if(ia)return ra;ia=1;var e=P(),t=ze(),n=l(),r=li(),i=vt();return e({target:`Object`,stat:!0,forced:!t||n(function(){r.f(1)})},{getOwnPropertySymbols:function(e){var t=r.f;return t?t(i(e)):[]}}),ra}var oa;function sa(){return oa?_r:(oa=1,Vi(),qi(),Xi(),na(),aa(),_r)}var ca={},la;function ua(){return la?ca:(la=1,xi()(`asyncDispose`),ca)}var da={},fa;function pa(){return fa?da:(fa=1,xi()(`asyncIterator`),da)}var ma={},ha;function ga(){return ha?ma:(ha=1,xi()(`dispose`),ma)}var _a={},va;function ya(){return va?_a:(va=1,xi()(`hasInstance`),_a)}var ba={},xa;function Sa(){return xa?ba:(xa=1,xi()(`isConcatSpreadable`),ba)}var Ca={},wa;function Ta(){return wa?Ca:(wa=1,xi()(`iterator`),Ca)}var Ea={},Da;function Oa(){return Da?Ea:(Da=1,xi()(`match`),Ea)}var ka={},Aa;function ja(){return Aa?ka:(Aa=1,xi()(`matchAll`),ka)}var Ma={},Na;function Pa(){return Na?Ma:(Na=1,xi()(`replace`),Ma)}var Fa={},Ia;function La(){return Ia?Fa:(Ia=1,xi()(`search`),Fa)}var Ra={},za;function Ba(){return za?Ra:(za=1,xi()(`species`),Ra)}var Va={},Ha;function Ua(){return Ha?Va:(Ha=1,xi()(`split`),Va)}var Wa={},Ga;function Ka(){if(Ga)return Wa;Ga=1;var e=xi(),t=wi();return e(`toPrimitive`),t(),Wa}var qa={},Ja;function Ya(){if(Ja)return qa;Ja=1;var e=N(),t=xi(),n=Ai();return t(`toStringTag`),n(e(`Symbol`),`Symbol`),qa}var Xa={},Za;function Qa(){return Za?Xa:(Za=1,xi()(`unscopables`),Xa)}var $a={},eo;function to(){return eo?$a:(eo=1,Ai()(o().JSON,`JSON`,!0),$a)}var no,ro;function io(){return ro?no:(ro=1,gr(),sa(),ua(),pa(),ga(),ya(),Sa(),Ta(),Oa(),ja(),Pa(),La(),Ba(),Ua(),Ka(),Ya(),Qa(),to(),no=M().Symbol,no)}var ao={},oo,so;function co(){return so?oo:(so=1,oo=function(){},oo)}var lo,uo;function fo(){return uo?lo:(uo=1,lo={},lo)}var po,mo;function ho(){if(mo)return po;mo=1;var e=k(),t=xt(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,i=t(n,`name`);return po={EXISTS:i,PROPER:i&&(function(){}).name===`something`,CONFIGURABLE:i&&(!e||e&&r(n,`name`).configurable)},po}var go,_o;function vo(){return _o?go:(_o=1,go=!l()(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),go)}var yo,bo;function xo(){if(bo)return yo;bo=1;var e=xt(),t=D(),n=vt(),r=Jr(),i=vo(),a=r(`IE_PROTO`),o=Object,s=o.prototype;return yo=i?o.getPrototypeOf:function(r){var i=n(r);if(e(i,a))return i[a];var c=i.constructor;return t(c)&&i instanceof c?c.prototype:i instanceof o?s:null},yo}var So,Co;function wo(){if(Co)return So;Co=1;var e=l(),t=D(),n=Ce(),r=Zr(),i=xo(),a=fi(),o=Dt(),s=st(),c=o(`iterator`),u=!1,d,f,p;return[].keys&&(p=[].keys(),`next`in p?(f=i(i(p)),f!==Object.prototype&&(d=f)):u=!0),!n(d)||e(function(){var e={};return d[c].call(e)!==e})?d={}:s&&(d=r(d)),t(d[c])||a(d,c,function(){return this}),So={IteratorPrototype:d,BUGGY_SAFARI_ITERATORS:u},So}var To,Eo;function Do(){if(Eo)return To;Eo=1;var e=wo().IteratorPrototype,t=Zr(),n=le(),r=Ai(),i=fo(),a=function(){return this};return To=function(o,s,c,l){var u=s+` Iterator`;return o.prototype=t(e,{next:n(+!l,c)}),r(o,u,!1,!0),i[u]=a,o},To}var Oo,ko;function Ao(){if(ko)return Oo;ko=1;var e=v(),t=Ze();return Oo=function(n,r,i){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[i]))}catch{}},Oo}var jo,Mo;function No(){if(Mo)return jo;Mo=1;var e=Ce();return jo=function(t){return e(t)||t===null},jo}var Po,Fo;function Io(){if(Fo)return Po;Fo=1;var e=No(),t=String,n=TypeError;return Po=function(r){if(e(r))return r;throw new n(`Can't set `+t(r)+` as a prototype`)},Po}var Lo,Ro;function zo(){if(Ro)return Lo;Ro=1;var e=Ao(),t=Ce(),n=j(),r=Io();return Lo=Object.setPrototypeOf||(`__proto__`in{}?function(){var i=!1,a={},o;try{o=e(Object.prototype,`__proto__`,`set`),o(a,[]),i=a instanceof Array}catch{}return function(e,a){return n(e),r(a),t(e)&&(i?o(e,a):e.__proto__=a),e}}():void 0),Lo}var Bo,Vo;function Ho(){if(Vo)return Bo;Vo=1;var e=P(),t=A(),n=st(),r=ho(),i=D(),a=Do(),o=xo(),s=zo(),c=Ai(),l=on(),u=fi(),d=Dt(),f=fo(),p=wo(),m=r.PROPER,h=r.CONFIGURABLE,g=p.IteratorPrototype,_=p.BUGGY_SAFARI_ITERATORS,v=d(`iterator`),y=`keys`,b=`values`,x=`entries`,S=function(){return this};return Bo=function(r,d,p,C,w,T,E){a(p,d,C);var D=function(e){if(e===w&&ne)return ne;if(!_&&e&&e in O)return O[e];switch(e){case y:return function(){return new p(this,e)};case b:return function(){return new p(this,e)};case x:return function(){return new p(this,e)}}return function(){return new p(this)}},ee=d+` Iterator`,te=!1,O=r.prototype,k=O[v]||O[`@@iterator`]||w&&O[w],ne=!_&&k||D(w),re=d===`Array`&&O.entries||k,A,ie,ae;if(re&&(A=o(re.call(new r)),A!==Object.prototype&&A.next&&(!n&&o(A)!==g&&(s?s(A,g):i(A[v])||u(A,v,S)),c(A,ee,!0,!0),n&&(f[ee]=S))),m&&w===b&&k&&k.name!==b&&(!n&&h?l(O,`name`,b):(te=!0,ne=function(){return t(k,this)})),w)if(ie={values:D(b),keys:T?ne:D(y),entries:D(x)},E)for(ae in ie)(_||te||!(ae in O))&&u(O,ae,ie[ae]);else e({target:d,proto:!0,forced:_||te},ie);return(!n||E)&&O[v]!==ne&&u(O,v,ne,{name:w}),f[d]=ne,ie},Bo}var Uo,Wo;function Go(){return Wo?Uo:(Wo=1,Uo=function(e,t){return{value:e,done:t}},Uo)}var Ko,qo;function Jo(){if(qo)return Ko;qo=1;var e=be(),t=co(),n=fo(),r=Ii(),i=nn().f,a=Ho(),o=Go(),s=st(),c=k(),l=`Array Iterator`,u=r.set,d=r.getterFor(l);Ko=a(Array,`Array`,function(t,n){u(this,{type:l,target:e(t),index:0,kind:n})},function(){var e=d(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,o(void 0,!0);switch(e.kind){case`keys`:return o(n,!1);case`values`:return o(t[n],!1)}return o([n,t[n]],!1)},`values`);var f=n.Arguments=n.Array;if(t(`keys`),t(`values`),t(`entries`),!s&&c&&f.name!==`values`)try{i(f,`name`,{value:`values`})}catch{}return Ko}var Yo,Xo;function Zo(){return Xo?Yo:(Xo=1,Yo={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Yo)}var Qo;function $o(){if(Qo)return ao;Qo=1,Jo();var e=Zo(),t=o(),n=Ai(),r=fo();for(var i in e)n(t[i],i),r[i]=r.Array;return ao}var es,ts;function ns(){if(ts)return es;ts=1;var e=io();return $o(),es=e,es}var rs={},is;function as(){if(is)return rs;is=1;var e=Dt(),t=nn().f,n=e(`metadata`),r=Function.prototype;return r[n]===void 0&&t(r,n,{value:null}),rs}var os={},ss;function cs(){return ss?os:(ss=1,ua(),os)}var ls={},us;function ds(){return us?ls:(us=1,ga(),ls)}var fs={},ps;function ms(){return ps?fs:(ps=1,xi()(`metadata`),fs)}var hs,gs;function _s(){if(gs)return hs;gs=1;var e=ns();return as(),cs(),ds(),ms(),hs=e,hs}var vs={},ys,bs;function xs(){if(bs)return ys;bs=1;var e=N(),t=v(),n=e(`Symbol`),r=n.keyFor,i=t(n.prototype.valueOf);return ys=n.isRegisteredSymbol||function(e){try{return r(i(e))!==void 0}catch{return!1}},ys}var Ss;function Cs(){return Ss?vs:(Ss=1,P()({target:`Symbol`,stat:!0},{isRegisteredSymbol:xs()}),vs)}var ws={},Ts,Es;function Ds(){if(Es)return Ts;Es=1;for(var e=ht(),t=N(),n=v(),r=Ge(),i=Dt(),a=t(`Symbol`),o=a.isWellKnownSymbol,s=t(`Object`,`getOwnPropertyNames`),c=n(a.prototype.valueOf),l=e(`wks`),u=0,d=s(a),f=d.length;u<f;u++)try{var p=d[u];r(a[p])&&i(p)}catch{}return Ts=function(e){if(o&&o(e))return!0;try{for(var t=c(e),n=0,r=s(l),i=r.length;n<i;n++)if(l[r[n]]==t)return!0}catch{}return!1},Ts}var Os;function ks(){return Os?ws:(Os=1,P()({target:`Symbol`,stat:!0,forced:!0},{isWellKnownSymbol:Ds()}),ws)}var As={},js;function Ms(){return js?As:(js=1,xi()(`customMatcher`),As)}var Ns={},Ps;function Fs(){return Ps?Ns:(Ps=1,xi()(`observable`),Ns)}var Is={},Ls;function Rs(){return Ls?Is:(Ls=1,P()({target:`Symbol`,stat:!0,name:`isRegisteredSymbol`},{isRegistered:xs()}),Is)}var zs={},Bs;function Vs(){return Bs?zs:(Bs=1,P()({target:`Symbol`,stat:!0,name:`isWellKnownSymbol`,forced:!0},{isWellKnown:Ds()}),zs)}var Hs={},Us;function Ws(){return Us?Hs:(Us=1,xi()(`matcher`),Hs)}var Gs={},Ks;function qs(){return Ks?Gs:(Ks=1,xi()(`metadataKey`),Gs)}var Js={},Ys;function Xs(){return Ys?Js:(Ys=1,xi()(`patternMatch`),Js)}var Zs={},Qs;function $s(){return Qs?Zs:(Qs=1,xi()(`replaceAll`),Zs)}var ec,tc;function nc(){if(tc)return ec;tc=1;var e=_s();return Cs(),ks(),Ms(),Fs(),Rs(),Vs(),Ws(),qs(),Xs(),$s(),ec=e,ec}var rc,ic;function ac(){return ic?rc:(ic=1,rc=nc(),rc)}var oc=t(ac()),sc={},cc,lc;function uc(){if(lc)return cc;lc=1;var e=v(),t=Fn(),n=xr(),r=j(),i=e(``.charAt),a=e(``.charCodeAt),o=e(``.slice),s=function(e){return function(s,c){var l=n(r(s)),u=t(c),d=l.length,f,p;return u<0||u>=d?e?``:void 0:(f=a(l,u),f<55296||f>56319||u+1===d||(p=a(l,u+1))<56320||p>57343?e?i(l,u):f:e?o(l,u,u+2):(f-55296<<10)+(p-56320)+65536)}};return cc={codeAt:s(!1),charAt:s(!0)},cc}var dc;function fc(){if(dc)return sc;dc=1;var e=uc().charAt,t=xr(),n=Ii(),r=Ho(),i=Go(),a=`String Iterator`,o=n.set,s=n.getterFor(a);return r(String,`String`,function(e){o(this,{type:a,string:t(e),index:0})},function(){var t=s(this),n=t.string,r=t.index,a;return r>=n.length?i(void 0,!0):(a=e(n,r),t.index+=a.length,i(a,!1))}),sc}var pc,mc;function hc(){return mc?pc:(mc=1,Jo(),fc(),Ta(),pc=vi().f(`iterator`),pc)}var gc,_c;function vc(){if(_c)return gc;_c=1;var e=hc();return $o(),gc=e,gc}var yc,bc;function xc(){return bc?yc:(bc=1,yc=vc(),yc)}var Sc,Cc;function wc(){return Cc?Sc:(Cc=1,Sc=xc(),Sc)}var Tc,Ec;function Dc(){return Ec?Tc:(Ec=1,Tc=wc(),Tc)}var Oc=t(Dc());function kc(e){"@babel/helpers - typeof";return kc=typeof oc==`function`&&typeof Oc==`symbol`?function(e){return typeof e}:function(e){return e&&typeof oc==`function`&&e.constructor===oc&&e!==oc.prototype?`symbol`:typeof e},kc(e)}var Ac,jc;function Mc(){return jc?Ac:(jc=1,Ka(),Ac=vi().f(`toPrimitive`),Ac)}var Nc,Pc;function Fc(){return Pc?Nc:(Pc=1,Nc=Mc(),Nc)}var Ic,Lc;function Rc(){return Lc?Ic:(Lc=1,Ic=Fc(),Ic)}var zc,Bc;function Vc(){return Bc?zc:(Bc=1,zc=Rc(),zc)}var Hc,Uc;function Wc(){return Uc?Hc:(Uc=1,Hc=Vc(),Hc)}var Gc=t(Wc());function Kc(e,t){if(kc(e)!=`object`||!e)return e;var n=e[Gc];if(n!==void 0){var r=n.call(e,t);if(kc(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function qc(e){var t=Kc(e,`string`);return kc(t)==`symbol`?t:t+``}function Jc(e,t,n){return(t=qc(t))in e?Tn(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Yc={},Xc,Zc;function Qc(){if(Zc)return Xc;Zc=1;var e=v(),t=Ze(),n=Ce(),r=xt(),i=ii(),a=f(),o=Function,s=e([].concat),c=e([].join),l={},u=function(e,t,n){if(!r(l,t)){for(var i=[],a=0;a<t;a++)i[a]=`a[`+a+`]`;l[t]=o(`C,a`,`return new C(`+c(i,`,`)+`)`)}return l[t](e,n)};return Xc=a?o.bind:function(e){var r=t(this),a=r.prototype,o=i(arguments,1),c=function(){var t=s(o,i(arguments));return this instanceof c?u(r,t.length,t):r.apply(e,t)};return n(a)&&(c.prototype=a),c},Xc}var $c;function el(){if($c)return Yc;$c=1;var e=P(),t=Qc();return e({target:`Function`,proto:!0,forced:Function.bind!==t},{bind:t}),Yc}var tl,nl;function rl(){if(nl)return tl;nl=1;var e=o(),t=M();return tl=function(n,r){var i=t[n+`Prototype`],a=i&&i[r];if(a)return a;var o=e[n],s=o&&o.prototype;return s&&s[r]},tl}var il,al;function ol(){return al?il:(al=1,el(),il=rl()(`Function`,`bind`),il)}var sl,cl;function ll(){if(cl)return sl;cl=1;var e=Ae(),t=ol(),n=Function.prototype;return sl=function(r){var i=r.bind;return r===n||e(n,r)&&i===n.bind?t:i},sl}var ul,dl;function fl(){return dl?ul:(dl=1,ul=ll(),ul)}var pl,ml;function hl(){return ml?pl:(ml=1,pl=fl(),pl)}var gl=t(hl()),_l={},vl,yl;function bl(){if(yl)return vl;yl=1;var e=Ze(),t=vt(),n=fe(),r=Vn(),i=TypeError,a=`Reduce of empty array with no initial value`,o=function(o){return function(s,c,l,u){var d=t(s),f=n(d),p=r(d);if(e(c),p===0&&l<2)throw new i(a);var m=o?p-1:0,h=o?-1:1;if(l<2)for(;;){if(m in f){u=f[m],m+=h;break}if(m+=h,o?m<0:p<=m)throw new i(a)}for(;o?m>=0:p>m;m+=h)m in f&&(u=c(u,f[m],m,d));return u}};return vl={left:o(!1),right:o(!0)},vl}var xl,Sl;function Cl(){if(Sl)return xl;Sl=1;var e=l();return xl=function(t,n){var r=[][t];return!!r&&e(function(){r.call(null,n||function(){return 1},1)})},xl}var wl,Tl;function El(){if(Tl)return wl;Tl=1;var e=o(),t=Ne(),n=x(),r=function(e){return t.slice(0,e.length)===e};return wl=(function(){return r(`Bun/`)?`BUN`:r(`Cloudflare-Workers`)?`CLOUDFLARE`:r(`Deno/`)?`DENO`:r(`Node.js/`)?`NODE`:e.Bun&&typeof Bun.version==`string`?`BUN`:e.Deno&&typeof Deno.version==`object`?`DENO`:n(e.process)===`process`?`NODE`:e.window&&e.document?`BROWSER`:`REST`})(),wl}var Dl,Ol;function kl(){return Ol?Dl:(Ol=1,Dl=El()===`NODE`,Dl)}var Al;function jl(){if(Al)return _l;Al=1;var e=P(),t=bl().left,n=Cl(),r=Ie();return e({target:`Array`,proto:!0,forced:!kl()&&r>79&&r<83||!n(`reduce`)},{reduce:function(e){var n=arguments.length;return t(this,e,n,n>1?arguments[1]:void 0)}}),_l}var Ml,Nl;function Pl(){return Nl?Ml:(Nl=1,jl(),Ml=rl()(`Array`,`reduce`),Ml)}var Fl,Il;function Ll(){if(Il)return Fl;Il=1;var e=Ae(),t=Pl(),n=Array.prototype;return Fl=function(r){var i=r.reduce;return r===n||e(n,r)&&i===n.reduce?t:i},Fl}var Rl,zl;function Bl(){return zl?Rl:(zl=1,Rl=Ll(),Rl)}var Vl,Hl;function Ul(){return Hl?Vl:(Hl=1,Vl=Bl(),Vl)}var Wl=t(Ul()),Gl={},Kl;function ql(){if(Kl)return Gl;Kl=1;var e=P(),t=zi().filter;return e({target:`Array`,proto:!0,forced:!mr()(`filter`)},{filter:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),Gl}var Jl,Yl;function Xl(){return Yl?Jl:(Yl=1,ql(),Jl=rl()(`Array`,`filter`),Jl)}var Zl,Ql;function $l(){if(Ql)return Zl;Ql=1;var e=Ae(),t=Xl(),n=Array.prototype;return Zl=function(r){var i=r.filter;return r===n||e(n,r)&&i===n.filter?t:i},Zl}var eu,tu;function nu(){return tu?eu:(tu=1,eu=$l(),eu)}var ru,iu;function au(){return iu?ru:(iu=1,ru=nu(),ru)}var ou=t(au()),su={},cu;function lu(){if(cu)return su;cu=1;var e=P(),t=zi().map;return e({target:`Array`,proto:!0,forced:!mr()(`map`)},{map:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),su}var uu,du;function fu(){return du?uu:(du=1,lu(),uu=rl()(`Array`,`map`),uu)}var pu,mu;function hu(){if(mu)return pu;mu=1;var e=Ae(),t=fu(),n=Array.prototype;return pu=function(r){var i=r.map;return r===n||e(n,r)&&i===n.map?t:i},pu}var gu,_u;function vu(){return _u?gu:(_u=1,gu=hu(),gu)}var yu,bu;function xu(){return bu?yu:(bu=1,yu=vu(),yu)}var Su=t(xu()),Cu={},wu,Tu;function Eu(){if(Tu)return wu;Tu=1;var e=kn(),t=Vn(),n=Wn(),r=qt(),i=function(a,o,s,c,l,u,d,f){for(var p=l,m=0,h=d?r(d,f):!1,g,_;m<c;)m in s&&(g=h?h(s[m],m,o):s[m],u>0&&e(g)?(_=t(g),p=i(a,o,g,_,p,u-1)-1):(n(p+1),a[p]=g),p++),m++;return p};return wu=i,wu}var Du;function Ou(){if(Du)return Cu;Du=1;var e=P(),t=Eu(),n=Ze(),r=vt(),i=Vn(),a=dr();return e({target:`Array`,proto:!0},{flatMap:function(e){var o=r(this),s=i(o),c;return n(e),c=a(o,0),c.length=t(c,o,o,s,0,1,e,arguments.length>1?arguments[1]:void 0),c}}),Cu}var ku={},Au;function ju(){return Au?ku:(Au=1,co()(`flatMap`),ku)}var Mu,Nu;function Pu(){return Nu?Mu:(Nu=1,Ou(),ju(),Mu=rl()(`Array`,`flatMap`),Mu)}var Fu,Iu;function Lu(){if(Iu)return Fu;Iu=1;var e=Ae(),t=Pu(),n=Array.prototype;return Fu=function(r){var i=r.flatMap;return r===n||e(n,r)&&i===n.flatMap?t:i},Fu}var Ru,zu;function Bu(){return zu?Ru:(zu=1,Ru=Lu(),Ru)}var Vu,Hu;function Uu(){return Hu?Vu:(Hu=1,Vu=Bu(),Vu)}Uu();var Wu,Gu;function Ku(){return Gu?Wu:(Gu=1,Wu=ns(),Wu)}var qu=t(Ku()),Ju={},Yu;function Xu(){if(Yu)return Ju;Yu=1;var e=P(),t=kn(),n=ar(),r=Ce(),i=Tr(),a=Vn(),o=be(),s=qn(),c=Dt(),l=mr(),u=ii(),d=l(`slice`),f=c(`species`),p=Array,m=Math.max;return e({target:`Array`,proto:!0,forced:!d},{slice:function(e,c){var l=o(this),d=a(l),h=i(e,d),g=i(c===void 0?d:c,d),_,v,y;if(t(l)&&(_=l.constructor,n(_)&&(_===p||t(_.prototype))?_=void 0:r(_)&&(_=_[f],_===null&&(_=void 0)),_===p||_===void 0))return u(l,h,g);for(v=new(_===void 0?p:_)(m(g-h,0)),y=0;h<g;h++,y++)h in l&&s(v,y,l[h]);return v.length=y,v}}),Ju}var Zu,Qu;function $u(){return Qu?Zu:(Qu=1,Xu(),Zu=rl()(`Array`,`slice`),Zu)}var ed,td;function nd(){if(td)return ed;td=1;var e=Ae(),t=$u(),n=Array.prototype;return ed=function(r){var i=r.slice;return r===n||e(n,r)&&i===n.slice?t:i},ed}var rd,id;function ad(){return id?rd:(id=1,rd=nd(),rd)}var od,sd;function cd(){return sd?od:(sd=1,od=ad(),od)}var ld=t(cd()),ud={},dd,fd;function pd(){if(fd)return dd;fd=1;var e=N(),t=v(),n=ei(),r=li(),i=en(),a=t([].concat);return dd=e(`Reflect`,`ownKeys`)||function(e){var t=n.f(i(e)),o=r.f;return o?a(t,o(e)):t},dd}var md;function hd(){return md?ud:(md=1,P()({target:`Reflect`,stat:!0},{ownKeys:pd()}),ud)}var gd,_d;function vd(){return _d?gd:(_d=1,hd(),gd=M().Reflect.ownKeys,gd)}var yd,bd;function xd(){return bd?yd:(bd=1,yd=vd(),yd)}var Sd,Cd;function wd(){return Cd?Sd:(Cd=1,Sd=xd(),Sd)}var Td=t(wd()),Ed={},Dd;function Od(){return Dd?Ed:(Dd=1,P()({target:`Array`,stat:!0},{isArray:kn()}),Ed)}var kd,Ad;function jd(){return Ad?kd:(Ad=1,Od(),kd=M().Array.isArray,kd)}var Md,Nd;function Pd(){return Nd?Md:(Nd=1,Md=jd(),Md)}var Fd,Id;function Ld(){return Id?Fd:(Id=1,Fd=Pd(),Fd)}var Rd=t(Ld()),zd={},Bd;function Vd(){if(Bd)return zd;Bd=1;var e=P(),t=vt(),n=Br();return e({target:`Object`,stat:!0,forced:l()(function(){n(1)})},{keys:function(e){return n(t(e))}}),zd}var Hd,Ud;function Wd(){return Ud?Hd:(Ud=1,Vd(),Hd=M().Object.keys,Hd)}var Gd,Kd;function qd(){return Kd?Gd:(Kd=1,Gd=Wd(),Gd)}var Jd,Yd;function Xd(){return Yd?Jd:(Yd=1,Jd=qd(),Jd)}var Zd=t(Xd()),Qd={},$d,ef;function tf(){if(ef)return $d;ef=1;var e=zi().forEach;return $d=Cl()(`forEach`)?[].forEach:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)},$d}var nf;function rf(){if(nf)return Qd;nf=1;var e=P(),t=tf();return e({target:`Array`,proto:!0,forced:[].forEach!==t},{forEach:t}),Qd}var af,of;function sf(){return of?af:(of=1,rf(),af=rl()(`Array`,`forEach`),af)}var cf,lf;function uf(){return lf?cf:(lf=1,cf=sf(),cf)}var df,ff;function pf(){if(ff)return df;ff=1;var e=$n(),t=xt(),n=Ae(),r=uf(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return df=function(o){var s=o.forEach;return o===i||n(i,o)&&s===i.forEach||t(a,e(o))?r:s},df}var mf,hf;function gf(){return hf?mf:(hf=1,mf=pf(),mf)}var _f=t(gf()),vf={},yf;function bf(){if(yf)return vf;yf=1;var e=P(),t=v(),n=kn(),r=t([].reverse),i=[1,2];return e({target:`Array`,proto:!0,forced:String(i)===String(i.reverse())},{reverse:function(){return n(this)&&(this.length=this.length),r(this)}}),vf}var xf,Sf;function Cf(){return Sf?xf:(Sf=1,bf(),xf=rl()(`Array`,`reverse`),xf)}var wf,Tf;function Ef(){if(Tf)return wf;Tf=1;var e=Ae(),t=Cf(),n=Array.prototype;return wf=function(r){var i=r.reverse;return r===n||e(n,r)&&i===n.reverse?t:i},wf}var Df,Of;function kf(){return Of?Df:(Of=1,Df=Ef(),Df)}var Af,jf;function Mf(){return jf?Af:(jf=1,Af=kf(),Af)}var Nf=t(Mf()),Pf={},Ff,If;function Lf(){if(If)return Ff;If=1;var e=k(),t=kn(),n=TypeError,r=Object.getOwnPropertyDescriptor;return Ff=e&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,i){if(t(e)&&!r(e,`length`).writable)throw new n(`Cannot set read only .length`);return e.length=i}:function(e,t){return e.length=t},Ff}var Rf,zf;function Bf(){if(zf)return Rf;zf=1;var e=Je(),t=TypeError;return Rf=function(n,r){if(!delete n[r])throw new t(`Cannot delete property `+e(r)+` of `+e(n))},Rf}var Vf;function Hf(){if(Vf)return Pf;Vf=1;var e=P(),t=vt(),n=Tr(),r=Fn(),i=Vn(),a=Lf(),o=Wn(),s=dr(),c=qn(),l=Bf(),u=mr()(`splice`),d=Math.max,f=Math.min;return e({target:`Array`,proto:!0,forced:!u},{splice:function(e,u){var p=t(this),m=i(p),h=n(e,m),g=arguments.length,_,v,y,b,x,S;for(g===0?_=v=0:g===1?(_=0,v=m-h):(_=g-2,v=f(d(r(u),0),m-h)),o(m+_-v),y=s(p,v),b=0;b<v;b++)x=h+b,x in p&&c(y,b,p[x]);if(y.length=v,_<v){for(b=h;b<m-v;b++)x=b+v,S=b+_,x in p?p[S]=p[x]:l(p,S);for(b=m;b>m-v+_;b--)l(p,b-1)}else if(_>v)for(b=m-v;b>h;b--)x=b+v-1,S=b+_-1,x in p?p[S]=p[x]:l(p,S);for(b=0;b<_;b++)p[b+h]=arguments[b+2];return a(p,m-v+_),y}}),Pf}var Uf,Wf;function Gf(){return Wf?Uf:(Wf=1,Hf(),Uf=rl()(`Array`,`splice`),Uf)}var Kf,qf;function Jf(){if(qf)return Kf;qf=1;var e=Ae(),t=Gf(),n=Array.prototype;return Kf=function(r){var i=r.splice;return r===n||e(n,r)&&i===n.splice?t:i},Kf}var Yf,Xf;function Zf(){return Xf?Yf:(Xf=1,Yf=Jf(),Yf)}var Qf,$f;function ep(){return $f?Qf:($f=1,Qf=Zf(),Qf)}var tp=t(ep()),np={},rp,ip;function ap(){if(ip)return rp;ip=1;var e=k(),t=v(),n=A(),r=l(),i=Br(),a=li(),o=oe(),s=vt(),c=fe(),u=Object.assign,d=Object.defineProperty,f=t([].concat);return rp=!u||r(function(){if(e&&u({b:1},u(d({},`a`,{enumerable:!0,get:function(){d(this,`b`,{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},n={},r=Symbol(`assign detection`),a=`abcdefghijklmnopqrst`;return t[r]=7,a.split(``).forEach(function(e){n[e]=e}),u({},t)[r]!==7||i(u({},n)).join(``)!==a})?function(t,r){for(var l=s(t),u=arguments.length,d=1,p=a.f,m=o.f;u>d;)for(var h=c(arguments[d++]),g=p?f(i(h),p(h)):i(h),_=g.length,v=0,y;_>v;)y=g[v++],(!e||n(m,h,y))&&(l[y]=h[y]);return l}:u,rp}var op;function sp(){if(op)return np;op=1;var e=P(),t=ap();return e({target:`Object`,stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),np}var cp,lp;function up(){return lp?cp:(lp=1,sp(),cp=M().Object.assign,cp)}var dp,fp;function pp(){return fp?dp:(fp=1,dp=up(),dp)}var mp,hp;function gp(){return hp?mp:(hp=1,mp=pp(),mp)}var _p=t(gp()),vp,yp;function bp(){return yp?vp:(yp=1,gr(),vp=rl()(`Array`,`concat`),vp)}var xp,Sp;function Cp(){if(Sp)return xp;Sp=1;var e=Ae(),t=bp(),n=Array.prototype;return xp=function(r){var i=r.concat;return r===n||e(n,r)&&i===n.concat?t:i},xp}var wp,Tp;function Ep(){return Tp?wp:(Tp=1,wp=Cp(),wp)}var Dp,Op;function kp(){return Op?Dp:(Op=1,Dp=Ep(),Dp)}var Ap=t(kp()),jp={},Mp;function Np(){return Mp?jp:(Mp=1,P()({target:`Object`,stat:!0,sham:!k()},{create:Zr()}),jp)}var Pp,Fp;function Ip(){if(Fp)return Pp;Fp=1,Np();var e=M().Object;return Pp=function(t,n){return e.create(t,n)},Pp}var Lp,Rp;function zp(){return Rp?Lp:(Rp=1,Lp=Ip(),Lp)}var Bp,Vp;function Hp(){return Vp?Bp:(Vp=1,Bp=zp(),Bp)}var Up=t(Hp()),Wp={},Gp,Kp;function qp(){if(Kp)return Gp;Kp=1;var e=Fn(),t=xr(),n=j(),r=RangeError;return Gp=function(i){var a=t(n(this)),o=``,s=e(i);if(s<0||s===1/0)throw new r(`Wrong number of repetitions`);for(;s>0;(s>>>=1)&&(a+=a))s&1&&(o+=a);return o},Gp}var Jp,Yp;function Xp(){if(Yp)return Jp;Yp=1;var e=v(),t=Rn(),n=xr(),r=qp(),i=j(),a=e(r),o=e(``.slice),s=Math.ceil,c=function(e){return function(r,c,l){var u=n(i(r)),d=t(c),f=u.length,p=l===void 0?` `:n(l),m,h;return d<=f||p===``?u:(m=d-f,h=a(p,s(m/p.length)),h.length>m&&(h=o(h,0,m)),e?u+h:h+u)}};return Jp={start:c(!1),end:c(!0)},Jp}var Zp,Qp;function $p(){if(Qp)return Zp;Qp=1;var e=v(),t=l(),n=Xp().start,r=RangeError,i=isFinite,a=Math.abs,o=Date.prototype,s=o.toISOString,c=e(o.getTime),u=e(o.getUTCDate),d=e(o.getUTCFullYear),f=e(o.getUTCHours),p=e(o.getUTCMilliseconds),m=e(o.getUTCMinutes),h=e(o.getUTCMonth),g=e(o.getUTCSeconds);return Zp=t(function(){return s.call(new Date(-50000000000001))!==`0385-07-25T07:06:39.999Z`})||!t(function(){s.call(new Date(NaN))})?function(){if(!i(c(this)))throw new r(`Invalid time value`);var e=this,t=d(e),o=p(e),s=t<0?`-`:t>9999?`+`:``;return s+n(a(t),s?6:4,0)+`-`+n(h(e)+1,2,0)+`-`+n(u(e),2,0)+`T`+n(f(e),2,0)+`:`+n(m(e),2,0)+`:`+n(g(e),2,0)+`.`+n(o,3,0)+`Z`}:s,Zp}var em;function tm(){if(em)return Wp;em=1;var e=P(),t=A(),n=vt(),r=At(),i=$p(),a=x();return e({target:`Date`,proto:!0,forced:l()(function(){return new Date(NaN).toJSON()!==null||t(Date.prototype.toJSON,{toISOString:function(){return 1}})!==1})},{toJSON:function(e){var o=n(this),s=r(o,`number`);return typeof s==`number`&&!isFinite(s)?null:!(`toISOString`in o)&&a(o)===`Date`?t(i,o):o.toISOString()}}),Wp}var nm,rm;function im(){if(rm)return nm;rm=1,tm(),na();var e=M(),t=h();return e.JSON||={stringify:JSON.stringify},nm=function(n,r,i){return t(e.JSON.stringify,null,arguments)},nm}var am,om;function sm(){return om?am:(om=1,am=im(),am)}var cm,lm;function um(){return lm?cm:(lm=1,cm=sm(),cm)}var dm=t(um()),fm={},pm={},mm,hm;function gm(){if(hm)return mm;hm=1;var e=TypeError;return mm=function(t,n){if(t<n)throw new e(`Not enough arguments`);return t},mm}var _m,vm;function ym(){if(vm)return _m;vm=1;var e=o(),t=h(),n=D(),r=El(),i=Ne(),a=ii(),s=gm(),c=e.Function,l=/MSIE .\./.test(i)||r===`BUN`&&(function(){var t=e.Bun.version.split(`.`);return t.length<3||t[0]===`0`&&(t[1]<3||t[1]===`3`&&t[2]===`0`)})();return _m=function(e,r){var i=r?2:1;return l?function(o,l){var u=s(arguments.length,1)>i,d=n(o)?o:c(o),f=u?a(arguments,i):[],p=u?function(){t(d,this,f)}:d;return r?e(p,l):e(p)}:e},_m}var bm;function xm(){if(bm)return pm;bm=1;var e=P(),t=o(),n=ym()(t.setInterval,!0);return e({global:!0,bind:!0,forced:t.setInterval!==n},{setInterval:n}),pm}var Sm={},Cm;function wm(){if(Cm)return Sm;Cm=1;var e=P(),t=o(),n=ym()(t.setTimeout,!0);return e({global:!0,bind:!0,forced:t.setTimeout!==n},{setTimeout:n}),Sm}var Tm;function Em(){return Tm?fm:(Tm=1,xm(),wm(),fm)}var Dm,Om;function km(){return Om?Dm:(Om=1,Em(),Dm=M().setTimeout,Dm)}var Am,jm;function Mm(){return jm?Am:(jm=1,Am=km(),Am)}var Nm=t(Mm()),Pm={exports:{}},Fm;function Im(){return Fm?Pm.exports:(Fm=1,(function(e){function t(e){if(e)return n(e);this._callbacks=new Map}function n(e){return Object.assign(e,t.prototype),e._callbacks=new Map,e}t.prototype.on=function(e,t){let n=this._callbacks.get(e)??[];return n.push(t),this._callbacks.set(e,n),this},t.prototype.once=function(e,t){let n=(...r)=>{this.off(e,n),t.apply(this,r)};return n.fn=t,this.on(e,n),this},t.prototype.off=function(e,t){if(e===void 0&&t===void 0)return this._callbacks.clear(),this;if(t===void 0)return this._callbacks.delete(e),this;let n=this._callbacks.get(e);if(n){for(let[e,r]of n.entries())if(r===t||r.fn===t){n.splice(e,1);break}n.length===0?this._callbacks.delete(e):this._callbacks.set(e,n)}return this},t.prototype.emit=function(e,...t){let n=this._callbacks.get(e);if(n){let e=[...n];for(let n of e)n.apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks.get(e)??[]},t.prototype.listenerCount=function(e){if(e)return this.listeners(e).length;let t=0;for(let e of this._callbacks.values())t+=e.length;return t},t.prototype.hasListeners=function(e){return this.listenerCount(e)>0},t.prototype.addEventListener=t.prototype.on,t.prototype.removeListener=t.prototype.off,t.prototype.removeEventListener=t.prototype.off,t.prototype.removeAllListeners=t.prototype.off,e.exports=t})(Pm),Pm.exports)}var Lm=t(Im());function Rm(){return Rm=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rm.apply(this,arguments)}function zm(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Bm(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}var Vm=typeof Object.assign==`function`?Object.assign:function(e){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!=null)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t},Hm=[``,`webkit`,`Moz`,`MS`,`ms`,`o`],Um=typeof document>`u`?{style:{}}:document.createElement(`div`),Wm=`function`,Gm=Math.round,Km=Math.abs,qm=Date.now;function Jm(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),a=0;a<Hm.length;){if(n=Hm[a],r=n?n+i:t,r in e)return r;a++}}var Ym=typeof window>`u`?{}:window,Xm=Jm(Um.style,`touchAction`),Zm=Xm!==void 0;function Qm(){if(!Zm)return!1;var e={},t=Ym.CSS&&Ym.CSS.supports;return[`auto`,`manipulation`,`pan-y`,`pan-x`,`pan-x pan-y`,`none`].forEach(function(n){return e[n]=!t||Ym.CSS.supports(`touch-action`,n)}),e}var $m=`compute`,eh=`auto`,th=`manipulation`,nh=`none`,rh=`pan-x`,ih=`pan-y`,ah=Qm(),oh=/mobile|tablet|ip(ad|hone|od)|android/i,sh=`ontouchstart`in Ym,ch=Jm(Ym,`PointerEvent`)!==void 0,lh=sh&&oh.test(navigator.userAgent),uh=`touch`,dh=`pen`,fh=`mouse`,ph=`kinect`,mh=25,hh=1,gh=2,_h=4,vh=8,yh=1,bh=2,xh=4,Sh=8,Ch=16,wh=bh|xh,Th=Sh|Ch,Eh=wh|Th,Dh=[`x`,`y`],Oh=[`clientX`,`clientY`];function kh(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==void 0)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function Ah(e,t){return typeof e===Wm?e.apply(t&&t[0]||void 0,t):e}function jh(e,t){return e.indexOf(t)>-1}function Mh(e){if(jh(e,nh))return nh;var t=jh(e,rh),n=jh(e,ih);return t&&n?nh:t||n?t?rh:ih:jh(e,th)?th:eh}var Nh=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===$m&&(e=this.compute()),Zm&&this.manager.element.style&&ah[e]&&(this.manager.element.style[Xm]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return kh(this.manager.recognizers,function(t){Ah(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),Mh(e.join(` `))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented){t.preventDefault();return}var r=this.actions,i=jh(r,nh)&&!ah[nh],a=jh(r,ih)&&!ah[ih],o=jh(r,rh)&&!ah[rh];if(i){var s=e.pointers.length===1,c=e.distance<2,l=e.deltaTime<250;if(s&&c&&l)return}if(!(o&&a)&&(i||a&&n&wh||o&&n&Th))return this.preventSrc(t)},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function Ph(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function Fh(e){var t=e.length;if(t===1)return{x:Gm(e[0].clientX),y:Gm(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:Gm(n/t),y:Gm(r/t)}}function Ih(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:Gm(e.pointers[n].clientX),clientY:Gm(e.pointers[n].clientY)},n++;return{timeStamp:qm(),pointers:t,center:Fh(t),deltaX:e.deltaX,deltaY:e.deltaY}}function Lh(e,t,n){n||=Dh;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function Rh(e,t,n){n||=Dh;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.atan2(i,r)*180/Math.PI}function zh(e,t){return e===t?yh:Km(e)>=Km(t)?e<0?bh:xh:t<0?Sh:Ch}function Bh(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},a=e.prevInput||{};(t.eventType===hh||a.eventType===_h)&&(i=e.prevDelta={x:a.deltaX||0,y:a.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}function Vh(e,t,n){return{x:t/e||0,y:n/e||0}}function Hh(e,t){return Lh(t[0],t[1],Oh)/Lh(e[0],e[1],Oh)}function Uh(e,t){return Rh(t[1],t[0],Oh)+Rh(e[1],e[0],Oh)}function Wh(e,t){var n=e.lastInterval||t,r=t.timeStamp-n.timeStamp,i,a,o,s;if(t.eventType!==vh&&(r>mh||n.velocity===void 0)){var c=t.deltaX-n.deltaX,l=t.deltaY-n.deltaY,u=Vh(r,c,l);a=u.x,o=u.y,i=Km(u.x)>Km(u.y)?u.x:u.y,s=zh(c,l),e.lastInterval=t}else i=n.velocity,a=n.velocityX,o=n.velocityY,s=n.direction;t.velocity=i,t.velocityX=a,t.velocityY=o,t.direction=s}function Gh(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||=Ih(t),i>1&&!n.firstMultiple?n.firstMultiple=Ih(t):i===1&&(n.firstMultiple=!1);var a=n.firstInput,o=n.firstMultiple,s=o?o.center:a.center,c=t.center=Fh(r);t.timeStamp=qm(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=Rh(s,c),t.distance=Lh(s,c),Bh(n,t),t.offsetDirection=zh(t.deltaX,t.deltaY);var l=Vh(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=l.x,t.overallVelocityY=l.y,t.overallVelocity=Km(l.x)>Km(l.y)?l.x:l.y,t.scale=o?Hh(o.pointers,r):1,t.rotation=o?Uh(o.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,Wh(n,t);var u=e.element,d=t.srcEvent,f=d.composedPath?d.composedPath()[0]:d.path?d.path[0]:d.target;Ph(f,u)&&(u=f),t.target=u}function Kh(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,a=t&hh&&r-i===0,o=t&(_h|vh)&&r-i===0;n.isFirst=!!a,n.isFinal=!!o,a&&(e.session={}),n.eventType=t,Gh(e,n),e.emit(`hammer.input`,n),e.recognize(n),e.session.prevInput=n}function qh(e){return e.trim().split(/\s+/g)}function Jh(e,t,n){kh(qh(t),function(t){e.addEventListener(t,n,!1)})}function Yh(e,t,n){kh(qh(t),function(t){e.removeEventListener(t,n,!1)})}function Xh(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var Zh=function(){function e(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){Ah(e.options.enable,[e])&&n.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&Jh(this.element,this.evEl,this.domHandler),this.evTarget&&Jh(this.target,this.evTarget,this.domHandler),this.evWin&&Jh(Xh(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&Yh(this.element,this.evEl,this.domHandler),this.evTarget&&Yh(this.target,this.evTarget,this.domHandler),this.evWin&&Yh(Xh(this.element),this.evWin,this.domHandler)},e}();function Qh(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}var $h={pointerdown:hh,pointermove:gh,pointerup:_h,pointercancel:vh,pointerout:vh},eg={2:uh,3:dh,4:fh,5:ph},tg=`pointerdown`,ng=`pointermove pointerup pointercancel`;Ym.MSPointerEvent&&!Ym.PointerEvent&&(tg=`MSPointerDown`,ng=`MSPointerMove MSPointerUp MSPointerCancel`);var rg=function(e){zm(t,e);function t(){var n,r=t.prototype;return r.evEl=tg,r.evWin=ng,n=e.apply(this,arguments)||this,n.store=n.manager.session.pointerEvents=[],n}var n=t.prototype;return n.handler=function(e){var t=this.store,n=!1,r=$h[e.type.toLowerCase().replace(`ms`,``)],i=eg[e.pointerType]||e.pointerType,a=i===uh,o=Qh(t,e.pointerId,`pointerId`);r&hh&&(e.button===0||a)?o<0&&(t.push(e),o=t.length-1):r&(_h|vh)&&(n=!0),!(o<0)&&(t[o]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:i,srcEvent:e}),n&&t.splice(o,1))},t}(Zh);function ig(e){return Array.prototype.slice.call(e,0)}function ag(e,t,n){for(var r=[],i=[],a=0;a<e.length;){var o=t?e[a][t]:e[a];Qh(i,o)<0&&r.push(e[a]),i[a]=o,a++}return n&&(r=t?r.sort(function(e,n){return e[t]>n[t]}):r.sort()),r}var og={touchstart:hh,touchmove:gh,touchend:_h,touchcancel:vh},sg=`touchstart touchmove touchend touchcancel`,cg=function(e){zm(t,e);function t(){var n;return t.prototype.evTarget=sg,n=e.apply(this,arguments)||this,n.targetIds={},n}var n=t.prototype;return n.handler=function(e){var t=og[e.type],n=lg.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:uh,srcEvent:e})},t}(Zh);function lg(e,t){var n=ig(e.touches),r=this.targetIds;if(t&(hh|gh)&&n.length===1)return r[n[0].identifier]=!0,[n,n];var i,a,o=ig(e.changedTouches),s=[],c=this.target;if(a=n.filter(function(e){return Ph(e.target,c)}),t===hh)for(i=0;i<a.length;)r[a[i].identifier]=!0,i++;for(i=0;i<o.length;)r[o[i].identifier]&&s.push(o[i]),t&(_h|vh)&&delete r[o[i].identifier],i++;if(s.length)return[ag(a.concat(s),`identifier`,!0),s]}var ug={mousedown:hh,mousemove:gh,mouseup:_h},dg=`mousedown`,fg=`mousemove mouseup`,pg=function(e){zm(t,e);function t(){var n,r=t.prototype;return r.evEl=dg,r.evWin=fg,n=e.apply(this,arguments)||this,n.pressed=!1,n}var n=t.prototype;return n.handler=function(e){var t=ug[e.type];t&hh&&e.button===0&&(this.pressed=!0),t&gh&&e.which!==1&&(t=_h),this.pressed&&(t&_h&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:fh,srcEvent:e}))},t}(Zh),mg=2500,hg=25;function gg(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY},r=this.lastTouches;this.lastTouches.push(n),setTimeout(function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)},mg)}}function _g(e,t){e&hh?(this.primaryTouch=t.changedPointers[0].identifier,gg.call(this,t)):e&(_h|vh)&&gg.call(this,t)}function vg(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],a=Math.abs(t-i.x),o=Math.abs(n-i.y);if(a<=hg&&o<=hg)return!0}return!1}var yg=function(){return function(e){zm(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.handler=function(e,t,n){var i=n.pointerType===uh,a=n.pointerType===fh;if(!(a&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)_g.call(Bm(Bm(r)),t,n);else if(a&&vg.call(Bm(Bm(r)),n))return;r.callback(e,t,n)}},r.touch=new cg(r.manager,r.handler),r.mouse=new pg(r.manager,r.handler),r.primaryTouch=null,r.lastTouches=[],r}var n=t.prototype;return n.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(Zh)}();function bg(e){var t;return t=e.options.inputClass||(ch?rg:lh?cg:sh?yg:pg),new t(e,Kh)}function xg(e,t,n){return Array.isArray(e)?(kh(e,n[t],n),!0):!1}var Sg=1,Cg=2,wg=4,Tg=8,Eg=Tg,Dg=16,Og=32,kg=1;function Ag(){return kg++}function jg(e,t){var n=t.manager;return n?n.get(e):e}function Mg(e){return e&Dg?`cancel`:e&Tg?`end`:e&wg?`move`:e&Cg?`start`:``}var Ng=function(){function e(e){e===void 0&&(e={}),this.options=Rm({enable:!0},e),this.id=Ag(),this.manager=null,this.state=Sg,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return Vm(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(xg(e,`recognizeWith`,this))return this;var t=this.simultaneous;return e=jg(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return xg(e,`dropRecognizeWith`,this)?this:(e=jg(e,this),delete this.simultaneous[e.id],this)},t.requireFailure=function(e){if(xg(e,`requireFailure`,this))return this;var t=this.requireFail;return e=jg(e,this),Qh(t,e)===-1&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(xg(e,`dropRequireFailure`,this))return this;e=jg(e,this);var t=Qh(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<Tg&&r(t.options.event+Mg(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=Tg&&r(t.options.event+Mg(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=Og},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(Og|Sg)))return!1;e++}return!0},t.recognize=function(e){var t=Vm({},e);if(!Ah(this.options.enable,[this,t])){this.reset(),this.state=Og;return}this.state&(Eg|Dg|Og)&&(this.state=Sg),this.state=this.process(t),this.state&(Cg|wg|Tg|Dg)&&this.tryEmit(t)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),Pg=function(e){zm(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,Rm({event:`tap`,pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this,n.pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}var n=t.prototype;return n.getTouchAction=function(){return[th]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime<n.time;if(this.reset(),e.eventType&hh&&this.count===0)return this.failTimeout();if(i&&a&&r){if(e.eventType!==_h)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<n.interval,s=!this.pCenter||Lh(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,!s||!o?this.count=1:this.count+=1,this._input=e,this.count%n.taps===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){t.state=Eg,t.tryEmit()},n.interval),Cg):Eg}return Og},n.failTimeout=function(){var e=this;return this._timer=setTimeout(function(){e.state=Og},this.options.interval),Og},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){this.state===Eg&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(Ng),Fg=function(e){zm(t,e);function t(t){return t===void 0&&(t={}),e.call(this,Rm({pointers:1},t))||this}var n=t.prototype;return n.attrTest=function(e){var t=this.options.pointers;return t===0||e.pointers.length===t},n.process=function(e){var t=this.state,n=e.eventType,r=t&(Cg|wg),i=this.attrTest(e);return r&&(n&vh||!i)?t|Dg:r||i?n&_h?t|Tg:t&Cg?t|wg:Cg:Og},t}(Ng);function Ig(e){return e===Ch?`down`:e===Sh?`up`:e===bh?`left`:e===xh?`right`:``}var Lg=function(e){zm(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,Rm({event:`pan`,threshold:10,pointers:1,direction:Eh},t))||this,n.pX=null,n.pY=null,n}var n=t.prototype;return n.getTouchAction=function(){var e=this.options.direction,t=[];return e&wh&&t.push(ih),e&Th&&t.push(rh),t},n.directionTest=function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,a=e.deltaX,o=e.deltaY;return i&t.direction||(t.direction&wh?(i=a===0?yh:a<0?bh:xh,n=a!==this.pX,r=Math.abs(e.deltaX)):(i=o===0?yh:o<0?Sh:Ch,n=o!==this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},n.attrTest=function(e){return Fg.prototype.attrTest.call(this,e)&&(this.state&Cg||!(this.state&Cg)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var n=Ig(t.direction);n&&(t.additionalEvent=this.options.event+n),e.prototype.emit.call(this,t)},t}(Fg),Rg=function(e){zm(t,e);function t(t){return t===void 0&&(t={}),e.call(this,Rm({event:`swipe`,threshold:10,velocity:.3,direction:wh|Th,pointers:1},t))||this}var n=t.prototype;return n.getTouchAction=function(){return Lg.prototype.getTouchAction.call(this)},n.attrTest=function(t){var n=this.options.direction,r;return n&(wh|Th)?r=t.overallVelocity:n&wh?r=t.overallVelocityX:n&Th&&(r=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&Km(r)>this.options.velocity&&t.eventType&_h},n.emit=function(e){var t=Ig(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(Fg),zg=function(e){zm(t,e);function t(t){return t===void 0&&(t={}),e.call(this,Rm({event:`pinch`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[nh]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&Cg)},n.emit=function(t){if(t.scale!==1){var n=t.scale<1?`in`:`out`;t.additionalEvent=this.options.event+n}e.prototype.emit.call(this,t)},t}(Fg),Bg=function(e){zm(t,e);function t(t){return t===void 0&&(t={}),e.call(this,Rm({event:`rotate`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[nh]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&Cg)},t}(Fg),Vg=function(e){zm(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,Rm({event:`press`,pointers:1,time:251,threshold:9},t))||this,n._timer=null,n._input=null,n}var n=t.prototype;return n.getTouchAction=function(){return[eh]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime>n.time;if(this._input=e,!i||!r||e.eventType&(_h|vh)&&!a)this.reset();else if(e.eventType&hh)this.reset(),this._timer=setTimeout(function(){t.state=Eg,t.tryEmit()},n.time);else if(e.eventType&_h)return Eg;return Og},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){this.state===Eg&&(e&&e.eventType&_h?this.manager.emit(this.options.event+`up`,e):(this._input.timeStamp=qm(),this.manager.emit(this.options.event,this._input)))},t}(Ng),Hg={domEvents:!1,touchAction:$m,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:`none`,touchSelect:`none`,touchCallout:`none`,contentZooming:`none`,userDrag:`none`,tapHighlightColor:`rgba(0,0,0,0)`}},Ug=[[Bg,{enable:!1}],[zg,{enable:!1},[`rotate`]],[Rg,{direction:wh}],[Lg,{direction:wh},[`swipe`]],[Pg],[Pg,{event:`doubletap`,taps:2},[`tap`]],[Vg]],Wg=1,Gg=2;function Kg(e,t){var n=e.element;if(n.style){var r;kh(e.options.cssProps,function(i,a){r=Jm(n.style,a),t?(e.oldCssProps[r]=n.style[r],n.style[r]=i):n.style[r]=e.oldCssProps[r]||``}),t||(e.oldCssProps={})}}function qg(e,t){var n=document.createEvent(`Event`);n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}var Jg=function(){function e(e,t){var n=this;this.options=Vm({},Hg,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=bg(this),this.touchAction=new Nh(this,this.options.touchAction),Kg(this,!0),kh(this.options.recognizers,function(e){var t=n.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}var t=e.prototype;return t.set=function(e){return Vm(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?Gg:Wg},t.recognize=function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var n,r=this.recognizers,i=t.curRecognizer;(!i||i&&i.state&Eg)&&(t.curRecognizer=null,i=null);for(var a=0;a<r.length;)n=r[a],t.stopped!==Gg&&(!i||n===i||n.canRecognizeWith(i))?n.recognize(e):n.reset(),!i&&n.state&(Cg|wg|Tg)&&(t.curRecognizer=n,i=n),a++}},t.get=function(e){if(e instanceof Ng)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event===e)return t[n];return null},t.add=function(e){if(xg(e,`add`,this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},t.remove=function(e){if(xg(e,`remove`,this))return this;var t=this.get(e);if(e){var n=this.recognizers,r=Qh(n,t);r!==-1&&(n.splice(r,1),this.touchAction.update())}return this},t.on=function(e,t){if(e===void 0||t===void 0)return this;var n=this.handlers;return kh(qh(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this},t.off=function(e,t){if(e===void 0)return this;var n=this.handlers;return kh(qh(e),function(e){t?n[e]&&n[e].splice(Qh(n[e],t),1):delete n[e]}),this},t.emit=function(e,t){this.options.domEvents&&qg(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(!(!n||!n.length)){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](t),r++}},t.destroy=function(){this.element&&Kg(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),Yg={touchstart:hh,touchmove:gh,touchend:_h,touchcancel:vh},Xg=`touchstart`,Zg=`touchstart touchmove touchend touchcancel`,Qg=function(e){zm(t,e);function t(){var n,r=t.prototype;return r.evTarget=Xg,r.evWin=Zg,n=e.apply(this,arguments)||this,n.started=!1,n}var n=t.prototype;return n.handler=function(e){var t=Yg[e.type];if(t===hh&&(this.started=!0),this.started){var n=$g.call(this,e,t);t&(_h|vh)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:uh,srcEvent:e})}},t}(Zh);function $g(e,t){var n=ig(e.touches),r=ig(e.changedTouches);return t&(_h|vh)&&(n=ag(n.concat(r),`identifier`,!0)),[n,r]}function e_(e,t,n){var r=`DEPRECATED METHOD: `+t+`
|
|
2
|
-
`+n+` AT
|
|
3
|
-
`;return function(){var t=Error(`get-stack-trace`),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,``).replace(/^\s+at\s+/gm,``).replace(/^Object.<anonymous>\s*\(/gm,`{anonymous}()@`):`Unknown Stack Trace`,i=window.console&&(window.console.warn||window.console.log);return i&&i.call(window.console,r,n),e.apply(this,arguments)}}var t_=e_(function(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;)(!n||n&&e[r[i]]===void 0)&&(e[r[i]]=t[r[i]]),i++;return e},`extend`,"Use `assign`."),n_=e_(function(e,t){return t_(e,t,!0)},`merge`,"Use `assign`.");function r_(e,t,n){var r=t.prototype,i=e.prototype=Object.create(r);i.constructor=e,i._super=r,n&&Vm(i,n)}function i_(e,t){return function(){return e.apply(t,arguments)}}var a_=function(){var e=function(e,t){return t===void 0&&(t={}),new Jg(e,Rm({recognizers:Ug.concat()},t))};return e.VERSION=`2.0.17-rc`,e.DIRECTION_ALL=Eh,e.DIRECTION_DOWN=Ch,e.DIRECTION_LEFT=bh,e.DIRECTION_RIGHT=xh,e.DIRECTION_UP=Sh,e.DIRECTION_HORIZONTAL=wh,e.DIRECTION_VERTICAL=Th,e.DIRECTION_NONE=yh,e.DIRECTION_DOWN=Ch,e.INPUT_START=hh,e.INPUT_MOVE=gh,e.INPUT_END=_h,e.INPUT_CANCEL=vh,e.STATE_POSSIBLE=Sg,e.STATE_BEGAN=Cg,e.STATE_CHANGED=wg,e.STATE_ENDED=Tg,e.STATE_RECOGNIZED=Eg,e.STATE_CANCELLED=Dg,e.STATE_FAILED=Og,e.Manager=Jg,e.Input=Zh,e.TouchAction=Nh,e.TouchInput=cg,e.MouseInput=pg,e.PointerEventInput=rg,e.TouchMouseInput=yg,e.SingleTouchInput=Qg,e.Recognizer=Ng,e.AttrRecognizer=Fg,e.Tap=Pg,e.Pan=Lg,e.Swipe=Rg,e.Pinch=zg,e.Rotate=Bg,e.Press=Vg,e.on=Jh,e.off=Yh,e.each=kh,e.merge=n_,e.extend=t_,e.bindFn=i_,e.assign=Vm,e.inherit=r_,e.bindFn=i_,e.prefixed=Jm,e.toArray=ig,e.inArray=Qh,e.uniqueArray=ag,e.splitStr=qh,e.boolOrFn=Ah,e.hasParent=Ph,e.addEventListeners=Jh,e.removeEventListeners=Yh,e.defaults=Vm({},Hg,{preset:Ug}),e}(),o_=qu(`DELETE`);function s_(e){return c_({},e,...[...arguments].slice(1))}function c_(){let e=l_(...arguments);return d_(e),e}function l_(){var e=[...arguments];if(e.length<2)return e[0];if(e.length>2)return l_(c_(e[0],e[1]),...ld(e).call(e,2));let t=e[0],n=e[1];if(t instanceof Date&&n instanceof Date)return t.setTime(n.getTime()),t;for(let e of Td(n))Object.prototype.propertyIsEnumerable.call(n,e)&&(n[e]===o_?delete t[e]:t[e]!==null&&n[e]!==null&&typeof t[e]==`object`&&typeof n[e]==`object`&&!Rd(t[e])&&!Rd(n[e])?t[e]=l_(t[e],n[e]):t[e]=u_(n[e]));return t}function u_(e){return Rd(e)?Su(e).call(e,e=>u_(e)):typeof e==`object`&&e?e instanceof Date?new Date(e.getTime()):l_({},e):e}function d_(e){for(let t of Zd(e))e[t]===o_?delete e[t]:typeof e[t]==`object`&&e[t]!==null&&d_(e[t])}function f_(){let e=()=>{};return{on:e,off:e,destroy:e,emit:e,get(){return{set:e}}}}var p_=typeof window<`u`?window.Hammer||a_:function(){return f_()};function m_(e){var t;this._cleanupQueue=[],this.active=!1,this._dom={container:e,overlay:document.createElement(`div`)},this._dom.overlay.classList.add(`vis-overlay`),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});let n=p_(this._dom.overlay);n.on(`tap`,gl(t=this._onTapOverlay).call(t,this)),this._cleanupQueue.push(()=>{n.destroy()});let r=[`tap`,`doubletap`,`press`,`pinch`,`pan`,`panstart`,`panmove`,`panend`];_f(r).call(r,e=>{n.on(e,e=>{e.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=t=>{h_(t.target,e)||this.deactivate()},document.body.addEventListener(`click`,this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener(`click`,this._onClick)})),this._escListener=e=>{(`key`in e?e.key===`Escape`:e.keyCode===27)&&this.deactivate()}}Lm(m_.prototype),m_.current=null,m_.prototype.destroy=function(){this.deactivate();for(let n of Nf(e=tp(t=this._cleanupQueue).call(t,0)).call(e)){var e,t;n()}},m_.prototype.activate=function(){m_.current&&m_.current.deactivate(),m_.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)},m_.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`)},m_.prototype._onTapOverlay=function(e){this.activate(),e.srcEvent.stopPropagation()};function h_(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}var g_,__;function v_(){return __?g_:(__=1,sa(),g_=M().Object.getOwnPropertySymbols,g_)}var y_,b_;function x_(){return b_?y_:(b_=1,y_=v_(),y_)}var S_,C_;function w_(){return C_?S_:(C_=1,S_=x_(),S_)}var T_=t(w_()),E_={exports:{}},D_={},O_;function k_(){if(O_)return D_;O_=1;var e=P(),t=l(),n=be(),r=Vt().f,i=k();return e({target:`Object`,stat:!0,forced:!i||t(function(){r(1)}),sham:!i},{getOwnPropertyDescriptor:function(e,t){return r(n(e),t)}}),D_}var A_;function j_(){if(A_)return E_.exports;A_=1,k_();var e=M().Object,t=E_.exports=function(t,n){return e.getOwnPropertyDescriptor(t,n)};return e.getOwnPropertyDescriptor.sham&&(t.sham=!0),E_.exports}var M_,N_;function P_(){return N_?M_:(N_=1,M_=j_(),M_)}var F_,I_;function L_(){return I_?F_:(I_=1,F_=P_(),F_)}var R_=t(L_()),z_={},B_;function V_(){if(B_)return z_;B_=1;var e=P(),t=k(),n=pd(),r=be(),i=Vt(),a=qn();return e({target:`Object`,stat:!0,sham:!t},{getOwnPropertyDescriptors:function(e){for(var t=r(e),o=i.f,s=n(t),c={},l=0,u,d;s.length>l;)d=o(t,u=s[l++]),d!==void 0&&a(c,u,d);return c}}),z_}var H_,U_;function W_(){return U_?H_:(U_=1,V_(),H_=M().Object.getOwnPropertyDescriptors,H_)}var G_,K_;function q_(){return K_?G_:(K_=1,G_=W_(),G_)}var J_,Y_;function X_(){return Y_?J_:(Y_=1,J_=q_(),J_)}var Z_=t(X_()),Q_={exports:{}},$_={},ev;function tv(){if(ev)return $_;ev=1;var e=P(),t=k(),n=Hr().f;return e({target:`Object`,stat:!0,forced:Object.defineProperties!==n,sham:!t},{defineProperties:n}),$_}var nv;function rv(){if(nv)return Q_.exports;nv=1,tv();var e=M().Object,t=Q_.exports=function(t,n){return e.defineProperties(t,n)};return e.defineProperties.sham&&(t.sham=!0),Q_.exports}var iv,av;function ov(){return av?iv:(av=1,iv=rv(),iv)}var sv,cv;function lv(){return cv?sv:(cv=1,sv=ov(),sv)}var uv=t(lv()),dv,fv;function pv(){return fv?dv:(fv=1,dv=hn(),dv)}var mv=t(pv()),hv={},gv={},_v={exports:{}},vv,yv;function bv(){return yv?vv:(yv=1,vv=l()(function(){if(typeof ArrayBuffer==`function`){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),vv)}var xv,Sv;function Cv(){if(Sv)return xv;Sv=1;var e=l(),t=Ce(),n=x(),r=bv(),i=Object.isExtensible;return xv=e(function(){})||r?function(e){return!t(e)||r&&n(e)===`ArrayBuffer`?!1:!i||i(e)}:i,xv}var wv,Tv;function Ev(){return Tv?wv:(Tv=1,wv=!l()(function(){return Object.isExtensible(Object.preventExtensions({}))}),wv)}var Dv;function Ov(){if(Dv)return _v.exports;Dv=1;var e=P(),t=v(),n=jr(),r=Ce(),i=xt(),a=nn().f,o=ei(),s=oi(),c=Cv(),l=wt(),u=Ev(),d=!1,f=l(`meta`),p=0,m=function(e){a(e,f,{value:{objectID:`O`+p++,weakData:{}}})},h=_v.exports={enable:function(){h.enable=function(){},d=!0;var n=o.f,r=t([].splice),i={};i[f]=1,n(i).length&&(o.f=function(e){for(var t=n(e),i=0,a=t.length;i<a;i++)if(t[i]===f){r(t,i,1);break}return t},e({target:`Object`,stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},fastKey:function(e,t){if(!r(e))return typeof e==`symbol`?e:(typeof e==`string`?`S`:`P`)+e;if(!i(e,f)){if(!c(e))return`F`;if(!t)return`E`;m(e)}return e[f].objectID},getWeakData:function(e,t){if(!i(e,f)){if(!c(e))return!0;if(!t)return!1;m(e)}return e[f].weakData},onFreeze:function(e){return u&&d&&c(e)&&!i(e,f)&&m(e),e}};return n[f]=!0,_v.exports}var kv,Av;function jv(){if(Av)return kv;Av=1;var e=Dt(),t=fo(),n=e(`iterator`),r=Array.prototype;return kv=function(e){return e!==void 0&&(t.Array===e||r[n]===e)},kv}var Mv,Nv;function Pv(){if(Nv)return Mv;Nv=1;var e=$n(),t=et(),n=he(),r=fo(),i=Dt()(`iterator`);return Mv=function(a){if(!n(a))return t(a,i)||t(a,`@@iterator`)||r[e(a)]},Mv}var Fv,Iv;function Lv(){if(Iv)return Fv;Iv=1;var e=A(),t=Ze(),n=en(),r=Je(),i=Pv(),a=TypeError;return Fv=function(o,s){var c=arguments.length<2?i(o):s;if(t(c))return n(e(c,o));throw new a(r(o)+` is not iterable`)},Fv}var Rv,zv;function Bv(){if(zv)return Rv;zv=1;var e=A(),t=en(),n=et();return Rv=function(r,i,a){var o,s;t(r);try{if(o=n(r,`return`),!o){if(i===`throw`)throw a;return a}o=e(o,r)}catch(e){s=!0,o=e}if(i===`throw`)throw a;if(s)throw o;return t(o),a},Rv}var Vv,Hv;function Uv(){if(Hv)return Vv;Hv=1;var e=qt(),t=A(),n=en(),r=Je(),i=jv(),a=Vn(),o=Ae(),s=Lv(),c=Pv(),l=Bv(),u=TypeError,d=function(e,t){this.stopped=e,this.result=t},f=d.prototype;return Vv=function(p,m,h){var g=h&&h.that,_=!!(h&&h.AS_ENTRIES),v=!!(h&&h.IS_RECORD),y=!!(h&&h.IS_ITERATOR),b=!!(h&&h.INTERRUPTED),x=e(m,g),S,C,w,T,E,D,ee,te=function(e){return S&&l(S,`normal`),new d(!0,e)},O=function(e){return _?(n(e),b?x(e[0],e[1],te):x(e[0],e[1])):b?x(e,te):x(e)};if(v)S=p.iterator;else if(y)S=p;else{if(C=c(p),!C)throw new u(r(p)+` is not iterable`);if(i(C)){for(w=0,T=a(p);T>w;w++)if(E=O(p[w]),E&&o(f,E))return E;return new d(!1)}S=s(p,C)}for(D=v?p.next:S.next;!(ee=t(D,S)).done;){try{E=O(ee.value)}catch(e){l(S,`throw`,e)}if(typeof E==`object`&&E&&o(f,E))return E}return new d(!1)},Vv}var Wv,Gv;function Kv(){if(Gv)return Wv;Gv=1;var e=Ae(),t=TypeError;return Wv=function(n,r){if(e(r,n))return n;throw new t(`Incorrect invocation`)},Wv}var qv,Jv;function Yv(){if(Jv)return qv;Jv=1;var e=P(),t=o(),n=Ov(),r=l(),i=on(),a=Uv(),s=Kv(),c=D(),u=Ce(),d=he(),f=Ai(),p=nn().f,m=zi().forEach,h=k(),g=Ii(),_=g.set,v=g.getterFor;return qv=function(o,l,g){var y=o.indexOf(`Map`)!==-1,b=o.indexOf(`Weak`)!==-1,x=y?`set`:`add`,S=t[o],C=S&&S.prototype,w={},T;if(!h||!c(S)||!(b||C.forEach&&!r(function(){new S().entries().next()})))T=g.getConstructor(l,o,y,x),n.enable();else{T=l(function(e,t){_(s(e,E),{type:o,collection:new S}),d(t)||a(t,e[x],{that:e,AS_ENTRIES:y})});var E=T.prototype,D=v(o);m([`add`,`clear`,`delete`,`forEach`,`get`,`has`,`set`,`keys`,`values`,`entries`],function(e){var t=e===`add`||e===`set`;e in C&&!(b&&e===`clear`)&&i(E,e,function(n,r){var i=D(this).collection;if(!t&&b&&!u(n))return e===`get`&&void 0;var a=i[e](n===0?0:n,r);return t?this:a})}),b||p(E,`size`,{configurable:!0,get:function(){return D(this).collection.size}})}return f(T,o,!1,!0),w[o]=T,e({global:!0,forced:!0},w),b||g.setStrong(T,o,y),T},qv}var Xv,Zv;function Qv(){if(Zv)return Xv;Zv=1;var e=fi();return Xv=function(t,n,r){for(var i in n)r&&r.unsafe&&t[i]?t[i]=n[i]:e(t,i,n[i],r);return t},Xv}var $v,ey;function ty(){if(ey)return $v;ey=1;var e=N(),t=hi(),n=Dt(),r=k(),i=n(`species`);return $v=function(n){var a=e(n);r&&a&&!a[i]&&t(a,i,{configurable:!0,get:function(){return this}})},$v}var ny,ry;function iy(){if(ry)return ny;ry=1;var e=Zr(),t=hi(),n=Qv(),r=qt(),i=Kv(),a=he(),o=Uv(),s=Ho(),c=Go(),l=ty(),u=k(),d=Ov().fastKey,f=Ii(),p=f.set,m=f.getterFor;return ny={getConstructor:function(s,c,l,f){var h=s(function(t,n){i(t,g),p(t,{type:c,index:e(null),first:null,last:null,size:0}),u||(t.size=0),a(n)||o(n,t[f],{that:t,AS_ENTRIES:l})}),g=h.prototype,_=m(c),v=function(e,t,n){var r=_(e),i=y(e,t),a,o;return i?i.value=n:(r.last=i={index:o=d(t,!0),key:t,value:n,previous:a=r.last,next:null,removed:!1},r.first||=i,a&&(a.next=i),u?r.size++:e.size++,o!==`F`&&(r.index[o]=i)),e},y=function(e,t){var n=_(e),r=d(t),i;if(r!==`F`)return n.index[r];for(i=n.first;i;i=i.next)if(i.key===t)return i};return n(g,{clear:function(){for(var t=this,n=_(t),r=n.first;r;)r.removed=!0,r.previous&&=r.previous.next=null,r=r.next;n.first=n.last=null,n.index=e(null),u?n.size=0:t.size=0},delete:function(e){var t=this,n=_(t),r=y(t,e);if(r){var i=r.next,a=r.previous;delete n.index[r.index],r.removed=!0,a&&(a.next=i),i&&(i.previous=a),n.first===r&&(n.first=i),n.last===r&&(n.last=a),u?n.size--:t.size--}return!!r},forEach:function(e){for(var t=_(this),n=r(e,arguments.length>1?arguments[1]:void 0),i;i=i?i.next:t.first;)for(n(i.value,i.key,this);i&&i.removed;)i=i.previous},has:function(e){return!!y(this,e)}}),n(g,l?{get:function(e){var t=y(this,e);return t&&t.value},set:function(e,t){return v(this,e===0?0:e,t)}}:{add:function(e){return v(this,e=e===0?0:e,e)}}),u&&t(g,`size`,{configurable:!0,get:function(){return _(this).size}}),h},setStrong:function(e,t,n){var r=t+` Iterator`,i=m(t),a=m(r);s(e,t,function(e,t){p(this,{type:r,target:e,state:i(e),kind:t,last:null})},function(){for(var e=a(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return!e.target||!(e.last=n=n?n.next:e.state.first)?(e.target=null,c(void 0,!0)):c(t===`keys`?n.key:t===`values`?n.value:[n.key,n.value],!1)},n?`entries`:`values`,!n,!0),l(t)}},ny}var ay;function oy(){return ay?gv:(ay=1,Yv()(`Map`,function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},iy()),gv)}var sy;function cy(){return sy?hv:(sy=1,oy(),hv)}var ly={},uy,dy;function fy(){return dy?uy:(dy=1,uy=function(e,t){return t===1?function(t,n){return t[e](n)}:function(t,n,r){return t[e](n,r)}},uy)}var py,my;function hy(){if(my)return py;my=1;var e=N(),t=fy(),n=e(`Map`);return py={Map:n,set:t(`set`,2),get:t(`get`,1),has:t(`has`,1),remove:t(`delete`,1),proto:n.prototype},py}var gy;function _y(){if(gy)return ly;gy=1;var e=P(),t=v(),n=Ze(),r=j(),i=Uv(),a=hy(),o=st(),s=l(),c=a.Map,u=a.has,d=a.get,f=a.set,p=t([].push),m=o||s(function(){return c.groupBy(`ab`,function(e){return e}).get(`a`).length!==1});return e({target:`Map`,stat:!0,forced:o||m},{groupBy:function(e,t){r(e),n(t);var a=new c,o=0;return i(e,function(e){var n=t(e,o++);u(a,n)?p(d(a,n),e):f(a,n,[e])}),a}}),ly}var vy,yy;function by(){return yy?vy:(yy=1,Jo(),cy(),_y(),fc(),vy=M().Map,vy)}var xy,Sy;function Cy(){if(Sy)return xy;Sy=1;var e=by();return $o(),xy=e,xy}var wy,Ty;function Ey(){return Ty?wy:(Ty=1,wy=Cy(),wy)}var Dy=t(Ey()),Oy={},ky;function Ay(){if(ky)return Oy;ky=1;var e=P(),t=zi().some;return e({target:`Array`,proto:!0,forced:!Cl()(`some`)},{some:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),Oy}var jy,My;function Ny(){return My?jy:(My=1,Ay(),jy=rl()(`Array`,`some`),jy)}var Py,Fy;function Iy(){if(Fy)return Py;Fy=1;var e=Ae(),t=Ny(),n=Array.prototype;return Py=function(r){var i=r.some;return r===n||e(n,r)&&i===n.some?t:i},Py}var Ly,Ry;function zy(){return Ry?Ly:(Ry=1,Ly=Iy(),Ly)}var By,Vy;function Hy(){return Vy?By:(Vy=1,By=zy(),By)}var Uy=t(Hy()),Wy,Gy;function Ky(){return Gy?Wy:(Gy=1,Jo(),Wy=rl()(`Array`,`keys`),Wy)}var qy,Jy;function Yy(){return Jy?qy:(Jy=1,qy=Ky(),qy)}var Xy,Zy;function Qy(){if(Zy)return Xy;Zy=1,$o();var e=$n(),t=xt(),n=Ae(),r=Yy(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return Xy=function(o){var s=o.keys;return o===i||n(i,o)&&s===i.keys||t(a,e(o))?r:s},Xy}var $y,eb;function tb(){return eb?$y:(eb=1,$y=Qy(),$y)}var nb=t(tb()),rb={},ib,ab;function ob(){if(ab)return ib;ab=1;var e=ii(),t=Math.floor,n=function(r,i){var a=r.length;if(a<8)for(var o=1,s,c;o<a;){for(c=o,s=r[o];c&&i(r[c-1],s)>0;)r[c]=r[--c];c!==o++&&(r[c]=s)}else for(var l=t(a/2),u=n(e(r,0,l),i),d=n(e(r,l),i),f=u.length,p=d.length,m=0,h=0;m<f||h<p;)r[m+h]=m<f&&h<p?i(u[m],d[h])<=0?u[m++]:d[h++]:m<f?u[m++]:d[h++];return r};return ib=n,ib}var sb,cb;function lb(){if(cb)return sb;cb=1;var e=Ne().match(/firefox\/(\d+)/i);return sb=!!e&&+e[1],sb}var ub,db;function fb(){if(db)return ub;db=1;var e=Ne();return ub=/MSIE|Trident/.test(e),ub}var pb,mb;function hb(){if(mb)return pb;mb=1;var e=Ne().match(/AppleWebKit\/(\d+)\./);return pb=!!e&&+e[1],pb}var gb;function _b(){if(gb)return rb;gb=1;var e=P(),t=v(),n=Ze(),r=vt(),i=Vn(),a=Bf(),o=xr(),s=l(),c=ob(),u=Cl(),d=lb(),f=fb(),p=Ie(),m=hb(),h=[],g=t(h.sort),_=t(h.push),y=s(function(){h.sort(void 0)}),b=s(function(){h.sort(null)}),x=u(`sort`),S=!s(function(){if(p)return p<70;if(!(d&&d>3)){if(f)return!0;if(m)return m<603;var e=``,t,n,r,i;for(t=65;t<76;t++){switch(n=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(i=0;i<47;i++)h.push({k:n+i,v:r})}for(h.sort(function(e,t){return t.v-e.v}),i=0;i<h.length;i++)n=h[i].k.charAt(0),e.charAt(e.length-1)!==n&&(e+=n);return e!==`DGBEFHACIJK`}}),C=y||!b||!x||!S,w=function(e){return function(t,n){return n===void 0?-1:t===void 0?1:e===void 0?o(t)>o(n)?1:-1:+e(t,n)||0}};return e({target:`Array`,proto:!0,forced:C},{sort:function(e){e!==void 0&&n(e);var t=r(this);if(S)return e===void 0?g(t):g(t,e);var o=[],s=i(t),l,u;for(u=0;u<s;u++)u in t&&_(o,t[u]);for(c(o,w(e)),l=i(o),u=0;u<l;)t[u]=o[u++];for(;u<s;)a(t,u++);return t}}),rb}var vb,yb;function bb(){return yb?vb:(yb=1,_b(),vb=rl()(`Array`,`sort`),vb)}var xb,Sb;function Cb(){if(Sb)return xb;Sb=1;var e=Ae(),t=bb(),n=Array.prototype;return xb=function(r){var i=r.sort;return r===n||e(n,r)&&i===n.sort?t:i},xb}var wb,Tb;function Eb(){return Tb?wb:(Tb=1,wb=Cb(),wb)}var Db,Ob;function kb(){return Ob?Db:(Ob=1,Db=Eb(),Db)}var Ab=t(kb()),jb,Mb;function Nb(){return Mb?jb:(Mb=1,Jo(),jb=rl()(`Array`,`values`),jb)}var Pb,Fb;function Ib(){return Fb?Pb:(Fb=1,Pb=Nb(),Pb)}var Lb,Rb;function zb(){if(Rb)return Lb;Rb=1,$o();var e=$n(),t=xt(),n=Ae(),r=Ib(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return Lb=function(o){var s=o.values;return o===i||n(i,o)&&s===i.values||t(a,e(o))?r:s},Lb}var Bb,Vb;function Hb(){return Vb?Bb:(Vb=1,Bb=zb(),Bb)}var Ub=t(Hb()),Wb,Gb;function Kb(){return Gb?Wb:(Gb=1,Wb=vc(),Wb)}var qb=t(Kb()),Jb,Yb;function Xb(){return Yb?Jb:(Yb=1,Jo(),Jb=rl()(`Array`,`entries`),Jb)}var Zb,Qb;function $b(){return Qb?Zb:(Qb=1,Zb=Xb(),Zb)}var ex,tx;function nx(){if(tx)return ex;tx=1,$o();var e=$n(),t=xt(),n=Ae(),r=$b(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return ex=function(o){var s=o.entries;return o===i||n(i,o)&&s===i.entries||t(a,e(o))?r:s},ex}var rx,ix;function ax(){return ix?rx:(ix=1,rx=nx(),rx)}var ox=t(ax()),sx=[];for(let e=0;e<256;++e)sx.push((e+256).toString(16).slice(1));function cx(e,t=0){return(sx[e[t+0]]+sx[e[t+1]]+sx[e[t+2]]+sx[e[t+3]]+`-`+sx[e[t+4]]+sx[e[t+5]]+`-`+sx[e[t+6]]+sx[e[t+7]]+`-`+sx[e[t+8]]+sx[e[t+9]]+`-`+sx[e[t+10]]+sx[e[t+11]]+sx[e[t+12]]+sx[e[t+13]]+sx[e[t+14]]+sx[e[t+15]]).toLowerCase()}var lx=new Uint8Array(16);function ux(){return crypto.getRandomValues(lx)}function dx(e,t,n){return crypto.randomUUID?crypto.randomUUID():fx(e)}function fx(e,t,n){e||={};let r=e.random??e.rng?.()??ux();if(r.length<16)throw Error(`Random bytes length must be >= 16`);return r[6]=r[6]&15|64,r[8]=r[8]&63|128,cx(r)}function px(e){return typeof e==`string`||typeof e==`number`}var mx=class e{constructor(e){Jc(this,`_queue`,[]),Jc(this,`_timeout`,null),Jc(this,`_extended`,null),this.delay=null,this.max=1/0,this.setOptions(e)}setOptions(e){e&&e.delay!==void 0&&(this.delay=e.delay),e&&e.max!==void 0&&(this.max=e.max),this._flushIfNeeded()}static extend(t,n){let r=new e(n);if(t.flush!==void 0)throw Error(`Target object already has a property flush`);t.flush=()=>{r.flush()};let i=[{name:`flush`,original:void 0}];if(n&&n.replace)for(let e=0;e<n.replace.length;e++){let a=n.replace[e];i.push({name:a,original:t[a]}),r.replace(t,a)}return r._extended={object:t,methods:i},r}destroy(){if(this.flush(),this._extended){let e=this._extended.object,t=this._extended.methods;for(let n=0;n<t.length;n++){let r=t[n];r.original?e[r.name]=r.original:delete e[r.name]}this._extended=null}}replace(e,t){let n=this,r=e[t];if(!r)throw Error(`Method `+t+` undefined`);e[t]=function(){var e=[...arguments];n.queue({args:e,fn:r,context:this})}}queue(e){typeof e==`function`?this._queue.push({fn:e}):this._queue.push(e),this._flushIfNeeded()}_flushIfNeeded(){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=Nm(()=>{this.flush()},this.delay))}flush(){var e,t;_f(e=tp(t=this._queue).call(t,0)).call(e,e=>{e.fn.apply(e.context||e.fn,e.args||[])})}},hx=class e{constructor(){Jc(this,`_subscribers`,{"*":[],add:[],remove:[],update:[]}),Jc(this,`subscribe`,e.prototype.on),Jc(this,`unsubscribe`,e.prototype.off)}_trigger(e,t,n){var r;if(e===`*`)throw Error(`Cannot trigger event *`);_f(r=[...this._subscribers[e],...this._subscribers[`*`]]).call(r,r=>{r(e,t,n??null)})}on(e,t){typeof t==`function`&&this._subscribers[e].push(t)}off(e,t){var n;this._subscribers[e]=ou(n=this._subscribers[e]).call(n,e=>e!==t)}},gx={},_x={},vx;function yx(){return vx?_x:(vx=1,Yv()(`Set`,function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},iy()),_x)}var bx;function xx(){return bx?gx:(bx=1,yx(),gx)}var Sx={},Cx,wx;function Tx(){if(wx)return Cx;wx=1;var e=Je(),t=TypeError;return Cx=function(n){if(typeof n==`object`&&`size`in n&&`has`in n&&`add`in n&&`delete`in n&&`keys`in n)return n;throw new t(e(n)+` is not a set`)},Cx}var Ex,Dx;function Ox(){if(Dx)return Ex;Dx=1;var e=N(),t=fy(),n=e(`Set`),r=n.prototype;return Ex={Set:n,add:t(`add`,1),has:t(`has`,1),remove:t(`delete`,1),proto:r},Ex}var kx,Ax;function jx(){if(Ax)return kx;Ax=1;var e=A();return kx=function(t,n,r){for(var i=r?t:t.iterator,a=t.next,o,s;!(o=e(a,i)).done;)if(s=n(o.value),s!==void 0)return s},kx}var Mx,Nx;function Px(){if(Nx)return Mx;Nx=1;var e=jx();return Mx=function(t,n,r){return r?e(t.keys(),n,!0):t.forEach(n)},Mx}var Fx,Ix;function Lx(){if(Ix)return Fx;Ix=1;var e=Ox(),t=Px(),n=e.Set,r=e.add;return Fx=function(e){var i=new n;return t(e,function(e){r(i,e)}),i},Fx}var Rx,zx;function Bx(){return zx?Rx:(zx=1,Rx=function(e){return e.size},Rx)}var Vx,Hx;function Ux(){return Hx?Vx:(Hx=1,Vx=function(e){return{iterator:e,next:e.next,done:!1}},Vx)}var Wx,Gx;function Kx(){if(Gx)return Wx;Gx=1;var e=Ze(),t=en(),n=A(),r=Fn(),i=Ux(),a=`Invalid size`,o=RangeError,s=TypeError,c=Math.max,l=function(t,n){this.set=t,this.size=c(n,0),this.has=e(t.has),this.keys=e(t.keys)};return l.prototype={getIterator:function(){return i(t(n(this.keys,this.set)))},includes:function(e){return n(this.has,this.set,e)}},Wx=function(e){t(e);var n=+e.size;if(n!==n)throw new s(a);var i=r(n);if(i<0)throw new o(a);return new l(e,i)},Wx}var qx,Jx;function Yx(){if(Jx)return qx;Jx=1;var e=Tx(),t=Ox(),n=Lx(),r=Bx(),i=Kx(),a=Px(),o=jx(),s=t.has,c=t.remove;return qx=function(t){var l=e(this),u=i(t),d=n(l);return r(l)<=u.size?a(l,function(e){u.includes(e)&&c(d,e)}):o(u.getIterator(),function(e){s(d,e)&&c(d,e)}),d},qx}var Xx,Zx;function Qx(){return Zx?Xx:(Zx=1,Xx=function(){return!1},Xx)}var $x;function eS(){if($x)return Sx;$x=1;var e=P(),t=Yx(),n=l();return e({target:`Set`,proto:!0,real:!0,forced:!Qx()(`difference`,function(e){return e.size===0})||n(function(){var e={size:1,has:function(){return!0},keys:function(){var e=0;return{next:function(){var n=e++>1;return t.has(1)&&t.clear(),{done:n,value:2}}}}},t=new Set([1,2,3,4]);return t.difference(e).size!==3})},{difference:t}),Sx}var tS={},nS,rS;function iS(){if(rS)return nS;rS=1;var e=Tx(),t=Ox(),n=Bx(),r=Kx(),i=Px(),a=jx(),o=t.Set,s=t.add,c=t.has;return nS=function(t){var l=e(this),u=r(t),d=new o;return n(l)>u.size?a(u.getIterator(),function(e){c(l,e)&&s(d,e)}):i(l,function(e){u.includes(e)&&s(d,e)}),d},nS}var aS;function oS(){if(aS)return tS;aS=1;var e=P(),t=l(),n=iS();return e({target:`Set`,proto:!0,real:!0,forced:!Qx()(`intersection`,function(e){return e.size===2&&e.has(1)&&e.has(2)})||t(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!==`3,2`})},{intersection:n}),tS}var sS={},cS,lS;function uS(){if(lS)return cS;lS=1;var e=Tx(),t=Ox().has,n=Bx(),r=Kx(),i=Px(),a=jx(),o=Bv();return cS=function(s){var c=e(this),l=r(s);if(n(c)<=l.size)return i(c,function(e){if(l.includes(e))return!1},!0)!==!1;var u=l.getIterator();return a(u,function(e){if(t(c,e))return o(u,`normal`,!1)})!==!1},cS}var dS;function fS(){if(dS)return sS;dS=1;var e=P(),t=uS();return e({target:`Set`,proto:!0,real:!0,forced:!Qx()(`isDisjointFrom`,function(e){return!e})},{isDisjointFrom:t}),sS}var pS={},mS,hS;function gS(){if(hS)return mS;hS=1;var e=Tx(),t=Bx(),n=Px(),r=Kx();return mS=function(i){var a=e(this),o=r(i);return t(a)>o.size?!1:n(a,function(e){if(!o.includes(e))return!1},!0)!==!1},mS}var _S;function vS(){if(_S)return pS;_S=1;var e=P(),t=gS();return e({target:`Set`,proto:!0,real:!0,forced:!Qx()(`isSubsetOf`,function(e){return e})},{isSubsetOf:t}),pS}var yS={},bS,xS;function SS(){if(xS)return bS;xS=1;var e=Tx(),t=Ox().has,n=Bx(),r=Kx(),i=jx(),a=Bv();return bS=function(o){var s=e(this),c=r(o);if(n(s)<c.size)return!1;var l=c.getIterator();return i(l,function(e){if(!t(s,e))return a(l,`normal`,!1)})!==!1},bS}var CS;function wS(){if(CS)return yS;CS=1;var e=P(),t=SS();return e({target:`Set`,proto:!0,real:!0,forced:!Qx()(`isSupersetOf`,function(e){return!e})},{isSupersetOf:t}),yS}var TS={},ES,DS;function OS(){if(DS)return ES;DS=1;var e=Tx(),t=Ox(),n=Lx(),r=Kx(),i=jx(),a=t.add,o=t.has,s=t.remove;return ES=function(t){var c=e(this),l=r(t).getIterator(),u=n(c);return i(l,function(e){o(c,e)?s(u,e):a(u,e)}),u},ES}var kS,AS;function jS(){return AS?kS:(AS=1,kS=function(e){try{var t=new Set,n=t[e]({size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return t.clear(),t.add(4),function(){return{done:!0}}}})}});return n.size===1&&n.values().next().value===4}catch{return!1}},kS)}var MS;function NS(){if(MS)return TS;MS=1;var e=P(),t=OS(),n=jS();return e({target:`Set`,proto:!0,real:!0,forced:!Qx()(`symmetricDifference`)||!n(`symmetricDifference`)},{symmetricDifference:t}),TS}var PS={},FS,IS;function LS(){if(IS)return FS;IS=1;var e=Tx(),t=Ox().add,n=Lx(),r=Kx(),i=jx();return FS=function(a){var o=e(this),s=r(a).getIterator(),c=n(o);return i(s,function(e){t(c,e)}),c},FS}var RS;function zS(){if(RS)return PS;RS=1;var e=P(),t=LS(),n=jS();return e({target:`Set`,proto:!0,real:!0,forced:!Qx()(`union`)||!n(`union`)},{union:t}),PS}var BS,VS;function HS(){return VS?BS:(VS=1,Jo(),xx(),eS(),oS(),fS(),vS(),wS(),NS(),zS(),fc(),BS=M().Set,BS)}var US,WS;function GS(){if(WS)return US;WS=1;var e=HS();return $o(),US=e,US}var KS,qS;function JS(){return qS?KS:(qS=1,KS=GS(),KS)}var YS=t(JS()),XS,ZS;function QS(){return ZS?XS:(ZS=1,Jo(),fc(),XS=Lv(),XS)}var $S,eC;function tC(){if(eC)return $S;eC=1;var e=QS();return $o(),$S=e,$S}var nC,rC;function iC(){return rC?nC:(rC=1,nC=tC(),nC)}var aC,oC;function sC(){return oC?aC:(oC=1,aC=iC(),aC)}var cC,lC;function uC(){return lC?cC:(lC=1,cC=sC(),cC)}var dC,fC;function pC(){return fC?dC:(fC=1,dC=uC(),dC)}var mC=t(pC()),hC=class e{constructor(e){this._pairs=e}*[qb](){for(let[e,t]of this._pairs)yield[e,t]}*entries(){for(let[e,t]of this._pairs)yield[e,t]}*keys(){for(let[e]of this._pairs)yield e}*values(){for(let[,e]of this._pairs)yield e}toIdArray(){var e;return Su(e=[...this._pairs]).call(e,e=>e[0])}toItemArray(){var e;return Su(e=[...this._pairs]).call(e,e=>e[1])}toEntryArray(){return[...this._pairs]}toObjectMap(){let e=Up(null);for(let[t,n]of this._pairs)e[t]=n;return e}toMap(){return new Dy(this._pairs)}toIdSet(){return new YS(this.toIdArray())}toItemSet(){return new YS(this.toItemArray())}cache(){return new e([...this._pairs])}distinct(e){let t=new YS;for(let[n,r]of this._pairs)t.add(e(r,n));return t}filter(t){let n=this._pairs;return new e({*[qb](){for(let[e,r]of n)t(r,e)&&(yield[e,r])}})}forEach(e){for(let[t,n]of this._pairs)e(n,t)}map(t){let n=this._pairs;return new e({*[qb](){for(let[e,r]of n)yield[e,t(r,e)]}})}max(e){let t=mC(this._pairs),n=t.next();if(n.done)return null;let r=n.value[1],i=e(n.value[1],n.value[0]);for(;!(n=t.next()).done;){let[t,a]=n.value,o=e(a,t);o>i&&(i=o,r=a)}return r}min(e){let t=mC(this._pairs),n=t.next();if(n.done)return null;let r=n.value[1],i=e(n.value[1],n.value[0]);for(;!(n=t.next()).done;){let[t,a]=n.value,o=e(a,t);o<i&&(i=o,r=a)}return r}reduce(e,t){for(let[n,r]of this._pairs)t=e(t,r,n);return t}sort(t){return new e({[qb]:()=>{var e;return mC(Ab(e=[...this._pairs]).call(e,(e,n)=>{let[r,i]=e,[a,o]=n;return t(i,o,r,a)}))}})}};function gC(e,t){var n=Zd(e);if(T_){var r=T_(e);t&&(r=ou(r).call(r,function(t){return R_(e,t).enumerable})),n.push.apply(n,r)}return n}function _C(e){for(var t=1;t<arguments.length;t++){var n,r,i=arguments[t]==null?{}:arguments[t];t%2?_f(n=gC(Object(i),!0)).call(n,function(t){Jc(e,t,i[t])}):Z_?uv(e,Z_(i)):_f(r=gC(Object(i))).call(r,function(t){mv(e,t,R_(i,t))})}return e}function vC(e,t){return e[t]??(e[t]=dx()),e}var yC=class extends hx{get idProp(){return this._idProp}constructor(e,t){super(),Jc(this,`_queue`,null),e&&!Rd(e)&&(t=e,e=[]),this._options=t||{},this._data=new Dy,this.length=0,this._idProp=this._options.fieldId||`id`,e&&e.length&&this.add(e),this.setOptions(t)}setOptions(e){e&&e.queue!==void 0&&(e.queue===!1?this._queue&&=(this._queue.destroy(),null):(this._queue||=mx.extend(this,{replace:[`add`,`update`,`remove`]}),e.queue&&typeof e.queue==`object`&&this._queue.setOptions(e.queue)))}add(e,t){let n=[],r;if(Rd(e)){let t=Su(e).call(e,e=>e[this._idProp]);if(Uy(t).call(t,e=>this._data.has(e)))throw Error(`A duplicate id was found in the parameter array.`);for(let t=0,i=e.length;t<i;t++)r=this._addItem(e[t]),n.push(r)}else if(e&&typeof e==`object`)r=this._addItem(e),n.push(r);else throw Error(`Unknown dataType`);return n.length&&this._trigger(`add`,{items:n},t),n}update(e,t){let n=[],r=[],i=[],a=[],o=this._idProp,s=e=>{let t=e[o];if(t!=null&&this._data.has(t)){let n=e,o=_p({},this._data.get(t)),s=this._updateItem(n);r.push(s),a.push(n),i.push(o)}else{let t=this._addItem(e);n.push(t)}};if(Rd(e))for(let t=0,n=e.length;t<n;t++)e[t]&&typeof e[t]==`object`?s(e[t]):console.warn(`Ignoring input item, which is not an object at index `+t);else if(e&&typeof e==`object`)s(e);else throw Error(`Unknown dataType`);if(n.length&&this._trigger(`add`,{items:n},t),r.length){let e={items:r,oldData:i,data:a};this._trigger(`update`,e,t)}return Ap(n).call(n,r)}updateOnly(e,t){var n;Rd(e)||(e=[e]);let r=Su(n=Su(e).call(e,e=>{let t=this._data.get(e[this._idProp]);if(t==null)throw Error(`Updating non-existent items is not allowed.`);return{oldData:t,update:e}})).call(n,e=>{let{oldData:t,update:n}=e,r=t[this._idProp],i=s_(t,n);return this._data.set(r,i),{id:r,oldData:t,updatedData:i}});if(r.length){let e={items:Su(r).call(r,e=>e.id),oldData:Su(r).call(r,e=>e.oldData),data:Su(r).call(r,e=>e.updatedData)};return this._trigger(`update`,e,t),e.items}else return[]}get(e,t){let n,r,i;px(e)?(n=e,i=t):Rd(e)?(r=e,i=t):i=e;let a=i&&i.returnType===`Object`?`Object`:`Array`,o=i&&ou(i),s=[],c,l,u;if(n!=null)c=this._data.get(n),c&&o&&!o(c)&&(c=void 0);else if(r!=null)for(let e=0,t=r.length;e<t;e++)c=this._data.get(r[e]),c!=null&&(!o||o(c))&&s.push(c);else{var d;l=[...nb(d=this._data).call(d)];for(let e=0,t=l.length;e<t;e++)u=l[e],c=this._data.get(u),c!=null&&(!o||o(c))&&s.push(c)}if(i&&i.order&&n==null&&this._sort(s,i.order),i&&i.fields){let e=i.fields;if(n!=null&&c!=null)c=this._filterFields(c,e);else for(let t=0,n=s.length;t<n;t++)s[t]=this._filterFields(s[t],e)}if(a==`Object`){let e={};for(let t=0,n=s.length;t<n;t++){let n=s[t],r=n[this._idProp];e[r]=n}return e}else if(n!=null)return c??null;else return s}getIds(e){let t=this._data,n=e&&ou(e),r=e&&e.order,i=[...nb(t).call(t)],a=[];if(n)if(r){let e=[];for(let t=0,r=i.length;t<r;t++){let r=i[t],a=this._data.get(r);a!=null&&n(a)&&e.push(a)}this._sort(e,r);for(let t=0,n=e.length;t<n;t++)a.push(e[t][this._idProp])}else for(let e=0,t=i.length;e<t;e++){let t=i[e],r=this._data.get(t);r!=null&&n(r)&&a.push(r[this._idProp])}else if(r){let e=[];for(let n=0,r=i.length;n<r;n++){let r=i[n];e.push(t.get(r))}this._sort(e,r);for(let t=0,n=e.length;t<n;t++)a.push(e[t][this._idProp])}else for(let e=0,n=i.length;e<n;e++){let n=i[e],r=t.get(n);r!=null&&a.push(r[this._idProp])}return a}getDataSet(){return this}forEach(e,t){let n=t&&ou(t),r=this._data,i=[...nb(r).call(r)];if(t&&t.order){let n=this.get(t);for(let t=0,r=n.length;t<r;t++){let r=n[t],i=r[this._idProp];e(r,i)}}else for(let t=0,r=i.length;t<r;t++){let r=i[t],a=this._data.get(r);a!=null&&(!n||n(a))&&e(a,r)}}map(e,t){let n=t&&ou(t),r=[],i=this._data,a=[...nb(i).call(i)];for(let t=0,i=a.length;t<i;t++){let i=a[t],o=this._data.get(i);o!=null&&(!n||n(o))&&r.push(e(o,i))}return t&&t.order&&this._sort(r,t.order),r}_filterFields(e,t){var n;return e&&Wl(n=Rd(t)?t:Zd(t)).call(n,(t,n)=>(t[n]=e[n],t),{})}_sort(e,t){if(typeof t==`string`){let n=t;Ab(e).call(e,(e,t)=>{let r=e[n],i=t[n];return r>i?1:r<i?-1:0})}else if(typeof t==`function`)Ab(e).call(e,t);else throw TypeError(`Order must be a function or a string`)}remove(e,t){let n=[],r=[],i=Rd(e)?e:[e];for(let e=0,t=i.length;e<t;e++){let t=this._remove(i[e]);if(t){let e=t[this._idProp];e!=null&&(n.push(e),r.push(t))}}return n.length&&this._trigger(`remove`,{items:n,oldData:r},t),n}_remove(e){let t;if(px(e)?t=e:e&&typeof e==`object`&&(t=e[this._idProp]),t!=null&&this._data.has(t)){let e=this._data.get(t)||null;return this._data.delete(t),--this.length,e}return null}clear(e){var t;let n=[...nb(t=this._data).call(t)],r=[];for(let e=0,t=n.length;e<t;e++)r.push(this._data.get(n[e]));return this._data.clear(),this.length=0,this._trigger(`remove`,{items:n,oldData:r},e),n}max(e){let t=null,n=null;for(let i of Ub(r=this._data).call(r)){var r;let a=i[e];typeof a==`number`&&(n==null||a>n)&&(t=i,n=a)}return t||null}min(e){let t=null,n=null;for(let i of Ub(r=this._data).call(r)){var r;let a=i[e];typeof a==`number`&&(n==null||a<n)&&(t=i,n=a)}return t||null}distinct(e){let t=this._data,n=[...nb(t).call(t)],r=[],i=0;for(let a=0,o=n.length;a<o;a++){let o=n[a],s=t.get(o)[e],c=!1;for(let e=0;e<i;e++)if(r[e]==s){c=!0;break}!c&&s!==void 0&&(r[i]=s,i++)}return r}_addItem(e){let t=vC(e,this._idProp),n=t[this._idProp];if(this._data.has(n))throw Error(`Cannot add item: item with id `+n+` already exists`);return this._data.set(n,t),++this.length,n}_updateItem(e){let t=e[this._idProp];if(t==null)throw Error(`Cannot update item: item has no id (item: `+dm(e)+`)`);let n=this._data.get(t);if(!n)throw Error(`Cannot update item: no item with id `+t+` found`);return this._data.set(t,_C(_C({},n),e)),t}stream(e){if(e){let t=this._data;return new hC({*[qb](){for(let n of e){let e=t.get(n);e!=null&&(yield[n,e])}}})}else{var t;return new hC({[qb]:gl(t=ox(this._data)).call(t,this._data)})}}};function bC(e,t){return typeof t==`object`&&!!t&&e===t.idProp&&typeof t.add==`function`&&typeof t.clear==`function`&&typeof t.distinct==`function`&&typeof _f(t)==`function`&&typeof t.get==`function`&&typeof t.getDataSet==`function`&&typeof t.getIds==`function`&&typeof t.length==`number`&&typeof Su(t)==`function`&&typeof t.max==`function`&&typeof t.min==`function`&&typeof t.off==`function`&&typeof t.on==`function`&&typeof t.remove==`function`&&typeof t.setOptions==`function`&&typeof t.stream==`function`&&typeof t.update==`function`&&typeof t.updateOnly==`function`}function xC(e,t){return typeof t==`object`&&!!t&&e===t.idProp&&typeof _f(t)==`function`&&typeof t.get==`function`&&typeof t.getDataSet==`function`&&typeof t.getIds==`function`&&typeof t.length==`number`&&typeof Su(t)==`function`&&typeof t.off==`function`&&typeof t.on==`function`&&typeof t.stream==`function`&&bC(e,t.getDataSet())}var SC=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function F(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var CC={},wC,TC;function EC(){if(TC)return wC;TC=1;var e=function(e){return e&&e.Math===Math&&e};return wC=e(typeof globalThis==`object`&&globalThis)||e(typeof window==`object`&&window)||e(typeof self==`object`&&self)||e(typeof SC==`object`&&SC)||e(typeof wC==`object`&&wC)||(function(){return this})()||Function(`return this`)(),wC}var DC,OC;function I(){return OC?DC:(OC=1,DC=function(e){try{return!!e()}catch{return!0}},DC)}var kC,AC;function jC(){return AC?kC:(AC=1,kC=!I()(function(){var e=(function(){}).bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)}),kC)}var MC,NC;function PC(){if(NC)return MC;NC=1;var e=jC(),t=Function.prototype,n=t.apply,r=t.call;return MC=typeof Reflect==`object`&&Reflect.apply||(e?r.bind(n):function(){return r.apply(n,arguments)}),MC}var FC,IC;function L(){if(IC)return FC;IC=1;var e=jC(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return FC=e?r:function(e){return function(){return n.apply(e,arguments)}},FC}var LC,RC;function zC(){if(RC)return LC;RC=1;var e=L(),t=e({}.toString),n=e(``.slice);return LC=function(e){return n(t(e),8,-1)},LC}var BC,VC;function HC(){if(VC)return BC;VC=1;var e=zC(),t=L();return BC=function(n){if(e(n)===`Function`)return t(n)},BC}var UC,WC;function GC(){if(WC)return UC;WC=1;var e=typeof document==`object`&&document.all;return UC=e===void 0&&e!==void 0?function(t){return typeof t==`function`||t===e}:function(e){return typeof e==`function`},UC}var KC={},qC,JC;function YC(){return JC?qC:(JC=1,qC=!I()(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),qC)}var XC,ZC;function QC(){if(ZC)return XC;ZC=1;var e=jC(),t=Function.prototype.call;return XC=e?t.bind(t):function(){return t.apply(t,arguments)},XC}var $C={},ew;function tw(){if(ew)return $C;ew=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor;return $C.f=t&&!e.call({1:2},1)?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,$C}var nw,rw;function iw(){return rw?nw:(rw=1,nw=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},nw)}var aw,ow;function sw(){if(ow)return aw;ow=1;var e=L(),t=I(),n=zC(),r=Object,i=e(``.split);return aw=t(function(){return!r(`z`).propertyIsEnumerable(0)})?function(e){return n(e)===`String`?i(e,``):r(e)}:r,aw}var cw,lw;function uw(){return lw?cw:(lw=1,cw=function(e){return e==null},cw)}var dw,fw;function pw(){if(fw)return dw;fw=1;var e=uw(),t=TypeError;return dw=function(n){if(e(n))throw new t(`Can't call method on `+n);return n},dw}var mw,hw;function gw(){if(hw)return mw;hw=1;var e=sw(),t=pw();return mw=function(n){return e(t(n))},mw}var _w,vw;function yw(){if(vw)return _w;vw=1;var e=GC();return _w=function(t){return typeof t==`object`?t!==null:e(t)},_w}var bw,xw;function R(){return xw?bw:(xw=1,bw={},bw)}var Sw,Cw;function ww(){if(Cw)return Sw;Cw=1;var e=R(),t=EC(),n=GC(),r=function(e){return n(e)?e:void 0};return Sw=function(n,i){return arguments.length<2?r(e[n])||r(t[n]):e[n]&&e[n][i]||t[n]&&t[n][i]},Sw}var Tw,Ew;function Dw(){return Ew?Tw:(Ew=1,Tw=L()({}.isPrototypeOf),Tw)}var Ow,kw;function Aw(){if(kw)return Ow;kw=1;var e=EC().navigator,t=e&&e.userAgent;return Ow=t?String(t):``,Ow}var jw,Mw;function Nw(){if(Mw)return jw;Mw=1;var e=EC(),t=Aw(),n=e.process,r=e.Deno,i=n&&n.versions||r&&r.version,a=i&&i.v8,o,s;return a&&(o=a.split(`.`),s=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!s&&t&&(o=t.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=t.match(/Chrome\/(\d+)/),o&&(s=+o[1]))),jw=s,jw}var Pw,Fw;function Iw(){if(Fw)return Pw;Fw=1;var e=Nw(),t=I(),n=EC().String;return Pw=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol(`symbol detection`);return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Pw}var Lw,Rw;function zw(){return Rw?Lw:(Rw=1,Lw=Iw()&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,Lw)}var Bw,Vw;function Hw(){if(Vw)return Bw;Vw=1;var e=ww(),t=GC(),n=Dw(),r=zw(),i=Object;return Bw=r?function(e){return typeof e==`symbol`}:function(r){var a=e(`Symbol`);return t(a)&&n(a.prototype,i(r))},Bw}var Uw,Ww;function Gw(){if(Ww)return Uw;Ww=1;var e=String;return Uw=function(t){try{return e(t)}catch{return`Object`}},Uw}var Kw,qw;function Jw(){if(qw)return Kw;qw=1;var e=GC(),t=Gw(),n=TypeError;return Kw=function(r){if(e(r))return r;throw new n(t(r)+` is not a function`)},Kw}var Yw,Xw;function Zw(){if(Xw)return Yw;Xw=1;var e=Jw(),t=uw();return Yw=function(n,r){var i=n[r];return t(i)?void 0:e(i)},Yw}var Qw,$w;function eT(){if($w)return Qw;$w=1;var e=QC(),t=GC(),n=yw(),r=TypeError;return Qw=function(i,a){var o,s;if(a===`string`&&t(o=i.toString)&&!n(s=e(o,i))||t(o=i.valueOf)&&!n(s=e(o,i))||a!==`string`&&t(o=i.toString)&&!n(s=e(o,i)))return s;throw new r(`Can't convert object to primitive value`)},Qw}var tT={exports:{}},nT,rT;function iT(){return rT?nT:(rT=1,nT=!0,nT)}var aT,oT;function sT(){if(oT)return aT;oT=1;var e=EC(),t=Object.defineProperty;return aT=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch{e[n]=r}return r},aT}var cT;function lT(){if(cT)return tT.exports;cT=1;var e=iT(),t=EC(),n=sT(),r=`__core-js_shared__`,i=tT.exports=t[r]||n(r,{});return(i.versions||=[]).push({version:`3.44.0`,mode:e?`pure`:`global`,copyright:`© 2014-2025 Denis Pushkarev (zloirock.ru)`,license:`https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE`,source:`https://github.com/zloirock/core-js`}),tT.exports}var uT,dT;function fT(){if(dT)return uT;dT=1;var e=lT();return uT=function(t,n){return e[t]||(e[t]=n||{})},uT}var pT,mT;function hT(){if(mT)return pT;mT=1;var e=pw(),t=Object;return pT=function(n){return t(e(n))},pT}var gT,_T;function vT(){if(_T)return gT;_T=1;var e=L(),t=hT(),n=e({}.hasOwnProperty);return gT=Object.hasOwn||function(e,r){return n(t(e),r)},gT}var yT,bT;function xT(){if(bT)return yT;bT=1;var e=L(),t=0,n=Math.random(),r=e(1.1.toString);return yT=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+r(++t+n,36)},yT}var ST,CT;function wT(){if(CT)return ST;CT=1;var e=EC(),t=fT(),n=vT(),r=xT(),i=Iw(),a=zw(),o=e.Symbol,s=t(`wks`),c=a?o.for||o:o&&o.withoutSetter||r;return ST=function(e){return n(s,e)||(s[e]=i&&n(o,e)?o[e]:c(`Symbol.`+e)),s[e]},ST}var TT,ET;function DT(){if(ET)return TT;ET=1;var e=QC(),t=yw(),n=Hw(),r=Zw(),i=eT(),a=wT(),o=TypeError,s=a(`toPrimitive`);return TT=function(a,c){if(!t(a)||n(a))return a;var l=r(a,s),u;if(l){if(c===void 0&&(c=`default`),u=e(l,a,c),!t(u)||n(u))return u;throw new o(`Can't convert object to primitive value`)}return c===void 0&&(c=`number`),i(a,c)},TT}var OT,kT;function AT(){if(kT)return OT;kT=1;var e=DT(),t=Hw();return OT=function(n){var r=e(n,`string`);return t(r)?r:r+``},OT}var jT,MT;function NT(){if(MT)return jT;MT=1;var e=EC(),t=yw(),n=e.document,r=t(n)&&t(n.createElement);return jT=function(e){return r?n.createElement(e):{}},jT}var PT,FT;function IT(){if(FT)return PT;FT=1;var e=YC(),t=I(),n=NT();return PT=!e&&!t(function(){return Object.defineProperty(n(`div`),"a",{get:function(){return 7}}).a!==7}),PT}var LT;function RT(){if(LT)return KC;LT=1;var e=YC(),t=QC(),n=tw(),r=iw(),i=gw(),a=AT(),o=vT(),s=IT(),c=Object.getOwnPropertyDescriptor;return KC.f=e?c:function(e,l){if(e=i(e),l=a(l),s)try{return c(e,l)}catch{}if(o(e,l))return r(!t(n.f,e,l),e[l])},KC}var zT,BT;function VT(){if(BT)return zT;BT=1;var e=I(),t=GC(),n=/#|\.prototype\./,r=function(n,r){var c=a[i(n)];return c===s?!0:c===o?!1:t(r)?e(r):!!r},i=r.normalize=function(e){return String(e).replace(n,`.`).toLowerCase()},a=r.data={},o=r.NATIVE=`N`,s=r.POLYFILL=`P`;return zT=r,zT}var HT,UT;function WT(){if(UT)return HT;UT=1;var e=HC(),t=Jw(),n=jC(),r=e(e.bind);return HT=function(e,i){return t(e),i===void 0?e:n?r(e,i):function(){return e.apply(i,arguments)}},HT}var GT={},KT,qT;function JT(){return qT?KT:(qT=1,KT=YC()&&I()(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),KT)}var YT,XT;function ZT(){if(XT)return YT;XT=1;var e=yw(),t=String,n=TypeError;return YT=function(r){if(e(r))return r;throw new n(t(r)+` is not an object`)},YT}var QT;function $T(){if(QT)return GT;QT=1;var e=YC(),t=IT(),n=JT(),r=ZT(),i=AT(),a=TypeError,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=`enumerable`,l=`configurable`,u=`writable`;return GT.f=e?n?function(e,t,n){if(r(e),t=i(t),r(n),typeof e==`function`&&t===`prototype`&&`value`in n&&u in n&&!n[u]){var a=s(e,t);a&&a[u]&&(e[t]=n.value,n={configurable:l in n?n[l]:a[l],enumerable:c in n?n[c]:a[c],writable:!1})}return o(e,t,n)}:o:function(e,n,s){if(r(e),n=i(n),r(s),t)try{return o(e,n,s)}catch{}if(`get`in s||`set`in s)throw new a(`Accessors not supported`);return`value`in s&&(e[n]=s.value),e},GT}var eE,tE;function nE(){if(tE)return eE;tE=1;var e=YC(),t=$T(),n=iw();return eE=e?function(e,r,i){return t.f(e,r,n(1,i))}:function(e,t,n){return e[t]=n,e},eE}var rE,iE;function z(){if(iE)return rE;iE=1;var e=EC(),t=PC(),n=HC(),r=GC(),i=RT().f,a=VT(),o=R(),s=WT(),c=nE(),l=vT(),u=function(e){var n=function(r,i,a){if(this instanceof n){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,i)}return new e(r,i,a)}return t(e,this,arguments)};return n.prototype=e.prototype,n};return rE=function(t,d){var f=t.target,p=t.global,m=t.stat,h=t.proto,g=p?e:m?e[f]:e[f]&&e[f].prototype,_=p?o:o[f]||c(o,f,{})[f],v=_.prototype,y,b,x,S,C,w,T,E,D;for(S in d)y=a(p?S:f+(m?`.`:`#`)+S,t.forced),b=!y&&g&&l(g,S),w=_[S],b&&(t.dontCallGetSet?(D=i(g,S),T=D&&D.value):T=g[S]),C=b&&T?T:d[S],!(!y&&!h&&typeof w==typeof C)&&(E=t.bind&&b?s(C,e):t.wrap&&b?u(C):h&&r(C)?n(C):C,(t.sham||C&&C.sham||w&&w.sham)&&c(E,`sham`,!0),c(_,S,E),h&&(x=f+`Prototype`,l(o,x)||c(o,x,{}),c(o[x],S,C),t.real&&v&&(y||!v[S])&&c(v,S,C)))},rE}var aE,oE;function sE(){if(oE)return aE;oE=1;var e=Math.ceil,t=Math.floor;return aE=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},aE}var cE,lE;function uE(){if(lE)return cE;lE=1;var e=sE();return cE=function(t){var n=+t;return n!==n||n===0?0:e(n)},cE}var dE,fE;function pE(){if(fE)return dE;fE=1;var e=uE(),t=Math.max,n=Math.min;return dE=function(r,i){var a=e(r);return a<0?t(a+i,0):n(a,i)},dE}var mE,hE;function gE(){if(hE)return mE;hE=1;var e=uE(),t=Math.min;return mE=function(n){var r=e(n);return r>0?t(r,9007199254740991):0},mE}var _E,vE;function yE(){if(vE)return _E;vE=1;var e=gE();return _E=function(t){return e(t.length)},_E}var bE,xE;function SE(){if(xE)return bE;xE=1;var e=gw(),t=pE(),n=yE(),r=function(r){return function(i,a,o){var s=e(i),c=n(s);if(c===0)return!r&&-1;var l=t(o,c),u;if(r&&a!==a){for(;c>l;)if(u=s[l++],u!==u)return!0}else for(;c>l;l++)if((r||l in s)&&s[l]===a)return r||l||0;return!r&&-1}};return bE={includes:r(!0),indexOf:r(!1)},bE}var CE,wE;function TE(){return wE?CE:(wE=1,CE={},CE)}var EE,DE;function OE(){if(DE)return EE;DE=1;var e=L(),t=vT(),n=gw(),r=SE().indexOf,i=TE(),a=e([].push);return EE=function(e,o){var s=n(e),c=0,l=[],u;for(u in s)!t(i,u)&&t(s,u)&&a(l,u);for(;o.length>c;)t(s,u=o[c++])&&(~r(l,u)||a(l,u));return l},EE}var kE,AE;function jE(){return AE?kE:(AE=1,kE=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],kE)}var ME,NE;function PE(){if(NE)return ME;NE=1;var e=OE(),t=jE();return ME=Object.keys||function(n){return e(n,t)},ME}var FE={},IE;function LE(){return IE?FE:(IE=1,FE.f=Object.getOwnPropertySymbols,FE)}var RE,zE;function BE(){if(zE)return RE;zE=1;var e=YC(),t=L(),n=QC(),r=I(),i=PE(),a=LE(),o=tw(),s=hT(),c=sw(),l=Object.assign,u=Object.defineProperty,d=t([].concat);return RE=!l||r(function(){if(e&&l({b:1},l(u({},`a`,{enumerable:!0,get:function(){u(this,`b`,{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},n={},r=Symbol(`assign detection`),a=`abcdefghijklmnopqrst`;return t[r]=7,a.split(``).forEach(function(e){n[e]=e}),l({},t)[r]!==7||i(l({},n)).join(``)!==a})?function(t,r){for(var l=s(t),u=arguments.length,f=1,p=a.f,m=o.f;u>f;)for(var h=c(arguments[f++]),g=p?d(i(h),p(h)):i(h),_=g.length,v=0,y;_>v;)y=g[v++],(!e||n(m,h,y))&&(l[y]=h[y]);return l}:l,RE}var VE;function HE(){if(VE)return CC;VE=1;var e=z(),t=BE();return e({target:`Object`,stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),CC}var UE,WE;function GE(){return WE?UE:(WE=1,HE(),UE=R().Object.assign,UE)}var KE,qE;function JE(){return qE?KE:(qE=1,KE=GE(),KE)}var YE,XE;function ZE(){return XE?YE:(XE=1,YE=JE(),YE)}var QE=F(ZE()),$E={},eD,tD;function nD(){return tD?eD:(tD=1,eD=L()([].slice),eD)}var rD,iD;function aD(){if(iD)return rD;iD=1;var e=L(),t=Jw(),n=yw(),r=vT(),i=nD(),a=jC(),o=Function,s=e([].concat),c=e([].join),l={},u=function(e,t,n){if(!r(l,t)){for(var i=[],a=0;a<t;a++)i[a]=`a[`+a+`]`;l[t]=o(`C,a`,`return new C(`+c(i,`,`)+`)`)}return l[t](e,n)};return rD=a?o.bind:function(e){var r=t(this),a=r.prototype,o=i(arguments,1),c=function(){var t=s(o,i(arguments));return this instanceof c?u(r,t.length,t):r.apply(e,t)};return n(a)&&(c.prototype=a),c},rD}var oD;function sD(){if(oD)return $E;oD=1;var e=z(),t=aD();return e({target:`Function`,proto:!0,forced:Function.bind!==t},{bind:t}),$E}var cD,lD;function uD(){if(lD)return cD;lD=1;var e=EC(),t=R();return cD=function(n,r){var i=t[n+`Prototype`],a=i&&i[r];if(a)return a;var o=e[n],s=o&&o.prototype;return s&&s[r]},cD}var dD,fD;function pD(){return fD?dD:(fD=1,sD(),dD=uD()(`Function`,`bind`),dD)}var mD,hD;function gD(){if(hD)return mD;hD=1;var e=Dw(),t=pD(),n=Function.prototype;return mD=function(r){var i=r.bind;return r===n||e(n,r)&&i===n.bind?t:i},mD}var _D,vD;function yD(){return vD?_D:(vD=1,_D=gD(),_D)}var bD,xD;function SD(){return xD?bD:(xD=1,bD=yD(),bD)}var B=F(SD());function CD(e,t,n,r){e.beginPath(),e.arc(t,n,r,0,2*Math.PI,!1),e.closePath()}function wD(e,t,n,r){e.beginPath(),e.rect(t-r,n-r,r*2,r*2),e.closePath()}function TD(e,t,n,r){e.beginPath(),r*=1.15,n+=.275*r;let i=r*2,a=i/2,o=Math.sqrt(3)/6*i,s=Math.sqrt(i*i-a*a);e.moveTo(t,n-(s-o)),e.lineTo(t+a,n+o),e.lineTo(t-a,n+o),e.lineTo(t,n-(s-o)),e.closePath()}function ED(e,t,n,r){e.beginPath(),r*=1.15,n-=.275*r;let i=r*2,a=i/2,o=Math.sqrt(3)/6*i,s=Math.sqrt(i*i-a*a);e.moveTo(t,n+(s-o)),e.lineTo(t+a,n-o),e.lineTo(t-a,n-o),e.lineTo(t,n+(s-o)),e.closePath()}function DD(e,t,n,r){e.beginPath(),r*=.82,n+=.1*r;for(let i=0;i<10;i++){let a=i%2==0?r*1.3:r*.5;e.lineTo(t+a*Math.sin(i*2*Math.PI/10),n-a*Math.cos(i*2*Math.PI/10))}e.closePath()}function OD(e,t,n,r){e.beginPath(),e.lineTo(t,n+r),e.lineTo(t+r,n),e.lineTo(t,n-r),e.lineTo(t-r,n),e.closePath()}function kD(e,t,n,r,i,a){let o=Math.PI/180;r-2*a<0&&(a=r/2),i-2*a<0&&(a=i/2),e.beginPath(),e.moveTo(t+a,n),e.lineTo(t+r-a,n),e.arc(t+r-a,n+a,a,o*270,o*360,!1),e.lineTo(t+r,n+i-a),e.arc(t+r-a,n+i-a,a,0,o*90,!1),e.lineTo(t+a,n+i),e.arc(t+a,n+i-a,a,o*90,o*180,!1),e.lineTo(t,n+a),e.arc(t+a,n+a,a,o*180,o*270,!1),e.closePath()}function AD(e,t,n,r,i){let a=.5522848,o=r/2*a,s=i/2*a,c=t+r,l=n+i,u=t+r/2,d=n+i/2;e.beginPath(),e.moveTo(t,d),e.bezierCurveTo(t,d-s,u-o,n,u,n),e.bezierCurveTo(u+o,n,c,d-s,c,d),e.bezierCurveTo(c,d+s,u+o,l,u,l),e.bezierCurveTo(u-o,l,t,d+s,t,d),e.closePath()}function jD(e,t,n,r,i){let a=r,o=i*.3333333333333333,s=.5522848,c=a/2*s,l=o/2*s,u=t+a,d=n+o,f=t+a/2,p=n+o/2,m=n+(i-o/2),h=n+i;e.beginPath(),e.moveTo(u,p),e.bezierCurveTo(u,p+l,f+c,d,f,d),e.bezierCurveTo(f-c,d,t,p+l,t,p),e.bezierCurveTo(t,p-l,f-c,n,f,n),e.bezierCurveTo(f+c,n,u,p-l,u,p),e.lineTo(u,m),e.bezierCurveTo(u,m+l,f+c,h,f,h),e.bezierCurveTo(f-c,h,t,m+l,t,m),e.lineTo(t,p)}function MD(e,t,n,r,i,a){e.beginPath(),e.moveTo(t,n);let o=a.length,s=r-t,c=i-n,l=c/s,u=Math.sqrt(s*s+c*c),d=0,f=!0,p=0,m=+a[0];for(;u>=.1;)m=+a[d++%o],m>u&&(m=u),p=Math.sqrt(m*m/(1+l*l)),p=s<0?-p:p,t+=p,n+=l*p,f===!0?e.lineTo(t,n):e.moveTo(t,n),u-=m,f=!f}function ND(e,t,n,r){e.beginPath();let i=Math.PI*2/6;e.moveTo(t+r,n);for(let a=1;a<6;a++)e.lineTo(t+r*Math.cos(i*a),n+r*Math.sin(i*a));e.closePath()}var PD={circle:CD,dashedLine:MD,database:jD,diamond:OD,ellipse:AD,ellipse_vis:AD,hexagon:ND,roundRect:kD,square:wD,star:DD,triangle:TD,triangleDown:ED};function FD(e){return Object.prototype.hasOwnProperty.call(PD,e)?PD[e]:function(t){var n=[...arguments].slice(1);CanvasRenderingContext2D.prototype[e].call(t,n)}}var ID={exports:{}},LD;function RD(){return LD?ID.exports:(LD=1,(function(e){e.exports=t;function t(e){if(e)return n(e)}function n(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[`$`+e]=this._callbacks[`$`+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks[`$`+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks[`$`+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks[`$`+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=Array(arguments.length-1),n=this._callbacks[`$`+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[`$`+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}})(ID),ID.exports)}var zD=F(RD()),BD={},VD,HD;function UD(){if(HD)return VD;HD=1;var e=zC();return VD=Array.isArray||function(t){return e(t)===`Array`},VD}var WD,GD;function KD(){if(GD)return WD;GD=1;var e=TypeError,t=9007199254740991;return WD=function(n){if(n>t)throw e(`Maximum allowed index exceeded`);return n},WD}var qD,JD;function YD(){if(JD)return qD;JD=1;var e=YC(),t=$T(),n=iw();return qD=function(r,i,a){e?t.f(r,i,n(0,a)):r[i]=a},qD}var XD,ZD;function QD(){if(ZD)return XD;ZD=1;var e=wT()(`toStringTag`),t={};return t[e]=`z`,XD=String(t)===`[object z]`,XD}var $D,eO;function tO(){if(eO)return $D;eO=1;var e=QD(),t=GC(),n=zC(),r=wT()(`toStringTag`),i=Object,a=n(function(){return arguments}())===`Arguments`,o=function(e,t){try{return e[t]}catch{}};return $D=e?n:function(e){var s,c,l;return e===void 0?`Undefined`:e===null?`Null`:typeof(c=o(s=i(e),r))==`string`?c:a?n(s):(l=n(s))===`Object`&&t(s.callee)?`Arguments`:l},$D}var nO,rO;function iO(){if(rO)return nO;rO=1;var e=L(),t=GC(),n=lT(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),nO=n.inspectSource,nO}var aO,oO;function sO(){if(oO)return aO;oO=1;var e=L(),t=I(),n=GC(),r=tO(),i=ww(),a=iO(),o=function(){},s=i(`Reflect`,`construct`),c=/^\s*(?:class|function)\b/,l=e(c.exec),u=!c.test(o),d=function(e){if(!n(e))return!1;try{return s(o,[],e),!0}catch{return!1}},f=function(e){if(!n(e))return!1;switch(r(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return u||!!l(c,a(e))}catch{return!0}};return f.sham=!0,aO=!s||t(function(){var e;return d(d.call)||!d(Object)||!d(function(){e=!0})||e})?f:d,aO}var cO,lO;function uO(){if(lO)return cO;lO=1;var e=UD(),t=sO(),n=yw(),r=wT()(`species`),i=Array;return cO=function(a){var o;return e(a)&&(o=a.constructor,t(o)&&(o===i||e(o.prototype))?o=void 0:n(o)&&(o=o[r],o===null&&(o=void 0))),o===void 0?i:o},cO}var dO,fO;function pO(){if(fO)return dO;fO=1;var e=uO();return dO=function(t,n){return new(e(t))(n===0?0:n)},dO}var mO,hO;function gO(){if(hO)return mO;hO=1;var e=I(),t=wT(),n=Nw(),r=t(`species`);return mO=function(t){return n>=51||!e(function(){var e=[],n=e.constructor={};return n[r]=function(){return{foo:1}},e[t](Boolean).foo!==1})},mO}var _O;function vO(){if(_O)return BD;_O=1;var e=z(),t=I(),n=UD(),r=yw(),i=hT(),a=yE(),o=KD(),s=YD(),c=pO(),l=gO(),u=wT(),d=Nw(),f=u(`isConcatSpreadable`),p=d>=51||!t(function(){var e=[];return e[f]=!1,e.concat()[0]!==e}),m=function(e){if(!r(e))return!1;var t=e[f];return t===void 0?n(e):!!t};return e({target:`Array`,proto:!0,arity:1,forced:!p||!l(`concat`)},{concat:function(e){var t=i(this),n=c(t,0),r=0,l,u,d,f,p;for(l=-1,d=arguments.length;l<d;l++)if(p=l===-1?t:arguments[l],m(p))for(f=a(p),o(r+f),u=0;u<f;u++,r++)u in p&&s(n,r,p[u]);else o(r+1),s(n,r++,p);return n.length=r,n}}),BD}var yO={},bO={},xO,SO;function CO(){if(SO)return xO;SO=1;var e=tO(),t=String;return xO=function(n){if(e(n)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return t(n)},xO}var wO={},TO;function EO(){if(TO)return wO;TO=1;var e=YC(),t=JT(),n=$T(),r=ZT(),i=gw(),a=PE();return wO.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var o=i(t),s=a(t),c=s.length,l=0,u;c>l;)n.f(e,u=s[l++],o[u]);return e},wO}var DO,OO;function kO(){return OO?DO:(OO=1,DO=ww()(`document`,`documentElement`),DO)}var AO,jO;function MO(){if(jO)return AO;jO=1;var e=fT(),t=xT(),n=e(`keys`);return AO=function(e){return n[e]||(n[e]=t(e))},AO}var NO,PO;function FO(){if(PO)return NO;PO=1;var e=ZT(),t=EO(),n=jE(),r=TE(),i=kO(),a=NT(),o=MO(),s=`>`,c=`<`,l=`prototype`,u=`script`,d=o(`IE_PROTO`),f=function(){},p=function(e){return c+u+s+e+c+`/`+u+s},m=function(e){e.write(p(``)),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){var e=a(`iframe`),t=`java`+u+`:`,n;return e.style.display=`none`,i.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(p(`document.F=Object`)),n.close(),n.F},g,_=function(){try{g=new ActiveXObject(`htmlfile`)}catch{}_=typeof document<`u`?document.domain&&g?m(g):h():m(g);for(var e=n.length;e--;)delete _[l][n[e]];return _()};return r[d]=!0,NO=Object.create||function(n,r){var i;return n===null?i=_():(f[l]=e(n),i=new f,f[l]=null,i[d]=n),r===void 0?i:t.f(i,r)},NO}var IO={},LO;function RO(){if(LO)return IO;LO=1;var e=OE(),t=jE().concat(`length`,`prototype`);return IO.f=Object.getOwnPropertyNames||function(n){return e(n,t)},IO}var zO={},BO;function VO(){if(BO)return zO;BO=1;var e=zC(),t=gw(),n=RO().f,r=nD(),i=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(e){try{return n(e)}catch{return r(i)}};return zO.f=function(r){return i&&e(r)===`Window`?a(r):n(t(r))},zO}var HO,UO;function WO(){if(UO)return HO;UO=1;var e=nE();return HO=function(t,n,r,i){return i&&i.enumerable?t[n]=r:e(t,n,r),t},HO}var GO,KO;function qO(){if(KO)return GO;KO=1;var e=$T();return GO=function(t,n,r){return e.f(t,n,r)},GO}var JO={},YO;function XO(){return YO?JO:(YO=1,JO.f=wT(),JO)}var ZO,QO;function $O(){if(QO)return ZO;QO=1;var e=R(),t=vT(),n=XO(),r=$T().f;return ZO=function(i){var a=e.Symbol||={};t(a,i)||r(a,i,{value:n.f(i)})},ZO}var ek,tk;function nk(){if(tk)return ek;tk=1;var e=QC(),t=ww(),n=wT(),r=WO();return ek=function(){var i=t(`Symbol`),a=i&&i.prototype,o=a&&a.valueOf,s=n(`toPrimitive`);a&&!a[s]&&r(a,s,function(t){return e(o,this)},{arity:1})},ek}var rk,ik;function ak(){if(ik)return rk;ik=1;var e=QD(),t=tO();return rk=e?{}.toString:function(){return`[object `+t(this)+`]`},rk}var ok,sk;function ck(){if(sk)return ok;sk=1;var e=QD(),t=$T().f,n=nE(),r=vT(),i=ak(),a=wT()(`toStringTag`);return ok=function(o,s,c,l){var u=c?o:o&&o.prototype;u&&(r(u,a)||t(u,a,{configurable:!0,value:s}),l&&!e&&n(u,`toString`,i))},ok}var lk,uk;function dk(){if(uk)return lk;uk=1;var e=EC(),t=GC(),n=e.WeakMap;return lk=t(n)&&/native code/.test(String(n)),lk}var fk,pk;function mk(){if(pk)return fk;pk=1;var e=dk(),t=EC(),n=yw(),r=nE(),i=vT(),a=lT(),o=MO(),s=TE(),c=`Object already initialized`,l=t.TypeError,u=t.WeakMap,d,f,p,m=function(e){return p(e)?f(e):d(e,{})},h=function(e){return function(t){var r;if(!n(t)||(r=f(t)).type!==e)throw new l(`Incompatible receiver, `+e+` required`);return r}};if(e||a.state){var g=a.state||=new u;g.get=g.get,g.has=g.has,g.set=g.set,d=function(e,t){if(g.has(e))throw new l(c);return t.facade=e,g.set(e,t),t},f=function(e){return g.get(e)||{}},p=function(e){return g.has(e)}}else{var _=o(`state`);s[_]=!0,d=function(e,t){if(i(e,_))throw new l(c);return t.facade=e,r(e,_,t),t},f=function(e){return i(e,_)?e[_]:{}},p=function(e){return i(e,_)}}return fk={set:d,get:f,has:p,enforce:m,getterFor:h},fk}var hk,gk;function _k(){if(gk)return hk;gk=1;var e=WT(),t=L(),n=sw(),r=hT(),i=yE(),a=pO(),o=t([].push),s=function(t){var s=t===1,c=t===2,l=t===3,u=t===4,d=t===6,f=t===7,p=t===5||d;return function(m,h,g,_){for(var v=r(m),y=n(v),b=i(y),x=e(h,g),S=0,C=_||a,w=s?C(m,b):c||f?C(m,0):void 0,T,E;b>S;S++)if((p||S in y)&&(T=y[S],E=x(T,S,v),t))if(s)w[S]=E;else if(E)switch(t){case 3:return!0;case 5:return T;case 6:return S;case 2:o(w,T)}else switch(t){case 4:return!1;case 7:o(w,T)}return d?-1:l||u?u:w}};return hk={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)},hk}var vk;function yk(){if(vk)return bO;vk=1;var e=z(),t=EC(),n=QC(),r=L(),i=iT(),a=YC(),o=Iw(),s=I(),c=vT(),l=Dw(),u=ZT(),d=gw(),f=AT(),p=CO(),m=iw(),h=FO(),g=PE(),_=RO(),v=VO(),y=LE(),b=RT(),x=$T(),S=EO(),C=tw(),w=WO(),T=qO(),E=fT(),D=MO(),ee=TE(),te=xT(),O=wT(),k=XO(),ne=$O(),re=nk(),A=ck(),ie=mk(),ae=_k().forEach,oe=D(`hidden`),se=`Symbol`,ce=`prototype`,le=ie.set,ue=ie.getterFor(se),de=Object[ce],fe=t.Symbol,pe=fe&&fe[ce],me=t.RangeError,he=t.TypeError,ge=t.QObject,_e=b.f,j=x.f,ve=v.f,ye=C.f,be=r([].push),xe=E(`symbols`),Se=E(`op-symbols`),Ce=E(`wks`),we=!ge||!ge[ce]||!ge[ce].findChild,Te=function(e,t,n){var r=_e(de,t);r&&delete de[t],j(e,t,n),r&&e!==de&&j(de,t,r)},M=a&&s(function(){return h(j({},`a`,{get:function(){return j(this,`a`,{value:7}).a}})).a!==7})?Te:j,Ee=function(e,t){var n=xe[e]=h(pe);return le(n,{type:se,tag:e,description:t}),a||(n.description=t),n},De=function(e,t,n){e===de&&De(Se,t,n),u(e);var r=f(t);return u(n),c(xe,r)?(n.enumerable?(c(e,oe)&&e[oe][r]&&(e[oe][r]=!1),n=h(n,{enumerable:m(0,!1)})):(c(e,oe)||j(e,oe,m(1,h(null))),e[oe][r]=!0),M(e,r,n)):j(e,r,n)},N=function(e,t){u(e);var r=d(t);return ae(g(r).concat(Me(r)),function(t){(!a||n(ke,r,t))&&De(e,t,r[t])}),e},Oe=function(e,t){return t===void 0?h(e):N(h(e),t)},ke=function(e){var t=f(e),r=n(ye,this,t);return this===de&&c(xe,t)&&!c(Se,t)?!1:r||!c(this,t)||!c(xe,t)||c(this,oe)&&this[oe][t]?r:!0},Ae=function(e,t){var n=d(e),r=f(t);if(!(n===de&&c(xe,r)&&!c(Se,r))){var i=_e(n,r);return i&&c(xe,r)&&!(c(n,oe)&&n[oe][r])&&(i.enumerable=!0),i}},je=function(e){var t=ve(d(e)),n=[];return ae(t,function(e){!c(xe,e)&&!c(ee,e)&&be(n,e)}),n},Me=function(e){var t=e===de,n=ve(t?Se:d(e)),r=[];return ae(n,function(e){c(xe,e)&&(!t||c(de,e))&&be(r,xe[e])}),r};return o||(fe=function(){if(l(pe,this))throw new he(`Symbol is not a constructor`);var e=!arguments.length||arguments[0]===void 0?void 0:p(arguments[0]),r=te(e),i=function(e){var a=this===void 0?t:this;a===de&&n(i,Se,e),c(a,oe)&&c(a[oe],r)&&(a[oe][r]=!1);var o=m(1,e);try{M(a,r,o)}catch(e){if(!(e instanceof me))throw e;Te(a,r,o)}};return a&&we&&M(de,r,{configurable:!0,set:i}),Ee(r,e)},pe=fe[ce],w(pe,`toString`,function(){return ue(this).tag}),w(fe,`withoutSetter`,function(e){return Ee(te(e),e)}),C.f=ke,x.f=De,S.f=N,b.f=Ae,_.f=v.f=je,y.f=Me,k.f=function(e){return Ee(O(e),e)},a&&(T(pe,`description`,{configurable:!0,get:function(){return ue(this).description}}),i||w(de,`propertyIsEnumerable`,ke,{unsafe:!0}))),e({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:fe}),ae(g(Ce),function(e){ne(e)}),e({target:se,stat:!0,forced:!o},{useSetter:function(){we=!0},useSimple:function(){we=!1}}),e({target:`Object`,stat:!0,forced:!o,sham:!a},{create:Oe,defineProperty:De,defineProperties:N,getOwnPropertyDescriptor:Ae}),e({target:`Object`,stat:!0,forced:!o},{getOwnPropertyNames:je}),re(),A(fe,se),ee[oe]=!0,bO}var bk={},xk,Sk;function Ck(){return Sk?xk:(Sk=1,xk=Iw()&&!!Symbol.for&&!!Symbol.keyFor,xk)}var wk;function Tk(){if(wk)return bk;wk=1;var e=z(),t=ww(),n=vT(),r=CO(),i=fT(),a=Ck(),o=i(`string-to-symbol-registry`),s=i(`symbol-to-string-registry`);return e({target:`Symbol`,stat:!0,forced:!a},{for:function(e){var i=r(e);if(n(o,i))return o[i];var a=t(`Symbol`)(i);return o[i]=a,s[a]=i,a}}),bk}var Ek={},Dk;function Ok(){if(Dk)return Ek;Dk=1;var e=z(),t=vT(),n=Hw(),r=Gw(),i=fT(),a=Ck(),o=i(`symbol-to-string-registry`);return e({target:`Symbol`,stat:!0,forced:!a},{keyFor:function(e){if(!n(e))throw TypeError(r(e)+` is not a symbol`);if(t(o,e))return o[e]}}),Ek}var kk={},Ak,jk;function Mk(){if(jk)return Ak;jk=1;var e=L(),t=UD(),n=GC(),r=zC(),i=CO(),a=e([].push);return Ak=function(e){if(n(e))return e;if(t(e)){for(var o=e.length,s=[],c=0;c<o;c++){var l=e[c];typeof l==`string`?a(s,l):(typeof l==`number`||r(l)===`Number`||r(l)===`String`)&&a(s,i(l))}var u=s.length,d=!0;return function(e,n){if(d)return d=!1,n;if(t(this))return n;for(var r=0;r<u;r++)if(s[r]===e)return n}}},Ak}var Nk;function Pk(){if(Nk)return kk;Nk=1;var e=z(),t=ww(),n=PC(),r=QC(),i=L(),a=I(),o=GC(),s=Hw(),c=nD(),l=Mk(),u=Iw(),d=String,f=t(`JSON`,`stringify`),p=i(/./.exec),m=i(``.charAt),h=i(``.charCodeAt),g=i(``.replace),_=i(1.1.toString),v=/[\uD800-\uDFFF]/g,y=/^[\uD800-\uDBFF]$/,b=/^[\uDC00-\uDFFF]$/,x=!u||a(function(){var e=t(`Symbol`)(`stringify detection`);return f([e])!==`[null]`||f({a:e})!==`{}`||f(Object(e))!==`{}`}),S=a(function(){return f(`\udf06\ud834`)!==`"\\udf06\\ud834"`||f(`\udead`)!==`"\\udead"`}),C=function(e,t){var i=c(arguments),a=l(t);if(!(!o(a)&&(e===void 0||s(e))))return i[1]=function(e,t){if(o(a)&&(t=r(a,this,d(e),t)),!s(t))return t},n(f,null,i)},w=function(e,t,n){var r=m(n,t-1),i=m(n,t+1);return p(y,e)&&!p(b,i)||p(b,e)&&!p(y,r)?`\\u`+_(h(e,0),16):e};return f&&e({target:`JSON`,stat:!0,arity:3,forced:x||S},{stringify:function(e,t,r){var i=c(arguments),a=n(x?C:f,null,i);return S&&typeof a==`string`?g(a,v,w):a}}),kk}var Fk={},Ik;function Lk(){if(Ik)return Fk;Ik=1;var e=z(),t=Iw(),n=I(),r=LE(),i=hT();return e({target:`Object`,stat:!0,forced:!t||n(function(){r.f(1)})},{getOwnPropertySymbols:function(e){var t=r.f;return t?t(i(e)):[]}}),Fk}var Rk;function zk(){return Rk?yO:(Rk=1,yk(),Tk(),Ok(),Pk(),Lk(),yO)}var Bk={},Vk;function Hk(){return Vk?Bk:(Vk=1,$O()(`asyncDispose`),Bk)}var Uk={},Wk;function Gk(){return Wk?Uk:(Wk=1,$O()(`asyncIterator`),Uk)}var Kk={},qk;function Jk(){return qk?Kk:(qk=1,$O()(`dispose`),Kk)}var Yk={},Xk;function Zk(){return Xk?Yk:(Xk=1,$O()(`hasInstance`),Yk)}var Qk={},$k;function eA(){return $k?Qk:($k=1,$O()(`isConcatSpreadable`),Qk)}var tA={},nA;function rA(){return nA?tA:(nA=1,$O()(`iterator`),tA)}var iA={},aA;function oA(){return aA?iA:(aA=1,$O()(`match`),iA)}var sA={},cA;function lA(){return cA?sA:(cA=1,$O()(`matchAll`),sA)}var uA={},dA;function fA(){return dA?uA:(dA=1,$O()(`replace`),uA)}var pA={},mA;function hA(){return mA?pA:(mA=1,$O()(`search`),pA)}var gA={},_A;function vA(){return _A?gA:(_A=1,$O()(`species`),gA)}var yA={},bA;function xA(){return bA?yA:(bA=1,$O()(`split`),yA)}var SA={},CA;function wA(){if(CA)return SA;CA=1;var e=$O(),t=nk();return e(`toPrimitive`),t(),SA}var TA={},EA;function DA(){if(EA)return TA;EA=1;var e=ww(),t=$O(),n=ck();return t(`toStringTag`),n(e(`Symbol`),`Symbol`),TA}var OA={},kA;function AA(){return kA?OA:(kA=1,$O()(`unscopables`),OA)}var jA={},MA;function NA(){return MA?jA:(MA=1,ck()(EC().JSON,`JSON`,!0),jA)}var PA,FA;function IA(){return FA?PA:(FA=1,vO(),zk(),Hk(),Gk(),Jk(),Zk(),eA(),rA(),oA(),lA(),fA(),hA(),vA(),xA(),wA(),DA(),AA(),NA(),PA=R().Symbol,PA)}var LA={},RA,zA;function BA(){return zA?RA:(zA=1,RA=function(){},RA)}var VA,HA;function UA(){return HA?VA:(HA=1,VA={},VA)}var WA,GA;function KA(){if(GA)return WA;GA=1;var e=YC(),t=vT(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,i=t(n,`name`);return WA={EXISTS:i,PROPER:i&&(function(){}).name===`something`,CONFIGURABLE:i&&(!e||e&&r(n,`name`).configurable)},WA}var qA,JA;function YA(){return JA?qA:(JA=1,qA=!I()(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),qA)}var XA,ZA;function QA(){if(ZA)return XA;ZA=1;var e=vT(),t=GC(),n=hT(),r=MO(),i=YA(),a=r(`IE_PROTO`),o=Object,s=o.prototype;return XA=i?o.getPrototypeOf:function(r){var i=n(r);if(e(i,a))return i[a];var c=i.constructor;return t(c)&&i instanceof c?c.prototype:i instanceof o?s:null},XA}var $A,ej;function tj(){if(ej)return $A;ej=1;var e=I(),t=GC(),n=yw(),r=FO(),i=QA(),a=WO(),o=wT(),s=iT(),c=o(`iterator`),l=!1,u,d,f;return[].keys&&(f=[].keys(),`next`in f?(d=i(i(f)),d!==Object.prototype&&(u=d)):l=!0),!n(u)||e(function(){var e={};return u[c].call(e)!==e})?u={}:s&&(u=r(u)),t(u[c])||a(u,c,function(){return this}),$A={IteratorPrototype:u,BUGGY_SAFARI_ITERATORS:l},$A}var nj,rj;function ij(){if(rj)return nj;rj=1;var e=tj().IteratorPrototype,t=FO(),n=iw(),r=ck(),i=UA(),a=function(){return this};return nj=function(o,s,c,l){var u=s+` Iterator`;return o.prototype=t(e,{next:n(+!l,c)}),r(o,u,!1,!0),i[u]=a,o},nj}var aj,oj;function sj(){if(oj)return aj;oj=1;var e=L(),t=Jw();return aj=function(n,r,i){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[i]))}catch{}},aj}var cj,lj;function uj(){if(lj)return cj;lj=1;var e=yw();return cj=function(t){return e(t)||t===null},cj}var dj,fj;function pj(){if(fj)return dj;fj=1;var e=uj(),t=String,n=TypeError;return dj=function(r){if(e(r))return r;throw new n(`Can't set `+t(r)+` as a prototype`)},dj}var mj,hj;function gj(){if(hj)return mj;hj=1;var e=sj(),t=yw(),n=pw(),r=pj();return mj=Object.setPrototypeOf||(`__proto__`in{}?function(){var i=!1,a={},o;try{o=e(Object.prototype,`__proto__`,`set`),o(a,[]),i=a instanceof Array}catch{}return function(e,a){return n(e),r(a),t(e)&&(i?o(e,a):e.__proto__=a),e}}():void 0),mj}var _j,vj;function yj(){if(vj)return _j;vj=1;var e=z(),t=QC(),n=iT(),r=KA(),i=GC(),a=ij(),o=QA(),s=gj(),c=ck(),l=nE(),u=WO(),d=wT(),f=UA(),p=tj(),m=r.PROPER,h=r.CONFIGURABLE,g=p.IteratorPrototype,_=p.BUGGY_SAFARI_ITERATORS,v=d(`iterator`),y=`keys`,b=`values`,x=`entries`,S=function(){return this};return _j=function(r,d,p,C,w,T,E){a(p,d,C);var D=function(e){if(e===w&&ne)return ne;if(!_&&e&&e in O)return O[e];switch(e){case y:return function(){return new p(this,e)};case b:return function(){return new p(this,e)};case x:return function(){return new p(this,e)}}return function(){return new p(this)}},ee=d+` Iterator`,te=!1,O=r.prototype,k=O[v]||O[`@@iterator`]||w&&O[w],ne=!_&&k||D(w),re=d===`Array`&&O.entries||k,A,ie,ae;if(re&&(A=o(re.call(new r)),A!==Object.prototype&&A.next&&(!n&&o(A)!==g&&(s?s(A,g):i(A[v])||u(A,v,S)),c(A,ee,!0,!0),n&&(f[ee]=S))),m&&w===b&&k&&k.name!==b&&(!n&&h?l(O,`name`,b):(te=!0,ne=function(){return t(k,this)})),w)if(ie={values:D(b),keys:T?ne:D(y),entries:D(x)},E)for(ae in ie)(_||te||!(ae in O))&&u(O,ae,ie[ae]);else e({target:d,proto:!0,forced:_||te},ie);return(!n||E)&&O[v]!==ne&&u(O,v,ne,{name:w}),f[d]=ne,ie},_j}var bj,xj;function Sj(){return xj?bj:(xj=1,bj=function(e,t){return{value:e,done:t}},bj)}var Cj,wj;function Tj(){if(wj)return Cj;wj=1;var e=gw(),t=BA(),n=UA(),r=mk(),i=$T().f,a=yj(),o=Sj(),s=iT(),c=YC(),l=`Array Iterator`,u=r.set,d=r.getterFor(l);Cj=a(Array,`Array`,function(t,n){u(this,{type:l,target:e(t),index:0,kind:n})},function(){var e=d(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,o(void 0,!0);switch(e.kind){case`keys`:return o(n,!1);case`values`:return o(t[n],!1)}return o([n,t[n]],!1)},`values`);var f=n.Arguments=n.Array;if(t(`keys`),t(`values`),t(`entries`),!s&&c&&f.name!==`values`)try{i(f,`name`,{value:`values`})}catch{}return Cj}var Ej,Dj;function Oj(){return Dj?Ej:(Dj=1,Ej={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Ej)}var kj;function Aj(){if(kj)return LA;kj=1,Tj();var e=Oj(),t=EC(),n=ck(),r=UA();for(var i in e)n(t[i],i),r[i]=r.Array;return LA}var jj,Mj;function Nj(){if(Mj)return jj;Mj=1;var e=IA();return Aj(),jj=e,jj}var Pj,Fj;function Ij(){return Fj?Pj:(Fj=1,Pj=Nj(),Pj)}var Lj=F(Ij()),Rj={},zj;function Bj(){if(zj)return Rj;zj=1;var e=z(),t=UD(),n=sO(),r=yw(),i=pE(),a=yE(),o=gw(),s=YD(),c=wT(),l=gO(),u=nD(),d=l(`slice`),f=c(`species`),p=Array,m=Math.max;return e({target:`Array`,proto:!0,forced:!d},{slice:function(e,c){var l=o(this),d=a(l),h=i(e,d),g=i(c===void 0?d:c,d),_,v,y;if(t(l)&&(_=l.constructor,n(_)&&(_===p||t(_.prototype))?_=void 0:r(_)&&(_=_[f],_===null&&(_=void 0)),_===p||_===void 0))return u(l,h,g);for(v=new(_===void 0?p:_)(m(g-h,0)),y=0;h<g;h++,y++)h in l&&s(v,y,l[h]);return v.length=y,v}}),Rj}var Vj,Hj;function Uj(){return Hj?Vj:(Hj=1,Bj(),Vj=uD()(`Array`,`slice`),Vj)}var Wj,Gj;function Kj(){if(Gj)return Wj;Gj=1;var e=Dw(),t=Uj(),n=Array.prototype;return Wj=function(r){var i=r.slice;return r===n||e(n,r)&&i===n.slice?t:i},Wj}var qj,Jj;function Yj(){return Jj?qj:(Jj=1,qj=Kj(),qj)}var Xj,Zj;function Qj(){return Zj?Xj:(Zj=1,Xj=Yj(),Xj)}var $j=F(Qj()),eM,tM;function nM(){if(tM)return eM;tM=1;var e=ww(),t=L(),n=RO(),r=LE(),i=ZT(),a=t([].concat);return eM=e(`Reflect`,`ownKeys`)||function(e){var t=n.f(i(e)),o=r.f;return o?a(t,o(e)):t},eM}var rM={},iM;function aM(){return iM?rM:(iM=1,z()({target:`Array`,stat:!0},{isArray:UD()}),rM)}var oM,sM;function cM(){return sM?oM:(sM=1,aM(),oM=R().Array.isArray,oM)}var lM,uM;function dM(){return uM?lM:(uM=1,lM=cM(),lM)}var fM,pM;function mM(){return pM?fM:(pM=1,fM=dM(),fM)}var hM=F(mM()),gM={},_M;function vM(){if(_M)return gM;_M=1;var e=z(),t=_k().map;return e({target:`Array`,proto:!0,forced:!gO()(`map`)},{map:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),gM}var yM,bM;function xM(){return bM?yM:(bM=1,vM(),yM=uD()(`Array`,`map`),yM)}var SM,CM;function wM(){if(CM)return SM;CM=1;var e=Dw(),t=xM(),n=Array.prototype;return SM=function(r){var i=r.map;return r===n||e(n,r)&&i===n.map?t:i},SM}var TM,EM;function DM(){return EM?TM:(EM=1,TM=wM(),TM)}var OM,kM;function AM(){return kM?OM:(kM=1,OM=DM(),OM)}var jM=F(AM()),MM={},NM;function PM(){if(NM)return MM;NM=1;var e=z(),t=hT(),n=PE();return e({target:`Object`,stat:!0,forced:I()(function(){n(1)})},{keys:function(e){return n(t(e))}}),MM}var FM,IM;function LM(){return IM?FM:(IM=1,PM(),FM=R().Object.keys,FM)}var RM,zM;function BM(){return zM?RM:(zM=1,RM=LM(),RM)}var VM,HM;function UM(){return HM?VM:(HM=1,VM=BM(),VM)}var WM=F(UM()),GM={},KM;function qM(){if(KM)return GM;KM=1;var e=z(),t=L(),n=Date,r=t(n.prototype.getTime);return e({target:`Date`,stat:!0},{now:function(){return r(new n)}}),GM}var JM,YM;function XM(){return YM?JM:(YM=1,qM(),JM=R().Date.now,JM)}var ZM,QM;function $M(){return QM?ZM:(QM=1,ZM=XM(),ZM)}var eN,tN;function nN(){return tN?eN:(tN=1,eN=$M(),eN)}var rN=F(nN()),iN={},aN,oN;function sN(){if(oN)return aN;oN=1;var e=I();return aN=function(t,n){var r=[][t];return!!r&&e(function(){r.call(null,n||function(){return 1},1)})},aN}var cN,lN;function uN(){if(lN)return cN;lN=1;var e=_k().forEach;return cN=sN()(`forEach`)?[].forEach:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)},cN}var dN;function fN(){if(dN)return iN;dN=1;var e=z(),t=uN();return e({target:`Array`,proto:!0,forced:[].forEach!==t},{forEach:t}),iN}var pN,mN;function hN(){return mN?pN:(mN=1,fN(),pN=uD()(`Array`,`forEach`),pN)}var gN,_N;function vN(){return _N?gN:(_N=1,gN=hN(),gN)}var yN,bN;function xN(){if(bN)return yN;bN=1;var e=tO(),t=vT(),n=Dw(),r=vN(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return yN=function(o){var s=o.forEach;return o===i||n(i,o)&&s===i.forEach||t(a,e(o))?r:s},yN}var SN,CN;function wN(){return CN?SN:(CN=1,SN=xN(),SN)}var V=F(wN()),TN={},EN;function DN(){if(EN)return TN;EN=1;var e=z(),t=L(),n=UD(),r=t([].reverse),i=[1,2];return e({target:`Array`,proto:!0,forced:String(i)===String(i.reverse())},{reverse:function(){return n(this)&&(this.length=this.length),r(this)}}),TN}var ON,kN;function AN(){return kN?ON:(kN=1,DN(),ON=uD()(`Array`,`reverse`),ON)}var jN,MN;function NN(){if(MN)return jN;MN=1;var e=Dw(),t=AN(),n=Array.prototype;return jN=function(r){var i=r.reverse;return r===n||e(n,r)&&i===n.reverse?t:i},jN}var PN,FN;function IN(){return FN?PN:(FN=1,PN=NN(),PN)}var LN,RN;function zN(){return RN?LN:(RN=1,LN=IN(),LN)}var BN=F(zN()),VN={},HN,UN;function WN(){if(UN)return HN;UN=1;var e=YC(),t=UD(),n=TypeError,r=Object.getOwnPropertyDescriptor;return HN=e&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,i){if(t(e)&&!r(e,`length`).writable)throw new n(`Cannot set read only .length`);return e.length=i}:function(e,t){return e.length=t},HN}var GN,KN;function qN(){if(KN)return GN;KN=1;var e=Gw(),t=TypeError;return GN=function(n,r){if(!delete n[r])throw new t(`Cannot delete property `+e(r)+` of `+e(n))},GN}var JN;function YN(){if(JN)return VN;JN=1;var e=z(),t=hT(),n=pE(),r=uE(),i=yE(),a=WN(),o=KD(),s=pO(),c=YD(),l=qN(),u=gO()(`splice`),d=Math.max,f=Math.min;return e({target:`Array`,proto:!0,forced:!u},{splice:function(e,u){var p=t(this),m=i(p),h=n(e,m),g=arguments.length,_,v,y,b,x,S;for(g===0?_=v=0:g===1?(_=0,v=m-h):(_=g-2,v=f(d(r(u),0),m-h)),o(m+_-v),y=s(p,v),b=0;b<v;b++)x=h+b,x in p&&c(y,b,p[x]);if(y.length=v,_<v){for(b=h;b<m-v;b++)x=b+v,S=b+_,x in p?p[S]=p[x]:l(p,S);for(b=m;b>m-v+_;b--)l(p,b-1)}else if(_>v)for(b=m-v;b>h;b--)x=b+v-1,S=b+_-1,x in p?p[S]=p[x]:l(p,S);for(b=0;b<_;b++)p[b+h]=arguments[b+2];return a(p,m-v+_),y}}),VN}var XN,ZN;function QN(){return ZN?XN:(ZN=1,YN(),XN=uD()(`Array`,`splice`),XN)}var $N,eP;function tP(){if(eP)return $N;eP=1;var e=Dw(),t=QN(),n=Array.prototype;return $N=function(r){var i=r.splice;return r===n||e(n,r)&&i===n.splice?t:i},$N}var nP,rP;function iP(){return rP?nP:(rP=1,nP=tP(),nP)}var aP,oP;function sP(){return oP?aP:(oP=1,aP=iP(),aP)}var cP=F(sP()),lP={},uP;function dP(){if(uP)return lP;uP=1;var e=z(),t=SE().includes,n=I(),r=BA();return e({target:`Array`,proto:!0,forced:n(function(){return![,].includes()})},{includes:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),r(`includes`),lP}var fP,pP;function mP(){return pP?fP:(pP=1,dP(),fP=uD()(`Array`,`includes`),fP)}var hP={},gP,_P;function vP(){if(_P)return gP;_P=1;var e=yw(),t=zC(),n=wT()(`match`);return gP=function(r){var i;return e(r)&&((i=r[n])===void 0?t(r)===`RegExp`:!!i)},gP}var yP,bP;function xP(){if(bP)return yP;bP=1;var e=vP(),t=TypeError;return yP=function(n){if(e(n))throw new t(`The method doesn't accept regular expressions`);return n},yP}var SP,CP;function wP(){if(CP)return SP;CP=1;var e=wT()(`match`);return SP=function(t){var n=/./;try{`/./`[t](n)}catch{try{return n[e]=!1,`/./`[t](n)}catch{}}return!1},SP}var TP;function EP(){if(TP)return hP;TP=1;var e=z(),t=L(),n=xP(),r=pw(),i=CO(),a=wP(),o=t(``.indexOf);return e({target:`String`,proto:!0,forced:!a(`includes`)},{includes:function(e){return!!~o(i(r(this)),i(n(e)),arguments.length>1?arguments[1]:void 0)}}),hP}var DP,OP;function kP(){return OP?DP:(OP=1,EP(),DP=uD()(`String`,`includes`),DP)}var AP,jP;function MP(){if(jP)return AP;jP=1;var e=Dw(),t=mP(),n=kP(),r=Array.prototype,i=String.prototype;return AP=function(a){var o=a.includes;return a===r||e(r,a)&&o===r.includes?t:typeof a==`string`||a===i||e(i,a)&&o===i.includes?n:o},AP}var NP,PP;function FP(){return PP?NP:(PP=1,NP=MP(),NP)}var IP,LP;function RP(){return LP?IP:(LP=1,IP=FP(),IP)}var zP=F(RP()),BP={},VP;function HP(){if(VP)return BP;VP=1;var e=z(),t=I(),n=hT(),r=QA(),i=YA();return e({target:`Object`,stat:!0,forced:t(function(){r(1)}),sham:!i},{getPrototypeOf:function(e){return r(n(e))}}),BP}var UP,WP;function GP(){return WP?UP:(WP=1,HP(),UP=R().Object.getPrototypeOf,UP)}var KP,qP;function JP(){return qP?KP:(qP=1,KP=GP(),KP)}var YP,XP;function ZP(){return XP?YP:(XP=1,YP=JP(),YP)}var QP=F(ZP()),$P,eF;function tF(){return eF?$P:(eF=1,vO(),$P=uD()(`Array`,`concat`),$P)}var nF,rF;function iF(){if(rF)return nF;rF=1;var e=Dw(),t=tF(),n=Array.prototype;return nF=function(r){var i=r.concat;return r===n||e(n,r)&&i===n.concat?t:i},nF}var aF,oF;function sF(){return oF?aF:(oF=1,aF=iF(),aF)}var cF,lF;function uF(){return lF?cF:(lF=1,cF=sF(),cF)}var dF=F(uF()),fF={},pF;function mF(){if(pF)return fF;pF=1;var e=z(),t=_k().filter;return e({target:`Array`,proto:!0,forced:!gO()(`filter`)},{filter:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),fF}var hF,gF;function _F(){return gF?hF:(gF=1,mF(),hF=uD()(`Array`,`filter`),hF)}var vF,yF;function bF(){if(yF)return vF;yF=1;var e=Dw(),t=_F(),n=Array.prototype;return vF=function(r){var i=r.filter;return r===n||e(n,r)&&i===n.filter?t:i},vF}var xF,SF;function CF(){return SF?xF:(SF=1,xF=bF(),xF)}var wF,TF;function EF(){return TF?wF:(TF=1,wF=CF(),wF)}var DF=F(EF()),OF={},kF,AF;function jF(){if(AF)return kF;AF=1;var e=YC(),t=I(),n=L(),r=QA(),i=PE(),a=gw(),o=tw().f,s=n(o),c=n([].push),l=e&&t(function(){var e=Object.create(null);return e[2]=2,!s(e,2)}),u=function(t){return function(n){for(var o=a(n),u=i(o),d=l&&r(o)===null,f=u.length,p=0,m=[],h;f>p;)h=u[p++],(!e||(d?h in o:s(o,h)))&&c(m,t?[h,o[h]]:o[h]);return m}};return kF={entries:u(!0),values:u(!1)},kF}var MF;function NF(){if(MF)return OF;MF=1;var e=z(),t=jF().values;return e({target:`Object`,stat:!0},{values:function(e){return t(e)}}),OF}var PF,FF;function IF(){return FF?PF:(FF=1,NF(),PF=R().Object.values,PF)}var LF,RF;function zF(){return RF?LF:(RF=1,LF=IF(),LF)}var BF,VF;function HF(){return VF?BF:(VF=1,BF=zF(),BF)}var UF=F(HF()),WF={},GF,KF;function qF(){return KF?GF:(KF=1,GF=`
|
|
4
|
-
\v\f\r \xA0 \u2028\u2029`,GF)}var JF,YF;function XF(){if(YF)return JF;YF=1;var e=L(),t=pw(),n=CO(),r=qF(),i=e(``.replace),a=RegExp(`^[`+r+`]+`),o=RegExp(`(^|[^`+r+`])[`+r+`]+$`),s=function(e){return function(r){var s=n(t(r));return e&1&&(s=i(s,a,``)),e&2&&(s=i(s,o,`$1`)),s}};return JF={start:s(1),end:s(2),trim:s(3)},JF}var ZF,QF;function $F(){if(QF)return ZF;QF=1;var e=EC(),t=I(),n=L(),r=CO(),i=XF().trim,a=qF(),o=e.parseInt,s=e.Symbol,c=s&&s.iterator,l=/^[+-]?0x/i,u=n(l.exec);return ZF=o(a+`08`)!==8||o(a+`0x16`)!==22||c&&!t(function(){o(Object(c))})?function(e,t){var n=i(r(e));return o(n,t>>>0||(u(l,n)?16:10))}:o,ZF}var eI;function tI(){if(eI)return WF;eI=1;var e=z(),t=$F();return e({global:!0,forced:parseInt!==t},{parseInt:t}),WF}var nI,rI;function iI(){return rI?nI:(rI=1,tI(),nI=R().parseInt,nI)}var aI,oI;function sI(){return oI?aI:(oI=1,aI=iI(),aI)}var cI,lI;function uI(){return lI?cI:(lI=1,cI=sI(),cI)}var dI=F(uI()),fI={},pI;function mI(){if(pI)return fI;pI=1;var e=z(),t=HC(),n=SE().indexOf,r=sN(),i=t([].indexOf),a=!!i&&1/i([1],1,-0)<0;return e({target:`Array`,proto:!0,forced:a||!r(`indexOf`)},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return a?i(this,e,t)||0:n(this,e,t)}}),fI}var hI,gI;function _I(){return gI?hI:(gI=1,mI(),hI=uD()(`Array`,`indexOf`),hI)}var vI,yI;function bI(){if(yI)return vI;yI=1;var e=Dw(),t=_I(),n=Array.prototype;return vI=function(r){var i=r.indexOf;return r===n||e(n,r)&&i===n.indexOf?t:i},vI}var xI,SI;function CI(){return SI?xI:(SI=1,xI=bI(),xI)}var wI,TI;function EI(){return TI?wI:(TI=1,wI=CI(),wI)}var H=F(EI()),DI={},OI;function kI(){return OI?DI:(OI=1,z()({target:`Object`,stat:!0,sham:!YC()},{create:FO()}),DI)}var AI,jI;function MI(){if(jI)return AI;jI=1,kI();var e=R().Object;return AI=function(t,n){return e.create(t,n)},AI}var NI,PI;function FI(){return PI?NI:(PI=1,NI=MI(),NI)}var II,LI;function RI(){return LI?II:(LI=1,II=FI(),II)}var zI=F(RI()),BI={},VI,HI;function UI(){if(HI)return VI;HI=1;var e=uE(),t=CO(),n=pw(),r=RangeError;return VI=function(i){var a=t(n(this)),o=``,s=e(i);if(s<0||s===1/0)throw new r(`Wrong number of repetitions`);for(;s>0;(s>>>=1)&&(a+=a))s&1&&(o+=a);return o},VI}var WI,GI;function KI(){if(GI)return WI;GI=1;var e=L(),t=gE(),n=CO(),r=UI(),i=pw(),a=e(r),o=e(``.slice),s=Math.ceil,c=function(e){return function(r,c,l){var u=n(i(r)),d=t(c),f=u.length,p=l===void 0?` `:n(l),m,h;return d<=f||p===``?u:(m=d-f,h=a(p,s(m/p.length)),h.length>m&&(h=o(h,0,m)),e?u+h:h+u)}};return WI={start:c(!1),end:c(!0)},WI}var qI,JI;function YI(){if(JI)return qI;JI=1;var e=L(),t=I(),n=KI().start,r=RangeError,i=isFinite,a=Math.abs,o=Date.prototype,s=o.toISOString,c=e(o.getTime),l=e(o.getUTCDate),u=e(o.getUTCFullYear),d=e(o.getUTCHours),f=e(o.getUTCMilliseconds),p=e(o.getUTCMinutes),m=e(o.getUTCMonth),h=e(o.getUTCSeconds);return qI=t(function(){return s.call(new Date(-50000000000001))!==`0385-07-25T07:06:39.999Z`})||!t(function(){s.call(new Date(NaN))})?function(){if(!i(c(this)))throw new r(`Invalid time value`);var e=this,t=u(e),o=f(e),s=t<0?`-`:t>9999?`+`:``;return s+n(a(t),s?6:4,0)+`-`+n(m(e)+1,2,0)+`-`+n(l(e),2,0)+`T`+n(d(e),2,0)+`:`+n(p(e),2,0)+`:`+n(h(e),2,0)+`.`+n(o,3,0)+`Z`}:s,qI}var XI;function ZI(){if(XI)return BI;XI=1;var e=z(),t=QC(),n=hT(),r=DT(),i=YI(),a=zC();return e({target:`Date`,proto:!0,forced:I()(function(){return new Date(NaN).toJSON()!==null||t(Date.prototype.toJSON,{toISOString:function(){return 1}})!==1})},{toJSON:function(e){var o=n(this),s=r(o,`number`);return typeof s==`number`&&!isFinite(s)?null:!(`toISOString`in o)&&a(o)===`Date`?t(i,o):o.toISOString()}}),BI}var QI,$I;function eL(){if($I)return QI;$I=1,ZI(),Pk();var e=R(),t=PC();return e.JSON||={stringify:JSON.stringify},QI=function(n,r,i){return t(e.JSON.stringify,null,arguments)},QI}var tL,nL;function rL(){return nL?tL:(nL=1,tL=eL(),tL)}var iL,aL;function oL(){return aL?iL:(aL=1,iL=rL(),iL)}var sL=F(oL()),cL={},lL={},uL,dL;function fL(){if(dL)return uL;dL=1;var e=EC(),t=Aw(),n=zC(),r=function(e){return t.slice(0,e.length)===e};return uL=(function(){return r(`Bun/`)?`BUN`:r(`Cloudflare-Workers`)?`CLOUDFLARE`:r(`Deno/`)?`DENO`:r(`Node.js/`)?`NODE`:e.Bun&&typeof Bun.version==`string`?`BUN`:e.Deno&&typeof Deno.version==`object`?`DENO`:n(e.process)===`process`?`NODE`:e.window&&e.document?`BROWSER`:`REST`})(),uL}var pL,mL;function hL(){if(mL)return pL;mL=1;var e=TypeError;return pL=function(t,n){if(t<n)throw new e(`Not enough arguments`);return t},pL}var gL,_L;function vL(){if(_L)return gL;_L=1;var e=EC(),t=PC(),n=GC(),r=fL(),i=Aw(),a=nD(),o=hL(),s=e.Function,c=/MSIE .\./.test(i)||r===`BUN`&&(function(){var t=e.Bun.version.split(`.`);return t.length<3||t[0]===`0`&&(t[1]<3||t[1]===`3`&&t[2]===`0`)})();return gL=function(e,r){var i=r?2:1;return c?function(c,l){var u=o(arguments.length,1)>i,d=n(c)?c:s(c),f=u?a(arguments,i):[],p=u?function(){t(d,this,f)}:d;return r?e(p,l):e(p)}:e},gL}var yL;function bL(){if(yL)return lL;yL=1;var e=z(),t=EC(),n=vL()(t.setInterval,!0);return e({global:!0,bind:!0,forced:t.setInterval!==n},{setInterval:n}),lL}var xL={},SL;function CL(){if(SL)return xL;SL=1;var e=z(),t=EC(),n=vL()(t.setTimeout,!0);return e({global:!0,bind:!0,forced:t.setTimeout!==n},{setTimeout:n}),xL}var wL;function TL(){return wL?cL:(wL=1,bL(),CL(),cL)}var EL,DL;function OL(){return DL?EL:(DL=1,TL(),EL=R().setTimeout,EL)}var kL,AL;function jL(){return AL?kL:(AL=1,kL=OL(),kL)}var ML=F(jL()),NL={},PL,FL;function IL(){if(FL)return PL;FL=1;var e=hT(),t=pE(),n=yE();return PL=function(r){for(var i=e(this),a=n(i),o=arguments.length,s=t(o>1?arguments[1]:void 0,a),c=o>2?arguments[2]:void 0,l=c===void 0?a:t(c,a);l>s;)i[s++]=r;return i},PL}var LL;function RL(){if(LL)return NL;LL=1;var e=z(),t=IL(),n=BA();return e({target:`Array`,proto:!0},{fill:t}),n(`fill`),NL}var zL,BL;function VL(){return BL?zL:(BL=1,RL(),zL=uD()(`Array`,`fill`),zL)}var HL,UL;function WL(){if(UL)return HL;UL=1;var e=Dw(),t=VL(),n=Array.prototype;return HL=function(r){var i=r.fill;return r===n||e(n,r)&&i===n.fill?t:i},HL}var GL,KL;function qL(){return KL?GL:(KL=1,GL=WL(),GL)}var JL,YL;function XL(){return YL?JL:(YL=1,JL=qL(),JL)}var ZL=F(XL());function QL(){return QL=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},QL.apply(this,arguments)}function $L(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function eR(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}var tR=typeof Object.assign==`function`?Object.assign:function(e){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!=null)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t},nR=[``,`webkit`,`Moz`,`MS`,`ms`,`o`],rR=typeof document>`u`?{style:{}}:document.createElement(`div`),iR=`function`,aR=Math.round,oR=Math.abs,sR=Date.now;function cR(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),a=0;a<nR.length;){if(n=nR[a],r=n?n+i:t,r in e)return r;a++}}var lR=typeof window>`u`?{}:window,uR=cR(rR.style,`touchAction`),dR=uR!==void 0;function fR(){if(!dR)return!1;var e={},t=lR.CSS&&lR.CSS.supports;return[`auto`,`manipulation`,`pan-y`,`pan-x`,`pan-x pan-y`,`none`].forEach(function(n){return e[n]=!t||lR.CSS.supports(`touch-action`,n)}),e}var pR=`compute`,mR=`auto`,hR=`manipulation`,gR=`none`,_R=`pan-x`,vR=`pan-y`,yR=fR(),bR=/mobile|tablet|ip(ad|hone|od)|android/i,xR=`ontouchstart`in lR,SR=cR(lR,`PointerEvent`)!==void 0,CR=xR&&bR.test(navigator.userAgent),wR=`touch`,TR=`pen`,ER=`mouse`,DR=`kinect`,OR=25,kR=1,AR=2,jR=4,MR=8,NR=1,PR=2,FR=4,IR=8,LR=16,RR=PR|FR,zR=IR|LR,BR=RR|zR,VR=[`x`,`y`],HR=[`clientX`,`clientY`];function UR(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==void 0)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function WR(e,t){return typeof e===iR?e.apply(t&&t[0]||void 0,t):e}function GR(e,t){return e.indexOf(t)>-1}function KR(e){if(GR(e,gR))return gR;var t=GR(e,_R),n=GR(e,vR);return t&&n?gR:t||n?t?_R:vR:GR(e,hR)?hR:mR}var qR=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===pR&&(e=this.compute()),dR&&this.manager.element.style&&yR[e]&&(this.manager.element.style[uR]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return UR(this.manager.recognizers,function(t){WR(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),KR(e.join(` `))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented){t.preventDefault();return}var r=this.actions,i=GR(r,gR)&&!yR[gR],a=GR(r,vR)&&!yR[vR],o=GR(r,_R)&&!yR[_R];if(i){var s=e.pointers.length===1,c=e.distance<2,l=e.deltaTime<250;if(s&&c&&l)return}if(!(o&&a)&&(i||a&&n&RR||o&&n&zR))return this.preventSrc(t)},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function JR(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function YR(e){var t=e.length;if(t===1)return{x:aR(e[0].clientX),y:aR(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:aR(n/t),y:aR(r/t)}}function XR(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:aR(e.pointers[n].clientX),clientY:aR(e.pointers[n].clientY)},n++;return{timeStamp:sR(),pointers:t,center:YR(t),deltaX:e.deltaX,deltaY:e.deltaY}}function ZR(e,t,n){n||=VR;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function QR(e,t,n){n||=VR;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.atan2(i,r)*180/Math.PI}function $R(e,t){return e===t?NR:oR(e)>=oR(t)?e<0?PR:FR:t<0?IR:LR}function ez(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},a=e.prevInput||{};(t.eventType===kR||a.eventType===jR)&&(i=e.prevDelta={x:a.deltaX||0,y:a.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}function tz(e,t,n){return{x:t/e||0,y:n/e||0}}function nz(e,t){return ZR(t[0],t[1],HR)/ZR(e[0],e[1],HR)}function rz(e,t){return QR(t[1],t[0],HR)+QR(e[1],e[0],HR)}function iz(e,t){var n=e.lastInterval||t,r=t.timeStamp-n.timeStamp,i,a,o,s;if(t.eventType!==MR&&(r>OR||n.velocity===void 0)){var c=t.deltaX-n.deltaX,l=t.deltaY-n.deltaY,u=tz(r,c,l);a=u.x,o=u.y,i=oR(u.x)>oR(u.y)?u.x:u.y,s=$R(c,l),e.lastInterval=t}else i=n.velocity,a=n.velocityX,o=n.velocityY,s=n.direction;t.velocity=i,t.velocityX=a,t.velocityY=o,t.direction=s}function az(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||=XR(t),i>1&&!n.firstMultiple?n.firstMultiple=XR(t):i===1&&(n.firstMultiple=!1);var a=n.firstInput,o=n.firstMultiple,s=o?o.center:a.center,c=t.center=YR(r);t.timeStamp=sR(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=QR(s,c),t.distance=ZR(s,c),ez(n,t),t.offsetDirection=$R(t.deltaX,t.deltaY);var l=tz(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=l.x,t.overallVelocityY=l.y,t.overallVelocity=oR(l.x)>oR(l.y)?l.x:l.y,t.scale=o?nz(o.pointers,r):1,t.rotation=o?rz(o.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,iz(n,t);var u=e.element,d=t.srcEvent,f=d.composedPath?d.composedPath()[0]:d.path?d.path[0]:d.target;JR(f,u)&&(u=f),t.target=u}function oz(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,a=t&kR&&r-i===0,o=t&(jR|MR)&&r-i===0;n.isFirst=!!a,n.isFinal=!!o,a&&(e.session={}),n.eventType=t,az(e,n),e.emit(`hammer.input`,n),e.recognize(n),e.session.prevInput=n}function sz(e){return e.trim().split(/\s+/g)}function cz(e,t,n){UR(sz(t),function(t){e.addEventListener(t,n,!1)})}function lz(e,t,n){UR(sz(t),function(t){e.removeEventListener(t,n,!1)})}function uz(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var dz=function(){function e(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){WR(e.options.enable,[e])&&n.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&cz(this.element,this.evEl,this.domHandler),this.evTarget&&cz(this.target,this.evTarget,this.domHandler),this.evWin&&cz(uz(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&lz(this.element,this.evEl,this.domHandler),this.evTarget&&lz(this.target,this.evTarget,this.domHandler),this.evWin&&lz(uz(this.element),this.evWin,this.domHandler)},e}();function fz(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}var pz={pointerdown:kR,pointermove:AR,pointerup:jR,pointercancel:MR,pointerout:MR},mz={2:wR,3:TR,4:ER,5:DR},hz=`pointerdown`,gz=`pointermove pointerup pointercancel`;lR.MSPointerEvent&&!lR.PointerEvent&&(hz=`MSPointerDown`,gz=`MSPointerMove MSPointerUp MSPointerCancel`);var _z=function(e){$L(t,e);function t(){var n,r=t.prototype;return r.evEl=hz,r.evWin=gz,n=e.apply(this,arguments)||this,n.store=n.manager.session.pointerEvents=[],n}var n=t.prototype;return n.handler=function(e){var t=this.store,n=!1,r=pz[e.type.toLowerCase().replace(`ms`,``)],i=mz[e.pointerType]||e.pointerType,a=i===wR,o=fz(t,e.pointerId,`pointerId`);r&kR&&(e.button===0||a)?o<0&&(t.push(e),o=t.length-1):r&(jR|MR)&&(n=!0),!(o<0)&&(t[o]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:i,srcEvent:e}),n&&t.splice(o,1))},t}(dz);function vz(e){return Array.prototype.slice.call(e,0)}function yz(e,t,n){for(var r=[],i=[],a=0;a<e.length;){var o=t?e[a][t]:e[a];fz(i,o)<0&&r.push(e[a]),i[a]=o,a++}return n&&(r=t?r.sort(function(e,n){return e[t]>n[t]}):r.sort()),r}var bz={touchstart:kR,touchmove:AR,touchend:jR,touchcancel:MR},xz=`touchstart touchmove touchend touchcancel`,Sz=function(e){$L(t,e);function t(){var n;return t.prototype.evTarget=xz,n=e.apply(this,arguments)||this,n.targetIds={},n}var n=t.prototype;return n.handler=function(e){var t=bz[e.type],n=Cz.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:wR,srcEvent:e})},t}(dz);function Cz(e,t){var n=vz(e.touches),r=this.targetIds;if(t&(kR|AR)&&n.length===1)return r[n[0].identifier]=!0,[n,n];var i,a,o=vz(e.changedTouches),s=[],c=this.target;if(a=n.filter(function(e){return JR(e.target,c)}),t===kR)for(i=0;i<a.length;)r[a[i].identifier]=!0,i++;for(i=0;i<o.length;)r[o[i].identifier]&&s.push(o[i]),t&(jR|MR)&&delete r[o[i].identifier],i++;if(s.length)return[yz(a.concat(s),`identifier`,!0),s]}var wz={mousedown:kR,mousemove:AR,mouseup:jR},Tz=`mousedown`,Ez=`mousemove mouseup`,Dz=function(e){$L(t,e);function t(){var n,r=t.prototype;return r.evEl=Tz,r.evWin=Ez,n=e.apply(this,arguments)||this,n.pressed=!1,n}var n=t.prototype;return n.handler=function(e){var t=wz[e.type];t&kR&&e.button===0&&(this.pressed=!0),t&AR&&e.which!==1&&(t=jR),this.pressed&&(t&jR&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:ER,srcEvent:e}))},t}(dz),Oz=2500,kz=25;function Az(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY},r=this.lastTouches;this.lastTouches.push(n),setTimeout(function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)},Oz)}}function jz(e,t){e&kR?(this.primaryTouch=t.changedPointers[0].identifier,Az.call(this,t)):e&(jR|MR)&&Az.call(this,t)}function Mz(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],a=Math.abs(t-i.x),o=Math.abs(n-i.y);if(a<=kz&&o<=kz)return!0}return!1}var Nz=function(){return function(e){$L(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.handler=function(e,t,n){var i=n.pointerType===wR,a=n.pointerType===ER;if(!(a&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)jz.call(eR(eR(r)),t,n);else if(a&&Mz.call(eR(eR(r)),n))return;r.callback(e,t,n)}},r.touch=new Sz(r.manager,r.handler),r.mouse=new Dz(r.manager,r.handler),r.primaryTouch=null,r.lastTouches=[],r}var n=t.prototype;return n.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(dz)}();function Pz(e){var t;return t=e.options.inputClass||(SR?_z:CR?Sz:xR?Nz:Dz),new t(e,oz)}function Fz(e,t,n){return Array.isArray(e)?(UR(e,n[t],n),!0):!1}var Iz=1,Lz=2,Rz=4,zz=8,Bz=zz,Vz=16,Hz=32,Uz=1;function Wz(){return Uz++}function Gz(e,t){var n=t.manager;return n?n.get(e):e}function Kz(e){return e&Vz?`cancel`:e&zz?`end`:e&Rz?`move`:e&Lz?`start`:``}var qz=function(){function e(e){e===void 0&&(e={}),this.options=QL({enable:!0},e),this.id=Wz(),this.manager=null,this.state=Iz,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return tR(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(Fz(e,`recognizeWith`,this))return this;var t=this.simultaneous;return e=Gz(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return Fz(e,`dropRecognizeWith`,this)?this:(e=Gz(e,this),delete this.simultaneous[e.id],this)},t.requireFailure=function(e){if(Fz(e,`requireFailure`,this))return this;var t=this.requireFail;return e=Gz(e,this),fz(t,e)===-1&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(Fz(e,`dropRequireFailure`,this))return this;e=Gz(e,this);var t=fz(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<zz&&r(t.options.event+Kz(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=zz&&r(t.options.event+Kz(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=Hz},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(Hz|Iz)))return!1;e++}return!0},t.recognize=function(e){var t=tR({},e);if(!WR(this.options.enable,[this,t])){this.reset(),this.state=Hz;return}this.state&(Bz|Vz|Hz)&&(this.state=Iz),this.state=this.process(t),this.state&(Lz|Rz|zz|Vz)&&this.tryEmit(t)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),Jz=function(e){$L(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,QL({event:`tap`,pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this,n.pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}var n=t.prototype;return n.getTouchAction=function(){return[hR]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime<n.time;if(this.reset(),e.eventType&kR&&this.count===0)return this.failTimeout();if(i&&a&&r){if(e.eventType!==jR)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<n.interval,s=!this.pCenter||ZR(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,!s||!o?this.count=1:this.count+=1,this._input=e,this.count%n.taps===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){t.state=Bz,t.tryEmit()},n.interval),Lz):Bz}return Hz},n.failTimeout=function(){var e=this;return this._timer=setTimeout(function(){e.state=Hz},this.options.interval),Hz},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){this.state===Bz&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(qz),Yz=function(e){$L(t,e);function t(t){return t===void 0&&(t={}),e.call(this,QL({pointers:1},t))||this}var n=t.prototype;return n.attrTest=function(e){var t=this.options.pointers;return t===0||e.pointers.length===t},n.process=function(e){var t=this.state,n=e.eventType,r=t&(Lz|Rz),i=this.attrTest(e);return r&&(n&MR||!i)?t|Vz:r||i?n&jR?t|zz:t&Lz?t|Rz:Lz:Hz},t}(qz);function Xz(e){return e===LR?`down`:e===IR?`up`:e===PR?`left`:e===FR?`right`:``}var Zz=function(e){$L(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,QL({event:`pan`,threshold:10,pointers:1,direction:BR},t))||this,n.pX=null,n.pY=null,n}var n=t.prototype;return n.getTouchAction=function(){var e=this.options.direction,t=[];return e&RR&&t.push(vR),e&zR&&t.push(_R),t},n.directionTest=function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,a=e.deltaX,o=e.deltaY;return i&t.direction||(t.direction&RR?(i=a===0?NR:a<0?PR:FR,n=a!==this.pX,r=Math.abs(e.deltaX)):(i=o===0?NR:o<0?IR:LR,n=o!==this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},n.attrTest=function(e){return Yz.prototype.attrTest.call(this,e)&&(this.state&Lz||!(this.state&Lz)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var n=Xz(t.direction);n&&(t.additionalEvent=this.options.event+n),e.prototype.emit.call(this,t)},t}(Yz),Qz=function(e){$L(t,e);function t(t){return t===void 0&&(t={}),e.call(this,QL({event:`swipe`,threshold:10,velocity:.3,direction:RR|zR,pointers:1},t))||this}var n=t.prototype;return n.getTouchAction=function(){return Zz.prototype.getTouchAction.call(this)},n.attrTest=function(t){var n=this.options.direction,r;return n&(RR|zR)?r=t.overallVelocity:n&RR?r=t.overallVelocityX:n&zR&&(r=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&oR(r)>this.options.velocity&&t.eventType&jR},n.emit=function(e){var t=Xz(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(Yz),$z=function(e){$L(t,e);function t(t){return t===void 0&&(t={}),e.call(this,QL({event:`pinch`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[gR]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&Lz)},n.emit=function(t){if(t.scale!==1){var n=t.scale<1?`in`:`out`;t.additionalEvent=this.options.event+n}e.prototype.emit.call(this,t)},t}(Yz),eB=function(e){$L(t,e);function t(t){return t===void 0&&(t={}),e.call(this,QL({event:`rotate`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[gR]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&Lz)},t}(Yz),tB=function(e){$L(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,QL({event:`press`,pointers:1,time:251,threshold:9},t))||this,n._timer=null,n._input=null,n}var n=t.prototype;return n.getTouchAction=function(){return[mR]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime>n.time;if(this._input=e,!i||!r||e.eventType&(jR|MR)&&!a)this.reset();else if(e.eventType&kR)this.reset(),this._timer=setTimeout(function(){t.state=Bz,t.tryEmit()},n.time);else if(e.eventType&jR)return Bz;return Hz},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){this.state===Bz&&(e&&e.eventType&jR?this.manager.emit(this.options.event+`up`,e):(this._input.timeStamp=sR(),this.manager.emit(this.options.event,this._input)))},t}(qz),nB={domEvents:!1,touchAction:pR,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:`none`,touchSelect:`none`,touchCallout:`none`,contentZooming:`none`,userDrag:`none`,tapHighlightColor:`rgba(0,0,0,0)`}},rB=[[eB,{enable:!1}],[$z,{enable:!1},[`rotate`]],[Qz,{direction:RR}],[Zz,{direction:RR},[`swipe`]],[Jz],[Jz,{event:`doubletap`,taps:2},[`tap`]],[tB]],iB=1,aB=2;function oB(e,t){var n=e.element;if(n.style){var r;UR(e.options.cssProps,function(i,a){r=cR(n.style,a),t?(e.oldCssProps[r]=n.style[r],n.style[r]=i):n.style[r]=e.oldCssProps[r]||``}),t||(e.oldCssProps={})}}function sB(e,t){var n=document.createEvent(`Event`);n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}var cB=function(){function e(e,t){var n=this;this.options=tR({},nB,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=Pz(this),this.touchAction=new qR(this,this.options.touchAction),oB(this,!0),UR(this.options.recognizers,function(e){var t=n.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}var t=e.prototype;return t.set=function(e){return tR(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?aB:iB},t.recognize=function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var n,r=this.recognizers,i=t.curRecognizer;(!i||i&&i.state&Bz)&&(t.curRecognizer=null,i=null);for(var a=0;a<r.length;)n=r[a],t.stopped!==aB&&(!i||n===i||n.canRecognizeWith(i))?n.recognize(e):n.reset(),!i&&n.state&(Lz|Rz|zz)&&(t.curRecognizer=n,i=n),a++}},t.get=function(e){if(e instanceof qz)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event===e)return t[n];return null},t.add=function(e){if(Fz(e,`add`,this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},t.remove=function(e){if(Fz(e,`remove`,this))return this;var t=this.get(e);if(e){var n=this.recognizers,r=fz(n,t);r!==-1&&(n.splice(r,1),this.touchAction.update())}return this},t.on=function(e,t){if(e===void 0||t===void 0)return this;var n=this.handlers;return UR(sz(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this},t.off=function(e,t){if(e===void 0)return this;var n=this.handlers;return UR(sz(e),function(e){t?n[e]&&n[e].splice(fz(n[e],t),1):delete n[e]}),this},t.emit=function(e,t){this.options.domEvents&&sB(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(!(!n||!n.length)){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](t),r++}},t.destroy=function(){this.element&&oB(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),lB={touchstart:kR,touchmove:AR,touchend:jR,touchcancel:MR},uB=`touchstart`,dB=`touchstart touchmove touchend touchcancel`,fB=function(e){$L(t,e);function t(){var n,r=t.prototype;return r.evTarget=uB,r.evWin=dB,n=e.apply(this,arguments)||this,n.started=!1,n}var n=t.prototype;return n.handler=function(e){var t=lB[e.type];if(t===kR&&(this.started=!0),this.started){var n=pB.call(this,e,t);t&(jR|MR)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:wR,srcEvent:e})}},t}(dz);function pB(e,t){var n=vz(e.touches),r=vz(e.changedTouches);return t&(jR|MR)&&(n=yz(n.concat(r),`identifier`,!0)),[n,r]}function mB(e,t,n){var r=`DEPRECATED METHOD: `+t+`
|
|
5
|
-
`+n+` AT
|
|
6
|
-
`;return function(){var t=Error(`get-stack-trace`),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,``).replace(/^\s+at\s+/gm,``).replace(/^Object.<anonymous>\s*\(/gm,`{anonymous}()@`):`Unknown Stack Trace`,i=window.console&&(window.console.warn||window.console.log);return i&&i.call(window.console,r,n),e.apply(this,arguments)}}var hB=mB(function(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;)(!n||n&&e[r[i]]===void 0)&&(e[r[i]]=t[r[i]]),i++;return e},`extend`,"Use `assign`."),gB=mB(function(e,t){return hB(e,t,!0)},`merge`,"Use `assign`.");function _B(e,t,n){var r=t.prototype,i=e.prototype=Object.create(r);i.constructor=e,i._super=r,n&&tR(i,n)}function vB(e,t){return function(){return e.apply(t,arguments)}}var yB=function(){var e=function(e,t){return t===void 0&&(t={}),new cB(e,QL({recognizers:rB.concat()},t))};return e.VERSION=`2.0.17-rc`,e.DIRECTION_ALL=BR,e.DIRECTION_DOWN=LR,e.DIRECTION_LEFT=PR,e.DIRECTION_RIGHT=FR,e.DIRECTION_UP=IR,e.DIRECTION_HORIZONTAL=RR,e.DIRECTION_VERTICAL=zR,e.DIRECTION_NONE=NR,e.DIRECTION_DOWN=LR,e.INPUT_START=kR,e.INPUT_MOVE=AR,e.INPUT_END=jR,e.INPUT_CANCEL=MR,e.STATE_POSSIBLE=Iz,e.STATE_BEGAN=Lz,e.STATE_CHANGED=Rz,e.STATE_ENDED=zz,e.STATE_RECOGNIZED=Bz,e.STATE_CANCELLED=Vz,e.STATE_FAILED=Hz,e.Manager=cB,e.Input=dz,e.TouchAction=qR,e.TouchInput=Sz,e.MouseInput=Dz,e.PointerEventInput=_z,e.TouchMouseInput=Nz,e.SingleTouchInput=fB,e.Recognizer=qz,e.AttrRecognizer=Yz,e.Tap=Jz,e.Pan=Zz,e.Swipe=Qz,e.Pinch=$z,e.Rotate=eB,e.Press=tB,e.on=cz,e.off=lz,e.each=UR,e.merge=gB,e.extend=hB,e.bindFn=vB,e.assign=tR,e.inherit=_B,e.bindFn=vB,e.prefixed=cR,e.toArray=vz,e.inArray=fz,e.uniqueArray=yz,e.splitStr=sz,e.boolOrFn=WR,e.hasParent=JR,e.addEventListeners=cz,e.removeEventListeners=lz,e.defaults=tR({},nB,{preset:rB}),e}();yB.defaults,Lj(`DELETE`);function bB(){var e=[...arguments];return xB(e.length?e:[rN()])}function xB(e){let[t,n,r]=SB(e),i=1,a=()=>{let e=2091639*t+i*23283064365386963e-26;return t=n,n=r,r=e-(i=e|0)};return a.uint32=()=>a()*4294967296,a.fract53=()=>a()+(a()*2097152|0)*11102230246251565e-32,a.algorithm=`Alea`,a.seed=e,a.version=`0.9`,a}function SB(){let e=CB(),t=e(` `),n=e(` `),r=e(` `);for(let i=0;i<arguments.length;i++)t-=e(i<0||arguments.length<=i?void 0:arguments[i]),t<0&&(t+=1),n-=e(i<0||arguments.length<=i?void 0:arguments[i]),n<0&&(n+=1),r-=e(i<0||arguments.length<=i?void 0:arguments[i]),r<0&&(r+=1);return[t,n,r]}function CB(){let e=4022871197;return function(t){let n=t.toString();for(let t=0;t<n.length;t++){e+=n.charCodeAt(t);let r=.02519603282416938*e;e=r>>>0,r-=e,r*=e,e=r>>>0,r-=e,e+=r*4294967296}return(e>>>0)*23283064365386963e-26}}function wB(){let e=()=>{};return{on:e,off:e,destroy:e,emit:e,get(){return{set:e}}}}var TB=typeof window<`u`?window.Hammer||yB:function(){return wB()};function EB(e){var t;this._cleanupQueue=[],this.active=!1,this._dom={container:e,overlay:document.createElement(`div`)},this._dom.overlay.classList.add(`vis-overlay`),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});let n=TB(this._dom.overlay);n.on(`tap`,B(t=this._onTapOverlay).call(t,this)),this._cleanupQueue.push(()=>{n.destroy()});let r=[`tap`,`doubletap`,`press`,`pinch`,`pan`,`panstart`,`panmove`,`panend`];V(r).call(r,e=>{n.on(e,e=>{e.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=t=>{DB(t.target,e)||this.deactivate()},document.body.addEventListener(`click`,this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener(`click`,this._onClick)})),this._escListener=e=>{(`key`in e?e.key===`Escape`:e.keyCode===27)&&this.deactivate()}}zD(EB.prototype),EB.current=null,EB.prototype.destroy=function(){this.deactivate();for(let n of BN(e=cP(t=this._cleanupQueue).call(t,0)).call(e)){var e,t;n()}},EB.prototype.activate=function(){EB.current&&EB.current.deactivate(),EB.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)},EB.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`)},EB.prototype._onTapOverlay=function(e){this.activate(),e.srcEvent.stopPropagation()};function DB(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}var OB=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,kB=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,AB=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,jB=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function MB(e){if(e)for(;e.hasChildNodes()===!0;){let t=e.firstChild;t&&(MB(t),e.removeChild(t))}}function NB(e){return e instanceof String||typeof e==`string`}function PB(e){return typeof e==`object`&&!!e}function FB(e,t,n,r){let i=!1;r===!0&&(i=t[n]===null&&e[n]!==void 0),i?delete e[n]:e[n]=t[n]}function IB(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];for(let r in e)if(t[r]!==void 0)if(t[r]===null||typeof t[r]!=`object`)FB(e,t,r,n);else{let i=e[r],a=t[r];PB(i)&&PB(a)&&IB(i,a,n)}}function LB(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(hM(n))throw TypeError(`Arrays are not supported by deepExtend`);for(let i=0;i<e.length;i++){let a=e[i];if(Object.prototype.hasOwnProperty.call(n,a))if(n[a]&&n[a].constructor===Object)t[a]===void 0&&(t[a]={}),t[a].constructor===Object?U(t[a],n[a],!1,r):FB(t,n,a,r);else if(hM(n[a]))throw TypeError(`Arrays are not supported by deepExtend`);else FB(t,n,a,r)}return t}function RB(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(hM(n))throw TypeError(`Arrays are not supported by deepExtend`);for(let i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&!zP(e).call(e,i))if(n[i]&&n[i].constructor===Object)t[i]===void 0&&(t[i]={}),t[i].constructor===Object?U(t[i],n[i]):FB(t,n,i,r);else if(hM(n[i])){t[i]=[];for(let e=0;e<n[i].length;e++)t[i].push(n[i][e])}else FB(t,n,i,r);return t}function U(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];for(let a in t)if(Object.prototype.hasOwnProperty.call(t,a)||n===!0)if(typeof t[a]==`object`&&t[a]!==null&&QP(t[a])===Object.prototype)e[a]===void 0?e[a]=U({},t[a],n):typeof e[a]==`object`&&e[a]!==null&&QP(e[a])===Object.prototype?U(e[a],t[a],n):FB(e,t,a,r);else if(hM(t[a])){var i;e[a]=$j(i=t[a]).call(i)}else FB(e,t,a,r);return e}function zB(e,t){return[...e,t]}function BB(e){return $j(e).call(e)}function VB(e){return e.getBoundingClientRect().left}function HB(e){return e.getBoundingClientRect().top}function W(e,t){if(hM(e)){let n=e.length;for(let r=0;r<n;r++)t(e[r],r,e)}else for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(e[n],n,e)}function UB(e){let t;switch(e.length){case 3:case 4:return t=kB.exec(e),t?{r:dI(t[1]+t[1],16),g:dI(t[2]+t[2],16),b:dI(t[3]+t[3],16)}:null;case 6:case 7:return t=OB.exec(e),t?{r:dI(t[1],16),g:dI(t[2],16),b:dI(t[3],16)}:null;default:return null}}function WB(e,t){if(zP(e).call(e,`rgba`))return e;if(zP(e).call(e,`rgb`)){let n=e.substr(H(e).call(e,`(`)+1).replace(`)`,``).split(`,`);return`rgba(`+n[0]+`,`+n[1]+`,`+n[2]+`,`+t+`)`}else{let n=UB(e);return n==null?e:`rgba(`+n.r+`,`+n.g+`,`+n.b+`,`+t+`)`}}function GB(e,t,n){var r;return`#`+$j(r=((1<<24)+(e<<16)+(t<<8)+n).toString(16)).call(r,1)}function KB(e,t){if(NB(e)){let t=e;if(QB(t)){var n;let e=jM(n=t.substr(4).substr(0,t.length-5).split(`,`)).call(n,function(e){return dI(e)});t=GB(e[0],e[1],e[2])}if(ZB(t)===!0){let e=XB(t),n={h:e.h,s:e.s*.8,v:Math.min(1,e.v*1.02)},r={h:e.h,s:Math.min(1,e.s*1.25),v:e.v*.8},i=YB(r.h,r.s,r.v),a=YB(n.h,n.s,n.v);return{background:t,border:i,highlight:{background:a,border:i},hover:{background:a,border:i}}}else return{background:t,border:t,highlight:{background:t,border:t},hover:{background:t,border:t}}}else return{background:e.background||void 0,border:e.border||void 0,highlight:NB(e.highlight)?{border:e.highlight,background:e.highlight}:{background:e.highlight&&e.highlight.background||void 0,border:e.highlight&&e.highlight.border||void 0},hover:NB(e.hover)?{border:e.hover,background:e.hover}:{border:e.hover&&e.hover.border||void 0,background:e.hover&&e.hover.background||void 0}}}function qB(e,t,n){e/=255,t/=255,n/=255;let r=Math.min(e,Math.min(t,n)),i=Math.max(e,Math.max(t,n));if(r===i)return{h:0,s:0,v:r};let a=e===r?t-n:n===r?e-t:n-e;return{h:60*((e===r?3:n===r?1:5)-a/(i-r))/360,s:(i-r)/i,v:i}}function JB(e,t,n){let r,i,a,o=Math.floor(e*6),s=e*6-o,c=n*(1-t),l=n*(1-s*t),u=n*(1-(1-s)*t);switch(o%6){case 0:r=n,i=u,a=c;break;case 1:r=l,i=n,a=c;break;case 2:r=c,i=n,a=u;break;case 3:r=c,i=l,a=n;break;case 4:r=u,i=c,a=n;break;case 5:r=n,i=c,a=l;break}return{r:Math.floor(r*255),g:Math.floor(i*255),b:Math.floor(a*255)}}function YB(e,t,n){let r=JB(e,t,n);return GB(r.r,r.g,r.b)}function XB(e){let t=UB(e);if(!t)throw TypeError(`'${e}' is not a valid color.`);return qB(t.r,t.g,t.b)}function ZB(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)}function QB(e){return AB.test(e)}function $B(e){return jB.test(e)}function eV(e){if(typeof e!=`object`||!e)return null;if(e instanceof Element)return e;let t=zI(e);for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&typeof e[n]==`object`&&(t[n]=eV(e[n]));return t}function tV(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=function(e){return e!=null},a=function(e){return typeof e==`object`&&!!e},o=function(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0};if(!a(e))throw Error(`Parameter mergeTarget must be an object`);if(!a(t))throw Error(`Parameter options must be an object`);if(!i(n))throw Error(`Parameter option must have a value`);if(!a(r))throw Error(`Parameter globalOptions must be an object`);let s=function(e,t,n){a(e[n])||(e[n]={});let r=t[n],i=e[n];for(let e in r)Object.prototype.hasOwnProperty.call(r,e)&&(i[e]=r[e])},c=t[n],l=a(r)&&!o(r)?r[n]:void 0,u=l?l.enabled:void 0;if(c===void 0)return;if(typeof c==`boolean`){a(e[n])||(e[n]={}),e[n].enabled=c;return}if(c===null&&!a(e[n]))if(i(l))e[n]=zI(l);else return;if(!a(c))return;let d=!0;c.enabled===void 0?u!==void 0&&(d=l.enabled):d=c.enabled,s(e,t,n),e[n].enabled=d}var nV={linear(e){return e},easeInQuad(e){return e*e},easeOutQuad(e){return e*(2-e)},easeInOutQuad(e){return e<.5?2*e*e:-1+(4-2*e)*e},easeInCubic(e){return e*e*e},easeOutCubic(e){return--e*e*e+1},easeInOutCubic(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart(e){return e*e*e*e},easeOutQuart(e){return 1- --e*e*e*e},easeInOutQuart(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint(e){return e*e*e*e*e},easeOutQuint(e){return 1+--e*e*e*e*e},easeInOutQuint(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}};function rV(e,t){let n;hM(t)||(t=[t]);for(let r of e)if(r){n=r[t[0]];for(let e=1;e<t.length;e++)n&&=n[t[e]];if(n!==void 0)break}return n}var iV={black:`#000000`,navy:`#000080`,darkblue:`#00008B`,mediumblue:`#0000CD`,blue:`#0000FF`,darkgreen:`#006400`,green:`#008000`,teal:`#008080`,darkcyan:`#008B8B`,deepskyblue:`#00BFFF`,darkturquoise:`#00CED1`,mediumspringgreen:`#00FA9A`,lime:`#00FF00`,springgreen:`#00FF7F`,aqua:`#00FFFF`,cyan:`#00FFFF`,midnightblue:`#191970`,dodgerblue:`#1E90FF`,lightseagreen:`#20B2AA`,forestgreen:`#228B22`,seagreen:`#2E8B57`,darkslategray:`#2F4F4F`,limegreen:`#32CD32`,mediumseagreen:`#3CB371`,turquoise:`#40E0D0`,royalblue:`#4169E1`,steelblue:`#4682B4`,darkslateblue:`#483D8B`,mediumturquoise:`#48D1CC`,indigo:`#4B0082`,darkolivegreen:`#556B2F`,cadetblue:`#5F9EA0`,cornflowerblue:`#6495ED`,mediumaquamarine:`#66CDAA`,dimgray:`#696969`,slateblue:`#6A5ACD`,olivedrab:`#6B8E23`,slategray:`#708090`,lightslategray:`#778899`,mediumslateblue:`#7B68EE`,lawngreen:`#7CFC00`,chartreuse:`#7FFF00`,aquamarine:`#7FFFD4`,maroon:`#800000`,purple:`#800080`,olive:`#808000`,gray:`#808080`,skyblue:`#87CEEB`,lightskyblue:`#87CEFA`,blueviolet:`#8A2BE2`,darkred:`#8B0000`,darkmagenta:`#8B008B`,saddlebrown:`#8B4513`,darkseagreen:`#8FBC8F`,lightgreen:`#90EE90`,mediumpurple:`#9370D8`,darkviolet:`#9400D3`,palegreen:`#98FB98`,darkorchid:`#9932CC`,yellowgreen:`#9ACD32`,sienna:`#A0522D`,brown:`#A52A2A`,darkgray:`#A9A9A9`,lightblue:`#ADD8E6`,greenyellow:`#ADFF2F`,paleturquoise:`#AFEEEE`,lightsteelblue:`#B0C4DE`,powderblue:`#B0E0E6`,firebrick:`#B22222`,darkgoldenrod:`#B8860B`,mediumorchid:`#BA55D3`,rosybrown:`#BC8F8F`,darkkhaki:`#BDB76B`,silver:`#C0C0C0`,mediumvioletred:`#C71585`,indianred:`#CD5C5C`,peru:`#CD853F`,chocolate:`#D2691E`,tan:`#D2B48C`,lightgrey:`#D3D3D3`,palevioletred:`#D87093`,thistle:`#D8BFD8`,orchid:`#DA70D6`,goldenrod:`#DAA520`,crimson:`#DC143C`,gainsboro:`#DCDCDC`,plum:`#DDA0DD`,burlywood:`#DEB887`,lightcyan:`#E0FFFF`,lavender:`#E6E6FA`,darksalmon:`#E9967A`,violet:`#EE82EE`,palegoldenrod:`#EEE8AA`,lightcoral:`#F08080`,khaki:`#F0E68C`,aliceblue:`#F0F8FF`,honeydew:`#F0FFF0`,azure:`#F0FFFF`,sandybrown:`#F4A460`,wheat:`#F5DEB3`,beige:`#F5F5DC`,whitesmoke:`#F5F5F5`,mintcream:`#F5FFFA`,ghostwhite:`#F8F8FF`,salmon:`#FA8072`,antiquewhite:`#FAEBD7`,linen:`#FAF0E6`,lightgoldenrodyellow:`#FAFAD2`,oldlace:`#FDF5E6`,red:`#FF0000`,fuchsia:`#FF00FF`,magenta:`#FF00FF`,deeppink:`#FF1493`,orangered:`#FF4500`,tomato:`#FF6347`,hotpink:`#FF69B4`,coral:`#FF7F50`,darkorange:`#FF8C00`,lightsalmon:`#FFA07A`,orange:`#FFA500`,lightpink:`#FFB6C1`,pink:`#FFC0CB`,gold:`#FFD700`,peachpuff:`#FFDAB9`,navajowhite:`#FFDEAD`,moccasin:`#FFE4B5`,bisque:`#FFE4C4`,mistyrose:`#FFE4E1`,blanchedalmond:`#FFEBCD`,papayawhip:`#FFEFD5`,lavenderblush:`#FFF0F5`,seashell:`#FFF5EE`,cornsilk:`#FFF8DC`,lemonchiffon:`#FFFACD`,floralwhite:`#FFFAF0`,snow:`#FFFAFA`,yellow:`#FFFF00`,lightyellow:`#FFFFE0`,ivory:`#FFFFF0`,white:`#FFFFFF`},aV=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.pixelRatio=e,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=()=>{},this.closeCallback=()=>{},this._create()}insertTo(e){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}setUpdateCallback(e){if(typeof e==`function`)this.updateCallback=e;else throw Error(`Function attempted to set as colorPicker update callback is not a function.`)}setCloseCallback(e){if(typeof e==`function`)this.closeCallback=e;else throw Error(`Function attempted to set as colorPicker closing callback is not a function.`)}_isColorString(e){if(typeof e==`string`)return iV[e]}setColor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e===`none`)return;let n,r=this._isColorString(e);if(r!==void 0&&(e=r),NB(e)===!0){if(QB(e)===!0){let t=e.substr(4).substr(0,e.length-5).split(`,`);n={r:t[0],g:t[1],b:t[2],a:1}}else if($B(e)===!0){let t=e.substr(5).substr(0,e.length-6).split(`,`);n={r:t[0],g:t[1],b:t[2],a:t[3]}}else if(ZB(e)===!0){let t=UB(e);n={r:t.r,g:t.g,b:t.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){let t=e.a===void 0?`1.0`:e.a;n={r:e.r,g:e.g,b:e.b,a:t}}if(n===void 0)throw Error(`Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: `+sL(e));this._setColor(n,t)}show(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display=`block`,this._generateHueCircle()}_hide(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)===!0&&(this.previousColor=QE({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display=`none`,ML(()=>{this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0)},0)}_save(){this.updateCallback(this.color),this.applied=!1,this._hide()}_apply(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}_loadLast(){this.previousColor===void 0?alert(`There is no last color to load...`):this.setColor(this.previousColor,!1)}_setColor(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)===!0&&(this.initialColor=QE({},e)),this.color=e;let t=qB(e.r,e.g,e.b),n=2*Math.PI,r=this.r*t.s,i=this.centerCoordinates.x+r*Math.sin(n*t.h),a=this.centerCoordinates.y+r*Math.cos(n*t.h);this.colorPickerSelector.style.left=i-.5*this.colorPickerSelector.clientWidth+`px`,this.colorPickerSelector.style.top=a-.5*this.colorPickerSelector.clientHeight+`px`,this._updatePicker(e)}_setOpacity(e){this.color.a=e/100,this._updatePicker(this.color)}_setBrightness(e){let t=qB(this.color.r,this.color.g,this.color.b);t.v=e/100;let n=JB(t.h,t.s,t.v);n.a=this.color.a,this.color=n,this._updatePicker()}_updatePicker(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color,t=qB(e.r,e.g,e.b),n=this.colorPickerCanvas.getContext(`2d`);this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1)),n.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);let r=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;n.clearRect(0,0,r,i),n.putImageData(this.hueCircle,0,0),n.fillStyle=`rgba(0,0,0,`+(1-t.v)+`)`,n.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),ZL(n).call(n),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor=`rgba(`+this.initialColor.r+`,`+this.initialColor.g+`,`+this.initialColor.b+`,`+this.initialColor.a+`)`,this.newColorDiv.style.backgroundColor=`rgba(`+this.color.r+`,`+this.color.g+`,`+this.color.b+`,`+this.color.a+`)`}_setSize(){this.colorPickerCanvas.style.width=`100%`,this.colorPickerCanvas.style.height=`100%`,this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}_create(){var e,t,n,r;if(this.frame=document.createElement(`div`),this.frame.className=`vis-color-picker`,this.colorPickerDiv=document.createElement(`div`),this.colorPickerSelector=document.createElement(`div`),this.colorPickerSelector.className=`vis-selector`,this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement(`canvas`),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){let e=this.colorPickerCanvas.getContext(`2d`);this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1),this.colorPickerCanvas.getContext(`2d`).setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{let e=document.createElement(`DIV`);e.style.color=`red`,e.style.fontWeight=`bold`,e.style.padding=`10px`,e.innerText=`Error: your browser does not support HTML canvas`,this.colorPickerCanvas.appendChild(e)}this.colorPickerDiv.className=`vis-color`,this.opacityDiv=document.createElement(`div`),this.opacityDiv.className=`vis-opacity`,this.brightnessDiv=document.createElement(`div`),this.brightnessDiv.className=`vis-brightness`,this.arrowDiv=document.createElement(`div`),this.arrowDiv.className=`vis-arrow`,this.opacityRange=document.createElement(`input`);try{this.opacityRange.type=`range`,this.opacityRange.min=`0`,this.opacityRange.max=`100`}catch{}this.opacityRange.value=`100`,this.opacityRange.className=`vis-range`,this.brightnessRange=document.createElement(`input`);try{this.brightnessRange.type=`range`,this.brightnessRange.min=`0`,this.brightnessRange.max=`100`}catch{}this.brightnessRange.value=`100`,this.brightnessRange.className=`vis-range`,this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);let i=this;this.opacityRange.onchange=function(){i._setOpacity(this.value)},this.opacityRange.oninput=function(){i._setOpacity(this.value)},this.brightnessRange.onchange=function(){i._setBrightness(this.value)},this.brightnessRange.oninput=function(){i._setBrightness(this.value)},this.brightnessLabel=document.createElement(`div`),this.brightnessLabel.className=`vis-label vis-brightness`,this.brightnessLabel.innerText=`brightness:`,this.opacityLabel=document.createElement(`div`),this.opacityLabel.className=`vis-label vis-opacity`,this.opacityLabel.innerText=`opacity:`,this.newColorDiv=document.createElement(`div`),this.newColorDiv.className=`vis-new-color`,this.newColorDiv.innerText=`new`,this.initialColorDiv=document.createElement(`div`),this.initialColorDiv.className=`vis-initial-color`,this.initialColorDiv.innerText=`initial`,this.cancelButton=document.createElement(`div`),this.cancelButton.className=`vis-button vis-cancel`,this.cancelButton.innerText=`cancel`,this.cancelButton.onclick=B(e=this._hide).call(e,this,!1),this.applyButton=document.createElement(`div`),this.applyButton.className=`vis-button vis-apply`,this.applyButton.innerText=`apply`,this.applyButton.onclick=B(t=this._apply).call(t,this),this.saveButton=document.createElement(`div`),this.saveButton.className=`vis-button vis-save`,this.saveButton.innerText=`save`,this.saveButton.onclick=B(n=this._save).call(n,this),this.loadButton=document.createElement(`div`),this.loadButton.className=`vis-button vis-load`,this.loadButton.innerText=`load last`,this.loadButton.onclick=B(r=this._loadLast).call(r,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}_bindHammer(){this.drag={},this.pinch={},this.hammer=new TB(this.colorPickerCanvas),this.hammer.get(`pinch`).set({enable:!0}),this.hammer.on(`hammer.input`,e=>{e.isFirst&&this._moveSelector(e)}),this.hammer.on(`tap`,e=>{this._moveSelector(e)}),this.hammer.on(`panstart`,e=>{this._moveSelector(e)}),this.hammer.on(`panmove`,e=>{this._moveSelector(e)}),this.hammer.on(`panend`,e=>{this._moveSelector(e)})}_generateHueCircle(){if(this.generated===!1){let e=this.colorPickerCanvas.getContext(`2d`);this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)),e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);let t=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,n);let r,i,a,o;this.centerCoordinates={x:t*.5,y:n*.5},this.r=.49*t;let s=2*Math.PI/360,c=1/this.r,l;for(a=0;a<360;a++)for(o=0;o<this.r;o++)r=this.centerCoordinates.x+o*Math.sin(s*a),i=this.centerCoordinates.y+o*Math.cos(s*a),l=JB(a*.002777777777777778,o*c,1),e.fillStyle=`rgb(`+l.r+`,`+l.g+`,`+l.b+`)`,e.fillRect(r-.5,i-.5,2,2);e.strokeStyle=`rgba(0,0,0,1)`,e.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),e.stroke(),this.hueCircle=e.getImageData(0,0,t,n)}this.generated=!0}_moveSelector(e){let t=this.colorPickerDiv.getBoundingClientRect(),n=e.center.x-t.left,r=e.center.y-t.top,i=.5*this.colorPickerDiv.clientHeight,a=.5*this.colorPickerDiv.clientWidth,o=n-a,s=r-i,c=Math.atan2(o,s),l=.98*Math.min(Math.sqrt(o*o+s*s),a),u=Math.cos(c)*l+i,d=Math.sin(c)*l+a;this.colorPickerSelector.style.top=u-.5*this.colorPickerSelector.clientHeight+`px`,this.colorPickerSelector.style.left=d-.5*this.colorPickerSelector.clientWidth+`px`;let f=c/(2*Math.PI);f=f<0?f+1:f;let p=l/this.r,m=qB(this.color.r,this.color.g,this.color.b);m.h=f,m.s=p;let h=JB(m.h,m.s,m.v);h.a=this.color.a,this.color=h,this.initialColorDiv.style.backgroundColor=`rgba(`+this.initialColor.r+`,`+this.initialColor.g+`,`+this.initialColor.b+`,`+this.initialColor.a+`)`,this.newColorDiv.style.backgroundColor=`rgba(`+this.color.r+`,`+this.color.g+`,`+this.color.b+`,`+this.color.a+`)`}};function oV(){var e=[...arguments];if(e.length<1)throw TypeError(`Invalid arguments.`);if(e.length===1)return document.createTextNode(e[0]);{let t=document.createElement(e[0]);return t.appendChild(oV(...$j(e).call(e,1))),t}}var sV=class{constructor(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:()=>!1;this.parent=e,this.changedOptions=[],this.container=t,this.allowCreation=!1,this.hideOption=i,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},QE(this.options,this.defaultOptions),this.configureOptions=n,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new aV(r),this.wrapper=void 0}setOptions(e){if(e!==void 0){this.popupHistory={},this._removePopup();let t=!0;if(typeof e==`string`)this.options.filter=e;else if(hM(e))this.options.filter=e.join();else if(typeof e==`object`){if(e==null)throw TypeError(`options cannot be null`);e.container!==void 0&&(this.options.container=e.container),DF(e)!==void 0&&(this.options.filter=DF(e)),e.showButton!==void 0&&(this.options.showButton=e.showButton),e.enabled!==void 0&&(t=e.enabled)}else typeof e==`boolean`?(this.options.filter=!0,t=e):typeof e==`function`&&(this.options.filter=e,t=!0);DF(this.options)===!1&&(t=!1),this.options.enabled=t}this._clean()}setModuleOptions(e){this.moduleOptions=e,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}_create(){this._clean(),this.changedOptions=[];let e=DF(this.options),t=0,n=!1;for(let r in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,r)&&(this.allowCreation=!1,n=!1,typeof e==`function`?(n=e(r,[]),n||=this._handleObject(this.configureOptions[r],[r],!0)):(e===!0||H(e).call(e,r)!==-1)&&(n=!0),n!==!1&&(this.allowCreation=!0,t>0&&this._makeItem([]),this._makeHeader(r),this._handleObject(this.configureOptions[r],[r])),t++);this._makeButton(),this._push()}_push(){this.wrapper=document.createElement(`div`),this.wrapper.className=`vis-configuration-wrapper`,this.container.appendChild(this.wrapper);for(let e=0;e<this.domElements.length;e++)this.wrapper.appendChild(this.domElements[e]);this._showPopupIfNeeded()}_clean(){for(let e=0;e<this.domElements.length;e++)this.wrapper.removeChild(this.domElements[e]);this.wrapper!==void 0&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}_getValue(e){let t=this.moduleOptions;for(let n=0;n<e.length;n++)if(t[e[n]]!==void 0)t=t[e[n]];else{t=void 0;break}return t}_makeItem(e){if(this.allowCreation===!0){let n=document.createElement(`div`);n.className=`vis-configuration vis-config-item vis-config-s`+e.length;var t=[...arguments].slice(1);return V(t).call(t,e=>{n.appendChild(e)}),this.domElements.push(n),this.domElements.length}return 0}_makeHeader(e){let t=document.createElement(`div`);t.className=`vis-configuration vis-config-header`,t.innerText=e,this._makeItem([],t)}_makeLabel(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=document.createElement(`div`);if(r.className=`vis-configuration vis-config-label vis-config-s`+t.length,n===!0){for(;r.firstChild;)r.removeChild(r.firstChild);r.appendChild(oV(`i`,`b`,e))}else r.innerText=e+`:`;return r}_makeDropdown(e,t,n){let r=document.createElement(`select`);r.className=`vis-configuration vis-config-select`;let i=0;t!==void 0&&H(e).call(e,t)!==-1&&(i=H(e).call(e,t));for(let t=0;t<e.length;t++){let n=document.createElement(`option`);n.value=e[t],t===i&&(n.selected=`selected`),n.innerText=e[t],r.appendChild(n)}let a=this;r.onchange=function(){a._update(this.value,n)};let o=this._makeLabel(n[n.length-1],n);this._makeItem(n,o,r)}_makeRange(e,t,n){let r=e[0],i=e[1],a=e[2],o=e[3],s=document.createElement(`input`);s.className=`vis-configuration vis-config-range`;try{s.type=`range`,s.min=i,s.max=a}catch{}s.step=o;let c=``,l=0;if(t!==void 0){let e=1.2;t<0&&t*e<i?(s.min=Math.ceil(t*e),l=s.min,c=`range increased`):t/e<i&&(s.min=Math.ceil(t/e),l=s.min,c=`range increased`),t*e>a&&a!==1&&(s.max=Math.ceil(t*e),l=s.max,c=`range increased`),s.value=t}else s.value=r;let u=document.createElement(`input`);u.className=`vis-configuration vis-config-rangeinput`,u.value=s.value;let d=this;s.onchange=function(){u.value=this.value,d._update(Number(this.value),n)},s.oninput=function(){u.value=this.value};let f=this._makeLabel(n[n.length-1],n),p=this._makeItem(n,f,s,u);c!==``&&this.popupHistory[p]!==l&&(this.popupHistory[p]=l,this._setupPopup(c,p))}_makeButton(){if(this.options.showButton===!0){let e=document.createElement(`div`);e.className=`vis-configuration vis-config-button`,e.innerText=`generate options`,e.onclick=()=>{this._printOptions()},e.onmouseover=()=>{e.className=`vis-configuration vis-config-button hover`},e.onmouseout=()=>{e.className=`vis-configuration vis-config-button`},this.optionsContainer=document.createElement(`div`),this.optionsContainer.className=`vis-configuration vis-config-option-container`,this.domElements.push(this.optionsContainer),this.domElements.push(e)}}_setupPopup(e,t){if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter<this.popupLimit){let n=document.createElement(`div`);n.id=`vis-configuration-popup`,n.className=`vis-configuration-popup`,n.innerText=e,n.onclick=()=>{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:n,index:t}}}_removePopup(){this.popupDiv.html!==void 0&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}_showPopupIfNeeded(){if(this.popupDiv.html!==void 0){let e=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=e.left+`px`,this.popupDiv.html.style.top=e.top-30+`px`,document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=ML(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=ML(()=>{this._removePopup()},1800)}}_makeCheckbox(e,t,n){let r=document.createElement(`input`);r.type=`checkbox`,r.className=`vis-configuration vis-config-checkbox`,r.checked=e,t!==void 0&&(r.checked=t,t!==e&&(typeof e==`object`?t!==e.enabled&&this.changedOptions.push({path:n,value:t}):this.changedOptions.push({path:n,value:t})));let i=this;r.onchange=function(){i._update(this.checked,n)};let a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,r)}_makeTextInput(e,t,n){let r=document.createElement(`input`);r.type=`text`,r.className=`vis-configuration vis-config-text`,r.value=t,t!==e&&this.changedOptions.push({path:n,value:t});let i=this;r.onchange=function(){i._update(this.value,n)};let a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,r)}_makeColorField(e,t,n){let r=e[1],i=document.createElement(`div`);t=t===void 0?r:t,t===`none`?i.className=`vis-configuration vis-config-colorBlock none`:(i.className=`vis-configuration vis-config-colorBlock`,i.style.backgroundColor=t),t=t===void 0?r:t,i.onclick=()=>{this._showColorPicker(t,i,n)};let a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,i)}_showColorPicker(e,t,n){t.onclick=function(){},this.colorPicker.insertTo(t),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback(e=>{let r=`rgba(`+e.r+`,`+e.g+`,`+e.b+`,`+e.a+`)`;t.style.backgroundColor=r,this._update(r,n)}),this.colorPicker.setCloseCallback(()=>{t.onclick=()=>{this._showColorPicker(e,t,n)}})}_handleObject(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=!1,i=DF(this.options),a=!1;for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)){r=!0;let s=e[o],c=zB(t,o);if(typeof i==`function`&&(r=i(o,t),r===!1&&!hM(s)&&typeof s!=`string`&&typeof s!=`boolean`&&s instanceof Object&&(this.allowCreation=!1,r=this._handleObject(s,c,!0),this.allowCreation=n===!1)),r!==!1){a=!0;let e=this._getValue(c);if(hM(s))this._handleArray(s,e,c);else if(typeof s==`string`)this._makeTextInput(s,e,c);else if(typeof s==`boolean`)this._makeCheckbox(s,e,c);else if(s instanceof Object){if(!this.hideOption(t,o,this.moduleOptions))if(s.enabled!==void 0){let e=zB(c,`enabled`),t=this._getValue(e);if(t===!0){let e=this._makeLabel(o,c,!0);this._makeItem(c,e),a=this._handleObject(s,c)||a}else this._makeCheckbox(s,t,c)}else{let e=this._makeLabel(o,c,!0);this._makeItem(c,e),a=this._handleObject(s,c)||a}}else console.error(`dont know how to handle`,s,o,c)}}return a}_handleArray(e,t,n){typeof e[0]==`string`&&e[0]===`color`?(this._makeColorField(e,t,n),e[1]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]==`string`?(this._makeDropdown(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]==`number`&&(this._makeRange(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:Number(t)}))}_update(e,t){let n=this._constructOptions(e,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit(`configChange`,n),this.initialized=!0,this.parent.setOptions(n)}_constructOptions(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n;e=e===`true`||e,e=e!==`false`&&e;for(let n=0;n<t.length;n++)t[n]!==`global`&&(r[t[n]]===void 0&&(r[t[n]]={}),n===t.length-1?r[t[n]]=e:r=r[t[n]]);return n}_printOptions(){let e=this.getOptions();for(;this.optionsContainer.firstChild;)this.optionsContainer.removeChild(this.optionsContainer.firstChild);this.optionsContainer.appendChild(oV(`pre`,`const options = `+sL(e,null,2)))}getOptions(){let e={};for(let t=0;t<this.changedOptions.length;t++)this._constructOptions(this.changedOptions[t].value,this.changedOptions[t].path,e);return e}},cV=class{constructor(e,t){this.container=e,this.overflowMethod=t||`cap`,this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement(`div`),this.frame.className=`vis-tooltip`,this.container.appendChild(this.frame)}setPosition(e,t){this.x=dI(e),this.y=dI(t)}setText(e){if(e instanceof Element){for(;this.frame.firstChild;)this.frame.removeChild(this.frame.firstChild);this.frame.appendChild(e)}else this.frame.innerText=e}show(e){if(e===void 0&&(e=!0),e===!0){let e=this.frame.clientHeight,t=this.frame.clientWidth,n=this.frame.parentNode.clientHeight,r=this.frame.parentNode.clientWidth,i=0,a=0;if(this.overflowMethod==`flip`){let n=!1,o=!0;this.y-e<this.padding&&(o=!1),this.x+t>r-this.padding&&(n=!0),i=n?this.x-t:this.x,a=o?this.y-e:this.y}else a=this.y-e,a+e+this.padding>n&&(a=n-e-this.padding),a<this.padding&&(a=this.padding),i=this.x,i+t+this.padding>r&&(i=r-t-this.padding),i<this.padding&&(i=this.padding);this.frame.style.left=i+`px`,this.frame.style.top=a+`px`,this.frame.style.visibility=`visible`,this.hidden=!1}else this.hide()}hide(){this.hidden=!0,this.frame.style.left=`0`,this.frame.style.top=`0`,this.frame.style.visibility=`hidden`}destroy(){this.frame.parentNode.removeChild(this.frame)}},lV=!1,uV,dV=`background: #FFeeee; color: #dd0000`,fV=class e{static validate(t,n,r){lV=!1,uV=n;let i=n;return r!==void 0&&(i=n[r]),e.parse(t,i,[]),lV}static parse(t,n,r){for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.check(i,t,n,r)}static check(t,n,r,i){if(r[t]===void 0&&r.__any__===void 0){e.getSuggestion(t,r,i);return}let a=t,o=!0;r[t]===void 0&&r.__any__!==void 0&&(a=`__any__`,o=e.getType(n[t])===`object`);let s=r[a];o&&s.__type__!==void 0&&(s=s.__type__),e.checkFields(t,n,r,a,s,i)}static checkFields(t,n,r,i,a,o){let s=function(n){console.error(`%c`+n+e.printLocation(o,t),dV)},c=e.getType(n[t]),l=a[c];l===void 0?a.any===void 0&&(s(`Invalid type received for "`+t+`". Expected: `+e.print(WM(a))+`. Received [`+c+`] "`+n[t]+`"`),lV=!0):e.getType(l)===`array`&&H(l).call(l,n[t])===-1?(s(`Invalid option detected in "`+t+`". Allowed values are:`+e.print(l)+` not "`+n[t]+`". `),lV=!0):c===`object`&&i!==`__any__`&&(o=zB(o,t),e.parse(n[t],r[i],o))}static getType(e){let t=typeof e;return t===`object`?e===null?`null`:e instanceof Boolean?`boolean`:e instanceof Number?`number`:e instanceof String?`string`:hM(e)?`array`:e instanceof Date?`date`:e.nodeType===void 0?e._isAMomentObject===!0?`moment`:`object`:`dom`:t===`number`?`number`:t===`boolean`?`boolean`:t===`string`?`string`:t===void 0?`undefined`:t}static getSuggestion(t,n,r){let i=e.findInOptions(t,n,r,!1),a=e.findInOptions(t,uV,[],!0),o;o=i.indexMatch===void 0?a.distance<=4&&i.distance>a.distance?` in `+e.printLocation(i.path,t,``)+`Perhaps it was misplaced? Matching option found at: `+e.printLocation(a.path,a.closestMatch,``):i.distance<=8?`. Did you mean "`+i.closestMatch+`"?`+e.printLocation(i.path,t):`. Did you mean one of these: `+e.print(WM(n))+e.printLocation(r,t):` in `+e.printLocation(i.path,t,``)+`Perhaps it was incomplete? Did you mean: "`+i.indexMatch+`"?
|
|
7
|
-
|
|
8
|
-
`,console.error(`%cUnknown option detected: "`+t+`"`+o,dV),lV=!0}static findInOptions(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0&&arguments[3],a=1e9,o=``,s=[],c=t.toLowerCase(),l;for(let d in n){let f;if(n[d].__type__!==void 0&&i===!0){let i=e.findInOptions(t,n[d],zB(r,d));a>i.distance&&(o=i.closestMatch,s=i.path,a=i.distance,l=i.indexMatch)}else{var u;H(u=d.toLowerCase()).call(u,c)!==-1&&(l=d),f=e.levenshteinDistance(t,d),a>f&&(o=d,s=BB(r),a=f)}}return{closestMatch:o,path:s,distance:a,indexMatch:l}}static printLocation(e,t){let n=`
|
|
9
|
-
|
|
10
|
-
`+(arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at:
|
|
11
|
-
`)+`options = {
|
|
12
|
-
`;for(let t=0;t<e.length;t++){for(let e=0;e<t+1;e++)n+=` `;n+=e[t]+`: {
|
|
13
|
-
`}for(let t=0;t<e.length+1;t++)n+=` `;n+=t+`
|
|
14
|
-
`;for(let t=0;t<e.length+1;t++){for(let r=0;r<e.length-t;r++)n+=` `;n+=`}
|
|
15
|
-
`}return n+`
|
|
16
|
-
|
|
17
|
-
`}static print(e){return sL(e).replace(/(")|(\[)|(\])|(,"__type__")/g,``).replace(/(,)/g,`, `)}static levenshteinDistance(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;let n=[],r;for(r=0;r<=t.length;r++)n[r]=[r];let i;for(i=0;i<=e.length;i++)n[0][i]=i;for(r=1;r<=t.length;r++)for(i=1;i<=e.length;i++)t.charAt(r-1)==e.charAt(i-1)?n[r][i]=n[r-1][i-1]:n[r][i]=Math.min(n[r-1][i-1]+1,Math.min(n[r][i-1]+1,n[r-1][i]+1));return n[t.length][e.length]}},pV=EB,mV=sV,hV=TB,gV=cV,_V=dV,vV=fV;function yV(e){return wV=e,IV()}var bV={fontsize:`font.size`,fontcolor:`font.color`,labelfontcolor:`font.color`,fontname:`font.face`,color:[`color.border`,`color.background`],fillcolor:`color.background`,tooltip:`title`,labeltooltip:`title`},xV=zI(bV);xV.color=`color.color`,xV.style=`dashes`;var SV={NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3},CV={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},wV=``,TV=0,G=``,K=``,EV=SV.NULL;function DV(){TV=0,G=wV.charAt(0)}function OV(){TV++,G=wV.charAt(TV)}function kV(){return wV.charAt(TV+1)}function AV(e){var t=e.charCodeAt(0);return t<47?t===35||t===46:t<59?t>47:t<91?t>64:t<96?t===95:t<123&&t>96}function jV(e,t){if(e||={},t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function MV(e,t,n){for(var r=t.split(`.`),i=e;r.length;){var a=r.shift();r.length?(i[a]||(i[a]={}),i=i[a]):i[a]=n}}function NV(e,t){for(var n,r,i=null,a=[e],o=e;o.parent;)a.push(o.parent),o=o.parent;if(o.nodes){for(n=0,r=o.nodes.length;n<r;n++)if(t.id===o.nodes[n].id){i=o.nodes[n];break}}for(i||(i={id:t.id},e.node&&(i.attr=jV(i.attr,e.node))),n=a.length-1;n>=0;n--){var s,c=a[n];c.nodes||=[],H(s=c.nodes).call(s,i)===-1&&c.nodes.push(i)}t.attr&&(i.attr=jV(i.attr,t.attr))}function PV(e,t){e.edges||=[],e.edges.push(t),e.edge&&(t.attr=jV(jV({},e.edge),t.attr))}function FV(e,t,n,r,i){var a={from:t,to:n,type:r};return e.edge&&(a.attr=jV({},e.edge)),a.attr=jV(a.attr||{},i),i!=null&&i.hasOwnProperty(`arrows`)&&i.arrows!=null&&(a.arrows={to:{enabled:!0,type:i.arrows.type}},i.arrows=null),a}function q(){for(EV=SV.NULL,K=``;G===` `||G===` `||G===`
|
|
18
|
-
`||G===`\r`;)OV();do{var e=!1;if(G===`#`){for(var t=TV-1;wV.charAt(t)===` `||wV.charAt(t)===` `;)t--;if(wV.charAt(t)===`
|
|
19
|
-
`||wV.charAt(t)===``){for(;G!=``&&G!=`
|
|
20
|
-
`;)OV();e=!0}}if(G===`/`&&kV()===`/`){for(;G!=``&&G!=`
|
|
21
|
-
`;)OV();e=!0}if(G===`/`&&kV()===`*`){for(;G!=``;)if(G===`*`&&kV()===`/`){OV(),OV();break}else OV();e=!0}for(;G===` `||G===` `||G===`
|
|
22
|
-
`||G===`\r`;)OV()}while(e);if(G===``){EV=SV.DELIMITER;return}var n=G+kV();if(CV[n]){EV=SV.DELIMITER,K=n,OV(),OV();return}if(CV[G]){EV=SV.DELIMITER,K=G,OV();return}if(AV(G)||G===`-`){for(K+=G,OV();AV(G);)K+=G,OV();K===`false`?K=!1:K===`true`?K=!0:isNaN(Number(K))||(K=Number(K)),EV=SV.IDENTIFIER;return}if(G===`"`){for(OV();G!=``&&(G!=`"`||G===`"`&&kV()===`"`);)G===`"`?(K+=G,OV()):G===`\\`&&kV()===`n`?(K+=`
|
|
23
|
-
`,OV()):K+=G,OV();if(G!=`"`)throw WV(`End of string " expected`);OV(),EV=SV.IDENTIFIER;return}for(EV=SV.UNKNOWN;G!=``;)K+=G,OV();throw SyntaxError(`Syntax error in part "`+GV(K,30)+`"`)}function IV(){var e={};if(DV(),q(),K===`strict`&&(e.strict=!0,q()),(K===`graph`||K===`digraph`)&&(e.type=K,q()),EV===SV.IDENTIFIER&&(e.id=K,q()),K!=`{`)throw WV(`Angle bracket { expected`);if(q(),LV(e),K!=`}`)throw WV(`Angle bracket } expected`);if(q(),K!==``)throw WV(`End of file expected`);return q(),delete e.node,delete e.edge,delete e.graph,e}function LV(e){for(;K!==``&&K!=`}`;)RV(e),K===`;`&&q()}function RV(e){var t=zV(e);if(t){HV(e,t);return}if(!BV(e)){if(EV!=SV.IDENTIFIER)throw WV(`Identifier expected`);var n=K;if(q(),K===`=`){if(q(),EV!=SV.IDENTIFIER)throw WV(`Identifier expected`);e[n]=K,q()}else VV(e,n)}}function zV(e){var t=null;if(K===`subgraph`&&(t={},t.type=`subgraph`,q(),EV===SV.IDENTIFIER&&(t.id=K,q())),K===`{`){if(q(),t||={},t.parent=e,t.node=e.node,t.edge=e.edge,t.graph=e.graph,LV(t),K!=`}`)throw WV(`Angle bracket } expected`);q(),delete t.node,delete t.edge,delete t.graph,delete t.parent,e.subgraphs||=[],e.subgraphs.push(t)}return t}function BV(e){return K===`node`?(q(),e.node=UV(),`node`):K===`edge`?(q(),e.edge=UV(),`edge`):K===`graph`?(q(),e.graph=UV(),`graph`):null}function VV(e,t){var n={id:t},r=UV();r&&(n.attr=r),NV(e,n),HV(e,t)}function HV(e,t){for(;K===`->`||K===`--`;){var n,r=K;q();var i=zV(e);if(i)n=i;else{if(EV!=SV.IDENTIFIER)throw WV(`Identifier or subgraph expected`);n=K,NV(e,{id:n}),q()}var a=UV();PV(e,FV(e,t,n,r,a)),t=n}}function UV(){for(var e,t=null,n={dashed:!0,solid:!1,dotted:[1,5]},r={dot:`circle`,box:`box`,crow:`crow`,curve:`curve`,icurve:`inv_curve`,normal:`triangle`,inv:`inv_triangle`,diamond:`diamond`,tee:`bar`,vee:`vee`},i=[],a=[];K===`[`;){for(q(),t={};K!==``&&K!=`]`;){if(EV!=SV.IDENTIFIER)throw WV(`Attribute name expected`);var o=K;if(q(),K!=`=`)throw WV(`Equal sign = expected`);if(q(),EV!=SV.IDENTIFIER)throw WV(`Attribute value expected`);var s=K;o===`style`&&(s=n[s]);var c;o===`arrowhead`&&(c=r[s],o=`arrows`,s={to:{enabled:!0,type:c}}),o===`arrowtail`&&(c=r[s],o=`arrows`,s={from:{enabled:!0,type:c}}),i.push({attr:t,name:o,value:s}),a.push(o),q(),K==`,`&&q()}if(K!=`]`)throw WV(`Bracket ] expected`);q()}if(zP(a).call(a,`dir`)){var l={};for(l.arrows={},e=0;e<i.length;e++)if(i[e].name===`arrows`)if(i[e].value.to!=null)l.arrows.to=e;else if(i[e].value.from!=null)l.arrows.from=e;else throw WV(`Invalid value of arrows`);else i[e].name===`dir`&&(l.dir=e);var u=i[l.dir].value;if(!zP(a).call(a,`arrows`))if(u===`both`)i.push({attr:i[l.dir].attr,name:`arrows`,value:{to:{enabled:!0}}}),l.arrows.to=i.length-1,i.push({attr:i[l.dir].attr,name:`arrows`,value:{from:{enabled:!0}}}),l.arrows.from=i.length-1;else if(u===`forward`)i.push({attr:i[l.dir].attr,name:`arrows`,value:{to:{enabled:!0}}}),l.arrows.to=i.length-1;else if(u===`back`)i.push({attr:i[l.dir].attr,name:`arrows`,value:{from:{enabled:!0}}}),l.arrows.from=i.length-1;else if(u===`none`)i.push({attr:i[l.dir].attr,name:`arrows`,value:``}),l.arrows.to=i.length-1;else throw WV(`Invalid dir type "`+u+`"`);var d,f;if(u===`both`)l.arrows.to&&l.arrows.from?(f=i[l.arrows.to].value.to.type,d=i[l.arrows.from].value.from.type,i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:d}}},cP(i).call(i,l.arrows.from,1)):l.arrows.to?(f=i[l.arrows.to].value.to.type,d=`arrow`,i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:d}}}):l.arrows.from&&(f=`arrow`,d=i[l.arrows.from].value.from.type,i[l.arrows.from]={attr:i[l.arrows.from].attr,name:i[l.arrows.from].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:d}}});else if(u===`back`)l.arrows.to&&l.arrows.from?(f=``,d=i[l.arrows.from].value.from.type,i[l.arrows.from]={attr:i[l.arrows.from].attr,name:i[l.arrows.from].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:d}}}):l.arrows.to?(f=``,d=`arrow`,l.arrows.from=l.arrows.to,i[l.arrows.from]={attr:i[l.arrows.from].attr,name:i[l.arrows.from].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:d}}}):l.arrows.from&&(f=``,d=i[l.arrows.from].value.from.type,i[l.arrows.to]={attr:i[l.arrows.from].attr,name:i[l.arrows.from].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:d}}}),i[l.arrows.from]={attr:i[l.arrows.from].attr,name:i[l.arrows.from].name,value:{from:{enabled:!0,type:i[l.arrows.from].value.from.type}}};else if(u===`none`){var p=l.arrows.to?l.arrows.to:l.arrows.from;i[p]={attr:i[p].attr,name:i[p].name,value:``}}else if(u===`forward`)l.arrows.to&&l.arrows.from||l.arrows.to?(f=i[l.arrows.to].value.to.type,d=``,i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:d}}}):l.arrows.from&&(f=`arrow`,d=``,l.arrows.to=l.arrows.from,i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:d}}}),i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:i[l.arrows.to].value.to.type}}};else throw WV(`Invalid dir type "`+u+`"`);cP(i).call(i,l.dir,1)}var m;if(zP(a).call(a,`penwidth`)){var h=[];for(m=i.length,e=0;e<m;e++)i[e].name!==`width`&&(i[e].name===`penwidth`&&(i[e].name=`width`),h.push(i[e]));i=h}for(m=i.length,e=0;e<m;e++)MV(i[e].attr,i[e].name,i[e].value);return t}function WV(e){return SyntaxError(e+`, got "`+GV(K,30)+`" (char `+TV+`)`)}function GV(e,t){return e.length<=t?e:e.substr(0,27)+`...`}function KV(e,t,n){hM(e)?V(e).call(e,function(e){hM(t)?V(t).call(t,function(t){n(e,t)}):n(e,t)}):hM(t)?V(t).call(t,function(t){n(e,t)}):n(e,t)}function qV(e,t,n){for(var r=t.split(`.`),i=r.pop(),a=e,o=0;o<r.length;o++){var s=r[o];s in a||(a[s]={}),a=a[s]}return a[i]=n,e}function JV(e,t){var n={};for(var r in e)if(e.hasOwnProperty(r)){var i=t[r];hM(i)?V(i).call(i,function(t){qV(n,t,e[r])}):typeof i==`string`?qV(n,i,e[r]):qV(n,r,e[r])}return n}function YV(e){var t=yV(e),n={nodes:[],edges:[],options:{}};if(t.nodes){var r;V(r=t.nodes).call(r,function(e){var t={id:e.id,label:String(e.label||e.id)};jV(t,JV(e.attr,bV)),t.image&&(t.shape=`image`),n.nodes.push(t)})}if(t.edges){var i,a=function(e){var t={from:e.from,to:e.to};return jV(t,JV(e.attr,xV)),t.arrows==null&&e.type===`->`&&(t.arrows=`to`),t};V(i=t.edges).call(i,function(e){var t=e.from instanceof Object?e.from.nodes:{id:e.from},r=e.to instanceof Object?e.to.nodes:{id:e.to};if(e.from instanceof Object&&e.from.edges){var i;V(i=e.from.edges).call(i,function(e){var t=a(e);n.edges.push(t)})}if(KV(t,r,function(t,r){var i=a(FV(n,t.id,r.id,e.type,e.attr));n.edges.push(i)}),e.to instanceof Object&&e.to.edges){var o;V(o=e.to.edges).call(o,function(e){var t=a(e);n.edges.push(t)})}})}return t.attr&&(n.options=t.attr),n}function XV(e){var t;let{fixed:n=!1,inheritColor:r=!1,parseColor:i=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=e.edges,o=jM(a).call(a,e=>{let t={from:e.source,id:e.id,to:e.target};return e.attributes!=null&&(t.attributes=e.attributes),e.label!=null&&(t.label=e.label),e.attributes!=null&&e.attributes.title!=null&&(t.title=e.attributes.title),e.type===`Directed`&&(t.arrows=`to`),e.color&&r===!1&&(t.color=e.color),t});return{nodes:jM(t=e.nodes).call(t,e=>{let t={id:e.id,fixed:n&&e.x!=null&&e.y!=null};return e.attributes!=null&&(t.attributes=e.attributes),e.label!=null&&(t.label=e.label),e.size!=null&&(t.size=e.size),e.attributes!=null&&e.attributes.title!=null&&(t.title=e.attributes.title),e.title!=null&&(t.title=e.title),e.x!=null&&(t.x=e.x),e.y!=null&&(t.y=e.y),e.color!=null&&(i===!0?t.color=e.color:t.color={background:e.color,border:e.color,highlight:{background:e.color,border:e.color},hover:{background:e.color,border:e.color}}),t}),edges:o}}var ZV=Object.freeze({__proto__:null,cn:{addDescription:`单击空白处放置新节点。`,addEdge:`添加连接线`,addNode:`添加节点`,back:`返回`,close:`關閉`,createEdgeError:`无法将连接线连接到群集。`,del:`删除选定`,deleteClusterError:`无法删除群集。`,edgeDescription:`单击某个节点并将该连接线拖动到另一个节点以连接它们。`,edit:`编辑`,editClusterError:`无法编辑群集。`,editEdge:`编辑连接线`,editEdgeDescription:`单击控制节点并将它们拖到节点上连接。`,editNode:`编辑节点`},cs:{addDescription:`Kluknutím do prázdného prostoru můžete přidat nový vrchol.`,addEdge:`Přidat hranu`,addNode:`Přidat vrchol`,back:`Zpět`,close:`Zavřít`,createEdgeError:`Nelze připojit hranu ke shluku.`,del:`Smazat výběr`,deleteClusterError:`Nelze mazat shluky.`,edgeDescription:`Přetažením z jednoho vrcholu do druhého můžete spojit tyto vrcholy novou hranou.`,edit:`Upravit`,editClusterError:`Nelze upravovat shluky.`,editEdge:`Upravit hranu`,editEdgeDescription:`Přetažením kontrolního vrcholu hrany ji můžete připojit k jinému vrcholu.`,editNode:`Upravit vrchol`},de:{addDescription:`Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.`,addEdge:`Kante hinzufügen`,addNode:`Knoten hinzufügen`,back:`Zurück`,close:`Schließen`,createEdgeError:`Es ist nicht möglich, Kanten mit Clustern zu verbinden.`,del:`Lösche Auswahl`,deleteClusterError:`Cluster können nicht gelöscht werden.`,edgeDescription:`Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.`,edit:`Editieren`,editClusterError:`Cluster können nicht editiert werden.`,editEdge:`Kante editieren`,editEdgeDescription:`Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.`,editNode:`Knoten editieren`},en:{addDescription:`Click in an empty space to place a new node.`,addEdge:`Add Edge`,addNode:`Add Node`,back:`Back`,close:`Close`,createEdgeError:`Cannot link edges to a cluster.`,del:`Delete selected`,deleteClusterError:`Clusters cannot be deleted.`,edgeDescription:`Click on a node and drag the edge to another node to connect them.`,edit:`Edit`,editClusterError:`Clusters cannot be edited.`,editEdge:`Edit Edge`,editEdgeDescription:`Click on the control points and drag them to a node to connect to it.`,editNode:`Edit Node`},es:{addDescription:`Haga clic en un lugar vacío para colocar un nuevo nodo.`,addEdge:`Añadir arista`,addNode:`Añadir nodo`,back:`Atrás`,close:`Cerrar`,createEdgeError:`No se puede conectar una arista a un grupo.`,del:`Eliminar selección`,deleteClusterError:`No es posible eliminar grupos.`,edgeDescription:`Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.`,edit:`Editar`,editClusterError:`No es posible editar grupos.`,editEdge:`Editar arista`,editEdgeDescription:`Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.`,editNode:`Editar nodo`},fr:{addDescription:`Cliquez dans un endroit vide pour placer un nœud.`,addEdge:`Ajouter un lien`,addNode:`Ajouter un nœud`,back:`Retour`,close:`Fermer`,createEdgeError:`Impossible de créer un lien vers un cluster.`,del:`Effacer la sélection`,deleteClusterError:`Les clusters ne peuvent pas être effacés.`,edgeDescription:`Cliquez sur un nœud et glissez le lien vers un autre nœud pour les connecter.`,edit:`Éditer`,editClusterError:`Les clusters ne peuvent pas être édités.`,editEdge:`Éditer le lien`,editEdgeDescription:`Cliquez sur les points de contrôle et glissez-les pour connecter un nœud.`,editNode:`Éditer le nœud`},it:{addDescription:`Clicca per aggiungere un nuovo nodo`,addEdge:`Aggiungi un vertice`,addNode:`Aggiungi un nodo`,back:`Indietro`,close:`Chiudere`,createEdgeError:`Non si possono collegare vertici ad un cluster`,del:`Cancella la selezione`,deleteClusterError:`I cluster non possono essere cancellati`,edgeDescription:`Clicca su un nodo e trascinalo ad un altro nodo per connetterli.`,edit:`Modifica`,editClusterError:`I clusters non possono essere modificati.`,editEdge:`Modifica il vertice`,editEdgeDescription:`Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.`,editNode:`Modifica il nodo`},nl:{addDescription:`Klik op een leeg gebied om een nieuwe node te maken.`,addEdge:`Link toevoegen`,addNode:`Node toevoegen`,back:`Terug`,close:`Sluiten`,createEdgeError:`Kan geen link maken naar een cluster.`,del:`Selectie verwijderen`,deleteClusterError:`Clusters kunnen niet worden verwijderd.`,edgeDescription:`Klik op een node en sleep de link naar een andere node om ze te verbinden.`,edit:`Wijzigen`,editClusterError:`Clusters kunnen niet worden aangepast.`,editEdge:`Link wijzigen`,editEdgeDescription:`Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.`,editNode:`Node wijzigen`},pt:{addDescription:`Clique em um espaço em branco para adicionar um novo nó`,addEdge:`Adicionar aresta`,addNode:`Adicionar nó`,back:`Voltar`,close:`Fechar`,createEdgeError:`Não foi possível linkar arestas a um cluster.`,del:`Remover selecionado`,deleteClusterError:`Clusters não puderam ser removidos.`,edgeDescription:`Clique em um nó e arraste a aresta até outro nó para conectá-los`,edit:`Editar`,editClusterError:`Clusters não puderam ser editados.`,editEdge:`Editar aresta`,editEdgeDescription:`Clique nos pontos de controle e os arraste para um nó para conectá-los`,editNode:`Editar nó`},ru:{addDescription:`Кликните в свободное место, чтобы добавить новый узел.`,addEdge:`Добавить ребро`,addNode:`Добавить узел`,back:`Назад`,close:`Закрывать`,createEdgeError:`Невозможно соединить ребра в кластер.`,del:`Удалить выбранное`,deleteClusterError:`Кластеры не могут быть удалены`,edgeDescription:`Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.`,edit:`Редактировать`,editClusterError:`Кластеры недоступны для редактирования.`,editEdge:`Редактировать ребро`,editEdgeDescription:`Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.`,editNode:`Редактировать узел`},uk:{addDescription:`Kлікніть на вільне місце, щоб додати новий вузол.`,addEdge:`Додати край`,addNode:`Додати вузол`,back:`Назад`,close:`Закрити`,createEdgeError:`Не можливо об'єднати краї в групу.`,del:`Видалити обране`,deleteClusterError:`Групи не можуть бути видалені.`,edgeDescription:`Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.`,edit:`Редагувати`,editClusterError:`Групи недоступні для редагування.`,editEdge:`Редагувати край`,editEdgeDescription:`Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.`,editNode:`Редагувати вузол`}});function QV(e,t){try{let[r,i]=t.split(/[-_ /]/,2),a=r==null?null:r.toLowerCase(),o=i==null?null:i.toUpperCase();if(a&&o){let t=a+`-`+o;if(Object.prototype.hasOwnProperty.call(e,t))return t;var n;console.warn(dF(n=`Unknown variant ${o} of language `).call(n,a,`.`))}if(a){let t=a;if(Object.prototype.hasOwnProperty.call(e,t))return t;console.warn(`Unknown language ${a}`)}return console.warn(`Unknown locale ${t}, falling back to English.`),`en`}catch(e){return console.error(e),console.warn(`Unexpected error while normalizing locale ${t}, falling back to English.`),`en`}}var $V=class{constructor(){this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement(`canvas`)}init(){if(this.initialized())return;this.src=this.image.src;let e=this.image.width,t=this.image.height;this.width=e,this.height=t;let n=Math.floor(t/2),r=Math.floor(t/4),i=Math.floor(t/8),a=Math.floor(t/16),o=Math.floor(e/2),s=Math.floor(e/4),c=Math.floor(e/8),l=Math.floor(e/16);this.canvas.width=3*s,this.canvas.height=n,this.coordinates=[[0,0,o,n],[o,0,s,r],[o,r,c,i],[5*c,r,l,a]],this._fillMipMap()}initialized(){return this.coordinates!==void 0}_fillMipMap(){let e=this.canvas.getContext(`2d`),t=this.coordinates[0];e.drawImage(this.image,t[0],t[1],t[2],t[3]);for(let t=1;t<this.NUM_ITERATIONS;t++){let n=this.coordinates[t-1],r=this.coordinates[t];e.drawImage(this.canvas,n[0],n[1],n[2],n[3],r[0],r[1],r[2],r[3])}}drawImageAtPosition(e,t,n,r,i,a){if(this.initialized())if(t>2){t*=.5;let o=0;for(;t>2&&o<this.NUM_ITERATIONS;)t*=.5,o+=1;o>=this.NUM_ITERATIONS&&(o=this.NUM_ITERATIONS-1);let s=this.coordinates[o];e.drawImage(this.canvas,s[0],s[1],s[2],s[3],n,r,i,a)}else e.drawImage(this.image,n,r,i,a)}},eH=class{constructor(e){this.images={},this.imageBroken={},this.callback=e}_tryloadBrokenUrl(e,t,n){if(e!==void 0&&n!==void 0){if(t===void 0){console.warn(`No broken url image defined`);return}n.image.onerror=()=>{console.error(`Could not load brokenImage:`,t)},n.image.src=t}}_redrawWithImage(e){this.callback&&this.callback(e)}load(e,t){let n=this.images[e];if(n)return n;let r=new $V;return this.images[e]=r,r.image.onload=()=>{this._fixImageCoordinates(r.image),r.init(),this._redrawWithImage(r)},r.image.onerror=()=>{console.error(`Could not load image:`,e),this._tryloadBrokenUrl(e,t,r)},r.image.src=e,r}_fixImageCoordinates(e){e.width===0&&(document.body.appendChild(e),e.width=e.offsetWidth,e.height=e.offsetHeight,document.body.removeChild(e))}},tH={},nH={},rH={exports:{}},iH,aH;function oH(){return aH?iH:(aH=1,iH=I()(function(){if(typeof ArrayBuffer==`function`){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),iH)}var sH,cH;function lH(){if(cH)return sH;cH=1;var e=I(),t=yw(),n=zC(),r=oH(),i=Object.isExtensible;return sH=e(function(){})||r?function(e){return!t(e)||r&&n(e)===`ArrayBuffer`?!1:!i||i(e)}:i,sH}var uH,dH;function fH(){return dH?uH:(dH=1,uH=!I()(function(){return Object.isExtensible(Object.preventExtensions({}))}),uH)}var pH;function mH(){if(pH)return rH.exports;pH=1;var e=z(),t=L(),n=TE(),r=yw(),i=vT(),a=$T().f,o=RO(),s=VO(),c=lH(),l=xT(),u=fH(),d=!1,f=l(`meta`),p=0,m=function(e){a(e,f,{value:{objectID:`O`+p++,weakData:{}}})},h=rH.exports={enable:function(){h.enable=function(){},d=!0;var n=o.f,r=t([].splice),i={};i[f]=1,n(i).length&&(o.f=function(e){for(var t=n(e),i=0,a=t.length;i<a;i++)if(t[i]===f){r(t,i,1);break}return t},e({target:`Object`,stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},fastKey:function(e,t){if(!r(e))return typeof e==`symbol`?e:(typeof e==`string`?`S`:`P`)+e;if(!i(e,f)){if(!c(e))return`F`;if(!t)return`E`;m(e)}return e[f].objectID},getWeakData:function(e,t){if(!i(e,f)){if(!c(e))return!0;if(!t)return!1;m(e)}return e[f].weakData},onFreeze:function(e){return u&&d&&c(e)&&!i(e,f)&&m(e),e}};return n[f]=!0,rH.exports}var hH,gH;function _H(){if(gH)return hH;gH=1;var e=wT(),t=UA(),n=e(`iterator`),r=Array.prototype;return hH=function(e){return e!==void 0&&(t.Array===e||r[n]===e)},hH}var vH,yH;function bH(){if(yH)return vH;yH=1;var e=tO(),t=Zw(),n=uw(),r=UA(),i=wT()(`iterator`);return vH=function(a){if(!n(a))return t(a,i)||t(a,`@@iterator`)||r[e(a)]},vH}var xH,SH;function CH(){if(SH)return xH;SH=1;var e=QC(),t=Jw(),n=ZT(),r=Gw(),i=bH(),a=TypeError;return xH=function(o,s){var c=arguments.length<2?i(o):s;if(t(c))return n(e(c,o));throw new a(r(o)+` is not iterable`)},xH}var wH,TH;function EH(){if(TH)return wH;TH=1;var e=QC(),t=ZT(),n=Zw();return wH=function(r,i,a){var o,s;t(r);try{if(o=n(r,`return`),!o){if(i===`throw`)throw a;return a}o=e(o,r)}catch(e){s=!0,o=e}if(i===`throw`)throw a;if(s)throw o;return t(o),a},wH}var DH,OH;function kH(){if(OH)return DH;OH=1;var e=WT(),t=QC(),n=ZT(),r=Gw(),i=_H(),a=yE(),o=Dw(),s=CH(),c=bH(),l=EH(),u=TypeError,d=function(e,t){this.stopped=e,this.result=t},f=d.prototype;return DH=function(p,m,h){var g=h&&h.that,_=!!(h&&h.AS_ENTRIES),v=!!(h&&h.IS_RECORD),y=!!(h&&h.IS_ITERATOR),b=!!(h&&h.INTERRUPTED),x=e(m,g),S,C,w,T,E,D,ee,te=function(e){return S&&l(S,`normal`),new d(!0,e)},O=function(e){return _?(n(e),b?x(e[0],e[1],te):x(e[0],e[1])):b?x(e,te):x(e)};if(v)S=p.iterator;else if(y)S=p;else{if(C=c(p),!C)throw new u(r(p)+` is not iterable`);if(i(C)){for(w=0,T=a(p);T>w;w++)if(E=O(p[w]),E&&o(f,E))return E;return new d(!1)}S=s(p,C)}for(D=v?p.next:S.next;!(ee=t(D,S)).done;){try{E=O(ee.value)}catch(e){l(S,`throw`,e)}if(typeof E==`object`&&E&&o(f,E))return E}return new d(!1)},DH}var AH,jH;function MH(){if(jH)return AH;jH=1;var e=Dw(),t=TypeError;return AH=function(n,r){if(e(r,n))return n;throw new t(`Incorrect invocation`)},AH}var NH,PH;function FH(){if(PH)return NH;PH=1;var e=z(),t=EC(),n=mH(),r=I(),i=nE(),a=kH(),o=MH(),s=GC(),c=yw(),l=uw(),u=ck(),d=$T().f,f=_k().forEach,p=YC(),m=mk(),h=m.set,g=m.getterFor;return NH=function(m,_,v){var y=m.indexOf(`Map`)!==-1,b=m.indexOf(`Weak`)!==-1,x=y?`set`:`add`,S=t[m],C=S&&S.prototype,w={},T;if(!p||!s(S)||!(b||C.forEach&&!r(function(){new S().entries().next()})))T=v.getConstructor(_,m,y,x),n.enable();else{T=_(function(e,t){h(o(e,E),{type:m,collection:new S}),l(t)||a(t,e[x],{that:e,AS_ENTRIES:y})});var E=T.prototype,D=g(m);f([`add`,`clear`,`delete`,`forEach`,`get`,`has`,`set`,`keys`,`values`,`entries`],function(e){var t=e===`add`||e===`set`;e in C&&!(b&&e===`clear`)&&i(E,e,function(n,r){var i=D(this).collection;if(!t&&b&&!c(n))return e===`get`&&void 0;var a=i[e](n===0?0:n,r);return t?this:a})}),b||d(E,`size`,{configurable:!0,get:function(){return D(this).collection.size}})}return u(T,m,!1,!0),w[m]=T,e({global:!0,forced:!0},w),b||v.setStrong(T,m,y),T},NH}var IH,LH;function RH(){if(LH)return IH;LH=1;var e=WO();return IH=function(t,n,r){for(var i in n)r&&r.unsafe&&t[i]?t[i]=n[i]:e(t,i,n[i],r);return t},IH}var zH,BH;function VH(){if(BH)return zH;BH=1;var e=ww(),t=qO(),n=wT(),r=YC(),i=n(`species`);return zH=function(n){var a=e(n);r&&a&&!a[i]&&t(a,i,{configurable:!0,get:function(){return this}})},zH}var HH,UH;function WH(){if(UH)return HH;UH=1;var e=FO(),t=qO(),n=RH(),r=WT(),i=MH(),a=uw(),o=kH(),s=yj(),c=Sj(),l=VH(),u=YC(),d=mH().fastKey,f=mk(),p=f.set,m=f.getterFor;return HH={getConstructor:function(s,c,l,f){var h=s(function(t,n){i(t,g),p(t,{type:c,index:e(null),first:null,last:null,size:0}),u||(t.size=0),a(n)||o(n,t[f],{that:t,AS_ENTRIES:l})}),g=h.prototype,_=m(c),v=function(e,t,n){var r=_(e),i=y(e,t),a,o;return i?i.value=n:(r.last=i={index:o=d(t,!0),key:t,value:n,previous:a=r.last,next:null,removed:!1},r.first||=i,a&&(a.next=i),u?r.size++:e.size++,o!==`F`&&(r.index[o]=i)),e},y=function(e,t){var n=_(e),r=d(t),i;if(r!==`F`)return n.index[r];for(i=n.first;i;i=i.next)if(i.key===t)return i};return n(g,{clear:function(){for(var t=this,n=_(t),r=n.first;r;)r.removed=!0,r.previous&&=r.previous.next=null,r=r.next;n.first=n.last=null,n.index=e(null),u?n.size=0:t.size=0},delete:function(e){var t=this,n=_(t),r=y(t,e);if(r){var i=r.next,a=r.previous;delete n.index[r.index],r.removed=!0,a&&(a.next=i),i&&(i.previous=a),n.first===r&&(n.first=i),n.last===r&&(n.last=a),u?n.size--:t.size--}return!!r},forEach:function(e){for(var t=_(this),n=r(e,arguments.length>1?arguments[1]:void 0),i;i=i?i.next:t.first;)for(n(i.value,i.key,this);i&&i.removed;)i=i.previous},has:function(e){return!!y(this,e)}}),n(g,l?{get:function(e){var t=y(this,e);return t&&t.value},set:function(e,t){return v(this,e===0?0:e,t)}}:{add:function(e){return v(this,e=e===0?0:e,e)}}),u&&t(g,`size`,{configurable:!0,get:function(){return _(this).size}}),h},setStrong:function(e,t,n){var r=t+` Iterator`,i=m(t),a=m(r);s(e,t,function(e,t){p(this,{type:r,target:e,state:i(e),kind:t,last:null})},function(){for(var e=a(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return!e.target||!(e.last=n=n?n.next:e.state.first)?(e.target=null,c(void 0,!0)):c(t===`keys`?n.key:t===`values`?n.value:[n.key,n.value],!1)},n?`entries`:`values`,!n,!0),l(t)}},HH}var GH;function KH(){return GH?nH:(GH=1,FH()(`Map`,function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},WH()),nH)}var qH;function JH(){return qH?tH:(qH=1,KH(),tH)}var YH={},XH,ZH;function QH(){return ZH?XH:(ZH=1,XH=function(e,t){return t===1?function(t,n){return t[e](n)}:function(t,n,r){return t[e](n,r)}},XH)}var $H,eU;function tU(){if(eU)return $H;eU=1;var e=ww(),t=QH(),n=e(`Map`);return $H={Map:n,set:t(`set`,2),get:t(`get`,1),has:t(`has`,1),remove:t(`delete`,1),proto:n.prototype},$H}var nU;function rU(){if(nU)return YH;nU=1;var e=z(),t=L(),n=Jw(),r=pw(),i=kH(),a=tU(),o=iT(),s=I(),c=a.Map,l=a.has,u=a.get,d=a.set,f=t([].push),p=o||s(function(){return c.groupBy(`ab`,function(e){return e}).get(`a`).length!==1});return e({target:`Map`,stat:!0,forced:o||p},{groupBy:function(e,t){r(e),n(t);var a=new c,o=0;return i(e,function(e){var n=t(e,o++);l(a,n)?f(u(a,n),e):d(a,n,[e])}),a}}),YH}var iU={},aU,oU;function sU(){if(oU)return aU;oU=1;var e=L(),t=uE(),n=CO(),r=pw(),i=e(``.charAt),a=e(``.charCodeAt),o=e(``.slice),s=function(e){return function(s,c){var l=n(r(s)),u=t(c),d=l.length,f,p;return u<0||u>=d?e?``:void 0:(f=a(l,u),f<55296||f>56319||u+1===d||(p=a(l,u+1))<56320||p>57343?e?i(l,u):f:e?o(l,u,u+2):(f-55296<<10)+(p-56320)+65536)}};return aU={codeAt:s(!1),charAt:s(!0)},aU}var cU;function lU(){if(cU)return iU;cU=1;var e=sU().charAt,t=CO(),n=mk(),r=yj(),i=Sj(),a=`String Iterator`,o=n.set,s=n.getterFor(a);return r(String,`String`,function(e){o(this,{type:a,string:t(e),index:0})},function(){var t=s(this),n=t.string,r=t.index,a;return r>=n.length?i(void 0,!0):(a=e(n,r),t.index+=a.length,i(a,!1))}),iU}var uU,dU;function fU(){return dU?uU:(dU=1,Tj(),JH(),rU(),lU(),uU=R().Map,uU)}var pU,mU;function hU(){if(mU)return pU;mU=1;var e=fU();return Aj(),pU=e,pU}var gU,_U;function vU(){return _U?gU:(_U=1,gU=hU(),gU)}var yU=F(vU()),bU=class{constructor(){this.clear(),this._defaultIndex=0,this._groupIndex=0,this._defaultGroups=[{border:`#2B7CE9`,background:`#97C2FC`,highlight:{border:`#2B7CE9`,background:`#D2E5FF`},hover:{border:`#2B7CE9`,background:`#D2E5FF`}},{border:`#FFA500`,background:`#FFFF00`,highlight:{border:`#FFA500`,background:`#FFFFA3`},hover:{border:`#FFA500`,background:`#FFFFA3`}},{border:`#FA0A10`,background:`#FB7E81`,highlight:{border:`#FA0A10`,background:`#FFAFB1`},hover:{border:`#FA0A10`,background:`#FFAFB1`}},{border:`#41A906`,background:`#7BE141`,highlight:{border:`#41A906`,background:`#A1EC76`},hover:{border:`#41A906`,background:`#A1EC76`}},{border:`#E129F0`,background:`#EB7DF4`,highlight:{border:`#E129F0`,background:`#F0B3F5`},hover:{border:`#E129F0`,background:`#F0B3F5`}},{border:`#7C29F0`,background:`#AD85E4`,highlight:{border:`#7C29F0`,background:`#D3BDF0`},hover:{border:`#7C29F0`,background:`#D3BDF0`}},{border:`#C37F00`,background:`#FFA807`,highlight:{border:`#C37F00`,background:`#FFCA66`},hover:{border:`#C37F00`,background:`#FFCA66`}},{border:`#4220FB`,background:`#6E6EFD`,highlight:{border:`#4220FB`,background:`#9B9BFD`},hover:{border:`#4220FB`,background:`#9B9BFD`}},{border:`#FD5A77`,background:`#FFC0CB`,highlight:{border:`#FD5A77`,background:`#FFD1D9`},hover:{border:`#FD5A77`,background:`#FFD1D9`}},{border:`#4AD63A`,background:`#C2FABC`,highlight:{border:`#4AD63A`,background:`#E6FFE3`},hover:{border:`#4AD63A`,background:`#E6FFE3`}},{border:`#990000`,background:`#EE0000`,highlight:{border:`#BB0000`,background:`#FF3333`},hover:{border:`#BB0000`,background:`#FF3333`}},{border:`#FF6000`,background:`#FF6000`,highlight:{border:`#FF6000`,background:`#FF6000`},hover:{border:`#FF6000`,background:`#FF6000`}},{border:`#97C2FC`,background:`#2B7CE9`,highlight:{border:`#D2E5FF`,background:`#2B7CE9`},hover:{border:`#D2E5FF`,background:`#2B7CE9`}},{border:`#399605`,background:`#255C03`,highlight:{border:`#399605`,background:`#255C03`},hover:{border:`#399605`,background:`#255C03`}},{border:`#B70054`,background:`#FF007E`,highlight:{border:`#B70054`,background:`#FF007E`},hover:{border:`#B70054`,background:`#FF007E`}},{border:`#AD85E4`,background:`#7C29F0`,highlight:{border:`#D3BDF0`,background:`#7C29F0`},hover:{border:`#D3BDF0`,background:`#7C29F0`}},{border:`#4557FA`,background:`#000EA1`,highlight:{border:`#6E6EFD`,background:`#000EA1`},hover:{border:`#6E6EFD`,background:`#000EA1`}},{border:`#FFC0CB`,background:`#FD5A77`,highlight:{border:`#FFD1D9`,background:`#FD5A77`},hover:{border:`#FFD1D9`,background:`#FD5A77`}},{border:`#C2FABC`,background:`#74D66A`,highlight:{border:`#E6FFE3`,background:`#74D66A`},hover:{border:`#E6FFE3`,background:`#74D66A`}},{border:`#EE0000`,background:`#990000`,highlight:{border:`#FF3333`,background:`#BB0000`},hover:{border:`#FF3333`,background:`#BB0000`}}],this.options={},this.defaultOptions={useDefaultGroups:!0},QE(this.options,this.defaultOptions)}setOptions(e){let t=[`useDefaultGroups`];if(e!==void 0){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&H(t).call(t,n)===-1){let t=e[n];this.add(n,t)}}}clear(){this._groups=new yU,this._groupNames=[]}get(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this._groups.get(e);if(n===void 0&&t)if(this.options.useDefaultGroups===!1&&this._groupNames.length>0){let t=this._groupIndex%this._groupNames.length;++this._groupIndex,n={},n.color=this._groups.get(this._groupNames[t]),this._groups.set(e,n)}else{let t=this._defaultIndex%this._defaultGroups.length;this._defaultIndex++,n={},n.color=this._defaultGroups[t],this._groups.set(e,n)}return n}add(e,t){return this._groups.has(e)||this._groupNames.push(e),this._groups.set(e,t),t}},xU={},SU;function CU(){return SU?xU:(SU=1,z()({target:`Number`,stat:!0},{isNaN:function(e){return e!==e}}),xU)}var wU,TU;function EU(){return TU?wU:(TU=1,CU(),wU=R().Number.isNaN,wU)}var DU,OU;function kU(){return OU?DU:(OU=1,DU=EU(),DU)}var AU,jU;function MU(){return jU?AU:(jU=1,AU=kU(),AU)}var NU=F(MU()),PU={},FU,IU;function LU(){if(IU)return FU;IU=1;var e=EC().isFinite;return FU=Number.isFinite||function(t){return typeof t==`number`&&e(t)},FU}var RU;function zU(){return RU?PU:(RU=1,z()({target:`Number`,stat:!0},{isFinite:LU()}),PU)}var BU,VU;function HU(){return VU?BU:(VU=1,zU(),BU=R().Number.isFinite,BU)}var UU,WU;function GU(){return WU?UU:(WU=1,UU=HU(),UU)}var KU,qU;function JU(){return qU?KU:(qU=1,KU=GU(),KU)}var YU=F(JU()),XU={},ZU;function QU(){if(ZU)return XU;ZU=1;var e=z(),t=_k().some;return e({target:`Array`,proto:!0,forced:!sN()(`some`)},{some:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),XU}var $U,eW;function tW(){return eW?$U:(eW=1,QU(),$U=uD()(`Array`,`some`),$U)}var nW,rW;function iW(){if(rW)return nW;rW=1;var e=Dw(),t=tW(),n=Array.prototype;return nW=function(r){var i=r.some;return r===n||e(n,r)&&i===n.some?t:i},nW}var aW,oW;function sW(){return oW?aW:(oW=1,aW=iW(),aW)}var cW,lW;function uW(){return lW?cW:(lW=1,cW=sW(),cW)}var dW=F(uW()),fW={exports:{}},pW={},mW;function hW(){if(mW)return pW;mW=1;var e=z(),t=YC(),n=$T().f;return e({target:`Object`,stat:!0,forced:Object.defineProperty!==n,sham:!t},{defineProperty:n}),pW}var gW;function _W(){if(gW)return fW.exports;gW=1,hW();var e=R().Object,t=fW.exports=function(t,n,r){return e.defineProperty(t,n,r)};return e.defineProperty.sham&&(t.sham=!0),fW.exports}var vW,yW;function bW(){return yW?vW:(yW=1,vW=_W(),vW)}var xW,SW;function CW(){return SW?xW:(SW=1,xW=bW(),xW)}var wW,TW;function EW(){return TW?wW:(TW=1,wW=CW(),wW)}var DW,OW;function kW(){return OW?DW:(OW=1,DW=EW(),DW)}var AW=F(kW()),jW={},MW;function NW(){if(MW)return jW;MW=1;var e=wT(),t=$T().f,n=e(`metadata`),r=Function.prototype;return r[n]===void 0&&t(r,n,{value:null}),jW}var PW={},FW;function IW(){return FW?PW:(FW=1,Hk(),PW)}var LW={},RW;function zW(){return RW?LW:(RW=1,Jk(),LW)}var BW={},VW;function HW(){return VW?BW:(VW=1,$O()(`metadata`),BW)}var UW,WW;function GW(){if(WW)return UW;WW=1;var e=Nj();return NW(),IW(),zW(),HW(),UW=e,UW}var KW={},qW,JW;function YW(){if(JW)return qW;JW=1;var e=ww(),t=L(),n=e(`Symbol`),r=n.keyFor,i=t(n.prototype.valueOf);return qW=n.isRegisteredSymbol||function(e){try{return r(i(e))!==void 0}catch{return!1}},qW}var XW;function ZW(){return XW?KW:(XW=1,z()({target:`Symbol`,stat:!0},{isRegisteredSymbol:YW()}),KW)}var QW={},$W,eG;function tG(){if(eG)return $W;eG=1;for(var e=fT(),t=ww(),n=L(),r=Hw(),i=wT(),a=t(`Symbol`),o=a.isWellKnownSymbol,s=t(`Object`,`getOwnPropertyNames`),c=n(a.prototype.valueOf),l=e(`wks`),u=0,d=s(a),f=d.length;u<f;u++)try{var p=d[u];r(a[p])&&i(p)}catch{}return $W=function(e){if(o&&o(e))return!0;try{for(var t=c(e),n=0,r=s(l),i=r.length;n<i;n++)if(l[r[n]]==t)return!0}catch{}return!1},$W}var nG;function rG(){return nG?QW:(nG=1,z()({target:`Symbol`,stat:!0,forced:!0},{isWellKnownSymbol:tG()}),QW)}var iG={},aG;function oG(){return aG?iG:(aG=1,$O()(`customMatcher`),iG)}var sG={},cG;function lG(){return cG?sG:(cG=1,$O()(`observable`),sG)}var uG={},dG;function fG(){return dG?uG:(dG=1,z()({target:`Symbol`,stat:!0,name:`isRegisteredSymbol`},{isRegistered:YW()}),uG)}var pG={},mG;function hG(){return mG?pG:(mG=1,z()({target:`Symbol`,stat:!0,name:`isWellKnownSymbol`,forced:!0},{isWellKnown:tG()}),pG)}var gG={},_G;function vG(){return _G?gG:(_G=1,$O()(`matcher`),gG)}var yG={},bG;function xG(){return bG?yG:(bG=1,$O()(`metadataKey`),yG)}var SG={},CG;function wG(){return CG?SG:(CG=1,$O()(`patternMatch`),SG)}var TG={},EG;function DG(){return EG?TG:(EG=1,$O()(`replaceAll`),TG)}var OG,kG;function AG(){if(kG)return OG;kG=1;var e=GW();return ZW(),rG(),oG(),lG(),fG(),hG(),vG(),xG(),wG(),DG(),OG=e,OG}var jG,MG;function NG(){return MG?jG:(MG=1,jG=AG(),jG)}var PG=F(NG()),FG,IG;function LG(){return IG?FG:(IG=1,Tj(),lU(),rA(),FG=XO().f(`iterator`),FG)}var RG,zG;function BG(){if(zG)return RG;zG=1;var e=LG();return Aj(),RG=e,RG}var VG,HG;function UG(){return HG?VG:(HG=1,VG=BG(),VG)}var WG,GG;function KG(){return GG?WG:(GG=1,WG=UG(),WG)}var qG,JG;function YG(){return JG?qG:(JG=1,qG=KG(),qG)}var XG=F(YG());function ZG(e){"@babel/helpers - typeof";return ZG=typeof PG==`function`&&typeof XG==`symbol`?function(e){return typeof e}:function(e){return e&&typeof PG==`function`&&e.constructor===PG&&e!==PG.prototype?`symbol`:typeof e},ZG(e)}var QG,$G;function eK(){return $G?QG:($G=1,wA(),QG=XO().f(`toPrimitive`),QG)}var tK,nK;function rK(){return nK?tK:(nK=1,tK=eK(),tK)}var iK,aK;function oK(){return aK?iK:(aK=1,iK=rK(),iK)}var sK,cK;function lK(){return cK?sK:(cK=1,sK=oK(),sK)}var uK,dK;function fK(){return dK?uK:(dK=1,uK=lK(),uK)}var pK=F(fK());function mK(e,t){if(ZG(e)!=`object`||!e)return e;var n=e[pK];if(n!==void 0){var r=n.call(e,t);if(ZG(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function hK(e){var t=mK(e,`string`);return ZG(t)==`symbol`?t:t+``}function gK(e,t,n){return(t=hK(t))in e?AW(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _K={},vK,yK;function bK(){if(yK)return vK;yK=1;var e=EC(),t=I(),n=L(),r=CO(),i=XF().trim,a=qF(),o=n(``.charAt),s=e.parseFloat,c=e.Symbol,l=c&&c.iterator;return vK=1/s(a+`-0`)!=-1/0||l&&!t(function(){s(Object(l))})?function(e){var t=i(r(e)),n=s(t);return n===0&&o(t,0)===`-`?-0:n}:s,vK}var xK;function SK(){if(xK)return _K;xK=1;var e=z(),t=bK();return e({global:!0,forced:parseFloat!==t},{parseFloat:t}),_K}var CK,wK;function TK(){return wK?CK:(wK=1,SK(),CK=R().parseFloat,CK)}var EK,DK;function OK(){return DK?EK:(DK=1,EK=TK(),EK)}var kK,AK;function jK(){return AK?kK:(AK=1,kK=OK(),kK)}var MK=F(jK()),NK={},PK;function FK(){if(PK)return NK;PK=1;var e=z(),t=I(),n=VO().f;return e({target:`Object`,stat:!0,forced:t(function(){return!Object.getOwnPropertyNames(1)})},{getOwnPropertyNames:n}),NK}var IK,LK;function RK(){if(LK)return IK;LK=1,FK();var e=R().Object;return IK=function(t){return e.getOwnPropertyNames(t)},IK}var zK,BK;function VK(){return BK?zK:(BK=1,zK=RK(),zK)}var HK,UK;function WK(){return UK?HK:(UK=1,HK=VK(),HK)}var GK=F(WK()),KK,qK;function JK(){return qK?KK:(qK=1,zk(),KK=R().Object.getOwnPropertySymbols,KK)}var YK,XK;function ZK(){return XK?YK:(XK=1,YK=JK(),YK)}var QK,$K;function eq(){return $K?QK:($K=1,QK=ZK(),QK)}var tq=F(eq()),nq={exports:{}},rq={},iq;function aq(){if(iq)return rq;iq=1;var e=z(),t=I(),n=gw(),r=RT().f,i=YC();return e({target:`Object`,stat:!0,forced:!i||t(function(){r(1)}),sham:!i},{getOwnPropertyDescriptor:function(e,t){return r(n(e),t)}}),rq}var oq;function sq(){if(oq)return nq.exports;oq=1,aq();var e=R().Object,t=nq.exports=function(t,n){return e.getOwnPropertyDescriptor(t,n)};return e.getOwnPropertyDescriptor.sham&&(t.sham=!0),nq.exports}var cq,lq;function uq(){return lq?cq:(lq=1,cq=sq(),cq)}var dq,fq;function pq(){return fq?dq:(fq=1,dq=uq(),dq)}var mq=F(pq()),hq={},gq;function _q(){if(gq)return hq;gq=1;var e=z(),t=YC(),n=nM(),r=gw(),i=RT(),a=YD();return e({target:`Object`,stat:!0,sham:!t},{getOwnPropertyDescriptors:function(e){for(var t=r(e),o=i.f,s=n(t),c={},l=0,u,d;s.length>l;)d=o(t,u=s[l++]),d!==void 0&&a(c,u,d);return c}}),hq}var vq,yq;function bq(){return yq?vq:(yq=1,_q(),vq=R().Object.getOwnPropertyDescriptors,vq)}var xq,Sq;function Cq(){return Sq?xq:(Sq=1,xq=bq(),xq)}var wq,Tq;function Eq(){return Tq?wq:(Tq=1,wq=Cq(),wq)}var Dq=F(Eq()),Oq={exports:{}},kq={},Aq;function jq(){if(Aq)return kq;Aq=1;var e=z(),t=YC(),n=EO().f;return e({target:`Object`,stat:!0,forced:Object.defineProperties!==n,sham:!t},{defineProperties:n}),kq}var Mq;function Nq(){if(Mq)return Oq.exports;Mq=1,jq();var e=R().Object,t=Oq.exports=function(t,n){return e.defineProperties(t,n)};return e.defineProperties.sham&&(t.sham=!0),Oq.exports}var Pq,Fq;function Iq(){return Fq?Pq:(Fq=1,Pq=Nq(),Pq)}var Lq,Rq;function zq(){return Rq?Lq:(Rq=1,Lq=Iq(),Lq)}var Bq=F(zq()),Vq,Hq;function Uq(){return Hq?Vq:(Hq=1,Vq=bW(),Vq)}var Wq=F(Uq());function Gq(e,t){let n=[`node`,`edge`,`label`],r=!0,i=rV(t,`chosen`);if(typeof i==`boolean`)r=i;else if(typeof i==`object`){if(H(n).call(n,e)===-1)throw Error(`choosify: subOption '`+e+`' should be one of '`+n.join(`', '`)+`'`);let i=rV(t,[`chosen`,e]);(typeof i==`boolean`||typeof i==`function`)&&(r=i)}return r}function Kq(e,t,n){if(e.width<=0||e.height<=0)return!1;if(n!==void 0){let e={x:t.x-n.x,y:t.y-n.y};if(n.angle!==0){let r=-n.angle;t={x:Math.cos(r)*e.x-Math.sin(r)*e.y,y:Math.sin(r)*e.x+Math.cos(r)*e.y}}else t=e}let r=e.x+e.width,i=e.y+e.width;return e.left<t.x&&r>t.x&&e.top<t.y&&i>t.y}function qq(e){return typeof e==`string`&&e!==``}function Jq(e,t,n,r){let i=r.x,a=r.y;if(typeof r.distanceToBorder==`function`){let n=r.distanceToBorder(e,t),o=Math.sin(t)*n,s=Math.cos(t)*n;s===n?(i+=n,a=r.y):o===n?(i=r.x,a-=n):(i+=s,a-=o)}else r.shape.width>r.shape.height?(i=r.x+r.shape.width*.5,a=r.y-n):(i=r.x+n,a=r.y-r.shape.height*.5);return{x:i,y:a}}var Yq,Xq;function Zq(){return Xq?Yq:(Xq=1,Tj(),Yq=uD()(`Array`,`values`),Yq)}var Qq,$q;function eJ(){return $q?Qq:($q=1,Qq=Zq(),Qq)}var tJ,nJ;function rJ(){if(nJ)return tJ;nJ=1,Aj();var e=tO(),t=vT(),n=Dw(),r=eJ(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return tJ=function(o){var s=o.values;return o===i||n(i,o)&&s===i.values||t(a,e(o))?r:s},tJ}var iJ,aJ;function oJ(){return aJ?iJ:(aJ=1,iJ=rJ(),iJ)}var sJ=F(oJ()),cJ=class{constructor(e){this.measureText=e,this.current=0,this.width=0,this.height=0,this.lines=[]}_add(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`normal`;this.lines[e]===void 0&&(this.lines[e]={width:0,height:0,blocks:[]});let r=t;(t===void 0||t===``)&&(r=` `);let i=this.measureText(r,n),a=QE({},sJ(i));a.text=t,a.width=i.width,a.mod=n,(t===void 0||t===``)&&(a.width=0),this.lines[e].blocks.push(a),this.lines[e].width+=a.width}curWidth(){let e=this.lines[this.current];return e===void 0?0:e.width}append(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`normal`;this._add(this.current,e,t)}newLine(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`normal`;this._add(this.current,e,t),this.current++}determineLineHeights(){for(let e=0;e<this.lines.length;e++){let t=this.lines[e],n=0;if(t.blocks!==void 0)for(let e=0;e<t.blocks.length;e++){let r=t.blocks[e];n<r.height&&(n=r.height)}t.height=n}}determineLabelSize(){let e=0,t=0;for(let n=0;n<this.lines.length;n++){let r=this.lines[n];r.width>e&&(e=r.width),t+=r.height}this.width=e,this.height=t}removeEmptyBlocks(){let e=[];for(let t=0;t<this.lines.length;t++){let n=this.lines[t];if(n.blocks.length===0||t===this.lines.length-1&&n.width===0)continue;let r={};QE(r,n),r.blocks=[];let i,a=[];for(let e=0;e<n.blocks.length;e++){let t=n.blocks[e];t.width===0?i===void 0&&(i=t):a.push(t)}a.length===0&&i!==void 0&&a.push(i),r.blocks=a,e.push(r)}return e}finalize(){this.determineLineHeights(),this.determineLabelSize();let e=this.removeEmptyBlocks();return{width:this.width,height:this.height,lines:e}}},lJ={"<b>":/<b>/,"<i>":/<i>/,"<code>":/<code>/,"</b>":/<\/b>/,"</i>":/<\/i>/,"</code>":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/},uJ=class{constructor(e){this.text=e,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer=``,this.modStack=[],this.blocks=[]}mod(){return this.modStack.length===0?`normal`:this.modStack[0]}modName(){if(this.modStack.length===0)return`normal`;if(this.modStack[0]===`mono`)return`mono`;if(this.bold&&this.ital)return`boldital`;if(this.bold)return`bold`;if(this.ital)return`ital`}emitBlock(){this.spacing&&=(this.add(` `),!1),this.buffer.length>0&&(this.blocks.push({text:this.buffer,mod:this.modName()}),this.buffer=``)}add(e){e===` `&&(this.spacing=!0),this.spacing&&=(this.buffer+=` `,!1),e!=` `&&(this.buffer+=e)}parseWS(e){return/[ \t]/.test(e)?(this.mono?this.add(e):this.spacing=!0,!0):!1}setTag(e){this.emitBlock(),this[e]=!0,this.modStack.unshift(e)}unsetTag(e){this.emitBlock(),this[e]=!1,this.modStack.shift()}parseStartTag(e,t){return!this.mono&&!this[e]&&this.match(t)?(this.setTag(e),!0):!1}match(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,[n,r]=this.prepareRegExp(e),i=n.test(this.text.substr(this.position,r));return i&&t&&(this.position+=r-1),i}parseEndTag(e,t,n){let r=this.mod()===e;return e===`mono`?r&&=this.mono:r&&=!this.mono,r&&this.match(t)?((n===void 0||this.position===this.text.length-1||this.match(n,!1))&&this.unsetTag(e),!0):!1}replace(e,t){return this.match(e)?(this.add(t),this.position+=length-1,!0):!1}prepareRegExp(e){let t,n;if(e instanceof RegExp)n=e,t=1;else{let r=lJ[e];n=r===void 0?new RegExp(e):r,t=e.length}return[n,t]}},dJ=class{constructor(e,t,n,r){this.ctx=e,this.parent=t,this.selected=n,this.hover=r;let i=(t,i)=>{if(t===void 0)return 0;let a=this.parent.getFormattingValues(e,n,r,i),o=0;return t!==``&&(o=this.ctx.measureText(t).width),{width:o,values:a}};this.lines=new cJ(i)}process(e){if(!qq(e))return this.lines.finalize();let t=this.parent.fontOptions;e=e.replace(/\r\n/g,`
|
|
24
|
-
`),e=e.replace(/\r/g,`
|
|
25
|
-
`);let n=String(e).split(`
|
|
26
|
-
`),r=n.length;if(t.multi)for(let e=0;e<r;e++){let r=this.splitBlocks(n[e],t.multi);if(r!==void 0){if(r.length===0){this.lines.newLine(``);continue}if(t.maxWdt>0)for(let e=0;e<r.length;e++){let t=r[e].mod,n=r[e].text;this.splitStringIntoLines(n,t,!0)}else for(let e=0;e<r.length;e++){let t=r[e].mod,n=r[e].text;this.lines.append(n,t)}this.lines.newLine()}}else if(t.maxWdt>0)for(let e=0;e<r;e++)this.splitStringIntoLines(n[e]);else for(let e=0;e<r;e++)this.lines.newLine(n[e]);return this.lines.finalize()}decodeMarkupSystem(e){let t=`none`;return e===`markdown`||e===`md`?t=`markdown`:(e===!0||e===`html`)&&(t=`html`),t}splitHtmlBlocks(e){let t=new uJ(e),n=e=>/&/.test(e)?(t.replace(t.text,`<`,`<`)||t.replace(t.text,`&`,`&`)||t.add(`&`),!0):!1;for(;t.position<t.text.length;){let e=t.text.charAt(t.position);t.parseWS(e)||/</.test(e)&&(t.parseStartTag(`bold`,`<b>`)||t.parseStartTag(`ital`,`<i>`)||t.parseStartTag(`mono`,`<code>`)||t.parseEndTag(`bold`,`</b>`)||t.parseEndTag(`ital`,`</i>`)||t.parseEndTag(`mono`,`</code>`))||n(e)||t.add(e),t.position++}return t.emitBlock(),t.blocks}splitMarkdownBlocks(e){let t=new uJ(e),n=!0,r=e=>/\\/.test(e)?(t.position<this.text.length+1&&(t.position++,e=this.text.charAt(t.position),/ \t/.test(e)?t.spacing=!0:(t.add(e),n=!1)),!0):!1;for(;t.position<t.text.length;){let e=t.text.charAt(t.position);t.parseWS(e)||r(e)||(n||t.spacing)&&(t.parseStartTag(`bold`,`*`)||t.parseStartTag(`ital`,`_`)||t.parseStartTag(`mono`,"`"))||t.parseEndTag(`bold`,`*`,`afterBold`)||t.parseEndTag(`ital`,`_`,`afterItal`)||t.parseEndTag(`mono`,"`",`afterMono`)||(t.add(e),n=!1),t.position++}return t.emitBlock(),t.blocks}splitBlocks(e,t){let n=this.decodeMarkupSystem(t);if(n===`none`)return[{text:e,mod:`normal`}];if(n===`markdown`)return this.splitMarkdownBlocks(e);if(n===`html`)return this.splitHtmlBlocks(e)}overMaxWidth(e){let t=this.ctx.measureText(e).width;return this.lines.curWidth()+t>this.parent.fontOptions.maxWdt}getLongestFit(e){let t=``,n=0;for(;n<e.length;){let r=t+(t===``?``:` `)+e[n];if(this.overMaxWidth(r))break;t=r,n++}return n}getLongestFitWord(e){let t=0;for(;t<e.length&&!this.overMaxWidth($j(e).call(e,0,t));)t++;return t}splitStringIntoLines(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`normal`,n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];this.parent.getFormattingValues(this.ctx,this.selected,this.hover,t),e=e.replace(/^( +)/g,`$1\r`),e=e.replace(/([^\r][^ ]*)( +)/g,`$1\r$2\r`);let r=e.split(`\r`);for(;r.length>0;){let e=this.getLongestFit(r);if(e===0){let e=r[0],n=this.getLongestFitWord(e);this.lines.newLine($j(e).call(e,0,n),t),r[0]=$j(e).call(e,n)}else{let i=e;r[e-1]===` `?e--:r[i]===` `&&i++;let a=$j(r).call(r,0,e).join(``);e==r.length&&n?this.lines.append(a,t):this.lines.newLine(a,t),r=$j(r).call(r,i)}}}},fJ=[`bold`,`ital`,`boldital`,`mono`],pJ=class e{constructor(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];this.body=e,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(t),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=n}setOptions(e){if(this.elementOptions=e,this.initFontOptions(e.font),qq(e.label)?this.labelDirty=!0:e.label=void 0,e.font!==void 0&&e.font!==null){if(typeof e.font==`string`)this.baseSize=this.fontOptions.size;else if(typeof e.font==`object`){let t=e.font.size;t!==void 0&&(this.baseSize=t)}}}initFontOptions(t){if(W(fJ,e=>{this.fontOptions[e]={}}),e.parseFontString(this.fontOptions,t)){this.fontOptions.vadjust=0;return}W(t,(e,t)=>{e!=null&&typeof e!=`object`&&(this.fontOptions[t]=e)})}static parseFontString(e,t){if(!t||typeof t!=`string`)return!1;let n=t.split(` `);return e.size=+n[0].replace(`px`,``),e.face=n[1],e.color=n[2],!0}constrain(e){let t={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:`middle`},n=rV(e,`widthConstraint`);if(typeof n==`number`)t.maxWdt=Number(n),t.minWdt=Number(n);else if(typeof n==`object`){let n=rV(e,[`widthConstraint`,`maximum`]);typeof n==`number`&&(t.maxWdt=Number(n));let r=rV(e,[`widthConstraint`,`minimum`]);typeof r==`number`&&(t.minWdt=Number(r))}let r=rV(e,`heightConstraint`);if(typeof r==`number`)t.minHgt=Number(r);else if(typeof r==`object`){let n=rV(e,[`heightConstraint`,`minimum`]);typeof n==`number`&&(t.minHgt=Number(n));let r=rV(e,[`heightConstraint`,`valign`]);typeof r==`string`&&(r===`top`||r===`bottom`)&&(t.valign=r)}return t}update(e,t){this.setOptions(e,!0),this.propagateFonts(t),U(this.fontOptions,this.constrain(t)),this.fontOptions.chooser=Gq(`label`,t)}adjustSizes(e){let t=e?e.right+e.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=t,this.fontOptions.minWdt-=t);let n=e?e.top+e.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=n)}addFontOptionsToPile(e,t){for(let n=0;n<t.length;++n)this.addFontToPile(e,t[n])}addFontToPile(e,t){if(t===void 0||t.font===void 0||t.font===null)return;let n=t.font;e.push(n)}getBasicOptions(t){let n={};for(let r=0;r<t.length;++r){let i=t[r],a={};e.parseFontString(a,i)&&(i=a),W(i,(e,t)=>{e!==void 0&&(Object.prototype.hasOwnProperty.call(n,t)||(H(fJ).call(fJ,t)===-1?n[t]=e:n[t]={}))})}return n}getFontOption(t,n,r){let i;for(let a=0;a<t.length;++a){let o=t[a];if(Object.prototype.hasOwnProperty.call(o,n)){if(i=o[n],i==null)continue;let t={};if(e.parseFontString(t,i)&&(i=t),Object.prototype.hasOwnProperty.call(i,r))return i[r]}}if(Object.prototype.hasOwnProperty.call(this.fontOptions,r))return this.fontOptions[r];throw Error(`Did not find value for multi-font for property: '`+r+`'`)}getFontOptions(e,t){let n={},r=[`color`,`size`,`face`,`mod`,`vadjust`];for(let i=0;i<r.length;++i){let a=r[i];n[a]=this.getFontOption(e,t,a)}return n}propagateFonts(e){let t=[];this.addFontOptionsToPile(t,e),this.fontOptions=this.getBasicOptions(t);for(let e=0;e<fJ.length;++e){let n=fJ[e],r=this.fontOptions[n];W(this.getFontOptions(t,n),(e,t)=>{r[t]=e}),r.size=Number(r.size),r.vadjust=Number(r.vadjust)}}draw(e,t,n,r,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:`middle`;if(this.elementOptions.label===void 0)return;let o=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&o<this.elementOptions.scaling.label.drawThreshold-1||(o>=this.elementOptions.scaling.label.maxVisible&&(o=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(e,r,i,t,n,a),this._drawBackground(e),this._drawText(e,t,this.size.yLine,a,o))}_drawBackground(e){if(this.fontOptions.background!==void 0&&this.fontOptions.background!==`none`){e.fillStyle=this.fontOptions.background;let t=this.getSize();e.fillRect(t.left,t.top,t.width,t.height)}}_drawText(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`middle`,i=arguments.length>4?arguments[4]:void 0;[t,n]=this._setAlignment(e,t,n,r),e.textAlign=`left`,t-=this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&(this.fontOptions.valign===`top`&&(n-=(this.size.height-this.size.labelHeight)/2),this.fontOptions.valign===`bottom`&&(n+=(this.size.height-this.size.labelHeight)/2));for(let r=0;r<this.lineCount;r++){let a=this.lines[r];if(a&&a.blocks){let r=0;this.isEdgeLabel||this.fontOptions.align===`center`?r+=(this.size.width-a.width)/2:this.fontOptions.align===`right`&&(r+=this.size.width-a.width);for(let o=0;o<a.blocks.length;o++){let s=a.blocks[o];e.font=s.font;let[c,l]=this._getColor(s.color,i,s.strokeColor);s.strokeWidth>0&&(e.lineWidth=s.strokeWidth,e.strokeStyle=l,e.lineJoin=`round`),e.fillStyle=c,s.strokeWidth>0&&e.strokeText(s.text,t+r,n+s.vadjust),e.fillText(s.text,t+r,n+s.vadjust),r+=s.width}n+=a.height}}}_setAlignment(e,t,n,r){return this.isEdgeLabel&&this.fontOptions.align!==`horizontal`&&this.pointToSelf===!1?(t=0,n=0,this.fontOptions.align===`top`?(e.textBaseline=`alphabetic`,n-=4):this.fontOptions.align===`bottom`?(e.textBaseline=`hanging`,n+=4):e.textBaseline=`middle`):e.textBaseline=r,[t,n]}_getColor(e,t,n){let r=e||`#000000`,i=n||`#ffffff`;if(t<=this.elementOptions.scaling.label.drawThreshold){let e=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-t)));r=WB(r,e),i=WB(i,e)}return[r,i]}getTextSize(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return this._processLabel(e,t,n),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}getSize(){let e=this.size.left,t=this.size.top-.5*2;if(this.isEdgeLabel){let n=-this.size.width*.5;switch(this.fontOptions.align){case`middle`:e=n,t=-this.size.height*.5;break;case`top`:e=n,t=-(this.size.height+2);break;case`bottom`:e=n,t=2;break}}return{left:e,top:t,width:this.size.width,height:this.size.height}}calculateLabelSize(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:`middle`;this._processLabel(e,t,n),this.size.left=r-this.size.width*.5,this.size.top=i-this.size.height*.5,this.size.yLine=i+(1-this.lineCount)*.5*this.fontOptions.size,a===`hanging`&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}getFormattingValues(e,t,n,r){let i=function(e,t,n){return t===`normal`?n===`mod`?``:e[n]:e[t][n]===void 0?e[n]:e[t][n]},a={color:i(this.fontOptions,r,`color`),size:i(this.fontOptions,r,`size`),face:i(this.fontOptions,r,`face`),mod:i(this.fontOptions,r,`mod`),vadjust:i(this.fontOptions,r,`vadjust`),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(t||n)&&(r===`normal`&&this.fontOptions.chooser===!0&&this.elementOptions.labelHighlightBold?a.mod=`bold`:typeof this.fontOptions.chooser==`function`&&this.fontOptions.chooser(a,this.elementOptions.id,t,n));let o=``;return a.mod!==void 0&&a.mod!==``&&(o+=a.mod+` `),o+=a.size+`px `+a.face,e.font=o.replace(/"/g,``),a.font=e.font,a.height=a.size,a}differentState(e,t){return e!==this.selectedState||t!==this.hoverState}_processLabelText(e,t,n,r){return new dJ(e,this,t,n).process(r)}_processLabel(e,t,n){if(this.labelDirty===!1&&!this.differentState(t,n))return;let r=this._processLabelText(e,t,n,this.elementOptions.label);this.fontOptions.minWdt>0&&r.width<this.fontOptions.minWdt&&(r.width=this.fontOptions.minWdt),this.size.labelHeight=r.height,this.fontOptions.minHgt>0&&r.height<this.fontOptions.minHgt&&(r.height=this.fontOptions.minHgt),this.lines=r.lines,this.lineCount=r.lines.length,this.size.width=r.width,this.size.height=r.height,this.selectedState=t,this.hoverState=n,this.labelDirty=!1}visible(){return!(this.size.width===0||this.size.height===0||this.elementOptions.label===void 0||this.fontOptions.size*this.body.view.scale<this.elementOptions.scaling.label.drawThreshold-1)}},mJ=class{constructor(e,t,n){this.body=t,this.labelModule=n,this.setOptions(e),this.top=void 0,this.left=void 0,this.height=void 0,this.width=void 0,this.radius=void 0,this.margin=void 0,this.refreshNeeded=!0,this.boundingBox={top:0,left:0,right:0,bottom:0}}setOptions(e){this.options=e}_setMargins(e){this.margin={},this.options.margin&&(typeof this.options.margin==`object`?(this.margin.top=this.options.margin.top,this.margin.right=this.options.margin.right,this.margin.bottom=this.options.margin.bottom,this.margin.left=this.options.margin.left):(this.margin.top=this.options.margin,this.margin.right=this.options.margin,this.margin.bottom=this.options.margin,this.margin.left=this.options.margin)),e.adjustSizes(this.margin)}_distanceToBorder(e,t){let n=this.options.borderWidth;return e&&this.resize(e),Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+n}enableShadow(e,t){t.shadow&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}disableShadow(e,t){t.shadow&&(e.shadowColor=`rgba(0,0,0,0)`,e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}enableBorderDashes(e,t){if(t.borderDashes!==!1)if(e.setLineDash!==void 0){let n=t.borderDashes;n===!0&&(n=[5,15]),e.setLineDash(n)}else console.warn(`setLineDash is not supported in this browser. The dashed borders cannot be used.`),this.options.shapeProperties.borderDashes=!1,t.borderDashes=!1}disableBorderDashes(e,t){t.borderDashes!==!1&&(e.setLineDash===void 0?(console.warn(`setLineDash is not supported in this browser. The dashed borders cannot be used.`),this.options.shapeProperties.borderDashes=!1,t.borderDashes=!1):e.setLineDash([0]))}needsRefresh(e,t){return this.refreshNeeded===!0?(this.refreshNeeded=!1,!0):this.width===void 0||this.labelModule.differentState(e,t)}initContextForDraw(e,t){let n=t.borderWidth/this.body.view.scale;e.lineWidth=Math.min(this.width,n),e.strokeStyle=t.borderColor,e.fillStyle=t.color}performStroke(e,t){let n=t.borderWidth/this.body.view.scale;e.save(),n>0&&(this.enableBorderDashes(e,t),e.stroke(),this.disableBorderDashes(e,t)),e.restore()}performFill(e,t){e.save(),e.fillStyle=t.color,this.enableShadow(e,t),ZL(e).call(e),this.disableShadow(e,t),e.restore(),this.performStroke(e,t)}_addBoundingBoxMargin(e){this.boundingBox.left-=e,this.boundingBox.top-=e,this.boundingBox.bottom+=e,this.boundingBox.right+=e}_updateBoundingBox(e,t,n,r,i){n!==void 0&&this.resize(n,r,i),this.left=e-this.width/2,this.top=t-this.height/2,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}updateBoundingBox(e,t,n,r,i){this._updateBoundingBox(e,t,n,r,i)}getDimensionsFromLabel(e,t,n){this.textSize=this.labelModule.getTextSize(e,t,n);let r=this.textSize.width,i=this.textSize.height;return r===0&&(r=14,i=14),{width:r,height:i}}},hJ=class extends mJ{constructor(e,t,n){super(e,t,n),this._setMargins(n)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,n)){let r=this.getDimensionsFromLabel(e,t,n);this.width=r.width+this.margin.right+this.margin.left,this.height=r.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}draw(e,t,n,r,i,a){this.resize(e,r,i),this.left=t-this.width/2,this.top=n-this.height/2,this.initContextForDraw(e,a),kD(e,this.left,this.top,this.width,this.height,a.borderRadius),this.performFill(e,a),this.updateBoundingBox(t,n,e,r,i),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,r,i)}updateBoundingBox(e,t,n,r,i){this._updateBoundingBox(e,t,n,r,i);let a=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(a)}distanceToBorder(e,t){e&&this.resize(e);let n=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+n}},gJ=class extends mJ{constructor(e,t,n){super(e,t,n),this.labelOffset=0,this.selected=!1}setOptions(e,t,n){this.options=e,(t!==void 0||n!==void 0)&&this.setImages(t,n)}setImages(e,t){t&&this.selected?(this.imageObj=t,this.imageObjAlt=e):(this.imageObj=e,this.imageObjAlt=t)}switchImages(e){let t=e&&!this.selected||!e&&this.selected;if(this.selected=e,this.imageObjAlt!==void 0&&t){let e=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=e}}_getImagePadding(){let e={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){let t=this.options.imagePadding;typeof t==`object`?(e.top=t.top,e.right=t.right,e.bottom=t.bottom,e.left=t.left):(e.top=t,e.right=t,e.bottom=t,e.left=t)}return e}_resizeImage(){let e,t;if(this.options.shapeProperties.useImageSize===!1){let n=1,r=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?n=this.imageObj.width/this.imageObj.height:r=this.imageObj.height/this.imageObj.width),e=this.options.size*2*n,t=this.options.size*2*r}else{let n=this._getImagePadding();e=this.imageObj.width+n.left+n.right,t=this.imageObj.height+n.top+n.bottom}this.width=e,this.height=t,this.radius=.5*this.width}_drawRawCircle(e,t,n,r){this.initContextForDraw(e,r),CD(e,t,n,r.size),this.performFill(e,r)}_drawImageAtPosition(e,t){if(this.imageObj.width!=0){e.globalAlpha=t.opacity===void 0?1:t.opacity,this.enableShadow(e,t);let n=1;this.options.shapeProperties.interpolation===!0&&(n=this.imageObj.width/this.width/this.body.view.scale);let r=this._getImagePadding(),i=this.left+r.left,a=this.top+r.top,o=this.width-r.left-r.right,s=this.height-r.top-r.bottom;this.imageObj.drawImageAtPosition(e,n,i,a,o,s),this.disableShadow(e,t)}}_drawImageLabel(e,t,n,r,i){let a=0;if(this.height!==void 0){a=this.height*.5;let t=this.labelModule.getTextSize(e,r,i);t.lineCount>=1&&(a+=t.height/2)}let o=n+a;this.options.label&&(this.labelOffset=a),this.labelModule.draw(e,t,o,r,i,`hanging`)}},_J=class extends gJ{constructor(e,t,n){super(e,t,n),this._setMargins(n)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,n)){let r=this.getDimensionsFromLabel(e,t,n),i=Math.max(r.width+this.margin.right+this.margin.left,r.height+this.margin.top+this.margin.bottom);this.options.size=i/2,this.width=i,this.height=i,this.radius=this.width/2}}draw(e,t,n,r,i,a){this.resize(e,r,i),this.left=t-this.width/2,this.top=n-this.height/2,this._drawRawCircle(e,t,n,a),this.updateBoundingBox(t,n),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,n,r,i)}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size}distanceToBorder(e){return e&&this.resize(e),this.width*.5}},vJ=class extends gJ{constructor(e,t,n,r,i){super(e,t,n),this.setImages(r,i)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0){let e=this.options.size*2;this.width=e,this.height=e,this.radius=.5*this.width;return}this.needsRefresh(t,n)&&this._resizeImage()}draw(e,t,n,r,i,a){this.switchImages(r),this.resize();let o=t,s=n;this.options.shapeProperties.coordinateOrigin===`top-left`?(this.left=t,this.top=n,o+=this.width/2,s+=this.height/2):(this.left=t-this.width/2,this.top=n-this.height/2),this._drawRawCircle(e,o,s,a),e.save(),e.clip(),this._drawImageAtPosition(e,a),e.restore(),this._drawImageLabel(e,o,s,r,i),this.updateBoundingBox(t,n)}updateBoundingBox(e,t){this.options.shapeProperties.coordinateOrigin===`top-left`?(this.boundingBox.top=t,this.boundingBox.left=e,this.boundingBox.right=e+this.options.size*2,this.boundingBox.bottom=t+this.options.size*2):(this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size),this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}distanceToBorder(e){return e&&this.resize(e),this.width*.5}},yJ=class extends mJ{resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{size:this.options.size};if(this.needsRefresh(t,n)){this.labelModule.getTextSize(e,t,n);let i=2*r.size;this.width=this.customSizeWidth??i,this.height=this.customSizeHeight??i,this.radius=.5*this.width}}_drawShape(e,t,n,r,i,a,o,s){return this.resize(e,a,o,s),this.left=r-this.width/2,this.top=i-this.height/2,this.initContextForDraw(e,s),FD(t)(e,r,i,s.size),this.performFill(e,s),this.options.icon!==void 0&&this.options.icon.code!==void 0&&(e.font=(a?`bold `:``)+this.height/2+`px `+(this.options.icon.face||`FontAwesome`),e.fillStyle=this.options.icon.color||`black`,e.textAlign=`center`,e.textBaseline=`middle`,e.fillText(this.options.icon.code,r,i)),{drawExternalLabel:()=>{if(this.options.label!==void 0){this.labelModule.calculateLabelSize(e,a,o,r,i,`hanging`);let t=i+.5*this.height+.5*this.labelModule.size.height;this.labelModule.draw(e,r,t,a,o,`hanging`)}this.updateBoundingBox(r,i)}}}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height))}};function bJ(e,t){var n=WM(e);if(tq){var r=tq(e);t&&(r=DF(r).call(r,function(t){return mq(e,t).enumerable})),n.push.apply(n,r)}return n}function xJ(e){for(var t=1;t<arguments.length;t++){var n,r,i=arguments[t]==null?{}:arguments[t];t%2?V(n=bJ(Object(i),!0)).call(n,function(t){gK(e,t,i[t])}):Dq?Bq(e,Dq(i)):V(r=bJ(Object(i))).call(r,function(t){Wq(e,t,mq(i,t))})}return e}var SJ=class extends yJ{constructor(e,t,n,r){super(e,t,n,r),this.ctxRenderer=r}draw(e,t,n,r,i,a){this.resize(e,r,i,a),this.left=t-this.width/2,this.top=n-this.height/2,e.save();let o=this.ctxRenderer({ctx:e,id:this.options.id,x:t,y:n,state:{selected:r,hover:i},style:xJ({},a),label:this.options.label});if(o.drawNode!=null&&o.drawNode(),e.restore(),o.drawExternalLabel){let t=o.drawExternalLabel;o.drawExternalLabel=()=>{e.save(),t(),e.restore()}}return o.nodeDimensions&&(this.customSizeWidth=o.nodeDimensions.width,this.customSizeHeight=o.nodeDimensions.height),o}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},CJ=class extends mJ{constructor(e,t,n){super(e,t,n),this._setMargins(n)}resize(e,t,n){if(this.needsRefresh(t,n)){let r=this.getDimensionsFromLabel(e,t,n).width+this.margin.right+this.margin.left;this.width=r,this.height=r,this.radius=this.width/2}}draw(e,t,n,r,i,a){this.resize(e,r,i),this.left=t-this.width/2,this.top=n-this.height/2,this.initContextForDraw(e,a),jD(e,t-this.width/2,n-this.height/2,this.width,this.height),this.performFill(e,a),this.updateBoundingBox(t,n,e,r,i),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,r,i)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},wJ=class extends yJ{draw(e,t,n,r,i,a){return this._drawShape(e,`diamond`,4,t,n,r,i,a)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},TJ=class extends yJ{draw(e,t,n,r,i,a){return this._drawShape(e,`circle`,2,t,n,r,i,a)}distanceToBorder(e){return e&&this.resize(e),this.options.size}},EJ=class extends mJ{resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,n)){let r=this.getDimensionsFromLabel(e,t,n);this.height=r.height*2,this.width=r.width+r.height,this.radius=.5*this.width}}draw(e,t,n,r,i,a){this.resize(e,r,i),this.left=t-this.width*.5,this.top=n-this.height*.5,this.initContextForDraw(e,a),AD(e,this.left,this.top,this.width,this.height),this.performFill(e,a),this.updateBoundingBox(t,n,e,r,i),this.labelModule.draw(e,t,n,r,i)}distanceToBorder(e,t){e&&this.resize(e);let n=this.width*.5,r=this.height*.5,i=Math.sin(t)*n,a=Math.cos(t)*r;return n*r/Math.sqrt(i*i+a*a)}},DJ=class extends mJ{constructor(e,t,n){super(e,t,n),this._setMargins(n)}resize(e,t,n){this.needsRefresh(t,n)&&(this.iconSize={width:Number(this.options.icon.size),height:Number(this.options.icon.size)},this.width=this.iconSize.width+this.margin.right+this.margin.left,this.height=this.iconSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}draw(e,t,n,r,i,a){return this.resize(e,r,i),this.options.icon.size=this.options.icon.size||50,this.left=t-this.width/2,this.top=n-this.height/2,this._icon(e,t,n,r,i,a),{drawExternalLabel:()=>{this.options.label!==void 0&&this.labelModule.draw(e,this.left+this.iconSize.width/2+this.margin.left,n+this.height/2+5,r),this.updateBoundingBox(t,n)}}}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.icon.size*.5,this.boundingBox.left=e-this.options.icon.size*.5,this.boundingBox.right=e+this.options.icon.size*.5,this.boundingBox.bottom=t+this.options.icon.size*.5,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+5))}_icon(e,t,n,r,i,a){let o=Number(this.options.icon.size);this.options.icon.code===void 0?console.error(`When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.`):(e.font=[this.options.icon.weight==null?r?`bold`:``:this.options.icon.weight,(this.options.icon.weight!=null&&r?5:0)+o+`px`,this.options.icon.face].join(` `),e.fillStyle=this.options.icon.color||`black`,e.textAlign=`center`,e.textBaseline=`middle`,this.enableShadow(e,a),e.fillText(this.options.icon.code,t,n),this.disableShadow(e,a))}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},OJ=class extends gJ{constructor(e,t,n,r,i){super(e,t,n),this.setImages(r,i)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0){let e=this.options.size*2;this.width=e,this.height=e;return}this.needsRefresh(t,n)&&this._resizeImage()}draw(e,t,n,r,i,a){e.save(),this.switchImages(r),this.resize();let o=t,s=n;if(this.options.shapeProperties.coordinateOrigin===`top-left`?(this.left=t,this.top=n,o+=this.width/2,s+=this.height/2):(this.left=t-this.width/2,this.top=n-this.height/2),this.options.shapeProperties.useBorderWithImage===!0){let t=this.options.borderWidth,n=this.options.borderWidthSelected||2*this.options.borderWidth,o=(r?n:t)/this.body.view.scale;e.lineWidth=Math.min(this.width,o),e.beginPath();let s=r?this.options.color.highlight.border:i?this.options.color.hover.border:this.options.color.border,c=r?this.options.color.highlight.background:i?this.options.color.hover.background:this.options.color.background;a.opacity!==void 0&&(s=WB(s,a.opacity),c=WB(c,a.opacity)),e.strokeStyle=s,e.fillStyle=c,e.rect(this.left-.5*e.lineWidth,this.top-.5*e.lineWidth,this.width+e.lineWidth,this.height+e.lineWidth),ZL(e).call(e),this.performStroke(e,a),e.closePath()}this._drawImageAtPosition(e,a),this._drawImageLabel(e,o,s,r,i),this.updateBoundingBox(t,n),e.restore()}updateBoundingBox(e,t){this.resize(),this.options.shapeProperties.coordinateOrigin===`top-left`?(this.left=e,this.top=t):(this.left=e-this.width/2,this.top=t-this.height/2),this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},kJ=class extends yJ{draw(e,t,n,r,i,a){return this._drawShape(e,`square`,2,t,n,r,i,a)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},AJ=class extends yJ{draw(e,t,n,r,i,a){return this._drawShape(e,`hexagon`,4,t,n,r,i,a)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},jJ=class extends yJ{draw(e,t,n,r,i,a){return this._drawShape(e,`star`,4,t,n,r,i,a)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},MJ=class extends mJ{constructor(e,t,n){super(e,t,n),this._setMargins(n)}resize(e,t,n){this.needsRefresh(t,n)&&(this.textSize=this.labelModule.getTextSize(e,t,n),this.width=this.textSize.width+this.margin.right+this.margin.left,this.height=this.textSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}draw(e,t,n,r,i,a){this.resize(e,r,i),this.left=t-this.width/2,this.top=n-this.height/2,this.enableShadow(e,a),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,r,i),this.disableShadow(e,a),this.updateBoundingBox(t,n,e,r,i)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},NJ=class extends yJ{draw(e,t,n,r,i,a){return this._drawShape(e,`triangle`,3,t,n,r,i,a)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},PJ=class extends yJ{draw(e,t,n,r,i,a){return this._drawShape(e,`triangleDown`,3,t,n,r,i,a)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};function FJ(e,t){var n=WM(e);if(tq){var r=tq(e);t&&(r=DF(r).call(r,function(t){return mq(e,t).enumerable})),n.push.apply(n,r)}return n}function IJ(e){for(var t=1;t<arguments.length;t++){var n,r,i=arguments[t]==null?{}:arguments[t];t%2?V(n=FJ(Object(i),!0)).call(n,function(t){gK(e,t,i[t])}):Dq?Bq(e,Dq(i)):V(r=FJ(Object(i))).call(r,function(t){Wq(e,t,mq(i,t))})}return e}var LJ=class e{constructor(e,t,n,r,i,a){this.options=eV(i),this.globalOptions=i,this.defaultOptions=a,this.body=t,this.edges=[],this.id=void 0,this.imagelist=n,this.grouplist=r,this.x=void 0,this.y=void 0,this.baseSize=this.options.size,this.baseFontSize=this.options.font.size,this.predefinedPosition=!1,this.selected=!1,this.hover=!1,this.labelModule=new pJ(this.body,this.options,!1),this.setOptions(e)}attachEdge(e){var t;H(t=this.edges).call(t,e)===-1&&this.edges.push(e)}detachEdge(e){var t;let n=H(t=this.edges).call(t,e);if(n!=-1){var r;cP(r=this.edges).call(r,n,1)}}setOptions(t){let n=this.options.shape;if(!t)return;if(t.color!==void 0&&(this._localColor=t.color),t.id!==void 0&&(this.id=t.id),this.id===void 0)throw Error(`Node must have an id`);e.checkMass(t,this.id),t.x!==void 0&&(t.x===null?(this.x=void 0,this.predefinedPosition=!1):(this.x=dI(t.x),this.predefinedPosition=!0)),t.y!==void 0&&(t.y===null?(this.y=void 0,this.predefinedPosition=!1):(this.y=dI(t.y),this.predefinedPosition=!0)),t.size!==void 0&&(this.baseSize=t.size),t.value!==void 0&&(t.value=MK(t.value)),e.parseOptions(this.options,t,!0,this.globalOptions,this.grouplist);let r=[t,this.options,this.defaultOptions];return this.chooser=Gq(`node`,r),this._load_images(),this.updateLabelModule(t),t.opacity!==void 0&&e.checkOpacity(t.opacity)&&(this.options.opacity=t.opacity),this.updateShape(n),t.hidden!==void 0||t.physics!==void 0}_load_images(){if((this.options.shape===`circularImage`||this.options.shape===`image`)&&this.options.image===void 0)throw Error(`Option image must be defined for node type '`+this.options.shape+`'`);if(this.options.image!==void 0){if(this.imagelist===void 0)throw Error(`Internal Error: No images provided`);if(typeof this.options.image==`string`)this.imageObj=this.imagelist.load(this.options.image,this.options.brokenImage,this.id);else{if(this.options.image.unselected===void 0)throw Error(`No unselected image provided`);this.imageObj=this.imagelist.load(this.options.image.unselected,this.options.brokenImage,this.id),this.options.image.selected===void 0?this.imageObjAlt=void 0:this.imageObjAlt=this.imagelist.load(this.options.image.selected,this.options.brokenImage,this.id)}}}static checkOpacity(e){return 0<=e&&e<=1}static checkCoordinateOrigin(e){return e===void 0||e===`center`||e===`top-left`}static updateGroupOptions(t,n,r){var i;if(r===void 0)return;let a=t.group;if(n!==void 0&&n.group!==void 0&&a!==n.group)throw Error(`updateGroupOptions: group values in options don't match.`);if(!(typeof a==`number`||typeof a==`string`&&a!=``))return;let o=r.get(a);o.opacity!==void 0&&n.opacity===void 0&&(e.checkOpacity(o.opacity)||(console.error(`Invalid option for node opacity. Value must be between 0 and 1, found: `+o.opacity),o.opacity=void 0));let s=DF(i=GK(n)).call(i,e=>n[e]!=null);s.push(`font`),RB(s,t,o),t.color=KB(t.color)}static parseOptions(t,n){let r=arguments.length>2&&arguments[2]!==void 0&&arguments[2],i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=arguments.length>4?arguments[4]:void 0;if(RB([`color`,`fixed`,`shadow`],t,n,r),e.checkMass(n),t.opacity!==void 0&&(e.checkOpacity(t.opacity)||(console.error(`Invalid option for node opacity. Value must be between 0 and 1, found: `+t.opacity),t.opacity=void 0)),n.opacity!==void 0&&(e.checkOpacity(n.opacity)||(console.error(`Invalid option for node opacity. Value must be between 0 and 1, found: `+n.opacity),n.opacity=void 0)),n.shapeProperties&&!e.checkCoordinateOrigin(n.shapeProperties.coordinateOrigin)&&console.error(`Invalid option for node coordinateOrigin, found: `+n.shapeProperties.coordinateOrigin),tV(t,n,`shadow`,i),n.color!==void 0&&n.color!==null){let e=KB(n.color);IB(t.color,e)}else r===!0&&n.color===null&&(t.color=eV(i.color));n.fixed!==void 0&&n.fixed!==null&&(typeof n.fixed==`boolean`?(t.fixed.x=n.fixed,t.fixed.y=n.fixed):(n.fixed.x!==void 0&&typeof n.fixed.x==`boolean`&&(t.fixed.x=n.fixed.x),n.fixed.y!==void 0&&typeof n.fixed.y==`boolean`&&(t.fixed.y=n.fixed.y))),r===!0&&n.font===null&&(t.font=eV(i.font)),e.updateGroupOptions(t,n,a),n.scaling!==void 0&&tV(t.scaling,n.scaling,`label`,i.scaling)}getFormattingValues(){let e={color:this.options.color.background,opacity:this.options.opacity,borderWidth:this.options.borderWidth,borderColor:this.options.color.border,size:this.options.size,borderDashes:this.options.shapeProperties.borderDashes,borderRadius:this.options.shapeProperties.borderRadius,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y};if(this.selected||this.hover?this.chooser===!0?this.selected?(this.options.borderWidthSelected==null?e.borderWidth*=2:e.borderWidth=this.options.borderWidthSelected,e.color=this.options.color.highlight.background,e.borderColor=this.options.color.highlight.border,e.shadow=this.options.shadow.enabled):this.hover&&(e.color=this.options.color.hover.background,e.borderColor=this.options.color.hover.border,e.shadow=this.options.shadow.enabled):typeof this.chooser==`function`&&(this.chooser(e,this.options.id,this.selected,this.hover),e.shadow===!1&&(e.shadowColor!==this.options.shadow.color||e.shadowSize!==this.options.shadow.size||e.shadowX!==this.options.shadow.x||e.shadowY!==this.options.shadow.y)&&(e.shadow=!0)):e.shadow=this.options.shadow.enabled,this.options.opacity!==void 0){let t=this.options.opacity;e.borderColor=WB(e.borderColor,t),e.color=WB(e.color,t),e.shadowColor=WB(e.shadowColor,t)}return e}updateLabelModule(t){(this.options.label===void 0||this.options.label===null)&&(this.options.label=``),e.updateGroupOptions(this.options,IJ(IJ({},t),{},{color:t&&t.color||this._localColor||void 0}),this.grouplist);let n=this.grouplist.get(this.options.group,!1),r=[t,this.options,n,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,r),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}updateShape(e){if(e===this.options.shape&&this.shape)this.shape.setOptions(this.options,this.imageObj,this.imageObjAlt);else switch(this.options.shape){case`box`:this.shape=new hJ(this.options,this.body,this.labelModule);break;case`circle`:this.shape=new _J(this.options,this.body,this.labelModule);break;case`circularImage`:this.shape=new vJ(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case`custom`:this.shape=new SJ(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case`database`:this.shape=new CJ(this.options,this.body,this.labelModule);break;case`diamond`:this.shape=new wJ(this.options,this.body,this.labelModule);break;case`dot`:this.shape=new TJ(this.options,this.body,this.labelModule);break;case`ellipse`:this.shape=new EJ(this.options,this.body,this.labelModule);break;case`icon`:this.shape=new DJ(this.options,this.body,this.labelModule);break;case`image`:this.shape=new OJ(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case`square`:this.shape=new kJ(this.options,this.body,this.labelModule);break;case`hexagon`:this.shape=new AJ(this.options,this.body,this.labelModule);break;case`star`:this.shape=new jJ(this.options,this.body,this.labelModule);break;case`text`:this.shape=new MJ(this.options,this.body,this.labelModule);break;case`triangle`:this.shape=new NJ(this.options,this.body,this.labelModule);break;case`triangleDown`:this.shape=new PJ(this.options,this.body,this.labelModule);break;default:this.shape=new EJ(this.options,this.body,this.labelModule);break}this.needsRefresh()}select(){this.selected=!0,this.needsRefresh()}unselect(){this.selected=!1,this.needsRefresh()}needsRefresh(){this.shape.refreshNeeded=!0}getTitle(){return this.options.title}distanceToBorder(e,t){return this.shape.distanceToBorder(e,t)}isFixed(){return this.options.fixed.x&&this.options.fixed.y}isSelected(){return this.selected}getValue(){return this.options.value}getLabelSize(){return this.labelModule.size()}setValueRange(e,t,n){if(this.options.value!==void 0){let r=this.options.scaling.customScalingFunction(e,t,n,this.options.value),i=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){let e=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+r*e}this.options.size=this.options.scaling.min+r*i}else this.options.size=this.baseSize,this.options.font.size=this.baseFontSize;this.updateLabelModule()}draw(e){let t=this.getFormattingValues();return this.shape.draw(e,this.x,this.y,this.selected,this.hover,t)||{}}updateBoundingBox(e){this.shape.updateBoundingBox(this.x,this.y,e)}resize(e){let t=this.getFormattingValues();this.shape.resize(e,this.selected,this.hover,t)}getItemsOnPoint(e){let t=[];return this.labelModule.visible()&&Kq(this.labelModule.getSize(),e)&&t.push({nodeId:this.id,labelId:0}),Kq(this.shape.boundingBox,e)&&t.push({nodeId:this.id}),t}isOverlappingWith(e){return this.shape.left<e.right&&this.shape.left+this.shape.width>e.left&&this.shape.top<e.bottom&&this.shape.top+this.shape.height>e.top}isBoundingBoxOverlappingWith(e){return this.shape.boundingBox.left<e.right&&this.shape.boundingBox.right>e.left&&this.shape.boundingBox.top<e.bottom&&this.shape.boundingBox.bottom>e.top}static checkMass(e,t){if(e.mass!==void 0&&e.mass<=0){let n=``;t!==void 0&&(n=` in node id: `+t),console.error(`%cNegative or zero mass disallowed`+n+`, setting mass to 1.`,_V),e.mass=1}}},RJ=class{constructor(e,t,n,r){var i;if(this.body=e,this.images=t,this.groups=n,this.layoutEngine=r,this.body.functions.createNode=B(i=this.create).call(i,this),this.nodesListeners={add:(e,t)=>{this.add(t.items)},update:(e,t)=>{this.update(t.items,t.data,t.oldData)},remove:(e,t)=>{this.remove(t.items)}},this.defaultOptions={borderWidth:1,borderWidthSelected:void 0,brokenImage:void 0,color:{border:`#2B7CE9`,background:`#97C2FC`,highlight:{border:`#2B7CE9`,background:`#D2E5FF`},hover:{border:`#2B7CE9`,background:`#D2E5FF`}},opacity:void 0,fixed:{x:!1,y:!1},font:{color:`#343434`,size:14,face:`arial`,background:`none`,strokeWidth:0,strokeColor:`#ffffff`,align:`center`,vadjust:0,multi:!1,bold:{mod:`bold`},boldital:{mod:`bold italic`},ital:{mod:`italic`},mono:{mod:``,size:15,face:`monospace`,vadjust:2}},group:void 0,hidden:!1,icon:{face:`FontAwesome`,code:void 0,size:50,color:`#2B7CE9`},image:void 0,imagePadding:{top:0,right:0,bottom:0,left:0},label:void 0,labelHighlightBold:!0,level:void 0,margin:{top:5,right:5,bottom:5,left:5},mass:1,physics:!0,scaling:{min:10,max:30,label:{enabled:!1,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(e,t,n,r){if(t===e)return .5;{let n=1/(t-e);return Math.max(0,(r-e)*n)}}},shadow:{enabled:!1,color:`rgba(0,0,0,0.5)`,size:10,x:5,y:5},shape:`ellipse`,shapeProperties:{borderDashes:!1,borderRadius:6,interpolation:!0,useImageSize:!1,useBorderWithImage:!1,coordinateOrigin:`center`},size:25,title:void 0,value:void 0,x:void 0,y:void 0},this.defaultOptions.mass<=0)throw`Internal error: mass in defaultOptions of NodesHandler may not be zero or negative`;this.options=eV(this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e,t;this.body.emitter.on(`refreshNodes`,B(e=this.refresh).call(e,this)),this.body.emitter.on(`refresh`,B(t=this.refresh).call(t,this)),this.body.emitter.on(`destroy`,()=>{W(this.nodesListeners,(e,t)=>{this.body.data.nodes&&this.body.data.nodes.off(t,e)}),delete this.body.functions.createNode,delete this.nodesListeners.add,delete this.nodesListeners.update,delete this.nodesListeners.remove,delete this.nodesListeners})}setOptions(e){if(e!==void 0){if(LJ.parseOptions(this.options,e),e.opacity!==void 0&&(NU(e.opacity)||!YU(e.opacity)||e.opacity<0||e.opacity>1?console.error(`Invalid option for node opacity. Value must be between 0 and 1, found: `+e.opacity):this.options.opacity=e.opacity),e.shape!==void 0)for(let e in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,e)&&this.body.nodes[e].updateShape();if(e.font!==void 0||e.widthConstraint!==void 0||e.heightConstraint!==void 0)for(let e of WM(this.body.nodes))this.body.nodes[e].updateLabelModule(),this.body.nodes[e].needsRefresh();if(e.size!==void 0)for(let e in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,e)&&this.body.nodes[e].needsRefresh();(e.hidden!==void 0||e.physics!==void 0)&&this.body.emitter.emit(`_dataChanged`)}}setData(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.body.data.nodes;if(xC(`id`,e))this.body.data.nodes=e;else if(hM(e))this.body.data.nodes=new yC,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new yC;else throw TypeError(`Array or DataSet expected`);if(n&&W(this.nodesListeners,function(e,t){n.off(t,e)}),this.body.nodes={},this.body.data.nodes){let e=this;W(this.nodesListeners,function(t,n){e.body.data.nodes.on(n,t)});let t=this.body.data.nodes.getIds();this.add(t,!0)}t===!1&&this.body.emitter.emit(`_dataChanged`)}add(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n,r=[];for(let t=0;t<e.length;t++){n=e[t];let i=this.body.data.nodes.get(n),a=this.create(i);r.push(a),this.body.nodes[n]=a}this.layoutEngine.positionInitially(r),t===!1&&this.body.emitter.emit(`_dataChanged`)}update(e,t,n){let r=this.body.nodes,i=!1;for(let n=0;n<e.length;n++){let a=e[n],o=r[a],s=t[n];o===void 0?(i=!0,o=this.create(s),r[a]=o):o.setOptions(s)&&(i=!0)}!i&&n!==void 0&&(i=dW(t).call(t,function(e,t){let r=n[t];return r&&r.level!==e.level})),i===!0?this.body.emitter.emit(`_dataChanged`):this.body.emitter.emit(`_dataUpdated`)}remove(e){let t=this.body.nodes;for(let n=0;n<e.length;n++){let r=e[n];delete t[r]}this.body.emitter.emit(`_dataChanged`)}create(e){return new(arguments.length>1&&arguments[1]!==void 0?arguments[1]:LJ)(e,this.body,this.images,this.groups,this.options,this.defaultOptions)}refresh(){let e=arguments.length>0&&arguments[0]!==void 0&&arguments[0];W(this.body.nodes,(t,n)=>{let r=this.body.data.nodes.get(n);r!==void 0&&(e===!0&&t.setOptions({x:null,y:null}),t.setOptions({fixed:!1}),t.setOptions(r))})}getPositions(e){let t={};if(e!==void 0){if(hM(e)===!0){for(let n=0;n<e.length;n++)if(this.body.nodes[e[n]]!==void 0){let r=this.body.nodes[e[n]];t[e[n]]={x:Math.round(r.x),y:Math.round(r.y)}}}else if(this.body.nodes[e]!==void 0){let n=this.body.nodes[e];t[e]={x:Math.round(n.x),y:Math.round(n.y)}}}else for(let e=0;e<this.body.nodeIndices.length;e++){let n=this.body.nodes[this.body.nodeIndices[e]];t[this.body.nodeIndices[e]]={x:Math.round(n.x),y:Math.round(n.y)}}return t}getPosition(e){if(e==null)throw TypeError(`No id was specified for getPosition method.`);if(this.body.nodes[e]==null)throw ReferenceError(`NodeId provided for getPosition does not exist. Provided: ${e}`);return{x:Math.round(this.body.nodes[e].x),y:Math.round(this.body.nodes[e].y)}}storePositions(){let e=[],t=this.body.data.nodes.getDataSet();for(let n of t.get()){let t=n.id,r=this.body.nodes[t],i=Math.round(r.x),a=Math.round(r.y);(n.x!==i||n.y!==a)&&e.push({id:t,x:i,y:a})}t.update(e)}getBoundingBox(e){if(this.body.nodes[e]!==void 0)return this.body.nodes[e].shape.boundingBox}getConnectedNodes(e,t){let n=[];if(this.body.nodes[e]!==void 0){let r=this.body.nodes[e],i={};for(let e=0;e<r.edges.length;e++){let a=r.edges[e];t!==`to`&&a.toId==r.id?i[a.fromId]===void 0&&(n.push(a.fromId),i[a.fromId]=!0):t!==`from`&&a.fromId==r.id&&i[a.toId]===void 0&&(n.push(a.toId),i[a.toId]=!0)}}return n}getConnectedEdges(e){let t=[];if(this.body.nodes[e]!==void 0){let n=this.body.nodes[e];for(let e=0;e<n.edges.length;e++)t.push(n.edges[e].id)}else console.error(`NodeId provided for getConnectedEdges does not exist. Provided: `,e);return t}moveNode(e,t,n){this.body.nodes[e]===void 0?console.error(`Node id supplied to moveNode does not exist. Provided: `,e):(this.body.nodes[e].x=Number(t),this.body.nodes[e].y=Number(n),ML(()=>{this.body.emitter.emit(`startSimulation`)},0))}},zJ={},BJ;function VJ(){if(BJ)return zJ;BJ=1;var e=z(),t=Math.hypot,n=Math.abs,r=Math.sqrt;return e({target:`Math`,stat:!0,arity:2,forced:!!t&&t(1/0,NaN)!==1/0},{hypot:function(e,t){for(var i=0,a=0,o=arguments.length,s=0,c,l;a<o;)c=n(arguments[a++]),s<c?(l=s/c,i=i*l*l+1,s=c):c>0?(l=c/s,i+=l*l):i+=c;return s===1/0?1/0:s*r(i)}}),zJ}var HJ,UJ;function WJ(){return UJ?HJ:(UJ=1,VJ(),HJ=R().Math.hypot,HJ)}var GJ,KJ;function qJ(){return KJ?GJ:(KJ=1,GJ=WJ(),GJ)}var JJ,YJ;function XJ(){return YJ?JJ:(YJ=1,JJ=qJ(),JJ)}var ZJ=F(XJ()),QJ=class{static transform(e,t){hM(e)||(e=[e]);let n=t.point.x,r=t.point.y,i=t.angle,a=t.length;for(let t=0;t<e.length;++t){let o=e[t],s=o.x*Math.cos(i)-o.y*Math.sin(i),c=o.x*Math.sin(i)+o.y*Math.cos(i);o.x=n+a*s,o.y=r+a*c}}static drawPath(e,t){e.beginPath(),e.moveTo(t[0].x,t[0].y);for(let n=1;n<t.length;++n)e.lineTo(t[n].x,t[n].y);e.closePath()}},$J=class extends QJ{static draw(e,t){if(t.image){e.save(),e.translate(t.point.x,t.point.y),e.rotate(Math.PI/2+t.angle);let n=t.imageWidth==null?t.image.width:t.imageWidth,r=t.imageHeight==null?t.image.height:t.imageHeight;t.image.drawImageAtPosition(e,1,-n/2,0,n,r),e.restore()}return!1}},eY=class extends QJ{static draw(e,t){let n=[{x:0,y:0},{x:-1,y:.3},{x:-.9,y:0},{x:-1,y:-.3}];return QJ.transform(n,t),QJ.drawPath(e,n),!0}},tY=class{static draw(e,t){let n=[{x:-1,y:0},{x:0,y:.3},{x:-.4,y:0},{x:0,y:-.3}];return QJ.transform(n,t),QJ.drawPath(e,n),!0}},nY=class{static draw(e,t){let n={x:-.4,y:0};QJ.transform(n,t),e.strokeStyle=e.fillStyle,e.fillStyle=`rgba(0, 0, 0, 0)`;let r=Math.PI,i=t.angle-r/2,a=t.angle+r/2;return e.beginPath(),e.arc(n.x,n.y,t.length*.4,i,a,!1),e.stroke(),!0}},rY=class{static draw(e,t){let n={x:-.3,y:0};QJ.transform(n,t),e.strokeStyle=e.fillStyle,e.fillStyle=`rgba(0, 0, 0, 0)`;let r=Math.PI,i=t.angle+r/2,a=t.angle+3*r/2;return e.beginPath(),e.arc(n.x,n.y,t.length*.4,i,a,!1),e.stroke(),!0}},iY=class{static draw(e,t){let n=[{x:.02,y:0},{x:-1,y:.3},{x:-1,y:-.3}];return QJ.transform(n,t),QJ.drawPath(e,n),!0}},aY=class{static draw(e,t){let n=[{x:0,y:.3},{x:0,y:-.3},{x:-1,y:0}];return QJ.transform(n,t),QJ.drawPath(e,n),!0}},oY=class{static draw(e,t){let n={x:-.4,y:0};return QJ.transform(n,t),CD(e,n.x,n.y,t.length*.4),!0}},sY=class{static draw(e,t){let n=[{x:0,y:.5},{x:0,y:-.5},{x:-.15,y:-.5},{x:-.15,y:.5}];return QJ.transform(n,t),QJ.drawPath(e,n),!0}},cY=class{static draw(e,t){let n=[{x:0,y:.3},{x:0,y:-.3},{x:-.6,y:-.3},{x:-.6,y:.3}];return QJ.transform(n,t),QJ.drawPath(e,n),!0}},lY=class{static draw(e,t){let n=[{x:0,y:0},{x:-.5,y:-.3},{x:-1,y:0},{x:-.5,y:.3}];return QJ.transform(n,t),QJ.drawPath(e,n),!0}},uY=class{static draw(e,t){let n=[{x:-1,y:.3},{x:-.5,y:0},{x:-1,y:-.3},{x:0,y:0}];return QJ.transform(n,t),QJ.drawPath(e,n),!0}},dY=class{static draw(e,t){let n;switch(t.type&&(n=t.type.toLowerCase()),n){case`image`:return $J.draw(e,t);case`circle`:return oY.draw(e,t);case`box`:return cY.draw(e,t);case`crow`:return tY.draw(e,t);case`curve`:return nY.draw(e,t);case`diamond`:return lY.draw(e,t);case`inv_curve`:return rY.draw(e,t);case`triangle`:return iY.draw(e,t);case`inv_triangle`:return aY.draw(e,t);case`bar`:return sY.draw(e,t);case`vee`:return uY.draw(e,t);default:return eY.draw(e,t)}}};function fY(e,t){var n=WM(e);if(tq){var r=tq(e);t&&(r=DF(r).call(r,function(t){return mq(e,t).enumerable})),n.push.apply(n,r)}return n}function pY(e){for(var t=1;t<arguments.length;t++){var n,r,i=arguments[t]==null?{}:arguments[t];t%2?V(n=fY(Object(i),!0)).call(n,function(t){gK(e,t,i[t])}):Dq?Bq(e,Dq(i)):V(r=fY(Object(i))).call(r,function(t){Wq(e,t,mq(i,t))})}return e}var mY=class{constructor(e,t,n){gK(this,`color`,{}),gK(this,`colorDirty`,!0),gK(this,`hoverWidth`,1.5),gK(this,`selectionWidth`,2),this._body=t,this._labelModule=n,this.setOptions(e),this.fromPoint=this.from,this.toPoint=this.to}connect(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to]}cleanup(){return!1}setOptions(e){this.options=e,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.id=this.options.id}drawLine(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.getViaNode();e.strokeStyle=this.getColor(e,t),e.lineWidth=t.width,t.dashes===!1?this._drawLine(e,t,i):this._drawDashedLine(e,t,i)}_drawLine(e,t,n,r,i){if(this.from!=this.to)this._line(e,t,n,r,i);else{let[n,r,i]=this._getCircleData(e);this._circle(e,t,n,r,i)}}_drawDashedLine(e,t,n,r,i){e.lineCap=`round`;let a=hM(t.dashes)?t.dashes:[5,5];if(e.setLineDash!==void 0){if(e.save(),e.setLineDash(a),e.lineDashOffset=0,this.from!=this.to)this._line(e,t,n);else{let[n,r,i]=this._getCircleData(e);this._circle(e,t,n,r,i)}e.setLineDash([0]),e.lineDashOffset=0,e.restore()}else{if(this.from!=this.to)MD(e,this.from.x,this.from.y,this.to.x,this.to.y,a);else{let[n,r,i]=this._getCircleData(e);this._circle(e,t,n,r,i)}this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}}findBorderPosition(e,t,n){return this.from==this.to?this._findBorderPositionCircle(e,t,n):this._findBorderPosition(e,t,n)}findBorderPositions(e){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,e),to:this._findBorderPosition(this.to,e)};{var t;let[n,r]=$j(t=this._getCircleData(e)).call(t,0,2);return{from:this._findBorderPositionCircle(this.from,e,{x:n,y:r,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,e,{x:n,y:r,low:.6,high:.8,direction:1})}}}_getCircleData(e){let t=this.options.selfReference.size;e!==void 0&&this.from.shape.width===void 0&&this.from.shape.resize(e);let n=Jq(e,this.options.selfReference.angle,t,this.from);return[n.x,n.y,t]}_pointOnCircle(e,t,n,r){let i=r*2*Math.PI;return{x:e+n*Math.cos(i),y:t-n*Math.sin(i)}}_findBorderPositionCircle(e,t,n){let r=n.x,i=n.y,a=n.low,o=n.high,s=n.direction,c=this.options.selfReference.size,l,u=(a+o)*.5,d=0;this.options.arrowStrikethrough===!0&&(s===-1?d=this.options.endPointOffset.from:s===1&&(d=this.options.endPointOffset.to));let f=0;do{u=(a+o)*.5,l=this._pointOnCircle(r,i,c,u);let n=Math.atan2(e.y-l.y,e.x-l.x),p=e.distanceToBorder(t,n)+d-Math.sqrt((l.x-e.x)**2+(l.y-e.y)**2);if(Math.abs(p)<.05)break;p>0?s>0?a=u:o=u:s>0?o=u:a=u,++f}while(a<=o&&f<10);return pY(pY({},l),{},{t:u})}getLineWidth(e,t){return Math.max(e===!0?this.selectionWidth:t===!0?this.hoverWidth:this.options.width,.3/this._body.view.scale)}getColor(e,t){if(t.inheritsColor!==!1){if(t.inheritsColor===`both`&&this.from.id!==this.to.id){let n=e.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y),r=this.from.options.color.highlight.border,i=this.to.options.color.highlight.border;return this.from.selected===!1&&this.to.selected===!1?(r=WB(this.from.options.color.border,t.opacity),i=WB(this.to.options.color.border,t.opacity)):this.from.selected===!0&&this.to.selected===!1?i=this.to.options.color.border:this.from.selected===!1&&this.to.selected===!0&&(r=this.from.options.color.border),n.addColorStop(0,r),n.addColorStop(1,i),n}return t.inheritsColor===`to`?WB(this.to.options.color.border,t.opacity):WB(this.from.options.color.border,t.opacity)}else return WB(t.color,t.opacity)}_circle(e,t,n,r,i){this.enableShadow(e,t);let a=0,o=Math.PI*2;if(!this.options.selfReference.renderBehindTheNode){let t=this.options.selfReference.angle,i=this.options.selfReference.angle+Math.PI,s=this._findBorderPositionCircle(this.from,e,{x:n,y:r,low:t,high:i,direction:-1}),c=this._findBorderPositionCircle(this.from,e,{x:n,y:r,low:t,high:i,direction:1});a=Math.atan2(s.y-r,s.x-n),o=Math.atan2(c.y-r,c.x-n)}e.beginPath(),e.arc(n,r,i,a,o,!1),e.stroke(),this.disableShadow(e,t)}getDistanceToEdge(e,t,n,r,i,a){if(this.from!=this.to)return this._getDistanceToEdge(e,t,n,r,i,a);{let[e,t,n]=this._getCircleData(void 0),r=e-i,o=t-a;return Math.abs(Math.sqrt(r*r+o*o)-n)}}_getDistanceToLine(e,t,n,r,i,a){let o=n-e,s=r-t,c=o*o+s*s,l=((i-e)*o+(a-t)*s)/c;l>1?l=1:l<0&&(l=0);let u=e+l*o,d=t+l*s,f=u-i,p=d-a;return Math.sqrt(f*f+p*p)}getArrowData(e,t,n,r,i,a){let o,s,c,l,u,d,f,p=a.width;t===`from`?(c=this.from,l=this.to,u=a.fromArrowScale<0,d=Math.abs(a.fromArrowScale),f=a.fromArrowType):t===`to`?(c=this.to,l=this.from,u=a.toArrowScale<0,d=Math.abs(a.toArrowScale),f=a.toArrowType):(c=this.to,l=this.from,u=a.middleArrowScale<0,d=Math.abs(a.middleArrowScale),f=a.middleArrowType);let m=15*d+3*p;if(c!=l){let r=m/ZJ(c.x-l.x,c.y-l.y);if(t!==`middle`)if(this.options.smooth.enabled===!0){let i=this._findBorderPosition(c,e,{via:n}),a=this.getPoint(i.t+r*(t===`from`?1:-1),n);o=Math.atan2(i.y-a.y,i.x-a.x),s=i}else o=Math.atan2(c.y-l.y,c.x-l.x),s=this._findBorderPosition(c,e);else{let e=(u?-r:r)/2,t=this.getPoint(.5+e,n),i=this.getPoint(.5-e,n);o=Math.atan2(t.y-i.y,t.x-i.x),s=this.getPoint(.5,n)}}else{let[n,r,i]=this._getCircleData(e);if(t===`from`){let t=this.options.selfReference.angle,i=this.options.selfReference.angle+Math.PI,a=this._findBorderPositionCircle(this.from,e,{x:n,y:r,low:t,high:i,direction:-1});o=a.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,s=a}else if(t===`to`){let t=this.options.selfReference.angle,i=this.options.selfReference.angle+Math.PI,a=this._findBorderPositionCircle(this.from,e,{x:n,y:r,low:t,high:i,direction:1});o=a.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,s=a}else{let e=this.options.selfReference.angle/(2*Math.PI);s=this._pointOnCircle(n,r,i,e),o=e*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}let h={x:s.x-m*.9*Math.cos(o),y:s.y-m*.9*Math.sin(o)};return{point:s,core:h,angle:o,length:m,type:f}}drawArrowHead(e,t,n,r,i){e.strokeStyle=this.getColor(e,t),e.fillStyle=e.strokeStyle,e.lineWidth=t.width,dY.draw(e,i)&&(this.enableShadow(e,t),ZL(e).call(e),this.disableShadow(e,t))}enableShadow(e,t){t.shadow===!0&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}disableShadow(e,t){t.shadow===!0&&(e.shadowColor=`rgba(0,0,0,0)`,e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}drawBackground(e,t){if(t.background!==!1){let n={strokeStyle:e.strokeStyle,lineWidth:e.lineWidth,dashes:e.dashes};e.strokeStyle=t.backgroundColor,e.lineWidth=t.backgroundSize,this.setStrokeDashed(e,t.backgroundDashes),e.stroke(),e.strokeStyle=n.strokeStyle,e.lineWidth=n.lineWidth,e.dashes=n.dashes,this.setStrokeDashed(e,t.dashes)}}setStrokeDashed(e,t){if(t!==!1)if(e.setLineDash!==void 0){let n=hM(t)?t:[5,5];e.setLineDash(n)}else console.warn(`setLineDash is not supported in this browser. The dashed stroke cannot be used.`);else e.setLineDash===void 0?console.warn(`setLineDash is not supported in this browser. The dashed stroke cannot be used.`):e.setLineDash([])}};function hY(e,t){var n=WM(e);if(tq){var r=tq(e);t&&(r=DF(r).call(r,function(t){return mq(e,t).enumerable})),n.push.apply(n,r)}return n}function gY(e){for(var t=1;t<arguments.length;t++){var n,r,i=arguments[t]==null?{}:arguments[t];t%2?V(n=hY(Object(i),!0)).call(n,function(t){gK(e,t,i[t])}):Dq?Bq(e,Dq(i)):V(r=hY(Object(i))).call(r,function(t){Wq(e,t,mq(i,t))})}return e}var _Y=class extends mY{_findBorderPositionBezier(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates(),r=!1,i=1,a=0,o=this.to,s,c,l=this.options.endPointOffset?this.options.endPointOffset.to:0;e.id===this.from.id&&(o=this.from,r=!0,l=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(l=0);let u=0;do{c=(a+i)*.5,s=this.getPoint(c,n);let e=Math.atan2(o.y-s.y,o.x-s.x),d=o.distanceToBorder(t,e)+l-Math.sqrt((s.x-o.x)**2+(s.y-o.y)**2);if(Math.abs(d)<.2)break;d<0?r===!1?a=c:i=c:r===!1?i=c:a=c,++u}while(a<=i&&u<10);return gY(gY({},s),{},{t:c})}_getDistanceToBezierEdge(e,t,n,r,i,a,o){let s=1e9,c,l,u,d,f,p=e,m=t;for(l=1;l<10;l++)u=.1*l,d=(1-u)**2*e+2*u*(1-u)*o.x+u**2*n,f=(1-u)**2*t+2*u*(1-u)*o.y+u**2*r,l>0&&(c=this._getDistanceToLine(p,m,d,f,i,a),s=c<s?c:s),p=d,m=f;return s}_bezierCurve(e,t,n,r){e.beginPath(),e.moveTo(this.fromPoint.x,this.fromPoint.y),n!=null&&n.x!=null?r!=null&&r.x!=null?e.bezierCurveTo(n.x,n.y,r.x,r.y,this.toPoint.x,this.toPoint.y):e.quadraticCurveTo(n.x,n.y,this.toPoint.x,this.toPoint.y):e.lineTo(this.toPoint.x,this.toPoint.y),this.drawBackground(e,t),this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}getViaNode(){return this._getViaCoordinates()}},vY=class extends _Y{constructor(e,t,n){super(e,t,n),gK(this,`via`,this.via),this._boundFunction=()=>{this.positionBezierNode()},this._body.emitter.on(`_repositionBezierNodes`,this._boundFunction)}setOptions(e){super.setOptions(e);let t=!1;this.options.physics!==e.physics&&(t=!0),this.options=e,this.id=this.options.id,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.setupSupportNode(),this.connect(),t===!0&&(this.via.setOptions({physics:this.options.physics}),this.positionBezierNode())}connect(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.from===void 0||this.to===void 0||this.options.physics===!1||this.from.id===this.to.id?this.via.setOptions({physics:!1}):this.via.setOptions({physics:!0})}cleanup(){return this._body.emitter.off(`_repositionBezierNodes`,this._boundFunction),this.via===void 0?!1:(delete this._body.nodes[this.via.id],this.via=void 0,!0)}setupSupportNode(){if(this.via===void 0){let e=`edgeId:`+this.id,t=this._body.functions.createNode({id:e,shape:`circle`,physics:!0,hidden:!0});this._body.nodes[e]=t,this.via=t,this.via.parentEdgeId=this.id,this.positionBezierNode()}}positionBezierNode(){this.via!==void 0&&this.from!==void 0&&this.to!==void 0?(this.via.x=.5*(this.from.x+this.to.x),this.via.y=.5*(this.from.y+this.to.y)):this.via!==void 0&&(this.via.x=0,this.via.y=0)}_line(e,t,n){this._bezierCurve(e,t,n)}_getViaCoordinates(){return this.via}getViaNode(){return this.via}getPoint(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.via;if(this.from===this.to){let[t,n,r]=this._getCircleData(),i=2*Math.PI*(1-e);return{x:t+r*Math.sin(i),y:n+r-r*(1-Math.cos(i))}}else return{x:(1-e)**2*this.fromPoint.x+2*e*(1-e)*t.x+e**2*this.toPoint.x,y:(1-e)**2*this.fromPoint.y+2*e*(1-e)*t.y+e**2*this.toPoint.y}}_findBorderPosition(e,t){return this._findBorderPositionBezier(e,t,this.via)}_getDistanceToEdge(e,t,n,r,i,a){return this._getDistanceToBezierEdge(e,t,n,r,i,a,this.via)}},yY=class extends _Y{_line(e,t,n){this._bezierCurve(e,t,n)}getViaNode(){return this._getViaCoordinates()}_getViaCoordinates(){let e=this.options.smooth.roundness,t=this.options.smooth.type,n=Math.abs(this.from.x-this.to.x),r=Math.abs(this.from.y-this.to.y);if(t===`discrete`||t===`diagonalCross`){let i,a;i=a=n<=r?e*r:e*n,this.from.x>this.to.x&&(i=-i),this.from.y>=this.to.y&&(a=-a);let o=this.from.x+i,s=this.from.y+a;return t===`discrete`&&(n<=r?o=n<e*r?this.from.x:o:s=r<e*n?this.from.y:s),{x:o,y:s}}else if(t===`straightCross`){let t=(1-e)*n,i=(1-e)*r;return n<=r?(t=0,this.from.y<this.to.y&&(i=-i)):(this.from.x<this.to.x&&(t=-t),i=0),{x:this.to.x+t,y:this.to.y+i}}else if(t===`horizontal`){let t=(1-e)*n;return this.from.x<this.to.x&&(t=-t),{x:this.to.x+t,y:this.from.y}}else if(t===`vertical`){let t=(1-e)*r;return this.from.y<this.to.y&&(t=-t),{x:this.from.x,y:this.to.y+t}}else if(t===`curvedCW`){n=this.to.x-this.from.x,r=this.from.y-this.to.y;let t=Math.sqrt(n*n+r*r),i=Math.PI,a=(Math.atan2(r,n)+(e*.5+.5)*i)%(2*i);return{x:this.from.x+(e*.5+.5)*t*Math.sin(a),y:this.from.y+(e*.5+.5)*t*Math.cos(a)}}else if(t===`curvedCCW`){n=this.to.x-this.from.x,r=this.from.y-this.to.y;let t=Math.sqrt(n*n+r*r),i=Math.PI,a=(Math.atan2(r,n)+(-e*.5+.5)*i)%(2*i);return{x:this.from.x+(e*.5+.5)*t*Math.sin(a),y:this.from.y+(e*.5+.5)*t*Math.cos(a)}}else{let t,i;t=i=n<=r?e*r:e*n,this.from.x>this.to.x&&(t=-t),this.from.y>=this.to.y&&(i=-i);let a=this.from.x+t,o=this.from.y+i;return n<=r?a=this.from.x<=this.to.x?this.to.x<a?this.to.x:a:this.to.x>a?this.to.x:a:o=this.from.y>=this.to.y?this.to.y>o?this.to.y:o:this.to.y<o?this.to.y:o,{x:a,y:o}}}_findBorderPosition(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(e,t,n.via)}_getDistanceToEdge(e,t,n,r,i,a){let o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(e,t,n,r,i,a,o)}getPoint(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),n=e;return{x:(1-n)**2*this.fromPoint.x+2*n*(1-n)*t.x+n**2*this.toPoint.x,y:(1-n)**2*this.fromPoint.y+2*n*(1-n)*t.y+n**2*this.toPoint.y}}},bY=class extends _Y{_getDistanceToBezierEdge2(e,t,n,r,i,a,o,s){let c=1e9,l=e,u=t,d=[0,0,0,0];for(let f=1;f<10;f++){let p=.1*f;d[0]=(1-p)**3,d[1]=3*p*(1-p)**2,d[2]=3*p**2*(1-p),d[3]=p**3;let m=d[0]*e+d[1]*o.x+d[2]*s.x+d[3]*n,h=d[0]*t+d[1]*o.y+d[2]*s.y+d[3]*r;if(f>0){let e=this._getDistanceToLine(l,u,m,h,i,a);c=e<c?e:c}l=m,u=h}return c}},xY=class extends bY{_line(e,t,n){let r=n[0],i=n[1];this._bezierCurve(e,t,r,i)}_getViaCoordinates(){let e=this.from.x-this.to.x,t=this.from.y-this.to.y,n,r,i,a,o=this.options.smooth.roundness;return(Math.abs(e)>Math.abs(t)||this.options.smooth.forceDirection===!0||this.options.smooth.forceDirection===`horizontal`)&&this.options.smooth.forceDirection!==`vertical`?(r=this.from.y,a=this.to.y,n=this.from.x-o*e,i=this.to.x+o*e):(r=this.from.y-o*t,a=this.to.y+o*t,n=this.from.x,i=this.to.x),[{x:n,y:r},{x:i,y:a}]}getViaNode(){return this._getViaCoordinates()}_findBorderPosition(e,t){return this._findBorderPositionBezier(e,t)}_getDistanceToEdge(e,t,n,r,i,a){let[o,s]=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge2(e,t,n,r,i,a,o,s)}getPoint(e){let[t,n]=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),r=e,i=[(1-r)**3,3*r*(1-r)**2,3*r**2*(1-r),r**3];return{x:i[0]*this.fromPoint.x+i[1]*t.x+i[2]*n.x+i[3]*this.toPoint.x,y:i[0]*this.fromPoint.y+i[1]*t.y+i[2]*n.y+i[3]*this.toPoint.y}}},SY=class extends mY{_line(e,t){e.beginPath(),e.moveTo(this.fromPoint.x,this.fromPoint.y),e.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}getViaNode(){}getPoint(e){return{x:(1-e)*this.fromPoint.x+e*this.toPoint.x,y:(1-e)*this.fromPoint.y+e*this.toPoint.y}}_findBorderPosition(e,t){let n=this.to,r=this.from;e.id===this.from.id&&(n=this.from,r=this.to);let i=Math.atan2(n.y-r.y,n.x-r.x),a=n.x-r.x,o=n.y-r.y,s=Math.sqrt(a*a+o*o),c=(s-e.distanceToBorder(t,i))/s;return{x:(1-c)*r.x+c*n.x,y:(1-c)*r.y+c*n.y,t:0}}_getDistanceToEdge(e,t,n,r,i,a){return this._getDistanceToLine(e,t,n,r,i,a)}},CY=class e{constructor(e,t,n,r,i){if(t===void 0)throw Error(`No body provided`);this.options=eV(r),this.globalOptions=r,this.defaultOptions=i,this.body=t,this.imagelist=n,this.id=void 0,this.fromId=void 0,this.toId=void 0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void 0,this.to=void 0,this.edgeType=void 0,this.connected=!1,this.labelModule=new pJ(this.body,this.options,!0),this.setOptions(e)}setOptions(t){if(!t)return;let n=t.physics!==void 0&&this.options.physics!==t.physics||t.hidden!==void 0&&(this.options.hidden||!1)!==(t.hidden||!1)||t.from!==void 0&&this.options.from!==t.from||t.to!==void 0&&this.options.to!==t.to;e.parseOptions(this.options,t,!0,this.globalOptions),t.id!==void 0&&(this.id=t.id),t.from!==void 0&&(this.fromId=t.from),t.to!==void 0&&(this.toId=t.to),t.title!==void 0&&(this.title=t.title),t.value!==void 0&&(t.value=MK(t.value));let r=[t,this.options,this.defaultOptions];return this.chooser=Gq(`edge`,r),this.updateLabelModule(t),n=this.updateEdgeType()||n,this._setInteractionWidths(),this.connect(),n}static parseOptions(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=arguments.length>4&&arguments[4]!==void 0&&arguments[4];if(LB([`endPointOffset`,`arrowStrikethrough`,`id`,`from`,`hidden`,`hoverWidth`,`labelHighlightBold`,`length`,`line`,`opacity`,`physics`,`scaling`,`selectionWidth`,`selfReferenceSize`,`selfReference`,`to`,`title`,`value`,`width`,`font`,`chosen`,`widthConstraint`],e,t,n),t.endPointOffset!==void 0&&t.endPointOffset.from!==void 0&&(YU(t.endPointOffset.from)?e.endPointOffset.from=t.endPointOffset.from:(e.endPointOffset.from=r.endPointOffset.from===void 0?0:r.endPointOffset.from,console.error(`endPointOffset.from is not a valid number`))),t.endPointOffset!==void 0&&t.endPointOffset.to!==void 0&&(YU(t.endPointOffset.to)?e.endPointOffset.to=t.endPointOffset.to:(e.endPointOffset.to=r.endPointOffset.to===void 0?0:r.endPointOffset.to,console.error(`endPointOffset.to is not a valid number`))),qq(t.label)?e.label=t.label:qq(e.label)||(e.label=void 0),tV(e,t,`smooth`,r),tV(e,t,`shadow`,r),tV(e,t,`background`,r),t.dashes!==void 0&&t.dashes!==null?e.dashes=t.dashes:n===!0&&t.dashes===null&&(e.dashes=zI(r.dashes)),t.scaling!==void 0&&t.scaling!==null?(t.scaling.min!==void 0&&(e.scaling.min=t.scaling.min),t.scaling.max!==void 0&&(e.scaling.max=t.scaling.max),tV(e.scaling,t.scaling,`label`,r.scaling)):n===!0&&t.scaling===null&&(e.scaling=zI(r.scaling)),t.arrows!==void 0&&t.arrows!==null)if(typeof t.arrows==`string`){let n=t.arrows.toLowerCase();e.arrows.to.enabled=H(n).call(n,`to`)!=-1,e.arrows.middle.enabled=H(n).call(n,`middle`)!=-1,e.arrows.from.enabled=H(n).call(n,`from`)!=-1}else if(typeof t.arrows==`object`)tV(e.arrows,t.arrows,`to`,r.arrows),tV(e.arrows,t.arrows,`middle`,r.arrows),tV(e.arrows,t.arrows,`from`,r.arrows);else throw Error(`The arrow newOptions can only be an object or a string. Refer to the documentation. You used:`+sL(t.arrows));else n===!0&&t.arrows===null&&(e.arrows=zI(r.arrows));if(t.color!==void 0&&t.color!==null){let a=NB(t.color)?{color:t.color,highlight:t.color,hover:t.color,inherit:!1,opacity:1}:t.color,o=e.color;if(i)U(o,r.color,!1,n);else for(let e in o)Object.prototype.hasOwnProperty.call(o,e)&&delete o[e];if(NB(o))o.color=o,o.highlight=o,o.hover=o,o.inherit=!1,a.opacity===void 0&&(o.opacity=1);else{let e=!1;a.color!==void 0&&(o.color=a.color,e=!0),a.highlight!==void 0&&(o.highlight=a.highlight,e=!0),a.hover!==void 0&&(o.hover=a.hover,e=!0),a.inherit!==void 0&&(o.inherit=a.inherit),a.opacity!==void 0&&(o.opacity=Math.min(1,Math.max(0,a.opacity))),e===!0?o.inherit=!1:o.inherit===void 0&&(o.inherit=`from`)}}else n===!0&&t.color===null&&(e.color=eV(r.color));n===!0&&t.font===null&&(e.font=eV(r.font)),Object.prototype.hasOwnProperty.call(t,`selfReferenceSize`)&&(console.warn(`The selfReferenceSize property has been deprecated. Please use selfReference property instead. The selfReference can be set like thise selfReference:{size:30, angle:Math.PI / 4}`),e.selfReference.size=t.selfReferenceSize)}getFormattingValues(){let e=this.options.arrows.to===!0||this.options.arrows.to.enabled===!0,t=this.options.arrows.from===!0||this.options.arrows.from.enabled===!0,n=this.options.arrows.middle===!0||this.options.arrows.middle.enabled===!0,r=this.options.color.inherit,i={toArrow:e,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,toArrowSrc:this.options.arrows.to.src,toArrowImageWidth:this.options.arrows.to.imageWidth,toArrowImageHeight:this.options.arrows.to.imageHeight,middleArrow:n,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,middleArrowSrc:this.options.arrows.middle.src,middleArrowImageWidth:this.options.arrows.middle.imageWidth,middleArrowImageHeight:this.options.arrows.middle.imageHeight,fromArrow:t,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,fromArrowSrc:this.options.arrows.from.src,fromArrowImageWidth:this.options.arrows.from.imageWidth,fromArrowImageHeight:this.options.arrows.from.imageHeight,arrowStrikethrough:this.options.arrowStrikethrough,color:r?void 0:this.options.color.color,inheritsColor:r,opacity:this.options.color.opacity,hidden:this.options.hidden,length:this.options.length,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y,dashes:this.options.dashes,width:this.options.width,background:this.options.background.enabled,backgroundColor:this.options.background.color,backgroundSize:this.options.background.size,backgroundDashes:this.options.background.dashes};if(this.selected||this.hover)if(this.chooser===!0){if(this.selected){let e=this.options.selectionWidth;typeof e==`function`?i.width=e(i.width):typeof e==`number`&&(i.width+=e),i.width=Math.max(i.width,.3/this.body.view.scale),i.color=this.options.color.highlight,i.shadow=this.options.shadow.enabled}else if(this.hover){let e=this.options.hoverWidth;typeof e==`function`?i.width=e(i.width):typeof e==`number`&&(i.width+=e),i.width=Math.max(i.width,.3/this.body.view.scale),i.color=this.options.color.hover,i.shadow=this.options.shadow.enabled}}else typeof this.chooser==`function`&&(this.chooser(i,this.options.id,this.selected,this.hover),i.color!==void 0&&(i.inheritsColor=!1),i.shadow===!1&&(i.shadowColor!==this.options.shadow.color||i.shadowSize!==this.options.shadow.size||i.shadowX!==this.options.shadow.x||i.shadowY!==this.options.shadow.y)&&(i.shadow=!0));else i.shadow=this.options.shadow.enabled,i.width=Math.max(i.width,.3/this.body.view.scale);return i}updateLabelModule(e){let t=[e,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,t),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}updateEdgeType(){let e=this.options.smooth,t=!1,n=!0;return this.edgeType!==void 0&&((this.edgeType instanceof vY&&e.enabled===!0&&e.type===`dynamic`||this.edgeType instanceof xY&&e.enabled===!0&&e.type===`cubicBezier`||this.edgeType instanceof yY&&e.enabled===!0&&e.type!==`dynamic`&&e.type!==`cubicBezier`||this.edgeType instanceof SY&&e.type.enabled===!1)&&(n=!1),n===!0&&(t=this.cleanup())),n===!0?e.enabled===!0?e.type===`dynamic`?(t=!0,this.edgeType=new vY(this.options,this.body,this.labelModule)):e.type===`cubicBezier`?this.edgeType=new xY(this.options,this.body,this.labelModule):this.edgeType=new yY(this.options,this.body,this.labelModule):this.edgeType=new SY(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),t}connect(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=this.from!==void 0&&this.to!==void 0,this.connected===!0?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}disconnect(){this.from&&=(this.from.detachEdge(this),void 0),this.to&&=(this.to.detachEdge(this),void 0),this.connected=!1}getTitle(){return this.title}isSelected(){return this.selected}getValue(){return this.options.value}setValueRange(e,t,n){if(this.options.value!==void 0){let r=this.options.scaling.customScalingFunction(e,t,n,this.options.value),i=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){let e=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+r*e}this.options.width=this.options.scaling.min+r*i}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}_setInteractionWidths(){typeof this.options.hoverWidth==`function`?this.edgeType.hoverWidth=this.options.hoverWidth(this.options.width):this.edgeType.hoverWidth=this.options.hoverWidth+this.options.width,typeof this.options.selectionWidth==`function`?this.edgeType.selectionWidth=this.options.selectionWidth(this.options.width):this.edgeType.selectionWidth=this.options.selectionWidth+this.options.width}draw(e){let t=this.getFormattingValues();if(t.hidden)return;let n=this.edgeType.getViaNode();this.edgeType.drawLine(e,t,this.selected,this.hover,n),this.drawLabel(e,n)}drawArrows(e){let t=this.getFormattingValues();if(t.hidden)return;let n=this.edgeType.getViaNode(),r={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,t.fromArrow&&(r.from=this.edgeType.getArrowData(e,`from`,n,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.fromPoint=r.from.core),t.fromArrowSrc&&(r.from.image=this.imagelist.load(t.fromArrowSrc)),t.fromArrowImageWidth&&(r.from.imageWidth=t.fromArrowImageWidth),t.fromArrowImageHeight&&(r.from.imageHeight=t.fromArrowImageHeight)),t.toArrow&&(r.to=this.edgeType.getArrowData(e,`to`,n,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.toPoint=r.to.core),t.toArrowSrc&&(r.to.image=this.imagelist.load(t.toArrowSrc)),t.toArrowImageWidth&&(r.to.imageWidth=t.toArrowImageWidth),t.toArrowImageHeight&&(r.to.imageHeight=t.toArrowImageHeight)),t.middleArrow&&(r.middle=this.edgeType.getArrowData(e,`middle`,n,this.selected,this.hover,t),t.middleArrowSrc&&(r.middle.image=this.imagelist.load(t.middleArrowSrc)),t.middleArrowImageWidth&&(r.middle.imageWidth=t.middleArrowImageWidth),t.middleArrowImageHeight&&(r.middle.imageHeight=t.middleArrowImageHeight)),t.fromArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,r.from),t.middleArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,r.middle),t.toArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,r.to)}drawLabel(e,t){if(this.options.label!==void 0){let n=this.from,r=this.to;this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(e,this.selected,this.hover);let i;if(n.id!=r.id){this.labelModule.pointToSelf=!1,i=this.edgeType.getPoint(.5,t),e.save();let n=this._getRotation(e);n.angle!=0&&(e.translate(n.x,n.y),e.rotate(n.angle)),this.labelModule.draw(e,i.x,i.y,this.selected,this.hover),e.restore()}else{this.labelModule.pointToSelf=!0;let t=Jq(e,this.options.selfReference.angle,this.options.selfReference.size,n);i=this._pointOnCircle(t.x,t.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(e,i.x,i.y,this.selected,this.hover)}}}getItemsOnPoint(e){let t=[];if(this.labelModule.visible()){let n=this._getRotation();Kq(this.labelModule.getSize(),e,n)&&t.push({edgeId:this.id,labelId:0})}let n={left:e.x,top:e.y};return this.isOverlappingWith(n)&&t.push({edgeId:this.id}),t}isOverlappingWith(e){if(this.connected){let t=this.from.x,n=this.from.y,r=this.to.x,i=this.to.y,a=e.left,o=e.top;return this.edgeType.getDistanceToEdge(t,n,r,i,a,o)<10}else return!1}_getRotation(e){let t=this.edgeType.getViaNode(),n=this.edgeType.getPoint(.5,t);e!==void 0&&this.labelModule.calculateLabelSize(e,this.selected,this.hover,n.x,n.y);let r={x:n.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible()||this.options.font.align===`horizontal`)return r;let i=this.from.y-this.to.y,a=this.from.x-this.to.x,o=Math.atan2(i,a);return(o<-1&&a<0||o>0&&a<0)&&(o+=Math.PI),r.angle=o,r}_pointOnCircle(e,t,n,r){return{x:e+n*Math.cos(r),y:t-n*Math.sin(r)}}select(){this.selected=!0}unselect(){this.selected=!1}cleanup(){return this.edgeType.cleanup()}remove(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}endPointsValid(){return this.body.nodes[this.fromId]!==void 0&&this.body.nodes[this.toId]!==void 0}},wY=class{constructor(e,t,n){var r;this.body=e,this.images=t,this.groups=n,this.body.functions.createEdge=B(r=this.create).call(r,this),this.edgesListeners={add:(e,t)=>{this.add(t.items)},update:(e,t)=>{this.update(t.items)},remove:(e,t)=>{this.remove(t.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:`arrow`},middle:{enabled:!1,scaleFactor:1,type:`arrow`},from:{enabled:!1,scaleFactor:1,type:`arrow`}},endPointOffset:{from:0,to:0},arrowStrikethrough:!0,color:{color:`#848484`,highlight:`#848484`,hover:`#848484`,inherit:`from`,opacity:1},dashes:!1,font:{color:`#343434`,size:14,face:`arial`,background:`none`,strokeWidth:2,strokeColor:`#ffffff`,align:`horizontal`,multi:!1,vadjust:0,bold:{mod:`bold`},boldital:{mod:`bold italic`},ital:{mod:`italic`},mono:{mod:``,size:15,face:`courier new`,vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(e,t,n,r){if(t===e)return .5;{let n=1/(t-e);return Math.max(0,(r-e)*n)}}},selectionWidth:1.5,selfReference:{size:20,angle:Math.PI/4,renderBehindTheNode:!0},shadow:{enabled:!1,color:`rgba(0,0,0,0.5)`,size:10,x:5,y:5},background:{enabled:!1,color:`rgba(111,111,111,1)`,size:10,dashes:!1},smooth:{enabled:!0,type:`dynamic`,forceDirection:`none`,roundness:.5},title:void 0,width:1,value:void 0},U(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e=this,t,n;this.body.emitter.on(`_forceDisableDynamicCurves`,function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;t===`dynamic`&&(t=`continuous`);let r=!1;for(let n in e.body.edges)if(Object.prototype.hasOwnProperty.call(e.body.edges,n)){let i=e.body.edges[n],a=e.body.data.edges.get(n);if(a!=null){let e=a.smooth;e!==void 0&&e.enabled===!0&&e.type===`dynamic`&&(t===void 0?i.setOptions({smooth:!1}):i.setOptions({smooth:{type:t}}),r=!0)}}n===!0&&r===!0&&e.body.emitter.emit(`_dataChanged`)}),this.body.emitter.on(`_dataUpdated`,()=>{this.reconnectEdges()}),this.body.emitter.on(`refreshEdges`,B(t=this.refresh).call(t,this)),this.body.emitter.on(`refresh`,B(n=this.refresh).call(n,this)),this.body.emitter.on(`destroy`,()=>{W(this.edgesListeners,(e,t)=>{this.body.data.edges&&this.body.data.edges.off(t,e)}),delete this.body.functions.createEdge,delete this.edgesListeners.add,delete this.edgesListeners.update,delete this.edgesListeners.remove,delete this.edgesListeners})}setOptions(e){if(e!==void 0){CY.parseOptions(this.options,e,!0,this.defaultOptions,!0);let t=!1;if(e.smooth!==void 0)for(let e in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,e)&&(t=this.body.edges[e].updateEdgeType()||t);if(e.font!==void 0)for(let e in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,e)&&this.body.edges[e].updateLabelModule();(e.hidden!==void 0||e.physics!==void 0||t===!0)&&this.body.emitter.emit(`_dataChanged`)}}setData(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.body.data.edges;if(xC(`id`,e))this.body.data.edges=e;else if(hM(e))this.body.data.edges=new yC,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new yC;else throw TypeError(`Array or DataSet expected`);if(n&&W(this.edgesListeners,(e,t)=>{n.off(t,e)}),this.body.edges={},this.body.data.edges){W(this.edgesListeners,(e,t)=>{this.body.data.edges.on(t,e)});let e=this.body.data.edges.getIds();this.add(e,!0)}this.body.emitter.emit(`_adjustEdgesForHierarchicalLayout`),t===!1&&this.body.emitter.emit(`_dataChanged`)}add(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.body.edges,r=this.body.data.edges;for(let t=0;t<e.length;t++){let i=e[t],a=n[i];a&&a.disconnect();let o=r.get(i,{showInternalIds:!0});n[i]=this.create(o)}this.body.emitter.emit(`_adjustEdgesForHierarchicalLayout`),t===!1&&this.body.emitter.emit(`_dataChanged`)}update(e){let t=this.body.edges,n=this.body.data.edges,r=!1;for(let i=0;i<e.length;i++){let a=e[i],o=n.get(a),s=t[a];s===void 0?(this.body.edges[a]=this.create(o),r=!0):(s.disconnect(),r=s.setOptions(o)||r,s.connect())}r===!0?(this.body.emitter.emit(`_adjustEdgesForHierarchicalLayout`),this.body.emitter.emit(`_dataChanged`)):this.body.emitter.emit(`_dataUpdated`)}remove(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.length===0)return;let n=this.body.edges;W(e,e=>{let t=n[e];t!==void 0&&t.remove()}),t&&this.body.emitter.emit(`_dataChanged`)}refresh(){W(this.body.edges,(e,t)=>{let n=this.body.data.edges.get(t);n!==void 0&&e.setOptions(n)})}create(e){return new CY(e,this.body,this.images,this.options,this.defaultOptions)}reconnectEdges(){let e,t=this.body.nodes,n=this.body.edges;for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e].edges=[]);for(e in n)if(Object.prototype.hasOwnProperty.call(n,e)){let t=n[e];t.from=null,t.to=null,t.connect()}}getConnectedNodes(e){let t=[];if(this.body.edges[e]!==void 0){let n=this.body.edges[e];n.fromId!==void 0&&t.push(n.fromId),n.toId!==void 0&&t.push(n.toId)}return t}_updateState(){this._addMissingEdges(),this._removeInvalidEdges()}_removeInvalidEdges(){let e=[];W(this.body.edges,(t,n)=>{let r=this.body.nodes[t.toId],i=this.body.nodes[t.fromId];r!==void 0&&r.isCluster===!0||i!==void 0&&i.isCluster===!0||(r===void 0||i===void 0)&&e.push(n)}),this.remove(e,!1)}_addMissingEdges(){let e=this.body.data.edges;if(e==null)return;let t=this.body.edges,n=[];V(e).call(e,(e,r)=>{t[r]===void 0&&n.push(r)}),this.add(n,!0)}},TY=class{constructor(e,t,n){this.body=e,this.physicsBody=t,this.setOptions(n),this._rng=bB(`BARNES HUT SOLVER`)}setOptions(e){this.options=e,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}solve(){if(this.options.gravitationalConstant!==0&&this.physicsBody.physicsNodeIndices.length>0){let e,t=this.body.nodes,n=this.physicsBody.physicsNodeIndices,r=n.length,i=this._formBarnesHutTree(t,n);this.barnesHutTree=i;for(let a=0;a<r;a++)e=t[n[a]],e.options.mass>0&&this._getForceContributions(i.root,e)}}_getForceContributions(e,t){this._getForceContribution(e.children.NW,t),this._getForceContribution(e.children.NE,t),this._getForceContribution(e.children.SW,t),this._getForceContribution(e.children.SE,t)}_getForceContribution(e,t){if(e.childrenCount>0){let n=e.centerOfMass.x-t.x,r=e.centerOfMass.y-t.y,i=Math.sqrt(n*n+r*r);i*e.calcSize>this.thetaInversed?this._calculateForces(i,n,r,t,e):e.childrenCount===4?this._getForceContributions(e,t):e.children.data.id!=t.id&&this._calculateForces(i,n,r,t,e)}}_calculateForces(e,t,n,r,i){e===0&&(e=.1,t=e),this.overlapAvoidanceFactor<1&&r.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*r.shape.radius,e-r.shape.radius));let a=this.options.gravitationalConstant*i.mass*r.options.mass/e**3,o=t*a,s=n*a;this.physicsBody.forces[r.id].x+=o,this.physicsBody.forces[r.id].y+=s}_formBarnesHutTree(e,t){let n,r=t.length,i=e[t[0]].x,a=e[t[0]].y,o=e[t[0]].x,s=e[t[0]].y;for(let n=1;n<r;n++){let r=e[t[n]],c=r.x,l=r.y;r.options.mass>0&&(c<i&&(i=c),c>o&&(o=c),l<a&&(a=l),l>s&&(s=l))}let c=Math.abs(o-i)-Math.abs(s-a);c>0?(a-=.5*c,s+=.5*c):(i+=.5*c,o-=.5*c);let l=Math.max(1e-5,Math.abs(o-i)),u=.5*l,d=.5*(i+o),f=.5*(a+s),p={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:d-u,maxX:d+u,minY:f-u,maxY:f+u},size:l,calcSize:1/l,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(p.root);for(let i=0;i<r;i++)n=e[t[i]],n.options.mass>0&&this._placeInTree(p.root,n);return p}_updateBranchMass(e,t){let n=e.centerOfMass,r=e.mass+t.options.mass,i=1/r;n.x=n.x*e.mass+t.x*t.options.mass,n.x*=i,n.y=n.y*e.mass+t.y*t.options.mass,n.y*=i,e.mass=r;let a=Math.max(Math.max(t.height,t.radius),t.width);e.maxWidth=e.maxWidth<a?a:e.maxWidth}_placeInTree(e,t,n){(n!=1||n===void 0)&&this._updateBranchMass(e,t);let r=e.children.NW.range,i;i=r.maxX>t.x?r.maxY>t.y?`NW`:`SW`:r.maxY>t.y?`NE`:`SE`,this._placeInRegion(e,t,i)}_placeInRegion(e,t,n){let r=e.children[n];switch(r.childrenCount){case 0:r.children.data=t,r.childrenCount=1,this._updateBranchMass(r,t);break;case 1:r.children.data.x===t.x&&r.children.data.y===t.y?(t.x+=this._rng(),t.y+=this._rng()):(this._splitBranch(r),this._placeInTree(r,t));break;case 4:this._placeInTree(r,t);break}}_splitBranch(e){let t=null;e.childrenCount===1&&(t=e.children.data,e.mass=0,e.centerOfMass.x=0,e.centerOfMass.y=0),e.childrenCount=4,e.children.data=null,this._insertRegion(e,`NW`),this._insertRegion(e,`NE`),this._insertRegion(e,`SW`),this._insertRegion(e,`SE`),t!=null&&this._placeInTree(e,t)}_insertRegion(e,t){let n,r,i,a,o=.5*e.size;switch(t){case`NW`:n=e.range.minX,r=e.range.minX+o,i=e.range.minY,a=e.range.minY+o;break;case`NE`:n=e.range.minX+o,r=e.range.maxX,i=e.range.minY,a=e.range.minY+o;break;case`SW`:n=e.range.minX,r=e.range.minX+o,i=e.range.minY+o,a=e.range.maxY;break;case`SE`:n=e.range.minX+o,r=e.range.maxX,i=e.range.minY+o,a=e.range.maxY;break}e.children[t]={centerOfMass:{x:0,y:0},mass:0,range:{minX:n,maxX:r,minY:i,maxY:a},size:.5*e.size,calcSize:2*e.calcSize,children:{data:null},maxWidth:0,level:e.level+1,childrenCount:0}}_debug(e,t){this.barnesHutTree!==void 0&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,t))}_drawBranch(e,t,n){n===void 0&&(n=`#FF0000`),e.childrenCount===4&&(this._drawBranch(e.children.NW,t),this._drawBranch(e.children.NE,t),this._drawBranch(e.children.SE,t),this._drawBranch(e.children.SW,t)),t.strokeStyle=n,t.beginPath(),t.moveTo(e.range.minX,e.range.minY),t.lineTo(e.range.maxX,e.range.minY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.minY),t.lineTo(e.range.maxX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.maxY),t.lineTo(e.range.minX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.minX,e.range.maxY),t.lineTo(e.range.minX,e.range.minY),t.stroke()}},EY=class{constructor(e,t,n){this._rng=bB(`REPULSION SOLVER`),this.body=e,this.physicsBody=t,this.setOptions(n)}setOptions(e){this.options=e}solve(){let e,t,n,r,i,a,o,s,c=this.body.nodes,l=this.physicsBody.physicsNodeIndices,u=this.physicsBody.forces,d=this.options.nodeDistance,f=-2/3/d;for(let p=0;p<l.length-1;p++){o=c[l[p]];for(let m=p+1;m<l.length;m++)s=c[l[m]],e=s.x-o.x,t=s.y-o.y,n=Math.sqrt(e*e+t*t),n===0&&(n=.1*this._rng(),e=n),n<2*d&&(a=n<.5*d?1:f*n+1.3333333333333333,a/=n,r=e*a,i=t*a,u[o.id].x-=r,u[o.id].y-=i,u[s.id].x+=r,u[s.id].y+=i)}}},DY=class{constructor(e,t,n){this.body=e,this.physicsBody=t,this.setOptions(n)}setOptions(e){this.options=e,this.overlapAvoidanceFactor=Math.max(0,Math.min(1,this.options.avoidOverlap||0))}solve(){let e=this.body.nodes,t=this.physicsBody.physicsNodeIndices,n=this.physicsBody.forces,r=this.options.nodeDistance;for(let i=0;i<t.length-1;i++){let a=e[t[i]];for(let o=i+1;o<t.length;o++){let i=e[t[o]];if(a.level===i.level){let e=r+this.overlapAvoidanceFactor*((a.shape.radius||0)/2+(i.shape.radius||0)/2),t=i.x-a.x,o=i.y-a.y,s=Math.sqrt(t*t+o*o),c=.05,l;l=s<e?-((c*s)**2)+(c*e)**2:0,s!==0&&(l/=s);let u=t*l,d=o*l;n[a.id].x-=u,n[a.id].y-=d,n[i.id].x+=u,n[i.id].y+=d}}}}},OY=class{constructor(e,t,n){this.body=e,this.physicsBody=t,this.setOptions(n)}setOptions(e){this.options=e}solve(){let e,t,n=this.physicsBody.physicsEdgeIndices,r=this.body.edges,i,a,o;for(let s=0;s<n.length;s++)t=r[n[s]],t.connected===!0&&t.toId!==t.fromId&&this.body.nodes[t.toId]!==void 0&&this.body.nodes[t.fromId]!==void 0&&(t.edgeType.via===void 0?(e=t.options.length===void 0?this.options.springLength*1.5:t.options.length,this._calculateSpringForce(t.from,t.to,e)):(e=t.options.length===void 0?this.options.springLength:t.options.length,i=t.to,a=t.edgeType.via,o=t.from,this._calculateSpringForce(i,a,.5*e),this._calculateSpringForce(a,o,.5*e)))}_calculateSpringForce(e,t,n){let r=e.x-t.x,i=e.y-t.y,a=Math.max(Math.sqrt(r*r+i*i),.01),o=this.options.springConstant*(n-a)/a,s=r*o,c=i*o;this.physicsBody.forces[e.id]!==void 0&&(this.physicsBody.forces[e.id].x+=s,this.physicsBody.forces[e.id].y+=c),this.physicsBody.forces[t.id]!==void 0&&(this.physicsBody.forces[t.id].x-=s,this.physicsBody.forces[t.id].y-=c)}},kY=class{constructor(e,t,n){this.body=e,this.physicsBody=t,this.setOptions(n)}setOptions(e){this.options=e}solve(){let e,t,n,r,i,a,o,s,c=this.body.edges,l=.5,u=this.physicsBody.physicsEdgeIndices,d=this.physicsBody.physicsNodeIndices,f=this.physicsBody.forces;for(let e=0;e<d.length;e++){let t=d[e];f[t].springFx=0,f[t].springFy=0}for(let d=0;d<u.length;d++)t=c[u[d]],t.connected===!0&&(e=t.options.length===void 0?this.options.springLength:t.options.length,n=t.from.x-t.to.x,r=t.from.y-t.to.y,s=Math.sqrt(n*n+r*r),s=s===0?.01:s,o=this.options.springConstant*(e-s)/s,i=n*o,a=r*o,t.to.level==t.from.level?(f[t.toId]!==void 0&&(f[t.toId].x-=l*i,f[t.toId].y-=l*a),f[t.fromId]!==void 0&&(f[t.fromId].x+=l*i,f[t.fromId].y+=l*a)):(f[t.toId]!==void 0&&(f[t.toId].springFx-=i,f[t.toId].springFy-=a),f[t.fromId]!==void 0&&(f[t.fromId].springFx+=i,f[t.fromId].springFy+=a)));o=1;let p,m;for(let e=0;e<d.length;e++){let t=d[e];p=Math.min(o,Math.max(-o,f[t].springFx)),m=Math.min(o,Math.max(-o,f[t].springFy)),f[t].x+=p,f[t].y+=m}let h=0,g=0;for(let e=0;e<d.length;e++){let t=d[e];h+=f[t].x,g+=f[t].y}let _=h/d.length,v=g/d.length;for(let e=0;e<d.length;e++){let t=d[e];f[t].x-=_,f[t].y-=v}}},AY=class{constructor(e,t,n){this.body=e,this.physicsBody=t,this.setOptions(n)}setOptions(e){this.options=e}solve(){let e,t,n,r,i=this.body.nodes,a=this.physicsBody.physicsNodeIndices,o=this.physicsBody.forces;for(let s=0;s<a.length;s++)r=i[a[s]],e=-r.x,t=-r.y,n=Math.sqrt(e*e+t*t),this._calculateForces(n,e,t,o,r)}_calculateForces(e,t,n,r,i){let a=e===0?0:this.options.centralGravity/e;r[i.id].x=t*a,r[i.id].y=n*a}},jY=class extends TY{constructor(e,t,n){super(e,t,n),this._rng=bB(`FORCE ATLAS 2 BASED REPULSION SOLVER`)}_calculateForces(e,t,n,r,i){e===0&&(e=.1*this._rng(),t=e),this.overlapAvoidanceFactor<1&&r.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*r.shape.radius,e-r.shape.radius));let a=r.edges.length+1,o=this.options.gravitationalConstant*i.mass*r.options.mass*a/e**2,s=t*o,c=n*o;this.physicsBody.forces[r.id].x+=s,this.physicsBody.forces[r.id].y+=c}},MY=class extends AY{_calculateForces(e,t,n,r,i){if(e>0){let e=i.edges.length+1,a=this.options.centralGravity*e*i.options.mass;r[i.id].x=t*a,r[i.id].y=n*a}}},NY=class{constructor(e){this.body=e,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void 0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this.startedStabilization=!1,this.stabilizationIterations=0,this.ready=!1,this.options={},this.defaultOptions={enabled:!0,barnesHut:{theta:.5,gravitationalConstant:-2e3,centralGravity:.3,springLength:95,springConstant:.04,damping:.09,avoidOverlap:0},forceAtlas2Based:{theta:.5,gravitationalConstant:-50,centralGravity:.01,springConstant:.08,springLength:100,damping:.4,avoidOverlap:0},repulsion:{centralGravity:.2,springLength:200,springConstant:.05,nodeDistance:100,damping:.09,avoidOverlap:0},hierarchicalRepulsion:{centralGravity:0,springLength:100,springConstant:.01,nodeDistance:120,damping:.09},maxVelocity:50,minVelocity:.75,solver:`barnesHut`,stabilization:{enabled:!0,iterations:1e3,updateInterval:50,onlyDynamicEdges:!1,fit:!0},timestep:.5,adaptiveTimestep:!0,wind:{x:0,y:0}},QE(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}bindEventListeners(){this.body.emitter.on(`initPhysics`,()=>{this.initPhysics()}),this.body.emitter.on(`_layoutFailed`,()=>{this.layoutFailed=!0}),this.body.emitter.on(`resetPhysics`,()=>{this.stopSimulation(),this.ready=!1}),this.body.emitter.on(`disablePhysics`,()=>{this.physicsEnabled=!1,this.stopSimulation()}),this.body.emitter.on(`restorePhysics`,()=>{this.setOptions(this.options),this.ready===!0&&this.startSimulation()}),this.body.emitter.on(`startSimulation`,()=>{this.ready===!0&&this.startSimulation()}),this.body.emitter.on(`stopSimulation`,()=>{this.stopSimulation()}),this.body.emitter.on(`destroy`,()=>{this.stopSimulation(!1),this.body.emitter.off()}),this.body.emitter.on(`_dataChanged`,()=>{this.updatePhysicsData()})}setOptions(e){if(e!==void 0)if(e===!1)this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation();else if(e===!0)this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation();else{this.physicsEnabled=!0,RB([`stabilization`],this.options,e),tV(this.options,e,`stabilization`),e.enabled===void 0&&(this.options.enabled=!0),this.options.enabled===!1&&(this.physicsEnabled=!1,this.stopSimulation());let t=this.options.wind;t&&typeof t!=`function`&&((typeof t.x!=`number`||NU(t.x))&&(t.x=0),(typeof t.y!=`number`||NU(t.y))&&(t.y=0)),this.timestep=this.options.timestep}this.init()}init(){let e;this.options.solver===`forceAtlas2Based`?(e=this.options.forceAtlas2Based,this.nodesSolver=new jY(this.body,this.physicsBody,e),this.edgesSolver=new OY(this.body,this.physicsBody,e),this.gravitySolver=new MY(this.body,this.physicsBody,e)):this.options.solver===`repulsion`?(e=this.options.repulsion,this.nodesSolver=new EY(this.body,this.physicsBody,e),this.edgesSolver=new OY(this.body,this.physicsBody,e),this.gravitySolver=new AY(this.body,this.physicsBody,e)):this.options.solver===`hierarchicalRepulsion`?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new DY(this.body,this.physicsBody,e),this.edgesSolver=new kY(this.body,this.physicsBody,e),this.gravitySolver=new AY(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new TY(this.body,this.physicsBody,e),this.edgesSolver=new OY(this.body,this.physicsBody,e),this.gravitySolver=new AY(this.body,this.physicsBody,e)),this.modelOptions=e}initPhysics(){this.physicsEnabled===!0&&this.options.enabled===!0?this.options.stabilization.enabled===!0?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit(`fit`,{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit(`fit`))}startSimulation(){if(this.physicsEnabled===!0&&this.options.enabled===!0){if(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit(`_resizeNodes`),this.viewFunction===void 0){var e;this.viewFunction=B(e=this.simulationStep).call(e,this),this.body.emitter.on(`initRedraw`,this.viewFunction),this.body.emitter.emit(`_startRendering`)}}else this.body.emitter.emit(`_redraw`)}stopSimulation(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.stabilized=!0,e===!0&&this._emitStabilized(),this.viewFunction!==void 0&&(this.body.emitter.off(`initRedraw`,this.viewFunction),this.viewFunction=void 0,e===!0&&this.body.emitter.emit(`_stopRendering`))}simulationStep(){let e=rN();this.physicsTick(),(rN()-e<.4*this.simulationInterval||this.runDoubleSpeed===!0)&&this.stabilized===!1&&(this.physicsTick(),this.runDoubleSpeed=!0),this.stabilized===!0&&this.stopSimulation()}_emitStabilized(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||this.startedStabilization===!0)&&ML(()=>{this.body.emitter.emit(`stabilized`,{iterations:e}),this.startedStabilization=!1,this.stabilizationIterations=0},0)}physicsStep(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}adjustTimeStep(){let e=1.2;this._evaluateStepQuality()===!0?this.timestep=e*this.timestep:this.timestep/e<this.options.timestep?this.timestep=this.options.timestep:(this.adaptiveCounter=-1,this.timestep=Math.max(this.options.timestep,this.timestep/e))}physicsTick(){this._startStabilizing(),this.stabilized!==!0&&(this.adaptiveTimestep===!0&&this.adaptiveTimestepEnabled===!0?(this.adaptiveCounter%this.adaptiveInterval===0?(this.timestep=2*this.timestep,this.physicsStep(),this.revert(),this.timestep=.5*this.timestep,this.physicsStep(),this.physicsStep(),this.adjustTimeStep()):this.physicsStep(),this.adaptiveCounter+=1):(this.timestep=this.options.timestep,this.physicsStep()),this.stabilized===!0&&this.revert(),this.stabilizationIterations++)}updatePhysicsData(){this.physicsBody.forces={},this.physicsBody.physicsNodeIndices=[],this.physicsBody.physicsEdgeIndices=[];let e=this.body.nodes,t=this.body.edges;for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&e[t].options.physics===!0&&this.physicsBody.physicsNodeIndices.push(e[t].id);for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&t[e].options.physics===!0&&this.physicsBody.physicsEdgeIndices.push(t[e].id);for(let e=0;e<this.physicsBody.physicsNodeIndices.length;e++){let t=this.physicsBody.physicsNodeIndices[e];this.physicsBody.forces[t]={x:0,y:0},this.physicsBody.velocities[t]===void 0&&(this.physicsBody.velocities[t]={x:0,y:0})}for(let t in this.physicsBody.velocities)e[t]===void 0&&delete this.physicsBody.velocities[t]}revert(){let e=WM(this.previousStates),t=this.body.nodes,n=this.physicsBody.velocities;this.referenceState={};for(let r=0;r<e.length;r++){let i=e[r];t[i]===void 0?delete this.previousStates[i]:t[i].options.physics===!0&&(this.referenceState[i]={positions:{x:t[i].x,y:t[i].y}},n[i].x=this.previousStates[i].vx,n[i].y=this.previousStates[i].vy,t[i].x=this.previousStates[i].x,t[i].y=this.previousStates[i].y)}}_evaluateStepQuality(){let e,t,n,r=this.body.nodes,i=this.referenceState;for(let a in this.referenceState)if(Object.prototype.hasOwnProperty.call(this.referenceState,a)&&r[a]!==void 0&&(e=r[a].x-i[a].positions.x,t=r[a].y-i[a].positions.y,n=Math.sqrt(e**2+t**2),n>.3))return!1;return!0}moveNodes(){let e=this.physicsBody.physicsNodeIndices,t=0,n=0;for(let r=0;r<e.length;r++){let i=e[r],a=this._performStep(i);t=Math.max(t,a),n+=a}this.adaptiveTimestepEnabled=n/e.length<5,this.stabilized=t<this.options.minVelocity}calculateComponentVelocity(e,t,n){let r=(t-this.modelOptions.damping*e)/n;e+=r*this.timestep;let i=this.options.maxVelocity||1e9;return Math.abs(e)>i&&(e=e>0?i:-i),e}_performStep(e){let t=this.body.nodes[e],n=this.physicsBody.forces[e];if(this.options.wind)if(typeof this.options.wind==`function`){let t=this.options.wind(e);t&&typeof t==`object`&&(typeof t.x==`number`&&!NU(t.x)&&(n.x+=t.x),typeof t.y==`number`&&!NU(t.y)&&(n.y+=t.y))}else n.x+=this.options.wind.x,n.y+=this.options.wind.y;let r=this.physicsBody.velocities[e];return this.previousStates[e]={x:t.x,y:t.y,vx:r.x,vy:r.y},t.options.fixed.x===!1?(r.x=this.calculateComponentVelocity(r.x,n.x,t.options.mass),t.x+=r.x*this.timestep):(n.x=0,r.x=0),t.options.fixed.y===!1?(r.y=this.calculateComponentVelocity(r.y,n.y,t.options.mass),t.y+=r.y*this.timestep):(n.y=0,r.y=0),Math.sqrt(r.x**2+r.y**2)}_freezeNodes(){let e=this.body.nodes;for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].x&&e[t].y){let n=e[t].options.fixed;this.freezeCache[t]={x:n.x,y:n.y},n.x=!0,n.y=!0}}_restoreFrozenNodes(){let e=this.body.nodes;for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.freezeCache[t]!==void 0&&(e[t].options.fixed.x=this.freezeCache[t].x,e[t].options.fixed.y=this.freezeCache[t].y);this.freezeCache={}}stabilize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.stabilization.iterations;if(typeof e!=`number`&&(e=this.options.stabilization.iterations,console.error(`The stabilize method needs a numeric amount of iterations. Switching to default: `,e)),this.physicsBody.physicsNodeIndices.length===0){this.ready=!0;return}this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit(`_resizeNodes`),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit(`_blockRedraw`),this.targetIterations=e,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,ML(()=>this._stabilizationBatch(),0)}_startStabilizing(){return this.startedStabilization===!0?!1:(this.body.emitter.emit(`startStabilizing`),this.startedStabilization=!0,!0)}_stabilizationBatch(){let e=()=>this.stabilized===!1&&this.stabilizationIterations<this.targetIterations,t=()=>{this.body.emitter.emit(`stabilizationProgress`,{iterations:this.stabilizationIterations,total:this.targetIterations})};this._startStabilizing()&&t();let n=0;for(;e()&&n<this.options.stabilization.updateInterval;)this.physicsTick(),n++;if(t(),e()){var r;ML(B(r=this._stabilizationBatch).call(r,this),0)}else this._finalizeStabilization()}_finalizeStabilization(){this.body.emitter.emit(`_allowRedraw`),this.options.stabilization.fit===!0&&this.body.emitter.emit(`fit`),this.options.stabilization.onlyDynamicEdges===!0&&this._restoreFrozenNodes(),this.body.emitter.emit(`stabilizationIterationsDone`),this.body.emitter.emit(`_requestRedraw`),this.stabilized===!0?this._emitStabilized():this.startSimulation(),this.ready=!0}_drawForces(e){for(let t=0;t<this.physicsBody.physicsNodeIndices.length;t++){let n=this.physicsBody.physicsNodeIndices[t],r=this.body.nodes[n],i=this.physicsBody.forces[n],a=Math.sqrt(i.x**2+i.x**2),o=Math.min(Math.max(5,a),15),s=3*o,c=YB((180-Math.min(1,Math.max(0,.03*a))*180)/360,1,1),l={x:r.x+20*i.x,y:r.y+20*i.y};e.lineWidth=o,e.strokeStyle=c,e.beginPath(),e.moveTo(r.x,r.y),e.lineTo(l.x,l.y),e.stroke();let u=Math.atan2(i.y,i.x);e.fillStyle=c,dY.draw(e,{type:`arrow`,point:l,angle:u,length:s}),ZL(e).call(e)}}},PY=[];for(let e=0;e<256;++e)PY.push((e+256).toString(16).slice(1));function FY(e,t=0){return(PY[e[t+0]]+PY[e[t+1]]+PY[e[t+2]]+PY[e[t+3]]+`-`+PY[e[t+4]]+PY[e[t+5]]+`-`+PY[e[t+6]]+PY[e[t+7]]+`-`+PY[e[t+8]]+PY[e[t+9]]+`-`+PY[e[t+10]]+PY[e[t+11]]+PY[e[t+12]]+PY[e[t+13]]+PY[e[t+14]]+PY[e[t+15]]).toLowerCase()}var IY=new Uint8Array(16);function LY(){return crypto.getRandomValues(IY)}function RY(e,t,n){return crypto.randomUUID?crypto.randomUUID():zY(e)}function zY(e,t,n){e||={};let r=e.random??e.rng?.()??LY();if(r.length<16)throw Error(`Random bytes length must be >= 16`);return r[6]=r[6]&15|64,r[8]=r[8]&63|128,FY(r)}var BY=class{static getRange(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=1e9,r=-1e9,i=1e9,a=-1e9,o;if(t.length>0)for(let s=0;s<t.length;s++)o=e[t[s]],i>o.shape.boundingBox.left&&(i=o.shape.boundingBox.left),a<o.shape.boundingBox.right&&(a=o.shape.boundingBox.right),n>o.shape.boundingBox.top&&(n=o.shape.boundingBox.top),r<o.shape.boundingBox.bottom&&(r=o.shape.boundingBox.bottom);return i===1e9&&a===-1e9&&n===1e9&&r===-1e9&&(n=0,r=0,i=0,a=0),{minX:i,maxX:a,minY:n,maxY:r}}static getRangeCore(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=1e9,r=-1e9,i=1e9,a=-1e9,o;if(t.length>0)for(let s=0;s<t.length;s++)o=e[t[s]],i>o.x&&(i=o.x),a<o.x&&(a=o.x),n>o.y&&(n=o.y),r<o.y&&(r=o.y);return i===1e9&&a===-1e9&&n===1e9&&r===-1e9&&(n=0,r=0,i=0,a=0),{minX:i,maxX:a,minY:n,maxY:r}}static findCenter(e){return{x:.5*(e.maxX+e.minX),y:.5*(e.maxY+e.minY)}}static cloneOptions(e,t){let n={};return t===void 0||t===`node`?(U(n,e.options,!0),n.x=e.x,n.y=e.y,n.amountOfConnections=e.edges.length):U(n,e.options,!0),n}},VY=class extends LJ{constructor(e,t,n,r,i,a){super(e,t,n,r,i,a),this.isCluster=!0,this.containedNodes={},this.containedEdges={}}_openChildCluster(e){let t=this.body.nodes[e];if(this.containedNodes[e]===void 0)throw Error(`node with id: `+e+` not in current cluster`);if(!t.isCluster)throw Error(`node with id: `+e+` is not a cluster`);delete this.containedNodes[e],W(t.edges,e=>{delete this.containedEdges[e.id]}),W(t.containedNodes,(e,t)=>{this.containedNodes[t]=e}),t.containedNodes={},W(t.containedEdges,(e,t)=>{this.containedEdges[t]=e}),t.containedEdges={},W(t.edges,e=>{W(this.edges,t=>{var n,r;let i=H(n=t.clusteringEdgeReplacingIds).call(n,e.id);i!==-1&&(W(e.clusteringEdgeReplacingIds,e=>{t.clusteringEdgeReplacingIds.push(e),this.body.edges[e].edgeReplacedById=t.id}),cP(r=t.clusteringEdgeReplacingIds).call(r,i,1))})}),t.edges=[]}},HY=class{constructor(e){this.body=e,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},QE(this.options,this.defaultOptions),this.body.emitter.on(`_resetData`,()=>{this.clusteredNodes={},this.clusteredEdges={}})}clusterByHubsize(e,t){e===void 0?e=this._getHubSize():typeof e==`object`&&(t=this._checkOptions(e),e=this._getHubSize());let n=[];for(let t=0;t<this.body.nodeIndices.length;t++){let r=this.body.nodes[this.body.nodeIndices[t]];r.edges.length>=e&&n.push(r.id)}for(let e=0;e<n.length;e++)this.clusterByConnection(n[e],t,!0);this.body.emitter.emit(`_dataChanged`)}cluster(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.joinCondition===void 0)throw Error(`Cannot call clusterByNodeData without a joinCondition function in the options.`);e=this._checkOptions(e);let n={},r={};W(this.body.nodes,(t,i)=>{t.options&&e.joinCondition(t.options)===!0&&(n[i]=t,W(t.edges,e=>{this.clusteredEdges[e.id]===void 0&&(r[e.id]=e)}))}),this._cluster(n,r,e,t)}clusterByEdgeCount(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;t=this._checkOptions(t);let r=[],i={},a,o,s;for(let n=0;n<this.body.nodeIndices.length;n++){let c={},l={},u=this.body.nodeIndices[n],d=this.body.nodes[u];if(i[u]===void 0){s=0,o=[];for(let e=0;e<d.edges.length;e++)a=d.edges[e],this.clusteredEdges[a.id]===void 0&&(a.toId!==a.fromId&&s++,o.push(a));if(s===e){let e=function(e){if(t.joinCondition===void 0||t.joinCondition===null)return!0;let n=BY.cloneOptions(e);return t.joinCondition(n)},n=!0;for(let t=0;t<o.length;t++){a=o[t];let r=this._getConnectedId(a,u);if(e(d))l[a.id]=a,c[u]=d,c[r]=this.body.nodes[r],i[u]=!0;else{n=!1;break}}if(WM(c).length>0&&WM(l).length>0&&n===!0){let e=function(){for(let e=0;e<r.length;++e)for(let t in c)if(r[e].nodes[t]!==void 0)return r[e]}();if(e!==void 0){for(let t in c)e.nodes[t]===void 0&&(e.nodes[t]=c[t]);for(let t in l)e.edges[t]===void 0&&(e.edges[t]=l[t])}else r.push({nodes:c,edges:l})}}}}for(let e=0;e<r.length;e++)this._cluster(r[e].nodes,r[e].edges,t,!1);n===!0&&this.body.emitter.emit(`_dataChanged`)}clusterOutliers(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(1,e,t)}clusterBridges(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(2,e,t)}clusterByConnection(e,t){var n;let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw Error(`No nodeId supplied to clusterByConnection!`);if(this.body.nodes[e]===void 0)throw Error(`The nodeId given to clusterByConnection does not exist!`);let i=this.body.nodes[e];t=this._checkOptions(t,i),t.clusterNodeProperties.x===void 0&&(t.clusterNodeProperties.x=i.x),t.clusterNodeProperties.y===void 0&&(t.clusterNodeProperties.y=i.y),t.clusterNodeProperties.fixed===void 0&&(t.clusterNodeProperties.fixed={},t.clusterNodeProperties.fixed.x=i.options.fixed.x,t.clusterNodeProperties.fixed.y=i.options.fixed.y);let a={},o={},s=i.id,c=BY.cloneOptions(i);a[s]=i;for(let e=0;e<i.edges.length;e++){let n=i.edges[e];if(this.clusteredEdges[n.id]===void 0){let e=this._getConnectedId(n,s);if(this.clusteredNodes[e]===void 0)if(e!==s)if(t.joinCondition===void 0)o[n.id]=n,a[e]=this.body.nodes[e];else{let r=BY.cloneOptions(this.body.nodes[e]);t.joinCondition(c,r)===!0&&(o[n.id]=n,a[e]=this.body.nodes[e])}else o[n.id]=n}}let l=jM(n=WM(a)).call(n,function(e){return a[e].id});for(let e in a){if(!Object.prototype.hasOwnProperty.call(a,e))continue;let t=a[e];for(let e=0;e<t.edges.length;e++){let n=t.edges[e];H(l).call(l,this._getConnectedId(n,t.id))>-1&&(o[n.id]=n)}}this._cluster(a,o,t,r)}_createClusterEdges(e,t,n,r){let i,a,o,s,c,l,u=WM(e),d=[];for(let r=0;r<u.length;r++){a=u[r],o=e[a];for(let r=0;r<o.edges.length;r++)i=o.edges[r],this.clusteredEdges[i.id]===void 0&&(i.toId==i.fromId?t[i.id]=i:i.toId==a?(s=n.id,c=i.fromId,l=c):(s=i.toId,c=n.id,l=s),e[l]===void 0&&d.push({edge:i,fromId:c,toId:s}))}let f=[],p=function(e){for(let t=0;t<f.length;t++){let n=f[t],r=e.fromId===n.fromId&&e.toId===n.toId,i=e.fromId===n.toId&&e.toId===n.fromId;if(r||i)return n}return null};for(let e=0;e<d.length;e++){let t=d[e],n=t.edge,i=p(t);i===null?(i=this._createClusteredEdge(t.fromId,t.toId,n,r),f.push(i)):i.clusteringEdgeReplacingIds.push(n.id),this.body.edges[n.id].edgeReplacedById=i.id,this._backupEdgeOptions(n),n.setOptions({physics:!1})}}_checkOptions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e.clusterEdgeProperties===void 0&&(e.clusterEdgeProperties={}),e.clusterNodeProperties===void 0&&(e.clusterNodeProperties={}),e}_cluster(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=[];for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.clusteredNodes[t]!==void 0&&i.push(t);for(let t=0;t<i.length;++t)delete e[i[t]];if(WM(e).length==0||WM(e).length==1&&n.clusterNodeProperties.allowSingleNodeCluster!=1)return;let a=U({},n.clusterNodeProperties);if(n.processProperties!==void 0){let r=[];for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=BY.cloneOptions(e[t]);r.push(n)}let i=[];for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&e.substr(0,12)!==`clusterEdge:`){let n=BY.cloneOptions(t[e],`edge`);i.push(n)}if(a=n.processProperties(a,r,i),!a)throw Error(`The processProperties function does not return properties!`)}a.id===void 0&&(a.id=`cluster:`+RY());let o=a.id;a.label===void 0&&(a.label=`cluster`);let s;a.x===void 0&&(s=this._getClusterPosition(e),a.x=s.x),a.y===void 0&&(s===void 0&&(s=this._getClusterPosition(e)),a.y=s.y),a.id=o;let c=this.body.functions.createNode(a,VY);c.containedNodes=e,c.containedEdges=t,c.clusterEdgeProperties=n.clusterEdgeProperties,this.body.nodes[a.id]=c,this._clusterEdges(e,t,a,n.clusterEdgeProperties),a.id=void 0,r===!0&&this.body.emitter.emit(`_dataChanged`)}_backupEdgeOptions(e){this.clusteredEdges[e.id]===void 0&&(this.clusteredEdges[e.id]={physics:e.options.physics})}_restoreEdge(e){let t=this.clusteredEdges[e.id];t!==void 0&&(e.setOptions({physics:t.physics}),delete this.clusteredEdges[e.id])}isCluster(e){return this.body.nodes[e]===void 0?(console.error(`Node does not exist.`),!1):this.body.nodes[e].isCluster===!0}_getClusterPosition(e){let t=WM(e),n=e[t[0]].x,r=e[t[0]].x,i=e[t[0]].y,a=e[t[0]].y,o;for(let s=1;s<t.length;s++)o=e[t[s]],n=o.x<n?o.x:n,r=o.x>r?o.x:r,i=o.y<i?o.y:i,a=o.y>a?o.y:a;return{x:.5*(n+r),y:.5*(i+a)}}openCluster(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw Error(`No clusterNodeId supplied to openCluster.`);let r=this.body.nodes[e];if(r===void 0)throw Error(`The clusterNodeId supplied to openCluster does not exist.`);if(r.isCluster!==!0||r.containedNodes===void 0||r.containedEdges===void 0)throw Error(`The node:`+e+` is not a valid cluster.`);let i=this.findNode(e),a=H(i).call(i,e)-1;if(a>=0){let t=i[a];this.body.nodes[t]._openChildCluster(e),delete this.body.nodes[e],n===!0&&this.body.emitter.emit(`_dataChanged`);return}let o=r.containedNodes,s=r.containedEdges;if(t!==void 0&&t.releaseFunction!==void 0&&typeof t.releaseFunction==`function`){let e={},n={x:r.x,y:r.y};for(let t in o)if(Object.prototype.hasOwnProperty.call(o,t)){let n=this.body.nodes[t];e[t]={x:n.x,y:n.y}}let i=t.releaseFunction(n,e);for(let e in o)if(Object.prototype.hasOwnProperty.call(o,e)){let t=this.body.nodes[e];i[e]!==void 0&&(t.x=i[e].x===void 0?r.x:i[e].x,t.y=i[e].y===void 0?r.y:i[e].y)}}else W(o,function(e){e.options.fixed.x===!1&&(e.x=r.x),e.options.fixed.y===!1&&(e.y=r.y)});for(let e in o)if(Object.prototype.hasOwnProperty.call(o,e)){let t=this.body.nodes[e];t.vx=r.vx,t.vy=r.vy,t.setOptions({physics:!0}),delete this.clusteredNodes[e]}let c=[];for(let e=0;e<r.edges.length;e++)c.push(r.edges[e]);for(let t=0;t<c.length;t++){let n=c[t],r=this._getConnectedId(n,e),i=this.clusteredNodes[r];for(let e=0;e<n.clusteringEdgeReplacingIds.length;e++){let t=n.clusteringEdgeReplacingIds[e],a=this.body.edges[t];if(a!==void 0)if(i!==void 0){let e=this.body.nodes[i.clusterId];e.containedEdges[a.id]=a,delete s[a.id];let t=a.fromId,n=a.toId;a.toId==r?n=i.clusterId:t=i.clusterId,this._createClusteredEdge(t,n,a,e.clusterEdgeProperties,{hidden:!1,physics:!0})}else this._restoreEdge(a)}n.remove()}for(let e in s)Object.prototype.hasOwnProperty.call(s,e)&&this._restoreEdge(s[e]);delete this.body.nodes[e],n===!0&&this.body.emitter.emit(`_dataChanged`)}getNodesInCluster(e){let t=[];if(this.isCluster(e)===!0){let n=this.body.nodes[e].containedNodes;for(let e in n)Object.prototype.hasOwnProperty.call(n,e)&&t.push(this.body.nodes[e].id)}return t}findNode(e){let t=[],n=0,r;for(;this.clusteredNodes[e]!==void 0&&n<100;){if(r=this.body.nodes[e],r===void 0)return[];t.push(r.id),e=this.clusteredNodes[e].clusterId,n++}return r=this.body.nodes[e],r===void 0?[]:(t.push(r.id),BN(t).call(t),t)}updateClusteredNode(e,t){if(e===void 0)throw Error(`No clusteredNodeId supplied to updateClusteredNode.`);if(t===void 0)throw Error(`No newOptions supplied to updateClusteredNode.`);if(this.body.nodes[e]===void 0)throw Error(`The clusteredNodeId supplied to updateClusteredNode does not exist.`);this.body.nodes[e].setOptions(t),this.body.emitter.emit(`_dataChanged`)}updateEdge(e,t){if(e===void 0)throw Error(`No startEdgeId supplied to updateEdge.`);if(t===void 0)throw Error(`No newOptions supplied to updateEdge.`);if(this.body.edges[e]===void 0)throw Error(`The startEdgeId supplied to updateEdge does not exist.`);let n=this.getClusteredEdges(e);for(let e=0;e<n.length;e++)this.body.edges[n[e]].setOptions(t);this.body.emitter.emit(`_dataChanged`)}getClusteredEdges(e){let t=[],n=0;for(;e!==void 0&&this.body.edges[e]!==void 0&&n<100;)t.push(this.body.edges[e].id),e=this.body.edges[e].edgeReplacedById,n++;return BN(t).call(t),t}getBaseEdge(e){return this.getBaseEdges(e)[0]}getBaseEdges(e){let t=[e],n=[],r=[],i=0;for(;t.length>0&&i<100;){let e=t.pop();if(e===void 0)continue;let a=this.body.edges[e];if(a===void 0)continue;i++;let o=a.clusteringEdgeReplacingIds;if(o===void 0)r.push(e);else for(let e=0;e<o.length;++e){let r=o[e];H(t).call(t,o)===-1&&H(n).call(n,o)===-1&&t.push(r)}n.push(e)}return r}_getConnectedId(e,t){return e.toId==t?(e.fromId,e.fromId):e.toId}_getHubSize(){let e=0,t=0,n=0,r=0;for(let i=0;i<this.body.nodeIndices.length;i++){let a=this.body.nodes[this.body.nodeIndices[i]];a.edges.length>r&&(r=a.edges.length),e+=a.edges.length,t+=a.edges.length**2,n+=1}e/=n,t/=n;let i=t-e**2,a=Math.floor(e+2*Math.sqrt(i));return a>r&&(a=r),a}_createClusteredEdge(e,t,n,r,i){let a=BY.cloneOptions(n,`edge`);U(a,r),a.from=e,a.to=t,a.id=`clusterEdge:`+RY(),i!==void 0&&U(a,i);let o=this.body.functions.createEdge(a);return o.clusteringEdgeReplacingIds=[n.id],o.connect(),this.body.edges[o.id]=o,o}_clusterEdges(e,t,n,r){if(t instanceof CY){let e=t,n={};n[e.id]=e,t=n}if(e instanceof LJ){let t=e,n={};n[t.id]=t,e=n}if(n==null)throw Error(`_clusterEdges: parameter clusterNode required`);r===void 0&&(r=n.clusterEdgeProperties),this._createClusterEdges(e,t,n,r);for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&this.body.edges[e]!==void 0){let t=this.body.edges[e];this._backupEdgeOptions(t),t.setOptions({physics:!1})}for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(this.clusteredNodes[t]={clusterId:n.id,node:this.body.nodes[t]},this.body.nodes[t].setOptions({physics:!1}))}_getClusterNodeForNode(e){if(e===void 0)return;let t=this.clusteredNodes[e];if(t===void 0)return;let n=t.clusterId;if(n!==void 0)return this.body.nodes[n]}_filter(e,t){let n=[];return W(e,e=>{t(e)&&n.push(e)}),n}_updateState(){let e,t=[],n={},r=e=>{W(this.body.nodes,t=>{t.isCluster===!0&&e(t)})};for(e in this.clusteredNodes)Object.prototype.hasOwnProperty.call(this.clusteredNodes,e)&&this.body.nodes[e]===void 0&&t.push(e);r(function(e){for(let n=0;n<t.length;n++)delete e.containedNodes[t[n]]});for(let e=0;e<t.length;e++)delete this.clusteredNodes[t[e]];W(this.clusteredEdges,e=>{let t=this.body.edges[e];(t===void 0||!t.endPointsValid())&&(n[e]=e)}),r(function(e){W(e.containedEdges,(e,t)=>{!e.endPointsValid()&&!n[t]&&(n[t]=t)})}),W(this.body.edges,(e,t)=>{let r=!0,i=e.clusteringEdgeReplacingIds;if(i!==void 0){let e=0;W(i,t=>{let n=this.body.edges[t];n!==void 0&&n.endPointsValid()&&(e+=1)}),r=e>0}(!e.endPointsValid()||!r)&&(n[t]=t)}),r(e=>{W(n,t=>{delete e.containedEdges[t],W(e.edges,(r,i)=>{if(r.id===t){e.edges[i]=null;return}r.clusteringEdgeReplacingIds=this._filter(r.clusteringEdgeReplacingIds,function(e){return!n[e]})}),e.edges=this._filter(e.edges,function(e){return e!==null})})}),W(n,e=>{delete this.clusteredEdges[e]}),W(n,e=>{delete this.body.edges[e]}),W(WM(this.body.edges),e=>{let t=this.body.edges[e],n=this._isClusteredNode(t.fromId)||this._isClusteredNode(t.toId);if(n!==this._isClusteredEdge(t.id))if(n){let e=this._getClusterNodeForNode(t.fromId);e!==void 0&&this._clusterEdges(this.body.nodes[t.fromId],t,e);let n=this._getClusterNodeForNode(t.toId);n!==void 0&&this._clusterEdges(this.body.nodes[t.toId],t,n)}else delete this._clusterEdges[e],this._restoreEdge(t)});let i=!1,a=!0;for(;a;){let e=[];r(function(t){let n=WM(t.containedNodes).length,r=t.options.allowSingleNodeCluster===!0;(r&&n<1||!r&&n<2)&&e.push(t.id)});for(let t=0;t<e.length;++t)this.openCluster(e[t],{},!1);a=e.length>0,i||=a}i&&this._updateState()}_isClusteredNode(e){return this.clusteredNodes[e]!==void 0}_isClusteredEdge(e){return this.clusteredEdges[e]!==void 0}},UY=class{constructor(e,t){this.body=e,this.canvas=t,this.redrawRequested=!1,this.requestAnimationFrameRequestId=void 0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.zooming=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1},QE(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e;this.body.emitter.on(`dragStart`,()=>{this.dragging=!0}),this.body.emitter.on(`dragEnd`,()=>{this.dragging=!1}),this.body.emitter.on(`zoom`,()=>{this.zooming=!0,window.clearTimeout(this.zoomTimeoutId),this.zoomTimeoutId=ML(()=>{var e;this.zooming=!1,B(e=this._requestRedraw).call(e,this)()},250)}),this.body.emitter.on(`_resizeNodes`,()=>{this._resizeNodes()}),this.body.emitter.on(`_redraw`,()=>{this.renderingActive===!1&&this._redraw()}),this.body.emitter.on(`_blockRedraw`,()=>{this.allowRedraw=!1}),this.body.emitter.on(`_allowRedraw`,()=>{this.allowRedraw=!0,this.redrawRequested=!1}),this.body.emitter.on(`_requestRedraw`,B(e=this._requestRedraw).call(e,this)),this.body.emitter.on(`_startRendering`,()=>{this.renderRequests+=1,this.renderingActive=!0,this._startRendering()}),this.body.emitter.on(`_stopRendering`,()=>{--this.renderRequests,this.renderingActive=this.renderRequests>0,this.requestAnimationFrameRequestId=void 0}),this.body.emitter.on(`destroy`,()=>{this.renderRequests=0,this.allowRedraw=!1,this.renderingActive=!1,window.cancelAnimationFrame(this.requestAnimationFrameRequestId),this.body.emitter.off()})}setOptions(e){e!==void 0&&LB([`hideEdgesOnDrag`,`hideEdgesOnZoom`,`hideNodesOnDrag`],this.options,e)}_startRendering(){if(this.renderingActive===!0&&this.requestAnimationFrameRequestId===void 0){var e;this.requestAnimationFrameRequestId=window.requestAnimationFrame(B(e=this._renderStep).call(e,this),this.simulationInterval)}}_renderStep(){this.renderingActive===!0&&(this.requestAnimationFrameRequestId=void 0,this._startRendering(),this._redraw())}redraw(){this.body.emitter.emit(`setSize`),this._redraw()}_requestRedraw(){this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,window.requestAnimationFrame(()=>{this._redraw(!1)}))}_redraw(){let e=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(this.allowRedraw===!0){this.body.emitter.emit(`initRedraw`),this.redrawRequested=!1;let t={drawExternalLabels:null};(this.canvas.frame.canvas.width===0||this.canvas.frame.canvas.height===0)&&this.canvas.setSize(),this.canvas.setTransform();let n=this.canvas.getContext(),r=this.canvas.frame.canvas.clientWidth,i=this.canvas.frame.canvas.clientHeight;if(n.clearRect(0,0,r,i),this.canvas.frame.clientWidth===0)return;if(n.save(),n.translate(this.body.view.translation.x,this.body.view.translation.y),n.scale(this.body.view.scale,this.body.view.scale),n.beginPath(),this.body.emitter.emit(`beforeDrawing`,n),n.closePath(),e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawEdges(n),this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1){let{drawExternalLabels:r}=this._drawNodes(n,e);t.drawExternalLabels=r}e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawArrows(n),t.drawExternalLabels!=null&&t.drawExternalLabels(),e===!1&&this._drawSelectionBox(n),n.beginPath(),this.body.emitter.emit(`afterDrawing`,n),n.closePath(),n.restore(),e===!0&&n.clearRect(0,0,r,i)}}_resizeNodes(){this.canvas.setTransform();let e=this.canvas.getContext();e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale);let t=this.body.nodes,n;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n=t[r],n.resize(e),n.updateBoundingBox(e,n.selected));e.restore()}_drawNodes(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.body.nodes,r=this.body.nodeIndices,i,a=[],o=[],s=this.canvas.DOMtoCanvas({x:-20,y:-20}),c=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+20,y:this.canvas.frame.canvas.clientHeight+20}),l={top:s.y,left:s.x,bottom:c.y,right:c.x},u=[];for(let s=0;s<r.length;s++)if(i=n[r[s]],i.hover)o.push(r[s]);else if(i.isSelected())a.push(r[s]);else if(t===!0){let t=i.draw(e);t.drawExternalLabel!=null&&u.push(t.drawExternalLabel)}else if(i.isBoundingBoxOverlappingWith(l)===!0){let t=i.draw(e);t.drawExternalLabel!=null&&u.push(t.drawExternalLabel)}else i.updateBoundingBox(e,i.selected);let d,f=a.length,p=o.length;for(d=0;d<f;d++){i=n[a[d]];let t=i.draw(e);t.drawExternalLabel!=null&&u.push(t.drawExternalLabel)}for(d=0;d<p;d++){i=n[o[d]];let t=i.draw(e);t.drawExternalLabel!=null&&u.push(t.drawExternalLabel)}return{drawExternalLabels:()=>{for(let e of u)e()}}}_drawEdges(e){let t=this.body.edges,n=this.body.edgeIndices;for(let r=0;r<n.length;r++){let i=t[n[r]];i.connected===!0&&i.draw(e)}}_drawArrows(e){let t=this.body.edges,n=this.body.edgeIndices;for(let r=0;r<n.length;r++){let i=t[n[r]];i.connected===!0&&i.drawArrows(e)}}_drawSelectionBox(e){if(this.body.selectionBox.show){e.beginPath();let t=this.body.selectionBox.position.end.x-this.body.selectionBox.position.start.x,n=this.body.selectionBox.position.end.y-this.body.selectionBox.position.start.y;e.rect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,t,n),e.fillStyle=`rgba(151, 194, 252, 0.2)`,e.fillRect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,t,n),e.strokeStyle=`rgba(151, 194, 252, 1)`,e.stroke()}else e.closePath()}},WY,GY;function KY(){return GY?WY:(GY=1,TL(),WY=R().setInterval,WY)}var qY,JY;function YY(){return JY?qY:(JY=1,qY=KY(),qY)}var XY=F(YY());function ZY(e,t){t.inputHandler=function(e){e.isFirst&&t(e)},e.on(`hammer.input`,t.inputHandler)}function QY(e,t){return t.inputHandler=function(e){e.isFinal&&t(e)},e.on(`hammer.input`,t.inputHandler)}var $Y=class{constructor(e){this.body=e,this.pixelRatio=1,this.cameraState={},this.initialized=!1,this.canvasViewCenter={},this._cleanupCallbacks=[],this.options={},this.defaultOptions={autoResize:!0,height:`100%`,width:`100%`},QE(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e;this.body.emitter.once(`resize`,e=>{e.width!==0&&(this.body.view.translation.x=e.width*.5),e.height!==0&&(this.body.view.translation.y=e.height*.5)}),this.body.emitter.on(`setSize`,B(e=this.setSize).call(e,this)),this.body.emitter.on(`destroy`,()=>{this.hammerFrame.destroy(),this.hammer.destroy(),this._cleanUp()})}setOptions(e){if(e!==void 0&&LB([`width`,`height`,`autoResize`],this.options,e),this._cleanUp(),this.options.autoResize===!0){var t;if(window.ResizeObserver){let e=new ResizeObserver(()=>{this.setSize()===!0&&this.body.emitter.emit(`_requestRedraw`)}),{frame:t}=this;e.observe(t),this._cleanupCallbacks.push(()=>{e.unobserve(t)})}else{let e=XY(()=>{this.setSize()===!0&&this.body.emitter.emit(`_requestRedraw`)},1e3);this._cleanupCallbacks.push(()=>{clearInterval(e)})}let e=B(t=this._onResize).call(t,this);window.addEventListener(`resize`,e),this._cleanupCallbacks.push(()=>{window.removeEventListener(`resize`,e)})}}_cleanUp(){var e,t,n;V(e=BN(t=cP(n=this._cleanupCallbacks).call(n,0)).call(t)).call(e,e=>{try{e()}catch(e){console.error(e)}})}_onResize(){this.setSize(),this.body.emitter.emit(`_redraw`)}_getCameraState(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.pixelRatio;this.initialized===!0&&(this.cameraState.previousWidth=this.frame.canvas.width/e,this.cameraState.previousHeight=this.frame.canvas.height/e,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/e,y:.5*this.frame.canvas.height/e}))}_setCameraState(){if(this.cameraState.scale!==void 0&&this.frame.canvas.clientWidth!==0&&this.frame.canvas.clientHeight!==0&&this.pixelRatio!==0&&this.cameraState.previousWidth>0&&this.cameraState.previousHeight>0){let e=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,t=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,n=this.cameraState.scale;e!=1&&t!=1?n=this.cameraState.scale*.5*(e+t):e==1?t!=1&&(n=this.cameraState.scale*t):n=this.cameraState.scale*e,this.body.view.scale=n;let r=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),i={x:r.x-this.cameraState.position.x,y:r.y-this.cameraState.position.y};this.body.view.translation.x+=i.x*this.body.view.scale,this.body.view.translation.y+=i.y*this.body.view.scale}}_prepareValue(e){if(typeof e==`number`)return e+`px`;if(typeof e==`string`){if(H(e).call(e,`%`)!==-1||H(e).call(e,`px`)!==-1)return e;if(H(e).call(e,`%`)===-1)return e+`px`}throw Error(`Could not use the value supplied for width or height:`+e)}_create(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement(`div`),this.frame.className=`vis-network`,this.frame.style.position=`relative`,this.frame.style.overflow=`hidden`,this.frame.tabIndex=0,this.frame.canvas=document.createElement(`canvas`),this.frame.canvas.style.position=`relative`,this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext)this._setPixelRatio(),this.setTransform();else{let e=document.createElement(`DIV`);e.style.color=`red`,e.style.fontWeight=`bold`,e.style.padding=`10px`,e.innerText=`Error: your browser does not support HTML canvas`,this.frame.canvas.appendChild(e)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}_bindHammer(){this.hammer!==void 0&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new hV(this.frame.canvas),this.hammer.get(`pinch`).set({enable:!0}),this.hammer.get(`pan`).set({threshold:5,direction:hV.DIRECTION_ALL}),ZY(this.hammer,e=>{this.body.eventListeners.onTouch(e)}),this.hammer.on(`tap`,e=>{this.body.eventListeners.onTap(e)}),this.hammer.on(`doubletap`,e=>{this.body.eventListeners.onDoubleTap(e)}),this.hammer.on(`press`,e=>{this.body.eventListeners.onHold(e)}),this.hammer.on(`panstart`,e=>{this.body.eventListeners.onDragStart(e)}),this.hammer.on(`panmove`,e=>{this.body.eventListeners.onDrag(e)}),this.hammer.on(`panend`,e=>{this.body.eventListeners.onDragEnd(e)}),this.hammer.on(`pinch`,e=>{this.body.eventListeners.onPinch(e)}),this.frame.canvas.addEventListener(`wheel`,e=>{this.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener(`mousemove`,e=>{this.body.eventListeners.onMouseMove(e)}),this.frame.canvas.addEventListener(`contextmenu`,e=>{this.body.eventListeners.onContext(e)}),this.hammerFrame=new hV(this.frame),QY(this.hammerFrame,e=>{this.body.eventListeners.onRelease(e)})}setSize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.width,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.height;e=this._prepareValue(e),t=this._prepareValue(t);let n=!1,r=this.frame.canvas.width,i=this.frame.canvas.height,a=this.pixelRatio;if(this._setPixelRatio(),e!=this.options.width||t!=this.options.height||this.frame.style.width!=e||this.frame.style.height!=t)this._getCameraState(a),this.frame.style.width=e,this.frame.style.height=t,this.frame.canvas.style.width=`100%`,this.frame.canvas.style.height=`100%`,this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=e,this.options.height=t,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},n=!0;else{let e=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),t=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);(this.frame.canvas.width!==e||this.frame.canvas.height!==t)&&this._getCameraState(a),this.frame.canvas.width!==e&&(this.frame.canvas.width=e,n=!0),this.frame.canvas.height!==t&&(this.frame.canvas.height=t,n=!0)}return n===!0&&(this.body.emitter.emit(`resize`,{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(r/this.pixelRatio),oldHeight:Math.round(i/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,n}getContext(){return this.frame.canvas.getContext(`2d`)}_determinePixelRatio(){let e=this.getContext();if(e===void 0)throw Error(`Could not get canvax context`);let t=1;typeof window<`u`&&(t=window.devicePixelRatio||1);let n=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/n}_setPixelRatio(){this.pixelRatio=this._determinePixelRatio()}setTransform(){let e=this.getContext();if(e===void 0)throw Error(`Could not get canvax context`);e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}_XconvertDOMtoCanvas(e){return(e-this.body.view.translation.x)/this.body.view.scale}_XconvertCanvasToDOM(e){return e*this.body.view.scale+this.body.view.translation.x}_YconvertDOMtoCanvas(e){return(e-this.body.view.translation.y)/this.body.view.scale}_YconvertCanvasToDOM(e){return e*this.body.view.scale+this.body.view.translation.y}canvasToDOM(e){return{x:this._XconvertCanvasToDOM(e.x),y:this._YconvertCanvasToDOM(e.y)}}DOMtoCanvas(e){return{x:this._XconvertDOMtoCanvas(e.x),y:this._YconvertDOMtoCanvas(e.y)}}};function eX(e,t){let n=QE({nodes:t,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},e??{});if(!hM(n.nodes))throw TypeError(`Nodes has to be an array of ids.`);if(n.nodes.length===0&&(n.nodes=t),!(typeof n.minZoomLevel==`number`&&n.minZoomLevel>0))throw TypeError(`Min zoom level has to be a number higher than zero.`);if(!(typeof n.maxZoomLevel==`number`&&n.minZoomLevel<=n.maxZoomLevel))throw TypeError(`Max zoom level has to be a number higher than min zoom level.`);return n}var tX=class{constructor(e,t){var n,r;this.body=e,this.canvas=t,this.animationSpeed=1/this.renderRefreshRate,this.animationEasingFunction=`easeInOutQuint`,this.easingTime=0,this.sourceScale=0,this.targetScale=0,this.sourceTranslation=0,this.targetTranslation=0,this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0,this.touchTime=0,this.viewFunction=void 0,this.body.emitter.on(`fit`,B(n=this.fit).call(n,this)),this.body.emitter.on(`animationFinished`,()=>{this.body.emitter.emit(`_stopRendering`)}),this.body.emitter.on(`unlockNode`,B(r=this.releaseNode).call(r,this))}setOptions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=e}fit(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];e=eX(e,this.body.nodeIndices);let n=this.canvas.frame.canvas.clientWidth,r=this.canvas.frame.canvas.clientHeight,i,a;if(n===0||r===0)a=1,i=BY.getRange(this.body.nodes,e.nodes);else if(t===!0){let t=0;for(let e in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,e)&&this.body.nodes[e].predefinedPosition===!0&&(t+=1);if(t>.5*this.body.nodeIndices.length){this.fit(e,!1);return}i=BY.getRange(this.body.nodes,e.nodes),a=12.662/(this.body.nodeIndices.length+7.4147)+.0964822;let o=Math.min(n/600,r/600);a*=o}else{this.body.emitter.emit(`_resizeNodes`),i=BY.getRange(this.body.nodes,e.nodes);let t=Math.abs(i.maxX-i.minX)*1.1,o=Math.abs(i.maxY-i.minY)*1.1,s=n/t,c=r/o;a=s<=c?s:c}a>e.maxZoomLevel?a=e.maxZoomLevel:a<e.minZoomLevel&&(a=e.minZoomLevel);let o={position:BY.findCenter(i),scale:a,animation:e.animation};this.moveTo(o)}focus(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.body.nodes[e]===void 0?console.error(`Node: `+e+` cannot be found.`):(t.position={x:this.body.nodes[e].x,y:this.body.nodes[e].y},t.lockedOnNode=e,this.moveTo(t))}moveTo(e){if(e===void 0){e={};return}if(e.offset!=null){if(e.offset.x!=null){if(e.offset.x=+e.offset.x,!YU(e.offset.x))throw TypeError(`The option "offset.x" has to be a finite number.`)}else e.offset.x=0;if(e.offset.y!=null){if(e.offset.y=+e.offset.y,!YU(e.offset.y))throw TypeError(`The option "offset.y" has to be a finite number.`)}else e.offset.x=0}else e.offset={x:0,y:0};if(e.position!=null){if(e.position.x!=null){if(e.position.x=+e.position.x,!YU(e.position.x))throw TypeError(`The option "position.x" has to be a finite number.`)}else e.position.x=0;if(e.position.y!=null){if(e.position.y=+e.position.y,!YU(e.position.y))throw TypeError(`The option "position.y" has to be a finite number.`)}else e.position.x=0}else e.position=this.getViewPosition();if(e.scale!=null){if(e.scale=+e.scale,!(e.scale>0))throw TypeError(`The option "scale" has to be a number greater than zero.`)}else e.scale=this.body.view.scale;e.animation===void 0&&(e.animation={duration:0}),e.animation===!1&&(e.animation={duration:0}),e.animation===!0&&(e.animation={}),e.animation.duration===void 0&&(e.animation.duration=1e3),e.animation.easingFunction===void 0&&(e.animation.easingFunction=`easeInOutQuad`),this.animateView(e)}animateView(e){if(e===void 0)return;this.animationEasingFunction=e.animation.easingFunction,this.releaseNode(),e.locked===!0&&(this.lockedOnNodeId=e.lockedOnNode,this.lockedOnNodeOffset=e.offset),this.easingTime!=0&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=e.scale,this.body.view.scale=this.targetScale;let t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),n={x:t.x-e.position.x,y:t.y-e.position.y};if(this.targetTranslation={x:this.sourceTranslation.x+n.x*this.targetScale+e.offset.x,y:this.sourceTranslation.y+n.y*this.targetScale+e.offset.y},e.animation.duration===0)if(this.lockedOnNodeId!=null){var r;this.viewFunction=B(r=this._lockedRedraw).call(r,this),this.body.emitter.on(`initRedraw`,this.viewFunction)}else this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit(`_requestRedraw`);else{var i;this.animationSpeed=1/(60*e.animation.duration*.001)||1/60,this.animationEasingFunction=e.animation.easingFunction,this.viewFunction=B(i=this._transitionRedraw).call(i,this),this.body.emitter.on(`initRedraw`,this.viewFunction),this.body.emitter.emit(`_startRendering`)}}_lockedRedraw(){let e={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),n={x:t.x-e.x,y:t.y-e.y},r=this.body.view.translation,i={x:r.x+n.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:r.y+n.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=i}releaseNode(){this.lockedOnNodeId!==void 0&&this.viewFunction!==void 0&&(this.body.emitter.off(`initRedraw`,this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}_transitionRedraw(){let e=arguments.length>0&&arguments[0]!==void 0&&arguments[0];this.easingTime+=this.animationSpeed,this.easingTime=e===!0?1:this.easingTime;let t=nV[this.animationEasingFunction](this.easingTime);if(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*t,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*t,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*t},this.easingTime>=1){if(this.body.emitter.off(`initRedraw`,this.viewFunction),this.easingTime=0,this.lockedOnNodeId!=null){var n;this.viewFunction=B(n=this._lockedRedraw).call(n,this),this.body.emitter.on(`initRedraw`,this.viewFunction)}this.body.emitter.emit(`animationFinished`)}}getScale(){return this.body.view.scale}getViewPosition(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}};function nX(e){var t=e&&e.preventDefault||!1,n=e&&e.container||window,r={},i={keydown:{},keyup:{}},a={},o;for(o=97;o<=122;o++)a[String.fromCharCode(o)]={code:65+(o-97),shift:!1};for(o=65;o<=90;o++)a[String.fromCharCode(o)]={code:o,shift:!0};for(o=0;o<=9;o++)a[``+o]={code:48+o,shift:!1};for(o=1;o<=12;o++)a[`F`+o]={code:111+o,shift:!1};for(o=0;o<=9;o++)a[`num`+o]={code:96+o,shift:!1};a[`num*`]={code:106,shift:!1},a[`num+`]={code:107,shift:!1},a[`num-`]={code:109,shift:!1},a[`num/`]={code:111,shift:!1},a[`num.`]={code:110,shift:!1},a.left={code:37,shift:!1},a.up={code:38,shift:!1},a.right={code:39,shift:!1},a.down={code:40,shift:!1},a.space={code:32,shift:!1},a.enter={code:13,shift:!1},a.shift={code:16,shift:void 0},a.esc={code:27,shift:!1},a.backspace={code:8,shift:!1},a.tab={code:9,shift:!1},a.ctrl={code:17,shift:!1},a.alt={code:18,shift:!1},a.delete={code:46,shift:!1},a.pageup={code:33,shift:!1},a.pagedown={code:34,shift:!1},a[`=`]={code:187,shift:!1},a[`-`]={code:189,shift:!1},a[`]`]={code:221,shift:!1},a[`[`]={code:219,shift:!1};var s=function(e){l(e,`keydown`)},c=function(e){l(e,`keyup`)},l=function(e,n){if(i[n][e.keyCode]!==void 0){for(var r=i[n][e.keyCode],a=0;a<r.length;a++)(r[a].shift===void 0||r[a].shift==1&&e.shiftKey==1||r[a].shift==0&&e.shiftKey==0)&&r[a].fn(e);t==1&&e.preventDefault()}};return r.bind=function(e,t,n){if(n===void 0&&(n=`keydown`),a[e]===void 0)throw Error(`unsupported key: `+e);i[n][a[e].code]===void 0&&(i[n][a[e].code]=[]),i[n][a[e].code].push({fn:t,shift:a[e].shift})},r.bindAll=function(e,t){for(var n in t===void 0&&(t=`keydown`),a)a.hasOwnProperty(n)&&r.bind(n,e,t)},r.getKey=function(e){for(var t in a)if(a.hasOwnProperty(t)&&(e.shiftKey==1&&a[t].shift==1&&e.keyCode==a[t].code||e.shiftKey==0&&a[t].shift==0&&e.keyCode==a[t].code||e.keyCode==a[t].code&&t==`shift`))return t;return`unknown key, currently not supported`},r.unbind=function(e,t,n){if(n===void 0&&(n=`keydown`),a[e]===void 0)throw Error(`unsupported key: `+e);if(t!==void 0){var r=[],o=i[n][a[e].code];if(o!==void 0)for(var s=0;s<o.length;s++)(o[s].fn!=t||o[s].shift!=a[e].shift)&&r.push(i[n][a[e].code][s]);i[n][a[e].code]=r}else i[n][a[e].code]=[]},r.reset=function(){i={keydown:{},keyup:{}}},r.destroy=function(){i={keydown:{},keyup:{}},n.removeEventListener(`keydown`,s,!0),n.removeEventListener(`keyup`,c,!0)},n.addEventListener(`keydown`,s,!0),n.addEventListener(`keyup`,c,!0),r}var rX=class{constructor(e,t){this.body=e,this.canvas=t,this.iconsCreated=!1,this.navigationHammers=[],this.boundFunctions={},this.touchTime=0,this.activated=!1,this.body.emitter.on(`activate`,()=>{this.activated=!0,this.configureKeyboardBindings()}),this.body.emitter.on(`deactivate`,()=>{this.activated=!1,this.configureKeyboardBindings()}),this.body.emitter.on(`destroy`,()=>{this.keycharm!==void 0&&this.keycharm.destroy()}),this.options={}}setOptions(e){e!==void 0&&(this.options=e,this.create())}create(){this.options.navigationButtons===!0?this.iconsCreated===!1&&this.loadNavigationElements():this.iconsCreated===!0&&this.cleanNavigation(),this.configureKeyboardBindings()}cleanNavigation(){if(this.navigationHammers.length!=0){for(let e=0;e<this.navigationHammers.length;e++)this.navigationHammers[e].destroy();this.navigationHammers=[]}this.navigationDOM&&this.navigationDOM.wrapper&&this.navigationDOM.wrapper.parentNode&&this.navigationDOM.wrapper.parentNode.removeChild(this.navigationDOM.wrapper),this.iconsCreated=!1}loadNavigationElements(){this.cleanNavigation(),this.navigationDOM={};let e=[`up`,`down`,`left`,`right`,`zoomIn`,`zoomOut`,`zoomExtends`],t=[`_moveUp`,`_moveDown`,`_moveLeft`,`_moveRight`,`_zoomIn`,`_zoomOut`,`_fit`];this.navigationDOM.wrapper=document.createElement(`div`),this.navigationDOM.wrapper.className=`vis-navigation`,this.canvas.frame.appendChild(this.navigationDOM.wrapper);for(let i=0;i<e.length;i++){this.navigationDOM[e[i]]=document.createElement(`div`),this.navigationDOM[e[i]].className=`vis-button vis-`+e[i],this.navigationDOM.wrapper.appendChild(this.navigationDOM[e[i]]);let a=new hV(this.navigationDOM[e[i]]);if(t[i]===`_fit`){var n;ZY(a,B(n=this._fit).call(n,this))}else{var r;ZY(a,B(r=this.bindToRedraw).call(r,this,t[i]))}this.navigationHammers.push(a)}let i=new hV(this.canvas.frame);QY(i,()=>{this._stopMovement()}),this.navigationHammers.push(i),this.iconsCreated=!0}bindToRedraw(e){if(this.boundFunctions[e]===void 0){var t;this.boundFunctions[e]=B(t=this[e]).call(t,this),this.body.emitter.on(`initRedraw`,this.boundFunctions[e]),this.body.emitter.emit(`_startRendering`)}}unbindFromRedraw(e){this.boundFunctions[e]!==void 0&&(this.body.emitter.off(`initRedraw`,this.boundFunctions[e]),this.body.emitter.emit(`_stopRendering`),delete this.boundFunctions[e])}_fit(){new Date().valueOf()-this.touchTime>700&&(this.body.emitter.emit(`fit`,{duration:700}),this.touchTime=new Date().valueOf())}_stopMovement(){for(let e in this.boundFunctions)Object.prototype.hasOwnProperty.call(this.boundFunctions,e)&&(this.body.emitter.off(`initRedraw`,this.boundFunctions[e]),this.body.emitter.emit(`_stopRendering`));this.boundFunctions={}}_moveUp(){this.body.view.translation.y+=this.options.keyboard.speed.y}_moveDown(){this.body.view.translation.y-=this.options.keyboard.speed.y}_moveLeft(){this.body.view.translation.x+=this.options.keyboard.speed.x}_moveRight(){this.body.view.translation.x-=this.options.keyboard.speed.x}_zoomIn(){let e=this.body.view.scale,t=this.body.view.scale*(1+this.options.keyboard.speed.zoom),n=this.body.view.translation,r=t/e,i=(1-r)*this.canvas.canvasViewCenter.x+n.x*r,a=(1-r)*this.canvas.canvasViewCenter.y+n.y*r;this.body.view.scale=t,this.body.view.translation={x:i,y:a},this.body.emitter.emit(`zoom`,{direction:`+`,scale:this.body.view.scale,pointer:null})}_zoomOut(){let e=this.body.view.scale,t=this.body.view.scale/(1+this.options.keyboard.speed.zoom),n=this.body.view.translation,r=t/e,i=(1-r)*this.canvas.canvasViewCenter.x+n.x*r,a=(1-r)*this.canvas.canvasViewCenter.y+n.y*r;this.body.view.scale=t,this.body.view.translation={x:i,y:a},this.body.emitter.emit(`zoom`,{direction:`-`,scale:this.body.view.scale,pointer:null})}configureKeyboardBindings(){if(this.keycharm!==void 0&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=nX({container:window,preventDefault:!0}):this.keycharm=nX({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0)){var e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C;B(e=this.keycharm).call(e,`up`,()=>{this.bindToRedraw(`_moveUp`)},`keydown`),B(t=this.keycharm).call(t,`down`,()=>{this.bindToRedraw(`_moveDown`)},`keydown`),B(n=this.keycharm).call(n,`left`,()=>{this.bindToRedraw(`_moveLeft`)},`keydown`),B(r=this.keycharm).call(r,`right`,()=>{this.bindToRedraw(`_moveRight`)},`keydown`),B(i=this.keycharm).call(i,`=`,()=>{this.bindToRedraw(`_zoomIn`)},`keydown`),B(a=this.keycharm).call(a,`num+`,()=>{this.bindToRedraw(`_zoomIn`)},`keydown`),B(o=this.keycharm).call(o,`num-`,()=>{this.bindToRedraw(`_zoomOut`)},`keydown`),B(s=this.keycharm).call(s,`-`,()=>{this.bindToRedraw(`_zoomOut`)},`keydown`),B(c=this.keycharm).call(c,`[`,()=>{this.bindToRedraw(`_zoomOut`)},`keydown`),B(l=this.keycharm).call(l,`]`,()=>{this.bindToRedraw(`_zoomIn`)},`keydown`),B(u=this.keycharm).call(u,`pageup`,()=>{this.bindToRedraw(`_zoomIn`)},`keydown`),B(d=this.keycharm).call(d,`pagedown`,()=>{this.bindToRedraw(`_zoomOut`)},`keydown`),B(f=this.keycharm).call(f,`up`,()=>{this.unbindFromRedraw(`_moveUp`)},`keyup`),B(p=this.keycharm).call(p,`down`,()=>{this.unbindFromRedraw(`_moveDown`)},`keyup`),B(m=this.keycharm).call(m,`left`,()=>{this.unbindFromRedraw(`_moveLeft`)},`keyup`),B(h=this.keycharm).call(h,`right`,()=>{this.unbindFromRedraw(`_moveRight`)},`keyup`),B(g=this.keycharm).call(g,`=`,()=>{this.unbindFromRedraw(`_zoomIn`)},`keyup`),B(_=this.keycharm).call(_,`num+`,()=>{this.unbindFromRedraw(`_zoomIn`)},`keyup`),B(v=this.keycharm).call(v,`num-`,()=>{this.unbindFromRedraw(`_zoomOut`)},`keyup`),B(y=this.keycharm).call(y,`-`,()=>{this.unbindFromRedraw(`_zoomOut`)},`keyup`),B(b=this.keycharm).call(b,`[`,()=>{this.unbindFromRedraw(`_zoomOut`)},`keyup`),B(x=this.keycharm).call(x,`]`,()=>{this.unbindFromRedraw(`_zoomIn`)},`keyup`),B(S=this.keycharm).call(S,`pageup`,()=>{this.unbindFromRedraw(`_zoomIn`)},`keyup`),B(C=this.keycharm).call(C,`pagedown`,()=>{this.unbindFromRedraw(`_zoomOut`)},`keyup`)}}},iX=class{constructor(e,t,n){var r,i,a,o,s,c,l,u,d,f,p,m,h;this.body=e,this.canvas=t,this.selectionHandler=n,this.navigationHandler=new rX(e,t),this.body.eventListeners.onTap=B(r=this.onTap).call(r,this),this.body.eventListeners.onTouch=B(i=this.onTouch).call(i,this),this.body.eventListeners.onDoubleTap=B(a=this.onDoubleTap).call(a,this),this.body.eventListeners.onHold=B(o=this.onHold).call(o,this),this.body.eventListeners.onDragStart=B(s=this.onDragStart).call(s,this),this.body.eventListeners.onDrag=B(c=this.onDrag).call(c,this),this.body.eventListeners.onDragEnd=B(l=this.onDragEnd).call(l,this),this.body.eventListeners.onMouseWheel=B(u=this.onMouseWheel).call(u,this),this.body.eventListeners.onPinch=B(d=this.onPinch).call(d,this),this.body.eventListeners.onMouseMove=B(f=this.onMouseMove).call(f,this),this.body.eventListeners.onRelease=B(p=this.onRelease).call(p,this),this.body.eventListeners.onContext=B(m=this.onContext).call(m,this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=B(h=this.getPointer).call(h,this),this.options={},this.defaultOptions={dragNodes:!0,dragView:!0,hover:!1,keyboard:{enabled:!1,speed:{x:10,y:10,zoom:.02},bindToWindow:!0,autoFocus:!0},navigationButtons:!1,tooltipDelay:300,zoomView:!0,zoomSpeed:1},QE(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){this.body.emitter.on(`destroy`,()=>{clearTimeout(this.popupTimer),delete this.body.functions.getPointer})}setOptions(e){e!==void 0&&(RB([`hideEdgesOnDrag`,`hideEdgesOnZoom`,`hideNodesOnDrag`,`keyboard`,`multiselect`,`selectable`,`selectConnectedEdges`],this.options,e),tV(this.options,e,`keyboard`),e.tooltip&&(QE(this.options.tooltip,e.tooltip),e.tooltip.color&&(this.options.tooltip.color=KB(e.tooltip.color)))),this.navigationHandler.setOptions(this.options)}getPointer(e){return{x:e.x-VB(this.canvas.frame.canvas),y:e.y-HB(this.canvas.frame.canvas)}}onTouch(e){new Date().valueOf()-this.touchTime>50&&(this.drag.pointer=this.getPointer(e.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=new Date().valueOf())}onTap(e){let t=this.getPointer(e.center),n=this.selectionHandler.options.multiselect&&(e.changedPointers[0].ctrlKey||e.changedPointers[0].metaKey);this.checkSelectionChanges(t,n),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent(`click`,e,t)}onDoubleTap(e){let t=this.getPointer(e.center);this.selectionHandler.generateClickEvent(`doubleClick`,e,t)}onHold(e){let t=this.getPointer(e.center),n=this.selectionHandler.options.multiselect;this.checkSelectionChanges(t,n),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent(`click`,e,t),this.selectionHandler.generateClickEvent(`hold`,e,t)}onRelease(e){if(new Date().valueOf()-this.touchTime>10){let t=this.getPointer(e.center);this.selectionHandler.generateClickEvent(`release`,e,t),this.touchTime=new Date().valueOf()}}onContext(e){let t=this.getPointer({x:e.clientX,y:e.clientY});this.selectionHandler.generateClickEvent(`oncontext`,e,t)}checkSelectionChanges(e){(arguments.length>1&&arguments[1]!==void 0&&arguments[1])===!0?this.selectionHandler.selectAdditionalOnPoint(e):this.selectionHandler.selectOnPoint(e)}_determineDifference(e,t){let n=function(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r];H(t).call(t,i)===-1&&n.push(i)}return n};return{nodes:n(e.nodes,t.nodes),edges:n(e.edges,t.edges)}}onDragStart(e){if(this.drag.dragging)return;this.drag.pointer===void 0&&this.onTouch(e);let t=this.selectionHandler.getNodeAt(this.drag.pointer);if(this.drag.dragging=!0,this.drag.selection=[],this.drag.translation=QE({},this.body.view.translation),this.drag.nodeId=void 0,e.srcEvent.shiftKey){this.body.selectionBox.show=!0;let t=this.getPointer(e.center);this.body.selectionBox.position.start={x:this.canvas._XconvertDOMtoCanvas(t.x),y:this.canvas._YconvertDOMtoCanvas(t.y)},this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(t.x),y:this.canvas._YconvertDOMtoCanvas(t.y)}}else if(t!==void 0&&this.options.dragNodes===!0){this.drag.nodeId=t.id,t.isSelected()===!1&&this.selectionHandler.setSelection({nodes:[t.id]}),this.selectionHandler.generateClickEvent(`dragStart`,e,this.drag.pointer);for(let e of this.selectionHandler.getSelectedNodes()){let t={id:e.id,node:e,x:e.x,y:e.y,xFixed:e.options.fixed.x,yFixed:e.options.fixed.y};e.options.fixed.x=!0,e.options.fixed.y=!0,this.drag.selection.push(t)}}else this.selectionHandler.generateClickEvent(`dragStart`,e,this.drag.pointer,void 0,!0)}onDrag(e){if(this.drag.pinched===!0)return;this.body.emitter.emit(`unlockNode`);let t=this.getPointer(e.center),n=this.drag.selection;if(n&&n.length&&this.options.dragNodes===!0){this.selectionHandler.generateClickEvent(`dragging`,e,t);let r=t.x-this.drag.pointer.x,i=t.y-this.drag.pointer.y;V(n).call(n,e=>{let t=e.node;e.xFixed===!1&&(t.x=this.canvas._XconvertDOMtoCanvas(this.canvas._XconvertCanvasToDOM(e.x)+r)),e.yFixed===!1&&(t.y=this.canvas._YconvertDOMtoCanvas(this.canvas._YconvertCanvasToDOM(e.y)+i))}),this.body.emitter.emit(`startSimulation`)}else{if(e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent(`dragging`,e,t,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(t.x),y:this.canvas._YconvertDOMtoCanvas(t.y)},this.body.emitter.emit(`_requestRedraw`)}if(this.options.dragView===!0&&!e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent(`dragging`,e,t,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}let n=t.x-this.drag.pointer.x,r=t.y-this.drag.pointer.y;this.body.view.translation={x:this.drag.translation.x+n,y:this.drag.translation.y+r},this.body.emitter.emit(`_requestRedraw`)}}}onDragEnd(e){if(this.drag.dragging=!1,this.body.selectionBox.show){var t;this.body.selectionBox.show=!1;let n=this.body.selectionBox.position,r={minX:Math.min(n.start.x,n.end.x),minY:Math.min(n.start.y,n.end.y),maxX:Math.max(n.start.x,n.end.x),maxY:Math.max(n.start.y,n.end.y)},i=DF(t=this.body.nodeIndices).call(t,e=>{let t=this.body.nodes[e];return t.x>=r.minX&&t.x<=r.maxX&&t.y>=r.minY&&t.y<=r.maxY});V(i).call(i,e=>this.selectionHandler.selectObject(this.body.nodes[e]));let a=this.getPointer(e.center);this.selectionHandler.commitAndEmit(a,e),this.selectionHandler.generateClickEvent(`dragEnd`,e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit(`_requestRedraw`)}else{let t=this.drag.selection;t&&t.length?(V(t).call(t,function(e){e.node.options.fixed.x=e.xFixed,e.node.options.fixed.y=e.yFixed}),this.selectionHandler.generateClickEvent(`dragEnd`,e,this.getPointer(e.center)),this.body.emitter.emit(`startSimulation`)):(this.selectionHandler.generateClickEvent(`dragEnd`,e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit(`_requestRedraw`))}}onPinch(e){let t=this.getPointer(e.center);this.drag.pinched=!0,this.pinch.scale===void 0&&(this.pinch.scale=1);let n=this.pinch.scale*e.scale;this.zoom(n,t)}zoom(e,t){if(this.options.zoomView===!0){let n=this.body.view.scale;e<1e-5&&(e=1e-5),e>10&&(e=10);let r;this.drag!==void 0&&this.drag.dragging===!0&&(r=this.canvas.DOMtoCanvas(this.drag.pointer));let i=this.body.view.translation,a=e/n,o=(1-a)*t.x+i.x*a,s=(1-a)*t.y+i.y*a;if(this.body.view.scale=e,this.body.view.translation={x:o,y:s},r!=null){let e=this.canvas.canvasToDOM(r);this.drag.pointer.x=e.x,this.drag.pointer.y=e.y}this.body.emitter.emit(`_requestRedraw`),n<e?this.body.emitter.emit(`zoom`,{direction:`+`,scale:this.body.view.scale,pointer:t}):this.body.emitter.emit(`zoom`,{direction:`-`,scale:this.body.view.scale,pointer:t})}}onMouseWheel(e){if(this.options.zoomView===!0){if(e.deltaY!==0){let t=this.body.view.scale;t*=1+(e.deltaY<0?1:-1)*(this.options.zoomSpeed*.1);let n=this.getPointer({x:e.clientX,y:e.clientY});this.zoom(t,n)}e.preventDefault()}}onMouseMove(e){let t=this.getPointer({x:e.clientX,y:e.clientY}),n=!1;this.popup!==void 0&&(this.popup.hidden===!1&&this._checkHidePopup(t),this.popup.hidden===!1&&(n=!0,this.popup.setPosition(t.x+3,t.y-5),this.popup.show())),this.options.keyboard.autoFocus&&this.options.keyboard.bindToWindow===!1&&this.options.keyboard.enabled===!0&&this.canvas.frame.focus(),n===!1&&(this.popupTimer!==void 0&&(clearInterval(this.popupTimer),this.popupTimer=void 0),this.drag.dragging||(this.popupTimer=ML(()=>this._checkShowPopup(t),this.options.tooltipDelay))),this.options.hover===!0&&this.selectionHandler.hoverObject(e,t)}_checkShowPopup(e){let t=this.canvas._XconvertDOMtoCanvas(e.x),n=this.canvas._YconvertDOMtoCanvas(e.y),r={left:t,top:n,right:t,bottom:n},i=this.popupObj===void 0?void 0:this.popupObj.id,a=!1,o=`node`;if(this.popupObj===void 0){let e=this.body.nodeIndices,t=this.body.nodes,n,i=[];for(let o=0;o<e.length;o++)n=t[e[o]],n.isOverlappingWith(r)===!0&&(a=!0,n.getTitle()!==void 0&&i.push(e[o]));i.length>0&&(this.popupObj=t[i[i.length-1]],a=!0)}if(this.popupObj===void 0&&a===!1){let e=this.body.edgeIndices,t=this.body.edges,n,i=[];for(let a=0;a<e.length;a++)n=t[e[a]],n.isOverlappingWith(r)===!0&&n.connected===!0&&n.getTitle()!==void 0&&i.push(e[a]);i.length>0&&(this.popupObj=t[i[i.length-1]],o=`edge`)}this.popupObj===void 0?this.popup!==void 0&&(this.popup.hide(),this.body.emitter.emit(`hidePopup`)):this.popupObj.id!==i&&(this.popup===void 0&&(this.popup=new gV(this.canvas.frame)),this.popup.popupTargetType=o,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(e.x+3,e.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit(`showPopup`,this.popupObj.id))}_checkHidePopup(e){let t=this.selectionHandler._pointerToPositionObject(e),n=!1;if(this.popup.popupTargetType===`node`){if(this.body.nodes[this.popup.popupTargetId]!==void 0&&(n=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(t),n===!0)){let t=this.selectionHandler.getNodeAt(e);n=t!==void 0&&t.id===this.popup.popupTargetId}}else this.selectionHandler.getNodeAt(e)===void 0&&this.body.edges[this.popup.popupTargetId]!==void 0&&(n=this.body.edges[this.popup.popupTargetId].isOverlappingWith(t));n===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit(`hidePopup`))}},aX={},oX={},sX;function cX(){return sX?oX:(sX=1,FH()(`Set`,function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},WH()),oX)}var lX;function uX(){return lX?aX:(lX=1,cX(),aX)}var dX={},fX,pX;function mX(){if(pX)return fX;pX=1;var e=Gw(),t=TypeError;return fX=function(n){if(typeof n==`object`&&`size`in n&&`has`in n&&`add`in n&&`delete`in n&&`keys`in n)return n;throw new t(e(n)+` is not a set`)},fX}var hX,gX;function _X(){if(gX)return hX;gX=1;var e=ww(),t=QH(),n=e(`Set`),r=n.prototype;return hX={Set:n,add:t(`add`,1),has:t(`has`,1),remove:t(`delete`,1),proto:r},hX}var vX,yX;function bX(){if(yX)return vX;yX=1;var e=QC();return vX=function(t,n,r){for(var i=r?t:t.iterator,a=t.next,o,s;!(o=e(a,i)).done;)if(s=n(o.value),s!==void 0)return s},vX}var xX,SX;function CX(){if(SX)return xX;SX=1;var e=bX();return xX=function(t,n,r){return r?e(t.keys(),n,!0):t.forEach(n)},xX}var wX,TX;function EX(){if(TX)return wX;TX=1;var e=_X(),t=CX(),n=e.Set,r=e.add;return wX=function(e){var i=new n;return t(e,function(e){r(i,e)}),i},wX}var DX,OX;function kX(){return OX?DX:(OX=1,DX=function(e){return e.size},DX)}var AX,jX;function MX(){return jX?AX:(jX=1,AX=function(e){return{iterator:e,next:e.next,done:!1}},AX)}var NX,PX;function FX(){if(PX)return NX;PX=1;var e=Jw(),t=ZT(),n=QC(),r=uE(),i=MX(),a=`Invalid size`,o=RangeError,s=TypeError,c=Math.max,l=function(t,n){this.set=t,this.size=c(n,0),this.has=e(t.has),this.keys=e(t.keys)};return l.prototype={getIterator:function(){return i(t(n(this.keys,this.set)))},includes:function(e){return n(this.has,this.set,e)}},NX=function(e){t(e);var n=+e.size;if(n!==n)throw new s(a);var i=r(n);if(i<0)throw new o(a);return new l(e,i)},NX}var IX,LX;function RX(){if(LX)return IX;LX=1;var e=mX(),t=_X(),n=EX(),r=kX(),i=FX(),a=CX(),o=bX(),s=t.has,c=t.remove;return IX=function(t){var l=e(this),u=i(t),d=n(l);return r(l)<=u.size?a(l,function(e){u.includes(e)&&c(d,e)}):o(u.getIterator(),function(e){s(d,e)&&c(d,e)}),d},IX}var zX,BX;function VX(){return BX?zX:(BX=1,zX=function(){return!1},zX)}var HX;function UX(){if(HX)return dX;HX=1;var e=z(),t=RX(),n=I();return e({target:`Set`,proto:!0,real:!0,forced:!VX()(`difference`,function(e){return e.size===0})||n(function(){var e={size:1,has:function(){return!0},keys:function(){var e=0;return{next:function(){var n=e++>1;return t.has(1)&&t.clear(),{done:n,value:2}}}}},t=new Set([1,2,3,4]);return t.difference(e).size!==3})},{difference:t}),dX}var WX={},GX,KX;function qX(){if(KX)return GX;KX=1;var e=mX(),t=_X(),n=kX(),r=FX(),i=CX(),a=bX(),o=t.Set,s=t.add,c=t.has;return GX=function(t){var l=e(this),u=r(t),d=new o;return n(l)>u.size?a(u.getIterator(),function(e){c(l,e)&&s(d,e)}):i(l,function(e){u.includes(e)&&s(d,e)}),d},GX}var JX;function YX(){if(JX)return WX;JX=1;var e=z(),t=I(),n=qX();return e({target:`Set`,proto:!0,real:!0,forced:!VX()(`intersection`,function(e){return e.size===2&&e.has(1)&&e.has(2)})||t(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!==`3,2`})},{intersection:n}),WX}var XX={},ZX,QX;function $X(){if(QX)return ZX;QX=1;var e=mX(),t=_X().has,n=kX(),r=FX(),i=CX(),a=bX(),o=EH();return ZX=function(s){var c=e(this),l=r(s);if(n(c)<=l.size)return i(c,function(e){if(l.includes(e))return!1},!0)!==!1;var u=l.getIterator();return a(u,function(e){if(t(c,e))return o(u,`normal`,!1)})!==!1},ZX}var eZ;function tZ(){if(eZ)return XX;eZ=1;var e=z(),t=$X();return e({target:`Set`,proto:!0,real:!0,forced:!VX()(`isDisjointFrom`,function(e){return!e})},{isDisjointFrom:t}),XX}var nZ={},rZ,iZ;function aZ(){if(iZ)return rZ;iZ=1;var e=mX(),t=kX(),n=CX(),r=FX();return rZ=function(i){var a=e(this),o=r(i);return t(a)>o.size?!1:n(a,function(e){if(!o.includes(e))return!1},!0)!==!1},rZ}var oZ;function sZ(){if(oZ)return nZ;oZ=1;var e=z(),t=aZ();return e({target:`Set`,proto:!0,real:!0,forced:!VX()(`isSubsetOf`,function(e){return e})},{isSubsetOf:t}),nZ}var cZ={},lZ,uZ;function dZ(){if(uZ)return lZ;uZ=1;var e=mX(),t=_X().has,n=kX(),r=FX(),i=bX(),a=EH();return lZ=function(o){var s=e(this),c=r(o);if(n(s)<c.size)return!1;var l=c.getIterator();return i(l,function(e){if(!t(s,e))return a(l,`normal`,!1)})!==!1},lZ}var fZ;function pZ(){if(fZ)return cZ;fZ=1;var e=z(),t=dZ();return e({target:`Set`,proto:!0,real:!0,forced:!VX()(`isSupersetOf`,function(e){return!e})},{isSupersetOf:t}),cZ}var mZ={},hZ,gZ;function _Z(){if(gZ)return hZ;gZ=1;var e=mX(),t=_X(),n=EX(),r=FX(),i=bX(),a=t.add,o=t.has,s=t.remove;return hZ=function(t){var c=e(this),l=r(t).getIterator(),u=n(c);return i(l,function(e){o(c,e)?s(u,e):a(u,e)}),u},hZ}var vZ,yZ;function bZ(){return yZ?vZ:(yZ=1,vZ=function(e){try{var t=new Set,n=t[e]({size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return t.clear(),t.add(4),function(){return{done:!0}}}})}});return n.size===1&&n.values().next().value===4}catch{return!1}},vZ)}var xZ;function SZ(){if(xZ)return mZ;xZ=1;var e=z(),t=_Z(),n=bZ();return e({target:`Set`,proto:!0,real:!0,forced:!VX()(`symmetricDifference`)||!n(`symmetricDifference`)},{symmetricDifference:t}),mZ}var CZ={},wZ,TZ;function EZ(){if(TZ)return wZ;TZ=1;var e=mX(),t=_X().add,n=EX(),r=FX(),i=bX();return wZ=function(a){var o=e(this),s=r(a).getIterator(),c=n(o);return i(s,function(e){t(c,e)}),c},wZ}var DZ;function OZ(){if(DZ)return CZ;DZ=1;var e=z(),t=EZ(),n=bZ();return e({target:`Set`,proto:!0,real:!0,forced:!VX()(`union`)||!n(`union`)},{union:t}),CZ}var kZ,AZ;function jZ(){return AZ?kZ:(AZ=1,Tj(),uX(),UX(),YX(),tZ(),sZ(),pZ(),SZ(),OZ(),lU(),kZ=R().Set,kZ)}var MZ,NZ;function PZ(){if(NZ)return MZ;NZ=1;var e=jZ();return Aj(),MZ=e,MZ}var FZ,IZ;function LZ(){return IZ?FZ:(IZ=1,FZ=PZ(),FZ)}var RZ=F(LZ()),zZ={},BZ={},VZ,HZ;function UZ(){if(HZ)return VZ;HZ=1;var e=L(),t=RH(),n=mH().getWeakData,r=MH(),i=ZT(),a=uw(),o=yw(),s=kH(),c=_k(),l=vT(),u=mk(),d=u.set,f=u.getterFor,p=c.find,m=c.findIndex,h=e([].splice),g=0,_=function(e){return e.frozen||=new v},v=function(){this.entries=[]},y=function(e,t){return p(e.entries,function(e){return e[0]===t})};return v.prototype={get:function(e){var t=y(this,e);if(t)return t[1]},has:function(e){return!!y(this,e)},set:function(e,t){var n=y(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=m(this.entries,function(t){return t[0]===e});return~t&&h(this.entries,t,1),!!~t}},VZ={getConstructor:function(e,c,u,p){var m=e(function(e,t){r(e,h),d(e,{type:c,id:g++,frozen:null}),a(t)||s(t,e[p],{that:e,AS_ENTRIES:u})}),h=m.prototype,v=f(c),y=function(e,t,r){var a=v(e),o=n(i(t),!0);return o===!0?_(a).set(t,r):o[a.id]=r,e};return t(h,{delete:function(e){var t=v(this);if(!o(e))return!1;var r=n(e);return r===!0?_(t).delete(e):r&&l(r,t.id)&&delete r[t.id]},has:function(e){var t=v(this);if(!o(e))return!1;var r=n(e);return r===!0?_(t).has(e):r&&l(r,t.id)}}),t(h,u?{get:function(e){var t=v(this);if(o(e)){var r=n(e);if(r===!0)return _(t).get(e);if(r)return r[t.id]}},set:function(e,t){return y(this,e,t)}}:{add:function(e){return y(this,e,!0)}}),m}},VZ}var WZ;function GZ(){if(WZ)return BZ;WZ=1;var e=fH(),t=EC(),n=L(),r=RH(),i=mH(),a=FH(),o=UZ(),s=yw(),c=mk().enforce,l=I(),u=dk(),d=Object,f=Array.isArray,p=d.isExtensible,m=d.isFrozen,h=d.isSealed,g=d.freeze,_=d.seal,v=!t.ActiveXObject&&`ActiveXObject`in t,y,b=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},x=a(`WeakMap`,b,o),S=x.prototype,C=n(S.set),w=function(){return e&&l(function(){var e=g([]);return C(new x,e,1),!m(e)})};if(u)if(v){y=o.getConstructor(b,`WeakMap`,!0),i.enable();var T=n(S.delete),E=n(S.has),D=n(S.get);r(S,{delete:function(e){if(s(e)&&!p(e)){var t=c(this);return t.frozen||=new y,T(this,e)||t.frozen.delete(e)}return T(this,e)},has:function(e){if(s(e)&&!p(e)){var t=c(this);return t.frozen||=new y,E(this,e)||t.frozen.has(e)}return E(this,e)},get:function(e){if(s(e)&&!p(e)){var t=c(this);return t.frozen||=new y,E(this,e)?D(this,e):t.frozen.get(e)}return D(this,e)},set:function(e,t){if(s(e)&&!p(e)){var n=c(this);n.frozen||=new y,E(this,e)?C(this,e,t):n.frozen.set(e,t)}else C(this,e,t);return this}})}else w()&&r(S,{set:function(e,t){var n;return f(e)&&(m(e)?n=g:h(e)&&(n=_)),C(this,e,t),n&&n(e),this}});return BZ}var KZ;function qZ(){return KZ?zZ:(KZ=1,GZ(),zZ)}var JZ,YZ;function XZ(){return YZ?JZ:(YZ=1,Tj(),qZ(),JZ=R().WeakMap,JZ)}var ZZ,QZ;function $Z(){if(QZ)return ZZ;QZ=1;var e=XZ();return Aj(),ZZ=e,ZZ}var eQ,tQ;function nQ(){return tQ?eQ:(tQ=1,eQ=$Z(),eQ)}var rQ=F(nQ());function iQ(e,t,n){aQ(e,t),t.set(e,n)}function aQ(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function oQ(e,t,n){return e.set(sQ(e,t),n),n}function J(e,t){return e.get(sQ(e,t))}function sQ(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function cQ(e,t){let n=new RZ;for(let r of t)e.has(r)||n.add(r);return n}var lQ=new rQ,uQ=new rQ,dQ=class{constructor(){iQ(this,lQ,new RZ),iQ(this,uQ,new RZ)}get size(){return J(uQ,this).size}add(){var e=[...arguments];for(let t of e)J(uQ,this).add(t)}delete(){var e=[...arguments];for(let t of e)J(uQ,this).delete(t)}clear(){J(uQ,this).clear()}getSelection(){return[...J(uQ,this)]}getChanges(){return{added:[...cQ(J(lQ,this),J(uQ,this))],deleted:[...cQ(J(uQ,this),J(lQ,this))],previous:[...new RZ(J(lQ,this))],current:[...new RZ(J(uQ,this))]}}commit(){let e=this.getChanges();oQ(lQ,this,J(uQ,this)),oQ(uQ,this,new RZ(J(lQ,this)));for(let t of e.added)t.select();for(let t of e.deleted)t.unselect();return e}},fQ=new rQ,pQ=new rQ,mQ=new rQ,hQ=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:()=>{};iQ(this,fQ,new dQ),iQ(this,pQ,new dQ),iQ(this,mQ,void 0),oQ(mQ,this,e)}get sizeNodes(){return J(fQ,this).size}get sizeEdges(){return J(pQ,this).size}getNodes(){return J(fQ,this).getSelection()}getEdges(){return J(pQ,this).getSelection()}addNodes(){J(fQ,this).add(...arguments)}addEdges(){J(pQ,this).add(...arguments)}deleteNodes(e){J(fQ,this).delete(e)}deleteEdges(e){J(pQ,this).delete(e)}clear(){J(fQ,this).clear(),J(pQ,this).clear()}commit(){let e={nodes:J(fQ,this).commit(),edges:J(pQ,this).commit()};var t=[...arguments];return J(mQ,this).call(this,e,...t),e}},gQ=class{constructor(e,t){this.body=e,this.canvas=t,this._selectionAccumulator=new hQ,this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},QE(this.options,this.defaultOptions),this.body.emitter.on(`_dataChanged`,()=>{this.updateSelection()})}setOptions(e){e!==void 0&&LB([`multiselect`,`hoverConnectedEdges`,`selectable`,`selectConnectedEdges`],this.options,e)}selectOnPoint(e){let t=!1;if(this.options.selectable===!0){let n=this.getNodeAt(e)||this.getEdgeAt(e);this.unselectAll(),n!==void 0&&(t=this.selectObject(n)),this.body.emitter.emit(`_requestRedraw`)}return t}selectAdditionalOnPoint(e){let t=!1;if(this.options.selectable===!0){let n=this.getNodeAt(e)||this.getEdgeAt(e);n!==void 0&&(t=!0,n.isSelected()===!0?this.deselectObject(n):this.selectObject(n),this.body.emitter.emit(`_requestRedraw`))}return t}_initBaseEvent(e,t){let n={};return n.pointer={DOM:{x:t.x,y:t.y},canvas:this.canvas.DOMtoCanvas(t)},n.event=e,n}generateClickEvent(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0&&arguments[4],a=this._initBaseEvent(t,n);if(i===!0)a.nodes=[],a.edges=[];else{let e=this.getSelection();a.nodes=e.nodes,a.edges=e.edges}r!==void 0&&(a.previousSelection=r),e==`click`&&(a.items=this.getClickedItems(n)),t.controlEdge!==void 0&&(a.controlEdge=t.controlEdge),this.body.emitter.emit(e,a)}selectObject(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.selectConnectedEdges;return e===void 0?!1:(e instanceof LJ?(t===!0&&this._selectionAccumulator.addEdges(...e.edges),this._selectionAccumulator.addNodes(e)):this._selectionAccumulator.addEdges(e),!0)}deselectObject(e){e.isSelected()===!0&&(e.selected=!1,this._removeFromSelection(e))}_getAllNodesOverlappingWith(e){let t=[],n=this.body.nodes;for(let r=0;r<this.body.nodeIndices.length;r++){let i=this.body.nodeIndices[r];n[i].isOverlappingWith(e)&&t.push(i)}return t}_pointerToPositionObject(e){let t=this.canvas.DOMtoCanvas(e);return{left:t.x-1,top:t.y+1,right:t.x+1,bottom:t.y-1}}getNodeAt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this._pointerToPositionObject(e),r=this._getAllNodesOverlappingWith(n);if(r.length>0)return t===!0?this.body.nodes[r[r.length-1]]:r[r.length-1]}_getEdgesOverlappingWith(e,t){let n=this.body.edges;for(let r=0;r<this.body.edgeIndices.length;r++){let i=this.body.edgeIndices[r];n[i].isOverlappingWith(e)&&t.push(i)}}_getAllEdgesOverlappingWith(e){let t=[];return this._getEdgesOverlappingWith(e,t),t}getEdgeAt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this.canvas.DOMtoCanvas(e),r=10,i=null,a=this.body.edges;for(let e=0;e<this.body.edgeIndices.length;e++){let t=this.body.edgeIndices[e],o=a[t];if(o.connected){let e=o.from.x,a=o.from.y,s=o.to.x,c=o.to.y,l=o.edgeType.getDistanceToEdge(e,a,s,c,n.x,n.y);l<r&&(i=t,r=l)}}if(i!==null)return t===!0?this.body.edges[i]:i}_addToHover(e){e instanceof LJ?this.hoverObj.nodes[e.id]=e:this.hoverObj.edges[e.id]=e}_removeFromSelection(e){e instanceof LJ?(this._selectionAccumulator.deleteNodes(e),this._selectionAccumulator.deleteEdges(...e.edges)):this._selectionAccumulator.deleteEdges(e)}unselectAll(){this._selectionAccumulator.clear()}getSelectedNodeCount(){return this._selectionAccumulator.sizeNodes}getSelectedEdgeCount(){return this._selectionAccumulator.sizeEdges}_hoverConnectedEdges(e){for(let t=0;t<e.edges.length;t++){let n=e.edges[t];n.hover=!0,this._addToHover(n)}}emitBlurEvent(e,t,n){let r=this._initBaseEvent(e,t);n.hover===!0&&(n.hover=!1,n instanceof LJ?(r.node=n.id,this.body.emitter.emit(`blurNode`,r)):(r.edge=n.id,this.body.emitter.emit(`blurEdge`,r)))}emitHoverEvent(e,t,n){let r=this._initBaseEvent(e,t),i=!1;return n.hover===!1&&(n.hover=!0,this._addToHover(n),i=!0,n instanceof LJ?(r.node=n.id,this.body.emitter.emit(`hoverNode`,r)):(r.edge=n.id,this.body.emitter.emit(`hoverEdge`,r))),i}hoverObject(e,t){let n=this.getNodeAt(t);n===void 0&&(n=this.getEdgeAt(t));let r=!1;for(let i in this.hoverObj.nodes)Object.prototype.hasOwnProperty.call(this.hoverObj.nodes,i)&&(n===void 0||n instanceof LJ&&n.id!=i||n instanceof CY)&&(this.emitBlurEvent(e,t,this.hoverObj.nodes[i]),delete this.hoverObj.nodes[i],r=!0);for(let i in this.hoverObj.edges)Object.prototype.hasOwnProperty.call(this.hoverObj.edges,i)&&(r===!0?(this.hoverObj.edges[i].hover=!1,delete this.hoverObj.edges[i]):(n===void 0||n instanceof CY&&n.id!=i||n instanceof LJ&&!n.hover)&&(this.emitBlurEvent(e,t,this.hoverObj.edges[i]),delete this.hoverObj.edges[i],r=!0));if(n!==void 0){let i=WM(this.hoverObj.edges).length,a=WM(this.hoverObj.nodes).length,o=n instanceof CY&&i===0&&a===0,s=n instanceof LJ&&i===0&&a===0;(r||o||s)&&(r=this.emitHoverEvent(e,t,n)),n instanceof LJ&&this.options.hoverConnectedEdges===!0&&this._hoverConnectedEdges(n)}r===!0&&this.body.emitter.emit(`_requestRedraw`)}commitWithoutEmitting(){this._selectionAccumulator.commit()}commitAndEmit(e,t){let n=!1,r=this._selectionAccumulator.commit(),i={nodes:r.nodes.previous,edges:r.edges.previous};r.edges.deleted.length>0&&(this.generateClickEvent(`deselectEdge`,t,e,i),n=!0),r.nodes.deleted.length>0&&(this.generateClickEvent(`deselectNode`,t,e,i),n=!0),r.nodes.added.length>0&&(this.generateClickEvent(`selectNode`,t,e),n=!0),r.edges.added.length>0&&(this.generateClickEvent(`selectEdge`,t,e),n=!0),n===!0&&this.generateClickEvent(`select`,t,e)}getSelection(){return{nodes:this.getSelectedNodeIds(),edges:this.getSelectedEdgeIds()}}getSelectedNodes(){return this._selectionAccumulator.getNodes()}getSelectedEdges(){return this._selectionAccumulator.getEdges()}getSelectedNodeIds(){var e;return jM(e=this._selectionAccumulator.getNodes()).call(e,e=>e.id)}getSelectedEdgeIds(){var e;return jM(e=this._selectionAccumulator.getEdges()).call(e,e=>e.id)}setSelection(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!e||!e.nodes&&!e.edges)throw TypeError(`Selection must be an object with nodes and/or edges properties`);if((t.unselectAll||t.unselectAll===void 0)&&this.unselectAll(),e.nodes)for(let n of e.nodes){let e=this.body.nodes[n];if(!e)throw RangeError(`Node with id "`+n+`" not found`);this.selectObject(e,t.highlightEdges)}if(e.edges)for(let t of e.edges){let e=this.body.edges[t];if(!e)throw RangeError(`Edge with id "`+t+`" not found`);this.selectObject(e)}this.body.emitter.emit(`_requestRedraw`),this._selectionAccumulator.commit()}selectNodes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!e||e.length===void 0)throw`Selection must be an array with ids`;this.setSelection({nodes:e},{highlightEdges:t})}selectEdges(e){if(!e||e.length===void 0)throw`Selection must be an array with ids`;this.setSelection({edges:e})}updateSelection(){for(let e in this._selectionAccumulator.getNodes())Object.prototype.hasOwnProperty.call(this.body.nodes,e.id)||this._selectionAccumulator.deleteNodes(e);for(let e in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,e.id)||this._selectionAccumulator.deleteEdges(e)}getClickedItems(e){let t=this.canvas.DOMtoCanvas(e),n=[],r=this.body.nodeIndices,i=this.body.nodes;for(let e=r.length-1;e>=0;e--){let a=i[r[e]].getItemsOnPoint(t);n.push.apply(n,a)}let a=this.body.edgeIndices,o=this.body.edges;for(let e=a.length-1;e>=0;e--){let r=o[a[e]].getItemsOnPoint(t);n.push.apply(n,r)}return n}},_Q={},vQ,yQ;function bQ(){if(yQ)return vQ;yQ=1;var e=nD(),t=Math.floor,n=function(r,i){var a=r.length;if(a<8)for(var o=1,s,c;o<a;){for(c=o,s=r[o];c&&i(r[c-1],s)>0;)r[c]=r[--c];c!==o++&&(r[c]=s)}else for(var l=t(a/2),u=n(e(r,0,l),i),d=n(e(r,l),i),f=u.length,p=d.length,m=0,h=0;m<f||h<p;)r[m+h]=m<f&&h<p?i(u[m],d[h])<=0?u[m++]:d[h++]:m<f?u[m++]:d[h++];return r};return vQ=n,vQ}var xQ,SQ;function CQ(){if(SQ)return xQ;SQ=1;var e=Aw().match(/firefox\/(\d+)/i);return xQ=!!e&&+e[1],xQ}var wQ,TQ;function EQ(){if(TQ)return wQ;TQ=1;var e=Aw();return wQ=/MSIE|Trident/.test(e),wQ}var DQ,OQ;function kQ(){if(OQ)return DQ;OQ=1;var e=Aw().match(/AppleWebKit\/(\d+)\./);return DQ=!!e&&+e[1],DQ}var AQ;function jQ(){if(AQ)return _Q;AQ=1;var e=z(),t=L(),n=Jw(),r=hT(),i=yE(),a=qN(),o=CO(),s=I(),c=bQ(),l=sN(),u=CQ(),d=EQ(),f=Nw(),p=kQ(),m=[],h=t(m.sort),g=t(m.push),_=s(function(){m.sort(void 0)}),v=s(function(){m.sort(null)}),y=l(`sort`),b=!s(function(){if(f)return f<70;if(!(u&&u>3)){if(d)return!0;if(p)return p<603;var e=``,t,n,r,i;for(t=65;t<76;t++){switch(n=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(i=0;i<47;i++)m.push({k:n+i,v:r})}for(m.sort(function(e,t){return t.v-e.v}),i=0;i<m.length;i++)n=m[i].k.charAt(0),e.charAt(e.length-1)!==n&&(e+=n);return e!==`DGBEFHACIJK`}}),x=_||!v||!y||!b,S=function(e){return function(t,n){return n===void 0?-1:t===void 0?1:e===void 0?o(t)>o(n)?1:-1:+e(t,n)||0}};return e({target:`Array`,proto:!0,forced:x},{sort:function(e){e!==void 0&&n(e);var t=r(this);if(b)return e===void 0?h(t):h(t,e);var o=[],s=i(t),l,u;for(u=0;u<s;u++)u in t&&g(o,t[u]);for(c(o,S(e)),l=i(o),u=0;u<l;)t[u]=o[u++];for(;u<s;)a(t,u++);return t}}),_Q}var MQ,NQ;function PQ(){return NQ?MQ:(NQ=1,jQ(),MQ=uD()(`Array`,`sort`),MQ)}var FQ,IQ;function LQ(){if(IQ)return FQ;IQ=1;var e=Dw(),t=PQ(),n=Array.prototype;return FQ=function(r){var i=r.sort;return r===n||e(n,r)&&i===n.sort?t:i},FQ}var RQ,zQ;function BQ(){return zQ?RQ:(zQ=1,RQ=LQ(),RQ)}var VQ,HQ;function UQ(){return HQ?VQ:(HQ=1,VQ=BQ(),VQ)}var WQ=F(UQ()),GQ={},KQ,qQ;function JQ(){if(qQ)return KQ;qQ=1;var e=Jw(),t=hT(),n=sw(),r=yE(),i=TypeError,a=`Reduce of empty array with no initial value`,o=function(o){return function(s,c,l,u){var d=t(s),f=n(d),p=r(d);if(e(c),p===0&&l<2)throw new i(a);var m=o?p-1:0,h=o?-1:1;if(l<2)for(;;){if(m in f){u=f[m],m+=h;break}if(m+=h,o?m<0:p<=m)throw new i(a)}for(;o?m>=0:p>m;m+=h)m in f&&(u=c(u,f[m],m,d));return u}};return KQ={left:o(!1),right:o(!0)},KQ}var YQ,XQ;function ZQ(){return XQ?YQ:(XQ=1,YQ=fL()===`NODE`,YQ)}var QQ;function $Q(){if(QQ)return GQ;QQ=1;var e=z(),t=JQ().left,n=sN(),r=Nw();return e({target:`Array`,proto:!0,forced:!ZQ()&&r>79&&r<83||!n(`reduce`)},{reduce:function(e){var n=arguments.length;return t(this,e,n,n>1?arguments[1]:void 0)}}),GQ}var e$,t$;function n$(){return t$?e$:(t$=1,$Q(),e$=uD()(`Array`,`reduce`),e$)}var r$,i$;function a$(){if(i$)return r$;i$=1;var e=Dw(),t=n$(),n=Array.prototype;return r$=function(r){var i=r.reduce;return r===n||e(n,r)&&i===n.reduce?t:i},r$}var o$,s$;function c$(){return s$?o$:(s$=1,o$=a$(),o$)}var l$,u$;function d$(){return u$?l$:(u$=1,l$=c$(),l$)}var f$=F(d$()),p$=class{abstract(){throw Error(`Can't instantiate abstract class!`)}fake_use(){}curveType(){return this.abstract()}getPosition(e){return this.fake_use(e),this.abstract()}setPosition(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(e,t,n),this.abstract()}getTreeSize(e){return this.fake_use(e),this.abstract()}sort(e){this.fake_use(e),this.abstract()}fix(e,t){this.fake_use(e,t),this.abstract()}shift(e,t){this.fake_use(e,t),this.abstract()}},m$=class extends p${constructor(e){super(),this.layout=e}curveType(){return`horizontal`}getPosition(e){return e.x}setPosition(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;n!==void 0&&this.layout.hierarchical.addToOrdering(e,n),e.x=t}getTreeSize(e){let t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:t.min_x,max:t.max_x}}sort(e){WQ(e).call(e,function(e,t){return e.x-t.x})}fix(e,t){e.y=this.layout.options.hierarchical.levelSeparation*t,e.options.fixed.y=!0}shift(e,t){this.layout.body.nodes[e].x+=t}},h$=class extends p${constructor(e){super(),this.layout=e}curveType(){return`vertical`}getPosition(e){return e.y}setPosition(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;n!==void 0&&this.layout.hierarchical.addToOrdering(e,n),e.y=t}getTreeSize(e){let t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:t.min_y,max:t.max_y}}sort(e){WQ(e).call(e,function(e,t){return e.y-t.y})}fix(e,t){e.x=this.layout.options.hierarchical.levelSeparation*t,e.options.fixed.x=!0}shift(e,t){this.layout.body.nodes[e].y+=t}},g$={},_$;function v$(){if(_$)return g$;_$=1;var e=z(),t=_k().every;return e({target:`Array`,proto:!0,forced:!sN()(`every`)},{every:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),g$}var y$,b$;function x$(){return b$?y$:(b$=1,v$(),y$=uD()(`Array`,`every`),y$)}var S$,C$;function w$(){if(C$)return S$;C$=1;var e=Dw(),t=x$(),n=Array.prototype;return S$=function(r){var i=r.every;return r===n||e(n,r)&&i===n.every?t:i},S$}var T$,E$;function D$(){return E$?T$:(E$=1,T$=w$(),T$)}var O$,k$;function A$(){return k$?O$:(k$=1,O$=D$(),O$)}var j$=F(A$());function M$(e,t){let n=new RZ;return V(e).call(e,e=>{var t;V(t=e.edges).call(t,e=>{e.connected&&n.add(e)})}),V(n).call(n,e=>{let n=e.from.id,r=e.to.id;t[n]??(t[n]=0),(t[r]==null||t[n]>=t[r])&&(t[r]=t[n]+1)}),t}function N$(e){return F$(t=>{var n,r;return j$(n=DF(r=t.edges).call(r,t=>e.has(t.toId))).call(n,e=>e.to===t)},(e,t)=>t>e,`from`,e)}function P$(e){return F$(t=>{var n,r;return j$(n=DF(r=t.edges).call(r,t=>e.has(t.toId))).call(n,e=>e.from===t)},(e,t)=>t<e,`to`,e)}function F$(e,t,n,r){var i;let a=zI(null),o=f$(i=[...sJ(r).call(r)]).call(i,(e,t)=>e+1+t.edges.length,0),s=n+`Id`,c=n===`to`?1:-1;for(let[i,d]of r){if(!r.has(i)||!e(d))continue;a[i]=0;let f=[d],p=0,m;for(;m=f.pop();){var l,u;if(!r.has(i))continue;let e=a[m.id]+c;if(V(l=DF(u=m.edges).call(u,e=>e.connected&&e.to!==e.from&&e[n]!==m&&r.has(e.toId)&&r.has(e.fromId))).call(l,r=>{let i=r[s],o=a[i];(o==null||t(e,o))&&(a[i]=e,f.push(r[n]))}),p>o)return M$(r,a);++p}}return a}var I$=class{constructor(){this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}addRelation(e,t){this.childrenReference[e]===void 0&&(this.childrenReference[e]=[]),this.childrenReference[e].push(t),this.parentReference[t]===void 0&&(this.parentReference[t]=[]),this.parentReference[t].push(e)}checkIfTree(){for(let e in this.parentReference)if(this.parentReference[e].length>1){this.isTree=!1;return}this.isTree=!0}numTrees(){return this.treeIndex+1}setTreeIndex(e,t){t!==void 0&&this.trees[e.id]===void 0&&(this.trees[e.id]=t,this.treeIndex=Math.max(t,this.treeIndex))}ensureLevel(e){this.levels[e]===void 0&&(this.levels[e]=0)}getMaxLevel(e){let t={},n=e=>{if(t[e]!==void 0)return t[e];let r=this.levels[e];if(this.childrenReference[e]){let t=this.childrenReference[e];if(t.length>0)for(let e=0;e<t.length;e++)r=Math.max(r,n(t[e]))}return t[e]=r,r};return n(e)}levelDownstream(e,t){this.levels[t.id]===void 0&&(this.levels[e.id]===void 0&&(this.levels[e.id]=0),this.levels[t.id]=this.levels[e.id]+1)}setMinLevelToZero(){var e;let t=new yU,n=0,r=WQ(e=[...new RZ(UF(this.levels))]).call(e,(e,t)=>e-t);for(let e of r)t.set(e,n++);for(let e in this.levels)Object.prototype.hasOwnProperty.call(this.levels,e)&&(this.levels[e]=t.get(this.levels[e]))}getTreeSize(e,t){let n=1e9,r=-1e9,i=1e9,a=-1e9;for(let o in this.trees)if(Object.prototype.hasOwnProperty.call(this.trees,o)&&this.trees[o]===t){let t=e[o];n=Math.min(t.x,n),r=Math.max(t.x,r),i=Math.min(t.y,i),a=Math.max(t.y,a)}return{min_x:n,max_x:r,min_y:i,max_y:a}}hasSameParent(e,t){let n=this.parentReference[e.id],r=this.parentReference[t.id];if(n===void 0||r===void 0)return!1;for(let e=0;e<n.length;e++)for(let t=0;t<r.length;t++)if(n[e]==r[t])return!0;return!1}inSameSubNetwork(e,t){return this.trees[e.id]===this.trees[t.id]}getLevels(){return WM(this.distributionOrdering)}addToOrdering(e,t){this.distributionOrdering[t]===void 0&&(this.distributionOrdering[t]=[]);let n=!1,r=this.distributionOrdering[t];for(let t in r)if(r[t]===e){n=!0;break}n||(this.distributionOrdering[t].push(e),this.distributionIndex[e.id]=this.distributionOrdering[t].length-1)}},L$=class{constructor(e){this.body=e,this._resetRNG(Math.random()+`:`+rN()),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`}},QE(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){this.body.emitter.on(`_dataChanged`,()=>{this.setupHierarchicalLayout()}),this.body.emitter.on(`_dataLoaded`,()=>{this.layoutNetwork()}),this.body.emitter.on(`_resetHierarchicalLayout`,()=>{this.setupHierarchicalLayout()}),this.body.emitter.on(`_adjustEdgesForHierarchicalLayout`,()=>{if(this.options.hierarchical.enabled!==!0)return;let e=this.direction.curveType();this.body.emitter.emit(`_forceDisableDynamicCurves`,e,!1)})}setOptions(e,t){if(e!==void 0){let n=this.options.hierarchical,r=n.enabled;if(LB([`randomSeed`,`improvedLayout`,`clusterThreshold`],this.options,e),tV(this.options,e,`hierarchical`),e.randomSeed!==void 0&&this._resetRNG(e.randomSeed),n.enabled===!0)return r===!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(t);if(r===!0)return this.body.emitter.emit(`refresh`),U(t,this.optionsBackup)}return t}_resetRNG(e){this.initialRandomSeed=e,this._rng=bB(this.initialRandomSeed)}adaptAllOptionsForHierarchicalLayout(e){if(this.options.hierarchical.enabled===!0){let t=this.optionsBackup.physics;e.physics===void 0||e.physics===!0?(e.physics={enabled:t.enabled===void 0||t.enabled,solver:`hierarchicalRepulsion`},t.enabled=t.enabled===void 0||t.enabled,t.solver=t.solver||`barnesHut`):typeof e.physics==`object`?(t.enabled=e.physics.enabled===void 0||e.physics.enabled,t.solver=e.physics.solver||`barnesHut`,e.physics.solver=`hierarchicalRepulsion`):e.physics!==!1&&(t.solver=`barnesHut`,e.physics={solver:`hierarchicalRepulsion`});let 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{let t=e.edges.smooth;t.type!==void 0&&t.type!==`dynamic`&&(n=t.type),this.optionsBackup.edges={smooth:{enabled:t.enabled===void 0||t.enabled,type:t.type===void 0?`dynamic`:t.type,roundness:t.roundness===void 0?.5:t.roundness,forceDirection:t.forceDirection!==void 0&&t.forceDirection}},e.edges.smooth={enabled:t.enabled===void 0||t.enabled,type:n,roundness:t.roundness===void 0?.5:t.roundness,forceDirection:t.forceDirection!==void 0&&t.forceDirection}}this.body.emitter.emit(`_forceDisableDynamicCurves`,n)}return e}positionInitially(e){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);let t=e.length+50;for(let n=0;n<e.length;n++){let r=e[n],i=2*Math.PI*this._rng();r.x===void 0&&(r.x=t*Math.cos(i)),r.y===void 0&&(r.y=t*Math.sin(i))}}}layoutNetwork(){if(this.options.hierarchical.enabled!==!0&&this.options.improvedLayout===!0){let e=this.body.nodeIndices,t=0;for(let n=0;n<e.length;n++)this.body.nodes[e[n]].predefinedPosition===!0&&(t+=1);if(t<.5*e.length){let t=0,n=this.options.clusterThreshold,r={clusterNodeProperties:{shape:`ellipse`,label:``,group:``,font:{multi:!1}},clusterEdgeProperties:{label:``,font:{multi:!1},smooth:{enabled:!1}}};if(e.length>n){let i=e.length;for(;e.length>n&&t<=10;){t+=1;let n=e.length;if(t%3==0?this.body.modules.clustering.clusterBridges(r):this.body.modules.clustering.clusterOutliers(r),n==e.length&&t%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*i)})}t>10&&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(let t=0;t<e.length;t++){let n=this.body.nodes[e[t]];n.predefinedPosition===!1&&(n.x+=(.5-this._rng())*70,n.y+=(.5-this._rng())*70)}this._declusterAll(),this.body.emitter.emit(`_repositionBezierNodes`)}}}_shiftToCenter(){let e=BY.getRangeCore(this.body.nodes,this.body.nodeIndices),t=BY.findCenter(e);for(let e=0;e<this.body.nodeIndices.length;e++){let n=this.body.nodes[this.body.nodeIndices[e]];n.x-=t.x,n.y-=t.y}}_declusterAll(){let e=!0;for(;e===!0;){e=!1;for(let t=0;t<this.body.nodeIndices.length;t++)this.body.nodes[this.body.nodeIndices[t]].isCluster===!0&&(e=!0,this.body.modules.clustering.openCluster(this.body.nodeIndices[t],{},!1));e===!0&&this.body.emitter.emit(`_dataChanged`)}}getSeed(){return this.initialRandomSeed}setupHierarchicalLayout(){if(this.options.hierarchical.enabled===!0&&this.body.nodeIndices.length>0){let e,t,n=!1,r=!1;for(t in this.lastNodeOnLevel={},this.hierarchical=new I$,this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&(e=this.body.nodes[t],e.options.level===void 0?r=!0:(n=!0,this.hierarchical.levels[t]=e.options.level));if(r===!0&&n===!0)throw Error(`To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.`);{if(r===!0){let e=this.options.hierarchical.sortMethod;e===`hubsize`?this._determineLevelsByHubsize():e===`directed`?this._determineLevelsDirected():e===`custom`&&this._determineLevelsCustomCallback()}for(let e in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,e)&&this.hierarchical.ensureLevel(e);let e=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(e),this._condenseHierarchy(),this._shiftToCenter()}}}_condenseHierarchy(){var e=this;let t=!1,n={},r=()=>{let e=a(),t=0;for(let n=0;n<e.length-1;n++){let r=e[n].max-e[n+1].min;t+=r+this.options.hierarchical.treeSpacing,i(n+1,t)}},i=(e,t)=>{let n=this.hierarchical.trees;for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&n[r]===e&&this.direction.shift(r,t)},a=()=>{let e=[];for(let t=0;t<this.hierarchical.numTrees();t++)e.push(this.direction.getTreeSize(t));return e},o=(e,t)=>{if(!t[e.id]&&(t[e.id]=!0,this.hierarchical.childrenReference[e.id])){let n=this.hierarchical.childrenReference[e.id];if(n.length>0)for(let e=0;e<n.length;e++)o(this.body.nodes[n[e]],t)}},s=function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e9,r=1e9,i=1e9,a=1e9,o=-1e9;for(let s in t)if(Object.prototype.hasOwnProperty.call(t,s)){let c=e.body.nodes[s],l=e.hierarchical.levels[c.id],u=e.direction.getPosition(c),[d,f]=e._getSpaceAroundNode(c,t);r=Math.min(d,r),i=Math.min(f,i),l<=n&&(a=Math.min(u,a),o=Math.max(u,o))}return[a,o,r,i]},c=(e,t)=>{let n=this.hierarchical.getMaxLevel(e.id),r=this.hierarchical.getMaxLevel(t.id);return Math.min(n,r)},l=(e,t,n)=>{let r=this.hierarchical;for(let i=0;i<t.length;i++){let a=t[i],o=r.distributionOrdering[a];if(o.length>1)for(let t=0;t<o.length-1;t++){let i=o[t],a=o[t+1];r.hasSameParent(i,a)&&r.inSameSubNetwork(i,a)&&e(i,a,n)}}},u=function(n,r){let i=arguments.length>2&&arguments[2]!==void 0&&arguments[2],a=e.direction.getPosition(n),l=e.direction.getPosition(r),u=Math.abs(l-a),d=e.options.hierarchical.nodeSpacing;if(u>d){let a={},l={};o(n,a),o(r,l);let u=c(n,r),f=s(a,u),p=s(l,u),m=f[1],h=p[0],g=p[2];if(Math.abs(m-h)>d){let n=m-h+d;n<-g+d&&(n=-g+d),n<0&&(e._shiftBlock(r.id,n),t=!0,i===!0&&e._centerParent(r))}}},d=(e,r)=>{let i=r.id,a=r.edges,c=this.hierarchical.levels[r.id],l=this.options.hierarchical.levelSeparation*this.options.hierarchical.levelSeparation,u={},d=[];for(let e=0;e<a.length;e++){let t=a[e];if(t.toId!=t.fromId){let n=t.toId==i?t.from:t.to;u[a[e].id]=n,this.hierarchical.levels[n.id]<c&&d.push(t)}}let f=(e,t)=>{let n=0;for(let r=0;r<t.length;r++)if(u[t[r].id]!==void 0){let i=this.direction.getPosition(u[t[r].id])-e;n+=i/Math.sqrt(i*i+l)}return n},p=(e,t)=>{let n=0;for(let r=0;r<t.length;r++)if(u[t[r].id]!==void 0){let i=this.direction.getPosition(u[t[r].id])-e;n-=l*(i*i+l)**-1.5}return n},m=(e,t)=>{let n=this.direction.getPosition(r),i={};for(let r=0;r<e;r++){let e=f(n,t),a=p(n,t),o=Math.max(-40,Math.min(40,Math.round(e/a)));if(n-=o,i[n]!==void 0)break;i[n]=r}return n},h=e=>{let i=this.direction.getPosition(r);if(n[r.id]===void 0){let e={};o(r,e),n[r.id]=e}let a=s(n[r.id]),c=a[2],l=a[3],u=e-i,d=0;u>0?d=Math.min(u,l-this.options.hierarchical.nodeSpacing):u<0&&(d=-Math.min(-u,c-this.options.hierarchical.nodeSpacing)),d!=0&&(this._shiftBlock(r.id,d),t=!0)},g=e=>{let n=this.direction.getPosition(r),[i,a]=this._getSpaceAroundNode(r),o=e-n,s=n;o>0?s=Math.min(n+(a-this.options.hierarchical.nodeSpacing),e):o<0&&(s=Math.max(n-(i-this.options.hierarchical.nodeSpacing),e)),s!==n&&(this.direction.setPosition(r,s),t=!0)},_=m(e,d);h(_),_=m(e,a),g(_)};this.options.hierarchical.blockShifting===!0&&((e=>{let n=this.hierarchical.getLevels();n=BN(n).call(n);for(let r=0;r<e&&(t=!1,l(u,n,!0),t===!0);r++);})(5),(()=>{for(let e in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,e)&&this._centerParent(this.body.nodes[e])})()),this.options.hierarchical.edgeMinimization===!0&&(e=>{let n=this.hierarchical.getLevels();n=BN(n).call(n);for(let r=0;r<e;r++){t=!1;for(let e=0;e<n.length;e++){let t=n[e],r=this.hierarchical.distributionOrdering[t];for(let e=0;e<r.length;e++)d(1e3,r[e])}if(t!==!0)break}})(20),this.options.hierarchical.parentCentralization===!0&&(()=>{let e=this.hierarchical.getLevels();e=BN(e).call(e);for(let t=0;t<e.length;t++){let n=e[t],r=this.hierarchical.distributionOrdering[n];for(let e=0;e<r.length;e++)this._centerParent(r[e])}})(),r()}_getSpaceAroundNode(e,t){let n=!0;t===void 0&&(n=!1);let r=this.hierarchical.levels[e.id];if(r!==void 0){let i=this.hierarchical.distributionIndex[e.id],a=this.direction.getPosition(e),o=this.hierarchical.distributionOrdering[r],s=1e9,c=1e9;if(i!==0){let e=o[i-1];(n===!0&&t[e.id]===void 0||n===!1)&&(s=a-this.direction.getPosition(e))}if(i!=o.length-1){let e=o[i+1];if(n===!0&&t[e.id]===void 0||n===!1){let t=this.direction.getPosition(e);c=Math.min(c,t-a)}}return[s,c]}else return[0,0]}_centerParent(e){if(this.hierarchical.parentReference[e.id]){let t=this.hierarchical.parentReference[e.id];for(let e=0;e<t.length;e++){let n=t[e],r=this.body.nodes[n],i=this.hierarchical.childrenReference[n];if(i!==void 0){let e=this._getCenterPosition(i),t=this.direction.getPosition(r),[n,a]=this._getSpaceAroundNode(r),o=t-e;(o<0&&Math.abs(o)<a-this.options.hierarchical.nodeSpacing||o>0&&Math.abs(o)<n-this.options.hierarchical.nodeSpacing)&&this.direction.setPosition(r,e)}}}}_placeNodesByHierarchy(e){this.positionedNodes={};for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var t;let r=WM(e[n]);r=this._indexArrayToNodes(r),WQ(t=this.direction).call(t,r);let i=0;for(let e=0;e<r.length;e++){let t=r[e];if(this.positionedNodes[t.id]===void 0){let a=this.options.hierarchical.nodeSpacing,o=a*i;i>0&&(o=this.direction.getPosition(r[e-1])+a),this.direction.setPosition(t,o,n),this._validatePositionAndContinue(t,n,o),i++}}}}_placeBranchNodes(e,t){var n;let r=this.hierarchical.childrenReference[e];if(r===void 0)return;let i=[];for(let e=0;e<r.length;e++)i.push(this.body.nodes[r[e]]);WQ(n=this.direction).call(n,i);for(let n=0;n<i.length;n++){let r=i[n],a=this.hierarchical.levels[r.id];if(a>t&&this.positionedNodes[r.id]===void 0){let t=this.options.hierarchical.nodeSpacing,o;o=n===0?this.direction.getPosition(this.body.nodes[e]):this.direction.getPosition(i[n-1])+t,this.direction.setPosition(r,o,a),this._validatePositionAndContinue(r,a,o)}else return}let a=this._getCenterPosition(i);this.direction.setPosition(this.body.nodes[e],a,t)}_validatePositionAndContinue(e,t,n){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[t]!==void 0){let r=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[t]]);if(n-r<this.options.hierarchical.nodeSpacing){let i=r+this.options.hierarchical.nodeSpacing-n,a=this._findCommonParent(this.lastNodeOnLevel[t],e.id);this._shiftBlock(a.withChild,i)}}this.lastNodeOnLevel[t]=e.id,this.positionedNodes[e.id]=!0,this._placeBranchNodes(e.id,t)}}_indexArrayToNodes(e){let t=[];for(let n=0;n<e.length;n++)t.push(this.body.nodes[e[n]]);return t}_getDistribution(){let e={},t,n;for(t in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,t)){n=this.body.nodes[t];let r=this.hierarchical.levels[t]===void 0?0:this.hierarchical.levels[t];this.direction.fix(n,r),e[r]===void 0&&(e[r]={}),e[r][t]=n}return e}_getActiveEdges(e){let t=[];return W(e.edges,e=>{var n;H(n=this.body.edgeIndices).call(n,e.id)!==-1&&t.push(e)}),t}_getHubSizes(){let e={},t=this.body.nodeIndices;W(t,t=>{let n=this.body.nodes[t],r=this._getActiveEdges(n).length;e[r]=!0});let n=[];return W(e,e=>{n.push(Number(e))}),WQ(n).call(n,function(e,t){return t-e}),n}_determineLevelsByHubsize(){let e=(e,t)=>{this.hierarchical.levelDownstream(e,t)},t=this._getHubSizes();for(let n=0;n<t.length;++n){let r=t[n];if(r===0)break;W(this.body.nodeIndices,t=>{let n=this.body.nodes[t];r===this._getActiveEdges(n).length&&this._crawlNetwork(e,t)})}}_determineLevelsCustomCallback(){this._crawlNetwork((e,t,n)=>{let r=this.hierarchical.levels[e.id];r===void 0&&(r=this.hierarchical.levels[e.id]=1e5),BY.cloneOptions(e,`node`),BY.cloneOptions(t,`node`),BY.cloneOptions(n,`edge`),this.hierarchical.levels[t.id]=r+void 0}),this.hierarchical.setMinLevelToZero()}_determineLevelsDirected(){var e;let t=f$(e=this.body.nodeIndices).call(e,(e,t)=>(e.set(t,this.body.nodes[t]),e),new yU);this.options.hierarchical.shakeTowards===`roots`?this.hierarchical.levels=P$(t):this.hierarchical.levels=N$(t),this.hierarchical.setMinLevelToZero()}_generateMap(){this._crawlNetwork((e,t)=>{this.hierarchical.levels[t.id]>this.hierarchical.levels[e.id]&&this.hierarchical.addRelation(e.id,t.id)}),this.hierarchical.checkIfTree()}_crawlNetwork(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},t=arguments.length>1?arguments[1]:void 0,n={},r=(t,i)=>{if(n[t.id]===void 0){this.hierarchical.setTreeIndex(t,i),n[t.id]=!0;let a,o=this._getActiveEdges(t);for(let n=0;n<o.length;n++){let s=o[n];s.connected===!0&&(a=s.toId==t.id?s.from:s.to,t.id!=a.id&&(e(t,a,s),r(a,i)))}}};if(t===void 0){let e=0;for(let t=0;t<this.body.nodeIndices.length;t++){let i=this.body.nodeIndices[t];if(n[i]===void 0){let t=this.body.nodes[i];r(t,e),e+=1}}}else{let e=this.body.nodes[t];if(e===void 0){console.error(`Node not found:`,t);return}r(e)}}_shiftBlock(e,t){let n={},r=e=>{if(n[e])return;n[e]=!0,this.direction.shift(e,t);let i=this.hierarchical.childrenReference[e];if(i!==void 0)for(let e=0;e<i.length;e++)r(i[e])};r(e)}_findCommonParent(e,t){let n={},r=(e,t)=>{let n=this.hierarchical.parentReference[t];if(n!==void 0)for(let t=0;t<n.length;t++){let i=n[t];e[i]=!0,r(e,i)}},i=(e,t)=>{let n=this.hierarchical.parentReference[t];if(n!==void 0)for(let r=0;r<n.length;r++){let a=n[r];if(e[a]!==void 0)return{foundParent:a,withChild:t};let o=i(e,a);if(o.foundParent!==null)return o}return{foundParent:null,withChild:t}};return r(n,e),i(n,t)}setDirectionStrategy(){this.options.hierarchical.direction===`UD`||this.options.hierarchical.direction===`DU`?this.direction=new m$(this):this.direction=new h$(this)}_getCenterPosition(e){let t=1e9,n=-1e9;for(let r=0;r<e.length;r++){let i;if(e[r].id!==void 0)i=e[r];else{let t=e[r];i=this.body.nodes[t]}let a=this.direction.getPosition(i);t=Math.min(t,a),n=Math.max(n,a)}return .5*(t+n)}},R$=class{constructor(e,t,n,r){var i,a;this.body=e,this.canvas=t,this.selectionHandler=n,this.interactionHandler=r,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}},QE(this.options,this.defaultOptions),this.body.emitter.on(`destroy`,()=>{this._clean()}),this.body.emitter.on(`_dataChanged`,B(i=this._restore).call(i,this)),this.body.emitter.on(`_resetData`,B(a=this._restore).call(a,this))}_restore(){this.inMode!==!1&&(this.options.initiallyActive===!0?this.enableEditMode():this.disableEditMode())}setOptions(e,t,n){t!==void 0&&(t.locale===void 0?this.options.locale=n.locale:this.options.locale=t.locale,t.locales===void 0?this.options.locales=n.locales:this.options.locales=t.locales),e!==void 0&&(typeof e==`boolean`?this.options.enabled=e:(this.options.enabled=!0,U(this.options,e)),this.options.initiallyActive===!0&&(this.editMode=!0),this._setup())}toggleEditMode(){this.editMode===!0?this.disableEditMode():this.enableEditMode()}enableEditMode(){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())}disableEditMode(){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())}showManipulatorToolbar(){if(this._clean(),this.manipulationDOM={},this.guiEnabled===!0){var e,t;this.editMode=!0,this.manipulationDiv.style.display=`block`,this.closeDiv.style.display=`block`;let n=this.selectionHandler.getSelectedNodeCount(),r=this.selectionHandler.getSelectedEdgeCount(),i=n+r,a=this.options.locales[this.options.locale],o=!1;this.options.addNode!==!1&&(this._createAddNodeButton(a),o=!0),this.options.addEdge!==!1&&(o===!0?this._createSeperator(1):o=!0,this._createAddEdgeButton(a)),n===1&&typeof this.options.editNode==`function`?(o===!0?this._createSeperator(2):o=!0,this._createEditNodeButton(a)):r===1&&n===0&&this.options.editEdge!==!1&&(o===!0?this._createSeperator(3):o=!0,this._createEditEdgeButton(a)),i!==0&&(n>0&&this.options.deleteNode!==!1||n===0&&this.options.deleteEdge!==!1)&&(o===!0&&this._createSeperator(4),this._createDeleteButton(a)),this._bindElementEvents(this.closeDiv,B(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent(`select`,B(t=this.showManipulatorToolbar).call(t,this))}this.body.emitter.emit(`_redraw`)}addNodeMode(){var e;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode=`addNode`,this.guiEnabled===!0){var t;let e=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(e),this._createSeperator(),this._createDescription(e.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,B(t=this.toggleEditMode).call(t,this))}this._temporaryBindEvent(`click`,B(e=this._performAddNode).call(e,this))}editNode(){this.editMode!==!0&&this.enableEditMode(),this._clean();let e=this.selectionHandler.getSelectedNodes()[0];if(e!==void 0)if(this.inMode=`editNode`,typeof this.options.editNode==`function`)if(e.isCluster!==!0){let t=U({},e.options,!1);if(t.x=e.x,t.y=e.y,this.options.editNode.length===2)this.options.editNode(t,e=>{e!=null&&this.inMode===`editNode`&&this.body.data.nodes.getDataSet().update(e),this.showManipulatorToolbar()});else throw 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 Error(`No function has been configured to handle the editing of nodes.`);else this.showManipulatorToolbar()}addEdgeMode(){var e,t,n,r,i;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode=`addEdge`,this.guiEnabled===!0){var a;let e=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(e),this._createSeperator(),this._createDescription(e.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,B(a=this.toggleEditMode).call(a,this))}this._temporaryBindUI(`onTouch`,B(e=this._handleConnect).call(e,this)),this._temporaryBindUI(`onDragEnd`,B(t=this._finishConnect).call(t,this)),this._temporaryBindUI(`onDrag`,B(n=this._dragControlNode).call(n,this)),this._temporaryBindUI(`onRelease`,B(r=this._finishConnect).call(r,this)),this._temporaryBindUI(`onDragStart`,B(i=this._dragStartEdge).call(i,this)),this._temporaryBindUI(`onHold`,()=>{})}editEdgeMode(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode=`editEdge`,typeof this.options.editEdge==`object`&&typeof this.options.editEdge.editWithoutDrag==`function`&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0)){let e=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(e.from.id,e.to.id);return}if(this.guiEnabled===!0){var e;let t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,B(e=this.toggleEditMode).call(e,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var t,n,r,i;let e=this.body.edges[this.edgeBeingEditedId],a=this._getNewTargetNode(e.from.x,e.from.y),o=this._getNewTargetNode(e.to.x,e.to.y);this.temporaryIds.nodes.push(a.id),this.temporaryIds.nodes.push(o.id),this.body.nodes[a.id]=a,this.body.nodeIndices.push(a.id),this.body.nodes[o.id]=o,this.body.nodeIndices.push(o.id),this._temporaryBindUI(`onTouch`,B(t=this._controlNodeTouch).call(t,this)),this._temporaryBindUI(`onTap`,()=>{}),this._temporaryBindUI(`onHold`,()=>{}),this._temporaryBindUI(`onDragStart`,B(n=this._controlNodeDragStart).call(n,this)),this._temporaryBindUI(`onDrag`,B(r=this._controlNodeDrag).call(r,this)),this._temporaryBindUI(`onDragEnd`,B(i=this._controlNodeDragEnd).call(i,this)),this._temporaryBindUI(`onMouseMove`,()=>{}),this._temporaryBindEvent(`beforeDrawing`,t=>{let n=e.edgeType.findBorderPositions(t);a.selected===!1&&(a.x=n.from.x,a.y=n.from.y),o.selected===!1&&(o.x=n.to.x,o.y=n.to.y)}),this.body.emitter.emit(`_redraw`)}else this.showManipulatorToolbar()}deleteSelected(){this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode=`delete`;let e=this.selectionHandler.getSelectedNodeIds(),t=this.selectionHandler.getSelectedEdgeIds(),n;if(e.length>0){for(let t=0;t<e.length;t++)if(this.body.nodes[e[t]].isCluster===!0){alert(this.options.locales[this.options.locale].deleteClusterError||this.options.locales.en.deleteClusterError);return}typeof this.options.deleteNode==`function`&&(n=this.options.deleteNode)}else t.length>0&&typeof this.options.deleteEdge==`function`&&(n=this.options.deleteEdge);if(typeof n==`function`){let r={nodes:e,edges:t};if(n.length===2)n(r,e=>{e!=null&&this.inMode===`delete`?(this.body.data.edges.getDataSet().remove(e.edges),this.body.data.nodes.getDataSet().remove(e.nodes),this.body.emitter.emit(`startSimulation`),this.showManipulatorToolbar()):(this.body.emitter.emit(`startSimulation`),this.showManipulatorToolbar())});else throw Error(`The function for delete does not support two arguments (data, callback)`)}else this.body.data.edges.getDataSet().remove(t),this.body.data.nodes.getDataSet().remove(e),this.body.emitter.emit(`startSimulation`),this.showManipulatorToolbar()}_setup(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}_createWrappers(){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&&(this.closeDiv=document.createElement(`button`),this.closeDiv.className=`vis-close`,this.closeDiv.setAttribute(`aria-label`,this.options.locales[this.options.locale]?.close??this.options.locales.en.close),this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv))}_getNewTargetNode(e,t){let n=U({},this.options.controlNodeStyle);n.id=`targetNode`+RY(),n.hidden=!1,n.physics=!1,n.x=e,n.y=t;let r=this.body.functions.createNode(n);return r.shape.boundingBox={left:e,right:e,top:t,bottom:t},r}_createEditButton(){var e;this._clean(),this.manipulationDOM={},MB(this.editModeDiv);let t=this.options.locales[this.options.locale],n=this._createButton(`editMode`,`vis-edit vis-edit-mode`,t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(n),this._bindElementEvents(n,B(e=this.toggleEditMode).call(e,this))}_clean(){this.inMode=!1,this.guiEnabled===!0&&(MB(this.editModeDiv),MB(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit(`restorePhysics`)}_cleanupDOMEventListeners(){for(let t of cP(e=this._domEventListenerCleanupQueue).call(e,0)){var e;t()}}_removeManipulationDOM(){this._clean(),MB(this.manipulationDiv),MB(this.editModeDiv),MB(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}_createSeperator(){let 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])}_createAddNodeButton(e){var t;let n=this._createButton(`addNode`,`vis-add`,e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,B(t=this.addNodeMode).call(t,this))}_createAddEdgeButton(e){var t;let n=this._createButton(`addEdge`,`vis-connect`,e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,B(t=this.addEdgeMode).call(t,this))}_createEditNodeButton(e){var t;let n=this._createButton(`editNode`,`vis-edit`,e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,B(t=this.editNode).call(t,this))}_createEditEdgeButton(e){var t;let n=this._createButton(`editEdge`,`vis-edit`,e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,B(t=this.editEdgeMode).call(t,this))}_createDeleteButton(e){var t;let n;n=this.options.rtl?`vis-delete-rtl`:`vis-delete`;let r=this._createButton(`delete`,n,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(r),this._bindElementEvents(r,B(t=this.deleteSelected).call(t,this))}_createBackButton(e){var t;let n=this._createButton(`back`,`vis-back`,e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,B(t=this.showManipulatorToolbar).call(t,this))}_createButton(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`vis-label`;return this.manipulationDOM[e+`Div`]=document.createElement(`button`),this.manipulationDOM[e+`Div`].className=`vis-button `+t,this.manipulationDOM[e+`Label`]=document.createElement(`div`),this.manipulationDOM[e+`Label`].className=r,this.manipulationDOM[e+`Label`].innerText=n,this.manipulationDOM[e+`Div`].appendChild(this.manipulationDOM[e+`Label`]),this.manipulationDOM[e+`Div`]}_createDescription(e){this.manipulationDOM.descriptionLabel=document.createElement(`div`),this.manipulationDOM.descriptionLabel.className=`vis-none`,this.manipulationDOM.descriptionLabel.innerText=e,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}_temporaryBindEvent(e,t){this.temporaryEventFunctions.push({event:e,boundFunction:t}),this.body.emitter.on(e,t)}_temporaryBindUI(e,t){if(this.body.eventListeners[e]!==void 0)this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=t;else throw Error(`This UI function does not exist. Typo? You tried: `+e+` possible are: `+sL(WM(this.body.eventListeners)))}_unbindTemporaryUIs(){for(let e in this.temporaryUIFunctions)Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions,e)&&(this.body.eventListeners[e]=this.temporaryUIFunctions[e],delete this.temporaryUIFunctions[e]);this.temporaryUIFunctions={}}_unbindTemporaryEvents(){for(let e=0;e<this.temporaryEventFunctions.length;e++){let t=this.temporaryEventFunctions[e].event,n=this.temporaryEventFunctions[e].boundFunction;this.body.emitter.off(t,n)}this.temporaryEventFunctions=[]}_bindElementEvents(e,t){let n=new hV(e,{});ZY(n,t),this._domEventListenerCleanupQueue.push(()=>{n.destroy()});let r=e=>{let{keyCode:n,key:r}=e;(r===`Enter`||r===` `||n===13||n===32)&&t()};e.addEventListener(`keyup`,r,!1),this._domEventListenerCleanupQueue.push(()=>{e.removeEventListener(`keyup`,r,!1)})}_cleanupTemporaryNodesAndEdges(){for(let n=0;n<this.temporaryIds.edges.length;n++){var e;this.body.edges[this.temporaryIds.edges[n]].disconnect(),delete this.body.edges[this.temporaryIds.edges[n]];let r=H(e=this.body.edgeIndices).call(e,this.temporaryIds.edges[n]);if(r!==-1){var t;cP(t=this.body.edgeIndices).call(t,r,1)}}for(let e=0;e<this.temporaryIds.nodes.length;e++){var n;delete this.body.nodes[this.temporaryIds.nodes[e]];let t=H(n=this.body.nodeIndices).call(n,this.temporaryIds.nodes[e]);if(t!==-1){var r;cP(r=this.body.nodeIndices).call(r,t,1)}}this.temporaryIds={nodes:[],edges:[]}}_controlNodeTouch(e){this.selectionHandler.unselectAll(),this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=QE({},this.body.view.translation)}_controlNodeDragStart(){let e=this.lastTouch,t=this.selectionHandler._pointerToPositionObject(e),n=this.body.nodes[this.temporaryIds.nodes[0]],r=this.body.nodes[this.temporaryIds.nodes[1]],i=this.body.edges[this.edgeBeingEditedId];this.selectedControlNode=void 0;let a=n.isOverlappingWith(t),o=r.isOverlappingWith(t);a===!0?(this.selectedControlNode=n,i.edgeType.from=n):o===!0&&(this.selectedControlNode=r,i.edgeType.to=r),this.selectedControlNode!==void 0&&this.selectionHandler.selectObject(this.selectedControlNode),this.body.emitter.emit(`_redraw`)}_controlNodeDrag(e){this.body.emitter.emit(`disablePhysics`);let t=this.body.functions.getPointer(e.center),n=this.canvas.DOMtoCanvas(t);this.selectedControlNode===void 0?this.interactionHandler.onDrag(e):(this.selectedControlNode.x=n.x,this.selectedControlNode.y=n.y),this.body.emitter.emit(`_redraw`)}_controlNodeDragEnd(e){let t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t),r=this.body.edges[this.edgeBeingEditedId];if(this.selectedControlNode===void 0)return;this.selectionHandler.unselectAll();let i=this.selectionHandler._getAllNodesOverlappingWith(n),a;for(let e=i.length-1;e>=0;e--)if(i[e]!==this.selectedControlNode.id){a=this.body.nodes[i[e]];break}if(a!==void 0&&this.selectedControlNode!==void 0)if(a.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{let e=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===e.id?this._performEditEdge(a.id,r.to.id):this._performEditEdge(r.from.id,a.id)}else r.updateEdgeType(),this.body.emitter.emit(`restorePhysics`);this.body.emitter.emit(`_redraw`)}_handleConnect(e){if(new Date().valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=QE({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;let t=this.lastTouch,n=this.selectionHandler.getNodeAt(t);if(n!==void 0)if(n.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{let e=this._getNewTargetNode(n.x,n.y);this.body.nodes[e.id]=e,this.body.nodeIndices.push(e.id);let t=this.body.functions.createEdge({id:`connectionEdge`+RY(),from:n.id,to:e.id,physics:!1,smooth:{enabled:!0,type:`continuous`,roundness:.5}});this.body.edges[t.id]=t,this.body.edgeIndices.push(t.id),this.temporaryIds.nodes.push(e.id),this.temporaryIds.edges.push(t.id)}this.touchTime=new Date().valueOf()}}_dragControlNode(e){let t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t),r;this.temporaryIds.edges[0]!==void 0&&(r=this.body.edges[this.temporaryIds.edges[0]].fromId);let i=this.selectionHandler._getAllNodesOverlappingWith(n),a;for(let e=i.length-1;e>=0;e--){var o;if(H(o=this.temporaryIds.nodes).call(o,i[e])===-1){a=this.body.nodes[i[e]];break}}if(e.controlEdge={from:r,to:a?a.id:void 0},this.selectionHandler.generateClickEvent(`controlNodeDragging`,e,t),this.temporaryIds.nodes[0]!==void 0){let e=this.body.nodes[this.temporaryIds.nodes[0]];e.x=this.canvas._XconvertDOMtoCanvas(t.x),e.y=this.canvas._YconvertDOMtoCanvas(t.y),this.body.emitter.emit(`_redraw`)}else this.interactionHandler.onDrag(e)}_finishConnect(e){let t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t),r;this.temporaryIds.edges[0]!==void 0&&(r=this.body.edges[this.temporaryIds.edges[0]].fromId);let i=this.selectionHandler._getAllNodesOverlappingWith(n),a;for(let e=i.length-1;e>=0;e--){var o;if(H(o=this.temporaryIds.nodes).call(o,i[e])===-1){a=this.body.nodes[i[e]];break}}this._cleanupTemporaryNodesAndEdges(),a!==void 0&&(a.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[r]!==void 0&&this.body.nodes[a.id]!==void 0&&this._performAddEdge(r,a.id)),e.controlEdge={from:r,to:a?a.id:void 0},this.selectionHandler.generateClickEvent(`controlNodeDragEnd`,e,t),this.body.emitter.emit(`_redraw`)}_dragStartEdge(e){let t=this.lastTouch;this.selectionHandler.generateClickEvent(`dragStart`,e,t,void 0,!0)}_performAddNode(e){let t={id:RY(),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(t,e=>{e!=null&&this.inMode===`addNode`&&this.body.data.nodes.getDataSet().add(e),this.showManipulatorToolbar()});else throw this.showManipulatorToolbar(),Error(`The function for add does not support two arguments (data,callback)`);else this.body.data.nodes.getDataSet().add(t),this.showManipulatorToolbar()}_performAddEdge(e,t){let n={from:e,to:t};if(typeof this.options.addEdge==`function`)if(this.options.addEdge.length===2)this.options.addEdge(n,e=>{e!=null&&this.inMode===`addEdge`&&(this.body.data.edges.getDataSet().add(e),this.selectionHandler.unselectAll(),this.showManipulatorToolbar())});else throw Error(`The function for connect does not support two arguments (data,callback)`);else this.body.data.edges.getDataSet().add(n),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}_performEditEdge(e,t){let n={id:this.edgeBeingEditedId,from:e,to:t,label:this.body.data.edges.get(this.edgeBeingEditedId).label},r=this.options.editEdge;if(typeof r==`object`&&(r=r.editWithoutDrag),typeof r==`function`)if(r.length===2)r(n,e=>{e==null||this.inMode!==`editEdge`?(this.body.edges[n.id].updateEdgeType(),this.body.emitter.emit(`_redraw`),this.showManipulatorToolbar()):(this.body.data.edges.getDataSet().update(e),this.selectionHandler.unselectAll(),this.showManipulatorToolbar())});else throw Error(`The function for edit does not support two arguments (data, callback)`);else this.body.data.edges.getDataSet().update(n),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},Y=`string`,X=`boolean`,Z=`number`,z$=`array`,Q=`object`,B$=`dom`,V$=`any`,H$=[`arrow`,`bar`,`box`,`circle`,`crow`,`curve`,`diamond`,`image`,`inv_curve`,`inv_triangle`,`triangle`,`vee`],U$={borderWidth:{number:Z},borderWidthSelected:{number:Z,undefined:`undefined`},brokenImage:{string:Y,undefined:`undefined`},chosen:{label:{boolean:X,function:`function`},node:{boolean:X,function:`function`},__type__:{object:Q,boolean:X}},color:{border:{string:Y},background:{string:Y},highlight:{border:{string:Y},background:{string:Y},__type__:{object:Q,string:Y}},hover:{border:{string:Y},background:{string:Y},__type__:{object:Q,string:Y}},__type__:{object:Q,string:Y}},opacity:{number:Z,undefined:`undefined`},fixed:{x:{boolean:X},y:{boolean:X},__type__:{object:Q,boolean:X}},font:{align:{string:Y},color:{string:Y},size:{number:Z},face:{string:Y},background:{string:Y},strokeWidth:{number:Z},strokeColor:{string:Y},vadjust:{number:Z},multi:{boolean:X,string:Y},bold:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},boldital:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},ital:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},mono:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},__type__:{object:Q,string:Y}},group:{string:Y,number:Z,undefined:`undefined`},heightConstraint:{minimum:{number:Z},valign:{string:Y},__type__:{object:Q,boolean:X,number:Z}},hidden:{boolean:X},icon:{face:{string:Y},code:{string:Y},size:{number:Z},color:{string:Y},weight:{string:Y,number:Z},__type__:{object:Q}},id:{string:Y,number:Z},image:{selected:{string:Y,undefined:`undefined`},unselected:{string:Y,undefined:`undefined`},__type__:{object:Q,string:Y}},imagePadding:{top:{number:Z},right:{number:Z},bottom:{number:Z},left:{number:Z},__type__:{object:Q,number:Z}},label:{string:Y,undefined:`undefined`},labelHighlightBold:{boolean:X},level:{number:Z,undefined:`undefined`},margin:{top:{number:Z},right:{number:Z},bottom:{number:Z},left:{number:Z},__type__:{object:Q,number:Z}},mass:{number:Z},physics:{boolean:X},scaling:{min:{number:Z},max:{number:Z},label:{enabled:{boolean:X},min:{number:Z},max:{number:Z},maxVisible:{number:Z},drawThreshold:{number:Z},__type__:{object:Q,boolean:X}},customScalingFunction:{function:`function`},__type__:{object:Q}},shadow:{enabled:{boolean:X},color:{string:Y},size:{number:Z},x:{number:Z},y:{number:Z},__type__:{object:Q,boolean:X}},shape:{string:[`custom`,`ellipse`,`circle`,`database`,`box`,`text`,`image`,`circularImage`,`diamond`,`dot`,`star`,`triangle`,`triangleDown`,`square`,`icon`,`hexagon`]},ctxRenderer:{function:`function`},shapeProperties:{borderDashes:{boolean:X,array:z$},borderRadius:{number:Z},interpolation:{boolean:X},useImageSize:{boolean:X},useBorderWithImage:{boolean:X},coordinateOrigin:{string:[`center`,`top-left`]},__type__:{object:Q}},size:{number:Z},title:{string:Y,dom:B$,undefined:`undefined`},value:{number:Z,undefined:`undefined`},widthConstraint:{minimum:{number:Z},maximum:{number:Z},__type__:{object:Q,boolean:X,number:Z}},x:{number:Z},y:{number:Z},__type__:{object:Q}},W$={configure:{enabled:{boolean:X},filter:{boolean:X,string:Y,array:z$,function:`function`},container:{dom:B$},showButton:{boolean:X},__type__:{object:Q,boolean:X,string:Y,array:z$,function:`function`}},edges:{arrows:{to:{enabled:{boolean:X},scaleFactor:{number:Z},type:{string:H$},imageHeight:{number:Z},imageWidth:{number:Z},src:{string:Y},__type__:{object:Q,boolean:X}},middle:{enabled:{boolean:X},scaleFactor:{number:Z},type:{string:H$},imageWidth:{number:Z},imageHeight:{number:Z},src:{string:Y},__type__:{object:Q,boolean:X}},from:{enabled:{boolean:X},scaleFactor:{number:Z},type:{string:H$},imageWidth:{number:Z},imageHeight:{number:Z},src:{string:Y},__type__:{object:Q,boolean:X}},__type__:{string:[`from`,`to`,`middle`],object:Q}},endPointOffset:{from:{number:Z},to:{number:Z},__type__:{object:Q,number:Z}},arrowStrikethrough:{boolean:X},background:{enabled:{boolean:X},color:{string:Y},size:{number:Z},dashes:{boolean:X,array:z$},__type__:{object:Q,boolean:X}},chosen:{label:{boolean:X,function:`function`},edge:{boolean:X,function:`function`},__type__:{object:Q,boolean:X}},color:{color:{string:Y},highlight:{string:Y},hover:{string:Y},inherit:{string:[`from`,`to`,`both`],boolean:X},opacity:{number:Z},__type__:{object:Q,string:Y}},dashes:{boolean:X,array:z$},font:{color:{string:Y},size:{number:Z},face:{string:Y},background:{string:Y},strokeWidth:{number:Z},strokeColor:{string:Y},align:{string:[`horizontal`,`top`,`middle`,`bottom`]},vadjust:{number:Z},multi:{boolean:X,string:Y},bold:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},boldital:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},ital:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},mono:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},__type__:{object:Q,string:Y}},hidden:{boolean:X},hoverWidth:{function:`function`,number:Z},label:{string:Y,undefined:`undefined`},labelHighlightBold:{boolean:X},length:{number:Z,undefined:`undefined`},physics:{boolean:X},scaling:{min:{number:Z},max:{number:Z},label:{enabled:{boolean:X},min:{number:Z},max:{number:Z},maxVisible:{number:Z},drawThreshold:{number:Z},__type__:{object:Q,boolean:X}},customScalingFunction:{function:`function`},__type__:{object:Q}},selectionWidth:{function:`function`,number:Z},selfReferenceSize:{number:Z},selfReference:{size:{number:Z},angle:{number:Z},renderBehindTheNode:{boolean:X},__type__:{object:Q}},shadow:{enabled:{boolean:X},color:{string:Y},size:{number:Z},x:{number:Z},y:{number:Z},__type__:{object:Q,boolean:X}},smooth:{enabled:{boolean:X},type:{string:[`dynamic`,`continuous`,`discrete`,`diagonalCross`,`straightCross`,`horizontal`,`vertical`,`curvedCW`,`curvedCCW`,`cubicBezier`]},roundness:{number:Z},forceDirection:{string:[`horizontal`,`vertical`,`none`],boolean:X},__type__:{object:Q,boolean:X}},title:{string:Y,undefined:`undefined`},width:{number:Z},widthConstraint:{maximum:{number:Z},__type__:{object:Q,boolean:X,number:Z}},value:{number:Z,undefined:`undefined`},__type__:{object:Q}},groups:{useDefaultGroups:{boolean:X},__any__:U$,__type__:{object:Q}},interaction:{dragNodes:{boolean:X},dragView:{boolean:X},hideEdgesOnDrag:{boolean:X},hideEdgesOnZoom:{boolean:X},hideNodesOnDrag:{boolean:X},hover:{boolean:X},keyboard:{enabled:{boolean:X},speed:{x:{number:Z},y:{number:Z},zoom:{number:Z},__type__:{object:Q}},bindToWindow:{boolean:X},autoFocus:{boolean:X},__type__:{object:Q,boolean:X}},multiselect:{boolean:X},navigationButtons:{boolean:X},selectable:{boolean:X},selectConnectedEdges:{boolean:X},hoverConnectedEdges:{boolean:X},tooltipDelay:{number:Z},zoomView:{boolean:X},zoomSpeed:{number:Z},__type__:{object:Q}},layout:{randomSeed:{undefined:`undefined`,number:Z,string:Y},improvedLayout:{boolean:X},clusterThreshold:{number:Z},hierarchical:{enabled:{boolean:X},levelSeparation:{number:Z},nodeSpacing:{number:Z},treeSpacing:{number:Z},blockShifting:{boolean:X},edgeMinimization:{boolean:X},parentCentralization:{boolean:X},direction:{string:[`UD`,`DU`,`LR`,`RL`]},sortMethod:{string:[`hubsize`,`directed`]},shakeTowards:{string:[`leaves`,`roots`]},__type__:{object:Q,boolean:X}},__type__:{object:Q}},manipulation:{enabled:{boolean:X},initiallyActive:{boolean:X},addNode:{boolean:X,function:`function`},addEdge:{boolean:X,function:`function`},editNode:{function:`function`},editEdge:{editWithoutDrag:{function:`function`},__type__:{object:Q,boolean:X,function:`function`}},deleteNode:{boolean:X,function:`function`},deleteEdge:{boolean:X,function:`function`},controlNodeStyle:U$,__type__:{object:Q,boolean:X}},nodes:U$,physics:{enabled:{boolean:X},barnesHut:{theta:{number:Z},gravitationalConstant:{number:Z},centralGravity:{number:Z},springLength:{number:Z},springConstant:{number:Z},damping:{number:Z},avoidOverlap:{number:Z},__type__:{object:Q}},forceAtlas2Based:{theta:{number:Z},gravitationalConstant:{number:Z},centralGravity:{number:Z},springLength:{number:Z},springConstant:{number:Z},damping:{number:Z},avoidOverlap:{number:Z},__type__:{object:Q}},repulsion:{centralGravity:{number:Z},springLength:{number:Z},springConstant:{number:Z},nodeDistance:{number:Z},damping:{number:Z},__type__:{object:Q}},hierarchicalRepulsion:{centralGravity:{number:Z},springLength:{number:Z},springConstant:{number:Z},nodeDistance:{number:Z},damping:{number:Z},avoidOverlap:{number:Z},__type__:{object:Q}},maxVelocity:{number:Z},minVelocity:{number:Z},solver:{string:[`barnesHut`,`repulsion`,`hierarchicalRepulsion`,`forceAtlas2Based`]},stabilization:{enabled:{boolean:X},iterations:{number:Z},updateInterval:{number:Z},onlyDynamicEdges:{boolean:X},fit:{boolean:X},__type__:{object:Q,boolean:X}},timestep:{number:Z},adaptiveTimestep:{boolean:X},wind:{x:{number:Z},y:{number:Z},__type__:{object:Q,function:`function`}},__type__:{object:Q,boolean:X}},autoResize:{boolean:X},clickToUse:{boolean:X},locale:{string:Y},locales:{__any__:{any:V$},__type__:{object:Q}},height:{string:Y},width:{string:Y},__type__:{object:Q}},G$={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]}}},K$=(e,t,n)=>{var r,i;return!!(zP(e).call(e,`physics`)&&zP(r=G$.physics.solver).call(r,t)&&n.physics.solver!==t&&t!==`wind`||zP(e).call(e,`physics`)&&zP(e).call(e,`wind`)&&(t===`x`||t===`y`)&&typeof(n==null||(i=n.physics)==null?void 0:i.wind)==`function`)},q$=class{getDistances(e,t,n){let r={},i=e.edges;for(let e=0;e<t.length;e++){let n=t[e],i={};r[n]=i;for(let n=0;n<t.length;n++)i[t[n]]=e==n?0:1e9}for(let e=0;e<n.length;e++){let t=i[n[e]];t.connected===!0&&r[t.fromId]!==void 0&&r[t.toId]!==void 0&&(r[t.fromId][t.toId]=1,r[t.toId][t.fromId]=1)}let a=t.length;for(let e=0;e<a;e++){let n=t[e],i=r[n];for(let e=0;e<a-1;e++){let o=t[e],s=r[o];for(let c=e+1;c<a;c++){let e=t[c],a=r[e],l=Math.min(s[e],s[n]+i[e]);s[e]=l,a[o]=l}}}return r}},J$=class{constructor(e,t,n){this.body=e,this.springLength=t,this.springConstant=n,this.distanceSolver=new q$}setOptions(e){e&&(e.springLength&&(this.springLength=e.springLength),e.springConstant&&(this.springConstant=e.springConstant))}solve(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=this.distanceSolver.getDistances(this.body,e,t);this._createL_matrix(r),this._createK_matrix(r),this._createE_matrix();let i=0,a=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),o=1e9,s=0,c=0,l=0,u=0,d=0;for(;o>.01&&i<a;)for(i+=1,[s,o,c,l]=this._getHighestEnergyNode(n),u=o,d=0;u>1&&d<5;)d+=1,this._moveNode(s,c,l),[u,c,l]=this._getEnergy(s)}_getHighestEnergyNode(e){let t=this.body.nodeIndices,n=this.body.nodes,r=0,i=t[0],a=0,o=0;for(let s=0;s<t.length;s++){let c=t[s];if(n[c].predefinedPosition!==!0||n[c].isCluster===!0&&e===!0||n[c].options.fixed.x!==!0||n[c].options.fixed.y!==!0){let[e,t,n]=this._getEnergy(c);r<e&&(r=e,i=c,a=t,o=n)}}return[i,r,a,o]}_getEnergy(e){let[t,n]=this.E_sums[e];return[Math.sqrt(t**2+n**2),t,n]}_moveNode(e,t,n){let r=this.body.nodeIndices,i=this.body.nodes,a=0,o=0,s=0,c=i[e].x,l=i[e].y,u=this.K_matrix[e],d=this.L_matrix[e];for(let t=0;t<r.length;t++){let n=r[t];if(n!==e){let e=i[n].x,t=i[n].y,r=u[n],f=d[n],p=1/((c-e)**2+(l-t)**2)**1.5;a+=r*(1-f*(l-t)**2*p),o+=r*(f*(c-e)*(l-t)*p),s+=r*(1-f*(c-e)**2*p)}}let f=a,p=o,m=t,h=s,g=n,_=(m/f+g/p)/(p/f-h/p),v=-(p*_+m)/f;i[e].x+=v,i[e].y+=_,this._updateE_matrix(e)}_createL_matrix(e){let t=this.body.nodeIndices,n=this.springLength;this.L_matrix=[];for(let r=0;r<t.length;r++){this.L_matrix[t[r]]={};for(let i=0;i<t.length;i++)this.L_matrix[t[r]][t[i]]=n*e[t[r]][t[i]]}}_createK_matrix(e){let t=this.body.nodeIndices,n=this.springConstant;this.K_matrix=[];for(let r=0;r<t.length;r++){this.K_matrix[t[r]]={};for(let i=0;i<t.length;i++)this.K_matrix[t[r]][t[i]]=n*e[t[r]][t[i]]**-2}}_createE_matrix(){let e=this.body.nodeIndices,t=this.body.nodes;this.E_matrix={},this.E_sums={};for(let t=0;t<e.length;t++)this.E_matrix[e[t]]=[];for(let n=0;n<e.length;n++){let r=e[n],i=t[r].x,a=t[r].y,o=0,s=0;for(let c=n;c<e.length;c++){let l=e[c];if(l!==r){let e=t[l].x,u=t[l].y,d=1/Math.sqrt((i-e)**2+(a-u)**2);this.E_matrix[r][c]=[this.K_matrix[r][l]*(i-e-this.L_matrix[r][l]*(i-e)*d),this.K_matrix[r][l]*(a-u-this.L_matrix[r][l]*(a-u)*d)],this.E_matrix[l][n]=this.E_matrix[r][c],o+=this.E_matrix[r][c][0],s+=this.E_matrix[r][c][1]}}this.E_sums[r]=[o,s]}}_updateE_matrix(e){let t=this.body.nodeIndices,n=this.body.nodes,r=this.E_matrix[e],i=this.K_matrix[e],a=this.L_matrix[e],o=n[e].x,s=n[e].y,c=0,l=0;for(let u=0;u<t.length;u++){let d=t[u];if(d!==e){let e=r[u],t=e[0],f=e[1],p=n[d].x,m=n[d].y,h=1/Math.sqrt((o-p)**2+(s-m)**2),g=i[d]*(o-p-a[d]*(o-p)*h),_=i[d]*(s-m-a[d]*(s-m)*h);r[u]=[g,_],c+=g,l+=_;let v=this.E_sums[d];v[0]+=g-t,v[1]+=_-f}}this.E_sums[e]=[c,l]}};function $(e,t,n){var r,i,a,o;if(!(this instanceof $))throw SyntaxError(`Constructor must be called with the new operator`);this.options={},this.defaultOptions={locale:`en`,locales:ZV,clickToUse:!1},QE(this.options,this.defaultOptions),this.body={container:e,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:B(r=this.on).call(r,this),off:B(i=this.off).call(i,this),emit:B(a=this.emit).call(a,this),once:B(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 eH(()=>this.body.emitter.emit(`_requestRedraw`)),this.groups=new bU,this.canvas=new $Y(this.body),this.selectionHandler=new gQ(this.body,this.canvas),this.interactionHandler=new iX(this.body,this.canvas,this.selectionHandler),this.view=new tX(this.body,this.canvas),this.renderer=new UY(this.body,this.canvas),this.physics=new NY(this.body),this.layoutEngine=new L$(this.body),this.clustering=new HY(this.body),this.manipulation=new R$(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new RJ(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new wY(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new J$(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(n),this.setData(t)}zD($.prototype),$.prototype.setOptions=function(e){if(e===null&&(e=void 0),e!==void 0){if(vV.validate(e,W$)===!0&&console.error(`%cErrors have been found in the supplied options object.`,_V),LB([`locale`,`locales`,`clickToUse`],this.options,e),e.locale!==void 0&&(e.locale=QV(e.locales||this.options.locales,e.locale)),e=this.layoutEngine.setOptions(e.layout,e),this.canvas.setOptions(e),this.groups.setOptions(e.groups),this.nodesHandler.setOptions(e.nodes),this.edgesHandler.setOptions(e.edges),this.physics.setOptions(e.physics),this.manipulation.setOptions(e.manipulation,e,this.options),this.interactionHandler.setOptions(e.interaction),this.renderer.setOptions(e.interaction),this.selectionHandler.setOptions(e.interaction),e.groups!==void 0&&this.body.emitter.emit(`refreshNodes`),`configure`in e&&(this.configurator||=new mV(this,this.body.container,G$,this.canvas.pixelRatio,K$),this.configurator.setOptions(e.configure)),this.configurator&&this.configurator.options.enabled===!0){let e={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};U(e.nodes,this.nodesHandler.options),U(e.edges,this.edgesHandler.options),U(e.layout,this.layoutEngine.options),U(e.interaction,this.selectionHandler.options),U(e.interaction,this.renderer.options),U(e.interaction,this.interactionHandler.options),U(e.manipulation,this.manipulation.options),U(e.physics,this.physics.options),U(e.global,this.canvas.options),U(e.global,this.options),this.configurator.setModuleOptions(e)}e.clickToUse===void 0?this.body.emitter.emit(`activate`):e.clickToUse===!0?this.activator===void 0&&(this.activator=new pV(this.canvas.frame),this.activator.on(`change`,()=>{this.body.emitter.emit(`activate`)})):(this.activator!==void 0&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit(`activate`)),this.canvas.setSize(),this.body.emitter.emit(`startSimulation`)}},$.prototype._updateVisibleIndices=function(){let e=this.body.nodes,t=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&!this.clustering._isClusteredNode(t)&&e[t].options.hidden===!1&&this.body.nodeIndices.push(e[t].id);for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let r=t[n],i=e[r.fromId],a=e[r.toId],o=i!==void 0&&a!==void 0;!this.clustering._isClusteredEdge(n)&&r.options.hidden===!1&&o&&i.options.hidden===!1&&a.options.hidden===!1&&this.body.edgeIndices.push(r.id)}},$.prototype.bindEventListeners=function(){this.body.emitter.on(`_dataChanged`,()=>{this.edgesHandler._updateState(),this.body.emitter.emit(`_dataUpdated`)}),this.body.emitter.on(`_dataUpdated`,()=>{this.clustering._updateState(),this._updateVisibleIndices(),this._updateValueRange(this.body.nodes),this._updateValueRange(this.body.edges),this.body.emitter.emit(`startSimulation`),this.body.emitter.emit(`_requestRedraw`)})},$.prototype.setData=function(e){if(this.body.emitter.emit(`resetPhysics`),this.body.emitter.emit(`_resetData`),this.selectionHandler.unselectAll(),e&&e.dot&&(e.nodes||e.edges))throw SyntaxError(`Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.`);if(this.setOptions(e&&e.options),e&&e.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);`);let t=YV(e.dot);this.setData(t);return}else if(e&&e.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);`);let t=XV(e.gephi);this.setData(t);return}else this.nodesHandler.setData(e&&e.nodes,!0),this.edgesHandler.setData(e&&e.edges,!0);this.body.emitter.emit(`_dataChanged`),this.body.emitter.emit(`_dataLoaded`),this.body.emitter.emit(`initPhysics`)},$.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(let e in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,e)&&delete this.body.nodes[e];for(let e in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,e)&&delete this.body.edges[e];MB(this.body.container)},$.prototype._updateValueRange=function(e){let t,n,r,i=0;for(t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let a=e[t].getValue();a!==void 0&&(n=n===void 0?a:Math.min(a,n),r=r===void 0?a:Math.max(a,r),i+=a)}if(n!==void 0&&r!==void 0)for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&e[t].setValueRange(n,r,i)},$.prototype.isActive=function(){return!this.activator||this.activator.active},$.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)},$.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)},$.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)},$.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)},$.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)},$.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)},$.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)},$.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)},$.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)},$.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)},$.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)},$.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)},$.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)},$.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)},$.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)},$.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)},$.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)},$.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)},$.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)},$.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)},$.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)},$.prototype.editNodeMode=function(){return console.warn(`Deprecated: Please use editNode instead of editNodeMode.`),this.manipulation.editNode.apply(this.manipulation,arguments)},$.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)},$.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)},$.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)},$.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)},$.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)},$.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)},$.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)},$.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)},$.prototype.getConnectedNodes=function(e){return this.body.nodes[e]===void 0?this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments):this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments)},$.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)},$.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)},$.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)},$.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)},$.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)},$.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)},$.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)},$.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)},$.prototype.getNodeAt=function(){let e=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return e!==void 0&&e.id!==void 0?e.id:e},$.prototype.getEdgeAt=function(){let e=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return e!==void 0&&e.id!==void 0?e.id:e},$.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)},$.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)},$.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()},$.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)},$.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)},$.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)},$.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)},$.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)},$.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)},$.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)},$.prototype.getOptionsFromConfigurator=function(){let e={};return this.configurator&&(e=this.configurator.getOptions.apply(this.configurator)),e};export{yC as n,$ as t};
|