heyio 3.0.2 → 3.0.3

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 (63) hide show
  1. package/dist/api/server.js +1 -1
  2. package/dist/api/server.js.map +1 -1
  3. package/dist/logging/logger.d.ts.map +1 -1
  4. package/dist/logging/logger.js +13 -1
  5. package/dist/logging/logger.js.map +1 -1
  6. package/node_modules/@io/shared/package.json +1 -1
  7. package/package.json +7 -2
  8. package/public/assets/index-2RY89H3W.js +336 -0
  9. package/public/assets/index-2RY89H3W.js.map +1 -0
  10. package/public/assets/index-D3cGfBsj.css +1 -0
  11. package/public/index.html +14 -0
  12. package/src/api/middleware/auth.ts +0 -76
  13. package/src/api/notifications.ts +0 -122
  14. package/src/api/routes/activity.ts +0 -29
  15. package/src/api/routes/attachments.ts +0 -93
  16. package/src/api/routes/config.ts +0 -115
  17. package/src/api/routes/conversations.ts +0 -87
  18. package/src/api/routes/health.ts +0 -18
  19. package/src/api/routes/inbox.ts +0 -98
  20. package/src/api/routes/schedules.ts +0 -121
  21. package/src/api/routes/skills.ts +0 -105
  22. package/src/api/routes/squads.ts +0 -145
  23. package/src/api/routes/usage.ts +0 -57
  24. package/src/api/routes/wiki.ts +0 -49
  25. package/src/api/server.ts +0 -186
  26. package/src/config.ts +0 -3
  27. package/src/copilot/client.ts +0 -42
  28. package/src/copilot/health-monitor.ts +0 -85
  29. package/src/copilot/orchestrator.ts +0 -222
  30. package/src/copilot/tools.ts +0 -707
  31. package/src/index.ts +0 -113
  32. package/src/logging/logger.ts +0 -26
  33. package/src/models/index.ts +0 -11
  34. package/src/models/pricing.ts +0 -121
  35. package/src/models/registry.ts +0 -131
  36. package/src/models/token-tracker.ts +0 -151
  37. package/src/scheduler/engine.ts +0 -146
  38. package/src/skills/index.ts +0 -13
  39. package/src/skills/store.ts +0 -188
  40. package/src/squad/agent.ts +0 -326
  41. package/src/squad/autonomy.ts +0 -78
  42. package/src/squad/event-bus.ts +0 -71
  43. package/src/squad/execution/index.ts +0 -17
  44. package/src/squad/execution/instance.ts +0 -186
  45. package/src/squad/execution/meeting.ts +0 -191
  46. package/src/squad/execution/pr.ts +0 -127
  47. package/src/squad/execution/runner.ts +0 -97
  48. package/src/squad/execution/tasks.ts +0 -111
  49. package/src/squad/execution/worktree.ts +0 -138
  50. package/src/squad/hiring.ts +0 -222
  51. package/src/squad/index.ts +0 -17
  52. package/src/squad/manager.ts +0 -337
  53. package/src/squad/name-generator.ts +0 -135
  54. package/src/squad/roles/templates.ts +0 -104
  55. package/src/squad/skill-parser.ts +0 -120
  56. package/src/squad/source-resolver.ts +0 -57
  57. package/src/store/activity.ts +0 -176
  58. package/src/store/db.ts +0 -237
  59. package/src/store/inbox.ts +0 -199
  60. package/src/store/schedules.ts +0 -199
  61. package/src/wiki/index.ts +0 -12
  62. package/src/wiki/store.ts +0 -139
  63. package/tsconfig.json +0 -9
@@ -0,0 +1,336 @@
1
+ var SL=Object.defineProperty;var kL=(t,e,r)=>e in t?SL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Je=(t,e,r)=>kL(t,typeof e!="symbol"?e+"":e,r);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var cf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ye(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Rm={exports:{}},Ol={},Im={exports:{}},Be={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its 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 MS;function OL(){if(MS)return Be;MS=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.iterator;function g(L){return L===null||typeof L!="object"?null:(L=h&&L[h]||L["@@iterator"],typeof L=="function"?L:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,x={};function y(L,W,te){this.props=L,this.context=W,this.refs=x,this.updater=te||v}y.prototype.isReactComponent={},y.prototype.setState=function(L,W){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,W,"setState")},y.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function S(){}S.prototype=y.prototype;function k(L,W,te){this.props=L,this.context=W,this.refs=x,this.updater=te||v}var E=k.prototype=new S;E.constructor=k,w(E,y.prototype),E.isPureReactComponent=!0;var P=Array.isArray,O=Object.prototype.hasOwnProperty,A={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function R(L,W,te){var ue,le={},de=null,Re=null;if(W!=null)for(ue in W.ref!==void 0&&(Re=W.ref),W.key!==void 0&&(de=""+W.key),W)O.call(W,ue)&&!C.hasOwnProperty(ue)&&(le[ue]=W[ue]);var pe=arguments.length-2;if(pe===1)le.children=te;else if(1<pe){for(var ne=Array(pe),_e=0;_e<pe;_e++)ne[_e]=arguments[_e+2];le.children=ne}if(L&&L.defaultProps)for(ue in pe=L.defaultProps,pe)le[ue]===void 0&&(le[ue]=pe[ue]);return{$$typeof:t,type:L,key:de,ref:Re,props:le,_owner:A.current}}function M(L,W){return{$$typeof:t,type:L.type,key:W,ref:L.ref,props:L.props,_owner:L._owner}}function H(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function z(L){var W={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(te){return W[te]})}var B=/\/+/g;function F(L,W){return typeof L=="object"&&L!==null&&L.key!=null?z(""+L.key):W.toString(36)}function J(L,W,te,ue,le){var de=typeof L;(de==="undefined"||de==="boolean")&&(L=null);var Re=!1;if(L===null)Re=!0;else switch(de){case"string":case"number":Re=!0;break;case"object":switch(L.$$typeof){case t:case e:Re=!0}}if(Re)return Re=L,le=le(Re),L=ue===""?"."+F(Re,0):ue,P(le)?(te="",L!=null&&(te=L.replace(B,"$&/")+"/"),J(le,W,te,"",function(_e){return _e})):le!=null&&(H(le)&&(le=M(le,te+(!le.key||Re&&Re.key===le.key?"":(""+le.key).replace(B,"$&/")+"/")+L)),W.push(le)),1;if(Re=0,ue=ue===""?".":ue+":",P(L))for(var pe=0;pe<L.length;pe++){de=L[pe];var ne=ue+F(de,pe);Re+=J(de,W,te,ne,le)}else if(ne=g(L),typeof ne=="function")for(L=ne.call(L),pe=0;!(de=L.next()).done;)de=de.value,ne=ue+F(de,pe++),Re+=J(de,W,te,ne,le);else if(de==="object")throw W=String(L),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.");return Re}function V(L,W,te){if(L==null)return L;var ue=[],le=0;return J(L,ue,"","",function(de){return W.call(te,de,le++)}),ue}function K(L){if(L._status===-1){var W=L._result;W=W(),W.then(function(te){(L._status===0||L._status===-1)&&(L._status=1,L._result=te)},function(te){(L._status===0||L._status===-1)&&(L._status=2,L._result=te)}),L._status===-1&&(L._status=0,L._result=W)}if(L._status===1)return L._result.default;throw L._result}var Z={current:null},G={transition:null},ee={ReactCurrentDispatcher:Z,ReactCurrentBatchConfig:G,ReactCurrentOwner:A};function U(){throw Error("act(...) is not supported in production builds of React.")}return Be.Children={map:V,forEach:function(L,W,te){V(L,function(){W.apply(this,arguments)},te)},count:function(L){var W=0;return V(L,function(){W++}),W},toArray:function(L){return V(L,function(W){return W})||[]},only:function(L){if(!H(L))throw Error("React.Children.only expected to receive a single React element child.");return L}},Be.Component=y,Be.Fragment=r,Be.Profiler=i,Be.PureComponent=k,Be.StrictMode=n,Be.Suspense=c,Be.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ee,Be.act=U,Be.cloneElement=function(L,W,te){if(L==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+L+".");var ue=w({},L.props),le=L.key,de=L.ref,Re=L._owner;if(W!=null){if(W.ref!==void 0&&(de=W.ref,Re=A.current),W.key!==void 0&&(le=""+W.key),L.type&&L.type.defaultProps)var pe=L.type.defaultProps;for(ne in W)O.call(W,ne)&&!C.hasOwnProperty(ne)&&(ue[ne]=W[ne]===void 0&&pe!==void 0?pe[ne]:W[ne])}var ne=arguments.length-2;if(ne===1)ue.children=te;else if(1<ne){pe=Array(ne);for(var _e=0;_e<ne;_e++)pe[_e]=arguments[_e+2];ue.children=pe}return{$$typeof:t,type:L.type,key:le,ref:de,props:ue,_owner:Re}},Be.createContext=function(L){return L={$$typeof:s,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},L.Provider={$$typeof:a,_context:L},L.Consumer=L},Be.createElement=R,Be.createFactory=function(L){var W=R.bind(null,L);return W.type=L,W},Be.createRef=function(){return{current:null}},Be.forwardRef=function(L){return{$$typeof:u,render:L}},Be.isValidElement=H,Be.lazy=function(L){return{$$typeof:p,_payload:{_status:-1,_result:L},_init:K}},Be.memo=function(L,W){return{$$typeof:f,type:L,compare:W===void 0?null:W}},Be.startTransition=function(L){var W=G.transition;G.transition={};try{L()}finally{G.transition=W}},Be.unstable_act=U,Be.useCallback=function(L,W){return Z.current.useCallback(L,W)},Be.useContext=function(L){return Z.current.useContext(L)},Be.useDebugValue=function(){},Be.useDeferredValue=function(L){return Z.current.useDeferredValue(L)},Be.useEffect=function(L,W){return Z.current.useEffect(L,W)},Be.useId=function(){return Z.current.useId()},Be.useImperativeHandle=function(L,W,te){return Z.current.useImperativeHandle(L,W,te)},Be.useInsertionEffect=function(L,W){return Z.current.useInsertionEffect(L,W)},Be.useLayoutEffect=function(L,W){return Z.current.useLayoutEffect(L,W)},Be.useMemo=function(L,W){return Z.current.useMemo(L,W)},Be.useReducer=function(L,W,te){return Z.current.useReducer(L,W,te)},Be.useRef=function(L){return Z.current.useRef(L)},Be.useState=function(L){return Z.current.useState(L)},Be.useSyncExternalStore=function(L,W,te){return Z.current.useSyncExternalStore(L,W,te)},Be.useTransition=function(){return Z.current.useTransition()},Be.version="18.3.1",Be}var LS;function Dw(){return LS||(LS=1,Im.exports=OL()),Im.exports}/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its 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 DS;function EL(){if(DS)return Ol;DS=1;var t=Dw(),e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(u,c,f){var p,h={},g=null,v=null;f!==void 0&&(g=""+f),c.key!==void 0&&(g=""+c.key),c.ref!==void 0&&(v=c.ref);for(p in c)n.call(c,p)&&!a.hasOwnProperty(p)&&(h[p]=c[p]);if(u&&u.defaultProps)for(p in c=u.defaultProps,c)h[p]===void 0&&(h[p]=c[p]);return{$$typeof:e,type:u,key:g,ref:v,props:h,_owner:i.current}}return Ol.Fragment=r,Ol.jsx=s,Ol.jsxs=s,Ol}var BS;function AL(){return BS||(BS=1,Rm.exports=EL()),Rm.exports}var j=AL(),$=Dw();const I=Ye($);var ff={},$m={exports:{}},wr={},Nm={exports:{}},Mm={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its 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 US;function PL(){return US||(US=1,(function(t){function e(G,ee){var U=G.length;G.push(ee);e:for(;0<U;){var L=U-1>>>1,W=G[L];if(0<i(W,ee))G[L]=ee,G[U]=W,U=L;else break e}}function r(G){return G.length===0?null:G[0]}function n(G){if(G.length===0)return null;var ee=G[0],U=G.pop();if(U!==ee){G[0]=U;e:for(var L=0,W=G.length,te=W>>>1;L<te;){var ue=2*(L+1)-1,le=G[ue],de=ue+1,Re=G[de];if(0>i(le,U))de<W&&0>i(Re,le)?(G[L]=Re,G[de]=U,L=de):(G[L]=le,G[ue]=U,L=ue);else if(de<W&&0>i(Re,U))G[L]=Re,G[de]=U,L=de;else break e}}return ee}function i(G,ee){var U=G.sortIndex-ee.sortIndex;return U!==0?U:G.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,u=s.now();t.unstable_now=function(){return s.now()-u}}var c=[],f=[],p=1,h=null,g=3,v=!1,w=!1,x=!1,y=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(G){for(var ee=r(f);ee!==null;){if(ee.callback===null)n(f);else if(ee.startTime<=G)n(f),ee.sortIndex=ee.expirationTime,e(c,ee);else break;ee=r(f)}}function P(G){if(x=!1,E(G),!w)if(r(c)!==null)w=!0,K(O);else{var ee=r(f);ee!==null&&Z(P,ee.startTime-G)}}function O(G,ee){w=!1,x&&(x=!1,S(R),R=-1),v=!0;var U=g;try{for(E(ee),h=r(c);h!==null&&(!(h.expirationTime>ee)||G&&!z());){var L=h.callback;if(typeof L=="function"){h.callback=null,g=h.priorityLevel;var W=L(h.expirationTime<=ee);ee=t.unstable_now(),typeof W=="function"?h.callback=W:h===r(c)&&n(c),E(ee)}else n(c);h=r(c)}if(h!==null)var te=!0;else{var ue=r(f);ue!==null&&Z(P,ue.startTime-ee),te=!1}return te}finally{h=null,g=U,v=!1}}var A=!1,C=null,R=-1,M=5,H=-1;function z(){return!(t.unstable_now()-H<M)}function B(){if(C!==null){var G=t.unstable_now();H=G;var ee=!0;try{ee=C(!0,G)}finally{ee?F():(A=!1,C=null)}}else A=!1}var F;if(typeof k=="function")F=function(){k(B)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,V=J.port2;J.port1.onmessage=B,F=function(){V.postMessage(null)}}else F=function(){y(B,0)};function K(G){C=G,A||(A=!0,F())}function Z(G,ee){R=y(function(){G(t.unstable_now())},ee)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(G){G.callback=null},t.unstable_continueExecution=function(){w||v||(w=!0,K(O))},t.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<G?Math.floor(1e3/G):5},t.unstable_getCurrentPriorityLevel=function(){return g},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(G){switch(g){case 1:case 2:case 3:var ee=3;break;default:ee=g}var U=g;g=ee;try{return G()}finally{g=U}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(G,ee){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var U=g;g=G;try{return ee()}finally{g=U}},t.unstable_scheduleCallback=function(G,ee,U){var L=t.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?L+U:L):U=L,G){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=U+W,G={id:p++,callback:ee,priorityLevel:G,startTime:U,expirationTime:W,sortIndex:-1},U>L?(G.sortIndex=U,e(f,G),r(c)===null&&G===r(f)&&(x?(S(R),R=-1):x=!0,Z(P,U-L))):(G.sortIndex=W,e(c,G),w||v||(w=!0,K(O))),G},t.unstable_shouldYield=z,t.unstable_wrapCallback=function(G){var ee=g;return function(){var U=g;g=ee;try{return G.apply(this,arguments)}finally{g=U}}}})(Mm)),Mm}var qS;function TL(){return qS||(qS=1,Nm.exports=PL()),Nm.exports}/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its 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 zS;function CL(){if(zS)return wr;zS=1;var t=Dw(),e=TL();function r(o){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+o,d=1;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d]);return"Minified React error #"+o+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,i={};function a(o,l){s(o,l),s(o+"Capture",l)}function s(o,l){for(i[o]=l,o=0;o<l.length;o++)n.add(l[o])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,f=/^[: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]*$/,p={},h={};function g(o){return c.call(h,o)?!0:c.call(p,o)?!1:f.test(o)?h[o]=!0:(p[o]=!0,!1)}function v(o,l,d,m){if(d!==null&&d.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return m?!1:d!==null?!d.acceptsBooleans:(o=o.toLowerCase().slice(0,5),o!=="data-"&&o!=="aria-");default:return!1}}function w(o,l,d,m){if(l===null||typeof l>"u"||v(o,l,d,m))return!0;if(m)return!1;if(d!==null)switch(d.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function x(o,l,d,m,b,_,T){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=m,this.attributeNamespace=b,this.mustUseProperty=d,this.propertyName=o,this.type=l,this.sanitizeURL=_,this.removeEmptyString=T}var y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(o){y[o]=new x(o,0,!1,o,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(o){var l=o[0];y[l]=new x(l,1,!1,o[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(o){y[o]=new x(o,2,!1,o.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(o){y[o]=new x(o,2,!1,o,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(o){y[o]=new x(o,3,!1,o.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(o){y[o]=new x(o,3,!0,o,null,!1,!1)}),["capture","download"].forEach(function(o){y[o]=new x(o,4,!1,o,null,!1,!1)}),["cols","rows","size","span"].forEach(function(o){y[o]=new x(o,6,!1,o,null,!1,!1)}),["rowSpan","start"].forEach(function(o){y[o]=new x(o,5,!1,o.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function k(o){return o[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(o){var l=o.replace(S,k);y[l]=new x(l,1,!1,o,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(o){var l=o.replace(S,k);y[l]=new x(l,1,!1,o,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(o){var l=o.replace(S,k);y[l]=new x(l,1,!1,o,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(o){y[o]=new x(o,1,!1,o.toLowerCase(),null,!1,!1)}),y.xlinkHref=new x("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(o){y[o]=new x(o,1,!1,o.toLowerCase(),null,!0,!0)});function E(o,l,d,m){var b=y.hasOwnProperty(l)?y[l]:null;(b!==null?b.type!==0:m||!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(w(l,d,b,m)&&(d=null),m||b===null?g(l)&&(d===null?o.removeAttribute(l):o.setAttribute(l,""+d)):b.mustUseProperty?o[b.propertyName]=d===null?b.type===3?!1:"":d:(l=b.attributeName,m=b.attributeNamespace,d===null?o.removeAttribute(l):(b=b.type,d=b===3||b===4&&d===!0?"":""+d,m?o.setAttributeNS(m,l,d):o.setAttribute(l,d))))}var P=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,O=Symbol.for("react.element"),A=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),H=Symbol.for("react.provider"),z=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),Z=Symbol.for("react.offscreen"),G=Symbol.iterator;function ee(o){return o===null||typeof o!="object"?null:(o=G&&o[G]||o["@@iterator"],typeof o=="function"?o:null)}var U=Object.assign,L;function W(o){if(L===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);L=l&&l[1]||""}return`
34
+ `+L+o}var te=!1;function ue(o,l){if(!o||te)return"";te=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(l)if(l=function(){throw Error()},Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(Q){var m=Q}Reflect.construct(o,[],l)}else{try{l.call()}catch(Q){m=Q}o.call(l.prototype)}else{try{throw Error()}catch(Q){m=Q}o()}}catch(Q){if(Q&&m&&typeof Q.stack=="string"){for(var b=Q.stack.split(`
35
+ `),_=m.stack.split(`
36
+ `),T=b.length-1,N=_.length-1;1<=T&&0<=N&&b[T]!==_[N];)N--;for(;1<=T&&0<=N;T--,N--)if(b[T]!==_[N]){if(T!==1||N!==1)do if(T--,N--,0>N||b[T]!==_[N]){var D=`
37
+ `+b[T].replace(" at new "," at ");return o.displayName&&D.includes("<anonymous>")&&(D=D.replace("<anonymous>",o.displayName)),D}while(1<=T&&0<=N);break}}}finally{te=!1,Error.prepareStackTrace=d}return(o=o?o.displayName||o.name:"")?W(o):""}function le(o){switch(o.tag){case 5:return W(o.type);case 16:return W("Lazy");case 13:return W("Suspense");case 19:return W("SuspenseList");case 0:case 2:case 15:return o=ue(o.type,!1),o;case 11:return o=ue(o.type.render,!1),o;case 1:return o=ue(o.type,!0),o;default:return""}}function de(o){if(o==null)return null;if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case C:return"Fragment";case A:return"Portal";case M:return"Profiler";case R:return"StrictMode";case F:return"Suspense";case J:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case z:return(o.displayName||"Context")+".Consumer";case H:return(o._context.displayName||"Context")+".Provider";case B:var l=o.render;return o=o.displayName,o||(o=l.displayName||l.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case V:return l=o.displayName||null,l!==null?l:de(o.type)||"Memo";case K:l=o._payload,o=o._init;try{return de(o(l))}catch{}}return null}function Re(o){var l=o.type;switch(o.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return o=l.render,o=o.displayName||o.name||"",l.displayName||(o!==""?"ForwardRef("+o+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return de(l);case 8:return l===R?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function pe(o){switch(typeof o){case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function ne(o){var l=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function _e(o){var l=ne(o)?"checked":"value",d=Object.getOwnPropertyDescriptor(o.constructor.prototype,l),m=""+o[l];if(!o.hasOwnProperty(l)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var b=d.get,_=d.set;return Object.defineProperty(o,l,{configurable:!0,get:function(){return b.call(this)},set:function(T){m=""+T,_.call(this,T)}}),Object.defineProperty(o,l,{enumerable:d.enumerable}),{getValue:function(){return m},setValue:function(T){m=""+T},stopTracking:function(){o._valueTracker=null,delete o[l]}}}}function Oe(o){o._valueTracker||(o._valueTracker=_e(o))}function ie(o){if(!o)return!1;var l=o._valueTracker;if(!l)return!0;var d=l.getValue(),m="";return o&&(m=ne(o)?o.checked?"true":"false":o.value),o=m,o!==d?(l.setValue(o),!0):!1}function ze(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}function Ie(o,l){var d=l.checked;return U({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??o._wrapperState.initialChecked})}function ct(o,l){var d=l.defaultValue==null?"":l.defaultValue,m=l.checked!=null?l.checked:l.defaultChecked;d=pe(l.value!=null?l.value:d),o._wrapperState={initialChecked:m,initialValue:d,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function at(o,l){l=l.checked,l!=null&&E(o,"checked",l,!1)}function ft(o,l){at(o,l);var d=pe(l.value),m=l.type;if(d!=null)m==="number"?(d===0&&o.value===""||o.value!=d)&&(o.value=""+d):o.value!==""+d&&(o.value=""+d);else if(m==="submit"||m==="reset"){o.removeAttribute("value");return}l.hasOwnProperty("value")?St(o,l.type,d):l.hasOwnProperty("defaultValue")&&St(o,l.type,pe(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(o.defaultChecked=!!l.defaultChecked)}function pr(o,l,d){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var m=l.type;if(!(m!=="submit"&&m!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+o._wrapperState.initialValue,d||l===o.value||(o.value=l),o.defaultValue=l}d=o.name,d!==""&&(o.name=""),o.defaultChecked=!!o._wrapperState.initialChecked,d!==""&&(o.name=d)}function St(o,l,d){(l!=="number"||ze(o.ownerDocument)!==o)&&(d==null?o.defaultValue=""+o._wrapperState.initialValue:o.defaultValue!==""+d&&(o.defaultValue=""+d))}var Dr=Array.isArray;function er(o,l,d,m){if(o=o.options,l){l={};for(var b=0;b<d.length;b++)l["$"+d[b]]=!0;for(d=0;d<o.length;d++)b=l.hasOwnProperty("$"+o[d].value),o[d].selected!==b&&(o[d].selected=b),b&&m&&(o[d].defaultSelected=!0)}else{for(d=""+pe(d),l=null,b=0;b<o.length;b++){if(o[b].value===d){o[b].selected=!0,m&&(o[b].defaultSelected=!0);return}l!==null||o[b].disabled||(l=o[b])}l!==null&&(l.selected=!0)}}function ot(o,l){if(l.dangerouslySetInnerHTML!=null)throw Error(r(91));return U({},l,{value:void 0,defaultValue:void 0,children:""+o._wrapperState.initialValue})}function Er(o,l){var d=l.value;if(d==null){if(d=l.children,l=l.defaultValue,d!=null){if(l!=null)throw Error(r(92));if(Dr(d)){if(1<d.length)throw Error(r(93));d=d[0]}l=d}l==null&&(l=""),d=l}o._wrapperState={initialValue:pe(d)}}function la(o,l){var d=pe(l.value),m=pe(l.defaultValue);d!=null&&(d=""+d,d!==o.value&&(o.value=d),l.defaultValue==null&&o.defaultValue!==d&&(o.defaultValue=d)),m!=null&&(o.defaultValue=""+m)}function ua(o){var l=o.textContent;l===o._wrapperState.initialValue&&l!==""&&l!==null&&(o.value=l)}function ca(o){switch(o){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function qs(o,l){return o==null||o==="http://www.w3.org/1999/xhtml"?ca(l):o==="http://www.w3.org/2000/svg"&&l==="foreignObject"?"http://www.w3.org/1999/xhtml":o}var fa,ao=(function(o){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(l,d,m,b){MSApp.execUnsafeLocalFunction(function(){return o(l,d,m,b)})}:o})(function(o,l){if(o.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in o)o.innerHTML=l;else{for(fa=fa||document.createElement("div"),fa.innerHTML="<svg>"+l.valueOf().toString()+"</svg>",l=fa.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;l.firstChild;)o.appendChild(l.firstChild)}});function Br(o,l){if(l){var d=o.firstChild;if(d&&d===o.lastChild&&d.nodeType===3){d.nodeValue=l;return}}o.textContent=l}var _i={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Si=["Webkit","ms","Moz","O"];Object.keys(_i).forEach(function(o){Si.forEach(function(l){l=l+o.charAt(0).toUpperCase()+o.substring(1),_i[l]=_i[o]})});function tc(o,l,d){return l==null||typeof l=="boolean"||l===""?"":d||typeof l!="number"||l===0||_i.hasOwnProperty(o)&&_i[o]?(""+l).trim():l+"px"}function rc(o,l){o=o.style;for(var d in l)if(l.hasOwnProperty(d)){var m=d.indexOf("--")===0,b=tc(d,l[d],m);d==="float"&&(d="cssFloat"),m?o.setProperty(d,b):o[d]=b}}var nc=U({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function oo(o,l){if(l){if(nc[o]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(r(137,o));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(r(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(r(61))}if(l.style!=null&&typeof l.style!="object")throw Error(r(62))}}function zs(o,l){if(o.indexOf("-")===-1)return typeof l.is=="string";switch(o){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 da=null;function Ur(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Fs=null,ki=null,Vn=null;function Ws(o){if(o=cl(o)){if(typeof Fs!="function")throw Error(r(280));var l=o.stateNode;l&&(l=kc(l),Fs(o.stateNode,o.type,l))}}function Ne(o){ki?Vn?Vn.push(o):Vn=[o]:ki=o}function wt(){if(ki){var o=ki,l=Vn;if(Vn=ki=null,Ws(o),l)for(o=0;o<l.length;o++)Ws(l[o])}}function Ct(o,l){return o(l)}function tr(){}var Oi=!1;function kt(o,l,d){if(Oi)return o(l,d);Oi=!0;try{return Ct(o,l,d)}finally{Oi=!1,(ki!==null||Vn!==null)&&(tr(),wt())}}function Bt(o,l){var d=o.stateNode;if(d===null)return null;var m=kc(d);if(m===null)return null;d=m[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(o=o.type,m=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!m;break e;default:o=!1}if(o)return null;if(d&&typeof d!="function")throw Error(r(231,l,typeof d));return d}var Ei=!1;if(u)try{var Kt={};Object.defineProperty(Kt,"passive",{get:function(){Ei=!0}}),window.addEventListener("test",Kt,Kt),window.removeEventListener("test",Kt,Kt)}catch{Ei=!1}function Ar(o,l,d,m,b,_,T,N,D){var Q=Array.prototype.slice.call(arguments,3);try{l.apply(d,Q)}catch(oe){this.onError(oe)}}var Ai=!1,qr=null,Hs=!1,Jh=null,CN={onError:function(o){Ai=!0,qr=o}};function jN(o,l,d,m,b,_,T,N,D){Ai=!1,qr=null,Ar.apply(CN,arguments)}function RN(o,l,d,m,b,_,T,N,D){if(jN.apply(this,arguments),Ai){if(Ai){var Q=qr;Ai=!1,qr=null}else throw Error(r(198));Hs||(Hs=!0,Jh=Q)}}function ha(o){var l=o,d=o;if(o.alternate)for(;l.return;)l=l.return;else{o=l;do l=o,(l.flags&4098)!==0&&(d=l.return),o=l.return;while(o)}return l.tag===3?d:null}function a_(o){if(o.tag===13){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function o_(o){if(ha(o)!==o)throw Error(r(188))}function IN(o){var l=o.alternate;if(!l){if(l=ha(o),l===null)throw Error(r(188));return l!==o?null:o}for(var d=o,m=l;;){var b=d.return;if(b===null)break;var _=b.alternate;if(_===null){if(m=b.return,m!==null){d=m;continue}break}if(b.child===_.child){for(_=b.child;_;){if(_===d)return o_(b),o;if(_===m)return o_(b),l;_=_.sibling}throw Error(r(188))}if(d.return!==m.return)d=b,m=_;else{for(var T=!1,N=b.child;N;){if(N===d){T=!0,d=b,m=_;break}if(N===m){T=!0,m=b,d=_;break}N=N.sibling}if(!T){for(N=_.child;N;){if(N===d){T=!0,d=_,m=b;break}if(N===m){T=!0,m=_,d=b;break}N=N.sibling}if(!T)throw Error(r(189))}}if(d.alternate!==m)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?o:l}function s_(o){return o=IN(o),o!==null?l_(o):null}function l_(o){if(o.tag===5||o.tag===6)return o;for(o=o.child;o!==null;){var l=l_(o);if(l!==null)return l;o=o.sibling}return null}var u_=e.unstable_scheduleCallback,c_=e.unstable_cancelCallback,$N=e.unstable_shouldYield,NN=e.unstable_requestPaint,xt=e.unstable_now,MN=e.unstable_getCurrentPriorityLevel,Qh=e.unstable_ImmediatePriority,f_=e.unstable_UserBlockingPriority,ic=e.unstable_NormalPriority,LN=e.unstable_LowPriority,d_=e.unstable_IdlePriority,ac=null,En=null;function DN(o){if(En&&typeof En.onCommitFiberRoot=="function")try{En.onCommitFiberRoot(ac,o,void 0,(o.current.flags&128)===128)}catch{}}var on=Math.clz32?Math.clz32:qN,BN=Math.log,UN=Math.LN2;function qN(o){return o>>>=0,o===0?32:31-(BN(o)/UN|0)|0}var oc=64,sc=4194304;function Vs(o){switch(o&-o){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: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 o&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return o&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return o}}function lc(o,l){var d=o.pendingLanes;if(d===0)return 0;var m=0,b=o.suspendedLanes,_=o.pingedLanes,T=d&268435455;if(T!==0){var N=T&~b;N!==0?m=Vs(N):(_&=T,_!==0&&(m=Vs(_)))}else T=d&~b,T!==0?m=Vs(T):_!==0&&(m=Vs(_));if(m===0)return 0;if(l!==0&&l!==m&&(l&b)===0&&(b=m&-m,_=l&-l,b>=_||b===16&&(_&4194240)!==0))return l;if((m&4)!==0&&(m|=d&16),l=o.entangledLanes,l!==0)for(o=o.entanglements,l&=m;0<l;)d=31-on(l),b=1<<d,m|=o[d],l&=~b;return m}function zN(o,l){switch(o){case 1:case 2:case 4:return l+250;case 8:case 16:case 32:case 64: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 l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function FN(o,l){for(var d=o.suspendedLanes,m=o.pingedLanes,b=o.expirationTimes,_=o.pendingLanes;0<_;){var T=31-on(_),N=1<<T,D=b[T];D===-1?((N&d)===0||(N&m)!==0)&&(b[T]=zN(N,l)):D<=l&&(o.expiredLanes|=N),_&=~N}}function Zh(o){return o=o.pendingLanes&-1073741825,o!==0?o:o&1073741824?1073741824:0}function h_(){var o=oc;return oc<<=1,(oc&4194240)===0&&(oc=64),o}function ep(o){for(var l=[],d=0;31>d;d++)l.push(o);return l}function Ks(o,l,d){o.pendingLanes|=l,l!==536870912&&(o.suspendedLanes=0,o.pingedLanes=0),o=o.eventTimes,l=31-on(l),o[l]=d}function WN(o,l){var d=o.pendingLanes&~l;o.pendingLanes=l,o.suspendedLanes=0,o.pingedLanes=0,o.expiredLanes&=l,o.mutableReadLanes&=l,o.entangledLanes&=l,l=o.entanglements;var m=o.eventTimes;for(o=o.expirationTimes;0<d;){var b=31-on(d),_=1<<b;l[b]=0,m[b]=-1,o[b]=-1,d&=~_}}function tp(o,l){var d=o.entangledLanes|=l;for(o=o.entanglements;d;){var m=31-on(d),b=1<<m;b&l|o[m]&l&&(o[m]|=l),d&=~b}}var Xe=0;function p_(o){return o&=-o,1<o?4<o?(o&268435455)!==0?16:536870912:4:1}var m_,rp,g_,v_,y_,np=!1,uc=[],Pi=null,Ti=null,Ci=null,Gs=new Map,Xs=new Map,ji=[],HN="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 submit".split(" ");function b_(o,l){switch(o){case"focusin":case"focusout":Pi=null;break;case"dragenter":case"dragleave":Ti=null;break;case"mouseover":case"mouseout":Ci=null;break;case"pointerover":case"pointerout":Gs.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Xs.delete(l.pointerId)}}function Ys(o,l,d,m,b,_){return o===null||o.nativeEvent!==_?(o={blockedOn:l,domEventName:d,eventSystemFlags:m,nativeEvent:_,targetContainers:[b]},l!==null&&(l=cl(l),l!==null&&rp(l)),o):(o.eventSystemFlags|=m,l=o.targetContainers,b!==null&&l.indexOf(b)===-1&&l.push(b),o)}function VN(o,l,d,m,b){switch(l){case"focusin":return Pi=Ys(Pi,o,l,d,m,b),!0;case"dragenter":return Ti=Ys(Ti,o,l,d,m,b),!0;case"mouseover":return Ci=Ys(Ci,o,l,d,m,b),!0;case"pointerover":var _=b.pointerId;return Gs.set(_,Ys(Gs.get(_)||null,o,l,d,m,b)),!0;case"gotpointercapture":return _=b.pointerId,Xs.set(_,Ys(Xs.get(_)||null,o,l,d,m,b)),!0}return!1}function w_(o){var l=pa(o.target);if(l!==null){var d=ha(l);if(d!==null){if(l=d.tag,l===13){if(l=a_(d),l!==null){o.blockedOn=l,y_(o.priority,function(){g_(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){o.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}o.blockedOn=null}function cc(o){if(o.blockedOn!==null)return!1;for(var l=o.targetContainers;0<l.length;){var d=ap(o.domEventName,o.eventSystemFlags,l[0],o.nativeEvent);if(d===null){d=o.nativeEvent;var m=new d.constructor(d.type,d);da=m,d.target.dispatchEvent(m),da=null}else return l=cl(d),l!==null&&rp(l),o.blockedOn=d,!1;l.shift()}return!0}function x_(o,l,d){cc(o)&&d.delete(l)}function KN(){np=!1,Pi!==null&&cc(Pi)&&(Pi=null),Ti!==null&&cc(Ti)&&(Ti=null),Ci!==null&&cc(Ci)&&(Ci=null),Gs.forEach(x_),Xs.forEach(x_)}function Js(o,l){o.blockedOn===l&&(o.blockedOn=null,np||(np=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,KN)))}function Qs(o){function l(b){return Js(b,o)}if(0<uc.length){Js(uc[0],o);for(var d=1;d<uc.length;d++){var m=uc[d];m.blockedOn===o&&(m.blockedOn=null)}}for(Pi!==null&&Js(Pi,o),Ti!==null&&Js(Ti,o),Ci!==null&&Js(Ci,o),Gs.forEach(l),Xs.forEach(l),d=0;d<ji.length;d++)m=ji[d],m.blockedOn===o&&(m.blockedOn=null);for(;0<ji.length&&(d=ji[0],d.blockedOn===null);)w_(d),d.blockedOn===null&&ji.shift()}var so=P.ReactCurrentBatchConfig,fc=!0;function GN(o,l,d,m){var b=Xe,_=so.transition;so.transition=null;try{Xe=1,ip(o,l,d,m)}finally{Xe=b,so.transition=_}}function XN(o,l,d,m){var b=Xe,_=so.transition;so.transition=null;try{Xe=4,ip(o,l,d,m)}finally{Xe=b,so.transition=_}}function ip(o,l,d,m){if(fc){var b=ap(o,l,d,m);if(b===null)_p(o,l,m,dc,d),b_(o,m);else if(VN(b,o,l,d,m))m.stopPropagation();else if(b_(o,m),l&4&&-1<HN.indexOf(o)){for(;b!==null;){var _=cl(b);if(_!==null&&m_(_),_=ap(o,l,d,m),_===null&&_p(o,l,m,dc,d),_===b)break;b=_}b!==null&&m.stopPropagation()}else _p(o,l,m,null,d)}}var dc=null;function ap(o,l,d,m){if(dc=null,o=Ur(m),o=pa(o),o!==null)if(l=ha(o),l===null)o=null;else if(d=l.tag,d===13){if(o=a_(l),o!==null)return o;o=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;o=null}else l!==o&&(o=null);return dc=o,null}function __(o){switch(o){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(MN()){case Qh:return 1;case f_:return 4;case ic:case LN:return 16;case d_:return 536870912;default:return 16}default:return 16}}var Ri=null,op=null,hc=null;function S_(){if(hc)return hc;var o,l=op,d=l.length,m,b="value"in Ri?Ri.value:Ri.textContent,_=b.length;for(o=0;o<d&&l[o]===b[o];o++);var T=d-o;for(m=1;m<=T&&l[d-m]===b[_-m];m++);return hc=b.slice(o,1<m?1-m:void 0)}function pc(o){var l=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&l===13&&(o=13)):o=l,o===10&&(o=13),32<=o||o===13?o:0}function mc(){return!0}function k_(){return!1}function Pr(o){function l(d,m,b,_,T){this._reactName=d,this._targetInst=b,this.type=m,this.nativeEvent=_,this.target=T,this.currentTarget=null;for(var N in o)o.hasOwnProperty(N)&&(d=o[N],this[N]=d?d(_):_[N]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?mc:k_,this.isPropagationStopped=k_,this}return U(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=mc)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=mc)},persist:function(){},isPersistent:mc}),l}var lo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},sp=Pr(lo),Zs=U({},lo,{view:0,detail:0}),YN=Pr(Zs),lp,up,el,gc=U({},Zs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fp,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==el&&(el&&o.type==="mousemove"?(lp=o.screenX-el.screenX,up=o.screenY-el.screenY):up=lp=0,el=o),lp)},movementY:function(o){return"movementY"in o?o.movementY:up}}),O_=Pr(gc),JN=U({},gc,{dataTransfer:0}),QN=Pr(JN),ZN=U({},Zs,{relatedTarget:0}),cp=Pr(ZN),eM=U({},lo,{animationName:0,elapsedTime:0,pseudoElement:0}),tM=Pr(eM),rM=U({},lo,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),nM=Pr(rM),iM=U({},lo,{data:0}),E_=Pr(iM),aM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},oM={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"},sM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function lM(o){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(o):(o=sM[o])?!!l[o]:!1}function fp(){return lM}var uM=U({},Zs,{key:function(o){if(o.key){var l=aM[o.key]||o.key;if(l!=="Unidentified")return l}return o.type==="keypress"?(o=pc(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?oM[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fp,charCode:function(o){return o.type==="keypress"?pc(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?pc(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),cM=Pr(uM),fM=U({},gc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),A_=Pr(fM),dM=U({},Zs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fp}),hM=Pr(dM),pM=U({},lo,{propertyName:0,elapsedTime:0,pseudoElement:0}),mM=Pr(pM),gM=U({},gc,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),vM=Pr(gM),yM=[9,13,27,32],dp=u&&"CompositionEvent"in window,tl=null;u&&"documentMode"in document&&(tl=document.documentMode);var bM=u&&"TextEvent"in window&&!tl,P_=u&&(!dp||tl&&8<tl&&11>=tl),T_=" ",C_=!1;function j_(o,l){switch(o){case"keyup":return yM.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function R_(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var uo=!1;function wM(o,l){switch(o){case"compositionend":return R_(l);case"keypress":return l.which!==32?null:(C_=!0,T_);case"textInput":return o=l.data,o===T_&&C_?null:o;default:return null}}function xM(o,l){if(uo)return o==="compositionend"||!dp&&j_(o,l)?(o=S_(),hc=op=Ri=null,uo=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return P_&&l.locale!=="ko"?null:l.data;default:return null}}var _M={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 I_(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l==="input"?!!_M[o.type]:l==="textarea"}function $_(o,l,d,m){Ne(m),l=xc(l,"onChange"),0<l.length&&(d=new sp("onChange","change",null,d,m),o.push({event:d,listeners:l}))}var rl=null,nl=null;function SM(o){Q_(o,0)}function vc(o){var l=mo(o);if(ie(l))return o}function kM(o,l){if(o==="change")return l}var N_=!1;if(u){var hp;if(u){var pp="oninput"in document;if(!pp){var M_=document.createElement("div");M_.setAttribute("oninput","return;"),pp=typeof M_.oninput=="function"}hp=pp}else hp=!1;N_=hp&&(!document.documentMode||9<document.documentMode)}function L_(){rl&&(rl.detachEvent("onpropertychange",D_),nl=rl=null)}function D_(o){if(o.propertyName==="value"&&vc(nl)){var l=[];$_(l,nl,o,Ur(o)),kt(SM,l)}}function OM(o,l,d){o==="focusin"?(L_(),rl=l,nl=d,rl.attachEvent("onpropertychange",D_)):o==="focusout"&&L_()}function EM(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return vc(nl)}function AM(o,l){if(o==="click")return vc(l)}function PM(o,l){if(o==="input"||o==="change")return vc(l)}function TM(o,l){return o===l&&(o!==0||1/o===1/l)||o!==o&&l!==l}var sn=typeof Object.is=="function"?Object.is:TM;function il(o,l){if(sn(o,l))return!0;if(typeof o!="object"||o===null||typeof l!="object"||l===null)return!1;var d=Object.keys(o),m=Object.keys(l);if(d.length!==m.length)return!1;for(m=0;m<d.length;m++){var b=d[m];if(!c.call(l,b)||!sn(o[b],l[b]))return!1}return!0}function B_(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function U_(o,l){var d=B_(o);o=0;for(var m;d;){if(d.nodeType===3){if(m=o+d.textContent.length,o<=l&&m>=l)return{node:d,offset:l-o};o=m}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=B_(d)}}function q_(o,l){return o&&l?o===l?!0:o&&o.nodeType===3?!1:l&&l.nodeType===3?q_(o,l.parentNode):"contains"in o?o.contains(l):o.compareDocumentPosition?!!(o.compareDocumentPosition(l)&16):!1:!1}function z_(){for(var o=window,l=ze();l instanceof o.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)o=l.contentWindow;else break;l=ze(o.document)}return l}function mp(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l&&(l==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||l==="textarea"||o.contentEditable==="true")}function CM(o){var l=z_(),d=o.focusedElem,m=o.selectionRange;if(l!==d&&d&&d.ownerDocument&&q_(d.ownerDocument.documentElement,d)){if(m!==null&&mp(d)){if(l=m.start,o=m.end,o===void 0&&(o=l),"selectionStart"in d)d.selectionStart=l,d.selectionEnd=Math.min(o,d.value.length);else if(o=(l=d.ownerDocument||document)&&l.defaultView||window,o.getSelection){o=o.getSelection();var b=d.textContent.length,_=Math.min(m.start,b);m=m.end===void 0?_:Math.min(m.end,b),!o.extend&&_>m&&(b=m,m=_,_=b),b=U_(d,_);var T=U_(d,m);b&&T&&(o.rangeCount!==1||o.anchorNode!==b.node||o.anchorOffset!==b.offset||o.focusNode!==T.node||o.focusOffset!==T.offset)&&(l=l.createRange(),l.setStart(b.node,b.offset),o.removeAllRanges(),_>m?(o.addRange(l),o.extend(T.node,T.offset)):(l.setEnd(T.node,T.offset),o.addRange(l)))}}for(l=[],o=d;o=o.parentNode;)o.nodeType===1&&l.push({element:o,left:o.scrollLeft,top:o.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<l.length;d++)o=l[d],o.element.scrollLeft=o.left,o.element.scrollTop=o.top}}var jM=u&&"documentMode"in document&&11>=document.documentMode,co=null,gp=null,al=null,vp=!1;function F_(o,l,d){var m=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;vp||co==null||co!==ze(m)||(m=co,"selectionStart"in m&&mp(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),al&&il(al,m)||(al=m,m=xc(gp,"onSelect"),0<m.length&&(l=new sp("onSelect","select",null,l,d),o.push({event:l,listeners:m}),l.target=co)))}function yc(o,l){var d={};return d[o.toLowerCase()]=l.toLowerCase(),d["Webkit"+o]="webkit"+l,d["Moz"+o]="moz"+l,d}var fo={animationend:yc("Animation","AnimationEnd"),animationiteration:yc("Animation","AnimationIteration"),animationstart:yc("Animation","AnimationStart"),transitionend:yc("Transition","TransitionEnd")},yp={},W_={};u&&(W_=document.createElement("div").style,"AnimationEvent"in window||(delete fo.animationend.animation,delete fo.animationiteration.animation,delete fo.animationstart.animation),"TransitionEvent"in window||delete fo.transitionend.transition);function bc(o){if(yp[o])return yp[o];if(!fo[o])return o;var l=fo[o],d;for(d in l)if(l.hasOwnProperty(d)&&d in W_)return yp[o]=l[d];return o}var H_=bc("animationend"),V_=bc("animationiteration"),K_=bc("animationstart"),G_=bc("transitionend"),X_=new Map,Y_="abort auxClick 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(" ");function Ii(o,l){X_.set(o,l),a(l,[o])}for(var bp=0;bp<Y_.length;bp++){var wp=Y_[bp],RM=wp.toLowerCase(),IM=wp[0].toUpperCase()+wp.slice(1);Ii(RM,"on"+IM)}Ii(H_,"onAnimationEnd"),Ii(V_,"onAnimationIteration"),Ii(K_,"onAnimationStart"),Ii("dblclick","onDoubleClick"),Ii("focusin","onFocus"),Ii("focusout","onBlur"),Ii(G_,"onTransitionEnd"),s("onMouseEnter",["mouseout","mouseover"]),s("onMouseLeave",["mouseout","mouseover"]),s("onPointerEnter",["pointerout","pointerover"]),s("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ol="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(" "),$M=new Set("cancel close invalid load scroll toggle".split(" ").concat(ol));function J_(o,l,d){var m=o.type||"unknown-event";o.currentTarget=d,RN(m,l,void 0,o),o.currentTarget=null}function Q_(o,l){l=(l&4)!==0;for(var d=0;d<o.length;d++){var m=o[d],b=m.event;m=m.listeners;e:{var _=void 0;if(l)for(var T=m.length-1;0<=T;T--){var N=m[T],D=N.instance,Q=N.currentTarget;if(N=N.listener,D!==_&&b.isPropagationStopped())break e;J_(b,N,Q),_=D}else for(T=0;T<m.length;T++){if(N=m[T],D=N.instance,Q=N.currentTarget,N=N.listener,D!==_&&b.isPropagationStopped())break e;J_(b,N,Q),_=D}}}if(Hs)throw o=Jh,Hs=!1,Jh=null,o}function st(o,l){var d=l[Pp];d===void 0&&(d=l[Pp]=new Set);var m=o+"__bubble";d.has(m)||(Z_(l,o,2,!1),d.add(m))}function xp(o,l,d){var m=0;l&&(m|=4),Z_(d,o,m,l)}var wc="_reactListening"+Math.random().toString(36).slice(2);function sl(o){if(!o[wc]){o[wc]=!0,n.forEach(function(d){d!=="selectionchange"&&($M.has(d)||xp(d,!1,o),xp(d,!0,o))});var l=o.nodeType===9?o:o.ownerDocument;l===null||l[wc]||(l[wc]=!0,xp("selectionchange",!1,l))}}function Z_(o,l,d,m){switch(__(l)){case 1:var b=GN;break;case 4:b=XN;break;default:b=ip}d=b.bind(null,l,d,o),b=void 0,!Ei||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(b=!0),m?b!==void 0?o.addEventListener(l,d,{capture:!0,passive:b}):o.addEventListener(l,d,!0):b!==void 0?o.addEventListener(l,d,{passive:b}):o.addEventListener(l,d,!1)}function _p(o,l,d,m,b){var _=m;if((l&1)===0&&(l&2)===0&&m!==null)e:for(;;){if(m===null)return;var T=m.tag;if(T===3||T===4){var N=m.stateNode.containerInfo;if(N===b||N.nodeType===8&&N.parentNode===b)break;if(T===4)for(T=m.return;T!==null;){var D=T.tag;if((D===3||D===4)&&(D=T.stateNode.containerInfo,D===b||D.nodeType===8&&D.parentNode===b))return;T=T.return}for(;N!==null;){if(T=pa(N),T===null)return;if(D=T.tag,D===5||D===6){m=_=T;continue e}N=N.parentNode}}m=m.return}kt(function(){var Q=_,oe=Ur(d),se=[];e:{var ae=X_.get(o);if(ae!==void 0){var me=sp,we=o;switch(o){case"keypress":if(pc(d)===0)break e;case"keydown":case"keyup":me=cM;break;case"focusin":we="focus",me=cp;break;case"focusout":we="blur",me=cp;break;case"beforeblur":case"afterblur":me=cp;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":me=O_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":me=QN;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":me=hM;break;case H_:case V_:case K_:me=tM;break;case G_:me=mM;break;case"scroll":me=YN;break;case"wheel":me=vM;break;case"copy":case"cut":case"paste":me=nM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":me=A_}var Se=(l&4)!==0,_t=!Se&&o==="scroll",X=Se?ae!==null?ae+"Capture":null:ae;Se=[];for(var q=Q,Y;q!==null;){Y=q;var ce=Y.stateNode;if(Y.tag===5&&ce!==null&&(Y=ce,X!==null&&(ce=Bt(q,X),ce!=null&&Se.push(ll(q,ce,Y)))),_t)break;q=q.return}0<Se.length&&(ae=new me(ae,we,null,d,oe),se.push({event:ae,listeners:Se}))}}if((l&7)===0){e:{if(ae=o==="mouseover"||o==="pointerover",me=o==="mouseout"||o==="pointerout",ae&&d!==da&&(we=d.relatedTarget||d.fromElement)&&(pa(we)||we[Kn]))break e;if((me||ae)&&(ae=oe.window===oe?oe:(ae=oe.ownerDocument)?ae.defaultView||ae.parentWindow:window,me?(we=d.relatedTarget||d.toElement,me=Q,we=we?pa(we):null,we!==null&&(_t=ha(we),we!==_t||we.tag!==5&&we.tag!==6)&&(we=null)):(me=null,we=Q),me!==we)){if(Se=O_,ce="onMouseLeave",X="onMouseEnter",q="mouse",(o==="pointerout"||o==="pointerover")&&(Se=A_,ce="onPointerLeave",X="onPointerEnter",q="pointer"),_t=me==null?ae:mo(me),Y=we==null?ae:mo(we),ae=new Se(ce,q+"leave",me,d,oe),ae.target=_t,ae.relatedTarget=Y,ce=null,pa(oe)===Q&&(Se=new Se(X,q+"enter",we,d,oe),Se.target=Y,Se.relatedTarget=_t,ce=Se),_t=ce,me&&we)t:{for(Se=me,X=we,q=0,Y=Se;Y;Y=ho(Y))q++;for(Y=0,ce=X;ce;ce=ho(ce))Y++;for(;0<q-Y;)Se=ho(Se),q--;for(;0<Y-q;)X=ho(X),Y--;for(;q--;){if(Se===X||X!==null&&Se===X.alternate)break t;Se=ho(Se),X=ho(X)}Se=null}else Se=null;me!==null&&e1(se,ae,me,Se,!1),we!==null&&_t!==null&&e1(se,_t,we,Se,!0)}}e:{if(ae=Q?mo(Q):window,me=ae.nodeName&&ae.nodeName.toLowerCase(),me==="select"||me==="input"&&ae.type==="file")var ke=kM;else if(I_(ae))if(N_)ke=PM;else{ke=EM;var Ae=OM}else(me=ae.nodeName)&&me.toLowerCase()==="input"&&(ae.type==="checkbox"||ae.type==="radio")&&(ke=AM);if(ke&&(ke=ke(o,Q))){$_(se,ke,d,oe);break e}Ae&&Ae(o,ae,Q),o==="focusout"&&(Ae=ae._wrapperState)&&Ae.controlled&&ae.type==="number"&&St(ae,"number",ae.value)}switch(Ae=Q?mo(Q):window,o){case"focusin":(I_(Ae)||Ae.contentEditable==="true")&&(co=Ae,gp=Q,al=null);break;case"focusout":al=gp=co=null;break;case"mousedown":vp=!0;break;case"contextmenu":case"mouseup":case"dragend":vp=!1,F_(se,d,oe);break;case"selectionchange":if(jM)break;case"keydown":case"keyup":F_(se,d,oe)}var Pe;if(dp)e:{switch(o){case"compositionstart":var je="onCompositionStart";break e;case"compositionend":je="onCompositionEnd";break e;case"compositionupdate":je="onCompositionUpdate";break e}je=void 0}else uo?j_(o,d)&&(je="onCompositionEnd"):o==="keydown"&&d.keyCode===229&&(je="onCompositionStart");je&&(P_&&d.locale!=="ko"&&(uo||je!=="onCompositionStart"?je==="onCompositionEnd"&&uo&&(Pe=S_()):(Ri=oe,op="value"in Ri?Ri.value:Ri.textContent,uo=!0)),Ae=xc(Q,je),0<Ae.length&&(je=new E_(je,o,null,d,oe),se.push({event:je,listeners:Ae}),Pe?je.data=Pe:(Pe=R_(d),Pe!==null&&(je.data=Pe)))),(Pe=bM?wM(o,d):xM(o,d))&&(Q=xc(Q,"onBeforeInput"),0<Q.length&&(oe=new E_("onBeforeInput","beforeinput",null,d,oe),se.push({event:oe,listeners:Q}),oe.data=Pe))}Q_(se,l)})}function ll(o,l,d){return{instance:o,listener:l,currentTarget:d}}function xc(o,l){for(var d=l+"Capture",m=[];o!==null;){var b=o,_=b.stateNode;b.tag===5&&_!==null&&(b=_,_=Bt(o,d),_!=null&&m.unshift(ll(o,_,b)),_=Bt(o,l),_!=null&&m.push(ll(o,_,b))),o=o.return}return m}function ho(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5);return o||null}function e1(o,l,d,m,b){for(var _=l._reactName,T=[];d!==null&&d!==m;){var N=d,D=N.alternate,Q=N.stateNode;if(D!==null&&D===m)break;N.tag===5&&Q!==null&&(N=Q,b?(D=Bt(d,_),D!=null&&T.unshift(ll(d,D,N))):b||(D=Bt(d,_),D!=null&&T.push(ll(d,D,N)))),d=d.return}T.length!==0&&o.push({event:l,listeners:T})}var NM=/\r\n?/g,MM=/\u0000|\uFFFD/g;function t1(o){return(typeof o=="string"?o:""+o).replace(NM,`
38
+ `).replace(MM,"")}function _c(o,l,d){if(l=t1(l),t1(o)!==l&&d)throw Error(r(425))}function Sc(){}var Sp=null,kp=null;function Op(o,l){return o==="textarea"||o==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var Ep=typeof setTimeout=="function"?setTimeout:void 0,LM=typeof clearTimeout=="function"?clearTimeout:void 0,r1=typeof Promise=="function"?Promise:void 0,DM=typeof queueMicrotask=="function"?queueMicrotask:typeof r1<"u"?function(o){return r1.resolve(null).then(o).catch(BM)}:Ep;function BM(o){setTimeout(function(){throw o})}function Ap(o,l){var d=l,m=0;do{var b=d.nextSibling;if(o.removeChild(d),b&&b.nodeType===8)if(d=b.data,d==="/$"){if(m===0){o.removeChild(b),Qs(l);return}m--}else d!=="$"&&d!=="$?"&&d!=="$!"||m++;d=b}while(d);Qs(l)}function $i(o){for(;o!=null;o=o.nextSibling){var l=o.nodeType;if(l===1||l===3)break;if(l===8){if(l=o.data,l==="$"||l==="$!"||l==="$?")break;if(l==="/$")return null}}return o}function n1(o){o=o.previousSibling;for(var l=0;o;){if(o.nodeType===8){var d=o.data;if(d==="$"||d==="$!"||d==="$?"){if(l===0)return o;l--}else d==="/$"&&l++}o=o.previousSibling}return null}var po=Math.random().toString(36).slice(2),An="__reactFiber$"+po,ul="__reactProps$"+po,Kn="__reactContainer$"+po,Pp="__reactEvents$"+po,UM="__reactListeners$"+po,qM="__reactHandles$"+po;function pa(o){var l=o[An];if(l)return l;for(var d=o.parentNode;d;){if(l=d[Kn]||d[An]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(o=n1(o);o!==null;){if(d=o[An])return d;o=n1(o)}return l}o=d,d=o.parentNode}return null}function cl(o){return o=o[An]||o[Kn],!o||o.tag!==5&&o.tag!==6&&o.tag!==13&&o.tag!==3?null:o}function mo(o){if(o.tag===5||o.tag===6)return o.stateNode;throw Error(r(33))}function kc(o){return o[ul]||null}var Tp=[],go=-1;function Ni(o){return{current:o}}function lt(o){0>go||(o.current=Tp[go],Tp[go]=null,go--)}function et(o,l){go++,Tp[go]=o.current,o.current=l}var Mi={},rr=Ni(Mi),mr=Ni(!1),ma=Mi;function vo(o,l){var d=o.type.contextTypes;if(!d)return Mi;var m=o.stateNode;if(m&&m.__reactInternalMemoizedUnmaskedChildContext===l)return m.__reactInternalMemoizedMaskedChildContext;var b={},_;for(_ in d)b[_]=l[_];return m&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=l,o.__reactInternalMemoizedMaskedChildContext=b),b}function gr(o){return o=o.childContextTypes,o!=null}function Oc(){lt(mr),lt(rr)}function i1(o,l,d){if(rr.current!==Mi)throw Error(r(168));et(rr,l),et(mr,d)}function a1(o,l,d){var m=o.stateNode;if(l=l.childContextTypes,typeof m.getChildContext!="function")return d;m=m.getChildContext();for(var b in m)if(!(b in l))throw Error(r(108,Re(o)||"Unknown",b));return U({},d,m)}function Ec(o){return o=(o=o.stateNode)&&o.__reactInternalMemoizedMergedChildContext||Mi,ma=rr.current,et(rr,o),et(mr,mr.current),!0}function o1(o,l,d){var m=o.stateNode;if(!m)throw Error(r(169));d?(o=a1(o,l,ma),m.__reactInternalMemoizedMergedChildContext=o,lt(mr),lt(rr),et(rr,o)):lt(mr),et(mr,d)}var Gn=null,Ac=!1,Cp=!1;function s1(o){Gn===null?Gn=[o]:Gn.push(o)}function zM(o){Ac=!0,s1(o)}function Li(){if(!Cp&&Gn!==null){Cp=!0;var o=0,l=Xe;try{var d=Gn;for(Xe=1;o<d.length;o++){var m=d[o];do m=m(!0);while(m!==null)}Gn=null,Ac=!1}catch(b){throw Gn!==null&&(Gn=Gn.slice(o+1)),u_(Qh,Li),b}finally{Xe=l,Cp=!1}}return null}var yo=[],bo=0,Pc=null,Tc=0,zr=[],Fr=0,ga=null,Xn=1,Yn="";function va(o,l){yo[bo++]=Tc,yo[bo++]=Pc,Pc=o,Tc=l}function l1(o,l,d){zr[Fr++]=Xn,zr[Fr++]=Yn,zr[Fr++]=ga,ga=o;var m=Xn;o=Yn;var b=32-on(m)-1;m&=~(1<<b),d+=1;var _=32-on(l)+b;if(30<_){var T=b-b%5;_=(m&(1<<T)-1).toString(32),m>>=T,b-=T,Xn=1<<32-on(l)+b|d<<b|m,Yn=_+o}else Xn=1<<_|d<<b|m,Yn=o}function jp(o){o.return!==null&&(va(o,1),l1(o,1,0))}function Rp(o){for(;o===Pc;)Pc=yo[--bo],yo[bo]=null,Tc=yo[--bo],yo[bo]=null;for(;o===ga;)ga=zr[--Fr],zr[Fr]=null,Yn=zr[--Fr],zr[Fr]=null,Xn=zr[--Fr],zr[Fr]=null}var Tr=null,Cr=null,dt=!1,ln=null;function u1(o,l){var d=Kr(5,null,null,0);d.elementType="DELETED",d.stateNode=l,d.return=o,l=o.deletions,l===null?(o.deletions=[d],o.flags|=16):l.push(d)}function c1(o,l){switch(o.tag){case 5:var d=o.type;return l=l.nodeType!==1||d.toLowerCase()!==l.nodeName.toLowerCase()?null:l,l!==null?(o.stateNode=l,Tr=o,Cr=$i(l.firstChild),!0):!1;case 6:return l=o.pendingProps===""||l.nodeType!==3?null:l,l!==null?(o.stateNode=l,Tr=o,Cr=null,!0):!1;case 13:return l=l.nodeType!==8?null:l,l!==null?(d=ga!==null?{id:Xn,overflow:Yn}:null,o.memoizedState={dehydrated:l,treeContext:d,retryLane:1073741824},d=Kr(18,null,null,0),d.stateNode=l,d.return=o,o.child=d,Tr=o,Cr=null,!0):!1;default:return!1}}function Ip(o){return(o.mode&1)!==0&&(o.flags&128)===0}function $p(o){if(dt){var l=Cr;if(l){var d=l;if(!c1(o,l)){if(Ip(o))throw Error(r(418));l=$i(d.nextSibling);var m=Tr;l&&c1(o,l)?u1(m,d):(o.flags=o.flags&-4097|2,dt=!1,Tr=o)}}else{if(Ip(o))throw Error(r(418));o.flags=o.flags&-4097|2,dt=!1,Tr=o}}}function f1(o){for(o=o.return;o!==null&&o.tag!==5&&o.tag!==3&&o.tag!==13;)o=o.return;Tr=o}function Cc(o){if(o!==Tr)return!1;if(!dt)return f1(o),dt=!0,!1;var l;if((l=o.tag!==3)&&!(l=o.tag!==5)&&(l=o.type,l=l!=="head"&&l!=="body"&&!Op(o.type,o.memoizedProps)),l&&(l=Cr)){if(Ip(o))throw d1(),Error(r(418));for(;l;)u1(o,l),l=$i(l.nextSibling)}if(f1(o),o.tag===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));e:{for(o=o.nextSibling,l=0;o;){if(o.nodeType===8){var d=o.data;if(d==="/$"){if(l===0){Cr=$i(o.nextSibling);break e}l--}else d!=="$"&&d!=="$!"&&d!=="$?"||l++}o=o.nextSibling}Cr=null}}else Cr=Tr?$i(o.stateNode.nextSibling):null;return!0}function d1(){for(var o=Cr;o;)o=$i(o.nextSibling)}function wo(){Cr=Tr=null,dt=!1}function Np(o){ln===null?ln=[o]:ln.push(o)}var FM=P.ReactCurrentBatchConfig;function fl(o,l,d){if(o=d.ref,o!==null&&typeof o!="function"&&typeof o!="object"){if(d._owner){if(d=d._owner,d){if(d.tag!==1)throw Error(r(309));var m=d.stateNode}if(!m)throw Error(r(147,o));var b=m,_=""+o;return l!==null&&l.ref!==null&&typeof l.ref=="function"&&l.ref._stringRef===_?l.ref:(l=function(T){var N=b.refs;T===null?delete N[_]:N[_]=T},l._stringRef=_,l)}if(typeof o!="string")throw Error(r(284));if(!d._owner)throw Error(r(290,o))}return o}function jc(o,l){throw o=Object.prototype.toString.call(l),Error(r(31,o==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":o))}function h1(o){var l=o._init;return l(o._payload)}function p1(o){function l(X,q){if(o){var Y=X.deletions;Y===null?(X.deletions=[q],X.flags|=16):Y.push(q)}}function d(X,q){if(!o)return null;for(;q!==null;)l(X,q),q=q.sibling;return null}function m(X,q){for(X=new Map;q!==null;)q.key!==null?X.set(q.key,q):X.set(q.index,q),q=q.sibling;return X}function b(X,q){return X=Hi(X,q),X.index=0,X.sibling=null,X}function _(X,q,Y){return X.index=Y,o?(Y=X.alternate,Y!==null?(Y=Y.index,Y<q?(X.flags|=2,q):Y):(X.flags|=2,q)):(X.flags|=1048576,q)}function T(X){return o&&X.alternate===null&&(X.flags|=2),X}function N(X,q,Y,ce){return q===null||q.tag!==6?(q=Em(Y,X.mode,ce),q.return=X,q):(q=b(q,Y),q.return=X,q)}function D(X,q,Y,ce){var ke=Y.type;return ke===C?oe(X,q,Y.props.children,ce,Y.key):q!==null&&(q.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===K&&h1(ke)===q.type)?(ce=b(q,Y.props),ce.ref=fl(X,q,Y),ce.return=X,ce):(ce=tf(Y.type,Y.key,Y.props,null,X.mode,ce),ce.ref=fl(X,q,Y),ce.return=X,ce)}function Q(X,q,Y,ce){return q===null||q.tag!==4||q.stateNode.containerInfo!==Y.containerInfo||q.stateNode.implementation!==Y.implementation?(q=Am(Y,X.mode,ce),q.return=X,q):(q=b(q,Y.children||[]),q.return=X,q)}function oe(X,q,Y,ce,ke){return q===null||q.tag!==7?(q=Oa(Y,X.mode,ce,ke),q.return=X,q):(q=b(q,Y),q.return=X,q)}function se(X,q,Y){if(typeof q=="string"&&q!==""||typeof q=="number")return q=Em(""+q,X.mode,Y),q.return=X,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case O:return Y=tf(q.type,q.key,q.props,null,X.mode,Y),Y.ref=fl(X,null,q),Y.return=X,Y;case A:return q=Am(q,X.mode,Y),q.return=X,q;case K:var ce=q._init;return se(X,ce(q._payload),Y)}if(Dr(q)||ee(q))return q=Oa(q,X.mode,Y,null),q.return=X,q;jc(X,q)}return null}function ae(X,q,Y,ce){var ke=q!==null?q.key:null;if(typeof Y=="string"&&Y!==""||typeof Y=="number")return ke!==null?null:N(X,q,""+Y,ce);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case O:return Y.key===ke?D(X,q,Y,ce):null;case A:return Y.key===ke?Q(X,q,Y,ce):null;case K:return ke=Y._init,ae(X,q,ke(Y._payload),ce)}if(Dr(Y)||ee(Y))return ke!==null?null:oe(X,q,Y,ce,null);jc(X,Y)}return null}function me(X,q,Y,ce,ke){if(typeof ce=="string"&&ce!==""||typeof ce=="number")return X=X.get(Y)||null,N(q,X,""+ce,ke);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case O:return X=X.get(ce.key===null?Y:ce.key)||null,D(q,X,ce,ke);case A:return X=X.get(ce.key===null?Y:ce.key)||null,Q(q,X,ce,ke);case K:var Ae=ce._init;return me(X,q,Y,Ae(ce._payload),ke)}if(Dr(ce)||ee(ce))return X=X.get(Y)||null,oe(q,X,ce,ke,null);jc(q,ce)}return null}function we(X,q,Y,ce){for(var ke=null,Ae=null,Pe=q,je=q=0,zt=null;Pe!==null&&je<Y.length;je++){Pe.index>je?(zt=Pe,Pe=null):zt=Pe.sibling;var We=ae(X,Pe,Y[je],ce);if(We===null){Pe===null&&(Pe=zt);break}o&&Pe&&We.alternate===null&&l(X,Pe),q=_(We,q,je),Ae===null?ke=We:Ae.sibling=We,Ae=We,Pe=zt}if(je===Y.length)return d(X,Pe),dt&&va(X,je),ke;if(Pe===null){for(;je<Y.length;je++)Pe=se(X,Y[je],ce),Pe!==null&&(q=_(Pe,q,je),Ae===null?ke=Pe:Ae.sibling=Pe,Ae=Pe);return dt&&va(X,je),ke}for(Pe=m(X,Pe);je<Y.length;je++)zt=me(Pe,X,je,Y[je],ce),zt!==null&&(o&&zt.alternate!==null&&Pe.delete(zt.key===null?je:zt.key),q=_(zt,q,je),Ae===null?ke=zt:Ae.sibling=zt,Ae=zt);return o&&Pe.forEach(function(Vi){return l(X,Vi)}),dt&&va(X,je),ke}function Se(X,q,Y,ce){var ke=ee(Y);if(typeof ke!="function")throw Error(r(150));if(Y=ke.call(Y),Y==null)throw Error(r(151));for(var Ae=ke=null,Pe=q,je=q=0,zt=null,We=Y.next();Pe!==null&&!We.done;je++,We=Y.next()){Pe.index>je?(zt=Pe,Pe=null):zt=Pe.sibling;var Vi=ae(X,Pe,We.value,ce);if(Vi===null){Pe===null&&(Pe=zt);break}o&&Pe&&Vi.alternate===null&&l(X,Pe),q=_(Vi,q,je),Ae===null?ke=Vi:Ae.sibling=Vi,Ae=Vi,Pe=zt}if(We.done)return d(X,Pe),dt&&va(X,je),ke;if(Pe===null){for(;!We.done;je++,We=Y.next())We=se(X,We.value,ce),We!==null&&(q=_(We,q,je),Ae===null?ke=We:Ae.sibling=We,Ae=We);return dt&&va(X,je),ke}for(Pe=m(X,Pe);!We.done;je++,We=Y.next())We=me(Pe,X,je,We.value,ce),We!==null&&(o&&We.alternate!==null&&Pe.delete(We.key===null?je:We.key),q=_(We,q,je),Ae===null?ke=We:Ae.sibling=We,Ae=We);return o&&Pe.forEach(function(_L){return l(X,_L)}),dt&&va(X,je),ke}function _t(X,q,Y,ce){if(typeof Y=="object"&&Y!==null&&Y.type===C&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case O:e:{for(var ke=Y.key,Ae=q;Ae!==null;){if(Ae.key===ke){if(ke=Y.type,ke===C){if(Ae.tag===7){d(X,Ae.sibling),q=b(Ae,Y.props.children),q.return=X,X=q;break e}}else if(Ae.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===K&&h1(ke)===Ae.type){d(X,Ae.sibling),q=b(Ae,Y.props),q.ref=fl(X,Ae,Y),q.return=X,X=q;break e}d(X,Ae);break}else l(X,Ae);Ae=Ae.sibling}Y.type===C?(q=Oa(Y.props.children,X.mode,ce,Y.key),q.return=X,X=q):(ce=tf(Y.type,Y.key,Y.props,null,X.mode,ce),ce.ref=fl(X,q,Y),ce.return=X,X=ce)}return T(X);case A:e:{for(Ae=Y.key;q!==null;){if(q.key===Ae)if(q.tag===4&&q.stateNode.containerInfo===Y.containerInfo&&q.stateNode.implementation===Y.implementation){d(X,q.sibling),q=b(q,Y.children||[]),q.return=X,X=q;break e}else{d(X,q);break}else l(X,q);q=q.sibling}q=Am(Y,X.mode,ce),q.return=X,X=q}return T(X);case K:return Ae=Y._init,_t(X,q,Ae(Y._payload),ce)}if(Dr(Y))return we(X,q,Y,ce);if(ee(Y))return Se(X,q,Y,ce);jc(X,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"?(Y=""+Y,q!==null&&q.tag===6?(d(X,q.sibling),q=b(q,Y),q.return=X,X=q):(d(X,q),q=Em(Y,X.mode,ce),q.return=X,X=q),T(X)):d(X,q)}return _t}var xo=p1(!0),m1=p1(!1),Rc=Ni(null),Ic=null,_o=null,Mp=null;function Lp(){Mp=_o=Ic=null}function Dp(o){var l=Rc.current;lt(Rc),o._currentValue=l}function Bp(o,l,d){for(;o!==null;){var m=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,m!==null&&(m.childLanes|=l)):m!==null&&(m.childLanes&l)!==l&&(m.childLanes|=l),o===d)break;o=o.return}}function So(o,l){Ic=o,Mp=_o=null,o=o.dependencies,o!==null&&o.firstContext!==null&&((o.lanes&l)!==0&&(vr=!0),o.firstContext=null)}function Wr(o){var l=o._currentValue;if(Mp!==o)if(o={context:o,memoizedValue:l,next:null},_o===null){if(Ic===null)throw Error(r(308));_o=o,Ic.dependencies={lanes:0,firstContext:o}}else _o=_o.next=o;return l}var ya=null;function Up(o){ya===null?ya=[o]:ya.push(o)}function g1(o,l,d,m){var b=l.interleaved;return b===null?(d.next=d,Up(l)):(d.next=b.next,b.next=d),l.interleaved=d,Jn(o,m)}function Jn(o,l){o.lanes|=l;var d=o.alternate;for(d!==null&&(d.lanes|=l),d=o,o=o.return;o!==null;)o.childLanes|=l,d=o.alternate,d!==null&&(d.childLanes|=l),d=o,o=o.return;return d.tag===3?d.stateNode:null}var Di=!1;function qp(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function v1(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,effects:o.effects})}function Qn(o,l){return{eventTime:o,lane:l,tag:0,payload:null,callback:null,next:null}}function Bi(o,l,d){var m=o.updateQueue;if(m===null)return null;if(m=m.shared,(Fe&2)!==0){var b=m.pending;return b===null?l.next=l:(l.next=b.next,b.next=l),m.pending=l,Jn(o,d)}return b=m.interleaved,b===null?(l.next=l,Up(m)):(l.next=b.next,b.next=l),m.interleaved=l,Jn(o,d)}function $c(o,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194240)!==0)){var m=l.lanes;m&=o.pendingLanes,d|=m,l.lanes=d,tp(o,d)}}function y1(o,l){var d=o.updateQueue,m=o.alternate;if(m!==null&&(m=m.updateQueue,d===m)){var b=null,_=null;if(d=d.firstBaseUpdate,d!==null){do{var T={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};_===null?b=_=T:_=_.next=T,d=d.next}while(d!==null);_===null?b=_=l:_=_.next=l}else b=_=l;d={baseState:m.baseState,firstBaseUpdate:b,lastBaseUpdate:_,shared:m.shared,effects:m.effects},o.updateQueue=d;return}o=d.lastBaseUpdate,o===null?d.firstBaseUpdate=l:o.next=l,d.lastBaseUpdate=l}function Nc(o,l,d,m){var b=o.updateQueue;Di=!1;var _=b.firstBaseUpdate,T=b.lastBaseUpdate,N=b.shared.pending;if(N!==null){b.shared.pending=null;var D=N,Q=D.next;D.next=null,T===null?_=Q:T.next=Q,T=D;var oe=o.alternate;oe!==null&&(oe=oe.updateQueue,N=oe.lastBaseUpdate,N!==T&&(N===null?oe.firstBaseUpdate=Q:N.next=Q,oe.lastBaseUpdate=D))}if(_!==null){var se=b.baseState;T=0,oe=Q=D=null,N=_;do{var ae=N.lane,me=N.eventTime;if((m&ae)===ae){oe!==null&&(oe=oe.next={eventTime:me,lane:0,tag:N.tag,payload:N.payload,callback:N.callback,next:null});e:{var we=o,Se=N;switch(ae=l,me=d,Se.tag){case 1:if(we=Se.payload,typeof we=="function"){se=we.call(me,se,ae);break e}se=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=Se.payload,ae=typeof we=="function"?we.call(me,se,ae):we,ae==null)break e;se=U({},se,ae);break e;case 2:Di=!0}}N.callback!==null&&N.lane!==0&&(o.flags|=64,ae=b.effects,ae===null?b.effects=[N]:ae.push(N))}else me={eventTime:me,lane:ae,tag:N.tag,payload:N.payload,callback:N.callback,next:null},oe===null?(Q=oe=me,D=se):oe=oe.next=me,T|=ae;if(N=N.next,N===null){if(N=b.shared.pending,N===null)break;ae=N,N=ae.next,ae.next=null,b.lastBaseUpdate=ae,b.shared.pending=null}}while(!0);if(oe===null&&(D=se),b.baseState=D,b.firstBaseUpdate=Q,b.lastBaseUpdate=oe,l=b.shared.interleaved,l!==null){b=l;do T|=b.lane,b=b.next;while(b!==l)}else _===null&&(b.shared.lanes=0);xa|=T,o.lanes=T,o.memoizedState=se}}function b1(o,l,d){if(o=l.effects,l.effects=null,o!==null)for(l=0;l<o.length;l++){var m=o[l],b=m.callback;if(b!==null){if(m.callback=null,m=d,typeof b!="function")throw Error(r(191,b));b.call(m)}}}var dl={},Pn=Ni(dl),hl=Ni(dl),pl=Ni(dl);function ba(o){if(o===dl)throw Error(r(174));return o}function zp(o,l){switch(et(pl,l),et(hl,o),et(Pn,dl),o=l.nodeType,o){case 9:case 11:l=(l=l.documentElement)?l.namespaceURI:qs(null,"");break;default:o=o===8?l.parentNode:l,l=o.namespaceURI||null,o=o.tagName,l=qs(l,o)}lt(Pn),et(Pn,l)}function ko(){lt(Pn),lt(hl),lt(pl)}function w1(o){ba(pl.current);var l=ba(Pn.current),d=qs(l,o.type);l!==d&&(et(hl,o),et(Pn,d))}function Fp(o){hl.current===o&&(lt(Pn),lt(hl))}var mt=Ni(0);function Mc(o){for(var l=o;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||d.data==="$?"||d.data==="$!"))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var Wp=[];function Hp(){for(var o=0;o<Wp.length;o++)Wp[o]._workInProgressVersionPrimary=null;Wp.length=0}var Lc=P.ReactCurrentDispatcher,Vp=P.ReactCurrentBatchConfig,wa=0,gt=null,jt=null,Ut=null,Dc=!1,ml=!1,gl=0,WM=0;function nr(){throw Error(r(321))}function Kp(o,l){if(l===null)return!1;for(var d=0;d<l.length&&d<o.length;d++)if(!sn(o[d],l[d]))return!1;return!0}function Gp(o,l,d,m,b,_){if(wa=_,gt=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,Lc.current=o===null||o.memoizedState===null?GM:XM,o=d(m,b),ml){_=0;do{if(ml=!1,gl=0,25<=_)throw Error(r(301));_+=1,Ut=jt=null,l.updateQueue=null,Lc.current=YM,o=d(m,b)}while(ml)}if(Lc.current=qc,l=jt!==null&&jt.next!==null,wa=0,Ut=jt=gt=null,Dc=!1,l)throw Error(r(300));return o}function Xp(){var o=gl!==0;return gl=0,o}function Tn(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ut===null?gt.memoizedState=Ut=o:Ut=Ut.next=o,Ut}function Hr(){if(jt===null){var o=gt.alternate;o=o!==null?o.memoizedState:null}else o=jt.next;var l=Ut===null?gt.memoizedState:Ut.next;if(l!==null)Ut=l,jt=o;else{if(o===null)throw Error(r(310));jt=o,o={memoizedState:jt.memoizedState,baseState:jt.baseState,baseQueue:jt.baseQueue,queue:jt.queue,next:null},Ut===null?gt.memoizedState=Ut=o:Ut=Ut.next=o}return Ut}function vl(o,l){return typeof l=="function"?l(o):l}function Yp(o){var l=Hr(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=o;var m=jt,b=m.baseQueue,_=d.pending;if(_!==null){if(b!==null){var T=b.next;b.next=_.next,_.next=T}m.baseQueue=b=_,d.pending=null}if(b!==null){_=b.next,m=m.baseState;var N=T=null,D=null,Q=_;do{var oe=Q.lane;if((wa&oe)===oe)D!==null&&(D=D.next={lane:0,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),m=Q.hasEagerState?Q.eagerState:o(m,Q.action);else{var se={lane:oe,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null};D===null?(N=D=se,T=m):D=D.next=se,gt.lanes|=oe,xa|=oe}Q=Q.next}while(Q!==null&&Q!==_);D===null?T=m:D.next=N,sn(m,l.memoizedState)||(vr=!0),l.memoizedState=m,l.baseState=T,l.baseQueue=D,d.lastRenderedState=m}if(o=d.interleaved,o!==null){b=o;do _=b.lane,gt.lanes|=_,xa|=_,b=b.next;while(b!==o)}else b===null&&(d.lanes=0);return[l.memoizedState,d.dispatch]}function Jp(o){var l=Hr(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=o;var m=d.dispatch,b=d.pending,_=l.memoizedState;if(b!==null){d.pending=null;var T=b=b.next;do _=o(_,T.action),T=T.next;while(T!==b);sn(_,l.memoizedState)||(vr=!0),l.memoizedState=_,l.baseQueue===null&&(l.baseState=_),d.lastRenderedState=_}return[_,m]}function x1(){}function _1(o,l){var d=gt,m=Hr(),b=l(),_=!sn(m.memoizedState,b);if(_&&(m.memoizedState=b,vr=!0),m=m.queue,Qp(O1.bind(null,d,m,o),[o]),m.getSnapshot!==l||_||Ut!==null&&Ut.memoizedState.tag&1){if(d.flags|=2048,yl(9,k1.bind(null,d,m,b,l),void 0,null),qt===null)throw Error(r(349));(wa&30)!==0||S1(d,l,b)}return b}function S1(o,l,d){o.flags|=16384,o={getSnapshot:l,value:d},l=gt.updateQueue,l===null?(l={lastEffect:null,stores:null},gt.updateQueue=l,l.stores=[o]):(d=l.stores,d===null?l.stores=[o]:d.push(o))}function k1(o,l,d,m){l.value=d,l.getSnapshot=m,E1(l)&&A1(o)}function O1(o,l,d){return d(function(){E1(l)&&A1(o)})}function E1(o){var l=o.getSnapshot;o=o.value;try{var d=l();return!sn(o,d)}catch{return!0}}function A1(o){var l=Jn(o,1);l!==null&&dn(l,o,1,-1)}function P1(o){var l=Tn();return typeof o=="function"&&(o=o()),l.memoizedState=l.baseState=o,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:vl,lastRenderedState:o},l.queue=o,o=o.dispatch=KM.bind(null,gt,o),[l.memoizedState,o]}function yl(o,l,d,m){return o={tag:o,create:l,destroy:d,deps:m,next:null},l=gt.updateQueue,l===null?(l={lastEffect:null,stores:null},gt.updateQueue=l,l.lastEffect=o.next=o):(d=l.lastEffect,d===null?l.lastEffect=o.next=o:(m=d.next,d.next=o,o.next=m,l.lastEffect=o)),o}function T1(){return Hr().memoizedState}function Bc(o,l,d,m){var b=Tn();gt.flags|=o,b.memoizedState=yl(1|l,d,void 0,m===void 0?null:m)}function Uc(o,l,d,m){var b=Hr();m=m===void 0?null:m;var _=void 0;if(jt!==null){var T=jt.memoizedState;if(_=T.destroy,m!==null&&Kp(m,T.deps)){b.memoizedState=yl(l,d,_,m);return}}gt.flags|=o,b.memoizedState=yl(1|l,d,_,m)}function C1(o,l){return Bc(8390656,8,o,l)}function Qp(o,l){return Uc(2048,8,o,l)}function j1(o,l){return Uc(4,2,o,l)}function R1(o,l){return Uc(4,4,o,l)}function I1(o,l){if(typeof l=="function")return o=o(),l(o),function(){l(null)};if(l!=null)return o=o(),l.current=o,function(){l.current=null}}function $1(o,l,d){return d=d!=null?d.concat([o]):null,Uc(4,4,I1.bind(null,l,o),d)}function Zp(){}function N1(o,l){var d=Hr();l=l===void 0?null:l;var m=d.memoizedState;return m!==null&&l!==null&&Kp(l,m[1])?m[0]:(d.memoizedState=[o,l],o)}function M1(o,l){var d=Hr();l=l===void 0?null:l;var m=d.memoizedState;return m!==null&&l!==null&&Kp(l,m[1])?m[0]:(o=o(),d.memoizedState=[o,l],o)}function L1(o,l,d){return(wa&21)===0?(o.baseState&&(o.baseState=!1,vr=!0),o.memoizedState=d):(sn(d,l)||(d=h_(),gt.lanes|=d,xa|=d,o.baseState=!0),l)}function HM(o,l){var d=Xe;Xe=d!==0&&4>d?d:4,o(!0);var m=Vp.transition;Vp.transition={};try{o(!1),l()}finally{Xe=d,Vp.transition=m}}function D1(){return Hr().memoizedState}function VM(o,l,d){var m=Fi(o);if(d={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null},B1(o))U1(l,d);else if(d=g1(o,l,d,m),d!==null){var b=cr();dn(d,o,m,b),q1(d,l,m)}}function KM(o,l,d){var m=Fi(o),b={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null};if(B1(o))U1(l,b);else{var _=o.alternate;if(o.lanes===0&&(_===null||_.lanes===0)&&(_=l.lastRenderedReducer,_!==null))try{var T=l.lastRenderedState,N=_(T,d);if(b.hasEagerState=!0,b.eagerState=N,sn(N,T)){var D=l.interleaved;D===null?(b.next=b,Up(l)):(b.next=D.next,D.next=b),l.interleaved=b;return}}catch{}finally{}d=g1(o,l,b,m),d!==null&&(b=cr(),dn(d,o,m,b),q1(d,l,m))}}function B1(o){var l=o.alternate;return o===gt||l!==null&&l===gt}function U1(o,l){ml=Dc=!0;var d=o.pending;d===null?l.next=l:(l.next=d.next,d.next=l),o.pending=l}function q1(o,l,d){if((d&4194240)!==0){var m=l.lanes;m&=o.pendingLanes,d|=m,l.lanes=d,tp(o,d)}}var qc={readContext:Wr,useCallback:nr,useContext:nr,useEffect:nr,useImperativeHandle:nr,useInsertionEffect:nr,useLayoutEffect:nr,useMemo:nr,useReducer:nr,useRef:nr,useState:nr,useDebugValue:nr,useDeferredValue:nr,useTransition:nr,useMutableSource:nr,useSyncExternalStore:nr,useId:nr,unstable_isNewReconciler:!1},GM={readContext:Wr,useCallback:function(o,l){return Tn().memoizedState=[o,l===void 0?null:l],o},useContext:Wr,useEffect:C1,useImperativeHandle:function(o,l,d){return d=d!=null?d.concat([o]):null,Bc(4194308,4,I1.bind(null,l,o),d)},useLayoutEffect:function(o,l){return Bc(4194308,4,o,l)},useInsertionEffect:function(o,l){return Bc(4,2,o,l)},useMemo:function(o,l){var d=Tn();return l=l===void 0?null:l,o=o(),d.memoizedState=[o,l],o},useReducer:function(o,l,d){var m=Tn();return l=d!==void 0?d(l):l,m.memoizedState=m.baseState=l,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:l},m.queue=o,o=o.dispatch=VM.bind(null,gt,o),[m.memoizedState,o]},useRef:function(o){var l=Tn();return o={current:o},l.memoizedState=o},useState:P1,useDebugValue:Zp,useDeferredValue:function(o){return Tn().memoizedState=o},useTransition:function(){var o=P1(!1),l=o[0];return o=HM.bind(null,o[1]),Tn().memoizedState=o,[l,o]},useMutableSource:function(){},useSyncExternalStore:function(o,l,d){var m=gt,b=Tn();if(dt){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),qt===null)throw Error(r(349));(wa&30)!==0||S1(m,l,d)}b.memoizedState=d;var _={value:d,getSnapshot:l};return b.queue=_,C1(O1.bind(null,m,_,o),[o]),m.flags|=2048,yl(9,k1.bind(null,m,_,d,l),void 0,null),d},useId:function(){var o=Tn(),l=qt.identifierPrefix;if(dt){var d=Yn,m=Xn;d=(m&~(1<<32-on(m)-1)).toString(32)+d,l=":"+l+"R"+d,d=gl++,0<d&&(l+="H"+d.toString(32)),l+=":"}else d=WM++,l=":"+l+"r"+d.toString(32)+":";return o.memoizedState=l},unstable_isNewReconciler:!1},XM={readContext:Wr,useCallback:N1,useContext:Wr,useEffect:Qp,useImperativeHandle:$1,useInsertionEffect:j1,useLayoutEffect:R1,useMemo:M1,useReducer:Yp,useRef:T1,useState:function(){return Yp(vl)},useDebugValue:Zp,useDeferredValue:function(o){var l=Hr();return L1(l,jt.memoizedState,o)},useTransition:function(){var o=Yp(vl)[0],l=Hr().memoizedState;return[o,l]},useMutableSource:x1,useSyncExternalStore:_1,useId:D1,unstable_isNewReconciler:!1},YM={readContext:Wr,useCallback:N1,useContext:Wr,useEffect:Qp,useImperativeHandle:$1,useInsertionEffect:j1,useLayoutEffect:R1,useMemo:M1,useReducer:Jp,useRef:T1,useState:function(){return Jp(vl)},useDebugValue:Zp,useDeferredValue:function(o){var l=Hr();return jt===null?l.memoizedState=o:L1(l,jt.memoizedState,o)},useTransition:function(){var o=Jp(vl)[0],l=Hr().memoizedState;return[o,l]},useMutableSource:x1,useSyncExternalStore:_1,useId:D1,unstable_isNewReconciler:!1};function un(o,l){if(o&&o.defaultProps){l=U({},l),o=o.defaultProps;for(var d in o)l[d]===void 0&&(l[d]=o[d]);return l}return l}function em(o,l,d,m){l=o.memoizedState,d=d(m,l),d=d==null?l:U({},l,d),o.memoizedState=d,o.lanes===0&&(o.updateQueue.baseState=d)}var zc={isMounted:function(o){return(o=o._reactInternals)?ha(o)===o:!1},enqueueSetState:function(o,l,d){o=o._reactInternals;var m=cr(),b=Fi(o),_=Qn(m,b);_.payload=l,d!=null&&(_.callback=d),l=Bi(o,_,b),l!==null&&(dn(l,o,b,m),$c(l,o,b))},enqueueReplaceState:function(o,l,d){o=o._reactInternals;var m=cr(),b=Fi(o),_=Qn(m,b);_.tag=1,_.payload=l,d!=null&&(_.callback=d),l=Bi(o,_,b),l!==null&&(dn(l,o,b,m),$c(l,o,b))},enqueueForceUpdate:function(o,l){o=o._reactInternals;var d=cr(),m=Fi(o),b=Qn(d,m);b.tag=2,l!=null&&(b.callback=l),l=Bi(o,b,m),l!==null&&(dn(l,o,m,d),$c(l,o,m))}};function z1(o,l,d,m,b,_,T){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(m,_,T):l.prototype&&l.prototype.isPureReactComponent?!il(d,m)||!il(b,_):!0}function F1(o,l,d){var m=!1,b=Mi,_=l.contextType;return typeof _=="object"&&_!==null?_=Wr(_):(b=gr(l)?ma:rr.current,m=l.contextTypes,_=(m=m!=null)?vo(o,b):Mi),l=new l(d,_),o.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=zc,o.stateNode=l,l._reactInternals=o,m&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=b,o.__reactInternalMemoizedMaskedChildContext=_),l}function W1(o,l,d,m){o=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,m),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,m),l.state!==o&&zc.enqueueReplaceState(l,l.state,null)}function tm(o,l,d,m){var b=o.stateNode;b.props=d,b.state=o.memoizedState,b.refs={},qp(o);var _=l.contextType;typeof _=="object"&&_!==null?b.context=Wr(_):(_=gr(l)?ma:rr.current,b.context=vo(o,_)),b.state=o.memoizedState,_=l.getDerivedStateFromProps,typeof _=="function"&&(em(o,l,_,d),b.state=o.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(l=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),l!==b.state&&zc.enqueueReplaceState(b,b.state,null),Nc(o,d,b,m),b.state=o.memoizedState),typeof b.componentDidMount=="function"&&(o.flags|=4194308)}function Oo(o,l){try{var d="",m=l;do d+=le(m),m=m.return;while(m);var b=d}catch(_){b=`
39
+ Error generating stack: `+_.message+`
40
+ `+_.stack}return{value:o,source:l,stack:b,digest:null}}function rm(o,l,d){return{value:o,source:null,stack:d??null,digest:l??null}}function nm(o,l){try{console.error(l.value)}catch(d){setTimeout(function(){throw d})}}var JM=typeof WeakMap=="function"?WeakMap:Map;function H1(o,l,d){d=Qn(-1,d),d.tag=3,d.payload={element:null};var m=l.value;return d.callback=function(){Xc||(Xc=!0,ym=m),nm(o,l)},d}function V1(o,l,d){d=Qn(-1,d),d.tag=3;var m=o.type.getDerivedStateFromError;if(typeof m=="function"){var b=l.value;d.payload=function(){return m(b)},d.callback=function(){nm(o,l)}}var _=o.stateNode;return _!==null&&typeof _.componentDidCatch=="function"&&(d.callback=function(){nm(o,l),typeof m!="function"&&(qi===null?qi=new Set([this]):qi.add(this));var T=l.stack;this.componentDidCatch(l.value,{componentStack:T!==null?T:""})}),d}function K1(o,l,d){var m=o.pingCache;if(m===null){m=o.pingCache=new JM;var b=new Set;m.set(l,b)}else b=m.get(l),b===void 0&&(b=new Set,m.set(l,b));b.has(d)||(b.add(d),o=fL.bind(null,o,l,d),l.then(o,o))}function G1(o){do{var l;if((l=o.tag===13)&&(l=o.memoizedState,l=l!==null?l.dehydrated!==null:!0),l)return o;o=o.return}while(o!==null);return null}function X1(o,l,d,m,b){return(o.mode&1)===0?(o===l?o.flags|=65536:(o.flags|=128,d.flags|=131072,d.flags&=-52805,d.tag===1&&(d.alternate===null?d.tag=17:(l=Qn(-1,1),l.tag=2,Bi(d,l,1))),d.lanes|=1),o):(o.flags|=65536,o.lanes=b,o)}var QM=P.ReactCurrentOwner,vr=!1;function ur(o,l,d,m){l.child=o===null?m1(l,null,d,m):xo(l,o.child,d,m)}function Y1(o,l,d,m,b){d=d.render;var _=l.ref;return So(l,b),m=Gp(o,l,d,m,_,b),d=Xp(),o!==null&&!vr?(l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~b,Zn(o,l,b)):(dt&&d&&jp(l),l.flags|=1,ur(o,l,m,b),l.child)}function J1(o,l,d,m,b){if(o===null){var _=d.type;return typeof _=="function"&&!Om(_)&&_.defaultProps===void 0&&d.compare===null&&d.defaultProps===void 0?(l.tag=15,l.type=_,Q1(o,l,_,m,b)):(o=tf(d.type,null,m,l,l.mode,b),o.ref=l.ref,o.return=l,l.child=o)}if(_=o.child,(o.lanes&b)===0){var T=_.memoizedProps;if(d=d.compare,d=d!==null?d:il,d(T,m)&&o.ref===l.ref)return Zn(o,l,b)}return l.flags|=1,o=Hi(_,m),o.ref=l.ref,o.return=l,l.child=o}function Q1(o,l,d,m,b){if(o!==null){var _=o.memoizedProps;if(il(_,m)&&o.ref===l.ref)if(vr=!1,l.pendingProps=m=_,(o.lanes&b)!==0)(o.flags&131072)!==0&&(vr=!0);else return l.lanes=o.lanes,Zn(o,l,b)}return im(o,l,d,m,b)}function Z1(o,l,d){var m=l.pendingProps,b=m.children,_=o!==null?o.memoizedState:null;if(m.mode==="hidden")if((l.mode&1)===0)l.memoizedState={baseLanes:0,cachePool:null,transitions:null},et(Ao,jr),jr|=d;else{if((d&1073741824)===0)return o=_!==null?_.baseLanes|d:d,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:o,cachePool:null,transitions:null},l.updateQueue=null,et(Ao,jr),jr|=o,null;l.memoizedState={baseLanes:0,cachePool:null,transitions:null},m=_!==null?_.baseLanes:d,et(Ao,jr),jr|=m}else _!==null?(m=_.baseLanes|d,l.memoizedState=null):m=d,et(Ao,jr),jr|=m;return ur(o,l,b,d),l.child}function eS(o,l){var d=l.ref;(o===null&&d!==null||o!==null&&o.ref!==d)&&(l.flags|=512,l.flags|=2097152)}function im(o,l,d,m,b){var _=gr(d)?ma:rr.current;return _=vo(l,_),So(l,b),d=Gp(o,l,d,m,_,b),m=Xp(),o!==null&&!vr?(l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~b,Zn(o,l,b)):(dt&&m&&jp(l),l.flags|=1,ur(o,l,d,b),l.child)}function tS(o,l,d,m,b){if(gr(d)){var _=!0;Ec(l)}else _=!1;if(So(l,b),l.stateNode===null)Wc(o,l),F1(l,d,m),tm(l,d,m,b),m=!0;else if(o===null){var T=l.stateNode,N=l.memoizedProps;T.props=N;var D=T.context,Q=d.contextType;typeof Q=="object"&&Q!==null?Q=Wr(Q):(Q=gr(d)?ma:rr.current,Q=vo(l,Q));var oe=d.getDerivedStateFromProps,se=typeof oe=="function"||typeof T.getSnapshotBeforeUpdate=="function";se||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(N!==m||D!==Q)&&W1(l,T,m,Q),Di=!1;var ae=l.memoizedState;T.state=ae,Nc(l,m,T,b),D=l.memoizedState,N!==m||ae!==D||mr.current||Di?(typeof oe=="function"&&(em(l,d,oe,m),D=l.memoizedState),(N=Di||z1(l,d,N,m,ae,D,Q))?(se||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount()),typeof T.componentDidMount=="function"&&(l.flags|=4194308)):(typeof T.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=m,l.memoizedState=D),T.props=m,T.state=D,T.context=Q,m=N):(typeof T.componentDidMount=="function"&&(l.flags|=4194308),m=!1)}else{T=l.stateNode,v1(o,l),N=l.memoizedProps,Q=l.type===l.elementType?N:un(l.type,N),T.props=Q,se=l.pendingProps,ae=T.context,D=d.contextType,typeof D=="object"&&D!==null?D=Wr(D):(D=gr(d)?ma:rr.current,D=vo(l,D));var me=d.getDerivedStateFromProps;(oe=typeof me=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(N!==se||ae!==D)&&W1(l,T,m,D),Di=!1,ae=l.memoizedState,T.state=ae,Nc(l,m,T,b);var we=l.memoizedState;N!==se||ae!==we||mr.current||Di?(typeof me=="function"&&(em(l,d,me,m),we=l.memoizedState),(Q=Di||z1(l,d,Q,m,ae,we,D)||!1)?(oe||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(m,we,D),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(m,we,D)),typeof T.componentDidUpdate=="function"&&(l.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof T.componentDidUpdate!="function"||N===o.memoizedProps&&ae===o.memoizedState||(l.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||N===o.memoizedProps&&ae===o.memoizedState||(l.flags|=1024),l.memoizedProps=m,l.memoizedState=we),T.props=m,T.state=we,T.context=D,m=Q):(typeof T.componentDidUpdate!="function"||N===o.memoizedProps&&ae===o.memoizedState||(l.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||N===o.memoizedProps&&ae===o.memoizedState||(l.flags|=1024),m=!1)}return am(o,l,d,m,_,b)}function am(o,l,d,m,b,_){eS(o,l);var T=(l.flags&128)!==0;if(!m&&!T)return b&&o1(l,d,!1),Zn(o,l,_);m=l.stateNode,QM.current=l;var N=T&&typeof d.getDerivedStateFromError!="function"?null:m.render();return l.flags|=1,o!==null&&T?(l.child=xo(l,o.child,null,_),l.child=xo(l,null,N,_)):ur(o,l,N,_),l.memoizedState=m.state,b&&o1(l,d,!0),l.child}function rS(o){var l=o.stateNode;l.pendingContext?i1(o,l.pendingContext,l.pendingContext!==l.context):l.context&&i1(o,l.context,!1),zp(o,l.containerInfo)}function nS(o,l,d,m,b){return wo(),Np(b),l.flags|=256,ur(o,l,d,m),l.child}var om={dehydrated:null,treeContext:null,retryLane:0};function sm(o){return{baseLanes:o,cachePool:null,transitions:null}}function iS(o,l,d){var m=l.pendingProps,b=mt.current,_=!1,T=(l.flags&128)!==0,N;if((N=T)||(N=o!==null&&o.memoizedState===null?!1:(b&2)!==0),N?(_=!0,l.flags&=-129):(o===null||o.memoizedState!==null)&&(b|=1),et(mt,b&1),o===null)return $p(l),o=l.memoizedState,o!==null&&(o=o.dehydrated,o!==null)?((l.mode&1)===0?l.lanes=1:o.data==="$!"?l.lanes=8:l.lanes=1073741824,null):(T=m.children,o=m.fallback,_?(m=l.mode,_=l.child,T={mode:"hidden",children:T},(m&1)===0&&_!==null?(_.childLanes=0,_.pendingProps=T):_=rf(T,m,0,null),o=Oa(o,m,d,null),_.return=l,o.return=l,_.sibling=o,l.child=_,l.child.memoizedState=sm(d),l.memoizedState=om,o):lm(l,T));if(b=o.memoizedState,b!==null&&(N=b.dehydrated,N!==null))return ZM(o,l,T,m,N,b,d);if(_){_=m.fallback,T=l.mode,b=o.child,N=b.sibling;var D={mode:"hidden",children:m.children};return(T&1)===0&&l.child!==b?(m=l.child,m.childLanes=0,m.pendingProps=D,l.deletions=null):(m=Hi(b,D),m.subtreeFlags=b.subtreeFlags&14680064),N!==null?_=Hi(N,_):(_=Oa(_,T,d,null),_.flags|=2),_.return=l,m.return=l,m.sibling=_,l.child=m,m=_,_=l.child,T=o.child.memoizedState,T=T===null?sm(d):{baseLanes:T.baseLanes|d,cachePool:null,transitions:T.transitions},_.memoizedState=T,_.childLanes=o.childLanes&~d,l.memoizedState=om,m}return _=o.child,o=_.sibling,m=Hi(_,{mode:"visible",children:m.children}),(l.mode&1)===0&&(m.lanes=d),m.return=l,m.sibling=null,o!==null&&(d=l.deletions,d===null?(l.deletions=[o],l.flags|=16):d.push(o)),l.child=m,l.memoizedState=null,m}function lm(o,l){return l=rf({mode:"visible",children:l},o.mode,0,null),l.return=o,o.child=l}function Fc(o,l,d,m){return m!==null&&Np(m),xo(l,o.child,null,d),o=lm(l,l.pendingProps.children),o.flags|=2,l.memoizedState=null,o}function ZM(o,l,d,m,b,_,T){if(d)return l.flags&256?(l.flags&=-257,m=rm(Error(r(422))),Fc(o,l,T,m)):l.memoizedState!==null?(l.child=o.child,l.flags|=128,null):(_=m.fallback,b=l.mode,m=rf({mode:"visible",children:m.children},b,0,null),_=Oa(_,b,T,null),_.flags|=2,m.return=l,_.return=l,m.sibling=_,l.child=m,(l.mode&1)!==0&&xo(l,o.child,null,T),l.child.memoizedState=sm(T),l.memoizedState=om,_);if((l.mode&1)===0)return Fc(o,l,T,null);if(b.data==="$!"){if(m=b.nextSibling&&b.nextSibling.dataset,m)var N=m.dgst;return m=N,_=Error(r(419)),m=rm(_,m,void 0),Fc(o,l,T,m)}if(N=(T&o.childLanes)!==0,vr||N){if(m=qt,m!==null){switch(T&-T){case 4:b=2;break;case 16:b=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:b=32;break;case 536870912:b=268435456;break;default:b=0}b=(b&(m.suspendedLanes|T))!==0?0:b,b!==0&&b!==_.retryLane&&(_.retryLane=b,Jn(o,b),dn(m,o,b,-1))}return km(),m=rm(Error(r(421))),Fc(o,l,T,m)}return b.data==="$?"?(l.flags|=128,l.child=o.child,l=dL.bind(null,o),b._reactRetry=l,null):(o=_.treeContext,Cr=$i(b.nextSibling),Tr=l,dt=!0,ln=null,o!==null&&(zr[Fr++]=Xn,zr[Fr++]=Yn,zr[Fr++]=ga,Xn=o.id,Yn=o.overflow,ga=l),l=lm(l,m.children),l.flags|=4096,l)}function aS(o,l,d){o.lanes|=l;var m=o.alternate;m!==null&&(m.lanes|=l),Bp(o.return,l,d)}function um(o,l,d,m,b){var _=o.memoizedState;_===null?o.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:m,tail:d,tailMode:b}:(_.isBackwards=l,_.rendering=null,_.renderingStartTime=0,_.last=m,_.tail=d,_.tailMode=b)}function oS(o,l,d){var m=l.pendingProps,b=m.revealOrder,_=m.tail;if(ur(o,l,m.children,d),m=mt.current,(m&2)!==0)m=m&1|2,l.flags|=128;else{if(o!==null&&(o.flags&128)!==0)e:for(o=l.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&aS(o,d,l);else if(o.tag===19)aS(o,d,l);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===l)break e;for(;o.sibling===null;){if(o.return===null||o.return===l)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}m&=1}if(et(mt,m),(l.mode&1)===0)l.memoizedState=null;else switch(b){case"forwards":for(d=l.child,b=null;d!==null;)o=d.alternate,o!==null&&Mc(o)===null&&(b=d),d=d.sibling;d=b,d===null?(b=l.child,l.child=null):(b=d.sibling,d.sibling=null),um(l,!1,b,d,_);break;case"backwards":for(d=null,b=l.child,l.child=null;b!==null;){if(o=b.alternate,o!==null&&Mc(o)===null){l.child=b;break}o=b.sibling,b.sibling=d,d=b,b=o}um(l,!0,d,null,_);break;case"together":um(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function Wc(o,l){(l.mode&1)===0&&o!==null&&(o.alternate=null,l.alternate=null,l.flags|=2)}function Zn(o,l,d){if(o!==null&&(l.dependencies=o.dependencies),xa|=l.lanes,(d&l.childLanes)===0)return null;if(o!==null&&l.child!==o.child)throw Error(r(153));if(l.child!==null){for(o=l.child,d=Hi(o,o.pendingProps),l.child=d,d.return=l;o.sibling!==null;)o=o.sibling,d=d.sibling=Hi(o,o.pendingProps),d.return=l;d.sibling=null}return l.child}function eL(o,l,d){switch(l.tag){case 3:rS(l),wo();break;case 5:w1(l);break;case 1:gr(l.type)&&Ec(l);break;case 4:zp(l,l.stateNode.containerInfo);break;case 10:var m=l.type._context,b=l.memoizedProps.value;et(Rc,m._currentValue),m._currentValue=b;break;case 13:if(m=l.memoizedState,m!==null)return m.dehydrated!==null?(et(mt,mt.current&1),l.flags|=128,null):(d&l.child.childLanes)!==0?iS(o,l,d):(et(mt,mt.current&1),o=Zn(o,l,d),o!==null?o.sibling:null);et(mt,mt.current&1);break;case 19:if(m=(d&l.childLanes)!==0,(o.flags&128)!==0){if(m)return oS(o,l,d);l.flags|=128}if(b=l.memoizedState,b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),et(mt,mt.current),m)break;return null;case 22:case 23:return l.lanes=0,Z1(o,l,d)}return Zn(o,l,d)}var sS,cm,lS,uS;sS=function(o,l){for(var d=l.child;d!==null;){if(d.tag===5||d.tag===6)o.appendChild(d.stateNode);else if(d.tag!==4&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===l)break;for(;d.sibling===null;){if(d.return===null||d.return===l)return;d=d.return}d.sibling.return=d.return,d=d.sibling}},cm=function(){},lS=function(o,l,d,m){var b=o.memoizedProps;if(b!==m){o=l.stateNode,ba(Pn.current);var _=null;switch(d){case"input":b=Ie(o,b),m=Ie(o,m),_=[];break;case"select":b=U({},b,{value:void 0}),m=U({},m,{value:void 0}),_=[];break;case"textarea":b=ot(o,b),m=ot(o,m),_=[];break;default:typeof b.onClick!="function"&&typeof m.onClick=="function"&&(o.onclick=Sc)}oo(d,m);var T;d=null;for(Q in b)if(!m.hasOwnProperty(Q)&&b.hasOwnProperty(Q)&&b[Q]!=null)if(Q==="style"){var N=b[Q];for(T in N)N.hasOwnProperty(T)&&(d||(d={}),d[T]="")}else Q!=="dangerouslySetInnerHTML"&&Q!=="children"&&Q!=="suppressContentEditableWarning"&&Q!=="suppressHydrationWarning"&&Q!=="autoFocus"&&(i.hasOwnProperty(Q)?_||(_=[]):(_=_||[]).push(Q,null));for(Q in m){var D=m[Q];if(N=b!=null?b[Q]:void 0,m.hasOwnProperty(Q)&&D!==N&&(D!=null||N!=null))if(Q==="style")if(N){for(T in N)!N.hasOwnProperty(T)||D&&D.hasOwnProperty(T)||(d||(d={}),d[T]="");for(T in D)D.hasOwnProperty(T)&&N[T]!==D[T]&&(d||(d={}),d[T]=D[T])}else d||(_||(_=[]),_.push(Q,d)),d=D;else Q==="dangerouslySetInnerHTML"?(D=D?D.__html:void 0,N=N?N.__html:void 0,D!=null&&N!==D&&(_=_||[]).push(Q,D)):Q==="children"?typeof D!="string"&&typeof D!="number"||(_=_||[]).push(Q,""+D):Q!=="suppressContentEditableWarning"&&Q!=="suppressHydrationWarning"&&(i.hasOwnProperty(Q)?(D!=null&&Q==="onScroll"&&st("scroll",o),_||N===D||(_=[])):(_=_||[]).push(Q,D))}d&&(_=_||[]).push("style",d);var Q=_;(l.updateQueue=Q)&&(l.flags|=4)}},uS=function(o,l,d,m){d!==m&&(l.flags|=4)};function bl(o,l){if(!dt)switch(o.tailMode){case"hidden":l=o.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?o.tail=null:d.sibling=null;break;case"collapsed":d=o.tail;for(var m=null;d!==null;)d.alternate!==null&&(m=d),d=d.sibling;m===null?l||o.tail===null?o.tail=null:o.tail.sibling=null:m.sibling=null}}function ir(o){var l=o.alternate!==null&&o.alternate.child===o.child,d=0,m=0;if(l)for(var b=o.child;b!==null;)d|=b.lanes|b.childLanes,m|=b.subtreeFlags&14680064,m|=b.flags&14680064,b.return=o,b=b.sibling;else for(b=o.child;b!==null;)d|=b.lanes|b.childLanes,m|=b.subtreeFlags,m|=b.flags,b.return=o,b=b.sibling;return o.subtreeFlags|=m,o.childLanes=d,l}function tL(o,l,d){var m=l.pendingProps;switch(Rp(l),l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ir(l),null;case 1:return gr(l.type)&&Oc(),ir(l),null;case 3:return m=l.stateNode,ko(),lt(mr),lt(rr),Hp(),m.pendingContext&&(m.context=m.pendingContext,m.pendingContext=null),(o===null||o.child===null)&&(Cc(l)?l.flags|=4:o===null||o.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,ln!==null&&(xm(ln),ln=null))),cm(o,l),ir(l),null;case 5:Fp(l);var b=ba(pl.current);if(d=l.type,o!==null&&l.stateNode!=null)lS(o,l,d,m,b),o.ref!==l.ref&&(l.flags|=512,l.flags|=2097152);else{if(!m){if(l.stateNode===null)throw Error(r(166));return ir(l),null}if(o=ba(Pn.current),Cc(l)){m=l.stateNode,d=l.type;var _=l.memoizedProps;switch(m[An]=l,m[ul]=_,o=(l.mode&1)!==0,d){case"dialog":st("cancel",m),st("close",m);break;case"iframe":case"object":case"embed":st("load",m);break;case"video":case"audio":for(b=0;b<ol.length;b++)st(ol[b],m);break;case"source":st("error",m);break;case"img":case"image":case"link":st("error",m),st("load",m);break;case"details":st("toggle",m);break;case"input":ct(m,_),st("invalid",m);break;case"select":m._wrapperState={wasMultiple:!!_.multiple},st("invalid",m);break;case"textarea":Er(m,_),st("invalid",m)}oo(d,_),b=null;for(var T in _)if(_.hasOwnProperty(T)){var N=_[T];T==="children"?typeof N=="string"?m.textContent!==N&&(_.suppressHydrationWarning!==!0&&_c(m.textContent,N,o),b=["children",N]):typeof N=="number"&&m.textContent!==""+N&&(_.suppressHydrationWarning!==!0&&_c(m.textContent,N,o),b=["children",""+N]):i.hasOwnProperty(T)&&N!=null&&T==="onScroll"&&st("scroll",m)}switch(d){case"input":Oe(m),pr(m,_,!0);break;case"textarea":Oe(m),ua(m);break;case"select":case"option":break;default:typeof _.onClick=="function"&&(m.onclick=Sc)}m=b,l.updateQueue=m,m!==null&&(l.flags|=4)}else{T=b.nodeType===9?b:b.ownerDocument,o==="http://www.w3.org/1999/xhtml"&&(o=ca(d)),o==="http://www.w3.org/1999/xhtml"?d==="script"?(o=T.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild)):typeof m.is=="string"?o=T.createElement(d,{is:m.is}):(o=T.createElement(d),d==="select"&&(T=o,m.multiple?T.multiple=!0:m.size&&(T.size=m.size))):o=T.createElementNS(o,d),o[An]=l,o[ul]=m,sS(o,l,!1,!1),l.stateNode=o;e:{switch(T=zs(d,m),d){case"dialog":st("cancel",o),st("close",o),b=m;break;case"iframe":case"object":case"embed":st("load",o),b=m;break;case"video":case"audio":for(b=0;b<ol.length;b++)st(ol[b],o);b=m;break;case"source":st("error",o),b=m;break;case"img":case"image":case"link":st("error",o),st("load",o),b=m;break;case"details":st("toggle",o),b=m;break;case"input":ct(o,m),b=Ie(o,m),st("invalid",o);break;case"option":b=m;break;case"select":o._wrapperState={wasMultiple:!!m.multiple},b=U({},m,{value:void 0}),st("invalid",o);break;case"textarea":Er(o,m),b=ot(o,m),st("invalid",o);break;default:b=m}oo(d,b),N=b;for(_ in N)if(N.hasOwnProperty(_)){var D=N[_];_==="style"?rc(o,D):_==="dangerouslySetInnerHTML"?(D=D?D.__html:void 0,D!=null&&ao(o,D)):_==="children"?typeof D=="string"?(d!=="textarea"||D!=="")&&Br(o,D):typeof D=="number"&&Br(o,""+D):_!=="suppressContentEditableWarning"&&_!=="suppressHydrationWarning"&&_!=="autoFocus"&&(i.hasOwnProperty(_)?D!=null&&_==="onScroll"&&st("scroll",o):D!=null&&E(o,_,D,T))}switch(d){case"input":Oe(o),pr(o,m,!1);break;case"textarea":Oe(o),ua(o);break;case"option":m.value!=null&&o.setAttribute("value",""+pe(m.value));break;case"select":o.multiple=!!m.multiple,_=m.value,_!=null?er(o,!!m.multiple,_,!1):m.defaultValue!=null&&er(o,!!m.multiple,m.defaultValue,!0);break;default:typeof b.onClick=="function"&&(o.onclick=Sc)}switch(d){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}}m&&(l.flags|=4)}l.ref!==null&&(l.flags|=512,l.flags|=2097152)}return ir(l),null;case 6:if(o&&l.stateNode!=null)uS(o,l,o.memoizedProps,m);else{if(typeof m!="string"&&l.stateNode===null)throw Error(r(166));if(d=ba(pl.current),ba(Pn.current),Cc(l)){if(m=l.stateNode,d=l.memoizedProps,m[An]=l,(_=m.nodeValue!==d)&&(o=Tr,o!==null))switch(o.tag){case 3:_c(m.nodeValue,d,(o.mode&1)!==0);break;case 5:o.memoizedProps.suppressHydrationWarning!==!0&&_c(m.nodeValue,d,(o.mode&1)!==0)}_&&(l.flags|=4)}else m=(d.nodeType===9?d:d.ownerDocument).createTextNode(m),m[An]=l,l.stateNode=m}return ir(l),null;case 13:if(lt(mt),m=l.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(dt&&Cr!==null&&(l.mode&1)!==0&&(l.flags&128)===0)d1(),wo(),l.flags|=98560,_=!1;else if(_=Cc(l),m!==null&&m.dehydrated!==null){if(o===null){if(!_)throw Error(r(318));if(_=l.memoizedState,_=_!==null?_.dehydrated:null,!_)throw Error(r(317));_[An]=l}else wo(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;ir(l),_=!1}else ln!==null&&(xm(ln),ln=null),_=!0;if(!_)return l.flags&65536?l:null}return(l.flags&128)!==0?(l.lanes=d,l):(m=m!==null,m!==(o!==null&&o.memoizedState!==null)&&m&&(l.child.flags|=8192,(l.mode&1)!==0&&(o===null||(mt.current&1)!==0?Rt===0&&(Rt=3):km())),l.updateQueue!==null&&(l.flags|=4),ir(l),null);case 4:return ko(),cm(o,l),o===null&&sl(l.stateNode.containerInfo),ir(l),null;case 10:return Dp(l.type._context),ir(l),null;case 17:return gr(l.type)&&Oc(),ir(l),null;case 19:if(lt(mt),_=l.memoizedState,_===null)return ir(l),null;if(m=(l.flags&128)!==0,T=_.rendering,T===null)if(m)bl(_,!1);else{if(Rt!==0||o!==null&&(o.flags&128)!==0)for(o=l.child;o!==null;){if(T=Mc(o),T!==null){for(l.flags|=128,bl(_,!1),m=T.updateQueue,m!==null&&(l.updateQueue=m,l.flags|=4),l.subtreeFlags=0,m=d,d=l.child;d!==null;)_=d,o=m,_.flags&=14680066,T=_.alternate,T===null?(_.childLanes=0,_.lanes=o,_.child=null,_.subtreeFlags=0,_.memoizedProps=null,_.memoizedState=null,_.updateQueue=null,_.dependencies=null,_.stateNode=null):(_.childLanes=T.childLanes,_.lanes=T.lanes,_.child=T.child,_.subtreeFlags=0,_.deletions=null,_.memoizedProps=T.memoizedProps,_.memoizedState=T.memoizedState,_.updateQueue=T.updateQueue,_.type=T.type,o=T.dependencies,_.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),d=d.sibling;return et(mt,mt.current&1|2),l.child}o=o.sibling}_.tail!==null&&xt()>Po&&(l.flags|=128,m=!0,bl(_,!1),l.lanes=4194304)}else{if(!m)if(o=Mc(T),o!==null){if(l.flags|=128,m=!0,d=o.updateQueue,d!==null&&(l.updateQueue=d,l.flags|=4),bl(_,!0),_.tail===null&&_.tailMode==="hidden"&&!T.alternate&&!dt)return ir(l),null}else 2*xt()-_.renderingStartTime>Po&&d!==1073741824&&(l.flags|=128,m=!0,bl(_,!1),l.lanes=4194304);_.isBackwards?(T.sibling=l.child,l.child=T):(d=_.last,d!==null?d.sibling=T:l.child=T,_.last=T)}return _.tail!==null?(l=_.tail,_.rendering=l,_.tail=l.sibling,_.renderingStartTime=xt(),l.sibling=null,d=mt.current,et(mt,m?d&1|2:d&1),l):(ir(l),null);case 22:case 23:return Sm(),m=l.memoizedState!==null,o!==null&&o.memoizedState!==null!==m&&(l.flags|=8192),m&&(l.mode&1)!==0?(jr&1073741824)!==0&&(ir(l),l.subtreeFlags&6&&(l.flags|=8192)):ir(l),null;case 24:return null;case 25:return null}throw Error(r(156,l.tag))}function rL(o,l){switch(Rp(l),l.tag){case 1:return gr(l.type)&&Oc(),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return ko(),lt(mr),lt(rr),Hp(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 5:return Fp(l),null;case 13:if(lt(mt),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(r(340));wo()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return lt(mt),null;case 4:return ko(),null;case 10:return Dp(l.type._context),null;case 22:case 23:return Sm(),null;case 24:return null;default:return null}}var Hc=!1,ar=!1,nL=typeof WeakSet=="function"?WeakSet:Set,ve=null;function Eo(o,l){var d=o.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(m){vt(o,l,m)}else d.current=null}function fm(o,l,d){try{d()}catch(m){vt(o,l,m)}}var cS=!1;function iL(o,l){if(Sp=fc,o=z_(),mp(o)){if("selectionStart"in o)var d={start:o.selectionStart,end:o.selectionEnd};else e:{d=(d=o.ownerDocument)&&d.defaultView||window;var m=d.getSelection&&d.getSelection();if(m&&m.rangeCount!==0){d=m.anchorNode;var b=m.anchorOffset,_=m.focusNode;m=m.focusOffset;try{d.nodeType,_.nodeType}catch{d=null;break e}var T=0,N=-1,D=-1,Q=0,oe=0,se=o,ae=null;t:for(;;){for(var me;se!==d||b!==0&&se.nodeType!==3||(N=T+b),se!==_||m!==0&&se.nodeType!==3||(D=T+m),se.nodeType===3&&(T+=se.nodeValue.length),(me=se.firstChild)!==null;)ae=se,se=me;for(;;){if(se===o)break t;if(ae===d&&++Q===b&&(N=T),ae===_&&++oe===m&&(D=T),(me=se.nextSibling)!==null)break;se=ae,ae=se.parentNode}se=me}d=N===-1||D===-1?null:{start:N,end:D}}else d=null}d=d||{start:0,end:0}}else d=null;for(kp={focusedElem:o,selectionRange:d},fc=!1,ve=l;ve!==null;)if(l=ve,o=l.child,(l.subtreeFlags&1028)!==0&&o!==null)o.return=l,ve=o;else for(;ve!==null;){l=ve;try{var we=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(we!==null){var Se=we.memoizedProps,_t=we.memoizedState,X=l.stateNode,q=X.getSnapshotBeforeUpdate(l.elementType===l.type?Se:un(l.type,Se),_t);X.__reactInternalSnapshotBeforeUpdate=q}break;case 3:var Y=l.stateNode.containerInfo;Y.nodeType===1?Y.textContent="":Y.nodeType===9&&Y.documentElement&&Y.removeChild(Y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(ce){vt(l,l.return,ce)}if(o=l.sibling,o!==null){o.return=l.return,ve=o;break}ve=l.return}return we=cS,cS=!1,we}function wl(o,l,d){var m=l.updateQueue;if(m=m!==null?m.lastEffect:null,m!==null){var b=m=m.next;do{if((b.tag&o)===o){var _=b.destroy;b.destroy=void 0,_!==void 0&&fm(l,d,_)}b=b.next}while(b!==m)}}function Vc(o,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var d=l=l.next;do{if((d.tag&o)===o){var m=d.create;d.destroy=m()}d=d.next}while(d!==l)}}function dm(o){var l=o.ref;if(l!==null){var d=o.stateNode;switch(o.tag){case 5:o=d;break;default:o=d}typeof l=="function"?l(o):l.current=o}}function fS(o){var l=o.alternate;l!==null&&(o.alternate=null,fS(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&(delete l[An],delete l[ul],delete l[Pp],delete l[UM],delete l[qM])),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}function dS(o){return o.tag===5||o.tag===3||o.tag===4}function hS(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||dS(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function hm(o,l,d){var m=o.tag;if(m===5||m===6)o=o.stateNode,l?d.nodeType===8?d.parentNode.insertBefore(o,l):d.insertBefore(o,l):(d.nodeType===8?(l=d.parentNode,l.insertBefore(o,d)):(l=d,l.appendChild(o)),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=Sc));else if(m!==4&&(o=o.child,o!==null))for(hm(o,l,d),o=o.sibling;o!==null;)hm(o,l,d),o=o.sibling}function pm(o,l,d){var m=o.tag;if(m===5||m===6)o=o.stateNode,l?d.insertBefore(o,l):d.appendChild(o);else if(m!==4&&(o=o.child,o!==null))for(pm(o,l,d),o=o.sibling;o!==null;)pm(o,l,d),o=o.sibling}var Gt=null,cn=!1;function Ui(o,l,d){for(d=d.child;d!==null;)pS(o,l,d),d=d.sibling}function pS(o,l,d){if(En&&typeof En.onCommitFiberUnmount=="function")try{En.onCommitFiberUnmount(ac,d)}catch{}switch(d.tag){case 5:ar||Eo(d,l);case 6:var m=Gt,b=cn;Gt=null,Ui(o,l,d),Gt=m,cn=b,Gt!==null&&(cn?(o=Gt,d=d.stateNode,o.nodeType===8?o.parentNode.removeChild(d):o.removeChild(d)):Gt.removeChild(d.stateNode));break;case 18:Gt!==null&&(cn?(o=Gt,d=d.stateNode,o.nodeType===8?Ap(o.parentNode,d):o.nodeType===1&&Ap(o,d),Qs(o)):Ap(Gt,d.stateNode));break;case 4:m=Gt,b=cn,Gt=d.stateNode.containerInfo,cn=!0,Ui(o,l,d),Gt=m,cn=b;break;case 0:case 11:case 14:case 15:if(!ar&&(m=d.updateQueue,m!==null&&(m=m.lastEffect,m!==null))){b=m=m.next;do{var _=b,T=_.destroy;_=_.tag,T!==void 0&&((_&2)!==0||(_&4)!==0)&&fm(d,l,T),b=b.next}while(b!==m)}Ui(o,l,d);break;case 1:if(!ar&&(Eo(d,l),m=d.stateNode,typeof m.componentWillUnmount=="function"))try{m.props=d.memoizedProps,m.state=d.memoizedState,m.componentWillUnmount()}catch(N){vt(d,l,N)}Ui(o,l,d);break;case 21:Ui(o,l,d);break;case 22:d.mode&1?(ar=(m=ar)||d.memoizedState!==null,Ui(o,l,d),ar=m):Ui(o,l,d);break;default:Ui(o,l,d)}}function mS(o){var l=o.updateQueue;if(l!==null){o.updateQueue=null;var d=o.stateNode;d===null&&(d=o.stateNode=new nL),l.forEach(function(m){var b=hL.bind(null,o,m);d.has(m)||(d.add(m),m.then(b,b))})}}function fn(o,l){var d=l.deletions;if(d!==null)for(var m=0;m<d.length;m++){var b=d[m];try{var _=o,T=l,N=T;e:for(;N!==null;){switch(N.tag){case 5:Gt=N.stateNode,cn=!1;break e;case 3:Gt=N.stateNode.containerInfo,cn=!0;break e;case 4:Gt=N.stateNode.containerInfo,cn=!0;break e}N=N.return}if(Gt===null)throw Error(r(160));pS(_,T,b),Gt=null,cn=!1;var D=b.alternate;D!==null&&(D.return=null),b.return=null}catch(Q){vt(b,l,Q)}}if(l.subtreeFlags&12854)for(l=l.child;l!==null;)gS(l,o),l=l.sibling}function gS(o,l){var d=o.alternate,m=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:if(fn(l,o),Cn(o),m&4){try{wl(3,o,o.return),Vc(3,o)}catch(Se){vt(o,o.return,Se)}try{wl(5,o,o.return)}catch(Se){vt(o,o.return,Se)}}break;case 1:fn(l,o),Cn(o),m&512&&d!==null&&Eo(d,d.return);break;case 5:if(fn(l,o),Cn(o),m&512&&d!==null&&Eo(d,d.return),o.flags&32){var b=o.stateNode;try{Br(b,"")}catch(Se){vt(o,o.return,Se)}}if(m&4&&(b=o.stateNode,b!=null)){var _=o.memoizedProps,T=d!==null?d.memoizedProps:_,N=o.type,D=o.updateQueue;if(o.updateQueue=null,D!==null)try{N==="input"&&_.type==="radio"&&_.name!=null&&at(b,_),zs(N,T);var Q=zs(N,_);for(T=0;T<D.length;T+=2){var oe=D[T],se=D[T+1];oe==="style"?rc(b,se):oe==="dangerouslySetInnerHTML"?ao(b,se):oe==="children"?Br(b,se):E(b,oe,se,Q)}switch(N){case"input":ft(b,_);break;case"textarea":la(b,_);break;case"select":var ae=b._wrapperState.wasMultiple;b._wrapperState.wasMultiple=!!_.multiple;var me=_.value;me!=null?er(b,!!_.multiple,me,!1):ae!==!!_.multiple&&(_.defaultValue!=null?er(b,!!_.multiple,_.defaultValue,!0):er(b,!!_.multiple,_.multiple?[]:"",!1))}b[ul]=_}catch(Se){vt(o,o.return,Se)}}break;case 6:if(fn(l,o),Cn(o),m&4){if(o.stateNode===null)throw Error(r(162));b=o.stateNode,_=o.memoizedProps;try{b.nodeValue=_}catch(Se){vt(o,o.return,Se)}}break;case 3:if(fn(l,o),Cn(o),m&4&&d!==null&&d.memoizedState.isDehydrated)try{Qs(l.containerInfo)}catch(Se){vt(o,o.return,Se)}break;case 4:fn(l,o),Cn(o);break;case 13:fn(l,o),Cn(o),b=o.child,b.flags&8192&&(_=b.memoizedState!==null,b.stateNode.isHidden=_,!_||b.alternate!==null&&b.alternate.memoizedState!==null||(vm=xt())),m&4&&mS(o);break;case 22:if(oe=d!==null&&d.memoizedState!==null,o.mode&1?(ar=(Q=ar)||oe,fn(l,o),ar=Q):fn(l,o),Cn(o),m&8192){if(Q=o.memoizedState!==null,(o.stateNode.isHidden=Q)&&!oe&&(o.mode&1)!==0)for(ve=o,oe=o.child;oe!==null;){for(se=ve=oe;ve!==null;){switch(ae=ve,me=ae.child,ae.tag){case 0:case 11:case 14:case 15:wl(4,ae,ae.return);break;case 1:Eo(ae,ae.return);var we=ae.stateNode;if(typeof we.componentWillUnmount=="function"){m=ae,d=ae.return;try{l=m,we.props=l.memoizedProps,we.state=l.memoizedState,we.componentWillUnmount()}catch(Se){vt(m,d,Se)}}break;case 5:Eo(ae,ae.return);break;case 22:if(ae.memoizedState!==null){bS(se);continue}}me!==null?(me.return=ae,ve=me):bS(se)}oe=oe.sibling}e:for(oe=null,se=o;;){if(se.tag===5){if(oe===null){oe=se;try{b=se.stateNode,Q?(_=b.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none"):(N=se.stateNode,D=se.memoizedProps.style,T=D!=null&&D.hasOwnProperty("display")?D.display:null,N.style.display=tc("display",T))}catch(Se){vt(o,o.return,Se)}}}else if(se.tag===6){if(oe===null)try{se.stateNode.nodeValue=Q?"":se.memoizedProps}catch(Se){vt(o,o.return,Se)}}else if((se.tag!==22&&se.tag!==23||se.memoizedState===null||se===o)&&se.child!==null){se.child.return=se,se=se.child;continue}if(se===o)break e;for(;se.sibling===null;){if(se.return===null||se.return===o)break e;oe===se&&(oe=null),se=se.return}oe===se&&(oe=null),se.sibling.return=se.return,se=se.sibling}}break;case 19:fn(l,o),Cn(o),m&4&&mS(o);break;case 21:break;default:fn(l,o),Cn(o)}}function Cn(o){var l=o.flags;if(l&2){try{e:{for(var d=o.return;d!==null;){if(dS(d)){var m=d;break e}d=d.return}throw Error(r(160))}switch(m.tag){case 5:var b=m.stateNode;m.flags&32&&(Br(b,""),m.flags&=-33);var _=hS(o);pm(o,_,b);break;case 3:case 4:var T=m.stateNode.containerInfo,N=hS(o);hm(o,N,T);break;default:throw Error(r(161))}}catch(D){vt(o,o.return,D)}o.flags&=-3}l&4096&&(o.flags&=-4097)}function aL(o,l,d){ve=o,vS(o)}function vS(o,l,d){for(var m=(o.mode&1)!==0;ve!==null;){var b=ve,_=b.child;if(b.tag===22&&m){var T=b.memoizedState!==null||Hc;if(!T){var N=b.alternate,D=N!==null&&N.memoizedState!==null||ar;N=Hc;var Q=ar;if(Hc=T,(ar=D)&&!Q)for(ve=b;ve!==null;)T=ve,D=T.child,T.tag===22&&T.memoizedState!==null?wS(b):D!==null?(D.return=T,ve=D):wS(b);for(;_!==null;)ve=_,vS(_),_=_.sibling;ve=b,Hc=N,ar=Q}yS(o)}else(b.subtreeFlags&8772)!==0&&_!==null?(_.return=b,ve=_):yS(o)}}function yS(o){for(;ve!==null;){var l=ve;if((l.flags&8772)!==0){var d=l.alternate;try{if((l.flags&8772)!==0)switch(l.tag){case 0:case 11:case 15:ar||Vc(5,l);break;case 1:var m=l.stateNode;if(l.flags&4&&!ar)if(d===null)m.componentDidMount();else{var b=l.elementType===l.type?d.memoizedProps:un(l.type,d.memoizedProps);m.componentDidUpdate(b,d.memoizedState,m.__reactInternalSnapshotBeforeUpdate)}var _=l.updateQueue;_!==null&&b1(l,_,m);break;case 3:var T=l.updateQueue;if(T!==null){if(d=null,l.child!==null)switch(l.child.tag){case 5:d=l.child.stateNode;break;case 1:d=l.child.stateNode}b1(l,T,d)}break;case 5:var N=l.stateNode;if(d===null&&l.flags&4){d=N;var D=l.memoizedProps;switch(l.type){case"button":case"input":case"select":case"textarea":D.autoFocus&&d.focus();break;case"img":D.src&&(d.src=D.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(l.memoizedState===null){var Q=l.alternate;if(Q!==null){var oe=Q.memoizedState;if(oe!==null){var se=oe.dehydrated;se!==null&&Qs(se)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}ar||l.flags&512&&dm(l)}catch(ae){vt(l,l.return,ae)}}if(l===o){ve=null;break}if(d=l.sibling,d!==null){d.return=l.return,ve=d;break}ve=l.return}}function bS(o){for(;ve!==null;){var l=ve;if(l===o){ve=null;break}var d=l.sibling;if(d!==null){d.return=l.return,ve=d;break}ve=l.return}}function wS(o){for(;ve!==null;){var l=ve;try{switch(l.tag){case 0:case 11:case 15:var d=l.return;try{Vc(4,l)}catch(D){vt(l,d,D)}break;case 1:var m=l.stateNode;if(typeof m.componentDidMount=="function"){var b=l.return;try{m.componentDidMount()}catch(D){vt(l,b,D)}}var _=l.return;try{dm(l)}catch(D){vt(l,_,D)}break;case 5:var T=l.return;try{dm(l)}catch(D){vt(l,T,D)}}}catch(D){vt(l,l.return,D)}if(l===o){ve=null;break}var N=l.sibling;if(N!==null){N.return=l.return,ve=N;break}ve=l.return}}var oL=Math.ceil,Kc=P.ReactCurrentDispatcher,mm=P.ReactCurrentOwner,Vr=P.ReactCurrentBatchConfig,Fe=0,qt=null,Ot=null,Xt=0,jr=0,Ao=Ni(0),Rt=0,xl=null,xa=0,Gc=0,gm=0,_l=null,yr=null,vm=0,Po=1/0,ei=null,Xc=!1,ym=null,qi=null,Yc=!1,zi=null,Jc=0,Sl=0,bm=null,Qc=-1,Zc=0;function cr(){return(Fe&6)!==0?xt():Qc!==-1?Qc:Qc=xt()}function Fi(o){return(o.mode&1)===0?1:(Fe&2)!==0&&Xt!==0?Xt&-Xt:FM.transition!==null?(Zc===0&&(Zc=h_()),Zc):(o=Xe,o!==0||(o=window.event,o=o===void 0?16:__(o.type)),o)}function dn(o,l,d,m){if(50<Sl)throw Sl=0,bm=null,Error(r(185));Ks(o,d,m),((Fe&2)===0||o!==qt)&&(o===qt&&((Fe&2)===0&&(Gc|=d),Rt===4&&Wi(o,Xt)),br(o,m),d===1&&Fe===0&&(l.mode&1)===0&&(Po=xt()+500,Ac&&Li()))}function br(o,l){var d=o.callbackNode;FN(o,l);var m=lc(o,o===qt?Xt:0);if(m===0)d!==null&&c_(d),o.callbackNode=null,o.callbackPriority=0;else if(l=m&-m,o.callbackPriority!==l){if(d!=null&&c_(d),l===1)o.tag===0?zM(_S.bind(null,o)):s1(_S.bind(null,o)),DM(function(){(Fe&6)===0&&Li()}),d=null;else{switch(p_(m)){case 1:d=Qh;break;case 4:d=f_;break;case 16:d=ic;break;case 536870912:d=d_;break;default:d=ic}d=CS(d,xS.bind(null,o))}o.callbackPriority=l,o.callbackNode=d}}function xS(o,l){if(Qc=-1,Zc=0,(Fe&6)!==0)throw Error(r(327));var d=o.callbackNode;if(To()&&o.callbackNode!==d)return null;var m=lc(o,o===qt?Xt:0);if(m===0)return null;if((m&30)!==0||(m&o.expiredLanes)!==0||l)l=ef(o,m);else{l=m;var b=Fe;Fe|=2;var _=kS();(qt!==o||Xt!==l)&&(ei=null,Po=xt()+500,Sa(o,l));do try{uL();break}catch(N){SS(o,N)}while(!0);Lp(),Kc.current=_,Fe=b,Ot!==null?l=0:(qt=null,Xt=0,l=Rt)}if(l!==0){if(l===2&&(b=Zh(o),b!==0&&(m=b,l=wm(o,b))),l===1)throw d=xl,Sa(o,0),Wi(o,m),br(o,xt()),d;if(l===6)Wi(o,m);else{if(b=o.current.alternate,(m&30)===0&&!sL(b)&&(l=ef(o,m),l===2&&(_=Zh(o),_!==0&&(m=_,l=wm(o,_))),l===1))throw d=xl,Sa(o,0),Wi(o,m),br(o,xt()),d;switch(o.finishedWork=b,o.finishedLanes=m,l){case 0:case 1:throw Error(r(345));case 2:ka(o,yr,ei);break;case 3:if(Wi(o,m),(m&130023424)===m&&(l=vm+500-xt(),10<l)){if(lc(o,0)!==0)break;if(b=o.suspendedLanes,(b&m)!==m){cr(),o.pingedLanes|=o.suspendedLanes&b;break}o.timeoutHandle=Ep(ka.bind(null,o,yr,ei),l);break}ka(o,yr,ei);break;case 4:if(Wi(o,m),(m&4194240)===m)break;for(l=o.eventTimes,b=-1;0<m;){var T=31-on(m);_=1<<T,T=l[T],T>b&&(b=T),m&=~_}if(m=b,m=xt()-m,m=(120>m?120:480>m?480:1080>m?1080:1920>m?1920:3e3>m?3e3:4320>m?4320:1960*oL(m/1960))-m,10<m){o.timeoutHandle=Ep(ka.bind(null,o,yr,ei),m);break}ka(o,yr,ei);break;case 5:ka(o,yr,ei);break;default:throw Error(r(329))}}}return br(o,xt()),o.callbackNode===d?xS.bind(null,o):null}function wm(o,l){var d=_l;return o.current.memoizedState.isDehydrated&&(Sa(o,l).flags|=256),o=ef(o,l),o!==2&&(l=yr,yr=d,l!==null&&xm(l)),o}function xm(o){yr===null?yr=o:yr.push.apply(yr,o)}function sL(o){for(var l=o;;){if(l.flags&16384){var d=l.updateQueue;if(d!==null&&(d=d.stores,d!==null))for(var m=0;m<d.length;m++){var b=d[m],_=b.getSnapshot;b=b.value;try{if(!sn(_(),b))return!1}catch{return!1}}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;else{if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function Wi(o,l){for(l&=~gm,l&=~Gc,o.suspendedLanes|=l,o.pingedLanes&=~l,o=o.expirationTimes;0<l;){var d=31-on(l),m=1<<d;o[d]=-1,l&=~m}}function _S(o){if((Fe&6)!==0)throw Error(r(327));To();var l=lc(o,0);if((l&1)===0)return br(o,xt()),null;var d=ef(o,l);if(o.tag!==0&&d===2){var m=Zh(o);m!==0&&(l=m,d=wm(o,m))}if(d===1)throw d=xl,Sa(o,0),Wi(o,l),br(o,xt()),d;if(d===6)throw Error(r(345));return o.finishedWork=o.current.alternate,o.finishedLanes=l,ka(o,yr,ei),br(o,xt()),null}function _m(o,l){var d=Fe;Fe|=1;try{return o(l)}finally{Fe=d,Fe===0&&(Po=xt()+500,Ac&&Li())}}function _a(o){zi!==null&&zi.tag===0&&(Fe&6)===0&&To();var l=Fe;Fe|=1;var d=Vr.transition,m=Xe;try{if(Vr.transition=null,Xe=1,o)return o()}finally{Xe=m,Vr.transition=d,Fe=l,(Fe&6)===0&&Li()}}function Sm(){jr=Ao.current,lt(Ao)}function Sa(o,l){o.finishedWork=null,o.finishedLanes=0;var d=o.timeoutHandle;if(d!==-1&&(o.timeoutHandle=-1,LM(d)),Ot!==null)for(d=Ot.return;d!==null;){var m=d;switch(Rp(m),m.tag){case 1:m=m.type.childContextTypes,m!=null&&Oc();break;case 3:ko(),lt(mr),lt(rr),Hp();break;case 5:Fp(m);break;case 4:ko();break;case 13:lt(mt);break;case 19:lt(mt);break;case 10:Dp(m.type._context);break;case 22:case 23:Sm()}d=d.return}if(qt=o,Ot=o=Hi(o.current,null),Xt=jr=l,Rt=0,xl=null,gm=Gc=xa=0,yr=_l=null,ya!==null){for(l=0;l<ya.length;l++)if(d=ya[l],m=d.interleaved,m!==null){d.interleaved=null;var b=m.next,_=d.pending;if(_!==null){var T=_.next;_.next=b,m.next=T}d.pending=m}ya=null}return o}function SS(o,l){do{var d=Ot;try{if(Lp(),Lc.current=qc,Dc){for(var m=gt.memoizedState;m!==null;){var b=m.queue;b!==null&&(b.pending=null),m=m.next}Dc=!1}if(wa=0,Ut=jt=gt=null,ml=!1,gl=0,mm.current=null,d===null||d.return===null){Rt=1,xl=l,Ot=null;break}e:{var _=o,T=d.return,N=d,D=l;if(l=Xt,N.flags|=32768,D!==null&&typeof D=="object"&&typeof D.then=="function"){var Q=D,oe=N,se=oe.tag;if((oe.mode&1)===0&&(se===0||se===11||se===15)){var ae=oe.alternate;ae?(oe.updateQueue=ae.updateQueue,oe.memoizedState=ae.memoizedState,oe.lanes=ae.lanes):(oe.updateQueue=null,oe.memoizedState=null)}var me=G1(T);if(me!==null){me.flags&=-257,X1(me,T,N,_,l),me.mode&1&&K1(_,Q,l),l=me,D=Q;var we=l.updateQueue;if(we===null){var Se=new Set;Se.add(D),l.updateQueue=Se}else we.add(D);break e}else{if((l&1)===0){K1(_,Q,l),km();break e}D=Error(r(426))}}else if(dt&&N.mode&1){var _t=G1(T);if(_t!==null){(_t.flags&65536)===0&&(_t.flags|=256),X1(_t,T,N,_,l),Np(Oo(D,N));break e}}_=D=Oo(D,N),Rt!==4&&(Rt=2),_l===null?_l=[_]:_l.push(_),_=T;do{switch(_.tag){case 3:_.flags|=65536,l&=-l,_.lanes|=l;var X=H1(_,D,l);y1(_,X);break e;case 1:N=D;var q=_.type,Y=_.stateNode;if((_.flags&128)===0&&(typeof q.getDerivedStateFromError=="function"||Y!==null&&typeof Y.componentDidCatch=="function"&&(qi===null||!qi.has(Y)))){_.flags|=65536,l&=-l,_.lanes|=l;var ce=V1(_,N,l);y1(_,ce);break e}}_=_.return}while(_!==null)}ES(d)}catch(ke){l=ke,Ot===d&&d!==null&&(Ot=d=d.return);continue}break}while(!0)}function kS(){var o=Kc.current;return Kc.current=qc,o===null?qc:o}function km(){(Rt===0||Rt===3||Rt===2)&&(Rt=4),qt===null||(xa&268435455)===0&&(Gc&268435455)===0||Wi(qt,Xt)}function ef(o,l){var d=Fe;Fe|=2;var m=kS();(qt!==o||Xt!==l)&&(ei=null,Sa(o,l));do try{lL();break}catch(b){SS(o,b)}while(!0);if(Lp(),Fe=d,Kc.current=m,Ot!==null)throw Error(r(261));return qt=null,Xt=0,Rt}function lL(){for(;Ot!==null;)OS(Ot)}function uL(){for(;Ot!==null&&!$N();)OS(Ot)}function OS(o){var l=TS(o.alternate,o,jr);o.memoizedProps=o.pendingProps,l===null?ES(o):Ot=l,mm.current=null}function ES(o){var l=o;do{var d=l.alternate;if(o=l.return,(l.flags&32768)===0){if(d=tL(d,l,jr),d!==null){Ot=d;return}}else{if(d=rL(d,l),d!==null){d.flags&=32767,Ot=d;return}if(o!==null)o.flags|=32768,o.subtreeFlags=0,o.deletions=null;else{Rt=6,Ot=null;return}}if(l=l.sibling,l!==null){Ot=l;return}Ot=l=o}while(l!==null);Rt===0&&(Rt=5)}function ka(o,l,d){var m=Xe,b=Vr.transition;try{Vr.transition=null,Xe=1,cL(o,l,d,m)}finally{Vr.transition=b,Xe=m}return null}function cL(o,l,d,m){do To();while(zi!==null);if((Fe&6)!==0)throw Error(r(327));d=o.finishedWork;var b=o.finishedLanes;if(d===null)return null;if(o.finishedWork=null,o.finishedLanes=0,d===o.current)throw Error(r(177));o.callbackNode=null,o.callbackPriority=0;var _=d.lanes|d.childLanes;if(WN(o,_),o===qt&&(Ot=qt=null,Xt=0),(d.subtreeFlags&2064)===0&&(d.flags&2064)===0||Yc||(Yc=!0,CS(ic,function(){return To(),null})),_=(d.flags&15990)!==0,(d.subtreeFlags&15990)!==0||_){_=Vr.transition,Vr.transition=null;var T=Xe;Xe=1;var N=Fe;Fe|=4,mm.current=null,iL(o,d),gS(d,o),CM(kp),fc=!!Sp,kp=Sp=null,o.current=d,aL(d),NN(),Fe=N,Xe=T,Vr.transition=_}else o.current=d;if(Yc&&(Yc=!1,zi=o,Jc=b),_=o.pendingLanes,_===0&&(qi=null),DN(d.stateNode),br(o,xt()),l!==null)for(m=o.onRecoverableError,d=0;d<l.length;d++)b=l[d],m(b.value,{componentStack:b.stack,digest:b.digest});if(Xc)throw Xc=!1,o=ym,ym=null,o;return(Jc&1)!==0&&o.tag!==0&&To(),_=o.pendingLanes,(_&1)!==0?o===bm?Sl++:(Sl=0,bm=o):Sl=0,Li(),null}function To(){if(zi!==null){var o=p_(Jc),l=Vr.transition,d=Xe;try{if(Vr.transition=null,Xe=16>o?16:o,zi===null)var m=!1;else{if(o=zi,zi=null,Jc=0,(Fe&6)!==0)throw Error(r(331));var b=Fe;for(Fe|=4,ve=o.current;ve!==null;){var _=ve,T=_.child;if((ve.flags&16)!==0){var N=_.deletions;if(N!==null){for(var D=0;D<N.length;D++){var Q=N[D];for(ve=Q;ve!==null;){var oe=ve;switch(oe.tag){case 0:case 11:case 15:wl(8,oe,_)}var se=oe.child;if(se!==null)se.return=oe,ve=se;else for(;ve!==null;){oe=ve;var ae=oe.sibling,me=oe.return;if(fS(oe),oe===Q){ve=null;break}if(ae!==null){ae.return=me,ve=ae;break}ve=me}}}var we=_.alternate;if(we!==null){var Se=we.child;if(Se!==null){we.child=null;do{var _t=Se.sibling;Se.sibling=null,Se=_t}while(Se!==null)}}ve=_}}if((_.subtreeFlags&2064)!==0&&T!==null)T.return=_,ve=T;else e:for(;ve!==null;){if(_=ve,(_.flags&2048)!==0)switch(_.tag){case 0:case 11:case 15:wl(9,_,_.return)}var X=_.sibling;if(X!==null){X.return=_.return,ve=X;break e}ve=_.return}}var q=o.current;for(ve=q;ve!==null;){T=ve;var Y=T.child;if((T.subtreeFlags&2064)!==0&&Y!==null)Y.return=T,ve=Y;else e:for(T=q;ve!==null;){if(N=ve,(N.flags&2048)!==0)try{switch(N.tag){case 0:case 11:case 15:Vc(9,N)}}catch(ke){vt(N,N.return,ke)}if(N===T){ve=null;break e}var ce=N.sibling;if(ce!==null){ce.return=N.return,ve=ce;break e}ve=N.return}}if(Fe=b,Li(),En&&typeof En.onPostCommitFiberRoot=="function")try{En.onPostCommitFiberRoot(ac,o)}catch{}m=!0}return m}finally{Xe=d,Vr.transition=l}}return!1}function AS(o,l,d){l=Oo(d,l),l=H1(o,l,1),o=Bi(o,l,1),l=cr(),o!==null&&(Ks(o,1,l),br(o,l))}function vt(o,l,d){if(o.tag===3)AS(o,o,d);else for(;l!==null;){if(l.tag===3){AS(l,o,d);break}else if(l.tag===1){var m=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(qi===null||!qi.has(m))){o=Oo(d,o),o=V1(l,o,1),l=Bi(l,o,1),o=cr(),l!==null&&(Ks(l,1,o),br(l,o));break}}l=l.return}}function fL(o,l,d){var m=o.pingCache;m!==null&&m.delete(l),l=cr(),o.pingedLanes|=o.suspendedLanes&d,qt===o&&(Xt&d)===d&&(Rt===4||Rt===3&&(Xt&130023424)===Xt&&500>xt()-vm?Sa(o,0):gm|=d),br(o,l)}function PS(o,l){l===0&&((o.mode&1)===0?l=1:(l=sc,sc<<=1,(sc&130023424)===0&&(sc=4194304)));var d=cr();o=Jn(o,l),o!==null&&(Ks(o,l,d),br(o,d))}function dL(o){var l=o.memoizedState,d=0;l!==null&&(d=l.retryLane),PS(o,d)}function hL(o,l){var d=0;switch(o.tag){case 13:var m=o.stateNode,b=o.memoizedState;b!==null&&(d=b.retryLane);break;case 19:m=o.stateNode;break;default:throw Error(r(314))}m!==null&&m.delete(l),PS(o,d)}var TS;TS=function(o,l,d){if(o!==null)if(o.memoizedProps!==l.pendingProps||mr.current)vr=!0;else{if((o.lanes&d)===0&&(l.flags&128)===0)return vr=!1,eL(o,l,d);vr=(o.flags&131072)!==0}else vr=!1,dt&&(l.flags&1048576)!==0&&l1(l,Tc,l.index);switch(l.lanes=0,l.tag){case 2:var m=l.type;Wc(o,l),o=l.pendingProps;var b=vo(l,rr.current);So(l,d),b=Gp(null,l,m,o,b,d);var _=Xp();return l.flags|=1,typeof b=="object"&&b!==null&&typeof b.render=="function"&&b.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,gr(m)?(_=!0,Ec(l)):_=!1,l.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,qp(l),b.updater=zc,l.stateNode=b,b._reactInternals=l,tm(l,m,o,d),l=am(null,l,m,!0,_,d)):(l.tag=0,dt&&_&&jp(l),ur(null,l,b,d),l=l.child),l;case 16:m=l.elementType;e:{switch(Wc(o,l),o=l.pendingProps,b=m._init,m=b(m._payload),l.type=m,b=l.tag=mL(m),o=un(m,o),b){case 0:l=im(null,l,m,o,d);break e;case 1:l=tS(null,l,m,o,d);break e;case 11:l=Y1(null,l,m,o,d);break e;case 14:l=J1(null,l,m,un(m.type,o),d);break e}throw Error(r(306,m,""))}return l;case 0:return m=l.type,b=l.pendingProps,b=l.elementType===m?b:un(m,b),im(o,l,m,b,d);case 1:return m=l.type,b=l.pendingProps,b=l.elementType===m?b:un(m,b),tS(o,l,m,b,d);case 3:e:{if(rS(l),o===null)throw Error(r(387));m=l.pendingProps,_=l.memoizedState,b=_.element,v1(o,l),Nc(l,m,null,d);var T=l.memoizedState;if(m=T.element,_.isDehydrated)if(_={element:m,isDehydrated:!1,cache:T.cache,pendingSuspenseBoundaries:T.pendingSuspenseBoundaries,transitions:T.transitions},l.updateQueue.baseState=_,l.memoizedState=_,l.flags&256){b=Oo(Error(r(423)),l),l=nS(o,l,m,d,b);break e}else if(m!==b){b=Oo(Error(r(424)),l),l=nS(o,l,m,d,b);break e}else for(Cr=$i(l.stateNode.containerInfo.firstChild),Tr=l,dt=!0,ln=null,d=m1(l,null,m,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(wo(),m===b){l=Zn(o,l,d);break e}ur(o,l,m,d)}l=l.child}return l;case 5:return w1(l),o===null&&$p(l),m=l.type,b=l.pendingProps,_=o!==null?o.memoizedProps:null,T=b.children,Op(m,b)?T=null:_!==null&&Op(m,_)&&(l.flags|=32),eS(o,l),ur(o,l,T,d),l.child;case 6:return o===null&&$p(l),null;case 13:return iS(o,l,d);case 4:return zp(l,l.stateNode.containerInfo),m=l.pendingProps,o===null?l.child=xo(l,null,m,d):ur(o,l,m,d),l.child;case 11:return m=l.type,b=l.pendingProps,b=l.elementType===m?b:un(m,b),Y1(o,l,m,b,d);case 7:return ur(o,l,l.pendingProps,d),l.child;case 8:return ur(o,l,l.pendingProps.children,d),l.child;case 12:return ur(o,l,l.pendingProps.children,d),l.child;case 10:e:{if(m=l.type._context,b=l.pendingProps,_=l.memoizedProps,T=b.value,et(Rc,m._currentValue),m._currentValue=T,_!==null)if(sn(_.value,T)){if(_.children===b.children&&!mr.current){l=Zn(o,l,d);break e}}else for(_=l.child,_!==null&&(_.return=l);_!==null;){var N=_.dependencies;if(N!==null){T=_.child;for(var D=N.firstContext;D!==null;){if(D.context===m){if(_.tag===1){D=Qn(-1,d&-d),D.tag=2;var Q=_.updateQueue;if(Q!==null){Q=Q.shared;var oe=Q.pending;oe===null?D.next=D:(D.next=oe.next,oe.next=D),Q.pending=D}}_.lanes|=d,D=_.alternate,D!==null&&(D.lanes|=d),Bp(_.return,d,l),N.lanes|=d;break}D=D.next}}else if(_.tag===10)T=_.type===l.type?null:_.child;else if(_.tag===18){if(T=_.return,T===null)throw Error(r(341));T.lanes|=d,N=T.alternate,N!==null&&(N.lanes|=d),Bp(T,d,l),T=_.sibling}else T=_.child;if(T!==null)T.return=_;else for(T=_;T!==null;){if(T===l){T=null;break}if(_=T.sibling,_!==null){_.return=T.return,T=_;break}T=T.return}_=T}ur(o,l,b.children,d),l=l.child}return l;case 9:return b=l.type,m=l.pendingProps.children,So(l,d),b=Wr(b),m=m(b),l.flags|=1,ur(o,l,m,d),l.child;case 14:return m=l.type,b=un(m,l.pendingProps),b=un(m.type,b),J1(o,l,m,b,d);case 15:return Q1(o,l,l.type,l.pendingProps,d);case 17:return m=l.type,b=l.pendingProps,b=l.elementType===m?b:un(m,b),Wc(o,l),l.tag=1,gr(m)?(o=!0,Ec(l)):o=!1,So(l,d),F1(l,m,b),tm(l,m,b,d),am(null,l,m,!0,o,d);case 19:return oS(o,l,d);case 22:return Z1(o,l,d)}throw Error(r(156,l.tag))};function CS(o,l){return u_(o,l)}function pL(o,l,d,m){this.tag=o,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kr(o,l,d,m){return new pL(o,l,d,m)}function Om(o){return o=o.prototype,!(!o||!o.isReactComponent)}function mL(o){if(typeof o=="function")return Om(o)?1:0;if(o!=null){if(o=o.$$typeof,o===B)return 11;if(o===V)return 14}return 2}function Hi(o,l){var d=o.alternate;return d===null?(d=Kr(o.tag,l,o.key,o.mode),d.elementType=o.elementType,d.type=o.type,d.stateNode=o.stateNode,d.alternate=o,o.alternate=d):(d.pendingProps=l,d.type=o.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=o.flags&14680064,d.childLanes=o.childLanes,d.lanes=o.lanes,d.child=o.child,d.memoizedProps=o.memoizedProps,d.memoizedState=o.memoizedState,d.updateQueue=o.updateQueue,l=o.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=o.sibling,d.index=o.index,d.ref=o.ref,d}function tf(o,l,d,m,b,_){var T=2;if(m=o,typeof o=="function")Om(o)&&(T=1);else if(typeof o=="string")T=5;else e:switch(o){case C:return Oa(d.children,b,_,l);case R:T=8,b|=8;break;case M:return o=Kr(12,d,l,b|2),o.elementType=M,o.lanes=_,o;case F:return o=Kr(13,d,l,b),o.elementType=F,o.lanes=_,o;case J:return o=Kr(19,d,l,b),o.elementType=J,o.lanes=_,o;case Z:return rf(d,b,_,l);default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case H:T=10;break e;case z:T=9;break e;case B:T=11;break e;case V:T=14;break e;case K:T=16,m=null;break e}throw Error(r(130,o==null?o:typeof o,""))}return l=Kr(T,d,l,b),l.elementType=o,l.type=m,l.lanes=_,l}function Oa(o,l,d,m){return o=Kr(7,o,m,l),o.lanes=d,o}function rf(o,l,d,m){return o=Kr(22,o,m,l),o.elementType=Z,o.lanes=d,o.stateNode={isHidden:!1},o}function Em(o,l,d){return o=Kr(6,o,null,l),o.lanes=d,o}function Am(o,l,d){return l=Kr(4,o.children!==null?o.children:[],o.key,l),l.lanes=d,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}function gL(o,l,d,m,b){this.tag=l,this.containerInfo=o,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ep(0),this.expirationTimes=ep(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ep(0),this.identifierPrefix=m,this.onRecoverableError=b,this.mutableSourceEagerHydrationData=null}function Pm(o,l,d,m,b,_,T,N,D){return o=new gL(o,l,d,N,D),l===1?(l=1,_===!0&&(l|=8)):l=0,_=Kr(3,null,null,l),o.current=_,_.stateNode=o,_.memoizedState={element:m,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},qp(_),o}function vL(o,l,d){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:A,key:m==null?null:""+m,children:o,containerInfo:l,implementation:d}}function jS(o){if(!o)return Mi;o=o._reactInternals;e:{if(ha(o)!==o||o.tag!==1)throw Error(r(170));var l=o;do{switch(l.tag){case 3:l=l.stateNode.context;break e;case 1:if(gr(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}}l=l.return}while(l!==null);throw Error(r(171))}if(o.tag===1){var d=o.type;if(gr(d))return a1(o,d,l)}return l}function RS(o,l,d,m,b,_,T,N,D){return o=Pm(d,m,!0,o,b,_,T,N,D),o.context=jS(null),d=o.current,m=cr(),b=Fi(d),_=Qn(m,b),_.callback=l??null,Bi(d,_,b),o.current.lanes=b,Ks(o,b,m),br(o,m),o}function nf(o,l,d,m){var b=l.current,_=cr(),T=Fi(b);return d=jS(d),l.context===null?l.context=d:l.pendingContext=d,l=Qn(_,T),l.payload={element:o},m=m===void 0?null:m,m!==null&&(l.callback=m),o=Bi(b,l,T),o!==null&&(dn(o,b,T,_),$c(o,b,T)),T}function af(o){if(o=o.current,!o.child)return null;switch(o.child.tag){case 5:return o.child.stateNode;default:return o.child.stateNode}}function IS(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var d=o.retryLane;o.retryLane=d!==0&&d<l?d:l}}function Tm(o,l){IS(o,l),(o=o.alternate)&&IS(o,l)}function yL(){return null}var $S=typeof reportError=="function"?reportError:function(o){console.error(o)};function Cm(o){this._internalRoot=o}of.prototype.render=Cm.prototype.render=function(o){var l=this._internalRoot;if(l===null)throw Error(r(409));nf(o,l,null,null)},of.prototype.unmount=Cm.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var l=o.containerInfo;_a(function(){nf(null,o,null,null)}),l[Kn]=null}};function of(o){this._internalRoot=o}of.prototype.unstable_scheduleHydration=function(o){if(o){var l=v_();o={blockedOn:null,target:o,priority:l};for(var d=0;d<ji.length&&l!==0&&l<ji[d].priority;d++);ji.splice(d,0,o),d===0&&w_(o)}};function jm(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function sf(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11&&(o.nodeType!==8||o.nodeValue!==" react-mount-point-unstable "))}function NS(){}function bL(o,l,d,m,b){if(b){if(typeof m=="function"){var _=m;m=function(){var Q=af(T);_.call(Q)}}var T=RS(l,m,o,0,null,!1,!1,"",NS);return o._reactRootContainer=T,o[Kn]=T.current,sl(o.nodeType===8?o.parentNode:o),_a(),T}for(;b=o.lastChild;)o.removeChild(b);if(typeof m=="function"){var N=m;m=function(){var Q=af(D);N.call(Q)}}var D=Pm(o,0,!1,null,null,!1,!1,"",NS);return o._reactRootContainer=D,o[Kn]=D.current,sl(o.nodeType===8?o.parentNode:o),_a(function(){nf(l,D,d,m)}),D}function lf(o,l,d,m,b){var _=d._reactRootContainer;if(_){var T=_;if(typeof b=="function"){var N=b;b=function(){var D=af(T);N.call(D)}}nf(l,T,o,b)}else T=bL(d,l,o,b,m);return af(T)}m_=function(o){switch(o.tag){case 3:var l=o.stateNode;if(l.current.memoizedState.isDehydrated){var d=Vs(l.pendingLanes);d!==0&&(tp(l,d|1),br(l,xt()),(Fe&6)===0&&(Po=xt()+500,Li()))}break;case 13:_a(function(){var m=Jn(o,1);if(m!==null){var b=cr();dn(m,o,1,b)}}),Tm(o,1)}},rp=function(o){if(o.tag===13){var l=Jn(o,134217728);if(l!==null){var d=cr();dn(l,o,134217728,d)}Tm(o,134217728)}},g_=function(o){if(o.tag===13){var l=Fi(o),d=Jn(o,l);if(d!==null){var m=cr();dn(d,o,l,m)}Tm(o,l)}},v_=function(){return Xe},y_=function(o,l){var d=Xe;try{return Xe=o,l()}finally{Xe=d}},Fs=function(o,l,d){switch(l){case"input":if(ft(o,d),l=d.name,d.type==="radio"&&l!=null){for(d=o;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll("input[name="+JSON.stringify(""+l)+'][type="radio"]'),l=0;l<d.length;l++){var m=d[l];if(m!==o&&m.form===o.form){var b=kc(m);if(!b)throw Error(r(90));ie(m),ft(m,b)}}}break;case"textarea":la(o,d);break;case"select":l=d.value,l!=null&&er(o,!!d.multiple,l,!1)}},Ct=_m,tr=_a;var wL={usingClientEntryPoint:!1,Events:[cl,mo,kc,Ne,wt,_m]},kl={findFiberByHostInstance:pa,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},xL={bundleType:kl.bundleType,version:kl.version,rendererPackageName:kl.rendererPackageName,rendererConfig:kl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:P.ReactCurrentDispatcher,findHostInstanceByFiber:function(o){return o=s_(o),o===null?null:o.stateNode},findFiberByHostInstance:kl.findFiberByHostInstance||yL,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var uf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!uf.isDisabled&&uf.supportsFiber)try{ac=uf.inject(xL),En=uf}catch{}}return wr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=wL,wr.createPortal=function(o,l){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!jm(l))throw Error(r(200));return vL(o,l,null,d)},wr.createRoot=function(o,l){if(!jm(o))throw Error(r(299));var d=!1,m="",b=$S;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(m=l.identifierPrefix),l.onRecoverableError!==void 0&&(b=l.onRecoverableError)),l=Pm(o,1,!1,null,null,d,!1,m,b),o[Kn]=l.current,sl(o.nodeType===8?o.parentNode:o),new Cm(l)},wr.findDOMNode=function(o){if(o==null)return null;if(o.nodeType===1)return o;var l=o._reactInternals;if(l===void 0)throw typeof o.render=="function"?Error(r(188)):(o=Object.keys(o).join(","),Error(r(268,o)));return o=s_(l),o=o===null?null:o.stateNode,o},wr.flushSync=function(o){return _a(o)},wr.hydrate=function(o,l,d){if(!sf(l))throw Error(r(200));return lf(null,o,l,!0,d)},wr.hydrateRoot=function(o,l,d){if(!jm(o))throw Error(r(405));var m=d!=null&&d.hydratedSources||null,b=!1,_="",T=$S;if(d!=null&&(d.unstable_strictMode===!0&&(b=!0),d.identifierPrefix!==void 0&&(_=d.identifierPrefix),d.onRecoverableError!==void 0&&(T=d.onRecoverableError)),l=RS(l,null,o,1,d??null,b,!1,_,T),o[Kn]=l.current,sl(o),m)for(o=0;o<m.length;o++)d=m[o],b=d._getVersion,b=b(d._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[d,b]:l.mutableSourceEagerHydrationData.push(d,b);return new of(l)},wr.render=function(o,l,d){if(!sf(l))throw Error(r(200));return lf(null,o,l,!1,d)},wr.unmountComponentAtNode=function(o){if(!sf(o))throw Error(r(40));return o._reactRootContainer?(_a(function(){lf(null,null,o,!1,function(){o._reactRootContainer=null,o[Kn]=null})}),!0):!1},wr.unstable_batchedUpdates=_m,wr.unstable_renderSubtreeIntoContainer=function(o,l,d,m){if(!sf(d))throw Error(r(200));if(o==null||o._reactInternals===void 0)throw Error(r(38));return lf(o,l,d,!1,m)},wr.version="18.3.1-next-f1338f8080-20240426",wr}var FS;function qj(){if(FS)return $m.exports;FS=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),$m.exports=CL(),$m.exports}var WS;function jL(){if(WS)return ff;WS=1;var t=qj();return ff.createRoot=t.createRoot,ff.hydrateRoot=t.hydrateRoot,ff}var RL=jL();/**
41
+ * react-router v7.16.0
42
+ *
43
+ * Copyright (c) Remix Software Inc.
44
+ *
45
+ * This source code is licensed under the MIT license found in the
46
+ * LICENSE.md file in the root directory of this source tree.
47
+ *
48
+ * @license MIT
49
+ */var HS="popstate";function VS(t){return typeof t=="object"&&t!=null&&"pathname"in t&&"search"in t&&"hash"in t&&"state"in t&&"key"in t}function IL(t={}){function e(n,i){var f;let a=(f=i.state)==null?void 0:f.masked,{pathname:s,search:u,hash:c}=a||n.location;return Gb("",{pathname:s,search:u,hash:c},i.state&&i.state.usr||null,i.state&&i.state.key||"default",a?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}function r(n,i){return typeof i=="string"?i:ru(i)}return NL(e,r,null,t)}function pt(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function kn(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function $L(){return Math.random().toString(36).substring(2,10)}function KS(t,e){return{usr:t.state,key:t.key,idx:e,masked:t.mask?{pathname:t.pathname,search:t.search,hash:t.hash}:void 0}}function Gb(t,e,r=null,n,i){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?Ps(e):e,state:r,key:e&&e.key||n||$L(),mask:i}}function ru({pathname:t="/",search:e="",hash:r=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Ps(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substring(r),t=t.substring(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substring(n),t=t.substring(0,n)),t&&(e.pathname=t)}return e}function NL(t,e,r,n={}){let{window:i=document.defaultView,v5Compat:a=!1}=n,s=i.history,u="POP",c=null,f=p();f==null&&(f=0,s.replaceState({...s.state,idx:f},""));function p(){return(s.state||{idx:null}).idx}function h(){u="POP";let y=p(),S=y==null?null:y-f;f=y,c&&c({action:u,location:x.location,delta:S})}function g(y,S){u="PUSH";let k=VS(y)?y:Gb(x.location,y,S);f=p()+1;let E=KS(k,f),P=x.createHref(k.mask||k);try{s.pushState(E,"",P)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;i.location.assign(P)}a&&c&&c({action:u,location:x.location,delta:1})}function v(y,S){u="REPLACE";let k=VS(y)?y:Gb(x.location,y,S);f=p();let E=KS(k,f),P=x.createHref(k.mask||k);s.replaceState(E,"",P),a&&c&&c({action:u,location:x.location,delta:0})}function w(y){return ML(i,y)}let x={get action(){return u},get location(){return t(i,s)},listen(y){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(HS,h),c=y,()=>{i.removeEventListener(HS,h),c=null}},createHref(y){return e(i,y)},createURL:w,encodeLocation(y){let S=w(y);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:g,replace:v,go(y){return s.go(y)}};return x}function ML(t,e,r=!1){let n="http://localhost";t&&(n=t.location.origin!=="null"?t.location.origin:t.location.href),pt(n,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:ru(e);return i=i.replace(/ $/,"%20"),!r&&i.startsWith("//")&&(i=n+i),new URL(i,n)}function zj(t,e,r="/"){return LL(t,e,r,!1)}function LL(t,e,r,n,i){let a=typeof e=="string"?Ps(e):e,s=hi(a.pathname||"/",r);if(s==null)return null;let u=DL(t),c=null,f=YL(s);for(let p=0;c==null&&p<u.length;++p)c=GL(u[p],f,n);return c}function DL(t){let e=Fj(t);return BL(e),e}function Fj(t,e=[],r=[],n="",i=!1){let a=(s,u,c=i,f)=>{let p={relativePath:f===void 0?s.path||"":f,caseSensitive:s.caseSensitive===!0,childrenIndex:u,route:s};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(n)&&c)return;pt(p.relativePath.startsWith(n),`Absolute route path "${p.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(n.length)}let h=Sn([n,p.relativePath]),g=r.concat(p);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 "${h}".`),Fj(s.children,e,g,h,c)),!(s.path==null&&!s.index)&&e.push({path:h,score:VL(h,s.index),routesMeta:g})};return t.forEach((s,u)=>{var c;if(s.path===""||!((c=s.path)!=null&&c.includes("?")))a(s,u);else for(let f of Wj(s.path))a(s,u,!0,f)}),e}function Wj(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let s=Wj(n.join("/")),u=[];return u.push(...s.map(c=>c===""?a:[a,c].join("/"))),i&&u.push(...s),u.map(c=>t.startsWith("/")&&c===""?"/":c)}function BL(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:KL(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var UL=/^:[\w-]+$/,qL=3,zL=2,FL=1,WL=10,HL=-2,GS=t=>t==="*";function VL(t,e){let r=t.split("/"),n=r.length;return r.some(GS)&&(n+=HL),e&&(n+=zL),r.filter(i=>!GS(i)).reduce((i,a)=>i+(UL.test(a)?qL:a===""?FL:WL),n)}function KL(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function GL(t,e,r=!1){let{routesMeta:n}=t,i={},a="/",s=[];for(let u=0;u<n.length;++u){let c=n[u],f=u===n.length-1,p=a==="/"?e:e.slice(a.length)||"/",h=Hf({path:c.relativePath,caseSensitive:c.caseSensitive,end:f},p),g=c.route;if(!h&&f&&r&&!n[n.length-1].route.index&&(h=Hf({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},p)),!h)return null;Object.assign(i,h.params),s.push({params:i,pathname:Sn([a,h.pathname]),pathnameBase:eD(Sn([a,h.pathnameBase])),route:g}),h.pathnameBase!=="/"&&(a=Sn([a,h.pathnameBase]))}return s}function Hf(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=XL(t.path,t.caseSensitive,t.end),i=e.match(r);if(!i)return null;let a=i[0],s=a.replace(/(.)\/+$/,"$1"),u=i.slice(1);return{params:n.reduce((f,{paramName:p,isOptional:h},g)=>{if(p==="*"){let w=u[g]||"";s=a.slice(0,a.length-w.length).replace(/(.)\/+$/,"$1")}const v=u[g];return h&&!v?f[p]=void 0:f[p]=(v||"").replace(/%2F/g,"/"),f},{}),pathname:a,pathnameBase:s,pattern:t}}function XL(t,e=!1,r=!0){kn(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,u,c,f,p)=>{if(n.push({paramName:u,isOptional:c!=null}),c){let h=p.charAt(f+s.length);return h&&h!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(n.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function YL(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return kn(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function hi(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}var JL=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function QL(t,e="/"){let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?Ps(t):t,a;return r?(r=Hj(r),r.startsWith("/")?a=XS(r.substring(1),"/"):a=XS(r,e)):a=e,{pathname:a,search:tD(n),hash:rD(i)}}function XS(t,e){let r=Vf(e).split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Lm(t,e,r,n){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ZL(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function Bw(t){let e=ZL(t);return e.map((r,n)=>n===e.length-1?r.pathname:r.pathnameBase)}function rh(t,e,r,n=!1){let i;typeof t=="string"?i=Ps(t):(i={...t},pt(!i.pathname||!i.pathname.includes("?"),Lm("?","pathname","search",i)),pt(!i.pathname||!i.pathname.includes("#"),Lm("#","pathname","hash",i)),pt(!i.search||!i.search.includes("#"),Lm("#","search","hash",i)));let a=t===""||i.pathname==="",s=a?"/":i.pathname,u;if(s==null)u=r;else{let h=e.length-1;if(!n&&s.startsWith("..")){let g=s.split("/");for(;g[0]==="..";)g.shift(),h-=1;i.pathname=g.join("/")}u=h>=0?e[h]:"/"}let c=QL(i,u),f=s&&s!=="/"&&s.endsWith("/"),p=(a||s===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(f||p)&&(c.pathname+="/"),c}var Hj=t=>t.replace(/\/\/+/g,"/"),Sn=t=>Hj(t.join("/")),Vf=t=>t.replace(/\/+$/,""),eD=t=>Vf(t).replace(/^\/*/,"/"),tD=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,rD=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,nD=class{constructor(t,e,r,n=!1){this.status=t,this.statusText=e||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function iD(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function aD(t){let e=t.map(r=>r.route.path).filter(Boolean);return Sn(e)||"/"}var Vj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Kj(t,e){let r=t;if(typeof r!="string"||!JL.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,i=!1;if(Vj)try{let a=new URL(window.location.href),s=r.startsWith("//")?new URL(a.protocol+r):new URL(r),u=hi(s.pathname,e);s.origin===a.origin&&u!=null?r=u+s.search+s.hash:i=!0}catch{kn(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:i,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Gj=["POST","PUT","PATCH","DELETE"];new Set(Gj);var oD=["GET",...Gj];new Set(oD);var Ts=$.createContext(null);Ts.displayName="DataRouter";var nh=$.createContext(null);nh.displayName="DataRouterState";var Xj=$.createContext(!1);function sD(){return $.useContext(Xj)}var Yj=$.createContext({isTransitioning:!1});Yj.displayName="ViewTransition";var lD=$.createContext(new Map);lD.displayName="Fetchers";var uD=$.createContext(null);uD.displayName="Await";var Lr=$.createContext(null);Lr.displayName="Navigation";var Wu=$.createContext(null);Wu.displayName="Location";var nn=$.createContext({outlet:null,matches:[],isDataRoute:!1});nn.displayName="Route";var Uw=$.createContext(null);Uw.displayName="RouteError";var Jj="REACT_ROUTER_ERROR",cD="REDIRECT",fD="ROUTE_ERROR_RESPONSE";function dD(t){if(t.startsWith(`${Jj}:${cD}:{`))try{let e=JSON.parse(t.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function hD(t){if(t.startsWith(`${Jj}:${fD}:{`))try{let e=JSON.parse(t.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new nD(e.status,e.statusText,e.data)}catch{}}function pD(t,{relative:e}={}){pt(Cs(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=$.useContext(Lr),{hash:i,pathname:a,search:s}=Hu(t,{relative:e}),u=a;return r!=="/"&&(u=a==="/"?r:Sn([r,a])),n.createHref({pathname:u,search:s,hash:i})}function Cs(){return $.useContext(Wu)!=null}function Fn(){return pt(Cs(),"useLocation() may be used only in the context of a <Router> component."),$.useContext(Wu).location}var Qj="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Zj(t){$.useContext(Lr).static||$.useLayoutEffect(t)}function eR(){let{isDataRoute:t}=$.useContext(nn);return t?CD():mD()}function mD(){pt(Cs(),"useNavigate() may be used only in the context of a <Router> component.");let t=$.useContext(Ts),{basename:e,navigator:r}=$.useContext(Lr),{matches:n}=$.useContext(nn),{pathname:i}=Fn(),a=JSON.stringify(Bw(n)),s=$.useRef(!1);return Zj(()=>{s.current=!0}),$.useCallback((c,f={})=>{if(kn(s.current,Qj),!s.current)return;if(typeof c=="number"){r.go(c);return}let p=rh(c,JSON.parse(a),i,f.relative==="path");t==null&&e!=="/"&&(p.pathname=p.pathname==="/"?e:Sn([e,p.pathname])),(f.replace?r.replace:r.push)(p,f.state,f)},[e,r,a,i,t])}var gD=$.createContext(null);function vD(t){let e=$.useContext(nn).outlet;return $.useMemo(()=>e&&$.createElement(gD.Provider,{value:t},e),[e,t])}function yD(){let{matches:t}=$.useContext(nn),e=t[t.length-1];return(e==null?void 0:e.params)??{}}function Hu(t,{relative:e}={}){let{matches:r}=$.useContext(nn),{pathname:n}=Fn(),i=JSON.stringify(Bw(r));return $.useMemo(()=>rh(t,JSON.parse(i),n,e==="path"),[t,i,n,e])}function bD(t,e){return tR(t,e)}function tR(t,e,r){var y;pt(Cs(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=$.useContext(Lr),{matches:i}=$.useContext(nn),a=i[i.length-1],s=a?a.params:{},u=a?a.pathname:"/",c=a?a.pathnameBase:"/",f=a&&a.route;{let S=f&&f.path||"";nR(u,!f||S.endsWith("*")||S.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${S}">) 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.
50
+
51
+ Please change the parent <Route path="${S}"> to <Route path="${S==="/"?"*":`${S}/*`}">.`)}let p=Fn(),h;if(e){let S=typeof e=="string"?Ps(e):e;pt(c==="/"||((y=S.pathname)==null?void 0:y.startsWith(c)),`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 "${c}" but pathname "${S.pathname}" was given in the \`location\` prop.`),h=S}else h=p;let g=h.pathname||"/",v=g;if(c!=="/"){let S=c.replace(/^\//,"").split("/");v="/"+g.replace(/^\//,"").split("/").slice(S.length).join("/")}let w=r&&r.state.matches.length?r.state.matches.map(S=>Object.assign(S,{route:r.manifest[S.route.id]||S.route})):zj(t,{pathname:v});kn(f||w!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),kn(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.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 x=kD(w&&w.map(S=>Object.assign({},S,{params:Object.assign({},s,S.params),pathname:Sn([c,n.encodeLocation?n.encodeLocation(S.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?c:Sn([c,n.encodeLocation?n.encodeLocation(S.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathnameBase])})),i,r);return e&&x?$.createElement(Wu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...h},navigationType:"POP"}},x):x}function wD(){let t=TD(),e=iD(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,n="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:n},a={padding:"2px 4px",backgroundColor:n},s=null;return console.error("Error handled by React Router default ErrorBoundary:",t),s=$.createElement($.Fragment,null,$.createElement("p",null,"💿 Hey developer 👋"),$.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",$.createElement("code",{style:a},"ErrorBoundary")," or"," ",$.createElement("code",{style:a},"errorElement")," prop on your route.")),$.createElement($.Fragment,null,$.createElement("h2",null,"Unexpected Application Error!"),$.createElement("h3",{style:{fontStyle:"italic"}},e),r?$.createElement("pre",{style:i},r):null,s)}var xD=$.createElement(wD,null),rR=class extends $.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.onError?this.props.onError(t,e):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const r=hD(t.digest);r&&(t=r)}let e=t!==void 0?$.createElement(nn.Provider,{value:this.props.routeContext},$.createElement(Uw.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?$.createElement(_D,{error:t},e):e}};rR.contextType=Xj;var Dm=new WeakMap;function _D({children:t,error:e}){let{basename:r}=$.useContext(Lr);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let n=dD(e.digest);if(n){let i=Dm.get(e);if(i)throw i;let a=Kj(n.location,r);if(Vj&&!Dm.get(e))if(a.isExternal||n.reloadDocument)window.location.href=a.absoluteURL||a.to;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:n.replace}));throw Dm.set(e,s),s}return $.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return t}function SD({routeContext:t,match:e,children:r}){let n=$.useContext(Ts);return n&&n.static&&n.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=e.route.id),$.createElement(nn.Provider,{value:t},r)}function kD(t,e=[],r){let n=r==null?void 0:r.state;if(t==null){if(!n)return null;if(n.errors)t=n.matches;else if(e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let i=t,a=n==null?void 0:n.errors;if(a!=null){let p=i.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);pt(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),i=i.slice(0,Math.min(i.length,p+1))}let s=!1,u=-1;if(r&&n){s=n.renderFallback;for(let p=0;p<i.length;p++){let h=i[p];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=p),h.route.id){let{loaderData:g,errors:v}=n,w=h.route.loader&&!g.hasOwnProperty(h.route.id)&&(!v||v[h.route.id]===void 0);if(h.route.lazy||w){r.isStatic&&(s=!0),u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}}let c=r==null?void 0:r.onError,f=n&&c?(p,h)=>{var g,v;c(p,{location:n.location,params:((v=(g=n.matches)==null?void 0:g[0])==null?void 0:v.params)??{},pattern:aD(n.matches),errorInfo:h})}:void 0;return i.reduceRight((p,h,g)=>{let v,w=!1,x=null,y=null;n&&(v=a&&h.route.id?a[h.route.id]:void 0,x=h.route.errorElement||xD,s&&(u<0&&g===0?(nR("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,y=null):u===g&&(w=!0,y=h.route.hydrateFallbackElement||null)));let S=e.concat(i.slice(0,g+1)),k=()=>{let E;return v?E=x:w?E=y:h.route.Component?E=$.createElement(h.route.Component,null):h.route.element?E=h.route.element:E=p,$.createElement(SD,{match:h,routeContext:{outlet:p,matches:S,isDataRoute:n!=null},children:E})};return n&&(h.route.ErrorBoundary||h.route.errorElement||g===0)?$.createElement(rR,{location:n.location,revalidation:n.revalidation,component:x,error:v,children:k(),routeContext:{outlet:null,matches:S,isDataRoute:!0},onError:f}):k()},null)}function qw(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function OD(t){let e=$.useContext(Ts);return pt(e,qw(t)),e}function ED(t){let e=$.useContext(nh);return pt(e,qw(t)),e}function AD(t){let e=$.useContext(nn);return pt(e,qw(t)),e}function zw(t){let e=AD(t),r=e.matches[e.matches.length-1];return pt(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}function PD(){return zw("useRouteId")}function TD(){var n;let t=$.useContext(Uw),e=ED("useRouteError"),r=zw("useRouteError");return t!==void 0?t:(n=e.errors)==null?void 0:n[r]}function CD(){let{router:t}=OD("useNavigate"),e=zw("useNavigate"),r=$.useRef(!1);return Zj(()=>{r.current=!0}),$.useCallback(async(i,a={})=>{kn(r.current,Qj),r.current&&(typeof i=="number"?await t.navigate(i):await t.navigate(i,{fromRouteId:e,...a}))},[t,e])}var YS={};function nR(t,e,r){!e&&!YS[t]&&(YS[t]=!0,kn(!1,r))}$.memo(jD);function jD({routes:t,manifest:e,future:r,state:n,isStatic:i,onError:a}){return tR(t,void 0,{manifest:e,state:n,isStatic:i,onError:a})}function RD({to:t,replace:e,state:r,relative:n}){pt(Cs(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=$.useContext(Lr);kn(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=$.useContext(nn),{pathname:s}=Fn(),u=eR(),c=rh(t,Bw(a),s,n==="path"),f=JSON.stringify(c);return $.useEffect(()=>{u(JSON.parse(f),{replace:e,state:r,relative:n})},[u,f,n,e,r]),null}function ID(t){return vD(t.context)}function Jr(t){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 $D({basename:t="/",children:e=null,location:r,navigationType:n="POP",navigator:i,static:a=!1,useTransitions:s}){pt(!Cs(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=t.replace(/^\/*/,"/"),c=$.useMemo(()=>({basename:u,navigator:i,static:a,useTransitions:s,future:{}}),[u,i,a,s]);typeof r=="string"&&(r=Ps(r));let{pathname:f="/",search:p="",hash:h="",state:g=null,key:v="default",mask:w}=r,x=$.useMemo(()=>{let y=hi(f,u);return y==null?null:{location:{pathname:y,search:p,hash:h,state:g,key:v,mask:w},navigationType:n}},[u,f,p,h,g,v,n,w]);return kn(x!=null,`<Router basename="${u}"> is not able to match the URL "${f}${p}${h}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:$.createElement(Lr.Provider,{value:c},$.createElement(Wu.Provider,{children:e,value:x}))}function ND({children:t,location:e}){return bD(Xb(t),e)}function Xb(t,e=[]){let r=[];return $.Children.forEach(t,(n,i)=>{if(!$.isValidElement(n))return;let a=[...e,i];if(n.type===$.Fragment){r.push.apply(r,Xb(n.props.children,a));return}pt(n.type===Jr,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),pt(!n.props.index||!n.props.children,"An index route cannot have child routes.");let s={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(s.children=Xb(n.props.children,a)),r.push(s)}),r}var qf="get",zf="application/x-www-form-urlencoded";function ih(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function MD(t){return ih(t)&&t.tagName.toLowerCase()==="button"}function LD(t){return ih(t)&&t.tagName.toLowerCase()==="form"}function DD(t){return ih(t)&&t.tagName.toLowerCase()==="input"}function BD(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function UD(t,e){return t.button===0&&(!e||e==="_self")&&!BD(t)}var df=null;function qD(){if(df===null)try{new FormData(document.createElement("form"),0),df=!1}catch{df=!0}return df}var zD=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Bm(t){return t!=null&&!zD.has(t)?(kn(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${zf}"`),null):t}function FD(t,e){let r,n,i,a,s;if(LD(t)){let u=t.getAttribute("action");n=u?hi(u,e):null,r=t.getAttribute("method")||qf,i=Bm(t.getAttribute("enctype"))||zf,a=new FormData(t)}else if(MD(t)||DD(t)&&(t.type==="submit"||t.type==="image")){let u=t.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=t.getAttribute("formaction")||u.getAttribute("action");if(n=c?hi(c,e):null,r=t.getAttribute("formmethod")||u.getAttribute("method")||qf,i=Bm(t.getAttribute("formenctype"))||Bm(u.getAttribute("enctype"))||zf,a=new FormData(u,t),!qD()){let{name:f,type:p,value:h}=t;if(p==="image"){let g=f?`${f}.`:"";a.append(`${g}x`,"0"),a.append(`${g}y`,"0")}else f&&a.append(f,h)}}else{if(ih(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=qf,n=null,i=zf,s=t}return a&&i==="text/plain"&&(s=a,a=void 0),{action:n,method:r.toLowerCase(),encType:i,formData:a,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Fw(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function iR(t,e,r,n){let i=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return r?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${n}`:i.pathname=`${i.pathname}.${n}`:i.pathname==="/"?i.pathname=`_root.${n}`:e&&hi(i.pathname,e)==="/"?i.pathname=`${Vf(e)}/_root.${n}`:i.pathname=`${Vf(i.pathname)}.${n}`,i}async function WD(t,e){if(t.id in e)return e[t.id];try{let r=await import(t.module);return e[t.id]=r,r}catch(r){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function HD(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function VD(t,e,r){let n=await Promise.all(t.map(async i=>{let a=e.routes[i.route.id];if(a){let s=await WD(a,r);return s.links?s.links():[]}return[]}));return YD(n.flat(1).filter(HD).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function JS(t,e,r,n,i,a){let s=(c,f)=>r[f]?c.route.id!==r[f].route.id:!0,u=(c,f)=>{var p;return r[f].pathname!==c.pathname||((p=r[f].route.path)==null?void 0:p.endsWith("*"))&&r[f].params["*"]!==c.params["*"]};return a==="assets"?e.filter((c,f)=>s(c,f)||u(c,f)):a==="data"?e.filter((c,f)=>{var h;let p=n.routes[c.route.id];if(!p||!p.hasLoader)return!1;if(s(c,f)||u(c,f))return!0;if(c.route.shouldRevalidate){let g=c.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((h=r[0])==null?void 0:h.params)||{},nextUrl:new URL(t,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function KD(t,e,{includeHydrateFallback:r}={}){return GD(t.map(n=>{let i=e.routes[n.route.id];if(!i)return[];let a=[i.module];return i.clientActionModule&&(a=a.concat(i.clientActionModule)),i.clientLoaderModule&&(a=a.concat(i.clientLoaderModule)),r&&i.hydrateFallbackModule&&(a=a.concat(i.hydrateFallbackModule)),i.imports&&(a=a.concat(i.imports)),a}).flat(1))}function GD(t){return[...new Set(t)]}function XD(t){let e={},r=Object.keys(t).sort();for(let n of r)e[n]=t[n];return e}function YD(t,e){let r=new Set;return new Set(e),t.reduce((n,i)=>{let a=JSON.stringify(XD(i));return r.has(a)||(r.add(a),n.push({key:a,link:i})),n},[])}function Ww(){let t=$.useContext(Ts);return Fw(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function JD(){let t=$.useContext(nh);return Fw(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var Hw=$.createContext(void 0);Hw.displayName="FrameworkContext";function Vw(){let t=$.useContext(Hw);return Fw(t,"You must render this element inside a <HydratedRouter> element"),t}function QD(t,e){let r=$.useContext(Hw),[n,i]=$.useState(!1),[a,s]=$.useState(!1),{onFocus:u,onBlur:c,onMouseEnter:f,onMouseLeave:p,onTouchStart:h}=e,g=$.useRef(null);$.useEffect(()=>{if(t==="render"&&s(!0),t==="viewport"){let x=S=>{S.forEach(k=>{s(k.isIntersecting)})},y=new IntersectionObserver(x,{threshold:.5});return g.current&&y.observe(g.current),()=>{y.disconnect()}}},[t]),$.useEffect(()=>{if(n){let x=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(x)}}},[n]);let v=()=>{i(!0)},w=()=>{i(!1),s(!1)};return r?t!=="intent"?[a,g,{}]:[a,g,{onFocus:El(u,v),onBlur:El(c,w),onMouseEnter:El(f,v),onMouseLeave:El(p,w),onTouchStart:El(h,v)}]:[!1,g,{}]}function El(t,e){return r=>{t&&t(r),r.defaultPrevented||e(r)}}function ZD({page:t,...e}){let r=sD(),{router:n}=Ww(),i=$.useMemo(()=>zj(n.routes,t,n.basename),[n.routes,t,n.basename]);return i?r?$.createElement(t3,{page:t,matches:i,...e}):$.createElement(r3,{page:t,matches:i,...e}):null}function e3(t){let{manifest:e,routeModules:r}=Vw(),[n,i]=$.useState([]);return $.useEffect(()=>{let a=!1;return VD(t,e,r).then(s=>{a||i(s)}),()=>{a=!0}},[t,e,r]),n}function t3({page:t,matches:e,...r}){let n=Fn(),{future:i}=Vw(),{basename:a}=Ww(),s=$.useMemo(()=>{if(t===n.pathname+n.search+n.hash)return[];let u=iR(t,a,i.v8_trailingSlashAwareDataRequests,"rsc"),c=!1,f=[];for(let p of e)typeof p.route.shouldRevalidate=="function"?c=!0:f.push(p.route.id);return c&&f.length>0&&u.searchParams.set("_routes",f.join(",")),[u.pathname+u.search]},[a,i.v8_trailingSlashAwareDataRequests,t,n,e]);return $.createElement($.Fragment,null,s.map(u=>$.createElement("link",{key:u,rel:"prefetch",as:"fetch",href:u,...r})))}function r3({page:t,matches:e,...r}){let n=Fn(),{future:i,manifest:a,routeModules:s}=Vw(),{basename:u}=Ww(),{loaderData:c,matches:f}=JD(),p=$.useMemo(()=>JS(t,e,f,a,n,"data"),[t,e,f,a,n]),h=$.useMemo(()=>JS(t,e,f,a,n,"assets"),[t,e,f,a,n]),g=$.useMemo(()=>{if(t===n.pathname+n.search+n.hash)return[];let x=new Set,y=!1;if(e.forEach(k=>{var P;let E=a.routes[k.route.id];!E||!E.hasLoader||(!p.some(O=>O.route.id===k.route.id)&&k.route.id in c&&((P=s[k.route.id])!=null&&P.shouldRevalidate)||E.hasClientLoader?y=!0:x.add(k.route.id))}),x.size===0)return[];let S=iR(t,u,i.v8_trailingSlashAwareDataRequests,"data");return y&&x.size>0&&S.searchParams.set("_routes",e.filter(k=>x.has(k.route.id)).map(k=>k.route.id).join(",")),[S.pathname+S.search]},[u,i.v8_trailingSlashAwareDataRequests,c,n,a,p,e,t,s]),v=$.useMemo(()=>KD(h,a),[h,a]),w=e3(h);return $.createElement($.Fragment,null,g.map(x=>$.createElement("link",{key:x,rel:"prefetch",as:"fetch",href:x,...r})),v.map(x=>$.createElement("link",{key:x,rel:"modulepreload",href:x,...r})),w.map(({key:x,link:y})=>$.createElement("link",{key:x,nonce:r.nonce,...y,crossOrigin:y.crossOrigin??r.crossOrigin})))}function n3(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})}}var i3=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{i3&&(window.__reactRouterVersion="7.16.0")}catch{}function a3({basename:t,children:e,useTransitions:r,window:n}){let i=$.useRef();i.current==null&&(i.current=IL({window:n,v5Compat:!0}));let a=i.current,[s,u]=$.useState({action:a.action,location:a.location}),c=$.useCallback(f=>{r===!1?u(f):$.startTransition(()=>u(f))},[r]);return $.useLayoutEffect(()=>a.listen(c),[a,c]),$.createElement($D,{basename:t,children:e,location:s.location,navigationType:s.action,navigator:a,useTransitions:r})}var aR=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,oR=$.forwardRef(function({onClick:e,discover:r="render",prefetch:n="none",relative:i,reloadDocument:a,replace:s,mask:u,state:c,target:f,to:p,preventScrollReset:h,viewTransition:g,defaultShouldRevalidate:v,...w},x){let{basename:y,navigator:S,useTransitions:k}=$.useContext(Lr),E=typeof p=="string"&&aR.test(p),P=Kj(p,y);p=P.to;let O=pD(p,{relative:i}),A=Fn(),C=null;if(u){let V=rh(u,[],A.mask?A.mask.pathname:"/",!0);y!=="/"&&(V.pathname=V.pathname==="/"?y:Sn([y,V.pathname])),C=S.createHref(V)}let[R,M,H]=QD(n,w),z=l3(p,{replace:s,mask:u,state:c,target:f,preventScrollReset:h,relative:i,viewTransition:g,defaultShouldRevalidate:v,useTransitions:k});function B(V){e&&e(V),V.defaultPrevented||z(V)}let F=!(P.isExternal||a),J=$.createElement("a",{...w,...H,href:(F?C:void 0)||P.absoluteURL||O,onClick:F?B:e,ref:n3(x,M),target:f,"data-discover":!E&&r==="render"?"true":void 0});return R&&!E?$.createElement($.Fragment,null,J,$.createElement(ZD,{page:O})):J});oR.displayName="Link";var sR=$.forwardRef(function({"aria-current":e="page",caseSensitive:r=!1,className:n="",end:i=!1,style:a,to:s,viewTransition:u,children:c,...f},p){let h=Hu(s,{relative:f.relative}),g=Fn(),v=$.useContext(nh),{navigator:w,basename:x}=$.useContext(Lr),y=v!=null&&h3(h)&&u===!0,S=w.encodeLocation?w.encodeLocation(h).pathname:h.pathname,k=g.pathname,E=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;r||(k=k.toLowerCase(),E=E?E.toLowerCase():null,S=S.toLowerCase()),E&&x&&(E=hi(E,x)||E);const P=S!=="/"&&S.endsWith("/")?S.length-1:S.length;let O=k===S||!i&&k.startsWith(S)&&k.charAt(P)==="/",A=E!=null&&(E===S||!i&&E.startsWith(S)&&E.charAt(S.length)==="/"),C={isActive:O,isPending:A,isTransitioning:y},R=O?e:void 0,M;typeof n=="function"?M=n(C):M=[n,O?"active":null,A?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let H=typeof a=="function"?a(C):a;return $.createElement(oR,{...f,"aria-current":R,className:M,ref:p,style:H,to:s,viewTransition:u},typeof c=="function"?c(C):c)});sR.displayName="NavLink";var o3=$.forwardRef(({discover:t="render",fetcherKey:e,navigate:r,reloadDocument:n,replace:i,state:a,method:s=qf,action:u,onSubmit:c,relative:f,preventScrollReset:p,viewTransition:h,defaultShouldRevalidate:g,...v},w)=>{let{useTransitions:x}=$.useContext(Lr),y=f3(),S=d3(u,{relative:f}),k=s.toLowerCase()==="get"?"get":"post",E=typeof u=="string"&&aR.test(u),P=O=>{if(c&&c(O),O.defaultPrevented)return;O.preventDefault();let A=O.nativeEvent.submitter,C=(A==null?void 0:A.getAttribute("formmethod"))||s,R=()=>y(A||O.currentTarget,{fetcherKey:e,method:C,navigate:r,replace:i,state:a,relative:f,preventScrollReset:p,viewTransition:h,defaultShouldRevalidate:g});x&&r!==!1?$.startTransition(()=>R()):R()};return $.createElement("form",{ref:w,method:k,action:S,onSubmit:n?c:P,...v,"data-discover":!E&&t==="render"?"true":void 0})});o3.displayName="Form";function s3(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lR(t){let e=$.useContext(Ts);return pt(e,s3(t)),e}function l3(t,{target:e,replace:r,mask:n,state:i,preventScrollReset:a,relative:s,viewTransition:u,defaultShouldRevalidate:c,useTransitions:f}={}){let p=eR(),h=Fn(),g=Hu(t,{relative:s});return $.useCallback(v=>{if(UD(v,e)){v.preventDefault();let w=r!==void 0?r:ru(h)===ru(g),x=()=>p(t,{replace:w,mask:n,state:i,preventScrollReset:a,relative:s,viewTransition:u,defaultShouldRevalidate:c});f?$.startTransition(()=>x()):x()}},[h,p,g,r,n,i,e,t,a,s,u,c,f])}var u3=0,c3=()=>`__${String(++u3)}__`;function f3(){let{router:t}=lR("useSubmit"),{basename:e}=$.useContext(Lr),r=PD(),n=t.fetch,i=t.navigate;return $.useCallback(async(a,s={})=>{let{action:u,method:c,encType:f,formData:p,body:h}=FD(a,e);if(s.navigate===!1){let g=s.fetcherKey||c3();await n(g,r,s.action||u,{defaultShouldRevalidate:s.defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:p,body:h,formMethod:s.method||c,formEncType:s.encType||f,flushSync:s.flushSync})}else await i(s.action||u,{defaultShouldRevalidate:s.defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:p,body:h,formMethod:s.method||c,formEncType:s.encType||f,replace:s.replace,state:s.state,fromRouteId:r,flushSync:s.flushSync,viewTransition:s.viewTransition})},[n,i,e,r])}function d3(t,{relative:e}={}){let{basename:r}=$.useContext(Lr),n=$.useContext(nn);pt(n,"useFormAction must be used inside a RouteContext");let[i]=n.matches.slice(-1),a={...Hu(t||".",{relative:e})},s=Fn();if(t==null){a.search=s.search;let u=new URLSearchParams(a.search),c=u.getAll("index");if(c.some(p=>p==="")){u.delete("index"),c.filter(h=>h).forEach(h=>u.append("index",h));let p=u.toString();a.search=p?`?${p}`:""}}return(!t||t===".")&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(a.pathname=a.pathname==="/"?r:Sn([r,a.pathname])),ru(a)}function h3(t,{relative:e}={}){let r=$.useContext(Yj);pt(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=lR("useViewTransitionState"),i=Hu(t,{relative:e});if(!r.isTransitioning)return!1;let a=hi(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=hi(r.nextLocation.pathname,n)||r.nextLocation.pathname;return Hf(i.pathname,s)!=null||Hf(i.pathname,a)!=null}var p3=qj();const m3=Ye(p3);function g3(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}const v3=t=>{switch(t){case"success":return w3;case"info":return _3;case"warning":return x3;case"error":return S3;default:return null}},y3=Array(12).fill(0),b3=({visible:t,className:e})=>I.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},I.createElement("div",{className:"sonner-spinner"},y3.map((r,n)=>I.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),w3=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),x3=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),_3=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),S3=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),k3=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},I.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),I.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),O3=()=>{const[t,e]=I.useState(document.hidden);return I.useEffect(()=>{const r=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),t};let Yb=1;class E3{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const r=this.subscribers.indexOf(e);this.subscribers.splice(r,1)}),this.publish=e=>{this.subscribers.forEach(r=>r(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var r;const{message:n,...i}=e,a=typeof(e==null?void 0:e.id)=="number"||((r=e.id)==null?void 0:r.length)>0?e.id:Yb++,s=this.toasts.find(c=>c.id===a),u=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),s?this.toasts=this.toasts.map(c=>c.id===a?(this.publish({...c,...e,id:a,title:n}),{...c,...e,id:a,dismissible:u,title:n}):c):this.addToast({title:n,...i,dismissible:u,id:a}),a},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:e,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(n=>n({id:r.id,dismiss:!0}))}),e),this.message=(e,r)=>this.create({...r,message:e}),this.error=(e,r)=>this.create({...r,message:e,type:"error"}),this.success=(e,r)=>this.create({...r,type:"success",message:e}),this.info=(e,r)=>this.create({...r,type:"info",message:e}),this.warning=(e,r)=>this.create({...r,type:"warning",message:e}),this.loading=(e,r)=>this.create({...r,type:"loading",message:e}),this.promise=(e,r)=>{if(!r)return;let n;r.loading!==void 0&&(n=this.create({...r,promise:e,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const i=Promise.resolve(e instanceof Function?e():e);let a=n!==void 0,s;const u=i.then(async f=>{if(s=["resolve",f],I.isValidElement(f))a=!1,this.create({id:n,type:"default",message:f});else if(P3(f)&&!f.ok){a=!1;const h=typeof r.error=="function"?await r.error(`HTTP error! status: ${f.status}`):r.error,g=typeof r.description=="function"?await r.description(`HTTP error! status: ${f.status}`):r.description,w=typeof h=="object"&&!I.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:g,...w})}else if(f instanceof Error){a=!1;const h=typeof r.error=="function"?await r.error(f):r.error,g=typeof r.description=="function"?await r.description(f):r.description,w=typeof h=="object"&&!I.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:g,...w})}else if(r.success!==void 0){a=!1;const h=typeof r.success=="function"?await r.success(f):r.success,g=typeof r.description=="function"?await r.description(f):r.description,w=typeof h=="object"&&!I.isValidElement(h)?h:{message:h};this.create({id:n,type:"success",description:g,...w})}}).catch(async f=>{if(s=["reject",f],r.error!==void 0){a=!1;const p=typeof r.error=="function"?await r.error(f):r.error,h=typeof r.description=="function"?await r.description(f):r.description,v=typeof p=="object"&&!I.isValidElement(p)?p:{message:p};this.create({id:n,type:"error",description:h,...v})}}).finally(()=>{a&&(this.dismiss(n),n=void 0),r.finally==null||r.finally.call(r)}),c=()=>new Promise((f,p)=>u.then(()=>s[0]==="reject"?p(s[1]):f(s[1])).catch(p));return typeof n!="string"&&typeof n!="number"?{unwrap:c}:Object.assign(n,{unwrap:c})},this.custom=(e,r)=>{const n=(r==null?void 0:r.id)||Yb++;return this.create({jsx:e(n),id:n,...r}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const _r=new E3,A3=(t,e)=>{const r=(e==null?void 0:e.id)||Yb++;return _r.addToast({title:t,...e,id:r}),r},P3=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",T3=A3,C3=()=>_r.toasts,j3=()=>_r.getActiveToasts(),sr=Object.assign(T3,{success:_r.success,info:_r.info,warning:_r.warning,error:_r.error,custom:_r.custom,message:_r.message,promise:_r.promise,dismiss:_r.dismiss,loading:_r.loading},{getHistory:C3,getToasts:j3});g3("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function hf(t){return t.label!==void 0}const R3=3,I3="24px",$3="16px",QS=4e3,N3=356,M3=14,L3=45,D3=200;function jn(...t){return t.filter(Boolean).join(" ")}function B3(t){const[e,r]=t.split("-"),n=[];return e&&n.push(e),r&&n.push(r),n}const U3=t=>{var e,r,n,i,a,s,u,c,f;const{invert:p,toast:h,unstyled:g,interacting:v,setHeights:w,visibleToasts:x,heights:y,index:S,toasts:k,expanded:E,removeToast:P,defaultRichColors:O,closeButton:A,style:C,cancelButtonStyle:R,actionButtonStyle:M,className:H="",descriptionClassName:z="",duration:B,position:F,gap:J,expandByDefault:V,classNames:K,icons:Z,closeButtonAriaLabel:G="Close toast"}=t,[ee,U]=I.useState(null),[L,W]=I.useState(null),[te,ue]=I.useState(!1),[le,de]=I.useState(!1),[Re,pe]=I.useState(!1),[ne,_e]=I.useState(!1),[Oe,ie]=I.useState(!1),[ze,Ie]=I.useState(0),[ct,at]=I.useState(0),ft=I.useRef(h.duration||B||QS),pr=I.useRef(null),St=I.useRef(null),Dr=S===0,er=S+1<=x,ot=h.type,Er=h.dismissible!==!1,la=h.className||"",ua=h.descriptionClassName||"",ca=I.useMemo(()=>y.findIndex(Ne=>Ne.toastId===h.id)||0,[y,h.id]),qs=I.useMemo(()=>{var Ne;return(Ne=h.closeButton)!=null?Ne:A},[h.closeButton,A]),fa=I.useMemo(()=>h.duration||B||QS,[h.duration,B]),ao=I.useRef(0),Br=I.useRef(0),_i=I.useRef(0),Si=I.useRef(null),[tc,rc]=F.split("-"),nc=I.useMemo(()=>y.reduce((Ne,wt,Ct)=>Ct>=ca?Ne:Ne+wt.height,0),[y,ca]),oo=O3(),zs=h.invert||p,da=ot==="loading";Br.current=I.useMemo(()=>ca*J+nc,[ca,nc]),I.useEffect(()=>{ft.current=fa},[fa]),I.useEffect(()=>{ue(!0)},[]),I.useEffect(()=>{const Ne=St.current;if(Ne){const wt=Ne.getBoundingClientRect().height;return at(wt),w(Ct=>[{toastId:h.id,height:wt,position:h.position},...Ct]),()=>w(Ct=>Ct.filter(tr=>tr.toastId!==h.id))}},[w,h.id]),I.useLayoutEffect(()=>{if(!te)return;const Ne=St.current,wt=Ne.style.height;Ne.style.height="auto";const Ct=Ne.getBoundingClientRect().height;Ne.style.height=wt,at(Ct),w(tr=>tr.find(kt=>kt.toastId===h.id)?tr.map(kt=>kt.toastId===h.id?{...kt,height:Ct}:kt):[{toastId:h.id,height:Ct,position:h.position},...tr])},[te,h.title,h.description,w,h.id,h.jsx,h.action,h.cancel]);const Ur=I.useCallback(()=>{de(!0),Ie(Br.current),w(Ne=>Ne.filter(wt=>wt.toastId!==h.id)),setTimeout(()=>{P(h)},D3)},[h,P,w,Br]);I.useEffect(()=>{if(h.promise&&ot==="loading"||h.duration===1/0||h.type==="loading")return;let Ne;return E||v||oo?(()=>{if(_i.current<ao.current){const tr=new Date().getTime()-ao.current;ft.current=ft.current-tr}_i.current=new Date().getTime()})():(()=>{ft.current!==1/0&&(ao.current=new Date().getTime(),Ne=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),Ur()},ft.current))})(),()=>clearTimeout(Ne)},[E,v,h,ot,oo,Ur]),I.useEffect(()=>{h.delete&&(Ur(),h.onDismiss==null||h.onDismiss.call(h,h))},[Ur,h.delete]);function Fs(){var Ne;if(Z!=null&&Z.loading){var wt;return I.createElement("div",{className:jn(K==null?void 0:K.loader,h==null||(wt=h.classNames)==null?void 0:wt.loader,"sonner-loader"),"data-visible":ot==="loading"},Z.loading)}return I.createElement(b3,{className:jn(K==null?void 0:K.loader,h==null||(Ne=h.classNames)==null?void 0:Ne.loader),visible:ot==="loading"})}const ki=h.icon||(Z==null?void 0:Z[ot])||v3(ot);var Vn,Ws;return I.createElement("li",{tabIndex:0,ref:St,className:jn(H,la,K==null?void 0:K.toast,h==null||(e=h.classNames)==null?void 0:e.toast,K==null?void 0:K.default,K==null?void 0:K[ot],h==null||(r=h.classNames)==null?void 0:r[ot]),"data-sonner-toast":"","data-rich-colors":(Vn=h.richColors)!=null?Vn:O,"data-styled":!(h.jsx||h.unstyled||g),"data-mounted":te,"data-promise":!!h.promise,"data-swiped":Oe,"data-removed":le,"data-visible":er,"data-y-position":tc,"data-x-position":rc,"data-index":S,"data-front":Dr,"data-swiping":Re,"data-dismissible":Er,"data-type":ot,"data-invert":zs,"data-swipe-out":ne,"data-swipe-direction":L,"data-expanded":!!(E||V&&te),"data-testid":h.testId,style:{"--index":S,"--toasts-before":S,"--z-index":k.length-S,"--offset":`${le?ze:Br.current}px`,"--initial-height":V?"auto":`${ct}px`,...C,...h.style},onDragEnd:()=>{pe(!1),U(null),Si.current=null},onPointerDown:Ne=>{Ne.button!==2&&(da||!Er||(pr.current=new Date,Ie(Br.current),Ne.target.setPointerCapture(Ne.pointerId),Ne.target.tagName!=="BUTTON"&&(pe(!0),Si.current={x:Ne.clientX,y:Ne.clientY})))},onPointerUp:()=>{var Ne,wt,Ct;if(ne||!Er)return;Si.current=null;const tr=Number(((Ne=St.current)==null?void 0:Ne.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Oi=Number(((wt=St.current)==null?void 0:wt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),kt=new Date().getTime()-((Ct=pr.current)==null?void 0:Ct.getTime()),Bt=ee==="x"?tr:Oi,Ei=Math.abs(Bt)/kt;if(Math.abs(Bt)>=L3||Ei>.11){Ie(Br.current),h.onDismiss==null||h.onDismiss.call(h,h),W(ee==="x"?tr>0?"right":"left":Oi>0?"down":"up"),Ur(),_e(!0);return}else{var Kt,Ar;(Kt=St.current)==null||Kt.style.setProperty("--swipe-amount-x","0px"),(Ar=St.current)==null||Ar.style.setProperty("--swipe-amount-y","0px")}ie(!1),pe(!1),U(null)},onPointerMove:Ne=>{var wt,Ct,tr;if(!Si.current||!Er||((wt=window.getSelection())==null?void 0:wt.toString().length)>0)return;const kt=Ne.clientY-Si.current.y,Bt=Ne.clientX-Si.current.x;var Ei;const Kt=(Ei=t.swipeDirections)!=null?Ei:B3(F);!ee&&(Math.abs(Bt)>1||Math.abs(kt)>1)&&U(Math.abs(Bt)>Math.abs(kt)?"x":"y");let Ar={x:0,y:0};const Ai=qr=>1/(1.5+Math.abs(qr)/20);if(ee==="y"){if(Kt.includes("top")||Kt.includes("bottom"))if(Kt.includes("top")&&kt<0||Kt.includes("bottom")&&kt>0)Ar.y=kt;else{const qr=kt*Ai(kt);Ar.y=Math.abs(qr)<Math.abs(kt)?qr:kt}}else if(ee==="x"&&(Kt.includes("left")||Kt.includes("right")))if(Kt.includes("left")&&Bt<0||Kt.includes("right")&&Bt>0)Ar.x=Bt;else{const qr=Bt*Ai(Bt);Ar.x=Math.abs(qr)<Math.abs(Bt)?qr:Bt}(Math.abs(Ar.x)>0||Math.abs(Ar.y)>0)&&ie(!0),(Ct=St.current)==null||Ct.style.setProperty("--swipe-amount-x",`${Ar.x}px`),(tr=St.current)==null||tr.style.setProperty("--swipe-amount-y",`${Ar.y}px`)}},qs&&!h.jsx&&ot!=="loading"?I.createElement("button",{"aria-label":G,"data-disabled":da,"data-close-button":!0,onClick:da||!Er?()=>{}:()=>{Ur(),h.onDismiss==null||h.onDismiss.call(h,h)},className:jn(K==null?void 0:K.closeButton,h==null||(n=h.classNames)==null?void 0:n.closeButton)},(Ws=Z==null?void 0:Z.close)!=null?Ws:k3):null,(ot||h.icon||h.promise)&&h.icon!==null&&((Z==null?void 0:Z[ot])!==null||h.icon)?I.createElement("div",{"data-icon":"",className:jn(K==null?void 0:K.icon,h==null||(i=h.classNames)==null?void 0:i.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||Fs():null,h.type!=="loading"?ki:null):null,I.createElement("div",{"data-content":"",className:jn(K==null?void 0:K.content,h==null||(a=h.classNames)==null?void 0:a.content)},I.createElement("div",{"data-title":"",className:jn(K==null?void 0:K.title,h==null||(s=h.classNames)==null?void 0:s.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?I.createElement("div",{"data-description":"",className:jn(z,ua,K==null?void 0:K.description,h==null||(u=h.classNames)==null?void 0:u.description)},typeof h.description=="function"?h.description():h.description):null),I.isValidElement(h.cancel)?h.cancel:h.cancel&&hf(h.cancel)?I.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||R,onClick:Ne=>{hf(h.cancel)&&Er&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,Ne),Ur())},className:jn(K==null?void 0:K.cancelButton,h==null||(c=h.classNames)==null?void 0:c.cancelButton)},h.cancel.label):null,I.isValidElement(h.action)?h.action:h.action&&hf(h.action)?I.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||M,onClick:Ne=>{hf(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,Ne),!Ne.defaultPrevented&&Ur())},className:jn(K==null?void 0:K.actionButton,h==null||(f=h.classNames)==null?void 0:f.actionButton)},h.action.label):null)};function ZS(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function q3(t,e){const r={};return[t,e].forEach((n,i)=>{const a=i===1,s=a?"--mobile-offset":"--offset",u=a?$3:I3;function c(f){["top","right","bottom","left"].forEach(p=>{r[`${s}-${p}`]=typeof f=="number"?`${f}px`:f})}typeof n=="number"||typeof n=="string"?c(n):typeof n=="object"?["top","right","bottom","left"].forEach(f=>{n[f]===void 0?r[`${s}-${f}`]=u:r[`${s}-${f}`]=typeof n[f]=="number"?`${n[f]}px`:n[f]}):c(u)}),r}const z3=I.forwardRef(function(e,r){const{id:n,invert:i,position:a="bottom-right",hotkey:s=["altKey","KeyT"],expand:u,closeButton:c,className:f,offset:p,mobileOffset:h,theme:g="light",richColors:v,duration:w,style:x,visibleToasts:y=R3,toastOptions:S,dir:k=ZS(),gap:E=M3,icons:P,containerAriaLabel:O="Notifications"}=e,[A,C]=I.useState([]),R=I.useMemo(()=>n?A.filter(te=>te.toasterId===n):A.filter(te=>!te.toasterId),[A,n]),M=I.useMemo(()=>Array.from(new Set([a].concat(R.filter(te=>te.position).map(te=>te.position)))),[R,a]),[H,z]=I.useState([]),[B,F]=I.useState(!1),[J,V]=I.useState(!1),[K,Z]=I.useState(g!=="system"?g:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=I.useRef(null),ee=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),U=I.useRef(null),L=I.useRef(!1),W=I.useCallback(te=>{C(ue=>{var le;return(le=ue.find(de=>de.id===te.id))!=null&&le.delete||_r.dismiss(te.id),ue.filter(({id:de})=>de!==te.id)})},[]);return I.useEffect(()=>_r.subscribe(te=>{if(te.dismiss){requestAnimationFrame(()=>{C(ue=>ue.map(le=>le.id===te.id?{...le,delete:!0}:le))});return}setTimeout(()=>{m3.flushSync(()=>{C(ue=>{const le=ue.findIndex(de=>de.id===te.id);return le!==-1?[...ue.slice(0,le),{...ue[le],...te},...ue.slice(le+1)]:[te,...ue]})})})}),[A]),I.useEffect(()=>{if(g!=="system"){Z(g);return}if(g==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Z("dark"):Z("light")),typeof window>"u")return;const te=window.matchMedia("(prefers-color-scheme: dark)");try{te.addEventListener("change",({matches:ue})=>{Z(ue?"dark":"light")})}catch{te.addListener(({matches:le})=>{try{Z(le?"dark":"light")}catch(de){console.error(de)}})}},[g]),I.useEffect(()=>{A.length<=1&&F(!1)},[A]),I.useEffect(()=>{const te=ue=>{var le;if(s.every(pe=>ue[pe]||ue.code===pe)){var Re;F(!0),(Re=G.current)==null||Re.focus()}ue.code==="Escape"&&(document.activeElement===G.current||(le=G.current)!=null&&le.contains(document.activeElement))&&F(!1)};return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[s]),I.useEffect(()=>{if(G.current)return()=>{U.current&&(U.current.focus({preventScroll:!0}),U.current=null,L.current=!1)}},[G.current]),I.createElement("section",{ref:r,"aria-label":`${O} ${ee}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},M.map((te,ue)=>{var le;const[de,Re]=te.split("-");return R.length?I.createElement("ol",{key:te,dir:k==="auto"?ZS():k,tabIndex:-1,ref:G,className:f,"data-sonner-toaster":!0,"data-sonner-theme":K,"data-y-position":de,"data-x-position":Re,style:{"--front-toast-height":`${((le=H[0])==null?void 0:le.height)||0}px`,"--width":`${N3}px`,"--gap":`${E}px`,...x,...q3(p,h)},onBlur:pe=>{L.current&&!pe.currentTarget.contains(pe.relatedTarget)&&(L.current=!1,U.current&&(U.current.focus({preventScroll:!0}),U.current=null))},onFocus:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||L.current||(L.current=!0,U.current=pe.relatedTarget)},onMouseEnter:()=>F(!0),onMouseMove:()=>F(!0),onMouseLeave:()=>{J||F(!1)},onDragEnd:()=>F(!1),onPointerDown:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||V(!0)},onPointerUp:()=>V(!1)},R.filter(pe=>!pe.position&&ue===0||pe.position===te).map((pe,ne)=>{var _e,Oe;return I.createElement(U3,{key:pe.id,icons:P,index:ne,toast:pe,defaultRichColors:v,duration:(_e=S==null?void 0:S.duration)!=null?_e:w,className:S==null?void 0:S.className,descriptionClassName:S==null?void 0:S.descriptionClassName,invert:i,visibleToasts:y,closeButton:(Oe=S==null?void 0:S.closeButton)!=null?Oe:c,interacting:J,position:te,style:S==null?void 0:S.style,unstyled:S==null?void 0:S.unstyled,classNames:S==null?void 0:S.classNames,cancelButtonStyle:S==null?void 0:S.cancelButtonStyle,actionButtonStyle:S==null?void 0:S.actionButtonStyle,closeButtonAriaLabel:S==null?void 0:S.closeButtonAriaLabel,removeToast:W,toasts:R.filter(ie=>ie.position==pe.position),heights:H.filter(ie=>ie.position==pe.position),setHeights:z,expandByDefault:u,gap:E,expanded:B,swipeDirections:e.swipeDirections})})):null}))});function uR(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=uR(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Le(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=uR(t))&&(n&&(n+=" "),n+=e);return n}const F3=(t,e)=>{const r=new Array(t.length+e.length);for(let n=0;n<t.length;n++)r[n]=t[n];for(let n=0;n<e.length;n++)r[t.length+n]=e[n];return r},W3=(t,e)=>({classGroupId:t,validator:e}),cR=(t=new Map,e=null,r)=>({nextPart:t,validators:e,classGroupId:r}),Kf="-",ek=[],H3="arbitrary..",V3=t=>{const e=G3(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return K3(s);const u=s.split(Kf),c=u[0]===""&&u.length>1?1:0;return fR(u,c,e)},getConflictingClassGroupIds:(s,u)=>{if(u){const c=n[s],f=r[s];return c?f?F3(f,c):c:f||ek}return r[s]||ek}}},fR=(t,e,r)=>{if(t.length-e===0)return r.classGroupId;const i=t[e],a=r.nextPart.get(i);if(a){const f=fR(t,e+1,a);if(f)return f}const s=r.validators;if(s===null)return;const u=e===0?t.join(Kf):t.slice(e).join(Kf),c=s.length;for(let f=0;f<c;f++){const p=s[f];if(p.validator(u))return p.classGroupId}},K3=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),r=e.indexOf(":"),n=e.slice(0,r);return n?H3+n:void 0})(),G3=t=>{const{theme:e,classGroups:r}=t;return X3(r,e)},X3=(t,e)=>{const r=cR();for(const n in t){const i=t[n];Kw(i,r,n,e)}return r},Kw=(t,e,r,n)=>{const i=t.length;for(let a=0;a<i;a++){const s=t[a];Y3(s,e,r,n)}},Y3=(t,e,r,n)=>{if(typeof t=="string"){J3(t,e,r);return}if(typeof t=="function"){Q3(t,e,r,n);return}Z3(t,e,r,n)},J3=(t,e,r)=>{const n=t===""?e:dR(e,t);n.classGroupId=r},Q3=(t,e,r,n)=>{if(eB(t)){Kw(t(n),e,r,n);return}e.validators===null&&(e.validators=[]),e.validators.push(W3(r,t))},Z3=(t,e,r,n)=>{const i=Object.entries(t),a=i.length;for(let s=0;s<a;s++){const[u,c]=i[s];Kw(c,dR(e,u),r,n)}},dR=(t,e)=>{let r=t;const n=e.split(Kf),i=n.length;for(let a=0;a<i;a++){const s=n[a];let u=r.nextPart.get(s);u||(u=cR(),r.nextPart.set(s,u)),r=u}return r},eB=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,tB=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=Object.create(null),n=Object.create(null);const i=(a,s)=>{r[a]=s,e++,e>t&&(e=0,n=r,r=Object.create(null))};return{get(a){let s=r[a];if(s!==void 0)return s;if((s=n[a])!==void 0)return i(a,s),s},set(a,s){a in r?r[a]=s:i(a,s)}}},Jb="!",tk=":",rB=[],rk=(t,e,r,n,i)=>({modifiers:t,hasImportantModifier:e,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),nB=t=>{const{prefix:e,experimentalParseClassName:r}=t;let n=i=>{const a=[];let s=0,u=0,c=0,f;const p=i.length;for(let x=0;x<p;x++){const y=i[x];if(s===0&&u===0){if(y===tk){a.push(i.slice(c,x)),c=x+1;continue}if(y==="/"){f=x;continue}}y==="["?s++:y==="]"?s--:y==="("?u++:y===")"&&u--}const h=a.length===0?i:i.slice(c);let g=h,v=!1;h.endsWith(Jb)?(g=h.slice(0,-1),v=!0):h.startsWith(Jb)&&(g=h.slice(1),v=!0);const w=f&&f>c?f-c:void 0;return rk(a,v,g,w)};if(e){const i=e+tk,a=n;n=s=>s.startsWith(i)?a(s.slice(i.length)):rk(rB,!1,s,void 0,!0)}if(r){const i=n;n=a=>r({className:a,parseClassName:i})}return n},iB=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((r,n)=>{e.set(r,1e6+n)}),r=>{const n=[];let i=[];for(let a=0;a<r.length;a++){const s=r[a],u=s[0]==="[",c=e.has(s);u||c?(i.length>0&&(i.sort(),n.push(...i),i=[]),n.push(s)):i.push(s)}return i.length>0&&(i.sort(),n.push(...i)),n}},aB=t=>({cache:tB(t.cacheSize),parseClassName:nB(t),sortModifiers:iB(t),postfixLookupClassGroupIds:oB(t),...V3(t)}),oB=t=>{const e=Object.create(null),r=t.postfixLookupClassGroups;if(r)for(let n=0;n<r.length;n++)e[r[n]]=!0;return e},sB=/\s+/,lB=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:s}=e,u=[],c=t.trim().split(sB);let f="";for(let p=c.length-1;p>=0;p-=1){const h=c[p],{isExternal:g,modifiers:v,hasImportantModifier:w,baseClassName:x,maybePostfixModifierPosition:y}=r(h);if(g){f=h+(f.length>0?" "+f:f);continue}let S=!!y,k;if(S){const C=x.substring(0,y);k=n(C);const R=k&&s[k]?n(x):void 0;R&&R!==k&&(k=R,S=!1)}else k=n(x);if(!k){if(!S){f=h+(f.length>0?" "+f:f);continue}if(k=n(x),!k){f=h+(f.length>0?" "+f:f);continue}S=!1}const E=v.length===0?"":v.length===1?v[0]:a(v).join(":"),P=w?E+Jb:E,O=P+k;if(u.indexOf(O)>-1)continue;u.push(O);const A=i(k,S);for(let C=0;C<A.length;++C){const R=A[C];u.push(P+R)}f=h+(f.length>0?" "+f:f)}return f},uB=(...t)=>{let e=0,r,n,i="";for(;e<t.length;)(r=t[e++])&&(n=hR(r))&&(i&&(i+=" "),i+=n);return i},hR=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=hR(t[n]))&&(r&&(r+=" "),r+=e);return r},cB=(t,...e)=>{let r,n,i,a;const s=c=>{const f=e.reduce((p,h)=>h(p),t());return r=aB(f),n=r.cache.get,i=r.cache.set,a=u,u(c)},u=c=>{const f=n(c);if(f)return f;const p=lB(c,r);return i(c,p),p};return a=s,(...c)=>a(uB(...c))},fB=[],It=t=>{const e=r=>r[t]||fB;return e.isThemeGetter=!0,e},pR=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,mR=/^\((?:(\w[\w-]*):)?(.+)\)$/i,dB=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,hB=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,pB=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,mB=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,gB=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vB=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ki=t=>dB.test(t),De=t=>!!t&&!Number.isNaN(Number(t)),Rn=t=>!!t&&Number.isInteger(Number(t)),Um=t=>t.endsWith("%")&&De(t.slice(0,-1)),ti=t=>hB.test(t),gR=()=>!0,yB=t=>pB.test(t)&&!mB.test(t),Gw=()=>!1,bB=t=>gB.test(t),wB=t=>vB.test(t),xB=t=>!ge(t)&&!ye(t),_B=t=>t.startsWith("@container")&&(t[10]==="/"&&t[11]!==void 0||t[11]==="s"&&t[16]!==void 0&&t.startsWith("-size/",10)||t[11]==="n"&&t[18]!==void 0&&t.startsWith("-normal/",10)),SB=t=>ra(t,bR,Gw),ge=t=>pR.test(t),Ea=t=>ra(t,wR,yB),nk=t=>ra(t,jB,De),kB=t=>ra(t,_R,gR),OB=t=>ra(t,xR,Gw),ik=t=>ra(t,vR,Gw),EB=t=>ra(t,yR,wB),pf=t=>ra(t,SR,bB),ye=t=>mR.test(t),Al=t=>Qa(t,wR),AB=t=>Qa(t,xR),ak=t=>Qa(t,vR),PB=t=>Qa(t,bR),TB=t=>Qa(t,yR),mf=t=>Qa(t,SR,!0),CB=t=>Qa(t,_R,!0),ra=(t,e,r)=>{const n=pR.exec(t);return n?n[1]?e(n[1]):r(n[2]):!1},Qa=(t,e,r=!1)=>{const n=mR.exec(t);return n?n[1]?e(n[1]):r:!1},vR=t=>t==="position"||t==="percentage",yR=t=>t==="image"||t==="url",bR=t=>t==="length"||t==="size"||t==="bg-size",wR=t=>t==="length",jB=t=>t==="number",xR=t=>t==="family-name",_R=t=>t==="number"||t==="weight",SR=t=>t==="shadow",RB=()=>{const t=It("color"),e=It("font"),r=It("text"),n=It("font-weight"),i=It("tracking"),a=It("leading"),s=It("breakpoint"),u=It("container"),c=It("spacing"),f=It("radius"),p=It("shadow"),h=It("inset-shadow"),g=It("text-shadow"),v=It("drop-shadow"),w=It("blur"),x=It("perspective"),y=It("aspect"),S=It("ease"),k=It("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],O=()=>[...P(),ye,ge],A=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto","contain","none"],R=()=>[ye,ge,c],M=()=>[Ki,"full","auto",...R()],H=()=>[Rn,"none","subgrid",ye,ge],z=()=>["auto",{span:["full",Rn,ye,ge]},Rn,ye,ge],B=()=>[Rn,"auto",ye,ge],F=()=>["auto","min","max","fr",ye,ge],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...R()],Z=()=>[Ki,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],G=()=>[Ki,"screen","full","dvw","lvw","svw","min","max","fit",...R()],ee=()=>[Ki,"screen","full","lh","dvh","lvh","svh","min","max","fit",...R()],U=()=>[t,ye,ge],L=()=>[...P(),ak,ik,{position:[ye,ge]}],W=()=>["no-repeat",{repeat:["","x","y","space","round"]}],te=()=>["auto","cover","contain",PB,SB,{size:[ye,ge]}],ue=()=>[Um,Al,Ea],le=()=>["","none","full",f,ye,ge],de=()=>["",De,Al,Ea],Re=()=>["solid","dashed","dotted","double"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ne=()=>[De,Um,ak,ik],_e=()=>["","none",w,ye,ge],Oe=()=>["none",De,ye,ge],ie=()=>["none",De,ye,ge],ze=()=>[De,ye,ge],Ie=()=>[Ki,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ti],breakpoint:[ti],color:[gR],container:[ti],"drop-shadow":[ti],ease:["in","out","in-out"],font:[xB],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ti],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ti],shadow:[ti],spacing:["px",De],text:[ti],"text-shadow":[ti],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ki,ge,ye,y]}],container:["container"],"container-type":[{"@container":["","normal","size",ye,ge]}],"container-named":[_B],columns:[{columns:[De,ge,ye,u]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:O()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{"inset-s":M(),start:M()}],end:[{"inset-e":M(),end:M()}],"inset-bs":[{"inset-bs":M()}],"inset-be":[{"inset-be":M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[Rn,"auto",ye,ge]}],basis:[{basis:[Ki,"full","auto",u,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[De,Ki,"auto","initial","none",ge]}],grow:[{grow:["",De,ye,ge]}],shrink:[{shrink:["",De,ye,ge]}],order:[{order:[Rn,"first","last","none",ye,ge]}],"grid-cols":[{"grid-cols":H()}],"col-start-end":[{col:z()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":H()}],"row-start-end":[{row:z()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pbs:[{pbs:R()}],pbe:[{pbe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mbs:[{mbs:K()}],mbe:[{mbe:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],"inline-size":[{inline:["auto",...G()]}],"min-inline-size":[{"min-inline":["auto",...G()]}],"max-inline-size":[{"max-inline":["none",...G()]}],"block-size":[{block:["auto",...ee()]}],"min-block-size":[{"min-block":["auto",...ee()]}],"max-block-size":[{"max-block":["none",...ee()]}],w:[{w:[u,"screen",...Z()]}],"min-w":[{"min-w":[u,"screen","none",...Z()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[s]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",r,Al,Ea]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,CB,kB]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Um,ge]}],"font-family":[{font:[AB,OB,e]}],"font-features":[{"font-features":[ge]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,ye,ge]}],"line-clamp":[{"line-clamp":[De,"none",ye,nk]}],leading:[{leading:[a,...R()]}],"list-image":[{"list-image":["none",ye,ge]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ye,ge]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:U()}],"text-color":[{text:U()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Re(),"wavy"]}],"text-decoration-thickness":[{decoration:[De,"from-font","auto",ye,Ea]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[De,"auto",ye,ge]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"tab-size":[{tab:[Rn,ye,ge]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye,ge]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ye,ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:W()}],"bg-size":[{bg:te()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Rn,ye,ge],radial:["",ye,ge],conic:[Rn,ye,ge]},TB,EB]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:ue()}],"gradient-via-pos":[{via:ue()}],"gradient-to-pos":[{to:ue()}],"gradient-from":[{from:U()}],"gradient-via":[{via:U()}],"gradient-to":[{to:U()}],rounded:[{rounded:le()}],"rounded-s":[{"rounded-s":le()}],"rounded-e":[{"rounded-e":le()}],"rounded-t":[{"rounded-t":le()}],"rounded-r":[{"rounded-r":le()}],"rounded-b":[{"rounded-b":le()}],"rounded-l":[{"rounded-l":le()}],"rounded-ss":[{"rounded-ss":le()}],"rounded-se":[{"rounded-se":le()}],"rounded-ee":[{"rounded-ee":le()}],"rounded-es":[{"rounded-es":le()}],"rounded-tl":[{"rounded-tl":le()}],"rounded-tr":[{"rounded-tr":le()}],"rounded-br":[{"rounded-br":le()}],"rounded-bl":[{"rounded-bl":le()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-bs":[{"border-bs":de()}],"border-w-be":[{"border-be":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":de()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Re(),"hidden","none"]}],"divide-style":[{divide:[...Re(),"hidden","none"]}],"border-color":[{border:U()}],"border-color-x":[{"border-x":U()}],"border-color-y":[{"border-y":U()}],"border-color-s":[{"border-s":U()}],"border-color-e":[{"border-e":U()}],"border-color-bs":[{"border-bs":U()}],"border-color-be":[{"border-be":U()}],"border-color-t":[{"border-t":U()}],"border-color-r":[{"border-r":U()}],"border-color-b":[{"border-b":U()}],"border-color-l":[{"border-l":U()}],"divide-color":[{divide:U()}],"outline-style":[{outline:[...Re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[De,ye,ge]}],"outline-w":[{outline:["",De,Al,Ea]}],"outline-color":[{outline:U()}],shadow:[{shadow:["","none",p,mf,pf]}],"shadow-color":[{shadow:U()}],"inset-shadow":[{"inset-shadow":["none",h,mf,pf]}],"inset-shadow-color":[{"inset-shadow":U()}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:U()}],"ring-offset-w":[{"ring-offset":[De,Ea]}],"ring-offset-color":[{"ring-offset":U()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":U()}],"text-shadow":[{"text-shadow":["none",g,mf,pf]}],"text-shadow-color":[{"text-shadow":U()}],opacity:[{opacity:[De,ye,ge]}],"mix-blend":[{"mix-blend":[...pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":pe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[De]}],"mask-image-linear-from-pos":[{"mask-linear-from":ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":ne()}],"mask-image-linear-from-color":[{"mask-linear-from":U()}],"mask-image-linear-to-color":[{"mask-linear-to":U()}],"mask-image-t-from-pos":[{"mask-t-from":ne()}],"mask-image-t-to-pos":[{"mask-t-to":ne()}],"mask-image-t-from-color":[{"mask-t-from":U()}],"mask-image-t-to-color":[{"mask-t-to":U()}],"mask-image-r-from-pos":[{"mask-r-from":ne()}],"mask-image-r-to-pos":[{"mask-r-to":ne()}],"mask-image-r-from-color":[{"mask-r-from":U()}],"mask-image-r-to-color":[{"mask-r-to":U()}],"mask-image-b-from-pos":[{"mask-b-from":ne()}],"mask-image-b-to-pos":[{"mask-b-to":ne()}],"mask-image-b-from-color":[{"mask-b-from":U()}],"mask-image-b-to-color":[{"mask-b-to":U()}],"mask-image-l-from-pos":[{"mask-l-from":ne()}],"mask-image-l-to-pos":[{"mask-l-to":ne()}],"mask-image-l-from-color":[{"mask-l-from":U()}],"mask-image-l-to-color":[{"mask-l-to":U()}],"mask-image-x-from-pos":[{"mask-x-from":ne()}],"mask-image-x-to-pos":[{"mask-x-to":ne()}],"mask-image-x-from-color":[{"mask-x-from":U()}],"mask-image-x-to-color":[{"mask-x-to":U()}],"mask-image-y-from-pos":[{"mask-y-from":ne()}],"mask-image-y-to-pos":[{"mask-y-to":ne()}],"mask-image-y-from-color":[{"mask-y-from":U()}],"mask-image-y-to-color":[{"mask-y-to":U()}],"mask-image-radial":[{"mask-radial":[ye,ge]}],"mask-image-radial-from-pos":[{"mask-radial-from":ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":ne()}],"mask-image-radial-from-color":[{"mask-radial-from":U()}],"mask-image-radial-to-color":[{"mask-radial-to":U()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":P()}],"mask-image-conic-pos":[{"mask-conic":[De]}],"mask-image-conic-from-pos":[{"mask-conic-from":ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":ne()}],"mask-image-conic-from-color":[{"mask-conic-from":U()}],"mask-image-conic-to-color":[{"mask-conic-to":U()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:W()}],"mask-size":[{mask:te()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ye,ge]}],filter:[{filter:["","none",ye,ge]}],blur:[{blur:_e()}],brightness:[{brightness:[De,ye,ge]}],contrast:[{contrast:[De,ye,ge]}],"drop-shadow":[{"drop-shadow":["","none",v,mf,pf]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",De,ye,ge]}],"hue-rotate":[{"hue-rotate":[De,ye,ge]}],invert:[{invert:["",De,ye,ge]}],saturate:[{saturate:[De,ye,ge]}],sepia:[{sepia:["",De,ye,ge]}],"backdrop-filter":[{"backdrop-filter":["","none",ye,ge]}],"backdrop-blur":[{"backdrop-blur":_e()}],"backdrop-brightness":[{"backdrop-brightness":[De,ye,ge]}],"backdrop-contrast":[{"backdrop-contrast":[De,ye,ge]}],"backdrop-grayscale":[{"backdrop-grayscale":["",De,ye,ge]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[De,ye,ge]}],"backdrop-invert":[{"backdrop-invert":["",De,ye,ge]}],"backdrop-opacity":[{"backdrop-opacity":[De,ye,ge]}],"backdrop-saturate":[{"backdrop-saturate":[De,ye,ge]}],"backdrop-sepia":[{"backdrop-sepia":["",De,ye,ge]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ye,ge]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[De,"initial",ye,ge]}],ease:[{ease:["linear","initial",S,ye,ge]}],delay:[{delay:[De,ye,ge]}],animate:[{animate:["none",k,ye,ge]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,ye,ge]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:Oe()}],"rotate-x":[{"rotate-x":Oe()}],"rotate-y":[{"rotate-y":Oe()}],"rotate-z":[{"rotate-z":Oe()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":["scale-3d"],skew:[{skew:ze()}],"skew-x":[{"skew-x":ze()}],"skew-y":[{"skew-y":ze()}],transform:[{transform:[ye,ge,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ie()}],"translate-x":[{"translate-x":Ie()}],"translate-y":[{"translate-y":Ie()}],"translate-z":[{"translate-z":Ie()}],"translate-none":["translate-none"],zoom:[{zoom:[Rn,ye,ge]}],accent:[{accent:U()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:U()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ye,ge]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":U()}],"scrollbar-track-color":[{"scrollbar-track":U()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mbs":[{"scroll-mbs":R()}],"scroll-mbe":[{"scroll-mbe":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pbs":[{"scroll-pbs":R()}],"scroll-pbe":[{"scroll-pbe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ye,ge]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[De,Al,Ea,nk]}],stroke:[{stroke:["none",...U()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},IB=cB(RB);function $B(...t){return IB(Le(t))}/**
52
+ * @license lucide-react v0.487.0 - ISC
53
+ *
54
+ * This source code is licensed under the ISC license.
55
+ * See the LICENSE file in the root directory of this source tree.
56
+ */const NB=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),MB=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,n)=>n?n.toUpperCase():r.toLowerCase()),ok=t=>{const e=MB(t);return e.charAt(0).toUpperCase()+e.slice(1)},kR=(...t)=>t.filter((e,r,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===r).join(" ").trim();/**
57
+ * @license lucide-react v0.487.0 - ISC
58
+ *
59
+ * This source code is licensed under the ISC license.
60
+ * See the LICENSE file in the root directory of this source tree.
61
+ */var LB={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
62
+ * @license lucide-react v0.487.0 - ISC
63
+ *
64
+ * This source code is licensed under the ISC license.
65
+ * See the LICENSE file in the root directory of this source tree.
66
+ */const DB=$.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:s,...u},c)=>$.createElement("svg",{ref:c,...LB,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:kR("lucide",i),...u},[...s.map(([f,p])=>$.createElement(f,p)),...Array.isArray(a)?a:[a]]));/**
67
+ * @license lucide-react v0.487.0 - ISC
68
+ *
69
+ * This source code is licensed under the ISC license.
70
+ * See the LICENSE file in the root directory of this source tree.
71
+ */const Zt=(t,e)=>{const r=$.forwardRef(({className:n,...i},a)=>$.createElement(DB,{ref:a,iconNode:e,className:kR(`lucide-${NB(ok(t))}`,`lucide-${t}`,n),...i}));return r.displayName=ok(t),r};/**
72
+ * @license lucide-react v0.487.0 - ISC
73
+ *
74
+ * This source code is licensed under the ISC license.
75
+ * See the LICENSE file in the root directory of this source tree.
76
+ */const BB=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],UB=Zt("activity",BB);/**
77
+ * @license lucide-react v0.487.0 - ISC
78
+ *
79
+ * This source code is licensed under the ISC license.
80
+ * See the LICENSE file in the root directory of this source tree.
81
+ */const qB=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],OR=Zt("book-open",qB);/**
82
+ * @license lucide-react v0.487.0 - ISC
83
+ *
84
+ * This source code is licensed under the ISC license.
85
+ * See the LICENSE file in the root directory of this source tree.
86
+ */const zB=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Qb=Zt("calendar",zB);/**
87
+ * @license lucide-react v0.487.0 - ISC
88
+ *
89
+ * This source code is licensed under the ISC license.
90
+ * See the LICENSE file in the root directory of this source tree.
91
+ */const FB=[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]],WB=Zt("chart-no-axes-column",FB);/**
92
+ * @license lucide-react v0.487.0 - ISC
93
+ *
94
+ * This source code is licensed under the ISC license.
95
+ * See the LICENSE file in the root directory of this source tree.
96
+ */const HB=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],VB=Zt("external-link",HB);/**
97
+ * @license lucide-react v0.487.0 - ISC
98
+ *
99
+ * This source code is licensed under the ISC license.
100
+ * See the LICENSE file in the root directory of this source tree.
101
+ */const KB=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],GB=Zt("file-text",KB);/**
102
+ * @license lucide-react v0.487.0 - ISC
103
+ *
104
+ * This source code is licensed under the ISC license.
105
+ * See the LICENSE file in the root directory of this source tree.
106
+ */const XB=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],ER=Zt("inbox",XB);/**
107
+ * @license lucide-react v0.487.0 - ISC
108
+ *
109
+ * This source code is licensed under the ISC license.
110
+ * See the LICENSE file in the root directory of this source tree.
111
+ */const YB=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],JB=Zt("message-square",YB);/**
112
+ * @license lucide-react v0.487.0 - ISC
113
+ *
114
+ * This source code is licensed under the ISC license.
115
+ * See the LICENSE file in the root directory of this source tree.
116
+ */const QB=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],ZB=Zt("pause",QB);/**
117
+ * @license lucide-react v0.487.0 - ISC
118
+ *
119
+ * This source code is licensed under the ISC license.
120
+ * See the LICENSE file in the root directory of this source tree.
121
+ */const e4=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],t4=Zt("play",e4);/**
122
+ * @license lucide-react v0.487.0 - ISC
123
+ *
124
+ * This source code is licensed under the ISC license.
125
+ * See the LICENSE file in the root directory of this source tree.
126
+ */const r4=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Xw=Zt("plus",r4);/**
127
+ * @license lucide-react v0.487.0 - ISC
128
+ *
129
+ * This source code is licensed under the ISC license.
130
+ * See the LICENSE file in the root directory of this source tree.
131
+ */const n4=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],AR=Zt("save",n4);/**
132
+ * @license lucide-react v0.487.0 - ISC
133
+ *
134
+ * This source code is licensed under the ISC license.
135
+ * See the LICENSE file in the root directory of this source tree.
136
+ */const i4=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],a4=Zt("send",i4);/**
137
+ * @license lucide-react v0.487.0 - ISC
138
+ *
139
+ * This source code is licensed under the ISC license.
140
+ * See the LICENSE file in the root directory of this source tree.
141
+ */const o4=[["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",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],s4=Zt("settings",o4);/**
142
+ * @license lucide-react v0.487.0 - ISC
143
+ *
144
+ * This source code is licensed under the ISC license.
145
+ * See the LICENSE file in the root directory of this source tree.
146
+ */const l4=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],PR=Zt("trash-2",l4);/**
147
+ * @license lucide-react v0.487.0 - ISC
148
+ *
149
+ * This source code is licensed under the ISC license.
150
+ * See the LICENSE file in the root directory of this source tree.
151
+ */const u4=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],Zb=Zt("users",u4);/**
152
+ * @license lucide-react v0.487.0 - ISC
153
+ *
154
+ * This source code is licensed under the ISC license.
155
+ * See the LICENSE file in the root directory of this source tree.
156
+ */const c4=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],e0=Zt("zap",c4),f4="M147.692 0C178.28 0.00010928 203.077 24.7968 203.077 55.3848C203.077 85.0894 179.692 109.331 150.327 110.706C126.508 116.901 108.924 138.549 108.924 164.308C108.924 167.879 109.261 171.372 109.907 174.755C109.903 174.756 109.898 174.755 109.894 174.756C110.468 177.955 110.77 181.25 110.77 184.615C110.77 187.98 110.468 191.274 109.894 194.474C109.898 194.474 109.903 194.475 109.907 194.476C109.261 197.859 108.924 201.351 108.924 204.923C108.924 230.68 126.507 252.329 150.325 258.524C179.691 259.899 203.077 284.14 203.077 313.846C203.077 344.434 178.28 369.23 147.692 369.23C117.104 369.23 92.3076 344.434 92.3076 313.846C92.3076 309.539 92.7986 305.348 93.7285 301.324C94.007 299.075 94.1543 296.785 94.1543 294.461C94.1541 266.662 73.6718 243.647 46.9756 239.682C46.9934 239.579 47.0138 239.477 47.0322 239.374C20.4072 235.347 2.80541e-05 212.364 0 184.615C0 156.866 20.4071 133.883 47.0322 129.855C47.0139 129.753 46.9934 129.651 46.9756 129.549C73.6719 125.584 94.1542 102.569 94.1543 74.7695C94.1543 72.4447 94.0063 70.1538 93.7275 67.9043C92.7979 63.8813 92.3076 59.6903 92.3076 55.3848C92.3076 24.7967 117.104 0 147.692 0ZM332.308 0C362.896 4.74175e-05 387.692 24.7967 387.692 55.3848C387.692 60.1359 387.093 64.747 385.968 69.1475C385.781 70.9962 385.683 72.8716 385.683 74.7695C385.683 102.569 406.165 125.584 432.861 129.549C432.845 129.643 432.826 129.738 432.809 129.832C459.511 133.792 480 156.811 480 184.615C480 212.419 459.511 235.438 432.809 239.397C432.826 239.492 432.845 239.587 432.861 239.682C406.165 243.647 385.683 266.661 385.683 294.461C385.683 296.358 385.781 298.233 385.968 300.081C387.093 304.482 387.692 309.094 387.692 313.846C387.692 344.434 362.896 369.23 332.308 369.23C301.72 369.23 276.923 344.434 276.923 313.846C276.923 309.537 277.414 305.344 278.345 301.318C278.622 299.071 278.77 296.783 278.77 294.461C278.769 266.661 258.287 243.647 231.591 239.682C231.609 239.579 231.629 239.477 231.647 239.374C205.022 235.347 184.615 212.364 184.615 184.615C184.615 156.866 205.022 133.883 231.647 129.855C231.629 129.753 231.609 129.651 231.591 129.549C258.287 125.584 278.769 102.569 278.77 74.7695C278.77 72.4467 278.622 70.1582 278.345 67.9111C277.414 63.886 276.923 59.6928 276.923 55.3848C276.923 24.7967 301.72 0 332.308 0Z",d4=[{to:"/",icon:JB,label:"Chat"},{to:"/squads",icon:Zb,label:"Squads"},{to:"/feed",icon:ER,label:"Feed"},{to:"/skills",icon:e0,label:"Skills"},{to:"/schedules",icon:Qb,label:"Schedules"},{to:"/wiki",icon:OR,label:"Wiki"},{to:"/usage",icon:WB,label:"Usage"},{to:"/settings",icon:s4,label:"Settings"}];function h4({height:t=28}){const e=Math.round(t*1.3000027083389756);return j.jsxs("svg",{width:e,height:t,viewBox:"0 0 480 369.23",fill:"none","aria-hidden":!0,children:[j.jsx("path",{d:f4,fill:"url(#io-g)"}),j.jsx("defs",{children:j.jsxs("linearGradient",{id:"io-g",x1:"0",x2:"450.529",y1:"347",y2:"14.3087",gradientUnits:"userSpaceOnUse",children:[j.jsx("stop",{stopColor:"#D83333"}),j.jsx("stop",{offset:"0.515",stopColor:"#E43A9C"}),j.jsx("stop",{offset:"1",stopColor:"#F041FF"})]})})]})}function p4(){return j.jsxs("div",{className:"flex h-screen relative z-10",children:[j.jsxs("aside",{className:"w-16 flex flex-col items-center py-4 gap-1 border-r border-[var(--color-border)] bg-[var(--color-background)]/80 backdrop-blur-sm",children:[j.jsx("div",{className:"mb-4",children:j.jsx(h4,{height:24})}),j.jsx("nav",{className:"flex flex-col gap-1 flex-1",children:d4.map(({to:t,icon:e,label:r})=>j.jsx(sR,{to:t,end:t==="/",className:({isActive:n})=>$B("w-10 h-10 flex items-center justify-center rounded-lg transition-colors","hover:bg-white/5",n&&"bg-white/10 text-[var(--color-accent)]",!n&&"text-[var(--color-muted-foreground)]"),title:r,children:j.jsx(e,{size:20})},t))})]}),j.jsx("main",{className:"flex-1 overflow-hidden",children:j.jsx(ID,{})})]})}function ah(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function m4(t,e,r,n){function i(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function u(p){try{f(n.next(p))}catch(h){s(h)}}function c(p){try{f(n.throw(p))}catch(h){s(h)}}function f(p){p.done?a(p.value):i(p.value).then(u,c)}f((n=n.apply(t,e||[])).next())})}const g4=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class Yw extends Error{constructor(e,r="FunctionsError",n){super(e),this.name=r,this.context=n}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class v4 extends Yw{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class sk extends Yw{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class lk extends Yw{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var t0;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(t0||(t0={}));class y4{constructor(e,{headers:r={},customFetch:n,region:i=t0.Any}={}){this.url=e,this.headers=r,this.region=i,this.fetch=g4(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return m4(this,arguments,void 0,function*(r,n={}){var i;let a,s;try{const{headers:u,method:c,body:f,signal:p,timeout:h}=n;let g={},{region:v}=n;v||(v=this.region);const w=new URL(`${this.url}/${r}`);v&&v!=="any"&&(g["x-region"]=v,w.searchParams.set("forceFunctionRegion",v));let x;f&&(u&&!Object.prototype.hasOwnProperty.call(u,"Content-Type")||!u)?typeof Blob<"u"&&f instanceof Blob||f instanceof ArrayBuffer?(g["Content-Type"]="application/octet-stream",x=f):typeof f=="string"?(g["Content-Type"]="text/plain",x=f):typeof FormData<"u"&&f instanceof FormData?x=f:(g["Content-Type"]="application/json",x=JSON.stringify(f)):f&&typeof f!="string"&&!(typeof Blob<"u"&&f instanceof Blob)&&!(f instanceof ArrayBuffer)&&!(typeof FormData<"u"&&f instanceof FormData)?x=JSON.stringify(f):x=f;let y=p;h&&(s=new AbortController,a=setTimeout(()=>s.abort(),h),p?(y=s.signal,p.addEventListener("abort",()=>s.abort())):y=s.signal);const S=yield this.fetch(w.toString(),{method:c||"POST",headers:Object.assign(Object.assign(Object.assign({},g),this.headers),u),body:x,signal:y}).catch(O=>{throw new v4(O)}),k=S.headers.get("x-relay-error");if(k&&k==="true")throw new sk(S);if(!S.ok)throw new lk(S);let E=((i=S.headers.get("Content-Type"))!==null&&i!==void 0?i:"text/plain").split(";")[0].trim(),P;return E==="application/json"?P=yield S.json():E==="application/octet-stream"||E==="application/pdf"?P=yield S.blob():E==="text/event-stream"?P=S:E==="multipart/form-data"?P=yield S.formData():P=yield S.text(),{data:P,error:null,response:S}}catch(u){return{data:null,error:u,response:u instanceof lk||u instanceof sk?u.context:void 0}}finally{a&&clearTimeout(a)}})}}const TR=3,uk=t=>Math.min(1e3*2**t,3e4),b4=[520,503],CR=["GET","HEAD","OPTIONS"];var w4=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.code=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function ck(t,e){return new Promise(r=>{if(e!=null&&e.aborted){r();return}const n=setTimeout(()=>{e==null||e.removeEventListener("abort",i),r()},t);function i(){clearTimeout(n),r()}e==null||e.addEventListener("abort",i)})}function x4(t,e,r,n){return!(!n||r>=TR||!CR.includes(t)||!b4.includes(e))}var _4=class{constructor(t){var e,r,n,i,a;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(r=t.isMaybeSingle)!==null&&r!==void 0?r:!1,this.shouldStripNulls=(n=t.shouldStripNulls)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(i=t.urlLengthLimit)!==null&&i!==void 0?i:8e3,this.retryEnabled=(a=t.retry)!==null&&a!==void 0?a:!0,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}retry(t){return this.retryEnabled=t,this}then(t,e){var r=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const s=this.headers.get("Accept");s==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!s||s==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const n=this.fetch;let a=(async()=>{let s=0;for(;;){const f=new Headers(r.headers);s>0&&f.set("X-Retry-Count",String(s));let p;try{p=await n(r.url.toString(),{method:r.method,headers:f,body:JSON.stringify(r.body,(h,g)=>typeof g=="bigint"?g.toString():g),signal:r.signal})}catch(h){if((h==null?void 0:h.name)==="AbortError"||(h==null?void 0:h.code)==="ABORT_ERR"||!CR.includes(r.method))throw h;if(r.retryEnabled&&s<TR){const g=uk(s);s++,await ck(g,r.signal);continue}throw h}if(x4(r.method,p.status,s,r.retryEnabled)){var u,c;const h=(u=(c=p.headers)===null||c===void 0?void 0:c.get("Retry-After"))!==null&&u!==void 0?u:null,g=h!==null?Math.max(0,parseInt(h,10)||0)*1e3:uk(s);await p.text(),s++,await ck(g,r.signal);continue}return await r.processResponse(p)}})();return this.shouldThrowOnError||(a=a.catch(s=>{var u;let c="",f="",p="";const h=s==null?void 0:s.cause;if(h){var g,v,w,x;const k=(g=h==null?void 0:h.message)!==null&&g!==void 0?g:"",E=(v=h==null?void 0:h.code)!==null&&v!==void 0?v:"";c=`${(w=s==null?void 0:s.name)!==null&&w!==void 0?w:"FetchError"}: ${s==null?void 0:s.message}`,c+=`
157
+
158
+ Caused by: ${(x=h==null?void 0:h.name)!==null&&x!==void 0?x:"Error"}: ${k}`,E&&(c+=` (${E})`),h!=null&&h.stack&&(c+=`
159
+ ${h.stack}`)}else{var y;c=(y=s==null?void 0:s.stack)!==null&&y!==void 0?y:""}const S=this.url.toString().length;return(s==null?void 0:s.name)==="AbortError"||(s==null?void 0:s.code)==="ABORT_ERR"?(p="",f="Request was aborted (timeout or manual cancellation)",S>this.urlLengthLimit&&(f+=`. Note: Your request URL is ${S} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((h==null?void 0:h.name)==="HeadersOverflowError"||(h==null?void 0:h.code)==="UND_ERR_HEADERS_OVERFLOW")&&(p="",f="HTTP headers exceeded server limits (typically 16KB)",S>this.urlLengthLimit&&(f+=`. Your request URL is ${S} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(u=s==null?void 0:s.name)!==null&&u!==void 0?u:"FetchError"}: ${s==null?void 0:s.message}`,details:c,hint:f,code:p},data:null,count:null,status:0,statusText:""}})),a.then(t,e)}async processResponse(t){var e=this;let r=null,n=null,i=null,a=t.status,s=t.statusText;if(t.ok){var u,c;if(e.method!=="HEAD"){var f;const g=await t.text();g===""||(e.headers.get("Accept")==="text/csv"||e.headers.get("Accept")&&(!((f=e.headers.get("Accept"))===null||f===void 0)&&f.includes("application/vnd.pgrst.plan+text"))?n=g:n=JSON.parse(g))}const p=(u=e.headers.get("Prefer"))===null||u===void 0?void 0:u.match(/count=(exact|planned|estimated)/),h=(c=t.headers.get("content-range"))===null||c===void 0?void 0:c.split("/");p&&h&&h.length>1&&(i=parseInt(h[1])),e.isMaybeSingle&&Array.isArray(n)&&(n.length>1?(r={code:"PGRST116",details:`Results contain ${n.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},n=null,i=null,a=406,s="Not Acceptable"):n.length===1?n=n[0]:n=null)}else{const p=await t.text();try{r=JSON.parse(p),Array.isArray(r)&&t.status===404&&(n=[],r=null,a=200,s="OK")}catch{t.status===404&&p===""?(a=204,s="No Content"):r={message:p}}if(r&&e.shouldThrowOnError)throw new w4(r)}return{success:r===null,error:r,data:n,count:i,status:a,statusText:s}}returns(){return this}overrideTypes(){return this}},S4=class extends _4{select(t){let e=!1;const r=(t??"*").split("").map(n=>/\s/.test(n)&&!e?"":(n==='"'&&(e=!e),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:r,foreignTable:n,referencedTable:i=n}={}){const a=i?`${i}.order`:"order",s=this.url.searchParams.get(a);return this.url.searchParams.set(a,`${s?`${s},`:""}${t}.${e?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:r=e}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${t}`),this}range(t,e,{foreignTable:r,referencedTable:n=r}={}){const i=typeof n>"u"?"offset":`${n}.offset`,a=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(i,`${t}`),this.url.searchParams.set(a,`${e-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:t=!1,verbose:e=!1,settings:r=!1,buffers:n=!1,wal:i=!1,format:a="text"}={}){var s;const u=[t?"analyze":null,e?"verbose":null,r?"settings":null,n?"buffers":null,i?"wal":null].filter(Boolean).join("|"),c=(s=this.headers.get("Accept"))!==null&&s!==void 0?s:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${a}; for="${c}"; options=${u};`),a==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const fk=new RegExp("[,()]");var Do=class extends S4{eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const r=Array.from(new Set(e)).map(n=>typeof n=="string"&&fk.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(t,`in.(${r})`),this}notIn(t,e){const r=Array.from(new Set(e)).map(n=>typeof n=="string"&&fk.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(t,`not.in.(${r})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config:r,type:n}={}){let i="";n==="plain"?i="pl":n==="phrase"?i="ph":n==="websearch"&&(i="w");const a=r===void 0?"":`(${r})`;return this.url.searchParams.append(t,`${i}fts${a}.${e}`),this}match(t){return Object.entries(t).filter(([e,r])=>r!==void 0).forEach(([e,r])=>{this.url.searchParams.append(e,`eq.${r}`)}),this}not(t,e,r){return this.url.searchParams.append(t,`not.${e}.${r}`),this}or(t,{foreignTable:e,referencedTable:r=e}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${t})`),this}filter(t,e,r){return this.url.searchParams.append(t,`${e}.${r}`),this}},k4=class{constructor(t,{headers:e={},schema:r,fetch:n,urlLengthLimit:i=8e3,retry:a}){this.url=t,this.headers=new Headers(e),this.schema=r,this.fetch=n,this.urlLengthLimit=i,this.retry=a}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:r=!1,count:n}=e??{},i=r?"HEAD":"GET";let a=!1;const s=(t??"*").split("").map(f=>/\s/.test(f)&&!a?"":(f==='"'&&(a=!a),f)).join(""),{url:u,headers:c}=this.cloneRequestState();return u.searchParams.set("select",s),n&&c.append("Prefer",`count=${n}`),new Do({method:i,url:u,headers:c,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(t,{count:e,defaultToNull:r=!0}={}){var n;const i="POST",{url:a,headers:s}=this.cloneRequestState();if(e&&s.append("Prefer",`count=${e}`),r||s.append("Prefer","missing=default"),Array.isArray(t)){const u=t.reduce((c,f)=>c.concat(Object.keys(f)),[]);if(u.length>0){const c=[...new Set(u)].map(f=>`"${f}"`);a.searchParams.set("columns",c.join(","))}}return new Do({method:i,url:a,headers:s,schema:this.schema,body:t,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(t,{onConflict:e,ignoreDuplicates:r=!1,count:n,defaultToNull:i=!0}={}){var a;const s="POST",{url:u,headers:c}=this.cloneRequestState();if(c.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),e!==void 0&&u.searchParams.set("on_conflict",e),n&&c.append("Prefer",`count=${n}`),i||c.append("Prefer","missing=default"),Array.isArray(t)){const f=t.reduce((p,h)=>p.concat(Object.keys(h)),[]);if(f.length>0){const p=[...new Set(f)].map(h=>`"${h}"`);u.searchParams.set("columns",p.join(","))}}return new Do({method:s,url:u,headers:c,schema:this.schema,body:t,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(t,{count:e}={}){var r;const n="PATCH",{url:i,headers:a}=this.cloneRequestState();return e&&a.append("Prefer",`count=${e}`),new Do({method:n,url:i,headers:a,schema:this.schema,body:t,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:t}={}){var e;const r="DELETE",{url:n,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new Do({method:r,url:n,headers:i,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function nu(t){"@babel/helpers - typeof";return nu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nu(t)}function O4(t,e){if(nu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(nu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function E4(t){var e=O4(t,"string");return nu(e)=="symbol"?e:e+""}function A4(t,e,r){return(e=E4(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function dk(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function gf(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?dk(Object(r),!0).forEach(function(n){A4(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):dk(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var P4=class jR{constructor(e,{headers:r={},schema:n,fetch:i,timeout:a,urlLengthLimit:s=8e3,retry:u}={}){this.url=e,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=s;const c=i??globalThis.fetch;a!==void 0&&a>0?this.fetch=(f,p)=>{const h=new AbortController,g=setTimeout(()=>h.abort(),a),v=p==null?void 0:p.signal;if(v){if(v.aborted)return clearTimeout(g),c(f,p);const w=()=>{clearTimeout(g),h.abort()};return v.addEventListener("abort",w,{once:!0}),c(f,gf(gf({},p),{},{signal:h.signal})).finally(()=>{clearTimeout(g),v.removeEventListener("abort",w)})}return c(f,gf(gf({},p),{},{signal:h.signal})).finally(()=>clearTimeout(g))}:this.fetch=c,this.retry=u}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new k4(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(e){return new jR(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,r={},{head:n=!1,get:i=!1,count:a}={}){var s;let u;const c=new URL(`${this.url}/rpc/${e}`);let f;const p=v=>v!==null&&typeof v=="object"&&(!Array.isArray(v)||v.some(p)),h=n&&Object.values(r).some(p);h?(u="POST",f=r):n||i?(u=n?"HEAD":"GET",Object.entries(r).filter(([v,w])=>w!==void 0).map(([v,w])=>[v,Array.isArray(w)?`{${w.join(",")}}`:`${w}`]).forEach(([v,w])=>{c.searchParams.append(v,w)})):(u="POST",f=r);const g=new Headers(this.headers);return h?g.set("Prefer",a?`count=${a},return=minimal`:"return=minimal"):a&&g.set("Prefer",`count=${a}`),new Do({method:u,url:c,headers:g,schema:this.schemaName,body:f,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class T4{constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const r=globalThis;if(typeof globalThis<"u"&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};const n=typeof global<"u"?global:void 0;if(n&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};if(typeof globalThis<"u"&&typeof r.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&r.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const i=globalThis.process;if(i){const a=i.versions;if(a&&a.node){const s=a.node,u=parseInt(s.replace(/^v/,"").split(".")[0]);return u>=22?typeof globalThis.WebSocket<"u"?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${u} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${u} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
160
+ import ws from "ws"
161
+ new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let r=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(r+=`
162
+
163
+ Suggested solution: ${e.workaround}`),new Error(r)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const C4="2.106.2",j4=`realtime-js/${C4}`,R4="1.0.0",RR="2.0.0",I4=RR,$4=1e4,N4=100,Ji={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},IR={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},r0={connecting:"connecting",closing:"closing",closed:"closed"};class M4{constructor(e){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=e??[]}encode(e,r){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(e));let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(e){var r;return this._isArrayBuffer((r=e.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var r,n;const i=(n=(r=e.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,i)}_encodeJsonUserBroadcastPush(e){var r,n;const i=(n=(r=e.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},s=new TextEncoder().encode(JSON.stringify(i)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,s)}_encodeUserBroadcastPush(e,r,n){var i,a;const s=e.topic,u=(i=e.ref)!==null&&i!==void 0?i:"",c=(a=e.join_ref)!==null&&a!==void 0?a:"",f=e.payload.event,p=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},h=Object.keys(p).length===0?"":JSON.stringify(p);if(c.length>255)throw new Error(`joinRef length ${c.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`ref length ${u.length} exceeds maximum of 255`);if(s.length>255)throw new Error(`topic length ${s.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`userEvent length ${f.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`metadata length ${h.length} exceeds maximum of 255`);const g=this.USER_BROADCAST_PUSH_META_LENGTH+c.length+u.length+s.length+f.length+h.length,v=new ArrayBuffer(this.HEADER_LENGTH+g);let w=new DataView(v),x=0;w.setUint8(x++,this.KINDS.userBroadcastPush),w.setUint8(x++,c.length),w.setUint8(x++,u.length),w.setUint8(x++,s.length),w.setUint8(x++,f.length),w.setUint8(x++,h.length),w.setUint8(x++,r),Array.from(c,S=>w.setUint8(x++,S.charCodeAt(0))),Array.from(u,S=>w.setUint8(x++,S.charCodeAt(0))),Array.from(s,S=>w.setUint8(x++,S.charCodeAt(0))),Array.from(f,S=>w.setUint8(x++,S.charCodeAt(0))),Array.from(h,S=>w.setUint8(x++,S.charCodeAt(0)));var y=new Uint8Array(v.byteLength+n.byteLength);return y.set(new Uint8Array(v),0),y.set(new Uint8Array(n),v.byteLength),y.buffer}decode(e,r){if(this._isArrayBuffer(e)){let n=this._binaryDecode(e);return r(n)}if(typeof e=="string"){const n=JSON.parse(e),[i,a,s,u,c]=n;return r({join_ref:i,ref:a,topic:s,event:u,payload:c})}return r({})}_binaryDecode(e){const r=new DataView(e),n=r.getUint8(0),i=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(e,r,i)}}_decodeUserBroadcast(e,r,n){const i=r.getUint8(1),a=r.getUint8(2),s=r.getUint8(3),u=r.getUint8(4);let c=this.HEADER_LENGTH+4;const f=n.decode(e.slice(c,c+i));c=c+i;const p=n.decode(e.slice(c,c+a));c=c+a;const h=n.decode(e.slice(c,c+s));c=c+s;const g=e.slice(c,e.byteLength),v=u===this.JSON_ENCODING?JSON.parse(n.decode(g)):g,w={type:this.BROADCAST_EVENT,event:p,payload:v};return s>0&&(w.meta=JSON.parse(h)),{join_ref:null,ref:null,topic:f,event:this.BROADCAST_EVENT,payload:w}}_isArrayBuffer(e){var r;return e instanceof ArrayBuffer||((r=e==null?void 0:e.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(e,r){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([n])=>r.includes(n)))}}var tt;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(tt||(tt={}));const hk=(t,e,r={})=>{var n;const i=(n=r.skipTypes)!==null&&n!==void 0?n:[];return e?Object.keys(e).reduce((a,s)=>(a[s]=L4(s,t,e,i),a),{}):{}},L4=(t,e,r,n)=>{const i=e.find(u=>u.name===t),a=i==null?void 0:i.type,s=r[t];return a&&!n.includes(a)?$R(a,s):n0(s)},$R=(t,e)=>{if(t.charAt(0)==="_"){const r=t.slice(1,t.length);return q4(e,r)}switch(t){case tt.bool:return D4(e);case tt.float4:case tt.float8:case tt.int2:case tt.int4:case tt.int8:case tt.numeric:case tt.oid:return B4(e);case tt.json:case tt.jsonb:return U4(e);case tt.timestamp:return z4(e);case tt.abstime:case tt.date:case tt.daterange:case tt.int4range:case tt.int8range:case tt.money:case tt.reltime:case tt.text:case tt.time:case tt.timestamptz:case tt.timetz:case tt.tsrange:case tt.tstzrange:return n0(e);default:return n0(e)}},n0=t=>t,D4=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},B4=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},U4=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},q4=(t,e)=>{if(typeof t!="string")return t;const r=t.length-1,n=t[r];if(t[0]==="{"&&n==="}"){let a;const s=t.slice(1,r);try{a=JSON.parse("["+s+"]")}catch{a=s?s.split(","):[]}return a.map(u=>$R(e,u))}return t},z4=t=>typeof t=="string"?t.replace(" ","T"):t,NR=t=>{const e=new URL(t);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};var Kl=t=>typeof t=="function"?t:function(){return t},F4=typeof self<"u"?self:null,Bo=typeof window<"u"?window:null,Nn=F4||Bo||globalThis,W4="2.0.0",H4=1e4,V4=1e3,Mn={connecting:0,open:1,closing:2,closed:3},xr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},ii={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},i0={longpoll:"longpoll",websocket:"websocket"},K4={complete:4},a0="base64url.bearer.phx.",vf=class{constructor(t,e,r,n){this.channel=t,this.event=e,this.payload=r||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(t){this.timeout=t,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:t,response:e,_ref:r}){this.recHooks.filter(n=>n.status===t).forEach(n=>n.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},MR=class{constructor(t,e){this.callback=t,this.timerCalc=e,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},G4=class{constructor(t,e,r){this.state=xr.closed,this.topic=t,this.params=Kl(e||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new vf(this,ii.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new MR(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=xr.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",n=>{this.state=xr.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=xr.closed,this.socket.remove(this)}),this.onError(n=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.isJoining()&&this.joinPush.reset(),this.state=xr.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new vf(this,ii.leave,Kl({}),this.timeout).send(),this.state=xr.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(ii.reply,(n,i)=>{this.trigger(this.replyEventName(i),n)})}join(t=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=xr.closed,this.bindings=[]}onClose(t){this.on(ii.close,t)}onError(t){return this.on(ii.error,e=>t(e))}on(t,e){let r=this.bindingRef++;return this.bindings.push({event:t,ref:r,callback:e}),r}off(t,e){this.bindings=this.bindings.filter(r=>!(r.event===t&&(typeof e>"u"||e===r.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,r=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new vf(this,t,function(){return e},r);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=xr.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(ii.close,"leave")},r=new vf(this,ii.leave,Kl({}),t);return r.receive("ok",()=>e()).receive("timeout",()=>e()),r.send(),this.canPush()||r.trigger("ok",{}),r}onMessage(t,e,r){return e}filterBindings(t,e,r){return!0}isMember(t,e,r,n){return this.topic!==t?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:r,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=xr.joining,this.joinPush.resend(t))}trigger(t,e,r,n){let i=this.onMessage(t,e,r,n);if(e&&!i)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let a=this.bindings.filter(s=>s.event===t&&this.filterBindings(s,e,r));for(let s=0;s<a.length;s++)a[s].callback(i,r,n||this.joinRef())}replyEventName(t){return`chan_reply_${t}`}isClosed(){return this.state===xr.closed}isErrored(){return this.state===xr.errored}isJoined(){return this.state===xr.joined}isJoining(){return this.state===xr.joining}isLeaving(){return this.state===xr.leaving}},Gf=class{static request(t,e,r,n,i,a,s){if(Nn.XDomainRequest){let u=new Nn.XDomainRequest;return this.xdomainRequest(u,t,e,n,i,a,s)}else if(Nn.XMLHttpRequest){let u=new Nn.XMLHttpRequest;return this.xhrRequest(u,t,e,r,n,i,a,s)}else{if(Nn.fetch&&Nn.AbortController)return this.fetchRequest(t,e,r,n,i,a,s);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(t,e,r,n,i,a,s){let u={method:t,headers:r,body:n},c=null;return i&&(c=new AbortController,setTimeout(()=>c.abort(),i),u.signal=c.signal),Nn.fetch(e,u).then(f=>f.text()).then(f=>this.parseJSON(f)).then(f=>s&&s(f)).catch(f=>{f.name==="AbortError"&&a?a():s&&s(null)}),c}static xdomainRequest(t,e,r,n,i,a,s){return t.timeout=i,t.open(e,r),t.onload=()=>{let u=this.parseJSON(t.responseText);s&&s(u)},a&&(t.ontimeout=a),t.onprogress=()=>{},t.send(n),t}static xhrRequest(t,e,r,n,i,a,s,u){t.open(e,r,!0),t.timeout=a;for(let[c,f]of Object.entries(n))t.setRequestHeader(c,f);return t.onerror=()=>u&&u(null),t.onreadystatechange=()=>{if(t.readyState===K4.complete&&u){let c=this.parseJSON(t.responseText);u(c)}},s&&(t.ontimeout=s),t.send(i),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch{return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let r=[];for(var n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let i=e?`${e}[${n}]`:n,a=t[n];typeof a=="object"?r.push(this.serialize(a,i)):r.push(encodeURIComponent(i)+"="+encodeURIComponent(a))}return r.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let r=t.match(/\?/)?"&":"?";return`${t}${r}${this.serialize(e)}`}},X4=t=>{let e="",r=new Uint8Array(t),n=r.byteLength;for(let i=0;i<n;i++)e+=String.fromCharCode(r[i]);return btoa(e)},Co=class{constructor(t,e){e&&e.length===2&&e[1].startsWith(a0)&&(this.authToken=atob(e[1].slice(a0.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=Mn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+i0.websocket),"$1/"+i0.longpoll)}endpointURL(){return Gf.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,r){this.close(t,e,r),this.readyState=Mn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Mn.open||this.readyState===Mn.connecting}poll(){const t={Accept:"application/json"};this.authToken&&(t["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",t,null,()=>this.ontimeout(),e=>{if(e){var{status:r,token:n,messages:i}=e;if(r===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=n}else r=0;switch(r){case 200:i.forEach(a=>{setTimeout(()=>this.onmessage({data:a}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Mn.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${r}`)}})}send(t){typeof t!="string"&&(t=X4(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},t.join(`
164
+ `),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(t,e,r){for(let i of this.reqs)i.abort();this.readyState=Mn.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:r});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(t,e,r,n,i){let a,s=()=>{this.reqs.delete(a),n()};a=Gf.request(t,this.endpointURL(),e,r,this.timeout,s,u=>{this.reqs.delete(a),this.isActive()&&i(u)}),this.reqs.add(a)}},Y4=class ql{constructor(e,r={}){let n=r.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=e,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(n.state,i=>{let{onJoin:a,onLeave:s,onSync:u}=this.caller;this.joinRef=this.channel.joinRef(),this.state=ql.syncState(this.state,i,a,s),this.pendingDiffs.forEach(c=>{this.state=ql.syncDiff(this.state,c,a,s)}),this.pendingDiffs=[],u()}),this.channel.on(n.diff,i=>{let{onJoin:a,onLeave:s,onSync:u}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=ql.syncDiff(this.state,i,a,s),u())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(e){return ql.list(this.state,e)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,r,n,i){let a=this.clone(e),s={},u={};return this.map(a,(c,f)=>{r[c]||(u[c]=f)}),this.map(r,(c,f)=>{let p=a[c];if(p){let h=f.metas.map(x=>x.phx_ref),g=p.metas.map(x=>x.phx_ref),v=f.metas.filter(x=>g.indexOf(x.phx_ref)<0),w=p.metas.filter(x=>h.indexOf(x.phx_ref)<0);v.length>0&&(s[c]=f,s[c].metas=v),w.length>0&&(u[c]=this.clone(p),u[c].metas=w)}else s[c]=f}),this.syncDiff(a,{joins:s,leaves:u},n,i)}static syncDiff(e,r,n,i){let{joins:a,leaves:s}=this.clone(r);return n||(n=function(){}),i||(i=function(){}),this.map(a,(u,c)=>{let f=e[u];if(e[u]=this.clone(c),f){let p=e[u].metas.map(g=>g.phx_ref),h=f.metas.filter(g=>p.indexOf(g.phx_ref)<0);e[u].metas.unshift(...h)}n(u,f,c)}),this.map(s,(u,c)=>{let f=e[u];if(!f)return;let p=c.metas.map(h=>h.phx_ref);f.metas=f.metas.filter(h=>p.indexOf(h.phx_ref)<0),i(u,f,c),f.metas.length===0&&delete e[u]}),e}static list(e,r){return r||(r=function(n,i){return i}),this.map(e,(n,i)=>r(n,i))}static map(e,r){return Object.getOwnPropertyNames(e).map(n=>r(n,e[n]))}static clone(e){return JSON.parse(JSON.stringify(e))}},yf={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(r))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[r,n,i,a,s]=JSON.parse(t);return e({join_ref:r,ref:n,topic:i,event:a,payload:s})}},binaryEncode(t){let{join_ref:e,ref:r,event:n,topic:i,payload:a}=t,s=this.META_LENGTH+e.length+r.length+i.length+n.length,u=new ArrayBuffer(this.HEADER_LENGTH+s),c=new DataView(u),f=0;c.setUint8(f++,this.KINDS.push),c.setUint8(f++,e.length),c.setUint8(f++,r.length),c.setUint8(f++,i.length),c.setUint8(f++,n.length),Array.from(e,h=>c.setUint8(f++,h.charCodeAt(0))),Array.from(r,h=>c.setUint8(f++,h.charCodeAt(0))),Array.from(i,h=>c.setUint8(f++,h.charCodeAt(0))),Array.from(n,h=>c.setUint8(f++,h.charCodeAt(0)));var p=new Uint8Array(u.byteLength+a.byteLength);return p.set(new Uint8Array(u),0),p.set(new Uint8Array(a),u.byteLength),p.buffer},binaryDecode(t){let e=new DataView(t),r=e.getUint8(0),n=new TextDecoder;switch(r){case this.KINDS.push:return this.decodePush(t,e,n);case this.KINDS.reply:return this.decodeReply(t,e,n);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,n)}},decodePush(t,e,r){let n=e.getUint8(1),i=e.getUint8(2),a=e.getUint8(3),s=this.HEADER_LENGTH+this.META_LENGTH-1,u=r.decode(t.slice(s,s+n));s=s+n;let c=r.decode(t.slice(s,s+i));s=s+i;let f=r.decode(t.slice(s,s+a));s=s+a;let p=t.slice(s,t.byteLength);return{join_ref:u,ref:null,topic:c,event:f,payload:p}},decodeReply(t,e,r){let n=e.getUint8(1),i=e.getUint8(2),a=e.getUint8(3),s=e.getUint8(4),u=this.HEADER_LENGTH+this.META_LENGTH,c=r.decode(t.slice(u,u+n));u=u+n;let f=r.decode(t.slice(u,u+i));u=u+i;let p=r.decode(t.slice(u,u+a));u=u+a;let h=r.decode(t.slice(u,u+s));u=u+s;let g=t.slice(u,t.byteLength),v={status:h,response:g};return{join_ref:c,ref:f,topic:p,event:ii.reply,payload:v}},decodeBroadcast(t,e,r){let n=e.getUint8(1),i=e.getUint8(2),a=this.HEADER_LENGTH+2,s=r.decode(t.slice(a,a+n));a=a+n;let u=r.decode(t.slice(a,a+i));a=a+i;let c=t.slice(a,t.byteLength);return{join_ref:null,ref:null,topic:s,event:u,payload:c}}},J4=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||H4,this.transport=e.transport||Nn.WebSocket||Co,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null;let r=null;try{r=Nn&&Nn.sessionStorage}catch{}this.sessionStore=e.sessionStorage||r,this.establishedConnections=0,this.defaultEncoder=yf.encode.bind(yf),this.defaultDecoder=yf.decode.bind(yf),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Co?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;Bo&&Bo.addEventListener&&(Bo.addEventListener("pagehide",i=>{this.conn&&(this.disconnect(),n=this.connectClock)}),Bo.addEventListener("pageshow",i=>{n===this.connectClock&&(n=null,this.connect())}),Bo.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=e.autoSendHeartbeat??!0,this.heartbeatCallback=e.heartbeatCallback??(()=>{}),this.rejoinAfterMs=i=>e.rejoinAfterMs?e.rejoinAfterMs(i):[1e3,2e3,5e3][i-1]||1e4,this.reconnectAfterMs=i=>e.reconnectAfterMs?e.reconnectAfterMs(i):[10,50,100,150,200,250,500,1e3,2e3][i-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(i,a,s)=>{console.log(`${i}: ${a}`,s)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=Kl(e.params||{}),this.endPoint=`${t}/${i0.websocket}`,this.vsn=e.vsn||W4,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new MR(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{e.beforeReconnect&&await e.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=e.authToken}getLongPollTransport(){return Co}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=Gf.appendParams(Gf.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,r){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,t&&t()},e,r)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=Kl(t)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Co?this.connectWithFallback(Co,this.longPollFallbackMs):this.transportConnect())}log(t,e,r){this.logger&&this.logger(t,e,r)}hasLogger(){return this.logger!==null}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}onHeartbeat(t){this.heartbeatCallback=t}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),r=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let n=this.onMessage(i=>{i.ref===e&&(this.off([n]),t(Date.now()-r))});return!0}transportName(t){switch(t){case Co:return"LongPoll";default:return t.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let t;this.authToken&&(t=["phoenix",`${a0}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),t),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let r=!1,n=!0,i,a,s=this.transportName(t),u=c=>{this.log("transport",`falling back to ${s}...`,c),this.off([i,a]),n=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${s}`))return u("memorized");this.fallbackTimer=setTimeout(u,e),a=this.onError(c=>{this.log("transport","error",c),n&&!r&&(clearTimeout(this.fallbackTimer),u(c))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(r=!0,!n){let c=this.transportName(t);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${c}`,"true"),this.log("transport",`established ${c} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(u,e),this.ping(c=>{this.log("transport","connected to primary after",c),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(t){this.log("error","error in heartbeat callback",t)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),V4,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,r){if(!this.conn)return t&&t();const n=this.conn;this.waitForBufferDone(n,()=>{e?n.close(e,r||""):n.close(),this.waitForSocketClosed(n,()=>{this.conn===n&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),t&&t()})})}waitForBufferDone(t,e,r=1){if(r===5||!t.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(t,e,r+1)},150*r)}waitForSocketClosed(t,e,r=1){if(r===5||t.readyState===Mn.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(t,e,r+1)},150*r)}onConnClose(t){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(t),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",t)}onConnError(t){this.hasLogger()&&this.log("transport","error",t);let e=this.transport,r=this.establishedConnections;this.triggerStateCallbacks("error",t,e,r),(e===this.transport||r>0)&&this.triggerChanError(t)}triggerChanError(t){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(ii.error,t)})}connectionState(){switch(this.conn&&this.conn.readyState){case Mn.connecting:return"connecting";case Mn.open:return"open";case Mn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([r])=>t.indexOf(r)===-1)}channel(t,e={}){let r=new G4(t,e,this);return this.channels.push(r),r}push(t){if(this.hasLogger()){let{topic:e,event:r,payload:n,ref:i,join_ref:a}=t;this.log("push",`${e} ${r} (${a}, ${i})`,n)}this.isConnected()?this.encode(t,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(t,e=>this.conn.send(e)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(t){this.log("error","error in heartbeat callback",t)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(t){this.log("error","error in heartbeat callback",t)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,e=>{let{topic:r,event:n,payload:i,ref:a,join_ref:s}=e;if(a&&a===this.pendingHeartbeatRef){const u=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(i.status==="ok"?"ok":"error",u)}catch(c){this.log("error","error in heartbeat callback",c)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${i.status||""} ${r} ${n} ${a&&"("+a+")"||""}`.trim(),i);for(let u=0;u<this.channels.length;u++){const c=this.channels[u];c.isMember(r,n,i,s)&&c.trigger(n,i,a,s)}this.triggerStateCallbacks("message",e)})}triggerStateCallbacks(t,...e){try{this.stateChangeCallbacks[t].forEach(([r,n])=>{try{n(...e)}catch(i){this.log("error",`error in ${t} callback`,i)}})}catch(r){this.log("error",`error triggering ${t} callbacks`,r)}}leaveOpenTopic(t){let e=this.channels.find(r=>r.topic===t&&(r.isJoined()||r.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};class Gl{constructor(e,r){const n=Z4(r);this.presence=new Y4(e.getChannel(),n),this.presence.onJoin((i,a,s)=>{const u=Gl.onJoinPayload(i,a,s);e.getChannel().trigger("presence",u)}),this.presence.onLeave((i,a,s)=>{const u=Gl.onLeavePayload(i,a,s);e.getChannel().trigger("presence",u)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return Gl.transformState(this.presence.state)}static transformState(e){return e=Q4(e),Object.getOwnPropertyNames(e).reduce((r,n)=>{const i=e[n];return r[n]=Ff(i),r},{})}static onJoinPayload(e,r,n){const i=pk(r),a=Ff(n);return{event:"join",key:e,currentPresences:i,newPresences:a}}static onLeavePayload(e,r,n){const i=pk(r),a=Ff(n);return{event:"leave",key:e,currentPresences:i,leftPresences:a}}}function Ff(t){return t.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))}function Q4(t){return JSON.parse(JSON.stringify(t))}function Z4(t){return(t==null?void 0:t.events)&&{events:t.events}}function pk(t){return t!=null&&t.metas?Ff(t):[]}var mk;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(mk||(mk={}));class eU{get state(){return this.presenceAdapter.state}constructor(e,r){this.channel=e,this.presenceAdapter=new Gl(this.channel.channelAdapter,r)}}function tU(t){if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t&&typeof t=="object"){const e=t;if(typeof e.code=="number"){const r=typeof e.reason=="string"&&e.reason?` (${e.reason})`:"";return new Error(`socket closed: ${e.code}${r}`,{cause:t})}return new Error("channel error: transport failure",{cause:t})}return new Error("channel error: connection lost")}class rU{constructor(e,r,n){const i=nU(n);this.channel=e.getSocket().channel(r,i),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,r){return this.channel.on(e,r)}off(e,r){this.channel.off(e,r)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,r,n){let i;try{i=this.channel.push(e,r,n)}catch{throw new Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>N4){const a=this.channel.pushBuffer.shift();a.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${a.event}`,a.payload())}return i}updateJoinPayload(e){const r=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},r),e)}canPush(){return this.socket.isConnected()&&this.state===Ji.joined}isJoined(){return this.state===Ji.joined}isJoining(){return this.state===Ji.joining}isClosed(){return this.state===Ji.closed}isLeaving(){return this.state===Ji.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}function nU(t){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config)}}var gk;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(gk||(gk={}));var Fo;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(Fo||(Fo={}));var ai;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(ai||(ai={}));class Xl{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(e,r={config:{}},n){var i,a;if(this.topic=e,this.params=r,this.socket=n,this.bindings={},this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.channelAdapter=new rU(this.socket.socketAdapter,e,this.params),this.presence=new eU(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=NR(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((a=(i=this.params.config)===null||i===void 0?void 0:i.broadcast)===null||a===void 0)&&a.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(e,r=this.timeout){var n,i,a;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:s,presence:u,private:c}}=this.params,f=(i=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(v=>v.filter))!==null&&i!==void 0?i:[],p=!!this.bindings[Fo.PRESENCE]&&this.bindings[Fo.PRESENCE].length>0||((a=this.params.config.presence)===null||a===void 0?void 0:a.enabled)===!0,h={},g={broadcast:s,presence:Object.assign(Object.assign({},u),{enabled:p}),postgres_changes:f,private:c};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(v=>{e==null||e(ai.CHANNEL_ERROR,tU(v))}),this._onClose(()=>e==null?void 0:e(ai.CLOSED)),this.updateJoinPayload(Object.assign({config:g},h)),this._updateFilterMessage(),this.channelAdapter.subscribe(r).receive("ok",async({postgres_changes:v})=>{if(this.socket._isManualToken()||this.socket.setAuth(),v===void 0){e==null||e(ai.SUBSCRIBED);return}this._updatePostgresBindings(v,e)}).receive("error",v=>{this.state=Ji.errored;const w=Object.values(v).join(", ")||"error";e==null||e(ai.CHANNEL_ERROR,new Error(w,{cause:v}))}).receive("timeout",()=>{e==null||e(ai.TIMED_OUT)})}return this}_updatePostgresBindings(e,r){var n;const i=this.bindings.postgres_changes,a=(n=i==null?void 0:i.length)!==null&&n!==void 0?n:0,s=[];for(let u=0;u<a;u++){const c=i[u],{filter:{event:f,schema:p,table:h,filter:g}}=c,v=e&&e[u];if(v&&v.event===f&&Xl.isFilterValueEqual(v.schema,p)&&Xl.isFilterValueEqual(v.table,h)&&Xl.isFilterValueEqual(v.filter,g))s.push(Object.assign(Object.assign({},c),{id:v.id}));else{this.unsubscribe(),this.state=Ji.errored,r==null||r(ai.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=s,this.state!=Ji.errored&&r&&r(ai.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,r={}){return await this.send({type:"presence",event:"track",payload:e},r.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,r,n){const i=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),a=e===Fo.PRESENCE||e===Fo.POSTGRES_CHANGES;if(i&&a)throw this.socket.log("channel",`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,r,n)}async httpSend(e,r,n={}){var i;if(r==null)return Promise.reject(new Error("Payload is required for httpSend()"));const a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const s={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:e,payload:r,private:this.private}]})},u=await this._fetchWithTimeout(this.broadcastEndpointURL,s,(i=n.timeout)!==null&&i!==void 0?i:this.timeout);if(u.status===202)return{success:!0};let c=u.statusText;try{const f=await u.json();c=f.error||f.message||c}catch{}return Promise.reject(new Error(c))}async send(e,r={}){var n,i;if(!this.channelAdapter.canPush()&&e.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:a,payload:s}=e,u={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(u.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c={method:"POST",headers:u,body:JSON.stringify({messages:[{topic:this.subTopic,event:a,payload:s,private:this.private}]})};try{const f=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((i=f.body)===null||i===void 0?void 0:i.cancel()),f.ok?"ok":"error"}catch(f){return f instanceof Error&&f.name==="AbortError"?"timed out":"error"}}else return new Promise(a=>{var s,u,c;const f=this.channelAdapter.push(e.type,e,r.timeout||this.timeout);e.type==="broadcast"&&!(!((c=(u=(s=this.params)===null||s===void 0?void 0:s.config)===null||u===void 0?void 0:u.broadcast)===null||c===void 0)&&c.ack)&&a("ok"),f.receive("ok",()=>a("ok")),f.receive("error",()=>a("error")),f.receive("timeout",()=>a("timed out"))})}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(r=>{this.channelAdapter.unsubscribe(e).receive("ok",()=>r("ok")).receive("timeout",()=>r("timed out")).receive("error",()=>r("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,r,n){const i=new AbortController,a=setTimeout(()=>i.abort(),n),s=await this.socket.fetch(e,Object.assign(Object.assign({},r),{signal:i.signal}));return clearTimeout(a),s}_on(e,r,n){const i=e.toLocaleLowerCase(),a=this.channelAdapter.on(e,n),s={type:i,filter:r,callback:n,ref:a};return this.bindings[i]?this.bindings[i].push(s):this.bindings[i]=[s],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,r,n)=>{var i,a,s,u,c,f,p;const h=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(h,n))return!1;const g=(i=this.bindings[h])===null||i===void 0?void 0:i.find(v=>v.ref===e.ref);if(!g)return!0;if(["broadcast","presence","postgres_changes"].includes(h))if("id"in g){const v=g.id,w=(a=g.filter)===null||a===void 0?void 0:a.event;return v&&((s=r.ids)===null||s===void 0?void 0:s.includes(v))&&(w==="*"||(w==null?void 0:w.toLocaleLowerCase())===((u=r.data)===null||u===void 0?void 0:u.type.toLocaleLowerCase()))}else{const v=(f=(c=g==null?void 0:g.filter)===null||c===void 0?void 0:c.event)===null||f===void 0?void 0:f.toLocaleLowerCase();return v==="*"||v===((p=r==null?void 0:r.event)===null||p===void 0?void 0:p.toLocaleLowerCase())}else return g.type.toLocaleLowerCase()===h})}_notThisChannelEvent(e,r){const{close:n,error:i,leave:a,join:s}=IR;return r&&[n,i,a,s].includes(e)&&r!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,r,n)=>{if(typeof r=="object"&&"ids"in r){const i=r.data,{schema:a,table:s,commit_timestamp:u,type:c,errors:f}=i;return Object.assign(Object.assign({},{schema:a,table:s,commit_timestamp:u,eventType:c,new:{},old:{},errors:f}),this._getPayloadRecords(i))}return r})}copyBindings(e){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const r in e.bindings)for(const n of e.bindings[r])this._on(n.type,n.filter,n.callback)}static isFilterValueEqual(e,r){return(e??void 0)===(r??void 0)}_getPayloadRecords(e){const r={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(r.new=hk(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(r.old=hk(e.columns,e.old_record)),r}}class iU{constructor(e,r){this.socket=new J4(e,r)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(e){this.socket.heartbeatCallback=e}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(e,r,n,i=1e4){return new Promise(a=>{setTimeout(()=>a("timeout"),i),this.socket.disconnect(()=>{e(),a("ok")},r,n)})}push(e){this.socket.push(e)}log(e,r,n){this.socket.log(e,r,n)}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==r0.connecting}isDisconnecting(){return this.socket.connectionState()==r0.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const vk={HEARTBEAT_INTERVAL:25e3},aU=[1e3,2e3,5e3,1e4],oU=1e4;function sU(){const t=new Map;return{get length(){return t.size},clear(){t.clear()},getItem(e){return t.has(e)?t.get(e):null},key(e){var r;return(r=Array.from(t.keys())[e])!==null&&r!==void 0?r:null},removeItem(e){t.delete(e)},setItem(e,r){t.set(e,String(r))}}}function lU(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return sU()}const uU=`
165
+ addEventListener("message", (e) => {
166
+ if (e.data.event === "start") {
167
+ setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
168
+ }
169
+ });`;class cU{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(e,r){var n;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={},this.ref=0,this.serializer=new M4,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=a=>a?(...s)=>a(...s):(...s)=>fetch(...s),!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey;const i=this._initializeOptions(r);this.socketAdapter=new iU(e,i),this.httpEndpoint=NR(e),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(e){const r=e.message;throw r.includes("Node.js")?new Error(`${r}
170
+
171
+ To use Realtime in Node.js, you need to provide a WebSocket implementation:
172
+
173
+ Option 1: Use Node.js 22+ which has native WebSocket support
174
+ Option 2: Install and provide the "ws" package:
175
+
176
+ npm install ws
177
+
178
+ import ws from "ws"
179
+ const client = new RealtimeClient(url, {
180
+ ...options,
181
+ transport: ws
182
+ })`):new Error(`WebSocket not available: ${r}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,r){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,r)}getChannels(){return this.channels}async removeChannel(e){const r=await e.unsubscribe();return r==="ok"&&e.teardown(),r}async removeAllChannels(){const e=this.channels.map(async n=>{const i=await n.unsubscribe();return n.teardown(),i}),r=await Promise.all(e);return await this.disconnect(),r}log(e,r,n){this.socketAdapter.log(e,r,n)}connectionState(){return this.socketAdapter.connectionState()||r0.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,r={config:{}}){const n=`realtime:${e}`,i=this.getChannels().find(a=>a.topic===n);if(i)return i;{const a=new Xl(`realtime:${e}`,r,this);return this._cancelPendingDisconnect(),this.channels.push(a),a}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(r=>r.topic!==e.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(e=null){let r,n=!1;if(e)r=e,n=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(i){this.log("error","Error fetching access token from callback",i),r=this.accessTokenValue}else r=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(i=>{const a={access_token:r,version:j4};r&&i.updateJoinPayload(a),i.joinedOnce&&i.channelAdapter.isJoined()&&i.channelAdapter.push(IR.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${e}`,r)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(r=>{this.log("error","error waiting for auth on connect",r)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(r,n)=>{r=="sent"&&this._setAuthSafely(),e&&e(r,n)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(e){let r;if(e)r=e;else{const n=new Blob([uU],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_initializeOptions(e){var r,n,i,a,s,u,c,f,p,h,g,v;this.worker=(r=e==null?void 0:e.worker)!==null&&r!==void 0?r:!1,this.accessToken=(n=e==null?void 0:e.accessToken)!==null&&n!==void 0?n:null;const w={};w.timeout=(i=e==null?void 0:e.timeout)!==null&&i!==void 0?i:$4,w.heartbeatIntervalMs=(a=e==null?void 0:e.heartbeatIntervalMs)!==null&&a!==void 0?a:vk.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(s=e==null?void 0:e.disconnectOnEmptyChannelsAfterMs)!==null&&s!==void 0?s:2*((u=e==null?void 0:e.heartbeatIntervalMs)!==null&&u!==void 0?u:vk.HEARTBEAT_INTERVAL),w.transport=(c=e==null?void 0:e.transport)!==null&&c!==void 0?c:T4.getWebSocketConstructor(),w.params=e==null?void 0:e.params,w.logger=e==null?void 0:e.logger,w.heartbeatCallback=this._wrapHeartbeatCallback(e==null?void 0:e.heartbeatCallback),w.sessionStorage=(f=e==null?void 0:e.sessionStorage)!==null&&f!==void 0?f:lU(),w.reconnectAfterMs=(p=e==null?void 0:e.reconnectAfterMs)!==null&&p!==void 0?p:(k=>aU[k-1]||oU);let x,y;const S=(h=e==null?void 0:e.vsn)!==null&&h!==void 0?h:I4;switch(S){case R4:x=(k,E)=>E(JSON.stringify(k)),y=(k,E)=>E(JSON.parse(k));break;case RR:x=this.serializer.encode.bind(this.serializer),y=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${w.vsn}`)}if(w.vsn=S,w.encode=(g=e==null?void 0:e.encode)!==null&&g!==void 0?g:x,w.decode=(v=e==null?void 0:e.decode)!==null&&v!==void 0?v:y,w.beforeReconnect=this._reconnectAuth.bind(this),(e!=null&&e.logLevel||e!=null&&e.log_level)&&(this.logLevel=e.logLevel||e.log_level,w.params=Object.assign(Object.assign({},w.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e==null?void 0:e.workerUrl,w.autoSendHeartbeat=!this.worker}return w}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}var iu=class extends Error{constructor(t,e){var r;super(t),this.name="IcebergError",this.status=e.status,this.icebergType=e.icebergType,this.icebergCode=e.icebergCode,this.details=e.details,this.isCommitStateUnknown=e.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e.status)&&((r=e.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function fU(t,e,r){const n=new URL(e,t);if(r)for(const[i,a]of Object.entries(r))a!==void 0&&n.searchParams.set(i,a);return n.toString()}async function dU(t){return!t||t.type==="none"?{}:t.type==="bearer"?{Authorization:`Bearer ${t.token}`}:t.type==="header"?{[t.name]:t.value}:t.type==="custom"?await t.getHeaders():{}}function hU(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:i,body:a,headers:s}){const u=fU(t.baseUrl,n,i),c=await dU(t.auth),f=await e(u,{method:r,headers:{...a?{"Content-Type":"application/json"}:{},...c,...s},body:a?JSON.stringify(a):void 0}),p=await f.text(),h=(f.headers.get("content-type")||"").includes("application/json"),g=h&&p?JSON.parse(p):p;if(!f.ok){const v=h?g:void 0,w=v==null?void 0:v.error;throw new iu((w==null?void 0:w.message)??`Request failed with status ${f.status}`,{status:f.status,icebergType:w==null?void 0:w.type,icebergCode:w==null?void 0:w.code,details:v})}return{status:f.status,headers:f.headers,data:g}}}}function bf(t){return t.join("")}var pU=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:bf(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(t,e){const r={namespace:t.namespace,properties:e==null?void 0:e.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${bf(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${bf(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${bf(t.namespace)}`}),!0}catch(e){if(e instanceof iu&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(r){if(r instanceof iu&&r.status===409)return;throw r}}};function jo(t){return t.join("")}var mU=class{constructor(t,e="",r){this.client=t,this.prefix=e,this.accessDelegation=r}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${jo(t.namespace)}/tables`})).data.identifiers}async createTable(t,e){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${jo(t.namespace)}/tables`,body:e,headers:r})).data.metadata}async updateTable(t,e){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${jo(t.namespace)}/tables/${t.name}`,body:e});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(t,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${jo(t.namespace)}/tables/${t.name}`,query:{purgeRequested:String((e==null?void 0:e.purge)??!1)}})}async loadTable(t){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${jo(t.namespace)}/tables/${t.name}`,headers:e})).data.metadata}async tableExists(t){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${jo(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(r){if(r instanceof iu&&r.status===404)return!1;throw r}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(r){if(r instanceof iu&&r.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw r}}},gU=class{constructor(t){var n;let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const r=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=hU({baseUrl:r,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=(n=t.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new pU(this.client,e),this.tableOps=new mU(this.client,e,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,e){return this.namespaceOps.createNamespace(t,e)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}async createTable(t,e){return this.tableOps.createTable(t,e)}async updateTable(t,e){return this.tableOps.updateTable(t,e)}async dropTable(t,e){await this.tableOps.dropTable(t,e)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,e){return this.namespaceOps.createNamespaceIfNotExists(t,e)}async createTableIfNotExists(t,e){return this.tableOps.createTableIfNotExists(t,e)}};function au(t){"@babel/helpers - typeof";return au=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},au(t)}function vU(t,e){if(au(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(au(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function yU(t){var e=vU(t,"string");return au(e)=="symbol"?e:e+""}function bU(t,e,r){return(e=yU(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yk(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ce(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?yk(Object(r),!0).forEach(function(n){bU(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yk(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var oh=class extends Error{constructor(t,e="storage",r,n){super(t),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function sh(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var o0=class extends oh{constructor(t,e,r,n="storage"){super(t,n,e,r),this.name=n==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=r}toJSON(){return Ce({},super.toJSON())}},LR=class extends oh{constructor(t,e,r="storage"){super(t,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};function Xf(t,e,r){const n=Ce({},t),i=e.toLowerCase();for(const a of Object.keys(n))a.toLowerCase()===i&&delete n[a];return n[i]=r,n}function wU(t){const e={};for(const[r,n]of Object.entries(t))e[r.toLowerCase()]=n;return e}const xU=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),_U=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},s0=t=>{if(Array.isArray(t))return t.map(r=>s0(r));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([r,n])=>{const i=r.replace(/([-_][a-z])/gi,a=>a.toUpperCase().replace(/[-_]/g,""));e[i]=s0(n)}),e},SU=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t),bk=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error;if(typeof e.error=="object"&&e.error!==null){const r=e.error;if(typeof r.message=="string")return r.message}}return JSON.stringify(t)},kU=async(t,e,r,n)=>{if(t!==null&&typeof t=="object"&&"json"in t&&typeof t.json=="function"){const i=t;let a=parseInt(String(i.status),10);Number.isFinite(a)||(a=500),i.json().then(s=>{const u=(s==null?void 0:s.statusCode)||(s==null?void 0:s.code)||a+"";e(new o0(bk(s),a,u,n))}).catch(()=>{const s=a+"";e(new o0(i.statusText||`HTTP ${a} error`,a,s,n))})}else e(new LR(bk(t),t,n))},OU=(t,e,r,n)=>{const i={method:t,headers:(e==null?void 0:e.headers)||{}};if(t==="GET"||t==="HEAD"||!n)return Ce(Ce({},i),r);if(_U(n)){var a;const s=(e==null?void 0:e.headers)||{};let u;for(const[c,f]of Object.entries(s))c.toLowerCase()==="content-type"&&(u=f);i.headers=Xf(s,"Content-Type",(a=u)!==null&&a!==void 0?a:"application/json"),i.body=JSON.stringify(n)}else i.body=n;return e!=null&&e.duplex&&(i.duplex=e.duplex),Ce(Ce({},i),r)};async function Pl(t,e,r,n,i,a,s){return new Promise((u,c)=>{t(r,OU(e,n,i,a)).then(f=>{if(!f.ok)throw f;if(n!=null&&n.noResolveJson)return f;if(s==="vectors"){const p=f.headers.get("content-type");if(f.headers.get("content-length")==="0"||f.status===204)return{};if(!p||!p.includes("application/json"))return{}}return f.json()}).then(f=>u(f)).catch(f=>kU(f,c,n,s))})}function DR(t="storage"){return{get:async(e,r,n,i)=>Pl(e,"GET",r,n,i,void 0,t),post:async(e,r,n,i,a)=>Pl(e,"POST",r,i,a,n,t),put:async(e,r,n,i,a)=>Pl(e,"PUT",r,i,a,n,t),head:async(e,r,n,i)=>Pl(e,"HEAD",r,Ce(Ce({},n),{},{noResolveJson:!0}),i,void 0,t),remove:async(e,r,n,i,a)=>Pl(e,"DELETE",r,i,a,n,t)}}const EU=DR("storage"),{get:ou,post:gn,put:l0,head:AU,remove:Jw}=EU,$r=DR("vectors");var js=class{constructor(t,e={},r,n="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=wU(e),this.fetch=xU(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=Xf(this.headers,t,e),this}async handleOperation(t){var e=this;try{return{data:await t(),error:null}}catch(r){if(e.shouldThrowOnError)throw r;if(sh(r))return{data:null,error:r};throw r}}};let BR;BR=Symbol.toStringTag;var PU=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[BR]="StreamDownloadBuilder",this.promise=null}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:(await t.downloadFn()).body,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(sh(e))return{data:null,error:e};throw e}}};let UR;UR=Symbol.toStringTag;var TU=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[UR]="BlobDownloadBuilder",this.promise=null}asStream(){return new PU(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:await(await t.downloadFn()).blob(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(sh(e))return{data:null,error:e};throw e}}};const CU={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},wk={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var jU=class extends js{constructor(t,e={},r,n){super(t,e,n,"storage"),this.bucketId=r}async uploadOrUpdate(t,e,r,n){var i=this;return i.handleOperation(async()=>{let a;const s=Ce(Ce({},wk),n);let u=Ce(Ce({},i.headers),t==="POST"&&{"x-upsert":String(s.upsert)});const c=s.metadata;if(typeof Blob<"u"&&r instanceof Blob?(a=new FormData,a.append("cacheControl",s.cacheControl),c&&a.append("metadata",i.encodeMetadata(c)),a.append("",r)):typeof FormData<"u"&&r instanceof FormData?(a=r,a.has("cacheControl")||a.append("cacheControl",s.cacheControl),c&&!a.has("metadata")&&a.append("metadata",i.encodeMetadata(c))):(a=r,u["cache-control"]=`max-age=${s.cacheControl}`,u["content-type"]=s.contentType,c&&(u["x-metadata"]=i.toBase64(i.encodeMetadata(c))),(typeof ReadableStream<"u"&&a instanceof ReadableStream||a&&typeof a=="object"&&"pipe"in a&&typeof a.pipe=="function")&&!s.duplex&&(s.duplex="half")),n!=null&&n.headers)for(const[g,v]of Object.entries(n.headers))u=Xf(u,g,v);const f=i._removeEmptyFolders(e),p=i._getFinalPath(f),h=await(t=="PUT"?l0:gn)(i.fetch,`${i.url}/object/${p}`,a,Ce({headers:u},s!=null&&s.duplex?{duplex:s.duplex}:{}));return{path:f,id:h.Id,fullPath:h.Key}})}async upload(t,e,r){return this.uploadOrUpdate("POST",t,e,r)}async uploadToSignedUrl(t,e,r,n){var i=this;const a=i._removeEmptyFolders(t),s=i._getFinalPath(a),u=new URL(i.url+`/object/upload/sign/${s}`);return u.searchParams.set("token",e),i.handleOperation(async()=>{let c;const f=Ce(Ce({},wk),n);let p=Ce(Ce({},i.headers),{"x-upsert":String(f.upsert)});const h=f.metadata;if(typeof Blob<"u"&&r instanceof Blob?(c=new FormData,c.append("cacheControl",f.cacheControl),h&&c.append("metadata",i.encodeMetadata(h)),c.append("",r)):typeof FormData<"u"&&r instanceof FormData?(c=r,c.has("cacheControl")||c.append("cacheControl",f.cacheControl),h&&!c.has("metadata")&&c.append("metadata",i.encodeMetadata(h))):(c=r,p["cache-control"]=`max-age=${f.cacheControl}`,p["content-type"]=f.contentType,h&&(p["x-metadata"]=i.toBase64(i.encodeMetadata(h))),(typeof ReadableStream<"u"&&c instanceof ReadableStream||c&&typeof c=="object"&&"pipe"in c&&typeof c.pipe=="function")&&!f.duplex&&(f.duplex="half")),n!=null&&n.headers)for(const[g,v]of Object.entries(n.headers))p=Xf(p,g,v);return{path:a,fullPath:(await l0(i.fetch,u.toString(),c,Ce({headers:p},f!=null&&f.duplex?{duplex:f.duplex}:{}))).Key}})}async createSignedUploadUrl(t,e){var r=this;return r.handleOperation(async()=>{let n=r._getFinalPath(t);const i=Ce({},r.headers);e!=null&&e.upsert&&(i["x-upsert"]="true");const a=await gn(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:i}),s=new URL(r.url+a.url),u=s.searchParams.get("token");if(!u)throw new oh("No token returned by API");return{signedUrl:s.toString(),path:t,token:u}})}async update(t,e,r){return this.uploadOrUpdate("PUT",t,e,r)}async move(t,e,r){var n=this;return n.handleOperation(async()=>await gn(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:t,destinationKey:e,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}))}async copy(t,e,r){var n=this;return n.handleOperation(async()=>({path:(await gn(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:t,destinationKey:e,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key}))}async createSignedUrl(t,e,r){var n=this;return n.handleOperation(async()=>{let i=n._getFinalPath(t);const a=typeof(r==null?void 0:r.transform)=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let s=await gn(n.fetch,`${n.url}/object/sign/${i}`,Ce({expiresIn:e},a?{transform:r.transform}:{}),{headers:n.headers});const u=new URLSearchParams;r!=null&&r.download&&u.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&u.set("cacheNonce",String(r.cacheNonce));const c=u.toString();return{signedUrl:encodeURI(`${n.url}${s.signedURL}${c?`&${c}`:""}`)}})}async createSignedUrls(t,e,r){var n=this;return n.handleOperation(async()=>{const i=await gn(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:e,paths:t},{headers:n.headers}),a=new URLSearchParams;r!=null&&r.download&&a.set("download",r.download===!0?"":r.download),(r==null?void 0:r.cacheNonce)!=null&&a.set("cacheNonce",String(r.cacheNonce));const s=a.toString();return i.map(u=>Ce(Ce({},u),{},{signedUrl:u.signedURL?encodeURI(`${n.url}${u.signedURL}${s?`&${s}`:""}`):null}))})}download(t,e,r){const n=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image/authenticated":"object",i=new URLSearchParams;e!=null&&e.transform&&this.applyTransformOptsToQuery(i,e.transform),(e==null?void 0:e.cacheNonce)!=null&&i.set("cacheNonce",String(e.cacheNonce));const a=i.toString(),s=this._getFinalPath(t),u=()=>ou(this.fetch,`${this.url}/${n}/${s}${a?`?${a}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new TU(u,this.shouldThrowOnError)}async info(t){var e=this;const r=e._getFinalPath(t);return e.handleOperation(async()=>s0(await ou(e.fetch,`${e.url}/object/info/${r}`,{headers:e.headers})))}async exists(t){var e=this;const r=e._getFinalPath(t);try{return await AU(e.fetch,`${e.url}/object/${r}`,{headers:e.headers}),{data:!0,error:null}}catch(i){if(e.shouldThrowOnError)throw i;if(sh(i)){var n;const a=i instanceof o0?i.status:i instanceof LR?(n=i.originalError)===null||n===void 0?void 0:n.status:void 0;if(a!==void 0&&[400,404].includes(a))return{data:!1,error:i}}throw i}}getPublicUrl(t,e){const r=this._getFinalPath(t),n=new URLSearchParams;e!=null&&e.download&&n.set("download",e.download===!0?"":e.download),e!=null&&e.transform&&this.applyTransformOptsToQuery(n,e.transform),(e==null?void 0:e.cacheNonce)!=null&&n.set("cacheNonce",String(e.cacheNonce));const i=n.toString(),a=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${r}`)+(i?`?${i}`:"")}}}async remove(t){var e=this;return e.handleOperation(async()=>await Jw(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:t},{headers:e.headers}))}async list(t,e,r){var n=this;return n.handleOperation(async()=>{const i=Ce(Ce(Ce({},CU),e),{},{prefix:t||""});return await gn(n.fetch,`${n.url}/object/list/${n.bucketId}`,i,{headers:n.headers},r)})}async listV2(t,e){var r=this;return r.handleOperation(async()=>{const n=Ce({},t);return await gn(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},e)})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(t,e){return e.width&&t.set("width",e.width.toString()),e.height&&t.set("height",e.height.toString()),e.resize&&t.set("resize",e.resize),e.format&&t.set("format",e.format),e.quality&&t.set("quality",e.quality.toString()),t}};const RU="2.106.2",Vu={"X-Client-Info":`storage-js/${RU}`};var IU=class extends js{constructor(t,e={},r,n){const i=new URL(t);n!=null&&n.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes("storage.supabase.")&&(i.hostname=i.hostname.replace("supabase.","storage.supabase."));const a=i.href.replace(/\/$/,""),s=Ce(Ce({},Vu),e);super(a,s,r,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const r=e.listBucketOptionsToQueryString(t);return await ou(e.fetch,`${e.url}/bucket${r}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await ou(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var r=this;return r.handleOperation(async()=>await gn(r.fetch,`${r.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:r.headers}))}async updateBucket(t,e){var r=this;return r.handleOperation(async()=>await l0(r.fetch,`${r.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(t){var e=this;return e.handleOperation(async()=>await gn(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Jw(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}listBucketOptionsToQueryString(t){const e={};return t&&("limit"in t&&(e.limit=String(t.limit)),"offset"in t&&(e.offset=String(t.offset)),t.search&&(e.search=t.search),t.sortColumn&&(e.sortColumn=t.sortColumn),t.sortOrder&&(e.sortOrder=t.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}},$U=class extends js{constructor(t,e={},r){const n=t.replace(/\/$/,""),i=Ce(Ce({},Vu),e);super(n,i,r,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await gn(e.fetch,`${e.url}/bucket`,{name:t},{headers:e.headers}))}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const r=new URLSearchParams;(t==null?void 0:t.limit)!==void 0&&r.set("limit",t.limit.toString()),(t==null?void 0:t.offset)!==void 0&&r.set("offset",t.offset.toString()),t!=null&&t.sortColumn&&r.set("sortColumn",t.sortColumn),t!=null&&t.sortOrder&&r.set("sortOrder",t.sortOrder),t!=null&&t.search&&r.set("search",t.search);const n=r.toString(),i=n?`${e.url}/bucket?${n}`:`${e.url}/bucket`;return await ou(e.fetch,i,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Jw(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!SU(t))throw new oh("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const r=new gU({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:async()=>e.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(i,a){const s=i[a];return typeof s!="function"?s:async(...u)=>{try{return{data:await s.apply(i,u),error:null}}catch(c){if(n)throw c;return{data:null,error:c}}}}})}},NU=class extends js{constructor(t,e={},r){const n=t.replace(/\/$/,""),i=Ce(Ce({},Vu),{},{"Content-Type":"application/json"},e);super(n,i,r,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await $r.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var r=this;return r.handleOperation(async()=>await $r.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:r.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await $r.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var r=this;return r.handleOperation(async()=>await $r.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:r.headers})||{})}},MU=class extends js{constructor(t,e={},r){const n=t.replace(/\/$/,""),i=Ce(Ce({},Vu),{},{"Content-Type":"application/json"},e);super(n,i,r,"vectors")}async putVectors(t){var e=this;if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return e.handleOperation(async()=>await $r.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await $r.post(e.fetch,`${e.url}/GetVectors`,t,{headers:e.headers}))}async listVectors(t){var e=this;if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return e.handleOperation(async()=>await $r.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await $r.post(e.fetch,`${e.url}/QueryVectors`,t,{headers:e.headers}))}async deleteVectors(t){var e=this;if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return e.handleOperation(async()=>await $r.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},LU=class extends js{constructor(t,e={},r){const n=t.replace(/\/$/,""),i=Ce(Ce({},Vu),{},{"Content-Type":"application/json"},e);super(n,i,r,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await $r.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await $r.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await $r.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await $r.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},DU=class extends LU{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new BU(this.url,this.headers,t,this.fetch)}async createBucket(t){var e=()=>super.createBucket,r=this;return e().call(r,t)}async getBucket(t){var e=()=>super.getBucket,r=this;return e().call(r,t)}async listBuckets(t={}){var e=()=>super.listBuckets,r=this;return e().call(r,t)}async deleteBucket(t){var e=()=>super.deleteBucket,r=this;return e().call(r,t)}},BU=class extends NU{constructor(t,e,r,n){super(t,e,n),this.vectorBucketName=r}async createIndex(t){var e=()=>super.createIndex,r=this;return e().call(r,Ce(Ce({},t),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,r=this;return e().call(r,Ce(Ce({},t),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(t){var e=()=>super.getIndex,r=this;return e().call(r,r.vectorBucketName,t)}async deleteIndex(t){var e=()=>super.deleteIndex,r=this;return e().call(r,r.vectorBucketName,t)}index(t){return new UU(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},UU=class extends MU{constructor(t,e,r,n,i){super(t,e,i),this.vectorBucketName=r,this.indexName=n}async putVectors(t){var e=()=>super.putVectors,r=this;return e().call(r,Ce(Ce({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(t){var e=()=>super.getVectors,r=this;return e().call(r,Ce(Ce({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,r=this;return e().call(r,Ce(Ce({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,r=this;return e().call(r,Ce(Ce({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,r=this;return e().call(r,Ce(Ce({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},qU=class extends IU{constructor(t,e={},r,n){super(t,e,r,n)}from(t){return new jU(this.url,this.headers,t,this.fetch)}get vectors(){return new DU(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new $U(this.url+"/iceberg",this.headers,this.fetch)}};const qR="2.106.2",Uo=30*1e3,u0=3,qm=u0*Uo,zU="http://localhost:9999",FU="supabase.auth.token",WU={"X-Client-Info":`gotrue-js/${qR}`},c0="X-Supabase-Api-Version",zR={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},HU=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,VU=600*1e3;class ts extends Error{constructor(e,r,n){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function he(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class KU extends ts{constructor(e,r,n){super(e,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function GU(t){return he(t)&&t.name==="AuthApiError"}class xn extends ts{constructor(e,r){super(e),this.name="AuthUnknownError",this.originalError=r}}class vi extends ts{constructor(e,r,n,i){super(e,n,i),this.name=r,this.status=n}}class Ft extends vi{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function wf(t){return he(t)&&t.name==="AuthSessionMissingError"}class Ro extends vi{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class xf extends vi{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class _f extends vi{constructor(e,r=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function XU(t){return he(t)&&t.name==="AuthImplicitGrantRedirectError"}class xk extends vi{constructor(e,r=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class YU extends vi{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class f0 extends vi{constructor(e,r){super(e,"AuthRetryableFetchError",r,void 0)}}function zm(t){return he(t)&&t.name==="AuthRetryableFetchError"}class _k extends vi{constructor(e,r,n){super(e,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class d0 extends vi{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const Yf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Sk=`
183
+ \r=`.split(""),JU=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<Sk.length;e+=1)t[Sk[e].charCodeAt(0)]=-2;for(let e=0;e<Yf.length;e+=1)t[Yf[e].charCodeAt(0)]=e;return t})();function kk(t,e,r){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const n=e.queue>>e.queuedBits-6&63;r(Yf[n]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const n=e.queue>>e.queuedBits-6&63;r(Yf[n]),e.queuedBits-=6}}function FR(t,e,r){const n=JU[t];if(n>-1)for(e.queue=e.queue<<6|n,e.queuedBits+=6;e.queuedBits>=8;)r(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function Ok(t){const e=[],r=s=>{e.push(String.fromCodePoint(s))},n={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},a=s=>{eq(s,n,r)};for(let s=0;s<t.length;s+=1)FR(t.charCodeAt(s),i,a);return e.join("")}function QU(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function ZU(t,e){for(let r=0;r<t.length;r+=1){let n=t.charCodeAt(r);if(n>55295&&n<=56319){const i=(n-55296)*1024&65535;n=(t.charCodeAt(r+1)-56320&65535|i)+65536,r+=1}QU(n,e)}}function eq(t,e,r){if(e.utf8seq===0){if(t<=127){r(t);return}for(let n=1;n<6;n+=1)if((t>>7-n&1)===0){e.utf8seq=n;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&r(e.codepoint)}}function Xo(t){const e=[],r={queue:0,queuedBits:0},n=i=>{e.push(i)};for(let i=0;i<t.length;i+=1)FR(t.charCodeAt(i),r,n);return new Uint8Array(e)}function tq(t){const e=[];return ZU(t,r=>e.push(r)),new Uint8Array(e)}function La(t){const e=[],r={queue:0,queuedBits:0},n=i=>{e.push(i)};return t.forEach(i=>kk(i,r,n)),kk(null,r,n),e.join("")}function rq(t){return Math.round(Date.now()/1e3)+t}function nq(){return Symbol("auth-callback")}const Jt=()=>typeof window<"u"&&typeof document<"u",Aa={tested:!1,writable:!1},WR=()=>{if(!Jt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Aa.tested)return Aa.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),Aa.tested=!0,Aa.writable=!0}catch{Aa.tested=!0,Aa.writable=!1}return Aa.writable};function iq(t){const e={},r=new URL(t);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((i,a)=>{e[a]=i})}catch{}return r.searchParams.forEach((n,i)=>{e[i]=n}),e}const HR=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),aq=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",qo=async(t,e,r)=>{await t.setItem(e,JSON.stringify(r))},Pa=async(t,e)=>{const r=await t.getItem(e);if(!r)return null;try{return JSON.parse(r)}catch{return null}},Yt=async(t,e)=>{await t.removeItem(e)};class lh{constructor(){this.promise=new lh.promiseConstructor((e,r)=>{this.resolve=e,this.reject=r})}}lh.promiseConstructor=Promise;function Sf(t){const e=t.split(".");if(e.length!==3)throw new d0("Invalid JWT structure");for(let n=0;n<e.length;n++)if(!HU.test(e[n]))throw new d0("JWT not in base64url format");return{header:JSON.parse(Ok(e[0])),payload:JSON.parse(Ok(e[1])),signature:Xo(e[2]),raw:{header:e[0],payload:e[1]}}}async function oq(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function sq(t,e){return new Promise((n,i)=>{(async()=>{for(let a=0;a<1/0;a++)try{const s=await t(a);if(!e(a,null,s)){n(s);return}}catch(s){if(!e(a,s)){i(s);return}}})()})}function lq(t){return("0"+t.toString(16)).substr(-2)}function uq(){const e=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let i="";for(let a=0;a<56;a++)i+=r.charAt(Math.floor(Math.random()*n));return i}return crypto.getRandomValues(e),Array.from(e,lq).join("")}async function cq(t){const r=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-256",r),i=new Uint8Array(n);return Array.from(i).map(a=>String.fromCharCode(a)).join("")}async function fq(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),t;const r=await cq(t);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Io(t,e,r=!1){const n=uq();let i=n;r&&(i+="/recovery"),await qo(t,`${e}-code-verifier`,i);const a=await fq(n);return[a,n===a?"plain":"s256"]}const dq=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function hq(t){const e=t.headers.get(c0);if(!e||!e.match(dq))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function pq(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function mq(t){switch(t){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const gq=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function ri(t){if(!gq.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function mn(t){if(!t.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function Fm(){const t={};return new Proxy(t,{get:(e,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function vq(t,e){return new Proxy(t,{get:(r,n,i)=>{if(n==="__isInsecureUserWarningProxy")return!0;if(typeof n=="symbol"){const a=n.toString();if(a==="Symbol(Symbol.toPrimitive)"||a==="Symbol(Symbol.toStringTag)"||a==="Symbol(util.inspect.custom)"||a==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,i)}return!e.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),e.value=!0),Reflect.get(r,n,i)}})}function Ek(t){return JSON.parse(JSON.stringify(t))}const Ra=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error}return JSON.stringify(t)},yq=[502,503,504,520,521,522,523,524,530];async function Ak(t){var e;if(!aq(t))throw new f0(Ra(t),0);if(yq.includes(t.status))throw new f0(Ra(t),t.status);let r;try{r=await t.json()}catch(a){throw new xn(Ra(a),a)}let n;const i=hq(t);if(i&&i.getTime()>=zR["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new _k(Ra(r),t.status,((e=r.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(n==="session_not_found")throw new Ft}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((a,s)=>a&&typeof s=="string",!0))throw new _k(Ra(r),t.status,r.weak_password.reasons);throw new KU(Ra(r),t.status||500,n)}const bq=(t,e,r,n)=>{const i={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),i.body=JSON.stringify(n),Object.assign(Object.assign({},i),r))};async function xe(t,e,r,n){var i;const a=Object.assign({},n==null?void 0:n.headers);a[c0]||(a[c0]=zR["2024-01-01"].name),n!=null&&n.jwt&&(a.Authorization=`Bearer ${n.jwt}`);const s=(i=n==null?void 0:n.query)!==null&&i!==void 0?i:{};n!=null&&n.redirectTo&&(s.redirect_to=n.redirectTo);const u=Object.keys(s).length?"?"+new URLSearchParams(s).toString():"",c=await wq(t,e,r+u,{headers:a,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(c):{data:Object.assign({},c),error:null}}async function wq(t,e,r,n,i,a){const s=bq(e,n,i,a);let u;try{u=await t(r,Object.assign({},s))}catch(c){throw console.error(c),new f0(Ra(c),0)}if(u.ok||await Ak(u),n!=null&&n.noResolveJson)return u;try{return await u.json()}catch(c){await Ak(c)}}function Qr(t){var e;let r=null;Sq(t)&&(r=Object.assign({},t),t.expires_at||(r.expires_at=rq(t.expires_in)));const n=(e=t.user)!==null&&e!==void 0?e:typeof(t==null?void 0:t.id)=="string"?t:null;return{data:{session:r,user:n},error:null}}function Pk(t){const e=Qr(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(e.data.weak_password=t.weak_password),e}function Qi(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function xq(t){return{data:t,error:null}}function _q(t){const{action_link:e,email_otp:r,hashed_token:n,redirect_to:i,verification_type:a}=t,s=ah(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),u={action_link:e,email_otp:r,hashed_token:n,redirect_to:i,verification_type:a},c=Object.assign({},s);return{data:{properties:u,user:c},error:null}}function Tk(t){return t}function Sq(t){return!!t.access_token&&!!t.refresh_token&&!!t.expires_in}const Wm=["global","local","others"];class kq{_encodePathSegment(e){if(e==="."||e==="..")throw new ts("Invalid path segment");return encodeURIComponent(e)}constructor({url:e="",headers:r={},fetch:n,experimental:i}){this.url=e,this.headers=r,this.fetch=HR(n),this.experimental=i??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(e,r=Wm[0]){if(Wm.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Wm.join(", ")}`);try{return await xe(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(n){if(he(n))return{data:null,error:n};throw n}}async inviteUserByEmail(e,r={}){try{return await xe(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:Qi})}catch(n){if(he(n))return{data:{user:null},error:n};throw n}}async generateLink(e){try{const{options:r}=e,n=ah(e,["options"]),i=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(i.new_email=n==null?void 0:n.newEmail,delete i.newEmail),await xe(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i,headers:this.headers,xform:_q,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(he(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(e){try{return await xe(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:Qi})}catch(r){if(he(r))return{data:{user:null},error:r};throw r}}async listUsers(e){var r,n,i,a,s,u,c;try{const f={nextPage:null,lastPage:0,total:0},p=await xe(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=e==null?void 0:e.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(a=(i=e==null?void 0:e.perPage)===null||i===void 0?void 0:i.toString())!==null&&a!==void 0?a:""},xform:Tk});if(p.error)throw p.error;const h=await p.json(),g=(s=p.headers.get("x-total-count"))!==null&&s!==void 0?s:0,v=(c=(u=p.headers.get("link"))===null||u===void 0?void 0:u.split(","))!==null&&c!==void 0?c:[];return v.length>0&&(v.forEach(w=>{const x=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),y=JSON.parse(w.split(";")[1].split("=")[1]);f[`${y}Page`]=x}),f.total=parseInt(g)),{data:Object.assign(Object.assign({},h),f),error:null}}catch(f){if(he(f))return{data:{users:[]},error:f};throw f}}async getUserById(e){ri(e);try{return await xe(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:Qi})}catch(r){if(he(r))return{data:{user:null},error:r};throw r}}async updateUserById(e,r){ri(e);try{return await xe(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:r,headers:this.headers,xform:Qi})}catch(n){if(he(n))return{data:{user:null},error:n};throw n}}async deleteUser(e,r=!1){ri(e);try{return await xe(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:r},xform:Qi})}catch(n){if(he(n))return{data:{user:null},error:n};throw n}}async _listFactors(e){ri(e.userId);try{const{data:r,error:n}=await xe(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:r,error:n}}catch(r){if(he(r))return{data:null,error:r};throw r}}async _deleteFactor(e){ri(e.userId),ri(e.id);try{return{data:await xe(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(r){if(he(r))return{data:null,error:r};throw r}}async _listOAuthClients(e){var r,n,i,a,s,u,c;try{const f={nextPage:null,lastPage:0,total:0},p=await xe(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=e==null?void 0:e.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(a=(i=e==null?void 0:e.perPage)===null||i===void 0?void 0:i.toString())!==null&&a!==void 0?a:""},xform:Tk});if(p.error)throw p.error;const h=await p.json(),g=(s=p.headers.get("x-total-count"))!==null&&s!==void 0?s:0,v=(c=(u=p.headers.get("link"))===null||u===void 0?void 0:u.split(","))!==null&&c!==void 0?c:[];return v.length>0&&(v.forEach(w=>{const x=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),y=JSON.parse(w.split(";")[1].split("=")[1]);f[`${y}Page`]=x}),f.total=parseInt(g)),{data:Object.assign(Object.assign({},h),f),error:null}}catch(f){if(he(f))return{data:{clients:[]},error:f};throw f}}async _createOAuthClient(e){try{return await xe(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(he(r))return{data:null,error:r};throw r}}async _getOAuthClient(e){try{const r=this._encodePathSegment(e);return await xe(this.fetch,"GET",`${this.url}/admin/oauth/clients/${r}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(r){if(he(r))return{data:null,error:r};throw r}}async _updateOAuthClient(e,r){try{const n=this._encodePathSegment(e);return await xe(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${n}`,{body:r,headers:this.headers,xform:i=>({data:i,error:null})})}catch(n){if(he(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(e){try{const r=this._encodePathSegment(e);return await xe(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${r}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(he(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(e){try{const r=this._encodePathSegment(e);return await xe(this.fetch,"POST",`${this.url}/admin/oauth/clients/${r}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(r){if(he(r))return{data:null,error:r};throw r}}async _listCustomProviders(e){try{const r={};return e!=null&&e.type&&(r.type=e.type),await xe(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:r,xform:n=>{var i;return{data:{providers:(i=n==null?void 0:n.providers)!==null&&i!==void 0?i:[]},error:null}}})}catch(r){if(he(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(e){try{return await xe(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(he(r))return{data:null,error:r};throw r}}async _getCustomProvider(e){try{const r=this._encodePathSegment(e);return await xe(this.fetch,"GET",`${this.url}/admin/custom-providers/${r}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(r){if(he(r))return{data:null,error:r};throw r}}async _updateCustomProvider(e,r){try{const n=this._encodePathSegment(e);return await xe(this.fetch,"PUT",`${this.url}/admin/custom-providers/${n}`,{body:r,headers:this.headers,xform:i=>({data:i,error:null})})}catch(n){if(he(n))return{data:null,error:n};throw n}}async _deleteCustomProvider(e){try{const r=this._encodePathSegment(e);return await xe(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${r}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(he(r))return{data:null,error:r};throw r}}async _adminListPasskeys(e){mn(this.experimental),ri(e.userId);try{return await xe(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(he(r))return{data:null,error:r};throw r}}async _adminDeletePasskey(e){mn(this.experimental),ri(e.userId),ri(e.passkeyId);try{return await xe(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(he(r))return{data:null,error:r};throw r}}}function Ck(t={}){return{getItem:e=>t[e]||null,setItem:(e,r)=>{t[e]=r},removeItem:e=>{delete t[e]}}}const In={debug:!!(globalThis&&WR()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class VR extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class jk extends VR{}async function Oq(t,e,r){In.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,e);const n=new globalThis.AbortController;let i;e>0&&(i=setTimeout(()=>{n.abort(),In.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",t)},e)),await Promise.resolve();try{return await globalThis.navigator.locks.request(t,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async a=>{if(a){clearTimeout(i),In.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,a.name);try{return await r()}finally{In.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,a.name)}}else{if(e===0)throw In.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new jk(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(In.debug)try{const s=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(s,null," "))}catch(s){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",s)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(i),await r()}})}catch(a){if(e>0&&clearTimeout(i),a!==null&&typeof a=="object"&&"name"in a&&a.name==="AbortError"&&e>0){if(n.signal.aborted)return In.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",t),console.warn(`@supabase/gotrue-js: Lock "${t}" was not released within ${e}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(t,{mode:"exclusive",steal:!0},async s=>{if(s){In.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",t,s.name);try{return await r()}finally{In.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",t,s.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await r()}));throw In.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",t),new jk(`Lock "${t}" was released because another request stole it`)}throw a}}function Eq(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function KR(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function Aq(t){return parseInt(t,16)}function Pq(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,n=>n.toString(16).padStart(2,"0")).join("")}function Tq(t){var e;const{chainId:r,domain:n,expirationTime:i,issuedAt:a=new Date,nonce:s,notBefore:u,requestId:c,resources:f,scheme:p,uri:h,version:g}=t;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(s&&s.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${s}`);if(!h)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(g!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${g}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(`
184
+ `))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const v=KR(t.address),w=p?`${p}://${n}`:n,x=t.statement?`${t.statement}
185
+ `:"",y=`${w} wants you to sign in with your Ethereum account:
186
+ ${v}
187
+
188
+ ${x}`;let S=`URI: ${h}
189
+ Version: ${g}
190
+ Chain ID: ${r}${s?`
191
+ Nonce: ${s}`:""}
192
+ Issued At: ${a.toISOString()}`;if(i&&(S+=`
193
+ Expiration Time: ${i.toISOString()}`),u&&(S+=`
194
+ Not Before: ${u.toISOString()}`),c&&(S+=`
195
+ Request ID: ${c}`),f){let k=`
196
+ Resources:`;for(const E of f){if(!E||typeof E!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${E}`);k+=`
197
+ - ${E}`}S+=k}return`${y}
198
+ ${S}`}class At extends Error{constructor({message:e,code:r,cause:n,name:i}){var a;super(e,{cause:n}),this.__isWebAuthnError=!0,this.name=(a=i??(n instanceof Error?n.name:void 0))!==null&&a!==void 0?a:"Unknown Error",this.code=r}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class Jf extends At{constructor(e,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:e}),this.name="WebAuthnUnknownError",this.originalError=r}}function Cq({error:t,options:e}){var r,n,i;const{publicKey:a}=e;if(!a)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new At({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((r=a.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new At({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((n=a.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new At({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((i=a.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new At({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new At({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new At({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return a.pubKeyCredParams.filter(u=>u.type==="public-key").length===0?new At({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new At({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const s=window.location.hostname;if(GR(s)){if(a.rp.id!==s)return new At({message:`The RP ID "${a.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new At({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(a.user.id.byteLength<1||a.user.id.byteLength>64)return new At({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new At({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new At({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function jq({error:t,options:e}){const{publicKey:r}=e;if(!r)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new At({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new At({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const n=window.location.hostname;if(GR(n)){if(r.rpId!==n)return new At({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new At({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new At({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new At({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class Rq{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const h0=new Rq;function Rk(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:r,excludeCredentials:n}=t,i=ah(t,["challenge","user","excludeCredentials"]),a=Xo(e).buffer,s=Object.assign(Object.assign({},r),{id:Xo(r.id).buffer}),u=Object.assign(Object.assign({},i),{challenge:a,user:s});if(n&&n.length>0){u.excludeCredentials=new Array(n.length);for(let c=0;c<n.length;c++){const f=n[c];u.excludeCredentials[c]=Object.assign(Object.assign({},f),{id:Xo(f.id).buffer,type:f.type||"public-key",transports:f.transports})}}return u}function Ik(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:r}=t,n=ah(t,["challenge","allowCredentials"]),i=Xo(e).buffer,a=Object.assign(Object.assign({},n),{challenge:i});if(r&&r.length>0){a.allowCredentials=new Array(r.length);for(let s=0;s<r.length;s++){const u=r[s];a.allowCredentials[s]=Object.assign(Object.assign({},u),{id:Xo(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function $k(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t;return{id:t.id,rawId:t.id,response:{attestationObject:La(new Uint8Array(t.response.attestationObject)),clientDataJSON:La(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function Nk(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t,n=t.getClientExtensionResults(),i=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:La(new Uint8Array(i.authenticatorData)),clientDataJSON:La(new Uint8Array(i.clientDataJSON)),signature:La(new Uint8Array(i.signature)),userHandle:i.userHandle?La(new Uint8Array(i.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function GR(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function Qf(){var t,e;return!!(Jt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.get)=="function")}async function XR(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new Jf("Browser returned unexpected credential type",e)}:{data:null,error:new Jf("Empty credential response",e)}}catch(e){return{data:null,error:Cq({error:e,options:t})}}}async function YR(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new Jf("Browser returned unexpected credential type",e)}:{data:null,error:new Jf("Empty credential response",e)}}catch(e){return{data:null,error:jq({error:e,options:t})}}}const Iq={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},$q={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Zf(...t){const e=i=>i!==null&&typeof i=="object"&&!Array.isArray(i),r=i=>i instanceof ArrayBuffer||ArrayBuffer.isView(i),n={};for(const i of t)if(i)for(const a in i){const s=i[a];if(s!==void 0)if(Array.isArray(s))n[a]=s;else if(r(s))n[a]=s;else if(e(s)){const u=n[a];e(u)?n[a]=Zf(u,s):n[a]=Zf(s)}else n[a]=s}return n}function Nq(t,e){return Zf(Iq,t,e||{})}function Mq(t,e){return Zf($q,t,e||{})}class Lq{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:r,friendlyName:n,signal:i},a){var s;try{const{data:u,error:c}=await this.client.mfa.challenge({factorId:e,webauthn:r});if(!u)return{data:null,error:c};const f=i??h0.createNewAbortSignal();if(u.webauthn.type==="create"){const{user:p}=u.webauthn.credential_options.publicKey;if(!p.name){const h=n;if(h)p.name=`${p.id}:${h}`;else{const v=(await this.client.getUser()).data.user,w=((s=v==null?void 0:v.user_metadata)===null||s===void 0?void 0:s.name)||(v==null?void 0:v.email)||(v==null?void 0:v.id)||"User";p.name=`${p.id}:${w}`}}p.displayName||(p.displayName=p.name)}switch(u.webauthn.type){case"create":{const p=Nq(u.webauthn.credential_options.publicKey,a==null?void 0:a.create),{data:h,error:g}=await XR({publicKey:p,signal:f});return h?{data:{factorId:e,challengeId:u.id,webauthn:{type:u.webauthn.type,credential_response:h}},error:null}:{data:null,error:g}}case"request":{const p=Mq(u.webauthn.credential_options.publicKey,a==null?void 0:a.request),{data:h,error:g}=await YR(Object.assign(Object.assign({},u.webauthn.credential_options),{publicKey:p,signal:f}));return h?{data:{factorId:e,challengeId:u.id,webauthn:{type:u.webauthn.type,credential_response:h}},error:null}:{data:null,error:g}}}}catch(u){return he(u)?{data:null,error:u}:{data:null,error:new xn("Unexpected error in challenge",u)}}}async _verify({challengeId:e,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:e,webauthn:n})}async _authenticate({factorId:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:i}={}},a){if(!r)return{data:null,error:new ts("rpId is required for WebAuthn authentication")};try{if(!Qf())return{data:null,error:new xn("Browser does not support WebAuthn",null)};const{data:s,error:u}=await this.challenge({factorId:e,webauthn:{rpId:r,rpOrigins:n},signal:i},{request:a});if(!s)return{data:null,error:u};const{webauthn:c}=s;return this._verify({factorId:e,challengeId:s.challengeId,webauthn:{type:c.type,rpId:r,rpOrigins:n,credential_response:c.credential_response}})}catch(s){return he(s)?{data:null,error:s}:{data:null,error:new xn("Unexpected error in authenticate",s)}}}async _register({friendlyName:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:i}={}},a){if(!r)return{data:null,error:new ts("rpId is required for WebAuthn registration")};try{if(!Qf())return{data:null,error:new xn("Browser does not support WebAuthn",null)};const{data:s,error:u}=await this._enroll({friendlyName:e});if(!s)return await this.client.mfa.listFactors().then(p=>{var h;return(h=p.data)===null||h===void 0?void 0:h.all.find(g=>g.factor_type==="webauthn"&&g.friendly_name===e&&g.status!=="unverified")}).then(p=>p?this.client.mfa.unenroll({factorId:p==null?void 0:p.id}):void 0),{data:null,error:u};const{data:c,error:f}=await this._challenge({factorId:s.id,friendlyName:s.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:i},{create:a});return c?this._verify({factorId:s.id,challengeId:c.challengeId,webauthn:{rpId:r,rpOrigins:n,type:c.webauthn.type,credential_response:c.webauthn.credential_response}}):{data:null,error:f}}catch(s){return he(s)?{data:null,error:s}:{data:null,error:new xn("Unexpected error in register",s)}}}}Eq();const Dq={url:zU,storageKey:FU,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:WU,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};async function Mk(t,e,r){return await r()}const $o={};class su{get jwks(){var e,r;return(r=(e=$o[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(e){$o[this.storageKey]=Object.assign(Object.assign({},$o[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,r;return(r=(e=$o[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){$o[this.storageKey]=Object.assign(Object.assign({},$o[this.storageKey]),{cachedAt:e})}constructor(e){var r,n,i,a;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const s=Object.assign(Object.assign({},Dq),e);if(this.storageKey=s.storageKey,this.instanceID=(r=su.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,su.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!s.debug,typeof s.debug=="function"&&(this.logger=s.debug),this.instanceID>0&&Jt()){const u=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(u),this.logDebugMessages&&console.trace(u)}if(this.persistSession=s.persistSession,this.autoRefreshToken=s.autoRefreshToken,this.experimental=(n=s.experimental)!==null&&n!==void 0?n:{},this.admin=new kq({url:s.url,headers:s.headers,fetch:s.fetch,experimental:this.experimental}),this.url=s.url,this.headers=s.headers,this.fetch=HR(s.fetch),this.lock=s.lock||Mk,this.detectSessionInUrl=s.detectSessionInUrl,this.flowType=s.flowType,this.hasCustomAuthorizationHeader=s.hasCustomAuthorizationHeader,this.throwOnError=s.throwOnError,this.lockAcquireTimeout=s.lockAcquireTimeout,s.lock?this.lock=s.lock:this.persistSession&&Jt()&&(!((i=globalThis==null?void 0:globalThis.navigator)===null||i===void 0)&&i.locks)?this.lock=Oq:this.lock=Mk,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new Lq(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(s.storage?this.storage=s.storage:WR()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Ck(this.memoryStorage)),s.userStorage&&(this.userStorage=s.userStorage)):(this.memoryStorage={},this.storage=Ck(this.memoryStorage)),Jt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(u){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",u)}(a=this.broadcastChannel)===null||a===void 0||a.addEventListener("message",async u=>{this._debug("received broadcast notification from other tab or client",u);try{await this._notifyAllSubscribers(u.data.event,u.data.session,!1)}catch(c){this._debug("#broadcastChannel","error",c)}})}s.skipAutoInitialize||this.initialize().catch(u=>{this._debug("#initialize()","error",u)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${qR}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var e;try{let r={},n="none";if(Jt()&&(r=iq(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),Jt()&&this.detectSessionInUrl&&n!=="none"){const{data:i,error:a}=await this._getSessionFromURL(r,n);if(a){if(this._debug("#_initialize()","error detecting session from URL",a),XU(a)){const c=(e=a.details)===null||e===void 0?void 0:e.code;if(c==="identity_already_exists"||c==="identity_not_found"||c==="single_identity_not_deletable")return{error:a}}return{error:a}}const{session:s,redirectType:u}=i;return this._debug("#_initialize()","detected session in URL",s,"redirect type",u),await this._saveSession(s),setTimeout(async()=>{u==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",s):await this._notifyAllSubscribers("SIGNED_IN",s)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return he(r)?this._returnResult({error:r}):this._returnResult({error:new xn("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var r,n,i;try{const a=await xe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(i=e==null?void 0:e.options)===null||i===void 0?void 0:i.captchaToken}},xform:Qr}),{data:s,error:u}=a;if(u||!s)return this._returnResult({data:{user:null,session:null},error:u});const c=s.session,f=s.user;return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:f,session:c},error:null})}catch(a){if(he(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signUp(e){var r,n,i;try{let a;if("email"in e){const{email:p,password:h,options:g}=e;let v=null,w=null;this.flowType==="pkce"&&([v,w]=await Io(this.storage,this.storageKey)),a=await xe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:g==null?void 0:g.emailRedirectTo,body:{email:p,password:h,data:(r=g==null?void 0:g.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:g==null?void 0:g.captchaToken},code_challenge:v,code_challenge_method:w},xform:Qr})}else if("phone"in e){const{phone:p,password:h,options:g}=e;a=await xe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:p,password:h,data:(n=g==null?void 0:g.data)!==null&&n!==void 0?n:{},channel:(i=g==null?void 0:g.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:g==null?void 0:g.captchaToken}},xform:Qr})}else throw new xf("You must provide either an email or phone number and a password");const{data:s,error:u}=a;if(u||!s)return await Yt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:u});const c=s.session,f=s.user;return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:f,session:c},error:null})}catch(a){if(await Yt(this.storage,`${this.storageKey}-code-verifier`),he(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signInWithPassword(e){try{let r;if("email"in e){const{email:a,password:s,options:u}=e;r=await xe(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:a,password:s,gotrue_meta_security:{captcha_token:u==null?void 0:u.captchaToken}},xform:Pk})}else if("phone"in e){const{phone:a,password:s,options:u}=e;r=await xe(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:a,password:s,gotrue_meta_security:{captcha_token:u==null?void 0:u.captchaToken}},xform:Pk})}else throw new xf("You must provide either an email or phone number and a password");const{data:n,error:i}=r;if(i)return this._returnResult({data:{user:null,session:null},error:i});if(!n||!n.session||!n.user){const a=new Ro;return this._returnResult({data:{user:null,session:null},error:a})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:i})}catch(r){if(he(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(e){var r,n,i,a;return await this._handleProviderSignIn(e.provider,{redirectTo:(r=e.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=e.options)===null||n===void 0?void 0:n.scopes,queryParams:(i=e.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(a=e.options)===null||a===void 0?void 0:a.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:r}=e;switch(r){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(e){var r,n,i,a,s,u,c,f,p,h,g;let v,w;if("message"in e)v=e.message,w=e.signature;else{const{chain:x,wallet:y,statement:S,options:k}=e;let E;if(Jt())if(typeof y=="object")E=y;else{const M=window;if("ethereum"in M&&typeof M.ethereum=="object"&&"request"in M.ethereum&&typeof M.ethereum.request=="function")E=M.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof y!="object"||!(k!=null&&k.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");E=y}const P=new URL((r=k==null?void 0:k.url)!==null&&r!==void 0?r:window.location.href),O=await E.request({method:"eth_requestAccounts"}).then(M=>M).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!O||O.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const A=KR(O[0]);let C=(n=k==null?void 0:k.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!C){const M=await E.request({method:"eth_chainId"});C=Aq(M)}const R={domain:P.host,address:A,statement:S,uri:P.href,version:"1",chainId:C,nonce:(i=k==null?void 0:k.signInWithEthereum)===null||i===void 0?void 0:i.nonce,issuedAt:(s=(a=k==null?void 0:k.signInWithEthereum)===null||a===void 0?void 0:a.issuedAt)!==null&&s!==void 0?s:new Date,expirationTime:(u=k==null?void 0:k.signInWithEthereum)===null||u===void 0?void 0:u.expirationTime,notBefore:(c=k==null?void 0:k.signInWithEthereum)===null||c===void 0?void 0:c.notBefore,requestId:(f=k==null?void 0:k.signInWithEthereum)===null||f===void 0?void 0:f.requestId,resources:(p=k==null?void 0:k.signInWithEthereum)===null||p===void 0?void 0:p.resources};v=Tq(R),w=await E.request({method:"personal_sign",params:[Pq(v),A]})}try{const{data:x,error:y}=await xe(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:v,signature:w},!((h=e.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(g=e.options)===null||g===void 0?void 0:g.captchaToken}}:null),xform:Qr});if(y)throw y;if(!x||!x.session||!x.user){const S=new Ro;return this._returnResult({data:{user:null,session:null},error:S})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:y})}catch(x){if(he(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async signInWithSolana(e){var r,n,i,a,s,u,c,f,p,h,g,v;let w,x;if("message"in e)w=e.message,x=e.signature;else{const{chain:y,wallet:S,statement:k,options:E}=e;let P;if(Jt())if(typeof S=="object")P=S;else{const A=window;if("solana"in A&&typeof A.solana=="object"&&("signIn"in A.solana&&typeof A.solana.signIn=="function"||"signMessage"in A.solana&&typeof A.solana.signMessage=="function"))P=A.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof S!="object"||!(E!=null&&E.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");P=S}const O=new URL((r=E==null?void 0:E.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in P&&P.signIn){const A=await P.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},E==null?void 0:E.signInWithSolana),{version:"1",domain:O.host,uri:O.href}),k?{statement:k}:null));let C;if(Array.isArray(A)&&A[0]&&typeof A[0]=="object")C=A[0];else if(A&&typeof A=="object"&&"signedMessage"in A&&"signature"in A)C=A;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in C&&"signature"in C&&(typeof C.signedMessage=="string"||C.signedMessage instanceof Uint8Array)&&C.signature instanceof Uint8Array)w=typeof C.signedMessage=="string"?C.signedMessage:new TextDecoder().decode(C.signedMessage),x=C.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in P)||typeof P.signMessage!="function"||!("publicKey"in P)||typeof P!="object"||!P.publicKey||!("toBase58"in P.publicKey)||typeof P.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");w=[`${O.host} wants you to sign in with your Solana account:`,P.publicKey.toBase58(),...k?["",k,""]:[""],"Version: 1",`URI: ${O.href}`,`Issued At: ${(i=(n=E==null?void 0:E.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&i!==void 0?i:new Date().toISOString()}`,...!((a=E==null?void 0:E.signInWithSolana)===null||a===void 0)&&a.notBefore?[`Not Before: ${E.signInWithSolana.notBefore}`]:[],...!((s=E==null?void 0:E.signInWithSolana)===null||s===void 0)&&s.expirationTime?[`Expiration Time: ${E.signInWithSolana.expirationTime}`]:[],...!((u=E==null?void 0:E.signInWithSolana)===null||u===void 0)&&u.chainId?[`Chain ID: ${E.signInWithSolana.chainId}`]:[],...!((c=E==null?void 0:E.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${E.signInWithSolana.nonce}`]:[],...!((f=E==null?void 0:E.signInWithSolana)===null||f===void 0)&&f.requestId?[`Request ID: ${E.signInWithSolana.requestId}`]:[],...!((h=(p=E==null?void 0:E.signInWithSolana)===null||p===void 0?void 0:p.resources)===null||h===void 0)&&h.length?["Resources",...E.signInWithSolana.resources.map(C=>`- ${C}`)]:[]].join(`
199
+ `);const A=await P.signMessage(new TextEncoder().encode(w),"utf8");if(!A||!(A instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");x=A}}try{const{data:y,error:S}=await xe(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:w,signature:La(x)},!((g=e.options)===null||g===void 0)&&g.captchaToken?{gotrue_meta_security:{captcha_token:(v=e.options)===null||v===void 0?void 0:v.captchaToken}}:null),xform:Qr});if(S)throw S;if(!y||!y.session||!y.user){const k=new Ro;return this._returnResult({data:{user:null,session:null},error:k})}return y.session&&(await this._saveSession(y.session),await this._notifyAllSubscribers("SIGNED_IN",y.session)),this._returnResult({data:Object.assign({},y),error:S})}catch(y){if(he(y))return this._returnResult({data:{user:null,session:null},error:y});throw y}}async _exchangeCodeForSession(e){const r=await Pa(this.storage,`${this.storageKey}-code-verifier`),[n,i]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new YU;const{data:a,error:s}=await xe(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:n},xform:Qr});if(await Yt(this.storage,`${this.storageKey}-code-verifier`),s)throw s;if(!a||!a.session||!a.user){const u=new Ro;return this._returnResult({data:{user:null,session:null,redirectType:null},error:u})}return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers(i==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",a.session)),this._returnResult({data:Object.assign(Object.assign({},a),{redirectType:i??null}),error:s})}catch(a){if(await Yt(this.storage,`${this.storageKey}-code-verifier`),he(a))return this._returnResult({data:{user:null,session:null,redirectType:null},error:a});throw a}}async signInWithIdToken(e){try{const{options:r,provider:n,token:i,access_token:a,nonce:s}=e,u=await xe(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:i,access_token:a,nonce:s,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:Qr}),{data:c,error:f}=u;if(f)return this._returnResult({data:{user:null,session:null},error:f});if(!c||!c.session||!c.user){const p=new Ro;return this._returnResult({data:{user:null,session:null},error:p})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",c.session)),this._returnResult({data:c,error:f})}catch(r){if(he(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(e){var r,n,i,a,s;try{if("email"in e){const{email:u,options:c}=e;let f=null,p=null;this.flowType==="pkce"&&([f,p]=await Io(this.storage,this.storageKey));const{error:h}=await xe(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:u,data:(r=c==null?void 0:c.data)!==null&&r!==void 0?r:{},create_user:(n=c==null?void 0:c.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:f,code_challenge_method:p},redirectTo:c==null?void 0:c.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in e){const{phone:u,options:c}=e,{data:f,error:p}=await xe(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:u,data:(i=c==null?void 0:c.data)!==null&&i!==void 0?i:{},create_user:(a=c==null?void 0:c.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},channel:(s=c==null?void 0:c.channel)!==null&&s!==void 0?s:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:f==null?void 0:f.message_id},error:p})}throw new xf("You must provide either an email or phone number.")}catch(u){if(await Yt(this.storage,`${this.storageKey}-code-verifier`),he(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async verifyOtp(e){var r,n;try{let i,a;"options"in e&&(i=(r=e.options)===null||r===void 0?void 0:r.redirectTo,a=(n=e.options)===null||n===void 0?void 0:n.captchaToken);const{data:s,error:u}=await xe(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:a}}),redirectTo:i,xform:Qr});if(u)throw u;if(!s)throw new Error("An error occurred on token verification.");const c=s.session,f=s.user;return c!=null&&c.access_token&&(await this._saveSession(c),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c)),this._returnResult({data:{user:f,session:c},error:null})}catch(i){if(he(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithSSO(e){var r,n,i,a,s;try{let u=null,c=null;this.flowType==="pkce"&&([u,c]=await Io(this.storage,this.storageKey));const f=await xe(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(n=(r=e.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((i=e==null?void 0:e.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:u,code_challenge_method:c}),headers:this.headers,xform:xq});return!((a=f.data)===null||a===void 0)&&a.url&&Jt()&&!(!((s=e.options)===null||s===void 0)&&s.skipBrowserRedirect)&&window.location.assign(f.data.url),this._returnResult(f)}catch(u){if(await Yt(this.storage,`${this.storageKey}-code-verifier`),he(u))return this._returnResult({data:null,error:u});throw u}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)throw n;if(!r)throw new Ft;const{error:i}=await xe(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:i})})}catch(e){if(he(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{const r=`${this.url}/resend`;if("email"in e){const{email:n,type:i,options:a}=e,{error:s}=await xe(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},redirectTo:a==null?void 0:a.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:s})}else if("phone"in e){const{phone:n,type:i,options:a}=e,{data:s,error:u}=await xe(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:s==null?void 0:s.message_id},error:u})}throw new xf("You must provide either an email or phone number and a type")}catch(r){if(he(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async r=>r))}async _acquireLock(e,r){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),i=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await i}catch{}})()),i}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const i=[...this.pendingInLock];await Promise.all(i),this.pendingInLock.splice(0,i.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await e(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const r=await Pa(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?e=r:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};const n=e.expires_at?e.expires_at*1e3-Date.now()<qm:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",e.expires_at),!n){if(this.userStorage){const s=await Pa(this.userStorage,this.storageKey+"-user");s!=null&&s.user?e.user=s.user:e.user=Fm()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const s={value:this.suppressGetSessionWarning};e.user=vq(e.user,s),s.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:i,error:a}=await this._callRefreshToken(e.refresh_token);return a?this._returnResult({data:{session:null},error:a}):this._returnResult({data:{session:i},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;const r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(e){try{return e?await xe(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:Qi}):await this._useSession(async r=>{var n,i,a;const{data:s,error:u}=r;if(u)throw u;return!(!((n=s.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Ft}:await xe(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(a=(i=s.session)===null||i===void 0?void 0:i.access_token)!==null&&a!==void 0?a:void 0,xform:Qi})})}catch(r){if(he(r))return wf(r)&&(await this._removeSession(),await Yt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(e,r={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,r))}async _updateUser(e,r={}){try{return await this._useSession(async n=>{const{data:i,error:a}=n;if(a)throw a;if(!i.session)throw new Ft;const s=i.session;let u=null,c=null;this.flowType==="pkce"&&e.email!=null&&([u,c]=await Io(this.storage,this.storageKey));const{data:f,error:p}=await xe(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:u,code_challenge_method:c}),jwt:s.access_token,xform:Qi});if(p)throw p;return s.user=f.user,await this._saveSession(s),await this._notifyAllSubscribers("USER_UPDATED",s),this._returnResult({data:{user:s.user},error:null})})}catch(n){if(await Yt(this.storage,`${this.storageKey}-code-verifier`),he(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new Ft;const r=Date.now()/1e3;let n=r,i=!0,a=null;const{payload:s}=Sf(e.access_token);if(s.exp&&(n=s.exp,i=n<=r),i){const{data:u,error:c}=await this._callRefreshToken(e.refresh_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!u)return{data:{user:null,session:null},error:null};a=u}else{const{data:u,error:c}=await this._getUser(e.access_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});a={access_token:e.access_token,refresh_token:e.refresh_token,user:u.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(a),await this._notifyAllSubscribers("SIGNED_IN",a)}return this._returnResult({data:{user:a.user,session:a},error:null})}catch(r){if(he(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async r=>{var n;if(!e){const{data:s,error:u}=r;if(u)throw u;e=(n=s.session)!==null&&n!==void 0?n:void 0}if(!(e!=null&&e.refresh_token))throw new Ft;const{data:i,error:a}=await this._callRefreshToken(e.refresh_token);return a?this._returnResult({data:{user:null,session:null},error:a}):i?this._returnResult({data:{user:i.user,session:i},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(he(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(e,r){var n;try{if(!Jt())throw new _f("No browser detected.");if(e.error||e.error_description||e.error_code)throw new _f(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new xk("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new _f("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new xk("No code detected.");const{data:E,error:P}=await this._exchangeCodeForSession(e.code);if(P)throw P;const O=new URL(window.location.href);return O.searchParams.delete("code"),window.history.replaceState(window.history.state,"",O.toString()),{data:{session:E.session,redirectType:(n=E.redirectType)!==null&&n!==void 0?n:null},error:null}}const{provider_token:i,provider_refresh_token:a,access_token:s,refresh_token:u,expires_in:c,expires_at:f,token_type:p}=e;if(!s||!c||!u||!p)throw new _f("No session defined in URL");const h=Math.round(Date.now()/1e3),g=parseInt(c);let v=h+g;f&&(v=parseInt(f));const w=v-h;w*1e3<=Uo&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${w}s, should have been closer to ${g}s`);const x=v-g;h-x>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",x,v,h):h-x<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",x,v,h);const{data:y,error:S}=await this._getUser(s);if(S)throw S;const k={provider_token:i,provider_refresh_token:a,access_token:s,expires_in:g,expires_at:v,refresh_token:u,token_type:p,user:y.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:k,redirectType:e.type},error:null})}catch(i){if(he(i))return this._returnResult({data:{session:null,redirectType:null},error:i});throw i}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error_description)}async _isPKCECallback(e){const r=await Pa(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&r)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:i,error:a}=r;if(a&&!wf(a))return this._returnResult({error:a});const s=(n=i.session)===null||n===void 0?void 0:n.access_token;if(s){const{error:u}=await this.admin.signOut(s,e);if(u&&!(GU(u)&&(u.status===404||u.status===401||u.status===403)||wf(u)))return this._returnResult({error:u})}return e!=="others"&&(await this._removeSession(),await Yt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const r=nq(),n={id:r,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(e){return await this._useSession(async r=>{var n,i;try{const{data:{session:a},error:s}=r;if(s)throw s;await((n=this.stateChangeEmitters.get(e))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",a)),this._debug("INITIAL_SESSION","callback id",e,"session",a)}catch(a){await((i=this.stateChangeEmitters.get(e))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",a),wf(a)?console.warn(a):console.error(a)}})}async resetPasswordForEmail(e,r={}){let n=null,i=null;this.flowType==="pkce"&&([n,i]=await Io(this.storage,this.storageKey,!0));try{return await xe(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:i,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(a){if(await Yt(this.storage,`${this.storageKey}-code-verifier`),he(a))return this._returnResult({data:null,error:a});throw a}}async getUserIdentities(){var e;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(e=r.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var r;try{const{data:n,error:i}=await this._useSession(async a=>{var s,u,c,f,p;const{data:h,error:g}=a;if(g)throw g;const v=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(s=e.options)===null||s===void 0?void 0:s.redirectTo,scopes:(u=e.options)===null||u===void 0?void 0:u.scopes,queryParams:(c=e.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return await xe(this.fetch,"GET",v,{headers:this.headers,jwt:(p=(f=h.session)===null||f===void 0?void 0:f.access_token)!==null&&p!==void 0?p:void 0})});if(i)throw i;return Jt()&&!(!((r=e.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:e.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(he(n))return this._returnResult({data:{provider:e.provider,url:null},error:n});throw n}}async linkIdentityIdToken(e){return await this._useSession(async r=>{var n;try{const{error:i,data:{session:a}}=r;if(i)throw i;const{options:s,provider:u,token:c,access_token:f,nonce:p}=e,h=await xe(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=a==null?void 0:a.access_token)!==null&&n!==void 0?n:void 0,body:{provider:u,id_token:c,access_token:f,nonce:p,link_identity:!0,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},xform:Qr}),{data:g,error:v}=h;return v?this._returnResult({data:{user:null,session:null},error:v}):!g||!g.session||!g.user?this._returnResult({data:{user:null,session:null},error:new Ro}):(g.session&&(await this._saveSession(g.session),await this._notifyAllSubscribers("USER_UPDATED",g.session)),this._returnResult({data:g,error:v}))}catch(i){if(await Yt(this.storage,`${this.storageKey}-code-verifier`),he(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}})}async unlinkIdentity(e){try{return await this._useSession(async r=>{var n,i;const{data:a,error:s}=r;if(s)throw s;return await xe(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(i=(n=a.session)===null||n===void 0?void 0:n.access_token)!==null&&i!==void 0?i:void 0})})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(e){const r=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await sq(async i=>(i>0&&await oq(200*Math.pow(2,i-1)),this._debug(r,"refreshing attempt",i),await xe(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:Qr})),(i,a)=>{const s=200*Math.pow(2,i);return a&&zm(a)&&Date.now()+s-n<Uo})}catch(n){if(this._debug(r,"error",n),he(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",r,"url",n),Jt()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n},error:null}}async _recoverAndRefresh(){var e,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const i=await Pa(this.storage,this.storageKey);if(i&&this.userStorage){let s=await Pa(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!s&&(s={user:i.user},await qo(this.userStorage,this.storageKey+"-user",s)),i.user=(e=s==null?void 0:s.user)!==null&&e!==void 0?e:Fm()}else if(i&&!i.user&&!i.user){const s=await Pa(this.storage,this.storageKey+"-user");s&&(s!=null&&s.user)?(i.user=s.user,await Yt(this.storage,this.storageKey+"-user"),await qo(this.storage,this.storageKey,i)):i.user=Fm()}if(this._debug(n,"session from storage",i),!this._isValidSession(i)){this._debug(n,"session is not valid"),i!==null&&await this._removeSession();return}const a=((r=i.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<qm;if(this._debug(n,`session has${a?"":" not"} expired with margin of ${qm}s`),a){if(this.autoRefreshToken&&i.refresh_token){const{error:s}=await this._callRefreshToken(i.refresh_token);s&&(console.error(s),zm(s)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",s),await this._removeSession()))}}else if(i.user&&i.user.__isUserNotAvailableProxy===!0)try{const{data:s,error:u}=await this._getUser(i.access_token);!u&&(s!=null&&s.user)?(i.user=s.user,await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(s){console.error("Error getting user data:",s),this._debug(n,"error getting user data, skipping SIGNED_IN notification",s)}else await this._notifyAllSubscribers("SIGNED_IN",i)}catch(i){this._debug(n,"error",i),console.error(i);return}finally{this._debug(n,"end")}}async _callRefreshToken(e){var r,n;if(!e)throw new Ft;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const i=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(i,"begin");try{this.refreshingDeferred=new lh;const{data:a,error:s}=await this._refreshAccessToken(e);if(s)throw s;if(!a.session)throw new Ft;await this._saveSession(a.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",a.session);const u={data:a.session,error:null};return this.refreshingDeferred.resolve(u),u}catch(a){if(this._debug(i,"error",a),he(a)){const s={data:null,error:a};return zm(a)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(s),s}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(a),a}finally{this.refreshingDeferred=null,this._debug(i,"end")}}async _notifyAllSubscribers(e,r,n=!0){const i=`#_notifyAllSubscribers(${e})`;this._debug(i,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:e,session:r});const a=[],s=Array.from(this.stateChangeEmitters.values()).map(async u=>{try{await u.callback(e,r)}catch(c){a.push(c)}});if(await Promise.all(s),a.length>0){for(let u=0;u<a.length;u+=1)console.error(a[u]);throw a[0]}}finally{this._debug(i,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await Yt(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},e),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await qo(this.userStorage,this.storageKey+"-user",{user:r.user});const i=Object.assign({},r);delete i.user;const a=Ek(i);await qo(this.storage,this.storageKey,a)}else{const i=Ek(r);await qo(this.storage,this.storageKey,i)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Yt(this.storage,this.storageKey),await Yt(this.storage,this.storageKey+"-code-verifier"),await Yt(this.storage,this.storageKey+"-user"),this.userStorage&&await Yt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Jt()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Uo);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const i=Math.floor((n.expires_at*1e3-e)/Uo);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${Uo}ms, refresh threshold is ${u0} ticks`),i<=u0&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e instanceof VR)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Jt()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const r=`#_onVisibilityChanged(${e})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,r,n){const i=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&i.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&i.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[a,s]=await Io(this.storage,this.storageKey),u=new URLSearchParams({code_challenge:`${encodeURIComponent(a)}`,code_challenge_method:`${encodeURIComponent(s)}`});i.push(u.toString())}if(n!=null&&n.queryParams){const a=new URLSearchParams(n.queryParams);i.push(a.toString())}return n!=null&&n.skipBrowserRedirect&&i.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${e}?${i.join("&")}`}async _unenroll(e){try{return await this._useSession(async r=>{var n;const{data:i,error:a}=r;return a?this._returnResult({data:null,error:a}):await xe(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(e){try{return await this._useSession(async r=>{var n,i;const{data:a,error:s}=r;if(s)return this._returnResult({data:null,error:s});const u=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:c,error:f}=await xe(this.fetch,"POST",`${this.url}/factors`,{body:u,headers:this.headers,jwt:(n=a==null?void 0:a.session)===null||n===void 0?void 0:n.access_token});return f?this._returnResult({data:null,error:f}):(e.factorType==="totp"&&c.type==="totp"&&(!((i=c==null?void 0:c.totp)===null||i===void 0)&&i.qr_code)&&(c.totp.qr_code=`data:image/svg+xml;utf-8,${c.totp.qr_code}`),this._returnResult({data:c,error:null}))})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}async _verify(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:i,error:a}=r;if(a)return this._returnResult({data:null,error:a});const s=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?$k(e.webauthn.credential_response):Nk(e.webauthn.credential_response)})}:{code:e.code}),{data:u,error:c}=await xe(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:s,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return c?this._returnResult({data:null,error:c}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+u.expires_in},u)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",u),this._returnResult({data:u,error:c}))})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:i,error:a}=r;if(a)return this._returnResult({data:null,error:a});const s=await xe(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});if(s.error)return s;const{data:u}=s;if(u.type!=="webauthn")return{data:u,error:null};switch(u.webauthn.type){case"create":return{data:Object.assign(Object.assign({},u),{webauthn:Object.assign(Object.assign({},u.webauthn),{credential_options:Object.assign(Object.assign({},u.webauthn.credential_options),{publicKey:Rk(u.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},u),{webauthn:Object.assign(Object.assign({},u.webauthn),{credential_options:Object.assign(Object.assign({},u.webauthn.credential_options),{publicKey:Ik(u.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(e){const{data:r,error:n}=await this._challenge({factorId:e.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:e.factorId,challengeId:r.id,code:e.code})}async _listFactors(){var e;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const i={all:[],phone:[],totp:[],webauthn:[]};for(const a of(e=r==null?void 0:r.factors)!==null&&e!==void 0?e:[])i.all.push(a),a.status==="verified"&&i[a.factor_type].push(a);return{data:i,error:null}}async _getAuthenticatorAssuranceLevel(e){var r,n,i,a;if(e)try{const{payload:v}=Sf(e);let w=null;v.aal&&(w=v.aal);let x=w;const{data:{user:y},error:S}=await this.getUser(e);if(S)return this._returnResult({data:null,error:S});((n=(r=y==null?void 0:y.factors)===null||r===void 0?void 0:r.filter(P=>P.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(x="aal2");const E=v.amr||[];return{data:{currentLevel:w,nextLevel:x,currentAuthenticationMethods:E},error:null}}catch(v){if(he(v))return this._returnResult({data:null,error:v});throw v}const{data:{session:s},error:u}=await this.getSession();if(u)return this._returnResult({data:null,error:u});if(!s)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:c}=Sf(s.access_token);let f=null;c.aal&&(f=c.aal);let p=f;((a=(i=s.user.factors)===null||i===void 0?void 0:i.filter(v=>v.status==="verified"))!==null&&a!==void 0?a:[]).length>0&&(p="aal2");const g=c.amr||[];return{data:{currentLevel:f,nextLevel:p,currentAuthenticationMethods:g},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async r=>{const{data:{session:n},error:i}=r;return i?this._returnResult({data:null,error:i}):n?await xe(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:n.access_token,xform:a=>({data:a,error:null})}):this._returnResult({data:null,error:new Ft})})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(e,r){try{return await this._useSession(async n=>{const{data:{session:i},error:a}=n;if(a)return this._returnResult({data:null,error:a});if(!i)return this._returnResult({data:null,error:new Ft});const s=await xe(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"approve"},xform:u=>({data:u,error:null})});return s.data&&s.data.redirect_url&&Jt()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(s.data.redirect_url),s})}catch(n){if(he(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(e,r){try{return await this._useSession(async n=>{const{data:{session:i},error:a}=n;if(a)return this._returnResult({data:null,error:a});if(!i)return this._returnResult({data:null,error:new Ft});const s=await xe(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"deny"},xform:u=>({data:u,error:null})});return s.data&&s.data.redirect_url&&Jt()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(s.data.redirect_url),s})}catch(n){if(he(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;return n?this._returnResult({data:null,error:n}):r?await xe(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new Ft})})}catch(e){if(he(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async r=>{const{data:{session:n},error:i}=r;return i?this._returnResult({data:null,error:i}):n?(await xe(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Ft})})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(e,r={keys:[]}){let n=r.keys.find(u=>u.kid===e);if(n)return n;const i=Date.now();if(n=this.jwks.keys.find(u=>u.kid===e),n&&this.jwks_cached_at+VU>i)return n;const{data:a,error:s}=await xe(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(s)throw s;return!a.keys||a.keys.length===0||(this.jwks=a,this.jwks_cached_at=i,n=a.keys.find(u=>u.kid===e),!n)?null:n}async getClaims(e,r={}){try{let n=e;if(!n){const{data:v,error:w}=await this.getSession();if(w||!v.session)return this._returnResult({data:null,error:w});n=v.session.access_token}const{header:i,payload:a,signature:s,raw:{header:u,payload:c}}=Sf(n);r!=null&&r.allowExpired||pq(a.exp);const f=!i.alg||i.alg.startsWith("HS")||!i.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(i.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!f){const{error:v}=await this.getUser(n);if(v)throw v;return{data:{claims:a,header:i,signature:s},error:null}}const p=mq(i.alg),h=await crypto.subtle.importKey("jwk",f,p,!0,["verify"]);if(!await crypto.subtle.verify(p,h,s,tq(`${u}.${c}`)))throw new d0("Invalid JWT signature");return{data:{claims:a,header:i,signature:s},error:null}}catch(n){if(he(n))return this._returnResult({data:null,error:n});throw n}}async signInWithPasskey(e){var r,n,i;mn(this.experimental);try{if(!Qf())return this._returnResult({data:null,error:new xn("Browser does not support WebAuthn",null)});const{data:a,error:s}=await this._startPasskeyAuthentication({options:{captchaToken:(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.captchaToken}});if(s||!a)return this._returnResult({data:null,error:s});const u=Ik(a.options),c=(i=(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.signal)!==null&&i!==void 0?i:h0.createNewAbortSignal(),{data:f,error:p}=await YR({publicKey:u,signal:c});if(p||!f)return this._returnResult({data:null,error:p??new xn("WebAuthn ceremony failed",null)});const h=Nk(f);return this._verifyPasskeyAuthentication({challengeId:a.challenge_id,credential:h})}catch(a){if(he(a))return this._returnResult({data:null,error:a});throw a}}async registerPasskey(e){var r,n;mn(this.experimental);try{if(!Qf())return this._returnResult({data:null,error:new xn("Browser does not support WebAuthn",null)});const{data:i,error:a}=await this._startPasskeyRegistration();if(a||!i)return this._returnResult({data:null,error:a});const s=Rk(i.options),u=(n=(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.signal)!==null&&n!==void 0?n:h0.createNewAbortSignal(),{data:c,error:f}=await XR({publicKey:s,signal:u});if(f||!c)return this._returnResult({data:null,error:f??new xn("WebAuthn ceremony failed",null)});const p=$k(c);return this._verifyPasskeyRegistration({challengeId:i.challenge_id,credential:p})}catch(i){if(he(i))return this._returnResult({data:null,error:i});throw i}}async _startPasskeyRegistration(){mn(this.experimental);try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new Ft});const{data:i,error:a}=await xe(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:r.access_token,body:{}});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(e){if(he(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){mn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!n)return this._returnResult({data:null,error:new Ft});const{data:a,error:s}=await xe(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:n.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return s?this._returnResult({data:null,error:s}):this._returnResult({data:a,error:null})})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}async _startPasskeyAuthentication(e){var r;mn(this.experimental);try{const{data:n,error:i}=await xe(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.captchaToken}}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:n,error:null})}catch(n){if(he(n))return this._returnResult({data:null,error:n});throw n}}async _verifyPasskeyAuthentication(e){mn(this.experimental);try{const{data:r,error:n}=await xe(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:Qr});return n?this._returnResult({data:null,error:n}):(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:r,error:null}))}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}async _listPasskeys(){mn(this.experimental);try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)return this._returnResult({data:null,error:n});if(!r)return this._returnResult({data:null,error:new Ft});const{data:i,error:a}=await xe(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(e){if(he(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){mn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!n)return this._returnResult({data:null,error:new Ft});const{data:a,error:s}=await xe(this.fetch,"PATCH",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:n.access_token,body:{friendly_name:e.friendlyName}});return s?this._returnResult({data:null,error:s}):this._returnResult({data:a,error:null})})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}async _deletePasskey(e){mn(this.experimental);try{return await this._useSession(async r=>{const{data:{session:n},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!n)return this._returnResult({data:null,error:new Ft});const{error:a}=await xe(this.fetch,"DELETE",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:n.access_token,noResolveJson:!0});return a?this._returnResult({data:null,error:a}):this._returnResult({data:null,error:null})})}catch(r){if(he(r))return this._returnResult({data:null,error:r});throw r}}}su.nextInstanceID={};const Bq=su,Uq="2.106.2";let zl="";typeof Deno<"u"?zl="deno":typeof document<"u"?zl="web":typeof navigator<"u"&&navigator.product==="ReactNative"?zl="react-native":zl="node";const qq={"X-Client-Info":`supabase-js-${zl}/${Uq}`},zq={headers:qq},Fq={schema:"public"},Wq={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},Hq={},Vq={enabled:!1,respectSamplingDecision:!0};function Kq(t,e,r,n){function i(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function u(p){try{f(n.next(p))}catch(h){s(h)}}function c(p){try{f(n.throw(p))}catch(h){s(h)}}function f(p){p.done?a(p.value):i(p.value).then(u,c)}f((n=n.apply(t,[])).next())})}let Hm=null;const Gq="@opentelemetry/api";function Xq(){return Hm===null&&(Hm=import(Gq).catch(()=>null)),Hm}function Yq(){return Kq(this,void 0,void 0,function*(){try{const t=yield Xq();if(!t||!t.propagation||!t.context)return null;const e={};t.propagation.inject(t.context.active(),e);const r=e.traceparent;return r?{traceparent:r,tracestate:e.tracestate,baggage:e.baggage}:null}catch{return null}})}function Jq(t){if(!t||typeof t!="string")return null;const e=t.split("-");if(e.length!==4)return null;const[r,n,i,a]=e;if(r.length!==2||n.length!==32||i.length!==16||a.length!==2)return null;const s=/^[0-9a-f]+$/i;return!s.test(r)||!s.test(n)||!s.test(i)||!s.test(a)||n==="00000000000000000000000000000000"||i==="0000000000000000"?null:{version:r,traceId:n,parentId:i,traceFlags:a,isSampled:(parseInt(a,16)&1)===1}}function Qq(t,e){if(!t||!e||e.length===0)return!1;let r;if(t instanceof URL)r=t;else try{r=new URL(t)}catch{return!1}for(const n of e)try{if(typeof n=="string"){if(Zq(r.hostname,n))return!0}else if(n instanceof RegExp){if(n.test(r.hostname))return!0}else if(typeof n=="function"&&n(r))return!0}catch{continue}return!1}function Zq(t,e){if(e===t)return!0;if(e.startsWith("*.")){const r=e.slice(2);if(t.endsWith(r)&&(t===r||t.endsWith("."+r)))return!0}return!1}function e8(t){const e=[];try{const r=new URL(t);e.push(r.hostname)}catch{}return e.push("*.supabase.co","*.supabase.in"),e.push("localhost","127.0.0.1","[::1]"),e}function lu(t){"@babel/helpers - typeof";return lu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lu(t)}function t8(t,e){if(lu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(lu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function r8(t){var e=t8(t,"string");return lu(e)=="symbol"?e:e+""}function n8(t,e,r){return(e=r8(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Lk(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function yt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Lk(Object(r),!0).forEach(function(n){n8(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Lk(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}const i8=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),a8=()=>Headers,o8=(t,e,r,n,i)=>{const a=i8(n),s=a8(),u=(i==null?void 0:i.enabled)===!0,c=(i==null?void 0:i.respectSamplingDecision)!==!1,f=u?e8(e):null;return async(p,h)=>{var g;const v=(g=await r())!==null&&g!==void 0?g:t;let w=new s(h==null?void 0:h.headers);if(w.has("apikey")||w.set("apikey",t),w.has("Authorization")||w.set("Authorization",`Bearer ${v}`),f){const x=await s8(p,f,c);x&&(x.traceparent&&!w.has("traceparent")&&w.set("traceparent",x.traceparent),x.tracestate&&!w.has("tracestate")&&w.set("tracestate",x.tracestate),x.baggage&&!w.has("baggage")&&w.set("baggage",x.baggage))}return a(p,yt(yt({},h),{},{headers:w}))}};async function s8(t,e,r){if(!Qq(typeof t=="string"||t instanceof URL?t:t.url,e))return null;const n=await Yq();if(!n||!n.traceparent)return null;if(r){const i=Jq(n.traceparent);if(i&&!i.isSampled)return null}return n}function Dk(t){return typeof t=="boolean"?{enabled:t}:t}function l8(t){return t.endsWith("/")?t:t+"/"}function u8(t,e){var r,n,i,a,s,u;const{db:c,auth:f,realtime:p,global:h}=t,{db:g,auth:v,realtime:w,global:x}=e,y=Dk(t.tracePropagation),S=Dk(e.tracePropagation),k={db:yt(yt({},g),c),auth:yt(yt({},v),f),realtime:yt(yt({},w),p),storage:{},global:yt(yt(yt({},x),h),{},{headers:yt(yt({},(r=x==null?void 0:x.headers)!==null&&r!==void 0?r:{}),(n=h==null?void 0:h.headers)!==null&&n!==void 0?n:{})}),tracePropagation:{enabled:(i=(a=y==null?void 0:y.enabled)!==null&&a!==void 0?a:S==null?void 0:S.enabled)!==null&&i!==void 0?i:!1,respectSamplingDecision:(s=(u=y==null?void 0:y.respectSamplingDecision)!==null&&u!==void 0?u:S==null?void 0:S.respectSamplingDecision)!==null&&s!==void 0?s:!0},accessToken:async()=>""};return t.accessToken?k.accessToken=t.accessToken:delete k.accessToken,k}function c8(t){const e=t==null?void 0:t.trim();if(!e)throw new Error("supabaseUrl is required.");if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(l8(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var f8=class extends Bq{constructor(t){super(t)}},d8=class{constructor(t,e,r){var n,i;this.supabaseUrl=t,this.supabaseKey=e;const a=c8(t);if(!e)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",a),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",a),this.storageUrl=new URL("storage/v1",a),this.functionsUrl=new URL("functions/v1",a);const s=`sb-${a.hostname.split(".")[0]}-auth-token`,u={db:Fq,realtime:Hq,auth:yt(yt({},Wq),{},{storageKey:s}),global:zq,tracePropagation:Vq},c=u8(r??{},u);if(this.settings=c,this.storageKey=(n=c.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(i=c.global.headers)!==null&&i!==void 0?i:{},c.accessToken)this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(p,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}});else{var f;this.auth=this._initSupabaseAuthClient((f=c.auth)!==null&&f!==void 0?f:{},this.headers,c.global.fetch)}this.fetch=o8(e,t,this._getAccessToken.bind(this),c.global.fetch,c.tracePropagation),this.realtime=this._initRealtimeClient(yt({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},c.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(p=>this.realtime.setAuth(p)).catch(p=>console.warn("Failed to set initial Realtime auth token:",p)),this.rest=new P4(new URL("rest/v1",a).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch,timeout:c.db.timeout,urlLengthLimit:c.db.urlLengthLimit}),this.storage=new qU(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new y4(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,e={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,r)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t=this,e,r;if(t.accessToken)return await t.accessToken();const{data:n}=await t.auth.getSession();return(e=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:n,userStorage:i,storageKey:a,flowType:s,lock:u,debug:c,throwOnError:f,experimental:p,lockAcquireTimeout:h,skipAutoInitialize:g},v,w){const x={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new f8({url:this.authUrl.href,headers:yt(yt({},x),v),storageKey:a,autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:n,userStorage:i,flowType:s,lock:u,debug:c,throwOnError:f,experimental:p,fetch:w,lockAcquireTimeout:h,skipAutoInitialize:g,hasCustomAuthorizationHeader:Object.keys(this.headers).some(y=>y.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new cU(this.realtimeUrl.href,yt(yt({},t),{},{params:yt(yt({},{apikey:this.supabaseKey}),t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e==null?void 0:e.access_token)})}_handleTokenChanged(t,e,r){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const h8=(t,e,r)=>new d8(t,e,r);function p8(){if(typeof window<"u")return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const r=e.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}p8()&&console.warn("⚠️ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const m8="/api";let Fa=null;function g8(t){Fa=t}function v8(){return(Fa==null?void 0:Fa())??null}async function Tl(t,e){const r=Fa==null?void 0:Fa(),n={"Content-Type":"application/json",...e==null?void 0:e.headers};r&&(n.Authorization=`Bearer ${r}`);const i=await fetch(`${m8}${t}`,{...e,headers:n});if(!i.ok){const a=await i.json().catch(()=>({error:i.statusText}));throw new Error(a.error??`Request failed: ${i.status}`)}return i.json()}const Pt={get:t=>Tl(t),post:(t,e)=>Tl(t,{method:"POST",body:e?JSON.stringify(e):void 0}),patch:(t,e)=>Tl(t,{method:"PATCH",body:JSON.stringify(e)}),put:(t,e)=>Tl(t,{method:"PUT",body:JSON.stringify(e)}),delete:t=>Tl(t,{method:"DELETE"})},JR=$.createContext({session:null,supabase:null,loading:!0,signIn:async()=>({error:"Not initialized"}),signOut:async()=>{}});function QR(){return $.useContext(JR)}function y8({children:t}){const[e,r]=$.useState(null),[n,i]=$.useState(null),[a,s]=$.useState(!0),u=$.useRef(null);$.useEffect(()=>{u.current=n},[n]),$.useEffect(()=>{g8(()=>{var p;return((p=u.current)==null?void 0:p.access_token)??null})},[]),$.useEffect(()=>{Pt.get("/config").then(({config:p})=>{if(p.supabase.projectUrl&&p.supabase.anonKey){const h=h8(p.supabase.projectUrl,p.supabase.anonKey);r(h),h.auth.getSession().then(({data:v})=>{i(v.session),s(!1)});const{data:{subscription:g}}=h.auth.onAuthStateChange((v,w)=>{i(w)});return()=>g.unsubscribe()}s(!1)}).catch(()=>{s(!1)})},[]);async function c(p,h){if(!e)return{error:"Supabase not configured"};const{error:g}=await e.auth.signInWithPassword({email:p,password:h});return{error:(g==null?void 0:g.message)??null}}async function f(){e&&(await e.auth.signOut(),i(null))}return j.jsx(JR.Provider,{value:{session:n,supabase:e,loading:a,signIn:c,signOut:f},children:t})}function b8(t={}){const[e,r]=$.useState(!1),[n,i]=$.useState(null),a=$.useRef(null),s=$.useRef(t);s.current=t,$.useEffect(()=>{let f=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`;const p=v8();p&&(f+=`?token=${encodeURIComponent(p)}`);let h,g;function v(){h=new WebSocket(f),h.onopen=()=>{r(!0)},h.onmessage=w=>{var x,y,S,k,E,P,O,A;try{const C=JSON.parse(w.data);switch(C.type){case"connected":i(C.connectionId??null);break;case"delta":(y=(x=s.current).onDelta)==null||y.call(x,C.content??"");break;case"message":(k=(S=s.current).onMessage)==null||k.call(S,C.content??"");break;case"event":(P=(E=s.current).onEvent)==null||P.call(E,C);break;case"error":(A=(O=s.current).onError)==null||A.call(O,C.content??"Unknown error");break}}catch{}},h.onclose=()=>{r(!1),i(null),g=setTimeout(v,3e3)},h.onerror=()=>{h.close()},a.current=h}return v(),()=>{clearTimeout(g),h==null||h.close()}},[]);const u=$.useCallback((c,f="web")=>{var p;((p=a.current)==null?void 0:p.readyState)===WebSocket.OPEN&&a.current.send(JSON.stringify({type:"message",content:c,source:f}))},[]);return{connected:e,connectionId:n,sendMessage:u}}function Qw(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Za=Qw();function ZR(t){Za=t}var Na={exec:()=>null};function No(t){let e=[];return r=>{let n=Math.max(0,Math.min(3,r-1)),i=e[n];return i||(i=t(n),e[n]=i),i}}function qe(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(lr.caret,"$1"),r=r.replace(i,s),n},getRegex:()=>new RegExp(r,e)};return n}var w8=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),lr={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:No(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:No(t=>new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:No(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:No(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:No(t=>new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:No(t=>new RegExp(`^ {0,${t}}>`))},x8=/^(?:[ \t]*(?:\n|$))+/,_8=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,S8=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ku=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,k8=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Zw=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,e2=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,t2=qe(e2).replace(/bull/g,Zw).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),O8=qe(e2).replace(/bull/g,Zw).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ex=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,E8=/^[^\n]+/,tx=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,A8=qe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",tx).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),P8=qe(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Zw).getRegex(),uh="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",rx=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,T8=qe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",rx).replace("tag",uh).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),r2=qe(ex).replace("hr",Ku).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",uh).getRegex(),C8=qe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",r2).getRegex(),nx={blockquote:C8,code:_8,def:A8,fences:S8,heading:k8,hr:Ku,html:T8,lheading:t2,list:P8,newline:x8,paragraph:r2,table:Na,text:E8},Bk=qe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ku).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",uh).getRegex(),j8={...nx,lheading:O8,table:Bk,paragraph:qe(ex).replace("hr",Ku).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Bk).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",uh).getRegex()},R8={...nx,html:qe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",rx).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Na,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:qe(ex).replace("hr",Ku).replace("heading",` *#{1,6} *[^
200
+ ]`).replace("lheading",t2).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},I8=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,$8=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,n2=/^( {2,}|\\)\n(?!\s*$)/,N8=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Rs=/[\p{P}\p{S}]/u,ch=/[\s\p{P}\p{S}]/u,ix=/[^\s\p{P}\p{S}]/u,M8=qe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ch).getRegex(),i2=/(?!~)[\p{P}\p{S}]/u,L8=/(?!~)[\s\p{P}\p{S}]/u,D8=/(?:[^\s\p{P}\p{S}]|~)/u,B8=qe(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",w8?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),a2=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,U8=qe(a2,"u").replace(/punct/g,Rs).getRegex(),q8=qe(a2,"u").replace(/punct/g,i2).getRegex(),o2="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",z8=qe(o2,"gu").replace(/notPunctSpace/g,ix).replace(/punctSpace/g,ch).replace(/punct/g,Rs).getRegex(),F8=qe(o2,"gu").replace(/notPunctSpace/g,D8).replace(/punctSpace/g,L8).replace(/punct/g,i2).getRegex(),W8=qe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ix).replace(/punctSpace/g,ch).replace(/punct/g,Rs).getRegex(),H8=qe(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Rs).getRegex(),V8="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",K8=qe(V8,"gu").replace(/notPunctSpace/g,ix).replace(/punctSpace/g,ch).replace(/punct/g,Rs).getRegex(),G8=qe(/\\(punct)/,"gu").replace(/punct/g,Rs).getRegex(),X8=qe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Y8=qe(rx).replace("(?:-->|$)","-->").getRegex(),J8=qe("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Y8).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ed=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Q8=qe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",ed).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),s2=qe(/^!?\[(label)\]\[(ref)\]/).replace("label",ed).replace("ref",tx).getRegex(),l2=qe(/^!?\[(ref)\](?:\[\])?/).replace("ref",tx).getRegex(),Z8=qe("reflink|nolink(?!\\()","g").replace("reflink",s2).replace("nolink",l2).getRegex(),Uk=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ax={_backpedal:Na,anyPunctuation:G8,autolink:X8,blockSkip:B8,br:n2,code:$8,del:Na,delLDelim:Na,delRDelim:Na,emStrongLDelim:U8,emStrongRDelimAst:z8,emStrongRDelimUnd:W8,escape:I8,link:Q8,nolink:l2,punctuation:M8,reflink:s2,reflinkSearch:Z8,tag:J8,text:N8,url:Na},e5={...ax,link:qe(/^!?\[(label)\]\((.*?)\)/).replace("label",ed).getRegex(),reflink:qe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ed).getRegex()},p0={...ax,emStrongRDelimAst:F8,emStrongLDelim:q8,delLDelim:H8,delRDelim:K8,url:qe(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Uk).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:qe(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Uk).getRegex()},t5={...p0,br:qe(n2).replace("{2,}","*").getRegex(),text:qe(p0.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},kf={normal:nx,gfm:j8,pedantic:R8},Cl={normal:ax,gfm:p0,breaks:t5,pedantic:e5},r5={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},qk=t=>r5[t];function $n(t,e){if(e){if(lr.escapeTest.test(t))return t.replace(lr.escapeReplace,qk)}else if(lr.escapeTestNoEncode.test(t))return t.replace(lr.escapeReplaceNoEncode,qk);return t}function zk(t){try{t=encodeURI(t).replace(lr.percentDecode,"%")}catch{return null}return t}function Fk(t,e){var a;let r=t.replace(lr.findPipe,(s,u,c)=>{let f=!1,p=u;for(;--p>=0&&c[p]==="\\";)f=!f;return f?"|":" |"}),n=r.split(lr.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!((a=n.at(-1))!=null&&a.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(lr.slashPipe,"|");return n}function Gi(t,e,r){let n=t.length;if(n===0)return"";let i=0;for(;i<n&&t.charAt(n-i-1)===e;)i++;return t.slice(0,n-i)}function Wk(t){let e=t.split(`
201
+ `),r=e.length-1;for(;r>=0&&lr.blankLine.test(e[r]);)r--;return e.length-r<=2?t:e.slice(0,r+1).join(`
202
+ `)}function n5(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<t.length;n++)if(t[n]==="\\")n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return r>0?-2:-1}function i5(t,e=0){let r=e,n="";for(let i of t)if(i===" "){let a=4-r%4;n+=" ".repeat(a),r+=a}else n+=i,r++;return n}function Hk(t,e,r,n,i){let a=e.href,s=e.title||null,u=t[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;let c={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:s,text:u,tokens:n.inlineTokens(u)};return n.state.inLink=!1,c}function a5(t,e,r){let n=t.match(r.other.indentCodeCompensation);if(n===null)return e;let i=n[1];return e.split(`
203
+ `).map(a=>{let s=a.match(r.other.beginningSpace);if(s===null)return a;let[u]=s;return u.length>=i.length?a.slice(i.length):a}).join(`
204
+ `)}var td=class{constructor(t){Je(this,"options");Je(this,"rules");Je(this,"lexer");this.options=t||Za}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let r=this.options.pedantic?e[0]:Wk(e[0]),n=r.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r,codeBlockStyle:"indented",text:n}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let r=e[0],n=a5(r,e[3]||"",this.rules);return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let r=e[2].trim();if(this.rules.other.endingHash.test(r)){let n=Gi(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:Gi(e[0],`
205
+ `),depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:Gi(e[0],`
206
+ `)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let r=Gi(e[0],`
207
+ `).split(`
208
+ `),n="",i="",a=[];for(;r.length>0;){let s=!1,u=[],c;for(c=0;c<r.length;c++)if(this.rules.other.blockquoteStart.test(r[c]))u.push(r[c]),s=!0;else if(!s)u.push(r[c]);else break;r=r.slice(c);let f=u.join(`
209
+ `),p=f.replace(this.rules.other.blockquoteSetextReplace,`
210
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
211
+ ${f}`:f,i=i?`${i}
212
+ ${p}`:p;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,a,!0),this.lexer.state.top=h,r.length===0)break;let g=a.at(-1);if((g==null?void 0:g.type)==="code")break;if((g==null?void 0:g.type)==="blockquote"){let v=g,w=v.raw+`
213
+ `+r.join(`
214
+ `),x=this.blockquote(w);a[a.length-1]=x,n=n.substring(0,n.length-v.raw.length)+x.raw,i=i.substring(0,i.length-v.text.length)+x.text;break}else if((g==null?void 0:g.type)==="list"){let v=g,w=v.raw+`
215
+ `+r.join(`
216
+ `),x=this.list(w);a[a.length-1]=x,n=n.substring(0,n.length-g.raw.length)+x.raw,i=i.substring(0,i.length-v.raw.length)+x.raw,r=w.substring(a.at(-1).raw.length).split(`
217
+ `);continue}}return{type:"blockquote",raw:n,tokens:a,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim(),n=r.length>1,i={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let a=this.rules.other.listItemRegex(r),s=!1;for(;t;){let c=!1,f="",p="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;f=e[0],t=t.substring(f.length);let h=i5(e[2].split(`
218
+ `,1)[0],e[1].length),g=t.split(`
219
+ `,1)[0],v=!h.trim(),w=0;if(this.options.pedantic?(w=2,p=h.trimStart()):v?w=e[1].length+1:(w=h.search(this.rules.other.nonSpaceChar),w=w>4?1:w,p=h.slice(w),w+=e[1].length),v&&this.rules.other.blankLine.test(g)&&(f+=g+`
220
+ `,t=t.substring(g.length+1),c=!0),!c){let x=this.rules.other.nextBulletRegex(w),y=this.rules.other.hrRegex(w),S=this.rules.other.fencesBeginRegex(w),k=this.rules.other.headingBeginRegex(w),E=this.rules.other.htmlBeginRegex(w),P=this.rules.other.blockquoteBeginRegex(w);for(;t;){let O=t.split(`
221
+ `,1)[0],A;if(g=O,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),A=g):A=g.replace(this.rules.other.tabCharGlobal," "),S.test(g)||k.test(g)||E.test(g)||P.test(g)||x.test(g)||y.test(g))break;if(A.search(this.rules.other.nonSpaceChar)>=w||!g.trim())p+=`
222
+ `+A.slice(w);else{if(v||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||S.test(h)||k.test(h)||y.test(h))break;p+=`
223
+ `+g}v=!g.trim(),f+=O+`
224
+ `,t=t.substring(O.length+1),h=A.slice(w)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(s=!0)),i.items.push({type:"list_item",raw:f,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]}),i.raw+=f}let u=i.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let c of i.items){this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]);let f=c.tokens[0];if(c.task&&((f==null?void 0:f.type)==="text"||(f==null?void 0:f.type)==="paragraph")){c.text=c.text.replace(this.rules.other.listReplaceTask,""),f.raw=f.raw.replace(this.rules.other.listReplaceTask,""),f.text=f.text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}let p=this.rules.other.listTaskCheckbox.exec(c.raw);if(p){let h={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};c.checked=h.checked,i.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=h.raw+c.tokens[0].raw,c.tokens[0].text=h.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(h)):c.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):c.tokens.unshift(h)}}else c.task&&(c.task=!1);if(!i.loose){let p=c.tokens.filter(g=>g.type==="space"),h=p.length>0&&p.some(g=>this.rules.other.anyLine.test(g.raw));i.loose=h}}if(i.loose)for(let c of i.items){c.loose=!0;for(let f of c.tokens)f.type==="text"&&(f.type="paragraph")}return i}}html(t){let e=this.rules.block.html.exec(t);if(e){let r=Wk(e[0]);return{type:"html",block:!0,raw:r,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:r}}}def(t){let e=this.rules.block.def.exec(t);if(e){let r=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:r,raw:Gi(e[0],`
225
+ `),href:n,title:i}}}table(t){var s;let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let r=Fk(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(s=e[3])!=null&&s.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
226
+ `):[],a={type:"table",raw:Gi(e[0],`
227
+ `),header:[],align:[],rows:[]};if(r.length===n.length){for(let u of n)this.rules.other.tableAlignRight.test(u)?a.align.push("right"):this.rules.other.tableAlignCenter.test(u)?a.align.push("center"):this.rules.other.tableAlignLeft.test(u)?a.align.push("left"):a.align.push(null);for(let u=0;u<r.length;u++)a.header.push({text:r[u],tokens:this.lexer.inline(r[u]),header:!0,align:a.align[u]});for(let u of i)a.rows.push(Fk(u,a.header.length).map((c,f)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:a.align[f]})));return a}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e){let r=e[1].trim();return{type:"heading",raw:Gi(e[0],`
228
+ `),depth:e[2].charAt(0)==="="?1:2,text:r,tokens:this.lexer.inline(r)}}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let r=e[1].charAt(e[1].length-1)===`
229
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let a=Gi(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{let a=n5(e[2],"()");if(a===-2)return;if(a>-1){let s=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,s).trim(),e[3]=""}}let n=e[2],i="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(n);a&&(n=a[1],i=a[3])}else i=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),Hk(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[n.toLowerCase()];if(!i){let a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return Hk(r,i,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||!n[1]&&!n[2]&&!n[3]&&!n[4]||n[4]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[3])||!r||this.rules.inline.punctuation.exec(r))){let i=[...n[0]].length-1,a,s,u=i,c=0,f=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,e=e.slice(-1*t.length+i);(n=f.exec(e))!==null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(s=[...a].length,n[3]||n[4]){u+=s;continue}else if((n[5]||n[6])&&i%3&&!((i+s)%3)){c+=s;continue}if(u-=s,u>0)continue;s=Math.min(s,s+u+c);let p=[...n[0]][0].length,h=t.slice(0,i+n.index+p+s);if(Math.min(i,s)%2){let v=h.slice(1,-1);return{type:"em",raw:h,text:v,tokens:this.lexer.inlineTokens(v)}}let g=h.slice(2,-2);return{type:"strong",raw:h,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),i=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&i&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t,e,r=""){let n=this.rules.inline.delLDelim.exec(t);if(n&&(!n[1]||!r||this.rules.inline.punctuation.exec(r))){let i=[...n[0]].length-1,a,s,u=i,c=this.rules.inline.delRDelim;for(c.lastIndex=0,e=e.slice(-1*t.length+i);(n=c.exec(e))!==null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a||(s=[...a].length,s!==i))continue;if(n[3]||n[4]){u+=s;continue}if(u-=s,u>0)continue;s=Math.min(s,s+u);let f=[...n[0]][0].length,p=t.slice(0,i+n.index+f+s),h=p.slice(i,-i);return{type:"del",raw:p,text:h,tokens:this.lexer.inlineTokens(h)}}}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let r,n;return e[2]==="@"?(r=e[1],n="mailto:"+r):(r=e[1],n=r),{type:"link",raw:e[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(t){var r;let e;if(e=this.rules.inline.url.exec(t)){let n,i;if(e[2]==="@")n=e[0],i="mailto:"+n;else{let a;do a=e[0],e[0]=((r=this.rules.inline._backpedal.exec(e[0]))==null?void 0:r[0])??"";while(a!==e[0]);n=e[0],e[1]==="www."?i="http://"+e[0]:i=e[0]}return{type:"link",raw:e[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r}}}},bn=class m0{constructor(e){Je(this,"tokens");Je(this,"options");Je(this,"state");Je(this,"inlineQueue");Je(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Za,this.options.tokenizer=this.options.tokenizer||new td,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:lr,block:kf.normal,inline:Cl.normal};this.options.pedantic?(r.block=kf.pedantic,r.inline=Cl.pedantic):this.options.gfm&&(r.block=kf.gfm,this.options.breaks?r.inline=Cl.breaks:r.inline=Cl.gfm),this.tokenizer.rules=r}static get rules(){return{block:kf,inline:Cl}}static lex(e,r){return new m0(r).lex(e)}static lexInline(e,r){return new m0(r).inlineTokens(e)}lex(e){e=e.replace(lr.carriageReturn,`
230
+ `),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],n=!1){var a,s,u;this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(lr.tabCharGlobal," ").replace(lr.spaceLine,""));let i=1/0;for(;e;){if(e.length<i)i=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let c;if((s=(a=this.options.extensions)==null?void 0:a.block)!=null&&s.some(p=>(c=p.call({lexer:this},e,r))?(e=e.substring(c.raw.length),r.push(c),!0):!1))continue;if(c=this.tokenizer.space(e)){e=e.substring(c.raw.length);let p=r.at(-1);c.raw.length===1&&p!==void 0?p.raw+=`
231
+ `:r.push(c);continue}if(c=this.tokenizer.code(e)){e=e.substring(c.raw.length);let p=r.at(-1);(p==null?void 0:p.type)==="paragraph"||(p==null?void 0:p.type)==="text"?(p.raw+=(p.raw.endsWith(`
232
+ `)?"":`
233
+ `)+c.raw,p.text+=`
234
+ `+c.text,this.inlineQueue.at(-1).src=p.text):r.push(c);continue}if(c=this.tokenizer.fences(e)){e=e.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.heading(e)){e=e.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.hr(e)){e=e.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.blockquote(e)){e=e.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.list(e)){e=e.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.html(e)){e=e.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.def(e)){e=e.substring(c.raw.length);let p=r.at(-1);(p==null?void 0:p.type)==="paragraph"||(p==null?void 0:p.type)==="text"?(p.raw+=(p.raw.endsWith(`
235
+ `)?"":`
236
+ `)+c.raw,p.text+=`
237
+ `+c.raw,this.inlineQueue.at(-1).src=p.text):this.tokens.links[c.tag]||(this.tokens.links[c.tag]={href:c.href,title:c.title},r.push(c));continue}if(c=this.tokenizer.table(e)){e=e.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.lheading(e)){e=e.substring(c.raw.length),r.push(c);continue}let f=e;if((u=this.options.extensions)!=null&&u.startBlock){let p=1/0,h=e.slice(1),g;this.options.extensions.startBlock.forEach(v=>{g=v.call({lexer:this},h),typeof g=="number"&&g>=0&&(p=Math.min(p,g))}),p<1/0&&p>=0&&(f=e.substring(0,p+1))}if(this.state.top&&(c=this.tokenizer.paragraph(f))){let p=r.at(-1);n&&(p==null?void 0:p.type)==="paragraph"?(p.raw+=(p.raw.endsWith(`
238
+ `)?"":`
239
+ `)+c.raw,p.text+=`
240
+ `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=p.text):r.push(c),n=f.length!==e.length,e=e.substring(c.raw.length);continue}if(c=this.tokenizer.text(e)){e=e.substring(c.raw.length);let p=r.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=(p.raw.endsWith(`
241
+ `)?"":`
242
+ `)+c.raw,p.text+=`
243
+ `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=p.text):r.push(c);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){var f,p,h,g,v;this.tokenizer.lexer=this;let n=e,i=null;if(this.tokens.links){let w=Object.keys(this.tokens.links);if(w.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(n))!==null;)w.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(n))!==null;)n=n.slice(0,i.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(n))!==null;)a=i[2]?i[2].length:0,n=n.slice(0,i.index+a)+"["+"a".repeat(i[0].length-a-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=((p=(f=this.options.hooks)==null?void 0:f.emStrongMask)==null?void 0:p.call({lexer:this},n))??n;let s=!1,u="",c=1/0;for(;e;){if(e.length<c)c=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}s||(u=""),s=!1;let w;if((g=(h=this.options.extensions)==null?void 0:h.inline)!=null&&g.some(y=>(w=y.call({lexer:this},e,r))?(e=e.substring(w.raw.length),r.push(w),!0):!1))continue;if(w=this.tokenizer.escape(e)){e=e.substring(w.raw.length),r.push(w);continue}if(w=this.tokenizer.tag(e)){e=e.substring(w.raw.length),r.push(w);continue}if(w=this.tokenizer.link(e)){e=e.substring(w.raw.length),r.push(w);continue}if(w=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(w.raw.length);let y=r.at(-1);w.type==="text"&&(y==null?void 0:y.type)==="text"?(y.raw+=w.raw,y.text+=w.text):r.push(w);continue}if(w=this.tokenizer.emStrong(e,n,u)){e=e.substring(w.raw.length),r.push(w);continue}if(w=this.tokenizer.codespan(e)){e=e.substring(w.raw.length),r.push(w);continue}if(w=this.tokenizer.br(e)){e=e.substring(w.raw.length),r.push(w);continue}if(w=this.tokenizer.del(e,n,u)){e=e.substring(w.raw.length),r.push(w);continue}if(w=this.tokenizer.autolink(e)){e=e.substring(w.raw.length),r.push(w);continue}if(!this.state.inLink&&(w=this.tokenizer.url(e))){e=e.substring(w.raw.length),r.push(w);continue}let x=e;if((v=this.options.extensions)!=null&&v.startInline){let y=1/0,S=e.slice(1),k;this.options.extensions.startInline.forEach(E=>{k=E.call({lexer:this},S),typeof k=="number"&&k>=0&&(y=Math.min(y,k))}),y<1/0&&y>=0&&(x=e.substring(0,y+1))}if(w=this.tokenizer.inlineText(x)){e=e.substring(w.raw.length),w.raw.slice(-1)!=="_"&&(u=w.raw.slice(-1)),s=!0;let y=r.at(-1);(y==null?void 0:y.type)==="text"?(y.raw+=w.raw,y.text+=w.text):r.push(w);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return r}infiniteLoopError(e){let r="Infinite loop on byte: "+e;if(this.options.silent)console.error(r);else throw new Error(r)}},rd=class{constructor(e){Je(this,"options");Je(this,"parser");this.options=e||Za}space(e){return""}code({text:e,lang:r,escaped:n}){var s;let i=(s=(r||"").match(lr.notSpaceStart))==null?void 0:s[0],a=e.replace(lr.endingNewline,"")+`
244
+ `;return i?'<pre><code class="language-'+$n(i)+'">'+(n?a:$n(a,!0))+`</code></pre>
245
+ `:"<pre><code>"+(n?a:$n(a,!0))+`</code></pre>
246
+ `}blockquote({tokens:e}){return`<blockquote>
247
+ ${this.parser.parse(e)}</blockquote>
248
+ `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:r}){return`<h${r}>${this.parser.parseInline(e)}</h${r}>
249
+ `}hr(e){return`<hr>
250
+ `}list(e){let r=e.ordered,n=e.start,i="";for(let u=0;u<e.items.length;u++){let c=e.items[u];i+=this.listitem(c)}let a=r?"ol":"ul",s=r&&n!==1?' start="'+n+'"':"";return"<"+a+s+`>
251
+ `+i+"</"+a+`>
252
+ `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
253
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
254
+ `}table(e){let r="",n="";for(let a=0;a<e.header.length;a++)n+=this.tablecell(e.header[a]);r+=this.tablerow({text:n});let i="";for(let a=0;a<e.rows.length;a++){let s=e.rows[a];n="";for(let u=0;u<s.length;u++)n+=this.tablecell(s[u]);i+=this.tablerow({text:n})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
255
+ <thead>
256
+ `+r+`</thead>
257
+ `+i+`</table>
258
+ `}tablerow({text:e}){return`<tr>
259
+ ${e}</tr>
260
+ `}tablecell(e){let r=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+r+`</${n}>
261
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${$n(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:r,tokens:n}){let i=this.parser.parseInline(n),a=zk(e);if(a===null)return i;e=a;let s='<a href="'+e+'"';return r&&(s+=' title="'+$n(r)+'"'),s+=">"+i+"</a>",s}image({href:e,title:r,text:n,tokens:i}){i&&(n=this.parser.parseInline(i,this.parser.textRenderer));let a=zk(e);if(a===null)return $n(n);e=a;let s=`<img src="${e}" alt="${$n(n)}"`;return r&&(s+=` title="${$n(r)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:$n(e.text)}},ox=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},wn=class g0{constructor(e){Je(this,"options");Je(this,"renderer");Je(this,"textRenderer");this.options=e||Za,this.options.renderer=this.options.renderer||new rd,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ox}static parse(e,r){return new g0(r).parse(e)}static parseInline(e,r){return new g0(r).parseInline(e)}parse(e){var n,i;this.renderer.parser=this;let r="";for(let a=0;a<e.length;a++){let s=e[a];if((i=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&i[s.type]){let c=s,f=this.options.extensions.renderers[c.type].call({parser:this},c);if(f!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(c.type)){r+=f||"";continue}}let u=s;switch(u.type){case"space":{r+=this.renderer.space(u);break}case"hr":{r+=this.renderer.hr(u);break}case"heading":{r+=this.renderer.heading(u);break}case"code":{r+=this.renderer.code(u);break}case"table":{r+=this.renderer.table(u);break}case"blockquote":{r+=this.renderer.blockquote(u);break}case"list":{r+=this.renderer.list(u);break}case"checkbox":{r+=this.renderer.checkbox(u);break}case"html":{r+=this.renderer.html(u);break}case"def":{r+=this.renderer.def(u);break}case"paragraph":{r+=this.renderer.paragraph(u);break}case"text":{r+=this.renderer.text(u);break}default:{let c='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return r}parseInline(e,r=this.renderer){var i,a;this.renderer.parser=this;let n="";for(let s=0;s<e.length;s++){let u=e[s];if((a=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&a[u.type]){let f=this.options.extensions.renderers[u.type].call({parser:this},u);if(f!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(u.type)){n+=f||"";continue}}let c=u;switch(c.type){case"escape":{n+=r.text(c);break}case"html":{n+=r.html(c);break}case"link":{n+=r.link(c);break}case"image":{n+=r.image(c);break}case"checkbox":{n+=r.checkbox(c);break}case"strong":{n+=r.strong(c);break}case"em":{n+=r.em(c);break}case"codespan":{n+=r.codespan(c);break}case"br":{n+=r.br(c);break}case"del":{n+=r.del(c);break}case"text":{n+=r.text(c);break}default:{let f='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return n}},Uf,Fl=(Uf=class{constructor(e){Je(this,"options");Je(this,"block");this.options=e||Za}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?bn.lex:bn.lexInline}provideParser(e=this.block){return e?wn.parse:wn.parseInline}},Je(Uf,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Je(Uf,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Uf),o5=class{constructor(...t){Je(this,"defaults",Qw());Je(this,"options",this.setOptions);Je(this,"parse",this.parseMarkdown(!0));Je(this,"parseInline",this.parseMarkdown(!1));Je(this,"Parser",wn);Je(this,"Renderer",rd);Je(this,"TextRenderer",ox);Je(this,"Lexer",bn);Je(this,"Tokenizer",td);Je(this,"Hooks",Fl);this.use(...t)}walkTokens(t,e){var n,i;let r=[];for(let a of t)switch(r=r.concat(e.call(this,a)),a.type){case"table":{let s=a;for(let u of s.header)r=r.concat(this.walkTokens(u.tokens,e));for(let u of s.rows)for(let c of u)r=r.concat(this.walkTokens(c.tokens,e));break}case"list":{let s=a;r=r.concat(this.walkTokens(s.items,e));break}default:{let s=a;(i=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&i[s.type]?this.defaults.extensions.childTokens[s.type].forEach(u=>{let c=s[u].flat(1/0);r=r.concat(this.walkTokens(c,e))}):s.tokens&&(r=r.concat(this.walkTokens(s.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let a=e.renderers[i.name];a?e.renderers[i.name]=function(...s){let u=i.renderer.apply(this,s);return u===!1&&(u=a.apply(this,s)),u}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=e[i.level];a?a.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),n.extensions=e),r.renderer){let i=this.defaults.renderer||new rd(this.defaults);for(let a in r.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let s=a,u=r.renderer[s],c=i[s];i[s]=(...f)=>{let p=u.apply(i,f);return p===!1&&(p=c.apply(i,f)),p||""}}n.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new td(this.defaults);for(let a in r.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let s=a,u=r.tokenizer[s],c=i[s];i[s]=(...f)=>{let p=u.apply(i,f);return p===!1&&(p=c.apply(i,f)),p}}n.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new Fl;for(let a in r.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let s=a,u=r.hooks[s],c=i[s];Fl.passThroughHooks.has(a)?i[s]=f=>{if(this.defaults.async&&Fl.passThroughHooksRespectAsync.has(a))return(async()=>{let h=await u.call(i,f);return c.call(i,h)})();let p=u.call(i,f);return c.call(i,p)}:i[s]=(...f)=>{if(this.defaults.async)return(async()=>{let h=await u.apply(i,f);return h===!1&&(h=await c.apply(i,f)),h})();let p=u.apply(i,f);return p===!1&&(p=c.apply(i,f)),p}}n.hooks=i}if(r.walkTokens){let i=this.defaults.walkTokens,a=r.walkTokens;n.walkTokens=function(s){let u=[];return u.push(a.call(this,s)),i&&(u=u.concat(i.call(this,s))),u}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return bn.lex(t,e??this.defaults)}parser(t,e){return wn.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let n={...r},i={...this.defaults,...n},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&n.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=t),i.async)return(async()=>{let s=i.hooks?await i.hooks.preprocess(e):e,u=await(i.hooks?await i.hooks.provideLexer(t):t?bn.lex:bn.lexInline)(s,i),c=i.hooks?await i.hooks.processAllTokens(u):u;i.walkTokens&&await Promise.all(this.walkTokens(c,i.walkTokens));let f=await(i.hooks?await i.hooks.provideParser(t):t?wn.parse:wn.parseInline)(c,i);return i.hooks?await i.hooks.postprocess(f):f})().catch(a);try{i.hooks&&(e=i.hooks.preprocess(e));let s=(i.hooks?i.hooks.provideLexer(t):t?bn.lex:bn.lexInline)(e,i);i.hooks&&(s=i.hooks.processAllTokens(s)),i.walkTokens&&this.walkTokens(s,i.walkTokens);let u=(i.hooks?i.hooks.provideParser(t):t?wn.parse:wn.parseInline)(s,i);return i.hooks&&(u=i.hooks.postprocess(u)),u}catch(s){return a(s)}}}onError(t,e){return r=>{if(r.message+=`
262
+ Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+$n(r.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},Va=new o5;function Ve(t,e){return Va.parse(t,e)}Ve.options=Ve.setOptions=function(t){return Va.setOptions(t),Ve.defaults=Va.defaults,ZR(Ve.defaults),Ve};Ve.getDefaults=Qw;Ve.defaults=Za;Ve.use=function(...t){return Va.use(...t),Ve.defaults=Va.defaults,ZR(Ve.defaults),Ve};Ve.walkTokens=function(t,e){return Va.walkTokens(t,e)};Ve.parseInline=Va.parseInline;Ve.Parser=wn;Ve.parser=wn.parse;Ve.Renderer=rd;Ve.TextRenderer=ox;Ve.Lexer=bn;Ve.lexer=bn.lex;Ve.Tokenizer=td;Ve.Hooks=Fl;Ve.parse=Ve;Ve.options;Ve.setOptions;Ve.use;Ve.walkTokens;Ve.parseInline;wn.parse;bn.lex;function s5(){const[t,e]=$.useState([]),[r,n]=$.useState(""),[i,a]=$.useState(""),[s,u]=$.useState(!1),c=$.useRef(null),f=$.useRef(null);$.useEffect(()=>{Pt.get("/conversations?limit=50").then(S=>e(S.messages)).catch(()=>{})},[]);const p=$.useCallback(S=>{u(!0),a(S)},[]),h=$.useCallback(S=>{u(!1),a(""),e(k=>[...k,{id:crypto.randomUUID(),role:"assistant",content:S,timestamp:new Date().toISOString()}])},[]),g=$.useCallback(S=>{},[]),{connected:v,sendMessage:w}=b8({onDelta:p,onMessage:h,onEvent:g});$.useEffect(()=>{var S;(S=c.current)==null||S.scrollIntoView({behavior:"smooth"})},[t,i]);function x(){const S=r.trim();!S||s||(e(k=>[...k,{id:crypto.randomUUID(),role:"user",content:S,timestamp:new Date().toISOString()}]),n(""),w(S))}function y(S){S.key==="Enter"&&!S.shiftKey&&(S.preventDefault(),x())}return j.jsxs("div",{className:"flex flex-col h-full",children:[j.jsxs("header",{className:"h-14 flex items-center px-6 border-b border-[var(--color-border)] shrink-0",children:[j.jsx("h1",{className:"text-lg font-semibold gradient-text",children:"Chat"}),j.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[j.jsx("span",{className:`w-2 h-2 rounded-full ${v?"bg-[var(--color-success)]":"bg-[var(--color-destructive)]"}`}),j.jsx("span",{className:"text-xs text-[var(--color-muted-foreground)]",children:v?"Connected":"Disconnected"})]})]}),j.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-4 space-y-4",children:[t.map(S=>j.jsx(Vk,{message:S},S.id)),s&&j.jsx(Vk,{message:{id:"streaming",role:"assistant",content:i,timestamp:""}}),j.jsx("div",{ref:c})]}),j.jsx("div",{className:"px-6 pb-4 pt-2 border-t border-[var(--color-border)]",children:j.jsxs("div",{className:"glass-card flex items-end gap-2 p-3",children:[j.jsx("textarea",{ref:f,value:r,onChange:S=>n(S.target.value),onKeyDown:y,placeholder:"Message IO...",rows:1,className:"flex-1 bg-transparent resize-none outline-none text-sm text-[var(--color-foreground)] placeholder:text-[var(--color-muted)] max-h-32"}),j.jsx("button",{onClick:x,disabled:!r.trim()||s,className:"w-8 h-8 flex items-center justify-center rounded-lg bg-[var(--color-accent)] text-white disabled:opacity-40 transition-opacity hover:opacity-90",children:j.jsx(a4,{size:16})})]})})]})}function Vk({message:t}){if(t.role==="user")return j.jsx("div",{className:"flex justify-end",children:j.jsx("div",{className:"max-w-[70%] rounded-2xl rounded-br-md px-4 py-2.5 bg-[var(--color-accent)]/15 border border-[var(--color-accent)]/20",children:j.jsx("p",{className:"text-sm whitespace-pre-wrap",children:t.content})})});const r=Ve.parse(t.content);return j.jsx("div",{className:"flex justify-start",children:j.jsx("div",{className:"max-w-[80%] rounded-2xl rounded-bl-md px-4 py-2.5 glass-card",children:j.jsx("div",{className:"prose-io text-sm",dangerouslySetInnerHTML:{__html:r}})})})}function l5(){const[t,e]=$.useState([]),[r,n]=$.useState(null);$.useEffect(()=>{Pt.get("/inbox").then(a=>e(a.entries)).catch(()=>{})},[]);function i(a){n(a),a.status==="unread"&&Pt.post(`/inbox/${a.id}/read`).then(()=>{e(s=>s.map(u=>u.id===a.id?{...u,status:"read"}:u))}).catch(()=>{})}return j.jsxs("div",{className:"flex h-full",children:[j.jsxs("div",{className:"w-80 border-r border-[var(--color-border)] flex flex-col h-full",children:[j.jsx("header",{className:"h-14 flex items-center px-4 border-b border-[var(--color-border)] shrink-0",children:j.jsx("h1",{className:"text-lg font-semibold gradient-text",children:"Feed"})}),j.jsxs("div",{className:"flex-1 overflow-y-auto",children:[t.map(a=>j.jsxs("button",{onClick:()=>i(a),type:"button",className:`w-full text-left px-4 py-3 border-b border-[var(--color-border)] hover:bg-white/3 transition-colors ${(r==null?void 0:r.id)===a.id?"bg-white/5":""}`,children:[j.jsxs("div",{className:"flex items-center gap-2",children:[a.status==="unread"&&j.jsx("span",{className:"w-2 h-2 rounded-full bg-[var(--color-accent)] shrink-0"}),j.jsx("span",{className:"text-xs text-[var(--color-muted-foreground)] uppercase",children:a.kind})]}),j.jsx("p",{className:"text-sm font-medium mt-1 truncate",children:a.title}),j.jsx("p",{className:"text-xs text-[var(--color-muted-foreground)] mt-0.5",children:new Date(a.createdAt).toLocaleString()})]},a.id)),t.length===0&&j.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-[var(--color-muted-foreground)]",children:[j.jsx(ER,{size:32,className:"opacity-30 mb-2"}),j.jsx("p",{className:"text-sm",children:"No items yet"})]})]})]}),j.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:r?j.jsxs("div",{children:[j.jsx("h2",{className:"text-xl font-semibold mb-1",children:r.title}),j.jsxs("p",{className:"text-xs text-[var(--color-muted-foreground)] mb-4",children:[r.kind," · ",new Date(r.createdAt).toLocaleString()]}),j.jsx("div",{className:"prose-io",dangerouslySetInnerHTML:{__html:Ve.parse(r.content)}})]}):j.jsx("div",{className:"h-full flex items-center justify-center text-[var(--color-muted-foreground)]",children:"Select an item to view details"})})]})}function u5(){const{signIn:t}=QR(),[e,r]=$.useState(""),[n,i]=$.useState(""),[a,s]=$.useState(null),[u,c]=$.useState(!1);async function f(p){p.preventDefault(),s(null),c(!0);const{error:h}=await t(e,n);h&&s(h),c(!1)}return j.jsxs("div",{className:"min-h-screen flex items-center justify-center relative z-10",children:[j.jsx("div",{className:"orb orb-1"}),j.jsx("div",{className:"orb orb-2"}),j.jsx("div",{className:"orb orb-3"}),j.jsxs("div",{className:"glass-card p-8 w-full max-w-sm",children:[j.jsxs("div",{className:"text-center mb-6",children:[j.jsx("h1",{className:"text-2xl font-bold gradient-text",children:"IO"}),j.jsx("p",{className:"text-sm text-[var(--color-muted-foreground)] mt-1",children:"Sign in to your orchestrator"})]}),j.jsxs("form",{onSubmit:f,className:"space-y-4",children:[j.jsxs("div",{children:[j.jsx("label",{htmlFor:"email",className:"block text-sm font-medium mb-1.5",children:"Email"}),j.jsx("input",{id:"email",type:"email",value:e,onChange:p=>r(p.target.value),required:!0,className:"w-full px-3 py-2 rounded-md bg-[var(--color-input)] border border-[var(--color-border)] text-sm outline-none focus:border-[var(--color-accent)]"})]}),j.jsxs("div",{children:[j.jsx("label",{htmlFor:"password",className:"block text-sm font-medium mb-1.5",children:"Password"}),j.jsx("input",{id:"password",type:"password",value:n,onChange:p=>i(p.target.value),required:!0,className:"w-full px-3 py-2 rounded-md bg-[var(--color-input)] border border-[var(--color-border)] text-sm outline-none focus:border-[var(--color-accent)]"})]}),a&&j.jsx("p",{className:"text-sm text-[var(--color-destructive)]",children:a}),j.jsx("button",{type:"submit",disabled:u,className:"w-full py-2.5 rounded-md bg-[var(--color-accent)] text-white font-medium text-sm hover:opacity-90 transition-opacity disabled:opacity-50",children:u?"Signing in...":"Sign In"})]})]})]})}function c5(){const[t,e]=$.useState([]),[r,n]=$.useState("all"),[i,a]=$.useState(!1),[s,u]=$.useState({name:"",cron:"",prompt:"",targetType:"orchestrator"});$.useEffect(()=>{c()},[]);function c(){Pt.get("/schedules").then(v=>e(v.schedules)).catch(()=>{})}const f=t.filter(v=>r==="all"||v.targetType===r);async function p(){if(!(!s.name||!s.cron||!s.prompt))try{await Pt.post("/schedules",s),sr.success(`Schedule "${s.name}" created`),a(!1),u({name:"",cron:"",prompt:"",targetType:"orchestrator"}),c()}catch(v){sr.error(v instanceof Error?v.message:"Failed to create")}}async function h(v,w){try{await Pt.patch(`/schedules/${v}`,{enabled:!w}),c()}catch{sr.error("Failed to toggle schedule")}}async function g(v){try{await Pt.delete(`/schedules/${v}`),sr.success("Schedule deleted"),c()}catch{sr.error("Failed to delete")}}return j.jsxs("div",{className:"h-full overflow-y-auto p-6",children:[j.jsxs("header",{className:"flex items-center justify-between mb-6",children:[j.jsxs("div",{children:[j.jsx("h1",{className:"text-2xl font-bold gradient-text",children:"Schedules"}),j.jsx("p",{className:"text-sm text-[var(--color-muted-foreground)] mt-1",children:"Automated cron-based tasks"})]}),j.jsxs("button",{type:"button",onClick:()=>a(!0),className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-[var(--color-accent)] text-white text-sm hover:opacity-90",children:[j.jsx(Xw,{size:16})," New Schedule"]})]}),j.jsx("div",{className:"flex gap-1 mb-4 p-1 rounded-lg bg-white/3 w-fit",children:["all","orchestrator","squad"].map(v=>j.jsx("button",{type:"button",onClick:()=>n(v),className:`px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${r===v?"bg-white/10 text-[var(--color-foreground)]":"text-[var(--color-muted-foreground)]"}`,children:v==="all"?"All":v==="orchestrator"?"IO":"Squad"},v))}),i&&j.jsxs("div",{className:"glass-card p-4 mb-6 space-y-3",children:[j.jsx("h3",{className:"font-semibold",children:"New Schedule"}),j.jsx("input",{type:"text",placeholder:"Name",value:s.name,onChange:v=>u({...s,name:v.target.value}),className:"w-full px-3 py-2 rounded-md bg-[var(--color-input)] border border-[var(--color-border)] text-sm outline-none focus:border-[var(--color-accent)]"}),j.jsx("input",{type:"text",placeholder:"Cron expression (e.g. 0 9 * * 1-5)",value:s.cron,onChange:v=>u({...s,cron:v.target.value}),className:"w-full px-3 py-2 rounded-md bg-[var(--color-input)] border border-[var(--color-border)] text-sm outline-none focus:border-[var(--color-accent)] font-mono"}),j.jsx("textarea",{placeholder:"Prompt to execute",value:s.prompt,onChange:v=>u({...s,prompt:v.target.value}),rows:3,className:"w-full px-3 py-2 rounded-md bg-[var(--color-input)] border border-[var(--color-border)] text-sm outline-none focus:border-[var(--color-accent)] resize-none"}),j.jsxs("div",{className:"flex gap-2",children:[j.jsx("button",{type:"button",onClick:p,className:"px-3 py-1.5 rounded-md bg-[var(--color-accent)] text-white text-sm",children:"Create"}),j.jsx("button",{type:"button",onClick:()=>a(!1),className:"px-3 py-1.5 rounded-md bg-white/5 text-sm",children:"Cancel"})]})]}),j.jsx("div",{className:"space-y-2",children:f.map(v=>j.jsxs("div",{className:"glass-card p-4 flex items-center gap-4",children:[j.jsxs("div",{className:"flex-1",children:[j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx(Qb,{size:14,className:"text-[var(--color-accent)]"}),j.jsx("span",{className:"font-medium text-sm",children:v.name}),j.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-white/5 text-[var(--color-muted-foreground)]",children:v.targetType})]}),j.jsx("p",{className:"text-xs text-[var(--color-muted-foreground)] mt-1 font-mono",children:v.cron}),j.jsx("p",{className:"text-xs text-[var(--color-muted-foreground)] mt-0.5 truncate max-w-md",children:v.prompt})]}),j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx("button",{type:"button",onClick:()=>h(v.id,v.enabled),className:`p-1.5 rounded-md transition-colors ${v.enabled?"text-[var(--color-success)] hover:bg-[var(--color-success)]/10":"text-[var(--color-muted)] hover:bg-white/5"}`,title:v.enabled?"Pause":"Resume",children:v.enabled?j.jsx(t4,{size:14}):j.jsx(ZB,{size:14})}),j.jsx("button",{type:"button",onClick:()=>g(v.id),className:"p-1.5 rounded-md text-[var(--color-muted-foreground)] hover:text-[var(--color-destructive)] hover:bg-[var(--color-destructive)]/10 transition-colors",children:j.jsx(PR,{size:14})})]})]},v.id))}),f.length===0&&j.jsxs("div",{className:"text-center py-12 text-[var(--color-muted-foreground)]",children:[j.jsx(Qb,{size:48,className:"mx-auto mb-3 opacity-30"}),j.jsx("p",{children:"No schedules. Click New Schedule to create one."})]})]})}function f5(){const[t,e]=$.useState(null),[r,n]=$.useState("general"),[i,a]=$.useState(!1);$.useEffect(()=>{Pt.get("/config").then(f=>e(f.config)).catch(()=>{})},[]);function s(f){t&&(e({...t,...f}),a(!0))}async function u(){if(t)try{const{dataDir:f,...p}=t;await Pt.patch("/config",p),sr.success("Settings saved"),a(!1)}catch{sr.error("Failed to save settings")}}if(!t)return j.jsx("div",{className:"h-full flex items-center justify-center text-[var(--color-muted-foreground)]",children:"Loading..."});const c=[{id:"general",label:"General"},{id:"telegram",label:"Telegram"},{id:"auth",label:"Auth"},{id:"models",label:"Models"},{id:"advanced",label:"Advanced"}];return j.jsxs("div",{className:"h-full overflow-y-auto p-6",children:[j.jsxs("header",{className:"flex items-center justify-between mb-6",children:[j.jsxs("div",{children:[j.jsx("h1",{className:"text-2xl font-bold gradient-text",children:"Settings"}),j.jsx("p",{className:"text-sm text-[var(--color-muted-foreground)] mt-1",children:"Configure IO daemon behavior"})]}),i&&j.jsxs("button",{type:"button",onClick:u,className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-[var(--color-accent)] text-white text-sm hover:opacity-90",children:[j.jsx(AR,{size:16})," Save Changes"]})]}),j.jsx("div",{className:"flex gap-1 mb-6 p-1 rounded-lg bg-white/3 w-fit",children:c.map(f=>j.jsx("button",{type:"button",onClick:()=>n(f.id),className:`px-4 py-1.5 rounded-md text-sm font-medium transition-colors ${r===f.id?"bg-white/10 text-[var(--color-foreground)]":"text-[var(--color-muted-foreground)]"}`,children:f.label},f.id))}),j.jsxs("div",{className:"glass-card p-6 max-w-2xl",children:[r==="general"&&j.jsxs("div",{className:"space-y-4",children:[j.jsx(hn,{label:"Log Level",children:j.jsx("select",{value:t.logLevel,onChange:f=>s({logLevel:f.target.value}),className:"w-full px-3 py-2 rounded-md bg-[var(--color-input)] border border-[var(--color-border)] text-sm outline-none",children:["trace","debug","info","warn","error","fatal"].map(f=>j.jsx("option",{value:f,children:f},f))})}),j.jsx(hn,{label:"Default Model",children:j.jsx("input",{type:"text",value:t.defaultModel,onChange:f=>s({defaultModel:f.target.value}),className:"w-full px-3 py-2 rounded-md bg-[var(--color-input)] border border-[var(--color-border)] text-sm outline-none focus:border-[var(--color-accent)]"})}),j.jsx(hn,{label:"Max Instances Per Squad",children:j.jsx("input",{type:"number",value:t.maxInstancesPerSquad,onChange:f=>s({maxInstancesPerSquad:Number(f.target.value)}),className:"w-full px-3 py-2 rounded-md bg-[var(--color-input)] border border-[var(--color-border)] text-sm outline-none focus:border-[var(--color-accent)]",min:1,max:10})}),j.jsx(hn,{label:"API Port",children:j.jsx("input",{type:"number",value:t.apiPort,onChange:f=>s({apiPort:Number(f.target.value)}),className:"w-full px-3 py-2 rounded-md bg-[var(--color-input)] border border-[var(--color-border)] text-sm outline-none focus:border-[var(--color-accent)]"})})]}),r==="telegram"&&j.jsxs("div",{className:"space-y-4",children:[j.jsx(hn,{label:"Bot Token",children:j.jsx("input",{type:"password",value:t.telegram.botToken??"",onChange:f=>s({telegram:{...t.telegram,botToken:f.target.value||null}}),placeholder:"Enter Telegram bot token",className:"w-full px-3 py-2 rounded-md bg-[var(--color-input)] border border-[var(--color-border)] text-sm outline-none focus:border-[var(--color-accent)]"})}),j.jsx(hn,{label:"Allowed Chat IDs (comma-separated)",children:j.jsx("input",{type:"text",value:t.telegram.allowedChatIds.join(", "),onChange:f=>s({telegram:{...t.telegram,allowedChatIds:f.target.value.split(",").map(p=>Number(p.trim())).filter(p=>!Number.isNaN(p))}}),className:"w-full px-3 py-2 rounded-md bg-[var(--color-input)] border border-[var(--color-border)] text-sm outline-none focus:border-[var(--color-accent)] font-mono"})})]}),r==="auth"&&j.jsxs("div",{className:"space-y-4",children:[j.jsx(hn,{label:"Supabase Project URL",children:j.jsx("input",{type:"text",value:t.supabase.projectUrl??"",onChange:f=>s({supabase:{...t.supabase,projectUrl:f.target.value||null}}),placeholder:"https://your-project.supabase.co",className:"w-full px-3 py-2 rounded-md bg-[var(--color-input)] border border-[var(--color-border)] text-sm outline-none focus:border-[var(--color-accent)] font-mono"})}),j.jsx(hn,{label:"Supabase Anon Key",children:j.jsx("input",{type:"password",value:t.supabase.anonKey??"",onChange:f=>s({supabase:{...t.supabase,anonKey:f.target.value||null}}),placeholder:"eyJhbGciOiJIUzI1NiIs...",className:"w-full px-3 py-2 rounded-md bg-[var(--color-input)] border border-[var(--color-border)] text-sm outline-none focus:border-[var(--color-accent)] font-mono"})}),j.jsx(hn,{label:"JWT Secret",children:j.jsx("input",{type:"password",value:t.supabase.jwtSecret??"",onChange:f=>s({supabase:{...t.supabase,jwtSecret:f.target.value||null}}),placeholder:"your-jwt-secret",className:"w-full px-3 py-2 rounded-md bg-[var(--color-input)] border border-[var(--color-border)] text-sm outline-none focus:border-[var(--color-accent)] font-mono"})}),j.jsx("p",{className:"text-xs text-[var(--color-muted-foreground)]",children:"When configured, the web dashboard requires Supabase authentication to access. The JWT Secret is used to verify tokens server-side — find it in Supabase project settings → API → JWT Settings."})]}),r==="models"&&j.jsxs("div",{className:"space-y-4",children:[j.jsx(hn,{label:"Pricing Refresh Interval (hours)",children:j.jsx("input",{type:"number",value:t.pricing.refreshIntervalHours,onChange:f=>s({pricing:{refreshIntervalHours:Number(f.target.value)}}),className:"w-full px-3 py-2 rounded-md bg-[var(--color-input)] border border-[var(--color-border)] text-sm outline-none focus:border-[var(--color-accent)]",min:1})}),j.jsx("p",{className:"text-xs text-[var(--color-muted-foreground)]",children:"Model pricing is auto-refreshed from GitHub docs at this interval."})]}),r==="advanced"&&j.jsx("div",{className:"space-y-4",children:j.jsxs(hn,{label:"Data Directory",children:[j.jsx("input",{type:"text",value:t.dataDir,disabled:!0,className:"w-full px-3 py-2 rounded-md bg-[var(--color-input)] border border-[var(--color-border)] text-sm outline-none opacity-60 cursor-not-allowed font-mono"}),j.jsx("p",{className:"text-xs text-[var(--color-muted-foreground)] mt-1",children:"Cannot be changed while daemon is running."})]})})]})]})}function hn({label:t,children:e}){return j.jsxs("div",{children:[j.jsx("label",{className:"block text-sm font-medium text-[var(--color-foreground)] mb-1.5",children:t}),e]})}function d5(){const[t,e]=$.useState([]),[r,n]=$.useState(!1),[i,a]=$.useState(""),[s,u]=$.useState("");$.useEffect(()=>{c()},[]);function c(){Pt.get("/skills").then(h=>e(h.skills)).catch(()=>{})}async function f(){if(!(!s.trim()||!i.trim()))try{await Pt.post("/skills/install",{name:s,url:i}),sr.success(`Skill "${s}" installed`),n(!1),a(""),u(""),c()}catch(h){sr.error(h instanceof Error?h.message:"Install failed")}}async function p(h){try{await Pt.delete(`/skills/${h}`),sr.success(`Skill "${h}" removed`),c()}catch{sr.error("Failed to remove skill")}}return j.jsxs("div",{className:"h-full overflow-y-auto p-6",children:[j.jsxs("header",{className:"flex items-center justify-between mb-6",children:[j.jsxs("div",{children:[j.jsx("h1",{className:"text-2xl font-bold gradient-text",children:"Skills"}),j.jsx("p",{className:"text-sm text-[var(--color-muted-foreground)] mt-1",children:"Installed capabilities that extend IO"})]}),j.jsxs("button",{type:"button",onClick:()=>n(!0),className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-[var(--color-accent)] text-white text-sm hover:opacity-90 transition-opacity",children:[j.jsx(Xw,{size:16})," Install"]})]}),r&&j.jsxs("div",{className:"glass-card p-4 mb-6",children:[j.jsx("h3",{className:"font-semibold mb-3",children:"Install Skill"}),j.jsxs("div",{className:"space-y-3",children:[j.jsx("input",{type:"text",placeholder:"Skill name",value:s,onChange:h=>u(h.target.value),className:"w-full px-3 py-2 rounded-md bg-[var(--color-input)] border border-[var(--color-border)] text-sm outline-none focus:border-[var(--color-accent)]"}),j.jsx("input",{type:"text",placeholder:"URL to SKILL.md",value:i,onChange:h=>a(h.target.value),className:"w-full px-3 py-2 rounded-md bg-[var(--color-input)] border border-[var(--color-border)] text-sm outline-none focus:border-[var(--color-accent)]"}),j.jsxs("div",{className:"flex gap-2",children:[j.jsx("button",{type:"button",onClick:f,className:"px-3 py-1.5 rounded-md bg-[var(--color-accent)] text-white text-sm",children:"Install"}),j.jsx("button",{type:"button",onClick:()=>n(!1),className:"px-3 py-1.5 rounded-md bg-white/5 text-sm",children:"Cancel"})]})]})]}),j.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",children:t.map(h=>j.jsxs("div",{className:"glass-card p-4",children:[j.jsxs("div",{className:"flex items-start justify-between",children:[j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx(e0,{size:16,className:"text-[var(--color-accent)]"}),j.jsx("h3",{className:"font-medium text-sm",children:h.name})]}),j.jsx("button",{type:"button",onClick:()=>p(h.name),className:"text-[var(--color-muted-foreground)] hover:text-[var(--color-destructive)] transition-colors",children:j.jsx(PR,{size:14})})]}),j.jsx("p",{className:"text-xs text-[var(--color-muted-foreground)] mt-2 line-clamp-3",children:h.preview}),h.activatedForOrchestrator&&j.jsx("span",{className:"inline-block mt-2 text-xs px-2 py-0.5 rounded-full bg-[var(--color-success)]/10 text-[var(--color-success)]",children:"Active"})]},h.name))}),t.length===0&&!r&&j.jsxs("div",{className:"text-center py-12 text-[var(--color-muted-foreground)]",children:[j.jsx(e0,{size:48,className:"mx-auto mb-3 opacity-30"}),j.jsx("p",{children:"No skills installed. Click Install to add one."})]})]})}function Kk(){const{name:t}=yD();return t?j.jsx(p5,{name:t}):j.jsx(h5,{})}function h5(){const[t,e]=$.useState([]);return $.useEffect(()=>{Pt.get("/squads").then(r=>e(r.squads)).catch(()=>{})},[]),j.jsxs("div",{className:"h-full overflow-y-auto p-6",children:[j.jsxs("header",{className:"mb-6",children:[j.jsx("h1",{className:"text-2xl font-bold gradient-text",children:"Squads"}),j.jsx("p",{className:"text-sm text-[var(--color-muted-foreground)] mt-1",children:"Active teams working on your projects"})]}),j.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",children:[t.map(r=>j.jsxs("a",{href:`/squads/${r.name}`,className:"glass-card p-5 hover:border-[var(--color-accent)]/30 transition-colors block",children:[j.jsxs("div",{className:"flex items-start justify-between mb-3",children:[j.jsxs("div",{children:[j.jsx("h3",{className:"font-semibold text-[var(--color-foreground)]",children:r.name}),j.jsx("p",{className:"text-xs text-[var(--color-muted-foreground)]",children:r.universe})]}),j.jsx(v0,{status:r.status})]}),j.jsxs("div",{className:"flex items-center gap-4 text-xs text-[var(--color-muted-foreground)]",children:[j.jsxs("span",{className:"flex items-center gap-1",children:[j.jsx(Zb,{size:12})," ",r.memberCount," members"]}),j.jsxs("span",{className:"flex items-center gap-1",children:[j.jsx(UB,{size:12})," ",r.activeInstances," active"]})]}),r.repoUrl&&j.jsxs("div",{className:"mt-3 flex items-center gap-1 text-xs text-[var(--color-muted-foreground)]",children:[j.jsx(VB,{size:11}),j.jsx("span",{className:"truncate",children:r.repoUrl})]})]},r.id)),t.length===0&&j.jsxs("div",{className:"col-span-full text-center py-12 text-[var(--color-muted-foreground)]",children:[j.jsx(Zb,{size:48,className:"mx-auto mb-3 opacity-30"}),j.jsx("p",{children:"No squads hired yet. Ask IO to hire a squad for a project."})]})]})]})}function p5({name:t}){const[e,r]=$.useState(null);return $.useEffect(()=>{Pt.get(`/squads/${t}`).then(r).catch(()=>{})},[t]),e?j.jsxs("div",{className:"h-full overflow-y-auto p-6",children:[j.jsxs("header",{className:"mb-6",children:[j.jsx("h1",{className:"text-2xl font-bold gradient-text",children:e.squad.name}),j.jsxs("p",{className:"text-sm text-[var(--color-muted-foreground)]",children:[e.squad.universe," · ",e.squad.autonomyTier," autonomy"]})]}),j.jsxs("section",{className:"mb-8",children:[j.jsx("h2",{className:"text-lg font-semibold mb-3",children:"Team Members"}),j.jsx("div",{className:"grid gap-3",children:e.members.map(n=>j.jsxs("div",{className:"glass-card p-4 flex items-center gap-4",children:[j.jsxs("div",{className:"flex-1",children:[j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx("span",{className:"font-medium",children:n.displayName}),j.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-white/5 text-[var(--color-muted-foreground)]",children:n.role}),n.veto&&j.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-[var(--color-warning)]/10 text-[var(--color-warning)]",children:"veto"})]}),n.persona&&j.jsx("p",{className:"text-xs text-[var(--color-muted-foreground)] mt-1",children:n.persona}),n.currentTask&&j.jsxs("p",{className:"text-xs text-[var(--color-accent)] mt-1",children:["⚡ ",n.currentTask]})]}),j.jsx(v0,{status:n.status})]},n.id))})]}),e.instances.length>0&&j.jsxs("section",{children:[j.jsx("h2",{className:"text-lg font-semibold mb-3",children:"Instances"}),j.jsx("div",{className:"grid gap-3",children:e.instances.map(n=>j.jsxs("div",{className:"glass-card p-4",children:[j.jsxs("div",{className:"flex items-center justify-between",children:[j.jsxs("div",{children:[j.jsx("span",{className:"font-mono text-xs",children:n.id.slice(0,8)}),n.issueRef&&j.jsx("span",{className:"ml-2 text-xs text-[var(--color-accent)]",children:n.issueRef})]}),j.jsx(v0,{status:n.status})]}),j.jsxs("div",{className:"mt-2 text-xs text-[var(--color-muted-foreground)]",children:["Tasks: ",n.tasksComplete,"/",n.taskCount," complete",n.branch&&j.jsxs("span",{className:"ml-3",children:["Branch: ",n.branch]})]})]},n.id))})]})]}):j.jsx("div",{className:"h-full flex items-center justify-center text-[var(--color-muted-foreground)]",children:"Loading..."})}function v0({status:t}){const e={active:"bg-[var(--color-success)]/10 text-[var(--color-success)]",working:"bg-[var(--color-info)]/10 text-[var(--color-info)]",idle:"bg-white/5 text-[var(--color-muted-foreground)]",reviewing:"bg-[var(--color-warning)]/10 text-[var(--color-warning)]",complete:"bg-[var(--color-success)]/10 text-[var(--color-success)]",failed:"bg-[var(--color-destructive)]/10 text-[var(--color-destructive)]",planning:"bg-[var(--color-info)]/10 text-[var(--color-info)]",meeting:"bg-[var(--color-warning)]/10 text-[var(--color-warning)]"};return j.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${e[t]??e.idle}`,children:t})}var Vm,Gk;function Or(){if(Gk)return Vm;Gk=1;var t=Array.isArray;return Vm=t,Vm}var Km,Xk;function u2(){if(Xk)return Km;Xk=1;var t=typeof cf=="object"&&cf&&cf.Object===Object&&cf;return Km=t,Km}var Gm,Yk;function Wn(){if(Yk)return Gm;Yk=1;var t=u2(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return Gm=r,Gm}var Xm,Jk;function Gu(){if(Jk)return Xm;Jk=1;var t=Wn(),e=t.Symbol;return Xm=e,Xm}var Ym,Qk;function m5(){if(Qk)return Ym;Qk=1;var t=Gu(),e=Object.prototype,r=e.hasOwnProperty,n=e.toString,i=t?t.toStringTag:void 0;function a(s){var u=r.call(s,i),c=s[i];try{s[i]=void 0;var f=!0}catch{}var p=n.call(s);return f&&(u?s[i]=c:delete s[i]),p}return Ym=a,Ym}var Jm,Zk;function g5(){if(Zk)return Jm;Zk=1;var t=Object.prototype,e=t.toString;function r(n){return e.call(n)}return Jm=r,Jm}var Qm,eO;function yi(){if(eO)return Qm;eO=1;var t=Gu(),e=m5(),r=g5(),n="[object Null]",i="[object Undefined]",a=t?t.toStringTag:void 0;function s(u){return u==null?u===void 0?i:n:a&&a in Object(u)?e(u):r(u)}return Qm=s,Qm}var Zm,tO;function bi(){if(tO)return Zm;tO=1;function t(e){return e!=null&&typeof e=="object"}return Zm=t,Zm}var eg,rO;function Is(){if(rO)return eg;rO=1;var t=yi(),e=bi(),r="[object Symbol]";function n(i){return typeof i=="symbol"||e(i)&&t(i)==r}return eg=n,eg}var tg,nO;function sx(){if(nO)return tg;nO=1;var t=Or(),e=Is(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,s){if(t(a))return!1;var u=typeof a;return u=="number"||u=="symbol"||u=="boolean"||a==null||e(a)?!0:n.test(a)||!r.test(a)||s!=null&&a in Object(s)}return tg=i,tg}var rg,iO;function na(){if(iO)return rg;iO=1;function t(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}return rg=t,rg}var ng,aO;function lx(){if(aO)return ng;aO=1;var t=yi(),e=na(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function s(u){if(!e(u))return!1;var c=t(u);return c==n||c==i||c==r||c==a}return ng=s,ng}var ig,oO;function v5(){if(oO)return ig;oO=1;var t=Wn(),e=t["__core-js_shared__"];return ig=e,ig}var ag,sO;function y5(){if(sO)return ag;sO=1;var t=v5(),e=(function(){var n=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!e&&e in n}return ag=r,ag}var og,lO;function c2(){if(lO)return og;lO=1;var t=Function.prototype,e=t.toString;function r(n){if(n!=null){try{return e.call(n)}catch{}try{return n+""}catch{}}return""}return og=r,og}var sg,uO;function b5(){if(uO)return sg;uO=1;var t=lx(),e=y5(),r=na(),n=c2(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,s=Function.prototype,u=Object.prototype,c=s.toString,f=u.hasOwnProperty,p=RegExp("^"+c.call(f).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(g){if(!r(g)||e(g))return!1;var v=t(g)?p:a;return v.test(n(g))}return sg=h,sg}var lg,cO;function w5(){if(cO)return lg;cO=1;function t(e,r){return e==null?void 0:e[r]}return lg=t,lg}var ug,fO;function eo(){if(fO)return ug;fO=1;var t=b5(),e=w5();function r(n,i){var a=e(n,i);return t(a)?a:void 0}return ug=r,ug}var cg,dO;function fh(){if(dO)return cg;dO=1;var t=eo(),e=t(Object,"create");return cg=e,cg}var fg,hO;function x5(){if(hO)return fg;hO=1;var t=fh();function e(){this.__data__=t?t(null):{},this.size=0}return fg=e,fg}var dg,pO;function _5(){if(pO)return dg;pO=1;function t(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}return dg=t,dg}var hg,mO;function S5(){if(mO)return hg;mO=1;var t=fh(),e="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(a){var s=this.__data__;if(t){var u=s[a];return u===e?void 0:u}return n.call(s,a)?s[a]:void 0}return hg=i,hg}var pg,gO;function k5(){if(gO)return pg;gO=1;var t=fh(),e=Object.prototype,r=e.hasOwnProperty;function n(i){var a=this.__data__;return t?a[i]!==void 0:r.call(a,i)}return pg=n,pg}var mg,vO;function O5(){if(vO)return mg;vO=1;var t=fh(),e="__lodash_hash_undefined__";function r(n,i){var a=this.__data__;return this.size+=this.has(n)?0:1,a[n]=t&&i===void 0?e:i,this}return mg=r,mg}var gg,yO;function E5(){if(yO)return gg;yO=1;var t=x5(),e=_5(),r=S5(),n=k5(),i=O5();function a(s){var u=-1,c=s==null?0:s.length;for(this.clear();++u<c;){var f=s[u];this.set(f[0],f[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,gg=a,gg}var vg,bO;function A5(){if(bO)return vg;bO=1;function t(){this.__data__=[],this.size=0}return vg=t,vg}var yg,wO;function ux(){if(wO)return yg;wO=1;function t(e,r){return e===r||e!==e&&r!==r}return yg=t,yg}var bg,xO;function dh(){if(xO)return bg;xO=1;var t=ux();function e(r,n){for(var i=r.length;i--;)if(t(r[i][0],n))return i;return-1}return bg=e,bg}var wg,_O;function P5(){if(_O)return wg;_O=1;var t=dh(),e=Array.prototype,r=e.splice;function n(i){var a=this.__data__,s=t(a,i);if(s<0)return!1;var u=a.length-1;return s==u?a.pop():r.call(a,s,1),--this.size,!0}return wg=n,wg}var xg,SO;function T5(){if(SO)return xg;SO=1;var t=dh();function e(r){var n=this.__data__,i=t(n,r);return i<0?void 0:n[i][1]}return xg=e,xg}var _g,kO;function C5(){if(kO)return _g;kO=1;var t=dh();function e(r){return t(this.__data__,r)>-1}return _g=e,_g}var Sg,OO;function j5(){if(OO)return Sg;OO=1;var t=dh();function e(r,n){var i=this.__data__,a=t(i,r);return a<0?(++this.size,i.push([r,n])):i[a][1]=n,this}return Sg=e,Sg}var kg,EO;function hh(){if(EO)return kg;EO=1;var t=A5(),e=P5(),r=T5(),n=C5(),i=j5();function a(s){var u=-1,c=s==null?0:s.length;for(this.clear();++u<c;){var f=s[u];this.set(f[0],f[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,kg=a,kg}var Og,AO;function cx(){if(AO)return Og;AO=1;var t=eo(),e=Wn(),r=t(e,"Map");return Og=r,Og}var Eg,PO;function R5(){if(PO)return Eg;PO=1;var t=E5(),e=hh(),r=cx();function n(){this.size=0,this.__data__={hash:new t,map:new(r||e),string:new t}}return Eg=n,Eg}var Ag,TO;function I5(){if(TO)return Ag;TO=1;function t(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}return Ag=t,Ag}var Pg,CO;function ph(){if(CO)return Pg;CO=1;var t=I5();function e(r,n){var i=r.__data__;return t(n)?i[typeof n=="string"?"string":"hash"]:i.map}return Pg=e,Pg}var Tg,jO;function $5(){if(jO)return Tg;jO=1;var t=ph();function e(r){var n=t(this,r).delete(r);return this.size-=n?1:0,n}return Tg=e,Tg}var Cg,RO;function N5(){if(RO)return Cg;RO=1;var t=ph();function e(r){return t(this,r).get(r)}return Cg=e,Cg}var jg,IO;function M5(){if(IO)return jg;IO=1;var t=ph();function e(r){return t(this,r).has(r)}return jg=e,jg}var Rg,$O;function L5(){if($O)return Rg;$O=1;var t=ph();function e(r,n){var i=t(this,r),a=i.size;return i.set(r,n),this.size+=i.size==a?0:1,this}return Rg=e,Rg}var Ig,NO;function fx(){if(NO)return Ig;NO=1;var t=R5(),e=$5(),r=N5(),n=M5(),i=L5();function a(s){var u=-1,c=s==null?0:s.length;for(this.clear();++u<c;){var f=s[u];this.set(f[0],f[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,Ig=a,Ig}var $g,MO;function f2(){if(MO)return $g;MO=1;var t=fx(),e="Expected a function";function r(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(e);var a=function(){var s=arguments,u=i?i.apply(this,s):s[0],c=a.cache;if(c.has(u))return c.get(u);var f=n.apply(this,s);return a.cache=c.set(u,f)||c,f};return a.cache=new(r.Cache||t),a}return r.Cache=t,$g=r,$g}var Ng,LO;function D5(){if(LO)return Ng;LO=1;var t=f2(),e=500;function r(n){var i=t(n,function(s){return a.size===e&&a.clear(),s}),a=i.cache;return i}return Ng=r,Ng}var Mg,DO;function B5(){if(DO)return Mg;DO=1;var t=D5(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=t(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(e,function(s,u,c,f){a.push(c?f.replace(r,"$1"):u||s)}),a});return Mg=n,Mg}var Lg,BO;function dx(){if(BO)return Lg;BO=1;function t(e,r){for(var n=-1,i=e==null?0:e.length,a=Array(i);++n<i;)a[n]=r(e[n],n,e);return a}return Lg=t,Lg}var Dg,UO;function U5(){if(UO)return Dg;UO=1;var t=Gu(),e=dx(),r=Or(),n=Is(),i=t?t.prototype:void 0,a=i?i.toString:void 0;function s(u){if(typeof u=="string")return u;if(r(u))return e(u,s)+"";if(n(u))return a?a.call(u):"";var c=u+"";return c=="0"&&1/u==-1/0?"-0":c}return Dg=s,Dg}var Bg,qO;function d2(){if(qO)return Bg;qO=1;var t=U5();function e(r){return r==null?"":t(r)}return Bg=e,Bg}var Ug,zO;function h2(){if(zO)return Ug;zO=1;var t=Or(),e=sx(),r=B5(),n=d2();function i(a,s){return t(a)?a:e(a,s)?[a]:r(n(a))}return Ug=i,Ug}var qg,FO;function mh(){if(FO)return qg;FO=1;var t=Is();function e(r){if(typeof r=="string"||t(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return qg=e,qg}var zg,WO;function hx(){if(WO)return zg;WO=1;var t=h2(),e=mh();function r(n,i){i=t(i,n);for(var a=0,s=i.length;n!=null&&a<s;)n=n[e(i[a++])];return a&&a==s?n:void 0}return zg=r,zg}var Fg,HO;function p2(){if(HO)return Fg;HO=1;var t=hx();function e(r,n,i){var a=r==null?void 0:t(r,n);return a===void 0?i:a}return Fg=e,Fg}var q5=p2();const Mr=Ye(q5);var Wg,VO;function z5(){if(VO)return Wg;VO=1;function t(e){return e==null}return Wg=t,Wg}var F5=z5();const Me=Ye(F5);var Hg,KO;function W5(){if(KO)return Hg;KO=1;var t=yi(),e=Or(),r=bi(),n="[object String]";function i(a){return typeof a=="string"||!e(a)&&r(a)&&t(a)==n}return Hg=i,Hg}var H5=W5();const Ka=Ye(H5);var V5=lx();const $e=Ye(V5);var K5=na();const $s=Ye(K5);var Vg={exports:{}},Ke={};/**
263
+ * @license React
264
+ * react-is.production.min.js
265
+ *
266
+ * Copyright (c) Facebook, Inc. and its affiliates.
267
+ *
268
+ * This source code is licensed under the MIT license found in the
269
+ * LICENSE file in the root directory of this source tree.
270
+ */var GO;function G5(){if(GO)return Ke;GO=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),w;w=Symbol.for("react.module.reference");function x(y){if(typeof y=="object"&&y!==null){var S=y.$$typeof;switch(S){case t:switch(y=y.type,y){case r:case i:case n:case f:case p:return y;default:switch(y=y&&y.$$typeof,y){case u:case s:case c:case g:case h:case a:return y;default:return S}}case e:return S}}}return Ke.ContextConsumer=s,Ke.ContextProvider=a,Ke.Element=t,Ke.ForwardRef=c,Ke.Fragment=r,Ke.Lazy=g,Ke.Memo=h,Ke.Portal=e,Ke.Profiler=i,Ke.StrictMode=n,Ke.Suspense=f,Ke.SuspenseList=p,Ke.isAsyncMode=function(){return!1},Ke.isConcurrentMode=function(){return!1},Ke.isContextConsumer=function(y){return x(y)===s},Ke.isContextProvider=function(y){return x(y)===a},Ke.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},Ke.isForwardRef=function(y){return x(y)===c},Ke.isFragment=function(y){return x(y)===r},Ke.isLazy=function(y){return x(y)===g},Ke.isMemo=function(y){return x(y)===h},Ke.isPortal=function(y){return x(y)===e},Ke.isProfiler=function(y){return x(y)===i},Ke.isStrictMode=function(y){return x(y)===n},Ke.isSuspense=function(y){return x(y)===f},Ke.isSuspenseList=function(y){return x(y)===p},Ke.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===r||y===i||y===n||y===f||y===p||y===v||typeof y=="object"&&y!==null&&(y.$$typeof===g||y.$$typeof===h||y.$$typeof===a||y.$$typeof===s||y.$$typeof===c||y.$$typeof===w||y.getModuleId!==void 0)},Ke.typeOf=x,Ke}var XO;function X5(){return XO||(XO=1,Vg.exports=G5()),Vg.exports}var Y5=X5(),Kg,YO;function m2(){if(YO)return Kg;YO=1;var t=yi(),e=bi(),r="[object Number]";function n(i){return typeof i=="number"||e(i)&&t(i)==r}return Kg=n,Kg}var Gg,JO;function J5(){if(JO)return Gg;JO=1;var t=m2();function e(r){return t(r)&&r!=+r}return Gg=e,Gg}var Q5=J5();const Ns=Ye(Q5);var Z5=m2();const ez=Ye(Z5);var fr=function(e){return e===0?0:e>0?1:-1},Da=function(e){return Ka(e)&&e.indexOf("%")===e.length-1},fe=function(e){return ez(e)&&!Ns(e)},tz=function(e){return Me(e)},Lt=function(e){return fe(e)||Ka(e)},rz=0,Ms=function(e){var r=++rz;return"".concat(e||"").concat(r)},dr=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!fe(e)&&!Ka(e))return n;var a;if(Da(e)){var s=e.indexOf("%");a=r*parseFloat(e.slice(0,s))/100}else a=+e;return Ns(a)&&(a=n),i&&a>r&&(a=r),a},zo=function(e){if(!e)return null;var r=Object.keys(e);return r&&r.length?e[r[0]]:null},nz=function(e){if(!Array.isArray(e))return!1;for(var r=e.length,n={},i=0;i<r;i++)if(!n[e[i]])n[e[i]]=!0;else return!0;return!1},Sr=function(e,r){return fe(e)&&fe(r)?function(n){return e+n*(r-e)}:function(){return r}};function nd(t,e,r){return!t||!t.length?null:t.find(function(n){return n&&(typeof e=="function"?e(n):Mr(n,e))===r})}var iz=function(e,r){return fe(e)&&fe(r)?e-r:Ka(e)&&Ka(r)?e.localeCompare(r):e instanceof Date&&r instanceof Date?e.getTime()-r.getTime():String(e).localeCompare(String(r))};function Yo(t,e){for(var r in t)if({}.hasOwnProperty.call(t,r)&&(!{}.hasOwnProperty.call(e,r)||t[r]!==e[r]))return!1;for(var n in e)if({}.hasOwnProperty.call(e,n)&&!{}.hasOwnProperty.call(t,n))return!1;return!0}function y0(t){"@babel/helpers - typeof";return y0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y0(t)}var az=["viewBox","children"],oz=["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"],QO=["points","pathLength"],Xg={svg:az,polygon:QO,polyline:QO},px=["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"],id=function(e,r){if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if($.isValidElement(e)&&(n=e.props),!$s(n))return null;var i={};return Object.keys(n).forEach(function(a){px.includes(a)&&(i[a]=r||function(s){return n[a](n,s)})}),i},sz=function(e,r,n){return function(i){return e(r,n,i),null}},Ga=function(e,r,n){if(!$s(e)||y0(e)!=="object")return null;var i=null;return Object.keys(e).forEach(function(a){var s=e[a];px.includes(a)&&typeof s=="function"&&(i||(i={}),i[a]=sz(s,r,n))}),i},lz=["children"],uz=["children"];function ZO(t,e){if(t==null)return{};var r=cz(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function cz(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function b0(t){"@babel/helpers - typeof";return b0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b0(t)}var eE={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},ui=function(e){return typeof e=="string"?e:e?e.displayName||e.name||"Component":""},tE=null,Yg=null,mx=function t(e){if(e===tE&&Array.isArray(Yg))return Yg;var r=[];return $.Children.forEach(e,function(n){Me(n)||(Y5.isFragment(n)?r=r.concat(t(n.props.children)):r.push(n))}),Yg=r,tE=e,r};function tn(t,e){var r=[],n=[];return Array.isArray(e)?n=e.map(function(i){return ui(i)}):n=[ui(e)],mx(t).forEach(function(i){var a=Mr(i,"type.displayName")||Mr(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function Ir(t,e){var r=tn(t,e);return r&&r[0]}var rE=function(e){if(!e||!e.props)return!1;var r=e.props,n=r.width,i=r.height;return!(!fe(n)||n<=0||!fe(i)||i<=0)},fz=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],dz=function(e){return e&&e.type&&Ka(e.type)&&fz.indexOf(e.type)>=0},hz=function(e){return e&&b0(e)==="object"&&"clipDot"in e},pz=function(e,r,n,i){var a,s=(a=Xg==null?void 0:Xg[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!$e(e)&&(i&&s.includes(r)||oz.includes(r))||n&&px.includes(r)},Ee=function(e,r,n){if(!e||typeof e=="function"||typeof e=="boolean")return null;var i=e;if($.isValidElement(e)&&(i=e.props),!$s(i))return null;var a={};return Object.keys(i).forEach(function(s){var u;pz((u=i)===null||u===void 0?void 0:u[s],s,r,n)&&(a[s]=i[s])}),a},w0=function t(e,r){if(e===r)return!0;var n=$.Children.count(e);if(n!==$.Children.count(r))return!1;if(n===0)return!0;if(n===1)return nE(Array.isArray(e)?e[0]:e,Array.isArray(r)?r[0]:r);for(var i=0;i<n;i++){var a=e[i],s=r[i];if(Array.isArray(a)||Array.isArray(s)){if(!t(a,s))return!1}else if(!nE(a,s))return!1}return!0},nE=function(e,r){if(Me(e)&&Me(r))return!0;if(!Me(e)&&!Me(r)){var n=e.props||{},i=n.children,a=ZO(n,lz),s=r.props||{},u=s.children,c=ZO(s,uz);return i&&u?Yo(a,c)&&w0(i,u):!i&&!u?Yo(a,c):!1}return!1},iE=function(e,r){var n=[],i={};return mx(e).forEach(function(a,s){if(dz(a))n.push(a);else if(a){var u=ui(a.type),c=r[u]||{},f=c.handler,p=c.once;if(f&&(!p||!i[u])){var h=f(a,u,s);n.push(h),i[u]=!0}}}),n},mz=function(e){var r=e&&e.type;return r&&eE[r]?eE[r]:null},gz=function(e,r){return mx(r).indexOf(e)},vz=["children","width","height","viewBox","className","style","title","desc"];function x0(){return x0=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},x0.apply(this,arguments)}function yz(t,e){if(t==null)return{};var r=bz(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function bz(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function _0(t){var e=t.children,r=t.width,n=t.height,i=t.viewBox,a=t.className,s=t.style,u=t.title,c=t.desc,f=yz(t,vz),p=i||{width:r,height:n,x:0,y:0},h=Le("recharts-surface",a);return I.createElement("svg",x0({},Ee(f,!0,"svg"),{className:h,width:r,height:n,style:s,viewBox:"".concat(p.x," ").concat(p.y," ").concat(p.width," ").concat(p.height)}),I.createElement("title",null,u),I.createElement("desc",null,c),e)}var wz=["children","className"];function S0(){return S0=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},S0.apply(this,arguments)}function xz(t,e){if(t==null)return{};var r=_z(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function _z(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var Ue=I.forwardRef(function(t,e){var r=t.children,n=t.className,i=xz(t,wz),a=Le("recharts-layer",n);return I.createElement("g",S0({className:a},Ee(i,!0),{ref:e}),r)}),ci=function(e,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a]},Jg,aE;function Sz(){if(aE)return Jg;aE=1;function t(e,r,n){var i=-1,a=e.length;r<0&&(r=-r>a?0:a+r),n=n>a?a:n,n<0&&(n+=a),a=r>n?0:n-r>>>0,r>>>=0;for(var s=Array(a);++i<a;)s[i]=e[i+r];return s}return Jg=t,Jg}var Qg,oE;function kz(){if(oE)return Qg;oE=1;var t=Sz();function e(r,n,i){var a=r.length;return i=i===void 0?a:i,!n&&i>=a?r:t(r,n,i)}return Qg=e,Qg}var Zg,sE;function g2(){if(sE)return Zg;sE=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=e+r+n,a="\\ufe0e\\ufe0f",s="\\u200d",u=RegExp("["+s+t+i+a+"]");function c(f){return u.test(f)}return Zg=c,Zg}var ev,lE;function Oz(){if(lE)return ev;lE=1;function t(e){return e.split("")}return ev=t,ev}var tv,uE;function Ez(){if(uE)return tv;uE=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=e+r+n,a="\\ufe0e\\ufe0f",s="["+t+"]",u="["+i+"]",c="\\ud83c[\\udffb-\\udfff]",f="(?:"+u+"|"+c+")",p="[^"+t+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",w=f+"?",x="["+a+"]?",y="(?:"+v+"(?:"+[p,h,g].join("|")+")"+x+w+")*",S=x+w+y,k="(?:"+[p+u+"?",u,h,g,s].join("|")+")",E=RegExp(c+"(?="+c+")|"+k+S,"g");function P(O){return O.match(E)||[]}return tv=P,tv}var rv,cE;function Az(){if(cE)return rv;cE=1;var t=Oz(),e=g2(),r=Ez();function n(i){return e(i)?r(i):t(i)}return rv=n,rv}var nv,fE;function Pz(){if(fE)return nv;fE=1;var t=kz(),e=g2(),r=Az(),n=d2();function i(a){return function(s){s=n(s);var u=e(s)?r(s):void 0,c=u?u[0]:s.charAt(0),f=u?t(u,1).join(""):s.slice(1);return c[a]()+f}}return nv=i,nv}var iv,dE;function Tz(){if(dE)return iv;dE=1;var t=Pz(),e=t("toUpperCase");return iv=e,iv}var Cz=Tz();const gh=Ye(Cz);function nt(t){return function(){return t}}const v2=Math.cos,ad=Math.sin,On=Math.sqrt,od=Math.PI,vh=2*od,k0=Math.PI,O0=2*k0,Ia=1e-6,jz=O0-Ia;function y2(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}function Rz(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return y2;const r=10**e;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class Iz{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?y2:Rz(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,n,i){this._append`Q${+e},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(e,r,n,i,a,s){this._append`C${+e},${+r},${+n},${+i},${this._x1=+a},${this._y1=+s}`}arcTo(e,r,n,i,a){if(e=+e,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,u=this._y1,c=n-e,f=i-r,p=s-e,h=u-r,g=p*p+h*h;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(g>Ia)if(!(Math.abs(h*c-f*p)>Ia)||!a)this._append`L${this._x1=e},${this._y1=r}`;else{let v=n-s,w=i-u,x=c*c+f*f,y=v*v+w*w,S=Math.sqrt(x),k=Math.sqrt(g),E=a*Math.tan((k0-Math.acos((x+g-y)/(2*S*k)))/2),P=E/k,O=E/S;Math.abs(P-1)>Ia&&this._append`L${e+P*p},${r+P*h}`,this._append`A${a},${a},0,0,${+(h*v>p*w)},${this._x1=e+O*c},${this._y1=r+O*f}`}}arc(e,r,n,i,a,s){if(e=+e,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let u=n*Math.cos(i),c=n*Math.sin(i),f=e+u,p=r+c,h=1^s,g=s?i-a:a-i;this._x1===null?this._append`M${f},${p}`:(Math.abs(this._x1-f)>Ia||Math.abs(this._y1-p)>Ia)&&this._append`L${f},${p}`,n&&(g<0&&(g=g%O0+O0),g>jz?this._append`A${n},${n},0,1,${h},${e-u},${r-c}A${n},${n},0,1,${h},${this._x1=f},${this._y1=p}`:g>Ia&&this._append`A${n},${n},0,${+(g>=k0)},${h},${this._x1=e+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(e,r,n,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function gx(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);e=n}return t},()=>new Iz(e)}function vx(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function b2(t){this._context=t}b2.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function yh(t){return new b2(t)}function w2(t){return t[0]}function x2(t){return t[1]}function _2(t,e){var r=nt(!0),n=null,i=yh,a=null,s=gx(u);t=typeof t=="function"?t:t===void 0?w2:nt(t),e=typeof e=="function"?e:e===void 0?x2:nt(e);function u(c){var f,p=(c=vx(c)).length,h,g=!1,v;for(n==null&&(a=i(v=s())),f=0;f<=p;++f)!(f<p&&r(h=c[f],f,c))===g&&((g=!g)?a.lineStart():a.lineEnd()),g&&a.point(+t(h,f,c),+e(h,f,c));if(v)return a=null,v+""||null}return u.x=function(c){return arguments.length?(t=typeof c=="function"?c:nt(+c),u):t},u.y=function(c){return arguments.length?(e=typeof c=="function"?c:nt(+c),u):e},u.defined=function(c){return arguments.length?(r=typeof c=="function"?c:nt(!!c),u):r},u.curve=function(c){return arguments.length?(i=c,n!=null&&(a=i(n)),u):i},u.context=function(c){return arguments.length?(c==null?n=a=null:a=i(n=c),u):n},u}function Of(t,e,r){var n=null,i=nt(!0),a=null,s=yh,u=null,c=gx(f);t=typeof t=="function"?t:t===void 0?w2:nt(+t),e=typeof e=="function"?e:nt(e===void 0?0:+e),r=typeof r=="function"?r:r===void 0?x2:nt(+r);function f(h){var g,v,w,x=(h=vx(h)).length,y,S=!1,k,E=new Array(x),P=new Array(x);for(a==null&&(u=s(k=c())),g=0;g<=x;++g){if(!(g<x&&i(y=h[g],g,h))===S)if(S=!S)v=g,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),w=g-1;w>=v;--w)u.point(E[w],P[w]);u.lineEnd(),u.areaEnd()}S&&(E[g]=+t(y,g,h),P[g]=+e(y,g,h),u.point(n?+n(y,g,h):E[g],r?+r(y,g,h):P[g]))}if(k)return u=null,k+""||null}function p(){return _2().defined(i).curve(s).context(a)}return f.x=function(h){return arguments.length?(t=typeof h=="function"?h:nt(+h),n=null,f):t},f.x0=function(h){return arguments.length?(t=typeof h=="function"?h:nt(+h),f):t},f.x1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:nt(+h),f):n},f.y=function(h){return arguments.length?(e=typeof h=="function"?h:nt(+h),r=null,f):e},f.y0=function(h){return arguments.length?(e=typeof h=="function"?h:nt(+h),f):e},f.y1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:nt(+h),f):r},f.lineX0=f.lineY0=function(){return p().x(t).y(e)},f.lineY1=function(){return p().x(t).y(r)},f.lineX1=function(){return p().x(n).y(e)},f.defined=function(h){return arguments.length?(i=typeof h=="function"?h:nt(!!h),f):i},f.curve=function(h){return arguments.length?(s=h,a!=null&&(u=s(a)),f):s},f.context=function(h){return arguments.length?(h==null?a=u=null:u=s(a=h),f):a},f}class S2{constructor(e,r){this._context=e,this._x=r}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(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._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}}function $z(t){return new S2(t,!0)}function Nz(t){return new S2(t,!1)}const yx={draw(t,e){const r=On(e/od);t.moveTo(r,0),t.arc(0,0,r,0,vh)}},Mz={draw(t,e){const r=On(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},k2=On(1/3),Lz=k2*2,Dz={draw(t,e){const r=On(e/Lz),n=r*k2;t.moveTo(0,-r),t.lineTo(n,0),t.lineTo(0,r),t.lineTo(-n,0),t.closePath()}},Bz={draw(t,e){const r=On(e),n=-r/2;t.rect(n,n,r,r)}},Uz=.8908130915292852,O2=ad(od/10)/ad(7*od/10),qz=ad(vh/10)*O2,zz=-v2(vh/10)*O2,Fz={draw(t,e){const r=On(e*Uz),n=qz*r,i=zz*r;t.moveTo(0,-r),t.lineTo(n,i);for(let a=1;a<5;++a){const s=vh*a/5,u=v2(s),c=ad(s);t.lineTo(c*r,-u*r),t.lineTo(u*n-c*i,c*n+u*i)}t.closePath()}},av=On(3),Wz={draw(t,e){const r=-On(e/(av*3));t.moveTo(0,r*2),t.lineTo(-av*r,-r),t.lineTo(av*r,-r),t.closePath()}},Gr=-.5,Xr=On(3)/2,E0=1/On(12),Hz=(E0/2+1)*3,Vz={draw(t,e){const r=On(e/Hz),n=r/2,i=r*E0,a=n,s=r*E0+r,u=-a,c=s;t.moveTo(n,i),t.lineTo(a,s),t.lineTo(u,c),t.lineTo(Gr*n-Xr*i,Xr*n+Gr*i),t.lineTo(Gr*a-Xr*s,Xr*a+Gr*s),t.lineTo(Gr*u-Xr*c,Xr*u+Gr*c),t.lineTo(Gr*n+Xr*i,Gr*i-Xr*n),t.lineTo(Gr*a+Xr*s,Gr*s-Xr*a),t.lineTo(Gr*u+Xr*c,Gr*c-Xr*u),t.closePath()}};function Kz(t,e){let r=null,n=gx(i);t=typeof t=="function"?t:nt(t||yx),e=typeof e=="function"?e:nt(e===void 0?64:+e);function i(){let a;if(r||(r=a=n()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(t=typeof a=="function"?a:nt(a),i):t},i.size=function(a){return arguments.length?(e=typeof a=="function"?a:nt(+a),i):e},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function sd(){}function ld(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function E2(t){this._context=t}E2.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:ld(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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);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:ld(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Gz(t){return new E2(t)}function A2(t){this._context=t}A2.prototype={areaStart:sd,areaEnd:sd,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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:ld(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Xz(t){return new A2(t)}function P2(t){this._context=t}P2.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:ld(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Yz(t){return new P2(t)}function T2(t){this._context=t}T2.prototype={areaStart:sd,areaEnd:sd,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function Jz(t){return new T2(t)}function hE(t){return t<0?-1:1}function pE(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),s=(r-t._y1)/(i||n<0&&-0),u=(a*i+s*n)/(n+i);return(hE(a)+hE(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(u))||0}function mE(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function ov(t,e,r){var n=t._x0,i=t._y0,a=t._x1,s=t._y1,u=(a-n)/3;t._context.bezierCurveTo(n+u,i+u*e,a-u,s-u*r,a,s)}function ud(t){this._context=t}ud.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:ov(this,this._t0,mE(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,ov(this,mE(this,r=pE(this,t,e)),r);break;default:ov(this,this._t0,r=pE(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function C2(t){this._context=new j2(t)}(C2.prototype=Object.create(ud.prototype)).point=function(t,e){ud.prototype.point.call(this,e,t)};function j2(t){this._context=t}j2.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,n,i,a){this._context.bezierCurveTo(e,t,n,r,a,i)}};function Qz(t){return new ud(t)}function Zz(t){return new C2(t)}function R2(t){this._context=t}R2.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var n=gE(t),i=gE(e),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],t[s],e[s]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function gE(t){var e,r=t.length-1,n,i=new Array(r),a=new Array(r),s=new Array(r);for(i[0]=0,a[0]=2,s[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,s[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,s[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,s[e]-=n*s[e-1];for(i[r-1]=s[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(s[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function e6(t){return new R2(t)}function bh(t,e){this._context=t,this._t=e}bh.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}};function t6(t){return new bh(t,.5)}function r6(t){return new bh(t,0)}function n6(t){return new bh(t,1)}function rs(t,e){if((s=t.length)>1)for(var r=1,n,i,a=t[e[0]],s,u=a.length;r<s;++r)for(i=a,a=t[e[r]],n=0;n<u;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function A0(t){for(var e=t.length,r=new Array(e);--e>=0;)r[e]=e;return r}function i6(t,e){return t[e]}function a6(t){const e=[];return e.key=t,e}function o6(){var t=nt([]),e=A0,r=rs,n=i6;function i(a){var s=Array.from(t.apply(this,arguments),a6),u,c=s.length,f=-1,p;for(const h of a)for(u=0,++f;u<c;++u)(s[u][f]=[0,+n(h,s[u].key,f,a)]).data=h;for(u=0,p=vx(e(s));u<c;++u)s[p[u]].index=u;return r(s,p),s}return i.keys=function(a){return arguments.length?(t=typeof a=="function"?a:nt(Array.from(a)),i):t},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:nt(+a),i):n},i.order=function(a){return arguments.length?(e=a==null?A0:typeof a=="function"?a:nt(Array.from(a)),i):e},i.offset=function(a){return arguments.length?(r=a??rs,i):r},i}function s6(t,e){if((n=t.length)>0){for(var r,n,i=0,a=t[0].length,s;i<a;++i){for(s=r=0;r<n;++r)s+=t[r][i][1]||0;if(s)for(r=0;r<n;++r)t[r][i][1]/=s}rs(t,e)}}function l6(t,e){if((i=t.length)>0){for(var r=0,n=t[e[0]],i,a=n.length;r<a;++r){for(var s=0,u=0;s<i;++s)u+=t[s][r][1]||0;n[r][1]+=n[r][0]=-u/2}rs(t,e)}}function u6(t,e){if(!(!((s=t.length)>0)||!((a=(i=t[e[0]]).length)>0))){for(var r=0,n=1,i,a,s;n<a;++n){for(var u=0,c=0,f=0;u<s;++u){for(var p=t[e[u]],h=p[n][1]||0,g=p[n-1][1]||0,v=(h-g)/2,w=0;w<u;++w){var x=t[e[w]],y=x[n][1]||0,S=x[n-1][1]||0;v+=y-S}c+=h,f+=v*h}i[n-1][1]+=i[n-1][0]=r,c&&(r-=f/c)}i[n-1][1]+=i[n-1][0]=r,rs(t,e)}}function uu(t){"@babel/helpers - typeof";return uu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uu(t)}var c6=["type","size","sizeType"];function P0(){return P0=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},P0.apply(this,arguments)}function vE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function yE(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?vE(Object(r),!0).forEach(function(n){f6(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vE(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function f6(t,e,r){return e=d6(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function d6(t){var e=h6(t,"string");return uu(e)=="symbol"?e:e+""}function h6(t,e){if(uu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(uu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function p6(t,e){if(t==null)return{};var r=m6(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function m6(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var I2={symbolCircle:yx,symbolCross:Mz,symbolDiamond:Dz,symbolSquare:Bz,symbolStar:Fz,symbolTriangle:Wz,symbolWye:Vz},g6=Math.PI/180,v6=function(e){var r="symbol".concat(gh(e));return I2[r]||yx},y6=function(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 i=18*g6;return 1.25*e*e*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),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}},b6=function(e,r){I2["symbol".concat(gh(e))]=r},bx=function(e){var r=e.type,n=r===void 0?"circle":r,i=e.size,a=i===void 0?64:i,s=e.sizeType,u=s===void 0?"area":s,c=p6(e,c6),f=yE(yE({},c),{},{type:n,size:a,sizeType:u}),p=function(){var y=v6(n),S=Kz().type(y).size(y6(a,u,n));return S()},h=f.className,g=f.cx,v=f.cy,w=Ee(f,!0);return g===+g&&v===+v&&a===+a?I.createElement("path",P0({},w,{className:Le("recharts-symbols",h),transform:"translate(".concat(g,", ").concat(v,")"),d:p()})):null};bx.registerSymbol=b6;function ns(t){"@babel/helpers - typeof";return ns=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ns(t)}function T0(){return T0=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},T0.apply(this,arguments)}function bE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function w6(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?bE(Object(r),!0).forEach(function(n){cu(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bE(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function x6(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _6(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,N2(n.key),n)}}function S6(t,e,r){return e&&_6(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function k6(t,e,r){return e=cd(e),O6(t,$2()?Reflect.construct(e,r||[],cd(t).constructor):e.apply(t,r))}function O6(t,e){if(e&&(ns(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return E6(t)}function E6(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $2(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($2=function(){return!!t})()}function cd(t){return cd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},cd(t)}function A6(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&C0(t,e)}function C0(t,e){return C0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},C0(t,e)}function cu(t,e,r){return e=N2(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function N2(t){var e=P6(t,"string");return ns(e)=="symbol"?e:e+""}function P6(t,e){if(ns(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ns(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Yr=32,wx=(function(t){function e(){return x6(this,e),k6(this,e,arguments)}return A6(e,t),S6(e,[{key:"renderIcon",value:function(n){var i=this.props.inactiveColor,a=Yr/2,s=Yr/6,u=Yr/3,c=n.inactive?i:n.color;if(n.type==="plainline")return I.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:a,x2:Yr,y2:a,className:"recharts-legend-icon"});if(n.type==="line")return I.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(a,"h").concat(u,`
271
+ A`).concat(s,",").concat(s,",0,1,1,").concat(2*u,",").concat(a,`
272
+ H`).concat(Yr,"M").concat(2*u,",").concat(a,`
273
+ A`).concat(s,",").concat(s,",0,1,1,").concat(u,",").concat(a),className:"recharts-legend-icon"});if(n.type==="rect")return I.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(Yr/8,"h").concat(Yr,"v").concat(Yr*3/4,"h").concat(-Yr,"z"),className:"recharts-legend-icon"});if(I.isValidElement(n.legendIcon)){var f=w6({},n);return delete f.legendIcon,I.cloneElement(n.legendIcon,f)}return I.createElement(bx,{fill:c,cx:a,cy:a,size:Yr,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,i=this.props,a=i.payload,s=i.iconSize,u=i.layout,c=i.formatter,f=i.inactiveColor,p={x:0,y:0,width:Yr,height:Yr},h={display:u==="horizontal"?"inline-block":"block",marginRight:10},g={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(v,w){var x=v.formatter||c,y=Le(cu(cu({"recharts-legend-item":!0},"legend-item-".concat(w),!0),"inactive",v.inactive));if(v.type==="none")return null;var S=$e(v.value)?null:v.value;ci(!$e(v.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var k=v.inactive?f:v.color;return I.createElement("li",T0({className:y,style:h,key:"legend-item-".concat(w)},Ga(n.props,v,w)),I.createElement(_0,{width:s,height:s,viewBox:p,style:g},n.renderIcon(v)),I.createElement("span",{className:"recharts-legend-item-text",style:{color:k}},x?x(S,v,w):S))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,s=n.align;if(!i||!i.length)return null;var u={padding:0,margin:0,textAlign:a==="horizontal"?s:"left"};return I.createElement("ul",{className:"recharts-default-legend",style:u},this.renderItems())}}])})($.PureComponent);cu(wx,"displayName","Legend");cu(wx,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var sv,wE;function T6(){if(wE)return sv;wE=1;var t=hh();function e(){this.__data__=new t,this.size=0}return sv=e,sv}var lv,xE;function C6(){if(xE)return lv;xE=1;function t(e){var r=this.__data__,n=r.delete(e);return this.size=r.size,n}return lv=t,lv}var uv,_E;function j6(){if(_E)return uv;_E=1;function t(e){return this.__data__.get(e)}return uv=t,uv}var cv,SE;function R6(){if(SE)return cv;SE=1;function t(e){return this.__data__.has(e)}return cv=t,cv}var fv,kE;function I6(){if(kE)return fv;kE=1;var t=hh(),e=cx(),r=fx(),n=200;function i(a,s){var u=this.__data__;if(u instanceof t){var c=u.__data__;if(!e||c.length<n-1)return c.push([a,s]),this.size=++u.size,this;u=this.__data__=new r(c)}return u.set(a,s),this.size=u.size,this}return fv=i,fv}var dv,OE;function M2(){if(OE)return dv;OE=1;var t=hh(),e=T6(),r=C6(),n=j6(),i=R6(),a=I6();function s(u){var c=this.__data__=new t(u);this.size=c.size}return s.prototype.clear=e,s.prototype.delete=r,s.prototype.get=n,s.prototype.has=i,s.prototype.set=a,dv=s,dv}var hv,EE;function $6(){if(EE)return hv;EE=1;var t="__lodash_hash_undefined__";function e(r){return this.__data__.set(r,t),this}return hv=e,hv}var pv,AE;function N6(){if(AE)return pv;AE=1;function t(e){return this.__data__.has(e)}return pv=t,pv}var mv,PE;function L2(){if(PE)return mv;PE=1;var t=fx(),e=$6(),r=N6();function n(i){var a=-1,s=i==null?0:i.length;for(this.__data__=new t;++a<s;)this.add(i[a])}return n.prototype.add=n.prototype.push=e,n.prototype.has=r,mv=n,mv}var gv,TE;function D2(){if(TE)return gv;TE=1;function t(e,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(e[n],n,e))return!0;return!1}return gv=t,gv}var vv,CE;function B2(){if(CE)return vv;CE=1;function t(e,r){return e.has(r)}return vv=t,vv}var yv,jE;function U2(){if(jE)return yv;jE=1;var t=L2(),e=D2(),r=B2(),n=1,i=2;function a(s,u,c,f,p,h){var g=c&n,v=s.length,w=u.length;if(v!=w&&!(g&&w>v))return!1;var x=h.get(s),y=h.get(u);if(x&&y)return x==u&&y==s;var S=-1,k=!0,E=c&i?new t:void 0;for(h.set(s,u),h.set(u,s);++S<v;){var P=s[S],O=u[S];if(f)var A=g?f(O,P,S,u,s,h):f(P,O,S,s,u,h);if(A!==void 0){if(A)continue;k=!1;break}if(E){if(!e(u,function(C,R){if(!r(E,R)&&(P===C||p(P,C,c,f,h)))return E.push(R)})){k=!1;break}}else if(!(P===O||p(P,O,c,f,h))){k=!1;break}}return h.delete(s),h.delete(u),k}return yv=a,yv}var bv,RE;function M6(){if(RE)return bv;RE=1;var t=Wn(),e=t.Uint8Array;return bv=e,bv}var wv,IE;function L6(){if(IE)return wv;IE=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(i,a){n[++r]=[a,i]}),n}return wv=t,wv}var xv,$E;function xx(){if($E)return xv;$E=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(i){n[++r]=i}),n}return xv=t,xv}var _v,NE;function D6(){if(NE)return _v;NE=1;var t=Gu(),e=M6(),r=ux(),n=U2(),i=L6(),a=xx(),s=1,u=2,c="[object Boolean]",f="[object Date]",p="[object Error]",h="[object Map]",g="[object Number]",v="[object RegExp]",w="[object Set]",x="[object String]",y="[object Symbol]",S="[object ArrayBuffer]",k="[object DataView]",E=t?t.prototype:void 0,P=E?E.valueOf:void 0;function O(A,C,R,M,H,z,B){switch(R){case k:if(A.byteLength!=C.byteLength||A.byteOffset!=C.byteOffset)return!1;A=A.buffer,C=C.buffer;case S:return!(A.byteLength!=C.byteLength||!z(new e(A),new e(C)));case c:case f:case g:return r(+A,+C);case p:return A.name==C.name&&A.message==C.message;case v:case x:return A==C+"";case h:var F=i;case w:var J=M&s;if(F||(F=a),A.size!=C.size&&!J)return!1;var V=B.get(A);if(V)return V==C;M|=u,B.set(A,C);var K=n(F(A),F(C),M,H,z,B);return B.delete(A),K;case y:if(P)return P.call(A)==P.call(C)}return!1}return _v=O,_v}var Sv,ME;function q2(){if(ME)return Sv;ME=1;function t(e,r){for(var n=-1,i=r.length,a=e.length;++n<i;)e[a+n]=r[n];return e}return Sv=t,Sv}var kv,LE;function B6(){if(LE)return kv;LE=1;var t=q2(),e=Or();function r(n,i,a){var s=i(n);return e(n)?s:t(s,a(n))}return kv=r,kv}var Ov,DE;function U6(){if(DE)return Ov;DE=1;function t(e,r){for(var n=-1,i=e==null?0:e.length,a=0,s=[];++n<i;){var u=e[n];r(u,n,e)&&(s[a++]=u)}return s}return Ov=t,Ov}var Ev,BE;function q6(){if(BE)return Ev;BE=1;function t(){return[]}return Ev=t,Ev}var Av,UE;function z6(){if(UE)return Av;UE=1;var t=U6(),e=q6(),r=Object.prototype,n=r.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(s){return s==null?[]:(s=Object(s),t(i(s),function(u){return n.call(s,u)}))}:e;return Av=a,Av}var Pv,qE;function F6(){if(qE)return Pv;qE=1;function t(e,r){for(var n=-1,i=Array(e);++n<e;)i[n]=r(n);return i}return Pv=t,Pv}var Tv,zE;function W6(){if(zE)return Tv;zE=1;var t=yi(),e=bi(),r="[object Arguments]";function n(i){return e(i)&&t(i)==r}return Tv=n,Tv}var Cv,FE;function _x(){if(FE)return Cv;FE=1;var t=W6(),e=bi(),r=Object.prototype,n=r.hasOwnProperty,i=r.propertyIsEnumerable,a=t((function(){return arguments})())?t:function(s){return e(s)&&n.call(s,"callee")&&!i.call(s,"callee")};return Cv=a,Cv}var Wl={exports:{}},jv,WE;function H6(){if(WE)return jv;WE=1;function t(){return!1}return jv=t,jv}Wl.exports;var HE;function z2(){return HE||(HE=1,(function(t,e){var r=Wn(),n=H6(),i=e&&!e.nodeType&&e,a=i&&!0&&t&&!t.nodeType&&t,s=a&&a.exports===i,u=s?r.Buffer:void 0,c=u?u.isBuffer:void 0,f=c||n;t.exports=f})(Wl,Wl.exports)),Wl.exports}var Rv,VE;function Sx(){if(VE)return Rv;VE=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function r(n,i){var a=typeof n;return i=i??t,!!i&&(a=="number"||a!="symbol"&&e.test(n))&&n>-1&&n%1==0&&n<i}return Rv=r,Rv}var Iv,KE;function kx(){if(KE)return Iv;KE=1;var t=9007199254740991;function e(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=t}return Iv=e,Iv}var $v,GE;function V6(){if(GE)return $v;GE=1;var t=yi(),e=kx(),r=bi(),n="[object Arguments]",i="[object Array]",a="[object Boolean]",s="[object Date]",u="[object Error]",c="[object Function]",f="[object Map]",p="[object Number]",h="[object Object]",g="[object RegExp]",v="[object Set]",w="[object String]",x="[object WeakMap]",y="[object ArrayBuffer]",S="[object DataView]",k="[object Float32Array]",E="[object Float64Array]",P="[object Int8Array]",O="[object Int16Array]",A="[object Int32Array]",C="[object Uint8Array]",R="[object Uint8ClampedArray]",M="[object Uint16Array]",H="[object Uint32Array]",z={};z[k]=z[E]=z[P]=z[O]=z[A]=z[C]=z[R]=z[M]=z[H]=!0,z[n]=z[i]=z[y]=z[a]=z[S]=z[s]=z[u]=z[c]=z[f]=z[p]=z[h]=z[g]=z[v]=z[w]=z[x]=!1;function B(F){return r(F)&&e(F.length)&&!!z[t(F)]}return $v=B,$v}var Nv,XE;function F2(){if(XE)return Nv;XE=1;function t(e){return function(r){return e(r)}}return Nv=t,Nv}var Hl={exports:{}};Hl.exports;var YE;function K6(){return YE||(YE=1,(function(t,e){var r=u2(),n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,s=a&&r.process,u=(function(){try{var c=i&&i.require&&i.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}})();t.exports=u})(Hl,Hl.exports)),Hl.exports}var Mv,JE;function W2(){if(JE)return Mv;JE=1;var t=V6(),e=F2(),r=K6(),n=r&&r.isTypedArray,i=n?e(n):t;return Mv=i,Mv}var Lv,QE;function G6(){if(QE)return Lv;QE=1;var t=F6(),e=_x(),r=Or(),n=z2(),i=Sx(),a=W2(),s=Object.prototype,u=s.hasOwnProperty;function c(f,p){var h=r(f),g=!h&&e(f),v=!h&&!g&&n(f),w=!h&&!g&&!v&&a(f),x=h||g||v||w,y=x?t(f.length,String):[],S=y.length;for(var k in f)(p||u.call(f,k))&&!(x&&(k=="length"||v&&(k=="offset"||k=="parent")||w&&(k=="buffer"||k=="byteLength"||k=="byteOffset")||i(k,S)))&&y.push(k);return y}return Lv=c,Lv}var Dv,ZE;function X6(){if(ZE)return Dv;ZE=1;var t=Object.prototype;function e(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||t;return r===i}return Dv=e,Dv}var Bv,eA;function H2(){if(eA)return Bv;eA=1;function t(e,r){return function(n){return e(r(n))}}return Bv=t,Bv}var Uv,tA;function Y6(){if(tA)return Uv;tA=1;var t=H2(),e=t(Object.keys,Object);return Uv=e,Uv}var qv,rA;function J6(){if(rA)return qv;rA=1;var t=X6(),e=Y6(),r=Object.prototype,n=r.hasOwnProperty;function i(a){if(!t(a))return e(a);var s=[];for(var u in Object(a))n.call(a,u)&&u!="constructor"&&s.push(u);return s}return qv=i,qv}var zv,nA;function Xu(){if(nA)return zv;nA=1;var t=lx(),e=kx();function r(n){return n!=null&&e(n.length)&&!t(n)}return zv=r,zv}var Fv,iA;function wh(){if(iA)return Fv;iA=1;var t=G6(),e=J6(),r=Xu();function n(i){return r(i)?t(i):e(i)}return Fv=n,Fv}var Wv,aA;function Q6(){if(aA)return Wv;aA=1;var t=B6(),e=z6(),r=wh();function n(i){return t(i,r,e)}return Wv=n,Wv}var Hv,oA;function Z6(){if(oA)return Hv;oA=1;var t=Q6(),e=1,r=Object.prototype,n=r.hasOwnProperty;function i(a,s,u,c,f,p){var h=u&e,g=t(a),v=g.length,w=t(s),x=w.length;if(v!=x&&!h)return!1;for(var y=v;y--;){var S=g[y];if(!(h?S in s:n.call(s,S)))return!1}var k=p.get(a),E=p.get(s);if(k&&E)return k==s&&E==a;var P=!0;p.set(a,s),p.set(s,a);for(var O=h;++y<v;){S=g[y];var A=a[S],C=s[S];if(c)var R=h?c(C,A,S,s,a,p):c(A,C,S,a,s,p);if(!(R===void 0?A===C||f(A,C,u,c,p):R)){P=!1;break}O||(O=S=="constructor")}if(P&&!O){var M=a.constructor,H=s.constructor;M!=H&&"constructor"in a&&"constructor"in s&&!(typeof M=="function"&&M instanceof M&&typeof H=="function"&&H instanceof H)&&(P=!1)}return p.delete(a),p.delete(s),P}return Hv=i,Hv}var Vv,sA;function eF(){if(sA)return Vv;sA=1;var t=eo(),e=Wn(),r=t(e,"DataView");return Vv=r,Vv}var Kv,lA;function tF(){if(lA)return Kv;lA=1;var t=eo(),e=Wn(),r=t(e,"Promise");return Kv=r,Kv}var Gv,uA;function V2(){if(uA)return Gv;uA=1;var t=eo(),e=Wn(),r=t(e,"Set");return Gv=r,Gv}var Xv,cA;function rF(){if(cA)return Xv;cA=1;var t=eo(),e=Wn(),r=t(e,"WeakMap");return Xv=r,Xv}var Yv,fA;function nF(){if(fA)return Yv;fA=1;var t=eF(),e=cx(),r=tF(),n=V2(),i=rF(),a=yi(),s=c2(),u="[object Map]",c="[object Object]",f="[object Promise]",p="[object Set]",h="[object WeakMap]",g="[object DataView]",v=s(t),w=s(e),x=s(r),y=s(n),S=s(i),k=a;return(t&&k(new t(new ArrayBuffer(1)))!=g||e&&k(new e)!=u||r&&k(r.resolve())!=f||n&&k(new n)!=p||i&&k(new i)!=h)&&(k=function(E){var P=a(E),O=P==c?E.constructor:void 0,A=O?s(O):"";if(A)switch(A){case v:return g;case w:return u;case x:return f;case y:return p;case S:return h}return P}),Yv=k,Yv}var Jv,dA;function iF(){if(dA)return Jv;dA=1;var t=M2(),e=U2(),r=D6(),n=Z6(),i=nF(),a=Or(),s=z2(),u=W2(),c=1,f="[object Arguments]",p="[object Array]",h="[object Object]",g=Object.prototype,v=g.hasOwnProperty;function w(x,y,S,k,E,P){var O=a(x),A=a(y),C=O?p:i(x),R=A?p:i(y);C=C==f?h:C,R=R==f?h:R;var M=C==h,H=R==h,z=C==R;if(z&&s(x)){if(!s(y))return!1;O=!0,M=!1}if(z&&!M)return P||(P=new t),O||u(x)?e(x,y,S,k,E,P):r(x,y,C,S,k,E,P);if(!(S&c)){var B=M&&v.call(x,"__wrapped__"),F=H&&v.call(y,"__wrapped__");if(B||F){var J=B?x.value():x,V=F?y.value():y;return P||(P=new t),E(J,V,S,k,P)}}return z?(P||(P=new t),n(x,y,S,k,E,P)):!1}return Jv=w,Jv}var Qv,hA;function Ox(){if(hA)return Qv;hA=1;var t=iF(),e=bi();function r(n,i,a,s,u){return n===i?!0:n==null||i==null||!e(n)&&!e(i)?n!==n&&i!==i:t(n,i,a,s,r,u)}return Qv=r,Qv}var Zv,pA;function aF(){if(pA)return Zv;pA=1;var t=M2(),e=Ox(),r=1,n=2;function i(a,s,u,c){var f=u.length,p=f,h=!c;if(a==null)return!p;for(a=Object(a);f--;){var g=u[f];if(h&&g[2]?g[1]!==a[g[0]]:!(g[0]in a))return!1}for(;++f<p;){g=u[f];var v=g[0],w=a[v],x=g[1];if(h&&g[2]){if(w===void 0&&!(v in a))return!1}else{var y=new t;if(c)var S=c(w,x,v,a,s,y);if(!(S===void 0?e(x,w,r|n,c,y):S))return!1}}return!0}return Zv=i,Zv}var ey,mA;function K2(){if(mA)return ey;mA=1;var t=na();function e(r){return r===r&&!t(r)}return ey=e,ey}var ty,gA;function oF(){if(gA)return ty;gA=1;var t=K2(),e=wh();function r(n){for(var i=e(n),a=i.length;a--;){var s=i[a],u=n[s];i[a]=[s,u,t(u)]}return i}return ty=r,ty}var ry,vA;function G2(){if(vA)return ry;vA=1;function t(e,r){return function(n){return n==null?!1:n[e]===r&&(r!==void 0||e in Object(n))}}return ry=t,ry}var ny,yA;function sF(){if(yA)return ny;yA=1;var t=aF(),e=oF(),r=G2();function n(i){var a=e(i);return a.length==1&&a[0][2]?r(a[0][0],a[0][1]):function(s){return s===i||t(s,i,a)}}return ny=n,ny}var iy,bA;function lF(){if(bA)return iy;bA=1;function t(e,r){return e!=null&&r in Object(e)}return iy=t,iy}var ay,wA;function uF(){if(wA)return ay;wA=1;var t=h2(),e=_x(),r=Or(),n=Sx(),i=kx(),a=mh();function s(u,c,f){c=t(c,u);for(var p=-1,h=c.length,g=!1;++p<h;){var v=a(c[p]);if(!(g=u!=null&&f(u,v)))break;u=u[v]}return g||++p!=h?g:(h=u==null?0:u.length,!!h&&i(h)&&n(v,h)&&(r(u)||e(u)))}return ay=s,ay}var oy,xA;function cF(){if(xA)return oy;xA=1;var t=lF(),e=uF();function r(n,i){return n!=null&&e(n,i,t)}return oy=r,oy}var sy,_A;function fF(){if(_A)return sy;_A=1;var t=Ox(),e=p2(),r=cF(),n=sx(),i=K2(),a=G2(),s=mh(),u=1,c=2;function f(p,h){return n(p)&&i(h)?a(s(p),h):function(g){var v=e(g,p);return v===void 0&&v===h?r(g,p):t(h,v,u|c)}}return sy=f,sy}var ly,SA;function Ls(){if(SA)return ly;SA=1;function t(e){return e}return ly=t,ly}var uy,kA;function dF(){if(kA)return uy;kA=1;function t(e){return function(r){return r==null?void 0:r[e]}}return uy=t,uy}var cy,OA;function hF(){if(OA)return cy;OA=1;var t=hx();function e(r){return function(n){return t(n,r)}}return cy=e,cy}var fy,EA;function pF(){if(EA)return fy;EA=1;var t=dF(),e=hF(),r=sx(),n=mh();function i(a){return r(a)?t(n(a)):e(a)}return fy=i,fy}var dy,AA;function Hn(){if(AA)return dy;AA=1;var t=sF(),e=fF(),r=Ls(),n=Or(),i=pF();function a(s){return typeof s=="function"?s:s==null?r:typeof s=="object"?n(s)?e(s[0],s[1]):t(s):i(s)}return dy=a,dy}var hy,PA;function X2(){if(PA)return hy;PA=1;function t(e,r,n,i){for(var a=e.length,s=n+(i?1:-1);i?s--:++s<a;)if(r(e[s],s,e))return s;return-1}return hy=t,hy}var py,TA;function mF(){if(TA)return py;TA=1;function t(e){return e!==e}return py=t,py}var my,CA;function gF(){if(CA)return my;CA=1;function t(e,r,n){for(var i=n-1,a=e.length;++i<a;)if(e[i]===r)return i;return-1}return my=t,my}var gy,jA;function vF(){if(jA)return gy;jA=1;var t=X2(),e=mF(),r=gF();function n(i,a,s){return a===a?r(i,a,s):t(i,e,s)}return gy=n,gy}var vy,RA;function yF(){if(RA)return vy;RA=1;var t=vF();function e(r,n){var i=r==null?0:r.length;return!!i&&t(r,n,0)>-1}return vy=e,vy}var yy,IA;function bF(){if(IA)return yy;IA=1;function t(e,r,n){for(var i=-1,a=e==null?0:e.length;++i<a;)if(n(r,e[i]))return!0;return!1}return yy=t,yy}var by,$A;function wF(){if($A)return by;$A=1;function t(){}return by=t,by}var wy,NA;function xF(){if(NA)return wy;NA=1;var t=V2(),e=wF(),r=xx(),n=1/0,i=t&&1/r(new t([,-0]))[1]==n?function(a){return new t(a)}:e;return wy=i,wy}var xy,MA;function _F(){if(MA)return xy;MA=1;var t=L2(),e=yF(),r=bF(),n=B2(),i=xF(),a=xx(),s=200;function u(c,f,p){var h=-1,g=e,v=c.length,w=!0,x=[],y=x;if(p)w=!1,g=r;else if(v>=s){var S=f?null:i(c);if(S)return a(S);w=!1,g=n,y=new t}else y=f?[]:x;e:for(;++h<v;){var k=c[h],E=f?f(k):k;if(k=p||k!==0?k:0,w&&E===E){for(var P=y.length;P--;)if(y[P]===E)continue e;f&&y.push(E),x.push(k)}else g(y,E,p)||(y!==x&&y.push(E),x.push(k))}return x}return xy=u,xy}var _y,LA;function SF(){if(LA)return _y;LA=1;var t=Hn(),e=_F();function r(n,i){return n&&n.length?e(n,t(i,2)):[]}return _y=r,_y}var kF=SF();const DA=Ye(kF);function Y2(t,e,r){return e===!0?DA(t,r):$e(e)?DA(t,e):t}function is(t){"@babel/helpers - typeof";return is=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},is(t)}var OF=["ref"];function BA(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ni(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?BA(Object(r),!0).forEach(function(n){xh(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):BA(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function EF(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function UA(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Q2(n.key),n)}}function AF(t,e,r){return e&&UA(t.prototype,e),r&&UA(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function PF(t,e,r){return e=fd(e),TF(t,J2()?Reflect.construct(e,r||[],fd(t).constructor):e.apply(t,r))}function TF(t,e){if(e&&(is(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return CF(t)}function CF(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function J2(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(J2=function(){return!!t})()}function fd(t){return fd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},fd(t)}function jF(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&j0(t,e)}function j0(t,e){return j0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},j0(t,e)}function xh(t,e,r){return e=Q2(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Q2(t){var e=RF(t,"string");return is(e)=="symbol"?e:e+""}function RF(t,e){if(is(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(is(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function IF(t,e){if(t==null)return{};var r=$F(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function $F(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function NF(t){return t.value}function MF(t,e){if(I.isValidElement(t))return I.cloneElement(t,e);if(typeof t=="function")return I.createElement(t,e);e.ref;var r=IF(e,OF);return I.createElement(wx,r)}var qA=1,Jo=(function(t){function e(){var r;EF(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=PF(this,e,[].concat(i)),xh(r,"lastBoundingBox",{width:-1,height:-1}),r}return jF(e,t),AF(e,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();return n.height=this.wrapperNode.offsetHeight,n.width=this.wrapperNode.offsetWidth,n}return null}},{key:"updateBBox",value:function(){var n=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>qA||Math.abs(i.height-this.lastBoundingBox.height)>qA)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?ni({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,s=i.align,u=i.verticalAlign,c=i.margin,f=i.chartWidth,p=i.chartHeight,h,g;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(s==="center"&&a==="vertical"){var v=this.getBBoxSnapshot();h={left:((f||0)-v.width)/2}}else h=s==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(u==="middle"){var w=this.getBBoxSnapshot();g={top:((p||0)-w.height)/2}}else g=u==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return ni(ni({},h),g)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,s=i.width,u=i.height,c=i.wrapperStyle,f=i.payloadUniqBy,p=i.payload,h=ni(ni({position:"absolute",width:s||"auto",height:u||"auto"},this.getDefaultPosition(c)),c);return I.createElement("div",{className:"recharts-legend-wrapper",style:h,ref:function(v){n.wrapperNode=v}},MF(a,ni(ni({},this.props),{},{payload:Y2(p,f,NF)})))}}],[{key:"getWithHeight",value:function(n,i){var a=ni(ni({},this.defaultProps),n.props),s=a.layout;return s==="vertical"&&fe(n.props.height)?{height:n.props.height}:s==="horizontal"?{width:n.props.width||i}:null}}])})($.PureComponent);xh(Jo,"displayName","Legend");xh(Jo,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Sy,zA;function LF(){if(zA)return Sy;zA=1;var t=Gu(),e=_x(),r=Or(),n=t?t.isConcatSpreadable:void 0;function i(a){return r(a)||e(a)||!!(n&&a&&a[n])}return Sy=i,Sy}var ky,FA;function Z2(){if(FA)return ky;FA=1;var t=q2(),e=LF();function r(n,i,a,s,u){var c=-1,f=n.length;for(a||(a=e),u||(u=[]);++c<f;){var p=n[c];i>0&&a(p)?i>1?r(p,i-1,a,s,u):t(u,p):s||(u[u.length]=p)}return u}return ky=r,ky}var Oy,WA;function DF(){if(WA)return Oy;WA=1;function t(e){return function(r,n,i){for(var a=-1,s=Object(r),u=i(r),c=u.length;c--;){var f=u[e?c:++a];if(n(s[f],f,s)===!1)break}return r}}return Oy=t,Oy}var Ey,HA;function BF(){if(HA)return Ey;HA=1;var t=DF(),e=t();return Ey=e,Ey}var Ay,VA;function eI(){if(VA)return Ay;VA=1;var t=BF(),e=wh();function r(n,i){return n&&t(n,i,e)}return Ay=r,Ay}var Py,KA;function UF(){if(KA)return Py;KA=1;var t=Xu();function e(r,n){return function(i,a){if(i==null)return i;if(!t(i))return r(i,a);for(var s=i.length,u=n?s:-1,c=Object(i);(n?u--:++u<s)&&a(c[u],u,c)!==!1;);return i}}return Py=e,Py}var Ty,GA;function Ex(){if(GA)return Ty;GA=1;var t=eI(),e=UF(),r=e(t);return Ty=r,Ty}var Cy,XA;function tI(){if(XA)return Cy;XA=1;var t=Ex(),e=Xu();function r(n,i){var a=-1,s=e(n)?Array(n.length):[];return t(n,function(u,c,f){s[++a]=i(u,c,f)}),s}return Cy=r,Cy}var jy,YA;function qF(){if(YA)return jy;YA=1;function t(e,r){var n=e.length;for(e.sort(r);n--;)e[n]=e[n].value;return e}return jy=t,jy}var Ry,JA;function zF(){if(JA)return Ry;JA=1;var t=Is();function e(r,n){if(r!==n){var i=r!==void 0,a=r===null,s=r===r,u=t(r),c=n!==void 0,f=n===null,p=n===n,h=t(n);if(!f&&!h&&!u&&r>n||u&&c&&p&&!f&&!h||a&&c&&p||!i&&p||!s)return 1;if(!a&&!u&&!h&&r<n||h&&i&&s&&!a&&!u||f&&i&&s||!c&&s||!p)return-1}return 0}return Ry=e,Ry}var Iy,QA;function FF(){if(QA)return Iy;QA=1;var t=zF();function e(r,n,i){for(var a=-1,s=r.criteria,u=n.criteria,c=s.length,f=i.length;++a<c;){var p=t(s[a],u[a]);if(p){if(a>=f)return p;var h=i[a];return p*(h=="desc"?-1:1)}}return r.index-n.index}return Iy=e,Iy}var $y,ZA;function WF(){if(ZA)return $y;ZA=1;var t=dx(),e=hx(),r=Hn(),n=tI(),i=qF(),a=F2(),s=FF(),u=Ls(),c=Or();function f(p,h,g){h.length?h=t(h,function(x){return c(x)?function(y){return e(y,x.length===1?x[0]:x)}:x}):h=[u];var v=-1;h=t(h,a(r));var w=n(p,function(x,y,S){var k=t(h,function(E){return E(x)});return{criteria:k,index:++v,value:x}});return i(w,function(x,y){return s(x,y,g)})}return $y=f,$y}var Ny,eP;function HF(){if(eP)return Ny;eP=1;function t(e,r,n){switch(n.length){case 0:return e.call(r);case 1:return e.call(r,n[0]);case 2:return e.call(r,n[0],n[1]);case 3:return e.call(r,n[0],n[1],n[2])}return e.apply(r,n)}return Ny=t,Ny}var My,tP;function VF(){if(tP)return My;tP=1;var t=HF(),e=Math.max;function r(n,i,a){return i=e(i===void 0?n.length-1:i,0),function(){for(var s=arguments,u=-1,c=e(s.length-i,0),f=Array(c);++u<c;)f[u]=s[i+u];u=-1;for(var p=Array(i+1);++u<i;)p[u]=s[u];return p[i]=a(f),t(n,this,p)}}return My=r,My}var Ly,rP;function KF(){if(rP)return Ly;rP=1;function t(e){return function(){return e}}return Ly=t,Ly}var Dy,nP;function rI(){if(nP)return Dy;nP=1;var t=eo(),e=(function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch{}})();return Dy=e,Dy}var By,iP;function GF(){if(iP)return By;iP=1;var t=KF(),e=rI(),r=Ls(),n=e?function(i,a){return e(i,"toString",{configurable:!0,enumerable:!1,value:t(a),writable:!0})}:r;return By=n,By}var Uy,aP;function XF(){if(aP)return Uy;aP=1;var t=800,e=16,r=Date.now;function n(i){var a=0,s=0;return function(){var u=r(),c=e-(u-s);if(s=u,c>0){if(++a>=t)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return Uy=n,Uy}var qy,oP;function YF(){if(oP)return qy;oP=1;var t=GF(),e=XF(),r=e(t);return qy=r,qy}var zy,sP;function JF(){if(sP)return zy;sP=1;var t=Ls(),e=VF(),r=YF();function n(i,a){return r(e(i,a,t),i+"")}return zy=n,zy}var Fy,lP;function _h(){if(lP)return Fy;lP=1;var t=ux(),e=Xu(),r=Sx(),n=na();function i(a,s,u){if(!n(u))return!1;var c=typeof s;return(c=="number"?e(u)&&r(s,u.length):c=="string"&&s in u)?t(u[s],a):!1}return Fy=i,Fy}var Wy,uP;function QF(){if(uP)return Wy;uP=1;var t=Z2(),e=WF(),r=JF(),n=_h(),i=r(function(a,s){if(a==null)return[];var u=s.length;return u>1&&n(a,s[0],s[1])?s=[]:u>2&&n(s[0],s[1],s[2])&&(s=[s[0]]),e(a,t(s,1),[])});return Wy=i,Wy}var ZF=QF();const Ax=Ye(ZF);function fu(t){"@babel/helpers - typeof";return fu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fu(t)}function R0(){return R0=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},R0.apply(this,arguments)}function e9(t,e){return i9(t)||n9(t,e)||r9(t,e)||t9()}function t9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
274
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function r9(t,e){if(t){if(typeof t=="string")return cP(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return cP(t,e)}}function cP(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function n9(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function i9(t){if(Array.isArray(t))return t}function fP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Hy(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?fP(Object(r),!0).forEach(function(n){a9(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):fP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function a9(t,e,r){return e=o9(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o9(t){var e=s9(t,"string");return fu(e)=="symbol"?e:e+""}function s9(t,e){if(fu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(fu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function l9(t){return Array.isArray(t)&&Lt(t[0])&&Lt(t[1])?t.join(" ~ "):t}var u9=function(e){var r=e.separator,n=r===void 0?" : ":r,i=e.contentStyle,a=i===void 0?{}:i,s=e.itemStyle,u=s===void 0?{}:s,c=e.labelStyle,f=c===void 0?{}:c,p=e.payload,h=e.formatter,g=e.itemSorter,v=e.wrapperClassName,w=e.labelClassName,x=e.label,y=e.labelFormatter,S=e.accessibilityLayer,k=S===void 0?!1:S,E=function(){if(p&&p.length){var B={padding:0,margin:0},F=(g?Ax(p,g):p).map(function(J,V){if(J.type==="none")return null;var K=Hy({display:"block",paddingTop:4,paddingBottom:4,color:J.color||"#000"},u),Z=J.formatter||h||l9,G=J.value,ee=J.name,U=G,L=ee;if(Z&&U!=null&&L!=null){var W=Z(G,ee,J,V,p);if(Array.isArray(W)){var te=e9(W,2);U=te[0],L=te[1]}else U=W}return I.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(V),style:K},Lt(L)?I.createElement("span",{className:"recharts-tooltip-item-name"},L):null,Lt(L)?I.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,I.createElement("span",{className:"recharts-tooltip-item-value"},U),I.createElement("span",{className:"recharts-tooltip-item-unit"},J.unit||""))});return I.createElement("ul",{className:"recharts-tooltip-item-list",style:B},F)}return null},P=Hy({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),O=Hy({margin:0},f),A=!Me(x),C=A?x:"",R=Le("recharts-default-tooltip",v),M=Le("recharts-tooltip-label",w);A&&y&&p!==void 0&&p!==null&&(C=y(x,p));var H=k?{role:"status","aria-live":"assertive"}:{};return I.createElement("div",R0({className:R,style:P},H),I.createElement("p",{className:M,style:O},I.isValidElement(C)?C:"".concat(C)),E())};function du(t){"@babel/helpers - typeof";return du=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},du(t)}function Ef(t,e,r){return e=c9(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function c9(t){var e=f9(t,"string");return du(e)=="symbol"?e:e+""}function f9(t,e){if(du(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(du(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var jl="recharts-tooltip-wrapper",d9={visibility:"hidden"};function h9(t){var e=t.coordinate,r=t.translateX,n=t.translateY;return Le(jl,Ef(Ef(Ef(Ef({},"".concat(jl,"-right"),fe(r)&&e&&fe(e.x)&&r>=e.x),"".concat(jl,"-left"),fe(r)&&e&&fe(e.x)&&r<e.x),"".concat(jl,"-bottom"),fe(n)&&e&&fe(e.y)&&n>=e.y),"".concat(jl,"-top"),fe(n)&&e&&fe(e.y)&&n<e.y))}function dP(t){var e=t.allowEscapeViewBox,r=t.coordinate,n=t.key,i=t.offsetTopLeft,a=t.position,s=t.reverseDirection,u=t.tooltipDimension,c=t.viewBox,f=t.viewBoxDimension;if(a&&fe(a[n]))return a[n];var p=r[n]-u-i,h=r[n]+i;if(e[n])return s[n]?p:h;if(s[n]){var g=p,v=c[n];return g<v?Math.max(h,c[n]):Math.max(p,c[n])}var w=h+u,x=c[n]+f;return w>x?Math.max(p,c[n]):Math.max(h,c[n])}function p9(t){var e=t.translateX,r=t.translateY,n=t.useTranslate3d;return{transform:n?"translate3d(".concat(e,"px, ").concat(r,"px, 0)"):"translate(".concat(e,"px, ").concat(r,"px)")}}function m9(t){var e=t.allowEscapeViewBox,r=t.coordinate,n=t.offsetTopLeft,i=t.position,a=t.reverseDirection,s=t.tooltipBox,u=t.useTranslate3d,c=t.viewBox,f,p,h;return s.height>0&&s.width>0&&r?(p=dP({allowEscapeViewBox:e,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:s.width,viewBox:c,viewBoxDimension:c.width}),h=dP({allowEscapeViewBox:e,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:s.height,viewBox:c,viewBoxDimension:c.height}),f=p9({translateX:p,translateY:h,useTranslate3d:u})):f=d9,{cssProperties:f,cssClasses:h9({translateX:p,translateY:h,coordinate:r})}}function as(t){"@babel/helpers - typeof";return as=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},as(t)}function hP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function pP(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?hP(Object(r),!0).forEach(function(n){$0(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):hP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function g9(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v9(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,iI(n.key),n)}}function y9(t,e,r){return e&&v9(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function b9(t,e,r){return e=dd(e),w9(t,nI()?Reflect.construct(e,r||[],dd(t).constructor):e.apply(t,r))}function w9(t,e){if(e&&(as(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return x9(t)}function x9(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function nI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nI=function(){return!!t})()}function dd(t){return dd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},dd(t)}function _9(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&I0(t,e)}function I0(t,e){return I0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},I0(t,e)}function $0(t,e,r){return e=iI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function iI(t){var e=S9(t,"string");return as(e)=="symbol"?e:e+""}function S9(t,e){if(as(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(as(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var mP=1,k9=(function(t){function e(){var r;g9(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=b9(this,e,[].concat(i)),$0(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),$0(r,"handleKeyDown",function(s){if(s.key==="Escape"){var u,c,f,p;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(u=(c=r.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&u!==void 0?u:0,y:(f=(p=r.props.coordinate)===null||p===void 0?void 0:p.y)!==null&&f!==void 0?f:0}})}}),r}return _9(e,t),y9(e,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>mP||Math.abs(n.height-this.state.lastBoundingBox.height)>mP)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,a=i.active,s=i.allowEscapeViewBox,u=i.animationDuration,c=i.animationEasing,f=i.children,p=i.coordinate,h=i.hasPayload,g=i.isAnimationActive,v=i.offset,w=i.position,x=i.reverseDirection,y=i.useTranslate3d,S=i.viewBox,k=i.wrapperStyle,E=m9({allowEscapeViewBox:s,coordinate:p,offsetTopLeft:v,position:w,reverseDirection:x,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:S}),P=E.cssClasses,O=E.cssProperties,A=pP(pP({transition:g&&a?"transform ".concat(u,"ms ").concat(c):void 0},O),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&h?"visible":"hidden",position:"absolute",top:0,left:0},k);return I.createElement("div",{tabIndex:-1,className:P,style:A,ref:function(R){n.wrapperNode=R}},f)}}])})($.PureComponent),O9=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},to={isSsr:O9()};function os(t){"@babel/helpers - typeof";return os=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},os(t)}function gP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function vP(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?gP(Object(r),!0).forEach(function(n){Px(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function E9(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A9(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,oI(n.key),n)}}function P9(t,e,r){return e&&A9(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function T9(t,e,r){return e=hd(e),C9(t,aI()?Reflect.construct(e,r||[],hd(t).constructor):e.apply(t,r))}function C9(t,e){if(e&&(os(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return j9(t)}function j9(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function aI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(aI=function(){return!!t})()}function hd(t){return hd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},hd(t)}function R9(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&N0(t,e)}function N0(t,e){return N0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},N0(t,e)}function Px(t,e,r){return e=oI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function oI(t){var e=I9(t,"string");return os(e)=="symbol"?e:e+""}function I9(t,e){if(os(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(os(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function $9(t){return t.dataKey}function N9(t,e){return I.isValidElement(t)?I.cloneElement(t,e):typeof t=="function"?I.createElement(t,e):I.createElement(u9,e)}var vn=(function(t){function e(){return E9(this,e),T9(this,e,arguments)}return R9(e,t),P9(e,[{key:"render",value:function(){var n=this,i=this.props,a=i.active,s=i.allowEscapeViewBox,u=i.animationDuration,c=i.animationEasing,f=i.content,p=i.coordinate,h=i.filterNull,g=i.isAnimationActive,v=i.offset,w=i.payload,x=i.payloadUniqBy,y=i.position,S=i.reverseDirection,k=i.useTranslate3d,E=i.viewBox,P=i.wrapperStyle,O=w??[];h&&O.length&&(O=Y2(w.filter(function(C){return C.value!=null&&(C.hide!==!0||n.props.includeHidden)}),x,$9));var A=O.length>0;return I.createElement(k9,{allowEscapeViewBox:s,animationDuration:u,animationEasing:c,isAnimationActive:g,active:a,coordinate:p,hasPayload:A,offset:v,position:y,reverseDirection:S,useTranslate3d:k,viewBox:E,wrapperStyle:P},N9(f,vP(vP({},this.props),{},{payload:O})))}}])})($.PureComponent);Px(vn,"displayName","Tooltip");Px(vn,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!to.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var Vy,yP;function M9(){if(yP)return Vy;yP=1;var t=Wn(),e=function(){return t.Date.now()};return Vy=e,Vy}var Ky,bP;function L9(){if(bP)return Ky;bP=1;var t=/\s/;function e(r){for(var n=r.length;n--&&t.test(r.charAt(n)););return n}return Ky=e,Ky}var Gy,wP;function D9(){if(wP)return Gy;wP=1;var t=L9(),e=/^\s+/;function r(n){return n&&n.slice(0,t(n)+1).replace(e,"")}return Gy=r,Gy}var Xy,xP;function sI(){if(xP)return Xy;xP=1;var t=D9(),e=na(),r=Is(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,u=parseInt;function c(f){if(typeof f=="number")return f;if(r(f))return n;if(e(f)){var p=typeof f.valueOf=="function"?f.valueOf():f;f=e(p)?p+"":p}if(typeof f!="string")return f===0?f:+f;f=t(f);var h=a.test(f);return h||s.test(f)?u(f.slice(2),h?2:8):i.test(f)?n:+f}return Xy=c,Xy}var Yy,_P;function B9(){if(_P)return Yy;_P=1;var t=na(),e=M9(),r=sI(),n="Expected a function",i=Math.max,a=Math.min;function s(u,c,f){var p,h,g,v,w,x,y=0,S=!1,k=!1,E=!0;if(typeof u!="function")throw new TypeError(n);c=r(c)||0,t(f)&&(S=!!f.leading,k="maxWait"in f,g=k?i(r(f.maxWait)||0,c):g,E="trailing"in f?!!f.trailing:E);function P(F){var J=p,V=h;return p=h=void 0,y=F,v=u.apply(V,J),v}function O(F){return y=F,w=setTimeout(R,c),S?P(F):v}function A(F){var J=F-x,V=F-y,K=c-J;return k?a(K,g-V):K}function C(F){var J=F-x,V=F-y;return x===void 0||J>=c||J<0||k&&V>=g}function R(){var F=e();if(C(F))return M(F);w=setTimeout(R,A(F))}function M(F){return w=void 0,E&&p?P(F):(p=h=void 0,v)}function H(){w!==void 0&&clearTimeout(w),y=0,p=x=h=w=void 0}function z(){return w===void 0?v:M(e())}function B(){var F=e(),J=C(F);if(p=arguments,h=this,x=F,J){if(w===void 0)return O(x);if(k)return clearTimeout(w),w=setTimeout(R,c),P(x)}return w===void 0&&(w=setTimeout(R,c)),v}return B.cancel=H,B.flush=z,B}return Yy=s,Yy}var Jy,SP;function U9(){if(SP)return Jy;SP=1;var t=B9(),e=na(),r="Expected a function";function n(i,a,s){var u=!0,c=!0;if(typeof i!="function")throw new TypeError(r);return e(s)&&(u="leading"in s?!!s.leading:u,c="trailing"in s?!!s.trailing:c),t(i,a,{leading:u,maxWait:a,trailing:c})}return Jy=n,Jy}var q9=U9();const lI=Ye(q9);function hu(t){"@babel/helpers - typeof";return hu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hu(t)}function kP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Af(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?kP(Object(r),!0).forEach(function(n){z9(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):kP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function z9(t,e,r){return e=F9(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function F9(t){var e=W9(t,"string");return hu(e)=="symbol"?e:e+""}function W9(t,e){if(hu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(hu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function H9(t,e){return X9(t)||G9(t,e)||K9(t,e)||V9()}function V9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
275
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function K9(t,e){if(t){if(typeof t=="string")return OP(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return OP(t,e)}}function OP(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function G9(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function X9(t){if(Array.isArray(t))return t}var EP=$.forwardRef(function(t,e){var r=t.aspect,n=t.initialDimension,i=n===void 0?{width:-1,height:-1}:n,a=t.width,s=a===void 0?"100%":a,u=t.height,c=u===void 0?"100%":u,f=t.minWidth,p=f===void 0?0:f,h=t.minHeight,g=t.maxHeight,v=t.children,w=t.debounce,x=w===void 0?0:w,y=t.id,S=t.className,k=t.onResize,E=t.style,P=E===void 0?{}:E,O=$.useRef(null),A=$.useRef();A.current=k,$.useImperativeHandle(e,function(){return Object.defineProperty(O.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),O.current},configurable:!0})});var C=$.useState({containerWidth:i.width,containerHeight:i.height}),R=H9(C,2),M=R[0],H=R[1],z=$.useCallback(function(F,J){H(function(V){var K=Math.round(F),Z=Math.round(J);return V.containerWidth===K&&V.containerHeight===Z?V:{containerWidth:K,containerHeight:Z}})},[]);$.useEffect(function(){var F=function(ee){var U,L=ee[0].contentRect,W=L.width,te=L.height;z(W,te),(U=A.current)===null||U===void 0||U.call(A,W,te)};x>0&&(F=lI(F,x,{trailing:!0,leading:!1}));var J=new ResizeObserver(F),V=O.current.getBoundingClientRect(),K=V.width,Z=V.height;return z(K,Z),J.observe(O.current),function(){J.disconnect()}},[z,x]);var B=$.useMemo(function(){var F=M.containerWidth,J=M.containerHeight;if(F<0||J<0)return null;ci(Da(s)||Da(c),`The width(%s) and height(%s) are both fixed numbers,
276
+ maybe you don't need to use a ResponsiveContainer.`,s,c),ci(!r||r>0,"The aspect(%s) must be greater than zero.",r);var V=Da(s)?F:s,K=Da(c)?J:c;r&&r>0&&(V?K=V/r:K&&(V=K*r),g&&K>g&&(K=g)),ci(V>0||K>0,`The width(%s) and height(%s) of chart should be greater than 0,
277
+ please check the style of container, or the props width(%s) and height(%s),
278
+ or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
279
+ height and width.`,V,K,s,c,p,h,r);var Z=!Array.isArray(v)&&ui(v.type).endsWith("Chart");return I.Children.map(v,function(G){return I.isValidElement(G)?$.cloneElement(G,Af({width:V,height:K},Z?{style:Af({height:"100%",width:"100%",maxHeight:K,maxWidth:V},G.props.style)}:{})):G})},[r,v,c,g,h,p,M,s]);return I.createElement("div",{id:y?"".concat(y):void 0,className:Le("recharts-responsive-container",S),style:Af(Af({},P),{},{width:s,height:c,minWidth:p,minHeight:h,maxHeight:g}),ref:O},B)}),Sh=function(e){return null};Sh.displayName="Cell";function pu(t){"@babel/helpers - typeof";return pu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pu(t)}function AP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function M0(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?AP(Object(r),!0).forEach(function(n){Y9(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):AP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Y9(t,e,r){return e=J9(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function J9(t){var e=Q9(t,"string");return pu(e)=="symbol"?e:e+""}function Q9(t,e){if(pu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(pu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Mo={widthCache:{},cacheCount:0},Z9=2e3,eW={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},PP="recharts_measurement_span";function tW(t){var e=M0({},t);return Object.keys(e).forEach(function(r){e[r]||delete e[r]}),e}var Yl=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e==null||to.isSsr)return{width:0,height:0};var n=tW(r),i=JSON.stringify({text:e,copyStyle:n});if(Mo.widthCache[i])return Mo.widthCache[i];try{var a=document.getElementById(PP);a||(a=document.createElement("span"),a.setAttribute("id",PP),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var s=M0(M0({},eW),n);Object.assign(a.style,s),a.textContent="".concat(e);var u=a.getBoundingClientRect(),c={width:u.width,height:u.height};return Mo.widthCache[i]=c,++Mo.cacheCount>Z9&&(Mo.cacheCount=0,Mo.widthCache={}),c}catch{return{width:0,height:0}}},rW=function(e){return{top:e.top+window.scrollY-document.documentElement.clientTop,left:e.left+window.scrollX-document.documentElement.clientLeft}};function mu(t){"@babel/helpers - typeof";return mu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mu(t)}function pd(t,e){return oW(t)||aW(t,e)||iW(t,e)||nW()}function nW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
280
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iW(t,e){if(t){if(typeof t=="string")return TP(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return TP(t,e)}}function TP(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function aW(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function oW(t){if(Array.isArray(t))return t}function sW(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function CP(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,uW(n.key),n)}}function lW(t,e,r){return e&&CP(t.prototype,e),r&&CP(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function uW(t){var e=cW(t,"string");return mu(e)=="symbol"?e:e+""}function cW(t,e){if(mu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(mu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var jP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,RP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,fW=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,dW=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,uI={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},hW=Object.keys(uI),Wo="NaN";function pW(t,e){return t*uI[e]}var Pf=(function(){function t(e,r){sW(this,t),this.num=e,this.unit=r,this.num=e,this.unit=r,Number.isNaN(e)&&(this.unit=""),r!==""&&!fW.test(r)&&(this.num=NaN,this.unit=""),hW.includes(r)&&(this.num=pW(e,r),this.unit="px")}return lW(t,[{key:"add",value:function(r){return this.unit!==r.unit?new t(NaN,""):new t(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new t(NaN,""):new t(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new t(NaN,""):new t(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new t(NaN,""):new t(this.num/r.num,this.unit||r.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(r){var n,i=(n=dW.exec(r))!==null&&n!==void 0?n:[],a=pd(i,3),s=a[1],u=a[2];return new t(parseFloat(s),u??"")}}])})();function cI(t){if(t.includes(Wo))return Wo;for(var e=t;e.includes("*")||e.includes("/");){var r,n=(r=jP.exec(e))!==null&&r!==void 0?r:[],i=pd(n,4),a=i[1],s=i[2],u=i[3],c=Pf.parse(a??""),f=Pf.parse(u??""),p=s==="*"?c.multiply(f):c.divide(f);if(p.isNaN())return Wo;e=e.replace(jP,p.toString())}for(;e.includes("+")||/.-\d+(?:\.\d+)?/.test(e);){var h,g=(h=RP.exec(e))!==null&&h!==void 0?h:[],v=pd(g,4),w=v[1],x=v[2],y=v[3],S=Pf.parse(w??""),k=Pf.parse(y??""),E=x==="+"?S.add(k):S.subtract(k);if(E.isNaN())return Wo;e=e.replace(RP,E.toString())}return e}var IP=/\(([^()]*)\)/;function mW(t){for(var e=t;e.includes("(");){var r=IP.exec(e),n=pd(r,2),i=n[1];e=e.replace(IP,cI(i))}return e}function gW(t){var e=t.replace(/\s+/g,"");return e=mW(e),e=cI(e),e}function vW(t){try{return gW(t)}catch{return Wo}}function Qy(t){var e=vW(t.slice(5,-1));return e===Wo?"":e}var yW=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],bW=["dx","dy","angle","className","breakAll"];function L0(){return L0=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},L0.apply(this,arguments)}function $P(t,e){if(t==null)return{};var r=wW(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function wW(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function NP(t,e){return kW(t)||SW(t,e)||_W(t,e)||xW()}function xW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
281
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _W(t,e){if(t){if(typeof t=="string")return MP(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return MP(t,e)}}function MP(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function SW(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function kW(t){if(Array.isArray(t))return t}var fI=/[ \f\n\r\t\v\u2028\u2029]+/,dI=function(e){var r=e.children,n=e.breakAll,i=e.style;try{var a=[];Me(r)||(n?a=r.toString().split(""):a=r.toString().split(fI));var s=a.map(function(c){return{word:c,width:Yl(c,i).width}}),u=n?0:Yl(" ",i).width;return{wordsWithComputedWidth:s,spaceWidth:u}}catch{return null}},OW=function(e,r,n,i,a){var s=e.maxLines,u=e.children,c=e.style,f=e.breakAll,p=fe(s),h=u,g=function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return V.reduce(function(K,Z){var G=Z.word,ee=Z.width,U=K[K.length-1];if(U&&(i==null||a||U.width+ee+n<Number(i)))U.words.push(G),U.width+=ee+n;else{var L={words:[G],width:ee};K.push(L)}return K},[])},v=g(r),w=function(V){return V.reduce(function(K,Z){return K.width>Z.width?K:Z})};if(!p)return v;for(var x="…",y=function(V){var K=h.slice(0,V),Z=dI({breakAll:f,style:c,children:K+x}).wordsWithComputedWidth,G=g(Z),ee=G.length>s||w(G).width>Number(i);return[ee,G]},S=0,k=h.length-1,E=0,P;S<=k&&E<=h.length-1;){var O=Math.floor((S+k)/2),A=O-1,C=y(A),R=NP(C,2),M=R[0],H=R[1],z=y(O),B=NP(z,1),F=B[0];if(!M&&!F&&(S=O+1),M&&F&&(k=O-1),!M&&F){P=H;break}E++}return P||v},LP=function(e){var r=Me(e)?[]:e.toString().split(fI);return[{words:r}]},EW=function(e){var r=e.width,n=e.scaleToFit,i=e.children,a=e.style,s=e.breakAll,u=e.maxLines;if((r||n)&&!to.isSsr){var c,f,p=dI({breakAll:s,children:i,style:a});if(p){var h=p.wordsWithComputedWidth,g=p.spaceWidth;c=h,f=g}else return LP(i);return OW({breakAll:s,children:i,maxLines:u,style:a},c,f,r,n)}return LP(i)},DP="#808080",Xa=function(e){var r=e.x,n=r===void 0?0:r,i=e.y,a=i===void 0?0:i,s=e.lineHeight,u=s===void 0?"1em":s,c=e.capHeight,f=c===void 0?"0.71em":c,p=e.scaleToFit,h=p===void 0?!1:p,g=e.textAnchor,v=g===void 0?"start":g,w=e.verticalAnchor,x=w===void 0?"end":w,y=e.fill,S=y===void 0?DP:y,k=$P(e,yW),E=$.useMemo(function(){return EW({breakAll:k.breakAll,children:k.children,maxLines:k.maxLines,scaleToFit:h,style:k.style,width:k.width})},[k.breakAll,k.children,k.maxLines,h,k.style,k.width]),P=k.dx,O=k.dy,A=k.angle,C=k.className,R=k.breakAll,M=$P(k,bW);if(!Lt(n)||!Lt(a))return null;var H=n+(fe(P)?P:0),z=a+(fe(O)?O:0),B;switch(x){case"start":B=Qy("calc(".concat(f,")"));break;case"middle":B=Qy("calc(".concat((E.length-1)/2," * -").concat(u," + (").concat(f," / 2))"));break;default:B=Qy("calc(".concat(E.length-1," * -").concat(u,")"));break}var F=[];if(h){var J=E[0].width,V=k.width;F.push("scale(".concat((fe(V)?V/J:1)/J,")"))}return A&&F.push("rotate(".concat(A,", ").concat(H,", ").concat(z,")")),F.length&&(M.transform=F.join(" ")),I.createElement("text",L0({},Ee(M,!0),{x:H,y:z,className:Le("recharts-text",C),textAnchor:v,fill:S.includes("url")?DP:S}),E.map(function(K,Z){var G=K.words.join(R?"":" ");return I.createElement("tspan",{x:H,dy:Z===0?B:u,key:"".concat(G,"-").concat(Z)},G)}))};function ta(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function AW(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Tx(t){let e,r,n;t.length!==2?(e=ta,r=(u,c)=>ta(t(u),c),n=(u,c)=>t(u)-c):(e=t===ta||t===AW?t:PW,r=t,n=t);function i(u,c,f=0,p=u.length){if(f<p){if(e(c,c)!==0)return p;do{const h=f+p>>>1;r(u[h],c)<0?f=h+1:p=h}while(f<p)}return f}function a(u,c,f=0,p=u.length){if(f<p){if(e(c,c)!==0)return p;do{const h=f+p>>>1;r(u[h],c)<=0?f=h+1:p=h}while(f<p)}return f}function s(u,c,f=0,p=u.length){const h=i(u,c,f,p-1);return h>f&&n(u[h-1],c)>-n(u[h],c)?h-1:h}return{left:i,center:s,right:a}}function PW(){return 0}function hI(t){return t===null?NaN:+t}function*TW(t,e){for(let r of t)r!=null&&(r=+r)>=r&&(yield r)}const CW=Tx(ta),Yu=CW.right;Tx(hI).center;class BP extends Map{constructor(e,r=IW){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(const[n,i]of e)this.set(n,i)}get(e){return super.get(UP(this,e))}has(e){return super.has(UP(this,e))}set(e,r){return super.set(jW(this,e),r)}delete(e){return super.delete(RW(this,e))}}function UP({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):r}function jW({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function RW({_intern:t,_key:e},r){const n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function IW(t){return t!==null&&typeof t=="object"?t.valueOf():t}function $W(t=ta){if(t===ta)return pI;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,r)=>{const n=t(e,r);return n||n===0?n:(t(r,r)===0)-(t(e,e)===0)}}function pI(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}const NW=Math.sqrt(50),MW=Math.sqrt(10),LW=Math.sqrt(2);function md(t,e,r){const n=(e-t)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=a>=NW?10:a>=MW?5:a>=LW?2:1;let u,c,f;return i<0?(f=Math.pow(10,-i)/s,u=Math.round(t*f),c=Math.round(e*f),u/f<t&&++u,c/f>e&&--c,f=-f):(f=Math.pow(10,i)*s,u=Math.round(t/f),c=Math.round(e/f),u*f<t&&++u,c*f>e&&--c),c<u&&.5<=r&&r<2?md(t,e,r*2):[u,c,f]}function D0(t,e,r){if(e=+e,t=+t,r=+r,!(r>0))return[];if(t===e)return[t];const n=e<t,[i,a,s]=n?md(e,t,r):md(t,e,r);if(!(a>=i))return[];const u=a-i+1,c=new Array(u);if(n)if(s<0)for(let f=0;f<u;++f)c[f]=(a-f)/-s;else for(let f=0;f<u;++f)c[f]=(a-f)*s;else if(s<0)for(let f=0;f<u;++f)c[f]=(i+f)/-s;else for(let f=0;f<u;++f)c[f]=(i+f)*s;return c}function B0(t,e,r){return e=+e,t=+t,r=+r,md(t,e,r)[2]}function U0(t,e,r){e=+e,t=+t,r=+r;const n=e<t,i=n?B0(e,t,r):B0(t,e,r);return(n?-1:1)*(i<0?1/-i:i)}function qP(t,e){let r;for(const n of t)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function zP(t,e){let r;for(const n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function mI(t,e,r=0,n=1/0,i){if(e=Math.floor(e),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(t.length-1,n)),!(r<=e&&e<=n))return t;for(i=i===void 0?pI:$W(i);n>r;){if(n-r>600){const c=n-r+1,f=e-r+1,p=Math.log(c),h=.5*Math.exp(2*p/3),g=.5*Math.sqrt(p*h*(c-h)/c)*(f-c/2<0?-1:1),v=Math.max(r,Math.floor(e-f*h/c+g)),w=Math.min(n,Math.floor(e+(c-f)*h/c+g));mI(t,e,v,w,i)}const a=t[e];let s=r,u=n;for(Rl(t,r,e),i(t[n],a)>0&&Rl(t,r,n);s<u;){for(Rl(t,s,u),++s,--u;i(t[s],a)<0;)++s;for(;i(t[u],a)>0;)--u}i(t[r],a)===0?Rl(t,r,u):(++u,Rl(t,u,n)),u<=e&&(r=u+1),e<=u&&(n=u-1)}return t}function Rl(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function DW(t,e,r){if(t=Float64Array.from(TW(t)),!(!(n=t.length)||isNaN(e=+e))){if(e<=0||n<2)return zP(t);if(e>=1)return qP(t);var n,i=(n-1)*e,a=Math.floor(i),s=qP(mI(t,a).subarray(0,a+1)),u=zP(t.subarray(a+1));return s+(u-s)*(i-a)}}function BW(t,e,r=hI){if(!(!(n=t.length)||isNaN(e=+e))){if(e<=0||n<2)return+r(t[0],0,t);if(e>=1)return+r(t[n-1],n-1,t);var n,i=(n-1)*e,a=Math.floor(i),s=+r(t[a],a,t),u=+r(t[a+1],a+1,t);return s+(u-s)*(i-a)}}function UW(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((e-t)/r))|0,a=new Array(i);++n<i;)a[n]=t+n*r;return a}function an(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function wi(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const q0=Symbol("implicit");function Cx(){var t=new BP,e=[],r=[],n=q0;function i(a){let s=t.get(a);if(s===void 0){if(n!==q0)return n;t.set(a,s=e.push(a)-1)}return r[s%r.length]}return i.domain=function(a){if(!arguments.length)return e.slice();e=[],t=new BP;for(const s of a)t.has(s)||t.set(s,e.push(s)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return Cx(e,r).unknown(n)},an.apply(i,arguments),i}function gu(){var t=Cx().unknown(void 0),e=t.domain,r=t.range,n=0,i=1,a,s,u=!1,c=0,f=0,p=.5;delete t.unknown;function h(){var g=e().length,v=i<n,w=v?i:n,x=v?n:i;a=(x-w)/Math.max(1,g-c+f*2),u&&(a=Math.floor(a)),w+=(x-w-a*(g-c))*p,s=a*(1-c),u&&(w=Math.round(w),s=Math.round(s));var y=UW(g).map(function(S){return w+a*S});return r(v?y.reverse():y)}return t.domain=function(g){return arguments.length?(e(g),h()):e()},t.range=function(g){return arguments.length?([n,i]=g,n=+n,i=+i,h()):[n,i]},t.rangeRound=function(g){return[n,i]=g,n=+n,i=+i,u=!0,h()},t.bandwidth=function(){return s},t.step=function(){return a},t.round=function(g){return arguments.length?(u=!!g,h()):u},t.padding=function(g){return arguments.length?(c=Math.min(1,f=+g),h()):c},t.paddingInner=function(g){return arguments.length?(c=Math.min(1,g),h()):c},t.paddingOuter=function(g){return arguments.length?(f=+g,h()):f},t.align=function(g){return arguments.length?(p=Math.max(0,Math.min(1,g)),h()):p},t.copy=function(){return gu(e(),[n,i]).round(u).paddingInner(c).paddingOuter(f).align(p)},an.apply(h(),arguments)}function gI(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return gI(e())},t}function Jl(){return gI(gu.apply(null,arguments).paddingInner(1))}function jx(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function vI(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function Ju(){}var vu=.7,gd=1/vu,Qo="\\s*([+-]?\\d+)\\s*",yu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Bn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",qW=/^#([0-9a-f]{3,8})$/,zW=new RegExp(`^rgb\\(${Qo},${Qo},${Qo}\\)$`),FW=new RegExp(`^rgb\\(${Bn},${Bn},${Bn}\\)$`),WW=new RegExp(`^rgba\\(${Qo},${Qo},${Qo},${yu}\\)$`),HW=new RegExp(`^rgba\\(${Bn},${Bn},${Bn},${yu}\\)$`),VW=new RegExp(`^hsl\\(${yu},${Bn},${Bn}\\)$`),KW=new RegExp(`^hsla\\(${yu},${Bn},${Bn},${yu}\\)$`),FP={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};jx(Ju,bu,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:WP,formatHex:WP,formatHex8:GW,formatHsl:XW,formatRgb:HP,toString:HP});function WP(){return this.rgb().formatHex()}function GW(){return this.rgb().formatHex8()}function XW(){return yI(this).formatHsl()}function HP(){return this.rgb().formatRgb()}function bu(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=qW.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?VP(e):r===3?new kr(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?Tf(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?Tf(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=zW.exec(t))?new kr(e[1],e[2],e[3],1):(e=FW.exec(t))?new kr(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=WW.exec(t))?Tf(e[1],e[2],e[3],e[4]):(e=HW.exec(t))?Tf(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=VW.exec(t))?XP(e[1],e[2]/100,e[3]/100,1):(e=KW.exec(t))?XP(e[1],e[2]/100,e[3]/100,e[4]):FP.hasOwnProperty(t)?VP(FP[t]):t==="transparent"?new kr(NaN,NaN,NaN,0):null}function VP(t){return new kr(t>>16&255,t>>8&255,t&255,1)}function Tf(t,e,r,n){return n<=0&&(t=e=r=NaN),new kr(t,e,r,n)}function YW(t){return t instanceof Ju||(t=bu(t)),t?(t=t.rgb(),new kr(t.r,t.g,t.b,t.opacity)):new kr}function z0(t,e,r,n){return arguments.length===1?YW(t):new kr(t,e,r,n??1)}function kr(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}jx(kr,z0,vI(Ju,{brighter(t){return t=t==null?gd:Math.pow(gd,t),new kr(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?vu:Math.pow(vu,t),new kr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new kr(Wa(this.r),Wa(this.g),Wa(this.b),vd(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:KP,formatHex:KP,formatHex8:JW,formatRgb:GP,toString:GP}));function KP(){return`#${Ba(this.r)}${Ba(this.g)}${Ba(this.b)}`}function JW(){return`#${Ba(this.r)}${Ba(this.g)}${Ba(this.b)}${Ba((isNaN(this.opacity)?1:this.opacity)*255)}`}function GP(){const t=vd(this.opacity);return`${t===1?"rgb(":"rgba("}${Wa(this.r)}, ${Wa(this.g)}, ${Wa(this.b)}${t===1?")":`, ${t})`}`}function vd(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Wa(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ba(t){return t=Wa(t),(t<16?"0":"")+t.toString(16)}function XP(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new _n(t,e,r,n)}function yI(t){if(t instanceof _n)return new _n(t.h,t.s,t.l,t.opacity);if(t instanceof Ju||(t=bu(t)),!t)return new _n;if(t instanceof _n)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),a=Math.max(e,r,n),s=NaN,u=a-i,c=(a+i)/2;return u?(e===a?s=(r-n)/u+(r<n)*6:r===a?s=(n-e)/u+2:s=(e-r)/u+4,u/=c<.5?a+i:2-a-i,s*=60):u=c>0&&c<1?0:s,new _n(s,u,c,t.opacity)}function QW(t,e,r,n){return arguments.length===1?yI(t):new _n(t,e,r,n??1)}function _n(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}jx(_n,QW,vI(Ju,{brighter(t){return t=t==null?gd:Math.pow(gd,t),new _n(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?vu:Math.pow(vu,t),new _n(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new kr(Zy(t>=240?t-240:t+120,i,n),Zy(t,i,n),Zy(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new _n(YP(this.h),Cf(this.s),Cf(this.l),vd(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 t=vd(this.opacity);return`${t===1?"hsl(":"hsla("}${YP(this.h)}, ${Cf(this.s)*100}%, ${Cf(this.l)*100}%${t===1?")":`, ${t})`}`}}));function YP(t){return t=(t||0)%360,t<0?t+360:t}function Cf(t){return Math.max(0,Math.min(1,t||0))}function Zy(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const Rx=t=>()=>t;function ZW(t,e){return function(r){return t+r*e}}function eH(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function tH(t){return(t=+t)==1?bI:function(e,r){return r-e?eH(e,r,t):Rx(isNaN(e)?r:e)}}function bI(t,e){var r=e-t;return r?ZW(t,r):Rx(isNaN(t)?e:t)}const JP=(function t(e){var r=tH(e);function n(i,a){var s=r((i=z0(i)).r,(a=z0(a)).r),u=r(i.g,a.g),c=r(i.b,a.b),f=bI(i.opacity,a.opacity);return function(p){return i.r=s(p),i.g=u(p),i.b=c(p),i.opacity=f(p),i+""}}return n.gamma=t,n})(1);function rH(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=t[i]*(1-a)+e[i]*a;return n}}function nH(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function iH(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,i=new Array(n),a=new Array(r),s;for(s=0;s<n;++s)i[s]=Ds(t[s],e[s]);for(;s<r;++s)a[s]=e[s];return function(u){for(s=0;s<n;++s)a[s]=i[s](u);return a}}function aH(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}function yd(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function oH(t,e){var r={},n={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?r[i]=Ds(t[i],e[i]):n[i]=e[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var F0=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,eb=new RegExp(F0.source,"g");function sH(t){return function(){return t}}function lH(t){return function(e){return t(e)+""}}function uH(t,e){var r=F0.lastIndex=eb.lastIndex=0,n,i,a,s=-1,u=[],c=[];for(t=t+"",e=e+"";(n=F0.exec(t))&&(i=eb.exec(e));)(a=i.index)>r&&(a=e.slice(r,a),u[s]?u[s]+=a:u[++s]=a),(n=n[0])===(i=i[0])?u[s]?u[s]+=i:u[++s]=i:(u[++s]=null,c.push({i:s,x:yd(n,i)})),r=eb.lastIndex;return r<e.length&&(a=e.slice(r),u[s]?u[s]+=a:u[++s]=a),u.length<2?c[0]?lH(c[0].x):sH(e):(e=c.length,function(f){for(var p=0,h;p<e;++p)u[(h=c[p]).i]=h.x(f);return u.join("")})}function Ds(t,e){var r=typeof e,n;return e==null||r==="boolean"?Rx(e):(r==="number"?yd:r==="string"?(n=bu(e))?(e=n,JP):uH:e instanceof bu?JP:e instanceof Date?aH:nH(e)?rH:Array.isArray(e)?iH:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?oH:yd)(t,e)}function Ix(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}function cH(t,e){e===void 0&&(e=t,t=Ds);for(var r=0,n=e.length-1,i=e[0],a=new Array(n<0?0:n);r<n;)a[r]=t(i,i=e[++r]);return function(s){var u=Math.max(0,Math.min(n-1,Math.floor(s*=n)));return a[u](s-u)}}function fH(t){return function(){return t}}function bd(t){return+t}var QP=[0,1];function hr(t){return t}function W0(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:fH(isNaN(e)?NaN:.5)}function dH(t,e){var r;return t>e&&(r=t,t=e,e=r),function(n){return Math.max(t,Math.min(e,n))}}function hH(t,e,r){var n=t[0],i=t[1],a=e[0],s=e[1];return i<n?(n=W0(i,n),a=r(s,a)):(n=W0(n,i),a=r(a,s)),function(u){return a(n(u))}}function pH(t,e,r){var n=Math.min(t.length,e.length)-1,i=new Array(n),a=new Array(n),s=-1;for(t[n]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<n;)i[s]=W0(t[s],t[s+1]),a[s]=r(e[s],e[s+1]);return function(u){var c=Yu(t,u,1,n)-1;return a[c](i[c](u))}}function Qu(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function kh(){var t=QP,e=QP,r=Ds,n,i,a,s=hr,u,c,f;function p(){var g=Math.min(t.length,e.length);return s!==hr&&(s=dH(t[0],t[g-1])),u=g>2?pH:hH,c=f=null,h}function h(g){return g==null||isNaN(g=+g)?a:(c||(c=u(t.map(n),e,r)))(n(s(g)))}return h.invert=function(g){return s(i((f||(f=u(e,t.map(n),yd)))(g)))},h.domain=function(g){return arguments.length?(t=Array.from(g,bd),p()):t.slice()},h.range=function(g){return arguments.length?(e=Array.from(g),p()):e.slice()},h.rangeRound=function(g){return e=Array.from(g),r=Ix,p()},h.clamp=function(g){return arguments.length?(s=g?!0:hr,p()):s!==hr},h.interpolate=function(g){return arguments.length?(r=g,p()):r},h.unknown=function(g){return arguments.length?(a=g,h):a},function(g,v){return n=g,i=v,p()}}function $x(){return kh()(hr,hr)}function mH(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function wd(t,e){if(!isFinite(t)||t===0)return null;var r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}function ss(t){return t=wd(Math.abs(t)),t?t[1]:NaN}function gH(t,e){return function(r,n){for(var i=r.length,a=[],s=0,u=t[0],c=0;i>0&&u>0&&(c+u+1>n&&(u=Math.max(1,n-c)),a.push(r.substring(i-=u,i+u)),!((c+=u+1)>n));)u=t[s=(s+1)%t.length];return a.reverse().join(e)}}function vH(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var yH=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function wu(t){if(!(e=yH.exec(t)))throw new Error("invalid format: "+t);var e;return new Nx({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}wu.prototype=Nx.prototype;function Nx(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}Nx.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 bH(t){e:for(var e=t.length,r=1,n=-1,i;r<e;++r)switch(t[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+t[r])break e;n>0&&(n=0);break}return n>0?t.slice(0,n)+t.slice(i+1):t}var xd;function wH(t,e){var r=wd(t,e);if(!r)return xd=void 0,t.toPrecision(e);var n=r[0],i=r[1],a=i-(xd=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=n.length;return a===s?n:a>s?n+new Array(a-s+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+wd(t,Math.max(0,e+a-1))[0]}function ZP(t,e){var r=wd(t,e);if(!r)return t+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const eT={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:mH,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>ZP(t*100,e),r:ZP,s:wH,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function tT(t){return t}var rT=Array.prototype.map,nT=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function xH(t){var e=t.grouping===void 0||t.thousands===void 0?tT:gH(rT.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",n=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?tT:vH(rT.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",u=t.minus===void 0?"−":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function f(h,g){h=wu(h);var v=h.fill,w=h.align,x=h.sign,y=h.symbol,S=h.zero,k=h.width,E=h.comma,P=h.precision,O=h.trim,A=h.type;A==="n"?(E=!0,A="g"):eT[A]||(P===void 0&&(P=12),O=!0,A="g"),(S||v==="0"&&w==="=")&&(S=!0,v="0",w="=");var C=(g&&g.prefix!==void 0?g.prefix:"")+(y==="$"?r:y==="#"&&/[boxX]/.test(A)?"0"+A.toLowerCase():""),R=(y==="$"?n:/[%p]/.test(A)?s:"")+(g&&g.suffix!==void 0?g.suffix:""),M=eT[A],H=/[defgprs%]/.test(A);P=P===void 0?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,P)):Math.max(0,Math.min(20,P));function z(B){var F=C,J=R,V,K,Z;if(A==="c")J=M(B)+J,B="";else{B=+B;var G=B<0||1/B<0;if(B=isNaN(B)?c:M(Math.abs(B),P),O&&(B=bH(B)),G&&+B==0&&x!=="+"&&(G=!1),F=(G?x==="("?x:u:x==="-"||x==="("?"":x)+F,J=(A==="s"&&!isNaN(B)&&xd!==void 0?nT[8+xd/3]:"")+J+(G&&x==="("?")":""),H){for(V=-1,K=B.length;++V<K;)if(Z=B.charCodeAt(V),48>Z||Z>57){J=(Z===46?i+B.slice(V+1):B.slice(V))+J,B=B.slice(0,V);break}}}E&&!S&&(B=e(B,1/0));var ee=F.length+B.length+J.length,U=ee<k?new Array(k-ee+1).join(v):"";switch(E&&S&&(B=e(U+B,U.length?k-J.length:1/0),U=""),w){case"<":B=F+B+J+U;break;case"=":B=F+U+B+J;break;case"^":B=U.slice(0,ee=U.length>>1)+F+B+J+U.slice(ee);break;default:B=U+F+B+J;break}return a(B)}return z.toString=function(){return h+""},z}function p(h,g){var v=Math.max(-8,Math.min(8,Math.floor(ss(g)/3)))*3,w=Math.pow(10,-v),x=f((h=wu(h),h.type="f",h),{suffix:nT[8+v/3]});return function(y){return x(w*y)}}return{format:f,formatPrefix:p}}var jf,Mx,wI;_H({thousands:",",grouping:[3],currency:["$",""]});function _H(t){return jf=xH(t),Mx=jf.format,wI=jf.formatPrefix,jf}function SH(t){return Math.max(0,-ss(Math.abs(t)))}function kH(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ss(e)/3)))*3-ss(Math.abs(t)))}function OH(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,ss(e)-ss(t))+1}function xI(t,e,r,n){var i=U0(t,e,r),a;switch(n=wu(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return n.precision==null&&!isNaN(a=kH(i,s))&&(n.precision=a),wI(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=OH(i,Math.max(Math.abs(t),Math.abs(e))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=SH(i))&&(n.precision=a-(n.type==="%")*2);break}}return Mx(n)}function ia(t){var e=t.domain;return t.ticks=function(r){var n=e();return D0(n[0],n[n.length-1],r??10)},t.tickFormat=function(r,n){var i=e();return xI(i[0],i[i.length-1],r??10,n)},t.nice=function(r){r==null&&(r=10);var n=e(),i=0,a=n.length-1,s=n[i],u=n[a],c,f,p=10;for(u<s&&(f=s,s=u,u=f,f=i,i=a,a=f);p-- >0;){if(f=B0(s,u,r),f===c)return n[i]=s,n[a]=u,e(n);if(f>0)s=Math.floor(s/f)*f,u=Math.ceil(u/f)*f;else if(f<0)s=Math.ceil(s*f)/f,u=Math.floor(u*f)/f;else break;c=f}return t},t}function _d(){var t=$x();return t.copy=function(){return Qu(t,_d())},an.apply(t,arguments),ia(t)}function _I(t){var e;function r(n){return n==null||isNaN(n=+n)?e:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(t=Array.from(n,bd),r):t.slice()},r.unknown=function(n){return arguments.length?(e=n,r):e},r.copy=function(){return _I(t).unknown(e)},t=arguments.length?Array.from(t,bd):[0,1],ia(r)}function SI(t,e){t=t.slice();var r=0,n=t.length-1,i=t[r],a=t[n],s;return a<i&&(s=r,r=n,n=s,s=i,i=a,a=s),t[r]=e.floor(i),t[n]=e.ceil(a),t}function iT(t){return Math.log(t)}function aT(t){return Math.exp(t)}function EH(t){return-Math.log(-t)}function AH(t){return-Math.exp(-t)}function PH(t){return isFinite(t)?+("1e"+t):t<0?0:t}function TH(t){return t===10?PH:t===Math.E?Math.exp:e=>Math.pow(t,e)}function CH(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function oT(t){return(e,r)=>-t(-e,r)}function Lx(t){const e=t(iT,aT),r=e.domain;let n=10,i,a;function s(){return i=CH(n),a=TH(n),r()[0]<0?(i=oT(i),a=oT(a),t(EH,AH)):t(iT,aT),e}return e.base=function(u){return arguments.length?(n=+u,s()):n},e.domain=function(u){return arguments.length?(r(u),s()):r()},e.ticks=u=>{const c=r();let f=c[0],p=c[c.length-1];const h=p<f;h&&([f,p]=[p,f]);let g=i(f),v=i(p),w,x;const y=u==null?10:+u;let S=[];if(!(n%1)&&v-g<y){if(g=Math.floor(g),v=Math.ceil(v),f>0){for(;g<=v;++g)for(w=1;w<n;++w)if(x=g<0?w/a(-g):w*a(g),!(x<f)){if(x>p)break;S.push(x)}}else for(;g<=v;++g)for(w=n-1;w>=1;--w)if(x=g>0?w/a(-g):w*a(g),!(x<f)){if(x>p)break;S.push(x)}S.length*2<y&&(S=D0(f,p,y))}else S=D0(g,v,Math.min(v-g,y)).map(a);return h?S.reverse():S},e.tickFormat=(u,c)=>{if(u==null&&(u=10),c==null&&(c=n===10?"s":","),typeof c!="function"&&(!(n%1)&&(c=wu(c)).precision==null&&(c.trim=!0),c=Mx(c)),u===1/0)return c;const f=Math.max(1,n*u/e.ticks().length);return p=>{let h=p/a(Math.round(i(p)));return h*n<n-.5&&(h*=n),h<=f?c(p):""}},e.nice=()=>r(SI(r(),{floor:u=>a(Math.floor(i(u))),ceil:u=>a(Math.ceil(i(u)))})),e}function kI(){const t=Lx(kh()).domain([1,10]);return t.copy=()=>Qu(t,kI()).base(t.base()),an.apply(t,arguments),t}function sT(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function lT(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Dx(t){var e=1,r=t(sT(e),lT(e));return r.constant=function(n){return arguments.length?t(sT(e=+n),lT(e)):e},ia(r)}function OI(){var t=Dx(kh());return t.copy=function(){return Qu(t,OI()).constant(t.constant())},an.apply(t,arguments)}function uT(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function jH(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function RH(t){return t<0?-t*t:t*t}function Bx(t){var e=t(hr,hr),r=1;function n(){return r===1?t(hr,hr):r===.5?t(jH,RH):t(uT(r),uT(1/r))}return e.exponent=function(i){return arguments.length?(r=+i,n()):r},ia(e)}function Ux(){var t=Bx(kh());return t.copy=function(){return Qu(t,Ux()).exponent(t.exponent())},an.apply(t,arguments),t}function IH(){return Ux.apply(null,arguments).exponent(.5)}function cT(t){return Math.sign(t)*t*t}function $H(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function EI(){var t=$x(),e=[0,1],r=!1,n;function i(a){var s=$H(t(a));return isNaN(s)?n:r?Math.round(s):s}return i.invert=function(a){return t.invert(cT(a))},i.domain=function(a){return arguments.length?(t.domain(a),i):t.domain()},i.range=function(a){return arguments.length?(t.range((e=Array.from(a,bd)).map(cT)),i):e.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(t.clamp(a),i):t.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return EI(t.domain(),e).round(r).clamp(t.clamp()).unknown(n)},an.apply(i,arguments),ia(i)}function AI(){var t=[],e=[],r=[],n;function i(){var s=0,u=Math.max(1,e.length);for(r=new Array(u-1);++s<u;)r[s-1]=BW(t,s/u);return a}function a(s){return s==null||isNaN(s=+s)?n:e[Yu(r,s)]}return a.invertExtent=function(s){var u=e.indexOf(s);return u<0?[NaN,NaN]:[u>0?r[u-1]:t[0],u<r.length?r[u]:t[t.length-1]]},a.domain=function(s){if(!arguments.length)return t.slice();t=[];for(let u of s)u!=null&&!isNaN(u=+u)&&t.push(u);return t.sort(ta),i()},a.range=function(s){return arguments.length?(e=Array.from(s),i()):e.slice()},a.unknown=function(s){return arguments.length?(n=s,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return AI().domain(t).range(e).unknown(n)},an.apply(a,arguments)}function PI(){var t=0,e=1,r=1,n=[.5],i=[0,1],a;function s(c){return c!=null&&c<=c?i[Yu(n,c,0,r)]:a}function u(){var c=-1;for(n=new Array(r);++c<r;)n[c]=((c+1)*e-(c-r)*t)/(r+1);return s}return s.domain=function(c){return arguments.length?([t,e]=c,t=+t,e=+e,u()):[t,e]},s.range=function(c){return arguments.length?(r=(i=Array.from(c)).length-1,u()):i.slice()},s.invertExtent=function(c){var f=i.indexOf(c);return f<0?[NaN,NaN]:f<1?[t,n[0]]:f>=r?[n[r-1],e]:[n[f-1],n[f]]},s.unknown=function(c){return arguments.length&&(a=c),s},s.thresholds=function(){return n.slice()},s.copy=function(){return PI().domain([t,e]).range(i).unknown(a)},an.apply(ia(s),arguments)}function TI(){var t=[.5],e=[0,1],r,n=1;function i(a){return a!=null&&a<=a?e[Yu(t,a,0,n)]:r}return i.domain=function(a){return arguments.length?(t=Array.from(a),n=Math.min(t.length,e.length-1),i):t.slice()},i.range=function(a){return arguments.length?(e=Array.from(a),n=Math.min(t.length,e.length-1),i):e.slice()},i.invertExtent=function(a){var s=e.indexOf(a);return[t[s-1],t[s]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return TI().domain(t).range(e).unknown(r)},an.apply(i,arguments)}const tb=new Date,rb=new Date;function Dt(t,e,r,n){function i(a){return t(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(t(a=new Date(+a)),a),i.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),i.round=a=>{const s=i(a),u=i.ceil(a);return a-s<u-a?s:u},i.offset=(a,s)=>(e(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,u)=>{const c=[];if(a=i.ceil(a),u=u==null?1:Math.floor(u),!(a<s)||!(u>0))return c;let f;do c.push(f=new Date(+a)),e(a,u),t(a);while(f<a&&a<s);return c},i.filter=a=>Dt(s=>{if(s>=s)for(;t(s),!a(s);)s.setTime(s-1)},(s,u)=>{if(s>=s)if(u<0)for(;++u<=0;)for(;e(s,-1),!a(s););else for(;--u>=0;)for(;e(s,1),!a(s););}),r&&(i.count=(a,s)=>(tb.setTime(+a),rb.setTime(+s),t(tb),t(rb),Math.floor(r(tb,rb))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?s=>n(s)%a===0:s=>i.count(0,s)%a===0):i)),i}const Sd=Dt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Sd.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Dt(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):Sd);Sd.range;const si=1e3,en=si*60,li=en*60,pi=li*24,qx=pi*7,fT=pi*30,nb=pi*365,Ua=Dt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*si)},(t,e)=>(e-t)/si,t=>t.getUTCSeconds());Ua.range;const zx=Dt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*si)},(t,e)=>{t.setTime(+t+e*en)},(t,e)=>(e-t)/en,t=>t.getMinutes());zx.range;const Fx=Dt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*en)},(t,e)=>(e-t)/en,t=>t.getUTCMinutes());Fx.range;const Wx=Dt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*si-t.getMinutes()*en)},(t,e)=>{t.setTime(+t+e*li)},(t,e)=>(e-t)/li,t=>t.getHours());Wx.range;const Hx=Dt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*li)},(t,e)=>(e-t)/li,t=>t.getUTCHours());Hx.range;const Zu=Dt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*en)/pi,t=>t.getDate()-1);Zu.range;const Oh=Dt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/pi,t=>t.getUTCDate()-1);Oh.range;const CI=Dt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/pi,t=>Math.floor(t/pi));CI.range;function ro(t){return Dt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*en)/qx)}const Eh=ro(0),kd=ro(1),NH=ro(2),MH=ro(3),ls=ro(4),LH=ro(5),DH=ro(6);Eh.range;kd.range;NH.range;MH.range;ls.range;LH.range;DH.range;function no(t){return Dt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/qx)}const Ah=no(0),Od=no(1),BH=no(2),UH=no(3),us=no(4),qH=no(5),zH=no(6);Ah.range;Od.range;BH.range;UH.range;us.range;qH.range;zH.range;const Vx=Dt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Vx.range;const Kx=Dt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Kx.range;const mi=Dt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());mi.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Dt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)});mi.range;const gi=Dt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());gi.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Dt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)});gi.range;function jI(t,e,r,n,i,a){const s=[[Ua,1,si],[Ua,5,5*si],[Ua,15,15*si],[Ua,30,30*si],[a,1,en],[a,5,5*en],[a,15,15*en],[a,30,30*en],[i,1,li],[i,3,3*li],[i,6,6*li],[i,12,12*li],[n,1,pi],[n,2,2*pi],[r,1,qx],[e,1,fT],[e,3,3*fT],[t,1,nb]];function u(f,p,h){const g=p<f;g&&([f,p]=[p,f]);const v=h&&typeof h.range=="function"?h:c(f,p,h),w=v?v.range(f,+p+1):[];return g?w.reverse():w}function c(f,p,h){const g=Math.abs(p-f)/h,v=Tx(([,,y])=>y).right(s,g);if(v===s.length)return t.every(U0(f/nb,p/nb,h));if(v===0)return Sd.every(Math.max(U0(f,p,h),1));const[w,x]=s[g/s[v-1][2]<s[v][2]/g?v-1:v];return w.every(x)}return[u,c]}const[FH,WH]=jI(gi,Kx,Ah,CI,Hx,Fx),[HH,VH]=jI(mi,Vx,Eh,Zu,Wx,zx);function ib(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function ab(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Il(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function KH(t){var e=t.dateTime,r=t.date,n=t.time,i=t.periods,a=t.days,s=t.shortDays,u=t.months,c=t.shortMonths,f=$l(i),p=Nl(i),h=$l(a),g=Nl(a),v=$l(s),w=Nl(s),x=$l(u),y=Nl(u),S=$l(c),k=Nl(c),E={a:Z,A:G,b:ee,B:U,c:null,d:vT,e:vT,f:g7,g:E7,G:P7,H:h7,I:p7,j:m7,L:RI,m:v7,M:y7,p:L,q:W,Q:wT,s:xT,S:b7,u:w7,U:x7,V:_7,w:S7,W:k7,x:null,X:null,y:O7,Y:A7,Z:T7,"%":bT},P={a:te,A:ue,b:le,B:de,c:null,d:yT,e:yT,f:I7,g:F7,G:H7,H:C7,I:j7,j:R7,L:$I,m:$7,M:N7,p:Re,q:pe,Q:wT,s:xT,S:M7,u:L7,U:D7,V:B7,w:U7,W:q7,x:null,X:null,y:z7,Y:W7,Z:V7,"%":bT},O={a:H,A:z,b:B,B:F,c:J,d:mT,e:mT,f:u7,g:pT,G:hT,H:gT,I:gT,j:a7,L:l7,m:i7,M:o7,p:M,q:n7,Q:f7,s:d7,S:s7,u:QH,U:ZH,V:e7,w:JH,W:t7,x:V,X:K,y:pT,Y:hT,Z:r7,"%":c7};E.x=A(r,E),E.X=A(n,E),E.c=A(e,E),P.x=A(r,P),P.X=A(n,P),P.c=A(e,P);function A(ne,_e){return function(Oe){var ie=[],ze=-1,Ie=0,ct=ne.length,at,ft,pr;for(Oe instanceof Date||(Oe=new Date(+Oe));++ze<ct;)ne.charCodeAt(ze)===37&&(ie.push(ne.slice(Ie,ze)),(ft=dT[at=ne.charAt(++ze)])!=null?at=ne.charAt(++ze):ft=at==="e"?" ":"0",(pr=_e[at])&&(at=pr(Oe,ft)),ie.push(at),Ie=ze+1);return ie.push(ne.slice(Ie,ze)),ie.join("")}}function C(ne,_e){return function(Oe){var ie=Il(1900,void 0,1),ze=R(ie,ne,Oe+="",0),Ie,ct;if(ze!=Oe.length)return null;if("Q"in ie)return new Date(ie.Q);if("s"in ie)return new Date(ie.s*1e3+("L"in ie?ie.L:0));if(_e&&!("Z"in ie)&&(ie.Z=0),"p"in ie&&(ie.H=ie.H%12+ie.p*12),ie.m===void 0&&(ie.m="q"in ie?ie.q:0),"V"in ie){if(ie.V<1||ie.V>53)return null;"w"in ie||(ie.w=1),"Z"in ie?(Ie=ab(Il(ie.y,0,1)),ct=Ie.getUTCDay(),Ie=ct>4||ct===0?Od.ceil(Ie):Od(Ie),Ie=Oh.offset(Ie,(ie.V-1)*7),ie.y=Ie.getUTCFullYear(),ie.m=Ie.getUTCMonth(),ie.d=Ie.getUTCDate()+(ie.w+6)%7):(Ie=ib(Il(ie.y,0,1)),ct=Ie.getDay(),Ie=ct>4||ct===0?kd.ceil(Ie):kd(Ie),Ie=Zu.offset(Ie,(ie.V-1)*7),ie.y=Ie.getFullYear(),ie.m=Ie.getMonth(),ie.d=Ie.getDate()+(ie.w+6)%7)}else("W"in ie||"U"in ie)&&("w"in ie||(ie.w="u"in ie?ie.u%7:"W"in ie?1:0),ct="Z"in ie?ab(Il(ie.y,0,1)).getUTCDay():ib(Il(ie.y,0,1)).getDay(),ie.m=0,ie.d="W"in ie?(ie.w+6)%7+ie.W*7-(ct+5)%7:ie.w+ie.U*7-(ct+6)%7);return"Z"in ie?(ie.H+=ie.Z/100|0,ie.M+=ie.Z%100,ab(ie)):ib(ie)}}function R(ne,_e,Oe,ie){for(var ze=0,Ie=_e.length,ct=Oe.length,at,ft;ze<Ie;){if(ie>=ct)return-1;if(at=_e.charCodeAt(ze++),at===37){if(at=_e.charAt(ze++),ft=O[at in dT?_e.charAt(ze++):at],!ft||(ie=ft(ne,Oe,ie))<0)return-1}else if(at!=Oe.charCodeAt(ie++))return-1}return ie}function M(ne,_e,Oe){var ie=f.exec(_e.slice(Oe));return ie?(ne.p=p.get(ie[0].toLowerCase()),Oe+ie[0].length):-1}function H(ne,_e,Oe){var ie=v.exec(_e.slice(Oe));return ie?(ne.w=w.get(ie[0].toLowerCase()),Oe+ie[0].length):-1}function z(ne,_e,Oe){var ie=h.exec(_e.slice(Oe));return ie?(ne.w=g.get(ie[0].toLowerCase()),Oe+ie[0].length):-1}function B(ne,_e,Oe){var ie=S.exec(_e.slice(Oe));return ie?(ne.m=k.get(ie[0].toLowerCase()),Oe+ie[0].length):-1}function F(ne,_e,Oe){var ie=x.exec(_e.slice(Oe));return ie?(ne.m=y.get(ie[0].toLowerCase()),Oe+ie[0].length):-1}function J(ne,_e,Oe){return R(ne,e,_e,Oe)}function V(ne,_e,Oe){return R(ne,r,_e,Oe)}function K(ne,_e,Oe){return R(ne,n,_e,Oe)}function Z(ne){return s[ne.getDay()]}function G(ne){return a[ne.getDay()]}function ee(ne){return c[ne.getMonth()]}function U(ne){return u[ne.getMonth()]}function L(ne){return i[+(ne.getHours()>=12)]}function W(ne){return 1+~~(ne.getMonth()/3)}function te(ne){return s[ne.getUTCDay()]}function ue(ne){return a[ne.getUTCDay()]}function le(ne){return c[ne.getUTCMonth()]}function de(ne){return u[ne.getUTCMonth()]}function Re(ne){return i[+(ne.getUTCHours()>=12)]}function pe(ne){return 1+~~(ne.getUTCMonth()/3)}return{format:function(ne){var _e=A(ne+="",E);return _e.toString=function(){return ne},_e},parse:function(ne){var _e=C(ne+="",!1);return _e.toString=function(){return ne},_e},utcFormat:function(ne){var _e=A(ne+="",P);return _e.toString=function(){return ne},_e},utcParse:function(ne){var _e=C(ne+="",!0);return _e.toString=function(){return ne},_e}}}var dT={"-":"",_:" ",0:"0"},Vt=/^\s*\d+/,GH=/^%/,XH=/[\\^$*+?|[\]().{}]/g;function He(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(e)+i:i)}function YH(t){return t.replace(XH,"\\$&")}function $l(t){return new RegExp("^(?:"+t.map(YH).join("|")+")","i")}function Nl(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}function JH(t,e,r){var n=Vt.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function QH(t,e,r){var n=Vt.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function ZH(t,e,r){var n=Vt.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function e7(t,e,r){var n=Vt.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function t7(t,e,r){var n=Vt.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function hT(t,e,r){var n=Vt.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function pT(t,e,r){var n=Vt.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function r7(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function n7(t,e,r){var n=Vt.exec(e.slice(r,r+1));return n?(t.q=n[0]*3-3,r+n[0].length):-1}function i7(t,e,r){var n=Vt.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function mT(t,e,r){var n=Vt.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function a7(t,e,r){var n=Vt.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function gT(t,e,r){var n=Vt.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function o7(t,e,r){var n=Vt.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function s7(t,e,r){var n=Vt.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function l7(t,e,r){var n=Vt.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function u7(t,e,r){var n=Vt.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function c7(t,e,r){var n=GH.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function f7(t,e,r){var n=Vt.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function d7(t,e,r){var n=Vt.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function vT(t,e){return He(t.getDate(),e,2)}function h7(t,e){return He(t.getHours(),e,2)}function p7(t,e){return He(t.getHours()%12||12,e,2)}function m7(t,e){return He(1+Zu.count(mi(t),t),e,3)}function RI(t,e){return He(t.getMilliseconds(),e,3)}function g7(t,e){return RI(t,e)+"000"}function v7(t,e){return He(t.getMonth()+1,e,2)}function y7(t,e){return He(t.getMinutes(),e,2)}function b7(t,e){return He(t.getSeconds(),e,2)}function w7(t){var e=t.getDay();return e===0?7:e}function x7(t,e){return He(Eh.count(mi(t)-1,t),e,2)}function II(t){var e=t.getDay();return e>=4||e===0?ls(t):ls.ceil(t)}function _7(t,e){return t=II(t),He(ls.count(mi(t),t)+(mi(t).getDay()===4),e,2)}function S7(t){return t.getDay()}function k7(t,e){return He(kd.count(mi(t)-1,t),e,2)}function O7(t,e){return He(t.getFullYear()%100,e,2)}function E7(t,e){return t=II(t),He(t.getFullYear()%100,e,2)}function A7(t,e){return He(t.getFullYear()%1e4,e,4)}function P7(t,e){var r=t.getDay();return t=r>=4||r===0?ls(t):ls.ceil(t),He(t.getFullYear()%1e4,e,4)}function T7(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+He(e/60|0,"0",2)+He(e%60,"0",2)}function yT(t,e){return He(t.getUTCDate(),e,2)}function C7(t,e){return He(t.getUTCHours(),e,2)}function j7(t,e){return He(t.getUTCHours()%12||12,e,2)}function R7(t,e){return He(1+Oh.count(gi(t),t),e,3)}function $I(t,e){return He(t.getUTCMilliseconds(),e,3)}function I7(t,e){return $I(t,e)+"000"}function $7(t,e){return He(t.getUTCMonth()+1,e,2)}function N7(t,e){return He(t.getUTCMinutes(),e,2)}function M7(t,e){return He(t.getUTCSeconds(),e,2)}function L7(t){var e=t.getUTCDay();return e===0?7:e}function D7(t,e){return He(Ah.count(gi(t)-1,t),e,2)}function NI(t){var e=t.getUTCDay();return e>=4||e===0?us(t):us.ceil(t)}function B7(t,e){return t=NI(t),He(us.count(gi(t),t)+(gi(t).getUTCDay()===4),e,2)}function U7(t){return t.getUTCDay()}function q7(t,e){return He(Od.count(gi(t)-1,t),e,2)}function z7(t,e){return He(t.getUTCFullYear()%100,e,2)}function F7(t,e){return t=NI(t),He(t.getUTCFullYear()%100,e,2)}function W7(t,e){return He(t.getUTCFullYear()%1e4,e,4)}function H7(t,e){var r=t.getUTCDay();return t=r>=4||r===0?us(t):us.ceil(t),He(t.getUTCFullYear()%1e4,e,4)}function V7(){return"+0000"}function bT(){return"%"}function wT(t){return+t}function xT(t){return Math.floor(+t/1e3)}var Lo,MI,LI;K7({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 K7(t){return Lo=KH(t),MI=Lo.format,Lo.parse,LI=Lo.utcFormat,Lo.utcParse,Lo}function G7(t){return new Date(t)}function X7(t){return t instanceof Date?+t:+new Date(+t)}function Gx(t,e,r,n,i,a,s,u,c,f){var p=$x(),h=p.invert,g=p.domain,v=f(".%L"),w=f(":%S"),x=f("%I:%M"),y=f("%I %p"),S=f("%a %d"),k=f("%b %d"),E=f("%B"),P=f("%Y");function O(A){return(c(A)<A?v:u(A)<A?w:s(A)<A?x:a(A)<A?y:n(A)<A?i(A)<A?S:k:r(A)<A?E:P)(A)}return p.invert=function(A){return new Date(h(A))},p.domain=function(A){return arguments.length?g(Array.from(A,X7)):g().map(G7)},p.ticks=function(A){var C=g();return t(C[0],C[C.length-1],A??10)},p.tickFormat=function(A,C){return C==null?O:f(C)},p.nice=function(A){var C=g();return(!A||typeof A.range!="function")&&(A=e(C[0],C[C.length-1],A??10)),A?g(SI(C,A)):p},p.copy=function(){return Qu(p,Gx(t,e,r,n,i,a,s,u,c,f))},p}function Y7(){return an.apply(Gx(HH,VH,mi,Vx,Eh,Zu,Wx,zx,Ua,MI).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function J7(){return an.apply(Gx(FH,WH,gi,Kx,Ah,Oh,Hx,Fx,Ua,LI).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Ph(){var t=0,e=1,r,n,i,a,s=hr,u=!1,c;function f(h){return h==null||isNaN(h=+h)?c:s(i===0?.5:(h=(a(h)-r)*i,u?Math.max(0,Math.min(1,h)):h))}f.domain=function(h){return arguments.length?([t,e]=h,r=a(t=+t),n=a(e=+e),i=r===n?0:1/(n-r),f):[t,e]},f.clamp=function(h){return arguments.length?(u=!!h,f):u},f.interpolator=function(h){return arguments.length?(s=h,f):s};function p(h){return function(g){var v,w;return arguments.length?([v,w]=g,s=h(v,w),f):[s(0),s(1)]}}return f.range=p(Ds),f.rangeRound=p(Ix),f.unknown=function(h){return arguments.length?(c=h,f):c},function(h){return a=h,r=h(t),n=h(e),i=r===n?0:1/(n-r),f}}function aa(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function DI(){var t=ia(Ph()(hr));return t.copy=function(){return aa(t,DI())},wi.apply(t,arguments)}function BI(){var t=Lx(Ph()).domain([1,10]);return t.copy=function(){return aa(t,BI()).base(t.base())},wi.apply(t,arguments)}function UI(){var t=Dx(Ph());return t.copy=function(){return aa(t,UI()).constant(t.constant())},wi.apply(t,arguments)}function Xx(){var t=Bx(Ph());return t.copy=function(){return aa(t,Xx()).exponent(t.exponent())},wi.apply(t,arguments)}function Q7(){return Xx.apply(null,arguments).exponent(.5)}function qI(){var t=[],e=hr;function r(n){if(n!=null&&!isNaN(n=+n))return e((Yu(t,n,1)-1)/(t.length-1))}return r.domain=function(n){if(!arguments.length)return t.slice();t=[];for(let i of n)i!=null&&!isNaN(i=+i)&&t.push(i);return t.sort(ta),r},r.interpolator=function(n){return arguments.length?(e=n,r):e},r.range=function(){return t.map((n,i)=>e(i/(t.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>DW(t,a/n))},r.copy=function(){return qI(e).domain(t)},wi.apply(r,arguments)}function Th(){var t=0,e=.5,r=1,n=1,i,a,s,u,c,f=hr,p,h=!1,g;function v(x){return isNaN(x=+x)?g:(x=.5+((x=+p(x))-a)*(n*x<n*a?u:c),f(h?Math.max(0,Math.min(1,x)):x))}v.domain=function(x){return arguments.length?([t,e,r]=x,i=p(t=+t),a=p(e=+e),s=p(r=+r),u=i===a?0:.5/(a-i),c=a===s?0:.5/(s-a),n=a<i?-1:1,v):[t,e,r]},v.clamp=function(x){return arguments.length?(h=!!x,v):h},v.interpolator=function(x){return arguments.length?(f=x,v):f};function w(x){return function(y){var S,k,E;return arguments.length?([S,k,E]=y,f=cH(x,[S,k,E]),v):[f(0),f(.5),f(1)]}}return v.range=w(Ds),v.rangeRound=w(Ix),v.unknown=function(x){return arguments.length?(g=x,v):g},function(x){return p=x,i=x(t),a=x(e),s=x(r),u=i===a?0:.5/(a-i),c=a===s?0:.5/(s-a),n=a<i?-1:1,v}}function zI(){var t=ia(Th()(hr));return t.copy=function(){return aa(t,zI())},wi.apply(t,arguments)}function FI(){var t=Lx(Th()).domain([.1,1,10]);return t.copy=function(){return aa(t,FI()).base(t.base())},wi.apply(t,arguments)}function WI(){var t=Dx(Th());return t.copy=function(){return aa(t,WI()).constant(t.constant())},wi.apply(t,arguments)}function Yx(){var t=Bx(Th());return t.copy=function(){return aa(t,Yx()).exponent(t.exponent())},wi.apply(t,arguments)}function Z7(){return Yx.apply(null,arguments).exponent(.5)}const _T=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:gu,scaleDiverging:zI,scaleDivergingLog:FI,scaleDivergingPow:Yx,scaleDivergingSqrt:Z7,scaleDivergingSymlog:WI,scaleIdentity:_I,scaleImplicit:q0,scaleLinear:_d,scaleLog:kI,scaleOrdinal:Cx,scalePoint:Jl,scalePow:Ux,scaleQuantile:AI,scaleQuantize:PI,scaleRadial:EI,scaleSequential:DI,scaleSequentialLog:BI,scaleSequentialPow:Xx,scaleSequentialQuantile:qI,scaleSequentialSqrt:Q7,scaleSequentialSymlog:UI,scaleSqrt:IH,scaleSymlog:OI,scaleThreshold:TI,scaleTime:Y7,scaleUtc:J7,tickFormat:xI},Symbol.toStringTag,{value:"Module"}));var ob,ST;function Ch(){if(ST)return ob;ST=1;var t=Is();function e(r,n,i){for(var a=-1,s=r.length;++a<s;){var u=r[a],c=n(u);if(c!=null&&(f===void 0?c===c&&!t(c):i(c,f)))var f=c,p=u}return p}return ob=e,ob}var sb,kT;function HI(){if(kT)return sb;kT=1;function t(e,r){return e>r}return sb=t,sb}var lb,OT;function eV(){if(OT)return lb;OT=1;var t=Ch(),e=HI(),r=Ls();function n(i){return i&&i.length?t(i,r,e):void 0}return lb=n,lb}var tV=eV();const Zi=Ye(tV);var ub,ET;function VI(){if(ET)return ub;ET=1;function t(e,r){return e<r}return ub=t,ub}var cb,AT;function rV(){if(AT)return cb;AT=1;var t=Ch(),e=VI(),r=Ls();function n(i){return i&&i.length?t(i,r,e):void 0}return cb=n,cb}var nV=rV();const jh=Ye(nV);var fb,PT;function iV(){if(PT)return fb;PT=1;var t=dx(),e=Hn(),r=tI(),n=Or();function i(a,s){var u=n(a)?t:r;return u(a,e(s,3))}return fb=i,fb}var db,TT;function aV(){if(TT)return db;TT=1;var t=Z2(),e=iV();function r(n,i){return t(e(n,i),1)}return db=r,db}var oV=aV();const sV=Ye(oV);var hb,CT;function lV(){if(CT)return hb;CT=1;var t=Ox();function e(r,n){return t(r,n)}return hb=e,hb}var uV=lV();const cs=Ye(uV);var Bs=1e9,cV={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Qx,ht=!0,rn="[DecimalError] ",Ha=rn+"Invalid argument: ",Jx=rn+"Exponent out of range: ",Us=Math.floor,$a=Math.pow,fV=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Nr,Wt=1e7,ut=7,KI=9007199254740991,Ed=Us(KI/ut),be={};be.absoluteValue=be.abs=function(){var t=new this.constructor(this);return t.s&&(t.s=1),t};be.comparedTo=be.cmp=function(t){var e,r,n,i,a=this;if(t=new a.constructor(t),a.s!==t.s)return a.s||-t.s;if(a.e!==t.e)return a.e>t.e^a.s<0?1:-1;for(n=a.d.length,i=t.d.length,e=0,r=n<i?n:i;e<r;++e)if(a.d[e]!==t.d[e])return a.d[e]>t.d[e]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};be.decimalPlaces=be.dp=function(){var t=this,e=t.d.length-1,r=(e-t.e)*ut;if(e=t.d[e],e)for(;e%10==0;e/=10)r--;return r<0?0:r};be.dividedBy=be.div=function(t){return fi(this,new this.constructor(t))};be.dividedToIntegerBy=be.idiv=function(t){var e=this,r=e.constructor;return Ze(fi(e,new r(t),0,1),r.precision)};be.equals=be.eq=function(t){return!this.cmp(t)};be.exponent=function(){return Tt(this)};be.greaterThan=be.gt=function(t){return this.cmp(t)>0};be.greaterThanOrEqualTo=be.gte=function(t){return this.cmp(t)>=0};be.isInteger=be.isint=function(){return this.e>this.d.length-2};be.isNegative=be.isneg=function(){return this.s<0};be.isPositive=be.ispos=function(){return this.s>0};be.isZero=function(){return this.s===0};be.lessThan=be.lt=function(t){return this.cmp(t)<0};be.lessThanOrEqualTo=be.lte=function(t){return this.cmp(t)<1};be.logarithm=be.log=function(t){var e,r=this,n=r.constructor,i=n.precision,a=i+5;if(t===void 0)t=new n(10);else if(t=new n(t),t.s<1||t.eq(Nr))throw Error(rn+"NaN");if(r.s<1)throw Error(rn+(r.s?"NaN":"-Infinity"));return r.eq(Nr)?new n(0):(ht=!1,e=fi(xu(r,a),xu(t,a),a),ht=!0,Ze(e,i))};be.minus=be.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?YI(e,t):GI(e,(t.s=-t.s,t))};be.modulo=be.mod=function(t){var e,r=this,n=r.constructor,i=n.precision;if(t=new n(t),!t.s)throw Error(rn+"NaN");return r.s?(ht=!1,e=fi(r,t,0,1).times(t),ht=!0,r.minus(e)):Ze(new n(r),i)};be.naturalExponential=be.exp=function(){return XI(this)};be.naturalLogarithm=be.ln=function(){return xu(this)};be.negated=be.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t};be.plus=be.add=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?GI(e,t):YI(e,(t.s=-t.s,t))};be.precision=be.sd=function(t){var e,r,n,i=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(Ha+t);if(e=Tt(i)+1,n=i.d.length-1,r=n*ut+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return t&&e>r?e:r};be.squareRoot=be.sqrt=function(){var t,e,r,n,i,a,s,u=this,c=u.constructor;if(u.s<1){if(!u.s)return new c(0);throw Error(rn+"NaN")}for(t=Tt(u),ht=!1,i=Math.sqrt(+u),i==0||i==1/0?(e=Ln(u.d),(e.length+t)%2==0&&(e+="0"),i=Math.sqrt(e),t=Us((t+1)/2)-(t<0||t%2),i==1/0?e="5e"+t:(e=i.toExponential(),e=e.slice(0,e.indexOf("e")+1)+t),n=new c(e)):n=new c(i.toString()),r=c.precision,i=s=r+3;;)if(a=n,n=a.plus(fi(u,a,s+2)).times(.5),Ln(a.d).slice(0,s)===(e=Ln(n.d)).slice(0,s)){if(e=e.slice(s-3,s+1),i==s&&e=="4999"){if(Ze(a,r+1,0),a.times(a).eq(u)){n=a;break}}else if(e!="9999")break;s+=4}return ht=!0,Ze(n,r)};be.times=be.mul=function(t){var e,r,n,i,a,s,u,c,f,p=this,h=p.constructor,g=p.d,v=(t=new h(t)).d;if(!p.s||!t.s)return new h(0);for(t.s*=p.s,r=p.e+t.e,c=g.length,f=v.length,c<f&&(a=g,g=v,v=a,s=c,c=f,f=s),a=[],s=c+f,n=s;n--;)a.push(0);for(n=f;--n>=0;){for(e=0,i=c+n;i>n;)u=a[i]+v[n]*g[i-n-1]+e,a[i--]=u%Wt|0,e=u/Wt|0;a[i]=(a[i]+e)%Wt|0}for(;!a[--s];)a.pop();return e?++r:a.shift(),t.d=a,t.e=r,ht?Ze(t,h.precision):t};be.toDecimalPlaces=be.todp=function(t,e){var r=this,n=r.constructor;return r=new n(r),t===void 0?r:(qn(t,0,Bs),e===void 0?e=n.rounding:qn(e,0,8),Ze(r,t+Tt(r)+1,e))};be.toExponential=function(t,e){var r,n=this,i=n.constructor;return t===void 0?r=Ya(n,!0):(qn(t,0,Bs),e===void 0?e=i.rounding:qn(e,0,8),n=Ze(new i(n),t+1,e),r=Ya(n,!0,t+1)),r};be.toFixed=function(t,e){var r,n,i=this,a=i.constructor;return t===void 0?Ya(i):(qn(t,0,Bs),e===void 0?e=a.rounding:qn(e,0,8),n=Ze(new a(i),t+Tt(i)+1,e),r=Ya(n.abs(),!1,t+Tt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};be.toInteger=be.toint=function(){var t=this,e=t.constructor;return Ze(new e(t),Tt(t)+1,e.rounding)};be.toNumber=function(){return+this};be.toPower=be.pow=function(t){var e,r,n,i,a,s,u=this,c=u.constructor,f=12,p=+(t=new c(t));if(!t.s)return new c(Nr);if(u=new c(u),!u.s){if(t.s<1)throw Error(rn+"Infinity");return u}if(u.eq(Nr))return u;if(n=c.precision,t.eq(Nr))return Ze(u,n);if(e=t.e,r=t.d.length-1,s=e>=r,a=u.s,s){if((r=p<0?-p:p)<=KI){for(i=new c(Nr),e=Math.ceil(n/ut+4),ht=!1;r%2&&(i=i.times(u),RT(i.d,e)),r=Us(r/2),r!==0;)u=u.times(u),RT(u.d,e);return ht=!0,t.s<0?new c(Nr).div(i):Ze(i,n)}}else if(a<0)throw Error(rn+"NaN");return a=a<0&&t.d[Math.max(e,r)]&1?-1:1,u.s=1,ht=!1,i=t.times(xu(u,n+f)),ht=!0,i=XI(i),i.s=a,i};be.toPrecision=function(t,e){var r,n,i=this,a=i.constructor;return t===void 0?(r=Tt(i),n=Ya(i,r<=a.toExpNeg||r>=a.toExpPos)):(qn(t,1,Bs),e===void 0?e=a.rounding:qn(e,0,8),i=Ze(new a(i),t,e),r=Tt(i),n=Ya(i,t<=r||r<=a.toExpNeg,t)),n};be.toSignificantDigits=be.tosd=function(t,e){var r=this,n=r.constructor;return t===void 0?(t=n.precision,e=n.rounding):(qn(t,1,Bs),e===void 0?e=n.rounding:qn(e,0,8)),Ze(new n(r),t,e)};be.toString=be.valueOf=be.val=be.toJSON=be[Symbol.for("nodejs.util.inspect.custom")]=function(){var t=this,e=Tt(t),r=t.constructor;return Ya(t,e<=r.toExpNeg||e>=r.toExpPos)};function GI(t,e){var r,n,i,a,s,u,c,f,p=t.constructor,h=p.precision;if(!t.s||!e.s)return e.s||(e=new p(t)),ht?Ze(e,h):e;if(c=t.d,f=e.d,s=t.e,i=e.e,c=c.slice(),a=s-i,a){for(a<0?(n=c,a=-a,u=f.length):(n=f,i=s,u=c.length),s=Math.ceil(h/ut),u=s>u?s+1:u+1,a>u&&(a=u,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(u=c.length,a=f.length,u-a<0&&(a=u,n=f,f=c,c=n),r=0;a;)r=(c[--a]=c[a]+f[a]+r)/Wt|0,c[a]%=Wt;for(r&&(c.unshift(r),++i),u=c.length;c[--u]==0;)c.pop();return e.d=c,e.e=i,ht?Ze(e,h):e}function qn(t,e,r){if(t!==~~t||t<e||t>r)throw Error(Ha+t)}function Ln(t){var e,r,n,i=t.length-1,a="",s=t[0];if(i>0){for(a+=s,e=1;e<i;e++)n=t[e]+"",r=ut-n.length,r&&(a+=Yi(r)),a+=n;s=t[e],n=s+"",r=ut-n.length,r&&(a+=Yi(r))}else if(s===0)return"0";for(;s%10===0;)s/=10;return a+s}var fi=(function(){function t(n,i){var a,s=0,u=n.length;for(n=n.slice();u--;)a=n[u]*i+s,n[u]=a%Wt|0,s=a/Wt|0;return s&&n.unshift(s),n}function e(n,i,a,s){var u,c;if(a!=s)c=a>s?1:-1;else for(u=c=0;u<a;u++)if(n[u]!=i[u]){c=n[u]>i[u]?1:-1;break}return c}function r(n,i,a){for(var s=0;a--;)n[a]-=s,s=n[a]<i[a]?1:0,n[a]=s*Wt+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,s){var u,c,f,p,h,g,v,w,x,y,S,k,E,P,O,A,C,R,M=n.constructor,H=n.s==i.s?1:-1,z=n.d,B=i.d;if(!n.s)return new M(n);if(!i.s)throw Error(rn+"Division by zero");for(c=n.e-i.e,C=B.length,O=z.length,v=new M(H),w=v.d=[],f=0;B[f]==(z[f]||0);)++f;if(B[f]>(z[f]||0)&&--c,a==null?k=a=M.precision:s?k=a+(Tt(n)-Tt(i))+1:k=a,k<0)return new M(0);if(k=k/ut+2|0,f=0,C==1)for(p=0,B=B[0],k++;(f<O||p)&&k--;f++)E=p*Wt+(z[f]||0),w[f]=E/B|0,p=E%B|0;else{for(p=Wt/(B[0]+1)|0,p>1&&(B=t(B,p),z=t(z,p),C=B.length,O=z.length),P=C,x=z.slice(0,C),y=x.length;y<C;)x[y++]=0;R=B.slice(),R.unshift(0),A=B[0],B[1]>=Wt/2&&++A;do p=0,u=e(B,x,C,y),u<0?(S=x[0],C!=y&&(S=S*Wt+(x[1]||0)),p=S/A|0,p>1?(p>=Wt&&(p=Wt-1),h=t(B,p),g=h.length,y=x.length,u=e(h,x,g,y),u==1&&(p--,r(h,C<g?R:B,g))):(p==0&&(u=p=1),h=B.slice()),g=h.length,g<y&&h.unshift(0),r(x,h,y),u==-1&&(y=x.length,u=e(B,x,C,y),u<1&&(p++,r(x,C<y?R:B,y))),y=x.length):u===0&&(p++,x=[0]),w[f++]=p,u&&x[0]?x[y++]=z[P]||0:(x=[z[P]],y=1);while((P++<O||x[0]!==void 0)&&k--)}return w[0]||w.shift(),v.e=c,Ze(v,s?a+Tt(v)+1:a)}})();function XI(t,e){var r,n,i,a,s,u,c=0,f=0,p=t.constructor,h=p.precision;if(Tt(t)>16)throw Error(Jx+Tt(t));if(!t.s)return new p(Nr);for(ht=!1,u=h,s=new p(.03125);t.abs().gte(.1);)t=t.times(s),f+=5;for(n=Math.log($a(2,f))/Math.LN10*2+5|0,u+=n,r=i=a=new p(Nr),p.precision=u;;){if(i=Ze(i.times(t),u),r=r.times(++c),s=a.plus(fi(i,r,u)),Ln(s.d).slice(0,u)===Ln(a.d).slice(0,u)){for(;f--;)a=Ze(a.times(a),u);return p.precision=h,e==null?(ht=!0,Ze(a,h)):a}a=s}}function Tt(t){for(var e=t.e*ut,r=t.d[0];r>=10;r/=10)e++;return e}function pb(t,e,r){if(e>t.LN10.sd())throw ht=!0,r&&(t.precision=r),Error(rn+"LN10 precision limit exceeded");return Ze(new t(t.LN10),e)}function Yi(t){for(var e="";t--;)e+="0";return e}function xu(t,e){var r,n,i,a,s,u,c,f,p,h=1,g=10,v=t,w=v.d,x=v.constructor,y=x.precision;if(v.s<1)throw Error(rn+(v.s?"NaN":"-Infinity"));if(v.eq(Nr))return new x(0);if(e==null?(ht=!1,f=y):f=e,v.eq(10))return e==null&&(ht=!0),pb(x,f);if(f+=g,x.precision=f,r=Ln(w),n=r.charAt(0),a=Tt(v),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)v=v.times(t),r=Ln(v.d),n=r.charAt(0),h++;a=Tt(v),n>1?(v=new x("0."+r),a++):v=new x(n+"."+r.slice(1))}else return c=pb(x,f+2,y).times(a+""),v=xu(new x(n+"."+r.slice(1)),f-g).plus(c),x.precision=y,e==null?(ht=!0,Ze(v,y)):v;for(u=s=v=fi(v.minus(Nr),v.plus(Nr),f),p=Ze(v.times(v),f),i=3;;){if(s=Ze(s.times(p),f),c=u.plus(fi(s,new x(i),f)),Ln(c.d).slice(0,f)===Ln(u.d).slice(0,f))return u=u.times(2),a!==0&&(u=u.plus(pb(x,f+2,y).times(a+""))),u=fi(u,new x(h),f),x.precision=y,e==null?(ht=!0,Ze(u,y)):u;u=c,i+=2}}function jT(t,e){var r,n,i;for((r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),n=0;e.charCodeAt(n)===48;)++n;for(i=e.length;e.charCodeAt(i-1)===48;)--i;if(e=e.slice(n,i),e){if(i-=n,r=r-n-1,t.e=Us(r/ut),t.d=[],n=(r+1)%ut,r<0&&(n+=ut),n<i){for(n&&t.d.push(+e.slice(0,n)),i-=ut;n<i;)t.d.push(+e.slice(n,n+=ut));e=e.slice(n),n=ut-e.length}else n-=i;for(;n--;)e+="0";if(t.d.push(+e),ht&&(t.e>Ed||t.e<-Ed))throw Error(Jx+r)}else t.s=0,t.e=0,t.d=[0];return t}function Ze(t,e,r){var n,i,a,s,u,c,f,p,h=t.d;for(s=1,a=h[0];a>=10;a/=10)s++;if(n=e-s,n<0)n+=ut,i=e,f=h[p=0];else{if(p=Math.ceil((n+1)/ut),a=h.length,p>=a)return t;for(f=a=h[p],s=1;a>=10;a/=10)s++;n%=ut,i=n-ut+s}if(r!==void 0&&(a=$a(10,s-i-1),u=f/a%10|0,c=e<0||h[p+1]!==void 0||f%a,c=r<4?(u||c)&&(r==0||r==(t.s<0?3:2)):u>5||u==5&&(r==4||c||r==6&&(n>0?i>0?f/$a(10,s-i):0:h[p-1])%10&1||r==(t.s<0?8:7))),e<1||!h[0])return c?(a=Tt(t),h.length=1,e=e-a-1,h[0]=$a(10,(ut-e%ut)%ut),t.e=Us(-e/ut)||0):(h.length=1,h[0]=t.e=t.s=0),t;if(n==0?(h.length=p,a=1,p--):(h.length=p+1,a=$a(10,ut-n),h[p]=i>0?(f/$a(10,s-i)%$a(10,i)|0)*a:0),c)for(;;)if(p==0){(h[0]+=a)==Wt&&(h[0]=1,++t.e);break}else{if(h[p]+=a,h[p]!=Wt)break;h[p--]=0,a=1}for(n=h.length;h[--n]===0;)h.pop();if(ht&&(t.e>Ed||t.e<-Ed))throw Error(Jx+Tt(t));return t}function YI(t,e){var r,n,i,a,s,u,c,f,p,h,g=t.constructor,v=g.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new g(t),ht?Ze(e,v):e;if(c=t.d,h=e.d,n=e.e,f=t.e,c=c.slice(),s=f-n,s){for(p=s<0,p?(r=c,s=-s,u=h.length):(r=h,n=f,u=c.length),i=Math.max(Math.ceil(v/ut),u)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=c.length,u=h.length,p=i<u,p&&(u=i),i=0;i<u;i++)if(c[i]!=h[i]){p=c[i]<h[i];break}s=0}for(p&&(r=c,c=h,h=r,e.s=-e.s),u=c.length,i=h.length-u;i>0;--i)c[u++]=0;for(i=h.length;i>s;){if(c[--i]<h[i]){for(a=i;a&&c[--a]===0;)c[a]=Wt-1;--c[a],c[i]+=Wt}c[i]-=h[i]}for(;c[--u]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(e.d=c,e.e=n,ht?Ze(e,v):e):new g(0)}function Ya(t,e,r){var n,i=Tt(t),a=Ln(t.d),s=a.length;return e?(r&&(n=r-s)>0?a=a.charAt(0)+"."+a.slice(1)+Yi(n):s>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Yi(-i-1)+a,r&&(n=r-s)>0&&(a+=Yi(n))):i>=s?(a+=Yi(i+1-s),r&&(n=r-i-1)>0&&(a=a+"."+Yi(n))):((n=i+1)<s&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-s)>0&&(i+1===s&&(a+="."),a+=Yi(n))),t.s<0?"-"+a:a}function RT(t,e){if(t.length>e)return t.length=e,!0}function JI(t){var e,r,n;function i(a){var s=this;if(!(s instanceof i))return new i(a);if(s.constructor=i,a instanceof i){s.s=a.s,s.e=a.e,s.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Ha+a);if(a>0)s.s=1;else if(a<0)a=-a,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(a===~~a&&a<1e7){s.e=0,s.d=[a];return}return jT(s,a.toString())}else if(typeof a!="string")throw Error(Ha+a);if(a.charCodeAt(0)===45?(a=a.slice(1),s.s=-1):s.s=1,fV.test(a))jT(s,a);else throw Error(Ha+a)}if(i.prototype=be,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=JI,i.config=i.set=dV,t===void 0&&(t={}),t)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],e=0;e<n.length;)t.hasOwnProperty(r=n[e++])||(t[r]=this[r]);return i.config(t),i}function dV(t){if(!t||typeof t!="object")throw Error(rn+"Object expected");var e,r,n,i=["precision",1,Bs,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(e=0;e<i.length;e+=3)if((n=t[r=i[e]])!==void 0)if(Us(n)===n&&n>=i[e+1]&&n<=i[e+2])this[r]=n;else throw Error(Ha+r+": "+n);if((n=t[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ha+r+": "+n);return this}var Qx=JI(cV);Nr=new Qx(1);const Qe=Qx;function hV(t){return vV(t)||gV(t)||mV(t)||pV()}function pV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
282
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mV(t,e){if(t){if(typeof t=="string")return H0(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return H0(t,e)}}function gV(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function vV(t){if(Array.isArray(t))return H0(t)}function H0(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var yV=function(e){return e},QI={},ZI=function(e){return e===QI},IT=function(e){return function r(){return arguments.length===0||arguments.length===1&&ZI(arguments.length<=0?void 0:arguments[0])?r:e.apply(void 0,arguments)}},bV=function t(e,r){return e===1?r:IT(function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var s=i.filter(function(u){return u!==QI}).length;return s>=e?r.apply(void 0,i):t(e-s,IT(function(){for(var u=arguments.length,c=new Array(u),f=0;f<u;f++)c[f]=arguments[f];var p=i.map(function(h){return ZI(h)?c.shift():h});return r.apply(void 0,hV(p).concat(c))}))})},Rh=function(e){return bV(e.length,e)},V0=function(e,r){for(var n=[],i=e;i<r;++i)n[i-e]=i;return n},wV=Rh(function(t,e){return Array.isArray(e)?e.map(t):Object.keys(e).map(function(r){return e[r]}).map(t)}),xV=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];if(!r.length)return yV;var i=r.reverse(),a=i[0],s=i.slice(1);return function(){return s.reduce(function(u,c){return c(u)},a.apply(void 0,arguments))}},K0=function(e){return Array.isArray(e)?e.reverse():e.split("").reverse.join("")},e$=function(e){var r=null,n=null;return function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r&&a.every(function(u,c){return u===r[c]})||(r=a,n=e.apply(void 0,a)),n}};function _V(t){var e;return t===0?e=1:e=Math.floor(new Qe(t).abs().log(10).toNumber())+1,e}function SV(t,e,r){for(var n=new Qe(t),i=0,a=[];n.lt(e)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var kV=Rh(function(t,e,r){var n=+t,i=+e;return n+r*(i-n)}),OV=Rh(function(t,e,r){var n=e-+t;return n=n||1/0,(r-t)/n}),EV=Rh(function(t,e,r){var n=e-+t;return n=n||1/0,Math.max(0,Math.min(1,(r-t)/n))});const Ih={rangeStep:SV,getDigitCount:_V,interpolateNumber:kV,uninterpolateNumber:OV,uninterpolateTruncation:EV};function G0(t){return TV(t)||PV(t)||t$(t)||AV()}function AV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
283
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PV(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function TV(t){if(Array.isArray(t))return X0(t)}function _u(t,e){return RV(t)||jV(t,e)||t$(t,e)||CV()}function CV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
284
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function t$(t,e){if(t){if(typeof t=="string")return X0(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return X0(t,e)}}function X0(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function jV(t,e){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(t)))){var r=[],n=!0,i=!1,a=void 0;try{for(var s=t[Symbol.iterator](),u;!(n=(u=s.next()).done)&&(r.push(u.value),!(e&&r.length===e));n=!0);}catch(c){i=!0,a=c}finally{try{!n&&s.return!=null&&s.return()}finally{if(i)throw a}}return r}}function RV(t){if(Array.isArray(t))return t}function r$(t){var e=_u(t,2),r=e[0],n=e[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function n$(t,e,r){if(t.lte(0))return new Qe(0);var n=Ih.getDigitCount(t.toNumber()),i=new Qe(10).pow(n),a=t.div(i),s=n!==1?.05:.1,u=new Qe(Math.ceil(a.div(s).toNumber())).add(r).mul(s),c=u.mul(i);return e?c:new Qe(Math.ceil(c))}function IV(t,e,r){var n=1,i=new Qe(t);if(!i.isint()&&r){var a=Math.abs(t);a<1?(n=new Qe(10).pow(Ih.getDigitCount(t)-1),i=new Qe(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new Qe(Math.floor(t)))}else t===0?i=new Qe(Math.floor((e-1)/2)):r||(i=new Qe(Math.floor(t)));var s=Math.floor((e-1)/2),u=xV(wV(function(c){return i.add(new Qe(c-s).mul(n)).toNumber()}),V0);return u(0,e)}function i$(t,e,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((e-t)/(r-1)))return{step:new Qe(0),tickMin:new Qe(0),tickMax:new Qe(0)};var a=n$(new Qe(e).sub(t).div(r-1),n,i),s;t<=0&&e>=0?s=new Qe(0):(s=new Qe(t).add(e).div(2),s=s.sub(new Qe(s).mod(a)));var u=Math.ceil(s.sub(t).div(a).toNumber()),c=Math.ceil(new Qe(e).sub(s).div(a).toNumber()),f=u+c+1;return f>r?i$(t,e,r,n,i+1):(f<r&&(c=e>0?c+(r-f):c,u=e>0?u:u+(r-f)),{step:a,tickMin:s.sub(new Qe(u).mul(a)),tickMax:s.add(new Qe(c).mul(a))})}function $V(t){var e=_u(t,2),r=e[0],n=e[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=Math.max(i,2),u=r$([r,n]),c=_u(u,2),f=c[0],p=c[1];if(f===-1/0||p===1/0){var h=p===1/0?[f].concat(G0(V0(0,i-1).map(function(){return 1/0}))):[].concat(G0(V0(0,i-1).map(function(){return-1/0})),[p]);return r>n?K0(h):h}if(f===p)return IV(f,i,a);var g=i$(f,p,s,a),v=g.step,w=g.tickMin,x=g.tickMax,y=Ih.rangeStep(w,x.add(new Qe(.1).mul(v)),v);return r>n?K0(y):y}function NV(t,e){var r=_u(t,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=r$([n,i]),u=_u(s,2),c=u[0],f=u[1];if(c===-1/0||f===1/0)return[n,i];if(c===f)return[c];var p=Math.max(e,2),h=n$(new Qe(f).sub(c).div(p-1),a,0),g=[].concat(G0(Ih.rangeStep(new Qe(c),new Qe(f).sub(new Qe(.99).mul(h)),h)),[f]);return n>i?K0(g):g}var MV=e$($V),LV=e$(NV),DV="Invariant failed";function Ja(t,e){throw new Error(DV)}var BV=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function fs(t){"@babel/helpers - typeof";return fs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fs(t)}function Ad(){return Ad=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ad.apply(this,arguments)}function UV(t,e){return WV(t)||FV(t,e)||zV(t,e)||qV()}function qV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
285
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zV(t,e){if(t){if(typeof t=="string")return $T(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $T(t,e)}}function $T(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function FV(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function WV(t){if(Array.isArray(t))return t}function HV(t,e){if(t==null)return{};var r=VV(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function VV(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function KV(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function GV(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,s$(n.key),n)}}function XV(t,e,r){return e&&GV(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function YV(t,e,r){return e=Pd(e),JV(t,a$()?Reflect.construct(e,r||[],Pd(t).constructor):e.apply(t,r))}function JV(t,e){if(e&&(fs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return QV(t)}function QV(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function a$(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(a$=function(){return!!t})()}function Pd(t){return Pd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Pd(t)}function ZV(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Y0(t,e)}function Y0(t,e){return Y0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Y0(t,e)}function o$(t,e,r){return e=s$(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s$(t){var e=eK(t,"string");return fs(e)=="symbol"?e:e+""}function eK(t,e){if(fs(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(fs(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var $h=(function(t){function e(){return KV(this,e),YV(this,e,arguments)}return ZV(e,t),XV(e,[{key:"render",value:function(){var n=this.props,i=n.offset,a=n.layout,s=n.width,u=n.dataKey,c=n.data,f=n.dataPointFormatter,p=n.xAxis,h=n.yAxis,g=HV(n,BV),v=Ee(g,!1);this.props.direction==="x"&&p.type!=="number"&&Ja();var w=c.map(function(x){var y=f(x,u),S=y.x,k=y.y,E=y.value,P=y.errorVal;if(!P)return null;var O=[],A,C;if(Array.isArray(P)){var R=UV(P,2);A=R[0],C=R[1]}else A=C=P;if(a==="vertical"){var M=p.scale,H=k+i,z=H+s,B=H-s,F=M(E-A),J=M(E+C);O.push({x1:J,y1:z,x2:J,y2:B}),O.push({x1:F,y1:H,x2:J,y2:H}),O.push({x1:F,y1:z,x2:F,y2:B})}else if(a==="horizontal"){var V=h.scale,K=S+i,Z=K-s,G=K+s,ee=V(E-A),U=V(E+C);O.push({x1:Z,y1:U,x2:G,y2:U}),O.push({x1:K,y1:ee,x2:K,y2:U}),O.push({x1:Z,y1:ee,x2:G,y2:ee})}return I.createElement(Ue,Ad({className:"recharts-errorBar",key:"bar-".concat(O.map(function(L){return"".concat(L.x1,"-").concat(L.x2,"-").concat(L.y1,"-").concat(L.y2)}))},v),O.map(function(L){return I.createElement("line",Ad({},L,{key:"line-".concat(L.x1,"-").concat(L.x2,"-").concat(L.y1,"-").concat(L.y2)}))}))});return I.createElement(Ue,{className:"recharts-errorBars"},w)}}])})(I.Component);o$($h,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});o$($h,"displayName","ErrorBar");function Su(t){"@babel/helpers - typeof";return Su=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Su(t)}function NT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ta(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?NT(Object(r),!0).forEach(function(n){tK(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):NT(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function tK(t,e,r){return e=rK(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function rK(t){var e=nK(t,"string");return Su(e)=="symbol"?e:e+""}function nK(t,e){if(Su(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Su(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var l$=function(e){var r=e.children,n=e.formattedGraphicalItems,i=e.legendWidth,a=e.legendContent,s=Ir(r,Jo);if(!s)return null;var u=Jo.defaultProps,c=u!==void 0?Ta(Ta({},u),s.props):{},f;return s.props&&s.props.payload?f=s.props&&s.props.payload:a==="children"?f=(n||[]).reduce(function(p,h){var g=h.item,v=h.props,w=v.sectors||v.data||[];return p.concat(w.map(function(x){return{type:s.props.iconType||g.props.legendType,value:x.name,color:x.fill,payload:x}}))},[]):f=(n||[]).map(function(p){var h=p.item,g=h.type.defaultProps,v=g!==void 0?Ta(Ta({},g),h.props):{},w=v.dataKey,x=v.name,y=v.legendType,S=v.hide;return{inactive:S,dataKey:w,type:c.iconType||y||"square",color:Zx(h),value:x||w,payload:v}}),Ta(Ta(Ta({},c),Jo.getWithHeight(s,i)),{},{payload:f,item:s})};function ku(t){"@babel/helpers - typeof";return ku=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ku(t)}function MT(t){return sK(t)||oK(t)||aK(t)||iK()}function iK(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
286
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aK(t,e){if(t){if(typeof t=="string")return J0(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return J0(t,e)}}function oK(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function sK(t){if(Array.isArray(t))return J0(t)}function J0(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function LT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function bt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?LT(Object(r),!0).forEach(function(n){Zo(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):LT(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Zo(t,e,r){return e=lK(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function lK(t){var e=uK(t,"string");return ku(e)=="symbol"?e:e+""}function uK(t,e){if(ku(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ku(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Mt(t,e,r){return Me(t)||Me(e)?r:Lt(e)?Mr(t,e,r):$e(e)?e(t):r}function Ql(t,e,r,n){var i=sV(t,function(u){return Mt(u,e)});if(r==="number"){var a=i.filter(function(u){return fe(u)||parseFloat(u)});return a.length?[jh(a),Zi(a)]:[1/0,-1/0]}var s=n?i.filter(function(u){return!Me(u)}):i;return s.map(function(u){return Lt(u)||u instanceof Date?u:""})}var cK=function(e){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,s=-1,u=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(u<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var c=a.range,f=0;f<u;f++){var p=f>0?i[f-1].coordinate:i[u-1].coordinate,h=i[f].coordinate,g=f>=u-1?i[0].coordinate:i[f+1].coordinate,v=void 0;if(fr(h-p)!==fr(g-h)){var w=[];if(fr(g-h)===fr(c[1]-c[0])){v=g;var x=h+c[1]-c[0];w[0]=Math.min(x,(x+p)/2),w[1]=Math.max(x,(x+p)/2)}else{v=p;var y=g+c[1]-c[0];w[0]=Math.min(h,(y+h)/2),w[1]=Math.max(h,(y+h)/2)}var S=[Math.min(h,(v+h)/2),Math.max(h,(v+h)/2)];if(e>S[0]&&e<=S[1]||e>=w[0]&&e<=w[1]){s=i[f].index;break}}else{var k=Math.min(p,g),E=Math.max(p,g);if(e>(k+h)/2&&e<=(E+h)/2){s=i[f].index;break}}}else for(var P=0;P<u;P++)if(P===0&&e<=(n[P].coordinate+n[P+1].coordinate)/2||P>0&&P<u-1&&e>(n[P].coordinate+n[P-1].coordinate)/2&&e<=(n[P].coordinate+n[P+1].coordinate)/2||P===u-1&&e>(n[P].coordinate+n[P-1].coordinate)/2){s=n[P].index;break}return s},Zx=function(e){var r,n=e,i=n.type.displayName,a=(r=e.type)!==null&&r!==void 0&&r.defaultProps?bt(bt({},e.type.defaultProps),e.props):e.props,s=a.stroke,u=a.fill,c;switch(i){case"Line":c=s;break;case"Area":case"Radar":c=s&&s!=="none"?s:u;break;default:c=u;break}return c},fK=function(e){var r=e.barSize,n=e.totalSize,i=e.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var s={},u=Object.keys(a),c=0,f=u.length;c<f;c++)for(var p=a[u[c]].stackGroups,h=Object.keys(p),g=0,v=h.length;g<v;g++){var w=p[h[g]],x=w.items,y=w.cateAxisId,S=x.filter(function(C){return ui(C.type).indexOf("Bar")>=0});if(S&&S.length){var k=S[0].type.defaultProps,E=k!==void 0?bt(bt({},k),S[0].props):S[0].props,P=E.barSize,O=E[y];s[O]||(s[O]=[]);var A=Me(P)?r:P;s[O].push({item:S[0],stackList:S.slice(1),barSize:Me(A)?void 0:dr(A,n,0)})}}return s},dK=function(e){var r=e.barGap,n=e.barCategoryGap,i=e.bandSize,a=e.sizeList,s=a===void 0?[]:a,u=e.maxBarSize,c=s.length;if(c<1)return null;var f=dr(r,i,0,!0),p,h=[];if(s[0].barSize===+s[0].barSize){var g=!1,v=i/c,w=s.reduce(function(P,O){return P+O.barSize||0},0);w+=(c-1)*f,w>=i&&(w-=(c-1)*f,f=0),w>=i&&v>0&&(g=!0,v*=.9,w=c*v);var x=(i-w)/2>>0,y={offset:x-f,size:0};p=s.reduce(function(P,O){var A={item:O.item,position:{offset:y.offset+y.size+f,size:g?v:O.barSize}},C=[].concat(MT(P),[A]);return y=C[C.length-1].position,O.stackList&&O.stackList.length&&O.stackList.forEach(function(R){C.push({item:R,position:y})}),C},h)}else{var S=dr(n,i,0,!0);i-2*S-(c-1)*f<=0&&(f=0);var k=(i-2*S-(c-1)*f)/c;k>1&&(k>>=0);var E=u===+u?Math.min(k,u):k;p=s.reduce(function(P,O,A){var C=[].concat(MT(P),[{item:O.item,position:{offset:S+(k+f)*A+(k-E)/2,size:E}}]);return O.stackList&&O.stackList.length&&O.stackList.forEach(function(R){C.push({item:R,position:C[C.length-1].position})}),C},h)}return p},hK=function(e,r,n,i){var a=n.children,s=n.width,u=n.margin,c=s-(u.left||0)-(u.right||0),f=l$({children:a,legendWidth:c});if(f){var p=i||{},h=p.width,g=p.height,v=f.align,w=f.verticalAlign,x=f.layout;if((x==="vertical"||x==="horizontal"&&w==="middle")&&v!=="center"&&fe(e[v]))return bt(bt({},e),{},Zo({},v,e[v]+(h||0)));if((x==="horizontal"||x==="vertical"&&v==="center")&&w!=="middle"&&fe(e[w]))return bt(bt({},e),{},Zo({},w,e[w]+(g||0)))}return e},pK=function(e,r,n){return Me(r)?!0:e==="horizontal"?r==="yAxis":e==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},u$=function(e,r,n,i,a){var s=r.props.children,u=tn(s,$h).filter(function(f){return pK(i,a,f.props.direction)});if(u&&u.length){var c=u.map(function(f){return f.props.dataKey});return e.reduce(function(f,p){var h=Mt(p,n);if(Me(h))return f;var g=Array.isArray(h)?[jh(h),Zi(h)]:[h,h],v=c.reduce(function(w,x){var y=Mt(p,x,0),S=g[0]-Math.abs(Array.isArray(y)?y[0]:y),k=g[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(S,w[0]),Math.max(k,w[1])]},[1/0,-1/0]);return[Math.min(v[0],f[0]),Math.max(v[1],f[1])]},[1/0,-1/0])}return null},mK=function(e,r,n,i,a){var s=r.map(function(u){return u$(e,u,n,a,i)}).filter(function(u){return!Me(u)});return s&&s.length?s.reduce(function(u,c){return[Math.min(u[0],c[0]),Math.max(u[1],c[1])]},[1/0,-1/0]):null},c$=function(e,r,n,i,a){var s=r.map(function(c){var f=c.props.dataKey;return n==="number"&&f&&u$(e,c,f,i)||Ql(e,f,n,a)});if(n==="number")return s.reduce(function(c,f){return[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]);var u={};return s.reduce(function(c,f){for(var p=0,h=f.length;p<h;p++)u[f[p]]||(u[f[p]]=!0,c.push(f[p]));return c},[])},f$=function(e,r){return e==="horizontal"&&r==="xAxis"||e==="vertical"&&r==="yAxis"||e==="centric"&&r==="angleAxis"||e==="radial"&&r==="radiusAxis"},qa=function(e,r,n){if(!e)return null;var i=e.scale,a=e.duplicateDomain,s=e.type,u=e.range,c=e.realScaleType==="scaleBand"?i.bandwidth()/2:2,f=(r||n)&&s==="category"&&i.bandwidth?i.bandwidth()/c:0;if(f=e.axisType==="angleAxis"&&(u==null?void 0:u.length)>=2?fr(u[0]-u[1])*2*f:f,r&&(e.ticks||e.niceTicks)){var p=(e.ticks||e.niceTicks).map(function(h){var g=a?a.indexOf(h):h;return{coordinate:i(g)+f,value:h,offset:f}});return p.filter(function(h){return!Ns(h.coordinate)})}return e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map(function(h,g){return{coordinate:i(h)+f,value:h,index:g,offset:f}}):i.ticks&&!n?i.ticks(e.tickCount).map(function(h){return{coordinate:i(h)+f,value:h,offset:f}}):i.domain().map(function(h,g){return{coordinate:i(h)+f,value:a?a[h]:h,index:g,offset:f}})},mb=new WeakMap,Rf=function(e,r){if(typeof r!="function")return e;mb.has(e)||mb.set(e,new WeakMap);var n=mb.get(e);if(n.has(r))return n.get(r);var i=function(){e.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},d$=function(e,r,n){var i=e.scale,a=e.type,s=e.layout,u=e.axisType;if(i==="auto")return s==="radial"&&u==="radiusAxis"?{scale:gu(),realScaleType:"band"}:s==="radial"&&u==="angleAxis"?{scale:_d(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Jl(),realScaleType:"point"}:a==="category"?{scale:gu(),realScaleType:"band"}:{scale:_d(),realScaleType:"linear"};if(Ka(i)){var c="scale".concat(gh(i));return{scale:(_T[c]||Jl)(),realScaleType:_T[c]?c:"point"}}return $e(i)?{scale:i}:{scale:Jl(),realScaleType:"point"}},DT=1e-4,h$=function(e){var r=e.domain();if(!(!r||r.length<=2)){var n=r.length,i=e.range(),a=Math.min(i[0],i[1])-DT,s=Math.max(i[0],i[1])+DT,u=e(r[0]),c=e(r[n-1]);(u<a||u>s||c<a||c>s)&&e.domain([r[0],r[n-1]])}},gK=function(e,r){if(!e)return null;for(var n=0,i=e.length;n<i;n++)if(e[n].item===r)return e[n].position;return null},vK=function(e,r){if(!r||r.length!==2||!fe(r[0])||!fe(r[1]))return e;var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),a=[e[0],e[1]];return(!fe(e[0])||e[0]<n)&&(a[0]=n),(!fe(e[1])||e[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<n&&(a[1]=n),a},yK=function(e){var r=e.length;if(!(r<=0))for(var n=0,i=e[0].length;n<i;++n)for(var a=0,s=0,u=0;u<r;++u){var c=Ns(e[u][n][1])?e[u][n][0]:e[u][n][1];c>=0?(e[u][n][0]=a,e[u][n][1]=a+c,a=e[u][n][1]):(e[u][n][0]=s,e[u][n][1]=s+c,s=e[u][n][1])}},bK=function(e){var r=e.length;if(!(r<=0))for(var n=0,i=e[0].length;n<i;++n)for(var a=0,s=0;s<r;++s){var u=Ns(e[s][n][1])?e[s][n][0]:e[s][n][1];u>=0?(e[s][n][0]=a,e[s][n][1]=a+u,a=e[s][n][1]):(e[s][n][0]=0,e[s][n][1]=0)}},wK={sign:yK,expand:s6,none:rs,silhouette:l6,wiggle:u6,positive:bK},xK=function(e,r,n){var i=r.map(function(u){return u.props.dataKey}),a=wK[n],s=o6().keys(i).value(function(u,c){return+Mt(u,c,0)}).order(A0).offset(a);return s(e)},_K=function(e,r,n,i,a,s){if(!e)return null;var u=s?r.reverse():r,c={},f=u.reduce(function(h,g){var v,w=(v=g.type)!==null&&v!==void 0&&v.defaultProps?bt(bt({},g.type.defaultProps),g.props):g.props,x=w.stackId,y=w.hide;if(y)return h;var S=w[n],k=h[S]||{hasStack:!1,stackGroups:{}};if(Lt(x)){var E=k.stackGroups[x]||{numericAxisId:n,cateAxisId:i,items:[]};E.items.push(g),k.hasStack=!0,k.stackGroups[x]=E}else k.stackGroups[Ms("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[g]};return bt(bt({},h),{},Zo({},S,k))},c),p={};return Object.keys(f).reduce(function(h,g){var v=f[g];if(v.hasStack){var w={};v.stackGroups=Object.keys(v.stackGroups).reduce(function(x,y){var S=v.stackGroups[y];return bt(bt({},x),{},Zo({},y,{numericAxisId:n,cateAxisId:i,items:S.items,stackedData:xK(e,S.items,a)}))},w)}return bt(bt({},h),{},Zo({},g,v))},p)},p$=function(e,r){var n=r.realScaleType,i=r.type,a=r.tickCount,s=r.originalDomain,u=r.allowDecimals,c=n||r.scale;if(c!=="auto"&&c!=="linear")return null;if(a&&i==="number"&&s&&(s[0]==="auto"||s[1]==="auto")){var f=e.domain();if(!f.length)return null;var p=MV(f,a,u);return e.domain([jh(p),Zi(p)]),{niceTicks:p}}if(a&&i==="number"){var h=e.domain(),g=LV(h,a,u);return{niceTicks:g}}return null};function BT(t){var e=t.axis,r=t.ticks,n=t.bandSize,i=t.entry,a=t.index,s=t.dataKey;if(e.type==="category"){if(!e.allowDuplicatedCategory&&e.dataKey&&!Me(i[e.dataKey])){var u=nd(r,"value",i[e.dataKey]);if(u)return u.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var c=Mt(i,Me(s)?e.dataKey:s);return Me(c)?null:e.scale(c)}var UT=function(e){var r=e.axis,n=e.ticks,i=e.offset,a=e.bandSize,s=e.entry,u=e.index;if(r.type==="category")return n[u]?n[u].coordinate+i:null;var c=Mt(s,r.dataKey,r.domain[u]);return Me(c)?null:r.scale(c)-a/2+i},SK=function(e){var r=e.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},kK=function(e,r){var n,i=(n=e.type)!==null&&n!==void 0&&n.defaultProps?bt(bt({},e.type.defaultProps),e.props):e.props,a=i.stackId;if(Lt(a)){var s=r[a];if(s){var u=s.items.indexOf(e);return u>=0?s.stackedData[u]:null}}return null},OK=function(e){return e.reduce(function(r,n){return[jh(n.concat([r[0]]).filter(fe)),Zi(n.concat([r[1]]).filter(fe))]},[1/0,-1/0])},m$=function(e,r,n){return Object.keys(e).reduce(function(i,a){var s=e[a],u=s.stackedData,c=u.reduce(function(f,p){var h=OK(p.slice(r,n+1));return[Math.min(f[0],h[0]),Math.max(f[1],h[1])]},[1/0,-1/0]);return[Math.min(c[0],i[0]),Math.max(c[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},qT=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,zT=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Q0=function(e,r,n){if($e(e))return e(r,n);if(!Array.isArray(e))return r;var i=[];if(fe(e[0]))i[0]=n?e[0]:Math.min(e[0],r[0]);else if(qT.test(e[0])){var a=+qT.exec(e[0])[1];i[0]=r[0]-a}else $e(e[0])?i[0]=e[0](r[0]):i[0]=r[0];if(fe(e[1]))i[1]=n?e[1]:Math.max(e[1],r[1]);else if(zT.test(e[1])){var s=+zT.exec(e[1])[1];i[1]=r[1]+s}else $e(e[1])?i[1]=e[1](r[1]):i[1]=r[1];return i},Td=function(e,r,n){if(e&&e.scale&&e.scale.bandwidth){var i=e.scale.bandwidth();if(!n||i>0)return i}if(e&&r&&r.length>=2){for(var a=Ax(r,function(h){return h.coordinate}),s=1/0,u=1,c=a.length;u<c;u++){var f=a[u],p=a[u-1];s=Math.min((f.coordinate||0)-(p.coordinate||0),s)}return s===1/0?0:s}return n?void 0:0},FT=function(e,r,n){return!e||!e.length||cs(e,Mr(n,"type.defaultProps.domain"))?r:e},g$=function(e,r){var n=e.type.defaultProps?bt(bt({},e.type.defaultProps),e.props):e.props,i=n.dataKey,a=n.name,s=n.unit,u=n.formatter,c=n.tooltipType,f=n.chartType,p=n.hide;return bt(bt({},Ee(e,!1)),{},{dataKey:i,unit:s,formatter:u,name:a||i,color:Zx(e),value:Mt(r,i),type:c,payload:r,chartType:f,hide:p})};function Ou(t){"@babel/helpers - typeof";return Ou=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ou(t)}function WT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function oi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?WT(Object(r),!0).forEach(function(n){v$(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):WT(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function v$(t,e,r){return e=EK(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function EK(t){var e=AK(t,"string");return Ou(e)=="symbol"?e:e+""}function AK(t,e){if(Ou(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Ou(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function PK(t,e){return RK(t)||jK(t,e)||CK(t,e)||TK()}function TK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
287
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CK(t,e){if(t){if(typeof t=="string")return HT(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return HT(t,e)}}function HT(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function jK(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function RK(t){if(Array.isArray(t))return t}var Cd=Math.PI/180,IK=function(e){return e*180/Math.PI},it=function(e,r,n,i){return{x:e+Math.cos(-Cd*i)*n,y:r+Math.sin(-Cd*i)*n}},y$=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},$K=function(e,r,n,i,a){var s=e.width,u=e.height,c=e.startAngle,f=e.endAngle,p=dr(e.cx,s,s/2),h=dr(e.cy,u,u/2),g=y$(s,u,n),v=dr(e.innerRadius,g,0),w=dr(e.outerRadius,g,g*.8),x=Object.keys(r);return x.reduce(function(y,S){var k=r[S],E=k.domain,P=k.reversed,O;if(Me(k.range))i==="angleAxis"?O=[c,f]:i==="radiusAxis"&&(O=[v,w]),P&&(O=[O[1],O[0]]);else{O=k.range;var A=O,C=PK(A,2);c=C[0],f=C[1]}var R=d$(k,a),M=R.realScaleType,H=R.scale;H.domain(E).range(O),h$(H);var z=p$(H,oi(oi({},k),{},{realScaleType:M})),B=oi(oi(oi({},k),z),{},{range:O,radius:w,realScaleType:M,scale:H,cx:p,cy:h,innerRadius:v,outerRadius:w,startAngle:c,endAngle:f});return oi(oi({},y),{},v$({},S,B))},{})},NK=function(e,r){var n=e.x,i=e.y,a=r.x,s=r.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(i-s,2))},MK=function(e,r){var n=e.x,i=e.y,a=r.cx,s=r.cy,u=NK({x:n,y:i},{x:a,y:s});if(u<=0)return{radius:u};var c=(n-a)/u,f=Math.acos(c);return i>s&&(f=2*Math.PI-f),{radius:u,angle:IK(f),angleInRadian:f}},LK=function(e){var r=e.startAngle,n=e.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),s=Math.min(i,a);return{startAngle:r-s*360,endAngle:n-s*360}},DK=function(e,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),s=Math.floor(i/360),u=Math.min(a,s);return e+u*360},VT=function(e,r){var n=e.x,i=e.y,a=MK({x:n,y:i},r),s=a.radius,u=a.angle,c=r.innerRadius,f=r.outerRadius;if(s<c||s>f)return!1;if(s===0)return!0;var p=LK(r),h=p.startAngle,g=p.endAngle,v=u,w;if(h<=g){for(;v>g;)v-=360;for(;v<h;)v+=360;w=v>=h&&v<=g}else{for(;v>h;)v-=360;for(;v<g;)v+=360;w=v>=g&&v<=h}return w?oi(oi({},r),{},{radius:s,angle:DK(v,r)}):null},b$=function(e){return!$.isValidElement(e)&&!$e(e)&&typeof e!="boolean"?e.className:""};function Eu(t){"@babel/helpers - typeof";return Eu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Eu(t)}var BK=["offset"];function UK(t){return WK(t)||FK(t)||zK(t)||qK()}function qK(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
288
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zK(t,e){if(t){if(typeof t=="string")return Z0(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Z0(t,e)}}function FK(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function WK(t){if(Array.isArray(t))return Z0(t)}function Z0(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function HK(t,e){if(t==null)return{};var r=VK(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function VK(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function KT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Nt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?KT(Object(r),!0).forEach(function(n){KK(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):KT(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function KK(t,e,r){return e=GK(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function GK(t){var e=XK(t,"string");return Eu(e)=="symbol"?e:e+""}function XK(t,e){if(Eu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Eu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Au(){return Au=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Au.apply(this,arguments)}var YK=function(e){var r=e.value,n=e.formatter,i=Me(e.children)?r:e.children;return $e(n)?n(i):i},JK=function(e,r){var n=fr(r-e),i=Math.min(Math.abs(r-e),360);return n*i},QK=function(e,r,n){var i=e.position,a=e.viewBox,s=e.offset,u=e.className,c=a,f=c.cx,p=c.cy,h=c.innerRadius,g=c.outerRadius,v=c.startAngle,w=c.endAngle,x=c.clockWise,y=(h+g)/2,S=JK(v,w),k=S>=0?1:-1,E,P;i==="insideStart"?(E=v+k*s,P=x):i==="insideEnd"?(E=w-k*s,P=!x):i==="end"&&(E=w+k*s,P=x),P=S<=0?P:!P;var O=it(f,p,y,E),A=it(f,p,y,E+(P?1:-1)*359),C="M".concat(O.x,",").concat(O.y,`
289
+ A`).concat(y,",").concat(y,",0,1,").concat(P?0:1,`,
290
+ `).concat(A.x,",").concat(A.y),R=Me(e.id)?Ms("recharts-radial-line-"):e.id;return I.createElement("text",Au({},n,{dominantBaseline:"central",className:Le("recharts-radial-bar-label",u)}),I.createElement("defs",null,I.createElement("path",{id:R,d:C})),I.createElement("textPath",{xlinkHref:"#".concat(R)},r))},ZK=function(e){var r=e.viewBox,n=e.offset,i=e.position,a=r,s=a.cx,u=a.cy,c=a.innerRadius,f=a.outerRadius,p=a.startAngle,h=a.endAngle,g=(p+h)/2;if(i==="outside"){var v=it(s,u,f+n,g),w=v.x,x=v.y;return{x:w,y:x,textAnchor:w>=s?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:s,y:u,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:s,y:u,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:s,y:u,textAnchor:"middle",verticalAnchor:"end"};var y=(c+f)/2,S=it(s,u,y,g),k=S.x,E=S.y;return{x:k,y:E,textAnchor:"middle",verticalAnchor:"middle"}},eG=function(e){var r=e.viewBox,n=e.parentViewBox,i=e.offset,a=e.position,s=r,u=s.x,c=s.y,f=s.width,p=s.height,h=p>=0?1:-1,g=h*i,v=h>0?"end":"start",w=h>0?"start":"end",x=f>=0?1:-1,y=x*i,S=x>0?"end":"start",k=x>0?"start":"end";if(a==="top"){var E={x:u+f/2,y:c-h*i,textAnchor:"middle",verticalAnchor:v};return Nt(Nt({},E),n?{height:Math.max(c-n.y,0),width:f}:{})}if(a==="bottom"){var P={x:u+f/2,y:c+p+g,textAnchor:"middle",verticalAnchor:w};return Nt(Nt({},P),n?{height:Math.max(n.y+n.height-(c+p),0),width:f}:{})}if(a==="left"){var O={x:u-y,y:c+p/2,textAnchor:S,verticalAnchor:"middle"};return Nt(Nt({},O),n?{width:Math.max(O.x-n.x,0),height:p}:{})}if(a==="right"){var A={x:u+f+y,y:c+p/2,textAnchor:k,verticalAnchor:"middle"};return Nt(Nt({},A),n?{width:Math.max(n.x+n.width-A.x,0),height:p}:{})}var C=n?{width:f,height:p}:{};return a==="insideLeft"?Nt({x:u+y,y:c+p/2,textAnchor:k,verticalAnchor:"middle"},C):a==="insideRight"?Nt({x:u+f-y,y:c+p/2,textAnchor:S,verticalAnchor:"middle"},C):a==="insideTop"?Nt({x:u+f/2,y:c+g,textAnchor:"middle",verticalAnchor:w},C):a==="insideBottom"?Nt({x:u+f/2,y:c+p-g,textAnchor:"middle",verticalAnchor:v},C):a==="insideTopLeft"?Nt({x:u+y,y:c+g,textAnchor:k,verticalAnchor:w},C):a==="insideTopRight"?Nt({x:u+f-y,y:c+g,textAnchor:S,verticalAnchor:w},C):a==="insideBottomLeft"?Nt({x:u+y,y:c+p-g,textAnchor:k,verticalAnchor:v},C):a==="insideBottomRight"?Nt({x:u+f-y,y:c+p-g,textAnchor:S,verticalAnchor:v},C):$s(a)&&(fe(a.x)||Da(a.x))&&(fe(a.y)||Da(a.y))?Nt({x:u+dr(a.x,f),y:c+dr(a.y,p),textAnchor:"end",verticalAnchor:"end"},C):Nt({x:u+f/2,y:c+p/2,textAnchor:"middle",verticalAnchor:"middle"},C)},tG=function(e){return"cx"in e&&fe(e.cx)};function Ht(t){var e=t.offset,r=e===void 0?5:e,n=HK(t,BK),i=Nt({offset:r},n),a=i.viewBox,s=i.position,u=i.value,c=i.children,f=i.content,p=i.className,h=p===void 0?"":p,g=i.textBreakAll;if(!a||Me(u)&&Me(c)&&!$.isValidElement(f)&&!$e(f))return null;if($.isValidElement(f))return $.cloneElement(f,i);var v;if($e(f)){if(v=$.createElement(f,i),$.isValidElement(v))return v}else v=YK(i);var w=tG(a),x=Ee(i,!0);if(w&&(s==="insideStart"||s==="insideEnd"||s==="end"))return QK(i,v,x);var y=w?ZK(i):eG(i);return I.createElement(Xa,Au({className:Le("recharts-label",h)},x,y,{breakAll:g}),v)}Ht.displayName="Label";var w$=function(e){var r=e.cx,n=e.cy,i=e.angle,a=e.startAngle,s=e.endAngle,u=e.r,c=e.radius,f=e.innerRadius,p=e.outerRadius,h=e.x,g=e.y,v=e.top,w=e.left,x=e.width,y=e.height,S=e.clockWise,k=e.labelViewBox;if(k)return k;if(fe(x)&&fe(y)){if(fe(h)&&fe(g))return{x:h,y:g,width:x,height:y};if(fe(v)&&fe(w))return{x:v,y:w,width:x,height:y}}return fe(h)&&fe(g)?{x:h,y:g,width:0,height:0}:fe(r)&&fe(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:s||i||0,innerRadius:f||0,outerRadius:p||c||u||0,clockWise:S}:e.viewBox?e.viewBox:{}},rG=function(e,r){return e?e===!0?I.createElement(Ht,{key:"label-implicit",viewBox:r}):Lt(e)?I.createElement(Ht,{key:"label-implicit",viewBox:r,value:e}):$.isValidElement(e)?e.type===Ht?$.cloneElement(e,{key:"label-implicit",viewBox:r}):I.createElement(Ht,{key:"label-implicit",content:e,viewBox:r}):$e(e)?I.createElement(Ht,{key:"label-implicit",content:e,viewBox:r}):$s(e)?I.createElement(Ht,Au({viewBox:r},e,{key:"label-implicit"})):null:null},nG=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var i=e.children,a=w$(e),s=tn(i,Ht).map(function(c,f){return $.cloneElement(c,{viewBox:r||a,key:"label-".concat(f)})});if(!n)return s;var u=rG(e.label,r||a);return[u].concat(UK(s))};Ht.parseViewBox=w$;Ht.renderCallByParent=nG;var gb,GT;function iG(){if(GT)return gb;GT=1;function t(e){var r=e==null?0:e.length;return r?e[r-1]:void 0}return gb=t,gb}var aG=iG();const oG=Ye(aG);function Pu(t){"@babel/helpers - typeof";return Pu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pu(t)}var sG=["valueAccessor"],lG=["data","dataKey","clockWise","id","textBreakAll"];function uG(t){return hG(t)||dG(t)||fG(t)||cG()}function cG(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
291
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fG(t,e){if(t){if(typeof t=="string")return ew(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ew(t,e)}}function dG(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function hG(t){if(Array.isArray(t))return ew(t)}function ew(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function jd(){return jd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},jd.apply(this,arguments)}function XT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function YT(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?XT(Object(r),!0).forEach(function(n){pG(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):XT(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function pG(t,e,r){return e=mG(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function mG(t){var e=gG(t,"string");return Pu(e)=="symbol"?e:e+""}function gG(t,e){if(Pu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Pu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function JT(t,e){if(t==null)return{};var r=vG(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function vG(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var yG=function(e){return Array.isArray(e.value)?oG(e.value):e.value};function di(t){var e=t.valueAccessor,r=e===void 0?yG:e,n=JT(t,sG),i=n.data,a=n.dataKey,s=n.clockWise,u=n.id,c=n.textBreakAll,f=JT(n,lG);return!i||!i.length?null:I.createElement(Ue,{className:"recharts-label-list"},i.map(function(p,h){var g=Me(a)?r(p,h):Mt(p&&p.payload,a),v=Me(u)?{}:{id:"".concat(u,"-").concat(h)};return I.createElement(Ht,jd({},Ee(p,!0),f,v,{parentViewBox:p.parentViewBox,value:g,textBreakAll:c,viewBox:Ht.parseViewBox(Me(s)?p:YT(YT({},p),{},{clockWise:s})),key:"label-".concat(h),index:h}))}))}di.displayName="LabelList";function bG(t,e){return t?t===!0?I.createElement(di,{key:"labelList-implicit",data:e}):I.isValidElement(t)||$e(t)?I.createElement(di,{key:"labelList-implicit",data:e,content:t}):$s(t)?I.createElement(di,jd({data:e},t,{key:"labelList-implicit"})):null:null}function wG(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var n=t.children,i=tn(n,di).map(function(s,u){return $.cloneElement(s,{data:e,key:"labelList-".concat(u)})});if(!r)return i;var a=bG(t.label,e);return[a].concat(uG(i))}di.renderCallByParent=wG;function Tu(t){"@babel/helpers - typeof";return Tu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tu(t)}function tw(){return tw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},tw.apply(this,arguments)}function QT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ZT(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?QT(Object(r),!0).forEach(function(n){xG(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):QT(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function xG(t,e,r){return e=_G(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _G(t){var e=SG(t,"string");return Tu(e)=="symbol"?e:e+""}function SG(t,e){if(Tu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Tu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var kG=function(e,r){var n=fr(r-e),i=Math.min(Math.abs(r-e),359.999);return n*i},If=function(e){var r=e.cx,n=e.cy,i=e.radius,a=e.angle,s=e.sign,u=e.isExternal,c=e.cornerRadius,f=e.cornerIsExternal,p=c*(u?1:-1)+i,h=Math.asin(c/p)/Cd,g=f?a:a+s*h,v=it(r,n,p,g),w=it(r,n,i,g),x=f?a-s*h:a,y=it(r,n,p*Math.cos(h*Cd),x);return{center:v,circleTangency:w,lineTangency:y,theta:h}},x$=function(e){var r=e.cx,n=e.cy,i=e.innerRadius,a=e.outerRadius,s=e.startAngle,u=e.endAngle,c=kG(s,u),f=s+c,p=it(r,n,a,s),h=it(r,n,a,f),g="M ".concat(p.x,",").concat(p.y,`
292
+ A `).concat(a,",").concat(a,`,0,
293
+ `).concat(+(Math.abs(c)>180),",").concat(+(s>f),`,
294
+ `).concat(h.x,",").concat(h.y,`
295
+ `);if(i>0){var v=it(r,n,i,s),w=it(r,n,i,f);g+="L ".concat(w.x,",").concat(w.y,`
296
+ A `).concat(i,",").concat(i,`,0,
297
+ `).concat(+(Math.abs(c)>180),",").concat(+(s<=f),`,
298
+ `).concat(v.x,",").concat(v.y," Z")}else g+="L ".concat(r,",").concat(n," Z");return g},OG=function(e){var r=e.cx,n=e.cy,i=e.innerRadius,a=e.outerRadius,s=e.cornerRadius,u=e.forceCornerRadius,c=e.cornerIsExternal,f=e.startAngle,p=e.endAngle,h=fr(p-f),g=If({cx:r,cy:n,radius:a,angle:f,sign:h,cornerRadius:s,cornerIsExternal:c}),v=g.circleTangency,w=g.lineTangency,x=g.theta,y=If({cx:r,cy:n,radius:a,angle:p,sign:-h,cornerRadius:s,cornerIsExternal:c}),S=y.circleTangency,k=y.lineTangency,E=y.theta,P=c?Math.abs(f-p):Math.abs(f-p)-x-E;if(P<0)return u?"M ".concat(w.x,",").concat(w.y,`
299
+ a`).concat(s,",").concat(s,",0,0,1,").concat(s*2,`,0
300
+ a`).concat(s,",").concat(s,",0,0,1,").concat(-s*2,`,0
301
+ `):x$({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:f,endAngle:p});var O="M ".concat(w.x,",").concat(w.y,`
302
+ A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(v.x,",").concat(v.y,`
303
+ A`).concat(a,",").concat(a,",0,").concat(+(P>180),",").concat(+(h<0),",").concat(S.x,",").concat(S.y,`
304
+ A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(k.x,",").concat(k.y,`
305
+ `);if(i>0){var A=If({cx:r,cy:n,radius:i,angle:f,sign:h,isExternal:!0,cornerRadius:s,cornerIsExternal:c}),C=A.circleTangency,R=A.lineTangency,M=A.theta,H=If({cx:r,cy:n,radius:i,angle:p,sign:-h,isExternal:!0,cornerRadius:s,cornerIsExternal:c}),z=H.circleTangency,B=H.lineTangency,F=H.theta,J=c?Math.abs(f-p):Math.abs(f-p)-M-F;if(J<0&&s===0)return"".concat(O,"L").concat(r,",").concat(n,"Z");O+="L".concat(B.x,",").concat(B.y,`
306
+ A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(z.x,",").concat(z.y,`
307
+ A`).concat(i,",").concat(i,",0,").concat(+(J>180),",").concat(+(h>0),",").concat(C.x,",").concat(C.y,`
308
+ A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(R.x,",").concat(R.y,"Z")}else O+="L".concat(r,",").concat(n,"Z");return O},EG={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},_$=function(e){var r=ZT(ZT({},EG),e),n=r.cx,i=r.cy,a=r.innerRadius,s=r.outerRadius,u=r.cornerRadius,c=r.forceCornerRadius,f=r.cornerIsExternal,p=r.startAngle,h=r.endAngle,g=r.className;if(s<a||p===h)return null;var v=Le("recharts-sector",g),w=s-a,x=dr(u,w,0,!0),y;return x>0&&Math.abs(p-h)<360?y=OG({cx:n,cy:i,innerRadius:a,outerRadius:s,cornerRadius:Math.min(x,w/2),forceCornerRadius:c,cornerIsExternal:f,startAngle:p,endAngle:h}):y=x$({cx:n,cy:i,innerRadius:a,outerRadius:s,startAngle:p,endAngle:h}),I.createElement("path",tw({},Ee(r,!0),{className:v,d:y,role:"img"}))};function Cu(t){"@babel/helpers - typeof";return Cu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cu(t)}function rw(){return rw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},rw.apply(this,arguments)}function eC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function tC(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?eC(Object(r),!0).forEach(function(n){AG(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):eC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function AG(t,e,r){return e=PG(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function PG(t){var e=TG(t,"string");return Cu(e)=="symbol"?e:e+""}function TG(t,e){if(Cu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Cu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var rC={curveBasisClosed:Xz,curveBasisOpen:Yz,curveBasis:Gz,curveBumpX:$z,curveBumpY:Nz,curveLinearClosed:Jz,curveLinear:yh,curveMonotoneX:Qz,curveMonotoneY:Zz,curveNatural:e6,curveStep:t6,curveStepAfter:n6,curveStepBefore:r6},$f=function(e){return e.x===+e.x&&e.y===+e.y},Ml=function(e){return e.x},Ll=function(e){return e.y},CG=function(e,r){if($e(e))return e;var n="curve".concat(gh(e));return(n==="curveMonotone"||n==="curveBump")&&r?rC["".concat(n).concat(r==="vertical"?"Y":"X")]:rC[n]||yh},jG=function(e){var r=e.type,n=r===void 0?"linear":r,i=e.points,a=i===void 0?[]:i,s=e.baseLine,u=e.layout,c=e.connectNulls,f=c===void 0?!1:c,p=CG(n,u),h=f?a.filter(function(x){return $f(x)}):a,g;if(Array.isArray(s)){var v=f?s.filter(function(x){return $f(x)}):s,w=h.map(function(x,y){return tC(tC({},x),{},{base:v[y]})});return u==="vertical"?g=Of().y(Ll).x1(Ml).x0(function(x){return x.base.x}):g=Of().x(Ml).y1(Ll).y0(function(x){return x.base.y}),g.defined($f).curve(p),g(w)}return u==="vertical"&&fe(s)?g=Of().y(Ll).x1(Ml).x0(s):fe(s)?g=Of().x(Ml).y1(Ll).y0(s):g=_2().x(Ml).y(Ll),g.defined($f).curve(p),g(h)},es=function(e){var r=e.className,n=e.points,i=e.path,a=e.pathRef;if((!n||!n.length)&&!i)return null;var s=n&&n.length?jG(e):i;return $.createElement("path",rw({},Ee(e,!1),id(e),{className:Le("recharts-curve",r),d:s,ref:a}))},vb={exports:{}},yb,nC;function RG(){if(nC)return yb;nC=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return yb=t,yb}var bb,iC;function IG(){if(iC)return bb;iC=1;var t=RG();function e(){}function r(){}return r.resetWarningCache=e,bb=function(){function n(s,u,c,f,p,h){if(h!==t){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}}n.isRequired=n;function i(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:e};return a.PropTypes=a,a},bb}var aC;function $G(){return aC||(aC=1,vb.exports=IG()()),vb.exports}var NG=$G();const Ge=Ye(NG),{getOwnPropertyNames:MG,getOwnPropertySymbols:LG}=Object,{hasOwnProperty:DG}=Object.prototype;function wb(t,e){return function(n,i,a){return t(n,i,a)&&e(n,i,a)}}function Nf(t){return function(r,n,i){if(!r||!n||typeof r!="object"||typeof n!="object")return t(r,n,i);const{cache:a}=i,s=a.get(r),u=a.get(n);if(s&&u)return s===n&&u===r;a.set(r,n),a.set(n,r);const c=t(r,n,i);return a.delete(r),a.delete(n),c}}function BG(t){return t!=null?t[Symbol.toStringTag]:void 0}function oC(t){return MG(t).concat(LG(t))}const UG=Object.hasOwn||((t,e)=>DG.call(t,e));function io(t,e){return t===e||!t&&!e&&t!==t&&e!==e}const qG="__v",zG="__o",FG="_owner",{getOwnPropertyDescriptor:sC,keys:lC}=Object;function WG(t,e){return t.byteLength===e.byteLength&&Rd(new Uint8Array(t),new Uint8Array(e))}function HG(t,e,r){let n=t.length;if(e.length!==n)return!1;for(;n-- >0;)if(!r.equals(t[n],e[n],n,n,t,e,r))return!1;return!0}function VG(t,e){return t.byteLength===e.byteLength&&Rd(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function KG(t,e){return io(t.getTime(),e.getTime())}function GG(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function XG(t,e){return t===e}function uC(t,e,r){const n=t.size;if(n!==e.size)return!1;if(!n)return!0;const i=new Array(n),a=t.entries();let s,u,c=0;for(;(s=a.next())&&!s.done;){const f=e.entries();let p=!1,h=0;for(;(u=f.next())&&!u.done;){if(i[h]){h++;continue}const g=s.value,v=u.value;if(r.equals(g[0],v[0],c,h,t,e,r)&&r.equals(g[1],v[1],g[0],v[0],t,e,r)){p=i[h]=!0;break}h++}if(!p)return!1;c++}return!0}const YG=io;function JG(t,e,r){const n=lC(t);let i=n.length;if(lC(e).length!==i)return!1;for(;i-- >0;)if(!S$(t,e,r,n[i]))return!1;return!0}function Dl(t,e,r){const n=oC(t);let i=n.length;if(oC(e).length!==i)return!1;let a,s,u;for(;i-- >0;)if(a=n[i],!S$(t,e,r,a)||(s=sC(t,a),u=sC(e,a),(s||u)&&(!s||!u||s.configurable!==u.configurable||s.enumerable!==u.enumerable||s.writable!==u.writable)))return!1;return!0}function QG(t,e){return io(t.valueOf(),e.valueOf())}function ZG(t,e){return t.source===e.source&&t.flags===e.flags}function cC(t,e,r){const n=t.size;if(n!==e.size)return!1;if(!n)return!0;const i=new Array(n),a=t.values();let s,u;for(;(s=a.next())&&!s.done;){const c=e.values();let f=!1,p=0;for(;(u=c.next())&&!u.done;){if(!i[p]&&r.equals(s.value,u.value,s.value,u.value,t,e,r)){f=i[p]=!0;break}p++}if(!f)return!1}return!0}function Rd(t,e){let r=t.byteLength;if(e.byteLength!==r||t.byteOffset!==e.byteOffset)return!1;for(;r-- >0;)if(t[r]!==e[r])return!1;return!0}function eX(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function S$(t,e,r,n){return(n===FG||n===zG||n===qG)&&(t.$$typeof||e.$$typeof)?!0:UG(e,n)&&r.equals(t[n],e[n],n,n,t,e,r)}const tX="[object ArrayBuffer]",rX="[object Arguments]",nX="[object Boolean]",iX="[object DataView]",aX="[object Date]",oX="[object Error]",sX="[object Map]",lX="[object Number]",uX="[object Object]",cX="[object RegExp]",fX="[object Set]",dX="[object String]",hX={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},pX="[object URL]",mX=Object.prototype.toString;function gX({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:s,areNumbersEqual:u,areObjectsEqual:c,arePrimitiveWrappersEqual:f,areRegExpsEqual:p,areSetsEqual:h,areTypedArraysEqual:g,areUrlsEqual:v,unknownTagComparators:w}){return function(y,S,k){if(y===S)return!0;if(y==null||S==null)return!1;const E=typeof y;if(E!==typeof S)return!1;if(E!=="object")return E==="number"?u(y,S,k):E==="function"?a(y,S,k):!1;const P=y.constructor;if(P!==S.constructor)return!1;if(P===Object)return c(y,S,k);if(Array.isArray(y))return e(y,S,k);if(P===Date)return n(y,S,k);if(P===RegExp)return p(y,S,k);if(P===Map)return s(y,S,k);if(P===Set)return h(y,S,k);const O=mX.call(y);if(O===aX)return n(y,S,k);if(O===cX)return p(y,S,k);if(O===sX)return s(y,S,k);if(O===fX)return h(y,S,k);if(O===uX)return typeof y.then!="function"&&typeof S.then!="function"&&c(y,S,k);if(O===pX)return v(y,S,k);if(O===oX)return i(y,S,k);if(O===rX)return c(y,S,k);if(hX[O])return g(y,S,k);if(O===tX)return t(y,S,k);if(O===iX)return r(y,S,k);if(O===nX||O===lX||O===dX)return f(y,S,k);if(w){let A=w[O];if(!A){const C=BG(y);C&&(A=w[C])}if(A)return A(y,S,k)}return!1}}function vX({circular:t,createCustomConfig:e,strict:r}){let n={areArrayBuffersEqual:WG,areArraysEqual:r?Dl:HG,areDataViewsEqual:VG,areDatesEqual:KG,areErrorsEqual:GG,areFunctionsEqual:XG,areMapsEqual:r?wb(uC,Dl):uC,areNumbersEqual:YG,areObjectsEqual:r?Dl:JG,arePrimitiveWrappersEqual:QG,areRegExpsEqual:ZG,areSetsEqual:r?wb(cC,Dl):cC,areTypedArraysEqual:r?wb(Rd,Dl):Rd,areUrlsEqual:eX,unknownTagComparators:void 0};if(e&&(n=Object.assign({},n,e(n))),t){const i=Nf(n.areArraysEqual),a=Nf(n.areMapsEqual),s=Nf(n.areObjectsEqual),u=Nf(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:u})}return n}function yX(t){return function(e,r,n,i,a,s,u){return t(e,r,u)}}function bX({circular:t,comparator:e,createState:r,equals:n,strict:i}){if(r)return function(u,c){const{cache:f=t?new WeakMap:void 0,meta:p}=r();return e(u,c,{cache:f,equals:n,meta:p,strict:i})};if(t)return function(u,c){return e(u,c,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};const a={cache:void 0,equals:n,meta:void 0,strict:i};return function(u,c){return e(u,c,a)}}const wX=oa();oa({strict:!0});oa({circular:!0});oa({circular:!0,strict:!0});oa({createInternalComparator:()=>io});oa({strict:!0,createInternalComparator:()=>io});oa({circular:!0,createInternalComparator:()=>io});oa({circular:!0,createInternalComparator:()=>io,strict:!0});function oa(t={}){const{circular:e=!1,createInternalComparator:r,createState:n,strict:i=!1}=t,a=vX(t),s=gX(a),u=r?r(s):yX(s);return bX({circular:e,comparator:s,createState:n,equals:u,strict:i})}function xX(t){typeof requestAnimationFrame<"u"&&requestAnimationFrame(t)}function fC(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>e?(t(a),r=-1):xX(i)};requestAnimationFrame(n)}function nw(t){"@babel/helpers - typeof";return nw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nw(t)}function _X(t){return EX(t)||OX(t)||kX(t)||SX()}function SX(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
309
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kX(t,e){if(t){if(typeof t=="string")return dC(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dC(t,e)}}function dC(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function OX(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function EX(t){if(Array.isArray(t))return t}function AX(){var t={},e=function(){return null},r=!1,n=function i(a){if(!r){if(Array.isArray(a)){if(!a.length)return;var s=a,u=_X(s),c=u[0],f=u.slice(1);if(typeof c=="number"){fC(i.bind(null,f),c);return}i(c),fC(i.bind(null,f));return}nw(a)==="object"&&(t=a,e(t)),typeof a=="function"&&a()}};return{stop:function(){r=!0},start:function(a){r=!1,n(a)},subscribe:function(a){return e=a,function(){e=function(){return null}}}}}function ju(t){"@babel/helpers - typeof";return ju=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ju(t)}function hC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function pC(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?hC(Object(r),!0).forEach(function(n){k$(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):hC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function k$(t,e,r){return e=PX(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function PX(t){var e=TX(t,"string");return ju(e)==="symbol"?e:String(e)}function TX(t,e){if(ju(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ju(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var CX=function(e,r){return[Object.keys(e),Object.keys(r)].reduce(function(n,i){return n.filter(function(a){return i.includes(a)})})},jX=function(e){return e},RX=function(e){return e.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},Zl=function(e,r){return Object.keys(r).reduce(function(n,i){return pC(pC({},n),{},k$({},i,e(i,r[i])))},{})},mC=function(e,r,n){return e.map(function(i){return"".concat(RX(i)," ").concat(r,"ms ").concat(n)}).join(",")};function IX(t,e){return MX(t)||NX(t,e)||O$(t,e)||$X()}function $X(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
310
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NX(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function MX(t){if(Array.isArray(t))return t}function LX(t){return UX(t)||BX(t)||O$(t)||DX()}function DX(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
311
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function O$(t,e){if(t){if(typeof t=="string")return iw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return iw(t,e)}}function BX(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function UX(t){if(Array.isArray(t))return iw(t)}function iw(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Id=1e-4,E$=function(e,r){return[0,3*e,3*r-6*e,3*e-3*r+1]},A$=function(e,r){return e.map(function(n,i){return n*Math.pow(r,i)}).reduce(function(n,i){return n+i})},gC=function(e,r){return function(n){var i=E$(e,r);return A$(i,n)}},qX=function(e,r){return function(n){var i=E$(e,r),a=[].concat(LX(i.map(function(s,u){return s*u}).slice(1)),[0]);return A$(a,n)}},vC=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var i=r[0],a=r[1],s=r[2],u=r[3];if(r.length===1)switch(r[0]){case"linear":i=0,a=0,s=1,u=1;break;case"ease":i=.25,a=.1,s=.25,u=1;break;case"ease-in":i=.42,a=0,s=1,u=1;break;case"ease-out":i=.42,a=0,s=.58,u=1;break;case"ease-in-out":i=0,a=0,s=.58,u=1;break;default:{var c=r[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var f=c[1].split(")")[0].split(",").map(function(y){return parseFloat(y)}),p=IX(f,4);i=p[0],a=p[1],s=p[2],u=p[3]}}}var h=gC(i,s),g=gC(a,u),v=qX(i,s),w=function(S){return S>1?1:S<0?0:S},x=function(S){for(var k=S>1?1:S,E=k,P=0;P<8;++P){var O=h(E)-k,A=v(E);if(Math.abs(O-k)<Id||A<Id)return g(E);E=w(E-O/A)}return g(E)};return x.isStepper=!1,x},zX=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.stiff,n=r===void 0?100:r,i=e.damping,a=i===void 0?8:i,s=e.dt,u=s===void 0?17:s,c=function(p,h,g){var v=-(p-h)*n,w=g*a,x=g+(v-w)*u/1e3,y=g*u/1e3+p;return Math.abs(y-h)<Id&&Math.abs(x)<Id?[h,0]:[y,x]};return c.isStepper=!0,c.dt=u,c},FX=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var i=r[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return vC(i);case"spring":return zX();default:if(i.split("(")[0]==="cubic-bezier")return vC(i)}return typeof i=="function"?i:null};function Ru(t){"@babel/helpers - typeof";return Ru=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ru(t)}function yC(t){return VX(t)||HX(t)||P$(t)||WX()}function WX(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
312
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HX(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function VX(t){if(Array.isArray(t))return ow(t)}function bC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Qt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?bC(Object(r),!0).forEach(function(n){aw(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function aw(t,e,r){return e=KX(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function KX(t){var e=GX(t,"string");return Ru(e)==="symbol"?e:String(e)}function GX(t,e){if(Ru(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Ru(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function XX(t,e){return QX(t)||JX(t,e)||P$(t,e)||YX()}function YX(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
313
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P$(t,e){if(t){if(typeof t=="string")return ow(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ow(t,e)}}function ow(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function JX(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function QX(t){if(Array.isArray(t))return t}var $d=function(e,r,n){return e+(r-e)*n},sw=function(e){var r=e.from,n=e.to;return r!==n},ZX=function t(e,r,n){var i=Zl(function(a,s){if(sw(s)){var u=e(s.from,s.to,s.velocity),c=XX(u,2),f=c[0],p=c[1];return Qt(Qt({},s),{},{from:f,velocity:p})}return s},r);return n<1?Zl(function(a,s){return sw(s)?Qt(Qt({},s),{},{velocity:$d(s.velocity,i[a].velocity,n),from:$d(s.from,i[a].from,n)}):s},r):t(e,i,n-1)};const eY=(function(t,e,r,n,i){var a=CX(t,e),s=a.reduce(function(y,S){return Qt(Qt({},y),{},aw({},S,[t[S],e[S]]))},{}),u=a.reduce(function(y,S){return Qt(Qt({},y),{},aw({},S,{from:t[S],velocity:0,to:e[S]}))},{}),c=-1,f,p,h=function(){return null},g=function(){return Zl(function(S,k){return k.from},u)},v=function(){return!Object.values(u).filter(sw).length},w=function(S){f||(f=S);var k=S-f,E=k/r.dt;u=ZX(r,u,E),i(Qt(Qt(Qt({},t),e),g())),f=S,v()||(c=requestAnimationFrame(h))},x=function(S){p||(p=S);var k=(S-p)/n,E=Zl(function(O,A){return $d.apply(void 0,yC(A).concat([r(k)]))},s);if(i(Qt(Qt(Qt({},t),e),E)),k<1)c=requestAnimationFrame(h);else{var P=Zl(function(O,A){return $d.apply(void 0,yC(A).concat([r(1)]))},s);i(Qt(Qt(Qt({},t),e),P))}};return h=r.isStepper?w:x,function(){return requestAnimationFrame(h),function(){cancelAnimationFrame(c)}}});function ds(t){"@babel/helpers - typeof";return ds=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ds(t)}var tY=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function rY(t,e){if(t==null)return{};var r=nY(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function nY(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function xb(t){return sY(t)||oY(t)||aY(t)||iY()}function iY(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
314
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aY(t,e){if(t){if(typeof t=="string")return lw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lw(t,e)}}function oY(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function sY(t){if(Array.isArray(t))return lw(t)}function lw(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function wC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function pn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?wC(Object(r),!0).forEach(function(n){Vl(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Vl(t,e,r){return e=T$(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function lY(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function uY(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,T$(n.key),n)}}function cY(t,e,r){return e&&uY(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function T$(t){var e=fY(t,"string");return ds(e)==="symbol"?e:String(e)}function fY(t,e){if(ds(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ds(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function dY(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&uw(t,e)}function uw(t,e){return uw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},uw(t,e)}function hY(t){var e=pY();return function(){var n=Nd(t),i;if(e){var a=Nd(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return cw(this,i)}}function cw(t,e){if(e&&(ds(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fw(t)}function fw(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pY(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Nd(t){return Nd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Nd(t)}var zn=(function(t){dY(r,t);var e=hY(r);function r(n,i){var a;lY(this,r),a=e.call(this,n,i);var s=a.props,u=s.isActive,c=s.attributeName,f=s.from,p=s.to,h=s.steps,g=s.children,v=s.duration;if(a.handleStyleChange=a.handleStyleChange.bind(fw(a)),a.changeStyle=a.changeStyle.bind(fw(a)),!u||v<=0)return a.state={style:{}},typeof g=="function"&&(a.state={style:p}),cw(a);if(h&&h.length)a.state={style:h[0].style};else if(f){if(typeof g=="function")return a.state={style:f},cw(a);a.state={style:c?Vl({},c,f):f}}else a.state={style:{}};return a}return cY(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,s=i.canBegin;this.mounted=!0,!(!a||!s)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,s=a.isActive,u=a.canBegin,c=a.attributeName,f=a.shouldReAnimate,p=a.to,h=a.from,g=this.state.style;if(u){if(!s){var v={style:c?Vl({},c,p):p};this.state&&g&&(c&&g[c]!==p||!c&&g!==p)&&this.setState(v);return}if(!(wX(i.to,p)&&i.canBegin&&i.isActive)){var w=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var x=w||f?h:i.to;if(this.state&&g){var y={style:c?Vl({},c,x):x};(c&&g[c]!==x||!c&&g!==x)&&this.setState(y)}this.runAnimation(pn(pn({},this.props),{},{from:x,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,s=i.from,u=i.to,c=i.duration,f=i.easing,p=i.begin,h=i.onAnimationEnd,g=i.onAnimationStart,v=eY(s,u,FX(f),c,this.changeStyle),w=function(){a.stopJSAnimation=v()};this.manager.start([g,p,w,c,h])}},{key:"runStepAnimation",value:function(i){var a=this,s=i.steps,u=i.begin,c=i.onAnimationStart,f=s[0],p=f.style,h=f.duration,g=h===void 0?0:h,v=function(x,y,S){if(S===0)return x;var k=y.duration,E=y.easing,P=E===void 0?"ease":E,O=y.style,A=y.properties,C=y.onAnimationEnd,R=S>0?s[S-1]:y,M=A||Object.keys(O);if(typeof P=="function"||P==="spring")return[].concat(xb(x),[a.runJSAnimation.bind(a,{from:R.style,to:O,duration:k,easing:P}),k]);var H=mC(M,k,P),z=pn(pn(pn({},R.style),O),{},{transition:H});return[].concat(xb(x),[z,k,C]).filter(jX)};return this.manager.start([c].concat(xb(s.reduce(v,[p,Math.max(g,u)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=AX());var a=i.begin,s=i.duration,u=i.attributeName,c=i.to,f=i.easing,p=i.onAnimationStart,h=i.onAnimationEnd,g=i.steps,v=i.children,w=this.manager;if(this.unSubscribe=w.subscribe(this.handleStyleChange),typeof f=="function"||typeof v=="function"||f==="spring"){this.runJSAnimation(i);return}if(g.length>1){this.runStepAnimation(i);return}var x=u?Vl({},u,c):c,y=mC(Object.keys(x),s,f);w.start([p,a,pn(pn({},x),{},{transition:y}),s,h])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var s=i.duration;i.attributeName,i.easing;var u=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var c=rY(i,tY),f=$.Children.count(a),p=this.state.style;if(typeof a=="function")return a(p);if(!u||f===0||s<=0)return a;var h=function(v){var w=v.props,x=w.style,y=x===void 0?{}:x,S=w.className,k=$.cloneElement(v,pn(pn({},c),{},{style:pn(pn({},y),p),className:S}));return k};return f===1?h($.Children.only(a)):I.createElement("div",null,$.Children.map(a,function(g){return h(g)}))}}]),r})($.PureComponent);zn.displayName="Animate";zn.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};zn.propTypes={from:Ge.oneOfType([Ge.object,Ge.string]),to:Ge.oneOfType([Ge.object,Ge.string]),attributeName:Ge.string,duration:Ge.number,begin:Ge.number,easing:Ge.oneOfType([Ge.string,Ge.func]),steps:Ge.arrayOf(Ge.shape({duration:Ge.number.isRequired,style:Ge.object.isRequired,easing:Ge.oneOfType([Ge.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Ge.func]),properties:Ge.arrayOf("string"),onAnimationEnd:Ge.func})),children:Ge.oneOfType([Ge.node,Ge.func]),isActive:Ge.bool,canBegin:Ge.bool,onAnimationEnd:Ge.func,shouldReAnimate:Ge.bool,onAnimationStart:Ge.func,onAnimationReStart:Ge.func};function Iu(t){"@babel/helpers - typeof";return Iu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Iu(t)}function Md(){return Md=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Md.apply(this,arguments)}function mY(t,e){return bY(t)||yY(t,e)||vY(t,e)||gY()}function gY(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
315
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vY(t,e){if(t){if(typeof t=="string")return xC(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xC(t,e)}}function xC(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function yY(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function bY(t){if(Array.isArray(t))return t}function _C(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function SC(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?_C(Object(r),!0).forEach(function(n){wY(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_C(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function wY(t,e,r){return e=xY(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function xY(t){var e=_Y(t,"string");return Iu(e)=="symbol"?e:e+""}function _Y(t,e){if(Iu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Iu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var kC=function(e,r,n,i,a){var s=Math.min(Math.abs(n)/2,Math.abs(i)/2),u=i>=0?1:-1,c=n>=0?1:-1,f=i>=0&&n>=0||i<0&&n<0?1:0,p;if(s>0&&a instanceof Array){for(var h=[0,0,0,0],g=0,v=4;g<v;g++)h[g]=a[g]>s?s:a[g];p="M".concat(e,",").concat(r+u*h[0]),h[0]>0&&(p+="A ".concat(h[0],",").concat(h[0],",0,0,").concat(f,",").concat(e+c*h[0],",").concat(r)),p+="L ".concat(e+n-c*h[1],",").concat(r),h[1]>0&&(p+="A ".concat(h[1],",").concat(h[1],",0,0,").concat(f,`,
316
+ `).concat(e+n,",").concat(r+u*h[1])),p+="L ".concat(e+n,",").concat(r+i-u*h[2]),h[2]>0&&(p+="A ".concat(h[2],",").concat(h[2],",0,0,").concat(f,`,
317
+ `).concat(e+n-c*h[2],",").concat(r+i)),p+="L ".concat(e+c*h[3],",").concat(r+i),h[3]>0&&(p+="A ".concat(h[3],",").concat(h[3],",0,0,").concat(f,`,
318
+ `).concat(e,",").concat(r+i-u*h[3])),p+="Z"}else if(s>0&&a===+a&&a>0){var w=Math.min(s,a);p="M ".concat(e,",").concat(r+u*w,`
319
+ A `).concat(w,",").concat(w,",0,0,").concat(f,",").concat(e+c*w,",").concat(r,`
320
+ L `).concat(e+n-c*w,",").concat(r,`
321
+ A `).concat(w,",").concat(w,",0,0,").concat(f,",").concat(e+n,",").concat(r+u*w,`
322
+ L `).concat(e+n,",").concat(r+i-u*w,`
323
+ A `).concat(w,",").concat(w,",0,0,").concat(f,",").concat(e+n-c*w,",").concat(r+i,`
324
+ L `).concat(e+c*w,",").concat(r+i,`
325
+ A `).concat(w,",").concat(w,",0,0,").concat(f,",").concat(e,",").concat(r+i-u*w," Z")}else p="M ".concat(e,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return p},SY=function(e,r){if(!e||!r)return!1;var n=e.x,i=e.y,a=r.x,s=r.y,u=r.width,c=r.height;if(Math.abs(u)>0&&Math.abs(c)>0){var f=Math.min(a,a+u),p=Math.max(a,a+u),h=Math.min(s,s+c),g=Math.max(s,s+c);return n>=f&&n<=p&&i>=h&&i<=g}return!1},kY={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},e_=function(e){var r=SC(SC({},kY),e),n=$.useRef(),i=$.useState(-1),a=mY(i,2),s=a[0],u=a[1];$.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var P=n.current.getTotalLength();P&&u(P)}catch{}},[]);var c=r.x,f=r.y,p=r.width,h=r.height,g=r.radius,v=r.className,w=r.animationEasing,x=r.animationDuration,y=r.animationBegin,S=r.isAnimationActive,k=r.isUpdateAnimationActive;if(c!==+c||f!==+f||p!==+p||h!==+h||p===0||h===0)return null;var E=Le("recharts-rectangle",v);return k?I.createElement(zn,{canBegin:s>0,from:{width:p,height:h,x:c,y:f},to:{width:p,height:h,x:c,y:f},duration:x,animationEasing:w,isActive:k},function(P){var O=P.width,A=P.height,C=P.x,R=P.y;return I.createElement(zn,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:x,isActive:S,easing:w},I.createElement("path",Md({},Ee(r,!0),{className:E,d:kC(C,R,O,A,g),ref:n})))}):I.createElement("path",Md({},Ee(r,!0),{className:E,d:kC(c,f,p,h,g)}))},OY=["points","className","baseLinePoints","connectNulls"];function Ho(){return Ho=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ho.apply(this,arguments)}function EY(t,e){if(t==null)return{};var r=AY(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function AY(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function OC(t){return jY(t)||CY(t)||TY(t)||PY()}function PY(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
326
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TY(t,e){if(t){if(typeof t=="string")return dw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dw(t,e)}}function CY(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function jY(t){if(Array.isArray(t))return dw(t)}function dw(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var EC=function(e){return e&&e.x===+e.x&&e.y===+e.y},RY=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return e.forEach(function(n){EC(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),EC(e[0])&&r[r.length-1].push(e[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},eu=function(e,r){var n=RY(e);r&&(n=[n.reduce(function(a,s){return[].concat(OC(a),OC(s))},[])]);var i=n.map(function(a){return a.reduce(function(s,u,c){return"".concat(s).concat(c===0?"M":"L").concat(u.x,",").concat(u.y)},"")}).join("");return n.length===1?"".concat(i,"Z"):i},IY=function(e,r,n){var i=eu(e,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(eu(r.reverse(),n).slice(1))},$Y=function(e){var r=e.points,n=e.className,i=e.baseLinePoints,a=e.connectNulls,s=EY(e,OY);if(!r||!r.length)return null;var u=Le("recharts-polygon",n);if(i&&i.length){var c=s.stroke&&s.stroke!=="none",f=IY(r,i,a);return I.createElement("g",{className:u},I.createElement("path",Ho({},Ee(s,!0),{fill:f.slice(-1)==="Z"?s.fill:"none",stroke:"none",d:f})),c?I.createElement("path",Ho({},Ee(s,!0),{fill:"none",d:eu(r,a)})):null,c?I.createElement("path",Ho({},Ee(s,!0),{fill:"none",d:eu(i,a)})):null)}var p=eu(r,a);return I.createElement("path",Ho({},Ee(s,!0),{fill:p.slice(-1)==="Z"?s.fill:"none",className:u,d:p}))};function hw(){return hw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},hw.apply(this,arguments)}var Nh=function(e){var r=e.cx,n=e.cy,i=e.r,a=e.className,s=Le("recharts-dot",a);return r===+r&&n===+n&&i===+i?$.createElement("circle",hw({},Ee(e,!1),id(e),{className:s,cx:r,cy:n,r:i})):null};function $u(t){"@babel/helpers - typeof";return $u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$u(t)}var NY=["x","y","top","left","width","height","className"];function pw(){return pw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},pw.apply(this,arguments)}function AC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function MY(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?AC(Object(r),!0).forEach(function(n){LY(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):AC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function LY(t,e,r){return e=DY(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function DY(t){var e=BY(t,"string");return $u(e)=="symbol"?e:e+""}function BY(t,e){if($u(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if($u(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function UY(t,e){if(t==null)return{};var r=qY(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function qY(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}var zY=function(e,r,n,i,a,s){return"M".concat(e,",").concat(a,"v").concat(i,"M").concat(s,",").concat(r,"h").concat(n)},FY=function(e){var r=e.x,n=r===void 0?0:r,i=e.y,a=i===void 0?0:i,s=e.top,u=s===void 0?0:s,c=e.left,f=c===void 0?0:c,p=e.width,h=p===void 0?0:p,g=e.height,v=g===void 0?0:g,w=e.className,x=UY(e,NY),y=MY({x:n,y:a,top:u,left:f,width:h,height:v},x);return!fe(n)||!fe(a)||!fe(h)||!fe(v)||!fe(u)||!fe(f)?null:I.createElement("path",pw({},Ee(y,!0),{className:Le("recharts-cross",w),d:zY(n,a,h,v,u,f)}))},_b,PC;function WY(){if(PC)return _b;PC=1;var t=Ch(),e=HI(),r=Hn();function n(i,a){return i&&i.length?t(i,r(a,2),e):void 0}return _b=n,_b}var HY=WY();const VY=Ye(HY);var Sb,TC;function KY(){if(TC)return Sb;TC=1;var t=Ch(),e=Hn(),r=VI();function n(i,a){return i&&i.length?t(i,e(a,2),r):void 0}return Sb=n,Sb}var GY=KY();const XY=Ye(GY);var YY=["cx","cy","angle","ticks","axisLine"],JY=["ticks","tick","angle","tickFormatter","stroke"];function hs(t){"@babel/helpers - typeof";return hs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hs(t)}function tu(){return tu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},tu.apply(this,arguments)}function CC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ca(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?CC(Object(r),!0).forEach(function(n){Mh(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):CC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function jC(t,e){if(t==null)return{};var r=QY(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function QY(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function ZY(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function RC(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,j$(n.key),n)}}function eJ(t,e,r){return e&&RC(t.prototype,e),r&&RC(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function tJ(t,e,r){return e=Ld(e),rJ(t,C$()?Reflect.construct(e,r||[],Ld(t).constructor):e.apply(t,r))}function rJ(t,e){if(e&&(hs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nJ(t)}function nJ(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function C$(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(C$=function(){return!!t})()}function Ld(t){return Ld=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ld(t)}function iJ(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mw(t,e)}function mw(t,e){return mw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},mw(t,e)}function Mh(t,e,r){return e=j$(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function j$(t){var e=aJ(t,"string");return hs(e)=="symbol"?e:e+""}function aJ(t,e){if(hs(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(hs(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Lh=(function(t){function e(){return ZY(this,e),tJ(this,e,arguments)}return iJ(e,t),eJ(e,[{key:"getTickValueCoord",value:function(n){var i=n.coordinate,a=this.props,s=a.angle,u=a.cx,c=a.cy;return it(u,c,i,s)}},{key:"getTickTextAnchor",value:function(){var n=this.props.orientation,i;switch(n){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var n=this.props,i=n.cx,a=n.cy,s=n.angle,u=n.ticks,c=VY(u,function(p){return p.coordinate||0}),f=XY(u,function(p){return p.coordinate||0});return{cx:i,cy:a,startAngle:s,endAngle:s,innerRadius:f.coordinate||0,outerRadius:c.coordinate||0}}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,s=n.angle,u=n.ticks,c=n.axisLine,f=jC(n,YY),p=u.reduce(function(w,x){return[Math.min(w[0],x.coordinate),Math.max(w[1],x.coordinate)]},[1/0,-1/0]),h=it(i,a,p[0],s),g=it(i,a,p[1],s),v=Ca(Ca(Ca({},Ee(f,!1)),{},{fill:"none"},Ee(c,!1)),{},{x1:h.x,y1:h.y,x2:g.x,y2:g.y});return I.createElement("line",tu({className:"recharts-polar-radius-axis-line"},v))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,s=i.tick,u=i.angle,c=i.tickFormatter,f=i.stroke,p=jC(i,JY),h=this.getTickTextAnchor(),g=Ee(p,!1),v=Ee(s,!1),w=a.map(function(x,y){var S=n.getTickValueCoord(x),k=Ca(Ca(Ca(Ca({textAnchor:h,transform:"rotate(".concat(90-u,", ").concat(S.x,", ").concat(S.y,")")},g),{},{stroke:"none",fill:f},v),{},{index:y},S),{},{payload:x});return I.createElement(Ue,tu({className:Le("recharts-polar-radius-axis-tick",b$(s)),key:"tick-".concat(x.coordinate)},Ga(n.props,x,y)),e.renderTickItem(s,k,c?c(x.value,y):x.value))});return I.createElement(Ue,{className:"recharts-polar-radius-axis-ticks"},w)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.axisLine,s=n.tick;return!i||!i.length?null:I.createElement(Ue,{className:Le("recharts-polar-radius-axis",this.props.className)},a&&this.renderAxisLine(),s&&this.renderTicks(),Ht.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(n,i,a){var s;return I.isValidElement(n)?s=I.cloneElement(n,i):$e(n)?s=n(i):s=I.createElement(Xa,tu({},i,{className:"recharts-polar-radius-axis-tick-value"}),a),s}}])})($.PureComponent);Mh(Lh,"displayName","PolarRadiusAxis");Mh(Lh,"axisType","radiusAxis");Mh(Lh,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function ps(t){"@babel/helpers - typeof";return ps=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ps(t)}function Ma(){return Ma=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ma.apply(this,arguments)}function IC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ja(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?IC(Object(r),!0).forEach(function(n){Dh(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):IC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function oJ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $C(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,I$(n.key),n)}}function sJ(t,e,r){return e&&$C(t.prototype,e),r&&$C(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function lJ(t,e,r){return e=Dd(e),uJ(t,R$()?Reflect.construct(e,r||[],Dd(t).constructor):e.apply(t,r))}function uJ(t,e){if(e&&(ps(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cJ(t)}function cJ(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function R$(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(R$=function(){return!!t})()}function Dd(t){return Dd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Dd(t)}function fJ(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&gw(t,e)}function gw(t,e){return gw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},gw(t,e)}function Dh(t,e,r){return e=I$(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function I$(t){var e=dJ(t,"string");return ps(e)=="symbol"?e:e+""}function dJ(t,e){if(ps(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ps(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var hJ=Math.PI/180,NC=1e-5,Bh=(function(t){function e(){return oJ(this,e),lJ(this,e,arguments)}return fJ(e,t),sJ(e,[{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.cx,s=i.cy,u=i.radius,c=i.orientation,f=i.tickSize,p=f||8,h=it(a,s,u,n.coordinate),g=it(a,s,u+(c==="inner"?-1:1)*p,n.coordinate);return{x1:h.x,y1:h.y,x2:g.x,y2:g.y}}},{key:"getTickTextAnchor",value:function(n){var i=this.props.orientation,a=Math.cos(-n.coordinate*hJ),s;return a>NC?s=i==="outer"?"start":"end":a<-NC?s=i==="outer"?"end":"start":s="middle",s}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,s=n.radius,u=n.axisLine,c=n.axisLineType,f=ja(ja({},Ee(this.props,!1)),{},{fill:"none"},Ee(u,!1));if(c==="circle")return I.createElement(Nh,Ma({className:"recharts-polar-angle-axis-line"},f,{cx:i,cy:a,r:s}));var p=this.props.ticks,h=p.map(function(g){return it(i,a,s,g.coordinate)});return I.createElement($Y,Ma({className:"recharts-polar-angle-axis-line"},f,{points:h}))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,s=i.tick,u=i.tickLine,c=i.tickFormatter,f=i.stroke,p=Ee(this.props,!1),h=Ee(s,!1),g=ja(ja({},p),{},{fill:"none"},Ee(u,!1)),v=a.map(function(w,x){var y=n.getTickLineCoord(w),S=n.getTickTextAnchor(w),k=ja(ja(ja({textAnchor:S},p),{},{stroke:"none",fill:f},h),{},{index:x,payload:w,x:y.x2,y:y.y2});return I.createElement(Ue,Ma({className:Le("recharts-polar-angle-axis-tick",b$(s)),key:"tick-".concat(w.coordinate)},Ga(n.props,w,x)),u&&I.createElement("line",Ma({className:"recharts-polar-angle-axis-tick-line"},g,y)),s&&e.renderTickItem(s,k,c?c(w.value,x):w.value))});return I.createElement(Ue,{className:"recharts-polar-angle-axis-ticks"},v)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.radius,s=n.axisLine;return a<=0||!i||!i.length?null:I.createElement(Ue,{className:Le("recharts-polar-angle-axis",this.props.className)},s&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,a){var s;return I.isValidElement(n)?s=I.cloneElement(n,i):$e(n)?s=n(i):s=I.createElement(Xa,Ma({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),s}}])})($.PureComponent);Dh(Bh,"displayName","PolarAngleAxis");Dh(Bh,"axisType","angleAxis");Dh(Bh,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var kb,MC;function pJ(){if(MC)return kb;MC=1;var t=H2(),e=t(Object.getPrototypeOf,Object);return kb=e,kb}var Ob,LC;function mJ(){if(LC)return Ob;LC=1;var t=yi(),e=pJ(),r=bi(),n="[object Object]",i=Function.prototype,a=Object.prototype,s=i.toString,u=a.hasOwnProperty,c=s.call(Object);function f(p){if(!r(p)||t(p)!=n)return!1;var h=e(p);if(h===null)return!0;var g=u.call(h,"constructor")&&h.constructor;return typeof g=="function"&&g instanceof g&&s.call(g)==c}return Ob=f,Ob}var gJ=mJ();const vJ=Ye(gJ);var Eb,DC;function yJ(){if(DC)return Eb;DC=1;var t=yi(),e=bi(),r="[object Boolean]";function n(i){return i===!0||i===!1||e(i)&&t(i)==r}return Eb=n,Eb}var bJ=yJ();const wJ=Ye(bJ);function Nu(t){"@babel/helpers - typeof";return Nu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nu(t)}function Bd(){return Bd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Bd.apply(this,arguments)}function xJ(t,e){return OJ(t)||kJ(t,e)||SJ(t,e)||_J()}function _J(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
327
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SJ(t,e){if(t){if(typeof t=="string")return BC(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return BC(t,e)}}function BC(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function kJ(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function OJ(t){if(Array.isArray(t))return t}function UC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function qC(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?UC(Object(r),!0).forEach(function(n){EJ(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):UC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function EJ(t,e,r){return e=AJ(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function AJ(t){var e=PJ(t,"string");return Nu(e)=="symbol"?e:e+""}function PJ(t,e){if(Nu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Nu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var zC=function(e,r,n,i,a){var s=n-i,u;return u="M ".concat(e,",").concat(r),u+="L ".concat(e+n,",").concat(r),u+="L ".concat(e+n-s/2,",").concat(r+a),u+="L ".concat(e+n-s/2-i,",").concat(r+a),u+="L ".concat(e,",").concat(r," Z"),u},TJ={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},CJ=function(e){var r=qC(qC({},TJ),e),n=$.useRef(),i=$.useState(-1),a=xJ(i,2),s=a[0],u=a[1];$.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var E=n.current.getTotalLength();E&&u(E)}catch{}},[]);var c=r.x,f=r.y,p=r.upperWidth,h=r.lowerWidth,g=r.height,v=r.className,w=r.animationEasing,x=r.animationDuration,y=r.animationBegin,S=r.isUpdateAnimationActive;if(c!==+c||f!==+f||p!==+p||h!==+h||g!==+g||p===0&&h===0||g===0)return null;var k=Le("recharts-trapezoid",v);return S?I.createElement(zn,{canBegin:s>0,from:{upperWidth:0,lowerWidth:0,height:g,x:c,y:f},to:{upperWidth:p,lowerWidth:h,height:g,x:c,y:f},duration:x,animationEasing:w,isActive:S},function(E){var P=E.upperWidth,O=E.lowerWidth,A=E.height,C=E.x,R=E.y;return I.createElement(zn,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:x,easing:w},I.createElement("path",Bd({},Ee(r,!0),{className:k,d:zC(C,R,P,O,A),ref:n})))}):I.createElement("g",null,I.createElement("path",Bd({},Ee(r,!0),{className:k,d:zC(c,f,p,h,g)})))},jJ=["option","shapeType","propTransformer","activeClassName","isActive"];function Mu(t){"@babel/helpers - typeof";return Mu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mu(t)}function RJ(t,e){if(t==null)return{};var r=IJ(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function IJ(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function FC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ud(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?FC(Object(r),!0).forEach(function(n){$J(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):FC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function $J(t,e,r){return e=NJ(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function NJ(t){var e=MJ(t,"string");return Mu(e)=="symbol"?e:e+""}function MJ(t,e){if(Mu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Mu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function LJ(t,e){return Ud(Ud({},e),t)}function DJ(t,e){return t==="symbols"}function WC(t){var e=t.shapeType,r=t.elementProps;switch(e){case"rectangle":return I.createElement(e_,r);case"trapezoid":return I.createElement(CJ,r);case"sector":return I.createElement(_$,r);case"symbols":if(DJ(e))return I.createElement(bx,r);break;default:return null}}function BJ(t){return $.isValidElement(t)?t.props:t}function $$(t){var e=t.option,r=t.shapeType,n=t.propTransformer,i=n===void 0?LJ:n,a=t.activeClassName,s=a===void 0?"recharts-active-shape":a,u=t.isActive,c=RJ(t,jJ),f;if($.isValidElement(e))f=$.cloneElement(e,Ud(Ud({},c),BJ(e)));else if($e(e))f=e(c);else if(vJ(e)&&!wJ(e)){var p=i(e,c);f=I.createElement(WC,{shapeType:r,elementProps:p})}else{var h=c;f=I.createElement(WC,{shapeType:r,elementProps:h})}return u?I.createElement(Ue,{className:s},f):f}function Uh(t,e){return e!=null&&"trapezoids"in t.props}function qh(t,e){return e!=null&&"sectors"in t.props}function Lu(t,e){return e!=null&&"points"in t.props}function UJ(t,e){var r,n,i=t.x===(e==null||(r=e.labelViewBox)===null||r===void 0?void 0:r.x)||t.x===e.x,a=t.y===(e==null||(n=e.labelViewBox)===null||n===void 0?void 0:n.y)||t.y===e.y;return i&&a}function qJ(t,e){var r=t.endAngle===e.endAngle,n=t.startAngle===e.startAngle;return r&&n}function zJ(t,e){var r=t.x===e.x,n=t.y===e.y,i=t.z===e.z;return r&&n&&i}function FJ(t,e){var r;return Uh(t,e)?r=UJ:qh(t,e)?r=qJ:Lu(t,e)&&(r=zJ),r}function WJ(t,e){var r;return Uh(t,e)?r="trapezoids":qh(t,e)?r="sectors":Lu(t,e)&&(r="points"),r}function HJ(t,e){if(Uh(t,e)){var r;return(r=e.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(qh(t,e)){var n;return(n=e.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return Lu(t,e)?e.payload:{}}function VJ(t){var e=t.activeTooltipItem,r=t.graphicalItem,n=t.itemData,i=WJ(r,e),a=HJ(r,e),s=n.filter(function(c,f){var p=cs(a,c),h=r.props[i].filter(function(w){var x=FJ(r,e);return x(w,e)}),g=r.props[i].indexOf(h[h.length-1]),v=f===g;return p&&v}),u=n.indexOf(s[s.length-1]);return u}var Wf;function ms(t){"@babel/helpers - typeof";return ms=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ms(t)}function Vo(){return Vo=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Vo.apply(this,arguments)}function HC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function rt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?HC(Object(r),!0).forEach(function(n){Zr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):HC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function KJ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function VC(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,M$(n.key),n)}}function GJ(t,e,r){return e&&VC(t.prototype,e),r&&VC(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function XJ(t,e,r){return e=qd(e),YJ(t,N$()?Reflect.construct(e,r||[],qd(t).constructor):e.apply(t,r))}function YJ(t,e){if(e&&(ms(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return JJ(t)}function JJ(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function N$(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(N$=function(){return!!t})()}function qd(t){return qd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},qd(t)}function QJ(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vw(t,e)}function vw(t,e){return vw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},vw(t,e)}function Zr(t,e,r){return e=M$(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function M$(t){var e=ZJ(t,"string");return ms(e)=="symbol"?e:e+""}function ZJ(t,e){if(ms(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ms(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var xi=(function(t){function e(r){var n;return KJ(this,e),n=XJ(this,e,[r]),Zr(n,"pieRef",null),Zr(n,"sectorRefs",[]),Zr(n,"id",Ms("recharts-pie-")),Zr(n,"handleAnimationEnd",function(){var i=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),$e(i)&&i()}),Zr(n,"handleAnimationStart",function(){var i=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),$e(i)&&i()}),n.state={isAnimationFinished:!r.isAnimationActive,prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,sectorToFocus:0},n}return QJ(e,t),GJ(e,[{key:"isActiveIndex",value:function(n){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(n)!==-1:n===i}},{key:"hasActiveIndex",value:function(){var n=this.props.activeIndex;return Array.isArray(n)?n.length!==0:n||n===0}},{key:"renderLabels",value:function(n){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var a=this.props,s=a.label,u=a.labelLine,c=a.dataKey,f=a.valueKey,p=Ee(this.props,!1),h=Ee(s,!1),g=Ee(u,!1),v=s&&s.offsetRadius||20,w=n.map(function(x,y){var S=(x.startAngle+x.endAngle)/2,k=it(x.cx,x.cy,x.outerRadius+v,S),E=rt(rt(rt(rt({},p),x),{},{stroke:"none"},h),{},{index:y,textAnchor:e.getTextAnchor(k.x,x.cx)},k),P=rt(rt(rt(rt({},p),x),{},{fill:"none",stroke:x.fill},g),{},{index:y,points:[it(x.cx,x.cy,x.outerRadius,S),k]}),O=c;return Me(c)&&Me(f)?O="value":Me(c)&&(O=f),I.createElement(Ue,{key:"label-".concat(x.startAngle,"-").concat(x.endAngle,"-").concat(x.midAngle,"-").concat(y)},u&&e.renderLabelLineItem(u,P,"line"),e.renderLabelItem(s,E,Mt(x,O)))});return I.createElement(Ue,{className:"recharts-pie-labels"},w)}},{key:"renderSectorsStatically",value:function(n){var i=this,a=this.props,s=a.activeShape,u=a.blendStroke,c=a.inactiveShape;return n.map(function(f,p){if((f==null?void 0:f.startAngle)===0&&(f==null?void 0:f.endAngle)===0&&n.length!==1)return null;var h=i.isActiveIndex(p),g=c&&i.hasActiveIndex()?c:null,v=h?s:g,w=rt(rt({},f),{},{stroke:u?f.fill:f.stroke,tabIndex:-1});return I.createElement(Ue,Vo({ref:function(y){y&&!i.sectorRefs.includes(y)&&i.sectorRefs.push(y)},tabIndex:-1,className:"recharts-pie-sector"},Ga(i.props,f,p),{key:"sector-".concat(f==null?void 0:f.startAngle,"-").concat(f==null?void 0:f.endAngle,"-").concat(f.midAngle,"-").concat(p)}),I.createElement($$,Vo({option:v,isActive:h,shapeType:"sector"},w)))})}},{key:"renderSectorsWithAnimation",value:function(){var n=this,i=this.props,a=i.sectors,s=i.isAnimationActive,u=i.animationBegin,c=i.animationDuration,f=i.animationEasing,p=i.animationId,h=this.state,g=h.prevSectors,v=h.prevIsAnimationActive;return I.createElement(zn,{begin:u,duration:c,isActive:s,easing:f,from:{t:0},to:{t:1},key:"pie-".concat(p,"-").concat(v),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(w){var x=w.t,y=[],S=a&&a[0],k=S.startAngle;return a.forEach(function(E,P){var O=g&&g[P],A=P>0?Mr(E,"paddingAngle",0):0;if(O){var C=Sr(O.endAngle-O.startAngle,E.endAngle-E.startAngle),R=rt(rt({},E),{},{startAngle:k+A,endAngle:k+C(x)+A});y.push(R),k=R.endAngle}else{var M=E.endAngle,H=E.startAngle,z=Sr(0,M-H),B=z(x),F=rt(rt({},E),{},{startAngle:k+A,endAngle:k+B+A});y.push(F),k=F.endAngle}}),I.createElement(Ue,null,n.renderSectorsStatically(y))})}},{key:"attachKeyboardHandlers",value:function(n){var i=this;n.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var s=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"ArrowRight":{var u=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[u].focus(),i.setState({sectorToFocus:u});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,i=n.sectors,a=n.isAnimationActive,s=this.state.prevSectors;return a&&i&&i.length&&(!s||!cs(s,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,i=this.props,a=i.hide,s=i.sectors,u=i.className,c=i.label,f=i.cx,p=i.cy,h=i.innerRadius,g=i.outerRadius,v=i.isAnimationActive,w=this.state.isAnimationFinished;if(a||!s||!s.length||!fe(f)||!fe(p)||!fe(h)||!fe(g))return null;var x=Le("recharts-pie",u);return I.createElement(Ue,{tabIndex:this.props.rootTabIndex,className:x,ref:function(S){n.pieRef=S}},this.renderSectors(),c&&this.renderLabels(s),Ht.renderCallByParent(this.props,null,!1),(!v||w)&&di.renderCallByParent(this.props,s,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return i.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:n.sectors!==i.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,i){return n>i?"start":n<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(n,i,a){if(I.isValidElement(n))return I.cloneElement(n,i);if($e(n))return n(i);var s=Le("recharts-pie-label-line",typeof n!="boolean"?n.className:"");return I.createElement(es,Vo({},i,{key:a,type:"linear",className:s}))}},{key:"renderLabelItem",value:function(n,i,a){if(I.isValidElement(n))return I.cloneElement(n,i);var s=a;if($e(n)&&(s=n(i),I.isValidElement(s)))return s;var u=Le("recharts-pie-label-text",typeof n!="boolean"&&!$e(n)?n.className:"");return I.createElement(Xa,Vo({},i,{alignmentBaseline:"middle",className:u}),s)}}])})($.PureComponent);Wf=xi;Zr(xi,"displayName","Pie");Zr(xi,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!to.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});Zr(xi,"parseDeltaAngle",function(t,e){var r=fr(e-t),n=Math.min(Math.abs(e-t),360);return r*n});Zr(xi,"getRealPieData",function(t){var e=t.data,r=t.children,n=Ee(t,!1),i=tn(r,Sh);return e&&e.length?e.map(function(a,s){return rt(rt(rt({payload:a},n),a),i&&i[s]&&i[s].props)}):i&&i.length?i.map(function(a){return rt(rt({},n),a.props)}):[]});Zr(xi,"parseCoordinateOfPie",function(t,e){var r=e.top,n=e.left,i=e.width,a=e.height,s=y$(i,a),u=n+dr(t.cx,i,i/2),c=r+dr(t.cy,a,a/2),f=dr(t.innerRadius,s,0),p=dr(t.outerRadius,s,s*.8),h=t.maxRadius||Math.sqrt(i*i+a*a)/2;return{cx:u,cy:c,innerRadius:f,outerRadius:p,maxRadius:h}});Zr(xi,"getComposedData",function(t){var e=t.item,r=t.offset,n=e.type.defaultProps!==void 0?rt(rt({},e.type.defaultProps),e.props):e.props,i=Wf.getRealPieData(n);if(!i||!i.length)return null;var a=n.cornerRadius,s=n.startAngle,u=n.endAngle,c=n.paddingAngle,f=n.dataKey,p=n.nameKey,h=n.valueKey,g=n.tooltipType,v=Math.abs(n.minAngle),w=Wf.parseCoordinateOfPie(n,r),x=Wf.parseDeltaAngle(s,u),y=Math.abs(x),S=f;Me(f)&&Me(h)?(ci(!1,`Use "dataKey" to specify the value of pie,
328
+ the props "valueKey" will be deprecated in 1.1.0`),S="value"):Me(f)&&(ci(!1,`Use "dataKey" to specify the value of pie,
329
+ the props "valueKey" will be deprecated in 1.1.0`),S=h);var k=i.filter(function(R){return Mt(R,S,0)!==0}).length,E=(y>=360?k:k-1)*c,P=y-k*v-E,O=i.reduce(function(R,M){var H=Mt(M,S,0);return R+(fe(H)?H:0)},0),A;if(O>0){var C;A=i.map(function(R,M){var H=Mt(R,S,0),z=Mt(R,p,M),B=(fe(H)?H:0)/O,F;M?F=C.endAngle+fr(x)*c*(H!==0?1:0):F=s;var J=F+fr(x)*((H!==0?v:0)+B*P),V=(F+J)/2,K=(w.innerRadius+w.outerRadius)/2,Z=[{name:z,value:H,payload:R,dataKey:S,type:g}],G=it(w.cx,w.cy,K,V);return C=rt(rt(rt({percent:B,cornerRadius:a,name:z,tooltipPayload:Z,midAngle:V,middleRadius:K,tooltipPosition:G},R),w),{},{value:Mt(R,S),startAngle:F,endAngle:J,payload:R,paddingAngle:fr(x)*c}),C})}return rt(rt({},w),{},{sectors:A,data:i})});var Ab,KC;function eQ(){if(KC)return Ab;KC=1;var t=Math.ceil,e=Math.max;function r(n,i,a,s){for(var u=-1,c=e(t((i-n)/(a||1)),0),f=Array(c);c--;)f[s?c:++u]=n,n+=a;return f}return Ab=r,Ab}var Pb,GC;function L$(){if(GC)return Pb;GC=1;var t=sI(),e=1/0,r=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=t(i),i===e||i===-e){var a=i<0?-1:1;return a*r}return i===i?i:0}return Pb=n,Pb}var Tb,XC;function tQ(){if(XC)return Tb;XC=1;var t=eQ(),e=_h(),r=L$();function n(i){return function(a,s,u){return u&&typeof u!="number"&&e(a,s,u)&&(s=u=void 0),a=r(a),s===void 0?(s=a,a=0):s=r(s),u=u===void 0?a<s?1:-1:r(u),t(a,s,u,i)}}return Tb=n,Tb}var Cb,YC;function rQ(){if(YC)return Cb;YC=1;var t=tQ(),e=t();return Cb=e,Cb}var nQ=rQ();const zd=Ye(nQ);function Du(t){"@babel/helpers - typeof";return Du=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Du(t)}function JC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function QC(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?JC(Object(r),!0).forEach(function(n){D$(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):JC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function D$(t,e,r){return e=iQ(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function iQ(t){var e=aQ(t,"string");return Du(e)=="symbol"?e:e+""}function aQ(t,e){if(Du(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Du(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var oQ=["Webkit","Moz","O","ms"],sQ=function(e,r){var n=e.replace(/(\w)/,function(a){return a.toUpperCase()}),i=oQ.reduce(function(a,s){return QC(QC({},a),{},D$({},s+n,r))},{});return i[e]=r,i};function gs(t){"@babel/helpers - typeof";return gs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gs(t)}function Fd(){return Fd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Fd.apply(this,arguments)}function ZC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function jb(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ZC(Object(r),!0).forEach(function(n){Rr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ZC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function lQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ej(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,U$(n.key),n)}}function uQ(t,e,r){return e&&ej(t.prototype,e),r&&ej(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function cQ(t,e,r){return e=Wd(e),fQ(t,B$()?Reflect.construct(e,r||[],Wd(t).constructor):e.apply(t,r))}function fQ(t,e){if(e&&(gs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dQ(t)}function dQ(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function B$(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(B$=function(){return!!t})()}function Wd(t){return Wd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Wd(t)}function hQ(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&yw(t,e)}function yw(t,e){return yw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},yw(t,e)}function Rr(t,e,r){return e=U$(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function U$(t){var e=pQ(t,"string");return gs(e)=="symbol"?e:e+""}function pQ(t,e){if(gs(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(gs(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var mQ=function(e){var r=e.data,n=e.startIndex,i=e.endIndex,a=e.x,s=e.width,u=e.travellerWidth;if(!r||!r.length)return{};var c=r.length,f=Jl().domain(zd(0,c)).range([a,a+s-u]),p=f.domain().map(function(h){return f(h)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:f(n),endX:f(i),scale:f,scaleValues:p}},tj=function(e){return e.changedTouches&&!!e.changedTouches.length},vs=(function(t){function e(r){var n;return lQ(this,e),n=cQ(this,e,[r]),Rr(n,"handleDrag",function(i){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(i):n.state.isSlideMoving&&n.handleSlideDrag(i)}),Rr(n,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&n.handleDrag(i.changedTouches[0])}),Rr(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,s=i.onDragEnd,u=i.startIndex;s==null||s({endIndex:a,startIndex:u})}),n.detachDragEndListener()}),Rr(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Rr(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Rr(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Rr(n,"handleSlideDragStart",function(i){var a=tj(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return hQ(e,t),uQ(e,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,s=this.state.scaleValues,u=this.props,c=u.gap,f=u.data,p=f.length-1,h=Math.min(i,a),g=Math.max(i,a),v=e.getIndexInRange(s,h),w=e.getIndexInRange(s,g);return{startIndex:v-v%c,endIndex:w===p?p:w-w%c}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,s=i.tickFormatter,u=i.dataKey,c=Mt(a[n],u,n);return $e(s)?s(c,n):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var i=this.state,a=i.slideMoveStartX,s=i.startX,u=i.endX,c=this.props,f=c.x,p=c.width,h=c.travellerWidth,g=c.startIndex,v=c.endIndex,w=c.onChange,x=n.pageX-a;x>0?x=Math.min(x,f+p-h-u,f+p-h-s):x<0&&(x=Math.max(x,f-s,f-u));var y=this.getIndex({startX:s+x,endX:u+x});(y.startIndex!==g||y.endIndex!==v)&&w&&w(y),this.setState({startX:s+x,endX:u+x,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=tj(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,s=i.movingTravellerId,u=i.endX,c=i.startX,f=this.state[s],p=this.props,h=p.x,g=p.width,v=p.travellerWidth,w=p.onChange,x=p.gap,y=p.data,S={startX:this.state.startX,endX:this.state.endX},k=n.pageX-a;k>0?k=Math.min(k,h+g-v-f):k<0&&(k=Math.max(k,h-f)),S[s]=f+k;var E=this.getIndex(S),P=E.startIndex,O=E.endIndex,A=function(){var R=y.length-1;return s==="startX"&&(u>c?P%x===0:O%x===0)||u<c&&O===R||s==="endX"&&(u>c?O%x===0:P%x===0)||u>c&&O===R};this.setState(Rr(Rr({},s,f+k),"brushMoveStartX",n.pageX),function(){w&&A()&&w(E)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,s=this.state,u=s.scaleValues,c=s.startX,f=s.endX,p=this.state[i],h=u.indexOf(p);if(h!==-1){var g=h+n;if(!(g===-1||g>=u.length)){var v=u[g];i==="startX"&&v>=f||i==="endX"&&v<=c||this.setState(Rr({},i,v),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,s=n.width,u=n.height,c=n.fill,f=n.stroke;return I.createElement("rect",{stroke:f,fill:c,x:i,y:a,width:s,height:u})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,s=n.width,u=n.height,c=n.data,f=n.children,p=n.padding,h=$.Children.only(f);return h?I.cloneElement(h,{x:i,y:a,width:s,height:u,margin:p,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,s,u=this,c=this.props,f=c.y,p=c.travellerWidth,h=c.height,g=c.traveller,v=c.ariaLabel,w=c.data,x=c.startIndex,y=c.endIndex,S=Math.max(n,this.props.x),k=jb(jb({},Ee(this.props,!1)),{},{x:S,y:f,width:p,height:h}),E=v||"Min value: ".concat((a=w[x])===null||a===void 0?void 0:a.name,", Max value: ").concat((s=w[y])===null||s===void 0?void 0:s.name);return I.createElement(Ue,{tabIndex:0,role:"slider","aria-label":E,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(O){["ArrowLeft","ArrowRight"].includes(O.key)&&(O.preventDefault(),O.stopPropagation(),u.handleTravellerMoveKeyboard(O.key==="ArrowRight"?1:-1,i))},onFocus:function(){u.setState({isTravellerFocused:!0})},onBlur:function(){u.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},e.renderTraveller(g,k))}},{key:"renderSlide",value:function(n,i){var a=this.props,s=a.y,u=a.height,c=a.stroke,f=a.travellerWidth,p=Math.min(n,i)+f,h=Math.max(Math.abs(i-n)-f,0);return I.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:p,y:s,width:h,height:u})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,s=n.y,u=n.height,c=n.travellerWidth,f=n.stroke,p=this.state,h=p.startX,g=p.endX,v=5,w={pointerEvents:"none",fill:f};return I.createElement(Ue,{className:"recharts-brush-texts"},I.createElement(Xa,Fd({textAnchor:"end",verticalAnchor:"middle",x:Math.min(h,g)-v,y:s+u/2},w),this.getTextOfTick(i)),I.createElement(Xa,Fd({textAnchor:"start",verticalAnchor:"middle",x:Math.max(h,g)+c+v,y:s+u/2},w),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,s=n.children,u=n.x,c=n.y,f=n.width,p=n.height,h=n.alwaysShowText,g=this.state,v=g.startX,w=g.endX,x=g.isTextActive,y=g.isSlideMoving,S=g.isTravellerMoving,k=g.isTravellerFocused;if(!i||!i.length||!fe(u)||!fe(c)||!fe(f)||!fe(p)||f<=0||p<=0)return null;var E=Le("recharts-brush",a),P=I.Children.count(s)===1,O=sQ("userSelect","none");return I.createElement(Ue,{className:E,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:O},this.renderBackground(),P&&this.renderPanorama(),this.renderSlide(v,w),this.renderTravellerLayer(v,"startX"),this.renderTravellerLayer(w,"endX"),(x||y||S||k||h)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,s=n.width,u=n.height,c=n.stroke,f=Math.floor(a+u/2)-1;return I.createElement(I.Fragment,null,I.createElement("rect",{x:i,y:a,width:s,height:u,fill:c,stroke:"none"}),I.createElement("line",{x1:i+1,y1:f,x2:i+s-1,y2:f,fill:"none",stroke:"#fff"}),I.createElement("line",{x1:i+1,y1:f+2,x2:i+s-1,y2:f+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return I.isValidElement(n)?a=I.cloneElement(n,i):$e(n)?a=n(i):a=e.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,s=n.width,u=n.x,c=n.travellerWidth,f=n.updateId,p=n.startIndex,h=n.endIndex;if(a!==i.prevData||f!==i.prevUpdateId)return jb({prevData:a,prevTravellerWidth:c,prevUpdateId:f,prevX:u,prevWidth:s},a&&a.length?mQ({data:a,width:s,x:u,travellerWidth:c,startIndex:p,endIndex:h}):{scale:null,scaleValues:null});if(i.scale&&(s!==i.prevWidth||u!==i.prevX||c!==i.prevTravellerWidth)){i.scale.range([u,u+s-c]);var g=i.scale.domain().map(function(v){return i.scale(v)});return{prevData:a,prevTravellerWidth:c,prevUpdateId:f,prevX:u,prevWidth:s,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:g}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,s=0,u=a-1;u-s>1;){var c=Math.floor((s+u)/2);n[c]>i?u=c:s=c}return i>=n[u]?u:s}}])})($.PureComponent);Rr(vs,"displayName","Brush");Rr(vs,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Rb,rj;function gQ(){if(rj)return Rb;rj=1;var t=Ex();function e(r,n){var i;return t(r,function(a,s,u){return i=n(a,s,u),!i}),!!i}return Rb=e,Rb}var Ib,nj;function vQ(){if(nj)return Ib;nj=1;var t=D2(),e=Hn(),r=gQ(),n=Or(),i=_h();function a(s,u,c){var f=n(s)?t:r;return c&&i(s,u,c)&&(u=void 0),f(s,e(u,3))}return Ib=a,Ib}var yQ=vQ();const bQ=Ye(yQ);var Un=function(e,r){var n=e.alwaysShow,i=e.ifOverflow;return n&&(i="extendDomain"),i===r},$b,ij;function wQ(){if(ij)return $b;ij=1;var t=rI();function e(r,n,i){n=="__proto__"&&t?t(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return $b=e,$b}var Nb,aj;function xQ(){if(aj)return Nb;aj=1;var t=wQ(),e=eI(),r=Hn();function n(i,a){var s={};return a=r(a,3),e(i,function(u,c,f){t(s,c,a(u,c,f))}),s}return Nb=n,Nb}var _Q=xQ();const SQ=Ye(_Q);var Mb,oj;function kQ(){if(oj)return Mb;oj=1;function t(e,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(!r(e[n],n,e))return!1;return!0}return Mb=t,Mb}var Lb,sj;function OQ(){if(sj)return Lb;sj=1;var t=Ex();function e(r,n){var i=!0;return t(r,function(a,s,u){return i=!!n(a,s,u),i}),i}return Lb=e,Lb}var Db,lj;function EQ(){if(lj)return Db;lj=1;var t=kQ(),e=OQ(),r=Hn(),n=Or(),i=_h();function a(s,u,c){var f=n(s)?t:e;return c&&i(s,u,c)&&(u=void 0),f(s,r(u,3))}return Db=a,Db}var AQ=EQ();const PQ=Ye(AQ);var TQ=["x","y"];function Bu(t){"@babel/helpers - typeof";return Bu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bu(t)}function bw(){return bw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},bw.apply(this,arguments)}function uj(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Bl(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?uj(Object(r),!0).forEach(function(n){CQ(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):uj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function CQ(t,e,r){return e=jQ(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function jQ(t){var e=RQ(t,"string");return Bu(e)=="symbol"?e:e+""}function RQ(t,e){if(Bu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Bu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function IQ(t,e){if(t==null)return{};var r=$Q(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function $Q(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function NQ(t,e){var r=t.x,n=t.y,i=IQ(t,TQ),a="".concat(r),s=parseInt(a,10),u="".concat(n),c=parseInt(u,10),f="".concat(e.height||i.height),p=parseInt(f,10),h="".concat(e.width||i.width),g=parseInt(h,10);return Bl(Bl(Bl(Bl(Bl({},e),i),s?{x:s}:{}),c?{y:c}:{}),{},{height:p,width:g,name:e.name,radius:e.radius})}function cj(t){return I.createElement($$,bw({shapeType:"rectangle",propTransformer:NQ,activeClassName:"recharts-active-bar"},t))}var MQ=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof e=="number")return e;var a=fe(n)||tz(n);return a?e(n,i):(a||Ja(),r)}},LQ=["value","background"],q$;function ys(t){"@babel/helpers - typeof";return ys=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ys(t)}function DQ(t,e){if(t==null)return{};var r=BQ(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function BQ(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function Hd(){return Hd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Hd.apply(this,arguments)}function fj(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Et(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?fj(Object(r),!0).forEach(function(n){ea(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):fj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function UQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dj(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,F$(n.key),n)}}function qQ(t,e,r){return e&&dj(t.prototype,e),r&&dj(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function zQ(t,e,r){return e=Vd(e),FQ(t,z$()?Reflect.construct(e,r||[],Vd(t).constructor):e.apply(t,r))}function FQ(t,e){if(e&&(ys(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return WQ(t)}function WQ(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function z$(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(z$=function(){return!!t})()}function Vd(t){return Vd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Vd(t)}function HQ(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ww(t,e)}function ww(t,e){return ww=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ww(t,e)}function ea(t,e,r){return e=F$(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function F$(t){var e=VQ(t,"string");return ys(e)=="symbol"?e:e+""}function VQ(t,e){if(ys(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ys(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var ec=(function(t){function e(){var r;UQ(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=zQ(this,e,[].concat(i)),ea(r,"state",{isAnimationFinished:!1}),ea(r,"id",Ms("recharts-bar-")),ea(r,"handleAnimationEnd",function(){var s=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),s&&s()}),ea(r,"handleAnimationStart",function(){var s=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),s&&s()}),r}return HQ(e,t),qQ(e,[{key:"renderRectanglesStatically",value:function(n){var i=this,a=this.props,s=a.shape,u=a.dataKey,c=a.activeIndex,f=a.activeBar,p=Ee(this.props,!1);return n&&n.map(function(h,g){var v=g===c,w=v?f:s,x=Et(Et(Et({},p),h),{},{isActive:v,option:w,index:g,dataKey:u,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return I.createElement(Ue,Hd({className:"recharts-bar-rectangle"},Ga(i.props,h,g),{key:"rectangle-".concat(h==null?void 0:h.x,"-").concat(h==null?void 0:h.y,"-").concat(h==null?void 0:h.value,"-").concat(g)}),I.createElement(cj,x))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,i=this.props,a=i.data,s=i.layout,u=i.isAnimationActive,c=i.animationBegin,f=i.animationDuration,p=i.animationEasing,h=i.animationId,g=this.state.prevData;return I.createElement(zn,{begin:c,duration:f,isActive:u,easing:p,from:{t:0},to:{t:1},key:"bar-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(v){var w=v.t,x=a.map(function(y,S){var k=g&&g[S];if(k){var E=Sr(k.x,y.x),P=Sr(k.y,y.y),O=Sr(k.width,y.width),A=Sr(k.height,y.height);return Et(Et({},y),{},{x:E(w),y:P(w),width:O(w),height:A(w)})}if(s==="horizontal"){var C=Sr(0,y.height),R=C(w);return Et(Et({},y),{},{y:y.y+y.height-R,height:R})}var M=Sr(0,y.width),H=M(w);return Et(Et({},y),{},{width:H})});return I.createElement(Ue,null,n.renderRectanglesStatically(x))})}},{key:"renderRectangles",value:function(){var n=this.props,i=n.data,a=n.isAnimationActive,s=this.state.prevData;return a&&i&&i.length&&(!s||!cs(s,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var n=this,i=this.props,a=i.data,s=i.dataKey,u=i.activeIndex,c=Ee(this.props.background,!1);return a.map(function(f,p){f.value;var h=f.background,g=DQ(f,LQ);if(!h)return null;var v=Et(Et(Et(Et(Et({},g),{},{fill:"#eee"},h),c),Ga(n.props,f,p)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:s,index:p,className:"recharts-bar-background-rectangle"});return I.createElement(cj,Hd({key:"background-bar-".concat(p),option:n.props.background,isActive:p===u},v))})}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,s=a.data,u=a.xAxis,c=a.yAxis,f=a.layout,p=a.children,h=tn(p,$h);if(!h)return null;var g=f==="vertical"?s[0].height/2:s[0].width/2,v=function(y,S){var k=Array.isArray(y.value)?y.value[1]:y.value;return{x:y.x,y:y.y,value:k,errorVal:Mt(y,S)}},w={clipPath:n?"url(#clipPath-".concat(i,")"):null};return I.createElement(Ue,w,h.map(function(x){return I.cloneElement(x,{key:"error-bar-".concat(i,"-").concat(x.props.dataKey),data:s,xAxis:u,yAxis:c,layout:f,offset:g,dataPointFormatter:v})}))}},{key:"render",value:function(){var n=this.props,i=n.hide,a=n.data,s=n.className,u=n.xAxis,c=n.yAxis,f=n.left,p=n.top,h=n.width,g=n.height,v=n.isAnimationActive,w=n.background,x=n.id;if(i||!a||!a.length)return null;var y=this.state.isAnimationFinished,S=Le("recharts-bar",s),k=u&&u.allowDataOverflow,E=c&&c.allowDataOverflow,P=k||E,O=Me(x)?this.id:x;return I.createElement(Ue,{className:S},k||E?I.createElement("defs",null,I.createElement("clipPath",{id:"clipPath-".concat(O)},I.createElement("rect",{x:k?f:f-h/2,y:E?p:p-g/2,width:k?h:h*2,height:E?g:g*2}))):null,I.createElement(Ue,{className:"recharts-bar-rectangles",clipPath:P?"url(#clipPath-".concat(O,")"):null},w?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(P,O),(!v||y)&&di.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:i.curData}:n.data!==i.curData?{curData:n.data}:null}}])})($.PureComponent);q$=ec;ea(ec,"displayName","Bar");ea(ec,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!to.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});ea(ec,"getComposedData",function(t){var e=t.props,r=t.item,n=t.barPosition,i=t.bandSize,a=t.xAxis,s=t.yAxis,u=t.xAxisTicks,c=t.yAxisTicks,f=t.stackedData,p=t.dataStartIndex,h=t.displayedData,g=t.offset,v=gK(n,r);if(!v)return null;var w=e.layout,x=r.type.defaultProps,y=x!==void 0?Et(Et({},x),r.props):r.props,S=y.dataKey,k=y.children,E=y.minPointSize,P=w==="horizontal"?s:a,O=f?P.scale.domain():null,A=SK({numericAxis:P}),C=tn(k,Sh),R=h.map(function(M,H){var z,B,F,J,V,K;f?z=vK(f[p+H],O):(z=Mt(M,S),Array.isArray(z)||(z=[A,z]));var Z=MQ(E,q$.defaultProps.minPointSize)(z[1],H);if(w==="horizontal"){var G,ee=[s.scale(z[0]),s.scale(z[1])],U=ee[0],L=ee[1];B=UT({axis:a,ticks:u,bandSize:i,offset:v.offset,entry:M,index:H}),F=(G=L??U)!==null&&G!==void 0?G:void 0,J=v.size;var W=U-L;if(V=Number.isNaN(W)?0:W,K={x:B,y:s.y,width:J,height:s.height},Math.abs(Z)>0&&Math.abs(V)<Math.abs(Z)){var te=fr(V||Z)*(Math.abs(Z)-Math.abs(V));F-=te,V+=te}}else{var ue=[a.scale(z[0]),a.scale(z[1])],le=ue[0],de=ue[1];if(B=le,F=UT({axis:s,ticks:c,bandSize:i,offset:v.offset,entry:M,index:H}),J=de-le,V=v.size,K={x:a.x,y:F,width:a.width,height:V},Math.abs(Z)>0&&Math.abs(J)<Math.abs(Z)){var Re=fr(J||Z)*(Math.abs(Z)-Math.abs(J));J+=Re}}return Et(Et(Et({},M),{},{x:B,y:F,width:J,height:V,value:f?z:z[1],payload:M,background:K},C&&C[H]&&C[H].props),{},{tooltipPayload:[g$(r,M)],tooltipPosition:{x:B+J/2,y:F+V/2}})});return Et({data:R,layout:w},g)});function Uu(t){"@babel/helpers - typeof";return Uu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Uu(t)}function KQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hj(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,W$(n.key),n)}}function GQ(t,e,r){return e&&hj(t.prototype,e),r&&hj(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function pj(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function yn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?pj(Object(r),!0).forEach(function(n){zh(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function zh(t,e,r){return e=W$(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function W$(t){var e=XQ(t,"string");return Uu(e)=="symbol"?e:e+""}function XQ(t,e){if(Uu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Uu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var YQ=function(e,r,n,i,a){var s=e.width,u=e.height,c=e.layout,f=e.children,p=Object.keys(r),h={left:n.left,leftMirror:n.left,right:s-n.right,rightMirror:s-n.right,top:n.top,topMirror:n.top,bottom:u-n.bottom,bottomMirror:u-n.bottom},g=!!Ir(f,ec);return p.reduce(function(v,w){var x=r[w],y=x.orientation,S=x.domain,k=x.padding,E=k===void 0?{}:k,P=x.mirror,O=x.reversed,A="".concat(y).concat(P?"Mirror":""),C,R,M,H,z;if(x.type==="number"&&(x.padding==="gap"||x.padding==="no-gap")){var B=S[1]-S[0],F=1/0,J=x.categoricalDomain.sort(iz);if(J.forEach(function(ue,le){le>0&&(F=Math.min((ue||0)-(J[le-1]||0),F))}),Number.isFinite(F)){var V=F/B,K=x.layout==="vertical"?n.height:n.width;if(x.padding==="gap"&&(C=V*K/2),x.padding==="no-gap"){var Z=dr(e.barCategoryGap,V*K),G=V*K/2;C=G-Z-(G-Z)/K*Z}}}i==="xAxis"?R=[n.left+(E.left||0)+(C||0),n.left+n.width-(E.right||0)-(C||0)]:i==="yAxis"?R=c==="horizontal"?[n.top+n.height-(E.bottom||0),n.top+(E.top||0)]:[n.top+(E.top||0)+(C||0),n.top+n.height-(E.bottom||0)-(C||0)]:R=x.range,O&&(R=[R[1],R[0]]);var ee=d$(x,a,g),U=ee.scale,L=ee.realScaleType;U.domain(S).range(R),h$(U);var W=p$(U,yn(yn({},x),{},{realScaleType:L}));i==="xAxis"?(z=y==="top"&&!P||y==="bottom"&&P,M=n.left,H=h[A]-z*x.height):i==="yAxis"&&(z=y==="left"&&!P||y==="right"&&P,M=h[A]-z*x.width,H=n.top);var te=yn(yn(yn({},x),W),{},{realScaleType:L,x:M,y:H,scale:U,width:i==="xAxis"?n.width:x.width,height:i==="yAxis"?n.height:x.height});return te.bandSize=Td(te,W),!x.hide&&i==="xAxis"?h[A]+=(z?-1:1)*te.height:x.hide||(h[A]+=(z?-1:1)*te.width),yn(yn({},v),{},zh({},w,te))},{})},H$=function(e,r){var n=e.x,i=e.y,a=r.x,s=r.y;return{x:Math.min(n,a),y:Math.min(i,s),width:Math.abs(a-n),height:Math.abs(s-i)}},JQ=function(e){var r=e.x1,n=e.y1,i=e.x2,a=e.y2;return H$({x:r,y:n},{x:i,y:a})},V$=(function(){function t(e){KQ(this,t),this.scale=e}return GQ(t,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){case"start":return this.scale(r);case"middle":{var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+s}case"end":{var u=this.bandwidth?this.bandwidth():0;return this.scale(r)+u}default:return this.scale(r)}if(i){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+c}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new t(r)}}])})();zh(V$,"EPS",1e-4);var t_=function(e){var r=Object.keys(e).reduce(function(n,i){return yn(yn({},n),{},zh({},i,V$.create(e[i])))},{});return yn(yn({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=a.bandAware,u=a.position;return SQ(i,function(c,f){return r[f].apply(c,{bandAware:s,position:u})})},isInRange:function(i){return PQ(i,function(a,s){return r[s].isInRange(a)})}})};function QQ(t){return(t%180+180)%180}var ZQ=function(e){var r=e.width,n=e.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=QQ(i),s=a*Math.PI/180,u=Math.atan(n/r),c=s>u&&s<Math.PI-u?n/Math.sin(s):r/Math.cos(s);return Math.abs(c)},Bb,mj;function eZ(){if(mj)return Bb;mj=1;var t=Hn(),e=Xu(),r=wh();function n(i){return function(a,s,u){var c=Object(a);if(!e(a)){var f=t(s,3);a=r(a),s=function(h){return f(c[h],h,c)}}var p=i(a,s,u);return p>-1?c[f?a[p]:p]:void 0}}return Bb=n,Bb}var Ub,gj;function tZ(){if(gj)return Ub;gj=1;var t=L$();function e(r){var n=t(r),i=n%1;return n===n?i?n-i:n:0}return Ub=e,Ub}var qb,vj;function rZ(){if(vj)return qb;vj=1;var t=X2(),e=Hn(),r=tZ(),n=Math.max;function i(a,s,u){var c=a==null?0:a.length;if(!c)return-1;var f=u==null?0:r(u);return f<0&&(f=n(c+f,0)),t(a,e(s,3),f)}return qb=i,qb}var zb,yj;function nZ(){if(yj)return zb;yj=1;var t=eZ(),e=rZ(),r=t(e);return zb=r,zb}nZ();var iZ=f2();const aZ=Ye(iZ);var oZ=aZ(function(t){return{x:t.left,y:t.top,width:t.width,height:t.height}},function(t){return["l",t.left,"t",t.top,"w",t.width,"h",t.height].join("")}),K$=$.createContext(void 0),G$=$.createContext(void 0),X$=$.createContext(void 0),sZ=$.createContext({}),Y$=$.createContext(void 0),J$=$.createContext(0),Q$=$.createContext(0),bj=function(e){var r=e.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,s=e.clipPathId,u=e.children,c=e.width,f=e.height,p=oZ(a);return I.createElement(K$.Provider,{value:n},I.createElement(G$.Provider,{value:i},I.createElement(sZ.Provider,{value:a},I.createElement(X$.Provider,{value:p},I.createElement(Y$.Provider,{value:s},I.createElement(J$.Provider,{value:f},I.createElement(Q$.Provider,{value:c},u)))))))},lZ=function(){return $.useContext(Y$)},Z$=function(e){var r=$.useContext(K$);r==null&&Ja();var n=r[e];return n==null&&Ja(),n},eN=function(e){var r=$.useContext(G$);r==null&&Ja();var n=r[e];return n==null&&Ja(),n},uZ=function(){var e=$.useContext(X$);return e},tN=function(){return $.useContext(Q$)},rN=function(){return $.useContext(J$)};function bs(t){"@babel/helpers - typeof";return bs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bs(t)}function cZ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fZ(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,iN(n.key),n)}}function dZ(t,e,r){return e&&fZ(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function hZ(t,e,r){return e=Kd(e),pZ(t,nN()?Reflect.construct(e,r||[],Kd(t).constructor):e.apply(t,r))}function pZ(t,e){if(e&&(bs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mZ(t)}function mZ(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function nN(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nN=function(){return!!t})()}function Kd(t){return Kd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Kd(t)}function gZ(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xw(t,e)}function xw(t,e){return xw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},xw(t,e)}function wj(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function xj(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?wj(Object(r),!0).forEach(function(n){r_(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function r_(t,e,r){return e=iN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function iN(t){var e=vZ(t,"string");return bs(e)=="symbol"?e:e+""}function vZ(t,e){if(bs(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(bs(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function yZ(t,e){return _Z(t)||xZ(t,e)||wZ(t,e)||bZ()}function bZ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
330
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wZ(t,e){if(t){if(typeof t=="string")return _j(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _j(t,e)}}function _j(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function xZ(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function _Z(t){if(Array.isArray(t))return t}function _w(){return _w=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},_w.apply(this,arguments)}var SZ=function(e,r){var n;return I.isValidElement(e)?n=I.cloneElement(e,r):$e(e)?n=e(r):n=I.createElement("line",_w({},r,{className:"recharts-reference-line-line"})),n},kZ=function(e,r,n,i,a,s,u,c,f){var p=a.x,h=a.y,g=a.width,v=a.height;if(n){var w=f.y,x=e.y.apply(w,{position:s});if(Un(f,"discard")&&!e.y.isInRange(x))return null;var y=[{x:p+g,y:x},{x:p,y:x}];return c==="left"?y.reverse():y}if(r){var S=f.x,k=e.x.apply(S,{position:s});if(Un(f,"discard")&&!e.x.isInRange(k))return null;var E=[{x:k,y:h+v},{x:k,y:h}];return u==="top"?E.reverse():E}if(i){var P=f.segment,O=P.map(function(A){return e.apply(A,{position:s})});return Un(f,"discard")&&bQ(O,function(A){return!e.isInRange(A)})?null:O}return null};function OZ(t){var e=t.x,r=t.y,n=t.segment,i=t.xAxisId,a=t.yAxisId,s=t.shape,u=t.className,c=t.alwaysShow,f=lZ(),p=Z$(i),h=eN(a),g=uZ();if(!f||!g)return null;ci(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var v=t_({x:p.scale,y:h.scale}),w=Lt(e),x=Lt(r),y=n&&n.length===2,S=kZ(v,w,x,y,g,t.position,p.orientation,h.orientation,t);if(!S)return null;var k=yZ(S,2),E=k[0],P=E.x,O=E.y,A=k[1],C=A.x,R=A.y,M=Un(t,"hidden")?"url(#".concat(f,")"):void 0,H=xj(xj({clipPath:M},Ee(t,!0)),{},{x1:P,y1:O,x2:C,y2:R});return I.createElement(Ue,{className:Le("recharts-reference-line",u)},SZ(s,H),Ht.renderCallByParent(t,JQ({x1:P,y1:O,x2:C,y2:R})))}var n_=(function(t){function e(){return cZ(this,e),hZ(this,e,arguments)}return gZ(e,t),dZ(e,[{key:"render",value:function(){return I.createElement(OZ,this.props)}}])})(I.Component);r_(n_,"displayName","ReferenceLine");r_(n_,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Sw(){return Sw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Sw.apply(this,arguments)}function ws(t){"@babel/helpers - typeof";return ws=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ws(t)}function Sj(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function kj(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Sj(Object(r),!0).forEach(function(n){Fh(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Sj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function EZ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function AZ(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,oN(n.key),n)}}function PZ(t,e,r){return e&&AZ(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function TZ(t,e,r){return e=Gd(e),CZ(t,aN()?Reflect.construct(e,r||[],Gd(t).constructor):e.apply(t,r))}function CZ(t,e){if(e&&(ws(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jZ(t)}function jZ(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function aN(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(aN=function(){return!!t})()}function Gd(t){return Gd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Gd(t)}function RZ(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kw(t,e)}function kw(t,e){return kw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},kw(t,e)}function Fh(t,e,r){return e=oN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function oN(t){var e=IZ(t,"string");return ws(e)=="symbol"?e:e+""}function IZ(t,e){if(ws(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ws(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var $Z=function(e){var r=e.x,n=e.y,i=e.xAxis,a=e.yAxis,s=t_({x:i.scale,y:a.scale}),u=s.apply({x:r,y:n},{bandAware:!0});return Un(e,"discard")&&!s.isInRange(u)?null:u},Wh=(function(t){function e(){return EZ(this,e),TZ(this,e,arguments)}return RZ(e,t),PZ(e,[{key:"render",value:function(){var n=this.props,i=n.x,a=n.y,s=n.r,u=n.alwaysShow,c=n.clipPathId,f=Lt(i),p=Lt(a);if(ci(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!f||!p)return null;var h=$Z(this.props);if(!h)return null;var g=h.x,v=h.y,w=this.props,x=w.shape,y=w.className,S=Un(this.props,"hidden")?"url(#".concat(c,")"):void 0,k=kj(kj({clipPath:S},Ee(this.props,!0)),{},{cx:g,cy:v});return I.createElement(Ue,{className:Le("recharts-reference-dot",y)},e.renderDot(x,k),Ht.renderCallByParent(this.props,{x:g-s,y:v-s,width:2*s,height:2*s}))}}])})(I.Component);Fh(Wh,"displayName","ReferenceDot");Fh(Wh,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Fh(Wh,"renderDot",function(t,e){var r;return I.isValidElement(t)?r=I.cloneElement(t,e):$e(t)?r=t(e):r=I.createElement(Nh,Sw({},e,{cx:e.cx,cy:e.cy,className:"recharts-reference-dot-dot"})),r});function Ow(){return Ow=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ow.apply(this,arguments)}function xs(t){"@babel/helpers - typeof";return xs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xs(t)}function Oj(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ej(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Oj(Object(r),!0).forEach(function(n){Hh(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Oj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function NZ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function MZ(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,lN(n.key),n)}}function LZ(t,e,r){return e&&MZ(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function DZ(t,e,r){return e=Xd(e),BZ(t,sN()?Reflect.construct(e,r||[],Xd(t).constructor):e.apply(t,r))}function BZ(t,e){if(e&&(xs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return UZ(t)}function UZ(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function sN(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sN=function(){return!!t})()}function Xd(t){return Xd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Xd(t)}function qZ(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ew(t,e)}function Ew(t,e){return Ew=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Ew(t,e)}function Hh(t,e,r){return e=lN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function lN(t){var e=zZ(t,"string");return xs(e)=="symbol"?e:e+""}function zZ(t,e){if(xs(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(xs(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var FZ=function(e,r,n,i,a){var s=a.x1,u=a.x2,c=a.y1,f=a.y2,p=a.xAxis,h=a.yAxis;if(!p||!h)return null;var g=t_({x:p.scale,y:h.scale}),v={x:e?g.x.apply(s,{position:"start"}):g.x.rangeMin,y:n?g.y.apply(c,{position:"start"}):g.y.rangeMin},w={x:r?g.x.apply(u,{position:"end"}):g.x.rangeMax,y:i?g.y.apply(f,{position:"end"}):g.y.rangeMax};return Un(a,"discard")&&(!g.isInRange(v)||!g.isInRange(w))?null:H$(v,w)},Vh=(function(t){function e(){return NZ(this,e),DZ(this,e,arguments)}return qZ(e,t),LZ(e,[{key:"render",value:function(){var n=this.props,i=n.x1,a=n.x2,s=n.y1,u=n.y2,c=n.className,f=n.alwaysShow,p=n.clipPathId;ci(f===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=Lt(i),g=Lt(a),v=Lt(s),w=Lt(u),x=this.props.shape;if(!h&&!g&&!v&&!w&&!x)return null;var y=FZ(h,g,v,w,this.props);if(!y&&!x)return null;var S=Un(this.props,"hidden")?"url(#".concat(p,")"):void 0;return I.createElement(Ue,{className:Le("recharts-reference-area",c)},e.renderRect(x,Ej(Ej({clipPath:S},Ee(this.props,!0)),y)),Ht.renderCallByParent(this.props,y))}}])})(I.Component);Hh(Vh,"displayName","ReferenceArea");Hh(Vh,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});Hh(Vh,"renderRect",function(t,e){var r;return I.isValidElement(t)?r=I.cloneElement(t,e):$e(t)?r=t(e):r=I.createElement(e_,Ow({},e,{className:"recharts-reference-area-rect"})),r});function uN(t,e,r){if(e<1)return[];if(e===1&&r===void 0)return t;for(var n=[],i=0;i<t.length;i+=e)n.push(t[i]);return n}function WZ(t,e,r){var n={width:t.width+e.width,height:t.height+e.height};return ZQ(n,r)}function HZ(t,e,r){var n=r==="width",i=t.x,a=t.y,s=t.width,u=t.height;return e===1?{start:n?i:a,end:n?i+s:a+u}:{start:n?i+s:a+u,end:n?i:a}}function Yd(t,e,r,n,i){if(t*e<t*n||t*e>t*i)return!1;var a=r();return t*(e-t*a/2-n)>=0&&t*(e+t*a/2-i)<=0}function VZ(t,e){return uN(t,e+1)}function KZ(t,e,r,n,i){for(var a=(n||[]).slice(),s=e.start,u=e.end,c=0,f=1,p=s,h=function(){var w=n==null?void 0:n[c];if(w===void 0)return{v:uN(n,f)};var x=c,y,S=function(){return y===void 0&&(y=r(w,x)),y},k=w.coordinate,E=c===0||Yd(t,k,S,p,u);E||(c=0,p=s,f+=1),E&&(p=k+t*(S()/2+i),c+=f)},g;f<=a.length;)if(g=h(),g)return g.v;return[]}function qu(t){"@babel/helpers - typeof";return qu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qu(t)}function Aj(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function or(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Aj(Object(r),!0).forEach(function(n){GZ(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Aj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function GZ(t,e,r){return e=XZ(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function XZ(t){var e=YZ(t,"string");return qu(e)=="symbol"?e:e+""}function YZ(t,e){if(qu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(qu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function JZ(t,e,r,n,i){for(var a=(n||[]).slice(),s=a.length,u=e.start,c=e.end,f=function(g){var v=a[g],w,x=function(){return w===void 0&&(w=r(v,g)),w};if(g===s-1){var y=t*(v.coordinate+t*x()/2-c);a[g]=v=or(or({},v),{},{tickCoord:y>0?v.coordinate-y*t:v.coordinate})}else a[g]=v=or(or({},v),{},{tickCoord:v.coordinate});var S=Yd(t,v.tickCoord,x,u,c);S&&(c=v.tickCoord-t*(x()/2+i),a[g]=or(or({},v),{},{isShow:!0}))},p=s-1;p>=0;p--)f(p);return a}function QZ(t,e,r,n,i,a){var s=(n||[]).slice(),u=s.length,c=e.start,f=e.end;if(a){var p=n[u-1],h=r(p,u-1),g=t*(p.coordinate+t*h/2-f);s[u-1]=p=or(or({},p),{},{tickCoord:g>0?p.coordinate-g*t:p.coordinate});var v=Yd(t,p.tickCoord,function(){return h},c,f);v&&(f=p.tickCoord-t*(h/2+i),s[u-1]=or(or({},p),{},{isShow:!0}))}for(var w=a?u-1:u,x=function(k){var E=s[k],P,O=function(){return P===void 0&&(P=r(E,k)),P};if(k===0){var A=t*(E.coordinate-t*O()/2-c);s[k]=E=or(or({},E),{},{tickCoord:A<0?E.coordinate-A*t:E.coordinate})}else s[k]=E=or(or({},E),{},{tickCoord:E.coordinate});var C=Yd(t,E.tickCoord,O,c,f);C&&(c=E.tickCoord+t*(O()/2+i),s[k]=or(or({},E),{},{isShow:!0}))},y=0;y<w;y++)x(y);return s}function ZZ(t,e,r){var n=t.tick,i=t.ticks,a=t.viewBox,s=t.minTickGap,u=t.orientation,c=t.interval,f=t.tickFormatter,p=t.unit,h=t.angle;if(!i||!i.length||!n)return[];if(fe(c)||to.isSsr)return VZ(i,typeof c=="number"&&fe(c)?c:0);var g=[],v=u==="top"||u==="bottom"?"width":"height",w=p&&v==="width"?Yl(p,{fontSize:e,letterSpacing:r}):{width:0,height:0},x=function(E,P){var O=$e(f)?f(E.value,P):E.value;return v==="width"?WZ(Yl(O,{fontSize:e,letterSpacing:r}),w,h):Yl(O,{fontSize:e,letterSpacing:r})[v]},y=i.length>=2?fr(i[1].coordinate-i[0].coordinate):1,S=HZ(a,y,v);return c==="equidistantPreserveStart"?KZ(y,S,x,i,s):(c==="preserveStart"||c==="preserveStartEnd"?g=QZ(y,S,x,i,s,c==="preserveStartEnd"):g=JZ(y,S,x,i,s),g.filter(function(k){return k.isShow}))}var eee=["viewBox"],tee=["viewBox"],ree=["ticks"];function _s(t){"@babel/helpers - typeof";return _s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_s(t)}function Ko(){return Ko=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ko.apply(this,arguments)}function Pj(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function $t(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Pj(Object(r),!0).forEach(function(n){i_(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Fb(t,e){if(t==null)return{};var r=nee(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function nee(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function iee(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tj(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,fN(n.key),n)}}function aee(t,e,r){return e&&Tj(t.prototype,e),r&&Tj(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function oee(t,e,r){return e=Jd(e),see(t,cN()?Reflect.construct(e,r||[],Jd(t).constructor):e.apply(t,r))}function see(t,e){if(e&&(_s(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lee(t)}function lee(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function cN(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cN=function(){return!!t})()}function Jd(t){return Jd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Jd(t)}function uee(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Aw(t,e)}function Aw(t,e){return Aw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Aw(t,e)}function i_(t,e,r){return e=fN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function fN(t){var e=cee(t,"string");return _s(e)=="symbol"?e:e+""}function cee(t,e){if(_s(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(_s(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Kh=(function(t){function e(r){var n;return iee(this,e),n=oee(this,e,[r]),n.state={fontSize:"",letterSpacing:""},n}return uee(e,t),aee(e,[{key:"shouldComponentUpdate",value:function(n,i){var a=n.viewBox,s=Fb(n,eee),u=this.props,c=u.viewBox,f=Fb(u,tee);return!Yo(a,c)||!Yo(s,f)||!Yo(i,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var i=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var i=this.props,a=i.x,s=i.y,u=i.width,c=i.height,f=i.orientation,p=i.tickSize,h=i.mirror,g=i.tickMargin,v,w,x,y,S,k,E=h?-1:1,P=n.tickSize||p,O=fe(n.tickCoord)?n.tickCoord:n.coordinate;switch(f){case"top":v=w=n.coordinate,y=s+ +!h*c,x=y-E*P,k=x-E*g,S=O;break;case"left":x=y=n.coordinate,w=a+ +!h*u,v=w-E*P,S=v-E*g,k=O;break;case"right":x=y=n.coordinate,w=a+ +h*u,v=w+E*P,S=v+E*g,k=O;break;default:v=w=n.coordinate,y=s+ +h*c,x=y+E*P,k=x+E*g,S=O;break}return{line:{x1:v,y1:x,x2:w,y2:y},tick:{x:S,y:k}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,s;switch(i){case"left":s=a?"start":"end";break;case"right":s=a?"end":"start";break;default:s="middle";break}return s}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,i=n.orientation,a=n.mirror,s="end";switch(i){case"left":case"right":s="middle";break;case"top":s=a?"start":"end";break;default:s=a?"end":"start";break}return s}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.x,a=n.y,s=n.width,u=n.height,c=n.orientation,f=n.mirror,p=n.axisLine,h=$t($t($t({},Ee(this.props,!1)),Ee(p,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var g=+(c==="top"&&!f||c==="bottom"&&f);h=$t($t({},h),{},{x1:i,y1:a+g*u,x2:i+s,y2:a+g*u})}else{var v=+(c==="left"&&!f||c==="right"&&f);h=$t($t({},h),{},{x1:i+v*s,y1:a,x2:i+v*s,y2:a+u})}return I.createElement("line",Ko({},h,{className:Le("recharts-cartesian-axis-line",Mr(p,"className"))}))}},{key:"renderTicks",value:function(n,i,a){var s=this,u=this.props,c=u.tickLine,f=u.stroke,p=u.tick,h=u.tickFormatter,g=u.unit,v=ZZ($t($t({},this.props),{},{ticks:n}),i,a),w=this.getTickTextAnchor(),x=this.getTickVerticalAnchor(),y=Ee(this.props,!1),S=Ee(p,!1),k=$t($t({},y),{},{fill:"none"},Ee(c,!1)),E=v.map(function(P,O){var A=s.getTickLineCoord(P),C=A.line,R=A.tick,M=$t($t($t($t({textAnchor:w,verticalAnchor:x},y),{},{stroke:"none",fill:f},S),R),{},{index:O,payload:P,visibleTicksCount:v.length,tickFormatter:h});return I.createElement(Ue,Ko({className:"recharts-cartesian-axis-tick",key:"tick-".concat(P.value,"-").concat(P.coordinate,"-").concat(P.tickCoord)},Ga(s.props,P,O)),c&&I.createElement("line",Ko({},k,C,{className:Le("recharts-cartesian-axis-tick-line",Mr(c,"className"))})),p&&e.renderTickItem(p,M,"".concat($e(h)?h(P.value,O):P.value).concat(g||"")))});return I.createElement("g",{className:"recharts-cartesian-axis-ticks"},E)}},{key:"render",value:function(){var n=this,i=this.props,a=i.axisLine,s=i.width,u=i.height,c=i.ticksGenerator,f=i.className,p=i.hide;if(p)return null;var h=this.props,g=h.ticks,v=Fb(h,ree),w=g;return $e(c)&&(w=g&&g.length>0?c(this.props):c(v)),s<=0||u<=0||!w||!w.length?null:I.createElement(Ue,{className:Le("recharts-cartesian-axis",f),ref:function(y){n.layerReference=y}},a&&this.renderAxisLine(),this.renderTicks(w,this.state.fontSize,this.state.letterSpacing),Ht.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var s,u=Le(i.className,"recharts-cartesian-axis-tick-value");return I.isValidElement(n)?s=I.cloneElement(n,$t($t({},i),{},{className:u})):$e(n)?s=n($t($t({},i),{},{className:u})):s=I.createElement(Xa,Ko({},i,{className:"recharts-cartesian-axis-tick-value"}),a),s}}])})($.Component);i_(Kh,"displayName","CartesianAxis");i_(Kh,"defaultProps",{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"});var fee=["layout","type","stroke","connectNulls","isRange","ref"],dee=["key"],dN;function Ss(t){"@babel/helpers - typeof";return Ss=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ss(t)}function hN(t,e){if(t==null)return{};var r=hee(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function hee(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function za(){return za=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},za.apply(this,arguments)}function Cj(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Xi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Cj(Object(r),!0).forEach(function(n){Dn(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Cj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function pee(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jj(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,mN(n.key),n)}}function mee(t,e,r){return e&&jj(t.prototype,e),r&&jj(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function gee(t,e,r){return e=Qd(e),vee(t,pN()?Reflect.construct(e,r||[],Qd(t).constructor):e.apply(t,r))}function vee(t,e){if(e&&(Ss(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yee(t)}function yee(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pN(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pN=function(){return!!t})()}function Qd(t){return Qd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Qd(t)}function bee(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Pw(t,e)}function Pw(t,e){return Pw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Pw(t,e)}function Dn(t,e,r){return e=mN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function mN(t){var e=wee(t,"string");return Ss(e)=="symbol"?e:e+""}function wee(t,e){if(Ss(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Ss(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var sa=(function(t){function e(){var r;pee(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=gee(this,e,[].concat(i)),Dn(r,"state",{isAnimationFinished:!0}),Dn(r,"id",Ms("recharts-area-")),Dn(r,"handleAnimationEnd",function(){var s=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),$e(s)&&s()}),Dn(r,"handleAnimationStart",function(){var s=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),$e(s)&&s()}),r}return bee(e,t),mee(e,[{key:"renderDots",value:function(n,i,a){var s=this.props.isAnimationActive,u=this.state.isAnimationFinished;if(s&&!u)return null;var c=this.props,f=c.dot,p=c.points,h=c.dataKey,g=Ee(this.props,!1),v=Ee(f,!0),w=p.map(function(y,S){var k=Xi(Xi(Xi({key:"dot-".concat(S),r:3},g),v),{},{index:S,cx:y.x,cy:y.y,dataKey:h,value:y.value,payload:y.payload,points:p});return e.renderDotItem(f,k)}),x={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return I.createElement(Ue,za({className:"recharts-area-dots"},x),w)}},{key:"renderHorizontalRect",value:function(n){var i=this.props,a=i.baseLine,s=i.points,u=i.strokeWidth,c=s[0].x,f=s[s.length-1].x,p=n*Math.abs(c-f),h=Zi(s.map(function(g){return g.y||0}));return fe(a)&&typeof a=="number"?h=Math.max(a,h):a&&Array.isArray(a)&&a.length&&(h=Math.max(Zi(a.map(function(g){return g.y||0})),h)),fe(h)?I.createElement("rect",{x:c<f?c:c-p,y:0,width:p,height:Math.floor(h+(u?parseInt("".concat(u),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var i=this.props,a=i.baseLine,s=i.points,u=i.strokeWidth,c=s[0].y,f=s[s.length-1].y,p=n*Math.abs(c-f),h=Zi(s.map(function(g){return g.x||0}));return fe(a)&&typeof a=="number"?h=Math.max(a,h):a&&Array.isArray(a)&&a.length&&(h=Math.max(Zi(a.map(function(g){return g.x||0})),h)),fe(h)?I.createElement("rect",{x:0,y:c<f?c:c-p,width:h+(u?parseInt("".concat(u),10):1),height:Math.floor(p)}):null}},{key:"renderClipRect",value:function(n){var i=this.props.layout;return i==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,i,a,s){var u=this.props,c=u.layout,f=u.type,p=u.stroke,h=u.connectNulls,g=u.isRange;u.ref;var v=hN(u,fee);return I.createElement(Ue,{clipPath:a?"url(#clipPath-".concat(s,")"):null},I.createElement(es,za({},Ee(v,!0),{points:n,connectNulls:h,type:f,baseLine:i,layout:c,stroke:"none",className:"recharts-area-area"})),p!=="none"&&I.createElement(es,za({},Ee(this.props,!1),{className:"recharts-area-curve",layout:c,type:f,connectNulls:h,fill:"none",points:n})),p!=="none"&&g&&I.createElement(es,za({},Ee(this.props,!1),{className:"recharts-area-curve",layout:c,type:f,connectNulls:h,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(n,i){var a=this,s=this.props,u=s.points,c=s.baseLine,f=s.isAnimationActive,p=s.animationBegin,h=s.animationDuration,g=s.animationEasing,v=s.animationId,w=this.state,x=w.prevPoints,y=w.prevBaseLine;return I.createElement(zn,{begin:p,duration:h,isActive:f,easing:g,from:{t:0},to:{t:1},key:"area-".concat(v),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var k=S.t;if(x){var E=x.length/u.length,P=u.map(function(R,M){var H=Math.floor(M*E);if(x[H]){var z=x[H],B=Sr(z.x,R.x),F=Sr(z.y,R.y);return Xi(Xi({},R),{},{x:B(k),y:F(k)})}return R}),O;if(fe(c)&&typeof c=="number"){var A=Sr(y,c);O=A(k)}else if(Me(c)||Ns(c)){var C=Sr(y,0);O=C(k)}else O=c.map(function(R,M){var H=Math.floor(M*E);if(y[H]){var z=y[H],B=Sr(z.x,R.x),F=Sr(z.y,R.y);return Xi(Xi({},R),{},{x:B(k),y:F(k)})}return R});return a.renderAreaStatically(P,O,n,i)}return I.createElement(Ue,null,I.createElement("defs",null,I.createElement("clipPath",{id:"animationClipPath-".concat(i)},a.renderClipRect(k))),I.createElement(Ue,{clipPath:"url(#animationClipPath-".concat(i,")")},a.renderAreaStatically(u,c,n,i)))})}},{key:"renderArea",value:function(n,i){var a=this.props,s=a.points,u=a.baseLine,c=a.isAnimationActive,f=this.state,p=f.prevPoints,h=f.prevBaseLine,g=f.totalLength;return c&&s&&s.length&&(!p&&g>0||!cs(p,s)||!cs(h,u))?this.renderAreaWithAnimation(n,i):this.renderAreaStatically(s,u,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,s=i.dot,u=i.points,c=i.className,f=i.top,p=i.left,h=i.xAxis,g=i.yAxis,v=i.width,w=i.height,x=i.isAnimationActive,y=i.id;if(a||!u||!u.length)return null;var S=this.state.isAnimationFinished,k=u.length===1,E=Le("recharts-area",c),P=h&&h.allowDataOverflow,O=g&&g.allowDataOverflow,A=P||O,C=Me(y)?this.id:y,R=(n=Ee(s,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},M=R.r,H=M===void 0?3:M,z=R.strokeWidth,B=z===void 0?2:z,F=hz(s)?s:{},J=F.clipDot,V=J===void 0?!0:J,K=H*2+B;return I.createElement(Ue,{className:E},P||O?I.createElement("defs",null,I.createElement("clipPath",{id:"clipPath-".concat(C)},I.createElement("rect",{x:P?p:p-v/2,y:O?f:f-w/2,width:P?v:v*2,height:O?w:w*2})),!V&&I.createElement("clipPath",{id:"clipPath-dots-".concat(C)},I.createElement("rect",{x:p-K/2,y:f-K/2,width:v+K,height:w+K}))):null,k?null:this.renderArea(A,C),(s||k)&&this.renderDots(A,V,C),(!x||S)&&di.renderCallByParent(this.props,u))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:n.points!==i.curPoints||n.baseLine!==i.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])})($.PureComponent);dN=sa;Dn(sa,"displayName","Area");Dn(sa,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!to.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Dn(sa,"getBaseValue",function(t,e,r,n){var i=t.layout,a=t.baseValue,s=e.props.baseValue,u=s??a;if(fe(u)&&typeof u=="number")return u;var c=i==="horizontal"?n:r,f=c.scale.domain();if(c.type==="number"){var p=Math.max(f[0],f[1]),h=Math.min(f[0],f[1]);return u==="dataMin"?h:u==="dataMax"||p<0?p:Math.max(Math.min(f[0],f[1]),0)}return u==="dataMin"?f[0]:u==="dataMax"?f[1]:f[0]});Dn(sa,"getComposedData",function(t){var e=t.props,r=t.item,n=t.xAxis,i=t.yAxis,a=t.xAxisTicks,s=t.yAxisTicks,u=t.bandSize,c=t.dataKey,f=t.stackedData,p=t.dataStartIndex,h=t.displayedData,g=t.offset,v=e.layout,w=f&&f.length,x=dN.getBaseValue(e,r,n,i),y=v==="horizontal",S=!1,k=h.map(function(P,O){var A;w?A=f[p+O]:(A=Mt(P,c),Array.isArray(A)?S=!0:A=[x,A]);var C=A[1]==null||w&&Mt(P,c)==null;return y?{x:BT({axis:n,ticks:a,bandSize:u,entry:P,index:O}),y:C?null:i.scale(A[1]),value:A,payload:P}:{x:C?null:n.scale(A[1]),y:BT({axis:i,ticks:s,bandSize:u,entry:P,index:O}),value:A,payload:P}}),E;return w||S?E=k.map(function(P){var O=Array.isArray(P.value)?P.value[0]:null;return y?{x:P.x,y:O!=null&&P.y!=null?i.scale(O):null}:{x:O!=null?n.scale(O):null,y:P.y}}):E=y?i.scale(x):n.scale(x),Xi({points:k,baseLine:E,layout:v,isRange:S},g)});Dn(sa,"renderDotItem",function(t,e){var r;if(I.isValidElement(t))r=I.cloneElement(t,e);else if($e(t))r=t(e);else{var n=Le("recharts-area-dot",typeof t!="boolean"?t.className:""),i=e.key,a=hN(e,dee);r=I.createElement(Nh,za({},a,{key:i,className:n}))}return r});function ks(t){"@babel/helpers - typeof";return ks=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ks(t)}function xee(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _ee(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,yN(n.key),n)}}function See(t,e,r){return e&&_ee(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function kee(t,e,r){return e=Zd(e),Oee(t,gN()?Reflect.construct(e,r||[],Zd(t).constructor):e.apply(t,r))}function Oee(t,e){if(e&&(ks(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Eee(t)}function Eee(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function gN(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(gN=function(){return!!t})()}function Zd(t){return Zd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Zd(t)}function Aee(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Tw(t,e)}function Tw(t,e){return Tw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Tw(t,e)}function vN(t,e,r){return e=yN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yN(t){var e=Pee(t,"string");return ks(e)=="symbol"?e:e+""}function Pee(t,e){if(ks(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ks(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Cw(){return Cw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Cw.apply(this,arguments)}function Tee(t){var e=t.xAxisId,r=tN(),n=rN(),i=Z$(e);return i==null?null:$.createElement(Kh,Cw({},i,{className:Le("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(s){return qa(s,!0)}}))}var Gh=(function(t){function e(){return xee(this,e),kee(this,e,arguments)}return Aee(e,t),See(e,[{key:"render",value:function(){return $.createElement(Tee,this.props)}}])})($.Component);vN(Gh,"displayName","XAxis");vN(Gh,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function Os(t){"@babel/helpers - typeof";return Os=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Os(t)}function Cee(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jee(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,xN(n.key),n)}}function Ree(t,e,r){return e&&jee(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Iee(t,e,r){return e=eh(e),$ee(t,bN()?Reflect.construct(e,r||[],eh(t).constructor):e.apply(t,r))}function $ee(t,e){if(e&&(Os(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Nee(t)}function Nee(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function bN(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(bN=function(){return!!t})()}function eh(t){return eh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},eh(t)}function Mee(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jw(t,e)}function jw(t,e){return jw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},jw(t,e)}function wN(t,e,r){return e=xN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function xN(t){var e=Lee(t,"string");return Os(e)=="symbol"?e:e+""}function Lee(t,e){if(Os(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Os(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Rw(){return Rw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Rw.apply(this,arguments)}var Dee=function(e){var r=e.yAxisId,n=tN(),i=rN(),a=eN(r);return a==null?null:$.createElement(Kh,Rw({},a,{className:Le("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(u){return qa(u,!0)}}))},Xh=(function(t){function e(){return Cee(this,e),Iee(this,e,arguments)}return Mee(e,t),Ree(e,[{key:"render",value:function(){return $.createElement(Dee,this.props)}}])})($.Component);wN(Xh,"displayName","YAxis");wN(Xh,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function Rj(t){return zee(t)||qee(t)||Uee(t)||Bee()}function Bee(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
331
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uee(t,e){if(t){if(typeof t=="string")return Iw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Iw(t,e)}}function qee(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function zee(t){if(Array.isArray(t))return Iw(t)}function Iw(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var $w=function(e,r,n,i,a){var s=tn(e,n_),u=tn(e,Wh),c=[].concat(Rj(s),Rj(u)),f=tn(e,Vh),p="".concat(i,"Id"),h=i[0],g=r;if(c.length&&(g=c.reduce(function(x,y){if(y.props[p]===n&&Un(y.props,"extendDomain")&&fe(y.props[h])){var S=y.props[h];return[Math.min(x[0],S),Math.max(x[1],S)]}return x},g)),f.length){var v="".concat(h,"1"),w="".concat(h,"2");g=f.reduce(function(x,y){if(y.props[p]===n&&Un(y.props,"extendDomain")&&fe(y.props[v])&&fe(y.props[w])){var S=y.props[v],k=y.props[w];return[Math.min(x[0],S,k),Math.max(x[1],S,k)]}return x},g)}return a&&a.length&&(g=a.reduce(function(x,y){return fe(y)?[Math.min(x[0],y),Math.max(x[1],y)]:x},g)),g},Wb={exports:{}},Ij;function Fee(){return Ij||(Ij=1,(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(c,f,p){this.fn=c,this.context=f,this.once=p||!1}function a(c,f,p,h,g){if(typeof p!="function")throw new TypeError("The listener must be a function");var v=new i(p,h||c,g),w=r?r+f:f;return c._events[w]?c._events[w].fn?c._events[w]=[c._events[w],v]:c._events[w].push(v):(c._events[w]=v,c._eventsCount++),c}function s(c,f){--c._eventsCount===0?c._events=new n:delete c._events[f]}function u(){this._events=new n,this._eventsCount=0}u.prototype.eventNames=function(){var f=[],p,h;if(this._eventsCount===0)return f;for(h in p=this._events)e.call(p,h)&&f.push(r?h.slice(1):h);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(p)):f},u.prototype.listeners=function(f){var p=r?r+f:f,h=this._events[p];if(!h)return[];if(h.fn)return[h.fn];for(var g=0,v=h.length,w=new Array(v);g<v;g++)w[g]=h[g].fn;return w},u.prototype.listenerCount=function(f){var p=r?r+f:f,h=this._events[p];return h?h.fn?1:h.length:0},u.prototype.emit=function(f,p,h,g,v,w){var x=r?r+f:f;if(!this._events[x])return!1;var y=this._events[x],S=arguments.length,k,E;if(y.fn){switch(y.once&&this.removeListener(f,y.fn,void 0,!0),S){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,p),!0;case 3:return y.fn.call(y.context,p,h),!0;case 4:return y.fn.call(y.context,p,h,g),!0;case 5:return y.fn.call(y.context,p,h,g,v),!0;case 6:return y.fn.call(y.context,p,h,g,v,w),!0}for(E=1,k=new Array(S-1);E<S;E++)k[E-1]=arguments[E];y.fn.apply(y.context,k)}else{var P=y.length,O;for(E=0;E<P;E++)switch(y[E].once&&this.removeListener(f,y[E].fn,void 0,!0),S){case 1:y[E].fn.call(y[E].context);break;case 2:y[E].fn.call(y[E].context,p);break;case 3:y[E].fn.call(y[E].context,p,h);break;case 4:y[E].fn.call(y[E].context,p,h,g);break;default:if(!k)for(O=1,k=new Array(S-1);O<S;O++)k[O-1]=arguments[O];y[E].fn.apply(y[E].context,k)}}return!0},u.prototype.on=function(f,p,h){return a(this,f,p,h,!1)},u.prototype.once=function(f,p,h){return a(this,f,p,h,!0)},u.prototype.removeListener=function(f,p,h,g){var v=r?r+f:f;if(!this._events[v])return this;if(!p)return s(this,v),this;var w=this._events[v];if(w.fn)w.fn===p&&(!g||w.once)&&(!h||w.context===h)&&s(this,v);else{for(var x=0,y=[],S=w.length;x<S;x++)(w[x].fn!==p||g&&!w[x].once||h&&w[x].context!==h)&&y.push(w[x]);y.length?this._events[v]=y.length===1?y[0]:y:s(this,v)}return this},u.prototype.removeAllListeners=function(f){var p;return f?(p=r?r+f:f,this._events[p]&&s(this,p)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=r,u.EventEmitter=u,t.exports=u})(Wb)),Wb.exports}var Wee=Fee();const Hee=Ye(Wee);var Hb=new Hee,Vb="recharts.syncMouseEvents";function zu(t){"@babel/helpers - typeof";return zu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zu(t)}function Vee(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Kee(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,_N(n.key),n)}}function Gee(t,e,r){return e&&Kee(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Kb(t,e,r){return e=_N(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _N(t){var e=Xee(t,"string");return zu(e)=="symbol"?e:e+""}function Xee(t,e){if(zu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(zu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Yee=(function(){function t(){Vee(this,t),Kb(this,"activeIndex",0),Kb(this,"coordinateList",[]),Kb(this,"layout","horizontal")}return Gee(t,[{key:"setDetails",value:function(r){var n,i=r.coordinateList,a=i===void 0?null:i,s=r.container,u=s===void 0?null:s,c=r.layout,f=c===void 0?null:c,p=r.offset,h=p===void 0?null:p,g=r.mouseHandlerCallback,v=g===void 0?null:g;this.coordinateList=(n=a??this.coordinateList)!==null&&n!==void 0?n:[],this.container=u??this.container,this.layout=f??this.layout,this.offset=h??this.offset,this.mouseHandlerCallback=v??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(r){if(this.coordinateList.length!==0)switch(r.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),a=i.x,s=i.y,u=i.height,c=this.coordinateList[this.activeIndex].coordinate,f=((r=window)===null||r===void 0?void 0:r.scrollX)||0,p=((n=window)===null||n===void 0?void 0:n.scrollY)||0,h=a+c+f,g=s+this.offset.top+u/2+p;this.mouseHandlerCallback({pageX:h,pageY:g})}}}])})();function Jee(t,e,r){if(r==="number"&&e===!0&&Array.isArray(t)){var n=t==null?void 0:t[0],i=t==null?void 0:t[1];if(n&&i&&fe(n)&&fe(i))return!0}return!1}function Qee(t,e,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:t==="horizontal"?e.x-i:r.left+.5,y:t==="horizontal"?r.top+.5:e.y-i,width:t==="horizontal"?n:r.width-1,height:t==="horizontal"?r.height-1:n}}function SN(t){var e=t.cx,r=t.cy,n=t.radius,i=t.startAngle,a=t.endAngle,s=it(e,r,n,i),u=it(e,r,n,a);return{points:[s,u],cx:e,cy:r,radius:n,startAngle:i,endAngle:a}}function Zee(t,e,r){var n,i,a,s;if(t==="horizontal")n=e.x,a=n,i=r.top,s=r.top+r.height;else if(t==="vertical")i=e.y,s=i,n=r.left,a=r.left+r.width;else if(e.cx!=null&&e.cy!=null)if(t==="centric"){var u=e.cx,c=e.cy,f=e.innerRadius,p=e.outerRadius,h=e.angle,g=it(u,c,f,h),v=it(u,c,p,h);n=g.x,i=g.y,a=v.x,s=v.y}else return SN(e);return[{x:n,y:i},{x:a,y:s}]}function Fu(t){"@babel/helpers - typeof";return Fu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fu(t)}function $j(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Mf(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?$j(Object(r),!0).forEach(function(n){ete(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$j(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function ete(t,e,r){return e=tte(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function tte(t){var e=rte(t,"string");return Fu(e)=="symbol"?e:e+""}function rte(t,e){if(Fu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Fu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function nte(t){var e,r,n=t.element,i=t.tooltipEventType,a=t.isActive,s=t.activeCoordinate,u=t.activePayload,c=t.offset,f=t.activeTooltipIndex,p=t.tooltipAxisBandSize,h=t.layout,g=t.chartName,v=(e=n.props.cursor)!==null&&e!==void 0?e:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!v||!a||!s||g!=="ScatterChart"&&i!=="axis")return null;var w,x=es;if(g==="ScatterChart")w=s,x=FY;else if(g==="BarChart")w=Qee(h,s,c,p),x=e_;else if(h==="radial"){var y=SN(s),S=y.cx,k=y.cy,E=y.radius,P=y.startAngle,O=y.endAngle;w={cx:S,cy:k,startAngle:P,endAngle:O,innerRadius:E,outerRadius:E},x=_$}else w={points:Zee(h,s,c)},x=es;var A=Mf(Mf(Mf(Mf({stroke:"#ccc",pointerEvents:"none"},c),w),Ee(v,!1)),{},{payload:u,payloadIndex:f,className:Le("recharts-tooltip-cursor",v.className)});return $.isValidElement(v)?$.cloneElement(v,A):$.createElement(x,A)}var ite=["item"],ate=["children","className","width","height","style","compact","title","desc"];function Es(t){"@babel/helpers - typeof";return Es=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Es(t)}function Go(){return Go=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Go.apply(this,arguments)}function Nj(t,e){return lte(t)||ste(t,e)||ON(t,e)||ote()}function ote(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
332
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ste(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,f=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return u}}function lte(t){if(Array.isArray(t))return t}function Mj(t,e){if(t==null)return{};var r=ute(t,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function ute(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function cte(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fte(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,EN(n.key),n)}}function dte(t,e,r){return e&&fte(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function hte(t,e,r){return e=th(e),pte(t,kN()?Reflect.construct(e,r||[],th(t).constructor):e.apply(t,r))}function pte(t,e){if(e&&(Es(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mte(t)}function mte(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function kN(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kN=function(){return!!t})()}function th(t){return th=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},th(t)}function gte(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Nw(t,e)}function Nw(t,e){return Nw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Nw(t,e)}function As(t){return bte(t)||yte(t)||ON(t)||vte()}function vte(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
333
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ON(t,e){if(t){if(typeof t=="string")return Mw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Mw(t,e)}}function yte(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function bte(t){if(Array.isArray(t))return Mw(t)}function Mw(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Lj(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function re(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Lj(Object(r),!0).forEach(function(n){Te(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Lj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Te(t,e,r){return e=EN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function EN(t){var e=wte(t,"string");return Es(e)=="symbol"?e:e+""}function wte(t,e){if(Es(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Es(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var xte={xAxis:["bottom","top"],yAxis:["left","right"]},_te={width:"100%",height:"100%"},AN={x:0,y:0};function Lf(t){return t}var Ste=function(e,r){return r==="horizontal"?e.x:r==="vertical"?e.y:r==="centric"?e.angle:e.radius},kte=function(e,r,n,i){var a=r.find(function(p){return p&&p.index===n});if(a){if(e==="horizontal")return{x:a.coordinate,y:i.y};if(e==="vertical")return{x:i.x,y:a.coordinate};if(e==="centric"){var s=a.coordinate,u=i.radius;return re(re(re({},i),it(i.cx,i.cy,u,s)),{},{angle:s,radius:u})}var c=a.coordinate,f=i.angle;return re(re(re({},i),it(i.cx,i.cy,c,f)),{},{angle:f,radius:c})}return AN},Yh=function(e,r){var n=r.graphicalItems,i=r.dataStartIndex,a=r.dataEndIndex,s=(n??[]).reduce(function(u,c){var f=c.props.data;return f&&f.length?[].concat(As(u),As(f)):u},[]);return s.length>0?s:e&&e.length&&fe(i)&&fe(a)?e.slice(i,a+1):[]};function PN(t){return t==="number"?[0,"auto"]:void 0}var Lw=function(e,r,n,i){var a=e.graphicalItems,s=e.tooltipAxis,u=Yh(r,e);return n<0||!a||!a.length||n>=u.length?null:a.reduce(function(c,f){var p,h=(p=f.props.data)!==null&&p!==void 0?p:r;h&&e.dataStartIndex+e.dataEndIndex!==0&&e.dataEndIndex-e.dataStartIndex>=n&&(h=h.slice(e.dataStartIndex,e.dataEndIndex+1));var g;if(s.dataKey&&!s.allowDuplicatedCategory){var v=h===void 0?u:h;g=nd(v,s.dataKey,i)}else g=h&&h[n]||u[n];return g?[].concat(As(c),[g$(f,g)]):c},[])},Dj=function(e,r,n,i){var a=i||{x:e.chartX,y:e.chartY},s=Ste(a,n),u=e.orderedTooltipTicks,c=e.tooltipAxis,f=e.tooltipTicks,p=cK(s,u,f,c);if(p>=0&&f){var h=f[p]&&f[p].value,g=Lw(e,r,p,h),v=kte(n,u,p,a);return{activeTooltipIndex:p,activeLabel:h,activePayload:g,activeCoordinate:v}}return null},Ote=function(e,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,s=r.axisIdKey,u=r.stackGroups,c=r.dataStartIndex,f=r.dataEndIndex,p=e.layout,h=e.children,g=e.stackOffset,v=f$(p,a);return n.reduce(function(w,x){var y,S=x.type.defaultProps!==void 0?re(re({},x.type.defaultProps),x.props):x.props,k=S.type,E=S.dataKey,P=S.allowDataOverflow,O=S.allowDuplicatedCategory,A=S.scale,C=S.ticks,R=S.includeHidden,M=S[s];if(w[M])return w;var H=Yh(e.data,{graphicalItems:i.filter(function(W){var te,ue=s in W.props?W.props[s]:(te=W.type.defaultProps)===null||te===void 0?void 0:te[s];return ue===M}),dataStartIndex:c,dataEndIndex:f}),z=H.length,B,F,J;Jee(S.domain,P,k)&&(B=Q0(S.domain,null,P),v&&(k==="number"||A!=="auto")&&(J=Ql(H,E,"category")));var V=PN(k);if(!B||B.length===0){var K,Z=(K=S.domain)!==null&&K!==void 0?K:V;if(E){if(B=Ql(H,E,k),k==="category"&&v){var G=nz(B);O&&G?(F=B,B=zd(0,z)):O||(B=FT(Z,B,x).reduce(function(W,te){return W.indexOf(te)>=0?W:[].concat(As(W),[te])},[]))}else if(k==="category")O?B=B.filter(function(W){return W!==""&&!Me(W)}):B=FT(Z,B,x).reduce(function(W,te){return W.indexOf(te)>=0||te===""||Me(te)?W:[].concat(As(W),[te])},[]);else if(k==="number"){var ee=mK(H,i.filter(function(W){var te,ue,le=s in W.props?W.props[s]:(te=W.type.defaultProps)===null||te===void 0?void 0:te[s],de="hide"in W.props?W.props.hide:(ue=W.type.defaultProps)===null||ue===void 0?void 0:ue.hide;return le===M&&(R||!de)}),E,a,p);ee&&(B=ee)}v&&(k==="number"||A!=="auto")&&(J=Ql(H,E,"category"))}else v?B=zd(0,z):u&&u[M]&&u[M].hasStack&&k==="number"?B=g==="expand"?[0,1]:m$(u[M].stackGroups,c,f):B=c$(H,i.filter(function(W){var te=s in W.props?W.props[s]:W.type.defaultProps[s],ue="hide"in W.props?W.props.hide:W.type.defaultProps.hide;return te===M&&(R||!ue)}),k,p,!0);if(k==="number")B=$w(h,B,M,a,C),Z&&(B=Q0(Z,B,P));else if(k==="category"&&Z){var U=Z,L=B.every(function(W){return U.indexOf(W)>=0});L&&(B=U)}}return re(re({},w),{},Te({},M,re(re({},S),{},{axisType:a,domain:B,categoricalDomain:J,duplicateDomain:F,originalDomain:(y=S.domain)!==null&&y!==void 0?y:V,isCategorical:v,layout:p})))},{})},Ete=function(e,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,s=r.axisIdKey,u=r.stackGroups,c=r.dataStartIndex,f=r.dataEndIndex,p=e.layout,h=e.children,g=Yh(e.data,{graphicalItems:n,dataStartIndex:c,dataEndIndex:f}),v=g.length,w=f$(p,a),x=-1;return n.reduce(function(y,S){var k=S.type.defaultProps!==void 0?re(re({},S.type.defaultProps),S.props):S.props,E=k[s],P=PN("number");if(!y[E]){x++;var O;return w?O=zd(0,v):u&&u[E]&&u[E].hasStack?(O=m$(u[E].stackGroups,c,f),O=$w(h,O,E,a)):(O=Q0(P,c$(g,n.filter(function(A){var C,R,M=s in A.props?A.props[s]:(C=A.type.defaultProps)===null||C===void 0?void 0:C[s],H="hide"in A.props?A.props.hide:(R=A.type.defaultProps)===null||R===void 0?void 0:R.hide;return M===E&&!H}),"number",p),i.defaultProps.allowDataOverflow),O=$w(h,O,E,a)),re(re({},y),{},Te({},E,re(re({axisType:a},i.defaultProps),{},{hide:!0,orientation:Mr(xte,"".concat(a,".").concat(x%2),null),domain:O,originalDomain:P,isCategorical:w,layout:p})))}return y},{})},Ate=function(e,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,s=r.graphicalItems,u=r.stackGroups,c=r.dataStartIndex,f=r.dataEndIndex,p=e.children,h="".concat(i,"Id"),g=tn(p,a),v={};return g&&g.length?v=Ote(e,{axes:g,graphicalItems:s,axisType:i,axisIdKey:h,stackGroups:u,dataStartIndex:c,dataEndIndex:f}):s&&s.length&&(v=Ete(e,{Axis:a,graphicalItems:s,axisType:i,axisIdKey:h,stackGroups:u,dataStartIndex:c,dataEndIndex:f})),v},Pte=function(e){var r=zo(e),n=qa(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Ax(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Td(r,n)}},Bj=function(e){var r=e.children,n=e.defaultShowTooltip,i=Ir(r,vs),a=0,s=0;return e.data&&e.data.length!==0&&(s=e.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(s=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:s,activeTooltipIndex:-1,isTooltipActive:!!n}},Tte=function(e){return!e||!e.length?!1:e.some(function(r){var n=ui(r&&r.type);return n&&n.indexOf("Bar")>=0})},Uj=function(e){return e==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:e==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:e==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},Cte=function(e,r){var n=e.props,i=e.graphicalItems,a=e.xAxisMap,s=a===void 0?{}:a,u=e.yAxisMap,c=u===void 0?{}:u,f=n.width,p=n.height,h=n.children,g=n.margin||{},v=Ir(h,vs),w=Ir(h,Jo),x=Object.keys(c).reduce(function(O,A){var C=c[A],R=C.orientation;return!C.mirror&&!C.hide?re(re({},O),{},Te({},R,O[R]+C.width)):O},{left:g.left||0,right:g.right||0}),y=Object.keys(s).reduce(function(O,A){var C=s[A],R=C.orientation;return!C.mirror&&!C.hide?re(re({},O),{},Te({},R,Mr(O,"".concat(R))+C.height)):O},{top:g.top||0,bottom:g.bottom||0}),S=re(re({},y),x),k=S.bottom;v&&(S.bottom+=v.props.height||vs.defaultProps.height),w&&r&&(S=hK(S,i,n,r));var E=f-S.left-S.right,P=p-S.top-S.bottom;return re(re({brushBottom:k},S),{},{width:Math.max(E,0),height:Math.max(P,0)})},jte=function(e,r){if(r==="xAxis")return e[r].width;if(r==="yAxis")return e[r].height},TN=function(e){var r=e.chartName,n=e.GraphicalChild,i=e.defaultTooltipEventType,a=i===void 0?"axis":i,s=e.validateTooltipEventTypes,u=s===void 0?["axis"]:s,c=e.axisComponents,f=e.legendContent,p=e.formatAxisMap,h=e.defaultProps,g=function(S,k){var E=k.graphicalItems,P=k.stackGroups,O=k.offset,A=k.updateId,C=k.dataStartIndex,R=k.dataEndIndex,M=S.barSize,H=S.layout,z=S.barGap,B=S.barCategoryGap,F=S.maxBarSize,J=Uj(H),V=J.numericAxisName,K=J.cateAxisName,Z=Tte(E),G=[];return E.forEach(function(ee,U){var L=Yh(S.data,{graphicalItems:[ee],dataStartIndex:C,dataEndIndex:R}),W=ee.type.defaultProps!==void 0?re(re({},ee.type.defaultProps),ee.props):ee.props,te=W.dataKey,ue=W.maxBarSize,le=W["".concat(V,"Id")],de=W["".concat(K,"Id")],Re={},pe=c.reduce(function(er,ot){var Er=k["".concat(ot.axisType,"Map")],la=W["".concat(ot.axisType,"Id")];Er&&Er[la]||ot.axisType==="zAxis"||Ja();var ua=Er[la];return re(re({},er),{},Te(Te({},ot.axisType,ua),"".concat(ot.axisType,"Ticks"),qa(ua)))},Re),ne=pe[K],_e=pe["".concat(K,"Ticks")],Oe=P&&P[le]&&P[le].hasStack&&kK(ee,P[le].stackGroups),ie=ui(ee.type).indexOf("Bar")>=0,ze=Td(ne,_e),Ie=[],ct=Z&&fK({barSize:M,stackGroups:P,totalSize:jte(pe,K)});if(ie){var at,ft,pr=Me(ue)?F:ue,St=(at=(ft=Td(ne,_e,!0))!==null&&ft!==void 0?ft:pr)!==null&&at!==void 0?at:0;Ie=dK({barGap:z,barCategoryGap:B,bandSize:St!==ze?St:ze,sizeList:ct[de],maxBarSize:pr}),St!==ze&&(Ie=Ie.map(function(er){return re(re({},er),{},{position:re(re({},er.position),{},{offset:er.position.offset-St/2})})}))}var Dr=ee&&ee.type&&ee.type.getComposedData;Dr&&G.push({props:re(re({},Dr(re(re({},pe),{},{displayedData:L,props:S,dataKey:te,item:ee,bandSize:ze,barPosition:Ie,offset:O,stackedData:Oe,layout:H,dataStartIndex:C,dataEndIndex:R}))),{},Te(Te(Te({key:ee.key||"item-".concat(U)},V,pe[V]),K,pe[K]),"animationId",A)),childIndex:gz(ee,S.children),item:ee})}),G},v=function(S,k){var E=S.props,P=S.dataStartIndex,O=S.dataEndIndex,A=S.updateId;if(!rE({props:E}))return null;var C=E.children,R=E.layout,M=E.stackOffset,H=E.data,z=E.reverseStackOrder,B=Uj(R),F=B.numericAxisName,J=B.cateAxisName,V=tn(C,n),K=_K(H,V,"".concat(F,"Id"),"".concat(J,"Id"),M,z),Z=c.reduce(function(W,te){var ue="".concat(te.axisType,"Map");return re(re({},W),{},Te({},ue,Ate(E,re(re({},te),{},{graphicalItems:V,stackGroups:te.axisType===F&&K,dataStartIndex:P,dataEndIndex:O}))))},{}),G=Cte(re(re({},Z),{},{props:E,graphicalItems:V}),k==null?void 0:k.legendBBox);Object.keys(Z).forEach(function(W){Z[W]=p(E,Z[W],G,W.replace("Map",""),r)});var ee=Z["".concat(J,"Map")],U=Pte(ee),L=g(E,re(re({},Z),{},{dataStartIndex:P,dataEndIndex:O,updateId:A,graphicalItems:V,stackGroups:K,offset:G}));return re(re({formattedGraphicalItems:L,graphicalItems:V,offset:G,stackGroups:K},U),Z)},w=(function(y){function S(k){var E,P,O;return cte(this,S),O=hte(this,S,[k]),Te(O,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Te(O,"accessibilityManager",new Yee),Te(O,"handleLegendBBoxUpdate",function(A){if(A){var C=O.state,R=C.dataStartIndex,M=C.dataEndIndex,H=C.updateId;O.setState(re({legendBBox:A},v({props:O.props,dataStartIndex:R,dataEndIndex:M,updateId:H},re(re({},O.state),{},{legendBBox:A}))))}}),Te(O,"handleReceiveSyncEvent",function(A,C,R){if(O.props.syncId===A){if(R===O.eventEmitterSymbol&&typeof O.props.syncMethod!="function")return;O.applySyncEvent(C)}}),Te(O,"handleBrushChange",function(A){var C=A.startIndex,R=A.endIndex;if(C!==O.state.dataStartIndex||R!==O.state.dataEndIndex){var M=O.state.updateId;O.setState(function(){return re({dataStartIndex:C,dataEndIndex:R},v({props:O.props,dataStartIndex:C,dataEndIndex:R,updateId:M},O.state))}),O.triggerSyncEvent({dataStartIndex:C,dataEndIndex:R})}}),Te(O,"handleMouseEnter",function(A){var C=O.getMouseInfo(A);if(C){var R=re(re({},C),{},{isTooltipActive:!0});O.setState(R),O.triggerSyncEvent(R);var M=O.props.onMouseEnter;$e(M)&&M(R,A)}}),Te(O,"triggeredAfterMouseMove",function(A){var C=O.getMouseInfo(A),R=C?re(re({},C),{},{isTooltipActive:!0}):{isTooltipActive:!1};O.setState(R),O.triggerSyncEvent(R);var M=O.props.onMouseMove;$e(M)&&M(R,A)}),Te(O,"handleItemMouseEnter",function(A){O.setState(function(){return{isTooltipActive:!0,activeItem:A,activePayload:A.tooltipPayload,activeCoordinate:A.tooltipPosition||{x:A.cx,y:A.cy}}})}),Te(O,"handleItemMouseLeave",function(){O.setState(function(){return{isTooltipActive:!1}})}),Te(O,"handleMouseMove",function(A){A.persist(),O.throttleTriggeredAfterMouseMove(A)}),Te(O,"handleMouseLeave",function(A){O.throttleTriggeredAfterMouseMove.cancel();var C={isTooltipActive:!1};O.setState(C),O.triggerSyncEvent(C);var R=O.props.onMouseLeave;$e(R)&&R(C,A)}),Te(O,"handleOuterEvent",function(A){var C=mz(A),R=Mr(O.props,"".concat(C));if(C&&$e(R)){var M,H;/.*touch.*/i.test(C)?H=O.getMouseInfo(A.changedTouches[0]):H=O.getMouseInfo(A),R((M=H)!==null&&M!==void 0?M:{},A)}}),Te(O,"handleClick",function(A){var C=O.getMouseInfo(A);if(C){var R=re(re({},C),{},{isTooltipActive:!0});O.setState(R),O.triggerSyncEvent(R);var M=O.props.onClick;$e(M)&&M(R,A)}}),Te(O,"handleMouseDown",function(A){var C=O.props.onMouseDown;if($e(C)){var R=O.getMouseInfo(A);C(R,A)}}),Te(O,"handleMouseUp",function(A){var C=O.props.onMouseUp;if($e(C)){var R=O.getMouseInfo(A);C(R,A)}}),Te(O,"handleTouchMove",function(A){A.changedTouches!=null&&A.changedTouches.length>0&&O.throttleTriggeredAfterMouseMove(A.changedTouches[0])}),Te(O,"handleTouchStart",function(A){A.changedTouches!=null&&A.changedTouches.length>0&&O.handleMouseDown(A.changedTouches[0])}),Te(O,"handleTouchEnd",function(A){A.changedTouches!=null&&A.changedTouches.length>0&&O.handleMouseUp(A.changedTouches[0])}),Te(O,"handleDoubleClick",function(A){var C=O.props.onDoubleClick;if($e(C)){var R=O.getMouseInfo(A);C(R,A)}}),Te(O,"handleContextMenu",function(A){var C=O.props.onContextMenu;if($e(C)){var R=O.getMouseInfo(A);C(R,A)}}),Te(O,"triggerSyncEvent",function(A){O.props.syncId!==void 0&&Hb.emit(Vb,O.props.syncId,A,O.eventEmitterSymbol)}),Te(O,"applySyncEvent",function(A){var C=O.props,R=C.layout,M=C.syncMethod,H=O.state.updateId,z=A.dataStartIndex,B=A.dataEndIndex;if(A.dataStartIndex!==void 0||A.dataEndIndex!==void 0)O.setState(re({dataStartIndex:z,dataEndIndex:B},v({props:O.props,dataStartIndex:z,dataEndIndex:B,updateId:H},O.state)));else if(A.activeTooltipIndex!==void 0){var F=A.chartX,J=A.chartY,V=A.activeTooltipIndex,K=O.state,Z=K.offset,G=K.tooltipTicks;if(!Z)return;if(typeof M=="function")V=M(G,A);else if(M==="value"){V=-1;for(var ee=0;ee<G.length;ee++)if(G[ee].value===A.activeLabel){V=ee;break}}var U=re(re({},Z),{},{x:Z.left,y:Z.top}),L=Math.min(F,U.x+U.width),W=Math.min(J,U.y+U.height),te=G[V]&&G[V].value,ue=Lw(O.state,O.props.data,V),le=G[V]?{x:R==="horizontal"?G[V].coordinate:L,y:R==="horizontal"?W:G[V].coordinate}:AN;O.setState(re(re({},A),{},{activeLabel:te,activeCoordinate:le,activePayload:ue,activeTooltipIndex:V}))}else O.setState(A)}),Te(O,"renderCursor",function(A){var C,R=O.state,M=R.isTooltipActive,H=R.activeCoordinate,z=R.activePayload,B=R.offset,F=R.activeTooltipIndex,J=R.tooltipAxisBandSize,V=O.getTooltipEventType(),K=(C=A.props.active)!==null&&C!==void 0?C:M,Z=O.props.layout,G=A.key||"_recharts-cursor";return I.createElement(nte,{key:G,activeCoordinate:H,activePayload:z,activeTooltipIndex:F,chartName:r,element:A,isActive:K,layout:Z,offset:B,tooltipAxisBandSize:J,tooltipEventType:V})}),Te(O,"renderPolarAxis",function(A,C,R){var M=Mr(A,"type.axisType"),H=Mr(O.state,"".concat(M,"Map")),z=A.type.defaultProps,B=z!==void 0?re(re({},z),A.props):A.props,F=H&&H[B["".concat(M,"Id")]];return $.cloneElement(A,re(re({},F),{},{className:Le(M,F.className),key:A.key||"".concat(C,"-").concat(R),ticks:qa(F,!0)}))}),Te(O,"renderPolarGrid",function(A){var C=A.props,R=C.radialLines,M=C.polarAngles,H=C.polarRadius,z=O.state,B=z.radiusAxisMap,F=z.angleAxisMap,J=zo(B),V=zo(F),K=V.cx,Z=V.cy,G=V.innerRadius,ee=V.outerRadius;return $.cloneElement(A,{polarAngles:Array.isArray(M)?M:qa(V,!0).map(function(U){return U.coordinate}),polarRadius:Array.isArray(H)?H:qa(J,!0).map(function(U){return U.coordinate}),cx:K,cy:Z,innerRadius:G,outerRadius:ee,key:A.key||"polar-grid",radialLines:R})}),Te(O,"renderLegend",function(){var A=O.state.formattedGraphicalItems,C=O.props,R=C.children,M=C.width,H=C.height,z=O.props.margin||{},B=M-(z.left||0)-(z.right||0),F=l$({children:R,formattedGraphicalItems:A,legendWidth:B,legendContent:f});if(!F)return null;var J=F.item,V=Mj(F,ite);return $.cloneElement(J,re(re({},V),{},{chartWidth:M,chartHeight:H,margin:z,onBBoxUpdate:O.handleLegendBBoxUpdate}))}),Te(O,"renderTooltip",function(){var A,C=O.props,R=C.children,M=C.accessibilityLayer,H=Ir(R,vn);if(!H)return null;var z=O.state,B=z.isTooltipActive,F=z.activeCoordinate,J=z.activePayload,V=z.activeLabel,K=z.offset,Z=(A=H.props.active)!==null&&A!==void 0?A:B;return $.cloneElement(H,{viewBox:re(re({},K),{},{x:K.left,y:K.top}),active:Z,label:V,payload:Z?J:[],coordinate:F,accessibilityLayer:M})}),Te(O,"renderBrush",function(A){var C=O.props,R=C.margin,M=C.data,H=O.state,z=H.offset,B=H.dataStartIndex,F=H.dataEndIndex,J=H.updateId;return $.cloneElement(A,{key:A.key||"_recharts-brush",onChange:Rf(O.handleBrushChange,A.props.onChange),data:M,x:fe(A.props.x)?A.props.x:z.left,y:fe(A.props.y)?A.props.y:z.top+z.height+z.brushBottom-(R.bottom||0),width:fe(A.props.width)?A.props.width:z.width,startIndex:B,endIndex:F,updateId:"brush-".concat(J)})}),Te(O,"renderReferenceElement",function(A,C,R){if(!A)return null;var M=O,H=M.clipPathId,z=O.state,B=z.xAxisMap,F=z.yAxisMap,J=z.offset,V=A.type.defaultProps||{},K=A.props,Z=K.xAxisId,G=Z===void 0?V.xAxisId:Z,ee=K.yAxisId,U=ee===void 0?V.yAxisId:ee;return $.cloneElement(A,{key:A.key||"".concat(C,"-").concat(R),xAxis:B[G],yAxis:F[U],viewBox:{x:J.left,y:J.top,width:J.width,height:J.height},clipPathId:H})}),Te(O,"renderActivePoints",function(A){var C=A.item,R=A.activePoint,M=A.basePoint,H=A.childIndex,z=A.isRange,B=[],F=C.props.key,J=C.item.type.defaultProps!==void 0?re(re({},C.item.type.defaultProps),C.item.props):C.item.props,V=J.activeDot,K=J.dataKey,Z=re(re({index:H,dataKey:K,cx:R.x,cy:R.y,r:4,fill:Zx(C.item),strokeWidth:2,stroke:"#fff",payload:R.payload,value:R.value},Ee(V,!1)),id(V));return B.push(S.renderActiveDot(V,Z,"".concat(F,"-activePoint-").concat(H))),M?B.push(S.renderActiveDot(V,re(re({},Z),{},{cx:M.x,cy:M.y}),"".concat(F,"-basePoint-").concat(H))):z&&B.push(null),B}),Te(O,"renderGraphicChild",function(A,C,R){var M=O.filterFormatItem(A,C,R);if(!M)return null;var H=O.getTooltipEventType(),z=O.state,B=z.isTooltipActive,F=z.tooltipAxis,J=z.activeTooltipIndex,V=z.activeLabel,K=O.props.children,Z=Ir(K,vn),G=M.props,ee=G.points,U=G.isRange,L=G.baseLine,W=M.item.type.defaultProps!==void 0?re(re({},M.item.type.defaultProps),M.item.props):M.item.props,te=W.activeDot,ue=W.hide,le=W.activeBar,de=W.activeShape,Re=!!(!ue&&B&&Z&&(te||le||de)),pe={};H!=="axis"&&Z&&Z.props.trigger==="click"?pe={onClick:Rf(O.handleItemMouseEnter,A.props.onClick)}:H!=="axis"&&(pe={onMouseLeave:Rf(O.handleItemMouseLeave,A.props.onMouseLeave),onMouseEnter:Rf(O.handleItemMouseEnter,A.props.onMouseEnter)});var ne=$.cloneElement(A,re(re({},M.props),pe));function _e(ot){return typeof F.dataKey=="function"?F.dataKey(ot.payload):null}if(Re)if(J>=0){var Oe,ie;if(F.dataKey&&!F.allowDuplicatedCategory){var ze=typeof F.dataKey=="function"?_e:"payload.".concat(F.dataKey.toString());Oe=nd(ee,ze,V),ie=U&&L&&nd(L,ze,V)}else Oe=ee==null?void 0:ee[J],ie=U&&L&&L[J];if(de||le){var Ie=A.props.activeIndex!==void 0?A.props.activeIndex:J;return[$.cloneElement(A,re(re(re({},M.props),pe),{},{activeIndex:Ie})),null,null]}if(!Me(Oe))return[ne].concat(As(O.renderActivePoints({item:M,activePoint:Oe,basePoint:ie,childIndex:J,isRange:U})))}else{var ct,at=(ct=O.getItemByXY(O.state.activeCoordinate))!==null&&ct!==void 0?ct:{graphicalItem:ne},ft=at.graphicalItem,pr=ft.item,St=pr===void 0?A:pr,Dr=ft.childIndex,er=re(re(re({},M.props),pe),{},{activeIndex:Dr});return[$.cloneElement(St,er),null,null]}return U?[ne,null,null]:[ne,null]}),Te(O,"renderCustomized",function(A,C,R){return $.cloneElement(A,re(re({key:"recharts-customized-".concat(R)},O.props),O.state))}),Te(O,"renderMap",{CartesianGrid:{handler:Lf,once:!0},ReferenceArea:{handler:O.renderReferenceElement},ReferenceLine:{handler:Lf},ReferenceDot:{handler:O.renderReferenceElement},XAxis:{handler:Lf},YAxis:{handler:Lf},Brush:{handler:O.renderBrush,once:!0},Bar:{handler:O.renderGraphicChild},Line:{handler:O.renderGraphicChild},Area:{handler:O.renderGraphicChild},Radar:{handler:O.renderGraphicChild},RadialBar:{handler:O.renderGraphicChild},Scatter:{handler:O.renderGraphicChild},Pie:{handler:O.renderGraphicChild},Funnel:{handler:O.renderGraphicChild},Tooltip:{handler:O.renderCursor,once:!0},PolarGrid:{handler:O.renderPolarGrid,once:!0},PolarAngleAxis:{handler:O.renderPolarAxis},PolarRadiusAxis:{handler:O.renderPolarAxis},Customized:{handler:O.renderCustomized}}),O.clipPathId="".concat((E=k.id)!==null&&E!==void 0?E:Ms("recharts"),"-clip"),O.throttleTriggeredAfterMouseMove=lI(O.triggeredAfterMouseMove,(P=k.throttleDelay)!==null&&P!==void 0?P:1e3/60),O.state={},O}return gte(S,y),dte(S,[{key:"componentDidMount",value:function(){var E,P;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(P=this.props.margin.top)!==null&&P!==void 0?P:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var E=this.props,P=E.children,O=E.data,A=E.height,C=E.layout,R=Ir(P,vn);if(R){var M=R.props.defaultIndex;if(!(typeof M!="number"||M<0||M>this.state.tooltipTicks.length-1)){var H=this.state.tooltipTicks[M]&&this.state.tooltipTicks[M].value,z=Lw(this.state,O,M,H),B=this.state.tooltipTicks[M].coordinate,F=(this.state.offset.top+A)/2,J=C==="horizontal",V=J?{x:B,y:F}:{y:B,x:F},K=this.state.formattedGraphicalItems.find(function(G){var ee=G.item;return ee.type.name==="Scatter"});K&&(V=re(re({},V),K.props.points[M].tooltipPosition),z=K.props.points[M].tooltipPayload);var Z={activeTooltipIndex:M,isTooltipActive:!0,activeLabel:H,activePayload:z,activeCoordinate:V};this.setState(Z),this.renderCursor(R),this.accessibilityManager.setIndex(M)}}}},{key:"getSnapshotBeforeUpdate",value:function(E,P){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==P.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==E.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==E.margin){var O,A;this.accessibilityManager.setDetails({offset:{left:(O=this.props.margin.left)!==null&&O!==void 0?O:0,top:(A=this.props.margin.top)!==null&&A!==void 0?A:0}})}return null}},{key:"componentDidUpdate",value:function(E){w0([Ir(E.children,vn)],[Ir(this.props.children,vn)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var E=Ir(this.props.children,vn);if(E&&typeof E.props.shared=="boolean"){var P=E.props.shared?"axis":"item";return u.indexOf(P)>=0?P:a}return a}},{key:"getMouseInfo",value:function(E){if(!this.container)return null;var P=this.container,O=P.getBoundingClientRect(),A=rW(O),C={chartX:Math.round(E.pageX-A.left),chartY:Math.round(E.pageY-A.top)},R=O.width/P.offsetWidth||1,M=this.inRange(C.chartX,C.chartY,R);if(!M)return null;var H=this.state,z=H.xAxisMap,B=H.yAxisMap,F=this.getTooltipEventType(),J=Dj(this.state,this.props.data,this.props.layout,M);if(F!=="axis"&&z&&B){var V=zo(z).scale,K=zo(B).scale,Z=V&&V.invert?V.invert(C.chartX):null,G=K&&K.invert?K.invert(C.chartY):null;return re(re({},C),{},{xValue:Z,yValue:G},J)}return J?re(re({},C),J):null}},{key:"inRange",value:function(E,P){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,A=this.props.layout,C=E/O,R=P/O;if(A==="horizontal"||A==="vertical"){var M=this.state.offset,H=C>=M.left&&C<=M.left+M.width&&R>=M.top&&R<=M.top+M.height;return H?{x:C,y:R}:null}var z=this.state,B=z.angleAxisMap,F=z.radiusAxisMap;if(B&&F){var J=zo(B);return VT({x:C,y:R},J)}return null}},{key:"parseEventsOfWrapper",value:function(){var E=this.props.children,P=this.getTooltipEventType(),O=Ir(E,vn),A={};O&&P==="axis"&&(O.props.trigger==="click"?A={onClick:this.handleClick}:A={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var C=id(this.props,this.handleOuterEvent);return re(re({},C),A)}},{key:"addListener",value:function(){Hb.on(Vb,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Hb.removeListener(Vb,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(E,P,O){for(var A=this.state.formattedGraphicalItems,C=0,R=A.length;C<R;C++){var M=A[C];if(M.item===E||M.props.key===E.key||P===ui(M.item.type)&&O===M.childIndex)return M}return null}},{key:"renderClipPath",value:function(){var E=this.clipPathId,P=this.state.offset,O=P.left,A=P.top,C=P.height,R=P.width;return I.createElement("defs",null,I.createElement("clipPath",{id:E},I.createElement("rect",{x:O,y:A,height:C,width:R})))}},{key:"getXScales",value:function(){var E=this.state.xAxisMap;return E?Object.entries(E).reduce(function(P,O){var A=Nj(O,2),C=A[0],R=A[1];return re(re({},P),{},Te({},C,R.scale))},{}):null}},{key:"getYScales",value:function(){var E=this.state.yAxisMap;return E?Object.entries(E).reduce(function(P,O){var A=Nj(O,2),C=A[0],R=A[1];return re(re({},P),{},Te({},C,R.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(E){var P;return(P=this.state.xAxisMap)===null||P===void 0||(P=P[E])===null||P===void 0?void 0:P.scale}},{key:"getYScaleByAxisId",value:function(E){var P;return(P=this.state.yAxisMap)===null||P===void 0||(P=P[E])===null||P===void 0?void 0:P.scale}},{key:"getItemByXY",value:function(E){var P=this.state,O=P.formattedGraphicalItems,A=P.activeItem;if(O&&O.length)for(var C=0,R=O.length;C<R;C++){var M=O[C],H=M.props,z=M.item,B=z.type.defaultProps!==void 0?re(re({},z.type.defaultProps),z.props):z.props,F=ui(z.type);if(F==="Bar"){var J=(H.data||[]).find(function(G){return SY(E,G)});if(J)return{graphicalItem:M,payload:J}}else if(F==="RadialBar"){var V=(H.data||[]).find(function(G){return VT(E,G)});if(V)return{graphicalItem:M,payload:V}}else if(Uh(M,A)||qh(M,A)||Lu(M,A)){var K=VJ({graphicalItem:M,activeTooltipItem:A,itemData:B.data}),Z=B.activeIndex===void 0?K:B.activeIndex;return{graphicalItem:re(re({},M),{},{childIndex:Z}),payload:Lu(M,A)?B.data[K]:M.props.data[K]}}}return null}},{key:"render",value:function(){var E=this;if(!rE(this))return null;var P=this.props,O=P.children,A=P.className,C=P.width,R=P.height,M=P.style,H=P.compact,z=P.title,B=P.desc,F=Mj(P,ate),J=Ee(F,!1);if(H)return I.createElement(bj,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},I.createElement(_0,Go({},J,{width:C,height:R,title:z,desc:B}),this.renderClipPath(),iE(O,this.renderMap)));if(this.props.accessibilityLayer){var V,K;J.tabIndex=(V=this.props.tabIndex)!==null&&V!==void 0?V:0,J.role=(K=this.props.role)!==null&&K!==void 0?K:"application",J.onKeyDown=function(G){E.accessibilityManager.keyboardEvent(G)},J.onFocus=function(){E.accessibilityManager.focus()}}var Z=this.parseEventsOfWrapper();return I.createElement(bj,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},I.createElement("div",Go({className:Le("recharts-wrapper",A),style:re({position:"relative",cursor:"default",width:C,height:R},M)},Z,{ref:function(ee){E.container=ee}}),I.createElement(_0,Go({},J,{width:C,height:R,title:z,desc:B,style:_te}),this.renderClipPath(),iE(O,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})($.Component);Te(w,"displayName",r),Te(w,"defaultProps",re({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},h)),Te(w,"getDerivedStateFromProps",function(y,S){var k=y.dataKey,E=y.data,P=y.children,O=y.width,A=y.height,C=y.layout,R=y.stackOffset,M=y.margin,H=S.dataStartIndex,z=S.dataEndIndex;if(S.updateId===void 0){var B=Bj(y);return re(re(re({},B),{},{updateId:0},v(re(re({props:y},B),{},{updateId:0}),S)),{},{prevDataKey:k,prevData:E,prevWidth:O,prevHeight:A,prevLayout:C,prevStackOffset:R,prevMargin:M,prevChildren:P})}if(k!==S.prevDataKey||E!==S.prevData||O!==S.prevWidth||A!==S.prevHeight||C!==S.prevLayout||R!==S.prevStackOffset||!Yo(M,S.prevMargin)){var F=Bj(y),J={chartX:S.chartX,chartY:S.chartY,isTooltipActive:S.isTooltipActive},V=re(re({},Dj(S,E,C)),{},{updateId:S.updateId+1}),K=re(re(re({},F),J),V);return re(re(re({},K),v(re({props:y},K),S)),{},{prevDataKey:k,prevData:E,prevWidth:O,prevHeight:A,prevLayout:C,prevStackOffset:R,prevMargin:M,prevChildren:P})}if(!w0(P,S.prevChildren)){var Z,G,ee,U,L=Ir(P,vs),W=L&&(Z=(G=L.props)===null||G===void 0?void 0:G.startIndex)!==null&&Z!==void 0?Z:H,te=L&&(ee=(U=L.props)===null||U===void 0?void 0:U.endIndex)!==null&&ee!==void 0?ee:z,ue=W!==H||te!==z,le=!Me(E),de=le&&!ue?S.updateId:S.updateId+1;return re(re({updateId:de},v(re(re({props:y},S),{},{updateId:de,dataStartIndex:W,dataEndIndex:te}),S)),{},{prevChildren:P,dataStartIndex:W,dataEndIndex:te})}return null}),Te(w,"renderActiveDot",function(y,S,k){var E;return $.isValidElement(y)?E=$.cloneElement(y,S):$e(y)?E=y(S):E=I.createElement(Nh,S),I.createElement(Ue,{className:"recharts-active-dot",key:k},E)});var x=$.forwardRef(function(S,k){return I.createElement(w,Go({},S,{ref:k}))});return x.displayName=w.displayName,x},Rte=TN({chartName:"PieChart",GraphicalChild:xi,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:Bh},{axisType:"radiusAxis",AxisComp:Lh}],formatAxisMap:$K,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),Ite=TN({chartName:"AreaChart",GraphicalChild:sa,axisComponents:[{axisType:"xAxis",AxisComp:Gh},{axisType:"yAxis",AxisComp:Xh}],formatAxisMap:YQ});const Df=["#E43A9C","#D83333","#F041FF","#38bdf8","#a78bfa","#34d399","#f59e0b"];function $te(){const[t,e]=$.useState(null),[r,n]=$.useState("7d");if($.useEffect(()=>{const c=new Date;r==="7d"?c.setDate(c.getDate()-7):r==="30d"?c.setDate(c.getDate()-30):c.setDate(c.getDate()-1),Pt.get(`/usage?since=${c.toISOString()}`).then(e).catch(()=>{})},[r]),!t)return j.jsx("div",{className:"h-full flex items-center justify-center text-[var(--color-muted-foreground)]",children:"Loading..."});const i=new Map;for(const c of t.entries){const f=c.timestamp.slice(0,10),p=i.get(f)??{date:f,tokens:0,cost:0};p.tokens+=c.inputTokens+c.outputTokens,p.cost+=c.estimatedCostUsd??0,i.set(f,p)}const a=Array.from(i.values()).sort((c,f)=>c.date.localeCompare(f.date)),s=new Map;for(const c of t.entries)s.set(c.model,(s.get(c.model)??0)+c.inputTokens+c.outputTokens);const u=Array.from(s.entries()).map(([c,f])=>({name:c,value:f}));return j.jsxs("div",{className:"h-full overflow-y-auto p-6",children:[j.jsxs("header",{className:"flex items-center justify-between mb-6",children:[j.jsxs("div",{children:[j.jsx("h1",{className:"text-2xl font-bold gradient-text",children:"Usage"}),j.jsx("p",{className:"text-sm text-[var(--color-muted-foreground)] mt-1",children:"Token usage and cost tracking"})]}),j.jsx("div",{className:"flex gap-1 p-1 rounded-lg bg-white/3",children:["1d","7d","30d"].map(c=>j.jsx("button",{type:"button",onClick:()=>n(c),className:`px-3 py-1.5 rounded-md text-xs font-medium ${r===c?"bg-white/10 text-[var(--color-foreground)]":"text-[var(--color-muted-foreground)]"}`,children:c},c))})]}),j.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4 mb-8",children:[j.jsx(Bf,{label:"Total Tokens",value:Ul(t.totals.inputTokens+t.totals.outputTokens)}),j.jsx(Bf,{label:"Input Tokens",value:Ul(t.totals.inputTokens)}),j.jsx(Bf,{label:"Output Tokens",value:Ul(t.totals.outputTokens)}),j.jsx(Bf,{label:"Est. Cost",value:`$${t.totals.estimatedCost.toFixed(4)}`})]}),j.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[j.jsxs("div",{className:"lg:col-span-2 glass-card p-4",children:[j.jsx("h3",{className:"text-sm font-semibold mb-4",children:"Tokens Over Time"}),a.length>0?j.jsx(EP,{width:"100%",height:250,children:j.jsxs(Ite,{data:a,children:[j.jsx("defs",{children:j.jsxs("linearGradient",{id:"colorTokens",x1:"0",y1:"0",x2:"0",y2:"1",children:[j.jsx("stop",{offset:"5%",stopColor:"#E43A9C",stopOpacity:.3}),j.jsx("stop",{offset:"95%",stopColor:"#E43A9C",stopOpacity:0})]})}),j.jsx(Gh,{dataKey:"date",tick:{fontSize:11,fill:"#9ca3af"},axisLine:!1,tickLine:!1}),j.jsx(Xh,{tick:{fontSize:11,fill:"#9ca3af"},axisLine:!1,tickLine:!1,tickFormatter:Ul}),j.jsx(vn,{contentStyle:{background:"#222",border:"1px solid #333",borderRadius:"8px",fontSize:"12px"},labelStyle:{color:"#9ca3af"}}),j.jsx(sa,{type:"monotone",dataKey:"tokens",stroke:"#E43A9C",fill:"url(#colorTokens)",strokeWidth:2})]})}):j.jsx("div",{className:"h-[250px] flex items-center justify-center text-[var(--color-muted-foreground)]",children:"No data for this period"})]}),j.jsxs("div",{className:"glass-card p-4",children:[j.jsx("h3",{className:"text-sm font-semibold mb-4",children:"By Model"}),u.length>0?j.jsxs(j.Fragment,{children:[j.jsx(EP,{width:"100%",height:180,children:j.jsxs(Rte,{children:[j.jsx(xi,{data:u,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:70,strokeWidth:0,children:u.map((c,f)=>{var p;return j.jsx(Sh,{fill:Df[f%Df.length]},(p=u[f])==null?void 0:p.name)})}),j.jsx(vn,{contentStyle:{background:"#222",border:"1px solid #333",borderRadius:"8px",fontSize:"12px"}})]})}),j.jsx("div",{className:"space-y-1 mt-2",children:u.map((c,f)=>j.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[j.jsx("span",{className:"w-2 h-2 rounded-full",style:{background:Df[f%Df.length]}}),j.jsx("span",{className:"text-[var(--color-muted-foreground)] truncate",children:c.name}),j.jsx("span",{className:"ml-auto font-mono",children:Ul(c.value)})]},c.name))})]}):j.jsx("div",{className:"h-[180px] flex items-center justify-center text-[var(--color-muted-foreground)]",children:"No data"})]})]})]})}function Bf({label:t,value:e}){return j.jsxs("div",{className:"glass-card p-4",children:[j.jsx("p",{className:"text-xs text-[var(--color-muted-foreground)]",children:t}),j.jsx("p",{className:"text-xl font-semibold mt-1",children:e})]})}function Ul(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t.toString()}function Nte(){const[t,e]=$.useState("shared"),[r,n]=$.useState([]),[i,a]=$.useState(null),[s,u]=$.useState(""),[c,f]=$.useState(!1),[p,h]=$.useState(""),[g,v]=$.useState(!1),[w,x]=$.useState("");$.useEffect(()=>{y()},[t]);function y(){Pt.get(`/wiki/${t}`).then(P=>n(P.pages)).catch(()=>n([]))}async function S(P){try{const O=await Pt.get(`/wiki/${t}/${P}`);u(O.content),a(P),f(!1)}catch{sr.error("Failed to load page")}}async function k(){if(i)try{await Pt.put(`/wiki/${t}/${i}`,{content:p}),u(p),f(!1),sr.success("Page saved")}catch{sr.error("Failed to save")}}async function E(){if(w.trim())try{await Pt.put(`/wiki/${t}/${w}`,{content:`# ${w}
334
+
335
+ `}),sr.success("Page created"),v(!1),x(""),y(),S(w)}catch{sr.error("Failed to create page")}}return j.jsxs("div",{className:"flex h-full",children:[j.jsxs("div",{className:"w-64 border-r border-[var(--color-border)] flex flex-col h-full",children:[j.jsx("header",{className:"h-14 flex items-center px-4 border-b border-[var(--color-border)] shrink-0",children:j.jsx("h1",{className:"text-lg font-semibold gradient-text",children:"Wiki"})}),j.jsx("div",{className:"flex gap-1 p-2 border-b border-[var(--color-border)]",children:["io","shared"].map(P=>j.jsx("button",{type:"button",onClick:()=>{e(P),a(null)},className:`px-2 py-1 rounded text-xs ${t===P?"bg-white/10 text-[var(--color-foreground)]":"text-[var(--color-muted-foreground)]"}`,children:P},P))}),j.jsx("div",{className:"flex-1 overflow-y-auto p-2",children:r.map(P=>j.jsxs("button",{type:"button",onClick:()=>S(P.name),className:`w-full text-left px-3 py-2 rounded-md text-sm flex items-center gap-2 transition-colors ${i===P.name?"bg-white/10":"hover:bg-white/5"}`,children:[j.jsx(GB,{size:14,className:"text-[var(--color-muted-foreground)]"}),P.name]},P.name))}),j.jsx("div",{className:"p-2 border-t border-[var(--color-border)]",children:g?j.jsxs("div",{className:"flex gap-1",children:[j.jsx("input",{type:"text",value:w,onChange:P=>x(P.target.value),placeholder:"page-name",className:"flex-1 px-2 py-1 rounded text-xs bg-[var(--color-input)] border border-[var(--color-border)] outline-none",onKeyDown:P=>P.key==="Enter"&&E()}),j.jsx("button",{type:"button",onClick:E,className:"px-2 py-1 rounded text-xs bg-[var(--color-accent)] text-white",children:"OK"})]}):j.jsxs("button",{type:"button",onClick:()=>v(!0),className:"w-full flex items-center gap-2 px-3 py-2 rounded-md text-xs text-[var(--color-muted-foreground)] hover:bg-white/5",children:[j.jsx(Xw,{size:14})," New page"]})})]}),j.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:i?j.jsxs(j.Fragment,{children:[j.jsxs("div",{className:"h-14 flex items-center px-6 border-b border-[var(--color-border)] justify-between shrink-0",children:[j.jsx("h2",{className:"font-semibold",children:i}),j.jsx("div",{className:"flex gap-2",children:c?j.jsxs("button",{type:"button",onClick:k,className:"flex items-center gap-1 px-3 py-1.5 rounded-md bg-[var(--color-accent)] text-white text-xs",children:[j.jsx(AR,{size:12})," Save"]}):j.jsx("button",{type:"button",onClick:()=>{f(!0),h(s)},className:"px-3 py-1.5 rounded-md bg-white/5 text-xs hover:bg-white/10",children:"Edit"})})]}),j.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:c?j.jsx("textarea",{value:p,onChange:P=>h(P.target.value),className:"w-full h-full bg-transparent font-mono text-sm outline-none resize-none"}):j.jsx("div",{className:"prose-io",dangerouslySetInnerHTML:{__html:Ve.parse(s)}})})]}):j.jsx("div",{className:"h-full flex items-center justify-center text-[var(--color-muted-foreground)]",children:j.jsxs("div",{className:"text-center",children:[j.jsx(OR,{size:48,className:"mx-auto mb-3 opacity-30"}),j.jsx("p",{children:"Select a page to view"})]})})})]})}function Mte({children:t}){const{session:e,supabase:r,loading:n}=QR();return n?j.jsx("div",{className:"min-h-screen flex items-center justify-center text-[var(--color-muted-foreground)]",children:"Loading..."}):r?e?j.jsx(j.Fragment,{children:t}):j.jsx(u5,{}):j.jsx(j.Fragment,{children:t})}function Lte(){return j.jsxs(y8,{children:[j.jsx("div",{className:"orb orb-1"}),j.jsx("div",{className:"orb orb-2"}),j.jsx("div",{className:"orb orb-3"}),j.jsx(Mte,{children:j.jsx(ND,{children:j.jsxs(Jr,{element:j.jsx(p4,{}),children:[j.jsx(Jr,{index:!0,element:j.jsx(s5,{})}),j.jsx(Jr,{path:"squads",element:j.jsx(Kk,{})}),j.jsx(Jr,{path:"squads/:name",element:j.jsx(Kk,{})}),j.jsx(Jr,{path:"feed",element:j.jsx(l5,{})}),j.jsx(Jr,{path:"skills",element:j.jsx(d5,{})}),j.jsx(Jr,{path:"schedules",element:j.jsx(c5,{})}),j.jsx(Jr,{path:"wiki",element:j.jsx(Nte,{})}),j.jsx(Jr,{path:"settings",element:j.jsx(f5,{})}),j.jsx(Jr,{path:"usage",element:j.jsx($te,{})}),j.jsx(Jr,{path:"*",element:j.jsx(RD,{to:"/",replace:!0})})]})})})]})}RL.createRoot(document.getElementById("root")).render(j.jsx($.StrictMode,{children:j.jsxs(a3,{children:[j.jsx(Lte,{}),j.jsx(z3,{theme:"dark",position:"bottom-right"})]})}));
336
+ //# sourceMappingURL=index-2RY89H3W.js.map