fleet-commander-ai 0.0.8 → 0.0.10

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 (114) hide show
  1. package/dist/client/assets/index-BV8wNYWe.js +181 -0
  2. package/dist/client/assets/index-BV8wNYWe.js.map +1 -0
  3. package/dist/client/assets/index-LD5BhGdK.css +1 -0
  4. package/dist/client/index.html +2 -2
  5. package/dist/server/config.d.ts +16 -0
  6. package/dist/server/config.d.ts.map +1 -1
  7. package/dist/server/config.js +39 -10
  8. package/dist/server/config.js.map +1 -1
  9. package/dist/server/db.d.ts +32 -4
  10. package/dist/server/db.d.ts.map +1 -1
  11. package/dist/server/db.js +107 -12
  12. package/dist/server/db.js.map +1 -1
  13. package/dist/server/index.js +25 -1
  14. package/dist/server/index.js.map +1 -1
  15. package/dist/server/routes/projects.d.ts.map +1 -1
  16. package/dist/server/routes/projects.js +4 -1
  17. package/dist/server/routes/projects.js.map +1 -1
  18. package/dist/server/routes/teams.d.ts.map +1 -1
  19. package/dist/server/routes/teams.js +14 -0
  20. package/dist/server/routes/teams.js.map +1 -1
  21. package/dist/server/services/cleanup.d.ts.map +1 -1
  22. package/dist/server/services/cleanup.js +5 -3
  23. package/dist/server/services/cleanup.js.map +1 -1
  24. package/dist/server/services/data-retention.d.ts +20 -0
  25. package/dist/server/services/data-retention.d.ts.map +1 -0
  26. package/dist/server/services/data-retention.js +79 -0
  27. package/dist/server/services/data-retention.js.map +1 -0
  28. package/dist/server/services/github-poller.d.ts.map +1 -1
  29. package/dist/server/services/github-poller.js +3 -1
  30. package/dist/server/services/github-poller.js.map +1 -1
  31. package/dist/server/services/issue-service.d.ts +2 -0
  32. package/dist/server/services/issue-service.d.ts.map +1 -1
  33. package/dist/server/services/issue-service.js +4 -0
  34. package/dist/server/services/issue-service.js.map +1 -1
  35. package/dist/server/services/project-service.d.ts +21 -3
  36. package/dist/server/services/project-service.d.ts.map +1 -1
  37. package/dist/server/services/project-service.js +165 -56
  38. package/dist/server/services/project-service.js.map +1 -1
  39. package/dist/server/services/service-error.d.ts +2 -0
  40. package/dist/server/services/service-error.d.ts.map +1 -1
  41. package/dist/server/services/service-error.js +4 -0
  42. package/dist/server/services/service-error.js.map +1 -1
  43. package/dist/server/services/team-manager.d.ts +4 -2
  44. package/dist/server/services/team-manager.d.ts.map +1 -1
  45. package/dist/server/services/team-manager.js +72 -12
  46. package/dist/server/services/team-manager.js.map +1 -1
  47. package/dist/server/services/team-service.d.ts.map +1 -1
  48. package/dist/server/services/team-service.js +16 -1
  49. package/dist/server/services/team-service.js.map +1 -1
  50. package/dist/server/utils/cc-spawn.d.ts.map +1 -1
  51. package/dist/server/utils/cc-spawn.js +3 -0
  52. package/dist/server/utils/cc-spawn.js.map +1 -1
  53. package/dist/server/utils/exec-gh.d.ts +4 -0
  54. package/dist/server/utils/exec-gh.d.ts.map +1 -1
  55. package/dist/server/utils/exec-gh.js +30 -2
  56. package/dist/server/utils/exec-gh.js.map +1 -1
  57. package/dist/server/utils/fc-manifest.d.ts +50 -0
  58. package/dist/server/utils/fc-manifest.d.ts.map +1 -0
  59. package/dist/server/utils/fc-manifest.js +92 -0
  60. package/dist/server/utils/fc-manifest.js.map +1 -0
  61. package/dist/shared/types.d.ts +9 -0
  62. package/dist/shared/types.d.ts.map +1 -1
  63. package/hooks/on_notification.sh +3 -1
  64. package/hooks/on_post_tool_use.sh +3 -1
  65. package/hooks/on_pre_compact.sh +3 -1
  66. package/hooks/on_session_end.sh +3 -1
  67. package/hooks/on_session_start.sh +3 -1
  68. package/hooks/on_stop.sh +3 -1
  69. package/hooks/on_stop_failure.sh +3 -1
  70. package/hooks/on_subagent_start.sh +3 -1
  71. package/hooks/on_subagent_stop.sh +3 -1
  72. package/hooks/on_teammate_idle.sh +3 -1
  73. package/hooks/on_tool_error.sh +3 -1
  74. package/hooks/run-hook.sh +15 -0
  75. package/hooks/send_event.sh +10 -1
  76. package/hooks/settings.json.example +11 -11
  77. package/package.json +1 -1
  78. package/prompts/ai-demo-platform-prompt.md +17 -0
  79. package/prompts/caddy-prompt.md +17 -0
  80. package/prompts/chat-prompt.md +17 -0
  81. package/prompts/cortex-admin-prompt.md +17 -0
  82. package/prompts/cortex-box-prototype-prompt.md +17 -0
  83. package/prompts/cortex-document-parser-prompt.md +17 -0
  84. package/prompts/cortex-proxy-prompt.md +17 -0
  85. package/prompts/default-prompt.md +2 -2
  86. package/prompts/devops-prompt.md +17 -0
  87. package/prompts/documentation-prompt.md +17 -0
  88. package/prompts/fakturomat-prompt.md +17 -0
  89. package/prompts/fleet-commander-prompt.md +17 -0
  90. package/prompts/fm-content-generator-prompt.md +17 -0
  91. package/prompts/geo-calc-prompt.md +17 -0
  92. package/prompts/idp-prompt.md +17 -0
  93. package/prompts/idp-worker-prompt.md +17 -0
  94. package/prompts/invoice-supervisor-prompt.md +17 -0
  95. package/prompts/keycloak-prompt.md +17 -0
  96. package/prompts/prosty-jezyk-prompt.md +17 -0
  97. package/prompts/rag-qa-engine-fork-prompt.md +17 -0
  98. package/prompts/rag-qa-engine-prompt.md +17 -0
  99. package/prompts/whoami-prompt.md +17 -0
  100. package/templates/agents/fleet-dev.md +1 -1
  101. package/templates/agents/fleet-planner.md +14 -13
  102. package/templates/agents/fleet-reviewer.md +1 -1
  103. package/templates/guides/api-design.md +1 -1
  104. package/templates/guides/csharp-conventions.md +1 -1
  105. package/templates/guides/devops-conventions.md +1 -1
  106. package/templates/guides/fsharp-conventions.md +1 -1
  107. package/templates/guides/python-conventions.md +1 -1
  108. package/templates/guides/sql-database.md +1 -1
  109. package/templates/guides/testing-strategies.md +1 -1
  110. package/templates/guides/typescript-conventions.md +1 -1
  111. package/templates/workflow.md +11 -9
  112. package/dist/client/assets/index-BbrDeQ1K.css +0 -1
  113. package/dist/client/assets/index-DLivu-L6.js +0 -181
  114. package/dist/client/assets/index-DLivu-L6.js.map +0 -1
@@ -0,0 +1,181 @@
1
+ var DH=Object.defineProperty;var LH=(e,r,n)=>r in e?DH(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n;var bd=(e,r,n)=>LH(e,typeof r!="symbol"?r+"":r,n);function IH(e,r){for(var n=0;n<r.length;n++){const a=r[n];if(typeof a!="string"&&!Array.isArray(a)){for(const i in a)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(a,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>a[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))a(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&a(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var xd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function In(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hg={exports:{}},gu={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var WO;function zH(){if(WO)return gu;WO=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function n(a,i,o){var s=null;if(o!==void 0&&(s=""+o),i.key!==void 0&&(s=""+i.key),"key"in i){o={};for(var c in i)c!=="key"&&(o[c]=i[c])}else o=i;return i=o.ref,{$$typeof:e,type:a,key:s,ref:i!==void 0?i:null,props:o}}return gu.Fragment=r,gu.jsx=n,gu.jsxs=n,gu}var ZO;function qH(){return ZO||(ZO=1,Hg.exports=zH()),Hg.exports}var b=qH(),Gg={exports:{}},Me={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var QO;function BH(){if(QO)return Me;QO=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),g=Symbol.iterator;function y(F){return F===null||typeof F!="object"?null:(F=g&&F[g]||F["@@iterator"],typeof F=="function"?F:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,_={};function w(F,X,ce){this.props=F,this.context=X,this.refs=_,this.updater=ce||x}w.prototype.isReactComponent={},w.prototype.setState=function(F,X){if(typeof F!="object"&&typeof F!="function"&&F!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,F,X,"setState")},w.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function A(){}A.prototype=w.prototype;function C(F,X,ce){this.props=F,this.context=X,this.refs=_,this.updater=ce||x}var O=C.prototype=new A;O.constructor=C,E(O,w.prototype),O.isPureReactComponent=!0;var T=Array.isArray;function N(){}var M={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function L(F,X,ce){var G=ce.ref;return{$$typeof:e,type:F,key:X,ref:G!==void 0?G:null,props:ce}}function D(F,X){return L(F.type,X,F.props)}function q(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function z(F){var X={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(ce){return X[ce]})}var U=/\/+/g;function $(F,X){return typeof F=="object"&&F!==null&&F.key!=null?z(""+F.key):X.toString(36)}function Y(F){switch(F.status){case"fulfilled":return F.value;case"rejected":throw F.reason;default:switch(typeof F.status=="string"?F.then(N,N):(F.status="pending",F.then(function(X){F.status==="pending"&&(F.status="fulfilled",F.value=X)},function(X){F.status==="pending"&&(F.status="rejected",F.reason=X)})),F.status){case"fulfilled":return F.value;case"rejected":throw F.reason}}throw F}function B(F,X,ce,G,H){var te=typeof F;(te==="undefined"||te==="boolean")&&(F=null);var W=!1;if(F===null)W=!0;else switch(te){case"bigint":case"string":case"number":W=!0;break;case"object":switch(F.$$typeof){case e:case r:W=!0;break;case h:return W=F._init,B(W(F._payload),X,ce,G,H)}}if(W)return H=H(F),W=G===""?"."+$(F,0):G,T(H)?(ce="",W!=null&&(ce=W.replace(U,"$&/")+"/"),B(H,X,ce,"",function(le){return le})):H!=null&&(q(H)&&(H=D(H,ce+(H.key==null||F&&F.key===H.key?"":(""+H.key).replace(U,"$&/")+"/")+W)),X.push(H)),1;W=0;var xe=G===""?".":G+":";if(T(F))for(var ee=0;ee<F.length;ee++)G=F[ee],te=xe+$(G,ee),W+=B(G,X,ce,te,H);else if(ee=y(F),typeof ee=="function")for(F=ee.call(F),ee=0;!(G=F.next()).done;)G=G.value,te=xe+$(G,ee++),W+=B(G,X,ce,te,H);else if(te==="object"){if(typeof F.then=="function")return B(Y(F),X,ce,G,H);throw X=String(F),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return W}function Z(F,X,ce){if(F==null)return F;var G=[],H=0;return B(F,G,"","",function(te){return X.call(ce,te,H++)}),G}function ae(F){if(F._status===-1){var X=F._result;X=X(),X.then(function(ce){(F._status===0||F._status===-1)&&(F._status=1,F._result=ce)},function(ce){(F._status===0||F._status===-1)&&(F._status=2,F._result=ce)}),F._status===-1&&(F._status=0,F._result=X)}if(F._status===1)return F._result.default;throw F._result}var V=typeof reportError=="function"?reportError:function(F){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof F=="object"&&F!==null&&typeof F.message=="string"?String(F.message):String(F),error:F});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",F);return}console.error(F)},fe={map:Z,forEach:function(F,X,ce){Z(F,function(){X.apply(this,arguments)},ce)},count:function(F){var X=0;return Z(F,function(){X++}),X},toArray:function(F){return Z(F,function(X){return X})||[]},only:function(F){if(!q(F))throw Error("React.Children.only expected to receive a single React element child.");return F}};return Me.Activity=m,Me.Children=fe,Me.Component=w,Me.Fragment=n,Me.Profiler=i,Me.PureComponent=C,Me.StrictMode=a,Me.Suspense=f,Me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Me.__COMPILER_RUNTIME={__proto__:null,c:function(F){return M.H.useMemoCache(F)}},Me.cache=function(F){return function(){return F.apply(null,arguments)}},Me.cacheSignal=function(){return null},Me.cloneElement=function(F,X,ce){if(F==null)throw Error("The argument must be a React element, but you passed "+F+".");var G=E({},F.props),H=F.key;if(X!=null)for(te in X.key!==void 0&&(H=""+X.key),X)!P.call(X,te)||te==="key"||te==="__self"||te==="__source"||te==="ref"&&X.ref===void 0||(G[te]=X[te]);var te=arguments.length-2;if(te===1)G.children=ce;else if(1<te){for(var W=Array(te),xe=0;xe<te;xe++)W[xe]=arguments[xe+2];G.children=W}return L(F.type,H,G)},Me.createContext=function(F){return F={$$typeof:s,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null},F.Provider=F,F.Consumer={$$typeof:o,_context:F},F},Me.createElement=function(F,X,ce){var G,H={},te=null;if(X!=null)for(G in X.key!==void 0&&(te=""+X.key),X)P.call(X,G)&&G!=="key"&&G!=="__self"&&G!=="__source"&&(H[G]=X[G]);var W=arguments.length-2;if(W===1)H.children=ce;else if(1<W){for(var xe=Array(W),ee=0;ee<W;ee++)xe[ee]=arguments[ee+2];H.children=xe}if(F&&F.defaultProps)for(G in W=F.defaultProps,W)H[G]===void 0&&(H[G]=W[G]);return L(F,te,H)},Me.createRef=function(){return{current:null}},Me.forwardRef=function(F){return{$$typeof:c,render:F}},Me.isValidElement=q,Me.lazy=function(F){return{$$typeof:h,_payload:{_status:-1,_result:F},_init:ae}},Me.memo=function(F,X){return{$$typeof:d,type:F,compare:X===void 0?null:X}},Me.startTransition=function(F){var X=M.T,ce={};M.T=ce;try{var G=F(),H=M.S;H!==null&&H(ce,G),typeof G=="object"&&G!==null&&typeof G.then=="function"&&G.then(N,V)}catch(te){V(te)}finally{X!==null&&ce.types!==null&&(X.types=ce.types),M.T=X}},Me.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Me.use=function(F){return M.H.use(F)},Me.useActionState=function(F,X,ce){return M.H.useActionState(F,X,ce)},Me.useCallback=function(F,X){return M.H.useCallback(F,X)},Me.useContext=function(F){return M.H.useContext(F)},Me.useDebugValue=function(){},Me.useDeferredValue=function(F,X){return M.H.useDeferredValue(F,X)},Me.useEffect=function(F,X){return M.H.useEffect(F,X)},Me.useEffectEvent=function(F){return M.H.useEffectEvent(F)},Me.useId=function(){return M.H.useId()},Me.useImperativeHandle=function(F,X,ce){return M.H.useImperativeHandle(F,X,ce)},Me.useInsertionEffect=function(F,X){return M.H.useInsertionEffect(F,X)},Me.useLayoutEffect=function(F,X){return M.H.useLayoutEffect(F,X)},Me.useMemo=function(F,X){return M.H.useMemo(F,X)},Me.useOptimistic=function(F,X){return M.H.useOptimistic(F,X)},Me.useReducer=function(F,X,ce){return M.H.useReducer(F,X,ce)},Me.useRef=function(F){return M.H.useRef(F)},Me.useState=function(F){return M.H.useState(F)},Me.useSyncExternalStore=function(F,X,ce){return M.H.useSyncExternalStore(F,X,ce)},Me.useTransition=function(){return M.H.useTransition()},Me.version="19.2.4",Me}var JO;function os(){return JO||(JO=1,Gg.exports=BH()),Gg.exports}var k=os();const yp=In(k),$H=IH({__proto__:null,default:yp},[k]);var Vg={exports:{}},yu={},Kg={exports:{}},Yg={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var e5;function FH(){return e5||(e5=1,(function(e){function r(B,Z){var ae=B.length;B.push(Z);e:for(;0<ae;){var V=ae-1>>>1,fe=B[V];if(0<i(fe,Z))B[V]=Z,B[ae]=fe,ae=V;else break e}}function n(B){return B.length===0?null:B[0]}function a(B){if(B.length===0)return null;var Z=B[0],ae=B.pop();if(ae!==Z){B[0]=ae;e:for(var V=0,fe=B.length,F=fe>>>1;V<F;){var X=2*(V+1)-1,ce=B[X],G=X+1,H=B[G];if(0>i(ce,ae))G<fe&&0>i(H,ce)?(B[V]=H,B[G]=ae,V=G):(B[V]=ce,B[X]=ae,V=X);else if(G<fe&&0>i(H,ae))B[V]=H,B[G]=ae,V=G;else break e}}return Z}function i(B,Z){var ae=B.sortIndex-Z.sortIndex;return ae!==0?ae:B.id-Z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,c=s.now();e.unstable_now=function(){return s.now()-c}}var f=[],d=[],h=1,m=null,g=3,y=!1,x=!1,E=!1,_=!1,w=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function O(B){for(var Z=n(d);Z!==null;){if(Z.callback===null)a(d);else if(Z.startTime<=B)a(d),Z.sortIndex=Z.expirationTime,r(f,Z);else break;Z=n(d)}}function T(B){if(E=!1,O(B),!x)if(n(f)!==null)x=!0,N||(N=!0,z());else{var Z=n(d);Z!==null&&Y(T,Z.startTime-B)}}var N=!1,M=-1,P=5,L=-1;function D(){return _?!0:!(e.unstable_now()-L<P)}function q(){if(_=!1,N){var B=e.unstable_now();L=B;var Z=!0;try{e:{x=!1,E&&(E=!1,A(M),M=-1),y=!0;var ae=g;try{t:{for(O(B),m=n(f);m!==null&&!(m.expirationTime>B&&D());){var V=m.callback;if(typeof V=="function"){m.callback=null,g=m.priorityLevel;var fe=V(m.expirationTime<=B);if(B=e.unstable_now(),typeof fe=="function"){m.callback=fe,O(B),Z=!0;break t}m===n(f)&&a(f),O(B)}else a(f);m=n(f)}if(m!==null)Z=!0;else{var F=n(d);F!==null&&Y(T,F.startTime-B),Z=!1}}break e}finally{m=null,g=ae,y=!1}Z=void 0}}finally{Z?z():N=!1}}}var z;if(typeof C=="function")z=function(){C(q)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,$=U.port2;U.port1.onmessage=q,z=function(){$.postMessage(null)}}else z=function(){w(q,0)};function Y(B,Z){M=w(function(){B(e.unstable_now())},Z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(B){switch(g){case 1:case 2:case 3:var Z=3;break;default:Z=g}var ae=g;g=Z;try{return B()}finally{g=ae}},e.unstable_requestPaint=function(){_=!0},e.unstable_runWithPriority=function(B,Z){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var ae=g;g=B;try{return Z()}finally{g=ae}},e.unstable_scheduleCallback=function(B,Z,ae){var V=e.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?V+ae:V):ae=V,B){case 1:var fe=-1;break;case 2:fe=250;break;case 5:fe=1073741823;break;case 4:fe=1e4;break;default:fe=5e3}return fe=ae+fe,B={id:h++,callback:Z,priorityLevel:B,startTime:ae,expirationTime:fe,sortIndex:-1},ae>V?(B.sortIndex=ae,r(d,B),n(f)===null&&B===n(d)&&(E?(A(M),M=-1):E=!0,Y(T,ae-V))):(B.sortIndex=fe,r(f,B),x||y||(x=!0,N||(N=!0,z()))),B},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(B){var Z=g;return function(){var ae=g;g=Z;try{return B.apply(this,arguments)}finally{g=ae}}}})(Yg)),Yg}var t5;function UH(){return t5||(t5=1,Kg.exports=FH()),Kg.exports}var Xg={exports:{}},or={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var r5;function HH(){if(r5)return or;r5=1;var e=os();function r(f){var d="https://react.dev/errors/"+f;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)d+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+f+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={d:{f:n,r:function(){throw Error(r(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(f,d,h){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:m==null?null:""+m,children:f,containerInfo:d,implementation:h}}var s=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,d){if(f==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return or.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,or.createPortal=function(f,d){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(r(299));return o(f,d,null,h)},or.flushSync=function(f){var d=s.T,h=a.p;try{if(s.T=null,a.p=2,f)return f()}finally{s.T=d,a.p=h,a.d.f()}},or.preconnect=function(f,d){typeof f=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,a.d.C(f,d))},or.prefetchDNS=function(f){typeof f=="string"&&a.d.D(f)},or.preinit=function(f,d){if(typeof f=="string"&&d&&typeof d.as=="string"){var h=d.as,m=c(h,d.crossOrigin),g=typeof d.integrity=="string"?d.integrity:void 0,y=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;h==="style"?a.d.S(f,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:m,integrity:g,fetchPriority:y}):h==="script"&&a.d.X(f,{crossOrigin:m,integrity:g,fetchPriority:y,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},or.preinitModule=function(f,d){if(typeof f=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var h=c(d.as,d.crossOrigin);a.d.M(f,{crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&a.d.M(f)},or.preload=function(f,d){if(typeof f=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var h=d.as,m=c(h,d.crossOrigin);a.d.L(f,h,{crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},or.preloadModule=function(f,d){if(typeof f=="string")if(d){var h=c(d.as,d.crossOrigin);a.d.m(f,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else a.d.m(f)},or.requestFormReset=function(f){a.d.r(f)},or.unstable_batchedUpdates=function(f,d){return f(d)},or.useFormState=function(f,d,h){return s.H.useFormState(f,d,h)},or.useFormStatus=function(){return s.H.useHostTransitionStatus()},or.version="19.2.4",or}var n5;function A6(){if(n5)return Xg.exports;n5=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),Xg.exports=HH(),Xg.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var a5;function GH(){if(a5)return yu;a5=1;var e=UH(),r=os(),n=A6();function a(l){var u="https://react.dev/errors/"+l;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)u+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+l+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(l){return!(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)}function o(l){var u=l,p=l;if(l.alternate)for(;u.return;)u=u.return;else{l=u;do u=l,(u.flags&4098)!==0&&(p=u.return),l=u.return;while(l)}return u.tag===3?p:null}function s(l){if(l.tag===13){var u=l.memoizedState;if(u===null&&(l=l.alternate,l!==null&&(u=l.memoizedState)),u!==null)return u.dehydrated}return null}function c(l){if(l.tag===31){var u=l.memoizedState;if(u===null&&(l=l.alternate,l!==null&&(u=l.memoizedState)),u!==null)return u.dehydrated}return null}function f(l){if(o(l)!==l)throw Error(a(188))}function d(l){var u=l.alternate;if(!u){if(u=o(l),u===null)throw Error(a(188));return u!==l?null:l}for(var p=l,v=u;;){var S=p.return;if(S===null)break;var j=S.alternate;if(j===null){if(v=S.return,v!==null){p=v;continue}break}if(S.child===j.child){for(j=S.child;j;){if(j===p)return f(S),l;if(j===v)return f(S),u;j=j.sibling}throw Error(a(188))}if(p.return!==v.return)p=S,v=j;else{for(var R=!1,I=S.child;I;){if(I===p){R=!0,p=S,v=j;break}if(I===v){R=!0,v=S,p=j;break}I=I.sibling}if(!R){for(I=j.child;I;){if(I===p){R=!0,p=j,v=S;break}if(I===v){R=!0,v=j,p=S;break}I=I.sibling}if(!R)throw Error(a(189))}}if(p.alternate!==v)throw Error(a(190))}if(p.tag!==3)throw Error(a(188));return p.stateNode.current===p?l:u}function h(l){var u=l.tag;if(u===5||u===26||u===27||u===6)return l;for(l=l.child;l!==null;){if(u=h(l),u!==null)return u;l=l.sibling}return null}var m=Object.assign,g=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),C=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),D=Symbol.for("react.memo_cache_sentinel"),q=Symbol.iterator;function z(l){return l===null||typeof l!="object"?null:(l=q&&l[q]||l["@@iterator"],typeof l=="function"?l:null)}var U=Symbol.for("react.client.reference");function $(l){if(l==null)return null;if(typeof l=="function")return l.$$typeof===U?null:l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case E:return"Fragment";case w:return"Profiler";case _:return"StrictMode";case T:return"Suspense";case N:return"SuspenseList";case L:return"Activity"}if(typeof l=="object")switch(l.$$typeof){case x:return"Portal";case C:return l.displayName||"Context";case A:return(l._context.displayName||"Context")+".Consumer";case O:var u=l.render;return l=l.displayName,l||(l=u.displayName||u.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case M:return u=l.displayName||null,u!==null?u:$(l.type)||"Memo";case P:u=l._payload,l=l._init;try{return $(l(u))}catch{}}return null}var Y=Array.isArray,B=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},V=[],fe=-1;function F(l){return{current:l}}function X(l){0>fe||(l.current=V[fe],V[fe]=null,fe--)}function ce(l,u){fe++,V[fe]=l.current,l.current=u}var G=F(null),H=F(null),te=F(null),W=F(null);function xe(l,u){switch(ce(te,u),ce(H,l),ce(G,null),u.nodeType){case 9:case 11:l=(l=u.documentElement)&&(l=l.namespaceURI)?bO(l):0;break;default:if(l=u.tagName,u=u.namespaceURI)u=bO(u),l=xO(u,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}X(G),ce(G,l)}function ee(){X(G),X(H),X(te)}function le(l){l.memoizedState!==null&&ce(W,l);var u=G.current,p=xO(u,l.type);u!==p&&(ce(H,l),ce(G,p))}function be(l){H.current===l&&(X(G),X(H)),W.current===l&&(X(W),hu._currentValue=ae)}var he,Se;function se(l){if(he===void 0)try{throw Error()}catch(p){var u=p.stack.trim().match(/\n( *(at )?)/);he=u&&u[1]||"",Se=-1<p.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<p.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+he+l+Se}var ne=!1;function ge(l,u){if(!l||ne)return"";ne=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var v={DetermineComponentFrameRoot:function(){try{if(u){var ye=function(){throw Error()};if(Object.defineProperty(ye.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ye,[])}catch(pe){var ue=pe}Reflect.construct(l,[],ye)}else{try{ye.call()}catch(pe){ue=pe}l.call(ye.prototype)}}else{try{throw Error()}catch(pe){ue=pe}(ye=l())&&typeof ye.catch=="function"&&ye.catch(function(){})}}catch(pe){if(pe&&ue&&typeof pe.stack=="string")return[pe.stack,ue.stack]}return[null,null]}};v.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var S=Object.getOwnPropertyDescriptor(v.DetermineComponentFrameRoot,"name");S&&S.configurable&&Object.defineProperty(v.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var j=v.DetermineComponentFrameRoot(),R=j[0],I=j[1];if(R&&I){var K=R.split(`
44
+ `),oe=I.split(`
45
+ `);for(S=v=0;v<K.length&&!K[v].includes("DetermineComponentFrameRoot");)v++;for(;S<oe.length&&!oe[S].includes("DetermineComponentFrameRoot");)S++;if(v===K.length||S===oe.length)for(v=K.length-1,S=oe.length-1;1<=v&&0<=S&&K[v]!==oe[S];)S--;for(;1<=v&&0<=S;v--,S--)if(K[v]!==oe[S]){if(v!==1||S!==1)do if(v--,S--,0>S||K[v]!==oe[S]){var me=`
46
+ `+K[v].replace(" at new "," at ");return l.displayName&&me.includes("<anonymous>")&&(me=me.replace("<anonymous>",l.displayName)),me}while(1<=v&&0<=S);break}}}finally{ne=!1,Error.prepareStackTrace=p}return(p=l?l.displayName||l.name:"")?se(p):""}function _e(l,u){switch(l.tag){case 26:case 27:case 5:return se(l.type);case 16:return se("Lazy");case 13:return l.child!==u&&u!==null?se("Suspense Fallback"):se("Suspense");case 19:return se("SuspenseList");case 0:case 15:return ge(l.type,!1);case 11:return ge(l.type.render,!1);case 1:return ge(l.type,!0);case 31:return se("Activity");default:return""}}function vt(l){try{var u="",p=null;do u+=_e(l,p),p=l,l=l.return;while(l);return u}catch(v){return`
47
+ Error generating stack: `+v.message+`
48
+ `+v.stack}}var zt=Object.prototype.hasOwnProperty,ma=e.unstable_scheduleCallback,_t=e.unstable_cancelCallback,Wr=e.unstable_shouldYield,ir=e.unstable_requestPaint,qt=e.unstable_now,Xo=e.unstable_getCurrentPriorityLevel,Jc=e.unstable_ImmediatePriority,Es=e.unstable_UserBlockingPriority,kn=e.unstable_NormalPriority,ef=e.unstable_LowPriority,ks=e.unstable_IdlePriority,Nm=e.log,tf=e.unstable_setDisableYieldValue,wr=null,wt=null;function ui(l){if(typeof Nm=="function"&&tf(l),wt&&typeof wt.setStrictMode=="function")try{wt.setStrictMode(wr,l)}catch{}}var Dr=Math.clz32?Math.clz32:_F,bF=Math.log,xF=Math.LN2;function _F(l){return l>>>=0,l===0?32:31-(bF(l)/xF|0)|0}var rf=256,nf=262144,af=4194304;function Wi(l){var u=l&42;if(u!==0)return u;switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function of(l,u,p){var v=l.pendingLanes;if(v===0)return 0;var S=0,j=l.suspendedLanes,R=l.pingedLanes;l=l.warmLanes;var I=v&134217727;return I!==0?(v=I&~j,v!==0?S=Wi(v):(R&=I,R!==0?S=Wi(R):p||(p=I&~l,p!==0&&(S=Wi(p))))):(I=v&~j,I!==0?S=Wi(I):R!==0?S=Wi(R):p||(p=v&~l,p!==0&&(S=Wi(p)))),S===0?0:u!==0&&u!==S&&(u&j)===0&&(j=S&-S,p=u&-u,j>=p||j===32&&(p&4194048)!==0)?u:S}function js(l,u){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&u)===0}function wF(l,u){switch(l){case 1:case 2:case 4:case 8:case 64:return u+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ej(){var l=af;return af<<=1,(af&62914560)===0&&(af=4194304),l}function Mm(l){for(var u=[],p=0;31>p;p++)u.push(l);return u}function As(l,u){l.pendingLanes|=u,u!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function SF(l,u,p,v,S,j){var R=l.pendingLanes;l.pendingLanes=p,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=p,l.entangledLanes&=p,l.errorRecoveryDisabledLanes&=p,l.shellSuspendCounter=0;var I=l.entanglements,K=l.expirationTimes,oe=l.hiddenUpdates;for(p=R&~p;0<p;){var me=31-Dr(p),ye=1<<me;I[me]=0,K[me]=-1;var ue=oe[me];if(ue!==null)for(oe[me]=null,me=0;me<ue.length;me++){var pe=ue[me];pe!==null&&(pe.lane&=-536870913)}p&=~ye}v!==0&&tj(l,v,0),j!==0&&S===0&&l.tag!==0&&(l.suspendedLanes|=j&~(R&~u))}function tj(l,u,p){l.pendingLanes|=u,l.suspendedLanes&=~u;var v=31-Dr(u);l.entangledLanes|=u,l.entanglements[v]=l.entanglements[v]|1073741824|p&261930}function rj(l,u){var p=l.entangledLanes|=u;for(l=l.entanglements;p;){var v=31-Dr(p),S=1<<v;S&u|l[v]&u&&(l[v]|=u),p&=~S}}function nj(l,u){var p=u&-u;return p=(p&42)!==0?1:Rm(p),(p&(l.suspendedLanes|u))!==0?0:p}function Rm(l){switch(l){case 2:l=1;break;case 8:l=4;break;case 32:l=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:l=128;break;case 268435456:l=134217728;break;default:l=0}return l}function Pm(l){return l&=-l,2<l?8<l?(l&134217727)!==0?32:268435456:8:2}function aj(){var l=Z.p;return l!==0?l:(l=window.event,l===void 0?32:UO(l.type))}function ij(l,u){var p=Z.p;try{return Z.p=l,u()}finally{Z.p=p}}var ci=Math.random().toString(36).slice(2),Yt="__reactFiber$"+ci,Sr="__reactProps$"+ci,Wo="__reactContainer$"+ci,Dm="__reactEvents$"+ci,EF="__reactListeners$"+ci,kF="__reactHandles$"+ci,oj="__reactResources$"+ci,Cs="__reactMarker$"+ci;function Lm(l){delete l[Yt],delete l[Sr],delete l[Dm],delete l[EF],delete l[kF]}function Zo(l){var u=l[Yt];if(u)return u;for(var p=l.parentNode;p;){if(u=p[Wo]||p[Yt]){if(p=u.alternate,u.child!==null||p!==null&&p.child!==null)for(l=AO(l);l!==null;){if(p=l[Yt])return p;l=AO(l)}return u}l=p,p=l.parentNode}return null}function Qo(l){if(l=l[Yt]||l[Wo]){var u=l.tag;if(u===5||u===6||u===13||u===31||u===26||u===27||u===3)return l}return null}function Os(l){var u=l.tag;if(u===5||u===26||u===27||u===6)return l.stateNode;throw Error(a(33))}function Jo(l){var u=l[oj];return u||(u=l[oj]={hoistableStyles:new Map,hoistableScripts:new Map}),u}function Bt(l){l[Cs]=!0}var lj=new Set,sj={};function Zi(l,u){el(l,u),el(l+"Capture",u)}function el(l,u){for(sj[l]=u,l=0;l<u.length;l++)lj.add(u[l])}var jF=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),uj={},cj={};function AF(l){return zt.call(cj,l)?!0:zt.call(uj,l)?!1:jF.test(l)?cj[l]=!0:(uj[l]=!0,!1)}function lf(l,u,p){if(AF(u))if(p===null)l.removeAttribute(u);else{switch(typeof p){case"undefined":case"function":case"symbol":l.removeAttribute(u);return;case"boolean":var v=u.toLowerCase().slice(0,5);if(v!=="data-"&&v!=="aria-"){l.removeAttribute(u);return}}l.setAttribute(u,""+p)}}function sf(l,u,p){if(p===null)l.removeAttribute(u);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":l.removeAttribute(u);return}l.setAttribute(u,""+p)}}function va(l,u,p,v){if(v===null)l.removeAttribute(p);else{switch(typeof v){case"undefined":case"function":case"symbol":case"boolean":l.removeAttribute(p);return}l.setAttributeNS(u,p,""+v)}}function Zr(l){switch(typeof l){case"bigint":case"boolean":case"number":case"string":case"undefined":return l;case"object":return l;default:return""}}function fj(l){var u=l.type;return(l=l.nodeName)&&l.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function CF(l,u,p){var v=Object.getOwnPropertyDescriptor(l.constructor.prototype,u);if(!l.hasOwnProperty(u)&&typeof v<"u"&&typeof v.get=="function"&&typeof v.set=="function"){var S=v.get,j=v.set;return Object.defineProperty(l,u,{configurable:!0,get:function(){return S.call(this)},set:function(R){p=""+R,j.call(this,R)}}),Object.defineProperty(l,u,{enumerable:v.enumerable}),{getValue:function(){return p},setValue:function(R){p=""+R},stopTracking:function(){l._valueTracker=null,delete l[u]}}}}function Im(l){if(!l._valueTracker){var u=fj(l)?"checked":"value";l._valueTracker=CF(l,u,""+l[u])}}function dj(l){if(!l)return!1;var u=l._valueTracker;if(!u)return!0;var p=u.getValue(),v="";return l&&(v=fj(l)?l.checked?"true":"false":l.value),l=v,l!==p?(u.setValue(l),!0):!1}function uf(l){if(l=l||(typeof document<"u"?document:void 0),typeof l>"u")return null;try{return l.activeElement||l.body}catch{return l.body}}var OF=/[\n"\\]/g;function Qr(l){return l.replace(OF,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function zm(l,u,p,v,S,j,R,I){l.name="",R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?l.type=R:l.removeAttribute("type"),u!=null?R==="number"?(u===0&&l.value===""||l.value!=u)&&(l.value=""+Zr(u)):l.value!==""+Zr(u)&&(l.value=""+Zr(u)):R!=="submit"&&R!=="reset"||l.removeAttribute("value"),u!=null?qm(l,R,Zr(u)):p!=null?qm(l,R,Zr(p)):v!=null&&l.removeAttribute("value"),S==null&&j!=null&&(l.defaultChecked=!!j),S!=null&&(l.checked=S&&typeof S!="function"&&typeof S!="symbol"),I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"?l.name=""+Zr(I):l.removeAttribute("name")}function hj(l,u,p,v,S,j,R,I){if(j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"&&(l.type=j),u!=null||p!=null){if(!(j!=="submit"&&j!=="reset"||u!=null)){Im(l);return}p=p!=null?""+Zr(p):"",u=u!=null?""+Zr(u):p,I||u===l.value||(l.value=u),l.defaultValue=u}v=v??S,v=typeof v!="function"&&typeof v!="symbol"&&!!v,l.checked=I?l.checked:!!v,l.defaultChecked=!!v,R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(l.name=R),Im(l)}function qm(l,u,p){u==="number"&&uf(l.ownerDocument)===l||l.defaultValue===""+p||(l.defaultValue=""+p)}function tl(l,u,p,v){if(l=l.options,u){u={};for(var S=0;S<p.length;S++)u["$"+p[S]]=!0;for(p=0;p<l.length;p++)S=u.hasOwnProperty("$"+l[p].value),l[p].selected!==S&&(l[p].selected=S),S&&v&&(l[p].defaultSelected=!0)}else{for(p=""+Zr(p),u=null,S=0;S<l.length;S++){if(l[S].value===p){l[S].selected=!0,v&&(l[S].defaultSelected=!0);return}u!==null||l[S].disabled||(u=l[S])}u!==null&&(u.selected=!0)}}function pj(l,u,p){if(u!=null&&(u=""+Zr(u),u!==l.value&&(l.value=u),p==null)){l.defaultValue!==u&&(l.defaultValue=u);return}l.defaultValue=p!=null?""+Zr(p):""}function mj(l,u,p,v){if(u==null){if(v!=null){if(p!=null)throw Error(a(92));if(Y(v)){if(1<v.length)throw Error(a(93));v=v[0]}p=v}p==null&&(p=""),u=p}p=Zr(u),l.defaultValue=p,v=l.textContent,v===p&&v!==""&&v!==null&&(l.value=v),Im(l)}function rl(l,u){if(u){var p=l.firstChild;if(p&&p===l.lastChild&&p.nodeType===3){p.nodeValue=u;return}}l.textContent=u}var TF=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function vj(l,u,p){var v=u.indexOf("--")===0;p==null||typeof p=="boolean"||p===""?v?l.setProperty(u,""):u==="float"?l.cssFloat="":l[u]="":v?l.setProperty(u,p):typeof p!="number"||p===0||TF.has(u)?u==="float"?l.cssFloat=p:l[u]=(""+p).trim():l[u]=p+"px"}function gj(l,u,p){if(u!=null&&typeof u!="object")throw Error(a(62));if(l=l.style,p!=null){for(var v in p)!p.hasOwnProperty(v)||u!=null&&u.hasOwnProperty(v)||(v.indexOf("--")===0?l.setProperty(v,""):v==="float"?l.cssFloat="":l[v]="");for(var S in u)v=u[S],u.hasOwnProperty(S)&&p[S]!==v&&vj(l,S,v)}else for(var j in u)u.hasOwnProperty(j)&&vj(l,j,u[j])}function Bm(l){if(l.indexOf("-")===-1)return!1;switch(l){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var NF=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),MF=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function cf(l){return MF.test(""+l)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":l}function ga(){}var $m=null;function Fm(l){return l=l.target||l.srcElement||window,l.correspondingUseElement&&(l=l.correspondingUseElement),l.nodeType===3?l.parentNode:l}var nl=null,al=null;function yj(l){var u=Qo(l);if(u&&(l=u.stateNode)){var p=l[Sr]||null;e:switch(l=u.stateNode,u.type){case"input":if(zm(l,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name),u=p.name,p.type==="radio"&&u!=null){for(p=l;p.parentNode;)p=p.parentNode;for(p=p.querySelectorAll('input[name="'+Qr(""+u)+'"][type="radio"]'),u=0;u<p.length;u++){var v=p[u];if(v!==l&&v.form===l.form){var S=v[Sr]||null;if(!S)throw Error(a(90));zm(v,S.value,S.defaultValue,S.defaultValue,S.checked,S.defaultChecked,S.type,S.name)}}for(u=0;u<p.length;u++)v=p[u],v.form===l.form&&dj(v)}break e;case"textarea":pj(l,p.value,p.defaultValue);break e;case"select":u=p.value,u!=null&&tl(l,!!p.multiple,u,!1)}}}var Um=!1;function bj(l,u,p){if(Um)return l(u,p);Um=!0;try{var v=l(u);return v}finally{if(Um=!1,(nl!==null||al!==null)&&(Zf(),nl&&(u=nl,l=al,al=nl=null,yj(u),l)))for(u=0;u<l.length;u++)yj(l[u])}}function Ts(l,u){var p=l.stateNode;if(p===null)return null;var v=p[Sr]||null;if(v===null)return null;p=v[u];e:switch(u){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(v=!v.disabled)||(l=l.type,v=!(l==="button"||l==="input"||l==="select"||l==="textarea")),l=!v;break e;default:l=!1}if(l)return null;if(p&&typeof p!="function")throw Error(a(231,u,typeof p));return p}var ya=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hm=!1;if(ya)try{var Ns={};Object.defineProperty(Ns,"passive",{get:function(){Hm=!0}}),window.addEventListener("test",Ns,Ns),window.removeEventListener("test",Ns,Ns)}catch{Hm=!1}var fi=null,Gm=null,ff=null;function xj(){if(ff)return ff;var l,u=Gm,p=u.length,v,S="value"in fi?fi.value:fi.textContent,j=S.length;for(l=0;l<p&&u[l]===S[l];l++);var R=p-l;for(v=1;v<=R&&u[p-v]===S[j-v];v++);return ff=S.slice(l,1<v?1-v:void 0)}function df(l){var u=l.keyCode;return"charCode"in l?(l=l.charCode,l===0&&u===13&&(l=13)):l=u,l===10&&(l=13),32<=l||l===13?l:0}function hf(){return!0}function _j(){return!1}function Er(l){function u(p,v,S,j,R){this._reactName=p,this._targetInst=S,this.type=v,this.nativeEvent=j,this.target=R,this.currentTarget=null;for(var I in l)l.hasOwnProperty(I)&&(p=l[I],this[I]=p?p(j):j[I]);return this.isDefaultPrevented=(j.defaultPrevented!=null?j.defaultPrevented:j.returnValue===!1)?hf:_j,this.isPropagationStopped=_j,this}return m(u.prototype,{preventDefault:function(){this.defaultPrevented=!0;var p=this.nativeEvent;p&&(p.preventDefault?p.preventDefault():typeof p.returnValue!="unknown"&&(p.returnValue=!1),this.isDefaultPrevented=hf)},stopPropagation:function(){var p=this.nativeEvent;p&&(p.stopPropagation?p.stopPropagation():typeof p.cancelBubble!="unknown"&&(p.cancelBubble=!0),this.isPropagationStopped=hf)},persist:function(){},isPersistent:hf}),u}var Qi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(l){return l.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pf=Er(Qi),Ms=m({},Qi,{view:0,detail:0}),RF=Er(Ms),Vm,Km,Rs,mf=m({},Ms,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xm,button:0,buttons:0,relatedTarget:function(l){return l.relatedTarget===void 0?l.fromElement===l.srcElement?l.toElement:l.fromElement:l.relatedTarget},movementX:function(l){return"movementX"in l?l.movementX:(l!==Rs&&(Rs&&l.type==="mousemove"?(Vm=l.screenX-Rs.screenX,Km=l.screenY-Rs.screenY):Km=Vm=0,Rs=l),Vm)},movementY:function(l){return"movementY"in l?l.movementY:Km}}),wj=Er(mf),PF=m({},mf,{dataTransfer:0}),DF=Er(PF),LF=m({},Ms,{relatedTarget:0}),Ym=Er(LF),IF=m({},Qi,{animationName:0,elapsedTime:0,pseudoElement:0}),zF=Er(IF),qF=m({},Qi,{clipboardData:function(l){return"clipboardData"in l?l.clipboardData:window.clipboardData}}),BF=Er(qF),$F=m({},Qi,{data:0}),Sj=Er($F),FF={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},UF={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},HF={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function GF(l){var u=this.nativeEvent;return u.getModifierState?u.getModifierState(l):(l=HF[l])?!!u[l]:!1}function Xm(){return GF}var VF=m({},Ms,{key:function(l){if(l.key){var u=FF[l.key]||l.key;if(u!=="Unidentified")return u}return l.type==="keypress"?(l=df(l),l===13?"Enter":String.fromCharCode(l)):l.type==="keydown"||l.type==="keyup"?UF[l.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xm,charCode:function(l){return l.type==="keypress"?df(l):0},keyCode:function(l){return l.type==="keydown"||l.type==="keyup"?l.keyCode:0},which:function(l){return l.type==="keypress"?df(l):l.type==="keydown"||l.type==="keyup"?l.keyCode:0}}),KF=Er(VF),YF=m({},mf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ej=Er(YF),XF=m({},Ms,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xm}),WF=Er(XF),ZF=m({},Qi,{propertyName:0,elapsedTime:0,pseudoElement:0}),QF=Er(ZF),JF=m({},mf,{deltaX:function(l){return"deltaX"in l?l.deltaX:"wheelDeltaX"in l?-l.wheelDeltaX:0},deltaY:function(l){return"deltaY"in l?l.deltaY:"wheelDeltaY"in l?-l.wheelDeltaY:"wheelDelta"in l?-l.wheelDelta:0},deltaZ:0,deltaMode:0}),eU=Er(JF),tU=m({},Qi,{newState:0,oldState:0}),rU=Er(tU),nU=[9,13,27,32],Wm=ya&&"CompositionEvent"in window,Ps=null;ya&&"documentMode"in document&&(Ps=document.documentMode);var aU=ya&&"TextEvent"in window&&!Ps,kj=ya&&(!Wm||Ps&&8<Ps&&11>=Ps),jj=" ",Aj=!1;function Cj(l,u){switch(l){case"keyup":return nU.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Oj(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var il=!1;function iU(l,u){switch(l){case"compositionend":return Oj(u);case"keypress":return u.which!==32?null:(Aj=!0,jj);case"textInput":return l=u.data,l===jj&&Aj?null:l;default:return null}}function oU(l,u){if(il)return l==="compositionend"||!Wm&&Cj(l,u)?(l=xj(),ff=Gm=fi=null,il=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1<u.char.length)return u.char;if(u.which)return String.fromCharCode(u.which)}return null;case"compositionend":return kj&&u.locale!=="ko"?null:u.data;default:return null}}var lU={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Tj(l){var u=l&&l.nodeName&&l.nodeName.toLowerCase();return u==="input"?!!lU[l.type]:u==="textarea"}function Nj(l,u,p,v){nl?al?al.push(v):al=[v]:nl=v,u=ad(u,"onChange"),0<u.length&&(p=new pf("onChange","change",null,p,v),l.push({event:p,listeners:u}))}var Ds=null,Ls=null;function sU(l){hO(l,0)}function vf(l){var u=Os(l);if(dj(u))return l}function Mj(l,u){if(l==="change")return u}var Rj=!1;if(ya){var Zm;if(ya){var Qm="oninput"in document;if(!Qm){var Pj=document.createElement("div");Pj.setAttribute("oninput","return;"),Qm=typeof Pj.oninput=="function"}Zm=Qm}else Zm=!1;Rj=Zm&&(!document.documentMode||9<document.documentMode)}function Dj(){Ds&&(Ds.detachEvent("onpropertychange",Lj),Ls=Ds=null)}function Lj(l){if(l.propertyName==="value"&&vf(Ls)){var u=[];Nj(u,Ls,l,Fm(l)),bj(sU,u)}}function uU(l,u,p){l==="focusin"?(Dj(),Ds=u,Ls=p,Ds.attachEvent("onpropertychange",Lj)):l==="focusout"&&Dj()}function cU(l){if(l==="selectionchange"||l==="keyup"||l==="keydown")return vf(Ls)}function fU(l,u){if(l==="click")return vf(u)}function dU(l,u){if(l==="input"||l==="change")return vf(u)}function hU(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}var Lr=typeof Object.is=="function"?Object.is:hU;function Is(l,u){if(Lr(l,u))return!0;if(typeof l!="object"||l===null||typeof u!="object"||u===null)return!1;var p=Object.keys(l),v=Object.keys(u);if(p.length!==v.length)return!1;for(v=0;v<p.length;v++){var S=p[v];if(!zt.call(u,S)||!Lr(l[S],u[S]))return!1}return!0}function Ij(l){for(;l&&l.firstChild;)l=l.firstChild;return l}function zj(l,u){var p=Ij(l);l=0;for(var v;p;){if(p.nodeType===3){if(v=l+p.textContent.length,l<=u&&v>=u)return{node:p,offset:u-l};l=v}e:{for(;p;){if(p.nextSibling){p=p.nextSibling;break e}p=p.parentNode}p=void 0}p=Ij(p)}}function qj(l,u){return l&&u?l===u?!0:l&&l.nodeType===3?!1:u&&u.nodeType===3?qj(l,u.parentNode):"contains"in l?l.contains(u):l.compareDocumentPosition?!!(l.compareDocumentPosition(u)&16):!1:!1}function Bj(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var u=uf(l.document);u instanceof l.HTMLIFrameElement;){try{var p=typeof u.contentWindow.location.href=="string"}catch{p=!1}if(p)l=u.contentWindow;else break;u=uf(l.document)}return u}function Jm(l){var u=l&&l.nodeName&&l.nodeName.toLowerCase();return u&&(u==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||u==="textarea"||l.contentEditable==="true")}var pU=ya&&"documentMode"in document&&11>=document.documentMode,ol=null,ev=null,zs=null,tv=!1;function $j(l,u,p){var v=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;tv||ol==null||ol!==uf(v)||(v=ol,"selectionStart"in v&&Jm(v)?v={start:v.selectionStart,end:v.selectionEnd}:(v=(v.ownerDocument&&v.ownerDocument.defaultView||window).getSelection(),v={anchorNode:v.anchorNode,anchorOffset:v.anchorOffset,focusNode:v.focusNode,focusOffset:v.focusOffset}),zs&&Is(zs,v)||(zs=v,v=ad(ev,"onSelect"),0<v.length&&(u=new pf("onSelect","select",null,u,p),l.push({event:u,listeners:v}),u.target=ol)))}function Ji(l,u){var p={};return p[l.toLowerCase()]=u.toLowerCase(),p["Webkit"+l]="webkit"+u,p["Moz"+l]="moz"+u,p}var ll={animationend:Ji("Animation","AnimationEnd"),animationiteration:Ji("Animation","AnimationIteration"),animationstart:Ji("Animation","AnimationStart"),transitionrun:Ji("Transition","TransitionRun"),transitionstart:Ji("Transition","TransitionStart"),transitioncancel:Ji("Transition","TransitionCancel"),transitionend:Ji("Transition","TransitionEnd")},rv={},Fj={};ya&&(Fj=document.createElement("div").style,"AnimationEvent"in window||(delete ll.animationend.animation,delete ll.animationiteration.animation,delete ll.animationstart.animation),"TransitionEvent"in window||delete ll.transitionend.transition);function eo(l){if(rv[l])return rv[l];if(!ll[l])return l;var u=ll[l],p;for(p in u)if(u.hasOwnProperty(p)&&p in Fj)return rv[l]=u[p];return l}var Uj=eo("animationend"),Hj=eo("animationiteration"),Gj=eo("animationstart"),mU=eo("transitionrun"),vU=eo("transitionstart"),gU=eo("transitioncancel"),Vj=eo("transitionend"),Kj=new Map,nv="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");nv.push("scrollEnd");function jn(l,u){Kj.set(l,u),Zi(u,[l])}var gf=typeof reportError=="function"?reportError:function(l){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var u=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof l=="object"&&l!==null&&typeof l.message=="string"?String(l.message):String(l),error:l});if(!window.dispatchEvent(u))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",l);return}console.error(l)},Jr=[],sl=0,av=0;function yf(){for(var l=sl,u=av=sl=0;u<l;){var p=Jr[u];Jr[u++]=null;var v=Jr[u];Jr[u++]=null;var S=Jr[u];Jr[u++]=null;var j=Jr[u];if(Jr[u++]=null,v!==null&&S!==null){var R=v.pending;R===null?S.next=S:(S.next=R.next,R.next=S),v.pending=S}j!==0&&Yj(p,S,j)}}function bf(l,u,p,v){Jr[sl++]=l,Jr[sl++]=u,Jr[sl++]=p,Jr[sl++]=v,av|=v,l.lanes|=v,l=l.alternate,l!==null&&(l.lanes|=v)}function iv(l,u,p,v){return bf(l,u,p,v),xf(l)}function to(l,u){return bf(l,null,null,u),xf(l)}function Yj(l,u,p){l.lanes|=p;var v=l.alternate;v!==null&&(v.lanes|=p);for(var S=!1,j=l.return;j!==null;)j.childLanes|=p,v=j.alternate,v!==null&&(v.childLanes|=p),j.tag===22&&(l=j.stateNode,l===null||l._visibility&1||(S=!0)),l=j,j=j.return;return l.tag===3?(j=l.stateNode,S&&u!==null&&(S=31-Dr(p),l=j.hiddenUpdates,v=l[S],v===null?l[S]=[u]:v.push(u),u.lane=p|536870912),j):null}function xf(l){if(50<ou)throw ou=0,pg=null,Error(a(185));for(var u=l.return;u!==null;)l=u,u=l.return;return l.tag===3?l.stateNode:null}var ul={};function yU(l,u,p,v){this.tag=l,this.key=p,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=v,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ir(l,u,p,v){return new yU(l,u,p,v)}function ov(l){return l=l.prototype,!(!l||!l.isReactComponent)}function ba(l,u){var p=l.alternate;return p===null?(p=Ir(l.tag,u,l.key,l.mode),p.elementType=l.elementType,p.type=l.type,p.stateNode=l.stateNode,p.alternate=l,l.alternate=p):(p.pendingProps=u,p.type=l.type,p.flags=0,p.subtreeFlags=0,p.deletions=null),p.flags=l.flags&65011712,p.childLanes=l.childLanes,p.lanes=l.lanes,p.child=l.child,p.memoizedProps=l.memoizedProps,p.memoizedState=l.memoizedState,p.updateQueue=l.updateQueue,u=l.dependencies,p.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},p.sibling=l.sibling,p.index=l.index,p.ref=l.ref,p.refCleanup=l.refCleanup,p}function Xj(l,u){l.flags&=65011714;var p=l.alternate;return p===null?(l.childLanes=0,l.lanes=u,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=p.childLanes,l.lanes=p.lanes,l.child=p.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=p.memoizedProps,l.memoizedState=p.memoizedState,l.updateQueue=p.updateQueue,l.type=p.type,u=p.dependencies,l.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),l}function _f(l,u,p,v,S,j){var R=0;if(v=l,typeof l=="function")ov(l)&&(R=1);else if(typeof l=="string")R=SH(l,p,G.current)?26:l==="html"||l==="head"||l==="body"?27:5;else e:switch(l){case L:return l=Ir(31,p,u,S),l.elementType=L,l.lanes=j,l;case E:return ro(p.children,S,j,u);case _:R=8,S|=24;break;case w:return l=Ir(12,p,u,S|2),l.elementType=w,l.lanes=j,l;case T:return l=Ir(13,p,u,S),l.elementType=T,l.lanes=j,l;case N:return l=Ir(19,p,u,S),l.elementType=N,l.lanes=j,l;default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case C:R=10;break e;case A:R=9;break e;case O:R=11;break e;case M:R=14;break e;case P:R=16,v=null;break e}R=29,p=Error(a(130,l===null?"null":typeof l,"")),v=null}return u=Ir(R,p,u,S),u.elementType=l,u.type=v,u.lanes=j,u}function ro(l,u,p,v){return l=Ir(7,l,v,u),l.lanes=p,l}function lv(l,u,p){return l=Ir(6,l,null,u),l.lanes=p,l}function Wj(l){var u=Ir(18,null,null,0);return u.stateNode=l,u}function sv(l,u,p){return u=Ir(4,l.children!==null?l.children:[],l.key,u),u.lanes=p,u.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},u}var Zj=new WeakMap;function en(l,u){if(typeof l=="object"&&l!==null){var p=Zj.get(l);return p!==void 0?p:(u={value:l,source:u,stack:vt(u)},Zj.set(l,u),u)}return{value:l,source:u,stack:vt(u)}}var cl=[],fl=0,wf=null,qs=0,tn=[],rn=0,di=null,$n=1,Fn="";function xa(l,u){cl[fl++]=qs,cl[fl++]=wf,wf=l,qs=u}function Qj(l,u,p){tn[rn++]=$n,tn[rn++]=Fn,tn[rn++]=di,di=l;var v=$n;l=Fn;var S=32-Dr(v)-1;v&=~(1<<S),p+=1;var j=32-Dr(u)+S;if(30<j){var R=S-S%5;j=(v&(1<<R)-1).toString(32),v>>=R,S-=R,$n=1<<32-Dr(u)+S|p<<S|v,Fn=j+l}else $n=1<<j|p<<S|v,Fn=l}function uv(l){l.return!==null&&(xa(l,1),Qj(l,1,0))}function cv(l){for(;l===wf;)wf=cl[--fl],cl[fl]=null,qs=cl[--fl],cl[fl]=null;for(;l===di;)di=tn[--rn],tn[rn]=null,Fn=tn[--rn],tn[rn]=null,$n=tn[--rn],tn[rn]=null}function Jj(l,u){tn[rn++]=$n,tn[rn++]=Fn,tn[rn++]=di,$n=u.id,Fn=u.overflow,di=l}var Xt=null,at=null,Be=!1,hi=null,nn=!1,fv=Error(a(519));function pi(l){var u=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Bs(en(u,l)),fv}function eA(l){var u=l.stateNode,p=l.type,v=l.memoizedProps;switch(u[Yt]=l,u[Sr]=v,p){case"dialog":Ie("cancel",u),Ie("close",u);break;case"iframe":case"object":case"embed":Ie("load",u);break;case"video":case"audio":for(p=0;p<su.length;p++)Ie(su[p],u);break;case"source":Ie("error",u);break;case"img":case"image":case"link":Ie("error",u),Ie("load",u);break;case"details":Ie("toggle",u);break;case"input":Ie("invalid",u),hj(u,v.value,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name,!0);break;case"select":Ie("invalid",u);break;case"textarea":Ie("invalid",u),mj(u,v.value,v.defaultValue,v.children)}p=v.children,typeof p!="string"&&typeof p!="number"&&typeof p!="bigint"||u.textContent===""+p||v.suppressHydrationWarning===!0||gO(u.textContent,p)?(v.popover!=null&&(Ie("beforetoggle",u),Ie("toggle",u)),v.onScroll!=null&&Ie("scroll",u),v.onScrollEnd!=null&&Ie("scrollend",u),v.onClick!=null&&(u.onclick=ga),u=!0):u=!1,u||pi(l,!0)}function tA(l){for(Xt=l.return;Xt;)switch(Xt.tag){case 5:case 31:case 13:nn=!1;return;case 27:case 3:nn=!0;return;default:Xt=Xt.return}}function dl(l){if(l!==Xt)return!1;if(!Be)return tA(l),Be=!0,!1;var u=l.tag,p;if((p=u!==3&&u!==27)&&((p=u===5)&&(p=l.type,p=!(p!=="form"&&p!=="button")||Og(l.type,l.memoizedProps)),p=!p),p&&at&&pi(l),tA(l),u===13){if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(a(317));at=jO(l)}else if(u===31){if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(a(317));at=jO(l)}else u===27?(u=at,Ci(l.type)?(l=Pg,Pg=null,at=l):at=u):at=Xt?on(l.stateNode.nextSibling):null;return!0}function no(){at=Xt=null,Be=!1}function dv(){var l=hi;return l!==null&&(Cr===null?Cr=l:Cr.push.apply(Cr,l),hi=null),l}function Bs(l){hi===null?hi=[l]:hi.push(l)}var hv=F(null),ao=null,_a=null;function mi(l,u,p){ce(hv,u._currentValue),u._currentValue=p}function wa(l){l._currentValue=hv.current,X(hv)}function pv(l,u,p){for(;l!==null;){var v=l.alternate;if((l.childLanes&u)!==u?(l.childLanes|=u,v!==null&&(v.childLanes|=u)):v!==null&&(v.childLanes&u)!==u&&(v.childLanes|=u),l===p)break;l=l.return}}function mv(l,u,p,v){var S=l.child;for(S!==null&&(S.return=l);S!==null;){var j=S.dependencies;if(j!==null){var R=S.child;j=j.firstContext;e:for(;j!==null;){var I=j;j=S;for(var K=0;K<u.length;K++)if(I.context===u[K]){j.lanes|=p,I=j.alternate,I!==null&&(I.lanes|=p),pv(j.return,p,l),v||(R=null);break e}j=I.next}}else if(S.tag===18){if(R=S.return,R===null)throw Error(a(341));R.lanes|=p,j=R.alternate,j!==null&&(j.lanes|=p),pv(R,p,l),R=null}else R=S.child;if(R!==null)R.return=S;else for(R=S;R!==null;){if(R===l){R=null;break}if(S=R.sibling,S!==null){S.return=R.return,R=S;break}R=R.return}S=R}}function hl(l,u,p,v){l=null;for(var S=u,j=!1;S!==null;){if(!j){if((S.flags&524288)!==0)j=!0;else if((S.flags&262144)!==0)break}if(S.tag===10){var R=S.alternate;if(R===null)throw Error(a(387));if(R=R.memoizedProps,R!==null){var I=S.type;Lr(S.pendingProps.value,R.value)||(l!==null?l.push(I):l=[I])}}else if(S===W.current){if(R=S.alternate,R===null)throw Error(a(387));R.memoizedState.memoizedState!==S.memoizedState.memoizedState&&(l!==null?l.push(hu):l=[hu])}S=S.return}l!==null&&mv(u,l,p,v),u.flags|=262144}function Sf(l){for(l=l.firstContext;l!==null;){if(!Lr(l.context._currentValue,l.memoizedValue))return!0;l=l.next}return!1}function io(l){ao=l,_a=null,l=l.dependencies,l!==null&&(l.firstContext=null)}function Wt(l){return rA(ao,l)}function Ef(l,u){return ao===null&&io(l),rA(l,u)}function rA(l,u){var p=u._currentValue;if(u={context:u,memoizedValue:p,next:null},_a===null){if(l===null)throw Error(a(308));_a=u,l.dependencies={lanes:0,firstContext:u},l.flags|=524288}else _a=_a.next=u;return p}var bU=typeof AbortController<"u"?AbortController:function(){var l=[],u=this.signal={aborted:!1,addEventListener:function(p,v){l.push(v)}};this.abort=function(){u.aborted=!0,l.forEach(function(p){return p()})}},xU=e.unstable_scheduleCallback,_U=e.unstable_NormalPriority,jt={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function vv(){return{controller:new bU,data:new Map,refCount:0}}function $s(l){l.refCount--,l.refCount===0&&xU(_U,function(){l.controller.abort()})}var Fs=null,gv=0,pl=0,ml=null;function wU(l,u){if(Fs===null){var p=Fs=[];gv=0,pl=xg(),ml={status:"pending",value:void 0,then:function(v){p.push(v)}}}return gv++,u.then(nA,nA),u}function nA(){if(--gv===0&&Fs!==null){ml!==null&&(ml.status="fulfilled");var l=Fs;Fs=null,pl=0,ml=null;for(var u=0;u<l.length;u++)(0,l[u])()}}function SU(l,u){var p=[],v={status:"pending",value:null,reason:null,then:function(S){p.push(S)}};return l.then(function(){v.status="fulfilled",v.value=u;for(var S=0;S<p.length;S++)(0,p[S])(u)},function(S){for(v.status="rejected",v.reason=S,S=0;S<p.length;S++)(0,p[S])(void 0)}),v}var aA=B.S;B.S=function(l,u){$C=qt(),typeof u=="object"&&u!==null&&typeof u.then=="function"&&wU(l,u),aA!==null&&aA(l,u)};var oo=F(null);function yv(){var l=oo.current;return l!==null?l:et.pooledCache}function kf(l,u){u===null?ce(oo,oo.current):ce(oo,u.pool)}function iA(){var l=yv();return l===null?null:{parent:jt._currentValue,pool:l}}var vl=Error(a(460)),bv=Error(a(474)),jf=Error(a(542)),Af={then:function(){}};function oA(l){return l=l.status,l==="fulfilled"||l==="rejected"}function lA(l,u,p){switch(p=l[p],p===void 0?l.push(u):p!==u&&(u.then(ga,ga),u=p),u.status){case"fulfilled":return u.value;case"rejected":throw l=u.reason,uA(l),l;default:if(typeof u.status=="string")u.then(ga,ga);else{if(l=et,l!==null&&100<l.shellSuspendCounter)throw Error(a(482));l=u,l.status="pending",l.then(function(v){if(u.status==="pending"){var S=u;S.status="fulfilled",S.value=v}},function(v){if(u.status==="pending"){var S=u;S.status="rejected",S.reason=v}})}switch(u.status){case"fulfilled":return u.value;case"rejected":throw l=u.reason,uA(l),l}throw so=u,vl}}function lo(l){try{var u=l._init;return u(l._payload)}catch(p){throw p!==null&&typeof p=="object"&&typeof p.then=="function"?(so=p,vl):p}}var so=null;function sA(){if(so===null)throw Error(a(459));var l=so;return so=null,l}function uA(l){if(l===vl||l===jf)throw Error(a(483))}var gl=null,Us=0;function Cf(l){var u=Us;return Us+=1,gl===null&&(gl=[]),lA(gl,l,u)}function Hs(l,u){u=u.props.ref,l.ref=u!==void 0?u:null}function Of(l,u){throw u.$$typeof===g?Error(a(525)):(l=Object.prototype.toString.call(u),Error(a(31,l==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":l)))}function cA(l){function u(re,Q){if(l){var ie=re.deletions;ie===null?(re.deletions=[Q],re.flags|=16):ie.push(Q)}}function p(re,Q){if(!l)return null;for(;Q!==null;)u(re,Q),Q=Q.sibling;return null}function v(re){for(var Q=new Map;re!==null;)re.key!==null?Q.set(re.key,re):Q.set(re.index,re),re=re.sibling;return Q}function S(re,Q){return re=ba(re,Q),re.index=0,re.sibling=null,re}function j(re,Q,ie){return re.index=ie,l?(ie=re.alternate,ie!==null?(ie=ie.index,ie<Q?(re.flags|=67108866,Q):ie):(re.flags|=67108866,Q)):(re.flags|=1048576,Q)}function R(re){return l&&re.alternate===null&&(re.flags|=67108866),re}function I(re,Q,ie,ve){return Q===null||Q.tag!==6?(Q=lv(ie,re.mode,ve),Q.return=re,Q):(Q=S(Q,ie),Q.return=re,Q)}function K(re,Q,ie,ve){var Te=ie.type;return Te===E?me(re,Q,ie.props.children,ve,ie.key):Q!==null&&(Q.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===P&&lo(Te)===Q.type)?(Q=S(Q,ie.props),Hs(Q,ie),Q.return=re,Q):(Q=_f(ie.type,ie.key,ie.props,null,re.mode,ve),Hs(Q,ie),Q.return=re,Q)}function oe(re,Q,ie,ve){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==ie.containerInfo||Q.stateNode.implementation!==ie.implementation?(Q=sv(ie,re.mode,ve),Q.return=re,Q):(Q=S(Q,ie.children||[]),Q.return=re,Q)}function me(re,Q,ie,ve,Te){return Q===null||Q.tag!==7?(Q=ro(ie,re.mode,ve,Te),Q.return=re,Q):(Q=S(Q,ie),Q.return=re,Q)}function ye(re,Q,ie){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Q=lv(""+Q,re.mode,ie),Q.return=re,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case y:return ie=_f(Q.type,Q.key,Q.props,null,re.mode,ie),Hs(ie,Q),ie.return=re,ie;case x:return Q=sv(Q,re.mode,ie),Q.return=re,Q;case P:return Q=lo(Q),ye(re,Q,ie)}if(Y(Q)||z(Q))return Q=ro(Q,re.mode,ie,null),Q.return=re,Q;if(typeof Q.then=="function")return ye(re,Cf(Q),ie);if(Q.$$typeof===C)return ye(re,Ef(re,Q),ie);Of(re,Q)}return null}function ue(re,Q,ie,ve){var Te=Q!==null?Q.key:null;if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return Te!==null?null:I(re,Q,""+ie,ve);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case y:return ie.key===Te?K(re,Q,ie,ve):null;case x:return ie.key===Te?oe(re,Q,ie,ve):null;case P:return ie=lo(ie),ue(re,Q,ie,ve)}if(Y(ie)||z(ie))return Te!==null?null:me(re,Q,ie,ve,null);if(typeof ie.then=="function")return ue(re,Q,Cf(ie),ve);if(ie.$$typeof===C)return ue(re,Q,Ef(re,ie),ve);Of(re,ie)}return null}function pe(re,Q,ie,ve,Te){if(typeof ve=="string"&&ve!==""||typeof ve=="number"||typeof ve=="bigint")return re=re.get(ie)||null,I(Q,re,""+ve,Te);if(typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case y:return re=re.get(ve.key===null?ie:ve.key)||null,K(Q,re,ve,Te);case x:return re=re.get(ve.key===null?ie:ve.key)||null,oe(Q,re,ve,Te);case P:return ve=lo(ve),pe(re,Q,ie,ve,Te)}if(Y(ve)||z(ve))return re=re.get(ie)||null,me(Q,re,ve,Te,null);if(typeof ve.then=="function")return pe(re,Q,ie,Cf(ve),Te);if(ve.$$typeof===C)return pe(re,Q,ie,Ef(Q,ve),Te);Of(Q,ve)}return null}function ke(re,Q,ie,ve){for(var Te=null,Fe=null,je=Q,Pe=Q=0,qe=null;je!==null&&Pe<ie.length;Pe++){je.index>Pe?(qe=je,je=null):qe=je.sibling;var Ue=ue(re,je,ie[Pe],ve);if(Ue===null){je===null&&(je=qe);break}l&&je&&Ue.alternate===null&&u(re,je),Q=j(Ue,Q,Pe),Fe===null?Te=Ue:Fe.sibling=Ue,Fe=Ue,je=qe}if(Pe===ie.length)return p(re,je),Be&&xa(re,Pe),Te;if(je===null){for(;Pe<ie.length;Pe++)je=ye(re,ie[Pe],ve),je!==null&&(Q=j(je,Q,Pe),Fe===null?Te=je:Fe.sibling=je,Fe=je);return Be&&xa(re,Pe),Te}for(je=v(je);Pe<ie.length;Pe++)qe=pe(je,re,Pe,ie[Pe],ve),qe!==null&&(l&&qe.alternate!==null&&je.delete(qe.key===null?Pe:qe.key),Q=j(qe,Q,Pe),Fe===null?Te=qe:Fe.sibling=qe,Fe=qe);return l&&je.forEach(function(Ri){return u(re,Ri)}),Be&&xa(re,Pe),Te}function Ne(re,Q,ie,ve){if(ie==null)throw Error(a(151));for(var Te=null,Fe=null,je=Q,Pe=Q=0,qe=null,Ue=ie.next();je!==null&&!Ue.done;Pe++,Ue=ie.next()){je.index>Pe?(qe=je,je=null):qe=je.sibling;var Ri=ue(re,je,Ue.value,ve);if(Ri===null){je===null&&(je=qe);break}l&&je&&Ri.alternate===null&&u(re,je),Q=j(Ri,Q,Pe),Fe===null?Te=Ri:Fe.sibling=Ri,Fe=Ri,je=qe}if(Ue.done)return p(re,je),Be&&xa(re,Pe),Te;if(je===null){for(;!Ue.done;Pe++,Ue=ie.next())Ue=ye(re,Ue.value,ve),Ue!==null&&(Q=j(Ue,Q,Pe),Fe===null?Te=Ue:Fe.sibling=Ue,Fe=Ue);return Be&&xa(re,Pe),Te}for(je=v(je);!Ue.done;Pe++,Ue=ie.next())Ue=pe(je,re,Pe,Ue.value,ve),Ue!==null&&(l&&Ue.alternate!==null&&je.delete(Ue.key===null?Pe:Ue.key),Q=j(Ue,Q,Pe),Fe===null?Te=Ue:Fe.sibling=Ue,Fe=Ue);return l&&je.forEach(function(PH){return u(re,PH)}),Be&&xa(re,Pe),Te}function Ze(re,Q,ie,ve){if(typeof ie=="object"&&ie!==null&&ie.type===E&&ie.key===null&&(ie=ie.props.children),typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case y:e:{for(var Te=ie.key;Q!==null;){if(Q.key===Te){if(Te=ie.type,Te===E){if(Q.tag===7){p(re,Q.sibling),ve=S(Q,ie.props.children),ve.return=re,re=ve;break e}}else if(Q.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===P&&lo(Te)===Q.type){p(re,Q.sibling),ve=S(Q,ie.props),Hs(ve,ie),ve.return=re,re=ve;break e}p(re,Q);break}else u(re,Q);Q=Q.sibling}ie.type===E?(ve=ro(ie.props.children,re.mode,ve,ie.key),ve.return=re,re=ve):(ve=_f(ie.type,ie.key,ie.props,null,re.mode,ve),Hs(ve,ie),ve.return=re,re=ve)}return R(re);case x:e:{for(Te=ie.key;Q!==null;){if(Q.key===Te)if(Q.tag===4&&Q.stateNode.containerInfo===ie.containerInfo&&Q.stateNode.implementation===ie.implementation){p(re,Q.sibling),ve=S(Q,ie.children||[]),ve.return=re,re=ve;break e}else{p(re,Q);break}else u(re,Q);Q=Q.sibling}ve=sv(ie,re.mode,ve),ve.return=re,re=ve}return R(re);case P:return ie=lo(ie),Ze(re,Q,ie,ve)}if(Y(ie))return ke(re,Q,ie,ve);if(z(ie)){if(Te=z(ie),typeof Te!="function")throw Error(a(150));return ie=Te.call(ie),Ne(re,Q,ie,ve)}if(typeof ie.then=="function")return Ze(re,Q,Cf(ie),ve);if(ie.$$typeof===C)return Ze(re,Q,Ef(re,ie),ve);Of(re,ie)}return typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint"?(ie=""+ie,Q!==null&&Q.tag===6?(p(re,Q.sibling),ve=S(Q,ie),ve.return=re,re=ve):(p(re,Q),ve=lv(ie,re.mode,ve),ve.return=re,re=ve),R(re)):p(re,Q)}return function(re,Q,ie,ve){try{Us=0;var Te=Ze(re,Q,ie,ve);return gl=null,Te}catch(je){if(je===vl||je===jf)throw je;var Fe=Ir(29,je,null,re.mode);return Fe.lanes=ve,Fe.return=re,Fe}finally{}}}var uo=cA(!0),fA=cA(!1),vi=!1;function xv(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function _v(l,u){l=l.updateQueue,u.updateQueue===l&&(u.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function gi(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function yi(l,u,p){var v=l.updateQueue;if(v===null)return null;if(v=v.shared,(Ge&2)!==0){var S=v.pending;return S===null?u.next=u:(u.next=S.next,S.next=u),v.pending=u,u=xf(l),Yj(l,null,p),u}return bf(l,v,u,p),xf(l)}function Gs(l,u,p){if(u=u.updateQueue,u!==null&&(u=u.shared,(p&4194048)!==0)){var v=u.lanes;v&=l.pendingLanes,p|=v,u.lanes=p,rj(l,p)}}function wv(l,u){var p=l.updateQueue,v=l.alternate;if(v!==null&&(v=v.updateQueue,p===v)){var S=null,j=null;if(p=p.firstBaseUpdate,p!==null){do{var R={lane:p.lane,tag:p.tag,payload:p.payload,callback:null,next:null};j===null?S=j=R:j=j.next=R,p=p.next}while(p!==null);j===null?S=j=u:j=j.next=u}else S=j=u;p={baseState:v.baseState,firstBaseUpdate:S,lastBaseUpdate:j,shared:v.shared,callbacks:v.callbacks},l.updateQueue=p;return}l=p.lastBaseUpdate,l===null?p.firstBaseUpdate=u:l.next=u,p.lastBaseUpdate=u}var Sv=!1;function Vs(){if(Sv){var l=ml;if(l!==null)throw l}}function Ks(l,u,p,v){Sv=!1;var S=l.updateQueue;vi=!1;var j=S.firstBaseUpdate,R=S.lastBaseUpdate,I=S.shared.pending;if(I!==null){S.shared.pending=null;var K=I,oe=K.next;K.next=null,R===null?j=oe:R.next=oe,R=K;var me=l.alternate;me!==null&&(me=me.updateQueue,I=me.lastBaseUpdate,I!==R&&(I===null?me.firstBaseUpdate=oe:I.next=oe,me.lastBaseUpdate=K))}if(j!==null){var ye=S.baseState;R=0,me=oe=K=null,I=j;do{var ue=I.lane&-536870913,pe=ue!==I.lane;if(pe?(ze&ue)===ue:(v&ue)===ue){ue!==0&&ue===pl&&(Sv=!0),me!==null&&(me=me.next={lane:0,tag:I.tag,payload:I.payload,callback:null,next:null});e:{var ke=l,Ne=I;ue=u;var Ze=p;switch(Ne.tag){case 1:if(ke=Ne.payload,typeof ke=="function"){ye=ke.call(Ze,ye,ue);break e}ye=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=Ne.payload,ue=typeof ke=="function"?ke.call(Ze,ye,ue):ke,ue==null)break e;ye=m({},ye,ue);break e;case 2:vi=!0}}ue=I.callback,ue!==null&&(l.flags|=64,pe&&(l.flags|=8192),pe=S.callbacks,pe===null?S.callbacks=[ue]:pe.push(ue))}else pe={lane:ue,tag:I.tag,payload:I.payload,callback:I.callback,next:null},me===null?(oe=me=pe,K=ye):me=me.next=pe,R|=ue;if(I=I.next,I===null){if(I=S.shared.pending,I===null)break;pe=I,I=pe.next,pe.next=null,S.lastBaseUpdate=pe,S.shared.pending=null}}while(!0);me===null&&(K=ye),S.baseState=K,S.firstBaseUpdate=oe,S.lastBaseUpdate=me,j===null&&(S.shared.lanes=0),Si|=R,l.lanes=R,l.memoizedState=ye}}function dA(l,u){if(typeof l!="function")throw Error(a(191,l));l.call(u)}function hA(l,u){var p=l.callbacks;if(p!==null)for(l.callbacks=null,l=0;l<p.length;l++)dA(p[l],u)}var yl=F(null),Tf=F(0);function pA(l,u){l=Na,ce(Tf,l),ce(yl,u),Na=l|u.baseLanes}function Ev(){ce(Tf,Na),ce(yl,yl.current)}function kv(){Na=Tf.current,X(yl),X(Tf)}var zr=F(null),an=null;function bi(l){var u=l.alternate;ce(St,St.current&1),ce(zr,l),an===null&&(u===null||yl.current!==null||u.memoizedState!==null)&&(an=l)}function jv(l){ce(St,St.current),ce(zr,l),an===null&&(an=l)}function mA(l){l.tag===22?(ce(St,St.current),ce(zr,l),an===null&&(an=l)):xi()}function xi(){ce(St,St.current),ce(zr,zr.current)}function qr(l){X(zr),an===l&&(an=null),X(St)}var St=F(0);function Nf(l){for(var u=l;u!==null;){if(u.tag===13){var p=u.memoizedState;if(p!==null&&(p=p.dehydrated,p===null||Mg(p)||Rg(p)))return u}else if(u.tag===19&&(u.memoizedProps.revealOrder==="forwards"||u.memoizedProps.revealOrder==="backwards"||u.memoizedProps.revealOrder==="unstable_legacy-backwards"||u.memoizedProps.revealOrder==="together")){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===l)break;for(;u.sibling===null;){if(u.return===null||u.return===l)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var Sa=0,Re=null,Xe=null,At=null,Mf=!1,bl=!1,co=!1,Rf=0,Ys=0,xl=null,EU=0;function gt(){throw Error(a(321))}function Av(l,u){if(u===null)return!1;for(var p=0;p<u.length&&p<l.length;p++)if(!Lr(l[p],u[p]))return!1;return!0}function Cv(l,u,p,v,S,j){return Sa=j,Re=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,B.H=l===null||l.memoizedState===null?QA:Uv,co=!1,j=p(v,S),co=!1,bl&&(j=gA(u,p,v,S)),vA(l),j}function vA(l){B.H=Zs;var u=Xe!==null&&Xe.next!==null;if(Sa=0,At=Xe=Re=null,Mf=!1,Ys=0,xl=null,u)throw Error(a(300));l===null||Ct||(l=l.dependencies,l!==null&&Sf(l)&&(Ct=!0))}function gA(l,u,p,v){Re=l;var S=0;do{if(bl&&(xl=null),Ys=0,bl=!1,25<=S)throw Error(a(301));if(S+=1,At=Xe=null,l.updateQueue!=null){var j=l.updateQueue;j.lastEffect=null,j.events=null,j.stores=null,j.memoCache!=null&&(j.memoCache.index=0)}B.H=JA,j=u(p,v)}while(bl);return j}function kU(){var l=B.H,u=l.useState()[0];return u=typeof u.then=="function"?Xs(u):u,l=l.useState()[0],(Xe!==null?Xe.memoizedState:null)!==l&&(Re.flags|=1024),u}function Ov(){var l=Rf!==0;return Rf=0,l}function Tv(l,u,p){u.updateQueue=l.updateQueue,u.flags&=-2053,l.lanes&=~p}function Nv(l){if(Mf){for(l=l.memoizedState;l!==null;){var u=l.queue;u!==null&&(u.pending=null),l=l.next}Mf=!1}Sa=0,At=Xe=Re=null,bl=!1,Ys=Rf=0,xl=null}function hr(){var l={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return At===null?Re.memoizedState=At=l:At=At.next=l,At}function Et(){if(Xe===null){var l=Re.alternate;l=l!==null?l.memoizedState:null}else l=Xe.next;var u=At===null?Re.memoizedState:At.next;if(u!==null)At=u,Xe=l;else{if(l===null)throw Re.alternate===null?Error(a(467)):Error(a(310));Xe=l,l={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},At===null?Re.memoizedState=At=l:At=At.next=l}return At}function Pf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Xs(l){var u=Ys;return Ys+=1,xl===null&&(xl=[]),l=lA(xl,l,u),u=Re,(At===null?u.memoizedState:At.next)===null&&(u=u.alternate,B.H=u===null||u.memoizedState===null?QA:Uv),l}function Df(l){if(l!==null&&typeof l=="object"){if(typeof l.then=="function")return Xs(l);if(l.$$typeof===C)return Wt(l)}throw Error(a(438,String(l)))}function Mv(l){var u=null,p=Re.updateQueue;if(p!==null&&(u=p.memoCache),u==null){var v=Re.alternate;v!==null&&(v=v.updateQueue,v!==null&&(v=v.memoCache,v!=null&&(u={data:v.data.map(function(S){return S.slice()}),index:0})))}if(u==null&&(u={data:[],index:0}),p===null&&(p=Pf(),Re.updateQueue=p),p.memoCache=u,p=u.data[u.index],p===void 0)for(p=u.data[u.index]=Array(l),v=0;v<l;v++)p[v]=D;return u.index++,p}function Ea(l,u){return typeof u=="function"?u(l):u}function Lf(l){var u=Et();return Rv(u,Xe,l)}function Rv(l,u,p){var v=l.queue;if(v===null)throw Error(a(311));v.lastRenderedReducer=p;var S=l.baseQueue,j=v.pending;if(j!==null){if(S!==null){var R=S.next;S.next=j.next,j.next=R}u.baseQueue=S=j,v.pending=null}if(j=l.baseState,S===null)l.memoizedState=j;else{u=S.next;var I=R=null,K=null,oe=u,me=!1;do{var ye=oe.lane&-536870913;if(ye!==oe.lane?(ze&ye)===ye:(Sa&ye)===ye){var ue=oe.revertLane;if(ue===0)K!==null&&(K=K.next={lane:0,revertLane:0,gesture:null,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null}),ye===pl&&(me=!0);else if((Sa&ue)===ue){oe=oe.next,ue===pl&&(me=!0);continue}else ye={lane:0,revertLane:oe.revertLane,gesture:null,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null},K===null?(I=K=ye,R=j):K=K.next=ye,Re.lanes|=ue,Si|=ue;ye=oe.action,co&&p(j,ye),j=oe.hasEagerState?oe.eagerState:p(j,ye)}else ue={lane:ye,revertLane:oe.revertLane,gesture:oe.gesture,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null},K===null?(I=K=ue,R=j):K=K.next=ue,Re.lanes|=ye,Si|=ye;oe=oe.next}while(oe!==null&&oe!==u);if(K===null?R=j:K.next=I,!Lr(j,l.memoizedState)&&(Ct=!0,me&&(p=ml,p!==null)))throw p;l.memoizedState=j,l.baseState=R,l.baseQueue=K,v.lastRenderedState=j}return S===null&&(v.lanes=0),[l.memoizedState,v.dispatch]}function Pv(l){var u=Et(),p=u.queue;if(p===null)throw Error(a(311));p.lastRenderedReducer=l;var v=p.dispatch,S=p.pending,j=u.memoizedState;if(S!==null){p.pending=null;var R=S=S.next;do j=l(j,R.action),R=R.next;while(R!==S);Lr(j,u.memoizedState)||(Ct=!0),u.memoizedState=j,u.baseQueue===null&&(u.baseState=j),p.lastRenderedState=j}return[j,v]}function yA(l,u,p){var v=Re,S=Et(),j=Be;if(j){if(p===void 0)throw Error(a(407));p=p()}else p=u();var R=!Lr((Xe||S).memoizedState,p);if(R&&(S.memoizedState=p,Ct=!0),S=S.queue,Iv(_A.bind(null,v,S,l),[l]),S.getSnapshot!==u||R||At!==null&&At.memoizedState.tag&1){if(v.flags|=2048,_l(9,{destroy:void 0},xA.bind(null,v,S,p,u),null),et===null)throw Error(a(349));j||(Sa&127)!==0||bA(v,u,p)}return p}function bA(l,u,p){l.flags|=16384,l={getSnapshot:u,value:p},u=Re.updateQueue,u===null?(u=Pf(),Re.updateQueue=u,u.stores=[l]):(p=u.stores,p===null?u.stores=[l]:p.push(l))}function xA(l,u,p,v){u.value=p,u.getSnapshot=v,wA(u)&&SA(l)}function _A(l,u,p){return p(function(){wA(u)&&SA(l)})}function wA(l){var u=l.getSnapshot;l=l.value;try{var p=u();return!Lr(l,p)}catch{return!0}}function SA(l){var u=to(l,2);u!==null&&Or(u,l,2)}function Dv(l){var u=hr();if(typeof l=="function"){var p=l;if(l=p(),co){ui(!0);try{p()}finally{ui(!1)}}}return u.memoizedState=u.baseState=l,u.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ea,lastRenderedState:l},u}function EA(l,u,p,v){return l.baseState=p,Rv(l,Xe,typeof v=="function"?v:Ea)}function jU(l,u,p,v,S){if(qf(l))throw Error(a(485));if(l=u.action,l!==null){var j={payload:S,action:l,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(R){j.listeners.push(R)}};B.T!==null?p(!0):j.isTransition=!1,v(j),p=u.pending,p===null?(j.next=u.pending=j,kA(u,j)):(j.next=p.next,u.pending=p.next=j)}}function kA(l,u){var p=u.action,v=u.payload,S=l.state;if(u.isTransition){var j=B.T,R={};B.T=R;try{var I=p(S,v),K=B.S;K!==null&&K(R,I),jA(l,u,I)}catch(oe){Lv(l,u,oe)}finally{j!==null&&R.types!==null&&(j.types=R.types),B.T=j}}else try{j=p(S,v),jA(l,u,j)}catch(oe){Lv(l,u,oe)}}function jA(l,u,p){p!==null&&typeof p=="object"&&typeof p.then=="function"?p.then(function(v){AA(l,u,v)},function(v){return Lv(l,u,v)}):AA(l,u,p)}function AA(l,u,p){u.status="fulfilled",u.value=p,CA(u),l.state=p,u=l.pending,u!==null&&(p=u.next,p===u?l.pending=null:(p=p.next,u.next=p,kA(l,p)))}function Lv(l,u,p){var v=l.pending;if(l.pending=null,v!==null){v=v.next;do u.status="rejected",u.reason=p,CA(u),u=u.next;while(u!==v)}l.action=null}function CA(l){l=l.listeners;for(var u=0;u<l.length;u++)(0,l[u])()}function OA(l,u){return u}function TA(l,u){if(Be){var p=et.formState;if(p!==null){e:{var v=Re;if(Be){if(at){t:{for(var S=at,j=nn;S.nodeType!==8;){if(!j){S=null;break t}if(S=on(S.nextSibling),S===null){S=null;break t}}j=S.data,S=j==="F!"||j==="F"?S:null}if(S){at=on(S.nextSibling),v=S.data==="F!";break e}}pi(v)}v=!1}v&&(u=p[0])}}return p=hr(),p.memoizedState=p.baseState=u,v={pending:null,lanes:0,dispatch:null,lastRenderedReducer:OA,lastRenderedState:u},p.queue=v,p=XA.bind(null,Re,v),v.dispatch=p,v=Dv(!1),j=Fv.bind(null,Re,!1,v.queue),v=hr(),S={state:u,dispatch:null,action:l,pending:null},v.queue=S,p=jU.bind(null,Re,S,j,p),S.dispatch=p,v.memoizedState=l,[u,p,!1]}function NA(l){var u=Et();return MA(u,Xe,l)}function MA(l,u,p){if(u=Rv(l,u,OA)[0],l=Lf(Ea)[0],typeof u=="object"&&u!==null&&typeof u.then=="function")try{var v=Xs(u)}catch(R){throw R===vl?jf:R}else v=u;u=Et();var S=u.queue,j=S.dispatch;return p!==u.memoizedState&&(Re.flags|=2048,_l(9,{destroy:void 0},AU.bind(null,S,p),null)),[v,j,l]}function AU(l,u){l.action=u}function RA(l){var u=Et(),p=Xe;if(p!==null)return MA(u,p,l);Et(),u=u.memoizedState,p=Et();var v=p.queue.dispatch;return p.memoizedState=l,[u,v,!1]}function _l(l,u,p,v){return l={tag:l,create:p,deps:v,inst:u,next:null},u=Re.updateQueue,u===null&&(u=Pf(),Re.updateQueue=u),p=u.lastEffect,p===null?u.lastEffect=l.next=l:(v=p.next,p.next=l,l.next=v,u.lastEffect=l),l}function PA(){return Et().memoizedState}function If(l,u,p,v){var S=hr();Re.flags|=l,S.memoizedState=_l(1|u,{destroy:void 0},p,v===void 0?null:v)}function zf(l,u,p,v){var S=Et();v=v===void 0?null:v;var j=S.memoizedState.inst;Xe!==null&&v!==null&&Av(v,Xe.memoizedState.deps)?S.memoizedState=_l(u,j,p,v):(Re.flags|=l,S.memoizedState=_l(1|u,j,p,v))}function DA(l,u){If(8390656,8,l,u)}function Iv(l,u){zf(2048,8,l,u)}function CU(l){Re.flags|=4;var u=Re.updateQueue;if(u===null)u=Pf(),Re.updateQueue=u,u.events=[l];else{var p=u.events;p===null?u.events=[l]:p.push(l)}}function LA(l){var u=Et().memoizedState;return CU({ref:u,nextImpl:l}),function(){if((Ge&2)!==0)throw Error(a(440));return u.impl.apply(void 0,arguments)}}function IA(l,u){return zf(4,2,l,u)}function zA(l,u){return zf(4,4,l,u)}function qA(l,u){if(typeof u=="function"){l=l();var p=u(l);return function(){typeof p=="function"?p():u(null)}}if(u!=null)return l=l(),u.current=l,function(){u.current=null}}function BA(l,u,p){p=p!=null?p.concat([l]):null,zf(4,4,qA.bind(null,u,l),p)}function zv(){}function $A(l,u){var p=Et();u=u===void 0?null:u;var v=p.memoizedState;return u!==null&&Av(u,v[1])?v[0]:(p.memoizedState=[l,u],l)}function FA(l,u){var p=Et();u=u===void 0?null:u;var v=p.memoizedState;if(u!==null&&Av(u,v[1]))return v[0];if(v=l(),co){ui(!0);try{l()}finally{ui(!1)}}return p.memoizedState=[v,u],v}function qv(l,u,p){return p===void 0||(Sa&1073741824)!==0&&(ze&261930)===0?l.memoizedState=u:(l.memoizedState=p,l=UC(),Re.lanes|=l,Si|=l,p)}function UA(l,u,p,v){return Lr(p,u)?p:yl.current!==null?(l=qv(l,p,v),Lr(l,u)||(Ct=!0),l):(Sa&42)===0||(Sa&1073741824)!==0&&(ze&261930)===0?(Ct=!0,l.memoizedState=p):(l=UC(),Re.lanes|=l,Si|=l,u)}function HA(l,u,p,v,S){var j=Z.p;Z.p=j!==0&&8>j?j:8;var R=B.T,I={};B.T=I,Fv(l,!1,u,p);try{var K=S(),oe=B.S;if(oe!==null&&oe(I,K),K!==null&&typeof K=="object"&&typeof K.then=="function"){var me=SU(K,v);Ws(l,u,me,Fr(l))}else Ws(l,u,v,Fr(l))}catch(ye){Ws(l,u,{then:function(){},status:"rejected",reason:ye},Fr())}finally{Z.p=j,R!==null&&I.types!==null&&(R.types=I.types),B.T=R}}function OU(){}function Bv(l,u,p,v){if(l.tag!==5)throw Error(a(476));var S=GA(l).queue;HA(l,S,u,ae,p===null?OU:function(){return VA(l),p(v)})}function GA(l){var u=l.memoizedState;if(u!==null)return u;u={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ea,lastRenderedState:ae},next:null};var p={};return u.next={memoizedState:p,baseState:p,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ea,lastRenderedState:p},next:null},l.memoizedState=u,l=l.alternate,l!==null&&(l.memoizedState=u),u}function VA(l){var u=GA(l);u.next===null&&(u=l.alternate.memoizedState),Ws(l,u.next.queue,{},Fr())}function $v(){return Wt(hu)}function KA(){return Et().memoizedState}function YA(){return Et().memoizedState}function TU(l){for(var u=l.return;u!==null;){switch(u.tag){case 24:case 3:var p=Fr();l=gi(p);var v=yi(u,l,p);v!==null&&(Or(v,u,p),Gs(v,u,p)),u={cache:vv()},l.payload=u;return}u=u.return}}function NU(l,u,p){var v=Fr();p={lane:v,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},qf(l)?WA(u,p):(p=iv(l,u,p,v),p!==null&&(Or(p,l,v),ZA(p,u,v)))}function XA(l,u,p){var v=Fr();Ws(l,u,p,v)}function Ws(l,u,p,v){var S={lane:v,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null};if(qf(l))WA(u,S);else{var j=l.alternate;if(l.lanes===0&&(j===null||j.lanes===0)&&(j=u.lastRenderedReducer,j!==null))try{var R=u.lastRenderedState,I=j(R,p);if(S.hasEagerState=!0,S.eagerState=I,Lr(I,R))return bf(l,u,S,0),et===null&&yf(),!1}catch{}finally{}if(p=iv(l,u,S,v),p!==null)return Or(p,l,v),ZA(p,u,v),!0}return!1}function Fv(l,u,p,v){if(v={lane:2,revertLane:xg(),gesture:null,action:v,hasEagerState:!1,eagerState:null,next:null},qf(l)){if(u)throw Error(a(479))}else u=iv(l,p,v,2),u!==null&&Or(u,l,2)}function qf(l){var u=l.alternate;return l===Re||u!==null&&u===Re}function WA(l,u){bl=Mf=!0;var p=l.pending;p===null?u.next=u:(u.next=p.next,p.next=u),l.pending=u}function ZA(l,u,p){if((p&4194048)!==0){var v=u.lanes;v&=l.pendingLanes,p|=v,u.lanes=p,rj(l,p)}}var Zs={readContext:Wt,use:Df,useCallback:gt,useContext:gt,useEffect:gt,useImperativeHandle:gt,useLayoutEffect:gt,useInsertionEffect:gt,useMemo:gt,useReducer:gt,useRef:gt,useState:gt,useDebugValue:gt,useDeferredValue:gt,useTransition:gt,useSyncExternalStore:gt,useId:gt,useHostTransitionStatus:gt,useFormState:gt,useActionState:gt,useOptimistic:gt,useMemoCache:gt,useCacheRefresh:gt};Zs.useEffectEvent=gt;var QA={readContext:Wt,use:Df,useCallback:function(l,u){return hr().memoizedState=[l,u===void 0?null:u],l},useContext:Wt,useEffect:DA,useImperativeHandle:function(l,u,p){p=p!=null?p.concat([l]):null,If(4194308,4,qA.bind(null,u,l),p)},useLayoutEffect:function(l,u){return If(4194308,4,l,u)},useInsertionEffect:function(l,u){If(4,2,l,u)},useMemo:function(l,u){var p=hr();u=u===void 0?null:u;var v=l();if(co){ui(!0);try{l()}finally{ui(!1)}}return p.memoizedState=[v,u],v},useReducer:function(l,u,p){var v=hr();if(p!==void 0){var S=p(u);if(co){ui(!0);try{p(u)}finally{ui(!1)}}}else S=u;return v.memoizedState=v.baseState=S,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:S},v.queue=l,l=l.dispatch=NU.bind(null,Re,l),[v.memoizedState,l]},useRef:function(l){var u=hr();return l={current:l},u.memoizedState=l},useState:function(l){l=Dv(l);var u=l.queue,p=XA.bind(null,Re,u);return u.dispatch=p,[l.memoizedState,p]},useDebugValue:zv,useDeferredValue:function(l,u){var p=hr();return qv(p,l,u)},useTransition:function(){var l=Dv(!1);return l=HA.bind(null,Re,l.queue,!0,!1),hr().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,u,p){var v=Re,S=hr();if(Be){if(p===void 0)throw Error(a(407));p=p()}else{if(p=u(),et===null)throw Error(a(349));(ze&127)!==0||bA(v,u,p)}S.memoizedState=p;var j={value:p,getSnapshot:u};return S.queue=j,DA(_A.bind(null,v,j,l),[l]),v.flags|=2048,_l(9,{destroy:void 0},xA.bind(null,v,j,p,u),null),p},useId:function(){var l=hr(),u=et.identifierPrefix;if(Be){var p=Fn,v=$n;p=(v&~(1<<32-Dr(v)-1)).toString(32)+p,u="_"+u+"R_"+p,p=Rf++,0<p&&(u+="H"+p.toString(32)),u+="_"}else p=EU++,u="_"+u+"r_"+p.toString(32)+"_";return l.memoizedState=u},useHostTransitionStatus:$v,useFormState:TA,useActionState:TA,useOptimistic:function(l){var u=hr();u.memoizedState=u.baseState=l;var p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return u.queue=p,u=Fv.bind(null,Re,!0,p),p.dispatch=u,[l,u]},useMemoCache:Mv,useCacheRefresh:function(){return hr().memoizedState=TU.bind(null,Re)},useEffectEvent:function(l){var u=hr(),p={impl:l};return u.memoizedState=p,function(){if((Ge&2)!==0)throw Error(a(440));return p.impl.apply(void 0,arguments)}}},Uv={readContext:Wt,use:Df,useCallback:$A,useContext:Wt,useEffect:Iv,useImperativeHandle:BA,useInsertionEffect:IA,useLayoutEffect:zA,useMemo:FA,useReducer:Lf,useRef:PA,useState:function(){return Lf(Ea)},useDebugValue:zv,useDeferredValue:function(l,u){var p=Et();return UA(p,Xe.memoizedState,l,u)},useTransition:function(){var l=Lf(Ea)[0],u=Et().memoizedState;return[typeof l=="boolean"?l:Xs(l),u]},useSyncExternalStore:yA,useId:KA,useHostTransitionStatus:$v,useFormState:NA,useActionState:NA,useOptimistic:function(l,u){var p=Et();return EA(p,Xe,l,u)},useMemoCache:Mv,useCacheRefresh:YA};Uv.useEffectEvent=LA;var JA={readContext:Wt,use:Df,useCallback:$A,useContext:Wt,useEffect:Iv,useImperativeHandle:BA,useInsertionEffect:IA,useLayoutEffect:zA,useMemo:FA,useReducer:Pv,useRef:PA,useState:function(){return Pv(Ea)},useDebugValue:zv,useDeferredValue:function(l,u){var p=Et();return Xe===null?qv(p,l,u):UA(p,Xe.memoizedState,l,u)},useTransition:function(){var l=Pv(Ea)[0],u=Et().memoizedState;return[typeof l=="boolean"?l:Xs(l),u]},useSyncExternalStore:yA,useId:KA,useHostTransitionStatus:$v,useFormState:RA,useActionState:RA,useOptimistic:function(l,u){var p=Et();return Xe!==null?EA(p,Xe,l,u):(p.baseState=l,[l,p.queue.dispatch])},useMemoCache:Mv,useCacheRefresh:YA};JA.useEffectEvent=LA;function Hv(l,u,p,v){u=l.memoizedState,p=p(v,u),p=p==null?u:m({},u,p),l.memoizedState=p,l.lanes===0&&(l.updateQueue.baseState=p)}var Gv={enqueueSetState:function(l,u,p){l=l._reactInternals;var v=Fr(),S=gi(v);S.payload=u,p!=null&&(S.callback=p),u=yi(l,S,v),u!==null&&(Or(u,l,v),Gs(u,l,v))},enqueueReplaceState:function(l,u,p){l=l._reactInternals;var v=Fr(),S=gi(v);S.tag=1,S.payload=u,p!=null&&(S.callback=p),u=yi(l,S,v),u!==null&&(Or(u,l,v),Gs(u,l,v))},enqueueForceUpdate:function(l,u){l=l._reactInternals;var p=Fr(),v=gi(p);v.tag=2,u!=null&&(v.callback=u),u=yi(l,v,p),u!==null&&(Or(u,l,p),Gs(u,l,p))}};function eC(l,u,p,v,S,j,R){return l=l.stateNode,typeof l.shouldComponentUpdate=="function"?l.shouldComponentUpdate(v,j,R):u.prototype&&u.prototype.isPureReactComponent?!Is(p,v)||!Is(S,j):!0}function tC(l,u,p,v){l=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(p,v),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(p,v),u.state!==l&&Gv.enqueueReplaceState(u,u.state,null)}function fo(l,u){var p=u;if("ref"in u){p={};for(var v in u)v!=="ref"&&(p[v]=u[v])}if(l=l.defaultProps){p===u&&(p=m({},p));for(var S in l)p[S]===void 0&&(p[S]=l[S])}return p}function rC(l){gf(l)}function nC(l){console.error(l)}function aC(l){gf(l)}function Bf(l,u){try{var p=l.onUncaughtError;p(u.value,{componentStack:u.stack})}catch(v){setTimeout(function(){throw v})}}function iC(l,u,p){try{var v=l.onCaughtError;v(p.value,{componentStack:p.stack,errorBoundary:u.tag===1?u.stateNode:null})}catch(S){setTimeout(function(){throw S})}}function Vv(l,u,p){return p=gi(p),p.tag=3,p.payload={element:null},p.callback=function(){Bf(l,u)},p}function oC(l){return l=gi(l),l.tag=3,l}function lC(l,u,p,v){var S=p.type.getDerivedStateFromError;if(typeof S=="function"){var j=v.value;l.payload=function(){return S(j)},l.callback=function(){iC(u,p,v)}}var R=p.stateNode;R!==null&&typeof R.componentDidCatch=="function"&&(l.callback=function(){iC(u,p,v),typeof S!="function"&&(Ei===null?Ei=new Set([this]):Ei.add(this));var I=v.stack;this.componentDidCatch(v.value,{componentStack:I!==null?I:""})})}function MU(l,u,p,v,S){if(p.flags|=32768,v!==null&&typeof v=="object"&&typeof v.then=="function"){if(u=p.alternate,u!==null&&hl(u,p,S,!0),p=zr.current,p!==null){switch(p.tag){case 31:case 13:return an===null?Qf():p.alternate===null&&yt===0&&(yt=3),p.flags&=-257,p.flags|=65536,p.lanes=S,v===Af?p.flags|=16384:(u=p.updateQueue,u===null?p.updateQueue=new Set([v]):u.add(v),gg(l,v,S)),!1;case 22:return p.flags|=65536,v===Af?p.flags|=16384:(u=p.updateQueue,u===null?(u={transitions:null,markerInstances:null,retryQueue:new Set([v])},p.updateQueue=u):(p=u.retryQueue,p===null?u.retryQueue=new Set([v]):p.add(v)),gg(l,v,S)),!1}throw Error(a(435,p.tag))}return gg(l,v,S),Qf(),!1}if(Be)return u=zr.current,u!==null?((u.flags&65536)===0&&(u.flags|=256),u.flags|=65536,u.lanes=S,v!==fv&&(l=Error(a(422),{cause:v}),Bs(en(l,p)))):(v!==fv&&(u=Error(a(423),{cause:v}),Bs(en(u,p))),l=l.current.alternate,l.flags|=65536,S&=-S,l.lanes|=S,v=en(v,p),S=Vv(l.stateNode,v,S),wv(l,S),yt!==4&&(yt=2)),!1;var j=Error(a(520),{cause:v});if(j=en(j,p),iu===null?iu=[j]:iu.push(j),yt!==4&&(yt=2),u===null)return!0;v=en(v,p),p=u;do{switch(p.tag){case 3:return p.flags|=65536,l=S&-S,p.lanes|=l,l=Vv(p.stateNode,v,l),wv(p,l),!1;case 1:if(u=p.type,j=p.stateNode,(p.flags&128)===0&&(typeof u.getDerivedStateFromError=="function"||j!==null&&typeof j.componentDidCatch=="function"&&(Ei===null||!Ei.has(j))))return p.flags|=65536,S&=-S,p.lanes|=S,S=oC(S),lC(S,l,p,v),wv(p,S),!1}p=p.return}while(p!==null);return!1}var Kv=Error(a(461)),Ct=!1;function Zt(l,u,p,v){u.child=l===null?fA(u,null,p,v):uo(u,l.child,p,v)}function sC(l,u,p,v,S){p=p.render;var j=u.ref;if("ref"in v){var R={};for(var I in v)I!=="ref"&&(R[I]=v[I])}else R=v;return io(u),v=Cv(l,u,p,R,j,S),I=Ov(),l!==null&&!Ct?(Tv(l,u,S),ka(l,u,S)):(Be&&I&&uv(u),u.flags|=1,Zt(l,u,v,S),u.child)}function uC(l,u,p,v,S){if(l===null){var j=p.type;return typeof j=="function"&&!ov(j)&&j.defaultProps===void 0&&p.compare===null?(u.tag=15,u.type=j,cC(l,u,j,v,S)):(l=_f(p.type,null,v,u,u.mode,S),l.ref=u.ref,l.return=u,u.child=l)}if(j=l.child,!tg(l,S)){var R=j.memoizedProps;if(p=p.compare,p=p!==null?p:Is,p(R,v)&&l.ref===u.ref)return ka(l,u,S)}return u.flags|=1,l=ba(j,v),l.ref=u.ref,l.return=u,u.child=l}function cC(l,u,p,v,S){if(l!==null){var j=l.memoizedProps;if(Is(j,v)&&l.ref===u.ref)if(Ct=!1,u.pendingProps=v=j,tg(l,S))(l.flags&131072)!==0&&(Ct=!0);else return u.lanes=l.lanes,ka(l,u,S)}return Yv(l,u,p,v,S)}function fC(l,u,p,v){var S=v.children,j=l!==null?l.memoizedState:null;if(l===null&&u.stateNode===null&&(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),v.mode==="hidden"){if((u.flags&128)!==0){if(j=j!==null?j.baseLanes|p:p,l!==null){for(v=u.child=l.child,S=0;v!==null;)S=S|v.lanes|v.childLanes,v=v.sibling;v=S&~j}else v=0,u.child=null;return dC(l,u,j,p,v)}if((p&536870912)!==0)u.memoizedState={baseLanes:0,cachePool:null},l!==null&&kf(u,j!==null?j.cachePool:null),j!==null?pA(u,j):Ev(),mA(u);else return v=u.lanes=536870912,dC(l,u,j!==null?j.baseLanes|p:p,p,v)}else j!==null?(kf(u,j.cachePool),pA(u,j),xi(),u.memoizedState=null):(l!==null&&kf(u,null),Ev(),xi());return Zt(l,u,S,p),u.child}function Qs(l,u){return l!==null&&l.tag===22||u.stateNode!==null||(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.sibling}function dC(l,u,p,v,S){var j=yv();return j=j===null?null:{parent:jt._currentValue,pool:j},u.memoizedState={baseLanes:p,cachePool:j},l!==null&&kf(u,null),Ev(),mA(u),l!==null&&hl(l,u,v,!0),u.childLanes=S,null}function $f(l,u){return u=Uf({mode:u.mode,children:u.children},l.mode),u.ref=l.ref,l.child=u,u.return=l,u}function hC(l,u,p){return uo(u,l.child,null,p),l=$f(u,u.pendingProps),l.flags|=2,qr(u),u.memoizedState=null,l}function RU(l,u,p){var v=u.pendingProps,S=(u.flags&128)!==0;if(u.flags&=-129,l===null){if(Be){if(v.mode==="hidden")return l=$f(u,v),u.lanes=536870912,Qs(null,l);if(jv(u),(l=at)?(l=kO(l,nn),l=l!==null&&l.data==="&"?l:null,l!==null&&(u.memoizedState={dehydrated:l,treeContext:di!==null?{id:$n,overflow:Fn}:null,retryLane:536870912,hydrationErrors:null},p=Wj(l),p.return=u,u.child=p,Xt=u,at=null)):l=null,l===null)throw pi(u);return u.lanes=536870912,null}return $f(u,v)}var j=l.memoizedState;if(j!==null){var R=j.dehydrated;if(jv(u),S)if(u.flags&256)u.flags&=-257,u=hC(l,u,p);else if(u.memoizedState!==null)u.child=l.child,u.flags|=128,u=null;else throw Error(a(558));else if(Ct||hl(l,u,p,!1),S=(p&l.childLanes)!==0,Ct||S){if(v=et,v!==null&&(R=nj(v,p),R!==0&&R!==j.retryLane))throw j.retryLane=R,to(l,R),Or(v,l,R),Kv;Qf(),u=hC(l,u,p)}else l=j.treeContext,at=on(R.nextSibling),Xt=u,Be=!0,hi=null,nn=!1,l!==null&&Jj(u,l),u=$f(u,v),u.flags|=4096;return u}return l=ba(l.child,{mode:v.mode,children:v.children}),l.ref=u.ref,u.child=l,l.return=u,l}function Ff(l,u){var p=u.ref;if(p===null)l!==null&&l.ref!==null&&(u.flags|=4194816);else{if(typeof p!="function"&&typeof p!="object")throw Error(a(284));(l===null||l.ref!==p)&&(u.flags|=4194816)}}function Yv(l,u,p,v,S){return io(u),p=Cv(l,u,p,v,void 0,S),v=Ov(),l!==null&&!Ct?(Tv(l,u,S),ka(l,u,S)):(Be&&v&&uv(u),u.flags|=1,Zt(l,u,p,S),u.child)}function pC(l,u,p,v,S,j){return io(u),u.updateQueue=null,p=gA(u,v,p,S),vA(l),v=Ov(),l!==null&&!Ct?(Tv(l,u,j),ka(l,u,j)):(Be&&v&&uv(u),u.flags|=1,Zt(l,u,p,j),u.child)}function mC(l,u,p,v,S){if(io(u),u.stateNode===null){var j=ul,R=p.contextType;typeof R=="object"&&R!==null&&(j=Wt(R)),j=new p(v,j),u.memoizedState=j.state!==null&&j.state!==void 0?j.state:null,j.updater=Gv,u.stateNode=j,j._reactInternals=u,j=u.stateNode,j.props=v,j.state=u.memoizedState,j.refs={},xv(u),R=p.contextType,j.context=typeof R=="object"&&R!==null?Wt(R):ul,j.state=u.memoizedState,R=p.getDerivedStateFromProps,typeof R=="function"&&(Hv(u,p,R,v),j.state=u.memoizedState),typeof p.getDerivedStateFromProps=="function"||typeof j.getSnapshotBeforeUpdate=="function"||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(R=j.state,typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount(),R!==j.state&&Gv.enqueueReplaceState(j,j.state,null),Ks(u,v,j,S),Vs(),j.state=u.memoizedState),typeof j.componentDidMount=="function"&&(u.flags|=4194308),v=!0}else if(l===null){j=u.stateNode;var I=u.memoizedProps,K=fo(p,I);j.props=K;var oe=j.context,me=p.contextType;R=ul,typeof me=="object"&&me!==null&&(R=Wt(me));var ye=p.getDerivedStateFromProps;me=typeof ye=="function"||typeof j.getSnapshotBeforeUpdate=="function",I=u.pendingProps!==I,me||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(I||oe!==R)&&tC(u,j,v,R),vi=!1;var ue=u.memoizedState;j.state=ue,Ks(u,v,j,S),Vs(),oe=u.memoizedState,I||ue!==oe||vi?(typeof ye=="function"&&(Hv(u,p,ye,v),oe=u.memoizedState),(K=vi||eC(u,p,K,v,ue,oe,R))?(me||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount()),typeof j.componentDidMount=="function"&&(u.flags|=4194308)):(typeof j.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=v,u.memoizedState=oe),j.props=v,j.state=oe,j.context=R,v=K):(typeof j.componentDidMount=="function"&&(u.flags|=4194308),v=!1)}else{j=u.stateNode,_v(l,u),R=u.memoizedProps,me=fo(p,R),j.props=me,ye=u.pendingProps,ue=j.context,oe=p.contextType,K=ul,typeof oe=="object"&&oe!==null&&(K=Wt(oe)),I=p.getDerivedStateFromProps,(oe=typeof I=="function"||typeof j.getSnapshotBeforeUpdate=="function")||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(R!==ye||ue!==K)&&tC(u,j,v,K),vi=!1,ue=u.memoizedState,j.state=ue,Ks(u,v,j,S),Vs();var pe=u.memoizedState;R!==ye||ue!==pe||vi||l!==null&&l.dependencies!==null&&Sf(l.dependencies)?(typeof I=="function"&&(Hv(u,p,I,v),pe=u.memoizedState),(me=vi||eC(u,p,me,v,ue,pe,K)||l!==null&&l.dependencies!==null&&Sf(l.dependencies))?(oe||typeof j.UNSAFE_componentWillUpdate!="function"&&typeof j.componentWillUpdate!="function"||(typeof j.componentWillUpdate=="function"&&j.componentWillUpdate(v,pe,K),typeof j.UNSAFE_componentWillUpdate=="function"&&j.UNSAFE_componentWillUpdate(v,pe,K)),typeof j.componentDidUpdate=="function"&&(u.flags|=4),typeof j.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof j.componentDidUpdate!="function"||R===l.memoizedProps&&ue===l.memoizedState||(u.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||R===l.memoizedProps&&ue===l.memoizedState||(u.flags|=1024),u.memoizedProps=v,u.memoizedState=pe),j.props=v,j.state=pe,j.context=K,v=me):(typeof j.componentDidUpdate!="function"||R===l.memoizedProps&&ue===l.memoizedState||(u.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||R===l.memoizedProps&&ue===l.memoizedState||(u.flags|=1024),v=!1)}return j=v,Ff(l,u),v=(u.flags&128)!==0,j||v?(j=u.stateNode,p=v&&typeof p.getDerivedStateFromError!="function"?null:j.render(),u.flags|=1,l!==null&&v?(u.child=uo(u,l.child,null,S),u.child=uo(u,null,p,S)):Zt(l,u,p,S),u.memoizedState=j.state,l=u.child):l=ka(l,u,S),l}function vC(l,u,p,v){return no(),u.flags|=256,Zt(l,u,p,v),u.child}var Xv={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Wv(l){return{baseLanes:l,cachePool:iA()}}function Zv(l,u,p){return l=l!==null?l.childLanes&~p:0,u&&(l|=$r),l}function gC(l,u,p){var v=u.pendingProps,S=!1,j=(u.flags&128)!==0,R;if((R=j)||(R=l!==null&&l.memoizedState===null?!1:(St.current&2)!==0),R&&(S=!0,u.flags&=-129),R=(u.flags&32)!==0,u.flags&=-33,l===null){if(Be){if(S?bi(u):xi(),(l=at)?(l=kO(l,nn),l=l!==null&&l.data!=="&"?l:null,l!==null&&(u.memoizedState={dehydrated:l,treeContext:di!==null?{id:$n,overflow:Fn}:null,retryLane:536870912,hydrationErrors:null},p=Wj(l),p.return=u,u.child=p,Xt=u,at=null)):l=null,l===null)throw pi(u);return Rg(l)?u.lanes=32:u.lanes=536870912,null}var I=v.children;return v=v.fallback,S?(xi(),S=u.mode,I=Uf({mode:"hidden",children:I},S),v=ro(v,S,p,null),I.return=u,v.return=u,I.sibling=v,u.child=I,v=u.child,v.memoizedState=Wv(p),v.childLanes=Zv(l,R,p),u.memoizedState=Xv,Qs(null,v)):(bi(u),Qv(u,I))}var K=l.memoizedState;if(K!==null&&(I=K.dehydrated,I!==null)){if(j)u.flags&256?(bi(u),u.flags&=-257,u=Jv(l,u,p)):u.memoizedState!==null?(xi(),u.child=l.child,u.flags|=128,u=null):(xi(),I=v.fallback,S=u.mode,v=Uf({mode:"visible",children:v.children},S),I=ro(I,S,p,null),I.flags|=2,v.return=u,I.return=u,v.sibling=I,u.child=v,uo(u,l.child,null,p),v=u.child,v.memoizedState=Wv(p),v.childLanes=Zv(l,R,p),u.memoizedState=Xv,u=Qs(null,v));else if(bi(u),Rg(I)){if(R=I.nextSibling&&I.nextSibling.dataset,R)var oe=R.dgst;R=oe,v=Error(a(419)),v.stack="",v.digest=R,Bs({value:v,source:null,stack:null}),u=Jv(l,u,p)}else if(Ct||hl(l,u,p,!1),R=(p&l.childLanes)!==0,Ct||R){if(R=et,R!==null&&(v=nj(R,p),v!==0&&v!==K.retryLane))throw K.retryLane=v,to(l,v),Or(R,l,v),Kv;Mg(I)||Qf(),u=Jv(l,u,p)}else Mg(I)?(u.flags|=192,u.child=l.child,u=null):(l=K.treeContext,at=on(I.nextSibling),Xt=u,Be=!0,hi=null,nn=!1,l!==null&&Jj(u,l),u=Qv(u,v.children),u.flags|=4096);return u}return S?(xi(),I=v.fallback,S=u.mode,K=l.child,oe=K.sibling,v=ba(K,{mode:"hidden",children:v.children}),v.subtreeFlags=K.subtreeFlags&65011712,oe!==null?I=ba(oe,I):(I=ro(I,S,p,null),I.flags|=2),I.return=u,v.return=u,v.sibling=I,u.child=v,Qs(null,v),v=u.child,I=l.child.memoizedState,I===null?I=Wv(p):(S=I.cachePool,S!==null?(K=jt._currentValue,S=S.parent!==K?{parent:K,pool:K}:S):S=iA(),I={baseLanes:I.baseLanes|p,cachePool:S}),v.memoizedState=I,v.childLanes=Zv(l,R,p),u.memoizedState=Xv,Qs(l.child,v)):(bi(u),p=l.child,l=p.sibling,p=ba(p,{mode:"visible",children:v.children}),p.return=u,p.sibling=null,l!==null&&(R=u.deletions,R===null?(u.deletions=[l],u.flags|=16):R.push(l)),u.child=p,u.memoizedState=null,p)}function Qv(l,u){return u=Uf({mode:"visible",children:u},l.mode),u.return=l,l.child=u}function Uf(l,u){return l=Ir(22,l,null,u),l.lanes=0,l}function Jv(l,u,p){return uo(u,l.child,null,p),l=Qv(u,u.pendingProps.children),l.flags|=2,u.memoizedState=null,l}function yC(l,u,p){l.lanes|=u;var v=l.alternate;v!==null&&(v.lanes|=u),pv(l.return,u,p)}function eg(l,u,p,v,S,j){var R=l.memoizedState;R===null?l.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:v,tail:p,tailMode:S,treeForkCount:j}:(R.isBackwards=u,R.rendering=null,R.renderingStartTime=0,R.last=v,R.tail=p,R.tailMode=S,R.treeForkCount=j)}function bC(l,u,p){var v=u.pendingProps,S=v.revealOrder,j=v.tail;v=v.children;var R=St.current,I=(R&2)!==0;if(I?(R=R&1|2,u.flags|=128):R&=1,ce(St,R),Zt(l,u,v,p),v=Be?qs:0,!I&&l!==null&&(l.flags&128)!==0)e:for(l=u.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&yC(l,p,u);else if(l.tag===19)yC(l,p,u);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===u)break e;for(;l.sibling===null;){if(l.return===null||l.return===u)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}switch(S){case"forwards":for(p=u.child,S=null;p!==null;)l=p.alternate,l!==null&&Nf(l)===null&&(S=p),p=p.sibling;p=S,p===null?(S=u.child,u.child=null):(S=p.sibling,p.sibling=null),eg(u,!1,S,p,j,v);break;case"backwards":case"unstable_legacy-backwards":for(p=null,S=u.child,u.child=null;S!==null;){if(l=S.alternate,l!==null&&Nf(l)===null){u.child=S;break}l=S.sibling,S.sibling=p,p=S,S=l}eg(u,!0,p,null,j,v);break;case"together":eg(u,!1,null,null,void 0,v);break;default:u.memoizedState=null}return u.child}function ka(l,u,p){if(l!==null&&(u.dependencies=l.dependencies),Si|=u.lanes,(p&u.childLanes)===0)if(l!==null){if(hl(l,u,p,!1),(p&u.childLanes)===0)return null}else return null;if(l!==null&&u.child!==l.child)throw Error(a(153));if(u.child!==null){for(l=u.child,p=ba(l,l.pendingProps),u.child=p,p.return=u;l.sibling!==null;)l=l.sibling,p=p.sibling=ba(l,l.pendingProps),p.return=u;p.sibling=null}return u.child}function tg(l,u){return(l.lanes&u)!==0?!0:(l=l.dependencies,!!(l!==null&&Sf(l)))}function PU(l,u,p){switch(u.tag){case 3:xe(u,u.stateNode.containerInfo),mi(u,jt,l.memoizedState.cache),no();break;case 27:case 5:le(u);break;case 4:xe(u,u.stateNode.containerInfo);break;case 10:mi(u,u.type,u.memoizedProps.value);break;case 31:if(u.memoizedState!==null)return u.flags|=128,jv(u),null;break;case 13:var v=u.memoizedState;if(v!==null)return v.dehydrated!==null?(bi(u),u.flags|=128,null):(p&u.child.childLanes)!==0?gC(l,u,p):(bi(u),l=ka(l,u,p),l!==null?l.sibling:null);bi(u);break;case 19:var S=(l.flags&128)!==0;if(v=(p&u.childLanes)!==0,v||(hl(l,u,p,!1),v=(p&u.childLanes)!==0),S){if(v)return bC(l,u,p);u.flags|=128}if(S=u.memoizedState,S!==null&&(S.rendering=null,S.tail=null,S.lastEffect=null),ce(St,St.current),v)break;return null;case 22:return u.lanes=0,fC(l,u,p,u.pendingProps);case 24:mi(u,jt,l.memoizedState.cache)}return ka(l,u,p)}function xC(l,u,p){if(l!==null)if(l.memoizedProps!==u.pendingProps)Ct=!0;else{if(!tg(l,p)&&(u.flags&128)===0)return Ct=!1,PU(l,u,p);Ct=(l.flags&131072)!==0}else Ct=!1,Be&&(u.flags&1048576)!==0&&Qj(u,qs,u.index);switch(u.lanes=0,u.tag){case 16:e:{var v=u.pendingProps;if(l=lo(u.elementType),u.type=l,typeof l=="function")ov(l)?(v=fo(l,v),u.tag=1,u=mC(null,u,l,v,p)):(u.tag=0,u=Yv(null,u,l,v,p));else{if(l!=null){var S=l.$$typeof;if(S===O){u.tag=11,u=sC(null,u,l,v,p);break e}else if(S===M){u.tag=14,u=uC(null,u,l,v,p);break e}}throw u=$(l)||l,Error(a(306,u,""))}}return u;case 0:return Yv(l,u,u.type,u.pendingProps,p);case 1:return v=u.type,S=fo(v,u.pendingProps),mC(l,u,v,S,p);case 3:e:{if(xe(u,u.stateNode.containerInfo),l===null)throw Error(a(387));v=u.pendingProps;var j=u.memoizedState;S=j.element,_v(l,u),Ks(u,v,null,p);var R=u.memoizedState;if(v=R.cache,mi(u,jt,v),v!==j.cache&&mv(u,[jt],p,!0),Vs(),v=R.element,j.isDehydrated)if(j={element:v,isDehydrated:!1,cache:R.cache},u.updateQueue.baseState=j,u.memoizedState=j,u.flags&256){u=vC(l,u,v,p);break e}else if(v!==S){S=en(Error(a(424)),u),Bs(S),u=vC(l,u,v,p);break e}else{switch(l=u.stateNode.containerInfo,l.nodeType){case 9:l=l.body;break;default:l=l.nodeName==="HTML"?l.ownerDocument.body:l}for(at=on(l.firstChild),Xt=u,Be=!0,hi=null,nn=!0,p=fA(u,null,v,p),u.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling}else{if(no(),v===S){u=ka(l,u,p);break e}Zt(l,u,v,p)}u=u.child}return u;case 26:return Ff(l,u),l===null?(p=NO(u.type,null,u.pendingProps,null))?u.memoizedState=p:Be||(p=u.type,l=u.pendingProps,v=id(te.current).createElement(p),v[Yt]=u,v[Sr]=l,Qt(v,p,l),Bt(v),u.stateNode=v):u.memoizedState=NO(u.type,l.memoizedProps,u.pendingProps,l.memoizedState),null;case 27:return le(u),l===null&&Be&&(v=u.stateNode=CO(u.type,u.pendingProps,te.current),Xt=u,nn=!0,S=at,Ci(u.type)?(Pg=S,at=on(v.firstChild)):at=S),Zt(l,u,u.pendingProps.children,p),Ff(l,u),l===null&&(u.flags|=4194304),u.child;case 5:return l===null&&Be&&((S=v=at)&&(v=cH(v,u.type,u.pendingProps,nn),v!==null?(u.stateNode=v,Xt=u,at=on(v.firstChild),nn=!1,S=!0):S=!1),S||pi(u)),le(u),S=u.type,j=u.pendingProps,R=l!==null?l.memoizedProps:null,v=j.children,Og(S,j)?v=null:R!==null&&Og(S,R)&&(u.flags|=32),u.memoizedState!==null&&(S=Cv(l,u,kU,null,null,p),hu._currentValue=S),Ff(l,u),Zt(l,u,v,p),u.child;case 6:return l===null&&Be&&((l=p=at)&&(p=fH(p,u.pendingProps,nn),p!==null?(u.stateNode=p,Xt=u,at=null,l=!0):l=!1),l||pi(u)),null;case 13:return gC(l,u,p);case 4:return xe(u,u.stateNode.containerInfo),v=u.pendingProps,l===null?u.child=uo(u,null,v,p):Zt(l,u,v,p),u.child;case 11:return sC(l,u,u.type,u.pendingProps,p);case 7:return Zt(l,u,u.pendingProps,p),u.child;case 8:return Zt(l,u,u.pendingProps.children,p),u.child;case 12:return Zt(l,u,u.pendingProps.children,p),u.child;case 10:return v=u.pendingProps,mi(u,u.type,v.value),Zt(l,u,v.children,p),u.child;case 9:return S=u.type._context,v=u.pendingProps.children,io(u),S=Wt(S),v=v(S),u.flags|=1,Zt(l,u,v,p),u.child;case 14:return uC(l,u,u.type,u.pendingProps,p);case 15:return cC(l,u,u.type,u.pendingProps,p);case 19:return bC(l,u,p);case 31:return RU(l,u,p);case 22:return fC(l,u,p,u.pendingProps);case 24:return io(u),v=Wt(jt),l===null?(S=yv(),S===null&&(S=et,j=vv(),S.pooledCache=j,j.refCount++,j!==null&&(S.pooledCacheLanes|=p),S=j),u.memoizedState={parent:v,cache:S},xv(u),mi(u,jt,S)):((l.lanes&p)!==0&&(_v(l,u),Ks(u,null,null,p),Vs()),S=l.memoizedState,j=u.memoizedState,S.parent!==v?(S={parent:v,cache:v},u.memoizedState=S,u.lanes===0&&(u.memoizedState=u.updateQueue.baseState=S),mi(u,jt,v)):(v=j.cache,mi(u,jt,v),v!==S.cache&&mv(u,[jt],p,!0))),Zt(l,u,u.pendingProps.children,p),u.child;case 29:throw u.pendingProps}throw Error(a(156,u.tag))}function ja(l){l.flags|=4}function rg(l,u,p,v,S){if((u=(l.mode&32)!==0)&&(u=!1),u){if(l.flags|=16777216,(S&335544128)===S)if(l.stateNode.complete)l.flags|=8192;else if(KC())l.flags|=8192;else throw so=Af,bv}else l.flags&=-16777217}function _C(l,u){if(u.type!=="stylesheet"||(u.state.loading&4)!==0)l.flags&=-16777217;else if(l.flags|=16777216,!LO(u))if(KC())l.flags|=8192;else throw so=Af,bv}function Hf(l,u){u!==null&&(l.flags|=4),l.flags&16384&&(u=l.tag!==22?ej():536870912,l.lanes|=u,kl|=u)}function Js(l,u){if(!Be)switch(l.tailMode){case"hidden":u=l.tail;for(var p=null;u!==null;)u.alternate!==null&&(p=u),u=u.sibling;p===null?l.tail=null:p.sibling=null;break;case"collapsed":p=l.tail;for(var v=null;p!==null;)p.alternate!==null&&(v=p),p=p.sibling;v===null?u||l.tail===null?l.tail=null:l.tail.sibling=null:v.sibling=null}}function it(l){var u=l.alternate!==null&&l.alternate.child===l.child,p=0,v=0;if(u)for(var S=l.child;S!==null;)p|=S.lanes|S.childLanes,v|=S.subtreeFlags&65011712,v|=S.flags&65011712,S.return=l,S=S.sibling;else for(S=l.child;S!==null;)p|=S.lanes|S.childLanes,v|=S.subtreeFlags,v|=S.flags,S.return=l,S=S.sibling;return l.subtreeFlags|=v,l.childLanes=p,u}function DU(l,u,p){var v=u.pendingProps;switch(cv(u),u.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return it(u),null;case 1:return it(u),null;case 3:return p=u.stateNode,v=null,l!==null&&(v=l.memoizedState.cache),u.memoizedState.cache!==v&&(u.flags|=2048),wa(jt),ee(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(l===null||l.child===null)&&(dl(u)?ja(u):l===null||l.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,dv())),it(u),null;case 26:var S=u.type,j=u.memoizedState;return l===null?(ja(u),j!==null?(it(u),_C(u,j)):(it(u),rg(u,S,null,v,p))):j?j!==l.memoizedState?(ja(u),it(u),_C(u,j)):(it(u),u.flags&=-16777217):(l=l.memoizedProps,l!==v&&ja(u),it(u),rg(u,S,l,v,p)),null;case 27:if(be(u),p=te.current,S=u.type,l!==null&&u.stateNode!=null)l.memoizedProps!==v&&ja(u);else{if(!v){if(u.stateNode===null)throw Error(a(166));return it(u),null}l=G.current,dl(u)?eA(u):(l=CO(S,v,p),u.stateNode=l,ja(u))}return it(u),null;case 5:if(be(u),S=u.type,l!==null&&u.stateNode!=null)l.memoizedProps!==v&&ja(u);else{if(!v){if(u.stateNode===null)throw Error(a(166));return it(u),null}if(j=G.current,dl(u))eA(u);else{var R=id(te.current);switch(j){case 1:j=R.createElementNS("http://www.w3.org/2000/svg",S);break;case 2:j=R.createElementNS("http://www.w3.org/1998/Math/MathML",S);break;default:switch(S){case"svg":j=R.createElementNS("http://www.w3.org/2000/svg",S);break;case"math":j=R.createElementNS("http://www.w3.org/1998/Math/MathML",S);break;case"script":j=R.createElement("div"),j.innerHTML="<script><\/script>",j=j.removeChild(j.firstChild);break;case"select":j=typeof v.is=="string"?R.createElement("select",{is:v.is}):R.createElement("select"),v.multiple?j.multiple=!0:v.size&&(j.size=v.size);break;default:j=typeof v.is=="string"?R.createElement(S,{is:v.is}):R.createElement(S)}}j[Yt]=u,j[Sr]=v;e:for(R=u.child;R!==null;){if(R.tag===5||R.tag===6)j.appendChild(R.stateNode);else if(R.tag!==4&&R.tag!==27&&R.child!==null){R.child.return=R,R=R.child;continue}if(R===u)break e;for(;R.sibling===null;){if(R.return===null||R.return===u)break e;R=R.return}R.sibling.return=R.return,R=R.sibling}u.stateNode=j;e:switch(Qt(j,S,v),S){case"button":case"input":case"select":case"textarea":v=!!v.autoFocus;break e;case"img":v=!0;break e;default:v=!1}v&&ja(u)}}return it(u),rg(u,u.type,l===null?null:l.memoizedProps,u.pendingProps,p),null;case 6:if(l&&u.stateNode!=null)l.memoizedProps!==v&&ja(u);else{if(typeof v!="string"&&u.stateNode===null)throw Error(a(166));if(l=te.current,dl(u)){if(l=u.stateNode,p=u.memoizedProps,v=null,S=Xt,S!==null)switch(S.tag){case 27:case 5:v=S.memoizedProps}l[Yt]=u,l=!!(l.nodeValue===p||v!==null&&v.suppressHydrationWarning===!0||gO(l.nodeValue,p)),l||pi(u,!0)}else l=id(l).createTextNode(v),l[Yt]=u,u.stateNode=l}return it(u),null;case 31:if(p=u.memoizedState,l===null||l.memoizedState!==null){if(v=dl(u),p!==null){if(l===null){if(!v)throw Error(a(318));if(l=u.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(a(557));l[Yt]=u}else no(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;it(u),l=!1}else p=dv(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=p),l=!0;if(!l)return u.flags&256?(qr(u),u):(qr(u),null);if((u.flags&128)!==0)throw Error(a(558))}return it(u),null;case 13:if(v=u.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(S=dl(u),v!==null&&v.dehydrated!==null){if(l===null){if(!S)throw Error(a(318));if(S=u.memoizedState,S=S!==null?S.dehydrated:null,!S)throw Error(a(317));S[Yt]=u}else no(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;it(u),S=!1}else S=dv(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=S),S=!0;if(!S)return u.flags&256?(qr(u),u):(qr(u),null)}return qr(u),(u.flags&128)!==0?(u.lanes=p,u):(p=v!==null,l=l!==null&&l.memoizedState!==null,p&&(v=u.child,S=null,v.alternate!==null&&v.alternate.memoizedState!==null&&v.alternate.memoizedState.cachePool!==null&&(S=v.alternate.memoizedState.cachePool.pool),j=null,v.memoizedState!==null&&v.memoizedState.cachePool!==null&&(j=v.memoizedState.cachePool.pool),j!==S&&(v.flags|=2048)),p!==l&&p&&(u.child.flags|=8192),Hf(u,u.updateQueue),it(u),null);case 4:return ee(),l===null&&Eg(u.stateNode.containerInfo),it(u),null;case 10:return wa(u.type),it(u),null;case 19:if(X(St),v=u.memoizedState,v===null)return it(u),null;if(S=(u.flags&128)!==0,j=v.rendering,j===null)if(S)Js(v,!1);else{if(yt!==0||l!==null&&(l.flags&128)!==0)for(l=u.child;l!==null;){if(j=Nf(l),j!==null){for(u.flags|=128,Js(v,!1),l=j.updateQueue,u.updateQueue=l,Hf(u,l),u.subtreeFlags=0,l=p,p=u.child;p!==null;)Xj(p,l),p=p.sibling;return ce(St,St.current&1|2),Be&&xa(u,v.treeForkCount),u.child}l=l.sibling}v.tail!==null&&qt()>Xf&&(u.flags|=128,S=!0,Js(v,!1),u.lanes=4194304)}else{if(!S)if(l=Nf(j),l!==null){if(u.flags|=128,S=!0,l=l.updateQueue,u.updateQueue=l,Hf(u,l),Js(v,!0),v.tail===null&&v.tailMode==="hidden"&&!j.alternate&&!Be)return it(u),null}else 2*qt()-v.renderingStartTime>Xf&&p!==536870912&&(u.flags|=128,S=!0,Js(v,!1),u.lanes=4194304);v.isBackwards?(j.sibling=u.child,u.child=j):(l=v.last,l!==null?l.sibling=j:u.child=j,v.last=j)}return v.tail!==null?(l=v.tail,v.rendering=l,v.tail=l.sibling,v.renderingStartTime=qt(),l.sibling=null,p=St.current,ce(St,S?p&1|2:p&1),Be&&xa(u,v.treeForkCount),l):(it(u),null);case 22:case 23:return qr(u),kv(),v=u.memoizedState!==null,l!==null?l.memoizedState!==null!==v&&(u.flags|=8192):v&&(u.flags|=8192),v?(p&536870912)!==0&&(u.flags&128)===0&&(it(u),u.subtreeFlags&6&&(u.flags|=8192)):it(u),p=u.updateQueue,p!==null&&Hf(u,p.retryQueue),p=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(p=l.memoizedState.cachePool.pool),v=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(v=u.memoizedState.cachePool.pool),v!==p&&(u.flags|=2048),l!==null&&X(oo),null;case 24:return p=null,l!==null&&(p=l.memoizedState.cache),u.memoizedState.cache!==p&&(u.flags|=2048),wa(jt),it(u),null;case 25:return null;case 30:return null}throw Error(a(156,u.tag))}function LU(l,u){switch(cv(u),u.tag){case 1:return l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 3:return wa(jt),ee(),l=u.flags,(l&65536)!==0&&(l&128)===0?(u.flags=l&-65537|128,u):null;case 26:case 27:case 5:return be(u),null;case 31:if(u.memoizedState!==null){if(qr(u),u.alternate===null)throw Error(a(340));no()}return l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 13:if(qr(u),l=u.memoizedState,l!==null&&l.dehydrated!==null){if(u.alternate===null)throw Error(a(340));no()}return l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 19:return X(St),null;case 4:return ee(),null;case 10:return wa(u.type),null;case 22:case 23:return qr(u),kv(),l!==null&&X(oo),l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 24:return wa(jt),null;case 25:return null;default:return null}}function wC(l,u){switch(cv(u),u.tag){case 3:wa(jt),ee();break;case 26:case 27:case 5:be(u);break;case 4:ee();break;case 31:u.memoizedState!==null&&qr(u);break;case 13:qr(u);break;case 19:X(St);break;case 10:wa(u.type);break;case 22:case 23:qr(u),kv(),l!==null&&X(oo);break;case 24:wa(jt)}}function eu(l,u){try{var p=u.updateQueue,v=p!==null?p.lastEffect:null;if(v!==null){var S=v.next;p=S;do{if((p.tag&l)===l){v=void 0;var j=p.create,R=p.inst;v=j(),R.destroy=v}p=p.next}while(p!==S)}}catch(I){Ye(u,u.return,I)}}function _i(l,u,p){try{var v=u.updateQueue,S=v!==null?v.lastEffect:null;if(S!==null){var j=S.next;v=j;do{if((v.tag&l)===l){var R=v.inst,I=R.destroy;if(I!==void 0){R.destroy=void 0,S=u;var K=p,oe=I;try{oe()}catch(me){Ye(S,K,me)}}}v=v.next}while(v!==j)}}catch(me){Ye(u,u.return,me)}}function SC(l){var u=l.updateQueue;if(u!==null){var p=l.stateNode;try{hA(u,p)}catch(v){Ye(l,l.return,v)}}}function EC(l,u,p){p.props=fo(l.type,l.memoizedProps),p.state=l.memoizedState;try{p.componentWillUnmount()}catch(v){Ye(l,u,v)}}function tu(l,u){try{var p=l.ref;if(p!==null){switch(l.tag){case 26:case 27:case 5:var v=l.stateNode;break;case 30:v=l.stateNode;break;default:v=l.stateNode}typeof p=="function"?l.refCleanup=p(v):p.current=v}}catch(S){Ye(l,u,S)}}function Un(l,u){var p=l.ref,v=l.refCleanup;if(p!==null)if(typeof v=="function")try{v()}catch(S){Ye(l,u,S)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof p=="function")try{p(null)}catch(S){Ye(l,u,S)}else p.current=null}function kC(l){var u=l.type,p=l.memoizedProps,v=l.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":p.autoFocus&&v.focus();break e;case"img":p.src?v.src=p.src:p.srcSet&&(v.srcset=p.srcSet)}}catch(S){Ye(l,l.return,S)}}function ng(l,u,p){try{var v=l.stateNode;aH(v,l.type,p,u),v[Sr]=u}catch(S){Ye(l,l.return,S)}}function jC(l){return l.tag===5||l.tag===3||l.tag===26||l.tag===27&&Ci(l.type)||l.tag===4}function ag(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||jC(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.tag===27&&Ci(l.type)||l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function ig(l,u,p){var v=l.tag;if(v===5||v===6)l=l.stateNode,u?(p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p).insertBefore(l,u):(u=p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p,u.appendChild(l),p=p._reactRootContainer,p!=null||u.onclick!==null||(u.onclick=ga));else if(v!==4&&(v===27&&Ci(l.type)&&(p=l.stateNode,u=null),l=l.child,l!==null))for(ig(l,u,p),l=l.sibling;l!==null;)ig(l,u,p),l=l.sibling}function Gf(l,u,p){var v=l.tag;if(v===5||v===6)l=l.stateNode,u?p.insertBefore(l,u):p.appendChild(l);else if(v!==4&&(v===27&&Ci(l.type)&&(p=l.stateNode),l=l.child,l!==null))for(Gf(l,u,p),l=l.sibling;l!==null;)Gf(l,u,p),l=l.sibling}function AC(l){var u=l.stateNode,p=l.memoizedProps;try{for(var v=l.type,S=u.attributes;S.length;)u.removeAttributeNode(S[0]);Qt(u,v,p),u[Yt]=l,u[Sr]=p}catch(j){Ye(l,l.return,j)}}var Aa=!1,Ot=!1,og=!1,CC=typeof WeakSet=="function"?WeakSet:Set,$t=null;function IU(l,u){if(l=l.containerInfo,Ag=dd,l=Bj(l),Jm(l)){if("selectionStart"in l)var p={start:l.selectionStart,end:l.selectionEnd};else e:{p=(p=l.ownerDocument)&&p.defaultView||window;var v=p.getSelection&&p.getSelection();if(v&&v.rangeCount!==0){p=v.anchorNode;var S=v.anchorOffset,j=v.focusNode;v=v.focusOffset;try{p.nodeType,j.nodeType}catch{p=null;break e}var R=0,I=-1,K=-1,oe=0,me=0,ye=l,ue=null;t:for(;;){for(var pe;ye!==p||S!==0&&ye.nodeType!==3||(I=R+S),ye!==j||v!==0&&ye.nodeType!==3||(K=R+v),ye.nodeType===3&&(R+=ye.nodeValue.length),(pe=ye.firstChild)!==null;)ue=ye,ye=pe;for(;;){if(ye===l)break t;if(ue===p&&++oe===S&&(I=R),ue===j&&++me===v&&(K=R),(pe=ye.nextSibling)!==null)break;ye=ue,ue=ye.parentNode}ye=pe}p=I===-1||K===-1?null:{start:I,end:K}}else p=null}p=p||{start:0,end:0}}else p=null;for(Cg={focusedElem:l,selectionRange:p},dd=!1,$t=u;$t!==null;)if(u=$t,l=u.child,(u.subtreeFlags&1028)!==0&&l!==null)l.return=u,$t=l;else for(;$t!==null;){switch(u=$t,j=u.alternate,l=u.flags,u.tag){case 0:if((l&4)!==0&&(l=u.updateQueue,l=l!==null?l.events:null,l!==null))for(p=0;p<l.length;p++)S=l[p],S.ref.impl=S.nextImpl;break;case 11:case 15:break;case 1:if((l&1024)!==0&&j!==null){l=void 0,p=u,S=j.memoizedProps,j=j.memoizedState,v=p.stateNode;try{var ke=fo(p.type,S);l=v.getSnapshotBeforeUpdate(ke,j),v.__reactInternalSnapshotBeforeUpdate=l}catch(Ne){Ye(p,p.return,Ne)}}break;case 3:if((l&1024)!==0){if(l=u.stateNode.containerInfo,p=l.nodeType,p===9)Ng(l);else if(p===1)switch(l.nodeName){case"HEAD":case"HTML":case"BODY":Ng(l);break;default:l.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((l&1024)!==0)throw Error(a(163))}if(l=u.sibling,l!==null){l.return=u.return,$t=l;break}$t=u.return}}function OC(l,u,p){var v=p.flags;switch(p.tag){case 0:case 11:case 15:Oa(l,p),v&4&&eu(5,p);break;case 1:if(Oa(l,p),v&4)if(l=p.stateNode,u===null)try{l.componentDidMount()}catch(R){Ye(p,p.return,R)}else{var S=fo(p.type,u.memoizedProps);u=u.memoizedState;try{l.componentDidUpdate(S,u,l.__reactInternalSnapshotBeforeUpdate)}catch(R){Ye(p,p.return,R)}}v&64&&SC(p),v&512&&tu(p,p.return);break;case 3:if(Oa(l,p),v&64&&(l=p.updateQueue,l!==null)){if(u=null,p.child!==null)switch(p.child.tag){case 27:case 5:u=p.child.stateNode;break;case 1:u=p.child.stateNode}try{hA(l,u)}catch(R){Ye(p,p.return,R)}}break;case 27:u===null&&v&4&&AC(p);case 26:case 5:Oa(l,p),u===null&&v&4&&kC(p),v&512&&tu(p,p.return);break;case 12:Oa(l,p);break;case 31:Oa(l,p),v&4&&MC(l,p);break;case 13:Oa(l,p),v&4&&RC(l,p),v&64&&(l=p.memoizedState,l!==null&&(l=l.dehydrated,l!==null&&(p=VU.bind(null,p),dH(l,p))));break;case 22:if(v=p.memoizedState!==null||Aa,!v){u=u!==null&&u.memoizedState!==null||Ot,S=Aa;var j=Ot;Aa=v,(Ot=u)&&!j?Ta(l,p,(p.subtreeFlags&8772)!==0):Oa(l,p),Aa=S,Ot=j}break;case 30:break;default:Oa(l,p)}}function TC(l){var u=l.alternate;u!==null&&(l.alternate=null,TC(u)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(u=l.stateNode,u!==null&&Lm(u)),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}var ut=null,kr=!1;function Ca(l,u,p){for(p=p.child;p!==null;)NC(l,u,p),p=p.sibling}function NC(l,u,p){if(wt&&typeof wt.onCommitFiberUnmount=="function")try{wt.onCommitFiberUnmount(wr,p)}catch{}switch(p.tag){case 26:Ot||Un(p,u),Ca(l,u,p),p.memoizedState?p.memoizedState.count--:p.stateNode&&(p=p.stateNode,p.parentNode.removeChild(p));break;case 27:Ot||Un(p,u);var v=ut,S=kr;Ci(p.type)&&(ut=p.stateNode,kr=!1),Ca(l,u,p),cu(p.stateNode),ut=v,kr=S;break;case 5:Ot||Un(p,u);case 6:if(v=ut,S=kr,ut=null,Ca(l,u,p),ut=v,kr=S,ut!==null)if(kr)try{(ut.nodeType===9?ut.body:ut.nodeName==="HTML"?ut.ownerDocument.body:ut).removeChild(p.stateNode)}catch(j){Ye(p,u,j)}else try{ut.removeChild(p.stateNode)}catch(j){Ye(p,u,j)}break;case 18:ut!==null&&(kr?(l=ut,SO(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,p.stateNode),Rl(l)):SO(ut,p.stateNode));break;case 4:v=ut,S=kr,ut=p.stateNode.containerInfo,kr=!0,Ca(l,u,p),ut=v,kr=S;break;case 0:case 11:case 14:case 15:_i(2,p,u),Ot||_i(4,p,u),Ca(l,u,p);break;case 1:Ot||(Un(p,u),v=p.stateNode,typeof v.componentWillUnmount=="function"&&EC(p,u,v)),Ca(l,u,p);break;case 21:Ca(l,u,p);break;case 22:Ot=(v=Ot)||p.memoizedState!==null,Ca(l,u,p),Ot=v;break;default:Ca(l,u,p)}}function MC(l,u){if(u.memoizedState===null&&(l=u.alternate,l!==null&&(l=l.memoizedState,l!==null))){l=l.dehydrated;try{Rl(l)}catch(p){Ye(u,u.return,p)}}}function RC(l,u){if(u.memoizedState===null&&(l=u.alternate,l!==null&&(l=l.memoizedState,l!==null&&(l=l.dehydrated,l!==null))))try{Rl(l)}catch(p){Ye(u,u.return,p)}}function zU(l){switch(l.tag){case 31:case 13:case 19:var u=l.stateNode;return u===null&&(u=l.stateNode=new CC),u;case 22:return l=l.stateNode,u=l._retryCache,u===null&&(u=l._retryCache=new CC),u;default:throw Error(a(435,l.tag))}}function Vf(l,u){var p=zU(l);u.forEach(function(v){if(!p.has(v)){p.add(v);var S=KU.bind(null,l,v);v.then(S,S)}})}function jr(l,u){var p=u.deletions;if(p!==null)for(var v=0;v<p.length;v++){var S=p[v],j=l,R=u,I=R;e:for(;I!==null;){switch(I.tag){case 27:if(Ci(I.type)){ut=I.stateNode,kr=!1;break e}break;case 5:ut=I.stateNode,kr=!1;break e;case 3:case 4:ut=I.stateNode.containerInfo,kr=!0;break e}I=I.return}if(ut===null)throw Error(a(160));NC(j,R,S),ut=null,kr=!1,j=S.alternate,j!==null&&(j.return=null),S.return=null}if(u.subtreeFlags&13886)for(u=u.child;u!==null;)PC(u,l),u=u.sibling}var An=null;function PC(l,u){var p=l.alternate,v=l.flags;switch(l.tag){case 0:case 11:case 14:case 15:jr(u,l),Ar(l),v&4&&(_i(3,l,l.return),eu(3,l),_i(5,l,l.return));break;case 1:jr(u,l),Ar(l),v&512&&(Ot||p===null||Un(p,p.return)),v&64&&Aa&&(l=l.updateQueue,l!==null&&(v=l.callbacks,v!==null&&(p=l.shared.hiddenCallbacks,l.shared.hiddenCallbacks=p===null?v:p.concat(v))));break;case 26:var S=An;if(jr(u,l),Ar(l),v&512&&(Ot||p===null||Un(p,p.return)),v&4){var j=p!==null?p.memoizedState:null;if(v=l.memoizedState,p===null)if(v===null)if(l.stateNode===null){e:{v=l.type,p=l.memoizedProps,S=S.ownerDocument||S;t:switch(v){case"title":j=S.getElementsByTagName("title")[0],(!j||j[Cs]||j[Yt]||j.namespaceURI==="http://www.w3.org/2000/svg"||j.hasAttribute("itemprop"))&&(j=S.createElement(v),S.head.insertBefore(j,S.querySelector("head > title"))),Qt(j,v,p),j[Yt]=l,Bt(j),v=j;break e;case"link":var R=PO("link","href",S).get(v+(p.href||""));if(R){for(var I=0;I<R.length;I++)if(j=R[I],j.getAttribute("href")===(p.href==null||p.href===""?null:p.href)&&j.getAttribute("rel")===(p.rel==null?null:p.rel)&&j.getAttribute("title")===(p.title==null?null:p.title)&&j.getAttribute("crossorigin")===(p.crossOrigin==null?null:p.crossOrigin)){R.splice(I,1);break t}}j=S.createElement(v),Qt(j,v,p),S.head.appendChild(j);break;case"meta":if(R=PO("meta","content",S).get(v+(p.content||""))){for(I=0;I<R.length;I++)if(j=R[I],j.getAttribute("content")===(p.content==null?null:""+p.content)&&j.getAttribute("name")===(p.name==null?null:p.name)&&j.getAttribute("property")===(p.property==null?null:p.property)&&j.getAttribute("http-equiv")===(p.httpEquiv==null?null:p.httpEquiv)&&j.getAttribute("charset")===(p.charSet==null?null:p.charSet)){R.splice(I,1);break t}}j=S.createElement(v),Qt(j,v,p),S.head.appendChild(j);break;default:throw Error(a(468,v))}j[Yt]=l,Bt(j),v=j}l.stateNode=v}else DO(S,l.type,l.stateNode);else l.stateNode=RO(S,v,l.memoizedProps);else j!==v?(j===null?p.stateNode!==null&&(p=p.stateNode,p.parentNode.removeChild(p)):j.count--,v===null?DO(S,l.type,l.stateNode):RO(S,v,l.memoizedProps)):v===null&&l.stateNode!==null&&ng(l,l.memoizedProps,p.memoizedProps)}break;case 27:jr(u,l),Ar(l),v&512&&(Ot||p===null||Un(p,p.return)),p!==null&&v&4&&ng(l,l.memoizedProps,p.memoizedProps);break;case 5:if(jr(u,l),Ar(l),v&512&&(Ot||p===null||Un(p,p.return)),l.flags&32){S=l.stateNode;try{rl(S,"")}catch(ke){Ye(l,l.return,ke)}}v&4&&l.stateNode!=null&&(S=l.memoizedProps,ng(l,S,p!==null?p.memoizedProps:S)),v&1024&&(og=!0);break;case 6:if(jr(u,l),Ar(l),v&4){if(l.stateNode===null)throw Error(a(162));v=l.memoizedProps,p=l.stateNode;try{p.nodeValue=v}catch(ke){Ye(l,l.return,ke)}}break;case 3:if(sd=null,S=An,An=od(u.containerInfo),jr(u,l),An=S,Ar(l),v&4&&p!==null&&p.memoizedState.isDehydrated)try{Rl(u.containerInfo)}catch(ke){Ye(l,l.return,ke)}og&&(og=!1,DC(l));break;case 4:v=An,An=od(l.stateNode.containerInfo),jr(u,l),Ar(l),An=v;break;case 12:jr(u,l),Ar(l);break;case 31:jr(u,l),Ar(l),v&4&&(v=l.updateQueue,v!==null&&(l.updateQueue=null,Vf(l,v)));break;case 13:jr(u,l),Ar(l),l.child.flags&8192&&l.memoizedState!==null!=(p!==null&&p.memoizedState!==null)&&(Yf=qt()),v&4&&(v=l.updateQueue,v!==null&&(l.updateQueue=null,Vf(l,v)));break;case 22:S=l.memoizedState!==null;var K=p!==null&&p.memoizedState!==null,oe=Aa,me=Ot;if(Aa=oe||S,Ot=me||K,jr(u,l),Ot=me,Aa=oe,Ar(l),v&8192)e:for(u=l.stateNode,u._visibility=S?u._visibility&-2:u._visibility|1,S&&(p===null||K||Aa||Ot||ho(l)),p=null,u=l;;){if(u.tag===5||u.tag===26){if(p===null){K=p=u;try{if(j=K.stateNode,S)R=j.style,typeof R.setProperty=="function"?R.setProperty("display","none","important"):R.display="none";else{I=K.stateNode;var ye=K.memoizedProps.style,ue=ye!=null&&ye.hasOwnProperty("display")?ye.display:null;I.style.display=ue==null||typeof ue=="boolean"?"":(""+ue).trim()}}catch(ke){Ye(K,K.return,ke)}}}else if(u.tag===6){if(p===null){K=u;try{K.stateNode.nodeValue=S?"":K.memoizedProps}catch(ke){Ye(K,K.return,ke)}}}else if(u.tag===18){if(p===null){K=u;try{var pe=K.stateNode;S?EO(pe,!0):EO(K.stateNode,!1)}catch(ke){Ye(K,K.return,ke)}}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===l)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===l)break e;for(;u.sibling===null;){if(u.return===null||u.return===l)break e;p===u&&(p=null),u=u.return}p===u&&(p=null),u.sibling.return=u.return,u=u.sibling}v&4&&(v=l.updateQueue,v!==null&&(p=v.retryQueue,p!==null&&(v.retryQueue=null,Vf(l,p))));break;case 19:jr(u,l),Ar(l),v&4&&(v=l.updateQueue,v!==null&&(l.updateQueue=null,Vf(l,v)));break;case 30:break;case 21:break;default:jr(u,l),Ar(l)}}function Ar(l){var u=l.flags;if(u&2){try{for(var p,v=l.return;v!==null;){if(jC(v)){p=v;break}v=v.return}if(p==null)throw Error(a(160));switch(p.tag){case 27:var S=p.stateNode,j=ag(l);Gf(l,j,S);break;case 5:var R=p.stateNode;p.flags&32&&(rl(R,""),p.flags&=-33);var I=ag(l);Gf(l,I,R);break;case 3:case 4:var K=p.stateNode.containerInfo,oe=ag(l);ig(l,oe,K);break;default:throw Error(a(161))}}catch(me){Ye(l,l.return,me)}l.flags&=-3}u&4096&&(l.flags&=-4097)}function DC(l){if(l.subtreeFlags&1024)for(l=l.child;l!==null;){var u=l;DC(u),u.tag===5&&u.flags&1024&&u.stateNode.reset(),l=l.sibling}}function Oa(l,u){if(u.subtreeFlags&8772)for(u=u.child;u!==null;)OC(l,u.alternate,u),u=u.sibling}function ho(l){for(l=l.child;l!==null;){var u=l;switch(u.tag){case 0:case 11:case 14:case 15:_i(4,u,u.return),ho(u);break;case 1:Un(u,u.return);var p=u.stateNode;typeof p.componentWillUnmount=="function"&&EC(u,u.return,p),ho(u);break;case 27:cu(u.stateNode);case 26:case 5:Un(u,u.return),ho(u);break;case 22:u.memoizedState===null&&ho(u);break;case 30:ho(u);break;default:ho(u)}l=l.sibling}}function Ta(l,u,p){for(p=p&&(u.subtreeFlags&8772)!==0,u=u.child;u!==null;){var v=u.alternate,S=l,j=u,R=j.flags;switch(j.tag){case 0:case 11:case 15:Ta(S,j,p),eu(4,j);break;case 1:if(Ta(S,j,p),v=j,S=v.stateNode,typeof S.componentDidMount=="function")try{S.componentDidMount()}catch(oe){Ye(v,v.return,oe)}if(v=j,S=v.updateQueue,S!==null){var I=v.stateNode;try{var K=S.shared.hiddenCallbacks;if(K!==null)for(S.shared.hiddenCallbacks=null,S=0;S<K.length;S++)dA(K[S],I)}catch(oe){Ye(v,v.return,oe)}}p&&R&64&&SC(j),tu(j,j.return);break;case 27:AC(j);case 26:case 5:Ta(S,j,p),p&&v===null&&R&4&&kC(j),tu(j,j.return);break;case 12:Ta(S,j,p);break;case 31:Ta(S,j,p),p&&R&4&&MC(S,j);break;case 13:Ta(S,j,p),p&&R&4&&RC(S,j);break;case 22:j.memoizedState===null&&Ta(S,j,p),tu(j,j.return);break;case 30:break;default:Ta(S,j,p)}u=u.sibling}}function lg(l,u){var p=null;l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(p=l.memoizedState.cachePool.pool),l=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(l=u.memoizedState.cachePool.pool),l!==p&&(l!=null&&l.refCount++,p!=null&&$s(p))}function sg(l,u){l=null,u.alternate!==null&&(l=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==l&&(u.refCount++,l!=null&&$s(l))}function Cn(l,u,p,v){if(u.subtreeFlags&10256)for(u=u.child;u!==null;)LC(l,u,p,v),u=u.sibling}function LC(l,u,p,v){var S=u.flags;switch(u.tag){case 0:case 11:case 15:Cn(l,u,p,v),S&2048&&eu(9,u);break;case 1:Cn(l,u,p,v);break;case 3:Cn(l,u,p,v),S&2048&&(l=null,u.alternate!==null&&(l=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==l&&(u.refCount++,l!=null&&$s(l)));break;case 12:if(S&2048){Cn(l,u,p,v),l=u.stateNode;try{var j=u.memoizedProps,R=j.id,I=j.onPostCommit;typeof I=="function"&&I(R,u.alternate===null?"mount":"update",l.passiveEffectDuration,-0)}catch(K){Ye(u,u.return,K)}}else Cn(l,u,p,v);break;case 31:Cn(l,u,p,v);break;case 13:Cn(l,u,p,v);break;case 23:break;case 22:j=u.stateNode,R=u.alternate,u.memoizedState!==null?j._visibility&2?Cn(l,u,p,v):ru(l,u):j._visibility&2?Cn(l,u,p,v):(j._visibility|=2,wl(l,u,p,v,(u.subtreeFlags&10256)!==0||!1)),S&2048&&lg(R,u);break;case 24:Cn(l,u,p,v),S&2048&&sg(u.alternate,u);break;default:Cn(l,u,p,v)}}function wl(l,u,p,v,S){for(S=S&&((u.subtreeFlags&10256)!==0||!1),u=u.child;u!==null;){var j=l,R=u,I=p,K=v,oe=R.flags;switch(R.tag){case 0:case 11:case 15:wl(j,R,I,K,S),eu(8,R);break;case 23:break;case 22:var me=R.stateNode;R.memoizedState!==null?me._visibility&2?wl(j,R,I,K,S):ru(j,R):(me._visibility|=2,wl(j,R,I,K,S)),S&&oe&2048&&lg(R.alternate,R);break;case 24:wl(j,R,I,K,S),S&&oe&2048&&sg(R.alternate,R);break;default:wl(j,R,I,K,S)}u=u.sibling}}function ru(l,u){if(u.subtreeFlags&10256)for(u=u.child;u!==null;){var p=l,v=u,S=v.flags;switch(v.tag){case 22:ru(p,v),S&2048&&lg(v.alternate,v);break;case 24:ru(p,v),S&2048&&sg(v.alternate,v);break;default:ru(p,v)}u=u.sibling}}var nu=8192;function Sl(l,u,p){if(l.subtreeFlags&nu)for(l=l.child;l!==null;)IC(l,u,p),l=l.sibling}function IC(l,u,p){switch(l.tag){case 26:Sl(l,u,p),l.flags&nu&&l.memoizedState!==null&&EH(p,An,l.memoizedState,l.memoizedProps);break;case 5:Sl(l,u,p);break;case 3:case 4:var v=An;An=od(l.stateNode.containerInfo),Sl(l,u,p),An=v;break;case 22:l.memoizedState===null&&(v=l.alternate,v!==null&&v.memoizedState!==null?(v=nu,nu=16777216,Sl(l,u,p),nu=v):Sl(l,u,p));break;default:Sl(l,u,p)}}function zC(l){var u=l.alternate;if(u!==null&&(l=u.child,l!==null)){u.child=null;do u=l.sibling,l.sibling=null,l=u;while(l!==null)}}function au(l){var u=l.deletions;if((l.flags&16)!==0){if(u!==null)for(var p=0;p<u.length;p++){var v=u[p];$t=v,BC(v,l)}zC(l)}if(l.subtreeFlags&10256)for(l=l.child;l!==null;)qC(l),l=l.sibling}function qC(l){switch(l.tag){case 0:case 11:case 15:au(l),l.flags&2048&&_i(9,l,l.return);break;case 3:au(l);break;case 12:au(l);break;case 22:var u=l.stateNode;l.memoizedState!==null&&u._visibility&2&&(l.return===null||l.return.tag!==13)?(u._visibility&=-3,Kf(l)):au(l);break;default:au(l)}}function Kf(l){var u=l.deletions;if((l.flags&16)!==0){if(u!==null)for(var p=0;p<u.length;p++){var v=u[p];$t=v,BC(v,l)}zC(l)}for(l=l.child;l!==null;){switch(u=l,u.tag){case 0:case 11:case 15:_i(8,u,u.return),Kf(u);break;case 22:p=u.stateNode,p._visibility&2&&(p._visibility&=-3,Kf(u));break;default:Kf(u)}l=l.sibling}}function BC(l,u){for(;$t!==null;){var p=$t;switch(p.tag){case 0:case 11:case 15:_i(8,p,u);break;case 23:case 22:if(p.memoizedState!==null&&p.memoizedState.cachePool!==null){var v=p.memoizedState.cachePool.pool;v!=null&&v.refCount++}break;case 24:$s(p.memoizedState.cache)}if(v=p.child,v!==null)v.return=p,$t=v;else e:for(p=l;$t!==null;){v=$t;var S=v.sibling,j=v.return;if(TC(v),v===p){$t=null;break e}if(S!==null){S.return=j,$t=S;break e}$t=j}}}var qU={getCacheForType:function(l){var u=Wt(jt),p=u.data.get(l);return p===void 0&&(p=l(),u.data.set(l,p)),p},cacheSignal:function(){return Wt(jt).controller.signal}},BU=typeof WeakMap=="function"?WeakMap:Map,Ge=0,et=null,Le=null,ze=0,Ke=0,Br=null,wi=!1,El=!1,ug=!1,Na=0,yt=0,Si=0,po=0,cg=0,$r=0,kl=0,iu=null,Cr=null,fg=!1,Yf=0,$C=0,Xf=1/0,Wf=null,Ei=null,Mt=0,ki=null,jl=null,Ma=0,dg=0,hg=null,FC=null,ou=0,pg=null;function Fr(){return(Ge&2)!==0&&ze!==0?ze&-ze:B.T!==null?xg():aj()}function UC(){if($r===0)if((ze&536870912)===0||Be){var l=nf;nf<<=1,(nf&3932160)===0&&(nf=262144),$r=l}else $r=536870912;return l=zr.current,l!==null&&(l.flags|=32),$r}function Or(l,u,p){(l===et&&(Ke===2||Ke===9)||l.cancelPendingCommit!==null)&&(Al(l,0),ji(l,ze,$r,!1)),As(l,p),((Ge&2)===0||l!==et)&&(l===et&&((Ge&2)===0&&(po|=p),yt===4&&ji(l,ze,$r,!1)),Hn(l))}function HC(l,u,p){if((Ge&6)!==0)throw Error(a(327));var v=!p&&(u&127)===0&&(u&l.expiredLanes)===0||js(l,u),S=v?UU(l,u):vg(l,u,!0),j=v;do{if(S===0){El&&!v&&ji(l,u,0,!1);break}else{if(p=l.current.alternate,j&&!$U(p)){S=vg(l,u,!1),j=!1;continue}if(S===2){if(j=u,l.errorRecoveryDisabledLanes&j)var R=0;else R=l.pendingLanes&-536870913,R=R!==0?R:R&536870912?536870912:0;if(R!==0){u=R;e:{var I=l;S=iu;var K=I.current.memoizedState.isDehydrated;if(K&&(Al(I,R).flags|=256),R=vg(I,R,!1),R!==2){if(ug&&!K){I.errorRecoveryDisabledLanes|=j,po|=j,S=4;break e}j=Cr,Cr=S,j!==null&&(Cr===null?Cr=j:Cr.push.apply(Cr,j))}S=R}if(j=!1,S!==2)continue}}if(S===1){Al(l,0),ji(l,u,0,!0);break}e:{switch(v=l,j=S,j){case 0:case 1:throw Error(a(345));case 4:if((u&4194048)!==u)break;case 6:ji(v,u,$r,!wi);break e;case 2:Cr=null;break;case 3:case 5:break;default:throw Error(a(329))}if((u&62914560)===u&&(S=Yf+300-qt(),10<S)){if(ji(v,u,$r,!wi),of(v,0,!0)!==0)break e;Ma=u,v.timeoutHandle=_O(GC.bind(null,v,p,Cr,Wf,fg,u,$r,po,kl,wi,j,"Throttled",-0,0),S);break e}GC(v,p,Cr,Wf,fg,u,$r,po,kl,wi,j,null,-0,0)}}break}while(!0);Hn(l)}function GC(l,u,p,v,S,j,R,I,K,oe,me,ye,ue,pe){if(l.timeoutHandle=-1,ye=u.subtreeFlags,ye&8192||(ye&16785408)===16785408){ye={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ga},IC(u,j,ye);var ke=(j&62914560)===j?Yf-qt():(j&4194048)===j?$C-qt():0;if(ke=kH(ye,ke),ke!==null){Ma=j,l.cancelPendingCommit=ke(JC.bind(null,l,u,j,p,v,S,R,I,K,me,ye,null,ue,pe)),ji(l,j,R,!oe);return}}JC(l,u,j,p,v,S,R,I,K)}function $U(l){for(var u=l;;){var p=u.tag;if((p===0||p===11||p===15)&&u.flags&16384&&(p=u.updateQueue,p!==null&&(p=p.stores,p!==null)))for(var v=0;v<p.length;v++){var S=p[v],j=S.getSnapshot;S=S.value;try{if(!Lr(j(),S))return!1}catch{return!1}}if(p=u.child,u.subtreeFlags&16384&&p!==null)p.return=u,u=p;else{if(u===l)break;for(;u.sibling===null;){if(u.return===null||u.return===l)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function ji(l,u,p,v){u&=~cg,u&=~po,l.suspendedLanes|=u,l.pingedLanes&=~u,v&&(l.warmLanes|=u),v=l.expirationTimes;for(var S=u;0<S;){var j=31-Dr(S),R=1<<j;v[j]=-1,S&=~R}p!==0&&tj(l,p,u)}function Zf(){return(Ge&6)===0?(lu(0),!1):!0}function mg(){if(Le!==null){if(Ke===0)var l=Le.return;else l=Le,_a=ao=null,Nv(l),gl=null,Us=0,l=Le;for(;l!==null;)wC(l.alternate,l),l=l.return;Le=null}}function Al(l,u){var p=l.timeoutHandle;p!==-1&&(l.timeoutHandle=-1,lH(p)),p=l.cancelPendingCommit,p!==null&&(l.cancelPendingCommit=null,p()),Ma=0,mg(),et=l,Le=p=ba(l.current,null),ze=u,Ke=0,Br=null,wi=!1,El=js(l,u),ug=!1,kl=$r=cg=po=Si=yt=0,Cr=iu=null,fg=!1,(u&8)!==0&&(u|=u&32);var v=l.entangledLanes;if(v!==0)for(l=l.entanglements,v&=u;0<v;){var S=31-Dr(v),j=1<<S;u|=l[S],v&=~j}return Na=u,yf(),p}function VC(l,u){Re=null,B.H=Zs,u===vl||u===jf?(u=sA(),Ke=3):u===bv?(u=sA(),Ke=4):Ke=u===Kv?8:u!==null&&typeof u=="object"&&typeof u.then=="function"?6:1,Br=u,Le===null&&(yt=1,Bf(l,en(u,l.current)))}function KC(){var l=zr.current;return l===null?!0:(ze&4194048)===ze?an===null:(ze&62914560)===ze||(ze&536870912)!==0?l===an:!1}function YC(){var l=B.H;return B.H=Zs,l===null?Zs:l}function XC(){var l=B.A;return B.A=qU,l}function Qf(){yt=4,wi||(ze&4194048)!==ze&&zr.current!==null||(El=!0),(Si&134217727)===0&&(po&134217727)===0||et===null||ji(et,ze,$r,!1)}function vg(l,u,p){var v=Ge;Ge|=2;var S=YC(),j=XC();(et!==l||ze!==u)&&(Wf=null,Al(l,u)),u=!1;var R=yt;e:do try{if(Ke!==0&&Le!==null){var I=Le,K=Br;switch(Ke){case 8:mg(),R=6;break e;case 3:case 2:case 9:case 6:zr.current===null&&(u=!0);var oe=Ke;if(Ke=0,Br=null,Cl(l,I,K,oe),p&&El){R=0;break e}break;default:oe=Ke,Ke=0,Br=null,Cl(l,I,K,oe)}}FU(),R=yt;break}catch(me){VC(l,me)}while(!0);return u&&l.shellSuspendCounter++,_a=ao=null,Ge=v,B.H=S,B.A=j,Le===null&&(et=null,ze=0,yf()),R}function FU(){for(;Le!==null;)WC(Le)}function UU(l,u){var p=Ge;Ge|=2;var v=YC(),S=XC();et!==l||ze!==u?(Wf=null,Xf=qt()+500,Al(l,u)):El=js(l,u);e:do try{if(Ke!==0&&Le!==null){u=Le;var j=Br;t:switch(Ke){case 1:Ke=0,Br=null,Cl(l,u,j,1);break;case 2:case 9:if(oA(j)){Ke=0,Br=null,ZC(u);break}u=function(){Ke!==2&&Ke!==9||et!==l||(Ke=7),Hn(l)},j.then(u,u);break e;case 3:Ke=7;break e;case 4:Ke=5;break e;case 7:oA(j)?(Ke=0,Br=null,ZC(u)):(Ke=0,Br=null,Cl(l,u,j,7));break;case 5:var R=null;switch(Le.tag){case 26:R=Le.memoizedState;case 5:case 27:var I=Le;if(R?LO(R):I.stateNode.complete){Ke=0,Br=null;var K=I.sibling;if(K!==null)Le=K;else{var oe=I.return;oe!==null?(Le=oe,Jf(oe)):Le=null}break t}}Ke=0,Br=null,Cl(l,u,j,5);break;case 6:Ke=0,Br=null,Cl(l,u,j,6);break;case 8:mg(),yt=6;break e;default:throw Error(a(462))}}HU();break}catch(me){VC(l,me)}while(!0);return _a=ao=null,B.H=v,B.A=S,Ge=p,Le!==null?0:(et=null,ze=0,yf(),yt)}function HU(){for(;Le!==null&&!Wr();)WC(Le)}function WC(l){var u=xC(l.alternate,l,Na);l.memoizedProps=l.pendingProps,u===null?Jf(l):Le=u}function ZC(l){var u=l,p=u.alternate;switch(u.tag){case 15:case 0:u=pC(p,u,u.pendingProps,u.type,void 0,ze);break;case 11:u=pC(p,u,u.pendingProps,u.type.render,u.ref,ze);break;case 5:Nv(u);default:wC(p,u),u=Le=Xj(u,Na),u=xC(p,u,Na)}l.memoizedProps=l.pendingProps,u===null?Jf(l):Le=u}function Cl(l,u,p,v){_a=ao=null,Nv(u),gl=null,Us=0;var S=u.return;try{if(MU(l,S,u,p,ze)){yt=1,Bf(l,en(p,l.current)),Le=null;return}}catch(j){if(S!==null)throw Le=S,j;yt=1,Bf(l,en(p,l.current)),Le=null;return}u.flags&32768?(Be||v===1?l=!0:El||(ze&536870912)!==0?l=!1:(wi=l=!0,(v===2||v===9||v===3||v===6)&&(v=zr.current,v!==null&&v.tag===13&&(v.flags|=16384))),QC(u,l)):Jf(u)}function Jf(l){var u=l;do{if((u.flags&32768)!==0){QC(u,wi);return}l=u.return;var p=DU(u.alternate,u,Na);if(p!==null){Le=p;return}if(u=u.sibling,u!==null){Le=u;return}Le=u=l}while(u!==null);yt===0&&(yt=5)}function QC(l,u){do{var p=LU(l.alternate,l);if(p!==null){p.flags&=32767,Le=p;return}if(p=l.return,p!==null&&(p.flags|=32768,p.subtreeFlags=0,p.deletions=null),!u&&(l=l.sibling,l!==null)){Le=l;return}Le=l=p}while(l!==null);yt=6,Le=null}function JC(l,u,p,v,S,j,R,I,K){l.cancelPendingCommit=null;do ed();while(Mt!==0);if((Ge&6)!==0)throw Error(a(327));if(u!==null){if(u===l.current)throw Error(a(177));if(j=u.lanes|u.childLanes,j|=av,SF(l,p,j,R,I,K),l===et&&(Le=et=null,ze=0),jl=u,ki=l,Ma=p,dg=j,hg=S,FC=v,(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?(l.callbackNode=null,l.callbackPriority=0,YU(kn,function(){return aO(),null})):(l.callbackNode=null,l.callbackPriority=0),v=(u.flags&13878)!==0,(u.subtreeFlags&13878)!==0||v){v=B.T,B.T=null,S=Z.p,Z.p=2,R=Ge,Ge|=4;try{IU(l,u,p)}finally{Ge=R,Z.p=S,B.T=v}}Mt=1,eO(),tO(),rO()}}function eO(){if(Mt===1){Mt=0;var l=ki,u=jl,p=(u.flags&13878)!==0;if((u.subtreeFlags&13878)!==0||p){p=B.T,B.T=null;var v=Z.p;Z.p=2;var S=Ge;Ge|=4;try{PC(u,l);var j=Cg,R=Bj(l.containerInfo),I=j.focusedElem,K=j.selectionRange;if(R!==I&&I&&I.ownerDocument&&qj(I.ownerDocument.documentElement,I)){if(K!==null&&Jm(I)){var oe=K.start,me=K.end;if(me===void 0&&(me=oe),"selectionStart"in I)I.selectionStart=oe,I.selectionEnd=Math.min(me,I.value.length);else{var ye=I.ownerDocument||document,ue=ye&&ye.defaultView||window;if(ue.getSelection){var pe=ue.getSelection(),ke=I.textContent.length,Ne=Math.min(K.start,ke),Ze=K.end===void 0?Ne:Math.min(K.end,ke);!pe.extend&&Ne>Ze&&(R=Ze,Ze=Ne,Ne=R);var re=zj(I,Ne),Q=zj(I,Ze);if(re&&Q&&(pe.rangeCount!==1||pe.anchorNode!==re.node||pe.anchorOffset!==re.offset||pe.focusNode!==Q.node||pe.focusOffset!==Q.offset)){var ie=ye.createRange();ie.setStart(re.node,re.offset),pe.removeAllRanges(),Ne>Ze?(pe.addRange(ie),pe.extend(Q.node,Q.offset)):(ie.setEnd(Q.node,Q.offset),pe.addRange(ie))}}}}for(ye=[],pe=I;pe=pe.parentNode;)pe.nodeType===1&&ye.push({element:pe,left:pe.scrollLeft,top:pe.scrollTop});for(typeof I.focus=="function"&&I.focus(),I=0;I<ye.length;I++){var ve=ye[I];ve.element.scrollLeft=ve.left,ve.element.scrollTop=ve.top}}dd=!!Ag,Cg=Ag=null}finally{Ge=S,Z.p=v,B.T=p}}l.current=u,Mt=2}}function tO(){if(Mt===2){Mt=0;var l=ki,u=jl,p=(u.flags&8772)!==0;if((u.subtreeFlags&8772)!==0||p){p=B.T,B.T=null;var v=Z.p;Z.p=2;var S=Ge;Ge|=4;try{OC(l,u.alternate,u)}finally{Ge=S,Z.p=v,B.T=p}}Mt=3}}function rO(){if(Mt===4||Mt===3){Mt=0,ir();var l=ki,u=jl,p=Ma,v=FC;(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?Mt=5:(Mt=0,jl=ki=null,nO(l,l.pendingLanes));var S=l.pendingLanes;if(S===0&&(Ei=null),Pm(p),u=u.stateNode,wt&&typeof wt.onCommitFiberRoot=="function")try{wt.onCommitFiberRoot(wr,u,void 0,(u.current.flags&128)===128)}catch{}if(v!==null){u=B.T,S=Z.p,Z.p=2,B.T=null;try{for(var j=l.onRecoverableError,R=0;R<v.length;R++){var I=v[R];j(I.value,{componentStack:I.stack})}}finally{B.T=u,Z.p=S}}(Ma&3)!==0&&ed(),Hn(l),S=l.pendingLanes,(p&261930)!==0&&(S&42)!==0?l===pg?ou++:(ou=0,pg=l):ou=0,lu(0)}}function nO(l,u){(l.pooledCacheLanes&=u)===0&&(u=l.pooledCache,u!=null&&(l.pooledCache=null,$s(u)))}function ed(){return eO(),tO(),rO(),aO()}function aO(){if(Mt!==5)return!1;var l=ki,u=dg;dg=0;var p=Pm(Ma),v=B.T,S=Z.p;try{Z.p=32>p?32:p,B.T=null,p=hg,hg=null;var j=ki,R=Ma;if(Mt=0,jl=ki=null,Ma=0,(Ge&6)!==0)throw Error(a(331));var I=Ge;if(Ge|=4,qC(j.current),LC(j,j.current,R,p),Ge=I,lu(0,!1),wt&&typeof wt.onPostCommitFiberRoot=="function")try{wt.onPostCommitFiberRoot(wr,j)}catch{}return!0}finally{Z.p=S,B.T=v,nO(l,u)}}function iO(l,u,p){u=en(p,u),u=Vv(l.stateNode,u,2),l=yi(l,u,2),l!==null&&(As(l,2),Hn(l))}function Ye(l,u,p){if(l.tag===3)iO(l,l,p);else for(;u!==null;){if(u.tag===3){iO(u,l,p);break}else if(u.tag===1){var v=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&(Ei===null||!Ei.has(v))){l=en(p,l),p=oC(2),v=yi(u,p,2),v!==null&&(lC(p,v,u,l),As(v,2),Hn(v));break}}u=u.return}}function gg(l,u,p){var v=l.pingCache;if(v===null){v=l.pingCache=new BU;var S=new Set;v.set(u,S)}else S=v.get(u),S===void 0&&(S=new Set,v.set(u,S));S.has(p)||(ug=!0,S.add(p),l=GU.bind(null,l,u,p),u.then(l,l))}function GU(l,u,p){var v=l.pingCache;v!==null&&v.delete(u),l.pingedLanes|=l.suspendedLanes&p,l.warmLanes&=~p,et===l&&(ze&p)===p&&(yt===4||yt===3&&(ze&62914560)===ze&&300>qt()-Yf?(Ge&2)===0&&Al(l,0):cg|=p,kl===ze&&(kl=0)),Hn(l)}function oO(l,u){u===0&&(u=ej()),l=to(l,u),l!==null&&(As(l,u),Hn(l))}function VU(l){var u=l.memoizedState,p=0;u!==null&&(p=u.retryLane),oO(l,p)}function KU(l,u){var p=0;switch(l.tag){case 31:case 13:var v=l.stateNode,S=l.memoizedState;S!==null&&(p=S.retryLane);break;case 19:v=l.stateNode;break;case 22:v=l.stateNode._retryCache;break;default:throw Error(a(314))}v!==null&&v.delete(u),oO(l,p)}function YU(l,u){return ma(l,u)}var td=null,Ol=null,yg=!1,rd=!1,bg=!1,Ai=0;function Hn(l){l!==Ol&&l.next===null&&(Ol===null?td=Ol=l:Ol=Ol.next=l),rd=!0,yg||(yg=!0,WU())}function lu(l,u){if(!bg&&rd){bg=!0;do for(var p=!1,v=td;v!==null;){if(l!==0){var S=v.pendingLanes;if(S===0)var j=0;else{var R=v.suspendedLanes,I=v.pingedLanes;j=(1<<31-Dr(42|l)+1)-1,j&=S&~(R&~I),j=j&201326741?j&201326741|1:j?j|2:0}j!==0&&(p=!0,cO(v,j))}else j=ze,j=of(v,v===et?j:0,v.cancelPendingCommit!==null||v.timeoutHandle!==-1),(j&3)===0||js(v,j)||(p=!0,cO(v,j));v=v.next}while(p);bg=!1}}function XU(){lO()}function lO(){rd=yg=!1;var l=0;Ai!==0&&oH()&&(l=Ai);for(var u=qt(),p=null,v=td;v!==null;){var S=v.next,j=sO(v,u);j===0?(v.next=null,p===null?td=S:p.next=S,S===null&&(Ol=p)):(p=v,(l!==0||(j&3)!==0)&&(rd=!0)),v=S}Mt!==0&&Mt!==5||lu(l),Ai!==0&&(Ai=0)}function sO(l,u){for(var p=l.suspendedLanes,v=l.pingedLanes,S=l.expirationTimes,j=l.pendingLanes&-62914561;0<j;){var R=31-Dr(j),I=1<<R,K=S[R];K===-1?((I&p)===0||(I&v)!==0)&&(S[R]=wF(I,u)):K<=u&&(l.expiredLanes|=I),j&=~I}if(u=et,p=ze,p=of(l,l===u?p:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),v=l.callbackNode,p===0||l===u&&(Ke===2||Ke===9)||l.cancelPendingCommit!==null)return v!==null&&v!==null&&_t(v),l.callbackNode=null,l.callbackPriority=0;if((p&3)===0||js(l,p)){if(u=p&-p,u===l.callbackPriority)return u;switch(v!==null&&_t(v),Pm(p)){case 2:case 8:p=Es;break;case 32:p=kn;break;case 268435456:p=ks;break;default:p=kn}return v=uO.bind(null,l),p=ma(p,v),l.callbackPriority=u,l.callbackNode=p,u}return v!==null&&v!==null&&_t(v),l.callbackPriority=2,l.callbackNode=null,2}function uO(l,u){if(Mt!==0&&Mt!==5)return l.callbackNode=null,l.callbackPriority=0,null;var p=l.callbackNode;if(ed()&&l.callbackNode!==p)return null;var v=ze;return v=of(l,l===et?v:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),v===0?null:(HC(l,v,u),sO(l,qt()),l.callbackNode!=null&&l.callbackNode===p?uO.bind(null,l):null)}function cO(l,u){if(ed())return null;HC(l,u,!0)}function WU(){sH(function(){(Ge&6)!==0?ma(Jc,XU):lO()})}function xg(){if(Ai===0){var l=pl;l===0&&(l=rf,rf<<=1,(rf&261888)===0&&(rf=256)),Ai=l}return Ai}function fO(l){return l==null||typeof l=="symbol"||typeof l=="boolean"?null:typeof l=="function"?l:cf(""+l)}function dO(l,u){var p=u.ownerDocument.createElement("input");return p.name=u.name,p.value=u.value,l.id&&p.setAttribute("form",l.id),u.parentNode.insertBefore(p,u),l=new FormData(l),p.parentNode.removeChild(p),l}function ZU(l,u,p,v,S){if(u==="submit"&&p&&p.stateNode===S){var j=fO((S[Sr]||null).action),R=v.submitter;R&&(u=(u=R[Sr]||null)?fO(u.formAction):R.getAttribute("formAction"),u!==null&&(j=u,R=null));var I=new pf("action","action",null,v,S);l.push({event:I,listeners:[{instance:null,listener:function(){if(v.defaultPrevented){if(Ai!==0){var K=R?dO(S,R):new FormData(S);Bv(p,{pending:!0,data:K,method:S.method,action:j},null,K)}}else typeof j=="function"&&(I.preventDefault(),K=R?dO(S,R):new FormData(S),Bv(p,{pending:!0,data:K,method:S.method,action:j},j,K))},currentTarget:S}]})}}for(var _g=0;_g<nv.length;_g++){var wg=nv[_g],QU=wg.toLowerCase(),JU=wg[0].toUpperCase()+wg.slice(1);jn(QU,"on"+JU)}jn(Uj,"onAnimationEnd"),jn(Hj,"onAnimationIteration"),jn(Gj,"onAnimationStart"),jn("dblclick","onDoubleClick"),jn("focusin","onFocus"),jn("focusout","onBlur"),jn(mU,"onTransitionRun"),jn(vU,"onTransitionStart"),jn(gU,"onTransitionCancel"),jn(Vj,"onTransitionEnd"),el("onMouseEnter",["mouseout","mouseover"]),el("onMouseLeave",["mouseout","mouseover"]),el("onPointerEnter",["pointerout","pointerover"]),el("onPointerLeave",["pointerout","pointerover"]),Zi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Zi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Zi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Zi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Zi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Zi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var su="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),eH=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(su));function hO(l,u){u=(u&4)!==0;for(var p=0;p<l.length;p++){var v=l[p],S=v.event;v=v.listeners;e:{var j=void 0;if(u)for(var R=v.length-1;0<=R;R--){var I=v[R],K=I.instance,oe=I.currentTarget;if(I=I.listener,K!==j&&S.isPropagationStopped())break e;j=I,S.currentTarget=oe;try{j(S)}catch(me){gf(me)}S.currentTarget=null,j=K}else for(R=0;R<v.length;R++){if(I=v[R],K=I.instance,oe=I.currentTarget,I=I.listener,K!==j&&S.isPropagationStopped())break e;j=I,S.currentTarget=oe;try{j(S)}catch(me){gf(me)}S.currentTarget=null,j=K}}}}function Ie(l,u){var p=u[Dm];p===void 0&&(p=u[Dm]=new Set);var v=l+"__bubble";p.has(v)||(pO(u,l,2,!1),p.add(v))}function Sg(l,u,p){var v=0;u&&(v|=4),pO(p,l,v,u)}var nd="_reactListening"+Math.random().toString(36).slice(2);function Eg(l){if(!l[nd]){l[nd]=!0,lj.forEach(function(p){p!=="selectionchange"&&(eH.has(p)||Sg(p,!1,l),Sg(p,!0,l))});var u=l.nodeType===9?l:l.ownerDocument;u===null||u[nd]||(u[nd]=!0,Sg("selectionchange",!1,u))}}function pO(l,u,p,v){switch(UO(u)){case 2:var S=CH;break;case 8:S=OH;break;default:S=qg}p=S.bind(null,u,p,l),S=void 0,!Hm||u!=="touchstart"&&u!=="touchmove"&&u!=="wheel"||(S=!0),v?S!==void 0?l.addEventListener(u,p,{capture:!0,passive:S}):l.addEventListener(u,p,!0):S!==void 0?l.addEventListener(u,p,{passive:S}):l.addEventListener(u,p,!1)}function kg(l,u,p,v,S){var j=v;if((u&1)===0&&(u&2)===0&&v!==null)e:for(;;){if(v===null)return;var R=v.tag;if(R===3||R===4){var I=v.stateNode.containerInfo;if(I===S)break;if(R===4)for(R=v.return;R!==null;){var K=R.tag;if((K===3||K===4)&&R.stateNode.containerInfo===S)return;R=R.return}for(;I!==null;){if(R=Zo(I),R===null)return;if(K=R.tag,K===5||K===6||K===26||K===27){v=j=R;continue e}I=I.parentNode}}v=v.return}bj(function(){var oe=j,me=Fm(p),ye=[];e:{var ue=Kj.get(l);if(ue!==void 0){var pe=pf,ke=l;switch(l){case"keypress":if(df(p)===0)break e;case"keydown":case"keyup":pe=KF;break;case"focusin":ke="focus",pe=Ym;break;case"focusout":ke="blur",pe=Ym;break;case"beforeblur":case"afterblur":pe=Ym;break;case"click":if(p.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":pe=wj;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":pe=DF;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":pe=WF;break;case Uj:case Hj:case Gj:pe=zF;break;case Vj:pe=QF;break;case"scroll":case"scrollend":pe=RF;break;case"wheel":pe=eU;break;case"copy":case"cut":case"paste":pe=BF;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":pe=Ej;break;case"toggle":case"beforetoggle":pe=rU}var Ne=(u&4)!==0,Ze=!Ne&&(l==="scroll"||l==="scrollend"),re=Ne?ue!==null?ue+"Capture":null:ue;Ne=[];for(var Q=oe,ie;Q!==null;){var ve=Q;if(ie=ve.stateNode,ve=ve.tag,ve!==5&&ve!==26&&ve!==27||ie===null||re===null||(ve=Ts(Q,re),ve!=null&&Ne.push(uu(Q,ve,ie))),Ze)break;Q=Q.return}0<Ne.length&&(ue=new pe(ue,ke,null,p,me),ye.push({event:ue,listeners:Ne}))}}if((u&7)===0){e:{if(ue=l==="mouseover"||l==="pointerover",pe=l==="mouseout"||l==="pointerout",ue&&p!==$m&&(ke=p.relatedTarget||p.fromElement)&&(Zo(ke)||ke[Wo]))break e;if((pe||ue)&&(ue=me.window===me?me:(ue=me.ownerDocument)?ue.defaultView||ue.parentWindow:window,pe?(ke=p.relatedTarget||p.toElement,pe=oe,ke=ke?Zo(ke):null,ke!==null&&(Ze=o(ke),Ne=ke.tag,ke!==Ze||Ne!==5&&Ne!==27&&Ne!==6)&&(ke=null)):(pe=null,ke=oe),pe!==ke)){if(Ne=wj,ve="onMouseLeave",re="onMouseEnter",Q="mouse",(l==="pointerout"||l==="pointerover")&&(Ne=Ej,ve="onPointerLeave",re="onPointerEnter",Q="pointer"),Ze=pe==null?ue:Os(pe),ie=ke==null?ue:Os(ke),ue=new Ne(ve,Q+"leave",pe,p,me),ue.target=Ze,ue.relatedTarget=ie,ve=null,Zo(me)===oe&&(Ne=new Ne(re,Q+"enter",ke,p,me),Ne.target=ie,Ne.relatedTarget=Ze,ve=Ne),Ze=ve,pe&&ke)t:{for(Ne=tH,re=pe,Q=ke,ie=0,ve=re;ve;ve=Ne(ve))ie++;ve=0;for(var Te=Q;Te;Te=Ne(Te))ve++;for(;0<ie-ve;)re=Ne(re),ie--;for(;0<ve-ie;)Q=Ne(Q),ve--;for(;ie--;){if(re===Q||Q!==null&&re===Q.alternate){Ne=re;break t}re=Ne(re),Q=Ne(Q)}Ne=null}else Ne=null;pe!==null&&mO(ye,ue,pe,Ne,!1),ke!==null&&Ze!==null&&mO(ye,Ze,ke,Ne,!0)}}e:{if(ue=oe?Os(oe):window,pe=ue.nodeName&&ue.nodeName.toLowerCase(),pe==="select"||pe==="input"&&ue.type==="file")var Fe=Mj;else if(Tj(ue))if(Rj)Fe=dU;else{Fe=cU;var je=uU}else pe=ue.nodeName,!pe||pe.toLowerCase()!=="input"||ue.type!=="checkbox"&&ue.type!=="radio"?oe&&Bm(oe.elementType)&&(Fe=Mj):Fe=fU;if(Fe&&(Fe=Fe(l,oe))){Nj(ye,Fe,p,me);break e}je&&je(l,ue,oe),l==="focusout"&&oe&&ue.type==="number"&&oe.memoizedProps.value!=null&&qm(ue,"number",ue.value)}switch(je=oe?Os(oe):window,l){case"focusin":(Tj(je)||je.contentEditable==="true")&&(ol=je,ev=oe,zs=null);break;case"focusout":zs=ev=ol=null;break;case"mousedown":tv=!0;break;case"contextmenu":case"mouseup":case"dragend":tv=!1,$j(ye,p,me);break;case"selectionchange":if(pU)break;case"keydown":case"keyup":$j(ye,p,me)}var Pe;if(Wm)e:{switch(l){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else il?Cj(l,p)&&(qe="onCompositionEnd"):l==="keydown"&&p.keyCode===229&&(qe="onCompositionStart");qe&&(kj&&p.locale!=="ko"&&(il||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&il&&(Pe=xj()):(fi=me,Gm="value"in fi?fi.value:fi.textContent,il=!0)),je=ad(oe,qe),0<je.length&&(qe=new Sj(qe,l,null,p,me),ye.push({event:qe,listeners:je}),Pe?qe.data=Pe:(Pe=Oj(p),Pe!==null&&(qe.data=Pe)))),(Pe=aU?iU(l,p):oU(l,p))&&(qe=ad(oe,"onBeforeInput"),0<qe.length&&(je=new Sj("onBeforeInput","beforeinput",null,p,me),ye.push({event:je,listeners:qe}),je.data=Pe)),ZU(ye,l,oe,p,me)}hO(ye,u)})}function uu(l,u,p){return{instance:l,listener:u,currentTarget:p}}function ad(l,u){for(var p=u+"Capture",v=[];l!==null;){var S=l,j=S.stateNode;if(S=S.tag,S!==5&&S!==26&&S!==27||j===null||(S=Ts(l,p),S!=null&&v.unshift(uu(l,S,j)),S=Ts(l,u),S!=null&&v.push(uu(l,S,j))),l.tag===3)return v;l=l.return}return[]}function tH(l){if(l===null)return null;do l=l.return;while(l&&l.tag!==5&&l.tag!==27);return l||null}function mO(l,u,p,v,S){for(var j=u._reactName,R=[];p!==null&&p!==v;){var I=p,K=I.alternate,oe=I.stateNode;if(I=I.tag,K!==null&&K===v)break;I!==5&&I!==26&&I!==27||oe===null||(K=oe,S?(oe=Ts(p,j),oe!=null&&R.unshift(uu(p,oe,K))):S||(oe=Ts(p,j),oe!=null&&R.push(uu(p,oe,K)))),p=p.return}R.length!==0&&l.push({event:u,listeners:R})}var rH=/\r\n?/g,nH=/\u0000|\uFFFD/g;function vO(l){return(typeof l=="string"?l:""+l).replace(rH,`
49
+ `).replace(nH,"")}function gO(l,u){return u=vO(u),vO(l)===u}function We(l,u,p,v,S,j){switch(p){case"children":typeof v=="string"?u==="body"||u==="textarea"&&v===""||rl(l,v):(typeof v=="number"||typeof v=="bigint")&&u!=="body"&&rl(l,""+v);break;case"className":sf(l,"class",v);break;case"tabIndex":sf(l,"tabindex",v);break;case"dir":case"role":case"viewBox":case"width":case"height":sf(l,p,v);break;case"style":gj(l,v,j);break;case"data":if(u!=="object"){sf(l,"data",v);break}case"src":case"href":if(v===""&&(u!=="a"||p!=="href")){l.removeAttribute(p);break}if(v==null||typeof v=="function"||typeof v=="symbol"||typeof v=="boolean"){l.removeAttribute(p);break}v=cf(""+v),l.setAttribute(p,v);break;case"action":case"formAction":if(typeof v=="function"){l.setAttribute(p,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof j=="function"&&(p==="formAction"?(u!=="input"&&We(l,u,"name",S.name,S,null),We(l,u,"formEncType",S.formEncType,S,null),We(l,u,"formMethod",S.formMethod,S,null),We(l,u,"formTarget",S.formTarget,S,null)):(We(l,u,"encType",S.encType,S,null),We(l,u,"method",S.method,S,null),We(l,u,"target",S.target,S,null)));if(v==null||typeof v=="symbol"||typeof v=="boolean"){l.removeAttribute(p);break}v=cf(""+v),l.setAttribute(p,v);break;case"onClick":v!=null&&(l.onclick=ga);break;case"onScroll":v!=null&&Ie("scroll",l);break;case"onScrollEnd":v!=null&&Ie("scrollend",l);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(a(61));if(p=v.__html,p!=null){if(S.children!=null)throw Error(a(60));l.innerHTML=p}}break;case"multiple":l.multiple=v&&typeof v!="function"&&typeof v!="symbol";break;case"muted":l.muted=v&&typeof v!="function"&&typeof v!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(v==null||typeof v=="function"||typeof v=="boolean"||typeof v=="symbol"){l.removeAttribute("xlink:href");break}p=cf(""+v),l.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",p);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":v!=null&&typeof v!="function"&&typeof v!="symbol"?l.setAttribute(p,""+v):l.removeAttribute(p);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":v&&typeof v!="function"&&typeof v!="symbol"?l.setAttribute(p,""):l.removeAttribute(p);break;case"capture":case"download":v===!0?l.setAttribute(p,""):v!==!1&&v!=null&&typeof v!="function"&&typeof v!="symbol"?l.setAttribute(p,v):l.removeAttribute(p);break;case"cols":case"rows":case"size":case"span":v!=null&&typeof v!="function"&&typeof v!="symbol"&&!isNaN(v)&&1<=v?l.setAttribute(p,v):l.removeAttribute(p);break;case"rowSpan":case"start":v==null||typeof v=="function"||typeof v=="symbol"||isNaN(v)?l.removeAttribute(p):l.setAttribute(p,v);break;case"popover":Ie("beforetoggle",l),Ie("toggle",l),lf(l,"popover",v);break;case"xlinkActuate":va(l,"http://www.w3.org/1999/xlink","xlink:actuate",v);break;case"xlinkArcrole":va(l,"http://www.w3.org/1999/xlink","xlink:arcrole",v);break;case"xlinkRole":va(l,"http://www.w3.org/1999/xlink","xlink:role",v);break;case"xlinkShow":va(l,"http://www.w3.org/1999/xlink","xlink:show",v);break;case"xlinkTitle":va(l,"http://www.w3.org/1999/xlink","xlink:title",v);break;case"xlinkType":va(l,"http://www.w3.org/1999/xlink","xlink:type",v);break;case"xmlBase":va(l,"http://www.w3.org/XML/1998/namespace","xml:base",v);break;case"xmlLang":va(l,"http://www.w3.org/XML/1998/namespace","xml:lang",v);break;case"xmlSpace":va(l,"http://www.w3.org/XML/1998/namespace","xml:space",v);break;case"is":lf(l,"is",v);break;case"innerText":case"textContent":break;default:(!(2<p.length)||p[0]!=="o"&&p[0]!=="O"||p[1]!=="n"&&p[1]!=="N")&&(p=NF.get(p)||p,lf(l,p,v))}}function jg(l,u,p,v,S,j){switch(p){case"style":gj(l,v,j);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(a(61));if(p=v.__html,p!=null){if(S.children!=null)throw Error(a(60));l.innerHTML=p}}break;case"children":typeof v=="string"?rl(l,v):(typeof v=="number"||typeof v=="bigint")&&rl(l,""+v);break;case"onScroll":v!=null&&Ie("scroll",l);break;case"onScrollEnd":v!=null&&Ie("scrollend",l);break;case"onClick":v!=null&&(l.onclick=ga);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!sj.hasOwnProperty(p))e:{if(p[0]==="o"&&p[1]==="n"&&(S=p.endsWith("Capture"),u=p.slice(2,S?p.length-7:void 0),j=l[Sr]||null,j=j!=null?j[p]:null,typeof j=="function"&&l.removeEventListener(u,j,S),typeof v=="function")){typeof j!="function"&&j!==null&&(p in l?l[p]=null:l.hasAttribute(p)&&l.removeAttribute(p)),l.addEventListener(u,v,S);break e}p in l?l[p]=v:v===!0?l.setAttribute(p,""):lf(l,p,v)}}}function Qt(l,u,p){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ie("error",l),Ie("load",l);var v=!1,S=!1,j;for(j in p)if(p.hasOwnProperty(j)){var R=p[j];if(R!=null)switch(j){case"src":v=!0;break;case"srcSet":S=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,u));default:We(l,u,j,R,p,null)}}S&&We(l,u,"srcSet",p.srcSet,p,null),v&&We(l,u,"src",p.src,p,null);return;case"input":Ie("invalid",l);var I=j=R=S=null,K=null,oe=null;for(v in p)if(p.hasOwnProperty(v)){var me=p[v];if(me!=null)switch(v){case"name":S=me;break;case"type":R=me;break;case"checked":K=me;break;case"defaultChecked":oe=me;break;case"value":j=me;break;case"defaultValue":I=me;break;case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(a(137,u));break;default:We(l,u,v,me,p,null)}}hj(l,j,I,K,oe,R,S,!1);return;case"select":Ie("invalid",l),v=R=j=null;for(S in p)if(p.hasOwnProperty(S)&&(I=p[S],I!=null))switch(S){case"value":j=I;break;case"defaultValue":R=I;break;case"multiple":v=I;default:We(l,u,S,I,p,null)}u=j,p=R,l.multiple=!!v,u!=null?tl(l,!!v,u,!1):p!=null&&tl(l,!!v,p,!0);return;case"textarea":Ie("invalid",l),j=S=v=null;for(R in p)if(p.hasOwnProperty(R)&&(I=p[R],I!=null))switch(R){case"value":v=I;break;case"defaultValue":S=I;break;case"children":j=I;break;case"dangerouslySetInnerHTML":if(I!=null)throw Error(a(91));break;default:We(l,u,R,I,p,null)}mj(l,v,S,j);return;case"option":for(K in p)if(p.hasOwnProperty(K)&&(v=p[K],v!=null))switch(K){case"selected":l.selected=v&&typeof v!="function"&&typeof v!="symbol";break;default:We(l,u,K,v,p,null)}return;case"dialog":Ie("beforetoggle",l),Ie("toggle",l),Ie("cancel",l),Ie("close",l);break;case"iframe":case"object":Ie("load",l);break;case"video":case"audio":for(v=0;v<su.length;v++)Ie(su[v],l);break;case"image":Ie("error",l),Ie("load",l);break;case"details":Ie("toggle",l);break;case"embed":case"source":case"link":Ie("error",l),Ie("load",l);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(oe in p)if(p.hasOwnProperty(oe)&&(v=p[oe],v!=null))switch(oe){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,u));default:We(l,u,oe,v,p,null)}return;default:if(Bm(u)){for(me in p)p.hasOwnProperty(me)&&(v=p[me],v!==void 0&&jg(l,u,me,v,p,void 0));return}}for(I in p)p.hasOwnProperty(I)&&(v=p[I],v!=null&&We(l,u,I,v,p,null))}function aH(l,u,p,v){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var S=null,j=null,R=null,I=null,K=null,oe=null,me=null;for(pe in p){var ye=p[pe];if(p.hasOwnProperty(pe)&&ye!=null)switch(pe){case"checked":break;case"value":break;case"defaultValue":K=ye;default:v.hasOwnProperty(pe)||We(l,u,pe,null,v,ye)}}for(var ue in v){var pe=v[ue];if(ye=p[ue],v.hasOwnProperty(ue)&&(pe!=null||ye!=null))switch(ue){case"type":j=pe;break;case"name":S=pe;break;case"checked":oe=pe;break;case"defaultChecked":me=pe;break;case"value":R=pe;break;case"defaultValue":I=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(a(137,u));break;default:pe!==ye&&We(l,u,ue,pe,v,ye)}}zm(l,R,I,K,oe,me,j,S);return;case"select":pe=R=I=ue=null;for(j in p)if(K=p[j],p.hasOwnProperty(j)&&K!=null)switch(j){case"value":break;case"multiple":pe=K;default:v.hasOwnProperty(j)||We(l,u,j,null,v,K)}for(S in v)if(j=v[S],K=p[S],v.hasOwnProperty(S)&&(j!=null||K!=null))switch(S){case"value":ue=j;break;case"defaultValue":I=j;break;case"multiple":R=j;default:j!==K&&We(l,u,S,j,v,K)}u=I,p=R,v=pe,ue!=null?tl(l,!!p,ue,!1):!!v!=!!p&&(u!=null?tl(l,!!p,u,!0):tl(l,!!p,p?[]:"",!1));return;case"textarea":pe=ue=null;for(I in p)if(S=p[I],p.hasOwnProperty(I)&&S!=null&&!v.hasOwnProperty(I))switch(I){case"value":break;case"children":break;default:We(l,u,I,null,v,S)}for(R in v)if(S=v[R],j=p[R],v.hasOwnProperty(R)&&(S!=null||j!=null))switch(R){case"value":ue=S;break;case"defaultValue":pe=S;break;case"children":break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(a(91));break;default:S!==j&&We(l,u,R,S,v,j)}pj(l,ue,pe);return;case"option":for(var ke in p)if(ue=p[ke],p.hasOwnProperty(ke)&&ue!=null&&!v.hasOwnProperty(ke))switch(ke){case"selected":l.selected=!1;break;default:We(l,u,ke,null,v,ue)}for(K in v)if(ue=v[K],pe=p[K],v.hasOwnProperty(K)&&ue!==pe&&(ue!=null||pe!=null))switch(K){case"selected":l.selected=ue&&typeof ue!="function"&&typeof ue!="symbol";break;default:We(l,u,K,ue,v,pe)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ne in p)ue=p[Ne],p.hasOwnProperty(Ne)&&ue!=null&&!v.hasOwnProperty(Ne)&&We(l,u,Ne,null,v,ue);for(oe in v)if(ue=v[oe],pe=p[oe],v.hasOwnProperty(oe)&&ue!==pe&&(ue!=null||pe!=null))switch(oe){case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(a(137,u));break;default:We(l,u,oe,ue,v,pe)}return;default:if(Bm(u)){for(var Ze in p)ue=p[Ze],p.hasOwnProperty(Ze)&&ue!==void 0&&!v.hasOwnProperty(Ze)&&jg(l,u,Ze,void 0,v,ue);for(me in v)ue=v[me],pe=p[me],!v.hasOwnProperty(me)||ue===pe||ue===void 0&&pe===void 0||jg(l,u,me,ue,v,pe);return}}for(var re in p)ue=p[re],p.hasOwnProperty(re)&&ue!=null&&!v.hasOwnProperty(re)&&We(l,u,re,null,v,ue);for(ye in v)ue=v[ye],pe=p[ye],!v.hasOwnProperty(ye)||ue===pe||ue==null&&pe==null||We(l,u,ye,ue,v,pe)}function yO(l){switch(l){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function iH(){if(typeof performance.getEntriesByType=="function"){for(var l=0,u=0,p=performance.getEntriesByType("resource"),v=0;v<p.length;v++){var S=p[v],j=S.transferSize,R=S.initiatorType,I=S.duration;if(j&&I&&yO(R)){for(R=0,I=S.responseEnd,v+=1;v<p.length;v++){var K=p[v],oe=K.startTime;if(oe>I)break;var me=K.transferSize,ye=K.initiatorType;me&&yO(ye)&&(K=K.responseEnd,R+=me*(K<I?1:(I-oe)/(K-oe)))}if(--v,u+=8*(j+R)/(S.duration/1e3),l++,10<l)break}}if(0<l)return u/l/1e6}return navigator.connection&&(l=navigator.connection.downlink,typeof l=="number")?l:5}var Ag=null,Cg=null;function id(l){return l.nodeType===9?l:l.ownerDocument}function bO(l){switch(l){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function xO(l,u){if(l===0)switch(u){case"svg":return 1;case"math":return 2;default:return 0}return l===1&&u==="foreignObject"?0:l}function Og(l,u){return l==="textarea"||l==="noscript"||typeof u.children=="string"||typeof u.children=="number"||typeof u.children=="bigint"||typeof u.dangerouslySetInnerHTML=="object"&&u.dangerouslySetInnerHTML!==null&&u.dangerouslySetInnerHTML.__html!=null}var Tg=null;function oH(){var l=window.event;return l&&l.type==="popstate"?l===Tg?!1:(Tg=l,!0):(Tg=null,!1)}var _O=typeof setTimeout=="function"?setTimeout:void 0,lH=typeof clearTimeout=="function"?clearTimeout:void 0,wO=typeof Promise=="function"?Promise:void 0,sH=typeof queueMicrotask=="function"?queueMicrotask:typeof wO<"u"?function(l){return wO.resolve(null).then(l).catch(uH)}:_O;function uH(l){setTimeout(function(){throw l})}function Ci(l){return l==="head"}function SO(l,u){var p=u,v=0;do{var S=p.nextSibling;if(l.removeChild(p),S&&S.nodeType===8)if(p=S.data,p==="/$"||p==="/&"){if(v===0){l.removeChild(S),Rl(u);return}v--}else if(p==="$"||p==="$?"||p==="$~"||p==="$!"||p==="&")v++;else if(p==="html")cu(l.ownerDocument.documentElement);else if(p==="head"){p=l.ownerDocument.head,cu(p);for(var j=p.firstChild;j;){var R=j.nextSibling,I=j.nodeName;j[Cs]||I==="SCRIPT"||I==="STYLE"||I==="LINK"&&j.rel.toLowerCase()==="stylesheet"||p.removeChild(j),j=R}}else p==="body"&&cu(l.ownerDocument.body);p=S}while(p);Rl(u)}function EO(l,u){var p=l;l=0;do{var v=p.nextSibling;if(p.nodeType===1?u?(p._stashedDisplay=p.style.display,p.style.display="none"):(p.style.display=p._stashedDisplay||"",p.getAttribute("style")===""&&p.removeAttribute("style")):p.nodeType===3&&(u?(p._stashedText=p.nodeValue,p.nodeValue=""):p.nodeValue=p._stashedText||""),v&&v.nodeType===8)if(p=v.data,p==="/$"){if(l===0)break;l--}else p!=="$"&&p!=="$?"&&p!=="$~"&&p!=="$!"||l++;p=v}while(p)}function Ng(l){var u=l.firstChild;for(u&&u.nodeType===10&&(u=u.nextSibling);u;){var p=u;switch(u=u.nextSibling,p.nodeName){case"HTML":case"HEAD":case"BODY":Ng(p),Lm(p);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(p.rel.toLowerCase()==="stylesheet")continue}l.removeChild(p)}}function cH(l,u,p,v){for(;l.nodeType===1;){var S=p;if(l.nodeName.toLowerCase()!==u.toLowerCase()){if(!v&&(l.nodeName!=="INPUT"||l.type!=="hidden"))break}else if(v){if(!l[Cs])switch(u){case"meta":if(!l.hasAttribute("itemprop"))break;return l;case"link":if(j=l.getAttribute("rel"),j==="stylesheet"&&l.hasAttribute("data-precedence"))break;if(j!==S.rel||l.getAttribute("href")!==(S.href==null||S.href===""?null:S.href)||l.getAttribute("crossorigin")!==(S.crossOrigin==null?null:S.crossOrigin)||l.getAttribute("title")!==(S.title==null?null:S.title))break;return l;case"style":if(l.hasAttribute("data-precedence"))break;return l;case"script":if(j=l.getAttribute("src"),(j!==(S.src==null?null:S.src)||l.getAttribute("type")!==(S.type==null?null:S.type)||l.getAttribute("crossorigin")!==(S.crossOrigin==null?null:S.crossOrigin))&&j&&l.hasAttribute("async")&&!l.hasAttribute("itemprop"))break;return l;default:return l}}else if(u==="input"&&l.type==="hidden"){var j=S.name==null?null:""+S.name;if(S.type==="hidden"&&l.getAttribute("name")===j)return l}else return l;if(l=on(l.nextSibling),l===null)break}return null}function fH(l,u,p){if(u==="")return null;for(;l.nodeType!==3;)if((l.nodeType!==1||l.nodeName!=="INPUT"||l.type!=="hidden")&&!p||(l=on(l.nextSibling),l===null))return null;return l}function kO(l,u){for(;l.nodeType!==8;)if((l.nodeType!==1||l.nodeName!=="INPUT"||l.type!=="hidden")&&!u||(l=on(l.nextSibling),l===null))return null;return l}function Mg(l){return l.data==="$?"||l.data==="$~"}function Rg(l){return l.data==="$!"||l.data==="$?"&&l.ownerDocument.readyState!=="loading"}function dH(l,u){var p=l.ownerDocument;if(l.data==="$~")l._reactRetry=u;else if(l.data!=="$?"||p.readyState!=="loading")u();else{var v=function(){u(),p.removeEventListener("DOMContentLoaded",v)};p.addEventListener("DOMContentLoaded",v),l._reactRetry=v}}function on(l){for(;l!=null;l=l.nextSibling){var u=l.nodeType;if(u===1||u===3)break;if(u===8){if(u=l.data,u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"||u==="F!"||u==="F")break;if(u==="/$"||u==="/&")return null}}return l}var Pg=null;function jO(l){l=l.nextSibling;for(var u=0;l;){if(l.nodeType===8){var p=l.data;if(p==="/$"||p==="/&"){if(u===0)return on(l.nextSibling);u--}else p!=="$"&&p!=="$!"&&p!=="$?"&&p!=="$~"&&p!=="&"||u++}l=l.nextSibling}return null}function AO(l){l=l.previousSibling;for(var u=0;l;){if(l.nodeType===8){var p=l.data;if(p==="$"||p==="$!"||p==="$?"||p==="$~"||p==="&"){if(u===0)return l;u--}else p!=="/$"&&p!=="/&"||u++}l=l.previousSibling}return null}function CO(l,u,p){switch(u=id(p),l){case"html":if(l=u.documentElement,!l)throw Error(a(452));return l;case"head":if(l=u.head,!l)throw Error(a(453));return l;case"body":if(l=u.body,!l)throw Error(a(454));return l;default:throw Error(a(451))}}function cu(l){for(var u=l.attributes;u.length;)l.removeAttributeNode(u[0]);Lm(l)}var ln=new Map,OO=new Set;function od(l){return typeof l.getRootNode=="function"?l.getRootNode():l.nodeType===9?l:l.ownerDocument}var Ra=Z.d;Z.d={f:hH,r:pH,D:mH,C:vH,L:gH,m:yH,X:xH,S:bH,M:_H};function hH(){var l=Ra.f(),u=Zf();return l||u}function pH(l){var u=Qo(l);u!==null&&u.tag===5&&u.type==="form"?VA(u):Ra.r(l)}var Tl=typeof document>"u"?null:document;function TO(l,u,p){var v=Tl;if(v&&typeof u=="string"&&u){var S=Qr(u);S='link[rel="'+l+'"][href="'+S+'"]',typeof p=="string"&&(S+='[crossorigin="'+p+'"]'),OO.has(S)||(OO.add(S),l={rel:l,crossOrigin:p,href:u},v.querySelector(S)===null&&(u=v.createElement("link"),Qt(u,"link",l),Bt(u),v.head.appendChild(u)))}}function mH(l){Ra.D(l),TO("dns-prefetch",l,null)}function vH(l,u){Ra.C(l,u),TO("preconnect",l,u)}function gH(l,u,p){Ra.L(l,u,p);var v=Tl;if(v&&l&&u){var S='link[rel="preload"][as="'+Qr(u)+'"]';u==="image"&&p&&p.imageSrcSet?(S+='[imagesrcset="'+Qr(p.imageSrcSet)+'"]',typeof p.imageSizes=="string"&&(S+='[imagesizes="'+Qr(p.imageSizes)+'"]')):S+='[href="'+Qr(l)+'"]';var j=S;switch(u){case"style":j=Nl(l);break;case"script":j=Ml(l)}ln.has(j)||(l=m({rel:"preload",href:u==="image"&&p&&p.imageSrcSet?void 0:l,as:u},p),ln.set(j,l),v.querySelector(S)!==null||u==="style"&&v.querySelector(fu(j))||u==="script"&&v.querySelector(du(j))||(u=v.createElement("link"),Qt(u,"link",l),Bt(u),v.head.appendChild(u)))}}function yH(l,u){Ra.m(l,u);var p=Tl;if(p&&l){var v=u&&typeof u.as=="string"?u.as:"script",S='link[rel="modulepreload"][as="'+Qr(v)+'"][href="'+Qr(l)+'"]',j=S;switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":j=Ml(l)}if(!ln.has(j)&&(l=m({rel:"modulepreload",href:l},u),ln.set(j,l),p.querySelector(S)===null)){switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(p.querySelector(du(j)))return}v=p.createElement("link"),Qt(v,"link",l),Bt(v),p.head.appendChild(v)}}}function bH(l,u,p){Ra.S(l,u,p);var v=Tl;if(v&&l){var S=Jo(v).hoistableStyles,j=Nl(l);u=u||"default";var R=S.get(j);if(!R){var I={loading:0,preload:null};if(R=v.querySelector(fu(j)))I.loading=5;else{l=m({rel:"stylesheet",href:l,"data-precedence":u},p),(p=ln.get(j))&&Dg(l,p);var K=R=v.createElement("link");Bt(K),Qt(K,"link",l),K._p=new Promise(function(oe,me){K.onload=oe,K.onerror=me}),K.addEventListener("load",function(){I.loading|=1}),K.addEventListener("error",function(){I.loading|=2}),I.loading|=4,ld(R,u,v)}R={type:"stylesheet",instance:R,count:1,state:I},S.set(j,R)}}}function xH(l,u){Ra.X(l,u);var p=Tl;if(p&&l){var v=Jo(p).hoistableScripts,S=Ml(l),j=v.get(S);j||(j=p.querySelector(du(S)),j||(l=m({src:l,async:!0},u),(u=ln.get(S))&&Lg(l,u),j=p.createElement("script"),Bt(j),Qt(j,"link",l),p.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},v.set(S,j))}}function _H(l,u){Ra.M(l,u);var p=Tl;if(p&&l){var v=Jo(p).hoistableScripts,S=Ml(l),j=v.get(S);j||(j=p.querySelector(du(S)),j||(l=m({src:l,async:!0,type:"module"},u),(u=ln.get(S))&&Lg(l,u),j=p.createElement("script"),Bt(j),Qt(j,"link",l),p.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},v.set(S,j))}}function NO(l,u,p,v){var S=(S=te.current)?od(S):null;if(!S)throw Error(a(446));switch(l){case"meta":case"title":return null;case"style":return typeof p.precedence=="string"&&typeof p.href=="string"?(u=Nl(p.href),p=Jo(S).hoistableStyles,v=p.get(u),v||(v={type:"style",instance:null,count:0,state:null},p.set(u,v)),v):{type:"void",instance:null,count:0,state:null};case"link":if(p.rel==="stylesheet"&&typeof p.href=="string"&&typeof p.precedence=="string"){l=Nl(p.href);var j=Jo(S).hoistableStyles,R=j.get(l);if(R||(S=S.ownerDocument||S,R={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},j.set(l,R),(j=S.querySelector(fu(l)))&&!j._p&&(R.instance=j,R.state.loading=5),ln.has(l)||(p={rel:"preload",as:"style",href:p.href,crossOrigin:p.crossOrigin,integrity:p.integrity,media:p.media,hrefLang:p.hrefLang,referrerPolicy:p.referrerPolicy},ln.set(l,p),j||wH(S,l,p,R.state))),u&&v===null)throw Error(a(528,""));return R}if(u&&v!==null)throw Error(a(529,""));return null;case"script":return u=p.async,p=p.src,typeof p=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=Ml(p),p=Jo(S).hoistableScripts,v=p.get(u),v||(v={type:"script",instance:null,count:0,state:null},p.set(u,v)),v):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,l))}}function Nl(l){return'href="'+Qr(l)+'"'}function fu(l){return'link[rel="stylesheet"]['+l+"]"}function MO(l){return m({},l,{"data-precedence":l.precedence,precedence:null})}function wH(l,u,p,v){l.querySelector('link[rel="preload"][as="style"]['+u+"]")?v.loading=1:(u=l.createElement("link"),v.preload=u,u.addEventListener("load",function(){return v.loading|=1}),u.addEventListener("error",function(){return v.loading|=2}),Qt(u,"link",p),Bt(u),l.head.appendChild(u))}function Ml(l){return'[src="'+Qr(l)+'"]'}function du(l){return"script[async]"+l}function RO(l,u,p){if(u.count++,u.instance===null)switch(u.type){case"style":var v=l.querySelector('style[data-href~="'+Qr(p.href)+'"]');if(v)return u.instance=v,Bt(v),v;var S=m({},p,{"data-href":p.href,"data-precedence":p.precedence,href:null,precedence:null});return v=(l.ownerDocument||l).createElement("style"),Bt(v),Qt(v,"style",S),ld(v,p.precedence,l),u.instance=v;case"stylesheet":S=Nl(p.href);var j=l.querySelector(fu(S));if(j)return u.state.loading|=4,u.instance=j,Bt(j),j;v=MO(p),(S=ln.get(S))&&Dg(v,S),j=(l.ownerDocument||l).createElement("link"),Bt(j);var R=j;return R._p=new Promise(function(I,K){R.onload=I,R.onerror=K}),Qt(j,"link",v),u.state.loading|=4,ld(j,p.precedence,l),u.instance=j;case"script":return j=Ml(p.src),(S=l.querySelector(du(j)))?(u.instance=S,Bt(S),S):(v=p,(S=ln.get(j))&&(v=m({},p),Lg(v,S)),l=l.ownerDocument||l,S=l.createElement("script"),Bt(S),Qt(S,"link",v),l.head.appendChild(S),u.instance=S);case"void":return null;default:throw Error(a(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(v=u.instance,u.state.loading|=4,ld(v,p.precedence,l));return u.instance}function ld(l,u,p){for(var v=p.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),S=v.length?v[v.length-1]:null,j=S,R=0;R<v.length;R++){var I=v[R];if(I.dataset.precedence===u)j=I;else if(j!==S)break}j?j.parentNode.insertBefore(l,j.nextSibling):(u=p.nodeType===9?p.head:p,u.insertBefore(l,u.firstChild))}function Dg(l,u){l.crossOrigin==null&&(l.crossOrigin=u.crossOrigin),l.referrerPolicy==null&&(l.referrerPolicy=u.referrerPolicy),l.title==null&&(l.title=u.title)}function Lg(l,u){l.crossOrigin==null&&(l.crossOrigin=u.crossOrigin),l.referrerPolicy==null&&(l.referrerPolicy=u.referrerPolicy),l.integrity==null&&(l.integrity=u.integrity)}var sd=null;function PO(l,u,p){if(sd===null){var v=new Map,S=sd=new Map;S.set(p,v)}else S=sd,v=S.get(p),v||(v=new Map,S.set(p,v));if(v.has(l))return v;for(v.set(l,null),p=p.getElementsByTagName(l),S=0;S<p.length;S++){var j=p[S];if(!(j[Cs]||j[Yt]||l==="link"&&j.getAttribute("rel")==="stylesheet")&&j.namespaceURI!=="http://www.w3.org/2000/svg"){var R=j.getAttribute(u)||"";R=l+R;var I=v.get(R);I?I.push(j):v.set(R,[j])}}return v}function DO(l,u,p){l=l.ownerDocument||l,l.head.insertBefore(p,u==="title"?l.querySelector("head > title"):null)}function SH(l,u,p){if(p===1||u.itemProp!=null)return!1;switch(l){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return l=u.disabled,typeof u.precedence=="string"&&l==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function LO(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function EH(l,u,p,v){if(p.type==="stylesheet"&&(typeof v.media!="string"||matchMedia(v.media).matches!==!1)&&(p.state.loading&4)===0){if(p.instance===null){var S=Nl(v.href),j=u.querySelector(fu(S));if(j){u=j._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(l.count++,l=ud.bind(l),u.then(l,l)),p.state.loading|=4,p.instance=j,Bt(j);return}j=u.ownerDocument||u,v=MO(v),(S=ln.get(S))&&Dg(v,S),j=j.createElement("link"),Bt(j);var R=j;R._p=new Promise(function(I,K){R.onload=I,R.onerror=K}),Qt(j,"link",v),p.instance=j}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(p,u),(u=p.state.preload)&&(p.state.loading&3)===0&&(l.count++,p=ud.bind(l),u.addEventListener("load",p),u.addEventListener("error",p))}}var Ig=0;function kH(l,u){return l.stylesheets&&l.count===0&&fd(l,l.stylesheets),0<l.count||0<l.imgCount?function(p){var v=setTimeout(function(){if(l.stylesheets&&fd(l,l.stylesheets),l.unsuspend){var j=l.unsuspend;l.unsuspend=null,j()}},6e4+u);0<l.imgBytes&&Ig===0&&(Ig=62500*iH());var S=setTimeout(function(){if(l.waitingForImages=!1,l.count===0&&(l.stylesheets&&fd(l,l.stylesheets),l.unsuspend)){var j=l.unsuspend;l.unsuspend=null,j()}},(l.imgBytes>Ig?50:800)+u);return l.unsuspend=p,function(){l.unsuspend=null,clearTimeout(v),clearTimeout(S)}}:null}function ud(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)fd(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var cd=null;function fd(l,u){l.stylesheets=null,l.unsuspend!==null&&(l.count++,cd=new Map,u.forEach(jH,l),cd=null,ud.call(l))}function jH(l,u){if(!(u.state.loading&4)){var p=cd.get(l);if(p)var v=p.get(null);else{p=new Map,cd.set(l,p);for(var S=l.querySelectorAll("link[data-precedence],style[data-precedence]"),j=0;j<S.length;j++){var R=S[j];(R.nodeName==="LINK"||R.getAttribute("media")!=="not all")&&(p.set(R.dataset.precedence,R),v=R)}v&&p.set(null,v)}S=u.instance,R=S.getAttribute("data-precedence"),j=p.get(R)||v,j===v&&p.set(null,S),p.set(R,S),this.count++,v=ud.bind(this),S.addEventListener("load",v),S.addEventListener("error",v),j?j.parentNode.insertBefore(S,j.nextSibling):(l=l.nodeType===9?l.head:l,l.insertBefore(S,l.firstChild)),u.state.loading|=4}}var hu={$$typeof:C,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function AH(l,u,p,v,S,j,R,I,K){this.tag=1,this.containerInfo=l,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Mm(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mm(0),this.hiddenUpdates=Mm(null),this.identifierPrefix=v,this.onUncaughtError=S,this.onCaughtError=j,this.onRecoverableError=R,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=K,this.incompleteTransitions=new Map}function IO(l,u,p,v,S,j,R,I,K,oe,me,ye){return l=new AH(l,u,p,R,K,oe,me,ye,I),u=1,j===!0&&(u|=24),j=Ir(3,null,null,u),l.current=j,j.stateNode=l,u=vv(),u.refCount++,l.pooledCache=u,u.refCount++,j.memoizedState={element:v,isDehydrated:p,cache:u},xv(j),l}function zO(l){return l?(l=ul,l):ul}function qO(l,u,p,v,S,j){S=zO(S),v.context===null?v.context=S:v.pendingContext=S,v=gi(u),v.payload={element:p},j=j===void 0?null:j,j!==null&&(v.callback=j),p=yi(l,v,u),p!==null&&(Or(p,l,u),Gs(p,l,u))}function BO(l,u){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var p=l.retryLane;l.retryLane=p!==0&&p<u?p:u}}function zg(l,u){BO(l,u),(l=l.alternate)&&BO(l,u)}function $O(l){if(l.tag===13||l.tag===31){var u=to(l,67108864);u!==null&&Or(u,l,67108864),zg(l,67108864)}}function FO(l){if(l.tag===13||l.tag===31){var u=Fr();u=Rm(u);var p=to(l,u);p!==null&&Or(p,l,u),zg(l,u)}}var dd=!0;function CH(l,u,p,v){var S=B.T;B.T=null;var j=Z.p;try{Z.p=2,qg(l,u,p,v)}finally{Z.p=j,B.T=S}}function OH(l,u,p,v){var S=B.T;B.T=null;var j=Z.p;try{Z.p=8,qg(l,u,p,v)}finally{Z.p=j,B.T=S}}function qg(l,u,p,v){if(dd){var S=Bg(v);if(S===null)kg(l,u,v,hd,p),HO(l,v);else if(NH(S,l,u,p,v))v.stopPropagation();else if(HO(l,v),u&4&&-1<TH.indexOf(l)){for(;S!==null;){var j=Qo(S);if(j!==null)switch(j.tag){case 3:if(j=j.stateNode,j.current.memoizedState.isDehydrated){var R=Wi(j.pendingLanes);if(R!==0){var I=j;for(I.pendingLanes|=2,I.entangledLanes|=2;R;){var K=1<<31-Dr(R);I.entanglements[1]|=K,R&=~K}Hn(j),(Ge&6)===0&&(Xf=qt()+500,lu(0))}}break;case 31:case 13:I=to(j,2),I!==null&&Or(I,j,2),Zf(),zg(j,2)}if(j=Bg(v),j===null&&kg(l,u,v,hd,p),j===S)break;S=j}S!==null&&v.stopPropagation()}else kg(l,u,v,null,p)}}function Bg(l){return l=Fm(l),$g(l)}var hd=null;function $g(l){if(hd=null,l=Zo(l),l!==null){var u=o(l);if(u===null)l=null;else{var p=u.tag;if(p===13){if(l=s(u),l!==null)return l;l=null}else if(p===31){if(l=c(u),l!==null)return l;l=null}else if(p===3){if(u.stateNode.current.memoizedState.isDehydrated)return u.tag===3?u.stateNode.containerInfo:null;l=null}else u!==l&&(l=null)}}return hd=l,null}function UO(l){switch(l){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Xo()){case Jc:return 2;case Es:return 8;case kn:case ef:return 32;case ks:return 268435456;default:return 32}default:return 32}}var Fg=!1,Oi=null,Ti=null,Ni=null,pu=new Map,mu=new Map,Mi=[],TH="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function HO(l,u){switch(l){case"focusin":case"focusout":Oi=null;break;case"dragenter":case"dragleave":Ti=null;break;case"mouseover":case"mouseout":Ni=null;break;case"pointerover":case"pointerout":pu.delete(u.pointerId);break;case"gotpointercapture":case"lostpointercapture":mu.delete(u.pointerId)}}function vu(l,u,p,v,S,j){return l===null||l.nativeEvent!==j?(l={blockedOn:u,domEventName:p,eventSystemFlags:v,nativeEvent:j,targetContainers:[S]},u!==null&&(u=Qo(u),u!==null&&$O(u)),l):(l.eventSystemFlags|=v,u=l.targetContainers,S!==null&&u.indexOf(S)===-1&&u.push(S),l)}function NH(l,u,p,v,S){switch(u){case"focusin":return Oi=vu(Oi,l,u,p,v,S),!0;case"dragenter":return Ti=vu(Ti,l,u,p,v,S),!0;case"mouseover":return Ni=vu(Ni,l,u,p,v,S),!0;case"pointerover":var j=S.pointerId;return pu.set(j,vu(pu.get(j)||null,l,u,p,v,S)),!0;case"gotpointercapture":return j=S.pointerId,mu.set(j,vu(mu.get(j)||null,l,u,p,v,S)),!0}return!1}function GO(l){var u=Zo(l.target);if(u!==null){var p=o(u);if(p!==null){if(u=p.tag,u===13){if(u=s(p),u!==null){l.blockedOn=u,ij(l.priority,function(){FO(p)});return}}else if(u===31){if(u=c(p),u!==null){l.blockedOn=u,ij(l.priority,function(){FO(p)});return}}else if(u===3&&p.stateNode.current.memoizedState.isDehydrated){l.blockedOn=p.tag===3?p.stateNode.containerInfo:null;return}}}l.blockedOn=null}function pd(l){if(l.blockedOn!==null)return!1;for(var u=l.targetContainers;0<u.length;){var p=Bg(l.nativeEvent);if(p===null){p=l.nativeEvent;var v=new p.constructor(p.type,p);$m=v,p.target.dispatchEvent(v),$m=null}else return u=Qo(p),u!==null&&$O(u),l.blockedOn=p,!1;u.shift()}return!0}function VO(l,u,p){pd(l)&&p.delete(u)}function MH(){Fg=!1,Oi!==null&&pd(Oi)&&(Oi=null),Ti!==null&&pd(Ti)&&(Ti=null),Ni!==null&&pd(Ni)&&(Ni=null),pu.forEach(VO),mu.forEach(VO)}function md(l,u){l.blockedOn===u&&(l.blockedOn=null,Fg||(Fg=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,MH)))}var vd=null;function KO(l){vd!==l&&(vd=l,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){vd===l&&(vd=null);for(var u=0;u<l.length;u+=3){var p=l[u],v=l[u+1],S=l[u+2];if(typeof v!="function"){if($g(v||p)===null)continue;break}var j=Qo(p);j!==null&&(l.splice(u,3),u-=3,Bv(j,{pending:!0,data:S,method:p.method,action:v},v,S))}}))}function Rl(l){function u(K){return md(K,l)}Oi!==null&&md(Oi,l),Ti!==null&&md(Ti,l),Ni!==null&&md(Ni,l),pu.forEach(u),mu.forEach(u);for(var p=0;p<Mi.length;p++){var v=Mi[p];v.blockedOn===l&&(v.blockedOn=null)}for(;0<Mi.length&&(p=Mi[0],p.blockedOn===null);)GO(p),p.blockedOn===null&&Mi.shift();if(p=(l.ownerDocument||l).$$reactFormReplay,p!=null)for(v=0;v<p.length;v+=3){var S=p[v],j=p[v+1],R=S[Sr]||null;if(typeof j=="function")R||KO(p);else if(R){var I=null;if(j&&j.hasAttribute("formAction")){if(S=j,R=j[Sr]||null)I=R.formAction;else if($g(S)!==null)continue}else I=R.action;typeof I=="function"?p[v+1]=I:(p.splice(v,3),v-=3),KO(p)}}}function YO(){function l(j){j.canIntercept&&j.info==="react-transition"&&j.intercept({handler:function(){return new Promise(function(R){return S=R})},focusReset:"manual",scroll:"manual"})}function u(){S!==null&&(S(),S=null),v||setTimeout(p,20)}function p(){if(!v&&!navigation.transition){var j=navigation.currentEntry;j&&j.url!=null&&navigation.navigate(j.url,{state:j.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var v=!1,S=null;return navigation.addEventListener("navigate",l),navigation.addEventListener("navigatesuccess",u),navigation.addEventListener("navigateerror",u),setTimeout(p,100),function(){v=!0,navigation.removeEventListener("navigate",l),navigation.removeEventListener("navigatesuccess",u),navigation.removeEventListener("navigateerror",u),S!==null&&(S(),S=null)}}}function Ug(l){this._internalRoot=l}gd.prototype.render=Ug.prototype.render=function(l){var u=this._internalRoot;if(u===null)throw Error(a(409));var p=u.current,v=Fr();qO(p,v,l,u,null,null)},gd.prototype.unmount=Ug.prototype.unmount=function(){var l=this._internalRoot;if(l!==null){this._internalRoot=null;var u=l.containerInfo;qO(l.current,2,null,l,null,null),Zf(),u[Wo]=null}};function gd(l){this._internalRoot=l}gd.prototype.unstable_scheduleHydration=function(l){if(l){var u=aj();l={blockedOn:null,target:l,priority:u};for(var p=0;p<Mi.length&&u!==0&&u<Mi[p].priority;p++);Mi.splice(p,0,l),p===0&&GO(l)}};var XO=r.version;if(XO!=="19.2.4")throw Error(a(527,XO,"19.2.4"));Z.findDOMNode=function(l){var u=l._reactInternals;if(u===void 0)throw typeof l.render=="function"?Error(a(188)):(l=Object.keys(l).join(","),Error(a(268,l)));return l=d(u),l=l!==null?h(l):null,l=l===null?null:l.stateNode,l};var RH={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var yd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yd.isDisabled&&yd.supportsFiber)try{wr=yd.inject(RH),wt=yd}catch{}}return yu.createRoot=function(l,u){if(!i(l))throw Error(a(299));var p=!1,v="",S=rC,j=nC,R=aC;return u!=null&&(u.unstable_strictMode===!0&&(p=!0),u.identifierPrefix!==void 0&&(v=u.identifierPrefix),u.onUncaughtError!==void 0&&(S=u.onUncaughtError),u.onCaughtError!==void 0&&(j=u.onCaughtError),u.onRecoverableError!==void 0&&(R=u.onRecoverableError)),u=IO(l,1,!1,null,null,p,v,null,S,j,R,YO),l[Wo]=u.current,Eg(l),new Ug(u)},yu.hydrateRoot=function(l,u,p){if(!i(l))throw Error(a(299));var v=!1,S="",j=rC,R=nC,I=aC,K=null;return p!=null&&(p.unstable_strictMode===!0&&(v=!0),p.identifierPrefix!==void 0&&(S=p.identifierPrefix),p.onUncaughtError!==void 0&&(j=p.onUncaughtError),p.onCaughtError!==void 0&&(R=p.onCaughtError),p.onRecoverableError!==void 0&&(I=p.onRecoverableError),p.formState!==void 0&&(K=p.formState)),u=IO(l,1,!0,u,p??null,v,S,K,j,R,I,YO),u.context=zO(null),p=u.current,v=Fr(),v=Rm(v),S=gi(v),S.callback=null,yi(p,S,v),p=v,u.current.lanes=p,As(u,p),Hn(u),l[Wo]=u.current,Eg(l),new gd(u)},yu.version="19.2.4",yu}var i5;function VH(){if(i5)return Vg.exports;i5=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),Vg.exports=GH(),Vg.exports}var KH=VH();const YH=In(KH);/**
50
+ * react-router v7.13.1
51
+ *
52
+ * Copyright (c) Remix Software Inc.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE.md file in the root directory of this source tree.
56
+ *
57
+ * @license MIT
58
+ */var o5="popstate";function l5(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function XH(e={}){function r(a,i){var d;let o=(d=i.state)==null?void 0:d.masked,{pathname:s,search:c,hash:f}=o||a.location;return l2("",{pathname:s,search:c,hash:f},i.state&&i.state.usr||null,i.state&&i.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function n(a,i){return typeof i=="string"?i:ec(i)}return ZH(r,n,null,e)}function pt(e,r){if(e===!1||e===null||typeof e>"u")throw new Error(r)}function aa(e,r){if(!e){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function WH(){return Math.random().toString(36).substring(2,10)}function s5(e,r){return{usr:e.state,key:e.key,idx:r,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function l2(e,r,n=null,a,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof r=="string"?ls(r):r,state:n,key:r&&r.key||a||WH(),unstable_mask:i}}function ec({pathname:e="/",search:r="",hash:n=""}){return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function ls(e){let r={};if(e){let n=e.indexOf("#");n>=0&&(r.hash=e.substring(n),e=e.substring(0,n));let a=e.indexOf("?");a>=0&&(r.search=e.substring(a),e=e.substring(0,a)),e&&(r.pathname=e)}return r}function ZH(e,r,n,a={}){let{window:i=document.defaultView,v5Compat:o=!1}=a,s=i.history,c="POP",f=null,d=h();d==null&&(d=0,s.replaceState({...s.state,idx:d},""));function h(){return(s.state||{idx:null}).idx}function m(){c="POP";let _=h(),w=_==null?null:_-d;d=_,f&&f({action:c,location:E.location,delta:w})}function g(_,w){c="PUSH";let A=l5(_)?_:l2(E.location,_,w);d=h()+1;let C=s5(A,d),O=E.createHref(A.unstable_mask||A);try{s.pushState(C,"",O)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;i.location.assign(O)}o&&f&&f({action:c,location:E.location,delta:1})}function y(_,w){c="REPLACE";let A=l5(_)?_:l2(E.location,_,w);d=h();let C=s5(A,d),O=E.createHref(A.unstable_mask||A);s.replaceState(C,"",O),o&&f&&f({action:c,location:E.location,delta:0})}function x(_){return QH(_)}let E={get action(){return c},get location(){return e(i,s)},listen(_){if(f)throw new Error("A history only accepts one active listener");return i.addEventListener(o5,m),f=_,()=>{i.removeEventListener(o5,m),f=null}},createHref(_){return r(i,_)},createURL:x,encodeLocation(_){let w=x(_);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:g,replace:y,go(_){return s.go(_)}};return E}function QH(e,r=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),pt(n,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:ec(e);return a=a.replace(/ $/,"%20"),!r&&a.startsWith("//")&&(a=n+a),new URL(a,n)}function C6(e,r,n="/"){return JH(e,r,n,!1)}function JH(e,r,n,a){let i=typeof r=="string"?ls(r):r,o=Ka(i.pathname||"/",n);if(o==null)return null;let s=O6(e);eG(s);let c=null;for(let f=0;c==null&&f<s.length;++f){let d=fG(o);c=uG(s[f],d,a)}return c}function O6(e,r=[],n=[],a="",i=!1){let o=(s,c,f=i,d)=>{let h={relativePath:d===void 0?s.path||"":d,caseSensitive:s.caseSensitive===!0,childrenIndex:c,route:s};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(a)&&f)return;pt(h.relativePath.startsWith(a),`Absolute route path "${h.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(a.length)}let m=ta([a,h.relativePath]),g=n.concat(h);s.children&&s.children.length>0&&(pt(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),O6(s.children,r,g,m,f)),!(s.path==null&&!s.index)&&r.push({path:m,score:lG(m,s.index),routesMeta:g})};return e.forEach((s,c)=>{var f;if(s.path===""||!((f=s.path)!=null&&f.includes("?")))o(s,c);else for(let d of T6(s.path))o(s,c,!0,d)}),r}function T6(e){let r=e.split("/");if(r.length===0)return[];let[n,...a]=r,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(a.length===0)return i?[o,""]:[o];let s=T6(a.join("/")),c=[];return c.push(...s.map(f=>f===""?o:[o,f].join("/"))),i&&c.push(...s),c.map(f=>e.startsWith("/")&&f===""?"/":f)}function eG(e){e.sort((r,n)=>r.score!==n.score?n.score-r.score:sG(r.routesMeta.map(a=>a.childrenIndex),n.routesMeta.map(a=>a.childrenIndex)))}var tG=/^:[\w-]+$/,rG=3,nG=2,aG=1,iG=10,oG=-2,u5=e=>e==="*";function lG(e,r){let n=e.split("/"),a=n.length;return n.some(u5)&&(a+=oG),r&&(a+=nG),n.filter(i=>!u5(i)).reduce((i,o)=>i+(tG.test(o)?rG:o===""?aG:iG),a)}function sG(e,r){return e.length===r.length&&e.slice(0,-1).every((a,i)=>a===r[i])?e[e.length-1]-r[r.length-1]:0}function uG(e,r,n=!1){let{routesMeta:a}=e,i={},o="/",s=[];for(let c=0;c<a.length;++c){let f=a[c],d=c===a.length-1,h=o==="/"?r:r.slice(o.length)||"/",m=ih({path:f.relativePath,caseSensitive:f.caseSensitive,end:d},h),g=f.route;if(!m&&d&&n&&!a[a.length-1].route.index&&(m=ih({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},h)),!m)return null;Object.assign(i,m.params),s.push({params:i,pathname:ta([o,m.pathname]),pathnameBase:mG(ta([o,m.pathnameBase])),route:g}),m.pathnameBase!=="/"&&(o=ta([o,m.pathnameBase]))}return s}function ih(e,r){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,a]=cG(e.path,e.caseSensitive,e.end),i=r.match(n);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),c=i.slice(1);return{params:a.reduce((d,{paramName:h,isOptional:m},g)=>{if(h==="*"){let x=c[g]||"";s=o.slice(0,o.length-x.length).replace(/(.)\/+$/,"$1")}const y=c[g];return m&&!y?d[h]=void 0:d[h]=(y||"").replace(/%2F/g,"/"),d},{}),pathname:o,pathnameBase:s,pattern:e}}function cG(e,r=!1,n=!0){aa(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,c,f,d,h)=>{if(a.push({paramName:c,isOptional:f!=null}),f){let m=h.charAt(d+s.length);return m&&m!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,r?void 0:"i"),a]}function fG(e){try{return e.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return aa(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),e}}function Ka(e,r){if(r==="/")return e;if(!e.toLowerCase().startsWith(r.toLowerCase()))return null;let n=r.endsWith("/")?r.length-1:r.length,a=e.charAt(n);return a&&a!=="/"?null:e.slice(n)||"/"}var dG=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function hG(e,r="/"){let{pathname:n,search:a="",hash:i=""}=typeof e=="string"?ls(e):e,o;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?o=c5(n.substring(1),"/"):o=c5(n,r)):o=r,{pathname:o,search:vG(a),hash:gG(i)}}function c5(e,r){let n=r.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Wg(e,r,n,a){return`Cannot include a '${e}' character in a manually specified \`to.${r}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function pG(e){return e.filter((r,n)=>n===0||r.route.path&&r.route.path.length>0)}function N6(e){let r=pG(e);return r.map((n,a)=>a===r.length-1?n.pathname:n.pathnameBase)}function AS(e,r,n,a=!1){let i;typeof e=="string"?i=ls(e):(i={...e},pt(!i.pathname||!i.pathname.includes("?"),Wg("?","pathname","search",i)),pt(!i.pathname||!i.pathname.includes("#"),Wg("#","pathname","hash",i)),pt(!i.search||!i.search.includes("#"),Wg("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,c;if(s==null)c=n;else{let m=r.length-1;if(!a&&s.startsWith("..")){let g=s.split("/");for(;g[0]==="..";)g.shift(),m-=1;i.pathname=g.join("/")}c=m>=0?r[m]:"/"}let f=hG(i,c),d=s&&s!=="/"&&s.endsWith("/"),h=(o||s===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(d||h)&&(f.pathname+="/"),f}var ta=e=>e.join("/").replace(/\/\/+/g,"/"),mG=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),vG=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,gG=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,yG=class{constructor(e,r,n,a=!1){this.status=e,this.statusText=r||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function bG(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function xG(e){return e.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var M6=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function R6(e,r){let n=e;if(typeof n!="string"||!dG.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let a=n,i=!1;if(M6)try{let o=new URL(window.location.href),s=n.startsWith("//")?new URL(o.protocol+n):new URL(n),c=Ka(s.pathname,r);s.origin===o.origin&&c!=null?n=c+s.search+s.hash:i=!0}catch{aa(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var P6=["POST","PUT","PATCH","DELETE"];new Set(P6);var _G=["GET",...P6];new Set(_G);var ss=k.createContext(null);ss.displayName="DataRouter";var bp=k.createContext(null);bp.displayName="DataRouterState";var wG=k.createContext(!1),D6=k.createContext({isTransitioning:!1});D6.displayName="ViewTransition";var SG=k.createContext(new Map);SG.displayName="Fetchers";var EG=k.createContext(null);EG.displayName="Await";var _n=k.createContext(null);_n.displayName="Navigation";var _c=k.createContext(null);_c.displayName="Location";var ti=k.createContext({outlet:null,matches:[],isDataRoute:!1});ti.displayName="Route";var CS=k.createContext(null);CS.displayName="RouteError";var L6="REACT_ROUTER_ERROR",kG="REDIRECT",jG="ROUTE_ERROR_RESPONSE";function AG(e){if(e.startsWith(`${L6}:${kG}:{`))try{let r=JSON.parse(e.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function CG(e){if(e.startsWith(`${L6}:${jG}:{`))try{let r=JSON.parse(e.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new yG(r.status,r.statusText,r.data)}catch{}}function OG(e,{relative:r}={}){pt(wc(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:a}=k.useContext(_n),{hash:i,pathname:o,search:s}=Sc(e,{relative:r}),c=o;return n!=="/"&&(c=o==="/"?n:ta([n,o])),a.createHref({pathname:c,search:s,hash:i})}function wc(){return k.useContext(_c)!=null}function Gi(){return pt(wc(),"useLocation() may be used only in the context of a <Router> component."),k.useContext(_c).location}var I6="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function z6(e){k.useContext(_n).static||k.useLayoutEffect(e)}function TG(){let{isDataRoute:e}=k.useContext(ti);return e?UG():NG()}function NG(){pt(wc(),"useNavigate() may be used only in the context of a <Router> component.");let e=k.useContext(ss),{basename:r,navigator:n}=k.useContext(_n),{matches:a}=k.useContext(ti),{pathname:i}=Gi(),o=JSON.stringify(N6(a)),s=k.useRef(!1);return z6(()=>{s.current=!0}),k.useCallback((f,d={})=>{if(aa(s.current,I6),!s.current)return;if(typeof f=="number"){n.go(f);return}let h=AS(f,JSON.parse(o),i,d.relative==="path");e==null&&r!=="/"&&(h.pathname=h.pathname==="/"?r:ta([r,h.pathname])),(d.replace?n.replace:n.push)(h,d.state,d)},[r,n,o,i,e])}k.createContext(null);function Sc(e,{relative:r}={}){let{matches:n}=k.useContext(ti),{pathname:a}=Gi(),i=JSON.stringify(N6(n));return k.useMemo(()=>AS(e,JSON.parse(i),a,r==="path"),[e,i,a,r])}function MG(e,r){return q6(e,r)}function q6(e,r,n){var _;pt(wc(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=k.useContext(_n),{matches:i}=k.useContext(ti),o=i[i.length-1],s=o?o.params:{},c=o?o.pathname:"/",f=o?o.pathnameBase:"/",d=o&&o.route;{let w=d&&d.path||"";$6(c,!d||w.endsWith("*")||w.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${w}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
59
+
60
+ Please change the parent <Route path="${w}"> to <Route path="${w==="/"?"*":`${w}/*`}">.`)}let h=Gi(),m;if(r){let w=typeof r=="string"?ls(r):r;pt(f==="/"||((_=w.pathname)==null?void 0:_.startsWith(f)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${w.pathname}" was given in the \`location\` prop.`),m=w}else m=h;let g=m.pathname||"/",y=g;if(f!=="/"){let w=f.replace(/^\//,"").split("/");y="/"+g.replace(/^\//,"").split("/").slice(w.length).join("/")}let x=C6(e,{pathname:y});aa(d||x!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),aa(x==null||x[x.length-1].route.element!==void 0||x[x.length-1].route.Component!==void 0||x[x.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let E=IG(x&&x.map(w=>Object.assign({},w,{params:Object.assign({},s,w.params),pathname:ta([f,a.encodeLocation?a.encodeLocation(w.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?f:ta([f,a.encodeLocation?a.encodeLocation(w.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathnameBase])})),i,n);return r&&E?k.createElement(_c.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...m},navigationType:"POP"}},E):E}function RG(){let e=FG(),r=bG(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=k.createElement(k.Fragment,null,k.createElement("p",null,"💿 Hey developer 👋"),k.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",k.createElement("code",{style:o},"ErrorBoundary")," or"," ",k.createElement("code",{style:o},"errorElement")," prop on your route.")),k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},r),n?k.createElement("pre",{style:i},n):null,s)}var PG=k.createElement(RG,null),B6=class extends k.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){this.props.onError?this.props.onError(e,r):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=CG(e.digest);n&&(e=n)}let r=e!==void 0?k.createElement(ti.Provider,{value:this.props.routeContext},k.createElement(CS.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?k.createElement(DG,{error:e},r):r}};B6.contextType=wG;var Zg=new WeakMap;function DG({children:e,error:r}){let{basename:n}=k.useContext(_n);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let a=AG(r.digest);if(a){let i=Zg.get(r);if(i)throw i;let o=R6(a.location,n);if(M6&&!Zg.get(r))if(o.isExternal||a.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:a.replace}));throw Zg.set(r,s),s}return k.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function LG({routeContext:e,match:r,children:n}){let a=k.useContext(ss);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),k.createElement(ti.Provider,{value:e},n)}function IG(e,r=[],n){let a=n==null?void 0:n.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(r.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let i=e,o=a==null?void 0:a.errors;if(o!=null){let h=i.findIndex(m=>m.route.id&&(o==null?void 0:o[m.route.id])!==void 0);pt(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),i=i.slice(0,Math.min(i.length,h+1))}let s=!1,c=-1;if(n&&a){s=a.renderFallback;for(let h=0;h<i.length;h++){let m=i[h];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(c=h),m.route.id){let{loaderData:g,errors:y}=a,x=m.route.loader&&!g.hasOwnProperty(m.route.id)&&(!y||y[m.route.id]===void 0);if(m.route.lazy||x){n.isStatic&&(s=!0),c>=0?i=i.slice(0,c+1):i=[i[0]];break}}}}let f=n==null?void 0:n.onError,d=a&&f?(h,m)=>{var g,y;f(h,{location:a.location,params:((y=(g=a.matches)==null?void 0:g[0])==null?void 0:y.params)??{},unstable_pattern:xG(a.matches),errorInfo:m})}:void 0;return i.reduceRight((h,m,g)=>{let y,x=!1,E=null,_=null;a&&(y=o&&m.route.id?o[m.route.id]:void 0,E=m.route.errorElement||PG,s&&(c<0&&g===0?($6("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),x=!0,_=null):c===g&&(x=!0,_=m.route.hydrateFallbackElement||null)));let w=r.concat(i.slice(0,g+1)),A=()=>{let C;return y?C=E:x?C=_:m.route.Component?C=k.createElement(m.route.Component,null):m.route.element?C=m.route.element:C=h,k.createElement(LG,{match:m,routeContext:{outlet:h,matches:w,isDataRoute:a!=null},children:C})};return a&&(m.route.ErrorBoundary||m.route.errorElement||g===0)?k.createElement(B6,{location:a.location,revalidation:a.revalidation,component:E,error:y,children:A(),routeContext:{outlet:null,matches:w,isDataRoute:!0},onError:d}):A()},null)}function OS(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function zG(e){let r=k.useContext(ss);return pt(r,OS(e)),r}function qG(e){let r=k.useContext(bp);return pt(r,OS(e)),r}function BG(e){let r=k.useContext(ti);return pt(r,OS(e)),r}function TS(e){let r=BG(e),n=r.matches[r.matches.length-1];return pt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function $G(){return TS("useRouteId")}function FG(){var a;let e=k.useContext(CS),r=qG("useRouteError"),n=TS("useRouteError");return e!==void 0?e:(a=r.errors)==null?void 0:a[n]}function UG(){let{router:e}=zG("useNavigate"),r=TS("useNavigate"),n=k.useRef(!1);return z6(()=>{n.current=!0}),k.useCallback(async(i,o={})=>{aa(n.current,I6),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:r,...o}))},[e,r])}var f5={};function $6(e,r,n){!r&&!f5[e]&&(f5[e]=!0,aa(!1,n))}k.memo(HG);function HG({routes:e,future:r,state:n,isStatic:a,onError:i}){return q6(e,void 0,{state:n,isStatic:a,onError:i})}function xo(e){pt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function GG({basename:e="/",children:r=null,location:n,navigationType:a="POP",navigator:i,static:o=!1,unstable_useTransitions:s}){pt(!wc(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),f=k.useMemo(()=>({basename:c,navigator:i,static:o,unstable_useTransitions:s,future:{}}),[c,i,o,s]);typeof n=="string"&&(n=ls(n));let{pathname:d="/",search:h="",hash:m="",state:g=null,key:y="default",unstable_mask:x}=n,E=k.useMemo(()=>{let _=Ka(d,c);return _==null?null:{location:{pathname:_,search:h,hash:m,state:g,key:y,unstable_mask:x},navigationType:a}},[c,d,h,m,g,y,a,x]);return aa(E!=null,`<Router basename="${c}"> is not able to match the URL "${d}${h}${m}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:k.createElement(_n.Provider,{value:f},k.createElement(_c.Provider,{children:r,value:E}))}function VG({children:e,location:r}){return MG(s2(e),r)}function s2(e,r=[]){let n=[];return k.Children.forEach(e,(a,i)=>{if(!k.isValidElement(a))return;let o=[...r,i];if(a.type===k.Fragment){n.push.apply(n,s2(a.props.children,o));return}pt(a.type===xo,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),pt(!a.props.index||!a.props.children,"An index route cannot have child routes.");let s={id:a.props.id||o.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(s.children=s2(a.props.children,o)),n.push(s)}),n}var Kd="get",Yd="application/x-www-form-urlencoded";function xp(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function KG(e){return xp(e)&&e.tagName.toLowerCase()==="button"}function YG(e){return xp(e)&&e.tagName.toLowerCase()==="form"}function XG(e){return xp(e)&&e.tagName.toLowerCase()==="input"}function WG(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ZG(e,r){return e.button===0&&(!r||r==="_self")&&!WG(e)}var _d=null;function QG(){if(_d===null)try{new FormData(document.createElement("form"),0),_d=!1}catch{_d=!0}return _d}var JG=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Qg(e){return e!=null&&!JG.has(e)?(aa(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Yd}"`),null):e}function eV(e,r){let n,a,i,o,s;if(YG(e)){let c=e.getAttribute("action");a=c?Ka(c,r):null,n=e.getAttribute("method")||Kd,i=Qg(e.getAttribute("enctype"))||Yd,o=new FormData(e)}else if(KG(e)||XG(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||c.getAttribute("action");if(a=f?Ka(f,r):null,n=e.getAttribute("formmethod")||c.getAttribute("method")||Kd,i=Qg(e.getAttribute("formenctype"))||Qg(c.getAttribute("enctype"))||Yd,o=new FormData(c,e),!QG()){let{name:d,type:h,value:m}=e;if(h==="image"){let g=d?`${d}.`:"";o.append(`${g}x`,"0"),o.append(`${g}y`,"0")}else d&&o.append(d,m)}}else{if(xp(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Kd,a=null,i=Yd,s=e}return o&&i==="text/plain"&&(s=o,o=void 0),{action:a,method:n.toLowerCase(),encType:i,formData:o,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function NS(e,r){if(e===!1||e===null||typeof e>"u")throw new Error(r)}function tV(e,r,n,a){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${a}`:i.pathname=`${i.pathname}.${a}`:i.pathname==="/"?i.pathname=`_root.${a}`:r&&Ka(i.pathname,r)==="/"?i.pathname=`${r.replace(/\/$/,"")}/_root.${a}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${a}`,i}async function rV(e,r){if(e.id in r)return r[e.id];try{let n=await import(e.module);return r[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function nV(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function aV(e,r,n){let a=await Promise.all(e.map(async i=>{let o=r.routes[i.route.id];if(o){let s=await rV(o,n);return s.links?s.links():[]}return[]}));return sV(a.flat(1).filter(nV).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function d5(e,r,n,a,i,o){let s=(f,d)=>n[d]?f.route.id!==n[d].route.id:!0,c=(f,d)=>{var h;return n[d].pathname!==f.pathname||((h=n[d].route.path)==null?void 0:h.endsWith("*"))&&n[d].params["*"]!==f.params["*"]};return o==="assets"?r.filter((f,d)=>s(f,d)||c(f,d)):o==="data"?r.filter((f,d)=>{var m;let h=a.routes[f.route.id];if(!h||!h.hasLoader)return!1;if(s(f,d)||c(f,d))return!0;if(f.route.shouldRevalidate){let g=f.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((m=n[0])==null?void 0:m.params)||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function iV(e,r,{includeHydrateFallback:n}={}){return oV(e.map(a=>{let i=r.routes[a.route.id];if(!i)return[];let o=[i.module];return i.clientActionModule&&(o=o.concat(i.clientActionModule)),i.clientLoaderModule&&(o=o.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(o=o.concat(i.hydrateFallbackModule)),i.imports&&(o=o.concat(i.imports)),o}).flat(1))}function oV(e){return[...new Set(e)]}function lV(e){let r={},n=Object.keys(e).sort();for(let a of n)r[a]=e[a];return r}function sV(e,r){let n=new Set;return new Set(r),e.reduce((a,i)=>{let o=JSON.stringify(lV(i));return n.has(o)||(n.add(o),a.push({key:o,link:i})),a},[])}function F6(){let e=k.useContext(ss);return NS(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function uV(){let e=k.useContext(bp);return NS(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var MS=k.createContext(void 0);MS.displayName="FrameworkContext";function U6(){let e=k.useContext(MS);return NS(e,"You must render this element inside a <HydratedRouter> element"),e}function cV(e,r){let n=k.useContext(MS),[a,i]=k.useState(!1),[o,s]=k.useState(!1),{onFocus:c,onBlur:f,onMouseEnter:d,onMouseLeave:h,onTouchStart:m}=r,g=k.useRef(null);k.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let E=w=>{w.forEach(A=>{s(A.isIntersecting)})},_=new IntersectionObserver(E,{threshold:.5});return g.current&&_.observe(g.current),()=>{_.disconnect()}}},[e]),k.useEffect(()=>{if(a){let E=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(E)}}},[a]);let y=()=>{i(!0)},x=()=>{i(!1),s(!1)};return n?e!=="intent"?[o,g,{}]:[o,g,{onFocus:bu(c,y),onBlur:bu(f,x),onMouseEnter:bu(d,y),onMouseLeave:bu(h,x),onTouchStart:bu(m,y)}]:[!1,g,{}]}function bu(e,r){return n=>{e&&e(n),n.defaultPrevented||r(n)}}function fV({page:e,...r}){let{router:n}=F6(),a=k.useMemo(()=>C6(n.routes,e,n.basename),[n.routes,e,n.basename]);return a?k.createElement(hV,{page:e,matches:a,...r}):null}function dV(e){let{manifest:r,routeModules:n}=U6(),[a,i]=k.useState([]);return k.useEffect(()=>{let o=!1;return aV(e,r,n).then(s=>{o||i(s)}),()=>{o=!0}},[e,r,n]),a}function hV({page:e,matches:r,...n}){let a=Gi(),{future:i,manifest:o,routeModules:s}=U6(),{basename:c}=F6(),{loaderData:f,matches:d}=uV(),h=k.useMemo(()=>d5(e,r,d,o,a,"data"),[e,r,d,o,a]),m=k.useMemo(()=>d5(e,r,d,o,a,"assets"),[e,r,d,o,a]),g=k.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let E=new Set,_=!1;if(r.forEach(A=>{var O;let C=o.routes[A.route.id];!C||!C.hasLoader||(!h.some(T=>T.route.id===A.route.id)&&A.route.id in f&&((O=s[A.route.id])!=null&&O.shouldRevalidate)||C.hasClientLoader?_=!0:E.add(A.route.id))}),E.size===0)return[];let w=tV(e,c,i.unstable_trailingSlashAwareDataRequests,"data");return _&&E.size>0&&w.searchParams.set("_routes",r.filter(A=>E.has(A.route.id)).map(A=>A.route.id).join(",")),[w.pathname+w.search]},[c,i.unstable_trailingSlashAwareDataRequests,f,a,o,h,r,e,s]),y=k.useMemo(()=>iV(m,o),[m,o]),x=dV(m);return k.createElement(k.Fragment,null,g.map(E=>k.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...n})),y.map(E=>k.createElement("link",{key:E,rel:"modulepreload",href:E,...n})),x.map(({key:E,link:_})=>k.createElement("link",{key:E,nonce:n.nonce,..._,crossOrigin:_.crossOrigin??n.crossOrigin})))}function pV(...e){return r=>{e.forEach(n=>{typeof n=="function"?n(r):n!=null&&(n.current=r)})}}var mV=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{mV&&(window.__reactRouterVersion="7.13.1")}catch{}function vV({basename:e,children:r,unstable_useTransitions:n,window:a}){let i=k.useRef();i.current==null&&(i.current=XH({window:a,v5Compat:!0}));let o=i.current,[s,c]=k.useState({action:o.action,location:o.location}),f=k.useCallback(d=>{n===!1?c(d):k.startTransition(()=>c(d))},[n]);return k.useLayoutEffect(()=>o.listen(f),[o,f]),k.createElement(GG,{basename:e,children:r,location:s.location,navigationType:s.action,navigator:o,unstable_useTransitions:n})}var H6=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,G6=k.forwardRef(function({onClick:r,discover:n="render",prefetch:a="none",relative:i,reloadDocument:o,replace:s,unstable_mask:c,state:f,target:d,to:h,preventScrollReset:m,viewTransition:g,unstable_defaultShouldRevalidate:y,...x},E){let{basename:_,navigator:w,unstable_useTransitions:A}=k.useContext(_n),C=typeof h=="string"&&H6.test(h),O=R6(h,_);h=O.to;let T=OG(h,{relative:i}),N=Gi(),M=null;if(c){let Y=AS(c,[],N.unstable_mask?N.unstable_mask.pathname:"/",!0);_!=="/"&&(Y.pathname=Y.pathname==="/"?_:ta([_,Y.pathname])),M=w.createHref(Y)}let[P,L,D]=cV(a,x),q=bV(h,{replace:s,unstable_mask:c,state:f,target:d,preventScrollReset:m,relative:i,viewTransition:g,unstable_defaultShouldRevalidate:y,unstable_useTransitions:A});function z(Y){r&&r(Y),Y.defaultPrevented||q(Y)}let U=!(O.isExternal||o),$=k.createElement("a",{...x,...D,href:(U?M:void 0)||O.absoluteURL||T,onClick:U?z:r,ref:pV(E,L),target:d,"data-discover":!C&&n==="render"?"true":void 0});return P&&!C?k.createElement(k.Fragment,null,$,k.createElement(fV,{page:T})):$});G6.displayName="Link";var V6=k.forwardRef(function({"aria-current":r="page",caseSensitive:n=!1,className:a="",end:i=!1,style:o,to:s,viewTransition:c,children:f,...d},h){let m=Sc(s,{relative:d.relative}),g=Gi(),y=k.useContext(bp),{navigator:x,basename:E}=k.useContext(_n),_=y!=null&&EV(m)&&c===!0,w=x.encodeLocation?x.encodeLocation(m).pathname:m.pathname,A=g.pathname,C=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;n||(A=A.toLowerCase(),C=C?C.toLowerCase():null,w=w.toLowerCase()),C&&E&&(C=Ka(C,E)||C);const O=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let T=A===w||!i&&A.startsWith(w)&&A.charAt(O)==="/",N=C!=null&&(C===w||!i&&C.startsWith(w)&&C.charAt(w.length)==="/"),M={isActive:T,isPending:N,isTransitioning:_},P=T?r:void 0,L;typeof a=="function"?L=a(M):L=[a,T?"active":null,N?"pending":null,_?"transitioning":null].filter(Boolean).join(" ");let D=typeof o=="function"?o(M):o;return k.createElement(G6,{...d,"aria-current":P,className:L,ref:h,style:D,to:s,viewTransition:c},typeof f=="function"?f(M):f)});V6.displayName="NavLink";var gV=k.forwardRef(({discover:e="render",fetcherKey:r,navigate:n,reloadDocument:a,replace:i,state:o,method:s=Kd,action:c,onSubmit:f,relative:d,preventScrollReset:h,viewTransition:m,unstable_defaultShouldRevalidate:g,...y},x)=>{let{unstable_useTransitions:E}=k.useContext(_n),_=wV(),w=SV(c,{relative:d}),A=s.toLowerCase()==="get"?"get":"post",C=typeof c=="string"&&H6.test(c),O=T=>{if(f&&f(T),T.defaultPrevented)return;T.preventDefault();let N=T.nativeEvent.submitter,M=(N==null?void 0:N.getAttribute("formmethod"))||s,P=()=>_(N||T.currentTarget,{fetcherKey:r,method:M,navigate:n,replace:i,state:o,relative:d,preventScrollReset:h,viewTransition:m,unstable_defaultShouldRevalidate:g});E&&n!==!1?k.startTransition(()=>P()):P()};return k.createElement("form",{ref:x,method:A,action:w,onSubmit:a?f:O,...y,"data-discover":!C&&e==="render"?"true":void 0})});gV.displayName="Form";function yV(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function K6(e){let r=k.useContext(ss);return pt(r,yV(e)),r}function bV(e,{target:r,replace:n,unstable_mask:a,state:i,preventScrollReset:o,relative:s,viewTransition:c,unstable_defaultShouldRevalidate:f,unstable_useTransitions:d}={}){let h=TG(),m=Gi(),g=Sc(e,{relative:s});return k.useCallback(y=>{if(ZG(y,r)){y.preventDefault();let x=n!==void 0?n:ec(m)===ec(g),E=()=>h(e,{replace:x,unstable_mask:a,state:i,preventScrollReset:o,relative:s,viewTransition:c,unstable_defaultShouldRevalidate:f});d?k.startTransition(()=>E()):E()}},[m,h,g,n,a,i,r,e,o,s,c,f,d])}var xV=0,_V=()=>`__${String(++xV)}__`;function wV(){let{router:e}=K6("useSubmit"),{basename:r}=k.useContext(_n),n=$G(),a=e.fetch,i=e.navigate;return k.useCallback(async(o,s={})=>{let{action:c,method:f,encType:d,formData:h,body:m}=eV(o,r);if(s.navigate===!1){let g=s.fetcherKey||_V();await a(g,n,s.action||c,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:h,body:m,formMethod:s.method||f,formEncType:s.encType||d,flushSync:s.flushSync})}else await i(s.action||c,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:h,body:m,formMethod:s.method||f,formEncType:s.encType||d,replace:s.replace,state:s.state,fromRouteId:n,flushSync:s.flushSync,viewTransition:s.viewTransition})},[a,i,r,n])}function SV(e,{relative:r}={}){let{basename:n}=k.useContext(_n),a=k.useContext(ti);pt(a,"useFormAction must be used inside a RouteContext");let[i]=a.matches.slice(-1),o={...Sc(e||".",{relative:r})},s=Gi();if(e==null){o.search=s.search;let c=new URLSearchParams(o.search),f=c.getAll("index");if(f.some(h=>h==="")){c.delete("index"),f.filter(m=>m).forEach(m=>c.append("index",m));let h=c.toString();o.search=h?`?${h}`:""}}return(!e||e===".")&&i.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:ta([n,o.pathname])),ec(o)}function EV(e,{relative:r}={}){let n=k.useContext(D6);pt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=K6("useViewTransitionState"),i=Sc(e,{relative:r});if(!n.isTransitioning)return!1;let o=Ka(n.currentLocation.pathname,a)||n.currentLocation.pathname,s=Ka(n.nextLocation.pathname,a)||n.nextLocation.pathname;return ih(i.pathname,s)!=null||ih(i.pathname,o)!=null}var RS=A6();function PS(e={}){const[r,n]=k.useState(!1),[a,i]=k.useState(null),[o,s]=k.useState(null),c=k.useRef(e.onEvent),f=k.useRef(1e3),d=k.useRef(null),h=k.useRef(null),m=k.useRef(!0),g=k.useRef(0);c.current=e.onEvent;const y=k.useCallback(()=>{if(!m.current)return;const x=new EventSource("/api/stream");h.current=x,x.onopen=()=>{m.current&&(n(!0),f.current=1e3)};const E=["snapshot","team_status_changed","team_event","team_output","pr_updated","team_launched","team_stopped","usage_updated","project_added","project_updated","project_removed","project_cleanup","dependency_resolved","heartbeat","team_thinking_start","team_thinking_stop"],_=w=>{var O,T;if(!m.current)return;let A="message",C=null;try{const N=JSON.parse(w.data);A=N.type??w.type??"message",typeof N.team_id=="number"&&(C=N.team_id),(O=c.current)==null||O.call(c,A,N)}catch{(T=c.current)==null||T.call(c,"message",w.data)}if(A!=="team_output"&&A!=="team_thinking_start"&&A!=="team_thinking_stop"){const N=Date.now();N-g.current>1e3&&(g.current=N,i(new Date(N)),s(C))}};for(const w of E)x.addEventListener(w,_);x.onmessage=_,x.onerror=()=>{if(!m.current)return;n(!1),x.close(),h.current=null;const w=f.current;d.current=setTimeout(()=>{m.current&&y()},w),f.current=Math.min(w*2,3e4)}},[]);return k.useEffect(()=>(m.current=!0,y(),()=>{m.current=!1,h.current&&(h.current.close(),h.current=null),d.current&&(clearTimeout(d.current),d.current=null)}),[y]),{connected:r,lastEvent:a,lastEventTeamId:o}}const Y6=k.createContext(null),kV=45e3;function jV({children:e}){const[r,n]=k.useState([]),[a,i]=k.useState(null),o=k.useRef(null),s=k.useRef(new Set),[c,f]=k.useState(0),d=k.useCallback(async()=>{try{const w=await fetch("/api/teams");if(w.ok){const A=await w.json();n(A)}}catch{}},[]),h=k.useCallback(()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{o.current=null,d()},500)},[d]),m=k.useCallback((w,A)=>{if(w==="snapshot"){const C=A;Array.isArray(C.teams)&&n(C.teams)}else if(w==="team_status_changed"||w==="team_launched"||w==="team_stopped"){if(h(),w==="team_stopped"){const C=A;typeof C.team_id=="number"&&s.current.has(C.team_id)&&(s.current.delete(C.team_id),f(O=>O+1))}}else if(w==="usage_updated"||w==="pr_updated")h();else if(w==="team_thinking_start"){const C=A;typeof C.team_id=="number"&&(s.current.add(C.team_id),f(O=>O+1))}else if(w==="team_thinking_stop"){const C=A;typeof C.team_id=="number"&&(s.current.delete(C.team_id),f(O=>O+1))}},[h]),{connected:g,lastEvent:y,lastEventTeamId:x}=PS({onEvent:m});k.useEffect(()=>{d()},[d]),k.useEffect(()=>{const w=setInterval(d,kV);return()=>clearInterval(w)},[d]),k.useEffect(()=>()=>{o.current&&clearTimeout(o.current)},[]);const E=k.useCallback(w=>s.current.has(w),[]),_=k.useMemo(()=>({teams:r,selectedTeamId:a,setSelectedTeamId:i,connected:g,lastEvent:y,lastEventTeamId:x,isThinking:E}),[r,a,g,y,x,E,c]);return b.jsx(Y6.Provider,{value:_,children:e})}function Ec(){const e=k.useContext(Y6);if(!e)throw new Error("useFleet must be used within a FleetProvider");return e}class AV extends k.Component{constructor(n){super(n);bd(this,"handleReload",()=>{window.location.reload()});this.state={hasError:!1,error:null}}static getDerivedStateFromError(n){return{hasError:!0,error:n}}componentDidCatch(n,a){console.error("[ErrorBoundary] Uncaught error:",n,a)}render(){return this.state.hasError?b.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",width:"100vw",backgroundColor:"#0d1117",color:"#e6edf3",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif',padding:"2rem",textAlign:"center"},children:[b.jsx("h1",{style:{fontSize:"1.5rem",fontWeight:600,color:"#F85149",marginBottom:"1rem"},children:"Something went wrong"}),this.state.error&&b.jsx("p",{style:{fontSize:"0.875rem",color:"#8b949e",maxWidth:"36rem",marginBottom:"1.5rem",wordBreak:"break-word"},children:this.state.error.message}),b.jsx("button",{type:"button",onClick:this.handleReload,style:{padding:"0.5rem 1rem",fontSize:"0.875rem",fontWeight:500,color:"#e6edf3",backgroundColor:"transparent",border:"1px solid #30363d",borderRadius:"6px",cursor:"pointer"},children:"Reload"})]}):this.props.children}}class X6 extends Error{constructor(r,n,a){super(a??`API error: ${r} ${n}`),this.status=r,this.statusText=n,this.name="ApiError"}}async function wd(e,r,n){const a=`/api/${r.replace(/^\//,"")}`,i={method:e};n!==void 0?(i.headers={"Content-Type":"application/json"},i.body=JSON.stringify(n)):(e==="POST"||e==="PUT")&&(i.headers={"Content-Type":"application/json"},i.body="{}");const o=await fetch(a,i);if(!o.ok){let s;try{const c=await o.json();s=c.message??c.error??void 0}catch{}throw new X6(o.status,o.statusText,s)}return o.json()}function Ht(){const e=k.useCallback(i=>wd("GET",i),[]),r=k.useCallback((i,o)=>wd("POST",i,o),[]),n=k.useCallback((i,o)=>wd("PUT",i,o),[]),a=k.useCallback(i=>wd("DELETE",i),[]);return k.useMemo(()=>({get:e,post:r,put:n,del:a}),[e,r,n,a])}const oh=new Set(["done","failed"]);function CV(e){const r=[],n=a=>{for(const i of a)r.push({number:i.number,title:i.title,state:i.state,labels:i.labels,activeTeam:i.activeTeam}),i.children.length>0&&n(i.children)};return n(e),r}function OV(e){var i,o,s,c;if(!e)return{health:"blocked",warnings:[],errors:["Install status unavailable"]};const r=[],n=[];return e.hooks.installed||(e.hooks.files.some(d=>d.hasCrlf)?r.push("Hook scripts have CRLF line endings — reinstall to fix"):r.push(`Hooks not installed (${e.hooks.found}/${e.hooks.total})`)),e.prompt.installed||r.push("Prompt file not installed"),e.agents.installed||r.push("Agent files not installed"),(i=e.settings)!=null&&i.exists||r.push("Settings file not installed"),(o=e.gitCommitStatus)!=null&&o.gitignored&&r.push(".claude/ is in .gitignore"),((s=e.gitCommitStatus)==null?void 0:s.health)==="red"&&!e.gitCommitStatus.gitignored&&r.push("Files not committed to default branch"),e.outdatedCount>0&&r.push(`${e.outdatedCount} file(s) outdated — reinstall to update`),((c=e.gitCommitStatus)==null?void 0:c.health)==="amber"&&r.push("Committed files are outdated"),{health:r.length>0?"blocked":n.length>0?"warn":"ready",warnings:n,errors:r}}function TV({message:e,onDone:r}){return k.useEffect(()=>{const n=setTimeout(r,2500);return()=>clearTimeout(n)},[r]),b.jsx("div",{className:"fixed bottom-6 left-1/2 -translate-x-1/2 z-[60] px-4 py-2 rounded bg-[#3FB950]/20 border border-[#3FB950]/40 text-[#3FB950] text-sm font-medium shadow-lg animate-fade-in",children:e})}function NV(e){switch(e){case"queued":return"Creating worktree...";case"launching":return"Starting Claude Code...";case"running":return"Team running";case"idle":return"Team idle";case"done":return"Completed";case"failed":return"Failed";case"stuck":return"Stuck";default:return e}}function MV(e){switch(e){case"assistant":return"text-[#58A6FF]";case"tool_use":return"text-[#D29922]";case"tool_result":return"text-[#A371F7]";case"result":return"text-[#3FB950]";default:return"text-[#8B949E]"}}function RV(e){var r,n,a;switch(e.type){case"assistant":{const i=(r=e.message)==null?void 0:r.content;if(Array.isArray(i)){const o=((n=i.find(s=>s.type==="text"))==null?void 0:n.text)??"";return o.substring(0,100)+(o.length>100?"...":"")}return""}case"tool_use":return((a=e.tool)==null?void 0:a.name)??"unknown";case"tool_result":return"completed";case"result":return"session complete";default:return""}}function PV({teamId:e,issueNumber:r,onClose:n}){const a=Ht(),[i,o]=k.useState("queued"),[s,c]=k.useState([]),[f,d]=k.useState([]),[h,m]=k.useState(null),g=k.useRef(null),y=k.useRef(null),x=k.useRef("queued");k.useEffect(()=>{let A=!1,C=null;async function O(){if(!A&&!oh.has(x.current)){try{const T=await a.get(`teams/${e}`);if(A)return;o(T.status),x.current=T.status,T.status==="failed"&&m(`Team failed${T.stoppedAt?` at ${new Date(T.stoppedAt).toLocaleTimeString()}`:""}`);const N=await a.get(`teams/${e}/output?lines=50`);if(A)return;c(N.lines);const M=await a.get(`teams/${e}/stream-events`);if(A)return;d(M)}catch{}!A&&!oh.has(x.current)&&(C=setTimeout(O,2e3))}}return O(),()=>{A=!0,C!==null&&clearTimeout(C)}},[a,e,i]),k.useEffect(()=>{var A;(A=g.current)==null||A.scrollIntoView({behavior:"smooth"})},[s]),k.useEffect(()=>{var A;(A=g.current)==null||A.scrollIntoView({behavior:"smooth"})},[f]);const E=k.useRef(n);k.useEffect(()=>{E.current=n},[n]),k.useEffect(()=>{i==="running"&&!y.current&&(y.current=setTimeout(()=>E.current(),3e3))},[i]),k.useEffect(()=>()=>{y.current&&(clearTimeout(y.current),y.current=null)},[]);const _=(()=>{switch(i){case"queued":case"launching":return"text-[#D29922]";case"running":return"text-[#3FB950]";case"failed":return"text-[#F85149]";default:return"text-dark-muted"}})(),w=i==="queued"||i==="launching";return b.jsxs("div",{className:"px-5 py-4 space-y-3",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[w&&b.jsxs("svg",{className:"animate-spin h-4 w-4 text-[#D29922]",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),i==="running"&&b.jsx("svg",{className:"h-4 w-4 text-[#3FB950]",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}),i==="failed"&&b.jsx("svg",{className:"h-4 w-4 text-[#F85149]",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})}),b.jsx("span",{className:`text-sm font-medium ${_}`,children:NV(i)}),b.jsxs("span",{className:"text-xs text-dark-muted ml-auto",children:["Issue #",r," · Team #",e]})]}),b.jsxs("div",{className:"space-y-1",children:[b.jsx(Sd,{label:"Team queued",done:!0}),b.jsx(Sd,{label:"Creating worktree...",done:i!=="queued",active:i==="queued"}),b.jsx(Sd,{label:"Starting Claude Code...",done:i==="running"||i==="done"||i==="idle",active:i==="launching"}),b.jsx(Sd,{label:"Team running",done:i==="running"||i==="done"||i==="idle",active:!1})]}),h&&b.jsx("div",{className:"px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149] text-sm",children:h}),f.length>0&&b.jsxs("div",{className:"bg-[#0D1117] border border-dark-border rounded p-2 max-h-[200px] overflow-y-auto font-mono text-xs",children:[f.slice(-30).map((A,C)=>{var O;return b.jsxs("div",{className:"py-0.5 leading-relaxed",children:[b.jsx("span",{className:"text-dark-muted",children:((O=A.timestamp)==null?void 0:O.substring(11,19))??"--:--:--"})," ",b.jsx("span",{className:MV(A.type),children:A.type})," ",b.jsx("span",{className:"text-dark-text",children:RV(A)})]},C)}),b.jsx("div",{ref:g})]}),f.length===0&&s.length>0&&b.jsxs("div",{className:"bg-dark-base border border-dark-border rounded p-2 max-h-[200px] overflow-y-auto font-mono text-xs text-dark-muted",children:[s.map((A,C)=>b.jsx("div",{className:"whitespace-pre-wrap break-all leading-relaxed",children:A},C)),b.jsx("div",{ref:g})]}),i==="running"&&b.jsx("p",{className:"text-xs text-[#3FB950]/70",children:"Auto-closing in 3 seconds..."})]})}function Sd({label:e,done:r,active:n}){return b.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[r?b.jsx("svg",{className:"h-3 w-3 text-[#3FB950]",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):n?b.jsxs("svg",{className:"animate-spin h-3 w-3 text-[#D29922]",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):b.jsx("div",{className:"h-3 w-3 rounded-full border border-dark-border"}),b.jsx("span",{className:r?"text-dark-text":n?"text-[#D29922]":"text-dark-muted",children:e})]})}function DV({open:e,onClose:r}){const n=Ht(),[a,i]=k.useState(!1),[o,s]=k.useState(!0),[c,f]=k.useState(""),[d,h]=k.useState(""),[m,g]=k.useState(""),[y,x]=k.useState("15000"),[E,_]=k.useState(!1),[w,A]=k.useState(null),[C,O]=k.useState(null),[T,N]=k.useState([]),[M,P]=k.useState(""),[L,D]=k.useState([]),[q,z]=k.useState(!1),[U,$]=k.useState(null),[Y,B]=k.useState(""),[Z,ae]=k.useState("green"),[V,fe]=k.useState(null),[F,X]=k.useState(null),ce=k.useRef(null),G=k.useRef(null);k.useEffect(()=>{if(e&&!V){const ne=setTimeout(()=>{var ge;return(ge=ce.current)==null?void 0:ge.focus()},50);return()=>clearTimeout(ne)}},[e,a,V]),k.useEffect(()=>{e&&(n.get("projects").then(ne=>{N(ne),ne.length===1&&P(String(ne[0].id))}).catch(()=>{N([])}),n.get("usage").then(ne=>{const ge=Math.max(ne.dailyPercent,ne.weeklyPercent,ne.sonnetPercent,ne.extraPercent);ge>80?ae("red"):ge>=50?ae("yellow"):ae("green")}).catch(()=>{ae("green")}))},[e,n]),k.useEffect(()=>{if(!M){D([]),$(null);return}let ne=!1;return z(!0),$(null),n.get(`projects/${M}/issues`).then(ge=>{if(ne)return;const _e=CV(ge.tree);D(_e)}).catch(ge=>{if(ne)return;const _e=ge instanceof Error?ge.message:String(ge);$(_e||"Failed to fetch issues"),D([])}).finally(()=>{ne||z(!1)}),()=>{ne=!0}},[M,n]),k.useEffect(()=>{e&&(f(""),h(""),g(""),x("15000"),A(null),i(!1),s(!0),P(""),fe(null),X(null),ae("green"),D([]),$(null),B(""))},[e]),k.useEffect(()=>{if(!e)return;function ne(ge){ge.key==="Escape"&&r()}return document.addEventListener("keydown",ne),()=>document.removeEventListener("keydown",ne)},[e,r]);const H=k.useCallback(ne=>{G.current&&!G.current.contains(ne.target)&&r()},[r]),te=k.useMemo(()=>{if(!Y.trim())return L;const ne=Y.toLowerCase().trim(),ge=ne.startsWith("#")?parseInt(ne.slice(1),10):/^\d+$/.test(ne)?parseInt(ne,10):NaN;return L.filter(_e=>!isNaN(ge)&&_e.number===ge||_e.title.toLowerCase().includes(ne)||String(_e.number).includes(ne))},[L,Y]),W=k.useMemo(()=>{const ne=new Map;for(const ge of T)ne.set(ge.id,OV(ge.installStatus));return ne},[T]),xe=k.useMemo(()=>M?W.get(parseInt(M,10))??null:null,[M,W]),ee=(xe==null?void 0:xe.health)==="blocked",le=k.useCallback(ne=>{f(String(ne.number)),B("")},[]),be=k.useCallback(async ne=>{if(A(null),T.length>0&&!M){A("Please select a project");return}const ge=parseInt(c.trim(),10);if(isNaN(ge)||ge<1){A("Issue number must be a positive integer");return}const _e=m.trim()||void 0,vt=M?parseInt(M,10):void 0;_(!0);try{const zt=await n.post("teams/launch",{issueNumber:ge,prompt:_e,projectId:vt,headless:o,...ne?{force:!0}:{}});fe(zt.id),X(ge)}catch(zt){const ma=zt instanceof Error?zt.message:String(zt);A(ma||"Failed to launch team")}finally{_(!1)}},[c,m,n,T,M,o]),he=k.useCallback(async()=>{A(null);const ne=d.trim();if(!ne){A("Enter at least one issue number");return}const ge=ne.split(/[,\s]+/).map(_t=>_t.trim()).filter(Boolean).map(_t=>parseInt(_t,10));if(ge.some(_t=>isNaN(_t)||_t<1)){A("All issue numbers must be positive integers");return}if(ge.length===0){A("Enter at least one issue number");return}const _e=parseInt(y.trim(),10);if(isNaN(_e)||_e<0){A("Stagger delay must be a non-negative number (ms)");return}if(T.length>0&&!M){A("Please select a project");return}const vt=ge.map(_t=>({number:_t})),zt=m.trim()||void 0,ma=M?parseInt(M,10):void 0;_(!0);try{await n.post("teams/launch-batch",{issues:vt,prompt:zt,delayMs:_e,projectId:ma,headless:o}),O(`Launched ${ge.length} team${ge.length>1?"s":""}`),r()}catch(_t){const Wr=_t instanceof Error?_t.message:String(_t);A(Wr||"Failed to launch batch")}finally{_(!1)}},[d,y,m,n,r,T,M,o]),Se=k.useCallback(ne=>{ne.key==="Enter"&&!E&&(a?he():be())},[a,E,be,he]);if(!e&&!C)return null;const se=V!==null&&F!==null;return b.jsxs(b.Fragment,{children:[C&&b.jsx(TV,{message:C,onDone:()=>O(null)}),e&&b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:H,children:b.jsxs("div",{ref:G,className:"w-[480px] max-w-[95vw] max-h-[90vh] flex flex-col bg-dark-surface border border-dark-border rounded-lg shadow-2xl",role:"dialog","aria-modal":"true","aria-label":se?"Launch Progress":"Launch Team",children:[b.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-dark-border",children:[b.jsx("h2",{className:"text-base font-semibold text-dark-text",children:se?"Launch Progress":"Launch Team"}),b.jsx("button",{onClick:r,className:"text-dark-muted hover:text-dark-text transition-colors p-1 rounded hover:bg-dark-border/30",title:"Close (Esc)",children:b.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),se?b.jsx(PV,{teamId:V,issueNumber:F,onClose:r}):b.jsxs("div",{className:"px-5 py-4 space-y-4 overflow-y-auto",children:[T.length>0?b.jsxs("div",{children:[b.jsxs("label",{className:"block text-sm text-dark-muted mb-1",children:["Project ",b.jsx("span",{className:"text-[#F85149]",children:"*"})]}),b.jsxs("select",{value:M,onChange:ne=>P(ne.target.value),className:"w-full px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:E,children:[b.jsx("option",{value:"",children:"Select a project..."}),T.map(ne=>{const ge=W.get(ne.id),_e=(ge==null?void 0:ge.health)==="blocked",vt=_e?" (not ready — fix on Projects page)":(ge==null?void 0:ge.health)==="warn"?" (warnings)":"";return b.jsxs("option",{value:ne.id,disabled:_e,children:[ne.name,vt]},ne.id)})]})]}):b.jsx("div",{className:"px-3 py-2 rounded border border-[#D29922]/30 bg-[#D29922]/10 text-[#D29922] text-sm",children:"Add a project first"}),(xe==null?void 0:xe.health)==="blocked"&&b.jsxs("div",{className:"px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149] text-sm",children:[b.jsx("p",{className:"font-medium",children:"Project not ready for launch"}),b.jsx("ul",{className:"mt-1 list-disc list-inside text-xs",children:xe.errors.map((ne,ge)=>b.jsx("li",{children:ne},ge))}),b.jsx("p",{className:"mt-1 text-xs opacity-80",children:"Fix these issues on the Projects page before launching."})]}),(xe==null?void 0:xe.health)==="warn"&&b.jsxs("div",{className:"px-3 py-2 rounded border border-[#D29922]/30 bg-[#D29922]/10 text-[#D29922] text-sm",children:[b.jsx("p",{className:"font-medium",children:"Project has warnings"}),b.jsx("ul",{className:"mt-1 list-disc list-inside text-xs",children:xe.warnings.map((ne,ge)=>b.jsx("li",{children:ne},ge))})]}),b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsxs("label",{className:"flex items-center gap-2 cursor-pointer select-none",children:[b.jsx("input",{type:"checkbox",checked:a,onChange:ne=>i(ne.target.checked),className:"w-4 h-4 rounded border-dark-border bg-dark-base text-dark-accent focus:ring-dark-accent/50 focus:ring-offset-0 accent-[#58A6FF]"}),b.jsx("span",{className:"text-sm text-dark-muted",children:"Batch mode"})]}),b.jsxs("label",{className:"flex items-center gap-2 cursor-pointer select-none",title:o?"Runs Claude Code in the background with no visible window":"Opens Claude Code in a visible terminal window",children:[b.jsx("input",{type:"checkbox",checked:o,onChange:ne=>s(ne.target.checked),className:"w-4 h-4 rounded border-dark-border bg-dark-base text-dark-accent focus:ring-dark-accent/50 focus:ring-offset-0 accent-[#58A6FF]"}),b.jsx("span",{className:"text-sm text-dark-muted",children:"Run headless (background)"}),!o&&b.jsx("span",{className:"text-xs text-dark-muted/60",children:"— opens in a visible terminal window"})]})]}),a?b.jsxs(b.Fragment,{children:[b.jsxs("div",{children:[b.jsxs("label",{className:"block text-sm text-dark-muted mb-1",children:["Issue numbers ",b.jsx("span",{className:"text-[#F85149]",children:"*"})]}),b.jsx("input",{ref:ce,type:"text",value:d,onChange:ne=>h(ne.target.value),onKeyDown:Se,placeholder:"e.g. 763, 812, 756",className:"w-full px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:E}),b.jsx("p",{className:"text-xs text-dark-muted mt-1",children:"Comma or space separated"})]}),b.jsxs("div",{children:[b.jsx("label",{className:"block text-sm text-dark-muted mb-1",children:"Stagger delay (ms)"}),b.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",value:y,onChange:ne=>x(ne.target.value),placeholder:"15000",className:"w-full px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:E})]})]}):b.jsxs("div",{className:"space-y-2",children:[M&&b.jsxs("div",{children:[b.jsx("label",{className:"block text-sm text-dark-muted mb-1",children:"Select issue"}),q&&b.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 text-xs text-dark-muted",children:[b.jsxs("svg",{className:"animate-spin h-3 w-3",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),"Loading issues..."]}),U&&b.jsx("div",{className:"px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149] text-xs",children:U}),!q&&!U&&L.length>0&&b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"relative mb-1",children:[b.jsx("input",{type:"text",value:Y,onChange:ne=>B(ne.target.value),placeholder:"Filter issues... (#number or title)",className:"w-full px-3 py-1.5 text-xs rounded border border-dark-border bg-[#0D1117] text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:E}),Y&&b.jsx("button",{onClick:()=>B(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-dark-muted hover:text-dark-text transition-colors","aria-label":"Clear search",children:b.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"})})})]}),b.jsx("div",{className:"max-h-[200px] overflow-y-auto border border-dark-border rounded bg-[#0D1117]",children:te.length===0?b.jsxs("div",{className:"px-3 py-2 text-xs text-dark-muted",children:["No issues match “",Y,"”"]}):te.map(ne=>{const ge=c===String(ne.number),_e=!!ne.activeTeam;return b.jsxs("button",{onClick:()=>le(ne),disabled:E,className:`w-full text-left px-3 py-1.5 text-xs flex items-center gap-2 transition-colors border-b border-dark-border/30 last:border-b-0 ${ge?"bg-dark-accent/15 text-dark-accent":"hover:bg-dark-surface text-dark-text"}`,children:[ne.state==="open"?b.jsxs("svg",{className:"w-3.5 h-3.5 text-[#3FB950] shrink-0",viewBox:"0 0 16 16",fill:"currentColor",children:[b.jsx("path",{d:"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),b.jsx("path",{d:"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"})]}):b.jsxs("svg",{className:"w-3.5 h-3.5 text-[#A371F7] shrink-0",viewBox:"0 0 16 16",fill:"currentColor",children:[b.jsx("path",{d:"M11.28 6.78a.75.75 0 0 0-1.06-1.06L7.25 8.69 5.78 7.22a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.06 0l3.5-3.5Z"}),b.jsx("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 1 0-13 0 6.5 6.5 0 0 0 13 0Z"})]}),b.jsxs("span",{className:"text-dark-muted shrink-0",children:["#",ne.number]}),b.jsx("span",{className:"truncate",children:ne.title}),_e&&b.jsx("span",{className:"ml-auto shrink-0 px-1.5 py-0.5 rounded text-[10px] font-medium bg-[#D29922]/15 text-[#D29922] border border-[#D29922]/30",children:ne.activeTeam.status}),ge&&b.jsx("svg",{className:"w-3.5 h-3.5 text-dark-accent ml-auto shrink-0",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})]},ne.number)})}),b.jsxs("p",{className:"text-xs text-dark-muted mt-1",children:[L.length," issue",L.length!==1?"s":""," found",Y&&te.length!==L.length&&` (${te.length} matching)`]})]}),!q&&!U&&L.length===0&&b.jsx("div",{className:"px-3 py-2 text-xs text-dark-muted",children:"No issues found for this project"})]}),b.jsxs("div",{children:[b.jsxs("label",{className:"block text-sm text-dark-muted mb-1",children:["Issue number ",b.jsx("span",{className:"text-[#F85149]",children:"*"}),M&&L.length>0&&b.jsx("span",{className:"text-dark-muted/50 text-xs ml-1",children:"(or type manually)"})]}),b.jsx("input",{ref:ce,type:"text",inputMode:"numeric",pattern:"[0-9]*",value:c,onChange:ne=>f(ne.target.value),onKeyDown:Se,placeholder:"e.g. 763",className:"w-full px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:E})]})]}),b.jsxs("div",{children:[b.jsxs("label",{className:"block text-sm text-dark-muted mb-1",children:["Prompt ",b.jsx("span",{className:"text-dark-muted/50",children:"(optional)"})]}),b.jsx("input",{type:"text",value:m,onChange:ne=>g(ne.target.value),onKeyDown:Se,placeholder:"Custom prompt (default: project prompt file)",className:"w-full px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:E}),b.jsxs("p",{className:"text-xs text-dark-muted mt-1",children:["Leave empty to use the project's prompt file (with ",b.jsx("code",{className:"text-dark-accent/70",children:"{{ISSUE_NUMBER}}"})," replaced automatically)."]})]}),Z==="red"&&b.jsx("div",{className:"px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149] text-sm",children:'Usage is in the red zone (>80%). New launches will be queued instead of started immediately. Use "Force Launch" to override.'}),w&&b.jsx("div",{className:"px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149] text-sm",children:w})]}),b.jsxs("div",{className:"flex items-center justify-end gap-3 px-5 py-4 border-t border-dark-border",children:[b.jsx("button",{onClick:r,className:"px-3 py-1.5 text-sm rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors",children:se?"Close":"Cancel"}),!se&&b.jsxs(b.Fragment,{children:[b.jsx("button",{onClick:()=>a?he():void be(),disabled:E||T.length===0||ee,className:"px-4 py-1.5 text-sm font-medium rounded border border-dark-accent/40 text-dark-accent bg-dark-accent/10 hover:bg-dark-accent/20 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:E?"Launching...":Z==="red"?a?"Queue All":"Queue":a?"Launch All":"Launch"}),Z==="red"&&!a&&b.jsx("button",{onClick:()=>void be(!0),disabled:E||T.length===0||ee,className:"px-4 py-1.5 text-sm font-medium rounded border border-[#F85149]/40 text-[#F85149] bg-[#F85149]/10 hover:bg-[#F85149]/20 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",title:"Force launch ignoring red zone usage limits",children:"Force Launch"})]})]})]})})]})}function LV({size:e=20,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("rect",{width:"7",height:"7",x:"3",y:"3",rx:"1"}),b.jsx("rect",{width:"7",height:"7",x:"14",y:"3",rx:"1"}),b.jsx("rect",{width:"7",height:"7",x:"14",y:"14",rx:"1"}),b.jsx("rect",{width:"7",height:"7",x:"3",y:"14",rx:"1"})]})}function IV({size:e=20,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("line",{x1:"6",x2:"6",y1:"3",y2:"15"}),b.jsx("circle",{cx:"18",cy:"6",r:"3"}),b.jsx("circle",{cx:"6",cy:"18",r:"3"}),b.jsx("path",{d:"M18 9a9 9 0 0 1-9 9"})]})}function zV({size:e=20,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{d:"M3 3v18h18"}),b.jsx("path",{d:"M18 17V9"}),b.jsx("path",{d:"M13 17V5"}),b.jsx("path",{d:"M8 17v-3"})]})}function qV({size:e=20,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5"}),b.jsx("circle",{cx:"13",cy:"12",r:"2"}),b.jsx("path",{d:"M18 19c-2.8 0-5-2.2-5-5v8"}),b.jsx("circle",{cx:"20",cy:"19",r:"2"})]})}function BV({size:e=14,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z"}),b.jsx("path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z"}),b.jsx("path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0"}),b.jsx("path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"})]})}function $V({size:e=14,className:r}){return b.jsx("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:b.jsx("polygon",{points:"6 3 20 12 6 21 6 3"})})}function DS({size:e=14,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),b.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function FV({size:e=14,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}),b.jsx("path",{d:"M21 3v5h-5"}),b.jsx("path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}),b.jsx("path",{d:"M8 16H3v5"})]})}function UV({size:e=20,className:r}){return b.jsx("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:b.jsx("path",{d:"M22 12h-4l-3 9L9 3l-3 9H2"})})}function HV({size:e=14,className:r}){return b.jsx("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:b.jsx("path",{d:"M13 2L3 14h9l-1 8 10-12h-9l1-8z"})})}function GV({size:e=14,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),b.jsx("circle",{cx:"12",cy:"7",r:"4"})]})}function VV({size:e=14,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("circle",{cx:"12",cy:"12",r:"10"}),b.jsx("polyline",{points:"12 6 12 12 16 14"})]})}function h5({size:e=14,className:r}){return b.jsx("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:b.jsx("path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"})})}function KV({size:e=14,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("circle",{cx:"12",cy:"12",r:"1"}),b.jsx("circle",{cx:"19",cy:"12",r:"1"}),b.jsx("circle",{cx:"5",cy:"12",r:"1"})]})}function YV({size:e=14,className:r}){return b.jsxs("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2"}),b.jsx("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]})}function XV({size:e=14,className:r}){return b.jsx("svg",{className:r,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:b.jsx("path",{d:"m9 18 6-6-6-6"})})}const Zn={queued:"#8B949E",launching:"#D29922",running:"#3FB950",idle:"#D29922",stuck:"#F85149",done:"#A371F7",failed:"#F85149"};function W6(e,r){const n=Math.max(0,r-10);return e>=r?"#F85149":e>=n?"#D29922":"#3FB950"}const p5={"team-lead":"#58A6FF",coordinator:"#58A6FF",tl:"#58A6FF",analyst:"#D29922",dev:"#3FB950",developer:"#3FB950",reviewer:"#A371F7"},m5=["#58A6FF","#3FB950","#D29922","#A371F7","#F778BA","#79C0FF","#7EE787","#E3B341","#D2A8FF","#FF7B72"];function kc(e,r){if(r){const i=p5[r.toLowerCase()];if(i)return i}const n=p5[e.toLowerCase()];if(n)return n;let a=0;for(let i=0;i<e.length;i++)a=(a<<5)-a+e.charCodeAt(i)|0;return m5[Math.abs(a)%m5.length]}function u2(e){if(!e)return null;const r=new Date(e).getTime()-Date.now();if(r<=0)return null;const n=Math.floor(r/36e5),a=Math.floor(r%36e5/6e4);return n>0?`Resets in ${n}h ${a}m`:`Resets in ${a}m`}const WV={daily:85,weekly:95,sonnet:95,extra:95};function ZV(){const{teams:e}=Ec(),r=Ht(),[n,a]=k.useState(!1),[i,o]=k.useState(null),s=k.useCallback(async()=>{try{const g=await r.get("usage");o(g)}catch{}},[r]);k.useEffect(()=>{s();const g=setInterval(s,3e4);return()=>clearInterval(g)},[s]);const c=e.reduce((g,y)=>(g[y.status]=(g[y.status]||0)+1,g),{}),f=(i==null?void 0:i.redThresholds)??WV,d=i?[{key:"daily",label:"Daily",percent:i.dailyPercent,redThreshold:f.daily,resetLabel:u2(i.dailyResetsAt)},{key:"weekly",label:"Weekly",percent:i.weeklyPercent,redThreshold:f.weekly,resetLabel:u2(i.weeklyResetsAt)},{key:"sonnet",label:"Sonnet",percent:i.sonnetPercent,redThreshold:f.sonnet,resetLabel:null},{key:"extra",label:"Extra",percent:i.extraPercent,redThreshold:f.extra,resetLabel:null}]:[],h=[{label:"running",count:c.running||0,color:Zn.running},{label:"queued",count:c.queued||0,color:Zn.queued},{label:"launching",count:c.launching||0,color:Zn.launching},{label:"idle",count:c.idle||0,color:Zn.idle},{label:"stuck",count:c.stuck||0,color:Zn.stuck}].filter(g=>g.count>0),m=(i==null?void 0:i.zone)==="red";return b.jsxs(b.Fragment,{children:[b.jsxs("header",{className:"h-12 min-h-[48px] bg-dark-surface border-b border-dark-border flex items-center px-4 justify-between shrink-0",children:[b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("img",{src:"/logo.svg",alt:"Fleet Commander logo",width:20,height:20}),b.jsx("h1",{className:"text-sm font-semibold text-dark-text tracking-wide",children:"Fleet Commander"})]}),b.jsxs("div",{className:"flex items-center gap-3",children:[h.map((g,y)=>b.jsxs("span",{className:"text-xs font-medium",children:[b.jsx("span",{style:{color:g.color},children:g.count}),b.jsx("span",{className:"text-dark-muted ml-1",children:g.label}),y<h.length-1&&b.jsx("span",{className:"text-dark-muted ml-3",children:"·"})]},g.label)),d.length>0&&h.length>0&&b.jsx("span",{className:"text-dark-muted mx-1",children:"|"}),d.map(g=>b.jsxs("span",{className:"text-xs font-medium",title:g.resetLabel??void 0,children:[b.jsx("span",{className:"text-dark-muted",children:g.label})," ",b.jsxs("span",{style:{color:W6(g.percent,g.redThreshold)},children:[g.percent.toFixed(0),"%"]})]},g.key)),m&&b.jsx("span",{className:"text-xs font-bold animate-pulse",style:{color:"#F85149"},children:"PAUSED"}),b.jsxs("button",{type:"button",onClick:g=>{g.stopPropagation(),g.preventDefault(),a(!0)},className:"ml-2 px-3 py-1 text-xs font-medium rounded border border-dark-accent/40 text-dark-accent hover:bg-dark-accent/10 transition-colors inline-flex items-center gap-1.5",title:"Launch a new team",children:[b.jsx(BV,{size:14}),"Launch Team"]})]})]}),RS.createPortal(b.jsx(DV,{open:n,onClose:()=>a(!1)}),document.body)]})}const QV=[{to:"/",label:"Fleet Grid",icon:b.jsx(LV,{})},{to:"/issues",label:"Issue Tree",icon:b.jsx(IV,{})},{to:"/usage",label:"Usage View",icon:b.jsx(zV,{})},{to:"/projects",label:"Projects",icon:b.jsx(qV,{})},{to:"/lifecycle",label:"Lifecycle",icon:b.jsx(UV,{size:20})},{to:"/settings",label:"Settings",icon:b.jsx(DS,{size:20})}];function JV(){return b.jsx("nav",{className:"w-14 min-w-[56px] bg-dark-surface border-r border-dark-border flex flex-col items-center pt-2 gap-1",children:QV.map(e=>b.jsx(V6,{to:e.to,end:e.to==="/",title:e.label,className:({isActive:r})=>`w-10 h-10 flex items-center justify-center rounded-md text-lg transition-colors ${r?"text-dark-accent bg-dark-accent/10":"text-dark-muted hover:text-dark-text hover:bg-dark-border/50"}`,children:e.icon},e.to))})}function eK(){const{connected:e,lastEvent:r}=Ec(),[n,a]=k.useState(null),[i,o]=k.useState(null);return k.useEffect(()=>{fetch("/api/health").then(s=>s.json()).then(s=>{s.version&&o(s.version)}).catch(()=>{})},[]),k.useEffect(()=>{if(!r){a(null);return}const s=()=>{a(Math.floor((Date.now()-r.getTime())/1e3))};s();const c=setInterval(s,1e3);return()=>clearInterval(c)},[r]),b.jsxs("footer",{className:"h-6 min-h-[24px] bg-dark-base border-t border-dark-border flex items-center px-3 text-xs text-dark-muted select-none",children:[b.jsx("span",{className:`inline-block w-2 h-2 rounded-full mr-2 ${e?"bg-green-500":"bg-red-500"}`}),b.jsx("span",{children:e?"Connected":"Disconnected"}),n!==null&&b.jsxs("span",{className:"ml-4",children:["Last update: ",n,"s ago"]}),i&&b.jsxs("span",{className:"ml-auto",children:["v",i]})]})}const tK={queued:"Queued",running:"Running",stuck:"Stuck",idle:"Idle",done:"Done",failed:"Failed",launching:"Launching"};function LS({status:e}){const r=Zn[e]??"#8B949E",n=tK[e]??e;let a="";return e==="stuck"?a="animate-pulse-stuck":e==="launching"&&(a="animate-blink"),b.jsxs("span",{className:"inline-flex items-center gap-2",children:[b.jsx("span",{className:`inline-block w-2.5 h-2.5 rounded-full shrink-0 ${a}`,style:{backgroundColor:r}}),b.jsx("span",{className:"text-sm font-medium",style:{color:r},children:n})]})}function rK(e,r){return e==="success"?{icon:"✓",color:"#3FB950"}:e==="failure"?{icon:"✕",color:"#F85149"}:e==="cancelled"?{icon:"―",color:"#8B949E"}:r==="in_progress"||r==="queued"||r==="pending"?{icon:"○",color:"#D29922"}:{icon:"○",color:"#8B949E"}}function Z6({checks:e}){return e.length===0?b.jsx("p",{className:"text-dark-muted text-sm",children:"No CI checks available"}):b.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.map((r,n)=>{const{icon:a,color:i}=rK(r.conclusion,r.status),o=r.conclusion==="success"?"rgba(63, 185, 80, 0.15)":r.conclusion==="failure"?"rgba(248, 81, 73, 0.15)":r.conclusion==="cancelled"?"rgba(139, 148, 158, 0.15)":"rgba(210, 153, 34, 0.15)";return b.jsxs("span",{className:"inline-flex items-center gap-1 text-xs px-2 py-0.5 rounded-full max-w-[10rem]",style:{backgroundColor:o},title:r.name,children:[b.jsx("span",{className:"font-bold leading-none shrink-0",style:{color:i},children:a}),b.jsx("span",{className:"truncate",style:{color:i},children:r.name})]},`${r.name}-${n}`)})})}const IS="__pm__",zS="__fc__";function nK(e){return e===IS?"You":e===zS?"FC":e==="team-lead"||e==="tl"?"TL":e.charAt(0).toUpperCase()+e.slice(1)}const aK={[IS]:"#3FB950",[zS]:"#D29922"};function iK({roster:e,activeFilters:r,onFiltersChange:n,hasUserEntries:a,hasFcEntries:i}){const o=k.useMemo(()=>{const d=new Set;d.add("team-lead");for(const m of e)d.add(m.name.toLowerCase());const h=Array.from(d).sort((m,g)=>m==="team-lead"?-1:g==="team-lead"?1:m.localeCompare(g));return a&&h.push(IS),i&&h.push(zS),h},[e,a,i]);if(o.length<=1)return null;const s=r.size===0||r.size===o.length,c=()=>{n(new Set)},f=d=>{const h=new Set(r);if(s){n(new Set([d]));return}if(h.has(d)){if(h.delete(d),h.size===0){n(new Set);return}}else if(h.add(d),h.size===o.length){n(new Set);return}n(h)};return b.jsxs("div",{className:"flex items-center gap-1 mb-2 flex-wrap",children:[b.jsx("button",{onClick:c,className:"px-2 py-0.5 text-[10px] font-medium rounded-full border transition-all duration-150",style:s?{color:"#C9D1D9",borderColor:"#C9D1D960",backgroundColor:"#C9D1D918"}:{color:"#484F58",borderColor:"#484F5840",opacity:.7},children:"All"}),o.map(d=>{const h=aK[d]??kc(d,d),m=!s&&r.has(d);return b.jsxs("button",{onClick:()=>f(d),className:"px-2 py-0.5 text-[10px] font-medium rounded-full border transition-all duration-150 flex items-center gap-1",style:m?{color:h,borderColor:h+"60",backgroundColor:h+"18"}:{color:"#484F58",borderColor:"#484F5840",opacity:.5},children:[b.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:m?h:"#484F58"}}),nK(d)]},d)})]})}function Eo(e){return!e||e==="team-lead"||e==="tl"?"TL":e.charAt(0).toUpperCase()+e.slice(1)}const oK={assistant:{color:"#58A6FF",label:"TL"},user:{color:"#3FB950",label:"You"},fc:{color:"#D29922",label:"FC"},system:{color:"#8B949E",label:"system"},tool_use:{color:"#D29922",label:"tool"},tool_result:{color:"#A371F7",label:"result"},result:{color:"#3FB950",label:"done"},rate_limit_event:{color:"#D29922",label:"rate-limit"}};function lh(e){return oK[e]??{color:"#8B949E",label:e}}const lK={initial_prompt:"prompt",origin_sync:"sync",idle_nudge:"idle",stuck_nudge:"nudge",ci_green:"CI pass",ci_red:"CI fail",ci_blocked:"CI blocked",pr_merged_shutdown:"shutdown",subagent_crash:"crash"};function Q6(e){return e?lK[e]??e:null}const J6=new Set(["assistant","user","fc"]);function eL(e){var n;if(!J6.has(e.streamType))return"";const r=(n=e.message)==null?void 0:n.content;return Array.isArray(r)?r.filter(a=>a.type==="text"&&a.text).map(a=>a.text).join(`
61
+ `):""}const sK=new Set(["SessionStart","SessionEnd","Stop","SubagentStart","SubagentStop"]),uK=new Set(["ToolError","StopFailure"]);function cK(e){if(!e)return null;try{const r=JSON.parse(e);if(typeof r=="object"&&r!==null&&"error"in r&&typeof r.error=="string")return r.error}catch{}return null}function qa(e){try{return new Date(e).toLocaleTimeString([],{hour12:!1,hour:"2-digit",minute:"2-digit"})}catch{return"--:--"}}function v5(e){if(e.streamType==="user")return{label:"You",color:"#3FB950"};if(e.streamType==="fc")return{label:"FC",color:"#D29922"};if(e.agentName&&(e.streamType==="assistant"||e.streamType==="tool_use")){const r=Eo(e.agentName),n=kc(e.agentName,e.agentName);return{label:r,color:n}}return lh(e.streamType)}function fK(e){if(e.agentName){const r=Eo(e.agentName),n=kc(e.agentName,e.agentName);return{label:r,color:n}}return{label:"System",color:"#8B949E"}}const dK=120;function Pl(e,r=dK){return e.length<=r?e:e.slice(0,r)+"..."}function tL(e){var a;if(e.streamType!=="tool_use"||!((a=e.tool)!=null&&a.name)||!e.tool.input)return null;const r=e.tool.input;switch(e.tool.name){case"Bash":{const i=r.command;return typeof i=="string"?Pl(i):null}case"Read":{const i=r.file_path;return typeof i=="string"?i:null}case"Write":{const i=r.file_path;return typeof i=="string"?i:null}case"Edit":{const i=r.file_path,o=r.old_string,s=r.new_string,c=[];return typeof i=="string"&&c.push(i),typeof o=="string"&&typeof s=="string"&&c.push(Pl(o,50)+" -> "+Pl(s,50)),c.length>0?c.join(" "):null}case"Grep":{const i=r.pattern,o=r.path,s=[];return typeof i=="string"&&s.push(`/${i}/`),typeof o=="string"&&s.push(o),s.length>0?s.join(" in "):null}case"Glob":{const i=r.pattern;return typeof i=="string"?i:null}case"SendMessage":{const i=r.to,o=r.message,s=[];return typeof i=="string"&&s.push(`to ${i}`),typeof o=="string"&&s.push(Pl(o,80)),s.length>0?s.join(": "):null}case"Agent":{const i=r.name,o=r.message,s=[];return typeof i=="string"&&s.push(i),typeof o=="string"&&s.push(Pl(o,80)),s.length>0?s.join(": "):null}default:{try{const i=JSON.stringify(r);if(i.length>2)return Pl(i)}catch{}return null}}}function hK({entry:e}){var s,c;const[r,n]=k.useState(!1),a=eL(e),i=a.includes(`
62
+ `),o=tL(e);if(e.streamType==="system"&&(e.subtype==="task_progress"||e.subtype==="task_notification")){const f=Eo(e.agentName),d=e.agentName?kc(e.agentName,e.agentName):"#8B949E",h=e.lastToolName??((s=e.tool)==null?void 0:s.name),m=e.description;return b.jsxs("div",{className:"py-0 leading-snug flex items-center gap-1.5 text-dark-muted",children:[b.jsx("span",{children:qa(e.timestamp)}),b.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:d}}),b.jsx("span",{style:{color:d},className:"font-medium",children:f}),h&&b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"text-dark-muted",children:b.jsx(DS,{size:10})}),b.jsx("span",{className:"text-dark-muted",children:h})]}),m&&b.jsx("span",{className:"text-dark-muted truncate",children:m})]})}if(J6.has(e.streamType)&&a){const{label:f,color:d}=v5(e);return b.jsxs("div",{className:"py-0.5 leading-relaxed",children:[b.jsx("span",{className:"text-dark-muted",children:qa(e.timestamp)})," ",b.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full mr-0.5 align-middle",style:{backgroundColor:d}}),b.jsx("span",{style:{color:d},className:"font-semibold",children:f}),e.streamType==="fc"&&e.subtype&&b.jsxs("span",{className:"text-dark-muted text-[10px] ml-1",children:["[",Q6(e.subtype),"]"]})," ",i?b.jsx("span",{className:"text-dark-text whitespace-pre-wrap",children:a}):b.jsx("span",{className:"text-dark-text",children:a})]})}if(e.streamType==="tool_use"&&((c=e.tool)!=null&&c.name)){const{label:f,color:d}=v5(e),h=o!==null;return b.jsxs("div",{children:[b.jsxs("div",{className:"py-0 leading-snug flex items-center gap-1.5",children:[b.jsx("span",{className:"text-dark-muted",children:qa(e.timestamp)}),b.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:d}}),b.jsx("span",{style:{color:d},className:"font-semibold",children:f}),b.jsx("span",{className:`text-dark-muted bg-dark-border/30 px-1.5 py-0.5 rounded${h?" cursor-pointer border-b border-dotted border-dark-border hover:bg-dark-border/50":""}`,onClick:h?()=>n(m=>!m):void 0,onKeyDown:h?m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n(g=>!g))}:void 0,role:h?"button":void 0,tabIndex:h?0:void 0,"aria-expanded":h?r:void 0,children:e.tool.name})]}),r&&o&&b.jsx("div",{className:"text-dark-muted pl-6 pb-0.5 font-mono truncate",title:o,children:o})]})}if(e.streamType==="result"||e.streamType==="tool_result"){const{color:f,label:d}=lh(e.streamType);return b.jsxs("div",{className:"py-0 leading-snug text-dark-muted",children:[b.jsx("span",{className:"text-dark-muted",children:qa(e.timestamp)})," ",b.jsx("span",{style:{color:f},className:"font-semibold",children:d})]})}if(a){const{color:f,label:d}=lh(e.streamType);return b.jsxs("div",{className:"py-0 leading-snug text-dark-muted",children:[b.jsx("span",{className:"text-dark-muted",children:qa(e.timestamp)})," ",b.jsx("span",{style:{color:f},className:"font-semibold",children:d})," ",b.jsx("span",{className:"text-dark-text",children:a})]})}return null}function pK({entry:e}){const r=sK.has(e.eventType),n=uK.has(e.eventType),a=n?cK(e.payload):null,{label:i,color:o}=fK(e),[s,c]=k.useState(!1);if(r){const f=e.eventType==="SessionStart"||e.eventType==="SubagentStart"?"#3FB950":"#8B949E";return b.jsxs("div",{className:"py-0 leading-snug flex items-center gap-1.5 text-dark-muted",children:[b.jsx("span",{children:qa(e.timestamp)}),b.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:o}}),b.jsx("span",{style:{color:o},className:"font-medium",children:i}),b.jsx("span",{className:"font-normal px-1.5 rounded",style:{color:f,backgroundColor:f+"18"},children:e.eventType})]})}if(n){const f=a!==null;return b.jsxs("div",{className:"py-0 leading-snug text-dark-muted",children:[b.jsxs("div",{className:"flex items-center gap-1.5",children:[b.jsx("span",{children:qa(e.timestamp)}),b.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:o}}),b.jsx("span",{style:{color:o},className:"font-medium",children:i}),b.jsx("span",{className:`font-normal bg-red-500/20 text-red-400 px-1.5 py-0.5 rounded${f?" cursor-pointer border-b border-dotted border-red-400/40 hover:bg-red-500/30":""}`,onClick:f?()=>c(d=>!d):void 0,onKeyDown:f?d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),c(h=>!h))}:void 0,role:f?"button":void 0,tabIndex:f?0:void 0,"aria-expanded":f?s:void 0,children:e.eventType}),e.toolName&&b.jsx("span",{className:"text-dark-muted bg-dark-border/30 px-1.5 rounded",children:e.toolName})]}),s&&a&&b.jsx("div",{className:"ml-[52px] text-[#F85149] mt-0.5 line-clamp-2",children:a})]})}return b.jsxs("div",{className:"py-0 leading-snug flex items-center gap-1.5 text-dark-muted",children:[b.jsx("span",{children:qa(e.timestamp)}),b.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:o}}),b.jsx("span",{style:{color:o},className:"font-medium",children:i}),b.jsx("span",{className:"text-dark-text font-normal",children:e.eventType}),e.toolName&&b.jsx("span",{className:"text-dark-muted bg-dark-border/30 px-1.5 rounded",children:e.toolName})]})}function mK(e){return e.source==="stream"?e.streamType==="user"?"__pm__":e.streamType==="fc"?"__fc__":e.agentName:e.agentName}function vK({teamId:e,teamStatus:r,isThinking:n,roster:a,agentFilters:i,onAgentFiltersChange:o}){const s=Ht(),[c,f]=k.useState([]),[d,h]=k.useState(!1),[m,g]=k.useState(!1),y=k.useRef(null),x=k.useRef(null),E=k.useRef(!0),_=k.useRef(2e3),w=k.useCallback(()=>{const N=y.current;if(!N)return;const M=N.scrollHeight-N.scrollTop-N.clientHeight<40;E.current=M},[]);k.useEffect(()=>{let N=!1,M=null;_.current=2e3;async function P(){if(!N){try{const L=await s.get(`teams/${e}/timeline?limit=500`);N||f(L)}catch{}!N&&!oh.has(r)&&(M=setTimeout(P,_.current),_.current=Math.min(_.current*2,3e4))}}return P(),()=>{N=!0,M!==null&&clearTimeout(M)}},[s,e,r]);const A=k.useMemo(()=>!i||i.size===0?c:c.filter(N=>{const M=mK(N);return M?i.has(M):!0}),[c,i]);k.useEffect(()=>{var N;E.current&&((N=x.current)==null||N.scrollIntoView({behavior:"smooth"}))},[A.length]);const C=k.useCallback(()=>{var M;const N=[];for(const P of A){const L=qa(P.timestamp);if(P.source==="stream"){const D=eL(P);if(D){const q=P.agentName?Eo(P.agentName):lh(P.streamType).label,z=P.streamType==="fc"&&P.subtype?` [${Q6(P.subtype)}]`:"";N.push(`[${L}] ${q}${z}: ${D}`)}else if(P.streamType==="tool_use"&&((M=P.tool)!=null&&M.name)){const q=P.agentName?Eo(P.agentName):"tool",z=tL(P),U=z?` — ${z}`:"";N.push(`[${L}] ${q}: ${P.tool.name}${U}`)}else if(P.streamType==="system"&&P.description){const q=P.agentName?Eo(P.agentName):"system";N.push(`[${L}] ${q}: ${P.lastToolName??""} ${P.description}`)}}else{const D=P,q=D.agentName?Eo(D.agentName):"System";let z=D.eventType;D.toolName&&(z+=` (${D.toolName})`),N.push(`[${L}] ${q}: ${z}`)}}navigator.clipboard.writeText(N.join(`
63
+ `)).then(()=>{h(!0),setTimeout(()=>h(!1),2e3)}).catch(()=>{g(!0),setTimeout(()=>g(!1),2e3)})},[A]),O=k.useMemo(()=>c.some(N=>N.source==="stream"&&N.streamType==="user"),[c]),T=k.useMemo(()=>c.some(N=>N.source==="stream"&&N.streamType==="fc"),[c]);if(c.length===0){const N=oh.has(r);return b.jsx("div",{className:"text-[11px] text-dark-muted italic py-2",children:N?"No session log captured.":"No events yet. Events appear when Claude Code is running."})}return b.jsxs("div",{className:"relative flex-1 min-h-0 flex flex-col",children:[a&&o&&b.jsx(iK,{roster:a,activeFilters:i??new Set,onFiltersChange:o,hasUserEntries:O,hasFcEntries:T}),b.jsx("button",{onClick:C,className:"absolute top-1.5 right-1.5 z-10 px-2 py-0.5 text-[10px] rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted bg-[#0D1117] transition-colors",title:"Copy full log to clipboard",children:d?"Copied!":m?"Failed":"Copy"}),b.jsxs("div",{ref:y,onScroll:w,className:`flex-1 min-h-0 font-mono text-[11px] overflow-y-auto bg-[#0D1117] p-2 rounded border border-dark-border custom-scrollbar${n?" thinking-glow":""}`,children:[A.map(N=>N.source==="stream"?b.jsx(hK,{entry:N},N.id):b.jsx(pK,{entry:N},N.id)),n&&b.jsxs("div",{className:"py-1 flex items-center gap-1.5",children:[b.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full bg-[#E8976C] animate-thinking-dot"}),b.jsx("span",{className:"text-[#E8976C] text-[10px] italic",children:"thinking..."})]}),b.jsx("div",{ref:x})]})]})}function gK({teamId:e,disabled:r=!1}){const n=Ht(),[a,i]=k.useState(""),[o,s]=k.useState(!1),[c,f]=k.useState(null),d=k.useRef(null),h=k.useRef(null);k.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const m=y=>{f(y),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{f(null),h.current=null},3e3)},g=async y=>{var E;y.preventDefault();const x=a.trim();if(!(!x||o)){s(!0),f(null);try{await n.post(`teams/${e}/send-message`,{message:x}),i(""),m({type:"success",message:"Message sent"}),(E=d.current)==null||E.focus()}catch(_){if(_ instanceof X6&&_.status===422)m({type:"warning",message:"Team is not running — message not delivered"});else{const w=_ instanceof Error?_.message:"Failed to send message";m({type:"error",message:w})}}finally{s(!1)}}};return b.jsxs("div",{children:[b.jsxs("form",{onSubmit:g,className:"flex items-center gap-2",children:[b.jsx("input",{ref:d,type:"text",value:a,onChange:y=>i(y.target.value),disabled:r||o,placeholder:r?"Team is not running":"Send message to team...",className:"flex-1 bg-dark-base border border-dark-border rounded px-3 py-2 text-sm text-dark-text placeholder-dark-muted focus:outline-none focus:border-dark-accent transition-colors disabled:opacity-50"}),b.jsx("button",{type:"submit",disabled:r||o||!a.trim(),className:"px-4 py-2 text-sm font-medium rounded bg-dark-accent text-white hover:bg-dark-accent/80 transition-colors disabled:opacity-40 disabled:cursor-not-allowed shrink-0",children:o?"Sending...":"Send"})]}),c&&b.jsx("div",{className:`mt-2 text-xs px-2 py-1 rounded ${c.type==="success"?"text-[#3FB950] bg-[#3FB950]/10":c.type==="warning"?"text-[#D29922] bg-[#D29922]/10":"text-[#F85149] bg-[#F85149]/10"}`,children:c.message})]})}function yK(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,i,o,s,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,r===0){if(Object(n)!==n)return;f=!1}else for(;!(f=(a=o.call(n)).done)&&(c.push(a.value),c.length!==r);f=!0);}catch(h){d=!0,i=h}finally{try{if(!f&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}}function bK(e,r,n){return r=AK(r),r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function g5(e,r){return wK(e)||yK(e,r)||rL(e,r)||kK()}function xK(e){return _K(e)||SK(e)||rL(e)||EK()}function _K(e){if(Array.isArray(e))return c2(e)}function wK(e){if(Array.isArray(e))return e}function SK(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function rL(e,r){if(e){if(typeof e=="string")return c2(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c2(e,r)}}function c2(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,a=new Array(r);n<r;n++)a[n]=e[n];return a}function EK(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
64
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
65
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jK(e,r){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function AK(e){var r=jK(e,"string");return typeof r=="symbol"?r:String(r)}var CK=function(r,n){var a=new Set(n);return Object.assign.apply(Object,[{}].concat(xK(Object.entries(r).filter(function(i){var o=g5(i,1),s=o[0];return!a.has(s)}).map(function(i){var o=g5(i,2),s=o[0],c=o[1];return bK({},s,c)}))))};function f2(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,a=Array(r);n<r;n++)a[n]=e[n];return a}function OK(e){if(Array.isArray(e))return e}function TK(e){if(Array.isArray(e))return f2(e)}function NK(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function MK(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,i,o,s,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(f=(a=o.call(n)).done)&&(c.push(a.value),c.length!==r);f=!0);}catch(h){d=!0,i=h}finally{try{if(!f&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}}function RK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
66
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PK(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
67
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DK(e,r){return OK(e)||MK(e,r)||nL(e,r)||RK()}function y5(e){return TK(e)||NK(e)||nL(e)||PK()}function nL(e,r){if(e){if(typeof e=="string")return f2(e,r);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f2(e,r):void 0}}function LK(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.wrapperElementType,a=n===void 0?"div":n,i=r.nodeMapper,o=i===void 0?function(h){return h}:i,s=r.methodNames,c=s===void 0?[]:s,f=r.initPropNames,d=f===void 0?[]:f;return k.forwardRef(function(h,m){var g=k.useRef(),y=k.useMemo(function(){var _=Object.fromEntries(d.filter(function(w){return h.hasOwnProperty(w)}).map(function(w){return[w,h[w]]}));return e(_)},[]);b5(function(){y(o(g.current))},k.useLayoutEffect),b5(function(){return y._destructor instanceof Function?y._destructor:void 0});var x=k.useCallback(function(_){for(var w=arguments.length,A=new Array(w>1?w-1:0),C=1;C<w;C++)A[C-1]=arguments[C];return y[_]instanceof Function?y[_].apply(y,A):void 0},[y]),E=k.useRef({});return Object.keys(CK(h,[].concat(y5(c),y5(d)))).filter(function(_){return E.current[_]!==h[_]}).forEach(function(_){return x(_,h[_])}),E.current=h,k.useImperativeHandle(m,function(){return Object.fromEntries(c.map(function(_){return[_,function(){for(var w=arguments.length,A=new Array(w),C=0;C<w;C++)A[C]=arguments[C];return x.apply(void 0,[_].concat(A))}]}))},[x]),yp.createElement(a,{ref:g})})}function b5(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k.useEffect,n=k.useRef(),a=k.useRef(!1),i=k.useRef(!1),o=k.useState(0),s=DK(o,2);s[0];var c=s[1];a.current&&(i.current=!0),r(function(){return a.current||(n.current=e(),a.current=!0),c(function(f){return f+1}),function(){i.current&&n.current&&n.current()}},[])}var d2="http://www.w3.org/1999/xhtml";const x5={svg:"http://www.w3.org/2000/svg",xhtml:d2,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 r=e+="",n=r.indexOf(":");return n>=0&&(r=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),x5.hasOwnProperty(r)?{space:x5[r],local:e}:e}function IK(e){return function(){var r=this.ownerDocument,n=this.namespaceURI;return n===d2&&r.documentElement.namespaceURI===d2?r.createElement(e):r.createElementNS(n,e)}}function zK(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function aL(e){var r=_p(e);return(r.local?zK:IK)(r)}function qK(){}function qS(e){return e==null?qK:function(){return this.querySelector(e)}}function BK(e){typeof e!="function"&&(e=qS(e));for(var r=this._groups,n=r.length,a=new Array(n),i=0;i<n;++i)for(var o=r[i],s=o.length,c=a[i]=new Array(s),f,d,h=0;h<s;++h)(f=o[h])&&(d=e.call(f,f.__data__,h,o))&&("__data__"in f&&(d.__data__=f.__data__),c[h]=d);return new Kr(a,this._parents)}function $K(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function FK(){return[]}function iL(e){return e==null?FK:function(){return this.querySelectorAll(e)}}function UK(e){return function(){return $K(e.apply(this,arguments))}}function HK(e){typeof e=="function"?e=UK(e):e=iL(e);for(var r=this._groups,n=r.length,a=[],i=[],o=0;o<n;++o)for(var s=r[o],c=s.length,f,d=0;d<c;++d)(f=s[d])&&(a.push(e.call(f,f.__data__,d,s)),i.push(f));return new Kr(a,i)}function oL(e){return function(){return this.matches(e)}}function lL(e){return function(r){return r.matches(e)}}var GK=Array.prototype.find;function VK(e){return function(){return GK.call(this.children,e)}}function KK(){return this.firstElementChild}function YK(e){return this.select(e==null?KK:VK(typeof e=="function"?e:lL(e)))}var XK=Array.prototype.filter;function WK(){return Array.from(this.children)}function ZK(e){return function(){return XK.call(this.children,e)}}function QK(e){return this.selectAll(e==null?WK:ZK(typeof e=="function"?e:lL(e)))}function JK(e){typeof e!="function"&&(e=oL(e));for(var r=this._groups,n=r.length,a=new Array(n),i=0;i<n;++i)for(var o=r[i],s=o.length,c=a[i]=[],f,d=0;d<s;++d)(f=o[d])&&e.call(f,f.__data__,d,o)&&c.push(f);return new Kr(a,this._parents)}function sL(e){return new Array(e.length)}function eY(){return new Kr(this._enter||this._groups.map(sL),this._parents)}function sh(e,r){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=r}sh.prototype={constructor:sh,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,r){return this._parent.insertBefore(e,r)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function tY(e){return function(){return e}}function rY(e,r,n,a,i,o){for(var s=0,c,f=r.length,d=o.length;s<d;++s)(c=r[s])?(c.__data__=o[s],a[s]=c):n[s]=new sh(e,o[s]);for(;s<f;++s)(c=r[s])&&(i[s]=c)}function nY(e,r,n,a,i,o,s){var c,f,d=new Map,h=r.length,m=o.length,g=new Array(h),y;for(c=0;c<h;++c)(f=r[c])&&(g[c]=y=s.call(f,f.__data__,c,r)+"",d.has(y)?i[c]=f:d.set(y,f));for(c=0;c<m;++c)y=s.call(e,o[c],c,o)+"",(f=d.get(y))?(a[c]=f,f.__data__=o[c],d.delete(y)):n[c]=new sh(e,o[c]);for(c=0;c<h;++c)(f=r[c])&&d.get(g[c])===f&&(i[c]=f)}function aY(e){return e.__data__}function iY(e,r){if(!arguments.length)return Array.from(this,aY);var n=r?nY:rY,a=this._parents,i=this._groups;typeof e!="function"&&(e=tY(e));for(var o=i.length,s=new Array(o),c=new Array(o),f=new Array(o),d=0;d<o;++d){var h=a[d],m=i[d],g=m.length,y=oY(e.call(h,h&&h.__data__,d,a)),x=y.length,E=c[d]=new Array(x),_=s[d]=new Array(x),w=f[d]=new Array(g);n(h,m,E,_,w,y,r);for(var A=0,C=0,O,T;A<x;++A)if(O=E[A]){for(A>=C&&(C=A+1);!(T=_[C])&&++C<x;);O._next=T||null}}return s=new Kr(s,a),s._enter=c,s._exit=f,s}function oY(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function lY(){return new Kr(this._exit||this._groups.map(sL),this._parents)}function sY(e,r,n){var a=this.enter(),i=this,o=this.exit();return typeof e=="function"?(a=e(a),a&&(a=a.selection())):a=a.append(e+""),r!=null&&(i=r(i),i&&(i=i.selection())),n==null?o.remove():n(o),a&&i?a.merge(i).order():i}function uY(e){for(var r=e.selection?e.selection():e,n=this._groups,a=r._groups,i=n.length,o=a.length,s=Math.min(i,o),c=new Array(i),f=0;f<s;++f)for(var d=n[f],h=a[f],m=d.length,g=c[f]=new Array(m),y,x=0;x<m;++x)(y=d[x]||h[x])&&(g[x]=y);for(;f<i;++f)c[f]=n[f];return new Kr(c,this._parents)}function cY(){for(var e=this._groups,r=-1,n=e.length;++r<n;)for(var a=e[r],i=a.length-1,o=a[i],s;--i>=0;)(s=a[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function fY(e){e||(e=dY);function r(m,g){return m&&g?e(m.__data__,g.__data__):!m-!g}for(var n=this._groups,a=n.length,i=new Array(a),o=0;o<a;++o){for(var s=n[o],c=s.length,f=i[o]=new Array(c),d,h=0;h<c;++h)(d=s[h])&&(f[h]=d);f.sort(r)}return new Kr(i,this._parents).order()}function dY(e,r){return e<r?-1:e>r?1:e>=r?0:NaN}function hY(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function pY(){return Array.from(this)}function mY(){for(var e=this._groups,r=0,n=e.length;r<n;++r)for(var a=e[r],i=0,o=a.length;i<o;++i){var s=a[i];if(s)return s}return null}function vY(){let e=0;for(const r of this)++e;return e}function gY(){return!this.node()}function yY(e){for(var r=this._groups,n=0,a=r.length;n<a;++n)for(var i=r[n],o=0,s=i.length,c;o<s;++o)(c=i[o])&&e.call(c,c.__data__,o,i);return this}function bY(e){return function(){this.removeAttribute(e)}}function xY(e){return function(){this.removeAttributeNS(e.space,e.local)}}function _Y(e,r){return function(){this.setAttribute(e,r)}}function wY(e,r){return function(){this.setAttributeNS(e.space,e.local,r)}}function SY(e,r){return function(){var n=r.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function EY(e,r){return function(){var n=r.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function kY(e,r){var n=_p(e);if(arguments.length<2){var a=this.node();return n.local?a.getAttributeNS(n.space,n.local):a.getAttribute(n)}return this.each((r==null?n.local?xY:bY:typeof r=="function"?n.local?EY:SY:n.local?wY:_Y)(n,r))}function uL(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function jY(e){return function(){this.style.removeProperty(e)}}function AY(e,r,n){return function(){this.style.setProperty(e,r,n)}}function CY(e,r,n){return function(){var a=r.apply(this,arguments);a==null?this.style.removeProperty(e):this.style.setProperty(e,a,n)}}function OY(e,r,n){return arguments.length>1?this.each((r==null?jY:typeof r=="function"?CY:AY)(e,r,n??"")):Zl(this.node(),e)}function Zl(e,r){return e.style.getPropertyValue(r)||uL(e).getComputedStyle(e,null).getPropertyValue(r)}function TY(e){return function(){delete this[e]}}function NY(e,r){return function(){this[e]=r}}function MY(e,r){return function(){var n=r.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function RY(e,r){return arguments.length>1?this.each((r==null?TY:typeof r=="function"?MY:NY)(e,r)):this.node()[e]}function cL(e){return e.trim().split(/^|\s+/)}function BS(e){return e.classList||new fL(e)}function fL(e){this._node=e,this._names=cL(e.getAttribute("class")||"")}fL.prototype={add:function(e){var r=this._names.indexOf(e);r<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var r=this._names.indexOf(e);r>=0&&(this._names.splice(r,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function dL(e,r){for(var n=BS(e),a=-1,i=r.length;++a<i;)n.add(r[a])}function hL(e,r){for(var n=BS(e),a=-1,i=r.length;++a<i;)n.remove(r[a])}function PY(e){return function(){dL(this,e)}}function DY(e){return function(){hL(this,e)}}function LY(e,r){return function(){(r.apply(this,arguments)?dL:hL)(this,e)}}function IY(e,r){var n=cL(e+"");if(arguments.length<2){for(var a=BS(this.node()),i=-1,o=n.length;++i<o;)if(!a.contains(n[i]))return!1;return!0}return this.each((typeof r=="function"?LY:r?PY:DY)(n,r))}function zY(){this.textContent=""}function qY(e){return function(){this.textContent=e}}function BY(e){return function(){var r=e.apply(this,arguments);this.textContent=r??""}}function $Y(e){return arguments.length?this.each(e==null?zY:(typeof e=="function"?BY:qY)(e)):this.node().textContent}function FY(){this.innerHTML=""}function UY(e){return function(){this.innerHTML=e}}function HY(e){return function(){var r=e.apply(this,arguments);this.innerHTML=r??""}}function GY(e){return arguments.length?this.each(e==null?FY:(typeof e=="function"?HY:UY)(e)):this.node().innerHTML}function VY(){this.nextSibling&&this.parentNode.appendChild(this)}function KY(){return this.each(VY)}function YY(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function XY(){return this.each(YY)}function WY(e){var r=typeof e=="function"?e:aL(e);return this.select(function(){return this.appendChild(r.apply(this,arguments))})}function ZY(){return null}function QY(e,r){var n=typeof e=="function"?e:aL(e),a=r==null?ZY:typeof r=="function"?r:qS(r);return this.select(function(){return this.insertBefore(n.apply(this,arguments),a.apply(this,arguments)||null)})}function JY(){var e=this.parentNode;e&&e.removeChild(this)}function eX(){return this.each(JY)}function tX(){var e=this.cloneNode(!1),r=this.parentNode;return r?r.insertBefore(e,this.nextSibling):e}function rX(){var e=this.cloneNode(!0),r=this.parentNode;return r?r.insertBefore(e,this.nextSibling):e}function nX(e){return this.select(e?rX:tX)}function aX(e){return arguments.length?this.property("__data__",e):this.node().__data__}function iX(e){return function(r){e.call(this,r,this.__data__)}}function oX(e){return e.trim().split(/^|\s+/).map(function(r){var n="",a=r.indexOf(".");return a>=0&&(n=r.slice(a+1),r=r.slice(0,a)),{type:r,name:n}})}function lX(e){return function(){var r=this.__on;if(r){for(var n=0,a=-1,i=r.length,o;n<i;++n)o=r[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):r[++a]=o;++a?r.length=a:delete this.__on}}}function sX(e,r,n){return function(){var a=this.__on,i,o=iX(r);if(a){for(var s=0,c=a.length;s<c;++s)if((i=a[s]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=r;return}}this.addEventListener(e.type,o,n),i={type:e.type,name:e.name,value:r,listener:o,options:n},a?a.push(i):this.__on=[i]}}function uX(e,r,n){var a=oX(e+""),i,o=a.length,s;if(arguments.length<2){var c=this.node().__on;if(c){for(var f=0,d=c.length,h;f<d;++f)for(i=0,h=c[f];i<o;++i)if((s=a[i]).type===h.type&&s.name===h.name)return h.value}return}for(c=r?sX:lX,i=0;i<o;++i)this.each(c(a[i],r,n));return this}function pL(e,r,n){var a=uL(e),i=a.CustomEvent;typeof i=="function"?i=new i(r,n):(i=a.document.createEvent("Event"),n?(i.initEvent(r,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(r,!1,!1)),e.dispatchEvent(i)}function cX(e,r){return function(){return pL(this,e,r)}}function fX(e,r){return function(){return pL(this,e,r.apply(this,arguments))}}function dX(e,r){return this.each((typeof r=="function"?fX:cX)(e,r))}function*hX(){for(var e=this._groups,r=0,n=e.length;r<n;++r)for(var a=e[r],i=0,o=a.length,s;i<o;++i)(s=a[i])&&(yield s)}var mL=[null];function Kr(e,r){this._groups=e,this._parents=r}function jc(){return new Kr([[document.documentElement]],mL)}function pX(){return this}Kr.prototype=jc.prototype={constructor:Kr,select:BK,selectAll:HK,selectChild:YK,selectChildren:QK,filter:JK,data:iY,enter:eY,exit:lY,join:sY,merge:uY,selection:pX,order:cY,sort:fY,call:hY,nodes:pY,node:mY,size:vY,empty:gY,each:yY,attr:kY,style:OY,property:RY,classed:IY,text:$Y,html:GY,raise:KY,lower:XY,append:WY,insert:QY,remove:eX,clone:nX,datum:aX,on:uX,dispatch:dX,[Symbol.iterator]:hX};function pn(e){return typeof e=="string"?new Kr([[document.querySelector(e)]],[document.documentElement]):new Kr([[e]],mL)}function mX(e){let r;for(;r=e.sourceEvent;)e=r;return e}function Xn(e,r){if(e=mX(e),r===void 0&&(r=e.currentTarget),r){var n=r.ownerSVGElement||r;if(n.createSVGPoint){var a=n.createSVGPoint();return a.x=e.clientX,a.y=e.clientY,a=a.matrixTransform(r.getScreenCTM().inverse()),[a.x,a.y]}if(r.getBoundingClientRect){var i=r.getBoundingClientRect();return[e.clientX-i.left-r.clientLeft,e.clientY-i.top-r.clientTop]}}return[e.pageX,e.pageY]}var vX={value:()=>{}};function Ac(){for(var e=0,r=arguments.length,n={},a;e<r;++e){if(!(a=arguments[e]+"")||a in n||/[\s.]/.test(a))throw new Error("illegal type: "+a);n[a]=[]}return new Xd(n)}function Xd(e){this._=e}function gX(e,r){return e.trim().split(/^|\s+/).map(function(n){var a="",i=n.indexOf(".");if(i>=0&&(a=n.slice(i+1),n=n.slice(0,i)),n&&!r.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:a}})}Xd.prototype=Ac.prototype={constructor:Xd,on:function(e,r){var n=this._,a=gX(e+"",n),i,o=-1,s=a.length;if(arguments.length<2){for(;++o<s;)if((i=(e=a[o]).type)&&(i=yX(n[i],e.name)))return i;return}if(r!=null&&typeof r!="function")throw new Error("invalid callback: "+r);for(;++o<s;)if(i=(e=a[o]).type)n[i]=_5(n[i],e.name,r);else if(r==null)for(i in n)n[i]=_5(n[i],e.name,null);return this},copy:function(){var e={},r=this._;for(var n in r)e[n]=r[n].slice();return new Xd(e)},call:function(e,r){if((i=arguments.length-2)>0)for(var n=new Array(i),a=0,i,o;a<i;++a)n[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],a=0,i=o.length;a<i;++a)o[a].value.apply(r,n)},apply:function(e,r,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var a=this._[e],i=0,o=a.length;i<o;++i)a[i].value.apply(r,n)}};function yX(e,r){for(var n=0,a=e.length,i;n<a;++n)if((i=e[n]).name===r)return i.value}function _5(e,r,n){for(var a=0,i=e.length;a<i;++a)if(e[a].name===r){e[a]=vX,e=e.slice(0,a).concat(e.slice(a+1));break}return n!=null&&e.push({name:r,value:n}),e}const bX={passive:!1},tc={capture:!0,passive:!1};function Jg(e){e.stopImmediatePropagation()}function Kl(e){e.preventDefault(),e.stopImmediatePropagation()}function vL(e){var r=e.document.documentElement,n=pn(e).on("dragstart.drag",Kl,tc);"onselectstart"in r?n.on("selectstart.drag",Kl,tc):(r.__noselect=r.style.MozUserSelect,r.style.MozUserSelect="none")}function gL(e,r){var n=e.document.documentElement,a=pn(e).on("dragstart.drag",null);r&&(a.on("click.drag",Kl,tc),setTimeout(function(){a.on("click.drag",null)},0)),"onselectstart"in n?a.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Ed=e=>()=>e;function h2(e,{sourceEvent:r,subject:n,target:a,identifier:i,active:o,x:s,y:c,dx:f,dy:d,dispatch:h}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:r,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:a,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:f,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:h}})}h2.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function xX(e){return!e.ctrlKey&&!e.button}function _X(){return this.parentNode}function wX(e,r){return r??{x:e.x,y:e.y}}function SX(){return navigator.maxTouchPoints||"ontouchstart"in this}function EX(){var e=xX,r=_X,n=wX,a=SX,i={},o=Ac("start","drag","end"),s=0,c,f,d,h,m=0;function g(O){O.on("mousedown.drag",y).filter(a).on("touchstart.drag",_).on("touchmove.drag",w,bX).on("touchend.drag touchcancel.drag",A).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(O,T){if(!(h||!e.call(this,O,T))){var N=C(this,r.call(this,O,T),O,T,"mouse");N&&(pn(O.view).on("mousemove.drag",x,tc).on("mouseup.drag",E,tc),vL(O.view),Jg(O),d=!1,c=O.clientX,f=O.clientY,N("start",O))}}function x(O){if(Kl(O),!d){var T=O.clientX-c,N=O.clientY-f;d=T*T+N*N>m}i.mouse("drag",O)}function E(O){pn(O.view).on("mousemove.drag mouseup.drag",null),gL(O.view,d),Kl(O),i.mouse("end",O)}function _(O,T){if(e.call(this,O,T)){var N=O.changedTouches,M=r.call(this,O,T),P=N.length,L,D;for(L=0;L<P;++L)(D=C(this,M,O,T,N[L].identifier,N[L]))&&(Jg(O),D("start",O,N[L]))}}function w(O){var T=O.changedTouches,N=T.length,M,P;for(M=0;M<N;++M)(P=i[T[M].identifier])&&(Kl(O),P("drag",O,T[M]))}function A(O){var T=O.changedTouches,N=T.length,M,P;for(h&&clearTimeout(h),h=setTimeout(function(){h=null},500),M=0;M<N;++M)(P=i[T[M].identifier])&&(Jg(O),P("end",O,T[M]))}function C(O,T,N,M,P,L){var D=o.copy(),q=Xn(L||N,T),z,U,$;if(($=n.call(O,new h2("beforestart",{sourceEvent:N,target:g,identifier:P,active:s,x:q[0],y:q[1],dx:0,dy:0,dispatch:D}),M))!=null)return z=$.x-q[0]||0,U=$.y-q[1]||0,function Y(B,Z,ae){var V=q,fe;switch(B){case"start":i[P]=Y,fe=s++;break;case"end":delete i[P],--s;case"drag":q=Xn(ae||Z,T),fe=s;break}D.call(B,O,new h2(B,{sourceEvent:Z,subject:$,target:g,identifier:P,active:fe,x:q[0]+z,y:q[1]+U,dx:q[0]-V[0],dy:q[1]-V[1],dispatch:D}),M)}}return g.filter=function(O){return arguments.length?(e=typeof O=="function"?O:Ed(!!O),g):e},g.container=function(O){return arguments.length?(r=typeof O=="function"?O:Ed(O),g):r},g.subject=function(O){return arguments.length?(n=typeof O=="function"?O:Ed(O),g):n},g.touchable=function(O){return arguments.length?(a=typeof O=="function"?O:Ed(!!O),g):a},g.on=function(){var O=o.on.apply(o,arguments);return O===o?g:O},g.clickDistance=function(O){return arguments.length?(m=(O=+O)*O,g):Math.sqrt(m)},g}function $S(e,r,n){e.prototype=r.prototype=n,n.constructor=e}function yL(e,r){var n=Object.create(e.prototype);for(var a in r)n[a]=r[a];return n}function Cc(){}var rc=.7,uh=1/rc,Yl="\\s*([+-]?\\d+)\\s*",nc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ra="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",kX=/^#([0-9a-f]{3,8})$/,jX=new RegExp(`^rgb\\(${Yl},${Yl},${Yl}\\)$`),AX=new RegExp(`^rgb\\(${ra},${ra},${ra}\\)$`),CX=new RegExp(`^rgba\\(${Yl},${Yl},${Yl},${nc}\\)$`),OX=new RegExp(`^rgba\\(${ra},${ra},${ra},${nc}\\)$`),TX=new RegExp(`^hsl\\(${nc},${ra},${ra}\\)$`),NX=new RegExp(`^hsla\\(${nc},${ra},${ra},${nc}\\)$`),w5={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};$S(Cc,Ro,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:S5,formatHex:S5,formatHex8:MX,formatHsl:RX,formatRgb:E5,toString:E5});function S5(){return this.rgb().formatHex()}function MX(){return this.rgb().formatHex8()}function RX(){return bL(this).formatHsl()}function E5(){return this.rgb().formatRgb()}function Ro(e){var r,n;return e=(e+"").trim().toLowerCase(),(r=kX.exec(e))?(n=r[1].length,r=parseInt(r[1],16),n===6?k5(r):n===3?new Nr(r>>8&15|r>>4&240,r>>4&15|r&240,(r&15)<<4|r&15,1):n===8?kd(r>>24&255,r>>16&255,r>>8&255,(r&255)/255):n===4?kd(r>>12&15|r>>8&240,r>>8&15|r>>4&240,r>>4&15|r&240,((r&15)<<4|r&15)/255):null):(r=jX.exec(e))?new Nr(r[1],r[2],r[3],1):(r=AX.exec(e))?new Nr(r[1]*255/100,r[2]*255/100,r[3]*255/100,1):(r=CX.exec(e))?kd(r[1],r[2],r[3],r[4]):(r=OX.exec(e))?kd(r[1]*255/100,r[2]*255/100,r[3]*255/100,r[4]):(r=TX.exec(e))?C5(r[1],r[2]/100,r[3]/100,1):(r=NX.exec(e))?C5(r[1],r[2]/100,r[3]/100,r[4]):w5.hasOwnProperty(e)?k5(w5[e]):e==="transparent"?new Nr(NaN,NaN,NaN,0):null}function k5(e){return new Nr(e>>16&255,e>>8&255,e&255,1)}function kd(e,r,n,a){return a<=0&&(e=r=n=NaN),new Nr(e,r,n,a)}function PX(e){return e instanceof Cc||(e=Ro(e)),e?(e=e.rgb(),new Nr(e.r,e.g,e.b,e.opacity)):new Nr}function p2(e,r,n,a){return arguments.length===1?PX(e):new Nr(e,r,n,a??1)}function Nr(e,r,n,a){this.r=+e,this.g=+r,this.b=+n,this.opacity=+a}$S(Nr,p2,yL(Cc,{brighter(e){return e=e==null?uh:Math.pow(uh,e),new Nr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?rc:Math.pow(rc,e),new Nr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Nr(Oo(this.r),Oo(this.g),Oo(this.b),ch(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:j5,formatHex:j5,formatHex8:DX,formatRgb:A5,toString:A5}));function j5(){return`#${ko(this.r)}${ko(this.g)}${ko(this.b)}`}function DX(){return`#${ko(this.r)}${ko(this.g)}${ko(this.b)}${ko((isNaN(this.opacity)?1:this.opacity)*255)}`}function A5(){const e=ch(this.opacity);return`${e===1?"rgb(":"rgba("}${Oo(this.r)}, ${Oo(this.g)}, ${Oo(this.b)}${e===1?")":`, ${e})`}`}function ch(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Oo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ko(e){return e=Oo(e),(e<16?"0":"")+e.toString(16)}function C5(e,r,n,a){return a<=0?e=r=n=NaN:n<=0||n>=1?e=r=NaN:r<=0&&(e=NaN),new Nn(e,r,n,a)}function bL(e){if(e instanceof Nn)return new Nn(e.h,e.s,e.l,e.opacity);if(e instanceof Cc||(e=Ro(e)),!e)return new Nn;if(e instanceof Nn)return e;e=e.rgb();var r=e.r/255,n=e.g/255,a=e.b/255,i=Math.min(r,n,a),o=Math.max(r,n,a),s=NaN,c=o-i,f=(o+i)/2;return c?(r===o?s=(n-a)/c+(n<a)*6:n===o?s=(a-r)/c+2:s=(r-n)/c+4,c/=f<.5?o+i:2-o-i,s*=60):c=f>0&&f<1?0:s,new Nn(s,c,f,e.opacity)}function LX(e,r,n,a){return arguments.length===1?bL(e):new Nn(e,r,n,a??1)}function Nn(e,r,n,a){this.h=+e,this.s=+r,this.l=+n,this.opacity=+a}$S(Nn,LX,yL(Cc,{brighter(e){return e=e==null?uh:Math.pow(uh,e),new Nn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?rc:Math.pow(rc,e),new Nn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,r=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,a=n+(n<.5?n:1-n)*r,i=2*n-a;return new Nr(ey(e>=240?e-240:e+120,i,a),ey(e,i,a),ey(e<120?e+240:e-120,i,a),this.opacity)},clamp(){return new Nn(O5(this.h),jd(this.s),jd(this.l),ch(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(){const e=ch(this.opacity);return`${e===1?"hsl(":"hsla("}${O5(this.h)}, ${jd(this.s)*100}%, ${jd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function O5(e){return e=(e||0)%360,e<0?e+360:e}function jd(e){return Math.max(0,Math.min(1,e||0))}function ey(e,r,n){return(e<60?r+(n-r)*e/60:e<180?n:e<240?r+(n-r)*(240-e)/60:r)*255}const FS=e=>()=>e;function IX(e,r){return function(n){return e+n*r}}function zX(e,r,n){return e=Math.pow(e,n),r=Math.pow(r,n)-e,n=1/n,function(a){return Math.pow(e+a*r,n)}}function qX(e){return(e=+e)==1?xL:function(r,n){return n-r?zX(r,n,e):FS(isNaN(r)?n:r)}}function xL(e,r){var n=r-e;return n?IX(e,n):FS(isNaN(e)?r:e)}const fh=(function e(r){var n=qX(r);function a(i,o){var s=n((i=p2(i)).r,(o=p2(o)).r),c=n(i.g,o.g),f=n(i.b,o.b),d=xL(i.opacity,o.opacity);return function(h){return i.r=s(h),i.g=c(h),i.b=f(h),i.opacity=d(h),i+""}}return a.gamma=e,a})(1);function BX(e,r){r||(r=[]);var n=e?Math.min(r.length,e.length):0,a=r.slice(),i;return function(o){for(i=0;i<n;++i)a[i]=e[i]*(1-o)+r[i]*o;return a}}function $X(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function FX(e,r){var n=r?r.length:0,a=e?Math.min(n,e.length):0,i=new Array(a),o=new Array(n),s;for(s=0;s<a;++s)i[s]=us(e[s],r[s]);for(;s<n;++s)o[s]=r[s];return function(c){for(s=0;s<a;++s)o[s]=i[s](c);return o}}function UX(e,r){var n=new Date;return e=+e,r=+r,function(a){return n.setTime(e*(1-a)+r*a),n}}function Tn(e,r){return e=+e,r=+r,function(n){return e*(1-n)+r*n}}function HX(e,r){var n={},a={},i;(e===null||typeof e!="object")&&(e={}),(r===null||typeof r!="object")&&(r={});for(i in r)i in e?n[i]=us(e[i],r[i]):a[i]=r[i];return function(o){for(i in n)a[i]=n[i](o);return a}}var m2=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ty=new RegExp(m2.source,"g");function GX(e){return function(){return e}}function VX(e){return function(r){return e(r)+""}}function _L(e,r){var n=m2.lastIndex=ty.lastIndex=0,a,i,o,s=-1,c=[],f=[];for(e=e+"",r=r+"";(a=m2.exec(e))&&(i=ty.exec(r));)(o=i.index)>n&&(o=r.slice(n,o),c[s]?c[s]+=o:c[++s]=o),(a=a[0])===(i=i[0])?c[s]?c[s]+=i:c[++s]=i:(c[++s]=null,f.push({i:s,x:Tn(a,i)})),n=ty.lastIndex;return n<r.length&&(o=r.slice(n),c[s]?c[s]+=o:c[++s]=o),c.length<2?f[0]?VX(f[0].x):GX(r):(r=f.length,function(d){for(var h=0,m;h<r;++h)c[(m=f[h]).i]=m.x(d);return c.join("")})}function us(e,r){var n=typeof r,a;return r==null||n==="boolean"?FS(r):(n==="number"?Tn:n==="string"?(a=Ro(r))?(r=a,fh):_L:r instanceof Ro?fh:r instanceof Date?UX:$X(r)?BX:Array.isArray(r)?FX:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?HX:Tn)(e,r)}function US(e,r){return e=+e,r=+r,function(n){return Math.round(e*(1-n)+r*n)}}var T5=180/Math.PI,v2={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function wL(e,r,n,a,i,o){var s,c,f;return(s=Math.sqrt(e*e+r*r))&&(e/=s,r/=s),(f=e*n+r*a)&&(n-=e*f,a-=r*f),(c=Math.sqrt(n*n+a*a))&&(n/=c,a/=c,f/=c),e*a<r*n&&(e=-e,r=-r,f=-f,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(r,e)*T5,skewX:Math.atan(f)*T5,scaleX:s,scaleY:c}}var Ad;function KX(e){const r=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return r.isIdentity?v2:wL(r.a,r.b,r.c,r.d,r.e,r.f)}function YX(e){return e==null||(Ad||(Ad=document.createElementNS("http://www.w3.org/2000/svg","g")),Ad.setAttribute("transform",e),!(e=Ad.transform.baseVal.consolidate()))?v2:(e=e.matrix,wL(e.a,e.b,e.c,e.d,e.e,e.f))}function SL(e,r,n,a){function i(d){return d.length?d.pop()+" ":""}function o(d,h,m,g,y,x){if(d!==m||h!==g){var E=y.push("translate(",null,r,null,n);x.push({i:E-4,x:Tn(d,m)},{i:E-2,x:Tn(h,g)})}else(m||g)&&y.push("translate("+m+r+g+n)}function s(d,h,m,g){d!==h?(d-h>180?h+=360:h-d>180&&(d+=360),g.push({i:m.push(i(m)+"rotate(",null,a)-2,x:Tn(d,h)})):h&&m.push(i(m)+"rotate("+h+a)}function c(d,h,m,g){d!==h?g.push({i:m.push(i(m)+"skewX(",null,a)-2,x:Tn(d,h)}):h&&m.push(i(m)+"skewX("+h+a)}function f(d,h,m,g,y,x){if(d!==m||h!==g){var E=y.push(i(y)+"scale(",null,",",null,")");x.push({i:E-4,x:Tn(d,m)},{i:E-2,x:Tn(h,g)})}else(m!==1||g!==1)&&y.push(i(y)+"scale("+m+","+g+")")}return function(d,h){var m=[],g=[];return d=e(d),h=e(h),o(d.translateX,d.translateY,h.translateX,h.translateY,m,g),s(d.rotate,h.rotate,m,g),c(d.skewX,h.skewX,m,g),f(d.scaleX,d.scaleY,h.scaleX,h.scaleY,m,g),d=h=null,function(y){for(var x=-1,E=g.length,_;++x<E;)m[(_=g[x]).i]=_.x(y);return m.join("")}}}var XX=SL(KX,"px, ","px)","deg)"),WX=SL(YX,", ",")",")"),ZX=1e-12;function N5(e){return((e=Math.exp(e))+1/e)/2}function QX(e){return((e=Math.exp(e))-1/e)/2}function JX(e){return((e=Math.exp(2*e))-1)/(e+1)}const eW=(function e(r,n,a){function i(o,s){var c=o[0],f=o[1],d=o[2],h=s[0],m=s[1],g=s[2],y=h-c,x=m-f,E=y*y+x*x,_,w;if(E<ZX)w=Math.log(g/d)/r,_=function(M){return[c+M*y,f+M*x,d*Math.exp(r*M*w)]};else{var A=Math.sqrt(E),C=(g*g-d*d+a*E)/(2*d*n*A),O=(g*g-d*d-a*E)/(2*g*n*A),T=Math.log(Math.sqrt(C*C+1)-C),N=Math.log(Math.sqrt(O*O+1)-O);w=(N-T)/r,_=function(M){var P=M*w,L=N5(T),D=d/(n*A)*(L*JX(r*P+T)-QX(T));return[c+D*y,f+D*x,d*L/N5(r*P+T)]}}return _.duration=w*1e3*r/Math.SQRT2,_}return i.rho=function(o){var s=Math.max(.001,+o),c=s*s,f=c*c;return e(s,c,f)},i})(Math.SQRT2,2,4);function tW(e,r){r===void 0&&(r=e,e=us);for(var n=0,a=r.length-1,i=r[0],o=new Array(a<0?0:a);n<a;)o[n]=e(i,i=r[++n]);return function(s){var c=Math.max(0,Math.min(a-1,Math.floor(s*=a)));return o[c](s-c)}}var Ql=0,Bu=0,xu=0,EL=1e3,dh,$u,hh=0,Po=0,wp=0,ac=typeof performance=="object"&&performance.now?performance:Date,kL=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function HS(){return Po||(kL(rW),Po=ac.now()+wp)}function rW(){Po=0}function ph(){this._call=this._time=this._next=null}ph.prototype=GS.prototype={constructor:ph,restart:function(e,r,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?HS():+n)+(r==null?0:+r),!this._next&&$u!==this&&($u?$u._next=this:dh=this,$u=this),this._call=e,this._time=n,g2()},stop:function(){this._call&&(this._call=null,this._time=1/0,g2())}};function GS(e,r,n){var a=new ph;return a.restart(e,r,n),a}function nW(){HS(),++Ql;for(var e=dh,r;e;)(r=Po-e._time)>=0&&e._call.call(void 0,r),e=e._next;--Ql}function M5(){Po=(hh=ac.now())+wp,Ql=Bu=0;try{nW()}finally{Ql=0,iW(),Po=0}}function aW(){var e=ac.now(),r=e-hh;r>EL&&(wp-=r,hh=e)}function iW(){for(var e,r=dh,n,a=1/0;r;)r._call?(a>r._time&&(a=r._time),e=r,r=r._next):(n=r._next,r._next=null,r=e?e._next=n:dh=n);$u=e,g2(a)}function g2(e){if(!Ql){Bu&&(Bu=clearTimeout(Bu));var r=e-Po;r>24?(e<1/0&&(Bu=setTimeout(M5,e-ac.now()-wp)),xu&&(xu=clearInterval(xu))):(xu||(hh=ac.now(),xu=setInterval(aW,EL)),Ql=1,kL(M5))}}function R5(e,r,n){var a=new ph;return r=r==null?0:+r,a.restart(i=>{a.stop(),e(i+r)},r,n),a}var oW=Ac("start","end","cancel","interrupt"),lW=[],jL=0,P5=1,y2=2,Wd=3,D5=4,b2=5,Zd=6;function Sp(e,r,n,a,i,o){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;sW(e,n,{name:r,index:a,group:i,on:oW,tween:lW,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:jL})}function VS(e,r){var n=zn(e,r);if(n.state>jL)throw new Error("too late; already scheduled");return n}function ca(e,r){var n=zn(e,r);if(n.state>Wd)throw new Error("too late; already running");return n}function zn(e,r){var n=e.__transition;if(!n||!(n=n[r]))throw new Error("transition not found");return n}function sW(e,r,n){var a=e.__transition,i;a[r]=n,n.timer=GS(o,0,n.time);function o(d){n.state=P5,n.timer.restart(s,n.delay,n.time),n.delay<=d&&s(d-n.delay)}function s(d){var h,m,g,y;if(n.state!==P5)return f();for(h in a)if(y=a[h],y.name===n.name){if(y.state===Wd)return R5(s);y.state===D5?(y.state=Zd,y.timer.stop(),y.on.call("interrupt",e,e.__data__,y.index,y.group),delete a[h]):+h<r&&(y.state=Zd,y.timer.stop(),y.on.call("cancel",e,e.__data__,y.index,y.group),delete a[h])}if(R5(function(){n.state===Wd&&(n.state=D5,n.timer.restart(c,n.delay,n.time),c(d))}),n.state=y2,n.on.call("start",e,e.__data__,n.index,n.group),n.state===y2){for(n.state=Wd,i=new Array(g=n.tween.length),h=0,m=-1;h<g;++h)(y=n.tween[h].value.call(e,e.__data__,n.index,n.group))&&(i[++m]=y);i.length=m+1}}function c(d){for(var h=d<n.duration?n.ease.call(null,d/n.duration):(n.timer.restart(f),n.state=b2,1),m=-1,g=i.length;++m<g;)i[m].call(e,h);n.state===b2&&(n.on.call("end",e,e.__data__,n.index,n.group),f())}function f(){n.state=Zd,n.timer.stop(),delete a[r];for(var d in a)return;delete e.__transition}}function Qd(e,r){var n=e.__transition,a,i,o=!0,s;if(n){r=r==null?null:r+"";for(s in n){if((a=n[s]).name!==r){o=!1;continue}i=a.state>y2&&a.state<b2,a.state=Zd,a.timer.stop(),a.on.call(i?"interrupt":"cancel",e,e.__data__,a.index,a.group),delete n[s]}o&&delete e.__transition}}function uW(e){return this.each(function(){Qd(this,e)})}function cW(e,r){var n,a;return function(){var i=ca(this,e),o=i.tween;if(o!==n){a=n=o;for(var s=0,c=a.length;s<c;++s)if(a[s].name===r){a=a.slice(),a.splice(s,1);break}}i.tween=a}}function fW(e,r,n){var a,i;if(typeof n!="function")throw new Error;return function(){var o=ca(this,e),s=o.tween;if(s!==a){i=(a=s).slice();for(var c={name:r,value:n},f=0,d=i.length;f<d;++f)if(i[f].name===r){i[f]=c;break}f===d&&i.push(c)}o.tween=i}}function dW(e,r){var n=this._id;if(e+="",arguments.length<2){for(var a=zn(this.node(),n).tween,i=0,o=a.length,s;i<o;++i)if((s=a[i]).name===e)return s.value;return null}return this.each((r==null?cW:fW)(n,e,r))}function KS(e,r,n){var a=e._id;return e.each(function(){var i=ca(this,a);(i.value||(i.value={}))[r]=n.apply(this,arguments)}),function(i){return zn(i,a).value[r]}}function AL(e,r){var n;return(typeof r=="number"?Tn:r instanceof Ro?fh:(n=Ro(r))?(r=n,fh):_L)(e,r)}function hW(e){return function(){this.removeAttribute(e)}}function pW(e){return function(){this.removeAttributeNS(e.space,e.local)}}function mW(e,r,n){var a,i=n+"",o;return function(){var s=this.getAttribute(e);return s===i?null:s===a?o:o=r(a=s,n)}}function vW(e,r,n){var a,i=n+"",o;return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===a?o:o=r(a=s,n)}}function gW(e,r,n){var a,i,o;return function(){var s,c=n(this),f;return c==null?void this.removeAttribute(e):(s=this.getAttribute(e),f=c+"",s===f?null:s===a&&f===i?o:(i=f,o=r(a=s,c)))}}function yW(e,r,n){var a,i,o;return function(){var s,c=n(this),f;return c==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),f=c+"",s===f?null:s===a&&f===i?o:(i=f,o=r(a=s,c)))}}function bW(e,r){var n=_p(e),a=n==="transform"?WX:AL;return this.attrTween(e,typeof r=="function"?(n.local?yW:gW)(n,a,KS(this,"attr."+e,r)):r==null?(n.local?pW:hW)(n):(n.local?vW:mW)(n,a,r))}function xW(e,r){return function(n){this.setAttribute(e,r.call(this,n))}}function _W(e,r){return function(n){this.setAttributeNS(e.space,e.local,r.call(this,n))}}function wW(e,r){var n,a;function i(){var o=r.apply(this,arguments);return o!==a&&(n=(a=o)&&_W(e,o)),n}return i._value=r,i}function SW(e,r){var n,a;function i(){var o=r.apply(this,arguments);return o!==a&&(n=(a=o)&&xW(e,o)),n}return i._value=r,i}function EW(e,r){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(r==null)return this.tween(n,null);if(typeof r!="function")throw new Error;var a=_p(e);return this.tween(n,(a.local?wW:SW)(a,r))}function kW(e,r){return function(){VS(this,e).delay=+r.apply(this,arguments)}}function jW(e,r){return r=+r,function(){VS(this,e).delay=r}}function AW(e){var r=this._id;return arguments.length?this.each((typeof e=="function"?kW:jW)(r,e)):zn(this.node(),r).delay}function CW(e,r){return function(){ca(this,e).duration=+r.apply(this,arguments)}}function OW(e,r){return r=+r,function(){ca(this,e).duration=r}}function TW(e){var r=this._id;return arguments.length?this.each((typeof e=="function"?CW:OW)(r,e)):zn(this.node(),r).duration}function NW(e,r){if(typeof r!="function")throw new Error;return function(){ca(this,e).ease=r}}function MW(e){var r=this._id;return arguments.length?this.each(NW(r,e)):zn(this.node(),r).ease}function RW(e,r){return function(){var n=r.apply(this,arguments);if(typeof n!="function")throw new Error;ca(this,e).ease=n}}function PW(e){if(typeof e!="function")throw new Error;return this.each(RW(this._id,e))}function DW(e){typeof e!="function"&&(e=oL(e));for(var r=this._groups,n=r.length,a=new Array(n),i=0;i<n;++i)for(var o=r[i],s=o.length,c=a[i]=[],f,d=0;d<s;++d)(f=o[d])&&e.call(f,f.__data__,d,o)&&c.push(f);return new Ya(a,this._parents,this._name,this._id)}function LW(e){if(e._id!==this._id)throw new Error;for(var r=this._groups,n=e._groups,a=r.length,i=n.length,o=Math.min(a,i),s=new Array(a),c=0;c<o;++c)for(var f=r[c],d=n[c],h=f.length,m=s[c]=new Array(h),g,y=0;y<h;++y)(g=f[y]||d[y])&&(m[y]=g);for(;c<a;++c)s[c]=r[c];return new Ya(s,this._parents,this._name,this._id)}function IW(e){return(e+"").trim().split(/^|\s+/).every(function(r){var n=r.indexOf(".");return n>=0&&(r=r.slice(0,n)),!r||r==="start"})}function zW(e,r,n){var a,i,o=IW(r)?VS:ca;return function(){var s=o(this,e),c=s.on;c!==a&&(i=(a=c).copy()).on(r,n),s.on=i}}function qW(e,r){var n=this._id;return arguments.length<2?zn(this.node(),n).on.on(e):this.each(zW(n,e,r))}function BW(e){return function(){var r=this.parentNode;for(var n in this.__transition)if(+n!==e)return;r&&r.removeChild(this)}}function $W(){return this.on("end.remove",BW(this._id))}function FW(e){var r=this._name,n=this._id;typeof e!="function"&&(e=qS(e));for(var a=this._groups,i=a.length,o=new Array(i),s=0;s<i;++s)for(var c=a[s],f=c.length,d=o[s]=new Array(f),h,m,g=0;g<f;++g)(h=c[g])&&(m=e.call(h,h.__data__,g,c))&&("__data__"in h&&(m.__data__=h.__data__),d[g]=m,Sp(d[g],r,n,g,d,zn(h,n)));return new Ya(o,this._parents,r,n)}function UW(e){var r=this._name,n=this._id;typeof e!="function"&&(e=iL(e));for(var a=this._groups,i=a.length,o=[],s=[],c=0;c<i;++c)for(var f=a[c],d=f.length,h,m=0;m<d;++m)if(h=f[m]){for(var g=e.call(h,h.__data__,m,f),y,x=zn(h,n),E=0,_=g.length;E<_;++E)(y=g[E])&&Sp(y,r,n,E,g,x);o.push(g),s.push(h)}return new Ya(o,s,r,n)}var HW=jc.prototype.constructor;function GW(){return new HW(this._groups,this._parents)}function VW(e,r){var n,a,i;return function(){var o=Zl(this,e),s=(this.style.removeProperty(e),Zl(this,e));return o===s?null:o===n&&s===a?i:i=r(n=o,a=s)}}function CL(e){return function(){this.style.removeProperty(e)}}function KW(e,r,n){var a,i=n+"",o;return function(){var s=Zl(this,e);return s===i?null:s===a?o:o=r(a=s,n)}}function YW(e,r,n){var a,i,o;return function(){var s=Zl(this,e),c=n(this),f=c+"";return c==null&&(f=c=(this.style.removeProperty(e),Zl(this,e))),s===f?null:s===a&&f===i?o:(i=f,o=r(a=s,c))}}function XW(e,r){var n,a,i,o="style."+r,s="end."+o,c;return function(){var f=ca(this,e),d=f.on,h=f.value[o]==null?c||(c=CL(r)):void 0;(d!==n||i!==h)&&(a=(n=d).copy()).on(s,i=h),f.on=a}}function WW(e,r,n){var a=(e+="")=="transform"?XX:AL;return r==null?this.styleTween(e,VW(e,a)).on("end.style."+e,CL(e)):typeof r=="function"?this.styleTween(e,YW(e,a,KS(this,"style."+e,r))).each(XW(this._id,e)):this.styleTween(e,KW(e,a,r),n).on("end.style."+e,null)}function ZW(e,r,n){return function(a){this.style.setProperty(e,r.call(this,a),n)}}function QW(e,r,n){var a,i;function o(){var s=r.apply(this,arguments);return s!==i&&(a=(i=s)&&ZW(e,s,n)),a}return o._value=r,o}function JW(e,r,n){var a="style."+(e+="");if(arguments.length<2)return(a=this.tween(a))&&a._value;if(r==null)return this.tween(a,null);if(typeof r!="function")throw new Error;return this.tween(a,QW(e,r,n??""))}function eZ(e){return function(){this.textContent=e}}function tZ(e){return function(){var r=e(this);this.textContent=r??""}}function rZ(e){return this.tween("text",typeof e=="function"?tZ(KS(this,"text",e)):eZ(e==null?"":e+""))}function nZ(e){return function(r){this.textContent=e.call(this,r)}}function aZ(e){var r,n;function a(){var i=e.apply(this,arguments);return i!==n&&(r=(n=i)&&nZ(i)),r}return a._value=e,a}function iZ(e){var r="text";if(arguments.length<1)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,aZ(e))}function oZ(){for(var e=this._name,r=this._id,n=OL(),a=this._groups,i=a.length,o=0;o<i;++o)for(var s=a[o],c=s.length,f,d=0;d<c;++d)if(f=s[d]){var h=zn(f,r);Sp(f,e,n,d,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Ya(a,this._parents,e,n)}function lZ(){var e,r,n=this,a=n._id,i=n.size();return new Promise(function(o,s){var c={value:s},f={value:function(){--i===0&&o()}};n.each(function(){var d=ca(this,a),h=d.on;h!==e&&(r=(e=h).copy(),r._.cancel.push(c),r._.interrupt.push(c),r._.end.push(f)),d.on=r}),i===0&&o()})}var sZ=0;function Ya(e,r,n,a){this._groups=e,this._parents=r,this._name=n,this._id=a}function OL(){return++sZ}var Pa=jc.prototype;Ya.prototype={constructor:Ya,select:FW,selectAll:UW,selectChild:Pa.selectChild,selectChildren:Pa.selectChildren,filter:DW,merge:LW,selection:GW,transition:oZ,call:Pa.call,nodes:Pa.nodes,node:Pa.node,size:Pa.size,empty:Pa.empty,each:Pa.each,on:qW,attr:bW,attrTween:EW,style:WW,styleTween:JW,text:rZ,textTween:iZ,remove:$W,tween:dW,delay:AW,duration:TW,ease:MW,easeVarying:PW,end:lZ,[Symbol.iterator]:Pa[Symbol.iterator]};function uZ(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var cZ={time:null,delay:0,duration:250,ease:uZ};function fZ(e,r){for(var n;!(n=e.__transition)||!(n=n[r]);)if(!(e=e.parentNode))throw new Error(`transition ${r} not found`);return n}function dZ(e){var r,n;e instanceof Ya?(r=e._id,e=e._name):(r=OL(),(n=cZ).time=HS(),e=e==null?null:e+"");for(var a=this._groups,i=a.length,o=0;o<i;++o)for(var s=a[o],c=s.length,f,d=0;d<c;++d)(f=s[d])&&Sp(f,e,r,d,s,n||fZ(f,r));return new Ya(a,this._parents,e,r)}jc.prototype.interrupt=uW;jc.prototype.transition=dZ;const Cd=e=>()=>e;function hZ(e,{sourceEvent:r,target:n,transform:a,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:r,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:a,enumerable:!0,configurable:!0},_:{value:i}})}function $a(e,r,n){this.k=e,this.x=r,this.y=n}$a.prototype={constructor:$a,scale:function(e){return e===1?this:new $a(this.k*e,this.x,this.y)},translate:function(e,r){return e===0&r===0?this:new $a(this.k,this.x+this.k*e,this.y+this.k*r)},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 YS=new $a(1,0,0);Yn.prototype=$a.prototype;function Yn(e){for(;!e.__zoom;)if(!(e=e.parentNode))return YS;return e.__zoom}function ry(e){e.stopImmediatePropagation()}function _u(e){e.preventDefault(),e.stopImmediatePropagation()}function pZ(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function mZ(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.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 L5(){return this.__zoom||YS}function vZ(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function gZ(){return navigator.maxTouchPoints||"ontouchstart"in this}function yZ(e,r,n){var a=e.invertX(r[0][0])-n[0][0],i=e.invertX(r[1][0])-n[1][0],o=e.invertY(r[0][1])-n[0][1],s=e.invertY(r[1][1])-n[1][1];return e.translate(i>a?(a+i)/2:Math.min(0,a)||Math.max(0,i),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function bZ(){var e=pZ,r=mZ,n=yZ,a=vZ,i=gZ,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],c=250,f=eW,d=Ac("start","zoom","end"),h,m,g,y=500,x=150,E=0,_=10;function w($){$.property("__zoom",L5).on("wheel.zoom",P,{passive:!1}).on("mousedown.zoom",L).on("dblclick.zoom",D).filter(i).on("touchstart.zoom",q).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function($,Y,B,Z){var ae=$.selection?$.selection():$;ae.property("__zoom",L5),$!==ae?T($,Y,B,Z):ae.interrupt().each(function(){N(this,arguments).event(Z).start().zoom(null,typeof Y=="function"?Y.apply(this,arguments):Y).end()})},w.scaleBy=function($,Y,B,Z){w.scaleTo($,function(){var ae=this.__zoom.k,V=typeof Y=="function"?Y.apply(this,arguments):Y;return ae*V},B,Z)},w.scaleTo=function($,Y,B,Z){w.transform($,function(){var ae=r.apply(this,arguments),V=this.__zoom,fe=B==null?O(ae):typeof B=="function"?B.apply(this,arguments):B,F=V.invert(fe),X=typeof Y=="function"?Y.apply(this,arguments):Y;return n(C(A(V,X),fe,F),ae,s)},B,Z)},w.translateBy=function($,Y,B,Z){w.transform($,function(){return n(this.__zoom.translate(typeof Y=="function"?Y.apply(this,arguments):Y,typeof B=="function"?B.apply(this,arguments):B),r.apply(this,arguments),s)},null,Z)},w.translateTo=function($,Y,B,Z,ae){w.transform($,function(){var V=r.apply(this,arguments),fe=this.__zoom,F=Z==null?O(V):typeof Z=="function"?Z.apply(this,arguments):Z;return n(YS.translate(F[0],F[1]).scale(fe.k).translate(typeof Y=="function"?-Y.apply(this,arguments):-Y,typeof B=="function"?-B.apply(this,arguments):-B),V,s)},Z,ae)};function A($,Y){return Y=Math.max(o[0],Math.min(o[1],Y)),Y===$.k?$:new $a(Y,$.x,$.y)}function C($,Y,B){var Z=Y[0]-B[0]*$.k,ae=Y[1]-B[1]*$.k;return Z===$.x&&ae===$.y?$:new $a($.k,Z,ae)}function O($){return[(+$[0][0]+ +$[1][0])/2,(+$[0][1]+ +$[1][1])/2]}function T($,Y,B,Z){$.on("start.zoom",function(){N(this,arguments).event(Z).start()}).on("interrupt.zoom end.zoom",function(){N(this,arguments).event(Z).end()}).tween("zoom",function(){var ae=this,V=arguments,fe=N(ae,V).event(Z),F=r.apply(ae,V),X=B==null?O(F):typeof B=="function"?B.apply(ae,V):B,ce=Math.max(F[1][0]-F[0][0],F[1][1]-F[0][1]),G=ae.__zoom,H=typeof Y=="function"?Y.apply(ae,V):Y,te=f(G.invert(X).concat(ce/G.k),H.invert(X).concat(ce/H.k));return function(W){if(W===1)W=H;else{var xe=te(W),ee=ce/xe[2];W=new $a(ee,X[0]-xe[0]*ee,X[1]-xe[1]*ee)}fe.zoom(null,W)}})}function N($,Y,B){return!B&&$.__zooming||new M($,Y)}function M($,Y){this.that=$,this.args=Y,this.active=0,this.sourceEvent=null,this.extent=r.apply($,Y),this.taps=0}M.prototype={event:function($){return $&&(this.sourceEvent=$),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function($,Y){return this.mouse&&$!=="mouse"&&(this.mouse[1]=Y.invert(this.mouse[0])),this.touch0&&$!=="touch"&&(this.touch0[1]=Y.invert(this.touch0[0])),this.touch1&&$!=="touch"&&(this.touch1[1]=Y.invert(this.touch1[0])),this.that.__zoom=Y,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function($){var Y=pn(this.that).datum();d.call($,this.that,new hZ($,{sourceEvent:this.sourceEvent,target:w,transform:this.that.__zoom,dispatch:d}),Y)}};function P($,...Y){if(!e.apply(this,arguments))return;var B=N(this,Y).event($),Z=this.__zoom,ae=Math.max(o[0],Math.min(o[1],Z.k*Math.pow(2,a.apply(this,arguments)))),V=Xn($);if(B.wheel)(B.mouse[0][0]!==V[0]||B.mouse[0][1]!==V[1])&&(B.mouse[1]=Z.invert(B.mouse[0]=V)),clearTimeout(B.wheel);else{if(Z.k===ae)return;B.mouse=[V,Z.invert(V)],Qd(this),B.start()}_u($),B.wheel=setTimeout(fe,x),B.zoom("mouse",n(C(A(Z,ae),B.mouse[0],B.mouse[1]),B.extent,s));function fe(){B.wheel=null,B.end()}}function L($,...Y){if(g||!e.apply(this,arguments))return;var B=$.currentTarget,Z=N(this,Y,!0).event($),ae=pn($.view).on("mousemove.zoom",X,!0).on("mouseup.zoom",ce,!0),V=Xn($,B),fe=$.clientX,F=$.clientY;vL($.view),ry($),Z.mouse=[V,this.__zoom.invert(V)],Qd(this),Z.start();function X(G){if(_u(G),!Z.moved){var H=G.clientX-fe,te=G.clientY-F;Z.moved=H*H+te*te>E}Z.event(G).zoom("mouse",n(C(Z.that.__zoom,Z.mouse[0]=Xn(G,B),Z.mouse[1]),Z.extent,s))}function ce(G){ae.on("mousemove.zoom mouseup.zoom",null),gL(G.view,Z.moved),_u(G),Z.event(G).end()}}function D($,...Y){if(e.apply(this,arguments)){var B=this.__zoom,Z=Xn($.changedTouches?$.changedTouches[0]:$,this),ae=B.invert(Z),V=B.k*($.shiftKey?.5:2),fe=n(C(A(B,V),Z,ae),r.apply(this,Y),s);_u($),c>0?pn(this).transition().duration(c).call(T,fe,Z,$):pn(this).call(w.transform,fe,Z,$)}}function q($,...Y){if(e.apply(this,arguments)){var B=$.touches,Z=B.length,ae=N(this,Y,$.changedTouches.length===Z).event($),V,fe,F,X;for(ry($),fe=0;fe<Z;++fe)F=B[fe],X=Xn(F,this),X=[X,this.__zoom.invert(X),F.identifier],ae.touch0?!ae.touch1&&ae.touch0[2]!==X[2]&&(ae.touch1=X,ae.taps=0):(ae.touch0=X,V=!0,ae.taps=1+!!h);h&&(h=clearTimeout(h)),V&&(ae.taps<2&&(m=X[0],h=setTimeout(function(){h=null},y)),Qd(this),ae.start())}}function z($,...Y){if(this.__zooming){var B=N(this,Y).event($),Z=$.changedTouches,ae=Z.length,V,fe,F,X;for(_u($),V=0;V<ae;++V)fe=Z[V],F=Xn(fe,this),B.touch0&&B.touch0[2]===fe.identifier?B.touch0[0]=F:B.touch1&&B.touch1[2]===fe.identifier&&(B.touch1[0]=F);if(fe=B.that.__zoom,B.touch1){var ce=B.touch0[0],G=B.touch0[1],H=B.touch1[0],te=B.touch1[1],W=(W=H[0]-ce[0])*W+(W=H[1]-ce[1])*W,xe=(xe=te[0]-G[0])*xe+(xe=te[1]-G[1])*xe;fe=A(fe,Math.sqrt(W/xe)),F=[(ce[0]+H[0])/2,(ce[1]+H[1])/2],X=[(G[0]+te[0])/2,(G[1]+te[1])/2]}else if(B.touch0)F=B.touch0[0],X=B.touch0[1];else return;B.zoom("touch",n(C(fe,F,X),B.extent,s))}}function U($,...Y){if(this.__zooming){var B=N(this,Y).event($),Z=$.changedTouches,ae=Z.length,V,fe;for(ry($),g&&clearTimeout(g),g=setTimeout(function(){g=null},y),V=0;V<ae;++V)fe=Z[V],B.touch0&&B.touch0[2]===fe.identifier?delete B.touch0:B.touch1&&B.touch1[2]===fe.identifier&&delete B.touch1;if(B.touch1&&!B.touch0&&(B.touch0=B.touch1,delete B.touch1),B.touch0)B.touch0[1]=this.__zoom.invert(B.touch0[0]);else if(B.end(),B.taps===2&&(fe=Xn(fe,this),Math.hypot(m[0]-fe[0],m[1]-fe[1])<_)){var F=pn(this).on("dblclick.zoom");F&&F.apply(this,arguments)}}}return w.wheelDelta=function($){return arguments.length?(a=typeof $=="function"?$:Cd(+$),w):a},w.filter=function($){return arguments.length?(e=typeof $=="function"?$:Cd(!!$),w):e},w.touchable=function($){return arguments.length?(i=typeof $=="function"?$:Cd(!!$),w):i},w.extent=function($){return arguments.length?(r=typeof $=="function"?$:Cd([[+$[0][0],+$[0][1]],[+$[1][0],+$[1][1]]]),w):r},w.scaleExtent=function($){return arguments.length?(o[0]=+$[0],o[1]=+$[1],w):[o[0],o[1]]},w.translateExtent=function($){return arguments.length?(s[0][0]=+$[0][0],s[1][0]=+$[1][0],s[0][1]=+$[0][1],s[1][1]=+$[1][1],w):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},w.constrain=function($){return arguments.length?(n=$,w):n},w.duration=function($){return arguments.length?(c=+$,w):c},w.interpolate=function($){return arguments.length?(f=$,w):f},w.on=function(){var $=d.on.apply(d,arguments);return $===d?w:$},w.clickDistance=function($){return arguments.length?(E=($=+$)*$,w):Math.sqrt(E)},w.tapDistance=function($){return arguments.length?(_=+$,w):_},w}function Fi(e,r){return e==null||r==null?NaN:e<r?-1:e>r?1:e>=r?0:NaN}function xZ(e,r){return e==null||r==null?NaN:r<e?-1:r>e?1:r>=e?0:NaN}function XS(e){let r,n,a;e.length!==2?(r=Fi,n=(c,f)=>Fi(e(c),f),a=(c,f)=>e(c)-f):(r=e===Fi||e===xZ?e:_Z,n=e,a=e);function i(c,f,d=0,h=c.length){if(d<h){if(r(f,f)!==0)return h;do{const m=d+h>>>1;n(c[m],f)<0?d=m+1:h=m}while(d<h)}return d}function o(c,f,d=0,h=c.length){if(d<h){if(r(f,f)!==0)return h;do{const m=d+h>>>1;n(c[m],f)<=0?d=m+1:h=m}while(d<h)}return d}function s(c,f,d=0,h=c.length){const m=i(c,f,d,h-1);return m>d&&a(c[m-1],f)>-a(c[m],f)?m-1:m}return{left:i,center:s,right:o}}function _Z(){return 0}function TL(e){return e===null?NaN:+e}function*wZ(e,r){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const SZ=XS(Fi),Oc=SZ.right;XS(TL).center;class I5 extends Map{constructor(r,n=jZ){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),r!=null)for(const[a,i]of r)this.set(a,i)}get(r){return super.get(z5(this,r))}has(r){return super.has(z5(this,r))}set(r,n){return super.set(EZ(this,r),n)}delete(r){return super.delete(kZ(this,r))}}function z5({_intern:e,_key:r},n){const a=r(n);return e.has(a)?e.get(a):n}function EZ({_intern:e,_key:r},n){const a=r(n);return e.has(a)?e.get(a):(e.set(a,n),n)}function kZ({_intern:e,_key:r},n){const a=r(n);return e.has(a)&&(n=e.get(a),e.delete(a)),n}function jZ(e){return e!==null&&typeof e=="object"?e.valueOf():e}function AZ(e=Fi){if(e===Fi)return NL;if(typeof e!="function")throw new TypeError("compare is not a function");return(r,n)=>{const a=e(r,n);return a||a===0?a:(e(n,n)===0)-(e(r,r)===0)}}function NL(e,r){return(e==null||!(e>=e))-(r==null||!(r>=r))||(e<r?-1:e>r?1:0)}const CZ=Math.sqrt(50),OZ=Math.sqrt(10),TZ=Math.sqrt(2);function mh(e,r,n){const a=(r-e)/Math.max(0,n),i=Math.floor(Math.log10(a)),o=a/Math.pow(10,i),s=o>=CZ?10:o>=OZ?5:o>=TZ?2:1;let c,f,d;return i<0?(d=Math.pow(10,-i)/s,c=Math.round(e*d),f=Math.round(r*d),c/d<e&&++c,f/d>r&&--f,d=-d):(d=Math.pow(10,i)*s,c=Math.round(e/d),f=Math.round(r/d),c*d<e&&++c,f*d>r&&--f),f<c&&.5<=n&&n<2?mh(e,r,n*2):[c,f,d]}function x2(e,r,n){if(r=+r,e=+e,n=+n,!(n>0))return[];if(e===r)return[e];const a=r<e,[i,o,s]=a?mh(r,e,n):mh(e,r,n);if(!(o>=i))return[];const c=o-i+1,f=new Array(c);if(a)if(s<0)for(let d=0;d<c;++d)f[d]=(o-d)/-s;else for(let d=0;d<c;++d)f[d]=(o-d)*s;else if(s<0)for(let d=0;d<c;++d)f[d]=(i+d)/-s;else for(let d=0;d<c;++d)f[d]=(i+d)*s;return f}function _2(e,r,n){return r=+r,e=+e,n=+n,mh(e,r,n)[2]}function w2(e,r,n){r=+r,e=+e,n=+n;const a=r<e,i=a?_2(r,e,n):_2(e,r,n);return(a?-1:1)*(i<0?1/-i:i)}function vh(e,r){let n;if(r===void 0)for(const a of e)a!=null&&(n<a||n===void 0&&a>=a)&&(n=a);else{let a=-1;for(let i of e)(i=r(i,++a,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function gh(e,r){let n;if(r===void 0)for(const a of e)a!=null&&(n>a||n===void 0&&a>=a)&&(n=a);else{let a=-1;for(let i of e)(i=r(i,++a,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ML(e,r,n=0,a=1/0,i){if(r=Math.floor(r),n=Math.floor(Math.max(0,n)),a=Math.floor(Math.min(e.length-1,a)),!(n<=r&&r<=a))return e;for(i=i===void 0?NL:AZ(i);a>n;){if(a-n>600){const f=a-n+1,d=r-n+1,h=Math.log(f),m=.5*Math.exp(2*h/3),g=.5*Math.sqrt(h*m*(f-m)/f)*(d-f/2<0?-1:1),y=Math.max(n,Math.floor(r-d*m/f+g)),x=Math.min(a,Math.floor(r+(f-d)*m/f+g));ML(e,r,y,x,i)}const o=e[r];let s=n,c=a;for(wu(e,n,r),i(e[a],o)>0&&wu(e,n,a);s<c;){for(wu(e,s,c),++s,--c;i(e[s],o)<0;)++s;for(;i(e[c],o)>0;)--c}i(e[n],o)===0?wu(e,n,c):(++c,wu(e,c,a)),c<=r&&(n=c+1),r<=c&&(a=c-1)}return e}function wu(e,r,n){const a=e[r];e[r]=e[n],e[n]=a}function NZ(e,r,n){if(e=Float64Array.from(wZ(e)),!(!(a=e.length)||isNaN(r=+r))){if(r<=0||a<2)return gh(e);if(r>=1)return vh(e);var a,i=(a-1)*r,o=Math.floor(i),s=vh(ML(e,o).subarray(0,o+1)),c=gh(e.subarray(o+1));return s+(c-s)*(i-o)}}function MZ(e,r,n=TL){if(!(!(a=e.length)||isNaN(r=+r))){if(r<=0||a<2)return+n(e[0],0,e);if(r>=1)return+n(e[a-1],a-1,e);var a,i=(a-1)*r,o=Math.floor(i),s=+n(e[o],o,e),c=+n(e[o+1],o+1,e);return s+(c-s)*(i-o)}}function RZ(e,r,n){e=+e,r=+r,n=(i=arguments.length)<2?(r=e,e=0,1):i<3?1:+n;for(var a=-1,i=Math.max(0,Math.ceil((r-e)/n))|0,o=new Array(i);++a<i;)o[a]=e+a*n;return o}function PZ(e,r){let n=0;for(let a of e)(a=+a)&&(n+=a);return n}var DZ=typeof global=="object"&&global&&global.Object===Object&&global,LZ=typeof self=="object"&&self&&self.Object===Object&&self,RL=DZ||LZ||Function("return this")(),yh=RL.Symbol,PL=Object.prototype,IZ=PL.hasOwnProperty,zZ=PL.toString,Su=yh?yh.toStringTag:void 0;function qZ(e){var r=IZ.call(e,Su),n=e[Su];try{e[Su]=void 0;var a=!0}catch{}var i=zZ.call(e);return a&&(r?e[Su]=n:delete e[Su]),i}var BZ=Object.prototype,$Z=BZ.toString;function FZ(e){return $Z.call(e)}var UZ="[object Null]",HZ="[object Undefined]",q5=yh?yh.toStringTag:void 0;function GZ(e){return e==null?e===void 0?HZ:UZ:q5&&q5 in Object(e)?qZ(e):FZ(e)}function VZ(e){return e!=null&&typeof e=="object"}var KZ="[object Symbol]";function YZ(e){return typeof e=="symbol"||VZ(e)&&GZ(e)==KZ}var XZ=/\s/;function WZ(e){for(var r=e.length;r--&&XZ.test(e.charAt(r)););return r}var ZZ=/^\s+/;function QZ(e){return e&&e.slice(0,WZ(e)+1).replace(ZZ,"")}function bh(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}var B5=NaN,JZ=/^[-+]0x[0-9a-f]+$/i,eQ=/^0b[01]+$/i,tQ=/^0o[0-7]+$/i,rQ=parseInt;function $5(e){if(typeof e=="number")return e;if(YZ(e))return B5;if(bh(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=bh(r)?r+"":r}if(typeof e!="string")return e===0?e:+e;e=QZ(e);var n=eQ.test(e);return n||tQ.test(e)?rQ(e.slice(2),n?2:8):JZ.test(e)?B5:+e}var ny=function(){return RL.Date.now()},nQ="Expected a function",aQ=Math.max,iQ=Math.min;function DL(e,r,n){var a,i,o,s,c,f,d=0,h=!1,m=!1,g=!0;if(typeof e!="function")throw new TypeError(nQ);r=$5(r)||0,bh(n)&&(h=!!n.leading,m="maxWait"in n,o=m?aQ($5(n.maxWait)||0,r):o,g="trailing"in n?!!n.trailing:g);function y(N){var M=a,P=i;return a=i=void 0,d=N,s=e.apply(P,M),s}function x(N){return d=N,c=setTimeout(w,r),h?y(N):s}function E(N){var M=N-f,P=N-d,L=r-M;return m?iQ(L,o-P):L}function _(N){var M=N-f,P=N-d;return f===void 0||M>=r||M<0||m&&P>=o}function w(){var N=ny();if(_(N))return A(N);c=setTimeout(w,E(N))}function A(N){return c=void 0,g&&a?y(N):(a=i=void 0,s)}function C(){c!==void 0&&clearTimeout(c),d=0,a=f=i=c=void 0}function O(){return c===void 0?s:A(ny())}function T(){var N=ny(),M=_(N);if(a=arguments,i=this,f=N,M){if(c===void 0)return x(f);if(m)return clearTimeout(c),c=setTimeout(w,r),y(f)}return c===void 0&&(c=setTimeout(w,r)),s}return T.cancel=C,T.flush=O,T}var oQ="Expected a function";function lQ(e,r,n){var a=!0,i=!0;if(typeof e!="function")throw new TypeError(oQ);return bh(n)&&(a="leading"in n?!!n.leading:a,i="trailing"in n?!!n.trailing:i),DL(e,r,{leading:a,maxWait:r,trailing:i})}var To=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 e===0?0:Math.pow(1024,e-1)},Out:function(e){return e===1?1:1-Math.pow(2,-10*e)},InOut:function(e){return e===0?0:e===1?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 e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<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){var r=1.70158;return e===1?1:e*e*((r+1)*e-r)},Out:function(e){var r=1.70158;return e===0?0:--e*e*((r+1)*e+r)+1},InOut:function(e){var r=2.5949095;return(e*=2)<1?.5*(e*e*((r+1)*e-r)):.5*((e-=2)*e*((r+1)*e+r)+2)}}),Bounce:Object.freeze({In:function(e){return 1-To.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?To.Bounce.In(e*2)*.5:To.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e<Number.EPSILON?Number.EPSILON:e,e=e>1e4?1e4:e,{In:function(r){return Math.pow(r,e)},Out:function(r){return 1-Math.pow(1-r,e)},InOut:function(r){return r<.5?Math.pow(r*2,e)/2:(1-Math.pow(2-r*2,e))/2+.5}}}}),Fu=function(){return performance.now()},LL=(function(){function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,r)}return e.prototype.getAll=function(){var r=this;return Object.keys(this._tweens).map(function(n){return r._tweens[n]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var r,n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];for(var i=0,o=n;i<o.length;i++){var s=o[i];(r=s._group)===null||r===void 0||r.remove(s),s._group=this,this._tweens[s.getId()]=s,this._tweensAddedDuringUpdate[s.getId()]=s}},e.prototype.remove=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];for(var a=0,i=r;a<i.length;a++){var o=i[a];o._group=void 0,delete this._tweens[o.getId()],delete this._tweensAddedDuringUpdate[o.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(r){return!r.isPlaying()})},e.prototype.update=function(r,n){r===void 0&&(r=Fu()),n===void 0&&(n=!0);var a=Object.keys(this._tweens);if(a.length!==0)for(;a.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<a.length;i++){var o=this._tweens[a[i]],s=!n;o&&o.update(r,s)===!1&&!n&&this.remove(o)}a=Object.keys(this._tweensAddedDuringUpdate)}},e})(),S2={Linear:function(e,r){var n=e.length-1,a=n*r,i=Math.floor(a),o=S2.Utils.Linear;return r<0?o(e[0],e[1],a):r>1?o(e[n],e[n-1],n-a):o(e[i],e[i+1>n?n:i+1],a-i)},Utils:{Linear:function(e,r,n){return(r-e)*n+e}}},IL=(function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e})(),E2=new LL,F5=(function(){function e(r,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=To.Linear.None,this._interpolationFunction=S2.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=IL.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=r,typeof n=="object"?(this._group=n,n.add(this)):n===!0&&(this._group=E2,E2.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(r,n){if(n===void 0&&(n=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=r,this._propertiesAreSetUp=!1,this._duration=n<0?0:n,this},e.prototype.duration=function(r){return r===void 0&&(r=1e3),this._duration=r<0?0:r,this},e.prototype.dynamic=function(r){return r===void 0&&(r=!1),this._isDynamic=r,this},e.prototype.start=function(r,n){if(r===void 0&&(r=Fu()),n===void 0&&(n=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var a in this._valuesStartRepeat)this._swapEndStartRepeatValues(a),this._valuesStart[a]=this._valuesStartRepeat[a]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=r,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(r){return this.start(r,!0)},e.prototype._setupProperties=function(r,n,a,i,o){for(var s in a){var c=r[s],f=Array.isArray(c),d=f?"array":typeof c,h=!f&&Array.isArray(a[s]);if(!(d==="undefined"||d==="function")){if(h){var m=a[s];if(m.length===0)continue;for(var g=[c],y=0,x=m.length;y<x;y+=1){var E=this._handleRelativeValue(c,m[y]);if(isNaN(E)){h=!1,console.warn("Found invalid interpolation list. Skipping.");break}g.push(E)}h&&(a[s]=g)}if((d==="object"||f)&&c&&!h){n[s]=f?[]:{};var _=c;for(var w in _)n[s][w]=_[w];i[s]=f?[]:{};var m=a[s];if(!this._isDynamic){var A={};for(var w in m)A[w]=m[w];a[s]=m=A}this._setupProperties(_,n[s],m,i[s],o)}else(typeof n[s]>"u"||o)&&(n[s]=c),f||(n[s]*=1),h?i[s]=a[s].slice().reverse():i[s]=n[s]||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):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},e.prototype.pause=function(r){return r===void 0&&(r=Fu()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=r,this)},e.prototype.resume=function(r){return r===void 0&&(r=Fu()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=r-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var r=0,n=this._chainedTweens.length;r<n;r++)this._chainedTweens[r].stop();return this},e.prototype.group=function(r){return r?(r.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},e.prototype.remove=function(){var r;return(r=this._group)===null||r===void 0||r.remove(this),this},e.prototype.delay=function(r){return r===void 0&&(r=0),this._delayTime=r,this},e.prototype.repeat=function(r){return r===void 0&&(r=0),this._initialRepeat=r,this._repeat=r,this},e.prototype.repeatDelay=function(r){return this._repeatDelayTime=r,this},e.prototype.yoyo=function(r){return r===void 0&&(r=!1),this._yoyo=r,this},e.prototype.easing=function(r){return r===void 0&&(r=To.Linear.None),this._easingFunction=r,this},e.prototype.interpolation=function(r){return r===void 0&&(r=S2.Linear),this._interpolationFunction=r,this},e.prototype.chain=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return this._chainedTweens=r,this},e.prototype.onStart=function(r){return this._onStartCallback=r,this},e.prototype.onEveryStart=function(r){return this._onEveryStartCallback=r,this},e.prototype.onUpdate=function(r){return this._onUpdateCallback=r,this},e.prototype.onRepeat=function(r){return this._onRepeatCallback=r,this},e.prototype.onComplete=function(r){return this._onCompleteCallback=r,this},e.prototype.onStop=function(r){return this._onStopCallback=r,this},e.prototype.update=function(r,n){var a=this,i;if(r===void 0&&(r=Fu()),n===void 0&&(n=e.autoStartOnUpdate),this._isPaused)return!0;var o;if(!this._goToEnd&&!this._isPlaying)if(n)this.start(r,!0);else return!1;if(this._goToEnd=!1,r<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var s=r-this._startTime,c=this._duration+((i=this._repeatDelayTime)!==null&&i!==void 0?i:this._delayTime),f=this._duration+this._repeat*c,d=function(){if(a._duration===0||s>f)return 1;var E=Math.trunc(s/c),_=s-E*c,w=Math.min(_/a._duration,1);return w===0&&s===a._duration?1:w},h=d(),m=this._easingFunction(h);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,m),this._onUpdateCallback&&this._onUpdateCallback(this._object,h),this._duration===0||s>=this._duration)if(this._repeat>0){var g=Math.min(Math.trunc((s-this._duration)/c)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=g);for(o in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[o]=="string"&&(this._valuesStartRepeat[o]=this._valuesStartRepeat[o]+parseFloat(this._valuesEnd[o])),this._yoyo&&this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=c*g,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var y=0,x=this._chainedTweens.length;y<x;y++)this._chainedTweens[y].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(r,n,a,i){for(var o in a)if(n[o]!==void 0){var s=n[o]||0,c=a[o],f=Array.isArray(r[o]),d=Array.isArray(c),h=!f&&d;h?r[o]=this._interpolationFunction(c,i):typeof c=="object"&&c?this._updateProperties(r[o],s,c,i):(c=this._handleRelativeValue(s,c),typeof c=="number"&&(r[o]=s+(c-s)*i))}},e.prototype._handleRelativeValue=function(r,n){return typeof n!="string"?n:n.charAt(0)==="+"||n.charAt(0)==="-"?r+parseFloat(n):parseFloat(n)},e.prototype._swapEndStartRepeatValues=function(r){var n=this._valuesStartRepeat[r],a=this._valuesEnd[r];typeof a=="string"?this._valuesStartRepeat[r]=this._valuesStartRepeat[r]+parseFloat(a):this._valuesStartRepeat[r]=this._valuesEnd[r],this._valuesEnd[r]=n},e.autoStartOnUpdate=!1,e})();IL.nextId;var ia=E2;ia.getAll.bind(ia);ia.removeAll.bind(ia);ia.add.bind(ia);ia.remove.bind(ia);ia.update.bind(ia);function U5(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,a=Array(r);n<r;n++)a[n]=e[n];return a}function sQ(e){if(Array.isArray(e))return e}function uQ(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function cQ(e,r,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}function fQ(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,i,o,s,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(f=(a=o.call(n)).done)&&(c.push(a.value),c.length!==r);f=!0);}catch(h){d=!0,i=h}finally{try{if(!f&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}}function dQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
68
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hQ(e,r){return sQ(e)||fQ(e,r)||pQ(e,r)||dQ()}function pQ(e,r){if(e){if(typeof e=="string")return U5(e,r);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?U5(e,r):void 0}}var mQ=cQ(function e(r,n){var a=n.default,i=a===void 0?null:a,o=n.triggerUpdate,s=o===void 0?!0:o,c=n.onChange,f=c===void 0?function(d,h){}:c;uQ(this,e),this.name=r,this.defaultVal=i,this.triggerUpdate=s,this.onChange=f});function WS(e){var r=e.stateInit,n=r===void 0?function(){return{}}:r,a=e.props,i=a===void 0?{}:a,o=e.methods,s=o===void 0?{}:o,c=e.aliases,f=c===void 0?{}:c,d=e.init,h=d===void 0?function(){}:d,m=e.update,g=m===void 0?function(){}:m,y=Object.keys(i).map(function(x){return new mQ(x,i[x])});return function x(){for(var E=arguments.length,_=new Array(E),w=0;w<E;w++)_[w]=arguments[w];var A=!!(this instanceof x&&this.constructor),C=A?_.shift():void 0,O=_[0],T=O===void 0?{}:O,N=Object.assign({},n instanceof Function?n(T):n,{initialised:!1}),M={};function P(q){return L(q,T),D(),P}var L=function(z,U){h.call(P,z,N,U),N.initialised=!0},D=DL(function(){N.initialised&&(g.call(P,N,M),M={})},1);return y.forEach(function(q){P[q.name]=z(q);function z(U){var $=U.name,Y=U.triggerUpdate,B=Y===void 0?!1:Y,Z=U.onChange,ae=Z===void 0?function(F,X){}:Z,V=U.defaultVal,fe=V===void 0?null:V;return function(F){var X=N[$];if(!arguments.length)return X;var ce=F===void 0?fe:F;return N[$]=ce,ae.call(P,ce,N,X),!M.hasOwnProperty($)&&(M[$]=X),B&&D(),P}}}),Object.keys(s).forEach(function(q){P[q]=function(){for(var z,U=arguments.length,$=new Array(U),Y=0;Y<U;Y++)$[Y]=arguments[Y];return(z=s[q]).call.apply(z,[P,N].concat($))}}),Object.entries(f).forEach(function(q){var z=hQ(q,2),U=z[0],$=z[1];return P[U]=P[$]}),P.resetProps=function(){return y.forEach(function(q){P[q.name](q.defaultVal)}),P},P.resetProps(),N._rerender=D,A&&C&&P(C),P}}var Ve=(function(e){return typeof e=="function"?e:typeof e=="string"?function(r){return r[e]}:function(r){return e}});function xh(e){"@babel/helpers - typeof";return xh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},xh(e)}var vQ=/^\s+/,gQ=/\s+$/;function Oe(e,r){if(e=e||"",r=r||{},e instanceof Oe)return e;if(!(this instanceof Oe))return new Oe(e,r);var n=yQ(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=r.format||n.format,this._gradientType=r.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}Oe.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var r=this.toRgb();return(r.r*299+r.g*587+r.b*114)/1e3},getLuminance:function(){var r=this.toRgb(),n,a,i,o,s,c;return n=r.r/255,a=r.g/255,i=r.b/255,n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),a<=.03928?s=a/12.92:s=Math.pow((a+.055)/1.055,2.4),i<=.03928?c=i/12.92:c=Math.pow((i+.055)/1.055,2.4),.2126*o+.7152*s+.0722*c},setAlpha:function(r){return this._a=zL(r),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var r=G5(this._r,this._g,this._b);return{h:r.h*360,s:r.s,v:r.v,a:this._a}},toHsvString:function(){var r=G5(this._r,this._g,this._b),n=Math.round(r.h*360),a=Math.round(r.s*100),i=Math.round(r.v*100);return this._a==1?"hsv("+n+", "+a+"%, "+i+"%)":"hsva("+n+", "+a+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var r=H5(this._r,this._g,this._b);return{h:r.h*360,s:r.s,l:r.l,a:this._a}},toHslString:function(){var r=H5(this._r,this._g,this._b),n=Math.round(r.h*360),a=Math.round(r.s*100),i=Math.round(r.l*100);return this._a==1?"hsl("+n+", "+a+"%, "+i+"%)":"hsla("+n+", "+a+"%, "+i+"%, "+this._roundA+")"},toHex:function(r){return V5(this._r,this._g,this._b,r)},toHexString:function(r){return"#"+this.toHex(r)},toHex8:function(r){return wQ(this._r,this._g,this._b,this._a,r)},toHex8String:function(r){return"#"+this.toHex8(r)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"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(ct(this._r,255)*100)+"%",g:Math.round(ct(this._g,255)*100)+"%",b:Math.round(ct(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(ct(this._r,255)*100)+"%, "+Math.round(ct(this._g,255)*100)+"%, "+Math.round(ct(this._b,255)*100)+"%)":"rgba("+Math.round(ct(this._r,255)*100)+"%, "+Math.round(ct(this._g,255)*100)+"%, "+Math.round(ct(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:PQ[V5(this._r,this._g,this._b,!0)]||!1},toFilter:function(r){var n="#"+K5(this._r,this._g,this._b,this._a),a=n,i=this._gradientType?"GradientType = 1, ":"";if(r){var o=Oe(r);a="#"+K5(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+n+",endColorstr="+a+")"},toString:function(r){var n=!!r;r=r||this._format;var a=!1,i=this._a<1&&this._a>=0,o=!n&&i&&(r==="hex"||r==="hex6"||r==="hex3"||r==="hex4"||r==="hex8"||r==="name");return o?r==="name"&&this._a===0?this.toName():this.toRgbString():(r==="rgb"&&(a=this.toRgbString()),r==="prgb"&&(a=this.toPercentageRgbString()),(r==="hex"||r==="hex6")&&(a=this.toHexString()),r==="hex3"&&(a=this.toHexString(!0)),r==="hex4"&&(a=this.toHex8String(!0)),r==="hex8"&&(a=this.toHex8String()),r==="name"&&(a=this.toName()),r==="hsl"&&(a=this.toHslString()),r==="hsv"&&(a=this.toHsvString()),a||this.toHexString())},clone:function(){return Oe(this.toString())},_applyModification:function(r,n){var a=r.apply(null,[this].concat([].slice.call(n)));return this._r=a._r,this._g=a._g,this._b=a._b,this.setAlpha(a._a),this},lighten:function(){return this._applyModification(jQ,arguments)},brighten:function(){return this._applyModification(AQ,arguments)},darken:function(){return this._applyModification(CQ,arguments)},desaturate:function(){return this._applyModification(SQ,arguments)},saturate:function(){return this._applyModification(EQ,arguments)},greyscale:function(){return this._applyModification(kQ,arguments)},spin:function(){return this._applyModification(OQ,arguments)},_applyCombination:function(r,n){return r.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(MQ,arguments)},complement:function(){return this._applyCombination(TQ,arguments)},monochromatic:function(){return this._applyCombination(RQ,arguments)},splitcomplement:function(){return this._applyCombination(NQ,arguments)},triad:function(){return this._applyCombination(Y5,[3])},tetrad:function(){return this._applyCombination(Y5,[4])}};Oe.fromRatio=function(e,r){if(xh(e)=="object"){var n={};for(var a in e)e.hasOwnProperty(a)&&(a==="a"?n[a]=e[a]:n[a]=Uu(e[a]));e=n}return Oe(e,r)};function yQ(e){var r={r:0,g:0,b:0},n=1,a=null,i=null,o=null,s=!1,c=!1;return typeof e=="string"&&(e=zQ(e)),xh(e)=="object"&&(Da(e.r)&&Da(e.g)&&Da(e.b)?(r=bQ(e.r,e.g,e.b),s=!0,c=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Da(e.h)&&Da(e.s)&&Da(e.v)?(a=Uu(e.s),i=Uu(e.v),r=_Q(e.h,a,i),s=!0,c="hsv"):Da(e.h)&&Da(e.s)&&Da(e.l)&&(a=Uu(e.s),o=Uu(e.l),r=xQ(e.h,a,o),s=!0,c="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=zL(n),{ok:s,format:e.format||c,r:Math.min(255,Math.max(r.r,0)),g:Math.min(255,Math.max(r.g,0)),b:Math.min(255,Math.max(r.b,0)),a:n}}function bQ(e,r,n){return{r:ct(e,255)*255,g:ct(r,255)*255,b:ct(n,255)*255}}function H5(e,r,n){e=ct(e,255),r=ct(r,255),n=ct(n,255);var a=Math.max(e,r,n),i=Math.min(e,r,n),o,s,c=(a+i)/2;if(a==i)o=s=0;else{var f=a-i;switch(s=c>.5?f/(2-a-i):f/(a+i),a){case e:o=(r-n)/f+(r<n?6:0);break;case r:o=(n-e)/f+2;break;case n:o=(e-r)/f+4;break}o/=6}return{h:o,s,l:c}}function xQ(e,r,n){var a,i,o;e=ct(e,360),r=ct(r,100),n=ct(n,100);function s(d,h,m){return m<0&&(m+=1),m>1&&(m-=1),m<1/6?d+(h-d)*6*m:m<1/2?h:m<2/3?d+(h-d)*(2/3-m)*6:d}if(r===0)a=i=o=n;else{var c=n<.5?n*(1+r):n+r-n*r,f=2*n-c;a=s(f,c,e+1/3),i=s(f,c,e),o=s(f,c,e-1/3)}return{r:a*255,g:i*255,b:o*255}}function G5(e,r,n){e=ct(e,255),r=ct(r,255),n=ct(n,255);var a=Math.max(e,r,n),i=Math.min(e,r,n),o,s,c=a,f=a-i;if(s=a===0?0:f/a,a==i)o=0;else{switch(a){case e:o=(r-n)/f+(r<n?6:0);break;case r:o=(n-e)/f+2;break;case n:o=(e-r)/f+4;break}o/=6}return{h:o,s,v:c}}function _Q(e,r,n){e=ct(e,360)*6,r=ct(r,100),n=ct(n,100);var a=Math.floor(e),i=e-a,o=n*(1-r),s=n*(1-i*r),c=n*(1-(1-i)*r),f=a%6,d=[n,s,o,o,c,n][f],h=[c,n,n,s,o,o][f],m=[o,o,c,n,n,s][f];return{r:d*255,g:h*255,b:m*255}}function V5(e,r,n,a){var i=[Pn(Math.round(e).toString(16)),Pn(Math.round(r).toString(16)),Pn(Math.round(n).toString(16))];return a&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function wQ(e,r,n,a,i){var o=[Pn(Math.round(e).toString(16)),Pn(Math.round(r).toString(16)),Pn(Math.round(n).toString(16)),Pn(qL(a))];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[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function K5(e,r,n,a){var i=[Pn(qL(a)),Pn(Math.round(e).toString(16)),Pn(Math.round(r).toString(16)),Pn(Math.round(n).toString(16))];return i.join("")}Oe.equals=function(e,r){return!e||!r?!1:Oe(e).toRgbString()==Oe(r).toRgbString()};Oe.random=function(){return Oe.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function SQ(e,r){r=r===0?0:r||10;var n=Oe(e).toHsl();return n.s-=r/100,n.s=Ep(n.s),Oe(n)}function EQ(e,r){r=r===0?0:r||10;var n=Oe(e).toHsl();return n.s+=r/100,n.s=Ep(n.s),Oe(n)}function kQ(e){return Oe(e).desaturate(100)}function jQ(e,r){r=r===0?0:r||10;var n=Oe(e).toHsl();return n.l+=r/100,n.l=Ep(n.l),Oe(n)}function AQ(e,r){r=r===0?0:r||10;var n=Oe(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(r/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(r/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(r/100)))),Oe(n)}function CQ(e,r){r=r===0?0:r||10;var n=Oe(e).toHsl();return n.l-=r/100,n.l=Ep(n.l),Oe(n)}function OQ(e,r){var n=Oe(e).toHsl(),a=(n.h+r)%360;return n.h=a<0?360+a:a,Oe(n)}function TQ(e){var r=Oe(e).toHsl();return r.h=(r.h+180)%360,Oe(r)}function Y5(e,r){if(isNaN(r)||r<=0)throw new Error("Argument to polyad must be a positive number");for(var n=Oe(e).toHsl(),a=[Oe(e)],i=360/r,o=1;o<r;o++)a.push(Oe({h:(n.h+o*i)%360,s:n.s,l:n.l}));return a}function NQ(e){var r=Oe(e).toHsl(),n=r.h;return[Oe(e),Oe({h:(n+72)%360,s:r.s,l:r.l}),Oe({h:(n+216)%360,s:r.s,l:r.l})]}function MQ(e,r,n){r=r||6,n=n||30;var a=Oe(e).toHsl(),i=360/n,o=[Oe(e)];for(a.h=(a.h-(i*r>>1)+720)%360;--r;)a.h=(a.h+i)%360,o.push(Oe(a));return o}function RQ(e,r){r=r||6;for(var n=Oe(e).toHsv(),a=n.h,i=n.s,o=n.v,s=[],c=1/r;r--;)s.push(Oe({h:a,s:i,v:o})),o=(o+c)%1;return s}Oe.mix=function(e,r,n){n=n===0?0:n||50;var a=Oe(e).toRgb(),i=Oe(r).toRgb(),o=n/100,s={r:(i.r-a.r)*o+a.r,g:(i.g-a.g)*o+a.g,b:(i.b-a.b)*o+a.b,a:(i.a-a.a)*o+a.a};return Oe(s)};Oe.readability=function(e,r){var n=Oe(e),a=Oe(r);return(Math.max(n.getLuminance(),a.getLuminance())+.05)/(Math.min(n.getLuminance(),a.getLuminance())+.05)};Oe.isReadable=function(e,r,n){var a=Oe.readability(e,r),i,o;switch(o=!1,i=qQ(n),i.level+i.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7;break}return o};Oe.mostReadable=function(e,r,n){var a=null,i=0,o,s,c,f;n=n||{},s=n.includeFallbackColors,c=n.level,f=n.size;for(var d=0;d<r.length;d++)o=Oe.readability(e,r[d]),o>i&&(i=o,a=Oe(r[d]));return Oe.isReadable(e,a,{level:c,size:f})||!s?a:(n.includeFallbackColors=!1,Oe.mostReadable(e,["#fff","#000"],n))};var k2=Oe.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"},PQ=Oe.hexNames=DQ(k2);function DQ(e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[e[n]]=n);return r}function zL(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ct(e,r){LQ(e)&&(e="100%");var n=IQ(e);return e=Math.min(r,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*r,10)/100),Math.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function Ep(e){return Math.min(1,Math.max(0,e))}function Ur(e){return parseInt(e,16)}function LQ(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function IQ(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Pn(e){return e.length==1?"0"+e:""+e}function Uu(e){return e<=1&&(e=e*100+"%"),e}function qL(e){return Math.round(parseFloat(e)*255).toString(16)}function X5(e){return Ur(e)/255}var On=(function(){var e="[-\\+]?\\d+%?",r="[-\\+]?\\d*\\.\\d+%?",n="(?:"+r+")|(?:"+e+")",a="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+a),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+a),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+a),hsva:new RegExp("hsva"+i),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 Da(e){return!!On.CSS_UNIT.exec(e)}function zQ(e){e=e.replace(vQ,"").replace(gQ,"").toLowerCase();var r=!1;if(k2[e])e=k2[e],r=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=On.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=On.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=On.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=On.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=On.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=On.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=On.hex8.exec(e))?{r:Ur(n[1]),g:Ur(n[2]),b:Ur(n[3]),a:X5(n[4]),format:r?"name":"hex8"}:(n=On.hex6.exec(e))?{r:Ur(n[1]),g:Ur(n[2]),b:Ur(n[3]),format:r?"name":"hex"}:(n=On.hex4.exec(e))?{r:Ur(n[1]+""+n[1]),g:Ur(n[2]+""+n[2]),b:Ur(n[3]+""+n[3]),a:X5(n[4]+""+n[4]),format:r?"name":"hex8"}:(n=On.hex3.exec(e))?{r:Ur(n[1]+""+n[1]),g:Ur(n[2]+""+n[2]),b:Ur(n[3]+""+n[3]),format:r?"name":"hex"}:!1}function qQ(e){var r,n;return e=e||{level:"AA",size:"small"},r=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),r!=="AA"&&r!=="AAA"&&(r="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:r,size:n}}function j2(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,a=Array(r);n<r;n++)a[n]=e[n];return a}function BQ(e){if(Array.isArray(e))return j2(e)}function BL(e,r,n){if(typeof e=="function"?e===r:e.has(r))return arguments.length<3?r:n;throw new TypeError("Private element is not present on this object")}function $Q(e,r){if(r.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function FQ(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function sn(e,r){return e.get(BL(e,r))}function W5(e,r,n){$Q(e,r),r.set(e,n)}function Z5(e,r,n){return e.set(BL(e,r),n),n}function UQ(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,XQ(a.key),a)}}function HQ(e,r,n){return r&&UQ(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function GQ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function VQ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
69
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KQ(e){return BQ(e)||GQ(e)||WQ(e)||VQ()}function YQ(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function XQ(e){var r=YQ(e,"string");return typeof r=="symbol"?r:r+""}function WQ(e,r){if(e){if(typeof e=="string")return j2(e,r);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?j2(e,r):void 0}}var ZQ=123,QQ=function(r){return"#".concat(Math.min(r,Math.pow(2,24)).toString(16).padStart(6,"0"))},$L=function(r,n,a){return(r<<16)+(n<<8)+a},JQ=function(r){var n=Oe(r).toRgb(),a=n.r,i=n.g,o=n.b;return $L(a,i,o)},Q5=function(r,n){return r*ZQ%Math.pow(2,n)},mo=new WeakMap,La=new WeakMap,eJ=(function(){function e(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;FQ(this,e),W5(this,mo,void 0),W5(this,La,void 0),Z5(La,this,r),this.reset()}return HQ(e,[{key:"reset",value:function(){Z5(mo,this,["__reserved for background__"])}},{key:"register",value:function(n){if(sn(mo,this).length>=Math.pow(2,24-sn(La,this)))return null;var a=sn(mo,this).length,i=Q5(a,sn(La,this)),o=QQ(a+(i<<24-sn(La,this)));return sn(mo,this).push(n),o}},{key:"lookup",value:function(n){if(!n)return null;var a=typeof n=="string"?JQ(n):$L.apply(void 0,KQ(n));if(!a)return null;var i=a&Math.pow(2,24-sn(La,this))-1,o=a>>24-sn(La,this)&Math.pow(2,sn(La,this))-1;return Q5(i,sn(La,this))!==o||i>=sn(mo,this).length?null:sn(mo,this)[i]}}])})(),Tc,ft,FL,UL,Ii,J5,HL,GL,VL,ZS,A2,C2,_h={},wh=[],tJ=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,kp=Array.isArray;function Qn(e,r){for(var n in r)e[n]=r[n];return e}function QS(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function rJ(e,r,n){var a,i,o,s={};for(o in r)o=="key"?a=r[o]:o=="ref"?i=r[o]:s[o]=r[o];if(arguments.length>2&&(s.children=arguments.length>3?Tc.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return Wu(e,s,a,i,null)}function Wu(e,r,n,a,i){var o={type:e,props:r,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++FL,__i:-1,__u:0};return i==null&&ft.vnode!=null&&ft.vnode(o),o}function jp(e){return e.children}function Jd(e,r){this.props=e,this.context=r}function Jl(e,r){if(r==null)return e.__?Jl(e.__,e.__i+1):null;for(var n;r<e.__k.length;r++)if((n=e.__k[r])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Jl(e):null}function nJ(e){if(e.__P&&e.__d){var r=e.__v,n=r.__e,a=[],i=[],o=Qn({},r);o.__v=r.__v+1,ft.vnode&&ft.vnode(o),JS(e.__P,o,r,e.__n,e.__P.namespaceURI,32&r.__u?[n]:null,a,n??Jl(r),!!(32&r.__u),i),o.__v=r.__v,o.__.__k[o.__i]=o,WL(a,o,i),r.__e=r.__=null,o.__e!=n&&KL(o)}}function KL(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(r){if(r!=null&&r.__e!=null)return e.__e=e.__c.base=r.__e}),KL(e)}function eT(e){(!e.__d&&(e.__d=!0)&&Ii.push(e)&&!Sh.__r++||J5!=ft.debounceRendering)&&((J5=ft.debounceRendering)||HL)(Sh)}function Sh(){try{for(var e,r=1;Ii.length;)Ii.length>r&&Ii.sort(GL),e=Ii.shift(),r=Ii.length,nJ(e)}finally{Ii.length=Sh.__r=0}}function YL(e,r,n,a,i,o,s,c,f,d,h){var m,g,y,x,E,_,w,A=a&&a.__k||wh,C=r.length;for(f=aJ(n,r,A,f,C),m=0;m<C;m++)(y=n.__k[m])!=null&&(g=y.__i!=-1&&A[y.__i]||_h,y.__i=m,_=JS(e,y,g,i,o,s,c,f,d,h),x=y.__e,y.ref&&g.ref!=y.ref&&(g.ref&&eE(g.ref,null,y),h.push(y.ref,y.__c||x,y)),E==null&&x!=null&&(E=x),(w=!!(4&y.__u))||g.__k===y.__k?f=XL(y,f,e,w):typeof y.type=="function"&&_!==void 0?f=_:x&&(f=x.nextSibling),y.__u&=-7);return n.__e=E,f}function aJ(e,r,n,a,i){var o,s,c,f,d,h=n.length,m=h,g=0;for(e.__k=new Array(i),o=0;o<i;o++)(s=r[o])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=e.__k[o]=Wu(null,s,null,null,null):kp(s)?s=e.__k[o]=Wu(jp,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[o]=Wu(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[o]=s,f=o+g,s.__=e,s.__b=e.__b+1,c=null,(d=s.__i=iJ(s,n,f,m))!=-1&&(m--,(c=n[d])&&(c.__u|=2)),c==null||c.__v==null?(d==-1&&(i>h?g--:i<h&&g++),typeof s.type!="function"&&(s.__u|=4)):d!=f&&(d==f-1?g--:d==f+1?g++:(d>f?g--:g++,s.__u|=4))):e.__k[o]=null;if(m)for(o=0;o<h;o++)(c=n[o])!=null&&(2&c.__u)==0&&(c.__e==a&&(a=Jl(c)),QL(c,c));return a}function XL(e,r,n,a){var i,o;if(typeof e.type=="function"){for(i=e.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=e,r=XL(i[o],r,n,a));return r}e.__e!=r&&(a&&(r&&e.type&&!r.parentNode&&(r=Jl(e)),n.insertBefore(e.__e,r||null)),r=e.__e);do r=r&&r.nextSibling;while(r!=null&&r.nodeType==8);return r}function iJ(e,r,n,a){var i,o,s,c=e.key,f=e.type,d=r[n],h=d!=null&&(2&d.__u)==0;if(d===null&&c==null||h&&c==d.key&&f==d.type)return n;if(a>(h?1:0)){for(i=n-1,o=n+1;i>=0||o<r.length;)if((d=r[s=i>=0?i--:o++])!=null&&(2&d.__u)==0&&c==d.key&&f==d.type)return s}return-1}function tT(e,r,n){r[0]=="-"?e.setProperty(r,n??""):e[r]=n==null?"":typeof n!="number"||tJ.test(r)?n:n+"px"}function Od(e,r,n,a,i){var o,s;e:if(r=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof a=="string"&&(e.style.cssText=a=""),a)for(r in a)n&&r in n||tT(e.style,r,"");if(n)for(r in n)a&&n[r]==a[r]||tT(e.style,r,n[r])}else if(r[0]=="o"&&r[1]=="n")o=r!=(r=r.replace(VL,"$1")),s=r.toLowerCase(),r=s in e||r=="onFocusOut"||r=="onFocusIn"?s.slice(2):r.slice(2),e.l||(e.l={}),e.l[r+o]=n,n?a?n.u=a.u:(n.u=ZS,e.addEventListener(r,o?C2:A2,o)):e.removeEventListener(r,o?C2:A2,o);else{if(i=="http://www.w3.org/2000/svg")r=r.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(r!="width"&&r!="height"&&r!="href"&&r!="list"&&r!="form"&&r!="tabIndex"&&r!="download"&&r!="rowSpan"&&r!="colSpan"&&r!="role"&&r!="popover"&&r in e)try{e[r]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&r[4]!="-"?e.removeAttribute(r):e.setAttribute(r,r=="popover"&&n==1?"":n))}}function rT(e){return function(r){if(this.l){var n=this.l[r.type+e];if(r.t==null)r.t=ZS++;else if(r.t<n.u)return;return n(ft.event?ft.event(r):r)}}}function JS(e,r,n,a,i,o,s,c,f,d){var h,m,g,y,x,E,_,w,A,C,O,T,N,M,P,L=r.type;if(r.constructor!==void 0)return null;128&n.__u&&(f=!!(32&n.__u),o=[c=r.__e=n.__e]),(h=ft.__b)&&h(r);e:if(typeof L=="function")try{if(w=r.props,A=L.prototype&&L.prototype.render,C=(h=L.contextType)&&a[h.__c],O=h?C?C.props.value:h.__:a,n.__c?_=(m=r.__c=n.__c).__=m.__E:(A?r.__c=m=new L(w,O):(r.__c=m=new Jd(w,O),m.constructor=L,m.render=lJ),C&&C.sub(m),m.state||(m.state={}),m.__n=a,g=m.__d=!0,m.__h=[],m._sb=[]),A&&m.__s==null&&(m.__s=m.state),A&&L.getDerivedStateFromProps!=null&&(m.__s==m.state&&(m.__s=Qn({},m.__s)),Qn(m.__s,L.getDerivedStateFromProps(w,m.__s))),y=m.props,x=m.state,m.__v=r,g)A&&L.getDerivedStateFromProps==null&&m.componentWillMount!=null&&m.componentWillMount(),A&&m.componentDidMount!=null&&m.__h.push(m.componentDidMount);else{if(A&&L.getDerivedStateFromProps==null&&w!==y&&m.componentWillReceiveProps!=null&&m.componentWillReceiveProps(w,O),r.__v==n.__v||!m.__e&&m.shouldComponentUpdate!=null&&m.shouldComponentUpdate(w,m.__s,O)===!1){r.__v!=n.__v&&(m.props=w,m.state=m.__s,m.__d=!1),r.__e=n.__e,r.__k=n.__k,r.__k.some(function(D){D&&(D.__=r)}),wh.push.apply(m.__h,m._sb),m._sb=[],m.__h.length&&s.push(m);break e}m.componentWillUpdate!=null&&m.componentWillUpdate(w,m.__s,O),A&&m.componentDidUpdate!=null&&m.__h.push(function(){m.componentDidUpdate(y,x,E)})}if(m.context=O,m.props=w,m.__P=e,m.__e=!1,T=ft.__r,N=0,A)m.state=m.__s,m.__d=!1,T&&T(r),h=m.render(m.props,m.state,m.context),wh.push.apply(m.__h,m._sb),m._sb=[];else do m.__d=!1,T&&T(r),h=m.render(m.props,m.state,m.context),m.state=m.__s;while(m.__d&&++N<25);m.state=m.__s,m.getChildContext!=null&&(a=Qn(Qn({},a),m.getChildContext())),A&&!g&&m.getSnapshotBeforeUpdate!=null&&(E=m.getSnapshotBeforeUpdate(y,x)),M=h!=null&&h.type===jp&&h.key==null?ZL(h.props.children):h,c=YL(e,kp(M)?M:[M],r,n,a,i,o,s,c,f,d),m.base=r.__e,r.__u&=-161,m.__h.length&&s.push(m),_&&(m.__E=m.__=null)}catch(D){if(r.__v=null,f||o!=null)if(D.then){for(r.__u|=f?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;o[o.indexOf(c)]=null,r.__e=c}else{for(P=o.length;P--;)QS(o[P]);O2(r)}else r.__e=n.__e,r.__k=n.__k,D.then||O2(r);ft.__e(D,r,n)}else o==null&&r.__v==n.__v?(r.__k=n.__k,r.__e=n.__e):c=r.__e=oJ(n.__e,r,n,a,i,o,s,f,d);return(h=ft.diffed)&&h(r),128&r.__u?void 0:c}function O2(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(O2))}function WL(e,r,n){for(var a=0;a<n.length;a++)eE(n[a],n[++a],n[++a]);ft.__c&&ft.__c(r,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){ft.__e(o,i.__v)}})}function ZL(e){return typeof e!="object"||e==null||e.__b>0?e:kp(e)?e.map(ZL):Qn({},e)}function oJ(e,r,n,a,i,o,s,c,f){var d,h,m,g,y,x,E,_=n.props||_h,w=r.props,A=r.type;if(A=="svg"?i="http://www.w3.org/2000/svg":A=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(d=0;d<o.length;d++)if((y=o[d])&&"setAttribute"in y==!!A&&(A?y.localName==A:y.nodeType==3)){e=y,o[d]=null;break}}if(e==null){if(A==null)return document.createTextNode(w);e=document.createElementNS(i,A,w.is&&w),c&&(ft.__m&&ft.__m(r,o),c=!1),o=null}if(A==null)_===w||c&&e.data==w||(e.data=w);else{if(o=o&&Tc.call(e.childNodes),!c&&o!=null)for(_={},d=0;d<e.attributes.length;d++)_[(y=e.attributes[d]).name]=y.value;for(d in _)y=_[d],d=="dangerouslySetInnerHTML"?m=y:d=="children"||d in w||d=="value"&&"defaultValue"in w||d=="checked"&&"defaultChecked"in w||Od(e,d,null,y,i);for(d in w)y=w[d],d=="children"?g=y:d=="dangerouslySetInnerHTML"?h=y:d=="value"?x=y:d=="checked"?E=y:c&&typeof y!="function"||_[d]===y||Od(e,d,y,_[d],i);if(h)c||m&&(h.__html==m.__html||h.__html==e.innerHTML)||(e.innerHTML=h.__html),r.__k=[];else if(m&&(e.innerHTML=""),YL(r.type=="template"?e.content:e,kp(g)?g:[g],r,n,a,A=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&Jl(n,0),c,f),o!=null)for(d=o.length;d--;)QS(o[d]);c||(d="value",A=="progress"&&x==null?e.removeAttribute("value"):x!=null&&(x!==e[d]||A=="progress"&&!x||A=="option"&&x!=_[d])&&Od(e,d,x,_[d],i),d="checked",E!=null&&E!=e[d]&&Od(e,d,E,_[d],i))}return e}function eE(e,r,n){try{if(typeof e=="function"){var a=typeof e.__u=="function";a&&e.__u(),a&&r==null||(e.__u=e(r))}else e.current=r}catch(i){ft.__e(i,n)}}function QL(e,r,n){var a,i;if(ft.unmount&&ft.unmount(e),(a=e.ref)&&(a.current&&a.current!=e.__e||eE(a,null,r)),(a=e.__c)!=null){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(o){ft.__e(o,r)}a.base=a.__P=null}if(a=e.__k)for(i=0;i<a.length;i++)a[i]&&QL(a[i],r,n||typeof e.type!="function");n||QS(e.__e),e.__c=e.__=e.__e=void 0}function lJ(e,r,n){return this.constructor(e,n)}function sJ(e,r,n){var a,i,o,s;r==document&&(r=document.documentElement),ft.__&&ft.__(e,r),i=(a=!1)?null:r.__k,o=[],s=[],JS(r,e=r.__k=rJ(jp,null,[e]),i||_h,_h,r.namespaceURI,i?null:r.firstChild?Tc.call(r.childNodes):null,o,i?i.__e:r.firstChild,a,s),WL(o,e,s)}function JL(e,r,n){var a,i,o,s,c=Qn({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),r)o=="key"?a=r[o]:o=="ref"?i=r[o]:c[o]=r[o]===void 0&&s!=null?s[o]:r[o];return arguments.length>2&&(c.children=arguments.length>3?Tc.call(arguments,2):n),Wu(e.type,c,a||e.key,i||e.ref,null)}Tc=wh.slice,ft={__e:function(e,r,n,a){for(var i,o,s;r=r.__;)if((i=r.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,a||{}),s=i.__d),s)return i.__E=i}catch(c){e=c}throw e}},FL=0,UL=function(e){return e!=null&&e.constructor===void 0},Jd.prototype.setState=function(e,r){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Qn({},this.state),typeof e=="function"&&(e=e(Qn({},n),this.props)),e&&Qn(n,e),e!=null&&this.__v&&(r&&this._sb.push(r),eT(this))},Jd.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),eT(this))},Jd.prototype.render=jp,Ii=[],HL=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,GL=function(e,r){return e.__v.__b-r.__v.__b},Sh.__r=0,VL=/(PointerCapture)$|Capture$/i,ZS=0,A2=rT(!1),C2=rT(!0);function nT(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,a=Array(r);n<r;n++)a[n]=e[n];return a}function uJ(e){if(Array.isArray(e))return e}function cJ(e,r,n){return(r=vJ(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function fJ(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,i,o,s,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(f=(a=o.call(n)).done)&&(c.push(a.value),c.length!==r);f=!0);}catch(h){d=!0,i=h}finally{try{if(!f&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}}function dJ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
70
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aT(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function hJ(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?aT(Object(n),!0).forEach(function(a){cJ(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aT(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function pJ(e,r){return uJ(e)||fJ(e,r)||gJ(e,r)||dJ()}function mJ(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function vJ(e){var r=mJ(e,"string");return typeof r=="symbol"?r:r+""}function Eh(e){"@babel/helpers - typeof";return Eh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Eh(e)}function gJ(e,r){if(e){if(typeof e=="string")return nT(e,r);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nT(e,r):void 0}}var T2=function(r){if(Eh(r)!=="object")return r;var n=JL(r);if(n.props){var a;n.props=hJ({},n.props),n!=null&&(a=n.props)!==null&&a!==void 0&&a.children&&(n.props.children=Array.isArray(n.props.children)?n.props.children.map(T2):T2(n.props.children))}return n},yJ=function(r){return UL(JL(r))},bJ=function(r,n){delete n.__k,sJ(T2(r),n)};function xJ(e,r){r===void 0&&(r={});var n=r.insertAt;if(!(typeof document>"u")){var a=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&a.firstChild?a.insertBefore(i,a.firstChild):a.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var _J=`.float-tooltip-kap {
71
+ position: absolute;
72
+ width: max-content; /* prevent shrinking near right edge */
73
+ max-width: max(50%, 150px);
74
+ padding: 3px 5px;
75
+ border-radius: 3px;
76
+ font: 12px sans-serif;
77
+ color: #eee;
78
+ background: rgba(0,0,0,0.6);
79
+ pointer-events: none;
80
+ }
81
+ `;xJ(_J);var wJ=WS({props:{content:{default:!1},offsetX:{triggerUpdate:!1},offsetY:{triggerUpdate:!1}},init:function(r,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=a.style,o=i===void 0?{}:i,s=!!r&&Eh(r)==="object"&&!!r.node&&typeof r.node=="function",c=pn(s?r.node():r);c.style("position")==="static"&&c.style("position","relative"),n.tooltipEl=c.append("div").attr("class","float-tooltip-kap"),Object.entries(o).forEach(function(d){var h=pJ(d,2),m=h[0],g=h[1];return n.tooltipEl.style(m,g)}),n.tooltipEl.style("left","-10000px").style("display","none");var f="tooltip-".concat(Math.round(Math.random()*1e12));n.mouseInside=!1,c.on("mousemove.".concat(f),function(d){n.mouseInside=!0;var h=Xn(d),m=c.node(),g=m.offsetWidth,y=m.offsetHeight,x=[n.offsetX===null||n.offsetX===void 0?"-".concat(h[0]/g*100,"%"):typeof n.offsetX=="number"?"calc(-50% + ".concat(n.offsetX,"px)"):n.offsetX,n.offsetY===null||n.offsetY===void 0?y>130&&y-h[1]<100?"calc(-100% - 6px)":"21px":typeof n.offsetY=="number"?n.offsetY<0?"calc(-100% - ".concat(Math.abs(n.offsetY),"px)"):"".concat(n.offsetY,"px"):n.offsetY];n.tooltipEl.style("left",h[0]+"px").style("top",h[1]+"px").style("transform","translate(".concat(x.join(","),")")),n.content&&n.tooltipEl.style("display","inline")}),c.on("mouseover.".concat(f),function(){n.mouseInside=!0,n.content&&n.tooltipEl.style("display","inline")}),c.on("mouseout.".concat(f),function(){n.mouseInside=!1,n.tooltipEl.style("display","none")})},update:function(r){r.tooltipEl.style("display",r.content&&r.mouseInside?"inline":"none"),r.content?r.content instanceof HTMLElement?(r.tooltipEl.text(""),r.tooltipEl.append(function(){return r.content})):typeof r.content=="string"?r.tooltipEl.html(r.content):yJ(r.content)?(r.tooltipEl.text(""),bJ(r.content,r.tooltipEl.node())):(r.tooltipEl.style("display","none"),console.warn("Tooltip content is invalid, skipping.",r.content,r.content.toString())):r.tooltipEl.text("")}});function SJ(e,r,n){var a,i=1;e==null&&(e=0),r==null&&(r=0),n==null&&(n=0);function o(){var s,c=a.length,f,d=0,h=0,m=0;for(s=0;s<c;++s)f=a[s],d+=f.x||0,h+=f.y||0,m+=f.z||0;for(d=(d/c-e)*i,h=(h/c-r)*i,m=(m/c-n)*i,s=0;s<c;++s)f=a[s],d&&(f.x-=d),h&&(f.y-=h),m&&(f.z-=m)}return o.initialize=function(s){a=s},o.x=function(s){return arguments.length?(e=+s,o):e},o.y=function(s){return arguments.length?(r=+s,o):r},o.z=function(s){return arguments.length?(n=+s,o):n},o.strength=function(s){return arguments.length?(i=+s,o):i},o}function EJ(e){const r=+this._x.call(null,e);return eI(this.cover(r),r,e)}function eI(e,r,n){if(isNaN(r))return e;var a,i=e._root,o={data:n},s=e._x0,c=e._x1,f,d,h,m,g;if(!i)return e._root=o,e;for(;i.length;)if((h=r>=(f=(s+c)/2))?s=f:c=f,a=i,!(i=i[m=+h]))return a[m]=o,e;if(d=+e._x.call(null,i.data),r===d)return o.next=i,a?a[m]=o:e._root=o,e;do a=a?a[m]=new Array(2):e._root=new Array(2),(h=r>=(f=(s+c)/2))?s=f:c=f;while((m=+h)==(g=+(d>=f)));return a[g]=i,a[m]=o,e}function kJ(e){Array.isArray(e)||(e=Array.from(e));const r=e.length,n=new Float64Array(r);let a=1/0,i=-1/0;for(let o=0,s;o<r;++o)isNaN(s=+this._x.call(null,e[o]))||(n[o]=s,s<a&&(a=s),s>i&&(i=s));if(a>i)return this;this.cover(a).cover(i);for(let o=0;o<r;++o)eI(this,n[o],e[o]);return this}function jJ(e){if(isNaN(e=+e))return this;var r=this._x0,n=this._x1;if(isNaN(r))n=(r=Math.floor(e))+1;else{for(var a=n-r||1,i=this._root,o,s;r>e||e>=n;)switch(s=+(e<r),o=new Array(2),o[s]=i,i=o,a*=2,s){case 0:n=r+a;break;case 1:r=n-a;break}this._root&&this._root.length&&(this._root=i)}return this._x0=r,this._x1=n,this}function AJ(){var e=[];return this.visit(function(r){if(!r.length)do e.push(r.data);while(r=r.next)}),e}function CJ(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function Ha(e,r,n){this.node=e,this.x0=r,this.x1=n}function OJ(e,r){var n,a=this._x0,i,o,s=this._x1,c=[],f=this._root,d,h;for(f&&c.push(new Ha(f,a,s)),r==null?r=1/0:(a=e-r,s=e+r);d=c.pop();)if(!(!(f=d.node)||(i=d.x0)>s||(o=d.x1)<a))if(f.length){var m=(i+o)/2;c.push(new Ha(f[1],m,o),new Ha(f[0],i,m)),(h=+(e>=m))&&(d=c[c.length-1],c[c.length-1]=c[c.length-1-h],c[c.length-1-h]=d)}else{var g=Math.abs(e-+this._x.call(null,f.data));g<r&&(r=g,a=e-g,s=e+g,n=f.data)}return n}function TJ(e){if(isNaN(f=+this._x.call(null,e)))return this;var r,n=this._root,a,i,o,s=this._x0,c=this._x1,f,d,h,m,g;if(!n)return this;if(n.length)for(;;){if((h=f>=(d=(s+c)/2))?s=d:c=d,r=n,!(n=n[m=+h]))return this;if(!n.length)break;r[m+1&1]&&(a=r,g=m)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):r?(o?r[m]=o:delete r[m],(n=r[0]||r[1])&&n===(r[1]||r[0])&&!n.length&&(a?a[g]=n:this._root=n),this):(this._root=o,this)}function NJ(e){for(var r=0,n=e.length;r<n;++r)this.remove(e[r]);return this}function MJ(){return this._root}function RJ(){var e=0;return this.visit(function(r){if(!r.length)do++e;while(r=r.next)}),e}function PJ(e){var r=[],n,a=this._root,i,o,s;for(a&&r.push(new Ha(a,this._x0,this._x1));n=r.pop();)if(!e(a=n.node,o=n.x0,s=n.x1)&&a.length){var c=(o+s)/2;(i=a[1])&&r.push(new Ha(i,c,s)),(i=a[0])&&r.push(new Ha(i,o,c))}return this}function DJ(e){var r=[],n=[],a;for(this._root&&r.push(new Ha(this._root,this._x0,this._x1));a=r.pop();){var i=a.node;if(i.length){var o,s=a.x0,c=a.x1,f=(s+c)/2;(o=i[0])&&r.push(new Ha(o,s,f)),(o=i[1])&&r.push(new Ha(o,f,c))}n.push(a)}for(;a=n.pop();)e(a.node,a.x0,a.x1);return this}function LJ(e){return e[0]}function IJ(e){return arguments.length?(this._x=e,this):this._x}function tE(e,r){var n=new rE(r??LJ,NaN,NaN);return e==null?n:n.addAll(e)}function rE(e,r,n){this._x=e,this._x0=r,this._x1=n,this._root=void 0}function iT(e){for(var r={data:e.data},n=r;e=e.next;)n=n.next={data:e.data};return r}var Pr=tE.prototype=rE.prototype;Pr.copy=function(){var e=new rE(this._x,this._x0,this._x1),r=this._root,n,a;if(!r)return e;if(!r.length)return e._root=iT(r),e;for(n=[{source:r,target:e._root=new Array(2)}];r=n.pop();)for(var i=0;i<2;++i)(a=r.source[i])&&(a.length?n.push({source:a,target:r.target[i]=new Array(2)}):r.target[i]=iT(a));return e};Pr.add=EJ;Pr.addAll=kJ;Pr.cover=jJ;Pr.data=AJ;Pr.extent=CJ;Pr.find=OJ;Pr.remove=TJ;Pr.removeAll=NJ;Pr.root=MJ;Pr.size=RJ;Pr.visit=PJ;Pr.visitAfter=DJ;Pr.x=IJ;function zJ(e){const r=+this._x.call(null,e),n=+this._y.call(null,e);return tI(this.cover(r,n),r,n,e)}function tI(e,r,n,a){if(isNaN(r)||isNaN(n))return e;var i,o=e._root,s={data:a},c=e._x0,f=e._y0,d=e._x1,h=e._y1,m,g,y,x,E,_,w,A;if(!o)return e._root=s,e;for(;o.length;)if((E=r>=(m=(c+d)/2))?c=m:d=m,(_=n>=(g=(f+h)/2))?f=g:h=g,i=o,!(o=o[w=_<<1|E]))return i[w]=s,e;if(y=+e._x.call(null,o.data),x=+e._y.call(null,o.data),r===y&&n===x)return s.next=o,i?i[w]=s:e._root=s,e;do i=i?i[w]=new Array(4):e._root=new Array(4),(E=r>=(m=(c+d)/2))?c=m:d=m,(_=n>=(g=(f+h)/2))?f=g:h=g;while((w=_<<1|E)===(A=(x>=g)<<1|y>=m));return i[A]=o,i[w]=s,e}function qJ(e){var r,n,a=e.length,i,o,s=new Array(a),c=new Array(a),f=1/0,d=1/0,h=-1/0,m=-1/0;for(n=0;n<a;++n)isNaN(i=+this._x.call(null,r=e[n]))||isNaN(o=+this._y.call(null,r))||(s[n]=i,c[n]=o,i<f&&(f=i),i>h&&(h=i),o<d&&(d=o),o>m&&(m=o));if(f>h||d>m)return this;for(this.cover(f,d).cover(h,m),n=0;n<a;++n)tI(this,s[n],c[n],e[n]);return this}function BJ(e,r){if(isNaN(e=+e)||isNaN(r=+r))return this;var n=this._x0,a=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,o=(a=Math.floor(r))+1;else{for(var s=i-n||1,c=this._root,f,d;n>e||e>=i||a>r||r>=o;)switch(d=(r<a)<<1|e<n,f=new Array(4),f[d]=c,c=f,s*=2,d){case 0:i=n+s,o=a+s;break;case 1:n=i-s,o=a+s;break;case 2:i=n+s,a=o-s;break;case 3:n=i-s,a=o-s;break}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=a,this._x1=i,this._y1=o,this}function $J(){var e=[];return this.visit(function(r){if(!r.length)do e.push(r.data);while(r=r.next)}),e}function FJ(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function pr(e,r,n,a,i){this.node=e,this.x0=r,this.y0=n,this.x1=a,this.y1=i}function UJ(e,r,n){var a,i=this._x0,o=this._y0,s,c,f,d,h=this._x1,m=this._y1,g=[],y=this._root,x,E;for(y&&g.push(new pr(y,i,o,h,m)),n==null?n=1/0:(i=e-n,o=r-n,h=e+n,m=r+n,n*=n);x=g.pop();)if(!(!(y=x.node)||(s=x.x0)>h||(c=x.y0)>m||(f=x.x1)<i||(d=x.y1)<o))if(y.length){var _=(s+f)/2,w=(c+d)/2;g.push(new pr(y[3],_,w,f,d),new pr(y[2],s,w,_,d),new pr(y[1],_,c,f,w),new pr(y[0],s,c,_,w)),(E=(r>=w)<<1|e>=_)&&(x=g[g.length-1],g[g.length-1]=g[g.length-1-E],g[g.length-1-E]=x)}else{var A=e-+this._x.call(null,y.data),C=r-+this._y.call(null,y.data),O=A*A+C*C;if(O<n){var T=Math.sqrt(n=O);i=e-T,o=r-T,h=e+T,m=r+T,a=y.data}}return a}function HJ(e){if(isNaN(h=+this._x.call(null,e))||isNaN(m=+this._y.call(null,e)))return this;var r,n=this._root,a,i,o,s=this._x0,c=this._y0,f=this._x1,d=this._y1,h,m,g,y,x,E,_,w;if(!n)return this;if(n.length)for(;;){if((x=h>=(g=(s+f)/2))?s=g:f=g,(E=m>=(y=(c+d)/2))?c=y:d=y,r=n,!(n=n[_=E<<1|x]))return this;if(!n.length)break;(r[_+1&3]||r[_+2&3]||r[_+3&3])&&(a=r,w=_)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):r?(o?r[_]=o:delete r[_],(n=r[0]||r[1]||r[2]||r[3])&&n===(r[3]||r[2]||r[1]||r[0])&&!n.length&&(a?a[w]=n:this._root=n),this):(this._root=o,this)}function GJ(e){for(var r=0,n=e.length;r<n;++r)this.remove(e[r]);return this}function VJ(){return this._root}function KJ(){var e=0;return this.visit(function(r){if(!r.length)do++e;while(r=r.next)}),e}function YJ(e){var r=[],n,a=this._root,i,o,s,c,f;for(a&&r.push(new pr(a,this._x0,this._y0,this._x1,this._y1));n=r.pop();)if(!e(a=n.node,o=n.x0,s=n.y0,c=n.x1,f=n.y1)&&a.length){var d=(o+c)/2,h=(s+f)/2;(i=a[3])&&r.push(new pr(i,d,h,c,f)),(i=a[2])&&r.push(new pr(i,o,h,d,f)),(i=a[1])&&r.push(new pr(i,d,s,c,h)),(i=a[0])&&r.push(new pr(i,o,s,d,h))}return this}function XJ(e){var r=[],n=[],a;for(this._root&&r.push(new pr(this._root,this._x0,this._y0,this._x1,this._y1));a=r.pop();){var i=a.node;if(i.length){var o,s=a.x0,c=a.y0,f=a.x1,d=a.y1,h=(s+f)/2,m=(c+d)/2;(o=i[0])&&r.push(new pr(o,s,c,h,m)),(o=i[1])&&r.push(new pr(o,h,c,f,m)),(o=i[2])&&r.push(new pr(o,s,m,h,d)),(o=i[3])&&r.push(new pr(o,h,m,f,d))}n.push(a)}for(;a=n.pop();)e(a.node,a.x0,a.y0,a.x1,a.y1);return this}function WJ(e){return e[0]}function ZJ(e){return arguments.length?(this._x=e,this):this._x}function QJ(e){return e[1]}function JJ(e){return arguments.length?(this._y=e,this):this._y}function nE(e,r,n){var a=new aE(r??WJ,n??QJ,NaN,NaN,NaN,NaN);return e==null?a:a.addAll(e)}function aE(e,r,n,a,i,o){this._x=e,this._y=r,this._x0=n,this._y0=a,this._x1=i,this._y1=o,this._root=void 0}function oT(e){for(var r={data:e.data},n=r;e=e.next;)n=n.next={data:e.data};return r}var yr=nE.prototype=aE.prototype;yr.copy=function(){var e=new aE(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root,n,a;if(!r)return e;if(!r.length)return e._root=oT(r),e;for(n=[{source:r,target:e._root=new Array(4)}];r=n.pop();)for(var i=0;i<4;++i)(a=r.source[i])&&(a.length?n.push({source:a,target:r.target[i]=new Array(4)}):r.target[i]=oT(a));return e};yr.add=zJ;yr.addAll=qJ;yr.cover=BJ;yr.data=$J;yr.extent=FJ;yr.find=UJ;yr.remove=HJ;yr.removeAll=GJ;yr.root=VJ;yr.size=KJ;yr.visit=YJ;yr.visitAfter=XJ;yr.x=ZJ;yr.y=JJ;function eee(e){const r=+this._x.call(null,e),n=+this._y.call(null,e),a=+this._z.call(null,e);return rI(this.cover(r,n,a),r,n,a,e)}function rI(e,r,n,a,i){if(isNaN(r)||isNaN(n)||isNaN(a))return e;var o,s=e._root,c={data:i},f=e._x0,d=e._y0,h=e._z0,m=e._x1,g=e._y1,y=e._z1,x,E,_,w,A,C,O,T,N,M,P;if(!s)return e._root=c,e;for(;s.length;)if((O=r>=(x=(f+m)/2))?f=x:m=x,(T=n>=(E=(d+g)/2))?d=E:g=E,(N=a>=(_=(h+y)/2))?h=_:y=_,o=s,!(s=s[M=N<<2|T<<1|O]))return o[M]=c,e;if(w=+e._x.call(null,s.data),A=+e._y.call(null,s.data),C=+e._z.call(null,s.data),r===w&&n===A&&a===C)return c.next=s,o?o[M]=c:e._root=c,e;do o=o?o[M]=new Array(8):e._root=new Array(8),(O=r>=(x=(f+m)/2))?f=x:m=x,(T=n>=(E=(d+g)/2))?d=E:g=E,(N=a>=(_=(h+y)/2))?h=_:y=_;while((M=N<<2|T<<1|O)===(P=(C>=_)<<2|(A>=E)<<1|w>=x));return o[P]=s,o[M]=c,e}function tee(e){Array.isArray(e)||(e=Array.from(e));const r=e.length,n=new Float64Array(r),a=new Float64Array(r),i=new Float64Array(r);let o=1/0,s=1/0,c=1/0,f=-1/0,d=-1/0,h=-1/0;for(let m=0,g,y,x,E;m<r;++m)isNaN(y=+this._x.call(null,g=e[m]))||isNaN(x=+this._y.call(null,g))||isNaN(E=+this._z.call(null,g))||(n[m]=y,a[m]=x,i[m]=E,y<o&&(o=y),y>f&&(f=y),x<s&&(s=x),x>d&&(d=x),E<c&&(c=E),E>h&&(h=E));if(o>f||s>d||c>h)return this;this.cover(o,s,c).cover(f,d,h);for(let m=0;m<r;++m)rI(this,n[m],a[m],i[m],e[m]);return this}function ree(e,r,n){if(isNaN(e=+e)||isNaN(r=+r)||isNaN(n=+n))return this;var a=this._x0,i=this._y0,o=this._z0,s=this._x1,c=this._y1,f=this._z1;if(isNaN(a))s=(a=Math.floor(e))+1,c=(i=Math.floor(r))+1,f=(o=Math.floor(n))+1;else{for(var d=s-a||1,h=this._root,m,g;a>e||e>=s||i>r||r>=c||o>n||n>=f;)switch(g=(n<o)<<2|(r<i)<<1|e<a,m=new Array(8),m[g]=h,h=m,d*=2,g){case 0:s=a+d,c=i+d,f=o+d;break;case 1:a=s-d,c=i+d,f=o+d;break;case 2:s=a+d,i=c-d,f=o+d;break;case 3:a=s-d,i=c-d,f=o+d;break;case 4:s=a+d,c=i+d,o=f-d;break;case 5:a=s-d,c=i+d,o=f-d;break;case 6:s=a+d,i=c-d,o=f-d;break;case 7:a=s-d,i=c-d,o=f-d;break}this._root&&this._root.length&&(this._root=h)}return this._x0=a,this._y0=i,this._z0=o,this._x1=s,this._y1=c,this._z1=f,this}function nee(){var e=[];return this.visit(function(r){if(!r.length)do e.push(r.data);while(r=r.next)}),e}function aee(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]]}function tt(e,r,n,a,i,o,s){this.node=e,this.x0=r,this.y0=n,this.z0=a,this.x1=i,this.y1=o,this.z1=s}function iee(e,r,n,a){var i,o=this._x0,s=this._y0,c=this._z0,f,d,h,m,g,y,x=this._x1,E=this._y1,_=this._z1,w=[],A=this._root,C,O;for(A&&w.push(new tt(A,o,s,c,x,E,_)),a==null?a=1/0:(o=e-a,s=r-a,c=n-a,x=e+a,E=r+a,_=n+a,a*=a);C=w.pop();)if(!(!(A=C.node)||(f=C.x0)>x||(d=C.y0)>E||(h=C.z0)>_||(m=C.x1)<o||(g=C.y1)<s||(y=C.z1)<c))if(A.length){var T=(f+m)/2,N=(d+g)/2,M=(h+y)/2;w.push(new tt(A[7],T,N,M,m,g,y),new tt(A[6],f,N,M,T,g,y),new tt(A[5],T,d,M,m,N,y),new tt(A[4],f,d,M,T,N,y),new tt(A[3],T,N,h,m,g,M),new tt(A[2],f,N,h,T,g,M),new tt(A[1],T,d,h,m,N,M),new tt(A[0],f,d,h,T,N,M)),(O=(n>=M)<<2|(r>=N)<<1|e>=T)&&(C=w[w.length-1],w[w.length-1]=w[w.length-1-O],w[w.length-1-O]=C)}else{var P=e-+this._x.call(null,A.data),L=r-+this._y.call(null,A.data),D=n-+this._z.call(null,A.data),q=P*P+L*L+D*D;if(q<a){var z=Math.sqrt(a=q);o=e-z,s=r-z,c=n-z,x=e+z,E=r+z,_=n+z,i=A.data}}return i}const oee=(e,r,n,a,i,o)=>Math.sqrt((e-a)**2+(r-i)**2+(n-o)**2);function lee(e,r,n,a){const i=[],o=e-a,s=r-a,c=n-a,f=e+a,d=r+a,h=n+a;return this.visit((m,g,y,x,E,_,w)=>{if(!m.length)do{const A=m.data;oee(e,r,n,this._x(A),this._y(A),this._z(A))<=a&&i.push(A)}while(m=m.next);return g>f||y>d||x>h||E<o||_<s||w<c}),i}function see(e){if(isNaN(g=+this._x.call(null,e))||isNaN(y=+this._y.call(null,e))||isNaN(x=+this._z.call(null,e)))return this;var r,n=this._root,a,i,o,s=this._x0,c=this._y0,f=this._z0,d=this._x1,h=this._y1,m=this._z1,g,y,x,E,_,w,A,C,O,T,N;if(!n)return this;if(n.length)for(;;){if((A=g>=(E=(s+d)/2))?s=E:d=E,(C=y>=(_=(c+h)/2))?c=_:h=_,(O=x>=(w=(f+m)/2))?f=w:m=w,r=n,!(n=n[T=O<<2|C<<1|A]))return this;if(!n.length)break;(r[T+1&7]||r[T+2&7]||r[T+3&7]||r[T+4&7]||r[T+5&7]||r[T+6&7]||r[T+7&7])&&(a=r,N=T)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):r?(o?r[T]=o:delete r[T],(n=r[0]||r[1]||r[2]||r[3]||r[4]||r[5]||r[6]||r[7])&&n===(r[7]||r[6]||r[5]||r[4]||r[3]||r[2]||r[1]||r[0])&&!n.length&&(a?a[N]=n:this._root=n),this):(this._root=o,this)}function uee(e){for(var r=0,n=e.length;r<n;++r)this.remove(e[r]);return this}function cee(){return this._root}function fee(){var e=0;return this.visit(function(r){if(!r.length)do++e;while(r=r.next)}),e}function dee(e){var r=[],n,a=this._root,i,o,s,c,f,d,h;for(a&&r.push(new tt(a,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));n=r.pop();)if(!e(a=n.node,o=n.x0,s=n.y0,c=n.z0,f=n.x1,d=n.y1,h=n.z1)&&a.length){var m=(o+f)/2,g=(s+d)/2,y=(c+h)/2;(i=a[7])&&r.push(new tt(i,m,g,y,f,d,h)),(i=a[6])&&r.push(new tt(i,o,g,y,m,d,h)),(i=a[5])&&r.push(new tt(i,m,s,y,f,g,h)),(i=a[4])&&r.push(new tt(i,o,s,y,m,g,h)),(i=a[3])&&r.push(new tt(i,m,g,c,f,d,y)),(i=a[2])&&r.push(new tt(i,o,g,c,m,d,y)),(i=a[1])&&r.push(new tt(i,m,s,c,f,g,y)),(i=a[0])&&r.push(new tt(i,o,s,c,m,g,y))}return this}function hee(e){var r=[],n=[],a;for(this._root&&r.push(new tt(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));a=r.pop();){var i=a.node;if(i.length){var o,s=a.x0,c=a.y0,f=a.z0,d=a.x1,h=a.y1,m=a.z1,g=(s+d)/2,y=(c+h)/2,x=(f+m)/2;(o=i[0])&&r.push(new tt(o,s,c,f,g,y,x)),(o=i[1])&&r.push(new tt(o,g,c,f,d,y,x)),(o=i[2])&&r.push(new tt(o,s,y,f,g,h,x)),(o=i[3])&&r.push(new tt(o,g,y,f,d,h,x)),(o=i[4])&&r.push(new tt(o,s,c,x,g,y,m)),(o=i[5])&&r.push(new tt(o,g,c,x,d,y,m)),(o=i[6])&&r.push(new tt(o,s,y,x,g,h,m)),(o=i[7])&&r.push(new tt(o,g,y,x,d,h,m))}n.push(a)}for(;a=n.pop();)e(a.node,a.x0,a.y0,a.z0,a.x1,a.y1,a.z1);return this}function pee(e){return e[0]}function mee(e){return arguments.length?(this._x=e,this):this._x}function vee(e){return e[1]}function gee(e){return arguments.length?(this._y=e,this):this._y}function yee(e){return e[2]}function bee(e){return arguments.length?(this._z=e,this):this._z}function iE(e,r,n,a){var i=new oE(r??pee,n??vee,a??yee,NaN,NaN,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function oE(e,r,n,a,i,o,s,c,f){this._x=e,this._y=r,this._z=n,this._x0=a,this._y0=i,this._z0=o,this._x1=s,this._y1=c,this._z1=f,this._root=void 0}function lT(e){for(var r={data:e.data},n=r;e=e.next;)n=n.next={data:e.data};return r}var nr=iE.prototype=oE.prototype;nr.copy=function(){var e=new oE(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),r=this._root,n,a;if(!r)return e;if(!r.length)return e._root=lT(r),e;for(n=[{source:r,target:e._root=new Array(8)}];r=n.pop();)for(var i=0;i<8;++i)(a=r.source[i])&&(a.length?n.push({source:a,target:r.target[i]=new Array(8)}):r.target[i]=lT(a));return e};nr.add=eee;nr.addAll=tee;nr.cover=ree;nr.data=nee;nr.extent=aee;nr.find=iee;nr.findAllWithinRadius=lee;nr.remove=see;nr.removeAll=uee;nr.root=cee;nr.size=fee;nr.visit=dee;nr.visitAfter=hee;nr.x=mee;nr.y=gee;nr.z=bee;function mr(e){return function(){return e}}function hn(e){return(e()-.5)*1e-6}function ay(e){return e.x+e.vx}function sT(e){return e.y+e.vy}function xee(e){return e.z+e.vz}function _ee(e){var r,n,a,i,o=1,s=1;typeof e!="function"&&(e=mr(e==null?1:+e));function c(){for(var h,m=r.length,g,y,x,E,_,w,A,C=0;C<s;++C)for(g=(n===1?tE(r,ay):n===2?nE(r,ay,sT):n===3?iE(r,ay,sT,xee):null).visitAfter(f),h=0;h<m;++h)y=r[h],w=a[y.index],A=w*w,x=y.x+y.vx,n>1&&(E=y.y+y.vy),n>2&&(_=y.z+y.vz),g.visit(O);function O(T,N,M,P,L,D,q){var z=[N,M,P,L,D,q],U=z[0],$=z[1],Y=z[2],B=z[n],Z=z[n+1],ae=z[n+2],V=T.data,fe=T.r,F=w+fe;if(V){if(V.index>y.index){var X=x-V.x-V.vx,ce=n>1?E-V.y-V.vy:0,G=n>2?_-V.z-V.vz:0,H=X*X+ce*ce+G*G;H<F*F&&(X===0&&(X=hn(i),H+=X*X),n>1&&ce===0&&(ce=hn(i),H+=ce*ce),n>2&&G===0&&(G=hn(i),H+=G*G),H=(F-(H=Math.sqrt(H)))/H*o,y.vx+=(X*=H)*(F=(fe*=fe)/(A+fe)),n>1&&(y.vy+=(ce*=H)*F),n>2&&(y.vz+=(G*=H)*F),V.vx-=X*(F=1-F),n>1&&(V.vy-=ce*F),n>2&&(V.vz-=G*F))}return}return U>x+F||B<x-F||n>1&&($>E+F||Z<E-F)||n>2&&(Y>_+F||ae<_-F)}}function f(h){if(h.data)return h.r=a[h.data.index];for(var m=h.r=0;m<Math.pow(2,n);++m)h[m]&&h[m].r>h.r&&(h.r=h[m].r)}function d(){if(r){var h,m=r.length,g;for(a=new Array(m),h=0;h<m;++h)g=r[h],a[g.index]=+e(g,h,r)}}return c.initialize=function(h,...m){r=h,i=m.find(g=>typeof g=="function")||Math.random,n=m.find(g=>[1,2,3].includes(g))||2,d()},c.iterations=function(h){return arguments.length?(s=+h,c):s},c.strength=function(h){return arguments.length?(o=+h,c):o},c.radius=function(h){return arguments.length?(e=typeof h=="function"?h:mr(+h),d(),c):e},c}function wee(e){return e.index}function uT(e,r){var n=e.get(r);if(!n)throw new Error("node not found: "+r);return n}function See(e){var r=wee,n=g,a,i=mr(30),o,s,c,f,d,h,m=1;e==null&&(e=[]);function g(w){return 1/Math.min(f[w.source.index],f[w.target.index])}function y(w){for(var A=0,C=e.length;A<m;++A)for(var O=0,T,N,M,P=0,L=0,D=0,q,z;O<C;++O)T=e[O],N=T.source,M=T.target,P=M.x+M.vx-N.x-N.vx||hn(h),c>1&&(L=M.y+M.vy-N.y-N.vy||hn(h)),c>2&&(D=M.z+M.vz-N.z-N.vz||hn(h)),q=Math.sqrt(P*P+L*L+D*D),q=(q-o[O])/q*w*a[O],P*=q,L*=q,D*=q,M.vx-=P*(z=d[O]),c>1&&(M.vy-=L*z),c>2&&(M.vz-=D*z),N.vx+=P*(z=1-z),c>1&&(N.vy+=L*z),c>2&&(N.vz+=D*z)}function x(){if(s){var w,A=s.length,C=e.length,O=new Map(s.map((N,M)=>[r(N,M,s),N])),T;for(w=0,f=new Array(A);w<C;++w)T=e[w],T.index=w,typeof T.source!="object"&&(T.source=uT(O,T.source)),typeof T.target!="object"&&(T.target=uT(O,T.target)),f[T.source.index]=(f[T.source.index]||0)+1,f[T.target.index]=(f[T.target.index]||0)+1;for(w=0,d=new Array(C);w<C;++w)T=e[w],d[w]=f[T.source.index]/(f[T.source.index]+f[T.target.index]);a=new Array(C),E(),o=new Array(C),_()}}function E(){if(s)for(var w=0,A=e.length;w<A;++w)a[w]=+n(e[w],w,e)}function _(){if(s)for(var w=0,A=e.length;w<A;++w)o[w]=+i(e[w],w,e)}return y.initialize=function(w,...A){s=w,h=A.find(C=>typeof C=="function")||Math.random,c=A.find(C=>[1,2,3].includes(C))||2,x()},y.links=function(w){return arguments.length?(e=w,x(),y):e},y.id=function(w){return arguments.length?(r=w,y):r},y.iterations=function(w){return arguments.length?(m=+w,y):m},y.strength=function(w){return arguments.length?(n=typeof w=="function"?w:mr(+w),E(),y):n},y.distance=function(w){return arguments.length?(i=typeof w=="function"?w:mr(+w),_(),y):i},y}const Eee=1664525,kee=1013904223,cT=4294967296;function jee(){let e=1;return()=>(e=(Eee*e+kee)%cT)/cT}var fT=3;function iy(e){return e.x}function dT(e){return e.y}function Aee(e){return e.z}var Cee=10,Oee=Math.PI*(3-Math.sqrt(5)),Tee=Math.PI*20/(9+Math.sqrt(221));function Nee(e,r){r=r||2;var n=Math.min(fT,Math.max(1,Math.round(r))),a,i=1,o=.001,s=1-Math.pow(o,1/300),c=0,f=.6,d=new Map,h=GS(y),m=Ac("tick","end"),g=jee();e==null&&(e=[]);function y(){x(),m.call("tick",a),i<o&&(h.stop(),m.call("end",a))}function x(w){var A,C=e.length,O;w===void 0&&(w=1);for(var T=0;T<w;++T)for(i+=(c-i)*s,d.forEach(function(N){N(i)}),A=0;A<C;++A)O=e[A],O.fx==null?O.x+=O.vx*=f:(O.x=O.fx,O.vx=0),n>1&&(O.fy==null?O.y+=O.vy*=f:(O.y=O.fy,O.vy=0)),n>2&&(O.fz==null?O.z+=O.vz*=f:(O.z=O.fz,O.vz=0));return a}function E(){for(var w=0,A=e.length,C;w<A;++w){if(C=e[w],C.index=w,C.fx!=null&&(C.x=C.fx),C.fy!=null&&(C.y=C.fy),C.fz!=null&&(C.z=C.fz),isNaN(C.x)||n>1&&isNaN(C.y)||n>2&&isNaN(C.z)){var O=Cee*(n>2?Math.cbrt(.5+w):n>1?Math.sqrt(.5+w):w),T=w*Oee,N=w*Tee;n===1?C.x=O:n===2?(C.x=O*Math.cos(T),C.y=O*Math.sin(T)):(C.x=O*Math.sin(T)*Math.cos(N),C.y=O*Math.cos(T),C.z=O*Math.sin(T)*Math.sin(N))}(isNaN(C.vx)||n>1&&isNaN(C.vy)||n>2&&isNaN(C.vz))&&(C.vx=0,n>1&&(C.vy=0),n>2&&(C.vz=0))}}function _(w){return w.initialize&&w.initialize(e,g,n),w}return E(),a={tick:x,restart:function(){return h.restart(y),a},stop:function(){return h.stop(),a},numDimensions:function(w){return arguments.length?(n=Math.min(fT,Math.max(1,Math.round(w))),d.forEach(_),a):n},nodes:function(w){return arguments.length?(e=w,E(),d.forEach(_),a):e},alpha:function(w){return arguments.length?(i=+w,a):i},alphaMin:function(w){return arguments.length?(o=+w,a):o},alphaDecay:function(w){return arguments.length?(s=+w,a):+s},alphaTarget:function(w){return arguments.length?(c=+w,a):c},velocityDecay:function(w){return arguments.length?(f=1-w,a):1-f},randomSource:function(w){return arguments.length?(g=w,d.forEach(_),a):g},force:function(w,A){return arguments.length>1?(A==null?d.delete(w):d.set(w,_(A)),a):d.get(w)},find:function(){var w=Array.prototype.slice.call(arguments),A=w.shift()||0,C=(n>1?w.shift():null)||0,O=(n>2?w.shift():null)||0,T=w.shift()||1/0,N=0,M=e.length,P,L,D,q,z,U;for(T*=T,N=0;N<M;++N)z=e[N],P=A-z.x,L=C-(z.y||0),D=O-(z.z||0),q=P*P+L*L+D*D,q<T&&(U=z,T=q);return U},on:function(w,A){return arguments.length>1?(m.on(w,A),a):m.on(w)}}}function Mee(){var e,r,n,a,i,o=mr(-30),s,c=1,f=1/0,d=.81;function h(x){var E,_=e.length,w=(r===1?tE(e,iy):r===2?nE(e,iy,dT):r===3?iE(e,iy,dT,Aee):null).visitAfter(g);for(i=x,E=0;E<_;++E)n=e[E],w.visit(y)}function m(){if(e){var x,E=e.length,_;for(s=new Array(E),x=0;x<E;++x)_=e[x],s[_.index]=+o(_,x,e)}}function g(x){var E=0,_,w,A=0,C,O,T,N,M=x.length;if(M){for(C=O=T=N=0;N<M;++N)(_=x[N])&&(w=Math.abs(_.value))&&(E+=_.value,A+=w,C+=w*(_.x||0),O+=w*(_.y||0),T+=w*(_.z||0));E*=Math.sqrt(4/M),x.x=C/A,r>1&&(x.y=O/A),r>2&&(x.z=T/A)}else{_=x,_.x=_.data.x,r>1&&(_.y=_.data.y),r>2&&(_.z=_.data.z);do E+=s[_.data.index];while(_=_.next)}x.value=E}function y(x,E,_,w,A){if(!x.value)return!0;var C=[_,w,A][r-1],O=x.x-n.x,T=r>1?x.y-n.y:0,N=r>2?x.z-n.z:0,M=C-E,P=O*O+T*T+N*N;if(M*M/d<P)return P<f&&(O===0&&(O=hn(a),P+=O*O),r>1&&T===0&&(T=hn(a),P+=T*T),r>2&&N===0&&(N=hn(a),P+=N*N),P<c&&(P=Math.sqrt(c*P)),n.vx+=O*x.value*i/P,r>1&&(n.vy+=T*x.value*i/P),r>2&&(n.vz+=N*x.value*i/P)),!0;if(x.length||P>=f)return;(x.data!==n||x.next)&&(O===0&&(O=hn(a),P+=O*O),r>1&&T===0&&(T=hn(a),P+=T*T),r>2&&N===0&&(N=hn(a),P+=N*N),P<c&&(P=Math.sqrt(c*P)));do x.data!==n&&(M=s[x.data.index]*i/P,n.vx+=O*M,r>1&&(n.vy+=T*M),r>2&&(n.vz+=N*M));while(x=x.next)}return h.initialize=function(x,...E){e=x,a=E.find(_=>typeof _=="function")||Math.random,r=E.find(_=>[1,2,3].includes(_))||2,m()},h.strength=function(x){return arguments.length?(o=typeof x=="function"?x:mr(+x),m(),h):o},h.distanceMin=function(x){return arguments.length?(c=x*x,h):Math.sqrt(c)},h.distanceMax=function(x){return arguments.length?(f=x*x,h):Math.sqrt(f)},h.theta=function(x){return arguments.length?(d=x*x,h):Math.sqrt(d)},h}function Ree(e,r,n,a){var i,o,s=mr(.1),c,f;typeof e!="function"&&(e=mr(+e)),r==null&&(r=0),n==null&&(n=0),a==null&&(a=0);function d(m){for(var g=0,y=i.length;g<y;++g){var x=i[g],E=x.x-r||1e-6,_=(x.y||0)-n||1e-6,w=(x.z||0)-a||1e-6,A=Math.sqrt(E*E+_*_+w*w),C=(f[g]-A)*c[g]*m/A;x.vx+=E*C,o>1&&(x.vy+=_*C),o>2&&(x.vz+=w*C)}}function h(){if(i){var m,g=i.length;for(c=new Array(g),f=new Array(g),m=0;m<g;++m)f[m]=+e(i[m],m,i),c[m]=isNaN(f[m])?0:+s(i[m],m,i)}}return d.initialize=function(m,...g){i=m,o=g.find(y=>[1,2,3].includes(y))||2,h()},d.strength=function(m){return arguments.length?(s=typeof m=="function"?m:mr(+m),h(),d):s},d.radius=function(m){return arguments.length?(e=typeof m=="function"?m:mr(+m),h(),d):e},d.x=function(m){return arguments.length?(r=+m,d):r},d.y=function(m){return arguments.length?(n=+m,d):n},d.z=function(m){return arguments.length?(a=+m,d):a},d}function Pee(e){var r=mr(.1),n,a,i;typeof e!="function"&&(e=mr(e==null?0:+e));function o(c){for(var f=0,d=n.length,h;f<d;++f)h=n[f],h.vy+=(i[f]-h.y)*a[f]*c}function s(){if(n){var c,f=n.length;for(a=new Array(f),i=new Array(f),c=0;c<f;++c)a[c]=isNaN(i[c]=+e(n[c],c,n))?0:+r(n[c],c,n)}}return o.initialize=function(c){n=c,s()},o.strength=function(c){return arguments.length?(r=typeof c=="function"?c:mr(+c),s(),o):r},o.y=function(c){return arguments.length?(e=typeof c=="function"?c:mr(+c),s(),o):e},o}const{abs:Eu,cos:Ia,sin:Dl,acos:Dee,atan2:ku,sqrt:Pi,pow:dn}=Math;function ju(e){return e<0?-dn(-e,1/3):dn(e,1/3)}const nI=Math.PI,Td=2*nI,Di=nI/2,Lee=1e-6,oy=Number.MAX_SAFE_INTEGER||9007199254740991,ly=Number.MIN_SAFE_INTEGER||-9007199254740991,Iee={x:0,y:0,z:0},we={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,r){const n=r(e);let a=n.x*n.x+n.y*n.y;return typeof n.z<"u"&&(a+=n.z*n.z),Pi(a)},compute:function(e,r,n){if(e===0)return r[0].t=0,r[0];const a=r.length-1;if(e===1)return r[a].t=1,r[a];const i=1-e;let o=r;if(a===0)return r[0].t=e,r[0];if(a===1){const c={x:i*o[0].x+e*o[1].x,y:i*o[0].y+e*o[1].y,t:e};return n&&(c.z=i*o[0].z+e*o[1].z),c}if(a<4){let c=i*i,f=e*e,d,h,m,g=0;a===2?(o=[o[0],o[1],o[2],Iee],d=c,h=i*e*2,m=f):a===3&&(d=c*i,h=c*e*3,m=i*f*3,g=e*f);const y={x:d*o[0].x+h*o[1].x+m*o[2].x+g*o[3].x,y:d*o[0].y+h*o[1].y+m*o[2].y+g*o[3].y,t:e};return n&&(y.z=d*o[0].z+h*o[1].z+m*o[2].z+g*o[3].z),y}const s=JSON.parse(JSON.stringify(r));for(;s.length>1;){for(let c=0;c<s.length-1;c++)s[c]={x:s[c].x+(s[c+1].x-s[c].x)*e,y:s[c].y+(s[c+1].y-s[c].y)*e},typeof s[c].z<"u"&&(s[c].z=s[c].z+(s[c+1].z-s[c].z)*e);s.splice(s.length-1,1)}return s[0].t=e,s[0]},computeWithRatios:function(e,r,n,a){const i=1-e,o=n,s=r;let c=o[0],f=o[1],d=o[2],h=o[3],m;if(c*=i,f*=e,s.length===2)return m=c+f,{x:(c*s[0].x+f*s[1].x)/m,y:(c*s[0].y+f*s[1].y)/m,z:a?(c*s[0].z+f*s[1].z)/m:!1,t:e};if(c*=i,f*=2*i,d*=e*e,s.length===3)return m=c+f+d,{x:(c*s[0].x+f*s[1].x+d*s[2].x)/m,y:(c*s[0].y+f*s[1].y+d*s[2].y)/m,z:a?(c*s[0].z+f*s[1].z+d*s[2].z)/m:!1,t:e};if(c*=i,f*=1.5*i,d*=3*i,h*=e*e*e,s.length===4)return m=c+f+d+h,{x:(c*s[0].x+f*s[1].x+d*s[2].x+h*s[3].x)/m,y:(c*s[0].y+f*s[1].y+d*s[2].y+h*s[3].y)/m,z:a?(c*s[0].z+f*s[1].z+d*s[2].z+h*s[3].z)/m:!1,t:e}},derive:function(e,r){const n=[];for(let a=e,i=a.length,o=i-1;i>1;i--,o--){const s=[];for(let c=0,f;c<o;c++)f={x:o*(a[c+1].x-a[c].x),y:o*(a[c+1].y-a[c].y)},r&&(f.z=o*(a[c+1].z-a[c].z)),s.push(f);n.push(s),a=s}return n},between:function(e,r,n){return r<=e&&e<=n||we.approximately(e,r)||we.approximately(e,n)},approximately:function(e,r,n){return Eu(e-r)<=(n||Lee)},length:function(e){const n=we.Tvalues.length;let a=0;for(let i=0,o;i<n;i++)o=.5*we.Tvalues[i]+.5,a+=we.Cvalues[i]*we.arcfn(o,e);return .5*a},map:function(e,r,n,a,i){const o=n-r,s=i-a,c=e-r,f=c/o;return a+s*f},lerp:function(e,r,n){const a={x:r.x+e*(n.x-r.x),y:r.y+e*(n.y-r.y)};return r.z!==void 0&&n.z!==void 0&&(a.z=r.z+e*(n.z-r.z)),a},pointToString:function(e){let r=e.x+"/"+e.y;return typeof e.z<"u"&&(r+="/"+e.z),r},pointsToString:function(e){return"["+e.map(we.pointToString).join(", ")+"]"},copy:function(e){return JSON.parse(JSON.stringify(e))},angle:function(e,r,n){const a=r.x-e.x,i=r.y-e.y,o=n.x-e.x,s=n.y-e.y,c=a*s-i*o,f=a*o+i*s;return ku(c,f)},round:function(e,r){const n=""+e,a=n.indexOf(".");return parseFloat(n.substring(0,a+1+r))},dist:function(e,r){const n=e.x-r.x,a=e.y-r.y;return Pi(n*n+a*a)},closest:function(e,r){let n=dn(2,63),a,i;return e.forEach(function(o,s){i=we.dist(r,o),i<n&&(n=i,a=s)}),{mdist:n,mpos:a}},abcratio:function(e,r){if(r!==2&&r!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const n=dn(e,r)+dn(1-e,r),a=n-1;return Eu(a/n)},projectionratio:function(e,r){if(r!==2&&r!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const n=dn(1-e,r),a=dn(e,r)+n;return n/a},lli8:function(e,r,n,a,i,o,s,c){const f=(e*a-r*n)*(i-s)-(e-n)*(i*c-o*s),d=(e*a-r*n)*(o-c)-(r-a)*(i*c-o*s),h=(e-n)*(o-c)-(r-a)*(i-s);return h==0?!1:{x:f/h,y:d/h}},lli4:function(e,r,n,a){const i=e.x,o=e.y,s=r.x,c=r.y,f=n.x,d=n.y,h=a.x,m=a.y;return we.lli8(i,o,s,c,f,d,h,m)},lli:function(e,r){return we.lli4(e,e.c,r,r.c)},makeline:function(e,r){return new ot(e.x,e.y,(e.x+r.x)/2,(e.y+r.y)/2,r.x,r.y)},findbbox:function(e){let r=oy,n=oy,a=ly,i=ly;return e.forEach(function(o){const s=o.bbox();r>s.x.min&&(r=s.x.min),n>s.y.min&&(n=s.y.min),a<s.x.max&&(a=s.x.max),i<s.y.max&&(i=s.y.max)}),{x:{min:r,mid:(r+a)/2,max:a,size:a-r},y:{min:n,mid:(n+i)/2,max:i,size:i-n}}},shapeintersections:function(e,r,n,a,i){if(!we.bboxoverlap(r,a))return[];const o=[],s=[e.startcap,e.forward,e.back,e.endcap],c=[n.startcap,n.forward,n.back,n.endcap];return s.forEach(function(f){f.virtual||c.forEach(function(d){if(d.virtual)return;const h=f.intersects(d,i);h.length>0&&(h.c1=f,h.c2=d,h.s1=e,h.s2=n,o.push(h))})}),o},makeshape:function(e,r,n){const a=r.points.length,i=e.points.length,o=we.makeline(r.points[a-1],e.points[0]),s=we.makeline(e.points[i-1],r.points[0]),c={startcap:o,forward:e,back:r,endcap:s,bbox:we.findbbox([o,e,r,s])};return c.intersections=function(f){return we.shapeintersections(c,c.bbox,f,f.bbox,n)},c},getminmax:function(e,r,n){if(!n)return{min:0,max:0};let a=oy,i=ly,o,s;n.indexOf(0)===-1&&(n=[0].concat(n)),n.indexOf(1)===-1&&n.push(1);for(let c=0,f=n.length;c<f;c++)o=n[c],s=e.get(o),s[r]<a&&(a=s[r]),s[r]>i&&(i=s[r]);return{min:a,mid:(a+i)/2,max:i,size:i-a}},align:function(e,r){const n=r.p1.x,a=r.p1.y,i=-ku(r.p2.y-a,r.p2.x-n),o=function(s){return{x:(s.x-n)*Ia(i)-(s.y-a)*Dl(i),y:(s.x-n)*Dl(i)+(s.y-a)*Ia(i)}};return e.map(o)},roots:function(e,r){r=r||{p1:{x:0,y:0},p2:{x:1,y:0}};const n=e.length-1,a=we.align(e,r),i=function(M){return 0<=M&&M<=1};if(n===2){const M=a[0].y,P=a[1].y,L=a[2].y,D=M-2*P+L;if(D!==0){const q=-Pi(P*P-M*L),z=-M+P,U=-(q+z)/D,$=-(-q+z)/D;return[U,$].filter(i)}else if(P!==L&&D===0)return[(2*P-L)/(2*P-2*L)].filter(i);return[]}const o=a[0].y,s=a[1].y,c=a[2].y,f=a[3].y;let d=-o+3*s-3*c+f,h=3*o-6*s+3*c,m=-3*o+3*s,g=o;if(we.approximately(d,0)){if(we.approximately(h,0))return we.approximately(m,0)?[]:[-g/m].filter(i);const M=Pi(m*m-4*h*g),P=2*h;return[(M-m)/P,(-m-M)/P].filter(i)}h/=d,m/=d,g/=d;const y=(3*m-h*h)/3,x=y/3,E=(2*h*h*h-9*h*m+27*g)/27,_=E/2,w=_*_+x*x*x;let A,C,O,T,N;if(w<0){const M=-y/3,P=M*M*M,L=Pi(P),D=-E/(2*L),q=D<-1?-1:D>1?1:D,z=Dee(q),U=ju(L),$=2*U;return O=$*Ia(z/3)-h/3,T=$*Ia((z+Td)/3)-h/3,N=$*Ia((z+2*Td)/3)-h/3,[O,T,N].filter(i)}else{if(w===0)return A=_<0?ju(-_):-ju(_),O=2*A-h/3,T=-A-h/3,[O,T].filter(i);{const M=Pi(w);return A=ju(-_+M),C=ju(_+M),[A-C-h/3].filter(i)}}},droots:function(e){if(e.length===3){const r=e[0],n=e[1],a=e[2],i=r-2*n+a;if(i!==0){const o=-Pi(n*n-r*a),s=-r+n,c=-(o+s)/i,f=-(-o+s)/i;return[c,f]}else if(n!==a&&i===0)return[(2*n-a)/(2*(n-a))];return[]}if(e.length===2){const r=e[0],n=e[1];return r!==n?[r/(r-n)]:[]}return[]},curvature:function(e,r,n,a,i){let o,s,c,f,d=0,h=0;const m=we.compute(e,r),g=we.compute(e,n),y=m.x*m.x+m.y*m.y;if(a?(o=Pi(dn(m.y*g.z-g.y*m.z,2)+dn(m.z*g.x-g.z*m.x,2)+dn(m.x*g.y-g.x*m.y,2)),s=dn(y+m.z*m.z,3/2)):(o=m.x*g.y-m.y*g.x,s=dn(y,3/2)),o===0||s===0)return{k:0,r:0};if(d=o/s,h=s/o,!i){const x=we.curvature(e-.001,r,n,a,!0).k,E=we.curvature(e+.001,r,n,a,!0).k;f=(E-d+(d-x))/2,c=(Eu(E-d)+Eu(d-x))/2}return{k:d,r:h,dk:f,adk:c}},inflections:function(e){if(e.length<4)return[];const r=we.align(e,{p1:e[0],p2:e.slice(-1)[0]}),n=r[2].x*r[1].y,a=r[3].x*r[1].y,i=r[1].x*r[2].y,o=r[3].x*r[2].y,s=18*(-3*n+2*a+3*i-o),c=18*(3*n-a-3*i),f=18*(i-n);if(we.approximately(s,0)){if(!we.approximately(c,0)){let g=-f/c;if(0<=g&&g<=1)return[g]}return[]}const d=2*s;if(we.approximately(d,0))return[];const h=c*c-4*s*f;if(h<0)return[];const m=Math.sqrt(h);return[(m-c)/d,-(c+m)/d].filter(function(g){return 0<=g&&g<=1})},bboxoverlap:function(e,r){const n=["x","y"],a=n.length;for(let i=0,o,s,c,f;i<a;i++)if(o=n[i],s=e[o].mid,c=r[o].mid,f=(e[o].size+r[o].size)/2,Eu(s-c)>=f)return!1;return!0},expandbox:function(e,r){r.x.min<e.x.min&&(e.x.min=r.x.min),r.y.min<e.y.min&&(e.y.min=r.y.min),r.z&&r.z.min<e.z.min&&(e.z.min=r.z.min),r.x.max>e.x.max&&(e.x.max=r.x.max),r.y.max>e.y.max&&(e.y.max=r.y.max),r.z&&r.z.max>e.z.max&&(e.z.max=r.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,r,n){const a=e.bbox(),i=r.bbox(),o=1e5,s=n||.5;if(a.x.size+a.y.size<s&&i.x.size+i.y.size<s)return[(o*(e._t1+e._t2)/2|0)/o+"/"+(o*(r._t1+r._t2)/2|0)/o];let c=e.split(.5),f=r.split(.5),d=[{left:c.left,right:f.left},{left:c.left,right:f.right},{left:c.right,right:f.right},{left:c.right,right:f.left}];d=d.filter(function(m){return we.bboxoverlap(m.left.bbox(),m.right.bbox())});let h=[];return d.length===0||(d.forEach(function(m){h=h.concat(we.pairiteration(m.left,m.right,s))}),h=h.filter(function(m,g){return h.indexOf(m)===g})),h},getccenter:function(e,r,n){const a=r.x-e.x,i=r.y-e.y,o=n.x-r.x,s=n.y-r.y,c=a*Ia(Di)-i*Dl(Di),f=a*Dl(Di)+i*Ia(Di),d=o*Ia(Di)-s*Dl(Di),h=o*Dl(Di)+s*Ia(Di),m=(e.x+r.x)/2,g=(e.y+r.y)/2,y=(r.x+n.x)/2,x=(r.y+n.y)/2,E=m+c,_=g+f,w=y+d,A=x+h,C=we.lli8(m,g,E,_,y,x,w,A),O=we.dist(C,e);let T=ku(e.y-C.y,e.x-C.x),N=ku(r.y-C.y,r.x-C.x),M=ku(n.y-C.y,n.x-C.x),P;return T<M?((T>N||N>M)&&(T+=Td),T>M&&(P=M,M=T,T=P)):M<N&&N<T?(P=M,M=T,T=P):M+=Td,C.s=T,C.e=M,C.r=O,C},numberSort:function(e,r){return e-r}};class Zu{constructor(r){this.curves=[],this._3d=!1,r&&(this.curves=r,this._3d=this.curves[0]._3d)}valueOf(){return this.toString()}toString(){return"["+this.curves.map(function(r){return we.pointsToString(r.points)}).join(", ")+"]"}addCurve(r){this.curves.push(r),this._3d=this._3d||r._3d}length(){return this.curves.map(function(r){return r.length()}).reduce(function(r,n){return r+n})}curve(r){return this.curves[r]}bbox(){const r=this.curves;for(var n=r[0].bbox(),a=1;a<r.length;a++)we.expandbox(n,r[a].bbox());return n}offset(r){const n=[];return this.curves.forEach(function(a){n.push(...a.offset(r))}),new Zu(n)}}const{abs:Au,min:hT,max:pT,cos:zee,sin:qee,acos:Bee,sqrt:Cu}=Math,$ee=Math.PI;class ot{constructor(r){let n=r&&r.forEach?r:Array.from(arguments).slice(),a=!1;if(typeof n[0]=="object"){a=n.length;const y=[];n.forEach(function(x){["x","y","z"].forEach(function(E){typeof x[E]<"u"&&y.push(x[E])})}),n=y}let i=!1;const o=n.length;if(a){if(a>4){if(arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");i=!0}}else if(o!==6&&o!==8&&o!==9&&o!==12&&arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const s=this._3d=!i&&(o===9||o===12)||r&&r[0]&&typeof r[0].z<"u",c=this.points=[];for(let y=0,x=s?3:2;y<o;y+=x){var f={x:n[y],y:n[y+1]};s&&(f.z=n[y+2]),c.push(f)}const d=this.order=c.length-1,h=this.dims=["x","y"];s&&h.push("z"),this.dimlen=h.length;const m=we.align(c,{p1:c[0],p2:c[d]}),g=we.dist(c[0],c[d]);this._linear=m.reduce((y,x)=>y+Au(x.y),0)<g/50,this._lut=[],this._t1=0,this._t2=1,this.update()}static quadraticFromPoints(r,n,a,i){if(typeof i>"u"&&(i=.5),i===0)return new ot(n,n,a);if(i===1)return new ot(r,n,n);const o=ot.getABC(2,r,n,a,i);return new ot(r,o.A,a)}static cubicFromPoints(r,n,a,i,o){typeof i>"u"&&(i=.5);const s=ot.getABC(3,r,n,a,i);typeof o>"u"&&(o=we.dist(n,s.C));const c=o*(1-i)/i,f=we.dist(r,a),d=(a.x-r.x)/f,h=(a.y-r.y)/f,m=o*d,g=o*h,y=c*d,x=c*h,E={x:n.x-m,y:n.y-g},_={x:n.x+y,y:n.y+x},w=s.A,A={x:w.x+(E.x-w.x)/(1-i),y:w.y+(E.y-w.y)/(1-i)},C={x:w.x+(_.x-w.x)/i,y:w.y+(_.y-w.y)/i},O={x:r.x+(A.x-r.x)/i,y:r.y+(A.y-r.y)/i},T={x:a.x+(C.x-a.x)/(1-i),y:a.y+(C.y-a.y)/(1-i)};return new ot(r,O,T,a)}static getUtils(){return we}getUtils(){return ot.getUtils()}static get PolyBezier(){return Zu}valueOf(){return this.toString()}toString(){return we.pointsToString(this.points)}toSVG(){if(this._3d)return!1;const r=this.points,n=r[0].x,a=r[0].y,i=["M",n,a,this.order===2?"Q":"C"];for(let o=1,s=r.length;o<s;o++)i.push(r[o].x),i.push(r[o].y);return i.join(" ")}setRatios(r){if(r.length!==this.points.length)throw new Error("incorrect number of ratio values");this.ratios=r,this._lut=[]}verify(){const r=this.coordDigest();r!==this._print&&(this._print=r,this.update())}coordDigest(){return this.points.map(function(r,n){return""+n+r.x+r.y+(r.z?r.z:0)}).join("")}update(){this._lut=[],this.dpoints=we.derive(this.points,this._3d),this.computedirection()}computedirection(){const r=this.points,n=we.angle(r[0],r[this.order],r[1]);this.clockwise=n>0}length(){return we.length(this.derivative.bind(this))}static getABC(r=2,n,a,i,o=.5){const s=we.projectionratio(o,r),c=1-s,f={x:s*n.x+c*i.x,y:s*n.y+c*i.y},d=we.abcratio(o,r);return{A:{x:a.x+(a.x-f.x)/d,y:a.y+(a.y-f.y)/d},B:a,C:f,S:n,E:i}}getABC(r,n){n=n||this.get(r);let a=this.points[0],i=this.points[this.order];return ot.getABC(this.order,a,n,i,r)}getLUT(r){if(this.verify(),r=r||100,this._lut.length===r+1)return this._lut;this._lut=[],r++,this._lut=[];for(let n=0,a,i;n<r;n++)i=n/(r-1),a=this.compute(i),a.t=i,this._lut.push(a);return this._lut}on(r,n){n=n||5;const a=this.getLUT(),i=[];for(let o=0,s,c=0;o<a.length;o++)s=a[o],we.dist(s,r)<n&&(i.push(s),c+=o/a.length);return i.length?t/=i.length:!1}project(r){const n=this.getLUT(),a=n.length-1,i=we.closest(n,r),o=i.mpos,s=(o-1)/a,c=(o+1)/a,f=.1/a;let d=i.mdist,h=s,m=h,g;d+=1;for(let y;h<c+f;h+=f)g=this.compute(h),y=we.dist(r,g),y<d&&(d=y,m=h);return m=m<0?0:m>1?1:m,g=this.compute(m),g.t=m,g.d=d,g}get(r){return this.compute(r)}point(r){return this.points[r]}compute(r){return this.ratios?we.computeWithRatios(r,this.points,this.ratios,this._3d):we.compute(r,this.points,this._3d,this.ratios)}raise(){const r=this.points,n=[r[0]],a=r.length;for(let i=1,o,s;i<a;i++)o=r[i],s=r[i-1],n[i]={x:(a-i)/a*o.x+i/a*s.x,y:(a-i)/a*o.y+i/a*s.y};return n[a]=r[a-1],new ot(n)}derivative(r){return we.compute(r,this.dpoints[0],this._3d)}dderivative(r){return we.compute(r,this.dpoints[1],this._3d)}align(){let r=this.points;return new ot(we.align(r,{p1:r[0],p2:r[r.length-1]}))}curvature(r){return we.curvature(r,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return we.inflections(this.points)}normal(r){return this._3d?this.__normal3(r):this.__normal2(r)}__normal2(r){const n=this.derivative(r),a=Cu(n.x*n.x+n.y*n.y);return{t:r,x:-n.y/a,y:n.x/a}}__normal3(r){const n=this.derivative(r),a=this.derivative(r+.01),i=Cu(n.x*n.x+n.y*n.y+n.z*n.z),o=Cu(a.x*a.x+a.y*a.y+a.z*a.z);n.x/=i,n.y/=i,n.z/=i,a.x/=o,a.y/=o,a.z/=o;const s={x:a.y*n.z-a.z*n.y,y:a.z*n.x-a.x*n.z,z:a.x*n.y-a.y*n.x},c=Cu(s.x*s.x+s.y*s.y+s.z*s.z);s.x/=c,s.y/=c,s.z/=c;const f=[s.x*s.x,s.x*s.y-s.z,s.x*s.z+s.y,s.x*s.y+s.z,s.y*s.y,s.y*s.z-s.x,s.x*s.z-s.y,s.y*s.z+s.x,s.z*s.z];return{t:r,x:f[0]*n.x+f[1]*n.y+f[2]*n.z,y:f[3]*n.x+f[4]*n.y+f[5]*n.z,z:f[6]*n.x+f[7]*n.y+f[8]*n.z}}hull(r){let n=this.points,a=[],i=[],o=0;for(i[o++]=n[0],i[o++]=n[1],i[o++]=n[2],this.order===3&&(i[o++]=n[3]);n.length>1;){a=[];for(let s=0,c,f=n.length-1;s<f;s++)c=we.lerp(r,n[s],n[s+1]),i[o++]=c,a.push(c);n=a}return i}split(r,n){if(r===0&&n)return this.split(n).left;if(n===1)return this.split(r).right;const a=this.hull(r),i={left:this.order===2?new ot([a[0],a[3],a[5]]):new ot([a[0],a[4],a[7],a[9]]),right:this.order===2?new ot([a[5],a[4],a[2]]):new ot([a[9],a[8],a[6],a[3]]),span:a};return i.left._t1=we.map(0,0,1,this._t1,this._t2),i.left._t2=we.map(r,0,1,this._t1,this._t2),i.right._t1=we.map(r,0,1,this._t1,this._t2),i.right._t2=we.map(1,0,1,this._t1,this._t2),n?(n=we.map(n,r,1,0,1),i.right.split(n).left):i}extrema(){const r={};let n=[];return this.dims.forEach((function(a){let i=function(s){return s[a]},o=this.dpoints[0].map(i);r[a]=we.droots(o),this.order===3&&(o=this.dpoints[1].map(i),r[a]=r[a].concat(we.droots(o))),r[a]=r[a].filter(function(s){return s>=0&&s<=1}),n=n.concat(r[a].sort(we.numberSort))}).bind(this)),r.values=n.sort(we.numberSort).filter(function(a,i){return n.indexOf(a)===i}),r}bbox(){const r=this.extrema(),n={};return this.dims.forEach((function(a){n[a]=we.getminmax(this,a,r[a])}).bind(this)),n}overlaps(r){const n=this.bbox(),a=r.bbox();return we.bboxoverlap(n,a)}offset(r,n){if(typeof n<"u"){const a=this.get(r),i=this.normal(r),o={c:a,n:i,x:a.x+i.x*n,y:a.y+i.y*n};return this._3d&&(o.z=a.z+i.z*n),o}if(this._linear){const a=this.normal(0),i=this.points.map(function(o){const s={x:o.x+r*a.x,y:o.y+r*a.y};return o.z&&a.z&&(s.z=o.z+r*a.z),s});return[new ot(i)]}return this.reduce().map(function(a){return a._linear?a.offset(r)[0]:a.scale(r)})}simple(){if(this.order===3){const i=we.angle(this.points[0],this.points[3],this.points[1]),o=we.angle(this.points[0],this.points[3],this.points[2]);if(i>0&&o<0||i<0&&o>0)return!1}const r=this.normal(0),n=this.normal(1);let a=r.x*n.x+r.y*n.y;return this._3d&&(a+=r.z*n.z),Au(Bee(a))<$ee/3}reduce(){let r,n=0,a=0,i=.01,o,s=[],c=[],f=this.extrema().values;for(f.indexOf(0)===-1&&(f=[0].concat(f)),f.indexOf(1)===-1&&f.push(1),n=f[0],r=1;r<f.length;r++)a=f[r],o=this.split(n,a),o._t1=n,o._t2=a,s.push(o),n=a;return s.forEach(function(d){for(n=0,a=0;a<=1;)for(a=n+i;a<=1+i;a+=i)if(o=d.split(n,a),!o.simple()){if(a-=i,Au(n-a)<i)return[];o=d.split(n,a),o._t1=we.map(n,0,1,d._t1,d._t2),o._t2=we.map(a,0,1,d._t1,d._t2),c.push(o),n=a;break}n<1&&(o=d.split(n,1),o._t1=we.map(n,0,1,d._t1,d._t2),o._t2=d._t2,c.push(o))}),c}translate(r,n,a){a=typeof a=="number"?a:n;const i=this.order;let o=this.points.map((s,c)=>(1-c/i)*n+c/i*a);return new ot(this.points.map((s,c)=>({x:s.x+r.x*o[c],y:s.y+r.y*o[c]})))}scale(r){const n=this.order;let a=!1;if(typeof r=="function"&&(a=r),a&&n===2)return this.raise().scale(a);const i=this.clockwise,o=this.points;if(this._linear)return this.translate(this.normal(0),a?a(0):r,a?a(1):r);const s=a?a(0):r,c=a?a(1):r,f=[this.offset(0,10),this.offset(1,10)],d=[],h=we.lli4(f[0],f[0].c,f[1],f[1].c);if(!h)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach(function(m){const g=d[m*n]=we.copy(o[m*n]);g.x+=(m?c:s)*f[m].n.x,g.y+=(m?c:s)*f[m].n.y}),a?([0,1].forEach(function(m){if(!(n===2&&m)){var g=o[m+1],y={x:g.x-h.x,y:g.y-h.y},x=a?a((m+1)/n):r;a&&!i&&(x=-x);var E=Cu(y.x*y.x+y.y*y.y);y.x/=E,y.y/=E,d[m+1]={x:g.x+x*y.x,y:g.y+x*y.y}}}),new ot(d)):([0,1].forEach(m=>{if(n===2&&m)return;const g=d[m*n],y=this.derivative(m),x={x:g.x+y.x,y:g.y+y.y};d[m+1]=we.lli4(g,x,h,o[m+1])}),new ot(d))}outline(r,n,a,i){if(n=n===void 0?r:n,this._linear){const T=this.normal(0),N=this.points[0],M=this.points[this.points.length-1];let P,L,D;a===void 0&&(a=r,i=n),P={x:N.x+T.x*r,y:N.y+T.y*r},D={x:M.x+T.x*a,y:M.y+T.y*a},L={x:(P.x+D.x)/2,y:(P.y+D.y)/2};const q=[P,L,D];P={x:N.x-T.x*n,y:N.y-T.y*n},D={x:M.x-T.x*i,y:M.y-T.y*i},L={x:(P.x+D.x)/2,y:(P.y+D.y)/2};const z=[D,L,P],U=we.makeline(z[2],q[0]),$=we.makeline(q[2],z[0]),Y=[U,new ot(q),$,new ot(z)];return new Zu(Y)}const o=this.reduce(),s=o.length,c=[];let f=[],d,h=0,m=this.length();const g=typeof a<"u"&&typeof i<"u";function y(T,N,M,P,L){return function(D){const q=P/M,z=(P+L)/M,U=N-T;return we.map(D,0,1,T+q*U,T+z*U)}}o.forEach(function(T){const N=T.length();g?(c.push(T.scale(y(r,a,m,h,N))),f.push(T.scale(y(-n,-i,m,h,N)))):(c.push(T.scale(r)),f.push(T.scale(-n))),h+=N}),f=f.map(function(T){return d=T.points,d[3]?T.points=[d[3],d[2],d[1],d[0]]:T.points=[d[2],d[1],d[0]],T}).reverse();const x=c[0].points[0],E=c[s-1].points[c[s-1].points.length-1],_=f[s-1].points[f[s-1].points.length-1],w=f[0].points[0],A=we.makeline(_,x),C=we.makeline(E,w),O=[A].concat(c).concat([C]).concat(f);return new Zu(O)}outlineshapes(r,n,a){n=n||r;const i=this.outline(r,n).curves,o=[];for(let s=1,c=i.length;s<c/2;s++){const f=we.makeshape(i[s],i[c-s],a);f.startcap.virtual=s>1,f.endcap.virtual=s<c/2-1,o.push(f)}return o}intersects(r,n){return r?r.p1&&r.p2?this.lineIntersects(r):(r instanceof ot&&(r=r.reduce()),this.curveintersects(this.reduce(),r,n)):this.selfintersects(n)}lineIntersects(r){const n=hT(r.p1.x,r.p2.x),a=hT(r.p1.y,r.p2.y),i=pT(r.p1.x,r.p2.x),o=pT(r.p1.y,r.p2.y);return we.roots(this.points,r).filter(s=>{var c=this.get(s);return we.between(c.x,n,i)&&we.between(c.y,a,o)})}selfintersects(r){const n=this.reduce(),a=n.length-2,i=[];for(let o=0,s,c,f;o<a;o++)c=n.slice(o,o+1),f=n.slice(o+2),s=this.curveintersects(c,f,r),i.push(...s);return i}curveintersects(r,n,a){const i=[];r.forEach(function(s){n.forEach(function(c){s.overlaps(c)&&i.push({left:s,right:c})})});let o=[];return i.forEach(function(s){const c=we.pairiteration(s.left,s.right,a);c.length>0&&(o=o.concat(c))}),o}arcs(r){return r=r||.5,this._iterate(r,[])}_error(r,n,a,i){const o=(i-a)/4,s=this.get(a+o),c=this.get(i-o),f=we.dist(r,n),d=we.dist(r,s),h=we.dist(r,c);return Au(d-f)+Au(h-f)}_iterate(r,n){let a=0,i=1,o;do{o=0,i=1;let s=this.get(a),c,f,d,h,m=!1,g=!1,y,x=i,E=1;do if(g=m,h=d,x=(a+i)/2,c=this.get(x),f=this.get(i),d=we.getccenter(s,c,f),d.interval={start:a,end:i},m=this._error(d,s,a,i)<=r,y=g&&!m,y||(E=i),m){if(i>=1){if(d.interval.end=E=1,h=d,i>1){let w={x:d.x+d.r*zee(d.e),y:d.y+d.r*qee(d.e)};d.e+=we.angle({x:d.x,y:d.y},w,this.get(1))}break}i=i+(i-a)/2}else i=x;while(!y&&o++<100);if(o>=100)break;h=h||d,n.push(h),a=E}while(i<1);return n}}function N2(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,a=Array(r);n<r;n++)a[n]=e[n];return a}function Fee(e){if(Array.isArray(e))return e}function Uee(e){if(Array.isArray(e))return N2(e)}function Hee(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Gee(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,i,o,s,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(f=(a=o.call(n)).done)&&(c.push(a.value),c.length!==r);f=!0);}catch(h){d=!0,i=h}finally{try{if(!f&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}}function Vee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
82
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kee(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
83
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yee(e,r){if(e==null)return{};var n,a,i=Xee(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Xee(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.includes(a))continue;n[a]=e[a]}return n}function Wee(e,r){return Fee(e)||Gee(e,r)||aI(e,r)||Vee()}function Zee(e){return Uee(e)||Hee(e)||aI(e)||Kee()}function Qee(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Jee(e){var r=Qee(e,"string");return typeof r=="symbol"?r:r+""}function aI(e,r){if(e){if(typeof e=="string")return N2(e,r);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?N2(e,r):void 0}}var ete=(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=(r instanceof Array?r.length?r:[void 0]:[r]).map(function(c){return{keyAccessor:c,isProp:!(c instanceof Function)}}),o=e.reduce(function(c,f){var d=c,h=f;return i.forEach(function(m,g){var y=m.keyAccessor,x=m.isProp,E;if(x){var _=h,w=_[y],A=Yee(_,[y].map(Jee));E=w,h=A}else E=y(h,g);g+1<i.length?(d.hasOwnProperty(E)||(d[E]={}),d=d[E]):n?(d.hasOwnProperty(E)||(d[E]=[]),d[E].push(h)):d[E]=h}),c},{});n instanceof Function&&(function c(f){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;d===i.length?Object.keys(f).forEach(function(h){return f[h]=n(f[h])}):Object.values(f).forEach(function(h){return c(h,d+1)})})(o);var s=o;return a&&(s=[],(function c(f){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];d.length===i.length?s.push({keys:d,vals:f}):Object.entries(f).forEach(function(h){var m=Wee(h,2),g=m[0],y=m[1];return c(y,[].concat(Zee(d),[g]))})})(o),r instanceof Array&&r.length===0&&s.length===1&&(s[0].keys=[])),s});function wn(e,r){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(r).domain(e);break}return this}function ri(e,r){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof r=="function"?this.interpolator(r):this.range(r);break}}return this}const M2=Symbol("implicit");function Ap(){var e=new I5,r=[],n=[],a=M2;function i(o){let s=e.get(o);if(s===void 0){if(a!==M2)return a;e.set(o,s=r.push(o)-1)}return n[s%n.length]}return i.domain=function(o){if(!arguments.length)return r.slice();r=[],e=new I5;for(const s of o)e.has(s)||e.set(s,r.push(s)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(a=o,i):a},i.copy=function(){return Ap(r,n).unknown(a)},wn.apply(i,arguments),i}function lE(){var e=Ap().unknown(void 0),r=e.domain,n=e.range,a=0,i=1,o,s,c=!1,f=0,d=0,h=.5;delete e.unknown;function m(){var g=r().length,y=i<a,x=y?i:a,E=y?a:i;o=(E-x)/Math.max(1,g-f+d*2),c&&(o=Math.floor(o)),x+=(E-x-o*(g-f))*h,s=o*(1-f),c&&(x=Math.round(x),s=Math.round(s));var _=RZ(g).map(function(w){return x+o*w});return n(y?_.reverse():_)}return e.domain=function(g){return arguments.length?(r(g),m()):r()},e.range=function(g){return arguments.length?([a,i]=g,a=+a,i=+i,m()):[a,i]},e.rangeRound=function(g){return[a,i]=g,a=+a,i=+i,c=!0,m()},e.bandwidth=function(){return s},e.step=function(){return o},e.round=function(g){return arguments.length?(c=!!g,m()):c},e.padding=function(g){return arguments.length?(f=Math.min(1,d=+g),m()):f},e.paddingInner=function(g){return arguments.length?(f=Math.min(1,g),m()):f},e.paddingOuter=function(g){return arguments.length?(d=+g,m()):d},e.align=function(g){return arguments.length?(h=Math.max(0,Math.min(1,g)),m()):h},e.copy=function(){return lE(r(),[a,i]).round(c).paddingInner(f).paddingOuter(d).align(h)},wn.apply(m(),arguments)}function iI(e){var r=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return iI(r())},e}function tte(){return iI(lE.apply(null,arguments).paddingInner(1))}function rte(e){return function(){return e}}function kh(e){return+e}var mT=[0,1];function vr(e){return e}function R2(e,r){return(r-=e=+e)?function(n){return(n-e)/r}:rte(isNaN(r)?NaN:.5)}function nte(e,r){var n;return e>r&&(n=e,e=r,r=n),function(a){return Math.max(e,Math.min(r,a))}}function ate(e,r,n){var a=e[0],i=e[1],o=r[0],s=r[1];return i<a?(a=R2(i,a),o=n(s,o)):(a=R2(a,i),o=n(o,s)),function(c){return o(a(c))}}function ite(e,r,n){var a=Math.min(e.length,r.length)-1,i=new Array(a),o=new Array(a),s=-1;for(e[a]<e[0]&&(e=e.slice().reverse(),r=r.slice().reverse());++s<a;)i[s]=R2(e[s],e[s+1]),o[s]=n(r[s],r[s+1]);return function(c){var f=Oc(e,c,1,a)-1;return o[f](i[f](c))}}function Nc(e,r){return r.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Cp(){var e=mT,r=mT,n=us,a,i,o,s=vr,c,f,d;function h(){var g=Math.min(e.length,r.length);return s!==vr&&(s=nte(e[0],e[g-1])),c=g>2?ite:ate,f=d=null,m}function m(g){return g==null||isNaN(g=+g)?o:(f||(f=c(e.map(a),r,n)))(a(s(g)))}return m.invert=function(g){return s(i((d||(d=c(r,e.map(a),Tn)))(g)))},m.domain=function(g){return arguments.length?(e=Array.from(g,kh),h()):e.slice()},m.range=function(g){return arguments.length?(r=Array.from(g),h()):r.slice()},m.rangeRound=function(g){return r=Array.from(g),n=US,h()},m.clamp=function(g){return arguments.length?(s=g?!0:vr,h()):s!==vr},m.interpolate=function(g){return arguments.length?(n=g,h()):n},m.unknown=function(g){return arguments.length?(o=g,m):o},function(g,y){return a=g,i=y,h()}}function sE(){return Cp()(vr,vr)}function ote(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function jh(e,r){if(!isFinite(e)||e===0)return null;var n=(e=r?e.toExponential(r-1):e.toExponential()).indexOf("e"),a=e.slice(0,n);return[a.length>1?a[0]+a.slice(2):a,+e.slice(n+1)]}function es(e){return e=jh(Math.abs(e)),e?e[1]:NaN}function lte(e,r){return function(n,a){for(var i=n.length,o=[],s=0,c=e[0],f=0;i>0&&c>0&&(f+c+1>a&&(c=Math.max(1,a-f)),o.push(n.substring(i-=c,i+c)),!((f+=c+1)>a));)c=e[s=(s+1)%e.length];return o.reverse().join(r)}}function ste(e){return function(r){return r.replace(/[0-9]/g,function(n){return e[+n]})}}var ute=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ic(e){if(!(r=ute.exec(e)))throw new Error("invalid format: "+e);var r;return new uE({fill:r[1],align:r[2],sign:r[3],symbol:r[4],zero:r[5],width:r[6],comma:r[7],precision:r[8]&&r[8].slice(1),trim:r[9],type:r[10]})}ic.prototype=uE.prototype;function uE(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}uE.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function cte(e){e:for(var r=e.length,n=1,a=-1,i;n<r;++n)switch(e[n]){case".":a=i=n;break;case"0":a===0&&(a=n),i=n;break;default:if(!+e[n])break e;a>0&&(a=0);break}return a>0?e.slice(0,a)+e.slice(i+1):e}var Ah;function fte(e,r){var n=jh(e,r);if(!n)return Ah=void 0,e.toPrecision(r);var a=n[0],i=n[1],o=i-(Ah=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=a.length;return o===s?a:o>s?a+new Array(o-s+1).join("0"):o>0?a.slice(0,o)+"."+a.slice(o):"0."+new Array(1-o).join("0")+jh(e,Math.max(0,r+o-1))[0]}function vT(e,r){var n=jh(e,r);if(!n)return e+"";var a=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+a:a.length>i+1?a.slice(0,i+1)+"."+a.slice(i+1):a+new Array(i-a.length+2).join("0")}const gT={"%":(e,r)=>(e*100).toFixed(r),b:e=>Math.round(e).toString(2),c:e=>e+"",d:ote,e:(e,r)=>e.toExponential(r),f:(e,r)=>e.toFixed(r),g:(e,r)=>e.toPrecision(r),o:e=>Math.round(e).toString(8),p:(e,r)=>vT(e*100,r),r:vT,s:fte,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function yT(e){return e}var bT=Array.prototype.map,xT=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function dte(e){var r=e.grouping===void 0||e.thousands===void 0?yT:lte(bT.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",a=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?yT:ste(bT.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",c=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function d(m,g){m=ic(m);var y=m.fill,x=m.align,E=m.sign,_=m.symbol,w=m.zero,A=m.width,C=m.comma,O=m.precision,T=m.trim,N=m.type;N==="n"?(C=!0,N="g"):gT[N]||(O===void 0&&(O=12),T=!0,N="g"),(w||y==="0"&&x==="=")&&(w=!0,y="0",x="=");var M=(g&&g.prefix!==void 0?g.prefix:"")+(_==="$"?n:_==="#"&&/[boxX]/.test(N)?"0"+N.toLowerCase():""),P=(_==="$"?a:/[%p]/.test(N)?s:"")+(g&&g.suffix!==void 0?g.suffix:""),L=gT[N],D=/[defgprs%]/.test(N);O=O===void 0?6:/[gprs]/.test(N)?Math.max(1,Math.min(21,O)):Math.max(0,Math.min(20,O));function q(z){var U=M,$=P,Y,B,Z;if(N==="c")$=L(z)+$,z="";else{z=+z;var ae=z<0||1/z<0;if(z=isNaN(z)?f:L(Math.abs(z),O),T&&(z=cte(z)),ae&&+z==0&&E!=="+"&&(ae=!1),U=(ae?E==="("?E:c:E==="-"||E==="("?"":E)+U,$=(N==="s"&&!isNaN(z)&&Ah!==void 0?xT[8+Ah/3]:"")+$+(ae&&E==="("?")":""),D){for(Y=-1,B=z.length;++Y<B;)if(Z=z.charCodeAt(Y),48>Z||Z>57){$=(Z===46?i+z.slice(Y+1):z.slice(Y))+$,z=z.slice(0,Y);break}}}C&&!w&&(z=r(z,1/0));var V=U.length+z.length+$.length,fe=V<A?new Array(A-V+1).join(y):"";switch(C&&w&&(z=r(fe+z,fe.length?A-$.length:1/0),fe=""),x){case"<":z=U+z+$+fe;break;case"=":z=U+fe+z+$;break;case"^":z=fe.slice(0,V=fe.length>>1)+U+z+$+fe.slice(V);break;default:z=fe+U+z+$;break}return o(z)}return q.toString=function(){return m+""},q}function h(m,g){var y=Math.max(-8,Math.min(8,Math.floor(es(g)/3)))*3,x=Math.pow(10,-y),E=d((m=ic(m),m.type="f",m),{suffix:xT[8+y/3]});return function(_){return E(x*_)}}return{format:d,formatPrefix:h}}var Nd,cE,oI;hte({thousands:",",grouping:[3],currency:["$",""]});function hte(e){return Nd=dte(e),cE=Nd.format,oI=Nd.formatPrefix,Nd}function pte(e){return Math.max(0,-es(Math.abs(e)))}function mte(e,r){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(es(r)/3)))*3-es(Math.abs(e)))}function vte(e,r){return e=Math.abs(e),r=Math.abs(r)-e,Math.max(0,es(r)-es(e))+1}function lI(e,r,n,a){var i=w2(e,r,n),o;switch(a=ic(a??",f"),a.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(r));return a.precision==null&&!isNaN(o=mte(i,s))&&(a.precision=o),oI(a,s)}case"":case"e":case"g":case"p":case"r":{a.precision==null&&!isNaN(o=vte(i,Math.max(Math.abs(e),Math.abs(r))))&&(a.precision=o-(a.type==="e"));break}case"f":case"%":{a.precision==null&&!isNaN(o=pte(i))&&(a.precision=o-(a.type==="%")*2);break}}return cE(a)}function Vi(e){var r=e.domain;return e.ticks=function(n){var a=r();return x2(a[0],a[a.length-1],n??10)},e.tickFormat=function(n,a){var i=r();return lI(i[0],i[i.length-1],n??10,a)},e.nice=function(n){n==null&&(n=10);var a=r(),i=0,o=a.length-1,s=a[i],c=a[o],f,d,h=10;for(c<s&&(d=s,s=c,c=d,d=i,i=o,o=d);h-- >0;){if(d=_2(s,c,n),d===f)return a[i]=s,a[o]=c,r(a);if(d>0)s=Math.floor(s/d)*d,c=Math.ceil(c/d)*d;else if(d<0)s=Math.ceil(s*d)/d,c=Math.floor(c*d)/d;else break;f=d}return e},e}function sI(){var e=sE();return e.copy=function(){return Nc(e,sI())},wn.apply(e,arguments),Vi(e)}function uI(e){var r;function n(a){return a==null||isNaN(a=+a)?r:a}return n.invert=n,n.domain=n.range=function(a){return arguments.length?(e=Array.from(a,kh),n):e.slice()},n.unknown=function(a){return arguments.length?(r=a,n):r},n.copy=function(){return uI(e).unknown(r)},e=arguments.length?Array.from(e,kh):[0,1],Vi(n)}function cI(e,r){e=e.slice();var n=0,a=e.length-1,i=e[n],o=e[a],s;return o<i&&(s=n,n=a,a=s,s=i,i=o,o=s),e[n]=r.floor(i),e[a]=r.ceil(o),e}function _T(e){return Math.log(e)}function wT(e){return Math.exp(e)}function gte(e){return-Math.log(-e)}function yte(e){return-Math.exp(-e)}function bte(e){return isFinite(e)?+("1e"+e):e<0?0:e}function xte(e){return e===10?bte:e===Math.E?Math.exp:r=>Math.pow(e,r)}function _te(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),r=>Math.log(r)/e)}function ST(e){return(r,n)=>-e(-r,n)}function fE(e){const r=e(_T,wT),n=r.domain;let a=10,i,o;function s(){return i=_te(a),o=xte(a),n()[0]<0?(i=ST(i),o=ST(o),e(gte,yte)):e(_T,wT),r}return r.base=function(c){return arguments.length?(a=+c,s()):a},r.domain=function(c){return arguments.length?(n(c),s()):n()},r.ticks=c=>{const f=n();let d=f[0],h=f[f.length-1];const m=h<d;m&&([d,h]=[h,d]);let g=i(d),y=i(h),x,E;const _=c==null?10:+c;let w=[];if(!(a%1)&&y-g<_){if(g=Math.floor(g),y=Math.ceil(y),d>0){for(;g<=y;++g)for(x=1;x<a;++x)if(E=g<0?x/o(-g):x*o(g),!(E<d)){if(E>h)break;w.push(E)}}else for(;g<=y;++g)for(x=a-1;x>=1;--x)if(E=g>0?x/o(-g):x*o(g),!(E<d)){if(E>h)break;w.push(E)}w.length*2<_&&(w=x2(d,h,_))}else w=x2(g,y,Math.min(y-g,_)).map(o);return m?w.reverse():w},r.tickFormat=(c,f)=>{if(c==null&&(c=10),f==null&&(f=a===10?"s":","),typeof f!="function"&&(!(a%1)&&(f=ic(f)).precision==null&&(f.trim=!0),f=cE(f)),c===1/0)return f;const d=Math.max(1,a*c/r.ticks().length);return h=>{let m=h/o(Math.round(i(h)));return m*a<a-.5&&(m*=a),m<=d?f(h):""}},r.nice=()=>n(cI(n(),{floor:c=>o(Math.floor(i(c))),ceil:c=>o(Math.ceil(i(c)))})),r}function fI(){const e=fE(Cp()).domain([1,10]);return e.copy=()=>Nc(e,fI()).base(e.base()),wn.apply(e,arguments),e}function ET(e){return function(r){return Math.sign(r)*Math.log1p(Math.abs(r/e))}}function kT(e){return function(r){return Math.sign(r)*Math.expm1(Math.abs(r))*e}}function dE(e){var r=1,n=e(ET(r),kT(r));return n.constant=function(a){return arguments.length?e(ET(r=+a),kT(r)):r},Vi(n)}function dI(){var e=dE(Cp());return e.copy=function(){return Nc(e,dI()).constant(e.constant())},wn.apply(e,arguments)}function jT(e){return function(r){return r<0?-Math.pow(-r,e):Math.pow(r,e)}}function wte(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Ste(e){return e<0?-e*e:e*e}function hE(e){var r=e(vr,vr),n=1;function a(){return n===1?e(vr,vr):n===.5?e(wte,Ste):e(jT(n),jT(1/n))}return r.exponent=function(i){return arguments.length?(n=+i,a()):n},Vi(r)}function pE(){var e=hE(Cp());return e.copy=function(){return Nc(e,pE()).exponent(e.exponent())},wn.apply(e,arguments),e}function Ete(){return pE.apply(null,arguments).exponent(.5)}function AT(e){return Math.sign(e)*e*e}function kte(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function hI(){var e=sE(),r=[0,1],n=!1,a;function i(o){var s=kte(e(o));return isNaN(s)?a:n?Math.round(s):s}return i.invert=function(o){return e.invert(AT(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((r=Array.from(o,kh)).map(AT)),i):r.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(a=o,i):a},i.copy=function(){return hI(e.domain(),r).round(n).clamp(e.clamp()).unknown(a)},wn.apply(i,arguments),Vi(i)}function pI(){var e=[],r=[],n=[],a;function i(){var s=0,c=Math.max(1,r.length);for(n=new Array(c-1);++s<c;)n[s-1]=MZ(e,s/c);return o}function o(s){return s==null||isNaN(s=+s)?a:r[Oc(n,s)]}return o.invertExtent=function(s){var c=r.indexOf(s);return c<0?[NaN,NaN]:[c>0?n[c-1]:e[0],c<n.length?n[c]:e[e.length-1]]},o.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let c of s)c!=null&&!isNaN(c=+c)&&e.push(c);return e.sort(Fi),i()},o.range=function(s){return arguments.length?(r=Array.from(s),i()):r.slice()},o.unknown=function(s){return arguments.length?(a=s,o):a},o.quantiles=function(){return n.slice()},o.copy=function(){return pI().domain(e).range(r).unknown(a)},wn.apply(o,arguments)}function mI(){var e=0,r=1,n=1,a=[.5],i=[0,1],o;function s(f){return f!=null&&f<=f?i[Oc(a,f,0,n)]:o}function c(){var f=-1;for(a=new Array(n);++f<n;)a[f]=((f+1)*r-(f-n)*e)/(n+1);return s}return s.domain=function(f){return arguments.length?([e,r]=f,e=+e,r=+r,c()):[e,r]},s.range=function(f){return arguments.length?(n=(i=Array.from(f)).length-1,c()):i.slice()},s.invertExtent=function(f){var d=i.indexOf(f);return d<0?[NaN,NaN]:d<1?[e,a[0]]:d>=n?[a[n-1],r]:[a[d-1],a[d]]},s.unknown=function(f){return arguments.length&&(o=f),s},s.thresholds=function(){return a.slice()},s.copy=function(){return mI().domain([e,r]).range(i).unknown(o)},wn.apply(Vi(s),arguments)}function vI(){var e=[.5],r=[0,1],n,a=1;function i(o){return o!=null&&o<=o?r[Oc(e,o,0,a)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),a=Math.min(e.length,r.length-1),i):e.slice()},i.range=function(o){return arguments.length?(r=Array.from(o),a=Math.min(e.length,r.length-1),i):r.slice()},i.invertExtent=function(o){var s=r.indexOf(o);return[e[s-1],e[s]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return vI().domain(e).range(r).unknown(n)},wn.apply(i,arguments)}const sy=new Date,uy=new Date;function Lt(e,r,n,a){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),r(o,1),e(o),o),i.round=o=>{const s=i(o),c=i.ceil(o);return o-s<c-o?s:c},i.offset=(o,s)=>(r(o=new Date(+o),s==null?1:Math.floor(s)),o),i.range=(o,s,c)=>{const f=[];if(o=i.ceil(o),c=c==null?1:Math.floor(c),!(o<s)||!(c>0))return f;let d;do f.push(d=new Date(+o)),r(o,c),e(o);while(d<o&&o<s);return f},i.filter=o=>Lt(s=>{if(s>=s)for(;e(s),!o(s);)s.setTime(s-1)},(s,c)=>{if(s>=s)if(c<0)for(;++c<=0;)for(;r(s,-1),!o(s););else for(;--c>=0;)for(;r(s,1),!o(s););}),n&&(i.count=(o,s)=>(sy.setTime(+o),uy.setTime(+s),e(sy),e(uy),Math.floor(n(sy,uy))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(a?s=>a(s)%o===0:s=>i.count(0,s)%o===0):i)),i}const Ch=Lt(()=>{},(e,r)=>{e.setTime(+e+r)},(e,r)=>r-e);Ch.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Lt(r=>{r.setTime(Math.floor(r/e)*e)},(r,n)=>{r.setTime(+r+n*e)},(r,n)=>(n-r)/e):Ch);Ch.range;const Fa=1e3,vn=Fa*60,Ua=vn*60,Xa=Ua*24,mE=Xa*7,CT=Xa*30,cy=Xa*365,jo=Lt(e=>{e.setTime(e-e.getMilliseconds())},(e,r)=>{e.setTime(+e+r*Fa)},(e,r)=>(r-e)/Fa,e=>e.getUTCSeconds());jo.range;const vE=Lt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Fa)},(e,r)=>{e.setTime(+e+r*vn)},(e,r)=>(r-e)/vn,e=>e.getMinutes());vE.range;const gE=Lt(e=>{e.setUTCSeconds(0,0)},(e,r)=>{e.setTime(+e+r*vn)},(e,r)=>(r-e)/vn,e=>e.getUTCMinutes());gE.range;const yE=Lt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Fa-e.getMinutes()*vn)},(e,r)=>{e.setTime(+e+r*Ua)},(e,r)=>(r-e)/Ua,e=>e.getHours());yE.range;const bE=Lt(e=>{e.setUTCMinutes(0,0,0)},(e,r)=>{e.setTime(+e+r*Ua)},(e,r)=>(r-e)/Ua,e=>e.getUTCHours());bE.range;const Mc=Lt(e=>e.setHours(0,0,0,0),(e,r)=>e.setDate(e.getDate()+r),(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*vn)/Xa,e=>e.getDate()-1);Mc.range;const Op=Lt(e=>{e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r)},(e,r)=>(r-e)/Xa,e=>e.getUTCDate()-1);Op.range;const gI=Lt(e=>{e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r)},(e,r)=>(r-e)/Xa,e=>Math.floor(e/Xa));gI.range;function Fo(e){return Lt(r=>{r.setDate(r.getDate()-(r.getDay()+7-e)%7),r.setHours(0,0,0,0)},(r,n)=>{r.setDate(r.getDate()+n*7)},(r,n)=>(n-r-(n.getTimezoneOffset()-r.getTimezoneOffset())*vn)/mE)}const Tp=Fo(0),Oh=Fo(1),jte=Fo(2),Ate=Fo(3),ts=Fo(4),Cte=Fo(5),Ote=Fo(6);Tp.range;Oh.range;jte.range;Ate.range;ts.range;Cte.range;Ote.range;function Uo(e){return Lt(r=>{r.setUTCDate(r.getUTCDate()-(r.getUTCDay()+7-e)%7),r.setUTCHours(0,0,0,0)},(r,n)=>{r.setUTCDate(r.getUTCDate()+n*7)},(r,n)=>(n-r)/mE)}const Np=Uo(0),Th=Uo(1),Tte=Uo(2),Nte=Uo(3),rs=Uo(4),Mte=Uo(5),Rte=Uo(6);Np.range;Th.range;Tte.range;Nte.range;rs.range;Mte.range;Rte.range;const xE=Lt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,r)=>{e.setMonth(e.getMonth()+r)},(e,r)=>r.getMonth()-e.getMonth()+(r.getFullYear()-e.getFullYear())*12,e=>e.getMonth());xE.range;const _E=Lt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCMonth(e.getUTCMonth()+r)},(e,r)=>r.getUTCMonth()-e.getUTCMonth()+(r.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());_E.range;const Wa=Lt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r)},(e,r)=>r.getFullYear()-e.getFullYear(),e=>e.getFullYear());Wa.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Lt(r=>{r.setFullYear(Math.floor(r.getFullYear()/e)*e),r.setMonth(0,1),r.setHours(0,0,0,0)},(r,n)=>{r.setFullYear(r.getFullYear()+n*e)});Wa.range;const Za=Lt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r)},(e,r)=>r.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Za.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Lt(r=>{r.setUTCFullYear(Math.floor(r.getUTCFullYear()/e)*e),r.setUTCMonth(0,1),r.setUTCHours(0,0,0,0)},(r,n)=>{r.setUTCFullYear(r.getUTCFullYear()+n*e)});Za.range;function yI(e,r,n,a,i,o){const s=[[jo,1,Fa],[jo,5,5*Fa],[jo,15,15*Fa],[jo,30,30*Fa],[o,1,vn],[o,5,5*vn],[o,15,15*vn],[o,30,30*vn],[i,1,Ua],[i,3,3*Ua],[i,6,6*Ua],[i,12,12*Ua],[a,1,Xa],[a,2,2*Xa],[n,1,mE],[r,1,CT],[r,3,3*CT],[e,1,cy]];function c(d,h,m){const g=h<d;g&&([d,h]=[h,d]);const y=m&&typeof m.range=="function"?m:f(d,h,m),x=y?y.range(d,+h+1):[];return g?x.reverse():x}function f(d,h,m){const g=Math.abs(h-d)/m,y=XS(([,,_])=>_).right(s,g);if(y===s.length)return e.every(w2(d/cy,h/cy,m));if(y===0)return Ch.every(Math.max(w2(d,h,m),1));const[x,E]=s[g/s[y-1][2]<s[y][2]/g?y-1:y];return x.every(E)}return[c,f]}const[Pte,Dte]=yI(Za,_E,Np,gI,bE,gE),[Lte,Ite]=yI(Wa,xE,Tp,Mc,yE,vE);function fy(e){if(0<=e.y&&e.y<100){var r=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return r.setFullYear(e.y),r}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function dy(e){if(0<=e.y&&e.y<100){var r=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return r.setUTCFullYear(e.y),r}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Ou(e,r,n){return{y:e,m:r,d:n,H:0,M:0,S:0,L:0}}function zte(e){var r=e.dateTime,n=e.date,a=e.time,i=e.periods,o=e.days,s=e.shortDays,c=e.months,f=e.shortMonths,d=Tu(i),h=Nu(i),m=Tu(o),g=Nu(o),y=Tu(s),x=Nu(s),E=Tu(c),_=Nu(c),w=Tu(f),A=Nu(f),C={a:Z,A:ae,b:V,B:fe,c:null,d:PT,e:PT,f:lre,g:gre,G:bre,H:are,I:ire,j:ore,L:bI,m:sre,M:ure,p:F,q:X,Q:IT,s:zT,S:cre,u:fre,U:dre,V:hre,w:pre,W:mre,x:null,X:null,y:vre,Y:yre,Z:xre,"%":LT},O={a:ce,A:G,b:H,B:te,c:null,d:DT,e:DT,f:Ere,g:Pre,G:Lre,H:_re,I:wre,j:Sre,L:_I,m:kre,M:jre,p:W,q:xe,Q:IT,s:zT,S:Are,u:Cre,U:Ore,V:Tre,w:Nre,W:Mre,x:null,X:null,y:Rre,Y:Dre,Z:Ire,"%":LT},T={a:D,A:q,b:z,B:U,c:$,d:MT,e:MT,f:ere,g:NT,G:TT,H:RT,I:RT,j:Wte,L:Jte,m:Xte,M:Zte,p:L,q:Yte,Q:rre,s:nre,S:Qte,u:Ute,U:Hte,V:Gte,w:Fte,W:Vte,x:Y,X:B,y:NT,Y:TT,Z:Kte,"%":tre};C.x=N(n,C),C.X=N(a,C),C.c=N(r,C),O.x=N(n,O),O.X=N(a,O),O.c=N(r,O);function N(ee,le){return function(be){var he=[],Se=-1,se=0,ne=ee.length,ge,_e,vt;for(be instanceof Date||(be=new Date(+be));++Se<ne;)ee.charCodeAt(Se)===37&&(he.push(ee.slice(se,Se)),(_e=OT[ge=ee.charAt(++Se)])!=null?ge=ee.charAt(++Se):_e=ge==="e"?" ":"0",(vt=le[ge])&&(ge=vt(be,_e)),he.push(ge),se=Se+1);return he.push(ee.slice(se,Se)),he.join("")}}function M(ee,le){return function(be){var he=Ou(1900,void 0,1),Se=P(he,ee,be+="",0),se,ne;if(Se!=be.length)return null;if("Q"in he)return new Date(he.Q);if("s"in he)return new Date(he.s*1e3+("L"in he?he.L:0));if(le&&!("Z"in he)&&(he.Z=0),"p"in he&&(he.H=he.H%12+he.p*12),he.m===void 0&&(he.m="q"in he?he.q:0),"V"in he){if(he.V<1||he.V>53)return null;"w"in he||(he.w=1),"Z"in he?(se=dy(Ou(he.y,0,1)),ne=se.getUTCDay(),se=ne>4||ne===0?Th.ceil(se):Th(se),se=Op.offset(se,(he.V-1)*7),he.y=se.getUTCFullYear(),he.m=se.getUTCMonth(),he.d=se.getUTCDate()+(he.w+6)%7):(se=fy(Ou(he.y,0,1)),ne=se.getDay(),se=ne>4||ne===0?Oh.ceil(se):Oh(se),se=Mc.offset(se,(he.V-1)*7),he.y=se.getFullYear(),he.m=se.getMonth(),he.d=se.getDate()+(he.w+6)%7)}else("W"in he||"U"in he)&&("w"in he||(he.w="u"in he?he.u%7:"W"in he?1:0),ne="Z"in he?dy(Ou(he.y,0,1)).getUTCDay():fy(Ou(he.y,0,1)).getDay(),he.m=0,he.d="W"in he?(he.w+6)%7+he.W*7-(ne+5)%7:he.w+he.U*7-(ne+6)%7);return"Z"in he?(he.H+=he.Z/100|0,he.M+=he.Z%100,dy(he)):fy(he)}}function P(ee,le,be,he){for(var Se=0,se=le.length,ne=be.length,ge,_e;Se<se;){if(he>=ne)return-1;if(ge=le.charCodeAt(Se++),ge===37){if(ge=le.charAt(Se++),_e=T[ge in OT?le.charAt(Se++):ge],!_e||(he=_e(ee,be,he))<0)return-1}else if(ge!=be.charCodeAt(he++))return-1}return he}function L(ee,le,be){var he=d.exec(le.slice(be));return he?(ee.p=h.get(he[0].toLowerCase()),be+he[0].length):-1}function D(ee,le,be){var he=y.exec(le.slice(be));return he?(ee.w=x.get(he[0].toLowerCase()),be+he[0].length):-1}function q(ee,le,be){var he=m.exec(le.slice(be));return he?(ee.w=g.get(he[0].toLowerCase()),be+he[0].length):-1}function z(ee,le,be){var he=w.exec(le.slice(be));return he?(ee.m=A.get(he[0].toLowerCase()),be+he[0].length):-1}function U(ee,le,be){var he=E.exec(le.slice(be));return he?(ee.m=_.get(he[0].toLowerCase()),be+he[0].length):-1}function $(ee,le,be){return P(ee,r,le,be)}function Y(ee,le,be){return P(ee,n,le,be)}function B(ee,le,be){return P(ee,a,le,be)}function Z(ee){return s[ee.getDay()]}function ae(ee){return o[ee.getDay()]}function V(ee){return f[ee.getMonth()]}function fe(ee){return c[ee.getMonth()]}function F(ee){return i[+(ee.getHours()>=12)]}function X(ee){return 1+~~(ee.getMonth()/3)}function ce(ee){return s[ee.getUTCDay()]}function G(ee){return o[ee.getUTCDay()]}function H(ee){return f[ee.getUTCMonth()]}function te(ee){return c[ee.getUTCMonth()]}function W(ee){return i[+(ee.getUTCHours()>=12)]}function xe(ee){return 1+~~(ee.getUTCMonth()/3)}return{format:function(ee){var le=N(ee+="",C);return le.toString=function(){return ee},le},parse:function(ee){var le=M(ee+="",!1);return le.toString=function(){return ee},le},utcFormat:function(ee){var le=N(ee+="",O);return le.toString=function(){return ee},le},utcParse:function(ee){var le=M(ee+="",!0);return le.toString=function(){return ee},le}}}var OT={"-":"",_:" ",0:"0"},Gt=/^\s*\d+/,qte=/^%/,Bte=/[\\^$*+?|[\]().{}]/g;function He(e,r,n){var a=e<0?"-":"",i=(a?-e:e)+"",o=i.length;return a+(o<n?new Array(n-o+1).join(r)+i:i)}function $te(e){return e.replace(Bte,"\\$&")}function Tu(e){return new RegExp("^(?:"+e.map($te).join("|")+")","i")}function Nu(e){return new Map(e.map((r,n)=>[r.toLowerCase(),n]))}function Fte(e,r,n){var a=Gt.exec(r.slice(n,n+1));return a?(e.w=+a[0],n+a[0].length):-1}function Ute(e,r,n){var a=Gt.exec(r.slice(n,n+1));return a?(e.u=+a[0],n+a[0].length):-1}function Hte(e,r,n){var a=Gt.exec(r.slice(n,n+2));return a?(e.U=+a[0],n+a[0].length):-1}function Gte(e,r,n){var a=Gt.exec(r.slice(n,n+2));return a?(e.V=+a[0],n+a[0].length):-1}function Vte(e,r,n){var a=Gt.exec(r.slice(n,n+2));return a?(e.W=+a[0],n+a[0].length):-1}function TT(e,r,n){var a=Gt.exec(r.slice(n,n+4));return a?(e.y=+a[0],n+a[0].length):-1}function NT(e,r,n){var a=Gt.exec(r.slice(n,n+2));return a?(e.y=+a[0]+(+a[0]>68?1900:2e3),n+a[0].length):-1}function Kte(e,r,n){var a=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(r.slice(n,n+6));return a?(e.Z=a[1]?0:-(a[2]+(a[3]||"00")),n+a[0].length):-1}function Yte(e,r,n){var a=Gt.exec(r.slice(n,n+1));return a?(e.q=a[0]*3-3,n+a[0].length):-1}function Xte(e,r,n){var a=Gt.exec(r.slice(n,n+2));return a?(e.m=a[0]-1,n+a[0].length):-1}function MT(e,r,n){var a=Gt.exec(r.slice(n,n+2));return a?(e.d=+a[0],n+a[0].length):-1}function Wte(e,r,n){var a=Gt.exec(r.slice(n,n+3));return a?(e.m=0,e.d=+a[0],n+a[0].length):-1}function RT(e,r,n){var a=Gt.exec(r.slice(n,n+2));return a?(e.H=+a[0],n+a[0].length):-1}function Zte(e,r,n){var a=Gt.exec(r.slice(n,n+2));return a?(e.M=+a[0],n+a[0].length):-1}function Qte(e,r,n){var a=Gt.exec(r.slice(n,n+2));return a?(e.S=+a[0],n+a[0].length):-1}function Jte(e,r,n){var a=Gt.exec(r.slice(n,n+3));return a?(e.L=+a[0],n+a[0].length):-1}function ere(e,r,n){var a=Gt.exec(r.slice(n,n+6));return a?(e.L=Math.floor(a[0]/1e3),n+a[0].length):-1}function tre(e,r,n){var a=qte.exec(r.slice(n,n+1));return a?n+a[0].length:-1}function rre(e,r,n){var a=Gt.exec(r.slice(n));return a?(e.Q=+a[0],n+a[0].length):-1}function nre(e,r,n){var a=Gt.exec(r.slice(n));return a?(e.s=+a[0],n+a[0].length):-1}function PT(e,r){return He(e.getDate(),r,2)}function are(e,r){return He(e.getHours(),r,2)}function ire(e,r){return He(e.getHours()%12||12,r,2)}function ore(e,r){return He(1+Mc.count(Wa(e),e),r,3)}function bI(e,r){return He(e.getMilliseconds(),r,3)}function lre(e,r){return bI(e,r)+"000"}function sre(e,r){return He(e.getMonth()+1,r,2)}function ure(e,r){return He(e.getMinutes(),r,2)}function cre(e,r){return He(e.getSeconds(),r,2)}function fre(e){var r=e.getDay();return r===0?7:r}function dre(e,r){return He(Tp.count(Wa(e)-1,e),r,2)}function xI(e){var r=e.getDay();return r>=4||r===0?ts(e):ts.ceil(e)}function hre(e,r){return e=xI(e),He(ts.count(Wa(e),e)+(Wa(e).getDay()===4),r,2)}function pre(e){return e.getDay()}function mre(e,r){return He(Oh.count(Wa(e)-1,e),r,2)}function vre(e,r){return He(e.getFullYear()%100,r,2)}function gre(e,r){return e=xI(e),He(e.getFullYear()%100,r,2)}function yre(e,r){return He(e.getFullYear()%1e4,r,4)}function bre(e,r){var n=e.getDay();return e=n>=4||n===0?ts(e):ts.ceil(e),He(e.getFullYear()%1e4,r,4)}function xre(e){var r=e.getTimezoneOffset();return(r>0?"-":(r*=-1,"+"))+He(r/60|0,"0",2)+He(r%60,"0",2)}function DT(e,r){return He(e.getUTCDate(),r,2)}function _re(e,r){return He(e.getUTCHours(),r,2)}function wre(e,r){return He(e.getUTCHours()%12||12,r,2)}function Sre(e,r){return He(1+Op.count(Za(e),e),r,3)}function _I(e,r){return He(e.getUTCMilliseconds(),r,3)}function Ere(e,r){return _I(e,r)+"000"}function kre(e,r){return He(e.getUTCMonth()+1,r,2)}function jre(e,r){return He(e.getUTCMinutes(),r,2)}function Are(e,r){return He(e.getUTCSeconds(),r,2)}function Cre(e){var r=e.getUTCDay();return r===0?7:r}function Ore(e,r){return He(Np.count(Za(e)-1,e),r,2)}function wI(e){var r=e.getUTCDay();return r>=4||r===0?rs(e):rs.ceil(e)}function Tre(e,r){return e=wI(e),He(rs.count(Za(e),e)+(Za(e).getUTCDay()===4),r,2)}function Nre(e){return e.getUTCDay()}function Mre(e,r){return He(Th.count(Za(e)-1,e),r,2)}function Rre(e,r){return He(e.getUTCFullYear()%100,r,2)}function Pre(e,r){return e=wI(e),He(e.getUTCFullYear()%100,r,2)}function Dre(e,r){return He(e.getUTCFullYear()%1e4,r,4)}function Lre(e,r){var n=e.getUTCDay();return e=n>=4||n===0?rs(e):rs.ceil(e),He(e.getUTCFullYear()%1e4,r,4)}function Ire(){return"+0000"}function LT(){return"%"}function IT(e){return+e}function zT(e){return Math.floor(+e/1e3)}var Ll,SI,EI;zre({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function zre(e){return Ll=zte(e),SI=Ll.format,Ll.parse,EI=Ll.utcFormat,Ll.utcParse,Ll}function qre(e){return new Date(e)}function Bre(e){return e instanceof Date?+e:+new Date(+e)}function wE(e,r,n,a,i,o,s,c,f,d){var h=sE(),m=h.invert,g=h.domain,y=d(".%L"),x=d(":%S"),E=d("%I:%M"),_=d("%I %p"),w=d("%a %d"),A=d("%b %d"),C=d("%B"),O=d("%Y");function T(N){return(f(N)<N?y:c(N)<N?x:s(N)<N?E:o(N)<N?_:a(N)<N?i(N)<N?w:A:n(N)<N?C:O)(N)}return h.invert=function(N){return new Date(m(N))},h.domain=function(N){return arguments.length?g(Array.from(N,Bre)):g().map(qre)},h.ticks=function(N){var M=g();return e(M[0],M[M.length-1],N??10)},h.tickFormat=function(N,M){return M==null?T:d(M)},h.nice=function(N){var M=g();return(!N||typeof N.range!="function")&&(N=r(M[0],M[M.length-1],N??10)),N?g(cI(M,N)):h},h.copy=function(){return Nc(h,wE(e,r,n,a,i,o,s,c,f,d))},h}function $re(){return wn.apply(wE(Lte,Ite,Wa,xE,Tp,Mc,yE,vE,jo,SI).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Fre(){return wn.apply(wE(Pte,Dte,Za,_E,Np,Op,bE,gE,jo,EI).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Mp(){var e=0,r=1,n,a,i,o,s=vr,c=!1,f;function d(m){return m==null||isNaN(m=+m)?f:s(i===0?.5:(m=(o(m)-n)*i,c?Math.max(0,Math.min(1,m)):m))}d.domain=function(m){return arguments.length?([e,r]=m,n=o(e=+e),a=o(r=+r),i=n===a?0:1/(a-n),d):[e,r]},d.clamp=function(m){return arguments.length?(c=!!m,d):c},d.interpolator=function(m){return arguments.length?(s=m,d):s};function h(m){return function(g){var y,x;return arguments.length?([y,x]=g,s=m(y,x),d):[s(0),s(1)]}}return d.range=h(us),d.rangeRound=h(US),d.unknown=function(m){return arguments.length?(f=m,d):f},function(m){return o=m,n=m(e),a=m(r),i=n===a?0:1/(a-n),d}}function Ki(e,r){return r.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function kI(){var e=Vi(Mp()(vr));return e.copy=function(){return Ki(e,kI())},ri.apply(e,arguments)}function jI(){var e=fE(Mp()).domain([1,10]);return e.copy=function(){return Ki(e,jI()).base(e.base())},ri.apply(e,arguments)}function AI(){var e=dE(Mp());return e.copy=function(){return Ki(e,AI()).constant(e.constant())},ri.apply(e,arguments)}function SE(){var e=hE(Mp());return e.copy=function(){return Ki(e,SE()).exponent(e.exponent())},ri.apply(e,arguments)}function Ure(){return SE.apply(null,arguments).exponent(.5)}function CI(){var e=[],r=vr;function n(a){if(a!=null&&!isNaN(a=+a))return r((Oc(e,a,1)-1)/(e.length-1))}return n.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let i of a)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Fi),n},n.interpolator=function(a){return arguments.length?(r=a,n):r},n.range=function(){return e.map((a,i)=>r(i/(e.length-1)))},n.quantiles=function(a){return Array.from({length:a+1},(i,o)=>NZ(e,o/a))},n.copy=function(){return CI(r).domain(e)},ri.apply(n,arguments)}function Rp(){var e=0,r=.5,n=1,a=1,i,o,s,c,f,d=vr,h,m=!1,g;function y(E){return isNaN(E=+E)?g:(E=.5+((E=+h(E))-o)*(a*E<a*o?c:f),d(m?Math.max(0,Math.min(1,E)):E))}y.domain=function(E){return arguments.length?([e,r,n]=E,i=h(e=+e),o=h(r=+r),s=h(n=+n),c=i===o?0:.5/(o-i),f=o===s?0:.5/(s-o),a=o<i?-1:1,y):[e,r,n]},y.clamp=function(E){return arguments.length?(m=!!E,y):m},y.interpolator=function(E){return arguments.length?(d=E,y):d};function x(E){return function(_){var w,A,C;return arguments.length?([w,A,C]=_,d=tW(E,[w,A,C]),y):[d(0),d(.5),d(1)]}}return y.range=x(us),y.rangeRound=x(US),y.unknown=function(E){return arguments.length?(g=E,y):g},function(E){return h=E,i=E(e),o=E(r),s=E(n),c=i===o?0:.5/(o-i),f=o===s?0:.5/(s-o),a=o<i?-1:1,y}}function OI(){var e=Vi(Rp()(vr));return e.copy=function(){return Ki(e,OI())},ri.apply(e,arguments)}function TI(){var e=fE(Rp()).domain([.1,1,10]);return e.copy=function(){return Ki(e,TI()).base(e.base())},ri.apply(e,arguments)}function NI(){var e=dE(Rp());return e.copy=function(){return Ki(e,NI()).constant(e.constant())},ri.apply(e,arguments)}function EE(){var e=hE(Rp());return e.copy=function(){return Ki(e,EE()).exponent(e.exponent())},ri.apply(e,arguments)}function Hre(){return EE.apply(null,arguments).exponent(.5)}function Gre(e){for(var r=e.length/6|0,n=new Array(r),a=0;a<r;)n[a]="#"+e.slice(a*6,++a*6);return n}const Vre=Gre("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function Kre(e,r){r===void 0&&(r={});var n=r.insertAt;if(!(typeof document>"u")){var a=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&a.firstChild?a.insertBefore(i,a.firstChild):a.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var Yre=`.force-graph-container canvas {
84
+ display: block;
85
+ user-select: none;
86
+ outline: none;
87
+ -webkit-tap-highlight-color: transparent;
88
+ }
89
+
90
+ .force-graph-container .clickable {
91
+ cursor: pointer;
92
+ }
93
+
94
+ .force-graph-container .grabbable {
95
+ cursor: move;
96
+ cursor: grab;
97
+ cursor: -moz-grab;
98
+ cursor: -webkit-grab;
99
+ }
100
+
101
+ .force-graph-container .grabbable:active {
102
+ cursor: grabbing;
103
+ cursor: -moz-grabbing;
104
+ cursor: -webkit-grabbing;
105
+ }
106
+ `;Kre(Yre);function P2(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,a=Array(r);n<r;n++)a[n]=e[n];return a}function Xre(e){if(Array.isArray(e))return e}function Wre(e){if(Array.isArray(e))return P2(e)}function qT(e,r,n){if(MI())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,r);var i=new(e.bind.apply(e,a));return i}function oc(e,r,n){return(r=rne(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function MI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(MI=function(){return!!e})()}function Zre(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Qre(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,i,o,s,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,r!==0)for(;!(f=(a=o.call(n)).done)&&(c.push(a.value),c.length!==r);f=!0);}catch(h){d=!0,i=h}finally{try{if(!f&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(d)throw i}}return c}}function Jre(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
107
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ene(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
108
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BT(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Il(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?BT(Object(n),!0).forEach(function(a){oc(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BT(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Qu(e,r){return Xre(e)||Qre(e,r)||RI(e,r)||Jre()}function mn(e){return Wre(e)||Zre(e)||RI(e)||ene()}function tne(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function rne(e){var r=tne(e,"string");return typeof r=="symbol"?r:r+""}function D2(e){"@babel/helpers - typeof";return D2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},D2(e)}function RI(e,r){if(e){if(typeof e=="string")return P2(e,r);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P2(e,r):void 0}}var nne=Ap(Vre);function $T(e,r,n){!r||typeof n!="string"||e.filter(function(a){return!a[n]}).forEach(function(a){a[n]=nne(r(a))})}function ane(e,r){var n=e.nodes,a=e.links,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.nodeFilter,s=o===void 0?function(){return!0}:o,c=i.onLoopError,f=c===void 0?function(y){throw"Invalid DAG structure! Found cycle in node path: ".concat(y.join(" -> "),".")}:c,d={};n.forEach(function(y){return d[r(y)]={data:y,out:[],depth:-1,skip:!s(y)}}),a.forEach(function(y){var x=y.source,E=y.target,_=O(x),w=O(E);if(!d.hasOwnProperty(_))throw"Missing source node with id: ".concat(_);if(!d.hasOwnProperty(w))throw"Missing target node with id: ".concat(w);var A=d[_],C=d[w];A.out.push(C);function O(T){return D2(T)==="object"?r(T):T}});var h=[];g(Object.values(d));var m=Object.assign.apply(Object,[{}].concat(mn(Object.entries(d).filter(function(y){var x=Qu(y,2),E=x[1];return!E.skip}).map(function(y){var x=Qu(y,2),E=x[0],_=x[1];return oc({},E,_.depth)}))));return m;function g(y){for(var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,_=function(){var O=y[w];if(x.indexOf(O)!==-1){var T=[].concat(mn(x.slice(x.indexOf(O))),[O]).map(function(N){return r(N.data)});return h.some(function(N){return N.length===T.length&&N.every(function(M,P){return M===T[P]})})||(h.push(T),f(T)),1}E>O.depth&&(O.depth=E,g(O.out,[].concat(mn(x),[O]),E+(O.skip?0:1)))},w=0,A=y.length;w<A;w++)_()}}var ine=2,lr=function(r,n){return n.onNeedsRedraw&&n.onNeedsRedraw()},FT=function(r,n){if(!n.isShadow){var a=Ve(n.linkDirectionalParticles);n.graphData.links.forEach(function(i){var o=Math.round(Math.abs(a(i)));o?i.__photons=mn(Array(o)).map(function(){return{}}):delete i.__photons})}},Nh=WS({props:{graphData:{default:{nodes:[],links:[]},onChange:function(r,n){n.engineRunning=!1,FT(r,n)}},dagMode:{onChange:function(r,n){!r&&(n.graphData.nodes||[]).forEach(function(a){return a.fx=a.fy=void 0})}},dagLevelDistance:{},dagNodeFilter:{default:function(r){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4,triggerUpdate:!1,onChange:lr},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:lr},nodeColor:{default:"color",triggerUpdate:!1,onChange:lr},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:lr},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:lr},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:lr},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:lr},linkColor:{default:"color",triggerUpdate:!1,onChange:lr},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:lr},linkWidth:{default:1,triggerUpdate:!1,onChange:lr},linkCurvature:{default:0,triggerUpdate:!1,onChange:lr},linkCanvasObject:{triggerUpdate:!1,onChange:lr},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:lr},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:lr},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:lr},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:lr},linkDirectionalParticles:{default:0,triggerUpdate:!1,onChange:FT},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(r,n){n.forceLayout.alphaDecay(r)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(r,n){n.forceLayout.alphaTarget(r)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(r,n){n.forceLayout.velocityDecay(r)}},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(r,n,a){return a===void 0?r.forceLayout.force(n):(r.forceLayout.force(n,a),this)},d3ReheatSimulation:function(r){return r.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(r){return r.cntTicks=0,r.startTickTime=new Date,r.engineRunning=!0,this},isEngineRunning:function(r){return!!r.engineRunning},tickFrame:function(r){return!r.isShadow&&n(),i(),!r.isShadow&&o(),!r.isShadow&&s(),a(),this;function n(){r.engineRunning&&(++r.cntTicks>r.cooldownTicks||new Date-r.startTickTime>r.cooldownTime||r.d3AlphaMin>0&&r.forceLayout.alpha()<r.d3AlphaMin?(r.engineRunning=!1,r.onEngineStop()):(r.forceLayout.tick(),r.onEngineTick()))}function a(){var c=Ve(r.nodeVisibility),f=Ve(r.nodeVal),d=Ve(r.nodeColor),h=Ve(r.nodeCanvasObjectMode),m=r.ctx,g=r.isShadow/r.globalScale,y=r.graphData.nodes.filter(c);m.save(),y.forEach(function(x){var E=h(x);if(r.nodeCanvasObject&&(E==="before"||E==="replace")&&(r.nodeCanvasObject(x,m,r.globalScale),E==="replace")){m.restore();return}var _=Math.sqrt(Math.max(0,f(x)||1))*r.nodeRelSize+g;m.beginPath(),m.arc(x.x,x.y,_,0,2*Math.PI,!1),m.fillStyle=d(x)||"rgba(31, 120, 180, 0.92)",m.fill(),r.nodeCanvasObject&&E==="after"&&r.nodeCanvasObject(x,r.ctx,r.globalScale)}),m.restore()}function i(){var c=Ve(r.linkVisibility),f=Ve(r.linkColor),d=Ve(r.linkWidth),h=Ve(r.linkLineDash),m=Ve(r.linkCurvature),g=Ve(r.linkCanvasObjectMode),y=r.ctx,x=r.isShadow*2,E=r.graphData.links.filter(c);E.forEach(N);var _=[],w=[],A=E;if(r.linkCanvasObject){var C=[],O=[];E.forEach(function(M){return({before:_,after:w,replace:C}[g(M)]||O).push(M)}),A=[].concat(mn(_),w,O),_=_.concat(C)}y.save(),_.forEach(function(M){return r.linkCanvasObject(M,y,r.globalScale)}),y.restore();var T=ete(A,[f,d,h]);y.save(),Object.entries(T).forEach(function(M){var P=Qu(M,2),L=P[0],D=P[1],q=!L||L==="undefined"?"rgba(0,0,0,0.15)":L;Object.entries(D).forEach(function(z){var U=Qu(z,2),$=U[0],Y=U[1],B=($||1)/r.globalScale+x;Object.entries(Y).forEach(function(Z){var ae=Qu(Z,2);ae[0];var V=ae[1],fe=h(V[0]);y.beginPath(),V.forEach(function(F){var X=F.source,ce=F.target;if(!(!X||!ce||!X.hasOwnProperty("x")||!ce.hasOwnProperty("x"))){y.moveTo(X.x,X.y);var G=F.__controlPoints;G?y[G.length===2?"quadraticCurveTo":"bezierCurveTo"].apply(y,mn(G).concat([ce.x,ce.y])):y.lineTo(ce.x,ce.y)}}),y.strokeStyle=q,y.lineWidth=B,y.setLineDash(fe||[]),y.stroke()})})}),y.restore(),y.save(),w.forEach(function(M){return r.linkCanvasObject(M,y,r.globalScale)}),y.restore();function N(M){var P=m(M);if(!P){M.__controlPoints=null;return}var L=M.source,D=M.target;if(!(!L||!D||!L.hasOwnProperty("x")||!D.hasOwnProperty("x"))){var q=Math.sqrt(Math.pow(D.x-L.x,2)+Math.pow(D.y-L.y,2));if(q>0){var z=Math.atan2(D.y-L.y,D.x-L.x),U=q*P,$={x:(L.x+D.x)/2+U*Math.cos(z-Math.PI/2),y:(L.y+D.y)/2+U*Math.sin(z-Math.PI/2)};M.__controlPoints=[$.x,$.y]}else{var Y=P*70;M.__controlPoints=[D.x,D.y-Y,D.x+Y,D.y]}}}}function o(){var c=1.6,f=.2,d=Ve(r.linkDirectionalArrowLength),h=Ve(r.linkDirectionalArrowRelPos),m=Ve(r.linkVisibility),g=Ve(r.linkDirectionalArrowColor||r.linkColor),y=Ve(r.nodeVal),x=r.ctx;x.save(),r.graphData.links.filter(m).forEach(function(E){var _=d(E);if(!(!_||_<0)){var w=E.source,A=E.target;if(!(!w||!A||!w.hasOwnProperty("x")||!A.hasOwnProperty("x"))){var C=Math.sqrt(Math.max(0,y(w)||1))*r.nodeRelSize,O=Math.sqrt(Math.max(0,y(A)||1))*r.nodeRelSize,T=Math.min(1,Math.max(0,h(E))),N=g(E)||"rgba(0,0,0,0.28)",M=_/c/2,P=E.__controlPoints&&qT(ot,[w.x,w.y].concat(mn(E.__controlPoints),[A.x,A.y])),L=P?function(B){return P.get(B)}:function(B){return{x:w.x+(A.x-w.x)*B||0,y:w.y+(A.y-w.y)*B||0}},D=P?P.length():Math.sqrt(Math.pow(A.x-w.x,2)+Math.pow(A.y-w.y,2)),q=C+_+(D-C-O-_)*T,z=L(q/D),U=L((q-_)/D),$=L((q-_*(1-f))/D),Y=Math.atan2(z.y-U.y,z.x-U.x)-Math.PI/2;x.beginPath(),x.moveTo(z.x,z.y),x.lineTo(U.x+M*Math.cos(Y),U.y+M*Math.sin(Y)),x.lineTo($.x,$.y),x.lineTo(U.x-M*Math.cos(Y),U.y-M*Math.sin(Y)),x.fillStyle=N,x.fill()}}}),x.restore()}function s(){var c=Ve(r.linkDirectionalParticles),f=Ve(r.linkDirectionalParticleSpeed),d=Ve(r.linkDirectionalParticleOffset),h=Ve(r.linkDirectionalParticleWidth),m=Ve(r.linkVisibility),g=Ve(r.linkDirectionalParticleColor||r.linkColor),y=r.ctx;y.save(),r.graphData.links.filter(m).forEach(function(x){var E=c(x);if(!(!x.hasOwnProperty("__photons")||!x.__photons.length)){var _=x.source,w=x.target;if(!(!_||!w||!_.hasOwnProperty("x")||!w.hasOwnProperty("x"))){var A=f(x),C=Math.abs(d(x)),O=x.__photons||[],T=Math.max(0,h(x)/2)/Math.sqrt(r.globalScale),N=g(x)||"rgba(0,0,0,0.28)";y.fillStyle=N;var M=x.__controlPoints?qT(ot,[_.x,_.y].concat(mn(x.__controlPoints),[w.x,w.y])):null,P=0,L=!1;O.forEach(function(D){var q=!!D.__singleHop;if(D.hasOwnProperty("__progressRatio")||(D.__progressRatio=q?0:(P+C)/E),!q&&P++,D.__progressRatio+=A,D.__progressRatio>=1)if(!q)D.__progressRatio=D.__progressRatio%1;else{L=!0;return}var z=D.__progressRatio,U=M?M.get(z):{x:_.x+(w.x-_.x)*z||0,y:_.y+(w.y-_.y)*z||0};r.linkDirectionalParticleCanvasObject?r.linkDirectionalParticleCanvasObject(U.x,U.y,x,y,r.globalScale):(y.beginPath(),y.arc(U.x,U.y,T,0,2*Math.PI,!1),y.fill())}),L&&(x.__photons=x.__photons.filter(function(D){return!D.__singleHop||D.__progressRatio<=1}))}}}),y.restore()}},emitParticle:function(r,n){return n&&(!n.__photons&&(n.__photons=[]),n.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:Nee().force("link",See()).force("charge",Mee()).force("center",SJ()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(r,n){n.ctx=r},update:function(r,n){r.engineRunning=!1,r.onUpdate(),r.nodeAutoColorBy!==null&&$T(r.graphData.nodes,Ve(r.nodeAutoColorBy),r.nodeColor),r.linkAutoColorBy!==null&&$T(r.graphData.links,Ve(r.linkAutoColorBy),r.linkColor),r.graphData.links.forEach(function(g){g.source=g[r.linkSource],g.target=g[r.linkTarget]}),r.forceLayout.stop().alpha(1).nodes(r.graphData.nodes);var a=r.forceLayout.force("link");a&&a.id(function(g){return g[r.nodeId]}).links(r.graphData.links);var i=r.dagMode&&ane(r.graphData,function(g){return g[r.nodeId]},{nodeFilter:r.dagNodeFilter,onLoopError:r.onDagError||void 0}),o=Math.max.apply(Math,mn(Object.values(i||[]))),s=r.dagLevelDistance||r.graphData.nodes.length/(o||1)*ine*(["radialin","radialout"].indexOf(r.dagMode)!==-1?.7:1);if(["lr","rl","td","bu"].includes(n.dagMode)){var c=["lr","rl"].includes(n.dagMode)?"fx":"fy";r.graphData.nodes.filter(r.dagNodeFilter).forEach(function(g){return delete g[c]})}if(["lr","rl","td","bu"].includes(r.dagMode)){var f=["rl","bu"].includes(r.dagMode),d=function(y){return(i[y[r.nodeId]]-o/2)*s*(f?-1:1)},h=["lr","rl"].includes(r.dagMode)?"fx":"fy";r.graphData.nodes.filter(r.dagNodeFilter).forEach(function(g){return g[h]=d(g)})}r.forceLayout.force("dagRadial",["radialin","radialout"].indexOf(r.dagMode)!==-1?Ree(function(g){var y=i[g[r.nodeId]]||-1;return(r.dagMode==="radialin"?o-y:y)*s}).strength(function(g){return r.dagNodeFilter(g)?1:0}):null);for(var m=0;m<r.warmupTicks&&!(r.d3AlphaMin>0&&r.forceLayout.alpha()<r.d3AlphaMin);m++)r.forceLayout.tick();this.resetCountdown(),r.onFinishUpdate()}});function PI(e,r){var n=e instanceof Array?e:[e],a=new r;return a._destructor&&a._destructor(),{linkProp:function(o){return{default:a[o](),onChange:function(c,f){n.forEach(function(d){return f[d][o](c)})},triggerUpdate:!1}},linkMethod:function(o){return function(s){for(var c=arguments.length,f=new Array(c>1?c-1:0),d=1;d<c;d++)f[d-1]=arguments[d];var h=[];return n.forEach(function(m){var g=s[m],y=g[o].apply(g,f);y!==g&&h.push(y)}),h.length?h[0]:this}}}}var one=800,lne=4,sne=5,DI=PI("forceGraph",Nh),une=PI(["forceGraph","shadowGraph"],Nh),cne=Object.assign.apply(Object,mn(["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 oc({},e,DI.linkProp(e))})).concat(mn(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(e){return oc({},e,une.linkProp(e))})))),fne=Object.assign.apply(Object,mn(["d3Force","d3ReheatSimulation","emitParticle"].map(function(e){return oc({},e,DI.linkMethod(e))})));function hy(e){if(e.canvas){var r=e.canvas.width,n=e.canvas.height;r===300&&n===150&&(r=n=0);var a=window.devicePixelRatio;r/=a,n/=a,[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*a,o.height=e.height*a,!r&&!n&&o.getContext("2d").scale(a,a)});var i=Yn(e.canvas).k;e.zoom.translateBy(e.zoom.__baseElem,(e.width-r)/2/i,(e.height-n)/2/i),e.needsRedraw=!0}}function LI(e){var r=window.devicePixelRatio;e.setTransform(r,0,0,r,0,0)}function UT(e,r,n){e.save(),LI(e),e.clearRect(0,0,r,n),e.restore()}var dne=WS({props:Il({width:{default:window.innerWidth,onChange:function(r,n){return hy(n)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(r,n){return hy(n)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(r,n){[r.nodes,r.links].every(function(i){return(i||[]).every(function(o){return!o.hasOwnProperty("__indexColor")})})&&n.colorTracker.reset(),[{type:"Node",objs:r.nodes},{type:"Link",objs:r.links}].forEach(a),n.forceGraph.graphData(r),n.shadowGraph.graphData(r);function a(i){var o=i.type,s=i.objs;s.filter(function(c){if(!c.hasOwnProperty("__indexColor"))return!0;var f=n.colorTracker.lookup(c.__indexColor);return!f||!f.hasOwnProperty("d")||f.d!==c}).forEach(function(c){c.__indexColor=n.colorTracker.register({type:o,d:c})})}},triggerUpdate:!1},backgroundColor:{onChange:function(r,n){n.canvas&&r&&(n.canvas.style.background=r)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(r,n){n.shadowGraph.nodeCanvasObject(r?function(a,i,o){return r(a,a.__indexColor,i,o)}:null),n.flushShadowCanvas&&n.flushShadowCanvas()},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(r,n){n.shadowGraph.linkCanvasObject(r?function(a,i,o){return r(a,a.__indexColor,i,o)}:null),n.flushShadowCanvas&&n.flushShadowCanvas()},triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(r,n){n.zoom.scaleExtent([r,n.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(r,n){n.zoom.scaleExtent([n.zoom.scaleExtent()[0],r])},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(r,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}},cne),aliases:{stopAnimation:"pauseAnimation"},methods:Il({graph2ScreenCoords:function(r,n,a){var i=Yn(r.canvas);return{x:n*i.k+i.x,y:a*i.k+i.y}},screen2GraphCoords:function(r,n,a){var i=Yn(r.canvas);return{x:(n-i.x)/i.k,y:(a-i.y)/i.k}},centerAt:function(r,n,a,i){if(!r.canvas)return null;if(n!==void 0||a!==void 0){var o=Object.assign({},n!==void 0?{x:n}:{},a!==void 0?{y:a}:{});return i?r.tweenGroup.add(new F5(s()).to(o,i).easing(To.Quadratic.Out).onUpdate(c).onComplete(function(){r.tweenGroup.remove(this)}).start()):c(o),this}return s();function s(){var f=Yn(r.canvas);return{x:(r.width/2-f.x)/f.k,y:(r.height/2-f.y)/f.k}}function c(f){var d=f.x,h=f.y;r.zoom.translateTo(r.zoom.__baseElem,d===void 0?s().x:d,h===void 0?s().y:h),r.needsRedraw=!0}},zoom:function(r,n,a){if(!r.canvas)return null;if(n!==void 0)return a?r.tweenGroup.add(new F5({k:i()}).to({k:n},a).easing(To.Quadratic.Out).onUpdate(function(s){var c=s.k;return o(c)}).onComplete(function(){r.tweenGroup.remove(this)}).start()):o(n),this;return i();function i(){return Yn(r.canvas).k}function o(s){r.zoom.scaleTo(r.zoom.__baseElem,s),r.needsRedraw=!0}},zoomToFit:function(r){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,i=arguments.length,o=new Array(i>3?i-3:0),s=3;s<i;s++)o[s-3]=arguments[s];var c=this.getGraphBbox.apply(this,o);if(c){var f={x:(c.x[0]+c.x[1])/2,y:(c.y[0]+c.y[1])/2},d=Math.max(1e-12,Math.min(1e12,(r.width-a*2)/(c.x[1]-c.x[0]),(r.height-a*2)/(c.y[1]-c.y[0])));this.centerAt(f.x,f.y,n),this.zoom(d,n)}return this},getGraphBbox:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0},a=Ve(r.nodeVal),i=function(c){return Math.sqrt(Math.max(0,a(c)||1))*r.nodeRelSize},o=r.graphData.nodes.filter(n).map(function(s){return{x:s.x,y:s.y,r:i(s)}});return o.length?{x:[gh(o,function(s){return s.x-s.r}),vh(o,function(s){return s.x+s.r})],y:[gh(o,function(s){return s.y-s.r}),vh(o,function(s){return s.y+s.r})]}:null},pauseAnimation:function(r){return r.animationFrameRequestId&&(cancelAnimationFrame(r.animationFrameRequestId),r.animationFrameRequestId=null),this},resumeAnimation:function(r){return r.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},fne),stateInit:function(){return{lastSetZoom:1,zoom:bZ(),forceGraph:new Nh,shadowGraph:new Nh().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new eJ,tweenGroup:new LL}},init:function(r,n){var a=this;r.innerHTML="";var i=document.createElement("div");i.classList.add("force-graph-container"),i.style.position="relative",r.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"),s=n.shadowCanvas.getContext("2d",{willReadFrequently:!0}),c={x:-1e12,y:-1e12},f=function(){var m=null,g=window.devicePixelRatio,y=c.x>0&&c.y>0?s.getImageData(c.x*g,c.y*g,1,1):null;return y&&(m=n.colorTracker.lookup(y.data)),m};pn(n.canvas).call(EX().subject(function(){if(!n.enableNodeDrag)return null;var h=f();return h&&h.type==="Node"?h.d:null}).on("start",function(h){var m=h.subject;m.__initialDragPos={x:m.x,y:m.y,fx:m.fx,fy:m.fy},h.active||(m.fx=m.x,m.fy=m.y),n.canvas.classList.add("grabbable")}).on("drag",function(h){var m=h.subject,g=m.__initialDragPos,y=h,x=Yn(n.canvas).k,E={x:g.x+(y.x-g.x)/x-m.x,y:g.y+(y.y-g.y)/x-m.y};["x","y"].forEach(function(_){return m["f".concat(_)]=m[_]=g[_]+(y[_]-g[_])/x}),!(!m.__dragged&&sne>=Math.sqrt(PZ(["x","y"].map(function(_){return Math.pow(h[_]-g[_],2)}))))&&(n.forceGraph.d3AlphaTarget(.3).resetCountdown(),n.isPointerDragging=!0,m.__dragged=!0,n.onNodeDrag(m,E))}).on("end",function(h){var m=h.subject,g=m.__initialDragPos,y={x:m.x-g.x,y:m.y-g.y};g.fx===void 0&&(m.fx=void 0),g.fy===void 0&&(m.fy=void 0),delete m.__initialDragPos,n.forceGraph.d3AlphaTarget()&&n.forceGraph.d3AlphaTarget(0).resetCountdown(),n.canvas.classList.remove("grabbable"),n.isPointerDragging=!1,m.__dragged&&(delete m.__dragged,n.onNodeDragEnd(m,y))})),n.zoom(n.zoom.__baseElem=pn(n.canvas)),n.zoom.__baseElem.on("dblclick.zoom",null),n.zoom.filter(function(h){return!h.button&&n.enableZoomPanInteraction&&(h.type!=="wheel"||Ve(n.enableZoomInteraction)(h))&&(h.type==="wheel"||Ve(n.enablePanInteraction)(h))}).on("zoom",function(h){var m=h.transform;[o,s].forEach(function(g){LI(g),g.translate(m.x,m.y),g.scale(m.k,m.k)}),n.isPointerDragging=!0,n.onZoom&&n.onZoom(Il(Il({},m),a.centerAt())),n.needsRedraw=!0}).on("end",function(h){n.isPointerDragging=!1,n.onZoomEnd&&n.onZoomEnd(Il(Il({},h.transform),a.centerAt()))}),hy(n),n.forceGraph.onNeedsRedraw(function(){return n.needsRedraw=!0}).onFinishUpdate(function(){Yn(n.canvas).k===n.lastSetZoom&&n.graphData.nodes.length&&(n.zoom.scaleTo(n.zoom.__baseElem,n.lastSetZoom=lne/Math.cbrt(n.graphData.nodes.length)),n.needsRedraw=!0)}),n.tooltip=new wJ(i),["pointermove","pointerdown"].forEach(function(h){return i.addEventListener(h,function(m){h==="pointerdown"&&(n.isPointerPressed=!0,n.pointerDownEvent=m),!n.isPointerDragging&&m.type==="pointermove"&&n.onBackgroundClick&&(m.pressure>0||n.isPointerPressed)&&(m.pointerType==="mouse"||m.movementX===void 0||[m.movementX,m.movementY].some(function(x){return Math.abs(x)>1}))&&(n.isPointerDragging=!0);var g=y(i);c.x=m.pageX-g.left,c.y=m.pageY-g.top;function y(x){var E=x.getBoundingClientRect(),_=window.pageXOffset||document.documentElement.scrollLeft,w=window.pageYOffset||document.documentElement.scrollTop;return{top:E.top+w,left:E.left+_}}},{passive:!0})}),i.addEventListener("pointerup",function(h){if(n.isPointerPressed){if(n.isPointerPressed=!1,n.isPointerDragging){n.isPointerDragging=!1;return}var m=[h,n.pointerDownEvent];requestAnimationFrame(function(){if(h.button===0)if(n.hoverObj){var g=n["on".concat(n.hoverObj.type,"Click")];g&&g.apply(void 0,[n.hoverObj.d].concat(m))}else n.onBackgroundClick&&n.onBackgroundClick.apply(n,m);if(h.button===2)if(n.hoverObj){var y=n["on".concat(n.hoverObj.type,"RightClick")];y&&y.apply(void 0,[n.hoverObj.d].concat(m))}else n.onBackgroundRightClick&&n.onBackgroundRightClick.apply(n,m)})}},{passive:!0}),i.addEventListener("contextmenu",function(h){return!n.onBackgroundRightClick&&!n.onNodeRightClick&&!n.onLinkRightClick?!0:(h.preventDefault(),!1)}),n.forceGraph(o),n.shadowGraph(s);var d=lQ(function(){UT(s,n.width,n.height),n.shadowGraph.linkWidth(function(m){return Ve(n.linkWidth)(m)+n.linkHoverPrecision});var h=Yn(n.canvas);n.shadowGraph.globalScale(h.k).tickFrame()},one);n.flushShadowCanvas=d.flush,(this._animationCycle=function h(){var m=!n.autoPauseRedraw||!!n.needsRedraw||n.forceGraph.isEngineRunning()||n.graphData.links.some(function(C){return C.__photons&&C.__photons.length});if(n.needsRedraw=!1,n.enablePointerInteraction){var g=n.isPointerDragging?null:f();if(g!==n.hoverObj){var y=n.hoverObj,x=y?y.type:null,E=g?g.type:null;if(x&&x!==E){var _=n["on".concat(x,"Hover")];_&&_(null,y.d)}if(E){var w=n["on".concat(E,"Hover")];w&&w(g.d,x===E?y.d:null)}n.tooltip.content(g&&Ve(n["".concat(g.type.toLowerCase(),"Label")])(g.d)||null),n.canvas.classList[(g&&n["on".concat(E,"Click")]||!g&&n.onBackgroundClick)&&Ve(n.showPointerCursor)(g==null?void 0:g.d)?"add":"remove"]("clickable"),n.hoverObj=g}m&&d()}if(m){UT(o,n.width,n.height);var A=Yn(n.canvas).k;n.onRenderFramePre&&n.onRenderFramePre(o,A),n.forceGraph.globalScale(A).tickFrame(),n.onRenderFramePost&&n.onRenderFramePost(o,A)}n.tweenGroup.update(),n.animationFrameRequestId=requestAnimationFrame(h)})()},update:function(r){}}),py={exports:{}},my,HT;function hne(){if(HT)return my;HT=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return my=e,my}var vy,GT;function pne(){if(GT)return vy;GT=1;var e=hne();function r(){}function n(){}return n.resetWarningCache=r,vy=function(){function a(s,c,f,d,h,m){if(m!==e){var g=new 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 g.name="Invariant Violation",g}}a.isRequired=a;function i(){return a}var o={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:i,element:a,elementType:a,instanceOf:i,node:a,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:r};return o.PropTypes=o,o},vy}var VT;function mne(){return VT||(VT=1,py.exports=pne()()),py.exports}var vne=mne();const J=In(vne),Pp={width:J.number,height:J.number,graphData:J.shape({nodes:J.arrayOf(J.object).isRequired,links:J.arrayOf(J.object).isRequired}),backgroundColor:J.string,nodeRelSize:J.number,nodeId:J.string,nodeLabel:J.oneOfType([J.string,J.func]),nodeVal:J.oneOfType([J.number,J.string,J.func]),nodeVisibility:J.oneOfType([J.bool,J.string,J.func]),nodeColor:J.oneOfType([J.string,J.func]),nodeAutoColorBy:J.oneOfType([J.string,J.func]),onNodeHover:J.func,onNodeClick:J.func,linkSource:J.string,linkTarget:J.string,linkLabel:J.oneOfType([J.string,J.func]),linkVisibility:J.oneOfType([J.bool,J.string,J.func]),linkColor:J.oneOfType([J.string,J.func]),linkAutoColorBy:J.oneOfType([J.string,J.func]),linkWidth:J.oneOfType([J.number,J.string,J.func]),linkCurvature:J.oneOfType([J.number,J.string,J.func]),linkDirectionalArrowLength:J.oneOfType([J.number,J.string,J.func]),linkDirectionalArrowColor:J.oneOfType([J.string,J.func]),linkDirectionalArrowRelPos:J.oneOfType([J.number,J.string,J.func]),linkDirectionalParticles:J.oneOfType([J.number,J.string,J.func]),linkDirectionalParticleSpeed:J.oneOfType([J.number,J.string,J.func]),linkDirectionalParticleOffset:J.oneOfType([J.number,J.string,J.func]),linkDirectionalParticleWidth:J.oneOfType([J.number,J.string,J.func]),linkDirectionalParticleColor:J.oneOfType([J.string,J.func]),onLinkHover:J.func,onLinkClick:J.func,dagMode:J.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:J.number,dagNodeFilter:J.func,onDagError:J.func,d3AlphaMin:J.number,d3AlphaDecay:J.number,d3VelocityDecay:J.number,warmupTicks:J.number,cooldownTicks:J.number,cooldownTime:J.number,onEngineTick:J.func,onEngineStop:J.func,getGraphBbox:J.func},II={zoomToFit:J.func,onNodeRightClick:J.func,onNodeDrag:J.func,onNodeDragEnd:J.func,onLinkRightClick:J.func,linkHoverPrecision:J.number,onBackgroundClick:J.func,onBackgroundRightClick:J.func,showPointerCursor:J.oneOfType([J.bool,J.func]),enablePointerInteraction:J.bool,enableNodeDrag:J.bool},kE={showNavInfo:J.bool,nodeOpacity:J.number,nodeResolution:J.number,nodeThreeObject:J.oneOfType([J.object,J.string,J.func]),nodeThreeObjectExtend:J.oneOfType([J.bool,J.string,J.func]),nodePositionUpdate:J.func,linkOpacity:J.number,linkResolution:J.number,linkCurveRotation:J.oneOfType([J.number,J.string,J.func]),linkMaterial:J.oneOfType([J.object,J.string,J.func]),linkThreeObject:J.oneOfType([J.object,J.string,J.func]),linkThreeObjectExtend:J.oneOfType([J.bool,J.string,J.func]),linkPositionUpdate:J.func,linkDirectionalArrowResolution:J.number,linkDirectionalParticleResolution:J.number,linkDirectionalParticleThreeObject:J.oneOfType([J.object,J.string,J.func]),forceEngine:J.oneOf(["d3","ngraph"]),ngraphPhysics:J.object,numDimensions:J.oneOf([1,2,3])},gne=Object.assign({},Pp,II,{linkLineDash:J.oneOfType([J.arrayOf(J.number),J.string,J.func]),nodeCanvasObjectMode:J.oneOfType([J.string,J.func]),nodeCanvasObject:J.func,nodePointerAreaPaint:J.func,linkCanvasObjectMode:J.oneOfType([J.string,J.func]),linkCanvasObject:J.func,linkPointerAreaPaint:J.func,linkDirectionalParticleCanvasObject:J.func,autoPauseRedraw:J.bool,minZoom:J.number,maxZoom:J.number,enableZoomInteraction:J.oneOfType([J.bool,J.func]),enablePanInteraction:J.oneOfType([J.bool,J.func]),onZoom:J.func,onZoomEnd:J.func,onRenderFramePre:J.func,onRenderFramePost:J.func});Object.assign({},Pp,II,kE,{enableNavigationControls:J.bool,controlType:J.oneOf(["trackball","orbit","fly"]),rendererConfig:J.object,extraRenderers:J.arrayOf(J.shape({render:J.func.isRequired}))});Object.assign({},Pp,kE,{nodeDesc:J.oneOfType([J.string,J.func]),linkDesc:J.oneOfType([J.string,J.func])});Object.assign({},Pp,kE,{markerAttrs:J.object,yOffset:J.number,glScale:J.number});const jE=LK(dne,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});jE.displayName="ForceGraph2D";jE.propTypes=gne;function Md(e){let r=e.trim().toLowerCase();return r.startsWith("fleet-")&&(r=r.slice(6)),r}const gy=16,yne=4,bne=14,xne=10;function _ne({edges:e,agents:r}){const n=k.useRef(void 0),a=k.useRef(null),[i,o]=k.useState({width:500,height:380}),s=k.useRef([]);k.useEffect(()=>{const w=a.current;if(!w)return;const A=new ResizeObserver(O=>{for(const T of O){const{width:N,height:M}=T.contentRect;N>0&&M>0&&o({width:Math.floor(N),height:Math.floor(M)})}});A.observe(w);const C=w.getBoundingClientRect();return C.width>0&&C.height>0&&o({width:Math.floor(C.width),height:Math.floor(C.height)}),()=>A.disconnect()},[]);const c=k.useMemo(()=>{const w=r.find(A=>{const C=Md(A.name);return C==="team-lead"||C==="coordinator"||C==="tl"});return(w==null?void 0:w.name)??(r.length>0?r[0].name:null)},[r]),f=k.useMemo(()=>{const w=r.map(O=>{const T=O.name===c;return{id:O.name,name:O.name,role:O.role,color:kc(O.name,O.role),isActive:O.isActive,isTL:T,...T?{fx:0,fy:-40}:{}}}),A=[],C=new Map;for(const O of r)C.set(Md(O.name),O.name);for(const O of e){const T=C.get(Md(O.sender))??O.sender,N=C.get(Md(O.recipient))??O.recipient,M=r.some(L=>L.name===T),P=r.some(L=>L.name===N);!M||!P||A.push({source:T,target:N,count:O.count,lastSummary:O.lastSummary})}return{nodes:w,links:A}},[r,e,c]);k.useEffect(()=>{const w=n.current;if(!w||!e.length)return;const A=s.current,C=new Map;for(const O of A)C.set(`${O.sender}->${O.recipient}`,O.count);for(const O of e){const T=`${O.sender}->${O.recipient}`,N=C.get(T)??0;if(O.count>N){const M=f.links.find(P=>{const L=typeof P.source=="object"?P.source.id:P.source,D=typeof P.target=="object"?P.target.id:P.target;return L===O.sender&&D===O.recipient});if(M)try{w.emitParticle(M)}catch{}}}s.current=e},[e,f.links]),k.useEffect(()=>{const w=n.current;if(!w||r.length===0)return;const A=w.d3Force("charge");A&&typeof A.strength=="function"&&A.strength(-200),w.d3Force("collide",_ee(gy+20)),w.d3Force("y",Pee(60).strength(.1)),w.d3ReheatSimulation()},[r.length]),k.useEffect(()=>{const w=n.current;if(!w||r.length===0)return;const A=setTimeout(()=>{w.zoomToFit(400,60)},500);return()=>clearTimeout(A)},[r.length]);const d=k.useCallback((w,A,C)=>{const O=w.x??0,T=w.y??0,N=gy,M=bne/C,P=xne/C;A.beginPath(),A.arc(O,T,N,0,2*Math.PI),A.fillStyle=w.color+"66",A.fill(),A.strokeStyle=w.isActive?w.color:"#484F58",A.lineWidth=2/C,A.stroke();const L=O+N*.65,D=T-N*.65,q=yne/C;A.beginPath(),A.arc(L,D,q,0,2*Math.PI),A.fillStyle=w.isActive?"#3FB950":"#484F58",A.fill(),A.strokeStyle="#0D1117",A.lineWidth=1.5/C,A.stroke(),A.font=`bold ${M}px sans-serif`,A.textAlign="center",A.textBaseline="middle",A.fillStyle=w.isActive?w.color:"#484F58",A.fillText(w.name.charAt(0).toUpperCase(),O,T),A.font=`${P}px sans-serif`,A.fillStyle="#8B949E",A.fillText(w.name,O,T+N+10/C),w.role&&(A.font=`${P*.85}px sans-serif`,A.fillStyle="#484F58",A.fillText(w.role,O,T+N+20/C))},[]),h=k.useCallback((w,A,C)=>{const O=w.x??0,T=w.y??0;C.beginPath(),C.arc(O,T,gy+4,0,2*Math.PI),C.fillStyle=A,C.fill()},[]),m=k.useCallback(w=>w.count>=9?3.5:w.count>=4?2:1,[]),g=k.useCallback(w=>"#8B949E",[]),y=k.useCallback(w=>null,[]),x=k.useCallback(w=>{const A=w.lastSummary?`<br/><i>${w.lastSummary}</i>`:"";return`<div style="padding:4px 8px;background:#161B22;border:1px solid #30363D;border-radius:4px;font-size:11px;color:#E6EDF3;">
109
+ <b>${typeof w.source=="object"?w.source.id:w.source}</b>
110
+ &rarr;
111
+ <b>${typeof w.target=="object"?w.target.id:w.target}</b>
112
+ <br/>${w.count} message${w.count!==1?"s":""}${A}
113
+ </div>`},[]),E=k.useCallback(w=>w.count>=6?3:w.count>=3?2:w.count>0?1:0,[]),_=k.useCallback(w=>6,[]);return r.length===0?b.jsx("div",{className:"flex items-center justify-center h-full text-dark-muted text-sm",children:"Waiting for agents to join the team..."}):b.jsx("div",{ref:a,className:"relative w-full h-full min-h-[300px]",children:b.jsx(jE,{ref:n,graphData:f,width:i.width,height:i.height,backgroundColor:"transparent",nodeCanvasObject:d,nodeCanvasObjectMode:()=>"replace",nodePointerAreaPaint:h,linkWidth:m,linkColor:g,linkLineDash:y,linkLabel:x,linkDirectionalParticles:E,linkDirectionalParticleWidth:3,linkDirectionalParticleSpeed:.005,linkDirectionalArrowLength:_,linkDirectionalArrowRelPos:1,linkDirectionalArrowColor:g,linkCurvature:.15,d3AlphaDecay:.02,d3VelocityDecay:.3,cooldownTicks:100,enableZoomInteraction:!0,enablePanInteraction:!0,enableNodeDrag:!0,minZoom:.5,maxZoom:4})})}function wne(e){if(e==null||e<0)return"0m";const r=Math.floor(e/60),n=Math.round(e%60);return r>0?`${r}h ${n}m`:`${n}m`}function Sne(){var xe;const{selectedTeamId:e,setSelectedTeamId:r,lastEvent:n,lastEventTeamId:a,isThinking:i}=Ec(),o=Ht(),[s,c]=k.useState(null),[f,d]=k.useState(!1),[h,m]=k.useState(null),[g,y]=k.useState(null),[x,E]=k.useState(null),[_,w]=k.useState(null),[A,C]=k.useState(0),[O,T]=k.useState([]),[N,M]=k.useState([]),[P,L]=k.useState("session-log"),[D,q]=k.useState([]),[z,U]=k.useState(!1),[$,Y]=k.useState(new Set),B=k.useRef(null),Z=k.useRef(null),ae=k.useRef(null),V=k.useRef(e),fe=e!==null;k.useEffect(()=>{V.current=e},[e]),k.useEffect(()=>{if(e==null){T([]);return}let ee=!1;async function le(){try{const be=await o.get(`teams/${e}/transitions`);ee||T(be)}catch{}}return le(),()=>{ee=!0}},[e,A,o]),k.useEffect(()=>{if(e==null){M([]);return}let ee=!1;async function le(){try{const be=await o.get(`teams/${e}/roster`);ee||M(be)}catch{}}return le(),()=>{ee=!0}},[e,A,o]),k.useEffect(()=>{if(e==null){q([]);return}let ee=!1;async function le(){try{const be=await o.get(`teams/${e}/messages/summary`);ee||q(be)}catch{}}return le(),()=>{ee=!0}},[e,A,o]),k.useEffect(()=>{L("session-log"),U(!1),Y(new Set)},[e]),k.useEffect(()=>{((s==null?void 0:s.status)==="done"||(s==null?void 0:s.status)==="failed")&&U(!0)},[s==null?void 0:s.status]),k.useEffect(()=>{if(e==null){c(null);return}let ee=!1;async function le(){d(!0),m(null);try{const be=await o.get(`teams/${e}`);ee||c(be)}catch(be){ee||m(be instanceof Error?be.message:"Failed to load team detail")}finally{ee||d(!1)}}return le(),()=>{ee=!0}},[e,o]),k.useEffect(()=>{if(e==null||!n||a!==e)return;ae.current&&clearTimeout(ae.current);const ee=e;return ae.current=setTimeout(async()=>{try{const le=await o.get(`teams/${ee}`);V.current===ee&&(c(le),C(be=>be+1))}catch{}},2e3),()=>{ae.current&&(clearTimeout(ae.current),ae.current=null)}},[n,a,e,o]);const F=k.useCallback(()=>{r(null)},[r]);k.useEffect(()=>{function ee(le){le.key==="Escape"&&fe&&F()}return document.addEventListener("keydown",ee),()=>document.removeEventListener("keydown",ee)},[fe,F]);const X=k.useCallback(ee=>{Z.current&&!Z.current.contains(ee.target)&&F()},[F]),ce=k.useCallback(async ee=>{if(!e||g)return;const le=e;y(ee);try{if(await o.post(`teams/${le}/${ee}`),V.current!==le)return;const be=await o.get(`teams/${le}`);if(V.current!==le)return;c(be),C(he=>he+1)}catch{}finally{y(null)}},[e,g,o]),G=k.useCallback(async ee=>{if(!(!e||!s||x)){E(ee);try{let be;const he=B.current;he&&Date.now()-he.fetchedAt<6e4?be=he.data:(be=await o.get("message-templates"),B.current={data:be,fetchedAt:Date.now()});const Se=be.find(ne=>ne.id===ee);if(!Se||!Se.enabled)return;let se=Se.template;se=se.replace(/\{\{ISSUE_NUMBER\}\}/g,String(s.issueNumber)),s.prNumber&&(se=se.replace(/\{\{PR_NUMBER\}\}/g,String(s.prNumber))),await o.post(`teams/${e}/send-message`,{message:se}),w(ee),setTimeout(()=>w(ne=>ne===ee?null:ne),1500)}catch{}finally{E(null)}}},[e,s,x,o]),H=(s==null?void 0:s.status)==="running"||(s==null?void 0:s.status)==="idle"||(s==null?void 0:s.status)==="stuck"||(s==null?void 0:s.status)==="launching",te=(s==null?void 0:s.status)==="failed",W=s!=null&&s.pr&&s.pr.state!=="merged"&&s.pr.state!=="closed"?s.pr.mergeStatus??null:null;return b.jsxs(b.Fragment,{children:[fe&&b.jsx("div",{className:"fixed inset-0 bg-black/40 z-40 transition-opacity",onClick:X,"aria-hidden":"true"}),b.jsxs("div",{ref:Z,className:`fixed top-0 right-0 h-full w-[960px] max-w-full bg-dark-surface border-l border-dark-border z-50 flex flex-col shadow-2xl transition-transform duration-300 ease-in-out ${fe?"translate-x-0":"translate-x-full"}`,children:[b.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-dark-border shrink-0",children:[b.jsx("h2",{className:"text-lg font-semibold text-dark-text truncate",children:"Team Detail"}),b.jsx("button",{onClick:F,className:"text-dark-muted hover:text-dark-text transition-colors p-1 rounded hover:bg-dark-border/30",title:"Close panel (Esc)",children:b.jsx("svg",{className:"w-5 h-5",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),b.jsxs("div",{className:"flex-1 flex flex-col min-h-0",children:[f&&!s&&b.jsx("div",{className:"flex items-center justify-center py-16",children:b.jsx("span",{className:"text-dark-muted",children:"Loading..."})}),h&&!s&&b.jsx("div",{className:"flex items-center justify-center py-16",children:b.jsx("span",{className:"text-[#F85149]",children:h})}),s&&b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"shrink-0",children:[b.jsxs("div",{className:"flex items-center justify-between px-5 py-3 cursor-pointer hover:bg-dark-border/10 transition-colors",onClick:()=>U(ee=>!ee),children:[b.jsxs("h3",{className:"text-base font-semibold text-dark-text",children:[b.jsxs("span",{className:"text-dark-muted mr-1.5",children:["#",s.issueNumber]}),s.issueTitle??"Untitled"]}),b.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[b.jsx(LS,{status:s.status}),b.jsx("svg",{className:`w-4 h-4 text-dark-muted transition-transform duration-200 ${z?"":"rotate-180"}`,viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z",clipRule:"evenodd"})})]})]}),b.jsx("div",{className:`overflow-y-auto custom-scrollbar transition-all duration-200 ${z?"max-h-0 overflow-hidden":"max-h-[2000px]"}`,children:b.jsxs("div",{className:"px-5 pb-4 space-y-4",children:[b.jsxs("section",{children:[b.jsxs("div",{className:"flex items-center gap-4 mt-3 text-sm",children:[b.jsxs("span",{className:"text-dark-muted",children:["Duration: ",b.jsx("span",{className:"text-dark-text",children:wne(s.durationMin)})]}),s.lastEventAt&&!te&&b.jsxs("span",{className:"text-dark-muted",children:["Last activity: ",b.jsx("span",{className:"text-dark-text",children:(()=>{const ee=Math.floor((Date.now()-new Date(s.lastEventAt).getTime())/6e4);return ee<1?"just now":`${ee}m ago`})()})]})]}),b.jsxs("div",{className:"mt-2 text-xs text-dark-muted",children:[b.jsxs("span",{children:["Worktree: ",s.worktreeName]}),s.branchName&&b.jsxs("span",{className:"ml-3",children:["Branch: ",s.branchName]}),b.jsxs("span",{className:"ml-3",children:["Model: ",s.model??"—"]})]}),s.totalInputTokens+s.totalOutputTokens>0&&b.jsxs("div",{className:"mt-3 flex items-center gap-4 text-sm",children:[b.jsxs("span",{className:"text-dark-muted",children:["Input: ",b.jsx("span",{className:"text-dark-text",children:s.totalInputTokens.toLocaleString()})]}),b.jsxs("span",{className:"text-dark-muted",children:["Output: ",b.jsx("span",{className:"text-dark-text",children:s.totalOutputTokens.toLocaleString()})]}),s.totalCacheCreationTokens+s.totalCacheReadTokens>0&&b.jsxs("span",{className:"text-dark-muted",children:["Cache: ",b.jsx("span",{className:"text-dark-text",children:(s.totalCacheCreationTokens+s.totalCacheReadTokens).toLocaleString()})]}),s.totalCostUsd>0&&b.jsxs("span",{className:"text-dark-muted",children:["Cost: ",b.jsxs("span",{className:"text-[#3FB950]",children:["$",s.totalCostUsd.toFixed(4)]})]})]})]}),O.length>0&&b.jsxs("section",{className:"min-w-0",children:[b.jsx("h4",{className:"text-sm font-semibold text-dark-text mb-2 border-b border-dark-border/50 pb-1",children:"State Transitions"}),b.jsx("div",{className:"flex items-center gap-0 overflow-x-auto pb-1 custom-scrollbar max-w-full",children:O.map((ee,le)=>{const be=le===0,he=Zn[ee.toStatus]??"#8B949E",Se=(()=>{try{return new Date(ee.createdAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch{return""}})();return b.jsxs("div",{className:"flex items-center shrink-0",children:[be&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"flex flex-col items-center",children:b.jsx("span",{className:"text-[10px] font-medium px-1.5 py-0.5 rounded",style:{color:Zn[ee.fromStatus]??"#8B949E",backgroundColor:(Zn[ee.fromStatus]??"#8B949E")+"18"},children:ee.fromStatus})}),b.jsx("svg",{className:"w-3 h-3 text-dark-muted shrink-0 mx-0.5",viewBox:"0 0 12 12",fill:"currentColor",children:b.jsx("path",{d:"M4.5 2l4 4-4 4",stroke:"currentColor",strokeWidth:"1.5",fill:"none"})})]}),b.jsxs("div",{className:"flex flex-col items-center group relative",children:[b.jsx("span",{className:"text-[10px] font-medium px-1.5 py-0.5 rounded",style:{color:he,backgroundColor:he+"18"},children:ee.toStatus}),b.jsx("span",{className:"text-[9px] text-dark-muted mt-0.5 leading-none",children:Se}),ee.reason&&b.jsx("div",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-1.5 px-2 py-1 bg-dark-surface border border-dark-border rounded text-[10px] text-dark-text whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none z-10 shadow-lg max-w-[240px] truncate",children:ee.reason})]}),le<O.length-1&&b.jsx("svg",{className:"w-3 h-3 text-dark-muted shrink-0 mx-0.5",viewBox:"0 0 12 12",fill:"currentColor",children:b.jsx("path",{d:"M4.5 2l4 4-4 4",stroke:"currentColor",strokeWidth:"1.5",fill:"none"})})]},ee.id)})})]}),s.pr&&b.jsxs("section",{children:[b.jsx("h4",{className:"text-sm font-semibold text-dark-text mb-2 border-b border-dark-border/50 pb-1",children:"Pull Request"}),b.jsxs("div",{className:"flex items-center gap-3 mb-3 text-sm",children:[b.jsxs("span",{className:"text-dark-accent font-medium",children:["PR #",s.pr.number]}),b.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded border",style:{color:s.pr.state==="merged"?"#A371F7":s.pr.state==="open"?"#3FB950":s.pr.state==="closed"?"#F85149":"#8B949E",borderColor:(s.pr.state==="merged"?"#A371F7":s.pr.state==="open"?"#3FB950":s.pr.state==="closed"?"#F85149":"#8B949E")+"40"},children:((xe=s.pr.state)==null?void 0:xe.toUpperCase())??"UNKNOWN"}),W&&b.jsxs("span",{className:"text-xs text-dark-muted",children:["Merge: ",W]}),s.pr.autoMerge&&b.jsx("span",{className:"text-xs text-[#3FB950]",children:"Auto-merge"})]}),b.jsxs("div",{className:"ml-1",children:[b.jsx("p",{className:"text-xs text-dark-muted mb-1.5 uppercase tracking-wide",children:"CI Checks"}),b.jsx("div",{className:"max-h-[120px] overflow-y-auto custom-scrollbar",children:b.jsx(Z6,{checks:s.pr.checks??[]})})]})]}),!s.pr&&s.prNumber&&b.jsxs("section",{children:[b.jsx("h4",{className:"text-sm font-semibold text-dark-text mb-2 border-b border-dark-border/50 pb-1",children:"Pull Request"}),b.jsxs("p",{className:"text-sm text-dark-muted",children:["PR #",s.prNumber," (details loading...)"]})]})]})})]}),b.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",children:[b.jsxs("div",{className:"shrink-0 flex items-center gap-0 px-5 border-b border-dark-border",children:[b.jsx("button",{onClick:()=>L("session-log"),className:`px-3 py-2 text-sm font-medium border-b-2 transition-colors ${P==="session-log"?"border-dark-accent text-dark-text":"border-transparent text-dark-muted hover:text-dark-text"}`,children:"Session Log"}),b.jsx("button",{onClick:()=>L("team"),className:`px-3 py-2 text-sm font-medium border-b-2 transition-colors ${P==="team"?"border-dark-accent text-dark-text":"border-transparent text-dark-muted hover:text-dark-text"}`,children:"Team"})]}),P==="session-log"&&b.jsx("div",{className:"flex-1 min-h-0 flex flex-col px-5 py-3",children:b.jsx("div",{className:"flex-1 min-h-0 flex flex-col",children:b.jsx(vK,{teamId:s.id,teamStatus:s.status,isThinking:i(s.id),roster:N,agentFilters:$,onAgentFiltersChange:Y})})}),P==="team"&&b.jsx("div",{className:"flex-1 min-h-0 px-5 py-3",children:b.jsx(_ne,{edges:D,agents:N})})]}),b.jsxs("div",{className:"shrink-0 border-t border-dark-border px-5 py-4 space-y-4",children:[b.jsx(gK,{teamId:s.id,disabled:!H}),b.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[b.jsx("span",{className:"text-xs text-dark-muted mr-1",children:"Quick:"}),[{id:"nudge_progress",label:"Status?",color:"#58A6FF"},{id:"check_ci",label:"Fix CI",color:"#F85149",show:!!(s!=null&&s.prNumber)}].filter(ee=>ee.show!==!1).map(ee=>b.jsx("button",{onClick:()=>G(ee.id),disabled:!H||x!==null,className:"px-2.5 py-1 text-xs rounded-full border transition-colors disabled:opacity-40",style:{color:ee.color,borderColor:ee.color+"40"},title:`Send "${ee.label}" message to TL`,children:x===ee.id?"...":_===ee.id?"Sent!":ee.label},ee.id))]}),b.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[H&&b.jsx("button",{onClick:()=>ce("stop"),disabled:g!==null,className:"px-3 py-1.5 text-sm rounded border border-[#F85149]/40 text-[#F85149] hover:bg-[#F85149]/10 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:g==="stop"?"Stopping...":"Stop"}),te&&b.jsx("button",{onClick:()=>ce("resume"),disabled:g!==null,className:"px-3 py-1.5 text-sm rounded border border-[#3FB950]/40 text-[#3FB950] hover:bg-[#3FB950]/10 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:g==="resume"?"Resuming...":"Resume"}),(s==null?void 0:s.status)!=="done"&&b.jsx("button",{onClick:()=>ce("restart"),disabled:g!==null,className:"px-3 py-1.5 text-sm rounded border border-dark-accent/40 text-dark-accent hover:bg-dark-accent/10 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:g==="restart"?"Restarting...":"Restart"}),b.jsxs("button",{onClick:()=>{window.open(`/api/teams/${s.id}/export?format=txt`,"_blank")},className:"px-3 py-1.5 text-sm rounded border border-dark-muted/40 text-dark-muted hover:text-dark-text hover:bg-dark-border/30 transition-colors flex items-center gap-1.5",title:"Export team log as text file",children:[b.jsxs("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"currentColor",children:[b.jsx("path",{d:"M2.75 14A1.75 1.75 0 0 1 1 12.25v-2.5a.75.75 0 0 1 1.5 0v2.5c0 .138.112.25.25.25h10.5a.25.25 0 0 0 .25-.25v-2.5a.75.75 0 0 1 1.5 0v2.5A1.75 1.75 0 0 1 13.25 14Z"}),b.jsx("path",{d:"M7.25 7.689V2a.75.75 0 0 1 1.5 0v5.689l1.97-1.969a.749.749 0 1 1 1.06 1.06l-3.25 3.25a.749.749 0 0 1-1.06 0L4.22 6.78a.749.749 0 1 1 1.06-1.06l1.97 1.969Z"})]}),"Export Log"]})]})]})]})]})]})]})}const Ene={open:{color:"#3FB950",label:"OPEN"},merged:{color:"#A371F7",label:"MERGED"},closed:{color:"#8B949E",label:"CLOSED"},draft:{color:"#8B949E",label:"DRAFT"}},kne={clean:"#3FB950",behind:"#D29922",blocked:"#F85149",dirty:"#F85149",unstable:"#D29922",has_hooks:"#D29922",draft:"#8B949E",unknown:"#8B949E"};function jne({prNumber:e,teamId:r,onClose:n,githubRepo:a}){const i=Ht(),[o,s]=k.useState(null),[c,f]=k.useState(!0),[d,h]=k.useState(null),[m,g]=k.useState(null),y=k.useRef(null);k.useEffect(()=>{let N=!1;async function M(){f(!0),h(null);try{const P=await i.get(`teams/${r}`);N||s(P)}catch(P){N||h(P instanceof Error?P.message:"Failed to load PR detail")}finally{N||f(!1)}}return M(),()=>{N=!0}},[r,i]),k.useEffect(()=>{function N(M){M.key==="Escape"&&n()}return document.addEventListener("keydown",N),()=>document.removeEventListener("keydown",N)},[n]),k.useEffect(()=>{function N(P){y.current&&!y.current.contains(P.target)&&n()}const M=setTimeout(()=>{document.addEventListener("mousedown",N)},0);return()=>{clearTimeout(M),document.removeEventListener("mousedown",N)}},[n]);const x=k.useCallback(async N=>{if(m)return;const M=N?"enable-auto-merge":"disable-auto-merge";g(M);try{await i.post(`prs/${e}/${M}`);const P=await i.get(`teams/${r}`);s(P)}catch{}finally{g(null)}},[m,i,e,r]),E=k.useCallback(async()=>{if(!m){g("update-branch");try{await i.post(`prs/${e}/update-branch`);const N=await i.get(`teams/${r}`);s(N)}catch{}finally{g(null)}}},[m,i,e,r]),_=(o==null?void 0:o.pr)??null,w=a??(o==null?void 0:o.githubRepo)??null,A=w&&_?`https://github.com/${w}/pull/${_.number}`:null,C=Ene[(_==null?void 0:_.state)??""]??{color:"#8B949E",label:"UNKNOWN"},O=kne[((_==null?void 0:_.mergeStatus)??"unknown").toLowerCase()]??"#8B949E",T=(_==null?void 0:_.state)==="open";return b.jsxs("div",{ref:y,className:"absolute top-full left-0 mt-1.5 z-50 w-[360px] bg-[#1C2128] border border-dark-border rounded-lg shadow-2xl",onClick:N=>N.stopPropagation(),children:[c&&b.jsx("div",{className:"flex items-center justify-center py-8",children:b.jsx("span",{className:"text-dark-muted text-sm",children:"Loading PR details..."})}),d&&!c&&b.jsx("div",{className:"flex items-center justify-center py-8",children:b.jsx("span",{className:"text-[#F85149] text-sm",children:d})}),!c&&!d&&_&&b.jsxs("div",{className:"p-4 space-y-3",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[A?b.jsxs("a",{href:A,target:"_blank",rel:"noopener noreferrer",onClick:N=>N.stopPropagation(),className:"text-sm font-semibold text-dark-accent hover:underline",children:["PR #",_.number]}):b.jsxs("span",{className:"text-sm font-semibold text-dark-accent",children:["PR #",_.number]}),b.jsx("button",{onClick:n,className:"text-dark-muted hover:text-dark-text transition-colors p-0.5 rounded hover:bg-dark-border/30",title:"Close",children:b.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),b.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[b.jsx("span",{className:"text-xs font-medium px-2 py-0.5 rounded border",style:{color:C.color,borderColor:C.color+"40",backgroundColor:C.color+"10"},children:C.label}),_.mergeStatus&&_.state!=="merged"&&_.state!=="closed"&&b.jsx("span",{className:"text-xs px-2 py-0.5 rounded border",style:{color:O,borderColor:O+"40",backgroundColor:O+"10"},children:_.mergeStatus.toUpperCase()}),_.autoMerge&&b.jsxs("span",{className:"text-xs text-[#3FB950] flex items-center gap-1",children:[b.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M5.22 14.78a.75.75 0 001.06 0l7.22-7.22v5.69a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75h-7.5a.75.75 0 000 1.5h5.69l-7.22 7.22a.75.75 0 000 1.06z"})}),"Auto-merge"]})]}),b.jsxs("div",{children:[b.jsxs("p",{className:"text-xs text-dark-muted mb-1.5 uppercase tracking-wide font-medium",children:["CI Checks",_.ciFailCount>0&&b.jsxs("span",{className:"ml-1.5 text-[#F85149] normal-case",children:["(",_.ciFailCount," failing)"]})]}),b.jsx("div",{className:"max-h-[200px] overflow-y-auto custom-scrollbar",children:b.jsx(Z6,{checks:_.checks??[]})})]}),T&&b.jsx("div",{className:"pt-2 border-t border-dark-border/50",children:b.jsxs("div",{className:"flex items-center gap-2",children:[_.autoMerge?b.jsx("button",{onClick:()=>x(!1),disabled:m!==null,className:"px-2.5 py-1 text-xs rounded border border-dark-border text-dark-muted hover:text-[#F85149] hover:border-[#F85149]/50 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:m==="disable-auto-merge"?"Disabling...":"Disable Auto-merge"}):b.jsx("button",{onClick:()=>x(!0),disabled:m!==null,className:"px-2.5 py-1 text-xs rounded border border-[#3FB950]/40 text-[#3FB950] hover:bg-[#3FB950]/10 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:m==="enable-auto-merge"?"Enabling...":"Enable Auto-merge"}),b.jsx("button",{onClick:E,disabled:m!==null,className:"px-2.5 py-1 text-xs rounded border border-dark-accent/40 text-dark-accent hover:bg-dark-accent/10 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:m==="update-branch"?"Updating...":"Update Branch"})]})})]}),!c&&!d&&!_&&b.jsx("div",{className:"flex items-center justify-center py-8",children:b.jsxs("span",{className:"text-dark-muted text-sm",children:["PR #",e," details not available"]})})]})}const KT={passing:{icon:"✓",color:"#3FB950"},failing:{icon:"✕",color:"#F85149"},pending:{icon:"○",color:"#D29922"},none:{icon:"—",color:"#8B949E"}},Ane={open:"#3FB950",merged:"#A371F7",closed:"#8B949E",draft:"#8B949E"};function zI({prNumber:e,ciStatus:r,teamId:n,prState:a,githubRepo:i}){const[o,s]=k.useState(!1),[c,f]=k.useState(!1),d=k.useCallback(E=>{E.stopPropagation(),e!=null&&n!=null&&s(_=>!_)},[e,n]),h=k.useCallback(()=>{s(!1)},[]);if(e==null)return b.jsx("span",{className:"text-dark-muted text-sm",children:"—"});const m=a==="merged"?{icon:"✓",color:"#A371F7"}:KT[r??"none"]??KT.none,g=n!=null,y=Ane[a??""]??"#8B949E",x=a?a.toUpperCase():null;return b.jsxs("span",{className:"relative inline-flex items-center gap-1.5",children:[b.jsxs("button",{type:"button",onClick:d,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:`inline-flex items-center gap-1.5 ${g?"cursor-pointer hover:bg-dark-border/30 rounded px-1.5 py-0.5 -mx-1.5 -my-0.5 transition-colors":""}`,title:g?"Click to view PR details":void 0,children:[b.jsxs("span",{className:"text-sm text-dark-accent",children:["#",e]}),b.jsx("span",{className:"text-sm font-bold",style:{color:m.color},children:m.icon})]}),c&&!o&&x&&b.jsx("span",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-1.5 px-2 py-0.5 text-xs rounded whitespace-nowrap bg-[#1C2128] border border-dark-border shadow-lg pointer-events-none",style:{color:y},children:x}),o&&n!=null&&b.jsx(jne,{prNumber:e,teamId:n,onClose:h,githubRepo:i})]})}function Cne(e){if(e<0)return"0m";const r=Math.floor(e/60),n=Math.round(e%60);return r>0?`${r}h ${n}m`:`${n}m`}function One(e,r){return e.length<=r?e:e.slice(0,r-1)+"…"}function Rd(e){return e<1e3?String(e):e<1e6?(e/1e3).toFixed(e<1e4?1:0)+"K":(e/1e6).toFixed(1)+"M"}function Tne({team:e,selected:r,onClick:n}){const a=Ht(),{isThinking:i}=Ec(),[o,s]=k.useState(!1),[c,f]=k.useState(!1),d=i(e.id),h=async w=>{if(w.stopPropagation(),!o){s(!0);try{await a.post(`teams/${e.id}/stop`)}catch{}finally{s(!1)}}},m=async w=>{if(w.stopPropagation(),!c){f(!0);try{await a.post(`teams/${e.id}/force-launch`)}catch{}finally{f(!1)}}},g=e.status==="running"||e.status==="stuck"||e.status==="idle"||e.status==="launching",y=e.issueTitle?One(e.issueTitle,40):"Untitled",x=e.status==="done"||e.status==="failed";let E="—",_="text-dark-muted";if(e.lastEventAt&&!x){const w=Date.now()-new Date(e.lastEventAt).getTime(),A=Math.floor(w/6e4);A<1?(E="just now",_="text-[#3FB950]"):A<5?(E=`${A}m ago`,_="text-[#3FB950]"):A<15?(E=`${A}m ago`,_="text-[#D29922]"):(E=`${A}m ago`,_="text-[#F85149]")}return b.jsxs("tr",{onClick:n,className:`h-16 border-b border-dark-border cursor-pointer transition-colors group ${r?"bg-dark-accent/10":"bg-dark-surface hover:bg-[#1C2128]"}`,children:[b.jsx("td",{className:"px-4 whitespace-nowrap",children:b.jsx(LS,{status:e.status})}),b.jsx("td",{className:"px-4 whitespace-nowrap",children:b.jsx("span",{className:"text-sm text-dark-muted",children:e.projectName??"—"})}),b.jsx("td",{className:"px-4 whitespace-nowrap",children:b.jsxs("span",{className:"text-sm",children:[b.jsxs("span",{className:"text-dark-muted mr-1.5",children:["#",e.issueNumber]}),b.jsx("span",{className:"text-dark-text",children:y})]})}),b.jsx("td",{className:"px-4 whitespace-nowrap",children:b.jsx("span",{className:"text-sm text-dark-muted",children:e.model??"—"})}),b.jsx("td",{className:"px-4 whitespace-nowrap",children:b.jsx("span",{className:"text-sm text-dark-muted",children:Cne(e.durationMin??0)})}),b.jsx("td",{className:"px-4 whitespace-nowrap",children:d?b.jsxs("span",{className:"inline-flex items-center gap-1.5 text-sm text-[#E8976C]",children:[b.jsx("span",{className:"inline-block w-2 h-2 rounded-full bg-[#E8976C] animate-thinking-dot"}),"thinking..."]}):b.jsx("span",{className:`text-sm ${_}`,title:e.lastEventAt??void 0,children:E})}),b.jsx("td",{className:"px-4 whitespace-nowrap",children:e.totalInputTokens+e.totalOutputTokens>0?b.jsx("span",{className:"text-sm text-dark-muted",title:`Input: ${Rd(e.totalInputTokens)}, Output: ${Rd(e.totalOutputTokens)}, Cache: ${Rd(e.totalCacheCreationTokens+e.totalCacheReadTokens)}`,children:Rd(e.totalInputTokens+e.totalOutputTokens)}):b.jsx("span",{className:"text-sm text-dark-muted",children:"—"})}),b.jsx("td",{className:"px-4 whitespace-nowrap",children:b.jsx(zI,{prNumber:e.prNumber,ciStatus:e.ciStatus,teamId:e.id,prState:e.prState,githubRepo:e.githubRepo})}),b.jsx("td",{className:"px-4 whitespace-nowrap",children:b.jsxs("span",{className:"inline-flex items-center gap-2 opacity-0 group-hover:opacity-100 transition-opacity",children:[e.status==="queued"&&b.jsx("button",{onClick:m,disabled:c,className:"px-2 py-1 text-xs rounded border border-dark-border text-dark-muted hover:text-[#D29922] hover:border-[#D29922]/50 transition-colors disabled:opacity-50",title:"Launch immediately despite usage limit",children:c?"Launching…":"Force Launch"}),g&&b.jsx("button",{onClick:h,disabled:o,className:"px-2 py-1 text-xs rounded border border-dark-border text-dark-muted hover:text-[#F85149] hover:border-[#F85149]/50 transition-colors disabled:opacity-50",title:"Stop team",children:o?"Stopping…":"Stop"})]})})]})}const Nne=["Status","Project","Issue","Model","Duration","Activity","Tokens","PR","Actions"];function Mne({teams:e,selectedTeamId:r,onSelectTeam:n}){return b.jsx("div",{className:"w-full overflow-x-auto",children:b.jsxs("table",{className:"w-full table-auto",children:[b.jsx("thead",{children:b.jsx("tr",{className:"border-b border-dark-border",children:Nne.map(a=>b.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium text-dark-muted uppercase tracking-wider",children:a},a))})}),b.jsx("tbody",{children:e.map(a=>b.jsx(Tne,{team:a,selected:r===a.id,onClick:()=>n(a.id)},a.id))})]})})}function YT(e){if(e<1)return"<1m";const r=Math.floor(e/60),n=Math.round(e%60);return r>0?`${r}h ${n}m`:`${n}m`}function Rne(e,r){return e.toLocaleTimeString([],{hour12:!1,hour:"2-digit",minute:"2-digit"})}function Pne(e,r){return e.length<=r?e:e.slice(0,r-1)+"…"}function Dne({teams:e}){const[r,n]=k.useState(null),[a,i]=k.useState(()=>Date.now());k.useEffect(()=>{const d=setInterval(()=>i(Date.now()),15e3);return()=>clearInterval(d)},[]);const o=k.useMemo(()=>e.filter(d=>d.launchedAt).map(d=>{const h=new Date(d.launchedAt).getTime(),m=d.status==="running"||d.status==="launching"||d.status==="idle"||d.status==="stuck",g=(d.durationMin??0)*6e4,y=m?a:h+g;return{team:d,startMs:h,endMs:y,isRunning:m}}).sort((d,h)=>d.startMs-h.startMs),[e,a]),{rangeStart:s,rangeTotal:c}=k.useMemo(()=>{if(o.length===0)return{rangeStart:a-36e5,rangeTotal:36e5};const d=Math.min(...o.map(y=>y.startMs)),m=Math.max(...o.map(y=>y.endMs),a)-d||36e5,g=m*.05;return{rangeStart:d-g,rangeTotal:m+g*2}},[o,a]),f=k.useMemo(()=>{const h=c/5,m=[];for(let g=0;g<6;g++){const y=s+h*g,x=(y-s)/c*100;m.push({pct:x,text:Rne(new Date(y))})}return m},[s,c,a]);return o.length===0?b.jsx("div",{className:"flex items-center justify-center h-40 text-dark-muted text-sm",children:"No teams with timeline data"}):b.jsx("div",{className:"w-full overflow-x-auto",children:b.jsxs("div",{className:"min-w-[600px]",children:[o.map(({team:d,startMs:h,endMs:m,isRunning:g})=>{const y=(h-s)/c*100,x=(m-h)/c*100,E=Math.max(x,.5),_=Zn[d.status]??"#8B949E",w=r===d.id,A=d.issueTitle?Pne(d.issueTitle,30):"Untitled";return b.jsxs("div",{className:"flex items-center h-8 group",onMouseEnter:()=>n(d.id),onMouseLeave:()=>n(null),children:[b.jsxs("div",{className:"w-[120px] min-w-[120px] pr-2 text-right text-xs text-dark-muted truncate shrink-0",children:["#",d.issueNumber]}),b.jsxs("div",{className:"relative flex-1 h-5 bg-dark-base rounded overflow-visible",children:[b.jsx("div",{className:`absolute top-0 h-full rounded transition-opacity ${g?"timeline-bar-pulse":""}`,style:{left:`${y}%`,width:`${E}%`,backgroundColor:_,opacity:w?1:.8},children:E>8&&b.jsxs("span",{className:"absolute inset-0 flex items-center px-1.5 text-[10px] font-medium text-dark-base truncate",children:["#",d.issueNumber," ",YT(d.durationMin??0)]})}),w&&b.jsxs("div",{className:"absolute z-50 bottom-full mb-1 px-2.5 py-1.5 rounded bg-dark-surface border border-dark-border text-xs text-dark-text whitespace-nowrap shadow-lg pointer-events-none",style:{left:`${Math.min(y+E/2,90)}%`,transform:"translateX(-50%)"},children:[b.jsxs("div",{className:"font-medium",children:["#",d.issueNumber," ",A]}),b.jsxs("div",{className:"text-dark-muted mt-0.5",children:[d.status," · ",YT(d.durationMin??0)]}),d.prNumber&&b.jsxs("div",{className:"text-dark-muted",children:["PR #",d.prNumber," · CI: ",d.ciStatus??"none"]})]})]})]},d.id)}),b.jsxs("div",{className:"flex items-center h-6 mt-1",children:[b.jsx("div",{className:"w-[120px] min-w-[120px] shrink-0"}),b.jsx("div",{className:"relative flex-1 h-full border-t border-dark-border",children:f.map((d,h)=>b.jsx("span",{className:"absolute top-1 text-[10px] text-dark-muted -translate-x-1/2",style:{left:`${d.pct}%`},children:d.text},h))})]})]})})}const XT={stuck:0,running:1,idle:2,launching:3,queued:4,failed:5,done:6};function Lne(e){return[...e].sort((r,n)=>{const a=XT[r.status]??99,i=XT[n.status]??99;if(a!==i)return a-i;const o=r.launchedAt?new Date(r.launchedAt).getTime():0;return(n.launchedAt?new Date(n.launchedAt).getTime():0)-o})}function Ine(){const{teams:e,selectedTeamId:r,setSelectedTeamId:n}=Ec(),[a,i]=k.useState("grid"),o=k.useMemo(()=>Lne(e),[e]);return o.length===0?b.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-3",children:[b.jsx("svg",{className:"w-12 h-12 text-dark-muted/40",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18v-2.25Z"})}),b.jsx("p",{className:"text-dark-muted text-lg",children:"No teams"}),b.jsx("p",{className:"text-dark-muted/60 text-sm",children:"Launch a team to get started"})]}):b.jsxs("div",{className:"p-4",children:[b.jsxs("div",{className:"flex items-center justify-between mb-3 px-4",children:[b.jsxs("div",{className:"text-xs text-dark-muted",children:[o.length," team",o.length!==1?"s":""]}),b.jsxs("div",{className:"inline-flex rounded border border-dark-border text-xs overflow-hidden",children:[b.jsx("button",{onClick:()=>i("grid"),className:`px-3 py-1 transition-colors ${a==="grid"?"bg-dark-accent/20 text-dark-accent":"text-dark-muted hover:text-dark-text"}`,children:"Grid"}),b.jsx("button",{onClick:()=>i("timeline"),className:`px-3 py-1 border-l border-dark-border transition-colors ${a==="timeline"?"bg-dark-accent/20 text-dark-accent":"text-dark-muted hover:text-dark-text"}`,children:"Timeline"})]})]}),a==="grid"?b.jsx(Mne,{teams:o,selectedTeamId:r,onSelectTeam:n}):b.jsx(Dne,{teams:o})]})}function qI(e){const r=[];for(const n of e)n.state==="open"&&r.push({number:n.number,title:n.title}),n.children.length>0&&r.push(...qI(n.children));return r}function BI(e){const r=[];for(const n of e)n.children.length>0?r.push(...BI(n.children)):n.state==="open"&&r.push({number:n.number,title:n.title});return r}function AE(e,r){return[...e].map(n=>({...n,children:AE(n.children,r)})).sort((n,a)=>{var s,c;const i=((s=r.get(n.number))==null?void 0:s.priority)??999,o=((c=r.get(a.number))==null?void 0:c.priority)??999;return i-o})}function $I(){const e=Ht(),[r,n]=k.useState({priorityMap:new Map,loading:!1,error:null,costUsd:null,durationMs:null,checkedIssues:new Set}),a=k.useCallback(async h=>{const m=qI(h);if(m.length!==0){n(g=>({...g,loading:!0,error:null}));try{const g=await e.post("query/prioritizeIssues",{issues:m});if(!g.success||!g.data){const E=g.error??"Prioritization returned no data",_=g.text?`
114
+
115
+ CC output: ${g.text}`:"";n(w=>({...w,loading:!1,error:E+_}));return}const y=new Map;for(const E of g.data)y.set(E.number,E);const x=new Set(g.data.map(E=>E.number));n({priorityMap:y,loading:!1,error:null,costUsd:g.costUsd,durationMs:g.durationMs,checkedIssues:x})}catch(g){n(y=>({...y,loading:!1,error:g instanceof Error?g.message:String(g)}))}}},[e]),i=k.useCallback(async h=>{const m=BI(h);if(m.length!==0){n(g=>({...g,loading:!0,error:null}));try{const g=await e.post("query/prioritizeIssues",{issues:m});if(!g.success||!g.data){const y=g.error??"Prioritization returned no data",x=g.text?`
116
+
117
+ CC output: ${g.text}`:"";n(E=>({...E,loading:!1,error:y+x}));return}n(y=>{const x=new Map(y.priorityMap),E=new Set(y.checkedIssues);for(const _ of g.data)x.set(_.number,_),E.add(_.number);return{priorityMap:x,loading:!1,error:null,costUsd:g.costUsd,durationMs:g.durationMs,checkedIssues:E}})}catch(g){n(y=>({...y,loading:!1,error:g instanceof Error?g.message:String(g)}))}}},[e]),o=k.useCallback(()=>{n({priorityMap:new Map,loading:!1,error:null,costUsd:null,durationMs:null,checkedIssues:new Set})},[]),s=k.useCallback((h,m)=>{n(g=>{const y=new Set(g.checkedIssues);return m?y.add(h):y.delete(h),{...g,checkedIssues:y}})},[]),c=r.priorityMap.size>0,f=c?[...r.priorityMap.entries()].sort((h,m)=>h[1].priority-m[1].priority).map(([h])=>h):[],d=f.filter(h=>r.checkedIssues.has(h));return{...r,prioritize:a,prioritizeSubtree:i,reset:o,toggleCheck:s,hasPriority:c,sortedIssueNumbers:f,checkedSortedIssueNumbers:d}}const FI="fleet-issue-tree-collapsed";function zne(){try{const e=localStorage.getItem(FI);if(!e)return new Set;const r=JSON.parse(e);if(Array.isArray(r))return new Set(r.filter(n=>typeof n=="string"))}catch{}return new Set}function qne(e){try{localStorage.setItem(FI,JSON.stringify([...e]))}catch{}}function Bne(){const[e,r]=k.useState(()=>zne()),n=k.useRef(!1);k.useEffect(()=>{if(!n.current){n.current=!0;return}qne(e)},[e]);const a=k.useCallback(c=>{r(f=>{const d=new Set(f);return d.has(c)?d.delete(c):d.add(c),d})},[]),i=k.useCallback(()=>{r(new Set)},[]),o=k.useCallback(c=>{r(new Set(c))},[]),s=k.useCallback(c=>e.has(c),[e]);return{collapsedNodes:e,toggleCollapse:a,expandAll:i,collapseAll:o,isCollapsed:s}}function $ne({completed:e,total:r}){if(r<=0)return null;const n=Math.round(e/r*100),a=n===100?"#3FB950":n>=50?"#D29922":"#58A6FF";return b.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-dark-muted",children:[b.jsx("span",{className:"relative w-16 h-1.5 bg-dark-border rounded-full overflow-hidden",children:b.jsx("span",{className:"absolute inset-y-0 left-0 rounded-full transition-all duration-300",style:{width:`${n}%`,backgroundColor:a}})}),b.jsxs("span",{children:[e,"/",r]})]})}function Fne({state:e}){return e==="open"?b.jsx("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-[#3FB950]",children:b.jsxs("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"currentColor",children:[b.jsx("path",{d:"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),b.jsx("path",{d:"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"})]})}):b.jsx("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-dark-muted",children:b.jsxs("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"currentColor",children:[b.jsx("path",{d:"M11.28 6.78a.75.75 0 0 0-1.06-1.06L7.25 8.69 5.78 7.22a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.06 0l3.5-3.5Z"}),b.jsx("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 1 0-13 0 6.5 6.5 0 0 0 13 0Z"})]})})}function Une({dependencies:e}){return!e.blockedBy||e.blockedBy.length===0||e.resolved||e.openCount===0?null:b.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-dark-muted cursor-default flex-wrap",children:[b.jsx(YV,{size:12,className:"text-[#F85149] shrink-0"}),b.jsx("span",{children:"blocked by"}),e.blockedBy.map((r,n)=>{const a=`https://github.com/${r.owner}/${r.repo}/issues/${r.number}`,i=r.state==="closed",o=r.title?`${r.title} (${r.state})`:`#${r.number} (${r.state})`;return b.jsxs("span",{children:[b.jsxs("a",{href:a,target:"_blank",rel:"noopener noreferrer",title:o,className:`hover:text-dark-accent transition-colors ${i?"line-through text-dark-muted/60":"text-dark-muted"}`,onClick:s=>s.stopPropagation(),children:["#",r.number]}),n<e.blockedBy.length-1&&b.jsx("span",{className:"text-dark-muted",children:","})]},`${r.owner}/${r.repo}#${r.number}`)})]})}function Hne({data:e}){let r,n;return e.priority<=3?(r="rgba(248, 81, 73, 0.15)",n="#F85149"):e.priority<=6?(r="rgba(210, 153, 34, 0.15)",n="#D29922"):(r="rgba(139, 148, 158, 0.15)",n="#8B949E"),b.jsxs("span",{className:"inline-flex items-center gap-1 shrink-0 px-1.5 py-0.5 rounded text-xs font-medium cursor-default",style:{backgroundColor:r,color:n},title:`Priority ${e.priority}/10 (${e.category}): ${e.reason}`,children:["P",e.priority]})}const UI=yp.memo(function e({node:r,depth:n,onLaunch:a,launchingIssues:i,launchErrors:o,forceExpand:s,projectId:c,priorityMap:f,checkedIssues:d,onCheckChange:h,onPrioritizeSubtree:m,prioritizing:g,collapsedNodes:y,onToggleCollapse:x}){var z;const E=r.number.toString(),_=y!=null&&x!=null,[w,A]=k.useState(n<2),C=_?!y.has(E):w,O=s||C,T=r.children.length>0,N=r.activeTeam!=null,M=!!(r.dependencies&&!r.dependencies.resolved&&r.dependencies.openCount>0),P=i.has(r.number),L=o.get(r.number)??null,D=async U=>{U.stopPropagation(),!P&&await a(r.number,r.title,c)},q=((z=r.prReferences)==null?void 0:z[0])??null;return b.jsxs("div",{children:[b.jsxs("div",{className:`flex items-center gap-2 py-1.5 px-2 rounded hover:bg-dark-surface/80 group transition-colors ${M?"opacity-60 border-l-2 border-[#F85149]":""}`,style:{paddingLeft:`${n*20+8}px`},children:[b.jsx("button",{disabled:!T,onClick:()=>{_?x(E):A(!O)},className:`w-4 h-4 flex items-center justify-center text-dark-muted shrink-0 transition-transform duration-150 ${T?"cursor-pointer hover:text-dark-text":"invisible"} ${O?"rotate-90":""}`,"aria-label":O?"Collapse":"Expand",tabIndex:T?0:-1,children:b.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M6.22 3.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 0 1 0-1.06Z"})})}),h&&f&&b.jsx("input",{type:"checkbox",checked:(d==null?void 0:d.has(r.number))??!1,onChange:U=>{U.stopPropagation(),h(r.number,U.target.checked)},className:"w-3.5 h-3.5 shrink-0 accent-dark-accent cursor-pointer","aria-label":`Select issue #${r.number}`}),b.jsx(Fne,{state:r.state}),b.jsxs("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-dark-muted hover:text-dark-accent transition-colors shrink-0",onClick:U=>U.stopPropagation(),children:["#",r.number]}),b.jsx("span",{className:`text-sm truncate ${r.state==="closed"?"text-dark-muted line-through":"text-dark-text"}`,children:r.title}),(f==null?void 0:f.get(r.number))&&b.jsx("span",{className:"shrink-0 ml-1",children:b.jsx(Hne,{data:f.get(r.number)})}),P&&b.jsx("span",{className:"shrink-0 ml-1 text-xs text-dark-accent/70 animate-pulse",children:"Launching..."}),N&&b.jsx("span",{className:"shrink-0 ml-1",children:b.jsx(LS,{status:r.activeTeam.status})}),r.dependencies&&!r.dependencies.resolved&&b.jsx("span",{className:"shrink-0 ml-1",children:b.jsx(Une,{dependencies:r.dependencies})}),q&&b.jsx("span",{className:"shrink-0 ml-1",children:b.jsx(zI,{prNumber:q.number,ciStatus:q.state??null})}),r.subIssueSummary&&r.subIssueSummary.total>0&&b.jsx("span",{className:"shrink-0 ml-1",children:b.jsx($ne,{completed:r.subIssueSummary.completed,total:r.subIssueSummary.total})}),T&&m&&b.jsxs("button",{onClick:U=>{U.stopPropagation(),m(r.children)},disabled:g,className:`ml-auto shrink-0 transition-opacity inline-flex items-center gap-1 px-1.5 py-0.5 text-xs rounded border border-[#A371F7]/50 text-[#A371F7] hover:bg-[#A371F7]/10 disabled:opacity-50 disabled:cursor-not-allowed ${g?"opacity-100":"opacity-0 group-hover:opacity-100"}`,title:`Prioritize sub-issues under #${r.number}`,children:[g?b.jsxs("svg",{className:"animate-spin w-3 h-3",viewBox:"0 0 24 24",fill:"none",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}):b.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M7.823.9l4.584 4.584-7.636 7.636L.187 8.536 7.823.9ZM14.2 6.1l-1.3 1.3-4.584-4.584L9.6 1.5a1.5 1.5 0 012.122 0L14.2 3.978a1.5 1.5 0 010 2.122Z"})}),"Prioritize"]}),!N&&r.state==="open"&&!T&&b.jsx("button",{onClick:D,disabled:P,className:`ml-auto shrink-0 transition-opacity px-1.5 py-0.5 text-xs rounded border disabled:opacity-70 disabled:cursor-not-allowed ${P?"opacity-100":"opacity-0 group-hover:opacity-100"} ${M?"border-[#D29922]/50 text-[#D29922] hover:text-[#D29922] hover:border-[#D29922]":"border-dark-border text-dark-muted hover:text-[#3FB950] hover:border-[#3FB950]/50"}`,title:M?`Launch team for #${r.number} (blocked — will prompt for confirmation)`:`Launch team for #${r.number}`,children:P?b.jsxs("svg",{className:"animate-spin w-3 h-3",viewBox:"0 0 24 24",fill:"none",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}):b.jsx($V,{size:12})})]}),L&&b.jsxs("div",{className:"flex items-center gap-1.5 py-1 text-xs text-[#F85149]",style:{paddingLeft:`${n*20+32}px`},children:[b.jsx("svg",{className:"w-3 h-3 shrink-0",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M2.343 13.657A8 8 0 1 1 13.657 2.343 8 8 0 0 1 2.343 13.657ZM6.03 4.97a.751.751 0 0 0-1.042.018.751.751 0 0 0-.018 1.042L6.94 8 4.97 9.97a.749.749 0 0 0 .326 1.275.749.749 0 0 0 .734-.215L8 9.06l1.97 1.97a.749.749 0 0 0 1.275-.326.749.749 0 0 0-.215-.734L9.06 8l1.97-1.97a.749.749 0 0 0-.326-1.275.749.749 0 0 0-.734.215L8 6.94Z"})}),b.jsx("span",{children:L})]}),T&&O&&b.jsx("div",{children:r.children.map(U=>b.jsx(e,{node:U,depth:n+1,onLaunch:a,launchingIssues:i,launchErrors:o,forceExpand:s,projectId:c,priorityMap:f,checkedIssues:d,onCheckChange:h,onPrioritizeSubtree:m,prioritizing:g,collapsedNodes:y,onToggleCollapse:x},U.number))})]})}),yy=[{key:"all",label:"All"},{key:"no-team",label:"No Team"},{key:"blocked-deps",label:"Blocked",color:"#F85149"},{key:"queued",label:"Queued",color:"#58A6FF"},{key:"running",label:"Running",color:"#3FB950"},{key:"idle",label:"Idle",color:"#D29922"},{key:"stuck",label:"Stuck",color:"#F85149"},{key:"done",label:"Done",color:"#A371F7"},{key:"failed",label:"Failed",color:"#F85149"}];function Gne(){var H,te;const e=Ht(),[r,n]=k.useState([]),[a,i]=k.useState(!0),[o,s]=k.useState(!1),[c,f]=k.useState(null),[d,h]=k.useState(null),[m,g]=k.useState(0),[y,x]=k.useState(new Set),[E,_]=k.useState(new Map),[w,A]=k.useState([]),[C,O]=k.useState([]),[T,N]=k.useState(""),[M,P]=k.useState("all"),L=Bne(),[D,q]=k.useState(null),z=k.useRef(new Set);k.useEffect(()=>()=>{for(const W of z.current)clearTimeout(W);z.current.clear()},[]),k.useEffect(()=>{e.get("projects").then(A).catch(()=>{})},[e]);const U=w.filter(W=>W.status==="active"),$=U.length===1?U[0].id:null,Y=k.useCallback(async()=>{try{f(null);const W=await e.get("issues");n(W.tree),O(W.groups??[]),h(W.cachedAt),g(W.count)}catch(W){const xe=W instanceof Error?W.message:String(W);f(xe)}finally{i(!1)}},[e]);k.useEffect(()=>{Y()},[Y]);const B=k.useCallback(W=>{W==="dependency_resolved"&&Y()},[Y]);PS({onEvent:B});const Z=k.useCallback(async()=>{if(!o){s(!0);try{f(null),await e.post("issues/refresh"),await Y()}catch(W){const xe=W instanceof Error?W.message:String(W);f(xe)}finally{s(!1)}}},[e,o,Y]),ae=k.useCallback(async(W,xe,ee)=>{const le=ee??$;if(!le){const be=U.length>1?"Multiple projects exist — use the Launch Team dialog to select one":"No active project found";_(Se=>{const se=new Map(Se);return se.set(W,be),se});const he=setTimeout(()=>{z.current.delete(he),_(Se=>{const se=new Map(Se);return se.delete(W),se})},5e3);z.current.add(he);return}x(be=>new Set(be).add(W)),_(be=>{if(!be.has(W))return be;const he=new Map(be);return he.delete(W),he});try{await e.post("teams/launch",{issueNumber:W,issueTitle:xe,projectId:le});const be=setTimeout(()=>{z.current.delete(be),x(he=>{const Se=new Set(he);return Se.delete(W),Se}),Y()},5e3);z.current.add(be)}catch(be){const he=be instanceof Error?be.message:String(be);if(be.status===409&&le){x(ge=>{const _e=new Set(ge);return _e.delete(W),_e}),q({issueNumber:W,title:xe,projectId:le,message:he,blockers:[]});return}console.error(`[IssueTree] Failed to launch team for #${W}:`,he),x(ge=>{const _e=new Set(ge);return _e.delete(W),_e}),_(ge=>{const _e=new Map(ge);return _e.set(W,he),_e});const ne=setTimeout(()=>{z.current.delete(ne),_(ge=>{const _e=new Map(ge);return _e.delete(W),_e})},5e3);z.current.add(ne)}},[e,Y,$,U.length]),V=k.useCallback(async()=>{if(!D)return;const{issueNumber:W,title:xe,projectId:ee}=D;q(null),x(le=>new Set(le).add(W));try{await e.post("teams/launch",{issueNumber:W,issueTitle:xe,projectId:ee,force:!0});const le=setTimeout(()=>{z.current.delete(le),x(be=>{const he=new Set(be);return he.delete(W),he}),Y()},5e3);z.current.add(le)}catch(le){const be=le instanceof Error?le.message:String(le);x(Se=>{const se=new Set(Se);return se.delete(W),se}),_(Se=>{const se=new Map(Se);return se.set(W,be),se});const he=setTimeout(()=>{z.current.delete(he),_(Se=>{const se=new Map(Se);return se.delete(W),se})},5e3);z.current.add(he)}},[e,D,Y]),fe=k.useCallback(async()=>{if(!D)return;const{issueNumber:W,title:xe,projectId:ee}=D;q(null),x(le=>new Set(le).add(W));try{await e.post("teams/launch",{issueNumber:W,issueTitle:xe,projectId:ee,queue:!0});const le=setTimeout(()=>{z.current.delete(le),x(be=>{const he=new Set(be);return he.delete(W),he}),Y()},5e3);z.current.add(le)}catch(le){const be=le instanceof Error?le.message:String(le);x(Se=>{const se=new Set(Se);return se.delete(W),se}),_(Se=>{const se=new Map(Se);return se.set(W,be),se});const he=setTimeout(()=>{z.current.delete(he),_(Se=>{const se=new Map(Se);return se.delete(W),se})},5e3);z.current.add(he)}},[e,D,Y]),F=k.useMemo(()=>L2(r,T,M),[r,T,M]),X=k.useMemo(()=>C.length===0?[]:C.map(W=>({...W,tree:L2(W.tree,T,M)})).filter(W=>W.tree.length>0),[C,T,M]),ce=k.useMemo(()=>{if(X.length===0)return[];if(!X.some(le=>le.groupId!=null))return[];const xe=new Map;for(const le of X){const be=le.groupId!=null?`group-${le.groupId}`:"group-ungrouped",he=le.groupName??"Ungrouped";let Se=xe.get(be);Se||(Se={key:be,name:he,projects:[]},xe.set(be,Se)),Se.projects.push(le)}return[...xe.values()].sort((le,be)=>le.key==="group-ungrouped"?1:be.key==="group-ungrouped"?-1:le.name.localeCompare(be.name))},[X]),G=k.useMemo(()=>C.length>0?[...C.some(ee=>ee.groupId!=null)?[...new Set(C.map(ee=>ee.groupId!=null?`group-${ee.groupId}`:"group-ungrouped"))]:[],...C.flatMap(ee=>[`project-${ee.projectId}`,...I2(ee.tree)])]:I2(r),[r,C]);return a?b.jsx("div",{className:"flex items-center justify-center h-full",children:b.jsxs("div",{className:"flex flex-col items-center gap-3",children:[b.jsxs("svg",{className:"w-8 h-8 text-dark-accent animate-spin",viewBox:"0 0 24 24",fill:"none",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 0 1 8-8v4a4 4 0 0 0-4 4H4Z"})]}),b.jsx("p",{className:"text-dark-muted text-sm",children:"Loading issue tree..."})]})}):b.jsxs("div",{className:"flex flex-col h-full",children:[b.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-dark-border shrink-0 gap-3",children:[b.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[b.jsx("h2",{className:"text-sm font-semibold text-dark-text",children:"Issue Tree"}),b.jsx("span",{className:"text-xs text-dark-muted",children:T||M!=="all"?`${lc(F)} of ${m} issues`:`${m} issue${m!==1?"s":""}`}),d&&!T&&b.jsxs("span",{className:"text-xs text-dark-muted",title:d,children:["·"," cached ",Wne(d)]})]}),b.jsxs("div",{className:"relative flex-1 max-w-xs",children:[b.jsx("input",{type:"text",placeholder:"Search issues... (#number or title)",value:T,onChange:W=>N(W.target.value),"aria-label":"Search issues",className:"w-full px-3 py-1 text-xs bg-[#0D1117] border border-[#30363D] rounded text-[#E6EDF3] placeholder-[#8B949E] focus:outline-none focus:border-[#58A6FF]"}),T&&b.jsx("button",{onClick:()=>N(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-[#8B949E] hover:text-[#E6EDF3] transition-colors","aria-label":"Clear search",children:b.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"})})})]}),b.jsx("div",{className:"flex items-center gap-1 flex-wrap",children:yy.map(W=>b.jsx("button",{onClick:()=>P(W.key),className:`px-2.5 py-1 text-xs rounded-full border transition-colors ${M===W.key?"border-dark-accent/50 bg-dark-accent/20 text-dark-accent":"border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted"}`,style:M===W.key&&"color"in W?{color:W.color,borderColor:W.color+"50",backgroundColor:W.color+"15"}:void 0,children:W.label},W.key))}),b.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[b.jsxs("button",{onClick:L.expandAll,className:"inline-flex items-center gap-1 px-2.5 py-1.5 text-xs rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-accent/50 transition-colors",title:"Expand all tree nodes",children:[b.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M8.177 14.323a.75.75 0 0 1-1.06-.146l-3.5-4.5A.75.75 0 0 1 4.211 8.5h7.578a.75.75 0 0 1 .594 1.177l-3.5 4.5a.75.75 0 0 1-.706.146ZM7.823 1.677a.75.75 0 0 1 1.06.146l3.5 4.5A.75.75 0 0 1 11.789 7.5H4.211a.75.75 0 0 1-.594-1.177l3.5-4.5a.75.75 0 0 1 .706-.146Z"})}),"Expand All"]}),b.jsxs("button",{onClick:()=>L.collapseAll(G),className:"inline-flex items-center gap-1 px-2.5 py-1.5 text-xs rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-accent/50 transition-colors",title:"Collapse all tree nodes",children:[b.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M4.177 7.823a.75.75 0 0 1 .146-1.06l3.5-3.5A.75.75 0 0 1 8.5 3.557V7.5h-3.5a.75.75 0 0 1-.823-.677ZM11.823 7.823a.75.75 0 0 0-.146-1.06l-3.5-3.5A.75.75 0 0 0 7.5 3.557V7.5h3.5a.75.75 0 0 0 .823-.677ZM4.177 8.177a.75.75 0 0 0 .146 1.06l3.5 3.5a.75.75 0 0 0 .677.823V9.5H5a.75.75 0 0 0-.823.677ZM11.823 8.177a.75.75 0 0 1-.146 1.06l-3.5 3.5a.75.75 0 0 1-.677.823V9.5H11a.75.75 0 0 1 .823.677Z"})}),"Collapse All"]})]}),b.jsxs("button",{onClick:Z,disabled:o,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-accent/50 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[b.jsx("svg",{className:`w-3.5 h-3.5 ${o?"animate-spin":""}`,viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M1.705 8.005a.75.75 0 0 1 .834.656 5.5 5.5 0 0 0 9.592 2.97l-1.204-1.204a.25.25 0 0 1 .177-.427h3.646a.25.25 0 0 1 .25.25v3.646a.25.25 0 0 1-.427.177l-1.38-1.38A7.002 7.002 0 0 1 1.05 8.84a.75.75 0 0 1 .656-.834ZM8 2.5a5.487 5.487 0 0 0-4.131 1.869l1.204 1.204A.25.25 0 0 1 4.896 6H1.25A.25.25 0 0 1 1 5.75V2.104a.25.25 0 0 1 .427-.177l1.38 1.38A7.002 7.002 0 0 1 14.95 7.16a.75.75 0 0 1-1.49.178A5.5 5.5 0 0 0 8 2.5Z"})}),o?"Refreshing...":"Refresh"]})]}),c&&b.jsx("div",{className:"mx-4 mt-3 px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-xs text-[#F85149]",children:c}),b.jsx("div",{className:"flex-1 overflow-auto p-2",children:r.length===0?b.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-3",children:[b.jsx("svg",{className:"w-12 h-12 text-dark-muted/40",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 0 1 0 3.75H5.625a1.875 1.875 0 0 1 0-3.75Z"})}),b.jsx("p",{className:"text-dark-muted text-lg",children:"No issues found"}),b.jsx("p",{className:"text-dark-muted/60 text-sm",children:"Click Refresh to fetch issues from GitHub"})]}):F.length===0?b.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-3",children:[b.jsx("p",{className:"text-dark-muted text-sm",children:T&&M!=="all"?b.jsxs(b.Fragment,{children:["No issues match “",T,"” with filter “",(H=yy.find(W=>W.key===M))==null?void 0:H.label,"”"]}):T?b.jsxs(b.Fragment,{children:["No issues match “",T,"”"]}):b.jsxs(b.Fragment,{children:["No issues match filter “",(te=yy.find(W=>W.key===M))==null?void 0:te.label,"”"]})}),b.jsx("button",{onClick:()=>{N(""),P("all")},className:"text-xs text-dark-accent hover:underline",children:"Clear filters"})]}):ce.length>0?b.jsx("div",{className:"space-y-2",children:ce.map(W=>b.jsx(Kne,{bucket:W,onLaunch:ae,launchingIssues:y,launchErrors:E,forceExpand:!!T||M!=="all",fetchTree:Y,collapsedNodes:L.collapsedNodes,onToggleCollapse:L.toggleCollapse},W.key))}):X.length>0?b.jsx("div",{className:"space-y-1",children:X.map(W=>b.jsx(KI,{group:W,onLaunch:ae,launchingIssues:y,launchErrors:E,forceExpand:!!T||M!=="all",fetchTree:Y,collapsedNodes:L.collapsedNodes,onToggleCollapse:L.toggleCollapse},W.projectId))}):b.jsx(Yne,{tree:F,projectId:$,onLaunch:ae,launchingIssues:y,launchErrors:E,forceExpand:!!T||M!=="all",fetchTree:Y,collapsedNodes:L.collapsedNodes,onToggleCollapse:L.toggleCollapse})}),D&&b.jsx(Vne,{issueNumber:D.issueNumber,message:D.message,onForce:V,onQueue:fe,onCancel:()=>q(null)})]})}function Vne({issueNumber:e,message:r,onForce:n,onQueue:a,onCancel:i}){return b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:b.jsxs("div",{className:"w-[420px] max-w-[95vw] bg-dark-surface border border-dark-border rounded-lg shadow-2xl",children:[b.jsx("div",{className:"px-5 py-4 border-b border-dark-border",children:b.jsxs("h3",{className:"text-sm font-semibold text-dark-text flex items-center gap-2",children:[b.jsxs("svg",{className:"w-4 h-4 text-[#F85149]",viewBox:"0 0 16 16",fill:"currentColor",children:[b.jsx("path",{d:"M4.25 7.25a.75.75 0 0 0 0 1.5h7.5a.75.75 0 0 0 0-1.5h-7.5Z"}),b.jsx("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 1 0-13 0 6.5 6.5 0 0 0 13 0Z"})]}),"Issue #",e," has unresolved dependencies"]})}),b.jsxs("div",{className:"px-5 py-4",children:[b.jsx("p",{className:"text-sm text-dark-muted mb-3",children:r}),b.jsxs("p",{className:"text-xs text-dark-muted",children:["You can ",b.jsx("strong",{children:"queue"})," this issue to auto-launch when blockers resolve, or ",b.jsx("strong",{children:"force launch"})," to bypass the dependency check."]})]}),b.jsxs("div",{className:"flex items-center justify-end gap-3 px-5 py-3 border-t border-dark-border",children:[b.jsx("button",{onClick:i,className:"px-3 py-1.5 text-sm rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors",children:"Cancel"}),b.jsx("button",{onClick:a,className:"px-4 py-1.5 text-sm font-medium rounded border border-[#58A6FF]/40 text-[#58A6FF] bg-[#58A6FF]/10 hover:bg-[#58A6FF]/20 transition-colors",children:"Queue"}),b.jsx("button",{onClick:n,className:"px-4 py-1.5 text-sm font-medium rounded border border-[#F85149]/40 text-[#F85149] bg-[#F85149]/10 hover:bg-[#F85149]/20 transition-colors",children:"Force Launch"})]})]})})}function HI({issues:e,skippedActive:r,skippedBlocked:n,projectId:a,api:i,fetchTree:o,onClose:s}){const[c,f]=k.useState(!1),[d,h]=k.useState(null),m=k.useCallback(async()=>{f(!0),h(null);try{await i.post("teams/launch-batch",{projectId:a,issues:e.map(g=>({number:g.number,title:g.title}))}),s(),setTimeout(()=>o(),3e3)}catch(g){const y=g instanceof Error?g.message:String(g);h(y),f(!1)}},[i,a,e,s,o]);return e.length===0?null:b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:b.jsxs("div",{className:"w-[480px] max-w-[95vw] bg-dark-surface border border-dark-border rounded-lg shadow-2xl",children:[b.jsx("div",{className:"px-5 py-4 border-b border-dark-border",children:b.jsxs("h3",{className:"text-sm font-semibold text-dark-text flex items-center gap-2",children:[b.jsx("svg",{className:"w-4 h-4 text-[#3FB950]",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"})}),"Launch ",e.length," team",e.length!==1?"s":"","?"]})}),b.jsxs("div",{className:"px-5 py-4 max-h-[50vh] overflow-auto",children:[b.jsx("ul",{className:"space-y-1 mb-3",children:e.map(g=>b.jsxs("li",{className:"text-xs text-dark-text flex items-center gap-2",children:[b.jsxs("svg",{className:"w-3 h-3 text-[#3FB950] shrink-0",viewBox:"0 0 16 16",fill:"currentColor",children:[b.jsx("path",{d:"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"}),b.jsx("path",{d:"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"})]}),b.jsxs("span",{className:"text-dark-muted",children:["#",g.number]}),b.jsx("span",{className:"truncate",children:g.title})]},g.number))}),(r>0||n>0)&&b.jsxs("div",{className:"text-xs text-dark-muted space-y-0.5 mb-3 border-t border-dark-border/40 pt-2",children:[r>0&&b.jsxs("p",{children:[r," issue",r!==1?"s":""," skipped (already have active teams)"]}),n>0&&b.jsxs("p",{children:[n," issue",n!==1?"s":""," skipped (blocked by dependencies)"]})]}),d&&b.jsx("div",{className:"px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-xs text-[#F85149] mb-3",children:d})]}),b.jsxs("div",{className:"flex items-center justify-end gap-3 px-5 py-3 border-t border-dark-border",children:[b.jsx("button",{onClick:s,disabled:c,className:"px-3 py-1.5 text-sm rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors disabled:opacity-50",children:"Cancel"}),b.jsxs("button",{onClick:m,disabled:c,className:"inline-flex items-center gap-1.5 px-4 py-1.5 text-sm font-medium rounded border border-[#3FB950]/40 text-[#3FB950] bg-[#3FB950]/10 hover:bg-[#3FB950]/20 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[c?b.jsxs("svg",{className:"w-3.5 h-3.5 animate-spin",viewBox:"0 0 24 24",fill:"none",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}):b.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"})}),c?"Launching...":"Launch All"]})]})]})})}function GI({prioritization:e,tree:r,className:n,onRunAll:a,runAllDisabled:i}){return b.jsxs("div",{className:`flex items-center gap-2 ${n??""}`,children:[b.jsxs("button",{onClick:()=>e.prioritize(r),disabled:e.loading||r.length===0,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded border border-[#A371F7]/50 text-[#A371F7] hover:bg-[#A371F7]/10 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:"AI-prioritize open issues",children:[e.loading?b.jsxs("svg",{className:"w-3.5 h-3.5 animate-spin",viewBox:"0 0 24 24",fill:"none",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}):b.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M7.823.9l4.584 4.584-7.636 7.636L.187 8.536 7.823.9ZM14.2 6.1l-1.3 1.3-4.584-4.584L9.6 1.5a1.5 1.5 0 012.122 0L14.2 3.978a1.5 1.5 0 010 2.122Z"})}),e.loading?"Prioritizing...":"Prioritize"]}),a&&b.jsxs("button",{onClick:a,disabled:i,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded border border-[#3FB950]/50 text-[#3FB950] hover:bg-[#3FB950]/10 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:"Launch teams for all launchable issues",children:[b.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M1.5 3.5a.5.5 0 0 1 .8-.4l4.5 3.4a.5.5 0 0 1 0 .8l-4.5 3.4a.5.5 0 0 1-.8-.4V3.5Zm7 0a.5.5 0 0 1 .8-.4l4.5 3.4a.5.5 0 0 1 0 .8l-4.5 3.4a.5.5 0 0 1-.8-.4V3.5Z"})}),"Run All"]}),e.hasPriority&&b.jsxs("button",{onClick:e.reset,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-accent/50 transition-colors",title:"Clear prioritization",children:[b.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"})}),"Reset"]})]})}function VI({prioritization:e,projectId:r,api:n,fetchTree:a}){const[i,o]=k.useState(!1),s=k.useRef(new Set);k.useEffect(()=>()=>{for(const f of s.current)clearTimeout(f);s.current.clear()},[]);const c=k.useCallback(async()=>{const f=e.checkedSortedIssueNumbers;if(f.length!==0){o(!0);try{await n.post("teams/launch-batch",{projectId:r,issues:f.map(h=>{const m=e.priorityMap.get(h);return{number:h,title:m==null?void 0:m.title}})});const d=setTimeout(()=>{s.current.delete(d),a()},3e3);s.current.add(d)}catch(d){console.error("[IssueTree] Batch launch failed:",d instanceof Error?d.message:String(d))}finally{o(!1)}}},[n,e.checkedSortedIssueNumbers,e.priorityMap,r,a]);return e.hasPriority?b.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-dark-border/40 bg-[#A371F7]/5",children:[b.jsxs("span",{className:"text-xs text-dark-muted",children:[e.checkedIssues.size," of ",e.priorityMap.size," selected"]}),b.jsxs("button",{onClick:c,disabled:i||e.checkedIssues.size===0,className:"inline-flex items-center gap-1.5 px-3 py-1 text-xs font-medium rounded border border-[#3FB950]/50 text-[#3FB950] hover:bg-[#3FB950]/10 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[i?b.jsxs("svg",{className:"w-3 h-3 animate-spin",viewBox:"0 0 24 24",fill:"none",children:[b.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),b.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"})]}):b.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"})}),e.checkedIssues.size===e.priorityMap.size?"Launch all in order":`Launch ${e.checkedIssues.size} selected in order`]}),e.costUsd!=null&&b.jsxs("span",{className:"text-xs text-dark-muted ml-auto",children:["$",e.costUsd.toFixed(4)," · ",((e.durationMs??0)/1e3).toFixed(1),"s"]})]}):null}function Kne({bucket:e,onLaunch:r,launchingIssues:n,launchErrors:a,forceExpand:i,fetchTree:o,collapsedNodes:s,onToggleCollapse:c}){const f=!s.has(e.key),d=e.projects.reduce((h,m)=>h+lc(m.tree),0);return b.jsxs("div",{children:[b.jsx("div",{className:"flex items-center gap-2 py-2 px-2 rounded hover:bg-dark-surface/60 transition-colors",children:b.jsxs("button",{onClick:()=>c(e.key),className:"flex items-center gap-2 flex-1 text-left min-w-0",children:[b.jsx("span",{className:`w-4 h-4 flex items-center justify-center text-dark-muted shrink-0 transition-transform duration-150 ${f?"rotate-90":""}`,children:b.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M6.22 3.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 0 1 0-1.06Z"})})}),b.jsx("svg",{className:"w-4 h-4 text-dark-accent/70 shrink-0",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"})}),b.jsx("span",{className:"text-sm font-semibold text-dark-text truncate",children:e.name}),b.jsxs("span",{className:"text-xs text-dark-muted shrink-0",children:[e.projects.length," project",e.projects.length!==1?"s":""," · ",d," issue",d!==1?"s":""]})]})}),f&&b.jsx("div",{className:"ml-2 border-l border-dark-accent/20 pl-1",children:b.jsx("div",{className:"space-y-1",children:e.projects.map(h=>b.jsx(KI,{group:h,onLaunch:r,launchingIssues:n,launchErrors:a,forceExpand:i,fetchTree:o,collapsedNodes:s,onToggleCollapse:c},h.projectId))})})]})}function KI({group:e,onLaunch:r,launchingIssues:n,launchErrors:a,forceExpand:i,fetchTree:o,collapsedNodes:s,onToggleCollapse:c}){const f=Ht(),d=`project-${e.projectId}`,h=!s.has(d),m=$I(),[g,y]=k.useState(!1),x=k.useMemo(()=>m.hasPriority?AE(e.tree,m.priorityMap):e.tree,[e.tree,m.hasPriority,m.priorityMap]),E=k.useMemo(()=>YI(e.tree),[e.tree]);return b.jsxs("div",{children:[b.jsxs("div",{className:"flex items-center gap-2 py-2 px-2 rounded hover:bg-dark-surface/60 transition-colors",children:[b.jsxs("button",{onClick:()=>c(d),className:"flex items-center gap-2 flex-1 text-left min-w-0",children:[b.jsx("span",{className:`w-4 h-4 flex items-center justify-center text-dark-muted shrink-0 transition-transform duration-150 ${h?"rotate-90":""}`,children:b.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M6.22 3.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 0 1 0-1.06Z"})})}),b.jsx("svg",{className:"w-4 h-4 text-dark-muted shrink-0",viewBox:"0 0 16 16",fill:"currentColor",children:b.jsx("path",{d:"M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.25.25 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"})}),b.jsx("span",{className:"text-sm font-semibold text-dark-text truncate",children:e.projectName}),b.jsxs("span",{className:"text-xs text-dark-muted shrink-0",children:[lc(e.tree)," issue",lc(e.tree)!==1?"s":""]})]}),b.jsx(GI,{prioritization:m,tree:e.tree,onRunAll:()=>y(!0),runAllDisabled:E.launchable.length===0})]}),m.error&&b.jsxs("div",{className:"mx-2 mb-1 px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-xs text-[#F85149]",children:["Prioritization failed: ",m.error]}),b.jsx(VI,{prioritization:m,projectId:e.projectId,api:f,fetchTree:o}),h&&b.jsx("div",{className:"ml-2 border-l border-dark-border/40 pl-1",children:x.map(_=>b.jsx(UI,{node:_,depth:0,onLaunch:r,launchingIssues:n,launchErrors:a,forceExpand:i,projectId:e.projectId,priorityMap:m.hasPriority?m.priorityMap:void 0,checkedIssues:m.hasPriority?m.checkedIssues:void 0,onCheckChange:m.hasPriority?m.toggleCheck:void 0,onPrioritizeSubtree:m.prioritizeSubtree,prioritizing:m.loading,collapsedNodes:s,onToggleCollapse:c},_.number))}),g&&b.jsx(HI,{issues:E.launchable,skippedActive:E.skippedActive,skippedBlocked:E.skippedBlocked,projectId:e.projectId,api:f,fetchTree:o,onClose:()=>y(!1)})]})}function Yne({tree:e,projectId:r,onLaunch:n,launchingIssues:a,launchErrors:i,forceExpand:o,fetchTree:s,collapsedNodes:c,onToggleCollapse:f}){const d=Ht(),h=$I(),[m,g]=k.useState(!1),y=k.useMemo(()=>h.hasPriority?AE(e,h.priorityMap):e,[e,h.hasPriority,h.priorityMap]),x=k.useMemo(()=>YI(e),[e]);return b.jsxs("div",{children:[b.jsx("div",{className:"flex items-center gap-2 px-2 pb-2",children:b.jsx(GI,{prioritization:h,tree:e,onRunAll:r?()=>g(!0):void 0,runAllDisabled:x.launchable.length===0})}),h.error&&b.jsxs("div",{className:"mx-2 mb-2 px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-xs text-[#F85149]",children:["Prioritization failed: ",h.error]}),r&&b.jsx(VI,{prioritization:h,projectId:r,api:d,fetchTree:s}),b.jsx("div",{className:"space-y-0",children:y.map(E=>b.jsx(UI,{node:E,depth:0,onLaunch:n,launchingIssues:a,launchErrors:i,forceExpand:o,priorityMap:h.hasPriority?h.priorityMap:void 0,checkedIssues:h.hasPriority?h.checkedIssues:void 0,onCheckChange:h.hasPriority?h.toggleCheck:void 0,onPrioritizeSubtree:h.prioritizeSubtree,prioritizing:h.loading,collapsedNodes:c,onToggleCollapse:f},E.number))}),m&&r&&b.jsx(HI,{issues:x.launchable,skippedActive:x.skippedActive,skippedBlocked:x.skippedBlocked,projectId:r,api:d,fetchTree:s,onClose:()=>g(!1)})]})}function Xne(e,r){var n;return r==="all"?!0:r==="no-team"?!e.activeTeam:r==="blocked-deps"?!!(e.dependencies&&!e.dependencies.resolved):((n=e.activeTeam)==null?void 0:n.status)===r}function L2(e,r,n){const a=r.trim().length>0;if(!a&&!(n!=="all"))return e;const o=r.toLowerCase().trim(),s=/^\d+$/.test(o),c=o.startsWith("#")?parseInt(o.slice(1),10):s?parseInt(o,10):NaN;return e.reduce((f,d)=>{const h=!a||!isNaN(c)&&d.number===c||d.title.toLowerCase().includes(o),m=Xne(d,n),g=h&&m,y=L2(d.children,r,n);return(g||y.length>0)&&f.push({...d,children:y}),f},[])}function I2(e){const r=[];for(const n of e)r.push(n.number.toString()),n.children.length>0&&r.push(...I2(n.children));return r}function lc(e){let r=0;for(const n of e)r++,r+=lc(n.children);return r}function YI(e){const r=[];let n=0,a=0;function i(o){for(const s of o)s.state==="open"&&(s.activeTeam?n++:s.dependencies&&!s.dependencies.resolved?a++:r.push(s)),i(s.children)}return i(e),{launchable:r,skippedActive:n,skippedBlocked:a}}function Wne(e){try{return new Date(e).toLocaleTimeString([],{hour12:!1,hour:"2-digit",minute:"2-digit"})}catch{return"--:--"}}function XI(e){var r,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(r=0;r<i;r++)e[r]&&(n=XI(e[r]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function Je(){for(var e,r,n=0,a="",i=arguments.length;n<i;n++)(e=arguments[n])&&(r=XI(e))&&(a&&(a+=" "),a+=r);return a}var Zne=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function CE(e){if(typeof e!="string")return!1;var r=Zne;return r.includes(e)}var Qne=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],Jne=new Set(Qne);function WI(e){return typeof e!="string"?!1:Jne.has(e)}function ZI(e){return typeof e=="string"&&e.startsWith("data-")}function oa(e){if(typeof e!="object"||e===null)return{};var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(WI(n)||ZI(n))&&(r[n]=e[n]);return r}function Dp(e){if(e==null)return null;if(k.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var r=e.props;return oa(r)}return typeof e=="object"&&!Array.isArray(e)?oa(e):null}function fr(e){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(WI(n)||ZI(n)||CE(n))&&(r[n]=e[n]);return r}function eae(e){return e==null?null:k.isValidElement(e)?fr(e.props):typeof e=="object"&&!Array.isArray(e)?fr(e):null}var tae=["children","width","height","viewBox","className","style","title","desc"];function z2(){return z2=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},z2.apply(null,arguments)}function rae(e,r){if(e==null)return{};var n,a,i=nae(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function nae(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var QI=k.forwardRef((e,r)=>{var{children:n,width:a,height:i,viewBox:o,className:s,style:c,title:f,desc:d}=e,h=rae(e,tae),m=o||{width:a,height:i,x:0,y:0},g=Je("recharts-surface",s);return k.createElement("svg",z2({},fr(h),{className:g,width:a,height:i,style:c,viewBox:"".concat(m.x," ").concat(m.y," ").concat(m.width," ").concat(m.height),ref:r}),k.createElement("title",null,f),k.createElement("desc",null,d),n)}),aae=["children","className"];function q2(){return q2=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},q2.apply(null,arguments)}function iae(e,r){if(e==null)return{};var n,a,i=oae(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function oae(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var la=k.forwardRef((e,r)=>{var{children:n,className:a}=e,i=iae(e,aae),o=Je("recharts-layer",a);return k.createElement("g",q2({className:o},fr(i),{ref:r}),n)}),lae=k.createContext(null);function nt(e){return function(){return e}}const JI=Math.cos,Mh=Math.sin,qn=Math.sqrt,Rh=Math.PI,Lp=2*Rh,B2=Math.PI,$2=2*B2,_o=1e-6,sae=$2-_o;function ez(e){this._+=e[0];for(let r=1,n=e.length;r<n;++r)this._+=arguments[r]+e[r]}function uae(e){let r=Math.floor(e);if(!(r>=0))throw new Error(`invalid digits: ${e}`);if(r>15)return ez;const n=10**r;return function(a){this._+=a[0];for(let i=1,o=a.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+a[i]}}class cae{constructor(r){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=r==null?ez:uae(r)}moveTo(r,n){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(r,n){this._append`L${this._x1=+r},${this._y1=+n}`}quadraticCurveTo(r,n,a,i){this._append`Q${+r},${+n},${this._x1=+a},${this._y1=+i}`}bezierCurveTo(r,n,a,i,o,s){this._append`C${+r},${+n},${+a},${+i},${this._x1=+o},${this._y1=+s}`}arcTo(r,n,a,i,o){if(r=+r,n=+n,a=+a,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let s=this._x1,c=this._y1,f=a-r,d=i-n,h=s-r,m=c-n,g=h*h+m*m;if(this._x1===null)this._append`M${this._x1=r},${this._y1=n}`;else if(g>_o)if(!(Math.abs(m*f-d*h)>_o)||!o)this._append`L${this._x1=r},${this._y1=n}`;else{let y=a-s,x=i-c,E=f*f+d*d,_=y*y+x*x,w=Math.sqrt(E),A=Math.sqrt(g),C=o*Math.tan((B2-Math.acos((E+g-_)/(2*w*A)))/2),O=C/A,T=C/w;Math.abs(O-1)>_o&&this._append`L${r+O*h},${n+O*m}`,this._append`A${o},${o},0,0,${+(m*y>h*x)},${this._x1=r+T*f},${this._y1=n+T*d}`}}arc(r,n,a,i,o,s){if(r=+r,n=+n,a=+a,s=!!s,a<0)throw new Error(`negative radius: ${a}`);let c=a*Math.cos(i),f=a*Math.sin(i),d=r+c,h=n+f,m=1^s,g=s?i-o:o-i;this._x1===null?this._append`M${d},${h}`:(Math.abs(this._x1-d)>_o||Math.abs(this._y1-h)>_o)&&this._append`L${d},${h}`,a&&(g<0&&(g=g%$2+$2),g>sae?this._append`A${a},${a},0,1,${m},${r-c},${n-f}A${a},${a},0,1,${m},${this._x1=d},${this._y1=h}`:g>_o&&this._append`A${a},${a},0,${+(g>=B2)},${m},${this._x1=r+a*Math.cos(o)},${this._y1=n+a*Math.sin(o)}`)}rect(r,n,a,i){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+n}h${a=+a}v${+i}h${-a}Z`}toString(){return this._}}function OE(e){let r=3;return e.digits=function(n){if(!arguments.length)return r;if(n==null)r=null;else{const a=Math.floor(n);if(!(a>=0))throw new RangeError(`invalid digits: ${n}`);r=a}return e},()=>new cae(r)}function TE(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function tz(e){this._context=e}tz.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,r){switch(e=+e,r=+r,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 1:this._point=2;default:this._context.lineTo(e,r);break}}};function Ip(e){return new tz(e)}function rz(e){return e[0]}function nz(e){return e[1]}function az(e,r){var n=nt(!0),a=null,i=Ip,o=null,s=OE(c);e=typeof e=="function"?e:e===void 0?rz:nt(e),r=typeof r=="function"?r:r===void 0?nz:nt(r);function c(f){var d,h=(f=TE(f)).length,m,g=!1,y;for(a==null&&(o=i(y=s())),d=0;d<=h;++d)!(d<h&&n(m=f[d],d,f))===g&&((g=!g)?o.lineStart():o.lineEnd()),g&&o.point(+e(m,d,f),+r(m,d,f));if(y)return o=null,y+""||null}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:nt(+f),c):e},c.y=function(f){return arguments.length?(r=typeof f=="function"?f:nt(+f),c):r},c.defined=function(f){return arguments.length?(n=typeof f=="function"?f:nt(!!f),c):n},c.curve=function(f){return arguments.length?(i=f,a!=null&&(o=i(a)),c):i},c.context=function(f){return arguments.length?(f==null?a=o=null:o=i(a=f),c):a},c}function Pd(e,r,n){var a=null,i=nt(!0),o=null,s=Ip,c=null,f=OE(d);e=typeof e=="function"?e:e===void 0?rz:nt(+e),r=typeof r=="function"?r:nt(r===void 0?0:+r),n=typeof n=="function"?n:n===void 0?nz:nt(+n);function d(m){var g,y,x,E=(m=TE(m)).length,_,w=!1,A,C=new Array(E),O=new Array(E);for(o==null&&(c=s(A=f())),g=0;g<=E;++g){if(!(g<E&&i(_=m[g],g,m))===w)if(w=!w)y=g,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),x=g-1;x>=y;--x)c.point(C[x],O[x]);c.lineEnd(),c.areaEnd()}w&&(C[g]=+e(_,g,m),O[g]=+r(_,g,m),c.point(a?+a(_,g,m):C[g],n?+n(_,g,m):O[g]))}if(A)return c=null,A+""||null}function h(){return az().defined(i).curve(s).context(o)}return d.x=function(m){return arguments.length?(e=typeof m=="function"?m:nt(+m),a=null,d):e},d.x0=function(m){return arguments.length?(e=typeof m=="function"?m:nt(+m),d):e},d.x1=function(m){return arguments.length?(a=m==null?null:typeof m=="function"?m:nt(+m),d):a},d.y=function(m){return arguments.length?(r=typeof m=="function"?m:nt(+m),n=null,d):r},d.y0=function(m){return arguments.length?(r=typeof m=="function"?m:nt(+m),d):r},d.y1=function(m){return arguments.length?(n=m==null?null:typeof m=="function"?m:nt(+m),d):n},d.lineX0=d.lineY0=function(){return h().x(e).y(r)},d.lineY1=function(){return h().x(e).y(n)},d.lineX1=function(){return h().x(a).y(r)},d.defined=function(m){return arguments.length?(i=typeof m=="function"?m:nt(!!m),d):i},d.curve=function(m){return arguments.length?(s=m,o!=null&&(c=s(o)),d):s},d.context=function(m){return arguments.length?(m==null?o=c=null:c=s(o=m),d):o},d}class iz{constructor(r,n){this._context=r,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(r,n){switch(r=+r,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+r)/2,this._y0,this._x0,n,r,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,r,this._y0,r,n);break}}this._x0=r,this._y0=n}}function fae(e){return new iz(e,!0)}function dae(e){return new iz(e,!1)}const NE={draw(e,r){const n=qn(r/Rh);e.moveTo(n,0),e.arc(0,0,n,0,Lp)}},hae={draw(e,r){const n=qn(r/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},oz=qn(1/3),pae=oz*2,mae={draw(e,r){const n=qn(r/pae),a=n*oz;e.moveTo(0,-n),e.lineTo(a,0),e.lineTo(0,n),e.lineTo(-a,0),e.closePath()}},vae={draw(e,r){const n=qn(r),a=-n/2;e.rect(a,a,n,n)}},gae=.8908130915292852,lz=Mh(Rh/10)/Mh(7*Rh/10),yae=Mh(Lp/10)*lz,bae=-JI(Lp/10)*lz,xae={draw(e,r){const n=qn(r*gae),a=yae*n,i=bae*n;e.moveTo(0,-n),e.lineTo(a,i);for(let o=1;o<5;++o){const s=Lp*o/5,c=JI(s),f=Mh(s);e.lineTo(f*n,-c*n),e.lineTo(c*a-f*i,f*a+c*i)}e.closePath()}},by=qn(3),_ae={draw(e,r){const n=-qn(r/(by*3));e.moveTo(0,n*2),e.lineTo(-by*n,-n),e.lineTo(by*n,-n),e.closePath()}},un=-.5,cn=qn(3)/2,F2=1/qn(12),wae=(F2/2+1)*3,Sae={draw(e,r){const n=qn(r/wae),a=n/2,i=n*F2,o=a,s=n*F2+n,c=-o,f=s;e.moveTo(a,i),e.lineTo(o,s),e.lineTo(c,f),e.lineTo(un*a-cn*i,cn*a+un*i),e.lineTo(un*o-cn*s,cn*o+un*s),e.lineTo(un*c-cn*f,cn*c+un*f),e.lineTo(un*a+cn*i,un*i-cn*a),e.lineTo(un*o+cn*s,un*s-cn*o),e.lineTo(un*c+cn*f,un*f-cn*c),e.closePath()}};function Eae(e,r){let n=null,a=OE(i);e=typeof e=="function"?e:nt(e||NE),r=typeof r=="function"?r:nt(r===void 0?64:+r);function i(){let o;if(n||(n=o=a()),e.apply(this,arguments).draw(n,+r.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:nt(o),i):e},i.size=function(o){return arguments.length?(r=typeof o=="function"?o:nt(+o),i):r},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function Ph(){}function Dh(e,r,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+r)/6,(e._y0+4*e._y1+n)/6)}function sz(e){this._context=e}sz.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Dh(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,r){switch(e=+e,r=+r,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Dh(this,e,r);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=r}};function kae(e){return new sz(e)}function uz(e){this._context=e}uz.prototype={areaStart:Ph,areaEnd:Ph,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,r){switch(e=+e,r=+r,this._point){case 0:this._point=1,this._x2=e,this._y2=r;break;case 1:this._point=2,this._x3=e,this._y3=r;break;case 2:this._point=3,this._x4=e,this._y4=r,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+r)/6);break;default:Dh(this,e,r);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=r}};function jae(e){return new uz(e)}function cz(e){this._context=e}cz.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,r){switch(e=+e,r=+r,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,a=(this._y0+4*this._y1+r)/6;this._line?this._context.lineTo(n,a):this._context.moveTo(n,a);break;case 3:this._point=4;default:Dh(this,e,r);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=r}};function Aae(e){return new cz(e)}function fz(e){this._context=e}fz.prototype={areaStart:Ph,areaEnd:Ph,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,r){e=+e,r=+r,this._point?this._context.lineTo(e,r):(this._point=1,this._context.moveTo(e,r))}};function Cae(e){return new fz(e)}function WT(e){return e<0?-1:1}function ZT(e,r,n){var a=e._x1-e._x0,i=r-e._x1,o=(e._y1-e._y0)/(a||i<0&&-0),s=(n-e._y1)/(i||a<0&&-0),c=(o*i+s*a)/(a+i);return(WT(o)+WT(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(c))||0}function QT(e,r){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-r)/2:r}function xy(e,r,n){var a=e._x0,i=e._y0,o=e._x1,s=e._y1,c=(o-a)/3;e._context.bezierCurveTo(a+c,i+c*r,o-c,s-c*n,o,s)}function Lh(e){this._context=e}Lh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:xy(this,this._t0,QT(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,r){var n=NaN;if(e=+e,r=+r,!(e===this._x1&&r===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 1:this._point=2;break;case 2:this._point=3,xy(this,QT(this,n=ZT(this,e,r)),n);break;default:xy(this,this._t0,n=ZT(this,e,r));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=r,this._t0=n}}};function dz(e){this._context=new hz(e)}(dz.prototype=Object.create(Lh.prototype)).point=function(e,r){Lh.prototype.point.call(this,r,e)};function hz(e){this._context=e}hz.prototype={moveTo:function(e,r){this._context.moveTo(r,e)},closePath:function(){this._context.closePath()},lineTo:function(e,r){this._context.lineTo(r,e)},bezierCurveTo:function(e,r,n,a,i,o){this._context.bezierCurveTo(r,e,a,n,o,i)}};function Oae(e){return new Lh(e)}function Tae(e){return new dz(e)}function pz(e){this._context=e}pz.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,r=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],r[0]):this._context.moveTo(e[0],r[0]),n===2)this._context.lineTo(e[1],r[1]);else for(var a=JT(e),i=JT(r),o=0,s=1;s<n;++o,++s)this._context.bezierCurveTo(a[0][o],i[0][o],a[1][o],i[1][o],e[s],r[s]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,r){this._x.push(+e),this._y.push(+r)}};function JT(e){var r,n=e.length-1,a,i=new Array(n),o=new Array(n),s=new Array(n);for(i[0]=0,o[0]=2,s[0]=e[0]+2*e[1],r=1;r<n-1;++r)i[r]=1,o[r]=4,s[r]=4*e[r]+2*e[r+1];for(i[n-1]=2,o[n-1]=7,s[n-1]=8*e[n-1]+e[n],r=1;r<n;++r)a=i[r]/o[r-1],o[r]-=a,s[r]-=a*s[r-1];for(i[n-1]=s[n-1]/o[n-1],r=n-2;r>=0;--r)i[r]=(s[r]-i[r+1])/o[r];for(o[n-1]=(e[n]+i[n-1])/2,r=0;r<n-1;++r)o[r]=2*e[r+1]-i[r+1];return[i,o]}function Nae(e){return new pz(e)}function zp(e,r){this._context=e,this._t=r}zp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,r){switch(e=+e,r=+r,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,r),this._context.lineTo(e,r);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,r)}break}}this._x=e,this._y=r}};function Mae(e){return new zp(e,.5)}function Rae(e){return new zp(e,0)}function Pae(e){return new zp(e,1)}function Do(e,r){if((s=e.length)>1)for(var n=1,a,i,o=e[r[0]],s,c=o.length;n<s;++n)for(i=o,o=e[r[n]],a=0;a<c;++a)o[a][1]+=o[a][0]=isNaN(i[a][1])?i[a][0]:i[a][1]}function U2(e){for(var r=e.length,n=new Array(r);--r>=0;)n[r]=r;return n}function Dae(e,r){return e[r]}function Lae(e){const r=[];return r.key=e,r}function Iae(){var e=nt([]),r=U2,n=Do,a=Dae;function i(o){var s=Array.from(e.apply(this,arguments),Lae),c,f=s.length,d=-1,h;for(const m of o)for(c=0,++d;c<f;++c)(s[c][d]=[0,+a(m,s[c].key,d,o)]).data=m;for(c=0,h=TE(r(s));c<f;++c)s[h[c]].index=c;return n(s,h),s}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:nt(Array.from(o)),i):e},i.value=function(o){return arguments.length?(a=typeof o=="function"?o:nt(+o),i):a},i.order=function(o){return arguments.length?(r=o==null?U2:typeof o=="function"?o:nt(Array.from(o)),i):r},i.offset=function(o){return arguments.length?(n=o??Do,i):n},i}function zae(e,r){if((a=e.length)>0){for(var n,a,i=0,o=e[0].length,s;i<o;++i){for(s=n=0;n<a;++n)s+=e[n][i][1]||0;if(s)for(n=0;n<a;++n)e[n][i][1]/=s}Do(e,r)}}function qae(e,r){if((i=e.length)>0){for(var n=0,a=e[r[0]],i,o=a.length;n<o;++n){for(var s=0,c=0;s<i;++s)c+=e[s][n][1]||0;a[n][1]+=a[n][0]=-c/2}Do(e,r)}}function Bae(e,r){if(!(!((s=e.length)>0)||!((o=(i=e[r[0]]).length)>0))){for(var n=0,a=1,i,o,s;a<o;++a){for(var c=0,f=0,d=0;c<s;++c){for(var h=e[r[c]],m=h[a][1]||0,g=h[a-1][1]||0,y=(m-g)/2,x=0;x<c;++x){var E=e[r[x]],_=E[a][1]||0,w=E[a-1][1]||0;y+=_-w}f+=m,d+=y*m}i[a-1][1]+=i[a-1][0]=n,f&&(n-=d/f)}i[a-1][1]+=i[a-1][0]=n,Do(e,r)}}var _y={},wy={},eN;function $ae(){return eN||(eN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return n==="__proto__"}e.isUnsafeProperty=r})(wy)),wy}var Sy={},tN;function mz(){return tN||(tN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){switch(typeof n){case"number":case"symbol":return!1;case"string":return n.includes(".")||n.includes("[")||n.includes("]")}}e.isDeepKey=r})(Sy)),Sy}var Ey={},rN;function ME(){return rN||(rN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){var a;return typeof n=="string"||typeof n=="symbol"?n:Object.is((a=n==null?void 0:n.valueOf)==null?void 0:a.call(n),-0)?"-0":String(n)}e.toKey=r})(Ey)),Ey}var ky={},jy={},nN;function Fae(){return nN||(nN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){if(n==null)return"";if(typeof n=="string")return n;if(Array.isArray(n))return n.map(r).join(",");const a=String(n);return a==="0"&&Object.is(Number(n),-0)?"-0":a}e.toString=r})(jy)),jy}var aN;function RE(){return aN||(aN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Fae(),n=ME();function a(i){if(Array.isArray(i))return i.map(n.toKey);if(typeof i=="symbol")return[i];i=r.toString(i);const o=[],s=i.length;if(s===0)return o;let c=0,f="",d="",h=!1;for(i.charCodeAt(0)===46&&(o.push(""),c++);c<s;){const m=i[c];d?m==="\\"&&c+1<s?(c++,f+=i[c]):m===d?d="":f+=m:h?m==='"'||m==="'"?d=m:m==="]"?(h=!1,o.push(f),f=""):f+=m:m==="["?(h=!0,f&&(o.push(f),f="")):m==="."?f&&(o.push(f),f=""):f+=m,c++}return f&&o.push(f),o}e.toPath=a})(ky)),ky}var iN;function PE(){return iN||(iN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=$ae(),n=mz(),a=ME(),i=RE();function o(c,f,d){if(c==null)return d;switch(typeof f){case"string":{if(r.isUnsafeProperty(f))return d;const h=c[f];return h===void 0?n.isDeepKey(f)?o(c,i.toPath(f),d):d:h}case"number":case"symbol":{typeof f=="number"&&(f=a.toKey(f));const h=c[f];return h===void 0?d:h}default:{if(Array.isArray(f))return s(c,f,d);if(Object.is(f==null?void 0:f.valueOf(),-0)?f="-0":f=String(f),r.isUnsafeProperty(f))return d;const h=c[f];return h===void 0?d:h}}}function s(c,f,d){if(f.length===0)return d;let h=c;for(let m=0;m<f.length;m++){if(h==null||r.isUnsafeProperty(f[m]))return d;h=h[f[m]]}return h===void 0?d:h}e.get=o})(_y)),_y}var Ay,oN;function Uae(){return oN||(oN=1,Ay=PE().get),Ay}var Hae=Uae();const qp=In(Hae);var Gae=4;function $i(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Gae,n=10**r,a=Math.round(e*n)/n;return Object.is(a,-0)?0:a}function xt(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return e.reduce((i,o,s)=>{var c=n[s-1];return typeof c=="string"?i+c+o:c!==void 0?i+$i(c)+o:i+o},"")}var gn=e=>e===0?0:e>0?1:-1,Qa=e=>typeof e=="number"&&e!=+e,Lo=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,Ae=e=>(typeof e=="number"||e instanceof Number)&&!Qa(e),bn=e=>Ae(e)||typeof e=="string",Vae=0,sc=e=>{var r=++Vae;return"".concat(e||"").concat(r)},Hi=function(r,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ae(r)&&typeof r!="string")return a;var o;if(Lo(r)){if(n==null)return a;var s=r.indexOf("%");o=n*parseFloat(r.slice(0,s))/100}else o=+r;return Qa(o)&&(o=a),i&&n!=null&&o>n&&(o=n),o},vz=e=>{if(!Array.isArray(e))return!1;for(var r=e.length,n={},a=0;a<r;a++)if(!n[String(e[a])])n[String(e[a])]=!0;else return!0;return!1};function Tr(e,r,n){return Ae(e)&&Ae(r)?$i(e+n*(r-e)):r}function gz(e,r,n){if(!(!e||!e.length))return e.find(a=>a&&(typeof r=="function"?r(a):qp(a,r))===n)}var Ut=e=>e===null||typeof e>"u",Rc=e=>Ut(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Mr(e){return e!=null}function Ho(){}var Kae=["type","size","sizeType"];function H2(){return H2=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},H2.apply(null,arguments)}function lN(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function sN(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?lN(Object(n),!0).forEach(function(a){Yae(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lN(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Yae(e,r,n){return(r=Xae(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Xae(e){var r=Wae(e,"string");return typeof r=="symbol"?r:r+""}function Wae(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Zae(e,r){if(e==null)return{};var n,a,i=Qae(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Qae(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var yz={symbolCircle:NE,symbolCross:hae,symbolDiamond:mae,symbolSquare:vae,symbolStar:xae,symbolTriangle:_ae,symbolWye:Sae},Jae=Math.PI/180,eie=e=>{var r="symbol".concat(Rc(e));return yz[r]||NE},tie=(e,r,n)=>{if(r==="area")return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var a=18*Jae;return 1.25*e*e*(Math.tan(a)-Math.tan(a*2)*Math.tan(a)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},rie=(e,r)=>{yz["symbol".concat(Rc(e))]=r},bz=e=>{var{type:r="circle",size:n=64,sizeType:a="area"}=e,i=Zae(e,Kae),o=sN(sN({},i),{},{type:r,size:n,sizeType:a}),s="circle";typeof r=="string"&&(s=r);var c=()=>{var g=eie(s),y=Eae().type(g).size(tie(n,a,s)),x=y();if(x!==null)return x},{className:f,cx:d,cy:h}=o,m=fr(o);return Ae(d)&&Ae(h)&&Ae(n)?k.createElement("path",H2({},m,{className:Je("recharts-symbols",f),transform:"translate(".concat(d,", ").concat(h,")"),d:c()})):null};bz.registerSymbol=rie;var xz=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,DE=(e,r)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(k.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var a={};return Object.keys(n).forEach(i=>{CE(i)&&typeof n[i]=="function"&&(a[i]=(o=>n[i](n,o)))}),a},nie=(e,r,n)=>a=>(e(r,n,a),null),aie=(e,r,n)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var a=null;return Object.keys(e).forEach(i=>{var o=e[i];CE(i)&&typeof o=="function"&&(a||(a={}),a[i]=nie(o,r,n))}),a};function uN(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function iie(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?uN(Object(n),!0).forEach(function(a){oie(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uN(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function oie(e,r,n){return(r=lie(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function lie(e){var r=sie(e,"string");return typeof r=="symbol"?r:r+""}function sie(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function br(e,r){var n=iie({},e),a=r,i=Object.keys(r),o=i.reduce((s,c)=>(s[c]===void 0&&a[c]!==void 0&&(s[c]=a[c]),s),n);return o}var Cy={},Oy={},cN;function uie(){return cN||(cN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n,a){const i=new Map;for(let o=0;o<n.length;o++){const s=n[o],c=a(s,o,n);i.has(c)||i.set(c,s)}return Array.from(i.values())}e.uniqBy=r})(Oy)),Oy}var Ty={},fN;function cie(){return fN||(fN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n,a){return function(...i){return n.apply(this,i.slice(0,a))}}e.ary=r})(Ty)),Ty}var Ny={},dN;function _z(){return dN||(dN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return n}e.identity=r})(Ny)),Ny}var My={},Ry={},Py={},hN;function fie(){return hN||(hN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return Number.isSafeInteger(n)&&n>=0}e.isLength=r})(Py)),Py}var pN;function wz(){return pN||(pN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=fie();function n(a){return a!=null&&typeof a!="function"&&r.isLength(a.length)}e.isArrayLike=n})(Ry)),Ry}var Dy={},mN;function die(){return mN||(mN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return typeof n=="object"&&n!==null}e.isObjectLike=r})(Dy)),Dy}var vN;function hie(){return vN||(vN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=wz(),n=die();function a(i){return n.isObjectLike(i)&&r.isArrayLike(i)}e.isArrayLikeObject=a})(My)),My}var Ly={},Iy={},gN;function pie(){return gN||(gN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=PE();function n(a){return function(i){return r.get(i,a)}}e.property=n})(Iy)),Iy}var zy={},qy={},By={},$y={},yN;function Sz(){return yN||(yN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return n!==null&&(typeof n=="object"||typeof n=="function")}e.isObject=r})($y)),$y}var Fy={},bN;function Ez(){return bN||(bN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return n==null||typeof n!="object"&&typeof n!="function"}e.isPrimitive=r})(Fy)),Fy}var Uy={},xN;function kz(){return xN||(xN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n,a){return n===a||Number.isNaN(n)&&Number.isNaN(a)}e.isEqualsSameValueZero=r})(Uy)),Uy}var _N;function mie(){return _N||(_N=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Sz(),n=Ez(),a=kz();function i(h,m,g){return typeof g!="function"?i(h,m,()=>{}):o(h,m,function y(x,E,_,w,A,C){const O=g(x,E,_,w,A,C);return O!==void 0?!!O:o(x,E,y,C)},new Map)}function o(h,m,g,y){if(m===h)return!0;switch(typeof m){case"object":return s(h,m,g,y);case"function":return Object.keys(m).length>0?o(h,{...m},g,y):a.isEqualsSameValueZero(h,m);default:return r.isObject(h)?typeof m=="string"?m==="":!0:a.isEqualsSameValueZero(h,m)}}function s(h,m,g,y){if(m==null)return!0;if(Array.isArray(m))return f(h,m,g,y);if(m instanceof Map)return c(h,m,g,y);if(m instanceof Set)return d(h,m,g,y);const x=Object.keys(m);if(h==null||n.isPrimitive(h))return x.length===0;if(x.length===0)return!0;if(y!=null&&y.has(m))return y.get(m)===h;y==null||y.set(m,h);try{for(let E=0;E<x.length;E++){const _=x[E];if(!n.isPrimitive(h)&&!(_ in h)||m[_]===void 0&&h[_]!==void 0||m[_]===null&&h[_]!==null||!g(h[_],m[_],_,h,m,y))return!1}return!0}finally{y==null||y.delete(m)}}function c(h,m,g,y){if(m.size===0)return!0;if(!(h instanceof Map))return!1;for(const[x,E]of m.entries()){const _=h.get(x);if(g(_,E,x,h,m,y)===!1)return!1}return!0}function f(h,m,g,y){if(m.length===0)return!0;if(!Array.isArray(h))return!1;const x=new Set;for(let E=0;E<m.length;E++){const _=m[E];let w=!1;for(let A=0;A<h.length;A++){if(x.has(A))continue;const C=h[A];let O=!1;if(g(C,_,E,h,m,y)&&(O=!0),O){x.add(A),w=!0;break}}if(!w)return!1}return!0}function d(h,m,g,y){return m.size===0?!0:h instanceof Set?f([...h],[...m],g,y):!1}e.isMatchWith=i,e.isSetMatch=d})(By)),By}var wN;function jz(){return wN||(wN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=mie();function n(a,i){return r.isMatchWith(a,i,()=>{})}e.isMatch=n})(qy)),qy}var Hy={},Gy={},Vy={},SN;function vie(){return SN||(SN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return Object.getOwnPropertySymbols(n).filter(a=>Object.prototype.propertyIsEnumerable.call(n,a))}e.getSymbols=r})(Vy)),Vy}var Ky={},EN;function LE(){return EN||(EN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}e.getTag=r})(Ky)),Ky}var Yy={},kN;function Az(){return kN||(kN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r="[object RegExp]",n="[object String]",a="[object Number]",i="[object Boolean]",o="[object Arguments]",s="[object Symbol]",c="[object Date]",f="[object Map]",d="[object Set]",h="[object Array]",m="[object Function]",g="[object ArrayBuffer]",y="[object Object]",x="[object Error]",E="[object DataView]",_="[object Uint8Array]",w="[object Uint8ClampedArray]",A="[object Uint16Array]",C="[object Uint32Array]",O="[object BigUint64Array]",T="[object Int8Array]",N="[object Int16Array]",M="[object Int32Array]",P="[object BigInt64Array]",L="[object Float32Array]",D="[object Float64Array]";e.argumentsTag=o,e.arrayBufferTag=g,e.arrayTag=h,e.bigInt64ArrayTag=P,e.bigUint64ArrayTag=O,e.booleanTag=i,e.dataViewTag=E,e.dateTag=c,e.errorTag=x,e.float32ArrayTag=L,e.float64ArrayTag=D,e.functionTag=m,e.int16ArrayTag=N,e.int32ArrayTag=M,e.int8ArrayTag=T,e.mapTag=f,e.numberTag=a,e.objectTag=y,e.regexpTag=r,e.setTag=d,e.stringTag=n,e.symbolTag=s,e.uint16ArrayTag=A,e.uint32ArrayTag=C,e.uint8ArrayTag=_,e.uint8ClampedArrayTag=w})(Yy)),Yy}var Xy={},jN;function gie(){return jN||(jN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}e.isTypedArray=r})(Xy)),Xy}var AN;function Cz(){return AN||(AN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=vie(),n=LE(),a=Az(),i=Ez(),o=gie();function s(h,m){return c(h,void 0,h,new Map,m)}function c(h,m,g,y=new Map,x=void 0){const E=x==null?void 0:x(h,m,g,y);if(E!==void 0)return E;if(i.isPrimitive(h))return h;if(y.has(h))return y.get(h);if(Array.isArray(h)){const _=new Array(h.length);y.set(h,_);for(let w=0;w<h.length;w++)_[w]=c(h[w],w,g,y,x);return Object.hasOwn(h,"index")&&(_.index=h.index),Object.hasOwn(h,"input")&&(_.input=h.input),_}if(h instanceof Date)return new Date(h.getTime());if(h instanceof RegExp){const _=new RegExp(h.source,h.flags);return _.lastIndex=h.lastIndex,_}if(h instanceof Map){const _=new Map;y.set(h,_);for(const[w,A]of h)_.set(w,c(A,w,g,y,x));return _}if(h instanceof Set){const _=new Set;y.set(h,_);for(const w of h)_.add(c(w,void 0,g,y,x));return _}if(typeof Buffer<"u"&&Buffer.isBuffer(h))return h.subarray();if(o.isTypedArray(h)){const _=new(Object.getPrototypeOf(h)).constructor(h.length);y.set(h,_);for(let w=0;w<h.length;w++)_[w]=c(h[w],w,g,y,x);return _}if(h instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&h instanceof SharedArrayBuffer)return h.slice(0);if(h instanceof DataView){const _=new DataView(h.buffer.slice(0),h.byteOffset,h.byteLength);return y.set(h,_),f(_,h,g,y,x),_}if(typeof File<"u"&&h instanceof File){const _=new File([h],h.name,{type:h.type});return y.set(h,_),f(_,h,g,y,x),_}if(typeof Blob<"u"&&h instanceof Blob){const _=new Blob([h],{type:h.type});return y.set(h,_),f(_,h,g,y,x),_}if(h instanceof Error){const _=structuredClone(h);return y.set(h,_),_.message=h.message,_.name=h.name,_.stack=h.stack,_.cause=h.cause,_.constructor=h.constructor,f(_,h,g,y,x),_}if(h instanceof Boolean){const _=new Boolean(h.valueOf());return y.set(h,_),f(_,h,g,y,x),_}if(h instanceof Number){const _=new Number(h.valueOf());return y.set(h,_),f(_,h,g,y,x),_}if(h instanceof String){const _=new String(h.valueOf());return y.set(h,_),f(_,h,g,y,x),_}if(typeof h=="object"&&d(h)){const _=Object.create(Object.getPrototypeOf(h));return y.set(h,_),f(_,h,g,y,x),_}return h}function f(h,m,g=h,y,x){const E=[...Object.keys(m),...r.getSymbols(m)];for(let _=0;_<E.length;_++){const w=E[_],A=Object.getOwnPropertyDescriptor(h,w);(A==null||A.writable)&&(h[w]=c(m[w],w,g,y,x))}}function d(h){switch(n.getTag(h)){case a.argumentsTag:case a.arrayTag:case a.arrayBufferTag:case a.dataViewTag:case a.booleanTag:case a.dateTag:case a.float32ArrayTag:case a.float64ArrayTag:case a.int8ArrayTag:case a.int16ArrayTag:case a.int32ArrayTag:case a.mapTag:case a.numberTag:case a.objectTag:case a.regexpTag:case a.setTag:case a.stringTag:case a.symbolTag:case a.uint8ArrayTag:case a.uint8ClampedArrayTag:case a.uint16ArrayTag:case a.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=s,e.cloneDeepWithImpl=c,e.copyProperties=f})(Gy)),Gy}var CN;function yie(){return CN||(CN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Cz();function n(a){return r.cloneDeepWithImpl(a,void 0,a,new Map,void 0)}e.cloneDeep=n})(Hy)),Hy}var ON;function bie(){return ON||(ON=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=jz(),n=yie();function a(i){return i=n.cloneDeep(i),o=>r.isMatch(o,i)}e.matches=a})(zy)),zy}var Wy={},Zy={},Qy={},TN;function xie(){return TN||(TN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Cz(),n=LE(),a=Az();function i(o,s){return r.cloneDeepWith(o,(c,f,d,h)=>{const m=s==null?void 0:s(c,f,d,h);if(m!==void 0)return m;if(typeof o=="object"){if(n.getTag(o)===a.objectTag&&typeof o.constructor!="function"){const g={};return h.set(o,g),r.copyProperties(g,o,d,h),g}switch(Object.prototype.toString.call(o)){case a.numberTag:case a.stringTag:case a.booleanTag:{const g=new o.constructor(o==null?void 0:o.valueOf());return r.copyProperties(g,o),g}case a.argumentsTag:{const g={};return r.copyProperties(g,o),g.length=o.length,g[Symbol.iterator]=o[Symbol.iterator],g}default:return}}})}e.cloneDeepWith=i})(Qy)),Qy}var NN;function _ie(){return NN||(NN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=xie();function n(a){return r.cloneDeepWith(a)}e.cloneDeep=n})(Zy)),Zy}var Jy={},e0={},MN;function Oz(){return MN||(MN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=/^(?:0|[1-9]\d*)$/;function n(a,i=Number.MAX_SAFE_INTEGER){switch(typeof a){case"number":return Number.isInteger(a)&&a>=0&&a<i;case"symbol":return!1;case"string":return r.test(a)}}e.isIndex=n})(e0)),e0}var t0={},RN;function wie(){return RN||(RN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=LE();function n(a){return a!==null&&typeof a=="object"&&r.getTag(a)==="[object Arguments]"}e.isArguments=n})(t0)),t0}var PN;function Sie(){return PN||(PN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=mz(),n=Oz(),a=wie(),i=RE();function o(s,c){let f;if(Array.isArray(c)?f=c:typeof c=="string"&&r.isDeepKey(c)&&(s==null?void 0:s[c])==null?f=i.toPath(c):f=[c],f.length===0)return!1;let d=s;for(let h=0;h<f.length;h++){const m=f[h];if((d==null||!Object.hasOwn(d,m))&&!((Array.isArray(d)||a.isArguments(d))&&n.isIndex(m)&&m<d.length))return!1;d=d[m]}return!0}e.has=o})(Jy)),Jy}var DN;function Eie(){return DN||(DN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=jz(),n=ME(),a=_ie(),i=PE(),o=Sie();function s(c,f){switch(typeof c){case"object":{Object.is(c==null?void 0:c.valueOf(),-0)&&(c="-0");break}case"number":{c=n.toKey(c);break}}return f=a.cloneDeep(f),function(d){const h=i.get(d,c);return h===void 0?o.has(d,c):f===void 0?h===void 0:r.isMatch(h,f)}}e.matchesProperty=s})(Wy)),Wy}var LN;function kie(){return LN||(LN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=_z(),n=pie(),a=bie(),i=Eie();function o(s){if(s==null)return r.identity;switch(typeof s){case"function":return s;case"object":return Array.isArray(s)&&s.length===2?i.matchesProperty(s[0],s[1]):a.matches(s);case"string":case"symbol":case"number":return n.property(s)}}e.iteratee=o})(Ly)),Ly}var IN;function jie(){return IN||(IN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=uie(),n=cie(),a=_z(),i=hie(),o=kie();function s(c,f=a.identity){return i.isArrayLikeObject(c)?r.uniqBy(Array.from(c),n.ary(o.iteratee(f),1)):[]}e.uniqBy=s})(Cy)),Cy}var r0,zN;function Aie(){return zN||(zN=1,r0=jie().uniqBy),r0}var Cie=Aie();const qN=In(Cie);function Oie(e,r,n){return r===!0?qN(e,n):typeof r=="function"?qN(e,r):e}var n0={exports:{}},a0={},i0={exports:{}},o0={};/**
118
+ * @license React
119
+ * use-sync-external-store-shim.production.js
120
+ *
121
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
122
+ *
123
+ * This source code is licensed under the MIT license found in the
124
+ * LICENSE file in the root directory of this source tree.
125
+ */var BN;function Tie(){if(BN)return o0;BN=1;var e=os();function r(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var n=typeof Object.is=="function"?Object.is:r,a=e.useState,i=e.useEffect,o=e.useLayoutEffect,s=e.useDebugValue;function c(m,g){var y=g(),x=a({inst:{value:y,getSnapshot:g}}),E=x[0].inst,_=x[1];return o(function(){E.value=y,E.getSnapshot=g,f(E)&&_({inst:E})},[m,y,g]),i(function(){return f(E)&&_({inst:E}),m(function(){f(E)&&_({inst:E})})},[m]),s(y),y}function f(m){var g=m.getSnapshot;m=m.value;try{var y=g();return!n(m,y)}catch{return!0}}function d(m,g){return g()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:c;return o0.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,o0}var $N;function Nie(){return $N||($N=1,i0.exports=Tie()),i0.exports}/**
126
+ * @license React
127
+ * use-sync-external-store-shim/with-selector.production.js
128
+ *
129
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
130
+ *
131
+ * This source code is licensed under the MIT license found in the
132
+ * LICENSE file in the root directory of this source tree.
133
+ */var FN;function Mie(){if(FN)return a0;FN=1;var e=os(),r=Nie();function n(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var a=typeof Object.is=="function"?Object.is:n,i=r.useSyncExternalStore,o=e.useRef,s=e.useEffect,c=e.useMemo,f=e.useDebugValue;return a0.useSyncExternalStoreWithSelector=function(d,h,m,g,y){var x=o(null);if(x.current===null){var E={hasValue:!1,value:null};x.current=E}else E=x.current;x=c(function(){function w(N){if(!A){if(A=!0,C=N,N=g(N),y!==void 0&&E.hasValue){var M=E.value;if(y(M,N))return O=M}return O=N}if(M=O,a(C,N))return M;var P=g(N);return y!==void 0&&y(M,P)?(C=N,M):(C=N,O=P)}var A=!1,C,O,T=m===void 0?null:m;return[function(){return w(h())},T===null?void 0:function(){return w(T())}]},[h,m,g,y]);var _=i(d,x[0],x[1]);return s(function(){E.hasValue=!0,E.value=_},[_]),f(_),_},a0}var UN;function Rie(){return UN||(UN=1,n0.exports=Mie()),n0.exports}var Pie=Rie(),IE=k.createContext(null),Die=e=>e,kt=()=>{var e=k.useContext(IE);return e?e.store.dispatch:Die},eh=()=>{},Lie=()=>eh,Iie=(e,r)=>e===r;function Ce(e){var r=k.useContext(IE),n=k.useMemo(()=>r?a=>{if(a!=null)return e(a)}:eh,[r,e]);return Pie.useSyncExternalStoreWithSelector(r?r.subscription.addNestedSub:Lie,r?r.store.getState:eh,r?r.store.getState:eh,n,Iie)}function zie(e,r=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(r)}function qie(e,r=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(r)}function Bie(e,r="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(a=>typeof a=="function"?`function ${a.name||"unnamed"}()`:typeof a).join(", ");throw new TypeError(`${r}[${n}]`)}}var HN=e=>Array.isArray(e)?e:[e];function $ie(e){const r=Array.isArray(e[0])?e[0]:e;return Bie(r,"createSelector expects all input-selectors to be functions, but received the following types: "),r}function Fie(e,r){const n=[],{length:a}=e;for(let i=0;i<a;i++)n.push(e[i].apply(null,r));return n}var Uie=class{constructor(e){this.value=e}deref(){return this.value}},Hie=typeof WeakRef<"u"?WeakRef:Uie,Gie=0,GN=1;function Dd(){return{s:Gie,v:void 0,o:null,p:null}}function Tz(e,r={}){let n=Dd();const{resultEqualityCheck:a}=r;let i,o=0;function s(){var m;let c=n;const{length:f}=arguments;for(let g=0,y=f;g<y;g++){const x=arguments[g];if(typeof x=="function"||typeof x=="object"&&x!==null){let E=c.o;E===null&&(c.o=E=new WeakMap);const _=E.get(x);_===void 0?(c=Dd(),E.set(x,c)):c=_}else{let E=c.p;E===null&&(c.p=E=new Map);const _=E.get(x);_===void 0?(c=Dd(),E.set(x,c)):c=_}}const d=c;let h;if(c.s===GN)h=c.v;else if(h=e.apply(null,arguments),o++,a){const g=((m=i==null?void 0:i.deref)==null?void 0:m.call(i))??i;g!=null&&a(g,h)&&(h=g,o!==0&&o--),i=typeof h=="object"&&h!==null||typeof h=="function"?new Hie(h):h}return d.s=GN,d.v=h,h}return s.clearCache=()=>{n=Dd(),s.resetResultsCount()},s.resultsCount=()=>o,s.resetResultsCount=()=>{o=0},s}function Vie(e,...r){const n=typeof e=="function"?{memoize:e,memoizeOptions:r}:e,a=(...i)=>{let o=0,s=0,c,f={},d=i.pop();typeof d=="object"&&(f=d,d=i.pop()),zie(d,`createSelector expects an output function after the inputs, but received: [${typeof d}]`);const h={...n,...f},{memoize:m,memoizeOptions:g=[],argsMemoize:y=Tz,argsMemoizeOptions:x=[]}=h,E=HN(g),_=HN(x),w=$ie(i),A=m(function(){return o++,d.apply(null,arguments)},...E),C=y(function(){s++;const T=Fie(w,arguments);return c=A.apply(null,T),c},..._);return Object.assign(C,{resultFunc:d,memoizedResultFunc:A,dependencies:w,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>c,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:m,argsMemoize:y})};return Object.assign(a,{withTypes:()=>a}),a}var de=Vie(Tz),Kie=Object.assign((e,r=de)=>{qie(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),a=n.map(o=>e[o]);return r(a,(...o)=>o.reduce((s,c,f)=>(s[n[f]]=c,s),{}))},{withTypes:()=>Kie}),l0={},s0={},u0={},VN;function Yie(){return VN||(VN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(a){return typeof a=="symbol"?1:a===null?2:a===void 0?3:a!==a?4:0}const n=(a,i,o)=>{if(a!==i){const s=r(a),c=r(i);if(s===c&&s===0){if(a<i)return o==="desc"?1:-1;if(a>i)return o==="desc"?-1:1}return o==="desc"?c-s:s-c}return 0};e.compareValues=n})(u0)),u0}var c0={},f0={},KN;function Nz(){return KN||(KN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){return typeof n=="symbol"||n instanceof Symbol}e.isSymbol=r})(f0)),f0}var YN;function Xie(){return YN||(YN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Nz(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function i(o,s){return Array.isArray(o)?!1:typeof o=="number"||typeof o=="boolean"||o==null||r.isSymbol(o)?!0:typeof o=="string"&&(a.test(o)||!n.test(o))||s!=null&&Object.hasOwn(s,o)}e.isKey=i})(c0)),c0}var XN;function Wie(){return XN||(XN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Yie(),n=Xie(),a=RE();function i(o,s,c,f){if(o==null)return[];c=f?void 0:c,Array.isArray(o)||(o=Object.values(o)),Array.isArray(s)||(s=s==null?[null]:[s]),s.length===0&&(s=[null]),Array.isArray(c)||(c=c==null?[]:[c]),c=c.map(y=>String(y));const d=(y,x)=>{let E=y;for(let _=0;_<x.length&&E!=null;++_)E=E[x[_]];return E},h=(y,x)=>x==null||y==null?x:typeof y=="object"&&"key"in y?Object.hasOwn(x,y.key)?x[y.key]:d(x,y.path):typeof y=="function"?y(x):Array.isArray(y)?d(x,y):typeof x=="object"?x[y]:x,m=s.map(y=>(Array.isArray(y)&&y.length===1&&(y=y[0]),y==null||typeof y=="function"||Array.isArray(y)||n.isKey(y)?y:{key:y,path:a.toPath(y)}));return o.map(y=>({original:y,criteria:m.map(x=>h(x,y))})).slice().sort((y,x)=>{for(let E=0;E<m.length;E++){const _=r.compareValues(y.criteria[E],x.criteria[E],c[E]);if(_!==0)return _}return 0}).map(y=>y.original)}e.orderBy=i})(s0)),s0}var d0={},WN;function Zie(){return WN||(WN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n,a=1){const i=[],o=Math.floor(a),s=(c,f)=>{for(let d=0;d<c.length;d++){const h=c[d];Array.isArray(h)&&f<o?s(h,f+1):i.push(h)}};return s(n,0),i}e.flatten=r})(d0)),d0}var h0={},ZN;function Mz(){return ZN||(ZN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Oz(),n=wz(),a=Sz(),i=kz();function o(s,c,f){return a.isObject(f)&&(typeof c=="number"&&n.isArrayLike(f)&&r.isIndex(c)&&c<f.length||typeof c=="string"&&c in f)?i.isEqualsSameValueZero(f[c],s):!1}e.isIterateeCall=o})(h0)),h0}var QN;function Qie(){return QN||(QN=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Wie(),n=Zie(),a=Mz();function i(o,...s){const c=s.length;return c>1&&a.isIterateeCall(o,s[0],s[1])?s=[]:c>2&&a.isIterateeCall(s[0],s[1],s[2])&&(s=[s[0]]),r.orderBy(o,n.flatten(s),["asc"])}e.sortBy=i})(l0)),l0}var p0,JN;function Jie(){return JN||(JN=1,p0=Qie().sortBy),p0}var eoe=Jie();const Bp=In(eoe);var Rz=e=>e.legend.settings,toe=e=>e.legend.size,roe=e=>e.legend.payload;de([roe,Rz],(e,r)=>{var{itemSorter:n}=r,a=e.flat(1);return n?Bp(a,n):a});var Ld=1;function noe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[r,n]=k.useState({height:0,left:0,top:0,width:0}),a=k.useCallback(i=>{if(i!=null){var o=i.getBoundingClientRect(),s={height:o.height,left:o.left,top:o.top,width:o.width};(Math.abs(s.height-r.height)>Ld||Math.abs(s.left-r.left)>Ld||Math.abs(s.top-r.top)>Ld||Math.abs(s.width-r.width)>Ld)&&n({height:s.height,left:s.left,top:s.top,width:s.width})}},[r.width,r.height,r.top,r.left,...e]);return[r,a]}function Jt(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var aoe=typeof Symbol=="function"&&Symbol.observable||"@@observable",e4=aoe,m0=()=>Math.random().toString(36).substring(7).split("").join("."),ioe={INIT:`@@redux/INIT${m0()}`,REPLACE:`@@redux/REPLACE${m0()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${m0()}`},Ih=ioe;function zE(e){if(typeof e!="object"||e===null)return!1;let r=e;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r||Object.getPrototypeOf(e)===null}function Pz(e,r,n){if(typeof e!="function")throw new Error(Jt(2));if(typeof r=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Jt(0));if(typeof r=="function"&&typeof n>"u"&&(n=r,r=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Jt(1));return n(Pz)(e,r)}let a=e,i=r,o=new Map,s=o,c=0,f=!1;function d(){s===o&&(s=new Map,o.forEach((_,w)=>{s.set(w,_)}))}function h(){if(f)throw new Error(Jt(3));return i}function m(_){if(typeof _!="function")throw new Error(Jt(4));if(f)throw new Error(Jt(5));let w=!0;d();const A=c++;return s.set(A,_),function(){if(w){if(f)throw new Error(Jt(6));w=!1,d(),s.delete(A),o=null}}}function g(_){if(!zE(_))throw new Error(Jt(7));if(typeof _.type>"u")throw new Error(Jt(8));if(typeof _.type!="string")throw new Error(Jt(17));if(f)throw new Error(Jt(9));try{f=!0,i=a(i,_)}finally{f=!1}return(o=s).forEach(A=>{A()}),_}function y(_){if(typeof _!="function")throw new Error(Jt(10));a=_,g({type:Ih.REPLACE})}function x(){const _=m;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(Jt(11));function A(){const O=w;O.next&&O.next(h())}return A(),{unsubscribe:_(A)}},[e4](){return this}}}return g({type:Ih.INIT}),{dispatch:g,subscribe:m,getState:h,replaceReducer:y,[e4]:x}}function ooe(e){Object.keys(e).forEach(r=>{const n=e[r];if(typeof n(void 0,{type:Ih.INIT})>"u")throw new Error(Jt(12));if(typeof n(void 0,{type:Ih.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Jt(13))})}function Dz(e){const r=Object.keys(e),n={};for(let o=0;o<r.length;o++){const s=r[o];typeof e[s]=="function"&&(n[s]=e[s])}const a=Object.keys(n);let i;try{ooe(n)}catch(o){i=o}return function(s={},c){if(i)throw i;let f=!1;const d={};for(let h=0;h<a.length;h++){const m=a[h],g=n[m],y=s[m],x=g(y,c);if(typeof x>"u")throw c&&c.type,new Error(Jt(14));d[m]=x,f=f||x!==y}return f=f||a.length!==Object.keys(s).length,f?d:s}}function zh(...e){return e.length===0?r=>r:e.length===1?e[0]:e.reduce((r,n)=>(...a)=>r(n(...a)))}function loe(...e){return r=>(n,a)=>{const i=r(n,a);let o=()=>{throw new Error(Jt(15))};const s={getState:i.getState,dispatch:(f,...d)=>o(f,...d)},c=e.map(f=>f(s));return o=zh(...c)(i.dispatch),{...i,dispatch:o}}}function Lz(e){return zE(e)&&"type"in e&&typeof e.type=="string"}var Iz=Symbol.for("immer-nothing"),t4=Symbol.for("immer-draftable"),gr=Symbol.for("immer-state");function Mn(e,...r){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Gr=Object,ns=Gr.getPrototypeOf,qh="constructor",$p="prototype",G2="configurable",Bh="enumerable",th="writable",uc="value",Ja=e=>!!e&&!!e[gr];function Dn(e){var r;return e?zz(e)||Up(e)||!!e[t4]||!!((r=e[qh])!=null&&r[t4])||Hp(e)||Gp(e):!1}var soe=Gr[$p][qh].toString(),r4=new WeakMap;function zz(e){if(!e||!qE(e))return!1;const r=ns(e);if(r===null||r===Gr[$p])return!0;const n=Gr.hasOwnProperty.call(r,qh)&&r[qh];if(n===Object)return!0;if(!Hl(n))return!1;let a=r4.get(n);return a===void 0&&(a=Function.toString.call(n),r4.set(n,a)),a===soe}function Fp(e,r,n=!0){Pc(e)===0?(n?Reflect.ownKeys(e):Gr.keys(e)).forEach(i=>{r(i,e[i],e)}):e.forEach((a,i)=>r(i,a,e))}function Pc(e){const r=e[gr];return r?r.type_:Up(e)?1:Hp(e)?2:Gp(e)?3:0}var n4=(e,r,n=Pc(e))=>n===2?e.has(r):Gr[$p].hasOwnProperty.call(e,r),V2=(e,r,n=Pc(e))=>n===2?e.get(r):e[r],$h=(e,r,n,a=Pc(e))=>{a===2?e.set(r,n):a===3?e.add(n):e[r]=n};function uoe(e,r){return e===r?e!==0||1/e===1/r:e!==e&&r!==r}var Up=Array.isArray,Hp=e=>e instanceof Map,Gp=e=>e instanceof Set,qE=e=>typeof e=="object",Hl=e=>typeof e=="function",v0=e=>typeof e=="boolean";function coe(e){const r=+e;return Number.isInteger(r)&&String(r)===e}var za=e=>e.copy_||e.base_,BE=e=>e.modified_?e.copy_:e.base_;function K2(e,r){if(Hp(e))return new Map(e);if(Gp(e))return new Set(e);if(Up(e))return Array[$p].slice.call(e);const n=zz(e);if(r===!0||r==="class_only"&&!n){const a=Gr.getOwnPropertyDescriptors(e);delete a[gr];let i=Reflect.ownKeys(a);for(let o=0;o<i.length;o++){const s=i[o],c=a[s];c[th]===!1&&(c[th]=!0,c[G2]=!0),(c.get||c.set)&&(a[s]={[G2]:!0,[th]:!0,[Bh]:c[Bh],[uc]:e[s]})}return Gr.create(ns(e),a)}else{const a=ns(e);if(a!==null&&n)return{...e};const i=Gr.create(a);return Gr.assign(i,e)}}function $E(e,r=!1){return Vp(e)||Ja(e)||!Dn(e)||(Pc(e)>1&&Gr.defineProperties(e,{set:Id,add:Id,clear:Id,delete:Id}),Gr.freeze(e),r&&Fp(e,(n,a)=>{$E(a,!0)},!1)),e}function foe(){Mn(2)}var Id={[uc]:foe};function Vp(e){return e===null||!qE(e)?!0:Gr.isFrozen(e)}var Fh="MapSet",Y2="Patches",a4="ArrayMethods",qz={};function Io(e){const r=qz[e];return r||Mn(0,e),r}var i4=e=>!!qz[e],cc,Bz=()=>cc,doe=(e,r)=>({drafts_:[],parent_:e,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:i4(Fh)?Io(Fh):void 0,arrayMethodsPlugin_:i4(a4)?Io(a4):void 0});function o4(e,r){r&&(e.patchPlugin_=Io(Y2),e.patches_=[],e.inversePatches_=[],e.patchListener_=r)}function X2(e){W2(e),e.drafts_.forEach(hoe),e.drafts_=null}function W2(e){e===cc&&(cc=e.parent_)}var l4=e=>cc=doe(cc,e);function hoe(e){const r=e[gr];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function s4(e,r){r.unfinalizedDrafts_=r.drafts_.length;const n=r.drafts_[0];if(e!==void 0&&e!==n){n[gr].modified_&&(X2(r),Mn(4)),Dn(e)&&(e=u4(r,e));const{patchPlugin_:i}=r;i&&i.generateReplacementPatches_(n[gr].base_,e,r)}else e=u4(r,n);return poe(r,e,!0),X2(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),e!==Iz?e:void 0}function u4(e,r){if(Vp(r))return r;const n=r[gr];if(!n)return Uh(r,e.handledSet_,e);if(!Kp(n,e))return r;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:a}=n;if(a)for(;a.length>0;)a.pop()(e);Uz(n,e)}return n.copy_}function poe(e,r,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&$E(r,n)}function $z(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Kp=(e,r)=>e.scope_===r,moe=[];function Fz(e,r,n,a){const i=za(e),o=e.type_;if(a!==void 0&&V2(i,a,o)===r){$h(i,a,n,o);return}if(!e.draftLocations_){const c=e.draftLocations_=new Map;Fp(i,(f,d)=>{if(Ja(d)){const h=c.get(d)||[];h.push(f),c.set(d,h)}})}const s=e.draftLocations_.get(r)??moe;for(const c of s)$h(i,c,n,o)}function voe(e,r,n){e.callbacks_.push(function(i){var c;const o=r;if(!o||!Kp(o,i))return;(c=i.mapSetPlugin_)==null||c.fixSetContents(o);const s=BE(o);Fz(e,o.draft_??o,s,n),Uz(o,i)})}function Uz(e,r){var a;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((a=e.assigned_)==null?void 0:a.size)??0)>0)){const{patchPlugin_:i}=r;if(i){const o=i.getPath(e);o&&i.generatePatches_(e,o,r)}$z(e)}}function goe(e,r,n){const{scope_:a}=e;if(Ja(n)){const i=n[gr];Kp(i,a)&&i.callbacks_.push(function(){rh(e);const s=BE(i);Fz(e,n,s,r)})}else Dn(n)&&e.callbacks_.push(function(){const o=za(e);e.type_===3?o.has(n)&&Uh(n,a.handledSet_,a):V2(o,r,e.type_)===n&&a.drafts_.length>1&&(e.assigned_.get(r)??!1)===!0&&e.copy_&&Uh(V2(e.copy_,r,e.type_),a.handledSet_,a)})}function Uh(e,r,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Ja(e)||r.has(e)||!Dn(e)||Vp(e)||(r.add(e),Fp(e,(a,i)=>{if(Ja(i)){const o=i[gr];if(Kp(o,n)){const s=BE(o);$h(e,a,s,e.type_),$z(o)}}else Dn(i)&&Uh(i,r,n)})),e}function yoe(e,r){const n=Up(e),a={type_:n?1:0,scope_:r?r.scope_:Bz(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:r,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=a,o=Hh;n&&(i=[a],o=fc);const{revoke:s,proxy:c}=Proxy.revocable(i,o);return a.draft_=c,a.revoke_=s,[c,a]}var Hh={get(e,r){if(r===gr)return e;let n=e.scope_.arrayMethodsPlugin_;const a=e.type_===1&&typeof r=="string";if(a&&n!=null&&n.isArrayOperationMethod(r))return n.createMethodInterceptor(e,r);const i=za(e);if(!n4(i,r,e.type_))return boe(e,i,r);const o=i[r];if(e.finalized_||!Dn(o)||a&&e.operationMethod&&(n!=null&&n.isMutatingArrayMethod(e.operationMethod))&&coe(r))return o;if(o===g0(e.base_,r)){rh(e);const s=e.type_===1?+r:r,c=Q2(e.scope_,o,e,s);return e.copy_[s]=c}return o},has(e,r){return r in za(e)},ownKeys(e){return Reflect.ownKeys(za(e))},set(e,r,n){const a=Hz(za(e),r);if(a!=null&&a.set)return a.set.call(e.draft_,n),!0;if(!e.modified_){const i=g0(za(e),r),o=i==null?void 0:i[gr];if(o&&o.base_===n)return e.copy_[r]=n,e.assigned_.set(r,!1),!0;if(uoe(n,i)&&(n!==void 0||n4(e.base_,r,e.type_)))return!0;rh(e),Z2(e)}return e.copy_[r]===n&&(n!==void 0||r in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[r])||(e.copy_[r]=n,e.assigned_.set(r,!0),goe(e,r,n)),!0},deleteProperty(e,r){return rh(e),g0(e.base_,r)!==void 0||r in e.base_?(e.assigned_.set(r,!1),Z2(e)):e.assigned_.delete(r),e.copy_&&delete e.copy_[r],!0},getOwnPropertyDescriptor(e,r){const n=za(e),a=Reflect.getOwnPropertyDescriptor(n,r);return a&&{[th]:!0,[G2]:e.type_!==1||r!=="length",[Bh]:a[Bh],[uc]:n[r]}},defineProperty(){Mn(11)},getPrototypeOf(e){return ns(e.base_)},setPrototypeOf(){Mn(12)}},fc={};for(let e in Hh){let r=Hh[e];fc[e]=function(){const n=arguments;return n[0]=n[0][0],r.apply(this,n)}}fc.deleteProperty=function(e,r){return fc.set.call(this,e,r,void 0)};fc.set=function(e,r,n){return Hh.set.call(this,e[0],r,n,e[0])};function g0(e,r){const n=e[gr];return(n?za(n):e)[r]}function boe(e,r,n){var i;const a=Hz(r,n);return a?uc in a?a[uc]:(i=a.get)==null?void 0:i.call(e.draft_):void 0}function Hz(e,r){if(!(r in e))return;let n=ns(e);for(;n;){const a=Object.getOwnPropertyDescriptor(n,r);if(a)return a;n=ns(n)}}function Z2(e){e.modified_||(e.modified_=!0,e.parent_&&Z2(e.parent_))}function rh(e){e.copy_||(e.assigned_=new Map,e.copy_=K2(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var xoe=class{constructor(r){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(n,a,i)=>{if(Hl(n)&&!Hl(a)){const s=a;a=n;const c=this;return function(d=s,...h){return c.produce(d,m=>a.call(this,m,...h))}}Hl(a)||Mn(6),i!==void 0&&!Hl(i)&&Mn(7);let o;if(Dn(n)){const s=l4(this),c=Q2(s,n,void 0);let f=!0;try{o=a(c),f=!1}finally{f?X2(s):W2(s)}return o4(s,i),s4(o,s)}else if(!n||!qE(n)){if(o=a(n),o===void 0&&(o=n),o===Iz&&(o=void 0),this.autoFreeze_&&$E(o,!0),i){const s=[],c=[];Io(Y2).generateReplacementPatches_(n,o,{patches_:s,inversePatches_:c}),i(s,c)}return o}else Mn(1,n)},this.produceWithPatches=(n,a)=>{if(Hl(n))return(c,...f)=>this.produceWithPatches(c,d=>n(d,...f));let i,o;return[this.produce(n,a,(c,f)=>{i=c,o=f}),i,o]},v0(r==null?void 0:r.autoFreeze)&&this.setAutoFreeze(r.autoFreeze),v0(r==null?void 0:r.useStrictShallowCopy)&&this.setUseStrictShallowCopy(r.useStrictShallowCopy),v0(r==null?void 0:r.useStrictIteration)&&this.setUseStrictIteration(r.useStrictIteration)}createDraft(r){Dn(r)||Mn(8),Ja(r)&&(r=yn(r));const n=l4(this),a=Q2(n,r,void 0);return a[gr].isManual_=!0,W2(n),a}finishDraft(r,n){const a=r&&r[gr];(!a||!a.isManual_)&&Mn(9);const{scope_:i}=a;return o4(i,n),s4(void 0,i)}setAutoFreeze(r){this.autoFreeze_=r}setUseStrictShallowCopy(r){this.useStrictShallowCopy_=r}setUseStrictIteration(r){this.useStrictIteration_=r}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(r,n){let a;for(a=n.length-1;a>=0;a--){const o=n[a];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}a>-1&&(n=n.slice(a+1));const i=Io(Y2).applyPatches_;return Ja(r)?i(r,n):this.produce(r,o=>i(o,n))}};function Q2(e,r,n,a){const[i,o]=Hp(r)?Io(Fh).proxyMap_(r,n):Gp(r)?Io(Fh).proxySet_(r,n):yoe(r,n);return((n==null?void 0:n.scope_)??Bz()).drafts_.push(i),o.callbacks_=(n==null?void 0:n.callbacks_)??[],o.key_=a,n&&a!==void 0?voe(n,o,a):o.callbacks_.push(function(f){var h;(h=f.mapSetPlugin_)==null||h.fixSetContents(o);const{patchPlugin_:d}=f;o.modified_&&d&&d.generatePatches_(o,[],f)}),i}function yn(e){return Ja(e)||Mn(10,e),Gz(e)}function Gz(e){if(!Dn(e)||Vp(e))return e;const r=e[gr];let n,a=!0;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,n=K2(e,r.scope_.immer_.useStrictShallowCopy_),a=r.scope_.immer_.shouldUseStrictIteration()}else n=K2(e,!0);return Fp(n,(i,o)=>{$h(n,i,Gz(o))},a),r&&(r.finalized_=!1),n}var _oe=new xoe,Vz=_oe.produce;function Kz(e){return({dispatch:n,getState:a})=>i=>o=>typeof o=="function"?o(n,a,e):i(o)}var woe=Kz(),Soe=Kz,Eoe=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?zh:zh.apply(null,arguments)};function Yr(e,r){function n(...a){if(r){let i=r(...a);if(!i)throw new Error(Vr(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:a[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=a=>Lz(a)&&a.type===e,n}var Yz=class Hu extends Array{constructor(...r){super(...r),Object.setPrototypeOf(this,Hu.prototype)}static get[Symbol.species](){return Hu}concat(...r){return super.concat.apply(this,r)}prepend(...r){return r.length===1&&Array.isArray(r[0])?new Hu(...r[0].concat(this)):new Hu(...r.concat(this))}};function c4(e){return Dn(e)?Vz(e,()=>{}):e}function zd(e,r,n){return e.has(r)?e.get(r):e.set(r,n(r)).get(r)}function koe(e){return typeof e=="boolean"}var joe=()=>function(r){const{thunk:n=!0,immutableCheck:a=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=r??{};let s=new Yz;return n&&(koe(n)?s.push(woe):s.push(Soe(n.extraArgument))),s},Xz="RTK_autoBatch",lt=()=>e=>({payload:e,meta:{[Xz]:!0}}),f4=e=>r=>{setTimeout(r,e)},Wz=(e={type:"raf"})=>r=>(...n)=>{const a=r(...n);let i=!0,o=!1,s=!1;const c=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:f4(10):e.type==="callback"?e.queueNotification:f4(e.timeout),d=()=>{s=!1,o&&(o=!1,c.forEach(h=>h()))};return Object.assign({},a,{subscribe(h){const m=()=>i&&h(),g=a.subscribe(m);return c.add(h),()=>{g(),c.delete(h)}},dispatch(h){var m;try{return i=!((m=h==null?void 0:h.meta)!=null&&m[Xz]),o=!i,o&&(s||(s=!0,f(d))),a.dispatch(h)}finally{i=!0}}})},Aoe=e=>function(n){const{autoBatch:a=!0}=n??{};let i=new Yz(e);return a&&i.push(Wz(typeof a=="object"?a:void 0)),i};function Coe(e){const r=joe(),{reducer:n=void 0,middleware:a,devTools:i=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{};let c;if(typeof n=="function")c=n;else if(zE(n))c=Dz(n);else throw new Error(Vr(1));let f;typeof a=="function"?f=a(r):f=r();let d=zh;i&&(d=Eoe({trace:!1,...typeof i=="object"&&i}));const h=loe(...f),m=Aoe(h);let g=typeof s=="function"?s(m):m();const y=d(...g);return Pz(c,o,y)}function Zz(e){const r={},n=[];let a;const i={addCase(o,s){const c=typeof o=="string"?o:o.type;if(!c)throw new Error(Vr(28));if(c in r)throw new Error(Vr(29));return r[c]=s,i},addAsyncThunk(o,s){return s.pending&&(r[o.pending.type]=s.pending),s.rejected&&(r[o.rejected.type]=s.rejected),s.fulfilled&&(r[o.fulfilled.type]=s.fulfilled),s.settled&&n.push({matcher:o.settled,reducer:s.settled}),i},addMatcher(o,s){return n.push({matcher:o,reducer:s}),i},addDefaultCase(o){return a=o,i}};return e(i),[r,n,a]}function Ooe(e){return typeof e=="function"}function Toe(e,r){let[n,a,i]=Zz(r),o;if(Ooe(e))o=()=>c4(e());else{const c=c4(e);o=()=>c}function s(c=o(),f){let d=[n[f.type],...a.filter(({matcher:h})=>h(f)).map(({reducer:h})=>h)];return d.filter(h=>!!h).length===0&&(d=[i]),d.reduce((h,m)=>{if(m)if(Ja(h)){const y=m(h,f);return y===void 0?h:y}else{if(Dn(h))return Vz(h,g=>m(g,f));{const g=m(h,f);if(g===void 0){if(h===null)return h;throw Error("A case reducer on a non-draftable value must not return undefined")}return g}}return h},c)}return s.getInitialState=o,s}var Noe="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Moe=(e=21)=>{let r="",n=e;for(;n--;)r+=Noe[Math.random()*64|0];return r},Roe=Symbol.for("rtk-slice-createasyncthunk");function Poe(e,r){return`${e}/${r}`}function Doe({creators:e}={}){var n;const r=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[Roe];return function(i){const{name:o,reducerPath:s=o}=i;if(!o)throw new Error(Vr(11));const c=(typeof i.reducers=="function"?i.reducers(Ioe()):i.reducers)||{},f=Object.keys(c),d={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},h={addCase(O,T){const N=typeof O=="string"?O:O.type;if(!N)throw new Error(Vr(12));if(N in d.sliceCaseReducersByType)throw new Error(Vr(13));return d.sliceCaseReducersByType[N]=T,h},addMatcher(O,T){return d.sliceMatchers.push({matcher:O,reducer:T}),h},exposeAction(O,T){return d.actionCreators[O]=T,h},exposeCaseReducer(O,T){return d.sliceCaseReducersByName[O]=T,h}};f.forEach(O=>{const T=c[O],N={reducerName:O,type:Poe(o,O),createNotation:typeof i.reducers=="function"};qoe(T)?$oe(N,T,h,r):zoe(N,T,h)});function m(){const[O={},T=[],N=void 0]=typeof i.extraReducers=="function"?Zz(i.extraReducers):[i.extraReducers],M={...O,...d.sliceCaseReducersByType};return Toe(i.initialState,P=>{for(let L in M)P.addCase(L,M[L]);for(let L of d.sliceMatchers)P.addMatcher(L.matcher,L.reducer);for(let L of T)P.addMatcher(L.matcher,L.reducer);N&&P.addDefaultCase(N)})}const g=O=>O,y=new Map,x=new WeakMap;let E;function _(O,T){return E||(E=m()),E(O,T)}function w(){return E||(E=m()),E.getInitialState()}function A(O,T=!1){function N(P){let L=P[O];return typeof L>"u"&&T&&(L=zd(x,N,w)),L}function M(P=g){const L=zd(y,T,()=>new WeakMap);return zd(L,P,()=>{const D={};for(const[q,z]of Object.entries(i.selectors??{}))D[q]=Loe(z,P,()=>zd(x,P,w),T);return D})}return{reducerPath:O,getSelectors:M,get selectors(){return M(N)},selectSlice:N}}const C={name:o,reducer:_,actions:d.actionCreators,caseReducers:d.sliceCaseReducersByName,getInitialState:w,...A(s),injectInto(O,{reducerPath:T,...N}={}){const M=T??s;return O.inject({reducerPath:M,reducer:_},N),{...C,...A(M,!0)}}};return C}}function Loe(e,r,n,a){function i(o,...s){let c=r(o);return typeof c>"u"&&a&&(c=n()),e(c,...s)}return i.unwrapped=e,i}var dr=Doe();function Ioe(){function e(r,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:r,...n}}return e.withTypes=()=>e,{reducer(r){return Object.assign({[r.name](...n){return r(...n)}}[r.name],{_reducerDefinitionType:"reducer"})},preparedReducer(r,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:r,reducer:n}},asyncThunk:e}}function zoe({type:e,reducerName:r,createNotation:n},a,i){let o,s;if("reducer"in a){if(n&&!Boe(a))throw new Error(Vr(17));o=a.reducer,s=a.prepare}else o=a;i.addCase(e,o).exposeCaseReducer(r,o).exposeAction(r,s?Yr(e,s):Yr(e))}function qoe(e){return e._reducerDefinitionType==="asyncThunk"}function Boe(e){return e._reducerDefinitionType==="reducerWithPrepare"}function $oe({type:e,reducerName:r},n,a,i){if(!i)throw new Error(Vr(18));const{payloadCreator:o,fulfilled:s,pending:c,rejected:f,settled:d,options:h}=n,m=i(e,o,h);a.exposeAction(r,m),s&&a.addCase(m.fulfilled,s),c&&a.addCase(m.pending,c),f&&a.addCase(m.rejected,f),d&&a.addMatcher(m.settled,d),a.exposeCaseReducer(r,{fulfilled:s||qd,pending:c||qd,rejected:f||qd,settled:d||qd})}function qd(){}var Foe="task",Qz="listener",Jz="completed",FE="cancelled",Uoe=`task-${FE}`,Hoe=`task-${Jz}`,J2=`${Qz}-${FE}`,Goe=`${Qz}-${Jz}`,Yp=class{constructor(e){bd(this,"name","TaskAbortError");bd(this,"message");this.code=e,this.message=`${Foe} ${FE} (reason: ${e})`}},UE=(e,r)=>{if(typeof e!="function")throw new TypeError(Vr(32))},Gh=()=>{},e7=(e,r=Gh)=>(e.catch(r),e),t7=(e,r)=>(e.addEventListener("abort",r,{once:!0}),()=>e.removeEventListener("abort",r)),No=e=>{if(e.aborted)throw new Yp(e.reason)};function r7(e,r){let n=Gh;return new Promise((a,i)=>{const o=()=>i(new Yp(e.reason));if(e.aborted){o();return}n=t7(e,o),r.finally(()=>n()).then(a,i)}).finally(()=>{n=Gh})}var Voe=async(e,r)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof Yp?"cancelled":"rejected",error:n}}finally{r==null||r()}},Vh=e=>r=>e7(r7(e,r).then(n=>(No(e),n))),n7=e=>{const r=Vh(e);return n=>r(new Promise(a=>setTimeout(a,n)))},{assign:Xl}=Object,d4={},Xp="listenerMiddleware",Koe=(e,r)=>{const n=a=>t7(e,()=>a.abort(e.reason));return(a,i)=>{UE(a);const o=new AbortController;n(o);const s=Voe(async()=>{No(e),No(o.signal);const c=await a({pause:Vh(o.signal),delay:n7(o.signal),signal:o.signal});return No(o.signal),c},()=>o.abort(Hoe));return i!=null&&i.autoJoin&&r.push(s.catch(Gh)),{result:Vh(e)(s),cancel(){o.abort(Uoe)}}}},Yoe=(e,r)=>{const n=async(a,i)=>{No(r);let o=()=>{};const c=[new Promise((f,d)=>{let h=e({predicate:a,effect:(m,g)=>{g.unsubscribe(),f([m,g.getState(),g.getOriginalState()])}});o=()=>{h(),d()}})];i!=null&&c.push(new Promise(f=>setTimeout(f,i,null)));try{const f=await r7(r,Promise.race(c));return No(r),f}finally{o()}};return(a,i)=>e7(n(a,i))},a7=e=>{let{type:r,actionCreator:n,matcher:a,predicate:i,effect:o}=e;if(r)i=Yr(r).match;else if(n)r=n.type,i=n.match;else if(a)i=a;else if(!i)throw new Error(Vr(21));return UE(o),{predicate:i,type:r,effect:o}},i7=Xl(e=>{const{type:r,predicate:n,effect:a}=a7(e);return{id:Moe(),effect:a,type:r,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Vr(22))}}},{withTypes:()=>i7}),h4=(e,r)=>{const{type:n,effect:a,predicate:i}=a7(r);return Array.from(e.values()).find(o=>(typeof n=="string"?o.type===n:o.predicate===i)&&o.effect===a)},eS=e=>{e.pending.forEach(r=>{r.abort(J2)})},Xoe=(e,r)=>()=>{for(const n of r.keys())eS(n);e.clear()},p4=(e,r,n)=>{try{e(r,n)}catch(a){setTimeout(()=>{throw a},0)}},o7=Xl(Yr(`${Xp}/add`),{withTypes:()=>o7}),Woe=Yr(`${Xp}/removeAll`),l7=Xl(Yr(`${Xp}/remove`),{withTypes:()=>l7}),Zoe=(...e)=>{console.error(`${Xp}/error`,...e)},Dc=(e={})=>{const r=new Map,n=new Map,a=y=>{const x=n.get(y)??0;n.set(y,x+1)},i=y=>{const x=n.get(y)??1;x===1?n.delete(y):n.set(y,x-1)},{extra:o,onError:s=Zoe}=e;UE(s);const c=y=>(y.unsubscribe=()=>r.delete(y.id),r.set(y.id,y),x=>{y.unsubscribe(),x!=null&&x.cancelActive&&eS(y)}),f=y=>{const x=h4(r,y)??i7(y);return c(x)};Xl(f,{withTypes:()=>f});const d=y=>{const x=h4(r,y);return x&&(x.unsubscribe(),y.cancelActive&&eS(x)),!!x};Xl(d,{withTypes:()=>d});const h=async(y,x,E,_)=>{const w=new AbortController,A=Yoe(f,w.signal),C=[];try{y.pending.add(w),a(y),await Promise.resolve(y.effect(x,Xl({},E,{getOriginalState:_,condition:(O,T)=>A(O,T).then(Boolean),take:A,delay:n7(w.signal),pause:Vh(w.signal),extra:o,signal:w.signal,fork:Koe(w.signal,C),unsubscribe:y.unsubscribe,subscribe:()=>{r.set(y.id,y)},cancelActiveListeners:()=>{y.pending.forEach((O,T,N)=>{O!==w&&(O.abort(J2),N.delete(O))})},cancel:()=>{w.abort(J2),y.pending.delete(w)},throwIfCancelled:()=>{No(w.signal)}})))}catch(O){O instanceof Yp||p4(s,O,{raisedBy:"effect"})}finally{await Promise.all(C),w.abort(Goe),i(y),y.pending.delete(w)}},m=Xoe(r,n);return{middleware:y=>x=>E=>{if(!Lz(E))return x(E);if(o7.match(E))return f(E.payload);if(Woe.match(E)){m();return}if(l7.match(E))return d(E.payload);let _=y.getState();const w=()=>{if(_===d4)throw new Error(Vr(23));return _};let A;try{if(A=x(E),r.size>0){const C=y.getState(),O=Array.from(r.values());for(const T of O){let N=!1;try{N=T.predicate(E,C,_)}catch(M){N=!1,p4(s,M,{raisedBy:"predicate"})}N&&h(T,E,y,w)}}}finally{_=d4}return A},startListening:f,stopListening:d,clearListeners:m}};function Vr(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Qoe={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},s7=dr({name:"chartLayout",initialState:Qoe,reducers:{setLayout(e,r){e.layoutType=r.payload},setChartSize(e,r){e.width=r.payload.width,e.height=r.payload.height},setMargin(e,r){var n,a,i,o;e.margin.top=(n=r.payload.top)!==null&&n!==void 0?n:0,e.margin.right=(a=r.payload.right)!==null&&a!==void 0?a:0,e.margin.bottom=(i=r.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(o=r.payload.left)!==null&&o!==void 0?o:0},setScale(e,r){e.scale=r.payload}}}),{setMargin:Joe,setLayout:ele,setChartSize:tle,setScale:rle}=s7.actions,nle=s7.reducer;function u7(e,r,n){return Array.isArray(e)&&e&&r+n!==0?e.slice(r,n+1):e}function De(e){return Number.isFinite(e)}function sa(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function m4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Gl(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?m4(Object(n),!0).forEach(function(a){ale(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function ale(e,r,n){return(r=ile(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function ile(e){var r=ole(e,"string");return typeof r=="symbol"?r:r+""}function ole(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function rr(e,r,n){return Ut(e)||Ut(r)?n:bn(r)?qp(e,r,n):typeof r=="function"?r(e):n}var lle=(e,r,n)=>{if(r&&n){var{width:a,height:i}=n,{align:o,verticalAlign:s,layout:c}=r;if((c==="vertical"||c==="horizontal"&&s==="middle")&&o!=="center"&&Ae(e[o]))return Gl(Gl({},e),{},{[o]:e[o]+(a||0)});if((c==="horizontal"||c==="vertical"&&o==="center")&&s!=="middle"&&Ae(e[s]))return Gl(Gl({},e),{},{[s]:e[s]+(i||0)})}return e},ni=(e,r)=>e==="horizontal"&&r==="xAxis"||e==="vertical"&&r==="yAxis"||e==="centric"&&r==="angleAxis"||e==="radial"&&r==="radiusAxis",c7=(e,r,n,a)=>{if(a)return e.map(c=>c.coordinate);var i,o,s=e.map(c=>(c.coordinate===r&&(i=!0),c.coordinate===n&&(o=!0),c.coordinate));return i||s.push(r),o||s.push(n),s},f7=(e,r,n)=>{if(!e)return null;var{duplicateDomain:a,type:i,range:o,scale:s,realScaleType:c,isCategorical:f,categoricalDomain:d,tickCount:h,ticks:m,niceTicks:g,axisType:y}=e;if(!s)return null;var x=c==="scaleBand"&&s.bandwidth?s.bandwidth()/2:2,E=i==="category"&&s.bandwidth?s.bandwidth()/x:0;if(E=y==="angleAxis"&&o&&o.length>=2?gn(o[0]-o[1])*2*E:E,m||g){var _=(m||g||[]).map((w,A)=>{var C=a?a.indexOf(w):w,O=s.map(C);return De(O)?{coordinate:O+E,value:w,offset:E,index:A}:null}).filter(Mr);return _}return f&&d?d.map((w,A)=>{var C=s.map(w);return De(C)?{coordinate:C+E,value:w,index:A,offset:E}:null}).filter(Mr):s.ticks&&h!=null?s.ticks(h).map((w,A)=>{var C=s.map(w);return De(C)?{coordinate:C+E,value:w,index:A,offset:E}:null}).filter(Mr):s.domain().map((w,A)=>{var C=s.map(w);return De(C)?{coordinate:C+E,value:a?a[w]:w,index:A,offset:E}:null}).filter(Mr)},sle=e=>{var r,n=e.length;if(!(n<=0)){var a=(r=e[0])===null||r===void 0?void 0:r.length;if(!(a==null||a<=0))for(var i=0;i<a;++i)for(var o=0,s=0,c=0;c<n;++c){var f=e[c],d=f==null?void 0:f[i];if(d!=null){var h=d[1],m=d[0],g=Qa(h)?m:h;g>=0?(d[0]=o,o+=g,d[1]=o):(d[0]=s,s+=g,d[1]=s)}}}},ule=e=>{var r,n=e.length;if(!(n<=0)){var a=(r=e[0])===null||r===void 0?void 0:r.length;if(!(a==null||a<=0))for(var i=0;i<a;++i)for(var o=0,s=0;s<n;++s){var c=e[s],f=c==null?void 0:c[i];if(f!=null){var d=Qa(f[1])?f[0]:f[1];d>=0?(f[0]=o,o+=d,f[1]=o):(f[0]=0,f[1]=0)}}}},cle={sign:sle,expand:zae,none:Do,silhouette:qae,wiggle:Bae,positive:ule},fle=(e,r,n)=>{var a,i=(a=cle[n])!==null&&a!==void 0?a:Do,o=Iae().keys(r).value((c,f)=>Number(rr(c,f,0))).order(U2).offset(i),s=o(e);return s.forEach((c,f)=>{c.forEach((d,h)=>{var m=rr(e[h],r[f],0);Array.isArray(m)&&m.length===2&&Ae(m[0])&&Ae(m[1])&&(d[0]=m[0],d[1]=m[1])})}),s};function v4(e){var{axis:r,ticks:n,bandSize:a,entry:i,index:o,dataKey:s}=e;if(r.type==="category"){if(!r.allowDuplicatedCategory&&r.dataKey&&!Ut(i[r.dataKey])){var c=gz(n,"value",i[r.dataKey]);if(c)return c.coordinate+a/2}return n!=null&&n[o]?n[o].coordinate+a/2:null}var f=rr(i,Ut(s)?r.dataKey:s),d=r.scale.map(f);return Ae(d)?d:null}var dle=e=>{var r=e.flat(2).filter(Ae);return[Math.min(...r),Math.max(...r)]},hle=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],ple=(e,r,n)=>{if(e!=null)return hle(Object.keys(e).reduce((a,i)=>{var o=e[i];if(!o)return a;var{stackedData:s}=o,c=s.reduce((f,d)=>{var h=u7(d,r,n),m=dle(h);return!De(m[0])||!De(m[1])?f:[Math.min(f[0],m[0]),Math.max(f[1],m[1])]},[1/0,-1/0]);return[Math.min(c[0],a[0]),Math.max(c[1],a[1])]},[1/0,-1/0]))},g4=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,y4=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Kh=(e,r,n)=>{if(e&&e.scale&&e.scale.bandwidth){var a=e.scale.bandwidth();if(!n||a>0)return a}if(e&&r&&r.length>=2){for(var i=Bp(r,h=>h.coordinate),o=1/0,s=1,c=i.length;s<c;s++){var f=i[s],d=i[s-1];o=Math.min(((f==null?void 0:f.coordinate)||0)-((d==null?void 0:d.coordinate)||0),o)}return o===1/0?0:o}return n?void 0:0};function b4(e){var{tooltipEntrySettings:r,dataKey:n,payload:a,value:i,name:o}=e;return Gl(Gl({},r),{},{dataKey:n,payload:a,value:i,name:o})}function d7(e,r){if(e)return String(e);if(typeof r=="string")return r}var mle=(e,r)=>{if(r==="horizontal")return e.relativeX;if(r==="vertical")return e.relativeY},vle=(e,r)=>r==="centric"?e.angle:e.radius,ai=e=>e.layout.width,ii=e=>e.layout.height,gle=e=>e.layout.scale,h7=e=>e.layout.margin,Wp=de(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Zp=de(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),yle="data-recharts-item-index",ble="data-recharts-item-id",Lc=60;function x4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Bd(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?x4(Object(n),!0).forEach(function(a){xle(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function xle(e,r,n){return(r=_le(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function _le(e){var r=wle(e,"string");return typeof r=="symbol"?r:r+""}function wle(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Sle=e=>e.brush.height;function Ele(e){var r=Zp(e);return r.reduce((n,a)=>{if(a.orientation==="left"&&!a.mirror&&!a.hide){var i=typeof a.width=="number"?a.width:Lc;return n+i}return n},0)}function kle(e){var r=Zp(e);return r.reduce((n,a)=>{if(a.orientation==="right"&&!a.mirror&&!a.hide){var i=typeof a.width=="number"?a.width:Lc;return n+i}return n},0)}function jle(e){var r=Wp(e);return r.reduce((n,a)=>a.orientation==="top"&&!a.mirror&&!a.hide?n+a.height:n,0)}function Ale(e){var r=Wp(e);return r.reduce((n,a)=>a.orientation==="bottom"&&!a.mirror&&!a.hide?n+a.height:n,0)}var ar=de([ai,ii,h7,Sle,Ele,kle,jle,Ale,Rz,toe],(e,r,n,a,i,o,s,c,f,d)=>{var h={left:(n.left||0)+i,right:(n.right||0)+o},m={top:(n.top||0)+s,bottom:(n.bottom||0)+c},g=Bd(Bd({},m),h),y=g.bottom;g.bottom+=a,g=lle(g,f,d);var x=e-g.left-g.right,E=r-g.top-g.bottom;return Bd(Bd({brushBottom:y},g),{},{width:Math.max(x,0),height:Math.max(E,0)})}),Cle=de(ar,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),p7=de(ai,ii,(e,r)=>({x:0,y:0,width:e,height:r})),Ole=k.createContext(null),xr=()=>k.useContext(Ole)!=null,Qp=e=>e.brush,Jp=de([Qp,ar,h7],(e,r,n)=>({height:e.height,x:Ae(e.x)?e.x:r.left,y:Ae(e.y)?e.y:r.top+r.height+r.brushBottom-((n==null?void 0:n.bottom)||0),width:Ae(e.width)?e.width:r.width})),y0={},b0={},x0={},_4;function Tle(){return _4||(_4=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n,a,{signal:i,edges:o}={}){let s,c=null;const f=o!=null&&o.includes("leading"),d=o==null||o.includes("trailing"),h=()=>{c!==null&&(n.apply(s,c),s=void 0,c=null)},m=()=>{d&&h(),E()};let g=null;const y=()=>{g!=null&&clearTimeout(g),g=setTimeout(()=>{g=null,m()},a)},x=()=>{g!==null&&(clearTimeout(g),g=null)},E=()=>{x(),s=void 0,c=null},_=()=>{h()},w=function(...A){if(i!=null&&i.aborted)return;s=this,c=A;const C=g==null;y(),f&&C&&h()};return w.schedule=y,w.cancel=E,w.flush=_,i==null||i.addEventListener("abort",E,{once:!0}),w}e.debounce=r})(x0)),x0}var w4;function Nle(){return w4||(w4=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Tle();function n(a,i=0,o={}){typeof o!="object"&&(o={});const{leading:s=!1,trailing:c=!0,maxWait:f}=o,d=Array(2);s&&(d[0]="leading"),c&&(d[1]="trailing");let h,m=null;const g=r.debounce(function(...E){h=a.apply(this,E),m=null},i,{edges:d}),y=function(...E){return f!=null&&(m===null&&(m=Date.now()),Date.now()-m>=f)?(h=a.apply(this,E),m=Date.now(),g.cancel(),g.schedule(),h):(g.apply(this,E),h)},x=()=>(g.flush(),h);return y.cancel=g.cancel,y.flush=x,y}e.debounce=n})(b0)),b0}var S4;function Mle(){return S4||(S4=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Nle();function n(a,i=0,o={}){const{leading:s=!0,trailing:c=!0}=o;return r.debounce(a,i,{leading:s,maxWait:i,trailing:c})}e.throttle=n})(y0)),y0}var _0,E4;function Rle(){return E4||(E4=1,_0=Mle().throttle),_0}var Ple=Rle();const Dle=In(Ple);var Yh=function(r,n){for(var a=arguments.length,i=new Array(a>2?a-2:0),o=2;o<a;o++)i[o-2]=arguments[o];if(typeof console<"u"&&console.warn&&(n===void 0&&console.warn("LogUtils requires an error message argument"),!r))if(n===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=0;console.warn(n.replace(/%s/g,()=>i[s++]))}},Jn={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},m7=(e,r,n)=>{var{width:a=Jn.width,height:i=Jn.height,aspect:o,maxHeight:s}=n,c=Lo(a)?e:Number(a),f=Lo(i)?r:Number(i);return o&&o>0&&(c?f=c/o:f&&(c=f*o),s&&f!=null&&f>s&&(f=s)),{calculatedWidth:c,calculatedHeight:f}},Lle={width:0,height:0,overflow:"visible"},Ile={width:0,overflowX:"visible"},zle={height:0,overflowY:"visible"},qle={},Ble=e=>{var{width:r,height:n}=e,a=Lo(r),i=Lo(n);return a&&i?Lle:a?Ile:i?zle:qle};function $le(e){var{width:r,height:n,aspect:a}=e,i=r,o=n;return i===void 0&&o===void 0?(i=Jn.width,o=Jn.height):i===void 0?i=a&&a>0?void 0:Jn.width:o===void 0&&(o=a&&a>0?void 0:Jn.height),{width:i,height:o}}function tS(){return tS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},tS.apply(null,arguments)}function k4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function j4(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?k4(Object(n),!0).forEach(function(a){Fle(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Fle(e,r,n){return(r=Ule(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Ule(e){var r=Hle(e,"string");return typeof r=="symbol"?r:r+""}function Hle(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var v7=k.createContext(Jn.initialDimension);function Gle(e){return sa(e.width)&&sa(e.height)}function g7(e){var{children:r,width:n,height:a}=e,i=k.useMemo(()=>({width:n,height:a}),[n,a]);return Gle(i)?k.createElement(v7.Provider,{value:i},r):null}var HE=()=>k.useContext(v7),Vle=k.forwardRef((e,r)=>{var{aspect:n,initialDimension:a=Jn.initialDimension,width:i,height:o,minWidth:s=Jn.minWidth,minHeight:c,maxHeight:f,children:d,debounce:h=Jn.debounce,id:m,className:g,onResize:y,style:x={}}=e,E=k.useRef(null),_=k.useRef();_.current=y,k.useImperativeHandle(r,()=>E.current);var[w,A]=k.useState({containerWidth:a.width,containerHeight:a.height}),C=k.useCallback((P,L)=>{A(D=>{var q=Math.round(P),z=Math.round(L);return D.containerWidth===q&&D.containerHeight===z?D:{containerWidth:q,containerHeight:z}})},[]);k.useEffect(()=>{if(E.current==null||typeof ResizeObserver>"u")return Ho;var P=z=>{var U,$=z[0];if($!=null){var{width:Y,height:B}=$.contentRect;C(Y,B),(U=_.current)===null||U===void 0||U.call(_,Y,B)}};h>0&&(P=Dle(P,h,{trailing:!0,leading:!1}));var L=new ResizeObserver(P),{width:D,height:q}=E.current.getBoundingClientRect();return C(D,q),L.observe(E.current),()=>{L.disconnect()}},[C,h]);var{containerWidth:O,containerHeight:T}=w;Yh(!n||n>0,"The aspect(%s) must be greater than zero.",n);var{calculatedWidth:N,calculatedHeight:M}=m7(O,T,{width:i,height:o,aspect:n,maxHeight:f});return Yh(N!=null&&N>0||M!=null&&M>0,`The width(%s) and height(%s) of chart should be greater than 0,
134
+ please check the style of container, or the props width(%s) and height(%s),
135
+ or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
136
+ height and width.`,N,M,i,o,s,c,n),k.createElement("div",{id:m?"".concat(m):void 0,className:Je("recharts-responsive-container",g),style:j4(j4({},x),{},{width:i,height:o,minWidth:s,minHeight:c,maxHeight:f}),ref:E},k.createElement("div",{style:Ble({width:i,height:o})},k.createElement(g7,{width:N,height:M},d)))}),Kle=k.forwardRef((e,r)=>{var n=HE();if(sa(n.width)&&sa(n.height))return e.children;var{width:a,height:i}=$le({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:o,calculatedHeight:s}=m7(void 0,void 0,{width:a,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return Ae(o)&&Ae(s)?k.createElement(g7,{width:o,height:s},e.children):k.createElement(Vle,tS({},e,{width:a,height:i,ref:r}))});function GE(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var Ic=()=>{var e,r=xr(),n=Ce(Cle),a=Ce(Jp),i=(e=Ce(Qp))===null||e===void 0?void 0:e.padding;return!r||!a||!i?n:{width:a.width-i.left-i.right,height:a.height-i.top-i.bottom,x:i.left,y:i.top}},Yle={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},y7=()=>{var e;return(e=Ce(ar))!==null&&e!==void 0?e:Yle},b7=()=>Ce(ai),x7=()=>Ce(ii),mt=e=>e.layout.layoutType,cs=()=>Ce(mt),_7=()=>{var e=cs();if(e==="horizontal"||e==="vertical")return e},w7=e=>{var r=e.layout.layoutType;if(r==="centric"||r==="radial")return r},Xle=()=>{var e=cs();return e!==void 0},zc=e=>{var r=kt(),n=xr(),{width:a,height:i}=e,o=HE(),s=a,c=i;return o&&(s=o.width>0?o.width:a,c=o.height>0?o.height:i),k.useEffect(()=>{!n&&sa(s)&&sa(c)&&r(tle({width:s,height:c}))},[r,n,s,c]),null},S7=Symbol.for("immer-nothing"),A4=Symbol.for("immer-draftable"),Xr=Symbol.for("immer-state");function Rn(e,...r){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var dc=Object.getPrototypeOf;function as(e){return!!e&&!!e[Xr]}function zo(e){var r;return e?E7(e)||Array.isArray(e)||!!e[A4]||!!((r=e.constructor)!=null&&r[A4])||qc(e)||tm(e):!1}var Wle=Object.prototype.constructor.toString(),C4=new WeakMap;function E7(e){if(!e||typeof e!="object")return!1;const r=Object.getPrototypeOf(e);if(r===null||r===Object.prototype)return!0;const n=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let a=C4.get(n);return a===void 0&&(a=Function.toString.call(n),C4.set(n,a)),a===Wle}function Xh(e,r,n=!0){em(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{r(i,e[i],e)}):e.forEach((a,i)=>r(i,a,e))}function em(e){const r=e[Xr];return r?r.type_:Array.isArray(e)?1:qc(e)?2:tm(e)?3:0}function rS(e,r){return em(e)===2?e.has(r):Object.prototype.hasOwnProperty.call(e,r)}function k7(e,r,n){const a=em(e);a===2?e.set(r,n):a===3?e.add(n):e[r]=n}function Zle(e,r){return e===r?e!==0||1/e===1/r:e!==e&&r!==r}function qc(e){return e instanceof Map}function tm(e){return e instanceof Set}function wo(e){return e.copy_||e.base_}function nS(e,r){if(qc(e))return new Map(e);if(tm(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=E7(e);if(r===!0||r==="class_only"&&!n){const a=Object.getOwnPropertyDescriptors(e);delete a[Xr];let i=Reflect.ownKeys(a);for(let o=0;o<i.length;o++){const s=i[o],c=a[s];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(a[s]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[s]})}return Object.create(dc(e),a)}else{const a=dc(e);if(a!==null&&n)return{...e};const i=Object.create(a);return Object.assign(i,e)}}function VE(e,r=!1){return rm(e)||as(e)||!zo(e)||(em(e)>1&&Object.defineProperties(e,{set:$d,add:$d,clear:$d,delete:$d}),Object.freeze(e),r&&Object.values(e).forEach(n=>VE(n,!0))),e}function Qle(){Rn(2)}var $d={value:Qle};function rm(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var Jle={};function qo(e){const r=Jle[e];return r||Rn(0,e),r}var hc;function j7(){return hc}function ese(e,r){return{drafts_:[],parent_:e,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function O4(e,r){r&&(qo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=r)}function aS(e){iS(e),e.drafts_.forEach(tse),e.drafts_=null}function iS(e){e===hc&&(hc=e.parent_)}function T4(e){return hc=ese(hc,e)}function tse(e){const r=e[Xr];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function N4(e,r){r.unfinalizedDrafts_=r.drafts_.length;const n=r.drafts_[0];return e!==void 0&&e!==n?(n[Xr].modified_&&(aS(r),Rn(4)),zo(e)&&(e=Wh(r,e),r.parent_||Zh(r,e)),r.patches_&&qo("Patches").generateReplacementPatches_(n[Xr].base_,e,r.patches_,r.inversePatches_)):e=Wh(r,n,[]),aS(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),e!==S7?e:void 0}function Wh(e,r,n){if(rm(r))return r;const a=e.immer_.shouldUseStrictIteration(),i=r[Xr];if(!i)return Xh(r,(o,s)=>M4(e,i,r,o,s,n),a),r;if(i.scope_!==e)return r;if(!i.modified_)return Zh(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const o=i.copy_;let s=o,c=!1;i.type_===3&&(s=new Set(o),o.clear(),c=!0),Xh(s,(f,d)=>M4(e,i,o,f,d,n,c),a),Zh(e,o,!1),n&&e.patches_&&qo("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function M4(e,r,n,a,i,o,s){if(i==null||typeof i!="object"&&!s)return;const c=rm(i);if(!(c&&!s)){if(as(i)){const f=o&&r&&r.type_!==3&&!rS(r.assigned_,a)?o.concat(a):void 0,d=Wh(e,i,f);if(k7(n,a,d),as(d))e.canAutoFreeze_=!1;else return}else s&&n.add(i);if(zo(i)&&!c){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||r&&r.base_&&r.base_[a]===i&&c)return;Wh(e,i),(!r||!r.scope_.parent_)&&typeof a!="symbol"&&(qc(n)?n.has(a):Object.prototype.propertyIsEnumerable.call(n,a))&&Zh(e,i)}}}function Zh(e,r,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&VE(r,n)}function rse(e,r){const n=Array.isArray(e),a={type_:n?1:0,scope_:r?r.scope_:j7(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=a,o=KE;n&&(i=[a],o=pc);const{revoke:s,proxy:c}=Proxy.revocable(i,o);return a.draft_=c,a.revoke_=s,c}var KE={get(e,r){if(r===Xr)return e;const n=wo(e);if(!rS(n,r))return nse(e,n,r);const a=n[r];return e.finalized_||!zo(a)?a:a===w0(e.base_,r)?(S0(e),e.copy_[r]=lS(a,e)):a},has(e,r){return r in wo(e)},ownKeys(e){return Reflect.ownKeys(wo(e))},set(e,r,n){const a=A7(wo(e),r);if(a!=null&&a.set)return a.set.call(e.draft_,n),!0;if(!e.modified_){const i=w0(wo(e),r),o=i==null?void 0:i[Xr];if(o&&o.base_===n)return e.copy_[r]=n,e.assigned_[r]=!1,!0;if(Zle(n,i)&&(n!==void 0||rS(e.base_,r)))return!0;S0(e),oS(e)}return e.copy_[r]===n&&(n!==void 0||r in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[r])||(e.copy_[r]=n,e.assigned_[r]=!0),!0},deleteProperty(e,r){return w0(e.base_,r)!==void 0||r in e.base_?(e.assigned_[r]=!1,S0(e),oS(e)):delete e.assigned_[r],e.copy_&&delete e.copy_[r],!0},getOwnPropertyDescriptor(e,r){const n=wo(e),a=Reflect.getOwnPropertyDescriptor(n,r);return a&&{writable:!0,configurable:e.type_!==1||r!=="length",enumerable:a.enumerable,value:n[r]}},defineProperty(){Rn(11)},getPrototypeOf(e){return dc(e.base_)},setPrototypeOf(){Rn(12)}},pc={};Xh(KE,(e,r)=>{pc[e]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}});pc.deleteProperty=function(e,r){return pc.set.call(this,e,r,void 0)};pc.set=function(e,r,n){return KE.set.call(this,e[0],r,n,e[0])};function w0(e,r){const n=e[Xr];return(n?wo(n):e)[r]}function nse(e,r,n){var i;const a=A7(r,n);return a?"value"in a?a.value:(i=a.get)==null?void 0:i.call(e.draft_):void 0}function A7(e,r){if(!(r in e))return;let n=dc(e);for(;n;){const a=Object.getOwnPropertyDescriptor(n,r);if(a)return a;n=dc(n)}}function oS(e){e.modified_||(e.modified_=!0,e.parent_&&oS(e.parent_))}function S0(e){e.copy_||(e.copy_=nS(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var ase=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(r,n,a)=>{if(typeof r=="function"&&typeof n!="function"){const o=n;n=r;const s=this;return function(f=o,...d){return s.produce(f,h=>n.call(this,h,...d))}}typeof n!="function"&&Rn(6),a!==void 0&&typeof a!="function"&&Rn(7);let i;if(zo(r)){const o=T4(this),s=lS(r,void 0);let c=!0;try{i=n(s),c=!1}finally{c?aS(o):iS(o)}return O4(o,a),N4(i,o)}else if(!r||typeof r!="object"){if(i=n(r),i===void 0&&(i=r),i===S7&&(i=void 0),this.autoFreeze_&&VE(i,!0),a){const o=[],s=[];qo("Patches").generateReplacementPatches_(r,i,o,s),a(o,s)}return i}else Rn(1,r)},this.produceWithPatches=(r,n)=>{if(typeof r=="function")return(s,...c)=>this.produceWithPatches(s,f=>r(f,...c));let a,i;return[this.produce(r,n,(s,c)=>{a=s,i=c}),a,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){zo(e)||Rn(8),as(e)&&(e=ise(e));const r=T4(this),n=lS(e,void 0);return n[Xr].isManual_=!0,iS(r),n}finishDraft(e,r){const n=e&&e[Xr];(!n||!n.isManual_)&&Rn(9);const{scope_:a}=n;return O4(a,r),N4(void 0,a)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,r){let n;for(n=r.length-1;n>=0;n--){const i=r[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(r=r.slice(n+1));const a=qo("Patches").applyPatches_;return as(e)?a(e,r):this.produce(e,i=>a(i,r))}};function lS(e,r){const n=qc(e)?qo("MapSet").proxyMap_(e,r):tm(e)?qo("MapSet").proxySet_(e,r):rse(e,r);return(r?r.scope_:j7()).drafts_.push(n),n}function ise(e){return as(e)||Rn(10,e),C7(e)}function C7(e){if(!zo(e)||rm(e))return e;const r=e[Xr];let n,a=!0;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,n=nS(e,r.scope_.immer_.useStrictShallowCopy_),a=r.scope_.immer_.shouldUseStrictIteration()}else n=nS(e,!0);return Xh(n,(i,o)=>{k7(n,i,C7(o))},a),r&&(r.finalized_=!1),n}var ose=new ase;ose.produce;var lse={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},O7=dr({name:"legend",initialState:lse,reducers:{setLegendSize(e,r){e.size.width=r.payload.width,e.size.height=r.payload.height},setLegendSettings(e,r){e.settings.align=r.payload.align,e.settings.layout=r.payload.layout,e.settings.verticalAlign=r.payload.verticalAlign,e.settings.itemSorter=r.payload.itemSorter},addLegendPayload:{reducer(e,r){e.payload.push(r.payload)},prepare:lt()},replaceLegendPayload:{reducer(e,r){var{prev:n,next:a}=r.payload,i=yn(e).payload.indexOf(n);i>-1&&(e.payload[i]=a)},prepare:lt()},removeLegendPayload:{reducer(e,r){var n=yn(e).payload.indexOf(r.payload);n>-1&&e.payload.splice(n,1)},prepare:lt()}}}),{setLegendSize:O_e,setLegendSettings:T_e,addLegendPayload:sse,replaceLegendPayload:use,removeLegendPayload:cse}=O7.actions,fse=O7.reducer,E0={exports:{}},k0={};/**
137
+ * @license React
138
+ * use-sync-external-store-with-selector.production.js
139
+ *
140
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
141
+ *
142
+ * This source code is licensed under the MIT license found in the
143
+ * LICENSE file in the root directory of this source tree.
144
+ */var R4;function dse(){if(R4)return k0;R4=1;var e=os();function r(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var n=typeof Object.is=="function"?Object.is:r,a=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,s=e.useMemo,c=e.useDebugValue;return k0.useSyncExternalStoreWithSelector=function(f,d,h,m,g){var y=i(null);if(y.current===null){var x={hasValue:!1,value:null};y.current=x}else x=y.current;y=s(function(){function _(T){if(!w){if(w=!0,A=T,T=m(T),g!==void 0&&x.hasValue){var N=x.value;if(g(N,T))return C=N}return C=T}if(N=C,n(A,T))return N;var M=m(T);return g!==void 0&&g(N,M)?(A=T,N):(A=T,C=M)}var w=!1,A,C,O=h===void 0?null:h;return[function(){return _(d())},O===null?void 0:function(){return _(O())}]},[d,h,m,g]);var E=a(f,y[0],y[1]);return o(function(){x.hasValue=!0,x.value=E},[E]),c(E),E},k0}var P4;function hse(){return P4||(P4=1,E0.exports=dse()),E0.exports}hse();function pse(e){e()}function mse(){let e=null,r=null;return{clear(){e=null,r=null},notify(){pse(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let a=e;for(;a;)n.push(a),a=a.next;return n},subscribe(n){let a=!0;const i=r={callback:n,next:null,prev:r};return i.prev?i.prev.next=i:e=i,function(){!a||e===null||(a=!1,i.next?i.next.prev=i.prev:r=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var D4={notify(){},get:()=>[]};function vse(e,r){let n,a=D4,i=0,o=!1;function s(E){h();const _=a.subscribe(E);let w=!1;return()=>{w||(w=!0,_(),m())}}function c(){a.notify()}function f(){x.onStateChange&&x.onStateChange()}function d(){return o}function h(){i++,n||(n=e.subscribe(f),a=mse())}function m(){i--,n&&i===0&&(n(),n=void 0,a.clear(),a=D4)}function g(){o||(o=!0,h())}function y(){o&&(o=!1,m())}const x={addNestedSub:s,notifyNestedSubs:c,handleChangeWrapper:f,isSubscribed:d,trySubscribe:g,tryUnsubscribe:y,getListeners:()=>a};return x}var gse=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",yse=gse(),bse=()=>typeof navigator<"u"&&navigator.product==="ReactNative",xse=bse(),_se=()=>yse||xse?k.useLayoutEffect:k.useEffect,wse=_se();function L4(e,r){return e===r?e!==0||r!==0||1/e===1/r:e!==e&&r!==r}function Sse(e,r){if(L4(e,r))return!0;if(typeof e!="object"||e===null||typeof r!="object"||r===null)return!1;const n=Object.keys(e),a=Object.keys(r);if(n.length!==a.length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(r,n[i])||!L4(e[n[i]],r[n[i]]))return!1;return!0}var j0=Symbol.for("react-redux-context"),A0=typeof globalThis<"u"?globalThis:{};function Ese(){if(!k.createContext)return{};const e=A0[j0]??(A0[j0]=new Map);let r=e.get(k.createContext);return r||(r=k.createContext(null),e.set(k.createContext,r)),r}var kse=Ese();function jse(e){const{children:r,context:n,serverState:a,store:i}=e,o=k.useMemo(()=>{const f=vse(i);return{store:i,subscription:f,getServerState:a?()=>a:void 0}},[i,a]),s=k.useMemo(()=>i.getState(),[i]);wse(()=>{const{subscription:f}=o;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),s!==i.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[o,s]);const c=n||kse;return k.createElement(c.Provider,{value:o},r)}var Ase=jse,Cse=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function Ose(e,r){return e==null&&r==null?!0:typeof e=="number"&&typeof r=="number"?e===r||e!==e&&r!==r:e===r}function nm(e,r){var n=new Set([...Object.keys(e),...Object.keys(r)]);for(var a of n)if(Cse.has(a)){if(e[a]==null&&r[a]==null)continue;if(!Sse(e[a],r[a]))return!1}else if(!Ose(e[a],r[a]))return!1;return!0}function sS(){return sS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},sS.apply(null,arguments)}function I4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Mu(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?I4(Object(n),!0).forEach(function(a){Tse(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Tse(e,r,n){return(r=Nse(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Nse(e){var r=Mse(e,"string");return typeof r=="symbol"?r:r+""}function Mse(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Rse(e){return Array.isArray(e)&&bn(e[0])&&bn(e[1])?e.join(" ~ "):e}var zl={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};function Pse(e,r){return r==null?e:Bp(e,r)}var Dse=e=>{var{separator:r=zl.separator,contentStyle:n,itemStyle:a,labelStyle:i=zl.labelStyle,payload:o,formatter:s,itemSorter:c,wrapperClassName:f,labelClassName:d,label:h,labelFormatter:m,accessibilityLayer:g=zl.accessibilityLayer}=e,y=()=>{if(o&&o.length){var T={padding:0,margin:0},N=Pse(o,c),M=N.map((P,L)=>{if(P.type==="none")return null;var D=P.formatter||s||Rse,{value:q,name:z}=P,U=q,$=z;if(D){var Y=D(q,z,P,L,o);if(Array.isArray(Y))[U,$]=Y;else if(Y!=null)U=Y;else return null}var B=Mu(Mu({},zl.itemStyle),{},{color:P.color||zl.itemStyle.color},a);return k.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(L),style:B},bn($)?k.createElement("span",{className:"recharts-tooltip-item-name"},$):null,bn($)?k.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,k.createElement("span",{className:"recharts-tooltip-item-value"},U),k.createElement("span",{className:"recharts-tooltip-item-unit"},P.unit||""))});return k.createElement("ul",{className:"recharts-tooltip-item-list",style:T},M)}return null},x=Mu(Mu({},zl.contentStyle),n),E=Mu({margin:0},i),_=!Ut(h),w=_?h:"",A=Je("recharts-default-tooltip",f),C=Je("recharts-tooltip-label",d);_&&m&&o!==void 0&&o!==null&&(w=m(h,o));var O=g?{role:"status","aria-live":"assertive"}:{};return k.createElement("div",sS({className:A,style:x},O),k.createElement("p",{className:C,style:E},k.isValidElement(w)?w:"".concat(w)),y())},Ru="recharts-tooltip-wrapper",Lse={visibility:"hidden"};function Ise(e){var{coordinate:r,translateX:n,translateY:a}=e;return Je(Ru,{["".concat(Ru,"-right")]:Ae(n)&&r&&Ae(r.x)&&n>=r.x,["".concat(Ru,"-left")]:Ae(n)&&r&&Ae(r.x)&&n<r.x,["".concat(Ru,"-bottom")]:Ae(a)&&r&&Ae(r.y)&&a>=r.y,["".concat(Ru,"-top")]:Ae(a)&&r&&Ae(r.y)&&a<r.y})}function z4(e){var{allowEscapeViewBox:r,coordinate:n,key:a,offset:i,position:o,reverseDirection:s,tooltipDimension:c,viewBox:f,viewBoxDimension:d}=e;if(o&&Ae(o[a]))return o[a];var h=n[a]-c-(i>0?i:0),m=n[a]+i;if(r[a])return s[a]?h:m;var g=f[a];if(g==null)return 0;if(s[a]){var y=h,x=g;return y<x?Math.max(m,g):Math.max(h,g)}if(d==null)return 0;var E=m+c,_=g+d;return E>_?Math.max(h,g):Math.max(m,g)}function zse(e){var{translateX:r,translateY:n,useTranslate3d:a}=e;return{transform:a?"translate3d(".concat(r,"px, ").concat(n,"px, 0)"):"translate(".concat(r,"px, ").concat(n,"px)")}}function qse(e){var{allowEscapeViewBox:r,coordinate:n,offsetTop:a,offsetLeft:i,position:o,reverseDirection:s,tooltipBox:c,useTranslate3d:f,viewBox:d}=e,h,m,g;return c.height>0&&c.width>0&&n?(m=z4({allowEscapeViewBox:r,coordinate:n,key:"x",offset:i,position:o,reverseDirection:s,tooltipDimension:c.width,viewBox:d,viewBoxDimension:d.width}),g=z4({allowEscapeViewBox:r,coordinate:n,key:"y",offset:a,position:o,reverseDirection:s,tooltipDimension:c.height,viewBox:d,viewBoxDimension:d.height}),h=zse({translateX:m,translateY:g,useTranslate3d:f})):h=Lse,{cssProperties:h,cssClasses:Ise({translateX:m,translateY:g,coordinate:n})}}var Bse=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Bc={isSsr:Bse()};function T7(){var[e,r]=k.useState(()=>Bc.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return k.useEffect(()=>{if(window.matchMedia){var n=window.matchMedia("(prefers-reduced-motion: reduce)"),a=()=>{r(n.matches)};return n.addEventListener("change",a),()=>{n.removeEventListener("change",a)}}},[]),e}function q4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function ql(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?q4(Object(n),!0).forEach(function(a){$se(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function $se(e,r,n){return(r=Fse(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Fse(e){var r=Use(e,"string");return typeof r=="symbol"?r:r+""}function Use(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Hse(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function Gse(e){var r,n,a,i,o,s,c=T7(),[f,d]=k.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));k.useEffect(()=>{var x=E=>{if(E.key==="Escape"){var _,w,A,C;d({dismissed:!0,dismissedAtCoordinate:{x:(_=(w=e.coordinate)===null||w===void 0?void 0:w.x)!==null&&_!==void 0?_:0,y:(A=(C=e.coordinate)===null||C===void 0?void 0:C.y)!==null&&A!==void 0?A:0}})}};return document.addEventListener("keydown",x),()=>{document.removeEventListener("keydown",x)}},[(r=e.coordinate)===null||r===void 0?void 0:r.x,(n=e.coordinate)===null||n===void 0?void 0:n.y]),f.dismissed&&(((a=(i=e.coordinate)===null||i===void 0?void 0:i.x)!==null&&a!==void 0?a:0)!==f.dismissedAtCoordinate.x||((o=(s=e.coordinate)===null||s===void 0?void 0:s.y)!==null&&o!==void 0?o:0)!==f.dismissedAtCoordinate.y)&&d(ql(ql({},f),{},{dismissed:!1}));var{cssClasses:h,cssProperties:m}=qse({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),g=e.hasPortalFromProps?{}:ql(ql({transition:Hse({prefersReducedMotion:c,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},m),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),y=ql(ql({},g),{},{visibility:!f.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return k.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:h,style:y,ref:e.innerRef},e.children)}var Vse=k.memo(Gse),N7=()=>{var e;return(e=Ce(r=>r.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function uS(){return uS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},uS.apply(null,arguments)}function B4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function $4(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?B4(Object(n),!0).forEach(function(a){Kse(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Kse(e,r,n){return(r=Yse(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Yse(e){var r=Xse(e,"string");return typeof r=="symbol"?r:r+""}function Xse(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var F4={curveBasisClosed:jae,curveBasisOpen:Aae,curveBasis:kae,curveBumpX:fae,curveBumpY:dae,curveLinearClosed:Cae,curveLinear:Ip,curveMonotoneX:Oae,curveMonotoneY:Tae,curveNatural:Nae,curveStep:Mae,curveStepAfter:Pae,curveStepBefore:Rae},Qh=e=>De(e.x)&&De(e.y),U4=e=>e.base!=null&&Qh(e.base)&&Qh(e),Pu=e=>e.x,Du=e=>e.y,Wse=(e,r)=>{if(typeof e=="function")return e;var n="curve".concat(Rc(e));if((n==="curveMonotone"||n==="curveBump")&&r){var a=F4["".concat(n).concat(r==="vertical"?"Y":"X")];if(a)return a}return F4[n]||Ip},H4={connectNulls:!1,type:"linear"},Zse=e=>{var{type:r=H4.type,points:n=[],baseLine:a,layout:i,connectNulls:o=H4.connectNulls}=e,s=Wse(r,i),c=o?n.filter(Qh):n;if(Array.isArray(a)){var f,d=n.map((x,E)=>$4($4({},x),{},{base:a[E]}));i==="vertical"?f=Pd().y(Du).x1(Pu).x0(x=>x.base.x):f=Pd().x(Pu).y1(Du).y0(x=>x.base.y);var h=f.defined(U4).curve(s),m=o?d.filter(U4):d;return h(m)}var g;i==="vertical"&&Ae(a)?g=Pd().y(Du).x1(Pu).x0(a):Ae(a)?g=Pd().x(Pu).y1(Du).y0(a):g=az().x(Pu).y(Du);var y=g.defined(Qh).curve(s);return y(c)},M7=e=>{var{className:r,points:n,path:a,pathRef:i}=e,o=cs();if((!n||!n.length)&&!a)return null;var s={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||o,connectNulls:e.connectNulls},c=n&&n.length?Zse(s):a;return k.createElement("path",uS({},oa(e),DE(e),{className:Je("recharts-curve",r),d:c===null?void 0:c,ref:i}))},Qse=["x","y","top","left","width","height","className"];function cS(){return cS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},cS.apply(null,arguments)}function G4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Jse(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?G4(Object(n),!0).forEach(function(a){eue(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function eue(e,r,n){return(r=tue(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function tue(e){var r=rue(e,"string");return typeof r=="symbol"?r:r+""}function rue(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function nue(e,r){if(e==null)return{};var n,a,i=aue(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function aue(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var iue=(e,r,n,a,i,o)=>"M".concat(e,",").concat(i,"v").concat(a,"M").concat(o,",").concat(r,"h").concat(n),oue=e=>{var{x:r=0,y:n=0,top:a=0,left:i=0,width:o=0,height:s=0,className:c}=e,f=nue(e,Qse),d=Jse({x:r,y:n,top:a,left:i,width:o,height:s},f);return!Ae(r)||!Ae(n)||!Ae(o)||!Ae(s)||!Ae(a)||!Ae(i)?null:k.createElement("path",cS({},fr(d),{className:Je("recharts-cross",c),d:iue(r,n,o,s,a,i)}))};function lue(e,r,n,a){var i=a/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?r.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:r.y-i,width:e==="horizontal"?a:n.width-1,height:e==="horizontal"?n.height-1:a}}function V4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function K4(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?V4(Object(n),!0).forEach(function(a){sue(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function sue(e,r,n){return(r=uue(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function uue(e){var r=cue(e,"string");return typeof r=="symbol"?r:r+""}function cue(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var fue=e=>e.replace(/([A-Z])/g,r=>"-".concat(r.toLowerCase())),R7=(e,r,n)=>e.map(a=>"".concat(fue(a)," ").concat(r,"ms ").concat(n)).join(","),due=(e,r)=>[Object.keys(e),Object.keys(r)].reduce((n,a)=>n.filter(i=>a.includes(i))),mc=(e,r)=>Object.keys(r).reduce((n,a)=>K4(K4({},n),{},{[a]:e(a,r[a])}),{});function Y4(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Dt(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Y4(Object(n),!0).forEach(function(a){hue(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y4(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function hue(e,r,n){return(r=pue(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function pue(e){var r=mue(e,"string");return typeof r=="symbol"?r:r+""}function mue(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Jh=(e,r,n)=>e+(r-e)*n,fS=e=>{var{from:r,to:n}=e;return r!==n},P7=(e,r,n)=>{var a=mc((i,o)=>{if(fS(o)){var[s,c]=e(o.from,o.to,o.velocity);return Dt(Dt({},o),{},{from:s,velocity:c})}return o},r);return n<1?mc((i,o)=>fS(o)&&a[i]!=null?Dt(Dt({},o),{},{velocity:Jh(o.velocity,a[i].velocity,n),from:Jh(o.from,a[i].from,n)}):o,r):P7(e,a,n-1)};function vue(e,r,n,a,i,o){var s,c=a.reduce((g,y)=>Dt(Dt({},g),{},{[y]:{from:e[y],velocity:0,to:r[y]}}),{}),f=()=>mc((g,y)=>y.from,c),d=()=>!Object.values(c).filter(fS).length,h=null,m=g=>{s||(s=g);var y=g-s,x=y/n.dt;c=P7(n,c,x),i(Dt(Dt(Dt({},e),r),f())),s=g,d()||(h=o.setTimeout(m))};return()=>(h=o.setTimeout(m),()=>{var g;(g=h)===null||g===void 0||g()})}function gue(e,r,n,a,i,o,s){var c=null,f=i.reduce((m,g)=>{var y=e[g],x=r[g];return y==null||x==null?m:Dt(Dt({},m),{},{[g]:[y,x]})},{}),d,h=m=>{d||(d=m);var g=(m-d)/a,y=mc((E,_)=>Jh(..._,n(g)),f);if(o(Dt(Dt(Dt({},e),r),y)),g<1)c=s.setTimeout(h);else{var x=mc((E,_)=>Jh(..._,n(1)),f);o(Dt(Dt(Dt({},e),r),x))}};return()=>(c=s.setTimeout(h),()=>{var m;(m=c)===null||m===void 0||m()})}const yue=(e,r,n,a,i,o)=>{var s=due(e,r);return n==null?()=>(i(Dt(Dt({},e),r)),()=>{}):n.isStepper===!0?vue(e,r,n,s,i,o):gue(e,r,n,a,s,i,o)};var ep=1e-4,D7=(e,r)=>[0,3*e,3*r-6*e,3*e-3*r+1],L7=(e,r)=>e.map((n,a)=>n*r**a).reduce((n,a)=>n+a),X4=(e,r)=>n=>{var a=D7(e,r);return L7(a,n)},bue=(e,r)=>n=>{var a=D7(e,r),i=[...a.map((o,s)=>o*s).slice(1),0];return L7(i,n)},xue=e=>{var r,n=e.split("(");if(n.length!==2||n[0]!=="cubic-bezier")return null;var a=(r=n[1])===null||r===void 0||(r=r.split(")")[0])===null||r===void 0?void 0:r.split(",");if(a==null||a.length!==4)return null;var i=a.map(o=>parseFloat(o));return[i[0],i[1],i[2],i[3]]},_ue=function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];if(n.length===1)switch(n[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var i=xue(n[0]);if(i)return i}}return n.length===4?n:[0,0,1,1]},wue=(e,r,n,a)=>{var i=X4(e,n),o=X4(r,a),s=bue(e,n),c=d=>d>1?1:d<0?0:d,f=d=>{for(var h=d>1?1:d,m=h,g=0;g<8;++g){var y=i(m)-h,x=s(m);if(Math.abs(y-h)<ep||x<ep)return o(m);m=c(m-y/x)}return o(m)};return f.isStepper=!1,f},W4=function(){return wue(..._ue(...arguments))},Sue=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:n=100,damping:a=8,dt:i=17}=r,o=(s,c,f)=>{var d=-(s-c)*n,h=f*a,m=f+(d-h)*i/1e3,g=f*i/1e3+s;return Math.abs(g-c)<ep&&Math.abs(m)<ep?[c,0]:[g,m]};return o.isStepper=!0,o.dt=i,o},Eue=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return W4(e);case"spring":return Sue();default:if(e.split("(")[0]==="cubic-bezier")return W4(e)}return typeof e=="function"?e:null};function kue(e){var r,n=()=>null,a=!1,i=null,o=s=>{if(!a){if(Array.isArray(s)){if(!s.length)return;var c=s,[f,...d]=c;if(typeof f=="number"){i=e.setTimeout(o.bind(null,d),f);return}o(f),i=e.setTimeout(o.bind(null,d));return}typeof s=="string"&&(r=s,n(r)),typeof s=="object"&&(r=s,n(r)),typeof s=="function"&&s()}};return{stop:()=>{a=!0},start:s=>{a=!1,i&&(i(),i=null),o(s)},subscribe:s=>(n=s,()=>{n=()=>null}),getTimeoutController:()=>e}}class jue{setTimeout(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=performance.now(),i=null,o=s=>{s-a>=n?r(s):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(o))};return i=requestAnimationFrame(o),()=>{i!=null&&cancelAnimationFrame(i)}}}function Aue(){return kue(new jue)}var Cue=k.createContext(Aue);function Oue(e,r){var n=k.useContext(Cue);return k.useMemo(()=>r??n(e),[e,r,n])}var Tue={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},Z4={t:0},C0={t:1};function YE(e){var r=br(e,Tue),{isActive:n,canBegin:a,duration:i,easing:o,begin:s,onAnimationEnd:c,onAnimationStart:f,children:d}=r,h=T7(),m=n==="auto"?!Bc.isSsr&&!h:n,g=Oue(r.animationId,r.animationManager),[y,x]=k.useState(m?Z4:C0),E=k.useRef(null);return k.useEffect(()=>{m||x(C0)},[m]),k.useEffect(()=>{if(!m||!a)return Ho;var _=yue(Z4,C0,Eue(o),i,x,g.getTimeoutController()),w=()=>{E.current=_()};return g.start([f,s,w,i,c]),()=>{g.stop(),E.current&&E.current(),c()}},[m,a,i,o,s,f,c,g]),d(y.t)}function XE(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=k.useRef(sc(r)),a=k.useRef(e);return a.current!==e&&(n.current=sc(r),a.current=e),n.current}var Nue=["radius"],Mue=["radius"],Q4,J4,e3,t3,r3,n3,a3,i3,o3,l3;function s3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function u3(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?s3(Object(n),!0).forEach(function(a){Rue(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Rue(e,r,n){return(r=Pue(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Pue(e){var r=Due(e,"string");return typeof r=="symbol"?r:r+""}function Due(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function tp(){return tp=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},tp.apply(null,arguments)}function c3(e,r){if(e==null)return{};var n,a,i=Lue(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Lue(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function Gn(e,r){return r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}var f3=(e,r,n,a,i)=>{var o=$i(n),s=$i(a),c=Math.min(Math.abs(o)/2,Math.abs(s)/2),f=s>=0?1:-1,d=o>=0?1:-1,h=s>=0&&o>=0||s<0&&o<0?1:0,m;if(c>0&&Array.isArray(i)){for(var g=[0,0,0,0],y=0,x=4;y<x;y++){var E,_=(E=i[y])!==null&&E!==void 0?E:0;g[y]=_>c?c:_}m=xt(Q4||(Q4=Gn(["M",",",""])),e,r+f*g[0]),g[0]>0&&(m+=xt(J4||(J4=Gn(["A ",",",",0,0,",",",",",""])),g[0],g[0],h,e+d*g[0],r)),m+=xt(e3||(e3=Gn(["L ",",",""])),e+n-d*g[1],r),g[1]>0&&(m+=xt(t3||(t3=Gn(["A ",",",",0,0,",`,
145
+ `,",",""])),g[1],g[1],h,e+n,r+f*g[1])),m+=xt(r3||(r3=Gn(["L ",",",""])),e+n,r+a-f*g[2]),g[2]>0&&(m+=xt(n3||(n3=Gn(["A ",",",",0,0,",`,
146
+ `,",",""])),g[2],g[2],h,e+n-d*g[2],r+a)),m+=xt(a3||(a3=Gn(["L ",",",""])),e+d*g[3],r+a),g[3]>0&&(m+=xt(i3||(i3=Gn(["A ",",",",0,0,",`,
147
+ `,",",""])),g[3],g[3],h,e,r+a-f*g[3])),m+="Z"}else if(c>0&&i===+i&&i>0){var w=Math.min(c,i);m=xt(o3||(o3=Gn(["M ",",",`
148
+ A `,",",",0,0,",",",",",`
149
+ L `,",",`
150
+ A `,",",",0,0,",",",",",`
151
+ L `,",",`
152
+ A `,",",",0,0,",",",",",`
153
+ L `,",",`
154
+ A `,",",",0,0,",",",","," Z"])),e,r+f*w,w,w,h,e+d*w,r,e+n-d*w,r,w,w,h,e+n,r+f*w,e+n,r+a-f*w,w,w,h,e+n-d*w,r+a,e+d*w,r+a,w,w,h,e,r+a-f*w)}else m=xt(l3||(l3=Gn(["M ",","," h "," v "," h "," Z"])),e,r,n,a,-n);return m},d3={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},I7=e=>{var r=br(e,d3),n=k.useRef(null),[a,i]=k.useState(-1);k.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var Z=n.current.getTotalLength();Z&&i(Z)}catch{}},[]);var{x:o,y:s,width:c,height:f,radius:d,className:h}=r,{animationEasing:m,animationDuration:g,animationBegin:y,isAnimationActive:x,isUpdateAnimationActive:E}=r,_=k.useRef(c),w=k.useRef(f),A=k.useRef(o),C=k.useRef(s),O=k.useMemo(()=>({x:o,y:s,width:c,height:f,radius:d}),[o,s,c,f,d]),T=XE(O,"rectangle-");if(o!==+o||s!==+s||c!==+c||f!==+f||c===0||f===0)return null;var N=Je("recharts-rectangle",h);if(!E){var M=fr(r),{radius:P}=M,L=c3(M,Nue);return k.createElement("path",tp({},L,{x:$i(o),y:$i(s),width:$i(c),height:$i(f),radius:typeof d=="number"?d:void 0,className:N,d:f3(o,s,c,f,d)}))}var D=_.current,q=w.current,z=A.current,U=C.current,$="0px ".concat(a===-1?1:a,"px"),Y="".concat(a,"px ").concat(a,"px"),B=R7(["strokeDasharray"],g,typeof m=="string"?m:d3.animationEasing);return k.createElement(YE,{animationId:T,key:T,canBegin:a>0,duration:g,easing:m,isActive:E,begin:y},Z=>{var ae=Tr(D,c,Z),V=Tr(q,f,Z),fe=Tr(z,o,Z),F=Tr(U,s,Z);n.current&&(_.current=ae,w.current=V,A.current=fe,C.current=F);var X;x?Z>0?X={transition:B,strokeDasharray:Y}:X={strokeDasharray:$}:X={strokeDasharray:Y};var ce=fr(r),{radius:G}=ce,H=c3(ce,Mue);return k.createElement("path",tp({},H,{radius:typeof d=="number"?d:void 0,className:N,d:f3(fe,F,ae,V,d),ref:n,style:u3(u3({},X),r.style)}))})};function h3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function p3(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?h3(Object(n),!0).forEach(function(a){Iue(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Iue(e,r,n){return(r=zue(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function zue(e){var r=que(e,"string");return typeof r=="symbol"?r:r+""}function que(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var rp=Math.PI/180,Bue=e=>e*180/Math.PI,tr=(e,r,n,a)=>({x:e+Math.cos(-rp*a)*n,y:r+Math.sin(-rp*a)*n}),$ue=function(r,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(r-(a.left||0)-(a.right||0)),Math.abs(n-(a.top||0)-(a.bottom||0)))/2},Fue=(e,r)=>{var{x:n,y:a}=e,{x:i,y:o}=r;return Math.sqrt((n-i)**2+(a-o)**2)},Uue=(e,r)=>{var{x:n,y:a}=e,{cx:i,cy:o}=r,s=Fue({x:n,y:a},{x:i,y:o});if(s<=0)return{radius:s,angle:0};var c=(n-i)/s,f=Math.acos(c);return a>o&&(f=2*Math.PI-f),{radius:s,angle:Bue(f),angleInRadian:f}},Hue=e=>{var{startAngle:r,endAngle:n}=e,a=Math.floor(r/360),i=Math.floor(n/360),o=Math.min(a,i);return{startAngle:r-o*360,endAngle:n-o*360}},Gue=(e,r)=>{var{startAngle:n,endAngle:a}=r,i=Math.floor(n/360),o=Math.floor(a/360),s=Math.min(i,o);return e+s*360},Vue=(e,r)=>{var{relativeX:n,relativeY:a}=e,{radius:i,angle:o}=Uue({x:n,y:a},r),{innerRadius:s,outerRadius:c}=r;if(i<s||i>c||i===0)return null;var{startAngle:f,endAngle:d}=Hue(r),h=o,m;if(f<=d){for(;h>d;)h-=360;for(;h<f;)h+=360;m=h>=f&&h<=d}else{for(;h>f;)h-=360;for(;h<d;)h+=360;m=h>=d&&h<=f}return m?p3(p3({},r),{},{radius:i,angle:Gue(h,r)}):null};function z7(e){var{cx:r,cy:n,radius:a,startAngle:i,endAngle:o}=e,s=tr(r,n,a,i),c=tr(r,n,a,o);return{points:[s,c],cx:r,cy:n,radius:a,startAngle:i,endAngle:o}}var m3,v3,g3,y3,b3,x3,_3;function dS(){return dS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},dS.apply(null,arguments)}function Ao(e,r){return r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}var Kue=(e,r)=>{var n=gn(r-e),a=Math.min(Math.abs(r-e),359.999);return n*a},Fd=e=>{var{cx:r,cy:n,radius:a,angle:i,sign:o,isExternal:s,cornerRadius:c,cornerIsExternal:f}=e,d=c*(s?1:-1)+a,h=Math.asin(c/d)/rp,m=f?i:i+o*h,g=tr(r,n,d,m),y=tr(r,n,a,m),x=f?i-o*h:i,E=tr(r,n,d*Math.cos(h*rp),x);return{center:g,circleTangency:y,lineTangency:E,theta:h}},q7=e=>{var{cx:r,cy:n,innerRadius:a,outerRadius:i,startAngle:o,endAngle:s}=e,c=Kue(o,s),f=o+c,d=tr(r,n,i,o),h=tr(r,n,i,f),m=xt(m3||(m3=Ao(["M ",",",`
155
+ A `,",",`,0,
156
+ `,",",`,
157
+ `,",",`
158
+ `])),d.x,d.y,i,i,+(Math.abs(c)>180),+(o>f),h.x,h.y);if(a>0){var g=tr(r,n,a,o),y=tr(r,n,a,f);m+=xt(v3||(v3=Ao(["L ",",",`
159
+ A `,",",`,0,
160
+ `,",",`,
161
+ `,","," Z"])),y.x,y.y,a,a,+(Math.abs(c)>180),+(o<=f),g.x,g.y)}else m+=xt(g3||(g3=Ao(["L ",","," Z"])),r,n);return m},Yue=e=>{var{cx:r,cy:n,innerRadius:a,outerRadius:i,cornerRadius:o,forceCornerRadius:s,cornerIsExternal:c,startAngle:f,endAngle:d}=e,h=gn(d-f),{circleTangency:m,lineTangency:g,theta:y}=Fd({cx:r,cy:n,radius:i,angle:f,sign:h,cornerRadius:o,cornerIsExternal:c}),{circleTangency:x,lineTangency:E,theta:_}=Fd({cx:r,cy:n,radius:i,angle:d,sign:-h,cornerRadius:o,cornerIsExternal:c}),w=c?Math.abs(f-d):Math.abs(f-d)-y-_;if(w<0)return s?xt(y3||(y3=Ao(["M ",",",`
162
+ a`,",",",0,0,1,",`,0
163
+ a`,",",",0,0,1,",`,0
164
+ `])),g.x,g.y,o,o,o*2,o,o,-o*2):q7({cx:r,cy:n,innerRadius:a,outerRadius:i,startAngle:f,endAngle:d});var A=xt(b3||(b3=Ao(["M ",",",`
165
+ A`,",",",0,0,",",",",",`
166
+ A`,",",",0,",",",",",",",`
167
+ A`,",",",0,0,",",",",",`
168
+ `])),g.x,g.y,o,o,+(h<0),m.x,m.y,i,i,+(w>180),+(h<0),x.x,x.y,o,o,+(h<0),E.x,E.y);if(a>0){var{circleTangency:C,lineTangency:O,theta:T}=Fd({cx:r,cy:n,radius:a,angle:f,sign:h,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),{circleTangency:N,lineTangency:M,theta:P}=Fd({cx:r,cy:n,radius:a,angle:d,sign:-h,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),L=c?Math.abs(f-d):Math.abs(f-d)-T-P;if(L<0&&o===0)return"".concat(A,"L").concat(r,",").concat(n,"Z");A+=xt(x3||(x3=Ao(["L",",",`
169
+ A`,",",",0,0,",",",",",`
170
+ A`,",",",0,",",",",",",",`
171
+ A`,",",",0,0,",",",",","Z"])),M.x,M.y,o,o,+(h<0),N.x,N.y,a,a,+(L>180),+(h>0),C.x,C.y,o,o,+(h<0),O.x,O.y)}else A+=xt(_3||(_3=Ao(["L",",","Z"])),r,n);return A},Xue={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},B7=e=>{var r=br(e,Xue),{cx:n,cy:a,innerRadius:i,outerRadius:o,cornerRadius:s,forceCornerRadius:c,cornerIsExternal:f,startAngle:d,endAngle:h,className:m}=r;if(o<i||d===h)return null;var g=Je("recharts-sector",m),y=o-i,x=Hi(s,y,0,!0),E;return x>0&&Math.abs(d-h)<360?E=Yue({cx:n,cy:a,innerRadius:i,outerRadius:o,cornerRadius:Math.min(x,y/2),forceCornerRadius:c,cornerIsExternal:f,startAngle:d,endAngle:h}):E=q7({cx:n,cy:a,innerRadius:i,outerRadius:o,startAngle:d,endAngle:h}),k.createElement("path",dS({},fr(r),{className:g,d:E}))};function Wue(e,r,n){if(e==="horizontal")return[{x:r.x,y:n.top},{x:r.x,y:n.top+n.height}];if(e==="vertical")return[{x:n.left,y:r.y},{x:n.left+n.width,y:r.y}];if(xz(r)){if(e==="centric"){var{cx:a,cy:i,innerRadius:o,outerRadius:s,angle:c}=r,f=tr(a,i,o,c),d=tr(a,i,s,c);return[{x:f.x,y:f.y},{x:d.x,y:d.y}]}return z7(r)}}var O0={},T0={},N0={},w3;function Zue(){return w3||(w3=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Nz();function n(a){return r.isSymbol(a)?NaN:Number(a)}e.toNumber=n})(N0)),N0}var S3;function Que(){return S3||(S3=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Zue();function n(a){return a?(a=r.toNumber(a),a===1/0||a===-1/0?(a<0?-1:1)*Number.MAX_VALUE:a===a?a:0):a===0?a:0}e.toFinite=n})(T0)),T0}var E3;function Jue(){return E3||(E3=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const r=Mz(),n=Que();function a(i,o,s){s&&typeof s!="number"&&r.isIterateeCall(i,o,s)&&(o=s=void 0),i=n.toFinite(i),o===void 0?(o=i,i=0):o=n.toFinite(o),s=s===void 0?i<o?1:-1:n.toFinite(s);const c=Math.max(Math.ceil((o-i)/(s||1)),0),f=new Array(c);for(let d=0;d<c;d++)f[d]=i,i+=s;return f}e.range=a})(O0)),O0}var M0,k3;function ece(){return k3||(k3=1,M0=Jue().range),M0}var tce=ece();const $7=In(tce);var Yi=e=>e.chartData,rce=de([Yi],e=>{var r=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:r,dataStartIndex:0}}),WE=(e,r,n,a)=>a?rce(e):Yi(e);function na(e){if(Array.isArray(e)&&e.length===2){var[r,n]=e;if(De(r)&&De(n))return!0}return!1}function j3(e,r,n){return n?e:[Math.min(e[0],r[0]),Math.max(e[1],r[1])]}function F7(e,r){if(r&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,a]=e,i,o;if(De(n))i=n;else if(typeof n=="function")return;if(De(a))o=a;else if(typeof a=="function")return;var s=[i,o];if(na(s))return s}}function nce(e,r,n){if(!(!n&&r==null)){if(typeof e=="function"&&r!=null)try{var a=e(r,n);if(na(a))return j3(a,r,n)}catch{}if(Array.isArray(e)&&e.length===2){var[i,o]=e,s,c;if(i==="auto")r!=null&&(s=Math.min(...r));else if(Ae(i))s=i;else if(typeof i=="function")try{r!=null&&(s=i(r==null?void 0:r[0]))}catch{}else if(typeof i=="string"&&g4.test(i)){var f=g4.exec(i);if(f==null||f[1]==null||r==null)s=void 0;else{var d=+f[1];s=r[0]-d}}else s=r==null?void 0:r[0];if(o==="auto")r!=null&&(c=Math.max(...r));else if(Ae(o))c=o;else if(typeof o=="function")try{r!=null&&(c=o(r==null?void 0:r[1]))}catch{}else if(typeof o=="string"&&y4.test(o)){var h=y4.exec(o);if(h==null||h[1]==null||r==null)c=void 0;else{var m=+h[1];c=r[1]+m}}else c=r==null?void 0:r[1];var g=[s,c];if(na(g))return r==null?g:j3(g,r,n)}}}var fs=1e9,ace={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},QE,dt=!0,xn="[DecimalError] ",Mo=xn+"Invalid argument: ",ZE=xn+"Exponent out of range: ",ds=Math.floor,So=Math.pow,ice=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Hr,Ft=1e7,st=7,U7=9007199254740991,np=ds(U7/st),Ee={};Ee.absoluteValue=Ee.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Ee.comparedTo=Ee.cmp=function(e){var r,n,a,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(a=o.d.length,i=e.d.length,r=0,n=a<i?a:i;r<n;++r)if(o.d[r]!==e.d[r])return o.d[r]>e.d[r]^o.s<0?1:-1;return a===i?0:a>i^o.s<0?1:-1};Ee.decimalPlaces=Ee.dp=function(){var e=this,r=e.d.length-1,n=(r-e.e)*st;if(r=e.d[r],r)for(;r%10==0;r/=10)n--;return n<0?0:n};Ee.dividedBy=Ee.div=function(e){return Ga(this,new this.constructor(e))};Ee.dividedToIntegerBy=Ee.idiv=function(e){var r=this,n=r.constructor;return rt(Ga(r,new n(e),0,1),n.precision)};Ee.equals=Ee.eq=function(e){return!this.cmp(e)};Ee.exponent=function(){return Tt(this)};Ee.greaterThan=Ee.gt=function(e){return this.cmp(e)>0};Ee.greaterThanOrEqualTo=Ee.gte=function(e){return this.cmp(e)>=0};Ee.isInteger=Ee.isint=function(){return this.e>this.d.length-2};Ee.isNegative=Ee.isneg=function(){return this.s<0};Ee.isPositive=Ee.ispos=function(){return this.s>0};Ee.isZero=function(){return this.s===0};Ee.lessThan=Ee.lt=function(e){return this.cmp(e)<0};Ee.lessThanOrEqualTo=Ee.lte=function(e){return this.cmp(e)<1};Ee.logarithm=Ee.log=function(e){var r,n=this,a=n.constructor,i=a.precision,o=i+5;if(e===void 0)e=new a(10);else if(e=new a(e),e.s<1||e.eq(Hr))throw Error(xn+"NaN");if(n.s<1)throw Error(xn+(n.s?"NaN":"-Infinity"));return n.eq(Hr)?new a(0):(dt=!1,r=Ga(vc(n,o),vc(e,o),o),dt=!0,rt(r,i))};Ee.minus=Ee.sub=function(e){var r=this;return e=new r.constructor(e),r.s==e.s?V7(r,e):H7(r,(e.s=-e.s,e))};Ee.modulo=Ee.mod=function(e){var r,n=this,a=n.constructor,i=a.precision;if(e=new a(e),!e.s)throw Error(xn+"NaN");return n.s?(dt=!1,r=Ga(n,e,0,1).times(e),dt=!0,n.minus(r)):rt(new a(n),i)};Ee.naturalExponential=Ee.exp=function(){return G7(this)};Ee.naturalLogarithm=Ee.ln=function(){return vc(this)};Ee.negated=Ee.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Ee.plus=Ee.add=function(e){var r=this;return e=new r.constructor(e),r.s==e.s?H7(r,e):V7(r,(e.s=-e.s,e))};Ee.precision=Ee.sd=function(e){var r,n,a,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Mo+e);if(r=Tt(i)+1,a=i.d.length-1,n=a*st+1,a=i.d[a],a){for(;a%10==0;a/=10)n--;for(a=i.d[0];a>=10;a/=10)n++}return e&&r>n?r:n};Ee.squareRoot=Ee.sqrt=function(){var e,r,n,a,i,o,s,c=this,f=c.constructor;if(c.s<1){if(!c.s)return new f(0);throw Error(xn+"NaN")}for(e=Tt(c),dt=!1,i=Math.sqrt(+c),i==0||i==1/0?(r=ea(c.d),(r.length+e)%2==0&&(r+="0"),i=Math.sqrt(r),e=ds((e+1)/2)-(e<0||e%2),i==1/0?r="5e"+e:(r=i.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),a=new f(r)):a=new f(i.toString()),n=f.precision,i=s=n+3;;)if(o=a,a=o.plus(Ga(c,o,s+2)).times(.5),ea(o.d).slice(0,s)===(r=ea(a.d)).slice(0,s)){if(r=r.slice(s-3,s+1),i==s&&r=="4999"){if(rt(o,n+1,0),o.times(o).eq(c)){a=o;break}}else if(r!="9999")break;s+=4}return dt=!0,rt(a,n)};Ee.times=Ee.mul=function(e){var r,n,a,i,o,s,c,f,d,h=this,m=h.constructor,g=h.d,y=(e=new m(e)).d;if(!h.s||!e.s)return new m(0);for(e.s*=h.s,n=h.e+e.e,f=g.length,d=y.length,f<d&&(o=g,g=y,y=o,s=f,f=d,d=s),o=[],s=f+d,a=s;a--;)o.push(0);for(a=d;--a>=0;){for(r=0,i=f+a;i>a;)c=o[i]+y[a]*g[i-a-1]+r,o[i--]=c%Ft|0,r=c/Ft|0;o[i]=(o[i]+r)%Ft|0}for(;!o[--s];)o.pop();return r?++n:o.shift(),e.d=o,e.e=n,dt?rt(e,m.precision):e};Ee.toDecimalPlaces=Ee.todp=function(e,r){var n=this,a=n.constructor;return n=new a(n),e===void 0?n:(ua(e,0,fs),r===void 0?r=a.rounding:ua(r,0,8),rt(n,e+Tt(n)+1,r))};Ee.toExponential=function(e,r){var n,a=this,i=a.constructor;return e===void 0?n=Bo(a,!0):(ua(e,0,fs),r===void 0?r=i.rounding:ua(r,0,8),a=rt(new i(a),e+1,r),n=Bo(a,!0,e+1)),n};Ee.toFixed=function(e,r){var n,a,i=this,o=i.constructor;return e===void 0?Bo(i):(ua(e,0,fs),r===void 0?r=o.rounding:ua(r,0,8),a=rt(new o(i),e+Tt(i)+1,r),n=Bo(a.abs(),!1,e+Tt(a)+1),i.isneg()&&!i.isZero()?"-"+n:n)};Ee.toInteger=Ee.toint=function(){var e=this,r=e.constructor;return rt(new r(e),Tt(e)+1,r.rounding)};Ee.toNumber=function(){return+this};Ee.toPower=Ee.pow=function(e){var r,n,a,i,o,s,c=this,f=c.constructor,d=12,h=+(e=new f(e));if(!e.s)return new f(Hr);if(c=new f(c),!c.s){if(e.s<1)throw Error(xn+"Infinity");return c}if(c.eq(Hr))return c;if(a=f.precision,e.eq(Hr))return rt(c,a);if(r=e.e,n=e.d.length-1,s=r>=n,o=c.s,s){if((n=h<0?-h:h)<=U7){for(i=new f(Hr),r=Math.ceil(a/st+4),dt=!1;n%2&&(i=i.times(c),C3(i.d,r)),n=ds(n/2),n!==0;)c=c.times(c),C3(c.d,r);return dt=!0,e.s<0?new f(Hr).div(i):rt(i,a)}}else if(o<0)throw Error(xn+"NaN");return o=o<0&&e.d[Math.max(r,n)]&1?-1:1,c.s=1,dt=!1,i=e.times(vc(c,a+d)),dt=!0,i=G7(i),i.s=o,i};Ee.toPrecision=function(e,r){var n,a,i=this,o=i.constructor;return e===void 0?(n=Tt(i),a=Bo(i,n<=o.toExpNeg||n>=o.toExpPos)):(ua(e,1,fs),r===void 0?r=o.rounding:ua(r,0,8),i=rt(new o(i),e,r),n=Tt(i),a=Bo(i,e<=n||n<=o.toExpNeg,e)),a};Ee.toSignificantDigits=Ee.tosd=function(e,r){var n=this,a=n.constructor;return e===void 0?(e=a.precision,r=a.rounding):(ua(e,1,fs),r===void 0?r=a.rounding:ua(r,0,8)),rt(new a(n),e,r)};Ee.toString=Ee.valueOf=Ee.val=Ee.toJSON=Ee[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,r=Tt(e),n=e.constructor;return Bo(e,r<=n.toExpNeg||r>=n.toExpPos)};function H7(e,r){var n,a,i,o,s,c,f,d,h=e.constructor,m=h.precision;if(!e.s||!r.s)return r.s||(r=new h(e)),dt?rt(r,m):r;if(f=e.d,d=r.d,s=e.e,i=r.e,f=f.slice(),o=s-i,o){for(o<0?(a=f,o=-o,c=d.length):(a=d,i=s,c=f.length),s=Math.ceil(m/st),c=s>c?s+1:c+1,o>c&&(o=c,a.length=1),a.reverse();o--;)a.push(0);a.reverse()}for(c=f.length,o=d.length,c-o<0&&(o=c,a=d,d=f,f=a),n=0;o;)n=(f[--o]=f[o]+d[o]+n)/Ft|0,f[o]%=Ft;for(n&&(f.unshift(n),++i),c=f.length;f[--c]==0;)f.pop();return r.d=f,r.e=i,dt?rt(r,m):r}function ua(e,r,n){if(e!==~~e||e<r||e>n)throw Error(Mo+e)}function ea(e){var r,n,a,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,r=1;r<i;r++)a=e[r]+"",n=st-a.length,n&&(o+=zi(n)),o+=a;s=e[r],a=s+"",n=st-a.length,n&&(o+=zi(n))}else if(s===0)return"0";for(;s%10===0;)s/=10;return o+s}var Ga=(function(){function e(a,i){var o,s=0,c=a.length;for(a=a.slice();c--;)o=a[c]*i+s,a[c]=o%Ft|0,s=o/Ft|0;return s&&a.unshift(s),a}function r(a,i,o,s){var c,f;if(o!=s)f=o>s?1:-1;else for(c=f=0;c<o;c++)if(a[c]!=i[c]){f=a[c]>i[c]?1:-1;break}return f}function n(a,i,o){for(var s=0;o--;)a[o]-=s,s=a[o]<i[o]?1:0,a[o]=s*Ft+a[o]-i[o];for(;!a[0]&&a.length>1;)a.shift()}return function(a,i,o,s){var c,f,d,h,m,g,y,x,E,_,w,A,C,O,T,N,M,P,L=a.constructor,D=a.s==i.s?1:-1,q=a.d,z=i.d;if(!a.s)return new L(a);if(!i.s)throw Error(xn+"Division by zero");for(f=a.e-i.e,M=z.length,T=q.length,y=new L(D),x=y.d=[],d=0;z[d]==(q[d]||0);)++d;if(z[d]>(q[d]||0)&&--f,o==null?A=o=L.precision:s?A=o+(Tt(a)-Tt(i))+1:A=o,A<0)return new L(0);if(A=A/st+2|0,d=0,M==1)for(h=0,z=z[0],A++;(d<T||h)&&A--;d++)C=h*Ft+(q[d]||0),x[d]=C/z|0,h=C%z|0;else{for(h=Ft/(z[0]+1)|0,h>1&&(z=e(z,h),q=e(q,h),M=z.length,T=q.length),O=M,E=q.slice(0,M),_=E.length;_<M;)E[_++]=0;P=z.slice(),P.unshift(0),N=z[0],z[1]>=Ft/2&&++N;do h=0,c=r(z,E,M,_),c<0?(w=E[0],M!=_&&(w=w*Ft+(E[1]||0)),h=w/N|0,h>1?(h>=Ft&&(h=Ft-1),m=e(z,h),g=m.length,_=E.length,c=r(m,E,g,_),c==1&&(h--,n(m,M<g?P:z,g))):(h==0&&(c=h=1),m=z.slice()),g=m.length,g<_&&m.unshift(0),n(E,m,_),c==-1&&(_=E.length,c=r(z,E,M,_),c<1&&(h++,n(E,M<_?P:z,_))),_=E.length):c===0&&(h++,E=[0]),x[d++]=h,c&&E[0]?E[_++]=q[O]||0:(E=[q[O]],_=1);while((O++<T||E[0]!==void 0)&&A--)}return x[0]||x.shift(),y.e=f,rt(y,s?o+Tt(y)+1:o)}})();function G7(e,r){var n,a,i,o,s,c,f=0,d=0,h=e.constructor,m=h.precision;if(Tt(e)>16)throw Error(ZE+Tt(e));if(!e.s)return new h(Hr);for(dt=!1,c=m,s=new h(.03125);e.abs().gte(.1);)e=e.times(s),d+=5;for(a=Math.log(So(2,d))/Math.LN10*2+5|0,c+=a,n=i=o=new h(Hr),h.precision=c;;){if(i=rt(i.times(e),c),n=n.times(++f),s=o.plus(Ga(i,n,c)),ea(s.d).slice(0,c)===ea(o.d).slice(0,c)){for(;d--;)o=rt(o.times(o),c);return h.precision=m,r==null?(dt=!0,rt(o,m)):o}o=s}}function Tt(e){for(var r=e.e*st,n=e.d[0];n>=10;n/=10)r++;return r}function R0(e,r,n){if(r>e.LN10.sd())throw dt=!0,n&&(e.precision=n),Error(xn+"LN10 precision limit exceeded");return rt(new e(e.LN10),r)}function zi(e){for(var r="";e--;)r+="0";return r}function vc(e,r){var n,a,i,o,s,c,f,d,h,m=1,g=10,y=e,x=y.d,E=y.constructor,_=E.precision;if(y.s<1)throw Error(xn+(y.s?"NaN":"-Infinity"));if(y.eq(Hr))return new E(0);if(r==null?(dt=!1,d=_):d=r,y.eq(10))return r==null&&(dt=!0),R0(E,d);if(d+=g,E.precision=d,n=ea(x),a=n.charAt(0),o=Tt(y),Math.abs(o)<15e14){for(;a<7&&a!=1||a==1&&n.charAt(1)>3;)y=y.times(e),n=ea(y.d),a=n.charAt(0),m++;o=Tt(y),a>1?(y=new E("0."+n),o++):y=new E(a+"."+n.slice(1))}else return f=R0(E,d+2,_).times(o+""),y=vc(new E(a+"."+n.slice(1)),d-g).plus(f),E.precision=_,r==null?(dt=!0,rt(y,_)):y;for(c=s=y=Ga(y.minus(Hr),y.plus(Hr),d),h=rt(y.times(y),d),i=3;;){if(s=rt(s.times(h),d),f=c.plus(Ga(s,new E(i),d)),ea(f.d).slice(0,d)===ea(c.d).slice(0,d))return c=c.times(2),o!==0&&(c=c.plus(R0(E,d+2,_).times(o+""))),c=Ga(c,new E(m),d),E.precision=_,r==null?(dt=!0,rt(c,_)):c;c=f,i+=2}}function A3(e,r){var n,a,i;for((n=r.indexOf("."))>-1&&(r=r.replace(".","")),(a=r.search(/e/i))>0?(n<0&&(n=a),n+=+r.slice(a+1),r=r.substring(0,a)):n<0&&(n=r.length),a=0;r.charCodeAt(a)===48;)++a;for(i=r.length;r.charCodeAt(i-1)===48;)--i;if(r=r.slice(a,i),r){if(i-=a,n=n-a-1,e.e=ds(n/st),e.d=[],a=(n+1)%st,n<0&&(a+=st),a<i){for(a&&e.d.push(+r.slice(0,a)),i-=st;a<i;)e.d.push(+r.slice(a,a+=st));r=r.slice(a),a=st-r.length}else a-=i;for(;a--;)r+="0";if(e.d.push(+r),dt&&(e.e>np||e.e<-np))throw Error(ZE+n)}else e.s=0,e.e=0,e.d=[0];return e}function rt(e,r,n){var a,i,o,s,c,f,d,h,m=e.d;for(s=1,o=m[0];o>=10;o/=10)s++;if(a=r-s,a<0)a+=st,i=r,d=m[h=0];else{if(h=Math.ceil((a+1)/st),o=m.length,h>=o)return e;for(d=o=m[h],s=1;o>=10;o/=10)s++;a%=st,i=a-st+s}if(n!==void 0&&(o=So(10,s-i-1),c=d/o%10|0,f=r<0||m[h+1]!==void 0||d%o,f=n<4?(c||f)&&(n==0||n==(e.s<0?3:2)):c>5||c==5&&(n==4||f||n==6&&(a>0?i>0?d/So(10,s-i):0:m[h-1])%10&1||n==(e.s<0?8:7))),r<1||!m[0])return f?(o=Tt(e),m.length=1,r=r-o-1,m[0]=So(10,(st-r%st)%st),e.e=ds(-r/st)||0):(m.length=1,m[0]=e.e=e.s=0),e;if(a==0?(m.length=h,o=1,h--):(m.length=h+1,o=So(10,st-a),m[h]=i>0?(d/So(10,s-i)%So(10,i)|0)*o:0),f)for(;;)if(h==0){(m[0]+=o)==Ft&&(m[0]=1,++e.e);break}else{if(m[h]+=o,m[h]!=Ft)break;m[h--]=0,o=1}for(a=m.length;m[--a]===0;)m.pop();if(dt&&(e.e>np||e.e<-np))throw Error(ZE+Tt(e));return e}function V7(e,r){var n,a,i,o,s,c,f,d,h,m,g=e.constructor,y=g.precision;if(!e.s||!r.s)return r.s?r.s=-r.s:r=new g(e),dt?rt(r,y):r;if(f=e.d,m=r.d,a=r.e,d=e.e,f=f.slice(),s=d-a,s){for(h=s<0,h?(n=f,s=-s,c=m.length):(n=m,a=d,c=f.length),i=Math.max(Math.ceil(y/st),c)+2,s>i&&(s=i,n.length=1),n.reverse(),i=s;i--;)n.push(0);n.reverse()}else{for(i=f.length,c=m.length,h=i<c,h&&(c=i),i=0;i<c;i++)if(f[i]!=m[i]){h=f[i]<m[i];break}s=0}for(h&&(n=f,f=m,m=n,r.s=-r.s),c=f.length,i=m.length-c;i>0;--i)f[c++]=0;for(i=m.length;i>s;){if(f[--i]<m[i]){for(o=i;o&&f[--o]===0;)f[o]=Ft-1;--f[o],f[i]+=Ft}f[i]-=m[i]}for(;f[--c]===0;)f.pop();for(;f[0]===0;f.shift())--a;return f[0]?(r.d=f,r.e=a,dt?rt(r,y):r):new g(0)}function Bo(e,r,n){var a,i=Tt(e),o=ea(e.d),s=o.length;return r?(n&&(a=n-s)>0?o=o.charAt(0)+"."+o.slice(1)+zi(a):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+zi(-i-1)+o,n&&(a=n-s)>0&&(o+=zi(a))):i>=s?(o+=zi(i+1-s),n&&(a=n-i-1)>0&&(o=o+"."+zi(a))):((a=i+1)<s&&(o=o.slice(0,a)+"."+o.slice(a)),n&&(a=n-s)>0&&(i+1===s&&(o+="."),o+=zi(a))),e.s<0?"-"+o:o}function C3(e,r){if(e.length>r)return e.length=r,!0}function K7(e){var r,n,a;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Mo+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return A3(s,o.toString())}else if(typeof o!="string")throw Error(Mo+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,ice.test(o))A3(s,o);else throw Error(Mo+o)}if(i.prototype=Ee,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=K7,i.config=i.set=oce,e===void 0&&(e={}),e)for(a=["precision","rounding","toExpNeg","toExpPos","LN10"],r=0;r<a.length;)e.hasOwnProperty(n=a[r++])||(e[n]=this[n]);return i.config(e),i}function oce(e){if(!e||typeof e!="object")throw Error(xn+"Object expected");var r,n,a,i=["precision",1,fs,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(r=0;r<i.length;r+=3)if((a=e[n=i[r]])!==void 0)if(ds(a)===a&&a>=i[r+1]&&a<=i[r+2])this[n]=a;else throw Error(Mo+n+": "+a);if((a=e[n="LN10"])!==void 0)if(a==Math.LN10)this[n]=new this(a);else throw Error(Mo+n+": "+a);return this}var QE=K7(ace);Hr=new QE(1);const $e=QE;function Y7(e){var r;return e===0?r=1:r=Math.floor(new $e(e).abs().log(10).toNumber())+1,r}function X7(e,r,n){for(var a=new $e(e),i=0,o=[];a.lt(r)&&i<1e5;)o.push(a.toNumber()),a=a.add(n),i++;return o}var W7=e=>{var[r,n]=e,[a,i]=[r,n];return r>n&&([a,i]=[n,r]),[a,i]},JE=(e,r,n)=>{if(e.lte(0))return new $e(0);var a=Y7(e.toNumber()),i=new $e(10).pow(a),o=e.div(i),s=a!==1?.05:.1,c=new $e(Math.ceil(o.div(s).toNumber())).add(n).mul(s),f=c.mul(i);return r?new $e(f.toNumber()):new $e(Math.ceil(f.toNumber()))},Z7=(e,r,n)=>{var a;if(e.lte(0))return new $e(0);var i=[1,2,2.5,5],o=e.toNumber(),s=Math.floor(new $e(o).abs().log(10).toNumber()),c=new $e(10).pow(s),f=e.div(c).toNumber(),d=i.findIndex(y=>y>=f-1e-10);if(d===-1&&(c=c.mul(10),d=0),d+=n,d>=i.length){var h=Math.floor(d/i.length);d%=i.length,c=c.mul(new $e(10).pow(h))}var m=(a=i[d])!==null&&a!==void 0?a:1,g=new $e(m).mul(c);return r?g:new $e(Math.ceil(g.toNumber()))},lce=(e,r,n)=>{var a=new $e(1),i=new $e(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(a=new $e(10).pow(Y7(e)-1),i=new $e(Math.floor(i.div(a).toNumber())).mul(a)):o>1&&(i=new $e(Math.floor(e)))}else e===0?i=new $e(Math.floor((r-1)/2)):n||(i=new $e(Math.floor(e)));for(var s=Math.floor((r-1)/2),c=[],f=0;f<r;f++)c.push(i.add(new $e(f-s).mul(a)).toNumber());return c},Q7=function(r,n,a,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:JE;if(!Number.isFinite((n-r)/(a-1)))return{step:new $e(0),tickMin:new $e(0),tickMax:new $e(0)};var c=s(new $e(n).sub(r).div(a-1),i,o),f;r<=0&&n>=0?f=new $e(0):(f=new $e(r).add(n).div(2),f=f.sub(new $e(f).mod(c)));var d=Math.ceil(f.sub(r).div(c).toNumber()),h=Math.ceil(new $e(n).sub(f).div(c).toNumber()),m=d+h+1;return m>a?Q7(r,n,a,i,o+1,s):(m<a&&(h=n>0?h+(a-m):h,d=n>0?d:d+(a-m)),{step:c,tickMin:f.sub(new $e(d).mul(c)),tickMax:f.add(new $e(h).mul(c))})},O3=function(r){var[n,a]=r,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",c=Math.max(i,2),[f,d]=W7([n,a]);if(f===-1/0||d===1/0){var h=d===1/0?[f,...Array(i-1).fill(1/0)]:[...Array(i-1).fill(-1/0),d];return n>a?h.reverse():h}if(f===d)return lce(f,i,o);var m=s==="snap125"?Z7:JE,{step:g,tickMin:y,tickMax:x}=Q7(f,d,c,o,0,m),E=X7(y,x.add(new $e(.1).mul(g)),g);return n>a?E.reverse():E},T3=function(r,n){var[a,i]=r,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",[c,f]=W7([a,i]);if(c===-1/0||f===1/0)return[a,i];if(c===f)return[c];var d=s==="snap125"?Z7:JE,h=Math.max(n,2),m=d(new $e(f).sub(c).div(h-1),o,0),g=[...X7(new $e(c),new $e(f),m),f];return o===!1&&(g=g.map(y=>Math.round(y))),a>i?g.reverse():g},sce=e=>e.rootProps.barCategoryGap,am=e=>e.rootProps.stackOffset,J7=e=>e.rootProps.reverseStackOrder,ek=e=>e.options.chartName,tk=e=>e.rootProps.syncId,eq=e=>e.rootProps.syncMethod,rk=e=>e.options.eventEmitter,cr={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},vo={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Vn={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},im=(e,r)=>{if(!(!e||!r))return e!=null&&e.reversed?[r[1],r[0]]:r};function om(e,r,n){if(n!=="auto")return n;if(e!=null)return ni(e,r)?"category":"number"}function N3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function ap(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?N3(Object(n),!0).forEach(function(a){uce(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function uce(e,r,n){return(r=cce(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function cce(e){var r=fce(e,"string");return typeof r=="symbol"?r:r+""}function fce(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var M3={allowDataOverflow:vo.allowDataOverflow,allowDecimals:vo.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:vo.angleAxisId,includeHidden:!1,name:void 0,reversed:vo.reversed,scale:vo.scale,tick:vo.tick,tickCount:void 0,ticks:void 0,type:vo.type,unit:void 0,niceTicks:"auto"},R3={allowDataOverflow:Vn.allowDataOverflow,allowDecimals:Vn.allowDecimals,allowDuplicatedCategory:Vn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Vn.radiusAxisId,includeHidden:Vn.includeHidden,name:void 0,reversed:Vn.reversed,scale:Vn.scale,tick:Vn.tick,tickCount:Vn.tickCount,ticks:void 0,type:Vn.type,unit:void 0,niceTicks:"auto"},dce=(e,r)=>{if(r!=null)return e.polarAxis.angleAxis[r]},nk=de([dce,w7],(e,r)=>{var n;if(e!=null)return e;var a=(n=om(r,"angleAxis",M3.type))!==null&&n!==void 0?n:"category";return ap(ap({},M3),{},{type:a})}),hce=(e,r)=>e.polarAxis.radiusAxis[r],ak=de([hce,w7],(e,r)=>{var n;if(e!=null)return e;var a=(n=om(r,"radiusAxis",R3.type))!==null&&n!==void 0?n:"category";return ap(ap({},R3),{},{type:a})}),lm=e=>e.polarOptions,ik=de([ai,ii,ar],$ue),tq=de([lm,ik],(e,r)=>{if(e!=null)return Hi(e.innerRadius,r,0)}),rq=de([lm,ik],(e,r)=>{if(e!=null)return Hi(e.outerRadius,r,r*.8)}),pce=e=>{if(e==null)return[0,0];var{startAngle:r,endAngle:n}=e;return[r,n]},nq=de([lm],pce);de([nk,nq],im);var aq=de([ik,tq,rq],(e,r,n)=>{if(!(e==null||r==null||n==null))return[r,n]});de([ak,aq],im);var iq=de([mt,lm,tq,rq,ai,ii],(e,r,n,a,i,o)=>{if(!(e!=="centric"&&e!=="radial"||r==null||n==null||a==null)){var{cx:s,cy:c,startAngle:f,endAngle:d}=r;return{cx:Hi(s,i,i/2),cy:Hi(c,o,o/2),innerRadius:n,outerRadius:a,startAngle:f,endAngle:d,clockWise:!1}}}),Vt=(e,r)=>r,sm=(e,r,n)=>n;function oq(e){return e==null?void 0:e.id}function lq(e,r,n){var{chartData:a=[]}=r,{allowDuplicatedCategory:i,dataKey:o}=n,s=new Map;return e.forEach(c=>{var f,d=(f=c.data)!==null&&f!==void 0?f:a;if(!(d==null||d.length===0)){var h=oq(c);d.forEach((m,g)=>{var y=o==null||i?g:String(rr(m,o,null)),x=rr(m,c.dataKey,0),E;s.has(y)?E=s.get(y):E={},Object.assign(E,{[h]:x}),s.set(y,E)})}}),Array.from(s.values())}function ok(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var um=(e,r)=>e===r?!0:e==null||r==null?!1:e[0]===r[0]&&e[1]===r[1];function cm(e,r){return Array.isArray(e)&&Array.isArray(r)&&e.length===0&&r.length===0?!0:e===r}function mce(e,r){if(e.length===r.length){for(var n=0;n<e.length;n++)if(e[n]!==r[n])return!1;return!0}return!1}var Kt=e=>{var r=mt(e);return r==="horizontal"?"xAxis":r==="vertical"?"yAxis":r==="centric"?"angleAxis":"radiusAxis"},hs=e=>e.tooltip.settings.axisId;function lk(e){if(e!=null){var r=e.ticks,n=e.bandwidth,a=e.range(),i=[Math.min(...a),Math.max(...a)];return{domain:()=>e.domain(),range:(function(o){function s(){return o.apply(this,arguments)}return s.toString=function(){return o.toString()},s})(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(o){var s=i[0],c=i[1];return s<=c?o>=s&&o<=c:o>=c&&o<=s},bandwidth:n?()=>n.call(e):void 0,ticks:r?o=>r.call(e,o):void 0,map:(o,s)=>{var c=e(o);if(c!=null){if(e.bandwidth&&s!==null&&s!==void 0&&s.position){var f=e.bandwidth();switch(s.position){case"middle":c+=f/2;break;case"end":c+=f;break}}return c}}}}}var vce=(e,r)=>{if(r!=null)switch(e){case"linear":{if(!na(r)){for(var n,a,i=0;i<r.length;i++){var o=r[i];De(o)&&((n===void 0||o<n)&&(n=o),(a===void 0||o>a)&&(a=o))}return n!==void 0&&a!==void 0?[n,a]:void 0}return r}default:return r}};const Gu=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:lE,scaleDiverging:OI,scaleDivergingLog:TI,scaleDivergingPow:EE,scaleDivergingSqrt:Hre,scaleDivergingSymlog:NI,scaleIdentity:uI,scaleImplicit:M2,scaleLinear:sI,scaleLog:fI,scaleOrdinal:Ap,scalePoint:tte,scalePow:pE,scaleQuantile:pI,scaleQuantize:mI,scaleRadial:hI,scaleSequential:kI,scaleSequentialLog:jI,scaleSequentialPow:SE,scaleSequentialQuantile:CI,scaleSequentialSqrt:Ure,scaleSequentialSymlog:AI,scaleSqrt:Ete,scaleSymlog:dI,scaleThreshold:vI,scaleTime:$re,scaleUtc:Fre,tickFormat:lI},Symbol.toStringTag,{value:"Module"}));function gce(e){if(e in Gu)return Gu[e]();var r="scale".concat(Rc(e));if(r in Gu)return Gu[r]()}function P3(e,r,n){if(typeof e=="function")return e.copy().domain(r).range(n);if(e!=null){var a=gce(e);if(a!=null)return a.domain(r).range(n),a}}function sk(e,r,n,a){if(!(n==null||a==null))return typeof e.scale=="function"?P3(e.scale,n,a):P3(r,n,a)}function yce(e){return"scale".concat(Rc(e))}function bce(e){return yce(e)in Gu}var sq=(e,r,n)=>{if(e!=null){var{scale:a,type:i}=e;if(a==="auto")return i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?"point":i==="category"?"band":"linear";if(typeof a=="string")return bce(a)?a:"point"}};function xce(e,r){for(var n=0,a=e.length,i=e[0]<e[e.length-1];n<a;){var o=Math.floor((n+a)/2);(i?e[o]<r:e[o]>r)?n=o+1:a=o}return n}function uq(e,r){if(e){var n=r??e.domain(),a=n.map(o=>{var s;return(s=e(o))!==null&&s!==void 0?s:0}),i=e.range();if(!(n.length===0||i.length<2))return o=>{var s,c,f=xce(a,o);if(f<=0)return n[0];if(f>=n.length)return n[n.length-1];var d=(s=a[f-1])!==null&&s!==void 0?s:0,h=(c=a[f])!==null&&c!==void 0?c:0;return Math.abs(o-d)<=Math.abs(o-h)?n[f-1]:n[f]}}}function _ce(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):uq(e,void 0)}function D3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function ip(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?D3(Object(n),!0).forEach(function(a){wce(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function wce(e,r,n){return(r=Sce(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Sce(e){var r=Ece(e,"string");return typeof r=="symbol"?r:r+""}function Ece(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var hS=[0,"auto"],Rt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},cq=(e,r)=>e.cartesianAxis.xAxis[r],fa=(e,r)=>{var n=cq(e,r);return n??Rt},Pt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:hS,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:Lc},fq=(e,r)=>e.cartesianAxis.yAxis[r],da=(e,r)=>{var n=fq(e,r);return n??Pt},kce={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},uk=(e,r)=>{var n=e.cartesianAxis.zAxis[r];return n??kce},_r=(e,r,n)=>{switch(r){case"xAxis":return fa(e,n);case"yAxis":return da(e,n);case"zAxis":return uk(e,n);case"angleAxis":return nk(e,n);case"radiusAxis":return ak(e,n);default:throw new Error("Unexpected axis type: ".concat(r))}},jce=(e,r,n)=>{switch(r){case"xAxis":return fa(e,n);case"yAxis":return da(e,n);default:throw new Error("Unexpected axis type: ".concat(r))}},$c=(e,r,n)=>{switch(r){case"xAxis":return fa(e,n);case"yAxis":return da(e,n);case"angleAxis":return nk(e,n);case"radiusAxis":return ak(e,n);default:throw new Error("Unexpected axis type: ".concat(r))}},dq=e=>e.graphicalItems.cartesianItems.some(r=>r.type==="bar")||e.graphicalItems.polarItems.some(r=>r.type==="radialBar");function hq(e,r){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===r;case"yAxis":return"yAxisId"in n&&n.yAxisId===r;case"zAxis":return"zAxisId"in n&&n.zAxisId===r;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===r;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===r;default:return!1}}}var pq=e=>e.graphicalItems.cartesianItems,Ace=de([Vt,sm],hq),mq=(e,r,n)=>e.filter(n).filter(a=>(r==null?void 0:r.includeHidden)===!0?!0:!a.hide),Fc=de([pq,_r,Ace],mq,{memoizeOptions:{resultEqualityCheck:cm}}),vq=de([Fc],e=>e.filter(r=>r.type==="area"||r.type==="bar").filter(ok)),gq=e=>e.filter(r=>!("stackId"in r)||r.stackId===void 0),Cce=de([Fc],gq),yq=e=>e.map(r=>r.data).filter(Boolean).flat(1),Oce=de([Fc],yq,{memoizeOptions:{resultEqualityCheck:cm}}),bq=(e,r)=>{var{chartData:n=[],dataStartIndex:a,dataEndIndex:i}=r;return e.length>0?e:n.slice(a,i+1)},ck=de([Oce,WE],bq),xq=(e,r,n)=>(r==null?void 0:r.dataKey)!=null?e.map(a=>({value:rr(a,r.dataKey)})):n.length>0?n.map(a=>a.dataKey).flatMap(a=>e.map(i=>({value:rr(i,a)}))):e.map(a=>({value:a})),Uc=de([ck,_r,Fc],xq);function Wl(e){if(bn(e)||e instanceof Date){var r=Number(e);if(De(r))return r}}function L3(e){if(Array.isArray(e)){var r=[Wl(e[0]),Wl(e[1])];return na(r)?r:void 0}var n=Wl(e);if(n!=null)return[n,n]}function ei(e){return e.map(Wl).filter(Mr)}function Tce(e,r){var n=Wl(e),a=Wl(r);return n==null&&a==null?0:n==null?-1:a==null?1:n-a}var Nce=de([Uc],e=>e==null?void 0:e.map(r=>r.value).sort(Tce));function _q(e,r){switch(e){case"xAxis":return r.direction==="x";case"yAxis":return r.direction==="y";default:return!1}}function Mce(e,r,n){return!n||typeof r!="number"||Qa(r)?[]:n.length?ei(n.flatMap(a=>{var i=rr(e,a.dataKey),o,s;if(Array.isArray(i)?[o,s]=i:o=s=i,!(!De(o)||!De(s)))return[r-o,r+s]})):[]}var It=e=>{var r=Kt(e),n=hs(e);return $c(e,r,n)},Hc=de([It],e=>e==null?void 0:e.dataKey),Rce=de([vq,WE,It],lq),wq=(e,r,n,a)=>{var i={},o=r.reduce((s,c)=>{if(c.stackId==null)return s;var f=s[c.stackId];return f==null&&(f=[]),f.push(c),s[c.stackId]=f,s},i);return Object.fromEntries(Object.entries(o).map(s=>{var[c,f]=s,d=a?[...f].reverse():f,h=d.map(oq);return[c,{stackedData:fle(e,h,n),graphicalItems:d}]}))},Pce=de([Rce,vq,am,J7],wq),Sq=(e,r,n,a)=>{var{dataStartIndex:i,dataEndIndex:o}=r;if(a==null&&n!=="zAxis"){var s=ple(e,i,o);if(!(s!=null&&s[0]===0&&s[1]===0))return s}},Dce=de([_r],e=>e.allowDataOverflow),fk=e=>{var r;if(e==null||!("domain"in e))return hS;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var n=ei(e.ticks);return[Math.min(...n),Math.max(...n)]}if(e.type==="category")return e.ticks.map(String)}return(r=e==null?void 0:e.domain)!==null&&r!==void 0?r:hS},Eq=de([_r],fk),kq=de([Eq,Dce],F7),Lce=de([Pce,Yi,Vt,kq],Sq,{memoizeOptions:{resultEqualityCheck:um}}),dk=e=>e.errorBars,Ice=(e,r,n)=>e.flatMap(a=>r[a.id]).filter(Boolean).filter(a=>_q(n,a)),op=function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];var i=n.filter(Boolean);if(i.length!==0){var o=i.flat(),s=Math.min(...o),c=Math.max(...o);return[s,c]}},jq=(e,r,n,a,i)=>{var o,s;if(n.length>0&&e.forEach(c=>{n.forEach(f=>{var d,h,m=(d=a[f.id])===null||d===void 0?void 0:d.filter(w=>_q(i,w)),g=rr(c,(h=r.dataKey)!==null&&h!==void 0?h:f.dataKey),y=Mce(c,g,m);if(y.length>=2){var x=Math.min(...y),E=Math.max(...y);(o==null||x<o)&&(o=x),(s==null||E>s)&&(s=E)}var _=L3(g);_!=null&&(o=o==null?_[0]:Math.min(o,_[0]),s=s==null?_[1]:Math.max(s,_[1]))})}),(r==null?void 0:r.dataKey)!=null&&e.forEach(c=>{var f=L3(rr(c,r.dataKey));f!=null&&(o=o==null?f[0]:Math.min(o,f[0]),s=s==null?f[1]:Math.max(s,f[1]))}),De(o)&&De(s))return[o,s]},zce=de([ck,_r,Cce,dk,Vt],jq,{memoizeOptions:{resultEqualityCheck:um}});function qce(e){var{value:r}=e;if(bn(r)||r instanceof Date)return r}var Bce=(e,r,n)=>{var a=e.map(qce).filter(i=>i!=null);return n&&(r.dataKey==null||r.allowDuplicatedCategory&&vz(a))?$7(0,e.length):r.allowDuplicatedCategory?a:Array.from(new Set(a))},Aq=e=>e.referenceElements.dots,ps=(e,r,n)=>e.filter(a=>a.ifOverflow==="extendDomain").filter(a=>r==="xAxis"?a.xAxisId===n:a.yAxisId===n),$ce=de([Aq,Vt,sm],ps),Cq=e=>e.referenceElements.areas,Fce=de([Cq,Vt,sm],ps),Oq=e=>e.referenceElements.lines,Uce=de([Oq,Vt,sm],ps),Tq=(e,r)=>{if(e!=null){var n=ei(e.map(a=>r==="xAxis"?a.x:a.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Hce=de($ce,Vt,Tq),Nq=(e,r)=>{if(e!=null){var n=ei(e.flatMap(a=>[r==="xAxis"?a.x1:a.y1,r==="xAxis"?a.x2:a.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Gce=de([Fce,Vt],Nq);function Vce(e){var r;if(e.x!=null)return ei([e.x]);var n=(r=e.segment)===null||r===void 0?void 0:r.map(a=>a.x);return n==null||n.length===0?[]:ei(n)}function Kce(e){var r;if(e.y!=null)return ei([e.y]);var n=(r=e.segment)===null||r===void 0?void 0:r.map(a=>a.y);return n==null||n.length===0?[]:ei(n)}var Mq=(e,r)=>{if(e!=null){var n=e.flatMap(a=>r==="xAxis"?Vce(a):Kce(a));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Yce=de([Uce,Vt],Mq),Xce=de(Hce,Yce,Gce,(e,r,n)=>op(e,n,r)),Rq=(e,r,n,a,i,o,s,c)=>{if(n!=null)return n;var f=s==="vertical"&&c==="xAxis"||s==="horizontal"&&c==="yAxis",d=f?op(a,o,i):op(o,i);return nce(r,d,e.allowDataOverflow)},Wce=de([_r,Eq,kq,Lce,zce,Xce,mt,Vt],Rq,{memoizeOptions:{resultEqualityCheck:um}}),Zce=[0,1],Pq=(e,r,n,a,i,o,s)=>{if(!((e==null||n==null||n.length===0)&&s===void 0)){var{dataKey:c,type:f}=e,d=ni(r,o);if(d&&c==null){var h;return $7(0,(h=n==null?void 0:n.length)!==null&&h!==void 0?h:0)}return f==="category"?Bce(a,e,d):i==="expand"?Zce:s}},hk=de([_r,mt,ck,Uc,am,Vt,Wce],Pq),ms=de([_r,dq,ek],sq),Dq=(e,r,n)=>{var{niceTicks:a}=r;if(a!=="none"){var i=fk(r),o=Array.isArray(i)&&(i[0]==="auto"||i[1]==="auto");if((a==="snap125"||a==="adaptive")&&r!=null&&r.tickCount&&na(e)){if(o)return O3(e,r.tickCount,r.allowDecimals,a);if(r.type==="number")return T3(e,r.tickCount,r.allowDecimals,a)}if(a==="auto"&&n==="linear"&&r!=null&&r.tickCount){if(o&&na(e))return O3(e,r.tickCount,r.allowDecimals,"adaptive");if(r.type==="number"&&na(e))return T3(e,r.tickCount,r.allowDecimals,"adaptive")}}},pk=de([hk,$c,ms],Dq),Lq=(e,r,n,a)=>{if(a!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&na(r)&&Array.isArray(n)&&n.length>0){var i,o,s=r[0],c=(i=n[0])!==null&&i!==void 0?i:0,f=r[1],d=(o=n[n.length-1])!==null&&o!==void 0?o:0;return[Math.min(s,c),Math.max(f,d)]}return r},Qce=de([_r,hk,pk,Vt],Lq),Jce=de(Uc,_r,(e,r)=>{if(!(!r||r.type!=="number")){var n=1/0,a=Array.from(ei(e.map(m=>m.value))).sort((m,g)=>m-g),i=a[0],o=a[a.length-1];if(i==null||o==null)return 1/0;var s=o-i;if(s===0)return 1/0;for(var c=0;c<a.length-1;c++){var f=a[c],d=a[c+1];if(!(f==null||d==null)){var h=d-f;n=Math.min(n,h)}}return n/s}}),Iq=de(Jce,mt,sce,ar,(e,r,n,a,i)=>i,(e,r,n,a,i)=>{if(!De(e))return 0;var o=r==="vertical"?a.height:a.width;if(i==="gap")return e*o/2;if(i==="no-gap"){var s=Hi(n,e*o),c=e*o/2;return c-s-(c-s)/o*s}return 0}),efe=(e,r,n)=>{var a=fa(e,r);return a==null||typeof a.padding!="string"?0:Iq(e,"xAxis",r,n,a.padding)},tfe=(e,r,n)=>{var a=da(e,r);return a==null||typeof a.padding!="string"?0:Iq(e,"yAxis",r,n,a.padding)},rfe=de(fa,efe,(e,r)=>{var n,a;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:r,right:r}:{left:((n=i.left)!==null&&n!==void 0?n:0)+r,right:((a=i.right)!==null&&a!==void 0?a:0)+r}}),nfe=de(da,tfe,(e,r)=>{var n,a;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:r,bottom:r}:{top:((n=i.top)!==null&&n!==void 0?n:0)+r,bottom:((a=i.bottom)!==null&&a!==void 0?a:0)+r}}),afe=de([ar,rfe,Jp,Qp,(e,r,n)=>n],(e,r,n,a,i)=>{var{padding:o}=a;return i?[o.left,n.width-o.right]:[e.left+r.left,e.left+e.width-r.right]}),ife=de([ar,mt,nfe,Jp,Qp,(e,r,n)=>n],(e,r,n,a,i,o)=>{var{padding:s}=i;return o?[a.height-s.bottom,s.top]:r==="horizontal"?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),Gc=(e,r,n,a)=>{var i;switch(r){case"xAxis":return afe(e,n,a);case"yAxis":return ife(e,n,a);case"zAxis":return(i=uk(e,n))===null||i===void 0?void 0:i.range;case"angleAxis":return nq(e);case"radiusAxis":return aq(e,n);default:return}},zq=de([_r,Gc],im),ofe=de([ms,Qce],vce),mk=de([_r,ms,ofe,zq],sk),qq=(e,r,n,a)=>{if(!(n==null||n.dataKey==null)){var{type:i,scale:o}=n,s=ni(e,a);if(s&&(i==="number"||o!=="auto"))return r.map(c=>c.value)}},vk=de([mt,Uc,$c,Vt],qq),is=de([mk],lk);de([mk],_ce);de([mk,Nce],uq);de([Fc,dk,Vt],Ice);function Bq(e,r){return e.id<r.id?-1:e.id>r.id?1:0}var fm=(e,r)=>r,dm=(e,r,n)=>n,lfe=de(Wp,fm,dm,(e,r,n)=>e.filter(a=>a.orientation===r).filter(a=>a.mirror===n).sort(Bq)),sfe=de(Zp,fm,dm,(e,r,n)=>e.filter(a=>a.orientation===r).filter(a=>a.mirror===n).sort(Bq)),$q=(e,r)=>({width:e.width,height:r.height}),ufe=(e,r)=>{var n=typeof r.width=="number"?r.width:Lc;return{width:n,height:e.height}},cfe=de(ar,fa,$q),ffe=(e,r,n)=>{switch(r){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},dfe=(e,r,n)=>{switch(r){case"left":return e.left;case"right":return n-e.right;default:return 0}},hfe=de(ii,ar,lfe,fm,dm,(e,r,n,a,i)=>{var o={},s;return n.forEach(c=>{var f=$q(r,c);s==null&&(s=ffe(r,a,e));var d=a==="top"&&!i||a==="bottom"&&i;o[c.id]=s-Number(d)*f.height,s+=(d?-1:1)*f.height}),o}),pfe=de(ai,ar,sfe,fm,dm,(e,r,n,a,i)=>{var o={},s;return n.forEach(c=>{var f=ufe(r,c);s==null&&(s=dfe(r,a,e));var d=a==="left"&&!i||a==="right"&&i;o[c.id]=s-Number(d)*f.width,s+=(d?-1:1)*f.width}),o}),mfe=(e,r)=>{var n=fa(e,r);if(n!=null)return hfe(e,n.orientation,n.mirror)},vfe=de([ar,fa,mfe,(e,r)=>r],(e,r,n,a)=>{if(r!=null){var i=n==null?void 0:n[a];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),gfe=(e,r)=>{var n=da(e,r);if(n!=null)return pfe(e,n.orientation,n.mirror)},yfe=de([ar,da,gfe,(e,r)=>r],(e,r,n,a)=>{if(r!=null){var i=n==null?void 0:n[a];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),bfe=de(ar,da,(e,r)=>{var n=typeof r.width=="number"?r.width:Lc;return{width:n,height:e.height}}),Fq=(e,r,n,a)=>{if(n!=null){var{allowDuplicatedCategory:i,type:o,dataKey:s}=n,c=ni(e,a),f=r.map(d=>d.value);if(s&&c&&o==="category"&&i&&vz(f))return f}},gk=de([mt,Uc,_r,Vt],Fq),I3=de([mt,jce,ms,is,gk,vk,Gc,pk,Vt],(e,r,n,a,i,o,s,c,f)=>{if(r!=null){var d=ni(e,f);return{angle:r.angle,interval:r.interval,minTickGap:r.minTickGap,orientation:r.orientation,tick:r.tick,tickCount:r.tickCount,tickFormatter:r.tickFormatter,ticks:r.ticks,type:r.type,unit:r.unit,axisType:f,categoricalDomain:o,duplicateDomain:i,isCategorical:d,niceTicks:c,range:s,realScaleType:n,scale:a}}}),xfe=(e,r,n,a,i,o,s,c,f)=>{if(!(r==null||a==null)){var d=ni(e,f),{type:h,ticks:m,tickCount:g}=r,y=n==="scaleBand"&&typeof a.bandwidth=="function"?a.bandwidth()/2:2,x=h==="category"&&a.bandwidth?a.bandwidth()/y:0;x=f==="angleAxis"&&o!=null&&o.length>=2?gn(o[0]-o[1])*2*x:x;var E=m||i;return E?E.map((_,w)=>{var A=s?s.indexOf(_):_,C=a.map(A);return De(C)?{index:w,coordinate:C+x,value:_,offset:x}:null}).filter(Mr):d&&c?c.map((_,w)=>{var A=a.map(_);return De(A)?{coordinate:A+x,value:_,index:w,offset:x}:null}).filter(Mr):a.ticks?a.ticks(g).map((_,w)=>{var A=a.map(_);return De(A)?{coordinate:A+x,value:_,index:w,offset:x}:null}).filter(Mr):a.domain().map((_,w)=>{var A=a.map(_);return De(A)?{coordinate:A+x,value:s?s[_]:_,index:w,offset:x}:null}).filter(Mr)}},Uq=de([mt,$c,ms,is,pk,Gc,gk,vk,Vt],xfe),_fe=(e,r,n,a,i,o,s)=>{if(!(r==null||n==null||a==null||a[0]===a[1])){var c=ni(e,s),{tickCount:f}=r,d=0;return d=s==="angleAxis"&&(a==null?void 0:a.length)>=2?gn(a[0]-a[1])*2*d:d,c&&o?o.map((h,m)=>{var g=n.map(h);return De(g)?{coordinate:g+d,value:h,index:m,offset:d}:null}).filter(Mr):n.ticks?n.ticks(f).map((h,m)=>{var g=n.map(h);return De(g)?{coordinate:g+d,value:h,index:m,offset:d}:null}).filter(Mr):n.domain().map((h,m)=>{var g=n.map(h);return De(g)?{coordinate:g+d,value:i?i[h]:h,index:m,offset:d}:null}).filter(Mr)}},Hq=de([mt,$c,is,Gc,gk,vk,Vt],_fe),Gq=de(_r,is,(e,r)=>{if(!(e==null||r==null))return ip(ip({},e),{},{scale:r})}),wfe=de([_r,ms,hk,zq],sk),Sfe=de([wfe],lk);de((e,r,n)=>uk(e,n),Sfe,(e,r)=>{if(!(e==null||r==null))return ip(ip({},e),{},{scale:r})});var Efe=de([mt,Wp,Zp],(e,r,n)=>{switch(e){case"horizontal":return r.some(a=>a.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(a=>a.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),kfe=(e,r,n)=>{var a;return(a=e.renderedTicks[r])===null||a===void 0?void 0:a[n]};de([kfe],e=>{if(!(!e||e.length===0))return r=>{var n,a=1/0,i=e[0];for(var o of e){var s=Math.abs(o.coordinate-r);s<a&&(a=s,i=o)}return(n=i)===null||n===void 0?void 0:n.value}});var Vq=e=>e.options.defaultTooltipEventType,Kq=e=>e.options.validateTooltipEventTypes;function Yq(e,r,n){if(e==null)return r;var a=e?"axis":"item";return n==null?r:n.includes(a)?a:r}function yk(e,r){var n=Vq(e),a=Kq(e);return Yq(r,n,a)}function jfe(e){return Ce(r=>yk(r,e))}var Xq=(e,r)=>{var n,a=Number(r);if(!(Qa(a)||r==null))return a>=0?e==null||(n=e[a])===null||n===void 0?void 0:n.value:void 0},Afe=e=>e.tooltip.settings,Bi={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},Cfe={itemInteraction:{click:Bi,hover:Bi},axisInteraction:{click:Bi,hover:Bi},keyboardInteraction:Bi,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},Wq=dr({name:"tooltip",initialState:Cfe,reducers:{addTooltipEntrySettings:{reducer(e,r){e.tooltipItemPayloads.push(r.payload)},prepare:lt()},replaceTooltipEntrySettings:{reducer(e,r){var{prev:n,next:a}=r.payload,i=yn(e).tooltipItemPayloads.indexOf(n);i>-1&&(e.tooltipItemPayloads[i]=a)},prepare:lt()},removeTooltipEntrySettings:{reducer(e,r){var n=yn(e).tooltipItemPayloads.indexOf(r.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:lt()},setTooltipSettingsState(e,r){e.settings=r.payload},setActiveMouseOverItemIndex(e,r){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=r.payload.activeIndex,e.itemInteraction.hover.dataKey=r.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=r.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=r.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,r){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=r.payload.activeIndex,e.itemInteraction.click.dataKey=r.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=r.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=r.payload.activeCoordinate},setMouseOverAxisIndex(e,r){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=r.payload.activeIndex,e.axisInteraction.hover.dataKey=r.payload.activeDataKey,e.axisInteraction.hover.coordinate=r.payload.activeCoordinate},setMouseClickAxisIndex(e,r){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=r.payload.activeIndex,e.axisInteraction.click.dataKey=r.payload.activeDataKey,e.axisInteraction.click.coordinate=r.payload.activeCoordinate},setSyncInteraction(e,r){e.syncInteraction=r.payload},setKeyboardInteraction(e,r){e.keyboardInteraction.active=r.payload.active,e.keyboardInteraction.index=r.payload.activeIndex,e.keyboardInteraction.coordinate=r.payload.activeCoordinate}}}),{addTooltipEntrySettings:Ofe,replaceTooltipEntrySettings:Tfe,removeTooltipEntrySettings:Nfe,setTooltipSettingsState:Mfe,setActiveMouseOverItemIndex:Rfe,mouseLeaveItem:N_e,mouseLeaveChart:Zq,setActiveClickItemIndex:M_e,setMouseOverAxisIndex:Qq,setMouseClickAxisIndex:Pfe,setSyncInteraction:pS,setKeyboardInteraction:lp}=Wq.actions,Dfe=Wq.reducer;function z3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Ud(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?z3(Object(n),!0).forEach(function(a){Lfe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Lfe(e,r,n){return(r=Ife(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Ife(e){var r=zfe(e,"string");return typeof r=="symbol"?r:r+""}function zfe(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function qfe(e,r,n){return r==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function Bfe(e){return e.index!=null}var Jq=(e,r,n,a)=>{if(r==null)return Bi;var i=qfe(e,r,n);if(i==null)return Bi;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(Bfe(i)){if(o)return Ud(Ud({},i),{},{active:!0})}else if(a!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:a,graphicalItemId:void 0};return Ud(Ud({},Bi),{},{coordinate:i.coordinate})};function $fe(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var r=e.valueOf();return Number.isFinite(r)?r:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}function Ffe(e,r){var n=$fe(e),a=r[0],i=r[1];if(n===void 0)return!1;var o=Math.min(a,i),s=Math.max(a,i);return n>=o&&n<=s}function Ufe(e,r,n){if(n==null||r==null)return!0;var a=rr(e,r);return a==null||!na(n)?!0:Ffe(a,n)}var bk=(e,r,n,a)=>{var i=e==null?void 0:e.index;if(i==null)return null;var o=Number(i);if(!De(o))return i;var s=0,c=1/0;r.length>0&&(c=r.length-1);var f=Math.max(s,Math.min(o,c)),d=r[f];return d==null||Ufe(d,n,a)?String(f):null},eB=(e,r,n,a,i,o,s)=>{if(o!=null){var c=s[0],f=c==null?void 0:c.getPosition(o);if(f!=null)return f;var d=i==null?void 0:i[Number(o)];if(d)switch(n){case"horizontal":return{x:d.coordinate,y:(a.top+r)/2};default:return{x:(a.left+e)/2,y:d.coordinate}}}},tB=(e,r,n,a)=>{if(r==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;if(n==="hover"?i=e.itemInteraction.hover.graphicalItemId:i=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&i==null)return e.tooltipItemPayloads;if(i==null&&a!=null){var o=e.tooltipItemPayloads[0];return o!=null?[o]:[]}return e.tooltipItemPayloads.filter(s=>{var c;return((c=s.settings)===null||c===void 0?void 0:c.graphicalItemId)===i})},rB=e=>e.options.tooltipPayloadSearcher,vs=e=>e.tooltip;function q3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function B3(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?q3(Object(n),!0).forEach(function(a){Hfe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Hfe(e,r,n){return(r=Gfe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Gfe(e){var r=Vfe(e,"string");return typeof r=="symbol"?r:r+""}function Vfe(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Kfe(e){if(typeof e=="string"||typeof e=="number")return e}function Yfe(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function Xfe(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return r=>e(r)}function $3(e){if(typeof e=="string")return e}function Wfe(e){if(!(e==null||typeof e!="object")){var r="name"in e?Kfe(e.name):void 0,n="unit"in e?Yfe(e.unit):void 0,a="dataKey"in e?Xfe(e.dataKey):void 0,i="payload"in e?e.payload:void 0,o="color"in e?$3(e.color):void 0,s="fill"in e?$3(e.fill):void 0;return{name:r,unit:n,dataKey:a,payload:i,color:o,fill:s}}}function Zfe(e,r){return e??r}var nB=(e,r,n,a,i,o,s)=>{if(!(r==null||o==null)){var{chartData:c,computedData:f,dataStartIndex:d,dataEndIndex:h}=n,m=[];return e.reduce((g,y)=>{var x,{dataDefinedOnItem:E,settings:_}=y,w=Zfe(E,c),A=Array.isArray(w)?u7(w,d,h):w,C=(x=_==null?void 0:_.dataKey)!==null&&x!==void 0?x:a,O=_==null?void 0:_.nameKey,T;if(a&&Array.isArray(A)&&!Array.isArray(A[0])&&s==="axis"?T=gz(A,a,i):T=o(A,r,f,O),Array.isArray(T))T.forEach(M=>{var P,L,D=Wfe(M),q=D==null?void 0:D.name,z=D==null?void 0:D.dataKey,U=D==null?void 0:D.payload,$=B3(B3({},_),{},{name:q,unit:D==null?void 0:D.unit,color:(P=D==null?void 0:D.color)!==null&&P!==void 0?P:_==null?void 0:_.color,fill:(L=D==null?void 0:D.fill)!==null&&L!==void 0?L:_==null?void 0:_.fill});g.push(b4({tooltipEntrySettings:$,dataKey:z,payload:U,value:rr(U,z),name:q==null?void 0:String(q)}))});else{var N;g.push(b4({tooltipEntrySettings:_,dataKey:C,payload:T,value:rr(T,C),name:(N=rr(T,O))!==null&&N!==void 0?N:_==null?void 0:_.name}))}return g},m)}},xk=de([It,dq,ek],sq),Qfe=de([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,r)=>[...e,...r]),Jfe=de([Kt,hs],hq),gs=de([Qfe,It,Jfe],mq,{memoizeOptions:{resultEqualityCheck:cm}}),ede=de([gs],e=>e.filter(ok)),tde=de([gs],yq,{memoizeOptions:{resultEqualityCheck:cm}}),ys=de([tde,Yi],bq),rde=de([ede,Yi,It],lq),_k=de([ys,It,gs],xq),aB=de([It],fk),nde=de([It],e=>e.allowDataOverflow),iB=de([aB,nde],F7),ade=de([gs],e=>e.filter(ok)),ide=de([rde,ade,am,J7],wq),ode=de([ide,Yi,Kt,iB],Sq),lde=de([gs],gq),sde=de([ys,It,lde,dk,Kt],jq,{memoizeOptions:{resultEqualityCheck:um}}),ude=de([Aq,Kt,hs],ps),cde=de([ude,Kt],Tq),fde=de([Cq,Kt,hs],ps),dde=de([fde,Kt],Nq),hde=de([Oq,Kt,hs],ps),pde=de([hde,Kt],Mq),mde=de([cde,pde,dde],op),vde=de([It,aB,iB,ode,sde,mde,mt,Kt],Rq),Vc=de([It,mt,ys,_k,am,Kt,vde],Pq),gde=de([Vc,It,xk],Dq),yde=de([It,Vc,gde,Kt],Lq),oB=e=>{var r=Kt(e),n=hs(e),a=!1;return Gc(e,r,n,a)},lB=de([It,oB],im),bde=de([It,xk,yde,lB],sk),sB=de([bde],lk),xde=de([mt,_k,It,Kt],Fq),_de=de([mt,_k,It,Kt],qq),wde=(e,r,n,a,i,o,s,c)=>{if(r){var{type:f}=r,d=ni(e,c);if(a){var h=n==="scaleBand"&&a.bandwidth?a.bandwidth()/2:2,m=f==="category"&&a.bandwidth?a.bandwidth()/h:0;return m=c==="angleAxis"&&i!=null&&(i==null?void 0:i.length)>=2?gn(i[0]-i[1])*2*m:m,d&&s?s.map((g,y)=>{var x=a.map(g);return De(x)?{coordinate:x+m,value:g,index:y,offset:m}:null}).filter(Mr):a.domain().map((g,y)=>{var x=a.map(g);return De(x)?{coordinate:x+m,value:o?o[g]:g,index:y,offset:m}:null}).filter(Mr)}}},oi=de([mt,It,xk,sB,oB,xde,_de,Kt],wde),wk=de([Vq,Kq,Afe],(e,r,n)=>Yq(n.shared,e,r)),uB=e=>e.tooltip.settings.trigger,Sk=e=>e.tooltip.settings.defaultIndex,Kc=de([vs,wk,uB,Sk],Jq),gc=de([Kc,ys,Hc,Vc],bk),cB=de([oi,gc],Xq),Sde=de([Kc],e=>{if(e)return e.dataKey}),Ede=de([Kc],e=>{if(e)return e.graphicalItemId}),fB=de([vs,wk,uB,Sk],tB),kde=de([ai,ii,mt,ar,oi,Sk,fB],eB),jde=de([Kc,kde],(e,r)=>e!=null&&e.coordinate?e.coordinate:r),Ade=de([Kc],e=>{var r;return(r=e==null?void 0:e.active)!==null&&r!==void 0?r:!1}),Cde=de([fB,gc,Yi,Hc,cB,rB,wk],nB),Ode=de([Cde],e=>{if(e!=null){var r=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(r))}});function F3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function U3(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?F3(Object(n),!0).forEach(function(a){Tde(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Tde(e,r,n){return(r=Nde(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Nde(e){var r=Mde(e,"string");return typeof r=="symbol"?r:r+""}function Mde(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Rde=()=>Ce(It),Pde=()=>{var e=Rde(),r=Ce(oi),n=Ce(sB);return Kh(!e||!n?void 0:U3(U3({},e),{},{scale:n}),r)};function H3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Bl(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?H3(Object(n),!0).forEach(function(a){Dde(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Dde(e,r,n){return(r=Lde(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Lde(e){var r=Ide(e,"string");return typeof r=="symbol"?r:r+""}function Ide(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var zde=(e,r,n,a)=>{var i=r.find(o=>o&&o.index===n);if(i){if(e==="horizontal")return{x:i.coordinate,y:a.relativeY};if(e==="vertical")return{x:a.relativeX,y:i.coordinate}}return{x:0,y:0}},qde=(e,r,n,a)=>{var i=r.find(d=>d&&d.index===n);if(i){if(e==="centric"){var o=i.coordinate,{radius:s}=a;return Bl(Bl(Bl({},a),tr(a.cx,a.cy,s,o)),{},{angle:o,radius:s})}var c=i.coordinate,{angle:f}=a;return Bl(Bl(Bl({},a),tr(a.cx,a.cy,c,f)),{},{angle:f,radius:c})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function Bde(e,r){var{relativeX:n,relativeY:a}=e;return n>=r.left&&n<=r.left+r.width&&a>=r.top&&a<=r.top+r.height}var dB=(e,r,n,a,i)=>{var o,s=(o=r==null?void 0:r.length)!==null&&o!==void 0?o:0;if(s<=1||e==null)return 0;if(a==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var c=0;c<s;c++){var f,d,h,m,g,y=c>0?(f=n[c-1])===null||f===void 0?void 0:f.coordinate:(d=n[s-1])===null||d===void 0?void 0:d.coordinate,x=(h=n[c])===null||h===void 0?void 0:h.coordinate,E=c>=s-1?(m=n[0])===null||m===void 0?void 0:m.coordinate:(g=n[c+1])===null||g===void 0?void 0:g.coordinate,_=void 0;if(!(y==null||x==null||E==null))if(gn(x-y)!==gn(E-x)){var w=[];if(gn(E-x)===gn(i[1]-i[0])){_=E;var A=x+i[1]-i[0];w[0]=Math.min(A,(A+y)/2),w[1]=Math.max(A,(A+y)/2)}else{_=y;var C=E+i[1]-i[0];w[0]=Math.min(x,(C+x)/2),w[1]=Math.max(x,(C+x)/2)}var O=[Math.min(x,(_+x)/2),Math.max(x,(_+x)/2)];if(e>O[0]&&e<=O[1]||e>=w[0]&&e<=w[1]){var T;return(T=n[c])===null||T===void 0?void 0:T.index}}else{var N=Math.min(y,E),M=Math.max(y,E);if(e>(N+x)/2&&e<=(M+x)/2){var P;return(P=n[c])===null||P===void 0?void 0:P.index}}}else if(r)for(var L=0;L<s;L++){var D=r[L];if(D!=null){var q=r[L+1],z=r[L-1];if(L===0&&q!=null&&e<=(D.coordinate+q.coordinate)/2||L===s-1&&z!=null&&e>(D.coordinate+z.coordinate)/2||L>0&&L<s-1&&z!=null&&q!=null&&e>(D.coordinate+z.coordinate)/2&&e<=(D.coordinate+q.coordinate)/2)return D.index}}return-1},$de=()=>Ce(ek),Ek=(e,r)=>r,hB=(e,r,n)=>n,kk=(e,r,n,a)=>a,Fde=de(oi,e=>Bp(e,r=>r.coordinate)),jk=de([vs,Ek,hB,kk],Jq),Ak=de([jk,ys,Hc,Vc],bk),Ude=(e,r,n)=>{if(r!=null){var a=vs(e);return r==="axis"?n==="hover"?a.axisInteraction.hover.dataKey:a.axisInteraction.click.dataKey:n==="hover"?a.itemInteraction.hover.dataKey:a.itemInteraction.click.dataKey}},pB=de([vs,Ek,hB,kk],tB),sp=de([ai,ii,mt,ar,oi,kk,pB],eB),Hde=de([jk,sp],(e,r)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:r}),mB=de([oi,Ak],Xq),Gde=de([pB,Ak,Yi,Hc,mB,rB,Ek],nB),Vde=de([jk,Ak],(e,r)=>({isActive:e.active&&r!=null,activeIndex:r})),Kde=(e,r,n,a,i,o,s)=>{if(!(!e||!n||!a||!i)&&Bde(e,s)){var c=mle(e,r),f=dB(c,o,i,n,a),d=zde(r,i,f,e);return{activeIndex:String(f),activeCoordinate:d}}},Yde=(e,r,n,a,i,o,s)=>{if(!(!e||!a||!i||!o||!n)){var c=Vue(e,n);if(c){var f=vle(c,r),d=dB(f,s,o,a,i),h=qde(r,o,d,c);return{activeIndex:String(d),activeCoordinate:h}}}},Xde=(e,r,n,a,i,o,s,c)=>{if(!(!e||!r||!a||!i||!o))return r==="horizontal"||r==="vertical"?Kde(e,r,a,i,o,s,c):Yde(e,r,n,a,i,o,s)},Wde=de(e=>e.zIndex.zIndexMap,(e,r)=>r,(e,r,n)=>n,(e,r,n)=>{if(r!=null){var a=e[r];if(a!=null)return n?a.panoramaElement:a.element}}),Zde=de(e=>e.zIndex.zIndexMap,e=>{var r=Object.keys(e).map(a=>parseInt(a,10)).concat(Object.values(cr)),n=Array.from(new Set(r));return n.sort((a,i)=>a-i)},{memoizeOptions:{resultEqualityCheck:mce}});function G3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function V3(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?G3(Object(n),!0).forEach(function(a){Qde(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Qde(e,r,n){return(r=Jde(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Jde(e){var r=ehe(e,"string");return typeof r=="symbol"?r:r+""}function ehe(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var the={},rhe={zIndexMap:Object.values(cr).reduce((e,r)=>V3(V3({},e),{},{[r]:{element:void 0,panoramaElement:void 0,consumers:0}}),the)},nhe=new Set(Object.values(cr));function ahe(e){return nhe.has(e)}var vB=dr({name:"zIndex",initialState:rhe,reducers:{registerZIndexPortal:{reducer:(e,r)=>{var{zIndex:n}=r.payload;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:lt()},unregisterZIndexPortal:{reducer:(e,r)=>{var{zIndex:n}=r.payload;e.zIndexMap[n]&&(e.zIndexMap[n].consumers-=1,e.zIndexMap[n].consumers<=0&&!ahe(n)&&delete e.zIndexMap[n])},prepare:lt()},registerZIndexPortalElement:{reducer:(e,r)=>{var{zIndex:n,element:a,isPanorama:i}=r.payload;e.zIndexMap[n]?i?e.zIndexMap[n].panoramaElement=a:e.zIndexMap[n].element=a:e.zIndexMap[n]={consumers:0,element:i?void 0:a,panoramaElement:i?a:void 0}},prepare:lt()},unregisterZIndexPortalElement:{reducer:(e,r)=>{var{zIndex:n}=r.payload;e.zIndexMap[n]&&(r.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:lt()}}}),{registerZIndexPortal:ihe,unregisterZIndexPortal:ohe,registerZIndexPortalElement:lhe,unregisterZIndexPortalElement:she}=vB.actions,uhe=vB.reducer;function ha(e){var{zIndex:r,children:n}=e,a=Xle(),i=a&&r!==void 0&&r!==0,o=xr(),s=kt();k.useLayoutEffect(()=>i?(s(ihe({zIndex:r})),()=>{s(ohe({zIndex:r}))}):Ho,[s,r,i]);var c=Ce(f=>Wde(f,r,o));return i?c?RS.createPortal(n,c):null:n}function mS(){return mS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},mS.apply(null,arguments)}function K3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Hd(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?K3(Object(n),!0).forEach(function(a){che(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function che(e,r,n){return(r=fhe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function fhe(e){var r=dhe(e,"string");return typeof r=="symbol"?r:r+""}function dhe(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function hhe(e){var{cursor:r,cursorComp:n,cursorProps:a}=e;return k.isValidElement(r)?k.cloneElement(r,a):k.createElement(n,a)}function phe(e){var r,{coordinate:n,payload:a,index:i,offset:o,tooltipAxisBandSize:s,layout:c,cursor:f,tooltipEventType:d,chartName:h}=e,m=n,g=a,y=i;if(!f||!m||h!=="ScatterChart"&&d!=="axis")return null;var x,E,_;if(h==="ScatterChart")x=m,E=oue,_=cr.cursorLine;else if(h==="BarChart")x=lue(c,m,o,s),E=I7,_=cr.cursorRectangle;else if(c==="radial"&&xz(m)){var{cx:w,cy:A,radius:C,startAngle:O,endAngle:T}=z7(m);x={cx:w,cy:A,startAngle:O,endAngle:T,innerRadius:C,outerRadius:C},E=B7,_=cr.cursorLine}else x={points:Wue(c,m,o)},E=M7,_=cr.cursorLine;var N=typeof f=="object"&&"className"in f?f.className:void 0,M=Hd(Hd(Hd(Hd({stroke:"#ccc",pointerEvents:"none"},o),x),Dp(f)),{},{payload:g,payloadIndex:y,className:Je("recharts-tooltip-cursor",N)});return k.createElement(ha,{zIndex:(r=e.zIndex)!==null&&r!==void 0?r:_},k.createElement(hhe,{cursor:f,cursorComp:E,cursorProps:M}))}function mhe(e){var r=Pde(),n=y7(),a=cs(),i=$de();return r==null||n==null||a==null||i==null?null:k.createElement(phe,mS({},e,{offset:n,layout:a,tooltipAxisBandSize:r,chartName:i}))}var gB=k.createContext(null),vhe=()=>k.useContext(gB),P0={exports:{}},Y3;function ghe(){return Y3||(Y3=1,(function(e){var r=Object.prototype.hasOwnProperty,n="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(n=!1));function i(f,d,h){this.fn=f,this.context=d,this.once=h||!1}function o(f,d,h,m,g){if(typeof h!="function")throw new TypeError("The listener must be a function");var y=new i(h,m||f,g),x=n?n+d:d;return f._events[x]?f._events[x].fn?f._events[x]=[f._events[x],y]:f._events[x].push(y):(f._events[x]=y,f._eventsCount++),f}function s(f,d){--f._eventsCount===0?f._events=new a:delete f._events[d]}function c(){this._events=new a,this._eventsCount=0}c.prototype.eventNames=function(){var d=[],h,m;if(this._eventsCount===0)return d;for(m in h=this._events)r.call(h,m)&&d.push(n?m.slice(1):m);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(h)):d},c.prototype.listeners=function(d){var h=n?n+d:d,m=this._events[h];if(!m)return[];if(m.fn)return[m.fn];for(var g=0,y=m.length,x=new Array(y);g<y;g++)x[g]=m[g].fn;return x},c.prototype.listenerCount=function(d){var h=n?n+d:d,m=this._events[h];return m?m.fn?1:m.length:0},c.prototype.emit=function(d,h,m,g,y,x){var E=n?n+d:d;if(!this._events[E])return!1;var _=this._events[E],w=arguments.length,A,C;if(_.fn){switch(_.once&&this.removeListener(d,_.fn,void 0,!0),w){case 1:return _.fn.call(_.context),!0;case 2:return _.fn.call(_.context,h),!0;case 3:return _.fn.call(_.context,h,m),!0;case 4:return _.fn.call(_.context,h,m,g),!0;case 5:return _.fn.call(_.context,h,m,g,y),!0;case 6:return _.fn.call(_.context,h,m,g,y,x),!0}for(C=1,A=new Array(w-1);C<w;C++)A[C-1]=arguments[C];_.fn.apply(_.context,A)}else{var O=_.length,T;for(C=0;C<O;C++)switch(_[C].once&&this.removeListener(d,_[C].fn,void 0,!0),w){case 1:_[C].fn.call(_[C].context);break;case 2:_[C].fn.call(_[C].context,h);break;case 3:_[C].fn.call(_[C].context,h,m);break;case 4:_[C].fn.call(_[C].context,h,m,g);break;default:if(!A)for(T=1,A=new Array(w-1);T<w;T++)A[T-1]=arguments[T];_[C].fn.apply(_[C].context,A)}}return!0},c.prototype.on=function(d,h,m){return o(this,d,h,m,!1)},c.prototype.once=function(d,h,m){return o(this,d,h,m,!0)},c.prototype.removeListener=function(d,h,m,g){var y=n?n+d:d;if(!this._events[y])return this;if(!h)return s(this,y),this;var x=this._events[y];if(x.fn)x.fn===h&&(!g||x.once)&&(!m||x.context===m)&&s(this,y);else{for(var E=0,_=[],w=x.length;E<w;E++)(x[E].fn!==h||g&&!x[E].once||m&&x[E].context!==m)&&_.push(x[E]);_.length?this._events[y]=_.length===1?_[0]:_:s(this,y)}return this},c.prototype.removeAllListeners=function(d){var h;return d?(h=n?n+d:d,this._events[h]&&s(this,h)):(this._events=new a,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=n,c.EventEmitter=c,e.exports=c})(P0)),P0.exports}var yhe=ghe();const bhe=In(yhe);var yc=new bhe,vS="recharts.syncEvent.tooltip",X3="recharts.syncEvent.brush",xhe=(e,r)=>{if(r&&Array.isArray(e)){var n=Number.parseInt(r,10);if(!Qa(n))return e[n]}},_he={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},yB=dr({name:"options",initialState:_he,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),whe=yB.reducer,{createEventEmitter:She}=yB.actions;function Ehe(e){return e.tooltip.syncInteraction}var khe={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},bB=dr({name:"chartData",initialState:khe,reducers:{setChartData(e,r){if(e.chartData=r.payload,r.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}r.payload.length>0&&e.dataEndIndex!==r.payload.length-1&&(e.dataEndIndex=r.payload.length-1)},setComputedData(e,r){e.computedData=r.payload},setDataStartEndIndexes(e,r){var{startIndex:n,endIndex:a}=r.payload;n!=null&&(e.dataStartIndex=n),a!=null&&(e.dataEndIndex=a)}}}),{setChartData:W3,setDataStartEndIndexes:jhe,setComputedData:R_e}=bB.actions,Ahe=bB.reducer,Che=["x","y"];function Z3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function $l(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Z3(Object(n),!0).forEach(function(a){Ohe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Ohe(e,r,n){return(r=The(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function The(e){var r=Nhe(e,"string");return typeof r=="symbol"?r:r+""}function Nhe(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Mhe(e,r){if(e==null)return{};var n,a,i=Rhe(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Rhe(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function Phe(){var e=Ce(tk),r=Ce(rk),n=kt(),a=Ce(eq),i=Ce(oi),o=cs(),s=Ic(),c=Ce(f=>f.rootProps.className);k.useEffect(()=>{if(e==null)return Ho;var f=(d,h,m)=>{if(r!==m&&e===d){if(a==="index"){var g;if(s&&h!==null&&h!==void 0&&(g=h.payload)!==null&&g!==void 0&&g.coordinate&&h.payload.sourceViewBox){var y=h.payload.coordinate,{x,y:E}=y,_=Mhe(y,Che),{x:w,y:A,width:C,height:O}=h.payload.sourceViewBox,T=$l($l({},_),{},{x:s.x+(C?(x-w)/C:0)*s.width,y:s.y+(O?(E-A)/O:0)*s.height});n($l($l({},h),{},{payload:$l($l({},h.payload),{},{coordinate:T})}))}else n(h);return}if(i!=null){var N;if(typeof a=="function"){var M={activeTooltipIndex:h.payload.index==null?void 0:Number(h.payload.index),isTooltipActive:h.payload.active,activeIndex:h.payload.index==null?void 0:Number(h.payload.index),activeLabel:h.payload.label,activeDataKey:h.payload.dataKey,activeCoordinate:h.payload.coordinate},P=a(i,M);N=i[P]}else a==="value"&&(N=i.find(B=>String(B.value)===h.payload.label));var{coordinate:L}=h.payload;if(N==null||h.payload.active===!1||L==null||s==null){n(pS({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}var{x:D,y:q}=L,z=Math.min(D,s.x+s.width),U=Math.min(q,s.y+s.height),$={x:o==="horizontal"?N.coordinate:z,y:o==="horizontal"?U:N.coordinate},Y=pS({active:h.payload.active,coordinate:$,dataKey:h.payload.dataKey,index:String(N.index),label:h.payload.label,sourceViewBox:h.payload.sourceViewBox,graphicalItemId:h.payload.graphicalItemId});n(Y)}}};return yc.on(vS,f),()=>{yc.off(vS,f)}},[c,n,r,e,a,i,o,s])}function Dhe(){var e=Ce(tk),r=Ce(rk),n=kt();k.useEffect(()=>{if(e==null)return Ho;var a=(i,o,s)=>{r!==s&&e===i&&n(jhe(o))};return yc.on(X3,a),()=>{yc.off(X3,a)}},[n,r,e])}function Lhe(){var e=kt();k.useEffect(()=>{e(She())},[e]),Phe(),Dhe()}function Ihe(e,r,n,a,i,o){var s=Ce(x=>Ude(x,e,r)),c=Ce(Ede),f=Ce(rk),d=Ce(tk),h=Ce(eq),m=Ce(Ehe),g=m==null?void 0:m.active,y=Ic();k.useEffect(()=>{if(!g&&d!=null&&f!=null){var x=pS({active:o,coordinate:n,dataKey:s,index:i,label:typeof a=="number"?String(a):a,sourceViewBox:y,graphicalItemId:c});yc.emit(vS,d,x,f)}},[g,n,s,c,i,a,f,d,h,o,y])}function Q3(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function J3(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Q3(Object(n),!0).forEach(function(a){zhe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q3(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function zhe(e,r,n){return(r=qhe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function qhe(e){var r=Bhe(e,"string");return typeof r=="symbol"?r:r+""}function Bhe(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function $he(e){return e.dataKey}function Fhe(e,r){return k.isValidElement(e)?k.cloneElement(e,r):typeof e=="function"?k.createElement(e,r):k.createElement(Dse,r)}var eM=[],Uhe={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function Hhe(e){var r,n,a=br(e,Uhe),{active:i,allowEscapeViewBox:o,animationDuration:s,animationEasing:c,content:f,filterNull:d,isAnimationActive:h,offset:m,payloadUniqBy:g,position:y,reverseDirection:x,useTranslate3d:E,wrapperStyle:_,cursor:w,shared:A,trigger:C,defaultIndex:O,portal:T,axisId:N}=a,M=kt(),P=typeof O=="number"?String(O):O;k.useEffect(()=>{M(Mfe({shared:A,trigger:C,axisId:N,active:i,defaultIndex:P}))},[M,A,C,N,i,P]);var L=Ic(),D=N7(),q=jfe(A),{activeIndex:z,isActive:U}=(r=Ce(xe=>Vde(xe,q,C,P)))!==null&&r!==void 0?r:{},$=Ce(xe=>Gde(xe,q,C,P)),Y=Ce(xe=>mB(xe,q,C,P)),B=Ce(xe=>Hde(xe,q,C,P)),Z=$,ae=vhe(),V=(n=i??U)!==null&&n!==void 0?n:!1,[fe,F]=noe([Z,V]),X=q==="axis"?Y:void 0;Ihe(q,C,B,X,z,V);var ce=T??ae;if(ce==null||L==null||q==null)return null;var G=Z??eM;V||(G=eM),d&&G.length&&(G=Oie(G.filter(xe=>xe.value!=null&&(xe.hide!==!0||a.includeHidden)),g,$he));var H=G.length>0,te=J3(J3({},a),{},{payload:G,label:X,active:V,activeIndex:z,coordinate:B,accessibilityLayer:D}),W=k.createElement(Vse,{allowEscapeViewBox:o,animationDuration:s,animationEasing:c,isAnimationActive:h,active:V,coordinate:B,hasPayload:H,offset:m,position:y,reverseDirection:x,useTranslate3d:E,viewBox:L,wrapperStyle:_,lastBoundingBox:fe,innerRef:F,hasPortalFromProps:!!T},Fhe(f,te));return k.createElement(k.Fragment,null,RS.createPortal(W,ce),V&&k.createElement(mhe,{cursor:w,tooltipEventType:q,coordinate:B,payload:G,index:z}))}function Ghe(e,r,n){return(r=Vhe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Vhe(e){var r=Khe(e,"string");return typeof r=="symbol"?r:r+""}function Khe(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}class Yhe{constructor(r){Ghe(this,"cache",new Map),this.maxSize=r}get(r){var n=this.cache.get(r);return n!==void 0&&(this.cache.delete(r),this.cache.set(r,n)),n}set(r,n){if(this.cache.has(r))this.cache.delete(r);else if(this.cache.size>=this.maxSize){var a=this.cache.keys().next().value;a!=null&&this.cache.delete(a)}this.cache.set(r,n)}clear(){this.cache.clear()}size(){return this.cache.size}}function tM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Xhe(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?tM(Object(n),!0).forEach(function(a){Whe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Whe(e,r,n){return(r=Zhe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Zhe(e){var r=Qhe(e,"string");return typeof r=="symbol"?r:r+""}function Qhe(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Jhe={cacheSize:2e3,enableCache:!0},xB=Xhe({},Jhe),rM=new Yhe(xB.cacheSize),epe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},nM="recharts_measurement_span";function tpe(e,r){var n=r.fontSize||"",a=r.fontFamily||"",i=r.fontWeight||"",o=r.fontStyle||"",s=r.letterSpacing||"",c=r.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(a,"|").concat(i,"|").concat(o,"|").concat(s,"|").concat(c)}var aM=(e,r)=>{try{var n=document.getElementById(nM);n||(n=document.createElement("span"),n.setAttribute("id",nM),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,epe,r),n.textContent="".concat(e);var a=n.getBoundingClientRect();return{width:a.width,height:a.height}}catch{return{width:0,height:0}}},Ju=function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(r==null||Bc.isSsr)return{width:0,height:0};if(!xB.enableCache)return aM(r,n);var a=tpe(r,n),i=rM.get(a);if(i)return i;var o=aM(r,n);return rM.set(a,o),o},_B;function rpe(e,r,n){return(r=npe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function npe(e){var r=ape(e,"string");return typeof r=="symbol"?r:r+""}function ape(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var iM=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,oM=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,ipe=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,ope=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,lpe={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},spe=["cm","mm","pt","pc","in","Q","px"];function upe(e){return spe.includes(e)}var Vl="NaN";function cpe(e,r){return e*lpe[r]}class er{static parse(r){var n,[,a,i]=(n=ope.exec(r))!==null&&n!==void 0?n:[];return a==null?er.NaN:new er(parseFloat(a),i??"")}constructor(r,n){this.num=r,this.unit=n,this.num=r,this.unit=n,Qa(r)&&(this.unit=""),n!==""&&!ipe.test(n)&&(this.num=NaN,this.unit=""),upe(n)&&(this.num=cpe(r,n),this.unit="px")}add(r){return this.unit!==r.unit?new er(NaN,""):new er(this.num+r.num,this.unit)}subtract(r){return this.unit!==r.unit?new er(NaN,""):new er(this.num-r.num,this.unit)}multiply(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new er(NaN,""):new er(this.num*r.num,this.unit||r.unit)}divide(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new er(NaN,""):new er(this.num/r.num,this.unit||r.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Qa(this.num)}}_B=er;rpe(er,"NaN",new _B(NaN,""));function wB(e){if(e==null||e.includes(Vl))return Vl;for(var r=e;r.includes("*")||r.includes("/");){var n,[,a,i,o]=(n=iM.exec(r))!==null&&n!==void 0?n:[],s=er.parse(a??""),c=er.parse(o??""),f=i==="*"?s.multiply(c):s.divide(c);if(f.isNaN())return Vl;r=r.replace(iM,f.toString())}for(;r.includes("+")||/.-\d+(?:\.\d+)?/.test(r);){var d,[,h,m,g]=(d=oM.exec(r))!==null&&d!==void 0?d:[],y=er.parse(h??""),x=er.parse(g??""),E=m==="+"?y.add(x):y.subtract(x);if(E.isNaN())return Vl;r=r.replace(oM,E.toString())}return r}var lM=/\(([^()]*)\)/;function fpe(e){for(var r=e,n;(n=lM.exec(r))!=null;){var[,a]=n;r=r.replace(lM,wB(a))}return r}function dpe(e){var r=e.replace(/\s+/g,"");return r=fpe(r),r=wB(r),r}function hpe(e){try{return dpe(e)}catch{return Vl}}function D0(e){var r=hpe(e.slice(5,-1));return r===Vl?"":r}var ppe=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],mpe=["dx","dy","angle","className","breakAll"];function gS(){return gS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},gS.apply(null,arguments)}function sM(e,r){if(e==null)return{};var n,a,i=vpe(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function vpe(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var SB=/[ \f\n\r\t\v\u2028\u2029]+/,EB=e=>{var{children:r,breakAll:n,style:a}=e;try{var i=[];Ut(r)||(n?i=r.toString().split(""):i=r.toString().split(SB));var o=i.map(c=>({word:c,width:Ju(c,a).width})),s=n?0:Ju(" ",a).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}};function kB(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function gpe(e){return Ut(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var jB=(e,r,n,a)=>e.reduce((i,o)=>{var{word:s,width:c}=o,f=i[i.length-1];if(f&&c!=null&&(r==null||a||f.width+c+n<Number(r)))f.words.push(s),f.width+=c+n;else{var d={words:[s],width:c};i.push(d)}return i},[]),AB=e=>e.reduce((r,n)=>r.width>n.width?r:n),ype="…",uM=(e,r,n,a,i,o,s,c)=>{var f=e.slice(0,r),d=EB({breakAll:n,style:a,children:f+ype});if(!d)return[!1,[]];var h=jB(d.wordsWithComputedWidth,o,s,c),m=h.length>i||AB(h).width>Number(o);return[m,h]},bpe=(e,r,n,a,i)=>{var{maxLines:o,children:s,style:c,breakAll:f}=e,d=Ae(o),h=String(s),m=jB(r,a,n,i);if(!d||i)return m;var g=m.length>o||AB(m).width>Number(a);if(!g)return m;for(var y=0,x=h.length-1,E=0,_;y<=x&&E<=h.length-1;){var w=Math.floor((y+x)/2),A=w-1,[C,O]=uM(h,A,f,c,o,a,n,i),[T]=uM(h,w,f,c,o,a,n,i);if(!C&&!T&&(y=w+1),C&&T&&(x=w-1),!C&&T){_=O;break}E++}return _||m},cM=e=>{var r=Ut(e)?[]:e.toString().split(SB);return[{words:r,width:void 0}]},xpe=e=>{var{width:r,scaleToFit:n,children:a,style:i,breakAll:o,maxLines:s}=e;if((r||n)&&!Bc.isSsr){var c,f,d=EB({breakAll:o,children:a,style:i});if(d){var{wordsWithComputedWidth:h,spaceWidth:m}=d;c=h,f=m}else return cM(a);return bpe({breakAll:o,children:a,maxLines:s,style:i},c,f,r,!!n)}return cM(a)},CB="#808080",_pe={angle:0,breakAll:!1,capHeight:"0.71em",fill:CB,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},Ck=k.forwardRef((e,r)=>{var n=br(e,_pe),{x:a,y:i,lineHeight:o,capHeight:s,fill:c,scaleToFit:f,textAnchor:d,verticalAnchor:h}=n,m=sM(n,ppe),g=k.useMemo(()=>xpe({breakAll:m.breakAll,children:m.children,maxLines:m.maxLines,scaleToFit:f,style:m.style,width:m.width}),[m.breakAll,m.children,m.maxLines,f,m.style,m.width]),{dx:y,dy:x,angle:E,className:_,breakAll:w}=m,A=sM(m,mpe);if(!bn(a)||!bn(i)||g.length===0)return null;var C=Number(a)+(Ae(y)?y:0),O=Number(i)+(Ae(x)?x:0);if(!De(C)||!De(O))return null;var T;switch(h){case"start":T=D0("calc(".concat(s,")"));break;case"middle":T=D0("calc(".concat((g.length-1)/2," * -").concat(o," + (").concat(s," / 2))"));break;default:T=D0("calc(".concat(g.length-1," * -").concat(o,")"));break}var N=[],M=g[0];if(f&&M!=null){var P=M.width,{width:L}=m;N.push("scale(".concat(Ae(L)&&Ae(P)?L/P:1,")"))}return E&&N.push("rotate(".concat(E,", ").concat(C,", ").concat(O,")")),N.length&&(A.transform=N.join(" ")),k.createElement("text",gS({},fr(A),{ref:r,x:C,y:O,className:Je("recharts-text",_),textAnchor:d,fill:c.includes("url")?CB:c}),g.map((D,q)=>{var z=D.words.join(w?"":" ");return k.createElement("tspan",{x:C,dy:q===0?T:o,key:"".concat(z,"-").concat(q)},z)}))});Ck.displayName="Text";function fM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Kn(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?fM(Object(n),!0).forEach(function(a){wpe(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function wpe(e,r,n){return(r=Spe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Spe(e){var r=Epe(e,"string");return typeof r=="symbol"?r:r+""}function Epe(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var kpe=e=>{var{viewBox:r,position:n,offset:a=0,parentViewBox:i}=e,{x:o,y:s,height:c,upperWidth:f,lowerWidth:d}=GE(r),h=o,m=o+(f-d)/2,g=(h+m)/2,y=(f+d)/2,x=h+f/2,E=c>=0?1:-1,_=E*a,w=E>0?"end":"start",A=E>0?"start":"end",C=f>=0?1:-1,O=C*a,T=C>0?"end":"start",N=C>0?"start":"end",M=i;if(n==="top"){var P={x:h+f/2,y:s-_,horizontalAnchor:"middle",verticalAnchor:w};return M&&(P.height=Math.max(s-M.y,0),P.width=f),P}if(n==="bottom"){var L={x:m+d/2,y:s+c+_,horizontalAnchor:"middle",verticalAnchor:A};return M&&(L.height=Math.max(M.y+M.height-(s+c),0),L.width=d),L}if(n==="left"){var D={x:g-O,y:s+c/2,horizontalAnchor:T,verticalAnchor:"middle"};return M&&(D.width=Math.max(D.x-M.x,0),D.height=c),D}if(n==="right"){var q={x:g+y+O,y:s+c/2,horizontalAnchor:N,verticalAnchor:"middle"};return M&&(q.width=Math.max(M.x+M.width-q.x,0),q.height=c),q}var z=M?{width:y,height:c}:{};return n==="insideLeft"?Kn({x:g+O,y:s+c/2,horizontalAnchor:N,verticalAnchor:"middle"},z):n==="insideRight"?Kn({x:g+y-O,y:s+c/2,horizontalAnchor:T,verticalAnchor:"middle"},z):n==="insideTop"?Kn({x:h+f/2,y:s+_,horizontalAnchor:"middle",verticalAnchor:A},z):n==="insideBottom"?Kn({x:m+d/2,y:s+c-_,horizontalAnchor:"middle",verticalAnchor:w},z):n==="insideTopLeft"?Kn({x:h+O,y:s+_,horizontalAnchor:N,verticalAnchor:A},z):n==="insideTopRight"?Kn({x:h+f-O,y:s+_,horizontalAnchor:T,verticalAnchor:A},z):n==="insideBottomLeft"?Kn({x:m+O,y:s+c-_,horizontalAnchor:N,verticalAnchor:w},z):n==="insideBottomRight"?Kn({x:m+d-O,y:s+c-_,horizontalAnchor:T,verticalAnchor:w},z):n&&typeof n=="object"&&(Ae(n.x)||Lo(n.x))&&(Ae(n.y)||Lo(n.y))?Kn({x:o+Hi(n.x,y),y:s+Hi(n.y,c),horizontalAnchor:"end",verticalAnchor:"end"},z):Kn({x,y:s+c/2,horizontalAnchor:"middle",verticalAnchor:"middle"},z)},jpe=["labelRef"],Ape=["content"];function dM(e,r){if(e==null)return{};var n,a,i=Cpe(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Cpe(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function hM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Vu(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?hM(Object(n),!0).forEach(function(a){Ope(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Ope(e,r,n){return(r=Tpe(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Tpe(e){var r=Npe(e,"string");return typeof r=="symbol"?r:r+""}function Npe(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Ba(){return Ba=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Ba.apply(null,arguments)}var OB=k.createContext(null),TB=e=>{var{x:r,y:n,upperWidth:a,lowerWidth:i,width:o,height:s,children:c}=e,f=k.useMemo(()=>({x:r,y:n,upperWidth:a,lowerWidth:i,width:o,height:s}),[r,n,a,i,o,s]);return k.createElement(OB.Provider,{value:f},c)},NB=()=>{var e=k.useContext(OB),r=Ic();return e||(r?GE(r):void 0)},Mpe=k.createContext(null),Rpe=()=>{var e=k.useContext(Mpe),r=Ce(iq);return e||r},Ppe=e=>{var{value:r,formatter:n}=e,a=Ut(e.children)?r:e.children;return typeof n=="function"?n(a):a},Ok=e=>e!=null&&typeof e=="function",Dpe=(e,r)=>{var n=gn(r-e),a=Math.min(Math.abs(r-e),360);return n*a},Lpe=(e,r,n,a,i)=>{var{offset:o,className:s}=e,{cx:c,cy:f,innerRadius:d,outerRadius:h,startAngle:m,endAngle:g,clockWise:y}=i,x=(d+h)/2,E=Dpe(m,g),_=E>=0?1:-1,w,A;switch(r){case"insideStart":w=m+_*o,A=y;break;case"insideEnd":w=g-_*o,A=!y;break;case"end":w=g+_*o,A=y;break;default:throw new Error("Unsupported position ".concat(r))}A=E<=0?A:!A;var C=tr(c,f,x,w),O=tr(c,f,x,w+(A?1:-1)*359),T="M".concat(C.x,",").concat(C.y,`
172
+ A`).concat(x,",").concat(x,",0,1,").concat(A?0:1,`,
173
+ `).concat(O.x,",").concat(O.y),N=Ut(e.id)?sc("recharts-radial-line-"):e.id;return k.createElement("text",Ba({},a,{dominantBaseline:"central",className:Je("recharts-radial-bar-label",s)}),k.createElement("defs",null,k.createElement("path",{id:N,d:T})),k.createElement("textPath",{xlinkHref:"#".concat(N)},n))},Ipe=(e,r,n)=>{var{cx:a,cy:i,innerRadius:o,outerRadius:s,startAngle:c,endAngle:f}=e,d=(c+f)/2;if(n==="outside"){var{x:h,y:m}=tr(a,i,s+r,d);return{x:h,y:m,textAnchor:h>=a?"start":"end",verticalAnchor:"middle"}}if(n==="center")return{x:a,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(n==="centerTop")return{x:a,y:i,textAnchor:"middle",verticalAnchor:"start"};if(n==="centerBottom")return{x:a,y:i,textAnchor:"middle",verticalAnchor:"end"};var g=(o+s)/2,{x:y,y:x}=tr(a,i,g,d);return{x:y,y:x,textAnchor:"middle",verticalAnchor:"middle"}},nh=e=>e!=null&&"cx"in e&&Ae(e.cx),zpe={angle:0,offset:5,zIndex:cr.label,position:"middle",textBreakAll:!1};function qpe(e){if(!nh(e))return e;var{cx:r,cy:n,outerRadius:a}=e,i=a*2;return{x:r-a,y:n-a,width:i,upperWidth:i,lowerWidth:i,height:i}}function qi(e){var r=br(e,zpe),{viewBox:n,parentViewBox:a,position:i,value:o,children:s,content:c,className:f="",textBreakAll:d,labelRef:h}=r,m=Rpe(),g=NB(),y=i==="center"?g:m??g,x,E,_;n==null?x=y:nh(n)?x=n:x=GE(n);var w=qpe(x);if(!x||Ut(o)&&Ut(s)&&!k.isValidElement(c)&&typeof c!="function")return null;var A=Vu(Vu({},r),{},{viewBox:x});if(k.isValidElement(c)){var{labelRef:C}=A,O=dM(A,jpe);return k.cloneElement(c,O)}if(typeof c=="function"){var{content:T}=A,N=dM(A,Ape);if(E=k.createElement(c,N),k.isValidElement(E))return E}else E=Ppe(r);var M=fr(r);if(nh(x)){if(i==="insideStart"||i==="insideEnd"||i==="end")return Lpe(r,i,E,M,x);_=Ipe(x,r.offset,r.position)}else{if(!w)return null;var P=kpe({viewBox:w,position:i,offset:r.offset,parentViewBox:nh(a)?void 0:a});_=Vu(Vu({x:P.x,y:P.y,textAnchor:P.horizontalAnchor,verticalAnchor:P.verticalAnchor},P.width!==void 0?{width:P.width}:{}),P.height!==void 0?{height:P.height}:{})}return k.createElement(ha,{zIndex:r.zIndex},k.createElement(Ck,Ba({ref:h,className:Je("recharts-label",f)},M,_,{textAnchor:kB(M.textAnchor)?M.textAnchor:_.textAnchor,breakAll:d}),E))}qi.displayName="Label";var Bpe=(e,r,n)=>{if(!e)return null;var a={viewBox:r,labelRef:n};return e===!0?k.createElement(qi,Ba({key:"label-implicit"},a)):bn(e)?k.createElement(qi,Ba({key:"label-implicit",value:e},a)):k.isValidElement(e)?e.type===qi?k.cloneElement(e,Vu({key:"label-implicit"},a)):k.createElement(qi,Ba({key:"label-implicit",content:e},a)):Ok(e)?k.createElement(qi,Ba({key:"label-implicit",content:e},a)):e&&typeof e=="object"?k.createElement(qi,Ba({},e,{key:"label-implicit"},a)):null};function MB(e){var{label:r,labelRef:n}=e,a=NB();return Bpe(r,a,n)||null}var $pe=["valueAccessor"],Fpe=["dataKey","clockWise","id","textBreakAll","zIndex"];function up(){return up=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},up.apply(null,arguments)}function pM(e,r){if(e==null)return{};var n,a,i=Upe(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Upe(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var Hpe=e=>{var r=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(gpe(r))return r},RB=k.createContext(void 0),Gpe=RB.Provider,PB=k.createContext(void 0);PB.Provider;function Vpe(){return k.useContext(RB)}function Kpe(){return k.useContext(PB)}function ah(e){var{valueAccessor:r=Hpe}=e,n=pM(e,$pe),{dataKey:a,clockWise:i,id:o,textBreakAll:s,zIndex:c}=n,f=pM(n,Fpe),d=Vpe(),h=Kpe(),m=d||h;return!m||!m.length?null:k.createElement(ha,{zIndex:c??cr.label},k.createElement(la,{className:"recharts-label-list"},m.map((g,y)=>{var x,E=Ut(a)?r(g,y):rr(g.payload,a),_=Ut(o)?{}:{id:"".concat(o,"-").concat(y)};return k.createElement(qi,up({key:"label-".concat(y)},fr(g),f,_,{fill:(x=n.fill)!==null&&x!==void 0?x:g.fill,parentViewBox:g.parentViewBox,value:E,textBreakAll:s,viewBox:g.viewBox,index:y,zIndex:0}))})))}ah.displayName="LabelList";function Ype(e){var{label:r}=e;return r?r===!0?k.createElement(ah,{key:"labelList-implicit"}):k.isValidElement(r)||Ok(r)?k.createElement(ah,{key:"labelList-implicit",content:r}):typeof r=="object"?k.createElement(ah,up({key:"labelList-implicit"},r,{type:String(r.type)})):null:null}function yS(){return yS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},yS.apply(null,arguments)}var DB=e=>{var{cx:r,cy:n,r:a,className:i}=e,o=Je("recharts-dot",i);return Ae(r)&&Ae(n)&&Ae(a)?k.createElement("circle",yS({},oa(e),DE(e),{className:o,cx:r,cy:n,r:a})):null},Xpe={radiusAxis:{},angleAxis:{}},LB=dr({name:"polarAxis",initialState:Xpe,reducers:{addRadiusAxis(e,r){e.radiusAxis[r.payload.id]=r.payload},removeRadiusAxis(e,r){delete e.radiusAxis[r.payload.id]},addAngleAxis(e,r){e.angleAxis[r.payload.id]=r.payload},removeAngleAxis(e,r){delete e.angleAxis[r.payload.id]}}}),{addRadiusAxis:P_e,removeRadiusAxis:D_e,addAngleAxis:L_e,removeAngleAxis:I_e}=LB.actions,Wpe=LB.reducer;function Zpe(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var L0={exports:{}},Qe={};/** @license React v17.0.2
174
+ * react-is.production.min.js
175
+ *
176
+ * Copyright (c) Facebook, Inc. and its affiliates.
177
+ *
178
+ * This source code is licensed under the MIT license found in the
179
+ * LICENSE file in the root directory of this source tree.
180
+ */var mM;function Qpe(){if(mM)return Qe;mM=1;var e=60103,r=60106,n=60107,a=60108,i=60114,o=60109,s=60110,c=60112,f=60113,d=60120,h=60115,m=60116,g=60121,y=60122,x=60117,E=60129,_=60131;if(typeof Symbol=="function"&&Symbol.for){var w=Symbol.for;e=w("react.element"),r=w("react.portal"),n=w("react.fragment"),a=w("react.strict_mode"),i=w("react.profiler"),o=w("react.provider"),s=w("react.context"),c=w("react.forward_ref"),f=w("react.suspense"),d=w("react.suspense_list"),h=w("react.memo"),m=w("react.lazy"),g=w("react.block"),y=w("react.server.block"),x=w("react.fundamental"),E=w("react.debug_trace_mode"),_=w("react.legacy_hidden")}function A(U){if(typeof U=="object"&&U!==null){var $=U.$$typeof;switch($){case e:switch(U=U.type,U){case n:case i:case a:case f:case d:return U;default:switch(U=U&&U.$$typeof,U){case s:case c:case m:case h:case o:return U;default:return $}}case r:return $}}}var C=o,O=e,T=c,N=n,M=m,P=h,L=r,D=i,q=a,z=f;return Qe.ContextConsumer=s,Qe.ContextProvider=C,Qe.Element=O,Qe.ForwardRef=T,Qe.Fragment=N,Qe.Lazy=M,Qe.Memo=P,Qe.Portal=L,Qe.Profiler=D,Qe.StrictMode=q,Qe.Suspense=z,Qe.isAsyncMode=function(){return!1},Qe.isConcurrentMode=function(){return!1},Qe.isContextConsumer=function(U){return A(U)===s},Qe.isContextProvider=function(U){return A(U)===o},Qe.isElement=function(U){return typeof U=="object"&&U!==null&&U.$$typeof===e},Qe.isForwardRef=function(U){return A(U)===c},Qe.isFragment=function(U){return A(U)===n},Qe.isLazy=function(U){return A(U)===m},Qe.isMemo=function(U){return A(U)===h},Qe.isPortal=function(U){return A(U)===r},Qe.isProfiler=function(U){return A(U)===i},Qe.isStrictMode=function(U){return A(U)===a},Qe.isSuspense=function(U){return A(U)===f},Qe.isValidElementType=function(U){return typeof U=="string"||typeof U=="function"||U===n||U===i||U===E||U===a||U===f||U===d||U===_||typeof U=="object"&&U!==null&&(U.$$typeof===m||U.$$typeof===h||U.$$typeof===o||U.$$typeof===s||U.$$typeof===c||U.$$typeof===x||U.$$typeof===g||U[0]===y)},Qe.typeOf=A,Qe}var vM;function Jpe(){return vM||(vM=1,L0.exports=Qpe()),L0.exports}Jpe();var IB=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,I0={},gM;function eme(){return gM||(gM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function r(n){var i;if(typeof n!="object"||n==null)return!1;if(Object.getPrototypeOf(n)===null)return!0;if(Object.prototype.toString.call(n)!=="[object Object]"){const o=n[Symbol.toStringTag];return o==null||!((i=Object.getOwnPropertyDescriptor(n,Symbol.toStringTag))!=null&&i.writable)?!1:n.toString()===`[object ${o}]`}let a=n;for(;Object.getPrototypeOf(a)!==null;)a=Object.getPrototypeOf(a);return Object.getPrototypeOf(n)===a}e.isPlainObject=r})(I0)),I0}var z0,yM;function tme(){return yM||(yM=1,z0=eme().isPlainObject),z0}var rme=tme();const nme=In(rme);var bM,xM,_M,wM,SM;function EM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function kM(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?EM(Object(n),!0).forEach(function(a){ame(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function ame(e,r,n){return(r=ime(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function ime(e){var r=ome(e,"string");return typeof r=="symbol"?r:r+""}function ome(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function cp(){return cp=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},cp.apply(null,arguments)}function Lu(e,r){return r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}var jM=(e,r,n,a,i)=>{var o=n-a,s;return s=xt(bM||(bM=Lu(["M ",",",""])),e,r),s+=xt(xM||(xM=Lu(["L ",",",""])),e+n,r),s+=xt(_M||(_M=Lu(["L ",",",""])),e+n-o/2,r+i),s+=xt(wM||(wM=Lu(["L ",",",""])),e+n-o/2-a,r+i),s+=xt(SM||(SM=Lu(["L ",","," Z"])),e,r),s},lme={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},sme=e=>{var r=br(e,lme),{x:n,y:a,upperWidth:i,lowerWidth:o,height:s,className:c}=r,{animationEasing:f,animationDuration:d,animationBegin:h,isUpdateAnimationActive:m}=r,g=k.useRef(null),[y,x]=k.useState(-1),E=k.useRef(i),_=k.useRef(o),w=k.useRef(s),A=k.useRef(n),C=k.useRef(a),O=XE(e,"trapezoid-");if(k.useEffect(()=>{if(g.current&&g.current.getTotalLength)try{var $=g.current.getTotalLength();$&&x($)}catch{}},[]),n!==+n||a!==+a||i!==+i||o!==+o||s!==+s||i===0&&o===0||s===0)return null;var T=Je("recharts-trapezoid",c);if(!m)return k.createElement("g",null,k.createElement("path",cp({},fr(r),{className:T,d:jM(n,a,i,o,s)})));var N=E.current,M=_.current,P=w.current,L=A.current,D=C.current,q="0px ".concat(y===-1?1:y,"px"),z="".concat(y,"px ").concat(y,"px"),U=R7(["strokeDasharray"],d,f);return k.createElement(YE,{animationId:O,key:O,canBegin:y>0,duration:d,easing:f,isActive:m,begin:h},$=>{var Y=Tr(N,i,$),B=Tr(M,o,$),Z=Tr(P,s,$),ae=Tr(L,n,$),V=Tr(D,a,$);g.current&&(E.current=Y,_.current=B,w.current=Z,A.current=ae,C.current=V);var fe=$>0?{transition:U,strokeDasharray:z}:{strokeDasharray:q};return k.createElement("path",cp({},fr(r),{className:T,d:jM(ae,V,Y,B,Z),ref:g,style:kM(kM({},fe),r.style)}))})},ume=["option","shapeType","activeClassName","inActiveClassName"];function cme(e,r){if(e==null)return{};var n,a,i=fme(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function fme(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function AM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function fp(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?AM(Object(n),!0).forEach(function(a){dme(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function dme(e,r,n){return(r=hme(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function hme(e){var r=pme(e,"string");return typeof r=="symbol"?r:r+""}function pme(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function mme(e,r){return fp(fp({},r),e)}function vme(e,r){return e==="symbols"}function CM(e){var{shapeType:r,elementProps:n}=e;switch(r){case"rectangle":return k.createElement(I7,n);case"trapezoid":return k.createElement(sme,n);case"sector":return k.createElement(B7,n);case"symbols":if(vme(r))return k.createElement(bz,n);break;case"curve":return k.createElement(M7,n);default:return null}}function gme(e){return k.isValidElement(e)?e.props:e}function yme(e){var{option:r,shapeType:n,activeClassName:a="recharts-active-shape",inActiveClassName:i="recharts-shape"}=e,o=cme(e,ume),s;if(k.isValidElement(r))s=k.cloneElement(r,fp(fp({},o),gme(r)));else if(typeof r=="function")s=r(o,o.index);else if(nme(r)&&typeof r!="boolean"){var c=mme(r,o);s=k.createElement(CM,{shapeType:n,elementProps:c})}else{var f=o;s=k.createElement(CM,{shapeType:n,elementProps:f})}return o.isActive?k.createElement(la,{className:a},s):k.createElement(la,{className:i},s)}function bme(e){var{tooltipEntrySettings:r}=e,n=kt(),a=xr(),i=k.useRef(null);return k.useLayoutEffect(()=>{a||(i.current===null?n(Ofe(r)):i.current!==r&&n(Tfe({prev:i.current,next:r})),i.current=r)},[r,n,a]),k.useLayoutEffect(()=>()=>{i.current&&(n(Nfe(i.current)),i.current=null)},[n]),null}function xme(e){var{legendPayload:r}=e,n=kt(),a=xr(),i=k.useRef(null);return k.useLayoutEffect(()=>{a||(i.current===null?n(sse(r)):i.current!==r&&n(use({prev:i.current,next:r})),i.current=r)},[n,a,r]),k.useLayoutEffect(()=>()=>{i.current&&(n(cse(i.current)),i.current=null)},[n]),null}var q0,_me=()=>{var[e]=k.useState(()=>sc("uid-"));return e},wme=(q0=$H.useId)!==null&&q0!==void 0?q0:_me;function Sme(e,r){var n=wme();return r||(e?"".concat(e,"-").concat(n):n)}var Eme=k.createContext(void 0),kme=e=>{var{id:r,type:n,children:a}=e,i=Sme("recharts-".concat(n),r);return k.createElement(Eme.Provider,{value:i},a(i))},jme={cartesianItems:[],polarItems:[]},zB=dr({name:"graphicalItems",initialState:jme,reducers:{addCartesianGraphicalItem:{reducer(e,r){e.cartesianItems.push(r.payload)},prepare:lt()},replaceCartesianGraphicalItem:{reducer(e,r){var{prev:n,next:a}=r.payload,i=yn(e).cartesianItems.indexOf(n);i>-1&&(e.cartesianItems[i]=a)},prepare:lt()},removeCartesianGraphicalItem:{reducer(e,r){var n=yn(e).cartesianItems.indexOf(r.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:lt()},addPolarGraphicalItem:{reducer(e,r){e.polarItems.push(r.payload)},prepare:lt()},removePolarGraphicalItem:{reducer(e,r){var n=yn(e).polarItems.indexOf(r.payload);n>-1&&e.polarItems.splice(n,1)},prepare:lt()},replacePolarGraphicalItem:{reducer(e,r){var{prev:n,next:a}=r.payload,i=yn(e).polarItems.indexOf(n);i>-1&&(e.polarItems[i]=a)},prepare:lt()}}}),{addCartesianGraphicalItem:Ame,replaceCartesianGraphicalItem:Cme,removeCartesianGraphicalItem:Ome,addPolarGraphicalItem:z_e,removePolarGraphicalItem:q_e,replacePolarGraphicalItem:B_e}=zB.actions,Tme=zB.reducer,Nme=e=>{var r=kt(),n=k.useRef(null);return k.useLayoutEffect(()=>{n.current===null?r(Ame(e)):n.current!==e&&r(Cme({prev:n.current,next:e})),n.current=e},[r,e]),k.useLayoutEffect(()=>()=>{n.current&&(r(Ome(n.current)),n.current=null)},[r]),null},Mme=k.memo(Nme),Rme=["points"];function OM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function B0(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?OM(Object(n),!0).forEach(function(a){Pme(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Pme(e,r,n){return(r=Dme(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Dme(e){var r=Lme(e,"string");return typeof r=="symbol"?r:r+""}function Lme(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function dp(){return dp=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},dp.apply(null,arguments)}function Ime(e,r){if(e==null)return{};var n,a,i=zme(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function zme(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function qme(e){var{option:r,dotProps:n,className:a}=e;if(k.isValidElement(r))return k.cloneElement(r,n);if(typeof r=="function")return r(n);var i=Je(a,typeof r!="boolean"?r.className:""),o=n??{},{points:s}=o,c=Ime(o,Rme);return k.createElement(DB,dp({},c,{className:i}))}function Bme(e,r){return e==null?!1:r?!0:e.length===1}function $me(e){var{points:r,dot:n,className:a,dotClassName:i,dataKey:o,baseProps:s,needClip:c,clipPathId:f,zIndex:d=cr.scatter}=e;if(!Bme(r,n))return null;var h=IB(n),m=eae(n),g=r.map((x,E)=>{var _,w,A=B0(B0(B0({r:3},s),m),{},{index:E,cx:(_=x.x)!==null&&_!==void 0?_:void 0,cy:(w=x.y)!==null&&w!==void 0?w:void 0,dataKey:o,value:x.value,payload:x.payload,points:r});return k.createElement(qme,{key:"dot-".concat(E),option:n,dotProps:A,className:i})}),y={};return c&&f!=null&&(y.clipPath="url(#clipPath-".concat(h?"":"dots-").concat(f,")")),k.createElement(ha,{zIndex:d},k.createElement(la,dp({className:a},y),g))}function TM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function NM(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?TM(Object(n),!0).forEach(function(a){Fme(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Fme(e,r,n){return(r=Ume(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Ume(e){var r=Hme(e,"string");return typeof r=="symbol"?r:r+""}function Hme(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Gme={xAxis:{},yAxis:{},zAxis:{}},qB=dr({name:"cartesianAxis",initialState:Gme,reducers:{addXAxis:{reducer(e,r){e.xAxis[r.payload.id]=r.payload},prepare:lt()},replaceXAxis:{reducer(e,r){var{prev:n,next:a}=r.payload;e.xAxis[n.id]!==void 0&&(n.id!==a.id&&delete e.xAxis[n.id],e.xAxis[a.id]=a)},prepare:lt()},removeXAxis:{reducer(e,r){delete e.xAxis[r.payload.id]},prepare:lt()},addYAxis:{reducer(e,r){e.yAxis[r.payload.id]=r.payload},prepare:lt()},replaceYAxis:{reducer(e,r){var{prev:n,next:a}=r.payload;e.yAxis[n.id]!==void 0&&(n.id!==a.id&&delete e.yAxis[n.id],e.yAxis[a.id]=a)},prepare:lt()},removeYAxis:{reducer(e,r){delete e.yAxis[r.payload.id]},prepare:lt()},addZAxis:{reducer(e,r){e.zAxis[r.payload.id]=r.payload},prepare:lt()},replaceZAxis:{reducer(e,r){var{prev:n,next:a}=r.payload;e.zAxis[n.id]!==void 0&&(n.id!==a.id&&delete e.zAxis[n.id],e.zAxis[a.id]=a)},prepare:lt()},removeZAxis:{reducer(e,r){delete e.zAxis[r.payload.id]},prepare:lt()},updateYAxisWidth(e,r){var{id:n,width:a}=r.payload,i=e.yAxis[n];if(i){var o,s=i.widthHistory||[];if(s.length===3&&s[0]===s[2]&&a===s[1]&&a!==i.width&&Math.abs(a-((o=s[0])!==null&&o!==void 0?o:0))<=1)return;var c=[...s,a].slice(-3);e.yAxis[n]=NM(NM({},i),{},{width:a,widthHistory:c})}}}}),{addXAxis:Vme,replaceXAxis:Kme,removeXAxis:Yme,addYAxis:Xme,replaceYAxis:Wme,removeYAxis:Zme,addZAxis:$_e,replaceZAxis:F_e,removeZAxis:U_e,updateYAxisWidth:Qme}=qB.actions,Jme=qB.reducer,eve=de([ar],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),tve=de([eve,ai,ii],(e,r,n)=>{if(!(!e||r==null||n==null))return{x:e.left,y:e.top,width:Math.max(0,r-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),Tk=()=>Ce(tve),rve=()=>Ce(Ode);function MM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function $0(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?MM(Object(n),!0).forEach(function(a){nve(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function nve(e,r,n){return(r=ave(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function ave(e){var r=ive(e,"string");return typeof r=="symbol"?r:r+""}function ive(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var ove=e=>{var{point:r,childIndex:n,mainColor:a,activeDot:i,dataKey:o,clipPath:s}=e;if(i===!1||r.x==null||r.y==null)return null;var c={index:n,dataKey:o,cx:r.x,cy:r.y,r:4,fill:a??"none",strokeWidth:2,stroke:"#fff",payload:r.payload,value:r.value},f=$0($0($0({},c),Dp(i)),DE(i)),d;return k.isValidElement(i)?d=k.cloneElement(i,f):typeof i=="function"?d=i(f):d=k.createElement(DB,f),k.createElement(la,{className:"recharts-active-dot",clipPath:s},d)};function lve(e){var{points:r,mainColor:n,activeDot:a,itemDataKey:i,clipPath:o,zIndex:s=cr.activeDot}=e,c=Ce(gc),f=rve();if(r==null||f==null)return null;var d=r.find(h=>f.includes(h.payload));return Ut(d)?null:k.createElement(ha,{zIndex:s},k.createElement(ove,{point:d,childIndex:Number(c),mainColor:n,dataKey:i,activeDot:a,clipPath:o}))}var sve=e=>{var{chartData:r}=e,n=kt(),a=xr();return k.useEffect(()=>a?()=>{}:(n(W3(r)),()=>{n(W3(void 0))}),[r,n,a]),null},RM={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},BB=dr({name:"brush",initialState:RM,reducers:{setBrushSettings(e,r){return r.payload==null?RM:r.payload}}}),{setBrushSettings:H_e}=BB.actions,uve=BB.reducer,cve=(e,r)=>{var{x:n,y:a}=e,{x:i,y:o}=r;return{x:Math.min(n,i),y:Math.min(a,o),width:Math.abs(i-n),height:Math.abs(o-a)}},fve=e=>{var{x1:r,y1:n,x2:a,y2:i}=e;return cve({x:r,y:n},{x:a,y:i})};function dve(e){return(e%180+180)%180}var hve=function(r){var{width:n,height:a}=r,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=dve(i),s=o*Math.PI/180,c=Math.atan(a/n),f=s>c&&s<Math.PI-c?a/Math.sin(s):n/Math.cos(s);return Math.abs(f)},pve={dots:[],areas:[],lines:[]},$B=dr({name:"referenceElements",initialState:pve,reducers:{addDot:(e,r)=>{e.dots.push(r.payload)},removeDot:(e,r)=>{var n=yn(e).dots.findIndex(a=>a===r.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,r)=>{e.areas.push(r.payload)},removeArea:(e,r)=>{var n=yn(e).areas.findIndex(a=>a===r.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,r)=>{e.lines.push(r.payload)},removeLine:(e,r)=>{var n=yn(e).lines.findIndex(a=>a===r.payload);n!==-1&&e.lines.splice(n,1)}}}),{addDot:G_e,removeDot:V_e,addArea:K_e,removeArea:Y_e,addLine:mve,removeLine:vve}=$B.actions,gve=$B.reducer,FB=k.createContext(void 0),yve=e=>{var{children:r}=e,[n]=k.useState("".concat(sc("recharts"),"-clip")),a=Tk();if(a==null)return null;var{x:i,y:o,width:s,height:c}=a;return k.createElement(FB.Provider,{value:n},k.createElement("defs",null,k.createElement("clipPath",{id:n},k.createElement("rect",{x:i,y:o,height:c,width:s}))),r)},bve=()=>k.useContext(FB);class xve{constructor(r){var{x:n,y:a}=r;this.xAxisScale=n,this.yAxisScale=a}map(r,n){var a,i,{position:o}=n;return{x:(a=this.xAxisScale.map(r.x,{position:o}))!==null&&a!==void 0?a:0,y:(i=this.yAxisScale.map(r.y,{position:o}))!==null&&i!==void 0?i:0}}mapWithFallback(r,n){var a,i,{position:o,fallback:s}=n,c,f;return s==="rangeMin"?c=this.yAxisScale.rangeMin():s==="rangeMax"?c=this.yAxisScale.rangeMax():c=0,s==="rangeMin"?f=this.xAxisScale.rangeMin():s==="rangeMax"?f=this.xAxisScale.rangeMax():f=0,{x:(a=this.xAxisScale.map(r.x,{position:o}))!==null&&a!==void 0?a:f,y:(i=this.yAxisScale.map(r.y,{position:o}))!==null&&i!==void 0?i:c}}isInRange(r){var{x:n,y:a}=r,i=n==null||this.xAxisScale.isInRange(n),o=a==null||this.yAxisScale.isInRange(a);return i&&o}}function PM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function DM(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?PM(Object(n),!0).forEach(function(a){_ve(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function _ve(e,r,n){return(r=wve(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function wve(e){var r=Sve(e,"string");return typeof r=="symbol"?r:r+""}function Sve(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function hp(){return hp=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},hp.apply(null,arguments)}var Eve=(e,r)=>{var n;if(k.isValidElement(e))n=k.cloneElement(e,r);else if(typeof e=="function")n=e(r);else{if(!De(r.x1)||!De(r.y1)||!De(r.x2)||!De(r.y2))return null;n=k.createElement("line",hp({},r,{className:"recharts-reference-line-line"}))}return n},kve=(e,r,n,a,i,o)=>{var{x:s,width:c}=o,f=i.map(e,{position:n});if(!De(f)||r==="discard"&&!i.isInRange(f))return null;var d=[{x:s+c,y:f},{x:s,y:f}];return a==="left"?d.reverse():d},jve=(e,r,n,a,i,o)=>{var{y:s,height:c}=o,f=i.map(e,{position:n});if(!De(f)||r==="discard"&&!i.isInRange(f))return null;var d=[{x:f,y:s+c},{x:f,y:s}];return a==="top"?d.reverse():d},Ave=(e,r,n,a)=>{var i=[a.mapWithFallback(e[0],{position:n,fallback:"rangeMin"}),a.mapWithFallback(e[1],{position:n,fallback:"rangeMax"})];return r==="discard"&&i.some(o=>!a.isInRange(o))?null:i},Cve=(e,r,n,a,i,o,s)=>{var{x:c,y:f,segment:d,ifOverflow:h}=s,m=bn(c),g=bn(f);return g?kve(f,h,a,o,r,n):m?jve(c,h,a,i,e,n):d!=null&&d.length===2?Ave(d,h,a,new xve({x:e,y:r})):null};function Ove(e){var r=kt();return k.useEffect(()=>(r(mve(e)),()=>{r(vve(e))})),null}function Tve(e){var{xAxisId:r,yAxisId:n,shape:a,className:i,ifOverflow:o}=e,s=xr(),c=bve(),f=Ce(M=>fa(M,r)),d=Ce(M=>da(M,n)),h=Ce(M=>is(M,"xAxis",r,s)),m=Ce(M=>is(M,"yAxis",n,s)),g=Ic();if(!c||!g||f==null||d==null||h==null||m==null)return null;var y=Cve(h,m,g,e.position,f.orientation,d.orientation,e);if(!y)return null;var x=y[0],E=y[1];if(x==null||E==null)return null;var{x:_,y:w}=x,{x:A,y:C}=E,O=o==="hidden"?"url(#".concat(c,")"):void 0,T=DM(DM({clipPath:O},fr(e)),{},{x1:_,y1:w,x2:A,y2:C}),N=fve({x1:_,y1:w,x2:A,y2:C});return k.createElement(ha,{zIndex:e.zIndex},k.createElement(la,{className:Je("recharts-reference-line",i)},Eve(a,T),k.createElement(TB,hp({},N,{lowerWidth:N.width,upperWidth:N.width}),k.createElement(MB,{label:e.label}),e.children)))}var Nve={ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",label:!1,stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle",zIndex:cr.line};function bS(e){var r=br(e,Nve);return k.createElement(k.Fragment,null,k.createElement(Ove,{yAxisId:r.yAxisId,xAxisId:r.xAxisId,ifOverflow:r.ifOverflow,x:r.x,y:r.y,segment:r.segment}),k.createElement(Tve,r))}bS.displayName="ReferenceLine";function UB(e,r){if(r<1)return[];if(r===1)return e;for(var n=[],a=0;a<e.length;a+=r){var i=e[a];i!==void 0&&n.push(i)}return n}function Mve(e,r,n){var a={width:e.width+r.width,height:e.height+r.height};return hve(a,n)}function Rve(e,r,n){var a=n==="width",{x:i,y:o,width:s,height:c}=e;return r===1?{start:a?i:o,end:a?i+s:o+c}:{start:a?i+s:o+c,end:a?i:o}}function bc(e,r,n,a,i){if(e*r<e*a||e*r>e*i)return!1;var o=n();return e*(r-e*o/2-a)>=0&&e*(r+e*o/2-i)<=0}function Pve(e,r){return UB(e,r+1)}function Dve(e,r,n,a,i){for(var o=(a||[]).slice(),{start:s,end:c}=r,f=0,d=1,h=s,m=function(){var x=a==null?void 0:a[f];if(x===void 0)return{v:UB(a,d)};var E=f,_,w=()=>(_===void 0&&(_=n(x,E)),_),A=x.coordinate,C=f===0||bc(e,A,w,h,c);C||(f=0,h=s,d+=1),C&&(h=A+e*(w()/2+i),f+=d)},g;d<=o.length;)if(g=m(),g)return g.v;return[]}function Lve(e,r,n,a,i){var o=(a||[]).slice(),s=o.length;if(s===0)return[];for(var{start:c,end:f}=r,d=1;d<=s;d++){for(var h=(s-1)%d,m=c,g=!0,y=function(){var O=a[E];if(O==null)return 0;var T=E,N,M=()=>(N===void 0&&(N=n(O,T)),N),P=O.coordinate,L=E===h||bc(e,P,M,m,f);if(!L)return g=!1,1;L&&(m=P+e*(M()/2+i))},x,E=h;E<s&&(x=y(),!(x!==0&&x===1));E+=d);if(g){for(var _=[],w=h;w<s;w+=d){var A=a[w];A!=null&&_.push(A)}return _}}return[]}function LM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function sr(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?LM(Object(n),!0).forEach(function(a){Ive(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Ive(e,r,n){return(r=zve(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function zve(e){var r=qve(e,"string");return typeof r=="symbol"?r:r+""}function qve(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Bve(e,r,n,a,i){for(var o=(a||[]).slice(),s=o.length,{start:c}=r,{end:f}=r,d=function(g){var y=o[g];if(y==null)return 1;var x=y,E,_=()=>(E===void 0&&(E=n(y,g)),E);if(g===s-1){var w=e*(x.coordinate+e*_()/2-f);o[g]=x=sr(sr({},x),{},{tickCoord:w>0?x.coordinate-w*e:x.coordinate})}else o[g]=x=sr(sr({},x),{},{tickCoord:x.coordinate});if(x.tickCoord!=null){var A=bc(e,x.tickCoord,_,c,f);A&&(f=x.tickCoord-e*(_()/2+i),o[g]=sr(sr({},x),{},{isShow:!0}))}},h=s-1;h>=0;h--)d(h);return o}function $ve(e,r,n,a,i,o){var s=(a||[]).slice(),c=s.length,{start:f,end:d}=r;if(o){var h=a[c-1];if(h!=null){var m=n(h,c-1),g=e*(h.coordinate+e*m/2-d);if(s[c-1]=h=sr(sr({},h),{},{tickCoord:g>0?h.coordinate-g*e:h.coordinate}),h.tickCoord!=null){var y=bc(e,h.tickCoord,()=>m,f,d);y&&(d=h.tickCoord-e*(m/2+i),s[c-1]=sr(sr({},h),{},{isShow:!0}))}}}for(var x=o?c-1:c,E=function(A){var C=s[A];if(C==null)return 1;var O=C,T,N=()=>(T===void 0&&(T=n(C,A)),T);if(A===0){var M=e*(O.coordinate-e*N()/2-f);s[A]=O=sr(sr({},O),{},{tickCoord:M<0?O.coordinate-M*e:O.coordinate})}else s[A]=O=sr(sr({},O),{},{tickCoord:O.coordinate});if(O.tickCoord!=null){var P=bc(e,O.tickCoord,N,f,d);P&&(f=O.tickCoord+e*(N()/2+i),s[A]=sr(sr({},O),{},{isShow:!0}))}},_=0;_<x;_++)E(_);return s}function Nk(e,r,n){var{tick:a,ticks:i,viewBox:o,minTickGap:s,orientation:c,interval:f,tickFormatter:d,unit:h,angle:m}=e;if(!i||!i.length||!a)return[];if(Ae(f)||Bc.isSsr){var g;return(g=Pve(i,Ae(f)?f:0))!==null&&g!==void 0?g:[]}var y=[],x=c==="top"||c==="bottom"?"width":"height",E=h&&x==="width"?Ju(h,{fontSize:r,letterSpacing:n}):{width:0,height:0},_=(T,N)=>{var M=typeof d=="function"?d(T.value,N):T.value;return x==="width"?Mve(Ju(M,{fontSize:r,letterSpacing:n}),E,m):Ju(M,{fontSize:r,letterSpacing:n})[x]},w=i[0],A=i[1],C=i.length>=2&&w!=null&&A!=null?gn(A.coordinate-w.coordinate):1,O=Rve(o,C,x);return f==="equidistantPreserveStart"?Dve(C,O,_,i,s):f==="equidistantPreserveEnd"?Lve(C,O,_,i,s):(f==="preserveStart"||f==="preserveStartEnd"?y=$ve(C,O,_,i,s,f==="preserveStartEnd"):y=Bve(C,O,_,i,s),y.filter(T=>T.isShow))}var Fve=e=>{var{ticks:r,label:n,labelGapWithTick:a=5,tickSize:i=0,tickMargin:o=0}=e,s=0;if(r){Array.from(r).forEach(h=>{if(h){var m=h.getBoundingClientRect();m.width>s&&(s=m.width)}});var c=n?n.getBoundingClientRect().width:0,f=i+o,d=s+f+c+(n?a:0);return Math.round(d)}return 0},Uve={xAxis:{},yAxis:{}},HB=dr({name:"renderedTicks",initialState:Uve,reducers:{setRenderedTicks:(e,r)=>{var{axisType:n,axisId:a,ticks:i}=r.payload;e[n][a]=i},removeRenderedTicks:(e,r)=>{var{axisType:n,axisId:a}=r.payload;delete e[n][a]}}}),{setRenderedTicks:Hve,removeRenderedTicks:Gve}=HB.actions,Vve=HB.reducer,Kve=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function Yve(e,r){if(e==null)return{};var n,a,i=Xve(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Xve(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function $o(){return $o=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},$o.apply(null,arguments)}function IM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function bt(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?IM(Object(n),!0).forEach(function(a){Wve(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Wve(e,r,n){return(r=Zve(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Zve(e){var r=Qve(e,"string");return typeof r=="symbol"?r:r+""}function Qve(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var Va={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:cr.axis};function Jve(e){var{x:r,y:n,width:a,height:i,orientation:o,mirror:s,axisLine:c,otherSvgProps:f}=e;if(!c)return null;var d=bt(bt(bt({},f),oa(c)),{},{fill:"none"});if(o==="top"||o==="bottom"){var h=+(o==="top"&&!s||o==="bottom"&&s);d=bt(bt({},d),{},{x1:r,y1:n+h*i,x2:r+a,y2:n+h*i})}else{var m=+(o==="left"&&!s||o==="right"&&s);d=bt(bt({},d),{},{x1:r+m*a,y1:n,x2:r+m*a,y2:n+i})}return k.createElement("line",$o({},d,{className:Je("recharts-cartesian-axis-line",qp(c,"className"))}))}function ege(e,r,n,a,i,o,s,c,f){var d,h,m,g,y,x,E=c?-1:1,_=e.tickSize||s,w=Ae(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":d=h=e.coordinate,g=n+ +!c*i,m=g-E*_,x=m-E*f,y=w;break;case"left":m=g=e.coordinate,h=r+ +!c*a,d=h-E*_,y=d-E*f,x=w;break;case"right":m=g=e.coordinate,h=r+ +c*a,d=h+E*_,y=d+E*f,x=w;break;default:d=h=e.coordinate,g=n+ +c*i,m=g+E*_,x=m+E*f,y=w;break}return{line:{x1:d,y1:m,x2:h,y2:g},tick:{x:y,y:x}}}function tge(e,r){switch(e){case"left":return r?"start":"end";case"right":return r?"end":"start";default:return"middle"}}function rge(e,r){switch(e){case"left":case"right":return"middle";case"top":return r?"start":"end";default:return r?"end":"start"}}function nge(e){var{option:r,tickProps:n,value:a}=e,i,o=Je(n.className,"recharts-cartesian-axis-tick-value");if(k.isValidElement(r))i=k.cloneElement(r,bt(bt({},n),{},{className:o}));else if(typeof r=="function")i=r(bt(bt({},n),{},{className:o}));else{var s="recharts-cartesian-axis-tick-value";typeof r!="boolean"&&(s=Je(s,Zpe(r))),i=k.createElement(Ck,$o({},n,{className:s}),a)}return i}function age(e){var{ticks:r,axisType:n,axisId:a}=e,i=kt();return k.useEffect(()=>{if(a==null||n==null)return Ho;var o=r.map(s=>({value:s.value,coordinate:s.coordinate,offset:s.offset,index:s.index}));return i(Hve({ticks:o,axisId:a,axisType:n})),()=>{i(Gve({axisId:a,axisType:n}))}},[i,r,a,n]),null}var ige=k.forwardRef((e,r)=>{var{ticks:n=[],tick:a,tickLine:i,stroke:o,tickFormatter:s,unit:c,padding:f,tickTextProps:d,orientation:h,mirror:m,x:g,y,width:x,height:E,tickSize:_,tickMargin:w,fontSize:A,letterSpacing:C,getTicksConfig:O,events:T,axisType:N,axisId:M}=e,P=Nk(bt(bt({},O),{},{ticks:n}),A,C),L=oa(O),D=Dp(a),q=kB(L.textAnchor)?L.textAnchor:tge(h,m),z=rge(h,m),U={};typeof i=="object"&&(U=i);var $=bt(bt({},L),{},{fill:"none"},U),Y=P.map(ae=>bt({entry:ae},ege(ae,g,y,x,E,h,_,m,w))),B=Y.map(ae=>{var{entry:V,line:fe}=ae;return k.createElement(la,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(V.value,"-").concat(V.coordinate,"-").concat(V.tickCoord)},i&&k.createElement("line",$o({},$,fe,{className:Je("recharts-cartesian-axis-tick-line",qp(i,"className"))})))}),Z=Y.map((ae,V)=>{var fe,F,{entry:X,tick:ce}=ae,G=bt(bt(bt(bt({verticalAnchor:z},L),{},{textAnchor:q,stroke:"none",fill:o},ce),{},{index:V,payload:X,visibleTicksCount:P.length,tickFormatter:s,padding:f},d),{},{angle:(fe=(F=d==null?void 0:d.angle)!==null&&F!==void 0?F:L.angle)!==null&&fe!==void 0?fe:0}),H=bt(bt({},G),D);return k.createElement(la,$o({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(X.value,"-").concat(X.coordinate,"-").concat(X.tickCoord)},aie(T,X,V)),a&&k.createElement(nge,{option:a,tickProps:H,value:"".concat(typeof s=="function"?s(X.value,V):X.value).concat(c||"")}))});return k.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(N,"-ticks")},k.createElement(age,{ticks:P,axisId:M,axisType:N}),Z.length>0&&k.createElement(ha,{zIndex:cr.label},k.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(N,"-tick-labels"),ref:r},Z)),B.length>0&&k.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(N,"-tick-lines")},B))}),oge=k.forwardRef((e,r)=>{var{axisLine:n,width:a,height:i,className:o,hide:s,ticks:c,axisType:f,axisId:d}=e,h=Yve(e,Kve),[m,g]=k.useState(""),[y,x]=k.useState(""),E=k.useRef(null);k.useImperativeHandle(r,()=>({getCalculatedWidth:()=>{var w;return Fve({ticks:E.current,label:(w=e.labelRef)===null||w===void 0?void 0:w.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var _=k.useCallback(w=>{if(w){var A=w.getElementsByClassName("recharts-cartesian-axis-tick-value");E.current=A;var C=A[0];if(C){var O=window.getComputedStyle(C),T=O.fontSize,N=O.letterSpacing;(T!==m||N!==y)&&(g(T),x(N))}}},[m,y]);return s||a!=null&&a<=0||i!=null&&i<=0?null:k.createElement(ha,{zIndex:e.zIndex},k.createElement(la,{className:Je("recharts-cartesian-axis",o)},k.createElement(Jve,{x:e.x,y:e.y,width:a,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:oa(e)}),k.createElement(ige,{ref:_,axisType:f,events:h,fontSize:m,getTicksConfig:e,height:e.height,letterSpacing:y,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:c,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:d}),k.createElement(TB,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},k.createElement(MB,{label:e.label,labelRef:e.labelRef}),e.children)))}),Mk=k.forwardRef((e,r)=>{var n=br(e,Va);return k.createElement(oge,$o({},n,{ref:r}))});Mk.displayName="CartesianAxis";var lge=["x1","y1","x2","y2","key"],sge=["offset"],uge=["xAxisId","yAxisId"],cge=["xAxisId","yAxisId"];function zM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function ur(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?zM(Object(n),!0).forEach(function(a){fge(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function fge(e,r,n){return(r=dge(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function dge(e){var r=hge(e,"string");return typeof r=="symbol"?r:r+""}function hge(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Co(){return Co=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Co.apply(null,arguments)}function pp(e,r){if(e==null)return{};var n,a,i=pge(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function pge(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var mge=e=>{var{fill:r}=e;if(!r||r==="none")return null;var{fillOpacity:n,x:a,y:i,width:o,height:s,ry:c}=e;return k.createElement("rect",{x:a,y:i,ry:c,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function GB(e){var{option:r,lineItemProps:n}=e,a;if(k.isValidElement(r))a=k.cloneElement(r,n);else if(typeof r=="function")a=r(n);else{var i,{x1:o,y1:s,x2:c,y2:f,key:d}=n,h=pp(n,lge),m=(i=oa(h))!==null&&i!==void 0?i:{},{offset:g}=m,y=pp(m,sge);a=k.createElement("line",Co({},y,{x1:o,y1:s,x2:c,y2:f,fill:"none",key:d}))}return a}function vge(e){var{x:r,width:n,horizontal:a=!0,horizontalPoints:i}=e;if(!a||!i||!i.length)return null;var{xAxisId:o,yAxisId:s}=e,c=pp(e,uge),f=i.map((d,h)=>{var m=ur(ur({},c),{},{x1:r,y1:d,x2:r+n,y2:d,key:"line-".concat(h),index:h});return k.createElement(GB,{key:"line-".concat(h),option:a,lineItemProps:m})});return k.createElement("g",{className:"recharts-cartesian-grid-horizontal"},f)}function gge(e){var{y:r,height:n,vertical:a=!0,verticalPoints:i}=e;if(!a||!i||!i.length)return null;var{xAxisId:o,yAxisId:s}=e,c=pp(e,cge),f=i.map((d,h)=>{var m=ur(ur({},c),{},{x1:d,y1:r,x2:d,y2:r+n,key:"line-".concat(h),index:h});return k.createElement(GB,{option:a,lineItemProps:m,key:"line-".concat(h)})});return k.createElement("g",{className:"recharts-cartesian-grid-vertical"},f)}function yge(e){var{horizontalFill:r,fillOpacity:n,x:a,y:i,width:o,height:s,horizontalPoints:c,horizontal:f=!0}=e;if(!f||!r||!r.length||c==null)return null;var d=c.map(m=>Math.round(m+i-i)).sort((m,g)=>m-g);i!==d[0]&&d.unshift(0);var h=d.map((m,g)=>{var y=d[g+1],x=y==null,E=x?i+s-m:y-m;if(E<=0)return null;var _=g%r.length;return k.createElement("rect",{key:"react-".concat(g),y:m,x:a,height:E,width:o,stroke:"none",fill:r[_],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return k.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},h)}function bge(e){var{vertical:r=!0,verticalFill:n,fillOpacity:a,x:i,y:o,width:s,height:c,verticalPoints:f}=e;if(!r||!n||!n.length)return null;var d=f.map(m=>Math.round(m+i-i)).sort((m,g)=>m-g);i!==d[0]&&d.unshift(0);var h=d.map((m,g)=>{var y=d[g+1],x=y==null,E=x?i+s-m:y-m;if(E<=0)return null;var _=g%n.length;return k.createElement("rect",{key:"react-".concat(g),x:m,y:o,width:E,height:c,stroke:"none",fill:n[_],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return k.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},h)}var xge=(e,r)=>{var{xAxis:n,width:a,height:i,offset:o}=e;return c7(Nk(ur(ur(ur({},Va),n),{},{ticks:f7(n),viewBox:{x:0,y:0,width:a,height:i}})),o.left,o.left+o.width,r)},_ge=(e,r)=>{var{yAxis:n,width:a,height:i,offset:o}=e;return c7(Nk(ur(ur(ur({},Va),n),{},{ticks:f7(n),viewBox:{x:0,y:0,width:a,height:i}})),o.top,o.top+o.height,r)},wge={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:cr.grid};function VB(e){var r=b7(),n=x7(),a=y7(),i=ur(ur({},br(e,wge)),{},{x:Ae(e.x)?e.x:a.left,y:Ae(e.y)?e.y:a.top,width:Ae(e.width)?e.width:a.width,height:Ae(e.height)?e.height:a.height}),{xAxisId:o,yAxisId:s,x:c,y:f,width:d,height:h,syncWithTicks:m,horizontalValues:g,verticalValues:y}=i,x=xr(),E=Ce(L=>I3(L,"xAxis",o,x)),_=Ce(L=>I3(L,"yAxis",s,x));if(!sa(d)||!sa(h)||!Ae(c)||!Ae(f))return null;var w=i.verticalCoordinatesGenerator||xge,A=i.horizontalCoordinatesGenerator||_ge,{horizontalPoints:C,verticalPoints:O}=i;if((!C||!C.length)&&typeof A=="function"){var T=g&&g.length,N=A({yAxis:_?ur(ur({},_),{},{ticks:T?g:_.ticks}):void 0,width:r??d,height:n??h,offset:a},T?!0:m);Yh(Array.isArray(N),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof N,"]")),Array.isArray(N)&&(C=N)}if((!O||!O.length)&&typeof w=="function"){var M=y&&y.length,P=w({xAxis:E?ur(ur({},E),{},{ticks:M?y:E.ticks}):void 0,width:r??d,height:n??h,offset:a},M?!0:m);Yh(Array.isArray(P),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof P,"]")),Array.isArray(P)&&(O=P)}return k.createElement(ha,{zIndex:i.zIndex},k.createElement("g",{className:"recharts-cartesian-grid"},k.createElement(mge,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),k.createElement(yge,Co({},i,{horizontalPoints:C})),k.createElement(bge,Co({},i,{verticalPoints:O})),k.createElement(vge,Co({},i,{offset:a,horizontalPoints:C,xAxis:E,yAxis:_})),k.createElement(gge,Co({},i,{offset:a,verticalPoints:O,xAxis:E,yAxis:_}))))}VB.displayName="CartesianGrid";var Sge={},KB=dr({name:"errorBars",initialState:Sge,reducers:{addErrorBar:(e,r)=>{var{itemId:n,errorBar:a}=r.payload;e[n]||(e[n]=[]),e[n].push(a)},replaceErrorBar:(e,r)=>{var{itemId:n,prev:a,next:i}=r.payload;e[n]&&(e[n]=e[n].map(o=>o.dataKey===a.dataKey&&o.direction===a.direction?i:o))},removeErrorBar:(e,r)=>{var{itemId:n,errorBar:a}=r.payload;e[n]&&(e[n]=e[n].filter(i=>i.dataKey!==a.dataKey||i.direction!==a.direction))}}}),{addErrorBar:X_e,replaceErrorBar:W_e,removeErrorBar:Z_e}=KB.actions,Ege=KB.reducer,kge=["children"];function jge(e,r){if(e==null)return{};var n,a,i=Age(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Age(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var Cge={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},Oge=k.createContext(Cge);function Tge(e){var{children:r}=e,n=jge(e,kge);return k.createElement(Oge.Provider,{value:n},r)}function YB(e,r){var n,a,i=Ce(d=>fa(d,e)),o=Ce(d=>da(d,r)),s=(n=i==null?void 0:i.allowDataOverflow)!==null&&n!==void 0?n:Rt.allowDataOverflow,c=(a=o==null?void 0:o.allowDataOverflow)!==null&&a!==void 0?a:Pt.allowDataOverflow,f=s||c;return{needClip:f,needClipX:s,needClipY:c}}function Nge(e){var{xAxisId:r,yAxisId:n,clipPathId:a}=e,i=Tk(),{needClipX:o,needClipY:s,needClip:c}=YB(r,n);if(!c||!i)return null;var{x:f,y:d,width:h,height:m}=i;return k.createElement("clipPath",{id:"clipPath-".concat(a)},k.createElement("rect",{x:o?f:f-h/2,y:s?d:d-m/2,width:o?h:h*2,height:s?m:m*2}))}var XB=(e,r,n,a)=>Gq(e,"xAxis",r,a),WB=(e,r,n,a)=>Hq(e,"xAxis",r,a),ZB=(e,r,n,a)=>Gq(e,"yAxis",n,a),QB=(e,r,n,a)=>Hq(e,"yAxis",n,a),Mge=de([mt,XB,ZB,WB,QB],(e,r,n,a,i)=>ni(e,"xAxis")?Kh(r,a,!1):Kh(n,i,!1)),Rge=(e,r,n,a,i)=>i;function Pge(e){return e.type==="line"}var Dge=de([pq,Rge],(e,r)=>e.filter(Pge).find(n=>n.id===r)),Lge=de([mt,XB,ZB,WB,QB,Dge,Mge,WE],(e,r,n,a,i,o,s,c)=>{var{chartData:f,dataStartIndex:d,dataEndIndex:h}=c;if(!(o==null||r==null||n==null||a==null||i==null||a.length===0||i.length===0||s==null||e!=="horizontal"&&e!=="vertical")){var{dataKey:m,data:g}=o,y;if(g!=null&&g.length>0?y=g:y=f==null?void 0:f.slice(d,h+1),y!=null)return nye({layout:e,xAxis:r,yAxis:n,xAxisTicks:a,yAxisTicks:i,dataKey:m,bandSize:s,displayedData:y})}});function Ige(e){var r=Dp(e),n=3,a=2;if(r!=null){var{r:i,strokeWidth:o}=r,s=Number(i),c=Number(o);return(Number.isNaN(s)||s<0)&&(s=n),(Number.isNaN(c)||c<0)&&(c=a),{r:s,strokeWidth:c}}return{r:n,strokeWidth:a}}var zge=["id"],qge=["type","layout","connectNulls","needClip","shape"],Bge=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function xc(){return xc=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},xc.apply(null,arguments)}function qM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function Wn(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?qM(Object(n),!0).forEach(function(a){$ge(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function $ge(e,r,n){return(r=Fge(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Fge(e){var r=Uge(e,"string");return typeof r=="symbol"?r:r+""}function Uge(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Rk(e,r){if(e==null)return{};var n,a,i=Hge(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Hge(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var Gge=e=>{var{dataKey:r,name:n,stroke:a,legendType:i,hide:o}=e;return[{inactive:o,dataKey:r,type:i,color:a,value:d7(n,r),payload:e}]},Vge=k.memo(e=>{var{dataKey:r,data:n,stroke:a,strokeWidth:i,fill:o,name:s,hide:c,unit:f,tooltipType:d,id:h}=e,m={dataDefinedOnItem:n,getPosition:Ho,settings:{stroke:a,strokeWidth:i,fill:o,dataKey:r,nameKey:void 0,name:d7(s,r),hide:c,type:d,color:a,unit:f,graphicalItemId:h}};return k.createElement(bme,{tooltipEntrySettings:m})}),JB=(e,r)=>"".concat(r,"px ").concat(e,"px");function Kge(e,r){for(var n=e.length%2!==0?[...e,0]:e,a=[],i=0;i<r;++i)a.push(...n);return a}var Yge=(e,r,n)=>{var a=n.reduce((g,y)=>g+y,0);if(!a)return JB(r,e);for(var i=Math.floor(e/a),o=e%a,s=[],c=0,f=0;c<n.length;f+=(d=n[c])!==null&&d!==void 0?d:0,++c){var d,h=n[c];if(h!=null&&f+h>o){s=[...n.slice(0,c),o-f];break}}var m=s.length%2===0?[0,r]:[r];return[...Kge(n,i),...s,...m].map(g=>"".concat(g,"px")).join(", ")};function Xge(e){var{clipPathId:r,points:n,props:a}=e,{dot:i,dataKey:o,needClip:s}=a,{id:c}=a,f=Rk(a,zge),d=oa(f);return k.createElement($me,{points:n,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:o,baseProps:d,needClip:s,clipPathId:r})}function Wge(e){var{showLabels:r,children:n,points:a}=e,i=k.useMemo(()=>a==null?void 0:a.map(o=>{var s,c,f={x:(s=o.x)!==null&&s!==void 0?s:0,y:(c=o.y)!==null&&c!==void 0?c:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Wn(Wn({},f),{},{value:o.value,payload:o.payload,viewBox:f,parentViewBox:void 0,fill:void 0})}),[a]);return k.createElement(Gpe,{value:r?i:void 0},n)}function BM(e){var{clipPathId:r,pathRef:n,points:a,strokeDasharray:i,props:o}=e,{type:s,layout:c,connectNulls:f,needClip:d,shape:h}=o,m=Rk(o,qge),g=Wn(Wn({},fr(m)),{},{fill:"none",className:"recharts-line-curve",clipPath:d?"url(#clipPath-".concat(r,")"):void 0,points:a,type:s,layout:c,connectNulls:f,strokeDasharray:i??o.strokeDasharray});return k.createElement(k.Fragment,null,(a==null?void 0:a.length)>1&&k.createElement(yme,xc({shapeType:"curve",option:h},g,{pathRef:n})),k.createElement(Xge,{points:a,clipPathId:r,props:o}))}function Zge(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function Qge(e){var{clipPathId:r,props:n,pathRef:a,previousPointsRef:i,longestAnimatedLengthRef:o}=e,{points:s,strokeDasharray:c,isAnimationActive:f,animationBegin:d,animationDuration:h,animationEasing:m,animateNewValues:g,width:y,height:x,onAnimationEnd:E,onAnimationStart:_}=n,w=i.current,A=XE(s,"recharts-line-"),C=k.useRef(A),[O,T]=k.useState(!1),N=!O,M=k.useCallback(()=>{typeof E=="function"&&E(),T(!1)},[E]),P=k.useCallback(()=>{typeof _=="function"&&_(),T(!0)},[_]),L=Zge(a.current),D=k.useRef(0);C.current!==A&&(D.current=o.current,C.current=A);var q=D.current;return k.createElement(Wge,{points:s,showLabels:N},n.children,k.createElement(YE,{animationId:A,begin:d,duration:h,isActive:f,easing:m,onAnimationEnd:M,onAnimationStart:P,key:A},z=>{var U=Tr(q,L+q,z),$=Math.min(U,L),Y;if(f)if(c){var B="".concat(c).split(/[,\s]+/gim).map(V=>parseFloat(V));Y=Yge($,L,B)}else Y=JB(L,$);else Y=c==null?void 0:String(c);if(z>0&&L>0&&(i.current=s,o.current=Math.max(o.current,$)),w){var Z=w.length/s.length,ae=z===1?s:s.map((V,fe)=>{var F=Math.floor(fe*Z);if(w[F]){var X=w[F];return Wn(Wn({},V),{},{x:Tr(X.x,V.x,z),y:Tr(X.y,V.y,z)})}return g?Wn(Wn({},V),{},{x:Tr(y*2,V.x,z),y:Tr(x/2,V.y,z)}):Wn(Wn({},V),{},{x:V.x,y:V.y})});return i.current=ae,k.createElement(BM,{props:n,points:ae,clipPathId:r,pathRef:a,strokeDasharray:Y})}return k.createElement(BM,{props:n,points:s,clipPathId:r,pathRef:a,strokeDasharray:Y})}),k.createElement(Ype,{label:n.label}))}function Jge(e){var{clipPathId:r,props:n}=e,a=k.useRef(null),i=k.useRef(0),o=k.useRef(null);return k.createElement(Qge,{props:n,clipPathId:r,previousPointsRef:a,longestAnimatedLengthRef:i,pathRef:o})}var eye=(e,r)=>{var n,a;return{x:(n=e.x)!==null&&n!==void 0?n:void 0,y:(a=e.y)!==null&&a!==void 0?a:void 0,value:e.value,errorVal:rr(e.payload,r)}};class tye extends k.Component{render(){var{hide:r,dot:n,points:a,className:i,xAxisId:o,yAxisId:s,top:c,left:f,width:d,height:h,id:m,needClip:g,zIndex:y}=this.props;if(r)return null;var x=Je("recharts-line",i),E=m,{r:_,strokeWidth:w}=Ige(n),A=IB(n),C=_*2+w,O=g?"url(#clipPath-".concat(A?"":"dots-").concat(E,")"):void 0;return k.createElement(ha,{zIndex:y},k.createElement(la,{className:x},g&&k.createElement("defs",null,k.createElement(Nge,{clipPathId:E,xAxisId:o,yAxisId:s}),!A&&k.createElement("clipPath",{id:"clipPath-dots-".concat(E)},k.createElement("rect",{x:f-C/2,y:c-C/2,width:d+C,height:h+C}))),k.createElement(Tge,{xAxisId:o,yAxisId:s,data:a,dataPointFormatter:eye,errorBarOffset:0},k.createElement(Jge,{props:this.props,clipPathId:E}))),k.createElement(lve,{activeDot:this.props.activeDot,points:a,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:O}))}}var e$={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:cr.line,type:"linear"};function rye(e){var r=br(e,e$),{activeDot:n,animateNewValues:a,animationBegin:i,animationDuration:o,animationEasing:s,connectNulls:c,dot:f,hide:d,isAnimationActive:h,label:m,legendType:g,xAxisId:y,yAxisId:x,id:E}=r,_=Rk(r,Bge),{needClip:w}=YB(y,x),A=Tk(),C=cs(),O=xr(),T=Ce(D=>Lge(D,y,x,O,E));if(C!=="horizontal"&&C!=="vertical"||T==null||A==null)return null;var{height:N,width:M,x:P,y:L}=A;return k.createElement(tye,xc({},_,{id:E,connectNulls:c,dot:f,activeDot:n,animateNewValues:a,animationBegin:i,animationDuration:o,animationEasing:s,isAnimationActive:h,hide:d,label:m,legendType:g,xAxisId:y,yAxisId:x,points:T,layout:C,height:N,width:M,left:P,top:L,needClip:w}))}function nye(e){var{layout:r,xAxis:n,yAxis:a,xAxisTicks:i,yAxisTicks:o,dataKey:s,bandSize:c,displayedData:f}=e;return f.map((d,h)=>{var m=rr(d,s);if(r==="horizontal"){var g=v4({axis:n,ticks:i,bandSize:c,entry:d,index:h}),y=Ut(m)?null:a.scale.map(m);return{x:g,y:y??null,value:m,payload:d}}var x=Ut(m)?null:n.scale.map(m),E=v4({axis:a,ticks:o,bandSize:c,entry:d,index:h});return x==null||E==null?null:{x,y:E,value:m,payload:d}}).filter(Boolean)}function aye(e){var r=br(e,e$),n=xr();return k.createElement(kme,{id:r.id,type:"line"},a=>k.createElement(k.Fragment,null,k.createElement(xme,{legendPayload:Gge(r)}),k.createElement(Vge,{dataKey:r.dataKey,data:r.data,stroke:r.stroke,strokeWidth:r.strokeWidth,fill:r.fill,name:r.name,hide:r.hide,unit:r.unit,tooltipType:r.tooltipType,id:a}),k.createElement(Mme,{type:"line",id:a,data:r.data,xAxisId:r.xAxisId,yAxisId:r.yAxisId,zAxisId:0,dataKey:r.dataKey,hide:r.hide,isPanorama:n}),k.createElement(rye,xc({},r,{id:a}))))}var t$=k.memo(aye,nm);t$.displayName="Line";var iye=["domain","range"],oye=["domain","range"];function $M(e,r){if(e==null)return{};var n,a,i=lye(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function lye(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function FM(e,r){return e===r?!0:Array.isArray(e)&&e.length===2&&Array.isArray(r)&&r.length===2?e[0]===r[0]&&e[1]===r[1]:!1}function r$(e,r){if(e===r)return!0;var{domain:n,range:a}=e,i=$M(e,iye),{domain:o,range:s}=r,c=$M(r,oye);return!FM(n,o)||!FM(a,s)?!1:nm(i,c)}var sye=["type"],uye=["dangerouslySetInnerHTML","ticks","scale"],cye=["id","scale"];function xS(){return xS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},xS.apply(null,arguments)}function UM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function HM(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?UM(Object(n),!0).forEach(function(a){fye(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function fye(e,r,n){return(r=dye(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function dye(e){var r=hye(e,"string");return typeof r=="symbol"?r:r+""}function hye(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function _S(e,r){if(e==null)return{};var n,a,i=pye(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function pye(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function mye(e){var r=kt(),n=k.useRef(null),a=_7(),{type:i}=e,o=_S(e,sye),s=om(a,"xAxis",i),c=k.useMemo(()=>{if(s!=null)return HM(HM({},o),{},{type:s})},[o,s]);return k.useLayoutEffect(()=>{c!=null&&(n.current===null?r(Vme(c)):n.current!==c&&r(Kme({prev:n.current,next:c})),n.current=c)},[c,r]),k.useLayoutEffect(()=>()=>{n.current&&(r(Yme(n.current)),n.current=null)},[r]),null}var vye=e=>{var{xAxisId:r,className:n}=e,a=Ce(p7),i=xr(),o="xAxis",s=Ce(w=>Uq(w,o,r,i)),c=Ce(w=>cfe(w,r)),f=Ce(w=>vfe(w,r)),d=Ce(w=>cq(w,r));if(c==null||f==null||d==null)return null;var{dangerouslySetInnerHTML:h,ticks:m,scale:g}=e,y=_S(e,uye),{id:x,scale:E}=d,_=_S(d,cye);return k.createElement(Mk,xS({},y,_,{x:f.x,y:f.y,width:c.width,height:c.height,className:Je("recharts-".concat(o," ").concat(o),n),viewBox:a,ticks:s,axisType:o,axisId:r}))},gye={allowDataOverflow:Rt.allowDataOverflow,allowDecimals:Rt.allowDecimals,allowDuplicatedCategory:Rt.allowDuplicatedCategory,angle:Rt.angle,axisLine:Va.axisLine,height:Rt.height,hide:!1,includeHidden:Rt.includeHidden,interval:Rt.interval,label:!1,minTickGap:Rt.minTickGap,mirror:Rt.mirror,orientation:Rt.orientation,padding:Rt.padding,reversed:Rt.reversed,scale:Rt.scale,tick:Rt.tick,tickCount:Rt.tickCount,tickLine:Va.tickLine,tickSize:Va.tickSize,type:Rt.type,niceTicks:Rt.niceTicks,xAxisId:0},yye=e=>{var r=br(e,gye);return k.createElement(k.Fragment,null,k.createElement(mye,{allowDataOverflow:r.allowDataOverflow,allowDecimals:r.allowDecimals,allowDuplicatedCategory:r.allowDuplicatedCategory,angle:r.angle,dataKey:r.dataKey,domain:r.domain,height:r.height,hide:r.hide,id:r.xAxisId,includeHidden:r.includeHidden,interval:r.interval,minTickGap:r.minTickGap,mirror:r.mirror,name:r.name,orientation:r.orientation,padding:r.padding,reversed:r.reversed,scale:r.scale,tick:r.tick,tickCount:r.tickCount,tickFormatter:r.tickFormatter,ticks:r.ticks,type:r.type,unit:r.unit,niceTicks:r.niceTicks}),k.createElement(vye,r))},n$=k.memo(yye,r$);n$.displayName="XAxis";var bye=["type"],xye=["dangerouslySetInnerHTML","ticks","scale"],_ye=["id","scale"];function wS(){return wS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},wS.apply(null,arguments)}function GM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function VM(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?GM(Object(n),!0).forEach(function(a){wye(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function wye(e,r,n){return(r=Sye(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Sye(e){var r=Eye(e,"string");return typeof r=="symbol"?r:r+""}function Eye(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function SS(e,r){if(e==null)return{};var n,a,i=kye(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function kye(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function jye(e){var r=kt(),n=k.useRef(null),a=_7(),{type:i}=e,o=SS(e,bye),s=om(a,"yAxis",i),c=k.useMemo(()=>{if(s!=null)return VM(VM({},o),{},{type:s})},[s,o]);return k.useLayoutEffect(()=>{c!=null&&(n.current===null?r(Xme(c)):n.current!==c&&r(Wme({prev:n.current,next:c})),n.current=c)},[c,r]),k.useLayoutEffect(()=>()=>{n.current&&(r(Zme(n.current)),n.current=null)},[r]),null}function Aye(e){var{yAxisId:r,className:n,width:a,label:i}=e,o=k.useRef(null),s=k.useRef(null),c=Ce(p7),f=xr(),d=kt(),h="yAxis",m=Ce(N=>bfe(N,r)),g=Ce(N=>yfe(N,r)),y=Ce(N=>Uq(N,h,r,f)),x=Ce(N=>fq(N,r));if(k.useLayoutEffect(()=>{if(!(a!=="auto"||!m||Ok(i)||k.isValidElement(i)||x==null)){var N=o.current;if(N){var M=N.getCalculatedWidth();Math.round(m.width)!==Math.round(M)&&d(Qme({id:r,width:M}))}}},[y,m,d,i,r,a,x]),m==null||g==null||x==null)return null;var{dangerouslySetInnerHTML:E,ticks:_,scale:w}=e,A=SS(e,xye),{id:C,scale:O}=x,T=SS(x,_ye);return k.createElement(Mk,wS({},A,T,{ref:o,labelRef:s,x:g.x,y:g.y,tickTextProps:a==="auto"?{width:void 0}:{width:a},width:m.width,height:m.height,className:Je("recharts-".concat(h," ").concat(h),n),viewBox:c,ticks:y,axisType:h,axisId:r}))}var Cye={allowDataOverflow:Pt.allowDataOverflow,allowDecimals:Pt.allowDecimals,allowDuplicatedCategory:Pt.allowDuplicatedCategory,angle:Pt.angle,axisLine:Va.axisLine,hide:!1,includeHidden:Pt.includeHidden,interval:Pt.interval,label:!1,minTickGap:Pt.minTickGap,mirror:Pt.mirror,orientation:Pt.orientation,padding:Pt.padding,reversed:Pt.reversed,scale:Pt.scale,tick:Pt.tick,tickCount:Pt.tickCount,tickLine:Va.tickLine,tickSize:Va.tickSize,type:Pt.type,niceTicks:Pt.niceTicks,width:Pt.width,yAxisId:0},Oye=e=>{var r=br(e,Cye);return k.createElement(k.Fragment,null,k.createElement(jye,{interval:r.interval,id:r.yAxisId,scale:r.scale,type:r.type,domain:r.domain,allowDataOverflow:r.allowDataOverflow,dataKey:r.dataKey,allowDuplicatedCategory:r.allowDuplicatedCategory,allowDecimals:r.allowDecimals,tickCount:r.tickCount,padding:r.padding,includeHidden:r.includeHidden,reversed:r.reversed,ticks:r.ticks,width:r.width,orientation:r.orientation,mirror:r.mirror,hide:r.hide,unit:r.unit,name:r.name,angle:r.angle,minTickGap:r.minTickGap,tick:r.tick,tickFormatter:r.tickFormatter,niceTicks:r.niceTicks}),k.createElement(Aye,r))},a$=k.memo(Oye,r$);a$.displayName="YAxis";var Tye=(e,r)=>r,Pk=de([Tye,mt,iq,Kt,lB,oi,Fde,ar],Xde);function Nye(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function Dk(e){var r=e.currentTarget.getBoundingClientRect(),n,a;if(Nye(e)){var i=e.currentTarget.getBBox();n=i.width>0?r.width/i.width:1,a=i.height>0?r.height/i.height:1}else{var o=e.currentTarget;n=o.offsetWidth>0?r.width/o.offsetWidth:1,a=o.offsetHeight>0?r.height/o.offsetHeight:1}var s=(c,f)=>({relativeX:Math.round((c-r.left)/n),relativeY:Math.round((f-r.top)/a)});return"touches"in e?Array.from(e.touches).map(c=>s(c.clientX,c.clientY)):s(e.clientX,e.clientY)}var i$=Yr("mouseClick"),o$=Dc();o$.startListening({actionCreator:i$,effect:(e,r)=>{var n=e.payload,a=Pk(r.getState(),Dk(n));(a==null?void 0:a.activeIndex)!=null&&r.dispatch(Pfe({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate}))}});var ES=Yr("mouseMove"),l$=Dc(),Fl=null,go=null,F0=null;l$.startListening({actionCreator:ES,effect:(e,r)=>{var n=e.payload,a=r.getState(),{throttleDelay:i,throttledEvents:o}=a.eventSettings,s=o==="all"||(o==null?void 0:o.includes("mousemove"));Fl!==null&&(cancelAnimationFrame(Fl),Fl=null),go!==null&&(typeof i!="number"||!s)&&(clearTimeout(go),go=null),F0=Dk(n);var c=()=>{var f=r.getState(),d=yk(f,f.tooltip.settings.shared);if(!F0){Fl=null,go=null;return}if(d==="axis"){var h=Pk(f,F0);(h==null?void 0:h.activeIndex)!=null?r.dispatch(Qq({activeIndex:h.activeIndex,activeDataKey:void 0,activeCoordinate:h.activeCoordinate})):r.dispatch(Zq())}Fl=null,go=null};if(!s){c();return}i==="raf"?Fl=requestAnimationFrame(c):typeof i=="number"&&go===null&&(go=setTimeout(c,i))}});function Mye(e,r){return r instanceof HTMLElement?"HTMLElement <".concat(r.tagName,' class="').concat(r.className,'">'):r===window?"global.window":e==="children"&&typeof r=="object"&&r!==null?"<<CHILDREN>>":r}var KM={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},s$=dr({name:"rootProps",initialState:KM,reducers:{updateOptions:(e,r)=>{var n;e.accessibilityLayer=r.payload.accessibilityLayer,e.barCategoryGap=r.payload.barCategoryGap,e.barGap=(n=r.payload.barGap)!==null&&n!==void 0?n:KM.barGap,e.barSize=r.payload.barSize,e.maxBarSize=r.payload.maxBarSize,e.stackOffset=r.payload.stackOffset,e.syncId=r.payload.syncId,e.syncMethod=r.payload.syncMethod,e.className=r.payload.className,e.baseValue=r.payload.baseValue,e.reverseStackOrder=r.payload.reverseStackOrder}}}),Rye=s$.reducer,{updateOptions:Pye}=s$.actions,Dye=null,Lye={updatePolarOptions:(e,r)=>e===null?r.payload:(e.startAngle=r.payload.startAngle,e.endAngle=r.payload.endAngle,e.cx=r.payload.cx,e.cy=r.payload.cy,e.innerRadius=r.payload.innerRadius,e.outerRadius=r.payload.outerRadius,e)},u$=dr({name:"polarOptions",initialState:Dye,reducers:Lye}),{updatePolarOptions:Q_e}=u$.actions,Iye=u$.reducer,c$=Yr("keyDown"),f$=Yr("focus"),d$=Yr("blur"),hm=Dc(),Ul=null,yo=null,Gd=null;hm.startListening({actionCreator:c$,effect:(e,r)=>{Gd=e.payload,Ul!==null&&(cancelAnimationFrame(Ul),Ul=null);var n=r.getState(),{throttleDelay:a,throttledEvents:i}=n.eventSettings,o=i==="all"||i.includes("keydown");yo!==null&&(typeof a!="number"||!o)&&(clearTimeout(yo),yo=null);var s=()=>{try{var c=r.getState(),f=c.rootProps.accessibilityLayer!==!1;if(!f)return;var{keyboardInteraction:d}=c.tooltip,h=Gd;if(h!=="ArrowRight"&&h!=="ArrowLeft"&&h!=="Enter")return;var m=bk(d,ys(c),Hc(c),Vc(c)),g=m==null?-1:Number(m);if(!Number.isFinite(g)||g<0)return;var y=oi(c);if(h==="Enter"){var x=sp(c,"axis","hover",String(d.index));r.dispatch(lp({active:!d.active,activeIndex:d.index,activeCoordinate:x}));return}var E=Efe(c),_=E==="left-to-right"?1:-1,w=h==="ArrowRight"?1:-1,A=g+w*_;if(y==null||A>=y.length||A<0)return;var C=sp(c,"axis","hover",String(A));r.dispatch(lp({active:!0,activeIndex:A.toString(),activeCoordinate:C}))}finally{Ul=null,yo=null}};if(!o){s();return}a==="raf"?Ul=requestAnimationFrame(s):typeof a=="number"&&yo===null&&(s(),Gd=null,yo=setTimeout(()=>{Gd?s():(yo=null,Ul=null)},a))}});hm.startListening({actionCreator:f$,effect:(e,r)=>{var n=r.getState(),a=n.rootProps.accessibilityLayer!==!1;if(a){var{keyboardInteraction:i}=n.tooltip;if(!i.active&&i.index==null){var o="0",s=sp(n,"axis","hover",String(o));r.dispatch(lp({active:!0,activeIndex:o,activeCoordinate:s}))}}}});hm.startListening({actionCreator:d$,effect:(e,r)=>{var n=r.getState(),a=n.rootProps.accessibilityLayer!==!1;if(a){var{keyboardInteraction:i}=n.tooltip;i.active&&r.dispatch(lp({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function h$(e){e.persist();var{currentTarget:r}=e;return new Proxy(e,{get:(n,a)=>{if(a==="currentTarget")return r;var i=Reflect.get(n,a);return typeof i=="function"?i.bind(n):i}})}var fn=Yr("externalEvent"),p$=Dc(),Vd=new Map,Iu=new Map,U0=new Map;p$.startListening({actionCreator:fn,effect:(e,r)=>{var{handler:n,reactEvent:a}=e.payload;if(n!=null){var i=a.type,o=h$(a);U0.set(i,{handler:n,reactEvent:o});var s=Vd.get(i);s!==void 0&&(cancelAnimationFrame(s),Vd.delete(i));var c=r.getState(),{throttleDelay:f,throttledEvents:d}=c.eventSettings,h=d,m=h==="all"||(h==null?void 0:h.includes(i)),g=Iu.get(i);g!==void 0&&(typeof f!="number"||!m)&&(clearTimeout(g),Iu.delete(i));var y=()=>{var _=U0.get(i);try{if(!_)return;var{handler:w,reactEvent:A}=_,C=r.getState(),O={activeCoordinate:jde(C),activeDataKey:Sde(C),activeIndex:gc(C),activeLabel:cB(C),activeTooltipIndex:gc(C),isTooltipActive:Ade(C)};w&&w(O,A)}finally{Vd.delete(i),Iu.delete(i),U0.delete(i)}};if(!m){y();return}if(f==="raf"){var x=requestAnimationFrame(y);Vd.set(i,x)}else if(typeof f=="number"){if(!Iu.has(i)){y();var E=setTimeout(y,f);Iu.set(i,E)}}else y()}}});var zye=de([vs],e=>e.tooltipItemPayloads),qye=de([zye,(e,r)=>r,(e,r,n)=>n],(e,r,n)=>{if(r!=null){var a=e.find(o=>o.settings.graphicalItemId===n);if(a!=null){var{getPosition:i}=a;if(i!=null)return i(r)}}}),m$=Yr("touchMove"),v$=Dc(),bo=null,Li=null,YM=null,zu=null;v$.startListening({actionCreator:m$,effect:(e,r)=>{var n=e.payload;if(!(n.touches==null||n.touches.length===0)){zu=h$(n);var a=r.getState(),{throttleDelay:i,throttledEvents:o}=a.eventSettings,s=o==="all"||o.includes("touchmove");bo!==null&&(cancelAnimationFrame(bo),bo=null),Li!==null&&(typeof i!="number"||!s)&&(clearTimeout(Li),Li=null),YM=Array.from(n.touches).map(f=>Dk({clientX:f.clientX,clientY:f.clientY,currentTarget:n.currentTarget}));var c=()=>{if(zu!=null){var f=r.getState(),d=yk(f,f.tooltip.settings.shared);if(d==="axis"){var h,m=(h=YM)===null||h===void 0?void 0:h[0];if(m==null){bo=null,Li=null;return}var g=Pk(f,m);(g==null?void 0:g.activeIndex)!=null&&r.dispatch(Qq({activeIndex:g.activeIndex,activeDataKey:void 0,activeCoordinate:g.activeCoordinate}))}else if(d==="item"){var y,x=zu.touches[0];if(document.elementFromPoint==null||x==null)return;var E=document.elementFromPoint(x.clientX,x.clientY);if(!E||!E.getAttribute)return;var _=E.getAttribute(yle),w=(y=E.getAttribute(ble))!==null&&y!==void 0?y:void 0,A=gs(f).find(T=>T.id===w);if(_==null||A==null||w==null)return;var{dataKey:C}=A,O=qye(f,_,w);r.dispatch(Rfe({activeDataKey:C,activeIndex:_,activeCoordinate:O,activeGraphicalItemId:w}))}bo=null,Li=null}};if(!s){c();return}i==="raf"?bo=requestAnimationFrame(c):typeof i=="number"&&Li===null&&(c(),zu=null,Li=setTimeout(()=>{zu?c():(Li=null,bo=null)},i))}}});var g$={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},y$=dr({name:"eventSettings",initialState:g$,reducers:{setEventSettings:(e,r)=>{r.payload.throttleDelay!=null&&(e.throttleDelay=r.payload.throttleDelay),r.payload.throttledEvents!=null&&(e.throttledEvents=r.payload.throttledEvents)}}}),{setEventSettings:Bye}=y$.actions,$ye=y$.reducer,Fye=Dz({brush:uve,cartesianAxis:Jme,chartData:Ahe,errorBars:Ege,eventSettings:$ye,graphicalItems:Tme,layout:nle,legend:fse,options:whe,polarAxis:Wpe,polarOptions:Iye,referenceElements:gve,renderedTicks:Vve,rootProps:Rye,tooltip:Dfe,zIndex:uhe}),Uye=function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return Coe({reducer:Fye,preloadedState:r,middleware:a=>{var i;return a({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([o$.middleware,l$.middleware,hm.middleware,p$.middleware,v$.middleware])},enhancers:a=>{var i=a;return typeof a=="function"&&(i=a()),i.concat(Wz({type:"raf"}))},devTools:{serialize:{replacer:Mye},name:"recharts-".concat(n)}})};function Hye(e){var{preloadedState:r,children:n,reduxStoreName:a}=e,i=xr(),o=k.useRef(null);if(i)return n;o.current==null&&(o.current=Uye(r,a));var s=IE;return k.createElement(Ase,{context:s,store:o.current},n)}function Gye(e){var{layout:r,margin:n}=e,a=kt(),i=xr();return k.useEffect(()=>{i||(a(ele(r)),a(Joe(n)))},[a,i,r,n]),null}var Vye=k.memo(Gye,nm);function Kye(e){var r=kt();return k.useEffect(()=>{r(Pye(e))},[r,e]),null}var Yye=e=>{var r=kt();return k.useEffect(()=>{r(Bye(e))},[r,e]),null},Xye=k.memo(Yye,nm);function XM(e){var{zIndex:r,isPanorama:n}=e,a=k.useRef(null),i=kt();return k.useLayoutEffect(()=>(a.current&&i(lhe({zIndex:r,element:a.current,isPanorama:n})),()=>{i(she({zIndex:r,isPanorama:n}))}),[i,r,n]),k.createElement("g",{tabIndex:-1,ref:a,className:"recharts-zIndex-layer_".concat(r)})}function WM(e){var{children:r,isPanorama:n}=e,a=Ce(Zde);if(!a||a.length===0)return r;var i=a.filter(s=>s<0),o=a.filter(s=>s>0);return k.createElement(k.Fragment,null,i.map(s=>k.createElement(XM,{key:s,zIndex:s,isPanorama:n})),r,o.map(s=>k.createElement(XM,{key:s,zIndex:s,isPanorama:n})))}var Wye=["children"];function Zye(e,r){if(e==null)return{};var n,a,i=Qye(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Qye(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}function mp(){return mp=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},mp.apply(null,arguments)}var Jye={width:"100%",height:"100%",display:"block"},e0e=k.forwardRef((e,r)=>{var n=b7(),a=x7(),i=N7();if(!sa(n)||!sa(a))return null;var{children:o,otherAttributes:s,title:c,desc:f}=e,d,h;return s!=null&&(typeof s.tabIndex=="number"?d=s.tabIndex:d=i?0:void 0,typeof s.role=="string"?h=s.role:h=i?"application":void 0),k.createElement(QI,mp({},s,{title:c,desc:f,role:h,tabIndex:d,width:n,height:a,style:Jye,ref:r}),o)}),t0e=e=>{var{children:r}=e,n=Ce(Jp);if(!n)return null;var{width:a,height:i,y:o,x:s}=n;return k.createElement(QI,{width:a,height:i,x:s,y:o},r)},ZM=k.forwardRef((e,r)=>{var{children:n}=e,a=Zye(e,Wye),i=xr();return i?k.createElement(t0e,null,k.createElement(WM,{isPanorama:!0},n)):k.createElement(e0e,mp({ref:r},a),k.createElement(WM,{isPanorama:!1},n))});function r0e(){var e=kt(),[r,n]=k.useState(null),a=Ce(gle);return k.useEffect(()=>{if(r!=null){var i=r.getBoundingClientRect(),o=i.width/r.offsetWidth;De(o)&&o!==a&&e(rle(o))}},[r,e,a]),n}function QM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function n0e(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?QM(Object(n),!0).forEach(function(a){a0e(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function a0e(e,r,n){return(r=i0e(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function i0e(e){var r=o0e(e,"string");return typeof r=="symbol"?r:r+""}function o0e(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function Ui(){return Ui=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Ui.apply(null,arguments)}var l0e=()=>(Lhe(),null);function vp(e){if(typeof e=="number")return e;if(typeof e=="string"){var r=parseFloat(e);if(!Number.isNaN(r))return r}return 0}var s0e=k.forwardRef((e,r)=>{var n,a,i=k.useRef(null),[o,s]=k.useState({containerWidth:vp((n=e.style)===null||n===void 0?void 0:n.width),containerHeight:vp((a=e.style)===null||a===void 0?void 0:a.height)}),c=k.useCallback((d,h)=>{s(m=>{var g=Math.round(d),y=Math.round(h);return m.containerWidth===g&&m.containerHeight===y?m:{containerWidth:g,containerHeight:y}})},[]),f=k.useCallback(d=>{if(typeof r=="function"&&r(d),d!=null&&typeof ResizeObserver<"u"){var{width:h,height:m}=d.getBoundingClientRect();c(h,m);var g=x=>{var E=x[0];if(E!=null){var{width:_,height:w}=E.contentRect;c(_,w)}},y=new ResizeObserver(g);y.observe(d),i.current=y}},[r,c]);return k.useEffect(()=>()=>{var d=i.current;d!=null&&d.disconnect()},[c]),k.createElement(k.Fragment,null,k.createElement(zc,{width:o.containerWidth,height:o.containerHeight}),k.createElement("div",Ui({ref:f},e)))}),u0e=k.forwardRef((e,r)=>{var{width:n,height:a}=e,[i,o]=k.useState({containerWidth:vp(n),containerHeight:vp(a)}),s=k.useCallback((f,d)=>{o(h=>{var m=Math.round(f),g=Math.round(d);return h.containerWidth===m&&h.containerHeight===g?h:{containerWidth:m,containerHeight:g}})},[]),c=k.useCallback(f=>{if(typeof r=="function"&&r(f),f!=null){var{width:d,height:h}=f.getBoundingClientRect();s(d,h)}},[r,s]);return k.createElement(k.Fragment,null,k.createElement(zc,{width:i.containerWidth,height:i.containerHeight}),k.createElement("div",Ui({ref:c},e)))}),c0e=k.forwardRef((e,r)=>{var{width:n,height:a}=e;return k.createElement(k.Fragment,null,k.createElement(zc,{width:n,height:a}),k.createElement("div",Ui({ref:r},e)))}),f0e=k.forwardRef((e,r)=>{var{width:n,height:a}=e;return typeof n=="string"||typeof a=="string"?k.createElement(u0e,Ui({},e,{ref:r})):typeof n=="number"&&typeof a=="number"?k.createElement(c0e,Ui({},e,{width:n,height:a,ref:r})):k.createElement(k.Fragment,null,k.createElement(zc,{width:n,height:a}),k.createElement("div",Ui({ref:r},e)))});function d0e(e){return e?s0e:f0e}var h0e=k.forwardRef((e,r)=>{var{children:n,className:a,height:i,onClick:o,onContextMenu:s,onDoubleClick:c,onMouseDown:f,onMouseEnter:d,onMouseLeave:h,onMouseMove:m,onMouseUp:g,onTouchEnd:y,onTouchMove:x,onTouchStart:E,style:_,width:w,responsive:A,dispatchTouchEvents:C=!0}=e,O=k.useRef(null),T=kt(),[N,M]=k.useState(null),[P,L]=k.useState(null),D=r0e(),q=HE(),z=(q==null?void 0:q.width)>0?q.width:w,U=(q==null?void 0:q.height)>0?q.height:i,$=k.useCallback(le=>{D(le),typeof r=="function"&&r(le),M(le),L(le),le!=null&&(O.current=le)},[D,r,M,L]),Y=k.useCallback(le=>{T(i$(le)),T(fn({handler:o,reactEvent:le}))},[T,o]),B=k.useCallback(le=>{T(ES(le)),T(fn({handler:d,reactEvent:le}))},[T,d]),Z=k.useCallback(le=>{T(Zq()),T(fn({handler:h,reactEvent:le}))},[T,h]),ae=k.useCallback(le=>{T(ES(le)),T(fn({handler:m,reactEvent:le}))},[T,m]),V=k.useCallback(()=>{T(f$())},[T]),fe=k.useCallback(()=>{T(d$())},[T]),F=k.useCallback(le=>{T(c$(le.key))},[T]),X=k.useCallback(le=>{T(fn({handler:s,reactEvent:le}))},[T,s]),ce=k.useCallback(le=>{T(fn({handler:c,reactEvent:le}))},[T,c]),G=k.useCallback(le=>{T(fn({handler:f,reactEvent:le}))},[T,f]),H=k.useCallback(le=>{T(fn({handler:g,reactEvent:le}))},[T,g]),te=k.useCallback(le=>{T(fn({handler:E,reactEvent:le}))},[T,E]),W=k.useCallback(le=>{C&&T(m$(le)),T(fn({handler:x,reactEvent:le}))},[T,C,x]),xe=k.useCallback(le=>{T(fn({handler:y,reactEvent:le}))},[T,y]),ee=d0e(A);return k.createElement(gB.Provider,{value:N},k.createElement(lae.Provider,{value:P},k.createElement(ee,{width:z??(_==null?void 0:_.width),height:U??(_==null?void 0:_.height),className:Je("recharts-wrapper",a),style:n0e({position:"relative",cursor:"default",width:z,height:U},_),onClick:Y,onContextMenu:X,onDoubleClick:ce,onFocus:V,onBlur:fe,onKeyDown:F,onMouseDown:G,onMouseEnter:B,onMouseLeave:Z,onMouseMove:ae,onMouseUp:H,onTouchEnd:xe,onTouchMove:W,onTouchStart:te,ref:$},k.createElement(l0e,null),n)))}),p0e=["width","height","responsive","children","className","style","compact","title","desc"];function m0e(e,r){if(e==null)return{};var n,a,i=v0e(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],r.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function v0e(e,r){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(r.indexOf(a)!==-1)continue;n[a]=e[a]}return n}var g0e=k.forwardRef((e,r)=>{var{width:n,height:a,responsive:i,children:o,className:s,style:c,compact:f,title:d,desc:h}=e,m=m0e(e,p0e),g=oa(m);return f?k.createElement(k.Fragment,null,k.createElement(zc,{width:n,height:a}),k.createElement(ZM,{otherAttributes:g,title:d,desc:h},o)):k.createElement(h0e,{className:s,style:c,width:n,height:a,responsive:i??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},k.createElement(ZM,{otherAttributes:g,title:d,desc:h,ref:r},k.createElement(yve,null,o)))});function kS(){return kS=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},kS.apply(null,arguments)}function JM(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function y0e(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?JM(Object(n),!0).forEach(function(a){b0e(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JM(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function b0e(e,r,n){return(r=x0e(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function x0e(e){var r=_0e(e,"string");return typeof r=="symbol"?r:r+""}function _0e(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,r);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}var w0e={top:5,right:5,bottom:5,left:5},S0e=y0e({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:w0e,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},g$),E0e=k.forwardRef(function(r,n){var a,i=br(r.categoricalChartProps,S0e),{chartName:o,defaultTooltipEventType:s,validateTooltipEventTypes:c,tooltipPayloadSearcher:f,categoricalChartProps:d}=r,h={chartName:o,defaultTooltipEventType:s,validateTooltipEventTypes:c,tooltipPayloadSearcher:f,eventEmitter:void 0};return k.createElement(Hye,{preloadedState:{options:h},reduxStoreName:(a=d.id)!==null&&a!==void 0?a:o},k.createElement(sve,{chartData:d.data}),k.createElement(Vye,{layout:i.layout,margin:i.margin}),k.createElement(Xye,{throttleDelay:i.throttleDelay,throttledEvents:i.throttledEvents}),k.createElement(Kye,{baseValue:i.baseValue,accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className,reverseStackOrder:i.reverseStackOrder}),k.createElement(g0e,kS({},i,{ref:n})))}),k0e=["axis"],j0e=k.forwardRef((e,r)=>k.createElement(E0e,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:k0e,tooltipPayloadSearcher:xhe,categoricalChartProps:e,ref:r}));const eR={dailyPercent:"#58A6FF",weeklyPercent:"#A371F7",sonnetPercent:"#3FB950",extraPercent:"#D29922"},A0e={dailyPercent:"Daily",weeklyPercent:"Weekly",sonnetPercent:"Sonnet",extraPercent:"Extra"},C0e=["dailyPercent","weeklyPercent","sonnetPercent","extraPercent"];function O0e(e){return e.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function T0e(e){return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function N0e({active:e,payload:r,label:n}){return!e||!r||r.length===0||n===void 0?null:b.jsxs("div",{className:"bg-dark-surface border border-dark-border rounded-md px-3 py-2 shadow-lg",children:[b.jsx("p",{className:"text-xs text-dark-muted mb-1",children:T0e(n)}),r.map(a=>b.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[b.jsx("span",{className:"inline-block w-2 h-2 rounded-full",style:{backgroundColor:a.color}}),b.jsxs("span",{className:"text-dark-text",children:[A0e[a.dataKey]??a.dataKey,":"]}),b.jsxs("span",{className:"text-dark-text font-semibold tabular-nums",children:[a.value.toFixed(1),"%"]})]},a.dataKey))]})}function M0e({snapshots:e,redThresholds:r}){const n=k.useMemo(()=>{const o=Date.now()-10080*60*1e3;return e.map(s=>({time:new Date(s.recordedAt).getTime(),dailyPercent:s.dailyPercent,weeklyPercent:s.weeklyPercent,sonnetPercent:s.sonnetPercent,extraPercent:s.extraPercent})).filter(s=>s.time>=o).sort((s,c)=>s.time-c.time)},[e]),a=k.useMemo(()=>{const i=Date.now();return[i-10080*60*1e3,i]},[n]);return n.length===0?b.jsx("div",{className:"flex items-center justify-center py-12",children:b.jsx("p",{className:"text-dark-muted text-sm",children:"No usage data in the last 7 days"})}):b.jsx("div",{className:"w-full h-72",children:b.jsx(Kle,{width:"100%",height:"100%",children:b.jsxs(j0e,{data:n,margin:{top:8,right:16,bottom:8,left:0},children:[b.jsx(VB,{strokeDasharray:"3 3",stroke:"rgba(48, 54, 61, 0.6)",vertical:!1}),b.jsx(n$,{dataKey:"time",type:"number",domain:a,tickFormatter:i=>O0e(new Date(i)),stroke:"#8B949E",tick:{fill:"#8B949E",fontSize:11},axisLine:{stroke:"#30363D"},tickLine:{stroke:"#30363D"}}),b.jsx(a$,{domain:[0,100],ticks:[0,25,50,75,100],tickFormatter:i=>`${i}%`,stroke:"#8B949E",tick:{fill:"#8B949E",fontSize:11},axisLine:{stroke:"#30363D"},tickLine:{stroke:"#30363D"},width:48}),b.jsx(Hhe,{content:b.jsx(N0e,{}),cursor:{stroke:"rgba(139, 148, 158, 0.3)"}}),b.jsx(bS,{y:r.daily,stroke:"#F85149",strokeDasharray:"6 4",strokeOpacity:.6,label:{value:`Daily ${r.daily}%`,position:"right",fill:"#F85149",fontSize:10}}),b.jsx(bS,{y:r.weekly,stroke:"#A371F7",strokeDasharray:"6 4",strokeOpacity:.6,label:{value:`Weekly ${r.weekly}%`,position:"right",fill:"#A371F7",fontSize:10}}),C0e.map(i=>b.jsx(t$,{type:"monotone",dataKey:i,stroke:eR[i],strokeWidth:2,dot:!1,activeDot:{r:4,fill:eR[i],stroke:"#161B22",strokeWidth:2}},i))]})})})}const R0e=3e4,P0e={daily:85,weekly:95,sonnet:95,extra:95},D0e=[{label:"Daily Usage",key:"dailyPercent",thresholdKey:"daily",resetKey:"dailyResetsAt"},{label:"Weekly Usage",key:"weeklyPercent",thresholdKey:"weekly",resetKey:"weeklyResetsAt"},{label:"Sonnet Usage",key:"sonnetPercent",thresholdKey:"sonnet",resetKey:null},{label:"Extra Usage",key:"extraPercent",thresholdKey:"extra",resetKey:null}];function L0e(e){return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function I0e(){const e=Ht(),[r,n]=k.useState(null),[a,i]=k.useState(P0e),[o,s]=k.useState([]),[c,f]=k.useState(!0),[d,h]=k.useState(null),m=k.useCallback(async()=>{try{const[y,x]=await Promise.all([e.get("usage"),e.get("usage/history?limit=1000")]);n(y),y.redThresholds&&i(y.redThresholds),s(x.snapshots),h(null)}catch(y){h(y instanceof Error?y.message:"Failed to fetch usage data")}finally{f(!1)}},[e]);k.useEffect(()=>{m();const y=setInterval(()=>{m()},R0e);return()=>clearInterval(y)},[m]);const g=k.useCallback(y=>{y==="usage_updated"&&m()},[m]);return PS({onEvent:g}),b.jsxs("div",{className:"p-6 max-w-4xl mx-auto flex flex-col gap-8",children:[b.jsxs("section",{className:"flex flex-col gap-2 py-4",children:[b.jsx("h2",{className:"text-xs font-medium text-dark-muted uppercase tracking-widest mb-4",children:"Usage Overview"}),c&&!r?b.jsx("p",{className:"text-dark-muted text-lg text-center py-8",children:"Loading..."}):d&&!r?b.jsx("p",{className:"text-[#F85149] text-sm text-center py-8",children:d}):r?b.jsxs("div",{className:"flex flex-col gap-4",children:[D0e.map(y=>{const x=r[y.key]??0,E=W6(x,a[y.thresholdKey]),_=Math.min(Math.max(x,0),100);return b.jsxs("div",{className:"flex flex-col gap-1",children:[b.jsxs("div",{className:"flex justify-between items-center",children:[b.jsx("span",{className:"text-sm font-medium text-dark-text",children:y.label}),b.jsxs("span",{className:"text-sm font-semibold tabular-nums",style:{color:E},children:[x.toFixed(1),"%"]})]}),b.jsx("div",{className:"w-full h-6 bg-dark-base rounded-md overflow-hidden border border-dark-border",children:b.jsx("div",{className:"h-full rounded-md transition-all duration-500 ease-out",style:{width:`${Math.max(_,.5)}%`,backgroundColor:E+"40",borderRight:_>0?`2px solid ${E}`:"none"}})}),y.resetKey&&(()=>{const w=u2(r[y.resetKey]);return w?b.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:w}):null})()]},y.key)}),r.recordedAt&&b.jsxs("p",{className:"text-xs text-dark-muted mt-2",children:["Last updated: ",L0e(r.recordedAt)]})]}):null]}),b.jsxs("section",{children:[b.jsx("h3",{className:"text-sm font-medium text-dark-muted uppercase tracking-wider mb-3",children:"Last 7 Days"}),b.jsx("div",{className:"bg-dark-surface rounded-lg border border-dark-border p-4",children:b.jsx(M0e,{snapshots:o,redThresholds:a})})]})]})}function tR(e){const[r,n]=k.useState(!1),[a,i]=k.useState(e),o=k.useRef(null),s=k.useRef(!1),c=k.useCallback(h=>{i(h),n(!0),s.current=!1,setTimeout(()=>{var m;return(m=o.current)==null?void 0:m.focus()},50)},[]),f=k.useCallback(()=>{n(!1),s.current=!1},[]),d=k.useCallback(()=>s.current?null:(s.current=!0,n(!1),a),[a]);return{isEditing:r,editValue:a,inputRef:o,startEdit:c,cancelEdit:f,confirmEdit:d,setEditValue:i}}function z0e({open:e,onClose:r,onAdded:n}){const a=Ht(),[i,o]=k.useState(""),[s,c]=k.useState(""),[f,d]=k.useState(""),[h,m]=k.useState(5),[g,y]=k.useState(""),[x,E]=k.useState(!1),[_,w]=k.useState(null),[A,C]=k.useState([]),[O,T]=k.useState(!1),[N,M]=k.useState(-1),[P,L]=k.useState(""),D=k.useMemo(()=>{if(!P||!s)return A;const H=s.substring(P.length).toLowerCase();return H?A.filter(te=>te.name.toLowerCase().startsWith(H)):A},[A,s,P]),q=k.useRef(null),z=k.useRef(null),U=k.useRef(null),$=k.useRef(null),Y=k.useRef(null);k.useEffect(()=>()=>{Y.current&&clearTimeout(Y.current)},[]),k.useEffect(()=>{if(e){const H=setTimeout(()=>{var te;return(te=q.current)==null?void 0:te.focus()},50);return()=>clearTimeout(H)}},[e]),k.useEffect(()=>{e&&(o(""),c(""),d(""),m(5),y(""),w(null),E(!1),C([]),T(!1),M(-1),L(""))},[e]),k.useEffect(()=>{if(!e)return;function H(te){te.key==="Escape"&&(O?T(!1):r())}return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[e,r,O]),k.useEffect(()=>{if(!O)return;function H(te){const W=te.target;U.current&&!U.current.contains(W)&&$.current&&!$.current.contains(W)&&T(!1)}return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[O]);const B=k.useCallback(H=>{z.current&&!z.current.contains(H.target)&&r()},[r]),Z=k.useCallback(async H=>{if(!H.trim()){C([]),T(!1);return}try{const te=encodeURIComponent(H),W=await a.get(`system/browse-dirs?path=${te}`);C(W.dirs),L(W.parentPath),T(W.dirs.length>0),M(-1)}catch{C([]),T(!1)}},[a]),ae=k.useCallback(H=>{c(H),M(-1),Y.current&&clearTimeout(Y.current);const te=H.endsWith("/")||H.endsWith("\\")?H:H.substring(0,Math.max(H.lastIndexOf("/"),H.lastIndexOf("\\"))+1);te?Y.current=setTimeout(()=>{Z(te)},300):(C([]),T(!1))},[Z]),V=k.useCallback(H=>{var te;c(H.path),T(!1),M(-1),i.trim()||o(H.name),H.isGitRepo||setTimeout(()=>{Z(H.path+"/")},100),(te=U.current)==null||te.focus()},[i,Z]),fe=k.useCallback(()=>{if(!P)return;const H=P.replace(/\/[^/]+\/?$/,"");H&&H!==P&&(c(H),Z(H+"/"))},[P,Z]),F=A.length===0||s===P?!1:A.some(H=>H.path===s&&H.isGitRepo),X=k.useCallback(async()=>{if(w(null),!i.trim()){w("Project name is required");return}if(!s.trim()){w("Repository path is required");return}E(!0);try{await a.post("projects",{name:i.trim(),repoPath:s.trim(),githubRepo:f.trim()||void 0,maxActiveTeams:h,model:g.trim()||void 0}),n()}catch(H){const te=H instanceof Error?H.message:String(H);w(te||"Failed to add project")}finally{E(!1)}},[i,s,f,h,g,a,n]),ce=k.useCallback(H=>{if(O&&D.length>0){if(H.key==="ArrowDown"){H.preventDefault(),M(te=>te<D.length-1?te+1:0);return}if(H.key==="ArrowUp"){H.preventDefault(),M(te=>te>0?te-1:D.length-1);return}if(H.key==="Enter"&&N>=0){H.preventDefault(),V(D[N]);return}if(H.key==="Tab"&&N>=0){H.preventDefault(),V(D[N]);return}}H.key==="Enter"&&!x&&X()},[O,D,N,V,x,X]),G=k.useCallback(H=>{H.key==="Enter"&&!x&&X()},[x,X]);return e?b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:B,children:b.jsxs("div",{ref:z,className:"w-[480px] max-w-[95vw] bg-dark-surface border border-dark-border rounded-lg shadow-2xl",role:"dialog","aria-modal":"true","aria-label":"Add Project",children:[b.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-dark-border",children:[b.jsx("h2",{className:"text-base font-semibold text-dark-text",children:"Add Project"}),b.jsx("button",{onClick:r,className:"text-dark-muted hover:text-dark-text transition-colors p-1 rounded hover:bg-dark-border/30",title:"Close (Esc)",children:b.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),b.jsxs("div",{className:"px-5 py-4 space-y-4",children:[b.jsxs("div",{children:[b.jsxs("label",{className:"block text-sm text-dark-muted mb-1",children:["Project Name ",b.jsx("span",{className:"text-[#F85149]",children:"*"})]}),b.jsx("input",{ref:q,type:"text",value:i,onChange:H=>o(H.target.value),onKeyDown:G,placeholder:"my-project",className:"w-full px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:x})]}),b.jsxs("div",{className:"relative",children:[b.jsxs("label",{className:"block text-sm text-dark-muted mb-1",children:["Repository Path ",b.jsx("span",{className:"text-[#F85149]",children:"*"})]}),b.jsxs("div",{className:"relative",children:[b.jsx("input",{ref:U,type:"text",value:s,onChange:H=>ae(H.target.value),onKeyDown:ce,onFocus:()=>{D.length>0&&T(!0)},placeholder:"C:/Git/my-repo",className:`w-full px-3 py-2 text-sm rounded border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:ring-1 ${F?"border-green-500/50 focus:border-green-500 focus:ring-green-500/30":"border-dark-border focus:border-dark-accent focus:ring-dark-accent/30"}`,disabled:x,autoComplete:"off"}),F&&b.jsx("span",{className:"absolute right-2 top-1/2 -translate-y-1/2 text-green-400",title:"Valid git repository",children:b.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})})]}),b.jsx("p",{className:"mt-1 text-xs text-dark-muted/60",children:"Type a path to browse. Suggestions filter as you type."}),O&&D.length>0&&b.jsxs("div",{ref:$,className:"absolute z-10 left-0 right-0 mt-1 max-h-48 overflow-y-auto rounded border border-dark-border bg-dark-base shadow-lg",children:[P&&b.jsxs("button",{type:"button",onClick:fe,className:"w-full flex items-center gap-2 px-3 py-1.5 text-sm text-dark-muted hover:bg-dark-border/30 hover:text-dark-text transition-colors text-left",children:[b.jsx("svg",{className:"w-3.5 h-3.5 shrink-0",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M9.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L7.414 9H15a1 1 0 110 2H7.414l2.293 2.293a1 1 0 010 1.414z",clipRule:"evenodd"})}),b.jsx("span",{children:".."}),b.jsx("span",{className:"ml-auto text-xs text-dark-muted/50 truncate",children:P})]}),D.map((H,te)=>b.jsxs("button",{type:"button",onClick:()=>V(H),className:`w-full flex items-center gap-2 px-3 py-1.5 text-sm transition-colors text-left ${te===N?"bg-dark-accent/20 text-dark-text":"text-dark-text hover:bg-dark-border/30"}`,children:[H.isGitRepo?b.jsx("span",{className:"w-3.5 h-3.5 shrink-0 rounded-full bg-green-500/80 inline-flex items-center justify-center",title:"Git repository",children:b.jsx("svg",{className:"w-2 h-2 text-white",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}):b.jsx("svg",{className:"w-3.5 h-3.5 shrink-0 text-dark-muted/50",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{d:"M2 6a2 2 0 012-2h5l2 2h5a2 2 0 012 2v6a2 2 0 01-2 2H4a2 2 0 01-2-2V6z"})}),b.jsx("span",{className:"truncate",children:H.name}),H.isGitRepo&&b.jsx("span",{className:"ml-auto text-xs text-green-400/70 shrink-0",children:"git"})]},H.path))]})]}),b.jsxs("div",{children:[b.jsxs("label",{className:"block text-sm text-dark-muted mb-1",children:["GitHub Repo ",b.jsx("span",{className:"text-dark-muted/50",children:"(optional)"})]}),b.jsx("input",{type:"text",value:f,onChange:H=>d(H.target.value),onKeyDown:G,placeholder:"org/repo (auto-detected)",className:"w-full px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:x})]}),b.jsxs("div",{children:[b.jsx("label",{className:"block text-sm text-dark-muted mb-1",children:"Max Active Teams"}),b.jsx("input",{type:"number",value:h,onChange:H=>m(Math.max(1,Math.min(50,parseInt(H.target.value,10)||1))),onKeyDown:G,min:1,max:50,className:"w-full px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:x}),b.jsx("p",{className:"mt-1 text-xs text-dark-muted/60",children:"Max concurrent active teams before new launches are queued (1-50, default: 5)."})]}),b.jsxs("div",{children:[b.jsxs("label",{className:"block text-sm text-dark-muted mb-1",children:["Model ",b.jsx("span",{className:"text-dark-muted/50",children:"(optional)"})]}),b.jsx("input",{type:"text",value:g,onChange:H=>y(H.target.value),onKeyDown:G,placeholder:"e.g. opus, sonnet, claude-opus-4-6",className:"w-full px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30",disabled:x}),b.jsx("p",{className:"mt-1 text-xs text-dark-muted/60",children:"Claude model to use for teams in this project. Empty uses the default model."})]}),_&&b.jsx("div",{className:"px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149] text-sm",children:_})]}),b.jsxs("div",{className:"flex items-center justify-end gap-3 px-5 py-4 border-t border-dark-border",children:[b.jsx("button",{onClick:r,className:"px-3 py-1.5 text-sm rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors",disabled:x,children:"Cancel"}),b.jsx("button",{onClick:X,disabled:x,className:"px-4 py-1.5 text-sm font-medium rounded border border-dark-accent/40 text-dark-accent bg-dark-accent/10 hover:bg-dark-accent/20 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:x?"Adding...":"Add Project"})]})]})}):null}const rR={worktree:0,signal_file:1,stale_branch:2,team_record:3},q0e={worktree:"Worktrees",signal_file:"Signal Files",stale_branch:"Branches",team_record:"Database Records"},B0e={worktree:"📁",signal_file:"📄",stale_branch:"🌿",team_record:"🗑️"};function $0e(e){const r=[...e].sort((a,i)=>rR[a.type]-rR[i.type]),n=new Map;for(const a of r)n.has(a.type)||n.set(a.type,[]),n.get(a.type).push(a);return n}function F0e({projectId:e,open:r,onClose:n,onDone:a}){const i=Ht(),o=k.useRef(null),[s,c]=k.useState("loading"),[f,d]=k.useState(null),[h,m]=k.useState(new Set),[g,y]=k.useState(null),[x,E]=k.useState(null),[_,w]=k.useState(!1),A=k.useCallback(()=>{s==="result"&&a(),w(!1),n()},[s,n,a]);k.useEffect(()=>{if(!r)return;c("loading"),d(null),m(new Set),y(null),E(null);let L=!1;return(async()=>{try{const D=_?"?resetTeams=true":"",q=await i.get(`projects/${e}/cleanup-preview${D}`);if(L)return;d(q),m(new Set(q.items.map(z=>z.path))),c("preview")}catch(D){if(L)return;E(D instanceof Error?D.message:String(D)),c("preview")}})(),()=>{L=!0}},[r,e,i,_]),k.useEffect(()=>{if(!r)return;function L(D){D.key==="Escape"&&s!=="executing"&&A()}return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)},[r,s,A]);const C=k.useCallback(L=>{m(D=>{const q=new Set(D);return q.has(L)?q.delete(L):q.add(L),q})},[]),O=k.useCallback(()=>{f&&m(new Set(f.items.map(L=>L.path)))},[f]),T=k.useCallback(()=>{m(new Set)},[]),N=k.useCallback(async()=>{if(h.size!==0){c("executing"),E(null);try{const L=await i.post(`projects/${e}/cleanup`,{items:Array.from(h),resetTeams:_});y(L),c("result")}catch(L){E(L instanceof Error?L.message:String(L)),c("preview")}}},[i,e,h,_]),M=k.useCallback(L=>{o.current&&!o.current.contains(L.target)&&A()},[A]);if(!r)return null;const P=f?$0e(f.items):new Map;return b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",onClick:M,children:b.jsxs("div",{ref:o,className:"w-[560px] max-w-[95vw] max-h-[80vh] flex flex-col bg-dark-surface border border-dark-border rounded-lg shadow-2xl",role:"dialog","aria-modal":"true","aria-label":"Clean Up",children:[b.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-dark-border shrink-0",children:[b.jsxs("h2",{className:"text-base font-semibold text-dark-text",children:["Clean Up",f?` — ${f.projectName}`:""]}),b.jsx("button",{onClick:A,className:"text-dark-muted hover:text-dark-text transition-colors p-1 rounded hover:bg-dark-border/30",title:"Close (Esc)",children:b.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),b.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-4 min-h-0",children:[s==="loading"&&b.jsx("div",{className:"flex items-center justify-center py-12",children:b.jsx("p",{className:"text-dark-muted text-sm",children:"Scanning for items to clean up..."})}),x&&b.jsx("div",{className:"mb-4 px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149] text-sm",children:x}),s==="preview"&&f&&b.jsx("div",{className:"mb-4",children:b.jsxs("label",{className:"flex items-start gap-2.5 px-3 py-2.5 rounded border border-dark-border/50 hover:border-dark-border bg-dark-base/50 cursor-pointer transition-colors",children:[b.jsx("input",{type:"checkbox",checked:_,onChange:L=>w(L.target.checked),className:"mt-0.5 accent-[#F85149] shrink-0"}),b.jsxs("div",{className:"min-w-0 flex-1",children:[b.jsx("div",{className:"text-sm text-dark-text font-medium",children:"Reset team history"}),_&&b.jsx("div",{className:"text-xs text-[#F85149]/80 mt-1",children:"This will delete all team records, events, and commands for this project from the database. The project will be like freshly added."})]})]})}),s==="preview"&&f&&f.items.length===0&&!x&&b.jsxs("div",{className:"flex flex-col items-center justify-center py-12 gap-2",children:[b.jsx("span",{className:"text-3xl",children:"✨"}),b.jsx("p",{className:"text-dark-muted text-sm",children:"Nothing to clean up!"}),b.jsx("p",{className:"text-dark-muted/60 text-xs",children:"This project is already tidy."})]}),s==="preview"&&f&&f.items.length>0&&b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[b.jsx("button",{onClick:O,className:"text-xs text-dark-accent hover:underline",children:"Select All"}),b.jsx("button",{onClick:T,className:"text-xs text-dark-muted hover:underline",children:"Deselect All"}),b.jsxs("span",{className:"ml-auto text-xs text-dark-muted",children:[h.size," of ",f.items.length," selected"]})]}),Array.from(P.entries()).map(([L,D])=>b.jsxs("div",{className:"mb-4",children:[b.jsxs("h3",{className:"text-xs font-semibold text-dark-muted uppercase tracking-wider mb-2",children:[B0e[L]," ",q0e[L]," (",D.length,")"]}),b.jsx("div",{className:"space-y-1",children:D.map(q=>b.jsxs("label",{className:"flex items-start gap-2.5 px-3 py-2 rounded border border-dark-border/50 hover:border-dark-border bg-dark-base/50 cursor-pointer transition-colors",children:[b.jsx("input",{type:"checkbox",checked:h.has(q.path),onChange:()=>C(q.path),className:"mt-0.5 accent-[#F85149] shrink-0"}),b.jsxs("div",{className:"min-w-0 flex-1",children:[b.jsx("div",{className:"text-sm text-dark-text truncate",title:q.path,children:q.name}),b.jsx("div",{className:"text-xs text-dark-muted/70 truncate",children:q.reason})]})]},q.path))})]},L))]}),s==="executing"&&b.jsx("div",{className:"flex items-center justify-center py-12",children:b.jsxs("p",{className:"text-dark-muted text-sm",children:["Removing ",h.size," item",h.size!==1?"s":"","..."]})}),s==="result"&&g&&b.jsxs("div",{className:"py-4 space-y-3",children:[g.removed.length>0&&b.jsxs("div",{children:[b.jsxs("p",{className:"text-sm text-dark-text font-medium mb-1",children:["Removed ",g.removed.length," item",g.removed.length!==1?"s":""]}),b.jsx("ul",{className:"space-y-0.5",children:g.removed.map(L=>b.jsxs("li",{className:"text-xs text-dark-muted flex items-center gap-1.5",children:[b.jsx("span",{className:"text-green-400",children:"✓"})," ",L]},L))})]}),g.failed.length>0&&b.jsxs("div",{children:[b.jsxs("p",{className:"text-sm text-[#F85149] font-medium mb-1",children:[g.failed.length," failed"]}),b.jsx("ul",{className:"space-y-0.5",children:g.failed.map(L=>b.jsxs("li",{className:"text-xs text-[#F85149]/80 flex items-start gap-1.5",children:[b.jsx("span",{className:"shrink-0",children:"✗"}),b.jsxs("span",{className:"truncate",title:L.error,children:[L.name,": ",L.error]})]},L.name))})]}),g.removed.length===0&&g.failed.length===0&&b.jsx("p",{className:"text-sm text-dark-muted",children:"No items were removed."})]})]}),b.jsxs("div",{className:"flex items-center justify-end gap-3 px-5 py-4 border-t border-dark-border shrink-0",children:[s==="preview"&&f&&f.items.length>0&&b.jsxs(b.Fragment,{children:[b.jsx("button",{onClick:A,className:"px-3 py-1.5 text-sm rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors",children:"Cancel"}),b.jsxs("button",{onClick:N,disabled:h.size===0,className:"px-4 py-1.5 text-sm font-medium rounded border border-[#F85149]/40 text-[#F85149] bg-[#F85149]/10 hover:bg-[#F85149]/20 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:["Remove Selected (",h.size,")"]})]}),(s==="result"||s==="preview"&&(!f||f.items.length===0))&&b.jsx("button",{onClick:A,className:"px-4 py-1.5 text-sm font-medium rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors",children:"Close"})]})]})})}function U0e({items:e}){const[r,n]=k.useState(!1),a=k.useRef(null),i=k.useCallback(o=>{o.stopPropagation(),n(s=>!s)},[]);return k.useEffect(()=>{if(!r)return;function o(s){a.current&&!a.current.contains(s.target)&&n(!1)}return document.addEventListener("mousedown",o),()=>document.removeEventListener("mousedown",o)},[r]),k.useEffect(()=>{if(!r)return;function o(s){s.key==="Escape"&&n(!1)}return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[r]),b.jsxs("div",{ref:a,className:"relative",children:[b.jsx("button",{onClick:i,className:"p-1 rounded text-dark-muted hover:text-dark-text hover:bg-dark-border/30 transition-colors",title:"More actions",children:b.jsx(KV,{size:16})}),r&&b.jsx("div",{className:"absolute right-0 top-full mt-1 z-20 min-w-[140px] bg-dark-surface border border-dark-border rounded-lg shadow-lg py-1",children:e.map(o=>b.jsx("button",{onClick:s=>{s.stopPropagation(),n(!1),o.onClick()},className:`w-full text-left px-3 py-1.5 text-xs transition-colors ${o.danger?"text-[#F85149] hover:bg-[#F85149]/10":"text-dark-muted hover:text-dark-text hover:bg-dark-border/30"}`,children:o.label},o.label))})]})}const nR={active:{bg:"#3FB95020",text:"#3FB950",border:"#3FB95040"},archived:{bg:"#8B949E20",text:"#8B949E",border:"#8B949E40"}};function H0e(e){var h,m,g,y,x,E,_;if(!e.installStatus)return"#8B949E";const r=e.installStatus,n=(h=r.gitCommitStatus)==null?void 0:h.health;if(n==="red")return"#F85149";const a=((m=r.hooks)==null?void 0:m.installed)??!1,i=((y=(g=r.hooks)==null?void 0:g.files)==null?void 0:y.some(w=>w.hasCrlf))??!1,o=((x=r.prompt)==null?void 0:x.installed)??!1,s=((E=r.agents)==null?void 0:E.installed)??!1,c=((_=r.settings)==null?void 0:_.exists)??!1;return a&&!i&&o&&s&&c?(r.outdatedCount??0)>0||n==="amber"?"#D29922":"#3FB950":a||o||s||c||i?"#D29922":"#F85149"}function G0e(e,r){var n,a,i,o,s;if((n=r==null?void 0:r.installStatus)!=null&&n.gitCommitStatus){const c=r.installStatus.gitCommitStatus;if(c.health==="red"&&e==="#F85149"||c.health==="amber"&&e==="#D29922")return c.message}if(e==="#D29922"&&(r!=null&&r.installStatus)){const c=r.installStatus,f=((a=c.hooks)==null?void 0:a.installed)??!1,d=((i=c.prompt)==null?void 0:i.installed)??!1,h=((o=c.agents)==null?void 0:o.installed)??!1,m=((s=c.settings)==null?void 0:s.exists)??!1;if(f&&d&&h&&m&&(c.outdatedCount??0)>0)return`${c.outdatedCount} file${c.outdatedCount===1?"":"s"} outdated`}switch(e){case"#3FB950":return"All installed";case"#D29922":return"Partially installed";case"#F85149":return"Not installed";default:return"Unknown"}}function V0e({project:e,repoSettings:r}){var c,f,d,h,m,g,y,x,E,_,w,A,C,O,T,N,M,P,L,D,q,z,U,$,Y,B,Z,ae;if(!e.installStatus)return b.jsx("span",{className:"text-xs text-dark-muted",title:"Install status unknown",children:"Status unknown"});const n=e.installStatus,a=n.currentVersion,i=[{key:"hooks",label:"hooks",installed:((c=n.hooks)==null?void 0:c.installed)??!1,hasCrlf:((d=(f=n.hooks)==null?void 0:f.files)==null?void 0:d.some(V=>V.hasCrlf))??!1,somePresent:(((h=n.hooks)==null?void 0:h.found)??0)>0,files:((m=n.hooks)==null?void 0:m.files)??[],summary:`Hook Scripts (${((g=n.hooks)==null?void 0:g.found)??0}/${((y=n.hooks)==null?void 0:y.total)??0})`,outdatedInCategory:(((x=n.hooks)==null?void 0:x.files)??[]).filter(V=>V.exists&&V.installedVersion!==a).length},{key:"prompt",label:"prompt",installed:((E=n.prompt)==null?void 0:E.installed)??!1,hasCrlf:!1,somePresent:((w=(_=n.prompt)==null?void 0:_.files)==null?void 0:w.some(V=>V.exists))??!1,files:((A=n.prompt)==null?void 0:A.files)??[],summary:"Prompt Files",outdatedInCategory:(((C=n.prompt)==null?void 0:C.files)??[]).filter(V=>V.exists&&V.installedVersion!==a).length},{key:"agents",label:"agents",installed:((O=n.agents)==null?void 0:O.installed)??!1,hasCrlf:!1,somePresent:((N=(T=n.agents)==null?void 0:T.files)==null?void 0:N.some(V=>V.exists))??!1,files:((M=n.agents)==null?void 0:M.files)??[],summary:"Agent Templates",outdatedInCategory:(((P=n.agents)==null?void 0:P.files)??[]).filter(V=>V.exists&&V.installedVersion!==a).length},{key:"guides",label:"guides",installed:((L=n.guides)==null?void 0:L.installed)??!1,hasCrlf:!1,somePresent:(((q=(D=n.guides)==null?void 0:D.files)==null?void 0:q.length)??0)>0,files:((z=n.guides)==null?void 0:z.files)??[],summary:`Guidebooks (${(($=(U=n.guides)==null?void 0:U.files)==null?void 0:$.length)??0})`,outdatedInCategory:(((Y=n.guides)==null?void 0:Y.files)??[]).filter(V=>V.exists&&V.installedVersion!==a).length}],o=((B=n.settings)==null?void 0:B.exists)&&n.settings.installedVersion!==a,s=[{key:"settings",label:"settings",exists:((Z=n.settings)==null?void 0:Z.exists)??!1,tooltip:(ae=n.settings)!=null&&ae.exists?o?`settings.json: v${n.settings.installedVersion||"?"} → v${a}`:"settings.json found":"settings.json missing",outdated:!!o}];return b.jsxs("div",{className:"flex items-center gap-3 text-xs flex-wrap",children:[i.map(V=>{const fe=V.outdatedInCategory>0,F=V.installed&&!V.hasCrlf&&!fe?"#3FB950":V.hasCrlf||fe||V.somePresent?"#D29922":"#F85149",X=V.installed&&!V.hasCrlf&&!fe?"✓":V.hasCrlf||fe||V.somePresent?"⚠":"✗";return b.jsxs("div",{className:"relative group shrink-0",children:[b.jsxs("span",{className:"cursor-default",style:{color:F},children:[X," ",V.label]}),b.jsxs("div",{className:"hidden group-hover:block absolute z-10 bottom-full left-0 mb-1 p-2 rounded bg-[#1C2128] border border-[#30363D] shadow-lg text-xs min-w-48 max-h-64 overflow-auto",children:[b.jsx("div",{className:"font-medium mb-1 text-[#C9D1D9]",children:V.summary}),V.files.map(ce=>{const G=ce.exists&&ce.installedVersion!==a,H=ce.exists?ce.hasCrlf||G?"#D29922":"#3FB950":"#F85149",te=ce.exists?ce.hasCrlf||G?"⚠":"✓":"✗",W=ce.exists&&G?` (v${ce.installedVersion||"?"} → v${a})`:ce.hasCrlf?" (CRLF)":"";return b.jsxs("div",{className:"flex items-center gap-1.5 py-0.5",children:[b.jsx("span",{style:{color:H},children:te}),b.jsxs("span",{className:"text-[#8B949E] font-mono",children:[ce.name,W]})]},ce.name)})]})]},V.key)}),s.map(V=>{const fe=V.exists?V.outdated?"#D29922":"#3FB950":"#F85149",F=V.exists?V.outdated?"⚠":"✓":"✗";return b.jsxs("div",{className:"relative group shrink-0",children:[b.jsxs("span",{className:"cursor-default",style:{color:fe},children:[F," ",V.label]}),b.jsx("div",{className:"hidden group-hover:block absolute z-10 bottom-full right-0 mb-1 p-2 rounded bg-[#1C2128] border border-[#30363D] shadow-lg text-xs whitespace-nowrap",children:b.jsx("span",{className:"text-[#C9D1D9]",children:V.tooltip})})]},V.key)}),n.gitCommitStatus&&b.jsxs("div",{className:"relative group shrink-0",children:[b.jsxs("span",{className:"cursor-default",style:{color:n.gitCommitStatus.health==="green"?"#3FB950":n.gitCommitStatus.health==="amber"?"#D29922":n.gitCommitStatus.health==="red"?"#F85149":"#8B949E"},children:[n.gitCommitStatus.health==="green"?"✓":n.gitCommitStatus.health==="amber"?"⚠":n.gitCommitStatus.health==="red"?"✗":"?"," committed"]}),b.jsxs("div",{className:"hidden group-hover:block absolute z-10 bottom-full right-0 mb-1 p-2 rounded bg-[#1C2128] border border-[#30363D] shadow-lg text-xs min-w-56 max-h-64 overflow-auto",children:[b.jsxs("div",{className:"font-medium mb-1 text-[#C9D1D9]",children:["Git Commit Status (",n.gitCommitStatus.defaultBranch,")"]}),b.jsx("div",{className:"text-[#8B949E] mb-1",children:n.gitCommitStatus.message}),n.gitCommitStatus.gitignored&&b.jsxs("div",{className:"flex items-center gap-1.5 py-0.5",children:[b.jsx("span",{style:{color:"#F85149"},children:"✗"}),b.jsx("span",{className:"text-[#8B949E]",children:".claude/ is in .gitignore"})]}),n.gitCommitStatus.files.map(V=>{const fe=V.committed?V.committedVersion&&V.committedVersion!==V.currentVersion?"#D29922":"#3FB950":"#F85149",F=V.committed?V.committedVersion&&V.committedVersion!==V.currentVersion?"⚠":"✓":"✗",X=V.committed&&V.committedVersion&&V.committedVersion!==V.currentVersion?` (v${V.committedVersion} → v${V.currentVersion})`:"";return b.jsxs("div",{className:"flex items-center gap-1.5 py-0.5",children:[b.jsx("span",{style:{color:fe},children:F}),b.jsxs("span",{className:"text-[#8B949E] font-mono text-[11px]",children:[V.path,X]})]},V.path)})]})]}),r&&b.jsxs("div",{className:"relative group shrink-0",children:[b.jsxs("span",{className:"cursor-default",style:{color:r.autoMergeEnabled?"#3FB950":"#D29922"},children:[r.autoMergeEnabled?"✓":"⚠"," github"]}),b.jsxs("div",{className:"hidden group-hover:block absolute z-10 bottom-full right-0 mb-1 p-2 rounded bg-[#1C2128] border border-[#30363D] shadow-lg text-xs min-w-52",children:[b.jsx("div",{className:"font-medium mb-1 text-[#C9D1D9]",children:"GitHub Repo Settings"}),b.jsxs("div",{className:"flex items-center gap-1.5 py-0.5",children:[b.jsx("span",{style:{color:r.autoMergeEnabled?"#3FB950":"#D29922"},children:r.autoMergeEnabled?"✓":"⚠"}),b.jsx("span",{className:"text-[#8B949E]",children:r.autoMergeEnabled?"Auto-merge enabled":"Auto-merge disabled — required for gh pr merge --auto"})]}),b.jsxs("div",{className:"flex items-center gap-1.5 py-0.5",children:[b.jsx("span",{style:{color:"#8B949E"},children:"•"}),b.jsxs("span",{className:"text-[#8B949E]",children:["Default branch: ",r.defaultBranch]})]}),r.branchProtection&&b.jsxs("div",{className:"flex items-center gap-1.5 py-0.5",children:[b.jsx("span",{style:{color:r.branchProtection.enabled?"#3FB950":"#8B949E"},children:r.branchProtection.enabled?"✓":"•"}),b.jsx("span",{className:"text-[#8B949E]",children:r.branchProtection.enabled?`Branch protection (${r.branchProtection.requiredChecks.length} required check${r.branchProtection.requiredChecks.length!==1?"s":""})`:"No branch protection"})]})]})]})]})}function aR({project:e,groups:r,reinstalling:n,reinstallResult:a,onSaveLimit:i,onSaveModel:o,onReinstall:s,onCleanup:c,onDelete:f,onEditPrompt:d,onGroupChange:h,fetchRepoSettings:m,onCommitClaudeFiles:g}){var B,Z,ae;const[y,x]=k.useState(!1),[E,_]=k.useState(void 0),[w,A]=k.useState(!1),[C,O]=k.useState(null),[T,N]=k.useState(!1),M=tR(e.maxActiveTeams),P=tR(e.model??"");k.useEffect(()=>{!y||T||(N(!0),m(e.id).then(V=>_(V)).catch(()=>_(null)))},[y,T,m,e.id]);const L=nR[e.status]||nR.active,D=H0e(e),q=G0e(D,e),z=e.queuedTeamCount??0,U=`${e.activeTeamCount}/${e.maxActiveTeams} active${z>0?` · ${z} queued`:""}`,$=k.useCallback(()=>{const V=M.confirmEdit();if(V===null)return;const fe=Math.max(1,Math.min(50,V));i(e.id,fe)},[M,i,e.id]),Y=k.useCallback(()=>{const V=P.confirmEdit();V!==null&&o(e.id,V)},[P,o,e.id]);return b.jsxs("div",{className:"bg-dark-surface border border-dark-border rounded-lg overflow-hidden",children:[b.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 cursor-pointer hover:bg-dark-border/10 transition-colors",onClick:()=>x(!y),children:[b.jsx(XV,{size:14,className:`text-dark-muted shrink-0 transition-transform ${y?"rotate-90":""}`}),b.jsx("span",{className:"text-sm font-semibold text-dark-text truncate min-w-0",children:e.name}),b.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs font-medium shrink-0",style:{backgroundColor:L.bg,color:L.text,border:`1px solid ${L.border}`},children:e.status}),b.jsx("span",{className:"text-xs text-dark-muted shrink-0",children:U}),b.jsx("span",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:D},title:q}),b.jsx("span",{className:"flex-1"}),(((B=e.installStatus)==null?void 0:B.outdatedCount)??0)>0&&b.jsxs("span",{className:"px-2 py-0.5 text-xs rounded-full bg-[#D29922]/15 text-[#D29922] font-medium shrink-0",children:[e.installStatus.outdatedCount," outdated"]}),b.jsx("button",{onClick:V=>{V.stopPropagation(),s(e)},disabled:n===e.id,className:"px-3 py-1 text-xs rounded border border-dark-accent/40 text-dark-accent bg-dark-accent/10 hover:bg-dark-accent/20 transition-colors disabled:opacity-40 disabled:cursor-not-allowed shrink-0",title:(((Z=e.installStatus)==null?void 0:Z.outdatedCount)??0)>0?`Reinstall (${e.installStatus.outdatedCount} file${e.installStatus.outdatedCount===1?"":"s"} outdated)`:"(Re)install hooks, settings, and workflow prompt",children:n===e.id?"Installing...":"Reinstall"}),b.jsx(U0e,{items:[{label:"Clean Up",onClick:()=>c(e)},{label:"Delete",onClick:()=>f(e),danger:!0}]})]}),(a==null?void 0:a.id)===e.id&&b.jsx("div",{className:`mx-4 mb-2 px-3 py-1.5 rounded text-xs ${a.ok?"border border-[#3FB950]/30 bg-[#3FB950]/10 text-[#3FB950]":"border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149]"}`,children:a.ok?"Installation completed successfully":`Installation failed: ${a.error}`}),((ae=e.installStatus)==null?void 0:ae.gitCommitStatus)&&(e.installStatus.gitCommitStatus.health==="red"||e.installStatus.gitCommitStatus.health==="amber")&&b.jsxs("div",{className:`mx-4 mb-2 px-3 py-1.5 rounded text-xs flex items-center gap-2 ${e.installStatus.gitCommitStatus.health==="red"?"border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149]":"border border-[#D29922]/30 bg-[#D29922]/10 text-[#D29922]"}`,children:[b.jsxs("span",{className:"flex-1",children:[e.installStatus.gitCommitStatus.message,e.installStatus.gitCommitStatus.health==="red"&&!e.installStatus.gitCommitStatus.gitignored&&" — hooks and agents won't work in worktrees"]}),b.jsx("button",{onClick:async V=>{var X,ce;V.stopPropagation();const fe=((ce=(X=e.installStatus)==null?void 0:X.gitCommitStatus)==null?void 0:ce.health)==="amber",F=fe?"This will update and commit+push .claude/ files to the default branch. Continue?":"This will commit and push .claude/ files to the default branch. Continue?";if(window.confirm(F)){A(!0),O(null);try{const G=await g(e.id,{reinstall:fe});O(G),G.ok&&!G.error&&setTimeout(()=>O(null),5e3)}catch(G){O({ok:!1,error:G instanceof Error?G.message:String(G)})}finally{A(!1)}}},disabled:w,className:`shrink-0 px-2 py-0.5 rounded border text-xs font-medium transition-colors disabled:opacity-40 disabled:cursor-not-allowed ${e.installStatus.gitCommitStatus.health==="red"?"border-[#F85149]/40 text-[#F85149] bg-[#F85149]/10 hover:bg-[#F85149]/20":"border-[#D29922]/40 text-[#D29922] bg-[#D29922]/10 hover:bg-[#D29922]/20"}`,children:w?"Committing...":e.installStatus.gitCommitStatus.health==="amber"?"Update & Commit":"Fix"})]}),C&&b.jsx("div",{className:`mx-4 mb-2 px-3 py-1.5 rounded text-xs ${C.ok&&!C.error?"border border-[#3FB950]/30 bg-[#3FB950]/10 text-[#3FB950]":C.ok&&C.error?"border border-[#D29922]/30 bg-[#D29922]/10 text-[#D29922]":"border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149]"}`,children:C.ok?C.error?C.error:C.message??".claude/ files committed and pushed successfully":`Commit failed: ${C.error}`}),y&&b.jsxs("div",{className:"border-t border-dark-border px-4 py-3 space-y-3",children:[b.jsxs("div",{children:[b.jsx("div",{className:"text-[10px] uppercase tracking-wider text-dark-muted/60 font-medium mb-1",children:"Repository"}),b.jsxs("div",{className:"flex items-center gap-4 text-xs text-dark-muted",children:[b.jsx("span",{className:"truncate",title:e.repoPath,children:e.repoPath}),e.githubRepo&&b.jsx("span",{className:"shrink-0",children:e.githubRepo})]})]}),b.jsxs("div",{children:[b.jsx("div",{className:"text-[10px] uppercase tracking-wider text-dark-muted/60 font-medium mb-1",children:"Configuration"}),b.jsxs("div",{className:"flex items-center gap-4 text-xs text-dark-muted flex-wrap",children:[P.isEditing?b.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1",children:[b.jsx("span",{children:"Model:"}),b.jsx("input",{ref:P.inputRef,type:"text",value:P.editValue,onChange:V=>P.setEditValue(V.target.value),onKeyDown:V=>{V.key==="Enter"&&Y(),V.key==="Escape"&&P.cancelEdit()},onBlur:Y,placeholder:"default",className:"w-32 px-1 py-0 text-xs rounded border border-dark-accent bg-dark-base text-dark-text focus:outline-none"})]}):b.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1 cursor-pointer hover:text-dark-text transition-colors group",onClick:()=>P.startEdit(e.model??""),title:"Click to edit model",children:["Model: ",e.model||"default",b.jsx(h5,{size:11,className:"text-dark-muted/40 group-hover:text-dark-muted transition-colors"})]}),M.isEditing?b.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1",children:[b.jsx("span",{children:"Max teams:"}),b.jsx("input",{ref:M.inputRef,type:"number",value:M.editValue,onChange:V=>M.setEditValue(parseInt(V.target.value,10)||1),onKeyDown:V=>{V.key==="Enter"&&$(),V.key==="Escape"&&M.cancelEdit()},onBlur:$,min:1,max:50,className:"w-12 px-1 py-0 text-xs rounded border border-dark-accent bg-dark-base text-dark-text focus:outline-none"})]}):b.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1 cursor-pointer hover:text-dark-text transition-colors group",onClick:()=>M.startEdit(e.maxActiveTeams),title:"Click to edit max active teams",children:["Max teams: ",e.maxActiveTeams,b.jsx(h5,{size:11,className:"text-dark-muted/40 group-hover:text-dark-muted transition-colors"})]}),b.jsxs("select",{value:e.groupId??"",onChange:V=>{const fe=V.target.value;h(e.id,fe===""?null:parseInt(fe,10))},onClick:V=>V.stopPropagation(),className:"shrink-0 px-1 py-0 text-xs rounded border border-dark-border bg-dark-base text-dark-muted hover:text-dark-text focus:outline-none cursor-pointer",title:"Assign to group",children:[b.jsx("option",{value:"",children:"No group"}),r.map(V=>b.jsx("option",{value:V.id,children:V.name},V.id))]})]})]}),b.jsxs("div",{children:[b.jsx("div",{className:"text-[10px] uppercase tracking-wider text-dark-muted/60 font-medium mb-1",children:"Install Health"}),b.jsx(V0e,{project:e,repoSettings:E})]}),e.promptFile&&b.jsxs("div",{children:[b.jsx("div",{className:"text-[10px] uppercase tracking-wider text-dark-muted/60 font-medium mb-1",children:"Prompt"}),b.jsxs("div",{className:"flex items-center gap-2 text-xs text-dark-muted",children:[b.jsx("span",{className:"truncate text-dark-text/70",title:e.promptFile,children:e.promptFile}),b.jsx("button",{onClick:()=>d(e.id),className:"shrink-0 text-dark-accent/70 hover:text-dark-accent transition-colors",title:"Edit launch prompt",children:"Edit"})]})]})]})]})}function iR({title:e,description:r,projectCount:n,defaultExpanded:a,onEdit:i,onDelete:o,children:s}){const[c,f]=k.useState(a??!0);return b.jsxs("div",{className:"mb-4",children:[b.jsxs("button",{onClick:()=>f(!c),className:"flex items-center gap-2 w-full text-left py-2 group",children:[b.jsx("svg",{className:`w-3.5 h-3.5 text-dark-muted transition-transform ${c?"rotate-90":""}`,viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z",clipRule:"evenodd"})}),b.jsx("span",{className:"text-sm font-semibold text-dark-text",children:e}),b.jsxs("span",{className:"text-xs text-dark-muted",children:["(",n,")"]}),r&&b.jsx("span",{className:"text-xs text-dark-muted/60 truncate ml-2",children:r}),i&&b.jsx("span",{onClick:d=>{d.stopPropagation(),i()},className:"ml-auto text-xs text-dark-muted hover:text-dark-text transition-colors opacity-0 group-hover:opacity-100 px-1",title:"Edit group",children:"Edit"}),o&&b.jsx("span",{onClick:d=>{d.stopPropagation(),o()},className:"text-xs text-[#F85149]/70 hover:text-[#F85149] transition-colors opacity-0 group-hover:opacity-100 px-1",title:"Delete group",children:"Delete"})]}),c&&b.jsx("div",{className:"space-y-3 ml-5",children:s})]})}function K0e({open:e,group:r,onClose:n,onSave:a}){const[i,o]=k.useState((r==null?void 0:r.name)??""),[s,c]=k.useState((r==null?void 0:r.description)??""),[f,d]=k.useState(null),h=k.useRef(null);if(k.useEffect(()=>{e&&(o((r==null?void 0:r.name)??""),c((r==null?void 0:r.description)??""),d(null),setTimeout(()=>{var g;return(g=h.current)==null?void 0:g.focus()},50))},[e,r]),!e)return null;const m=()=>{if(!i.trim()){d("Name is required");return}a(i.trim(),s.trim()||null)};return b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:g=>{g.target===g.currentTarget&&n()},children:b.jsxs("div",{className:"w-[400px] max-w-[95vw] bg-dark-surface border border-dark-border rounded-lg shadow-2xl",role:"dialog","aria-modal":"true",children:[b.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-dark-border",children:[b.jsx("h2",{className:"text-base font-semibold text-dark-text",children:r?"Edit Group":"New Group"}),b.jsx("button",{onClick:n,className:"text-dark-muted hover:text-dark-text transition-colors p-1 rounded hover:bg-dark-border/30",children:b.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),b.jsxs("div",{className:"px-5 py-4 space-y-3",children:[b.jsxs("div",{children:[b.jsx("label",{className:"block text-xs text-dark-muted mb-1",children:"Name"}),b.jsx("input",{ref:h,type:"text",value:i,onChange:g=>o(g.target.value),onKeyDown:g=>{g.key==="Enter"&&m(),g.key==="Escape"&&n()},className:"w-full px-3 py-1.5 text-sm rounded border border-dark-border bg-dark-base text-dark-text focus:outline-none focus:border-dark-accent",placeholder:"e.g. Backend Services"})]}),b.jsxs("div",{children:[b.jsx("label",{className:"block text-xs text-dark-muted mb-1",children:"Description (optional)"}),b.jsx("input",{type:"text",value:s,onChange:g=>c(g.target.value),onKeyDown:g=>{g.key==="Enter"&&m(),g.key==="Escape"&&n()},className:"w-full px-3 py-1.5 text-sm rounded border border-dark-border bg-dark-base text-dark-text focus:outline-none focus:border-dark-accent",placeholder:"Short description of this group"})]}),f&&b.jsx("div",{className:"text-xs text-[#F85149]",children:f})]}),b.jsxs("div",{className:"flex items-center justify-end gap-3 px-5 py-4 border-t border-dark-border",children:[b.jsx("button",{onClick:n,className:"px-3 py-1.5 text-sm rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors",children:"Cancel"}),b.jsx("button",{onClick:m,className:"px-4 py-1.5 text-sm font-medium rounded border border-dark-accent/40 text-dark-accent bg-dark-accent/10 hover:bg-dark-accent/20 transition-colors",children:r?"Save":"Create"})]})]})})}function Y0e(){const e=Ht(),[r,n]=k.useState([]),[a,i]=k.useState([]),[o,s]=k.useState(!0),[c,f]=k.useState(!1),[d,h]=k.useState(!1),[m,g]=k.useState(null),[y,x]=k.useState(null),[E,_]=k.useState(null),[w,A]=k.useState(""),[C,O]=k.useState(!1),[T,N]=k.useState(!1),[M,P]=k.useState(null),[L,D]=k.useState(null),[q,z]=k.useState(null),U=k.useCallback(async()=>{try{const se=await e.get("projects");n(se)}catch{}finally{s(!1)}},[e]),$=k.useCallback(async()=>{try{const se=await e.get("project-groups");i(se)}catch{}},[e]),Y=k.useCallback(async se=>{try{return await e.get(`projects/${se}/repo-settings`)}catch{return null}},[e]);k.useEffect(()=>{U(),$()},[U,$]);const B=k.useCallback(()=>{g(null),h(!0)},[]),Z=k.useCallback(se=>{g(se),h(!0)},[]),ae=k.useCallback(async se=>{if(window.confirm(`Delete group "${se.name}"? Projects in this group will become ungrouped.`))try{await e.del(`project-groups/${se.id}`),await $(),await U()}catch(ge){window.alert(`Failed to delete group: ${ge instanceof Error?ge.message:String(ge)}`)}},[e,$,U]),V=k.useCallback(async(se,ne)=>{try{m?await e.put(`project-groups/${m.id}`,{name:se,description:ne}):await e.post("project-groups",{name:se,description:ne}),h(!1),await $()}catch(ge){window.alert(`Failed to save group: ${ge instanceof Error?ge.message:String(ge)}`)}},[e,m,$]),fe=k.useCallback(async(se,ne)=>{n(ge=>ge.map(_e=>_e.id===se?{..._e,groupId:ne}:_e));try{await e.put(`projects/${se}`,{groupId:ne}),await $()}catch{await U(),await $()}},[e,U,$]),F=k.useCallback(async se=>{if(window.confirm(`Delete project "${se.name}"? This will stop all active teams and remove the project.`)){n(ge=>ge.filter(_e=>_e.id!==se.id));try{await e.del(`projects/${se.id}`),await $()}catch(ge){await U(),await $(),window.alert(`Failed to delete project: ${ge instanceof Error?ge.message:String(ge)}`)}}},[e,U,$]),X=k.useCallback(()=>{f(!1),U()},[U]),ce=k.useCallback(async se=>{D(se.id),z(null);try{const ne=await e.post(`projects/${se.id}/install`,{});z({id:se.id,ok:ne.ok,error:ne.error}),ne.installStatus&&n(ge=>ge.map(_e=>_e.id===se.id?{..._e,installStatus:ne.installStatus}:_e))}catch(ne){z({id:se.id,ok:!1,error:ne instanceof Error?ne.message:String(ne)})}finally{D(null)}},[e]),G=k.useCallback(async(se,ne)=>{try{const ge=await e.post(`projects/${se}/commit-claude-files`,{reinstall:ne==null?void 0:ne.reinstall});return await U(),ge}catch(ge){return{ok:!1,error:ge instanceof Error?ge.message:String(ge)}}},[e,U]),H=k.useCallback(se=>{x(se.id)},[]),te=k.useCallback(()=>{x(null)},[]),W=k.useCallback(()=>{U()},[U]),xe=k.useCallback(async(se,ne)=>{n(ge=>ge.map(_e=>_e.id===se?{..._e,maxActiveTeams:ne}:_e));try{await e.put(`projects/${se}`,{maxActiveTeams:ne})}catch{await U()}},[e,U]),ee=k.useCallback(async(se,ne)=>{const ge=ne.trim()||null;n(_e=>_e.map(vt=>vt.id===se?{...vt,model:ge}:vt));try{await e.put(`projects/${se}`,{model:ge})}catch{await U()}},[e,U]);k.useEffect(()=>{E!==null&&(O(!0),P(null),e.get(`projects/${E}/prompt`).then(se=>{A(se.content)}).catch(se=>{P(se instanceof Error?se.message:String(se))}).finally(()=>{O(!1)}))},[E,e]),k.useEffect(()=>{if(E===null)return;function se(ne){ne.key==="Escape"&&_(null)}return document.addEventListener("keydown",se),()=>document.removeEventListener("keydown",se)},[E]);const le=k.useCallback(async()=>{if(E!==null){N(!0),P(null);try{await e.put(`projects/${E}/prompt`,{content:w}),_(null)}catch(se){P(se instanceof Error?se.message:String(se))}finally{N(!1)}}},[E,w,e]),{groupedSections:be,ungroupedProjects:he}=k.useMemo(()=>{const se=r.filter(ge=>ge.groupId==null);return{groupedSections:a.map(ge=>({group:ge,projects:r.filter(_e=>_e.groupId===ge.id)})),ungroupedProjects:se}},[r,a]),Se={groups:a,reinstalling:L,reinstallResult:q,onSaveLimit:xe,onSaveModel:ee,onReinstall:ce,onCleanup:H,onDelete:F,onEditPrompt:_,onGroupChange:fe,fetchRepoSettings:Y,onCommitClaudeFiles:G};return o?b.jsx("div",{className:"flex items-center justify-center h-full",children:b.jsx("p",{className:"text-dark-muted text-sm",children:"Loading projects..."})}):b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"p-6 max-w-5xl mx-auto",children:[b.jsxs("div",{className:"flex items-center justify-between mb-6",children:[b.jsx("h1",{className:"text-xl font-semibold text-dark-text",children:"Projects"}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("button",{onClick:B,className:"px-4 py-1.5 text-sm font-medium rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors",children:"New Group"}),b.jsx("button",{onClick:()=>f(!0),className:"px-4 py-1.5 text-sm font-medium rounded border border-dark-accent/40 text-dark-accent bg-dark-accent/10 hover:bg-dark-accent/20 transition-colors",children:"Add Project"})]})]}),r.length===0?b.jsxs("div",{className:"flex flex-col items-center justify-center py-24 gap-3",children:[b.jsx("svg",{className:"w-12 h-12 text-dark-muted/40",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"})}),b.jsx("p",{className:"text-dark-muted text-lg",children:"No projects yet"}),b.jsx("p",{className:"text-dark-muted/60 text-sm",children:"Add your first project to get started."})]}):b.jsxs("div",{children:[be.map(({group:se,projects:ne})=>b.jsx(iR,{title:se.name,description:se.description,projectCount:ne.length,onEdit:()=>Z(se),onDelete:()=>ae(se),children:ne.length===0?b.jsx("p",{className:"text-xs text-dark-muted/60 py-2",children:"No projects in this group"}):ne.map(ge=>b.jsx(aR,{project:ge,...Se},ge.id))},se.id)),he.length>0&&b.jsx(iR,{title:"Ungrouped",projectCount:he.length,defaultExpanded:!0,children:he.map(se=>b.jsx(aR,{project:se,...Se},se.id))})]})]}),b.jsx(z0e,{open:c,onClose:()=>f(!1),onAdded:X}),y!==null&&b.jsx(F0e,{projectId:y,open:!0,onClose:te,onDone:W}),b.jsx(K0e,{open:d,group:m,onClose:()=>h(!1),onSave:V}),E!==null&&b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:se=>{se.target===se.currentTarget&&_(null)},children:b.jsxs("div",{className:"w-[600px] max-w-[95vw] max-h-[80vh] bg-dark-surface border border-dark-border rounded-lg shadow-2xl flex flex-col",role:"dialog","aria-modal":"true",children:[b.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-dark-border shrink-0",children:[b.jsx("h2",{className:"text-base font-semibold text-dark-text",children:"Edit Launch Prompt"}),b.jsx("button",{onClick:()=>_(null),className:"text-dark-muted hover:text-dark-text transition-colors p-1 rounded hover:bg-dark-border/30",title:"Close",children:b.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:b.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),b.jsx("div",{className:"px-5 py-4 flex-1 overflow-y-auto",children:C?b.jsx("p",{className:"text-dark-muted text-sm",children:"Loading prompt..."}):b.jsxs(b.Fragment,{children:[b.jsxs("p",{className:"text-xs text-dark-muted mb-2",children:["Use ",b.jsx("code",{className:"text-dark-accent/70",children:"{{ISSUE_NUMBER}}"})," as a placeholder -- it will be replaced with the actual issue number at launch time."]}),b.jsx("textarea",{value:w,onChange:se=>A(se.target.value),className:"w-full h-48 px-3 py-2 text-sm rounded border border-dark-border bg-dark-base text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-dark-accent focus:ring-1 focus:ring-dark-accent/30 font-mono resize-y",disabled:T}),M&&b.jsx("div",{className:"mt-2 px-3 py-2 rounded border border-[#F85149]/30 bg-[#F85149]/10 text-[#F85149] text-sm",children:M})]})}),b.jsxs("div",{className:"flex items-center justify-end gap-3 px-5 py-4 border-t border-dark-border shrink-0",children:[b.jsx("button",{onClick:()=>_(null),className:"px-3 py-1.5 text-sm rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors",children:"Cancel"}),b.jsx("button",{onClick:le,disabled:T||C,className:"px-4 py-1.5 text-sm font-medium rounded border border-dark-accent/40 text-dark-accent bg-dark-accent/10 hover:bg-dark-accent/20 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:T?"Saving...":"Save Prompt"})]})]})})]})}function qu(e){const r=Number(e);return r>=6e4?`${r/1e3}s (${r/6e4}min)`:r>=1e3?`${r/1e3}s`:`${r}ms`}const X0e=[{title:"Server",rows:[{key:"host",label:"Host",envVar:"FLEET_HOST",description:"Network interface to bind to"},{key:"port",label:"Port",envVar:"PORT",description:"HTTP server port"},{key:"claudeCmd",label:"Claude Command",envVar:"FLEET_CLAUDE_CMD",description:"CLI command used to invoke Claude"},{key:"resolvedClaudeCmd",label:"Resolved Claude Path",envVar:"(auto-detected)",description:"Actual path used after auto-detection (Windows) or explicit override"},{key:"enableAgentTeams",label:"Agent Teams",envVar:"FLEET_ENABLE_AGENT_TEAMS",description:"Enable CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS env var for spawned CC processes",format:e=>e?"Enabled":"Disabled"},{key:"outputBufferLines",label:"Output Buffer Lines",envVar:"(hardcoded)",description:"Max lines kept in team output buffer"}]},{title:"Thresholds",rows:[{key:"idleThresholdMin",label:"Idle Threshold",envVar:"FLEET_IDLE_THRESHOLD_MIN",description:"Minutes before a team is considered idle",format:e=>`${e} min`},{key:"stuckThresholdMin",label:"Stuck Threshold",envVar:"FLEET_STUCK_THRESHOLD_MIN",description:"Minutes before a team is considered stuck",format:e=>`${e} min`},{key:"launchTimeoutMin",label:"Launch Timeout",envVar:"FLEET_LAUNCH_TIMEOUT_MIN",description:"Minutes before a launching team is marked failed",format:e=>`${e} min`},{key:"maxUniqueCiFailures",label:"Max CI Failures",envVar:"FLEET_MAX_CI_FAILURES",description:"Unique CI failures before a team is blocked"},{key:"earlyCrashThresholdSec",label:"Early Crash Threshold",envVar:"FLEET_EARLY_CRASH_THRESHOLD_SEC",description:"Seconds before a SubagentStop is considered an early crash",format:e=>`${e}s`},{key:"earlyCrashMinTools",label:"Early Crash Min Tools",envVar:"FLEET_EARLY_CRASH_MIN_TOOLS",description:"Minimum tool-use events for a subagent to be considered healthy"}]},{title:"Polling Intervals",rows:[{key:"githubPollIntervalMs",label:"GitHub Poll Interval",envVar:"FLEET_GITHUB_POLL_MS",description:"How often to poll GitHub for PR/CI updates",format:qu},{key:"issuePollIntervalMs",label:"Issue Poll Interval",envVar:"FLEET_ISSUE_POLL_MS",description:"How often to poll for new issues",format:qu},{key:"stuckCheckIntervalMs",label:"Stuck Check Interval",envVar:"FLEET_STUCK_CHECK_MS",description:"How often to check for stuck teams",format:qu},{key:"usagePollIntervalMs",label:"Usage Poll Interval",envVar:"FLEET_USAGE_POLL_MS",description:"How often to poll API usage data",format:qu},{key:"sseHeartbeatMs",label:"SSE Heartbeat",envVar:"(hardcoded)",description:"Interval between SSE keepalive pings",format:qu}]},{title:"Paths",rows:[{key:"fleetCommanderRoot",label:"Fleet Commander Root",envVar:"FLEET_COMMANDER_ROOT",description:"Installation root directory"},{key:"dbPath",label:"Database Path",envVar:"FLEET_DB_PATH",description:"SQLite database file location"}]}];function W0e(){const e=Ht(),[r,n]=k.useState(null),[a,i]=k.useState(!0),[o,s]=k.useState(null),[c,f]=k.useState(!1),[d,h]=k.useState(!1),[m,g]=k.useState(""),y=k.useCallback(async()=>{try{const E=await e.get("settings");n(E),s(null)}catch(E){s(E instanceof Error?E.message:String(E))}finally{i(!1)}},[e]);k.useEffect(()=>{y()},[y]);const x=async()=>{f(!0);try{await e.post("system/factory-reset",{confirm:"FACTORY_RESET"}),window.location.href="/"}catch(E){alert("Factory reset failed: "+(E instanceof Error?E.message:String(E)))}finally{f(!1)}};return a?b.jsx("div",{className:"flex items-center justify-center h-full",children:b.jsx("p",{className:"text-dark-muted text-sm",children:"Loading settings..."})}):o?b.jsx("div",{className:"flex items-center justify-center h-full",children:b.jsxs("div",{className:"text-center",children:[b.jsx("p",{className:"text-[#F85149] text-sm mb-2",children:"Failed to load settings"}),b.jsx("p",{className:"text-dark-muted text-xs",children:o})]})}):r?b.jsxs("div",{className:"p-6 max-w-4xl mx-auto",children:[b.jsxs("div",{className:"mb-6",children:[b.jsx("h1",{className:"text-xl font-semibold text-dark-text",children:"Settings"}),b.jsx("p",{className:"text-dark-muted text-sm mt-1",children:"Current runtime configuration. Set via environment variables — changes require a server restart."})]}),b.jsx("div",{className:"space-y-6",children:X0e.map(E=>b.jsxs("div",{children:[b.jsx("h2",{className:"text-sm font-semibold text-dark-muted uppercase tracking-wider mb-2",children:E.title}),b.jsx("div",{className:"bg-dark-surface border border-dark-border rounded-lg overflow-hidden",children:b.jsxs("table",{className:"w-full text-sm",children:[b.jsx("thead",{children:b.jsxs("tr",{className:"border-b border-dark-border",children:[b.jsx("th",{className:"text-left px-4 py-2 text-xs font-medium text-dark-muted uppercase tracking-wider w-[180px]",children:"Setting"}),b.jsx("th",{className:"text-left px-4 py-2 text-xs font-medium text-dark-muted uppercase tracking-wider w-[200px]",children:"Value"}),b.jsx("th",{className:"text-left px-4 py-2 text-xs font-medium text-dark-muted uppercase tracking-wider w-[200px]",children:"Env Variable"}),b.jsx("th",{className:"text-left px-4 py-2 text-xs font-medium text-dark-muted uppercase tracking-wider",children:"Description"})]})}),b.jsx("tbody",{children:E.rows.map((_,w)=>{const A=r[_.key],C=_.format?_.format(A):String(A);return b.jsxs("tr",{className:`border-b border-dark-border/50 last:border-b-0 ${w%2===1?"bg-dark-base/30":""}`,children:[b.jsx("td",{className:"px-4 py-2.5 text-dark-text font-medium",children:_.label}),b.jsx("td",{className:"px-4 py-2.5",children:b.jsx("code",{className:"text-dark-accent font-mono text-xs bg-dark-base/50 px-1.5 py-0.5 rounded",children:C})}),b.jsx("td",{className:"px-4 py-2.5",children:b.jsx("code",{className:"text-dark-muted font-mono text-xs",children:_.envVar})}),b.jsx("td",{className:"px-4 py-2.5 text-dark-muted",children:_.description})]},_.key)})})]})})]},E.title))}),b.jsxs("div",{className:"mt-6 bg-dark-surface border border-dark-border rounded-lg px-4 py-3",children:[b.jsx("h2",{className:"text-sm font-semibold text-dark-muted uppercase tracking-wider mb-1",children:"Launch Prompt"}),b.jsxs("p",{className:"text-dark-muted text-sm",children:["Configured per-project via prompt files:"," ",b.jsx("code",{className:"text-dark-accent font-mono text-xs bg-dark-base/50 px-1.5 py-0.5 rounded",children:"prompts/{slug}-prompt.md"})]})]}),b.jsxs("div",{className:"mt-8 border border-[#F85149]/30 rounded p-4",children:[b.jsx("h3",{className:"text-[#F85149] font-semibold mb-2",children:"Danger Zone"}),b.jsx("p",{className:"text-[#8B949E] text-sm mb-3",children:"Factory reset will stop all running teams, uninstall hooks from all projects, and delete all data. The database will be recreated fresh with default settings."}),d?b.jsxs("div",{className:"mt-2 p-3 bg-[#F85149]/5 border border-[#F85149]/30 rounded",children:[b.jsx("p",{className:"text-[#F85149] text-sm font-medium mb-1",children:"This action cannot be undone."}),b.jsxs("p",{className:"text-[#8B949E] text-sm mb-3",children:["Type ",b.jsx("code",{className:"font-mono text-xs bg-dark-base/50 px-1.5 py-0.5 rounded text-dark-accent",children:"FACTORY_RESET"})," to confirm."]}),b.jsx("input",{type:"text",value:m,onChange:E=>g(E.target.value),placeholder:"FACTORY_RESET",autoFocus:!0,className:"w-full px-3 py-1.5 text-sm font-mono bg-dark-base border border-dark-border rounded text-dark-text placeholder:text-dark-muted/50 focus:outline-none focus:border-[#F85149]/60 mb-3"}),b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("button",{onClick:x,disabled:c||m!=="FACTORY_RESET",className:"px-4 py-1.5 text-sm font-medium rounded border border-[#F85149]/40 text-[#F85149] bg-[#F85149]/10 hover:bg-[#F85149]/20 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:c?"Resetting...":"Confirm Factory Reset"}),b.jsx("button",{onClick:()=>{h(!1),g("")},disabled:c,className:"px-3 py-1.5 text-sm rounded border border-dark-border text-dark-muted hover:text-dark-text hover:border-dark-muted transition-colors disabled:opacity-50",children:"Cancel"})]})]}):b.jsx("button",{onClick:()=>h(!0),disabled:c,className:"px-4 py-2 text-sm bg-[#F85149]/10 text-[#F85149] border border-[#F85149]/40 rounded hover:bg-[#F85149]/20 disabled:opacity-50",children:"Factory Reset"})]})]}):null}function Lk(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var H0,oR;function Z0e(){if(oR)return H0;oR=1;function e(){this.__data__=[],this.size=0}return H0=e,H0}var G0,lR;function bs(){if(lR)return G0;lR=1;function e(r,n){return r===n||r!==r&&n!==n}return G0=e,G0}var V0,sR;function pm(){if(sR)return V0;sR=1;var e=bs();function r(n,a){for(var i=n.length;i--;)if(e(n[i][0],a))return i;return-1}return V0=r,V0}var K0,uR;function Q0e(){if(uR)return K0;uR=1;var e=pm(),r=Array.prototype,n=r.splice;function a(i){var o=this.__data__,s=e(o,i);if(s<0)return!1;var c=o.length-1;return s==c?o.pop():n.call(o,s,1),--this.size,!0}return K0=a,K0}var Y0,cR;function J0e(){if(cR)return Y0;cR=1;var e=pm();function r(n){var a=this.__data__,i=e(a,n);return i<0?void 0:a[i][1]}return Y0=r,Y0}var X0,fR;function ebe(){if(fR)return X0;fR=1;var e=pm();function r(n){return e(this.__data__,n)>-1}return X0=r,X0}var W0,dR;function tbe(){if(dR)return W0;dR=1;var e=pm();function r(n,a){var i=this.__data__,o=e(i,n);return o<0?(++this.size,i.push([n,a])):i[o][1]=a,this}return W0=r,W0}var Z0,hR;function mm(){if(hR)return Z0;hR=1;var e=Z0e(),r=Q0e(),n=J0e(),a=ebe(),i=tbe();function o(s){var c=-1,f=s==null?0:s.length;for(this.clear();++c<f;){var d=s[c];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=a,o.prototype.set=i,Z0=o,Z0}var Q0,pR;function rbe(){if(pR)return Q0;pR=1;var e=mm();function r(){this.__data__=new e,this.size=0}return Q0=r,Q0}var J0,mR;function nbe(){if(mR)return J0;mR=1;function e(r){var n=this.__data__,a=n.delete(r);return this.size=n.size,a}return J0=e,J0}var eb,vR;function abe(){if(vR)return eb;vR=1;function e(r){return this.__data__.get(r)}return eb=e,eb}var tb,gR;function ibe(){if(gR)return tb;gR=1;function e(r){return this.__data__.has(r)}return tb=e,tb}var rb,yR;function b$(){if(yR)return rb;yR=1;var e=typeof xd=="object"&&xd&&xd.Object===Object&&xd;return rb=e,rb}var nb,bR;function Bn(){if(bR)return nb;bR=1;var e=b$(),r=typeof self=="object"&&self&&self.Object===Object&&self,n=e||r||Function("return this")();return nb=n,nb}var ab,xR;function xs(){if(xR)return ab;xR=1;var e=Bn(),r=e.Symbol;return ab=r,ab}var ib,_R;function obe(){if(_R)return ib;_R=1;var e=xs(),r=Object.prototype,n=r.hasOwnProperty,a=r.toString,i=e?e.toStringTag:void 0;function o(s){var c=n.call(s,i),f=s[i];try{s[i]=void 0;var d=!0}catch{}var h=a.call(s);return d&&(c?s[i]=f:delete s[i]),h}return ib=o,ib}var ob,wR;function lbe(){if(wR)return ob;wR=1;var e=Object.prototype,r=e.toString;function n(a){return r.call(a)}return ob=n,ob}var lb,SR;function Go(){if(SR)return lb;SR=1;var e=xs(),r=obe(),n=lbe(),a="[object Null]",i="[object Undefined]",o=e?e.toStringTag:void 0;function s(c){return c==null?c===void 0?i:a:o&&o in Object(c)?r(c):n(c)}return lb=s,lb}var sb,ER;function Sn(){if(ER)return sb;ER=1;function e(r){var n=typeof r;return r!=null&&(n=="object"||n=="function")}return sb=e,sb}var ub,kR;function Yc(){if(kR)return ub;kR=1;var e=Go(),r=Sn(),n="[object AsyncFunction]",a="[object Function]",i="[object GeneratorFunction]",o="[object Proxy]";function s(c){if(!r(c))return!1;var f=e(c);return f==a||f==i||f==n||f==o}return ub=s,ub}var cb,jR;function sbe(){if(jR)return cb;jR=1;var e=Bn(),r=e["__core-js_shared__"];return cb=r,cb}var fb,AR;function ube(){if(AR)return fb;AR=1;var e=sbe(),r=(function(){var a=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""})();function n(a){return!!r&&r in a}return fb=n,fb}var db,CR;function x$(){if(CR)return db;CR=1;var e=Function.prototype,r=e.toString;function n(a){if(a!=null){try{return r.call(a)}catch{}try{return a+""}catch{}}return""}return db=n,db}var hb,OR;function cbe(){if(OR)return hb;OR=1;var e=Yc(),r=ube(),n=Sn(),a=x$(),i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,s=Function.prototype,c=Object.prototype,f=s.toString,d=c.hasOwnProperty,h=RegExp("^"+f.call(d).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function m(g){if(!n(g)||r(g))return!1;var y=e(g)?h:o;return y.test(a(g))}return hb=m,hb}var pb,TR;function fbe(){if(TR)return pb;TR=1;function e(r,n){return r==null?void 0:r[n]}return pb=e,pb}var mb,NR;function Vo(){if(NR)return mb;NR=1;var e=cbe(),r=fbe();function n(a,i){var o=r(a,i);return e(o)?o:void 0}return mb=n,mb}var vb,MR;function Ik(){if(MR)return vb;MR=1;var e=Vo(),r=Bn(),n=e(r,"Map");return vb=n,vb}var gb,RR;function vm(){if(RR)return gb;RR=1;var e=Vo(),r=e(Object,"create");return gb=r,gb}var yb,PR;function dbe(){if(PR)return yb;PR=1;var e=vm();function r(){this.__data__=e?e(null):{},this.size=0}return yb=r,yb}var bb,DR;function hbe(){if(DR)return bb;DR=1;function e(r){var n=this.has(r)&&delete this.__data__[r];return this.size-=n?1:0,n}return bb=e,bb}var xb,LR;function pbe(){if(LR)return xb;LR=1;var e=vm(),r="__lodash_hash_undefined__",n=Object.prototype,a=n.hasOwnProperty;function i(o){var s=this.__data__;if(e){var c=s[o];return c===r?void 0:c}return a.call(s,o)?s[o]:void 0}return xb=i,xb}var _b,IR;function mbe(){if(IR)return _b;IR=1;var e=vm(),r=Object.prototype,n=r.hasOwnProperty;function a(i){var o=this.__data__;return e?o[i]!==void 0:n.call(o,i)}return _b=a,_b}var wb,zR;function vbe(){if(zR)return wb;zR=1;var e=vm(),r="__lodash_hash_undefined__";function n(a,i){var o=this.__data__;return this.size+=this.has(a)?0:1,o[a]=e&&i===void 0?r:i,this}return wb=n,wb}var Sb,qR;function gbe(){if(qR)return Sb;qR=1;var e=dbe(),r=hbe(),n=pbe(),a=mbe(),i=vbe();function o(s){var c=-1,f=s==null?0:s.length;for(this.clear();++c<f;){var d=s[c];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=a,o.prototype.set=i,Sb=o,Sb}var Eb,BR;function ybe(){if(BR)return Eb;BR=1;var e=gbe(),r=mm(),n=Ik();function a(){this.size=0,this.__data__={hash:new e,map:new(n||r),string:new e}}return Eb=a,Eb}var kb,$R;function bbe(){if($R)return kb;$R=1;function e(r){var n=typeof r;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?r!=="__proto__":r===null}return kb=e,kb}var jb,FR;function gm(){if(FR)return jb;FR=1;var e=bbe();function r(n,a){var i=n.__data__;return e(a)?i[typeof a=="string"?"string":"hash"]:i.map}return jb=r,jb}var Ab,UR;function xbe(){if(UR)return Ab;UR=1;var e=gm();function r(n){var a=e(this,n).delete(n);return this.size-=a?1:0,a}return Ab=r,Ab}var Cb,HR;function _be(){if(HR)return Cb;HR=1;var e=gm();function r(n){return e(this,n).get(n)}return Cb=r,Cb}var Ob,GR;function wbe(){if(GR)return Ob;GR=1;var e=gm();function r(n){return e(this,n).has(n)}return Ob=r,Ob}var Tb,VR;function Sbe(){if(VR)return Tb;VR=1;var e=gm();function r(n,a){var i=e(this,n),o=i.size;return i.set(n,a),this.size+=i.size==o?0:1,this}return Tb=r,Tb}var Nb,KR;function zk(){if(KR)return Nb;KR=1;var e=ybe(),r=xbe(),n=_be(),a=wbe(),i=Sbe();function o(s){var c=-1,f=s==null?0:s.length;for(this.clear();++c<f;){var d=s[c];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=a,o.prototype.set=i,Nb=o,Nb}var Mb,YR;function Ebe(){if(YR)return Mb;YR=1;var e=mm(),r=Ik(),n=zk(),a=200;function i(o,s){var c=this.__data__;if(c instanceof e){var f=c.__data__;if(!r||f.length<a-1)return f.push([o,s]),this.size=++c.size,this;c=this.__data__=new n(f)}return c.set(o,s),this.size=c.size,this}return Mb=i,Mb}var Rb,XR;function ym(){if(XR)return Rb;XR=1;var e=mm(),r=rbe(),n=nbe(),a=abe(),i=ibe(),o=Ebe();function s(c){var f=this.__data__=new e(c);this.size=f.size}return s.prototype.clear=r,s.prototype.delete=n,s.prototype.get=a,s.prototype.has=i,s.prototype.set=o,Rb=s,Rb}var Pb,WR;function qk(){if(WR)return Pb;WR=1;function e(r,n){for(var a=-1,i=r==null?0:r.length;++a<i&&n(r[a],a,r)!==!1;);return r}return Pb=e,Pb}var Db,ZR;function _$(){if(ZR)return Db;ZR=1;var e=Vo(),r=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return Db=r,Db}var Lb,QR;function bm(){if(QR)return Lb;QR=1;var e=_$();function r(n,a,i){a=="__proto__"&&e?e(n,a,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[a]=i}return Lb=r,Lb}var Ib,JR;function xm(){if(JR)return Ib;JR=1;var e=bm(),r=bs(),n=Object.prototype,a=n.hasOwnProperty;function i(o,s,c){var f=o[s];(!(a.call(o,s)&&r(f,c))||c===void 0&&!(s in o))&&e(o,s,c)}return Ib=i,Ib}var zb,eP;function Xc(){if(eP)return zb;eP=1;var e=xm(),r=bm();function n(a,i,o,s){var c=!o;o||(o={});for(var f=-1,d=i.length;++f<d;){var h=i[f],m=s?s(o[h],a[h],h,o,a):void 0;m===void 0&&(m=a[h]),c?r(o,h,m):e(o,h,m)}return o}return zb=n,zb}var qb,tP;function kbe(){if(tP)return qb;tP=1;function e(r,n){for(var a=-1,i=Array(r);++a<r;)i[a]=n(a);return i}return qb=e,qb}var Bb,rP;function pa(){if(rP)return Bb;rP=1;function e(r){return r!=null&&typeof r=="object"}return Bb=e,Bb}var $b,nP;function jbe(){if(nP)return $b;nP=1;var e=Go(),r=pa(),n="[object Arguments]";function a(i){return r(i)&&e(i)==n}return $b=a,$b}var Fb,aP;function Wc(){if(aP)return Fb;aP=1;var e=jbe(),r=pa(),n=Object.prototype,a=n.hasOwnProperty,i=n.propertyIsEnumerable,o=e((function(){return arguments})())?e:function(s){return r(s)&&a.call(s,"callee")&&!i.call(s,"callee")};return Fb=o,Fb}var Ub,iP;function Nt(){if(iP)return Ub;iP=1;var e=Array.isArray;return Ub=e,Ub}var Ku={exports:{}},Hb,oP;function Abe(){if(oP)return Hb;oP=1;function e(){return!1}return Hb=e,Hb}Ku.exports;var lP;function _s(){return lP||(lP=1,(function(e,r){var n=Bn(),a=Abe(),i=r&&!r.nodeType&&r,o=i&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===i,c=s?n.Buffer:void 0,f=c?c.isBuffer:void 0,d=f||a;e.exports=d})(Ku,Ku.exports)),Ku.exports}var Gb,sP;function _m(){if(sP)return Gb;sP=1;var e=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function n(a,i){var o=typeof a;return i=i??e,!!i&&(o=="number"||o!="symbol"&&r.test(a))&&a>-1&&a%1==0&&a<i}return Gb=n,Gb}var Vb,uP;function Bk(){if(uP)return Vb;uP=1;var e=9007199254740991;function r(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return Vb=r,Vb}var Kb,cP;function Cbe(){if(cP)return Kb;cP=1;var e=Go(),r=Bk(),n=pa(),a="[object Arguments]",i="[object Array]",o="[object Boolean]",s="[object Date]",c="[object Error]",f="[object Function]",d="[object Map]",h="[object Number]",m="[object Object]",g="[object RegExp]",y="[object Set]",x="[object String]",E="[object WeakMap]",_="[object ArrayBuffer]",w="[object DataView]",A="[object Float32Array]",C="[object Float64Array]",O="[object Int8Array]",T="[object Int16Array]",N="[object Int32Array]",M="[object Uint8Array]",P="[object Uint8ClampedArray]",L="[object Uint16Array]",D="[object Uint32Array]",q={};q[A]=q[C]=q[O]=q[T]=q[N]=q[M]=q[P]=q[L]=q[D]=!0,q[a]=q[i]=q[_]=q[o]=q[w]=q[s]=q[c]=q[f]=q[d]=q[h]=q[m]=q[g]=q[y]=q[x]=q[E]=!1;function z(U){return n(U)&&r(U.length)&&!!q[e(U)]}return Kb=z,Kb}var Yb,fP;function wm(){if(fP)return Yb;fP=1;function e(r){return function(n){return r(n)}}return Yb=e,Yb}var Yu={exports:{}};Yu.exports;var dP;function $k(){return dP||(dP=1,(function(e,r){var n=b$(),a=r&&!r.nodeType&&r,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,s=o&&n.process,c=(function(){try{var f=i&&i.require&&i.require("util").types;return f||s&&s.binding&&s.binding("util")}catch{}})();e.exports=c})(Yu,Yu.exports)),Yu.exports}var Xb,hP;function Zc(){if(hP)return Xb;hP=1;var e=Cbe(),r=wm(),n=$k(),a=n&&n.isTypedArray,i=a?r(a):e;return Xb=i,Xb}var Wb,pP;function w$(){if(pP)return Wb;pP=1;var e=kbe(),r=Wc(),n=Nt(),a=_s(),i=_m(),o=Zc(),s=Object.prototype,c=s.hasOwnProperty;function f(d,h){var m=n(d),g=!m&&r(d),y=!m&&!g&&a(d),x=!m&&!g&&!y&&o(d),E=m||g||y||x,_=E?e(d.length,String):[],w=_.length;for(var A in d)(h||c.call(d,A))&&!(E&&(A=="length"||y&&(A=="offset"||A=="parent")||x&&(A=="buffer"||A=="byteLength"||A=="byteOffset")||i(A,w)))&&_.push(A);return _}return Wb=f,Wb}var Zb,mP;function Sm(){if(mP)return Zb;mP=1;var e=Object.prototype;function r(n){var a=n&&n.constructor,i=typeof a=="function"&&a.prototype||e;return n===i}return Zb=r,Zb}var Qb,vP;function S$(){if(vP)return Qb;vP=1;function e(r,n){return function(a){return r(n(a))}}return Qb=e,Qb}var Jb,gP;function Obe(){if(gP)return Jb;gP=1;var e=S$(),r=e(Object.keys,Object);return Jb=r,Jb}var e1,yP;function Fk(){if(yP)return e1;yP=1;var e=Sm(),r=Obe(),n=Object.prototype,a=n.hasOwnProperty;function i(o){if(!e(o))return r(o);var s=[];for(var c in Object(o))a.call(o,c)&&c!="constructor"&&s.push(c);return s}return e1=i,e1}var t1,bP;function li(){if(bP)return t1;bP=1;var e=Yc(),r=Bk();function n(a){return a!=null&&r(a.length)&&!e(a)}return t1=n,t1}var r1,xP;function Xi(){if(xP)return r1;xP=1;var e=w$(),r=Fk(),n=li();function a(i){return n(i)?e(i):r(i)}return r1=a,r1}var n1,_P;function Tbe(){if(_P)return n1;_P=1;var e=Xc(),r=Xi();function n(a,i){return a&&e(i,r(i),a)}return n1=n,n1}var a1,wP;function Nbe(){if(wP)return a1;wP=1;function e(r){var n=[];if(r!=null)for(var a in Object(r))n.push(a);return n}return a1=e,a1}var i1,SP;function Mbe(){if(SP)return i1;SP=1;var e=Sn(),r=Sm(),n=Nbe(),a=Object.prototype,i=a.hasOwnProperty;function o(s){if(!e(s))return n(s);var c=r(s),f=[];for(var d in s)d=="constructor"&&(c||!i.call(s,d))||f.push(d);return f}return i1=o,i1}var o1,EP;function Ko(){if(EP)return o1;EP=1;var e=w$(),r=Mbe(),n=li();function a(i){return n(i)?e(i,!0):r(i)}return o1=a,o1}var l1,kP;function Rbe(){if(kP)return l1;kP=1;var e=Xc(),r=Ko();function n(a,i){return a&&e(i,r(i),a)}return l1=n,l1}var Xu={exports:{}};Xu.exports;var jP;function E$(){return jP||(jP=1,(function(e,r){var n=Bn(),a=r&&!r.nodeType&&r,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,s=o?n.Buffer:void 0,c=s?s.allocUnsafe:void 0;function f(d,h){if(h)return d.slice();var m=d.length,g=c?c(m):new d.constructor(m);return d.copy(g),g}e.exports=f})(Xu,Xu.exports)),Xu.exports}var s1,AP;function k$(){if(AP)return s1;AP=1;function e(r,n){var a=-1,i=r.length;for(n||(n=Array(i));++a<i;)n[a]=r[a];return n}return s1=e,s1}var u1,CP;function j$(){if(CP)return u1;CP=1;function e(r,n){for(var a=-1,i=r==null?0:r.length,o=0,s=[];++a<i;){var c=r[a];n(c,a,r)&&(s[o++]=c)}return s}return u1=e,u1}var c1,OP;function A$(){if(OP)return c1;OP=1;function e(){return[]}return c1=e,c1}var f1,TP;function Uk(){if(TP)return f1;TP=1;var e=j$(),r=A$(),n=Object.prototype,a=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,o=i?function(s){return s==null?[]:(s=Object(s),e(i(s),function(c){return a.call(s,c)}))}:r;return f1=o,f1}var d1,NP;function Pbe(){if(NP)return d1;NP=1;var e=Xc(),r=Uk();function n(a,i){return e(a,r(a),i)}return d1=n,d1}var h1,MP;function Hk(){if(MP)return h1;MP=1;function e(r,n){for(var a=-1,i=n.length,o=r.length;++a<i;)r[o+a]=n[a];return r}return h1=e,h1}var p1,RP;function Em(){if(RP)return p1;RP=1;var e=S$(),r=e(Object.getPrototypeOf,Object);return p1=r,p1}var m1,PP;function C$(){if(PP)return m1;PP=1;var e=Hk(),r=Em(),n=Uk(),a=A$(),i=Object.getOwnPropertySymbols,o=i?function(s){for(var c=[];s;)e(c,n(s)),s=r(s);return c}:a;return m1=o,m1}var v1,DP;function Dbe(){if(DP)return v1;DP=1;var e=Xc(),r=C$();function n(a,i){return e(a,r(a),i)}return v1=n,v1}var g1,LP;function O$(){if(LP)return g1;LP=1;var e=Hk(),r=Nt();function n(a,i,o){var s=i(a);return r(a)?s:e(s,o(a))}return g1=n,g1}var y1,IP;function T$(){if(IP)return y1;IP=1;var e=O$(),r=Uk(),n=Xi();function a(i){return e(i,n,r)}return y1=a,y1}var b1,zP;function Lbe(){if(zP)return b1;zP=1;var e=O$(),r=C$(),n=Ko();function a(i){return e(i,n,r)}return b1=a,b1}var x1,qP;function Ibe(){if(qP)return x1;qP=1;var e=Vo(),r=Bn(),n=e(r,"DataView");return x1=n,x1}var _1,BP;function zbe(){if(BP)return _1;BP=1;var e=Vo(),r=Bn(),n=e(r,"Promise");return _1=n,_1}var w1,$P;function N$(){if($P)return w1;$P=1;var e=Vo(),r=Bn(),n=e(r,"Set");return w1=n,w1}var S1,FP;function qbe(){if(FP)return S1;FP=1;var e=Vo(),r=Bn(),n=e(r,"WeakMap");return S1=n,S1}var E1,UP;function ws(){if(UP)return E1;UP=1;var e=Ibe(),r=Ik(),n=zbe(),a=N$(),i=qbe(),o=Go(),s=x$(),c="[object Map]",f="[object Object]",d="[object Promise]",h="[object Set]",m="[object WeakMap]",g="[object DataView]",y=s(e),x=s(r),E=s(n),_=s(a),w=s(i),A=o;return(e&&A(new e(new ArrayBuffer(1)))!=g||r&&A(new r)!=c||n&&A(n.resolve())!=d||a&&A(new a)!=h||i&&A(new i)!=m)&&(A=function(C){var O=o(C),T=O==f?C.constructor:void 0,N=T?s(T):"";if(N)switch(N){case y:return g;case x:return c;case E:return d;case _:return h;case w:return m}return O}),E1=A,E1}var k1,HP;function Bbe(){if(HP)return k1;HP=1;var e=Object.prototype,r=e.hasOwnProperty;function n(a){var i=a.length,o=new a.constructor(i);return i&&typeof a[0]=="string"&&r.call(a,"index")&&(o.index=a.index,o.input=a.input),o}return k1=n,k1}var j1,GP;function M$(){if(GP)return j1;GP=1;var e=Bn(),r=e.Uint8Array;return j1=r,j1}var A1,VP;function Gk(){if(VP)return A1;VP=1;var e=M$();function r(n){var a=new n.constructor(n.byteLength);return new e(a).set(new e(n)),a}return A1=r,A1}var C1,KP;function $be(){if(KP)return C1;KP=1;var e=Gk();function r(n,a){var i=a?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.byteLength)}return C1=r,C1}var O1,YP;function Fbe(){if(YP)return O1;YP=1;var e=/\w*$/;function r(n){var a=new n.constructor(n.source,e.exec(n));return a.lastIndex=n.lastIndex,a}return O1=r,O1}var T1,XP;function Ube(){if(XP)return T1;XP=1;var e=xs(),r=e?e.prototype:void 0,n=r?r.valueOf:void 0;function a(i){return n?Object(n.call(i)):{}}return T1=a,T1}var N1,WP;function R$(){if(WP)return N1;WP=1;var e=Gk();function r(n,a){var i=a?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.length)}return N1=r,N1}var M1,ZP;function Hbe(){if(ZP)return M1;ZP=1;var e=Gk(),r=$be(),n=Fbe(),a=Ube(),i=R$(),o="[object Boolean]",s="[object Date]",c="[object Map]",f="[object Number]",d="[object RegExp]",h="[object Set]",m="[object String]",g="[object Symbol]",y="[object ArrayBuffer]",x="[object DataView]",E="[object Float32Array]",_="[object Float64Array]",w="[object Int8Array]",A="[object Int16Array]",C="[object Int32Array]",O="[object Uint8Array]",T="[object Uint8ClampedArray]",N="[object Uint16Array]",M="[object Uint32Array]";function P(L,D,q){var z=L.constructor;switch(D){case y:return e(L);case o:case s:return new z(+L);case x:return r(L,q);case E:case _:case w:case A:case C:case O:case T:case N:case M:return i(L,q);case c:return new z;case f:case m:return new z(L);case d:return n(L);case h:return new z;case g:return a(L)}}return M1=P,M1}var R1,QP;function P$(){if(QP)return R1;QP=1;var e=Sn(),r=Object.create,n=(function(){function a(){}return function(i){if(!e(i))return{};if(r)return r(i);a.prototype=i;var o=new a;return a.prototype=void 0,o}})();return R1=n,R1}var P1,JP;function D$(){if(JP)return P1;JP=1;var e=P$(),r=Em(),n=Sm();function a(i){return typeof i.constructor=="function"&&!n(i)?e(r(i)):{}}return P1=a,P1}var D1,eD;function Gbe(){if(eD)return D1;eD=1;var e=ws(),r=pa(),n="[object Map]";function a(i){return r(i)&&e(i)==n}return D1=a,D1}var L1,tD;function Vbe(){if(tD)return L1;tD=1;var e=Gbe(),r=wm(),n=$k(),a=n&&n.isMap,i=a?r(a):e;return L1=i,L1}var I1,rD;function Kbe(){if(rD)return I1;rD=1;var e=ws(),r=pa(),n="[object Set]";function a(i){return r(i)&&e(i)==n}return I1=a,I1}var z1,nD;function Ybe(){if(nD)return z1;nD=1;var e=Kbe(),r=wm(),n=$k(),a=n&&n.isSet,i=a?r(a):e;return z1=i,z1}var q1,aD;function L$(){if(aD)return q1;aD=1;var e=ym(),r=qk(),n=xm(),a=Tbe(),i=Rbe(),o=E$(),s=k$(),c=Pbe(),f=Dbe(),d=T$(),h=Lbe(),m=ws(),g=Bbe(),y=Hbe(),x=D$(),E=Nt(),_=_s(),w=Vbe(),A=Sn(),C=Ybe(),O=Xi(),T=Ko(),N=1,M=2,P=4,L="[object Arguments]",D="[object Array]",q="[object Boolean]",z="[object Date]",U="[object Error]",$="[object Function]",Y="[object GeneratorFunction]",B="[object Map]",Z="[object Number]",ae="[object Object]",V="[object RegExp]",fe="[object Set]",F="[object String]",X="[object Symbol]",ce="[object WeakMap]",G="[object ArrayBuffer]",H="[object DataView]",te="[object Float32Array]",W="[object Float64Array]",xe="[object Int8Array]",ee="[object Int16Array]",le="[object Int32Array]",be="[object Uint8Array]",he="[object Uint8ClampedArray]",Se="[object Uint16Array]",se="[object Uint32Array]",ne={};ne[L]=ne[D]=ne[G]=ne[H]=ne[q]=ne[z]=ne[te]=ne[W]=ne[xe]=ne[ee]=ne[le]=ne[B]=ne[Z]=ne[ae]=ne[V]=ne[fe]=ne[F]=ne[X]=ne[be]=ne[he]=ne[Se]=ne[se]=!0,ne[U]=ne[$]=ne[ce]=!1;function ge(_e,vt,zt,ma,_t,Wr){var ir,qt=vt&N,Xo=vt&M,Jc=vt&P;if(zt&&(ir=_t?zt(_e,ma,_t,Wr):zt(_e)),ir!==void 0)return ir;if(!A(_e))return _e;var Es=E(_e);if(Es){if(ir=g(_e),!qt)return s(_e,ir)}else{var kn=m(_e),ef=kn==$||kn==Y;if(_(_e))return o(_e,qt);if(kn==ae||kn==L||ef&&!_t){if(ir=Xo||ef?{}:x(_e),!qt)return Xo?f(_e,i(ir,_e)):c(_e,a(ir,_e))}else{if(!ne[kn])return _t?_e:{};ir=y(_e,kn,qt)}}Wr||(Wr=new e);var ks=Wr.get(_e);if(ks)return ks;Wr.set(_e,ir),C(_e)?_e.forEach(function(wr){ir.add(ge(wr,vt,zt,wr,_e,Wr))}):w(_e)&&_e.forEach(function(wr,wt){ir.set(wt,ge(wr,vt,zt,wt,_e,Wr))});var Nm=Jc?Xo?h:d:Xo?T:O,tf=Es?void 0:Nm(_e);return r(tf||_e,function(wr,wt){tf&&(wt=wr,wr=_e[wt]),n(ir,wt,ge(wr,vt,zt,wt,_e,Wr))}),ir}return q1=ge,q1}var B1,iD;function Xbe(){if(iD)return B1;iD=1;var e=L$(),r=4;function n(a){return e(a,r)}return B1=n,B1}var $1,oD;function Vk(){if(oD)return $1;oD=1;function e(r){return function(){return r}}return $1=e,$1}var F1,lD;function Wbe(){if(lD)return F1;lD=1;function e(r){return function(n,a,i){for(var o=-1,s=Object(n),c=i(n),f=c.length;f--;){var d=c[r?f:++o];if(a(s[d],d,s)===!1)break}return n}}return F1=e,F1}var U1,sD;function Kk(){if(sD)return U1;sD=1;var e=Wbe(),r=e();return U1=r,U1}var H1,uD;function Yk(){if(uD)return H1;uD=1;var e=Kk(),r=Xi();function n(a,i){return a&&e(a,i,r)}return H1=n,H1}var G1,cD;function Zbe(){if(cD)return G1;cD=1;var e=li();function r(n,a){return function(i,o){if(i==null)return i;if(!e(i))return n(i,o);for(var s=i.length,c=a?s:-1,f=Object(i);(a?c--:++c<s)&&o(f[c],c,f)!==!1;);return i}}return G1=r,G1}var V1,fD;function km(){if(fD)return V1;fD=1;var e=Yk(),r=Zbe(),n=r(e);return V1=n,V1}var K1,dD;function Yo(){if(dD)return K1;dD=1;function e(r){return r}return K1=e,K1}var Y1,hD;function I$(){if(hD)return Y1;hD=1;var e=Yo();function r(n){return typeof n=="function"?n:e}return Y1=r,Y1}var X1,pD;function z$(){if(pD)return X1;pD=1;var e=qk(),r=km(),n=I$(),a=Nt();function i(o,s){var c=a(o)?e:r;return c(o,n(s))}return X1=i,X1}var W1,mD;function q$(){return mD||(mD=1,W1=z$()),W1}var Z1,vD;function Qbe(){if(vD)return Z1;vD=1;var e=km();function r(n,a){var i=[];return e(n,function(o,s,c){a(o,s,c)&&i.push(o)}),i}return Z1=r,Z1}var Q1,gD;function Jbe(){if(gD)return Q1;gD=1;var e="__lodash_hash_undefined__";function r(n){return this.__data__.set(n,e),this}return Q1=r,Q1}var J1,yD;function e1e(){if(yD)return J1;yD=1;function e(r){return this.__data__.has(r)}return J1=e,J1}var ex,bD;function B$(){if(bD)return ex;bD=1;var e=zk(),r=Jbe(),n=e1e();function a(i){var o=-1,s=i==null?0:i.length;for(this.__data__=new e;++o<s;)this.add(i[o])}return a.prototype.add=a.prototype.push=r,a.prototype.has=n,ex=a,ex}var tx,xD;function t1e(){if(xD)return tx;xD=1;function e(r,n){for(var a=-1,i=r==null?0:r.length;++a<i;)if(n(r[a],a,r))return!0;return!1}return tx=e,tx}var rx,_D;function $$(){if(_D)return rx;_D=1;function e(r,n){return r.has(n)}return rx=e,rx}var nx,wD;function F$(){if(wD)return nx;wD=1;var e=B$(),r=t1e(),n=$$(),a=1,i=2;function o(s,c,f,d,h,m){var g=f&a,y=s.length,x=c.length;if(y!=x&&!(g&&x>y))return!1;var E=m.get(s),_=m.get(c);if(E&&_)return E==c&&_==s;var w=-1,A=!0,C=f&i?new e:void 0;for(m.set(s,c),m.set(c,s);++w<y;){var O=s[w],T=c[w];if(d)var N=g?d(T,O,w,c,s,m):d(O,T,w,s,c,m);if(N!==void 0){if(N)continue;A=!1;break}if(C){if(!r(c,function(M,P){if(!n(C,P)&&(O===M||h(O,M,f,d,m)))return C.push(P)})){A=!1;break}}else if(!(O===T||h(O,T,f,d,m))){A=!1;break}}return m.delete(s),m.delete(c),A}return nx=o,nx}var ax,SD;function r1e(){if(SD)return ax;SD=1;function e(r){var n=-1,a=Array(r.size);return r.forEach(function(i,o){a[++n]=[o,i]}),a}return ax=e,ax}var ix,ED;function Xk(){if(ED)return ix;ED=1;function e(r){var n=-1,a=Array(r.size);return r.forEach(function(i){a[++n]=i}),a}return ix=e,ix}var ox,kD;function n1e(){if(kD)return ox;kD=1;var e=xs(),r=M$(),n=bs(),a=F$(),i=r1e(),o=Xk(),s=1,c=2,f="[object Boolean]",d="[object Date]",h="[object Error]",m="[object Map]",g="[object Number]",y="[object RegExp]",x="[object Set]",E="[object String]",_="[object Symbol]",w="[object ArrayBuffer]",A="[object DataView]",C=e?e.prototype:void 0,O=C?C.valueOf:void 0;function T(N,M,P,L,D,q,z){switch(P){case A:if(N.byteLength!=M.byteLength||N.byteOffset!=M.byteOffset)return!1;N=N.buffer,M=M.buffer;case w:return!(N.byteLength!=M.byteLength||!q(new r(N),new r(M)));case f:case d:case g:return n(+N,+M);case h:return N.name==M.name&&N.message==M.message;case y:case E:return N==M+"";case m:var U=i;case x:var $=L&s;if(U||(U=o),N.size!=M.size&&!$)return!1;var Y=z.get(N);if(Y)return Y==M;L|=c,z.set(N,M);var B=a(U(N),U(M),L,D,q,z);return z.delete(N),B;case _:if(O)return O.call(N)==O.call(M)}return!1}return ox=T,ox}var lx,jD;function a1e(){if(jD)return lx;jD=1;var e=T$(),r=1,n=Object.prototype,a=n.hasOwnProperty;function i(o,s,c,f,d,h){var m=c&r,g=e(o),y=g.length,x=e(s),E=x.length;if(y!=E&&!m)return!1;for(var _=y;_--;){var w=g[_];if(!(m?w in s:a.call(s,w)))return!1}var A=h.get(o),C=h.get(s);if(A&&C)return A==s&&C==o;var O=!0;h.set(o,s),h.set(s,o);for(var T=m;++_<y;){w=g[_];var N=o[w],M=s[w];if(f)var P=m?f(M,N,w,s,o,h):f(N,M,w,o,s,h);if(!(P===void 0?N===M||d(N,M,c,f,h):P)){O=!1;break}T||(T=w=="constructor")}if(O&&!T){var L=o.constructor,D=s.constructor;L!=D&&"constructor"in o&&"constructor"in s&&!(typeof L=="function"&&L instanceof L&&typeof D=="function"&&D instanceof D)&&(O=!1)}return h.delete(o),h.delete(s),O}return lx=i,lx}var sx,AD;function i1e(){if(AD)return sx;AD=1;var e=ym(),r=F$(),n=n1e(),a=a1e(),i=ws(),o=Nt(),s=_s(),c=Zc(),f=1,d="[object Arguments]",h="[object Array]",m="[object Object]",g=Object.prototype,y=g.hasOwnProperty;function x(E,_,w,A,C,O){var T=o(E),N=o(_),M=T?h:i(E),P=N?h:i(_);M=M==d?m:M,P=P==d?m:P;var L=M==m,D=P==m,q=M==P;if(q&&s(E)){if(!s(_))return!1;T=!0,L=!1}if(q&&!L)return O||(O=new e),T||c(E)?r(E,_,w,A,C,O):n(E,_,M,w,A,C,O);if(!(w&f)){var z=L&&y.call(E,"__wrapped__"),U=D&&y.call(_,"__wrapped__");if(z||U){var $=z?E.value():E,Y=U?_.value():_;return O||(O=new e),C($,Y,w,A,O)}}return q?(O||(O=new e),a(E,_,w,A,C,O)):!1}return sx=x,sx}var ux,CD;function U$(){if(CD)return ux;CD=1;var e=i1e(),r=pa();function n(a,i,o,s,c){return a===i?!0:a==null||i==null||!r(a)&&!r(i)?a!==a&&i!==i:e(a,i,o,s,n,c)}return ux=n,ux}var cx,OD;function o1e(){if(OD)return cx;OD=1;var e=ym(),r=U$(),n=1,a=2;function i(o,s,c,f){var d=c.length,h=d,m=!f;if(o==null)return!h;for(o=Object(o);d--;){var g=c[d];if(m&&g[2]?g[1]!==o[g[0]]:!(g[0]in o))return!1}for(;++d<h;){g=c[d];var y=g[0],x=o[y],E=g[1];if(m&&g[2]){if(x===void 0&&!(y in o))return!1}else{var _=new e;if(f)var w=f(x,E,y,o,s,_);if(!(w===void 0?r(E,x,n|a,f,_):w))return!1}}return!0}return cx=i,cx}var fx,TD;function H$(){if(TD)return fx;TD=1;var e=Sn();function r(n){return n===n&&!e(n)}return fx=r,fx}var dx,ND;function l1e(){if(ND)return dx;ND=1;var e=H$(),r=Xi();function n(a){for(var i=r(a),o=i.length;o--;){var s=i[o],c=a[s];i[o]=[s,c,e(c)]}return i}return dx=n,dx}var hx,MD;function G$(){if(MD)return hx;MD=1;function e(r,n){return function(a){return a==null?!1:a[r]===n&&(n!==void 0||r in Object(a))}}return hx=e,hx}var px,RD;function s1e(){if(RD)return px;RD=1;var e=o1e(),r=l1e(),n=G$();function a(i){var o=r(i);return o.length==1&&o[0][2]?n(o[0][0],o[0][1]):function(s){return s===i||e(s,i,o)}}return px=a,px}var mx,PD;function Ss(){if(PD)return mx;PD=1;var e=Go(),r=pa(),n="[object Symbol]";function a(i){return typeof i=="symbol"||r(i)&&e(i)==n}return mx=a,mx}var vx,DD;function Wk(){if(DD)return vx;DD=1;var e=Nt(),r=Ss(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function i(o,s){if(e(o))return!1;var c=typeof o;return c=="number"||c=="symbol"||c=="boolean"||o==null||r(o)?!0:a.test(o)||!n.test(o)||s!=null&&o in Object(s)}return vx=i,vx}var gx,LD;function u1e(){if(LD)return gx;LD=1;var e=zk(),r="Expected a function";function n(a,i){if(typeof a!="function"||i!=null&&typeof i!="function")throw new TypeError(r);var o=function(){var s=arguments,c=i?i.apply(this,s):s[0],f=o.cache;if(f.has(c))return f.get(c);var d=a.apply(this,s);return o.cache=f.set(c,d)||f,d};return o.cache=new(n.Cache||e),o}return n.Cache=e,gx=n,gx}var yx,ID;function c1e(){if(ID)return yx;ID=1;var e=u1e(),r=500;function n(a){var i=e(a,function(s){return o.size===r&&o.clear(),s}),o=i.cache;return i}return yx=n,yx}var bx,zD;function f1e(){if(zD)return bx;zD=1;var e=c1e(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,a=e(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(r,function(s,c,f,d){o.push(f?d.replace(n,"$1"):c||s)}),o});return bx=a,bx}var xx,qD;function jm(){if(qD)return xx;qD=1;function e(r,n){for(var a=-1,i=r==null?0:r.length,o=Array(i);++a<i;)o[a]=n(r[a],a,r);return o}return xx=e,xx}var _x,BD;function d1e(){if(BD)return _x;BD=1;var e=xs(),r=jm(),n=Nt(),a=Ss(),i=e?e.prototype:void 0,o=i?i.toString:void 0;function s(c){if(typeof c=="string")return c;if(n(c))return r(c,s)+"";if(a(c))return o?o.call(c):"";var f=c+"";return f=="0"&&1/c==-1/0?"-0":f}return _x=s,_x}var wx,$D;function V$(){if($D)return wx;$D=1;var e=d1e();function r(n){return n==null?"":e(n)}return wx=r,wx}var Sx,FD;function Am(){if(FD)return Sx;FD=1;var e=Nt(),r=Wk(),n=f1e(),a=V$();function i(o,s){return e(o)?o:r(o,s)?[o]:n(a(o))}return Sx=i,Sx}var Ex,UD;function Qc(){if(UD)return Ex;UD=1;var e=Ss();function r(n){if(typeof n=="string"||e(n))return n;var a=n+"";return a=="0"&&1/n==-1/0?"-0":a}return Ex=r,Ex}var kx,HD;function Cm(){if(HD)return kx;HD=1;var e=Am(),r=Qc();function n(a,i){i=e(i,a);for(var o=0,s=i.length;a!=null&&o<s;)a=a[r(i[o++])];return o&&o==s?a:void 0}return kx=n,kx}var jx,GD;function h1e(){if(GD)return jx;GD=1;var e=Cm();function r(n,a,i){var o=n==null?void 0:e(n,a);return o===void 0?i:o}return jx=r,jx}var Ax,VD;function p1e(){if(VD)return Ax;VD=1;function e(r,n){return r!=null&&n in Object(r)}return Ax=e,Ax}var Cx,KD;function K$(){if(KD)return Cx;KD=1;var e=Am(),r=Wc(),n=Nt(),a=_m(),i=Bk(),o=Qc();function s(c,f,d){f=e(f,c);for(var h=-1,m=f.length,g=!1;++h<m;){var y=o(f[h]);if(!(g=c!=null&&d(c,y)))break;c=c[y]}return g||++h!=m?g:(m=c==null?0:c.length,!!m&&i(m)&&a(y,m)&&(n(c)||r(c)))}return Cx=s,Cx}var Ox,YD;function Y$(){if(YD)return Ox;YD=1;var e=p1e(),r=K$();function n(a,i){return a!=null&&r(a,i,e)}return Ox=n,Ox}var Tx,XD;function m1e(){if(XD)return Tx;XD=1;var e=U$(),r=h1e(),n=Y$(),a=Wk(),i=H$(),o=G$(),s=Qc(),c=1,f=2;function d(h,m){return a(h)&&i(m)?o(s(h),m):function(g){var y=r(g,h);return y===void 0&&y===m?n(g,h):e(m,y,c|f)}}return Tx=d,Tx}var Nx,WD;function X$(){if(WD)return Nx;WD=1;function e(r){return function(n){return n==null?void 0:n[r]}}return Nx=e,Nx}var Mx,ZD;function v1e(){if(ZD)return Mx;ZD=1;var e=Cm();function r(n){return function(a){return e(a,n)}}return Mx=r,Mx}var Rx,QD;function g1e(){if(QD)return Rx;QD=1;var e=X$(),r=v1e(),n=Wk(),a=Qc();function i(o){return n(o)?e(a(o)):r(o)}return Rx=i,Rx}var Px,JD;function si(){if(JD)return Px;JD=1;var e=s1e(),r=m1e(),n=Yo(),a=Nt(),i=g1e();function o(s){return typeof s=="function"?s:s==null?n:typeof s=="object"?a(s)?r(s[0],s[1]):e(s):i(s)}return Px=o,Px}var Dx,e8;function W$(){if(e8)return Dx;e8=1;var e=j$(),r=Qbe(),n=si(),a=Nt();function i(o,s){var c=a(o)?e:r;return c(o,n(s,3))}return Dx=i,Dx}var Lx,t8;function y1e(){if(t8)return Lx;t8=1;var e=Object.prototype,r=e.hasOwnProperty;function n(a,i){return a!=null&&r.call(a,i)}return Lx=n,Lx}var Ix,r8;function Z$(){if(r8)return Ix;r8=1;var e=y1e(),r=K$();function n(a,i){return a!=null&&r(a,i,e)}return Ix=n,Ix}var zx,n8;function b1e(){if(n8)return zx;n8=1;var e=Fk(),r=ws(),n=Wc(),a=Nt(),i=li(),o=_s(),s=Sm(),c=Zc(),f="[object Map]",d="[object Set]",h=Object.prototype,m=h.hasOwnProperty;function g(y){if(y==null)return!0;if(i(y)&&(a(y)||typeof y=="string"||typeof y.splice=="function"||o(y)||c(y)||n(y)))return!y.length;var x=r(y);if(x==f||x==d)return!y.size;if(s(y))return!e(y).length;for(var E in y)if(m.call(y,E))return!1;return!0}return zx=g,zx}var qx,a8;function Q$(){if(a8)return qx;a8=1;function e(r){return r===void 0}return qx=e,qx}var Bx,i8;function J$(){if(i8)return Bx;i8=1;var e=km(),r=li();function n(a,i){var o=-1,s=r(a)?Array(a.length):[];return e(a,function(c,f,d){s[++o]=i(c,f,d)}),s}return Bx=n,Bx}var $x,o8;function eF(){if(o8)return $x;o8=1;var e=jm(),r=si(),n=J$(),a=Nt();function i(o,s){var c=a(o)?e:n;return c(o,r(s,3))}return $x=i,$x}var Fx,l8;function x1e(){if(l8)return Fx;l8=1;function e(r,n,a,i){var o=-1,s=r==null?0:r.length;for(i&&s&&(a=r[++o]);++o<s;)a=n(a,r[o],o,r);return a}return Fx=e,Fx}var Ux,s8;function _1e(){if(s8)return Ux;s8=1;function e(r,n,a,i,o){return o(r,function(s,c,f){a=i?(i=!1,s):n(a,s,c,f)}),a}return Ux=e,Ux}var Hx,u8;function tF(){if(u8)return Hx;u8=1;var e=x1e(),r=km(),n=si(),a=_1e(),i=Nt();function o(s,c,f){var d=i(s)?e:a,h=arguments.length<3;return d(s,n(c,4),f,h,r)}return Hx=o,Hx}var Gx,c8;function w1e(){if(c8)return Gx;c8=1;var e=Go(),r=Nt(),n=pa(),a="[object String]";function i(o){return typeof o=="string"||!r(o)&&n(o)&&e(o)==a}return Gx=i,Gx}var Vx,f8;function S1e(){if(f8)return Vx;f8=1;var e=X$(),r=e("length");return Vx=r,Vx}var Kx,d8;function E1e(){if(d8)return Kx;d8=1;var e="\\ud800-\\udfff",r="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",a="\\u20d0-\\u20ff",i=r+n+a,o="\\ufe0e\\ufe0f",s="\\u200d",c=RegExp("["+s+e+i+o+"]");function f(d){return c.test(d)}return Kx=f,Kx}var Yx,h8;function k1e(){if(h8)return Yx;h8=1;var e="\\ud800-\\udfff",r="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",a="\\u20d0-\\u20ff",i=r+n+a,o="\\ufe0e\\ufe0f",s="["+e+"]",c="["+i+"]",f="\\ud83c[\\udffb-\\udfff]",d="(?:"+c+"|"+f+")",h="[^"+e+"]",m="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",y="\\u200d",x=d+"?",E="["+o+"]?",_="(?:"+y+"(?:"+[h,m,g].join("|")+")"+E+x+")*",w=E+x+_,A="(?:"+[h+c+"?",c,m,g,s].join("|")+")",C=RegExp(f+"(?="+f+")|"+A+w,"g");function O(T){for(var N=C.lastIndex=0;C.test(T);)++N;return N}return Yx=O,Yx}var Xx,p8;function j1e(){if(p8)return Xx;p8=1;var e=S1e(),r=E1e(),n=k1e();function a(i){return r(i)?n(i):e(i)}return Xx=a,Xx}var Wx,m8;function A1e(){if(m8)return Wx;m8=1;var e=Fk(),r=ws(),n=li(),a=w1e(),i=j1e(),o="[object Map]",s="[object Set]";function c(f){if(f==null)return 0;if(n(f))return a(f)?i(f):f.length;var d=r(f);return d==o||d==s?f.size:e(f).length}return Wx=c,Wx}var Zx,v8;function C1e(){if(v8)return Zx;v8=1;var e=qk(),r=P$(),n=Yk(),a=si(),i=Em(),o=Nt(),s=_s(),c=Yc(),f=Sn(),d=Zc();function h(m,g,y){var x=o(m),E=x||s(m)||d(m);if(g=a(g,4),y==null){var _=m&&m.constructor;E?y=x?new _:[]:f(m)?y=c(_)?r(i(m)):{}:y={}}return(E?e:n)(m,function(w,A,C){return g(y,w,A,C)}),y}return Zx=h,Zx}var Qx,g8;function O1e(){if(g8)return Qx;g8=1;var e=xs(),r=Wc(),n=Nt(),a=e?e.isConcatSpreadable:void 0;function i(o){return n(o)||r(o)||!!(a&&o&&o[a])}return Qx=i,Qx}var Jx,y8;function Zk(){if(y8)return Jx;y8=1;var e=Hk(),r=O1e();function n(a,i,o,s,c){var f=-1,d=a.length;for(o||(o=r),c||(c=[]);++f<d;){var h=a[f];i>0&&o(h)?i>1?n(h,i-1,o,s,c):e(c,h):s||(c[c.length]=h)}return c}return Jx=n,Jx}var e_,b8;function T1e(){if(b8)return e_;b8=1;function e(r,n,a){switch(a.length){case 0:return r.call(n);case 1:return r.call(n,a[0]);case 2:return r.call(n,a[0],a[1]);case 3:return r.call(n,a[0],a[1],a[2])}return r.apply(n,a)}return e_=e,e_}var t_,x8;function rF(){if(x8)return t_;x8=1;var e=T1e(),r=Math.max;function n(a,i,o){return i=r(i===void 0?a.length-1:i,0),function(){for(var s=arguments,c=-1,f=r(s.length-i,0),d=Array(f);++c<f;)d[c]=s[i+c];c=-1;for(var h=Array(i+1);++c<i;)h[c]=s[c];return h[i]=o(d),e(a,this,h)}}return t_=n,t_}var r_,_8;function N1e(){if(_8)return r_;_8=1;var e=Vk(),r=_$(),n=Yo(),a=r?function(i,o){return r(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:n;return r_=a,r_}var n_,w8;function M1e(){if(w8)return n_;w8=1;var e=800,r=16,n=Date.now;function a(i){var o=0,s=0;return function(){var c=n(),f=r-(c-s);if(s=c,f>0){if(++o>=e)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}return n_=a,n_}var a_,S8;function nF(){if(S8)return a_;S8=1;var e=N1e(),r=M1e(),n=r(e);return a_=n,a_}var i_,E8;function Om(){if(E8)return i_;E8=1;var e=Yo(),r=rF(),n=nF();function a(i,o){return n(r(i,o,e),i+"")}return i_=a,i_}var o_,k8;function aF(){if(k8)return o_;k8=1;function e(r,n,a,i){for(var o=r.length,s=a+(i?1:-1);i?s--:++s<o;)if(n(r[s],s,r))return s;return-1}return o_=e,o_}var l_,j8;function R1e(){if(j8)return l_;j8=1;function e(r){return r!==r}return l_=e,l_}var s_,A8;function P1e(){if(A8)return s_;A8=1;function e(r,n,a){for(var i=a-1,o=r.length;++i<o;)if(r[i]===n)return i;return-1}return s_=e,s_}var u_,C8;function D1e(){if(C8)return u_;C8=1;var e=aF(),r=R1e(),n=P1e();function a(i,o,s){return o===o?n(i,o,s):e(i,r,s)}return u_=a,u_}var c_,O8;function L1e(){if(O8)return c_;O8=1;var e=D1e();function r(n,a){var i=n==null?0:n.length;return!!i&&e(n,a,0)>-1}return c_=r,c_}var f_,T8;function I1e(){if(T8)return f_;T8=1;function e(r,n,a){for(var i=-1,o=r==null?0:r.length;++i<o;)if(a(n,r[i]))return!0;return!1}return f_=e,f_}var d_,N8;function z1e(){if(N8)return d_;N8=1;function e(){}return d_=e,d_}var h_,M8;function q1e(){if(M8)return h_;M8=1;var e=N$(),r=z1e(),n=Xk(),a=1/0,i=e&&1/n(new e([,-0]))[1]==a?function(o){return new e(o)}:r;return h_=i,h_}var p_,R8;function B1e(){if(R8)return p_;R8=1;var e=B$(),r=L1e(),n=I1e(),a=$$(),i=q1e(),o=Xk(),s=200;function c(f,d,h){var m=-1,g=r,y=f.length,x=!0,E=[],_=E;if(h)x=!1,g=n;else if(y>=s){var w=d?null:i(f);if(w)return o(w);x=!1,g=a,_=new e}else _=d?[]:E;e:for(;++m<y;){var A=f[m],C=d?d(A):A;if(A=h||A!==0?A:0,x&&C===C){for(var O=_.length;O--;)if(_[O]===C)continue e;d&&_.push(C),E.push(A)}else g(_,C,h)||(_!==E&&_.push(C),E.push(A))}return E}return p_=c,p_}var m_,P8;function iF(){if(P8)return m_;P8=1;var e=li(),r=pa();function n(a){return r(a)&&e(a)}return m_=n,m_}var v_,D8;function $1e(){if(D8)return v_;D8=1;var e=Zk(),r=Om(),n=B1e(),a=iF(),i=r(function(o){return n(e(o,1,a,!0))});return v_=i,v_}var g_,L8;function F1e(){if(L8)return g_;L8=1;var e=jm();function r(n,a){return e(a,function(i){return n[i]})}return g_=r,g_}var y_,I8;function oF(){if(I8)return y_;I8=1;var e=F1e(),r=Xi();function n(a){return a==null?[]:e(a,r(a))}return y_=n,y_}var b_,z8;function En(){if(z8)return b_;z8=1;var e;if(typeof Lk=="function")try{e={clone:Xbe(),constant:Vk(),each:q$(),filter:W$(),has:Z$(),isArray:Nt(),isEmpty:b1e(),isFunction:Yc(),isUndefined:Q$(),keys:Xi(),map:eF(),reduce:tF(),size:A1e(),transform:C1e(),union:$1e(),values:oF()}}catch{}return e||(e=window._),b_=e,b_}var x_,q8;function Qk(){if(q8)return x_;q8=1;var e=En();x_=i;var r="\0",n="\0",a="";function i(h){this._isDirected=e.has(h,"directed")?h.directed:!0,this._isMultigraph=e.has(h,"multigraph")?h.multigraph:!1,this._isCompound=e.has(h,"compound")?h.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[n]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(h){return this._label=h,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(h){return e.isFunction(h)||(h=e.constant(h)),this._defaultNodeLabelFn=h,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return e.keys(this._nodes)},i.prototype.sources=function(){var h=this;return e.filter(this.nodes(),function(m){return e.isEmpty(h._in[m])})},i.prototype.sinks=function(){var h=this;return e.filter(this.nodes(),function(m){return e.isEmpty(h._out[m])})},i.prototype.setNodes=function(h,m){var g=arguments,y=this;return e.each(h,function(x){g.length>1?y.setNode(x,m):y.setNode(x)}),this},i.prototype.setNode=function(h,m){return e.has(this._nodes,h)?(arguments.length>1&&(this._nodes[h]=m),this):(this._nodes[h]=arguments.length>1?m:this._defaultNodeLabelFn(h),this._isCompound&&(this._parent[h]=n,this._children[h]={},this._children[n][h]=!0),this._in[h]={},this._preds[h]={},this._out[h]={},this._sucs[h]={},++this._nodeCount,this)},i.prototype.node=function(h){return this._nodes[h]},i.prototype.hasNode=function(h){return e.has(this._nodes,h)},i.prototype.removeNode=function(h){var m=this;if(e.has(this._nodes,h)){var g=function(y){m.removeEdge(m._edgeObjs[y])};delete this._nodes[h],this._isCompound&&(this._removeFromParentsChildList(h),delete this._parent[h],e.each(this.children(h),function(y){m.setParent(y)}),delete this._children[h]),e.each(e.keys(this._in[h]),g),delete this._in[h],delete this._preds[h],e.each(e.keys(this._out[h]),g),delete this._out[h],delete this._sucs[h],--this._nodeCount}return this},i.prototype.setParent=function(h,m){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(m))m=n;else{m+="";for(var g=m;!e.isUndefined(g);g=this.parent(g))if(g===h)throw new Error("Setting "+m+" as parent of "+h+" would create a cycle");this.setNode(m)}return this.setNode(h),this._removeFromParentsChildList(h),this._parent[h]=m,this._children[m][h]=!0,this},i.prototype._removeFromParentsChildList=function(h){delete this._children[this._parent[h]][h]},i.prototype.parent=function(h){if(this._isCompound){var m=this._parent[h];if(m!==n)return m}},i.prototype.children=function(h){if(e.isUndefined(h)&&(h=n),this._isCompound){var m=this._children[h];if(m)return e.keys(m)}else{if(h===n)return this.nodes();if(this.hasNode(h))return[]}},i.prototype.predecessors=function(h){var m=this._preds[h];if(m)return e.keys(m)},i.prototype.successors=function(h){var m=this._sucs[h];if(m)return e.keys(m)},i.prototype.neighbors=function(h){var m=this.predecessors(h);if(m)return e.union(m,this.successors(h))},i.prototype.isLeaf=function(h){var m;return this.isDirected()?m=this.successors(h):m=this.neighbors(h),m.length===0},i.prototype.filterNodes=function(h){var m=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});m.setGraph(this.graph());var g=this;e.each(this._nodes,function(E,_){h(_)&&m.setNode(_,E)}),e.each(this._edgeObjs,function(E){m.hasNode(E.v)&&m.hasNode(E.w)&&m.setEdge(E,g.edge(E))});var y={};function x(E){var _=g.parent(E);return _===void 0||m.hasNode(_)?(y[E]=_,_):_ in y?y[_]:x(_)}return this._isCompound&&e.each(m.nodes(),function(E){m.setParent(E,x(E))}),m},i.prototype.setDefaultEdgeLabel=function(h){return e.isFunction(h)||(h=e.constant(h)),this._defaultEdgeLabelFn=h,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return e.values(this._edgeObjs)},i.prototype.setPath=function(h,m){var g=this,y=arguments;return e.reduce(h,function(x,E){return y.length>1?g.setEdge(x,E,m):g.setEdge(x,E),E}),this},i.prototype.setEdge=function(){var h,m,g,y,x=!1,E=arguments[0];typeof E=="object"&&E!==null&&"v"in E?(h=E.v,m=E.w,g=E.name,arguments.length===2&&(y=arguments[1],x=!0)):(h=E,m=arguments[1],g=arguments[3],arguments.length>2&&(y=arguments[2],x=!0)),h=""+h,m=""+m,e.isUndefined(g)||(g=""+g);var _=c(this._isDirected,h,m,g);if(e.has(this._edgeLabels,_))return x&&(this._edgeLabels[_]=y),this;if(!e.isUndefined(g)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(h),this.setNode(m),this._edgeLabels[_]=x?y:this._defaultEdgeLabelFn(h,m,g);var w=f(this._isDirected,h,m,g);return h=w.v,m=w.w,Object.freeze(w),this._edgeObjs[_]=w,o(this._preds[m],h),o(this._sucs[h],m),this._in[m][_]=w,this._out[h][_]=w,this._edgeCount++,this},i.prototype.edge=function(h,m,g){var y=arguments.length===1?d(this._isDirected,arguments[0]):c(this._isDirected,h,m,g);return this._edgeLabels[y]},i.prototype.hasEdge=function(h,m,g){var y=arguments.length===1?d(this._isDirected,arguments[0]):c(this._isDirected,h,m,g);return e.has(this._edgeLabels,y)},i.prototype.removeEdge=function(h,m,g){var y=arguments.length===1?d(this._isDirected,arguments[0]):c(this._isDirected,h,m,g),x=this._edgeObjs[y];return x&&(h=x.v,m=x.w,delete this._edgeLabels[y],delete this._edgeObjs[y],s(this._preds[m],h),s(this._sucs[h],m),delete this._in[m][y],delete this._out[h][y],this._edgeCount--),this},i.prototype.inEdges=function(h,m){var g=this._in[h];if(g){var y=e.values(g);return m?e.filter(y,function(x){return x.v===m}):y}},i.prototype.outEdges=function(h,m){var g=this._out[h];if(g){var y=e.values(g);return m?e.filter(y,function(x){return x.w===m}):y}},i.prototype.nodeEdges=function(h,m){var g=this.inEdges(h,m);if(g)return g.concat(this.outEdges(h,m))};function o(h,m){h[m]?h[m]++:h[m]=1}function s(h,m){--h[m]||delete h[m]}function c(h,m,g,y){var x=""+m,E=""+g;if(!h&&x>E){var _=x;x=E,E=_}return x+a+E+a+(e.isUndefined(y)?r:y)}function f(h,m,g,y){var x=""+m,E=""+g;if(!h&&x>E){var _=x;x=E,E=_}var w={v:x,w:E};return y&&(w.name=y),w}function d(h,m){return c(h,m.v,m.w,m.name)}return x_}var __,B8;function U1e(){return B8||(B8=1,__="2.1.8"),__}var w_,$8;function H1e(){return $8||($8=1,w_={Graph:Qk(),version:U1e()}),w_}var S_,F8;function G1e(){if(F8)return S_;F8=1;var e=En(),r=Qk();S_={write:n,read:o};function n(s){var c={options:{directed:s.isDirected(),multigraph:s.isMultigraph(),compound:s.isCompound()},nodes:a(s),edges:i(s)};return e.isUndefined(s.graph())||(c.value=e.clone(s.graph())),c}function a(s){return e.map(s.nodes(),function(c){var f=s.node(c),d=s.parent(c),h={v:c};return e.isUndefined(f)||(h.value=f),e.isUndefined(d)||(h.parent=d),h})}function i(s){return e.map(s.edges(),function(c){var f=s.edge(c),d={v:c.v,w:c.w};return e.isUndefined(c.name)||(d.name=c.name),e.isUndefined(f)||(d.value=f),d})}function o(s){var c=new r(s.options).setGraph(s.value);return e.each(s.nodes,function(f){c.setNode(f.v,f.value),f.parent&&c.setParent(f.v,f.parent)}),e.each(s.edges,function(f){c.setEdge({v:f.v,w:f.w,name:f.name},f.value)}),c}return S_}var E_,U8;function V1e(){if(U8)return E_;U8=1;var e=En();E_=r;function r(n){var a={},i=[],o;function s(c){e.has(a,c)||(a[c]=!0,o.push(c),e.each(n.successors(c),s),e.each(n.predecessors(c),s))}return e.each(n.nodes(),function(c){o=[],s(c),o.length&&i.push(o)}),i}return E_}var k_,H8;function lF(){if(H8)return k_;H8=1;var e=En();k_=r;function r(){this._arr=[],this._keyIndices={}}return r.prototype.size=function(){return this._arr.length},r.prototype.keys=function(){return this._arr.map(function(n){return n.key})},r.prototype.has=function(n){return e.has(this._keyIndices,n)},r.prototype.priority=function(n){var a=this._keyIndices[n];if(a!==void 0)return this._arr[a].priority},r.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},r.prototype.add=function(n,a){var i=this._keyIndices;if(n=String(n),!e.has(i,n)){var o=this._arr,s=o.length;return i[n]=s,o.push({key:n,priority:a}),this._decrease(s),!0}return!1},r.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key},r.prototype.decrease=function(n,a){var i=this._keyIndices[n];if(a>this._arr[i].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[i].priority+" New: "+a);this._arr[i].priority=a,this._decrease(i)},r.prototype._heapify=function(n){var a=this._arr,i=2*n,o=i+1,s=n;i<a.length&&(s=a[i].priority<a[s].priority?i:s,o<a.length&&(s=a[o].priority<a[s].priority?o:s),s!==n&&(this._swap(n,s),this._heapify(s)))},r.prototype._decrease=function(n){for(var a=this._arr,i=a[n].priority,o;n!==0&&(o=n>>1,!(a[o].priority<i));)this._swap(n,o),n=o},r.prototype._swap=function(n,a){var i=this._arr,o=this._keyIndices,s=i[n],c=i[a];i[n]=c,i[a]=s,o[c.key]=n,o[s.key]=a},k_}var j_,G8;function sF(){if(G8)return j_;G8=1;var e=En(),r=lF();j_=a;var n=e.constant(1);function a(o,s,c,f){return i(o,String(s),c||n,f||function(d){return o.outEdges(d)})}function i(o,s,c,f){var d={},h=new r,m,g,y=function(x){var E=x.v!==m?x.v:x.w,_=d[E],w=c(x),A=g.distance+w;if(w<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+x+" Weight: "+w);A<_.distance&&(_.distance=A,_.predecessor=m,h.decrease(E,A))};for(o.nodes().forEach(function(x){var E=x===s?0:Number.POSITIVE_INFINITY;d[x]={distance:E},h.add(x,E)});h.size()>0&&(m=h.removeMin(),g=d[m],g.distance!==Number.POSITIVE_INFINITY);)f(m).forEach(y);return d}return j_}var A_,V8;function K1e(){if(V8)return A_;V8=1;var e=sF(),r=En();A_=n;function n(a,i,o){return r.transform(a.nodes(),function(s,c){s[c]=e(a,c,i,o)},{})}return A_}var C_,K8;function uF(){if(K8)return C_;K8=1;var e=En();C_=r;function r(n){var a=0,i=[],o={},s=[];function c(f){var d=o[f]={onStack:!0,lowlink:a,index:a++};if(i.push(f),n.successors(f).forEach(function(g){e.has(o,g)?o[g].onStack&&(d.lowlink=Math.min(d.lowlink,o[g].index)):(c(g),d.lowlink=Math.min(d.lowlink,o[g].lowlink))}),d.lowlink===d.index){var h=[],m;do m=i.pop(),o[m].onStack=!1,h.push(m);while(f!==m);s.push(h)}}return n.nodes().forEach(function(f){e.has(o,f)||c(f)}),s}return C_}var O_,Y8;function Y1e(){if(Y8)return O_;Y8=1;var e=En(),r=uF();O_=n;function n(a){return e.filter(r(a),function(i){return i.length>1||i.length===1&&a.hasEdge(i[0],i[0])})}return O_}var T_,X8;function X1e(){if(X8)return T_;X8=1;var e=En();T_=n;var r=e.constant(1);function n(i,o,s){return a(i,o||r,s||function(c){return i.outEdges(c)})}function a(i,o,s){var c={},f=i.nodes();return f.forEach(function(d){c[d]={},c[d][d]={distance:0},f.forEach(function(h){d!==h&&(c[d][h]={distance:Number.POSITIVE_INFINITY})}),s(d).forEach(function(h){var m=h.v===d?h.w:h.v,g=o(h);c[d][m]={distance:g,predecessor:d}})}),f.forEach(function(d){var h=c[d];f.forEach(function(m){var g=c[m];f.forEach(function(y){var x=g[d],E=h[y],_=g[y],w=x.distance+E.distance;w<_.distance&&(_.distance=w,_.predecessor=E.predecessor)})})}),c}return T_}var N_,W8;function cF(){if(W8)return N_;W8=1;var e=En();N_=r,r.CycleException=n;function r(a){var i={},o={},s=[];function c(f){if(e.has(o,f))throw new n;e.has(i,f)||(o[f]=!0,i[f]=!0,e.each(a.predecessors(f),c),delete o[f],s.push(f))}if(e.each(a.sinks(),c),e.size(i)!==a.nodeCount())throw new n;return s}function n(){}return n.prototype=new Error,N_}var M_,Z8;function W1e(){if(Z8)return M_;Z8=1;var e=cF();M_=r;function r(n){try{e(n)}catch(a){if(a instanceof e.CycleException)return!1;throw a}return!0}return M_}var R_,Q8;function fF(){if(Q8)return R_;Q8=1;var e=En();R_=r;function r(a,i,o){e.isArray(i)||(i=[i]);var s=(a.isDirected()?a.successors:a.neighbors).bind(a),c=[],f={};return e.each(i,function(d){if(!a.hasNode(d))throw new Error("Graph does not have node: "+d);n(a,d,o==="post",f,s,c)}),c}function n(a,i,o,s,c,f){e.has(s,i)||(s[i]=!0,o||f.push(i),e.each(c(i),function(d){n(a,d,o,s,c,f)}),o&&f.push(i))}return R_}var P_,J8;function Z1e(){if(J8)return P_;J8=1;var e=fF();P_=r;function r(n,a){return e(n,a,"post")}return P_}var D_,e9;function Q1e(){if(e9)return D_;e9=1;var e=fF();D_=r;function r(n,a){return e(n,a,"pre")}return D_}var L_,t9;function J1e(){if(t9)return L_;t9=1;var e=En(),r=Qk(),n=lF();L_=a;function a(i,o){var s=new r,c={},f=new n,d;function h(g){var y=g.v===d?g.w:g.v,x=f.priority(y);if(x!==void 0){var E=o(g);E<x&&(c[y]=d,f.decrease(y,E))}}if(i.nodeCount()===0)return s;e.each(i.nodes(),function(g){f.add(g,Number.POSITIVE_INFINITY),s.setNode(g)}),f.decrease(i.nodes()[0],0);for(var m=!1;f.size()>0;){if(d=f.removeMin(),e.has(c,d))s.setEdge(d,c[d]);else{if(m)throw new Error("Input graph is not connected: "+i);m=!0}i.nodeEdges(d).forEach(h)}return s}return L_}var I_,r9;function exe(){return r9||(r9=1,I_={components:V1e(),dijkstra:sF(),dijkstraAll:K1e(),findCycles:Y1e(),floydWarshall:X1e(),isAcyclic:W1e(),postorder:Z1e(),preorder:Q1e(),prim:J1e(),tarjan:uF(),topsort:cF()}),I_}var z_,n9;function txe(){if(n9)return z_;n9=1;var e=H1e();return z_={Graph:e.Graph,json:G1e(),alg:exe(),version:e.version},z_}var q_,a9;function Ln(){if(a9)return q_;a9=1;var e;if(typeof Lk=="function")try{e=txe()}catch{}return e||(e=window.graphlib),q_=e,q_}var B_,i9;function rxe(){if(i9)return B_;i9=1;var e=L$(),r=1,n=4;function a(i){return e(i,r|n)}return B_=a,B_}var $_,o9;function Tm(){if(o9)return $_;o9=1;var e=bs(),r=li(),n=_m(),a=Sn();function i(o,s,c){if(!a(c))return!1;var f=typeof s;return(f=="number"?r(c)&&n(s,c.length):f=="string"&&s in c)?e(c[s],o):!1}return $_=i,$_}var F_,l9;function nxe(){if(l9)return F_;l9=1;var e=Om(),r=bs(),n=Tm(),a=Ko(),i=Object.prototype,o=i.hasOwnProperty,s=e(function(c,f){c=Object(c);var d=-1,h=f.length,m=h>2?f[2]:void 0;for(m&&n(f[0],f[1],m)&&(h=1);++d<h;)for(var g=f[d],y=a(g),x=-1,E=y.length;++x<E;){var _=y[x],w=c[_];(w===void 0||r(w,i[_])&&!o.call(c,_))&&(c[_]=g[_])}return c});return F_=s,F_}var U_,s9;function axe(){if(s9)return U_;s9=1;var e=si(),r=li(),n=Xi();function a(i){return function(o,s,c){var f=Object(o);if(!r(o)){var d=e(s,3);o=n(o),s=function(m){return d(f[m],m,f)}}var h=i(o,s,c);return h>-1?f[d?o[h]:h]:void 0}}return U_=a,U_}var H_,u9;function ixe(){if(u9)return H_;u9=1;var e=/\s/;function r(n){for(var a=n.length;a--&&e.test(n.charAt(a)););return a}return H_=r,H_}var G_,c9;function oxe(){if(c9)return G_;c9=1;var e=ixe(),r=/^\s+/;function n(a){return a&&a.slice(0,e(a)+1).replace(r,"")}return G_=n,G_}var V_,f9;function lxe(){if(f9)return V_;f9=1;var e=oxe(),r=Sn(),n=Ss(),a=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,s=/^0o[0-7]+$/i,c=parseInt;function f(d){if(typeof d=="number")return d;if(n(d))return a;if(r(d)){var h=typeof d.valueOf=="function"?d.valueOf():d;d=r(h)?h+"":h}if(typeof d!="string")return d===0?d:+d;d=e(d);var m=o.test(d);return m||s.test(d)?c(d.slice(2),m?2:8):i.test(d)?a:+d}return V_=f,V_}var K_,d9;function dF(){if(d9)return K_;d9=1;var e=lxe(),r=1/0,n=17976931348623157e292;function a(i){if(!i)return i===0?i:0;if(i=e(i),i===r||i===-r){var o=i<0?-1:1;return o*n}return i===i?i:0}return K_=a,K_}var Y_,h9;function sxe(){if(h9)return Y_;h9=1;var e=dF();function r(n){var a=e(n),i=a%1;return a===a?i?a-i:a:0}return Y_=r,Y_}var X_,p9;function uxe(){if(p9)return X_;p9=1;var e=aF(),r=si(),n=sxe(),a=Math.max;function i(o,s,c){var f=o==null?0:o.length;if(!f)return-1;var d=c==null?0:n(c);return d<0&&(d=a(f+d,0)),e(o,r(s,3),d)}return X_=i,X_}var W_,m9;function cxe(){if(m9)return W_;m9=1;var e=axe(),r=uxe(),n=e(r);return W_=n,W_}var Z_,v9;function hF(){if(v9)return Z_;v9=1;var e=Zk();function r(n){var a=n==null?0:n.length;return a?e(n,1):[]}return Z_=r,Z_}var Q_,g9;function fxe(){if(g9)return Q_;g9=1;var e=Kk(),r=I$(),n=Ko();function a(i,o){return i==null?i:e(i,r(o),n)}return Q_=a,Q_}var J_,y9;function dxe(){if(y9)return J_;y9=1;function e(r){var n=r==null?0:r.length;return n?r[n-1]:void 0}return J_=e,J_}var ew,b9;function hxe(){if(b9)return ew;b9=1;var e=bm(),r=Yk(),n=si();function a(i,o){var s={};return o=n(o,3),r(i,function(c,f,d){e(s,f,o(c,f,d))}),s}return ew=a,ew}var tw,x9;function Jk(){if(x9)return tw;x9=1;var e=Ss();function r(n,a,i){for(var o=-1,s=n.length;++o<s;){var c=n[o],f=a(c);if(f!=null&&(d===void 0?f===f&&!e(f):i(f,d)))var d=f,h=c}return h}return tw=r,tw}var rw,_9;function pxe(){if(_9)return rw;_9=1;function e(r,n){return r>n}return rw=e,rw}var nw,w9;function mxe(){if(w9)return nw;w9=1;var e=Jk(),r=pxe(),n=Yo();function a(i){return i&&i.length?e(i,n,r):void 0}return nw=a,nw}var aw,S9;function pF(){if(S9)return aw;S9=1;var e=bm(),r=bs();function n(a,i,o){(o!==void 0&&!r(a[i],o)||o===void 0&&!(i in a))&&e(a,i,o)}return aw=n,aw}var iw,E9;function vxe(){if(E9)return iw;E9=1;var e=Go(),r=Em(),n=pa(),a="[object Object]",i=Function.prototype,o=Object.prototype,s=i.toString,c=o.hasOwnProperty,f=s.call(Object);function d(h){if(!n(h)||e(h)!=a)return!1;var m=r(h);if(m===null)return!0;var g=c.call(m,"constructor")&&m.constructor;return typeof g=="function"&&g instanceof g&&s.call(g)==f}return iw=d,iw}var ow,k9;function mF(){if(k9)return ow;k9=1;function e(r,n){if(!(n==="constructor"&&typeof r[n]=="function")&&n!="__proto__")return r[n]}return ow=e,ow}var lw,j9;function gxe(){if(j9)return lw;j9=1;var e=Xc(),r=Ko();function n(a){return e(a,r(a))}return lw=n,lw}var sw,A9;function yxe(){if(A9)return sw;A9=1;var e=pF(),r=E$(),n=R$(),a=k$(),i=D$(),o=Wc(),s=Nt(),c=iF(),f=_s(),d=Yc(),h=Sn(),m=vxe(),g=Zc(),y=mF(),x=gxe();function E(_,w,A,C,O,T,N){var M=y(_,A),P=y(w,A),L=N.get(P);if(L){e(_,A,L);return}var D=T?T(M,P,A+"",_,w,N):void 0,q=D===void 0;if(q){var z=s(P),U=!z&&f(P),$=!z&&!U&&g(P);D=P,z||U||$?s(M)?D=M:c(M)?D=a(M):U?(q=!1,D=r(P,!0)):$?(q=!1,D=n(P,!0)):D=[]:m(P)||o(P)?(D=M,o(M)?D=x(M):(!h(M)||d(M))&&(D=i(P))):q=!1}q&&(N.set(P,D),O(D,P,C,T,N),N.delete(P)),e(_,A,D)}return sw=E,sw}var uw,C9;function bxe(){if(C9)return uw;C9=1;var e=ym(),r=pF(),n=Kk(),a=yxe(),i=Sn(),o=Ko(),s=mF();function c(f,d,h,m,g){f!==d&&n(d,function(y,x){if(g||(g=new e),i(y))a(f,d,x,h,c,m,g);else{var E=m?m(s(f,x),y,x+"",f,d,g):void 0;E===void 0&&(E=y),r(f,x,E)}},o)}return uw=c,uw}var cw,O9;function xxe(){if(O9)return cw;O9=1;var e=Om(),r=Tm();function n(a){return e(function(i,o){var s=-1,c=o.length,f=c>1?o[c-1]:void 0,d=c>2?o[2]:void 0;for(f=a.length>3&&typeof f=="function"?(c--,f):void 0,d&&r(o[0],o[1],d)&&(f=c<3?void 0:f,c=1),i=Object(i);++s<c;){var h=o[s];h&&a(i,h,s,f)}return i})}return cw=n,cw}var fw,T9;function _xe(){if(T9)return fw;T9=1;var e=bxe(),r=xxe(),n=r(function(a,i,o){e(a,i,o)});return fw=n,fw}var dw,N9;function vF(){if(N9)return dw;N9=1;function e(r,n){return r<n}return dw=e,dw}var hw,M9;function wxe(){if(M9)return hw;M9=1;var e=Jk(),r=vF(),n=Yo();function a(i){return i&&i.length?e(i,n,r):void 0}return hw=a,hw}var pw,R9;function Sxe(){if(R9)return pw;R9=1;var e=Jk(),r=si(),n=vF();function a(i,o){return i&&i.length?e(i,r(o,2),n):void 0}return pw=a,pw}var mw,P9;function Exe(){if(P9)return mw;P9=1;var e=Bn(),r=function(){return e.Date.now()};return mw=r,mw}var vw,D9;function kxe(){if(D9)return vw;D9=1;var e=xm(),r=Am(),n=_m(),a=Sn(),i=Qc();function o(s,c,f,d){if(!a(s))return s;c=r(c,s);for(var h=-1,m=c.length,g=m-1,y=s;y!=null&&++h<m;){var x=i(c[h]),E=f;if(x==="__proto__"||x==="constructor"||x==="prototype")return s;if(h!=g){var _=y[x];E=d?d(_,x,y):void 0,E===void 0&&(E=a(_)?_:n(c[h+1])?[]:{})}e(y,x,E),y=y[x]}return s}return vw=o,vw}var gw,L9;function jxe(){if(L9)return gw;L9=1;var e=Cm(),r=kxe(),n=Am();function a(i,o,s){for(var c=-1,f=o.length,d={};++c<f;){var h=o[c],m=e(i,h);s(m,h)&&r(d,n(h,i),m)}return d}return gw=a,gw}var yw,I9;function Axe(){if(I9)return yw;I9=1;var e=jxe(),r=Y$();function n(a,i){return e(a,i,function(o,s){return r(a,s)})}return yw=n,yw}var bw,z9;function Cxe(){if(z9)return bw;z9=1;var e=hF(),r=rF(),n=nF();function a(i){return n(r(i,void 0,e),i+"")}return bw=a,bw}var xw,q9;function Oxe(){if(q9)return xw;q9=1;var e=Axe(),r=Cxe(),n=r(function(a,i){return a==null?{}:e(a,i)});return xw=n,xw}var _w,B9;function Txe(){if(B9)return _w;B9=1;var e=Math.ceil,r=Math.max;function n(a,i,o,s){for(var c=-1,f=r(e((i-a)/(o||1)),0),d=Array(f);f--;)d[s?f:++c]=a,a+=o;return d}return _w=n,_w}var ww,$9;function Nxe(){if($9)return ww;$9=1;var e=Txe(),r=Tm(),n=dF();function a(i){return function(o,s,c){return c&&typeof c!="number"&&r(o,s,c)&&(s=c=void 0),o=n(o),s===void 0?(s=o,o=0):s=n(s),c=c===void 0?o<s?1:-1:n(c),e(o,s,c,i)}}return ww=a,ww}var Sw,F9;function Mxe(){if(F9)return Sw;F9=1;var e=Nxe(),r=e();return Sw=r,Sw}var Ew,U9;function Rxe(){if(U9)return Ew;U9=1;function e(r,n){var a=r.length;for(r.sort(n);a--;)r[a]=r[a].value;return r}return Ew=e,Ew}var kw,H9;function Pxe(){if(H9)return kw;H9=1;var e=Ss();function r(n,a){if(n!==a){var i=n!==void 0,o=n===null,s=n===n,c=e(n),f=a!==void 0,d=a===null,h=a===a,m=e(a);if(!d&&!m&&!c&&n>a||c&&f&&h&&!d&&!m||o&&f&&h||!i&&h||!s)return 1;if(!o&&!c&&!m&&n<a||m&&i&&s&&!o&&!c||d&&i&&s||!f&&s||!h)return-1}return 0}return kw=r,kw}var jw,G9;function Dxe(){if(G9)return jw;G9=1;var e=Pxe();function r(n,a,i){for(var o=-1,s=n.criteria,c=a.criteria,f=s.length,d=i.length;++o<f;){var h=e(s[o],c[o]);if(h){if(o>=d)return h;var m=i[o];return h*(m=="desc"?-1:1)}}return n.index-a.index}return jw=r,jw}var Aw,V9;function Lxe(){if(V9)return Aw;V9=1;var e=jm(),r=Cm(),n=si(),a=J$(),i=Rxe(),o=wm(),s=Dxe(),c=Yo(),f=Nt();function d(h,m,g){m.length?m=e(m,function(E){return f(E)?function(_){return r(_,E.length===1?E[0]:E)}:E}):m=[c];var y=-1;m=e(m,o(n));var x=a(h,function(E,_,w){var A=e(m,function(C){return C(E)});return{criteria:A,index:++y,value:E}});return i(x,function(E,_){return s(E,_,g)})}return Aw=d,Aw}var Cw,K9;function Ixe(){if(K9)return Cw;K9=1;var e=Zk(),r=Lxe(),n=Om(),a=Tm(),i=n(function(o,s){if(o==null)return[];var c=s.length;return c>1&&a(o,s[0],s[1])?s=[]:c>2&&a(s[0],s[1],s[2])&&(s=[s[0]]),r(o,e(s,1),[])});return Cw=i,Cw}var Ow,Y9;function zxe(){if(Y9)return Ow;Y9=1;var e=V$(),r=0;function n(a){var i=++r;return e(a)+i}return Ow=n,Ow}var Tw,X9;function qxe(){if(X9)return Tw;X9=1;function e(r,n,a){for(var i=-1,o=r.length,s=n.length,c={};++i<o;){var f=i<s?n[i]:void 0;a(c,r[i],f)}return c}return Tw=e,Tw}var Nw,W9;function Bxe(){if(W9)return Nw;W9=1;var e=xm(),r=qxe();function n(a,i){return r(a||[],i||[],e)}return Nw=n,Nw}var Mw,Z9;function ht(){if(Z9)return Mw;Z9=1;var e;if(typeof Lk=="function")try{e={cloneDeep:rxe(),constant:Vk(),defaults:nxe(),each:q$(),filter:W$(),find:cxe(),flatten:hF(),forEach:z$(),forIn:fxe(),has:Z$(),isUndefined:Q$(),last:dxe(),map:eF(),mapValues:hxe(),max:mxe(),merge:_xe(),min:wxe(),minBy:Sxe(),now:Exe(),pick:Oxe(),range:Mxe(),reduce:tF(),sortBy:Ixe(),uniqueId:zxe(),values:oF(),zipObject:Bxe()}}catch{}return e||(e=window._),Mw=e,Mw}var Rw,Q9;function $xe(){if(Q9)return Rw;Q9=1,Rw=e;function e(){var a={};a._next=a._prev=a,this._sentinel=a}e.prototype.dequeue=function(){var a=this._sentinel,i=a._prev;if(i!==a)return r(i),i},e.prototype.enqueue=function(a){var i=this._sentinel;a._prev&&a._next&&r(a),a._next=i._next,i._next._prev=a,i._next=a,a._prev=i},e.prototype.toString=function(){for(var a=[],i=this._sentinel,o=i._prev;o!==i;)a.push(JSON.stringify(o,n)),o=o._prev;return"["+a.join(", ")+"]"};function r(a){a._prev._next=a._next,a._next._prev=a._prev,delete a._next,delete a._prev}function n(a,i){if(a!=="_next"&&a!=="_prev")return i}return Rw}var Pw,J9;function Fxe(){if(J9)return Pw;J9=1;var e=ht(),r=Ln().Graph,n=$xe();Pw=i;var a=e.constant(1);function i(d,h){if(d.nodeCount()<=1)return[];var m=c(d,h||a),g=o(m.graph,m.buckets,m.zeroIdx);return e.flatten(e.map(g,function(y){return d.outEdges(y.v,y.w)}),!0)}function o(d,h,m){for(var g=[],y=h[h.length-1],x=h[0],E;d.nodeCount();){for(;E=x.dequeue();)s(d,h,m,E);for(;E=y.dequeue();)s(d,h,m,E);if(d.nodeCount()){for(var _=h.length-2;_>0;--_)if(E=h[_].dequeue(),E){g=g.concat(s(d,h,m,E,!0));break}}}return g}function s(d,h,m,g,y){var x=y?[]:void 0;return e.forEach(d.inEdges(g.v),function(E){var _=d.edge(E),w=d.node(E.v);y&&x.push({v:E.v,w:E.w}),w.out-=_,f(h,m,w)}),e.forEach(d.outEdges(g.v),function(E){var _=d.edge(E),w=E.w,A=d.node(w);A.in-=_,f(h,m,A)}),d.removeNode(g.v),x}function c(d,h){var m=new r,g=0,y=0;e.forEach(d.nodes(),function(_){m.setNode(_,{v:_,in:0,out:0})}),e.forEach(d.edges(),function(_){var w=m.edge(_.v,_.w)||0,A=h(_),C=w+A;m.setEdge(_.v,_.w,C),y=Math.max(y,m.node(_.v).out+=A),g=Math.max(g,m.node(_.w).in+=A)});var x=e.range(y+g+3).map(function(){return new n}),E=g+1;return e.forEach(m.nodes(),function(_){f(x,E,m.node(_))}),{graph:m,buckets:x,zeroIdx:E}}function f(d,h,m){m.out?m.in?d[m.out-m.in+h].enqueue(m):d[d.length-1].enqueue(m):d[0].enqueue(m)}return Pw}var Dw,e6;function Uxe(){if(e6)return Dw;e6=1;var e=ht(),r=Fxe();Dw={run:n,undo:i};function n(o){var s=o.graph().acyclicer==="greedy"?r(o,c(o)):a(o);e.forEach(s,function(f){var d=o.edge(f);o.removeEdge(f),d.forwardName=f.name,d.reversed=!0,o.setEdge(f.w,f.v,d,e.uniqueId("rev"))});function c(f){return function(d){return f.edge(d).weight}}}function a(o){var s=[],c={},f={};function d(h){e.has(f,h)||(f[h]=!0,c[h]=!0,e.forEach(o.outEdges(h),function(m){e.has(c,m.w)?s.push(m):d(m.w)}),delete c[h])}return e.forEach(o.nodes(),d),s}function i(o){e.forEach(o.edges(),function(s){var c=o.edge(s);if(c.reversed){o.removeEdge(s);var f=c.forwardName;delete c.reversed,delete c.forwardName,o.setEdge(s.w,s.v,c,f)}})}return Dw}var Lw,t6;function Rr(){if(t6)return Lw;t6=1;var e=ht(),r=Ln().Graph;Lw={addDummyNode:n,simplify:a,asNonCompoundGraph:i,successorWeights:o,predecessorWeights:s,intersectRect:c,buildLayerMatrix:f,normalizeRanks:d,removeEmptyRanks:h,addBorderNode:m,maxRank:g,partition:y,time:x,notime:E};function n(_,w,A,C){var O;do O=e.uniqueId(C);while(_.hasNode(O));return A.dummy=w,_.setNode(O,A),O}function a(_){var w=new r().setGraph(_.graph());return e.forEach(_.nodes(),function(A){w.setNode(A,_.node(A))}),e.forEach(_.edges(),function(A){var C=w.edge(A.v,A.w)||{weight:0,minlen:1},O=_.edge(A);w.setEdge(A.v,A.w,{weight:C.weight+O.weight,minlen:Math.max(C.minlen,O.minlen)})}),w}function i(_){var w=new r({multigraph:_.isMultigraph()}).setGraph(_.graph());return e.forEach(_.nodes(),function(A){_.children(A).length||w.setNode(A,_.node(A))}),e.forEach(_.edges(),function(A){w.setEdge(A,_.edge(A))}),w}function o(_){var w=e.map(_.nodes(),function(A){var C={};return e.forEach(_.outEdges(A),function(O){C[O.w]=(C[O.w]||0)+_.edge(O).weight}),C});return e.zipObject(_.nodes(),w)}function s(_){var w=e.map(_.nodes(),function(A){var C={};return e.forEach(_.inEdges(A),function(O){C[O.v]=(C[O.v]||0)+_.edge(O).weight}),C});return e.zipObject(_.nodes(),w)}function c(_,w){var A=_.x,C=_.y,O=w.x-A,T=w.y-C,N=_.width/2,M=_.height/2;if(!O&&!T)throw new Error("Not possible to find intersection inside of the rectangle");var P,L;return Math.abs(T)*N>Math.abs(O)*M?(T<0&&(M=-M),P=M*O/T,L=M):(O<0&&(N=-N),P=N,L=N*T/O),{x:A+P,y:C+L}}function f(_){var w=e.map(e.range(g(_)+1),function(){return[]});return e.forEach(_.nodes(),function(A){var C=_.node(A),O=C.rank;e.isUndefined(O)||(w[O][C.order]=A)}),w}function d(_){var w=e.min(e.map(_.nodes(),function(A){return _.node(A).rank}));e.forEach(_.nodes(),function(A){var C=_.node(A);e.has(C,"rank")&&(C.rank-=w)})}function h(_){var w=e.min(e.map(_.nodes(),function(T){return _.node(T).rank})),A=[];e.forEach(_.nodes(),function(T){var N=_.node(T).rank-w;A[N]||(A[N]=[]),A[N].push(T)});var C=0,O=_.graph().nodeRankFactor;e.forEach(A,function(T,N){e.isUndefined(T)&&N%O!==0?--C:C&&e.forEach(T,function(M){_.node(M).rank+=C})})}function m(_,w,A,C){var O={width:0,height:0};return arguments.length>=4&&(O.rank=A,O.order=C),n(_,"border",O,w)}function g(_){return e.max(e.map(_.nodes(),function(w){var A=_.node(w).rank;if(!e.isUndefined(A))return A}))}function y(_,w){var A={lhs:[],rhs:[]};return e.forEach(_,function(C){w(C)?A.lhs.push(C):A.rhs.push(C)}),A}function x(_,w){var A=e.now();try{return w()}finally{console.log(_+" time: "+(e.now()-A)+"ms")}}function E(_,w){return w()}return Lw}var Iw,r6;function Hxe(){if(r6)return Iw;r6=1;var e=ht(),r=Rr();Iw={run:n,undo:i};function n(o){o.graph().dummyChains=[],e.forEach(o.edges(),function(s){a(o,s)})}function a(o,s){var c=s.v,f=o.node(c).rank,d=s.w,h=o.node(d).rank,m=s.name,g=o.edge(s),y=g.labelRank;if(h!==f+1){o.removeEdge(s);var x,E,_;for(_=0,++f;f<h;++_,++f)g.points=[],E={width:0,height:0,edgeLabel:g,edgeObj:s,rank:f},x=r.addDummyNode(o,"edge",E,"_d"),f===y&&(E.width=g.width,E.height=g.height,E.dummy="edge-label",E.labelpos=g.labelpos),o.setEdge(c,x,{weight:g.weight},m),_===0&&o.graph().dummyChains.push(x),c=x;o.setEdge(c,d,{weight:g.weight},m)}}function i(o){e.forEach(o.graph().dummyChains,function(s){var c=o.node(s),f=c.edgeLabel,d;for(o.setEdge(c.edgeObj,f);c.dummy;)d=o.successors(s)[0],o.removeNode(s),f.points.push({x:c.x,y:c.y}),c.dummy==="edge-label"&&(f.x=c.x,f.y=c.y,f.width=c.width,f.height=c.height),s=d,c=o.node(s)})}return Iw}var zw,n6;function gp(){if(n6)return zw;n6=1;var e=ht();zw={longestPath:r,slack:n};function r(a){var i={};function o(s){var c=a.node(s);if(e.has(i,s))return c.rank;i[s]=!0;var f=e.min(e.map(a.outEdges(s),function(d){return o(d.w)-a.edge(d).minlen}));return(f===Number.POSITIVE_INFINITY||f===void 0||f===null)&&(f=0),c.rank=f}e.forEach(a.sources(),o)}function n(a,i){return a.node(i.w).rank-a.node(i.v).rank-a.edge(i).minlen}return zw}var qw,a6;function gF(){if(a6)return qw;a6=1;var e=ht(),r=Ln().Graph,n=gp().slack;qw=a;function a(c){var f=new r({directed:!1}),d=c.nodes()[0],h=c.nodeCount();f.setNode(d,{});for(var m,g;i(f,c)<h;)m=o(f,c),g=f.hasNode(m.v)?n(c,m):-n(c,m),s(f,c,g);return f}function i(c,f){function d(h){e.forEach(f.nodeEdges(h),function(m){var g=m.v,y=h===g?m.w:g;!c.hasNode(y)&&!n(f,m)&&(c.setNode(y,{}),c.setEdge(h,y,{}),d(y))})}return e.forEach(c.nodes(),d),c.nodeCount()}function o(c,f){return e.minBy(f.edges(),function(d){if(c.hasNode(d.v)!==c.hasNode(d.w))return n(f,d)})}function s(c,f,d){e.forEach(c.nodes(),function(h){f.node(h).rank+=d})}return qw}var Bw,i6;function Gxe(){if(i6)return Bw;i6=1;var e=ht(),r=gF(),n=gp().slack,a=gp().longestPath,i=Ln().alg.preorder,o=Ln().alg.postorder,s=Rr().simplify;Bw=c,c.initLowLimValues=m,c.initCutValues=f,c.calcCutValue=h,c.leaveEdge=y,c.enterEdge=x,c.exchangeEdges=E;function c(C){C=s(C),a(C);var O=r(C);m(O),f(O,C);for(var T,N;T=y(O);)N=x(O,C,T),E(O,C,T,N)}function f(C,O){var T=o(C,C.nodes());T=T.slice(0,T.length-1),e.forEach(T,function(N){d(C,O,N)})}function d(C,O,T){var N=C.node(T),M=N.parent;C.edge(T,M).cutvalue=h(C,O,T)}function h(C,O,T){var N=C.node(T),M=N.parent,P=!0,L=O.edge(T,M),D=0;return L||(P=!1,L=O.edge(M,T)),D=L.weight,e.forEach(O.nodeEdges(T),function(q){var z=q.v===T,U=z?q.w:q.v;if(U!==M){var $=z===P,Y=O.edge(q).weight;if(D+=$?Y:-Y,w(C,T,U)){var B=C.edge(T,U).cutvalue;D+=$?-B:B}}}),D}function m(C,O){arguments.length<2&&(O=C.nodes()[0]),g(C,{},1,O)}function g(C,O,T,N,M){var P=T,L=C.node(N);return O[N]=!0,e.forEach(C.neighbors(N),function(D){e.has(O,D)||(T=g(C,O,T,D,N))}),L.low=P,L.lim=T++,M?L.parent=M:delete L.parent,T}function y(C){return e.find(C.edges(),function(O){return C.edge(O).cutvalue<0})}function x(C,O,T){var N=T.v,M=T.w;O.hasEdge(N,M)||(N=T.w,M=T.v);var P=C.node(N),L=C.node(M),D=P,q=!1;P.lim>L.lim&&(D=L,q=!0);var z=e.filter(O.edges(),function(U){return q===A(C,C.node(U.v),D)&&q!==A(C,C.node(U.w),D)});return e.minBy(z,function(U){return n(O,U)})}function E(C,O,T,N){var M=T.v,P=T.w;C.removeEdge(M,P),C.setEdge(N.v,N.w,{}),m(C),f(C,O),_(C,O)}function _(C,O){var T=e.find(C.nodes(),function(M){return!O.node(M).parent}),N=i(C,T);N=N.slice(1),e.forEach(N,function(M){var P=C.node(M).parent,L=O.edge(M,P),D=!1;L||(L=O.edge(P,M),D=!0),O.node(M).rank=O.node(P).rank+(D?L.minlen:-L.minlen)})}function w(C,O,T){return C.hasEdge(O,T)}function A(C,O,T){return T.low<=O.lim&&O.lim<=T.lim}return Bw}var $w,o6;function Vxe(){if(o6)return $w;o6=1;var e=gp(),r=e.longestPath,n=gF(),a=Gxe();$w=i;function i(f){switch(f.graph().ranker){case"network-simplex":c(f);break;case"tight-tree":s(f);break;case"longest-path":o(f);break;default:c(f)}}var o=r;function s(f){r(f),n(f)}function c(f){a(f)}return $w}var Fw,l6;function Kxe(){if(l6)return Fw;l6=1;var e=ht();Fw=r;function r(i){var o=a(i);e.forEach(i.graph().dummyChains,function(s){for(var c=i.node(s),f=c.edgeObj,d=n(i,o,f.v,f.w),h=d.path,m=d.lca,g=0,y=h[g],x=!0;s!==f.w;){if(c=i.node(s),x){for(;(y=h[g])!==m&&i.node(y).maxRank<c.rank;)g++;y===m&&(x=!1)}if(!x){for(;g<h.length-1&&i.node(y=h[g+1]).minRank<=c.rank;)g++;y=h[g]}i.setParent(s,y),s=i.successors(s)[0]}})}function n(i,o,s,c){var f=[],d=[],h=Math.min(o[s].low,o[c].low),m=Math.max(o[s].lim,o[c].lim),g,y;g=s;do g=i.parent(g),f.push(g);while(g&&(o[g].low>h||m>o[g].lim));for(y=g,g=c;(g=i.parent(g))!==y;)d.push(g);return{path:f.concat(d.reverse()),lca:y}}function a(i){var o={},s=0;function c(f){var d=s;e.forEach(i.children(f),c),o[f]={low:d,lim:s++}}return e.forEach(i.children(),c),o}return Fw}var Uw,s6;function Yxe(){if(s6)return Uw;s6=1;var e=ht(),r=Rr();Uw={run:n,cleanup:s};function n(c){var f=r.addDummyNode(c,"root",{},"_root"),d=i(c),h=e.max(e.values(d))-1,m=2*h+1;c.graph().nestingRoot=f,e.forEach(c.edges(),function(y){c.edge(y).minlen*=m});var g=o(c)+1;e.forEach(c.children(),function(y){a(c,f,m,g,h,d,y)}),c.graph().nodeRankFactor=m}function a(c,f,d,h,m,g,y){var x=c.children(y);if(!x.length){y!==f&&c.setEdge(f,y,{weight:0,minlen:d});return}var E=r.addBorderNode(c,"_bt"),_=r.addBorderNode(c,"_bb"),w=c.node(y);c.setParent(E,y),w.borderTop=E,c.setParent(_,y),w.borderBottom=_,e.forEach(x,function(A){a(c,f,d,h,m,g,A);var C=c.node(A),O=C.borderTop?C.borderTop:A,T=C.borderBottom?C.borderBottom:A,N=C.borderTop?h:2*h,M=O!==T?1:m-g[y]+1;c.setEdge(E,O,{weight:N,minlen:M,nestingEdge:!0}),c.setEdge(T,_,{weight:N,minlen:M,nestingEdge:!0})}),c.parent(y)||c.setEdge(f,E,{weight:0,minlen:m+g[y]})}function i(c){var f={};function d(h,m){var g=c.children(h);g&&g.length&&e.forEach(g,function(y){d(y,m+1)}),f[h]=m}return e.forEach(c.children(),function(h){d(h,1)}),f}function o(c){return e.reduce(c.edges(),function(f,d){return f+c.edge(d).weight},0)}function s(c){var f=c.graph();c.removeNode(f.nestingRoot),delete f.nestingRoot,e.forEach(c.edges(),function(d){var h=c.edge(d);h.nestingEdge&&c.removeEdge(d)})}return Uw}var Hw,u6;function Xxe(){if(u6)return Hw;u6=1;var e=ht(),r=Rr();Hw=n;function n(i){function o(s){var c=i.children(s),f=i.node(s);if(c.length&&e.forEach(c,o),e.has(f,"minRank")){f.borderLeft=[],f.borderRight=[];for(var d=f.minRank,h=f.maxRank+1;d<h;++d)a(i,"borderLeft","_bl",s,f,d),a(i,"borderRight","_br",s,f,d)}}e.forEach(i.children(),o)}function a(i,o,s,c,f,d){var h={width:0,height:0,rank:d,borderType:o},m=f[o][d-1],g=r.addDummyNode(i,"border",h,s);f[o][d]=g,i.setParent(g,c),m&&i.setEdge(m,g,{weight:1})}return Hw}var Gw,c6;function Wxe(){if(c6)return Gw;c6=1;var e=ht();Gw={adjust:r,undo:n};function r(d){var h=d.graph().rankdir.toLowerCase();(h==="lr"||h==="rl")&&a(d)}function n(d){var h=d.graph().rankdir.toLowerCase();(h==="bt"||h==="rl")&&o(d),(h==="lr"||h==="rl")&&(c(d),a(d))}function a(d){e.forEach(d.nodes(),function(h){i(d.node(h))}),e.forEach(d.edges(),function(h){i(d.edge(h))})}function i(d){var h=d.width;d.width=d.height,d.height=h}function o(d){e.forEach(d.nodes(),function(h){s(d.node(h))}),e.forEach(d.edges(),function(h){var m=d.edge(h);e.forEach(m.points,s),e.has(m,"y")&&s(m)})}function s(d){d.y=-d.y}function c(d){e.forEach(d.nodes(),function(h){f(d.node(h))}),e.forEach(d.edges(),function(h){var m=d.edge(h);e.forEach(m.points,f),e.has(m,"x")&&f(m)})}function f(d){var h=d.x;d.x=d.y,d.y=h}return Gw}var Vw,f6;function Zxe(){if(f6)return Vw;f6=1;var e=ht();Vw=r;function r(n){var a={},i=e.filter(n.nodes(),function(d){return!n.children(d).length}),o=e.max(e.map(i,function(d){return n.node(d).rank})),s=e.map(e.range(o+1),function(){return[]});function c(d){if(!e.has(a,d)){a[d]=!0;var h=n.node(d);s[h.rank].push(d),e.forEach(n.successors(d),c)}}var f=e.sortBy(i,function(d){return n.node(d).rank});return e.forEach(f,c),s}return Vw}var Kw,d6;function Qxe(){if(d6)return Kw;d6=1;var e=ht();Kw=r;function r(a,i){for(var o=0,s=1;s<i.length;++s)o+=n(a,i[s-1],i[s]);return o}function n(a,i,o){for(var s=e.zipObject(o,e.map(o,function(g,y){return y})),c=e.flatten(e.map(i,function(g){return e.sortBy(e.map(a.outEdges(g),function(y){return{pos:s[y.w],weight:a.edge(y).weight}}),"pos")}),!0),f=1;f<o.length;)f<<=1;var d=2*f-1;f-=1;var h=e.map(new Array(d),function(){return 0}),m=0;return e.forEach(c.forEach(function(g){var y=g.pos+f;h[y]+=g.weight;for(var x=0;y>0;)y%2&&(x+=h[y+1]),y=y-1>>1,h[y]+=g.weight;m+=g.weight*x})),m}return Kw}var Yw,h6;function Jxe(){if(h6)return Yw;h6=1;var e=ht();Yw=r;function r(n,a){return e.map(a,function(i){var o=n.inEdges(i);if(o.length){var s=e.reduce(o,function(c,f){var d=n.edge(f),h=n.node(f.v);return{sum:c.sum+d.weight*h.order,weight:c.weight+d.weight}},{sum:0,weight:0});return{v:i,barycenter:s.sum/s.weight,weight:s.weight}}else return{v:i}})}return Yw}var Xw,p6;function e_e(){if(p6)return Xw;p6=1;var e=ht();Xw=r;function r(i,o){var s={};e.forEach(i,function(f,d){var h=s[f.v]={indegree:0,in:[],out:[],vs:[f.v],i:d};e.isUndefined(f.barycenter)||(h.barycenter=f.barycenter,h.weight=f.weight)}),e.forEach(o.edges(),function(f){var d=s[f.v],h=s[f.w];!e.isUndefined(d)&&!e.isUndefined(h)&&(h.indegree++,d.out.push(s[f.w]))});var c=e.filter(s,function(f){return!f.indegree});return n(c)}function n(i){var o=[];function s(d){return function(h){h.merged||(e.isUndefined(h.barycenter)||e.isUndefined(d.barycenter)||h.barycenter>=d.barycenter)&&a(d,h)}}function c(d){return function(h){h.in.push(d),--h.indegree===0&&i.push(h)}}for(;i.length;){var f=i.pop();o.push(f),e.forEach(f.in.reverse(),s(f)),e.forEach(f.out,c(f))}return e.map(e.filter(o,function(d){return!d.merged}),function(d){return e.pick(d,["vs","i","barycenter","weight"])})}function a(i,o){var s=0,c=0;i.weight&&(s+=i.barycenter*i.weight,c+=i.weight),o.weight&&(s+=o.barycenter*o.weight,c+=o.weight),i.vs=o.vs.concat(i.vs),i.barycenter=s/c,i.weight=c,i.i=Math.min(o.i,i.i),o.merged=!0}return Xw}var Ww,m6;function t_e(){if(m6)return Ww;m6=1;var e=ht(),r=Rr();Ww=n;function n(o,s){var c=r.partition(o,function(E){return e.has(E,"barycenter")}),f=c.lhs,d=e.sortBy(c.rhs,function(E){return-E.i}),h=[],m=0,g=0,y=0;f.sort(i(!!s)),y=a(h,d,y),e.forEach(f,function(E){y+=E.vs.length,h.push(E.vs),m+=E.barycenter*E.weight,g+=E.weight,y=a(h,d,y)});var x={vs:e.flatten(h,!0)};return g&&(x.barycenter=m/g,x.weight=g),x}function a(o,s,c){for(var f;s.length&&(f=e.last(s)).i<=c;)s.pop(),o.push(f.vs),c++;return c}function i(o){return function(s,c){return s.barycenter<c.barycenter?-1:s.barycenter>c.barycenter?1:o?c.i-s.i:s.i-c.i}}return Ww}var Zw,v6;function r_e(){if(v6)return Zw;v6=1;var e=ht(),r=Jxe(),n=e_e(),a=t_e();Zw=i;function i(c,f,d,h){var m=c.children(f),g=c.node(f),y=g?g.borderLeft:void 0,x=g?g.borderRight:void 0,E={};y&&(m=e.filter(m,function(T){return T!==y&&T!==x}));var _=r(c,m);e.forEach(_,function(T){if(c.children(T.v).length){var N=i(c,T.v,d,h);E[T.v]=N,e.has(N,"barycenter")&&s(T,N)}});var w=n(_,d);o(w,E);var A=a(w,h);if(y&&(A.vs=e.flatten([y,A.vs,x],!0),c.predecessors(y).length)){var C=c.node(c.predecessors(y)[0]),O=c.node(c.predecessors(x)[0]);e.has(A,"barycenter")||(A.barycenter=0,A.weight=0),A.barycenter=(A.barycenter*A.weight+C.order+O.order)/(A.weight+2),A.weight+=2}return A}function o(c,f){e.forEach(c,function(d){d.vs=e.flatten(d.vs.map(function(h){return f[h]?f[h].vs:h}),!0)})}function s(c,f){e.isUndefined(c.barycenter)?(c.barycenter=f.barycenter,c.weight=f.weight):(c.barycenter=(c.barycenter*c.weight+f.barycenter*f.weight)/(c.weight+f.weight),c.weight+=f.weight)}return Zw}var Qw,g6;function n_e(){if(g6)return Qw;g6=1;var e=ht(),r=Ln().Graph;Qw=n;function n(i,o,s){var c=a(i),f=new r({compound:!0}).setGraph({root:c}).setDefaultNodeLabel(function(d){return i.node(d)});return e.forEach(i.nodes(),function(d){var h=i.node(d),m=i.parent(d);(h.rank===o||h.minRank<=o&&o<=h.maxRank)&&(f.setNode(d),f.setParent(d,m||c),e.forEach(i[s](d),function(g){var y=g.v===d?g.w:g.v,x=f.edge(y,d),E=e.isUndefined(x)?0:x.weight;f.setEdge(y,d,{weight:i.edge(g).weight+E})}),e.has(h,"minRank")&&f.setNode(d,{borderLeft:h.borderLeft[o],borderRight:h.borderRight[o]}))}),f}function a(i){for(var o;i.hasNode(o=e.uniqueId("_root")););return o}return Qw}var Jw,y6;function a_e(){if(y6)return Jw;y6=1;var e=ht();Jw=r;function r(n,a,i){var o={},s;e.forEach(i,function(c){for(var f=n.parent(c),d,h;f;){if(d=n.parent(f),d?(h=o[d],o[d]=f):(h=s,s=f),h&&h!==f){a.setEdge(h,f);return}f=d}})}return Jw}var e2,b6;function i_e(){if(b6)return e2;b6=1;var e=ht(),r=Zxe(),n=Qxe(),a=r_e(),i=n_e(),o=a_e(),s=Ln().Graph,c=Rr();e2=f;function f(g){var y=c.maxRank(g),x=d(g,e.range(1,y+1),"inEdges"),E=d(g,e.range(y-1,-1,-1),"outEdges"),_=r(g);m(g,_);for(var w=Number.POSITIVE_INFINITY,A,C=0,O=0;O<4;++C,++O){h(C%2?x:E,C%4>=2),_=c.buildLayerMatrix(g);var T=n(g,_);T<w&&(O=0,A=e.cloneDeep(_),w=T)}m(g,A)}function d(g,y,x){return e.map(y,function(E){return i(g,E,x)})}function h(g,y){var x=new s;e.forEach(g,function(E){var _=E.graph().root,w=a(E,_,x,y);e.forEach(w.vs,function(A,C){E.node(A).order=C}),o(E,x,w.vs)})}function m(g,y){e.forEach(y,function(x){e.forEach(x,function(E,_){g.node(E).order=_})})}return e2}var t2,x6;function o_e(){if(x6)return t2;x6=1;var e=ht(),r=Ln().Graph,n=Rr();t2={positionX:x,findType1Conflicts:a,findType2Conflicts:i,addConflict:s,hasConflict:c,verticalAlignment:f,horizontalCompaction:d,alignCoordinates:g,findSmallestWidthAlignment:m,balance:y};function a(w,A){var C={};function O(T,N){var M=0,P=0,L=T.length,D=e.last(N);return e.forEach(N,function(q,z){var U=o(w,q),$=U?w.node(U).order:L;(U||q===D)&&(e.forEach(N.slice(P,z+1),function(Y){e.forEach(w.predecessors(Y),function(B){var Z=w.node(B),ae=Z.order;(ae<M||$<ae)&&!(Z.dummy&&w.node(Y).dummy)&&s(C,B,Y)})}),P=z+1,M=$)}),N}return e.reduce(A,O),C}function i(w,A){var C={};function O(N,M,P,L,D){var q;e.forEach(e.range(M,P),function(z){q=N[z],w.node(q).dummy&&e.forEach(w.predecessors(q),function(U){var $=w.node(U);$.dummy&&($.order<L||$.order>D)&&s(C,U,q)})})}function T(N,M){var P=-1,L,D=0;return e.forEach(M,function(q,z){if(w.node(q).dummy==="border"){var U=w.predecessors(q);U.length&&(L=w.node(U[0]).order,O(M,D,z,P,L),D=z,P=L)}O(M,D,M.length,L,N.length)}),M}return e.reduce(A,T),C}function o(w,A){if(w.node(A).dummy)return e.find(w.predecessors(A),function(C){return w.node(C).dummy})}function s(w,A,C){if(A>C){var O=A;A=C,C=O}var T=w[A];T||(w[A]=T={}),T[C]=!0}function c(w,A,C){if(A>C){var O=A;A=C,C=O}return e.has(w[A],C)}function f(w,A,C,O){var T={},N={},M={};return e.forEach(A,function(P){e.forEach(P,function(L,D){T[L]=L,N[L]=L,M[L]=D})}),e.forEach(A,function(P){var L=-1;e.forEach(P,function(D){var q=O(D);if(q.length){q=e.sortBy(q,function(B){return M[B]});for(var z=(q.length-1)/2,U=Math.floor(z),$=Math.ceil(z);U<=$;++U){var Y=q[U];N[D]===D&&L<M[Y]&&!c(C,D,Y)&&(N[Y]=D,N[D]=T[D]=T[Y],L=M[Y])}}})}),{root:T,align:N}}function d(w,A,C,O,T){var N={},M=h(w,A,C,T),P=T?"borderLeft":"borderRight";function L(z,U){for(var $=M.nodes(),Y=$.pop(),B={};Y;)B[Y]?z(Y):(B[Y]=!0,$.push(Y),$=$.concat(U(Y))),Y=$.pop()}function D(z){N[z]=M.inEdges(z).reduce(function(U,$){return Math.max(U,N[$.v]+M.edge($))},0)}function q(z){var U=M.outEdges(z).reduce(function(Y,B){return Math.min(Y,N[B.w]-M.edge(B))},Number.POSITIVE_INFINITY),$=w.node(z);U!==Number.POSITIVE_INFINITY&&$.borderType!==P&&(N[z]=Math.max(N[z],U))}return L(D,M.predecessors.bind(M)),L(q,M.successors.bind(M)),e.forEach(O,function(z){N[z]=N[C[z]]}),N}function h(w,A,C,O){var T=new r,N=w.graph(),M=E(N.nodesep,N.edgesep,O);return e.forEach(A,function(P){var L;e.forEach(P,function(D){var q=C[D];if(T.setNode(q),L){var z=C[L],U=T.edge(z,q);T.setEdge(z,q,Math.max(M(w,D,L),U||0))}L=D})}),T}function m(w,A){return e.minBy(e.values(A),function(C){var O=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY;return e.forIn(C,function(N,M){var P=_(w,M)/2;O=Math.max(N+P,O),T=Math.min(N-P,T)}),O-T})}function g(w,A){var C=e.values(A),O=e.min(C),T=e.max(C);e.forEach(["u","d"],function(N){e.forEach(["l","r"],function(M){var P=N+M,L=w[P],D;if(L!==A){var q=e.values(L);D=M==="l"?O-e.min(q):T-e.max(q),D&&(w[P]=e.mapValues(L,function(z){return z+D}))}})})}function y(w,A){return e.mapValues(w.ul,function(C,O){if(A)return w[A.toLowerCase()][O];var T=e.sortBy(e.map(w,O));return(T[1]+T[2])/2})}function x(w){var A=n.buildLayerMatrix(w),C=e.merge(a(w,A),i(w,A)),O={},T;e.forEach(["u","d"],function(M){T=M==="u"?A:e.values(A).reverse(),e.forEach(["l","r"],function(P){P==="r"&&(T=e.map(T,function(z){return e.values(z).reverse()}));var L=(M==="u"?w.predecessors:w.successors).bind(w),D=f(w,T,C,L),q=d(w,T,D.root,D.align,P==="r");P==="r"&&(q=e.mapValues(q,function(z){return-z})),O[M+P]=q})});var N=m(w,O);return g(O,N),y(O,w.graph().align)}function E(w,A,C){return function(O,T,N){var M=O.node(T),P=O.node(N),L=0,D;if(L+=M.width/2,e.has(M,"labelpos"))switch(M.labelpos.toLowerCase()){case"l":D=-M.width/2;break;case"r":D=M.width/2;break}if(D&&(L+=C?D:-D),D=0,L+=(M.dummy?A:w)/2,L+=(P.dummy?A:w)/2,L+=P.width/2,e.has(P,"labelpos"))switch(P.labelpos.toLowerCase()){case"l":D=P.width/2;break;case"r":D=-P.width/2;break}return D&&(L+=C?D:-D),D=0,L}}function _(w,A){return w.node(A).width}return t2}var r2,_6;function l_e(){if(_6)return r2;_6=1;var e=ht(),r=Rr(),n=o_e().positionX;r2=a;function a(o){o=r.asNonCompoundGraph(o),i(o),e.forEach(n(o),function(s,c){o.node(c).x=s})}function i(o){var s=r.buildLayerMatrix(o),c=o.graph().ranksep,f=0;e.forEach(s,function(d){var h=e.max(e.map(d,function(m){return o.node(m).height}));e.forEach(d,function(m){o.node(m).y=f+h/2}),f+=h+c})}return r2}var n2,w6;function s_e(){if(w6)return n2;w6=1;var e=ht(),r=Uxe(),n=Hxe(),a=Vxe(),i=Rr().normalizeRanks,o=Kxe(),s=Rr().removeEmptyRanks,c=Yxe(),f=Xxe(),d=Wxe(),h=i_e(),m=l_e(),g=Rr(),y=Ln().Graph;n2=x;function x(G,H){var te=H&&H.debugTiming?g.time:g.notime;te("layout",function(){var W=te(" buildLayoutGraph",function(){return L(G)});te(" runLayout",function(){E(W,te)}),te(" updateInputGraph",function(){_(G,W)})})}function E(G,H){H(" makeSpaceForEdgeLabels",function(){D(G)}),H(" removeSelfEdges",function(){V(G)}),H(" acyclic",function(){r.run(G)}),H(" nestingGraph.run",function(){c.run(G)}),H(" rank",function(){a(g.asNonCompoundGraph(G))}),H(" injectEdgeLabelProxies",function(){q(G)}),H(" removeEmptyRanks",function(){s(G)}),H(" nestingGraph.cleanup",function(){c.cleanup(G)}),H(" normalizeRanks",function(){i(G)}),H(" assignRankMinMax",function(){z(G)}),H(" removeEdgeLabelProxies",function(){U(G)}),H(" normalize.run",function(){n.run(G)}),H(" parentDummyChains",function(){o(G)}),H(" addBorderSegments",function(){f(G)}),H(" order",function(){h(G)}),H(" insertSelfEdges",function(){fe(G)}),H(" adjustCoordinateSystem",function(){d.adjust(G)}),H(" position",function(){m(G)}),H(" positionSelfEdges",function(){F(G)}),H(" removeBorderNodes",function(){ae(G)}),H(" normalize.undo",function(){n.undo(G)}),H(" fixupEdgeLabelCoords",function(){B(G)}),H(" undoCoordinateSystem",function(){d.undo(G)}),H(" translateGraph",function(){$(G)}),H(" assignNodeIntersects",function(){Y(G)}),H(" reversePoints",function(){Z(G)}),H(" acyclic.undo",function(){r.undo(G)})}function _(G,H){e.forEach(G.nodes(),function(te){var W=G.node(te),xe=H.node(te);W&&(W.x=xe.x,W.y=xe.y,H.children(te).length&&(W.width=xe.width,W.height=xe.height))}),e.forEach(G.edges(),function(te){var W=G.edge(te),xe=H.edge(te);W.points=xe.points,e.has(xe,"x")&&(W.x=xe.x,W.y=xe.y)}),G.graph().width=H.graph().width,G.graph().height=H.graph().height}var w=["nodesep","edgesep","ranksep","marginx","marginy"],A={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},C=["acyclicer","ranker","rankdir","align"],O=["width","height"],T={width:0,height:0},N=["minlen","weight","width","height","labeloffset"],M={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},P=["labelpos"];function L(G){var H=new y({multigraph:!0,compound:!0}),te=ce(G.graph());return H.setGraph(e.merge({},A,X(te,w),e.pick(te,C))),e.forEach(G.nodes(),function(W){var xe=ce(G.node(W));H.setNode(W,e.defaults(X(xe,O),T)),H.setParent(W,G.parent(W))}),e.forEach(G.edges(),function(W){var xe=ce(G.edge(W));H.setEdge(W,e.merge({},M,X(xe,N),e.pick(xe,P)))}),H}function D(G){var H=G.graph();H.ranksep/=2,e.forEach(G.edges(),function(te){var W=G.edge(te);W.minlen*=2,W.labelpos.toLowerCase()!=="c"&&(H.rankdir==="TB"||H.rankdir==="BT"?W.width+=W.labeloffset:W.height+=W.labeloffset)})}function q(G){e.forEach(G.edges(),function(H){var te=G.edge(H);if(te.width&&te.height){var W=G.node(H.v),xe=G.node(H.w),ee={rank:(xe.rank-W.rank)/2+W.rank,e:H};g.addDummyNode(G,"edge-proxy",ee,"_ep")}})}function z(G){var H=0;e.forEach(G.nodes(),function(te){var W=G.node(te);W.borderTop&&(W.minRank=G.node(W.borderTop).rank,W.maxRank=G.node(W.borderBottom).rank,H=e.max(H,W.maxRank))}),G.graph().maxRank=H}function U(G){e.forEach(G.nodes(),function(H){var te=G.node(H);te.dummy==="edge-proxy"&&(G.edge(te.e).labelRank=te.rank,G.removeNode(H))})}function $(G){var H=Number.POSITIVE_INFINITY,te=0,W=Number.POSITIVE_INFINITY,xe=0,ee=G.graph(),le=ee.marginx||0,be=ee.marginy||0;function he(Se){var se=Se.x,ne=Se.y,ge=Se.width,_e=Se.height;H=Math.min(H,se-ge/2),te=Math.max(te,se+ge/2),W=Math.min(W,ne-_e/2),xe=Math.max(xe,ne+_e/2)}e.forEach(G.nodes(),function(Se){he(G.node(Se))}),e.forEach(G.edges(),function(Se){var se=G.edge(Se);e.has(se,"x")&&he(se)}),H-=le,W-=be,e.forEach(G.nodes(),function(Se){var se=G.node(Se);se.x-=H,se.y-=W}),e.forEach(G.edges(),function(Se){var se=G.edge(Se);e.forEach(se.points,function(ne){ne.x-=H,ne.y-=W}),e.has(se,"x")&&(se.x-=H),e.has(se,"y")&&(se.y-=W)}),ee.width=te-H+le,ee.height=xe-W+be}function Y(G){e.forEach(G.edges(),function(H){var te=G.edge(H),W=G.node(H.v),xe=G.node(H.w),ee,le;te.points?(ee=te.points[0],le=te.points[te.points.length-1]):(te.points=[],ee=xe,le=W),te.points.unshift(g.intersectRect(W,ee)),te.points.push(g.intersectRect(xe,le))})}function B(G){e.forEach(G.edges(),function(H){var te=G.edge(H);if(e.has(te,"x"))switch((te.labelpos==="l"||te.labelpos==="r")&&(te.width-=te.labeloffset),te.labelpos){case"l":te.x-=te.width/2+te.labeloffset;break;case"r":te.x+=te.width/2+te.labeloffset;break}})}function Z(G){e.forEach(G.edges(),function(H){var te=G.edge(H);te.reversed&&te.points.reverse()})}function ae(G){e.forEach(G.nodes(),function(H){if(G.children(H).length){var te=G.node(H),W=G.node(te.borderTop),xe=G.node(te.borderBottom),ee=G.node(e.last(te.borderLeft)),le=G.node(e.last(te.borderRight));te.width=Math.abs(le.x-ee.x),te.height=Math.abs(xe.y-W.y),te.x=ee.x+te.width/2,te.y=W.y+te.height/2}}),e.forEach(G.nodes(),function(H){G.node(H).dummy==="border"&&G.removeNode(H)})}function V(G){e.forEach(G.edges(),function(H){if(H.v===H.w){var te=G.node(H.v);te.selfEdges||(te.selfEdges=[]),te.selfEdges.push({e:H,label:G.edge(H)}),G.removeEdge(H)}})}function fe(G){var H=g.buildLayerMatrix(G);e.forEach(H,function(te){var W=0;e.forEach(te,function(xe,ee){var le=G.node(xe);le.order=ee+W,e.forEach(le.selfEdges,function(be){g.addDummyNode(G,"selfedge",{width:be.label.width,height:be.label.height,rank:le.rank,order:ee+ ++W,e:be.e,label:be.label},"_se")}),delete le.selfEdges})})}function F(G){e.forEach(G.nodes(),function(H){var te=G.node(H);if(te.dummy==="selfedge"){var W=G.node(te.e.v),xe=W.x+W.width/2,ee=W.y,le=te.x-xe,be=W.height/2;G.setEdge(te.e,te.label),G.removeNode(H),te.label.points=[{x:xe+2*le/3,y:ee-be},{x:xe+5*le/6,y:ee-be},{x:xe+le,y:ee},{x:xe+5*le/6,y:ee+be},{x:xe+2*le/3,y:ee+be}],te.label.x=te.x,te.label.y=te.y}})}function X(G,H){return e.mapValues(e.pick(G,H),Number)}function ce(G){var H={};return e.forEach(G,function(te,W){H[W.toLowerCase()]=te}),H}return n2}var a2,S6;function u_e(){if(S6)return a2;S6=1;var e=ht(),r=Rr(),n=Ln().Graph;a2={debugOrdering:a};function a(i){var o=r.buildLayerMatrix(i),s=new n({compound:!0,multigraph:!0}).setGraph({});return e.forEach(i.nodes(),function(c){s.setNode(c,{label:c}),s.setParent(c,"layer"+i.node(c).rank)}),e.forEach(i.edges(),function(c){s.setEdge(c.v,c.w,{},c.name)}),e.forEach(o,function(c,f){var d="layer"+f;s.setNode(d,{rank:"same"}),e.reduce(c,function(h,m){return s.setEdge(h,m,{style:"invis"}),m})}),s}return a2}var i2,E6;function c_e(){return E6||(E6=1,i2="0.8.5"),i2}var o2,k6;function f_e(){return k6||(k6=1,o2={graphlib:Ln(),layout:s_e(),debug:u_e(),util:{time:Rr().time,notime:Rr().notime},version:c_e()}),o2}var d_e=f_e();const j6=In(d_e),h_e=[{id:"ci_green",eventName:"CI Passed",description:"When CI checks pass on a PR"},{id:"ci_red",eventName:"CI Failed",description:"When CI checks fail on a PR"},{id:"pr_merged",eventName:"PR Merged",description:"When a PR is merged"},{id:"ci_blocked",eventName:"CI Blocked",description:"When CI failure count exceeds threshold"},{id:"stuck_nudge",eventName:"Stuck Nudge",description:"When a team has been idle too long"},{id:"nudge_progress",eventName:"Nudge Progress",description:"Ask TL for a status update"},{id:"ask_for_pr",eventName:"Ask for PR",description:"Request TL to open a pull request"},{id:"check_ci",eventName:"Check CI",description:"Tell TL to fix failing CI"},{id:"wrap_up",eventName:"Wrap Up",description:"Tell TL to finish and push"}],p_e=130,m_e=50;function jS({trigger:e,size:r=14,className:n}){switch(e){case"hook":return b.jsx(HV,{size:r,className:n});case"timer":return b.jsx(VV,{size:r,className:n});case"poller":return b.jsx(FV,{size:r,className:n});case"pm_action":return b.jsx(GV,{size:r,className:n});case"system":return b.jsx(DS,{size:r,className:n});default:return null}}function v_e(e,r,n,a,i,o){const s=a/24,c=r-a/2,f=n-a/2,d={fill:"none",stroke:i,strokeWidth:2/s,strokeLinecap:"round",strokeLinejoin:"round",opacity:o};switch(e){case"hook":return b.jsx("g",{transform:`translate(${c},${f}) scale(${s})`,...d,children:b.jsx("path",{d:"M13 2L3 14h9l-1 8 10-12h-9l1-8z"})});case"timer":return b.jsxs("g",{transform:`translate(${c},${f}) scale(${s})`,...d,children:[b.jsx("circle",{cx:"12",cy:"12",r:"10"}),b.jsx("polyline",{points:"12 6 12 12 16 14"})]});case"poller":return b.jsxs("g",{transform:`translate(${c},${f}) scale(${s})`,...d,children:[b.jsx("path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}),b.jsx("path",{d:"M21 3v5h-5"}),b.jsx("path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}),b.jsx("path",{d:"M8 16H3v5"})]});case"pm_action":return b.jsxs("g",{transform:`translate(${c},${f}) scale(${s})`,...d,children:[b.jsx("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),b.jsx("circle",{cx:"12",cy:"7",r:"4"})]});case"system":return b.jsxs("g",{transform:`translate(${c},${f}) scale(${s})`,...d,children:[b.jsx("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),b.jsx("circle",{cx:"12",cy:"12",r:"3"})]});default:return null}}const g_e={hook:"Hook event",timer:"Timer (stuck detector)",poller:"Poller (GitHub)",pm_action:"PM action (API call)",system:"System (queue, recovery)"};function y_e(e,r){const n=e.map(h=>h.id),a=r.flatMap(h=>h.from==="*"?n.map(m=>({...h,from:m,id:`${h.id}-${m}`})):[h]),i=new Map;for(const h of a){const m=`${h.from}|${h.trigger}|${h.to}`,g=i.get(m);if(!g)i.set(m,h);else{const y=g.id.includes(`-${g.from}`),x=h.id.includes(`-${h.from}`);y&&!x&&i.set(m,h)}}const o=[...i.values()],s=h=>`${h.trigger}|${h.to}`,c=new Map;for(const h of o){const m=s(h);c.has(m)||c.set(m,[]),c.get(m).push(h)}const f=[];for(const[,h]of c){const m=new Set(h.map(y=>y.from));if(n.every(y=>m.has(y))&&h.length>=n.length){const y=h[0],x=y.id.replace(/-[^-]+$/,"");f.push({...y,from:"*",id:x})}else f.push(...h)}const d=[...f].sort((h,m)=>h.from==="*"&&m.from!=="*"?-1:h.from!=="*"&&m.from==="*"?1:h.from<m.from?-1:h.from>m.from?1:h.to<m.to?-1:h.to>m.to?1:0);return{transitions:f,tableTransitions:d}}function b_e(e,r){const n=[],a=e.map(d=>d.id),i=new Map;for(const d of r){if(d.from==="*")continue;const h=`${d.id}|${d.from}|${d.to}|${d.trigger}`;i.has(h)||i.set(h,[]),i.get(h).push(d)}for(const[,d]of i)if(d.length>1){const h=d.map(m=>m.id).join(", ");n.push({type:"duplicate",message:`Duplicate transition: ${d[0].from} -> ${d[0].to} (${d[0].trigger}) defined ${d.length} times [${h}]`})}const o=new Set,s=new Set;for(const d of r)d.from==="*"?a.forEach(h=>o.add(h)):o.add(d.from),s.add(d.to);const c=new Set(["done","failed"]);for(const d of a)!o.has(d)&&!c.has(d)&&n.push({type:"orphan",message:`Orphan state: "${d}" has no outgoing transitions`});const f=new Set(["queued"]);for(const d of a)!s.has(d)&&!f.has(d)&&n.push({type:"unreachable",message:`Unreachable state: "${d}" has no incoming transitions`});return n}const x_e=70,__e=30;function w_e(e,r){const n=new j6.graphlib.Graph({multigraph:!0});n.setGraph({rankdir:"LR",nodesep:60,ranksep:120,marginx:40,marginy:40}),n.setDefaultEdgeLabel(()=>({}));const a=new Set(e.map(m=>m.id));for(const m of e)n.setNode(m.id,{label:m.id,width:p_e,height:m_e});r.some(m=>m.from==="*")&&n.setNode("*",{label:"All",width:x_e,height:__e});const o=new Map;for(const m of r){const g=m.from==="*"?"*":m.from;if(g!=="*"&&!a.has(g)||!a.has(m.to))continue;const y=`${g}->${m.to}|${m.trigger}`;o.has(y)||o.set(y,[]),o.get(y).push(m)}o.forEach((m,g)=>{const[y,x]=g.split("|"),[E,_]=y.split("->");n.setEdge(E,_,{},x)}),j6.layout(n);const s=n.nodes().map(m=>{const g=n.node(m);return{id:m,x:g.x,y:g.y,width:g.width,height:g.height}}),c=n.edges().map(m=>{const g=n.edge(m),y=`${m.v}->${m.w}|${m.name}`;return{from:m.v,to:m.w,trigger:m.name||"",points:g.points||[],transitions:o.get(y)||[]}}),f=n.graph(),d=(f.width||800)+80,h=(f.height||400)+80;return{nodes:s,edges:c,width:d,height:h}}function S_e({info:e,stateColorMap:r,onClose:n}){const a=k.useRef(null);return k.useEffect(()=>{const o=setTimeout(n,5e3);return()=>clearTimeout(o)},[n]),k.useEffect(()=>{function o(s){a.current&&!a.current.contains(s.target)&&n()}return document.addEventListener("mousedown",o),()=>document.removeEventListener("mousedown",o)},[n]),e.transitions[0]?b.jsx("div",{ref:a,className:"absolute z-50 bg-[#161B22] border border-[#30363D] rounded-lg shadow-xl p-3 min-w-[240px] max-w-[340px]",style:{left:e.x,top:e.y,transform:"translate(-50%, -100%) translateY(-8px)"},children:e.transitions.map((o,s)=>b.jsxs("div",{className:s>0?"mt-3 pt-3 border-t border-[#30363D]":"",children:[b.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[b.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs font-semibold",style:{backgroundColor:`${r[o.from]||"#8B949E"}20`,color:r[o.from]||"#8B949E",border:`1px solid ${r[o.from]||"#8B949E"}40`},children:o.from==="*"?"All":o.from}),b.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#8B949E",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[b.jsx("path",{d:"M5 12h14"}),b.jsx("path",{d:"m12 5 7 7-7 7"})]}),b.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs font-semibold",style:{backgroundColor:`${r[o.to]||"#8B949E"}20`,color:r[o.to]||"#8B949E",border:`1px solid ${r[o.to]||"#8B949E"}40`},children:o.to})]}),b.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-dark-text mb-1",children:[b.jsx(jS,{trigger:o.trigger,size:12,className:"text-[#8B949E]"}),b.jsx("span",{className:"font-medium",children:o.triggerLabel})]}),b.jsx("p",{className:"text-xs text-dark-muted mb-1",children:o.description}),b.jsx("p",{className:"text-xs font-mono text-dark-muted bg-[#0D1117] px-1.5 py-0.5 rounded",children:o.condition})]},o.id))}):null}function E_e({cardDef:e,templateData:r,onSave:n}){const[a,i]=k.useState((r==null?void 0:r.template)??""),[o,s]=k.useState((r==null?void 0:r.enabled)??!0),[c,f]=k.useState(!1),[d,h]=k.useState(null);k.useEffect(()=>{r&&(i(r.template),s(r.enabled))},[r]);const m=k.useCallback(async()=>{f(!0),h(null);try{await n(e.id,a,o),h("Saved successfully")}catch(y){h(y instanceof Error?y.message:"Failed to save")}finally{f(!1)}},[e.id,a,o,n]),g=(r==null?void 0:r.placeholders)??[];return b.jsxs("div",{className:"bg-[#161B22] border border-[#30363D] rounded-lg p-4",children:[b.jsxs("div",{className:"flex items-start justify-between mb-2",children:[b.jsxs("div",{children:[b.jsx("h3",{className:"text-sm font-semibold text-dark-text",children:e.eventName}),b.jsx("p",{className:"text-xs text-dark-muted mt-0.5",children:e.description}),b.jsxs("p",{className:"text-[10px] text-dark-muted font-mono mt-0.5",children:["(",e.id,")"]})]}),b.jsx("button",{type:"button",role:"switch","aria-checked":o,"aria-label":`Toggle ${e.eventName} message`,onClick:()=>s(!o),className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors shrink-0 mt-0.5 ${o?"bg-[#3FB950]":"bg-[#30363D]"}`,children:b.jsx("span",{className:`inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform ${o?"translate-x-[18px]":"translate-x-[3px]"}`})})]}),b.jsx("textarea",{value:a,onChange:y=>{i(y.target.value),h(null)},rows:3,className:`w-full text-sm font-mono rounded px-3 py-2 resize-y bg-[#0D1117] border ${o?"border-[#30363D] text-dark-text":"border-[#30363D] text-dark-muted opacity-60"} focus:outline-none focus:ring-1 focus:ring-[#58A6FF]/50`}),g.length>0&&b.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:g.map(y=>b.jsx("code",{className:"text-[11px] font-mono px-1.5 py-0.5 rounded bg-[#30363D] text-[#58A6FF]",children:`{{${y}}}`},y))}),b.jsxs("div",{className:"flex items-center gap-3 mt-3",children:[b.jsx("button",{type:"button",onClick:m,disabled:c,className:"px-3 py-1 text-xs font-medium rounded border border-[#58A6FF]/50 text-[#58A6FF] hover:bg-[#58A6FF]/10 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:c?"Saving...":"Save"}),d&&b.jsx("span",{className:`text-xs ${d.includes("success")?"text-[#3FB950]":"text-[#F85149]"}`,children:d})]})]})}function k_e(){const e=Ht(),[r,n]=k.useState("diagram"),[a,i]=k.useState(null),[o,s]=k.useState(!0),[c,f]=k.useState(null),[d,h]=k.useState([]),[m,g]=k.useState(null),[y,x]=k.useState(null),E=k.useRef(null),_=k.useCallback(async()=>{try{const D=await e.get("state-machine");i(D),f(null)}catch(D){f(D instanceof Error?D.message:String(D))}finally{s(!1)}},[e]),w=k.useCallback(async()=>{try{const D=await e.get("message-templates");h(D)}catch{}},[e]);k.useEffect(()=>{_(),w()},[_,w]);const A=k.useMemo(()=>a?y_e(a.states,a.transitions):null,[a]),C=k.useMemo(()=>a?b_e(a.states,a.transitions):[],[a]),O=k.useMemo(()=>!a||!A?null:w_e(a.states,A.transitions),[a,A]),T=k.useMemo(()=>{if(!a)return{};const D={"*":"#8B949E"};for(const q of a.states)D[q.id]=q.color;return D},[a]),N=k.useMemo(()=>{const D=new Map;for(const q of d)D.set(q.id,q);return D},[d]),M=k.useCallback((D,q)=>{if(!E.current)return;const z=E.current.getBoundingClientRect();x({transitions:q,x:D.clientX-z.left,y:D.clientY-z.top})},[]),P=k.useCallback(()=>x(null),[]),L=k.useCallback(async(D,q,z)=>{await e.put(`message-templates/${D}`,{template:q,enabled:z}),await w()},[e,w]);return o?b.jsx("div",{className:"flex items-center justify-center h-full",children:b.jsx("p",{className:"text-dark-muted text-sm",children:"Loading state machine..."})}):c?b.jsx("div",{className:"flex items-center justify-center h-full",children:b.jsxs("div",{className:"text-center",children:[b.jsx("p",{className:"text-[#F85149] text-sm mb-2",children:"Failed to load state machine"}),b.jsx("p",{className:"text-dark-muted text-xs",children:c})]})}):!a||!O?null:b.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[b.jsxs("div",{className:"px-6 py-4 border-b border-dark-border shrink-0",children:[b.jsx("h1",{className:"text-xl font-semibold text-dark-text",children:"Lifecycle"}),b.jsx("p",{className:"text-dark-muted text-sm mt-1",children:"Team lifecycle transitions and PM message templates"})]}),b.jsxs("div",{className:"flex items-center gap-1 px-4 py-2 border-b border-[#30363D] shrink-0",children:[b.jsx("button",{onClick:()=>n("diagram"),className:`px-3 py-1.5 text-xs font-medium rounded ${r==="diagram"?"bg-[#58A6FF20] text-[#58A6FF] border border-[#58A6FF40]":"text-[#8B949E] hover:text-[#E6EDF3]"}`,children:"State Machine"}),b.jsx("button",{onClick:()=>n("table"),className:`px-3 py-1.5 text-xs font-medium rounded ${r==="table"?"bg-[#58A6FF20] text-[#58A6FF] border border-[#58A6FF40]":"text-[#8B949E] hover:text-[#E6EDF3]"}`,children:"Transition Table"}),b.jsx("button",{onClick:()=>n("messages"),className:`px-3 py-1.5 text-xs font-medium rounded ${r==="messages"?"bg-[#58A6FF20] text-[#58A6FF] border border-[#58A6FF40]":"text-[#8B949E] hover:text-[#E6EDF3]"}`,children:"PM Messages"})]}),b.jsx("div",{className:"flex-1 min-h-0 overflow-auto",children:r==="diagram"?b.jsxs("div",{className:"flex flex-col h-full",children:[b.jsx("div",{className:"flex items-center gap-4 text-xs text-dark-muted px-6 py-3 border-b border-dark-border shrink-0",children:Object.entries(g_e).map(([D,q])=>b.jsxs("div",{className:"flex items-center gap-1.5",children:[b.jsx(jS,{trigger:D,size:14,className:"text-[#8B949E]"}),b.jsx("span",{children:q})]},D))}),b.jsxs("div",{ref:E,className:"relative flex-1 min-h-0 p-4 overflow-auto",children:[b.jsxs("svg",{viewBox:`0 0 ${O.width} ${O.height}`,className:"w-full h-auto",style:{minHeight:300},children:[b.jsxs("defs",{children:[b.jsx("marker",{id:"arrowhead",markerWidth:"10",markerHeight:"7",refX:"10",refY:"3.5",orient:"auto",children:b.jsx("polygon",{points:"0 0, 10 3.5, 0 7",fill:"#8B949E"})}),b.jsx("marker",{id:"arrowhead-hover",markerWidth:"10",markerHeight:"7",refX:"10",refY:"3.5",orient:"auto",children:b.jsx("polygon",{points:"0 0, 10 3.5, 0 7",fill:"#C9D1D9"})})]}),O.edges.map(D=>{const q=`${D.from}->${D.to}|${D.trigger}`,z=q===m,U=D.points;if(U.length===0)return null;const $=U.map((F,X)=>`${X===0?"M":"L"} ${F.x} ${F.y}`).join(" "),Y=Math.floor(U.length/2),B=U[Y];let Z="#30363D",ae=1.5,V="url(#arrowhead)";z&&(Z="#C9D1D9",ae=2,V="url(#arrowhead-hover)");const fe=D.transitions.length;return b.jsxs("g",{className:"cursor-pointer",onClick:F=>M(F,D.transitions),onMouseEnter:()=>g(q),onMouseLeave:()=>g(null),children:[b.jsx("path",{d:$,fill:"none",stroke:"transparent",strokeWidth:"16"}),b.jsx("path",{d:$,fill:"none",stroke:Z,strokeWidth:ae,markerEnd:V,strokeLinejoin:"round",strokeLinecap:"round"}),B&&D.transitions.length>0&&v_e(D.transitions[0].trigger,B.x,B.y-12,14,z?"#C9D1D9":"#8B949E",1),fe>1&&B&&b.jsxs("g",{children:[b.jsx("rect",{x:B.x+6,y:B.y-22,width:fe>=10?30:18,height:16,rx:8,fill:"#30363D"}),b.jsx("text",{x:B.x+6+(fe>=10?15:9),y:B.y-22+12,textAnchor:"middle",fontSize:10,fontWeight:600,fill:"#8B949E",children:fe})]})]},q)}),O.nodes.map(D=>{const q=D.x-D.width/2,z=D.y-D.height/2;if(D.id==="*")return b.jsxs("g",{children:[b.jsx("rect",{x:q,y:z,width:D.width,height:D.height,rx:15,ry:15,fill:"none",stroke:"#8B949E",strokeWidth:1.5,strokeDasharray:"4 2"}),b.jsx("text",{x:D.x,y:D.y,textAnchor:"middle",dominantBaseline:"central",fill:"#8B949E",fontSize:11,fontWeight:600,className:"select-none",children:"All"})]},"all-node");const U=T[D.id]||"#8B949E",$=`${U}18`;return b.jsxs("g",{children:[b.jsx("rect",{x:q,y:z,width:D.width,height:D.height,rx:8,ry:8,fill:"#0D1117"}),b.jsx("rect",{x:q,y:z,width:D.width,height:D.height,rx:8,ry:8,fill:$}),b.jsx("rect",{x:q,y:z,width:D.width,height:D.height,rx:8,ry:8,fill:"none",stroke:U,strokeWidth:2}),b.jsx("text",{x:D.x,y:D.y,textAnchor:"middle",dominantBaseline:"central",fontSize:14,fontWeight:700,fill:U,className:"select-none",children:D.id})]},D.id)})]}),y&&b.jsx(S_e,{info:y,stateColorMap:T,onClose:P})]}),C.length>0&&b.jsxs("div",{className:"px-6 py-3 border-t border-dark-border shrink-0",children:[b.jsx("h3",{className:"text-sm font-medium text-[#D29922] mb-2",children:"Validation Warnings"}),b.jsx("ul",{className:"space-y-1",children:C.map((D,q)=>b.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[b.jsx("span",{className:`shrink-0 mt-0.5 px-1.5 py-0.5 rounded font-mono text-[10px] ${D.type==="duplicate"?"bg-[#F8514920] text-[#F85149]":D.type==="orphan"?"bg-[#D2992220] text-[#D29922]":"bg-[#58A6FF20] text-[#58A6FF]"}`,children:D.type}),b.jsx("span",{className:"text-dark-muted",children:D.message})]},q))})]})]}):r==="table"?b.jsxs("div",{className:"flex flex-col h-full",children:[A&&b.jsxs("div",{className:"px-6 py-4 flex-1 min-h-0 overflow-auto",children:[b.jsxs("h2",{className:"text-sm font-medium text-dark-text mb-3",children:["Transition Table (",A.tableTransitions.length," transitions)"]}),b.jsx("div",{className:"overflow-x-auto",children:b.jsxs("table",{className:"w-full text-xs border-collapse",children:[b.jsx("thead",{children:b.jsxs("tr",{className:"text-left text-dark-muted border-b border-[#30363D]",children:[b.jsx("th",{className:"py-2 pr-4 font-medium",children:"From"}),b.jsx("th",{className:"py-2 pr-4 font-medium",children:"To"}),b.jsx("th",{className:"py-2 pr-4 font-medium",children:"Trigger"}),b.jsx("th",{className:"py-2 font-medium",children:"Description"})]})}),b.jsx("tbody",{children:A.tableTransitions.map(D=>b.jsxs("tr",{className:"border-b border-[#30363D]/50 hover:bg-[#161B22]",children:[b.jsx("td",{className:"py-1.5 pr-4",children:b.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs font-semibold",style:{backgroundColor:`${T[D.from]||"#8B949E"}20`,color:T[D.from]||"#8B949E",border:`1px solid ${T[D.from]||"#8B949E"}40`},children:D.from==="*"?"ALL":D.from})}),b.jsx("td",{className:"py-1.5 pr-4",children:b.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs font-semibold",style:{backgroundColor:`${T[D.to]||"#8B949E"}20`,color:T[D.to]||"#8B949E",border:`1px solid ${T[D.to]||"#8B949E"}40`},children:D.to})}),b.jsx("td",{className:"py-1.5 pr-4",children:b.jsxs("div",{className:"flex items-center gap-1.5",children:[b.jsx(jS,{trigger:D.trigger,size:12,className:"text-[#8B949E]"}),b.jsx("span",{className:"text-dark-text",children:D.triggerLabel})]})}),b.jsx("td",{className:"py-1.5 text-dark-muted",children:D.description})]},D.id))})]})})]}),C.length>0&&b.jsxs("div",{className:"px-6 py-3 border-t border-dark-border shrink-0",children:[b.jsx("h3",{className:"text-sm font-medium text-[#D29922] mb-2",children:"Validation Warnings"}),b.jsx("ul",{className:"space-y-1",children:C.map((D,q)=>b.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[b.jsx("span",{className:`shrink-0 mt-0.5 px-1.5 py-0.5 rounded font-mono text-[10px] ${D.type==="duplicate"?"bg-[#F8514920] text-[#F85149]":D.type==="orphan"?"bg-[#D2992220] text-[#D29922]":"bg-[#58A6FF20] text-[#58A6FF]"}`,children:D.type}),b.jsx("span",{className:"text-dark-muted",children:D.message})]},q))})]})]}):b.jsxs("div",{className:"px-6 py-4",children:[b.jsxs("div",{className:"mb-4",children:[b.jsx("h2",{className:"text-lg font-semibold text-dark-text",children:"PM → Team Leader Messages"}),b.jsx("p",{className:"text-dark-muted text-sm mt-0.5",children:"Messages automatically sent to your team leads when events occur"})]}),b.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-4",children:h_e.map(D=>b.jsx(E_e,{cardDef:D,templateData:N.get(D.id),onSave:L},D.id))})]})})]})}function j_e(){return b.jsx(vV,{children:b.jsx(AV,{children:b.jsxs(jV,{children:[b.jsxs("div",{className:"h-screen w-screen flex flex-col bg-dark-base text-dark-text overflow-hidden",children:[b.jsx(ZV,{}),b.jsxs("div",{className:"flex flex-1 min-h-0",children:[b.jsx(JV,{}),b.jsx("main",{className:"flex-1 min-w-0 overflow-auto",children:b.jsxs(VG,{children:[b.jsx(xo,{path:"/",element:b.jsx(Ine,{})}),b.jsx(xo,{path:"/issues",element:b.jsx(Gne,{})}),b.jsx(xo,{path:"/usage",element:b.jsx(I0e,{})}),b.jsx(xo,{path:"/projects",element:b.jsx(Y0e,{})}),b.jsx(xo,{path:"/lifecycle",element:b.jsx(k_e,{})}),b.jsx(xo,{path:"/settings",element:b.jsx(W0e,{})})]})})]}),b.jsx(eK,{})]}),b.jsx(Sne,{})]})})})}const yF=document.getElementById("root");if(!yF)throw new Error("Root element not found");YH.createRoot(yF).render(b.jsx(yp.StrictMode,{children:b.jsx(j_e,{})}));
181
+ //# sourceMappingURL=index-BV8wNYWe.js.map