beads-map 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/.next/BUILD_ID +1 -0
  2. package/.next/app-build-manifest.json +27 -0
  3. package/.next/app-path-routes-manifest.json +1 -0
  4. package/.next/build-manifest.json +32 -0
  5. package/.next/export-marker.json +1 -0
  6. package/.next/images-manifest.json +1 -0
  7. package/.next/next-minimal-server.js.nft.json +1 -0
  8. package/.next/next-server.js.nft.json +1 -0
  9. package/.next/package.json +1 -0
  10. package/.next/prerender-manifest.json +1 -0
  11. package/.next/react-loadable-manifest.json +8 -0
  12. package/.next/required-server-files.json +1 -0
  13. package/.next/routes-manifest.json +1 -0
  14. package/.next/server/app/_not-found/page.js +1 -0
  15. package/.next/server/app/_not-found/page.js.nft.json +1 -0
  16. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
  17. package/.next/server/app/_not-found.html +1 -0
  18. package/.next/server/app/_not-found.meta +6 -0
  19. package/.next/server/app/_not-found.rsc +10 -0
  20. package/.next/server/app/api/beads/route.js +8 -0
  21. package/.next/server/app/api/beads/route.js.nft.json +1 -0
  22. package/.next/server/app/api/beads/stream/route.js +10 -0
  23. package/.next/server/app/api/beads/stream/route.js.nft.json +1 -0
  24. package/.next/server/app/api/beads.body +1 -0
  25. package/.next/server/app/api/beads.meta +1 -0
  26. package/.next/server/app/api/config/route.js +8 -0
  27. package/.next/server/app/api/config/route.js.nft.json +1 -0
  28. package/.next/server/app/api/config.body +1 -0
  29. package/.next/server/app/api/config.meta +1 -0
  30. package/.next/server/app/api/login/route.js +1 -0
  31. package/.next/server/app/api/login/route.js.nft.json +1 -0
  32. package/.next/server/app/api/logout/route.js +1 -0
  33. package/.next/server/app/api/logout/route.js.nft.json +1 -0
  34. package/.next/server/app/api/oauth/callback/route.js +1 -0
  35. package/.next/server/app/api/oauth/callback/route.js.nft.json +1 -0
  36. package/.next/server/app/api/oauth/client-metadata.json/route.js +1 -0
  37. package/.next/server/app/api/oauth/client-metadata.json/route.js.nft.json +1 -0
  38. package/.next/server/app/api/oauth/jwks.json/route.js +1 -0
  39. package/.next/server/app/api/oauth/jwks.json/route.js.nft.json +1 -0
  40. package/.next/server/app/api/records/route.js +1 -0
  41. package/.next/server/app/api/records/route.js.nft.json +1 -0
  42. package/.next/server/app/api/status/route.js +1 -0
  43. package/.next/server/app/api/status/route.js.nft.json +1 -0
  44. package/.next/server/app/index.html +1 -0
  45. package/.next/server/app/index.meta +5 -0
  46. package/.next/server/app/index.rsc +8 -0
  47. package/.next/server/app/page.js +24 -0
  48. package/.next/server/app/page.js.nft.json +1 -0
  49. package/.next/server/app/page_client-reference-manifest.js +1 -0
  50. package/.next/server/app-paths-manifest.json +14 -0
  51. package/.next/server/chunks/247.js +12 -0
  52. package/.next/server/chunks/251.js +2 -0
  53. package/.next/server/chunks/29.js +1 -0
  54. package/.next/server/chunks/343.js +1 -0
  55. package/.next/server/chunks/533.js +38 -0
  56. package/.next/server/chunks/590.js +6 -0
  57. package/.next/server/chunks/615.js +15 -0
  58. package/.next/server/chunks/696.js +25 -0
  59. package/.next/server/chunks/719.js +2 -0
  60. package/.next/server/chunks/739.js +1 -0
  61. package/.next/server/chunks/font-manifest.json +1 -0
  62. package/.next/server/font-manifest.json +1 -0
  63. package/.next/server/functions-config-manifest.json +1 -0
  64. package/.next/server/interception-route-rewrite-manifest.js +1 -0
  65. package/.next/server/middleware-build-manifest.js +1 -0
  66. package/.next/server/middleware-manifest.json +6 -0
  67. package/.next/server/middleware-react-loadable-manifest.js +1 -0
  68. package/.next/server/next-font-manifest.js +1 -0
  69. package/.next/server/next-font-manifest.json +1 -0
  70. package/.next/server/pages/404.html +1 -0
  71. package/.next/server/pages/500.html +1 -0
  72. package/.next/server/pages/_app.js +1 -0
  73. package/.next/server/pages/_app.js.nft.json +1 -0
  74. package/.next/server/pages/_document.js +1 -0
  75. package/.next/server/pages/_document.js.nft.json +1 -0
  76. package/.next/server/pages/_error.js +1 -0
  77. package/.next/server/pages/_error.js.nft.json +1 -0
  78. package/.next/server/pages-manifest.json +1 -0
  79. package/.next/server/server-reference-manifest.js +1 -0
  80. package/.next/server/server-reference-manifest.json +1 -0
  81. package/.next/server/webpack-runtime.js +1 -0
  82. package/.next/static/99eOjoTtoO32H-c1faxZ5/_buildManifest.js +1 -0
  83. package/.next/static/99eOjoTtoO32H-c1faxZ5/_ssgManifest.js +1 -0
  84. package/.next/static/chunks/149.a3e3a5dc03e21086.js +1 -0
  85. package/.next/static/chunks/2200cc46-7c93a0e00b0bb825.js +1 -0
  86. package/.next/static/chunks/666-fb778298a77f3754.js +1 -0
  87. package/.next/static/chunks/945-bf736d0119e7437b.js +2 -0
  88. package/.next/static/chunks/app/_not-found/page-b568fd9238f85f27.js +1 -0
  89. package/.next/static/chunks/app/layout-13e3cdaaa416edb6.js +1 -0
  90. package/.next/static/chunks/app/page-49d569c912d5af9d.js +1 -0
  91. package/.next/static/chunks/framework-6e06c675866dc992.js +1 -0
  92. package/.next/static/chunks/main-62aa0e18004db880.js +1 -0
  93. package/.next/static/chunks/main-app-8b0c4a1007dbb7f4.js +1 -0
  94. package/.next/static/chunks/pages/_app-0c3037849002a4aa.js +1 -0
  95. package/.next/static/chunks/pages/_error-a647cd2c75dc4dc7.js +1 -0
  96. package/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  97. package/.next/static/chunks/webpack-c8b9ebfd35ae1d92.js +1 -0
  98. package/.next/static/css/10ef08b24212fe36.css +3 -0
  99. package/README.md +243 -0
  100. package/app/api/beads/route.ts +27 -0
  101. package/app/api/beads/stream/route.ts +83 -0
  102. package/app/api/config/route.ts +46 -0
  103. package/app/api/login/route.ts +42 -0
  104. package/app/api/logout/route.ts +14 -0
  105. package/app/api/oauth/callback/route.ts +94 -0
  106. package/app/api/oauth/client-metadata.json/route.ts +33 -0
  107. package/app/api/oauth/jwks.json/route.ts +32 -0
  108. package/app/api/records/route.ts +168 -0
  109. package/app/api/status/route.ts +25 -0
  110. package/app/globals.css +192 -0
  111. package/app/layout.tsx +30 -0
  112. package/app/page.tsx +1151 -0
  113. package/bin/beads-map.mjs +175 -0
  114. package/components/AllCommentsPanel.tsx +265 -0
  115. package/components/AuthButton.tsx +197 -0
  116. package/components/BeadsGraph.tsx +1539 -0
  117. package/components/CommentTooltip.tsx +310 -0
  118. package/components/GraphStats.tsx +121 -0
  119. package/components/HeartIcon.tsx +33 -0
  120. package/components/NodeDetail.tsx +741 -0
  121. package/components/StatusLegend.tsx +99 -0
  122. package/components/TimelineBar.tsx +116 -0
  123. package/hooks/useBeadsComments.ts +412 -0
  124. package/lib/agent.ts +29 -0
  125. package/lib/auth/client.ts +221 -0
  126. package/lib/auth.tsx +159 -0
  127. package/lib/diff-beads.ts +125 -0
  128. package/lib/discover.ts +228 -0
  129. package/lib/env.ts +28 -0
  130. package/lib/parse-beads.ts +232 -0
  131. package/lib/session.ts +52 -0
  132. package/lib/timeline.ts +138 -0
  133. package/lib/types.ts +202 -0
  134. package/lib/utils.ts +25 -0
  135. package/lib/watch-beads.ts +97 -0
  136. package/next.config.mjs +4 -0
  137. package/package.json +75 -0
  138. package/postcss.config.mjs +9 -0
  139. package/public/image.png +0 -0
  140. package/scripts/generate-jwk.js +38 -0
  141. package/tailwind.config.ts +41 -0
  142. package/tsconfig.json +24 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[149],{3769:function(e,n,r){"use strict";var i=r(3138);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,n,r,o,a,u){if(u!==i){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function n(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:a,resetWarningCache:o};return r.PropTypes=r,r}},6853:function(e,n,r){e.exports=r(3769)()},3138:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},3149:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return og}});var i=r(8496);function o(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var i,o,a,u,s=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,0===n){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=a.call(r)).done)&&(s.push(i.value),s.length!==n);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(c)throw o}}return s}}(e,n)||a(e,n)||function(){throw 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,n){if(e){if("string"==typeof e)return u(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,n)}}function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}var s=function(e,n){var r,i=new Set(n);return Object.assign.apply(Object,[{}].concat(function(e){if(Array.isArray(e))return u(e)}(r=Object.entries(e).filter(function(e){var n=o(e,1)[0];return!i.has(n)}).map(function(e){var n,r,i,a=o(e,2),u=a[0],s=a[1];return r={},(i="symbol"==typeof(n=function(e,n){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,n||"default");if("object"!=typeof i)return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(i=u,"string"))?n:String(n))in r?Object.defineProperty(r,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):r[i]=s,r}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||a(r)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))};function l(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function c(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||f(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,n){if(e){if("string"==typeof e)return l(e,n);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,n):void 0}}function h(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.useEffect,o=(0,i.useRef)(),a=(0,i.useRef)(!1),u=(0,i.useRef)(!1),s=function(e){if(Array.isArray(e))return e}(n=(0,i.useState)(0))||function(e,n){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var i,o,a,u,s=[],l=!0,c=!1;try{for(a=(r=r.call(e)).next;!(l=(i=a.call(r)).done)&&(s.push(i.value),2!==s.length);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(c)throw o}}return s}}(n,2)||f(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();s[0];var l=s[1];a.current&&(u.current=!0),r(function(){return a.current||(o.current=e(),a.current=!0),l(function(e){return e+1}),function(){u.current&&o.current&&o.current()}},[])}function p(){}function d(e){return null==e?p:function(){return this.querySelector(e)}}function g(){return[]}function y(e){return null==e?g:function(){return this.querySelectorAll(e)}}function _(e){return function(){return this.matches(e)}}function v(e){return function(n){return n.matches(e)}}var m=Array.prototype.find;function b(){return this.firstElementChild}var x=Array.prototype.filter;function w(){return Array.from(this.children)}function k(e){return Array(e.length)}function M(e,n){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=n}function A(e,n,r,i,o,a){for(var u,s=0,l=n.length,c=a.length;s<c;++s)(u=n[s])?(u.__data__=a[s],i[s]=u):r[s]=new M(e,a[s]);for(;s<l;++s)(u=n[s])&&(o[s]=u)}function S(e,n,r,i,o,a,u){var s,l,c,f=new Map,h=n.length,p=a.length,d=Array(h);for(s=0;s<h;++s)(l=n[s])&&(d[s]=c=u.call(l,l.__data__,s,n)+"",f.has(c)?o[s]=l:f.set(c,l));for(s=0;s<p;++s)c=u.call(e,a[s],s,a)+"",(l=f.get(c))?(i[s]=l,l.__data__=a[s],f.delete(c)):r[s]=new M(e,a[s]);for(s=0;s<h;++s)(l=n[s])&&f.get(d[s])===l&&(o[s]=l)}function z(e){return e.__data__}function O(e,n){return e<n?-1:e>n?1:e>=n?0:NaN}M.prototype={constructor:M,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,n){return this._parent.insertBefore(e,n)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};var C="http://www.w3.org/1999/xhtml",E={svg:"http://www.w3.org/2000/svg",xhtml:C,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function P(e){var n=e+="",r=n.indexOf(":");return r>=0&&"xmlns"!==(n=e.slice(0,r))&&(e=e.slice(r+1)),E.hasOwnProperty(n)?{space:E[n],local:e}:e}function T(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function j(e,n){return e.style.getPropertyValue(n)||T(e).getComputedStyle(e,null).getPropertyValue(n)}function N(e){return e.trim().split(/^|\s+/)}function R(e){return e.classList||new D(e)}function D(e){this._node=e,this._names=N(e.getAttribute("class")||"")}function I(e,n){for(var r=R(e),i=-1,o=n.length;++i<o;)r.add(n[i])}function U(e,n){for(var r=R(e),i=-1,o=n.length;++i<o;)r.remove(n[i])}function F(){this.textContent=""}function L(){this.innerHTML=""}function q(){this.nextSibling&&this.parentNode.appendChild(this)}function B(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function $(e){var n=P(e);return(n.local?function(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}:function(e){return function(){var n=this.ownerDocument,r=this.namespaceURI;return r===C&&n.documentElement.namespaceURI===C?n.createElement(e):n.createElementNS(r,e)}})(n)}function H(){return null}function V(){var e=this.parentNode;e&&e.removeChild(this)}function G(){var e=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function X(){var e=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function W(e){return function(){var n=this.__on;if(n){for(var r,i=0,o=-1,a=n.length;i<a;++i)(r=n[i],e.type&&r.type!==e.type||r.name!==e.name)?n[++o]=r:this.removeEventListener(r.type,r.listener,r.options);++o?n.length=o:delete this.__on}}}function Y(e,n,r){return function(){var i,o=this.__on,a=function(e){n.call(this,e,this.__data__)};if(o){for(var u=0,s=o.length;u<s;++u)if((i=o[u]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=r),i.value=n;return}}this.addEventListener(e.type,a,r),i={type:e.type,name:e.name,value:n,listener:a,options:r},o?o.push(i):this.__on=[i]}}function Z(e,n,r){var i=T(e),o=i.CustomEvent;"function"==typeof o?o=new o(n,r):(o=i.document.createEvent("Event"),r?(o.initEvent(n,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(n,!1,!1)),e.dispatchEvent(o)}D.prototype={add:function(e){0>this._names.indexOf(e)&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var n=this._names.indexOf(e);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var Q=[null];function K(e,n){this._groups=e,this._parents=n}function J(){return new K([[document.documentElement]],Q)}function tt(e){return"string"==typeof e?new K([[document.querySelector(e)]],[document.documentElement]):new K([[e]],Q)}K.prototype=J.prototype={constructor:K,select:function(e){"function"!=typeof e&&(e=d(e));for(var n=this._groups,r=n.length,i=Array(r),o=0;o<r;++o)for(var a,u,s=n[o],l=s.length,c=i[o]=Array(l),f=0;f<l;++f)(a=s[f])&&(u=e.call(a,a.__data__,f,s))&&("__data__"in a&&(u.__data__=a.__data__),c[f]=u);return new K(i,this._parents)},selectAll:function(e){if("function"==typeof e){var n;n=e,e=function(){var e;return e=n.apply(this,arguments),null==e?[]:Array.isArray(e)?e:Array.from(e)}}else e=y(e);for(var r=this._groups,i=r.length,o=[],a=[],u=0;u<i;++u)for(var s,l=r[u],c=l.length,f=0;f<c;++f)(s=l[f])&&(o.push(e.call(s,s.__data__,f,l)),a.push(s));return new K(o,a)},selectChild:function(e){var n;return this.select(null==e?b:(n="function"==typeof e?e:v(e),function(){return m.call(this.children,n)}))},selectChildren:function(e){var n;return this.selectAll(null==e?w:(n="function"==typeof e?e:v(e),function(){return x.call(this.children,n)}))},filter:function(e){"function"!=typeof e&&(e=_(e));for(var n=this._groups,r=n.length,i=Array(r),o=0;o<r;++o)for(var a,u=n[o],s=u.length,l=i[o]=[],c=0;c<s;++c)(a=u[c])&&e.call(a,a.__data__,c,u)&&l.push(a);return new K(i,this._parents)},data:function(e,n){if(!arguments.length)return Array.from(this,z);var r=n?S:A,i=this._parents,o=this._groups;"function"!=typeof e&&(m=e,e=function(){return m});for(var a=o.length,u=Array(a),s=Array(a),l=Array(a),c=0;c<a;++c){var f=i[c],h=o[c],p=h.length,d="object"==typeof(v=e.call(f,f&&f.__data__,c,i))&&"length"in v?v:Array.from(v),g=d.length,y=s[c]=Array(g),_=u[c]=Array(g);r(f,h,y,_,l[c]=Array(p),d,n);for(var v,m,b,x,w=0,k=0;w<g;++w)if(b=y[w]){for(w>=k&&(k=w+1);!(x=_[k])&&++k<g;);b._next=x||null}}return(u=new K(u,i))._enter=s,u._exit=l,u},enter:function(){return new K(this._enter||this._groups.map(k),this._parents)},exit:function(){return new K(this._exit||this._groups.map(k),this._parents)},join:function(e,n,r){var i=this.enter(),o=this,a=this.exit();return"function"==typeof e?(i=e(i))&&(i=i.selection()):i=i.append(e+""),null!=n&&(o=n(o))&&(o=o.selection()),null==r?a.remove():r(a),i&&o?i.merge(o).order():o},merge:function(e){for(var n=e.selection?e.selection():e,r=this._groups,i=n._groups,o=r.length,a=i.length,u=Math.min(o,a),s=Array(o),l=0;l<u;++l)for(var c,f=r[l],h=i[l],p=f.length,d=s[l]=Array(p),g=0;g<p;++g)(c=f[g]||h[g])&&(d[g]=c);for(;l<o;++l)s[l]=r[l];return new K(s,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,n=-1,r=e.length;++n<r;)for(var i,o=e[n],a=o.length-1,u=o[a];--a>=0;)(i=o[a])&&(u&&4^i.compareDocumentPosition(u)&&u.parentNode.insertBefore(i,u),u=i);return this},sort:function(e){function n(n,r){return n&&r?e(n.__data__,r.__data__):!n-!r}e||(e=O);for(var r=this._groups,i=r.length,o=Array(i),a=0;a<i;++a){for(var u,s=r[a],l=s.length,c=o[a]=Array(l),f=0;f<l;++f)(u=s[f])&&(c[f]=u);c.sort(n)}return new K(o,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length;o<a;++o){var u=i[o];if(u)return u}return null},size:function(){let e=0;for(let n of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var n=this._groups,r=0,i=n.length;r<i;++r)for(var o,a=n[r],u=0,s=a.length;u<s;++u)(o=a[u])&&e.call(o,o.__data__,u,a);return this},attr:function(e,n){var r=P(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((null==n?r.local?function(e){return function(){this.removeAttributeNS(e.space,e.local)}}:function(e){return function(){this.removeAttribute(e)}}:"function"==typeof n?r.local?function(e,n){return function(){var r=n.apply(this,arguments);null==r?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}:function(e,n){return function(){var r=n.apply(this,arguments);null==r?this.removeAttribute(e):this.setAttribute(e,r)}}:r.local?function(e,n){return function(){this.setAttributeNS(e.space,e.local,n)}}:function(e,n){return function(){this.setAttribute(e,n)}})(r,n))},style:function(e,n,r){return arguments.length>1?this.each((null==n?function(e){return function(){this.style.removeProperty(e)}}:"function"==typeof n?function(e,n,r){return function(){var i=n.apply(this,arguments);null==i?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}:function(e,n,r){return function(){this.style.setProperty(e,n,r)}})(e,n,null==r?"":r)):j(this.node(),e)},property:function(e,n){return arguments.length>1?this.each((null==n?function(e){return function(){delete this[e]}}:"function"==typeof n?function(e,n){return function(){var r=n.apply(this,arguments);null==r?delete this[e]:this[e]=r}}:function(e,n){return function(){this[e]=n}})(e,n)):this.node()[e]},classed:function(e,n){var r=N(e+"");if(arguments.length<2){for(var i=R(this.node()),o=-1,a=r.length;++o<a;)if(!i.contains(r[o]))return!1;return!0}return this.each(("function"==typeof n?function(e,n){return function(){(n.apply(this,arguments)?I:U)(this,e)}}:n?function(e){return function(){I(this,e)}}:function(e){return function(){U(this,e)}})(r,n))},text:function(e){return arguments.length?this.each(null==e?F:("function"==typeof e?function(e){return function(){var n=e.apply(this,arguments);this.textContent=null==n?"":n}}:function(e){return function(){this.textContent=e}})(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?L:("function"==typeof e?function(e){return function(){var n=e.apply(this,arguments);this.innerHTML=null==n?"":n}}:function(e){return function(){this.innerHTML=e}})(e)):this.node().innerHTML},raise:function(){return this.each(q)},lower:function(){return this.each(B)},append:function(e){var n="function"==typeof e?e:$(e);return this.select(function(){return this.appendChild(n.apply(this,arguments))})},insert:function(e,n){var r="function"==typeof e?e:$(e),i=null==n?H:"function"==typeof n?n:d(n);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})},remove:function(){return this.each(V)},clone:function(e){return this.select(e?X:G)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,n,r){var i,o,a=(e+"").trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}}),u=a.length;if(arguments.length<2){var s=this.node().__on;if(s){for(var l,c=0,f=s.length;c<f;++c)for(i=0,l=s[c];i<u;++i)if((o=a[i]).type===l.type&&o.name===l.name)return l.value}return}for(i=0,s=n?Y:W;i<u;++i)this.each(s(a[i],n,r));return this},dispatch:function(e,n){return this.each(("function"==typeof n?function(e,n){return function(){return Z(this,e,n.apply(this,arguments))}}:function(e,n){return function(){return Z(this,e,n)}})(e,n))},[Symbol.iterator]:function*(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,u=o.length;a<u;++a)(i=o[a])&&(yield i)}};var te={value:()=>{}};function tn(){for(var e,n=0,r=arguments.length,i={};n<r;++n){if(!(e=arguments[n]+"")||e in i||/[\s.]/.test(e))throw Error("illegal type: "+e);i[e]=[]}return new tr(i)}function tr(e){this._=e}function ti(e,n,r){for(var i=0,o=e.length;i<o;++i)if(e[i].name===n){e[i]=te,e=e.slice(0,i).concat(e.slice(i+1));break}return null!=r&&e.push({name:n,value:r}),e}tr.prototype=tn.prototype={constructor:tr,on:function(e,n){var r,i=this._,o=(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&&!i.hasOwnProperty(e))throw Error("unknown type: "+e);return{type:e,name:n}}),a=-1,u=o.length;if(arguments.length<2){for(;++a<u;)if((r=(e=o[a]).type)&&(r=function(e,n){for(var r,i=0,o=e.length;i<o;++i)if((r=e[i]).name===n)return r.value}(i[r],e.name)))return r;return}if(null!=n&&"function"!=typeof n)throw Error("invalid callback: "+n);for(;++a<u;)if(r=(e=o[a]).type)i[r]=ti(i[r],e.name,n);else if(null==n)for(r in i)i[r]=ti(i[r],e.name,null);return this},copy:function(){var e={},n=this._;for(var r in n)e[r]=n[r].slice();return new tr(e)},call:function(e,n){if((r=arguments.length-2)>0)for(var r,i,o=Array(r),a=0;a<r;++a)o[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw Error("unknown type: "+e);for(i=this._[e],a=0,r=i.length;a<r;++a)i[a].value.apply(n,o)},apply:function(e,n,r){if(!this._.hasOwnProperty(e))throw Error("unknown type: "+e);for(var i=this._[e],o=0,a=i.length;o<a;++o)i[o].value.apply(n,r)}};let to={passive:!1},ta={capture:!0,passive:!1};function tu(e){e.stopImmediatePropagation()}function ts(e){e.preventDefault(),e.stopImmediatePropagation()}function tl(e){var n=e.document.documentElement,r=tt(e).on("dragstart.drag",ts,ta);"onselectstart"in n?r.on("selectstart.drag",ts,ta):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function tc(e,n){var r=e.document.documentElement,i=tt(e).on("dragstart.drag",null);n&&(i.on("click.drag",ts,ta),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in r?i.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}function tf(e){return((e=Math.exp(e))+1/e)/2}var th=function e(n,r,i){function o(e,o){var a,u,s=e[0],l=e[1],c=e[2],f=o[0],h=o[1],p=o[2],d=f-s,g=h-l,y=d*d+g*g;if(y<1e-12)u=Math.log(p/c)/n,a=function(e){return[s+e*d,l+e*g,c*Math.exp(n*e*u)]};else{var _=Math.sqrt(y),v=(p*p-c*c+i*y)/(2*c*r*_),m=(p*p-c*c-i*y)/(2*p*r*_),b=Math.log(Math.sqrt(v*v+1)-v);u=(Math.log(Math.sqrt(m*m+1)-m)-b)/n,a=function(e){var i,o,a=e*u,f=tf(b),h=c/(r*_)*(((i=Math.exp(2*(i=n*a+b)))-1)/(i+1)*f-((o=Math.exp(o=b))-1/o)/2);return[s+h*d,l+h*g,c*f/tf(n*a+b)]}}return a.duration=1e3*u*n/Math.SQRT2,a}return o.rho=function(n){var r=Math.max(.001,+n),i=r*r;return e(r,i,i*i)},o}(Math.SQRT2,2,4);function tp(e,n){if(e=function(e){let n;for(;n=e.sourceEvent;)e=n;return e}(e),void 0===n&&(n=e.currentTarget),n){var r=n.ownerSVGElement||n;if(r.createSVGPoint){var i=r.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,[(i=i.matrixTransform(n.getScreenCTM().inverse())).x,i.y]}if(n.getBoundingClientRect){var o=n.getBoundingClientRect();return[e.clientX-o.left-n.clientLeft,e.clientY-o.top-n.clientTop]}}return[e.pageX,e.pageY]}var td,tg,ty=0,t_=0,tv=0,tm=0,tb=0,tx=0,tw="object"==typeof performance&&performance.now?performance:Date,tk="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function tM(){return tb||(tk(tA),tb=tw.now()+tx)}function tA(){tb=0}function tS(){this._call=this._time=this._next=null}function tz(e,n,r){var i=new tS;return i.restart(e,n,r),i}function tO(){tb=(tm=tw.now())+tx,ty=t_=0;try{!function(){tM(),++ty;for(var e,n=td;n;)(e=tb-n._time)>=0&&n._call.call(void 0,e),n=n._next;--ty}()}finally{ty=0,function(){for(var e,n,r=td,i=1/0;r;)r._call?(i>r._time&&(i=r._time),e=r,r=r._next):(n=r._next,r._next=null,r=e?e._next=n:td=n);tg=e,tE(i)}(),tb=0}}function tC(){var e=tw.now(),n=e-tm;n>1e3&&(tx-=n,tm=e)}function tE(e){!ty&&(t_&&(t_=clearTimeout(t_)),e-tb>24?(e<1/0&&(t_=setTimeout(tO,e-tw.now()-tx)),tv&&(tv=clearInterval(tv))):(tv||(tm=tw.now(),tv=setInterval(tC,1e3)),ty=1,tk(tO)))}function tP(e,n,r){var i=new tS;return n=null==n?0:+n,i.restart(r=>{i.stop(),e(r+n)},n,r),i}tS.prototype=tz.prototype={constructor:tS,restart:function(e,n,r){if("function"!=typeof e)throw TypeError("callback is not a function");r=(null==r?tM():+r)+(null==n?0:+n),this._next||tg===this||(tg?tg._next=this:td=this,tg=this),this._call=e,this._time=r,tE()},stop:function(){this._call&&(this._call=null,this._time=1/0,tE())}};var tT=tn("start","end","cancel","interrupt"),tj=[];function tN(e,n,r,i,o,a){var u=e.__transition;if(u){if(r in u)return}else e.__transition={};!function(e,n,r){var i,o=e.__transition;function a(l){var c,f,h,p;if(1!==r.state)return s();for(c in o)if((p=o[c]).name===r.name){if(3===p.state)return tP(a);4===p.state?(p.state=6,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete o[c]):+c<n&&(p.state=6,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete o[c])}if(tP(function(){3===r.state&&(r.state=4,r.timer.restart(u,r.delay,r.time),u(l))}),r.state=2,r.on.call("start",e,e.__data__,r.index,r.group),2===r.state){for(c=0,r.state=3,i=Array(h=r.tween.length),f=-1;c<h;++c)(p=r.tween[c].value.call(e,e.__data__,r.index,r.group))&&(i[++f]=p);i.length=f+1}}function u(n){for(var o=n<r.duration?r.ease.call(null,n/r.duration):(r.timer.restart(s),r.state=5,1),a=-1,u=i.length;++a<u;)i[a].call(e,o);5===r.state&&(r.on.call("end",e,e.__data__,r.index,r.group),s())}function s(){for(var i in r.state=6,r.timer.stop(),delete o[n],o)return;delete e.__transition}o[n]=r,r.timer=tz(function(e){r.state=1,r.timer.restart(a,r.delay,r.time),r.delay<=e&&a(e-r.delay)},0,r.time)}(e,r,{name:n,index:i,group:o,on:tT,tween:tj,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function tR(e,n){var r=tI(e,n);if(r.state>0)throw Error("too late; already scheduled");return r}function tD(e,n){var r=tI(e,n);if(r.state>3)throw Error("too late; already running");return r}function tI(e,n){var r=e.__transition;if(!r||!(r=r[n]))throw Error("transition not found");return r}function tU(e,n){var r,i,o,a=e.__transition,u=!0;if(a){for(o in n=null==n?null:n+"",a){if((r=a[o]).name!==n){u=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete a[o]}u&&delete e.__transition}}function tF(e,n){return e=+e,n=+n,function(r){return e*(1-r)+n*r}}var tL=180/Math.PI,tq={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function tB(e,n,r,i,o,a){var u,s,l;return(u=Math.sqrt(e*e+n*n))&&(e/=u,n/=u),(l=e*r+n*i)&&(r-=e*l,i-=n*l),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,l/=s),e*i<n*r&&(e=-e,n=-n,l=-l,u=-u),{translateX:o,translateY:a,rotate:Math.atan2(n,e)*tL,skewX:Math.atan(l)*tL,scaleX:u,scaleY:s}}function t$(e,n,r,i){function o(e){return e.length?e.pop()+" ":""}return function(a,u){var s,l,c,f,h=[],p=[];return a=e(a),u=e(u),!function(e,i,o,a,u,s){if(e!==o||i!==a){var l=u.push("translate(",null,n,null,r);s.push({i:l-4,x:tF(e,o)},{i:l-2,x:tF(i,a)})}else(o||a)&&u.push("translate("+o+n+a+r)}(a.translateX,a.translateY,u.translateX,u.translateY,h,p),(s=a.rotate)!==(l=u.rotate)?(s-l>180?l+=360:l-s>180&&(s+=360),p.push({i:h.push(o(h)+"rotate(",null,i)-2,x:tF(s,l)})):l&&h.push(o(h)+"rotate("+l+i),(c=a.skewX)!==(f=u.skewX)?p.push({i:h.push(o(h)+"skewX(",null,i)-2,x:tF(c,f)}):f&&h.push(o(h)+"skewX("+f+i),!function(e,n,r,i,a,u){if(e!==r||n!==i){var s=a.push(o(a)+"scale(",null,",",null,")");u.push({i:s-4,x:tF(e,r)},{i:s-2,x:tF(n,i)})}else(1!==r||1!==i)&&a.push(o(a)+"scale("+r+","+i+")")}(a.scaleX,a.scaleY,u.scaleX,u.scaleY,h,p),a=u=null,function(e){for(var n,r=-1,i=p.length;++r<i;)h[(n=p[r]).i]=n.x(e);return h.join("")}}}var tH=t$(function(e){let n=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return n.isIdentity?tq:tB(n.a,n.b,n.c,n.d,n.e,n.f)},"px, ","px)","deg)"),tV=t$(function(e){return null==e?tq:(rr||(rr=document.createElementNS("http://www.w3.org/2000/svg","g")),rr.setAttribute("transform",e),e=rr.transform.baseVal.consolidate())?tB((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):tq},", ",")",")");function tG(e,n,r){var i=e._id;return e.each(function(){var e=tD(this,i);(e.value||(e.value={}))[n]=r.apply(this,arguments)}),function(e){return tI(e,i).value[n]}}function tX(e,n,r){e.prototype=n.prototype=r,r.constructor=e}function tW(e,n){var r=Object.create(e.prototype);for(var i in n)r[i]=n[i];return r}function tY(){}var tZ="\\s*([+-]?\\d+)\\s*",tQ="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",tK="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",tJ=/^#([0-9a-f]{3,8})$/,t0=RegExp(`^rgb\\(${tZ},${tZ},${tZ}\\)$`),t1=RegExp(`^rgb\\(${tK},${tK},${tK}\\)$`),t2=RegExp(`^rgba\\(${tZ},${tZ},${tZ},${tQ}\\)$`),t5=RegExp(`^rgba\\(${tK},${tK},${tK},${tQ}\\)$`),t3=RegExp(`^hsl\\(${tQ},${tK},${tK}\\)$`),t6=RegExp(`^hsla\\(${tQ},${tK},${tK},${tQ}\\)$`),t8={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function t4(){return this.rgb().formatHex()}function t9(){return this.rgb().formatRgb()}function t7(e){var n,r;return e=(e+"").trim().toLowerCase(),(n=tJ.exec(e))?(r=n[1].length,n=parseInt(n[1],16),6===r?et(n):3===r?new er(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===r?ee(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===r?ee(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=t0.exec(e))?new er(n[1],n[2],n[3],1):(n=t1.exec(e))?new er(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=t2.exec(e))?ee(n[1],n[2],n[3],n[4]):(n=t5.exec(e))?ee(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=t3.exec(e))?el(n[1],n[2]/100,n[3]/100,1):(n=t6.exec(e))?el(n[1],n[2]/100,n[3]/100,n[4]):t8.hasOwnProperty(e)?et(t8[e]):"transparent"===e?new er(NaN,NaN,NaN,0):null}function et(e){return new er(e>>16&255,e>>8&255,255&e,1)}function ee(e,n,r,i){return i<=0&&(e=n=r=NaN),new er(e,n,r,i)}function en(e,n,r,i){var o;return 1==arguments.length?((o=e)instanceof tY||(o=t7(o)),o)?new er((o=o.rgb()).r,o.g,o.b,o.opacity):new er:new er(e,n,r,null==i?1:i)}function er(e,n,r,i){this.r=+e,this.g=+n,this.b=+r,this.opacity=+i}function ei(){return`#${es(this.r)}${es(this.g)}${es(this.b)}`}function eo(){let e=ea(this.opacity);return`${1===e?"rgb(":"rgba("}${eu(this.r)}, ${eu(this.g)}, ${eu(this.b)}${1===e?")":`, ${e})`}`}function ea(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function eu(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function es(e){return((e=eu(e))<16?"0":"")+e.toString(16)}function el(e,n,r,i){return i<=0?e=n=r=NaN:r<=0||r>=1?e=n=NaN:n<=0&&(e=NaN),new ef(e,n,r,i)}function ec(e){if(e instanceof ef)return new ef(e.h,e.s,e.l,e.opacity);if(e instanceof tY||(e=t7(e)),!e)return new ef;if(e instanceof ef)return e;var n=(e=e.rgb()).r/255,r=e.g/255,i=e.b/255,o=Math.min(n,r,i),a=Math.max(n,r,i),u=NaN,s=a-o,l=(a+o)/2;return s?(u=n===a?(r-i)/s+(r<i)*6:r===a?(i-n)/s+2:(n-r)/s+4,s/=l<.5?a+o:2-a-o,u*=60):s=l>0&&l<1?0:u,new ef(u,s,l,e.opacity)}function ef(e,n,r,i){this.h=+e,this.s=+n,this.l=+r,this.opacity=+i}function eh(e){return(e=(e||0)%360)<0?e+360:e}function ep(e){return Math.max(0,Math.min(1,e||0))}function ed(e,n,r){return(e<60?n+(r-n)*e/60:e<180?r:e<240?n+(r-n)*(240-e)/60:n)*255}function eg(e,n,r,i,o){var a=e*e,u=a*e;return((1-3*e+3*a-u)*n+(4-6*a+3*u)*r+(1+3*e+3*a-3*u)*i+u*o)/6}tX(tY,t7,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:t4,formatHex:t4,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ec(this).formatHsl()},formatRgb:t9,toString:t9}),tX(er,en,tW(tY,{brighter(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new er(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new er(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new er(eu(this.r),eu(this.g),eu(this.b),ea(this.opacity))},displayable(){return -.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ei,formatHex:ei,formatHex8:function(){return`#${es(this.r)}${es(this.g)}${es(this.b)}${es((isNaN(this.opacity)?1:this.opacity)*255)}`},formatRgb:eo,toString:eo})),tX(ef,function(e,n,r,i){return 1==arguments.length?ec(e):new ef(e,n,r,null==i?1:i)},tW(tY,{brighter(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new ef(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new ef(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*n,o=2*r-i;return new er(ed(e>=240?e-240:e+120,o,i),ed(e,o,i),ed(e<120?e+240:e-120,o,i),this.opacity)},clamp(){return new ef(eh(this.h),ep(this.s),ep(this.l),ea(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=ea(this.opacity);return`${1===e?"hsl(":"hsla("}${eh(this.h)}, ${100*ep(this.s)}%, ${100*ep(this.l)}%${1===e?")":`, ${e})`}`}}));var ey=e=>()=>e;function e_(e,n){var r=n-e;return r?function(n){return e+n*r}:ey(isNaN(e)?n:e)}var ev=function e(n){var r,i=1==(r=+(r=n))?e_:function(e,n){var i,o,a;return n-e?(i=e,o=n,i=Math.pow(i,a=r),o=Math.pow(o,a)-i,a=1/a,function(e){return Math.pow(i+e*o,a)}):ey(isNaN(e)?n:e)};function o(e,n){var r=i((e=en(e)).r,(n=en(n)).r),o=i(e.g,n.g),a=i(e.b,n.b),u=e_(e.opacity,n.opacity);return function(n){return e.r=r(n),e.g=o(n),e.b=a(n),e.opacity=u(n),e+""}}return o.gamma=e,o}(1);function em(e){return function(n){var r,i,o=n.length,a=Array(o),u=Array(o),s=Array(o);for(r=0;r<o;++r)i=en(n[r]),a[r]=i.r||0,u[r]=i.g||0,s[r]=i.b||0;return a=e(a),u=e(u),s=e(s),i.opacity=1,function(e){return i.r=a(e),i.g=u(e),i.b=s(e),i+""}}}em(function(e){var n=e.length-1;return function(r){var i=r<=0?r=0:r>=1?(r=1,n-1):Math.floor(r*n),o=e[i],a=e[i+1],u=i>0?e[i-1]:2*o-a,s=i<n-1?e[i+2]:2*a-o;return eg((r-i/n)*n,u,o,a,s)}}),em(function(e){var n=e.length;return function(r){var i=Math.floor(((r%=1)<0?++r:r)*n),o=e[(i+n-1)%n],a=e[i%n],u=e[(i+1)%n],s=e[(i+2)%n];return eg((r-i/n)*n,o,a,u,s)}});var eb=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ex=RegExp(eb.source,"g");function ew(e,n){var r;return("number"==typeof n?tF:n instanceof t7?ev:(r=t7(n))?(n=r,ev):function(e,n){var r,i,o,a,u,s=eb.lastIndex=ex.lastIndex=0,l=-1,c=[],f=[];for(e+="",n+="";(o=eb.exec(e))&&(a=ex.exec(n));)(u=a.index)>s&&(u=n.slice(s,u),c[l]?c[l]+=u:c[++l]=u),(o=o[0])===(a=a[0])?c[l]?c[l]+=a:c[++l]=a:(c[++l]=null,f.push({i:l,x:tF(o,a)})),s=ex.lastIndex;return s<n.length&&(u=n.slice(s),c[l]?c[l]+=u:c[++l]=u),c.length<2?f[0]?(r=f[0].x,function(e){return r(e)+""}):(i=n,function(){return i}):(n=f.length,function(e){for(var r,i=0;i<n;++i)c[(r=f[i]).i]=r.x(e);return c.join("")})})(e,n)}var ek=J.prototype.constructor;function eM(e){return function(){this.style.removeProperty(e)}}var eA=0;function eS(e,n,r,i){this._groups=e,this._parents=n,this._name=r,this._id=i}var ez=J.prototype;eS.prototype=(function(e){return J().transition(e)}).prototype={constructor:eS,select:function(e){var n=this._name,r=this._id;"function"!=typeof e&&(e=d(e));for(var i=this._groups,o=i.length,a=Array(o),u=0;u<o;++u)for(var s,l,c=i[u],f=c.length,h=a[u]=Array(f),p=0;p<f;++p)(s=c[p])&&(l=e.call(s,s.__data__,p,c))&&("__data__"in s&&(l.__data__=s.__data__),h[p]=l,tN(h[p],n,r,p,h,tI(s,r)));return new eS(a,this._parents,n,r)},selectAll:function(e){var n=this._name,r=this._id;"function"!=typeof e&&(e=y(e));for(var i=this._groups,o=i.length,a=[],u=[],s=0;s<o;++s)for(var l,c=i[s],f=c.length,h=0;h<f;++h)if(l=c[h]){for(var p,d=e.call(l,l.__data__,h,c),g=tI(l,r),_=0,v=d.length;_<v;++_)(p=d[_])&&tN(p,n,r,_,d,g);a.push(d),u.push(l)}return new eS(a,u,n,r)},selectChild:ez.selectChild,selectChildren:ez.selectChildren,filter:function(e){"function"!=typeof e&&(e=_(e));for(var n=this._groups,r=n.length,i=Array(r),o=0;o<r;++o)for(var a,u=n[o],s=u.length,l=i[o]=[],c=0;c<s;++c)(a=u[c])&&e.call(a,a.__data__,c,u)&&l.push(a);return new eS(i,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw Error();for(var n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),u=Array(i),s=0;s<a;++s)for(var l,c=n[s],f=r[s],h=c.length,p=u[s]=Array(h),d=0;d<h;++d)(l=c[d]||f[d])&&(p[d]=l);for(;s<i;++s)u[s]=n[s];return new eS(u,this._parents,this._name,this._id)},selection:function(){return new ek(this._groups,this._parents)},transition:function(){for(var e=this._name,n=this._id,r=++eA,i=this._groups,o=i.length,a=0;a<o;++a)for(var u,s=i[a],l=s.length,c=0;c<l;++c)if(u=s[c]){var f=tI(u,n);tN(u,e,r,c,s,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new eS(i,this._parents,e,r)},call:ez.call,nodes:ez.nodes,node:ez.node,size:ez.size,empty:ez.empty,each:ez.each,on:function(e,n){var r,i,o,a=this._id;return arguments.length<2?tI(this.node(),a).on.on(e):this.each((o=(e+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||"start"===e})?tR:tD,function(){var u=o(this,a),s=u.on;s!==r&&(i=(r=s).copy()).on(e,n),u.on=i}))},attr:function(e,n){var r=P(e),i="transform"===r?tV:ew;return this.attrTween(e,"function"==typeof n?(r.local?function(e,n,r){var i,o,a;return function(){var u,s,l=r(this);return null==l?void this.removeAttributeNS(e.space,e.local):(u=this.getAttributeNS(e.space,e.local))===(s=l+"")?null:u===i&&s===o?a:(o=s,a=n(i=u,l))}}:function(e,n,r){var i,o,a;return function(){var u,s,l=r(this);return null==l?void this.removeAttribute(e):(u=this.getAttribute(e))===(s=l+"")?null:u===i&&s===o?a:(o=s,a=n(i=u,l))}})(r,i,tG(this,"attr."+e,n)):null==n?(r.local?function(e){return function(){this.removeAttributeNS(e.space,e.local)}}:function(e){return function(){this.removeAttribute(e)}})(r):(r.local?function(e,n,r){var i,o,a=r+"";return function(){var u=this.getAttributeNS(e.space,e.local);return u===a?null:u===i?o:o=n(i=u,r)}}:function(e,n,r){var i,o,a=r+"";return function(){var u=this.getAttribute(e);return u===a?null:u===i?o:o=n(i=u,r)}})(r,i,n))},attrTween:function(e,n){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw Error();var i=P(e);return this.tween(r,(i.local?function(e,n){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&function(n){this.setAttributeNS(e.space,e.local,o.call(this,n))}),r}return o._value=n,o}:function(e,n){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&function(n){this.setAttribute(e,o.call(this,n))}),r}return o._value=n,o})(i,n))},style:function(e,n,r){var i,o,a,u,s,l,c,f,h,p,d,g,y,_,v,m,b,x,w,k,M,A="transform"==(e+="")?tH:ew;return null==n?this.styleTween(e,(i=e,function(){var e=j(this,i),n=(this.style.removeProperty(i),j(this,i));return e===n?null:e===o&&n===a?u:u=A(o=e,a=n)})).on("end.style."+e,eM(e)):"function"==typeof n?this.styleTween(e,(s=e,l=tG(this,"style."+e,n),function(){var e=j(this,s),n=l(this),r=n+"";return null==n&&(this.style.removeProperty(s),r=n=j(this,s)),e===r?null:e===c&&r===f?h:(f=r,h=A(c=e,n))})).each((p=this._id,b="end."+(m="style."+(d=e)),function(){var e=tD(this,p),n=e.on,r=null==e.value[m]?v||(v=eM(d)):void 0;(n!==g||_!==r)&&(y=(g=n).copy()).on(b,_=r),e.on=y})):this.styleTween(e,(x=e,M=n+"",function(){var e=j(this,x);return e===M?null:e===w?k:k=A(w=e,n)}),r).on("end.style."+e,null)},styleTween:function(e,n,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==n)return this.tween(i,null);if("function"!=typeof n)throw Error();return this.tween(i,function(e,n,r){var i,o;function a(){var a=n.apply(this,arguments);return a!==o&&(i=(o=a)&&function(n){this.style.setProperty(e,a.call(this,n),r)}),i}return a._value=n,a}(e,n,null==r?"":r))},text:function(e){var n,r;return this.tween("text","function"==typeof e?(n=tG(this,"text",e),function(){var e=n(this);this.textContent=null==e?"":e}):(r=null==e?"":e+"",function(){this.textContent=r}))},textTween:function(e){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw Error();return this.tween(n,function(e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(e){this.textContent=i.call(this,e)}),n}return i._value=e,i}(e))},remove:function(){var e;return this.on("end.remove",(e=this._id,function(){var n=this.parentNode;for(var r in this.__transition)if(+r!==e)return;n&&n.removeChild(this)}))},tween:function(e,n){var r=this._id;if(e+="",arguments.length<2){for(var i,o=tI(this.node(),r).tween,a=0,u=o.length;a<u;++a)if((i=o[a]).name===e)return i.value;return null}return this.each((null==n?function(e,n){var r,i;return function(){var o=tD(this,e),a=o.tween;if(a!==r){i=r=a;for(var u=0,s=i.length;u<s;++u)if(i[u].name===n){(i=i.slice()).splice(u,1);break}}o.tween=i}}:function(e,n,r){var i,o;if("function"!=typeof r)throw Error();return function(){var a=tD(this,e),u=a.tween;if(u!==i){o=(i=u).slice();for(var s={name:n,value:r},l=0,c=o.length;l<c;++l)if(o[l].name===n){o[l]=s;break}l===c&&o.push(s)}a.tween=o}})(r,e,n))},delay:function(e){var n=this._id;return arguments.length?this.each(("function"==typeof e?function(e,n){return function(){tR(this,e).delay=+n.apply(this,arguments)}}:function(e,n){return n=+n,function(){tR(this,e).delay=n}})(n,e)):tI(this.node(),n).delay},duration:function(e){var n=this._id;return arguments.length?this.each(("function"==typeof e?function(e,n){return function(){tD(this,e).duration=+n.apply(this,arguments)}}:function(e,n){return n=+n,function(){tD(this,e).duration=n}})(n,e)):tI(this.node(),n).duration},ease:function(e){var n=this._id;return arguments.length?this.each(function(e,n){if("function"!=typeof n)throw Error();return function(){tD(this,e).ease=n}}(n,e)):tI(this.node(),n).ease},easeVarying:function(e){var n;if("function"!=typeof e)throw Error();return this.each((n=this._id,function(){var r=e.apply(this,arguments);if("function"!=typeof r)throw Error();tD(this,n).ease=r}))},end:function(){var e,n,r=this,i=r._id,o=r.size();return new Promise(function(a,u){var s={value:u},l={value:function(){0==--o&&a()}};r.each(function(){var r=tD(this,i),o=r.on;o!==e&&((n=(e=o).copy())._.cancel.push(s),n._.interrupt.push(s),n._.end.push(l)),r.on=n}),0===o&&a()})},[Symbol.iterator]:ez[Symbol.iterator]};var eO={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};J.prototype.interrupt=function(e){return this.each(function(){tU(this,e)})},J.prototype.transition=function(e){var n,r;e instanceof eS?(n=e._id,e=e._name):(n=++eA,(r=eO).time=tM(),e=null==e?null:e+"");for(var i=this._groups,o=i.length,a=0;a<o;++a)for(var u,s=i[a],l=s.length,c=0;c<l;++c)(u=s[c])&&tN(u,e,n,c,s,r||function(e,n){for(var r;!(r=e.__transition)||!(r=r[n]);)if(!(e=e.parentNode))throw Error(`transition ${n} not found`);return r}(u,n));return new eS(i,this._parents,e,n)};var eC=e=>()=>e;function eE(e,{sourceEvent:n,target:r,transform:i,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function eP(e,n,r){this.k=e,this.x=n,this.y=r}eP.prototype={constructor:eP,scale:function(e){return 1===e?this:new eP(this.k*e,this.x,this.y)},translate:function(e,n){return 0===e&0===n?this:new eP(this.k,this.x+this.k*e,this.y+this.k*n)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var eT=new eP(1,0,0);function ej(e){for(;!e.__zoom;)if(!(e=e.parentNode))return eT;return e.__zoom}function eN(e){e.stopImmediatePropagation()}function eR(e){e.preventDefault(),e.stopImmediatePropagation()}function eD(e){return(!e.ctrlKey||"wheel"===e.type)&&!e.button}function eI(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function eU(){return this.__zoom||eT}function eF(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function eL(){return navigator.maxTouchPoints||"ontouchstart"in this}function eq(e,n,r){var i=e.invertX(n[0][0])-r[0][0],o=e.invertX(n[1][0])-r[1][0],a=e.invertY(n[0][1])-r[0][1],u=e.invertY(n[1][1])-r[1][1];return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),u>a?(a+u)/2:Math.min(0,a)||Math.max(0,u))}ej.prototype=eP.prototype;var eB=e=>()=>e;function e$(e,{sourceEvent:n,subject:r,target:i,identifier:o,active:a,x:u,y:s,dx:l,dy:c,dispatch:f}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:u,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:f}})}function eH(e){return!e.ctrlKey&&!e.button}function eV(){return this.parentNode}function eG(e,n){return null==n?{x:e.x,y:e.y}:n}function eX(){return navigator.maxTouchPoints||"ontouchstart"in this}function eW(e,n){let r;if(void 0===n)for(let n of e)null!=n&&(r>n||void 0===r&&n>=n)&&(r=n);else{let i=-1;for(let o of e)null!=(o=n(o,++i,e))&&(r>o||void 0===r&&o>=o)&&(r=o)}return r}function eY(e,n){let r;if(void 0===n)for(let n of e)null!=n&&(r<n||void 0===r&&n>=n)&&(r=n);else{let i=-1;for(let o of e)null!=(o=n(o,++i,e))&&(r<o||void 0===r&&o>=o)&&(r=o)}return r}e$.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};var eZ=function(e){var n=typeof e;return null!=e&&("object"==n||"function"==n)},eQ="object"==typeof global&&global&&global.Object===Object&&global,eK="object"==typeof self&&self&&self.Object===Object&&self,eJ=eQ||eK||Function("return this")(),e0=function(){return eJ.Date.now()},e1=/\s/,e2=function(e){for(var n=e.length;n--&&e1.test(e.charAt(n)););return n},e5=/^\s+/,e3=eJ.Symbol,e6=Object.prototype,e8=e6.hasOwnProperty,e4=e6.toString,e9=e3?e3.toStringTag:void 0,e7=function(e){var n=e8.call(e,e9),r=e[e9];try{e[e9]=void 0;var i=!0}catch(e){}var o=e4.call(e);return i&&(n?e[e9]=r:delete e[e9]),o},nt=Object.prototype.toString,ne=e3?e3.toStringTag:void 0,nn=function(e){var n;return"symbol"==typeof e||null!=e&&"object"==typeof e&&"[object Symbol]"==(null==(n=e)?void 0===n?"[object Undefined]":"[object Null]":ne&&ne in Object(n)?e7(n):nt.call(n))},nr=0/0,ni=/^[-+]0x[0-9a-f]+$/i,no=/^0b[01]+$/i,na=/^0o[0-7]+$/i,nu=parseInt,ns=function(e){if("number"==typeof e)return e;if(nn(e))return nr;if(eZ(e)){var n,r="function"==typeof e.valueOf?e.valueOf():e;e=eZ(r)?r+"":r}if("string"!=typeof e)return 0===e?e:+e;e=(n=e)?n.slice(0,e2(n)+1).replace(e5,""):n;var i=no.test(e);return i||na.test(e)?nu(e.slice(2),i?2:8):ni.test(e)?nr:+e},nl=Math.max,nc=Math.min,nf=function(e,n,r){var i,o,a,u,s,l,c=0,f=!1,h=!1,p=!0;if("function"!=typeof e)throw TypeError("Expected a function");function d(n){var r=i,a=o;return i=o=void 0,c=n,u=e.apply(a,r)}function g(e){var r=e-l,i=e-c;return void 0===l||r>=n||r<0||h&&i>=a}function y(){var e,r,i,o=e0();if(g(o))return _(o);s=setTimeout(y,(e=o-l,r=o-c,i=n-e,h?nc(i,a-r):i))}function _(e){return(s=void 0,p&&i)?d(e):(i=o=void 0,u)}function v(){var e,r=e0(),a=g(r);if(i=arguments,o=this,l=r,a){if(void 0===s)return c=e=l,s=setTimeout(y,n),f?d(e):u;if(h)return clearTimeout(s),s=setTimeout(y,n),d(l)}return void 0===s&&(s=setTimeout(y,n)),u}return n=ns(n)||0,eZ(r)&&(f=!!r.leading,a=(h="maxWait"in r)?nl(ns(r.maxWait)||0,n):a,p="trailing"in r?!!r.trailing:p),v.cancel=function(){void 0!==s&&clearTimeout(s),c=0,i=l=o=s=void 0},v.flush=function(){return void 0===s?u:_(e0())},v},nh=function(e,n,r){var i=!0,o=!0;if("function"!=typeof e)throw TypeError("Expected a function");return eZ(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),nf(e,n,{leading:i,maxWait:n,trailing:o})},np=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({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:Object.freeze({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:Object.freeze({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:Object.freeze({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:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({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*(-Math.pow(2,-10*(e-1))+2)}}),Circular:Object.freeze({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:Object.freeze({In:function(e){return 0===e?0:1===e?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*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((e-1.1)*5*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1}}),Back:Object.freeze({In:function(e){return 1===e?1:e*e*(2.70158*e-1.70158)},Out:function(e){return 0===e?0:--e*e*(2.70158*e+1.70158)+1},InOut:function(e){return(e*=2)<1?e*e*(3.5949095*e-2.5949095)*.5:.5*((e-=2)*e*(3.5949095*e+2.5949095)+2)}}),Bounce:Object.freeze({In:function(e){return 1-np.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*np.Bounce.In(2*e):.5*np.Bounce.Out(2*e-1)+.5}}),generatePow:function(e){return void 0===e&&(e=4),e=(e=e<Number.EPSILON?Number.EPSILON:e)>1e4?1e4:e,{In:function(n){return Math.pow(n,e)},Out:function(n){return 1-Math.pow(1-n,e)},InOut:function(n){return n<.5?Math.pow(2*n,e)/2:(1-Math.pow(2-2*n,e))/2+.5}}}}),nd=function(){return performance.now()},ng=function(){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,e)}return e.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(n){return e._tweens[n]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var i=0;i<n.length;i++){var o=n[i];null===(e=o._group)||void 0===e||e.remove(o),o._group=this,this._tweens[o.getId()]=o,this._tweensAddedDuringUpdate[o.getId()]=o}},e.prototype.remove=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var r=0;r<e.length;r++){var i=e[r];i._group=void 0,delete this._tweens[i.getId()],delete this._tweensAddedDuringUpdate[i.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(e){return!e.isPlaying()})},e.prototype.update=function(e,n){void 0===e&&(e=nd()),void 0===n&&(n=!0);var r=Object.keys(this._tweens);if(0!==r.length)for(;r.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<r.length;i++){var o=this._tweens[r[i]],a=!n;o&&!1===o.update(e,a)&&!n&&this.remove(o)}r=Object.keys(this._tweensAddedDuringUpdate)}},e}(),ny={Linear:function(e,n){var r=e.length-1,i=r*n,o=Math.floor(i),a=ny.Utils.Linear;return n<0?a(e[0],e[1],i):n>1?a(e[r],e[r-1],r-i):a(e[o],e[o+1>r?r:o+1],i-o)},Bezier:function(e,n){for(var r=0,i=e.length-1,o=Math.pow,a=ny.Utils.Bernstein,u=0;u<=i;u++)r+=o(1-n,i-u)*o(n,u)*e[u]*a(i,u);return r},CatmullRom:function(e,n){var r=e.length-1,i=r*n,o=Math.floor(i),a=ny.Utils.CatmullRom;return e[0]===e[r]?(n<0&&(o=Math.floor(i=r*(1+n))),a(e[(o-1+r)%r],e[o],e[(o+1)%r],e[(o+2)%r],i-o)):n<0?e[0]-(a(e[0],e[0],e[1],e[1],-i)-e[0]):n>1?e[r]-(a(e[r],e[r],e[r-1],e[r-1],i-r)-e[r]):a(e[o?o-1:0],e[o],e[r<o+1?r:o+1],e[r<o+2?r:o+2],i-o)},Utils:{Linear:function(e,n,r){return(n-e)*r+e},Bernstein:function(e,n){var r=ny.Utils.Factorial;return r(e)/r(n)/r(e-n)},Factorial:(n8=[1],function(e){var n=1;if(n8[e])return n8[e];for(var r=e;r>1;r--)n*=r;return n8[e]=n,n}),CatmullRom:function(e,n,r,i,o){var a=(r-e)*.5,u=(i-n)*.5,s=o*o;return o*s*(2*n-2*r+a+u)+(-3*n+3*r-2*a-u)*s+a*o+n}}},n_=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),nv=new ng,nm=function(){function e(e,n){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=np.Linear.None,this._interpolationFunction=ny.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=n_.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=e,"object"==typeof n?(this._group=n,n.add(this)):!0===n&&(this._group=nv,nv.add(this))}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(e,n){if(void 0===n&&(n=1e3),this._isPlaying)throw Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=e,this._propertiesAreSetUp=!1,this._duration=n<0?0:n,this},e.prototype.duration=function(e){return void 0===e&&(e=1e3),this._duration=e<0?0:e,this},e.prototype.dynamic=function(e){return void 0===e&&(e=!1),this._isDynamic=e,this},e.prototype.start=function(e,n){if(void 0===e&&(e=nd()),void 0===n&&(n=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed)for(var r in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r];if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||n){if(this._propertiesAreSetUp=!0,!this._isDynamic){var i={};for(var o in this._valuesEnd)i[o]=this._valuesEnd[o];this._valuesEnd=i}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,n)}return this},e.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},e.prototype._setupProperties=function(e,n,r,i,o){for(var a in r){var u=e[a],s=Array.isArray(u),l=s?"array":typeof u,c=!s&&Array.isArray(r[a]);if("undefined"!==l&&"function"!==l){if(c){var f=r[a];if(0===f.length)continue;for(var h=[u],p=0,d=f.length;p<d;p+=1){var g=this._handleRelativeValue(u,f[p]);if(isNaN(g)){c=!1,console.warn("Found invalid interpolation list. Skipping.");break}h.push(g)}c&&(r[a]=h)}if(("object"===l||s)&&u&&!c){for(var y in n[a]=s?[]:{},u)n[a][y]=u[y];i[a]=s?[]:{};var f=r[a];if(!this._isDynamic){var _={};for(var y in f)_[y]=f[y];r[a]=f=_}this._setupProperties(u,n[a],f,i[a],o)}else(void 0===n[a]||o)&&(n[a]=u),s||(n[a]*=1),c?i[a]=r[a].slice().reverse():i[a]=n[a]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying&&(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object)),this},e.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},e.prototype.pause=function(e){return void 0===e&&(e=nd()),this._isPaused||!this._isPlaying||(this._isPaused=!0,this._pauseStart=e),this},e.prototype.resume=function(e){return void 0===e&&(e=nd()),this._isPaused&&this._isPlaying&&(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0),this},e.prototype.stopChainedTweens=function(){for(var e=0,n=this._chainedTweens.length;e<n;e++)this._chainedTweens[e].stop();return this},e.prototype.group=function(e){return e?e.add(this):console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this},e.prototype.remove=function(){var e;return null===(e=this._group)||void 0===e||e.remove(this),this},e.prototype.delay=function(e){return void 0===e&&(e=0),this._delayTime=e,this},e.prototype.repeat=function(e){return void 0===e&&(e=0),this._initialRepeat=e,this._repeat=e,this},e.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},e.prototype.yoyo=function(e){return void 0===e&&(e=!1),this._yoyo=e,this},e.prototype.easing=function(e){return void 0===e&&(e=np.Linear.None),this._easingFunction=e,this},e.prototype.interpolation=function(e){return void 0===e&&(e=ny.Linear),this._interpolationFunction=e,this},e.prototype.chain=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return this._chainedTweens=e,this},e.prototype.onStart=function(e){return this._onStartCallback=e,this},e.prototype.onEveryStart=function(e){return this._onEveryStartCallback=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(n,r){var i,o,a=this;if(void 0===n&&(n=nd()),void 0===r&&(r=e.autoStartOnUpdate),this._isPaused)return!0;if(!this._goToEnd&&!this._isPlaying){if(!r)return!1;this.start(n,!0)}if(this._goToEnd=!1,n<this._startTime)return!0;!1===this._onStartCallbackFired&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),!1===this._onEveryStartCallbackFired&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var u=n-this._startTime,s=this._duration+(null!==(i=this._repeatDelayTime)&&void 0!==i?i:this._delayTime),l=this._duration+this._repeat*s,c=function(){if(0===a._duration||u>l)return 1;var e=Math.trunc(u/s),n=Math.min((u-e*s)/a._duration,1);return 0===n&&u===a._duration?1:n}(),f=this._easingFunction(c);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,f),this._onUpdateCallback&&this._onUpdateCallback(this._object,c),0===this._duration||u>=this._duration){if(this._repeat>0){var h=Math.min(Math.trunc((u-this._duration)/s)+1,this._repeat);for(o in isFinite(this._repeat)&&(this._repeat-=h),this._valuesStartRepeat)this._yoyo||"string"!=typeof this._valuesEnd[o]||(this._valuesStartRepeat[o]=this._valuesStartRepeat[o]+parseFloat(this._valuesEnd[o])),this._yoyo&&this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o];this._yoyo&&(this._reversed=!this._reversed),this._startTime+=s*h,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var p=0,d=this._chainedTweens.length;p<d;p++)this._chainedTweens[p].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}}return!0},e.prototype._updateProperties=function(e,n,r,i){for(var o in r)if(void 0!==n[o]){var a=n[o]||0,u=r[o],s=Array.isArray(e[o]),l=Array.isArray(u);!s&&l?e[o]=this._interpolationFunction(u,i):"object"==typeof u&&u?this._updateProperties(e[o],a,u,i):"number"==typeof(u=this._handleRelativeValue(a,u))&&(e[o]=a+(u-a)*i)}},e.prototype._handleRelativeValue=function(e,n){return"string"!=typeof n?n:"+"===n.charAt(0)||"-"===n.charAt(0)?e+parseFloat(n):parseFloat(n)},e.prototype._swapEndStartRepeatValues=function(e){var n=this._valuesStartRepeat[e],r=this._valuesEnd[e];"string"==typeof r?this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(r):this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=n},e.autoStartOnUpdate=!1,e}();function nb(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}n_.nextId,nv.getAll.bind(nv),nv.removeAll.bind(nv),nv.add.bind(nv),nv.remove.bind(nv),nv.update.bind(nv);var nx=(Object.defineProperty(n4=function e(n,r){var i=r.default,o=r.triggerUpdate,a=r.onChange;(function(e,n){if(!(e instanceof n))throw TypeError("Cannot call a class as a function")})(this,e),this.name=n,this.defaultVal=void 0===i?null:i,this.triggerUpdate=void 0===o||o,this.onChange=void 0===a?function(e,n){}:a},"prototype",{writable:!1}),n4);function nw(e){var n=e.stateInit,r=void 0===n?function(){return{}}:n,i=e.props,o=void 0===i?{}:i,a=e.methods,u=void 0===a?{}:a,s=e.aliases,l=void 0===s?{}:s,c=e.init,f=void 0===c?function(){}:c,h=e.update,p=void 0===h?function(){}:h,d=Object.keys(o).map(function(e){return new nx(e,o[e])});return function e(){for(var n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];var a=!!(this instanceof e?this.constructor:void 0),s=a?i.shift():void 0,c=i[0],h=void 0===c?{}:c,g=Object.assign({},r instanceof Function?r(h):r,{initialised:!1}),y={};function _(e){return v(e,h),m(),_}var v=function(e,n){f.call(_,e,g,n),g.initialised=!0},m=nf(function(){g.initialised&&(p.call(_,g,y),y={})},1);return d.forEach(function(e){var n,r,i,o,a,u,s;_[e.name]=(n=e.name,i=void 0!==(r=e.triggerUpdate)&&r,a=void 0===(o=e.onChange)?function(e,n){}:o,s=void 0===(u=e.defaultVal)?null:u,function(e){var r=g[n];if(!arguments.length)return r;var o=void 0===e?s:e;return g[n]=o,a.call(_,o,g,r),y.hasOwnProperty(n)||(y[n]=r),i&&m(),_})}),Object.keys(u).forEach(function(e){_[e]=function(){for(var n,r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return(n=u[e]).call.apply(n,[_,g].concat(i))}}),Object.entries(l).forEach(function(e){var n=function(e){if(Array.isArray(e))return e}(e)||function(e,n){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var i,o,a,u,s=[],l=!0,c=!1;try{for(a=(r=r.call(e)).next;!(l=(i=a.call(r)).done)&&(s.push(i.value),2!==s.length);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(c)throw o}}return s}}(e,2)||function(e,n){if(e){if("string"==typeof e)return nb(e,2);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?nb(e,2):void 0}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],i=n[1];return _[r]=_[i]}),_.resetProps=function(){return d.forEach(function(e){_[e.name](e.defaultVal)}),_},_.resetProps(),g._rerender=m,a&&s&&_(s),_}}var nk=function(e){return"function"==typeof e?e:"string"==typeof e?function(n){return n[e]}:function(n){return e}};function nM(e){return(nM="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})(e)}var nA=/^\s+/,nS=/\s+$/;function nz(e,n){if(n=n||{},(e=e||"")instanceof nz)return e;if(!(this instanceof nz))return new nz(e,n);var r,i,o,a,u,s,l,c,f,h,p,d,g,y,_,v,m,b,x,w,k=(i={r:0,g:0,b:0},o=1,a=null,u=null,s=null,l=!1,c=!1,"string"==typeof(r=e)&&(r=function(e){e=e.replace(nA,"").replace(nS,"").toLowerCase();var n,r=!1;if(nH[e])e=nH[e],r=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(n=nJ.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=nJ.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=nJ.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=nJ.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=nJ.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=nJ.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=nJ.hex8.exec(e))?{r:nY(n[1]),g:nY(n[2]),b:nY(n[3]),a:nY(n[4])/255,format:r?"name":"hex8"}:(n=nJ.hex6.exec(e))?{r:nY(n[1]),g:nY(n[2]),b:nY(n[3]),format:r?"name":"hex"}:(n=nJ.hex4.exec(e))?{r:nY(n[1]+""+n[1]),g:nY(n[2]+""+n[2]),b:nY(n[3]+""+n[3]),a:nY(n[4]+""+n[4])/255,format:r?"name":"hex8"}:!!(n=nJ.hex3.exec(e))&&{r:nY(n[1]+""+n[1]),g:nY(n[2]+""+n[2]),b:nY(n[3]+""+n[3]),format:r?"name":"hex"}}(r)),"object"==nM(r)&&(n0(r.r)&&n0(r.g)&&n0(r.b)?(f=r.r,h=r.g,p=r.b,i={r:255*nX(f,255),g:255*nX(h,255),b:255*nX(p,255)},l=!0,c="%"===String(r.r).substr(-1)?"prgb":"rgb"):n0(r.h)&&n0(r.s)&&n0(r.v)?(a=nQ(r.s),u=nQ(r.v),d=r.h,g=a,y=u,d=6*nX(d,360),g=nX(g,100),y=nX(y,100),_=Math.floor(d),v=d-_,m=y*(1-g),b=y*(1-v*g),x=y*(1-(1-v)*g),i={r:255*[y,b,m,m,x,y][w=_%6],g:255*[x,y,y,b,m,m][w],b:255*[m,m,x,y,y,b][w]},l=!0,c="hsv"):n0(r.h)&&n0(r.s)&&n0(r.l)&&(a=nQ(r.s),s=nQ(r.l),i=function(e,n,r){var i,o,a;function u(e,n,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(n-e)*6*r:r<.5?n:r<2/3?e+(n-e)*(2/3-r)*6:e}if(e=nX(e,360),n=nX(n,100),r=nX(r,100),0===n)i=o=a=r;else{var s=r<.5?r*(1+n):r+n-r*n,l=2*r-s;i=u(l,s,e+1/3),o=u(l,s,e),a=u(l,s,e-1/3)}return{r:255*i,g:255*o,b:255*a}}(r.h,a,s),l=!0,c="hsl"),r.hasOwnProperty("a")&&(o=r.a)),o=nG(o),{ok:l,format:r.format||c,r:Math.min(255,Math.max(i.r,0)),g:Math.min(255,Math.max(i.g,0)),b:Math.min(255,Math.max(i.b,0)),a:o});this._originalInput=e,this._r=k.r,this._g=k.g,this._b=k.b,this._a=k.a,this._roundA=Math.round(100*this._a)/100,this._format=n.format||k.format,this._gradientType=n.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=k.ok}function nO(e,n,r){var i,o,a=Math.max(e=nX(e,255),n=nX(n,255),r=nX(r,255)),u=Math.min(e,n,r),s=(a+u)/2;if(a==u)i=o=0;else{var l=a-u;switch(o=s>.5?l/(2-a-u):l/(a+u),a){case e:i=(n-r)/l+(n<r?6:0);break;case n:i=(r-e)/l+2;break;case r:i=(e-n)/l+4}i/=6}return{h:i,s:o,l:s}}function nC(e,n,r){var i,o,a=Math.max(e=nX(e,255),n=nX(n,255),r=nX(r,255)),u=Math.min(e,n,r),s=a-u;if(o=0===a?0:s/a,a==u)i=0;else{switch(a){case e:i=(n-r)/s+(n<r?6:0);break;case n:i=(r-e)/s+2;break;case r:i=(e-n)/s+4}i/=6}return{h:i,s:o,v:a}}function nE(e,n,r,i){var o=[nZ(Math.round(e).toString(16)),nZ(Math.round(n).toString(16)),nZ(Math.round(r).toString(16))];return i&&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 nP(e,n,r,i){return[nZ(nK(i)),nZ(Math.round(e).toString(16)),nZ(Math.round(n).toString(16)),nZ(Math.round(r).toString(16))].join("")}function nT(e,n){n=0===n?0:n||10;var r=nz(e).toHsl();return r.s-=n/100,r.s=nW(r.s),nz(r)}function nj(e,n){n=0===n?0:n||10;var r=nz(e).toHsl();return r.s+=n/100,r.s=nW(r.s),nz(r)}function nN(e){return nz(e).desaturate(100)}function nR(e,n){n=0===n?0:n||10;var r=nz(e).toHsl();return r.l+=n/100,r.l=nW(r.l),nz(r)}function nD(e,n){n=0===n?0:n||10;var r=nz(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(-(n/100*255)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(-(n/100*255)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(-(n/100*255)))),nz(r)}function nI(e,n){n=0===n?0:n||10;var r=nz(e).toHsl();return r.l-=n/100,r.l=nW(r.l),nz(r)}function nU(e,n){var r=nz(e).toHsl(),i=(r.h+n)%360;return r.h=i<0?360+i:i,nz(r)}function nF(e){var n=nz(e).toHsl();return n.h=(n.h+180)%360,nz(n)}function nL(e,n){if(isNaN(n)||n<=0)throw Error("Argument to polyad must be a positive number");for(var r=nz(e).toHsl(),i=[nz(e)],o=360/n,a=1;a<n;a++)i.push(nz({h:(r.h+a*o)%360,s:r.s,l:r.l}));return i}function nq(e){var n=nz(e).toHsl(),r=n.h;return[nz(e),nz({h:(r+72)%360,s:n.s,l:n.l}),nz({h:(r+216)%360,s:n.s,l:n.l})]}function nB(e,n,r){n=n||6,r=r||30;var i=nz(e).toHsl(),o=360/r,a=[nz(e)];for(i.h=(i.h-(o*n>>1)+720)%360;--n;)i.h=(i.h+o)%360,a.push(nz(i));return a}function n$(e,n){n=n||6;for(var r=nz(e).toHsv(),i=r.h,o=r.s,a=r.v,u=[],s=1/n;n--;)u.push(nz({h:i,s:o,v:a})),a=(a+s)%1;return u}nz.prototype={isDark:function(){return 128>this.getBrightness()},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,n,r,i=this.toRgb();return e=i.r/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*((n=i.g/255)<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.0722*((r=i.b/255)<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=nG(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=nC(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=nC(this._r,this._g,this._b),n=Math.round(360*e.h),r=Math.round(100*e.s),i=Math.round(100*e.v);return 1==this._a?"hsv("+n+", "+r+"%, "+i+"%)":"hsva("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var e=nO(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=nO(this._r,this._g,this._b),n=Math.round(360*e.h),r=Math.round(100*e.s),i=Math.round(100*e.l);return 1==this._a?"hsl("+n+", "+r+"%, "+i+"%)":"hsla("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(e){return nE(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){var n,r,i,o,a;return n=this._r,r=this._g,i=this._b,o=this._a,a=[nZ(Math.round(n).toString(16)),nZ(Math.round(r).toString(16)),nZ(Math.round(i).toString(16)),nZ(nK(o))],e&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")},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*nX(this._r,255))+"%",g:Math.round(100*nX(this._g,255))+"%",b:Math.round(100*nX(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*nX(this._r,255))+"%, "+Math.round(100*nX(this._g,255))+"%, "+Math.round(100*nX(this._b,255))+"%)":"rgba("+Math.round(100*nX(this._r,255))+"%, "+Math.round(100*nX(this._g,255))+"%, "+Math.round(100*nX(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(nV[nE(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var n="#"+nP(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?"GradientType = 1, ":"";if(e){var o=nz(e);r="#"+nP(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+n+",endColorstr="+r+")"},toString:function(e){var n=!!e;e=e||this._format;var r=!1,i=this._a<1&&this._a>=0;return!n&&i&&("hex"===e||"hex6"===e||"hex3"===e||"hex4"===e||"hex8"===e||"name"===e)?"name"===e&&0===this._a?this.toName():this.toRgbString():("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),("hex"===e||"hex6"===e)&&(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return nz(this.toString())},_applyModification:function(e,n){var r=e.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(nR,arguments)},brighten:function(){return this._applyModification(nD,arguments)},darken:function(){return this._applyModification(nI,arguments)},desaturate:function(){return this._applyModification(nT,arguments)},saturate:function(){return this._applyModification(nj,arguments)},greyscale:function(){return this._applyModification(nN,arguments)},spin:function(){return this._applyModification(nU,arguments)},_applyCombination:function(e,n){return e.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(nB,arguments)},complement:function(){return this._applyCombination(nF,arguments)},monochromatic:function(){return this._applyCombination(n$,arguments)},splitcomplement:function(){return this._applyCombination(nq,arguments)},triad:function(){return this._applyCombination(nL,[3])},tetrad:function(){return this._applyCombination(nL,[4])}},nz.fromRatio=function(e,n){if("object"==nM(e)){var r={};for(var i in e)e.hasOwnProperty(i)&&("a"===i?r[i]=e[i]:r[i]=nQ(e[i]));e=r}return nz(e,n)},nz.equals=function(e,n){return!!e&&!!n&&nz(e).toRgbString()==nz(n).toRgbString()},nz.random=function(){return nz.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},nz.mix=function(e,n,r){r=0===r?0:r||50;var i=nz(e).toRgb(),o=nz(n).toRgb(),a=r/100;return nz({r:(o.r-i.r)*a+i.r,g:(o.g-i.g)*a+i.g,b:(o.b-i.b)*a+i.b,a:(o.a-i.a)*a+i.a})},nz.readability=function(e,n){var r=nz(e),i=nz(n);return(Math.max(r.getLuminance(),i.getLuminance())+.05)/(Math.min(r.getLuminance(),i.getLuminance())+.05)},nz.isReadable=function(e,n,r){var i,o,a,u,s,l=nz.readability(e,n);switch(s=!1,(o=((i=(i=r)||{level:"AA",size:"small"}).level||"AA").toUpperCase(),a=(i.size||"small").toLowerCase(),"AA"!==o&&"AAA"!==o&&(o="AA"),"small"!==a&&"large"!==a&&(a="small"),u={level:o,size:a}).level+u.size){case"AAsmall":case"AAAlarge":s=l>=4.5;break;case"AAlarge":s=l>=3;break;case"AAAsmall":s=l>=7}return s},nz.mostReadable=function(e,n,r){var i,o,a,u,s=null,l=0;o=(r=r||{}).includeFallbackColors,a=r.level,u=r.size;for(var c=0;c<n.length;c++)(i=nz.readability(e,n[c]))>l&&(l=i,s=nz(n[c]));return nz.isReadable(e,s,{level:a,size:u})||!o?s:(r.includeFallbackColors=!1,nz.mostReadable(e,["#fff","#000"],r))};var nH=nz.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"},nV=nz.hexNames=function(e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);return n}(nH);function nG(e){return(isNaN(e=parseFloat(e))||e<0||e>1)&&(e=1),e}function nX(e,n){"string"==typeof(r=e)&&-1!=r.indexOf(".")&&1===parseFloat(r)&&(e="100%");var r,i,o="string"==typeof(i=e)&&-1!=i.indexOf("%");return(e=Math.min(n,Math.max(0,parseFloat(e))),o&&(e=parseInt(e*n,10)/100),1e-6>Math.abs(e-n))?1:e%n/parseFloat(n)}function nW(e){return Math.min(1,Math.max(0,e))}function nY(e){return parseInt(e,16)}function nZ(e){return 1==e.length?"0"+e:""+e}function nQ(e){return e<=1&&(e=100*e+"%"),e}function nK(e){return Math.round(255*parseFloat(e)).toString(16)}var nJ=(n7="[\\s|\\(]+("+(n9="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+n9+")[,|\\s]+("+n9+")\\s*\\)?",rt="[\\s|\\(]+("+n9+")[,|\\s]+("+n9+")[,|\\s]+("+n9+")[,|\\s]+("+n9+")\\s*\\)?",{CSS_UNIT:new RegExp(n9),rgb:RegExp("rgb"+n7),rgba:RegExp("rgba"+rt),hsl:RegExp("hsl"+n7),hsla:RegExp("hsla"+rt),hsv:RegExp("hsv"+n7),hsva:RegExp("hsva"+rt),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 n0(e){return!!nJ.CSS_UNIT.exec(e)}function n1(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function n2(e,n,r){if("function"==typeof e?e===n:e.has(n))return arguments.length<3?n:r;throw TypeError("Private element is not present on this object")}function n5(e,n){return e.get(n2(e,n))}function n3(e,n,r){(function(e,n){if(n.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")})(e,n),n.set(e,r)}function n6(e,n,r){return e.set(n2(e,n),r),r}var n8,n4,n9,n7,rt,re,rn,rr,ri,ro,ra,ru,rs,rl,rc,rf,rh,rp,rd,rg,ry=function(e,n,r){return(e<<16)+(n<<8)+r},r_=function(e){var n=nz(e).toRgb();return ry(n.r,n.g,n.b)},rv=function(e,n){return 123*e%Math.pow(2,n)},rm=new WeakMap,rb=new WeakMap,rx=(re=function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6;(function(e,n){if(!(e instanceof n))throw TypeError("Cannot call a class as a function")})(this,e),n3(this,rm,void 0),n3(this,rb,void 0),n6(rb,this,n),this.reset()},rn=[{key:"reset",value:function(){n6(rm,this,["__reserved for background__"])}},{key:"register",value:function(e){if(n5(rm,this).length>=Math.pow(2,24-n5(rb,this)))return null;var n,r=n5(rm,this).length,i=rv(r,n5(rb,this)),o=(n=r+(i<<24-n5(rb,this)),"#".concat(Math.min(n,16777216).toString(16).padStart(6,"0")));return n5(rm,this).push(e),o}},{key:"lookup",value:function(e){if(!e)return null;var n="string"==typeof e?r_(e):ry.apply(void 0,function(e){if(Array.isArray(e))return n1(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return n1(e,void 0);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n1(e,void 0):void 0}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());if(!n)return null;var r=n&Math.pow(2,24-n5(rb,this))-1,i=n>>24-n5(rb,this)&Math.pow(2,n5(rb,this))-1;return rv(r,n5(rb,this))!==i||r>=n5(rm,this).length?null:n5(rm,this)[r]}}],function(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,function(e){var n=function(e,n){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,n);if("object"!=typeof i)return i;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof n?n:n+""}(i.key),i)}}(re.prototype,rn),Object.defineProperty(re,"prototype",{writable:!1}),re),rw={},rk=[],rM=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,rA=Array.isArray;function rS(e,n){for(var r in n)e[r]=n[r];return e}function rz(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function rO(e,n,r,i,o){var a={type:e,props:n,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++ra:o,__i:-1,__u:0};return null==o&&null!=ro.vnode&&ro.vnode(a),a}function rC(e){return e.children}function rE(e,n){this.props=e,this.context=n}function rP(e,n){if(null==n)return e.__?rP(e.__,e.__i+1):null;for(var r;n<e.__k.length;n++)if(null!=(r=e.__k[n])&&null!=r.__e)return r.__e;return"function"==typeof e.type?rP(e):null}function rT(e){(!e.__d&&(e.__d=!0)&&rs.push(e)&&!rj.__r++||rl!=ro.debounceRendering)&&((rl=ro.debounceRendering)||rc)(rj)}function rj(){for(var e,n,r,i,o,a,u=1;rs.length;)rs.length>u&&rs.sort(rf),e=rs.shift(),u=rs.length,e.__d&&(n=void 0,r=void 0,i=(r=e.__v).__e,o=[],a=[],e.__P&&((n=rS({},r)).__v=r.__v+1,ro.vnode&&ro.vnode(n),rU(e.__P,n,r,e.__n,e.__P.namespaceURI,32&r.__u?[i]:null,o,null==i?rP(r):i,!!(32&r.__u),a),n.__v=r.__v,n.__.__k[n.__i]=n,rL(o,n,a),r.__e=r.__=null,n.__e!=i&&function e(n){var r,i;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,r=0;r<n.__k.length;r++)if(null!=(i=n.__k[r])&&null!=i.__e){n.__e=n.__c.base=i.__e;break}return e(n)}}(n)));rj.__r=0}function rN(e,n,r,i,o,a,u,s,l,c,f){var h,p,d,g,y,_,v,m=i&&i.__k||rk,b=n.length;for(l=function(e,n,r,i,o){var a,u,s,l,c,f=r.length,h=f,p=0;for(e.__k=Array(o),a=0;a<o;a++)null!=(u=n[a])&&"boolean"!=typeof u&&"function"!=typeof u?("string"==typeof u||"number"==typeof u||"bigint"==typeof u||u.constructor==String?u=e.__k[a]=rO(null,u,null,null,null):rA(u)?u=e.__k[a]=rO(rC,{children:u},null,null,null):void 0===u.constructor&&u.__b>0?u=e.__k[a]=rO(u.type,u.props,u.key,u.ref?u.ref:null,u.__v):e.__k[a]=u,l=a+p,u.__=e,u.__b=e.__b+1,s=null,-1!=(c=u.__i=function(e,n,r,i){var o,a,u,s=e.key,l=e.type,c=n[r],f=null!=c&&0==(2&c.__u);if(null===c&&null==s||f&&s==c.key&&l==c.type)return r;if(i>(f?1:0)){for(o=r-1,a=r+1;o>=0||a<n.length;)if(null!=(c=n[u=o>=0?o--:a++])&&0==(2&c.__u)&&s==c.key&&l==c.type)return u}return -1}(u,r,l,h))&&(h--,(s=r[c])&&(s.__u|=2)),null==s||null==s.__v?(-1==c&&(o>f?p--:o<f&&p++),"function"!=typeof u.type&&(u.__u|=4)):c!=l&&(c==l-1?p--:c==l+1?p++:(c>l?p--:p++,u.__u|=4))):e.__k[a]=null;if(h)for(a=0;a<f;a++)null!=(s=r[a])&&0==(2&s.__u)&&(s.__e==i&&(i=rP(s)),function e(n,r,i){var o,a;if(ro.unmount&&ro.unmount(n),(o=n.ref)&&(o.current&&o.current!=n.__e||rq(o,null,r)),null!=(o=n.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){ro.__e(e,r)}o.base=o.__P=null}if(o=n.__k)for(a=0;a<o.length;a++)o[a]&&e(o[a],r,i||"function"!=typeof n.type);i||rz(n.__e),n.__c=n.__=n.__e=void 0}(s,s));return i}(r,n,m,l,b),h=0;h<b;h++)null!=(d=r.__k[h])&&(p=-1==d.__i?rw:m[d.__i]||rw,d.__i=h,_=rU(e,d,p,o,a,u,s,l,c,f),g=d.__e,d.ref&&p.ref!=d.ref&&(p.ref&&rq(p.ref,null,d),f.push(d.ref,d.__c||g,d)),null==y&&null!=g&&(y=g),(v=!!(4&d.__u))||p.__k===d.__k?l=function e(n,r,i,o){var a,u;if("function"==typeof n.type){for(a=n.__k,u=0;a&&u<a.length;u++)a[u]&&(a[u].__=n,r=e(a[u],r,i,o));return r}n.__e!=r&&(o&&(r&&n.type&&!r.parentNode&&(r=rP(n)),i.insertBefore(n.__e,r||null)),r=n.__e);do r=r&&r.nextSibling;while(null!=r&&8==r.nodeType);return r}(d,l,e,v):"function"==typeof d.type&&void 0!==_?l=_:g&&(l=g.nextSibling),d.__u&=-7);return r.__e=y,l}function rR(e,n,r){"-"==n[0]?e.setProperty(n,null==r?"":r):e[n]=null==r?"":"number"!=typeof r||rM.test(n)?r:r+"px"}function rD(e,n,r,i,o){var a,u;t:if("style"==n){if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof i&&(e.style.cssText=i=""),i)for(n in i)r&&n in r||rR(e.style,n,"");if(r)for(n in r)i&&r[n]==i[n]||rR(e.style,n,r[n])}}else if("o"==n[0]&&"n"==n[1])a=n!=(n=n.replace(rh,"$1")),n=(u=n.toLowerCase())in e||"onFocusOut"==n||"onFocusIn"==n?u.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+a]=r,r?i?r.u=i.u:(r.u=rp,e.addEventListener(n,a?rg:rd,a)):e.removeEventListener(n,a?rg:rd,a);else{if("http://www.w3.org/2000/svg"==o)n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=n&&"height"!=n&&"href"!=n&&"list"!=n&&"form"!=n&&"tabIndex"!=n&&"download"!=n&&"rowSpan"!=n&&"colSpan"!=n&&"role"!=n&&"popover"!=n&&n in e)try{e[n]=null==r?"":r;break t}catch(e){}"function"==typeof r||(null==r||!1===r&&"-"!=n[4]?e.removeAttribute(n):e.setAttribute(n,"popover"==n&&1==r?"":r))}}function rI(e){return function(n){if(this.l){var r=this.l[n.type+e];if(null==n.t)n.t=rp++;else if(n.t<r.u)return;return r(ro.event?ro.event(n):n)}}}function rU(e,n,r,i,o,a,u,s,l,c){var f,h,p,d,g,y,_,v,m,b,x,w,k,M,A,S,z,O=n.type;if(void 0!==n.constructor)return null;128&r.__u&&(l=!!(32&r.__u),a=[s=n.__e=r.__e]),(f=ro.__b)&&f(n);t:if("function"==typeof O)try{if(v=n.props,m="prototype"in O&&O.prototype.render,b=(f=O.contextType)&&i[f.__c],x=f?b?b.props.value:f.__:i,r.__c?_=(h=n.__c=r.__c).__=h.__E:(m?n.__c=h=new O(v,x):(n.__c=h=new rE(v,x),h.constructor=O,h.render=rB),b&&b.sub(h),h.state||(h.state={}),h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),m&&null==h.__s&&(h.__s=h.state),m&&null!=O.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=rS({},h.__s)),rS(h.__s,O.getDerivedStateFromProps(v,h.__s))),d=h.props,g=h.state,h.__v=n,p)m&&null==O.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),m&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(m&&null==O.getDerivedStateFromProps&&v!==d&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(v,x),n.__v==r.__v||!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(v,h.__s,x)){for(n.__v!=r.__v&&(h.props=v,h.state=h.__s,h.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function(e){e&&(e.__=n)}),w=0;w<h._sb.length;w++)h.__h.push(h._sb[w]);h._sb=[],h.__h.length&&u.push(h);break t}null!=h.componentWillUpdate&&h.componentWillUpdate(v,h.__s,x),m&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(d,g,y)})}if(h.context=x,h.props=v,h.__P=e,h.__e=!1,k=ro.__r,M=0,m){for(h.state=h.__s,h.__d=!1,k&&k(n),f=h.render(h.props,h.state,h.context),A=0;A<h._sb.length;A++)h.__h.push(h._sb[A]);h._sb=[]}else do h.__d=!1,k&&k(n),f=h.render(h.props,h.state,h.context),h.state=h.__s;while(h.__d&&++M<25);h.state=h.__s,null!=h.getChildContext&&(i=rS(rS({},i),h.getChildContext())),m&&!p&&null!=h.getSnapshotBeforeUpdate&&(y=h.getSnapshotBeforeUpdate(d,g)),S=f,null!=f&&f.type===rC&&null==f.key&&(S=function e(n){return"object"!=typeof n||null==n||n.__b&&n.__b>0?n:rA(n)?n.map(e):rS({},n)}(f.props.children)),s=rN(e,rA(S)?S:[S],n,r,i,o,a,u,s,l,c),h.base=n.__e,n.__u&=-161,h.__h.length&&u.push(h),_&&(h.__E=h.__=null)}catch(e){if(n.__v=null,l||null!=a){if(e.then){for(n.__u|=l?160:128;s&&8==s.nodeType&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,n.__e=s}else{for(z=a.length;z--;)rz(a[z]);rF(n)}}else n.__e=r.__e,n.__k=r.__k,e.then||rF(n);ro.__e(e,n,r)}else null==a&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):s=n.__e=function(e,n,r,i,o,a,u,s,l){var c,f,h,p,d,g,y,_=r.props||rw,v=n.props,m=n.type;if("svg"==m?o="http://www.w3.org/2000/svg":"math"==m?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=a){for(c=0;c<a.length;c++)if((d=a[c])&&"setAttribute"in d==!!m&&(m?d.localName==m:3==d.nodeType)){e=d,a[c]=null;break}}if(null==e){if(null==m)return document.createTextNode(v);e=document.createElementNS(o,m,v.is&&v),s&&(ro.__m&&ro.__m(n,a),s=!1),a=null}if(null==m)_===v||s&&e.data==v||(e.data=v);else{if(a=a&&ri.call(e.childNodes),!s&&null!=a)for(_={},c=0;c<e.attributes.length;c++)_[(d=e.attributes[c]).name]=d.value;for(c in _)if(d=_[c],"children"==c);else if("dangerouslySetInnerHTML"==c)h=d;else if(!(c in v)){if("value"==c&&"defaultValue"in v||"checked"==c&&"defaultChecked"in v)continue;rD(e,c,null,d,o)}for(c in v)d=v[c],"children"==c?p=d:"dangerouslySetInnerHTML"==c?f=d:"value"==c?g=d:"checked"==c?y=d:s&&"function"!=typeof d||_[c]===d||rD(e,c,d,_[c],o);if(f)s||h&&(f.__html==h.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),n.__k=[];else if(h&&(e.innerHTML=""),rN("template"==n.type?e.content:e,rA(p)?p:[p],n,r,i,"foreignObject"==m?"http://www.w3.org/1999/xhtml":o,a,u,a?a[0]:r.__k&&rP(r,0),s,l),null!=a)for(c=a.length;c--;)rz(a[c]);s||(c="value","progress"==m&&null==g?e.removeAttribute("value"):null==g||g===e[c]&&("progress"!=m||g)&&("option"!=m||g==_[c])||rD(e,c,g,_[c],o),c="checked",null!=y&&y!=e[c]&&rD(e,c,y,_[c],o))}return e}(r.__e,n,r,i,o,a,u,l,c);return(f=ro.diffed)&&f(n),128&n.__u?void 0:s}function rF(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(rF)}function rL(e,n,r){for(var i=0;i<r.length;i++)rq(r[i],r[++i],r[++i]);ro.__c&&ro.__c(n,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(e){e.call(n)})}catch(e){ro.__e(e,n.__v)}})}function rq(e,n,r){try{if("function"==typeof e){var i="function"==typeof e.__u;i&&e.__u(),i&&null==n||(e.__u=e(n))}else e.current=n}catch(e){ro.__e(e,r)}}function rB(e,n,r){return this.constructor(e,r)}function r$(e,n,r){var i,o,a,u,s=rS({},e.props);for(a in e.type&&e.type.defaultProps&&(u=e.type.defaultProps),n)"key"==a?i=n[a]:"ref"==a?o=n[a]:s[a]=void 0===n[a]&&null!=u?u[a]:n[a];return arguments.length>2&&(s.children=arguments.length>3?ri.call(arguments,2):r),rO(e.type,s,i||e.key,o||e.ref,null)}function rH(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function rV(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function rG(e){return(rG="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})(e)}ri=rk.slice,ro={__e:function(e,n,r,i){for(var o,a,u;n=n.__;)if((o=n.__c)&&!o.__)try{if((a=o.constructor)&&null!=a.getDerivedStateFromError&&(o.setState(a.getDerivedStateFromError(e)),u=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,i||{}),u=o.__d),u)return o.__E=o}catch(n){e=n}throw e}},ra=0,ru=function(e){return null!=e&&void 0===e.constructor},rE.prototype.setState=function(e,n){var r;r=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=rS({},this.state),"function"==typeof e&&(e=e(rS({},r),this.props)),e&&rS(r,e),null!=e&&this.__v&&(n&&this._sb.push(n),rT(this))},rE.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),rT(this))},rE.prototype.render=rC,rs=[],rc="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,rf=function(e,n){return e.__v.__b-n.__v.__b},rj.__r=0,rh=/(PointerCapture)$|Capture$/i,rp=0,rd=rI(!1),rg=rI(!0);var rX=function(e){if("object"!==rG(e))return e;var n,r=r$(e);return r.props&&(r.props=function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?rV(Object(r),!0).forEach(function(n){var i,o;i=n,o=r[n],(i=function(e){var n=function(e,n){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,n);if("object"!=typeof i)return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==typeof n?n:n+""}(i))in e?Object.defineProperty(e,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rV(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}({},r.props),null!=r&&null!==(n=r.props)&&void 0!==n&&n.children&&(r.props.children=Array.isArray(r.props.children)?r.props.children.map(rX):rX(r.props.children))),r},rW=function(e,n){var r,i,o,a,u,s;delete n.__k,r=rX(e),(i=n)==document&&(i=document.documentElement),ro.__&&ro.__(r,i),a=o&&o.__k||i.__k,u=[],s=[],rU(i,r=(o||i).__k=function(e,n,r){var i,o,a,u={};for(a in n)"key"==a?i=n[a]:"ref"==a?o=n[a]:u[a]=n[a];if(arguments.length>2&&(u.children=arguments.length>3?ri.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===u[a]&&(u[a]=e.defaultProps[a]);return rO(e,u,i,o,null)}(rC,null,[r]),a||rw,rw,i.namespaceURI,o?[o]:a?null:i.firstChild?ri.call(i.childNodes):null,u,o||(a?a.__e:i.firstChild),!1,s),rL(u,r,s)};!function(e,n){void 0===n&&(n={});var r=n.insertAt;if("undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".float-tooltip-kap {\n position: absolute;\n width: max-content; /* prevent shrinking near right edge */\n max-width: max(50%, 150px);\n padding: 3px 5px;\n border-radius: 3px;\n font: 12px sans-serif;\n color: #eee;\n background: rgba(0,0,0,0.6);\n pointer-events: none;\n}\n");var rY=nw({props:{content:{default:!1},offsetX:{triggerUpdate:!1},offsetY:{triggerUpdate:!1}},init:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.style,o=tt(e&&"object"===rG(e)&&e.node&&"function"==typeof e.node?e.node():e);"static"===o.style("position")&&o.style("position","relative"),n.tooltipEl=o.append("div").attr("class","float-tooltip-kap"),Object.entries(void 0===i?{}:i).forEach(function(e){var r=function(e){if(Array.isArray(e))return e}(e)||function(e,n){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var i,o,a,u,s=[],l=!0,c=!1;try{for(a=(r=r.call(e)).next;!(l=(i=a.call(r)).done)&&(s.push(i.value),2!==s.length);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(c)throw o}}return s}}(e,2)||function(e,n){if(e){if("string"==typeof e)return rH(e,2);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?rH(e,2):void 0}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=r[0],o=r[1];return n.tooltipEl.style(i,o)}),n.tooltipEl.style("left","-10000px").style("display","none");var a="tooltip-".concat(Math.round(1e12*Math.random()));n.mouseInside=!1,o.on("mousemove.".concat(a),function(e){n.mouseInside=!0;var r=tp(e),i=o.node(),a=i.offsetWidth,u=i.offsetHeight,s=[null===n.offsetX||void 0===n.offsetX?"-".concat(r[0]/a*100,"%"):"number"==typeof n.offsetX?"calc(-50% + ".concat(n.offsetX,"px)"):n.offsetX,null===n.offsetY||void 0===n.offsetY?u>130&&u-r[1]<100?"calc(-100% - 6px)":"21px":"number"==typeof n.offsetY?n.offsetY<0?"calc(-100% - ".concat(Math.abs(n.offsetY),"px)"):"".concat(n.offsetY,"px"):n.offsetY];n.tooltipEl.style("left",r[0]+"px").style("top",r[1]+"px").style("transform","translate(".concat(s.join(","),")")),n.content&&n.tooltipEl.style("display","inline")}),o.on("mouseover.".concat(a),function(){n.mouseInside=!0,n.content&&n.tooltipEl.style("display","inline")}),o.on("mouseout.".concat(a),function(){n.mouseInside=!1,n.tooltipEl.style("display","none")})},update:function(e){(e.tooltipEl.style("display",e.content&&e.mouseInside?"inline":"none"),e.content)?e.content instanceof HTMLElement?(e.tooltipEl.text(""),e.tooltipEl.append(function(){return e.content})):"string"==typeof e.content?e.tooltipEl.html(e.content):ru(r$(e.content))?(e.tooltipEl.text(""),rW(e.content,e.tooltipEl.node())):(e.tooltipEl.style("display","none"),console.warn("Tooltip content is invalid, skipping.",e.content,e.content.toString())):e.tooltipEl.text("")}});function rZ(e){return e.x}function rQ(e){return e.y}function rK(e){return e.z}var rJ=Math.PI*(3-Math.sqrt(5)),r0=20*Math.PI/(9+Math.sqrt(221));function r1(e){return function(){return e}}function r2(e){return(e()-.5)*1e-6}function r5(e){return e.index}function r3(e,n){var r=e.get(n);if(!r)throw Error("node not found: "+n);return r}function r6(e,n,r){if(isNaN(n))return e;var i,o,a,u,s,l,c=e._root,f={data:r},h=e._x0,p=e._x1;if(!c)return e._root=f,e;for(;c.length;)if((u=n>=(o=(h+p)/2))?h=o:p=o,i=c,!(c=c[s=+u]))return i[s]=f,e;if(n===(a=+e._x.call(null,c.data)))return f.next=c,i?i[s]=f:e._root=f,e;do i=i?i[s]=[,,]:e._root=[,,],(u=n>=(o=(h+p)/2))?h=o:p=o;while((s=+u)==(l=+(a>=o)));return i[l]=c,i[s]=f,e}function r8(e,n,r){this.node=e,this.x0=n,this.x1=r}function r4(e){return e[0]}function r9(e,n){var r=new r7(null==n?r4:n,NaN,NaN);return null==e?r:r.addAll(e)}function r7(e,n,r){this._x=e,this._x0=n,this._x1=r,this._root=void 0}function it(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var ie=r9.prototype=r7.prototype;ie.copy=function(){var e,n,r=new r7(this._x,this._x0,this._x1),i=this._root;if(!i)return r;if(!i.length)return r._root=it(i),r;for(e=[{source:i,target:r._root=[,,]}];i=e.pop();)for(var o=0;o<2;++o)(n=i.source[o])&&(n.length?e.push({source:n,target:i.target[o]=[,,]}):i.target[o]=it(n));return r},ie.add=function(e){let n=+this._x.call(null,e);return r6(this.cover(n),n,e)},ie.addAll=function(e){Array.isArray(e)||(e=Array.from(e));let n=e.length,r=new Float64Array(n),i=1/0,o=-1/0;for(let a=0,u;a<n;++a)!isNaN(u=+this._x.call(null,e[a]))&&(r[a]=u,u<i&&(i=u),u>o&&(o=u));if(i>o)return this;this.cover(i).cover(o);for(let i=0;i<n;++i)r6(this,r[i],e[i]);return this},ie.cover=function(e){if(isNaN(e=+e))return this;var n=this._x0,r=this._x1;if(isNaN(n))r=(n=Math.floor(e))+1;else{for(var i,o,a=r-n||1,u=this._root;n>e||e>=r;)switch(o=+(e<n),(i=[,,])[o]=u,u=i,a*=2,o){case 0:r=n+a;break;case 1:n=r-a}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._x1=r,this},ie.data=function(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e},ie.extent=function(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]},ie.find=function(e,n){var r,i,o,a,u,s=this._x0,l=this._x1,c=[],f=this._root;for(f&&c.push(new r8(f,s,l)),null==n?n=1/0:(s=e-n,l=e+n);a=c.pop();)if((f=a.node)&&!((i=a.x0)>l)&&!((o=a.x1)<s)){if(f.length){var h=(i+o)/2;c.push(new r8(f[1],h,o),new r8(f[0],i,h)),(u=+(e>=h))&&(a=c[c.length-1],c[c.length-1]=c[c.length-1-u],c[c.length-1-u]=a)}else{var p=Math.abs(e-+this._x.call(null,f.data));p<n&&(n=p,s=e-p,l=e+p,r=f.data)}}return r},ie.remove=function(e){if(isNaN(a=+this._x.call(null,e)))return this;var n,r,i,o,a,u,s,l,c,f=this._root,h=this._x0,p=this._x1;if(!f)return this;if(f.length)for(;;){if((s=a>=(u=(h+p)/2))?h=u:p=u,n=f,!(f=f[l=+s]))return this;if(!f.length)break;n[l+1&1]&&(r=n,c=l)}for(;f.data!==e;)if(i=f,!(f=f.next))return this;return((o=f.next)&&delete f.next,i)?o?i.next=o:delete i.next:n?(o?n[l]=o:delete n[l],(f=n[0]||n[1])&&f===(n[1]||n[0])&&!f.length&&(r?r[c]=f:this._root=f)):this._root=o,this},ie.removeAll=function(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this},ie.root=function(){return this._root},ie.size=function(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e},ie.visit=function(e){var n,r,i,o,a=[],u=this._root;for(u&&a.push(new r8(u,this._x0,this._x1));n=a.pop();)if(!e(u=n.node,i=n.x0,o=n.x1)&&u.length){var s=(i+o)/2;(r=u[1])&&a.push(new r8(r,s,o)),(r=u[0])&&a.push(new r8(r,i,s))}return this},ie.visitAfter=function(e){var n,r=[],i=[];for(this._root&&r.push(new r8(this._root,this._x0,this._x1));n=r.pop();){var o=n.node;if(o.length){var a,u=n.x0,s=n.x1,l=(u+s)/2;(a=o[0])&&r.push(new r8(a,u,l)),(a=o[1])&&r.push(new r8(a,l,s))}i.push(n)}for(;n=i.pop();)e(n.node,n.x0,n.x1);return this},ie.x=function(e){return arguments.length?(this._x=e,this):this._x};var ir=r(7238);function ii(e,n,r,i,o){if(isNaN(n)||isNaN(r)||isNaN(i))return e;var a,u,s,l,c,f,h,p,d,g,y,_,v=e._root,m={data:o},b=e._x0,x=e._y0,w=e._z0,k=e._x1,M=e._y1,A=e._z1;if(!v)return e._root=m,e;for(;v.length;)if((p=n>=(u=(b+k)/2))?b=u:k=u,(d=r>=(s=(x+M)/2))?x=s:M=s,(g=i>=(l=(w+A)/2))?w=l:A=l,a=v,!(v=v[y=g<<2|d<<1|p]))return a[y]=m,e;if(c=+e._x.call(null,v.data),f=+e._y.call(null,v.data),h=+e._z.call(null,v.data),n===c&&r===f&&i===h)return m.next=v,a?a[y]=m:e._root=m,e;do a=a?a[y]=Array(8):e._root=Array(8),(p=n>=(u=(b+k)/2))?b=u:k=u,(d=r>=(s=(x+M)/2))?x=s:M=s,(g=i>=(l=(w+A)/2))?w=l:A=l;while((y=g<<2|d<<1|p)==(_=(h>=l)<<2|(f>=s)<<1|c>=u));return a[_]=v,a[y]=m,e}function io(e,n,r,i,o,a,u){this.node=e,this.x0=n,this.y0=r,this.z0=i,this.x1=o,this.y1=a,this.z1=u}let ia=(e,n,r,i,o,a)=>Math.sqrt((e-i)**2+(n-o)**2+(r-a)**2);function iu(e){return e[0]}function is(e){return e[1]}function il(e){return e[2]}function ic(e,n,r,i){var o=new ih(null==n?iu:n,null==r?is:r,null==i?il:i,NaN,NaN,NaN,NaN,NaN,NaN);return null==e?o:o.addAll(e)}function ih(e,n,r,i,o,a,u,s,l){this._x=e,this._y=n,this._z=r,this._x0=i,this._y0=o,this._z0=a,this._x1=u,this._y1=s,this._z1=l,this._root=void 0}function ip(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var id=ic.prototype=ih.prototype;id.copy=function(){var e,n,r=new ih(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),i=this._root;if(!i)return r;if(!i.length)return r._root=ip(i),r;for(e=[{source:i,target:r._root=Array(8)}];i=e.pop();)for(var o=0;o<8;++o)(n=i.source[o])&&(n.length?e.push({source:n,target:i.target[o]=Array(8)}):i.target[o]=ip(n));return r},id.add=function(e){let n=+this._x.call(null,e),r=+this._y.call(null,e),i=+this._z.call(null,e);return ii(this.cover(n,r,i),n,r,i,e)},id.addAll=function(e){Array.isArray(e)||(e=Array.from(e));let n=e.length,r=new Float64Array(n),i=new Float64Array(n),o=new Float64Array(n),a=1/0,u=1/0,s=1/0,l=-1/0,c=-1/0,f=-1/0;for(let h=0,p,d,g,y;h<n;++h)!(isNaN(d=+this._x.call(null,p=e[h]))||isNaN(g=+this._y.call(null,p))||isNaN(y=+this._z.call(null,p)))&&(r[h]=d,i[h]=g,o[h]=y,d<a&&(a=d),d>l&&(l=d),g<u&&(u=g),g>c&&(c=g),y<s&&(s=y),y>f&&(f=y));if(a>l||u>c||s>f)return this;this.cover(a,u,s).cover(l,c,f);for(let a=0;a<n;++a)ii(this,r[a],i[a],o[a],e[a]);return this},id.cover=function(e,n,r){if(isNaN(e=+e)||isNaN(n=+n)||isNaN(r=+r))return this;var i=this._x0,o=this._y0,a=this._z0,u=this._x1,s=this._y1,l=this._z1;if(isNaN(i))u=(i=Math.floor(e))+1,s=(o=Math.floor(n))+1,l=(a=Math.floor(r))+1;else{for(var c,f,h=u-i||1,p=this._root;i>e||e>=u||o>n||n>=s||a>r||r>=l;)switch(f=(r<a)<<2|(n<o)<<1|e<i,(c=Array(8))[f]=p,p=c,h*=2,f){case 0:u=i+h,s=o+h,l=a+h;break;case 1:i=u-h,s=o+h,l=a+h;break;case 2:u=i+h,o=s-h,l=a+h;break;case 3:i=u-h,o=s-h,l=a+h;break;case 4:u=i+h,s=o+h,a=l-h;break;case 5:i=u-h,s=o+h,a=l-h;break;case 6:u=i+h,o=s-h,a=l-h;break;case 7:i=u-h,o=s-h,a=l-h}this._root&&this._root.length&&(this._root=p)}return this._x0=i,this._y0=o,this._z0=a,this._x1=u,this._y1=s,this._z1=l,this},id.data=function(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e},id.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]]},id.find=function(e,n,r,i){var o,a,u,s,l,c,f,h,p,d=this._x0,g=this._y0,y=this._z0,_=this._x1,v=this._y1,m=this._z1,b=[],x=this._root;for(x&&b.push(new io(x,d,g,y,_,v,m)),null==i?i=1/0:(d=e-i,g=n-i,y=r-i,_=e+i,v=n+i,m=r+i,i*=i);h=b.pop();)if((x=h.node)&&!((a=h.x0)>_)&&!((u=h.y0)>v)&&!((s=h.z0)>m)&&!((l=h.x1)<d)&&!((c=h.y1)<g)&&!((f=h.z1)<y)){if(x.length){var w=(a+l)/2,k=(u+c)/2,M=(s+f)/2;b.push(new io(x[7],w,k,M,l,c,f),new io(x[6],a,k,M,w,c,f),new io(x[5],w,u,M,l,k,f),new io(x[4],a,u,M,w,k,f),new io(x[3],w,k,s,l,c,M),new io(x[2],a,k,s,w,c,M),new io(x[1],w,u,s,l,k,M),new io(x[0],a,u,s,w,k,M)),(p=(r>=M)<<2|(n>=k)<<1|e>=w)&&(h=b[b.length-1],b[b.length-1]=b[b.length-1-p],b[b.length-1-p]=h)}else{var A=e-+this._x.call(null,x.data),S=n-+this._y.call(null,x.data),z=r-+this._z.call(null,x.data),O=A*A+S*S+z*z;if(O<i){var C=Math.sqrt(i=O);d=e-C,g=n-C,y=r-C,_=e+C,v=n+C,m=r+C,o=x.data}}}return o},id.findAllWithinRadius=function(e,n,r,i){let o=[],a=e-i,u=n-i,s=r-i,l=e+i,c=n+i,f=r+i;return this.visit((h,p,d,g,y,_,v)=>{if(!h.length)do{let a=h.data;ia(e,n,r,this._x(a),this._y(a),this._z(a))<=i&&o.push(a)}while(h=h.next);return p>l||d>c||g>f||y<a||_<u||v<s}),o},id.remove=function(e){if(isNaN(a=+this._x.call(null,e))||isNaN(u=+this._y.call(null,e))||isNaN(s=+this._z.call(null,e)))return this;var n,r,i,o,a,u,s,l,c,f,h,p,d,g,y,_=this._root,v=this._x0,m=this._y0,b=this._z0,x=this._x1,w=this._y1,k=this._z1;if(!_)return this;if(_.length)for(;;){if((h=a>=(l=(v+x)/2))?v=l:x=l,(p=u>=(c=(m+w)/2))?m=c:w=c,(d=s>=(f=(b+k)/2))?b=f:k=f,n=_,!(_=_[g=d<<2|p<<1|h]))return this;if(!_.length)break;(n[g+1&7]||n[g+2&7]||n[g+3&7]||n[g+4&7]||n[g+5&7]||n[g+6&7]||n[g+7&7])&&(r=n,y=g)}for(;_.data!==e;)if(i=_,!(_=_.next))return this;return((o=_.next)&&delete _.next,i)?o?i.next=o:delete i.next:n?(o?n[g]=o:delete n[g],(_=n[0]||n[1]||n[2]||n[3]||n[4]||n[5]||n[6]||n[7])&&_===(n[7]||n[6]||n[5]||n[4]||n[3]||n[2]||n[1]||n[0])&&!_.length&&(r?r[y]=_:this._root=_)):this._root=o,this},id.removeAll=function(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this},id.root=function(){return this._root},id.size=function(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e},id.visit=function(e){var n,r,i,o,a,u,s,l,c=[],f=this._root;for(f&&c.push(new io(f,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));n=c.pop();)if(!e(f=n.node,i=n.x0,o=n.y0,a=n.z0,u=n.x1,s=n.y1,l=n.z1)&&f.length){var h=(i+u)/2,p=(o+s)/2,d=(a+l)/2;(r=f[7])&&c.push(new io(r,h,p,d,u,s,l)),(r=f[6])&&c.push(new io(r,i,p,d,h,s,l)),(r=f[5])&&c.push(new io(r,h,o,d,u,p,l)),(r=f[4])&&c.push(new io(r,i,o,d,h,p,l)),(r=f[3])&&c.push(new io(r,h,p,a,u,s,d)),(r=f[2])&&c.push(new io(r,i,p,a,h,s,d)),(r=f[1])&&c.push(new io(r,h,o,a,u,p,d)),(r=f[0])&&c.push(new io(r,i,o,a,h,p,d))}return this},id.visitAfter=function(e){var n,r=[],i=[];for(this._root&&r.push(new io(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));n=r.pop();){var o=n.node;if(o.length){var a,u=n.x0,s=n.y0,l=n.z0,c=n.x1,f=n.y1,h=n.z1,p=(u+c)/2,d=(s+f)/2,g=(l+h)/2;(a=o[0])&&r.push(new io(a,u,s,l,p,d,g)),(a=o[1])&&r.push(new io(a,p,s,l,c,d,g)),(a=o[2])&&r.push(new io(a,u,d,l,p,f,g)),(a=o[3])&&r.push(new io(a,p,d,l,c,f,g)),(a=o[4])&&r.push(new io(a,u,s,g,p,d,h)),(a=o[5])&&r.push(new io(a,p,s,g,c,d,h)),(a=o[6])&&r.push(new io(a,u,d,g,p,f,h)),(a=o[7])&&r.push(new io(a,p,d,g,c,f,h))}i.push(n)}for(;n=i.pop();)e(n.node,n.x0,n.y0,n.z0,n.x1,n.y1,n.z1);return this},id.x=function(e){return arguments.length?(this._x=e,this):this._x},id.y=function(e){return arguments.length?(this._y=e,this):this._y},id.z=function(e){return arguments.length?(this._z=e,this):this._z};let{abs:ig,cos:iy,sin:i_,acos:iv,atan2:im,sqrt:ib,pow:ix}=Math;function iw(e){return e<0?-ix(-e,1/3):ix(e,1/3)}let ik=Math.PI,iM=2*ik,iA=ik/2,iS=Number.MAX_SAFE_INTEGER||9007199254740991,iz=Number.MIN_SAFE_INTEGER||-9007199254740991,iO={x:0,y:0,z:0},iC={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(e,n){let r=n(e),i=r.x*r.x+r.y*r.y;return void 0!==r.z&&(i+=r.z*r.z),ib(i)},compute:function(e,n,r){if(0===e)return n[0].t=0,n[0];let i=n.length-1;if(1===e)return n[i].t=1,n[i];let o=1-e,a=n;if(0===i)return n[0].t=e,n[0];if(1===i){let n={x:o*a[0].x+e*a[1].x,y:o*a[0].y+e*a[1].y,t:e};return r&&(n.z=o*a[0].z+e*a[1].z),n}if(i<4){let n=o*o,u=e*e,s,l,c,f=0;2===i?(a=[a[0],a[1],a[2],iO],s=n,l=o*e*2,c=u):3===i&&(s=n*o,l=n*e*3,c=o*u*3,f=e*u);let h={x:s*a[0].x+l*a[1].x+c*a[2].x+f*a[3].x,y:s*a[0].y+l*a[1].y+c*a[2].y+f*a[3].y,t:e};return r&&(h.z=s*a[0].z+l*a[1].z+c*a[2].z+f*a[3].z),h}let u=JSON.parse(JSON.stringify(n));for(;u.length>1;){for(let n=0;n<u.length-1;n++)u[n]={x:u[n].x+(u[n+1].x-u[n].x)*e,y:u[n].y+(u[n+1].y-u[n].y)*e},void 0!==u[n].z&&(u[n].z=u[n].z+(u[n+1].z-u[n].z)*e);u.splice(u.length-1,1)}return u[0].t=e,u[0]},computeWithRatios:function(e,n,r,i){let o=1-e,a=r[0],u=r[1],s=r[2],l=r[3],c;return(a*=o,u*=e,2===n.length)?(c=a+u,{x:(a*n[0].x+u*n[1].x)/c,y:(a*n[0].y+u*n[1].y)/c,z:!!i&&(a*n[0].z+u*n[1].z)/c,t:e}):(a*=o,u*=2*o,s*=e*e,3===n.length)?(c=a+u+s,{x:(a*n[0].x+u*n[1].x+s*n[2].x)/c,y:(a*n[0].y+u*n[1].y+s*n[2].y)/c,z:!!i&&(a*n[0].z+u*n[1].z+s*n[2].z)/c,t:e}):(a*=o,u*=1.5*o,s*=3*o,l*=e*e*e,4===n.length)?(c=a+u+s+l,{x:(a*n[0].x+u*n[1].x+s*n[2].x+l*n[3].x)/c,y:(a*n[0].y+u*n[1].y+s*n[2].y+l*n[3].y)/c,z:!!i&&(a*n[0].z+u*n[1].z+s*n[2].z+l*n[3].z)/c,t:e}):void 0},derive:function(e,n){let r=[];for(let i=e,o=i.length,a=o-1;o>1;o--,a--){let e=[];for(let r=0,o;r<a;r++)o={x:a*(i[r+1].x-i[r].x),y:a*(i[r+1].y-i[r].y)},n&&(o.z=a*(i[r+1].z-i[r].z)),e.push(o);r.push(e),i=e}return r},between:function(e,n,r){return n<=e&&e<=r||iC.approximately(e,n)||iC.approximately(e,r)},approximately:function(e,n,r){return ig(e-n)<=(r||1e-6)},length:function(e){let n=iC.Tvalues.length,r=0;for(let i=0,o;i<n;i++)o=.5*iC.Tvalues[i]+.5,r+=iC.Cvalues[i]*iC.arcfn(o,e);return .5*r},map:function(e,n,r,i,o){return i+(e-n)/(r-n)*(o-i)},lerp:function(e,n,r){let i={x:n.x+e*(r.x-n.x),y:n.y+e*(r.y-n.y)};return void 0!==n.z&&void 0!==r.z&&(i.z=n.z+e*(r.z-n.z)),i},pointToString:function(e){let n=e.x+"/"+e.y;return void 0!==e.z&&(n+="/"+e.z),n},pointsToString:function(e){return"["+e.map(iC.pointToString).join(", ")+"]"},copy:function(e){return JSON.parse(JSON.stringify(e))},angle:function(e,n,r){let i=n.x-e.x,o=n.y-e.y,a=r.x-e.x,u=r.y-e.y;return im(i*u-o*a,i*a+o*u)},round:function(e,n){let r=""+e,i=r.indexOf(".");return parseFloat(r.substring(0,i+1+n))},dist:function(e,n){let r=e.x-n.x,i=e.y-n.y;return ib(r*r+i*i)},closest:function(e,n){let r=ix(2,63),i,o;return e.forEach(function(e,a){(o=iC.dist(n,e))<r&&(r=o,i=a)}),{mdist:r,mpos:i}},abcratio:function(e,n){if(2!==n&&3!==n)return!1;if(void 0===e)e=.5;else if(0===e||1===e)return e;let r=ix(e,n)+ix(1-e,n);return ig((r-1)/r)},projectionratio:function(e,n){if(2!==n&&3!==n)return!1;if(void 0===e)e=.5;else if(0===e||1===e)return e;let r=ix(1-e,n),i=ix(e,n)+r;return r/i},lli8:function(e,n,r,i,o,a,u,s){let l=(e-r)*(a-s)-(n-i)*(o-u);return 0!=l&&{x:((e*i-n*r)*(o-u)-(e-r)*(o*s-a*u))/l,y:((e*i-n*r)*(a-s)-(n-i)*(o*s-a*u))/l}},lli4:function(e,n,r,i){let o=e.x,a=e.y,u=n.x,s=n.y,l=r.x,c=r.y,f=i.x,h=i.y;return iC.lli8(o,a,u,s,l,c,f,h)},lli:function(e,n){return iC.lli4(e,e.c,n,n.c)},makeline:function(e,n){return new iF(e.x,e.y,(e.x+n.x)/2,(e.y+n.y)/2,n.x,n.y)},findbbox:function(e){let n=iS,r=iS,i=iz,o=iz;return e.forEach(function(e){let a=e.bbox();n>a.x.min&&(n=a.x.min),r>a.y.min&&(r=a.y.min),i<a.x.max&&(i=a.x.max),o<a.y.max&&(o=a.y.max)}),{x:{min:n,mid:(n+i)/2,max:i,size:i-n},y:{min:r,mid:(r+o)/2,max:o,size:o-r}}},shapeintersections:function(e,n,r,i,o){if(!iC.bboxoverlap(n,i))return[];let a=[],u=[e.startcap,e.forward,e.back,e.endcap],s=[r.startcap,r.forward,r.back,r.endcap];return u.forEach(function(n){n.virtual||s.forEach(function(i){if(i.virtual)return;let u=n.intersects(i,o);u.length>0&&(u.c1=n,u.c2=i,u.s1=e,u.s2=r,a.push(u))})}),a},makeshape:function(e,n,r){let i=n.points.length,o=e.points.length,a=iC.makeline(n.points[i-1],e.points[0]),u=iC.makeline(e.points[o-1],n.points[0]),s={startcap:a,forward:e,back:n,endcap:u,bbox:iC.findbbox([a,e,n,u])};return s.intersections=function(e){return iC.shapeintersections(s,s.bbox,e,e.bbox,r)},s},getminmax:function(e,n,r){if(!r)return{min:0,max:0};let i=iS,o=iz,a,u;-1===r.indexOf(0)&&(r=[0].concat(r)),-1===r.indexOf(1)&&r.push(1);for(let s=0,l=r.length;s<l;s++)a=r[s],(u=e.get(a))[n]<i&&(i=u[n]),u[n]>o&&(o=u[n]);return{min:i,mid:(i+o)/2,max:o,size:o-i}},align:function(e,n){let r=n.p1.x,i=n.p1.y,o=-im(n.p2.y-i,n.p2.x-r);return e.map(function(e){return{x:(e.x-r)*iy(o)-(e.y-i)*i_(o),y:(e.x-r)*i_(o)+(e.y-i)*iy(o)}})},roots:function(e,n){let r,i,o;n=n||{p1:{x:0,y:0},p2:{x:1,y:0}};let a=e.length-1,u=iC.align(e,n),s=function(e){return 0<=e&&e<=1};if(2===a){let e=u[0].y,n=u[1].y,r=u[2].y,i=e-2*n+r;if(0!==i){let o=-ib(n*n-e*r),a=-e+n;return[-(o+a)/i,-(-o+a)/i].filter(s)}return n!==r&&0===i?[(2*n-r)/(2*n-2*r)].filter(s):[]}let l=u[0].y,c=u[1].y,f=u[2].y,h=-l+3*c-3*f+u[3].y,p=3*l-6*c+3*f,d=-3*l+3*c,g=l;if(iC.approximately(h,0)){if(iC.approximately(p,0))return iC.approximately(d,0)?[]:[-g/d].filter(s);let e=ib(d*d-4*p*g),n=2*p;return[(e-d)/n,(-d-e)/n].filter(s)}p/=h;let y=(3*(d/=h)-p*p)/3,_=y/3,v=(2*p*p*p-9*p*d+27*(g/=h))/27,m=v/2,b=m*m+_*_*_;if(b<0){let e=-y/3,n=ib(e*e*e),r=-v/(2*n),o=iv(r<-1?-1:r>1?1:r),a=2*iw(n);return[i=a*iy(o/3)-p/3,a*iy((o+iM)/3)-p/3,a*iy((o+2*iM)/3)-p/3].filter(s)}if(0===b)return[i=2*(r=m<0?iw(-m):-iw(m))-p/3,-r-p/3].filter(s);{let e=ib(b);return[(r=iw(-m+e))-iw(m+e)-p/3].filter(s)}},droots:function(e){if(3===e.length){let n=e[0],r=e[1],i=e[2],o=n-2*r+i;if(0!==o){let e=-ib(r*r-n*i),a=-n+r;return[-(e+a)/o,-(-e+a)/o]}return r!==i&&0===o?[(2*r-i)/(2*(r-i))]:[]}if(2===e.length){let n=e[0],r=e[1];if(n!==r)return[n/(n-r)]}return[]},curvature:function(e,n,r,i,o){let a,u,s,l,c=0,f=0,h=iC.compute(e,n),p=iC.compute(e,r),d=h.x*h.x+h.y*h.y;if(i?(a=ib(ix(h.y*p.z-p.y*h.z,2)+ix(h.z*p.x-p.z*h.x,2)+ix(h.x*p.y-p.x*h.y,2)),u=ix(d+h.z*h.z,1.5)):(a=h.x*p.y-h.y*p.x,u=ix(d,1.5)),0===a||0===u)return{k:0,r:0};if(c=a/u,f=u/a,!o){let o=iC.curvature(e-.001,n,r,i,!0).k,a=iC.curvature(e+.001,n,r,i,!0).k;l=(a-c+(c-o))/2,s=(ig(a-c)+ig(c-o))/2}return{k:c,r:f,dk:l,adk:s}},inflections:function(e){if(e.length<4)return[];let n=iC.align(e,{p1:e[0],p2:e.slice(-1)[0]}),r=n[2].x*n[1].y,i=n[3].x*n[1].y,o=n[1].x*n[2].y,a=18*(-3*r+2*i+3*o-n[3].x*n[2].y),u=18*(3*r-i-3*o),s=18*(o-r);if(iC.approximately(a,0)){if(!iC.approximately(u,0)){let e=-s/u;if(0<=e&&e<=1)return[e]}return[]}let l=2*a;if(iC.approximately(l,0))return[];let c=u*u-4*a*s;if(c<0)return[];let f=Math.sqrt(c);return[(f-u)/l,-(u+f)/l].filter(function(e){return 0<=e&&e<=1})},bboxoverlap:function(e,n){let r=["x","y"],i=r.length;for(let o=0,a,u,s,l;o<i;o++)if(u=e[a=r[o]].mid,s=n[a].mid,l=(e[a].size+n[a].size)/2,ig(u-s)>=l)return!1;return!0},expandbox:function(e,n){n.x.min<e.x.min&&(e.x.min=n.x.min),n.y.min<e.y.min&&(e.y.min=n.y.min),n.z&&n.z.min<e.z.min&&(e.z.min=n.z.min),n.x.max>e.x.max&&(e.x.max=n.x.max),n.y.max>e.y.max&&(e.y.max=n.y.max),n.z&&n.z.max>e.z.max&&(e.z.max=n.z.max),e.x.mid=(e.x.min+e.x.max)/2,e.y.mid=(e.y.min+e.y.max)/2,e.z&&(e.z.mid=(e.z.min+e.z.max)/2),e.x.size=e.x.max-e.x.min,e.y.size=e.y.max-e.y.min,e.z&&(e.z.size=e.z.max-e.z.min)},pairiteration:function(e,n,r){let i=e.bbox(),o=n.bbox(),a=r||.5;if(i.x.size+i.y.size<a&&o.x.size+o.y.size<a)return[(1e5*(e._t1+e._t2)/2|0)/1e5+"/"+(1e5*(n._t1+n._t2)/2|0)/1e5];let u=e.split(.5),s=n.split(.5),l=[{left:u.left,right:s.left},{left:u.left,right:s.right},{left:u.right,right:s.right},{left:u.right,right:s.left}];l=l.filter(function(e){return iC.bboxoverlap(e.left.bbox(),e.right.bbox())});let c=[];return 0===l.length?c:(l.forEach(function(e){c=c.concat(iC.pairiteration(e.left,e.right,a))}),c=c.filter(function(e,n){return c.indexOf(e)===n}))},getccenter:function(e,n,r){let i=n.x-e.x,o=n.y-e.y,a=r.x-n.x,u=r.y-n.y,s=i*iy(iA)-o*i_(iA),l=i*i_(iA)+o*iy(iA),c=a*iy(iA)-u*i_(iA),f=a*i_(iA)+u*iy(iA),h=(e.x+n.x)/2,p=(e.y+n.y)/2,d=(n.x+r.x)/2,g=(n.y+r.y)/2,y=iC.lli8(h,p,h+s,p+l,d,g,d+c,g+f),_=iC.dist(y,e),v=im(e.y-y.y,e.x-y.x),m=im(n.y-y.y,n.x-y.x),b=im(r.y-y.y,r.x-y.x),x;return v<b?((v>m||m>b)&&(v+=iM),v>b&&(x=b,b=v,v=x)):b<m&&m<v?(x=b,b=v,v=x):b+=iM,y.s=v,y.e=b,y.r=_,y},numberSort:function(e,n){return e-n}};class iE{constructor(e){this.curves=[],this._3d=!1,e&&(this.curves=e,this._3d=this.curves[0]._3d)}valueOf(){return this.toString()}toString(){return"["+this.curves.map(function(e){return iC.pointsToString(e.points)}).join(", ")+"]"}addCurve(e){this.curves.push(e),this._3d=this._3d||e._3d}length(){return this.curves.map(function(e){return e.length()}).reduce(function(e,n){return e+n})}curve(e){return this.curves[e]}bbox(){let e=this.curves;for(var n=e[0].bbox(),r=1;r<e.length;r++)iC.expandbox(n,e[r].bbox());return n}offset(e){let n=[];return this.curves.forEach(function(r){n.push(...r.offset(e))}),new iE(n)}}let{abs:iP,min:iT,max:ij,cos:iN,sin:iR,acos:iD,sqrt:iI}=Math,iU=Math.PI;class iF{constructor(e){let n=e&&e.forEach?e:Array.from(arguments).slice(),r=!1;if("object"==typeof n[0]){r=n.length;let e=[];n.forEach(function(n){["x","y","z"].forEach(function(r){void 0!==n[r]&&e.push(n[r])})}),n=e}let i=!1,o=n.length;if(r){if(r>4){if(1!=arguments.length)throw Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");i=!0}}else if(6!==o&&8!==o&&9!==o&&12!==o&&1!=arguments.length)throw Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");let a=this._3d=!i&&(9===o||12===o)||e&&e[0]&&void 0!==e[0].z,u=this.points=[];for(let e=0,r=a?3:2;e<o;e+=r){var s={x:n[e],y:n[e+1]};a&&(s.z=n[e+2]),u.push(s)}let l=this.order=u.length-1,c=this.dims=["x","y"];a&&c.push("z"),this.dimlen=c.length;let f=iC.align(u,{p1:u[0],p2:u[l]}),h=iC.dist(u[0],u[l]);this._linear=f.reduce((e,n)=>e+iP(n.y),0)<h/50,this._lut=[],this._t1=0,this._t2=1,this.update()}static quadraticFromPoints(e,n,r,i){if(void 0===i&&(i=.5),0===i)return new iF(n,n,r);if(1===i)return new iF(e,n,n);let o=iF.getABC(2,e,n,r,i);return new iF(e,o.A,r)}static cubicFromPoints(e,n,r,i,o){void 0===i&&(i=.5);let a=iF.getABC(3,e,n,r,i);void 0===o&&(o=iC.dist(n,a.C));let u=o*(1-i)/i,s=iC.dist(e,r),l=(r.x-e.x)/s,c=(r.y-e.y)/s,f=o*l,h=o*c,p={x:n.x-f,y:n.y-h},d={x:n.x+u*l,y:n.y+u*c},g=a.A,y={x:g.x+(p.x-g.x)/(1-i),y:g.y+(p.y-g.y)/(1-i)},_={x:g.x+(d.x-g.x)/i,y:g.y+(d.y-g.y)/i},v={x:e.x+(y.x-e.x)/i,y:e.y+(y.y-e.y)/i};return new iF(e,v,{x:r.x+(_.x-r.x)/(1-i),y:r.y+(_.y-r.y)/(1-i)},r)}static getUtils(){return iC}getUtils(){return iF.getUtils()}static get PolyBezier(){return iE}valueOf(){return this.toString()}toString(){return iC.pointsToString(this.points)}toSVG(){if(this._3d)return!1;let e=this.points,n=["M",e[0].x,e[0].y,2===this.order?"Q":"C"];for(let r=1,i=e.length;r<i;r++)n.push(e[r].x),n.push(e[r].y);return n.join(" ")}setRatios(e){if(e.length!==this.points.length)throw Error("incorrect number of ratio values");this.ratios=e,this._lut=[]}verify(){let e=this.coordDigest();e!==this._print&&(this._print=e,this.update())}coordDigest(){return this.points.map(function(e,n){return""+n+e.x+e.y+(e.z?e.z:0)}).join("")}update(){this._lut=[],this.dpoints=iC.derive(this.points,this._3d),this.computedirection()}computedirection(){let e=this.points,n=iC.angle(e[0],e[this.order],e[1]);this.clockwise=n>0}length(){return iC.length(this.derivative.bind(this))}static getABC(e=2,n,r,i,o=.5){let a=iC.projectionratio(o,e),u=1-a,s={x:a*n.x+u*i.x,y:a*n.y+u*i.y},l=iC.abcratio(o,e);return{A:{x:r.x+(r.x-s.x)/l,y:r.y+(r.y-s.y)/l},B:r,C:s,S:n,E:i}}getABC(e,n){n=n||this.get(e);let r=this.points[0],i=this.points[this.order];return iF.getABC(this.order,r,n,i,e)}getLUT(e){if(this.verify(),e=e||100,this._lut.length===e+1)return this._lut;this._lut=[],e++,this._lut=[];for(let n=0,r,i;n<e;n++)i=n/(e-1),(r=this.compute(i)).t=i,this._lut.push(r);return this._lut}on(e,n){n=n||5;let r=this.getLUT(),i=[];for(let o=0,a;o<r.length;o++)a=r[o],iC.dist(a,e)<n&&(i.push(a),r.length);return!!i.length&&(t/=i.length)}project(e){let n=this.getLUT(),r=n.length-1,i=iC.closest(n,e),o=i.mpos,a=(o-1)/r,u=(o+1)/r,s=.1/r,l=i.mdist,c=a,f=c,h;l+=1;for(let n;c<u+s;c+=s)h=this.compute(c),(n=iC.dist(e,h))<l&&(l=n,f=c);return f=f<0?0:f>1?1:f,(h=this.compute(f)).t=f,h.d=l,h}get(e){return this.compute(e)}point(e){return this.points[e]}compute(e){return this.ratios?iC.computeWithRatios(e,this.points,this.ratios,this._3d):iC.compute(e,this.points,this._3d,this.ratios)}raise(){let e=this.points,n=[e[0]],r=e.length;for(let i=1,o,a;i<r;i++)o=e[i],a=e[i-1],n[i]={x:(r-i)/r*o.x+i/r*a.x,y:(r-i)/r*o.y+i/r*a.y};return n[r]=e[r-1],new iF(n)}derivative(e){return iC.compute(e,this.dpoints[0],this._3d)}dderivative(e){return iC.compute(e,this.dpoints[1],this._3d)}align(){let e=this.points;return new iF(iC.align(e,{p1:e[0],p2:e[e.length-1]}))}curvature(e){return iC.curvature(e,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return iC.inflections(this.points)}normal(e){return this._3d?this.__normal3(e):this.__normal2(e)}__normal2(e){let n=this.derivative(e),r=iI(n.x*n.x+n.y*n.y);return{t:e,x:-n.y/r,y:n.x/r}}__normal3(e){let n=this.derivative(e),r=this.derivative(e+.01),i=iI(n.x*n.x+n.y*n.y+n.z*n.z),o=iI(r.x*r.x+r.y*r.y+r.z*r.z);n.x/=i,n.y/=i,n.z/=i,r.x/=o,r.y/=o,r.z/=o;let a={x:r.y*n.z-r.z*n.y,y:r.z*n.x-r.x*n.z,z:r.x*n.y-r.y*n.x},u=iI(a.x*a.x+a.y*a.y+a.z*a.z);a.x/=u,a.y/=u,a.z/=u;let s=[a.x*a.x,a.x*a.y-a.z,a.x*a.z+a.y,a.x*a.y+a.z,a.y*a.y,a.y*a.z-a.x,a.x*a.z-a.y,a.y*a.z+a.x,a.z*a.z];return{t:e,x:s[0]*n.x+s[1]*n.y+s[2]*n.z,y:s[3]*n.x+s[4]*n.y+s[5]*n.z,z:s[6]*n.x+s[7]*n.y+s[8]*n.z}}hull(e){let n=this.points,r=[],i=[],o=0;for(i[o++]=n[0],i[o++]=n[1],i[o++]=n[2],3===this.order&&(i[o++]=n[3]);n.length>1;){r=[];for(let a=0,u,s=n.length-1;a<s;a++)u=iC.lerp(e,n[a],n[a+1]),i[o++]=u,r.push(u);n=r}return i}split(e,n){if(0===e&&n)return this.split(n).left;if(1===n)return this.split(e).right;let r=this.hull(e),i={left:new iF(2===this.order?[r[0],r[3],r[5]]:[r[0],r[4],r[7],r[9]]),right:new iF(2===this.order?[r[5],r[4],r[2]]:[r[9],r[8],r[6],r[3]]),span:r};return(i.left._t1=iC.map(0,0,1,this._t1,this._t2),i.left._t2=iC.map(e,0,1,this._t1,this._t2),i.right._t1=iC.map(e,0,1,this._t1,this._t2),i.right._t2=iC.map(1,0,1,this._t1,this._t2),n)?(n=iC.map(n,e,1,0,1),i.right.split(n).left):i}extrema(){let e={},n=[];return this.dims.forEach((function(r){let i=function(e){return e[r]},o=this.dpoints[0].map(i);e[r]=iC.droots(o),3===this.order&&(o=this.dpoints[1].map(i),e[r]=e[r].concat(iC.droots(o))),e[r]=e[r].filter(function(e){return e>=0&&e<=1}),n=n.concat(e[r].sort(iC.numberSort))}).bind(this)),e.values=n.sort(iC.numberSort).filter(function(e,r){return n.indexOf(e)===r}),e}bbox(){let e=this.extrema(),n={};return this.dims.forEach((function(r){n[r]=iC.getminmax(this,r,e[r])}).bind(this)),n}overlaps(e){let n=this.bbox(),r=e.bbox();return iC.bboxoverlap(n,r)}offset(e,n){if(void 0!==n){let r=this.get(e),i=this.normal(e),o={c:r,n:i,x:r.x+i.x*n,y:r.y+i.y*n};return this._3d&&(o.z=r.z+i.z*n),o}if(this._linear){let n=this.normal(0);return[new iF(this.points.map(function(r){let i={x:r.x+e*n.x,y:r.y+e*n.y};return r.z&&n.z&&(i.z=r.z+e*n.z),i}))]}return this.reduce().map(function(n){return n._linear?n.offset(e)[0]:n.scale(e)})}simple(){if(3===this.order){let e=iC.angle(this.points[0],this.points[3],this.points[1]),n=iC.angle(this.points[0],this.points[3],this.points[2]);if(e>0&&n<0||e<0&&n>0)return!1}let e=this.normal(0),n=this.normal(1),r=e.x*n.x+e.y*n.y;return this._3d&&(r+=e.z*n.z),iP(iD(r))<iU/3}reduce(){let e,n=0,r=0,i,o=[],a=[],u=this.extrema().values;for(-1===u.indexOf(0)&&(u=[0].concat(u)),-1===u.indexOf(1)&&u.push(1),n=u[0],e=1;e<u.length;e++)r=u[e],(i=this.split(n,r))._t1=n,i._t2=r,o.push(i),n=r;return o.forEach(function(e){for(n=0,r=0;r<=1;)for(r=n+.01;r<=1.01;r+=.01)if(!(i=e.split(n,r)).simple()){if(r-=.01,.01>iP(n-r))return[];(i=e.split(n,r))._t1=iC.map(n,0,1,e._t1,e._t2),i._t2=iC.map(r,0,1,e._t1,e._t2),a.push(i),n=r;break}n<1&&((i=e.split(n,1))._t1=iC.map(n,0,1,e._t1,e._t2),i._t2=e._t2,a.push(i))}),a}translate(e,n,r){r="number"==typeof r?r:n;let i=this.order,o=this.points.map((e,o)=>(1-o/i)*n+o/i*r);return new iF(this.points.map((n,r)=>({x:n.x+e.x*o[r],y:n.y+e.y*o[r]})))}scale(e){let n=this.order,r=!1;if("function"==typeof e&&(r=e),r&&2===n)return this.raise().scale(r);let i=this.clockwise,o=this.points;if(this._linear)return this.translate(this.normal(0),r?r(0):e,r?r(1):e);let a=r?r(0):e,u=r?r(1):e,s=[this.offset(0,10),this.offset(1,10)],l=[],c=iC.lli4(s[0],s[0].c,s[1],s[1].c);if(!c)throw Error("cannot scale this curve. Try reducing it first.");return([0,1].forEach(function(e){let r=l[e*n]=iC.copy(o[e*n]);r.x+=(e?u:a)*s[e].n.x,r.y+=(e?u:a)*s[e].n.y}),r)?[0,1].forEach(function(a){if(2!==n||!a){var u=o[a+1],s={x:u.x-c.x,y:u.y-c.y},f=r?r((a+1)/n):e;r&&!i&&(f=-f);var h=iI(s.x*s.x+s.y*s.y);s.x/=h,s.y/=h,l[a+1]={x:u.x+f*s.x,y:u.y+f*s.y}}}):[0,1].forEach(e=>{if(2===n&&e)return;let r=l[e*n],i=this.derivative(e),a={x:r.x+i.x,y:r.y+i.y};l[e+1]=iC.lli4(r,a,c,o[e+1])}),new iF(l)}outline(e,n,r,i){if(n=void 0===n?e:n,this._linear){let o,a,u;let s=this.normal(0),l=this.points[0],c=this.points[this.points.length-1];void 0===r&&(r=e,i=n),o={x:l.x+s.x*e,y:l.y+s.y*e},u={x:c.x+s.x*r,y:c.y+s.y*r},a={x:(o.x+u.x)/2,y:(o.y+u.y)/2};let f=[o,a,u];o={x:l.x-s.x*n,y:l.y-s.y*n},u={x:c.x-s.x*i,y:c.y-s.y*i},a={x:(o.x+u.x)/2,y:(o.y+u.y)/2};let h=[u,a,o],p=iC.makeline(h[2],f[0]),d=iC.makeline(f[2],h[0]);return new iE([p,new iF(f),d,new iF(h)])}let o=this.reduce(),a=o.length,u=[],s=[],l,c=0,f=this.length(),h=void 0!==r&&void 0!==i;function p(e,n,r,i,o){return function(a){let u=n-e;return iC.map(a,0,1,e+i/r*u,e+(i+o)/r*u)}}o.forEach(function(o){let a=o.length();h?(u.push(o.scale(p(e,r,f,c,a))),s.push(o.scale(p(-n,-i,f,c,a)))):(u.push(o.scale(e)),s.push(o.scale(-n))),c+=a}),s=s.map(function(e){return(l=e.points)[3]?e.points=[l[3],l[2],l[1],l[0]]:e.points=[l[2],l[1],l[0]],e}).reverse();let d=u[0].points[0],g=u[a-1].points[u[a-1].points.length-1],y=s[a-1].points[s[a-1].points.length-1],_=s[0].points[0],v=iC.makeline(y,d),m=iC.makeline(g,_);return new iE([v].concat(u).concat([m]).concat(s))}outlineshapes(e,n,r){n=n||e;let i=this.outline(e,n).curves,o=[];for(let e=1,n=i.length;e<n/2;e++){let a=iC.makeshape(i[e],i[n-e],r);a.startcap.virtual=e>1,a.endcap.virtual=e<n/2-1,o.push(a)}return o}intersects(e,n){return e?e.p1&&e.p2?this.lineIntersects(e):(e instanceof iF&&(e=e.reduce()),this.curveintersects(this.reduce(),e,n)):this.selfintersects(n)}lineIntersects(e){let n=iT(e.p1.x,e.p2.x),r=iT(e.p1.y,e.p2.y),i=ij(e.p1.x,e.p2.x),o=ij(e.p1.y,e.p2.y);return iC.roots(this.points,e).filter(e=>{var a=this.get(e);return iC.between(a.x,n,i)&&iC.between(a.y,r,o)})}selfintersects(e){let n=this.reduce(),r=n.length-2,i=[];for(let o=0,a,u;o<r;o++)a=n.slice(o,o+1),u=n.slice(o+2),i.push(...this.curveintersects(a,u,e));return i}curveintersects(e,n,r){let i=[];e.forEach(function(e){n.forEach(function(n){e.overlaps(n)&&i.push({left:e,right:n})})});let o=[];return i.forEach(function(e){let n=iC.pairiteration(e.left,e.right,r);n.length>0&&(o=o.concat(n))}),o}arcs(e){return e=e||.5,this._iterate(e,[])}_error(e,n,r,i){let o=(i-r)/4,a=this.get(r+o),u=this.get(i-o),s=iC.dist(e,n),l=iC.dist(e,a),c=iC.dist(e,u);return iP(l-s)+iP(c-s)}_iterate(e,n){let r=0,i=1,o;do{o=0,i=1;let a=this.get(r),u,s,l,c,f=!1,h=!1,p,d=i,g=1;do if(h=f,c=l,d=(r+i)/2,u=this.get(d),s=this.get(i),(l=iC.getccenter(a,u,s)).interval={start:r,end:i},f=this._error(l,a,r,i)<=e,(p=h&&!f)||(g=i),f){if(i>=1){if(l.interval.end=g=1,c=l,i>1){let e={x:l.x+l.r*iN(l.e),y:l.y+l.r*iR(l.e)};l.e+=iC.angle({x:l.x,y:l.y},e,this.get(1))}break}i+=(i-r)/2}else i=d;while(!p&&o++<100);if(o>=100)break;c=c||l,n.push(c),r=g}while(i<1);return n}}function iL(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function iq(e){var n=function(e,n){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,n);if("object"!=typeof i)return i;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof n?n:n+""}function iB(e,n){if(e){if("string"==typeof e)return iL(e,n);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?iL(e,n):void 0}}var i$=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=(n instanceof Array?n.length?n:[void 0]:[n]).map(function(e){return{keyAccessor:e,isProp:!(e instanceof Function)}}),a=e.reduce(function(e,n){var i=e,a=n;return o.forEach(function(e,n){var u,s=e.keyAccessor;if(e.isProp){var l=a,c=l[s],f=function(e,n){if(null==e)return{};var r,i,o=function(e,n){if(null==e)return{};var r={};for(var i in e)if(({}).hasOwnProperty.call(e,i)){if(n.includes(i))continue;r[i]=e[i]}return r}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],n.includes(r)||({}).propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(l,[s].map(iq));u=c,a=f}else u=s(a,n);n+1<o.length?(i.hasOwnProperty(u)||(i[u]={}),i=i[u]):r?(i.hasOwnProperty(u)||(i[u]=[]),i[u].push(a)):i[u]=a}),e},{});r instanceof Function&&function e(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;i===o.length?Object.keys(n).forEach(function(e){return n[e]=r(n[e])}):Object.values(n).forEach(function(n){return e(n,i+1)})}(a);var u=a;return i&&(u=[],function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];r.length===o.length?u.push({keys:r,vals:n}):Object.entries(n).forEach(function(n){var i=function(e){if(Array.isArray(e))return e}(n)||function(e,n){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var i,o,a,u,s=[],l=!0,c=!1;try{for(a=(r=r.call(e)).next;!(l=(i=a.call(r)).done)&&(s.push(i.value),2!==s.length);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(c)throw o}}return s}}(n,2)||iB(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=i[0];return e(i[1],[].concat(function(e){if(Array.isArray(e))return iL(e)}(r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||iB(r)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[o]))})}(a),n instanceof Array&&0===n.length&&1===u.length&&(u[0].keys=[])),u};class iH extends Map{constructor(e,n=iG){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=e)for(let[n,r]of e)this.set(n,r)}get(e){return super.get(iV(this,e))}has(e){return super.has(iV(this,e))}set(e,n){return super.set(function({_intern:e,_key:n},r){let i=n(r);return e.has(i)?e.get(i):(e.set(i,r),r)}(this,e),n)}delete(e){return super.delete(function({_intern:e,_key:n},r){let i=n(r);return e.has(i)&&(r=e.get(i),e.delete(i)),r}(this,e))}}function iV({_intern:e,_key:n},r){let i=n(r);return e.has(i)?e.get(i):r}function iG(e){return null!==e&&"object"==typeof e?e.valueOf():e}function iX(e,n){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(n).domain(e)}return this}let iW=Symbol("implicit");var iY=function(e){for(var n=e.length/6|0,r=Array(n),i=0;i<n;)r[i]="#"+e.slice(6*i,6*++i);return r}("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function iZ(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function iQ(e,n,r){if(iJ())return Reflect.construct.apply(null,arguments);var i=[null];return i.push.apply(i,n),new(e.bind.apply(e,i))}function iK(e,n,r){var i;return(n="symbol"==typeof(i=function(e,n){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,n);if("object"!=typeof i)return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(n,"string"))?i:i+"")in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function iJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(iJ=function(){return!!e})()}function i0(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function i1(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?i0(Object(r),!0).forEach(function(n){iK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function i2(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var i,o,a,u,s=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,0===n);else for(;!(l=(i=a.call(r)).done)&&(s.push(i.value),s.length!==n);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(c)throw o}}return s}}(e,n)||i6(e,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i5(e){return function(e){if(Array.isArray(e))return iZ(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||i6(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i3(e){return(i3="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})(e)}function i6(e,n){if(e){if("string"==typeof e)return iZ(e,n);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?iZ(e,n):void 0}}!function(e,n){void 0===n&&(n={});var r=n.insertAt;if("undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".force-graph-container canvas {\n display: block;\n user-select: none;\n outline: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.force-graph-container .clickable {\n cursor: pointer;\n}\n\n.force-graph-container .grabbable {\n cursor: move;\n cursor: grab;\n cursor: -moz-grab;\n cursor: -webkit-grab;\n}\n\n.force-graph-container .grabbable:active {\n cursor: grabbing;\n cursor: -moz-grabbing;\n cursor: -webkit-grabbing;\n}\n");var i8=function e(){var n=new iH,r=[],i=[],o=iW;function a(e){let a=n.get(e);if(void 0===a){if(o!==iW)return o;n.set(e,a=r.push(e)-1)}return i[a%i.length]}return a.domain=function(e){if(!arguments.length)return r.slice();for(let i of(r=[],n=new iH,e))n.has(i)||n.set(i,r.push(i)-1);return a},a.range=function(e){return arguments.length?(i=Array.from(e),a):i.slice()},a.unknown=function(e){return arguments.length?(o=e,a):o},a.copy=function(){return e(r,i).unknown(o)},iX.apply(a,arguments),a}(iY);function i4(e,n,r){n&&"string"==typeof r&&e.filter(function(e){return!e[r]}).forEach(function(e){e[r]=i8(n(e))})}var i9=function(e,n){return n.onNeedsRedraw&&n.onNeedsRedraw()},i7=function(e,n){if(!n.isShadow){var r=nk(n.linkDirectionalParticles);n.graphData.links.forEach(function(e){var n=Math.round(Math.abs(r(e)));n?e.__photons=i5(Array(n)).map(function(){return{}}):delete e.__photons})}},ot=nw({props:{graphData:{default:{nodes:[],links:[]},onChange:function(e,n){n.engineRunning=!1,i7(e,n)}},dagMode:{onChange:function(e,n){e||(n.graphData.nodes||[]).forEach(function(e){return e.fx=e.fy=void 0})}},dagLevelDistance:{},dagNodeFilter:{default:function(e){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4,triggerUpdate:!1,onChange:i9},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:i9},nodeColor:{default:"color",triggerUpdate:!1,onChange:i9},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:i9},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:i9},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:i9},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:i9},linkColor:{default:"color",triggerUpdate:!1,onChange:i9},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:i9},linkWidth:{default:1,triggerUpdate:!1,onChange:i9},linkCurvature:{default:0,triggerUpdate:!1,onChange:i9},linkCanvasObject:{triggerUpdate:!1,onChange:i9},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:i9},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:i9},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:i9},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:i9},linkDirectionalParticles:{default:0,triggerUpdate:!1,onChange:i7},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleOffset:{default:0,triggerUpdate:!1},linkDirectionalParticleWidth:{default:4,triggerUpdate:!1},linkDirectionalParticleColor:{triggerUpdate:!1},linkDirectionalParticleCanvasObject:{triggerUpdate:!1},globalScale:{default:1,triggerUpdate:!1},d3AlphaMin:{default:0,triggerUpdate:!1},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(e,n){n.forceLayout.alphaDecay(e)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(e,n){n.forceLayout.alphaTarget(e)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(e,n){n.forceLayout.velocityDecay(e)}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1},onNeedsRedraw:{triggerUpdate:!1},isShadow:{default:!1,triggerUpdate:!1}},methods:{d3Force:function(e,n,r){return void 0===r?e.forceLayout.force(n):(e.forceLayout.force(n,r),this)},d3ReheatSimulation:function(e){return e.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(e){return e.cntTicks=0,e.startTickTime=new Date,e.engineRunning=!0,this},isEngineRunning:function(e){return!!e.engineRunning},tickFrame:function(e){var n,r,i,o,a,u,s,l,c,f,h,p,d,g,y,_,v,m,b,x;return e.isShadow||e.engineRunning&&(++e.cntTicks>e.cooldownTicks||new Date-e.startTickTime>e.cooldownTime||e.d3AlphaMin>0&&e.forceLayout.alpha()<e.d3AlphaMin?(e.engineRunning=!1,e.onEngineStop()):(e.forceLayout.tick(),e.onEngineTick())),function(){var n=nk(e.linkVisibility),r=nk(e.linkColor),i=nk(e.linkWidth),o=nk(e.linkLineDash),a=nk(e.linkCurvature),u=nk(e.linkCanvasObjectMode),s=e.ctx,l=2*e.isShadow,c=e.graphData.links.filter(n);c.forEach(function(e){var n=a(e);if(!n){e.__controlPoints=null;return}var r=e.source,i=e.target;if(r&&i&&r.hasOwnProperty("x")&&i.hasOwnProperty("x")){var o=Math.sqrt(Math.pow(i.x-r.x,2)+Math.pow(i.y-r.y,2));if(o>0){var u=Math.atan2(i.y-r.y,i.x-r.x),s=o*n,l={x:(r.x+i.x)/2+s*Math.cos(u-Math.PI/2),y:(r.y+i.y)/2+s*Math.sin(u-Math.PI/2)};e.__controlPoints=[l.x,l.y]}else{var c=70*n;e.__controlPoints=[i.x,i.y-c,i.x+c,i.y]}}});var f=[],h=[],p=c;if(e.linkCanvasObject){var d=[],g=[];c.forEach(function(e){return(({before:f,after:h,replace:d})[u(e)]||g).push(e)}),p=[].concat(i5(f),h,g),f=f.concat(d)}s.save(),f.forEach(function(n){return e.linkCanvasObject(n,s,e.globalScale)}),s.restore();var y=i$(p,[r,i,o]);s.save(),Object.entries(y).forEach(function(n){var r=i2(n,2),i=r[0],a=r[1],u=i&&"undefined"!==i?i:"rgba(0,0,0,0.15)";Object.entries(a).forEach(function(n){var r=i2(n,2),i=r[0],a=r[1],c=(i||1)/e.globalScale+l;Object.entries(a).forEach(function(e){var n=i2(e,2);n[0];var r=n[1],i=o(r[0]);s.beginPath(),r.forEach(function(e){var n=e.source,r=e.target;if(n&&r&&n.hasOwnProperty("x")&&r.hasOwnProperty("x")){s.moveTo(n.x,n.y);var i=e.__controlPoints;i?s[2===i.length?"quadraticCurveTo":"bezierCurveTo"].apply(s,i5(i).concat([r.x,r.y])):s.lineTo(r.x,r.y)}}),s.strokeStyle=u,s.lineWidth=c,s.setLineDash(i||[]),s.stroke()})})}),s.restore(),s.save(),h.forEach(function(n){return e.linkCanvasObject(n,s,e.globalScale)}),s.restore()}(),e.isShadow||(n=nk(e.linkDirectionalArrowLength),r=nk(e.linkDirectionalArrowRelPos),i=nk(e.linkVisibility),o=nk(e.linkDirectionalArrowColor||e.linkColor),a=nk(e.nodeVal),(u=e.ctx).save(),e.graphData.links.filter(i).forEach(function(i){var s=n(i);if(s&&!(s<0)){var l=i.source,c=i.target;if(l&&c&&l.hasOwnProperty("x")&&c.hasOwnProperty("x")){var f=Math.sqrt(Math.max(0,a(l)||1))*e.nodeRelSize,h=Math.sqrt(Math.max(0,a(c)||1))*e.nodeRelSize,p=Math.min(1,Math.max(0,r(i))),d=o(i)||"rgba(0,0,0,0.28)",g=s/1.6/2,y=i.__controlPoints&&iQ(iF,[l.x,l.y].concat(i5(i.__controlPoints),[c.x,c.y])),_=y?function(e){return y.get(e)}:function(e){return{x:l.x+(c.x-l.x)*e||0,y:l.y+(c.y-l.y)*e||0}},v=y?y.length():Math.sqrt(Math.pow(c.x-l.x,2)+Math.pow(c.y-l.y,2)),m=f+s+(v-f-h-s)*p,b=_(m/v),x=_((m-s)/v),w=_((m-.8*s)/v),k=Math.atan2(b.y-x.y,b.x-x.x)-Math.PI/2;u.beginPath(),u.moveTo(b.x,b.y),u.lineTo(x.x+g*Math.cos(k),x.y+g*Math.sin(k)),u.lineTo(w.x,w.y),u.lineTo(x.x-g*Math.cos(k),x.y-g*Math.sin(k)),u.fillStyle=d,u.fill()}}}),u.restore()),e.isShadow||(s=nk(e.linkDirectionalParticles),l=nk(e.linkDirectionalParticleSpeed),c=nk(e.linkDirectionalParticleOffset),f=nk(e.linkDirectionalParticleWidth),h=nk(e.linkVisibility),p=nk(e.linkDirectionalParticleColor||e.linkColor),(d=e.ctx).save(),e.graphData.links.filter(h).forEach(function(n){var r=s(n);if(n.hasOwnProperty("__photons")&&n.__photons.length){var i=n.source,o=n.target;if(i&&o&&i.hasOwnProperty("x")&&o.hasOwnProperty("x")){var a=l(n),u=Math.abs(c(n)),h=n.__photons||[],g=Math.max(0,f(n)/2)/Math.sqrt(e.globalScale),y=p(n)||"rgba(0,0,0,0.28)";d.fillStyle=y;var _=n.__controlPoints?iQ(iF,[i.x,i.y].concat(i5(n.__controlPoints),[o.x,o.y])):null,v=0,m=!1;h.forEach(function(s){var l=!!s.__singleHop;if(s.hasOwnProperty("__progressRatio")||(s.__progressRatio=l?0:(v+u)/r),!l&&v++,s.__progressRatio+=a,s.__progressRatio>=1){if(l){m=!0;return}s.__progressRatio=s.__progressRatio%1}var c=s.__progressRatio,f=_?_.get(c):{x:i.x+(o.x-i.x)*c||0,y:i.y+(o.y-i.y)*c||0};e.linkDirectionalParticleCanvasObject?e.linkDirectionalParticleCanvasObject(f.x,f.y,n,d,e.globalScale):(d.beginPath(),d.arc(f.x,f.y,g,0,2*Math.PI,!1),d.fill())}),m&&(n.__photons=n.__photons.filter(function(e){return!e.__singleHop||e.__progressRatio<=1}))}}}),d.restore()),g=nk(e.nodeVisibility),y=nk(e.nodeVal),_=nk(e.nodeColor),v=nk(e.nodeCanvasObjectMode),m=e.ctx,b=e.isShadow/e.globalScale,x=e.graphData.nodes.filter(g),m.save(),x.forEach(function(n){var r=v(n);if(e.nodeCanvasObject&&("before"===r||"replace"===r)&&(e.nodeCanvasObject(n,m,e.globalScale),"replace"===r)){m.restore();return}var i=Math.sqrt(Math.max(0,y(n)||1))*e.nodeRelSize+b;m.beginPath(),m.arc(n.x,n.y,i,0,2*Math.PI,!1),m.fillStyle=_(n)||"rgba(31, 120, 180, 0.92)",m.fill(),e.nodeCanvasObject&&"after"===r&&e.nodeCanvasObject(n,e.ctx,e.globalScale)}),m.restore(),this},emitParticle:function(e,n){return n&&(n.__photons||(n.__photons=[]),n.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:(function(e,n){let r;var i,o=Math.min(3,Math.max(1,Math.round(n=n||2))),a=1,u=.001,s=1-Math.pow(.001,1/300),l=0,c=.6,f=new Map,h=tz(g),p=tn("tick","end"),d=(r=1,()=>(r=(1664525*r+1013904223)%4294967296)/4294967296);function g(){y(),p.call("tick",i),a<u&&(h.stop(),p.call("end",i))}function y(n){var r,u,h=e.length;void 0===n&&(n=1);for(var p=0;p<n;++p)for(a+=(l-a)*s,f.forEach(function(e){e(a)}),r=0;r<h;++r)null==(u=e[r]).fx?u.x+=u.vx*=c:(u.x=u.fx,u.vx=0),o>1&&(null==u.fy?u.y+=u.vy*=c:(u.y=u.fy,u.vy=0)),o>2&&(null==u.fz?u.z+=u.vz*=c:(u.z=u.fz,u.vz=0));return i}function _(){for(var n,r=0,i=e.length;r<i;++r){if((n=e[r]).index=r,null!=n.fx&&(n.x=n.fx),null!=n.fy&&(n.y=n.fy),null!=n.fz&&(n.z=n.fz),isNaN(n.x)||o>1&&isNaN(n.y)||o>2&&isNaN(n.z)){var a=10*(o>2?Math.cbrt(.5+r):o>1?Math.sqrt(.5+r):r),u=r*rJ,s=r*r0;1===o?n.x=a:2===o?(n.x=a*Math.cos(u),n.y=a*Math.sin(u)):(n.x=a*Math.sin(u)*Math.cos(s),n.y=a*Math.cos(u),n.z=a*Math.sin(u)*Math.sin(s))}(isNaN(n.vx)||o>1&&isNaN(n.vy)||o>2&&isNaN(n.vz))&&(n.vx=0,o>1&&(n.vy=0),o>2&&(n.vz=0))}}function v(n){return n.initialize&&n.initialize(e,d,o),n}return null==e&&(e=[]),_(),i={tick:y,restart:function(){return h.restart(g),i},stop:function(){return h.stop(),i},numDimensions:function(e){return arguments.length?(o=Math.min(3,Math.max(1,Math.round(e))),f.forEach(v),i):o},nodes:function(n){return arguments.length?(e=n,_(),f.forEach(v),i):e},alpha:function(e){return arguments.length?(a=+e,i):a},alphaMin:function(e){return arguments.length?(u=+e,i):u},alphaDecay:function(e){return arguments.length?(s=+e,i):+s},alphaTarget:function(e){return arguments.length?(l=+e,i):l},velocityDecay:function(e){return arguments.length?(c=1-e,i):1-c},randomSource:function(e){return arguments.length?(d=e,f.forEach(v),i):d},force:function(e,n){return arguments.length>1?(null==n?f.delete(e):f.set(e,v(n)),i):f.get(e)},find:function(){var n,r,i,a,u,s,l=Array.prototype.slice.call(arguments),c=l.shift()||0,f=(o>1?l.shift():null)||0,h=(o>2?l.shift():null)||0,p=l.shift()||1/0,d=0,g=e.length;for(p*=p,d=0;d<g;++d)(a=(n=c-(u=e[d]).x)*n+(r=f-(u.y||0))*r+(i=h-(u.z||0))*i)<p&&(s=u,p=a);return s},on:function(e,n){return arguments.length>1?(p.on(e,n),i):p.on(e)}}})().force("link",function(e){var n,r,i,o,a,u,s,l=r5,c=function(e){return 1/Math.min(a[e.source.index],a[e.target.index])},f=r1(30),h=1;function p(i){for(var a=0,l=e.length;a<h;++a)for(var c,f,p,d,g,y=0,_=0,v=0,m=0;y<l;++y)f=(c=e[y]).source,_=(p=c.target).x+p.vx-f.x-f.vx||r2(s),o>1&&(v=p.y+p.vy-f.y-f.vy||r2(s)),o>2&&(m=p.z+p.vz-f.z-f.vz||r2(s)),d=((d=Math.sqrt(_*_+v*v+m*m))-r[y])/d*i*n[y],_*=d,v*=d,m*=d,p.vx-=_*(g=u[y]),o>1&&(p.vy-=v*g),o>2&&(p.vz-=m*g),f.vx+=_*(g=1-g),o>1&&(f.vy+=v*g),o>2&&(f.vz+=m*g)}function d(){if(i){var o,s,c=i.length,f=e.length,h=new Map(i.map((e,n)=>[l(e,n,i),e]));for(o=0,a=Array(c);o<f;++o)(s=e[o]).index=o,"object"!=typeof s.source&&(s.source=r3(h,s.source)),"object"!=typeof s.target&&(s.target=r3(h,s.target)),a[s.source.index]=(a[s.source.index]||0)+1,a[s.target.index]=(a[s.target.index]||0)+1;for(o=0,u=Array(f);o<f;++o)s=e[o],u[o]=a[s.source.index]/(a[s.source.index]+a[s.target.index]);n=Array(f),g(),r=Array(f),y()}}function g(){if(i)for(var r=0,o=e.length;r<o;++r)n[r]=+c(e[r],r,e)}function y(){if(i)for(var n=0,o=e.length;n<o;++n)r[n]=+f(e[n],n,e)}return null==e&&(e=[]),p.initialize=function(e,...n){i=e,s=n.find(e=>"function"==typeof e)||Math.random,o=n.find(e=>[1,2,3].includes(e))||2,d()},p.links=function(n){return arguments.length?(e=n,d(),p):e},p.id=function(e){return arguments.length?(l=e,p):l},p.iterations=function(e){return arguments.length?(h=+e,p):h},p.strength=function(e){return arguments.length?(c="function"==typeof e?e:r1(+e),g(),p):c},p.distance=function(e){return arguments.length?(f="function"==typeof e?e:r1(+e),y(),p):f},p}()).force("charge",function(){var e,n,r,i,o,a,u=r1(-30),s=1,l=1/0,c=.81;function f(i){var a,u=e.length,s=(1===n?r9(e,rZ):2===n?(0,ir.Z)(e,rZ,rQ):3===n?ic(e,rZ,rQ,rK):null).visitAfter(p);for(o=i,a=0;a<u;++a)r=e[a],s.visit(d)}function h(){if(e){var n,r,i=e.length;for(n=0,a=Array(i);n<i;++n)a[(r=e[n]).index]=+u(r,n,e)}}function p(e){var r,i,o,u,s,l,c=0,f=0,h=e.length;if(h){for(o=u=s=l=0;l<h;++l)(r=e[l])&&(i=Math.abs(r.value))&&(c+=r.value,f+=i,o+=i*(r.x||0),u+=i*(r.y||0),s+=i*(r.z||0));c*=Math.sqrt(4/h),e.x=o/f,n>1&&(e.y=u/f),n>2&&(e.z=s/f)}else{(r=e).x=r.data.x,n>1&&(r.y=r.data.y),n>2&&(r.z=r.data.z);do c+=a[r.data.index];while(r=r.next)}e.value=c}function d(e,u,f,h,p){if(!e.value)return!0;var d=[f,h,p][n-1],g=e.x-r.x,y=n>1?e.y-r.y:0,_=n>2?e.z-r.z:0,v=d-u,m=g*g+y*y+_*_;if(v*v/c<m)return m<l&&(0===g&&(m+=(g=r2(i))*g),n>1&&0===y&&(m+=(y=r2(i))*y),n>2&&0===_&&(m+=(_=r2(i))*_),m<s&&(m=Math.sqrt(s*m)),r.vx+=g*e.value*o/m,n>1&&(r.vy+=y*e.value*o/m),n>2&&(r.vz+=_*e.value*o/m)),!0;if(!e.length&&!(m>=l)){(e.data!==r||e.next)&&(0===g&&(m+=(g=r2(i))*g),n>1&&0===y&&(m+=(y=r2(i))*y),n>2&&0===_&&(m+=(_=r2(i))*_),m<s&&(m=Math.sqrt(s*m)));do e.data!==r&&(v=a[e.data.index]*o/m,r.vx+=g*v,n>1&&(r.vy+=y*v),n>2&&(r.vz+=_*v));while(e=e.next)}}return f.initialize=function(r,...o){e=r,i=o.find(e=>"function"==typeof e)||Math.random,n=o.find(e=>[1,2,3].includes(e))||2,h()},f.strength=function(e){return arguments.length?(u="function"==typeof e?e:r1(+e),h(),f):u},f.distanceMin=function(e){return arguments.length?(s=e*e,f):Math.sqrt(s)},f.distanceMax=function(e){return arguments.length?(l=e*e,f):Math.sqrt(l)},f.theta=function(e){return arguments.length?(c=e*e,f):Math.sqrt(c)},f}()).force("center",function(e,n,r){var i,o=1;function a(){var a,u,s=i.length,l=0,c=0,f=0;for(a=0;a<s;++a)l+=(u=i[a]).x||0,c+=u.y||0,f+=u.z||0;for(l=(l/s-e)*o,c=(c/s-n)*o,f=(f/s-r)*o,a=0;a<s;++a)u=i[a],l&&(u.x-=l),c&&(u.y-=c),f&&(u.z-=f)}return null==e&&(e=0),null==n&&(n=0),null==r&&(r=0),a.initialize=function(e){i=e},a.x=function(n){return arguments.length?(e=+n,a):e},a.y=function(e){return arguments.length?(n=+e,a):n},a.z=function(e){return arguments.length?(r=+e,a):r},a.strength=function(e){return arguments.length?(o=+e,a):o},a}()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(e,n){n.ctx=e},update:function(e,n){e.engineRunning=!1,e.onUpdate(),null!==e.nodeAutoColorBy&&i4(e.graphData.nodes,nk(e.nodeAutoColorBy),e.nodeColor),null!==e.linkAutoColorBy&&i4(e.graphData.links,nk(e.linkAutoColorBy),e.linkColor),e.graphData.links.forEach(function(n){n.source=n[e.linkSource],n.target=n[e.linkTarget]}),e.forceLayout.stop().alpha(1).nodes(e.graphData.nodes);var r=e.forceLayout.force("link");r&&r.id(function(n){return n[e.nodeId]}).links(e.graphData.links);var i=e.dagMode&&function(e,n){var r=e.nodes,i=e.links,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=o.nodeFilter,u=void 0===a?function(){return!0}:a,s=o.onLoopError,l=void 0===s?function(e){throw"Invalid DAG structure! Found cycle in node path: ".concat(e.join(" -> "),".")}:s,c={};r.forEach(function(e){return c[n(e)]={data:e,out:[],depth:-1,skip:!u(e)}}),i.forEach(function(e){var r=e.source,i=e.target,o=l(r),a=l(i);if(!c.hasOwnProperty(o))throw"Missing source node with id: ".concat(o);if(!c.hasOwnProperty(a))throw"Missing target node with id: ".concat(a);var u=c[o],s=c[a];function l(e){return"object"===i3(e)?n(e):e}u.out.push(s)});var f=[];return function e(r){for(var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=0,u=r.length;a<u;a++)if(function(){var u=r[a];if(-1!==i.indexOf(u)){var s=[].concat(i5(i.slice(i.indexOf(u))),[u]).map(function(e){return n(e.data)});return f.some(function(e){return e.length===s.length&&e.every(function(e,n){return e===s[n]})})||(f.push(s),l(s)),1}o>u.depth&&(u.depth=o,e(u.out,[].concat(i5(i),[u]),o+(u.skip?0:1)))}())continue}(Object.values(c)),Object.assign.apply(Object,[{}].concat(i5(Object.entries(c).filter(function(e){return!i2(e,2)[1].skip}).map(function(e){var n=i2(e,2);return iK({},n[0],n[1].depth)}))))}(e.graphData,function(n){return n[e.nodeId]},{nodeFilter:e.dagNodeFilter,onLoopError:e.onDagError||void 0}),o=Math.max.apply(Math,i5(Object.values(i||[]))),a=e.dagLevelDistance||e.graphData.nodes.length/(o||1)*2*(-1!==["radialin","radialout"].indexOf(e.dagMode)?.7:1);if(["lr","rl","td","bu"].includes(n.dagMode)){var u=["lr","rl"].includes(n.dagMode)?"fx":"fy";e.graphData.nodes.filter(e.dagNodeFilter).forEach(function(e){return delete e[u]})}if(["lr","rl","td","bu"].includes(e.dagMode)){var s=["rl","bu"].includes(e.dagMode),l=["lr","rl"].includes(e.dagMode)?"fx":"fy";e.graphData.nodes.filter(e.dagNodeFilter).forEach(function(n){return n[l]=(i[n[e.nodeId]]-o/2)*a*(s?-1:1)})}e.forceLayout.force("dagRadial",-1!==["radialin","radialout"].indexOf(e.dagMode)?(function(e,n,r,i){var o,a,u,s,l=r1(.1);function c(e){for(var l=0,c=o.length;l<c;++l){var f=o[l],h=f.x-n||1e-6,p=(f.y||0)-r||1e-6,d=(f.z||0)-i||1e-6,g=Math.sqrt(h*h+p*p+d*d),y=(s[l]-g)*u[l]*e/g;f.vx+=h*y,a>1&&(f.vy+=p*y),a>2&&(f.vz+=d*y)}}function f(){if(o){var n,r=o.length;for(n=0,u=Array(r),s=Array(r);n<r;++n)s[n]=+e(o[n],n,o),u[n]=isNaN(s[n])?0:+l(o[n],n,o)}}return"function"!=typeof e&&(e=r1(+e)),null==n&&(n=0),null==r&&(r=0),null==i&&(i=0),c.initialize=function(e,...n){o=e,a=n.find(e=>[1,2,3].includes(e))||2,f()},c.strength=function(e){return arguments.length?(l="function"==typeof e?e:r1(+e),f(),c):l},c.radius=function(n){return arguments.length?(e="function"==typeof n?n:r1(+n),f(),c):e},c.x=function(e){return arguments.length?(n=+e,c):n},c.y=function(e){return arguments.length?(r=+e,c):r},c.z=function(e){return arguments.length?(i=+e,c):i},c})(function(n){var r=i[n[e.nodeId]]||-1;return("radialin"===e.dagMode?o-r:r)*a}).strength(function(n){return e.dagNodeFilter(n)?1:0}):null);for(var c=0;c<e.warmupTicks&&!(e.d3AlphaMin>0&&e.forceLayout.alpha()<e.d3AlphaMin);c++)e.forceLayout.tick();this.resetCountdown(),e.onFinishUpdate()}});function oe(e,n){var r=e instanceof Array?e:[e],i=new n;return i._destructor&&i._destructor(),{linkProp:function(e){return{default:i[e](),onChange:function(n,i){r.forEach(function(r){return i[r][e](n)})},triggerUpdate:!1}},linkMethod:function(e){return function(n){for(var i=arguments.length,o=Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];var u=[];return r.forEach(function(r){var i=n[r],a=i[e].apply(i,o);a!==i&&u.push(a)}),u.length?u[0]:this}}}}var on=oe("forceGraph",ot),or=oe(["forceGraph","shadowGraph"],ot),oi=Object.assign.apply(Object,i5(["nodeColor","nodeAutoColorBy","nodeCanvasObject","nodeCanvasObjectMode","linkColor","linkAutoColorBy","linkLineDash","linkWidth","linkCanvasObject","linkCanvasObjectMode","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleOffset","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleCanvasObject","dagMode","dagLevelDistance","dagNodeFilter","onDagError","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map(function(e){return iK({},e,on.linkProp(e))})).concat(i5(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(e){return iK({},e,or.linkProp(e))})))),oo=Object.assign.apply(Object,i5(["d3Force","d3ReheatSimulation","emitParticle"].map(function(e){return iK({},e,on.linkMethod(e))})));function oa(e){if(e.canvas){var n=e.canvas.width,r=e.canvas.height;300===n&&150===r&&(n=r=0);var i=window.devicePixelRatio;n/=i,r/=i,[e.canvas,e.shadowCanvas].forEach(function(o){o.style.width="".concat(e.width,"px"),o.style.height="".concat(e.height,"px"),o.width=e.width*i,o.height=e.height*i,n||r||o.getContext("2d").scale(i,i)});var o=ej(e.canvas).k;e.zoom.translateBy(e.zoom.__baseElem,(e.width-n)/2/o,(e.height-r)/2/o),e.needsRedraw=!0}}function ou(e){var n=window.devicePixelRatio;e.setTransform(n,0,0,n,0,0)}function os(e,n,r){e.save(),ou(e),e.clearRect(0,0,n,r),e.restore()}var ol=nw({props:i1({width:{default:window.innerWidth,onChange:function(e,n){return oa(n)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(e,n){return oa(n)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(e,n){[e.nodes,e.links].every(function(e){return(e||[]).every(function(e){return!e.hasOwnProperty("__indexColor")})})&&n.colorTracker.reset(),[{type:"Node",objs:e.nodes},{type:"Link",objs:e.links}].forEach(function(e){var r=e.type;e.objs.filter(function(e){if(!e.hasOwnProperty("__indexColor"))return!0;var r=n.colorTracker.lookup(e.__indexColor);return!r||!r.hasOwnProperty("d")||r.d!==e}).forEach(function(e){e.__indexColor=n.colorTracker.register({type:r,d:e})})}),n.forceGraph.graphData(e),n.shadowGraph.graphData(e)},triggerUpdate:!1},backgroundColor:{onChange:function(e,n){n.canvas&&e&&(n.canvas.style.background=e)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(e,n){n.shadowGraph.nodeCanvasObject(e?function(n,r,i){return e(n,n.__indexColor,r,i)}:null),n.flushShadowCanvas&&n.flushShadowCanvas()},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(e,n){n.shadowGraph.linkCanvasObject(e?function(n,r,i){return e(n,n.__indexColor,r,i)}:null),n.flushShadowCanvas&&n.flushShadowCanvas()},triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(e,n){n.zoom.scaleExtent([e,n.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(e,n){n.zoom.scaleExtent([n.zoom.scaleExtent()[0],e])},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},enableZoomInteraction:{default:!0,triggerUpdate:!1},enablePanInteraction:{default:!0,triggerUpdate:!1},enableZoomPanInteraction:{default:!0,triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(e,n){n.hoverObj=null},triggerUpdate:!1},autoPauseRedraw:{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},showPointerCursor:{default:!0,triggerUpdate:!1},onZoom:{triggerUpdate:!1},onZoomEnd:{triggerUpdate:!1},onRenderFramePre:{triggerUpdate:!1},onRenderFramePost:{triggerUpdate:!1}},oi),aliases:{stopAnimation:"pauseAnimation"},methods:i1({graph2ScreenCoords:function(e,n,r){var i=ej(e.canvas);return{x:n*i.k+i.x,y:r*i.k+i.y}},screen2GraphCoords:function(e,n,r){var i=ej(e.canvas);return{x:(n-i.x)/i.k,y:(r-i.y)/i.k}},centerAt:function(e,n,r,i){if(!e.canvas)return null;if(void 0!==n||void 0!==r){var o=Object.assign({},void 0!==n?{x:n}:{},void 0!==r?{y:r}:{});return i?e.tweenGroup.add(new nm(a()).to(o,i).easing(np.Quadratic.Out).onUpdate(u).start()):u(o),this}return a();function a(){var n=ej(e.canvas);return{x:(e.width/2-n.x)/n.k,y:(e.height/2-n.y)/n.k}}function u(n){var r=n.x,i=n.y;e.zoom.translateTo(e.zoom.__baseElem,void 0===r?a().x:r,void 0===i?a().y:i),e.needsRedraw=!0}},zoom:function(e,n,r){if(!e.canvas)return null;if(void 0!==n)return r?e.tweenGroup.add(new nm({k:i()}).to({k:n},r).easing(np.Quadratic.Out).onUpdate(function(e){return o(e.k)}).start()):o(n),this;return i();function i(){return ej(e.canvas).k}function o(n){e.zoom.scaleTo(e.zoom.__baseElem,n),e.needsRedraw=!0}},zoomToFit:function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,i=arguments.length,o=Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];var u=this.getGraphBbox.apply(this,o);if(u){var s={x:(u.x[0]+u.x[1])/2,y:(u.y[0]+u.y[1])/2},l=Math.max(1e-12,Math.min(1e12,(e.width-2*r)/(u.x[1]-u.x[0]),(e.height-2*r)/(u.y[1]-u.y[0])));this.centerAt(s.x,s.y,n),this.zoom(l,n)}return this},getGraphBbox:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0},r=nk(e.nodeVal),i=e.graphData.nodes.filter(n).map(function(n){return{x:n.x,y:n.y,r:Math.sqrt(Math.max(0,r(n)||1))*e.nodeRelSize}});return i.length?{x:[eW(i,function(e){return e.x-e.r}),eY(i,function(e){return e.x+e.r})],y:[eW(i,function(e){return e.y-e.r}),eY(i,function(e){return e.y+e.r})]}:null},pauseAnimation:function(e){return e.animationFrameRequestId&&(cancelAnimationFrame(e.animationFrameRequestId),e.animationFrameRequestId=null),this},resumeAnimation:function(e){return e.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},oo),stateInit:function(){return{lastSetZoom:1,zoom:function(){var e,n,r,i=eD,o=eI,a=eq,u=eF,s=eL,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],f=250,h=th,p=tn("start","zoom","end"),d=0,g=10;function y(e){e.property("__zoom",eU).on("wheel.zoom",k,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",A).filter(s).on("touchstart.zoom",S).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",O).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function _(e,n){return(n=Math.max(l[0],Math.min(l[1],n)))===e.k?e:new eP(n,e.x,e.y)}function v(e,n,r){var i=n[0]-r[0]*e.k,o=n[1]-r[1]*e.k;return i===e.x&&o===e.y?e:new eP(e.k,i,o)}function m(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function b(e,n,r,i){e.on("start.zoom",function(){x(this,arguments).event(i).start()}).on("interrupt.zoom end.zoom",function(){x(this,arguments).event(i).end()}).tween("zoom",function(){var e=arguments,a=x(this,e).event(i),u=o.apply(this,e),s=null==r?m(u):"function"==typeof r?r.apply(this,e):r,l=Math.max(u[1][0]-u[0][0],u[1][1]-u[0][1]),c=this.__zoom,f="function"==typeof n?n.apply(this,e):n,p=h(c.invert(s).concat(l/c.k),f.invert(s).concat(l/f.k));return function(e){if(1===e)e=f;else{var n=p(e),r=l/n[2];e=new eP(r,s[0]-n[0]*r,s[1]-n[1]*r)}a.zoom(null,e)}})}function x(e,n,r){return!r&&e.__zooming||new w(e,n)}function w(e,n){this.that=e,this.args=n,this.active=0,this.sourceEvent=null,this.extent=o.apply(e,n),this.taps=0}function k(e,...n){if(i.apply(this,arguments)){var r=x(this,n).event(e),o=this.__zoom,s=Math.max(l[0],Math.min(l[1],o.k*Math.pow(2,u.apply(this,arguments)))),f=tp(e);if(r.wheel)(r.mouse[0][0]!==f[0]||r.mouse[0][1]!==f[1])&&(r.mouse[1]=o.invert(r.mouse[0]=f)),clearTimeout(r.wheel);else{if(o.k===s)return;r.mouse=[f,o.invert(f)],tU(this),r.start()}eR(e),r.wheel=setTimeout(function(){r.wheel=null,r.end()},150),r.zoom("mouse",a(v(_(o,s),r.mouse[0],r.mouse[1]),r.extent,c))}}function M(e,...n){if(!r&&i.apply(this,arguments)){var o=e.currentTarget,u=x(this,n,!0).event(e),s=tt(e.view).on("mousemove.zoom",function(e){if(eR(e),!u.moved){var n=e.clientX-f,r=e.clientY-h;u.moved=n*n+r*r>d}u.event(e).zoom("mouse",a(v(u.that.__zoom,u.mouse[0]=tp(e,o),u.mouse[1]),u.extent,c))},!0).on("mouseup.zoom",function(e){s.on("mousemove.zoom mouseup.zoom",null),tc(e.view,u.moved),eR(e),u.event(e).end()},!0),l=tp(e,o),f=e.clientX,h=e.clientY;tl(e.view),eN(e),u.mouse=[l,this.__zoom.invert(l)],tU(this),u.start()}}function A(e,...n){if(i.apply(this,arguments)){var r=this.__zoom,u=tp(e.changedTouches?e.changedTouches[0]:e,this),s=r.invert(u),l=r.k*(e.shiftKey?.5:2),h=a(v(_(r,l),u,s),o.apply(this,n),c);eR(e),f>0?tt(this).transition().duration(f).call(b,h,u,e):tt(this).call(y.transform,h,u,e)}}function S(r,...o){if(i.apply(this,arguments)){var a,u,s,l,c=r.touches,f=c.length,h=x(this,o,r.changedTouches.length===f).event(r);for(eN(r),u=0;u<f;++u)l=[l=tp(s=c[u],this),this.__zoom.invert(l),s.identifier],h.touch0?h.touch1||h.touch0[2]===l[2]||(h.touch1=l,h.taps=0):(h.touch0=l,a=!0,h.taps=1+!!e);e&&(e=clearTimeout(e)),a&&(h.taps<2&&(n=l[0],e=setTimeout(function(){e=null},500)),tU(this),h.start())}}function z(e,...n){if(this.__zooming){var r,i,o,u,s=x(this,n).event(e),l=e.changedTouches,f=l.length;for(eR(e),r=0;r<f;++r)o=tp(i=l[r],this),s.touch0&&s.touch0[2]===i.identifier?s.touch0[0]=o:s.touch1&&s.touch1[2]===i.identifier&&(s.touch1[0]=o);if(i=s.that.__zoom,s.touch1){var h=s.touch0[0],p=s.touch0[1],d=s.touch1[0],g=s.touch1[1],y=(y=d[0]-h[0])*y+(y=d[1]-h[1])*y,m=(m=g[0]-p[0])*m+(m=g[1]-p[1])*m;i=_(i,Math.sqrt(y/m)),o=[(h[0]+d[0])/2,(h[1]+d[1])/2],u=[(p[0]+g[0])/2,(p[1]+g[1])/2]}else{if(!s.touch0)return;o=s.touch0[0],u=s.touch0[1]}s.zoom("touch",a(v(i,o,u),s.extent,c))}}function O(e,...i){if(this.__zooming){var o,a,u=x(this,i).event(e),s=e.changedTouches,l=s.length;for(eN(e),r&&clearTimeout(r),r=setTimeout(function(){r=null},500),o=0;o<l;++o)a=s[o],u.touch0&&u.touch0[2]===a.identifier?delete u.touch0:u.touch1&&u.touch1[2]===a.identifier&&delete u.touch1;if(u.touch1&&!u.touch0&&(u.touch0=u.touch1,delete u.touch1),u.touch0)u.touch0[1]=this.__zoom.invert(u.touch0[0]);else if(u.end(),2===u.taps&&(a=tp(a,this),Math.hypot(n[0]-a[0],n[1]-a[1])<g)){var c=tt(this).on("dblclick.zoom");c&&c.apply(this,arguments)}}}return y.transform=function(e,n,r,i){var o=e.selection?e.selection():e;o.property("__zoom",eU),e!==o?b(e,n,r,i):o.interrupt().each(function(){x(this,arguments).event(i).start().zoom(null,"function"==typeof n?n.apply(this,arguments):n).end()})},y.scaleBy=function(e,n,r,i){y.scaleTo(e,function(){var e=this.__zoom.k,r="function"==typeof n?n.apply(this,arguments):n;return e*r},r,i)},y.scaleTo=function(e,n,r,i){y.transform(e,function(){var e=o.apply(this,arguments),i=this.__zoom,u=null==r?m(e):"function"==typeof r?r.apply(this,arguments):r,s=i.invert(u),l="function"==typeof n?n.apply(this,arguments):n;return a(v(_(i,l),u,s),e,c)},r,i)},y.translateBy=function(e,n,r,i){y.transform(e,function(){return a(this.__zoom.translate("function"==typeof n?n.apply(this,arguments):n,"function"==typeof r?r.apply(this,arguments):r),o.apply(this,arguments),c)},null,i)},y.translateTo=function(e,n,r,i,u){y.transform(e,function(){var e=o.apply(this,arguments),u=this.__zoom,s=null==i?m(e):"function"==typeof i?i.apply(this,arguments):i;return a(eT.translate(s[0],s[1]).scale(u.k).translate("function"==typeof n?-n.apply(this,arguments):-n,"function"==typeof r?-r.apply(this,arguments):-r),e,c)},i,u)},w.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,n){return this.mouse&&"mouse"!==e&&(this.mouse[1]=n.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=n.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=n.invert(this.touch1[0])),this.that.__zoom=n,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var n=tt(this.that).datum();p.call(e,this.that,new eE(e,{sourceEvent:this.sourceEvent,target:y,type:e,transform:this.that.__zoom,dispatch:p}),n)}},y.wheelDelta=function(e){return arguments.length?(u="function"==typeof e?e:eC(+e),y):u},y.filter=function(e){return arguments.length?(i="function"==typeof e?e:eC(!!e),y):i},y.touchable=function(e){return arguments.length?(s="function"==typeof e?e:eC(!!e),y):s},y.extent=function(e){return arguments.length?(o="function"==typeof e?e:eC([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),y):o},y.scaleExtent=function(e){return arguments.length?(l[0]=+e[0],l[1]=+e[1],y):[l[0],l[1]]},y.translateExtent=function(e){return arguments.length?(c[0][0]=+e[0][0],c[1][0]=+e[1][0],c[0][1]=+e[0][1],c[1][1]=+e[1][1],y):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},y.constrain=function(e){return arguments.length?(a=e,y):a},y.duration=function(e){return arguments.length?(f=+e,y):f},y.interpolate=function(e){return arguments.length?(h=e,y):h},y.on=function(){var e=p.on.apply(p,arguments);return e===p?y:e},y.clickDistance=function(e){return arguments.length?(d=(e=+e)*e,y):Math.sqrt(d)},y.tapDistance=function(e){return arguments.length?(g=+e,y):g},y}(),forceGraph:new ot,shadowGraph:new ot().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new rx,tweenGroup:new ng}},init:function(e,n){var r=this;e.innerHTML="";var i=document.createElement("div");i.classList.add("force-graph-container"),i.style.position="relative",e.appendChild(i),n.canvas=document.createElement("canvas"),n.backgroundColor&&(n.canvas.style.background=n.backgroundColor),i.appendChild(n.canvas),n.shadowCanvas=document.createElement("canvas");var o=n.canvas.getContext("2d"),a=n.shadowCanvas.getContext("2d",{willReadFrequently:!0}),u={x:-1e12,y:-1e12},s=function(){var e=null,r=window.devicePixelRatio,i=u.x>0&&u.y>0?a.getImageData(u.x*r,u.y*r,1,1):null;return i&&(e=n.colorTracker.lookup(i.data)),e};tt(n.canvas).call((function(){var e,n,r,i,o=eH,a=eV,u=eG,s=eX,l={},c=tn("start","drag","end"),f=0,h=0;function p(e){e.on("mousedown.drag",d).filter(s).on("touchstart.drag",_).on("touchmove.drag",v,to).on("touchend.drag touchcancel.drag",m).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(u,s){if(!i&&o.call(this,u,s)){var l=b(this,a.call(this,u,s),u,s,"mouse");l&&(tt(u.view).on("mousemove.drag",g,ta).on("mouseup.drag",y,ta),tl(u.view),tu(u),r=!1,e=u.clientX,n=u.clientY,l("start",u))}}function g(i){if(ts(i),!r){var o=i.clientX-e,a=i.clientY-n;r=o*o+a*a>h}l.mouse("drag",i)}function y(e){tt(e.view).on("mousemove.drag mouseup.drag",null),tc(e.view,r),ts(e),l.mouse("end",e)}function _(e,n){if(o.call(this,e,n)){var r,i,u=e.changedTouches,s=a.call(this,e,n),l=u.length;for(r=0;r<l;++r)(i=b(this,s,e,n,u[r].identifier,u[r]))&&(tu(e),i("start",e,u[r]))}}function v(e){var n,r,i=e.changedTouches,o=i.length;for(n=0;n<o;++n)(r=l[i[n].identifier])&&(ts(e),r("drag",e,i[n]))}function m(e){var n,r,o=e.changedTouches,a=o.length;for(i&&clearTimeout(i),i=setTimeout(function(){i=null},500),n=0;n<a;++n)(r=l[o[n].identifier])&&(tu(e),r("end",e,o[n]))}function b(e,n,r,i,o,a){var s,h,d,g=c.copy(),y=tp(a||r,n);if(null!=(d=u.call(e,new e$("beforestart",{sourceEvent:r,target:p,identifier:o,active:f,x:y[0],y:y[1],dx:0,dy:0,dispatch:g}),i)))return s=d.x-y[0]||0,h=d.y-y[1]||0,function r(a,u,c){var _,v=y;switch(a){case"start":l[o]=r,_=f++;break;case"end":delete l[o],--f;case"drag":y=tp(c||u,n),_=f}g.call(a,e,new e$(a,{sourceEvent:u,subject:d,target:p,identifier:o,active:_,x:y[0]+s,y:y[1]+h,dx:y[0]-v[0],dy:y[1]-v[1],dispatch:g}),i)}}return p.filter=function(e){return arguments.length?(o="function"==typeof e?e:eB(!!e),p):o},p.container=function(e){return arguments.length?(a="function"==typeof e?e:eB(e),p):a},p.subject=function(e){return arguments.length?(u="function"==typeof e?e:eB(e),p):u},p.touchable=function(e){return arguments.length?(s="function"==typeof e?e:eB(!!e),p):s},p.on=function(){var e=c.on.apply(c,arguments);return e===c?p:e},p.clickDistance=function(e){return arguments.length?(h=(e=+e)*e,p):Math.sqrt(h)},p})().subject(function(){if(!n.enableNodeDrag)return null;var e=s();return e&&"Node"===e.type?e.d:null}).on("start",function(e){var r=e.subject;r.__initialDragPos={x:r.x,y:r.y,fx:r.fx,fy:r.fy},e.active||(r.fx=r.x,r.fy=r.y),n.canvas.classList.add("grabbable")}).on("drag",function(e){var r=e.subject,i=r.__initialDragPos,o=ej(n.canvas).k,a={x:i.x+(e.x-i.x)/o-r.x,y:i.y+(e.y-i.y)/o-r.y};["x","y"].forEach(function(n){return r["f".concat(n)]=r[n]=i[n]+(e[n]-i[n])/o}),!r.__dragged&&5>=Math.sqrt(function(e,n){let r=0;for(let n of e)(n=+n)&&(r+=n);return r}(["x","y"].map(function(n){return Math.pow(e[n]-i[n],2)})))||(n.forceGraph.d3AlphaTarget(.3).resetCountdown(),n.isPointerDragging=!0,r.__dragged=!0,n.onNodeDrag(r,a))}).on("end",function(e){var r=e.subject,i=r.__initialDragPos,o={x:r.x-i.x,y:r.y-i.y};void 0===i.fx&&(r.fx=void 0),void 0===i.fy&&(r.fy=void 0),delete r.__initialDragPos,n.forceGraph.d3AlphaTarget()&&n.forceGraph.d3AlphaTarget(0).resetCountdown(),n.canvas.classList.remove("grabbable"),n.isPointerDragging=!1,r.__dragged&&(delete r.__dragged,n.onNodeDragEnd(r,o))})),n.zoom(n.zoom.__baseElem=tt(n.canvas)),n.zoom.__baseElem.on("dblclick.zoom",null),n.zoom.filter(function(e){return!e.button&&n.enableZoomPanInteraction&&("wheel"!==e.type||nk(n.enableZoomInteraction)(e))&&("wheel"===e.type||nk(n.enablePanInteraction)(e))}).on("zoom",function(e){var i=e.transform;[o,a].forEach(function(e){ou(e),e.translate(i.x,i.y),e.scale(i.k,i.k)}),n.isPointerDragging=!0,n.onZoom&&n.onZoom(i1(i1({},i),r.centerAt())),n.needsRedraw=!0}).on("end",function(e){n.isPointerDragging=!1,n.onZoomEnd&&n.onZoomEnd(i1(i1({},e.transform),r.centerAt()))}),oa(n),n.forceGraph.onNeedsRedraw(function(){return n.needsRedraw=!0}).onFinishUpdate(function(){ej(n.canvas).k===n.lastSetZoom&&n.graphData.nodes.length&&(n.zoom.scaleTo(n.zoom.__baseElem,n.lastSetZoom=4/Math.cbrt(n.graphData.nodes.length)),n.needsRedraw=!0)}),n.tooltip=new rY(i),["pointermove","pointerdown"].forEach(function(e){return i.addEventListener(e,function(r){"pointerdown"===e&&(n.isPointerPressed=!0,n.pointerDownEvent=r),!n.isPointerDragging&&"pointermove"===r.type&&n.onBackgroundClick&&(r.pressure>0||n.isPointerPressed)&&("mouse"===r.pointerType||void 0===r.movementX||[r.movementX,r.movementY].some(function(e){return Math.abs(e)>1}))&&(n.isPointerDragging=!0);var o,a,s,l=(o=i.getBoundingClientRect(),a=window.pageXOffset||document.documentElement.scrollLeft,s=window.pageYOffset||document.documentElement.scrollTop,{top:o.top+s,left:o.left+a});u.x=r.pageX-l.left,u.y=r.pageY-l.top},{passive:!0})}),i.addEventListener("pointerup",function(e){if(n.isPointerPressed){if(n.isPointerPressed=!1,n.isPointerDragging){n.isPointerDragging=!1;return}var r=[e,n.pointerDownEvent];requestAnimationFrame(function(){if(0===e.button){if(n.hoverObj){var i=n["on".concat(n.hoverObj.type,"Click")];i&&i.apply(void 0,[n.hoverObj.d].concat(r))}else n.onBackgroundClick&&n.onBackgroundClick.apply(n,r)}if(2===e.button){if(n.hoverObj){var o=n["on".concat(n.hoverObj.type,"RightClick")];o&&o.apply(void 0,[n.hoverObj.d].concat(r))}else n.onBackgroundRightClick&&n.onBackgroundRightClick.apply(n,r)}})}},{passive:!0}),i.addEventListener("contextmenu",function(e){return!n.onBackgroundRightClick&&!n.onNodeRightClick&&!n.onLinkRightClick||(e.preventDefault(),!1)}),n.forceGraph(o),n.shadowGraph(a);var l=nh(function(){os(a,n.width,n.height),n.shadowGraph.linkWidth(function(e){return nk(n.linkWidth)(e)+n.linkHoverPrecision});var e=ej(n.canvas);n.shadowGraph.globalScale(e.k).tickFrame()},800);n.flushShadowCanvas=l.flush,(this._animationCycle=function e(){var r=!n.autoPauseRedraw||!!n.needsRedraw||n.forceGraph.isEngineRunning()||n.graphData.links.some(function(e){return e.__photons&&e.__photons.length});if(n.needsRedraw=!1,n.enablePointerInteraction){var i=n.isPointerDragging?null:s();if(i!==n.hoverObj){var a=n.hoverObj,u=a?a.type:null,c=i?i.type:null;if(u&&u!==c){var f=n["on".concat(u,"Hover")];f&&f(null,a.d)}if(c){var h=n["on".concat(c,"Hover")];h&&h(i.d,u===c?a.d:null)}n.tooltip.content(i&&nk(n["".concat(i.type.toLowerCase(),"Label")])(i.d)||null),n.canvas.classList[(i&&n["on".concat(c,"Click")]||!i&&n.onBackgroundClick)&&nk(n.showPointerCursor)(null==i?void 0:i.d)?"add":"remove"]("clickable"),n.hoverObj=i}r&&l()}if(r){os(o,n.width,n.height);var p=ej(n.canvas).k;n.onRenderFramePre&&n.onRenderFramePre(o,p),n.forceGraph.globalScale(p).tickFrame(),n.onRenderFramePost&&n.onRenderFramePost(o,p)}n.tweenGroup.update(),n.animationFrameRequestId=requestAnimationFrame(e)})()},update:function(e){}}),oc=r(6853);let of={width:oc.number,height:oc.number,graphData:oc.shape({nodes:oc.arrayOf(oc.object).isRequired,links:oc.arrayOf(oc.object).isRequired}),backgroundColor:oc.string,nodeRelSize:oc.number,nodeId:oc.string,nodeLabel:oc.oneOfType([oc.string,oc.func]),nodeVal:oc.oneOfType([oc.number,oc.string,oc.func]),nodeVisibility:oc.oneOfType([oc.bool,oc.string,oc.func]),nodeColor:oc.oneOfType([oc.string,oc.func]),nodeAutoColorBy:oc.oneOfType([oc.string,oc.func]),onNodeHover:oc.func,onNodeClick:oc.func,linkSource:oc.string,linkTarget:oc.string,linkLabel:oc.oneOfType([oc.string,oc.func]),linkVisibility:oc.oneOfType([oc.bool,oc.string,oc.func]),linkColor:oc.oneOfType([oc.string,oc.func]),linkAutoColorBy:oc.oneOfType([oc.string,oc.func]),linkWidth:oc.oneOfType([oc.number,oc.string,oc.func]),linkCurvature:oc.oneOfType([oc.number,oc.string,oc.func]),linkDirectionalArrowLength:oc.oneOfType([oc.number,oc.string,oc.func]),linkDirectionalArrowColor:oc.oneOfType([oc.string,oc.func]),linkDirectionalArrowRelPos:oc.oneOfType([oc.number,oc.string,oc.func]),linkDirectionalParticles:oc.oneOfType([oc.number,oc.string,oc.func]),linkDirectionalParticleSpeed:oc.oneOfType([oc.number,oc.string,oc.func]),linkDirectionalParticleOffset:oc.oneOfType([oc.number,oc.string,oc.func]),linkDirectionalParticleWidth:oc.oneOfType([oc.number,oc.string,oc.func]),linkDirectionalParticleColor:oc.oneOfType([oc.string,oc.func]),onLinkHover:oc.func,onLinkClick:oc.func,dagMode:oc.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:oc.number,dagNodeFilter:oc.func,onDagError:oc.func,d3AlphaMin:oc.number,d3AlphaDecay:oc.number,d3VelocityDecay:oc.number,warmupTicks:oc.number,cooldownTicks:oc.number,cooldownTime:oc.number,onEngineTick:oc.func,onEngineStop:oc.func,getGraphBbox:oc.func},oh={zoomToFit:oc.func,onNodeRightClick:oc.func,onNodeDrag:oc.func,onNodeDragEnd:oc.func,onLinkRightClick:oc.func,linkHoverPrecision:oc.number,onBackgroundClick:oc.func,onBackgroundRightClick:oc.func,showPointerCursor:oc.oneOfType([oc.bool,oc.func]),enablePointerInteraction:oc.bool,enableNodeDrag:oc.bool},op={showNavInfo:oc.bool,nodeOpacity:oc.number,nodeResolution:oc.number,nodeThreeObject:oc.oneOfType([oc.object,oc.string,oc.func]),nodeThreeObjectExtend:oc.oneOfType([oc.bool,oc.string,oc.func]),nodePositionUpdate:oc.func,linkOpacity:oc.number,linkResolution:oc.number,linkCurveRotation:oc.oneOfType([oc.number,oc.string,oc.func]),linkMaterial:oc.oneOfType([oc.object,oc.string,oc.func]),linkThreeObject:oc.oneOfType([oc.object,oc.string,oc.func]),linkThreeObjectExtend:oc.oneOfType([oc.bool,oc.string,oc.func]),linkPositionUpdate:oc.func,linkDirectionalArrowResolution:oc.number,linkDirectionalParticleResolution:oc.number,linkDirectionalParticleThreeObject:oc.oneOfType([oc.object,oc.string,oc.func]),forceEngine:oc.oneOf(["d3","ngraph"]),ngraphPhysics:oc.object,numDimensions:oc.oneOf([1,2,3])},od=Object.assign({},of,oh,{linkLineDash:oc.oneOfType([oc.arrayOf(oc.number),oc.string,oc.func]),nodeCanvasObjectMode:oc.oneOfType([oc.string,oc.func]),nodeCanvasObject:oc.func,nodePointerAreaPaint:oc.func,linkCanvasObjectMode:oc.oneOfType([oc.string,oc.func]),linkCanvasObject:oc.func,linkPointerAreaPaint:oc.func,linkDirectionalParticleCanvasObject:oc.func,autoPauseRedraw:oc.bool,minZoom:oc.number,maxZoom:oc.number,enableZoomInteraction:oc.oneOfType([oc.bool,oc.func]),enablePanInteraction:oc.oneOfType([oc.bool,oc.func]),onZoom:oc.func,onZoomEnd:oc.func,onRenderFramePre:oc.func,onRenderFramePost:oc.func});Object.assign({},of,oh,op,{enableNavigationControls:oc.bool,controlType:oc.oneOf(["trackball","orbit","fly"]),rendererConfig:oc.object,extraRenderers:oc.arrayOf(oc.shape({render:oc.func.isRequired}))}),Object.assign({},of,op,{nodeDesc:oc.oneOfType([oc.string,oc.func]),linkDesc:oc.oneOfType([oc.string,oc.func])}),Object.assign({},of,op,{markerAttrs:oc.object,yOffset:oc.number,glScale:oc.number});let og=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.wrapperElementType,o=void 0===r?"div":r,a=n.nodeMapper,u=void 0===a?function(e){return e}:a,l=n.methodNames,f=void 0===l?[]:l,p=n.initPropNames,d=void 0===p?[]:p;return(0,i.forwardRef)(function(n,r){var a=(0,i.useRef)(),l=(0,i.useMemo)(function(){return e(Object.fromEntries(d.filter(function(e){return n.hasOwnProperty(e)}).map(function(e){return[e,n[e]]})))},[]);h(function(){l(u(a.current))},i.useLayoutEffect),h(function(){return l._destructor instanceof Function?l._destructor:void 0});var p=(0,i.useCallback)(function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return l[e]instanceof Function?l[e].apply(l,r):void 0},[l]),g=(0,i.useRef)({});return Object.keys(s(n,[].concat(c(f),c(d)))).filter(function(e){return g.current[e]!==n[e]}).forEach(function(e){return p(e,n[e])}),g.current=n,(0,i.useImperativeHandle)(r,function(){return Object.fromEntries(f.map(function(e){return[e,function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return p.apply(void 0,[e].concat(r))}]}))},[p]),i.createElement(o,{ref:a})})}(ol,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});og.displayName="ForceGraph2D",og.propTypes=od}}]);