heyio 3.1.1 → 3.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/routes/config.js +4 -4
- package/dist/api/routes/config.js.map +1 -1
- package/dist/api/routes/health.d.ts.map +1 -1
- package/dist/api/routes/health.js +17 -3
- package/dist/api/routes/health.js.map +1 -1
- package/dist/api/routes/wiki.js +20 -7
- package/dist/api/routes/wiki.js.map +1 -1
- package/dist/copilot/orchestrator.d.ts.map +1 -1
- package/dist/copilot/orchestrator.js +16 -0
- package/dist/copilot/orchestrator.js.map +1 -1
- package/dist/copilot/tools.d.ts +18 -0
- package/dist/copilot/tools.d.ts.map +1 -1
- package/dist/copilot/tools.js +135 -3
- package/dist/copilot/tools.js.map +1 -1
- package/dist/squad/agent.d.ts.map +1 -1
- package/dist/squad/agent.js +13 -0
- package/dist/squad/agent.js.map +1 -1
- package/dist/store/db.d.ts.map +1 -1
- package/dist/store/db.js +25 -1
- package/dist/store/db.js.map +1 -1
- package/dist/store/inbox.d.ts +3 -3
- package/dist/store/inbox.d.ts.map +1 -1
- package/dist/store/inbox.js +2 -2
- package/dist/store/inbox.js.map +1 -1
- package/dist/wiki/index.d.ts +1 -1
- package/dist/wiki/index.d.ts.map +1 -1
- package/dist/wiki/index.js +1 -1
- package/dist/wiki/index.js.map +1 -1
- package/dist/wiki/store.d.ts +4 -0
- package/dist/wiki/store.d.ts.map +1 -1
- package/dist/wiki/store.js +13 -2
- package/dist/wiki/store.js.map +1 -1
- package/node_modules/@io/shared/dist/types/events.d.ts +1 -1
- package/node_modules/@io/shared/dist/types/events.d.ts.map +1 -1
- package/node_modules/@io/shared/package.json +1 -1
- package/node_modules/@io/shared/src/types/events.ts +1 -1
- package/node_modules/@io/shared/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/public/assets/index-D1hU_jFl.js +491 -0
- package/public/assets/index-D1hU_jFl.js.map +1 -0
- package/public/assets/index-DjqmmXrU.css +1 -0
- package/public/index.html +2 -2
- package/public/assets/index-V-sj6VMY.js +0 -480
- package/public/assets/index-V-sj6VMY.js.map +0 -1
- package/public/assets/index-kxj8i2cu.css +0 -1
|
@@ -1,480 +0,0 @@
|
|
|
1
|
-
var Z3=Object.defineProperty;var eL=(t,e,r)=>e in t?Z3(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Qe=(t,e,r)=>eL(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 yf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Je(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Hm={exports:{}},jl={},Wm={exports:{}},ze={};/**
|
|
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 ek;function tL(){if(ek)return ze;ek=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(I){return I===null||typeof I!="object"?null:(I=h&&I[h]||I["@@iterator"],typeof I=="function"?I:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,x={};function y(I,U,ee){this.props=I,this.context=U,this.refs=x,this.updater=ee||v}y.prototype.isReactComponent={},y.prototype.setState=function(I,U){if(typeof I!="object"&&typeof I!="function"&&I!=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,I,U,"setState")},y.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function S(){}S.prototype=y.prototype;function O(I,U,ee){this.props=I,this.context=U,this.refs=x,this.updater=ee||v}var A=O.prototype=new S;A.constructor=O,w(A,y.prototype),A.isPureReactComponent=!0;var T=Array.isArray,E=Object.prototype.hasOwnProperty,P={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function $(I,U,ee){var se,ue={},de=null,Re=null;if(U!=null)for(se in U.ref!==void 0&&(Re=U.ref),U.key!==void 0&&(de=""+U.key),U)E.call(U,se)&&!C.hasOwnProperty(se)&&(ue[se]=U[se]);var pe=arguments.length-2;if(pe===1)ue.children=ee;else if(1<pe){for(var ne=Array(pe),_e=0;_e<pe;_e++)ne[_e]=arguments[_e+2];ue.children=ne}if(I&&I.defaultProps)for(se in pe=I.defaultProps,pe)ue[se]===void 0&&(ue[se]=pe[se]);return{$$typeof:t,type:I,key:de,ref:Re,props:ue,_owner:P.current}}function D(I,U){return{$$typeof:t,type:I.type,key:U,ref:I.ref,props:I.props,_owner:I._owner}}function W(I){return typeof I=="object"&&I!==null&&I.$$typeof===t}function N(I){var U={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(ee){return U[ee]})}var L=/\/+/g;function z(I,U){return typeof I=="object"&&I!==null&&I.key!=null?N(""+I.key):U.toString(36)}function K(I,U,ee,se,ue){var de=typeof I;(de==="undefined"||de==="boolean")&&(I=null);var Re=!1;if(I===null)Re=!0;else switch(de){case"string":case"number":Re=!0;break;case"object":switch(I.$$typeof){case t:case e:Re=!0}}if(Re)return Re=I,ue=ue(Re),I=se===""?"."+z(Re,0):se,T(ue)?(ee="",I!=null&&(ee=I.replace(L,"$&/")+"/"),K(ue,U,ee,"",function(_e){return _e})):ue!=null&&(W(ue)&&(ue=D(ue,ee+(!ue.key||Re&&Re.key===ue.key?"":(""+ue.key).replace(L,"$&/")+"/")+I)),U.push(ue)),1;if(Re=0,se=se===""?".":se+":",T(I))for(var pe=0;pe<I.length;pe++){de=I[pe];var ne=se+z(de,pe);Re+=K(de,U,ee,ne,ue)}else if(ne=g(I),typeof ne=="function")for(I=ne.call(I),pe=0;!(de=I.next()).done;)de=de.value,ne=se+z(de,pe++),Re+=K(de,U,ee,ne,ue);else if(de==="object")throw U=String(I),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.");return Re}function V(I,U,ee){if(I==null)return I;var se=[],ue=0;return K(I,se,"","",function(de){return U.call(ee,de,ue++)}),se}function X(I){if(I._status===-1){var U=I._result;U=U(),U.then(function(ee){(I._status===0||I._status===-1)&&(I._status=1,I._result=ee)},function(ee){(I._status===0||I._status===-1)&&(I._status=2,I._result=ee)}),I._status===-1&&(I._status=0,I._result=U)}if(I._status===1)return I._result.default;throw I._result}var Q={current:null},G={transition:null},te={ReactCurrentDispatcher:Q,ReactCurrentBatchConfig:G,ReactCurrentOwner:P};function F(){throw Error("act(...) is not supported in production builds of React.")}return ze.Children={map:V,forEach:function(I,U,ee){V(I,function(){U.apply(this,arguments)},ee)},count:function(I){var U=0;return V(I,function(){U++}),U},toArray:function(I){return V(I,function(U){return U})||[]},only:function(I){if(!W(I))throw Error("React.Children.only expected to receive a single React element child.");return I}},ze.Component=y,ze.Fragment=r,ze.Profiler=i,ze.PureComponent=O,ze.StrictMode=n,ze.Suspense=c,ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=te,ze.act=F,ze.cloneElement=function(I,U,ee){if(I==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+I+".");var se=w({},I.props),ue=I.key,de=I.ref,Re=I._owner;if(U!=null){if(U.ref!==void 0&&(de=U.ref,Re=P.current),U.key!==void 0&&(ue=""+U.key),I.type&&I.type.defaultProps)var pe=I.type.defaultProps;for(ne in U)E.call(U,ne)&&!C.hasOwnProperty(ne)&&(se[ne]=U[ne]===void 0&&pe!==void 0?pe[ne]:U[ne])}var ne=arguments.length-2;if(ne===1)se.children=ee;else if(1<ne){pe=Array(ne);for(var _e=0;_e<ne;_e++)pe[_e]=arguments[_e+2];se.children=pe}return{$$typeof:t,type:I.type,key:ue,ref:de,props:se,_owner:Re}},ze.createContext=function(I){return I={$$typeof:s,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},I.Provider={$$typeof:a,_context:I},I.Consumer=I},ze.createElement=$,ze.createFactory=function(I){var U=$.bind(null,I);return U.type=I,U},ze.createRef=function(){return{current:null}},ze.forwardRef=function(I){return{$$typeof:u,render:I}},ze.isValidElement=W,ze.lazy=function(I){return{$$typeof:p,_payload:{_status:-1,_result:I},_init:X}},ze.memo=function(I,U){return{$$typeof:f,type:I,compare:U===void 0?null:U}},ze.startTransition=function(I){var U=G.transition;G.transition={};try{I()}finally{G.transition=U}},ze.unstable_act=F,ze.useCallback=function(I,U){return Q.current.useCallback(I,U)},ze.useContext=function(I){return Q.current.useContext(I)},ze.useDebugValue=function(){},ze.useDeferredValue=function(I){return Q.current.useDeferredValue(I)},ze.useEffect=function(I,U){return Q.current.useEffect(I,U)},ze.useId=function(){return Q.current.useId()},ze.useImperativeHandle=function(I,U,ee){return Q.current.useImperativeHandle(I,U,ee)},ze.useInsertionEffect=function(I,U){return Q.current.useInsertionEffect(I,U)},ze.useLayoutEffect=function(I,U){return Q.current.useLayoutEffect(I,U)},ze.useMemo=function(I,U){return Q.current.useMemo(I,U)},ze.useReducer=function(I,U,ee){return Q.current.useReducer(I,U,ee)},ze.useRef=function(I){return Q.current.useRef(I)},ze.useState=function(I){return Q.current.useState(I)},ze.useSyncExternalStore=function(I,U,ee){return Q.current.useSyncExternalStore(I,U,ee)},ze.useTransition=function(){return Q.current.useTransition()},ze.version="18.3.1",ze}var tk;function ex(){return tk||(tk=1,Wm.exports=tL()),Wm.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 rk;function rL(){if(rk)return jl;rk=1;var t=ex(),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 jl.Fragment=r,jl.jsx=s,jl.jsxs=s,jl}var nk;function nL(){return nk||(nk=1,Hm.exports=rL()),Hm.exports}var k=nL(),R=ex();const M=Je(R);var bf={},Vm={exports:{}},xr={},Km={exports:{}},Gm={};/**
|
|
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 ik;function iL(){return ik||(ik=1,(function(t){function e(G,te){var F=G.length;G.push(te);e:for(;0<F;){var I=F-1>>>1,U=G[I];if(0<i(U,te))G[I]=te,G[F]=U,F=I;else break e}}function r(G){return G.length===0?null:G[0]}function n(G){if(G.length===0)return null;var te=G[0],F=G.pop();if(F!==te){G[0]=F;e:for(var I=0,U=G.length,ee=U>>>1;I<ee;){var se=2*(I+1)-1,ue=G[se],de=se+1,Re=G[de];if(0>i(ue,F))de<U&&0>i(Re,ue)?(G[I]=Re,G[de]=F,I=de):(G[I]=ue,G[se]=F,I=se);else if(de<U&&0>i(Re,F))G[I]=Re,G[de]=F,I=de;else break e}}return te}function i(G,te){var F=G.sortIndex-te.sortIndex;return F!==0?F:G.id-te.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,O=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(G){for(var te=r(f);te!==null;){if(te.callback===null)n(f);else if(te.startTime<=G)n(f),te.sortIndex=te.expirationTime,e(c,te);else break;te=r(f)}}function T(G){if(x=!1,A(G),!w)if(r(c)!==null)w=!0,X(E);else{var te=r(f);te!==null&&Q(T,te.startTime-G)}}function E(G,te){w=!1,x&&(x=!1,S($),$=-1),v=!0;var F=g;try{for(A(te),h=r(c);h!==null&&(!(h.expirationTime>te)||G&&!N());){var I=h.callback;if(typeof I=="function"){h.callback=null,g=h.priorityLevel;var U=I(h.expirationTime<=te);te=t.unstable_now(),typeof U=="function"?h.callback=U:h===r(c)&&n(c),A(te)}else n(c);h=r(c)}if(h!==null)var ee=!0;else{var se=r(f);se!==null&&Q(T,se.startTime-te),ee=!1}return ee}finally{h=null,g=F,v=!1}}var P=!1,C=null,$=-1,D=5,W=-1;function N(){return!(t.unstable_now()-W<D)}function L(){if(C!==null){var G=t.unstable_now();W=G;var te=!0;try{te=C(!0,G)}finally{te?z():(P=!1,C=null)}}else P=!1}var z;if(typeof O=="function")z=function(){O(L)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,V=K.port2;K.port1.onmessage=L,z=function(){V.postMessage(null)}}else z=function(){y(L,0)};function X(G){C=G,P||(P=!0,z())}function Q(G,te){$=y(function(){G(t.unstable_now())},te)}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,X(E))},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"):D=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 te=3;break;default:te=g}var F=g;g=te;try{return G()}finally{g=F}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(G,te){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var F=g;g=G;try{return te()}finally{g=F}},t.unstable_scheduleCallback=function(G,te,F){var I=t.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?I+F:I):F=I,G){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=F+U,G={id:p++,callback:te,priorityLevel:G,startTime:F,expirationTime:U,sortIndex:-1},F>I?(G.sortIndex=F,e(f,G),r(c)===null&&G===r(f)&&(x?(S($),$=-1):x=!0,Q(T,F-I))):(G.sortIndex=U,e(c,G),w||v||(w=!0,X(E))),G},t.unstable_shouldYield=N,t.unstable_wrapCallback=function(G){var te=g;return function(){var F=g;g=te;try{return G.apply(this,arguments)}finally{g=F}}}})(Gm)),Gm}var ak;function aL(){return ak||(ak=1,Km.exports=iL()),Km.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 ok;function oL(){if(ok)return xr;ok=1;var t=ex(),e=aL();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,_,j){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=j}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 O(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,O);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,O);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,O);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 A(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 T=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=Symbol.for("react.element"),P=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),$=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),W=Symbol.for("react.provider"),N=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),Q=Symbol.for("react.offscreen"),G=Symbol.iterator;function te(o){return o===null||typeof o!="object"?null:(o=G&&o[G]||o["@@iterator"],typeof o=="function"?o:null)}var F=Object.assign,I;function U(o){if(I===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);I=l&&l[1]||""}return`
|
|
34
|
-
`+I+o}var ee=!1;function se(o,l){if(!o||ee)return"";ee=!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(Z){var m=Z}Reflect.construct(o,[],l)}else{try{l.call()}catch(Z){m=Z}o.call(l.prototype)}else{try{throw Error()}catch(Z){m=Z}o()}}catch(Z){if(Z&&m&&typeof Z.stack=="string"){for(var b=Z.stack.split(`
|
|
35
|
-
`),_=m.stack.split(`
|
|
36
|
-
`),j=b.length-1,B=_.length-1;1<=j&&0<=B&&b[j]!==_[B];)B--;for(;1<=j&&0<=B;j--,B--)if(b[j]!==_[B]){if(j!==1||B!==1)do if(j--,B--,0>B||b[j]!==_[B]){var q=`
|
|
37
|
-
`+b[j].replace(" at new "," at ");return o.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",o.displayName)),q}while(1<=j&&0<=B);break}}}finally{ee=!1,Error.prepareStackTrace=d}return(o=o?o.displayName||o.name:"")?U(o):""}function ue(o){switch(o.tag){case 5:return U(o.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return o=se(o.type,!1),o;case 11:return o=se(o.type.render,!1),o;case 1:return o=se(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 P:return"Portal";case D:return"Profiler";case $:return"StrictMode";case z:return"Suspense";case K:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case N:return(o.displayName||"Context")+".Consumer";case W:return(o._context.displayName||"Context")+".Provider";case L: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 X: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===$?"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(j){m=""+j,_.call(this,j)}}),Object.defineProperty(o,l,{enumerable:d.enumerable}),{getValue:function(){return m},setValue:function(j){m=""+j},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 He(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 Ne(o,l){var d=l.checked;return F({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??o._wrapperState.initialChecked})}function dt(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 st(o,l){l=l.checked,l!=null&&A(o,"checked",l,!1)}function ht(o,l){st(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")?Et(o,l.type,d):l.hasOwnProperty("defaultValue")&&Et(o,l.type,pe(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(o.defaultChecked=!!l.defaultChecked)}function mr(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 Et(o,l,d){(l!=="number"||He(o.ownerDocument)!==o)&&(d==null?o.defaultValue=""+o._wrapperState.initialValue:o.defaultValue!==""+d&&(o.defaultValue=""+d))}var Br=Array.isArray;function tr(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 lt(o,l){if(l.dangerouslySetInnerHTML!=null)throw Error(r(91));return F({},l,{value:void 0,defaultValue:void 0,children:""+o._wrapperState.initialValue})}function Ar(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(Br(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 fa(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 da(o){var l=o.textContent;l===o._wrapperState.initialValue&&l!==""&&l!==null&&(o.value=l)}function ha(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 Vs(o,l){return o==null||o==="http://www.w3.org/1999/xhtml"?ha(l):o==="http://www.w3.org/2000/svg"&&l==="foreignObject"?"http://www.w3.org/1999/xhtml":o}var pa,uo=(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(pa=pa||document.createElement("div"),pa.innerHTML="<svg>"+l.valueOf().toString()+"</svg>",l=pa.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;l.firstChild;)o.appendChild(l.firstChild)}});function zr(o,l){if(l){var d=o.firstChild;if(d&&d===o.lastChild&&d.nodeType===3){d.nodeValue=l;return}}o.textContent=l}var ki={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},Oi=["Webkit","ms","Moz","O"];Object.keys(ki).forEach(function(o){Oi.forEach(function(l){l=l+o.charAt(0).toUpperCase()+o.substring(1),ki[l]=ki[o]})});function uc(o,l,d){return l==null||typeof l=="boolean"||l===""?"":d||typeof l!="number"||l===0||ki.hasOwnProperty(o)&&ki[o]?(""+l).trim():l+"px"}function cc(o,l){o=o.style;for(var d in l)if(l.hasOwnProperty(d)){var m=d.indexOf("--")===0,b=uc(d,l[d],m);d==="float"&&(d="cssFloat"),m?o.setProperty(d,b):o[d]=b}}var fc=F({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 co(o,l){if(l){if(fc[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 Ks(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 ma=null;function qr(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Gs=null,Ei=null,Kn=null;function Xs(o){if(o=ml(o)){if(typeof Gs!="function")throw Error(r(280));var l=o.stateNode;l&&(l=Rc(l),Gs(o.stateNode,o.type,l))}}function Me(o){Ei?Kn?Kn.push(o):Kn=[o]:Ei=o}function St(){if(Ei){var o=Ei,l=Kn;if(Kn=Ei=null,Xs(o),l)for(o=0;o<l.length;o++)Xs(l[o])}}function Rt(o,l){return o(l)}function rr(){}var Ai=!1;function At(o,l,d){if(Ai)return o(l,d);Ai=!0;try{return Rt(o,l,d)}finally{Ai=!1,(Ei!==null||Kn!==null)&&(rr(),St())}}function qt(o,l){var d=o.stateNode;if(d===null)return null;var m=Rc(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 Pi=!1;if(u)try{var Xt={};Object.defineProperty(Xt,"passive",{get:function(){Pi=!0}}),window.addEventListener("test",Xt,Xt),window.removeEventListener("test",Xt,Xt)}catch{Pi=!1}function Pr(o,l,d,m,b,_,j,B,q){var Z=Array.prototype.slice.call(arguments,3);try{l.apply(d,Z)}catch(oe){this.onError(oe)}}var Ti=!1,Ur=null,Ys=!1,up=null,oM={onError:function(o){Ti=!0,Ur=o}};function sM(o,l,d,m,b,_,j,B,q){Ti=!1,Ur=null,Pr.apply(oM,arguments)}function lM(o,l,d,m,b,_,j,B,q){if(sM.apply(this,arguments),Ti){if(Ti){var Z=Ur;Ti=!1,Ur=null}else throw Error(r(198));Ys||(Ys=!0,up=Z)}}function ga(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 S1(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 k1(o){if(ga(o)!==o)throw Error(r(188))}function uM(o){var l=o.alternate;if(!l){if(l=ga(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 k1(b),o;if(_===m)return k1(b),l;_=_.sibling}throw Error(r(188))}if(d.return!==m.return)d=b,m=_;else{for(var j=!1,B=b.child;B;){if(B===d){j=!0,d=b,m=_;break}if(B===m){j=!0,m=b,d=_;break}B=B.sibling}if(!j){for(B=_.child;B;){if(B===d){j=!0,d=_,m=b;break}if(B===m){j=!0,m=_,d=b;break}B=B.sibling}if(!j)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 O1(o){return o=uM(o),o!==null?E1(o):null}function E1(o){if(o.tag===5||o.tag===6)return o;for(o=o.child;o!==null;){var l=E1(o);if(l!==null)return l;o=o.sibling}return null}var A1=e.unstable_scheduleCallback,P1=e.unstable_cancelCallback,cM=e.unstable_shouldYield,fM=e.unstable_requestPaint,kt=e.unstable_now,dM=e.unstable_getCurrentPriorityLevel,cp=e.unstable_ImmediatePriority,T1=e.unstable_UserBlockingPriority,dc=e.unstable_NormalPriority,hM=e.unstable_LowPriority,j1=e.unstable_IdlePriority,hc=null,Pn=null;function pM(o){if(Pn&&typeof Pn.onCommitFiberRoot=="function")try{Pn.onCommitFiberRoot(hc,o,void 0,(o.current.flags&128)===128)}catch{}}var sn=Math.clz32?Math.clz32:vM,mM=Math.log,gM=Math.LN2;function vM(o){return o>>>=0,o===0?32:31-(mM(o)/gM|0)|0}var pc=64,mc=4194304;function Js(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 gc(o,l){var d=o.pendingLanes;if(d===0)return 0;var m=0,b=o.suspendedLanes,_=o.pingedLanes,j=d&268435455;if(j!==0){var B=j&~b;B!==0?m=Js(B):(_&=j,_!==0&&(m=Js(_)))}else j=d&~b,j!==0?m=Js(j):_!==0&&(m=Js(_));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-sn(l),b=1<<d,m|=o[d],l&=~b;return m}function yM(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 bM(o,l){for(var d=o.suspendedLanes,m=o.pingedLanes,b=o.expirationTimes,_=o.pendingLanes;0<_;){var j=31-sn(_),B=1<<j,q=b[j];q===-1?((B&d)===0||(B&m)!==0)&&(b[j]=yM(B,l)):q<=l&&(o.expiredLanes|=B),_&=~B}}function fp(o){return o=o.pendingLanes&-1073741825,o!==0?o:o&1073741824?1073741824:0}function C1(){var o=pc;return pc<<=1,(pc&4194240)===0&&(pc=64),o}function dp(o){for(var l=[],d=0;31>d;d++)l.push(o);return l}function Qs(o,l,d){o.pendingLanes|=l,l!==536870912&&(o.suspendedLanes=0,o.pingedLanes=0),o=o.eventTimes,l=31-sn(l),o[l]=d}function wM(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-sn(d),_=1<<b;l[b]=0,m[b]=-1,o[b]=-1,d&=~_}}function hp(o,l){var d=o.entangledLanes|=l;for(o=o.entanglements;d;){var m=31-sn(d),b=1<<m;b&l|o[m]&l&&(o[m]|=l),d&=~b}}var Ye=0;function R1(o){return o&=-o,1<o?4<o?(o&268435455)!==0?16:536870912:4:1}var N1,pp,$1,I1,M1,mp=!1,vc=[],ji=null,Ci=null,Ri=null,Zs=new Map,el=new Map,Ni=[],xM="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 L1(o,l){switch(o){case"focusin":case"focusout":ji=null;break;case"dragenter":case"dragleave":Ci=null;break;case"mouseover":case"mouseout":Ri=null;break;case"pointerover":case"pointerout":Zs.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":el.delete(l.pointerId)}}function tl(o,l,d,m,b,_){return o===null||o.nativeEvent!==_?(o={blockedOn:l,domEventName:d,eventSystemFlags:m,nativeEvent:_,targetContainers:[b]},l!==null&&(l=ml(l),l!==null&&pp(l)),o):(o.eventSystemFlags|=m,l=o.targetContainers,b!==null&&l.indexOf(b)===-1&&l.push(b),o)}function _M(o,l,d,m,b){switch(l){case"focusin":return ji=tl(ji,o,l,d,m,b),!0;case"dragenter":return Ci=tl(Ci,o,l,d,m,b),!0;case"mouseover":return Ri=tl(Ri,o,l,d,m,b),!0;case"pointerover":var _=b.pointerId;return Zs.set(_,tl(Zs.get(_)||null,o,l,d,m,b)),!0;case"gotpointercapture":return _=b.pointerId,el.set(_,tl(el.get(_)||null,o,l,d,m,b)),!0}return!1}function D1(o){var l=va(o.target);if(l!==null){var d=ga(l);if(d!==null){if(l=d.tag,l===13){if(l=S1(d),l!==null){o.blockedOn=l,M1(o.priority,function(){$1(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 yc(o){if(o.blockedOn!==null)return!1;for(var l=o.targetContainers;0<l.length;){var d=vp(o.domEventName,o.eventSystemFlags,l[0],o.nativeEvent);if(d===null){d=o.nativeEvent;var m=new d.constructor(d.type,d);ma=m,d.target.dispatchEvent(m),ma=null}else return l=ml(d),l!==null&&pp(l),o.blockedOn=d,!1;l.shift()}return!0}function B1(o,l,d){yc(o)&&d.delete(l)}function SM(){mp=!1,ji!==null&&yc(ji)&&(ji=null),Ci!==null&&yc(Ci)&&(Ci=null),Ri!==null&&yc(Ri)&&(Ri=null),Zs.forEach(B1),el.forEach(B1)}function rl(o,l){o.blockedOn===l&&(o.blockedOn=null,mp||(mp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,SM)))}function nl(o){function l(b){return rl(b,o)}if(0<vc.length){rl(vc[0],o);for(var d=1;d<vc.length;d++){var m=vc[d];m.blockedOn===o&&(m.blockedOn=null)}}for(ji!==null&&rl(ji,o),Ci!==null&&rl(Ci,o),Ri!==null&&rl(Ri,o),Zs.forEach(l),el.forEach(l),d=0;d<Ni.length;d++)m=Ni[d],m.blockedOn===o&&(m.blockedOn=null);for(;0<Ni.length&&(d=Ni[0],d.blockedOn===null);)D1(d),d.blockedOn===null&&Ni.shift()}var fo=T.ReactCurrentBatchConfig,bc=!0;function kM(o,l,d,m){var b=Ye,_=fo.transition;fo.transition=null;try{Ye=1,gp(o,l,d,m)}finally{Ye=b,fo.transition=_}}function OM(o,l,d,m){var b=Ye,_=fo.transition;fo.transition=null;try{Ye=4,gp(o,l,d,m)}finally{Ye=b,fo.transition=_}}function gp(o,l,d,m){if(bc){var b=vp(o,l,d,m);if(b===null)$p(o,l,m,wc,d),L1(o,m);else if(_M(b,o,l,d,m))m.stopPropagation();else if(L1(o,m),l&4&&-1<xM.indexOf(o)){for(;b!==null;){var _=ml(b);if(_!==null&&N1(_),_=vp(o,l,d,m),_===null&&$p(o,l,m,wc,d),_===b)break;b=_}b!==null&&m.stopPropagation()}else $p(o,l,m,null,d)}}var wc=null;function vp(o,l,d,m){if(wc=null,o=qr(m),o=va(o),o!==null)if(l=ga(o),l===null)o=null;else if(d=l.tag,d===13){if(o=S1(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 wc=o,null}function z1(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(dM()){case cp:return 1;case T1:return 4;case dc:case hM:return 16;case j1:return 536870912;default:return 16}default:return 16}}var $i=null,yp=null,xc=null;function q1(){if(xc)return xc;var o,l=yp,d=l.length,m,b="value"in $i?$i.value:$i.textContent,_=b.length;for(o=0;o<d&&l[o]===b[o];o++);var j=d-o;for(m=1;m<=j&&l[d-m]===b[_-m];m++);return xc=b.slice(o,1<m?1-m:void 0)}function _c(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 Sc(){return!0}function U1(){return!1}function Tr(o){function l(d,m,b,_,j){this._reactName=d,this._targetInst=b,this.type=m,this.nativeEvent=_,this.target=j,this.currentTarget=null;for(var B in o)o.hasOwnProperty(B)&&(d=o[B],this[B]=d?d(_):_[B]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?Sc:U1,this.isPropagationStopped=U1,this}return F(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=Sc)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=Sc)},persist:function(){},isPersistent:Sc}),l}var ho={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bp=Tr(ho),il=F({},ho,{view:0,detail:0}),EM=Tr(il),wp,xp,al,kc=F({},il,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sp,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!==al&&(al&&o.type==="mousemove"?(wp=o.screenX-al.screenX,xp=o.screenY-al.screenY):xp=wp=0,al=o),wp)},movementY:function(o){return"movementY"in o?o.movementY:xp}}),F1=Tr(kc),AM=F({},kc,{dataTransfer:0}),PM=Tr(AM),TM=F({},il,{relatedTarget:0}),_p=Tr(TM),jM=F({},ho,{animationName:0,elapsedTime:0,pseudoElement:0}),CM=Tr(jM),RM=F({},ho,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),NM=Tr(RM),$M=F({},ho,{data:0}),H1=Tr($M),IM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},MM={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"},LM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function DM(o){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(o):(o=LM[o])?!!l[o]:!1}function Sp(){return DM}var BM=F({},il,{key:function(o){if(o.key){var l=IM[o.key]||o.key;if(l!=="Unidentified")return l}return o.type==="keypress"?(o=_c(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?MM[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sp,charCode:function(o){return o.type==="keypress"?_c(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?_c(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),zM=Tr(BM),qM=F({},kc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),W1=Tr(qM),UM=F({},il,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sp}),FM=Tr(UM),HM=F({},ho,{propertyName:0,elapsedTime:0,pseudoElement:0}),WM=Tr(HM),VM=F({},kc,{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}),KM=Tr(VM),GM=[9,13,27,32],kp=u&&"CompositionEvent"in window,ol=null;u&&"documentMode"in document&&(ol=document.documentMode);var XM=u&&"TextEvent"in window&&!ol,V1=u&&(!kp||ol&&8<ol&&11>=ol),K1=" ",G1=!1;function X1(o,l){switch(o){case"keyup":return GM.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Y1(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var po=!1;function YM(o,l){switch(o){case"compositionend":return Y1(l);case"keypress":return l.which!==32?null:(G1=!0,K1);case"textInput":return o=l.data,o===K1&&G1?null:o;default:return null}}function JM(o,l){if(po)return o==="compositionend"||!kp&&X1(o,l)?(o=q1(),xc=yp=$i=null,po=!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 V1&&l.locale!=="ko"?null:l.data;default:return null}}var QM={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 J1(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l==="input"?!!QM[o.type]:l==="textarea"}function Q1(o,l,d,m){Me(m),l=Tc(l,"onChange"),0<l.length&&(d=new bp("onChange","change",null,d,m),o.push({event:d,listeners:l}))}var sl=null,ll=null;function ZM(o){g_(o,0)}function Oc(o){var l=bo(o);if(ie(l))return o}function e3(o,l){if(o==="change")return l}var Z1=!1;if(u){var Op;if(u){var Ep="oninput"in document;if(!Ep){var e_=document.createElement("div");e_.setAttribute("oninput","return;"),Ep=typeof e_.oninput=="function"}Op=Ep}else Op=!1;Z1=Op&&(!document.documentMode||9<document.documentMode)}function t_(){sl&&(sl.detachEvent("onpropertychange",r_),ll=sl=null)}function r_(o){if(o.propertyName==="value"&&Oc(ll)){var l=[];Q1(l,ll,o,qr(o)),At(ZM,l)}}function t3(o,l,d){o==="focusin"?(t_(),sl=l,ll=d,sl.attachEvent("onpropertychange",r_)):o==="focusout"&&t_()}function r3(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return Oc(ll)}function n3(o,l){if(o==="click")return Oc(l)}function i3(o,l){if(o==="input"||o==="change")return Oc(l)}function a3(o,l){return o===l&&(o!==0||1/o===1/l)||o!==o&&l!==l}var ln=typeof Object.is=="function"?Object.is:a3;function ul(o,l){if(ln(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)||!ln(o[b],l[b]))return!1}return!0}function n_(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function i_(o,l){var d=n_(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=n_(d)}}function a_(o,l){return o&&l?o===l?!0:o&&o.nodeType===3?!1:l&&l.nodeType===3?a_(o,l.parentNode):"contains"in o?o.contains(l):o.compareDocumentPosition?!!(o.compareDocumentPosition(l)&16):!1:!1}function o_(){for(var o=window,l=He();l instanceof o.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)o=l.contentWindow;else break;l=He(o.document)}return l}function Ap(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 o3(o){var l=o_(),d=o.focusedElem,m=o.selectionRange;if(l!==d&&d&&d.ownerDocument&&a_(d.ownerDocument.documentElement,d)){if(m!==null&&Ap(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=i_(d,_);var j=i_(d,m);b&&j&&(o.rangeCount!==1||o.anchorNode!==b.node||o.anchorOffset!==b.offset||o.focusNode!==j.node||o.focusOffset!==j.offset)&&(l=l.createRange(),l.setStart(b.node,b.offset),o.removeAllRanges(),_>m?(o.addRange(l),o.extend(j.node,j.offset)):(l.setEnd(j.node,j.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 s3=u&&"documentMode"in document&&11>=document.documentMode,mo=null,Pp=null,cl=null,Tp=!1;function s_(o,l,d){var m=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;Tp||mo==null||mo!==He(m)||(m=mo,"selectionStart"in m&&Ap(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}),cl&&ul(cl,m)||(cl=m,m=Tc(Pp,"onSelect"),0<m.length&&(l=new bp("onSelect","select",null,l,d),o.push({event:l,listeners:m}),l.target=mo)))}function Ec(o,l){var d={};return d[o.toLowerCase()]=l.toLowerCase(),d["Webkit"+o]="webkit"+l,d["Moz"+o]="moz"+l,d}var go={animationend:Ec("Animation","AnimationEnd"),animationiteration:Ec("Animation","AnimationIteration"),animationstart:Ec("Animation","AnimationStart"),transitionend:Ec("Transition","TransitionEnd")},jp={},l_={};u&&(l_=document.createElement("div").style,"AnimationEvent"in window||(delete go.animationend.animation,delete go.animationiteration.animation,delete go.animationstart.animation),"TransitionEvent"in window||delete go.transitionend.transition);function Ac(o){if(jp[o])return jp[o];if(!go[o])return o;var l=go[o],d;for(d in l)if(l.hasOwnProperty(d)&&d in l_)return jp[o]=l[d];return o}var u_=Ac("animationend"),c_=Ac("animationiteration"),f_=Ac("animationstart"),d_=Ac("transitionend"),h_=new Map,p_="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){h_.set(o,l),a(l,[o])}for(var Cp=0;Cp<p_.length;Cp++){var Rp=p_[Cp],l3=Rp.toLowerCase(),u3=Rp[0].toUpperCase()+Rp.slice(1);Ii(l3,"on"+u3)}Ii(u_,"onAnimationEnd"),Ii(c_,"onAnimationIteration"),Ii(f_,"onAnimationStart"),Ii("dblclick","onDoubleClick"),Ii("focusin","onFocus"),Ii("focusout","onBlur"),Ii(d_,"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 fl="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(" "),c3=new Set("cancel close invalid load scroll toggle".split(" ").concat(fl));function m_(o,l,d){var m=o.type||"unknown-event";o.currentTarget=d,lM(m,l,void 0,o),o.currentTarget=null}function g_(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 j=m.length-1;0<=j;j--){var B=m[j],q=B.instance,Z=B.currentTarget;if(B=B.listener,q!==_&&b.isPropagationStopped())break e;m_(b,B,Z),_=q}else for(j=0;j<m.length;j++){if(B=m[j],q=B.instance,Z=B.currentTarget,B=B.listener,q!==_&&b.isPropagationStopped())break e;m_(b,B,Z),_=q}}}if(Ys)throw o=up,Ys=!1,up=null,o}function ut(o,l){var d=l[zp];d===void 0&&(d=l[zp]=new Set);var m=o+"__bubble";d.has(m)||(v_(l,o,2,!1),d.add(m))}function Np(o,l,d){var m=0;l&&(m|=4),v_(d,o,m,l)}var Pc="_reactListening"+Math.random().toString(36).slice(2);function dl(o){if(!o[Pc]){o[Pc]=!0,n.forEach(function(d){d!=="selectionchange"&&(c3.has(d)||Np(d,!1,o),Np(d,!0,o))});var l=o.nodeType===9?o:o.ownerDocument;l===null||l[Pc]||(l[Pc]=!0,Np("selectionchange",!1,l))}}function v_(o,l,d,m){switch(z1(l)){case 1:var b=kM;break;case 4:b=OM;break;default:b=gp}d=b.bind(null,l,d,o),b=void 0,!Pi||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 j=m.tag;if(j===3||j===4){var B=m.stateNode.containerInfo;if(B===b||B.nodeType===8&&B.parentNode===b)break;if(j===4)for(j=m.return;j!==null;){var q=j.tag;if((q===3||q===4)&&(q=j.stateNode.containerInfo,q===b||q.nodeType===8&&q.parentNode===b))return;j=j.return}for(;B!==null;){if(j=va(B),j===null)return;if(q=j.tag,q===5||q===6){m=_=j;continue e}B=B.parentNode}}m=m.return}At(function(){var Z=_,oe=qr(d),le=[];e:{var ae=h_.get(o);if(ae!==void 0){var me=bp,we=o;switch(o){case"keypress":if(_c(d)===0)break e;case"keydown":case"keyup":me=zM;break;case"focusin":we="focus",me=_p;break;case"focusout":we="blur",me=_p;break;case"beforeblur":case"afterblur":me=_p;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=F1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":me=PM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":me=FM;break;case u_:case c_:case f_:me=CM;break;case d_:me=WM;break;case"scroll":me=EM;break;case"wheel":me=KM;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=W1}var Se=(l&4)!==0,Ot=!Se&&o==="scroll",Y=Se?ae!==null?ae+"Capture":null:ae;Se=[];for(var H=Z,J;H!==null;){J=H;var ce=J.stateNode;if(J.tag===5&&ce!==null&&(J=ce,Y!==null&&(ce=qt(H,Y),ce!=null&&Se.push(hl(H,ce,J)))),Ot)break;H=H.return}0<Se.length&&(ae=new me(ae,we,null,d,oe),le.push({event:ae,listeners:Se}))}}if((l&7)===0){e:{if(ae=o==="mouseover"||o==="pointerover",me=o==="mouseout"||o==="pointerout",ae&&d!==ma&&(we=d.relatedTarget||d.fromElement)&&(va(we)||we[Gn]))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=Z,we=we?va(we):null,we!==null&&(Ot=ga(we),we!==Ot||we.tag!==5&&we.tag!==6)&&(we=null)):(me=null,we=Z),me!==we)){if(Se=F1,ce="onMouseLeave",Y="onMouseEnter",H="mouse",(o==="pointerout"||o==="pointerover")&&(Se=W1,ce="onPointerLeave",Y="onPointerEnter",H="pointer"),Ot=me==null?ae:bo(me),J=we==null?ae:bo(we),ae=new Se(ce,H+"leave",me,d,oe),ae.target=Ot,ae.relatedTarget=J,ce=null,va(oe)===Z&&(Se=new Se(Y,H+"enter",we,d,oe),Se.target=J,Se.relatedTarget=Ot,ce=Se),Ot=ce,me&&we)t:{for(Se=me,Y=we,H=0,J=Se;J;J=vo(J))H++;for(J=0,ce=Y;ce;ce=vo(ce))J++;for(;0<H-J;)Se=vo(Se),H--;for(;0<J-H;)Y=vo(Y),J--;for(;H--;){if(Se===Y||Y!==null&&Se===Y.alternate)break t;Se=vo(Se),Y=vo(Y)}Se=null}else Se=null;me!==null&&y_(le,ae,me,Se,!1),we!==null&&Ot!==null&&y_(le,Ot,we,Se,!0)}}e:{if(ae=Z?bo(Z):window,me=ae.nodeName&&ae.nodeName.toLowerCase(),me==="select"||me==="input"&&ae.type==="file")var ke=e3;else if(J1(ae))if(Z1)ke=i3;else{ke=r3;var Ae=t3}else(me=ae.nodeName)&&me.toLowerCase()==="input"&&(ae.type==="checkbox"||ae.type==="radio")&&(ke=n3);if(ke&&(ke=ke(o,Z))){Q1(le,ke,d,oe);break e}Ae&&Ae(o,ae,Z),o==="focusout"&&(Ae=ae._wrapperState)&&Ae.controlled&&ae.type==="number"&&Et(ae,"number",ae.value)}switch(Ae=Z?bo(Z):window,o){case"focusin":(J1(Ae)||Ae.contentEditable==="true")&&(mo=Ae,Pp=Z,cl=null);break;case"focusout":cl=Pp=mo=null;break;case"mousedown":Tp=!0;break;case"contextmenu":case"mouseup":case"dragend":Tp=!1,s_(le,d,oe);break;case"selectionchange":if(s3)break;case"keydown":case"keyup":s_(le,d,oe)}var Pe;if(kp)e:{switch(o){case"compositionstart":var Ce="onCompositionStart";break e;case"compositionend":Ce="onCompositionEnd";break e;case"compositionupdate":Ce="onCompositionUpdate";break e}Ce=void 0}else po?X1(o,d)&&(Ce="onCompositionEnd"):o==="keydown"&&d.keyCode===229&&(Ce="onCompositionStart");Ce&&(V1&&d.locale!=="ko"&&(po||Ce!=="onCompositionStart"?Ce==="onCompositionEnd"&&po&&(Pe=q1()):($i=oe,yp="value"in $i?$i.value:$i.textContent,po=!0)),Ae=Tc(Z,Ce),0<Ae.length&&(Ce=new H1(Ce,o,null,d,oe),le.push({event:Ce,listeners:Ae}),Pe?Ce.data=Pe:(Pe=Y1(d),Pe!==null&&(Ce.data=Pe)))),(Pe=XM?YM(o,d):JM(o,d))&&(Z=Tc(Z,"onBeforeInput"),0<Z.length&&(oe=new H1("onBeforeInput","beforeinput",null,d,oe),le.push({event:oe,listeners:Z}),oe.data=Pe))}g_(le,l)})}function hl(o,l,d){return{instance:o,listener:l,currentTarget:d}}function Tc(o,l){for(var d=l+"Capture",m=[];o!==null;){var b=o,_=b.stateNode;b.tag===5&&_!==null&&(b=_,_=qt(o,d),_!=null&&m.unshift(hl(o,_,b)),_=qt(o,l),_!=null&&m.push(hl(o,_,b))),o=o.return}return m}function vo(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5);return o||null}function y_(o,l,d,m,b){for(var _=l._reactName,j=[];d!==null&&d!==m;){var B=d,q=B.alternate,Z=B.stateNode;if(q!==null&&q===m)break;B.tag===5&&Z!==null&&(B=Z,b?(q=qt(d,_),q!=null&&j.unshift(hl(d,q,B))):b||(q=qt(d,_),q!=null&&j.push(hl(d,q,B)))),d=d.return}j.length!==0&&o.push({event:l,listeners:j})}var f3=/\r\n?/g,d3=/\u0000|\uFFFD/g;function b_(o){return(typeof o=="string"?o:""+o).replace(f3,`
|
|
38
|
-
`).replace(d3,"")}function jc(o,l,d){if(l=b_(l),b_(o)!==l&&d)throw Error(r(425))}function Cc(){}var Ip=null,Mp=null;function Lp(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 Dp=typeof setTimeout=="function"?setTimeout:void 0,h3=typeof clearTimeout=="function"?clearTimeout:void 0,w_=typeof Promise=="function"?Promise:void 0,p3=typeof queueMicrotask=="function"?queueMicrotask:typeof w_<"u"?function(o){return w_.resolve(null).then(o).catch(m3)}:Dp;function m3(o){setTimeout(function(){throw o})}function Bp(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),nl(l);return}m--}else d!=="$"&&d!=="$?"&&d!=="$!"||m++;d=b}while(d);nl(l)}function Mi(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 x_(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 yo=Math.random().toString(36).slice(2),Tn="__reactFiber$"+yo,pl="__reactProps$"+yo,Gn="__reactContainer$"+yo,zp="__reactEvents$"+yo,g3="__reactListeners$"+yo,v3="__reactHandles$"+yo;function va(o){var l=o[Tn];if(l)return l;for(var d=o.parentNode;d;){if(l=d[Gn]||d[Tn]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(o=x_(o);o!==null;){if(d=o[Tn])return d;o=x_(o)}return l}o=d,d=o.parentNode}return null}function ml(o){return o=o[Tn]||o[Gn],!o||o.tag!==5&&o.tag!==6&&o.tag!==13&&o.tag!==3?null:o}function bo(o){if(o.tag===5||o.tag===6)return o.stateNode;throw Error(r(33))}function Rc(o){return o[pl]||null}var qp=[],wo=-1;function Li(o){return{current:o}}function ct(o){0>wo||(o.current=qp[wo],qp[wo]=null,wo--)}function rt(o,l){wo++,qp[wo]=o.current,o.current=l}var Di={},nr=Li(Di),gr=Li(!1),ya=Di;function xo(o,l){var d=o.type.contextTypes;if(!d)return Di;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 vr(o){return o=o.childContextTypes,o!=null}function Nc(){ct(gr),ct(nr)}function __(o,l,d){if(nr.current!==Di)throw Error(r(168));rt(nr,l),rt(gr,d)}function S_(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 F({},d,m)}function $c(o){return o=(o=o.stateNode)&&o.__reactInternalMemoizedMergedChildContext||Di,ya=nr.current,rt(nr,o),rt(gr,gr.current),!0}function k_(o,l,d){var m=o.stateNode;if(!m)throw Error(r(169));d?(o=S_(o,l,ya),m.__reactInternalMemoizedMergedChildContext=o,ct(gr),ct(nr),rt(nr,o)):ct(gr),rt(gr,d)}var Xn=null,Ic=!1,Up=!1;function O_(o){Xn===null?Xn=[o]:Xn.push(o)}function y3(o){Ic=!0,O_(o)}function Bi(){if(!Up&&Xn!==null){Up=!0;var o=0,l=Ye;try{var d=Xn;for(Ye=1;o<d.length;o++){var m=d[o];do m=m(!0);while(m!==null)}Xn=null,Ic=!1}catch(b){throw Xn!==null&&(Xn=Xn.slice(o+1)),A1(cp,Bi),b}finally{Ye=l,Up=!1}}return null}var _o=[],So=0,Mc=null,Lc=0,Fr=[],Hr=0,ba=null,Yn=1,Jn="";function wa(o,l){_o[So++]=Lc,_o[So++]=Mc,Mc=o,Lc=l}function E_(o,l,d){Fr[Hr++]=Yn,Fr[Hr++]=Jn,Fr[Hr++]=ba,ba=o;var m=Yn;o=Jn;var b=32-sn(m)-1;m&=~(1<<b),d+=1;var _=32-sn(l)+b;if(30<_){var j=b-b%5;_=(m&(1<<j)-1).toString(32),m>>=j,b-=j,Yn=1<<32-sn(l)+b|d<<b|m,Jn=_+o}else Yn=1<<_|d<<b|m,Jn=o}function Fp(o){o.return!==null&&(wa(o,1),E_(o,1,0))}function Hp(o){for(;o===Mc;)Mc=_o[--So],_o[So]=null,Lc=_o[--So],_o[So]=null;for(;o===ba;)ba=Fr[--Hr],Fr[Hr]=null,Jn=Fr[--Hr],Fr[Hr]=null,Yn=Fr[--Hr],Fr[Hr]=null}var jr=null,Cr=null,pt=!1,un=null;function A_(o,l){var d=Gr(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 P_(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,jr=o,Cr=Mi(l.firstChild),!0):!1;case 6:return l=o.pendingProps===""||l.nodeType!==3?null:l,l!==null?(o.stateNode=l,jr=o,Cr=null,!0):!1;case 13:return l=l.nodeType!==8?null:l,l!==null?(d=ba!==null?{id:Yn,overflow:Jn}:null,o.memoizedState={dehydrated:l,treeContext:d,retryLane:1073741824},d=Gr(18,null,null,0),d.stateNode=l,d.return=o,o.child=d,jr=o,Cr=null,!0):!1;default:return!1}}function Wp(o){return(o.mode&1)!==0&&(o.flags&128)===0}function Vp(o){if(pt){var l=Cr;if(l){var d=l;if(!P_(o,l)){if(Wp(o))throw Error(r(418));l=Mi(d.nextSibling);var m=jr;l&&P_(o,l)?A_(m,d):(o.flags=o.flags&-4097|2,pt=!1,jr=o)}}else{if(Wp(o))throw Error(r(418));o.flags=o.flags&-4097|2,pt=!1,jr=o}}}function T_(o){for(o=o.return;o!==null&&o.tag!==5&&o.tag!==3&&o.tag!==13;)o=o.return;jr=o}function Dc(o){if(o!==jr)return!1;if(!pt)return T_(o),pt=!0,!1;var l;if((l=o.tag!==3)&&!(l=o.tag!==5)&&(l=o.type,l=l!=="head"&&l!=="body"&&!Lp(o.type,o.memoizedProps)),l&&(l=Cr)){if(Wp(o))throw j_(),Error(r(418));for(;l;)A_(o,l),l=Mi(l.nextSibling)}if(T_(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=Mi(o.nextSibling);break e}l--}else d!=="$"&&d!=="$!"&&d!=="$?"||l++}o=o.nextSibling}Cr=null}}else Cr=jr?Mi(o.stateNode.nextSibling):null;return!0}function j_(){for(var o=Cr;o;)o=Mi(o.nextSibling)}function ko(){Cr=jr=null,pt=!1}function Kp(o){un===null?un=[o]:un.push(o)}var b3=T.ReactCurrentBatchConfig;function gl(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(j){var B=b.refs;j===null?delete B[_]:B[_]=j},l._stringRef=_,l)}if(typeof o!="string")throw Error(r(284));if(!d._owner)throw Error(r(290,o))}return o}function Bc(o,l){throw o=Object.prototype.toString.call(l),Error(r(31,o==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":o))}function C_(o){var l=o._init;return l(o._payload)}function R_(o){function l(Y,H){if(o){var J=Y.deletions;J===null?(Y.deletions=[H],Y.flags|=16):J.push(H)}}function d(Y,H){if(!o)return null;for(;H!==null;)l(Y,H),H=H.sibling;return null}function m(Y,H){for(Y=new Map;H!==null;)H.key!==null?Y.set(H.key,H):Y.set(H.index,H),H=H.sibling;return Y}function b(Y,H){return Y=Ki(Y,H),Y.index=0,Y.sibling=null,Y}function _(Y,H,J){return Y.index=J,o?(J=Y.alternate,J!==null?(J=J.index,J<H?(Y.flags|=2,H):J):(Y.flags|=2,H)):(Y.flags|=1048576,H)}function j(Y){return o&&Y.alternate===null&&(Y.flags|=2),Y}function B(Y,H,J,ce){return H===null||H.tag!==6?(H=Dm(J,Y.mode,ce),H.return=Y,H):(H=b(H,J),H.return=Y,H)}function q(Y,H,J,ce){var ke=J.type;return ke===C?oe(Y,H,J.props.children,ce,J.key):H!==null&&(H.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===X&&C_(ke)===H.type)?(ce=b(H,J.props),ce.ref=gl(Y,H,J),ce.return=Y,ce):(ce=cf(J.type,J.key,J.props,null,Y.mode,ce),ce.ref=gl(Y,H,J),ce.return=Y,ce)}function Z(Y,H,J,ce){return H===null||H.tag!==4||H.stateNode.containerInfo!==J.containerInfo||H.stateNode.implementation!==J.implementation?(H=Bm(J,Y.mode,ce),H.return=Y,H):(H=b(H,J.children||[]),H.return=Y,H)}function oe(Y,H,J,ce,ke){return H===null||H.tag!==7?(H=Pa(J,Y.mode,ce,ke),H.return=Y,H):(H=b(H,J),H.return=Y,H)}function le(Y,H,J){if(typeof H=="string"&&H!==""||typeof H=="number")return H=Dm(""+H,Y.mode,J),H.return=Y,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case E:return J=cf(H.type,H.key,H.props,null,Y.mode,J),J.ref=gl(Y,null,H),J.return=Y,J;case P:return H=Bm(H,Y.mode,J),H.return=Y,H;case X:var ce=H._init;return le(Y,ce(H._payload),J)}if(Br(H)||te(H))return H=Pa(H,Y.mode,J,null),H.return=Y,H;Bc(Y,H)}return null}function ae(Y,H,J,ce){var ke=H!==null?H.key:null;if(typeof J=="string"&&J!==""||typeof J=="number")return ke!==null?null:B(Y,H,""+J,ce);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case E:return J.key===ke?q(Y,H,J,ce):null;case P:return J.key===ke?Z(Y,H,J,ce):null;case X:return ke=J._init,ae(Y,H,ke(J._payload),ce)}if(Br(J)||te(J))return ke!==null?null:oe(Y,H,J,ce,null);Bc(Y,J)}return null}function me(Y,H,J,ce,ke){if(typeof ce=="string"&&ce!==""||typeof ce=="number")return Y=Y.get(J)||null,B(H,Y,""+ce,ke);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case E:return Y=Y.get(ce.key===null?J:ce.key)||null,q(H,Y,ce,ke);case P:return Y=Y.get(ce.key===null?J:ce.key)||null,Z(H,Y,ce,ke);case X:var Ae=ce._init;return me(Y,H,J,Ae(ce._payload),ke)}if(Br(ce)||te(ce))return Y=Y.get(J)||null,oe(H,Y,ce,ke,null);Bc(H,ce)}return null}function we(Y,H,J,ce){for(var ke=null,Ae=null,Pe=H,Ce=H=0,Ht=null;Pe!==null&&Ce<J.length;Ce++){Pe.index>Ce?(Ht=Pe,Pe=null):Ht=Pe.sibling;var Ve=ae(Y,Pe,J[Ce],ce);if(Ve===null){Pe===null&&(Pe=Ht);break}o&&Pe&&Ve.alternate===null&&l(Y,Pe),H=_(Ve,H,Ce),Ae===null?ke=Ve:Ae.sibling=Ve,Ae=Ve,Pe=Ht}if(Ce===J.length)return d(Y,Pe),pt&&wa(Y,Ce),ke;if(Pe===null){for(;Ce<J.length;Ce++)Pe=le(Y,J[Ce],ce),Pe!==null&&(H=_(Pe,H,Ce),Ae===null?ke=Pe:Ae.sibling=Pe,Ae=Pe);return pt&&wa(Y,Ce),ke}for(Pe=m(Y,Pe);Ce<J.length;Ce++)Ht=me(Pe,Y,Ce,J[Ce],ce),Ht!==null&&(o&&Ht.alternate!==null&&Pe.delete(Ht.key===null?Ce:Ht.key),H=_(Ht,H,Ce),Ae===null?ke=Ht:Ae.sibling=Ht,Ae=Ht);return o&&Pe.forEach(function(Gi){return l(Y,Gi)}),pt&&wa(Y,Ce),ke}function Se(Y,H,J,ce){var ke=te(J);if(typeof ke!="function")throw Error(r(150));if(J=ke.call(J),J==null)throw Error(r(151));for(var Ae=ke=null,Pe=H,Ce=H=0,Ht=null,Ve=J.next();Pe!==null&&!Ve.done;Ce++,Ve=J.next()){Pe.index>Ce?(Ht=Pe,Pe=null):Ht=Pe.sibling;var Gi=ae(Y,Pe,Ve.value,ce);if(Gi===null){Pe===null&&(Pe=Ht);break}o&&Pe&&Gi.alternate===null&&l(Y,Pe),H=_(Gi,H,Ce),Ae===null?ke=Gi:Ae.sibling=Gi,Ae=Gi,Pe=Ht}if(Ve.done)return d(Y,Pe),pt&&wa(Y,Ce),ke;if(Pe===null){for(;!Ve.done;Ce++,Ve=J.next())Ve=le(Y,Ve.value,ce),Ve!==null&&(H=_(Ve,H,Ce),Ae===null?ke=Ve:Ae.sibling=Ve,Ae=Ve);return pt&&wa(Y,Ce),ke}for(Pe=m(Y,Pe);!Ve.done;Ce++,Ve=J.next())Ve=me(Pe,Y,Ce,Ve.value,ce),Ve!==null&&(o&&Ve.alternate!==null&&Pe.delete(Ve.key===null?Ce:Ve.key),H=_(Ve,H,Ce),Ae===null?ke=Ve:Ae.sibling=Ve,Ae=Ve);return o&&Pe.forEach(function(Q3){return l(Y,Q3)}),pt&&wa(Y,Ce),ke}function Ot(Y,H,J,ce){if(typeof J=="object"&&J!==null&&J.type===C&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case E:e:{for(var ke=J.key,Ae=H;Ae!==null;){if(Ae.key===ke){if(ke=J.type,ke===C){if(Ae.tag===7){d(Y,Ae.sibling),H=b(Ae,J.props.children),H.return=Y,Y=H;break e}}else if(Ae.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===X&&C_(ke)===Ae.type){d(Y,Ae.sibling),H=b(Ae,J.props),H.ref=gl(Y,Ae,J),H.return=Y,Y=H;break e}d(Y,Ae);break}else l(Y,Ae);Ae=Ae.sibling}J.type===C?(H=Pa(J.props.children,Y.mode,ce,J.key),H.return=Y,Y=H):(ce=cf(J.type,J.key,J.props,null,Y.mode,ce),ce.ref=gl(Y,H,J),ce.return=Y,Y=ce)}return j(Y);case P:e:{for(Ae=J.key;H!==null;){if(H.key===Ae)if(H.tag===4&&H.stateNode.containerInfo===J.containerInfo&&H.stateNode.implementation===J.implementation){d(Y,H.sibling),H=b(H,J.children||[]),H.return=Y,Y=H;break e}else{d(Y,H);break}else l(Y,H);H=H.sibling}H=Bm(J,Y.mode,ce),H.return=Y,Y=H}return j(Y);case X:return Ae=J._init,Ot(Y,H,Ae(J._payload),ce)}if(Br(J))return we(Y,H,J,ce);if(te(J))return Se(Y,H,J,ce);Bc(Y,J)}return typeof J=="string"&&J!==""||typeof J=="number"?(J=""+J,H!==null&&H.tag===6?(d(Y,H.sibling),H=b(H,J),H.return=Y,Y=H):(d(Y,H),H=Dm(J,Y.mode,ce),H.return=Y,Y=H),j(Y)):d(Y,H)}return Ot}var Oo=R_(!0),N_=R_(!1),zc=Li(null),qc=null,Eo=null,Gp=null;function Xp(){Gp=Eo=qc=null}function Yp(o){var l=zc.current;ct(zc),o._currentValue=l}function Jp(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 Ao(o,l){qc=o,Gp=Eo=null,o=o.dependencies,o!==null&&o.firstContext!==null&&((o.lanes&l)!==0&&(yr=!0),o.firstContext=null)}function Wr(o){var l=o._currentValue;if(Gp!==o)if(o={context:o,memoizedValue:l,next:null},Eo===null){if(qc===null)throw Error(r(308));Eo=o,qc.dependencies={lanes:0,firstContext:o}}else Eo=Eo.next=o;return l}var xa=null;function Qp(o){xa===null?xa=[o]:xa.push(o)}function $_(o,l,d,m){var b=l.interleaved;return b===null?(d.next=d,Qp(l)):(d.next=b.next,b.next=d),l.interleaved=d,Qn(o,m)}function Qn(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 zi=!1;function Zp(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function I_(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 Zn(o,l){return{eventTime:o,lane:l,tag:0,payload:null,callback:null,next:null}}function qi(o,l,d){var m=o.updateQueue;if(m===null)return null;if(m=m.shared,(We&2)!==0){var b=m.pending;return b===null?l.next=l:(l.next=b.next,b.next=l),m.pending=l,Qn(o,d)}return b=m.interleaved,b===null?(l.next=l,Qp(m)):(l.next=b.next,b.next=l),m.interleaved=l,Qn(o,d)}function Uc(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,hp(o,d)}}function M_(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 j={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};_===null?b=_=j:_=_.next=j,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 Fc(o,l,d,m){var b=o.updateQueue;zi=!1;var _=b.firstBaseUpdate,j=b.lastBaseUpdate,B=b.shared.pending;if(B!==null){b.shared.pending=null;var q=B,Z=q.next;q.next=null,j===null?_=Z:j.next=Z,j=q;var oe=o.alternate;oe!==null&&(oe=oe.updateQueue,B=oe.lastBaseUpdate,B!==j&&(B===null?oe.firstBaseUpdate=Z:B.next=Z,oe.lastBaseUpdate=q))}if(_!==null){var le=b.baseState;j=0,oe=Z=q=null,B=_;do{var ae=B.lane,me=B.eventTime;if((m&ae)===ae){oe!==null&&(oe=oe.next={eventTime:me,lane:0,tag:B.tag,payload:B.payload,callback:B.callback,next:null});e:{var we=o,Se=B;switch(ae=l,me=d,Se.tag){case 1:if(we=Se.payload,typeof we=="function"){le=we.call(me,le,ae);break e}le=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=Se.payload,ae=typeof we=="function"?we.call(me,le,ae):we,ae==null)break e;le=F({},le,ae);break e;case 2:zi=!0}}B.callback!==null&&B.lane!==0&&(o.flags|=64,ae=b.effects,ae===null?b.effects=[B]:ae.push(B))}else me={eventTime:me,lane:ae,tag:B.tag,payload:B.payload,callback:B.callback,next:null},oe===null?(Z=oe=me,q=le):oe=oe.next=me,j|=ae;if(B=B.next,B===null){if(B=b.shared.pending,B===null)break;ae=B,B=ae.next,ae.next=null,b.lastBaseUpdate=ae,b.shared.pending=null}}while(!0);if(oe===null&&(q=le),b.baseState=q,b.firstBaseUpdate=Z,b.lastBaseUpdate=oe,l=b.shared.interleaved,l!==null){b=l;do j|=b.lane,b=b.next;while(b!==l)}else _===null&&(b.shared.lanes=0);ka|=j,o.lanes=j,o.memoizedState=le}}function L_(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 vl={},jn=Li(vl),yl=Li(vl),bl=Li(vl);function _a(o){if(o===vl)throw Error(r(174));return o}function em(o,l){switch(rt(bl,l),rt(yl,o),rt(jn,vl),o=l.nodeType,o){case 9:case 11:l=(l=l.documentElement)?l.namespaceURI:Vs(null,"");break;default:o=o===8?l.parentNode:l,l=o.namespaceURI||null,o=o.tagName,l=Vs(l,o)}ct(jn),rt(jn,l)}function Po(){ct(jn),ct(yl),ct(bl)}function D_(o){_a(bl.current);var l=_a(jn.current),d=Vs(l,o.type);l!==d&&(rt(yl,o),rt(jn,d))}function tm(o){yl.current===o&&(ct(jn),ct(yl))}var vt=Li(0);function Hc(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 rm=[];function nm(){for(var o=0;o<rm.length;o++)rm[o]._workInProgressVersionPrimary=null;rm.length=0}var Wc=T.ReactCurrentDispatcher,im=T.ReactCurrentBatchConfig,Sa=0,yt=null,Nt=null,Ut=null,Vc=!1,wl=!1,xl=0,w3=0;function ir(){throw Error(r(321))}function am(o,l){if(l===null)return!1;for(var d=0;d<l.length&&d<o.length;d++)if(!ln(o[d],l[d]))return!1;return!0}function om(o,l,d,m,b,_){if(Sa=_,yt=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,Wc.current=o===null||o.memoizedState===null?k3:O3,o=d(m,b),wl){_=0;do{if(wl=!1,xl=0,25<=_)throw Error(r(301));_+=1,Ut=Nt=null,l.updateQueue=null,Wc.current=E3,o=d(m,b)}while(wl)}if(Wc.current=Xc,l=Nt!==null&&Nt.next!==null,Sa=0,Ut=Nt=yt=null,Vc=!1,l)throw Error(r(300));return o}function sm(){var o=xl!==0;return xl=0,o}function Cn(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ut===null?yt.memoizedState=Ut=o:Ut=Ut.next=o,Ut}function Vr(){if(Nt===null){var o=yt.alternate;o=o!==null?o.memoizedState:null}else o=Nt.next;var l=Ut===null?yt.memoizedState:Ut.next;if(l!==null)Ut=l,Nt=o;else{if(o===null)throw Error(r(310));Nt=o,o={memoizedState:Nt.memoizedState,baseState:Nt.baseState,baseQueue:Nt.baseQueue,queue:Nt.queue,next:null},Ut===null?yt.memoizedState=Ut=o:Ut=Ut.next=o}return Ut}function _l(o,l){return typeof l=="function"?l(o):l}function lm(o){var l=Vr(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=o;var m=Nt,b=m.baseQueue,_=d.pending;if(_!==null){if(b!==null){var j=b.next;b.next=_.next,_.next=j}m.baseQueue=b=_,d.pending=null}if(b!==null){_=b.next,m=m.baseState;var B=j=null,q=null,Z=_;do{var oe=Z.lane;if((Sa&oe)===oe)q!==null&&(q=q.next={lane:0,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),m=Z.hasEagerState?Z.eagerState:o(m,Z.action);else{var le={lane:oe,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null};q===null?(B=q=le,j=m):q=q.next=le,yt.lanes|=oe,ka|=oe}Z=Z.next}while(Z!==null&&Z!==_);q===null?j=m:q.next=B,ln(m,l.memoizedState)||(yr=!0),l.memoizedState=m,l.baseState=j,l.baseQueue=q,d.lastRenderedState=m}if(o=d.interleaved,o!==null){b=o;do _=b.lane,yt.lanes|=_,ka|=_,b=b.next;while(b!==o)}else b===null&&(d.lanes=0);return[l.memoizedState,d.dispatch]}function um(o){var l=Vr(),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 j=b=b.next;do _=o(_,j.action),j=j.next;while(j!==b);ln(_,l.memoizedState)||(yr=!0),l.memoizedState=_,l.baseQueue===null&&(l.baseState=_),d.lastRenderedState=_}return[_,m]}function B_(){}function z_(o,l){var d=yt,m=Vr(),b=l(),_=!ln(m.memoizedState,b);if(_&&(m.memoizedState=b,yr=!0),m=m.queue,cm(F_.bind(null,d,m,o),[o]),m.getSnapshot!==l||_||Ut!==null&&Ut.memoizedState.tag&1){if(d.flags|=2048,Sl(9,U_.bind(null,d,m,b,l),void 0,null),Ft===null)throw Error(r(349));(Sa&30)!==0||q_(d,l,b)}return b}function q_(o,l,d){o.flags|=16384,o={getSnapshot:l,value:d},l=yt.updateQueue,l===null?(l={lastEffect:null,stores:null},yt.updateQueue=l,l.stores=[o]):(d=l.stores,d===null?l.stores=[o]:d.push(o))}function U_(o,l,d,m){l.value=d,l.getSnapshot=m,H_(l)&&W_(o)}function F_(o,l,d){return d(function(){H_(l)&&W_(o)})}function H_(o){var l=o.getSnapshot;o=o.value;try{var d=l();return!ln(o,d)}catch{return!0}}function W_(o){var l=Qn(o,1);l!==null&&hn(l,o,1,-1)}function V_(o){var l=Cn();return typeof o=="function"&&(o=o()),l.memoizedState=l.baseState=o,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_l,lastRenderedState:o},l.queue=o,o=o.dispatch=S3.bind(null,yt,o),[l.memoizedState,o]}function Sl(o,l,d,m){return o={tag:o,create:l,destroy:d,deps:m,next:null},l=yt.updateQueue,l===null?(l={lastEffect:null,stores:null},yt.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 K_(){return Vr().memoizedState}function Kc(o,l,d,m){var b=Cn();yt.flags|=o,b.memoizedState=Sl(1|l,d,void 0,m===void 0?null:m)}function Gc(o,l,d,m){var b=Vr();m=m===void 0?null:m;var _=void 0;if(Nt!==null){var j=Nt.memoizedState;if(_=j.destroy,m!==null&&am(m,j.deps)){b.memoizedState=Sl(l,d,_,m);return}}yt.flags|=o,b.memoizedState=Sl(1|l,d,_,m)}function G_(o,l){return Kc(8390656,8,o,l)}function cm(o,l){return Gc(2048,8,o,l)}function X_(o,l){return Gc(4,2,o,l)}function Y_(o,l){return Gc(4,4,o,l)}function J_(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 Q_(o,l,d){return d=d!=null?d.concat([o]):null,Gc(4,4,J_.bind(null,l,o),d)}function fm(){}function Z_(o,l){var d=Vr();l=l===void 0?null:l;var m=d.memoizedState;return m!==null&&l!==null&&am(l,m[1])?m[0]:(d.memoizedState=[o,l],o)}function eS(o,l){var d=Vr();l=l===void 0?null:l;var m=d.memoizedState;return m!==null&&l!==null&&am(l,m[1])?m[0]:(o=o(),d.memoizedState=[o,l],o)}function tS(o,l,d){return(Sa&21)===0?(o.baseState&&(o.baseState=!1,yr=!0),o.memoizedState=d):(ln(d,l)||(d=C1(),yt.lanes|=d,ka|=d,o.baseState=!0),l)}function x3(o,l){var d=Ye;Ye=d!==0&&4>d?d:4,o(!0);var m=im.transition;im.transition={};try{o(!1),l()}finally{Ye=d,im.transition=m}}function rS(){return Vr().memoizedState}function _3(o,l,d){var m=Wi(o);if(d={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null},nS(o))iS(l,d);else if(d=$_(o,l,d,m),d!==null){var b=fr();hn(d,o,m,b),aS(d,l,m)}}function S3(o,l,d){var m=Wi(o),b={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null};if(nS(o))iS(l,b);else{var _=o.alternate;if(o.lanes===0&&(_===null||_.lanes===0)&&(_=l.lastRenderedReducer,_!==null))try{var j=l.lastRenderedState,B=_(j,d);if(b.hasEagerState=!0,b.eagerState=B,ln(B,j)){var q=l.interleaved;q===null?(b.next=b,Qp(l)):(b.next=q.next,q.next=b),l.interleaved=b;return}}catch{}finally{}d=$_(o,l,b,m),d!==null&&(b=fr(),hn(d,o,m,b),aS(d,l,m))}}function nS(o){var l=o.alternate;return o===yt||l!==null&&l===yt}function iS(o,l){wl=Vc=!0;var d=o.pending;d===null?l.next=l:(l.next=d.next,d.next=l),o.pending=l}function aS(o,l,d){if((d&4194240)!==0){var m=l.lanes;m&=o.pendingLanes,d|=m,l.lanes=d,hp(o,d)}}var Xc={readContext:Wr,useCallback:ir,useContext:ir,useEffect:ir,useImperativeHandle:ir,useInsertionEffect:ir,useLayoutEffect:ir,useMemo:ir,useReducer:ir,useRef:ir,useState:ir,useDebugValue:ir,useDeferredValue:ir,useTransition:ir,useMutableSource:ir,useSyncExternalStore:ir,useId:ir,unstable_isNewReconciler:!1},k3={readContext:Wr,useCallback:function(o,l){return Cn().memoizedState=[o,l===void 0?null:l],o},useContext:Wr,useEffect:G_,useImperativeHandle:function(o,l,d){return d=d!=null?d.concat([o]):null,Kc(4194308,4,J_.bind(null,l,o),d)},useLayoutEffect:function(o,l){return Kc(4194308,4,o,l)},useInsertionEffect:function(o,l){return Kc(4,2,o,l)},useMemo:function(o,l){var d=Cn();return l=l===void 0?null:l,o=o(),d.memoizedState=[o,l],o},useReducer:function(o,l,d){var m=Cn();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=_3.bind(null,yt,o),[m.memoizedState,o]},useRef:function(o){var l=Cn();return o={current:o},l.memoizedState=o},useState:V_,useDebugValue:fm,useDeferredValue:function(o){return Cn().memoizedState=o},useTransition:function(){var o=V_(!1),l=o[0];return o=x3.bind(null,o[1]),Cn().memoizedState=o,[l,o]},useMutableSource:function(){},useSyncExternalStore:function(o,l,d){var m=yt,b=Cn();if(pt){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),Ft===null)throw Error(r(349));(Sa&30)!==0||q_(m,l,d)}b.memoizedState=d;var _={value:d,getSnapshot:l};return b.queue=_,G_(F_.bind(null,m,_,o),[o]),m.flags|=2048,Sl(9,U_.bind(null,m,_,d,l),void 0,null),d},useId:function(){var o=Cn(),l=Ft.identifierPrefix;if(pt){var d=Jn,m=Yn;d=(m&~(1<<32-sn(m)-1)).toString(32)+d,l=":"+l+"R"+d,d=xl++,0<d&&(l+="H"+d.toString(32)),l+=":"}else d=w3++,l=":"+l+"r"+d.toString(32)+":";return o.memoizedState=l},unstable_isNewReconciler:!1},O3={readContext:Wr,useCallback:Z_,useContext:Wr,useEffect:cm,useImperativeHandle:Q_,useInsertionEffect:X_,useLayoutEffect:Y_,useMemo:eS,useReducer:lm,useRef:K_,useState:function(){return lm(_l)},useDebugValue:fm,useDeferredValue:function(o){var l=Vr();return tS(l,Nt.memoizedState,o)},useTransition:function(){var o=lm(_l)[0],l=Vr().memoizedState;return[o,l]},useMutableSource:B_,useSyncExternalStore:z_,useId:rS,unstable_isNewReconciler:!1},E3={readContext:Wr,useCallback:Z_,useContext:Wr,useEffect:cm,useImperativeHandle:Q_,useInsertionEffect:X_,useLayoutEffect:Y_,useMemo:eS,useReducer:um,useRef:K_,useState:function(){return um(_l)},useDebugValue:fm,useDeferredValue:function(o){var l=Vr();return Nt===null?l.memoizedState=o:tS(l,Nt.memoizedState,o)},useTransition:function(){var o=um(_l)[0],l=Vr().memoizedState;return[o,l]},useMutableSource:B_,useSyncExternalStore:z_,useId:rS,unstable_isNewReconciler:!1};function cn(o,l){if(o&&o.defaultProps){l=F({},l),o=o.defaultProps;for(var d in o)l[d]===void 0&&(l[d]=o[d]);return l}return l}function dm(o,l,d,m){l=o.memoizedState,d=d(m,l),d=d==null?l:F({},l,d),o.memoizedState=d,o.lanes===0&&(o.updateQueue.baseState=d)}var Yc={isMounted:function(o){return(o=o._reactInternals)?ga(o)===o:!1},enqueueSetState:function(o,l,d){o=o._reactInternals;var m=fr(),b=Wi(o),_=Zn(m,b);_.payload=l,d!=null&&(_.callback=d),l=qi(o,_,b),l!==null&&(hn(l,o,b,m),Uc(l,o,b))},enqueueReplaceState:function(o,l,d){o=o._reactInternals;var m=fr(),b=Wi(o),_=Zn(m,b);_.tag=1,_.payload=l,d!=null&&(_.callback=d),l=qi(o,_,b),l!==null&&(hn(l,o,b,m),Uc(l,o,b))},enqueueForceUpdate:function(o,l){o=o._reactInternals;var d=fr(),m=Wi(o),b=Zn(d,m);b.tag=2,l!=null&&(b.callback=l),l=qi(o,b,m),l!==null&&(hn(l,o,m,d),Uc(l,o,m))}};function oS(o,l,d,m,b,_,j){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(m,_,j):l.prototype&&l.prototype.isPureReactComponent?!ul(d,m)||!ul(b,_):!0}function sS(o,l,d){var m=!1,b=Di,_=l.contextType;return typeof _=="object"&&_!==null?_=Wr(_):(b=vr(l)?ya:nr.current,m=l.contextTypes,_=(m=m!=null)?xo(o,b):Di),l=new l(d,_),o.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=Yc,o.stateNode=l,l._reactInternals=o,m&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=b,o.__reactInternalMemoizedMaskedChildContext=_),l}function lS(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&&Yc.enqueueReplaceState(l,l.state,null)}function hm(o,l,d,m){var b=o.stateNode;b.props=d,b.state=o.memoizedState,b.refs={},Zp(o);var _=l.contextType;typeof _=="object"&&_!==null?b.context=Wr(_):(_=vr(l)?ya:nr.current,b.context=xo(o,_)),b.state=o.memoizedState,_=l.getDerivedStateFromProps,typeof _=="function"&&(dm(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&&Yc.enqueueReplaceState(b,b.state,null),Fc(o,d,b,m),b.state=o.memoizedState),typeof b.componentDidMount=="function"&&(o.flags|=4194308)}function To(o,l){try{var d="",m=l;do d+=ue(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 pm(o,l,d){return{value:o,source:null,stack:d??null,digest:l??null}}function mm(o,l){try{console.error(l.value)}catch(d){setTimeout(function(){throw d})}}var A3=typeof WeakMap=="function"?WeakMap:Map;function uS(o,l,d){d=Zn(-1,d),d.tag=3,d.payload={element:null};var m=l.value;return d.callback=function(){nf||(nf=!0,jm=m),mm(o,l)},d}function cS(o,l,d){d=Zn(-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(){mm(o,l)}}var _=o.stateNode;return _!==null&&typeof _.componentDidCatch=="function"&&(d.callback=function(){mm(o,l),typeof m!="function"&&(Fi===null?Fi=new Set([this]):Fi.add(this));var j=l.stack;this.componentDidCatch(l.value,{componentStack:j!==null?j:""})}),d}function fS(o,l,d){var m=o.pingCache;if(m===null){m=o.pingCache=new A3;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=q3.bind(null,o,l,d),l.then(o,o))}function dS(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 hS(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=Zn(-1,1),l.tag=2,qi(d,l,1))),d.lanes|=1),o):(o.flags|=65536,o.lanes=b,o)}var P3=T.ReactCurrentOwner,yr=!1;function cr(o,l,d,m){l.child=o===null?N_(l,null,d,m):Oo(l,o.child,d,m)}function pS(o,l,d,m,b){d=d.render;var _=l.ref;return Ao(l,b),m=om(o,l,d,m,_,b),d=sm(),o!==null&&!yr?(l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~b,ei(o,l,b)):(pt&&d&&Fp(l),l.flags|=1,cr(o,l,m,b),l.child)}function mS(o,l,d,m,b){if(o===null){var _=d.type;return typeof _=="function"&&!Lm(_)&&_.defaultProps===void 0&&d.compare===null&&d.defaultProps===void 0?(l.tag=15,l.type=_,gS(o,l,_,m,b)):(o=cf(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 j=_.memoizedProps;if(d=d.compare,d=d!==null?d:ul,d(j,m)&&o.ref===l.ref)return ei(o,l,b)}return l.flags|=1,o=Ki(_,m),o.ref=l.ref,o.return=l,l.child=o}function gS(o,l,d,m,b){if(o!==null){var _=o.memoizedProps;if(ul(_,m)&&o.ref===l.ref)if(yr=!1,l.pendingProps=m=_,(o.lanes&b)!==0)(o.flags&131072)!==0&&(yr=!0);else return l.lanes=o.lanes,ei(o,l,b)}return gm(o,l,d,m,b)}function vS(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},rt(Co,Rr),Rr|=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,rt(Co,Rr),Rr|=o,null;l.memoizedState={baseLanes:0,cachePool:null,transitions:null},m=_!==null?_.baseLanes:d,rt(Co,Rr),Rr|=m}else _!==null?(m=_.baseLanes|d,l.memoizedState=null):m=d,rt(Co,Rr),Rr|=m;return cr(o,l,b,d),l.child}function yS(o,l){var d=l.ref;(o===null&&d!==null||o!==null&&o.ref!==d)&&(l.flags|=512,l.flags|=2097152)}function gm(o,l,d,m,b){var _=vr(d)?ya:nr.current;return _=xo(l,_),Ao(l,b),d=om(o,l,d,m,_,b),m=sm(),o!==null&&!yr?(l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~b,ei(o,l,b)):(pt&&m&&Fp(l),l.flags|=1,cr(o,l,d,b),l.child)}function bS(o,l,d,m,b){if(vr(d)){var _=!0;$c(l)}else _=!1;if(Ao(l,b),l.stateNode===null)Qc(o,l),sS(l,d,m),hm(l,d,m,b),m=!0;else if(o===null){var j=l.stateNode,B=l.memoizedProps;j.props=B;var q=j.context,Z=d.contextType;typeof Z=="object"&&Z!==null?Z=Wr(Z):(Z=vr(d)?ya:nr.current,Z=xo(l,Z));var oe=d.getDerivedStateFromProps,le=typeof oe=="function"||typeof j.getSnapshotBeforeUpdate=="function";le||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(B!==m||q!==Z)&&lS(l,j,m,Z),zi=!1;var ae=l.memoizedState;j.state=ae,Fc(l,m,j,b),q=l.memoizedState,B!==m||ae!==q||gr.current||zi?(typeof oe=="function"&&(dm(l,d,oe,m),q=l.memoizedState),(B=zi||oS(l,d,B,m,ae,q,Z))?(le||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount()),typeof j.componentDidMount=="function"&&(l.flags|=4194308)):(typeof j.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=m,l.memoizedState=q),j.props=m,j.state=q,j.context=Z,m=B):(typeof j.componentDidMount=="function"&&(l.flags|=4194308),m=!1)}else{j=l.stateNode,I_(o,l),B=l.memoizedProps,Z=l.type===l.elementType?B:cn(l.type,B),j.props=Z,le=l.pendingProps,ae=j.context,q=d.contextType,typeof q=="object"&&q!==null?q=Wr(q):(q=vr(d)?ya:nr.current,q=xo(l,q));var me=d.getDerivedStateFromProps;(oe=typeof me=="function"||typeof j.getSnapshotBeforeUpdate=="function")||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(B!==le||ae!==q)&&lS(l,j,m,q),zi=!1,ae=l.memoizedState,j.state=ae,Fc(l,m,j,b);var we=l.memoizedState;B!==le||ae!==we||gr.current||zi?(typeof me=="function"&&(dm(l,d,me,m),we=l.memoizedState),(Z=zi||oS(l,d,Z,m,ae,we,q)||!1)?(oe||typeof j.UNSAFE_componentWillUpdate!="function"&&typeof j.componentWillUpdate!="function"||(typeof j.componentWillUpdate=="function"&&j.componentWillUpdate(m,we,q),typeof j.UNSAFE_componentWillUpdate=="function"&&j.UNSAFE_componentWillUpdate(m,we,q)),typeof j.componentDidUpdate=="function"&&(l.flags|=4),typeof j.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof j.componentDidUpdate!="function"||B===o.memoizedProps&&ae===o.memoizedState||(l.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||B===o.memoizedProps&&ae===o.memoizedState||(l.flags|=1024),l.memoizedProps=m,l.memoizedState=we),j.props=m,j.state=we,j.context=q,m=Z):(typeof j.componentDidUpdate!="function"||B===o.memoizedProps&&ae===o.memoizedState||(l.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||B===o.memoizedProps&&ae===o.memoizedState||(l.flags|=1024),m=!1)}return vm(o,l,d,m,_,b)}function vm(o,l,d,m,b,_){yS(o,l);var j=(l.flags&128)!==0;if(!m&&!j)return b&&k_(l,d,!1),ei(o,l,_);m=l.stateNode,P3.current=l;var B=j&&typeof d.getDerivedStateFromError!="function"?null:m.render();return l.flags|=1,o!==null&&j?(l.child=Oo(l,o.child,null,_),l.child=Oo(l,null,B,_)):cr(o,l,B,_),l.memoizedState=m.state,b&&k_(l,d,!0),l.child}function wS(o){var l=o.stateNode;l.pendingContext?__(o,l.pendingContext,l.pendingContext!==l.context):l.context&&__(o,l.context,!1),em(o,l.containerInfo)}function xS(o,l,d,m,b){return ko(),Kp(b),l.flags|=256,cr(o,l,d,m),l.child}var ym={dehydrated:null,treeContext:null,retryLane:0};function bm(o){return{baseLanes:o,cachePool:null,transitions:null}}function _S(o,l,d){var m=l.pendingProps,b=vt.current,_=!1,j=(l.flags&128)!==0,B;if((B=j)||(B=o!==null&&o.memoizedState===null?!1:(b&2)!==0),B?(_=!0,l.flags&=-129):(o===null||o.memoizedState!==null)&&(b|=1),rt(vt,b&1),o===null)return Vp(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):(j=m.children,o=m.fallback,_?(m=l.mode,_=l.child,j={mode:"hidden",children:j},(m&1)===0&&_!==null?(_.childLanes=0,_.pendingProps=j):_=ff(j,m,0,null),o=Pa(o,m,d,null),_.return=l,o.return=l,_.sibling=o,l.child=_,l.child.memoizedState=bm(d),l.memoizedState=ym,o):wm(l,j));if(b=o.memoizedState,b!==null&&(B=b.dehydrated,B!==null))return T3(o,l,j,m,B,b,d);if(_){_=m.fallback,j=l.mode,b=o.child,B=b.sibling;var q={mode:"hidden",children:m.children};return(j&1)===0&&l.child!==b?(m=l.child,m.childLanes=0,m.pendingProps=q,l.deletions=null):(m=Ki(b,q),m.subtreeFlags=b.subtreeFlags&14680064),B!==null?_=Ki(B,_):(_=Pa(_,j,d,null),_.flags|=2),_.return=l,m.return=l,m.sibling=_,l.child=m,m=_,_=l.child,j=o.child.memoizedState,j=j===null?bm(d):{baseLanes:j.baseLanes|d,cachePool:null,transitions:j.transitions},_.memoizedState=j,_.childLanes=o.childLanes&~d,l.memoizedState=ym,m}return _=o.child,o=_.sibling,m=Ki(_,{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 wm(o,l){return l=ff({mode:"visible",children:l},o.mode,0,null),l.return=o,o.child=l}function Jc(o,l,d,m){return m!==null&&Kp(m),Oo(l,o.child,null,d),o=wm(l,l.pendingProps.children),o.flags|=2,l.memoizedState=null,o}function T3(o,l,d,m,b,_,j){if(d)return l.flags&256?(l.flags&=-257,m=pm(Error(r(422))),Jc(o,l,j,m)):l.memoizedState!==null?(l.child=o.child,l.flags|=128,null):(_=m.fallback,b=l.mode,m=ff({mode:"visible",children:m.children},b,0,null),_=Pa(_,b,j,null),_.flags|=2,m.return=l,_.return=l,m.sibling=_,l.child=m,(l.mode&1)!==0&&Oo(l,o.child,null,j),l.child.memoizedState=bm(j),l.memoizedState=ym,_);if((l.mode&1)===0)return Jc(o,l,j,null);if(b.data==="$!"){if(m=b.nextSibling&&b.nextSibling.dataset,m)var B=m.dgst;return m=B,_=Error(r(419)),m=pm(_,m,void 0),Jc(o,l,j,m)}if(B=(j&o.childLanes)!==0,yr||B){if(m=Ft,m!==null){switch(j&-j){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|j))!==0?0:b,b!==0&&b!==_.retryLane&&(_.retryLane=b,Qn(o,b),hn(m,o,b,-1))}return Mm(),m=pm(Error(r(421))),Jc(o,l,j,m)}return b.data==="$?"?(l.flags|=128,l.child=o.child,l=U3.bind(null,o),b._reactRetry=l,null):(o=_.treeContext,Cr=Mi(b.nextSibling),jr=l,pt=!0,un=null,o!==null&&(Fr[Hr++]=Yn,Fr[Hr++]=Jn,Fr[Hr++]=ba,Yn=o.id,Jn=o.overflow,ba=l),l=wm(l,m.children),l.flags|=4096,l)}function SS(o,l,d){o.lanes|=l;var m=o.alternate;m!==null&&(m.lanes|=l),Jp(o.return,l,d)}function xm(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 kS(o,l,d){var m=l.pendingProps,b=m.revealOrder,_=m.tail;if(cr(o,l,m.children,d),m=vt.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&&SS(o,d,l);else if(o.tag===19)SS(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(rt(vt,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&&Hc(o)===null&&(b=d),d=d.sibling;d=b,d===null?(b=l.child,l.child=null):(b=d.sibling,d.sibling=null),xm(l,!1,b,d,_);break;case"backwards":for(d=null,b=l.child,l.child=null;b!==null;){if(o=b.alternate,o!==null&&Hc(o)===null){l.child=b;break}o=b.sibling,b.sibling=d,d=b,b=o}xm(l,!0,d,null,_);break;case"together":xm(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function Qc(o,l){(l.mode&1)===0&&o!==null&&(o.alternate=null,l.alternate=null,l.flags|=2)}function ei(o,l,d){if(o!==null&&(l.dependencies=o.dependencies),ka|=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=Ki(o,o.pendingProps),l.child=d,d.return=l;o.sibling!==null;)o=o.sibling,d=d.sibling=Ki(o,o.pendingProps),d.return=l;d.sibling=null}return l.child}function j3(o,l,d){switch(l.tag){case 3:wS(l),ko();break;case 5:D_(l);break;case 1:vr(l.type)&&$c(l);break;case 4:em(l,l.stateNode.containerInfo);break;case 10:var m=l.type._context,b=l.memoizedProps.value;rt(zc,m._currentValue),m._currentValue=b;break;case 13:if(m=l.memoizedState,m!==null)return m.dehydrated!==null?(rt(vt,vt.current&1),l.flags|=128,null):(d&l.child.childLanes)!==0?_S(o,l,d):(rt(vt,vt.current&1),o=ei(o,l,d),o!==null?o.sibling:null);rt(vt,vt.current&1);break;case 19:if(m=(d&l.childLanes)!==0,(o.flags&128)!==0){if(m)return kS(o,l,d);l.flags|=128}if(b=l.memoizedState,b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),rt(vt,vt.current),m)break;return null;case 22:case 23:return l.lanes=0,vS(o,l,d)}return ei(o,l,d)}var OS,_m,ES,AS;OS=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}},_m=function(){},ES=function(o,l,d,m){var b=o.memoizedProps;if(b!==m){o=l.stateNode,_a(jn.current);var _=null;switch(d){case"input":b=Ne(o,b),m=Ne(o,m),_=[];break;case"select":b=F({},b,{value:void 0}),m=F({},m,{value:void 0}),_=[];break;case"textarea":b=lt(o,b),m=lt(o,m),_=[];break;default:typeof b.onClick!="function"&&typeof m.onClick=="function"&&(o.onclick=Cc)}co(d,m);var j;d=null;for(Z in b)if(!m.hasOwnProperty(Z)&&b.hasOwnProperty(Z)&&b[Z]!=null)if(Z==="style"){var B=b[Z];for(j in B)B.hasOwnProperty(j)&&(d||(d={}),d[j]="")}else Z!=="dangerouslySetInnerHTML"&&Z!=="children"&&Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&Z!=="autoFocus"&&(i.hasOwnProperty(Z)?_||(_=[]):(_=_||[]).push(Z,null));for(Z in m){var q=m[Z];if(B=b!=null?b[Z]:void 0,m.hasOwnProperty(Z)&&q!==B&&(q!=null||B!=null))if(Z==="style")if(B){for(j in B)!B.hasOwnProperty(j)||q&&q.hasOwnProperty(j)||(d||(d={}),d[j]="");for(j in q)q.hasOwnProperty(j)&&B[j]!==q[j]&&(d||(d={}),d[j]=q[j])}else d||(_||(_=[]),_.push(Z,d)),d=q;else Z==="dangerouslySetInnerHTML"?(q=q?q.__html:void 0,B=B?B.__html:void 0,q!=null&&B!==q&&(_=_||[]).push(Z,q)):Z==="children"?typeof q!="string"&&typeof q!="number"||(_=_||[]).push(Z,""+q):Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&(i.hasOwnProperty(Z)?(q!=null&&Z==="onScroll"&&ut("scroll",o),_||B===q||(_=[])):(_=_||[]).push(Z,q))}d&&(_=_||[]).push("style",d);var Z=_;(l.updateQueue=Z)&&(l.flags|=4)}},AS=function(o,l,d,m){d!==m&&(l.flags|=4)};function kl(o,l){if(!pt)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 ar(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 C3(o,l,d){var m=l.pendingProps;switch(Hp(l),l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ar(l),null;case 1:return vr(l.type)&&Nc(),ar(l),null;case 3:return m=l.stateNode,Po(),ct(gr),ct(nr),nm(),m.pendingContext&&(m.context=m.pendingContext,m.pendingContext=null),(o===null||o.child===null)&&(Dc(l)?l.flags|=4:o===null||o.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,un!==null&&(Nm(un),un=null))),_m(o,l),ar(l),null;case 5:tm(l);var b=_a(bl.current);if(d=l.type,o!==null&&l.stateNode!=null)ES(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 ar(l),null}if(o=_a(jn.current),Dc(l)){m=l.stateNode,d=l.type;var _=l.memoizedProps;switch(m[Tn]=l,m[pl]=_,o=(l.mode&1)!==0,d){case"dialog":ut("cancel",m),ut("close",m);break;case"iframe":case"object":case"embed":ut("load",m);break;case"video":case"audio":for(b=0;b<fl.length;b++)ut(fl[b],m);break;case"source":ut("error",m);break;case"img":case"image":case"link":ut("error",m),ut("load",m);break;case"details":ut("toggle",m);break;case"input":dt(m,_),ut("invalid",m);break;case"select":m._wrapperState={wasMultiple:!!_.multiple},ut("invalid",m);break;case"textarea":Ar(m,_),ut("invalid",m)}co(d,_),b=null;for(var j in _)if(_.hasOwnProperty(j)){var B=_[j];j==="children"?typeof B=="string"?m.textContent!==B&&(_.suppressHydrationWarning!==!0&&jc(m.textContent,B,o),b=["children",B]):typeof B=="number"&&m.textContent!==""+B&&(_.suppressHydrationWarning!==!0&&jc(m.textContent,B,o),b=["children",""+B]):i.hasOwnProperty(j)&&B!=null&&j==="onScroll"&&ut("scroll",m)}switch(d){case"input":Oe(m),mr(m,_,!0);break;case"textarea":Oe(m),da(m);break;case"select":case"option":break;default:typeof _.onClick=="function"&&(m.onclick=Cc)}m=b,l.updateQueue=m,m!==null&&(l.flags|=4)}else{j=b.nodeType===9?b:b.ownerDocument,o==="http://www.w3.org/1999/xhtml"&&(o=ha(d)),o==="http://www.w3.org/1999/xhtml"?d==="script"?(o=j.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild)):typeof m.is=="string"?o=j.createElement(d,{is:m.is}):(o=j.createElement(d),d==="select"&&(j=o,m.multiple?j.multiple=!0:m.size&&(j.size=m.size))):o=j.createElementNS(o,d),o[Tn]=l,o[pl]=m,OS(o,l,!1,!1),l.stateNode=o;e:{switch(j=Ks(d,m),d){case"dialog":ut("cancel",o),ut("close",o),b=m;break;case"iframe":case"object":case"embed":ut("load",o),b=m;break;case"video":case"audio":for(b=0;b<fl.length;b++)ut(fl[b],o);b=m;break;case"source":ut("error",o),b=m;break;case"img":case"image":case"link":ut("error",o),ut("load",o),b=m;break;case"details":ut("toggle",o),b=m;break;case"input":dt(o,m),b=Ne(o,m),ut("invalid",o);break;case"option":b=m;break;case"select":o._wrapperState={wasMultiple:!!m.multiple},b=F({},m,{value:void 0}),ut("invalid",o);break;case"textarea":Ar(o,m),b=lt(o,m),ut("invalid",o);break;default:b=m}co(d,b),B=b;for(_ in B)if(B.hasOwnProperty(_)){var q=B[_];_==="style"?cc(o,q):_==="dangerouslySetInnerHTML"?(q=q?q.__html:void 0,q!=null&&uo(o,q)):_==="children"?typeof q=="string"?(d!=="textarea"||q!=="")&&zr(o,q):typeof q=="number"&&zr(o,""+q):_!=="suppressContentEditableWarning"&&_!=="suppressHydrationWarning"&&_!=="autoFocus"&&(i.hasOwnProperty(_)?q!=null&&_==="onScroll"&&ut("scroll",o):q!=null&&A(o,_,q,j))}switch(d){case"input":Oe(o),mr(o,m,!1);break;case"textarea":Oe(o),da(o);break;case"option":m.value!=null&&o.setAttribute("value",""+pe(m.value));break;case"select":o.multiple=!!m.multiple,_=m.value,_!=null?tr(o,!!m.multiple,_,!1):m.defaultValue!=null&&tr(o,!!m.multiple,m.defaultValue,!0);break;default:typeof b.onClick=="function"&&(o.onclick=Cc)}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 ar(l),null;case 6:if(o&&l.stateNode!=null)AS(o,l,o.memoizedProps,m);else{if(typeof m!="string"&&l.stateNode===null)throw Error(r(166));if(d=_a(bl.current),_a(jn.current),Dc(l)){if(m=l.stateNode,d=l.memoizedProps,m[Tn]=l,(_=m.nodeValue!==d)&&(o=jr,o!==null))switch(o.tag){case 3:jc(m.nodeValue,d,(o.mode&1)!==0);break;case 5:o.memoizedProps.suppressHydrationWarning!==!0&&jc(m.nodeValue,d,(o.mode&1)!==0)}_&&(l.flags|=4)}else m=(d.nodeType===9?d:d.ownerDocument).createTextNode(m),m[Tn]=l,l.stateNode=m}return ar(l),null;case 13:if(ct(vt),m=l.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(pt&&Cr!==null&&(l.mode&1)!==0&&(l.flags&128)===0)j_(),ko(),l.flags|=98560,_=!1;else if(_=Dc(l),m!==null&&m.dehydrated!==null){if(o===null){if(!_)throw Error(r(318));if(_=l.memoizedState,_=_!==null?_.dehydrated:null,!_)throw Error(r(317));_[Tn]=l}else ko(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;ar(l),_=!1}else un!==null&&(Nm(un),un=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||(vt.current&1)!==0?$t===0&&($t=3):Mm())),l.updateQueue!==null&&(l.flags|=4),ar(l),null);case 4:return Po(),_m(o,l),o===null&&dl(l.stateNode.containerInfo),ar(l),null;case 10:return Yp(l.type._context),ar(l),null;case 17:return vr(l.type)&&Nc(),ar(l),null;case 19:if(ct(vt),_=l.memoizedState,_===null)return ar(l),null;if(m=(l.flags&128)!==0,j=_.rendering,j===null)if(m)kl(_,!1);else{if($t!==0||o!==null&&(o.flags&128)!==0)for(o=l.child;o!==null;){if(j=Hc(o),j!==null){for(l.flags|=128,kl(_,!1),m=j.updateQueue,m!==null&&(l.updateQueue=m,l.flags|=4),l.subtreeFlags=0,m=d,d=l.child;d!==null;)_=d,o=m,_.flags&=14680066,j=_.alternate,j===null?(_.childLanes=0,_.lanes=o,_.child=null,_.subtreeFlags=0,_.memoizedProps=null,_.memoizedState=null,_.updateQueue=null,_.dependencies=null,_.stateNode=null):(_.childLanes=j.childLanes,_.lanes=j.lanes,_.child=j.child,_.subtreeFlags=0,_.deletions=null,_.memoizedProps=j.memoizedProps,_.memoizedState=j.memoizedState,_.updateQueue=j.updateQueue,_.type=j.type,o=j.dependencies,_.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),d=d.sibling;return rt(vt,vt.current&1|2),l.child}o=o.sibling}_.tail!==null&&kt()>Ro&&(l.flags|=128,m=!0,kl(_,!1),l.lanes=4194304)}else{if(!m)if(o=Hc(j),o!==null){if(l.flags|=128,m=!0,d=o.updateQueue,d!==null&&(l.updateQueue=d,l.flags|=4),kl(_,!0),_.tail===null&&_.tailMode==="hidden"&&!j.alternate&&!pt)return ar(l),null}else 2*kt()-_.renderingStartTime>Ro&&d!==1073741824&&(l.flags|=128,m=!0,kl(_,!1),l.lanes=4194304);_.isBackwards?(j.sibling=l.child,l.child=j):(d=_.last,d!==null?d.sibling=j:l.child=j,_.last=j)}return _.tail!==null?(l=_.tail,_.rendering=l,_.tail=l.sibling,_.renderingStartTime=kt(),l.sibling=null,d=vt.current,rt(vt,m?d&1|2:d&1),l):(ar(l),null);case 22:case 23:return Im(),m=l.memoizedState!==null,o!==null&&o.memoizedState!==null!==m&&(l.flags|=8192),m&&(l.mode&1)!==0?(Rr&1073741824)!==0&&(ar(l),l.subtreeFlags&6&&(l.flags|=8192)):ar(l),null;case 24:return null;case 25:return null}throw Error(r(156,l.tag))}function R3(o,l){switch(Hp(l),l.tag){case 1:return vr(l.type)&&Nc(),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return Po(),ct(gr),ct(nr),nm(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 5:return tm(l),null;case 13:if(ct(vt),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(r(340));ko()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return ct(vt),null;case 4:return Po(),null;case 10:return Yp(l.type._context),null;case 22:case 23:return Im(),null;case 24:return null;default:return null}}var Zc=!1,or=!1,N3=typeof WeakSet=="function"?WeakSet:Set,ve=null;function jo(o,l){var d=o.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(m){wt(o,l,m)}else d.current=null}function Sm(o,l,d){try{d()}catch(m){wt(o,l,m)}}var PS=!1;function $3(o,l){if(Ip=bc,o=o_(),Ap(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 j=0,B=-1,q=-1,Z=0,oe=0,le=o,ae=null;t:for(;;){for(var me;le!==d||b!==0&&le.nodeType!==3||(B=j+b),le!==_||m!==0&&le.nodeType!==3||(q=j+m),le.nodeType===3&&(j+=le.nodeValue.length),(me=le.firstChild)!==null;)ae=le,le=me;for(;;){if(le===o)break t;if(ae===d&&++Z===b&&(B=j),ae===_&&++oe===m&&(q=j),(me=le.nextSibling)!==null)break;le=ae,ae=le.parentNode}le=me}d=B===-1||q===-1?null:{start:B,end:q}}else d=null}d=d||{start:0,end:0}}else d=null;for(Mp={focusedElem:o,selectionRange:d},bc=!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,Ot=we.memoizedState,Y=l.stateNode,H=Y.getSnapshotBeforeUpdate(l.elementType===l.type?Se:cn(l.type,Se),Ot);Y.__reactInternalSnapshotBeforeUpdate=H}break;case 3:var J=l.stateNode.containerInfo;J.nodeType===1?J.textContent="":J.nodeType===9&&J.documentElement&&J.removeChild(J.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(ce){wt(l,l.return,ce)}if(o=l.sibling,o!==null){o.return=l.return,ve=o;break}ve=l.return}return we=PS,PS=!1,we}function Ol(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&&Sm(l,d,_)}b=b.next}while(b!==m)}}function ef(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 km(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 TS(o){var l=o.alternate;l!==null&&(o.alternate=null,TS(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&(delete l[Tn],delete l[pl],delete l[zp],delete l[g3],delete l[v3])),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 jS(o){return o.tag===5||o.tag===3||o.tag===4}function CS(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||jS(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 Om(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=Cc));else if(m!==4&&(o=o.child,o!==null))for(Om(o,l,d),o=o.sibling;o!==null;)Om(o,l,d),o=o.sibling}function Em(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(Em(o,l,d),o=o.sibling;o!==null;)Em(o,l,d),o=o.sibling}var Yt=null,fn=!1;function Ui(o,l,d){for(d=d.child;d!==null;)RS(o,l,d),d=d.sibling}function RS(o,l,d){if(Pn&&typeof Pn.onCommitFiberUnmount=="function")try{Pn.onCommitFiberUnmount(hc,d)}catch{}switch(d.tag){case 5:or||jo(d,l);case 6:var m=Yt,b=fn;Yt=null,Ui(o,l,d),Yt=m,fn=b,Yt!==null&&(fn?(o=Yt,d=d.stateNode,o.nodeType===8?o.parentNode.removeChild(d):o.removeChild(d)):Yt.removeChild(d.stateNode));break;case 18:Yt!==null&&(fn?(o=Yt,d=d.stateNode,o.nodeType===8?Bp(o.parentNode,d):o.nodeType===1&&Bp(o,d),nl(o)):Bp(Yt,d.stateNode));break;case 4:m=Yt,b=fn,Yt=d.stateNode.containerInfo,fn=!0,Ui(o,l,d),Yt=m,fn=b;break;case 0:case 11:case 14:case 15:if(!or&&(m=d.updateQueue,m!==null&&(m=m.lastEffect,m!==null))){b=m=m.next;do{var _=b,j=_.destroy;_=_.tag,j!==void 0&&((_&2)!==0||(_&4)!==0)&&Sm(d,l,j),b=b.next}while(b!==m)}Ui(o,l,d);break;case 1:if(!or&&(jo(d,l),m=d.stateNode,typeof m.componentWillUnmount=="function"))try{m.props=d.memoizedProps,m.state=d.memoizedState,m.componentWillUnmount()}catch(B){wt(d,l,B)}Ui(o,l,d);break;case 21:Ui(o,l,d);break;case 22:d.mode&1?(or=(m=or)||d.memoizedState!==null,Ui(o,l,d),or=m):Ui(o,l,d);break;default:Ui(o,l,d)}}function NS(o){var l=o.updateQueue;if(l!==null){o.updateQueue=null;var d=o.stateNode;d===null&&(d=o.stateNode=new N3),l.forEach(function(m){var b=F3.bind(null,o,m);d.has(m)||(d.add(m),m.then(b,b))})}}function dn(o,l){var d=l.deletions;if(d!==null)for(var m=0;m<d.length;m++){var b=d[m];try{var _=o,j=l,B=j;e:for(;B!==null;){switch(B.tag){case 5:Yt=B.stateNode,fn=!1;break e;case 3:Yt=B.stateNode.containerInfo,fn=!0;break e;case 4:Yt=B.stateNode.containerInfo,fn=!0;break e}B=B.return}if(Yt===null)throw Error(r(160));RS(_,j,b),Yt=null,fn=!1;var q=b.alternate;q!==null&&(q.return=null),b.return=null}catch(Z){wt(b,l,Z)}}if(l.subtreeFlags&12854)for(l=l.child;l!==null;)$S(l,o),l=l.sibling}function $S(o,l){var d=o.alternate,m=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:if(dn(l,o),Rn(o),m&4){try{Ol(3,o,o.return),ef(3,o)}catch(Se){wt(o,o.return,Se)}try{Ol(5,o,o.return)}catch(Se){wt(o,o.return,Se)}}break;case 1:dn(l,o),Rn(o),m&512&&d!==null&&jo(d,d.return);break;case 5:if(dn(l,o),Rn(o),m&512&&d!==null&&jo(d,d.return),o.flags&32){var b=o.stateNode;try{zr(b,"")}catch(Se){wt(o,o.return,Se)}}if(m&4&&(b=o.stateNode,b!=null)){var _=o.memoizedProps,j=d!==null?d.memoizedProps:_,B=o.type,q=o.updateQueue;if(o.updateQueue=null,q!==null)try{B==="input"&&_.type==="radio"&&_.name!=null&&st(b,_),Ks(B,j);var Z=Ks(B,_);for(j=0;j<q.length;j+=2){var oe=q[j],le=q[j+1];oe==="style"?cc(b,le):oe==="dangerouslySetInnerHTML"?uo(b,le):oe==="children"?zr(b,le):A(b,oe,le,Z)}switch(B){case"input":ht(b,_);break;case"textarea":fa(b,_);break;case"select":var ae=b._wrapperState.wasMultiple;b._wrapperState.wasMultiple=!!_.multiple;var me=_.value;me!=null?tr(b,!!_.multiple,me,!1):ae!==!!_.multiple&&(_.defaultValue!=null?tr(b,!!_.multiple,_.defaultValue,!0):tr(b,!!_.multiple,_.multiple?[]:"",!1))}b[pl]=_}catch(Se){wt(o,o.return,Se)}}break;case 6:if(dn(l,o),Rn(o),m&4){if(o.stateNode===null)throw Error(r(162));b=o.stateNode,_=o.memoizedProps;try{b.nodeValue=_}catch(Se){wt(o,o.return,Se)}}break;case 3:if(dn(l,o),Rn(o),m&4&&d!==null&&d.memoizedState.isDehydrated)try{nl(l.containerInfo)}catch(Se){wt(o,o.return,Se)}break;case 4:dn(l,o),Rn(o);break;case 13:dn(l,o),Rn(o),b=o.child,b.flags&8192&&(_=b.memoizedState!==null,b.stateNode.isHidden=_,!_||b.alternate!==null&&b.alternate.memoizedState!==null||(Tm=kt())),m&4&&NS(o);break;case 22:if(oe=d!==null&&d.memoizedState!==null,o.mode&1?(or=(Z=or)||oe,dn(l,o),or=Z):dn(l,o),Rn(o),m&8192){if(Z=o.memoizedState!==null,(o.stateNode.isHidden=Z)&&!oe&&(o.mode&1)!==0)for(ve=o,oe=o.child;oe!==null;){for(le=ve=oe;ve!==null;){switch(ae=ve,me=ae.child,ae.tag){case 0:case 11:case 14:case 15:Ol(4,ae,ae.return);break;case 1:jo(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){wt(m,d,Se)}}break;case 5:jo(ae,ae.return);break;case 22:if(ae.memoizedState!==null){LS(le);continue}}me!==null?(me.return=ae,ve=me):LS(le)}oe=oe.sibling}e:for(oe=null,le=o;;){if(le.tag===5){if(oe===null){oe=le;try{b=le.stateNode,Z?(_=b.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none"):(B=le.stateNode,q=le.memoizedProps.style,j=q!=null&&q.hasOwnProperty("display")?q.display:null,B.style.display=uc("display",j))}catch(Se){wt(o,o.return,Se)}}}else if(le.tag===6){if(oe===null)try{le.stateNode.nodeValue=Z?"":le.memoizedProps}catch(Se){wt(o,o.return,Se)}}else if((le.tag!==22&&le.tag!==23||le.memoizedState===null||le===o)&&le.child!==null){le.child.return=le,le=le.child;continue}if(le===o)break e;for(;le.sibling===null;){if(le.return===null||le.return===o)break e;oe===le&&(oe=null),le=le.return}oe===le&&(oe=null),le.sibling.return=le.return,le=le.sibling}}break;case 19:dn(l,o),Rn(o),m&4&&NS(o);break;case 21:break;default:dn(l,o),Rn(o)}}function Rn(o){var l=o.flags;if(l&2){try{e:{for(var d=o.return;d!==null;){if(jS(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&&(zr(b,""),m.flags&=-33);var _=CS(o);Em(o,_,b);break;case 3:case 4:var j=m.stateNode.containerInfo,B=CS(o);Om(o,B,j);break;default:throw Error(r(161))}}catch(q){wt(o,o.return,q)}o.flags&=-3}l&4096&&(o.flags&=-4097)}function I3(o,l,d){ve=o,IS(o)}function IS(o,l,d){for(var m=(o.mode&1)!==0;ve!==null;){var b=ve,_=b.child;if(b.tag===22&&m){var j=b.memoizedState!==null||Zc;if(!j){var B=b.alternate,q=B!==null&&B.memoizedState!==null||or;B=Zc;var Z=or;if(Zc=j,(or=q)&&!Z)for(ve=b;ve!==null;)j=ve,q=j.child,j.tag===22&&j.memoizedState!==null?DS(b):q!==null?(q.return=j,ve=q):DS(b);for(;_!==null;)ve=_,IS(_),_=_.sibling;ve=b,Zc=B,or=Z}MS(o)}else(b.subtreeFlags&8772)!==0&&_!==null?(_.return=b,ve=_):MS(o)}}function MS(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:or||ef(5,l);break;case 1:var m=l.stateNode;if(l.flags&4&&!or)if(d===null)m.componentDidMount();else{var b=l.elementType===l.type?d.memoizedProps:cn(l.type,d.memoizedProps);m.componentDidUpdate(b,d.memoizedState,m.__reactInternalSnapshotBeforeUpdate)}var _=l.updateQueue;_!==null&&L_(l,_,m);break;case 3:var j=l.updateQueue;if(j!==null){if(d=null,l.child!==null)switch(l.child.tag){case 5:d=l.child.stateNode;break;case 1:d=l.child.stateNode}L_(l,j,d)}break;case 5:var B=l.stateNode;if(d===null&&l.flags&4){d=B;var q=l.memoizedProps;switch(l.type){case"button":case"input":case"select":case"textarea":q.autoFocus&&d.focus();break;case"img":q.src&&(d.src=q.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(l.memoizedState===null){var Z=l.alternate;if(Z!==null){var oe=Z.memoizedState;if(oe!==null){var le=oe.dehydrated;le!==null&&nl(le)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}or||l.flags&512&&km(l)}catch(ae){wt(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 LS(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 DS(o){for(;ve!==null;){var l=ve;try{switch(l.tag){case 0:case 11:case 15:var d=l.return;try{ef(4,l)}catch(q){wt(l,d,q)}break;case 1:var m=l.stateNode;if(typeof m.componentDidMount=="function"){var b=l.return;try{m.componentDidMount()}catch(q){wt(l,b,q)}}var _=l.return;try{km(l)}catch(q){wt(l,_,q)}break;case 5:var j=l.return;try{km(l)}catch(q){wt(l,j,q)}}}catch(q){wt(l,l.return,q)}if(l===o){ve=null;break}var B=l.sibling;if(B!==null){B.return=l.return,ve=B;break}ve=l.return}}var M3=Math.ceil,tf=T.ReactCurrentDispatcher,Am=T.ReactCurrentOwner,Kr=T.ReactCurrentBatchConfig,We=0,Ft=null,Pt=null,Jt=0,Rr=0,Co=Li(0),$t=0,El=null,ka=0,rf=0,Pm=0,Al=null,br=null,Tm=0,Ro=1/0,ti=null,nf=!1,jm=null,Fi=null,af=!1,Hi=null,of=0,Pl=0,Cm=null,sf=-1,lf=0;function fr(){return(We&6)!==0?kt():sf!==-1?sf:sf=kt()}function Wi(o){return(o.mode&1)===0?1:(We&2)!==0&&Jt!==0?Jt&-Jt:b3.transition!==null?(lf===0&&(lf=C1()),lf):(o=Ye,o!==0||(o=window.event,o=o===void 0?16:z1(o.type)),o)}function hn(o,l,d,m){if(50<Pl)throw Pl=0,Cm=null,Error(r(185));Qs(o,d,m),((We&2)===0||o!==Ft)&&(o===Ft&&((We&2)===0&&(rf|=d),$t===4&&Vi(o,Jt)),wr(o,m),d===1&&We===0&&(l.mode&1)===0&&(Ro=kt()+500,Ic&&Bi()))}function wr(o,l){var d=o.callbackNode;bM(o,l);var m=gc(o,o===Ft?Jt:0);if(m===0)d!==null&&P1(d),o.callbackNode=null,o.callbackPriority=0;else if(l=m&-m,o.callbackPriority!==l){if(d!=null&&P1(d),l===1)o.tag===0?y3(zS.bind(null,o)):O_(zS.bind(null,o)),p3(function(){(We&6)===0&&Bi()}),d=null;else{switch(R1(m)){case 1:d=cp;break;case 4:d=T1;break;case 16:d=dc;break;case 536870912:d=j1;break;default:d=dc}d=GS(d,BS.bind(null,o))}o.callbackPriority=l,o.callbackNode=d}}function BS(o,l){if(sf=-1,lf=0,(We&6)!==0)throw Error(r(327));var d=o.callbackNode;if(No()&&o.callbackNode!==d)return null;var m=gc(o,o===Ft?Jt:0);if(m===0)return null;if((m&30)!==0||(m&o.expiredLanes)!==0||l)l=uf(o,m);else{l=m;var b=We;We|=2;var _=US();(Ft!==o||Jt!==l)&&(ti=null,Ro=kt()+500,Ea(o,l));do try{B3();break}catch(B){qS(o,B)}while(!0);Xp(),tf.current=_,We=b,Pt!==null?l=0:(Ft=null,Jt=0,l=$t)}if(l!==0){if(l===2&&(b=fp(o),b!==0&&(m=b,l=Rm(o,b))),l===1)throw d=El,Ea(o,0),Vi(o,m),wr(o,kt()),d;if(l===6)Vi(o,m);else{if(b=o.current.alternate,(m&30)===0&&!L3(b)&&(l=uf(o,m),l===2&&(_=fp(o),_!==0&&(m=_,l=Rm(o,_))),l===1))throw d=El,Ea(o,0),Vi(o,m),wr(o,kt()),d;switch(o.finishedWork=b,o.finishedLanes=m,l){case 0:case 1:throw Error(r(345));case 2:Aa(o,br,ti);break;case 3:if(Vi(o,m),(m&130023424)===m&&(l=Tm+500-kt(),10<l)){if(gc(o,0)!==0)break;if(b=o.suspendedLanes,(b&m)!==m){fr(),o.pingedLanes|=o.suspendedLanes&b;break}o.timeoutHandle=Dp(Aa.bind(null,o,br,ti),l);break}Aa(o,br,ti);break;case 4:if(Vi(o,m),(m&4194240)===m)break;for(l=o.eventTimes,b=-1;0<m;){var j=31-sn(m);_=1<<j,j=l[j],j>b&&(b=j),m&=~_}if(m=b,m=kt()-m,m=(120>m?120:480>m?480:1080>m?1080:1920>m?1920:3e3>m?3e3:4320>m?4320:1960*M3(m/1960))-m,10<m){o.timeoutHandle=Dp(Aa.bind(null,o,br,ti),m);break}Aa(o,br,ti);break;case 5:Aa(o,br,ti);break;default:throw Error(r(329))}}}return wr(o,kt()),o.callbackNode===d?BS.bind(null,o):null}function Rm(o,l){var d=Al;return o.current.memoizedState.isDehydrated&&(Ea(o,l).flags|=256),o=uf(o,l),o!==2&&(l=br,br=d,l!==null&&Nm(l)),o}function Nm(o){br===null?br=o:br.push.apply(br,o)}function L3(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(!ln(_(),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 Vi(o,l){for(l&=~Pm,l&=~rf,o.suspendedLanes|=l,o.pingedLanes&=~l,o=o.expirationTimes;0<l;){var d=31-sn(l),m=1<<d;o[d]=-1,l&=~m}}function zS(o){if((We&6)!==0)throw Error(r(327));No();var l=gc(o,0);if((l&1)===0)return wr(o,kt()),null;var d=uf(o,l);if(o.tag!==0&&d===2){var m=fp(o);m!==0&&(l=m,d=Rm(o,m))}if(d===1)throw d=El,Ea(o,0),Vi(o,l),wr(o,kt()),d;if(d===6)throw Error(r(345));return o.finishedWork=o.current.alternate,o.finishedLanes=l,Aa(o,br,ti),wr(o,kt()),null}function $m(o,l){var d=We;We|=1;try{return o(l)}finally{We=d,We===0&&(Ro=kt()+500,Ic&&Bi())}}function Oa(o){Hi!==null&&Hi.tag===0&&(We&6)===0&&No();var l=We;We|=1;var d=Kr.transition,m=Ye;try{if(Kr.transition=null,Ye=1,o)return o()}finally{Ye=m,Kr.transition=d,We=l,(We&6)===0&&Bi()}}function Im(){Rr=Co.current,ct(Co)}function Ea(o,l){o.finishedWork=null,o.finishedLanes=0;var d=o.timeoutHandle;if(d!==-1&&(o.timeoutHandle=-1,h3(d)),Pt!==null)for(d=Pt.return;d!==null;){var m=d;switch(Hp(m),m.tag){case 1:m=m.type.childContextTypes,m!=null&&Nc();break;case 3:Po(),ct(gr),ct(nr),nm();break;case 5:tm(m);break;case 4:Po();break;case 13:ct(vt);break;case 19:ct(vt);break;case 10:Yp(m.type._context);break;case 22:case 23:Im()}d=d.return}if(Ft=o,Pt=o=Ki(o.current,null),Jt=Rr=l,$t=0,El=null,Pm=rf=ka=0,br=Al=null,xa!==null){for(l=0;l<xa.length;l++)if(d=xa[l],m=d.interleaved,m!==null){d.interleaved=null;var b=m.next,_=d.pending;if(_!==null){var j=_.next;_.next=b,m.next=j}d.pending=m}xa=null}return o}function qS(o,l){do{var d=Pt;try{if(Xp(),Wc.current=Xc,Vc){for(var m=yt.memoizedState;m!==null;){var b=m.queue;b!==null&&(b.pending=null),m=m.next}Vc=!1}if(Sa=0,Ut=Nt=yt=null,wl=!1,xl=0,Am.current=null,d===null||d.return===null){$t=1,El=l,Pt=null;break}e:{var _=o,j=d.return,B=d,q=l;if(l=Jt,B.flags|=32768,q!==null&&typeof q=="object"&&typeof q.then=="function"){var Z=q,oe=B,le=oe.tag;if((oe.mode&1)===0&&(le===0||le===11||le===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=dS(j);if(me!==null){me.flags&=-257,hS(me,j,B,_,l),me.mode&1&&fS(_,Z,l),l=me,q=Z;var we=l.updateQueue;if(we===null){var Se=new Set;Se.add(q),l.updateQueue=Se}else we.add(q);break e}else{if((l&1)===0){fS(_,Z,l),Mm();break e}q=Error(r(426))}}else if(pt&&B.mode&1){var Ot=dS(j);if(Ot!==null){(Ot.flags&65536)===0&&(Ot.flags|=256),hS(Ot,j,B,_,l),Kp(To(q,B));break e}}_=q=To(q,B),$t!==4&&($t=2),Al===null?Al=[_]:Al.push(_),_=j;do{switch(_.tag){case 3:_.flags|=65536,l&=-l,_.lanes|=l;var Y=uS(_,q,l);M_(_,Y);break e;case 1:B=q;var H=_.type,J=_.stateNode;if((_.flags&128)===0&&(typeof H.getDerivedStateFromError=="function"||J!==null&&typeof J.componentDidCatch=="function"&&(Fi===null||!Fi.has(J)))){_.flags|=65536,l&=-l,_.lanes|=l;var ce=cS(_,B,l);M_(_,ce);break e}}_=_.return}while(_!==null)}HS(d)}catch(ke){l=ke,Pt===d&&d!==null&&(Pt=d=d.return);continue}break}while(!0)}function US(){var o=tf.current;return tf.current=Xc,o===null?Xc:o}function Mm(){($t===0||$t===3||$t===2)&&($t=4),Ft===null||(ka&268435455)===0&&(rf&268435455)===0||Vi(Ft,Jt)}function uf(o,l){var d=We;We|=2;var m=US();(Ft!==o||Jt!==l)&&(ti=null,Ea(o,l));do try{D3();break}catch(b){qS(o,b)}while(!0);if(Xp(),We=d,tf.current=m,Pt!==null)throw Error(r(261));return Ft=null,Jt=0,$t}function D3(){for(;Pt!==null;)FS(Pt)}function B3(){for(;Pt!==null&&!cM();)FS(Pt)}function FS(o){var l=KS(o.alternate,o,Rr);o.memoizedProps=o.pendingProps,l===null?HS(o):Pt=l,Am.current=null}function HS(o){var l=o;do{var d=l.alternate;if(o=l.return,(l.flags&32768)===0){if(d=C3(d,l,Rr),d!==null){Pt=d;return}}else{if(d=R3(d,l),d!==null){d.flags&=32767,Pt=d;return}if(o!==null)o.flags|=32768,o.subtreeFlags=0,o.deletions=null;else{$t=6,Pt=null;return}}if(l=l.sibling,l!==null){Pt=l;return}Pt=l=o}while(l!==null);$t===0&&($t=5)}function Aa(o,l,d){var m=Ye,b=Kr.transition;try{Kr.transition=null,Ye=1,z3(o,l,d,m)}finally{Kr.transition=b,Ye=m}return null}function z3(o,l,d,m){do No();while(Hi!==null);if((We&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(wM(o,_),o===Ft&&(Pt=Ft=null,Jt=0),(d.subtreeFlags&2064)===0&&(d.flags&2064)===0||af||(af=!0,GS(dc,function(){return No(),null})),_=(d.flags&15990)!==0,(d.subtreeFlags&15990)!==0||_){_=Kr.transition,Kr.transition=null;var j=Ye;Ye=1;var B=We;We|=4,Am.current=null,$3(o,d),$S(d,o),o3(Mp),bc=!!Ip,Mp=Ip=null,o.current=d,I3(d),fM(),We=B,Ye=j,Kr.transition=_}else o.current=d;if(af&&(af=!1,Hi=o,of=b),_=o.pendingLanes,_===0&&(Fi=null),pM(d.stateNode),wr(o,kt()),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(nf)throw nf=!1,o=jm,jm=null,o;return(of&1)!==0&&o.tag!==0&&No(),_=o.pendingLanes,(_&1)!==0?o===Cm?Pl++:(Pl=0,Cm=o):Pl=0,Bi(),null}function No(){if(Hi!==null){var o=R1(of),l=Kr.transition,d=Ye;try{if(Kr.transition=null,Ye=16>o?16:o,Hi===null)var m=!1;else{if(o=Hi,Hi=null,of=0,(We&6)!==0)throw Error(r(331));var b=We;for(We|=4,ve=o.current;ve!==null;){var _=ve,j=_.child;if((ve.flags&16)!==0){var B=_.deletions;if(B!==null){for(var q=0;q<B.length;q++){var Z=B[q];for(ve=Z;ve!==null;){var oe=ve;switch(oe.tag){case 0:case 11:case 15:Ol(8,oe,_)}var le=oe.child;if(le!==null)le.return=oe,ve=le;else for(;ve!==null;){oe=ve;var ae=oe.sibling,me=oe.return;if(TS(oe),oe===Z){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 Ot=Se.sibling;Se.sibling=null,Se=Ot}while(Se!==null)}}ve=_}}if((_.subtreeFlags&2064)!==0&&j!==null)j.return=_,ve=j;else e:for(;ve!==null;){if(_=ve,(_.flags&2048)!==0)switch(_.tag){case 0:case 11:case 15:Ol(9,_,_.return)}var Y=_.sibling;if(Y!==null){Y.return=_.return,ve=Y;break e}ve=_.return}}var H=o.current;for(ve=H;ve!==null;){j=ve;var J=j.child;if((j.subtreeFlags&2064)!==0&&J!==null)J.return=j,ve=J;else e:for(j=H;ve!==null;){if(B=ve,(B.flags&2048)!==0)try{switch(B.tag){case 0:case 11:case 15:ef(9,B)}}catch(ke){wt(B,B.return,ke)}if(B===j){ve=null;break e}var ce=B.sibling;if(ce!==null){ce.return=B.return,ve=ce;break e}ve=B.return}}if(We=b,Bi(),Pn&&typeof Pn.onPostCommitFiberRoot=="function")try{Pn.onPostCommitFiberRoot(hc,o)}catch{}m=!0}return m}finally{Ye=d,Kr.transition=l}}return!1}function WS(o,l,d){l=To(d,l),l=uS(o,l,1),o=qi(o,l,1),l=fr(),o!==null&&(Qs(o,1,l),wr(o,l))}function wt(o,l,d){if(o.tag===3)WS(o,o,d);else for(;l!==null;){if(l.tag===3){WS(l,o,d);break}else if(l.tag===1){var m=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(Fi===null||!Fi.has(m))){o=To(d,o),o=cS(l,o,1),l=qi(l,o,1),o=fr(),l!==null&&(Qs(l,1,o),wr(l,o));break}}l=l.return}}function q3(o,l,d){var m=o.pingCache;m!==null&&m.delete(l),l=fr(),o.pingedLanes|=o.suspendedLanes&d,Ft===o&&(Jt&d)===d&&($t===4||$t===3&&(Jt&130023424)===Jt&&500>kt()-Tm?Ea(o,0):Pm|=d),wr(o,l)}function VS(o,l){l===0&&((o.mode&1)===0?l=1:(l=mc,mc<<=1,(mc&130023424)===0&&(mc=4194304)));var d=fr();o=Qn(o,l),o!==null&&(Qs(o,l,d),wr(o,d))}function U3(o){var l=o.memoizedState,d=0;l!==null&&(d=l.retryLane),VS(o,d)}function F3(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),VS(o,d)}var KS;KS=function(o,l,d){if(o!==null)if(o.memoizedProps!==l.pendingProps||gr.current)yr=!0;else{if((o.lanes&d)===0&&(l.flags&128)===0)return yr=!1,j3(o,l,d);yr=(o.flags&131072)!==0}else yr=!1,pt&&(l.flags&1048576)!==0&&E_(l,Lc,l.index);switch(l.lanes=0,l.tag){case 2:var m=l.type;Qc(o,l),o=l.pendingProps;var b=xo(l,nr.current);Ao(l,d),b=om(null,l,m,o,b,d);var _=sm();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,vr(m)?(_=!0,$c(l)):_=!1,l.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,Zp(l),b.updater=Yc,l.stateNode=b,b._reactInternals=l,hm(l,m,o,d),l=vm(null,l,m,!0,_,d)):(l.tag=0,pt&&_&&Fp(l),cr(null,l,b,d),l=l.child),l;case 16:m=l.elementType;e:{switch(Qc(o,l),o=l.pendingProps,b=m._init,m=b(m._payload),l.type=m,b=l.tag=W3(m),o=cn(m,o),b){case 0:l=gm(null,l,m,o,d);break e;case 1:l=bS(null,l,m,o,d);break e;case 11:l=pS(null,l,m,o,d);break e;case 14:l=mS(null,l,m,cn(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:cn(m,b),gm(o,l,m,b,d);case 1:return m=l.type,b=l.pendingProps,b=l.elementType===m?b:cn(m,b),bS(o,l,m,b,d);case 3:e:{if(wS(l),o===null)throw Error(r(387));m=l.pendingProps,_=l.memoizedState,b=_.element,I_(o,l),Fc(l,m,null,d);var j=l.memoizedState;if(m=j.element,_.isDehydrated)if(_={element:m,isDehydrated:!1,cache:j.cache,pendingSuspenseBoundaries:j.pendingSuspenseBoundaries,transitions:j.transitions},l.updateQueue.baseState=_,l.memoizedState=_,l.flags&256){b=To(Error(r(423)),l),l=xS(o,l,m,d,b);break e}else if(m!==b){b=To(Error(r(424)),l),l=xS(o,l,m,d,b);break e}else for(Cr=Mi(l.stateNode.containerInfo.firstChild),jr=l,pt=!0,un=null,d=N_(l,null,m,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(ko(),m===b){l=ei(o,l,d);break e}cr(o,l,m,d)}l=l.child}return l;case 5:return D_(l),o===null&&Vp(l),m=l.type,b=l.pendingProps,_=o!==null?o.memoizedProps:null,j=b.children,Lp(m,b)?j=null:_!==null&&Lp(m,_)&&(l.flags|=32),yS(o,l),cr(o,l,j,d),l.child;case 6:return o===null&&Vp(l),null;case 13:return _S(o,l,d);case 4:return em(l,l.stateNode.containerInfo),m=l.pendingProps,o===null?l.child=Oo(l,null,m,d):cr(o,l,m,d),l.child;case 11:return m=l.type,b=l.pendingProps,b=l.elementType===m?b:cn(m,b),pS(o,l,m,b,d);case 7:return cr(o,l,l.pendingProps,d),l.child;case 8:return cr(o,l,l.pendingProps.children,d),l.child;case 12:return cr(o,l,l.pendingProps.children,d),l.child;case 10:e:{if(m=l.type._context,b=l.pendingProps,_=l.memoizedProps,j=b.value,rt(zc,m._currentValue),m._currentValue=j,_!==null)if(ln(_.value,j)){if(_.children===b.children&&!gr.current){l=ei(o,l,d);break e}}else for(_=l.child,_!==null&&(_.return=l);_!==null;){var B=_.dependencies;if(B!==null){j=_.child;for(var q=B.firstContext;q!==null;){if(q.context===m){if(_.tag===1){q=Zn(-1,d&-d),q.tag=2;var Z=_.updateQueue;if(Z!==null){Z=Z.shared;var oe=Z.pending;oe===null?q.next=q:(q.next=oe.next,oe.next=q),Z.pending=q}}_.lanes|=d,q=_.alternate,q!==null&&(q.lanes|=d),Jp(_.return,d,l),B.lanes|=d;break}q=q.next}}else if(_.tag===10)j=_.type===l.type?null:_.child;else if(_.tag===18){if(j=_.return,j===null)throw Error(r(341));j.lanes|=d,B=j.alternate,B!==null&&(B.lanes|=d),Jp(j,d,l),j=_.sibling}else j=_.child;if(j!==null)j.return=_;else for(j=_;j!==null;){if(j===l){j=null;break}if(_=j.sibling,_!==null){_.return=j.return,j=_;break}j=j.return}_=j}cr(o,l,b.children,d),l=l.child}return l;case 9:return b=l.type,m=l.pendingProps.children,Ao(l,d),b=Wr(b),m=m(b),l.flags|=1,cr(o,l,m,d),l.child;case 14:return m=l.type,b=cn(m,l.pendingProps),b=cn(m.type,b),mS(o,l,m,b,d);case 15:return gS(o,l,l.type,l.pendingProps,d);case 17:return m=l.type,b=l.pendingProps,b=l.elementType===m?b:cn(m,b),Qc(o,l),l.tag=1,vr(m)?(o=!0,$c(l)):o=!1,Ao(l,d),sS(l,m,b),hm(l,m,b,d),vm(null,l,m,!0,o,d);case 19:return kS(o,l,d);case 22:return vS(o,l,d)}throw Error(r(156,l.tag))};function GS(o,l){return A1(o,l)}function H3(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 Gr(o,l,d,m){return new H3(o,l,d,m)}function Lm(o){return o=o.prototype,!(!o||!o.isReactComponent)}function W3(o){if(typeof o=="function")return Lm(o)?1:0;if(o!=null){if(o=o.$$typeof,o===L)return 11;if(o===V)return 14}return 2}function Ki(o,l){var d=o.alternate;return d===null?(d=Gr(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 cf(o,l,d,m,b,_){var j=2;if(m=o,typeof o=="function")Lm(o)&&(j=1);else if(typeof o=="string")j=5;else e:switch(o){case C:return Pa(d.children,b,_,l);case $:j=8,b|=8;break;case D:return o=Gr(12,d,l,b|2),o.elementType=D,o.lanes=_,o;case z:return o=Gr(13,d,l,b),o.elementType=z,o.lanes=_,o;case K:return o=Gr(19,d,l,b),o.elementType=K,o.lanes=_,o;case Q:return ff(d,b,_,l);default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case W:j=10;break e;case N:j=9;break e;case L:j=11;break e;case V:j=14;break e;case X:j=16,m=null;break e}throw Error(r(130,o==null?o:typeof o,""))}return l=Gr(j,d,l,b),l.elementType=o,l.type=m,l.lanes=_,l}function Pa(o,l,d,m){return o=Gr(7,o,m,l),o.lanes=d,o}function ff(o,l,d,m){return o=Gr(22,o,m,l),o.elementType=Q,o.lanes=d,o.stateNode={isHidden:!1},o}function Dm(o,l,d){return o=Gr(6,o,null,l),o.lanes=d,o}function Bm(o,l,d){return l=Gr(4,o.children!==null?o.children:[],o.key,l),l.lanes=d,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}function V3(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=dp(0),this.expirationTimes=dp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dp(0),this.identifierPrefix=m,this.onRecoverableError=b,this.mutableSourceEagerHydrationData=null}function zm(o,l,d,m,b,_,j,B,q){return o=new V3(o,l,d,B,q),l===1?(l=1,_===!0&&(l|=8)):l=0,_=Gr(3,null,null,l),o.current=_,_.stateNode=o,_.memoizedState={element:m,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zp(_),o}function K3(o,l,d){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:P,key:m==null?null:""+m,children:o,containerInfo:l,implementation:d}}function XS(o){if(!o)return Di;o=o._reactInternals;e:{if(ga(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(vr(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(vr(d))return S_(o,d,l)}return l}function YS(o,l,d,m,b,_,j,B,q){return o=zm(d,m,!0,o,b,_,j,B,q),o.context=XS(null),d=o.current,m=fr(),b=Wi(d),_=Zn(m,b),_.callback=l??null,qi(d,_,b),o.current.lanes=b,Qs(o,b,m),wr(o,m),o}function df(o,l,d,m){var b=l.current,_=fr(),j=Wi(b);return d=XS(d),l.context===null?l.context=d:l.pendingContext=d,l=Zn(_,j),l.payload={element:o},m=m===void 0?null:m,m!==null&&(l.callback=m),o=qi(b,l,j),o!==null&&(hn(o,b,j,_),Uc(o,b,j)),j}function hf(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 JS(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var d=o.retryLane;o.retryLane=d!==0&&d<l?d:l}}function qm(o,l){JS(o,l),(o=o.alternate)&&JS(o,l)}function G3(){return null}var QS=typeof reportError=="function"?reportError:function(o){console.error(o)};function Um(o){this._internalRoot=o}pf.prototype.render=Um.prototype.render=function(o){var l=this._internalRoot;if(l===null)throw Error(r(409));df(o,l,null,null)},pf.prototype.unmount=Um.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var l=o.containerInfo;Oa(function(){df(null,o,null,null)}),l[Gn]=null}};function pf(o){this._internalRoot=o}pf.prototype.unstable_scheduleHydration=function(o){if(o){var l=I1();o={blockedOn:null,target:o,priority:l};for(var d=0;d<Ni.length&&l!==0&&l<Ni[d].priority;d++);Ni.splice(d,0,o),d===0&&D1(o)}};function Fm(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function mf(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11&&(o.nodeType!==8||o.nodeValue!==" react-mount-point-unstable "))}function ZS(){}function X3(o,l,d,m,b){if(b){if(typeof m=="function"){var _=m;m=function(){var Z=hf(j);_.call(Z)}}var j=YS(l,m,o,0,null,!1,!1,"",ZS);return o._reactRootContainer=j,o[Gn]=j.current,dl(o.nodeType===8?o.parentNode:o),Oa(),j}for(;b=o.lastChild;)o.removeChild(b);if(typeof m=="function"){var B=m;m=function(){var Z=hf(q);B.call(Z)}}var q=zm(o,0,!1,null,null,!1,!1,"",ZS);return o._reactRootContainer=q,o[Gn]=q.current,dl(o.nodeType===8?o.parentNode:o),Oa(function(){df(l,q,d,m)}),q}function gf(o,l,d,m,b){var _=d._reactRootContainer;if(_){var j=_;if(typeof b=="function"){var B=b;b=function(){var q=hf(j);B.call(q)}}df(l,j,o,b)}else j=X3(d,l,o,b,m);return hf(j)}N1=function(o){switch(o.tag){case 3:var l=o.stateNode;if(l.current.memoizedState.isDehydrated){var d=Js(l.pendingLanes);d!==0&&(hp(l,d|1),wr(l,kt()),(We&6)===0&&(Ro=kt()+500,Bi()))}break;case 13:Oa(function(){var m=Qn(o,1);if(m!==null){var b=fr();hn(m,o,1,b)}}),qm(o,1)}},pp=function(o){if(o.tag===13){var l=Qn(o,134217728);if(l!==null){var d=fr();hn(l,o,134217728,d)}qm(o,134217728)}},$1=function(o){if(o.tag===13){var l=Wi(o),d=Qn(o,l);if(d!==null){var m=fr();hn(d,o,l,m)}qm(o,l)}},I1=function(){return Ye},M1=function(o,l){var d=Ye;try{return Ye=o,l()}finally{Ye=d}},Gs=function(o,l,d){switch(l){case"input":if(ht(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=Rc(m);if(!b)throw Error(r(90));ie(m),ht(m,b)}}}break;case"textarea":fa(o,d);break;case"select":l=d.value,l!=null&&tr(o,!!d.multiple,l,!1)}},Rt=$m,rr=Oa;var Y3={usingClientEntryPoint:!1,Events:[ml,bo,Rc,Me,St,$m]},Tl={findFiberByHostInstance:va,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},J3={bundleType:Tl.bundleType,version:Tl.version,rendererPackageName:Tl.rendererPackageName,rendererConfig:Tl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:T.ReactCurrentDispatcher,findHostInstanceByFiber:function(o){return o=O1(o),o===null?null:o.stateNode},findFiberByHostInstance:Tl.findFiberByHostInstance||G3,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 vf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vf.isDisabled&&vf.supportsFiber)try{hc=vf.inject(J3),Pn=vf}catch{}}return xr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Y3,xr.createPortal=function(o,l){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Fm(l))throw Error(r(200));return K3(o,l,null,d)},xr.createRoot=function(o,l){if(!Fm(o))throw Error(r(299));var d=!1,m="",b=QS;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(m=l.identifierPrefix),l.onRecoverableError!==void 0&&(b=l.onRecoverableError)),l=zm(o,1,!1,null,null,d,!1,m,b),o[Gn]=l.current,dl(o.nodeType===8?o.parentNode:o),new Um(l)},xr.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=O1(l),o=o===null?null:o.stateNode,o},xr.flushSync=function(o){return Oa(o)},xr.hydrate=function(o,l,d){if(!mf(l))throw Error(r(200));return gf(null,o,l,!0,d)},xr.hydrateRoot=function(o,l,d){if(!Fm(o))throw Error(r(405));var m=d!=null&&d.hydratedSources||null,b=!1,_="",j=QS;if(d!=null&&(d.unstable_strictMode===!0&&(b=!0),d.identifierPrefix!==void 0&&(_=d.identifierPrefix),d.onRecoverableError!==void 0&&(j=d.onRecoverableError)),l=YS(l,null,o,1,d??null,b,!1,_,j),o[Gn]=l.current,dl(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 pf(l)},xr.render=function(o,l,d){if(!mf(l))throw Error(r(200));return gf(null,o,l,!1,d)},xr.unmountComponentAtNode=function(o){if(!mf(o))throw Error(r(40));return o._reactRootContainer?(Oa(function(){gf(null,null,o,!1,function(){o._reactRootContainer=null,o[Gn]=null})}),!0):!1},xr.unstable_batchedUpdates=$m,xr.unstable_renderSubtreeIntoContainer=function(o,l,d,m){if(!mf(d))throw Error(r(200));if(o==null||o._reactInternals===void 0)throw Error(r(38));return gf(o,l,d,!1,m)},xr.version="18.3.1-next-f1338f8080-20240426",xr}var sk;function sC(){if(sk)return Vm.exports;sk=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(),Vm.exports=oL(),Vm.exports}var lk;function sL(){if(lk)return bf;lk=1;var t=sC();return bf.createRoot=t.createRoot,bf.hydrateRoot=t.hydrateRoot,bf}var lL=sL();/**
|
|
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 uk="popstate";function ck(t){return typeof t=="object"&&t!=null&&"pathname"in t&&"search"in t&&"hash"in t&&"state"in t&&"key"in t}function uL(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 cb("",{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:cu(i)}return fL(e,r,null,t)}function gt(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function On(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function cL(){return Math.random().toString(36).substring(2,10)}function fk(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 cb(t,e,r=null,n,i){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?Ns(e):e,state:r,key:e&&e.key||n||cL(),mask:i}}function cu({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 Ns(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 fL(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 O=ck(y)?y:cb(x.location,y,S);f=p()+1;let A=fk(O,f),T=x.createHref(O.mask||O);try{s.pushState(A,"",T)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(T)}a&&c&&c({action:u,location:x.location,delta:1})}function v(y,S){u="REPLACE";let O=ck(y)?y:cb(x.location,y,S);f=p();let A=fk(O,f),T=x.createHref(O.mask||O);s.replaceState(A,"",T),a&&c&&c({action:u,location:x.location,delta:0})}function w(y){return dL(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(uk,h),c=y,()=>{i.removeEventListener(uk,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 dL(t,e,r=!1){let n="http://localhost";t&&(n=t.location.origin!=="null"?t.location.origin:t.location.href),gt(n,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:cu(e);return i=i.replace(/ $/,"%20"),!r&&i.startsWith("//")&&(i=n+i),new URL(i,n)}function lC(t,e,r="/"){return hL(t,e,r,!1)}function hL(t,e,r,n,i){let a=typeof e=="string"?Ns(e):e,s=mi(a.pathname||"/",r);if(s==null)return null;let u=pL(t),c=null,f=EL(s);for(let p=0;c==null&&p<u.length;++p)c=kL(u[p],f,n);return c}function pL(t){let e=uC(t);return mL(e),e}function uC(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;gt(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=kn([n,p.relativePath]),g=r.concat(p);s.children&&s.children.length>0&&(gt(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),uC(s.children,e,g,h,c)),!(s.path==null&&!s.index)&&e.push({path:h,score:_L(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 cC(s.path))a(s,u,!0,f)}),e}function cC(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=cC(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 mL(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:SL(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var gL=/^:[\w-]+$/,vL=3,yL=2,bL=1,wL=10,xL=-2,dk=t=>t==="*";function _L(t,e){let r=t.split("/"),n=r.length;return r.some(dk)&&(n+=xL),e&&(n+=yL),r.filter(i=>!dk(i)).reduce((i,a)=>i+(gL.test(a)?vL:a===""?bL:wL),n)}function SL(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 kL(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=td({path:c.relativePath,caseSensitive:c.caseSensitive,end:f},p),g=c.route;if(!h&&f&&r&&!n[n.length-1].route.index&&(h=td({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},p)),!h)return null;Object.assign(i,h.params),s.push({params:i,pathname:kn([a,h.pathname]),pathnameBase:jL(kn([a,h.pathnameBase])),route:g}),h.pathnameBase!=="/"&&(a=kn([a,h.pathnameBase]))}return s}function td(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=OL(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 OL(t,e=!1,r=!0){On(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 EL(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return On(!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 mi(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 AL=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function PL(t,e="/"){let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?Ns(t):t,a;return r?(r=fC(r),r.startsWith("/")?a=hk(r.substring(1),"/"):a=hk(r,e)):a=e,{pathname:a,search:CL(n),hash:RL(i)}}function hk(t,e){let r=rd(e).split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Xm(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 TL(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function tx(t){let e=TL(t);return e.map((r,n)=>n===e.length-1?r.pathname:r.pathnameBase)}function dh(t,e,r,n=!1){let i;typeof t=="string"?i=Ns(t):(i={...t},gt(!i.pathname||!i.pathname.includes("?"),Xm("?","pathname","search",i)),gt(!i.pathname||!i.pathname.includes("#"),Xm("#","pathname","hash",i)),gt(!i.search||!i.search.includes("#"),Xm("#","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=PL(i,u),f=s&&s!=="/"&&s.endsWith("/"),p=(a||s===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(f||p)&&(c.pathname+="/"),c}var fC=t=>t.replace(/\/\/+/g,"/"),kn=t=>fC(t.join("/")),rd=t=>t.replace(/\/+$/,""),jL=t=>rd(t).replace(/^\/*/,"/"),CL=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,RL=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,NL=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 $L(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function IL(t){let e=t.map(r=>r.route.path).filter(Boolean);return kn(e)||"/"}var dC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function hC(t,e){let r=t;if(typeof r!="string"||!AL.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,i=!1;if(dC)try{let a=new URL(window.location.href),s=r.startsWith("//")?new URL(a.protocol+r):new URL(r),u=mi(s.pathname,e);s.origin===a.origin&&u!=null?r=u+s.search+s.hash:i=!0}catch{On(!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 pC=["POST","PUT","PATCH","DELETE"];new Set(pC);var ML=["GET",...pC];new Set(ML);var $s=R.createContext(null);$s.displayName="DataRouter";var hh=R.createContext(null);hh.displayName="DataRouterState";var mC=R.createContext(!1);function LL(){return R.useContext(mC)}var gC=R.createContext({isTransitioning:!1});gC.displayName="ViewTransition";var DL=R.createContext(new Map);DL.displayName="Fetchers";var BL=R.createContext(null);BL.displayName="Await";var Dr=R.createContext(null);Dr.displayName="Navigation";var Qu=R.createContext(null);Qu.displayName="Location";var an=R.createContext({outlet:null,matches:[],isDataRoute:!1});an.displayName="Route";var rx=R.createContext(null);rx.displayName="RouteError";var vC="REACT_ROUTER_ERROR",zL="REDIRECT",qL="ROUTE_ERROR_RESPONSE";function UL(t){if(t.startsWith(`${vC}:${zL}:{`))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 FL(t){if(t.startsWith(`${vC}:${qL}:{`))try{let e=JSON.parse(t.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new NL(e.status,e.statusText,e.data)}catch{}}function HL(t,{relative:e}={}){gt(Is(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=R.useContext(Dr),{hash:i,pathname:a,search:s}=Zu(t,{relative:e}),u=a;return r!=="/"&&(u=a==="/"?r:kn([r,a])),n.createHref({pathname:u,search:s,hash:i})}function Is(){return R.useContext(Qu)!=null}function En(){return gt(Is(),"useLocation() may be used only in the context of a <Router> component."),R.useContext(Qu).location}var yC="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function bC(t){R.useContext(Dr).static||R.useLayoutEffect(t)}function ph(){let{isDataRoute:t}=R.useContext(an);return t?oD():WL()}function WL(){gt(Is(),"useNavigate() may be used only in the context of a <Router> component.");let t=R.useContext($s),{basename:e,navigator:r}=R.useContext(Dr),{matches:n}=R.useContext(an),{pathname:i}=En(),a=JSON.stringify(tx(n)),s=R.useRef(!1);return bC(()=>{s.current=!0}),R.useCallback((c,f={})=>{if(On(s.current,yC),!s.current)return;if(typeof c=="number"){r.go(c);return}let p=dh(c,JSON.parse(a),i,f.relative==="path");t==null&&e!=="/"&&(p.pathname=p.pathname==="/"?e:kn([e,p.pathname])),(f.replace?r.replace:r.push)(p,f.state,f)},[e,r,a,i,t])}var VL=R.createContext(null);function KL(t){let e=R.useContext(an).outlet;return R.useMemo(()=>e&&R.createElement(VL.Provider,{value:t},e),[e,t])}function GL(){let{matches:t}=R.useContext(an),e=t[t.length-1];return(e==null?void 0:e.params)??{}}function Zu(t,{relative:e}={}){let{matches:r}=R.useContext(an),{pathname:n}=En(),i=JSON.stringify(tx(r));return R.useMemo(()=>dh(t,JSON.parse(i),n,e==="path"),[t,i,n,e])}function XL(t,e){return wC(t,e)}function wC(t,e,r){var y;gt(Is(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=R.useContext(Dr),{matches:i}=R.useContext(an),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||"";_C(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=En(),h;if(e){let S=typeof e=="string"?Ns(e):e;gt(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})):lC(t,{pathname:v});On(f||w!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),On(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=eD(w&&w.map(S=>Object.assign({},S,{params:Object.assign({},s,S.params),pathname:kn([c,n.encodeLocation?n.encodeLocation(S.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?c:kn([c,n.encodeLocation?n.encodeLocation(S.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathnameBase])})),i,r);return e&&x?R.createElement(Qu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...h},navigationType:"POP"}},x):x}function YL(){let t=aD(),e=$L(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=R.createElement(R.Fragment,null,R.createElement("p",null,"💿 Hey developer 👋"),R.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",R.createElement("code",{style:a},"ErrorBoundary")," or"," ",R.createElement("code",{style:a},"errorElement")," prop on your route.")),R.createElement(R.Fragment,null,R.createElement("h2",null,"Unexpected Application Error!"),R.createElement("h3",{style:{fontStyle:"italic"}},e),r?R.createElement("pre",{style:i},r):null,s)}var JL=R.createElement(YL,null),xC=class extends R.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=FL(t.digest);r&&(t=r)}let e=t!==void 0?R.createElement(an.Provider,{value:this.props.routeContext},R.createElement(rx.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?R.createElement(QL,{error:t},e):e}};xC.contextType=mC;var Ym=new WeakMap;function QL({children:t,error:e}){let{basename:r}=R.useContext(Dr);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let n=UL(e.digest);if(n){let i=Ym.get(e);if(i)throw i;let a=hC(n.location,r);if(dC&&!Ym.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 Ym.set(e,s),s}return R.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return t}function ZL({routeContext:t,match:e,children:r}){let n=R.useContext($s);return n&&n.static&&n.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=e.route.id),R.createElement(an.Provider,{value:t},r)}function eD(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);gt(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:IL(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||JL,s&&(u<0&&g===0?(_C("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)),O=()=>{let A;return v?A=x:w?A=y:h.route.Component?A=R.createElement(h.route.Component,null):h.route.element?A=h.route.element:A=p,R.createElement(ZL,{match:h,routeContext:{outlet:p,matches:S,isDataRoute:n!=null},children:A})};return n&&(h.route.ErrorBoundary||h.route.errorElement||g===0)?R.createElement(xC,{location:n.location,revalidation:n.revalidation,component:x,error:v,children:O(),routeContext:{outlet:null,matches:S,isDataRoute:!0},onError:f}):O()},null)}function nx(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function tD(t){let e=R.useContext($s);return gt(e,nx(t)),e}function rD(t){let e=R.useContext(hh);return gt(e,nx(t)),e}function nD(t){let e=R.useContext(an);return gt(e,nx(t)),e}function ix(t){let e=nD(t),r=e.matches[e.matches.length-1];return gt(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}function iD(){return ix("useRouteId")}function aD(){var n;let t=R.useContext(rx),e=rD("useRouteError"),r=ix("useRouteError");return t!==void 0?t:(n=e.errors)==null?void 0:n[r]}function oD(){let{router:t}=tD("useNavigate"),e=ix("useNavigate"),r=R.useRef(!1);return bC(()=>{r.current=!0}),R.useCallback(async(i,a={})=>{On(r.current,yC),r.current&&(typeof i=="number"?await t.navigate(i):await t.navigate(i,{fromRouteId:e,...a}))},[t,e])}var pk={};function _C(t,e,r){!e&&!pk[t]&&(pk[t]=!0,On(!1,r))}R.memo(sD);function sD({routes:t,manifest:e,future:r,state:n,isStatic:i,onError:a}){return wC(t,void 0,{manifest:e,state:n,isStatic:i,onError:a})}function lD({to:t,replace:e,state:r,relative:n}){gt(Is(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=R.useContext(Dr);On(!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}=R.useContext(an),{pathname:s}=En(),u=ph(),c=dh(t,tx(a),s,n==="path"),f=JSON.stringify(c);return R.useEffect(()=>{u(JSON.parse(f),{replace:e,state:r,relative:n})},[u,f,n,e,r]),null}function uD(t){return KL(t.context)}function Qr(t){gt(!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 cD({basename:t="/",children:e=null,location:r,navigationType:n="POP",navigator:i,static:a=!1,useTransitions:s}){gt(!Is(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=t.replace(/^\/*/,"/"),c=R.useMemo(()=>({basename:u,navigator:i,static:a,useTransitions:s,future:{}}),[u,i,a,s]);typeof r=="string"&&(r=Ns(r));let{pathname:f="/",search:p="",hash:h="",state:g=null,key:v="default",mask:w}=r,x=R.useMemo(()=>{let y=mi(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 On(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:R.createElement(Dr.Provider,{value:c},R.createElement(Qu.Provider,{children:e,value:x}))}function fD({children:t,location:e}){return XL(fb(t),e)}function fb(t,e=[]){let r=[];return R.Children.forEach(t,(n,i)=>{if(!R.isValidElement(n))return;let a=[...e,i];if(n.type===R.Fragment){r.push.apply(r,fb(n.props.children,a));return}gt(n.type===Qr,`[${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>`),gt(!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=fb(n.props.children,a)),r.push(s)}),r}var Yf="get",Jf="application/x-www-form-urlencoded";function mh(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function dD(t){return mh(t)&&t.tagName.toLowerCase()==="button"}function hD(t){return mh(t)&&t.tagName.toLowerCase()==="form"}function pD(t){return mh(t)&&t.tagName.toLowerCase()==="input"}function mD(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function gD(t,e){return t.button===0&&(!e||e==="_self")&&!mD(t)}var wf=null;function vD(){if(wf===null)try{new FormData(document.createElement("form"),0),wf=!1}catch{wf=!0}return wf}var yD=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Jm(t){return t!=null&&!yD.has(t)?(On(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Jf}"`),null):t}function bD(t,e){let r,n,i,a,s;if(hD(t)){let u=t.getAttribute("action");n=u?mi(u,e):null,r=t.getAttribute("method")||Yf,i=Jm(t.getAttribute("enctype"))||Jf,a=new FormData(t)}else if(dD(t)||pD(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?mi(c,e):null,r=t.getAttribute("formmethod")||u.getAttribute("method")||Yf,i=Jm(t.getAttribute("formenctype"))||Jm(u.getAttribute("enctype"))||Jf,a=new FormData(u,t),!vD()){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(mh(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Yf,n=null,i=Jf,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 ax(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function SC(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&&mi(i.pathname,e)==="/"?i.pathname=`${rd(e)}/_root.${n}`:i.pathname=`${rd(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 xD(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 _D(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 ED(n.flat(1).filter(xD).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function mk(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 SD(t,e,{includeHydrateFallback:r}={}){return kD(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 kD(t){return[...new Set(t)]}function OD(t){let e={},r=Object.keys(t).sort();for(let n of r)e[n]=t[n];return e}function ED(t,e){let r=new Set;return new Set(e),t.reduce((n,i)=>{let a=JSON.stringify(OD(i));return r.has(a)||(r.add(a),n.push({key:a,link:i})),n},[])}function ox(){let t=R.useContext($s);return ax(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function AD(){let t=R.useContext(hh);return ax(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var sx=R.createContext(void 0);sx.displayName="FrameworkContext";function lx(){let t=R.useContext(sx);return ax(t,"You must render this element inside a <HydratedRouter> element"),t}function PD(t,e){let r=R.useContext(sx),[n,i]=R.useState(!1),[a,s]=R.useState(!1),{onFocus:u,onBlur:c,onMouseEnter:f,onMouseLeave:p,onTouchStart:h}=e,g=R.useRef(null);R.useEffect(()=>{if(t==="render"&&s(!0),t==="viewport"){let x=S=>{S.forEach(O=>{s(O.isIntersecting)})},y=new IntersectionObserver(x,{threshold:.5});return g.current&&y.observe(g.current),()=>{y.disconnect()}}},[t]),R.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:Cl(u,v),onBlur:Cl(c,w),onMouseEnter:Cl(f,v),onMouseLeave:Cl(p,w),onTouchStart:Cl(h,v)}]:[!1,g,{}]}function Cl(t,e){return r=>{t&&t(r),r.defaultPrevented||e(r)}}function TD({page:t,...e}){let r=LL(),{router:n}=ox(),i=R.useMemo(()=>lC(n.routes,t,n.basename),[n.routes,t,n.basename]);return i?r?R.createElement(CD,{page:t,matches:i,...e}):R.createElement(RD,{page:t,matches:i,...e}):null}function jD(t){let{manifest:e,routeModules:r}=lx(),[n,i]=R.useState([]);return R.useEffect(()=>{let a=!1;return _D(t,e,r).then(s=>{a||i(s)}),()=>{a=!0}},[t,e,r]),n}function CD({page:t,matches:e,...r}){let n=En(),{future:i}=lx(),{basename:a}=ox(),s=R.useMemo(()=>{if(t===n.pathname+n.search+n.hash)return[];let u=SC(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 R.createElement(R.Fragment,null,s.map(u=>R.createElement("link",{key:u,rel:"prefetch",as:"fetch",href:u,...r})))}function RD({page:t,matches:e,...r}){let n=En(),{future:i,manifest:a,routeModules:s}=lx(),{basename:u}=ox(),{loaderData:c,matches:f}=AD(),p=R.useMemo(()=>mk(t,e,f,a,n,"data"),[t,e,f,a,n]),h=R.useMemo(()=>mk(t,e,f,a,n,"assets"),[t,e,f,a,n]),g=R.useMemo(()=>{if(t===n.pathname+n.search+n.hash)return[];let x=new Set,y=!1;if(e.forEach(O=>{var T;let A=a.routes[O.route.id];!A||!A.hasLoader||(!p.some(E=>E.route.id===O.route.id)&&O.route.id in c&&((T=s[O.route.id])!=null&&T.shouldRevalidate)||A.hasClientLoader?y=!0:x.add(O.route.id))}),x.size===0)return[];let S=SC(t,u,i.v8_trailingSlashAwareDataRequests,"data");return y&&x.size>0&&S.searchParams.set("_routes",e.filter(O=>x.has(O.route.id)).map(O=>O.route.id).join(",")),[S.pathname+S.search]},[u,i.v8_trailingSlashAwareDataRequests,c,n,a,p,e,t,s]),v=R.useMemo(()=>SD(h,a),[h,a]),w=jD(h);return R.createElement(R.Fragment,null,g.map(x=>R.createElement("link",{key:x,rel:"prefetch",as:"fetch",href:x,...r})),v.map(x=>R.createElement("link",{key:x,rel:"modulepreload",href:x,...r})),w.map(({key:x,link:y})=>R.createElement("link",{key:x,nonce:r.nonce,...y,crossOrigin:y.crossOrigin??r.crossOrigin})))}function ND(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})}}var $D=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{$D&&(window.__reactRouterVersion="7.16.0")}catch{}function ID({basename:t,children:e,useTransitions:r,window:n}){let i=R.useRef();i.current==null&&(i.current=uL({window:n,v5Compat:!0}));let a=i.current,[s,u]=R.useState({action:a.action,location:a.location}),c=R.useCallback(f=>{r===!1?u(f):R.startTransition(()=>u(f))},[r]);return R.useLayoutEffect(()=>a.listen(c),[a,c]),R.createElement(cD,{basename:t,children:e,location:s.location,navigationType:s.action,navigator:a,useTransitions:r})}var kC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,OC=R.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:O}=R.useContext(Dr),A=typeof p=="string"&&kC.test(p),T=hC(p,y);p=T.to;let E=HL(p,{relative:i}),P=En(),C=null;if(u){let V=dh(u,[],P.mask?P.mask.pathname:"/",!0);y!=="/"&&(V.pathname=V.pathname==="/"?y:kn([y,V.pathname])),C=S.createHref(V)}let[$,D,W]=PD(n,w),N=DD(p,{replace:s,mask:u,state:c,target:f,preventScrollReset:h,relative:i,viewTransition:g,defaultShouldRevalidate:v,useTransitions:O});function L(V){e&&e(V),V.defaultPrevented||N(V)}let z=!(T.isExternal||a),K=R.createElement("a",{...w,...W,href:(z?C:void 0)||T.absoluteURL||E,onClick:z?L:e,ref:ND(x,D),target:f,"data-discover":!A&&r==="render"?"true":void 0});return $&&!A?R.createElement(R.Fragment,null,K,R.createElement(TD,{page:E})):K});OC.displayName="Link";var ux=R.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=Zu(s,{relative:f.relative}),g=En(),v=R.useContext(hh),{navigator:w,basename:x}=R.useContext(Dr),y=v!=null&&FD(h)&&u===!0,S=w.encodeLocation?w.encodeLocation(h).pathname:h.pathname,O=g.pathname,A=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;r||(O=O.toLowerCase(),A=A?A.toLowerCase():null,S=S.toLowerCase()),A&&x&&(A=mi(A,x)||A);const T=S!=="/"&&S.endsWith("/")?S.length-1:S.length;let E=O===S||!i&&O.startsWith(S)&&O.charAt(T)==="/",P=A!=null&&(A===S||!i&&A.startsWith(S)&&A.charAt(S.length)==="/"),C={isActive:E,isPending:P,isTransitioning:y},$=E?e:void 0,D;typeof n=="function"?D=n(C):D=[n,E?"active":null,P?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let W=typeof a=="function"?a(C):a;return R.createElement(OC,{...f,"aria-current":$,className:D,ref:p,style:W,to:s,viewTransition:u},typeof c=="function"?c(C):c)});ux.displayName="NavLink";var MD=R.forwardRef(({discover:t="render",fetcherKey:e,navigate:r,reloadDocument:n,replace:i,state:a,method:s=Yf,action:u,onSubmit:c,relative:f,preventScrollReset:p,viewTransition:h,defaultShouldRevalidate:g,...v},w)=>{let{useTransitions:x}=R.useContext(Dr),y=qD(),S=UD(u,{relative:f}),O=s.toLowerCase()==="get"?"get":"post",A=typeof u=="string"&&kC.test(u),T=E=>{if(c&&c(E),E.defaultPrevented)return;E.preventDefault();let P=E.nativeEvent.submitter,C=(P==null?void 0:P.getAttribute("formmethod"))||s,$=()=>y(P||E.currentTarget,{fetcherKey:e,method:C,navigate:r,replace:i,state:a,relative:f,preventScrollReset:p,viewTransition:h,defaultShouldRevalidate:g});x&&r!==!1?R.startTransition(()=>$()):$()};return R.createElement("form",{ref:w,method:O,action:S,onSubmit:n?c:T,...v,"data-discover":!A&&t==="render"?"true":void 0})});MD.displayName="Form";function LD(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function EC(t){let e=R.useContext($s);return gt(e,LD(t)),e}function DD(t,{target:e,replace:r,mask:n,state:i,preventScrollReset:a,relative:s,viewTransition:u,defaultShouldRevalidate:c,useTransitions:f}={}){let p=ph(),h=En(),g=Zu(t,{relative:s});return R.useCallback(v=>{if(gD(v,e)){v.preventDefault();let w=r!==void 0?r:cu(h)===cu(g),x=()=>p(t,{replace:w,mask:n,state:i,preventScrollReset:a,relative:s,viewTransition:u,defaultShouldRevalidate:c});f?R.startTransition(()=>x()):x()}},[h,p,g,r,n,i,e,t,a,s,u,c,f])}var BD=0,zD=()=>`__${String(++BD)}__`;function qD(){let{router:t}=EC("useSubmit"),{basename:e}=R.useContext(Dr),r=iD(),n=t.fetch,i=t.navigate;return R.useCallback(async(a,s={})=>{let{action:u,method:c,encType:f,formData:p,body:h}=bD(a,e);if(s.navigate===!1){let g=s.fetcherKey||zD();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 UD(t,{relative:e}={}){let{basename:r}=R.useContext(Dr),n=R.useContext(an);gt(n,"useFormAction must be used inside a RouteContext");let[i]=n.matches.slice(-1),a={...Zu(t||".",{relative:e})},s=En();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:kn([r,a.pathname])),cu(a)}function FD(t,{relative:e}={}){let r=R.useContext(gC);gt(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=EC("useViewTransitionState"),i=Zu(t,{relative:e});if(!r.isTransitioning)return!1;let a=mi(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=mi(r.nextLocation.pathname,n)||r.nextLocation.pathname;return td(i.pathname,s)!=null||td(i.pathname,a)!=null}var HD=sC();const WD=Je(HD);function VD(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 KD=t=>{switch(t){case"success":return YD;case"info":return QD;case"warning":return JD;case"error":return ZD;default:return null}},GD=Array(12).fill(0),XD=({visible:t,className:e})=>M.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},M.createElement("div",{className:"sonner-spinner"},GD.map((r,n)=>M.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),YD=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M.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"})),JD=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},M.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"})),QD=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M.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"})),ZD=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M.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"})),e4=M.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"},M.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),M.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),t4=()=>{const[t,e]=M.useState(document.hidden);return M.useEffect(()=>{const r=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),t};let db=1;class r4{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:db++,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],M.isValidElement(f))a=!1,this.create({id:n,type:"default",message:f});else if(i4(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"&&!M.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"&&!M.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"&&!M.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"&&!M.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)||db++;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 Sr=new r4,n4=(t,e)=>{const r=(e==null?void 0:e.id)||db++;return Sr.addToast({title:t,...e,id:r}),r},i4=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",a4=n4,o4=()=>Sr.toasts,s4=()=>Sr.getActiveToasts(),bt=Object.assign(a4,{success:Sr.success,info:Sr.info,warning:Sr.warning,error:Sr.error,custom:Sr.custom,message:Sr.message,promise:Sr.promise,dismiss:Sr.dismiss,loading:Sr.loading},{getHistory:o4,getToasts:s4});VD("[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 xf(t){return t.label!==void 0}const l4=3,u4="24px",c4="16px",gk=4e3,f4=356,d4=14,h4=45,p4=200;function Nn(...t){return t.filter(Boolean).join(" ")}function m4(t){const[e,r]=t.split("-"),n=[];return e&&n.push(e),r&&n.push(r),n}const g4=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:O,expanded:A,removeToast:T,defaultRichColors:E,closeButton:P,style:C,cancelButtonStyle:$,actionButtonStyle:D,className:W="",descriptionClassName:N="",duration:L,position:z,gap:K,expandByDefault:V,classNames:X,icons:Q,closeButtonAriaLabel:G="Close toast"}=t,[te,F]=M.useState(null),[I,U]=M.useState(null),[ee,se]=M.useState(!1),[ue,de]=M.useState(!1),[Re,pe]=M.useState(!1),[ne,_e]=M.useState(!1),[Oe,ie]=M.useState(!1),[He,Ne]=M.useState(0),[dt,st]=M.useState(0),ht=M.useRef(h.duration||L||gk),mr=M.useRef(null),Et=M.useRef(null),Br=S===0,tr=S+1<=x,lt=h.type,Ar=h.dismissible!==!1,fa=h.className||"",da=h.descriptionClassName||"",ha=M.useMemo(()=>y.findIndex(Me=>Me.toastId===h.id)||0,[y,h.id]),Vs=M.useMemo(()=>{var Me;return(Me=h.closeButton)!=null?Me:P},[h.closeButton,P]),pa=M.useMemo(()=>h.duration||L||gk,[h.duration,L]),uo=M.useRef(0),zr=M.useRef(0),ki=M.useRef(0),Oi=M.useRef(null),[uc,cc]=z.split("-"),fc=M.useMemo(()=>y.reduce((Me,St,Rt)=>Rt>=ha?Me:Me+St.height,0),[y,ha]),co=t4(),Ks=h.invert||p,ma=lt==="loading";zr.current=M.useMemo(()=>ha*K+fc,[ha,fc]),M.useEffect(()=>{ht.current=pa},[pa]),M.useEffect(()=>{se(!0)},[]),M.useEffect(()=>{const Me=Et.current;if(Me){const St=Me.getBoundingClientRect().height;return st(St),w(Rt=>[{toastId:h.id,height:St,position:h.position},...Rt]),()=>w(Rt=>Rt.filter(rr=>rr.toastId!==h.id))}},[w,h.id]),M.useLayoutEffect(()=>{if(!ee)return;const Me=Et.current,St=Me.style.height;Me.style.height="auto";const Rt=Me.getBoundingClientRect().height;Me.style.height=St,st(Rt),w(rr=>rr.find(At=>At.toastId===h.id)?rr.map(At=>At.toastId===h.id?{...At,height:Rt}:At):[{toastId:h.id,height:Rt,position:h.position},...rr])},[ee,h.title,h.description,w,h.id,h.jsx,h.action,h.cancel]);const qr=M.useCallback(()=>{de(!0),Ne(zr.current),w(Me=>Me.filter(St=>St.toastId!==h.id)),setTimeout(()=>{T(h)},p4)},[h,T,w,zr]);M.useEffect(()=>{if(h.promise&<==="loading"||h.duration===1/0||h.type==="loading")return;let Me;return A||v||co?(()=>{if(ki.current<uo.current){const rr=new Date().getTime()-uo.current;ht.current=ht.current-rr}ki.current=new Date().getTime()})():(()=>{ht.current!==1/0&&(uo.current=new Date().getTime(),Me=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),qr()},ht.current))})(),()=>clearTimeout(Me)},[A,v,h,lt,co,qr]),M.useEffect(()=>{h.delete&&(qr(),h.onDismiss==null||h.onDismiss.call(h,h))},[qr,h.delete]);function Gs(){var Me;if(Q!=null&&Q.loading){var St;return M.createElement("div",{className:Nn(X==null?void 0:X.loader,h==null||(St=h.classNames)==null?void 0:St.loader,"sonner-loader"),"data-visible":lt==="loading"},Q.loading)}return M.createElement(XD,{className:Nn(X==null?void 0:X.loader,h==null||(Me=h.classNames)==null?void 0:Me.loader),visible:lt==="loading"})}const Ei=h.icon||(Q==null?void 0:Q[lt])||KD(lt);var Kn,Xs;return M.createElement("li",{tabIndex:0,ref:Et,className:Nn(W,fa,X==null?void 0:X.toast,h==null||(e=h.classNames)==null?void 0:e.toast,X==null?void 0:X.default,X==null?void 0:X[lt],h==null||(r=h.classNames)==null?void 0:r[lt]),"data-sonner-toast":"","data-rich-colors":(Kn=h.richColors)!=null?Kn:E,"data-styled":!(h.jsx||h.unstyled||g),"data-mounted":ee,"data-promise":!!h.promise,"data-swiped":Oe,"data-removed":ue,"data-visible":tr,"data-y-position":uc,"data-x-position":cc,"data-index":S,"data-front":Br,"data-swiping":Re,"data-dismissible":Ar,"data-type":lt,"data-invert":Ks,"data-swipe-out":ne,"data-swipe-direction":I,"data-expanded":!!(A||V&&ee),"data-testid":h.testId,style:{"--index":S,"--toasts-before":S,"--z-index":O.length-S,"--offset":`${ue?He:zr.current}px`,"--initial-height":V?"auto":`${dt}px`,...C,...h.style},onDragEnd:()=>{pe(!1),F(null),Oi.current=null},onPointerDown:Me=>{Me.button!==2&&(ma||!Ar||(mr.current=new Date,Ne(zr.current),Me.target.setPointerCapture(Me.pointerId),Me.target.tagName!=="BUTTON"&&(pe(!0),Oi.current={x:Me.clientX,y:Me.clientY})))},onPointerUp:()=>{var Me,St,Rt;if(ne||!Ar)return;Oi.current=null;const rr=Number(((Me=Et.current)==null?void 0:Me.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ai=Number(((St=Et.current)==null?void 0:St.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),At=new Date().getTime()-((Rt=mr.current)==null?void 0:Rt.getTime()),qt=te==="x"?rr:Ai,Pi=Math.abs(qt)/At;if(Math.abs(qt)>=h4||Pi>.11){Ne(zr.current),h.onDismiss==null||h.onDismiss.call(h,h),U(te==="x"?rr>0?"right":"left":Ai>0?"down":"up"),qr(),_e(!0);return}else{var Xt,Pr;(Xt=Et.current)==null||Xt.style.setProperty("--swipe-amount-x","0px"),(Pr=Et.current)==null||Pr.style.setProperty("--swipe-amount-y","0px")}ie(!1),pe(!1),F(null)},onPointerMove:Me=>{var St,Rt,rr;if(!Oi.current||!Ar||((St=window.getSelection())==null?void 0:St.toString().length)>0)return;const At=Me.clientY-Oi.current.y,qt=Me.clientX-Oi.current.x;var Pi;const Xt=(Pi=t.swipeDirections)!=null?Pi:m4(z);!te&&(Math.abs(qt)>1||Math.abs(At)>1)&&F(Math.abs(qt)>Math.abs(At)?"x":"y");let Pr={x:0,y:0};const Ti=Ur=>1/(1.5+Math.abs(Ur)/20);if(te==="y"){if(Xt.includes("top")||Xt.includes("bottom"))if(Xt.includes("top")&&At<0||Xt.includes("bottom")&&At>0)Pr.y=At;else{const Ur=At*Ti(At);Pr.y=Math.abs(Ur)<Math.abs(At)?Ur:At}}else if(te==="x"&&(Xt.includes("left")||Xt.includes("right")))if(Xt.includes("left")&&qt<0||Xt.includes("right")&&qt>0)Pr.x=qt;else{const Ur=qt*Ti(qt);Pr.x=Math.abs(Ur)<Math.abs(qt)?Ur:qt}(Math.abs(Pr.x)>0||Math.abs(Pr.y)>0)&&ie(!0),(Rt=Et.current)==null||Rt.style.setProperty("--swipe-amount-x",`${Pr.x}px`),(rr=Et.current)==null||rr.style.setProperty("--swipe-amount-y",`${Pr.y}px`)}},Vs&&!h.jsx&<!=="loading"?M.createElement("button",{"aria-label":G,"data-disabled":ma,"data-close-button":!0,onClick:ma||!Ar?()=>{}:()=>{qr(),h.onDismiss==null||h.onDismiss.call(h,h)},className:Nn(X==null?void 0:X.closeButton,h==null||(n=h.classNames)==null?void 0:n.closeButton)},(Xs=Q==null?void 0:Q.close)!=null?Xs:e4):null,(lt||h.icon||h.promise)&&h.icon!==null&&((Q==null?void 0:Q[lt])!==null||h.icon)?M.createElement("div",{"data-icon":"",className:Nn(X==null?void 0:X.icon,h==null||(i=h.classNames)==null?void 0:i.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||Gs():null,h.type!=="loading"?Ei:null):null,M.createElement("div",{"data-content":"",className:Nn(X==null?void 0:X.content,h==null||(a=h.classNames)==null?void 0:a.content)},M.createElement("div",{"data-title":"",className:Nn(X==null?void 0:X.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?M.createElement("div",{"data-description":"",className:Nn(N,da,X==null?void 0:X.description,h==null||(u=h.classNames)==null?void 0:u.description)},typeof h.description=="function"?h.description():h.description):null),M.isValidElement(h.cancel)?h.cancel:h.cancel&&xf(h.cancel)?M.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||$,onClick:Me=>{xf(h.cancel)&&Ar&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,Me),qr())},className:Nn(X==null?void 0:X.cancelButton,h==null||(c=h.classNames)==null?void 0:c.cancelButton)},h.cancel.label):null,M.isValidElement(h.action)?h.action:h.action&&xf(h.action)?M.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||D,onClick:Me=>{xf(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,Me),!Me.defaultPrevented&&qr())},className:Nn(X==null?void 0:X.actionButton,h==null||(f=h.classNames)==null?void 0:f.actionButton)},h.action.label):null)};function vk(){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 v4(t,e){const r={};return[t,e].forEach((n,i)=>{const a=i===1,s=a?"--mobile-offset":"--offset",u=a?c4:u4;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 y4=M.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=l4,toastOptions:S,dir:O=vk(),gap:A=d4,icons:T,containerAriaLabel:E="Notifications"}=e,[P,C]=M.useState([]),$=M.useMemo(()=>n?P.filter(ee=>ee.toasterId===n):P.filter(ee=>!ee.toasterId),[P,n]),D=M.useMemo(()=>Array.from(new Set([a].concat($.filter(ee=>ee.position).map(ee=>ee.position)))),[$,a]),[W,N]=M.useState([]),[L,z]=M.useState(!1),[K,V]=M.useState(!1),[X,Q]=M.useState(g!=="system"?g:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=M.useRef(null),te=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=M.useRef(null),I=M.useRef(!1),U=M.useCallback(ee=>{C(se=>{var ue;return(ue=se.find(de=>de.id===ee.id))!=null&&ue.delete||Sr.dismiss(ee.id),se.filter(({id:de})=>de!==ee.id)})},[]);return M.useEffect(()=>Sr.subscribe(ee=>{if(ee.dismiss){requestAnimationFrame(()=>{C(se=>se.map(ue=>ue.id===ee.id?{...ue,delete:!0}:ue))});return}setTimeout(()=>{WD.flushSync(()=>{C(se=>{const ue=se.findIndex(de=>de.id===ee.id);return ue!==-1?[...se.slice(0,ue),{...se[ue],...ee},...se.slice(ue+1)]:[ee,...se]})})})}),[P]),M.useEffect(()=>{if(g!=="system"){Q(g);return}if(g==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Q("dark"):Q("light")),typeof window>"u")return;const ee=window.matchMedia("(prefers-color-scheme: dark)");try{ee.addEventListener("change",({matches:se})=>{Q(se?"dark":"light")})}catch{ee.addListener(({matches:ue})=>{try{Q(ue?"dark":"light")}catch(de){console.error(de)}})}},[g]),M.useEffect(()=>{P.length<=1&&z(!1)},[P]),M.useEffect(()=>{const ee=se=>{var ue;if(s.every(pe=>se[pe]||se.code===pe)){var Re;z(!0),(Re=G.current)==null||Re.focus()}se.code==="Escape"&&(document.activeElement===G.current||(ue=G.current)!=null&&ue.contains(document.activeElement))&&z(!1)};return document.addEventListener("keydown",ee),()=>document.removeEventListener("keydown",ee)},[s]),M.useEffect(()=>{if(G.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,I.current=!1)}},[G.current]),M.createElement("section",{ref:r,"aria-label":`${E} ${te}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},D.map((ee,se)=>{var ue;const[de,Re]=ee.split("-");return $.length?M.createElement("ol",{key:ee,dir:O==="auto"?vk():O,tabIndex:-1,ref:G,className:f,"data-sonner-toaster":!0,"data-sonner-theme":X,"data-y-position":de,"data-x-position":Re,style:{"--front-toast-height":`${((ue=W[0])==null?void 0:ue.height)||0}px`,"--width":`${f4}px`,"--gap":`${A}px`,...x,...v4(p,h)},onBlur:pe=>{I.current&&!pe.currentTarget.contains(pe.relatedTarget)&&(I.current=!1,F.current&&(F.current.focus({preventScroll:!0}),F.current=null))},onFocus:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||I.current||(I.current=!0,F.current=pe.relatedTarget)},onMouseEnter:()=>z(!0),onMouseMove:()=>z(!0),onMouseLeave:()=>{K||z(!1)},onDragEnd:()=>z(!1),onPointerDown:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||V(!0)},onPointerUp:()=>V(!1)},$.filter(pe=>!pe.position&&se===0||pe.position===ee).map((pe,ne)=>{var _e,Oe;return M.createElement(g4,{key:pe.id,icons:T,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:K,position:ee,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:U,toasts:$.filter(ie=>ie.position==pe.position),heights:W.filter(ie=>ie.position==pe.position),setHeights:N,expandByDefault:u,gap:A,expanded:L,swipeDirections:e.swipeDirections})})):null}))}),b4="M147.692 55C178.28 55.0001 203.077 79.7968 203.077 110.385C203.077 140.089 179.692 164.331 150.327 165.706C126.508 171.901 108.924 193.549 108.924 219.308C108.924 222.879 109.261 226.372 109.907 229.755C109.903 229.756 109.898 229.755 109.894 229.756C110.468 232.955 110.77 236.25 110.77 239.615C110.77 242.98 110.468 246.274 109.894 249.474C109.898 249.474 109.903 249.475 109.907 249.476C109.261 252.859 108.924 256.351 108.924 259.923C108.924 285.68 126.507 307.329 150.325 313.524C179.691 314.899 203.077 339.14 203.077 368.846C203.077 399.434 178.28 424.23 147.692 424.23C117.104 424.23 92.3076 399.434 92.3076 368.846C92.3076 364.539 92.7986 360.348 93.7285 356.324C94.007 354.075 94.1543 351.785 94.1543 349.461C94.1541 321.662 73.6718 298.647 46.9756 294.682C46.9934 294.579 47.0138 294.477 47.0322 294.374C20.4072 290.347 2.80541e-05 267.364 0 239.615C0 211.866 20.4071 188.883 47.0322 184.855C47.0139 184.753 46.9934 184.651 46.9756 184.549C73.6719 180.584 94.1542 157.569 94.1543 129.77C94.1543 127.445 94.0063 125.154 93.7275 122.904C92.7979 118.881 92.3076 114.69 92.3076 110.385C92.3076 79.7967 117.104 55 147.692 55ZM332.308 55C362.896 55 387.692 79.7967 387.692 110.385C387.692 115.136 387.093 119.747 385.968 124.147C385.781 125.996 385.683 127.872 385.683 129.77C385.683 157.569 406.165 180.584 432.861 184.549C432.845 184.643 432.826 184.738 432.809 184.832C459.511 188.792 480 211.811 480 239.615C480 267.419 459.511 290.438 432.809 294.397C432.826 294.492 432.845 294.587 432.861 294.682C406.165 298.647 385.683 321.661 385.683 349.461C385.683 351.358 385.781 353.233 385.968 355.081C387.093 359.482 387.692 364.094 387.692 368.846C387.692 399.434 362.896 424.23 332.308 424.23C301.72 424.23 276.923 399.434 276.923 368.846C276.923 364.537 277.414 360.344 278.345 356.318C278.622 354.071 278.77 351.783 278.77 349.461C278.769 321.661 258.287 298.647 231.591 294.682C231.609 294.579 231.629 294.477 231.647 294.374C205.022 290.347 184.615 267.364 184.615 239.615C184.615 209.027 209.412 184.23 240 184.23C270.588 184.231 295.385 209.027 295.385 239.615C295.385 242.98 295.084 246.274 294.509 249.474C294.513 249.474 294.518 249.475 294.522 249.476C293.877 252.859 293.539 256.351 293.539 259.923C293.539 284.692 309.798 305.661 332.226 312.744C354.653 305.661 370.913 284.692 370.913 259.923C370.913 256.351 370.576 252.859 369.93 249.476C369.987 249.467 370.044 249.46 370.102 249.451C369.529 246.259 369.23 242.972 369.23 239.615C369.23 236.259 369.528 232.971 370.101 229.779C370.044 229.771 369.986 229.764 369.93 229.756C370.576 226.372 370.913 222.879 370.913 219.308C370.913 193.537 353.312 171.881 329.476 165.697C300.204 164.223 276.923 140.023 276.923 110.385C276.923 79.7967 301.72 55 332.308 55Z";function ta({height:t=32}){const e=Math.round(t*1);return k.jsxs("svg",{width:e,height:t,viewBox:"0 0 480 480",fill:"none","aria-hidden":!0,children:[k.jsx("path",{d:b4,fill:"url(#io-grad)"}),k.jsx("defs",{children:k.jsxs("linearGradient",{id:"io-grad",x1:"0",x2:"450.529",y1:"402",y2:"69.3087",gradientUnits:"userSpaceOnUse",children:[k.jsx("stop",{stopColor:"#D83333"}),k.jsx("stop",{offset:"0.515",stopColor:"#E43A9C"}),k.jsx("stop",{offset:"1",stopColor:"#F041FF"})]})})]})}const w4="/api";let Va=null;function x4(t){Va=t}function cx(){return(Va==null?void 0:Va())??null}async function Rl(t,e){const r=Va==null?void 0:Va(),n={"Content-Type":"application/json",...e==null?void 0:e.headers};r&&(n.Authorization=`Bearer ${r}`);const i=await fetch(`${w4}${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 et={get:t=>Rl(t),post:(t,e)=>Rl(t,{method:"POST",body:e?JSON.stringify(e):void 0}),patch:(t,e)=>Rl(t,{method:"PATCH",body:JSON.stringify(e)}),put:(t,e)=>Rl(t,{method:"PUT",body:JSON.stringify(e)}),delete:t=>Rl(t,{method:"DELETE"})},_4=10,S4=1e3,k4=3e4;function AC(t={}){const[e,r]=R.useState(!1),[n,i]=R.useState(null),[a,s]=R.useState("connecting"),u=R.useRef(null),c=R.useRef(t),f=R.useRef(0),p=R.useRef(null),h=R.useRef(!0),g=R.useRef(!1);c.current=t,R.useEffect(()=>{let x=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`;const y=cx();y&&(x+=`?token=${encodeURIComponent(y)}`);const S=()=>{if(!h.current)return;s(f.current>0?"reconnecting":"connecting");const O=new WebSocket(x);u.current=O,O.onopen=()=>{const A=f.current>0||g.current;f.current=0,g.current=!1,r(!0),s("connected"),A&&console.info("WebSocket reconnected")},O.onmessage=A=>{var T,E,P,C,$,D,W,N;try{const L=JSON.parse(A.data);switch(L.type){case"connected":i(L.connectionId??null);break;case"delta":(E=(T=c.current).onDelta)==null||E.call(T,L.content??"");break;case"message":(C=(P=c.current).onMessage)==null||C.call(P,L.content??"");break;case"event":(D=($=c.current).onEvent)==null||D.call($,L);break;case"error":(N=(W=c.current).onError)==null||N.call(W,L.content??"Unknown error");break}}catch{}},O.onclose=()=>{if(u.current=null,r(!1),i(null),!h.current)return;if(g.current||(g.current=!0,console.warn("WebSocket disconnected; attempting to reconnect")),f.current>=_4){s("disconnected");return}const A=Math.min(S4*2**f.current,k4);f.current+=1,s("reconnecting"),p.current=setTimeout(S,A)},O.onerror=()=>{O.close()}};return S(),()=>{var O;h.current=!1,p.current&&clearTimeout(p.current),(O=u.current)==null||O.close()}},[]);const v=R.useCallback((w,x="web")=>{var y;((y=u.current)==null?void 0:y.readyState)===WebSocket.OPEN&&u.current.send(JSON.stringify({type:"message",content:w,source:x}))},[]);return{connected:e,connectionId:n,connectionState:a,sendMessage:v}}/**
|
|
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 O4=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),E4=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,n)=>n?n.toUpperCase():r.toLowerCase()),yk=t=>{const e=E4(t);return e.charAt(0).toUpperCase()+e.slice(1)},PC=(...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 A4={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 P4=R.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:s,...u},c)=>R.createElement("svg",{ref:c,...A4,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:PC("lucide",i),...u},[...s.map(([f,p])=>R.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 Ie=(t,e)=>{const r=R.forwardRef(({className:n,...i},a)=>R.createElement(P4,{ref:a,iconNode:e,className:PC(`lucide-${O4(yk(t))}`,`lucide-${t}`,n),...i}));return r.displayName=yk(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 T4=[["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"}]],TC=Ie("activity",T4);/**
|
|
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 j4=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],C4=Ie("bell",j4);/**
|
|
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 R4=[["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"}]],jC=Ie("book-open",R4);/**
|
|
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 N4=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],$4=Ie("bot",N4);/**
|
|
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 I4=[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]],M4=Ie("bug",I4);/**
|
|
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 L4=[["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"}]],hb=Ie("calendar",L4);/**
|
|
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 D4=[["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"}]],B4=Ie("chart-no-axes-column",D4);/**
|
|
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 z4=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],q4=Ie("chevron-down",z4);/**
|
|
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 U4=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],CC=Ie("chevron-left",U4);/**
|
|
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 F4=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],RC=Ie("chevron-right",F4);/**
|
|
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 H4=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],W4=Ie("clock",H4);/**
|
|
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 V4=[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]],K4=Ie("cpu",V4);/**
|
|
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 G4=[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]],X4=Ie("crown",G4);/**
|
|
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 Y4=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],J4=Ie("dollar-sign",Y4);/**
|
|
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 Q4=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],Z4=Ie("download",Q4);/**
|
|
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 e5=[["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"}]],NC=Ie("external-link",e5);/**
|
|
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 t5=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],r5=Ie("eye-off",t5);/**
|
|
157
|
-
* @license lucide-react v0.487.0 - ISC
|
|
158
|
-
*
|
|
159
|
-
* This source code is licensed under the ISC license.
|
|
160
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const n5=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],i5=Ie("eye",n5);/**
|
|
162
|
-
* @license lucide-react v0.487.0 - ISC
|
|
163
|
-
*
|
|
164
|
-
* This source code is licensed under the ISC license.
|
|
165
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/const a5=[["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"}]],o5=Ie("file-text",a5);/**
|
|
167
|
-
* @license lucide-react v0.487.0 - ISC
|
|
168
|
-
*
|
|
169
|
-
* This source code is licensed under the ISC license.
|
|
170
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
-
*/const s5=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],l5=Ie("folder-open",s5);/**
|
|
172
|
-
* @license lucide-react v0.487.0 - ISC
|
|
173
|
-
*
|
|
174
|
-
* This source code is licensed under the ISC license.
|
|
175
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/const u5=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],c5=Ie("folder",u5);/**
|
|
177
|
-
* @license lucide-react v0.487.0 - ISC
|
|
178
|
-
*
|
|
179
|
-
* This source code is licensed under the ISC license.
|
|
180
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/const f5=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],d5=Ie("github",f5);/**
|
|
182
|
-
* @license lucide-react v0.487.0 - ISC
|
|
183
|
-
*
|
|
184
|
-
* This source code is licensed under the ISC license.
|
|
185
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
-
*/const h5=[["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"}]],$C=Ie("inbox",h5);/**
|
|
187
|
-
* @license lucide-react v0.487.0 - ISC
|
|
188
|
-
*
|
|
189
|
-
* This source code is licensed under the ISC license.
|
|
190
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/const p5=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],m5=Ie("layers",p5);/**
|
|
192
|
-
* @license lucide-react v0.487.0 - ISC
|
|
193
|
-
*
|
|
194
|
-
* This source code is licensed under the ISC license.
|
|
195
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
-
*/const g5=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Nl=Ie("loader-circle",g5);/**
|
|
197
|
-
* @license lucide-react v0.487.0 - ISC
|
|
198
|
-
*
|
|
199
|
-
* This source code is licensed under the ISC license.
|
|
200
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
-
*/const v5=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],y5=Ie("log-out",v5);/**
|
|
202
|
-
* @license lucide-react v0.487.0 - ISC
|
|
203
|
-
*
|
|
204
|
-
* This source code is licensed under the ISC license.
|
|
205
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
-
*/const b5=[["path",{d:"M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z",key:"1jhwl8"}],["path",{d:"m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10",key:"1qfld7"}]],w5=Ie("mail-open",b5);/**
|
|
207
|
-
* @license lucide-react v0.487.0 - ISC
|
|
208
|
-
*
|
|
209
|
-
* This source code is licensed under the ISC license.
|
|
210
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
-
*/const x5=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]],_5=Ie("mail",x5);/**
|
|
212
|
-
* @license lucide-react v0.487.0 - ISC
|
|
213
|
-
*
|
|
214
|
-
* This source code is licensed under the ISC license.
|
|
215
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
-
*/const S5=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],k5=Ie("message-circle",S5);/**
|
|
217
|
-
* @license lucide-react v0.487.0 - ISC
|
|
218
|
-
*
|
|
219
|
-
* This source code is licensed under the ISC license.
|
|
220
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
-
*/const O5=[["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"}]],E5=Ie("message-square",O5);/**
|
|
222
|
-
* @license lucide-react v0.487.0 - ISC
|
|
223
|
-
*
|
|
224
|
-
* This source code is licensed under the ISC license.
|
|
225
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
-
*/const A5=[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]],IC=Ie("paperclip",A5);/**
|
|
227
|
-
* @license lucide-react v0.487.0 - ISC
|
|
228
|
-
*
|
|
229
|
-
* This source code is licensed under the ISC license.
|
|
230
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
-
*/const P5=[["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"}]],T5=Ie("pause",P5);/**
|
|
232
|
-
* @license lucide-react v0.487.0 - ISC
|
|
233
|
-
*
|
|
234
|
-
* This source code is licensed under the ISC license.
|
|
235
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
-
*/const j5=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],pb=Ie("pencil",j5);/**
|
|
237
|
-
* @license lucide-react v0.487.0 - ISC
|
|
238
|
-
*
|
|
239
|
-
* This source code is licensed under the ISC license.
|
|
240
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
-
*/const C5=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],R5=Ie("play",C5);/**
|
|
242
|
-
* @license lucide-react v0.487.0 - ISC
|
|
243
|
-
*
|
|
244
|
-
* This source code is licensed under the ISC license.
|
|
245
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
-
*/const N5=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],MC=Ie("plus",N5);/**
|
|
247
|
-
* @license lucide-react v0.487.0 - ISC
|
|
248
|
-
*
|
|
249
|
-
* This source code is licensed under the ISC license.
|
|
250
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
-
*/const $5=[["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"}]],I5=Ie("save",$5);/**
|
|
252
|
-
* @license lucide-react v0.487.0 - ISC
|
|
253
|
-
*
|
|
254
|
-
* This source code is licensed under the ISC license.
|
|
255
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
-
*/const M5=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],L5=Ie("scroll-text",M5);/**
|
|
257
|
-
* @license lucide-react v0.487.0 - ISC
|
|
258
|
-
*
|
|
259
|
-
* This source code is licensed under the ISC license.
|
|
260
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
-
*/const D5=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],LC=Ie("search",D5);/**
|
|
262
|
-
* @license lucide-react v0.487.0 - ISC
|
|
263
|
-
*
|
|
264
|
-
* This source code is licensed under the ISC license.
|
|
265
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
-
*/const B5=[["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"}]],DC=Ie("send",B5);/**
|
|
267
|
-
* @license lucide-react v0.487.0 - ISC
|
|
268
|
-
*
|
|
269
|
-
* This source code is licensed under the ISC license.
|
|
270
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
271
|
-
*/const z5=[["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"}]],q5=Ie("settings",z5);/**
|
|
272
|
-
* @license lucide-react v0.487.0 - ISC
|
|
273
|
-
*
|
|
274
|
-
* This source code is licensed under the ISC license.
|
|
275
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
276
|
-
*/const U5=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],bk=Ie("sparkles",U5);/**
|
|
277
|
-
* @license lucide-react v0.487.0 - ISC
|
|
278
|
-
*
|
|
279
|
-
* This source code is licensed under the ISC license.
|
|
280
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
281
|
-
*/const F5=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],BC=Ie("square",F5);/**
|
|
282
|
-
* @license lucide-react v0.487.0 - ISC
|
|
283
|
-
*
|
|
284
|
-
* This source code is licensed under the ISC license.
|
|
285
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
286
|
-
*/const H5=[["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"}]],fx=Ie("trash-2",H5);/**
|
|
287
|
-
* @license lucide-react v0.487.0 - ISC
|
|
288
|
-
*
|
|
289
|
-
* This source code is licensed under the ISC license.
|
|
290
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
291
|
-
*/const W5=[["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"}]],zC=Ie("users",W5);/**
|
|
292
|
-
* @license lucide-react v0.487.0 - ISC
|
|
293
|
-
*
|
|
294
|
-
* This source code is licensed under the ISC license.
|
|
295
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
296
|
-
*/const V5=[["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"}]],eu=Ie("zap",V5);function dx(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ro=dx();function qC(t){ro=t}var Da={exec:()=>null};function $o(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 Fe(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(ur.caret,"$1"),r=r.replace(i,s),n},getRegex:()=>new RegExp(r,e)};return n}var K5=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),ur={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:$o(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:$o(t=>new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:$o(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:$o(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:$o(t=>new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:$o(t=>new RegExp(`^ {0,${t}}>`))},G5=/^(?:[ \t]*(?:\n|$))+/,X5=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Y5=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ec=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,J5=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hx=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,UC=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,FC=Fe(UC).replace(/bull/g,hx).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(),Q5=Fe(UC).replace(/bull/g,hx).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(),px=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Z5=/^[^\n]+/,mx=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,e8=Fe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",mx).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),t8=Fe(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,hx).getRegex(),gh="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",gx=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,r8=Fe("^ {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",gx).replace("tag",gh).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),HC=Fe(px).replace("hr",ec).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",gh).getRegex(),n8=Fe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",HC).getRegex(),vx={blockquote:n8,code:X5,def:e8,fences:Y5,heading:J5,hr:ec,html:r8,lheading:FC,list:t8,newline:G5,paragraph:HC,table:Da,text:Z5},wk=Fe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ec).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",gh).getRegex(),i8={...vx,lheading:Q5,table:wk,paragraph:Fe(px).replace("hr",ec).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",wk).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",gh).getRegex()},a8={...vx,html:Fe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",gx).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:Da,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Fe(px).replace("hr",ec).replace("heading",` *#{1,6} *[^
|
|
297
|
-
]`).replace("lheading",FC).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},o8=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,s8=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,WC=/^( {2,}|\\)\n(?!\s*$)/,l8=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ms=/[\p{P}\p{S}]/u,vh=/[\s\p{P}\p{S}]/u,yx=/[^\s\p{P}\p{S}]/u,u8=Fe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,vh).getRegex(),VC=/(?!~)[\p{P}\p{S}]/u,c8=/(?!~)[\s\p{P}\p{S}]/u,f8=/(?:[^\s\p{P}\p{S}]|~)/u,d8=Fe(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",K5?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),KC=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,h8=Fe(KC,"u").replace(/punct/g,Ms).getRegex(),p8=Fe(KC,"u").replace(/punct/g,VC).getRegex(),GC="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",m8=Fe(GC,"gu").replace(/notPunctSpace/g,yx).replace(/punctSpace/g,vh).replace(/punct/g,Ms).getRegex(),g8=Fe(GC,"gu").replace(/notPunctSpace/g,f8).replace(/punctSpace/g,c8).replace(/punct/g,VC).getRegex(),v8=Fe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,yx).replace(/punctSpace/g,vh).replace(/punct/g,Ms).getRegex(),y8=Fe(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Ms).getRegex(),b8="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",w8=Fe(b8,"gu").replace(/notPunctSpace/g,yx).replace(/punctSpace/g,vh).replace(/punct/g,Ms).getRegex(),x8=Fe(/\\(punct)/,"gu").replace(/punct/g,Ms).getRegex(),_8=Fe(/^<(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(),S8=Fe(gx).replace("(?:-->|$)","-->").getRegex(),k8=Fe("^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",S8).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),nd=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,O8=Fe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",nd).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),XC=Fe(/^!?\[(label)\]\[(ref)\]/).replace("label",nd).replace("ref",mx).getRegex(),YC=Fe(/^!?\[(ref)\](?:\[\])?/).replace("ref",mx).getRegex(),E8=Fe("reflink|nolink(?!\\()","g").replace("reflink",XC).replace("nolink",YC).getRegex(),xk=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,bx={_backpedal:Da,anyPunctuation:x8,autolink:_8,blockSkip:d8,br:WC,code:s8,del:Da,delLDelim:Da,delRDelim:Da,emStrongLDelim:h8,emStrongRDelimAst:m8,emStrongRDelimUnd:v8,escape:o8,link:O8,nolink:YC,punctuation:u8,reflink:XC,reflinkSearch:E8,tag:k8,text:l8,url:Da},A8={...bx,link:Fe(/^!?\[(label)\]\((.*?)\)/).replace("label",nd).getRegex(),reflink:Fe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",nd).getRegex()},mb={...bx,emStrongRDelimAst:g8,emStrongLDelim:p8,delLDelim:y8,delRDelim:w8,url:Fe(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",xk).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:Fe(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",xk).getRegex()},P8={...mb,br:Fe(WC).replace("{2,}","*").getRegex(),text:Fe(mb.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},_f={normal:vx,gfm:i8,pedantic:a8},$l={normal:bx,gfm:mb,breaks:P8,pedantic:A8},T8={"&":"&","<":"<",">":">",'"':""","'":"'"},_k=t=>T8[t];function Mn(t,e){if(e){if(ur.escapeTest.test(t))return t.replace(ur.escapeReplace,_k)}else if(ur.escapeTestNoEncode.test(t))return t.replace(ur.escapeReplaceNoEncode,_k);return t}function Sk(t){try{t=encodeURI(t).replace(ur.percentDecode,"%")}catch{return null}return t}function kk(t,e){var a;let r=t.replace(ur.findPipe,(s,u,c)=>{let f=!1,p=u;for(;--p>=0&&c[p]==="\\";)f=!f;return f?"|":" |"}),n=r.split(ur.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(ur.slashPipe,"|");return n}function Xi(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 Ok(t){let e=t.split(`
|
|
298
|
-
`),r=e.length-1;for(;r>=0&&ur.blankLine.test(e[r]);)r--;return e.length-r<=2?t:e.slice(0,r+1).join(`
|
|
299
|
-
`)}function j8(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 C8(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 Ek(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 R8(t,e,r){let n=t.match(r.other.indentCodeCompensation);if(n===null)return e;let i=n[1];return e.split(`
|
|
300
|
-
`).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(`
|
|
301
|
-
`)}var id=class{constructor(t){Qe(this,"options");Qe(this,"rules");Qe(this,"lexer");this.options=t||ro}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]:Ok(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=R8(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=Xi(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:Xi(e[0],`
|
|
302
|
-
`),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:Xi(e[0],`
|
|
303
|
-
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let r=Xi(e[0],`
|
|
304
|
-
`).split(`
|
|
305
|
-
`),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(`
|
|
306
|
-
`),p=f.replace(this.rules.other.blockquoteSetextReplace,`
|
|
307
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
308
|
-
${f}`:f,i=i?`${i}
|
|
309
|
-
${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+`
|
|
310
|
-
`+r.join(`
|
|
311
|
-
`),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+`
|
|
312
|
-
`+r.join(`
|
|
313
|
-
`),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(`
|
|
314
|
-
`);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=C8(e[2].split(`
|
|
315
|
-
`,1)[0],e[1].length),g=t.split(`
|
|
316
|
-
`,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+`
|
|
317
|
-
`,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),O=this.rules.other.headingBeginRegex(w),A=this.rules.other.htmlBeginRegex(w),T=this.rules.other.blockquoteBeginRegex(w);for(;t;){let E=t.split(`
|
|
318
|
-
`,1)[0],P;if(g=E,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),P=g):P=g.replace(this.rules.other.tabCharGlobal," "),S.test(g)||O.test(g)||A.test(g)||T.test(g)||x.test(g)||y.test(g))break;if(P.search(this.rules.other.nonSpaceChar)>=w||!g.trim())p+=`
|
|
319
|
-
`+P.slice(w);else{if(v||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||S.test(h)||O.test(h)||y.test(h))break;p+=`
|
|
320
|
-
`+g}v=!g.trim(),f+=E+`
|
|
321
|
-
`,t=t.substring(E.length+1),h=P.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=Ok(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:Xi(e[0],`
|
|
322
|
-
`),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=kk(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(`
|
|
323
|
-
`):[],a={type:"table",raw:Xi(e[0],`
|
|
324
|
-
`),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(kk(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:Xi(e[0],`
|
|
325
|
-
`),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)===`
|
|
326
|
-
`?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=Xi(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{let a=j8(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)),Ek(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 Ek(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}}}},wn=class gb{constructor(e){Qe(this,"tokens");Qe(this,"options");Qe(this,"state");Qe(this,"inlineQueue");Qe(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||ro,this.options.tokenizer=this.options.tokenizer||new id,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:ur,block:_f.normal,inline:$l.normal};this.options.pedantic?(r.block=_f.pedantic,r.inline=$l.pedantic):this.options.gfm&&(r.block=_f.gfm,this.options.breaks?r.inline=$l.breaks:r.inline=$l.gfm),this.tokenizer.rules=r}static get rules(){return{block:_f,inline:$l}}static lex(e,r){return new gb(r).lex(e)}static lexInline(e,r){return new gb(r).inlineTokens(e)}lex(e){e=e.replace(ur.carriageReturn,`
|
|
327
|
-
`),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(ur.tabCharGlobal," ").replace(ur.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+=`
|
|
328
|
-
`: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(`
|
|
329
|
-
`)?"":`
|
|
330
|
-
`)+c.raw,p.text+=`
|
|
331
|
-
`+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(`
|
|
332
|
-
`)?"":`
|
|
333
|
-
`)+c.raw,p.text+=`
|
|
334
|
-
`+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(`
|
|
335
|
-
`)?"":`
|
|
336
|
-
`)+c.raw,p.text+=`
|
|
337
|
-
`+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(`
|
|
338
|
-
`)?"":`
|
|
339
|
-
`)+c.raw,p.text+=`
|
|
340
|
-
`+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),O;this.options.extensions.startInline.forEach(A=>{O=A.call({lexer:this},S),typeof O=="number"&&O>=0&&(y=Math.min(y,O))}),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)}},ad=class{constructor(e){Qe(this,"options");Qe(this,"parser");this.options=e||ro}space(e){return""}code({text:e,lang:r,escaped:n}){var s;let i=(s=(r||"").match(ur.notSpaceStart))==null?void 0:s[0],a=e.replace(ur.endingNewline,"")+`
|
|
341
|
-
`;return i?'<pre><code class="language-'+Mn(i)+'">'+(n?a:Mn(a,!0))+`</code></pre>
|
|
342
|
-
`:"<pre><code>"+(n?a:Mn(a,!0))+`</code></pre>
|
|
343
|
-
`}blockquote({tokens:e}){return`<blockquote>
|
|
344
|
-
${this.parser.parse(e)}</blockquote>
|
|
345
|
-
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:r}){return`<h${r}>${this.parser.parseInline(e)}</h${r}>
|
|
346
|
-
`}hr(e){return`<hr>
|
|
347
|
-
`}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+`>
|
|
348
|
-
`+i+"</"+a+`>
|
|
349
|
-
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
350
|
-
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
351
|
-
`}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>
|
|
352
|
-
<thead>
|
|
353
|
-
`+r+`</thead>
|
|
354
|
-
`+i+`</table>
|
|
355
|
-
`}tablerow({text:e}){return`<tr>
|
|
356
|
-
${e}</tr>
|
|
357
|
-
`}tablecell(e){let r=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+r+`</${n}>
|
|
358
|
-
`}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>${Mn(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=Sk(e);if(a===null)return i;e=a;let s='<a href="'+e+'"';return r&&(s+=' title="'+Mn(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=Sk(e);if(a===null)return Mn(n);e=a;let s=`<img src="${e}" alt="${Mn(n)}"`;return r&&(s+=` title="${Mn(r)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Mn(e.text)}},wx=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}},xn=class vb{constructor(e){Qe(this,"options");Qe(this,"renderer");Qe(this,"textRenderer");this.options=e||ro,this.options.renderer=this.options.renderer||new ad,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new wx}static parse(e,r){return new vb(r).parse(e)}static parseInline(e,r){return new vb(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}},Xf,Kl=(Xf=class{constructor(e){Qe(this,"options");Qe(this,"block");this.options=e||ro}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?wn.lex:wn.lexInline}provideParser(e=this.block){return e?xn.parse:xn.parseInline}},Qe(Xf,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Qe(Xf,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Xf),N8=class{constructor(...t){Qe(this,"defaults",dx());Qe(this,"options",this.setOptions);Qe(this,"parse",this.parseMarkdown(!0));Qe(this,"parseInline",this.parseMarkdown(!1));Qe(this,"Parser",xn);Qe(this,"Renderer",ad);Qe(this,"TextRenderer",wx);Qe(this,"Lexer",wn);Qe(this,"Tokenizer",id);Qe(this,"Hooks",Kl);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 ad(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 id(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 Kl;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];Kl.passThroughHooks.has(a)?i[s]=f=>{if(this.defaults.async&&Kl.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 wn.lex(t,e??this.defaults)}parser(t,e){return xn.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?wn.lex:wn.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?xn.parse:xn.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?wn.lex:wn.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?xn.parse:xn.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+=`
|
|
359
|
-
Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+Mn(r.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},Xa=new N8;function qe(t,e){return Xa.parse(t,e)}qe.options=qe.setOptions=function(t){return Xa.setOptions(t),qe.defaults=Xa.defaults,qC(qe.defaults),qe};qe.getDefaults=dx;qe.defaults=ro;qe.use=function(...t){return Xa.use(...t),qe.defaults=Xa.defaults,qC(qe.defaults),qe};qe.walkTokens=function(t,e){return Xa.walkTokens(t,e)};qe.parseInline=Xa.parseInline;qe.Parser=xn;qe.parser=xn.parse;qe.Renderer=ad;qe.TextRenderer=wx;qe.Lexer=wn;qe.lexer=wn.lex;qe.Tokenizer=id;qe.Hooks=Kl;qe.parse=qe;qe.options;qe.setOptions;qe.use;qe.walkTokens;qe.parseInline;xn.parse;wn.lex;function Qm(t){return new Date(t).toISOString()}function $8(){const[t,e]=R.useState(!1),[r,n]=R.useState([]),[i,a]=R.useState(""),[s,u]=R.useState(!1),[c,f]=R.useState(""),[p,h]=R.useState(null),g=R.useRef(null),v=R.useRef(null),w=R.useRef(null),x=R.useMemo(()=>r.slice(-10),[r]),y=R.useCallback(async()=>{try{const N=await et.get("/conversations?limit=10");n(N.messages.map(L=>({...L,timestamp:Qm(L.timestamp)})))}catch{}},[]);R.useEffect(()=>{y()},[y]),R.useEffect(()=>{t&&y()},[y,t]);const S=R.useCallback(N=>{u(!0),f(N)},[]),O=R.useCallback(N=>{u(!1),f(""),n(L=>[...L,{id:crypto.randomUUID(),role:"assistant",content:N,timestamp:Qm(new Date)}])},[]),A=R.useCallback(N=>{},[]),T=R.useCallback(()=>{u(!1),f("")},[]),{connected:E,sendMessage:P}=AC({onDelta:S,onMessage:O,onEvent:A,onError:T});R.useLayoutEffect(()=>{const N=g.current;N&&(N.scrollTop=N.scrollHeight)},[x,c,s,t]);async function C(N,L){const z=new FormData;z.append("file",N),z.append("messageId",L);const K=cx();if(!(await fetch("/api/attachments",{method:"POST",body:z,headers:K?{Authorization:`Bearer ${K}`}:void 0})).ok)throw new Error("Failed to upload attachment")}async function $(){const N=i.trim();if(!N&&!p||s)return;const L=crypto.randomUUID(),z=p==null?void 0:p.name,K=[N,z?`Attachment: ${z}`:""].filter(Boolean).join(`
|
|
360
|
-
|
|
361
|
-
`);n(V=>[...V,{id:L,role:"user",content:N,timestamp:Qm(new Date),attachmentName:z}]),a(""),h(null),u(!0),f(""),w.current&&(w.current.value=""),v.current&&(v.current.style.height="auto");try{p&&await C(p,L),P(K),e(!0)}catch{u(!1)}}function D(N){a(N.target.value),v.current&&(v.current.style.height="auto",v.current.style.height=`${Math.min(v.current.scrollHeight,96)}px`)}function W(N){N.key==="Enter"&&!N.shiftKey&&(N.preventDefault(),$())}return k.jsxs("div",{className:"fixed bottom-5 right-5 z-50 flex flex-col items-end gap-3",children:[t&&k.jsxs("div",{className:"w-[340px] h-[460px] rounded-2xl bg-[#222] border border-white/[0.07] shadow-2xl overflow-hidden flex flex-col",children:[k.jsxs("div",{className:"bg-gradient-to-r from-[#E43A9C] to-[#9333ea] p-3 rounded-t-2xl flex items-center justify-between gap-3",children:[k.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[k.jsx("div",{className:"w-8 h-8 rounded-xl bg-black/15 border border-white/10 flex items-center justify-center flex-shrink-0",children:k.jsx(ta,{height:16})}),k.jsxs("div",{className:"min-w-0",children:[k.jsx("p",{className:"text-sm font-medium text-white leading-none",children:"Quick Chat"}),k.jsx("p",{className:"text-[10px] font-mono text-white/70 mt-1",children:E?"live session":"reconnecting..."})]})]}),k.jsx("button",{type:"button",onClick:()=>e(!1),className:"text-xs font-mono text-white/80 hover:text-white transition-colors",children:"Close"})]}),k.jsxs("div",{ref:g,className:"flex-1 overflow-y-auto p-3 space-y-2",children:[x.length===0&&!s?k.jsx("div",{className:"h-full flex items-center justify-center text-center px-6",children:k.jsx("p",{className:"text-xs text-zinc-500",children:"Ask IO anything without leaving this page."})}):x.map(N=>k.jsx("div",{className:`flex ${N.role==="user"?"justify-end":"justify-start"}`,title:N.timestamp,children:k.jsxs("div",{className:`max-w-[85%] ${N.role==="user"?"ml-8":"mr-8"}`,children:[N.attachmentName&&k.jsx("div",{className:"mb-1 rounded-xl border border-white/[0.08] bg-[#1e1e1e] px-3 py-2 text-[11px] font-mono text-zinc-400",children:N.attachmentName}),N.content&&k.jsx("div",{className:N.role==="user"?"bg-gradient-to-br from-[#E43A9C] to-[#D83333] rounded-xl px-3 py-2 text-xs text-white whitespace-pre-wrap":"bg-[#2a2a2a] rounded-xl px-3 py-2 text-xs text-zinc-200",children:N.role==="user"?N.content:k.jsx("div",{className:"prose-io [&_*]:text-xs",dangerouslySetInnerHTML:{__html:qe.parse(N.content)}})})]})},N.id)),s&&k.jsx("div",{className:"flex justify-start",children:k.jsx("div",{className:"max-w-[85%] mr-8 bg-[#2a2a2a] rounded-xl px-3 py-2 text-xs text-zinc-200",children:c?k.jsx("div",{className:"prose-io [&_*]:text-xs",dangerouslySetInnerHTML:{__html:qe.parse(c)}}):k.jsx("div",{className:"flex items-center gap-1.5 py-1",children:[0,120,240].map(N=>k.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-[#E43A9C] animate-bounce",style:{animationDelay:`${N}ms`}},N))})})})]}),k.jsx("div",{className:"p-3 border-t border-white/[0.07]",children:k.jsxs("div",{className:"bg-[#1e1e1e] border border-white/[0.08] rounded-2xl overflow-hidden transition-colors focus-within:border-[#E43A9C]/30",children:[k.jsx("input",{ref:w,type:"file",className:"hidden",onChange:N=>{var L;return h(((L=N.target.files)==null?void 0:L[0])??null)}}),p&&k.jsxs("div",{className:"px-3 pt-2 text-[10px] font-mono text-zinc-400",children:["Attached: ",p.name]}),k.jsxs("div",{className:"flex items-end gap-2 px-2.5 py-2",children:[k.jsx("button",{type:"button",onClick:()=>{var N;return(N=w.current)==null?void 0:N.click()},className:"p-2 rounded-xl hover:bg-white/[0.05] text-zinc-600 hover:text-zinc-300 transition-colors flex-shrink-0",children:k.jsx(IC,{className:"w-4 h-4"})}),k.jsx("textarea",{ref:v,value:i,onChange:D,onKeyDown:W,placeholder:"Message IO…",rows:1,className:"flex-1 bg-transparent py-1 text-sm text-zinc-200 placeholder:text-zinc-700 resize-none focus:outline-none",style:{minHeight:"36px",maxHeight:"96px",fontFamily:"Inter, sans-serif"}}),k.jsx("button",{type:"button",onClick:()=>{if(s){u(!1),f("");return}$()},disabled:!i.trim()&&!p||!E&&!s,className:"w-9 h-9 rounded-xl text-white disabled:opacity-30 disabled:cursor-not-allowed transition-opacity hover:opacity-90 primary-btn flex items-center justify-center flex-shrink-0 shadow-lg",children:s?k.jsx(BC,{className:"w-3.5 h-3.5"}):k.jsx(DC,{className:"w-3.5 h-3.5"})})]})]})})]}),k.jsx("button",{type:"button",onClick:()=>e(N=>!N),className:"w-12 h-12 rounded-full primary-btn shadow-lg text-white flex items-center justify-center hover:opacity-95 transition-opacity","aria-label":t?"Close quick chat":"Open quick chat",children:k.jsx(k5,{className:"w-5 h-5"})})]})}function JC(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=JC(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function De(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=JC(t))&&(n&&(n+=" "),n+=e);return n}const I8=(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},M8=(t,e)=>({classGroupId:t,validator:e}),QC=(t=new Map,e=null,r)=>({nextPart:t,validators:e,classGroupId:r}),od="-",Ak=[],L8="arbitrary..",D8=t=>{const e=z8(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return B8(s);const u=s.split(od),c=u[0]===""&&u.length>1?1:0;return ZC(u,c,e)},getConflictingClassGroupIds:(s,u)=>{if(u){const c=n[s],f=r[s];return c?f?I8(f,c):c:f||Ak}return r[s]||Ak}}},ZC=(t,e,r)=>{if(t.length-e===0)return r.classGroupId;const i=t[e],a=r.nextPart.get(i);if(a){const f=ZC(t,e+1,a);if(f)return f}const s=r.validators;if(s===null)return;const u=e===0?t.join(od):t.slice(e).join(od),c=s.length;for(let f=0;f<c;f++){const p=s[f];if(p.validator(u))return p.classGroupId}},B8=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?L8+n:void 0})(),z8=t=>{const{theme:e,classGroups:r}=t;return q8(r,e)},q8=(t,e)=>{const r=QC();for(const n in t){const i=t[n];xx(i,r,n,e)}return r},xx=(t,e,r,n)=>{const i=t.length;for(let a=0;a<i;a++){const s=t[a];U8(s,e,r,n)}},U8=(t,e,r,n)=>{if(typeof t=="string"){F8(t,e,r);return}if(typeof t=="function"){H8(t,e,r,n);return}W8(t,e,r,n)},F8=(t,e,r)=>{const n=t===""?e:eR(e,t);n.classGroupId=r},H8=(t,e,r,n)=>{if(V8(t)){xx(t(n),e,r,n);return}e.validators===null&&(e.validators=[]),e.validators.push(M8(r,t))},W8=(t,e,r,n)=>{const i=Object.entries(t),a=i.length;for(let s=0;s<a;s++){const[u,c]=i[s];xx(c,eR(e,u),r,n)}},eR=(t,e)=>{let r=t;const n=e.split(od),i=n.length;for(let a=0;a<i;a++){const s=n[a];let u=r.nextPart.get(s);u||(u=QC(),r.nextPart.set(s,u)),r=u}return r},V8=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,K8=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)}}},yb="!",Pk=":",G8=[],Tk=(t,e,r,n,i)=>({modifiers:t,hasImportantModifier:e,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),X8=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===Pk){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(yb)?(g=h.slice(0,-1),v=!0):h.startsWith(yb)&&(g=h.slice(1),v=!0);const w=f&&f>c?f-c:void 0;return Tk(a,v,g,w)};if(e){const i=e+Pk,a=n;n=s=>s.startsWith(i)?a(s.slice(i.length)):Tk(G8,!1,s,void 0,!0)}if(r){const i=n;n=a=>r({className:a,parseClassName:i})}return n},Y8=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}},J8=t=>({cache:K8(t.cacheSize),parseClassName:X8(t),sortModifiers:Y8(t),postfixLookupClassGroupIds:Q8(t),...D8(t)}),Q8=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},Z8=/\s+/,eB=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:s}=e,u=[],c=t.trim().split(Z8);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,O;if(S){const C=x.substring(0,y);O=n(C);const $=O&&s[O]?n(x):void 0;$&&$!==O&&(O=$,S=!1)}else O=n(x);if(!O){if(!S){f=h+(f.length>0?" "+f:f);continue}if(O=n(x),!O){f=h+(f.length>0?" "+f:f);continue}S=!1}const A=v.length===0?"":v.length===1?v[0]:a(v).join(":"),T=w?A+yb:A,E=T+O;if(u.indexOf(E)>-1)continue;u.push(E);const P=i(O,S);for(let C=0;C<P.length;++C){const $=P[C];u.push(T+$)}f=h+(f.length>0?" "+f:f)}return f},tB=(...t)=>{let e=0,r,n,i="";for(;e<t.length;)(r=t[e++])&&(n=tR(r))&&(i&&(i+=" "),i+=n);return i},tR=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=tR(t[n]))&&(r&&(r+=" "),r+=e);return r},rB=(t,...e)=>{let r,n,i,a;const s=c=>{const f=e.reduce((p,h)=>h(p),t());return r=J8(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=eB(c,r);return i(c,p),p};return a=s,(...c)=>a(tB(...c))},nB=[],It=t=>{const e=r=>r[t]||nB;return e.isThemeGetter=!0,e},rR=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,nR=/^\((?:(\w[\w-]*):)?(.+)\)$/i,iB=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,aB=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,oB=/\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$/,sB=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,lB=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,uB=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Yi=t=>iB.test(t),Be=t=>!!t&&!Number.isNaN(Number(t)),$n=t=>!!t&&Number.isInteger(Number(t)),Zm=t=>t.endsWith("%")&&Be(t.slice(0,-1)),ri=t=>aB.test(t),iR=()=>!0,cB=t=>oB.test(t)&&!sB.test(t),_x=()=>!1,fB=t=>lB.test(t),dB=t=>uB.test(t),hB=t=>!ge(t)&&!ye(t),pB=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)),mB=t=>aa(t,sR,_x),ge=t=>rR.test(t),Ta=t=>aa(t,lR,cB),jk=t=>aa(t,SB,Be),gB=t=>aa(t,cR,iR),vB=t=>aa(t,uR,_x),Ck=t=>aa(t,aR,_x),yB=t=>aa(t,oR,dB),Sf=t=>aa(t,fR,fB),ye=t=>nR.test(t),Il=t=>no(t,lR),bB=t=>no(t,uR),Rk=t=>no(t,aR),wB=t=>no(t,sR),xB=t=>no(t,oR),kf=t=>no(t,fR,!0),_B=t=>no(t,cR,!0),aa=(t,e,r)=>{const n=rR.exec(t);return n?n[1]?e(n[1]):r(n[2]):!1},no=(t,e,r=!1)=>{const n=nR.exec(t);return n?n[1]?e(n[1]):r:!1},aR=t=>t==="position"||t==="percentage",oR=t=>t==="image"||t==="url",sR=t=>t==="length"||t==="size"||t==="bg-size",lR=t=>t==="length",SB=t=>t==="number",uR=t=>t==="family-name",cR=t=>t==="number"||t==="weight",fR=t=>t==="shadow",kB=()=>{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"),O=It("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...T(),ye,ge],P=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto","contain","none"],$=()=>[ye,ge,c],D=()=>[Yi,"full","auto",...$()],W=()=>[$n,"none","subgrid",ye,ge],N=()=>["auto",{span:["full",$n,ye,ge]},$n,ye,ge],L=()=>[$n,"auto",ye,ge],z=()=>["auto","min","max","fr",ye,ge],K=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],X=()=>["auto",...$()],Q=()=>[Yi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...$()],G=()=>[Yi,"screen","full","dvw","lvw","svw","min","max","fit",...$()],te=()=>[Yi,"screen","full","lh","dvh","lvh","svh","min","max","fit",...$()],F=()=>[t,ye,ge],I=()=>[...T(),Rk,Ck,{position:[ye,ge]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ee=()=>["auto","cover","contain",wB,mB,{size:[ye,ge]}],se=()=>[Zm,Il,Ta],ue=()=>["","none","full",f,ye,ge],de=()=>["",Be,Il,Ta],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=()=>[Be,Zm,Rk,Ck],_e=()=>["","none",w,ye,ge],Oe=()=>["none",Be,ye,ge],ie=()=>["none",Be,ye,ge],He=()=>[Be,ye,ge],Ne=()=>[Yi,"full",...$()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ri],breakpoint:[ri],color:[iR],container:[ri],"drop-shadow":[ri],ease:["in","out","in-out"],font:[hB],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ri],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ri],shadow:[ri],spacing:["px",Be],text:[ri],"text-shadow":[ri],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Yi,ge,ye,y]}],container:["container"],"container-type":[{"@container":["","normal","size",ye,ge]}],"container-named":[pB],columns:[{columns:[Be,ge,ye,u]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"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:E()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[$n,"auto",ye,ge]}],basis:[{basis:[Yi,"full","auto",u,...$()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Be,Yi,"auto","initial","none",ge]}],grow:[{grow:["",Be,ye,ge]}],shrink:[{shrink:["",Be,ye,ge]}],order:[{order:[$n,"first","last","none",ye,ge]}],"grid-cols":[{"grid-cols":W()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":W()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":z()}],"auto-rows":[{"auto-rows":z()}],gap:[{gap:$()}],"gap-x":[{"gap-x":$()}],"gap-y":[{"gap-y":$()}],"justify-content":[{justify:[...K(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...K()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":K()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:$()}],px:[{px:$()}],py:[{py:$()}],ps:[{ps:$()}],pe:[{pe:$()}],pbs:[{pbs:$()}],pbe:[{pbe:$()}],pt:[{pt:$()}],pr:[{pr:$()}],pb:[{pb:$()}],pl:[{pl:$()}],m:[{m:X()}],mx:[{mx:X()}],my:[{my:X()}],ms:[{ms:X()}],me:[{me:X()}],mbs:[{mbs:X()}],mbe:[{mbe:X()}],mt:[{mt:X()}],mr:[{mr:X()}],mb:[{mb:X()}],ml:[{ml:X()}],"space-x":[{"space-x":$()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":$()}],"space-y-reverse":["space-y-reverse"],size:[{size:Q()}],"inline-size":[{inline:["auto",...G()]}],"min-inline-size":[{"min-inline":["auto",...G()]}],"max-inline-size":[{"max-inline":["none",...G()]}],"block-size":[{block:["auto",...te()]}],"min-block-size":[{"min-block":["auto",...te()]}],"max-block-size":[{"max-block":["none",...te()]}],w:[{w:[u,"screen",...Q()]}],"min-w":[{"min-w":[u,"screen","none",...Q()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[s]},...Q()]}],h:[{h:["screen","lh",...Q()]}],"min-h":[{"min-h":["screen","lh","none",...Q()]}],"max-h":[{"max-h":["screen","lh",...Q()]}],"font-size":[{text:["base",r,Il,Ta]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,_B,gB]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Zm,ge]}],"font-family":[{font:[bB,vB,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":[Be,"none",ye,jk]}],leading:[{leading:[a,...$()]}],"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:F()}],"text-color":[{text:F()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Re(),"wavy"]}],"text-decoration-thickness":[{decoration:[Be,"from-font","auto",ye,Ta]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[Be,"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:$()}],"tab-size":[{tab:[$n,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:I()}],"bg-repeat":[{bg:U()}],"bg-size":[{bg:ee()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},$n,ye,ge],radial:["",ye,ge],conic:[$n,ye,ge]},xB,yB]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:se()}],"gradient-via-pos":[{via:se()}],"gradient-to-pos":[{to:se()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:ue()}],"rounded-s":[{"rounded-s":ue()}],"rounded-e":[{"rounded-e":ue()}],"rounded-t":[{"rounded-t":ue()}],"rounded-r":[{"rounded-r":ue()}],"rounded-b":[{"rounded-b":ue()}],"rounded-l":[{"rounded-l":ue()}],"rounded-ss":[{"rounded-ss":ue()}],"rounded-se":[{"rounded-se":ue()}],"rounded-ee":[{"rounded-ee":ue()}],"rounded-es":[{"rounded-es":ue()}],"rounded-tl":[{"rounded-tl":ue()}],"rounded-tr":[{"rounded-tr":ue()}],"rounded-br":[{"rounded-br":ue()}],"rounded-bl":[{"rounded-bl":ue()}],"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:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...Re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Be,ye,ge]}],"outline-w":[{outline:["",Be,Il,Ta]}],"outline-color":[{outline:F()}],shadow:[{shadow:["","none",p,kf,Sf]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",h,kf,Sf]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[Be,Ta]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":["none",g,kf,Sf]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[Be,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":[Be]}],"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":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"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":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"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":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"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":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"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":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"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":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"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":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"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":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"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":T()}],"mask-image-conic-pos":[{"mask-conic":[Be]}],"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":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:ee()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ye,ge]}],filter:[{filter:["","none",ye,ge]}],blur:[{blur:_e()}],brightness:[{brightness:[Be,ye,ge]}],contrast:[{contrast:[Be,ye,ge]}],"drop-shadow":[{"drop-shadow":["","none",v,kf,Sf]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:["",Be,ye,ge]}],"hue-rotate":[{"hue-rotate":[Be,ye,ge]}],invert:[{invert:["",Be,ye,ge]}],saturate:[{saturate:[Be,ye,ge]}],sepia:[{sepia:["",Be,ye,ge]}],"backdrop-filter":[{"backdrop-filter":["","none",ye,ge]}],"backdrop-blur":[{"backdrop-blur":_e()}],"backdrop-brightness":[{"backdrop-brightness":[Be,ye,ge]}],"backdrop-contrast":[{"backdrop-contrast":[Be,ye,ge]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Be,ye,ge]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Be,ye,ge]}],"backdrop-invert":[{"backdrop-invert":["",Be,ye,ge]}],"backdrop-opacity":[{"backdrop-opacity":[Be,ye,ge]}],"backdrop-saturate":[{"backdrop-saturate":[Be,ye,ge]}],"backdrop-sepia":[{"backdrop-sepia":["",Be,ye,ge]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":$()}],"border-spacing-x":[{"border-spacing-x":$()}],"border-spacing-y":[{"border-spacing-y":$()}],"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:[Be,"initial",ye,ge]}],ease:[{ease:["linear","initial",S,ye,ge]}],delay:[{delay:[Be,ye,ge]}],animate:[{animate:["none",O,ye,ge]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,ye,ge]}],"perspective-origin":[{"perspective-origin":E()}],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:He()}],"skew-x":[{"skew-x":He()}],"skew-y":[{"skew-y":He()}],transform:[{transform:[ye,ge,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ne()}],"translate-x":[{"translate-x":Ne()}],"translate-y":[{"translate-y":Ne()}],"translate-z":[{"translate-z":Ne()}],"translate-none":["translate-none"],zoom:[{zoom:[$n,ye,ge]}],accent:[{accent:F()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:F()}],"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":F()}],"scrollbar-track-color":[{"scrollbar-track":F()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mbs":[{"scroll-mbs":$()}],"scroll-mbe":[{"scroll-mbe":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pbs":[{"scroll-pbs":$()}],"scroll-pbe":[{"scroll-pbe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"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",...F()]}],"stroke-w":[{stroke:[Be,Il,Ta,jk]}],stroke:[{stroke:["none",...F()]}],"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"]}},OB=rB(kB);function Gl(...t){return OB(De(t))}function EB({status:t}){const e={connected:"bg-green-500",idle:"bg-green-500",disconnected:"bg-zinc-600",error:"bg-red-500",working:"bg-amber-400",reviewing:"bg-blue-400"}[t],r=t==="connected"||t==="working";return k.jsxs("span",{className:"relative inline-flex items-center justify-center w-2 h-2",children:[r&&k.jsx("span",{className:`absolute inline-flex h-full w-full rounded-full ${e} opacity-40 animate-ping`}),k.jsx("span",{className:`relative inline-flex rounded-full h-2 w-2 ${e}`})]})}function lr({children:t,variant:e="muted",className:r=""}){const n={default:"bg-[#E43A9C]/15 text-[#F041FF] border-[#E43A9C]/20",success:"bg-green-500/15 text-green-400 border-green-500/20",warning:"bg-amber-500/15 text-amber-400 border-amber-500/20",error:"bg-red-500/15 text-red-400 border-red-500/20",info:"bg-blue-500/15 text-blue-400 border-blue-500/20",muted:"bg-white/5 text-zinc-400 border-white/10"}[e];return k.jsx("span",{className:`inline-flex items-center px-2 py-px rounded-full text-[10px] font-mono border ${n} ${r}`,children:t})}function Ya({children:t,onClick:e,className:r="",type:n="button",disabled:i=!1}){return k.jsx("button",{type:n,onClick:e,disabled:i,className:`flex items-center gap-1.5 font-mono text-[11px] text-white rounded-lg active:opacity-80 primary-btn cursor-pointer disabled:opacity-50 ${r}`,children:t})}function Zo({children:t,onClick:e,className:r=""}){return k.jsx("button",{type:"button",onClick:e,className:`flex items-center gap-1.5 px-2.5 py-1 rounded-lg font-mono text-[11px] text-zinc-400 bg-[#252525] hover:bg-[#2e2e2e] hover:text-zinc-100 transition-colors cursor-pointer ${r}`,children:t})}function dR({children:t,onClick:e,className:r=""}){return k.jsx("button",{type:"button",onClick:e,className:`flex items-center gap-1.5 px-2.5 py-1 rounded-lg font-mono text-[11px] text-zinc-400 bg-[#252525] hover:bg-red-500/10 hover:text-red-400 transition-colors cursor-pointer ${r}`,children:t})}function Qf(t){return t==="connected"||t==="idle"?"success":t==="active"||t==="working"?"warning":t==="reviewing"?"info":t==="error"?"error":"muted"}function yh(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 AB(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 PB=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class Sx 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 TB extends Sx{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class Nk extends Sx{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class $k extends Sx{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var bb;(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"})(bb||(bb={}));class jB{constructor(e,{headers:r={},customFetch:n,region:i=bb.Any}={}){this.url=e,this.headers=r,this.region=i,this.fetch=PB(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return AB(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(E=>{throw new TB(E)}),O=S.headers.get("x-relay-error");if(O&&O==="true")throw new Nk(S);if(!S.ok)throw new $k(S);let A=((i=S.headers.get("Content-Type"))!==null&&i!==void 0?i:"text/plain").split(";")[0].trim(),T;return A==="application/json"?T=yield S.json():A==="application/octet-stream"||A==="application/pdf"?T=yield S.blob():A==="text/event-stream"?T=S:A==="multipart/form-data"?T=yield S.formData():T=yield S.text(),{data:T,error:null,response:S}}catch(u){return{data:null,error:u,response:u instanceof $k||u instanceof Nk?u.context:void 0}}finally{a&&clearTimeout(a)}})}}const hR=3,Ik=t=>Math.min(1e3*2**t,3e4),CB=[520,503],pR=["GET","HEAD","OPTIONS"];var RB=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 Mk(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 NB(t,e,r,n){return!(!n||r>=hR||!pR.includes(t)||!CB.includes(e))}var $B=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"||!pR.includes(r.method))throw h;if(r.retryEnabled&&s<hR){const g=Ik(s);s++,await Mk(g,r.signal);continue}throw h}if(NB(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:Ik(s);await p.text(),s++,await Mk(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 O=(g=h==null?void 0:h.message)!==null&&g!==void 0?g:"",A=(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+=`
|
|
362
|
-
|
|
363
|
-
Caused by: ${(x=h==null?void 0:h.name)!==null&&x!==void 0?x:"Error"}: ${O}`,A&&(c+=` (${A})`),h!=null&&h.stack&&(c+=`
|
|
364
|
-
${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 RB(r)}return{success:r===null,error:r,data:n,count:i,status:a,statusText:s}}returns(){return this}overrideTypes(){return this}},IB=class extends $B{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 Lk=new RegExp("[,()]");var Uo=class extends IB{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"&&Lk.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"&&Lk.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}},MB=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 Uo({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 Uo({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 Uo({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 Uo({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 Uo({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 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 LB(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 DB(t){var e=LB(t,"string");return fu(e)=="symbol"?e:e+""}function BB(t,e,r){return(e=DB(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 Of(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){BB(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 zB=class mR{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,Of(Of({},p),{},{signal:h.signal})).finally(()=>{clearTimeout(g),v.removeEventListener("abort",w)})}return c(f,Of(Of({},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 MB(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 mR(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 Uo({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 qB{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:
|
|
365
|
-
import ws from "ws"
|
|
366
|
-
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+=`
|
|
367
|
-
|
|
368
|
-
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 UB="2.106.2",FB=`realtime-js/${UB}`,HB="1.0.0",gR="2.0.0",WB=gR,VB=1e4,KB=100,Zi={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},vR={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},wb={connecting:"connecting",closing:"closing",closed:"closed"};class GB{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 nt;(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"})(nt||(nt={}));const Bk=(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]=XB(s,t,e,i),a),{}):{}},XB=(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)?yR(a,s):xb(s)},yR=(t,e)=>{if(t.charAt(0)==="_"){const r=t.slice(1,t.length);return ZB(e,r)}switch(t){case nt.bool:return YB(e);case nt.float4:case nt.float8:case nt.int2:case nt.int4:case nt.int8:case nt.numeric:case nt.oid:return JB(e);case nt.json:case nt.jsonb:return QB(e);case nt.timestamp:return ez(e);case nt.abstime:case nt.date:case nt.daterange:case nt.int4range:case nt.int8range:case nt.money:case nt.reltime:case nt.text:case nt.time:case nt.timestamptz:case nt.timetz:case nt.tsrange:case nt.tstzrange:return xb(e);default:return xb(e)}},xb=t=>t,YB=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},JB=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},QB=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},ZB=(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=>yR(e,u))}return t},ez=t=>typeof t=="string"?t.replace(" ","T"):t,bR=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 tu=t=>typeof t=="function"?t:function(){return t},tz=typeof self<"u"?self:null,Fo=typeof window<"u"?window:null,Ln=tz||Fo||globalThis,rz="2.0.0",nz=1e4,iz=1e3,Dn={connecting:0,open:1,closing:2,closed:3},_r={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},oi={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},_b={longpoll:"longpoll",websocket:"websocket"},az={complete:4},Sb="base64url.bearer.phx.",Ef=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})}},wR=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))}},oz=class{constructor(t,e,r){this.state=_r.closed,this.topic=t,this.params=tu(e||{}),this.socket=r,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Ef(this,oi.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new wR(()=>{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=_r.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",n=>{this.state=_r.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=_r.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=_r.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 Ef(this,oi.leave,tu({}),this.timeout).send(),this.state=_r.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(oi.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=_r.closed,this.bindings=[]}onClose(t){this.on(oi.close,t)}onError(t){return this.on(oi.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 Ef(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=_r.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(oi.close,"leave")},r=new Ef(this,oi.leave,tu({}),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=_r.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===_r.closed}isErrored(){return this.state===_r.errored}isJoined(){return this.state===_r.joined}isJoining(){return this.state===_r.joining}isLeaving(){return this.state===_r.leaving}},sd=class{static request(t,e,r,n,i,a,s){if(Ln.XDomainRequest){let u=new Ln.XDomainRequest;return this.xdomainRequest(u,t,e,n,i,a,s)}else if(Ln.XMLHttpRequest){let u=new Ln.XMLHttpRequest;return this.xhrRequest(u,t,e,r,n,i,a,s)}else{if(Ln.fetch&&Ln.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),Ln.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===az.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)}`}},sz=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)},Io=class{constructor(t,e){e&&e.length===2&&e[1].startsWith(Sb)&&(this.authToken=atob(e[1].slice(Sb.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=Dn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+_b.websocket),"$1/"+_b.longpoll)}endpointURL(){return sd.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,r){this.close(t,e,r),this.readyState=Dn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Dn.open||this.readyState===Dn.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=Dn.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=sz(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(`
|
|
369
|
-
`),()=>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=Dn.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=sd.request(t,this.endpointURL(),e,r,this.timeout,s,u=>{this.reqs.delete(a),this.isActive()&&i(u)}),this.reqs.add(a)}},lz=class Xl{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=Xl.syncState(this.state,i,a,s),this.pendingDiffs.forEach(c=>{this.state=Xl.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=Xl.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 Xl.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))}},Af={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:oi.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}}},uz=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||nz,this.transport=e.transport||Ln.WebSocket||Io,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null;let r=null;try{r=Ln&&Ln.sessionStorage}catch{}this.sessionStore=e.sessionStorage||r,this.establishedConnections=0,this.defaultEncoder=Af.encode.bind(Af),this.defaultDecoder=Af.decode.bind(Af),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!==Io?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;Fo&&Fo.addEventListener&&(Fo.addEventListener("pagehide",i=>{this.conn&&(this.disconnect(),n=this.connectClock)}),Fo.addEventListener("pageshow",i=>{n===this.connectClock&&(n=null,this.connect())}),Fo.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=tu(e.params||{}),this.endPoint=`${t}/${_b.websocket}`,this.vsn=e.vsn||rz,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new wR(()=>{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 Io}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=sd.appendParams(sd.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=tu(t)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Io?this.connectWithFallback(Io,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 Io:return"LongPoll";default:return t.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let t;this.authToken&&(t=["phoenix",`${Sb}${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(),iz,"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===Dn.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(oi.error,t)})}connectionState(){switch(this.conn&&this.conn.readyState){case Dn.connecting:return"connecting";case Dn.open:return"open";case Dn.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 oz(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 ru{constructor(e,r){const n=fz(r);this.presence=new lz(e.getChannel(),n),this.presence.onJoin((i,a,s)=>{const u=ru.onJoinPayload(i,a,s);e.getChannel().trigger("presence",u)}),this.presence.onLeave((i,a,s)=>{const u=ru.onLeavePayload(i,a,s);e.getChannel().trigger("presence",u)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return ru.transformState(this.presence.state)}static transformState(e){return e=cz(e),Object.getOwnPropertyNames(e).reduce((r,n)=>{const i=e[n];return r[n]=Zf(i),r},{})}static onJoinPayload(e,r,n){const i=zk(r),a=Zf(n);return{event:"join",key:e,currentPresences:i,newPresences:a}}static onLeavePayload(e,r,n){const i=zk(r),a=Zf(n);return{event:"leave",key:e,currentPresences:i,leftPresences:a}}}function Zf(t){return t.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))}function cz(t){return JSON.parse(JSON.stringify(t))}function fz(t){return(t==null?void 0:t.events)&&{events:t.events}}function zk(t){return t!=null&&t.metas?Zf(t):[]}var qk;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(qk||(qk={}));class dz{get state(){return this.presenceAdapter.state}constructor(e,r){this.channel=e,this.presenceAdapter=new ru(this.channel.channelAdapter,r)}}function hz(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 pz{constructor(e,r,n){const i=mz(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>KB){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===Zi.joined}isJoined(){return this.state===Zi.joined}isJoining(){return this.state===Zi.joining}isClosed(){return this.state===Zi.closed}isLeaving(){return this.state===Zi.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}function mz(t){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config)}}var Uk;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(Uk||(Uk={}));var Ko;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(Ko||(Ko={}));var si;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(si||(si={}));class nu{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 pz(this.socket.socketAdapter,e,this.params),this.presence=new dz(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=bR(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[Ko.PRESENCE]&&this.bindings[Ko.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(si.CHANNEL_ERROR,hz(v))}),this._onClose(()=>e==null?void 0:e(si.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(si.SUBSCRIBED);return}this._updatePostgresBindings(v,e)}).receive("error",v=>{this.state=Zi.errored;const w=Object.values(v).join(", ")||"error";e==null||e(si.CHANNEL_ERROR,new Error(w,{cause:v}))}).receive("timeout",()=>{e==null||e(si.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&&nu.isFilterValueEqual(v.schema,p)&&nu.isFilterValueEqual(v.table,h)&&nu.isFilterValueEqual(v.filter,g))s.push(Object.assign(Object.assign({},c),{id:v.id}));else{this.unsubscribe(),this.state=Zi.errored,r==null||r(si.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=s,this.state!=Zi.errored&&r&&r(si.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===Ko.PRESENCE||e===Ko.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}=vR;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=Bk(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(r.old=Bk(e.columns,e.old_record)),r}}class gz{constructor(e,r){this.socket=new uz(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()==wb.connecting}isDisconnecting(){return this.socket.connectionState()==wb.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const Fk={HEARTBEAT_INTERVAL:25e3},vz=[1e3,2e3,5e3,1e4],yz=1e4;function bz(){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 wz(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return bz()}const xz=`
|
|
370
|
-
addEventListener("message", (e) => {
|
|
371
|
-
if (e.data.event === "start") {
|
|
372
|
-
setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
|
|
373
|
-
}
|
|
374
|
-
});`;class _z{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 GB,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 gz(e,i),this.httpEndpoint=bR(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}
|
|
375
|
-
|
|
376
|
-
To use Realtime in Node.js, you need to provide a WebSocket implementation:
|
|
377
|
-
|
|
378
|
-
Option 1: Use Node.js 22+ which has native WebSocket support
|
|
379
|
-
Option 2: Install and provide the "ws" package:
|
|
380
|
-
|
|
381
|
-
npm install ws
|
|
382
|
-
|
|
383
|
-
import ws from "ws"
|
|
384
|
-
const client = new RealtimeClient(url, {
|
|
385
|
-
...options,
|
|
386
|
-
transport: ws
|
|
387
|
-
})`):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()||wb.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 nu(`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:FB};r&&i.updateJoinPayload(a),i.joinedOnce&&i.channelAdapter.isJoined()&&i.channelAdapter.push(vR.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([xz],{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:VB,w.heartbeatIntervalMs=(a=e==null?void 0:e.heartbeatIntervalMs)!==null&&a!==void 0?a:Fk.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:Fk.HEARTBEAT_INTERVAL),w.transport=(c=e==null?void 0:e.transport)!==null&&c!==void 0?c:qB.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:wz(),w.reconnectAfterMs=(p=e==null?void 0:e.reconnectAfterMs)!==null&&p!==void 0?p:(O=>vz[O-1]||yz);let x,y;const S=(h=e==null?void 0:e.vsn)!==null&&h!==void 0?h:WB;switch(S){case HB:x=(O,A)=>A(JSON.stringify(O)),y=(O,A)=>A(JSON.parse(O));break;case gR: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 du=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 Sz(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 kz(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 Oz(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:i,body:a,headers:s}){const u=Sz(t.baseUrl,n,i),c=await kz(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 du((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 Pf(t){return t.join("")}var Ez=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:Pf(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/${Pf(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Pf(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Pf(t.namespace)}`}),!0}catch(e){if(e instanceof du&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(r){if(r instanceof du&&r.status===409)return;throw r}}};function Mo(t){return t.join("")}var Az=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/${Mo(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/${Mo(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/${Mo(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/${Mo(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/${Mo(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/${Mo(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(r){if(r instanceof du&&r.status===404)return!1;throw r}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(r){if(r instanceof du&&r.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw r}}},Pz=class{constructor(t){var n;let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const r=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=Oz({baseUrl:r,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=(n=t.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new Ez(this.client,e),this.tableOps=new Az(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 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 Tz(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 jz(t){var e=Tz(t,"string");return hu(e)=="symbol"?e:e+""}function Cz(t,e,r){return(e=jz(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Hk(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 je(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Hk(Object(r),!0).forEach(function(n){Cz(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Hk(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var bh=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 wh(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var kb=class extends bh{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 je({},super.toJSON())}},xR=class extends bh{constructor(t,e,r="storage"){super(t,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};function ld(t,e,r){const n=je({},t),i=e.toLowerCase();for(const a of Object.keys(n))a.toLowerCase()===i&&delete n[a];return n[i]=r,n}function Rz(t){const e={};for(const[r,n]of Object.entries(t))e[r.toLowerCase()]=n;return e}const Nz=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),$z=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)},Ob=t=>{if(Array.isArray(t))return t.map(r=>Ob(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]=Ob(n)}),e},Iz=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t),Wk=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)},Mz=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 kb(Wk(s),a,u,n))}).catch(()=>{const s=a+"";e(new kb(i.statusText||`HTTP ${a} error`,a,s,n))})}else e(new xR(Wk(t),t,n))},Lz=(t,e,r,n)=>{const i={method:t,headers:(e==null?void 0:e.headers)||{}};if(t==="GET"||t==="HEAD"||!n)return je(je({},i),r);if($z(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=ld(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),je(je({},i),r)};async function Ml(t,e,r,n,i,a,s){return new Promise((u,c)=>{t(r,Lz(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=>Mz(f,c,n,s))})}function _R(t="storage"){return{get:async(e,r,n,i)=>Ml(e,"GET",r,n,i,void 0,t),post:async(e,r,n,i,a)=>Ml(e,"POST",r,i,a,n,t),put:async(e,r,n,i,a)=>Ml(e,"PUT",r,i,a,n,t),head:async(e,r,n,i)=>Ml(e,"HEAD",r,je(je({},n),{},{noResolveJson:!0}),i,void 0,t),remove:async(e,r,n,i,a)=>Ml(e,"DELETE",r,i,a,n,t)}}const Dz=_R("storage"),{get:pu,post:vn,put:Eb,head:Bz,remove:kx}=Dz,Ir=_R("vectors");var Ls=class{constructor(t,e={},r,n="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=Rz(e),this.fetch=Nz(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=ld(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(wh(r))return{data:null,error:r};throw r}}};let SR;SR=Symbol.toStringTag;var zz=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[SR]="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(wh(e))return{data:null,error:e};throw e}}};let kR;kR=Symbol.toStringTag;var qz=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[kR]="BlobDownloadBuilder",this.promise=null}asStream(){return new zz(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(wh(e))return{data:null,error:e};throw e}}};const Uz={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Vk={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var Fz=class extends Ls{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=je(je({},Vk),n);let u=je(je({},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=ld(u,g,v);const f=i._removeEmptyFolders(e),p=i._getFinalPath(f),h=await(t=="PUT"?Eb:vn)(i.fetch,`${i.url}/object/${p}`,a,je({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=je(je({},Vk),n);let p=je(je({},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=ld(p,g,v);return{path:a,fullPath:(await Eb(i.fetch,u.toString(),c,je({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=je({},r.headers);e!=null&&e.upsert&&(i["x-upsert"]="true");const a=await vn(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 bh("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 vn(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 vn(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 vn(n.fetch,`${n.url}/object/sign/${i}`,je({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 vn(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=>je(je({},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=()=>pu(this.fetch,`${this.url}/${n}/${s}${a?`?${a}`:""}`,{headers:this.headers,noResolveJson:!0},r);return new qz(u,this.shouldThrowOnError)}async info(t){var e=this;const r=e._getFinalPath(t);return e.handleOperation(async()=>Ob(await pu(e.fetch,`${e.url}/object/info/${r}`,{headers:e.headers})))}async exists(t){var e=this;const r=e._getFinalPath(t);try{return await Bz(e.fetch,`${e.url}/object/${r}`,{headers:e.headers}),{data:!0,error:null}}catch(i){if(e.shouldThrowOnError)throw i;if(wh(i)){var n;const a=i instanceof kb?i.status:i instanceof xR?(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 kx(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=je(je(je({},Uz),e),{},{prefix:t||""});return await vn(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=je({},t);return await vn(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 Hz="2.106.2",tc={"X-Client-Info":`storage-js/${Hz}`};var Wz=class extends Ls{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=je(je({},tc),e);super(a,s,r,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const r=e.listBucketOptionsToQueryString(t);return await pu(e.fetch,`${e.url}/bucket${r}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await pu(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var r=this;return r.handleOperation(async()=>await vn(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 Eb(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 vn(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await kx(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():""}},Vz=class extends Ls{constructor(t,e={},r){const n=t.replace(/\/$/,""),i=je(je({},tc),e);super(n,i,r,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await vn(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 pu(e.fetch,i,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await kx(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!Iz(t))throw new bh("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 Pz({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}}}}})}},Kz=class extends Ls{constructor(t,e={},r){const n=t.replace(/\/$/,""),i=je(je({},tc),{},{"Content-Type":"application/json"},e);super(n,i,r,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await Ir.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var r=this;return r.handleOperation(async()=>await Ir.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:r.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await Ir.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var r=this;return r.handleOperation(async()=>await Ir.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:r.headers})||{})}},Gz=class extends Ls{constructor(t,e={},r){const n=t.replace(/\/$/,""),i=je(je({},tc),{},{"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 Ir.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await Ir.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 Ir.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await Ir.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 Ir.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},Xz=class extends Ls{constructor(t,e={},r){const n=t.replace(/\/$/,""),i=je(je({},tc),{},{"Content-Type":"application/json"},e);super(n,i,r,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await Ir.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await Ir.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await Ir.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Ir.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},Yz=class extends Xz{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new Jz(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)}},Jz=class extends Kz{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,je(je({},t),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,r=this;return e().call(r,je(je({},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 Qz(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},Qz=class extends Gz{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,je(je({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(t){var e=()=>super.getVectors,r=this;return e().call(r,je(je({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,r=this;return e().call(r,je(je({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,r=this;return e().call(r,je(je({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,r=this;return e().call(r,je(je({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},Zz=class extends Wz{constructor(t,e={},r,n){super(t,e,r,n)}from(t){return new Fz(this.url,this.headers,t,this.fetch)}get vectors(){return new Yz(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new Vz(this.url+"/iceberg",this.headers,this.fetch)}};const OR="2.106.2",Ho=30*1e3,Ab=3,eg=Ab*Ho,e6="http://localhost:9999",t6="supabase.auth.token",r6={"X-Client-Info":`gotrue-js/${OR}`},Pb="X-Supabase-Api-Version",ER={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},n6=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,i6=600*1e3;class os 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 a6 extends os{constructor(e,r,n){super(e,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function o6(t){return he(t)&&t.name==="AuthApiError"}class _n extends os{constructor(e,r){super(e),this.name="AuthUnknownError",this.originalError=r}}class bi extends os{constructor(e,r,n,i){super(e,n,i),this.name=r,this.status=n}}class Wt extends bi{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Tf(t){return he(t)&&t.name==="AuthSessionMissingError"}class Lo extends bi{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class jf extends bi{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class Cf extends bi{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 s6(t){return he(t)&&t.name==="AuthImplicitGrantRedirectError"}class Kk extends bi{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 l6 extends bi{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 Tb extends bi{constructor(e,r){super(e,"AuthRetryableFetchError",r,void 0)}}function tg(t){return he(t)&&t.name==="AuthRetryableFetchError"}class Gk extends bi{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 jb extends bi{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const ud="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Xk=`
|
|
388
|
-
\r=`.split(""),u6=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<Xk.length;e+=1)t[Xk[e].charCodeAt(0)]=-2;for(let e=0;e<ud.length;e+=1)t[ud[e].charCodeAt(0)]=e;return t})();function Yk(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(ud[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(ud[n]),e.queuedBits-=6}}function AR(t,e,r){const n=u6[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 Jk(t){const e=[],r=s=>{e.push(String.fromCodePoint(s))},n={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},a=s=>{d6(s,n,r)};for(let s=0;s<t.length;s+=1)AR(t.charCodeAt(s),i,a);return e.join("")}function c6(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 f6(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}c6(n,e)}}function d6(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 es(t){const e=[],r={queue:0,queuedBits:0},n=i=>{e.push(i)};for(let i=0;i<t.length;i+=1)AR(t.charCodeAt(i),r,n);return new Uint8Array(e)}function h6(t){const e=[];return f6(t,r=>e.push(r)),new Uint8Array(e)}function za(t){const e=[],r={queue:0,queuedBits:0},n=i=>{e.push(i)};return t.forEach(i=>Yk(i,r,n)),Yk(null,r,n),e.join("")}function p6(t){return Math.round(Date.now()/1e3)+t}function m6(){return Symbol("auth-callback")}const Zt=()=>typeof window<"u"&&typeof document<"u",ja={tested:!1,writable:!1},PR=()=>{if(!Zt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(ja.tested)return ja.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),ja.tested=!0,ja.writable=!0}catch{ja.tested=!0,ja.writable=!1}return ja.writable};function g6(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 TR=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),v6=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",Wo=async(t,e,r)=>{await t.setItem(e,JSON.stringify(r))},Ca=async(t,e)=>{const r=await t.getItem(e);if(!r)return null;try{return JSON.parse(r)}catch{return null}},Qt=async(t,e)=>{await t.removeItem(e)};class xh{constructor(){this.promise=new xh.promiseConstructor((e,r)=>{this.resolve=e,this.reject=r})}}xh.promiseConstructor=Promise;function Rf(t){const e=t.split(".");if(e.length!==3)throw new jb("Invalid JWT structure");for(let n=0;n<e.length;n++)if(!n6.test(e[n]))throw new jb("JWT not in base64url format");return{header:JSON.parse(Jk(e[0])),payload:JSON.parse(Jk(e[1])),signature:es(e[2]),raw:{header:e[0],payload:e[1]}}}async function y6(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function b6(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 w6(t){return("0"+t.toString(16)).substr(-2)}function x6(){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,w6).join("")}async function _6(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 S6(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 _6(t);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Do(t,e,r=!1){const n=x6();let i=n;r&&(i+="/recovery"),await Wo(t,`${e}-code-verifier`,i);const a=await S6(n);return[a,n===a?"plain":"s256"]}const k6=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function O6(t){const e=t.headers.get(Pb);if(!e||!e.match(k6))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function E6(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 A6(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 P6=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function ni(t){if(!P6.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function gn(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 rg(){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 T6(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 Qk(t){return JSON.parse(JSON.stringify(t))}const Ia=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)},j6=[502,503,504,520,521,522,523,524,530];async function Zk(t){var e;if(!v6(t))throw new Tb(Ia(t),0);if(j6.includes(t.status))throw new Tb(Ia(t),t.status);let r;try{r=await t.json()}catch(a){throw new _n(Ia(a),a)}let n;const i=O6(t);if(i&&i.getTime()>=ER["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 Gk(Ia(r),t.status,((e=r.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(n==="session_not_found")throw new Wt}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 Gk(Ia(r),t.status,r.weak_password.reasons);throw new a6(Ia(r),t.status||500,n)}const C6=(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[Pb]||(a[Pb]=ER["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 R6(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 R6(t,e,r,n,i,a){const s=C6(e,n,i,a);let u;try{u=await t(r,Object.assign({},s))}catch(c){throw console.error(c),new Tb(Ia(c),0)}if(u.ok||await Zk(u),n!=null&&n.noResolveJson)return u;try{return await u.json()}catch(c){await Zk(c)}}function Zr(t){var e;let r=null;I6(t)&&(r=Object.assign({},t),t.expires_at||(r.expires_at=p6(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 eO(t){const e=Zr(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 ea(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function N6(t){return{data:t,error:null}}function $6(t){const{action_link:e,email_otp:r,hashed_token:n,redirect_to:i,verification_type:a}=t,s=yh(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 tO(t){return t}function I6(t){return!!t.access_token&&!!t.refresh_token&&!!t.expires_in}const ng=["global","local","others"];class M6{_encodePathSegment(e){if(e==="."||e==="..")throw new os("Invalid path segment");return encodeURIComponent(e)}constructor({url:e="",headers:r={},fetch:n,experimental:i}){this.url=e,this.headers=r,this.fetch=TR(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=ng[0]){if(ng.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${ng.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:ea})}catch(n){if(he(n))return{data:{user:null},error:n};throw n}}async generateLink(e){try{const{options:r}=e,n=yh(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:$6,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:ea})}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:tO});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){ni(e);try{return await xe(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:ea})}catch(r){if(he(r))return{data:{user:null},error:r};throw r}}async updateUserById(e,r){ni(e);try{return await xe(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:r,headers:this.headers,xform:ea})}catch(n){if(he(n))return{data:{user:null},error:n};throw n}}async deleteUser(e,r=!1){ni(e);try{return await xe(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:r},xform:ea})}catch(n){if(he(n))return{data:{user:null},error:n};throw n}}async _listFactors(e){ni(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){ni(e.userId),ni(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:tO});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){gn(this.experimental),ni(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){gn(this.experimental),ni(e.userId),ni(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 rO(t={}){return{getItem:e=>t[e]||null,setItem:(e,r)=>{t[e]=r},removeItem:e=>{delete t[e]}}}const In={debug:!!(globalThis&&PR()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class jR extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class nO extends jR{}async function L6(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 nO(`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 nO(`Lock "${t}" was released because another request stole it`)}throw a}}function D6(){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 CR(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function B6(t){return parseInt(t,16)}function z6(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,n=>n.toString(16).padStart(2,"0")).join("")}function q6(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(`
|
|
389
|
-
`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const v=CR(t.address),w=p?`${p}://${n}`:n,x=t.statement?`${t.statement}
|
|
390
|
-
`:"",y=`${w} wants you to sign in with your Ethereum account:
|
|
391
|
-
${v}
|
|
392
|
-
|
|
393
|
-
${x}`;let S=`URI: ${h}
|
|
394
|
-
Version: ${g}
|
|
395
|
-
Chain ID: ${r}${s?`
|
|
396
|
-
Nonce: ${s}`:""}
|
|
397
|
-
Issued At: ${a.toISOString()}`;if(i&&(S+=`
|
|
398
|
-
Expiration Time: ${i.toISOString()}`),u&&(S+=`
|
|
399
|
-
Not Before: ${u.toISOString()}`),c&&(S+=`
|
|
400
|
-
Request ID: ${c}`),f){let O=`
|
|
401
|
-
Resources:`;for(const A of f){if(!A||typeof A!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${A}`);O+=`
|
|
402
|
-
- ${A}`}S+=O}return`${y}
|
|
403
|
-
${S}`}class jt 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 cd extends jt{constructor(e,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:e}),this.name="WebAuthnUnknownError",this.originalError=r}}function U6({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 jt({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 jt({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 jt({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 jt({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 jt({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new jt({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 jt({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new jt({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(RR(s)){if(a.rp.id!==s)return new jt({message:`The RP ID "${a.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new jt({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 jt({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 jt({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 jt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function F6({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 jt({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new jt({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const n=window.location.hostname;if(RR(n)){if(r.rpId!==n)return new jt({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new jt({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new jt({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 jt({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class H6{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 Cb=new H6;function iO(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=yh(t,["challenge","user","excludeCredentials"]),a=es(e).buffer,s=Object.assign(Object.assign({},r),{id:es(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:es(f.id).buffer,type:f.type||"public-key",transports:f.transports})}}return u}function aO(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=yh(t,["challenge","allowCredentials"]),i=es(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:es(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function oO(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:za(new Uint8Array(t.response.attestationObject)),clientDataJSON:za(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function sO(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:za(new Uint8Array(i.authenticatorData)),clientDataJSON:za(new Uint8Array(i.clientDataJSON)),signature:za(new Uint8Array(i.signature)),userHandle:i.userHandle?za(new Uint8Array(i.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function RR(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function fd(){var t,e;return!!(Zt()&&"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 NR(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new cd("Browser returned unexpected credential type",e)}:{data:null,error:new cd("Empty credential response",e)}}catch(e){return{data:null,error:U6({error:e,options:t})}}}async function $R(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new cd("Browser returned unexpected credential type",e)}:{data:null,error:new cd("Empty credential response",e)}}catch(e){return{data:null,error:F6({error:e,options:t})}}}const W6={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},V6={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function dd(...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]=dd(u,s):n[a]=dd(s)}else n[a]=s}return n}function K6(t,e){return dd(W6,t,e||{})}function G6(t,e){return dd(V6,t,e||{})}class X6{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??Cb.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=K6(u.webauthn.credential_options.publicKey,a==null?void 0:a.create),{data:h,error:g}=await NR({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=G6(u.webauthn.credential_options.publicKey,a==null?void 0:a.request),{data:h,error:g}=await $R(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 _n("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 os("rpId is required for WebAuthn authentication")};try{if(!fd())return{data:null,error:new _n("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 _n("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 os("rpId is required for WebAuthn registration")};try{if(!fd())return{data:null,error:new _n("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 _n("Unexpected error in register",s)}}}}D6();const Y6={url:e6,storageKey:t6,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:r6,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}};async function lO(t,e,r){return await r()}const Bo={};class mu{get jwks(){var e,r;return(r=(e=Bo[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(e){Bo[this.storageKey]=Object.assign(Object.assign({},Bo[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,r;return(r=(e=Bo[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){Bo[this.storageKey]=Object.assign(Object.assign({},Bo[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({},Y6),e);if(this.storageKey=s.storageKey,this.instanceID=(r=mu.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,mu.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!s.debug,typeof s.debug=="function"&&(this.logger=s.debug),this.instanceID>0&&Zt()){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 M6({url:s.url,headers:s.headers,fetch:s.fetch,experimental:this.experimental}),this.url=s.url,this.headers=s.headers,this.fetch=TR(s.fetch),this.lock=s.lock||lO,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&&Zt()&&(!((i=globalThis==null?void 0:globalThis.navigator)===null||i===void 0)&&i.locks)?this.lock=L6:this.lock=lO,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 X6(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:PR()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=rO(this.memoryStorage)),s.userStorage&&(this.userStorage=s.userStorage)):(this.memoryStorage={},this.storage=rO(this.memoryStorage)),Zt()&&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} (${OR}) ${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(Zt()&&(r=g6(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),Zt()&&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),s6(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 _n("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:Zr}),{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 Do(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:Zr})}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:Zr})}else throw new jf("You must provide either an email or phone number and a password");const{data:s,error:u}=a;if(u||!s)return await Qt(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 Qt(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:eO})}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:eO})}else throw new jf("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 Lo;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:O}=e;let A;if(Zt())if(typeof y=="object")A=y;else{const D=window;if("ethereum"in D&&typeof D.ethereum=="object"&&"request"in D.ethereum&&typeof D.ethereum.request=="function")A=D.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"||!(O!=null&&O.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");A=y}const T=new URL((r=O==null?void 0:O.url)!==null&&r!==void 0?r:window.location.href),E=await A.request({method:"eth_requestAccounts"}).then(D=>D).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!E||E.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const P=CR(E[0]);let C=(n=O==null?void 0:O.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!C){const D=await A.request({method:"eth_chainId"});C=B6(D)}const $={domain:T.host,address:P,statement:S,uri:T.href,version:"1",chainId:C,nonce:(i=O==null?void 0:O.signInWithEthereum)===null||i===void 0?void 0:i.nonce,issuedAt:(s=(a=O==null?void 0:O.signInWithEthereum)===null||a===void 0?void 0:a.issuedAt)!==null&&s!==void 0?s:new Date,expirationTime:(u=O==null?void 0:O.signInWithEthereum)===null||u===void 0?void 0:u.expirationTime,notBefore:(c=O==null?void 0:O.signInWithEthereum)===null||c===void 0?void 0:c.notBefore,requestId:(f=O==null?void 0:O.signInWithEthereum)===null||f===void 0?void 0:f.requestId,resources:(p=O==null?void 0:O.signInWithEthereum)===null||p===void 0?void 0:p.resources};v=q6($),w=await A.request({method:"personal_sign",params:[z6(v),P]})}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:Zr});if(y)throw y;if(!x||!x.session||!x.user){const S=new Lo;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:O,options:A}=e;let T;if(Zt())if(typeof S=="object")T=S;else{const P=window;if("solana"in P&&typeof P.solana=="object"&&("signIn"in P.solana&&typeof P.solana.signIn=="function"||"signMessage"in P.solana&&typeof P.solana.signMessage=="function"))T=P.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"||!(A!=null&&A.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");T=S}const E=new URL((r=A==null?void 0:A.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in T&&T.signIn){const P=await T.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},A==null?void 0:A.signInWithSolana),{version:"1",domain:E.host,uri:E.href}),O?{statement:O}:null));let C;if(Array.isArray(P)&&P[0]&&typeof P[0]=="object")C=P[0];else if(P&&typeof P=="object"&&"signedMessage"in P&&"signature"in P)C=P;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 T)||typeof T.signMessage!="function"||!("publicKey"in T)||typeof T!="object"||!T.publicKey||!("toBase58"in T.publicKey)||typeof T.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");w=[`${E.host} wants you to sign in with your Solana account:`,T.publicKey.toBase58(),...O?["",O,""]:[""],"Version: 1",`URI: ${E.href}`,`Issued At: ${(i=(n=A==null?void 0:A.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&i!==void 0?i:new Date().toISOString()}`,...!((a=A==null?void 0:A.signInWithSolana)===null||a===void 0)&&a.notBefore?[`Not Before: ${A.signInWithSolana.notBefore}`]:[],...!((s=A==null?void 0:A.signInWithSolana)===null||s===void 0)&&s.expirationTime?[`Expiration Time: ${A.signInWithSolana.expirationTime}`]:[],...!((u=A==null?void 0:A.signInWithSolana)===null||u===void 0)&&u.chainId?[`Chain ID: ${A.signInWithSolana.chainId}`]:[],...!((c=A==null?void 0:A.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${A.signInWithSolana.nonce}`]:[],...!((f=A==null?void 0:A.signInWithSolana)===null||f===void 0)&&f.requestId?[`Request ID: ${A.signInWithSolana.requestId}`]:[],...!((h=(p=A==null?void 0:A.signInWithSolana)===null||p===void 0?void 0:p.resources)===null||h===void 0)&&h.length?["Resources",...A.signInWithSolana.resources.map(C=>`- ${C}`)]:[]].join(`
|
|
404
|
-
`);const P=await T.signMessage(new TextEncoder().encode(w),"utf8");if(!P||!(P instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");x=P}}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:za(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:Zr});if(S)throw S;if(!y||!y.session||!y.user){const O=new Lo;return this._returnResult({data:{user:null,session:null},error:O})}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 Ca(this.storage,`${this.storageKey}-code-verifier`),[n,i]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new l6;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:Zr});if(await Qt(this.storage,`${this.storageKey}-code-verifier`),s)throw s;if(!a||!a.session||!a.user){const u=new Lo;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 Qt(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:Zr}),{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 Lo;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 Do(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 jf("You must provide either an email or phone number.")}catch(u){if(await Qt(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:Zr});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 Do(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:N6});return!((a=f.data)===null||a===void 0)&&a.url&&Zt()&&!(!((s=e.options)===null||s===void 0)&&s.skipBrowserRedirect)&&window.location.assign(f.data.url),this._returnResult(f)}catch(u){if(await Qt(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 Wt;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 jf("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 Ca(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()<eg:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",e.expires_at),!n){if(this.userStorage){const s=await Ca(this.userStorage,this.storageKey+"-user");s!=null&&s.user?e.user=s.user:e.user=rg()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const s={value:this.suppressGetSessionWarning};e.user=T6(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:ea}):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 Wt}: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:ea})})}catch(r){if(he(r))return Tf(r)&&(await this._removeSession(),await Qt(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 Wt;const s=i.session;let u=null,c=null;this.flowType==="pkce"&&e.email!=null&&([u,c]=await Do(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:ea});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 Qt(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 Wt;const r=Date.now()/1e3;let n=r,i=!0,a=null;const{payload:s}=Rf(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 Wt;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(!Zt())throw new Cf("No browser detected.");if(e.error||e.error_description||e.error_code)throw new Cf(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 Kk("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Cf("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 Kk("No code detected.");const{data:A,error:T}=await this._exchangeCodeForSession(e.code);if(T)throw T;const E=new URL(window.location.href);return E.searchParams.delete("code"),window.history.replaceState(window.history.state,"",E.toString()),{data:{session:A.session,redirectType:(n=A.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 Cf("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<=Ho&&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 O={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:O,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 Ca(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&&!Tf(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&&!(o6(u)&&(u.status===404||u.status===401||u.status===403)||Tf(u)))return this._returnResult({error:u})}return e!=="others"&&(await this._removeSession(),await Qt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const r=m6(),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),Tf(a)?console.warn(a):console.error(a)}})}async resetPasswordForEmail(e,r={}){let n=null,i=null;this.flowType==="pkce"&&([n,i]=await Do(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 Qt(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 Zt()&&!(!((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:Zr}),{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 Lo}):(g.session&&(await this._saveSession(g.session),await this._notifyAllSubscribers("USER_UPDATED",g.session)),this._returnResult({data:g,error:v}))}catch(i){if(await Qt(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 b6(async i=>(i>0&&await y6(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:Zr})),(i,a)=>{const s=200*Math.pow(2,i);return a&&tg(a)&&Date.now()+s-n<Ho})}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),Zt()&&!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 Ca(this.storage,this.storageKey);if(i&&this.userStorage){let s=await Ca(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!s&&(s={user:i.user},await Wo(this.userStorage,this.storageKey+"-user",s)),i.user=(e=s==null?void 0:s.user)!==null&&e!==void 0?e:rg()}else if(i&&!i.user&&!i.user){const s=await Ca(this.storage,this.storageKey+"-user");s&&(s!=null&&s.user)?(i.user=s.user,await Qt(this.storage,this.storageKey+"-user"),await Wo(this.storage,this.storageKey,i)):i.user=rg()}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()<eg;if(this._debug(n,`session has${a?"":" not"} expired with margin of ${eg}s`),a){if(this.autoRefreshToken&&i.refresh_token){const{error:s}=await this._callRefreshToken(i.refresh_token);s&&(console.error(s),tg(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 Wt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const i=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(i,"begin");try{this.refreshingDeferred=new xh;const{data:a,error:s}=await this._refreshAccessToken(e);if(s)throw s;if(!a.session)throw new Wt;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 tg(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 Qt(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 Wo(this.userStorage,this.storageKey+"-user",{user:r.user});const i=Object.assign({},r);delete i.user;const a=Qk(i);await Wo(this.storage,this.storageKey,a)}else{const i=Qk(r);await Wo(this.storage,this.storageKey,i)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Qt(this.storage,this.storageKey),await Qt(this.storage,this.storageKey+"-code-verifier"),await Qt(this.storage,this.storageKey+"-user"),this.userStorage&&await Qt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Zt()&&(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(),Ho);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)/Ho);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${Ho}ms, refresh threshold is ${Ab} ticks`),i<=Ab&&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 jR)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Zt()||!(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 Do(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"?oO(e.webauthn.credential_response):sO(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:iO(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:aO(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}=Rf(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(T=>T.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(x="aal2");const A=v.amr||[];return{data:{currentLevel:w,nextLevel:x,currentAuthenticationMethods:A},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}=Rf(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 Wt})})}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 Wt});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&&Zt()&&!(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 Wt});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&&Zt()&&!(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 Wt})})}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 Wt})})}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+i6>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}}=Rf(n);r!=null&&r.allowExpired||E6(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=A6(i.alg),h=await crypto.subtle.importKey("jwk",f,p,!0,["verify"]);if(!await crypto.subtle.verify(p,h,s,h6(`${u}.${c}`)))throw new jb("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;gn(this.experimental);try{if(!fd())return this._returnResult({data:null,error:new _n("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=aO(a.options),c=(i=(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.signal)!==null&&i!==void 0?i:Cb.createNewAbortSignal(),{data:f,error:p}=await $R({publicKey:u,signal:c});if(p||!f)return this._returnResult({data:null,error:p??new _n("WebAuthn ceremony failed",null)});const h=sO(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;gn(this.experimental);try{if(!fd())return this._returnResult({data:null,error:new _n("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=iO(i.options),u=(n=(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.signal)!==null&&n!==void 0?n:Cb.createNewAbortSignal(),{data:c,error:f}=await NR({publicKey:s,signal:u});if(f||!c)return this._returnResult({data:null,error:f??new _n("WebAuthn ceremony failed",null)});const p=oO(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(){gn(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 Wt});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){gn(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 Wt});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;gn(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){gn(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:Zr});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(){gn(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 Wt});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){gn(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 Wt});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){gn(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 Wt});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}}}mu.nextInstanceID={};const J6=mu,Q6="2.106.2";let Yl="";typeof Deno<"u"?Yl="deno":typeof document<"u"?Yl="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Yl="react-native":Yl="node";const Z6={"X-Client-Info":`supabase-js-${Yl}/${Q6}`},eq={headers:Z6},tq={schema:"public"},rq={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},nq={},iq={enabled:!1,respectSamplingDecision:!0};function aq(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 ig=null;const oq="@opentelemetry/api";function sq(){return ig===null&&(ig=import(oq).catch(()=>null)),ig}function lq(){return aq(this,void 0,void 0,function*(){try{const t=yield sq();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 uq(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 cq(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(fq(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 fq(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 dq(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 gu(t){"@babel/helpers - typeof";return gu=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},gu(t)}function hq(t,e){if(gu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(gu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function pq(t){var e=hq(t,"string");return gu(e)=="symbol"?e:e+""}function mq(t,e,r){return(e=pq(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function uO(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 xt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?uO(Object(r),!0).forEach(function(n){mq(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):uO(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}const gq=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),vq=()=>Headers,yq=(t,e,r,n,i)=>{const a=gq(n),s=vq(),u=(i==null?void 0:i.enabled)===!0,c=(i==null?void 0:i.respectSamplingDecision)!==!1,f=u?dq(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 bq(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,xt(xt({},h),{},{headers:w}))}};async function bq(t,e,r){if(!cq(typeof t=="string"||t instanceof URL?t:t.url,e))return null;const n=await lq();if(!n||!n.traceparent)return null;if(r){const i=uq(n.traceparent);if(i&&!i.isSampled)return null}return n}function cO(t){return typeof t=="boolean"?{enabled:t}:t}function wq(t){return t.endsWith("/")?t:t+"/"}function xq(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=cO(t.tracePropagation),S=cO(e.tracePropagation),O={db:xt(xt({},g),c),auth:xt(xt({},v),f),realtime:xt(xt({},w),p),storage:{},global:xt(xt(xt({},x),h),{},{headers:xt(xt({},(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?O.accessToken=t.accessToken:delete O.accessToken,O}function _q(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(wq(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var Sq=class extends J6{constructor(t){super(t)}},kq=class{constructor(t,e,r){var n,i;this.supabaseUrl=t,this.supabaseKey=e;const a=_q(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:tq,realtime:nq,auth:xt(xt({},rq),{},{storageKey:s}),global:eq,tracePropagation:iq},c=xq(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=yq(e,t,this._getAccessToken.bind(this),c.global.fetch,c.tracePropagation),this.realtime=this._initRealtimeClient(xt({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 zB(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 Zz(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new jB(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 Sq({url:this.authUrl.href,headers:xt(xt({},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 _z(this.realtimeUrl.href,xt(xt({},t),{},{params:xt(xt({},{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 Oq=(t,e,r)=>new kq(t,e,r);function Eq(){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}Eq()&&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 IR=R.createContext({session:null,supabase:null,loading:!0,signIn:async()=>({error:"Not initialized"}),signOut:async()=>{}});function _h(){return R.useContext(IR)}function Aq({children:t}){const[e,r]=R.useState(null),[n,i]=R.useState(null),[a,s]=R.useState(!0),u=R.useRef(null);R.useEffect(()=>{x4(()=>{var p;return((p=u.current)==null?void 0:p.access_token)??null})},[]),R.useEffect(()=>{et.get("/config").then(({config:p})=>{if(p.supabase.projectUrl&&p.supabase.anonKey){const h=Oq(p.supabase.projectUrl,p.supabase.anonKey);r(h),h.auth.getSession().then(({data:v})=>{u.current=v.session,i(v.session),s(!1)});const{data:{subscription:g}}=h.auth.onAuthStateChange((v,w)=>{u.current=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(),u.current=null,i(null))}return k.jsx(IR.Provider,{value:{session:n,supabase:e,loading:a,signIn:c,signOut:f},children:t})}const Pq=[{to:"/squads",icon:zC,label:"Squads"},{to:"/skills",icon:eu,label:"Skills"},{to:"/schedules",icon:hb,label:"Schedules"},{to:"/wiki",icon:jC,label:"Wiki"},{to:"/usage",icon:B4,label:"Usage"}],Tq=[{to:"/",icon:E5,label:"Chat"},{to:"/feed",icon:$C,label:"Inbox"},{to:"/settings",icon:q5,label:"Settings"}];function fO({to:t,icon:e,label:r,collapsed:n}){return k.jsxs(ux,{to:t,end:t==="/",title:n?r:void 0,className:({isActive:i})=>Gl("w-full flex items-center gap-2.5 px-2 py-2 rounded-xl text-[11px] font-mono transition-colors cursor-pointer",n?"justify-center":"",i?"text-[#E43A9C]":"text-zinc-600 hover:text-zinc-300 hover:bg-white/[0.04]"),style:({isActive:i})=>i?{background:"rgba(228,58,156,0.1)"}:void 0,children:[k.jsx(e,{className:"w-3.5 h-3.5 flex-shrink-0"}),!n&&r]})}function jq(){const[t,e]=R.useState(!1),[r,n]=R.useState("..."),{supabase:i}=_h();return R.useEffect(()=>{let a=!0;return et.get("/version").then(({version:s})=>{a&&n(s)}).catch(()=>{a&&n("unknown")}),()=>{a=!1}},[]),k.jsxs("div",{className:"flex h-screen overflow-hidden bg-background relative",children:[k.jsxs("div",{className:Gl("flex-shrink-0 flex flex-col border-r border-white/[0.06] bg-[#181818] transition-all duration-200",t?"w-[52px]":"w-[210px]"),children:[k.jsx("div",{className:Gl("h-[52px] flex items-center border-b border-white/[0.06] flex-shrink-0",t?"justify-center px-3":"justify-between pl-4 pr-3"),children:t?k.jsx(ta,{height:26}):k.jsxs("div",{className:"flex items-center gap-2.5",children:[k.jsx(ta,{height:26}),k.jsx("span",{className:"text-2xl text-white tracking-wider leading-none",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"IO"})]})}),k.jsx("nav",{className:"flex-1 py-2 px-1.5 space-y-0.5 overflow-y-auto",children:Pq.map(a=>k.jsx(fO,{collapsed:t,...a},a.to))}),k.jsxs("div",{className:"flex-shrink-0 border-t border-white/[0.06]",children:[k.jsx("div",{className:"py-1.5 px-1.5 space-y-0.5",children:Tq.map(a=>k.jsx(fO,{collapsed:t,...a},a.to))}),k.jsxs("div",{className:"border-t border-white/[0.05] py-1.5 px-1.5 space-y-0.5",children:[k.jsxs("a",{href:"https://github.com/michaeljolley/io",target:"_blank",rel:"noreferrer",title:"GitHub",className:Gl("flex items-center gap-2.5 px-2 py-2 rounded-xl text-[11px] font-mono text-zinc-600 hover:text-zinc-300 hover:bg-white/[0.04] transition-colors cursor-pointer",t&&"justify-center"),children:[k.jsx(d5,{className:"w-3.5 h-3.5 flex-shrink-0"}),!t&&k.jsxs("span",{className:"text-zinc-700",children:["v",r]})]}),k.jsx("button",{type:"button",onClick:()=>e(!t),title:t?"Expand sidebar":"Collapse sidebar",className:Gl("w-full flex items-center gap-2.5 px-2 py-2 rounded-xl text-[11px] font-mono text-zinc-600 hover:text-zinc-300 hover:bg-white/[0.04] transition-colors cursor-pointer",t&&"justify-center"),children:t?k.jsx(RC,{className:"w-3.5 h-3.5 flex-shrink-0"}):k.jsx(CC,{className:"w-3.5 h-3.5 flex-shrink-0"})})]})]})]}),k.jsxs("div",{className:"flex flex-col flex-1 min-w-0 overflow-hidden",children:[k.jsxs("div",{className:"h-[52px] flex-shrink-0 flex items-center justify-between px-4 border-b border-white/[0.06] bg-[#181818]",children:[k.jsxs("div",{className:"flex items-center gap-2",children:[k.jsx(EB,{status:"connected"}),k.jsx("span",{className:"text-[11px] font-mono text-green-400",children:"connected"})]}),k.jsxs("div",{className:"flex items-center gap-1.5",children:[k.jsx(ux,{to:"/feed",className:"relative p-2 rounded-xl hover:bg-white/[0.05] text-zinc-600 hover:text-zinc-300 transition-colors",children:k.jsx(C4,{className:"w-3.5 h-3.5"})}),i&&k.jsx("button",{type:"button",onClick:()=>i.auth.signOut(),className:"p-2 rounded-xl hover:bg-white/[0.05] text-zinc-600 hover:text-zinc-300 transition-colors cursor-pointer",title:"Sign out",children:k.jsx(y5,{className:"w-3.5 h-3.5"})})]})]}),k.jsxs("main",{className:"flex-1 overflow-hidden flex flex-col min-h-0 relative",children:[k.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",style:{zIndex:0},children:[k.jsx("div",{className:"orb orb-pink"}),k.jsx("div",{className:"orb orb-gray"})]}),k.jsx(uD,{})]})]})]})}function ag(t){return new Date(t).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0,timeZone:"America/Chicago"})}function Cq(){const{session:t}=_h(),[e,r]=R.useState([]),[n,i]=R.useState(""),[a,s]=R.useState(""),[u,c]=R.useState(!1),[f,p]=R.useState(!1),[h,g]=R.useState(null),[v,w]=R.useState(null),x=R.useRef(null),y=R.useRef(null),S=R.useRef(null);R.useEffect(()=>{et.get("/conversations?limit=50").then(N=>r(N.messages.map(L=>({...L,timestamp:ag(L.timestamp)})))).catch(()=>{})},[]);const O=R.useCallback(N=>{p(!1),c(!0),s(N)},[]),A=R.useCallback(N=>{p(!1),c(!1),s(""),r(L=>[...L,{id:crypto.randomUUID(),role:"assistant",content:N,timestamp:ag(new Date)}])},[]),T=R.useCallback(N=>{},[]),E=R.useCallback(()=>{p(!1),c(!1),s("")},[]),{sendMessage:P}=AC({onDelta:O,onMessage:A,onEvent:T,onError:E});R.useLayoutEffect(()=>{const N=x.current;N&&(N.scrollTop=N.scrollHeight)},[e,a,f]);async function C(N,L){const z=new FormData;z.append("file",N),z.append("messageId",L);const K=cx();if(!(await fetch("/api/attachments",{method:"POST",body:z,headers:K?{Authorization:`Bearer ${K}`}:void 0})).ok)throw new Error("Failed to upload attachment")}async function $(){const N=n.trim();if(!N&&!h||u||f)return;const L=crypto.randomUUID(),z=h==null?void 0:h.name,K=[N,z?`Attachment: ${z}`:""].filter(Boolean).join(`
|
|
405
|
-
|
|
406
|
-
`);r(V=>[...V,{id:L,role:"user",content:N,timestamp:ag(new Date),attachmentName:z}]),i(""),g(null),p(!0),S.current&&(S.current.value=""),y.current&&(y.current.style.height="auto");try{h&&await C(h,L),P(K)}catch{p(!1)}}function D(N){N.key==="Enter"&&!N.shiftKey&&(N.preventDefault(),$())}function W(N){i(N.target.value),y.current&&(y.current.style.height="auto",y.current.style.height=`${Math.min(y.current.scrollHeight,160)}px`)}return k.jsxs("div",{className:"flex flex-col flex-1 min-h-0",children:[k.jsxs("div",{ref:x,className:"flex-1 overflow-y-auto px-5 py-5 space-y-5",children:[e.map(N=>{var L,z;return k.jsxs("div",{className:`flex gap-3 ${N.role==="user"?"flex-row-reverse":""}`,children:[k.jsx("div",{className:`flex-shrink-0 w-6 h-6 rounded-lg flex items-center justify-center text-[10px] font-mono mt-0.5 ${N.role==="user"?"border border-[#E43A9C]/30 text-[#E43A9C]":"bg-[#282828] border border-white/[0.07] text-zinc-500"}`,style:N.role==="user"?{background:"rgba(228,58,156,0.12)"}:void 0,children:N.role==="user"?((z=(L=t==null?void 0:t.user)==null?void 0:L.email)==null?void 0:z.charAt(0).toUpperCase())??"U":k.jsx(ta,{height:12})}),k.jsxs("div",{className:`flex flex-col gap-1.5 max-w-[72%] ${N.role==="user"?"items-end":"items-start"}`,children:[N.toolCall&&k.jsxs("button",{type:"button",onClick:()=>w(v===N.id?null:N.id),className:"w-full text-left border border-white/[0.07] bg-[#1e1e1e] rounded-xl px-3 py-2 flex items-center gap-2 hover:border-[#E43A9C]/25 transition-colors",children:[k.jsx(TC,{className:"w-3 h-3 text-[#E43A9C] flex-shrink-0"}),k.jsx("span",{className:"text-[11px] font-mono text-zinc-400 flex-1",children:N.toolCall.name}),k.jsx(lr,{variant:N.toolCall.status==="done"?"success":N.toolCall.status==="error"?"error":"warning",children:N.toolCall.status}),k.jsx(q4,{className:`w-3 h-3 text-zinc-600 transition-transform flex-shrink-0 ${v===N.id?"rotate-180":""}`})]}),N.toolCall&&v===N.id&&k.jsx("div",{className:"w-full bg-[#181818] border border-white/[0.06] rounded-xl px-3 py-2",children:k.jsx("p",{className:"text-[11px] font-mono text-zinc-500",children:N.toolCall.result})}),N.attachmentName&&k.jsx("div",{className:"rounded-xl border border-white/[0.08] bg-[#1e1e1e] px-3 py-2 text-[11px] font-mono text-zinc-400",children:N.attachmentName}),N.content&&k.jsx("div",{className:`rounded-2xl px-4 py-2.5 text-sm leading-relaxed ${N.role==="user"?"text-white rounded-tr-sm":"bg-[#222222] border border-white/[0.07] text-zinc-200 rounded-tl-sm"}`,style:N.role==="user"?{background:"linear-gradient(135deg, #D83333 0%, #C0285E 100%)"}:void 0,children:N.role==="user"?k.jsx("p",{className:"whitespace-pre-wrap",children:N.content}):k.jsx("div",{className:"prose-io",dangerouslySetInnerHTML:{__html:qe.parse(N.content)}})}),k.jsx("span",{className:"text-[11px] text-zinc-700 font-mono px-0.5",children:N.timestamp})]})]},N.id)}),f&&k.jsxs("div",{className:"flex gap-3",children:[k.jsx("div",{className:"flex-shrink-0 w-6 h-6 rounded-lg flex items-center justify-center bg-[#282828] border border-white/[0.07] mt-0.5",children:k.jsx(ta,{height:12})}),k.jsx("div",{className:"bg-[#222222] border border-white/[0.07] rounded-2xl rounded-tl-sm px-4 py-3 flex items-center gap-1.5",children:[0,120,240].map(N=>k.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-[#E43A9C] animate-bounce",style:{animationDelay:`${N}ms`}},N))})]}),u&&a&&k.jsxs("div",{className:"flex gap-3",children:[k.jsx("div",{className:"flex-shrink-0 w-6 h-6 rounded-lg flex items-center justify-center bg-[#282828] border border-white/[0.07] mt-0.5",children:k.jsx(ta,{height:12})}),k.jsx("div",{className:"bg-[#222222] border border-white/[0.07] rounded-2xl rounded-tl-sm px-4 py-2.5 max-w-[72%]",children:k.jsx("div",{className:"prose-io text-sm",dangerouslySetInnerHTML:{__html:qe.parse(a)}})})]}),u&&!a&&k.jsxs("div",{className:"flex gap-3",children:[k.jsx("div",{className:"flex-shrink-0 w-6 h-6 rounded-lg flex items-center justify-center bg-[#282828] border border-white/[0.07] mt-0.5",children:k.jsx(ta,{height:12})}),k.jsx("div",{className:"bg-[#222222] border border-white/[0.07] rounded-2xl rounded-tl-sm px-4 py-3 flex items-center gap-1.5",children:[0,120,240].map(N=>k.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-[#E43A9C] animate-bounce",style:{animationDelay:`${N}ms`}},N))})]})]}),k.jsxs("div",{className:"border-t border-white/[0.06] p-4 flex-shrink-0",children:[k.jsxs("div",{className:"bg-[#1e1e1e] border border-white/[0.08] rounded-2xl overflow-hidden transition-colors focus-within:border-[#E43A9C]/30",children:[k.jsx("input",{ref:S,type:"file",className:"hidden",onChange:N=>{var L;return g(((L=N.target.files)==null?void 0:L[0])??null)}}),h&&k.jsxs("div",{className:"px-4 pt-3 text-[11px] font-mono text-zinc-400",children:["Attached: ",h.name]}),k.jsx("textarea",{ref:y,value:n,onChange:W,onKeyDown:D,placeholder:"Message IO…",rows:1,className:"w-full bg-transparent px-4 pt-3 pb-1 text-sm text-zinc-200 placeholder:text-zinc-700 resize-none focus:outline-none",style:{minHeight:"42px",maxHeight:"160px",fontFamily:"Inter, sans-serif"}}),k.jsxs("div",{className:"flex items-center justify-between px-3 pb-2.5",children:[k.jsx("button",{type:"button",onClick:()=>{var N;return(N=S.current)==null?void 0:N.click()},className:"p-1.5 rounded-lg hover:bg-white/[0.05] text-zinc-700 hover:text-zinc-400 transition-colors",children:k.jsx(IC,{className:"w-4 h-4"})}),k.jsx("div",{className:"flex items-center gap-2",children:u?k.jsxs("button",{type:"button",onClick:()=>c(!1),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-zinc-800 hover:bg-zinc-700 text-[11px] font-mono text-zinc-300 transition-colors",children:[k.jsx(BC,{className:"w-3 h-3"})," Stop"]}):k.jsx("button",{type:"button",onClick:$,disabled:!n.trim()&&!h||f,className:"p-2 rounded-xl text-white disabled:opacity-30 disabled:cursor-not-allowed transition-opacity hover:opacity-90",style:{background:"linear-gradient(135deg, #D83333, #E43A9C)"},children:k.jsx(DC,{className:"w-3.5 h-3.5"})})})]})]}),k.jsx("p",{className:"text-center text-[11px] text-zinc-800 font-mono mt-2",children:"IO may make mistakes. Verify important outputs."})]})]})}function Rq(){const[t,e]=R.useState([]),[r,n]=R.useState(null),[i,a]=R.useState("all");R.useEffect(()=>{et.get("/inbox").then(f=>e(f.entries)).catch(()=>{})},[]);function s(f){n(f),f.status==="unread"&&et.post(`/inbox/${f.id}/read`).then(()=>{e(p=>p.map(h=>h.id===f.id?{...h,status:"read"}:h))}).catch(()=>{})}const u=t.filter(f=>i==="all"||f.status==="unread"),c=t.filter(f=>f.status==="unread").length;return k.jsxs("div",{className:"flex h-full",children:[k.jsxs("div",{className:"w-80 border-r border-white/[0.07] flex flex-col h-full bg-[#181818]",children:[k.jsxs("div",{className:"p-3 border-b border-white/[0.07]",children:[k.jsxs("div",{className:"flex items-center justify-between mb-2",children:[k.jsx("h2",{className:"text-lg tracking-wide text-zinc-100",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"Inbox"}),c>0&&k.jsx(lr,{variant:"default",children:c})]}),k.jsx("div",{className:"flex gap-1 p-1 rounded-xl bg-white/[0.03] border border-white/[0.07]",children:["all","unread"].map(f=>k.jsx("button",{type:"button",onClick:()=>a(f),className:`flex-1 px-2 py-1 rounded-lg text-[11px] font-mono transition-colors ${i===f?"bg-[#E43A9C]/15 text-[#E43A9C]":"text-zinc-600 hover:text-zinc-400"}`,children:f==="all"?"All":"Unread"},f))})]}),k.jsxs("div",{className:"flex-1 overflow-y-auto",children:[u.map(f=>k.jsxs("button",{onClick:()=>s(f),type:"button",className:`w-full text-left px-4 py-3 border-b border-white/[0.05] transition-colors ${(r==null?void 0:r.id)===f.id?"bg-white/[0.06]":"hover:bg-white/[0.03]"} ${f.status==="unread"?"border-l-2 border-l-[#E43A9C]":""}`,children:[k.jsxs("div",{className:"flex items-center gap-2",children:[f.status==="unread"?k.jsx(_5,{size:12,className:"text-[#E43A9C] flex-shrink-0"}):k.jsx(w5,{size:12,className:"text-zinc-700 flex-shrink-0"}),k.jsx("span",{className:"text-[10px] text-zinc-600 font-mono uppercase",children:f.kind})]}),k.jsx("p",{className:`text-sm mt-1 truncate ${f.status==="unread"?"text-zinc-200 font-medium":"text-zinc-400"}`,children:f.title}),k.jsx("p",{className:"text-[10px] text-zinc-700 font-mono mt-0.5",children:new Date(f.createdAt).toLocaleString()})]},f.id)),u.length===0&&k.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[k.jsx($C,{size:32,className:"text-zinc-800 mb-2"}),k.jsx("p",{className:"text-[11px] font-mono text-zinc-700",children:i==="unread"?"All caught up":"No items yet"})]})]})]}),k.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:r?k.jsxs("div",{children:[k.jsx("h2",{className:"text-lg text-zinc-100 font-medium mb-1",children:r.title}),k.jsxs("p",{className:"text-[11px] text-zinc-600 font-mono mb-5",children:[r.kind," · ",new Date(r.createdAt).toLocaleString()]}),k.jsx("div",{className:"prose-io",dangerouslySetInnerHTML:{__html:qe.parse(r.content)}})]}):k.jsx("div",{className:"h-full flex items-center justify-center",children:k.jsx("p",{className:"text-[11px] font-mono text-zinc-700",children:"Select an item to view details"})})})]})}function Nq(){const{signIn:t}=_h(),[e,r]=R.useState(""),[n,i]=R.useState(""),[a,s]=R.useState(null),[u,c]=R.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 k.jsxs("div",{className:"min-h-screen bg-[#161616] flex items-center justify-center relative overflow-hidden",children:[k.jsx("div",{className:"absolute inset-0 opacity-[0.04]",style:{backgroundImage:"radial-gradient(circle, #E43A9C 1px, transparent 1px)",backgroundSize:"32px 32px"}}),k.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-[60%] w-[400px] h-[300px] rounded-full blur-3xl pointer-events-none",style:{background:"radial-gradient(ellipse, rgba(228,58,156,0.12) 0%, transparent 70%)"}}),k.jsxs("div",{className:"relative z-10 w-full max-w-[360px] mx-4",children:[k.jsxs("div",{className:"flex flex-col items-center mb-8 gap-3",children:[k.jsx(ta,{height:52}),k.jsx("div",{className:"text-center",children:k.jsx("p",{className:"text-[11px] font-mono text-zinc-600 tracking-widest uppercase mt-1",children:"personal ai orchestrator"})})]}),k.jsxs("form",{onSubmit:f,className:"glass-card border border-white/[0.07] rounded-2xl p-6 space-y-4",children:[k.jsxs("div",{className:"space-y-1",children:[k.jsx("label",{className:"text-[11px] font-mono text-zinc-500 block",children:"Email"}),k.jsx("input",{type:"email",value:e,onChange:p=>r(p.target.value),required:!0,className:"w-full bg-[#161616] border border-white/[0.08] rounded-xl px-3 py-2.5 text-sm text-zinc-200 font-mono placeholder:text-zinc-700 focus:outline-none focus:border-[#E43A9C]/40 focus:ring-1 focus:ring-[#E43A9C]/15 transition-colors"})]}),k.jsxs("div",{className:"space-y-1",children:[k.jsx("label",{className:"text-[11px] font-mono text-zinc-500 block",children:"Password"}),k.jsx("input",{type:"password",value:n,onChange:p=>i(p.target.value),required:!0,placeholder:"••••••••",className:"w-full bg-[#161616] border border-white/[0.08] rounded-xl px-3 py-2.5 text-sm text-zinc-200 font-mono placeholder:text-zinc-700 focus:outline-none focus:border-[#E43A9C]/40 focus:ring-1 focus:ring-[#E43A9C]/15 transition-colors"})]}),a&&k.jsx("p",{className:"text-[11px] font-mono text-red-400",children:a}),k.jsx("button",{type:"submit",disabled:u,className:"w-full text-white font-mono text-sm rounded-xl py-3 mt-1 transition-opacity hover:opacity-90 disabled:opacity-50 flex items-center justify-center gap-2",style:{background:"linear-gradient(135deg, #D83333 0%, #E43A9C 55%, #F041FF 100%)"},children:u?k.jsxs(k.Fragment,{children:[k.jsx("span",{className:"w-3.5 h-3.5 border-2 border-white/30 border-t-white rounded-full animate-spin"}),"Authenticating…"]}):"Sign In"})]}),k.jsx("p",{className:"text-center text-[11px] text-zinc-700 font-mono mt-4",children:"Secured by Supabase Auth"})]})]})}function $q(){const[t,e]=R.useState([]),[r,n]=R.useState("all"),[i,a]=R.useState(!1),[s,u]=R.useState({name:"",cron:"",prompt:"",targetType:"orchestrator"});R.useEffect(()=>{c()},[]);function c(){et.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 et.post("/schedules",s),bt.success(`Schedule "${s.name}" created`),a(!1),u({name:"",cron:"",prompt:"",targetType:"orchestrator"}),c()}catch(v){bt.error(v instanceof Error?v.message:"Failed to create")}}async function h(v,w){try{await et.patch(`/schedules/${v}`,{enabled:!w}),c()}catch{bt.error("Failed to toggle schedule")}}async function g(v){try{await et.delete(`/schedules/${v}`),bt.success("Schedule deleted"),c()}catch{bt.error("Failed to delete")}}return k.jsxs("div",{className:"flex-1 overflow-y-auto p-6",children:[k.jsxs("div",{className:"flex items-center justify-between mb-6",children:[k.jsxs("div",{children:[k.jsx("h2",{className:"text-2xl tracking-wide text-zinc-100",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"Schedules"}),k.jsxs("p",{className:"text-[11px] text-zinc-600 font-mono mt-0.5",children:[t.length," automated tasks · ",t.filter(v=>v.enabled).length," ","active"]})]}),k.jsxs(Ya,{onClick:()=>a(!0),className:"px-3 py-1.5",children:[k.jsx(MC,{className:"w-3.5 h-3.5"})," New Schedule"]})]}),k.jsx("div",{className:"flex gap-1 mb-5 p-1 rounded-xl bg-white/[0.03] border border-white/[0.07] w-fit",children:["all","orchestrator","squad"].map(v=>k.jsx("button",{type:"button",onClick:()=>n(v),className:`px-3 py-1.5 rounded-lg text-[11px] font-mono transition-colors ${r===v?"bg-white/10 text-zinc-200":"text-zinc-600 hover:text-zinc-400"}`,children:v==="all"?"All":v==="orchestrator"?"IO":"Squad"},v))}),i&&k.jsxs("div",{className:"glass-card border border-white/[0.07] rounded-2xl p-5 mb-5",children:[k.jsx("h3",{className:"text-base tracking-wide text-zinc-200 mb-3",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"New Schedule"}),k.jsxs("div",{className:"space-y-3",children:[k.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-xl bg-white/[0.04] border border-white/[0.07] text-sm font-mono text-zinc-300 outline-none focus:border-[#E43A9C]/50"}),k.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-xl bg-white/[0.04] border border-white/[0.07] text-sm font-mono text-zinc-300 outline-none focus:border-[#E43A9C]/50"}),k.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-xl bg-white/[0.04] border border-white/[0.07] text-sm font-mono text-zinc-300 outline-none focus:border-[#E43A9C]/50 resize-none"}),k.jsxs("div",{className:"flex gap-2",children:[k.jsx(Ya,{onClick:p,className:"px-3 py-1.5",children:"Create"}),k.jsx(Zo,{onClick:()=>a(!1),className:"px-3 py-1.5",children:"Cancel"})]})]})]}),k.jsx("div",{className:"space-y-2",children:f.map(v=>k.jsxs("div",{className:"glass-card border border-white/[0.07] rounded-2xl p-4 flex items-center gap-4 group",children:[k.jsx("div",{className:`w-8 h-8 rounded-xl flex items-center justify-center flex-shrink-0 ${v.enabled?"bg-[#E43A9C]/10":"bg-white/[0.04]"}`,children:k.jsx(hb,{size:14,className:v.enabled?"text-[#E43A9C]":"text-zinc-600"})}),k.jsxs("div",{className:"flex-1 min-w-0",children:[k.jsxs("div",{className:"flex items-center gap-2",children:[k.jsx("span",{className:"text-sm font-mono text-zinc-200",children:v.name}),k.jsx(lr,{variant:v.targetType==="orchestrator"?"info":"default",children:v.targetType==="orchestrator"?"IO":"Squad"}),!v.enabled&&k.jsx(lr,{variant:"warning",children:"Paused"})]}),k.jsx("p",{className:"text-[11px] text-zinc-600 font-mono mt-0.5",children:v.cron}),k.jsx("p",{className:"text-[11px] text-zinc-700 mt-0.5 truncate max-w-md",children:v.prompt}),v.nextRun&&k.jsxs("p",{className:"text-[10px] text-zinc-700 font-mono mt-1 flex items-center gap-1",children:[k.jsx(W4,{size:10})," Next: ",new Date(v.nextRun).toLocaleString()]})]}),k.jsxs("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[k.jsx("button",{type:"button",onClick:()=>h(v.id,v.enabled),className:`p-1.5 rounded-lg transition-colors ${v.enabled?"text-emerald-400 hover:bg-emerald-400/10":"text-zinc-600 hover:bg-white/[0.04]"}`,title:v.enabled?"Pause":"Resume",children:v.enabled?k.jsx(T5,{size:13}):k.jsx(R5,{size:13})}),k.jsx("button",{type:"button",onClick:()=>g(v.id),className:"p-1.5 rounded-lg text-zinc-600 hover:text-red-400 hover:bg-red-400/10 transition-colors",children:k.jsx(fx,{size:13})})]})]},v.id))}),f.length===0&&k.jsxs("div",{className:"text-center py-12",children:[k.jsx(hb,{size:48,className:"mx-auto mb-3 text-zinc-800"}),k.jsx("p",{className:"text-[11px] font-mono text-zinc-700",children:"No schedules. Click New Schedule to create one."})]})]})}const Iq=[{id:"general",label:"General"},{id:"telegram",label:"Telegram"},{id:"auth",label:"Auth"}],ai="w-full max-w-[320px] rounded-xl border border-white/[0.07] bg-white/[0.04] px-3 py-2 text-sm font-mono text-zinc-300 outline-none focus:border-[#E43A9C]/50";function Mq(){const[t,e]=R.useState(null),[r,n]=R.useState("general");R.useEffect(()=>{et.get("/config").then(s=>e(s.config)).catch(()=>{})},[]);function i(s){t&&e({...t,...s})}async function a(){if(t)try{const{dataDir:s,...u}=t;await et.patch("/config",u),bt.success("Settings saved")}catch{bt.error("Failed to save settings")}}return t?k.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:k.jsxs("div",{className:"max-w-3xl",children:[k.jsx("h2",{className:"mb-6 text-2xl tracking-wide text-zinc-100",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"Settings"}),k.jsx("div",{className:"mb-6 flex gap-6 border-b border-white/[0.07]",children:Iq.map(s=>k.jsx("button",{type:"button",onClick:()=>n(s.id),className:`-mb-px border-b-2 px-1 pb-3 text-[11px] font-mono transition-colors ${r===s.id?"border-[#E43A9C] text-[#E43A9C]":"border-transparent text-zinc-500 hover:text-zinc-300"}`,children:s.label},s.id))}),k.jsxs("div",{className:"glass-card rounded-2xl border border-white/[0.07] p-5",children:[r==="general"&&k.jsxs(k.Fragment,{children:[k.jsx(pn,{label:"Log Level",children:k.jsx("select",{value:t.logLevel,onChange:s=>i({logLevel:s.target.value}),className:ai,children:["trace","debug","info","warn","error","fatal"].map(s=>k.jsx("option",{value:s,children:s},s))})}),k.jsx(pn,{label:"Default Model",children:k.jsx("input",{type:"text",value:t.defaultModel,onChange:s=>i({defaultModel:s.target.value}),className:ai})}),k.jsx(pn,{label:"Max Instances",children:k.jsx("input",{type:"number",value:t.maxInstancesPerSquad,onChange:s=>i({maxInstancesPerSquad:Number(s.target.value)}),className:ai,min:1,max:10})}),k.jsx(pn,{label:"API Port",children:k.jsx("input",{type:"number",value:t.apiPort,onChange:s=>i({apiPort:Number(s.target.value)}),className:ai})}),k.jsx(pn,{label:"Pricing Refresh",children:k.jsx("input",{type:"number",value:t.pricing.refreshIntervalHours,onChange:s=>i({pricing:{refreshIntervalHours:Number(s.target.value)}}),className:ai,min:1})}),k.jsx(pn,{label:"Data Dir",children:k.jsx("input",{type:"text",value:t.dataDir,readOnly:!0,className:`${ai} cursor-default text-zinc-500`})})]}),r==="telegram"&&k.jsxs(k.Fragment,{children:[k.jsx(pn,{label:"Bot Token",children:k.jsx(og,{value:t.telegram.botToken??"",onChange:s=>i({telegram:{...t.telegram,botToken:s||null}})})}),k.jsx(pn,{label:"Allowed Chat IDs",children:k.jsx("input",{type:"text",value:t.telegram.allowedChatIds.join(", "),onChange:s=>i({telegram:{...t.telegram,allowedChatIds:s.target.value.split(",").map(u=>Number(u.trim())).filter(u=>!Number.isNaN(u))}}),className:ai})})]}),r==="auth"&&k.jsxs(k.Fragment,{children:[k.jsx(pn,{label:"Project URL",children:k.jsx("input",{type:"text",value:t.supabase.projectUrl??"",onChange:s=>i({supabase:{...t.supabase,projectUrl:s.target.value||null}}),className:ai})}),k.jsx(pn,{label:"Anon Key",children:k.jsx(og,{value:t.supabase.anonKey??"",onChange:s=>i({supabase:{...t.supabase,anonKey:s||null}})})}),k.jsx(pn,{label:"JWT Secret",children:k.jsx(og,{value:t.supabase.jwtSecret??"",onChange:s=>i({supabase:{...t.supabase,jwtSecret:s||null}})})})]}),k.jsx("div",{className:"flex justify-end pt-6",children:k.jsx(Ya,{onClick:a,className:"px-4 py-2.5",children:"Save Settings"})})]})]})}):k.jsx("div",{className:"flex h-full items-center justify-center text-zinc-600",children:"Loading..."})}function pn({label:t,children:e}){return k.jsxs("div",{className:"flex items-center justify-between gap-6 border-b border-white/[0.07] py-3",children:[k.jsx("label",{className:"text-[11px] font-mono text-zinc-400",children:t}),k.jsx("div",{className:"w-full max-w-[320px] shrink-0",children:e})]})}function og({value:t,onChange:e}){const[r,n]=R.useState(!1);return k.jsxs("div",{className:"relative",children:[k.jsx("input",{type:r?"text":"password",value:t,onChange:i=>e(i.target.value),className:`${ai} pr-9`}),k.jsx("button",{type:"button",onClick:()=>n(i=>!i),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-zinc-600 transition-colors hover:text-zinc-400","aria-label":r?"Hide value":"Show value",children:r?k.jsx(r5,{size:14}):k.jsx(i5,{size:14})})]})}const Lq="linear-gradient(135deg, #D83333 0%, #E43A9C 50%, #F041FF 100%)";qe.use({renderer:{heading({tokens:t,depth:e}){const r=t.map(a=>a.raw).join(""),n=`h${e}`;return`<${n} style="background:${Lq};-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;font-size:${{1:"1.35em",2:"1.15em",3:"1em",4:"0.9em"}[e]??"1em"};font-weight:600;margin:1.1em 0 0.4em;">${r}</${n}>`}}});function Dq({content:t,className:e=""}){const r=R.useMemo(()=>qe.parse(t),[t]);return k.jsx("div",{className:`prose-io ${e}`,style:{color:"#d4d4d8",fontSize:"0.875rem",lineHeight:"1.7"},dangerouslySetInnerHTML:{__html:r}})}const Bq=[{id:"installed",label:"Installed"},{id:"awesome-copilot",label:"Awesome Copilot"},{id:"skillssh",label:"skills.sh"}];function sg(t){return t==="awesome-copilot"?"Awesome Copilot":"skills.sh"}function dO(t){return t?t>=1e6?`${(t/1e6).toFixed(1).replace(/\.0$/,"")}M installs`:t>=1e3?`${(t/1e3).toFixed(1).replace(/\.0$/,"")}K installs`:`${t} installs`:null}function zq(){const[t,e]=R.useState("installed"),[r,n]=R.useState([]),[i,a]=R.useState([]),[s,u]=R.useState(null),[c,f]=R.useState(null),[p,h]=R.useState(""),[g,v]=R.useState(!1),[w,x]=R.useState(!1),[y,S]=R.useState(!1),[O,A]=R.useState(""),[T,E]=R.useState(null),[P,C]=R.useState(null),$=R.useCallback(async()=>{try{const I=await et.get("/skills"),U=new Set(I.skills.map(ee=>ee.name.toLowerCase()));n(I.skills),a(ee=>ee.map(se=>({...se,installed:U.has(se.name.toLowerCase())})))}catch(I){bt.error(I instanceof Error?I.message:"Failed to load skills")}},[]),D=R.useCallback(async I=>{x(!0);try{const U=await et.get(`/skills/${encodeURIComponent(I)}`);f(U),A(U.content)}catch(U){bt.error(U instanceof Error?U.message:"Failed to load skill"),f(null)}finally{x(!1)}},[]);R.useEffect(()=>{$()},[$]),R.useEffect(()=>{if(t==="installed"){C(null);return}const I=p.trim();if(t==="skillssh"&&!I){a([]),C(null),v(!1);return}let U=!1;v(!0);const ee=window.setTimeout(async()=>{try{const se=await et.get(`/skills/discover?source=${t}&q=${encodeURIComponent(I)}`);if(U)return;a(se.skills),C(null)}catch(se){if(U)return;a([]),C(se instanceof Error?se.message:"Discovery failed")}finally{U||v(!1)}},250);return()=>{U=!0,window.clearTimeout(ee)}},[p,t]);const W=R.useMemo(()=>{const I=p.trim().toLowerCase();return I?r.filter(U=>[U.name,U.description,U.preview].some(ee=>ee.toLowerCase().includes(I))):r},[r,p]),N=t==="installed"?W:i,L=W.find(I=>I.name===s)??null,z=i.find(I=>I.name===s)??null;R.useEffect(()=>{if(S(!1),!N.length){u(null),t!=="installed"&&f(null);return}if(!s||!N.some(I=>I.name===s)){const I=N[0];I&&u(I.name)}},[s,t,N]),R.useEffect(()=>{if(t!=="installed"||!s){f(null);return}D(s)},[D,s,t]);async function K(I){if(!I.url&&!I.registrySource){bt.error("Install source is not available for this skill yet");return}E(I.name);try{await et.post("/skills/install",{name:I.name,source:I.source,url:I.url,registrySource:I.registrySource,skillId:I.skillId}),bt.success(`Installed ${I.title||I.name}`),await $(),a(U=>U.map(ee=>ee.name===I.name?{...ee,installed:!0}:ee))}catch(U){bt.error(U instanceof Error?U.message:"Install failed")}finally{E(null)}}async function V(I){E(I);try{await et.delete(`/skills/${encodeURIComponent(I)}`),bt.success(`Removed ${I}`),await $(),a(U=>U.map(ee=>ee.name===I?{...ee,installed:!1}:ee))}catch(U){bt.error(U instanceof Error?U.message:"Failed to remove skill")}finally{E(null)}}async function X(){if(c){E(c.name);try{await et.put(`/skills/${encodeURIComponent(c.name)}`,{content:O}),bt.success(`Updated ${c.name}`),S(!1),await Promise.all([$(),D(c.name)])}catch(I){bt.error(I instanceof Error?I.message:"Failed to save skill")}finally{E(null)}}}const Q=t==="installed"?`${W.length} of ${r.length} installed`:`${i.length} results`,G=!!(L!=null&&L.activatedForOrchestrator),te=T===(c==null?void 0:c.name),F=T===(z==null?void 0:z.name);return k.jsx("div",{className:"flex-1 min-h-0 overflow-hidden p-6",children:k.jsxs("div",{className:"flex h-full gap-4",children:[k.jsxs("div",{className:"glass-card flex h-full w-80 shrink-0 flex-col rounded-2xl border border-white/[0.08] p-4",children:[k.jsxs("div",{className:"mb-4",children:[k.jsx("h2",{className:"text-[30px] uppercase tracking-[0.08em] text-zinc-100",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"Skills"}),k.jsx("p",{className:"mt-1 font-mono text-[11px] text-zinc-500",children:Q})]}),k.jsxs("div",{className:"relative mb-3",children:[k.jsx(LC,{className:"pointer-events-none absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-zinc-600"}),k.jsx("input",{type:"text",value:p,onChange:I=>h(I.target.value),placeholder:t==="installed"?"Search installed skills":`Search ${sg(t)} registry`,className:"w-full rounded-2xl border border-white/[0.08] bg-white/[0.04] py-2.5 pl-9 pr-3 text-[11px] font-mono text-zinc-200 outline-none transition-colors placeholder:text-zinc-600 focus:border-[#E43A9C]/50"})]}),k.jsx("div",{className:"mb-4 flex rounded-2xl bg-white/[0.03] p-1",children:Bq.map(I=>k.jsx("button",{type:"button",onClick:()=>e(I.id),className:`flex-1 rounded-xl px-2 py-2 text-[11px] font-mono transition-colors ${t===I.id?"bg-[#E43A9C]/15 text-[#E43A9C]":"text-zinc-500 hover:text-zinc-200"}`,children:I.label},I.id))}),k.jsxs("div",{className:"min-h-0 flex-1 space-y-2 overflow-y-auto pr-1",children:[g&&t!=="installed"?k.jsxs("div",{className:"flex items-center gap-2 rounded-2xl border border-white/[0.08] bg-white/[0.03] px-3 py-3 font-mono text-[11px] text-zinc-500",children:[k.jsx(Nl,{className:"h-3.5 w-3.5 animate-spin"})," Searching registry..."]}):null,N.map(I=>{const U=s===I.name,ee=I.description||("preview"in I?I.preview:"No description available.");return k.jsx("button",{type:"button",onClick:()=>{S(!1),u(I.name)},className:`w-full rounded-2xl border p-3 text-left transition-all ${U?"border-[#E43A9C]/40 bg-[#E43A9C]/10 shadow-[0_0_0_1px_rgba(228,58,156,0.15)]":"border-white/[0.06] bg-white/[0.02] hover:border-white/[0.12] hover:bg-white/[0.04]"}`,children:k.jsxs("div",{className:"flex items-start justify-between gap-3",children:[k.jsxs("div",{className:"min-w-0",children:[k.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[k.jsx("span",{className:"truncate font-mono text-[12px] text-zinc-100",children:I.name}),"installed"in I&&I.installed?k.jsx(lr,{variant:"success",children:"installed"}):null]}),k.jsx("p",{className:"line-clamp-2 font-mono text-[11px] leading-relaxed text-zinc-500",children:ee})]}),k.jsx("div",{className:"mt-0.5 rounded-xl bg-[#E43A9C]/12 p-2 text-[#E43A9C]",children:t==="installed"?k.jsx(eu,{className:"h-3.5 w-3.5"}):k.jsx(bk,{className:"h-3.5 w-3.5"})})]})},`${t}:${I.name}`)}),!g&&N.length===0?k.jsx("div",{className:"rounded-2xl border border-dashed border-white/[0.08] bg-white/[0.02] px-4 py-8 text-center",children:k.jsx("p",{className:"font-mono text-[11px] leading-relaxed text-zinc-500",children:P||(t==="skillssh"&&!p.trim()?"Start typing to search the skills.sh registry.":p.trim()?"No skills match your search.":"No skills available in this source.")})}):null]})]}),k.jsx("div",{className:"glass-card flex min-h-0 flex-1 flex-col rounded-2xl border border-white/[0.08] p-5",children:t==="installed"&&L?k.jsxs(k.Fragment,{children:[k.jsxs("div",{className:"mb-5 flex items-start justify-between gap-4 border-b border-white/[0.06] pb-5",children:[k.jsxs("div",{className:"flex min-w-0 gap-4",children:[k.jsx("div",{className:"flex h-14 w-14 shrink-0 items-center justify-center rounded-2xl bg-[#E43A9C]/12 text-[#E43A9C]",children:k.jsx(eu,{className:"h-6 w-6"})}),k.jsxs("div",{className:"min-w-0",children:[k.jsx("h3",{className:"truncate text-[34px] uppercase tracking-[0.08em] text-zinc-100",style:{fontFamily:"'Bebas Neue', sans-serif"},children:L.name}),k.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[k.jsx(lr,{variant:"success",children:"installed"}),G?k.jsx(lr,{variant:"warning",children:"active"}):k.jsx(lr,{variant:"muted",children:"inactive"}),k.jsx(lr,{variant:"muted",children:"local skill"})]}),k.jsxs("div",{className:"mt-3 space-y-1 font-mono text-[11px] text-zinc-500",children:[k.jsxs("p",{children:["path: ",L.filePath]}),k.jsxs("p",{children:["orchestrator: ",G?"enabled":"disabled"]})]})]})]}),k.jsxs("div",{className:"flex items-center gap-2",children:[y?k.jsxs(Ya,{onClick:X,disabled:te||O===(c==null?void 0:c.content),className:"px-3 py-2",children:[te?k.jsx(Nl,{className:"h-3.5 w-3.5 animate-spin"}):k.jsx(pb,{className:"h-3.5 w-3.5"}),"Save"]}):k.jsxs(Zo,{onClick:()=>S(!0),className:"px-3 py-2",children:[k.jsx(pb,{className:"h-3.5 w-3.5"})," Edit"]}),k.jsxs(dR,{onClick:()=>V(L.name),className:"px-3 py-2",children:[te?k.jsx(Nl,{className:"h-3.5 w-3.5 animate-spin"}):k.jsx(fx,{className:"h-3.5 w-3.5"}),"Remove"]})]})]}),k.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto pr-1",children:w&&!c?k.jsxs("div",{className:"flex items-center gap-2 font-mono text-[11px] text-zinc-500",children:[k.jsx(Nl,{className:"h-3.5 w-3.5 animate-spin"})," Loading skill..."]}):y?k.jsxs("div",{className:"space-y-3",children:[k.jsx("textarea",{value:O,onChange:I=>A(I.target.value),className:"min-h-[440px] w-full rounded-2xl border border-white/[0.08] bg-black/30 p-4 font-mono text-[12px] leading-6 text-zinc-200 outline-none transition-colors focus:border-[#E43A9C]/50"}),k.jsxs("div",{className:"flex items-center justify-between font-mono text-[11px] text-zinc-500",children:[k.jsx("span",{children:"Editing raw SKILL.md"}),k.jsx(Zo,{onClick:()=>{S(!1),A((c==null?void 0:c.content)??"")},className:"px-3 py-2",children:"Cancel"})]})]}):c?k.jsx(Dq,{content:c.content}):k.jsx("p",{className:"font-mono text-[11px] text-zinc-500",children:"Select an installed skill to inspect it."})})]}):t!=="installed"&&z?k.jsxs(k.Fragment,{children:[k.jsxs("div",{className:"mb-5 flex items-start justify-between gap-4 border-b border-white/[0.06] pb-5",children:[k.jsxs("div",{className:"flex min-w-0 gap-4",children:[k.jsx("div",{className:"flex h-14 w-14 shrink-0 items-center justify-center rounded-2xl bg-[#E43A9C]/12 text-[#E43A9C]",children:k.jsx(bk,{className:"h-6 w-6"})}),k.jsxs("div",{className:"min-w-0",children:[k.jsx("h3",{className:"truncate text-[34px] uppercase tracking-[0.08em] text-zinc-100",style:{fontFamily:"'Bebas Neue', sans-serif"},children:z.title||z.name}),k.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[k.jsx(lr,{variant:z.installed?"success":"default",children:z.installed?"installed":"available"}),k.jsx(lr,{variant:"muted",children:sg(z.source)}),dO(z.installs)?k.jsx(lr,{variant:"info",children:dO(z.installs)}):null]}),k.jsxs("div",{className:"mt-3 space-y-1 font-mono text-[11px] text-zinc-500",children:[k.jsxs("p",{children:["registry: ",sg(z.source)]}),z.registrySource?k.jsxs("p",{children:["source: ",z.registrySource]}):null,z.url?k.jsxs("p",{children:["url: ",z.url]}):null]})]})]}),k.jsx("div",{className:"flex items-center gap-2",children:z.installed?k.jsx(Zo,{onClick:()=>{e("installed"),u(z.name)},className:"px-3 py-2",children:"Open installed"}):k.jsxs(Ya,{onClick:()=>K(z),disabled:F||!z.url&&!z.registrySource,className:"px-3 py-2",children:[F?k.jsx(Nl,{className:"h-3.5 w-3.5 animate-spin"}):k.jsx(Z4,{className:"h-3.5 w-3.5"}),"Install"]})})]}),k.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto pr-1",children:[k.jsx("div",{className:"rounded-2xl border border-white/[0.06] bg-white/[0.02] p-5",children:k.jsx("p",{className:"font-mono text-[12px] leading-7 text-zinc-300",children:z.description||"No registry description is available for this skill yet."})}),k.jsx("div",{className:"mt-4 rounded-2xl border border-dashed border-white/[0.08] bg-black/20 p-4 font-mono text-[11px] leading-6 text-zinc-500",children:"Install will fetch the skill definition from the selected registry source and add it to your local skills library."})]})]}):k.jsx("div",{className:"flex h-full items-center justify-center rounded-2xl border border-dashed border-white/[0.08] bg-white/[0.02] p-8 text-center",children:k.jsxs("div",{children:[k.jsx("div",{className:"mx-auto mb-4 flex h-14 w-14 items-center justify-center rounded-2xl bg-[#E43A9C]/12 text-[#E43A9C]",children:k.jsx(eu,{className:"h-6 w-6"})}),k.jsx("h3",{className:"text-[28px] uppercase tracking-[0.08em] text-zinc-100",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"Select a Skill"}),k.jsx("p",{className:"mt-2 font-mono text-[11px] leading-relaxed text-zinc-500",children:"Choose a skill from the left panel to inspect details, install registry entries, or edit local definitions."})]})})})]})})}const Rb=["#38bdf8","#a78bfa","#34d399","#f59e0b","#f87171","#E43A9C"];function qq(t){return Rb[t%Rb.length]}function hO(){const{name:t}=GL();return t?k.jsx(Hq,{name:t}):k.jsx(Uq,{})}function Uq(){const[t,e]=R.useState([]),[r,n]=R.useState(null),i=ph();return R.useEffect(()=>{Promise.all([et.get("/squads"),et.get("/config")]).then(([a,s])=>{e(a.squads),n(s.config.maxInstancesPerSquad)}).catch(()=>{})},[]),k.jsxs("div",{className:"flex-1 overflow-y-auto p-6",children:[k.jsx("div",{className:"mb-6",children:k.jsxs("div",{children:[k.jsx("h2",{className:"text-2xl tracking-wide text-zinc-100",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"Squads"}),k.jsxs("p",{className:"text-[11px] text-zinc-600 font-mono mt-0.5",children:[t.length," squads · ",t.reduce((a,s)=>a+(s.activeInstances||0),0)," ","active instances"]})]})}),k.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3",children:[t.map((a,s)=>{const u=qq(s);return k.jsxs("button",{type:"button",onClick:()=>i(`/squads/${a.name}`),className:"text-left rounded-2xl p-5 transition-all group cursor-pointer",style:{border:`1px solid ${u}30`,background:`${u}08`,backdropFilter:"blur(20px)"},onMouseEnter:c=>{c.currentTarget.style.borderColor=`${u}70`,c.currentTarget.style.background=`${u}12`},onMouseLeave:c=>{c.currentTarget.style.borderColor=`${u}30`,c.currentTarget.style.background=`${u}08`},children:[k.jsxs("div",{className:"flex items-start justify-between mb-1",children:[k.jsx("h3",{className:"text-sm font-mono transition-colors",style:{color:u},children:a.name}),k.jsx(lr,{variant:Qf(a.status),children:a.status})]}),k.jsxs("div",{className:"flex items-center justify-between mb-3",children:[k.jsx("p",{className:"text-[11px] text-zinc-600 font-mono",children:a.universe}),k.jsxs("span",{className:"text-[11px] text-zinc-600 font-mono flex items-center gap-1",children:[k.jsx(K4,{className:"w-3 h-3"}),a.activeInstances,"/",r??(a.totalInstances||a.memberCount)]})]}),a.repoUrl&&k.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] text-zinc-700 font-mono",children:[k.jsx(NC,{className:"w-3 h-3 flex-shrink-0"}),k.jsx("span",{className:"truncate",children:a.repoUrl.replace("https://github.com/","")})]})]},a.id)}),t.length===0&&k.jsxs("div",{className:"col-span-full text-center py-12 text-zinc-600",children:[k.jsx(zC,{size:48,className:"mx-auto mb-3 opacity-30"}),k.jsx("p",{className:"text-[11px] font-mono",children:"No squads hired yet. Ask IO to hire a squad for a project."})]})]})]})}function Fq(t,e){const r="w-4 h-4",n={color:e},i=t.toLowerCase();return i.includes("lead")||i.includes("pm")||i.includes("technical")?k.jsx(X4,{className:r,style:n}):i.includes("qa")||i.includes("test")?k.jsx(M4,{className:r,style:n}):i.includes("scribe")?k.jsx(L5,{className:r,style:n}):k.jsx($4,{className:r,style:n})}function Hq({name:t}){const[e,r]=R.useState(null),n=ph();if(R.useEffect(()=>{et.get(`/squads/${t}`).then(r).catch(()=>{})},[t]),!e)return k.jsx("div",{className:"h-full flex items-center justify-center text-zinc-600",children:"Loading..."});const i=Rb[0];return k.jsxs("div",{className:"flex-1 overflow-y-auto p-6",children:[k.jsxs("button",{type:"button",onClick:()=>n("/squads"),className:"flex items-center gap-1.5 text-[11px] text-zinc-600 hover:text-zinc-300 font-mono mb-5 transition-colors",children:[k.jsx(CC,{className:"w-3.5 h-3.5"})," Back to Squads"]}),k.jsxs("div",{className:"flex items-start justify-between mb-6",children:[k.jsxs("div",{children:[k.jsx("h2",{className:"text-2xl tracking-wide",style:{fontFamily:"'Bebas Neue', sans-serif",color:i},children:e.squad.name}),k.jsxs("p",{className:"text-[11px] text-zinc-600 font-mono mt-0.5",children:[e.squad.universe," · ",e.squad.autonomyTier||"standard"," autonomy"]}),e.squad.repoUrl&&k.jsxs("a",{href:e.squad.repoUrl,target:"_blank",rel:"noreferrer",className:"text-[11px] font-mono text-zinc-700 hover:text-zinc-400 flex items-center gap-1 mt-1 transition-colors",children:[k.jsx(NC,{className:"w-3 h-3"}),e.squad.repoUrl.replace("https://github.com/","")]})]}),k.jsx(lr,{variant:Qf(e.squad.status),children:e.squad.status})]}),k.jsx("div",{className:"space-y-2 mb-8",children:e.members.map(a=>k.jsxs("div",{className:"glass-card border border-white/[0.07] rounded-2xl p-4 flex items-center gap-3",children:[k.jsx("div",{className:"w-8 h-8 rounded-xl flex items-center justify-center flex-shrink-0",style:{border:`1px solid ${i}30`,background:`${i}12`},children:Fq(a.roleName||a.role,i)}),k.jsxs("div",{className:"flex-1 min-w-0",children:[k.jsxs("div",{className:"flex items-center gap-2",children:[k.jsx("span",{className:"text-sm font-mono text-zinc-200",children:a.displayName}),k.jsx(lr,{variant:Qf(a.status),children:a.status})]}),k.jsx("p",{className:"text-[11px] text-zinc-600 font-mono mt-0.5",children:a.role}),a.currentTask&&k.jsx("p",{className:"text-xs text-zinc-500 mt-1 truncate",children:a.currentTask})]})]},a.id))}),e.instances.length>0&&k.jsxs("section",{children:[k.jsx("h3",{className:"text-lg tracking-wide mb-3",style:{fontFamily:"'Bebas Neue', sans-serif",color:i},children:"Instances"}),k.jsx("div",{className:"space-y-2",children:e.instances.map(a=>k.jsxs("div",{className:"glass-card border border-white/[0.07] rounded-2xl p-4",children:[k.jsxs("div",{className:"flex items-center justify-between",children:[k.jsx("span",{className:"text-[11px] font-mono text-zinc-400",children:a.id.slice(0,8)}),k.jsx(lr,{variant:Qf(a.status),children:a.status})]}),k.jsxs("div",{className:"mt-2 text-[11px] text-zinc-600 font-mono flex gap-4",children:[k.jsxs("span",{children:["Tasks: ",a.tasksComplete,"/",a.taskCount]}),a.branch&&k.jsxs("span",{children:["Branch: ",a.branch]})]})]},a.id))})]})]})}var lg,pO;function Er(){if(pO)return lg;pO=1;var t=Array.isArray;return lg=t,lg}var ug,mO;function MR(){if(mO)return ug;mO=1;var t=typeof yf=="object"&&yf&&yf.Object===Object&&yf;return ug=t,ug}var cg,gO;function Wn(){if(gO)return cg;gO=1;var t=MR(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return cg=r,cg}var fg,vO;function rc(){if(vO)return fg;vO=1;var t=Wn(),e=t.Symbol;return fg=e,fg}var dg,yO;function Wq(){if(yO)return dg;yO=1;var t=rc(),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 dg=a,dg}var hg,bO;function Vq(){if(bO)return hg;bO=1;var t=Object.prototype,e=t.toString;function r(n){return e.call(n)}return hg=r,hg}var pg,wO;function wi(){if(wO)return pg;wO=1;var t=rc(),e=Wq(),r=Vq(),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 pg=s,pg}var mg,xO;function xi(){if(xO)return mg;xO=1;function t(e){return e!=null&&typeof e=="object"}return mg=t,mg}var gg,_O;function Ds(){if(_O)return gg;_O=1;var t=wi(),e=xi(),r="[object Symbol]";function n(i){return typeof i=="symbol"||e(i)&&t(i)==r}return gg=n,gg}var vg,SO;function Ox(){if(SO)return vg;SO=1;var t=Er(),e=Ds(),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 vg=i,vg}var yg,kO;function oa(){if(kO)return yg;kO=1;function t(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}return yg=t,yg}var bg,OO;function Ex(){if(OO)return bg;OO=1;var t=wi(),e=oa(),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 bg=s,bg}var wg,EO;function Kq(){if(EO)return wg;EO=1;var t=Wn(),e=t["__core-js_shared__"];return wg=e,wg}var xg,AO;function Gq(){if(AO)return xg;AO=1;var t=Kq(),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 xg=r,xg}var _g,PO;function LR(){if(PO)return _g;PO=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 _g=r,_g}var Sg,TO;function Xq(){if(TO)return Sg;TO=1;var t=Ex(),e=Gq(),r=oa(),n=LR(),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 kg,jO;function Yq(){if(jO)return kg;jO=1;function t(e,r){return e==null?void 0:e[r]}return kg=t,kg}var Og,CO;function io(){if(CO)return Og;CO=1;var t=Xq(),e=Yq();function r(n,i){var a=e(n,i);return t(a)?a:void 0}return Og=r,Og}var Eg,RO;function Sh(){if(RO)return Eg;RO=1;var t=io(),e=t(Object,"create");return Eg=e,Eg}var Ag,NO;function Jq(){if(NO)return Ag;NO=1;var t=Sh();function e(){this.__data__=t?t(null):{},this.size=0}return Ag=e,Ag}var Pg,$O;function Qq(){if($O)return Pg;$O=1;function t(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}return Pg=t,Pg}var Tg,IO;function Zq(){if(IO)return Tg;IO=1;var t=Sh(),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 Tg=i,Tg}var jg,MO;function eU(){if(MO)return jg;MO=1;var t=Sh(),e=Object.prototype,r=e.hasOwnProperty;function n(i){var a=this.__data__;return t?a[i]!==void 0:r.call(a,i)}return jg=n,jg}var Cg,LO;function tU(){if(LO)return Cg;LO=1;var t=Sh(),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 Cg=r,Cg}var Rg,DO;function rU(){if(DO)return Rg;DO=1;var t=Jq(),e=Qq(),r=Zq(),n=eU(),i=tU();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,Rg=a,Rg}var Ng,BO;function nU(){if(BO)return Ng;BO=1;function t(){this.__data__=[],this.size=0}return Ng=t,Ng}var $g,zO;function Ax(){if(zO)return $g;zO=1;function t(e,r){return e===r||e!==e&&r!==r}return $g=t,$g}var Ig,qO;function kh(){if(qO)return Ig;qO=1;var t=Ax();function e(r,n){for(var i=r.length;i--;)if(t(r[i][0],n))return i;return-1}return Ig=e,Ig}var Mg,UO;function iU(){if(UO)return Mg;UO=1;var t=kh(),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 Mg=n,Mg}var Lg,FO;function aU(){if(FO)return Lg;FO=1;var t=kh();function e(r){var n=this.__data__,i=t(n,r);return i<0?void 0:n[i][1]}return Lg=e,Lg}var Dg,HO;function oU(){if(HO)return Dg;HO=1;var t=kh();function e(r){return t(this.__data__,r)>-1}return Dg=e,Dg}var Bg,WO;function sU(){if(WO)return Bg;WO=1;var t=kh();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 Bg=e,Bg}var zg,VO;function Oh(){if(VO)return zg;VO=1;var t=nU(),e=iU(),r=aU(),n=oU(),i=sU();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,zg=a,zg}var qg,KO;function Px(){if(KO)return qg;KO=1;var t=io(),e=Wn(),r=t(e,"Map");return qg=r,qg}var Ug,GO;function lU(){if(GO)return Ug;GO=1;var t=rU(),e=Oh(),r=Px();function n(){this.size=0,this.__data__={hash:new t,map:new(r||e),string:new t}}return Ug=n,Ug}var Fg,XO;function uU(){if(XO)return Fg;XO=1;function t(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}return Fg=t,Fg}var Hg,YO;function Eh(){if(YO)return Hg;YO=1;var t=uU();function e(r,n){var i=r.__data__;return t(n)?i[typeof n=="string"?"string":"hash"]:i.map}return Hg=e,Hg}var Wg,JO;function cU(){if(JO)return Wg;JO=1;var t=Eh();function e(r){var n=t(this,r).delete(r);return this.size-=n?1:0,n}return Wg=e,Wg}var Vg,QO;function fU(){if(QO)return Vg;QO=1;var t=Eh();function e(r){return t(this,r).get(r)}return Vg=e,Vg}var Kg,ZO;function dU(){if(ZO)return Kg;ZO=1;var t=Eh();function e(r){return t(this,r).has(r)}return Kg=e,Kg}var Gg,eE;function hU(){if(eE)return Gg;eE=1;var t=Eh();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 Gg=e,Gg}var Xg,tE;function Tx(){if(tE)return Xg;tE=1;var t=lU(),e=cU(),r=fU(),n=dU(),i=hU();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,Xg=a,Xg}var Yg,rE;function DR(){if(rE)return Yg;rE=1;var t=Tx(),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,Yg=r,Yg}var Jg,nE;function pU(){if(nE)return Jg;nE=1;var t=DR(),e=500;function r(n){var i=t(n,function(s){return a.size===e&&a.clear(),s}),a=i.cache;return i}return Jg=r,Jg}var Qg,iE;function mU(){if(iE)return Qg;iE=1;var t=pU(),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 Qg=n,Qg}var Zg,aE;function jx(){if(aE)return Zg;aE=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 Zg=t,Zg}var ev,oE;function gU(){if(oE)return ev;oE=1;var t=rc(),e=jx(),r=Er(),n=Ds(),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 ev=s,ev}var tv,sE;function BR(){if(sE)return tv;sE=1;var t=gU();function e(r){return r==null?"":t(r)}return tv=e,tv}var rv,lE;function zR(){if(lE)return rv;lE=1;var t=Er(),e=Ox(),r=mU(),n=BR();function i(a,s){return t(a)?a:e(a,s)?[a]:r(n(a))}return rv=i,rv}var nv,uE;function Ah(){if(uE)return nv;uE=1;var t=Ds();function e(r){if(typeof r=="string"||t(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return nv=e,nv}var iv,cE;function Cx(){if(cE)return iv;cE=1;var t=zR(),e=Ah();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 iv=r,iv}var av,fE;function qR(){if(fE)return av;fE=1;var t=Cx();function e(r,n,i){var a=r==null?void 0:t(r,n);return a===void 0?i:a}return av=e,av}var vU=qR();const Lr=Je(vU);var ov,dE;function yU(){if(dE)return ov;dE=1;function t(e){return e==null}return ov=t,ov}var bU=yU();const Le=Je(bU);var sv,hE;function wU(){if(hE)return sv;hE=1;var t=wi(),e=Er(),r=xi(),n="[object String]";function i(a){return typeof a=="string"||!e(a)&&r(a)&&t(a)==n}return sv=i,sv}var xU=wU();const Ja=Je(xU);var _U=Ex();const $e=Je(_U);var SU=oa();const Bs=Je(SU);var lv={exports:{}},Ge={};/**
|
|
407
|
-
* @license React
|
|
408
|
-
* react-is.production.min.js
|
|
409
|
-
*
|
|
410
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
411
|
-
*
|
|
412
|
-
* This source code is licensed under the MIT license found in the
|
|
413
|
-
* LICENSE file in the root directory of this source tree.
|
|
414
|
-
*/var pE;function kU(){if(pE)return Ge;pE=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 Ge.ContextConsumer=s,Ge.ContextProvider=a,Ge.Element=t,Ge.ForwardRef=c,Ge.Fragment=r,Ge.Lazy=g,Ge.Memo=h,Ge.Portal=e,Ge.Profiler=i,Ge.StrictMode=n,Ge.Suspense=f,Ge.SuspenseList=p,Ge.isAsyncMode=function(){return!1},Ge.isConcurrentMode=function(){return!1},Ge.isContextConsumer=function(y){return x(y)===s},Ge.isContextProvider=function(y){return x(y)===a},Ge.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},Ge.isForwardRef=function(y){return x(y)===c},Ge.isFragment=function(y){return x(y)===r},Ge.isLazy=function(y){return x(y)===g},Ge.isMemo=function(y){return x(y)===h},Ge.isPortal=function(y){return x(y)===e},Ge.isProfiler=function(y){return x(y)===i},Ge.isStrictMode=function(y){return x(y)===n},Ge.isSuspense=function(y){return x(y)===f},Ge.isSuspenseList=function(y){return x(y)===p},Ge.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)},Ge.typeOf=x,Ge}var mE;function OU(){return mE||(mE=1,lv.exports=kU()),lv.exports}var EU=OU(),uv,gE;function UR(){if(gE)return uv;gE=1;var t=wi(),e=xi(),r="[object Number]";function n(i){return typeof i=="number"||e(i)&&t(i)==r}return uv=n,uv}var cv,vE;function AU(){if(vE)return cv;vE=1;var t=UR();function e(r){return t(r)&&r!=+r}return cv=e,cv}var PU=AU();const zs=Je(PU);var TU=UR();const jU=Je(TU);var dr=function(e){return e===0?0:e>0?1:-1},qa=function(e){return Ja(e)&&e.indexOf("%")===e.length-1},fe=function(e){return jU(e)&&!zs(e)},CU=function(e){return Le(e)},Bt=function(e){return fe(e)||Ja(e)},RU=0,qs=function(e){var r=++RU;return"".concat(e||"").concat(r)},hr=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)&&!Ja(e))return n;var a;if(qa(e)){var s=e.indexOf("%");a=r*parseFloat(e.slice(0,s))/100}else a=+e;return zs(a)&&(a=n),i&&a>r&&(a=r),a},Vo=function(e){if(!e)return null;var r=Object.keys(e);return r&&r.length?e[r[0]]:null},NU=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},kr=function(e,r){return fe(e)&&fe(r)?function(n){return e+n*(r-e)}:function(){return r}};function hd(t,e,r){return!t||!t.length?null:t.find(function(n){return n&&(typeof e=="function"?e(n):Lr(n,e))===r})}var $U=function(e,r){return fe(e)&&fe(r)?e-r:Ja(e)&&Ja(r)?e.localeCompare(r):e instanceof Date&&r instanceof Date?e.getTime()-r.getTime():String(e).localeCompare(String(r))};function ts(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 Nb(t){"@babel/helpers - typeof";return Nb=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},Nb(t)}var IU=["viewBox","children"],MU=["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"],yE=["points","pathLength"],fv={svg:IU,polygon:yE,polyline:yE},Rx=["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"],pd=function(e,r){if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(R.isValidElement(e)&&(n=e.props),!Bs(n))return null;var i={};return Object.keys(n).forEach(function(a){Rx.includes(a)&&(i[a]=r||function(s){return n[a](n,s)})}),i},LU=function(e,r,n){return function(i){return e(r,n,i),null}},Qa=function(e,r,n){if(!Bs(e)||Nb(e)!=="object")return null;var i=null;return Object.keys(e).forEach(function(a){var s=e[a];Rx.includes(a)&&typeof s=="function"&&(i||(i={}),i[a]=LU(s,r,n))}),i},DU=["children"],BU=["children"];function bE(t,e){if(t==null)return{};var r=zU(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 zU(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 $b(t){"@babel/helpers - typeof";return $b=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},$b(t)}var wE={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"},fi=function(e){return typeof e=="string"?e:e?e.displayName||e.name||"Component":""},xE=null,dv=null,Nx=function t(e){if(e===xE&&Array.isArray(dv))return dv;var r=[];return R.Children.forEach(e,function(n){Le(n)||(EU.isFragment(n)?r=r.concat(t(n.props.children)):r.push(n))}),dv=r,xE=e,r};function rn(t,e){var r=[],n=[];return Array.isArray(e)?n=e.map(function(i){return fi(i)}):n=[fi(e)],Nx(t).forEach(function(i){var a=Lr(i,"type.displayName")||Lr(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function $r(t,e){var r=rn(t,e);return r&&r[0]}var _E=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)},qU=["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"],UU=function(e){return e&&e.type&&Ja(e.type)&&qU.indexOf(e.type)>=0},FU=function(e){return e&&$b(e)==="object"&&"clipDot"in e},HU=function(e,r,n,i){var a,s=(a=fv==null?void 0:fv[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!$e(e)&&(i&&s.includes(r)||MU.includes(r))||n&&Rx.includes(r)},Ee=function(e,r,n){if(!e||typeof e=="function"||typeof e=="boolean")return null;var i=e;if(R.isValidElement(e)&&(i=e.props),!Bs(i))return null;var a={};return Object.keys(i).forEach(function(s){var u;HU((u=i)===null||u===void 0?void 0:u[s],s,r,n)&&(a[s]=i[s])}),a},Ib=function t(e,r){if(e===r)return!0;var n=R.Children.count(e);if(n!==R.Children.count(r))return!1;if(n===0)return!0;if(n===1)return SE(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(!SE(a,s))return!1}return!0},SE=function(e,r){if(Le(e)&&Le(r))return!0;if(!Le(e)&&!Le(r)){var n=e.props||{},i=n.children,a=bE(n,DU),s=r.props||{},u=s.children,c=bE(s,BU);return i&&u?ts(a,c)&&Ib(i,u):!i&&!u?ts(a,c):!1}return!1},kE=function(e,r){var n=[],i={};return Nx(e).forEach(function(a,s){if(UU(a))n.push(a);else if(a){var u=fi(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},WU=function(e){var r=e&&e.type;return r&&wE[r]?wE[r]:null},VU=function(e,r){return Nx(r).indexOf(e)},KU=["children","width","height","viewBox","className","style","title","desc"];function Mb(){return Mb=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},Mb.apply(this,arguments)}function GU(t,e){if(t==null)return{};var r=XU(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 XU(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 Lb(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=GU(t,KU),p=i||{width:r,height:n,x:0,y:0},h=De("recharts-surface",a);return M.createElement("svg",Mb({},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)}),M.createElement("title",null,u),M.createElement("desc",null,c),e)}var YU=["children","className"];function Db(){return Db=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},Db.apply(this,arguments)}function JU(t,e){if(t==null)return{};var r=QU(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 QU(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=M.forwardRef(function(t,e){var r=t.children,n=t.className,i=JU(t,YU),a=De("recharts-layer",n);return M.createElement("g",Db({className:a},Ee(i,!0),{ref:e}),r)}),di=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]},hv,OE;function ZU(){if(OE)return hv;OE=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 hv=t,hv}var pv,EE;function e9(){if(EE)return pv;EE=1;var t=ZU();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 pv=e,pv}var mv,AE;function FR(){if(AE)return mv;AE=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 mv=c,mv}var gv,PE;function t9(){if(PE)return gv;PE=1;function t(e){return e.split("")}return gv=t,gv}var vv,TE;function r9(){if(TE)return vv;TE=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,O="(?:"+[p+u+"?",u,h,g,s].join("|")+")",A=RegExp(c+"(?="+c+")|"+O+S,"g");function T(E){return E.match(A)||[]}return vv=T,vv}var yv,jE;function n9(){if(jE)return yv;jE=1;var t=t9(),e=FR(),r=r9();function n(i){return e(i)?r(i):t(i)}return yv=n,yv}var bv,CE;function i9(){if(CE)return bv;CE=1;var t=e9(),e=FR(),r=n9(),n=BR();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 bv=i,bv}var wv,RE;function a9(){if(RE)return wv;RE=1;var t=i9(),e=t("toUpperCase");return wv=e,wv}var o9=a9();const Ph=Je(o9);function at(t){return function(){return t}}const HR=Math.cos,md=Math.sin,An=Math.sqrt,gd=Math.PI,Th=2*gd,Bb=Math.PI,zb=2*Bb,Ma=1e-6,s9=zb-Ma;function WR(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}function l9(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return WR;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 u9{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?WR:l9(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>Ma)if(!(Math.abs(h*c-f*p)>Ma)||!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),O=Math.sqrt(g),A=a*Math.tan((Bb-Math.acos((x+g-y)/(2*S*O)))/2),T=A/O,E=A/S;Math.abs(T-1)>Ma&&this._append`L${e+T*p},${r+T*h}`,this._append`A${a},${a},0,0,${+(h*v>p*w)},${this._x1=e+E*c},${this._y1=r+E*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)>Ma||Math.abs(this._y1-p)>Ma)&&this._append`L${f},${p}`,n&&(g<0&&(g=g%zb+zb),g>s9?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>Ma&&this._append`A${n},${n},0,${+(g>=Bb)},${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 $x(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 u9(e)}function Ix(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function VR(t){this._context=t}VR.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 jh(t){return new VR(t)}function KR(t){return t[0]}function GR(t){return t[1]}function XR(t,e){var r=at(!0),n=null,i=jh,a=null,s=$x(u);t=typeof t=="function"?t:t===void 0?KR:at(t),e=typeof e=="function"?e:e===void 0?GR:at(e);function u(c){var f,p=(c=Ix(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:at(+c),u):t},u.y=function(c){return arguments.length?(e=typeof c=="function"?c:at(+c),u):e},u.defined=function(c){return arguments.length?(r=typeof c=="function"?c:at(!!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 Nf(t,e,r){var n=null,i=at(!0),a=null,s=jh,u=null,c=$x(f);t=typeof t=="function"?t:t===void 0?KR:at(+t),e=typeof e=="function"?e:at(e===void 0?0:+e),r=typeof r=="function"?r:r===void 0?GR:at(+r);function f(h){var g,v,w,x=(h=Ix(h)).length,y,S=!1,O,A=new Array(x),T=new Array(x);for(a==null&&(u=s(O=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(A[w],T[w]);u.lineEnd(),u.areaEnd()}S&&(A[g]=+t(y,g,h),T[g]=+e(y,g,h),u.point(n?+n(y,g,h):A[g],r?+r(y,g,h):T[g]))}if(O)return u=null,O+""||null}function p(){return XR().defined(i).curve(s).context(a)}return f.x=function(h){return arguments.length?(t=typeof h=="function"?h:at(+h),n=null,f):t},f.x0=function(h){return arguments.length?(t=typeof h=="function"?h:at(+h),f):t},f.x1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:at(+h),f):n},f.y=function(h){return arguments.length?(e=typeof h=="function"?h:at(+h),r=null,f):e},f.y0=function(h){return arguments.length?(e=typeof h=="function"?h:at(+h),f):e},f.y1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:at(+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:at(!!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 YR{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 c9(t){return new YR(t,!0)}function f9(t){return new YR(t,!1)}const Mx={draw(t,e){const r=An(e/gd);t.moveTo(r,0),t.arc(0,0,r,0,Th)}},d9={draw(t,e){const r=An(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()}},JR=An(1/3),h9=JR*2,p9={draw(t,e){const r=An(e/h9),n=r*JR;t.moveTo(0,-r),t.lineTo(n,0),t.lineTo(0,r),t.lineTo(-n,0),t.closePath()}},m9={draw(t,e){const r=An(e),n=-r/2;t.rect(n,n,r,r)}},g9=.8908130915292852,QR=md(gd/10)/md(7*gd/10),v9=md(Th/10)*QR,y9=-HR(Th/10)*QR,b9={draw(t,e){const r=An(e*g9),n=v9*r,i=y9*r;t.moveTo(0,-r),t.lineTo(n,i);for(let a=1;a<5;++a){const s=Th*a/5,u=HR(s),c=md(s);t.lineTo(c*r,-u*r),t.lineTo(u*n-c*i,c*n+u*i)}t.closePath()}},xv=An(3),w9={draw(t,e){const r=-An(e/(xv*3));t.moveTo(0,r*2),t.lineTo(-xv*r,-r),t.lineTo(xv*r,-r),t.closePath()}},Xr=-.5,Yr=An(3)/2,qb=1/An(12),x9=(qb/2+1)*3,_9={draw(t,e){const r=An(e/x9),n=r/2,i=r*qb,a=n,s=r*qb+r,u=-a,c=s;t.moveTo(n,i),t.lineTo(a,s),t.lineTo(u,c),t.lineTo(Xr*n-Yr*i,Yr*n+Xr*i),t.lineTo(Xr*a-Yr*s,Yr*a+Xr*s),t.lineTo(Xr*u-Yr*c,Yr*u+Xr*c),t.lineTo(Xr*n+Yr*i,Xr*i-Yr*n),t.lineTo(Xr*a+Yr*s,Xr*s-Yr*a),t.lineTo(Xr*u+Yr*c,Xr*c-Yr*u),t.closePath()}};function S9(t,e){let r=null,n=$x(i);t=typeof t=="function"?t:at(t||Mx),e=typeof e=="function"?e:at(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:at(a),i):t},i.size=function(a){return arguments.length?(e=typeof a=="function"?a:at(+a),i):e},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function vd(){}function yd(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 ZR(t){this._context=t}ZR.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:yd(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:yd(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function k9(t){return new ZR(t)}function eN(t){this._context=t}eN.prototype={areaStart:vd,areaEnd:vd,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:yd(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function O9(t){return new eN(t)}function tN(t){this._context=t}tN.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:yd(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function E9(t){return new tN(t)}function rN(t){this._context=t}rN.prototype={areaStart:vd,areaEnd:vd,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 A9(t){return new rN(t)}function NE(t){return t<0?-1:1}function $E(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(NE(a)+NE(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(u))||0}function IE(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function _v(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 bd(t){this._context=t}bd.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:_v(this,this._t0,IE(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,_v(this,IE(this,r=$E(this,t,e)),r);break;default:_v(this,this._t0,r=$E(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function nN(t){this._context=new iN(t)}(nN.prototype=Object.create(bd.prototype)).point=function(t,e){bd.prototype.point.call(this,e,t)};function iN(t){this._context=t}iN.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 P9(t){return new bd(t)}function T9(t){return new nN(t)}function aN(t){this._context=t}aN.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=ME(t),i=ME(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 ME(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 j9(t){return new aN(t)}function Ch(t,e){this._context=t,this._t=e}Ch.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 C9(t){return new Ch(t,.5)}function R9(t){return new Ch(t,0)}function N9(t){return new Ch(t,1)}function ss(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 Ub(t){for(var e=t.length,r=new Array(e);--e>=0;)r[e]=e;return r}function $9(t,e){return t[e]}function I9(t){const e=[];return e.key=t,e}function M9(){var t=at([]),e=Ub,r=ss,n=$9;function i(a){var s=Array.from(t.apply(this,arguments),I9),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=Ix(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:at(Array.from(a)),i):t},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:at(+a),i):n},i.order=function(a){return arguments.length?(e=a==null?Ub:typeof a=="function"?a:at(Array.from(a)),i):e},i.offset=function(a){return arguments.length?(r=a??ss,i):r},i}function L9(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}ss(t,e)}}function D9(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}ss(t,e)}}function B9(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,ss(t,e)}}function vu(t){"@babel/helpers - typeof";return vu=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},vu(t)}var z9=["type","size","sizeType"];function Fb(){return Fb=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},Fb.apply(this,arguments)}function LE(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 DE(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?LE(Object(r),!0).forEach(function(n){q9(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):LE(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function q9(t,e,r){return e=U9(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function U9(t){var e=F9(t,"string");return vu(e)=="symbol"?e:e+""}function F9(t,e){if(vu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(vu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function H9(t,e){if(t==null)return{};var r=W9(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 W9(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 oN={symbolCircle:Mx,symbolCross:d9,symbolDiamond:p9,symbolSquare:m9,symbolStar:b9,symbolTriangle:w9,symbolWye:_9},V9=Math.PI/180,K9=function(e){var r="symbol".concat(Ph(e));return oN[r]||Mx},G9=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*V9;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}},X9=function(e,r){oN["symbol".concat(Ph(e))]=r},Lx=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=H9(e,z9),f=DE(DE({},c),{},{type:n,size:a,sizeType:u}),p=function(){var y=K9(n),S=S9().type(y).size(G9(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?M.createElement("path",Fb({},w,{className:De("recharts-symbols",h),transform:"translate(".concat(g,", ").concat(v,")"),d:p()})):null};Lx.registerSymbol=X9;function ls(t){"@babel/helpers - typeof";return ls=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},ls(t)}function Hb(){return Hb=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},Hb.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 Y9(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){yu(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 J9(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Q9(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 Z9(t,e,r){return e&&Q9(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function eF(t,e,r){return e=wd(e),tF(t,sN()?Reflect.construct(e,r||[],wd(t).constructor):e.apply(t,r))}function tF(t,e){if(e&&(ls(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rF(t)}function rF(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 wd(t){return wd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},wd(t)}function nF(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&&Wb(t,e)}function Wb(t,e){return Wb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Wb(t,e)}function yu(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=iF(t,"string");return ls(e)=="symbol"?e:e+""}function iF(t,e){if(ls(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(ls(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Jr=32,Dx=(function(t){function e(){return J9(this,e),eF(this,e,arguments)}return nF(e,t),Z9(e,[{key:"renderIcon",value:function(n){var i=this.props.inactiveColor,a=Jr/2,s=Jr/6,u=Jr/3,c=n.inactive?i:n.color;if(n.type==="plainline")return M.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:a,x2:Jr,y2:a,className:"recharts-legend-icon"});if(n.type==="line")return M.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(a,"h").concat(u,`
|
|
415
|
-
A`).concat(s,",").concat(s,",0,1,1,").concat(2*u,",").concat(a,`
|
|
416
|
-
H`).concat(Jr,"M").concat(2*u,",").concat(a,`
|
|
417
|
-
A`).concat(s,",").concat(s,",0,1,1,").concat(u,",").concat(a),className:"recharts-legend-icon"});if(n.type==="rect")return M.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(Jr/8,"h").concat(Jr,"v").concat(Jr*3/4,"h").concat(-Jr,"z"),className:"recharts-legend-icon"});if(M.isValidElement(n.legendIcon)){var f=Y9({},n);return delete f.legendIcon,M.cloneElement(n.legendIcon,f)}return M.createElement(Lx,{fill:c,cx:a,cy:a,size:Jr,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:Jr,height:Jr},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=De(yu(yu({"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;di(!$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 O=v.inactive?f:v.color;return M.createElement("li",Hb({className:y,style:h,key:"legend-item-".concat(w)},Qa(n.props,v,w)),M.createElement(Lb,{width:s,height:s,viewBox:p,style:g},n.renderIcon(v)),M.createElement("span",{className:"recharts-legend-item-text",style:{color:O}},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 M.createElement("ul",{className:"recharts-default-legend",style:u},this.renderItems())}}])})(R.PureComponent);yu(Dx,"displayName","Legend");yu(Dx,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Sv,zE;function aF(){if(zE)return Sv;zE=1;var t=Oh();function e(){this.__data__=new t,this.size=0}return Sv=e,Sv}var kv,qE;function oF(){if(qE)return kv;qE=1;function t(e){var r=this.__data__,n=r.delete(e);return this.size=r.size,n}return kv=t,kv}var Ov,UE;function sF(){if(UE)return Ov;UE=1;function t(e){return this.__data__.get(e)}return Ov=t,Ov}var Ev,FE;function lF(){if(FE)return Ev;FE=1;function t(e){return this.__data__.has(e)}return Ev=t,Ev}var Av,HE;function uF(){if(HE)return Av;HE=1;var t=Oh(),e=Px(),r=Tx(),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 Av=i,Av}var Pv,WE;function uN(){if(WE)return Pv;WE=1;var t=Oh(),e=aF(),r=oF(),n=sF(),i=lF(),a=uF();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,Pv=s,Pv}var Tv,VE;function cF(){if(VE)return Tv;VE=1;var t="__lodash_hash_undefined__";function e(r){return this.__data__.set(r,t),this}return Tv=e,Tv}var jv,KE;function fF(){if(KE)return jv;KE=1;function t(e){return this.__data__.has(e)}return jv=t,jv}var Cv,GE;function cN(){if(GE)return Cv;GE=1;var t=Tx(),e=cF(),r=fF();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,Cv=n,Cv}var Rv,XE;function fN(){if(XE)return Rv;XE=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 Rv=t,Rv}var Nv,YE;function dN(){if(YE)return Nv;YE=1;function t(e,r){return e.has(r)}return Nv=t,Nv}var $v,JE;function hN(){if(JE)return $v;JE=1;var t=cN(),e=fN(),r=dN(),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,O=!0,A=c&i?new t:void 0;for(h.set(s,u),h.set(u,s);++S<v;){var T=s[S],E=u[S];if(f)var P=g?f(E,T,S,u,s,h):f(T,E,S,s,u,h);if(P!==void 0){if(P)continue;O=!1;break}if(A){if(!e(u,function(C,$){if(!r(A,$)&&(T===C||p(T,C,c,f,h)))return A.push($)})){O=!1;break}}else if(!(T===E||p(T,E,c,f,h))){O=!1;break}}return h.delete(s),h.delete(u),O}return $v=a,$v}var Iv,QE;function dF(){if(QE)return Iv;QE=1;var t=Wn(),e=t.Uint8Array;return Iv=e,Iv}var Mv,ZE;function hF(){if(ZE)return Mv;ZE=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(i,a){n[++r]=[a,i]}),n}return Mv=t,Mv}var Lv,eA;function Bx(){if(eA)return Lv;eA=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(i){n[++r]=i}),n}return Lv=t,Lv}var Dv,tA;function pF(){if(tA)return Dv;tA=1;var t=rc(),e=dF(),r=Ax(),n=hN(),i=hF(),a=Bx(),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]",O="[object DataView]",A=t?t.prototype:void 0,T=A?A.valueOf:void 0;function E(P,C,$,D,W,N,L){switch($){case O:if(P.byteLength!=C.byteLength||P.byteOffset!=C.byteOffset)return!1;P=P.buffer,C=C.buffer;case S:return!(P.byteLength!=C.byteLength||!N(new e(P),new e(C)));case c:case f:case g:return r(+P,+C);case p:return P.name==C.name&&P.message==C.message;case v:case x:return P==C+"";case h:var z=i;case w:var K=D&s;if(z||(z=a),P.size!=C.size&&!K)return!1;var V=L.get(P);if(V)return V==C;D|=u,L.set(P,C);var X=n(z(P),z(C),D,W,N,L);return L.delete(P),X;case y:if(T)return T.call(P)==T.call(C)}return!1}return Dv=E,Dv}var Bv,rA;function pN(){if(rA)return Bv;rA=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 Bv=t,Bv}var zv,nA;function mF(){if(nA)return zv;nA=1;var t=pN(),e=Er();function r(n,i,a){var s=i(n);return e(n)?s:t(s,a(n))}return zv=r,zv}var qv,iA;function gF(){if(iA)return qv;iA=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 qv=t,qv}var Uv,aA;function vF(){if(aA)return Uv;aA=1;function t(){return[]}return Uv=t,Uv}var Fv,oA;function yF(){if(oA)return Fv;oA=1;var t=gF(),e=vF(),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 Fv=a,Fv}var Hv,sA;function bF(){if(sA)return Hv;sA=1;function t(e,r){for(var n=-1,i=Array(e);++n<e;)i[n]=r(n);return i}return Hv=t,Hv}var Wv,lA;function wF(){if(lA)return Wv;lA=1;var t=wi(),e=xi(),r="[object Arguments]";function n(i){return e(i)&&t(i)==r}return Wv=n,Wv}var Vv,uA;function zx(){if(uA)return Vv;uA=1;var t=wF(),e=xi(),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 Vv=a,Vv}var Jl={exports:{}},Kv,cA;function xF(){if(cA)return Kv;cA=1;function t(){return!1}return Kv=t,Kv}Jl.exports;var fA;function mN(){return fA||(fA=1,(function(t,e){var r=Wn(),n=xF(),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})(Jl,Jl.exports)),Jl.exports}var Gv,dA;function qx(){if(dA)return Gv;dA=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 Gv=r,Gv}var Xv,hA;function Ux(){if(hA)return Xv;hA=1;var t=9007199254740991;function e(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=t}return Xv=e,Xv}var Yv,pA;function _F(){if(pA)return Yv;pA=1;var t=wi(),e=Ux(),r=xi(),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]",O="[object Float32Array]",A="[object Float64Array]",T="[object Int8Array]",E="[object Int16Array]",P="[object Int32Array]",C="[object Uint8Array]",$="[object Uint8ClampedArray]",D="[object Uint16Array]",W="[object Uint32Array]",N={};N[O]=N[A]=N[T]=N[E]=N[P]=N[C]=N[$]=N[D]=N[W]=!0,N[n]=N[i]=N[y]=N[a]=N[S]=N[s]=N[u]=N[c]=N[f]=N[p]=N[h]=N[g]=N[v]=N[w]=N[x]=!1;function L(z){return r(z)&&e(z.length)&&!!N[t(z)]}return Yv=L,Yv}var Jv,mA;function gN(){if(mA)return Jv;mA=1;function t(e){return function(r){return e(r)}}return Jv=t,Jv}var Ql={exports:{}};Ql.exports;var gA;function SF(){return gA||(gA=1,(function(t,e){var r=MR(),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})(Ql,Ql.exports)),Ql.exports}var Qv,vA;function vN(){if(vA)return Qv;vA=1;var t=_F(),e=gN(),r=SF(),n=r&&r.isTypedArray,i=n?e(n):t;return Qv=i,Qv}var Zv,yA;function kF(){if(yA)return Zv;yA=1;var t=bF(),e=zx(),r=Er(),n=mN(),i=qx(),a=vN(),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 O in f)(p||u.call(f,O))&&!(x&&(O=="length"||v&&(O=="offset"||O=="parent")||w&&(O=="buffer"||O=="byteLength"||O=="byteOffset")||i(O,S)))&&y.push(O);return y}return Zv=c,Zv}var ey,bA;function OF(){if(bA)return ey;bA=1;var t=Object.prototype;function e(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||t;return r===i}return ey=e,ey}var ty,wA;function yN(){if(wA)return ty;wA=1;function t(e,r){return function(n){return e(r(n))}}return ty=t,ty}var ry,xA;function EF(){if(xA)return ry;xA=1;var t=yN(),e=t(Object.keys,Object);return ry=e,ry}var ny,_A;function AF(){if(_A)return ny;_A=1;var t=OF(),e=EF(),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 ny=i,ny}var iy,SA;function nc(){if(SA)return iy;SA=1;var t=Ex(),e=Ux();function r(n){return n!=null&&e(n.length)&&!t(n)}return iy=r,iy}var ay,kA;function Rh(){if(kA)return ay;kA=1;var t=kF(),e=AF(),r=nc();function n(i){return r(i)?t(i):e(i)}return ay=n,ay}var oy,OA;function PF(){if(OA)return oy;OA=1;var t=mF(),e=yF(),r=Rh();function n(i){return t(i,r,e)}return oy=n,oy}var sy,EA;function TF(){if(EA)return sy;EA=1;var t=PF(),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 O=p.get(a),A=p.get(s);if(O&&A)return O==s&&A==a;var T=!0;p.set(a,s),p.set(s,a);for(var E=h;++y<v;){S=g[y];var P=a[S],C=s[S];if(c)var $=h?c(C,P,S,s,a,p):c(P,C,S,a,s,p);if(!($===void 0?P===C||f(P,C,u,c,p):$)){T=!1;break}E||(E=S=="constructor")}if(T&&!E){var D=a.constructor,W=s.constructor;D!=W&&"constructor"in a&&"constructor"in s&&!(typeof D=="function"&&D instanceof D&&typeof W=="function"&&W instanceof W)&&(T=!1)}return p.delete(a),p.delete(s),T}return sy=i,sy}var ly,AA;function jF(){if(AA)return ly;AA=1;var t=io(),e=Wn(),r=t(e,"DataView");return ly=r,ly}var uy,PA;function CF(){if(PA)return uy;PA=1;var t=io(),e=Wn(),r=t(e,"Promise");return uy=r,uy}var cy,TA;function bN(){if(TA)return cy;TA=1;var t=io(),e=Wn(),r=t(e,"Set");return cy=r,cy}var fy,jA;function RF(){if(jA)return fy;jA=1;var t=io(),e=Wn(),r=t(e,"WeakMap");return fy=r,fy}var dy,CA;function NF(){if(CA)return dy;CA=1;var t=jF(),e=Px(),r=CF(),n=bN(),i=RF(),a=wi(),s=LR(),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),O=a;return(t&&O(new t(new ArrayBuffer(1)))!=g||e&&O(new e)!=u||r&&O(r.resolve())!=f||n&&O(new n)!=p||i&&O(new i)!=h)&&(O=function(A){var T=a(A),E=T==c?A.constructor:void 0,P=E?s(E):"";if(P)switch(P){case v:return g;case w:return u;case x:return f;case y:return p;case S:return h}return T}),dy=O,dy}var hy,RA;function $F(){if(RA)return hy;RA=1;var t=uN(),e=hN(),r=pF(),n=TF(),i=NF(),a=Er(),s=mN(),u=vN(),c=1,f="[object Arguments]",p="[object Array]",h="[object Object]",g=Object.prototype,v=g.hasOwnProperty;function w(x,y,S,O,A,T){var E=a(x),P=a(y),C=E?p:i(x),$=P?p:i(y);C=C==f?h:C,$=$==f?h:$;var D=C==h,W=$==h,N=C==$;if(N&&s(x)){if(!s(y))return!1;E=!0,D=!1}if(N&&!D)return T||(T=new t),E||u(x)?e(x,y,S,O,A,T):r(x,y,C,S,O,A,T);if(!(S&c)){var L=D&&v.call(x,"__wrapped__"),z=W&&v.call(y,"__wrapped__");if(L||z){var K=L?x.value():x,V=z?y.value():y;return T||(T=new t),A(K,V,S,O,T)}}return N?(T||(T=new t),n(x,y,S,O,A,T)):!1}return hy=w,hy}var py,NA;function Fx(){if(NA)return py;NA=1;var t=$F(),e=xi();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 py=r,py}var my,$A;function IF(){if($A)return my;$A=1;var t=uN(),e=Fx(),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 my=i,my}var gy,IA;function wN(){if(IA)return gy;IA=1;var t=oa();function e(r){return r===r&&!t(r)}return gy=e,gy}var vy,MA;function MF(){if(MA)return vy;MA=1;var t=wN(),e=Rh();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 vy=r,vy}var yy,LA;function xN(){if(LA)return yy;LA=1;function t(e,r){return function(n){return n==null?!1:n[e]===r&&(r!==void 0||e in Object(n))}}return yy=t,yy}var by,DA;function LF(){if(DA)return by;DA=1;var t=IF(),e=MF(),r=xN();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 by=n,by}var wy,BA;function DF(){if(BA)return wy;BA=1;function t(e,r){return e!=null&&r in Object(e)}return wy=t,wy}var xy,zA;function BF(){if(zA)return xy;zA=1;var t=zR(),e=zx(),r=Er(),n=qx(),i=Ux(),a=Ah();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 xy=s,xy}var _y,qA;function zF(){if(qA)return _y;qA=1;var t=DF(),e=BF();function r(n,i){return n!=null&&e(n,i,t)}return _y=r,_y}var Sy,UA;function qF(){if(UA)return Sy;UA=1;var t=Fx(),e=qR(),r=zF(),n=Ox(),i=wN(),a=xN(),s=Ah(),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 ky,FA;function Us(){if(FA)return ky;FA=1;function t(e){return e}return ky=t,ky}var Oy,HA;function UF(){if(HA)return Oy;HA=1;function t(e){return function(r){return r==null?void 0:r[e]}}return Oy=t,Oy}var Ey,WA;function FF(){if(WA)return Ey;WA=1;var t=Cx();function e(r){return function(n){return t(n,r)}}return Ey=e,Ey}var Ay,VA;function HF(){if(VA)return Ay;VA=1;var t=UF(),e=FF(),r=Ox(),n=Ah();function i(a){return r(a)?t(n(a)):e(a)}return Ay=i,Ay}var Py,KA;function Vn(){if(KA)return Py;KA=1;var t=LF(),e=qF(),r=Us(),n=Er(),i=HF();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 Py=a,Py}var Ty,GA;function _N(){if(GA)return Ty;GA=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 Ty=t,Ty}var jy,XA;function WF(){if(XA)return jy;XA=1;function t(e){return e!==e}return jy=t,jy}var Cy,YA;function VF(){if(YA)return Cy;YA=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 Cy=t,Cy}var Ry,JA;function KF(){if(JA)return Ry;JA=1;var t=_N(),e=WF(),r=VF();function n(i,a,s){return a===a?r(i,a,s):t(i,e,s)}return Ry=n,Ry}var Ny,QA;function GF(){if(QA)return Ny;QA=1;var t=KF();function e(r,n){var i=r==null?0:r.length;return!!i&&t(r,n,0)>-1}return Ny=e,Ny}var $y,ZA;function XF(){if(ZA)return $y;ZA=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 $y=t,$y}var Iy,eP;function YF(){if(eP)return Iy;eP=1;function t(){}return Iy=t,Iy}var My,tP;function JF(){if(tP)return My;tP=1;var t=bN(),e=YF(),r=Bx(),n=1/0,i=t&&1/r(new t([,-0]))[1]==n?function(a){return new t(a)}:e;return My=i,My}var Ly,rP;function QF(){if(rP)return Ly;rP=1;var t=cN(),e=GF(),r=XF(),n=dN(),i=JF(),a=Bx(),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 O=c[h],A=f?f(O):O;if(O=p||O!==0?O:0,w&&A===A){for(var T=y.length;T--;)if(y[T]===A)continue e;f&&y.push(A),x.push(O)}else g(y,A,p)||(y!==x&&y.push(A),x.push(O))}return x}return Ly=u,Ly}var Dy,nP;function ZF(){if(nP)return Dy;nP=1;var t=Vn(),e=QF();function r(n,i){return n&&n.length?e(n,t(i,2)):[]}return Dy=r,Dy}var e7=ZF();const iP=Je(e7);function SN(t,e,r){return e===!0?iP(t,r):$e(e)?iP(t,e):t}function us(t){"@babel/helpers - typeof";return us=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},us(t)}var t7=["ref"];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 ii(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){Nh(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 r7(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function oP(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 n7(t,e,r){return e&&oP(t.prototype,e),r&&oP(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function i7(t,e,r){return e=xd(e),a7(t,kN()?Reflect.construct(e,r||[],xd(t).constructor):e.apply(t,r))}function a7(t,e){if(e&&(us(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return o7(t)}function o7(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 xd(t){return xd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},xd(t)}function s7(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&&Vb(t,e)}function Vb(t,e){return Vb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Vb(t,e)}function Nh(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=l7(t,"string");return us(e)=="symbol"?e:e+""}function l7(t,e){if(us(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(us(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function u7(t,e){if(t==null)return{};var r=c7(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 c7(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 f7(t){return t.value}function d7(t,e){if(M.isValidElement(t))return M.cloneElement(t,e);if(typeof t=="function")return M.createElement(t,e);e.ref;var r=u7(e,t7);return M.createElement(Dx,r)}var sP=1,rs=(function(t){function e(){var r;r7(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=i7(this,e,[].concat(i)),Nh(r,"lastBoundingBox",{width:-1,height:-1}),r}return s7(e,t),n7(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)>sP||Math.abs(i.height-this.lastBoundingBox.height)>sP)&&(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?ii({},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 ii(ii({},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=ii(ii({position:"absolute",width:s||"auto",height:u||"auto"},this.getDefaultPosition(c)),c);return M.createElement("div",{className:"recharts-legend-wrapper",style:h,ref:function(v){n.wrapperNode=v}},d7(a,ii(ii({},this.props),{},{payload:SN(p,f,f7)})))}}],[{key:"getWithHeight",value:function(n,i){var a=ii(ii({},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}}])})(R.PureComponent);Nh(rs,"displayName","Legend");Nh(rs,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var By,lP;function h7(){if(lP)return By;lP=1;var t=rc(),e=zx(),r=Er(),n=t?t.isConcatSpreadable:void 0;function i(a){return r(a)||e(a)||!!(n&&a&&a[n])}return By=i,By}var zy,uP;function EN(){if(uP)return zy;uP=1;var t=pN(),e=h7();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 zy=r,zy}var qy,cP;function p7(){if(cP)return qy;cP=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 qy=t,qy}var Uy,fP;function m7(){if(fP)return Uy;fP=1;var t=p7(),e=t();return Uy=e,Uy}var Fy,dP;function AN(){if(dP)return Fy;dP=1;var t=m7(),e=Rh();function r(n,i){return n&&t(n,i,e)}return Fy=r,Fy}var Hy,hP;function g7(){if(hP)return Hy;hP=1;var t=nc();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 Hy=e,Hy}var Wy,pP;function Hx(){if(pP)return Wy;pP=1;var t=AN(),e=g7(),r=e(t);return Wy=r,Wy}var Vy,mP;function PN(){if(mP)return Vy;mP=1;var t=Hx(),e=nc();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 Vy=r,Vy}var Ky,gP;function v7(){if(gP)return Ky;gP=1;function t(e,r){var n=e.length;for(e.sort(r);n--;)e[n]=e[n].value;return e}return Ky=t,Ky}var Gy,vP;function y7(){if(vP)return Gy;vP=1;var t=Ds();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 Gy=e,Gy}var Xy,yP;function b7(){if(yP)return Xy;yP=1;var t=y7();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 Xy=e,Xy}var Yy,bP;function w7(){if(bP)return Yy;bP=1;var t=jx(),e=Cx(),r=Vn(),n=PN(),i=v7(),a=gN(),s=b7(),u=Us(),c=Er();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 O=t(h,function(A){return A(x)});return{criteria:O,index:++v,value:x}});return i(w,function(x,y){return s(x,y,g)})}return Yy=f,Yy}var Jy,wP;function x7(){if(wP)return Jy;wP=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 Jy=t,Jy}var Qy,xP;function _7(){if(xP)return Qy;xP=1;var t=x7(),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 Qy=r,Qy}var Zy,_P;function S7(){if(_P)return Zy;_P=1;function t(e){return function(){return e}}return Zy=t,Zy}var e0,SP;function TN(){if(SP)return e0;SP=1;var t=io(),e=(function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch{}})();return e0=e,e0}var t0,kP;function k7(){if(kP)return t0;kP=1;var t=S7(),e=TN(),r=Us(),n=e?function(i,a){return e(i,"toString",{configurable:!0,enumerable:!1,value:t(a),writable:!0})}:r;return t0=n,t0}var r0,OP;function O7(){if(OP)return r0;OP=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 r0=n,r0}var n0,EP;function E7(){if(EP)return n0;EP=1;var t=k7(),e=O7(),r=e(t);return n0=r,n0}var i0,AP;function A7(){if(AP)return i0;AP=1;var t=Us(),e=_7(),r=E7();function n(i,a){return r(e(i,a,t),i+"")}return i0=n,i0}var a0,PP;function $h(){if(PP)return a0;PP=1;var t=Ax(),e=nc(),r=qx(),n=oa();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 a0=i,a0}var o0,TP;function P7(){if(TP)return o0;TP=1;var t=EN(),e=w7(),r=A7(),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 o0=i,o0}var T7=P7();const Wx=Je(T7);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 Kb(){return Kb=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},Kb.apply(this,arguments)}function j7(t,e){return $7(t)||N7(t,e)||R7(t,e)||C7()}function C7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
418
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function R7(t,e){if(t){if(typeof t=="string")return jP(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 jP(t,e)}}function jP(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 N7(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 $7(t){if(Array.isArray(t))return t}function CP(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 s0(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?CP(Object(r),!0).forEach(function(n){I7(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):CP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function I7(t,e,r){return e=M7(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function M7(t){var e=L7(t,"string");return bu(e)=="symbol"?e:e+""}function L7(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 D7(t){return Array.isArray(t)&&Bt(t[0])&&Bt(t[1])?t.join(" ~ "):t}var B7=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,O=S===void 0?!1:S,A=function(){if(p&&p.length){var L={padding:0,margin:0},z=(g?Wx(p,g):p).map(function(K,V){if(K.type==="none")return null;var X=s0({display:"block",paddingTop:4,paddingBottom:4,color:K.color||"#000"},u),Q=K.formatter||h||D7,G=K.value,te=K.name,F=G,I=te;if(Q&&F!=null&&I!=null){var U=Q(G,te,K,V,p);if(Array.isArray(U)){var ee=j7(U,2);F=ee[0],I=ee[1]}else F=U}return M.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(V),style:X},Bt(I)?M.createElement("span",{className:"recharts-tooltip-item-name"},I):null,Bt(I)?M.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,M.createElement("span",{className:"recharts-tooltip-item-value"},F),M.createElement("span",{className:"recharts-tooltip-item-unit"},K.unit||""))});return M.createElement("ul",{className:"recharts-tooltip-item-list",style:L},z)}return null},T=s0({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),E=s0({margin:0},f),P=!Le(x),C=P?x:"",$=De("recharts-default-tooltip",v),D=De("recharts-tooltip-label",w);P&&y&&p!==void 0&&p!==null&&(C=y(x,p));var W=O?{role:"status","aria-live":"assertive"}:{};return M.createElement("div",Kb({className:$,style:T},W),M.createElement("p",{className:D,style:E},M.isValidElement(C)?C:"".concat(C)),A())};function wu(t){"@babel/helpers - typeof";return wu=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},wu(t)}function $f(t,e,r){return e=z7(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function z7(t){var e=q7(t,"string");return wu(e)=="symbol"?e:e+""}function q7(t,e){if(wu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(wu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Ll="recharts-tooltip-wrapper",U7={visibility:"hidden"};function F7(t){var e=t.coordinate,r=t.translateX,n=t.translateY;return De(Ll,$f($f($f($f({},"".concat(Ll,"-right"),fe(r)&&e&&fe(e.x)&&r>=e.x),"".concat(Ll,"-left"),fe(r)&&e&&fe(e.x)&&r<e.x),"".concat(Ll,"-bottom"),fe(n)&&e&&fe(e.y)&&n>=e.y),"".concat(Ll,"-top"),fe(n)&&e&&fe(e.y)&&n<e.y))}function RP(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 H7(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 W7(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=RP({allowEscapeViewBox:e,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:s.width,viewBox:c,viewBoxDimension:c.width}),h=RP({allowEscapeViewBox:e,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:s.height,viewBox:c,viewBoxDimension:c.height}),f=H7({translateX:p,translateY:h,useTranslate3d:u})):f=U7,{cssProperties:f,cssClasses:F7({translateX:p,translateY:h,coordinate:r})}}function cs(t){"@babel/helpers - typeof";return cs=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},cs(t)}function NP(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 $P(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?NP(Object(r),!0).forEach(function(n){Xb(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):NP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function V7(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function K7(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,CN(n.key),n)}}function G7(t,e,r){return e&&K7(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function X7(t,e,r){return e=_d(e),Y7(t,jN()?Reflect.construct(e,r||[],_d(t).constructor):e.apply(t,r))}function Y7(t,e){if(e&&(cs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return J7(t)}function J7(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function jN(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jN=function(){return!!t})()}function _d(t){return _d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},_d(t)}function Q7(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&&Gb(t,e)}function Gb(t,e){return Gb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Gb(t,e)}function Xb(t,e,r){return e=CN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function CN(t){var e=Z7(t,"string");return cs(e)=="symbol"?e:e+""}function Z7(t,e){if(cs(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(cs(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var IP=1,eH=(function(t){function e(){var r;V7(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=X7(this,e,[].concat(i)),Xb(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Xb(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 Q7(e,t),G7(e,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>IP||Math.abs(n.height-this.state.lastBoundingBox.height)>IP)&&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,O=i.wrapperStyle,A=W7({allowEscapeViewBox:s,coordinate:p,offsetTopLeft:v,position:w,reverseDirection:x,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:S}),T=A.cssClasses,E=A.cssProperties,P=$P($P({transition:g&&a?"transform ".concat(u,"ms ").concat(c):void 0},E),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&h?"visible":"hidden",position:"absolute",top:0,left:0},O);return M.createElement("div",{tabIndex:-1,className:T,style:P,ref:function($){n.wrapperNode=$}},f)}}])})(R.PureComponent),tH=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},ao={isSsr:tH()};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 MP(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 LP(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?MP(Object(r),!0).forEach(function(n){Vx(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):MP(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function rH(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nH(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,NN(n.key),n)}}function iH(t,e,r){return e&&nH(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function aH(t,e,r){return e=Sd(e),oH(t,RN()?Reflect.construct(e,r||[],Sd(t).constructor):e.apply(t,r))}function oH(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 sH(t)}function sH(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function RN(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(RN=function(){return!!t})()}function Sd(t){return Sd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Sd(t)}function lH(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&&Yb(t,e)}function Yb(t,e){return Yb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Yb(t,e)}function Vx(t,e,r){return e=NN(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function NN(t){var e=uH(t,"string");return fs(e)=="symbol"?e:e+""}function uH(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)}function cH(t){return t.dataKey}function fH(t,e){return M.isValidElement(t)?M.cloneElement(t,e):typeof t=="function"?M.createElement(t,e):M.createElement(B7,e)}var yn=(function(t){function e(){return rH(this,e),aH(this,e,arguments)}return lH(e,t),iH(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,O=i.useTranslate3d,A=i.viewBox,T=i.wrapperStyle,E=w??[];h&&E.length&&(E=SN(w.filter(function(C){return C.value!=null&&(C.hide!==!0||n.props.includeHidden)}),x,cH));var P=E.length>0;return M.createElement(eH,{allowEscapeViewBox:s,animationDuration:u,animationEasing:c,isAnimationActive:g,active:a,coordinate:p,hasPayload:P,offset:v,position:y,reverseDirection:S,useTranslate3d:O,viewBox:A,wrapperStyle:T},fH(f,LP(LP({},this.props),{},{payload:E})))}}])})(R.PureComponent);Vx(yn,"displayName","Tooltip");Vx(yn,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!ao.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 l0,DP;function dH(){if(DP)return l0;DP=1;var t=Wn(),e=function(){return t.Date.now()};return l0=e,l0}var u0,BP;function hH(){if(BP)return u0;BP=1;var t=/\s/;function e(r){for(var n=r.length;n--&&t.test(r.charAt(n)););return n}return u0=e,u0}var c0,zP;function pH(){if(zP)return c0;zP=1;var t=hH(),e=/^\s+/;function r(n){return n&&n.slice(0,t(n)+1).replace(e,"")}return c0=r,c0}var f0,qP;function $N(){if(qP)return f0;qP=1;var t=pH(),e=oa(),r=Ds(),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 f0=c,f0}var d0,UP;function mH(){if(UP)return d0;UP=1;var t=oa(),e=dH(),r=$N(),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,O=!1,A=!0;if(typeof u!="function")throw new TypeError(n);c=r(c)||0,t(f)&&(S=!!f.leading,O="maxWait"in f,g=O?i(r(f.maxWait)||0,c):g,A="trailing"in f?!!f.trailing:A);function T(z){var K=p,V=h;return p=h=void 0,y=z,v=u.apply(V,K),v}function E(z){return y=z,w=setTimeout($,c),S?T(z):v}function P(z){var K=z-x,V=z-y,X=c-K;return O?a(X,g-V):X}function C(z){var K=z-x,V=z-y;return x===void 0||K>=c||K<0||O&&V>=g}function $(){var z=e();if(C(z))return D(z);w=setTimeout($,P(z))}function D(z){return w=void 0,A&&p?T(z):(p=h=void 0,v)}function W(){w!==void 0&&clearTimeout(w),y=0,p=x=h=w=void 0}function N(){return w===void 0?v:D(e())}function L(){var z=e(),K=C(z);if(p=arguments,h=this,x=z,K){if(w===void 0)return E(x);if(O)return clearTimeout(w),w=setTimeout($,c),T(x)}return w===void 0&&(w=setTimeout($,c)),v}return L.cancel=W,L.flush=N,L}return d0=s,d0}var h0,FP;function gH(){if(FP)return h0;FP=1;var t=mH(),e=oa(),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 h0=n,h0}var vH=gH();const IN=Je(vH);function xu(t){"@babel/helpers - typeof";return xu=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},xu(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 If(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){yH(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 yH(t,e,r){return e=bH(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function bH(t){var e=wH(t,"string");return xu(e)=="symbol"?e:e+""}function wH(t,e){if(xu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(xu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function xH(t,e){return OH(t)||kH(t,e)||SH(t,e)||_H()}function _H(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
419
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SH(t,e){if(t){if(typeof t=="string")return WP(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 WP(t,e)}}function WP(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 kH(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 OH(t){if(Array.isArray(t))return t}var VP=R.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,O=t.onResize,A=t.style,T=A===void 0?{}:A,E=R.useRef(null),P=R.useRef();P.current=O,R.useImperativeHandle(e,function(){return Object.defineProperty(E.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),E.current},configurable:!0})});var C=R.useState({containerWidth:i.width,containerHeight:i.height}),$=xH(C,2),D=$[0],W=$[1],N=R.useCallback(function(z,K){W(function(V){var X=Math.round(z),Q=Math.round(K);return V.containerWidth===X&&V.containerHeight===Q?V:{containerWidth:X,containerHeight:Q}})},[]);R.useEffect(function(){var z=function(te){var F,I=te[0].contentRect,U=I.width,ee=I.height;N(U,ee),(F=P.current)===null||F===void 0||F.call(P,U,ee)};x>0&&(z=IN(z,x,{trailing:!0,leading:!1}));var K=new ResizeObserver(z),V=E.current.getBoundingClientRect(),X=V.width,Q=V.height;return N(X,Q),K.observe(E.current),function(){K.disconnect()}},[N,x]);var L=R.useMemo(function(){var z=D.containerWidth,K=D.containerHeight;if(z<0||K<0)return null;di(qa(s)||qa(c),`The width(%s) and height(%s) are both fixed numbers,
|
|
420
|
-
maybe you don't need to use a ResponsiveContainer.`,s,c),di(!r||r>0,"The aspect(%s) must be greater than zero.",r);var V=qa(s)?z:s,X=qa(c)?K:c;r&&r>0&&(V?X=V/r:X&&(V=X*r),g&&X>g&&(X=g)),di(V>0||X>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
421
|
-
please check the style of container, or the props width(%s) and height(%s),
|
|
422
|
-
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
423
|
-
height and width.`,V,X,s,c,p,h,r);var Q=!Array.isArray(v)&&fi(v.type).endsWith("Chart");return M.Children.map(v,function(G){return M.isValidElement(G)?R.cloneElement(G,If({width:V,height:X},Q?{style:If({height:"100%",width:"100%",maxHeight:X,maxWidth:V},G.props.style)}:{})):G})},[r,v,c,g,h,p,D,s]);return M.createElement("div",{id:y?"".concat(y):void 0,className:De("recharts-responsive-container",S),style:If(If({},T),{},{width:s,height:c,minWidth:p,minHeight:h,maxHeight:g}),ref:E},L)}),Ih=function(e){return null};Ih.displayName="Cell";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)}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 Jb(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){EH(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 EH(t,e,r){return e=AH(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function AH(t){var e=PH(t,"string");return _u(e)=="symbol"?e:e+""}function PH(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)}var zo={widthCache:{},cacheCount:0},TH=2e3,jH={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},GP="recharts_measurement_span";function CH(t){var e=Jb({},t);return Object.keys(e).forEach(function(r){e[r]||delete e[r]}),e}var iu=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e==null||ao.isSsr)return{width:0,height:0};var n=CH(r),i=JSON.stringify({text:e,copyStyle:n});if(zo.widthCache[i])return zo.widthCache[i];try{var a=document.getElementById(GP);a||(a=document.createElement("span"),a.setAttribute("id",GP),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var s=Jb(Jb({},jH),n);Object.assign(a.style,s),a.textContent="".concat(e);var u=a.getBoundingClientRect(),c={width:u.width,height:u.height};return zo.widthCache[i]=c,++zo.cacheCount>TH&&(zo.cacheCount=0,zo.widthCache={}),c}catch{return{width:0,height:0}}},RH=function(e){return{top:e.top+window.scrollY-document.documentElement.clientTop,left:e.left+window.scrollX-document.documentElement.clientLeft}};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 kd(t,e){return MH(t)||IH(t,e)||$H(t,e)||NH()}function NH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
424
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $H(t,e){if(t){if(typeof t=="string")return XP(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 XP(t,e)}}function XP(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 IH(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 MH(t){if(Array.isArray(t))return t}function LH(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function YP(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,BH(n.key),n)}}function DH(t,e,r){return e&&YP(t.prototype,e),r&&YP(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function BH(t){var e=zH(t,"string");return Su(e)=="symbol"?e:e+""}function zH(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 String(t)}var JP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,QP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,qH=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,UH=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,MN={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},FH=Object.keys(MN),Go="NaN";function HH(t,e){return t*MN[e]}var Mf=(function(){function t(e,r){LH(this,t),this.num=e,this.unit=r,this.num=e,this.unit=r,Number.isNaN(e)&&(this.unit=""),r!==""&&!qH.test(r)&&(this.num=NaN,this.unit=""),FH.includes(r)&&(this.num=HH(e,r),this.unit="px")}return DH(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=UH.exec(r))!==null&&n!==void 0?n:[],a=kd(i,3),s=a[1],u=a[2];return new t(parseFloat(s),u??"")}}])})();function LN(t){if(t.includes(Go))return Go;for(var e=t;e.includes("*")||e.includes("/");){var r,n=(r=JP.exec(e))!==null&&r!==void 0?r:[],i=kd(n,4),a=i[1],s=i[2],u=i[3],c=Mf.parse(a??""),f=Mf.parse(u??""),p=s==="*"?c.multiply(f):c.divide(f);if(p.isNaN())return Go;e=e.replace(JP,p.toString())}for(;e.includes("+")||/.-\d+(?:\.\d+)?/.test(e);){var h,g=(h=QP.exec(e))!==null&&h!==void 0?h:[],v=kd(g,4),w=v[1],x=v[2],y=v[3],S=Mf.parse(w??""),O=Mf.parse(y??""),A=x==="+"?S.add(O):S.subtract(O);if(A.isNaN())return Go;e=e.replace(QP,A.toString())}return e}var ZP=/\(([^()]*)\)/;function WH(t){for(var e=t;e.includes("(");){var r=ZP.exec(e),n=kd(r,2),i=n[1];e=e.replace(ZP,LN(i))}return e}function VH(t){var e=t.replace(/\s+/g,"");return e=WH(e),e=LN(e),e}function KH(t){try{return VH(t)}catch{return Go}}function p0(t){var e=KH(t.slice(5,-1));return e===Go?"":e}var GH=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],XH=["dx","dy","angle","className","breakAll"];function Qb(){return Qb=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},Qb.apply(this,arguments)}function eT(t,e){if(t==null)return{};var r=YH(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 YH(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 tT(t,e){return eW(t)||ZH(t,e)||QH(t,e)||JH()}function JH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
425
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QH(t,e){if(t){if(typeof t=="string")return rT(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 rT(t,e)}}function rT(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 ZH(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 eW(t){if(Array.isArray(t))return t}var DN=/[ \f\n\r\t\v\u2028\u2029]+/,BN=function(e){var r=e.children,n=e.breakAll,i=e.style;try{var a=[];Le(r)||(n?a=r.toString().split(""):a=r.toString().split(DN));var s=a.map(function(c){return{word:c,width:iu(c,i).width}}),u=n?0:iu(" ",i).width;return{wordsWithComputedWidth:s,spaceWidth:u}}catch{return null}},tW=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(X,Q){var G=Q.word,te=Q.width,F=X[X.length-1];if(F&&(i==null||a||F.width+te+n<Number(i)))F.words.push(G),F.width+=te+n;else{var I={words:[G],width:te};X.push(I)}return X},[])},v=g(r),w=function(V){return V.reduce(function(X,Q){return X.width>Q.width?X:Q})};if(!p)return v;for(var x="…",y=function(V){var X=h.slice(0,V),Q=BN({breakAll:f,style:c,children:X+x}).wordsWithComputedWidth,G=g(Q),te=G.length>s||w(G).width>Number(i);return[te,G]},S=0,O=h.length-1,A=0,T;S<=O&&A<=h.length-1;){var E=Math.floor((S+O)/2),P=E-1,C=y(P),$=tT(C,2),D=$[0],W=$[1],N=y(E),L=tT(N,1),z=L[0];if(!D&&!z&&(S=E+1),D&&z&&(O=E-1),!D&&z){T=W;break}A++}return T||v},nT=function(e){var r=Le(e)?[]:e.toString().split(DN);return[{words:r}]},rW=function(e){var r=e.width,n=e.scaleToFit,i=e.children,a=e.style,s=e.breakAll,u=e.maxLines;if((r||n)&&!ao.isSsr){var c,f,p=BN({breakAll:s,children:i,style:a});if(p){var h=p.wordsWithComputedWidth,g=p.spaceWidth;c=h,f=g}else return nT(i);return tW({breakAll:s,children:i,maxLines:u,style:a},c,f,r,n)}return nT(i)},iT="#808080",Za=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?iT:y,O=eT(e,GH),A=R.useMemo(function(){return rW({breakAll:O.breakAll,children:O.children,maxLines:O.maxLines,scaleToFit:h,style:O.style,width:O.width})},[O.breakAll,O.children,O.maxLines,h,O.style,O.width]),T=O.dx,E=O.dy,P=O.angle,C=O.className,$=O.breakAll,D=eT(O,XH);if(!Bt(n)||!Bt(a))return null;var W=n+(fe(T)?T:0),N=a+(fe(E)?E:0),L;switch(x){case"start":L=p0("calc(".concat(f,")"));break;case"middle":L=p0("calc(".concat((A.length-1)/2," * -").concat(u," + (").concat(f," / 2))"));break;default:L=p0("calc(".concat(A.length-1," * -").concat(u,")"));break}var z=[];if(h){var K=A[0].width,V=O.width;z.push("scale(".concat((fe(V)?V/K:1)/K,")"))}return P&&z.push("rotate(".concat(P,", ").concat(W,", ").concat(N,")")),z.length&&(D.transform=z.join(" ")),M.createElement("text",Qb({},Ee(D,!0),{x:W,y:N,className:De("recharts-text",C),textAnchor:v,fill:S.includes("url")?iT:S}),A.map(function(X,Q){var G=X.words.join($?"":" ");return M.createElement("tspan",{x:W,dy:Q===0?L:u,key:"".concat(G,"-").concat(Q)},G)}))};function ia(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function nW(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Kx(t){let e,r,n;t.length!==2?(e=ia,r=(u,c)=>ia(t(u),c),n=(u,c)=>t(u)-c):(e=t===ia||t===nW?t:iW,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 iW(){return 0}function zN(t){return t===null?NaN:+t}function*aW(t,e){for(let r of t)r!=null&&(r=+r)>=r&&(yield r)}const oW=Kx(ia),ic=oW.right;Kx(zN).center;class aT extends Map{constructor(e,r=uW){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(oT(this,e))}has(e){return super.has(oT(this,e))}set(e,r){return super.set(sW(this,e),r)}delete(e){return super.delete(lW(this,e))}}function oT({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):r}function sW({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function lW({_intern:t,_key:e},r){const n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function uW(t){return t!==null&&typeof t=="object"?t.valueOf():t}function cW(t=ia){if(t===ia)return qN;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 qN(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}const fW=Math.sqrt(50),dW=Math.sqrt(10),hW=Math.sqrt(2);function Od(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>=fW?10:a>=dW?5:a>=hW?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?Od(t,e,r*2):[u,c,f]}function Zb(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?Od(e,t,r):Od(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 ew(t,e,r){return e=+e,t=+t,r=+r,Od(t,e,r)[2]}function tw(t,e,r){e=+e,t=+t,r=+r;const n=e<t,i=n?ew(e,t,r):ew(t,e,r);return(n?-1:1)*(i<0?1/-i:i)}function sT(t,e){let r;for(const n of t)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function lT(t,e){let r;for(const n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function UN(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?qN:cW(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));UN(t,e,v,w,i)}const a=t[e];let s=r,u=n;for(Dl(t,r,e),i(t[n],a)>0&&Dl(t,r,n);s<u;){for(Dl(t,s,u),++s,--u;i(t[s],a)<0;)++s;for(;i(t[u],a)>0;)--u}i(t[r],a)===0?Dl(t,r,u):(++u,Dl(t,u,n)),u<=e&&(r=u+1),e<=u&&(n=u-1)}return t}function Dl(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function pW(t,e,r){if(t=Float64Array.from(aW(t)),!(!(n=t.length)||isNaN(e=+e))){if(e<=0||n<2)return lT(t);if(e>=1)return sT(t);var n,i=(n-1)*e,a=Math.floor(i),s=sT(UN(t,a).subarray(0,a+1)),u=lT(t.subarray(a+1));return s+(u-s)*(i-a)}}function mW(t,e,r=zN){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 gW(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 on(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function _i(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 rw=Symbol("implicit");function Gx(){var t=new aT,e=[],r=[],n=rw;function i(a){let s=t.get(a);if(s===void 0){if(n!==rw)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 aT;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 Gx(e,r).unknown(n)},on.apply(i,arguments),i}function ku(){var t=Gx().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=gW(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 ku(e(),[n,i]).round(u).paddingInner(c).paddingOuter(f).align(p)},on.apply(h(),arguments)}function FN(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return FN(e())},t}function au(){return FN(ku.apply(null,arguments).paddingInner(1))}function Xx(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function HN(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function ac(){}var Ou=.7,Ed=1/Ou,ns="\\s*([+-]?\\d+)\\s*",Eu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",vW=/^#([0-9a-f]{3,8})$/,yW=new RegExp(`^rgb\\(${ns},${ns},${ns}\\)$`),bW=new RegExp(`^rgb\\(${qn},${qn},${qn}\\)$`),wW=new RegExp(`^rgba\\(${ns},${ns},${ns},${Eu}\\)$`),xW=new RegExp(`^rgba\\(${qn},${qn},${qn},${Eu}\\)$`),_W=new RegExp(`^hsl\\(${Eu},${qn},${qn}\\)$`),SW=new RegExp(`^hsla\\(${Eu},${qn},${qn},${Eu}\\)$`),uT={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};Xx(ac,Au,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:cT,formatHex:cT,formatHex8:kW,formatHsl:OW,formatRgb:fT,toString:fT});function cT(){return this.rgb().formatHex()}function kW(){return this.rgb().formatHex8()}function OW(){return WN(this).formatHsl()}function fT(){return this.rgb().formatRgb()}function Au(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=vW.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?dT(e):r===3?new Or(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?Lf(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?Lf(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=yW.exec(t))?new Or(e[1],e[2],e[3],1):(e=bW.exec(t))?new Or(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=wW.exec(t))?Lf(e[1],e[2],e[3],e[4]):(e=xW.exec(t))?Lf(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=_W.exec(t))?mT(e[1],e[2]/100,e[3]/100,1):(e=SW.exec(t))?mT(e[1],e[2]/100,e[3]/100,e[4]):uT.hasOwnProperty(t)?dT(uT[t]):t==="transparent"?new Or(NaN,NaN,NaN,0):null}function dT(t){return new Or(t>>16&255,t>>8&255,t&255,1)}function Lf(t,e,r,n){return n<=0&&(t=e=r=NaN),new Or(t,e,r,n)}function EW(t){return t instanceof ac||(t=Au(t)),t?(t=t.rgb(),new Or(t.r,t.g,t.b,t.opacity)):new Or}function nw(t,e,r,n){return arguments.length===1?EW(t):new Or(t,e,r,n??1)}function Or(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}Xx(Or,nw,HN(ac,{brighter(t){return t=t==null?Ed:Math.pow(Ed,t),new Or(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Ou:Math.pow(Ou,t),new Or(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Or(Ka(this.r),Ka(this.g),Ka(this.b),Ad(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:hT,formatHex:hT,formatHex8:AW,formatRgb:pT,toString:pT}));function hT(){return`#${Ua(this.r)}${Ua(this.g)}${Ua(this.b)}`}function AW(){return`#${Ua(this.r)}${Ua(this.g)}${Ua(this.b)}${Ua((isNaN(this.opacity)?1:this.opacity)*255)}`}function pT(){const t=Ad(this.opacity);return`${t===1?"rgb(":"rgba("}${Ka(this.r)}, ${Ka(this.g)}, ${Ka(this.b)}${t===1?")":`, ${t})`}`}function Ad(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ka(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ua(t){return t=Ka(t),(t<16?"0":"")+t.toString(16)}function mT(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Sn(t,e,r,n)}function WN(t){if(t instanceof Sn)return new Sn(t.h,t.s,t.l,t.opacity);if(t instanceof ac||(t=Au(t)),!t)return new Sn;if(t instanceof Sn)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 Sn(s,u,c,t.opacity)}function PW(t,e,r,n){return arguments.length===1?WN(t):new Sn(t,e,r,n??1)}function Sn(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}Xx(Sn,PW,HN(ac,{brighter(t){return t=t==null?Ed:Math.pow(Ed,t),new Sn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Ou:Math.pow(Ou,t),new Sn(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 Or(m0(t>=240?t-240:t+120,i,n),m0(t,i,n),m0(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new Sn(gT(this.h),Df(this.s),Df(this.l),Ad(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=Ad(this.opacity);return`${t===1?"hsl(":"hsla("}${gT(this.h)}, ${Df(this.s)*100}%, ${Df(this.l)*100}%${t===1?")":`, ${t})`}`}}));function gT(t){return t=(t||0)%360,t<0?t+360:t}function Df(t){return Math.max(0,Math.min(1,t||0))}function m0(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 Yx=t=>()=>t;function TW(t,e){return function(r){return t+r*e}}function jW(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 CW(t){return(t=+t)==1?VN:function(e,r){return r-e?jW(e,r,t):Yx(isNaN(e)?r:e)}}function VN(t,e){var r=e-t;return r?TW(t,r):Yx(isNaN(t)?e:t)}const vT=(function t(e){var r=CW(e);function n(i,a){var s=r((i=nw(i)).r,(a=nw(a)).r),u=r(i.g,a.g),c=r(i.b,a.b),f=VN(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 RW(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 NW(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function $W(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]=Fs(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 IW(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}function Pd(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function MW(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]=Fs(t[i],e[i]):n[i]=e[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var iw=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,g0=new RegExp(iw.source,"g");function LW(t){return function(){return t}}function DW(t){return function(e){return t(e)+""}}function BW(t,e){var r=iw.lastIndex=g0.lastIndex=0,n,i,a,s=-1,u=[],c=[];for(t=t+"",e=e+"";(n=iw.exec(t))&&(i=g0.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:Pd(n,i)})),r=g0.lastIndex;return r<e.length&&(a=e.slice(r),u[s]?u[s]+=a:u[++s]=a),u.length<2?c[0]?DW(c[0].x):LW(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 Fs(t,e){var r=typeof e,n;return e==null||r==="boolean"?Yx(e):(r==="number"?Pd:r==="string"?(n=Au(e))?(e=n,vT):BW:e instanceof Au?vT:e instanceof Date?IW:NW(e)?RW:Array.isArray(e)?$W:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?MW:Pd)(t,e)}function Jx(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}function zW(t,e){e===void 0&&(e=t,t=Fs);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 qW(t){return function(){return t}}function Td(t){return+t}var yT=[0,1];function pr(t){return t}function aw(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:qW(isNaN(e)?NaN:.5)}function UW(t,e){var r;return t>e&&(r=t,t=e,e=r),function(n){return Math.max(t,Math.min(e,n))}}function FW(t,e,r){var n=t[0],i=t[1],a=e[0],s=e[1];return i<n?(n=aw(i,n),a=r(s,a)):(n=aw(n,i),a=r(a,s)),function(u){return a(n(u))}}function HW(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]=aw(t[s],t[s+1]),a[s]=r(e[s],e[s+1]);return function(u){var c=ic(t,u,1,n)-1;return a[c](i[c](u))}}function oc(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Mh(){var t=yT,e=yT,r=Fs,n,i,a,s=pr,u,c,f;function p(){var g=Math.min(t.length,e.length);return s!==pr&&(s=UW(t[0],t[g-1])),u=g>2?HW:FW,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),Pd)))(g)))},h.domain=function(g){return arguments.length?(t=Array.from(g,Td),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=Jx,p()},h.clamp=function(g){return arguments.length?(s=g?!0:pr,p()):s!==pr},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 Qx(){return Mh()(pr,pr)}function WW(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function jd(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 ds(t){return t=jd(Math.abs(t)),t?t[1]:NaN}function VW(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 KW(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var GW=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Pu(t){if(!(e=GW.exec(t)))throw new Error("invalid format: "+t);var e;return new Zx({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]})}Pu.prototype=Zx.prototype;function Zx(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+""}Zx.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 XW(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 Cd;function YW(t,e){var r=jd(t,e);if(!r)return Cd=void 0,t.toPrecision(e);var n=r[0],i=r[1],a=i-(Cd=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")+jd(t,Math.max(0,e+a-1))[0]}function bT(t,e){var r=jd(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 wT={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:WW,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)=>bT(t*100,e),r:bT,s:YW,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function xT(t){return t}var _T=Array.prototype.map,ST=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function JW(t){var e=t.grouping===void 0||t.thousands===void 0?xT:VW(_T.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?xT:KW(_T.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=Pu(h);var v=h.fill,w=h.align,x=h.sign,y=h.symbol,S=h.zero,O=h.width,A=h.comma,T=h.precision,E=h.trim,P=h.type;P==="n"?(A=!0,P="g"):wT[P]||(T===void 0&&(T=12),E=!0,P="g"),(S||v==="0"&&w==="=")&&(S=!0,v="0",w="=");var C=(g&&g.prefix!==void 0?g.prefix:"")+(y==="$"?r:y==="#"&&/[boxX]/.test(P)?"0"+P.toLowerCase():""),$=(y==="$"?n:/[%p]/.test(P)?s:"")+(g&&g.suffix!==void 0?g.suffix:""),D=wT[P],W=/[defgprs%]/.test(P);T=T===void 0?6:/[gprs]/.test(P)?Math.max(1,Math.min(21,T)):Math.max(0,Math.min(20,T));function N(L){var z=C,K=$,V,X,Q;if(P==="c")K=D(L)+K,L="";else{L=+L;var G=L<0||1/L<0;if(L=isNaN(L)?c:D(Math.abs(L),T),E&&(L=XW(L)),G&&+L==0&&x!=="+"&&(G=!1),z=(G?x==="("?x:u:x==="-"||x==="("?"":x)+z,K=(P==="s"&&!isNaN(L)&&Cd!==void 0?ST[8+Cd/3]:"")+K+(G&&x==="("?")":""),W){for(V=-1,X=L.length;++V<X;)if(Q=L.charCodeAt(V),48>Q||Q>57){K=(Q===46?i+L.slice(V+1):L.slice(V))+K,L=L.slice(0,V);break}}}A&&!S&&(L=e(L,1/0));var te=z.length+L.length+K.length,F=te<O?new Array(O-te+1).join(v):"";switch(A&&S&&(L=e(F+L,F.length?O-K.length:1/0),F=""),w){case"<":L=z+L+K+F;break;case"=":L=z+F+L+K;break;case"^":L=F.slice(0,te=F.length>>1)+z+L+K+F.slice(te);break;default:L=F+z+L+K;break}return a(L)}return N.toString=function(){return h+""},N}function p(h,g){var v=Math.max(-8,Math.min(8,Math.floor(ds(g)/3)))*3,w=Math.pow(10,-v),x=f((h=Pu(h),h.type="f",h),{suffix:ST[8+v/3]});return function(y){return x(w*y)}}return{format:f,formatPrefix:p}}var Bf,e1,KN;QW({thousands:",",grouping:[3],currency:["$",""]});function QW(t){return Bf=JW(t),e1=Bf.format,KN=Bf.formatPrefix,Bf}function ZW(t){return Math.max(0,-ds(Math.abs(t)))}function eV(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ds(e)/3)))*3-ds(Math.abs(t)))}function tV(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,ds(e)-ds(t))+1}function GN(t,e,r,n){var i=tw(t,e,r),a;switch(n=Pu(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return n.precision==null&&!isNaN(a=eV(i,s))&&(n.precision=a),KN(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=tV(i,Math.max(Math.abs(t),Math.abs(e))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=ZW(i))&&(n.precision=a-(n.type==="%")*2);break}}return e1(n)}function sa(t){var e=t.domain;return t.ticks=function(r){var n=e();return Zb(n[0],n[n.length-1],r??10)},t.tickFormat=function(r,n){var i=e();return GN(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=ew(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 Rd(){var t=Qx();return t.copy=function(){return oc(t,Rd())},on.apply(t,arguments),sa(t)}function XN(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,Td),r):t.slice()},r.unknown=function(n){return arguments.length?(e=n,r):e},r.copy=function(){return XN(t).unknown(e)},t=arguments.length?Array.from(t,Td):[0,1],sa(r)}function YN(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 kT(t){return Math.log(t)}function OT(t){return Math.exp(t)}function rV(t){return-Math.log(-t)}function nV(t){return-Math.exp(-t)}function iV(t){return isFinite(t)?+("1e"+t):t<0?0:t}function aV(t){return t===10?iV:t===Math.E?Math.exp:e=>Math.pow(t,e)}function oV(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 ET(t){return(e,r)=>-t(-e,r)}function t1(t){const e=t(kT,OT),r=e.domain;let n=10,i,a;function s(){return i=oV(n),a=aV(n),r()[0]<0?(i=ET(i),a=ET(a),t(rV,nV)):t(kT,OT),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=Zb(f,p,y))}else S=Zb(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=Pu(c)).precision==null&&(c.trim=!0),c=e1(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(YN(r(),{floor:u=>a(Math.floor(i(u))),ceil:u=>a(Math.ceil(i(u)))})),e}function JN(){const t=t1(Mh()).domain([1,10]);return t.copy=()=>oc(t,JN()).base(t.base()),on.apply(t,arguments),t}function AT(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function PT(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function r1(t){var e=1,r=t(AT(e),PT(e));return r.constant=function(n){return arguments.length?t(AT(e=+n),PT(e)):e},sa(r)}function QN(){var t=r1(Mh());return t.copy=function(){return oc(t,QN()).constant(t.constant())},on.apply(t,arguments)}function TT(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function sV(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function lV(t){return t<0?-t*t:t*t}function n1(t){var e=t(pr,pr),r=1;function n(){return r===1?t(pr,pr):r===.5?t(sV,lV):t(TT(r),TT(1/r))}return e.exponent=function(i){return arguments.length?(r=+i,n()):r},sa(e)}function i1(){var t=n1(Mh());return t.copy=function(){return oc(t,i1()).exponent(t.exponent())},on.apply(t,arguments),t}function uV(){return i1.apply(null,arguments).exponent(.5)}function jT(t){return Math.sign(t)*t*t}function cV(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function ZN(){var t=Qx(),e=[0,1],r=!1,n;function i(a){var s=cV(t(a));return isNaN(s)?n:r?Math.round(s):s}return i.invert=function(a){return t.invert(jT(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,Td)).map(jT)),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 ZN(t.domain(),e).round(r).clamp(t.clamp()).unknown(n)},on.apply(i,arguments),sa(i)}function e$(){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]=mW(t,s/u);return a}function a(s){return s==null||isNaN(s=+s)?n:e[ic(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(ia),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 e$().domain(t).range(e).unknown(n)},on.apply(a,arguments)}function t$(){var t=0,e=1,r=1,n=[.5],i=[0,1],a;function s(c){return c!=null&&c<=c?i[ic(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 t$().domain([t,e]).range(i).unknown(a)},on.apply(sa(s),arguments)}function r$(){var t=[.5],e=[0,1],r,n=1;function i(a){return a!=null&&a<=a?e[ic(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 r$().domain(t).range(e).unknown(r)},on.apply(i,arguments)}const v0=new Date,y0=new Date;function zt(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=>zt(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)=>(v0.setTime(+a),y0.setTime(+s),t(v0),t(y0),Math.floor(r(v0,y0))),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 Nd=zt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Nd.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?zt(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):Nd);Nd.range;const ui=1e3,tn=ui*60,ci=tn*60,gi=ci*24,a1=gi*7,CT=gi*30,b0=gi*365,Fa=zt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*ui)},(t,e)=>(e-t)/ui,t=>t.getUTCSeconds());Fa.range;const o1=zt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ui)},(t,e)=>{t.setTime(+t+e*tn)},(t,e)=>(e-t)/tn,t=>t.getMinutes());o1.range;const s1=zt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*tn)},(t,e)=>(e-t)/tn,t=>t.getUTCMinutes());s1.range;const l1=zt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ui-t.getMinutes()*tn)},(t,e)=>{t.setTime(+t+e*ci)},(t,e)=>(e-t)/ci,t=>t.getHours());l1.range;const u1=zt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*ci)},(t,e)=>(e-t)/ci,t=>t.getUTCHours());u1.range;const sc=zt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*tn)/gi,t=>t.getDate()-1);sc.range;const Lh=zt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/gi,t=>t.getUTCDate()-1);Lh.range;const n$=zt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/gi,t=>Math.floor(t/gi));n$.range;function oo(t){return zt(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())*tn)/a1)}const Dh=oo(0),$d=oo(1),fV=oo(2),dV=oo(3),hs=oo(4),hV=oo(5),pV=oo(6);Dh.range;$d.range;fV.range;dV.range;hs.range;hV.range;pV.range;function so(t){return zt(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)/a1)}const Bh=so(0),Id=so(1),mV=so(2),gV=so(3),ps=so(4),vV=so(5),yV=so(6);Bh.range;Id.range;mV.range;gV.range;ps.range;vV.range;yV.range;const c1=zt(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());c1.range;const f1=zt(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());f1.range;const vi=zt(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());vi.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:zt(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)});vi.range;const yi=zt(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());yi.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:zt(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)});yi.range;function i$(t,e,r,n,i,a){const s=[[Fa,1,ui],[Fa,5,5*ui],[Fa,15,15*ui],[Fa,30,30*ui],[a,1,tn],[a,5,5*tn],[a,15,15*tn],[a,30,30*tn],[i,1,ci],[i,3,3*ci],[i,6,6*ci],[i,12,12*ci],[n,1,gi],[n,2,2*gi],[r,1,a1],[e,1,CT],[e,3,3*CT],[t,1,b0]];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=Kx(([,,y])=>y).right(s,g);if(v===s.length)return t.every(tw(f/b0,p/b0,h));if(v===0)return Nd.every(Math.max(tw(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[bV,wV]=i$(yi,f1,Bh,n$,u1,s1),[xV,_V]=i$(vi,c1,Dh,sc,l1,o1);function w0(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 x0(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 Bl(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function SV(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=zl(i),p=ql(i),h=zl(a),g=ql(a),v=zl(s),w=ql(s),x=zl(u),y=ql(u),S=zl(c),O=ql(c),A={a:Q,A:G,b:te,B:F,c:null,d:LT,e:LT,f:VV,g:rK,G:iK,H:FV,I:HV,j:WV,L:a$,m:KV,M:GV,p:I,q:U,Q:zT,s:qT,S:XV,u:YV,U:JV,V:QV,w:ZV,W:eK,x:null,X:null,y:tK,Y:nK,Z:aK,"%":BT},T={a:ee,A:se,b:ue,B:de,c:null,d:DT,e:DT,f:uK,g:bK,G:xK,H:oK,I:sK,j:lK,L:s$,m:cK,M:fK,p:Re,q:pe,Q:zT,s:qT,S:dK,u:hK,U:pK,V:mK,w:gK,W:vK,x:null,X:null,y:yK,Y:wK,Z:_K,"%":BT},E={a:W,A:N,b:L,B:z,c:K,d:IT,e:IT,f:BV,g:$T,G:NT,H:MT,I:MT,j:IV,L:DV,m:$V,M:MV,p:D,q:NV,Q:qV,s:UV,S:LV,u:PV,U:TV,V:jV,w:AV,W:CV,x:V,X,y:$T,Y:NT,Z:RV,"%":zV};A.x=P(r,A),A.X=P(n,A),A.c=P(e,A),T.x=P(r,T),T.X=P(n,T),T.c=P(e,T);function P(ne,_e){return function(Oe){var ie=[],He=-1,Ne=0,dt=ne.length,st,ht,mr;for(Oe instanceof Date||(Oe=new Date(+Oe));++He<dt;)ne.charCodeAt(He)===37&&(ie.push(ne.slice(Ne,He)),(ht=RT[st=ne.charAt(++He)])!=null?st=ne.charAt(++He):ht=st==="e"?" ":"0",(mr=_e[st])&&(st=mr(Oe,ht)),ie.push(st),Ne=He+1);return ie.push(ne.slice(Ne,He)),ie.join("")}}function C(ne,_e){return function(Oe){var ie=Bl(1900,void 0,1),He=$(ie,ne,Oe+="",0),Ne,dt;if(He!=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?(Ne=x0(Bl(ie.y,0,1)),dt=Ne.getUTCDay(),Ne=dt>4||dt===0?Id.ceil(Ne):Id(Ne),Ne=Lh.offset(Ne,(ie.V-1)*7),ie.y=Ne.getUTCFullYear(),ie.m=Ne.getUTCMonth(),ie.d=Ne.getUTCDate()+(ie.w+6)%7):(Ne=w0(Bl(ie.y,0,1)),dt=Ne.getDay(),Ne=dt>4||dt===0?$d.ceil(Ne):$d(Ne),Ne=sc.offset(Ne,(ie.V-1)*7),ie.y=Ne.getFullYear(),ie.m=Ne.getMonth(),ie.d=Ne.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),dt="Z"in ie?x0(Bl(ie.y,0,1)).getUTCDay():w0(Bl(ie.y,0,1)).getDay(),ie.m=0,ie.d="W"in ie?(ie.w+6)%7+ie.W*7-(dt+5)%7:ie.w+ie.U*7-(dt+6)%7);return"Z"in ie?(ie.H+=ie.Z/100|0,ie.M+=ie.Z%100,x0(ie)):w0(ie)}}function $(ne,_e,Oe,ie){for(var He=0,Ne=_e.length,dt=Oe.length,st,ht;He<Ne;){if(ie>=dt)return-1;if(st=_e.charCodeAt(He++),st===37){if(st=_e.charAt(He++),ht=E[st in RT?_e.charAt(He++):st],!ht||(ie=ht(ne,Oe,ie))<0)return-1}else if(st!=Oe.charCodeAt(ie++))return-1}return ie}function D(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 W(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 N(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 L(ne,_e,Oe){var ie=S.exec(_e.slice(Oe));return ie?(ne.m=O.get(ie[0].toLowerCase()),Oe+ie[0].length):-1}function z(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 K(ne,_e,Oe){return $(ne,e,_e,Oe)}function V(ne,_e,Oe){return $(ne,r,_e,Oe)}function X(ne,_e,Oe){return $(ne,n,_e,Oe)}function Q(ne){return s[ne.getDay()]}function G(ne){return a[ne.getDay()]}function te(ne){return c[ne.getMonth()]}function F(ne){return u[ne.getMonth()]}function I(ne){return i[+(ne.getHours()>=12)]}function U(ne){return 1+~~(ne.getMonth()/3)}function ee(ne){return s[ne.getUTCDay()]}function se(ne){return a[ne.getUTCDay()]}function ue(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=P(ne+="",A);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=P(ne+="",T);return _e.toString=function(){return ne},_e},utcParse:function(ne){var _e=C(ne+="",!0);return _e.toString=function(){return ne},_e}}}var RT={"-":"",_:" ",0:"0"},Gt=/^\s*\d+/,kV=/^%/,OV=/[\\^$*+?|[\]().{}]/g;function Ke(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 EV(t){return t.replace(OV,"\\$&")}function zl(t){return new RegExp("^(?:"+t.map(EV).join("|")+")","i")}function ql(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}function AV(t,e,r){var n=Gt.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function PV(t,e,r){var n=Gt.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function TV(t,e,r){var n=Gt.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function jV(t,e,r){var n=Gt.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function CV(t,e,r){var n=Gt.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function NT(t,e,r){var n=Gt.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function $T(t,e,r){var n=Gt.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function RV(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 NV(t,e,r){var n=Gt.exec(e.slice(r,r+1));return n?(t.q=n[0]*3-3,r+n[0].length):-1}function $V(t,e,r){var n=Gt.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function IT(t,e,r){var n=Gt.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function IV(t,e,r){var n=Gt.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function MT(t,e,r){var n=Gt.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function MV(t,e,r){var n=Gt.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function LV(t,e,r){var n=Gt.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function DV(t,e,r){var n=Gt.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function BV(t,e,r){var n=Gt.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function zV(t,e,r){var n=kV.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function qV(t,e,r){var n=Gt.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function UV(t,e,r){var n=Gt.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function LT(t,e){return Ke(t.getDate(),e,2)}function FV(t,e){return Ke(t.getHours(),e,2)}function HV(t,e){return Ke(t.getHours()%12||12,e,2)}function WV(t,e){return Ke(1+sc.count(vi(t),t),e,3)}function a$(t,e){return Ke(t.getMilliseconds(),e,3)}function VV(t,e){return a$(t,e)+"000"}function KV(t,e){return Ke(t.getMonth()+1,e,2)}function GV(t,e){return Ke(t.getMinutes(),e,2)}function XV(t,e){return Ke(t.getSeconds(),e,2)}function YV(t){var e=t.getDay();return e===0?7:e}function JV(t,e){return Ke(Dh.count(vi(t)-1,t),e,2)}function o$(t){var e=t.getDay();return e>=4||e===0?hs(t):hs.ceil(t)}function QV(t,e){return t=o$(t),Ke(hs.count(vi(t),t)+(vi(t).getDay()===4),e,2)}function ZV(t){return t.getDay()}function eK(t,e){return Ke($d.count(vi(t)-1,t),e,2)}function tK(t,e){return Ke(t.getFullYear()%100,e,2)}function rK(t,e){return t=o$(t),Ke(t.getFullYear()%100,e,2)}function nK(t,e){return Ke(t.getFullYear()%1e4,e,4)}function iK(t,e){var r=t.getDay();return t=r>=4||r===0?hs(t):hs.ceil(t),Ke(t.getFullYear()%1e4,e,4)}function aK(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Ke(e/60|0,"0",2)+Ke(e%60,"0",2)}function DT(t,e){return Ke(t.getUTCDate(),e,2)}function oK(t,e){return Ke(t.getUTCHours(),e,2)}function sK(t,e){return Ke(t.getUTCHours()%12||12,e,2)}function lK(t,e){return Ke(1+Lh.count(yi(t),t),e,3)}function s$(t,e){return Ke(t.getUTCMilliseconds(),e,3)}function uK(t,e){return s$(t,e)+"000"}function cK(t,e){return Ke(t.getUTCMonth()+1,e,2)}function fK(t,e){return Ke(t.getUTCMinutes(),e,2)}function dK(t,e){return Ke(t.getUTCSeconds(),e,2)}function hK(t){var e=t.getUTCDay();return e===0?7:e}function pK(t,e){return Ke(Bh.count(yi(t)-1,t),e,2)}function l$(t){var e=t.getUTCDay();return e>=4||e===0?ps(t):ps.ceil(t)}function mK(t,e){return t=l$(t),Ke(ps.count(yi(t),t)+(yi(t).getUTCDay()===4),e,2)}function gK(t){return t.getUTCDay()}function vK(t,e){return Ke(Id.count(yi(t)-1,t),e,2)}function yK(t,e){return Ke(t.getUTCFullYear()%100,e,2)}function bK(t,e){return t=l$(t),Ke(t.getUTCFullYear()%100,e,2)}function wK(t,e){return Ke(t.getUTCFullYear()%1e4,e,4)}function xK(t,e){var r=t.getUTCDay();return t=r>=4||r===0?ps(t):ps.ceil(t),Ke(t.getUTCFullYear()%1e4,e,4)}function _K(){return"+0000"}function BT(){return"%"}function zT(t){return+t}function qT(t){return Math.floor(+t/1e3)}var qo,u$,c$;SK({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 SK(t){return qo=SV(t),u$=qo.format,qo.parse,c$=qo.utcFormat,qo.utcParse,qo}function kK(t){return new Date(t)}function OK(t){return t instanceof Date?+t:+new Date(+t)}function d1(t,e,r,n,i,a,s,u,c,f){var p=Qx(),h=p.invert,g=p.domain,v=f(".%L"),w=f(":%S"),x=f("%I:%M"),y=f("%I %p"),S=f("%a %d"),O=f("%b %d"),A=f("%B"),T=f("%Y");function E(P){return(c(P)<P?v:u(P)<P?w:s(P)<P?x:a(P)<P?y:n(P)<P?i(P)<P?S:O:r(P)<P?A:T)(P)}return p.invert=function(P){return new Date(h(P))},p.domain=function(P){return arguments.length?g(Array.from(P,OK)):g().map(kK)},p.ticks=function(P){var C=g();return t(C[0],C[C.length-1],P??10)},p.tickFormat=function(P,C){return C==null?E:f(C)},p.nice=function(P){var C=g();return(!P||typeof P.range!="function")&&(P=e(C[0],C[C.length-1],P??10)),P?g(YN(C,P)):p},p.copy=function(){return oc(p,d1(t,e,r,n,i,a,s,u,c,f))},p}function EK(){return on.apply(d1(xV,_V,vi,c1,Dh,sc,l1,o1,Fa,u$).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function AK(){return on.apply(d1(bV,wV,yi,f1,Bh,Lh,u1,s1,Fa,c$).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function zh(){var t=0,e=1,r,n,i,a,s=pr,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(Fs),f.rangeRound=p(Jx),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 la(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function f$(){var t=sa(zh()(pr));return t.copy=function(){return la(t,f$())},_i.apply(t,arguments)}function d$(){var t=t1(zh()).domain([1,10]);return t.copy=function(){return la(t,d$()).base(t.base())},_i.apply(t,arguments)}function h$(){var t=r1(zh());return t.copy=function(){return la(t,h$()).constant(t.constant())},_i.apply(t,arguments)}function h1(){var t=n1(zh());return t.copy=function(){return la(t,h1()).exponent(t.exponent())},_i.apply(t,arguments)}function PK(){return h1.apply(null,arguments).exponent(.5)}function p$(){var t=[],e=pr;function r(n){if(n!=null&&!isNaN(n=+n))return e((ic(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(ia),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)=>pW(t,a/n))},r.copy=function(){return p$(e).domain(t)},_i.apply(r,arguments)}function qh(){var t=0,e=.5,r=1,n=1,i,a,s,u,c,f=pr,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,O,A;return arguments.length?([S,O,A]=y,f=zW(x,[S,O,A]),v):[f(0),f(.5),f(1)]}}return v.range=w(Fs),v.rangeRound=w(Jx),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 m$(){var t=sa(qh()(pr));return t.copy=function(){return la(t,m$())},_i.apply(t,arguments)}function g$(){var t=t1(qh()).domain([.1,1,10]);return t.copy=function(){return la(t,g$()).base(t.base())},_i.apply(t,arguments)}function v$(){var t=r1(qh());return t.copy=function(){return la(t,v$()).constant(t.constant())},_i.apply(t,arguments)}function p1(){var t=n1(qh());return t.copy=function(){return la(t,p1()).exponent(t.exponent())},_i.apply(t,arguments)}function TK(){return p1.apply(null,arguments).exponent(.5)}const UT=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:ku,scaleDiverging:m$,scaleDivergingLog:g$,scaleDivergingPow:p1,scaleDivergingSqrt:TK,scaleDivergingSymlog:v$,scaleIdentity:XN,scaleImplicit:rw,scaleLinear:Rd,scaleLog:JN,scaleOrdinal:Gx,scalePoint:au,scalePow:i1,scaleQuantile:e$,scaleQuantize:t$,scaleRadial:ZN,scaleSequential:f$,scaleSequentialLog:d$,scaleSequentialPow:h1,scaleSequentialQuantile:p$,scaleSequentialSqrt:PK,scaleSequentialSymlog:h$,scaleSqrt:uV,scaleSymlog:QN,scaleThreshold:r$,scaleTime:EK,scaleUtc:AK,tickFormat:GN},Symbol.toStringTag,{value:"Module"}));var _0,FT;function Uh(){if(FT)return _0;FT=1;var t=Ds();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 _0=e,_0}var S0,HT;function y$(){if(HT)return S0;HT=1;function t(e,r){return e>r}return S0=t,S0}var k0,WT;function jK(){if(WT)return k0;WT=1;var t=Uh(),e=y$(),r=Us();function n(i){return i&&i.length?t(i,r,e):void 0}return k0=n,k0}var CK=jK();const ra=Je(CK);var O0,VT;function b$(){if(VT)return O0;VT=1;function t(e,r){return e<r}return O0=t,O0}var E0,KT;function RK(){if(KT)return E0;KT=1;var t=Uh(),e=b$(),r=Us();function n(i){return i&&i.length?t(i,r,e):void 0}return E0=n,E0}var NK=RK();const Fh=Je(NK);var A0,GT;function $K(){if(GT)return A0;GT=1;var t=jx(),e=Vn(),r=PN(),n=Er();function i(a,s){var u=n(a)?t:r;return u(a,e(s,3))}return A0=i,A0}var P0,XT;function IK(){if(XT)return P0;XT=1;var t=EN(),e=$K();function r(n,i){return t(e(n,i),1)}return P0=r,P0}var MK=IK();const LK=Je(MK);var T0,YT;function DK(){if(YT)return T0;YT=1;var t=Fx();function e(r,n){return t(r,n)}return T0=e,T0}var BK=DK();const ms=Je(BK);var Hs=1e9,zK={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},g1,mt=!0,nn="[DecimalError] ",Ga=nn+"Invalid argument: ",m1=nn+"Exponent out of range: ",Ws=Math.floor,La=Math.pow,qK=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Mr,Vt=1e7,ft=7,w$=9007199254740991,Md=Ws(w$/ft),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)*ft;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 hi(this,new this.constructor(t))};be.dividedToIntegerBy=be.idiv=function(t){var e=this,r=e.constructor;return tt(hi(e,new r(t),0,1),r.precision)};be.equals=be.eq=function(t){return!this.cmp(t)};be.exponent=function(){return Ct(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(Mr))throw Error(nn+"NaN");if(r.s<1)throw Error(nn+(r.s?"NaN":"-Infinity"));return r.eq(Mr)?new n(0):(mt=!1,e=hi(Tu(r,a),Tu(t,a),a),mt=!0,tt(e,i))};be.minus=be.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?S$(e,t):x$(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(nn+"NaN");return r.s?(mt=!1,e=hi(r,t,0,1).times(t),mt=!0,r.minus(e)):tt(new n(r),i)};be.naturalExponential=be.exp=function(){return _$(this)};be.naturalLogarithm=be.ln=function(){return Tu(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?x$(e,t):S$(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(Ga+t);if(e=Ct(i)+1,n=i.d.length-1,r=n*ft+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(nn+"NaN")}for(t=Ct(u),mt=!1,i=Math.sqrt(+u),i==0||i==1/0?(e=Bn(u.d),(e.length+t)%2==0&&(e+="0"),i=Math.sqrt(e),t=Ws((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(hi(u,a,s+2)).times(.5),Bn(a.d).slice(0,s)===(e=Bn(n.d)).slice(0,s)){if(e=e.slice(s-3,s+1),i==s&&e=="4999"){if(tt(a,r+1,0),a.times(a).eq(u)){n=a;break}}else if(e!="9999")break;s+=4}return mt=!0,tt(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%Vt|0,e=u/Vt|0;a[i]=(a[i]+e)%Vt|0}for(;!a[--s];)a.pop();return e?++r:a.shift(),t.d=a,t.e=r,mt?tt(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:(Fn(t,0,Hs),e===void 0?e=n.rounding:Fn(e,0,8),tt(r,t+Ct(r)+1,e))};be.toExponential=function(t,e){var r,n=this,i=n.constructor;return t===void 0?r=eo(n,!0):(Fn(t,0,Hs),e===void 0?e=i.rounding:Fn(e,0,8),n=tt(new i(n),t+1,e),r=eo(n,!0,t+1)),r};be.toFixed=function(t,e){var r,n,i=this,a=i.constructor;return t===void 0?eo(i):(Fn(t,0,Hs),e===void 0?e=a.rounding:Fn(e,0,8),n=tt(new a(i),t+Ct(i)+1,e),r=eo(n.abs(),!1,t+Ct(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};be.toInteger=be.toint=function(){var t=this,e=t.constructor;return tt(new e(t),Ct(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(Mr);if(u=new c(u),!u.s){if(t.s<1)throw Error(nn+"Infinity");return u}if(u.eq(Mr))return u;if(n=c.precision,t.eq(Mr))return tt(u,n);if(e=t.e,r=t.d.length-1,s=e>=r,a=u.s,s){if((r=p<0?-p:p)<=w$){for(i=new c(Mr),e=Math.ceil(n/ft+4),mt=!1;r%2&&(i=i.times(u),QT(i.d,e)),r=Ws(r/2),r!==0;)u=u.times(u),QT(u.d,e);return mt=!0,t.s<0?new c(Mr).div(i):tt(i,n)}}else if(a<0)throw Error(nn+"NaN");return a=a<0&&t.d[Math.max(e,r)]&1?-1:1,u.s=1,mt=!1,i=t.times(Tu(u,n+f)),mt=!0,i=_$(i),i.s=a,i};be.toPrecision=function(t,e){var r,n,i=this,a=i.constructor;return t===void 0?(r=Ct(i),n=eo(i,r<=a.toExpNeg||r>=a.toExpPos)):(Fn(t,1,Hs),e===void 0?e=a.rounding:Fn(e,0,8),i=tt(new a(i),t,e),r=Ct(i),n=eo(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):(Fn(t,1,Hs),e===void 0?e=n.rounding:Fn(e,0,8)),tt(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=Ct(t),r=t.constructor;return eo(t,e<=r.toExpNeg||e>=r.toExpPos)};function x$(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)),mt?tt(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/ft),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)/Vt|0,c[a]%=Vt;for(r&&(c.unshift(r),++i),u=c.length;c[--u]==0;)c.pop();return e.d=c,e.e=i,mt?tt(e,h):e}function Fn(t,e,r){if(t!==~~t||t<e||t>r)throw Error(Ga+t)}function Bn(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=ft-n.length,r&&(a+=Qi(r)),a+=n;s=t[e],n=s+"",r=ft-n.length,r&&(a+=Qi(r))}else if(s===0)return"0";for(;s%10===0;)s/=10;return a+s}var hi=(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%Vt|0,s=a/Vt|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*Vt+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,O,A,T,E,P,C,$,D=n.constructor,W=n.s==i.s?1:-1,N=n.d,L=i.d;if(!n.s)return new D(n);if(!i.s)throw Error(nn+"Division by zero");for(c=n.e-i.e,C=L.length,E=N.length,v=new D(W),w=v.d=[],f=0;L[f]==(N[f]||0);)++f;if(L[f]>(N[f]||0)&&--c,a==null?O=a=D.precision:s?O=a+(Ct(n)-Ct(i))+1:O=a,O<0)return new D(0);if(O=O/ft+2|0,f=0,C==1)for(p=0,L=L[0],O++;(f<E||p)&&O--;f++)A=p*Vt+(N[f]||0),w[f]=A/L|0,p=A%L|0;else{for(p=Vt/(L[0]+1)|0,p>1&&(L=t(L,p),N=t(N,p),C=L.length,E=N.length),T=C,x=N.slice(0,C),y=x.length;y<C;)x[y++]=0;$=L.slice(),$.unshift(0),P=L[0],L[1]>=Vt/2&&++P;do p=0,u=e(L,x,C,y),u<0?(S=x[0],C!=y&&(S=S*Vt+(x[1]||0)),p=S/P|0,p>1?(p>=Vt&&(p=Vt-1),h=t(L,p),g=h.length,y=x.length,u=e(h,x,g,y),u==1&&(p--,r(h,C<g?$:L,g))):(p==0&&(u=p=1),h=L.slice()),g=h.length,g<y&&h.unshift(0),r(x,h,y),u==-1&&(y=x.length,u=e(L,x,C,y),u<1&&(p++,r(x,C<y?$:L,y))),y=x.length):u===0&&(p++,x=[0]),w[f++]=p,u&&x[0]?x[y++]=N[T]||0:(x=[N[T]],y=1);while((T++<E||x[0]!==void 0)&&O--)}return w[0]||w.shift(),v.e=c,tt(v,s?a+Ct(v)+1:a)}})();function _$(t,e){var r,n,i,a,s,u,c=0,f=0,p=t.constructor,h=p.precision;if(Ct(t)>16)throw Error(m1+Ct(t));if(!t.s)return new p(Mr);for(mt=!1,u=h,s=new p(.03125);t.abs().gte(.1);)t=t.times(s),f+=5;for(n=Math.log(La(2,f))/Math.LN10*2+5|0,u+=n,r=i=a=new p(Mr),p.precision=u;;){if(i=tt(i.times(t),u),r=r.times(++c),s=a.plus(hi(i,r,u)),Bn(s.d).slice(0,u)===Bn(a.d).slice(0,u)){for(;f--;)a=tt(a.times(a),u);return p.precision=h,e==null?(mt=!0,tt(a,h)):a}a=s}}function Ct(t){for(var e=t.e*ft,r=t.d[0];r>=10;r/=10)e++;return e}function j0(t,e,r){if(e>t.LN10.sd())throw mt=!0,r&&(t.precision=r),Error(nn+"LN10 precision limit exceeded");return tt(new t(t.LN10),e)}function Qi(t){for(var e="";t--;)e+="0";return e}function Tu(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(nn+(v.s?"NaN":"-Infinity"));if(v.eq(Mr))return new x(0);if(e==null?(mt=!1,f=y):f=e,v.eq(10))return e==null&&(mt=!0),j0(x,f);if(f+=g,x.precision=f,r=Bn(w),n=r.charAt(0),a=Ct(v),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)v=v.times(t),r=Bn(v.d),n=r.charAt(0),h++;a=Ct(v),n>1?(v=new x("0."+r),a++):v=new x(n+"."+r.slice(1))}else return c=j0(x,f+2,y).times(a+""),v=Tu(new x(n+"."+r.slice(1)),f-g).plus(c),x.precision=y,e==null?(mt=!0,tt(v,y)):v;for(u=s=v=hi(v.minus(Mr),v.plus(Mr),f),p=tt(v.times(v),f),i=3;;){if(s=tt(s.times(p),f),c=u.plus(hi(s,new x(i),f)),Bn(c.d).slice(0,f)===Bn(u.d).slice(0,f))return u=u.times(2),a!==0&&(u=u.plus(j0(x,f+2,y).times(a+""))),u=hi(u,new x(h),f),x.precision=y,e==null?(mt=!0,tt(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=Ws(r/ft),t.d=[],n=(r+1)%ft,r<0&&(n+=ft),n<i){for(n&&t.d.push(+e.slice(0,n)),i-=ft;n<i;)t.d.push(+e.slice(n,n+=ft));e=e.slice(n),n=ft-e.length}else n-=i;for(;n--;)e+="0";if(t.d.push(+e),mt&&(t.e>Md||t.e<-Md))throw Error(m1+r)}else t.s=0,t.e=0,t.d=[0];return t}function tt(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+=ft,i=e,f=h[p=0];else{if(p=Math.ceil((n+1)/ft),a=h.length,p>=a)return t;for(f=a=h[p],s=1;a>=10;a/=10)s++;n%=ft,i=n-ft+s}if(r!==void 0&&(a=La(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/La(10,s-i):0:h[p-1])%10&1||r==(t.s<0?8:7))),e<1||!h[0])return c?(a=Ct(t),h.length=1,e=e-a-1,h[0]=La(10,(ft-e%ft)%ft),t.e=Ws(-e/ft)||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=La(10,ft-n),h[p]=i>0?(f/La(10,s-i)%La(10,i)|0)*a:0),c)for(;;)if(p==0){(h[0]+=a)==Vt&&(h[0]=1,++t.e);break}else{if(h[p]+=a,h[p]!=Vt)break;h[p--]=0,a=1}for(n=h.length;h[--n]===0;)h.pop();if(mt&&(t.e>Md||t.e<-Md))throw Error(m1+Ct(t));return t}function S$(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),mt?tt(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/ft),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]=Vt-1;--c[a],c[i]+=Vt}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,mt?tt(e,v):e):new g(0)}function eo(t,e,r){var n,i=Ct(t),a=Bn(t.d),s=a.length;return e?(r&&(n=r-s)>0?a=a.charAt(0)+"."+a.slice(1)+Qi(n):s>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Qi(-i-1)+a,r&&(n=r-s)>0&&(a+=Qi(n))):i>=s?(a+=Qi(i+1-s),r&&(n=r-i-1)>0&&(a=a+"."+Qi(n))):((n=i+1)<s&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-s)>0&&(i+1===s&&(a+="."),a+=Qi(n))),t.s<0?"-"+a:a}function QT(t,e){if(t.length>e)return t.length=e,!0}function k$(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(Ga+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(Ga+a);if(a.charCodeAt(0)===45?(a=a.slice(1),s.s=-1):s.s=1,qK.test(a))JT(s,a);else throw Error(Ga+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=k$,i.config=i.set=UK,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 UK(t){if(!t||typeof t!="object")throw Error(nn+"Object expected");var e,r,n,i=["precision",1,Hs,"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(Ws(n)===n&&n>=i[e+1]&&n<=i[e+2])this[r]=n;else throw Error(Ga+r+": "+n);if((n=t[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ga+r+": "+n);return this}var g1=k$(zK);Mr=new g1(1);const Ze=g1;function FK(t){return KK(t)||VK(t)||WK(t)||HK()}function HK(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
426
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WK(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 VK(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function KK(t){if(Array.isArray(t))return ow(t)}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}var GK=function(e){return e},O$={},E$=function(e){return e===O$},ZT=function(e){return function r(){return arguments.length===0||arguments.length===1&&E$(arguments.length<=0?void 0:arguments[0])?r:e.apply(void 0,arguments)}},XK=function t(e,r){return e===1?r:ZT(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!==O$}).length;return s>=e?r.apply(void 0,i):t(e-s,ZT(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 E$(h)?c.shift():h});return r.apply(void 0,FK(p).concat(c))}))})},Hh=function(e){return XK(e.length,e)},sw=function(e,r){for(var n=[],i=e;i<r;++i)n[i-e]=i;return n},YK=Hh(function(t,e){return Array.isArray(e)?e.map(t):Object.keys(e).map(function(r){return e[r]}).map(t)}),JK=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];if(!r.length)return GK;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))}},lw=function(e){return Array.isArray(e)?e.reverse():e.split("").reverse.join("")},A$=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 QK(t){var e;return t===0?e=1:e=Math.floor(new Ze(t).abs().log(10).toNumber())+1,e}function ZK(t,e,r){for(var n=new Ze(t),i=0,a=[];n.lt(e)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var eG=Hh(function(t,e,r){var n=+t,i=+e;return n+r*(i-n)}),tG=Hh(function(t,e,r){var n=e-+t;return n=n||1/0,(r-t)/n}),rG=Hh(function(t,e,r){var n=e-+t;return n=n||1/0,Math.max(0,Math.min(1,(r-t)/n))});const Wh={rangeStep:ZK,getDigitCount:QK,interpolateNumber:eG,uninterpolateNumber:tG,uninterpolateTruncation:rG};function uw(t){return aG(t)||iG(t)||P$(t)||nG()}function nG(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
427
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iG(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function aG(t){if(Array.isArray(t))return cw(t)}function ju(t,e){return lG(t)||sG(t,e)||P$(t,e)||oG()}function oG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
428
|
-
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 cw(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 cw(t,e)}}function cw(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 sG(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 lG(t){if(Array.isArray(t))return t}function T$(t){var e=ju(t,2),r=e[0],n=e[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function j$(t,e,r){if(t.lte(0))return new Ze(0);var n=Wh.getDigitCount(t.toNumber()),i=new Ze(10).pow(n),a=t.div(i),s=n!==1?.05:.1,u=new Ze(Math.ceil(a.div(s).toNumber())).add(r).mul(s),c=u.mul(i);return e?c:new Ze(Math.ceil(c))}function uG(t,e,r){var n=1,i=new Ze(t);if(!i.isint()&&r){var a=Math.abs(t);a<1?(n=new Ze(10).pow(Wh.getDigitCount(t)-1),i=new Ze(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new Ze(Math.floor(t)))}else t===0?i=new Ze(Math.floor((e-1)/2)):r||(i=new Ze(Math.floor(t)));var s=Math.floor((e-1)/2),u=JK(YK(function(c){return i.add(new Ze(c-s).mul(n)).toNumber()}),sw);return u(0,e)}function C$(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 Ze(0),tickMin:new Ze(0),tickMax:new Ze(0)};var a=j$(new Ze(e).sub(t).div(r-1),n,i),s;t<=0&&e>=0?s=new Ze(0):(s=new Ze(t).add(e).div(2),s=s.sub(new Ze(s).mod(a)));var u=Math.ceil(s.sub(t).div(a).toNumber()),c=Math.ceil(new Ze(e).sub(s).div(a).toNumber()),f=u+c+1;return f>r?C$(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 Ze(u).mul(a)),tickMax:s.add(new Ze(c).mul(a))})}function cG(t){var e=ju(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=T$([r,n]),c=ju(u,2),f=c[0],p=c[1];if(f===-1/0||p===1/0){var h=p===1/0?[f].concat(uw(sw(0,i-1).map(function(){return 1/0}))):[].concat(uw(sw(0,i-1).map(function(){return-1/0})),[p]);return r>n?lw(h):h}if(f===p)return uG(f,i,a);var g=C$(f,p,s,a),v=g.step,w=g.tickMin,x=g.tickMax,y=Wh.rangeStep(w,x.add(new Ze(.1).mul(v)),v);return r>n?lw(y):y}function fG(t,e){var r=ju(t,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=T$([n,i]),u=ju(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=j$(new Ze(f).sub(c).div(p-1),a,0),g=[].concat(uw(Wh.rangeStep(new Ze(c),new Ze(f).sub(new Ze(.99).mul(h)),h)),[f]);return n>i?lw(g):g}var dG=A$(cG),hG=A$(fG),pG="Invariant failed";function to(t,e){throw new Error(pG)}var mG=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];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 Ld(){return Ld=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},Ld.apply(this,arguments)}function gG(t,e){return wG(t)||bG(t,e)||yG(t,e)||vG()}function vG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
429
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yG(t,e){if(t){if(typeof t=="string")return e2(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 e2(t,e)}}function e2(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 bG(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 wG(t){if(Array.isArray(t))return t}function xG(t,e){if(t==null)return{};var r=_G(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 _G(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 SG(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kG(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.key),n)}}function OG(t,e,r){return e&&kG(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function EG(t,e,r){return e=Dd(e),AG(t,R$()?Reflect.construct(e,r||[],Dd(t).constructor):e.apply(t,r))}function AG(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 PG(t)}function PG(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 TG(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&&fw(t,e)}function fw(t,e){return fw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},fw(t,e)}function N$(t,e,r){return e=$$(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $$(t){var e=jG(t,"string");return gs(e)=="symbol"?e:e+""}function jG(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 Vh=(function(t){function e(){return SG(this,e),EG(this,e,arguments)}return TG(e,t),OG(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=xG(n,mG),v=Ee(g,!1);this.props.direction==="x"&&p.type!=="number"&&to();var w=c.map(function(x){var y=f(x,u),S=y.x,O=y.y,A=y.value,T=y.errorVal;if(!T)return null;var E=[],P,C;if(Array.isArray(T)){var $=gG(T,2);P=$[0],C=$[1]}else P=C=T;if(a==="vertical"){var D=p.scale,W=O+i,N=W+s,L=W-s,z=D(A-P),K=D(A+C);E.push({x1:K,y1:N,x2:K,y2:L}),E.push({x1:z,y1:W,x2:K,y2:W}),E.push({x1:z,y1:N,x2:z,y2:L})}else if(a==="horizontal"){var V=h.scale,X=S+i,Q=X-s,G=X+s,te=V(A-P),F=V(A+C);E.push({x1:Q,y1:F,x2:G,y2:F}),E.push({x1:X,y1:te,x2:X,y2:F}),E.push({x1:Q,y1:te,x2:G,y2:te})}return M.createElement(Ue,Ld({className:"recharts-errorBar",key:"bar-".concat(E.map(function(I){return"".concat(I.x1,"-").concat(I.x2,"-").concat(I.y1,"-").concat(I.y2)}))},v),E.map(function(I){return M.createElement("line",Ld({},I,{key:"line-".concat(I.x1,"-").concat(I.x2,"-").concat(I.y1,"-").concat(I.y2)}))}))});return M.createElement(Ue,{className:"recharts-errorBars"},w)}}])})(M.Component);N$(Vh,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});N$(Vh,"displayName","ErrorBar");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 t2(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 Ra(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?t2(Object(r),!0).forEach(function(n){CG(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):t2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function CG(t,e,r){return e=RG(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function RG(t){var e=NG(t,"string");return Cu(e)=="symbol"?e:e+""}function NG(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 I$=function(e){var r=e.children,n=e.formattedGraphicalItems,i=e.legendWidth,a=e.legendContent,s=$r(r,rs);if(!s)return null;var u=rs.defaultProps,c=u!==void 0?Ra(Ra({},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?Ra(Ra({},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:v1(h),value:x||w,payload:v}}),Ra(Ra(Ra({},c),rs.getWithHeight(s,i)),{},{payload:f,item:s})};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 r2(t){return LG(t)||MG(t)||IG(t)||$G()}function $G(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
430
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IG(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 MG(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function LG(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}function n2(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?n2(Object(r),!0).forEach(function(n){is(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function is(t,e,r){return e=DG(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function DG(t){var e=BG(t,"string");return Ru(e)=="symbol"?e:e+""}function BG(t,e){if(Ru(t)!="object"||!t)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 Dt(t,e,r){return Le(t)||Le(e)?r:Bt(e)?Lr(t,e,r):$e(e)?e(t):r}function ou(t,e,r,n){var i=LK(t,function(u){return Dt(u,e)});if(r==="number"){var a=i.filter(function(u){return fe(u)||parseFloat(u)});return a.length?[Fh(a),ra(a)]:[1/0,-1/0]}var s=n?i.filter(function(u){return!Le(u)}):i;return s.map(function(u){return Bt(u)||u instanceof Date?u:""})}var zG=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(dr(h-p)!==dr(g-h)){var w=[];if(dr(g-h)===dr(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 O=Math.min(p,g),A=Math.max(p,g);if(e>(O+h)/2&&e<=(A+h)/2){s=i[f].index;break}}}else for(var T=0;T<u;T++)if(T===0&&e<=(n[T].coordinate+n[T+1].coordinate)/2||T>0&&T<u-1&&e>(n[T].coordinate+n[T-1].coordinate)/2&&e<=(n[T].coordinate+n[T+1].coordinate)/2||T===u-1&&e>(n[T].coordinate+n[T-1].coordinate)/2){s=n[T].index;break}return s},v1=function(e){var r,n=e,i=n.type.displayName,a=(r=e.type)!==null&&r!==void 0&&r.defaultProps?_t(_t({},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},qG=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 fi(C.type).indexOf("Bar")>=0});if(S&&S.length){var O=S[0].type.defaultProps,A=O!==void 0?_t(_t({},O),S[0].props):S[0].props,T=A.barSize,E=A[y];s[E]||(s[E]=[]);var P=Le(T)?r:T;s[E].push({item:S[0],stackList:S.slice(1),barSize:Le(P)?void 0:hr(P,n,0)})}}return s},UG=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=hr(r,i,0,!0),p,h=[];if(s[0].barSize===+s[0].barSize){var g=!1,v=i/c,w=s.reduce(function(T,E){return T+E.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(T,E){var P={item:E.item,position:{offset:y.offset+y.size+f,size:g?v:E.barSize}},C=[].concat(r2(T),[P]);return y=C[C.length-1].position,E.stackList&&E.stackList.length&&E.stackList.forEach(function($){C.push({item:$,position:y})}),C},h)}else{var S=hr(n,i,0,!0);i-2*S-(c-1)*f<=0&&(f=0);var O=(i-2*S-(c-1)*f)/c;O>1&&(O>>=0);var A=u===+u?Math.min(O,u):O;p=s.reduce(function(T,E,P){var C=[].concat(r2(T),[{item:E.item,position:{offset:S+(O+f)*P+(O-A)/2,size:A}}]);return E.stackList&&E.stackList.length&&E.stackList.forEach(function($){C.push({item:$,position:C[C.length-1].position})}),C},h)}return p},FG=function(e,r,n,i){var a=n.children,s=n.width,u=n.margin,c=s-(u.left||0)-(u.right||0),f=I$({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 _t(_t({},e),{},is({},v,e[v]+(h||0)));if((x==="horizontal"||x==="vertical"&&v==="center")&&w!=="middle"&&fe(e[w]))return _t(_t({},e),{},is({},w,e[w]+(g||0)))}return e},HG=function(e,r,n){return Le(r)?!0:e==="horizontal"?r==="yAxis":e==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},M$=function(e,r,n,i,a){var s=r.props.children,u=rn(s,Vh).filter(function(f){return HG(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=Dt(p,n);if(Le(h))return f;var g=Array.isArray(h)?[Fh(h),ra(h)]:[h,h],v=c.reduce(function(w,x){var y=Dt(p,x,0),S=g[0]-Math.abs(Array.isArray(y)?y[0]:y),O=g[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(S,w[0]),Math.max(O,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},WG=function(e,r,n,i,a){var s=r.map(function(u){return M$(e,u,n,a,i)}).filter(function(u){return!Le(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},L$=function(e,r,n,i,a){var s=r.map(function(c){var f=c.props.dataKey;return n==="number"&&f&&M$(e,c,f,i)||ou(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},[])},D$=function(e,r){return e==="horizontal"&&r==="xAxis"||e==="vertical"&&r==="yAxis"||e==="centric"&&r==="angleAxis"||e==="radial"&&r==="radiusAxis"},Ha=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?dr(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!zs(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}})},C0=new WeakMap,zf=function(e,r){if(typeof r!="function")return e;C0.has(e)||C0.set(e,new WeakMap);var n=C0.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},B$=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:ku(),realScaleType:"band"}:s==="radial"&&u==="angleAxis"?{scale:Rd(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:au(),realScaleType:"point"}:a==="category"?{scale:ku(),realScaleType:"band"}:{scale:Rd(),realScaleType:"linear"};if(Ja(i)){var c="scale".concat(Ph(i));return{scale:(UT[c]||au)(),realScaleType:UT[c]?c:"point"}}return $e(i)?{scale:i}:{scale:au(),realScaleType:"point"}},i2=1e-4,z$=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])-i2,s=Math.max(i[0],i[1])+i2,u=e(r[0]),c=e(r[n-1]);(u<a||u>s||c<a||c>s)&&e.domain([r[0],r[n-1]])}},VG=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},KG=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},GG=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=zs(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])}},XG=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=zs(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)}},YG={sign:GG,expand:L9,none:ss,silhouette:D9,wiggle:B9,positive:XG},JG=function(e,r,n){var i=r.map(function(u){return u.props.dataKey}),a=YG[n],s=M9().keys(i).value(function(u,c){return+Dt(u,c,0)}).order(Ub).offset(a);return s(e)},QG=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?_t(_t({},g.type.defaultProps),g.props):g.props,x=w.stackId,y=w.hide;if(y)return h;var S=w[n],O=h[S]||{hasStack:!1,stackGroups:{}};if(Bt(x)){var A=O.stackGroups[x]||{numericAxisId:n,cateAxisId:i,items:[]};A.items.push(g),O.hasStack=!0,O.stackGroups[x]=A}else O.stackGroups[qs("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[g]};return _t(_t({},h),{},is({},S,O))},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 _t(_t({},x),{},is({},y,{numericAxisId:n,cateAxisId:i,items:S.items,stackedData:JG(e,S.items,a)}))},w)}return _t(_t({},h),{},is({},g,v))},p)},q$=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=dG(f,a,u);return e.domain([Fh(p),ra(p)]),{niceTicks:p}}if(a&&i==="number"){var h=e.domain(),g=hG(h,a,u);return{niceTicks:g}}return null};function a2(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&&!Le(i[e.dataKey])){var u=hd(r,"value",i[e.dataKey]);if(u)return u.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var c=Dt(i,Le(s)?e.dataKey:s);return Le(c)?null:e.scale(c)}var o2=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=Dt(s,r.dataKey,r.domain[u]);return Le(c)?null:r.scale(c)-a/2+i},ZG=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]},eX=function(e,r){var n,i=(n=e.type)!==null&&n!==void 0&&n.defaultProps?_t(_t({},e.type.defaultProps),e.props):e.props,a=i.stackId;if(Bt(a)){var s=r[a];if(s){var u=s.items.indexOf(e);return u>=0?s.stackedData[u]:null}}return null},tX=function(e){return e.reduce(function(r,n){return[Fh(n.concat([r[0]]).filter(fe)),ra(n.concat([r[1]]).filter(fe))]},[1/0,-1/0])},U$=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=tX(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})},s2=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,l2=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,hw=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(s2.test(e[0])){var a=+s2.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(l2.test(e[1])){var s=+l2.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},Bd=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=Wx(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},u2=function(e,r,n){return!e||!e.length||ms(e,Lr(n,"type.defaultProps.domain"))?r:e},F$=function(e,r){var n=e.type.defaultProps?_t(_t({},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 _t(_t({},Ee(e,!1)),{},{dataKey:i,unit:s,formatter:u,name:a||i,color:v1(e),value:Dt(r,i),type:c,payload:r,chartType:f,hide:p})};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 c2(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 li(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?c2(Object(r),!0).forEach(function(n){H$(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function H$(t,e,r){return e=rX(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function rX(t){var e=nX(t,"string");return Nu(e)=="symbol"?e:e+""}function nX(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 iX(t,e){return lX(t)||sX(t,e)||oX(t,e)||aX()}function aX(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
431
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oX(t,e){if(t){if(typeof t=="string")return f2(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 f2(t,e)}}function f2(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 sX(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 lX(t){if(Array.isArray(t))return t}var zd=Math.PI/180,uX=function(e){return e*180/Math.PI},ot=function(e,r,n,i){return{x:e+Math.cos(-zd*i)*n,y:r+Math.sin(-zd*i)*n}},W$=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},cX=function(e,r,n,i,a){var s=e.width,u=e.height,c=e.startAngle,f=e.endAngle,p=hr(e.cx,s,s/2),h=hr(e.cy,u,u/2),g=W$(s,u,n),v=hr(e.innerRadius,g,0),w=hr(e.outerRadius,g,g*.8),x=Object.keys(r);return x.reduce(function(y,S){var O=r[S],A=O.domain,T=O.reversed,E;if(Le(O.range))i==="angleAxis"?E=[c,f]:i==="radiusAxis"&&(E=[v,w]),T&&(E=[E[1],E[0]]);else{E=O.range;var P=E,C=iX(P,2);c=C[0],f=C[1]}var $=B$(O,a),D=$.realScaleType,W=$.scale;W.domain(A).range(E),z$(W);var N=q$(W,li(li({},O),{},{realScaleType:D})),L=li(li(li({},O),N),{},{range:E,radius:w,realScaleType:D,scale:W,cx:p,cy:h,innerRadius:v,outerRadius:w,startAngle:c,endAngle:f});return li(li({},y),{},H$({},S,L))},{})},fX=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))},dX=function(e,r){var n=e.x,i=e.y,a=r.cx,s=r.cy,u=fX({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:uX(f),angleInRadian:f}},hX=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}},pX=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},d2=function(e,r){var n=e.x,i=e.y,a=dX({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=hX(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?li(li({},r),{},{radius:s,angle:pX(v,r)}):null},V$=function(e){return!R.isValidElement(e)&&!$e(e)&&typeof e!="boolean"?e.className:""};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 mX=["offset"];function gX(t){return wX(t)||bX(t)||yX(t)||vX()}function vX(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
432
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yX(t,e){if(t){if(typeof t=="string")return pw(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 pw(t,e)}}function bX(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function wX(t){if(Array.isArray(t))return pw(t)}function pw(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 xX(t,e){if(t==null)return{};var r=_X(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 _X(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 h2(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 Lt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?h2(Object(r),!0).forEach(function(n){SX(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):h2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function SX(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=OX(t,"string");return $u(e)=="symbol"?e:e+""}function OX(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 Iu(){return Iu=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},Iu.apply(this,arguments)}var EX=function(e){var r=e.value,n=e.formatter,i=Le(e.children)?r:e.children;return $e(n)?n(i):i},AX=function(e,r){var n=dr(r-e),i=Math.min(Math.abs(r-e),360);return n*i},PX=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=AX(v,w),O=S>=0?1:-1,A,T;i==="insideStart"?(A=v+O*s,T=x):i==="insideEnd"?(A=w-O*s,T=!x):i==="end"&&(A=w+O*s,T=x),T=S<=0?T:!T;var E=ot(f,p,y,A),P=ot(f,p,y,A+(T?1:-1)*359),C="M".concat(E.x,",").concat(E.y,`
|
|
433
|
-
A`).concat(y,",").concat(y,",0,1,").concat(T?0:1,`,
|
|
434
|
-
`).concat(P.x,",").concat(P.y),$=Le(e.id)?qs("recharts-radial-line-"):e.id;return M.createElement("text",Iu({},n,{dominantBaseline:"central",className:De("recharts-radial-bar-label",u)}),M.createElement("defs",null,M.createElement("path",{id:$,d:C})),M.createElement("textPath",{xlinkHref:"#".concat($)},r))},TX=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=ot(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=ot(s,u,y,g),O=S.x,A=S.y;return{x:O,y:A,textAnchor:"middle",verticalAnchor:"middle"}},jX=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",O=x>0?"start":"end";if(a==="top"){var A={x:u+f/2,y:c-h*i,textAnchor:"middle",verticalAnchor:v};return Lt(Lt({},A),n?{height:Math.max(c-n.y,0),width:f}:{})}if(a==="bottom"){var T={x:u+f/2,y:c+p+g,textAnchor:"middle",verticalAnchor:w};return Lt(Lt({},T),n?{height:Math.max(n.y+n.height-(c+p),0),width:f}:{})}if(a==="left"){var E={x:u-y,y:c+p/2,textAnchor:S,verticalAnchor:"middle"};return Lt(Lt({},E),n?{width:Math.max(E.x-n.x,0),height:p}:{})}if(a==="right"){var P={x:u+f+y,y:c+p/2,textAnchor:O,verticalAnchor:"middle"};return Lt(Lt({},P),n?{width:Math.max(n.x+n.width-P.x,0),height:p}:{})}var C=n?{width:f,height:p}:{};return a==="insideLeft"?Lt({x:u+y,y:c+p/2,textAnchor:O,verticalAnchor:"middle"},C):a==="insideRight"?Lt({x:u+f-y,y:c+p/2,textAnchor:S,verticalAnchor:"middle"},C):a==="insideTop"?Lt({x:u+f/2,y:c+g,textAnchor:"middle",verticalAnchor:w},C):a==="insideBottom"?Lt({x:u+f/2,y:c+p-g,textAnchor:"middle",verticalAnchor:v},C):a==="insideTopLeft"?Lt({x:u+y,y:c+g,textAnchor:O,verticalAnchor:w},C):a==="insideTopRight"?Lt({x:u+f-y,y:c+g,textAnchor:S,verticalAnchor:w},C):a==="insideBottomLeft"?Lt({x:u+y,y:c+p-g,textAnchor:O,verticalAnchor:v},C):a==="insideBottomRight"?Lt({x:u+f-y,y:c+p-g,textAnchor:S,verticalAnchor:v},C):Bs(a)&&(fe(a.x)||qa(a.x))&&(fe(a.y)||qa(a.y))?Lt({x:u+hr(a.x,f),y:c+hr(a.y,p),textAnchor:"end",verticalAnchor:"end"},C):Lt({x:u+f/2,y:c+p/2,textAnchor:"middle",verticalAnchor:"middle"},C)},CX=function(e){return"cx"in e&&fe(e.cx)};function Kt(t){var e=t.offset,r=e===void 0?5:e,n=xX(t,mX),i=Lt({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||Le(u)&&Le(c)&&!R.isValidElement(f)&&!$e(f))return null;if(R.isValidElement(f))return R.cloneElement(f,i);var v;if($e(f)){if(v=R.createElement(f,i),R.isValidElement(v))return v}else v=EX(i);var w=CX(a),x=Ee(i,!0);if(w&&(s==="insideStart"||s==="insideEnd"||s==="end"))return PX(i,v,x);var y=w?TX(i):jX(i);return M.createElement(Za,Iu({className:De("recharts-label",h)},x,y,{breakAll:g}),v)}Kt.displayName="Label";var K$=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,O=e.labelViewBox;if(O)return O;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:{}},RX=function(e,r){return e?e===!0?M.createElement(Kt,{key:"label-implicit",viewBox:r}):Bt(e)?M.createElement(Kt,{key:"label-implicit",viewBox:r,value:e}):R.isValidElement(e)?e.type===Kt?R.cloneElement(e,{key:"label-implicit",viewBox:r}):M.createElement(Kt,{key:"label-implicit",content:e,viewBox:r}):$e(e)?M.createElement(Kt,{key:"label-implicit",content:e,viewBox:r}):Bs(e)?M.createElement(Kt,Iu({viewBox:r},e,{key:"label-implicit"})):null:null},NX=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=K$(e),s=rn(i,Kt).map(function(c,f){return R.cloneElement(c,{viewBox:r||a,key:"label-".concat(f)})});if(!n)return s;var u=RX(e.label,r||a);return[u].concat(gX(s))};Kt.parseViewBox=K$;Kt.renderCallByParent=NX;var R0,p2;function $X(){if(p2)return R0;p2=1;function t(e){var r=e==null?0:e.length;return r?e[r-1]:void 0}return R0=t,R0}var IX=$X();const MX=Je(IX);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)}var LX=["valueAccessor"],DX=["data","dataKey","clockWise","id","textBreakAll"];function BX(t){return FX(t)||UX(t)||qX(t)||zX()}function zX(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
435
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qX(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 UX(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function FX(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 qd(){return qd=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},qd.apply(this,arguments)}function m2(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 g2(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?m2(Object(r),!0).forEach(function(n){HX(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):m2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function HX(t,e,r){return e=WX(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function WX(t){var e=VX(t,"string");return Mu(e)=="symbol"?e:e+""}function VX(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 v2(t,e){if(t==null)return{};var r=KX(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 KX(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 GX=function(e){return Array.isArray(e.value)?MX(e.value):e.value};function pi(t){var e=t.valueAccessor,r=e===void 0?GX:e,n=v2(t,LX),i=n.data,a=n.dataKey,s=n.clockWise,u=n.id,c=n.textBreakAll,f=v2(n,DX);return!i||!i.length?null:M.createElement(Ue,{className:"recharts-label-list"},i.map(function(p,h){var g=Le(a)?r(p,h):Dt(p&&p.payload,a),v=Le(u)?{}:{id:"".concat(u,"-").concat(h)};return M.createElement(Kt,qd({},Ee(p,!0),f,v,{parentViewBox:p.parentViewBox,value:g,textBreakAll:c,viewBox:Kt.parseViewBox(Le(s)?p:g2(g2({},p),{},{clockWise:s})),key:"label-".concat(h),index:h}))}))}pi.displayName="LabelList";function XX(t,e){return t?t===!0?M.createElement(pi,{key:"labelList-implicit",data:e}):M.isValidElement(t)||$e(t)?M.createElement(pi,{key:"labelList-implicit",data:e,content:t}):Bs(t)?M.createElement(pi,qd({data:e},t,{key:"labelList-implicit"})):null:null}function YX(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=rn(n,pi).map(function(s,u){return R.cloneElement(s,{data:e,key:"labelList-".concat(u)})});if(!r)return i;var a=XX(t.label,e);return[a].concat(BX(i))}pi.renderCallByParent=YX;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 gw(){return gw=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},gw.apply(this,arguments)}function y2(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 b2(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?y2(Object(r),!0).forEach(function(n){JX(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):y2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function JX(t,e,r){return e=QX(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function QX(t){var e=ZX(t,"string");return Lu(e)=="symbol"?e:e+""}function ZX(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)}var eY=function(e,r){var n=dr(r-e),i=Math.min(Math.abs(r-e),359.999);return n*i},qf=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)/zd,g=f?a:a+s*h,v=ot(r,n,p,g),w=ot(r,n,i,g),x=f?a-s*h:a,y=ot(r,n,p*Math.cos(h*zd),x);return{center:v,circleTangency:w,lineTangency:y,theta:h}},G$=function(e){var r=e.cx,n=e.cy,i=e.innerRadius,a=e.outerRadius,s=e.startAngle,u=e.endAngle,c=eY(s,u),f=s+c,p=ot(r,n,a,s),h=ot(r,n,a,f),g="M ".concat(p.x,",").concat(p.y,`
|
|
436
|
-
A `).concat(a,",").concat(a,`,0,
|
|
437
|
-
`).concat(+(Math.abs(c)>180),",").concat(+(s>f),`,
|
|
438
|
-
`).concat(h.x,",").concat(h.y,`
|
|
439
|
-
`);if(i>0){var v=ot(r,n,i,s),w=ot(r,n,i,f);g+="L ".concat(w.x,",").concat(w.y,`
|
|
440
|
-
A `).concat(i,",").concat(i,`,0,
|
|
441
|
-
`).concat(+(Math.abs(c)>180),",").concat(+(s<=f),`,
|
|
442
|
-
`).concat(v.x,",").concat(v.y," Z")}else g+="L ".concat(r,",").concat(n," Z");return g},tY=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=dr(p-f),g=qf({cx:r,cy:n,radius:a,angle:f,sign:h,cornerRadius:s,cornerIsExternal:c}),v=g.circleTangency,w=g.lineTangency,x=g.theta,y=qf({cx:r,cy:n,radius:a,angle:p,sign:-h,cornerRadius:s,cornerIsExternal:c}),S=y.circleTangency,O=y.lineTangency,A=y.theta,T=c?Math.abs(f-p):Math.abs(f-p)-x-A;if(T<0)return u?"M ".concat(w.x,",").concat(w.y,`
|
|
443
|
-
a`).concat(s,",").concat(s,",0,0,1,").concat(s*2,`,0
|
|
444
|
-
a`).concat(s,",").concat(s,",0,0,1,").concat(-s*2,`,0
|
|
445
|
-
`):G$({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:f,endAngle:p});var E="M ".concat(w.x,",").concat(w.y,`
|
|
446
|
-
A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(v.x,",").concat(v.y,`
|
|
447
|
-
A`).concat(a,",").concat(a,",0,").concat(+(T>180),",").concat(+(h<0),",").concat(S.x,",").concat(S.y,`
|
|
448
|
-
A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(O.x,",").concat(O.y,`
|
|
449
|
-
`);if(i>0){var P=qf({cx:r,cy:n,radius:i,angle:f,sign:h,isExternal:!0,cornerRadius:s,cornerIsExternal:c}),C=P.circleTangency,$=P.lineTangency,D=P.theta,W=qf({cx:r,cy:n,radius:i,angle:p,sign:-h,isExternal:!0,cornerRadius:s,cornerIsExternal:c}),N=W.circleTangency,L=W.lineTangency,z=W.theta,K=c?Math.abs(f-p):Math.abs(f-p)-D-z;if(K<0&&s===0)return"".concat(E,"L").concat(r,",").concat(n,"Z");E+="L".concat(L.x,",").concat(L.y,`
|
|
450
|
-
A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(N.x,",").concat(N.y,`
|
|
451
|
-
A`).concat(i,",").concat(i,",0,").concat(+(K>180),",").concat(+(h>0),",").concat(C.x,",").concat(C.y,`
|
|
452
|
-
A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat($.x,",").concat($.y,"Z")}else E+="L".concat(r,",").concat(n,"Z");return E},rY={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},X$=function(e){var r=b2(b2({},rY),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=De("recharts-sector",g),w=s-a,x=hr(u,w,0,!0),y;return x>0&&Math.abs(p-h)<360?y=tY({cx:n,cy:i,innerRadius:a,outerRadius:s,cornerRadius:Math.min(x,w/2),forceCornerRadius:c,cornerIsExternal:f,startAngle:p,endAngle:h}):y=G$({cx:n,cy:i,innerRadius:a,outerRadius:s,startAngle:p,endAngle:h}),M.createElement("path",gw({},Ee(r,!0),{className:v,d:y,role:"img"}))};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 vw(){return vw=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},vw.apply(this,arguments)}function w2(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 x2(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?w2(Object(r),!0).forEach(function(n){nY(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):w2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function nY(t,e,r){return e=iY(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function iY(t){var e=aY(t,"string");return Du(e)=="symbol"?e:e+""}function aY(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 _2={curveBasisClosed:O9,curveBasisOpen:E9,curveBasis:k9,curveBumpX:c9,curveBumpY:f9,curveLinearClosed:A9,curveLinear:jh,curveMonotoneX:P9,curveMonotoneY:T9,curveNatural:j9,curveStep:C9,curveStepAfter:N9,curveStepBefore:R9},Uf=function(e){return e.x===+e.x&&e.y===+e.y},Ul=function(e){return e.x},Fl=function(e){return e.y},oY=function(e,r){if($e(e))return e;var n="curve".concat(Ph(e));return(n==="curveMonotone"||n==="curveBump")&&r?_2["".concat(n).concat(r==="vertical"?"Y":"X")]:_2[n]||jh},sY=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=oY(n,u),h=f?a.filter(function(x){return Uf(x)}):a,g;if(Array.isArray(s)){var v=f?s.filter(function(x){return Uf(x)}):s,w=h.map(function(x,y){return x2(x2({},x),{},{base:v[y]})});return u==="vertical"?g=Nf().y(Fl).x1(Ul).x0(function(x){return x.base.x}):g=Nf().x(Ul).y1(Fl).y0(function(x){return x.base.y}),g.defined(Uf).curve(p),g(w)}return u==="vertical"&&fe(s)?g=Nf().y(Fl).x1(Ul).x0(s):fe(s)?g=Nf().x(Ul).y1(Fl).y0(s):g=XR().x(Ul).y(Fl),g.defined(Uf).curve(p),g(h)},as=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?sY(e):i;return R.createElement("path",vw({},Ee(e,!1),pd(e),{className:De("recharts-curve",r),d:s,ref:a}))},N0={exports:{}},$0,S2;function lY(){if(S2)return $0;S2=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return $0=t,$0}var I0,k2;function uY(){if(k2)return I0;k2=1;var t=lY();function e(){}function r(){}return r.resetWarningCache=e,I0=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},I0}var O2;function cY(){return O2||(O2=1,N0.exports=uY()()),N0.exports}var fY=cY();const Xe=Je(fY),{getOwnPropertyNames:dY,getOwnPropertySymbols:hY}=Object,{hasOwnProperty:pY}=Object.prototype;function M0(t,e){return function(n,i,a){return t(n,i,a)&&e(n,i,a)}}function Ff(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 mY(t){return t!=null?t[Symbol.toStringTag]:void 0}function E2(t){return dY(t).concat(hY(t))}const gY=Object.hasOwn||((t,e)=>pY.call(t,e));function lo(t,e){return t===e||!t&&!e&&t!==t&&e!==e}const vY="__v",yY="__o",bY="_owner",{getOwnPropertyDescriptor:A2,keys:P2}=Object;function wY(t,e){return t.byteLength===e.byteLength&&Ud(new Uint8Array(t),new Uint8Array(e))}function xY(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 _Y(t,e){return t.byteLength===e.byteLength&&Ud(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function SY(t,e){return lo(t.getTime(),e.getTime())}function kY(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function OY(t,e){return t===e}function T2(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 EY=lo;function AY(t,e,r){const n=P2(t);let i=n.length;if(P2(e).length!==i)return!1;for(;i-- >0;)if(!Y$(t,e,r,n[i]))return!1;return!0}function Hl(t,e,r){const n=E2(t);let i=n.length;if(E2(e).length!==i)return!1;let a,s,u;for(;i-- >0;)if(a=n[i],!Y$(t,e,r,a)||(s=A2(t,a),u=A2(e,a),(s||u)&&(!s||!u||s.configurable!==u.configurable||s.enumerable!==u.enumerable||s.writable!==u.writable)))return!1;return!0}function PY(t,e){return lo(t.valueOf(),e.valueOf())}function TY(t,e){return t.source===e.source&&t.flags===e.flags}function j2(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 Ud(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 jY(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 Y$(t,e,r,n){return(n===bY||n===yY||n===vY)&&(t.$$typeof||e.$$typeof)?!0:gY(e,n)&&r.equals(t[n],e[n],n,n,t,e,r)}const CY="[object ArrayBuffer]",RY="[object Arguments]",NY="[object Boolean]",$Y="[object DataView]",IY="[object Date]",MY="[object Error]",LY="[object Map]",DY="[object Number]",BY="[object Object]",zY="[object RegExp]",qY="[object Set]",UY="[object String]",FY={"[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},HY="[object URL]",WY=Object.prototype.toString;function VY({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,O){if(y===S)return!0;if(y==null||S==null)return!1;const A=typeof y;if(A!==typeof S)return!1;if(A!=="object")return A==="number"?u(y,S,O):A==="function"?a(y,S,O):!1;const T=y.constructor;if(T!==S.constructor)return!1;if(T===Object)return c(y,S,O);if(Array.isArray(y))return e(y,S,O);if(T===Date)return n(y,S,O);if(T===RegExp)return p(y,S,O);if(T===Map)return s(y,S,O);if(T===Set)return h(y,S,O);const E=WY.call(y);if(E===IY)return n(y,S,O);if(E===zY)return p(y,S,O);if(E===LY)return s(y,S,O);if(E===qY)return h(y,S,O);if(E===BY)return typeof y.then!="function"&&typeof S.then!="function"&&c(y,S,O);if(E===HY)return v(y,S,O);if(E===MY)return i(y,S,O);if(E===RY)return c(y,S,O);if(FY[E])return g(y,S,O);if(E===CY)return t(y,S,O);if(E===$Y)return r(y,S,O);if(E===NY||E===DY||E===UY)return f(y,S,O);if(w){let P=w[E];if(!P){const C=mY(y);C&&(P=w[C])}if(P)return P(y,S,O)}return!1}}function KY({circular:t,createCustomConfig:e,strict:r}){let n={areArrayBuffersEqual:wY,areArraysEqual:r?Hl:xY,areDataViewsEqual:_Y,areDatesEqual:SY,areErrorsEqual:kY,areFunctionsEqual:OY,areMapsEqual:r?M0(T2,Hl):T2,areNumbersEqual:EY,areObjectsEqual:r?Hl:AY,arePrimitiveWrappersEqual:PY,areRegExpsEqual:TY,areSetsEqual:r?M0(j2,Hl):j2,areTypedArraysEqual:r?M0(Ud,Hl):Ud,areUrlsEqual:jY,unknownTagComparators:void 0};if(e&&(n=Object.assign({},n,e(n))),t){const i=Ff(n.areArraysEqual),a=Ff(n.areMapsEqual),s=Ff(n.areObjectsEqual),u=Ff(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:u})}return n}function GY(t){return function(e,r,n,i,a,s,u){return t(e,r,u)}}function XY({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 YY=ua();ua({strict:!0});ua({circular:!0});ua({circular:!0,strict:!0});ua({createInternalComparator:()=>lo});ua({strict:!0,createInternalComparator:()=>lo});ua({circular:!0,createInternalComparator:()=>lo});ua({circular:!0,createInternalComparator:()=>lo,strict:!0});function ua(t={}){const{circular:e=!1,createInternalComparator:r,createState:n,strict:i=!1}=t,a=KY(t),s=VY(a),u=r?r(s):GY(s);return XY({circular:e,comparator:s,createState:n,equals:u,strict:i})}function JY(t){typeof requestAnimationFrame<"u"&&requestAnimationFrame(t)}function C2(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):JY(i)};requestAnimationFrame(n)}function yw(t){"@babel/helpers - typeof";return yw=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},yw(t)}function QY(t){return rJ(t)||tJ(t)||eJ(t)||ZY()}function ZY(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
453
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eJ(t,e){if(t){if(typeof t=="string")return R2(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 R2(t,e)}}function R2(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 tJ(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function rJ(t){if(Array.isArray(t))return t}function nJ(){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=QY(s),c=u[0],f=u.slice(1);if(typeof c=="number"){C2(i.bind(null,f),c);return}i(c),C2(i.bind(null,f));return}yw(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 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 N2(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 $2(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?N2(Object(r),!0).forEach(function(n){J$(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):N2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function J$(t,e,r){return e=iJ(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function iJ(t){var e=aJ(t,"string");return Bu(e)==="symbol"?e:String(e)}function aJ(t,e){if(Bu(t)!=="object"||t===null)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)}var oJ=function(e,r){return[Object.keys(e),Object.keys(r)].reduce(function(n,i){return n.filter(function(a){return i.includes(a)})})},sJ=function(e){return e},lJ=function(e){return e.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},su=function(e,r){return Object.keys(r).reduce(function(n,i){return $2($2({},n),{},J$({},i,e(i,r[i])))},{})},I2=function(e,r,n){return e.map(function(i){return"".concat(lJ(i)," ").concat(r,"ms ").concat(n)}).join(",")};function uJ(t,e){return dJ(t)||fJ(t,e)||Q$(t,e)||cJ()}function cJ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
454
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fJ(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 dJ(t){if(Array.isArray(t))return t}function hJ(t){return gJ(t)||mJ(t)||Q$(t)||pJ()}function pJ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
455
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Q$(t,e){if(t){if(typeof t=="string")return bw(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 bw(t,e)}}function mJ(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function gJ(t){if(Array.isArray(t))return bw(t)}function bw(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 Fd=1e-4,Z$=function(e,r){return[0,3*e,3*r-6*e,3*e-3*r+1]},eI=function(e,r){return e.map(function(n,i){return n*Math.pow(r,i)}).reduce(function(n,i){return n+i})},M2=function(e,r){return function(n){var i=Z$(e,r);return eI(i,n)}},vJ=function(e,r){return function(n){var i=Z$(e,r),a=[].concat(hJ(i.map(function(s,u){return s*u}).slice(1)),[0]);return eI(a,n)}},L2=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=uJ(f,4);i=p[0],a=p[1],s=p[2],u=p[3]}}}var h=M2(i,s),g=M2(a,u),v=vJ(i,s),w=function(S){return S>1?1:S<0?0:S},x=function(S){for(var O=S>1?1:S,A=O,T=0;T<8;++T){var E=h(A)-O,P=v(A);if(Math.abs(E-O)<Fd||P<Fd)return g(A);A=w(A-E/P)}return g(A)};return x.isStepper=!1,x},yJ=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)<Fd&&Math.abs(x)<Fd?[h,0]:[y,x]};return c.isStepper=!0,c.dt=u,c},bJ=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 L2(i);case"spring":return yJ();default:if(i.split("(")[0]==="cubic-bezier")return L2(i)}return typeof i=="function"?i:null};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 D2(t){return _J(t)||xJ(t)||tI(t)||wJ()}function wJ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
456
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xJ(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function _J(t){if(Array.isArray(t))return xw(t)}function B2(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 er(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?B2(Object(r),!0).forEach(function(n){ww(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):B2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function ww(t,e,r){return e=SJ(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function SJ(t){var e=kJ(t,"string");return zu(e)==="symbol"?e:String(e)}function kJ(t,e){if(zu(t)!=="object"||t===null)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(e==="string"?String:Number)(t)}function OJ(t,e){return PJ(t)||AJ(t,e)||tI(t,e)||EJ()}function EJ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
457
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tI(t,e){if(t){if(typeof t=="string")return xw(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 xw(t,e)}}function xw(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 AJ(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 PJ(t){if(Array.isArray(t))return t}var Hd=function(e,r,n){return e+(r-e)*n},_w=function(e){var r=e.from,n=e.to;return r!==n},TJ=function t(e,r,n){var i=su(function(a,s){if(_w(s)){var u=e(s.from,s.to,s.velocity),c=OJ(u,2),f=c[0],p=c[1];return er(er({},s),{},{from:f,velocity:p})}return s},r);return n<1?su(function(a,s){return _w(s)?er(er({},s),{},{velocity:Hd(s.velocity,i[a].velocity,n),from:Hd(s.from,i[a].from,n)}):s},r):t(e,i,n-1)};const jJ=(function(t,e,r,n,i){var a=oJ(t,e),s=a.reduce(function(y,S){return er(er({},y),{},ww({},S,[t[S],e[S]]))},{}),u=a.reduce(function(y,S){return er(er({},y),{},ww({},S,{from:t[S],velocity:0,to:e[S]}))},{}),c=-1,f,p,h=function(){return null},g=function(){return su(function(S,O){return O.from},u)},v=function(){return!Object.values(u).filter(_w).length},w=function(S){f||(f=S);var O=S-f,A=O/r.dt;u=TJ(r,u,A),i(er(er(er({},t),e),g())),f=S,v()||(c=requestAnimationFrame(h))},x=function(S){p||(p=S);var O=(S-p)/n,A=su(function(E,P){return Hd.apply(void 0,D2(P).concat([r(O)]))},s);if(i(er(er(er({},t),e),A)),O<1)c=requestAnimationFrame(h);else{var T=su(function(E,P){return Hd.apply(void 0,D2(P).concat([r(1)]))},s);i(er(er(er({},t),e),T))}};return h=r.isStepper?w:x,function(){return requestAnimationFrame(h),function(){cancelAnimationFrame(c)}}});function vs(t){"@babel/helpers - typeof";return vs=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},vs(t)}var CJ=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function RJ(t,e){if(t==null)return{};var r=NJ(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 NJ(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 L0(t){return LJ(t)||MJ(t)||IJ(t)||$J()}function $J(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
458
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IJ(t,e){if(t){if(typeof t=="string")return Sw(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 Sw(t,e)}}function MJ(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function LJ(t){if(Array.isArray(t))return Sw(t)}function Sw(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 z2(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 mn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?z2(Object(r),!0).forEach(function(n){Zl(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):z2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Zl(t,e,r){return e=rI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function DJ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function BJ(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,rI(n.key),n)}}function zJ(t,e,r){return e&&BJ(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function rI(t){var e=qJ(t,"string");return vs(e)==="symbol"?e:String(e)}function qJ(t,e){if(vs(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(vs(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function UJ(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 FJ(t){var e=HJ();return function(){var n=Wd(t),i;if(e){var a=Wd(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return Ow(this,i)}}function Ow(t,e){if(e&&(vs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ew(t)}function Ew(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function HJ(){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 Wd(t){return Wd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Wd(t)}var Hn=(function(t){UJ(r,t);var e=FJ(r);function r(n,i){var a;DJ(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(Ew(a)),a.changeStyle=a.changeStyle.bind(Ew(a)),!u||v<=0)return a.state={style:{}},typeof g=="function"&&(a.state={style:p}),Ow(a);if(h&&h.length)a.state={style:h[0].style};else if(f){if(typeof g=="function")return a.state={style:f},Ow(a);a.state={style:c?Zl({},c,f):f}}else a.state={style:{}};return a}return zJ(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?Zl({},c,p):p};this.state&&g&&(c&&g[c]!==p||!c&&g!==p)&&this.setState(v);return}if(!(YY(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?Zl({},c,x):x};(c&&g[c]!==x||!c&&g!==x)&&this.setState(y)}this.runAnimation(mn(mn({},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=jJ(s,u,bJ(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 O=y.duration,A=y.easing,T=A===void 0?"ease":A,E=y.style,P=y.properties,C=y.onAnimationEnd,$=S>0?s[S-1]:y,D=P||Object.keys(E);if(typeof T=="function"||T==="spring")return[].concat(L0(x),[a.runJSAnimation.bind(a,{from:$.style,to:E,duration:O,easing:T}),O]);var W=I2(D,O,T),N=mn(mn(mn({},$.style),E),{},{transition:W});return[].concat(L0(x),[N,O,C]).filter(sJ)};return this.manager.start([c].concat(L0(s.reduce(v,[p,Math.max(g,u)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=nJ());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?Zl({},u,c):c,y=I2(Object.keys(x),s,f);w.start([p,a,mn(mn({},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=RJ(i,CJ),f=R.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,O=R.cloneElement(v,mn(mn({},c),{},{style:mn(mn({},y),p),className:S}));return O};return f===1?h(R.Children.only(a)):M.createElement("div",null,R.Children.map(a,function(g){return h(g)}))}}]),r})(R.PureComponent);Hn.displayName="Animate";Hn.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Hn.propTypes={from:Xe.oneOfType([Xe.object,Xe.string]),to:Xe.oneOfType([Xe.object,Xe.string]),attributeName:Xe.string,duration:Xe.number,begin:Xe.number,easing:Xe.oneOfType([Xe.string,Xe.func]),steps:Xe.arrayOf(Xe.shape({duration:Xe.number.isRequired,style:Xe.object.isRequired,easing:Xe.oneOfType([Xe.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Xe.func]),properties:Xe.arrayOf("string"),onAnimationEnd:Xe.func})),children:Xe.oneOfType([Xe.node,Xe.func]),isActive:Xe.bool,canBegin:Xe.bool,onAnimationEnd:Xe.func,shouldReAnimate:Xe.bool,onAnimationStart:Xe.func,onAnimationReStart:Xe.func};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 Vd(){return Vd=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},Vd.apply(this,arguments)}function WJ(t,e){return XJ(t)||GJ(t,e)||KJ(t,e)||VJ()}function VJ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
459
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KJ(t,e){if(t){if(typeof t=="string")return q2(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 q2(t,e)}}function q2(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 GJ(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 XJ(t){if(Array.isArray(t))return t}function U2(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 F2(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?U2(Object(r),!0).forEach(function(n){YJ(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):U2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function YJ(t,e,r){return e=JJ(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function JJ(t){var e=QJ(t,"string");return qu(e)=="symbol"?e:e+""}function QJ(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)}var H2=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,`,
|
|
460
|
-
`).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,`,
|
|
461
|
-
`).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,`,
|
|
462
|
-
`).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,`
|
|
463
|
-
A `).concat(w,",").concat(w,",0,0,").concat(f,",").concat(e+c*w,",").concat(r,`
|
|
464
|
-
L `).concat(e+n-c*w,",").concat(r,`
|
|
465
|
-
A `).concat(w,",").concat(w,",0,0,").concat(f,",").concat(e+n,",").concat(r+u*w,`
|
|
466
|
-
L `).concat(e+n,",").concat(r+i-u*w,`
|
|
467
|
-
A `).concat(w,",").concat(w,",0,0,").concat(f,",").concat(e+n-c*w,",").concat(r+i,`
|
|
468
|
-
L `).concat(e+c*w,",").concat(r+i,`
|
|
469
|
-
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},ZJ=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},eQ={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},y1=function(e){var r=F2(F2({},eQ),e),n=R.useRef(),i=R.useState(-1),a=WJ(i,2),s=a[0],u=a[1];R.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var T=n.current.getTotalLength();T&&u(T)}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,O=r.isUpdateAnimationActive;if(c!==+c||f!==+f||p!==+p||h!==+h||p===0||h===0)return null;var A=De("recharts-rectangle",v);return O?M.createElement(Hn,{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:O},function(T){var E=T.width,P=T.height,C=T.x,$=T.y;return M.createElement(Hn,{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},M.createElement("path",Vd({},Ee(r,!0),{className:A,d:H2(C,$,E,P,g),ref:n})))}):M.createElement("path",Vd({},Ee(r,!0),{className:A,d:H2(c,f,p,h,g)}))},tQ=["points","className","baseLinePoints","connectNulls"];function Xo(){return Xo=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},Xo.apply(this,arguments)}function rQ(t,e){if(t==null)return{};var r=nQ(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 nQ(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 W2(t){return sQ(t)||oQ(t)||aQ(t)||iQ()}function iQ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
470
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aQ(t,e){if(t){if(typeof t=="string")return Aw(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 Aw(t,e)}}function oQ(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function sQ(t){if(Array.isArray(t))return Aw(t)}function Aw(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 V2=function(e){return e&&e.x===+e.x&&e.y===+e.y},lQ=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return e.forEach(function(n){V2(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),V2(e[0])&&r[r.length-1].push(e[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},lu=function(e,r){var n=lQ(e);r&&(n=[n.reduce(function(a,s){return[].concat(W2(a),W2(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},uQ=function(e,r,n){var i=lu(e,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(lu(r.reverse(),n).slice(1))},cQ=function(e){var r=e.points,n=e.className,i=e.baseLinePoints,a=e.connectNulls,s=rQ(e,tQ);if(!r||!r.length)return null;var u=De("recharts-polygon",n);if(i&&i.length){var c=s.stroke&&s.stroke!=="none",f=uQ(r,i,a);return M.createElement("g",{className:u},M.createElement("path",Xo({},Ee(s,!0),{fill:f.slice(-1)==="Z"?s.fill:"none",stroke:"none",d:f})),c?M.createElement("path",Xo({},Ee(s,!0),{fill:"none",d:lu(r,a)})):null,c?M.createElement("path",Xo({},Ee(s,!0),{fill:"none",d:lu(i,a)})):null)}var p=lu(r,a);return M.createElement("path",Xo({},Ee(s,!0),{fill:p.slice(-1)==="Z"?s.fill:"none",className:u,d:p}))};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)}var Kh=function(e){var r=e.cx,n=e.cy,i=e.r,a=e.className,s=De("recharts-dot",a);return r===+r&&n===+n&&i===+i?R.createElement("circle",Pw({},Ee(e,!1),pd(e),{className:s,cx:r,cy:n,r:i})):null};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 fQ=["x","y","top","left","width","height","className"];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 K2(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 dQ(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?K2(Object(r),!0).forEach(function(n){hQ(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):K2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function hQ(t,e,r){return e=pQ(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function pQ(t){var e=mQ(t,"string");return Uu(e)=="symbol"?e:e+""}function mQ(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 gQ(t,e){if(t==null)return{};var r=vQ(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 vQ(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 yQ=function(e,r,n,i,a,s){return"M".concat(e,",").concat(a,"v").concat(i,"M").concat(s,",").concat(r,"h").concat(n)},bQ=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=gQ(e,fQ),y=dQ({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:M.createElement("path",Tw({},Ee(y,!0),{className:De("recharts-cross",w),d:yQ(n,a,h,v,u,f)}))},D0,G2;function wQ(){if(G2)return D0;G2=1;var t=Uh(),e=y$(),r=Vn();function n(i,a){return i&&i.length?t(i,r(a,2),e):void 0}return D0=n,D0}var xQ=wQ();const _Q=Je(xQ);var B0,X2;function SQ(){if(X2)return B0;X2=1;var t=Uh(),e=Vn(),r=b$();function n(i,a){return i&&i.length?t(i,e(a,2),r):void 0}return B0=n,B0}var kQ=SQ();const OQ=Je(kQ);var EQ=["cx","cy","angle","ticks","axisLine"],AQ=["ticks","tick","angle","tickFormatter","stroke"];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 uu(){return uu=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},uu.apply(this,arguments)}function Y2(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 Na(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Y2(Object(r),!0).forEach(function(n){Gh(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Y2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function J2(t,e){if(t==null)return{};var r=PQ(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 PQ(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 TQ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Q2(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 jQ(t,e,r){return e&&Q2(t.prototype,e),r&&Q2(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function CQ(t,e,r){return e=Kd(e),RQ(t,nI()?Reflect.construct(e,r||[],Kd(t).constructor):e.apply(t,r))}function RQ(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 NQ(t)}function NQ(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 Kd(t){return Kd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Kd(t)}function $Q(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 Gh(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=IQ(t,"string");return ys(e)=="symbol"?e:e+""}function IQ(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(e==="string"?String:Number)(t)}var Xh=(function(t){function e(){return TQ(this,e),CQ(this,e,arguments)}return $Q(e,t),jQ(e,[{key:"getTickValueCoord",value:function(n){var i=n.coordinate,a=this.props,s=a.angle,u=a.cx,c=a.cy;return ot(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=_Q(u,function(p){return p.coordinate||0}),f=OQ(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=J2(n,EQ),p=u.reduce(function(w,x){return[Math.min(w[0],x.coordinate),Math.max(w[1],x.coordinate)]},[1/0,-1/0]),h=ot(i,a,p[0],s),g=ot(i,a,p[1],s),v=Na(Na(Na({},Ee(f,!1)),{},{fill:"none"},Ee(c,!1)),{},{x1:h.x,y1:h.y,x2:g.x,y2:g.y});return M.createElement("line",uu({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=J2(i,AQ),h=this.getTickTextAnchor(),g=Ee(p,!1),v=Ee(s,!1),w=a.map(function(x,y){var S=n.getTickValueCoord(x),O=Na(Na(Na(Na({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 M.createElement(Ue,uu({className:De("recharts-polar-radius-axis-tick",V$(s)),key:"tick-".concat(x.coordinate)},Qa(n.props,x,y)),e.renderTickItem(s,O,c?c(x.value,y):x.value))});return M.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:M.createElement(Ue,{className:De("recharts-polar-radius-axis",this.props.className)},a&&this.renderAxisLine(),s&&this.renderTicks(),Kt.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(n,i,a){var s;return M.isValidElement(n)?s=M.cloneElement(n,i):$e(n)?s=n(i):s=M.createElement(Za,uu({},i,{className:"recharts-polar-radius-axis-tick-value"}),a),s}}])})(R.PureComponent);Gh(Xh,"displayName","PolarRadiusAxis");Gh(Xh,"axisType","radiusAxis");Gh(Xh,"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 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 Ba(){return Ba=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},Ba.apply(this,arguments)}function Z2(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 $a(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Z2(Object(r),!0).forEach(function(n){Yh(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Z2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function MQ(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,oI(n.key),n)}}function LQ(t,e,r){return e&&ej(t.prototype,e),r&&ej(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function DQ(t,e,r){return e=Gd(e),BQ(t,aI()?Reflect.construct(e,r||[],Gd(t).constructor):e.apply(t,r))}function BQ(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 zQ(t)}function zQ(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 Gd(t){return Gd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Gd(t)}function qQ(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&&Cw(t,e)}function Cw(t,e){return Cw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Cw(t,e)}function Yh(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=UQ(t,"string");return bs(e)=="symbol"?e:e+""}function UQ(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(e==="string"?String:Number)(t)}var FQ=Math.PI/180,tj=1e-5,Jh=(function(t){function e(){return MQ(this,e),DQ(this,e,arguments)}return qQ(e,t),LQ(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=ot(a,s,u,n.coordinate),g=ot(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*FQ),s;return a>tj?s=i==="outer"?"start":"end":a<-tj?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=$a($a({},Ee(this.props,!1)),{},{fill:"none"},Ee(u,!1));if(c==="circle")return M.createElement(Kh,Ba({className:"recharts-polar-angle-axis-line"},f,{cx:i,cy:a,r:s}));var p=this.props.ticks,h=p.map(function(g){return ot(i,a,s,g.coordinate)});return M.createElement(cQ,Ba({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=$a($a({},p),{},{fill:"none"},Ee(u,!1)),v=a.map(function(w,x){var y=n.getTickLineCoord(w),S=n.getTickTextAnchor(w),O=$a($a($a({textAnchor:S},p),{},{stroke:"none",fill:f},h),{},{index:x,payload:w,x:y.x2,y:y.y2});return M.createElement(Ue,Ba({className:De("recharts-polar-angle-axis-tick",V$(s)),key:"tick-".concat(w.coordinate)},Qa(n.props,w,x)),u&&M.createElement("line",Ba({className:"recharts-polar-angle-axis-tick-line"},g,y)),s&&e.renderTickItem(s,O,c?c(w.value,x):w.value))});return M.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:M.createElement(Ue,{className:De("recharts-polar-angle-axis",this.props.className)},s&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,a){var s;return M.isValidElement(n)?s=M.cloneElement(n,i):$e(n)?s=n(i):s=M.createElement(Za,Ba({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),s}}])})(R.PureComponent);Yh(Jh,"displayName","PolarAngleAxis");Yh(Jh,"axisType","angleAxis");Yh(Jh,"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 z0,rj;function HQ(){if(rj)return z0;rj=1;var t=yN(),e=t(Object.getPrototypeOf,Object);return z0=e,z0}var q0,nj;function WQ(){if(nj)return q0;nj=1;var t=wi(),e=HQ(),r=xi(),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 q0=f,q0}var VQ=WQ();const KQ=Je(VQ);var U0,ij;function GQ(){if(ij)return U0;ij=1;var t=wi(),e=xi(),r="[object Boolean]";function n(i){return i===!0||i===!1||e(i)&&t(i)==r}return U0=n,U0}var XQ=GQ();const YQ=Je(XQ);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 Xd(){return Xd=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},Xd.apply(this,arguments)}function JQ(t,e){return tZ(t)||eZ(t,e)||ZQ(t,e)||QQ()}function QQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
471
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZQ(t,e){if(t){if(typeof t=="string")return aj(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 aj(t,e)}}function aj(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 eZ(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 tZ(t){if(Array.isArray(t))return 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 sj(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){rZ(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 rZ(t,e,r){return e=nZ(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function nZ(t){var e=iZ(t,"string");return Fu(e)=="symbol"?e:e+""}function iZ(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)}var lj=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},aZ={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},oZ=function(e){var r=sj(sj({},aZ),e),n=R.useRef(),i=R.useState(-1),a=JQ(i,2),s=a[0],u=a[1];R.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var A=n.current.getTotalLength();A&&u(A)}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 O=De("recharts-trapezoid",v);return S?M.createElement(Hn,{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(A){var T=A.upperWidth,E=A.lowerWidth,P=A.height,C=A.x,$=A.y;return M.createElement(Hn,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:x,easing:w},M.createElement("path",Xd({},Ee(r,!0),{className:O,d:lj(C,$,T,E,P),ref:n})))}):M.createElement("g",null,M.createElement("path",Xd({},Ee(r,!0),{className:O,d:lj(c,f,p,h,g)})))},sZ=["option","shapeType","propTransformer","activeClassName","isActive"];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 lZ(t,e){if(t==null)return{};var r=uZ(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 uZ(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 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 Yd(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){cZ(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 cZ(t,e,r){return e=fZ(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function fZ(t){var e=dZ(t,"string");return Hu(e)=="symbol"?e:e+""}function dZ(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 hZ(t,e){return Yd(Yd({},e),t)}function pZ(t,e){return t==="symbols"}function cj(t){var e=t.shapeType,r=t.elementProps;switch(e){case"rectangle":return M.createElement(y1,r);case"trapezoid":return M.createElement(oZ,r);case"sector":return M.createElement(X$,r);case"symbols":if(pZ(e))return M.createElement(Lx,r);break;default:return null}}function mZ(t){return R.isValidElement(t)?t.props:t}function sI(t){var e=t.option,r=t.shapeType,n=t.propTransformer,i=n===void 0?hZ:n,a=t.activeClassName,s=a===void 0?"recharts-active-shape":a,u=t.isActive,c=lZ(t,sZ),f;if(R.isValidElement(e))f=R.cloneElement(e,Yd(Yd({},c),mZ(e)));else if($e(e))f=e(c);else if(KQ(e)&&!YQ(e)){var p=i(e,c);f=M.createElement(cj,{shapeType:r,elementProps:p})}else{var h=c;f=M.createElement(cj,{shapeType:r,elementProps:h})}return u?M.createElement(Ue,{className:s},f):f}function Qh(t,e){return e!=null&&"trapezoids"in t.props}function Zh(t,e){return e!=null&&"sectors"in t.props}function Wu(t,e){return e!=null&&"points"in t.props}function gZ(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 vZ(t,e){var r=t.endAngle===e.endAngle,n=t.startAngle===e.startAngle;return r&&n}function yZ(t,e){var r=t.x===e.x,n=t.y===e.y,i=t.z===e.z;return r&&n&&i}function bZ(t,e){var r;return Qh(t,e)?r=gZ:Zh(t,e)?r=vZ:Wu(t,e)&&(r=yZ),r}function wZ(t,e){var r;return Qh(t,e)?r="trapezoids":Zh(t,e)?r="sectors":Wu(t,e)&&(r="points"),r}function xZ(t,e){if(Qh(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(Zh(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 Wu(t,e)?e.payload:{}}function _Z(t){var e=t.activeTooltipItem,r=t.graphicalItem,n=t.itemData,i=wZ(r,e),a=xZ(r,e),s=n.filter(function(c,f){var p=ms(a,c),h=r.props[i].filter(function(w){var x=bZ(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 ed;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 Yo(){return Yo=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},Yo.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 it(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){en(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 SZ(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,uI(n.key),n)}}function kZ(t,e,r){return e&&dj(t.prototype,e),r&&dj(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function OZ(t,e,r){return e=Jd(e),EZ(t,lI()?Reflect.construct(e,r||[],Jd(t).constructor):e.apply(t,r))}function EZ(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 AZ(t)}function AZ(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function lI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(lI=function(){return!!t})()}function Jd(t){return Jd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Jd(t)}function PZ(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&&Rw(t,e)}function Rw(t,e){return Rw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Rw(t,e)}function en(t,e,r){return e=uI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function uI(t){var e=TZ(t,"string");return ws(e)=="symbol"?e:e+""}function TZ(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 Si=(function(t){function e(r){var n;return SZ(this,e),n=OZ(this,e,[r]),en(n,"pieRef",null),en(n,"sectorRefs",[]),en(n,"id",qs("recharts-pie-")),en(n,"handleAnimationEnd",function(){var i=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),$e(i)&&i()}),en(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 PZ(e,t),kZ(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,O=ot(x.cx,x.cy,x.outerRadius+v,S),A=it(it(it(it({},p),x),{},{stroke:"none"},h),{},{index:y,textAnchor:e.getTextAnchor(O.x,x.cx)},O),T=it(it(it(it({},p),x),{},{fill:"none",stroke:x.fill},g),{},{index:y,points:[ot(x.cx,x.cy,x.outerRadius,S),O]}),E=c;return Le(c)&&Le(f)?E="value":Le(c)&&(E=f),M.createElement(Ue,{key:"label-".concat(x.startAngle,"-").concat(x.endAngle,"-").concat(x.midAngle,"-").concat(y)},u&&e.renderLabelLineItem(u,T,"line"),e.renderLabelItem(s,A,Dt(x,E)))});return M.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=it(it({},f),{},{stroke:u?f.fill:f.stroke,tabIndex:-1});return M.createElement(Ue,Yo({ref:function(y){y&&!i.sectorRefs.includes(y)&&i.sectorRefs.push(y)},tabIndex:-1,className:"recharts-pie-sector"},Qa(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)}),M.createElement(sI,Yo({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 M.createElement(Hn,{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],O=S.startAngle;return a.forEach(function(A,T){var E=g&&g[T],P=T>0?Lr(A,"paddingAngle",0):0;if(E){var C=kr(E.endAngle-E.startAngle,A.endAngle-A.startAngle),$=it(it({},A),{},{startAngle:O+P,endAngle:O+C(x)+P});y.push($),O=$.endAngle}else{var D=A.endAngle,W=A.startAngle,N=kr(0,D-W),L=N(x),z=it(it({},A),{},{startAngle:O+P,endAngle:O+L+P});y.push(z),O=z.endAngle}}),M.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||!ms(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=De("recharts-pie",u);return M.createElement(Ue,{tabIndex:this.props.rootTabIndex,className:x,ref:function(S){n.pieRef=S}},this.renderSectors(),c&&this.renderLabels(s),Kt.renderCallByParent(this.props,null,!1),(!v||w)&&pi.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(M.isValidElement(n))return M.cloneElement(n,i);if($e(n))return n(i);var s=De("recharts-pie-label-line",typeof n!="boolean"?n.className:"");return M.createElement(as,Yo({},i,{key:a,type:"linear",className:s}))}},{key:"renderLabelItem",value:function(n,i,a){if(M.isValidElement(n))return M.cloneElement(n,i);var s=a;if($e(n)&&(s=n(i),M.isValidElement(s)))return s;var u=De("recharts-pie-label-text",typeof n!="boolean"&&!$e(n)?n.className:"");return M.createElement(Za,Yo({},i,{alignmentBaseline:"middle",className:u}),s)}}])})(R.PureComponent);ed=Si;en(Si,"displayName","Pie");en(Si,"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:!ao.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});en(Si,"parseDeltaAngle",function(t,e){var r=dr(e-t),n=Math.min(Math.abs(e-t),360);return r*n});en(Si,"getRealPieData",function(t){var e=t.data,r=t.children,n=Ee(t,!1),i=rn(r,Ih);return e&&e.length?e.map(function(a,s){return it(it(it({payload:a},n),a),i&&i[s]&&i[s].props)}):i&&i.length?i.map(function(a){return it(it({},n),a.props)}):[]});en(Si,"parseCoordinateOfPie",function(t,e){var r=e.top,n=e.left,i=e.width,a=e.height,s=W$(i,a),u=n+hr(t.cx,i,i/2),c=r+hr(t.cy,a,a/2),f=hr(t.innerRadius,s,0),p=hr(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}});en(Si,"getComposedData",function(t){var e=t.item,r=t.offset,n=e.type.defaultProps!==void 0?it(it({},e.type.defaultProps),e.props):e.props,i=ed.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=ed.parseCoordinateOfPie(n,r),x=ed.parseDeltaAngle(s,u),y=Math.abs(x),S=f;Le(f)&&Le(h)?(di(!1,`Use "dataKey" to specify the value of pie,
|
|
472
|
-
the props "valueKey" will be deprecated in 1.1.0`),S="value"):Le(f)&&(di(!1,`Use "dataKey" to specify the value of pie,
|
|
473
|
-
the props "valueKey" will be deprecated in 1.1.0`),S=h);var O=i.filter(function($){return Dt($,S,0)!==0}).length,A=(y>=360?O:O-1)*c,T=y-O*v-A,E=i.reduce(function($,D){var W=Dt(D,S,0);return $+(fe(W)?W:0)},0),P;if(E>0){var C;P=i.map(function($,D){var W=Dt($,S,0),N=Dt($,p,D),L=(fe(W)?W:0)/E,z;D?z=C.endAngle+dr(x)*c*(W!==0?1:0):z=s;var K=z+dr(x)*((W!==0?v:0)+L*T),V=(z+K)/2,X=(w.innerRadius+w.outerRadius)/2,Q=[{name:N,value:W,payload:$,dataKey:S,type:g}],G=ot(w.cx,w.cy,X,V);return C=it(it(it({percent:L,cornerRadius:a,name:N,tooltipPayload:Q,midAngle:V,middleRadius:X,tooltipPosition:G},$),w),{},{value:Dt($,S),startAngle:z,endAngle:K,payload:$,paddingAngle:dr(x)*c}),C})}return it(it({},w),{},{sectors:P,data:i})});var F0,hj;function jZ(){if(hj)return F0;hj=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 F0=r,F0}var H0,pj;function cI(){if(pj)return H0;pj=1;var t=$N(),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 H0=n,H0}var W0,mj;function CZ(){if(mj)return W0;mj=1;var t=jZ(),e=$h(),r=cI();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 W0=n,W0}var V0,gj;function RZ(){if(gj)return V0;gj=1;var t=CZ(),e=t();return V0=e,V0}var NZ=RZ();const Qd=Je(NZ);function Vu(t){"@babel/helpers - typeof";return Vu=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},Vu(t)}function vj(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 yj(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?vj(Object(r),!0).forEach(function(n){fI(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function fI(t,e,r){return e=$Z(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $Z(t){var e=IZ(t,"string");return Vu(e)=="symbol"?e:e+""}function IZ(t,e){if(Vu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Vu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var MZ=["Webkit","Moz","O","ms"],LZ=function(e,r){var n=e.replace(/(\w)/,function(a){return a.toUpperCase()}),i=MZ.reduce(function(a,s){return yj(yj({},a),{},fI({},s+n,r))},{});return i[e]=r,i};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 Zd(){return Zd=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},Zd.apply(this,arguments)}function bj(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 K0(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?bj(Object(r),!0).forEach(function(n){Nr(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function DZ(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wj(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,hI(n.key),n)}}function BZ(t,e,r){return e&&wj(t.prototype,e),r&&wj(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function zZ(t,e,r){return e=eh(e),qZ(t,dI()?Reflect.construct(e,r||[],eh(t).constructor):e.apply(t,r))}function qZ(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 dI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(dI=function(){return!!t})()}function eh(t){return eh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},eh(t)}function FZ(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 Nr(t,e,r){return e=hI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hI(t){var e=HZ(t,"string");return xs(e)=="symbol"?e:e+""}function HZ(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 WZ=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=au().domain(Qd(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}},xj=function(e){return e.changedTouches&&!!e.changedTouches.length},_s=(function(t){function e(r){var n;return DZ(this,e),n=zZ(this,e,[r]),Nr(n,"handleDrag",function(i){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(i):n.state.isSlideMoving&&n.handleSlideDrag(i)}),Nr(n,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&n.handleDrag(i.changedTouches[0])}),Nr(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()}),Nr(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Nr(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Nr(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Nr(n,"handleSlideDragStart",function(i){var a=xj(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 FZ(e,t),BZ(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=Dt(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=xj(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},O=n.pageX-a;O>0?O=Math.min(O,h+g-v-f):O<0&&(O=Math.max(O,h-f)),S[s]=f+O;var A=this.getIndex(S),T=A.startIndex,E=A.endIndex,P=function(){var $=y.length-1;return s==="startX"&&(u>c?T%x===0:E%x===0)||u<c&&E===$||s==="endX"&&(u>c?E%x===0:T%x===0)||u>c&&E===$};this.setState(Nr(Nr({},s,f+O),"brushMoveStartX",n.pageX),function(){w&&P()&&w(A)})}},{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(Nr({},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 M.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=R.Children.only(f);return h?M.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),O=K0(K0({},Ee(this.props,!1)),{},{x:S,y:f,width:p,height:h}),A=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 M.createElement(Ue,{tabIndex:0,role:"slider","aria-label":A,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(E){["ArrowLeft","ArrowRight"].includes(E.key)&&(E.preventDefault(),E.stopPropagation(),u.handleTravellerMoveKeyboard(E.key==="ArrowRight"?1:-1,i))},onFocus:function(){u.setState({isTravellerFocused:!0})},onBlur:function(){u.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},e.renderTraveller(g,O))}},{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 M.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 M.createElement(Ue,{className:"recharts-brush-texts"},M.createElement(Za,Zd({textAnchor:"end",verticalAnchor:"middle",x:Math.min(h,g)-v,y:s+u/2},w),this.getTextOfTick(i)),M.createElement(Za,Zd({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,O=g.isTravellerFocused;if(!i||!i.length||!fe(u)||!fe(c)||!fe(f)||!fe(p)||f<=0||p<=0)return null;var A=De("recharts-brush",a),T=M.Children.count(s)===1,E=LZ("userSelect","none");return M.createElement(Ue,{className:A,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:E},this.renderBackground(),T&&this.renderPanorama(),this.renderSlide(v,w),this.renderTravellerLayer(v,"startX"),this.renderTravellerLayer(w,"endX"),(x||y||S||O||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 M.createElement(M.Fragment,null,M.createElement("rect",{x:i,y:a,width:s,height:u,fill:c,stroke:"none"}),M.createElement("line",{x1:i+1,y1:f,x2:i+s-1,y2:f,fill:"none",stroke:"#fff"}),M.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 M.isValidElement(n)?a=M.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 K0({prevData:a,prevTravellerWidth:c,prevUpdateId:f,prevX:u,prevWidth:s},a&&a.length?WZ({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}}])})(R.PureComponent);Nr(_s,"displayName","Brush");Nr(_s,"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 G0,_j;function VZ(){if(_j)return G0;_j=1;var t=Hx();function e(r,n){var i;return t(r,function(a,s,u){return i=n(a,s,u),!i}),!!i}return G0=e,G0}var X0,Sj;function KZ(){if(Sj)return X0;Sj=1;var t=fN(),e=Vn(),r=VZ(),n=Er(),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 X0=a,X0}var GZ=KZ();const XZ=Je(GZ);var Un=function(e,r){var n=e.alwaysShow,i=e.ifOverflow;return n&&(i="extendDomain"),i===r},Y0,kj;function YZ(){if(kj)return Y0;kj=1;var t=TN();function e(r,n,i){n=="__proto__"&&t?t(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return Y0=e,Y0}var J0,Oj;function JZ(){if(Oj)return J0;Oj=1;var t=YZ(),e=AN(),r=Vn();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 J0=n,J0}var QZ=JZ();const ZZ=Je(QZ);var Q0,Ej;function eee(){if(Ej)return Q0;Ej=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 Q0=t,Q0}var Z0,Aj;function tee(){if(Aj)return Z0;Aj=1;var t=Hx();function e(r,n){var i=!0;return t(r,function(a,s,u){return i=!!n(a,s,u),i}),i}return Z0=e,Z0}var eb,Pj;function ree(){if(Pj)return eb;Pj=1;var t=eee(),e=tee(),r=Vn(),n=Er(),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 eb=a,eb}var nee=ree();const iee=Je(nee);var aee=["x","y"];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 $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)}function Tj(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 Wl(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Tj(Object(r),!0).forEach(function(n){oee(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Tj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function oee(t,e,r){return e=see(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function see(t){var e=lee(t,"string");return Ku(e)=="symbol"?e:e+""}function lee(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 uee(t,e){if(t==null)return{};var r=cee(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 cee(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 fee(t,e){var r=t.x,n=t.y,i=uee(t,aee),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 Wl(Wl(Wl(Wl(Wl({},e),i),s?{x:s}:{}),c?{y:c}:{}),{},{height:p,width:g,name:e.name,radius:e.radius})}function jj(t){return M.createElement(sI,$w({shapeType:"rectangle",propTransformer:fee,activeClassName:"recharts-active-bar"},t))}var dee=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)||CU(n);return a?e(n,i):(a||to(),r)}},hee=["value","background"],pI;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 pee(t,e){if(t==null)return{};var r=mee(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 mee(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 th(){return th=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},th.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 Tt(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){na(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 gee(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rj(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,gI(n.key),n)}}function vee(t,e,r){return e&&Rj(t.prototype,e),r&&Rj(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function yee(t,e,r){return e=rh(e),bee(t,mI()?Reflect.construct(e,r||[],rh(t).constructor):e.apply(t,r))}function bee(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 wee(t)}function wee(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(mI=function(){return!!t})()}function rh(t){return rh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},rh(t)}function xee(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&&Iw(t,e)}function Iw(t,e){return Iw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Iw(t,e)}function na(t,e,r){return e=gI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gI(t){var e=_ee(t,"string");return Ss(e)=="symbol"?e:e+""}function _ee(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 lc=(function(t){function e(){var r;gee(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=yee(this,e,[].concat(i)),na(r,"state",{isAnimationFinished:!1}),na(r,"id",qs("recharts-bar-")),na(r,"handleAnimationEnd",function(){var s=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),s&&s()}),na(r,"handleAnimationStart",function(){var s=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),s&&s()}),r}return xee(e,t),vee(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=Tt(Tt(Tt({},p),h),{},{isActive:v,option:w,index:g,dataKey:u,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return M.createElement(Ue,th({className:"recharts-bar-rectangle"},Qa(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)}),M.createElement(jj,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 M.createElement(Hn,{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 O=g&&g[S];if(O){var A=kr(O.x,y.x),T=kr(O.y,y.y),E=kr(O.width,y.width),P=kr(O.height,y.height);return Tt(Tt({},y),{},{x:A(w),y:T(w),width:E(w),height:P(w)})}if(s==="horizontal"){var C=kr(0,y.height),$=C(w);return Tt(Tt({},y),{},{y:y.y+y.height-$,height:$})}var D=kr(0,y.width),W=D(w);return Tt(Tt({},y),{},{width:W})});return M.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||!ms(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=pee(f,hee);if(!h)return null;var v=Tt(Tt(Tt(Tt(Tt({},g),{},{fill:"#eee"},h),c),Qa(n.props,f,p)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:s,index:p,className:"recharts-bar-background-rectangle"});return M.createElement(jj,th({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=rn(p,Vh);if(!h)return null;var g=f==="vertical"?s[0].height/2:s[0].width/2,v=function(y,S){var O=Array.isArray(y.value)?y.value[1]:y.value;return{x:y.x,y:y.y,value:O,errorVal:Dt(y,S)}},w={clipPath:n?"url(#clipPath-".concat(i,")"):null};return M.createElement(Ue,w,h.map(function(x){return M.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=De("recharts-bar",s),O=u&&u.allowDataOverflow,A=c&&c.allowDataOverflow,T=O||A,E=Le(x)?this.id:x;return M.createElement(Ue,{className:S},O||A?M.createElement("defs",null,M.createElement("clipPath",{id:"clipPath-".concat(E)},M.createElement("rect",{x:O?f:f-h/2,y:A?p:p-g/2,width:O?h:h*2,height:A?g:g*2}))):null,M.createElement(Ue,{className:"recharts-bar-rectangles",clipPath:T?"url(#clipPath-".concat(E,")"):null},w?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(T,E),(!v||y)&&pi.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}}])})(R.PureComponent);pI=lc;na(lc,"displayName","Bar");na(lc,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!ao.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});na(lc,"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=VG(n,r);if(!v)return null;var w=e.layout,x=r.type.defaultProps,y=x!==void 0?Tt(Tt({},x),r.props):r.props,S=y.dataKey,O=y.children,A=y.minPointSize,T=w==="horizontal"?s:a,E=f?T.scale.domain():null,P=ZG({numericAxis:T}),C=rn(O,Ih),$=h.map(function(D,W){var N,L,z,K,V,X;f?N=KG(f[p+W],E):(N=Dt(D,S),Array.isArray(N)||(N=[P,N]));var Q=dee(A,pI.defaultProps.minPointSize)(N[1],W);if(w==="horizontal"){var G,te=[s.scale(N[0]),s.scale(N[1])],F=te[0],I=te[1];L=o2({axis:a,ticks:u,bandSize:i,offset:v.offset,entry:D,index:W}),z=(G=I??F)!==null&&G!==void 0?G:void 0,K=v.size;var U=F-I;if(V=Number.isNaN(U)?0:U,X={x:L,y:s.y,width:K,height:s.height},Math.abs(Q)>0&&Math.abs(V)<Math.abs(Q)){var ee=dr(V||Q)*(Math.abs(Q)-Math.abs(V));z-=ee,V+=ee}}else{var se=[a.scale(N[0]),a.scale(N[1])],ue=se[0],de=se[1];if(L=ue,z=o2({axis:s,ticks:c,bandSize:i,offset:v.offset,entry:D,index:W}),K=de-ue,V=v.size,X={x:a.x,y:z,width:a.width,height:V},Math.abs(Q)>0&&Math.abs(K)<Math.abs(Q)){var Re=dr(K||Q)*(Math.abs(Q)-Math.abs(K));K+=Re}}return Tt(Tt(Tt({},D),{},{x:L,y:z,width:K,height:V,value:f?N:N[1],payload:D,background:X},C&&C[W]&&C[W].props),{},{tooltipPayload:[F$(r,D)],tooltipPosition:{x:L+K/2,y:z+V/2}})});return Tt({data:$,layout:w},g)});function Gu(t){"@babel/helpers - typeof";return Gu=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},Gu(t)}function See(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Nj(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,vI(n.key),n)}}function kee(t,e,r){return e&&Nj(t.prototype,e),r&&Nj(t,r),Object.defineProperty(t,"prototype",{writable:!1}),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 bn(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){ep(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 ep(t,e,r){return e=vI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vI(t){var e=Oee(t,"string");return Gu(e)=="symbol"?e:e+""}function Oee(t,e){if(Gu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Gu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Eee=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=!!$r(f,lc);return p.reduce(function(v,w){var x=r[w],y=x.orientation,S=x.domain,O=x.padding,A=O===void 0?{}:O,T=x.mirror,E=x.reversed,P="".concat(y).concat(T?"Mirror":""),C,$,D,W,N;if(x.type==="number"&&(x.padding==="gap"||x.padding==="no-gap")){var L=S[1]-S[0],z=1/0,K=x.categoricalDomain.sort($U);if(K.forEach(function(se,ue){ue>0&&(z=Math.min((se||0)-(K[ue-1]||0),z))}),Number.isFinite(z)){var V=z/L,X=x.layout==="vertical"?n.height:n.width;if(x.padding==="gap"&&(C=V*X/2),x.padding==="no-gap"){var Q=hr(e.barCategoryGap,V*X),G=V*X/2;C=G-Q-(G-Q)/X*Q}}}i==="xAxis"?$=[n.left+(A.left||0)+(C||0),n.left+n.width-(A.right||0)-(C||0)]:i==="yAxis"?$=c==="horizontal"?[n.top+n.height-(A.bottom||0),n.top+(A.top||0)]:[n.top+(A.top||0)+(C||0),n.top+n.height-(A.bottom||0)-(C||0)]:$=x.range,E&&($=[$[1],$[0]]);var te=B$(x,a,g),F=te.scale,I=te.realScaleType;F.domain(S).range($),z$(F);var U=q$(F,bn(bn({},x),{},{realScaleType:I}));i==="xAxis"?(N=y==="top"&&!T||y==="bottom"&&T,D=n.left,W=h[P]-N*x.height):i==="yAxis"&&(N=y==="left"&&!T||y==="right"&&T,D=h[P]-N*x.width,W=n.top);var ee=bn(bn(bn({},x),U),{},{realScaleType:I,x:D,y:W,scale:F,width:i==="xAxis"?n.width:x.width,height:i==="yAxis"?n.height:x.height});return ee.bandSize=Bd(ee,U),!x.hide&&i==="xAxis"?h[P]+=(N?-1:1)*ee.height:x.hide||(h[P]+=(N?-1:1)*ee.width),bn(bn({},v),{},ep({},w,ee))},{})},yI=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)}},Aee=function(e){var r=e.x1,n=e.y1,i=e.x2,a=e.y2;return yI({x:r,y:n},{x:i,y:a})},bI=(function(){function t(e){See(this,t),this.scale=e}return kee(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)}}])})();ep(bI,"EPS",1e-4);var b1=function(e){var r=Object.keys(e).reduce(function(n,i){return bn(bn({},n),{},ep({},i,bI.create(e[i])))},{});return bn(bn({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=a.bandAware,u=a.position;return ZZ(i,function(c,f){return r[f].apply(c,{bandAware:s,position:u})})},isInRange:function(i){return iee(i,function(a,s){return r[s].isInRange(a)})}})};function Pee(t){return(t%180+180)%180}var Tee=function(e){var r=e.width,n=e.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=Pee(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)},tb,Ij;function jee(){if(Ij)return tb;Ij=1;var t=Vn(),e=nc(),r=Rh();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 tb=n,tb}var rb,Mj;function Cee(){if(Mj)return rb;Mj=1;var t=cI();function e(r){var n=t(r),i=n%1;return n===n?i?n-i:n:0}return rb=e,rb}var nb,Lj;function Ree(){if(Lj)return nb;Lj=1;var t=_N(),e=Vn(),r=Cee(),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 nb=i,nb}var ib,Dj;function Nee(){if(Dj)return ib;Dj=1;var t=jee(),e=Ree(),r=t(e);return ib=r,ib}Nee();var $ee=DR();const Iee=Je($ee);var Mee=Iee(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("")}),wI=R.createContext(void 0),xI=R.createContext(void 0),_I=R.createContext(void 0),Lee=R.createContext({}),SI=R.createContext(void 0),kI=R.createContext(0),OI=R.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=Mee(a);return M.createElement(wI.Provider,{value:n},M.createElement(xI.Provider,{value:i},M.createElement(Lee.Provider,{value:a},M.createElement(_I.Provider,{value:p},M.createElement(SI.Provider,{value:s},M.createElement(kI.Provider,{value:f},M.createElement(OI.Provider,{value:c},u)))))))},Dee=function(){return R.useContext(SI)},EI=function(e){var r=R.useContext(wI);r==null&&to();var n=r[e];return n==null&&to(),n},AI=function(e){var r=R.useContext(xI);r==null&&to();var n=r[e];return n==null&&to(),n},Bee=function(){var e=R.useContext(_I);return e},PI=function(){return R.useContext(OI)},TI=function(){return R.useContext(kI)};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 zee(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qee(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,CI(n.key),n)}}function Uee(t,e,r){return e&&qee(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Fee(t,e,r){return e=nh(e),Hee(t,jI()?Reflect.construct(e,r||[],nh(t).constructor):e.apply(t,r))}function Hee(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 Wee(t)}function Wee(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function jI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jI=function(){return!!t})()}function nh(t){return nh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},nh(t)}function Vee(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 zj(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 qj(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?zj(Object(r),!0).forEach(function(n){w1(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function w1(t,e,r){return e=CI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function CI(t){var e=Kee(t,"string");return ks(e)=="symbol"?e:e+""}function Kee(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 Gee(t,e){return Qee(t)||Jee(t,e)||Yee(t,e)||Xee()}function Xee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
474
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yee(t,e){if(t){if(typeof t=="string")return Uj(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 Uj(t,e)}}function Uj(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 Jee(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 Qee(t){if(Array.isArray(t))return t}function Lw(){return Lw=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},Lw.apply(this,arguments)}var Zee=function(e,r){var n;return M.isValidElement(e)?n=M.cloneElement(e,r):$e(e)?n=e(r):n=M.createElement("line",Lw({},r,{className:"recharts-reference-line-line"})),n},ete=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,O=e.x.apply(S,{position:s});if(Un(f,"discard")&&!e.x.isInRange(O))return null;var A=[{x:O,y:h+v},{x:O,y:h}];return u==="top"?A.reverse():A}if(i){var T=f.segment,E=T.map(function(P){return e.apply(P,{position:s})});return Un(f,"discard")&&XZ(E,function(P){return!e.isInRange(P)})?null:E}return null};function tte(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=Dee(),p=EI(i),h=AI(a),g=Bee();if(!f||!g)return null;di(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var v=b1({x:p.scale,y:h.scale}),w=Bt(e),x=Bt(r),y=n&&n.length===2,S=ete(v,w,x,y,g,t.position,p.orientation,h.orientation,t);if(!S)return null;var O=Gee(S,2),A=O[0],T=A.x,E=A.y,P=O[1],C=P.x,$=P.y,D=Un(t,"hidden")?"url(#".concat(f,")"):void 0,W=qj(qj({clipPath:D},Ee(t,!0)),{},{x1:T,y1:E,x2:C,y2:$});return M.createElement(Ue,{className:De("recharts-reference-line",u)},Zee(s,W),Kt.renderCallByParent(t,Aee({x1:T,y1:E,x2:C,y2:$})))}var x1=(function(t){function e(){return zee(this,e),Fee(this,e,arguments)}return Vee(e,t),Uee(e,[{key:"render",value:function(){return M.createElement(tte,this.props)}}])})(M.Component);w1(x1,"displayName","ReferenceLine");w1(x1,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Dw(){return Dw=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},Dw.apply(this,arguments)}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 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 Hj(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){tp(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 rte(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nte(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,NI(n.key),n)}}function ite(t,e,r){return e&&nte(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function ate(t,e,r){return e=ih(e),ote(t,RI()?Reflect.construct(e,r||[],ih(t).constructor):e.apply(t,r))}function ote(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 ste(t)}function ste(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function RI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(RI=function(){return!!t})()}function ih(t){return ih=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ih(t)}function lte(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&&Bw(t,e)}function Bw(t,e){return Bw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Bw(t,e)}function tp(t,e,r){return e=NI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function NI(t){var e=ute(t,"string");return Os(e)=="symbol"?e:e+""}function ute(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)}var cte=function(e){var r=e.x,n=e.y,i=e.xAxis,a=e.yAxis,s=b1({x:i.scale,y:a.scale}),u=s.apply({x:r,y:n},{bandAware:!0});return Un(e,"discard")&&!s.isInRange(u)?null:u},rp=(function(t){function e(){return rte(this,e),ate(this,e,arguments)}return lte(e,t),ite(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=Bt(i),p=Bt(a);if(di(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!f||!p)return null;var h=cte(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,O=Hj(Hj({clipPath:S},Ee(this.props,!0)),{},{cx:g,cy:v});return M.createElement(Ue,{className:De("recharts-reference-dot",y)},e.renderDot(x,O),Kt.renderCallByParent(this.props,{x:g-s,y:v-s,width:2*s,height:2*s}))}}])})(M.Component);tp(rp,"displayName","ReferenceDot");tp(rp,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});tp(rp,"renderDot",function(t,e){var r;return M.isValidElement(t)?r=M.cloneElement(t,e):$e(t)?r=t(e):r=M.createElement(Kh,Dw({},e,{cx:e.cx,cy:e.cy,className:"recharts-reference-dot-dot"})),r});function zw(){return zw=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},zw.apply(this,arguments)}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 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 Vj(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){np(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 fte(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dte(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 hte(t,e,r){return e&&dte(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function pte(t,e,r){return e=ah(e),mte(t,$I()?Reflect.construct(e,r||[],ah(t).constructor):e.apply(t,r))}function mte(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 gte(t)}function gte(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $I(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($I=function(){return!!t})()}function ah(t){return ah=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ah(t)}function vte(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&&qw(t,e)}function qw(t,e){return qw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},qw(t,e)}function np(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=yte(t,"string");return Es(e)=="symbol"?e:e+""}function yte(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 String(t)}var bte=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=b1({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:yI(v,w)},ip=(function(t){function e(){return fte(this,e),pte(this,e,arguments)}return vte(e,t),hte(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;di(f===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=Bt(i),g=Bt(a),v=Bt(s),w=Bt(u),x=this.props.shape;if(!h&&!g&&!v&&!w&&!x)return null;var y=bte(h,g,v,w,this.props);if(!y&&!x)return null;var S=Un(this.props,"hidden")?"url(#".concat(p,")"):void 0;return M.createElement(Ue,{className:De("recharts-reference-area",c)},e.renderRect(x,Vj(Vj({clipPath:S},Ee(this.props,!0)),y)),Kt.renderCallByParent(this.props,y))}}])})(M.Component);np(ip,"displayName","ReferenceArea");np(ip,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});np(ip,"renderRect",function(t,e){var r;return M.isValidElement(t)?r=M.cloneElement(t,e):$e(t)?r=t(e):r=M.createElement(y1,zw({},e,{className:"recharts-reference-area-rect"})),r});function MI(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 wte(t,e,r){var n={width:t.width+e.width,height:t.height+e.height};return Tee(n,r)}function xte(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 oh(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 _te(t,e){return MI(t,e+1)}function Ste(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:MI(n,f)};var x=c,y,S=function(){return y===void 0&&(y=r(w,x)),y},O=w.coordinate,A=c===0||oh(t,O,S,p,u);A||(c=0,p=s,f+=1),A&&(p=O+t*(S()/2+i),c+=f)},g;f<=a.length;)if(g=h(),g)return g.v;return[]}function Xu(t){"@babel/helpers - typeof";return Xu=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},Xu(t)}function Kj(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 sr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Kj(Object(r),!0).forEach(function(n){kte(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Kj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function kte(t,e,r){return e=Ote(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ote(t){var e=Ete(t,"string");return Xu(e)=="symbol"?e:e+""}function Ete(t,e){if(Xu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Xu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ate(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=sr(sr({},v),{},{tickCoord:y>0?v.coordinate-y*t:v.coordinate})}else a[g]=v=sr(sr({},v),{},{tickCoord:v.coordinate});var S=oh(t,v.tickCoord,x,u,c);S&&(c=v.tickCoord-t*(x()/2+i),a[g]=sr(sr({},v),{},{isShow:!0}))},p=s-1;p>=0;p--)f(p);return a}function Pte(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=sr(sr({},p),{},{tickCoord:g>0?p.coordinate-g*t:p.coordinate});var v=oh(t,p.tickCoord,function(){return h},c,f);v&&(f=p.tickCoord-t*(h/2+i),s[u-1]=sr(sr({},p),{},{isShow:!0}))}for(var w=a?u-1:u,x=function(O){var A=s[O],T,E=function(){return T===void 0&&(T=r(A,O)),T};if(O===0){var P=t*(A.coordinate-t*E()/2-c);s[O]=A=sr(sr({},A),{},{tickCoord:P<0?A.coordinate-P*t:A.coordinate})}else s[O]=A=sr(sr({},A),{},{tickCoord:A.coordinate});var C=oh(t,A.tickCoord,E,c,f);C&&(c=A.tickCoord+t*(E()/2+i),s[O]=sr(sr({},A),{},{isShow:!0}))},y=0;y<w;y++)x(y);return s}function Tte(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)||ao.isSsr)return _te(i,typeof c=="number"&&fe(c)?c:0);var g=[],v=u==="top"||u==="bottom"?"width":"height",w=p&&v==="width"?iu(p,{fontSize:e,letterSpacing:r}):{width:0,height:0},x=function(A,T){var E=$e(f)?f(A.value,T):A.value;return v==="width"?wte(iu(E,{fontSize:e,letterSpacing:r}),w,h):iu(E,{fontSize:e,letterSpacing:r})[v]},y=i.length>=2?dr(i[1].coordinate-i[0].coordinate):1,S=xte(a,y,v);return c==="equidistantPreserveStart"?Ste(y,S,x,i,s):(c==="preserveStart"||c==="preserveStartEnd"?g=Pte(y,S,x,i,s,c==="preserveStartEnd"):g=Ate(y,S,x,i,s),g.filter(function(O){return O.isShow}))}var jte=["viewBox"],Cte=["viewBox"],Rte=["ticks"];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 Jo(){return Jo=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},Jo.apply(this,arguments)}function Gj(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 Mt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Gj(Object(r),!0).forEach(function(n){_1(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Gj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function ab(t,e){if(t==null)return{};var r=Nte(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 Nte(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 $te(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xj(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,DI(n.key),n)}}function Ite(t,e,r){return e&&Xj(t.prototype,e),r&&Xj(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Mte(t,e,r){return e=sh(e),Lte(t,LI()?Reflect.construct(e,r||[],sh(t).constructor):e.apply(t,r))}function Lte(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 Dte(t)}function Dte(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function LI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(LI=function(){return!!t})()}function sh(t){return sh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},sh(t)}function Bte(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 _1(t,e,r){return e=DI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function DI(t){var e=zte(t,"string");return As(e)=="symbol"?e:e+""}function zte(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 ap=(function(t){function e(r){var n;return $te(this,e),n=Mte(this,e,[r]),n.state={fontSize:"",letterSpacing:""},n}return Bte(e,t),Ite(e,[{key:"shouldComponentUpdate",value:function(n,i){var a=n.viewBox,s=ab(n,jte),u=this.props,c=u.viewBox,f=ab(u,Cte);return!ts(a,c)||!ts(s,f)||!ts(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,O,A=h?-1:1,T=n.tickSize||p,E=fe(n.tickCoord)?n.tickCoord:n.coordinate;switch(f){case"top":v=w=n.coordinate,y=s+ +!h*c,x=y-A*T,O=x-A*g,S=E;break;case"left":x=y=n.coordinate,w=a+ +!h*u,v=w-A*T,S=v-A*g,O=E;break;case"right":x=y=n.coordinate,w=a+ +h*u,v=w+A*T,S=v+A*g,O=E;break;default:v=w=n.coordinate,y=s+ +h*c,x=y+A*T,O=x+A*g,S=E;break}return{line:{x1:v,y1:x,x2:w,y2:y},tick:{x:S,y:O}}}},{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=Mt(Mt(Mt({},Ee(this.props,!1)),Ee(p,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var g=+(c==="top"&&!f||c==="bottom"&&f);h=Mt(Mt({},h),{},{x1:i,y1:a+g*u,x2:i+s,y2:a+g*u})}else{var v=+(c==="left"&&!f||c==="right"&&f);h=Mt(Mt({},h),{},{x1:i+v*s,y1:a,x2:i+v*s,y2:a+u})}return M.createElement("line",Jo({},h,{className:De("recharts-cartesian-axis-line",Lr(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=Tte(Mt(Mt({},this.props),{},{ticks:n}),i,a),w=this.getTickTextAnchor(),x=this.getTickVerticalAnchor(),y=Ee(this.props,!1),S=Ee(p,!1),O=Mt(Mt({},y),{},{fill:"none"},Ee(c,!1)),A=v.map(function(T,E){var P=s.getTickLineCoord(T),C=P.line,$=P.tick,D=Mt(Mt(Mt(Mt({textAnchor:w,verticalAnchor:x},y),{},{stroke:"none",fill:f},S),$),{},{index:E,payload:T,visibleTicksCount:v.length,tickFormatter:h});return M.createElement(Ue,Jo({className:"recharts-cartesian-axis-tick",key:"tick-".concat(T.value,"-").concat(T.coordinate,"-").concat(T.tickCoord)},Qa(s.props,T,E)),c&&M.createElement("line",Jo({},O,C,{className:De("recharts-cartesian-axis-tick-line",Lr(c,"className"))})),p&&e.renderTickItem(p,D,"".concat($e(h)?h(T.value,E):T.value).concat(g||"")))});return M.createElement("g",{className:"recharts-cartesian-axis-ticks"},A)}},{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=ab(h,Rte),w=g;return $e(c)&&(w=g&&g.length>0?c(this.props):c(v)),s<=0||u<=0||!w||!w.length?null:M.createElement(Ue,{className:De("recharts-cartesian-axis",f),ref:function(y){n.layerReference=y}},a&&this.renderAxisLine(),this.renderTicks(w,this.state.fontSize,this.state.letterSpacing),Kt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var s,u=De(i.className,"recharts-cartesian-axis-tick-value");return M.isValidElement(n)?s=M.cloneElement(n,Mt(Mt({},i),{},{className:u})):$e(n)?s=n(Mt(Mt({},i),{},{className:u})):s=M.createElement(Za,Jo({},i,{className:"recharts-cartesian-axis-tick-value"}),a),s}}])})(R.Component);_1(ap,"displayName","CartesianAxis");_1(ap,"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 qte=["layout","type","stroke","connectNulls","isRange","ref"],Ute=["key"],BI;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 zI(t,e){if(t==null)return{};var r=Fte(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 Fte(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 Wa(){return Wa=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},Wa.apply(this,arguments)}function Yj(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 Ji(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Yj(Object(r),!0).forEach(function(n){zn(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Yj(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Hte(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,UI(n.key),n)}}function Wte(t,e,r){return e&&Jj(t.prototype,e),r&&Jj(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Vte(t,e,r){return e=lh(e),Kte(t,qI()?Reflect.construct(e,r||[],lh(t).constructor):e.apply(t,r))}function Kte(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 Gte(t)}function Gte(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function qI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qI=function(){return!!t})()}function lh(t){return lh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},lh(t)}function Xte(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&&Fw(t,e)}function Fw(t,e){return Fw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Fw(t,e)}function zn(t,e,r){return e=UI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function UI(t){var e=Yte(t,"string");return Ps(e)=="symbol"?e:e+""}function Yte(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 String(t)}var ca=(function(t){function e(){var r;Hte(this,e);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=Vte(this,e,[].concat(i)),zn(r,"state",{isAnimationFinished:!0}),zn(r,"id",qs("recharts-area-")),zn(r,"handleAnimationEnd",function(){var s=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),$e(s)&&s()}),zn(r,"handleAnimationStart",function(){var s=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),$e(s)&&s()}),r}return Xte(e,t),Wte(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 O=Ji(Ji(Ji({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,O)}),x={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return M.createElement(Ue,Wa({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=ra(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(ra(a.map(function(g){return g.y||0})),h)),fe(h)?M.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=ra(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(ra(a.map(function(g){return g.x||0})),h)),fe(h)?M.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=zI(u,qte);return M.createElement(Ue,{clipPath:a?"url(#clipPath-".concat(s,")"):null},M.createElement(as,Wa({},Ee(v,!0),{points:n,connectNulls:h,type:f,baseLine:i,layout:c,stroke:"none",className:"recharts-area-area"})),p!=="none"&&M.createElement(as,Wa({},Ee(this.props,!1),{className:"recharts-area-curve",layout:c,type:f,connectNulls:h,fill:"none",points:n})),p!=="none"&&g&&M.createElement(as,Wa({},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 M.createElement(Hn,{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 O=S.t;if(x){var A=x.length/u.length,T=u.map(function($,D){var W=Math.floor(D*A);if(x[W]){var N=x[W],L=kr(N.x,$.x),z=kr(N.y,$.y);return Ji(Ji({},$),{},{x:L(O),y:z(O)})}return $}),E;if(fe(c)&&typeof c=="number"){var P=kr(y,c);E=P(O)}else if(Le(c)||zs(c)){var C=kr(y,0);E=C(O)}else E=c.map(function($,D){var W=Math.floor(D*A);if(y[W]){var N=y[W],L=kr(N.x,$.x),z=kr(N.y,$.y);return Ji(Ji({},$),{},{x:L(O),y:z(O)})}return $});return a.renderAreaStatically(T,E,n,i)}return M.createElement(Ue,null,M.createElement("defs",null,M.createElement("clipPath",{id:"animationClipPath-".concat(i)},a.renderClipRect(O))),M.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||!ms(p,s)||!ms(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,O=u.length===1,A=De("recharts-area",c),T=h&&h.allowDataOverflow,E=g&&g.allowDataOverflow,P=T||E,C=Le(y)?this.id:y,$=(n=Ee(s,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},D=$.r,W=D===void 0?3:D,N=$.strokeWidth,L=N===void 0?2:N,z=FU(s)?s:{},K=z.clipDot,V=K===void 0?!0:K,X=W*2+L;return M.createElement(Ue,{className:A},T||E?M.createElement("defs",null,M.createElement("clipPath",{id:"clipPath-".concat(C)},M.createElement("rect",{x:T?p:p-v/2,y:E?f:f-w/2,width:T?v:v*2,height:E?w:w*2})),!V&&M.createElement("clipPath",{id:"clipPath-dots-".concat(C)},M.createElement("rect",{x:p-X/2,y:f-X/2,width:v+X,height:w+X}))):null,O?null:this.renderArea(P,C),(s||O)&&this.renderDots(P,V,C),(!x||S)&&pi.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}}])})(R.PureComponent);BI=ca;zn(ca,"displayName","Area");zn(ca,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!ao.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});zn(ca,"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]});zn(ca,"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=BI.getBaseValue(e,r,n,i),y=v==="horizontal",S=!1,O=h.map(function(T,E){var P;w?P=f[p+E]:(P=Dt(T,c),Array.isArray(P)?S=!0:P=[x,P]);var C=P[1]==null||w&&Dt(T,c)==null;return y?{x:a2({axis:n,ticks:a,bandSize:u,entry:T,index:E}),y:C?null:i.scale(P[1]),value:P,payload:T}:{x:C?null:n.scale(P[1]),y:a2({axis:i,ticks:s,bandSize:u,entry:T,index:E}),value:P,payload:T}}),A;return w||S?A=O.map(function(T){var E=Array.isArray(T.value)?T.value[0]:null;return y?{x:T.x,y:E!=null&&T.y!=null?i.scale(E):null}:{x:E!=null?n.scale(E):null,y:T.y}}):A=y?i.scale(x):n.scale(x),Ji({points:O,baseLine:A,layout:v,isRange:S},g)});zn(ca,"renderDotItem",function(t,e){var r;if(M.isValidElement(t))r=M.cloneElement(t,e);else if($e(t))r=t(e);else{var n=De("recharts-area-dot",typeof t!="boolean"?t.className:""),i=e.key,a=zI(e,Ute);r=M.createElement(Kh,Wa({},a,{key:i,className:n}))}return r});function Ts(t){"@babel/helpers - typeof";return Ts=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},Ts(t)}function Jte(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qte(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,WI(n.key),n)}}function Zte(t,e,r){return e&&Qte(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function ere(t,e,r){return e=uh(e),tre(t,FI()?Reflect.construct(e,r||[],uh(t).constructor):e.apply(t,r))}function tre(t,e){if(e&&(Ts(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rre(t)}function rre(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function FI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(FI=function(){return!!t})()}function uh(t){return uh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},uh(t)}function nre(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&&Hw(t,e)}function Hw(t,e){return Hw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Hw(t,e)}function HI(t,e,r){return e=WI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function WI(t){var e=ire(t,"string");return Ts(e)=="symbol"?e:e+""}function ire(t,e){if(Ts(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Ts(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Ww(){return Ww=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},Ww.apply(this,arguments)}function are(t){var e=t.xAxisId,r=PI(),n=TI(),i=EI(e);return i==null?null:R.createElement(ap,Ww({},i,{className:De("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(s){return Ha(s,!0)}}))}var op=(function(t){function e(){return Jte(this,e),ere(this,e,arguments)}return nre(e,t),Zte(e,[{key:"render",value:function(){return R.createElement(are,this.props)}}])})(R.Component);HI(op,"displayName","XAxis");HI(op,"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 js(t){"@babel/helpers - typeof";return js=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},js(t)}function ore(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function sre(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,GI(n.key),n)}}function lre(t,e,r){return e&&sre(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function ure(t,e,r){return e=ch(e),cre(t,VI()?Reflect.construct(e,r||[],ch(t).constructor):e.apply(t,r))}function cre(t,e){if(e&&(js(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fre(t)}function fre(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function VI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(VI=function(){return!!t})()}function ch(t){return ch=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ch(t)}function dre(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 KI(t,e,r){return e=GI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function GI(t){var e=hre(t,"string");return js(e)=="symbol"?e:e+""}function hre(t,e){if(js(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(js(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Kw(){return Kw=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},Kw.apply(this,arguments)}var pre=function(e){var r=e.yAxisId,n=PI(),i=TI(),a=AI(r);return a==null?null:R.createElement(ap,Kw({},a,{className:De("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:i},ticksGenerator:function(u){return Ha(u,!0)}}))},sp=(function(t){function e(){return ore(this,e),ure(this,e,arguments)}return dre(e,t),lre(e,[{key:"render",value:function(){return R.createElement(pre,this.props)}}])})(R.Component);KI(sp,"displayName","YAxis");KI(sp,"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 Qj(t){return yre(t)||vre(t)||gre(t)||mre()}function mre(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
475
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gre(t,e){if(t){if(typeof t=="string")return Gw(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 Gw(t,e)}}function vre(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function yre(t){if(Array.isArray(t))return Gw(t)}function Gw(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 Xw=function(e,r,n,i,a){var s=rn(e,x1),u=rn(e,rp),c=[].concat(Qj(s),Qj(u)),f=rn(e,ip),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],O=y.props[w];return[Math.min(x[0],S,O),Math.max(x[1],S,O)]}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},ob={exports:{}},Zj;function bre(){return Zj||(Zj=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,O,A;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(A=1,O=new Array(S-1);A<S;A++)O[A-1]=arguments[A];y.fn.apply(y.context,O)}else{var T=y.length,E;for(A=0;A<T;A++)switch(y[A].once&&this.removeListener(f,y[A].fn,void 0,!0),S){case 1:y[A].fn.call(y[A].context);break;case 2:y[A].fn.call(y[A].context,p);break;case 3:y[A].fn.call(y[A].context,p,h);break;case 4:y[A].fn.call(y[A].context,p,h,g);break;default:if(!O)for(E=1,O=new Array(S-1);E<S;E++)O[E-1]=arguments[E];y[A].fn.apply(y[A].context,O)}}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})(ob)),ob.exports}var wre=bre();const xre=Je(wre);var sb=new xre,lb="recharts.syncMouseEvents";function Yu(t){"@babel/helpers - typeof";return Yu=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},Yu(t)}function _re(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Sre(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,XI(n.key),n)}}function kre(t,e,r){return e&&Sre(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function ub(t,e,r){return e=XI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function XI(t){var e=Ore(t,"string");return Yu(e)=="symbol"?e:e+""}function Ore(t,e){if(Yu(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Yu(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Ere=(function(){function t(){_re(this,t),ub(this,"activeIndex",0),ub(this,"coordinateList",[]),ub(this,"layout","horizontal")}return kre(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 Are(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 Pre(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 YI(t){var e=t.cx,r=t.cy,n=t.radius,i=t.startAngle,a=t.endAngle,s=ot(e,r,n,i),u=ot(e,r,n,a);return{points:[s,u],cx:e,cy:r,radius:n,startAngle:i,endAngle:a}}function Tre(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=ot(u,c,f,h),v=ot(u,c,p,h);n=g.x,i=g.y,a=v.x,s=v.y}else return YI(e);return[{x:n,y:i},{x:a,y:s}]}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 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 Hf(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){jre(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 jre(t,e,r){return e=Cre(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Cre(t){var e=Rre(t,"string");return Ju(e)=="symbol"?e:e+""}function Rre(t,e){if(Ju(t)!="object"||!t)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)}function Nre(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=as;if(g==="ScatterChart")w=s,x=bQ;else if(g==="BarChart")w=Pre(h,s,c,p),x=y1;else if(h==="radial"){var y=YI(s),S=y.cx,O=y.cy,A=y.radius,T=y.startAngle,E=y.endAngle;w={cx:S,cy:O,startAngle:T,endAngle:E,innerRadius:A,outerRadius:A},x=X$}else w={points:Tre(h,s,c)},x=as;var P=Hf(Hf(Hf(Hf({stroke:"#ccc",pointerEvents:"none"},c),w),Ee(v,!1)),{},{payload:u,payloadIndex:f,className:De("recharts-tooltip-cursor",v.className)});return R.isValidElement(v)?R.cloneElement(v,P):R.createElement(x,P)}var $re=["item"],Ire=["children","className","width","height","style","compact","title","desc"];function Cs(t){"@babel/helpers - typeof";return Cs=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},Cs(t)}function Qo(){return Qo=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},Qo.apply(this,arguments)}function tC(t,e){return Dre(t)||Lre(t,e)||QI(t,e)||Mre()}function Mre(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
476
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Lre(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 Dre(t){if(Array.isArray(t))return t}function rC(t,e){if(t==null)return{};var r=Bre(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 Bre(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 zre(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qre(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,ZI(n.key),n)}}function Ure(t,e,r){return e&&qre(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Fre(t,e,r){return e=fh(e),Hre(t,JI()?Reflect.construct(e,r||[],fh(t).constructor):e.apply(t,r))}function Hre(t,e){if(e&&(Cs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Wre(t)}function Wre(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function JI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(JI=function(){return!!t})()}function fh(t){return fh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},fh(t)}function Vre(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 Rs(t){return Xre(t)||Gre(t)||QI(t)||Kre()}function Kre(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
477
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QI(t,e){if(t){if(typeof t=="string")return Jw(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 Jw(t,e)}}function Gre(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Xre(t){if(Array.isArray(t))return Jw(t)}function Jw(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 nC(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?nC(Object(r),!0).forEach(function(n){Te(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):nC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Te(t,e,r){return e=ZI(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ZI(t){var e=Yre(t,"string");return Cs(e)=="symbol"?e:e+""}function Yre(t,e){if(Cs(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Cs(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Jre={xAxis:["bottom","top"],yAxis:["left","right"]},Qre={width:"100%",height:"100%"},eM={x:0,y:0};function Wf(t){return t}var Zre=function(e,r){return r==="horizontal"?e.x:r==="vertical"?e.y:r==="centric"?e.angle:e.radius},ene=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),ot(i.cx,i.cy,u,s)),{},{angle:s,radius:u})}var c=a.coordinate,f=i.angle;return re(re(re({},i),ot(i.cx,i.cy,c,f)),{},{angle:f,radius:c})}return eM},lp=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(Rs(u),Rs(f)):u},[]);return s.length>0?s:e&&e.length&&fe(i)&&fe(a)?e.slice(i,a+1):[]};function tM(t){return t==="number"?[0,"auto"]:void 0}var Qw=function(e,r,n,i){var a=e.graphicalItems,s=e.tooltipAxis,u=lp(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=hd(v,s.dataKey,i)}else g=h&&h[n]||u[n];return g?[].concat(Rs(c),[F$(f,g)]):c},[])},iC=function(e,r,n,i){var a=i||{x:e.chartX,y:e.chartY},s=Zre(a,n),u=e.orderedTooltipTicks,c=e.tooltipAxis,f=e.tooltipTicks,p=zG(s,u,f,c);if(p>=0&&f){var h=f[p]&&f[p].value,g=Qw(e,r,p,h),v=ene(n,u,p,a);return{activeTooltipIndex:p,activeLabel:h,activePayload:g,activeCoordinate:v}}return null},tne=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=D$(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,O=S.type,A=S.dataKey,T=S.allowDataOverflow,E=S.allowDuplicatedCategory,P=S.scale,C=S.ticks,$=S.includeHidden,D=S[s];if(w[D])return w;var W=lp(e.data,{graphicalItems:i.filter(function(U){var ee,se=s in U.props?U.props[s]:(ee=U.type.defaultProps)===null||ee===void 0?void 0:ee[s];return se===D}),dataStartIndex:c,dataEndIndex:f}),N=W.length,L,z,K;Are(S.domain,T,O)&&(L=hw(S.domain,null,T),v&&(O==="number"||P!=="auto")&&(K=ou(W,A,"category")));var V=tM(O);if(!L||L.length===0){var X,Q=(X=S.domain)!==null&&X!==void 0?X:V;if(A){if(L=ou(W,A,O),O==="category"&&v){var G=NU(L);E&&G?(z=L,L=Qd(0,N)):E||(L=u2(Q,L,x).reduce(function(U,ee){return U.indexOf(ee)>=0?U:[].concat(Rs(U),[ee])},[]))}else if(O==="category")E?L=L.filter(function(U){return U!==""&&!Le(U)}):L=u2(Q,L,x).reduce(function(U,ee){return U.indexOf(ee)>=0||ee===""||Le(ee)?U:[].concat(Rs(U),[ee])},[]);else if(O==="number"){var te=WG(W,i.filter(function(U){var ee,se,ue=s in U.props?U.props[s]:(ee=U.type.defaultProps)===null||ee===void 0?void 0:ee[s],de="hide"in U.props?U.props.hide:(se=U.type.defaultProps)===null||se===void 0?void 0:se.hide;return ue===D&&($||!de)}),A,a,p);te&&(L=te)}v&&(O==="number"||P!=="auto")&&(K=ou(W,A,"category"))}else v?L=Qd(0,N):u&&u[D]&&u[D].hasStack&&O==="number"?L=g==="expand"?[0,1]:U$(u[D].stackGroups,c,f):L=L$(W,i.filter(function(U){var ee=s in U.props?U.props[s]:U.type.defaultProps[s],se="hide"in U.props?U.props.hide:U.type.defaultProps.hide;return ee===D&&($||!se)}),O,p,!0);if(O==="number")L=Xw(h,L,D,a,C),Q&&(L=hw(Q,L,T));else if(O==="category"&&Q){var F=Q,I=L.every(function(U){return F.indexOf(U)>=0});I&&(L=F)}}return re(re({},w),{},Te({},D,re(re({},S),{},{axisType:a,domain:L,categoricalDomain:K,duplicateDomain:z,originalDomain:(y=S.domain)!==null&&y!==void 0?y:V,isCategorical:v,layout:p})))},{})},rne=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=lp(e.data,{graphicalItems:n,dataStartIndex:c,dataEndIndex:f}),v=g.length,w=D$(p,a),x=-1;return n.reduce(function(y,S){var O=S.type.defaultProps!==void 0?re(re({},S.type.defaultProps),S.props):S.props,A=O[s],T=tM("number");if(!y[A]){x++;var E;return w?E=Qd(0,v):u&&u[A]&&u[A].hasStack?(E=U$(u[A].stackGroups,c,f),E=Xw(h,E,A,a)):(E=hw(T,L$(g,n.filter(function(P){var C,$,D=s in P.props?P.props[s]:(C=P.type.defaultProps)===null||C===void 0?void 0:C[s],W="hide"in P.props?P.props.hide:($=P.type.defaultProps)===null||$===void 0?void 0:$.hide;return D===A&&!W}),"number",p),i.defaultProps.allowDataOverflow),E=Xw(h,E,A,a)),re(re({},y),{},Te({},A,re(re({axisType:a},i.defaultProps),{},{hide:!0,orientation:Lr(Jre,"".concat(a,".").concat(x%2),null),domain:E,originalDomain:T,isCategorical:w,layout:p})))}return y},{})},nne=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=rn(p,a),v={};return g&&g.length?v=tne(e,{axes:g,graphicalItems:s,axisType:i,axisIdKey:h,stackGroups:u,dataStartIndex:c,dataEndIndex:f}):s&&s.length&&(v=rne(e,{Axis:a,graphicalItems:s,axisType:i,axisIdKey:h,stackGroups:u,dataStartIndex:c,dataEndIndex:f})),v},ine=function(e){var r=Vo(e),n=Ha(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Wx(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Bd(r,n)}},aC=function(e){var r=e.children,n=e.defaultShowTooltip,i=$r(r,_s),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}},ane=function(e){return!e||!e.length?!1:e.some(function(r){var n=fi(r&&r.type);return n&&n.indexOf("Bar")>=0})},oC=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"}},one=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=$r(h,_s),w=$r(h,rs),x=Object.keys(c).reduce(function(E,P){var C=c[P],$=C.orientation;return!C.mirror&&!C.hide?re(re({},E),{},Te({},$,E[$]+C.width)):E},{left:g.left||0,right:g.right||0}),y=Object.keys(s).reduce(function(E,P){var C=s[P],$=C.orientation;return!C.mirror&&!C.hide?re(re({},E),{},Te({},$,Lr(E,"".concat($))+C.height)):E},{top:g.top||0,bottom:g.bottom||0}),S=re(re({},y),x),O=S.bottom;v&&(S.bottom+=v.props.height||_s.defaultProps.height),w&&r&&(S=FG(S,i,n,r));var A=f-S.left-S.right,T=p-S.top-S.bottom;return re(re({brushBottom:O},S),{},{width:Math.max(A,0),height:Math.max(T,0)})},sne=function(e,r){if(r==="xAxis")return e[r].width;if(r==="yAxis")return e[r].height},rM=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,O){var A=O.graphicalItems,T=O.stackGroups,E=O.offset,P=O.updateId,C=O.dataStartIndex,$=O.dataEndIndex,D=S.barSize,W=S.layout,N=S.barGap,L=S.barCategoryGap,z=S.maxBarSize,K=oC(W),V=K.numericAxisName,X=K.cateAxisName,Q=ane(A),G=[];return A.forEach(function(te,F){var I=lp(S.data,{graphicalItems:[te],dataStartIndex:C,dataEndIndex:$}),U=te.type.defaultProps!==void 0?re(re({},te.type.defaultProps),te.props):te.props,ee=U.dataKey,se=U.maxBarSize,ue=U["".concat(V,"Id")],de=U["".concat(X,"Id")],Re={},pe=c.reduce(function(tr,lt){var Ar=O["".concat(lt.axisType,"Map")],fa=U["".concat(lt.axisType,"Id")];Ar&&Ar[fa]||lt.axisType==="zAxis"||to();var da=Ar[fa];return re(re({},tr),{},Te(Te({},lt.axisType,da),"".concat(lt.axisType,"Ticks"),Ha(da)))},Re),ne=pe[X],_e=pe["".concat(X,"Ticks")],Oe=T&&T[ue]&&T[ue].hasStack&&eX(te,T[ue].stackGroups),ie=fi(te.type).indexOf("Bar")>=0,He=Bd(ne,_e),Ne=[],dt=Q&&qG({barSize:D,stackGroups:T,totalSize:sne(pe,X)});if(ie){var st,ht,mr=Le(se)?z:se,Et=(st=(ht=Bd(ne,_e,!0))!==null&&ht!==void 0?ht:mr)!==null&&st!==void 0?st:0;Ne=UG({barGap:N,barCategoryGap:L,bandSize:Et!==He?Et:He,sizeList:dt[de],maxBarSize:mr}),Et!==He&&(Ne=Ne.map(function(tr){return re(re({},tr),{},{position:re(re({},tr.position),{},{offset:tr.position.offset-Et/2})})}))}var Br=te&&te.type&&te.type.getComposedData;Br&&G.push({props:re(re({},Br(re(re({},pe),{},{displayedData:I,props:S,dataKey:ee,item:te,bandSize:He,barPosition:Ne,offset:E,stackedData:Oe,layout:W,dataStartIndex:C,dataEndIndex:$}))),{},Te(Te(Te({key:te.key||"item-".concat(F)},V,pe[V]),X,pe[X]),"animationId",P)),childIndex:VU(te,S.children),item:te})}),G},v=function(S,O){var A=S.props,T=S.dataStartIndex,E=S.dataEndIndex,P=S.updateId;if(!_E({props:A}))return null;var C=A.children,$=A.layout,D=A.stackOffset,W=A.data,N=A.reverseStackOrder,L=oC($),z=L.numericAxisName,K=L.cateAxisName,V=rn(C,n),X=QG(W,V,"".concat(z,"Id"),"".concat(K,"Id"),D,N),Q=c.reduce(function(U,ee){var se="".concat(ee.axisType,"Map");return re(re({},U),{},Te({},se,nne(A,re(re({},ee),{},{graphicalItems:V,stackGroups:ee.axisType===z&&X,dataStartIndex:T,dataEndIndex:E}))))},{}),G=one(re(re({},Q),{},{props:A,graphicalItems:V}),O==null?void 0:O.legendBBox);Object.keys(Q).forEach(function(U){Q[U]=p(A,Q[U],G,U.replace("Map",""),r)});var te=Q["".concat(K,"Map")],F=ine(te),I=g(A,re(re({},Q),{},{dataStartIndex:T,dataEndIndex:E,updateId:P,graphicalItems:V,stackGroups:X,offset:G}));return re(re({formattedGraphicalItems:I,graphicalItems:V,offset:G,stackGroups:X},F),Q)},w=(function(y){function S(O){var A,T,E;return zre(this,S),E=Fre(this,S,[O]),Te(E,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Te(E,"accessibilityManager",new Ere),Te(E,"handleLegendBBoxUpdate",function(P){if(P){var C=E.state,$=C.dataStartIndex,D=C.dataEndIndex,W=C.updateId;E.setState(re({legendBBox:P},v({props:E.props,dataStartIndex:$,dataEndIndex:D,updateId:W},re(re({},E.state),{},{legendBBox:P}))))}}),Te(E,"handleReceiveSyncEvent",function(P,C,$){if(E.props.syncId===P){if($===E.eventEmitterSymbol&&typeof E.props.syncMethod!="function")return;E.applySyncEvent(C)}}),Te(E,"handleBrushChange",function(P){var C=P.startIndex,$=P.endIndex;if(C!==E.state.dataStartIndex||$!==E.state.dataEndIndex){var D=E.state.updateId;E.setState(function(){return re({dataStartIndex:C,dataEndIndex:$},v({props:E.props,dataStartIndex:C,dataEndIndex:$,updateId:D},E.state))}),E.triggerSyncEvent({dataStartIndex:C,dataEndIndex:$})}}),Te(E,"handleMouseEnter",function(P){var C=E.getMouseInfo(P);if(C){var $=re(re({},C),{},{isTooltipActive:!0});E.setState($),E.triggerSyncEvent($);var D=E.props.onMouseEnter;$e(D)&&D($,P)}}),Te(E,"triggeredAfterMouseMove",function(P){var C=E.getMouseInfo(P),$=C?re(re({},C),{},{isTooltipActive:!0}):{isTooltipActive:!1};E.setState($),E.triggerSyncEvent($);var D=E.props.onMouseMove;$e(D)&&D($,P)}),Te(E,"handleItemMouseEnter",function(P){E.setState(function(){return{isTooltipActive:!0,activeItem:P,activePayload:P.tooltipPayload,activeCoordinate:P.tooltipPosition||{x:P.cx,y:P.cy}}})}),Te(E,"handleItemMouseLeave",function(){E.setState(function(){return{isTooltipActive:!1}})}),Te(E,"handleMouseMove",function(P){P.persist(),E.throttleTriggeredAfterMouseMove(P)}),Te(E,"handleMouseLeave",function(P){E.throttleTriggeredAfterMouseMove.cancel();var C={isTooltipActive:!1};E.setState(C),E.triggerSyncEvent(C);var $=E.props.onMouseLeave;$e($)&&$(C,P)}),Te(E,"handleOuterEvent",function(P){var C=WU(P),$=Lr(E.props,"".concat(C));if(C&&$e($)){var D,W;/.*touch.*/i.test(C)?W=E.getMouseInfo(P.changedTouches[0]):W=E.getMouseInfo(P),$((D=W)!==null&&D!==void 0?D:{},P)}}),Te(E,"handleClick",function(P){var C=E.getMouseInfo(P);if(C){var $=re(re({},C),{},{isTooltipActive:!0});E.setState($),E.triggerSyncEvent($);var D=E.props.onClick;$e(D)&&D($,P)}}),Te(E,"handleMouseDown",function(P){var C=E.props.onMouseDown;if($e(C)){var $=E.getMouseInfo(P);C($,P)}}),Te(E,"handleMouseUp",function(P){var C=E.props.onMouseUp;if($e(C)){var $=E.getMouseInfo(P);C($,P)}}),Te(E,"handleTouchMove",function(P){P.changedTouches!=null&&P.changedTouches.length>0&&E.throttleTriggeredAfterMouseMove(P.changedTouches[0])}),Te(E,"handleTouchStart",function(P){P.changedTouches!=null&&P.changedTouches.length>0&&E.handleMouseDown(P.changedTouches[0])}),Te(E,"handleTouchEnd",function(P){P.changedTouches!=null&&P.changedTouches.length>0&&E.handleMouseUp(P.changedTouches[0])}),Te(E,"handleDoubleClick",function(P){var C=E.props.onDoubleClick;if($e(C)){var $=E.getMouseInfo(P);C($,P)}}),Te(E,"handleContextMenu",function(P){var C=E.props.onContextMenu;if($e(C)){var $=E.getMouseInfo(P);C($,P)}}),Te(E,"triggerSyncEvent",function(P){E.props.syncId!==void 0&&sb.emit(lb,E.props.syncId,P,E.eventEmitterSymbol)}),Te(E,"applySyncEvent",function(P){var C=E.props,$=C.layout,D=C.syncMethod,W=E.state.updateId,N=P.dataStartIndex,L=P.dataEndIndex;if(P.dataStartIndex!==void 0||P.dataEndIndex!==void 0)E.setState(re({dataStartIndex:N,dataEndIndex:L},v({props:E.props,dataStartIndex:N,dataEndIndex:L,updateId:W},E.state)));else if(P.activeTooltipIndex!==void 0){var z=P.chartX,K=P.chartY,V=P.activeTooltipIndex,X=E.state,Q=X.offset,G=X.tooltipTicks;if(!Q)return;if(typeof D=="function")V=D(G,P);else if(D==="value"){V=-1;for(var te=0;te<G.length;te++)if(G[te].value===P.activeLabel){V=te;break}}var F=re(re({},Q),{},{x:Q.left,y:Q.top}),I=Math.min(z,F.x+F.width),U=Math.min(K,F.y+F.height),ee=G[V]&&G[V].value,se=Qw(E.state,E.props.data,V),ue=G[V]?{x:$==="horizontal"?G[V].coordinate:I,y:$==="horizontal"?U:G[V].coordinate}:eM;E.setState(re(re({},P),{},{activeLabel:ee,activeCoordinate:ue,activePayload:se,activeTooltipIndex:V}))}else E.setState(P)}),Te(E,"renderCursor",function(P){var C,$=E.state,D=$.isTooltipActive,W=$.activeCoordinate,N=$.activePayload,L=$.offset,z=$.activeTooltipIndex,K=$.tooltipAxisBandSize,V=E.getTooltipEventType(),X=(C=P.props.active)!==null&&C!==void 0?C:D,Q=E.props.layout,G=P.key||"_recharts-cursor";return M.createElement(Nre,{key:G,activeCoordinate:W,activePayload:N,activeTooltipIndex:z,chartName:r,element:P,isActive:X,layout:Q,offset:L,tooltipAxisBandSize:K,tooltipEventType:V})}),Te(E,"renderPolarAxis",function(P,C,$){var D=Lr(P,"type.axisType"),W=Lr(E.state,"".concat(D,"Map")),N=P.type.defaultProps,L=N!==void 0?re(re({},N),P.props):P.props,z=W&&W[L["".concat(D,"Id")]];return R.cloneElement(P,re(re({},z),{},{className:De(D,z.className),key:P.key||"".concat(C,"-").concat($),ticks:Ha(z,!0)}))}),Te(E,"renderPolarGrid",function(P){var C=P.props,$=C.radialLines,D=C.polarAngles,W=C.polarRadius,N=E.state,L=N.radiusAxisMap,z=N.angleAxisMap,K=Vo(L),V=Vo(z),X=V.cx,Q=V.cy,G=V.innerRadius,te=V.outerRadius;return R.cloneElement(P,{polarAngles:Array.isArray(D)?D:Ha(V,!0).map(function(F){return F.coordinate}),polarRadius:Array.isArray(W)?W:Ha(K,!0).map(function(F){return F.coordinate}),cx:X,cy:Q,innerRadius:G,outerRadius:te,key:P.key||"polar-grid",radialLines:$})}),Te(E,"renderLegend",function(){var P=E.state.formattedGraphicalItems,C=E.props,$=C.children,D=C.width,W=C.height,N=E.props.margin||{},L=D-(N.left||0)-(N.right||0),z=I$({children:$,formattedGraphicalItems:P,legendWidth:L,legendContent:f});if(!z)return null;var K=z.item,V=rC(z,$re);return R.cloneElement(K,re(re({},V),{},{chartWidth:D,chartHeight:W,margin:N,onBBoxUpdate:E.handleLegendBBoxUpdate}))}),Te(E,"renderTooltip",function(){var P,C=E.props,$=C.children,D=C.accessibilityLayer,W=$r($,yn);if(!W)return null;var N=E.state,L=N.isTooltipActive,z=N.activeCoordinate,K=N.activePayload,V=N.activeLabel,X=N.offset,Q=(P=W.props.active)!==null&&P!==void 0?P:L;return R.cloneElement(W,{viewBox:re(re({},X),{},{x:X.left,y:X.top}),active:Q,label:V,payload:Q?K:[],coordinate:z,accessibilityLayer:D})}),Te(E,"renderBrush",function(P){var C=E.props,$=C.margin,D=C.data,W=E.state,N=W.offset,L=W.dataStartIndex,z=W.dataEndIndex,K=W.updateId;return R.cloneElement(P,{key:P.key||"_recharts-brush",onChange:zf(E.handleBrushChange,P.props.onChange),data:D,x:fe(P.props.x)?P.props.x:N.left,y:fe(P.props.y)?P.props.y:N.top+N.height+N.brushBottom-($.bottom||0),width:fe(P.props.width)?P.props.width:N.width,startIndex:L,endIndex:z,updateId:"brush-".concat(K)})}),Te(E,"renderReferenceElement",function(P,C,$){if(!P)return null;var D=E,W=D.clipPathId,N=E.state,L=N.xAxisMap,z=N.yAxisMap,K=N.offset,V=P.type.defaultProps||{},X=P.props,Q=X.xAxisId,G=Q===void 0?V.xAxisId:Q,te=X.yAxisId,F=te===void 0?V.yAxisId:te;return R.cloneElement(P,{key:P.key||"".concat(C,"-").concat($),xAxis:L[G],yAxis:z[F],viewBox:{x:K.left,y:K.top,width:K.width,height:K.height},clipPathId:W})}),Te(E,"renderActivePoints",function(P){var C=P.item,$=P.activePoint,D=P.basePoint,W=P.childIndex,N=P.isRange,L=[],z=C.props.key,K=C.item.type.defaultProps!==void 0?re(re({},C.item.type.defaultProps),C.item.props):C.item.props,V=K.activeDot,X=K.dataKey,Q=re(re({index:W,dataKey:X,cx:$.x,cy:$.y,r:4,fill:v1(C.item),strokeWidth:2,stroke:"#fff",payload:$.payload,value:$.value},Ee(V,!1)),pd(V));return L.push(S.renderActiveDot(V,Q,"".concat(z,"-activePoint-").concat(W))),D?L.push(S.renderActiveDot(V,re(re({},Q),{},{cx:D.x,cy:D.y}),"".concat(z,"-basePoint-").concat(W))):N&&L.push(null),L}),Te(E,"renderGraphicChild",function(P,C,$){var D=E.filterFormatItem(P,C,$);if(!D)return null;var W=E.getTooltipEventType(),N=E.state,L=N.isTooltipActive,z=N.tooltipAxis,K=N.activeTooltipIndex,V=N.activeLabel,X=E.props.children,Q=$r(X,yn),G=D.props,te=G.points,F=G.isRange,I=G.baseLine,U=D.item.type.defaultProps!==void 0?re(re({},D.item.type.defaultProps),D.item.props):D.item.props,ee=U.activeDot,se=U.hide,ue=U.activeBar,de=U.activeShape,Re=!!(!se&&L&&Q&&(ee||ue||de)),pe={};W!=="axis"&&Q&&Q.props.trigger==="click"?pe={onClick:zf(E.handleItemMouseEnter,P.props.onClick)}:W!=="axis"&&(pe={onMouseLeave:zf(E.handleItemMouseLeave,P.props.onMouseLeave),onMouseEnter:zf(E.handleItemMouseEnter,P.props.onMouseEnter)});var ne=R.cloneElement(P,re(re({},D.props),pe));function _e(lt){return typeof z.dataKey=="function"?z.dataKey(lt.payload):null}if(Re)if(K>=0){var Oe,ie;if(z.dataKey&&!z.allowDuplicatedCategory){var He=typeof z.dataKey=="function"?_e:"payload.".concat(z.dataKey.toString());Oe=hd(te,He,V),ie=F&&I&&hd(I,He,V)}else Oe=te==null?void 0:te[K],ie=F&&I&&I[K];if(de||ue){var Ne=P.props.activeIndex!==void 0?P.props.activeIndex:K;return[R.cloneElement(P,re(re(re({},D.props),pe),{},{activeIndex:Ne})),null,null]}if(!Le(Oe))return[ne].concat(Rs(E.renderActivePoints({item:D,activePoint:Oe,basePoint:ie,childIndex:K,isRange:F})))}else{var dt,st=(dt=E.getItemByXY(E.state.activeCoordinate))!==null&&dt!==void 0?dt:{graphicalItem:ne},ht=st.graphicalItem,mr=ht.item,Et=mr===void 0?P:mr,Br=ht.childIndex,tr=re(re(re({},D.props),pe),{},{activeIndex:Br});return[R.cloneElement(Et,tr),null,null]}return F?[ne,null,null]:[ne,null]}),Te(E,"renderCustomized",function(P,C,$){return R.cloneElement(P,re(re({key:"recharts-customized-".concat($)},E.props),E.state))}),Te(E,"renderMap",{CartesianGrid:{handler:Wf,once:!0},ReferenceArea:{handler:E.renderReferenceElement},ReferenceLine:{handler:Wf},ReferenceDot:{handler:E.renderReferenceElement},XAxis:{handler:Wf},YAxis:{handler:Wf},Brush:{handler:E.renderBrush,once:!0},Bar:{handler:E.renderGraphicChild},Line:{handler:E.renderGraphicChild},Area:{handler:E.renderGraphicChild},Radar:{handler:E.renderGraphicChild},RadialBar:{handler:E.renderGraphicChild},Scatter:{handler:E.renderGraphicChild},Pie:{handler:E.renderGraphicChild},Funnel:{handler:E.renderGraphicChild},Tooltip:{handler:E.renderCursor,once:!0},PolarGrid:{handler:E.renderPolarGrid,once:!0},PolarAngleAxis:{handler:E.renderPolarAxis},PolarRadiusAxis:{handler:E.renderPolarAxis},Customized:{handler:E.renderCustomized}}),E.clipPathId="".concat((A=O.id)!==null&&A!==void 0?A:qs("recharts"),"-clip"),E.throttleTriggeredAfterMouseMove=IN(E.triggeredAfterMouseMove,(T=O.throttleDelay)!==null&&T!==void 0?T:1e3/60),E.state={},E}return Vre(S,y),Ure(S,[{key:"componentDidMount",value:function(){var A,T;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(A=this.props.margin.left)!==null&&A!==void 0?A:0,top:(T=this.props.margin.top)!==null&&T!==void 0?T:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var A=this.props,T=A.children,E=A.data,P=A.height,C=A.layout,$=$r(T,yn);if($){var D=$.props.defaultIndex;if(!(typeof D!="number"||D<0||D>this.state.tooltipTicks.length-1)){var W=this.state.tooltipTicks[D]&&this.state.tooltipTicks[D].value,N=Qw(this.state,E,D,W),L=this.state.tooltipTicks[D].coordinate,z=(this.state.offset.top+P)/2,K=C==="horizontal",V=K?{x:L,y:z}:{y:L,x:z},X=this.state.formattedGraphicalItems.find(function(G){var te=G.item;return te.type.name==="Scatter"});X&&(V=re(re({},V),X.props.points[D].tooltipPosition),N=X.props.points[D].tooltipPayload);var Q={activeTooltipIndex:D,isTooltipActive:!0,activeLabel:W,activePayload:N,activeCoordinate:V};this.setState(Q),this.renderCursor($),this.accessibilityManager.setIndex(D)}}}},{key:"getSnapshotBeforeUpdate",value:function(A,T){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==T.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==A.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==A.margin){var E,P;this.accessibilityManager.setDetails({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}})}return null}},{key:"componentDidUpdate",value:function(A){Ib([$r(A.children,yn)],[$r(this.props.children,yn)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var A=$r(this.props.children,yn);if(A&&typeof A.props.shared=="boolean"){var T=A.props.shared?"axis":"item";return u.indexOf(T)>=0?T:a}return a}},{key:"getMouseInfo",value:function(A){if(!this.container)return null;var T=this.container,E=T.getBoundingClientRect(),P=RH(E),C={chartX:Math.round(A.pageX-P.left),chartY:Math.round(A.pageY-P.top)},$=E.width/T.offsetWidth||1,D=this.inRange(C.chartX,C.chartY,$);if(!D)return null;var W=this.state,N=W.xAxisMap,L=W.yAxisMap,z=this.getTooltipEventType(),K=iC(this.state,this.props.data,this.props.layout,D);if(z!=="axis"&&N&&L){var V=Vo(N).scale,X=Vo(L).scale,Q=V&&V.invert?V.invert(C.chartX):null,G=X&&X.invert?X.invert(C.chartY):null;return re(re({},C),{},{xValue:Q,yValue:G},K)}return K?re(re({},C),K):null}},{key:"inRange",value:function(A,T){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,P=this.props.layout,C=A/E,$=T/E;if(P==="horizontal"||P==="vertical"){var D=this.state.offset,W=C>=D.left&&C<=D.left+D.width&&$>=D.top&&$<=D.top+D.height;return W?{x:C,y:$}:null}var N=this.state,L=N.angleAxisMap,z=N.radiusAxisMap;if(L&&z){var K=Vo(L);return d2({x:C,y:$},K)}return null}},{key:"parseEventsOfWrapper",value:function(){var A=this.props.children,T=this.getTooltipEventType(),E=$r(A,yn),P={};E&&T==="axis"&&(E.props.trigger==="click"?P={onClick:this.handleClick}:P={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=pd(this.props,this.handleOuterEvent);return re(re({},C),P)}},{key:"addListener",value:function(){sb.on(lb,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){sb.removeListener(lb,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(A,T,E){for(var P=this.state.formattedGraphicalItems,C=0,$=P.length;C<$;C++){var D=P[C];if(D.item===A||D.props.key===A.key||T===fi(D.item.type)&&E===D.childIndex)return D}return null}},{key:"renderClipPath",value:function(){var A=this.clipPathId,T=this.state.offset,E=T.left,P=T.top,C=T.height,$=T.width;return M.createElement("defs",null,M.createElement("clipPath",{id:A},M.createElement("rect",{x:E,y:P,height:C,width:$})))}},{key:"getXScales",value:function(){var A=this.state.xAxisMap;return A?Object.entries(A).reduce(function(T,E){var P=tC(E,2),C=P[0],$=P[1];return re(re({},T),{},Te({},C,$.scale))},{}):null}},{key:"getYScales",value:function(){var A=this.state.yAxisMap;return A?Object.entries(A).reduce(function(T,E){var P=tC(E,2),C=P[0],$=P[1];return re(re({},T),{},Te({},C,$.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(A){var T;return(T=this.state.xAxisMap)===null||T===void 0||(T=T[A])===null||T===void 0?void 0:T.scale}},{key:"getYScaleByAxisId",value:function(A){var T;return(T=this.state.yAxisMap)===null||T===void 0||(T=T[A])===null||T===void 0?void 0:T.scale}},{key:"getItemByXY",value:function(A){var T=this.state,E=T.formattedGraphicalItems,P=T.activeItem;if(E&&E.length)for(var C=0,$=E.length;C<$;C++){var D=E[C],W=D.props,N=D.item,L=N.type.defaultProps!==void 0?re(re({},N.type.defaultProps),N.props):N.props,z=fi(N.type);if(z==="Bar"){var K=(W.data||[]).find(function(G){return ZJ(A,G)});if(K)return{graphicalItem:D,payload:K}}else if(z==="RadialBar"){var V=(W.data||[]).find(function(G){return d2(A,G)});if(V)return{graphicalItem:D,payload:V}}else if(Qh(D,P)||Zh(D,P)||Wu(D,P)){var X=_Z({graphicalItem:D,activeTooltipItem:P,itemData:L.data}),Q=L.activeIndex===void 0?X:L.activeIndex;return{graphicalItem:re(re({},D),{},{childIndex:Q}),payload:Wu(D,P)?L.data[X]:D.props.data[X]}}}return null}},{key:"render",value:function(){var A=this;if(!_E(this))return null;var T=this.props,E=T.children,P=T.className,C=T.width,$=T.height,D=T.style,W=T.compact,N=T.title,L=T.desc,z=rC(T,Ire),K=Ee(z,!1);if(W)return M.createElement(Bj,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},M.createElement(Lb,Qo({},K,{width:C,height:$,title:N,desc:L}),this.renderClipPath(),kE(E,this.renderMap)));if(this.props.accessibilityLayer){var V,X;K.tabIndex=(V=this.props.tabIndex)!==null&&V!==void 0?V:0,K.role=(X=this.props.role)!==null&&X!==void 0?X:"application",K.onKeyDown=function(G){A.accessibilityManager.keyboardEvent(G)},K.onFocus=function(){A.accessibilityManager.focus()}}var Q=this.parseEventsOfWrapper();return M.createElement(Bj,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},M.createElement("div",Qo({className:De("recharts-wrapper",P),style:re({position:"relative",cursor:"default",width:C,height:$},D)},Q,{ref:function(te){A.container=te}}),M.createElement(Lb,Qo({},K,{width:C,height:$,title:N,desc:L,style:Qre}),this.renderClipPath(),kE(E,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(R.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 O=y.dataKey,A=y.data,T=y.children,E=y.width,P=y.height,C=y.layout,$=y.stackOffset,D=y.margin,W=S.dataStartIndex,N=S.dataEndIndex;if(S.updateId===void 0){var L=aC(y);return re(re(re({},L),{},{updateId:0},v(re(re({props:y},L),{},{updateId:0}),S)),{},{prevDataKey:O,prevData:A,prevWidth:E,prevHeight:P,prevLayout:C,prevStackOffset:$,prevMargin:D,prevChildren:T})}if(O!==S.prevDataKey||A!==S.prevData||E!==S.prevWidth||P!==S.prevHeight||C!==S.prevLayout||$!==S.prevStackOffset||!ts(D,S.prevMargin)){var z=aC(y),K={chartX:S.chartX,chartY:S.chartY,isTooltipActive:S.isTooltipActive},V=re(re({},iC(S,A,C)),{},{updateId:S.updateId+1}),X=re(re(re({},z),K),V);return re(re(re({},X),v(re({props:y},X),S)),{},{prevDataKey:O,prevData:A,prevWidth:E,prevHeight:P,prevLayout:C,prevStackOffset:$,prevMargin:D,prevChildren:T})}if(!Ib(T,S.prevChildren)){var Q,G,te,F,I=$r(T,_s),U=I&&(Q=(G=I.props)===null||G===void 0?void 0:G.startIndex)!==null&&Q!==void 0?Q:W,ee=I&&(te=(F=I.props)===null||F===void 0?void 0:F.endIndex)!==null&&te!==void 0?te:N,se=U!==W||ee!==N,ue=!Le(A),de=ue&&!se?S.updateId:S.updateId+1;return re(re({updateId:de},v(re(re({props:y},S),{},{updateId:de,dataStartIndex:U,dataEndIndex:ee}),S)),{},{prevChildren:T,dataStartIndex:U,dataEndIndex:ee})}return null}),Te(w,"renderActiveDot",function(y,S,O){var A;return R.isValidElement(y)?A=R.cloneElement(y,S):$e(y)?A=y(S):A=M.createElement(Kh,S),M.createElement(Ue,{className:"recharts-active-dot",key:O},A)});var x=R.forwardRef(function(S,O){return M.createElement(w,Qo({},S,{ref:O}))});return x.displayName=w.displayName,x},lne=rM({chartName:"PieChart",GraphicalChild:Si,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:Jh},{axisType:"radiusAxis",AxisComp:Xh}],formatAxisMap:cX,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),une=rM({chartName:"AreaChart",GraphicalChild:ca,axisComponents:[{axisType:"xAxis",AxisComp:op},{axisType:"yAxis",AxisComp:sp}],formatAxisMap:Eee});const Vf=["#E43A9C","#D83333","#F041FF","#38bdf8","#a78bfa","#34d399","#f59e0b"];function cne(){const[t,e]=R.useState(null),[r,n]=R.useState("7d");if(R.useEffect(()=>{const f=new Date;r==="7d"?f.setDate(f.getDate()-7):r==="30d"?f.setDate(f.getDate()-30):f.setDate(f.getDate()-1),et.get(`/usage?since=${f.toISOString()}`).then(e).catch(()=>{})},[r]),!t)return k.jsx("div",{className:"h-full flex items-center justify-center text-zinc-600",children:"Loading..."});const i=new Map;for(const f of t.records){const p=f.timestamp.slice(0,10),h=i.get(p)??{date:p,tokens:0,cost:0};h.tokens+=f.inputTokens+f.outputTokens,h.cost+=f.estimatedCostUsd??0,i.set(p,h)}const a=Array.from(i.values()).sort((f,p)=>f.date.localeCompare(p.date)),s=new Map;for(const f of t.records)s.set(f.model,(s.get(f.model)??0)+f.inputTokens+f.outputTokens);const u=Array.from(s.entries()).map(([f,p])=>({name:f,value:p})),c=t.totals.totalInputTokens+t.totals.totalOutputTokens;return k.jsxs("div",{className:"flex-1 overflow-y-auto p-6",children:[k.jsxs("div",{className:"flex items-center justify-between mb-6",children:[k.jsxs("div",{children:[k.jsx("h2",{className:"text-2xl tracking-wide text-zinc-100",style:{fontFamily:"'Bebas Neue', sans-serif"},children:"Usage"}),k.jsx("p",{className:"text-[11px] text-zinc-600 font-mono mt-0.5",children:"Token usage and cost tracking"})]}),k.jsx("div",{className:"flex gap-1 p-1 rounded-xl bg-white/[0.03] border border-white/[0.07]",children:["1d","7d","30d"].map(f=>k.jsx("button",{type:"button",onClick:()=>n(f),className:`px-3 py-1.5 rounded-lg text-[11px] font-mono transition-colors ${r===f?"bg-white/10 text-zinc-200":"text-zinc-600 hover:text-zinc-400"}`,children:f},f))})]}),k.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-3 mb-6",children:[k.jsx(Kf,{icon:k.jsx(m5,{className:"w-4 h-4 text-[#E43A9C]"}),label:"Total Tokens",value:Gf(c)}),k.jsx(Kf,{icon:k.jsx(J4,{className:"w-4 h-4 text-emerald-400"}),label:"Est. Cost",value:`$${t.totals.totalCostUsd.toFixed(4)}`}),k.jsx(Kf,{icon:k.jsx(TC,{className:"w-4 h-4 text-sky-400"}),label:"API Calls",value:Gf(t.totals.callCount)}),k.jsx(Kf,{icon:k.jsx(eu,{className:"w-4 h-4 text-amber-400"}),label:"Models Used",value:String(u.length)})]}),k.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[k.jsxs("div",{className:"lg:col-span-2 glass-card border border-white/[0.07] rounded-2xl p-5",children:[k.jsx("h3",{className:"text-sm font-mono text-zinc-400 mb-4",children:"Tokens Over Time"}),a.length>0?k.jsx(VP,{width:"100%",height:250,children:k.jsxs(une,{data:a,children:[k.jsx("defs",{children:k.jsxs("linearGradient",{id:"colorTokens",x1:"0",y1:"0",x2:"0",y2:"1",children:[k.jsx("stop",{offset:"5%",stopColor:"#E43A9C",stopOpacity:.3}),k.jsx("stop",{offset:"95%",stopColor:"#E43A9C",stopOpacity:0})]})}),k.jsx(op,{dataKey:"date",tick:{fontSize:10,fill:"#52525b",fontFamily:"JetBrains Mono, monospace"},axisLine:!1,tickLine:!1}),k.jsx(sp,{tick:{fontSize:10,fill:"#52525b",fontFamily:"JetBrains Mono, monospace"},axisLine:!1,tickLine:!1,tickFormatter:Gf}),k.jsx(yn,{contentStyle:{background:"#222",border:"1px solid rgba(255,255,255,0.07)",borderRadius:"12px",fontSize:"11px",fontFamily:"JetBrains Mono, monospace"},labelStyle:{color:"#71717a"}}),k.jsx(ca,{type:"monotone",dataKey:"tokens",stroke:"#E43A9C",fill:"url(#colorTokens)",strokeWidth:2})]})}):k.jsx("div",{className:"h-[250px] flex items-center justify-center text-zinc-700 text-[11px] font-mono",children:"No data for this period"})]}),k.jsxs("div",{className:"glass-card border border-white/[0.07] rounded-2xl p-5",children:[k.jsx("h3",{className:"text-sm font-mono text-zinc-400 mb-4",children:"By Model"}),u.length>0?k.jsxs(k.Fragment,{children:[k.jsx(VP,{width:"100%",height:180,children:k.jsxs(lne,{children:[k.jsx(Si,{data:u,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:70,strokeWidth:0,children:u.map((f,p)=>{var h;return k.jsx(Ih,{fill:Vf[p%Vf.length]},(h=u[p])==null?void 0:h.name)})}),k.jsx(yn,{contentStyle:{background:"#222",border:"1px solid rgba(255,255,255,0.07)",borderRadius:"12px",fontSize:"11px",fontFamily:"JetBrains Mono, monospace"}})]})}),k.jsx("div",{className:"space-y-1.5 mt-3",children:u.map((f,p)=>k.jsxs("div",{className:"flex items-center gap-2 text-[11px] font-mono",children:[k.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{background:Vf[p%Vf.length]}}),k.jsx("span",{className:"text-zinc-500 truncate",children:f.name}),k.jsx("span",{className:"ml-auto text-zinc-400",children:Gf(f.value)})]},f.name))})]}):k.jsx("div",{className:"h-[180px] flex items-center justify-center text-zinc-700 text-[11px] font-mono",children:"No data"})]})]})]})}function Kf({icon:t,label:e,value:r}){return k.jsxs("div",{className:"glass-card border border-white/[0.07] rounded-2xl p-4",children:[k.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[t,k.jsx("p",{className:"text-[11px] text-zinc-600 font-mono",children:e})]}),k.jsx("p",{className:"text-xl font-mono text-zinc-100",children:r})]})}function Gf(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t.toString()}const Vl="shared";function nM(t){return[...t].sort((e,r)=>e.isDir!==r.isDir?e.isDir?-1:1:e.name.localeCompare(r.name)).map(e=>({...e,children:nM(e.children)}))}function fne(t){const e=[];for(const r of t){const n=r.path.split("/").filter(Boolean);let i=e,a="";for(const[s,u]of n.entries()){const c=s===n.length-1;a=a?`${a}/${u}`:u;let f=i.find(p=>p.path===a);f||(f={name:c&&r.name||u,path:a,isDir:!c,children:[]},i.push(f)),i=f.children}}return nM(e)}function iM(t,e){return e?t.flatMap(r=>{const n=r.name.toLowerCase().includes(e)||r.path.toLowerCase().includes(e);if(!r.isDir)return n?[r]:[];if(n)return[r];const i=iM(r.children,e);return i.length?[{...r,children:i}]:[]}):t}function Zw(t){const e=new Set;for(const r of t)if(r.isDir){e.add(r.path);for(const n of Zw(r.children))e.add(n)}return e}function dne(t){const e=t.split("/").filter(Boolean),r=[];let n="";for(const i of e.slice(0,-1))n=n?`${n}/${i}`:i,r.push(n);return r}function aM({node:t,depth:e,selectedPage:r,expandedPaths:n,autoExpandedPaths:i,onToggle:a,onSelect:s}){const u=r===t.path,c=t.isDir&&(n.has(t.path)||i.has(t.path)),f=12+e*16;return t.isDir?k.jsxs("div",{children:[k.jsxs("button",{type:"button",onClick:()=>a(t.path),className:"flex w-full items-center gap-2 rounded-lg py-2 pr-3 text-left text-[11px] font-mono text-zinc-400 transition-colors hover:bg-white/[0.04] hover:text-zinc-200",style:{paddingLeft:f},children:[k.jsx(RC,{size:14,className:`shrink-0 transition-transform ${c?"rotate-90":""}`}),c?k.jsx(l5,{size:14,className:"shrink-0 text-zinc-500"}):k.jsx(c5,{size:14,className:"shrink-0 text-zinc-500"}),k.jsx("span",{className:"truncate",children:t.name})]}),c&&k.jsx("div",{children:t.children.map(p=>k.jsx(aM,{node:p,depth:e+1,selectedPage:r,expandedPaths:n,autoExpandedPaths:i,onToggle:a,onSelect:s},p.path))})]}):k.jsxs("button",{type:"button",onClick:()=>s(t.path),className:`flex w-full items-center gap-2 rounded-lg py-2 pr-3 text-left text-[11px] font-mono transition-colors ${u?"border-l-2 border-[#E43A9C] bg-[#E43A9C]/10 text-[#E43A9C]":"text-zinc-500 hover:bg-white/[0.04] hover:text-zinc-300"}`,style:{paddingLeft:f},children:[k.jsx(o5,{size:14,className:"shrink-0"}),k.jsx("span",{className:"truncate",children:t.name})]})}function hne(){const[t,e]=R.useState([]),[r,n]=R.useState(null),[i,a]=R.useState(""),[s,u]=R.useState(!1),[c,f]=R.useState(""),[p,h]=R.useState(""),[g,v]=R.useState(""),[w,x]=R.useState(new Set);R.useEffect(()=>{E()},[]);const y=R.useMemo(()=>fne(t),[t]),S=g.trim().toLowerCase(),O=R.useMemo(()=>iM(y,S),[y,S]),A=R.useMemo(()=>{const N=S?Zw(O):new Set;if(r)for(const L of dne(r))N.add(L);return N},[O,S,r]),T=r?r.split("/").slice(-1)[0]??"":"";R.useEffect(()=>{const N=Zw(y);x(L=>{const z=new Set([...L].filter(K=>N.has(K)));if(z.size===0)for(const K of y)K.isDir&&z.add(K.path);return z})},[y]);async function E(){try{const N=await et.get(`/wiki/${Vl}`);e(N.pages)}catch{e([])}}async function P(N){try{const L=await et.get(`/wiki/${Vl}/${N}`);a(L.content),f(L.content),n(N),u(!1)}catch{bt.error("Failed to load page")}}async function C(){if(r)try{await et.put(`/wiki/${Vl}/${r}`,{content:c}),a(c),u(!1),bt.success("Page saved")}catch{bt.error("Failed to save page")}}async function $(){if(r)try{await et.delete(`/wiki/${Vl}/${r}`),bt.success("Page deleted"),n(null),a(""),f(""),u(!1),E()}catch{bt.error("Failed to delete page")}}async function D(){const N=p.trim().replace(/^\/+|\/+$/g,"");if(N)try{const L=N.split("/").slice(-1)[0]??N;await et.put(`/wiki/${Vl}/${N}`,{content:`# ${L}
|
|
478
|
-
|
|
479
|
-
`}),bt.success("Page created"),h(""),await E(),await P(N)}catch{bt.error("Failed to create page")}}function W(N){x(L=>{const z=new Set(L);return z.has(N)?z.delete(N):z.add(N),z})}return k.jsxs("div",{className:"flex h-full",children:[k.jsxs("div",{className:"flex h-full w-64 flex-col border-r border-white/[0.07] bg-[#181818]",children:[k.jsx("div",{className:"border-b border-white/[0.07] p-3",children:k.jsxs("div",{className:"relative",children:[k.jsx(LC,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-zinc-600"}),k.jsx("input",{type:"text",value:g,onChange:N=>v(N.target.value),placeholder:"Search pages...",className:"w-full rounded-lg border border-white/[0.07] bg-white/[0.04] py-2 pl-8 pr-3 text-[11px] font-mono text-zinc-300 outline-none placeholder:text-zinc-700 focus:border-[#E43A9C]/50"})]})}),k.jsx("div",{className:"flex-1 overflow-y-auto px-2 py-3",children:O.length>0?O.map(N=>k.jsx(aM,{node:N,depth:0,selectedPage:r,expandedPaths:w,autoExpandedPaths:A,onToggle:W,onSelect:P},N.path)):k.jsx("p",{className:"py-4 text-center font-mono text-[11px] text-zinc-700",children:"No pages found"})}),k.jsx("div",{className:"border-t border-white/[0.07] p-3",children:k.jsxs("div",{className:"space-y-2",children:[k.jsx("input",{type:"text",value:p,onChange:N=>h(N.target.value),onKeyDown:N=>{N.key==="Enter"&&D(),N.key==="Escape"&&h("")},placeholder:"folder/new-page",className:"w-full rounded-lg border border-white/[0.07] bg-white/[0.04] px-3 py-2 text-[11px] font-mono text-zinc-300 outline-none placeholder:text-zinc-700 focus:border-[#E43A9C]/50"}),k.jsxs(Ya,{onClick:D,disabled:!p.trim(),className:"w-full justify-center px-3 py-2",children:[k.jsx(MC,{size:13})," Add Page"]})]})})]}),k.jsx("div",{className:"flex flex-1 flex-col overflow-hidden",children:r?k.jsxs(k.Fragment,{children:[k.jsxs("div",{className:"flex h-14 shrink-0 items-center justify-between border-b border-white/[0.07] px-6",children:[k.jsxs("div",{className:"min-w-0",children:[k.jsx("h3",{className:"truncate font-mono text-sm text-zinc-100",children:T}),k.jsx("p",{className:"truncate font-mono text-[11px] text-zinc-500",children:r})]}),k.jsxs("div",{className:"flex items-center gap-2",children:[s?k.jsxs(k.Fragment,{children:[k.jsxs(Ya,{onClick:C,className:"px-3 py-1.5",children:[k.jsx(I5,{size:12})," Save"]}),k.jsx(Zo,{onClick:()=>{u(!1),f(i)},className:"px-3 py-1.5",children:"Cancel"})]}):k.jsxs(Zo,{onClick:()=>{u(!0),f(i)},className:"px-3 py-1.5",children:[k.jsx(pb,{size:12})," Edit"]}),k.jsxs(dR,{onClick:$,className:"px-3 py-1.5",children:[k.jsx(fx,{size:12})," Delete"]})]})]}),k.jsx("div",{className:"flex-1 overflow-y-auto bg-[#111111] p-6",children:s?k.jsx("textarea",{value:c,onChange:N=>f(N.target.value),className:"h-full min-h-[320px] w-full resize-none rounded-xl border border-white/[0.07] bg-[#181818] p-4 font-mono text-sm text-zinc-300 outline-none focus:border-[#E43A9C]/50"}):k.jsx("div",{className:"mx-auto max-w-4xl rounded-xl border border-white/[0.07] bg-[#181818] p-6",children:k.jsx("div",{className:"prose-io text-sm text-zinc-300",dangerouslySetInnerHTML:{__html:qe.parse(i)}})})})]}):k.jsx("div",{className:"flex h-full items-center justify-center",children:k.jsxs("div",{className:"text-center",children:[k.jsx(jC,{size:48,className:"mx-auto mb-3 text-zinc-800"}),k.jsx("p",{className:"font-mono text-[11px] text-zinc-700",children:"Select a page to view"})]})})})]})}function pne({children:t}){const{session:e,supabase:r,loading:n}=_h();return n?k.jsx("div",{className:"min-h-screen flex items-center justify-center text-[var(--color-muted-foreground)]",children:"Loading..."}):r?e?k.jsx(k.Fragment,{children:t}):k.jsx(Nq,{}):k.jsx(k.Fragment,{children:t})}function mne(){const{pathname:t}=En(),e=t==="/"||t==="/chat"||t.startsWith("/chat/");return k.jsxs(k.Fragment,{children:[k.jsx(fD,{children:k.jsxs(Qr,{element:k.jsx(jq,{}),children:[k.jsx(Qr,{index:!0,element:k.jsx(Cq,{})}),k.jsx(Qr,{path:"squads",element:k.jsx(hO,{})}),k.jsx(Qr,{path:"squads/:name",element:k.jsx(hO,{})}),k.jsx(Qr,{path:"feed",element:k.jsx(Rq,{})}),k.jsx(Qr,{path:"skills",element:k.jsx(zq,{})}),k.jsx(Qr,{path:"schedules",element:k.jsx($q,{})}),k.jsx(Qr,{path:"wiki",element:k.jsx(hne,{})}),k.jsx(Qr,{path:"settings",element:k.jsx(Mq,{})}),k.jsx(Qr,{path:"usage",element:k.jsx(cne,{})}),k.jsx(Qr,{path:"*",element:k.jsx(lD,{to:"/",replace:!0})})]})}),!e&&k.jsx($8,{})]})}function gne(){return k.jsx(Aq,{children:k.jsx(pne,{children:k.jsx(mne,{})})})}lL.createRoot(document.getElementById("root")).render(k.jsx(R.StrictMode,{children:k.jsxs(ID,{children:[k.jsx(gne,{}),k.jsx(y4,{theme:"dark",position:"bottom-right"})]})}));
|
|
480
|
-
//# sourceMappingURL=index-V-sj6VMY.js.map
|