@eventcatalog/core 0.6.4 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +53 -62
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/config.json +3 -3
- package/.next/cache/eslint/.cache_1bay4w0 +1 -1
- package/.next/cache/next-server.js.nft.json +1 -1
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/1.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +1 -1
- package/.next/react-loadable-manifest.json +4 -4
- package/.next/routes-manifest.json +1 -1
- package/.next/server/pages/404.html +2 -2
- package/.next/server/pages/500.html +2 -2
- package/.next/server/pages/domains/Orders/events/OrderComplete/logs.html +1 -1
- package/.next/server/pages/domains/Orders/events/OrderComplete.html +2 -2
- package/.next/server/pages/domains/Orders/events/OrderComplete.json +1 -1
- package/.next/server/pages/domains/Orders/events/OrderConfirmed/logs.html +1 -1
- package/.next/server/pages/domains/Orders/events/OrderConfirmed.html +2 -2
- package/.next/server/pages/domains/Orders/events/OrderConfirmed.json +1 -1
- package/.next/server/pages/domains/Orders/events/OrderRequested/logs.html +1 -1
- package/.next/server/pages/domains/Orders/events/OrderRequested.html +2 -2
- package/.next/server/pages/domains/Orders/events/OrderRequested.json +1 -1
- package/.next/server/pages/domains/Orders/services/Orders Service.html +2 -2
- package/.next/server/pages/domains/Orders/services/Orders Service.json +1 -1
- package/.next/server/pages/domains/Orders.html +2 -2
- package/.next/server/pages/domains/Orders.json +1 -1
- package/.next/server/pages/domains/Shopping/events/AddedItemToCart/logs.html +1 -1
- package/.next/server/pages/domains/Shopping/events/AddedItemToCart/v/0.0.1.html +2 -2
- package/.next/server/pages/domains/Shopping/events/AddedItemToCart/v/0.0.1.json +1 -1
- package/.next/server/pages/domains/Shopping/events/AddedItemToCart/v/0.0.2.html +2 -2
- package/.next/server/pages/domains/Shopping/events/AddedItemToCart/v/0.0.2.json +1 -1
- package/.next/server/pages/domains/Shopping/events/AddedItemToCart.html +2 -2
- package/.next/server/pages/domains/Shopping/events/AddedItemToCart.json +1 -1
- package/.next/server/pages/domains/Shopping/events/RemovedItemFromCart/logs.html +1 -1
- package/.next/server/pages/domains/Shopping/events/RemovedItemFromCart.html +2 -2
- package/.next/server/pages/domains/Shopping/events/RemovedItemFromCart.json +1 -1
- package/.next/server/pages/domains/Shopping.html +2 -2
- package/.next/server/pages/domains/Shopping.json +1 -1
- package/.next/server/pages/domains.html +2 -2
- package/.next/server/pages/events/PaymentProcessed/logs.html +1 -1
- package/.next/server/pages/events/PaymentProcessed.html +2 -2
- package/.next/server/pages/events/PaymentProcessed.json +1 -1
- package/.next/server/pages/events/ShipmentDelivered/logs.html +1 -1
- package/.next/server/pages/events/ShipmentDelivered.html +2 -2
- package/.next/server/pages/events/ShipmentDelivered.json +1 -1
- package/.next/server/pages/events/ShipmentDispatched/logs.html +1 -1
- package/.next/server/pages/events/ShipmentDispatched.html +2 -2
- package/.next/server/pages/events/ShipmentDispatched.json +1 -1
- package/.next/server/pages/events/ShipmentPrepared/logs.html +1 -1
- package/.next/server/pages/events/ShipmentPrepared.html +2 -2
- package/.next/server/pages/events/ShipmentPrepared.json +1 -1
- package/.next/server/pages/events.html +2 -2
- package/.next/server/pages/index.html +1 -1
- package/.next/server/pages/overview.html +1 -1
- package/.next/server/pages/services/Orders Service.html +1 -1
- package/.next/server/pages/services/Payment Service.html +2 -2
- package/.next/server/pages/services/Payment Service.json +1 -1
- package/.next/server/pages/services/Shipping Service.html +2 -2
- package/.next/server/pages/services/Shipping Service.json +1 -1
- package/.next/server/pages/services.html +2 -2
- package/.next/server/pages/users/dboyne.html +2 -2
- package/.next/server/pages/users/mSmith.html +2 -2
- package/.next/server/pages/visualiser.html +2 -2
- package/.next/server/pages-manifest.json +1 -1
- package/.next/static/LV5d46cQP47_4rJLdtrMI/_buildManifest.js +1 -0
- package/.next/static/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/_ssgManifest.js +0 -0
- package/.next/static/chunks/146-5099ea027cf41f62.js +1 -0
- package/.next/static/chunks/176cb4e4-67d43b8f14a05371.js +1 -0
- package/.next/static/chunks/178-99334a8cb0fc8e16.js +1 -0
- package/{out/_next/static/chunks/238.759fe985504715b6.js → .next/static/chunks/238.c050b1795bc61364.js} +1 -1
- package/.next/static/chunks/{839-08b84a92f631817b.js → 365-95ba51a78a3b88a2.js} +1 -1
- package/.next/static/chunks/434-d3ed786e5ed5986a.js +1 -0
- package/.next/static/chunks/57.0a6f5466e4087c4d.js +1 -0
- package/.next/static/chunks/{586.0639e54142b33dc7.js → 586.da43f27c00dd3d61.js} +1 -1
- package/.next/static/chunks/639-b8e1e1c3e370236e.js +1 -0
- package/.next/static/chunks/pages/domains/[domain]/events/[name]/v/{[version]-3e6462ca32e0be58.js → [version]-05278010335a6505.js} +1 -1
- package/.next/static/chunks/pages/domains/[domain]/events/{[name]-79a57e782e7c84e5.js → [name]-7d15e8f3bb0dd2ed.js} +1 -1
- package/.next/static/chunks/pages/domains/[domain]/services/{[name]-296caddae2d12a1a.js → [name]-cf0db53a3cc1426a.js} +1 -1
- package/.next/static/chunks/pages/events/[name]/v/{[version]-7755f313803e44ce.js → [version]-9ce839760c295353.js} +1 -1
- package/.next/static/chunks/pages/events/{[name]-c1ad9e814385d45e.js → [name]-ba953012d0ce9a53.js} +1 -1
- package/.next/static/chunks/pages/events-634c972c10d7d4fa.js +1 -0
- package/.next/static/chunks/pages/{overview-39a9b04fa44518aa.js → overview-edd91cd051b5d6df.js} +1 -1
- package/.next/static/chunks/pages/services/{[name]-a905da8104f827fe.js → [name]-ede9fdaf0fda44b2.js} +1 -1
- package/.next/static/chunks/pages/services-9231149c854ea798.js +1 -0
- package/.next/static/chunks/pages/users/[id]-fe1d5cc960b430c7.js +1 -0
- package/.next/static/chunks/webpack-7c217f5007256cc6.js +1 -0
- package/.next/trace +84 -106
- package/CHANGELOG.md +6 -0
- package/out/404/index.html +2 -2
- package/out/404.html +2 -2
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/domains/Orders/events/OrderComplete/logs.json +0 -0
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/domains/Orders/events/OrderComplete.json +1 -1
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/domains/Orders/events/OrderConfirmed/logs.json +0 -0
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/domains/Orders/events/OrderConfirmed.json +1 -1
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/domains/Orders/events/OrderRequested/logs.json +0 -0
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/domains/Orders/events/OrderRequested.json +1 -1
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/domains/Orders/services/Orders Service.json +1 -1
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/domains/Orders.json +1 -1
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/domains/Shopping/events/AddedItemToCart/logs.json +0 -0
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/domains/Shopping/events/AddedItemToCart/v/0.0.1.json +1 -1
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/domains/Shopping/events/AddedItemToCart/v/0.0.2.json +1 -1
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/domains/Shopping/events/AddedItemToCart.json +1 -1
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/domains/Shopping/events/RemovedItemFromCart/logs.json +0 -0
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/domains/Shopping/events/RemovedItemFromCart.json +1 -1
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/domains/Shopping.json +1 -1
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/domains.json +0 -0
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/events/PaymentProcessed/logs.json +0 -0
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/events/PaymentProcessed.json +1 -1
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/events/ShipmentDelivered/logs.json +0 -0
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/events/ShipmentDelivered.json +1 -1
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/events/ShipmentDispatched/logs.json +0 -0
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/events/ShipmentDispatched.json +1 -1
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/events/ShipmentPrepared/logs.json +0 -0
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/events/ShipmentPrepared.json +1 -1
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/events.json +0 -0
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/overview.json +0 -0
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/services/Orders Service.json +0 -0
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/services/Payment Service.json +1 -1
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/services/Shipping Service.json +1 -1
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/services.json +0 -0
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/users/dboyne.json +0 -0
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/users/mSmith.json +0 -0
- package/out/_next/data/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/visualiser.json +0 -0
- package/out/_next/static/LV5d46cQP47_4rJLdtrMI/_buildManifest.js +1 -0
- package/out/_next/static/{dzGI06ebzOu6e1ZN7Y01r → LV5d46cQP47_4rJLdtrMI}/_ssgManifest.js +0 -0
- package/out/_next/static/chunks/146-5099ea027cf41f62.js +1 -0
- package/out/_next/static/chunks/176cb4e4-67d43b8f14a05371.js +1 -0
- package/out/_next/static/chunks/178-99334a8cb0fc8e16.js +1 -0
- package/{.next/static/chunks/238.759fe985504715b6.js → out/_next/static/chunks/238.c050b1795bc61364.js} +1 -1
- package/out/_next/static/chunks/{839-08b84a92f631817b.js → 365-95ba51a78a3b88a2.js} +1 -1
- package/out/_next/static/chunks/434-d3ed786e5ed5986a.js +1 -0
- package/out/_next/static/chunks/57.0a6f5466e4087c4d.js +1 -0
- package/out/_next/static/chunks/{586.0639e54142b33dc7.js → 586.da43f27c00dd3d61.js} +1 -1
- package/out/_next/static/chunks/639-b8e1e1c3e370236e.js +1 -0
- package/out/_next/static/chunks/pages/domains/[domain]/events/[name]/v/{[version]-3e6462ca32e0be58.js → [version]-05278010335a6505.js} +1 -1
- package/out/_next/static/chunks/pages/domains/[domain]/events/{[name]-79a57e782e7c84e5.js → [name]-7d15e8f3bb0dd2ed.js} +1 -1
- package/out/_next/static/chunks/pages/domains/[domain]/services/{[name]-296caddae2d12a1a.js → [name]-cf0db53a3cc1426a.js} +1 -1
- package/out/_next/static/chunks/pages/events/[name]/v/{[version]-7755f313803e44ce.js → [version]-9ce839760c295353.js} +1 -1
- package/out/_next/static/chunks/pages/events/{[name]-c1ad9e814385d45e.js → [name]-ba953012d0ce9a53.js} +1 -1
- package/out/_next/static/chunks/pages/events-634c972c10d7d4fa.js +1 -0
- package/out/_next/static/chunks/pages/{overview-39a9b04fa44518aa.js → overview-edd91cd051b5d6df.js} +1 -1
- package/out/_next/static/chunks/pages/services/{[name]-a905da8104f827fe.js → [name]-ede9fdaf0fda44b2.js} +1 -1
- package/out/_next/static/chunks/pages/services-9231149c854ea798.js +1 -0
- package/out/_next/static/chunks/pages/users/[id]-fe1d5cc960b430c7.js +1 -0
- package/out/_next/static/chunks/webpack-7c217f5007256cc6.js +1 -0
- package/out/domains/Orders/events/OrderComplete/index.html +2 -2
- package/out/domains/Orders/events/OrderComplete/logs/index.html +1 -1
- package/out/domains/Orders/events/OrderConfirmed/index.html +2 -2
- package/out/domains/Orders/events/OrderConfirmed/logs/index.html +1 -1
- package/out/domains/Orders/events/OrderRequested/index.html +2 -2
- package/out/domains/Orders/events/OrderRequested/logs/index.html +1 -1
- package/out/domains/Orders/index.html +2 -2
- package/out/domains/Orders/services/Orders Service/index.html +2 -2
- package/out/domains/Shopping/events/AddedItemToCart/index.html +2 -2
- package/out/domains/Shopping/events/AddedItemToCart/logs/index.html +1 -1
- package/out/domains/Shopping/events/AddedItemToCart/v/0.0.1/index.html +2 -2
- package/out/domains/Shopping/events/AddedItemToCart/v/0.0.2/index.html +2 -2
- package/out/domains/Shopping/events/RemovedItemFromCart/index.html +2 -2
- package/out/domains/Shopping/events/RemovedItemFromCart/logs/index.html +1 -1
- package/out/domains/Shopping/index.html +2 -2
- package/out/domains/index.html +2 -2
- package/out/events/PaymentProcessed/index.html +2 -2
- package/out/events/PaymentProcessed/logs/index.html +1 -1
- package/out/events/ShipmentDelivered/index.html +2 -2
- package/out/events/ShipmentDelivered/logs/index.html +1 -1
- package/out/events/ShipmentDispatched/index.html +2 -2
- package/out/events/ShipmentDispatched/logs/index.html +1 -1
- package/out/events/ShipmentPrepared/index.html +2 -2
- package/out/events/ShipmentPrepared/logs/index.html +1 -1
- package/out/events/index.html +2 -2
- package/out/index.html +1 -1
- package/out/overview/index.html +1 -1
- package/out/services/Orders Service/index.html +1 -1
- package/out/services/Payment Service/index.html +2 -2
- package/out/services/Shipping Service/index.html +2 -2
- package/out/services/index.html +2 -2
- package/out/users/dboyne/index.html +2 -2
- package/out/users/mSmith/index.html +2 -2
- package/out/visualiser/index.html +2 -2
- package/package.json +2 -2
- package/.next/static/chunks/226-454462990cd604b0.js +0 -1
- package/.next/static/chunks/288-e3ed06e784826495.js +0 -1
- package/.next/static/chunks/2e6ef0e3-0ae424029c3b4f45.js +0 -1
- package/.next/static/chunks/573.c9dc2cb5579f4bb9.js +0 -1
- package/.next/static/chunks/650-01c824b1bc28786b.js +0 -1
- package/.next/static/chunks/806-c89f87f1d2d47d2a.js +0 -1
- package/.next/static/chunks/853-190dbaf314630cbc.js +0 -1
- package/.next/static/chunks/pages/events-ea201dfa32df6bfc.js +0 -1
- package/.next/static/chunks/pages/services-472be0d0db2bd27d.js +0 -1
- package/.next/static/chunks/pages/users/[id]-98fca0e0212ff199.js +0 -1
- package/.next/static/chunks/webpack-e52859ed7813ba21.js +0 -1
- package/.next/static/dzGI06ebzOu6e1ZN7Y01r/_buildManifest.js +0 -1
- package/out/_next/static/chunks/226-454462990cd604b0.js +0 -1
- package/out/_next/static/chunks/288-e3ed06e784826495.js +0 -1
- package/out/_next/static/chunks/2e6ef0e3-0ae424029c3b4f45.js +0 -1
- package/out/_next/static/chunks/573.c9dc2cb5579f4bb9.js +0 -1
- package/out/_next/static/chunks/650-01c824b1bc28786b.js +0 -1
- package/out/_next/static/chunks/806-c89f87f1d2d47d2a.js +0 -1
- package/out/_next/static/chunks/853-190dbaf314630cbc.js +0 -1
- package/out/_next/static/chunks/pages/events-ea201dfa32df6bfc.js +0 -1
- package/out/_next/static/chunks/pages/services-472be0d0db2bd27d.js +0 -1
- package/out/_next/static/chunks/pages/users/[id]-98fca0e0212ff199.js +0 -1
- package/out/_next/static/chunks/webpack-e52859ed7813ba21.js +0 -1
- package/out/_next/static/dzGI06ebzOu6e1ZN7Y01r/_buildManifest.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[434],{80594:function(e,t,n){var r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,u=/^0o[0-7]+$/i,a=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,s="object"==typeof self&&self&&self.Object===Object&&self,c=l||s||Function("return this")(),f=Object.prototype.toString,d=Math.max,p=Math.min,v=function(){return c.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function h(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=o.test(e);return n||u.test(e)?a(e.slice(2),n?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,u,a,l,s=0,c=!1,f=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var n=r,o=i;return r=i=void 0,s=t,u=e.apply(o,n)}function y(e){return s=e,a=setTimeout(w,t),c?b(e):u}function E(e){var n=e-l;return void 0===l||n>=t||n<0||f&&e-s>=o}function w(){var e=v();if(E(e))return x(e);a=setTimeout(w,function(e){var n=t-(e-l);return f?p(n,o-(e-s)):n}(e))}function x(e){return a=void 0,g&&r?b(e):(r=i=void 0,u)}function T(){var e=v(),n=E(e);if(r=arguments,i=this,l=e,n){if(void 0===a)return y(l);if(f)return a=setTimeout(w,t),b(l)}return void 0===a&&(a=setTimeout(w,t)),u}return t=h(t)||0,m(n)&&(c=!!n.leading,o=(f="maxWait"in n)?d(h(n.maxWait)||0,t):o,g="trailing"in n?!!n.trailing:g),T.cancel=function(){void 0!==a&&clearTimeout(a),s=0,r=l=i=a=void 0},T.flush=function(){return void 0===a?u:x(v())},T}},93542:function(e,t,n){"use strict";var r,i;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"===typeof(null==(i=n.g.process)?void 0:i.env)?n.g.process:n(42351)},42351:function(e){!function(){var t={229:function(e){var t,n,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function u(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"===typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"===typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var a,l=[],s=!1,c=-1;function f(){s&&a&&(s=!1,a.length?l=a.concat(l):c=-1,l.length&&d())}function d(){if(!s){var e=u(f);s=!0;for(var t=l.length;t;){for(a=l,l=[];++c<t;)a&&a[c].run();c=-1,t=l.length}a=null,s=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function v(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new p(e,t)),1!==l.length||s||u(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=v,r.addListener=v,r.once=v,r.off=v,r.removeListener=v,r.removeAllListeners=v,r.emit=v,r.prependListener=v,r.prependOnceListener=v,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={exports:{}},u=!0;try{t[e](o,o.exports,r),u=!1}finally{u&&delete n[e]}return o.exports}r.ab="//";var i=r(229);e.exports=i}()},54481:function(e,t,n){"use strict";n.d(t,{v:function(){return ie}});var r,i=n(2784),o=n(3703),u=n(90544),a=n(71869),l=n(58314),s=n(88064),c=n(33401),f=n(76460);let d=0;function p(){return++d}let v=null!=(r=i.useId)?r:function(){let e=(0,f.H)(),[t,n]=i.useState(e?p:null);return(0,s.e)((()=>{null===t&&n(p())}),[t]),null!=t?""+t:void 0};var m=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(m||{});var h,g=((h=g||{})[h.First=0]="First",h[h.Previous=1]="Previous",h[h.Next=2]="Next",h[h.Last=3]="Last",h[h.Specific=4]="Specific",h[h.Nothing=5]="Nothing",h);function b(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=null!=r?r:-1,o=(()=>{switch(e.focus){case 0:return n.findIndex((e=>!t.resolveDisabled(e)));case 1:{let e=n.slice().reverse().findIndex(((e,n,r)=>!(-1!==i&&r.length-n-1>=i)&&!t.resolveDisabled(e)));return-1===e?e:n.length-1-e}case 2:return n.findIndex(((e,n)=>!(n<=i)&&!t.resolveDisabled(e)));case 3:{let e=n.slice().reverse().findIndex((e=>!t.resolveDisabled(e)));return-1===e?e:n.length-1-e}case 4:return n.findIndex((n=>t.resolveId(n)===e.id));case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}})();return-1===o?r:o}function y(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=""===(null==t?void 0:t.getAttribute("disabled"));return(!r||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}var E=n(69817);function w(e){return E.s?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let x=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");var T,I,S=((I=S||{})[I.First=1]="First",I[I.Previous=2]="Previous",I[I.Next=4]="Next",I[I.Last=8]="Last",I[I.WrapAround=16]="WrapAround",I[I.NoScroll=32]="NoScroll",I),R=((T=R||{})[T.Error=0]="Error",T[T.Overflow=1]="Overflow",T[T.Success=2]="Success",T[T.Underflow=3]="Underflow",T),P=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(P||{});function O(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(x)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}var F=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(F||{});function N(e,t=0){var n;return e!==(null==(n=w(e))?void 0:n.body)&&(0,o.E)(t,{0:()=>e.matches(x),1(){let t=e;for(;null!==t;){if(t.matches(x))return!0;t=t.parentElement}return!1}})}function M(e){let t=w(e);(0,a.k)().nextFrame((()=>{t&&!N(t.activeElement,0)&&function(e){null==e||e.focus({preventScroll:!0})}(e)}))}let L=["textarea","input"].join(",");function A(e,t=(e=>e)){return e.slice().sort(((e,n)=>{let r=t(e),i=t(n);if(null===r||null===i)return 0;let o=r.compareDocumentPosition(i);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}function k(e,t){return function(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let o=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,u=Array.isArray(e)?n?A(e):e:O(e);i.length>0&&(u=u.filter((e=>!i.includes(e)))),r=null!=r?r:o.activeElement;let a,l=(()=>{if(5&t)return 1;if(10&t)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),s=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,u.indexOf(r))-1;if(4&t)return Math.max(0,u.indexOf(r))+1;if(8&t)return u.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=32&t?{preventScroll:!0}:{},f=0,d=u.length;do{if(f>=d||f+d<=0)return 0;let e=s+f;if(16&t)e=(e+d)%d;else{if(e<0)return 3;if(e>=d)return 1}a=u[e],null==a||a.focus(c),f+=l}while(a!==o.activeElement);return 6&t&&function(e){var t,n;return null!=(n=null==(t=null==e?void 0:e.matches)?void 0:t.call(e,L))&&n}(a)&&a.select(),a.hasAttribute("tabindex")||a.setAttribute("tabindex","0"),2}(O(),t,{relativeTo:e})}var C=n(61742);function j(e,t,n){let r=(0,C.E)(t);(0,i.useEffect)((()=>{function t(e){r.current(e)}return document.addEventListener(e,t,n),()=>document.removeEventListener(e,t,n)}),[e,n])}function D(e,t,n=!0){let r=(0,i.useRef)(!1);function o(n,i){if(!r.current||n.defaultPrevented)return;let o=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(e),u=i(n);if(null!==u&&u.getRootNode().contains(u)){for(let e of o){if(null===e)continue;let t=e instanceof HTMLElement?e:e.current;if(null!=t&&t.contains(u)||n.composed&&n.composedPath().includes(t))return}return!N(u,F.Loose)&&-1!==u.tabIndex&&n.preventDefault(),t(n,u)}}(0,i.useEffect)((()=>{requestAnimationFrame((()=>{r.current=n}))}),[n]);let u=(0,i.useRef)(null);j("mousedown",(e=>{var t,n;r.current&&(u.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)}),!0),j("click",(e=>{!u.current||(o(e,(()=>u.current)),u.current=null)}),!0),j("blur",(e=>o(e,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))),!0)}var H=n(47215);function z(e){var t;if(e.type)return e.type;let n=null!=(t=e.as)?t:"button";return"string"==typeof n&&"button"===n.toLowerCase()?"button":void 0}function U(e,t){let[n,r]=(0,i.useState)((()=>z(e)));return(0,s.e)((()=>{r(z(e))}),[e.type,e.as]),(0,s.e)((()=>{n||!t.current||t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")}),[n,t]),n}var _=n(55559);function $(e){return[e.screenX,e.screenY]}var V=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(V||{}),B=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(B||{}),Z=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e))(Z||{});function G(e,t=(e=>e)){let n=null!==e.activeItemIndex?e.items[e.activeItemIndex]:null,r=A(t(e.items.slice()),(e=>e.dataRef.current.domRef.current)),i=n?r.indexOf(n):null;return-1===i&&(i=null),{items:r,activeItemIndex:i}}let q={1:e=>1===e.menuState?e:{...e,activeItemIndex:null,menuState:1},0:e=>0===e.menuState?e:{...e,menuState:0},2:(e,t)=>{var n;let r=G(e),i=b(t,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeItemIndex:i,activationTrigger:null!=(n=t.trigger)?n:1}},3:(e,t)=>{let n=""!==e.searchQuery?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(null!==e.activeItemIndex?e.items.slice(e.activeItemIndex+n).concat(e.items.slice(0,e.activeItemIndex+n)):e.items).find((e=>{var t;return(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(r))&&!e.dataRef.current.disabled})),o=i?e.items.indexOf(i):-1;return-1===o||o===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:o,activationTrigger:1}},4:e=>""===e.searchQuery?e:{...e,searchQuery:"",searchActiveItemIndex:null},5:(e,t)=>{let n=G(e,(e=>[...e,{id:t.id,dataRef:t.dataRef}]));return{...e,...n}},6:(e,t)=>{let n=G(e,(e=>{let n=e.findIndex((e=>e.id===t.id));return-1!==n&&e.splice(n,1),e}));return{...e,...n,activationTrigger:1}}},Q=(0,i.createContext)(null);function W(e){let t=(0,i.useContext)(Q);if(null===t){let t=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,W),t}return t}function Y(e,t){return(0,o.E)(t.type,q,e,t)}Q.displayName="MenuContext";let K=i.Fragment,J=(0,u.yV)((function(e,t){let n=(0,i.useReducer)(Y,{menuState:1,buttonRef:(0,i.createRef)(),itemsRef:(0,i.createRef)(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:r,itemsRef:a,buttonRef:l},s]=n,f=(0,c.T)(t);D([l,a],((e,t)=>{var n;s({type:1}),N(t,F.Loose)||(e.preventDefault(),null==(n=l.current)||n.focus())}),0===r);let d=(0,_.z)((()=>{s({type:1})})),p=(0,i.useMemo)((()=>({open:0===r,close:d})),[r,d]),v=e,m={ref:f};return i.createElement(Q.Provider,{value:n},i.createElement(H.up,{value:(0,o.E)(r,{0:H.ZM.Open,1:H.ZM.Closed})},(0,u.sY)({ourProps:m,theirProps:v,slot:p,defaultTag:K,name:"Menu"})))})),X=(0,u.yV)((function(e,t){var n;let r=v(),{id:o=`headlessui-menu-button-${r}`,...a}=e,[s,f]=W("Menu.Button"),d=(0,c.T)(s.buttonRef,t),p=(0,l.G)(),h=(0,_.z)((e=>{switch(e.key){case m.Space:case m.Enter:case m.ArrowDown:e.preventDefault(),e.stopPropagation(),f({type:0}),p.nextFrame((()=>f({type:2,focus:g.First})));break;case m.ArrowUp:e.preventDefault(),e.stopPropagation(),f({type:0}),p.nextFrame((()=>f({type:2,focus:g.Last})))}})),b=(0,_.z)((e=>{if(e.key===m.Space)e.preventDefault()})),E=(0,_.z)((t=>{if(y(t.currentTarget))return t.preventDefault();e.disabled||(0===s.menuState?(f({type:1}),p.nextFrame((()=>{var e;return null==(e=s.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))):(t.preventDefault(),f({type:0})))})),w=(0,i.useMemo)((()=>({open:0===s.menuState})),[s]),x={ref:d,id:o,type:U(e,s.buttonRef),"aria-haspopup":"menu","aria-controls":null==(n=s.itemsRef.current)?void 0:n.id,"aria-expanded":e.disabled?void 0:0===s.menuState,onKeyDown:h,onKeyUp:b,onClick:E};return(0,u.sY)({ourProps:x,theirProps:a,slot:w,defaultTag:"button",name:"Menu.Button"})})),ee=u.AN.RenderStrategy|u.AN.Static,te=(0,u.yV)((function(e,t){var n,r;let o=v(),{id:f=`headlessui-menu-items-${o}`,...d}=e,[p,h]=W("Menu.Items"),b=(0,c.T)(p.itemsRef,t),y=function(...e){return(0,i.useMemo)((()=>w(...e)),[...e])}(p.itemsRef),E=(0,l.G)(),x=(0,H.oJ)(),T=null!==x?x===H.ZM.Open:0===p.menuState;(0,i.useEffect)((()=>{let e=p.itemsRef.current;!e||0===p.menuState&&e!==(null==y?void 0:y.activeElement)&&e.focus({preventScroll:!0})}),[p.menuState,p.itemsRef,y]),function({container:e,accept:t,walk:n,enabled:r=!0}){let o=(0,i.useRef)(t),u=(0,i.useRef)(n);(0,i.useEffect)((()=>{o.current=t,u.current=n}),[t,n]),(0,s.e)((()=>{if(!e||!r)return;let t=w(e);if(!t)return;let n=o.current,i=u.current,a=Object.assign((e=>n(e)),{acceptNode:n}),l=t.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,a,!1);for(;l.nextNode();)i(l.currentNode)}),[e,r,o,u])}({container:p.itemsRef.current,enabled:0===p.menuState,accept:e=>"menuitem"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let I=(0,_.z)((e=>{var t,n;switch(E.dispose(),e.key){case m.Space:if(""!==p.searchQuery)return e.preventDefault(),e.stopPropagation(),h({type:3,value:e.key});case m.Enter:if(e.preventDefault(),e.stopPropagation(),h({type:1}),null!==p.activeItemIndex){let{dataRef:e}=p.items[p.activeItemIndex];null==(n=null==(t=e.current)?void 0:t.domRef.current)||n.click()}M(p.buttonRef.current);break;case m.ArrowDown:return e.preventDefault(),e.stopPropagation(),h({type:2,focus:g.Next});case m.ArrowUp:return e.preventDefault(),e.stopPropagation(),h({type:2,focus:g.Previous});case m.Home:case m.PageUp:return e.preventDefault(),e.stopPropagation(),h({type:2,focus:g.First});case m.End:case m.PageDown:return e.preventDefault(),e.stopPropagation(),h({type:2,focus:g.Last});case m.Escape:e.preventDefault(),e.stopPropagation(),h({type:1}),(0,a.k)().nextFrame((()=>{var e;return null==(e=p.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));break;case m.Tab:e.preventDefault(),e.stopPropagation(),h({type:1}),(0,a.k)().nextFrame((()=>{k(p.buttonRef.current,e.shiftKey?S.Previous:S.Next)}));break;default:1===e.key.length&&(h({type:3,value:e.key}),E.setTimeout((()=>h({type:4})),350))}})),R=(0,_.z)((e=>{if(e.key===m.Space)e.preventDefault()})),P=(0,i.useMemo)((()=>({open:0===p.menuState})),[p]),O={"aria-activedescendant":null===p.activeItemIndex||null==(n=p.items[p.activeItemIndex])?void 0:n.id,"aria-labelledby":null==(r=p.buttonRef.current)?void 0:r.id,id:f,onKeyDown:I,onKeyUp:R,role:"menu",tabIndex:0,ref:b};return(0,u.sY)({ourProps:O,theirProps:d,slot:P,defaultTag:"div",features:ee,visible:T,name:"Menu.Items"})})),ne=i.Fragment,re=(0,u.yV)((function(e,t){let n=v(),{id:r=`headlessui-menu-item-${n}`,disabled:o=!1,...l}=e,[f,d]=W("Menu.Item"),p=null!==f.activeItemIndex&&f.items[f.activeItemIndex].id===r,m=(0,i.useRef)(null),h=(0,c.T)(t,m);(0,s.e)((()=>{if(0!==f.menuState||!p||0===f.activationTrigger)return;let e=(0,a.k)();return e.requestAnimationFrame((()=>{var e,t;null==(t=null==(e=m.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})),e.dispose}),[m,p,f.menuState,f.activationTrigger,f.activeItemIndex]);let b=(0,i.useRef)({disabled:o,domRef:m});(0,s.e)((()=>{b.current.disabled=o}),[b,o]),(0,s.e)((()=>{var e,t;b.current.textValue=null==(t=null==(e=m.current)?void 0:e.textContent)?void 0:t.toLowerCase()}),[b,m]),(0,s.e)((()=>(d({type:5,id:r,dataRef:b}),()=>d({type:6,id:r}))),[b,r]);let y=(0,_.z)((()=>{d({type:1})})),E=(0,_.z)((e=>{if(o)return e.preventDefault();d({type:1}),M(f.buttonRef.current)})),w=(0,_.z)((()=>{if(o)return d({type:2,focus:g.Nothing});d({type:2,focus:g.Specific,id:r})})),x=function(){let e=(0,i.useRef)([-1,-1]);return{wasMoved(t){let n=$(t);return(e.current[0]!==n[0]||e.current[1]!==n[1])&&(e.current=n,!0)},update(t){e.current=$(t)}}}(),T=(0,_.z)((e=>x.update(e))),I=(0,_.z)((e=>{!x.wasMoved(e)||o||p||d({type:2,focus:g.Specific,id:r,trigger:0})})),S=(0,_.z)((e=>{!x.wasMoved(e)||o||!p||d({type:2,focus:g.Nothing})})),R=(0,i.useMemo)((()=>({active:p,disabled:o,close:y})),[p,o,y]);return(0,u.sY)({ourProps:{id:r,ref:h,role:"menuitem",tabIndex:!0===o?void 0:-1,"aria-disabled":!0===o||void 0,disabled:void 0,onClick:E,onFocus:w,onPointerEnter:T,onMouseEnter:T,onPointerMove:I,onMouseMove:I,onPointerLeave:S,onMouseLeave:S},theirProps:l,slot:R,defaultTag:ne,name:"Menu.Item"})})),ie=Object.assign(J,{Button:X,Items:te,Item:re})},51083:function(e,t,n){"use strict";n.d(t,{u:function(){return k}});var r=n(2784),i=n(90544),o=n(47215),u=n(3703),a=n(88064);function l(){let e=(0,r.useRef)(!1);return(0,a.e)((()=>(e.current=!0,()=>{e.current=!1})),[]),e}var s=n(61742),c=n(76460),f=n(33401);var d=n(71869);function p(e,...t){e&&t.length>0&&e.classList.add(...t)}function v(e,...t){e&&t.length>0&&e.classList.remove(...t)}function m(e,t,n,r){let i=n?"enter":"leave",o=(0,d.k)(),a=void 0!==r?function(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}(r):()=>{};"enter"===i&&(e.removeAttribute("hidden"),e.style.display="");let l=(0,u.E)(i,{enter:()=>t.enter,leave:()=>t.leave}),s=(0,u.E)(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),c=(0,u.E)(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return v(e,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),p(e,...l,...c),o.nextFrame((()=>{v(e,...c),p(e,...s),function(e,t){let n=(0,d.k)();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:i}=getComputedStyle(e),[o,u]=[r,i].map((e=>{let[t=0]=e.split(",").filter(Boolean).map((e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e))).sort(((e,t)=>t-e));return t}));if(o+u!==0){let r=n.addEventListener(e,"transitionend",(e=>{e.target===e.currentTarget&&(t(),r())}))}else t();n.add((()=>t())),n.dispose}(e,(()=>(v(e,...l),p(e,...t.entered),a())))})),o.dispose}var h=n(58314);function g({container:e,direction:t,classes:n,onStart:r,onStop:i}){let o=l(),u=(0,h.G)(),c=(0,s.E)(t);(0,a.e)((()=>{let t=(0,d.k)();u.add(t.dispose);let a=e.current;if(a&&"idle"!==c.current&&o.current)return t.dispose(),r.current(c.current),t.add(m(a,n.current,"enter"===c.current,(()=>{t.dispose(),i.current(c.current)}))),t.dispose}),[t])}var b=n(55559);function y(...e){return e.filter(Boolean).join(" ")}function E(e=""){return e.split(" ").filter((e=>e.trim().length>1))}let w=(0,r.createContext)(null);w.displayName="TransitionContext";var x,T=((x=T||{}).Visible="visible",x.Hidden="hidden",x);let I=(0,r.createContext)(null);function S(e){return"children"in e?S(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function R(e,t){let n=(0,s.E)(e),o=(0,r.useRef)([]),a=l(),c=(0,h.G)(),f=(0,b.z)(((e,t=i.l4.Hidden)=>{let r=o.current.findIndex((({el:t})=>t===e));-1!==r&&((0,u.E)(t,{[i.l4.Unmount](){o.current.splice(r,1)},[i.l4.Hidden](){o.current[r].state="hidden"}}),c.microTask((()=>{var e;!S(o)&&a.current&&(null==(e=n.current)||e.call(n))})))})),d=(0,b.z)((e=>{let t=o.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):o.current.push({el:e,state:"visible"}),()=>f(e,i.l4.Unmount)})),p=(0,r.useRef)([]),v=(0,r.useRef)(Promise.resolve()),m=(0,r.useRef)({enter:[],leave:[],idle:[]}),g=(0,b.z)(((e,n,r)=>{p.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter((([t])=>t!==e))),null==t||t.chains.current[n].push([e,new Promise((e=>{p.current.push(e)}))]),null==t||t.chains.current[n].push([e,new Promise((e=>{Promise.all(m.current[n].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===n?v.current=v.current.then((()=>null==t?void 0:t.wait.current)).then((()=>r(n))):r(n)})),y=(0,b.z)(((e,t,n)=>{Promise.all(m.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=p.current.shift())||e()})).then((()=>n(t)))}));return(0,r.useMemo)((()=>({children:o,register:d,unregister:f,onStart:g,onStop:y,wait:v,chains:m})),[d,f,o,g,y,m,v])}function P(){}I.displayName="NestingContext";let O=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function F(e){var t;let n={};for(let r of O)n[r]=null!=(t=e[r])?t:P;return n}let N=i.AN.RenderStrategy,M=(0,i.yV)((function(e,t){let{beforeEnter:n,afterEnter:a,beforeLeave:l,afterLeave:d,enter:p,enterFrom:v,enterTo:m,entered:h,leave:x,leaveFrom:T,leaveTo:P,...O}=e,M=(0,r.useRef)(null),L=(0,f.T)(M,t),A=O.unmount?i.l4.Unmount:i.l4.Hidden,{show:k,appear:C,initial:j}=function(){let e=(0,r.useContext)(w);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[D,H]=(0,r.useState)(k?"visible":"hidden"),z=function(){let e=(0,r.useContext)(I);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:U,unregister:_}=z,$=(0,r.useRef)(null);(0,r.useEffect)((()=>U(M)),[U,M]),(0,r.useEffect)((()=>{if(A===i.l4.Hidden&&M.current)return k&&"visible"!==D?void H("visible"):(0,u.E)(D,{hidden:()=>_(M),visible:()=>U(M)})}),[D,M,U,_,k,A]);let V=(0,s.E)({enter:E(p),enterFrom:E(v),enterTo:E(m),entered:E(h),leave:E(x),leaveFrom:E(T),leaveTo:E(P)}),B=function(e){let t=(0,r.useRef)(F(e));return(0,r.useEffect)((()=>{t.current=F(e)}),[e]),t}({beforeEnter:n,afterEnter:a,beforeLeave:l,afterLeave:d}),Z=(0,c.H)();(0,r.useEffect)((()=>{if(Z&&"visible"===D&&null===M.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[M,D,Z]);let G=j&&!C,q=!Z||G||$.current===k?"idle":k?"enter":"leave",Q=(0,b.z)((e=>(0,u.E)(e,{enter:()=>B.current.beforeEnter(),leave:()=>B.current.beforeLeave(),idle:()=>{}}))),W=(0,b.z)((e=>(0,u.E)(e,{enter:()=>B.current.afterEnter(),leave:()=>B.current.afterLeave(),idle:()=>{}}))),Y=R((()=>{H("hidden"),_(M)}),z);g({container:M,classes:V,direction:q,onStart:(0,s.E)((e=>{Y.onStart(M,e,Q)})),onStop:(0,s.E)((e=>{Y.onStop(M,e,W),"leave"===e&&!S(Y)&&(H("hidden"),_(M))}))}),(0,r.useEffect)((()=>{!G||(A===i.l4.Hidden?$.current=null:$.current=k)}),[k,G,D]);let K=O,J={ref:L};return C&&k&&("undefined"==typeof window||"undefined"==typeof document)&&(K={...K,className:y(O.className,...V.current.enter,...V.current.enterFrom)}),r.createElement(I.Provider,{value:Y},r.createElement(o.up,{value:(0,u.E)(D,{visible:o.ZM.Open,hidden:o.ZM.Closed})},(0,i.sY)({ourProps:J,theirProps:K,defaultTag:"div",features:N,visible:"visible"===D,name:"Transition.Child"})))})),L=(0,i.yV)((function(e,t){let{show:n,appear:l=!1,unmount:s,...d}=e,p=(0,r.useRef)(null),v=(0,f.T)(p,t);(0,c.H)();let m=(0,o.oJ)();if(void 0===n&&null!==m&&(n=(0,u.E)(m,{[o.ZM.Open]:!0,[o.ZM.Closed]:!1})),![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[h,g]=(0,r.useState)(n?"visible":"hidden"),b=R((()=>{g("hidden")})),[y,E]=(0,r.useState)(!0),x=(0,r.useRef)([n]);(0,a.e)((()=>{!1!==y&&x.current[x.current.length-1]!==n&&(x.current.push(n),E(!1))}),[x,n]);let T=(0,r.useMemo)((()=>({show:n,appear:l,initial:y})),[n,l,y]);(0,r.useEffect)((()=>{if(n)g("visible");else if(S(b)){let e=p.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&g("hidden")}else g("hidden")}),[n,b]);let P={unmount:s};return r.createElement(I.Provider,{value:b},r.createElement(w.Provider,{value:T},(0,i.sY)({ourProps:{...P,as:r.Fragment,children:r.createElement(M,{ref:v,...P,...d})},theirProps:{},defaultTag:r.Fragment,features:N,visible:"visible"===h,name:"Transition"})))})),A=(0,i.yV)((function(e,t){let n=null!==(0,r.useContext)(w),i=null!==(0,o.oJ)();return r.createElement(r.Fragment,null,!n&&i?r.createElement(L,{ref:t,...e}):r.createElement(M,{ref:t,...e}))})),k=Object.assign(L,{Child:A,Root:L})},58314:function(e,t,n){"use strict";n.d(t,{G:function(){return o}});var r=n(2784),i=n(71869);function o(){let[e]=(0,r.useState)(i.k);return(0,r.useEffect)((()=>()=>e.dispose()),[e]),e}},55559:function(e,t,n){"use strict";n.d(t,{z:function(){return o}});var r=n(2784),i=n(61742);let o=function(e){let t=(0,i.E)(e);return r.useCallback(((...e)=>t.current(...e)),[t])}},88064:function(e,t,n){"use strict";n.d(t,{e:function(){return i}});var r=n(2784);let i=n(69817).s?r.useEffect:r.useLayoutEffect},61742:function(e,t,n){"use strict";n.d(t,{E:function(){return o}});var r=n(2784),i=n(88064);function o(e){let t=(0,r.useRef)(e);return(0,i.e)((()=>{t.current=e}),[e]),t}},76460:function(e,t,n){"use strict";n.d(t,{H:function(){return o}});var r=n(2784);let i={serverHandoffComplete:!1};function o(){let[e,t]=(0,r.useState)(i.serverHandoffComplete);return(0,r.useEffect)((()=>{!0!==e&&t(!0)}),[e]),(0,r.useEffect)((()=>{!1===i.serverHandoffComplete&&(i.serverHandoffComplete=!0)}),[]),e}},33401:function(e,t,n){"use strict";n.d(t,{T:function(){return u}});var r=n(2784),i=n(55559);let o=Symbol();function u(...e){let t=(0,r.useRef)(e);(0,r.useEffect)((()=>{t.current=e}),[e]);let n=(0,i.z)((e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[o])))?void 0:n}},47215:function(e,t,n){"use strict";n.d(t,{ZM:function(){return u},oJ:function(){return a},up:function(){return l}});var r=n(2784);let i=(0,r.createContext)(null);i.displayName="OpenClosedContext";var o,u=((o=u||{})[o.Open=0]="Open",o[o.Closed=1]="Closed",o);function a(){return(0,r.useContext)(i)}function l({value:e,children:t}){return r.createElement(i.Provider,{value:e},t)}},71869:function(e,t,n){"use strict";function r(){let e=[],t=[],n={enqueue(e){t.push(e)},addEventListener:(e,t,r,i)=>(e.addEventListener(t,r,i),n.add((()=>e.removeEventListener(t,r,i)))),requestAnimationFrame(...e){let t=requestAnimationFrame(...e);return n.add((()=>cancelAnimationFrame(t)))},nextFrame:(...e)=>n.requestAnimationFrame((()=>n.requestAnimationFrame(...e))),setTimeout(...e){let t=setTimeout(...e);return n.add((()=>clearTimeout(t)))},microTask(...e){let t={current:!0};return function(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}((()=>{t.current&&e[0]()})),n.add((()=>{t.current=!1}))},add:t=>(e.push(t),()=>{let n=e.indexOf(t);if(n>=0){let[t]=e.splice(n,1);t()}}),dispose(){for(let t of e.splice(0))t()},async workQueue(){for(let e of t.splice(0))await e()}};return n}n.d(t,{k:function(){return r}})},3703:function(e,t,n){"use strict";function r(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let i=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(i,r),i}n.d(t,{E:function(){return r}})},90544:function(e,t,n){"use strict";n.d(t,{AN:function(){return a},l4:function(){return l},sY:function(){return s},yV:function(){return d}});var r,i,o=n(2784),u=n(3703),a=((i=a||{})[i.None=0]="None",i[i.RenderStrategy=1]="RenderStrategy",i[i.Static=2]="Static",i),l=((r=l||{})[r.Unmount=0]="Unmount",r[r.Hidden=1]="Hidden",r);function s({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:o=!0,name:a}){let l=f(t,e);if(o)return c(l,n,r,a);let s=null!=i?i:0;if(2&s){let{static:e=!1,...t}=l;if(e)return c(t,n,r,a)}if(1&s){let{unmount:e=!0,...t}=l;return(0,u.E)(e?0:1,{0:()=>null,1:()=>c({...t,hidden:!0,style:{display:"none"}},n,r,a)})}return c(l,n,r,a)}function c(e,t={},n,r){let{as:i=n,children:u,refName:a="ref",...l}=v(e,["unmount","static"]),s=void 0!==e.ref?{[a]:e.ref}:{},c="function"==typeof u?u(t):u;l.className&&"function"==typeof l.className&&(l.className=l.className(t));let d={};if(t){let e=!1,n=[];for(let[r,i]of Object.entries(t))"boolean"==typeof i&&(e=!0),!0===i&&n.push(r);e&&(d["data-headlessui-state"]=n.join(" "))}if(i===o.Fragment&&Object.keys(p(l)).length>0){if(!(0,o.isValidElement)(c)||Array.isArray(c)&&c.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(l).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"));return(0,o.cloneElement)(c,Object.assign({},f(c.props,p(v(l,["ref"]))),d,s,function(...e){return{ref:e.every((e=>null==e))?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}}(c.ref,s.ref)))}return(0,o.createElement)(i,Object.assign({},v(l,["ref"]),i!==o.Fragment&&s,i!==o.Fragment&&d),c)}function f(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map((e=>[e,void 0]))));for(let r in n)Object.assign(t,{[r](e,...t){let i=n[r];for(let n of i){if((e instanceof Event||(null==e?void 0:e.nativeEvent)instanceof Event)&&e.defaultPrevented)return;n(e,...t)}}});return t}function d(e){var t;return Object.assign((0,o.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function p(e){let t=Object.assign({},e);for(let n in t)void 0===t[n]&&delete t[n];return t}function v(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}},69817:function(e,t,n){"use strict";n.d(t,{s:function(){return r}});const r="undefined"==typeof window||"undefined"==typeof document},6632:function(e,t,n){"use strict";var r=n(2784);const i=r.forwardRef((function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"}))}));t.Z=i},59081:function(e,t,n){"use strict";var r=n(2784);const i=r.forwardRef((function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"}))}));t.Z=i},81123:function(e,t,n){"use strict";var r=n(2784);const i=r.forwardRef((function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{fillRule:"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z",clipRule:"evenodd"}))}));t.Z=i},96670:function(e,t,n){"use strict";function r(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}n.d(t,{Z:function(){return r}})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[57],{36386:function(e){function t(e,t,n){var r,o,i,a,s;function u(){var c=Date.now()-a;c<t&&c>=0?r=setTimeout(u,t-c):(r=null,n||(s=e.apply(i,o),i=o=null))}null==t&&(t=100);var c=function(){i=this,o=arguments,a=Date.now();var c=n&&!r;return r||(r=setTimeout(u,t)),c&&(s=e.apply(i,o),i=o=null),s};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(s=e.apply(i,o),i=o=null,clearTimeout(r),r=null)},c}t.debounce=t,e.exports=t},18886:function(e){e.exports=function(e){return[...e].reduce(((e,[t,n])=>(e[t]=n,e)),{})}},43168:function(e){e.exports=function(e){!function(e){if(!e)throw new Error("Eventify cannot use falsy object as events subject");for(var t=["on","fire","off"],n=0;n<t.length;++n)if(e.hasOwnProperty(t[n]))throw new Error("Subject cannot be eventified, since it already has property '"+t[n]+"'")}(e);var t=function(e){var t=Object.create(null);return{on:function(n,r,o){if("function"!==typeof r)throw new Error("callback is expected to be a function");var i=t[n];return i||(i=t[n]=[]),i.push({callback:r,ctx:o}),e},off:function(n,r){if("undefined"===typeof n)return t=Object.create(null),e;if(t[n])if("function"!==typeof r)delete t[n];else for(var o=t[n],i=0;i<o.length;++i)o[i].callback===r&&o.splice(i,1);return e},fire:function(n){var r,o=t[n];if(!o)return e;arguments.length>1&&(r=Array.prototype.splice.call(arguments,1));for(var i=0;i<o.length;++i){var a=o[i];a.callback.apply(a.ctx,r)}return e}}}(e);return e.on=t.on,e.off=t.off,e.fire=t.fire,e}},58736:function(e,t,n){e.exports=function(e,t){if(!e)throw new Error("Graph structure cannot be undefined");var i=(t&&t.createSimulator||n(52570))(t);if(Array.isArray(t))throw new Error("Physics settings is expected to be an object");var a=e.version>19?function(t){var n=e.getLinks(t);return n?1+n.size/3:1}:function(t){var n=e.getLinks(t);return n?1+n.length/3:1};t&&"function"===typeof t.nodeMass&&(a=t.nodeMass);var s=new Map,u={},c=0,l=i.settings.springTransform||o;c=0,e.forEachNode((function(e){v(e.id),c+=1})),e.forEachLink(y),e.on("changed",g);var h=!1,d={step:function(){if(0===c)return f(!0),!0;var e=i.step();d.lastMove=e,d.fire("step");var t=e/c<=.01;return f(t),t},getNodePosition:function(e){return _(e).pos},setNodePosition:function(e){var t=_(e);t.setPosition.apply(t,Array.prototype.slice.call(arguments,1))},getLinkPosition:function(e){var t=u[e];if(t)return{from:t.from.pos,to:t.to.pos}},getGraphRect:function(){return i.getBBox()},forEachBody:p,pinNode:function(e,t){_(e.id).isPinned=!!t},isNodePinned:function(e){return _(e.id).isPinned},dispose:function(){e.off("changed",g),d.fire("disposed")},getBody:function(e){return s.get(e)},getSpring:function(t,n){var r;if(void 0===n)r="object"!==typeof t?t:t.id;else{var o=e.hasLink(t,n);if(!o)return;r=o.id}return u[r]},getForceVectorLength:function(){var e=0,t=0;return p((function(n){e+=Math.abs(n.force.x),t+=Math.abs(n.force.y)})),Math.sqrt(e*e+t*t)},simulator:i,graph:e,lastMove:0};return r(d),d;function f(e){var t;h!==e&&(h=e,t=e,d.fire("stable",t))}function p(e){s.forEach(e)}function g(t){for(var n=0;n<t.length;++n){var r=t[n];"add"===r.changeType?(r.node&&v(r.node.id),r.link&&y(r.link)):"remove"===r.changeType&&(r.node&&m(r.node),r.link&&b(r.link))}c=e.getNodesCount()}function v(t){var n=s.get(t);if(!n){var r=e.getNode(t);if(!r)throw new Error("initBody() was called with unknown node id");var o=r.position;if(!o){var a=function(e){var t=[];if(!e.links)return t;for(var n=Math.min(e.links.length,2),r=0;r<n;++r){var o=e.links[r],i=o.fromId!==e.id?s.get(o.fromId):s.get(o.toId);i&&i.pos&&t.push(i)}return t}(r);o=i.getBestNewBodyPosition(a)}(n=i.addBodyAt(o)).id=t,s.set(t,n),w(t),function(e){return e&&(e.isPinned||e.data&&e.data.isPinned)}(r)&&(n.isPinned=!0)}}function m(e){var t=e.id,n=s.get(t);n&&(s.delete(t),i.removeBody(n))}function y(e){w(e.fromId),w(e.toId);var t=s.get(e.fromId),n=s.get(e.toId),r=i.addSpring(t,n,e.length);l(e,r),u[e.id]=r}function b(t){var n=u[t.id];if(n){var r=e.getNode(t.fromId),o=e.getNode(t.toId);r&&w(r.id),o&&w(o.id),delete u[t.id],i.removeSpring(n)}}function w(e){var t=s.get(e);if(t.mass=a(e),Number.isNaN(t.mass))throw new Error("Node mass should be a number")}function _(e){var t=s.get(e);return t||(v(e),t=s.get(e)),t}},e.exports.simulator=n(52570);var r=n(43168);function o(){}},10669:function(e,t,n){const r=n(53445);e.exports=function(e){return function(t,n){let o=n&&n.indent||0,i=n&&void 0!==n.join?n.join:"\n",a=Array(o+1).join(" "),s=[];for(let u=0;u<e;++u){let e=r(u),n=0===u?"":a;s.push(n+t.replace(/{var}/g,e))}return s.join(i)}}},19361:function(e,t,n){e.exports=function(e){let t=o(e);return new Function("bodies","settings","random",t)},e.exports.generateFunctionBody=o;const r=n(10669);function o(e){let t=r(e);return`\n var boundingBox = {\n ${t("min_{var}: 0, max_{var}: 0,",{indent:4})}\n };\n\n return {\n box: boundingBox,\n\n update: updateBoundingBox,\n\n reset: resetBoundingBox,\n\n getBestNewPosition: function (neighbors) {\n var ${t("base_{var} = 0",{join:", "})};\n\n if (neighbors.length) {\n for (var i = 0; i < neighbors.length; ++i) {\n let neighborPos = neighbors[i].pos;\n ${t("base_{var} += neighborPos.{var};",{indent:10})}\n }\n\n ${t("base_{var} /= neighbors.length;",{indent:8})}\n } else {\n ${t("base_{var} = (boundingBox.min_{var} + boundingBox.max_{var}) / 2;",{indent:8})}\n }\n\n var springLength = settings.springLength;\n return {\n ${t("{var}: base_{var} + (random.nextDouble() - 0.5) * springLength,",{indent:8})}\n };\n }\n };\n\n function updateBoundingBox() {\n var i = bodies.length;\n if (i === 0) return; // No bodies - no borders.\n\n ${t("var max_{var} = -Infinity;",{indent:4})}\n ${t("var min_{var} = Infinity;",{indent:4})}\n\n while(i--) {\n // this is O(n), it could be done faster with quadtree, if we check the root node bounds\n var bodyPos = bodies[i].pos;\n ${t("if (bodyPos.{var} < min_{var}) min_{var} = bodyPos.{var};",{indent:6})}\n ${t("if (bodyPos.{var} > max_{var}) max_{var} = bodyPos.{var};",{indent:6})}\n }\n\n ${t("boundingBox.min_{var} = min_{var};",{indent:4})}\n ${t("boundingBox.max_{var} = max_{var};",{indent:4})}\n }\n\n function resetBoundingBox() {\n ${t("boundingBox.min_{var} = boundingBox.max_{var} = 0;",{indent:4})}\n }\n`}},48704:function(e,t,n){const r=n(10669);function o(e,t){return`\n${a(e,t)}\n${i(e)}\nreturn {Body: Body, Vector: Vector};\n`}function i(e){let t=r(e),n=t("{var}",{join:", "});return`\nfunction Body(${n}) {\n this.isPinned = false;\n this.pos = new Vector(${n});\n this.force = new Vector();\n this.velocity = new Vector();\n this.mass = 1;\n\n this.springCount = 0;\n this.springLength = 0;\n}\n\nBody.prototype.reset = function() {\n this.force.reset();\n this.springCount = 0;\n this.springLength = 0;\n}\n\nBody.prototype.setPosition = function (${n}) {\n ${t("this.pos.{var} = {var} || 0;",{indent:2})}\n};`}function a(e,t){let n=r(e),o="";return t&&(o=`${n("\n var v{var};\nObject.defineProperty(this, '{var}', {\n set: function(v) { \n if (!Number.isFinite(v)) throw new Error('Cannot set non-numbers to {var}');\n v{var} = v; \n },\n get: function() { return v{var}; }\n});")}`),`function Vector(${n("{var}",{join:", "})}) {\n ${o}\n if (typeof arguments[0] === 'object') {\n // could be another vector\n let v = arguments[0];\n ${n('if (!Number.isFinite(v.{var})) throw new Error("Expected value is not a finite number at Vector constructor ({var})");',{indent:4})}\n ${n("this.{var} = v.{var};",{indent:4})}\n } else {\n ${n('this.{var} = typeof {var} === "number" ? {var} : 0;',{indent:4})}\n }\n }\n \n Vector.prototype.reset = function () {\n ${n("this.{var} = ",{join:""})}0;\n };`}e.exports=function(e,t){let n=o(e,t),{Body:r}=new Function(n)();return r},e.exports.generateCreateBodyFunctionBody=o,e.exports.getVectorCode=a,e.exports.getBodyCode=i},56431:function(e,t,n){const r=n(10669);function o(e){return`\n if (!Number.isFinite(options.dragCoefficient)) throw new Error('dragCoefficient is not a finite number');\n\n return {\n update: function(body) {\n ${r(e)("body.force.{var} -= options.dragCoefficient * body.velocity.{var};",{indent:6})}\n }\n };\n`}e.exports=function(e){let t=o(e);return new Function("options",t)},e.exports.generateCreateDragForceFunctionBody=o},17018:function(e,t,n){const r=n(10669);function o(e){let t=r(e);return`\n if (!Number.isFinite(options.springCoefficient)) throw new Error('Spring coefficient is not a number');\n if (!Number.isFinite(options.springLength)) throw new Error('Spring length is not a number');\n\n return {\n /**\n * Updates forces acting on a spring\n */\n update: function (spring) {\n var body1 = spring.from;\n var body2 = spring.to;\n var length = spring.length < 0 ? options.springLength : spring.length;\n ${t("var d{var} = body2.pos.{var} - body1.pos.{var};",{indent:6})}\n var r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n\n if (r === 0) {\n ${t("d{var} = (random.nextDouble() - 0.5) / 50;",{indent:8})}\n r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n }\n\n var d = r - length;\n var coefficient = ((spring.coefficient > 0) ? spring.coefficient : options.springCoefficient) * d / r;\n\n ${t("body1.force.{var} += coefficient * d{var}",{indent:6})};\n body1.springCount += 1;\n body1.springLength += r;\n\n ${t("body2.force.{var} -= coefficient * d{var}",{indent:6})};\n body2.springCount += 1;\n body2.springLength += r;\n }\n };\n`}e.exports=function(e){let t=o(e);return new Function("options","random",t)},e.exports.generateCreateSpringForceFunctionBody=o},73489:function(e,t,n){const r=n(10669);function o(e){let t=r(e);return`\n var length = bodies.length;\n if (length === 0) return 0;\n\n ${t("var d{var} = 0, t{var} = 0;",{indent:2})}\n\n for (var i = 0; i < length; ++i) {\n var body = bodies[i];\n if (body.isPinned) continue;\n\n if (adaptiveTimeStepWeight && body.springCount) {\n timeStep = (adaptiveTimeStepWeight * body.springLength/body.springCount);\n }\n\n var coeff = timeStep / body.mass;\n\n ${t("body.velocity.{var} += coeff * body.force.{var};",{indent:4})}\n ${t("var v{var} = body.velocity.{var};",{indent:4})}\n var v = Math.sqrt(${t("v{var} * v{var}",{join:" + "})});\n\n if (v > 1) {\n // We normalize it so that we move within timeStep range. \n // for the case when v <= 1 - we let velocity to fade out.\n ${t("body.velocity.{var} = v{var} / v;",{indent:6})}\n }\n\n ${t("d{var} = timeStep * body.velocity.{var};",{indent:4})}\n\n ${t("body.pos.{var} += d{var};",{indent:4})}\n\n ${t("t{var} += Math.abs(d{var});",{indent:4})}\n }\n\n return (${t("t{var} * t{var}",{join:" + "})})/length;\n`}e.exports=function(e){let t=o(e);return new Function("bodies","timeStep","adaptiveTimeStepWeight",t)},e.exports.generateIntegratorFunctionBody=o},5614:function(e,t,n){const r=n(10669),o=n(53445);function i(e){let t=r(e),n=Math.pow(2,e);return`\n${l()}\n${c(e)}\n${a(e)}\n${u(e)}\n${s(e)}\n\nfunction createQuadTree(options, random) {\n options = options || {};\n options.gravity = typeof options.gravity === 'number' ? options.gravity : -1;\n options.theta = typeof options.theta === 'number' ? options.theta : 0.8;\n\n var gravity = options.gravity;\n var updateQueue = [];\n var insertStack = new InsertStack();\n var theta = options.theta;\n\n var nodesCache = [];\n var currentInCache = 0;\n var root = newNode();\n\n return {\n insertBodies: insertBodies,\n\n /**\n * Gets root node if it is present\n */\n getRoot: function() {\n return root;\n },\n\n updateBodyForce: update,\n\n options: function(newOptions) {\n if (newOptions) {\n if (typeof newOptions.gravity === 'number') {\n gravity = newOptions.gravity;\n }\n if (typeof newOptions.theta === 'number') {\n theta = newOptions.theta;\n }\n\n return this;\n }\n\n return {\n gravity: gravity,\n theta: theta\n };\n }\n };\n\n function newNode() {\n // To avoid pressure on GC we reuse nodes.\n var node = nodesCache[currentInCache];\n if (node) {\n${function(e){let t=[];for(let r=0;r<n;++r)t.push(`${e}quad${r} = null;`);return t.join("\n")}(" node.")}\n node.body = null;\n node.mass = ${t("node.mass_{var} = ",{join:""})}0;\n ${t("node.min_{var} = node.max_{var} = ",{join:""})}0;\n } else {\n node = new QuadNode();\n nodesCache[currentInCache] = node;\n }\n\n ++currentInCache;\n return node;\n }\n\n function update(sourceBody) {\n var queue = updateQueue;\n var v;\n ${t("var d{var};",{indent:4})}\n var r; \n ${t("var f{var} = 0;",{indent:4})}\n var queueLength = 1;\n var shiftIdx = 0;\n var pushIdx = 1;\n\n queue[0] = root;\n\n while (queueLength) {\n var node = queue[shiftIdx];\n var body = node.body;\n\n queueLength -= 1;\n shiftIdx += 1;\n var differentBody = (body !== sourceBody);\n if (body && differentBody) {\n // If the current node is a leaf node (and it is not source body),\n // calculate the force exerted by the current node on body, and add this\n // amount to body's net force.\n ${t("d{var} = body.pos.{var} - sourceBody.pos.{var};",{indent:8})}\n r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n\n if (r === 0) {\n // Poor man's protection against zero distance.\n ${t("d{var} = (random.nextDouble() - 0.5) / 50;",{indent:10})}\n r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n }\n\n // This is standard gravitation force calculation but we divide\n // by r^3 to save two operations when normalizing force vector.\n v = gravity * body.mass * sourceBody.mass / (r * r * r);\n ${t("f{var} += v * d{var};",{indent:8})}\n } else if (differentBody) {\n // Otherwise, calculate the ratio s / r, where s is the width of the region\n // represented by the internal node, and r is the distance between the body\n // and the node's center-of-mass\n ${t("d{var} = node.mass_{var} / node.mass - sourceBody.pos.{var};",{indent:8})}\n r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n\n if (r === 0) {\n // Sorry about code duplication. I don't want to create many functions\n // right away. Just want to see performance first.\n ${t("d{var} = (random.nextDouble() - 0.5) / 50;",{indent:10})}\n r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n }\n // If s / r < \u03b8, treat this internal node as a single body, and calculate the\n // force it exerts on sourceBody, and add this amount to sourceBody's net force.\n if ((node.max_${o(0)} - node.min_${o(0)}) / r < theta) {\n // in the if statement above we consider node's width only\n // because the region was made into square during tree creation.\n // Thus there is no difference between using width or height.\n v = gravity * node.mass * sourceBody.mass / (r * r * r);\n ${t("f{var} += v * d{var};",{indent:10})}\n } else {\n // Otherwise, run the procedure recursively on each of the current node's children.\n\n // I intentionally unfolded this loop, to save several CPU cycles.\n${function(){let e=Array(11).join(" "),t=[];for(let r=0;r<n;++r)t.push(e+`if (node.quad${r}) {`),t.push(e+` queue[pushIdx] = node.quad${r};`),t.push(e+" queueLength += 1;"),t.push(e+" pushIdx += 1;"),t.push(e+"}");return t.join("\n")}()}\n }\n }\n }\n\n ${t("sourceBody.force.{var} += f{var};",{indent:4})}\n }\n\n function insertBodies(bodies) {\n ${t("var {var}min = Number.MAX_VALUE;",{indent:4})}\n ${t("var {var}max = Number.MIN_VALUE;",{indent:4})}\n var i = bodies.length;\n\n // To reduce quad tree depth we are looking for exact bounding box of all particles.\n while (i--) {\n var pos = bodies[i].pos;\n ${t("if (pos.{var} < {var}min) {var}min = pos.{var};",{indent:6})}\n ${t("if (pos.{var} > {var}max) {var}max = pos.{var};",{indent:6})}\n }\n\n // Makes the bounds square.\n var maxSideLength = -Infinity;\n ${t("if ({var}max - {var}min > maxSideLength) maxSideLength = {var}max - {var}min ;",{indent:4})}\n\n currentInCache = 0;\n root = newNode();\n ${t("root.min_{var} = {var}min;",{indent:4})}\n ${t("root.max_{var} = {var}min + maxSideLength;",{indent:4})}\n\n i = bodies.length - 1;\n if (i >= 0) {\n root.body = bodies[i];\n }\n while (i--) {\n insert(bodies[i], root);\n }\n }\n\n function insert(newBody) {\n insertStack.reset();\n insertStack.push(root, newBody);\n\n while (!insertStack.isEmpty()) {\n var stackItem = insertStack.pop();\n var node = stackItem.node;\n var body = stackItem.body;\n\n if (!node.body) {\n // This is internal node. Update the total mass of the node and center-of-mass.\n ${t("var {var} = body.pos.{var};",{indent:8})}\n node.mass += body.mass;\n ${t("node.mass_{var} += body.mass * {var};",{indent:8})}\n\n // Recursively insert the body in the appropriate quadrant.\n // But first find the appropriate quadrant.\n var quadIdx = 0; // Assume we are in the 0's quad.\n ${t("var min_{var} = node.min_{var};",{indent:8})}\n ${t("var max_{var} = (min_{var} + node.max_{var}) / 2;",{indent:8})}\n\n${function(t){let n=[],r=Array(t+1).join(" ");for(let i=0;i<e;++i)n.push(r+`if (${o(i)} > max_${o(i)}) {`),n.push(r+` quadIdx = quadIdx + ${Math.pow(2,i)};`),n.push(r+` min_${o(i)} = max_${o(i)};`),n.push(r+` max_${o(i)} = node.max_${o(i)};`),n.push(r+"}");return n.join("\n")}(8)}\n\n var child = getChild(node, quadIdx);\n\n if (!child) {\n // The node is internal but this quadrant is not taken. Add\n // subnode to it.\n child = newNode();\n ${t("child.min_{var} = min_{var};",{indent:10})}\n ${t("child.max_{var} = max_{var};",{indent:10})}\n child.body = body;\n\n setChild(node, quadIdx, child);\n } else {\n // continue searching in this quadrant.\n insertStack.push(child, body);\n }\n } else {\n // We are trying to add to the leaf node.\n // We have to convert current leaf into internal node\n // and continue adding two nodes.\n var oldBody = node.body;\n node.body = null; // internal nodes do not cary bodies\n\n if (isSamePosition(oldBody.pos, body.pos)) {\n // Prevent infinite subdivision by bumping one node\n // anywhere in this quadrant\n var retriesCount = 3;\n do {\n var offset = random.nextDouble();\n ${t("var d{var} = (node.max_{var} - node.min_{var}) * offset;",{indent:12})}\n\n ${t("oldBody.pos.{var} = node.min_{var} + d{var};",{indent:12})}\n retriesCount -= 1;\n // Make sure we don't bump it out of the box. If we do, next iteration should fix it\n } while (retriesCount > 0 && isSamePosition(oldBody.pos, body.pos));\n\n if (retriesCount === 0 && isSamePosition(oldBody.pos, body.pos)) {\n // This is very bad, we ran out of precision.\n // if we do not return from the method we'll get into\n // infinite loop here. So we sacrifice correctness of layout, and keep the app running\n // Next layout iteration should get larger bounding box in the first step and fix this\n return;\n }\n }\n // Next iteration should subdivide node further.\n insertStack.push(node, oldBody);\n insertStack.push(node, body);\n }\n }\n }\n}\nreturn createQuadTree;\n\n`}function a(e){let t=r(e);return`\n function isSamePosition(point1, point2) {\n ${t("var d{var} = Math.abs(point1.{var} - point2.{var});",{indent:2})}\n \n return ${t("d{var} < 1e-8",{join:" && "})};\n } \n`}function s(e){var t=Math.pow(2,e);return`\nfunction setChild(node, idx, child) {\n ${function(){let e=[];for(let n=0;n<t;++n){let t=0===n?" ":" else ";e.push(`${t}if (idx === ${n}) node.quad${n} = child;`)}return e.join("\n")}()}\n}`}function u(e){return`function getChild(node, idx) {\n${function(){let t=[],n=Math.pow(2,e);for(let e=0;e<n;++e)t.push(` if (idx === ${e}) return node.quad${e};`);return t.join("\n")}()}\n return null;\n}`}function c(e){let t=r(e),n=Math.pow(2,e);return`\nfunction QuadNode() {\n // body stored inside this node. In quad tree only leaf nodes (by construction)\n // contain bodies:\n this.body = null;\n\n // Child nodes are stored in quads. Each quad is presented by number:\n // 0 | 1\n // -----\n // 2 | 3\n${function(e){let t=[];for(let r=0;r<n;++r)t.push(`${e}quad${r} = null;`);return t.join("\n")}(" this.")}\n\n // Total mass of current node\n this.mass = 0;\n\n // Center of mass coordinates\n ${t("this.mass_{var} = 0;",{indent:2})}\n\n // bounding box coordinates\n ${t("this.min_{var} = 0;",{indent:2})}\n ${t("this.max_{var} = 0;",{indent:2})}\n}\n`}function l(){return"\n/**\n * Our implementation of QuadTree is non-recursive to avoid GC hit\n * This data structure represent stack of elements\n * which we are trying to insert into quad tree.\n */\nfunction InsertStack () {\n this.stack = [];\n this.popIdx = 0;\n}\n\nInsertStack.prototype = {\n isEmpty: function() {\n return this.popIdx === 0;\n },\n push: function (node, body) {\n var item = this.stack[this.popIdx];\n if (!item) {\n // we are trying to avoid memory pressure: create new element\n // only when absolutely necessary\n this.stack[this.popIdx] = new InsertStackElement(node, body);\n } else {\n item.node = node;\n item.body = body;\n }\n ++this.popIdx;\n },\n pop: function () {\n if (this.popIdx > 0) {\n return this.stack[--this.popIdx];\n }\n },\n reset: function () {\n this.popIdx = 0;\n }\n};\n\nfunction InsertStackElement(node, body) {\n this.node = node; // QuadTree node\n this.body = body; // physical body which needs to be inserted to node\n}\n"}e.exports=function(e){let t=i(e);return new Function(t)()},e.exports.generateQuadTreeFunctionBody=i,e.exports.getInsertStackCode=l,e.exports.getQuadNodeCode=c,e.exports.isSamePosition=a,e.exports.getChildBodyCode=u,e.exports.setChildBodyCode=s},53445:function(e){e.exports=function(e){return 0===e?"x":1===e?"y":2===e?"z":"c"+(e+1)}},52570:function(e,t,n){e.exports=function(e){var t=n(44295),h=n(9256),d=n(43168);if(e){if(void 0!==e.springCoeff)throw new Error("springCoeff was renamed to springCoefficient");if(void 0!==e.dragCoeff)throw new Error("dragCoeff was renamed to dragCoefficient")}e=h(e,{springLength:10,springCoefficient:.8,gravity:-12,theta:.8,dragCoefficient:.9,timeStep:.5,adaptiveTimeStepWeight:0,dimensions:2,debug:!1});var f=c[e.dimensions];if(!f){var p=e.dimensions;f={Body:r(p,e.debug),createQuadTree:o(p),createBounds:i(p),createDragForce:a(p),createSpringForce:s(p),integrate:u(p)},c[p]=f}var g=f.Body,v=f.createQuadTree,m=f.createBounds,y=f.createDragForce,b=f.createSpringForce,w=f.integrate,_=n(20102).random(42),x=[],k=[],O=v(e,_),j=m(x,e,_),E=b(e,_),P=y(e),S=[],M=new Map,A=0;L("nbody",(function(){if(0===x.length)return;O.insertBodies(x);var e=x.length;for(;e--;){var t=x[e];t.isPinned||(t.reset(),O.updateBodyForce(t),P.update(t))}})),L("spring",(function(){var e=k.length;for(;e--;)E.update(k[e])}));var C={bodies:x,quadTree:O,springs:k,settings:e,addForce:L,removeForce:function(e){var t=S.indexOf(M.get(e));if(t<0)return;S.splice(t,1),M.delete(e)},getForces:function(){return M},step:function(){for(var t=0;t<S.length;++t)S[t](A);var n=w(x,e.timeStep,e.adaptiveTimeStepWeight);return A+=1,n},addBody:function(e){if(!e)throw new Error("Body is required");return x.push(e),e},addBodyAt:function(e){if(!e)throw new Error("Body position is required");var t=(e=>new g(e))(e);return x.push(t),t},removeBody:function(e){if(e){var t=x.indexOf(e);if(!(t<0))return x.splice(t,1),0===x.length&&j.reset(),!0}},addSpring:function(e,n,r,o){if(!e||!n)throw new Error("Cannot add null spring to force simulator");"number"!==typeof r&&(r=-1);var i=new t(e,n,r,o>=0?o:-1);return k.push(i),i},getTotalMovement:function(){return 0},removeSpring:function(e){if(e){var t=k.indexOf(e);return t>-1?(k.splice(t,1),!0):void 0}},getBestNewBodyPosition:function(e){return j.getBestNewPosition(e)},getBBox:T,getBoundingBox:T,invalidateBBox:function(){console.warn("invalidateBBox() is deprecated, bounds always recomputed on `getBBox()` call")},gravity:function(t){return void 0!==t?(e.gravity=t,O.options({gravity:t}),this):e.gravity},theta:function(t){return void 0!==t?(e.theta=t,O.options({theta:t}),this):e.theta},random:_};return function(e,t){for(var n in e)l(e,t,n)}(e,C),d(C),C;function T(){return j.update(),j.box}function L(e,t){if(M.has(e))throw new Error("Force "+e+" is already added");M.set(e,t),S.push(t)}};var r=n(48704),o=n(5614),i=n(19361),a=n(56431),s=n(17018),u=n(73489),c={};function l(e,t,n){if(e.hasOwnProperty(n)&&"function"!==typeof t[n]){var r=Number.isFinite(e[n]);t[n]=r?function(r){if(void 0!==r){if(!Number.isFinite(r))throw new Error("Value of "+n+" should be a valid number.");return e[n]=r,t}return e[n]}:function(r){return void 0!==r?(e[n]=r,t):e[n]}}}},44295:function(e){e.exports=function(e,t,n,r){this.from=e,this.to=t,this.length=n,this.coefficient=r}},84368:function(e,t,n){e.exports=function(e){"uniqueLinkId"in(e=e||{})&&(console.warn("ngraph.graph: Starting from version 0.14 `uniqueLinkId` is deprecated.\nUse `multigraph` option instead\n","\n","Note: there is also change in default behavior: From now on each graph\nis considered to be not a multigraph by default (each edge is unique)."),e.multigraph=e.uniqueLinkId);void 0===e.multigraph&&(e.multigraph=!1);if("function"!==typeof Map)throw new Error("ngraph.graph requires `Map` to be defined. Please polyfill it before using ngraph");var t=new Map,n=new Map,u={},c=0,l=e.multigraph?function(e,t,n){var r=s(e,t),o=u.hasOwnProperty(r);if(o||j(e,t)){o||(u[r]=0);var i="@"+ ++u[r];r=s(e+i,t+i)}return new a(e,t,n,r)}:function(e,t,r){var o=s(e,t),i=n.get(o);if(i)return i.data=r,i;return new a(e,t,r,o)},h=[],d=E,f=E,p=E,g=E,v={version:20,addNode:b,addLink:function(e,t,r){p();var o=w(e)||b(e),a=w(t)||b(t),s=l(e,t,r),u=n.has(s.id);n.set(s.id,s),i(o,s),e!==t&&i(a,s);return d(s,u?"update":"add"),g(),s},removeLink:function(e,t){void 0!==t&&(e=j(e,t));return O(e)},removeNode:_,getNode:w,getNodeCount:x,getLinkCount:k,getEdgeCount:k,getLinksCount:k,getNodesCount:x,getLinks:function(e){var t=w(e);return t?t.links:null},forEachNode:M,forEachLinkedNode:function(e,n,r){var o=w(e);if(o&&o.links&&"function"===typeof n)return r?function(e,n,r){var o=e.values(),i=o.next();for(;!i.done;){var a=i.value;if(a.fromId===n&&r(t.get(a.toId),a))return!0;i=o.next()}}(o.links,e,n):function(e,n,r){var o=e.values(),i=o.next();for(;!i.done;){var a=i.value,s=a.fromId===n?a.toId:a.fromId;if(r(t.get(s),a))return!0;i=o.next()}}(o.links,e,n)},forEachLink:function(e){if("function"===typeof e)for(var t=n.values(),r=t.next();!r.done;){if(e(r.value))return!0;r=t.next()}},beginUpdate:p,endUpdate:g,clear:function(){p(),M((function(e){_(e.id)})),g()},hasLink:j,hasNode:w,getLink:j};return r(v),function(){var e=v.on;function t(){return v.beginUpdate=p=P,v.endUpdate=g=S,d=m,f=y,v.on=e,e.apply(v,arguments)}v.on=t}(),v;function m(e,t){h.push({link:e,changeType:t})}function y(e,t){h.push({node:e,changeType:t})}function b(e,n){if(void 0===e)throw new Error("Invalid node identifier");p();var r=w(e);return r?(r.data=n,f(r,"update")):(r=new o(e,n),f(r,"add")),t.set(e,r),g(),r}function w(e){return t.get(e)}function _(e){var n=w(e);if(!n)return!1;p();var r=n.links;return r&&(r.forEach(O),n.links=null),t.delete(e),f(n,"remove"),g(),!0}function x(){return t.size}function k(){return n.size}function O(e){if(!e)return!1;if(!n.get(e.id))return!1;p(),n.delete(e.id);var t=w(e.fromId),r=w(e.toId);return t&&t.links.delete(e),r&&r.links.delete(e),d(e,"remove"),g(),!0}function j(e,t){if(void 0!==e&&void 0!==t)return n.get(s(e,t))}function E(){}function P(){c+=1}function S(){0===(c-=1)&&h.length>0&&(v.fire("changed",h),h.length=0)}function M(e){if("function"!==typeof e)throw new Error("Function is expected to iterate over graph nodes. You passed "+e);for(var n=t.values(),r=n.next();!r.done;){if(e(r.value))return!0;r=n.next()}}};var r=n(43168);function o(e,t){this.id=e,this.links=null,this.data=t}function i(e,t){e.links?e.links.add(t):e.links=new Set([t])}function a(e,t,n,r){this.fromId=e,this.toId=t,this.data=n,this.id=r}function s(e,t){return e.toString()+"\ud83d\udc49 "+t.toString()}},9256:function(e){e.exports=function e(t,n){var r;t||(t={});if(n)for(r in n)if(n.hasOwnProperty(r)){var o=t.hasOwnProperty(r),i=typeof n[r];!o||typeof t[r]!==i?t[r]=n[r]:"object"===i&&(t[r]=e(t[r],n[r]))}return t}},20102:function(e){function t(e){return new n("number"===typeof e?e:+new Date)}function n(e){this.seed=e}function r(e){return Math.sqrt(2*Math.PI/e)*Math.pow(1/Math.E*(e+1/(12*e-1/(10*e))),e)}function o(){var e=this.seed;return e=4294967295&(3042594569^(e=(e=4294967295&((e=(e=4294967295&(3345072700^(e=e+2127912214+(e<<12)&4294967295)^e>>>19))+374761393+(e<<5)&4294967295)+3550635116^e<<9))+4251993797+(e<<3)&4294967295)^e>>>16),this.seed=e,(268435455&e)/268435456}e.exports=t,e.exports.random=t,e.exports.randomIterator=function(e,n){var r=n||t();if("function"!==typeof r.next)throw new Error("customRandom does not match expected API: next() function is missing");return{forEach:function(t){var n,o,i;for(n=e.length-1;n>0;--n)o=r.next(n+1),i=e[o],e[o]=e[n],e[n]=i,t(i);e.length&&t(e[0])},shuffle:function(){var t,n,o;for(t=e.length-1;t>0;--t)n=r.next(t+1),o=e[n],e[n]=e[t],e[t]=o;return e}}},n.prototype.next=function(e){return Math.floor(this.nextDouble()*e)},n.prototype.nextDouble=o,n.prototype.uniform=o,n.prototype.gaussian=function(){var e,t,n;do{t=2*this.nextDouble()-1,n=2*this.nextDouble()-1,e=t*t+n*n}while(e>=1||0===e);return t*Math.sqrt(-2*Math.log(e)/e)},n.prototype.levy=function(){var e=1.5,t=Math.pow(r(2.5)*Math.sin(Math.PI*e/2)/(r(1.25)*e*Math.pow(2,.25)),1/e);return this.gaussian()*t/Math.pow(Math.abs(this.gaussian()),1/e)}},85057:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Yr}});var r=n(2784);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(u){s=!0,o=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"===typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c=function(e,t){var n=new Set(t);return Object.assign.apply(Object,[{}].concat(a(Object.entries(e).filter((function(e){var t=i(e,1)[0];return!n.has(t)})).map((function(e){var t=i(e,2);return o({},t[0],t[1])})))))},l=n(18886),h=n.n(l);function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(u){s=!0,o=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||g(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||g(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){if(e){if("string"===typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){var n=(0,r.useRef)();(0,r.useEffect)((function(){clearTimeout(n.current);var t=e();if(t)return function(){return n.current=setTimeout(t)}}),t)}var y=n(96995);const b=new y.JOQ,w=new y.iMs,_=new y.FM8,x=new y.Pa4,k=new y.Pa4,O=new y.Pa4,j=new y.yGw;class E extends y.pBf{constructor(e,t,n){super(),n.style.touchAction="none";let r=null,o=null;const i=[],a=this;function s(){n.addEventListener("pointermove",c),n.addEventListener("pointerdown",l),n.addEventListener("pointerup",h),n.addEventListener("pointerleave",h)}function u(){n.removeEventListener("pointermove",c),n.removeEventListener("pointerdown",l),n.removeEventListener("pointerup",h),n.removeEventListener("pointerleave",h),n.style.cursor=""}function c(s){if(!1!==a.enabled){if(d(s),w.setFromCamera(_,t),r)return w.ray.intersectPlane(b,k)&&r.position.copy(k.sub(x).applyMatrix4(j)),void a.dispatchEvent({type:"drag",object:r});if("mouse"===s.pointerType||"pen"===s.pointerType)if(i.length=0,w.setFromCamera(_,t),w.intersectObjects(e,!0,i),i.length>0){const e=i[0].object;b.setFromNormalAndCoplanarPoint(t.getWorldDirection(b.normal),O.setFromMatrixPosition(e.matrixWorld)),o!==e&&null!==o&&(a.dispatchEvent({type:"hoveroff",object:o}),n.style.cursor="auto",o=null),o!==e&&(a.dispatchEvent({type:"hoveron",object:e}),n.style.cursor="pointer",o=e)}else null!==o&&(a.dispatchEvent({type:"hoveroff",object:o}),n.style.cursor="auto",o=null)}}function l(o){!1!==a.enabled&&(d(o),i.length=0,w.setFromCamera(_,t),w.intersectObjects(e,!0,i),i.length>0&&(r=!0===a.transformGroup?e[0]:i[0].object,b.setFromNormalAndCoplanarPoint(t.getWorldDirection(b.normal),O.setFromMatrixPosition(r.matrixWorld)),w.ray.intersectPlane(b,k)&&(j.copy(r.parent.matrixWorld).invert(),x.copy(k).sub(O.setFromMatrixPosition(r.matrixWorld))),n.style.cursor="move",a.dispatchEvent({type:"dragstart",object:r})))}function h(){!1!==a.enabled&&(r&&(a.dispatchEvent({type:"dragend",object:r}),r=null),n.style.cursor=o?"pointer":"auto")}function d(e){const t=n.getBoundingClientRect();_.x=(e.clientX-t.left)/t.width*2-1,_.y=-(e.clientY-t.top)/t.height*2+1}s(),this.enabled=!0,this.transformGroup=!1,this.activate=s,this.deactivate=u,this.dispose=function(){u()},this.getObjects=function(){return e},this.getRaycaster=function(){return w}}}var P={value:()=>{}};function S(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new M(r)}function M(e){this._=e}function A(e,t){return e.trim().split(/^|\s+/).map((function(e){var n="",r=e.indexOf(".");if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}function C(e,t){for(var n,r=0,o=e.length;r<o;++r)if((n=e[r]).name===t)return n.value}function T(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=P,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}M.prototype=S.prototype={constructor:M,on:function(e,t){var n,r=this._,o=A(e+"",r),i=-1,a=o.length;if(!(arguments.length<2)){if(null!=t&&"function"!==typeof t)throw new Error("invalid callback: "+t);for(;++i<a;)if(n=(e=o[i]).type)r[n]=T(r[n],e.name,t);else if(null==t)for(n in r)r[n]=T(r[n],e.name,null);return this}for(;++i<a;)if((n=(e=o[i]).type)&&(n=C(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new M(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,o=new Array(n),i=0;i<n;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=0,n=(r=this._[e]).length;i<n;++i)r[i].value.apply(t,o)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)}};var L,R,D=S,N=0,I=0,z=0,F=0,B=0,U=0,$="object"===typeof performance&&performance.now?performance:Date,V="object"===typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function q(){return B||(V(H),B=$.now()+U)}function H(){B=0}function G(){this._call=this._time=this._next=null}function Y(e,t,n){var r=new G;return r.restart(e,t,n),r}function X(){B=(F=$.now())+U,N=I=0;try{!function(){q(),++N;for(var e,t=L;t;)(e=B-t._time)>=0&&t._call.call(void 0,e),t=t._next;--N}()}finally{N=0,function(){var e,t,n=L,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:L=t);R=e,W(r)}(),B=0}}function K(){var e=$.now(),t=e-F;t>1e3&&(U-=t,F=e)}function W(e){N||(I&&(I=clearTimeout(I)),e-B>24?(e<1/0&&(I=setTimeout(X,e-$.now()-U)),z&&(z=clearInterval(z))):(z||(F=$.now(),z=setInterval(K,1e3)),N=1,V(X)))}G.prototype=Y.prototype={constructor:G,restart:function(e,t,n){if("function"!==typeof e)throw new TypeError("callback is not a function");n=(null==n?q():+n)+(null==t?0:+t),this._next||R===this||(R?R._next=this:L=this,R=this),this._call=e,this._time=n,W()},stop:function(){this._call&&(this._call=null,this._time=1/0,W())}};const Q=4294967296;function Z(e){return e.x}function J(e){return e.y}function ee(e){return e.z}var te=Math.PI*(3-Math.sqrt(5)),ne=20*Math.PI/(9+Math.sqrt(221));function re(e,t){t=t||2;var n,r=Math.min(3,Math.max(1,Math.round(t))),o=1,i=.001,a=1-Math.pow(i,1/300),s=0,u=.6,c=new Map,l=Y(f),h=D("tick","end"),d=function(){let e=1;return()=>(e=(1664525*e+1013904223)%Q)/Q}();function f(){p(),h.call("tick",n),o<i&&(l.stop(),h.call("end",n))}function p(t){var i,l,h=e.length;void 0===t&&(t=1);for(var d=0;d<t;++d)for(o+=(s-o)*a,c.forEach((function(e){e(o)})),i=0;i<h;++i)null==(l=e[i]).fx?l.x+=l.vx*=u:(l.x=l.fx,l.vx=0),r>1&&(null==l.fy?l.y+=l.vy*=u:(l.y=l.fy,l.vy=0)),r>2&&(null==l.fz?l.z+=l.vz*=u:(l.z=l.fz,l.vz=0));return n}function g(){for(var t,n=0,o=e.length;n<o;++n){if((t=e[n]).index=n,null!=t.fx&&(t.x=t.fx),null!=t.fy&&(t.y=t.fy),null!=t.fz&&(t.z=t.fz),isNaN(t.x)||r>1&&isNaN(t.y)||r>2&&isNaN(t.z)){var i=10*(r>2?Math.cbrt(.5+n):r>1?Math.sqrt(.5+n):n),a=n*te,s=n*ne;1===r?t.x=i:2===r?(t.x=i*Math.cos(a),t.y=i*Math.sin(a)):(t.x=i*Math.sin(a)*Math.cos(s),t.y=i*Math.cos(a),t.z=i*Math.sin(a)*Math.sin(s))}(isNaN(t.vx)||r>1&&isNaN(t.vy)||r>2&&isNaN(t.vz))&&(t.vx=0,r>1&&(t.vy=0),r>2&&(t.vz=0))}}function v(t){return t.initialize&&t.initialize(e,d,r),t}return null==e&&(e=[]),g(),n={tick:p,restart:function(){return l.restart(f),n},stop:function(){return l.stop(),n},numDimensions:function(e){return arguments.length?(r=Math.min(3,Math.max(1,Math.round(e))),c.forEach(v),n):r},nodes:function(t){return arguments.length?(e=t,g(),c.forEach(v),n):e},alpha:function(e){return arguments.length?(o=+e,n):o},alphaMin:function(e){return arguments.length?(i=+e,n):i},alphaDecay:function(e){return arguments.length?(a=+e,n):+a},alphaTarget:function(e){return arguments.length?(s=+e,n):s},velocityDecay:function(e){return arguments.length?(u=1-e,n):1-u},randomSource:function(e){return arguments.length?(d=e,c.forEach(v),n):d},force:function(e,t){return arguments.length>1?(null==t?c.delete(e):c.set(e,v(t)),n):c.get(e)},find:function(){var t,n,o,i,a,s,u=Array.prototype.slice.call(arguments),c=u.shift()||0,l=(r>1?u.shift():null)||0,h=(r>2?u.shift():null)||0,d=u.shift()||1/0,f=0,p=e.length;for(d*=d,f=0;f<p;++f)(i=(t=c-(a=e[f]).x)*t+(n=l-(a.y||0))*n+(o=h-(a.z||0))*o)<d&&(s=a,d=i);return s},on:function(e,t){return arguments.length>1?(h.on(e,t),n):h.on(e)}}}function oe(e){return function(){return e}}function ie(e){return 1e-6*(e()-.5)}function ae(e){return e.index}function se(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function ue(e){var t,n,r,o,i,a,s,u=ae,c=function(e){return 1/Math.min(i[e.source.index],i[e.target.index])},l=oe(30),h=1;function d(r){for(var i=0,u=e.length;i<h;++i)for(var c,l,d,f,p,g=0,v=0,m=0,y=0;g<u;++g)l=(c=e[g]).source,v=(d=c.target).x+d.vx-l.x-l.vx||ie(s),o>1&&(m=d.y+d.vy-l.y-l.vy||ie(s)),o>2&&(y=d.z+d.vz-l.z-l.vz||ie(s)),v*=f=((f=Math.sqrt(v*v+m*m+y*y))-n[g])/f*r*t[g],m*=f,y*=f,d.vx-=v*(p=a[g]),o>1&&(d.vy-=m*p),o>2&&(d.vz-=y*p),l.vx+=v*(p=1-p),o>1&&(l.vy+=m*p),o>2&&(l.vz+=y*p)}function f(){if(r){var o,s,c=r.length,l=e.length,h=new Map(r.map(((e,t)=>[u(e,t,r),e])));for(o=0,i=new Array(c);o<l;++o)(s=e[o]).index=o,"object"!==typeof s.source&&(s.source=se(h,s.source)),"object"!==typeof s.target&&(s.target=se(h,s.target)),i[s.source.index]=(i[s.source.index]||0)+1,i[s.target.index]=(i[s.target.index]||0)+1;for(o=0,a=new Array(l);o<l;++o)s=e[o],a[o]=i[s.source.index]/(i[s.source.index]+i[s.target.index]);t=new Array(l),p(),n=new Array(l),g()}}function p(){if(r)for(var n=0,o=e.length;n<o;++n)t[n]=+c(e[n],n,e)}function g(){if(r)for(var t=0,o=e.length;t<o;++t)n[t]=+l(e[t],t,e)}return null==e&&(e=[]),d.initialize=function(e,...t){r=e,s=t.find((e=>"function"===typeof e))||Math.random,o=t.find((e=>[1,2,3].includes(e)))||2,f()},d.links=function(t){return arguments.length?(e=t,f(),d):e},d.id=function(e){return arguments.length?(u=e,d):u},d.iterations=function(e){return arguments.length?(h=+e,d):h},d.strength=function(e){return arguments.length?(c="function"===typeof e?e:oe(+e),p(),d):c},d.distance=function(e){return arguments.length?(l="function"===typeof e?e:oe(+e),g(),d):l},d}function ce(e,t,n){if(isNaN(t))return e;var r,o,i,a,s,u,c=e._root,l={data:n},h=e._x0,d=e._x1;if(!c)return e._root=l,e;for(;c.length;)if((a=t>=(o=(h+d)/2))?h=o:d=o,r=c,!(c=c[s=+a]))return r[s]=l,e;if(t===(i=+e._x.call(null,c.data)))return l.next=c,r?r[s]=l:e._root=l,e;do{r=r?r[s]=new Array(2):e._root=new Array(2),(a=t>=(o=(h+d)/2))?h=o:d=o}while((s=+a)===(u=+(i>=o)));return r[u]=c,r[s]=l,e}function le(e,t,n){this.node=e,this.x0=t,this.x1=n}function he(e){return e[0]}function de(e,t){var n=new fe(null==t?he:t,NaN,NaN);return null==e?n:n.addAll(e)}function fe(e,t,n){this._x=e,this._x0=t,this._x1=n,this._root=void 0}function pe(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var ge=de.prototype=fe.prototype;function ve(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var o,i,a,s,u,c,l,h,d,f=e._root,p={data:r},g=e._x0,v=e._y0,m=e._x1,y=e._y1;if(!f)return e._root=p,e;for(;f.length;)if((c=t>=(i=(g+m)/2))?g=i:m=i,(l=n>=(a=(v+y)/2))?v=a:y=a,o=f,!(f=f[h=l<<1|c]))return o[h]=p,e;if(s=+e._x.call(null,f.data),u=+e._y.call(null,f.data),t===s&&n===u)return p.next=f,o?o[h]=p:e._root=p,e;do{o=o?o[h]=new Array(4):e._root=new Array(4),(c=t>=(i=(g+m)/2))?g=i:m=i,(l=n>=(a=(v+y)/2))?v=a:y=a}while((h=l<<1|c)===(d=(u>=a)<<1|s>=i));return o[d]=f,o[h]=p,e}function me(e,t,n,r,o){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=o}function ye(e){return e[0]}function be(e){return e[1]}function we(e,t,n){var r=new _e(null==t?ye:t,null==n?be:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function _e(e,t,n,r,o,i){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=o,this._y1=i,this._root=void 0}function xe(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}ge.copy=function(){var e,t,n=new fe(this._x,this._x0,this._x1),r=this._root;if(!r)return n;if(!r.length)return n._root=pe(r),n;for(e=[{source:r,target:n._root=new Array(2)}];r=e.pop();)for(var o=0;o<2;++o)(t=r.source[o])&&(t.length?e.push({source:t,target:r.target[o]=new Array(2)}):r.target[o]=pe(t));return n},ge.add=function(e){var t=+this._x.call(null,e);return ce(this.cover(t),t,e)},ge.addAll=function(e){var t,n,r=e.length,o=new Array(r),i=1/0,a=-1/0;for(t=0;t<r;++t)isNaN(n=+this._x.call(null,e[t]))||(o[t]=n,n<i&&(i=n),n>a&&(a=n));if(i>a)return this;for(this.cover(i).cover(a),t=0;t<r;++t)ce(this,o[t],e[t]);return this},ge.cover=function(e){if(isNaN(e=+e))return this;var t=this._x0,n=this._x1;if(isNaN(t))n=(t=Math.floor(e))+1;else{for(var r,o,i=n-t||1,a=this._root;t>e||e>=n;)switch(o=+(e<t),(r=new Array(2))[o]=a,a=r,i*=2,o){case 0:n=t+i;break;case 1:t=n-i}this._root&&this._root.length&&(this._root=a)}return this._x0=t,this._x1=n,this},ge.data=function(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e},ge.extent=function(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]},ge.find=function(e,t){var n,r,o,i,a,s=this._x0,u=this._x1,c=[],l=this._root;for(l&&c.push(new le(l,s,u)),null==t?t=1/0:(s=e-t,u=e+t);i=c.pop();)if(!(!(l=i.node)||(r=i.x0)>u||(o=i.x1)<s))if(l.length){var h=(r+o)/2;c.push(new le(l[1],h,o),new le(l[0],r,h)),(a=+(e>=h))&&(i=c[c.length-1],c[c.length-1]=c[c.length-1-a],c[c.length-1-a]=i)}else{var d=Math.abs(e-+this._x.call(null,l.data));d<t&&(t=d,s=e-d,u=e+d,n=l.data)}return n},ge.remove=function(e){if(isNaN(i=+this._x.call(null,e)))return this;var t,n,r,o,i,a,s,u,c,l=this._root,h=this._x0,d=this._x1;if(!l)return this;if(l.length)for(;;){if((s=i>=(a=(h+d)/2))?h=a:d=a,t=l,!(l=l[u=+s]))return this;if(!l.length)break;t[u+1&1]&&(n=t,c=u)}for(;l.data!==e;)if(r=l,!(l=l.next))return this;return(o=l.next)&&delete l.next,r?(o?r.next=o:delete r.next,this):t?(o?t[u]=o:delete t[u],(l=t[0]||t[1])&&l===(t[1]||t[0])&&!l.length&&(n?n[c]=l:this._root=l),this):(this._root=o,this)},ge.removeAll=function(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this},ge.root=function(){return this._root},ge.size=function(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e},ge.visit=function(e){var t,n,r,o,i=[],a=this._root;for(a&&i.push(new le(a,this._x0,this._x1));t=i.pop();)if(!e(a=t.node,r=t.x0,o=t.x1)&&a.length){var s=(r+o)/2;(n=a[1])&&i.push(new le(n,s,o)),(n=a[0])&&i.push(new le(n,r,s))}return this},ge.visitAfter=function(e){var t,n=[],r=[];for(this._root&&n.push(new le(this._root,this._x0,this._x1));t=n.pop();){var o=t.node;if(o.length){var i,a=t.x0,s=t.x1,u=(a+s)/2;(i=o[0])&&n.push(new le(i,a,u)),(i=o[1])&&n.push(new le(i,u,s))}r.push(t)}for(;t=r.pop();)e(t.node,t.x0,t.x1);return this},ge.x=function(e){return arguments.length?(this._x=e,this):this._x};var ke=we.prototype=_e.prototype;function Oe(e,t,n,r,o){if(isNaN(t)||isNaN(n)||isNaN(r))return e;var i,a,s,u,c,l,h,d,f,p,g,v,m=e._root,y={data:o},b=e._x0,w=e._y0,_=e._z0,x=e._x1,k=e._y1,O=e._z1;if(!m)return e._root=y,e;for(;m.length;)if((d=t>=(a=(b+x)/2))?b=a:x=a,(f=n>=(s=(w+k)/2))?w=s:k=s,(p=r>=(u=(_+O)/2))?_=u:O=u,i=m,!(m=m[g=p<<2|f<<1|d]))return i[g]=y,e;if(c=+e._x.call(null,m.data),l=+e._y.call(null,m.data),h=+e._z.call(null,m.data),t===c&&n===l&&r===h)return y.next=m,i?i[g]=y:e._root=y,e;do{i=i?i[g]=new Array(8):e._root=new Array(8),(d=t>=(a=(b+x)/2))?b=a:x=a,(f=n>=(s=(w+k)/2))?w=s:k=s,(p=r>=(u=(_+O)/2))?_=u:O=u}while((g=p<<2|f<<1|d)===(v=(h>=u)<<2|(l>=s)<<1|c>=a));return i[v]=m,i[g]=y,e}function je(e,t,n,r,o,i,a){this.node=e,this.x0=t,this.y0=n,this.z0=r,this.x1=o,this.y1=i,this.z1=a}function Ee(e){return e[0]}function Pe(e){return e[1]}function Se(e){return e[2]}function Me(e,t,n,r){var o=new Ae(null==t?Ee:t,null==n?Pe:n,null==r?Se:r,NaN,NaN,NaN,NaN,NaN,NaN);return null==e?o:o.addAll(e)}function Ae(e,t,n,r,o,i,a,s,u){this._x=e,this._y=t,this._z=n,this._x0=r,this._y0=o,this._z0=i,this._x1=a,this._y1=s,this._z1=u,this._root=void 0}function Ce(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}ke.copy=function(){var e,t,n=new _e(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=xe(r),n;for(e=[{source:r,target:n._root=new Array(4)}];r=e.pop();)for(var o=0;o<4;++o)(t=r.source[o])&&(t.length?e.push({source:t,target:r.target[o]=new Array(4)}):r.target[o]=xe(t));return n},ke.add=function(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return ve(this.cover(t,n),t,n,e)},ke.addAll=function(e){var t,n,r,o,i=e.length,a=new Array(i),s=new Array(i),u=1/0,c=1/0,l=-1/0,h=-1/0;for(n=0;n<i;++n)isNaN(r=+this._x.call(null,t=e[n]))||isNaN(o=+this._y.call(null,t))||(a[n]=r,s[n]=o,r<u&&(u=r),r>l&&(l=r),o<c&&(c=o),o>h&&(h=o));if(u>l||c>h)return this;for(this.cover(u,c).cover(l,h),n=0;n<i;++n)ve(this,a[n],s[n],e[n]);return this},ke.cover=function(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,o=this._x1,i=this._y1;if(isNaN(n))o=(n=Math.floor(e))+1,i=(r=Math.floor(t))+1;else{for(var a,s,u=o-n||1,c=this._root;n>e||e>=o||r>t||t>=i;)switch(s=(t<r)<<1|e<n,(a=new Array(4))[s]=c,c=a,u*=2,s){case 0:o=n+u,i=r+u;break;case 1:n=o-u,i=r+u;break;case 2:o=n+u,r=i-u;break;case 3:n=o-u,r=i-u}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=o,this._y1=i,this},ke.data=function(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e},ke.extent=function(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},ke.find=function(e,t,n){var r,o,i,a,s,u,c,l=this._x0,h=this._y0,d=this._x1,f=this._y1,p=[],g=this._root;for(g&&p.push(new me(g,l,h,d,f)),null==n?n=1/0:(l=e-n,h=t-n,d=e+n,f=t+n,n*=n);u=p.pop();)if(!(!(g=u.node)||(o=u.x0)>d||(i=u.y0)>f||(a=u.x1)<l||(s=u.y1)<h))if(g.length){var v=(o+a)/2,m=(i+s)/2;p.push(new me(g[3],v,m,a,s),new me(g[2],o,m,v,s),new me(g[1],v,i,a,m),new me(g[0],o,i,v,m)),(c=(t>=m)<<1|e>=v)&&(u=p[p.length-1],p[p.length-1]=p[p.length-1-c],p[p.length-1-c]=u)}else{var y=e-+this._x.call(null,g.data),b=t-+this._y.call(null,g.data),w=y*y+b*b;if(w<n){var _=Math.sqrt(n=w);l=e-_,h=t-_,d=e+_,f=t+_,r=g.data}}return r},ke.remove=function(e){if(isNaN(i=+this._x.call(null,e))||isNaN(a=+this._y.call(null,e)))return this;var t,n,r,o,i,a,s,u,c,l,h,d,f=this._root,p=this._x0,g=this._y0,v=this._x1,m=this._y1;if(!f)return this;if(f.length)for(;;){if((c=i>=(s=(p+v)/2))?p=s:v=s,(l=a>=(u=(g+m)/2))?g=u:m=u,t=f,!(f=f[h=l<<1|c]))return this;if(!f.length)break;(t[h+1&3]||t[h+2&3]||t[h+3&3])&&(n=t,d=h)}for(;f.data!==e;)if(r=f,!(f=f.next))return this;return(o=f.next)&&delete f.next,r?(o?r.next=o:delete r.next,this):t?(o?t[h]=o:delete t[h],(f=t[0]||t[1]||t[2]||t[3])&&f===(t[3]||t[2]||t[1]||t[0])&&!f.length&&(n?n[d]=f:this._root=f),this):(this._root=o,this)},ke.removeAll=function(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this},ke.root=function(){return this._root},ke.size=function(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e},ke.visit=function(e){var t,n,r,o,i,a,s=[],u=this._root;for(u&&s.push(new me(u,this._x0,this._y0,this._x1,this._y1));t=s.pop();)if(!e(u=t.node,r=t.x0,o=t.y0,i=t.x1,a=t.y1)&&u.length){var c=(r+i)/2,l=(o+a)/2;(n=u[3])&&s.push(new me(n,c,l,i,a)),(n=u[2])&&s.push(new me(n,r,l,c,a)),(n=u[1])&&s.push(new me(n,c,o,i,l)),(n=u[0])&&s.push(new me(n,r,o,c,l))}return this},ke.visitAfter=function(e){var t,n=[],r=[];for(this._root&&n.push(new me(this._root,this._x0,this._y0,this._x1,this._y1));t=n.pop();){var o=t.node;if(o.length){var i,a=t.x0,s=t.y0,u=t.x1,c=t.y1,l=(a+u)/2,h=(s+c)/2;(i=o[0])&&n.push(new me(i,a,s,l,h)),(i=o[1])&&n.push(new me(i,l,s,u,h)),(i=o[2])&&n.push(new me(i,a,h,l,c)),(i=o[3])&&n.push(new me(i,l,h,u,c))}r.push(t)}for(;t=r.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this},ke.x=function(e){return arguments.length?(this._x=e,this):this._x},ke.y=function(e){return arguments.length?(this._y=e,this):this._y};var Te=Me.prototype=Ae.prototype;function Le(){var e,t,n,r,o,i,a=oe(-30),s=1,u=1/0,c=.81;function l(r){var i,a=e.length,s=(1===t?de(e,Z):2===t?we(e,Z,J):3===t?Me(e,Z,J,ee):null).visitAfter(d);for(o=r,i=0;i<a;++i)n=e[i],s.visit(f)}function h(){if(e){var t,n,r=e.length;for(i=new Array(r),t=0;t<r;++t)n=e[t],i[n.index]=+a(n,t,e)}}function d(e){var n,r,o,a,s,u,c=0,l=0,h=e.length;if(h){for(o=a=s=u=0;u<h;++u)(n=e[u])&&(r=Math.abs(n.value))&&(c+=n.value,l+=r,o+=r*(n.x||0),a+=r*(n.y||0),s+=r*(n.z||0));c*=Math.sqrt(4/h),e.x=o/l,t>1&&(e.y=a/l),t>2&&(e.z=s/l)}else{(n=e).x=n.data.x,t>1&&(n.y=n.data.y),t>2&&(n.z=n.data.z);do{c+=i[n.data.index]}while(n=n.next)}e.value=c}function f(e,a,l,h,d){if(!e.value)return!0;var f=[l,h,d][t-1],p=e.x-n.x,g=t>1?e.y-n.y:0,v=t>2?e.z-n.z:0,m=f-a,y=p*p+g*g+v*v;if(m*m/c<y)return y<u&&(0===p&&(y+=(p=ie(r))*p),t>1&&0===g&&(y+=(g=ie(r))*g),t>2&&0===v&&(y+=(v=ie(r))*v),y<s&&(y=Math.sqrt(s*y)),n.vx+=p*e.value*o/y,t>1&&(n.vy+=g*e.value*o/y),t>2&&(n.vz+=v*e.value*o/y)),!0;if(!(e.length||y>=u)){(e.data!==n||e.next)&&(0===p&&(y+=(p=ie(r))*p),t>1&&0===g&&(y+=(g=ie(r))*g),t>2&&0===v&&(y+=(v=ie(r))*v),y<s&&(y=Math.sqrt(s*y)));do{e.data!==n&&(m=i[e.data.index]*o/y,n.vx+=p*m,t>1&&(n.vy+=g*m),t>2&&(n.vz+=v*m))}while(e=e.next)}}return l.initialize=function(n,...o){e=n,r=o.find((e=>"function"===typeof e))||Math.random,t=o.find((e=>[1,2,3].includes(e)))||2,h()},l.strength=function(e){return arguments.length?(a="function"===typeof e?e:oe(+e),h(),l):a},l.distanceMin=function(e){return arguments.length?(s=e*e,l):Math.sqrt(s)},l.distanceMax=function(e){return arguments.length?(u=e*e,l):Math.sqrt(u)},l.theta=function(e){return arguments.length?(c=e*e,l):Math.sqrt(c)},l}function Re(e,t,n){var r,o=1;function i(){var i,a,s=r.length,u=0,c=0,l=0;for(i=0;i<s;++i)u+=(a=r[i]).x||0,c+=a.y||0,l+=a.z||0;for(u=(u/s-e)*o,c=(c/s-t)*o,l=(l/s-n)*o,i=0;i<s;++i)a=r[i],u&&(a.x-=u),c&&(a.y-=c),l&&(a.z-=l)}return null==e&&(e=0),null==t&&(t=0),null==n&&(n=0),i.initialize=function(e){r=e},i.x=function(t){return arguments.length?(e=+t,i):e},i.y=function(e){return arguments.length?(t=+e,i):t},i.z=function(e){return arguments.length?(n=+e,i):n},i.strength=function(e){return arguments.length?(o=+e,i):o},i}Te.copy=function(){var e,t,n=new Ae(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),r=this._root;if(!r)return n;if(!r.length)return n._root=Ce(r),n;for(e=[{source:r,target:n._root=new Array(8)}];r=e.pop();)for(var o=0;o<8;++o)(t=r.source[o])&&(t.length?e.push({source:t,target:r.target[o]=new Array(8)}):r.target[o]=Ce(t));return n},Te.add=function(e){var t=+this._x.call(null,e),n=+this._y.call(null,e),r=+this._z.call(null,e);return Oe(this.cover(t,n,r),t,n,r,e)},Te.addAll=function(e){var t,n,r,o,i,a=e.length,s=new Array(a),u=new Array(a),c=new Array(a),l=1/0,h=1/0,d=1/0,f=-1/0,p=-1/0,g=-1/0;for(n=0;n<a;++n)isNaN(r=+this._x.call(null,t=e[n]))||isNaN(o=+this._y.call(null,t))||isNaN(i=+this._z.call(null,t))||(s[n]=r,u[n]=o,c[n]=i,r<l&&(l=r),r>f&&(f=r),o<h&&(h=o),o>p&&(p=o),i<d&&(d=i),i>g&&(g=i));if(l>f||h>p||d>g)return this;for(this.cover(l,h,d).cover(f,p,g),n=0;n<a;++n)Oe(this,s[n],u[n],c[n],e[n]);return this},Te.cover=function(e,t,n){if(isNaN(e=+e)||isNaN(t=+t)||isNaN(n=+n))return this;var r=this._x0,o=this._y0,i=this._z0,a=this._x1,s=this._y1,u=this._z1;if(isNaN(r))a=(r=Math.floor(e))+1,s=(o=Math.floor(t))+1,u=(i=Math.floor(n))+1;else{for(var c,l,h=a-r||1,d=this._root;r>e||e>=a||o>t||t>=s||i>n||n>=u;)switch(l=(n<i)<<2|(t<o)<<1|e<r,(c=new Array(8))[l]=d,d=c,h*=2,l){case 0:a=r+h,s=o+h,u=i+h;break;case 1:r=a-h,s=o+h,u=i+h;break;case 2:a=r+h,o=s-h,u=i+h;break;case 3:r=a-h,o=s-h,u=i+h;break;case 4:a=r+h,s=o+h,i=u-h;break;case 5:r=a-h,s=o+h,i=u-h;break;case 6:a=r+h,o=s-h,i=u-h;break;case 7:r=a-h,o=s-h,i=u-h}this._root&&this._root.length&&(this._root=d)}return this._x0=r,this._y0=o,this._z0=i,this._x1=a,this._y1=s,this._z1=u,this},Te.data=function(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e},Te.extent=function(e){return arguments.length?this.cover(+e[0][0],+e[0][1],+e[0][2]).cover(+e[1][0],+e[1][1],+e[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]},Te.find=function(e,t,n,r){var o,i,a,s,u,c,l,h,d,f=this._x0,p=this._y0,g=this._z0,v=this._x1,m=this._y1,y=this._z1,b=[],w=this._root;for(w&&b.push(new je(w,f,p,g,v,m,y)),null==r?r=1/0:(f=e-r,p=t-r,g=n-r,v=e+r,m=t+r,y=n+r,r*=r);h=b.pop();)if(!(!(w=h.node)||(i=h.x0)>v||(a=h.y0)>m||(s=h.z0)>y||(u=h.x1)<f||(c=h.y1)<p||(l=h.z1)<g))if(w.length){var _=(i+u)/2,x=(a+c)/2,k=(s+l)/2;b.push(new je(w[7],_,x,k,u,c,l),new je(w[6],i,x,k,_,c,l),new je(w[5],_,a,k,u,x,l),new je(w[4],i,a,k,_,x,l),new je(w[3],_,x,s,u,c,k),new je(w[2],i,x,s,_,c,k),new je(w[1],_,a,s,u,x,k),new je(w[0],i,a,s,_,x,k)),(d=(n>=k)<<2|(t>=x)<<1|e>=_)&&(h=b[b.length-1],b[b.length-1]=b[b.length-1-d],b[b.length-1-d]=h)}else{var O=e-+this._x.call(null,w.data),j=t-+this._y.call(null,w.data),E=n-+this._z.call(null,w.data),P=O*O+j*j+E*E;if(P<r){var S=Math.sqrt(r=P);f=e-S,p=t-S,g=n-S,v=e+S,m=t+S,y=n+S,o=w.data}}return o},Te.remove=function(e){if(isNaN(i=+this._x.call(null,e))||isNaN(a=+this._y.call(null,e))||isNaN(s=+this._z.call(null,e)))return this;var t,n,r,o,i,a,s,u,c,l,h,d,f,p,g,v=this._root,m=this._x0,y=this._y0,b=this._z0,w=this._x1,_=this._y1,x=this._z1;if(!v)return this;if(v.length)for(;;){if((h=i>=(u=(m+w)/2))?m=u:w=u,(d=a>=(c=(y+_)/2))?y=c:_=c,(f=s>=(l=(b+x)/2))?b=l:x=l,t=v,!(v=v[p=f<<2|d<<1|h]))return this;if(!v.length)break;(t[p+1&7]||t[p+2&7]||t[p+3&7]||t[p+4&7]||t[p+5&7]||t[p+6&7]||t[p+7&7])&&(n=t,g=p)}for(;v.data!==e;)if(r=v,!(v=v.next))return this;return(o=v.next)&&delete v.next,r?(o?r.next=o:delete r.next,this):t?(o?t[p]=o:delete t[p],(v=t[0]||t[1]||t[2]||t[3]||t[4]||t[5]||t[6]||t[7])&&v===(t[7]||t[6]||t[5]||t[4]||t[3]||t[2]||t[1]||t[0])&&!v.length&&(n?n[g]=v:this._root=v),this):(this._root=o,this)},Te.removeAll=function(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this},Te.root=function(){return this._root},Te.size=function(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e},Te.visit=function(e){var t,n,r,o,i,a,s,u,c=[],l=this._root;for(l&&c.push(new je(l,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));t=c.pop();)if(!e(l=t.node,r=t.x0,o=t.y0,i=t.z0,a=t.x1,s=t.y1,u=t.z1)&&l.length){var h=(r+a)/2,d=(o+s)/2,f=(i+u)/2;(n=l[7])&&c.push(new je(n,h,d,f,a,s,u)),(n=l[6])&&c.push(new je(n,r,d,f,h,s,u)),(n=l[5])&&c.push(new je(n,h,o,f,a,d,u)),(n=l[4])&&c.push(new je(n,r,o,f,h,d,u)),(n=l[3])&&c.push(new je(n,h,d,i,a,s,f)),(n=l[2])&&c.push(new je(n,r,d,i,h,s,f)),(n=l[1])&&c.push(new je(n,h,o,i,a,d,f)),(n=l[0])&&c.push(new je(n,r,o,i,h,d,f))}return this},Te.visitAfter=function(e){var t,n=[],r=[];for(this._root&&n.push(new je(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));t=n.pop();){var o=t.node;if(o.length){var i,a=t.x0,s=t.y0,u=t.z0,c=t.x1,l=t.y1,h=t.z1,d=(a+c)/2,f=(s+l)/2,p=(u+h)/2;(i=o[0])&&n.push(new je(i,a,s,u,d,f,p)),(i=o[1])&&n.push(new je(i,d,s,u,c,f,p)),(i=o[2])&&n.push(new je(i,a,f,u,d,l,p)),(i=o[3])&&n.push(new je(i,d,f,u,c,l,p)),(i=o[4])&&n.push(new je(i,a,s,p,d,f,h)),(i=o[5])&&n.push(new je(i,d,s,p,c,f,h)),(i=o[6])&&n.push(new je(i,a,f,p,d,l,h)),(i=o[7])&&n.push(new je(i,d,f,p,c,l,h))}r.push(t)}for(;t=r.pop();)e(t.node,t.x0,t.y0,t.z0,t.x1,t.y1,t.z1);return this},Te.x=function(e){return arguments.length?(this._x=e,this):this._x},Te.y=function(e){return arguments.length?(this._y=e,this):this._y},Te.z=function(e){return arguments.length?(this._z=e,this):this._z};var De=n(84368),Ne=n.n(De),Ie=n(58736),ze=n.n(Ie),Fe=n(36386),Be=n.n(Fe);function Ue(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $e(e,t,n){return t&&Ue(e.prototype,t),n&&Ue(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ve(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(u){s=!0,o=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return qe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qe(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var He=$e((function e(t,n){var r=n.default,o=void 0===r?null:r,i=n.triggerUpdate,a=void 0===i||i,s=n.onChange,u=void 0===s?function(e,t){}:s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t,this.defaultVal=o,this.triggerUpdate=a,this.onChange=u}));function Ge(e){var t=e.stateInit,n=void 0===t?function(){return{}}:t,r=e.props,o=void 0===r?{}:r,i=e.methods,a=void 0===i?{}:i,s=e.aliases,u=void 0===s?{}:s,c=e.init,l=void 0===c?function(){}:c,h=e.update,d=void 0===h?function(){}:h,f=Object.keys(o).map((function(e){return new He(e,o[e])}));return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},n instanceof Function?n(e):n,{initialised:!1}),r={};function o(t){return i(t,e),s(),o}var i=function(e,n){l.call(o,e,t,n),t.initialised=!0},s=Be()((function(){t.initialised&&(d.call(o,t,r),r={})}),1);return f.forEach((function(e){o[e.name]=function(e){var n=e.name,i=e.triggerUpdate,a=void 0!==i&&i,u=e.onChange,c=void 0===u?function(e,t){}:u,l=e.defaultVal,h=void 0===l?null:l;return function(e){var i=t[n];if(!arguments.length)return i;var u=void 0===e?h:e;return t[n]=u,c.call(o,u,t,i),!r.hasOwnProperty(n)&&(r[n]=i),a&&s(),o}}(e)})),Object.keys(a).forEach((function(e){o[e]=function(){for(var n,r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return(n=a[e]).call.apply(n,[o,t].concat(i))}})),Object.entries(u).forEach((function(e){var t=Ve(e,2),n=t[0],r=t[1];return o[n]=o[r]})),o.resetProps=function(){return f.forEach((function(e){o[e.name](e.defaultVal)})),o},o.resetProps(),t._rerender=s,o}}var Ye=function(e){return e instanceof Function?e:"string"===typeof e?function(t){return t[e]}:function(t){return e}};function Xe(e,t){let n;if(void 0===t)for(const r of e)null!=r&&(n>r||void 0===n&&r>=r)&&(n=r);else{let r=-1;for(let o of e)null!=(o=t(o,++r,e))&&(n>o||void 0===n&&o>=o)&&(n=o)}return n}function Ke(e,t){let n;if(void 0===t)for(const r of e)null!=r&&(n<r||void 0===n&&r>=r)&&(n=r);else{let r=-1;for(let o of e)null!=(o=t(o,++r,e))&&(n<o||void 0===n&&o>=o)&&(n=o)}return n}function We(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Qe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(u){s=!0,o=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||Je(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ze(e){return function(e){if(Array.isArray(e))return et(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Je(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Je(e,t){if(e){if("string"===typeof e)return et(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?et(e,t):void 0}}function et(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function tt(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}var nt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=(t instanceof Array?t.length?t:[void 0]:[t]).map((function(e){return{keyAccessor:e,isProp:!(e instanceof Function)}})),i=e.reduce((function(e,t){var r=e,i=t;return o.forEach((function(e,t){var a,s=e.keyAccessor;if(e.isProp){var u=i,c=u[s],l=We(u,[s].map(tt));a=c,i=l}else a=s(i,t);t+1<o.length?(r.hasOwnProperty(a)||(r[a]={}),r=r[a]):n?(r.hasOwnProperty(a)||(r[a]=[]),r[a].push(i)):r[a]=i})),e}),{});n instanceof Function&&function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;r===o.length?Object.keys(t).forEach((function(e){return t[e]=n(t[e])})):Object.values(t).forEach((function(t){return e(t,r+1)}))}(i);var a=i;return r&&(a=[],function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];n.length===o.length?a.push({keys:n,vals:t}):Object.entries(t).forEach((function(t){var r=Qe(t,2),o=r[0],i=r[1];return e(i,[].concat(Ze(n),[o]))}))}(i),t instanceof Array&&0===t.length&&1===a.length&&(a[0].keys=[])),a};function rt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ot(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function it(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function at(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(u){s=!0,o=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||ut(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function st(e){return function(e){if(Array.isArray(e))return ct(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ut(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ut(e,t){if(e){if("string"===typeof e)return ct(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ct(e,t):void 0}}function ct(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var lt=["createObj","updateObj","exitObj","objBindAttr","dataBindAttr"];function ht(e,t,n){var r=n.objBindAttr,o=void 0===r?"__obj":r,i=n.dataBindAttr,a=void 0===i?"__data":i,s=n.idAccessor,u=n.purge,c=void 0!==u&&u,l=function(e){return e.hasOwnProperty(a)},h=t.filter((function(e){return!l(e)})),d=t.filter(l).map((function(e){return e[a]})),f=c?{enter:e,exit:d,update:[]}:function(e,t,n){var r={enter:[],update:[],exit:[]};if(n){var o=nt(e,n,!1),i=nt(t,n,!1),a=Object.assign({},o,i);Object.entries(a).forEach((function(e){var t=at(e,2),n=t[0],a=t[1],s=o.hasOwnProperty(n)?i.hasOwnProperty(n)?"update":"exit":"enter";r[s].push("update"===s?[o[n],i[n]]:a)}))}else{var s=new Set(e),u=new Set(t);new Set([].concat(st(s),st(u))).forEach((function(e){var t=s.has(e)?u.has(e)?"update":"exit":"enter";r[t].push("update"===t?[e,e]:e)}))}return r}(d,e,s);return f.update=f.update.map((function(e){var t=at(e,2),n=t[0],r=t[1];return n!==r&&(r[o]=n[o],r[o][a]=r),r})),f.exit=f.exit.concat(h.map((function(e){return ot({},o,e)}))),f}function dt(e,t,n,r,o){var i=o.createObj,a=void 0===i?function(e){return{}}:i,s=o.updateObj,u=void 0===s?function(e,t){}:s,c=o.exitObj,l=void 0===c?function(e){}:c,h=o.objBindAttr,d=void 0===h?"__obj":h,f=o.dataBindAttr,p=void 0===f?"__data":f,g=it(o,lt),v=ht(e,t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rt(Object(n),!0).forEach((function(t){ot(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({objBindAttr:d,dataBindAttr:p},g)),m=v.enter,y=v.update;v.exit.forEach((function(e){var t=e[d];delete e[d],l(t),r(t)}));var b=function(e){var t=[];return e.forEach((function(e){var n=a(e);n&&(n[p]=e,e[d]=n,t.push(n))})),t}(m);!function(e){e.forEach((function(e){var t=e[d];t&&(t[p]=e,u(t,e))}))}([].concat(st(m),st(y))),b.forEach(n)}class ft extends Map{constructor(e,t=mt){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[n,r]of e)this.set(n,r)}get(e){return super.get(pt(this,e))}has(e){return super.has(pt(this,e))}set(e,t){return super.set(gt(this,e),t)}delete(e){return super.delete(vt(this,e))}}Set;function pt({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function gt({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function vt({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function mt(e){return null!==e&&"object"===typeof e?e.valueOf():e}function yt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}const bt=Symbol("implicit");var wt=function(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(6*r,6*++r);return n}("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");const _t=/^\s+/,xt=/\s+$/;function kt(e,t){if(t=t||{},(e=e||"")instanceof kt)return e;if(!(this instanceof kt))return new kt(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,i=null,a=!1,s=!1;"string"==typeof e&&(e=function(e){e=e.replace(_t,"").replace(xt,"").toLowerCase();var t,n=!1;if(Bt[e])e=Bt[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=Wt.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=Wt.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=Wt.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=Wt.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=Wt.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=Wt.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=Wt.hex8.exec(e))return{r:Ht(t[1]),g:Ht(t[2]),b:Ht(t[3]),a:Kt(t[4]),format:n?"name":"hex8"};if(t=Wt.hex6.exec(e))return{r:Ht(t[1]),g:Ht(t[2]),b:Ht(t[3]),format:n?"name":"hex"};if(t=Wt.hex4.exec(e))return{r:Ht(t[1]+""+t[1]),g:Ht(t[2]+""+t[2]),b:Ht(t[3]+""+t[3]),a:Kt(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=Wt.hex3.exec(e))return{r:Ht(t[1]+""+t[1]),g:Ht(t[2]+""+t[2]),b:Ht(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(Qt(e.r)&&Qt(e.g)&&Qt(e.b)?(u=e.r,c=e.g,l=e.b,t={r:255*Vt(u,255),g:255*Vt(c,255),b:255*Vt(l,255)},a=!0,s="%"===String(e.r).substr(-1)?"prgb":"rgb"):Qt(e.h)&&Qt(e.s)&&Qt(e.v)?(r=Yt(e.s),o=Yt(e.v),t=function(e,t,n){e=6*Vt(e,360),t=Vt(t,100),n=Vt(n,100);var r=Math.floor(e),o=e-r,i=n*(1-t),a=n*(1-o*t),s=n*(1-(1-o)*t),u=r%6;return{r:255*[n,a,i,i,s,n][u],g:255*[s,n,n,a,i,i][u],b:255*[i,i,s,n,n,a][u]}}(e.h,r,o),a=!0,s="hsv"):Qt(e.h)&&Qt(e.s)&&Qt(e.l)&&(r=Yt(e.s),i=Yt(e.l),t=function(e,t,n){var r,o,i;function a(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=Vt(e,360),t=Vt(t,100),n=Vt(n,100),0===t)r=o=i=n;else{var s=n<.5?n*(1+t):n+t-n*t,u=2*n-s;r=a(u,s,e+1/3),o=a(u,s,e),i=a(u,s,e-1/3)}return{r:255*r,g:255*o,b:255*i}}(e.h,r,i),a=!0,s="hsl"),e.hasOwnProperty("a")&&(n=e.a));var u,c,l;return n=$t(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}function Ot(e,t,n){e=Vt(e,255),t=Vt(t,255),n=Vt(n,255);var r,o,i=Math.max(e,t,n),a=Math.min(e,t,n),s=(i+a)/2;if(i==a)r=o=0;else{var u=i-a;switch(o=s>.5?u/(2-i-a):u/(i+a),i){case e:r=(t-n)/u+(t<n?6:0);break;case t:r=(n-e)/u+2;break;case n:r=(e-t)/u+4}r/=6}return{h:r,s:o,l:s}}function jt(e,t,n){e=Vt(e,255),t=Vt(t,255),n=Vt(n,255);var r,o,i=Math.max(e,t,n),a=Math.min(e,t,n),s=i,u=i-a;if(o=0===i?0:u/i,i==a)r=0;else{switch(i){case e:r=(t-n)/u+(t<n?6:0);break;case t:r=(n-e)/u+2;break;case n:r=(e-t)/u+4}r/=6}return{h:r,s:o,v:s}}function Et(e,t,n,r){var o=[Gt(Math.round(e).toString(16)),Gt(Math.round(t).toString(16)),Gt(Math.round(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function Pt(e,t,n,r){return[Gt(Xt(r)),Gt(Math.round(e).toString(16)),Gt(Math.round(t).toString(16)),Gt(Math.round(n).toString(16))].join("")}function St(e,t){t=0===t?0:t||10;var n=kt(e).toHsl();return n.s-=t/100,n.s=qt(n.s),kt(n)}function Mt(e,t){t=0===t?0:t||10;var n=kt(e).toHsl();return n.s+=t/100,n.s=qt(n.s),kt(n)}function At(e){return kt(e).desaturate(100)}function Ct(e,t){t=0===t?0:t||10;var n=kt(e).toHsl();return n.l+=t/100,n.l=qt(n.l),kt(n)}function Tt(e,t){t=0===t?0:t||10;var n=kt(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),kt(n)}function Lt(e,t){t=0===t?0:t||10;var n=kt(e).toHsl();return n.l-=t/100,n.l=qt(n.l),kt(n)}function Rt(e,t){var n=kt(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,kt(n)}function Dt(e){var t=kt(e).toHsl();return t.h=(t.h+180)%360,kt(t)}function Nt(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=kt(e).toHsl(),r=[kt(e)],o=360/t,i=1;i<t;i++)r.push(kt({h:(n.h+i*o)%360,s:n.s,l:n.l}));return r}function It(e){var t=kt(e).toHsl(),n=t.h;return[kt(e),kt({h:(n+72)%360,s:t.s,l:t.l}),kt({h:(n+216)%360,s:t.s,l:t.l})]}function zt(e,t,n){t=t||6,n=n||30;var r=kt(e).toHsl(),o=360/n,i=[kt(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(kt(r));return i}function Ft(e,t){t=t||6;for(var n=kt(e).toHsv(),r=n.h,o=n.s,i=n.v,a=[],s=1/t;t--;)a.push(kt({h:r,s:o,v:i})),i=(i+s)%1;return a}kt.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=$t(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=jt(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=jt(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=Ot(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Ot(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return Et(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var i=[Gt(Math.round(e).toString(16)),Gt(Math.round(t).toString(16)),Gt(Math.round(n).toString(16)),Gt(Xt(r))];if(o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*Vt(this._r,255))+"%",g:Math.round(100*Vt(this._g,255))+"%",b:Math.round(100*Vt(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*Vt(this._r,255))+"%, "+Math.round(100*Vt(this._g,255))+"%, "+Math.round(100*Vt(this._b,255))+"%)":"rgba("+Math.round(100*Vt(this._r,255))+"%, "+Math.round(100*Vt(this._g,255))+"%, "+Math.round(100*Vt(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(Ut[Et(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+Pt(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=kt(e);n="#"+Pt(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return kt(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(Ct,arguments)},brighten:function(){return this._applyModification(Tt,arguments)},darken:function(){return this._applyModification(Lt,arguments)},desaturate:function(){return this._applyModification(St,arguments)},saturate:function(){return this._applyModification(Mt,arguments)},greyscale:function(){return this._applyModification(At,arguments)},spin:function(){return this._applyModification(Rt,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(zt,arguments)},complement:function(){return this._applyCombination(Dt,arguments)},monochromatic:function(){return this._applyCombination(Ft,arguments)},splitcomplement:function(){return this._applyCombination(It,arguments)},triad:function(){return this._applyCombination(Nt,[3])},tetrad:function(){return this._applyCombination(Nt,[4])}},kt.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:Yt(e[r]));e=n}return kt(e,t)},kt.equals=function(e,t){return!(!e||!t)&&kt(e).toRgbString()==kt(t).toRgbString()},kt.random=function(){return kt.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},kt.mix=function(e,t,n){n=0===n?0:n||50;var r=kt(e).toRgb(),o=kt(t).toRgb(),i=n/100;return kt({r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a})},kt.readability=function(e,t){var n=kt(e),r=kt(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},kt.isReadable=function(e,t,n){var r,o,i=kt.readability(e,t);switch(o=!1,r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n),r.level+r.size){case"AAsmall":case"AAAlarge":o=i>=4.5;break;case"AAlarge":o=i>=3;break;case"AAAsmall":o=i>=7}return o},kt.mostReadable=function(e,t,n){var r,o,i,a,s=null,u=0;o=(n=n||{}).includeFallbackColors,i=n.level,a=n.size;for(var c=0;c<t.length;c++)(r=kt.readability(e,t[c]))>u&&(u=r,s=kt(t[c]));return kt.isReadable(e,s,{level:i,size:a})||!o?s:(n.includeFallbackColors=!1,kt.mostReadable(e,["#fff","#000"],n))};var Bt=kt.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Ut=kt.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(Bt);function $t(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Vt(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"===typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function qt(e){return Math.min(1,Math.max(0,e))}function Ht(e){return parseInt(e,16)}function Gt(e){return 1==e.length?"0"+e:""+e}function Yt(e){return e<=1&&(e=100*e+"%"),e}function Xt(e){return Math.round(255*parseFloat(e)).toString(16)}function Kt(e){return Ht(e)/255}var Wt=function(){var e="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",t="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?",n="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";return{CSS_UNIT:new RegExp(e),rgb:new RegExp("rgb"+t),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+t),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+t),hsva:new RegExp("hsva"+n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Qt(e){return!!Wt.CSS_UNIT.exec(e)}function Zt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zt(Object(n),!0).forEach((function(t){on(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function en(e){return en="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},en(e)}function tn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,bn(r.key),r)}}function rn(e,t,n){return t&&nn(e.prototype,t),n&&nn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function on(e,t,n){return(t=bn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function an(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&un(e,t)}function sn(e){return sn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sn(e)}function un(e,t){return un=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},un(e,t)}function cn(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function ln(e,t,n){return ln=cn()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&un(o,n.prototype),o},ln.apply(null,arguments)}function hn(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function dn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fn(e,t){if(t&&("object"===typeof t||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return dn(e)}function pn(e){var t=cn();return function(){var n,r=sn(e);if(t){var o=sn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return fn(this,n)}}function gn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(l){c=!0,o=l}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||mn(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vn(e){return function(e){if(Array.isArray(e))return yn(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||mn(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mn(e,t){if(e){if("string"===typeof e)return yn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yn(e,t):void 0}}function yn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bn(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}var wn=function e(t){t instanceof Array?t.forEach(e):(t.map&&t.map.dispose(),t.dispose())},_n=function e(t){t.geometry&&t.geometry.dispose(),t.material&&wn(t.material),t.texture&&t.texture.dispose(),t.children&&t.children.forEach(e)},xn=function(e){for(;e.children.length;){var t=e.children[0];e.remove(t),_n(t)}},kn=["objFilter"];function On(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.objFilter,o=void 0===r?function(){return!0}:r,i=hn(n,kn);return dt(e,t.children.filter(o),(function(e){return t.add(e)}),(function(e){t.remove(e),xn(e)}),Jt({objBindAttr:"__threeObj"},i))}var jn=function(e){return isNaN(e)?parseInt(kt(e).toHex(),16):e},En=function(e){return isNaN(e)?kt(e).getAlpha():1},Pn=function e(){var t=new ft,n=[],r=[],o=bt;function i(e){let i=t.get(e);if(void 0===i){if(o!==bt)return o;t.set(e,i=n.push(e)-1)}return r[i%r.length]}return i.domain=function(e){if(!arguments.length)return n.slice();n=[],t=new ft;for(const r of e)t.has(r)||t.set(r,n.push(r)-1);return i},i.range=function(e){return arguments.length?(r=Array.from(e),i):r.slice()},i.unknown=function(e){return arguments.length?(o=e,i):o},i.copy=function(){return e(n,r).unknown(o)},yt.apply(i,arguments),i}(wt);function Sn(e,t,n){t&&"string"===typeof n&&e.filter((function(e){return!e[n]})).forEach((function(e){e[n]=Pn(t(e))}))}var Mn=window.THREE?window.THREE:{Group:y.ZAu,Mesh:y.Kj0,MeshLambertMaterial:y.YBo,Color:y.Ilk,BufferGeometry:y.u9r,BufferAttribute:y.TlE,Matrix4:y.yGw,Vector3:y.Pa4,SphereGeometry:y.xo$,CylinderGeometry:y.fHI,TubeGeometry:y.WXh,ConeGeometry:y.b_z,Line:y.x12,LineBasicMaterial:y.nls,QuadraticBezierCurve3:y.mXe,CubicBezierCurve3:y.yj7,Box3:y.ZzF},An={graph:Ne(),forcelayout:ze()},Cn=(new Mn.BufferGeometry).setAttribute?"setAttribute":"addAttribute",Tn=(new Mn.BufferGeometry).applyMatrix4?"applyMatrix4":"applyMatrix",Ln=Ge({props:{jsonUrl:{onChange:function(e,t){var n=this;e&&!t.fetchingJson&&(t.fetchingJson=!0,t.onLoading(),fetch(e).then((function(e){return e.json()})).then((function(e){t.fetchingJson=!1,t.onFinishLoading(e),n.graphData(e)})))},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(e,t){t.engineRunning=!1}},numDimensions:{default:3,onChange:function(e,t){var n=t.d3ForceLayout.force("charge");function r(e,t){e.forEach((function(e){delete e[t],delete e["v".concat(t)]}))}n&&n.strength(e>2?-60:-30),e<3&&r(t.graphData.nodes,"z"),e<2&&r(t.graphData.nodes,"y")}},dagMode:{onChange:function(e,t){!e&&"d3"===t.forceEngine&&(t.graphData.nodes||[]).forEach((function(e){return e.fx=e.fy=e.fz=void 0}))}},dagLevelDistance:{},dagNodeFilter:{default:function(e){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4},nodeId:{default:"id"},nodeVal:{default:"val"},nodeResolution:{default:8},nodeColor:{default:"color"},nodeAutoColorBy:{},nodeOpacity:{default:.75},nodeVisibility:{default:!0},nodeThreeObject:{},nodeThreeObjectExtend:{default:!1},nodePositionUpdate:{triggerUpdate:!1},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0},linkColor:{default:"color"},linkAutoColorBy:{},linkOpacity:{default:.2},linkWidth:{},linkResolution:{default:6},linkCurvature:{default:0,triggerUpdate:!1},linkCurveRotation:{default:0,triggerUpdate:!1},linkMaterial:{},linkThreeObject:{},linkThreeObjectExtend:{default:!1},linkPositionUpdate:{triggerUpdate:!1},linkDirectionalArrowLength:{default:0},linkDirectionalArrowColor:{},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1},linkDirectionalArrowResolution:{default:8},linkDirectionalParticles:{default:0},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleWidth:{default:.5},linkDirectionalParticleColor:{},linkDirectionalParticleResolution:{default:4},forceEngine:{default:"d3"},d3AlphaMin:{default:0},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(e,t){t.d3ForceLayout.alphaDecay(e)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(e,t){t.d3ForceLayout.alphaTarget(e)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(e,t){t.d3ForceLayout.velocityDecay(e)}},ngraphPhysics:{default:{timeStep:20,gravity:-1.2,theta:.8,springLength:30,springCoefficient:8e-4,dragCoefficient:.02}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onLoading:{default:function(){},triggerUpdate:!1},onFinishLoading:{default:function(){},triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1}},methods:{refresh:function(e){return e._flushObjects=!0,e._rerender(),this},d3Force:function(e,t,n){return void 0===n?e.d3ForceLayout.force(t):(e.d3ForceLayout.force(t,n),this)},d3ReheatSimulation:function(e){return e.d3ForceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(e){return e.cntTicks=0,e.startTickTime=new Date,e.engineRunning=!0,this},tickFrame:function(e){var t="ngraph"!==e.forceEngine;return e.engineRunning&&function(){++e.cntTicks>e.cooldownTicks||new Date-e.startTickTime>e.cooldownTime||t&&e.d3AlphaMin>0&&e.d3ForceLayout.alpha()<e.d3AlphaMin?(e.engineRunning=!1,e.onEngineStop()):(e.layout[t?"tick":"step"](),e.onEngineTick());var n=Ye(e.nodeThreeObjectExtend);e.graphData.nodes.forEach((function(r){var o=r.__threeObj;if(o){var i=t?r:e.layout.getNodePosition(r[e.nodeId]),a=n(r);e.nodePositionUpdate&&e.nodePositionUpdate(a?o.children[0]:o,{x:i.x,y:i.y,z:i.z},r)&&!a||(o.position.x=i.x,o.position.y=i.y||0,o.position.z=i.z||0)}}));var r=Ye(e.linkWidth),o=Ye(e.linkCurvature),i=Ye(e.linkCurveRotation),a=Ye(e.linkThreeObjectExtend);function s(n){var r=t?n:e.layout.getLinkPosition(e.layout.graph.getLink(n.source,n.target).id),a=r[t?"source":"from"],s=r[t?"target":"to"];if(a&&s&&a.hasOwnProperty("x")&&s.hasOwnProperty("x")){var u=o(n);if(u){var c,l=new Mn.Vector3(a.x,a.y||0,a.z||0),h=new Mn.Vector3(s.x,s.y||0,s.z||0),d=l.distanceTo(h),f=i(n);if(d>0){var p=s.x-a.x,g=s.y-a.y||0,v=(new Mn.Vector3).subVectors(h,l),m=v.clone().multiplyScalar(u).cross(0!==p||0!==g?new Mn.Vector3(0,0,1):new Mn.Vector3(0,1,0)).applyAxisAngle(v.normalize(),f).add((new Mn.Vector3).addVectors(l,h).divideScalar(2));c=new Mn.QuadraticBezierCurve3(l,m,h)}else{var y=70*u,b=-f,w=b+Math.PI/2;c=new Mn.CubicBezierCurve3(l,new Mn.Vector3(y*Math.cos(w),y*Math.sin(w),0).add(l),new Mn.Vector3(y*Math.cos(b),y*Math.sin(b),0).add(l),h)}n.__curve=c}else n.__curve=null}}e.graphData.links.forEach((function(n){var o=n.__lineObj;if(o){var i=t?n:e.layout.getLinkPosition(e.layout.graph.getLink(n.source,n.target).id),u=i[t?"source":"from"],c=i[t?"target":"to"];if(u&&c&&u.hasOwnProperty("x")&&c.hasOwnProperty("x")){s(n);var l=a(n);if(!e.linkPositionUpdate||!e.linkPositionUpdate(l?o.children[1]:o,{start:{x:u.x,y:u.y,z:u.z},end:{x:c.x,y:c.y,z:c.z}},n)||l){var h=30,d=n.__curve,f=o.children.length?o.children[0]:o;if("Line"===f.type){if(d)f.geometry.setFromPoints(d.getPoints(h));else{var p=f.geometry.getAttribute("position");p&&p.array&&6===p.array.length||f.geometry[Cn]("position",p=new Mn.BufferAttribute(new Float32Array(6),3)),p.array[0]=u.x,p.array[1]=u.y||0,p.array[2]=u.z||0,p.array[3]=c.x,p.array[4]=c.y||0,p.array[5]=c.z||0,p.needsUpdate=!0}f.geometry.computeBoundingSphere()}else if("Mesh"===f.type)if(d){f.geometry.type.match(/^Tube(Buffer)?Geometry$/)||(f.position.set(0,0,0),f.rotation.set(0,0,0),f.scale.set(1,1,1));var g=Math.ceil(10*r(n))/10/2,v=new Mn.TubeGeometry(d,h,g,e.linkResolution,!1);f.geometry.dispose(),f.geometry=v}else{if(!f.geometry.type.match(/^Cylinder(Buffer)?Geometry$/)){var m=Math.ceil(10*r(n))/10/2,y=new Mn.CylinderGeometry(m,m,1,e.linkResolution,1,!1);y[Tn]((new Mn.Matrix4).makeTranslation(0,.5,0)),y[Tn]((new Mn.Matrix4).makeRotationX(Math.PI/2)),f.geometry.dispose(),f.geometry=y}var b=new Mn.Vector3(u.x,u.y||0,u.z||0),w=new Mn.Vector3(c.x,c.y||0,c.z||0),_=b.distanceTo(w);f.position.x=b.x,f.position.y=b.y,f.position.z=b.z,f.scale.z=_,f.parent.localToWorld(w),f.lookAt(w)}}}}}))}(),function(){var n=Ye(e.linkDirectionalArrowRelPos),r=Ye(e.linkDirectionalArrowLength),o=Ye(e.nodeVal);e.graphData.links.forEach((function(i){var a=i.__arrowObj;if(a){var s=t?i:e.layout.getLinkPosition(e.layout.graph.getLink(i.source,i.target).id),u=s[t?"source":"from"],c=s[t?"target":"to"];if(u&&c&&u.hasOwnProperty("x")&&c.hasOwnProperty("x")){var l=Math.cbrt(Math.max(0,o(u)||1))*e.nodeRelSize,h=Math.cbrt(Math.max(0,o(c)||1))*e.nodeRelSize,d=r(i),f=n(i),p=i.__curve?function(e){return i.__curve.getPoint(e)}:function(e){var t=function(e,t,n,r){return t[e]+(n[e]-t[e])*r||0};return{x:t("x",u,c,e),y:t("y",u,c,e),z:t("z",u,c,e)}},g=i.__curve?i.__curve.getLength():Math.sqrt(["x","y","z"].map((function(e){return Math.pow((c[e]||0)-(u[e]||0),2)})).reduce((function(e,t){return e+t}),0)),v=l+d+(g-l-h-d)*f,m=p(v/g),y=p((v-d)/g);["x","y","z"].forEach((function(e){return a.position[e]=y[e]}));var b=ln(Mn.Vector3,vn(["x","y","z"].map((function(e){return m[e]}))));a.parent.localToWorld(b),a.lookAt(b)}}}))}(),function(){var n=Ye(e.linkDirectionalParticleSpeed);e.graphData.links.forEach((function(r){var o=r.__photonsObj&&r.__photonsObj.children,i=r.__singleHopPhotonsObj&&r.__singleHopPhotonsObj.children;if(i&&i.length||o&&o.length){var a=t?r:e.layout.getLinkPosition(e.layout.graph.getLink(r.source,r.target).id),s=a[t?"source":"from"],u=a[t?"target":"to"];if(s&&u&&s.hasOwnProperty("x")&&u.hasOwnProperty("x")){var c=n(r),l=r.__curve?function(e){return r.__curve.getPoint(e)}:function(e){var t=function(e,t,n,r){return t[e]+(n[e]-t[e])*r||0};return{x:t("x",s,u,e),y:t("y",s,u,e),z:t("z",s,u,e)}};[].concat(vn(o||[]),vn(i||[])).forEach((function(e,t){var n="singleHopPhotons"===e.parent.__linkThreeObjType;if(e.hasOwnProperty("__progressRatio")||(e.__progressRatio=n?0:t/o.length),e.__progressRatio+=c,e.__progressRatio>=1){if(n)return e.parent.remove(e),void xn(e);e.__progressRatio=e.__progressRatio%1}var r=e.__progressRatio,i=l(r);["x","y","z"].forEach((function(t){return e.position[t]=i[t]}))}))}}}))}(),this},emitParticle:function(e,t){if(t&&e.graphData.links.includes(t)){if(!t.__singleHopPhotonsObj){var n=new Mn.Group;n.__linkThreeObjType="singleHopPhotons",t.__singleHopPhotonsObj=n,e.graphScene.add(n)}var r=Ye(e.linkDirectionalParticleWidth),o=Math.ceil(10*r(t))/10/2,i=e.linkDirectionalParticleResolution,a=new Mn.SphereGeometry(o,i,i),s=Ye(e.linkColor),u=Ye(e.linkDirectionalParticleColor)(t)||s(t)||"#f0f0f0",c=new Mn.Color(jn(u)),l=3*e.linkOpacity,h=new Mn.MeshLambertMaterial({color:c,transparent:!0,opacity:l});t.__singleHopPhotonsObj.add(new Mn.Mesh(a,h))}return this},getGraphBbox:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0};if(!e.initialised)return null;var n=function e(n){var r=[];if(n.geometry){n.geometry.computeBoundingBox();var o=new Mn.Box3;o.copy(n.geometry.boundingBox).applyMatrix4(n.matrixWorld),r.push(o)}return r.concat.apply(r,vn((n.children||[]).filter((function(e){return!e.hasOwnProperty("__graphObjType")||"node"===e.__graphObjType&&t(e.__data)})).map(e)))}(e.graphScene);return n.length?Object.assign.apply(Object,vn(["x","y","z"].map((function(e){return on({},e,[Xe(n,(function(t){return t.min[e]})),Ke(n,(function(t){return t.max[e]}))])})))):null}},stateInit:function(){return{d3ForceLayout:re().force("link",ue()).force("charge",Le()).force("center",Re()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(e,t){t.graphScene=e},update:function(e,t){var n=function(e){return e.some((function(e){return t.hasOwnProperty(e)}))};if(e.engineRunning=!1,e.onUpdate(),null!==e.nodeAutoColorBy&&n(["nodeAutoColorBy","graphData","nodeColor"])&&Sn(e.graphData.nodes,Ye(e.nodeAutoColorBy),e.nodeColor),null!==e.linkAutoColorBy&&n(["linkAutoColorBy","graphData","linkColor"])&&Sn(e.graphData.links,Ye(e.linkAutoColorBy),e.linkColor),e._flushObjects||n(["graphData","nodeThreeObject","nodeThreeObjectExtend","nodeVal","nodeColor","nodeVisibility","nodeRelSize","nodeResolution","nodeOpacity"])){var r=Ye(e.nodeThreeObject),o=Ye(e.nodeThreeObjectExtend),i=Ye(e.nodeVal),a=Ye(e.nodeColor),s=Ye(e.nodeVisibility),u={},c={};On(e.graphData.nodes.filter(s),e.graphScene,{purge:e._flushObjects||n(["nodeThreeObject","nodeThreeObjectExtend"]),objFilter:function(e){return"node"===e.__graphObjType},createObj:function(t){var n,i=r(t),a=o(t);return i&&e.nodeThreeObject===i&&(i=i.clone()),i&&!a?n=i:((n=new Mn.Mesh).__graphDefaultObj=!0,i&&a&&n.add(i)),n.__graphObjType="node",n},updateObj:function(t,n){if(t.__graphDefaultObj){var r=i(n)||1,o=Math.cbrt(r)*e.nodeRelSize,s=e.nodeResolution;t.geometry.type.match(/^Sphere(Buffer)?Geometry$/)&&t.geometry.parameters.radius===o&&t.geometry.parameters.widthSegments===s||(u.hasOwnProperty(r)||(u[r]=new Mn.SphereGeometry(o,s,s)),t.geometry.dispose(),t.geometry=u[r]);var l=a(n),h=new Mn.Color(jn(l||"#ffffaa")),d=e.nodeOpacity*En(l);"MeshLambertMaterial"===t.material.type&&t.material.color.equals(h)&&t.material.opacity===d||(c.hasOwnProperty(l)||(c[l]=new Mn.MeshLambertMaterial({color:h,transparent:!0,opacity:d})),t.material.dispose(),t.material=c[l])}}})}if(e._flushObjects||n(["graphData","linkThreeObject","linkThreeObjectExtend","linkMaterial","linkColor","linkWidth","linkVisibility","linkResolution","linkOpacity","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowResolution","linkDirectionalParticles","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleResolution"])){var l=Ye(e.linkThreeObject),h=Ye(e.linkThreeObjectExtend),d=Ye(e.linkMaterial),f=Ye(e.linkVisibility),p=Ye(e.linkColor),g=Ye(e.linkWidth),v={},m={},y={},b=e.graphData.links.filter(f);if(On(b,e.graphScene,{objBindAttr:"__lineObj",purge:e._flushObjects||n(["linkThreeObject","linkThreeObjectExtend","linkWidth"]),objFilter:function(e){return"link"===e.__graphObjType},exitObj:function(e){var t=e.__data&&e.__data.__singleHopPhotonsObj;t&&(t.parent.remove(t),xn(t),delete e.__data.__singleHopPhotonsObj)},createObj:function(t){var n,r,o=l(t),i=h(t);if(o&&e.linkThreeObject===o&&(o=o.clone()),!o||i)if(!!g(t))n=new Mn.Mesh;else{var a=new Mn.BufferGeometry;a[Cn]("position",new Mn.BufferAttribute(new Float32Array(6),3)),n=new Mn.Line(a)}return o?i?((r=new Mn.Group).__graphDefaultObj=!0,r.add(n),r.add(o)):r=o:(r=n).__graphDefaultObj=!0,r.renderOrder=10,r.__graphObjType="link",r},updateObj:function(t,n){if(t.__graphDefaultObj){var r=t.children.length?t.children[0]:t,o=Math.ceil(10*g(n))/10,i=!!o;if(i){var a=o/2,s=e.linkResolution;if(!r.geometry.type.match(/^Cylinder(Buffer)?Geometry$/)||r.geometry.parameters.radiusTop!==a||r.geometry.parameters.radialSegments!==s){if(!v.hasOwnProperty(o)){var u=new Mn.CylinderGeometry(a,a,1,s,1,!1);u[Tn]((new Mn.Matrix4).makeTranslation(0,.5,0)),u[Tn]((new Mn.Matrix4).makeRotationX(Math.PI/2)),v[o]=u}r.geometry.dispose(),r.geometry=v[o]}}var c=d(n);if(c)r.material=c;else{var l=p(n),h=new Mn.Color(jn(l||"#f0f0f0")),f=e.linkOpacity*En(l),b=i?"MeshLambertMaterial":"LineBasicMaterial";if(r.material.type!==b||!r.material.color.equals(h)||r.material.opacity!==f){var w=i?m:y;w.hasOwnProperty(l)||(w[l]=new Mn[b]({color:h,transparent:f<1,opacity:f,depthWrite:f>=1})),r.material.dispose(),r.material=w[l]}}}}}),e.linkDirectionalArrowLength||t.hasOwnProperty("linkDirectionalArrowLength")){var w=Ye(e.linkDirectionalArrowLength),_=Ye(e.linkDirectionalArrowColor);On(b.filter(w),e.graphScene,{objBindAttr:"__arrowObj",objFilter:function(e){return"arrow"===e.__linkThreeObjType},createObj:function(){var e=new Mn.Mesh(void 0,new Mn.MeshLambertMaterial({transparent:!0}));return e.__linkThreeObjType="arrow",e},updateObj:function(t,n){var r=w(n),o=e.linkDirectionalArrowResolution;if(!t.geometry.type.match(/^Cone(Buffer)?Geometry$/)||t.geometry.parameters.height!==r||t.geometry.parameters.radialSegments!==o){var i=new Mn.ConeGeometry(.25*r,r,o);i.translate(0,r/2,0),i.rotateX(Math.PI/2),t.geometry.dispose(),t.geometry=i}t.material.color=new Mn.Color(_(n)||p(n)||"#f0f0f0"),t.material.opacity=3*e.linkOpacity}})}if(e.linkDirectionalParticles||t.hasOwnProperty("linkDirectionalParticles")){var x=Ye(e.linkDirectionalParticles),k=Ye(e.linkDirectionalParticleWidth),O=Ye(e.linkDirectionalParticleColor),j={},E={};On(b.filter(x),e.graphScene,{objBindAttr:"__photonsObj",objFilter:function(e){return"photons"===e.__linkThreeObjType},createObj:function(){var e=new Mn.Group;return e.__linkThreeObjType="photons",e},updateObj:function(t,n){var r,o=Math.round(Math.abs(x(n))),i=!!t.children.length&&t.children[0],a=Math.ceil(10*k(n))/10/2,s=e.linkDirectionalParticleResolution;i&&i.geometry.parameters.radius===a&&i.geometry.parameters.widthSegments===s?r=i.geometry:(E.hasOwnProperty(a)||(E[a]=new Mn.SphereGeometry(a,s,s)),r=E[a],i&&i.geometry.dispose());var u,c=O(n)||p(n)||"#f0f0f0",l=new Mn.Color(jn(c)),h=3*e.linkOpacity;i&&i.material.color.equals(l)&&i.material.opacity===h?u=i.material:(j.hasOwnProperty(c)||(j[c]=new Mn.MeshLambertMaterial({color:l,transparent:!0,opacity:h})),u=j[c],i&&i.material.dispose()),On(vn(new Array(o)).map((function(e,t){return{idx:t}})),t,{idAccessor:function(e){return e.idx},createObj:function(){return new Mn.Mesh(r,u)},updateObj:function(e){e.geometry=r,e.material=u}})}})}}if(e._flushObjects=!1,n(["graphData","nodeId","linkSource","linkTarget","numDimensions","forceEngine","dagMode","dagNodeFilter","dagLevelDistance"])){e.engineRunning=!1,e.graphData.links.forEach((function(t){t.source=t[e.linkSource],t.target=t[e.linkTarget]}));var P,S="ngraph"!==e.forceEngine;if(S){(P=e.d3ForceLayout).stop().alpha(1).numDimensions(e.numDimensions).nodes(e.graphData.nodes);var M=e.d3ForceLayout.force("link");M&&M.id((function(t){return t[e.nodeId]})).links(e.graphData.links);var A=e.dagMode&&function(e,t){var n=e.nodes,r=e.links,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=o.nodeFilter,a=void 0===i?function(){return!0}:i,s=o.onLoopError,u=void 0===s?function(e){throw"Invalid DAG structure! Found cycle in node path: ".concat(e.join(" -> "),".")}:s,c={};n.forEach((function(e){return c[t(e)]={data:e,out:[],depth:-1,skip:!a(e)}})),r.forEach((function(e){var n=e.source,r=e.target,o=u(n),i=u(r);if(!c.hasOwnProperty(o))throw"Missing source node with id: ".concat(o);if(!c.hasOwnProperty(i))throw"Missing target node with id: ".concat(i);var a=c[o],s=c[i];function u(e){return"object"===en(e)?t(e):e}a.out.push(s)}));var l=[];return h(Object.values(c)),Object.assign.apply(Object,[{}].concat(vn(Object.entries(c).filter((function(e){return!gn(e,2)[1].skip})).map((function(e){var t=gn(e,2);return on({},t[0],t[1].depth)})))));function h(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=function(){var o=e[i];if(-1!==n.indexOf(o)){var a=[].concat(vn(n.slice(n.indexOf(o))),[o]).map((function(e){return t(e.data)}));return l.some((function(e){return e.length===a.length&&e.every((function(e,t){return e===a[t]}))}))||(l.push(a),u(a)),"continue"}r>o.depth&&(o.depth=r,h(o.out,[].concat(vn(n),[o]),r+(o.skip?0:1)))},i=0,a=e.length;i<a;i++)o()}}(e.graphData,(function(t){return t[e.nodeId]}),{nodeFilter:e.dagNodeFilter,onLoopError:e.onDagError||void 0}),C=Math.max.apply(Math,vn(Object.values(A||[]))),T=e.dagLevelDistance||e.graphData.nodes.length/(C||1)*2*(-1!==["radialin","radialout"].indexOf(e.dagMode)?.7:1);if(e.dagMode){var L=function(t,n){return function(r){return t?(A[r[e.nodeId]]-C/2)*T*(n?-1:1):void 0}},R=L(-1!==["lr","rl"].indexOf(e.dagMode),"rl"===e.dagMode),D=L(-1!==["td","bu"].indexOf(e.dagMode),"td"===e.dagMode),N=L(-1!==["zin","zout"].indexOf(e.dagMode),"zout"===e.dagMode);e.graphData.nodes.filter(e.dagNodeFilter).forEach((function(e){e.fx=R(e),e.fy=D(e),e.fz=N(e)}))}e.d3ForceLayout.force("dagRadial",-1!==["radialin","radialout"].indexOf(e.dagMode)?function(e,t,n,r){var o,i,a,s,u=oe(.1);function c(e){for(var u=0,c=o.length;u<c;++u){var l=o[u],h=l.x-t||1e-6,d=(l.y||0)-n||1e-6,f=(l.z||0)-r||1e-6,p=Math.sqrt(h*h+d*d+f*f),g=(s[u]-p)*a[u]*e/p;l.vx+=h*g,i>1&&(l.vy+=d*g),i>2&&(l.vz+=f*g)}}function l(){if(o){var t,n=o.length;for(a=new Array(n),s=new Array(n),t=0;t<n;++t)s[t]=+e(o[t],t,o),a[t]=isNaN(s[t])?0:+u(o[t],t,o)}}return"function"!==typeof e&&(e=oe(+e)),null==t&&(t=0),null==n&&(n=0),null==r&&(r=0),c.initialize=function(e,...t){o=e,i=t.find((e=>[1,2,3].includes(e)))||2,l()},c.strength=function(e){return arguments.length?(u="function"===typeof e?e:oe(+e),l(),c):u},c.radius=function(t){return arguments.length?(e="function"===typeof t?t:oe(+t),l(),c):e},c.x=function(e){return arguments.length?(t=+e,c):t},c.y=function(e){return arguments.length?(n=+e,c):n},c.z=function(e){return arguments.length?(r=+e,c):r},c}((function(t){var n=A[t[e.nodeId]]||-1;return("radialin"===e.dagMode?C-n:n)*T})).strength((function(t){return e.dagNodeFilter(t)?1:0})):null)}else{var I=An.graph();e.graphData.nodes.forEach((function(t){I.addNode(t[e.nodeId])})),e.graphData.links.forEach((function(e){I.addLink(e.source,e.target)})),(P=An.forcelayout(I,Jt({dimensions:e.numDimensions},e.ngraphPhysics))).graph=I}for(var z=0;z<e.warmupTicks&&!(S&&e.d3AlphaMin>0&&e.d3ForceLayout.alpha()<e.d3AlphaMin);z++)P[S?"tick":"step"]();e.layout=P,this.resetCountdown()}e.engineRunning=!0,e.onFinishUpdate()}});var Rn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=function(t){an(o,t);var r=pn(o);function o(){var t;tn(this,o);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return(t=r.call.apply(r,[this].concat(a))).__kapsuleInstance=e().apply(void 0,[].concat(vn(n?[dn(t)]:[]),a)),t}return rn(o)}(t);return Object.keys(e()).forEach((function(e){return r.prototype[e]=function(){var t,n=(t=this.__kapsuleInstance)[e].apply(t,arguments);return n===this.__kapsuleInstance?this:n}})),r}(Ln,(window.THREE?window.THREE:{Group:y.ZAu}).Group,!0);const Dn={type:"change"},Nn={type:"start"},In={type:"end"};class zn extends y.pBf{constructor(e,t){super();const n=this,r=-1,o=0,i=1,a=2,s=3,u=4;this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.screen={left:0,top:0,width:0,height:0},this.rotateSpeed=1,this.zoomSpeed=1.2,this.panSpeed=.3,this.noRotate=!1,this.noZoom=!1,this.noPan=!1,this.staticMoving=!1,this.dynamicDampingFactor=.2,this.minDistance=0,this.maxDistance=1/0,this.keys=["KeyA","KeyS","KeyD"],this.mouseButtons={LEFT:y.RsA.ROTATE,MIDDLE:y.RsA.DOLLY,RIGHT:y.RsA.PAN},this.target=new y.Pa4;const c=1e-6,l=new y.Pa4;let h=1,d=r,f=r,p=0,g=0,v=0;const m=new y.Pa4,b=new y.FM8,w=new y.FM8,_=new y.Pa4,x=new y.FM8,k=new y.FM8,O=new y.FM8,j=new y.FM8,E=[],P={};this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.up0=this.object.up.clone(),this.zoom0=this.object.zoom,this.handleResize=function(){const e=n.domElement.getBoundingClientRect(),t=n.domElement.ownerDocument.documentElement;n.screen.left=e.left+window.pageXOffset-t.clientLeft,n.screen.top=e.top+window.pageYOffset-t.clientTop,n.screen.width=e.width,n.screen.height=e.height};const S=function(){const e=new y.FM8;return function(t,r){return e.set((t-n.screen.left)/n.screen.width,(r-n.screen.top)/n.screen.height),e}}(),M=function(){const e=new y.FM8;return function(t,r){return e.set((t-.5*n.screen.width-n.screen.left)/(.5*n.screen.width),(n.screen.height+2*(n.screen.top-r))/n.screen.width),e}}();function A(e){!1!==n.enabled&&(0===E.length&&(n.domElement.setPointerCapture(e.pointerId),n.domElement.addEventListener("pointermove",C),n.domElement.addEventListener("pointerup",T)),function(e){E.push(e)}(e),"touch"===e.pointerType?function(e){if(1===(F(e),E.length))d=s,w.copy(M(E[0].pageX,E[0].pageY)),b.copy(w);else{d=u;const e=E[0].pageX-E[1].pageX,t=E[0].pageY-E[1].pageY;g=p=Math.sqrt(e*e+t*t);const n=(E[0].pageX+E[1].pageX)/2,r=(E[0].pageY+E[1].pageY)/2;O.copy(S(n,r)),j.copy(O)}n.dispatchEvent(Nn)}(e):function(e){if(d===r)switch(e.button){case n.mouseButtons.LEFT:d=o;break;case n.mouseButtons.MIDDLE:d=i;break;case n.mouseButtons.RIGHT:d=a}const t=f!==r?f:d;t!==o||n.noRotate?t!==i||n.noZoom?t!==a||n.noPan||(O.copy(S(e.pageX,e.pageY)),j.copy(O)):(x.copy(S(e.pageX,e.pageY)),k.copy(x)):(w.copy(M(e.pageX,e.pageY)),b.copy(w));n.dispatchEvent(Nn)}(e))}function C(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){if(1===(F(e),E.length))b.copy(w),w.copy(M(e.pageX,e.pageY));else{const t=function(e){const t=e.pointerId===E[0].pointerId?E[1]:E[0];return P[t.pointerId]}(e),n=e.pageX-t.x,r=e.pageY-t.y;g=Math.sqrt(n*n+r*r);const o=(e.pageX+t.x)/2,i=(e.pageY+t.y)/2;j.copy(S(o,i))}}(e):function(e){const t=f!==r?f:d;t!==o||n.noRotate?t!==i||n.noZoom?t!==a||n.noPan||j.copy(S(e.pageX,e.pageY)):k.copy(S(e.pageX,e.pageY)):(b.copy(w),w.copy(M(e.pageX,e.pageY)))}(e))}function T(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(E.length){case 0:d=r;break;case 1:d=s,w.copy(M(e.pageX,e.pageY)),b.copy(w);break;case 2:d=u;for(let t=0;t<E.length;t++)if(E[t].pointerId!==e.pointerId){const e=P[E[t].pointerId];w.copy(M(e.x,e.y)),b.copy(w);break}}n.dispatchEvent(In)}(e):(d=r,n.dispatchEvent(In)),z(e),0===E.length&&(n.domElement.releasePointerCapture(e.pointerId),n.domElement.removeEventListener("pointermove",C),n.domElement.removeEventListener("pointerup",T)))}function L(e){z(e)}function R(e){!1!==n.enabled&&(window.removeEventListener("keydown",R),f===r&&(e.code!==n.keys[o]||n.noRotate?e.code!==n.keys[i]||n.noZoom?e.code!==n.keys[a]||n.noPan||(f=a):f=i:f=o))}function D(){!1!==n.enabled&&(f=r,window.addEventListener("keydown",R))}function N(e){if(!1!==n.enabled&&!0!==n.noZoom){switch(e.preventDefault(),e.deltaMode){case 2:x.y-=.025*e.deltaY;break;case 1:x.y-=.01*e.deltaY;break;default:x.y-=25e-5*e.deltaY}n.dispatchEvent(Nn),n.dispatchEvent(In)}}function I(e){!1!==n.enabled&&e.preventDefault()}function z(e){delete P[e.pointerId];for(let t=0;t<E.length;t++)if(E[t].pointerId==e.pointerId)return void E.splice(t,1)}function F(e){let t=P[e.pointerId];void 0===t&&(t=new y.FM8,P[e.pointerId]=t),t.set(e.pageX,e.pageY)}this.rotateCamera=function(){const e=new y.Pa4,t=new y._fP,r=new y.Pa4,o=new y.Pa4,i=new y.Pa4,a=new y.Pa4;return function(){a.set(w.x-b.x,w.y-b.y,0);let s=a.length();s?(m.copy(n.object.position).sub(n.target),r.copy(m).normalize(),o.copy(n.object.up).normalize(),i.crossVectors(o,r).normalize(),o.setLength(w.y-b.y),i.setLength(w.x-b.x),a.copy(o.add(i)),e.crossVectors(a,m).normalize(),s*=n.rotateSpeed,t.setFromAxisAngle(e,s),m.applyQuaternion(t),n.object.up.applyQuaternion(t),_.copy(e),v=s):!n.staticMoving&&v&&(v*=Math.sqrt(1-n.dynamicDampingFactor),m.copy(n.object.position).sub(n.target),t.setFromAxisAngle(_,v),m.applyQuaternion(t),n.object.up.applyQuaternion(t)),b.copy(w)}}(),this.zoomCamera=function(){let e;d===u?(e=p/g,p=g,n.object.isPerspectiveCamera?m.multiplyScalar(e):n.object.isOrthographicCamera?(n.object.zoom/=e,n.object.updateProjectionMatrix()):console.warn("THREE.TrackballControls: Unsupported camera type")):(e=1+(k.y-x.y)*n.zoomSpeed,1!==e&&e>0&&(n.object.isPerspectiveCamera?m.multiplyScalar(e):n.object.isOrthographicCamera?(n.object.zoom/=e,n.object.updateProjectionMatrix()):console.warn("THREE.TrackballControls: Unsupported camera type")),n.staticMoving?x.copy(k):x.y+=(k.y-x.y)*this.dynamicDampingFactor)},this.panCamera=function(){const e=new y.FM8,t=new y.Pa4,r=new y.Pa4;return function(){if(e.copy(j).sub(O),e.lengthSq()){if(n.object.isOrthographicCamera){const t=(n.object.right-n.object.left)/n.object.zoom/n.domElement.clientWidth,r=(n.object.top-n.object.bottom)/n.object.zoom/n.domElement.clientWidth;e.x*=t,e.y*=r}e.multiplyScalar(m.length()*n.panSpeed),r.copy(m).cross(n.object.up).setLength(e.x),r.add(t.copy(n.object.up).setLength(e.y)),n.object.position.add(r),n.target.add(r),n.staticMoving?O.copy(j):O.add(e.subVectors(j,O).multiplyScalar(n.dynamicDampingFactor))}}}(),this.checkDistances=function(){n.noZoom&&n.noPan||(m.lengthSq()>n.maxDistance*n.maxDistance&&(n.object.position.addVectors(n.target,m.setLength(n.maxDistance)),x.copy(k)),m.lengthSq()<n.minDistance*n.minDistance&&(n.object.position.addVectors(n.target,m.setLength(n.minDistance)),x.copy(k)))},this.update=function(){m.subVectors(n.object.position,n.target),n.noRotate||n.rotateCamera(),n.noZoom||n.zoomCamera(),n.noPan||n.panCamera(),n.object.position.addVectors(n.target,m),n.object.isPerspectiveCamera?(n.checkDistances(),n.object.lookAt(n.target),l.distanceToSquared(n.object.position)>c&&(n.dispatchEvent(Dn),l.copy(n.object.position))):n.object.isOrthographicCamera?(n.object.lookAt(n.target),(l.distanceToSquared(n.object.position)>c||h!==n.object.zoom)&&(n.dispatchEvent(Dn),l.copy(n.object.position),h=n.object.zoom)):console.warn("THREE.TrackballControls: Unsupported camera type")},this.reset=function(){d=r,f=r,n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.up.copy(n.up0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),m.subVectors(n.object.position,n.target),n.object.lookAt(n.target),n.dispatchEvent(Dn),l.copy(n.object.position),h=n.object.zoom},this.dispose=function(){n.domElement.removeEventListener("contextmenu",I),n.domElement.removeEventListener("pointerdown",A),n.domElement.removeEventListener("pointercancel",L),n.domElement.removeEventListener("wheel",N),n.domElement.removeEventListener("pointermove",C),n.domElement.removeEventListener("pointerup",T),window.removeEventListener("keydown",R),window.removeEventListener("keyup",D)},this.domElement.addEventListener("contextmenu",I),this.domElement.addEventListener("pointerdown",A),this.domElement.addEventListener("pointercancel",L),this.domElement.addEventListener("wheel",N,{passive:!1}),window.addEventListener("keydown",R),window.addEventListener("keyup",D),this.handleResize(),this.update()}}const Fn={type:"change"},Bn={type:"start"},Un={type:"end"};class $n extends y.pBf{constructor(e,t){super(),this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new y.Pa4,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:y.RsA.ROTATE,MIDDLE:y.RsA.DOLLY,RIGHT:y.RsA.PAN},this.touches={ONE:y.QmN.ROTATE,TWO:y.QmN.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return a.phi},this.getAzimuthalAngle=function(){return a.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(e){e.addEventListener("keydown",q),this._domElementKeyEvents=e},this.saveState=function(){n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=function(){n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(Fn),n.update(),o=r.NONE},this.update=function(){const t=new y.Pa4,h=(new y._fP).setFromUnitVectors(e.up,new y.Pa4(0,1,0)),d=h.clone().invert(),f=new y.Pa4,p=new y._fP,g=2*Math.PI;return function(){const e=n.object.position;t.copy(e).sub(n.target),t.applyQuaternion(h),a.setFromVector3(t),n.autoRotate&&o===r.NONE&&O(2*Math.PI/60/60*n.autoRotateSpeed),n.enableDamping?(a.theta+=s.theta*n.dampingFactor,a.phi+=s.phi*n.dampingFactor):(a.theta+=s.theta,a.phi+=s.phi);let v=n.minAzimuthAngle,m=n.maxAzimuthAngle;return isFinite(v)&&isFinite(m)&&(v<-Math.PI?v+=g:v>Math.PI&&(v-=g),m<-Math.PI?m+=g:m>Math.PI&&(m-=g),a.theta=v<=m?Math.max(v,Math.min(m,a.theta)):a.theta>(v+m)/2?Math.max(v,a.theta):Math.min(m,a.theta)),a.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,a.phi)),a.makeSafe(),a.radius*=u,a.radius=Math.max(n.minDistance,Math.min(n.maxDistance,a.radius)),!0===n.enableDamping?n.target.addScaledVector(c,n.dampingFactor):n.target.add(c),t.setFromSpherical(a),t.applyQuaternion(d),e.copy(n.target).add(t),n.object.lookAt(n.target),!0===n.enableDamping?(s.theta*=1-n.dampingFactor,s.phi*=1-n.dampingFactor,c.multiplyScalar(1-n.dampingFactor)):(s.set(0,0,0),c.set(0,0,0)),u=1,!!(l||f.distanceToSquared(n.object.position)>i||8*(1-p.dot(n.object.quaternion))>i)&&(n.dispatchEvent(Fn),f.copy(n.object.position),p.copy(n.object.quaternion),l=!1,!0)}}(),this.dispose=function(){n.domElement.removeEventListener("contextmenu",H),n.domElement.removeEventListener("pointerdown",F),n.domElement.removeEventListener("pointercancel",$),n.domElement.removeEventListener("wheel",V),n.domElement.removeEventListener("pointermove",B),n.domElement.removeEventListener("pointerup",U),null!==n._domElementKeyEvents&&n._domElementKeyEvents.removeEventListener("keydown",q)};const n=this,r={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let o=r.NONE;const i=1e-6,a=new y.$V,s=new y.$V;let u=1;const c=new y.Pa4;let l=!1;const h=new y.FM8,d=new y.FM8,f=new y.FM8,p=new y.FM8,g=new y.FM8,v=new y.FM8,m=new y.FM8,b=new y.FM8,w=new y.FM8,_=[],x={};function k(){return Math.pow(.95,n.zoomSpeed)}function O(e){s.theta-=e}function j(e){s.phi-=e}const E=function(){const e=new y.Pa4;return function(t,n){e.setFromMatrixColumn(n,0),e.multiplyScalar(-t),c.add(e)}}(),P=function(){const e=new y.Pa4;return function(t,r){!0===n.screenSpacePanning?e.setFromMatrixColumn(r,1):(e.setFromMatrixColumn(r,0),e.crossVectors(n.object.up,e)),e.multiplyScalar(t),c.add(e)}}(),S=function(){const e=new y.Pa4;return function(t,r){const o=n.domElement;if(n.object.isPerspectiveCamera){const i=n.object.position;e.copy(i).sub(n.target);let a=e.length();a*=Math.tan(n.object.fov/2*Math.PI/180),E(2*t*a/o.clientHeight,n.object.matrix),P(2*r*a/o.clientHeight,n.object.matrix)}else n.object.isOrthographicCamera?(E(t*(n.object.right-n.object.left)/n.object.zoom/o.clientWidth,n.object.matrix),P(r*(n.object.top-n.object.bottom)/n.object.zoom/o.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}}();function M(e){n.object.isPerspectiveCamera?u/=e:n.object.isOrthographicCamera?(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom*e)),n.object.updateProjectionMatrix(),l=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function A(e){n.object.isPerspectiveCamera?u*=e:n.object.isOrthographicCamera?(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/e)),n.object.updateProjectionMatrix(),l=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function C(e){h.set(e.clientX,e.clientY)}function T(e){p.set(e.clientX,e.clientY)}function L(){if(1===_.length)h.set(_[0].pageX,_[0].pageY);else{const e=.5*(_[0].pageX+_[1].pageX),t=.5*(_[0].pageY+_[1].pageY);h.set(e,t)}}function R(){if(1===_.length)p.set(_[0].pageX,_[0].pageY);else{const e=.5*(_[0].pageX+_[1].pageX),t=.5*(_[0].pageY+_[1].pageY);p.set(e,t)}}function D(){const e=_[0].pageX-_[1].pageX,t=_[0].pageY-_[1].pageY,n=Math.sqrt(e*e+t*t);m.set(0,n)}function N(e){if(1==_.length)d.set(e.pageX,e.pageY);else{const t=X(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);d.set(n,r)}f.subVectors(d,h).multiplyScalar(n.rotateSpeed);const t=n.domElement;O(2*Math.PI*f.x/t.clientHeight),j(2*Math.PI*f.y/t.clientHeight),h.copy(d)}function I(e){if(1===_.length)g.set(e.pageX,e.pageY);else{const t=X(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);g.set(n,r)}v.subVectors(g,p).multiplyScalar(n.panSpeed),S(v.x,v.y),p.copy(g)}function z(e){const t=X(e),r=e.pageX-t.x,o=e.pageY-t.y,i=Math.sqrt(r*r+o*o);b.set(0,i),w.set(0,Math.pow(b.y/m.y,n.zoomSpeed)),M(w.y),m.copy(b)}function F(e){!1!==n.enabled&&(0===_.length&&(n.domElement.setPointerCapture(e.pointerId),n.domElement.addEventListener("pointermove",B),n.domElement.addEventListener("pointerup",U)),function(e){_.push(e)}(e),"touch"===e.pointerType?function(e){switch(Y(e),_.length){case 1:switch(n.touches.ONE){case y.QmN.ROTATE:if(!1===n.enableRotate)return;L(),o=r.TOUCH_ROTATE;break;case y.QmN.PAN:if(!1===n.enablePan)return;R(),o=r.TOUCH_PAN;break;default:o=r.NONE}break;case 2:switch(n.touches.TWO){case y.QmN.DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;n.enableZoom&&D(),n.enablePan&&R(),o=r.TOUCH_DOLLY_PAN;break;case y.QmN.DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;n.enableZoom&&D(),n.enableRotate&&L(),o=r.TOUCH_DOLLY_ROTATE;break;default:o=r.NONE}break;default:o=r.NONE}o!==r.NONE&&n.dispatchEvent(Bn)}(e):function(e){let t;switch(e.button){case 0:t=n.mouseButtons.LEFT;break;case 1:t=n.mouseButtons.MIDDLE;break;case 2:t=n.mouseButtons.RIGHT;break;default:t=-1}switch(t){case y.RsA.DOLLY:if(!1===n.enableZoom)return;!function(e){m.set(e.clientX,e.clientY)}(e),o=r.DOLLY;break;case y.RsA.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enablePan)return;T(e),o=r.PAN}else{if(!1===n.enableRotate)return;C(e),o=r.ROTATE}break;case y.RsA.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enableRotate)return;C(e),o=r.ROTATE}else{if(!1===n.enablePan)return;T(e),o=r.PAN}break;default:o=r.NONE}o!==r.NONE&&n.dispatchEvent(Bn)}(e))}function B(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(Y(e),o){case r.TOUCH_ROTATE:if(!1===n.enableRotate)return;N(e),n.update();break;case r.TOUCH_PAN:if(!1===n.enablePan)return;I(e),n.update();break;case r.TOUCH_DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;!function(e){n.enableZoom&&z(e),n.enablePan&&I(e)}(e),n.update();break;case r.TOUCH_DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;!function(e){n.enableZoom&&z(e),n.enableRotate&&N(e)}(e),n.update();break;default:o=r.NONE}}(e):function(e){switch(o){case r.ROTATE:if(!1===n.enableRotate)return;!function(e){d.set(e.clientX,e.clientY),f.subVectors(d,h).multiplyScalar(n.rotateSpeed);const t=n.domElement;O(2*Math.PI*f.x/t.clientHeight),j(2*Math.PI*f.y/t.clientHeight),h.copy(d),n.update()}(e);break;case r.DOLLY:if(!1===n.enableZoom)return;!function(e){b.set(e.clientX,e.clientY),w.subVectors(b,m),w.y>0?M(k()):w.y<0&&A(k()),m.copy(b),n.update()}(e);break;case r.PAN:if(!1===n.enablePan)return;!function(e){g.set(e.clientX,e.clientY),v.subVectors(g,p).multiplyScalar(n.panSpeed),S(v.x,v.y),p.copy(g),n.update()}(e)}}(e))}function U(e){G(e),0===_.length&&(n.domElement.releasePointerCapture(e.pointerId),n.domElement.removeEventListener("pointermove",B),n.domElement.removeEventListener("pointerup",U)),n.dispatchEvent(Un),o=r.NONE}function $(e){G(e)}function V(e){!1!==n.enabled&&!1!==n.enableZoom&&o===r.NONE&&(e.preventDefault(),n.dispatchEvent(Bn),function(e){e.deltaY<0?A(k()):e.deltaY>0&&M(k()),n.update()}(e),n.dispatchEvent(Un))}function q(e){!1!==n.enabled&&!1!==n.enablePan&&function(e){let t=!1;switch(e.code){case n.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?j(2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):S(0,n.keyPanSpeed),t=!0;break;case n.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?j(-2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):S(0,-n.keyPanSpeed),t=!0;break;case n.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?O(2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):S(n.keyPanSpeed,0),t=!0;break;case n.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?O(-2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):S(-n.keyPanSpeed,0),t=!0}t&&(e.preventDefault(),n.update())}(e)}function H(e){!1!==n.enabled&&e.preventDefault()}function G(e){delete x[e.pointerId];for(let t=0;t<_.length;t++)if(_[t].pointerId==e.pointerId)return void _.splice(t,1)}function Y(e){let t=x[e.pointerId];void 0===t&&(t=new y.FM8,x[e.pointerId]=t),t.set(e.pageX,e.pageY)}function X(e){const t=e.pointerId===_[0].pointerId?_[1]:_[0];return x[t.pointerId]}n.domElement.addEventListener("contextmenu",H),n.domElement.addEventListener("pointerdown",F),n.domElement.addEventListener("pointercancel",$),n.domElement.addEventListener("wheel",V,{passive:!1}),this.update()}}const Vn={type:"change"};class qn extends y.pBf{constructor(e,t){super(),this.object=e,this.domElement=t,this.movementSpeed=1,this.rollSpeed=.005,this.dragToLook=!1,this.autoForward=!1;const n=this,r=1e-6,o=new y._fP,i=new y.Pa4;this.tmpQuaternion=new y._fP,this.status=0,this.moveState={up:0,down:0,left:0,right:0,forward:0,back:0,pitchUp:0,pitchDown:0,yawLeft:0,yawRight:0,rollLeft:0,rollRight:0},this.moveVector=new y.Pa4(0,0,0),this.rotationVector=new y.Pa4(0,0,0),this.keydown=function(e){if(!e.altKey){switch(e.code){case"ShiftLeft":case"ShiftRight":this.movementSpeedMultiplier=.1;break;case"KeyW":this.moveState.forward=1;break;case"KeyS":this.moveState.back=1;break;case"KeyA":this.moveState.left=1;break;case"KeyD":this.moveState.right=1;break;case"KeyR":this.moveState.up=1;break;case"KeyF":this.moveState.down=1;break;case"ArrowUp":this.moveState.pitchUp=1;break;case"ArrowDown":this.moveState.pitchDown=1;break;case"ArrowLeft":this.moveState.yawLeft=1;break;case"ArrowRight":this.moveState.yawRight=1;break;case"KeyQ":this.moveState.rollLeft=1;break;case"KeyE":this.moveState.rollRight=1}this.updateMovementVector(),this.updateRotationVector()}},this.keyup=function(e){switch(e.code){case"ShiftLeft":case"ShiftRight":this.movementSpeedMultiplier=1;break;case"KeyW":this.moveState.forward=0;break;case"KeyS":this.moveState.back=0;break;case"KeyA":this.moveState.left=0;break;case"KeyD":this.moveState.right=0;break;case"KeyR":this.moveState.up=0;break;case"KeyF":this.moveState.down=0;break;case"ArrowUp":this.moveState.pitchUp=0;break;case"ArrowDown":this.moveState.pitchDown=0;break;case"ArrowLeft":this.moveState.yawLeft=0;break;case"ArrowRight":this.moveState.yawRight=0;break;case"KeyQ":this.moveState.rollLeft=0;break;case"KeyE":this.moveState.rollRight=0}this.updateMovementVector(),this.updateRotationVector()},this.pointerdown=function(e){if(this.dragToLook)this.status++;else{switch(e.button){case 0:this.moveState.forward=1;break;case 2:this.moveState.back=1}this.updateMovementVector()}},this.pointermove=function(e){if(!this.dragToLook||this.status>0){const t=this.getContainerDimensions(),n=t.size[0]/2,r=t.size[1]/2;this.moveState.yawLeft=-(e.pageX-t.offset[0]-n)/n,this.moveState.pitchDown=(e.pageY-t.offset[1]-r)/r,this.updateRotationVector()}},this.pointerup=function(e){if(this.dragToLook)this.status--,this.moveState.yawLeft=this.moveState.pitchDown=0;else{switch(e.button){case 0:this.moveState.forward=0;break;case 2:this.moveState.back=0}this.updateMovementVector()}this.updateRotationVector()},this.update=function(e){const t=e*n.movementSpeed,a=e*n.rollSpeed;n.object.translateX(n.moveVector.x*t),n.object.translateY(n.moveVector.y*t),n.object.translateZ(n.moveVector.z*t),n.tmpQuaternion.set(n.rotationVector.x*a,n.rotationVector.y*a,n.rotationVector.z*a,1).normalize(),n.object.quaternion.multiply(n.tmpQuaternion),(i.distanceToSquared(n.object.position)>r||8*(1-o.dot(n.object.quaternion))>r)&&(n.dispatchEvent(Vn),o.copy(n.object.quaternion),i.copy(n.object.position))},this.updateMovementVector=function(){const e=this.moveState.forward||this.autoForward&&!this.moveState.back?1:0;this.moveVector.x=-this.moveState.left+this.moveState.right,this.moveVector.y=-this.moveState.down+this.moveState.up,this.moveVector.z=-e+this.moveState.back},this.updateRotationVector=function(){this.rotationVector.x=-this.moveState.pitchDown+this.moveState.pitchUp,this.rotationVector.y=-this.moveState.yawRight+this.moveState.yawLeft,this.rotationVector.z=-this.moveState.rollRight+this.moveState.rollLeft},this.getContainerDimensions=function(){return this.domElement!=document?{size:[this.domElement.offsetWidth,this.domElement.offsetHeight],offset:[this.domElement.offsetLeft,this.domElement.offsetTop]}:{size:[window.innerWidth,window.innerHeight],offset:[0,0]}},this.dispose=function(){this.domElement.removeEventListener("contextmenu",Hn),this.domElement.removeEventListener("pointerdown",s),this.domElement.removeEventListener("pointermove",a),this.domElement.removeEventListener("pointerup",u),window.removeEventListener("keydown",c),window.removeEventListener("keyup",l)};const a=this.pointermove.bind(this),s=this.pointerdown.bind(this),u=this.pointerup.bind(this),c=this.keydown.bind(this),l=this.keyup.bind(this);this.domElement.addEventListener("contextmenu",Hn),this.domElement.addEventListener("pointerdown",s),this.domElement.addEventListener("pointermove",a),this.domElement.addEventListener("pointerup",u),window.addEventListener("keydown",c),window.addEventListener("keyup",l),this.updateMovementVector(),this.updateRotationVector()}}function Hn(e){e.preventDefault()}const Gn={uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tgl_FragColor = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor.a *= opacity;\n\n\n\t\t}"};class Yn{constructor(){this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const Xn=new y.iKG(-1,1,1,-1,0,1),Kn=new y.u9r;Kn.setAttribute("position",new y.a$l([-1,3,0,-1,-1,0,3,-1,0],3)),Kn.setAttribute("uv",new y.a$l([0,2,0,0,2,0],2));class Wn{constructor(e){this._mesh=new y.Kj0(Kn,e)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,Xn)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}}class Qn extends Yn{constructor(e,t){super(),this.textureID=void 0!==t?t:"tDiffuse",e instanceof y.jyz?(this.uniforms=e.uniforms,this.material=e):e&&(this.uniforms=y.rDY.clone(e.uniforms),this.material=new y.jyz({defines:Object.assign({},e.defines),uniforms:this.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader})),this.fsQuad=new Wn(this.material)}render(e,t,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),this.fsQuad.render(e))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class Zn extends Yn{constructor(e,t){super(),this.scene=e,this.camera=t,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(e,t,n){const r=e.getContext(),o=e.state;let i,a;o.buffers.color.setMask(!1),o.buffers.depth.setMask(!1),o.buffers.color.setLocked(!0),o.buffers.depth.setLocked(!0),this.inverse?(i=0,a=1):(i=1,a=0),o.buffers.stencil.setTest(!0),o.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),o.buffers.stencil.setFunc(r.ALWAYS,i,4294967295),o.buffers.stencil.setClear(a),o.buffers.stencil.setLocked(!0),e.setRenderTarget(n),this.clear&&e.clear(),e.render(this.scene,this.camera),e.setRenderTarget(t),this.clear&&e.clear(),e.render(this.scene,this.camera),o.buffers.color.setLocked(!1),o.buffers.depth.setLocked(!1),o.buffers.stencil.setLocked(!1),o.buffers.stencil.setFunc(r.EQUAL,1,4294967295),o.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),o.buffers.stencil.setLocked(!0)}}class Jn extends Yn{constructor(){super(),this.needsSwap=!1}render(e){e.state.buffers.stencil.setLocked(!1),e.state.buffers.stencil.setTest(!1)}}class er{constructor(e,t){if(this.renderer=e,void 0===t){const n=e.getSize(new y.FM8);this._pixelRatio=e.getPixelRatio(),this._width=n.width,this._height=n.height,(t=new y.dd2(this._width*this._pixelRatio,this._height*this._pixelRatio)).texture.name="EffectComposer.rt1"}else this._pixelRatio=1,this._width=t.width,this._height=t.height;this.renderTarget1=t,this.renderTarget2=t.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new Qn(Gn),this.clock=new y.SUY}swapBuffers(){const e=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=e}addPass(e){this.passes.push(e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(e,t){this.passes.splice(t,0,e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(e){const t=this.passes.indexOf(e);-1!==t&&this.passes.splice(t,1)}isLastEnabledPass(e){for(let t=e+1;t<this.passes.length;t++)if(this.passes[t].enabled)return!1;return!0}render(e){void 0===e&&(e=this.clock.getDelta());const t=this.renderer.getRenderTarget();let n=!1;for(let r=0,o=this.passes.length;r<o;r++){const t=this.passes[r];if(!1!==t.enabled){if(t.renderToScreen=this.renderToScreen&&this.isLastEnabledPass(r),t.render(this.renderer,this.writeBuffer,this.readBuffer,e,n),t.needsSwap){if(n){const t=this.renderer.getContext(),n=this.renderer.state.buffers.stencil;n.setFunc(t.NOTEQUAL,1,4294967295),this.copyPass.render(this.renderer,this.writeBuffer,this.readBuffer,e),n.setFunc(t.EQUAL,1,4294967295)}this.swapBuffers()}void 0!==Zn&&(t instanceof Zn?n=!0:t instanceof Jn&&(n=!1))}}this.renderer.setRenderTarget(t)}reset(e){if(void 0===e){const t=this.renderer.getSize(new y.FM8);this._pixelRatio=this.renderer.getPixelRatio(),this._width=t.width,this._height=t.height,(e=this.renderTarget1.clone()).setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.renderTarget1=e,this.renderTarget2=e.clone(),this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2}setSize(e,t){this._width=e,this._height=t;const n=this._width*this._pixelRatio,r=this._height*this._pixelRatio;this.renderTarget1.setSize(n,r),this.renderTarget2.setSize(n,r);for(let o=0;o<this.passes.length;o++)this.passes[o].setSize(n,r)}setPixelRatio(e){this._pixelRatio=e,this.setSize(this._width,this._height)}dispose(){this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.copyPass.dispose()}}class tr extends Yn{constructor(e,t,n,r,o){super(),this.scene=e,this.camera=t,this.overrideMaterial=n,this.clearColor=r,this.clearAlpha=void 0!==o?o:0,this.clear=!0,this.clearDepth=!1,this.needsSwap=!1,this._oldClearColor=new y.Ilk}render(e,t,n){const r=e.autoClear;let o,i;e.autoClear=!1,void 0!==this.overrideMaterial&&(i=this.scene.overrideMaterial,this.scene.overrideMaterial=this.overrideMaterial),this.clearColor&&(e.getClearColor(this._oldClearColor),o=e.getClearAlpha(),e.setClearColor(this.clearColor,this.clearAlpha)),this.clearDepth&&e.clearDepth(),e.setRenderTarget(this.renderToScreen?null:n),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),e.render(this.scene,this.camera),this.clearColor&&e.setClearColor(this._oldClearColor,o),void 0!==this.overrideMaterial&&(this.scene.overrideMaterial=i),e.autoClear=r}}var nr=n(13102),rr=n(93542),or={Linear:{None:function(e){return e}},Quadratic:{In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}},Cubic:{In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}},Quartic:{In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}},Quintic:{In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}},Sinusoidal:{In:function(e){return 1-Math.cos(e*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return.5*(1-Math.cos(Math.PI*e))}},Exponential:{In:function(e){return 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}},Circular:{In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}},Elastic:{In:function(e){return 0===e?0:1===e?1:-Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)},Out:function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin(5*(e-.1)*Math.PI)+1},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?-.5*Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)+1}},Back:{In:function(e){var t=1.70158;return e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}},Bounce:{In:function(e){return 1-or.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?.5*or.Bounce.In(2*e):.5*or.Bounce.Out(2*e-1)+.5}}},ir="undefined"===typeof self&&"undefined"!==typeof rr&&rr.hrtime?function(){var e=rr.hrtime();return 1e3*e[0]+e[1]/1e6}:"undefined"!==typeof self&&void 0!==self.performance&&void 0!==self.performance.now?self.performance.now.bind(self.performance):void 0!==Date.now?Date.now:function(){return(new Date).getTime()},ar=function(){function e(){this._tweens={},this._tweensAddedDuringUpdate={}}return e.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map((function(t){return e._tweens[t]}))},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},e.prototype.remove=function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},e.prototype.update=function(e,t){void 0===e&&(e=ir()),void 0===t&&(t=!1);var n=Object.keys(this._tweens);if(0===n.length)return!1;for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var r=0;r<n.length;r++){var o=this._tweens[n[r]],i=!t;o&&!1===o.update(e,i)&&!t&&delete this._tweens[n[r]]}n=Object.keys(this._tweensAddedDuringUpdate)}return!0},e}(),sr={Linear:function(e,t){var n=e.length-1,r=n*t,o=Math.floor(r),i=sr.Utils.Linear;return t<0?i(e[0],e[1],r):t>1?i(e[n],e[n-1],n-r):i(e[o],e[o+1>n?n:o+1],r-o)},Bezier:function(e,t){for(var n=0,r=e.length-1,o=Math.pow,i=sr.Utils.Bernstein,a=0;a<=r;a++)n+=o(1-t,r-a)*o(t,a)*e[a]*i(r,a);return n},CatmullRom:function(e,t){var n=e.length-1,r=n*t,o=Math.floor(r),i=sr.Utils.CatmullRom;return e[0]===e[n]?(t<0&&(o=Math.floor(r=n*(1+t))),i(e[(o-1+n)%n],e[o],e[(o+1)%n],e[(o+2)%n],r-o)):t<0?e[0]-(i(e[0],e[0],e[1],e[1],-r)-e[0]):t>1?e[n]-(i(e[n],e[n],e[n-1],e[n-1],r-n)-e[n]):i(e[o?o-1:0],e[o],e[n<o+1?n:o+1],e[n<o+2?n:o+2],r-o)},Utils:{Linear:function(e,t,n){return(t-e)*n+e},Bernstein:function(e,t){var n=sr.Utils.Factorial;return n(e)/n(t)/n(e-t)},Factorial:function(){var e=[1];return function(t){var n=1;if(e[t])return e[t];for(var r=t;r>1;r--)n*=r;return e[t]=n,n}}(),CatmullRom:function(e,t,n,r,o){var i=.5*(n-e),a=.5*(r-t),s=o*o;return(2*t-2*n+i+a)*(o*s)+(-3*t+3*n-2*i-a)*s+i*o+t}}},ur=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),cr=new ar,lr=function(){function e(e,t){void 0===t&&(t=cr),this._object=e,this._group=t,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=or.Linear.None,this._interpolationFunction=sr.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._id=ur.nextId(),this._isChainStopped=!1,this._goToEnd=!1}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.to=function(e,t){return this._valuesEnd=Object.create(e),void 0!==t&&(this._duration=t),this},e.prototype.duration=function(e){return this._duration=e,this},e.prototype.start=function(e){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed)for(var t in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(t),this._valuesStart[t]=this._valuesStartRepeat[t];return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=void 0!==e?"string"===typeof e?ir()+parseFloat(e):e:ir(),this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this},e.prototype._setupProperties=function(e,t,n,r){for(var o in n){var i=e[o],a=Array.isArray(i),s=a?"array":typeof i,u=!a&&Array.isArray(n[o]);if("undefined"!==s&&"function"!==s){if(u){var c=n[o];if(0===c.length)continue;c=c.map(this._handleRelativeValue.bind(this,i)),n[o]=[i].concat(c)}if("object"!==s&&!a||!i||u)"undefined"===typeof t[o]&&(t[o]=i),a||(t[o]*=1),r[o]=u?n[o].slice().reverse():t[o]||0;else{for(var l in t[o]=a?[]:{},i)t[o][l]=i[l];r[o]=a?[]:{},this._setupProperties(i,t[o],n[o],r[o])}}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},e.prototype.pause=function(e){return void 0===e&&(e=ir()),this._isPaused||!this._isPlaying||(this._isPaused=!0,this._pauseStart=e,this._group&&this._group.remove(this)),this},e.prototype.resume=function(e){return void 0===e&&(e=ir()),this._isPaused&&this._isPlaying?(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this):this},e.prototype.stopChainedTweens=function(){for(var e=0,t=this._chainedTweens.length;e<t;e++)this._chainedTweens[e].stop();return this},e.prototype.group=function(e){return this._group=e,this},e.prototype.delay=function(e){return this._delayTime=e,this},e.prototype.repeat=function(e){return this._initialRepeat=e,this._repeat=e,this},e.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},e.prototype.yoyo=function(e){return this._yoyo=e,this},e.prototype.easing=function(e){return this._easingFunction=e,this},e.prototype.interpolation=function(e){return this._interpolationFunction=e,this},e.prototype.chain=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._chainedTweens=e,this},e.prototype.onStart=function(e){return this._onStartCallback=e,this},e.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},e.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},e.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},e.prototype.onStop=function(e){return this._onStopCallback=e,this},e.prototype.update=function(e,t){if(void 0===e&&(e=ir()),void 0===t&&(t=!0),this._isPaused)return!0;var n,r,o=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(e>o)return!1;t&&this.start(e)}if(this._goToEnd=!1,e<this._startTime)return!0;!1===this._onStartCallbackFired&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),r=(e-this._startTime)/this._duration,r=0===this._duration||r>1?1:r;var i=this._easingFunction(r);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,i),this._onUpdateCallback&&this._onUpdateCallback(this._object,r),1===r){if(this._repeat>0){for(n in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat)this._yoyo||"string"!==typeof this._valuesEnd[n]||(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=e+this._repeatDelayTime:this._startTime=e+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var a=0,s=this._chainedTweens.length;a<s;a++)this._chainedTweens[a].start(this._startTime+this._duration);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(e,t,n,r){for(var o in n)if(void 0!==t[o]){var i=t[o]||0,a=n[o],s=Array.isArray(e[o]),u=Array.isArray(a);!s&&u?e[o]=this._interpolationFunction(a,r):"object"===typeof a&&a?this._updateProperties(e[o],i,a,r):"number"===typeof(a=this._handleRelativeValue(i,a))&&(e[o]=i+(a-i)*r)}},e.prototype._handleRelativeValue=function(e,t){return"string"!==typeof t?t:"+"===t.charAt(0)||"-"===t.charAt(0)?e+parseFloat(t):parseFloat(t)},e.prototype._swapEndStartRepeatValues=function(e){var t=this._valuesStartRepeat[e],n=this._valuesEnd[e];this._valuesStartRepeat[e]="string"===typeof n?this._valuesStartRepeat[e]+parseFloat(n):this._valuesEnd[e],this._valuesEnd[e]=t},e}(),hr=ur.nextId,dr=cr,fr=dr.getAll.bind(dr),pr=dr.removeAll.bind(dr),gr=dr.add.bind(dr),vr=dr.remove.bind(dr),mr=dr.update.bind(dr),yr={Easing:or,Group:ar,Interpolation:sr,now:ir,Sequence:ur,nextId:hr,Tween:lr,VERSION:"18.6.4",getAll:fr,removeAll:pr,add:gr,remove:vr,update:mr};function br(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(l){c=!0,o=l}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||xr(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _r(e){return function(e){if(Array.isArray(e))return kr(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||xr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xr(e,t){if(e){if("string"===typeof e)return kr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kr(e,t):void 0}}function kr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".scene-nav-info {\n bottom: 5px;\n width: 100%;\n text-align: center;\n color: slategrey;\n opacity: 0.7;\n font-size: 10px;\n}\n\n.scene-tooltip {\n top: 0;\n color: lavender;\n font-size: 15px;\n}\n\n.scene-nav-info, .scene-tooltip {\n position: absolute;\n font-family: sans-serif;\n pointer-events: none;\n}\n\n.scene-container canvas:focus {\n outline: none;\n}");var Or=window.THREE?window.THREE:{WebGLRenderer:y.CP7,Scene:y.xsS,PerspectiveCamera:y.cPb,Raycaster:y.iMs,TextureLoader:y.dpR,Vector2:y.FM8,Vector3:y.Pa4,Box3:y.ZzF,Color:y.Ilk,Mesh:y.Kj0,SphereGeometry:y.xo$,MeshBasicMaterial:y.vBJ,BackSide:y._Li,EventDispatcher:y.pBf,MOUSE:y.RsA,Quaternion:y._fP,Spherical:y.$V,Clock:y.SUY},jr=Ge({props:{width:{default:window.innerWidth,onChange:function(e,t,n){isNaN(e)&&(t.width=n)}},height:{default:window.innerHeight,onChange:function(e,t,n){isNaN(e)&&(t.height=n)}},backgroundColor:{default:"#000011"},backgroundImageUrl:{},onBackgroundImageLoaded:{},showNavInfo:{default:!0},skyRadius:{default:5e4},objects:{default:[]},enablePointerInteraction:{default:!0,onChange:function(e,t){t.hoverObj=null,t.toolTipElem&&(t.toolTipElem.innerHTML="")},triggerUpdate:!1},lineHoverPrecision:{default:1,triggerUpdate:!1},hoverOrderComparator:{default:function(){return-1},triggerUpdate:!1},hoverFilter:{default:function(){return!0},triggerUpdate:!1},tooltipContent:{triggerUpdate:!1},hoverDuringDrag:{default:!1,triggerUpdate:!1},clickAfterDrag:{default:!1,triggerUpdate:!1},onHover:{default:function(){},triggerUpdate:!1},onClick:{default:function(){},triggerUpdate:!1},onRightClick:{triggerUpdate:!1}},methods:{tick:function(e){if(e.initialised){if(e.controls.update&&e.controls.update(e.clock.getDelta()),e.postProcessingComposer?e.postProcessingComposer.render():e.renderer.render(e.scene,e.camera),e.extraRenderers.forEach((function(t){return t.render(e.scene,e.camera)})),e.enablePointerInteraction){var t=null;if(e.hoverDuringDrag||!e.isPointerDragging){var n=this.intersectingObjects(e.pointerPos.x,e.pointerPos.y).filter((function(t){return e.hoverFilter(t.object)})).sort((function(t,n){return e.hoverOrderComparator(t.object,n.object)})),r=n.length?n[0]:null;t=r?r.object:null,e.intersectionPoint=r?r.point:null}t!==e.hoverObj&&(e.onHover(t,e.hoverObj),e.toolTipElem.innerHTML=t&&Ye(e.tooltipContent)(t)||"",e.hoverObj=t)}yr.update()}return this},getPointerPos:function(e){var t=e.pointerPos;return{x:t.x,y:t.y}},cameraPosition:function(e,t,n,r){var o=e.camera;if(t&&e.initialised){var i=t,a=n||{x:0,y:0,z:0};if(r){var s=Object.assign({},o.position),u=h();new yr.Tween(s).to(i,r).easing(yr.Easing.Quadratic.Out).onUpdate(c).start(),new yr.Tween(u).to(a,r/3).easing(yr.Easing.Quadratic.Out).onUpdate(l).start()}else c(i),l(a);return this}return Object.assign({},o.position,{lookAt:h()});function c(e){var t=e.x,n=e.y,r=e.z;void 0!==t&&(o.position.x=t),void 0!==n&&(o.position.y=n),void 0!==r&&(o.position.z=r)}function l(t){var n=new Or.Vector3(t.x,t.y,t.z);e.controls.target?e.controls.target=n:o.lookAt(n)}function h(){return Object.assign(new Or.Vector3(0,0,-1e3).applyQuaternion(o.quaternion).add(o.position))}},zoomToFit:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];return this.fitToBbox(this.getBbox.apply(this,o),t,n)},fitToBbox:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,o=e.camera;if(t){var i=new Or.Vector3(0,0,0),a=2*Math.max.apply(Math,_r(Object.entries(t).map((function(e){var t=wr(e,2),n=t[0],r=t[1];return Math.max.apply(Math,_r(r.map((function(e){return Math.abs(i[n]-e)}))))})))),s=(1-2*r/e.height)*o.fov,u=a/Math.atan(s*Math.PI/180),c=u/o.aspect,l=Math.max(u,c);if(l>0){var h=i.clone().sub(o.position).normalize().multiplyScalar(-l);this.cameraPosition(h,i,n)}}return this},getBbox:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0},n=new Or.Box3(new Or.Vector3(0,0,0),new Or.Vector3(0,0,0)),r=e.objects.filter(t);return r.length?(r.forEach((function(e){return n.expandByObject(e)})),Object.assign.apply(Object,_r(["x","y","z"].map((function(e){return br({},e,[n.min[e],n.max[e]])}))))):null},getScreenCoords:function(e,t,n,r){var o=new Or.Vector3(t,n,r);return o.project(this.camera()),{x:(o.x+1)*e.width/2,y:-(o.y-1)*e.height/2}},getSceneCoords:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=new Or.Vector2(t/e.width*2-1,-n/e.height*2+1),i=new Or.Raycaster;return i.setFromCamera(o,e.camera),Object.assign({},i.ray.at(r,new Or.Vector3))},intersectingObjects:function(e,t,n){var r=new Or.Vector2(t/e.width*2-1,-n/e.height*2+1),o=new Or.Raycaster;return o.params.Line.threshold=e.lineHoverPrecision,o.setFromCamera(r,e.camera),o.intersectObjects(e.objects,!0)},renderer:function(e){return e.renderer},scene:function(e){return e.scene},camera:function(e){return e.camera},postProcessingComposer:function(e){return e.postProcessingComposer},controls:function(e){return e.controls},tbControls:function(e){return e.controls}},stateInit:function(){return{scene:new Or.Scene,camera:new Or.PerspectiveCamera,clock:new Or.Clock}},init:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.controlType,o=void 0===r?"trackball":r,i=n.rendererConfig,a=void 0===i?{}:i,s=n.extraRenderers,u=void 0===s?[]:s,c=n.waitForLoadComplete,l=void 0===c||c;e.innerHTML="",e.appendChild(t.container=document.createElement("div")),t.container.className="scene-container",t.container.style.position="relative",t.container.appendChild(t.navInfo=document.createElement("div")),t.navInfo.className="scene-nav-info",t.navInfo.textContent={orbit:"Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan",trackball:"Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan",fly:"WASD: move, R|F: up | down, Q|E: roll, up|down: pitch, left|right: yaw"}[o]||"",t.navInfo.style.display=t.showNavInfo?null:"none",t.toolTipElem=document.createElement("div"),t.toolTipElem.classList.add("scene-tooltip"),t.container.appendChild(t.toolTipElem),t.pointerPos=new Or.Vector2,t.pointerPos.x=-2,t.pointerPos.y=-2,["pointermove","pointerdown"].forEach((function(e){return t.container.addEventListener(e,(function(n){if("pointerdown"===e&&(t.isPointerPressed=!0),!t.isPointerDragging&&"pointermove"===n.type&&(n.pressure>0||t.isPointerPressed)&&("touch"!==n.pointerType||void 0===n.movementX||[n.movementX,n.movementY].some((function(e){return Math.abs(e)>1})))&&(t.isPointerDragging=!0),t.enablePointerInteraction){var r=function(e){var t=e.getBoundingClientRect(),n=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop;return{top:t.top+r,left:t.left+n}}(t.container);t.pointerPos.x=n.pageX-r.left,t.pointerPos.y=n.pageY-r.top,t.toolTipElem.style.top="".concat(t.pointerPos.y,"px"),t.toolTipElem.style.left="".concat(t.pointerPos.x,"px"),t.toolTipElem.style.transform="translate(-".concat(t.pointerPos.x/t.width*100,"%, ").concat(t.height-t.pointerPos.y<100?"calc(-100% - 8px)":"21px",")")}}),{passive:!0})})),t.container.addEventListener("pointerup",(function(e){t.isPointerPressed=!1,t.isPointerDragging&&(t.isPointerDragging=!1,!t.clickAfterDrag)||requestAnimationFrame((function(){0===e.button&&t.onClick(t.hoverObj||null,e,t.intersectionPoint),2===e.button&&t.onRightClick&&t.onRightClick(t.hoverObj||null,e,t.intersectionPoint)}))}),{passive:!0,capture:!0}),t.container.addEventListener("contextmenu",(function(e){t.onRightClick&&e.preventDefault()})),t.renderer=new Or.WebGLRenderer(Object.assign({antialias:!0,alpha:!0},a)),t.renderer.setPixelRatio(Math.min(2,window.devicePixelRatio)),t.container.appendChild(t.renderer.domElement),t.extraRenderers=u,t.extraRenderers.forEach((function(e){e.domElement.style.position="absolute",e.domElement.style.top="0px",e.domElement.style.pointerEvents="none",t.container.appendChild(e.domElement)})),t.postProcessingComposer=new er(t.renderer),t.postProcessingComposer.addPass(new tr(t.scene,t.camera)),t.controls=new{trackball:zn,orbit:$n,fly:qn}[o](t.camera,t.renderer.domElement),"fly"===o&&(t.controls.movementSpeed=300,t.controls.rollSpeed=Math.PI/6,t.controls.dragToLook=!0),"trackball"!==o&&"orbit"!==o||(t.controls.minDistance=.1,t.controls.maxDistance=t.skyRadius,t.controls.addEventListener("start",(function(){t.controlsEngaged=!0})),t.controls.addEventListener("change",(function(){t.controlsEngaged&&(t.controlsDragging=!0)})),t.controls.addEventListener("end",(function(){t.controlsEngaged=!1,t.controlsDragging=!1}))),[t.renderer,t.postProcessingComposer].concat(_r(t.extraRenderers)).forEach((function(e){return e.setSize(t.width,t.height)})),t.camera.aspect=t.width/t.height,t.camera.updateProjectionMatrix(),t.camera.position.z=1e3,t.scene.add(t.skysphere=new Or.Mesh),t.skysphere.visible=!1,t.loadComplete=t.scene.visible=!l,window.scene=t.scene},update:function(e,t){if(e.width&&e.height&&(t.hasOwnProperty("width")||t.hasOwnProperty("height"))&&(e.container.style.width="".concat(e.width,"px"),e.container.style.height="".concat(e.height,"px"),[e.renderer,e.postProcessingComposer].concat(_r(e.extraRenderers)).forEach((function(t){return t.setSize(e.width,e.height)})),e.camera.aspect=e.width/e.height,e.camera.updateProjectionMatrix()),t.hasOwnProperty("skyRadius")&&e.skyRadius&&(e.controls.hasOwnProperty("maxDistance")&&t.skyRadius&&(e.controls.maxDistance=Math.min(e.controls.maxDistance,e.skyRadius)),e.camera.far=2.5*e.skyRadius,e.camera.updateProjectionMatrix(),e.skysphere.geometry=new Or.SphereGeometry(e.skyRadius)),t.hasOwnProperty("backgroundColor")){var n=(0,nr.Oq)(e.backgroundColor).alpha;void 0===n&&(n=1),e.renderer.setClearColor(new Or.Color((0,nr.jb)(1,e.backgroundColor)),n)}function r(){e.loadComplete=e.scene.visible=!0}t.hasOwnProperty("backgroundImageUrl")&&(e.backgroundImageUrl?(new Or.TextureLoader).load(e.backgroundImageUrl,(function(t){e.skysphere.material=new Or.MeshBasicMaterial({map:t,side:Or.BackSide}),e.skysphere.visible=!0,e.onBackgroundImageLoaded&&setTimeout(e.onBackgroundImageLoaded),!e.loadComplete&&r()})):(e.skysphere.visible=!1,e.skysphere.material.map=null,!e.loadComplete&&r())),t.hasOwnProperty("showNavInfo")&&(e.navInfo.style.display=e.showNavInfo?null:"none"),t.hasOwnProperty("objects")&&((t.objects||[]).forEach((function(t){return e.scene.remove(t)})),e.objects.forEach((function(t){return e.scene.add(t)})))}});function Er(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Er(Object(n),!0).forEach((function(t){Sr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Er(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Sr(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mr(e){return function(e){if(Array.isArray(e))return Ar(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return Ar(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ar(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ar(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Cr(e,t){var n=new t;return{linkProp:function(t){return{default:n[t](),onChange:function(n,r){r[e][t](n)},triggerUpdate:!1}},linkMethod:function(t){return function(n){for(var r=n[e],o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];var s=r[t].apply(r,i);return s===r?this:s}}}}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".graph-info-msg {\n top: 50%;\n width: 100%;\n text-align: center;\n color: lavender;\n opacity: 0.7;\n font-size: 22px;\n position: absolute;\n font-family: Sans-serif;\n}\n\n.scene-container .clickable {\n cursor: pointer;\n}\n\n.scene-container .grabbable {\n cursor: move;\n cursor: grab;\n cursor: -moz-grab;\n cursor: -webkit-grab;\n}\n\n.scene-container .grabbable:active {\n cursor: grabbing;\n cursor: -moz-grabbing;\n cursor: -webkit-grabbing;\n}");var Tr=window.THREE?window.THREE:{AmbientLight:y.Mig,DirectionalLight:y.Ox3,Vector3:y.Pa4},Lr=Cr("forceGraph",Rn),Rr=Object.assign.apply(Object,Mr(["jsonUrl","graphData","numDimensions","dagMode","dagLevelDistance","dagNodeFilter","onDagError","nodeRelSize","nodeId","nodeVal","nodeResolution","nodeColor","nodeAutoColorBy","nodeOpacity","nodeVisibility","nodeThreeObject","nodeThreeObjectExtend","linkSource","linkTarget","linkVisibility","linkColor","linkAutoColorBy","linkOpacity","linkWidth","linkResolution","linkCurvature","linkCurveRotation","linkMaterial","linkThreeObject","linkThreeObjectExtend","linkPositionUpdate","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalArrowResolution","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleResolution","forceEngine","d3AlphaDecay","d3VelocityDecay","d3AlphaMin","ngraphPhysics","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map((function(e){return Sr({},e,Lr.linkProp(e))})))),Dr=Object.assign.apply(Object,Mr(["refresh","getGraphBbox","d3Force","d3ReheatSimulation","emitParticle"].map((function(e){return Sr({},e,Lr.linkMethod(e))})))),Nr=Cr("renderObjs",jr),Ir=Object.assign.apply(Object,Mr(["width","height","backgroundColor","showNavInfo","enablePointerInteraction"].map((function(e){return Sr({},e,Nr.linkProp(e))})))),zr=Object.assign.apply(Object,Mr(["cameraPosition","postProcessingComposer"].map((function(e){return Sr({},e,Nr.linkMethod(e))}))).concat([{graph2ScreenCoords:Nr.linkMethod("getScreenCoords"),screen2GraphCoords:Nr.linkMethod("getSceneCoords")}])),Fr=Ge({props:Pr(Pr({nodeLabel:{default:"name",triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:1,onChange:function(e,t){return t.renderObjs.lineHoverPrecision(e)},triggerUpdate:!1},enableNavigationControls:{default:!0,onChange:function(e,t){var n=t.renderObjs.controls();n&&(n.enabled=e,e&&n.domElement&&n.domElement.dispatchEvent(new PointerEvent("pointerup")))},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{triggerUpdate:!1},onLinkClick:{triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{triggerUpdate:!1},onBackgroundClick:{triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1}},Rr),Ir),methods:Pr(Pr({zoomToFit:function(e,t,n){for(var r,o=arguments.length,i=new Array(o>3?o-3:0),a=3;a<o;a++)i[a-3]=arguments[a];return e.renderObjs.fitToBbox((r=e.forceGraph).getGraphBbox.apply(r,i),t,n),this},pauseAnimation:function(e){return null!==e.animationFrameRequestId&&(cancelAnimationFrame(e.animationFrameRequestId),e.animationFrameRequestId=null),this},resumeAnimation:function(e){return null===e.animationFrameRequestId&&this._animationCycle(),this},_animationCycle:function(e){e.enablePointerInteraction&&(this.renderer().domElement.style.cursor=null),e.forceGraph.tickFrame(),e.renderObjs.tick(),e.animationFrameRequestId=requestAnimationFrame(this._animationCycle)},scene:function(e){return e.renderObjs.scene()},camera:function(e){return e.renderObjs.camera()},renderer:function(e){return e.renderObjs.renderer()},controls:function(e){return e.renderObjs.controls()},tbControls:function(e){return e.renderObjs.tbControls()},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},Dr),zr),stateInit:function(e){var t=e.controlType,n=e.rendererConfig,r=e.extraRenderers;return{forceGraph:new Rn,renderObjs:jr({controlType:t,rendererConfig:n,extraRenderers:r})}},init:function(e,t){e.innerHTML="",e.appendChild(t.container=document.createElement("div")),t.container.style.position="relative";var n=document.createElement("div");t.container.appendChild(n),t.renderObjs(n);var r,o=t.renderObjs.camera(),i=t.renderObjs.renderer(),a=t.renderObjs.controls();a.enabled=!!t.enableNavigationControls,t.lastSetCameraZ=o.position.z,t.container.appendChild(r=document.createElement("div")),r.className="graph-info-msg",r.textContent="",t.forceGraph.onLoading((function(){r.textContent="Loading..."})).onFinishLoading((function(){r.textContent=""})).onUpdate((function(){t.graphData=t.forceGraph.graphData(),0===o.position.x&&0===o.position.y&&o.position.z===t.lastSetCameraZ&&t.graphData.nodes.length&&(o.lookAt(t.forceGraph.position),t.lastSetCameraZ=o.position.z=170*Math.cbrt(t.graphData.nodes.length))})).onFinishUpdate((function(){if(t._dragControls){var e=t.graphData.nodes.find((function(e){return e.__initialFixedPos&&!e.__disposeControlsAfterDrag}));e?e.__disposeControlsAfterDrag=!0:t._dragControls.dispose(),t._dragControls=void 0}if(t.enableNodeDrag&&t.enablePointerInteraction&&"d3"===t.forceEngine){var n=t._dragControls=new E(t.graphData.nodes.map((function(e){return e.__threeObj})).filter((function(e){return e})),o,i.domElement);n.addEventListener("dragstart",(function(e){a.enabled=!1,e.object.__initialPos=e.object.position.clone(),e.object.__prevPos=e.object.position.clone();var t=Br(e.object).__data;!t.__initialFixedPos&&(t.__initialFixedPos={fx:t.fx,fy:t.fy,fz:t.fz}),!t.__initialPos&&(t.__initialPos={x:t.x,y:t.y,z:t.z}),["x","y","z"].forEach((function(e){return t["f".concat(e)]=t[e]})),i.domElement.classList.add("grabbable")})),n.addEventListener("drag",(function(e){var n=Br(e.object);if(!e.object.hasOwnProperty("__graphObjType")){var r=e.object.__initialPos,o=e.object.__prevPos,i=e.object.position;n.position.add(i.clone().sub(o)),o.copy(i),i.copy(r)}var a=n.__data,s=n.position,u={x:s.x-a.x,y:s.y-a.y,z:s.z-a.z};["x","y","z"].forEach((function(e){return a["f".concat(e)]=a[e]=s[e]})),t.forceGraph.d3AlphaTarget(.3).resetCountdown(),a.__dragged=!0,t.onNodeDrag(a,u)})),n.addEventListener("dragend",(function(e){delete e.object.__initialPos,delete e.object.__prevPos;var r=Br(e.object).__data;r.__disposeControlsAfterDrag&&(n.dispose(),delete r.__disposeControlsAfterDrag);var o=r.__initialFixedPos,s=r.__initialPos,u={x:s.x-r.x,y:s.y-r.y,z:s.z-r.z};o&&(["x","y","z"].forEach((function(e){var t="f".concat(e);void 0===o[t]&&delete r[t]})),delete r.__initialFixedPos,delete r.__initialPos,r.__dragged&&(delete r.__dragged,t.onNodeDragEnd(r,u))),t.forceGraph.d3AlphaTarget(0).resetCountdown(),t.enableNavigationControls&&(a.enabled=!0,a.domElement&&a.domElement.ownerDocument&&a.domElement.ownerDocument.dispatchEvent(new PointerEvent("pointerup",{pointerType:"touch"}))),i.domElement.classList.remove("grabbable")}))}})),t.renderObjs.objects([new Tr.AmbientLight(12303291),new Tr.DirectionalLight(16777215,.6),t.forceGraph]).hoverOrderComparator((function(e,t){var n=Br(e);if(!n)return 1;var r=Br(t);if(!r)return-1;var o=function(e){return"node"===e.__graphObjType};return o(r)-o(n)})).tooltipContent((function(e){var n=Br(e);return n&&Ye(t["".concat(n.__graphObjType,"Label")])(n.__data)||""})).hoverDuringDrag(!1).onHover((function(e){var n=Br(e);if(n!==t.hoverObj){var r=t.hoverObj?t.hoverObj.__graphObjType:null,o=t.hoverObj?t.hoverObj.__data:null,a=n?n.__graphObjType:null,s=n?n.__data:null;if(r&&r!==a){var u=t["on".concat("node"===r?"Node":"Link","Hover")];u&&u(null,o)}if(a){var c=t["on".concat("node"===a?"Node":"Link","Hover")];c&&c(s,r===a?o:null)}i.domElement.classList[n&&t["on".concat("node"===a?"Node":"Link","Click")]||!n&&t.onBackgroundClick?"add":"remove"]("clickable"),t.hoverObj=n}})).clickAfterDrag(!1).onClick((function(e,n){var r=Br(e);if(r){var o=t["on".concat("node"===r.__graphObjType?"Node":"Link","Click")];o&&o(r.__data,n)}else t.onBackgroundClick&&t.onBackgroundClick(n)})).onRightClick((function(e,n){var r=Br(e);if(r){var o=t["on".concat("node"===r.__graphObjType?"Node":"Link","RightClick")];o&&o(r.__data,n)}else t.onBackgroundRightClick&&t.onBackgroundRightClick(n)})),this._animationCycle()}});function Br(e){for(var t=e;t&&!t.hasOwnProperty("__graphObjType");)t=t.parent;return t}var Ur=n(13980),$r=n.n(Ur);const Vr={width:$r().number,height:$r().number,graphData:$r().shape({nodes:$r().arrayOf($r().object).isRequired,links:$r().arrayOf($r().object).isRequired}),backgroundColor:$r().string,nodeRelSize:$r().number,nodeId:$r().string,nodeLabel:$r().oneOfType([$r().string,$r().func]),nodeVal:$r().oneOfType([$r().number,$r().string,$r().func]),nodeVisibility:$r().oneOfType([$r().bool,$r().string,$r().func]),nodeColor:$r().oneOfType([$r().string,$r().func]),nodeAutoColorBy:$r().oneOfType([$r().string,$r().func]),onNodeHover:$r().func,onNodeClick:$r().func,linkSource:$r().string,linkTarget:$r().string,linkLabel:$r().oneOfType([$r().string,$r().func]),linkVisibility:$r().oneOfType([$r().bool,$r().string,$r().func]),linkColor:$r().oneOfType([$r().string,$r().func]),linkAutoColorBy:$r().oneOfType([$r().string,$r().func]),linkWidth:$r().oneOfType([$r().number,$r().string,$r().func]),linkCurvature:$r().oneOfType([$r().number,$r().string,$r().func]),linkDirectionalArrowLength:$r().oneOfType([$r().number,$r().string,$r().func]),linkDirectionalArrowColor:$r().oneOfType([$r().string,$r().func]),linkDirectionalArrowRelPos:$r().oneOfType([$r().number,$r().string,$r().func]),linkDirectionalParticles:$r().oneOfType([$r().number,$r().string,$r().func]),linkDirectionalParticleSpeed:$r().oneOfType([$r().number,$r().string,$r().func]),linkDirectionalParticleWidth:$r().oneOfType([$r().number,$r().string,$r().func]),linkDirectionalParticleColor:$r().oneOfType([$r().string,$r().func]),onLinkHover:$r().func,onLinkClick:$r().func,dagMode:$r().oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:$r().number,dagNodeFilter:$r().func,onDagError:$r().func,d3AlphaMin:$r().number,d3AlphaDecay:$r().number,d3VelocityDecay:$r().number,warmupTicks:$r().number,cooldownTicks:$r().number,cooldownTime:$r().number,onEngineTick:$r().func,onEngineStop:$r().func,getGraphBbox:$r().func},qr={zoomToFit:$r().func,onNodeRightClick:$r().func,onNodeDrag:$r().func,onNodeDragEnd:$r().func,onLinkRightClick:$r().func,linkHoverPrecision:$r().number,onBackgroundClick:$r().func,onBackgroundRightClick:$r().func,enablePointerInteraction:$r().bool,enableNodeDrag:$r().bool},Hr={showNavInfo:$r().bool,nodeOpacity:$r().number,nodeResolution:$r().number,nodeThreeObject:$r().oneOfType([$r().object,$r().string,$r().func]),nodeThreeObjectExtend:$r().oneOfType([$r().bool,$r().string,$r().func]),linkOpacity:$r().number,linkResolution:$r().number,linkCurveRotation:$r().oneOfType([$r().number,$r().string,$r().func]),linkMaterial:$r().oneOfType([$r().object,$r().string,$r().func]),linkThreeObject:$r().oneOfType([$r().object,$r().string,$r().func]),linkThreeObjectExtend:$r().oneOfType([$r().bool,$r().string,$r().func]),linkPositionUpdate:$r().func,linkDirectionalArrowResolution:$r().number,linkDirectionalParticleResolution:$r().number,forceEngine:$r().oneOf(["d3","ngraph"]),ngraphPhysics:$r().object,numDimensions:$r().oneOf([1,2,3])};Object.assign({},Vr,qr,{linkLineDash:$r().oneOfType([$r().arrayOf($r().number),$r().string,$r().func]),nodeCanvasObjectMode:$r().oneOfType([$r().string,$r().func]),nodeCanvasObject:$r().func,nodePointerAreaPaint:$r().func,linkCanvasObjectMode:$r().oneOfType([$r().string,$r().func]),linkCanvasObject:$r().func,linkPointerAreaPaint:$r().func,autoPauseRedraw:$r().bool,minZoom:$r().number,maxZoom:$r().number,enableZoomInteraction:$r().bool,enablePanInteraction:$r().bool,onZoom:$r().func,onZoomEnd:$r().func,onRenderFramePre:$r().func,onRenderFramePost:$r().func});const Gr=Object.assign({},Vr,qr,Hr,{enableNavigationControls:$r().bool,controlType:$r().oneOf(["trackball","orbit","fly"]),rendererConfig:$r().object,extraRenderers:$r().arrayOf($r().shape({render:$r().func.isRequired}))});Object.assign({},Vr,Hr,{nodeDesc:$r().oneOfType([$r().string,$r().func]),linkDesc:$r().oneOfType([$r().string,$r().func])}),Object.assign({},Vr,Hr,{markerAttrs:$r().object,yOffset:$r().number,glScale:$r().number});const Yr=function(e,t){var n="object"===d(t)?t:{wrapperElementType:t,methodNames:(arguments.length<=2?void 0:arguments[2])||void 0,initPropNames:(arguments.length<=3?void 0:arguments[3])||void 0},o=n.wrapperElementType,i=void 0===o?"div":o,a=n.nodeMapper,s=void 0===a?function(e){return e}:a,u=n.methodNames,l=void 0===u?[]:u,g=n.initPropNames,v=void 0===g?[]:g;return(0,r.forwardRef)((function(t,n){var o=(0,r.useRef)(),a=f((0,r.useState)({}),2),u=a[0],d=a[1];(0,r.useEffect)((function(){return d(t)}));var g=(0,r.useMemo)((function(){var n=h()(v.filter((function(e){return t.hasOwnProperty(e)})).map((function(e){return[e,t[e]]})));return e(n)}),[]);(0,r.useLayoutEffect)((function(){g(s(o.current))}),[]),m((function(){return g._destructor instanceof Function?g._destructor:void 0}),[]);var y=(0,r.useCallback)((function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return g[e]instanceof Function?g[e].apply(g,n):void 0}),[g]),b=c(t,[].concat(p(l),p(v)));return Object.keys(b).filter((function(e){return u[e]!==t[e]})).forEach((function(e){return y(e,t[e])})),(0,r.useImperativeHandle)(n,(function(){return h()(l.map((function(e){return[e,function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return y.apply(void 0,[e].concat(n))}]})))})),r.createElement(i,{ref:o})}))}(Fr,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","cameraPosition","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords","postProcessingComposer","scene","camera","renderer","controls","refresh"],initPropNames:["controlType","rendererConfig","extraRenderers"]});Yr.displayName="ForceGraph3D",Yr.propTypes=Gr}}]);
|