PageSourceSearch

https://fanflowy.co/assets/dashboard-CqpNaWIC.js

js fanflowy.co collected 2026-10-07 18:59:57 UTC 687,176 bytes, 2,125 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ArtistOnboardingWizard-SiasiV9i.js","assets/react-vendor-BwQoNBTn.js","assets/ui-vendor-C9OEygMn.js","assets/url-DaN-i9g8.js"])))=>i.map(i=>d[i]);
2var z1=Object.defineProperty;var W1=(e,t,r)=>t in e?z1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var zs=(e,t,r)=>W1(e,typeof t!="symbol"?t+"":t,r);import{r as m,u as H1,a as K1,b as V1,L as na,N as q1,c as uf,O as G1,g as Ir,d as Fl,R as Y1}from"./react-vendor-BwQoNBTn.js";import{n as xr}from"./ui-vendor-C9OEygMn.js";var ig={exports:{}},jo={};/**
3 * @license React
4 * react-jsx-runtime.production.min.js
5 *
6 * Copyright (c) Facebook, Inc. and its affiliates.
7 *
8 * This source code is licensed under the MIT license found in the
9 * LICENSE file in the root directory of this source tree.
10 */var J1=m,X1=Symbol.for("react.element"),Z1=Symbol.for("react.fragment"),Q1=Object.prototype.hasOwnProperty,eS=J1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,tS={key:!0,ref:!0,__self:!0,__source:!0};function ag(e,t,r){var n,i={},a=null,o=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)Q1.call(t,n)&&!tS.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:X1,type:e,key:a,ref:o,props:i,_owner:eS.current}}jo.Fragment=Z1;jo.jsx=ag;jo.jsxs=ag;ig.exports=jo;var p=ig.exports;const og="production",rS=og==="development";function Ul(){return"https://backend.fanflowy.com".replace(/\/+$/,"")}function nS(){return Ul()}function iS(){return typeof window<"u"?window.location.origin:Ul().replace("/api/v1","").replace(/\/$/,"")}const pt={apiBaseUrl:Ul(),publicBackendUrl:nS(),appOrigin:iS(),nodeEnv:og,isDev:rS};/**
11 * @license
12 * Copyright 2025 Google LLC
13 *
14 * Licensed under the Apache License, Version 2.0 (the "License");
15 * you may not use this file except in compliance with the License.
16 * You may obtain a copy of the License at
17 *
18 *   http://www.apache.org/licenses/LICENSE-2.0
19 *
20 * Unless required by applicable law or agreed to in writing, software
21 * distributed under the License is distributed on an "AS IS" BASIS,
22 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 * See the License for the specific language governing permissions and
24 * limitations under the License.
25 */const aS=()=>{};var df={};/**
26 * @license
27 * Copyright 2017 Google LLC
28 *
29 * Licensed under the Apache License, Version 2.0 (the "License");
30 * you may not use this file except in compliance with the License.
31 * You may obtain a copy of the License at
32 *
33 *   http://www.apache.org/licenses/LICENSE-2.0
34 *
35 * Unless required by applicable law or agreed to in writing, software
36 * distributed under the License is distributed on an "AS IS" BASIS,
37 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
38 * See the License for the specific language governing permissions and
39 * limitations under the License.
40 */const sg=function(e){const t=[];let r=0;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);i<128?t[r++]=i:i<2048?(t[r++]=i>>6|192,t[r++]=i&63|128):(i&64512)===55296&&n+1<e.length&&(e.charCodeAt(n+1)&64512)===56320?(i=65536+((i&1023)<<10)+(e.charCodeAt(++n)&1023),t[r++]=i>>18|240,t[r++]=i>>12&63|128,t[r++]=i>>6&63|128,t[r++]=i&63|128):(t[r++]=i>>12|224,t[r++]=i>>6&63|128,t[r++]=i&63|128)}return t},oS=function(e){const t=[];let r=0,n=0;for(;r<e.length;){const i=e[r++];if(i<128)t[n++]=String.fromCharCode(i);else if(i>191&&i<224){const a=e[r++];t[n++]=String.fromCharCode((i&31)<<6|a&63)}else if(i>239&&i<365){const a=e[r++],o=e[r++],s=e[r++],c=((i&7)<<18|(a&63)<<12|(o&63)<<6|s&63)-65536;t[n++]=String.fromCharCode(55296+(c>>10)),t[n++]=String.fromCharCode(56320+(c&1023))}else{const a=e[r++],o=e[r++];t[n++]=String.fromCharCode((i&15)<<12|(a&63)<<6|o&63)}}return t.join("")},cg={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const r=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let i=0;i<e.length;i+=3){const a=e[i],o=i+1<e.length,s=o?e[i+1]:0,c=i+2<e.length,l=c?e[i+2]:0,u=a>>2,d=(a&3)<<4|s>>4;let f=(s&15)<<2|l>>6,h=l&63;c||(h=64,o||(f=64)),n.push(r[u],r[d],r[f],r[h])}return n.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(sg(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):oS(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const r=t?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let i=0;i<e.length;){const a=r[e.charAt(i++)],s=i<e.length?r[e.charAt(i)]:0;++i;const l=i<e.length?r[e.charAt(i)]:64;++i;const d=i<e.length?r[e.charAt(i)]:64;if(++i,a==null||s==null||l==null||d==null)throw new sS;const f=a<<2|s>>4;if(n.push(f),l!==64){const h=s<<4&240|l>>2;if(n.push(h),d!==64){const g=l<<6&192|d;n.push(g)}}}return n},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};
40class sS extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const cS=function(e){const t=sg(e);return cg.encodeByteArray(t,!0)},lg=function(e){return cS(e).replace(/\./g,"")},ug=function(e){try{return cg.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};/**
41 * @license
42 * Copyright 2022 Google LLC
43 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
45 * you may not use this file except in compliance with the License.
46 * You may obtain a copy of the License at
47 *
48 *   http://www.apache.org/licenses/LICENSE-2.0
49 *
50 * Unless required by applicable law or agreed to in writing, software
51 * distributed under the License is distributed on an "AS IS" BASIS,
52 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
53 * See the License for the specific language governing permissions and
54 * limitations under the License.
55 */function lS(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/**
56 * @license
57 * Copyright 2022 Google LLC
58 *
59 * Licensed under the Apache License, Version 2.0 (the "License");
60 * you may not use this file except in compliance with the License.
61 * You may obtain a copy of the License at
62 *
63 *   http://www.apache.org/licenses/LICENSE-2.0
64 *
65 * Unless required by applicable law or agreed to in writing, software
66 * distributed under the License is distributed on an "AS IS" BASIS,
67 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
68 * See the License for the specific language governing permissions and
69 * limitations under the License.
70 */const uS=()=>lS().__FIREBASE_DEFAULTS__,dS=()=>{if(typeof process>"u"||typeof df>"u")return;const e=df.__FIREBASE_DEFAULTS__;if(e)return JSON.parse(e)},fS=()=>{if(typeof document>"u")return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const t=e&&ug(e[1]);return t&&JSON.parse(t)},Bl=()=>{try{return aS()||uS()||dS()||fS()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},hS=e=>{var t,r;return(r=(t=Bl())==null?void 0:t.emulatorHosts)==null?void 0:r[e]},dg=()=>{var e;return(e=Bl())==null?void 0:e.config},fg=e=>{var t;return(t=Bl())==null?void 0:t[`_${e}`]};/**
71 * @license
72 * Copyright 2017 Google LLC
73 *
74 * Licensed under the Apache License, Version 2.0 (the "License");
75 * you may not use this file except in compliance with the License.
76 * You may obtain a copy of the License at
77 *
78 *   http://www.apache.org/licenses/LICENSE-2.0
79 *
80 * Unless required by applicable law or agreed to in writing, software
81 * distributed under the License is distributed on an "AS IS" BASIS,
82 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
83 * See the License for the specific language governing permissions and
84 * limitations under the License.
85 */class pS{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((t,r)=>{this.resolve=t,this.reject=r})}wrapCallback(t){return(r,n)=>{r?this.reject(r):this.resolve(n),typeof t=="function"&&(this.promise.catch(()=>{}),t.length===1?t(r):t(r,n))}}}/**
86 * @license
87 * Copyright 2025 Google LLC
88 *
89 * Licensed under the Apache License, Version 2.0 (the "License");
90 * you may not use this file except in compliance with the License.
91 * You may obtain a copy of the License at
92 *
93 *   http://www.apache.org/licenses/LICENSE-2.0
94 *
95 * Unless required by applicable law or agreed to in writing, software
96 * distributed under the License is distributed on an "AS IS" BASIS,
97 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
98 * See the License for the specific language governing permissions and
99 * limitations under the License.
100 */function Mo(e){try{return(e.startsWith("http://")||e.startsWith("https://")?new URL(e).hostname:e).endsWith(".cloudworkstations.dev")}catch{return!1}}async function mS(e){return(await fetch(e,{credentials:"include"})).ok}const oi={};function gS(){const e={prod:[],emulator:[]};for(const t of Object.keys(oi))oi[t]?e.emulator.push(t):e.prod.push(t);return e}function yS(e){let t=document.getElementById(e),r=!1;return t||(t=document.createElement("div"),t.setAttribute("id",e),r=!0),{created:r,element:t}}let ff=!1;function vS(e,t){if(typeof window>"u"||typeof document>"u"||!Mo(window.location.host)||oi[e]===t||oi[e]||ff)return;oi[e]=t;function r(f){return`__firebase__banner__${f}`}const n="__firebase__banner",a=gS().prod.length>0;function o(){const f=document.getElementById(n);f&&f.remove()}function s(f){f.style.display="flex",f.style.background="#7faaf0",f.style.position="fixed",f.style.bottom="5px",f.style.left="5px",f.style.padding=".5em",f.style.borderRadius="5px",f.style.alignItems="center"}function c(f,h){f.setAttribute("width","24"),f.setAttribute("id",h),f.setAttribute("height","24"),f.setAttribute("viewBox","0 0 24 24"),f.setAttribute("fill","none"),f.style.marginLeft="-6px"}function l(){const f=document.createElement("span");
100return f.style.cursor="pointer",f.style.marginLeft="16px",f.style.fontSize="24px",f.innerHTML=" &times;",f.onclick=()=>{ff=!0,o()},f}function u(f,h){f.setAttribute("id",h),f.innerText="Learn more",f.href="https://firebase.google.com/docs/studio/preview-apps#preview-backend",f.setAttribute("target","__blank"),f.style.paddingLeft="5px",f.style.textDecoration="underline"}function d(){const f=yS(n),h=r("text"),g=document.getElementById(h)||document.createElement("span"),v=r("learnmore"),y=document.getElementById(v)||document.createElement("a"),b=r("preprendIcon"),S=document.getElementById(b)||document.createElementNS("http://www.w3.org/2000/svg","svg");if(f.created){const w=f.element;s(w),u(y,v);const _=l();c(S,b),w.append(S,g,y,_),document.body.appendChild(w)}a?(g.innerText="Preview backend disconnected.",S.innerHTML=`<g clip-path="url(#clip0_6013_33858)">
101<path d="M4.8 17.6L12 5.6L19.2 17.6H4.8ZM6.91667 16.4H17.0833L12 7.93333L6.91667 16.4ZM12 15.6C12.1667 15.6 12.3056 15.5444 12.4167 15.4333C12.5389 15.3111 12.6 15.1667 12.6 15C12.6 14.8333 12.5389 14.6944 12.4167 14.5833C12.3056 14.4611 12.1667 14.4 12 14.4C11.8333 14.4 11.6889 14.4611 11.5667 14.5833C11.4556 14.6944 11.4 14.8333 11.4 15C11.4 15.1667 11.4556 15.3111 11.5667 15.4333C11.6889 15.5444 11.8333 15.6 12 15.6ZM11.4 13.6H12.6V10.4H11.4V13.6Z" fill="#212121"/>
102</g>
103<defs>
104<clipPath id="clip0_6013_33858">
105<rect width="24" height="24" fill="white"/>
106</clipPath>
107</defs>`):(S.innerHTML=`<g clip-path="url(#clip0_6083_34804)">
108<path d="M11.4 15.2H12.6V11.2H11.4V15.2ZM12 10C12.1667 10 12.3056 9.94444 12.4167 9.83333C12.5389 9.71111 12.6 9.56667 12.6 9.4C12.6 9.23333 12.5389 9.09444 12.4167 8.98333C12.3056 8.86111 12.1667 8.8 12 8.8C11.8333 8.8 11.6889 8.86111 11.5667 8.98333C11.4556 9.09444 11.4 9.23333 11.4 9.4C11.4 9.56667 11.4556 9.71111 11.5667 9.83333C11.6889 9.94444 11.8333 10 12 10ZM12 18.4C11.1222 18.4 10.2944 18.2333 9.51667 17.9C8.73889 17.5667 8.05556 17.1111 7.46667 16.5333C6.88889 15.9444 6.43333 15.2611 6.1 14.4833C5.76667 13.7056 5.6 12.8778 5.6 12C5.6 11.1111 5.76667 10.2833 6.1 9.51667C6.43333 8.73889 6.88889 8.06111 7.46667 7.48333C8.05556 6.89444 8.73889 6.43333 9.51667 6.1C10.2944 5.76667 11.1222 5.6 12 5.6C12.8889 5.6 13.7167 5.76667 14.4833 6.1C15.2611 6.43333 15.9389 6.89444 16.5167 7.48333C17.1056 8.06111 17.5667 8.73889 17.9 9.51667C18.2333 10.2833 18.4 11.1111 18.4 12C18.4 12.8778 18.2333 13.7056 17.9 14.4833C17.5667 15.2611 17.1056 15.9444 16.5167 16.5333C15.9389 17.1111 15.2611 17.5667 14.4833 17.9C13.7167 18.2333 12.8889 18.4 12 18.4ZM12 17.2C13.4444 17.2 14.6722 16.6944 15.6833 15.6833C16.6944 14.6722 17.2 13.4444 17.2 12C17.2 10.5556 16.6944 9.32778 15.6833 8.31667C14.6722 7.30555 13.4444 6.8 12 6.8C10.5556 6.8 9.32778 7.30555 8.31667 8.31667C7.30556 9.32778 6.8 10.5556 6.8 12C6.8 13.4444 7.30556 14.6722 8.31667 15.6833C9.32778 16.6944 10.5556 17.2 12 17.2Z" fill="#212121"/>
109</g>
110<defs>
111<clipPath id="clip0_6083_34804">
112<rect width="24" height="24" fill="white"/>
113</clipPath>
114</defs>`,g.innerText="Preview backend running in this workspace."),g.setAttribute("id",h)}document.readyState==="loading"?window.addEventListener("DOMContentLoaded",d):d()}/**
115 * @license
116 * Copyright 2017 Google LLC
117 *
118 * Licensed under the Apache License, Version 2.0 (the "License");
119 * you may not use this file except in compliance with the License.
120 * You may obtain a copy of the License at
121 *
122 *   http://www.apache.org/licenses/LICENSE-2.0
123 *
124 * Unless required by applicable law or agreed to in writing, software
125 * distributed under the License is distributed on an "AS IS" BASIS,
126 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
127 * See the License for the specific language governing permissions and
128 * limitations under the License.
129 */function $e(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function bS(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test($e())}function wS(){return typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"}function hg(){const e=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof e=="object"&&e.id!==void 0}function xS(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function SS(){const e=$e();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function pg(){try{return typeof indexedDB=="object"}catch{return!1}}function mg(){return new Promise((e,t)=>
129{try{let r=!0;const n="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(n);i.onsuccess=()=>{i.result.close(),r||self.indexedDB.deleteDatabase(n),e(!0)},i.onupgradeneeded=()=>{r=!1},i.onerror=()=>{var a;t(((a=i.error)==null?void 0:a.message)||"")}}catch(r){t(r)}})}function PS(){return!(typeof navigator>"u"||!navigator.cookieEnabled)}/**
130 * @license
131 * Copyright 2017 Google LLC
132 *
133 * Licensed under the Apache License, Version 2.0 (the "License");
134 * you may not use this file except in compliance with the License.
135 * You may obtain a copy of the License at
136 *
137 *   http://www.apache.org/licenses/LICENSE-2.0
138 *
139 * Unless required by applicable law or agreed to in writing, software
140 * distributed under the License is distributed on an "AS IS" BASIS,
141 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
142 * See the License for the specific language governing permissions and
143 * limitations under the License.
144 */const _S="FirebaseError";class Rt extends Error{constructor(t,r,n){super(r),this.code=t,this.customData=n,this.name=_S,Object.setPrototypeOf(this,Rt.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,rn.prototype.create)}}class rn{constructor(t,r,n){this.service=t,this.serviceName=r,this.errors=n}create(t,...r){const n=r[0]||{},i=`${this.service}/${t}`,a=this.errors[t],o=a?OS(a,n):"Error",s=`${this.serviceName}: ${o} (${i}).`;return new Rt(i,s,n)}}function OS(e,t){return e.replace(AS,(r,n)=>{const i=t[n];return i!=null?String(i):`<${n}?>`})}const AS=/\{\$([^}]+)}/g;function ES(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function wn(e,t){if(e===t)return!0;const r=Object.keys(e),n=Object.keys(t);for(const i of r){if(!n.includes(i))return!1;const a=e[i],o=t[i];if(hf(a)&&hf(o)){if(!wn(a,o))return!1}else if(a!==o)return!1}for(const i of n)if(!r.includes(i))return!1;return!0}function hf(e){return e!==null&&typeof e=="object"}/**
145 * @license
146 * Copyright 2017 Google LLC
147 *
148 * Licensed under the Apache License, Version 2.0 (the "License");
149 * you may not use this file except in compliance with the License.
150 * You may obtain a copy of the License at
151 *
152 *   http://www.apache.org/licenses/LICENSE-2.0
153 *
154 * Unless required by applicable law or agreed to in writing, software
155 * distributed under the License is distributed on an "AS IS" BASIS,
156 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
157 * See the License for the specific language governing permissions and
158 * limitations under the License.
159 */function Ti(e){const t=[];for(const[r,n]of Object.entries(e))Array.isArray(n)?n.forEach(i=>{t.push(encodeURIComponent(r)+"="+encodeURIComponent(i))}):t.push(encodeURIComponent(r)+"="+encodeURIComponent(n));return t.length?"&"+t.join("&"):""}function ti(e){const t={};return e.replace(/^\?/,"").split("&").forEach(n=>{if(n){const[i,a]=n.split("=");
159t[decodeURIComponent(i)]=decodeURIComponent(a)}}),t}function ri(e){const t=e.indexOf("?");if(!t)return"";const r=e.indexOf("#",t);return e.substring(t,r>0?r:void 0)}function IS(e,t){const r=new kS(e,t);return r.subscribe.bind(r)}class kS{constructor(t,r){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=r,this.task.then(()=>{t(this)}).catch(n=>{this.error(n)})}next(t){this.forEachObserver(r=>{r.next(t)})}error(t){this.forEachObserver(r=>{r.error(t)}),this.close(t)}complete(){this.forEachObserver(t=>{t.complete()}),this.close()}subscribe(t,r,n){let i;if(t===void 0&&r===void 0&&n===void 0)throw new Error("Missing Observer.");TS(t,["next","error","complete"])?i=t:i={next:t,error:r,complete:n},i.next===void 0&&(i.next=Ws),i.error===void 0&&(i.error=Ws),i.complete===void 0&&(i.complete=Ws);const a=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?i.error(this.finalError):i.complete()}catch{}}),this.observers.push(i),a}unsubscribeOne(t){this.observers===void 0||this.observers[t]===void 0||(delete this.observers[t],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(t){if(!this.finalized)for(let r=0;r<this.observers.length;r++)this.sendOne(r,t)}sendOne(t,r){this.task.then(()=>{if(this.observers!==void 0&&this.observers[t]!==void 0)try{r(this.observers[t])}catch(n){typeof console<"u"&&console.error&&console.error(n)}})}close(t){this.finalized||(this.finalized=!0,t!==void 0&&(this.finalError=t),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function TS(e,t){if(typeof e!="object"||e===null)return!1;for(const r of t)if(r in e&&typeof e[r]=="function")return!0;return!1}function Ws(){}/**
160 * @license
161 * Copyright 2019 Google LLC
162 *
163 * Licensed under the Apache License, Version 2.0 (the "License");
164 * you may not use this file except in compliance with the License.
165 * You may obtain a copy of the License at
166 *
167 *   http://www.apache.org/licenses/LICENSE-2.0
168 *
169 * Unless required by applicable law or agreed to in writing, software
170 * distributed under the License is distributed on an "AS IS" BASIS,
171 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
172 * See the License for the specific language governing permissions and
173 * limitations under the License.
174 */const CS=1e3,NS=2,jS=4*60*60*1e3,MS=.5;function pf(e,t=CS,r=NS){const n=t*Math.pow(r,e),i=Math.round(MS*n*(Math.random()-.5)*2);return Math.min(jS,n+i)}/**
175 * @license
176 * Copyright 2021 Google LLC
177 *
178 * Licensed under the Apache License, Version 2.0 (the "License");
179 * you may not use this file except in compliance with the License.
180 * You may obtain a copy of the License at
181 *
182 *   http://www.apache.org/licenses/LICENSE-2.0
183 *
184 * Unless required by applicable law or agreed to in writing, software
185 * distributed under the License is distributed on an "AS IS" BASIS,
186 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
187 * See the License for the specific language governing permissions and
188 * limitations under the License.
189 */function et(e){return e&&e._delegate?e._delegate:e}class Nt{constructor(t,r,n){this.name=t,this.instanceFactory=r,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(t){return this.instantiationMode=t,this}setMultipleInstances(t){return this.multipleInstances=t,this}setServiceProps(t){return this.serviceProps=t,this}setInstanceCreatedCallback(t){return this.onInstanceCreated=t,this}}/**
190 * @license
191 * Copyright 2019 Google LLC
192 *
193 * Licensed under the Apache License, Version 2.0 (the "License");
194 * you may not use this file except in compliance with the License.
195 * You may obtain a copy of the License at
196 *
197 *   http://www.apache.org/licenses/LICENSE-2.0
198 *
199 * Unless required by applicable law or agreed to in writing, software
200 * distributed under the License is distributed on an "AS IS" BASIS,
201 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202 * See the License for the specific language governing permissions and
203 * limitations under the License.
204 */const Rr="[DEFAULT]";/**
205 * @license
206 * Copyright 2019 Google LLC
207 *
208 * Licensed under the Apache License, Version 2.0 (the "License");
209 * you may not use this file except in compliance with the License.
210 * You may obtain a copy of the License at
211 *
212 *   http://www.apache.org/licenses/LICENSE-2.0
213 *
214 * Unless required by applicable law or agreed to in writing, software
215 * distributed under the License is distributed on an "AS IS" BASIS,
216 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
217 * See the License for the specific language governing permissions and
218 * limitations under the License.
219 */let DS=class{constructor(t,r){this.name=t,this.container=r,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(t){const r=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(r)){const n=new pS;if(this.instancesDeferred.set(r,n),this.isInitialized(r)||this.shouldAutoInitialize())try{const i=this.getOrInitializeService({instanceIdentifier:r});i&&n.resolve(i)}catch{}}return this.instancesDeferred.get(r).promise}getImmediate(t){const r=this.normalizeInstanceIdentifier(t==null?void 0:t.identifier),n=(t==null?void 0:t.optional)??!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(i){if(n)return null;throw i}else{if(n)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(t){if(t.name!==this.name)throw Error(`Mismatching Component ${t.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=t,!!this.shouldAutoInitialize()){if($S(t))try{this.getOrInitializeService({instanceIdentifier:Rr})}catch{}for(const[r,n]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(r);try{const a=this.getOrInitializeService({instanceIdentifier:i});n.resolve(a)}catch{}}}}clearInstance(t=Rr){this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)}async delete(){const t=Array.from(this.instances.values());await Promise.all([...t.filter(r=>"INTERNAL"in r).map(r=>r.INTERNAL.delete()),...t.filter(r=>"_delete"in r).map(r=>r._delete())])}isComponentSet(){return this.component!=null}isInitialized(t=Rr){return this.instances.has(t)}getOptions(t=Rr){return this.instancesOptions.get(t)||{}}initialize(t={}){const{options:r={}}=t,n=this.normalizeInstanceIdentifier(t.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:n,options:r});for(const[a,o]of this.instancesDeferred.entries()){const s=this.normalizeInstanceIdentifier(a);n===s&&o.resolve(i)}return i}onInit(t,r){const n=this.normalizeInstanceIdentifier(r),i=this.onInitCallbacks.get(n)??new Set;i.add(t),this.onInitCallbacks.set(n,i);const a=this.instances.get(n);return a&&t(a,n),()=>{i.delete(t)}}invokeOnInitCallbacks(t,r){const n=this.onInitCallbacks.get(r);if(n)for(const i of n)try{i(t,r)}catch{}}getOrInitializeService({instanceIdentifier:t,options:r={}}){let n=this.instances.get(t);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:RS(t),options:r}),this.instances.set(t,n),this.instancesOptions.set(t,r),this.invokeOnInitCallbacks(n,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,n)}catch{}return n||null}normalizeInstanceIdentifier(t=Rr){return this.component?this.component.multipleInstances?t:Rr:t}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}};function RS(e){return e===Rr?void 0:e}function $S(e){return e.instantiationMode==="EAGER"}/**
220 * @license
221 * Copyright 2019 Google LLC
222 *
223 * Licensed under the Apache License, Version 2.0 (the "License");
224 * you may not use this file except in compliance with the License.
225 * You may obtain a copy of the License at
226 *
227 *   http://www.apache.org/licenses/LICENSE-2.0
228 *
229 * Unless required by applicable law or agreed to in writing, softw
229are
230 * distributed under the License is distributed on an "AS IS" BASIS,
231 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
232 * See the License for the specific language governing permissions and
233 * limitations under the License.
234 */class LS{constructor(t){this.name=t,this.providers=new Map}addComponent(t){const r=this.getProvider(t.name);if(r.isComponentSet())throw new Error(`Component ${t.name} has already been registered with ${this.name}`);r.setComponent(t)}addOrOverwriteComponent(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)}getProvider(t){if(this.providers.has(t))return this.providers.get(t);const r=new DS(t,this);return this.providers.set(t,r),r}getProviders(){return Array.from(this.providers.values())}}/**
235 * @license
236 * Copyright 2017 Google LLC
237 *
238 * Licensed under the Apache License, Version 2.0 (the "License");
239 * you may not use this file except in compliance with the License.
240 * You may obtain a copy of the License at
241 *
242 *   http://www.apache.org/licenses/LICENSE-2.0
243 *
244 * Unless required by applicable law or agreed to in writing, software
245 * distributed under the License is distributed on an "AS IS" BASIS,
246 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
247 * See the License for the specific language governing permissions and
248 * limitations under the License.
249 */var Q;(function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"})(Q||(Q={}));const FS={debug:Q.DEBUG,verbose:Q.VERBOSE,info:Q.INFO,warn:Q.WARN,error:Q.ERROR,silent:Q.SILENT},US=Q.INFO,BS={[Q.DEBUG]:"log",[Q.VERBOSE]:"log",[Q.INFO]:"info",[Q.WARN]:"warn",[Q.ERROR]:"error"},zS=(e,t,...r)=>{if(t<e.logLevel)return;const n=new Date().toISOString(),i=BS[t];if(i)console[i](`[${n}]  ${e.name}:`,...r);else throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class zl{constructor(t){this.name=t,this._logLevel=US,this._logHandler=zS,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(t){if(!(t in Q))throw new TypeError(`Invalid value "${t}" assigned to \`logLevel\``);this._logLevel=t}setLogLevel(t){this._logLevel=typeof t=="string"?FS[t]:t}get logHandler(){return this._logHandler}set logHandler(t){if(typeof t!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t}get userLogHandler(){return this._userLogHandler}set userLogHandler(t){this._userLogHandler=t}debug(...t){this._userLogHandler&&this._userLogHandler(this,Q.DEBUG,...t),this._logHandler(this,Q.DEBUG,...t)}log(...t){this._userLogHandler&&this._userLogHandler(this,Q.VERBOSE,...t),this._logHandler(this,Q.VERBOSE,...t)}info(...t){this._userLogHandler&&this._userLogHandler(this,Q.INFO,...t),this._logHandler(this,Q.INFO,...t)}warn(...t){this._userLogHandler&&this._userLogHandler(this,Q.WARN,...t),this._logHandler(this,Q.WARN,...t)}error(...t){this._userLogHandler&&this._userLogHandler(this,Q.ERROR,...t),this._logHandler(this,Q.ERROR,...t)}}const WS=(e,t)=>t.some(r=>e instanceof r);let mf,gf;function HS(){return mf||(mf=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function KS(){return gf||(gf=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const gg=new WeakMap,kc=new WeakMap,yg=new WeakMap,Hs=new WeakMap,Wl=new WeakMap;function VS(e){const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{r(Sr(e.result)),i()},o=()=>{n(e.error),i()};e.addEventListener("success",a),e.addEventListener("error",o)});return t.then(r=>{r instanceof IDBCursor&&gg.set(r,e)}).catch(()=>{}),Wl.set(t,e),t}function qS(e){if(kc.has(e))return;const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{r(),i()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});kc.set(e,t)}let Tc={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return kc.get(e);if(t==="objectStoreNames")return e.objectStoreNames||yg.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Sr(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function GS(e){Tc=e(Tc)}function YS(e){return e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...r){const n=e.call(Ks(this),t,...r);return yg.set(n,t.sort?t.sort():[t]),Sr(n)}:KS().includes(e)?function(...t){return e.apply(Ks(this),t),Sr(gg.get(this))}:function(...t){return Sr(e.apply(Ks(this),t))}}function JS(e){return typeof e=="function"?YS(e):(e instanceof IDBTransaction&&qS(e),WS(e,HS())?new Proxy(e,Tc):e)}function Sr(e){if(e instanceof IDBRequest)return VS(e);if(Hs.has(e))return Hs.get(e);const t=JS(e);return t!==e&&(Hs.set(e,t),Wl.set(t,e)),t}const Ks=e=>Wl.get(e);function vg(e,t,{blocked:r,upgrade:n,blocking:i,terminated:a}={}){const o=indexedDB.open(e,t),s=Sr(o);return n&&o.addEventListener("upgradeneeded",c=>{n(Sr(o.result),c.oldVersion,c.newVersion,Sr(o.transaction),c)}),r&&o.addEventListener("blocked",c=>r(c.oldVersion,c.newVersion,c)),s.then(c=>{a&&c.addEventListener("close",()=>a()),i&&c.addEventListener("versionchange",l=>i(l.oldVersion,l.newVersion,l))}).catch(()=>{}),s}const XS=["get","getKey","getAll","getAllKeys","count"],ZS=["put","add","delete","clear"],Vs=new Map;function yf(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Vs.get(t))return Vs.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,i=ZS.includes(r);
249if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||XS.includes(r)))return;const a=async function(o,...s){const c=this.transaction(o,i?"readwrite":"readonly");let l=c.store;return n&&(l=l.index(s.shift())),(await Promise.all([l[r](...s),i&&c.done]))[0]};return Vs.set(t,a),a}GS(e=>({...e,get:(t,r,n)=>yf(t,r)||e.get(t,r,n),has:(t,r)=>!!yf(t,r)||e.has(t,r)}));/**
250 * @license
251 * Copyright 2019 Google LLC
252 *
253 * Licensed under the Apache License, Version 2.0 (the "License");
254 * you may not use this file except in compliance with the License.
255 * You may obtain a copy of the License at
256 *
257 *   http://www.apache.org/licenses/LICENSE-2.0
258 *
259 * Unless required by applicable law or agreed to in writing, software
260 * distributed under the License is distributed on an "AS IS" BASIS,
261 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
262 * See the License for the specific language governing permissions and
263 * limitations under the License.
264 */class QS{constructor(t){this.container=t}getPlatformInfoString(){return this.container.getProviders().map(r=>{if(eP(r)){const n=r.getImmediate();return`${n.library}/${n.version}`}else return null}).filter(r=>r).join(" ")}}function eP(e){const t=e.getComponent();return(t==null?void 0:t.type)==="VERSION"}const Cc="@firebase/app",vf="0.14.7";/**
265 * @license
266 * Copyright 2019 Google LLC
267 *
268 * Licensed under the Apache License, Version 2.0 (the "License");
269 * you may not use this file except in compliance with the License.
270 * You may obtain a copy of the License at
271 *
272 *   http://www.apache.org/licenses/LICENSE-2.0
273 *
274 * Unless required by applicable law or agreed to in writing, software
275 * distributed under the License is distributed on an "AS IS" BASIS,
276 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
277 * See the License for the specific language governing permissions and
278 * limitations under the License.
279 */const Jt=new zl("@firebase/app"),tP="@firebase/app-compat",rP="@firebase/analytics-compat",nP="@firebase/analytics",iP="@firebase/app-check-compat",aP="@firebase/app-check",oP="@firebase/auth",sP="@firebase/auth-compat",cP="@firebase/database",lP="@firebase/data-connect",uP="@firebase/database-compat",dP="@firebase/functions",fP="@firebase/functions-compat",hP="@firebase/installations",pP="@firebase/installations-compat",mP="@firebase/messaging",gP="@firebase/messaging-compat",yP="@firebase/performance",vP="@firebase/performance-compat",bP="@firebase/remote-config",wP="@firebase/remote-config-compat",xP="@firebase/storage",SP="@firebase/storage-compat",PP="@firebase/firestore",_P="@firebase/ai",OP="@firebase/firestore-compat",AP="firebase",EP="12.8.0";/**
280 * @license
281 * Copyright 2019 Google LLC
282 *
283 * Licensed under the Apache License, Version 2.0 (the "License");
284 * you may not use this file except in compliance with the License.
285 * You may obtain a copy of the License at
286 *
287 *   http://www.apache.org/licenses/LICENSE-2.0
288 *
289 * Unless required by applicable law or agreed to in writing, software
290 * distributed under the License is distributed on an "AS IS" BASIS,
291 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
292 * See the License for the specific language governing permissions and
293 * limitations under the License.
294 */const Nc="[DEFAULT]",IP={[Cc]:"fire-core",[tP]:"fire-core-compat",[nP]:"fire-analytics",[rP]:"fire-analytics-compat",[aP]:"fire-app-check",[iP]:"fire-app-check-compat",[oP]:"fire-auth",[sP]:"fire-auth-compat",[cP]:"fire-rtdb",[lP]:"fire-data-connect",[uP]:"fire-rtdb-compat",[dP]:"fire-fn",[fP]:"fire-fn-compat",[hP]:"fire-iid",[pP]:"fire-iid-compat",[mP]:"fire-fcm",[gP]:"fire-fcm-compat",[yP]:"fire-perf",[vP]:"fire-perf-compat",[bP]:"fire-rc",[wP]:"fire-rc-compat",[xP]:"fire-gcs",[SP]:"fire-g
294cs-compat",[PP]:"fire-fst",[OP]:"fire-fst-compat",[_P]:"fire-vertex","fire-js":"fire-js",[AP]:"fire-js-all"};/**
295 * @license
296 * Copyright 2019 Google LLC
297 *
298 * Licensed under the Apache License, Version 2.0 (the "License");
299 * you may not use this file except in compliance with the License.
300 * You may obtain a copy of the License at
301 *
302 *   http://www.apache.org/licenses/LICENSE-2.0
303 *
304 * Unless required by applicable law or agreed to in writing, software
305 * distributed under the License is distributed on an "AS IS" BASIS,
306 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
307 * See the License for the specific language governing permissions and
308 * limitations under the License.
309 */const ui=new Map,kP=new Map,jc=new Map;function bf(e,t){try{e.container.addComponent(t)}catch(r){Jt.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,r)}}function Xt(e){const t=e.name;if(jc.has(t))return Jt.debug(`There were multiple attempts to register component ${t}.`),!1;jc.set(t,e);for(const r of ui.values())bf(r,e);for(const r of kP.values())bf(r,e);return!0}function Do(e,t){const r=e.container.getProvider("heartbeat").getImmediate({optional:!0});return r&&r.triggerHeartbeat(),e.container.getProvider(t)}function At(e){return e==null?!1:e.settings!==void 0}/**
310 * @license
311 * Copyright 2019 Google LLC
312 *
313 * Licensed under the Apache License, Version 2.0 (the "License");
314 * you may not use this file except in compliance with the License.
315 * You may obtain a copy of the License at
316 *
317 *   http://www.apache.org/licenses/LICENSE-2.0
318 *
319 * Unless required by applicable law or agreed to in writing, software
320 * distributed under the License is distributed on an "AS IS" BASIS,
321 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
322 * See the License for the specific language governing permissions and
323 * limitations under the License.
324 */const TP={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invali
324d-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},Pr=new rn("app","Firebase",TP);/**
325 * @license
326 * Copyright 2019 Google LLC
327 *
328 * Licensed under the Apache License, Version 2.0 (the "License");
329 * you may not use this file except in compliance with the License.
330 * You may obtain a copy of the License at
331 *
332 *   http://www.apache.org/licenses/LICENSE-2.0
333 *
334 * Unless required by applicable law or agreed to in writing, software
335 * distributed under the License is distributed on an "AS IS" BASIS,
336 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
337 * See the License for the specific language governing permissions and
338 * limitations under the License.
339 */class CP{constructor(t,r,n){this._isDeleted=!1,this._options={...t},this._config={...r},this._name=r.name,this._automaticDataCollectionEnabled=r.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new Nt("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(t){this.checkDestroyed(),this._automaticDataCollectionEnabled=t}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(t){this._isDeleted=t}checkDestroyed(){if(this.isDeleted)throw Pr.create("app-deleted",{appName:this._name})}}/**
340 * @license
341 * Copyright 2019 Google LLC
342 *
343 * Licensed under the Apache License, Version 2.0 (the "License");
344 * you may not use this file except in compliance with the License.
345 * You may obtain a copy of the License at
346 *
347 *   http://www.apache.org/licenses/LICENSE-2.0
348 *
349 * Unless required by applicable law or agreed to in writing, software
350 * distributed under the License is distributed on an "AS IS" BASIS,
351 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
352 * See the License for the specific language governing permissions and
353 * limitations under the License.
354 */const Ci=EP;function bg(e,t={}){let r=e;typeof t!="object"&&(t={name:t});const n={name:Nc,automaticDataCollectionEnabled:!0,...t},i=n.name;if(typeof i!="string"||!i)throw Pr.create("bad-app-name",{appName:String(i)});if(r||(r=dg()),!r)throw Pr.create("no-options");const a=ui.get(i);if(a){if(wn(r,a.options)&&wn(n,a.config))return a;throw Pr.create("duplicate-app",{appName:i})}const o=new LS(i);for(const c of jc.values())o.addComponent(c);const s=new CP(r,n,o);return ui.set(i,s),s}function wg(e=Nc){const t=ui.get(e);if(!t&&e===Nc&&dg())return bg();if(!t)throw Pr.create("no-app",{appName:e});return t}function NP(){return Array.from(ui.values())}function It(e,t,r){let n=IP[e]??e;r&&(n+=`-${r}`);const i=n.match(/\s|\//),a=t.match(/\s|\//);if(i||a){const o=[`Unable to register library "${n}" with version "${t}":`];i&&o.push(`library name "${n}" contains illegal characters (whitespace or "/")`),i&&a&&o.push("and"),a&&o.push(`version name "${t}" contains illegal characters (whitespace or "/")`),Jt.warn(o.join(" "));return}Xt(new Nt(`${n}-version`,()=>({library:n,version:t}),"VERSION"))}/**
355 * @license
356 * Copyright 2021 Google LLC
357 *
358 * Licensed under the Apache License, Version 2.0 (the "License");
359 * you may not use this file except in compliance with the License.
360 * You may obtain a copy of the License at
361 *
362 *   http://www.apache.org/licenses/LICENSE-2.0
363 *
364 * Unless required by applicable law or agreed to in writing, softw
364are
365 * distributed under the License is distributed on an "AS IS" BASIS,
366 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
367 * See the License for the specific language governing permissions and
368 * limitations under the License.
369 */const jP="firebase-heartbeat-database",MP=1,di="firebase-heartbeat-store";let qs=null;function xg(){return qs||(qs=vg(jP,MP,{upgrade:(e,t)=>{switch(t){case 0:try{e.createObjectStore(di)}catch(r){console.warn(r)}}}}).catch(e=>{throw Pr.create("idb-open",{originalErrorMessage:e.message})})),qs}async function DP(e){try{const r=(await xg()).transaction(di),n=await r.objectStore(di).get(Sg(e));return await r.done,n}catch(t){if(t instanceof Rt)Jt.warn(t.message);else{const r=Pr.create("idb-get",{originalErrorMessage:t==null?void 0:t.message});Jt.warn(r.message)}}}async function wf(e,t){try{const n=(await xg()).transaction(di,"readwrite");await n.objectStore(di).put(t,Sg(e)),await n.done}catch(r){if(r instanceof Rt)Jt.warn(r.message);else{const n=Pr.create("idb-set",{originalErrorMessage:r==null?void 0:r.message});Jt.warn(n.message)}}}function Sg(e){return`${e.name}!${e.options.appId}`}/**
370 * @license
371 * Copyright 2021 Google LLC
372 *
373 * Licensed under the Apache License, Version 2.0 (the "License");
374 * you may not use this file except in compliance with the License.
375 * You may obtain a copy of the License at
376 *
377 *   http://www.apache.org/licenses/LICENSE-2.0
378 *
379 * Unless required by applicable law or agreed to in writing, software
380 * distributed under the License is distributed on an "AS IS" BASIS,
381 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
382 * See the License for the specific language governing permissions and
383 * limitations under the License.
384 */const RP=1024,$P=30;class LP{constructor(t){this.container=t,this._heartbeatsCache=null;const r=this.container.getProvider("app").getImmediate();this._storage=new UP(r),this._heartbeatsCachePromise=this._storage.read().then(n=>(this._heartbeatsCache=n,n))}async triggerHeartbeat(){var t,r;try{const i=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),a=xf();if(((t=this._heartbeatsCache)==null?void 0:t.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((r=this._heartbeatsCache)==null?void 0:r.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===a||this._heartbeatsCache.heartbeats.some(o=>o.date===a))return;if(this._heartbeatsCache.heartbeats.push({date:a,agent:i}),this._heartbeatsCache.heartbeats.length>$P){const o=BP(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(o,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(n){Jt.warn(n)}}async getHeartbeatsHeader(){var t;try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((t=this._heartbeatsCache)==null?void 0:t.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const r=xf(),{heartbeatsToSend:n,unsentEntries:i}=FP(this._heartbeatsCache.heartbeats),a=lg(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=r,i.length>0?(this._heartbeatsCache.heartbeats=i,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),a}catch(r){return Jt.warn(r),""}}}function xf(){return new Date().toISOString().substring(0,10)}function FP(e,t=RP){const r=[];let n=e.slice();for(const i of e){const a=r.find(o=>o.agent===i.agent);if(a){if(a.dates.push(i.date),Sf(r)>t){a.dates.pop();break}}else if(r.push({agent:i.agent,dates:[i.date]}),Sf(r)>t){r.pop();break}n=n.slice(1)}return{heartbeatsToSend:r,unsentEntries:n}}class UP{constructor(t){this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return pg()?mg().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const r=await DP(this.app);return r!=null&&r.heartbeats?r:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(t){if(await this._canUseIndexedDBPromise){const n=await this.read();return wf(this.app,{lastSentHeartbeatDate:t.lastSentHeartbeatDate??n.lastSentHeartbeatDate,heartbeats:t.heartbeats})}else return}async add(t){if(await this._canUseIndexedDBPromise){const n=await this.read();return wf(this.app,{lastSentHeartbeatDate:t.lastSentHeartbeatDate??n.lastSentHeartbeatDate,heartbeats:[...n.heartbeats,...t.heartbeats]})}else return}}function Sf(e){return lg(JSON.stringify({version:2,heartbeats:e})).length}function BP(e){if(e.length===0)return-1;let t=0,r=e[0].date;for(let n=1;n<e.length;n++)e[n].date<r&&(r=e[n].date,t=n);return t}/**
385 * @license
386 * Copyright 2019 Google LLC
387 *
388 * Licensed under the Apache License, Version 2.0 (the "License");
389 * you may not use this file except in compliance with the License.
390 * You may obtain a copy of the License at
391 *
392 *   http://www.apache.org/licenses/LICENSE-2.0
393 *
394 * Unless required by applicable law or agreed to in writing, software
395 * distributed under the License is distributed on an "AS IS" BASIS,
396 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
397 * See the License for the specific language governing permissions and
398 * limitations under the License.
399 */function zP(e){Xt(new Nt("platform-logger",t=>new QS(t),"PRIVATE")),Xt(new Nt("heartbeat",t=>new LP(t),"PRIVATE")),It(Cc,vf,e),It(Cc,vf,"esm2020"),It("fire-js","")}zP("");var WP="firebase",HP="12.8.0";/**
400 * @license
401 * Copyright 2020 Google LLC
402 *
403 * Licensed under the Apache License, Version 2.0 (the "License");
404 * you may not use this file except in compliance with the License.
405 * You may obtain a copy of the License at
406 *
407 *   http://www.apache.org/licenses/LICENSE-2.0
408 *
409 * Unless required by applicable law or agreed to in writing, software
410 * distributed under the License is distributed on an "AS IS" BASIS,
411 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
412 * See the License for the specific language governing permissions and
413 * limitations under the License.
414 */It(WP,HP,"app");function Pg(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}const KP=Pg,_g=new rn("auth","Firebase",Pg());/**
415 * @license
416 * Copyright 2020 Google LLC
417 *
418 * Licensed under the Apache License, Version 2.0 (the "License");
419 * you may not use this file except in compliance with the License.
420 * You may obtain a copy of the License at
421 *
422 *   http://www.apache.org/licenses/LICENSE-2.0
423 *
424 * Unless required by applicable law or agreed to in writing, software
425 * distributed under the License is distributed on an "AS IS" BASIS,
426 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
427 * See the License for the specific language governing permissions and
428 * limitations under the License.
429 */const Ca=new zl("@firebase/auth");function VP(e,...t){Ca.logLevel<=Q.WARN&&Ca.warn(`Auth (${Ci}): ${e}`,...t)}function Sa(e,...t){Ca.logLevel<=Q.ERROR&&Ca.error(`Auth (${Ci}): ${e}`,...t)}/**
430 * @license
431 * Copyright 2020 Google LLC
432 *
433 * Licensed under the Apache License, Version 2.0 (the "License");
434 * you may not use this file except in compliance with the License.
435 * You may obtain a copy of the License at
436 *
437 *   http://www.apache.org/licenses/LICENSE-2.0
438 *
439 * Unless required by applicable law or agreed to in writing, software
440 * distributed under the License is distributed on an "AS IS" BASIS,
441 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
442 * See the License for the specific language governing permissions and
443 * limitations under the License.
444 */function wt(e,...t){throw Hl(e,...t)}function kt(e,...t){return Hl(e,...t)}function Og(e,t,r){const n={...KP(),[t]:r};return new rn("auth","Firebase",n).create(t,{appName:e.name})}function _r(e){return Og(e,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function Hl(e,...t){if(typeof e!="string"){const r=t[0],n=[...t.slice(1)];return n[0]&&(n[0].appName=e.name),e._errorFactory.create(r,...n)}return _g.create(e,...t)}function H(e,t,...r){if(!e)throw Hl(t,...r)}function Ht(e){const t="INTERNAL ASSERTION FAILED: "+e;throw Sa(t),new Error(t)}function Zt(e,t){e||Ht(t)}/**
445 * @license
446 * Copyright 2020 Google LLC
447 *
448 * Licensed under the Apache License, Version 2.0 (the "License");
449 * you may not use this file except in compliance with the License.
450 * You may obtain a copy of the License at
451 *
452 *   http://www.apache.org/licenses/LICENSE-2.0
453 *
454 * Unless required by applicable law or agreed to in writing, software
455 * distributed under the License is distributed on an "AS IS" BASIS,
456 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
457 * See the License for the specific language governing permissions and
458 * limitations under the License.
459 */function Mc(){var e;return typeof self<"u"&&((e=self.location)==null?void 0:e.href)||""}function qP(){return Pf()==="http:"||Pf()==="https:"}function Pf(){var e;return typeof self<"u"&&((e=self.location)==null?void 0:e.protocol)||null}/**
460 * @license
461 * Copyright 2020 Google LLC
462 *
463 * Licensed under the Apache License, Version 2.0 (the "License");
464 * you may not use this file except in compliance with the License.
465 * You may obtain a copy of the License at
466 *
467 *   http://www.apache.org/licenses/LICENSE-2.0
468 *
469 * Unless required by applicable law or agreed to in writing, software
470 * distributed under the License is distributed on an "AS IS" BASIS,
471 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
472 * See the License for the specific language governing permissions and
473 * limitations under the License.
474 */function GP(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(qP()||hg()||"connection"in navigator)?navigator.onLine:!0}function YP(){if(typeof navigator>"u")return null;const e=navigator;return e.languages&&e.languages[0]||e.language||null}/**
475 * @license
476 * Copyright 2020 Google LLC
477 *
478 * Licensed under the Apache License, Version 2.0 (the "License");
479 * you may not use this file except in compliance with the License.
480 * You may obtain a copy of the License at
481 *
482 *   http://www.apache.org/licenses/LICENSE-2.0
483 *
484 * Unless required by applicable law or agreed to in writing, software
485 * distributed under the License is distributed on an "AS IS" BASIS,
486 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
487 * See the License for the specific language governing permissions and
488 * limitations under the License.
489 */class Ni{constructor(t,r){this.shortDelay=t,this.longDelay=r,Zt(r>t,"Short delay should be less than long delay!"),this.isMobile=bS()||xS()}get(){return GP()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/**
490 * @license
491 * Copyright 2020 Google LLC
492 *
493 * Licensed under the Apache License, Version 2.0 (the "License");
494 * you may not use this file except in compliance with the License.
495 * You may obtain a copy of the License at
496 *
497 *   http://www.apache.org/licenses/LICENSE-2.0
498 *
499 * Unless required by applicable law or agreed to in writing, software
500 * distributed under the License is distributed on an "AS IS" BASIS,
501 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
502 * See the License for the specific language governing permissions and
503 * limitations under the License.
504 */function Kl(e,t){Zt(e.emulator,"Emulator should always be set here");const{url:r}=e.emulator;return t?`${r}${t.startsWith("/")?t.slice(1):t}`:r}/**
505 * @license
506 * Copyright 2020 Google LLC
507 *
508 * Licensed under the Apache License, Version 2.0 (the "License");
509 * you may not use this file except in compliance with the License.
510 * You may obtain a copy of the License at
511 *
512 *   http://www.apache.org/licenses/LICENSE-2.0
513 *
514 * Unless required by applicable law or agreed to in writing, software
515 * distributed under the License is distributed on an "AS IS" BASIS,
516 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
517 * See the License for the specific language governing permissions and
518 * limitations under the License.
519 */class Ag{static initialize(t,r,n){this.fetchImpl=t,r&&(this.headersImpl=r),n&&(this.responseImpl=n)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;if(typeof globalThis<"u"&&globalThis.fetch)return globalThis.fetch;if(typeof fetch<"u")return fetch;Ht("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<"u"&&"Headers"in self)return self.Headers;if(typeof globalThis<"u"&&globalThis.Headers)return globalThis.Headers;if(typeof Headers<"u")return Headers;Ht("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<"u"&&"Response"in self)return self.Response;if(typeof globalThis<"u"&&globalThis.Response)return globalThis.Response;if(typeof Response<"u")return Response;Ht("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/**
520 * @license
521 * Copyright 2020 Google LLC
522 *
523 * Licensed under the Apache License, Version 2.0 (the "License");
524 * you may not use this file except in compliance with the License.
525 * You may obtain a copy of the License at
526 *
527 *   http://www.apache.org/licenses/LICENSE-2.0
528 *
529 * Unless required by applicable law or agreed to in writing, software
530 * distributed under the License is distributed on an "AS IS" BASIS,
531 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
532 * See the License for the specific language governing permissions and
533 * limitations under the License.
534 */const JP={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"};/**
535 * @license
536 * Copyright 2020 Google LLC
537 *
538 * Licensed under the Apache License, Version 2.0 (the "License");
539 * you may not use this file except in compliance with the License.
540 * You may obtain a copy of the License at
541 *
542 *   http://www.apache.org/licenses/LICENSE-2.0
543 *
544 * Unless required by applicable law or agreed to in writing, software
545 * distributed under the License is distributed on an "AS IS" BASIS,
546 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
547 * See the License for the specific language governing permissions and
548 * limitations under the License.
549 */const XP=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],ZP=new Ni(3e4,6e4);function ar(e,t){return e.tenantId&&!t.tenantId?{...t,tenantId:e.tenantId}:t}async function $t(e,t,r,n,i={}){return Eg(e,i,async()=>{let a={},o={};n&&(t==="GET"?o=n:a={body:JSON.stringify(n)});const s=Ti({key:e.config.apiKey,...o}).slice(1),c=await e._getAdditionalHeaders();c["Content-Type"]="application/json",e.languageCode&&(c["X-Firebase-Locale"]=e.languageCode);const l={method:t,headers:c,...a};return wS()||(l.referrerPolicy="no-referrer"),e.emulatorConfig&&Mo(e.emulatorConfig.host)&&(l.credentials="include"),Ag.fetch()(await Ig(e,e.config.apiHost,r,s),l)})}async function Eg(e,t,r){e._canInitEmulator=!1;const n={...JP,...t};try{const i=new e_(e),a=await Promise.race([r(),i.promise]);i.clearNetworkTimeout();const o=await a.json();if("needConfirmation"in o)throw ia(e,"account-exists-with-different-credential",o);if(a.ok&&!("errorMessage"in o))return o;{const s=a.ok?o.errorMessage:o.error.message,[c,l]=s.split(" : ");if(c==="FEDERATED_USER_ID_ALREADY_LINKED")throw ia(e,"credential-already-in-use",o);if(c==="EMAIL_EXISTS")throw ia(e,"email-already-in-use",o);if(c==="USER_DISABLED")throw ia(e,"user-disabled",o);const u=n[c]||c.toLowerCase().replace(/[_\s]+/g,"-");if(l)throw Og(e,u,l);wt(e,u)}}catch(i){if(i instanceof Rt)throw i;wt(e,"network-request-failed",{message:String(i)})}}async function Ro(e,t,r,n,i={}){const a=await $t(e,t,r,n,i);return"mfaPendingCredential"in a&&wt(e,"multi-factor-auth-required",{_serverResponse:a}),a}async function Ig(e,t,r,n){const i=`${t}${r}?${n}`,a=e,o=a.config.emulator?Kl(e.config,i):`${e.config.apiScheme}://${i}`;return XP.includes(r)&&(await a._persistenceManagerAvailable,a._getPersistenceType()==="COOKIE")?a._getPersistence()._getFinalTarget(o).toString():o}function QP(e){switch(e){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}class e_{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(t){this.auth=t,this.timer=null,this.promise=new Promise((r,n)=>{this.timer=setTimeout(()=>n(kt(this.auth,"network-request-failed")),ZP.get())})}}
549function ia(e,t,r){const n={appName:e.name};r.email&&(n.email=r.email),r.phoneNumber&&(n.phoneNumber=r.phoneNumber);const i=kt(e,t,n);return i.customData._tokenResponse=r,i}function _f(e){return e!==void 0&&e.enterprise!==void 0}class t_{constructor(t){if(this.siteKey="",this.recaptchaEnforcementState=[],t.recaptchaKey===void 0)throw new Error("recaptchaKey undefined");this.siteKey=t.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=t.recaptchaEnforcementState}getProviderEnforcementState(t){if(!this.recaptchaEnforcementState||this.recaptchaEnforcementState.length===0)return null;for(const r of this.recaptchaEnforcementState)if(r.provider&&r.provider===t)return QP(r.enforcementState);return null}isProviderEnabled(t){return this.getProviderEnforcementState(t)==="ENFORCE"||this.getProviderEnforcementState(t)==="AUDIT"}isAnyProviderEnabled(){return this.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")||this.isProviderEnabled("PHONE_PROVIDER")}}async function r_(e,t){return $t(e,"GET","/v2/recaptchaConfig",ar(e,t))}/**
550 * @license
551 * Copyright 2020 Google LLC
552 *
553 * Licensed under the Apache License, Version 2.0 (the "License");
554 * you may not use this file except in compliance with the License.
555 * You may obtain a copy of the License at
556 *
557 *   http://www.apache.org/licenses/LICENSE-2.0
558 *
559 * Unless required by applicable law or agreed to in writing, software
560 * distributed under the License is distributed on an "AS IS" BASIS,
561 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
562 * See the License for the specific language governing permissions and
563 * limitations under the License.
564 */async function n_(e,t){return $t(e,"POST","/v1/accounts:delete",t)}async function Na(e,t){return $t(e,"POST","/v1/accounts:lookup",t)}/**
565 * @license
566 * Copyright 2020 Google LLC
567 *
568 * Licensed under the Apache License, Version 2.0 (the "License");
569 * you may not use this file except in compliance with the License.
570 * You may obtain a copy of the License at
571 *
572 *   http://www.apache.org/licenses/LICENSE-2.0
573 *
574 * Unless required by applicable law or agreed to in writing, software
575 * distributed under the License is distributed on an "AS IS" BASIS,
576 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
577 * See the License for the specific language governing permissions and
578 * limitations under the License.
579 */function si(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch{}}async function i_(e,t=!1){const r=et(e),n=await r.getIdToken(t),i=Vl(n);H(i&&i.exp&&i.auth_time&&i.iat,r.auth,"internal-error");const a=typeof i.firebase=="object"?i.firebase:void 0,o=a==null?void 0:a.sign_in_provider;return{claims:i,token:n,authTime:si(Gs(i.auth_time)),issuedAtTime:si(Gs(i.iat)),expirationTime:si(Gs(i.exp)),signInProvider:o||null,signInSecondFactor:(a==null?void 0:a.sign_in_second_factor)||null}}function Gs(e){return Number(e)*1e3}function Vl(e){const[t,r,n]=e.split(".");if(t===void 0||r===void 0||n===void 0)return Sa("JWT malformed, contained fewer than 3 sections"),null;try{const i=ug(r);return i?JSON.parse(i):(Sa("Failed to decode base64 JWT payload"),null)}catch(i){return Sa("Caught error parsing JWT payload as JSON",i==null?void 0:i.toString()),null}}function Of(e){const t=Vl(e);return H(t,"internal-error"),H(typeof t.exp<"u","internal-error"),H(typeof t.iat<"u","internal-error"),Number(t.exp)-Number(t.iat)}/**
580 * @license
581 * Copyright 2020 Google LLC
582 *
583 * Licensed under the Apache License, Version 2.0 (the "License");
584 * you may not use this file except in compliance with the License.
585 * You may obtain a copy of the License at
586 *
587 *   http://www.apache.org/licenses/LICENSE-2.0
588 *
589 * Unless required by applicable law or agreed to in writing, software
590 * distributed under the License is distributed on an "AS IS" BASIS,
591 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
592 * See the License for the specific language governing permissions and
593 * limitations under the License.
594 */async function fi(e,t,r=!1){if(r)return t;try{return await t}catch(n){throw n instanceof Rt&&a_(n)&&e.auth.currentUser===e&&await e.auth.signOut(),n}}function a_({code:e}){return e==="auth/user-disabled"||e==="auth/user-token-expired"}/**
595 * @license
596 * Copyright 2020 Google LLC
597 *
598 * Licensed under the Apache License, Version 2.0 (the "License");
599 * you may not use this file except in compliance with the License.
600 * You may obtain a copy of the License at
601 *
602 *   http://www.apache.org/licenses/LICENSE-2.0
603 *
604 * Unless required by applicable law or agreed to in writing, software
605 * distributed under the License is distributed on an "AS IS" BASIS,
606 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
607 * See the License for the specific language governing permissions and
608 * limitations under the License.
609 */class o_{constructor(t){this.user=t,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(t){if(t){const r=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),r}else{this.errorBackoff=3e4;const n=(this.user.stsTokenManager.expirationTime??0)-Date.now()-3e5;return Math.max(0,n)}}schedule(t=!1){if(!this.isRunning)return;const r=this.getInterval(t);this.timerId=setTimeout(async()=>{await this.iteration()},r)}async iteration(){try{await this.user.getIdToken(!0)}catch(t){(t==null?void 0:t.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}/**
610 * @license
611 * Copyright 2020 Google LLC
612 *
613 * Licensed under the Apache License, Version 2.0 (the "License");
614 * you may not use this file except in compliance with the License.
615 * You may obtain a copy of the License at
616 *
617 *   http://www.apache.org/licenses/LICENSE-2.0
618 *
619 * Unless required by applicable law or agreed to in writing, software
620 * distributed under the License is distributed on an "AS IS" BASIS,
621 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
622 * See the License for the specific language governing permissions and
623 * limitations under the License.
624 */class Dc{constructor(t,r){this.createdAt=t,this.lastLoginAt=r,this._initializeTime()}_initializeTime(){this.lastSignInTime=si(this.lastLoginAt),this.creationTime=si(this.createdAt)}_copy(t){this.createdAt=t.createdAt,this.lastLoginAt=t.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/**
625 * @license
626 * Copyright 2019 Google LLC
627 *
628 * Licensed under the Apache License, Version 2.0 (the "License");
629 * you may not use this file except in compliance with the License.
630 * You may obtain a copy of the License at
631 *
632 *   http://www.apache.org/licenses/LICENSE-2.0
633 *
634 * Unless required by applicable law or agreed to in writing, software
635 * distributed under the License is distributed on an "AS IS" BASIS,
636 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
637 * See the License for the specific language governing permissions and
638 * limitations under the License.
639 */async function ja(e){var d;const t=e.auth,r=await e.getIdToken(),n=await fi(e,Na(t,{idToken:r}));H(n==null?void 0:n.users.length,t,"internal-error");const i=n.users[0];e._notifyReloadListener(i);const a=(d=i.providerUserInfo)!=null&&d.length?kg(i.providerUserInfo):[],o=c_(e.providerData,a),s=e.isAnonymous,c=!(e.email&&i.passwordHash)&&!(o!=null&&o.length),l=s?c:!1,u={uid:i.localId,displayName:i.displayName||null,photoURL:i.photoUrl||null,email:i.email||null,emailVerified:i.emailVerified||!1,phoneNumber:i.phoneNumber||null,tenantId:i.tenantId||null,providerData:o,metadata:new Dc(i.createdAt,i.lastLoginAt),isAnonymous:l};Object.assign(e,u)}async function s_(e){const t=et(e);await ja(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}function c_(e,t){return[...e.filter(n=>!t.some(i=>i.providerId===n.providerId)),...t]}function kg(e){return e.map(({providerId:t,...r})=>({providerId:t,uid:r.rawId||"",displayName:r.displayName||null,email:r.email||null,phoneNumber:r.phoneNumber||null,photoURL:r.photoUrl||null}))}/**
640 * @license
641 * Copyright 2020 Google LLC
642 *
643 * Licensed under the Apache License, Version 2.0 (the "License");
644 * you may not use this file except in compliance with the License.
645 * You may obtain a copy of the License at
646 *
647 *   http://www.apache.org/licenses/LICENSE-2.0
648 *
649 * Unless required by applicable law or agreed to in writing, softw
649are
650 * distributed under the License is distributed on an "AS IS" BASIS,
651 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
652 * See the License for the specific language governing permissions and
653 * limitations under the License.
654 */async function l_(e,t){const r=await Eg(e,{},async()=>{const n=Ti({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:i,apiKey:a}=e.config,o=await Ig(e,i,"/v1/token",`key=${a}`),s=await e._getAdditionalHeaders();s["Content-Type"]="application/x-www-form-urlencoded";const c={method:"POST",headers:s,body:n};return e.emulatorConfig&&Mo(e.emulatorConfig.host)&&(c.credentials="include"),Ag.fetch()(o,c)});return{accessToken:r.access_token,expiresIn:r.expires_in,refreshToken:r.refresh_token}}async function u_(e,t){return $t(e,"POST","/v2/accounts:revokeToken",ar(e,t))}/**
655 * @license
656 * Copyright 2020 Google LLC
657 *
658 * Licensed under the Apache License, Version 2.0 (the "License");
659 * you may not use this file except in compliance with the License.
660 * You may obtain a copy of the License at
661 *
662 *   http://www.apache.org/licenses/LICENSE-2.0
663 *
664 * Unless required by applicable law or agreed to in writing, software
665 * distributed under the License is distributed on an "AS IS" BASIS,
666 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
667 * See the License for the specific language governing permissions and
668 * limitations under the License.
669 */class pn{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(t){H(t.idToken,"internal-error"),H(typeof t.idToken<"u","internal-error"),H(typeof t.refreshToken<"u","internal-error");const r="expiresIn"in t&&typeof t.expiresIn<"u"?Number(t.expiresIn):Of(t.idToken);this.updateTokensAndExpiration(t.idToken,t.refreshToken,r)}updateFromIdToken(t){H(t.length!==0,"internal-error");const r=Of(t);this.updateTokensAndExpiration(t,null,r)}async getToken(t,r=!1){return!r&&this.accessToken&&!this.isExpired?this.accessToken:(H(this.refreshToken,t,"user-token-expired"),this.refreshToken?(await this.refresh(t,this.refreshToken),this.accessToken):null)}clearRefreshToken(){this.refreshToken=null}async refresh(t,r){const{accessToken:n,refreshToken:i,expiresIn:a}=await l_(t,r);this.updateTokensAndExpiration(n,i,Number(a))}updateTokensAndExpiration(t,r,n){this.refreshToken=r||null,this.accessToken=t||null,this.expirationTime=Date.now()+n*1e3}static fromJSON(t,r){const{refreshToken:n,accessToken:i,expirationTime:a}=r,o=new pn;return n&&(H(typeof n=="string","internal-error",{appName:t}),o.refreshToken=n),i&&(H(typeof i=="string","internal-error",{appName:t}),o.accessToken=i),a&&(H(typeof a=="number","internal-error",{appName:t}),o.expirationTime=a),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(t){this.accessToken=t.accessToken,this.refreshToken=t.refreshToken,this.expirationTime=t.expirationTime}_clone(){return Object.assign(new pn,this.toJSON())}_performRefresh(){return Ht("not implemented")}}/**
670 * @license
671 * Copyright 2020 Google LLC
672 *
673 * Licensed under the Apache License, Version 2.0 (the "License");
674 * you may not use this file except in compliance with the License.
675 * You may obtain a copy of the License at
676 *
677 *   http://www.apache.org/licenses/LICENSE-2.0
678 *
679 * Unless required by applicable law or agreed to in writing, software
680 * distributed under the License is distributed on an "AS IS" BASIS,
681 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
682 * See the License for the specific language governing permissions and
683 * limitations under the License.
684 */function hr(e,t){H(typeof e=="string"||typeof e>"u","internal-error",{appName:t})}class vt{constructor({uid:t,auth:r,stsTokenManager:n,...i}){this.providerId="firebase",this.proactiveRefresh=new o_(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=r,this.stsTokenManager=n,this.accessToken=n.accessToken,this.displayName=i.displayName||null,this.email=i.email||null,this.emailVerified=i.emailVerified||!1,this.phoneNumber=i.phoneNumber||null,this.photoURL=i.photoURL||null,this.isAnonymous=i.isAnonymous||!1,this.tenantId=i.tenantId||null,this.providerData=i.providerData?[...i.providerData]:[],this.metadata=new Dc(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(t){const r=await fi(this,this.stsTokenManager.getToken(this.auth,t));return H(r,this.auth,"internal-error"),this.accessToken!==r&&(this.accessToken=r,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),r}getIdTokenResult(t){return i_(this,t)}reload(){return s_(this)}_assign(t){this!==t&&(H(this.uid===t.uid,this.auth,"internal-error"),this.displayName=t.displayName,this.photoURL=t.photoURL,this.email=t.email,this.emailVerified=t.emailVerified,this.phoneNumber=t.phoneNumber,this.isAnonymous=t.isAnonymous,this.tenantId=t.tenantId,this.providerData=t.providerData.map(r=>({...r})),this.metadata._copy(t.metadata),this.stsTokenManager._assign(t.stsTokenManager))}_clone(t){const r=new vt({...this,auth:t,stsTokenManager:this.stsTokenManager._clone()});return r.metadata._copy(this.metadata),r}_onReload(t){H(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=t,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(t){this.reloadListener?this.reloadListener(t):this.reloadUserInfo=t}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(t,r=!1){let n=!1;t.idToken&&t.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(t),n=!0),r&&await ja(this),await this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(At(this.auth.app))return Promise.reject(_r(this.auth));const t=await this.getIdToken();return await fi(this,n_(this.auth,{idToken:t})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return{uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isA
684nonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(t=>({...t})),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId,...this.metadata.toJSON(),apiKey:this.auth.config.apiKey,appName:this.auth.name}}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(t,r){const n=r.displayName??void 0,i=r.email??void 0,a=r.phoneNumber??void 0,o=r.photoURL??void 0,s=r.tenantId??void 0,c=r._redirectEventId??void 0,l=r.createdAt??void 0,u=r.lastLoginAt??void 0,{uid:d,emailVerified:f,isAnonymous:h,providerData:g,stsTokenManager:v}=r;H(d&&v,t,"internal-error");const y=pn.fromJSON(this.name,v);H(typeof d=="string",t,"internal-error"),hr(n,t.name),hr(i,t.name),H(typeof f=="boolean",t,"internal-error"),H(typeof h=="boolean",t,"internal-error"),hr(a,t.name),hr(o,t.name),hr(s,t.name),hr(c,t.name),hr(l,t.name),hr(u,t.name);const b=new vt({uid:d,auth:t,email:i,emailVerified:f,displayName:n,isAnonymous:h,photoURL:o,phoneNumber:a,tenantId:s,stsTokenManager:y,createdAt:l,lastLoginAt:u});return g&&Array.isArray(g)&&(b.providerData=g.map(S=>({...S}))),c&&(b._redirectEventId=c),b}static async _fromIdTokenResponse(t,r,n=!1){const i=new pn;i.updateFromServerResponse(r);const a=new vt({uid:r.localId,auth:t,stsTokenManager:i,isAnonymous:n});return await ja(a),a}static async _fromGetAccountInfoResponse(t,r,n){const i=r.users[0];H(i.localId!==void 0,"internal-error");const a=i.providerUserInfo!==void 0?kg(i.providerUserInfo):[],o=!(i.email&&i.passwordHash)&&!(a!=null&&a.length),s=new pn;s.updateFromIdToken(n);const c=new vt({uid:i.localId,auth:t,stsTokenManager:s,isAnonymous:o}),l={uid:i.localId,displayName:i.displayName||null,photoURL:i.photoUrl||null,email:i.email||null,emailVerified:i.emailVerified||!1,phoneNumber:i.phoneNumber||null,tenantId:i.tenantId||null,providerData:a,metadata:new Dc(i.createdAt,i.lastLoginAt),isAnonymous:!(i.email&&i.passwordHash)&&!(a!=null&&a.length)};return Object.assign(c,l),c}}/**
685 * @license
686 * Copyright 2020 Google LLC
687 *
688 * Licensed under the Apache License, Version 2.0 (the "License");
689 * you may not use this file except in compliance with the License.
690 * You may obtain a copy of the License at
691 *
692 *   http://www.apache.org/licenses/LICENSE-2.0
693 *
694 * Unless required by applicable law or agreed to in writing, software
695 * distributed under the License is distributed on an "AS IS" BASIS,
696 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
697 * See the License for the specific language governing permissions and
698 * limitations under the License.
699 */const Af=new Map;function Kt(e){Zt(e instanceof Function,"Expected a class definition");let t=Af.get(e);return t?(Zt(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,Af.set(e,t),t)}/**
700 * @license
701 * Copyright 2019 Google LLC
702 *
703 * Licensed under the Apache License, Version 2.0 (the "License");
704 * you may not use this file except in compliance with the License.
705 * You may obtain a copy of the License at
706 *
707 *   http://www.apache.org/licenses/LICENSE-2.0
708 *
709 * Unless required by applicable law or agreed to in writing, software
710 * distributed under the License is distributed on an "AS IS" BASIS,
711 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
712 * See the License for the specific language governing permissions and
713 * limitations under the License.
714 */class Tg{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(t,r){this.storage[t]=r}async _get(t){const r=this.storage[t];return r===void 0?null:r}async _remove(t){delete this.storage[t]}_addListener(t,r){}_removeListener(t,r){}}Tg.type="NONE";const Ef=Tg;/**
715 * @license
716 * Copyright 2019 Google LLC
717 *
718 * Licensed under the Apache License, Version 2.0 (the "License");
719 * you may not use this file except in compliance with the License.
720 * You may obtain a copy of the License at
721 *
722 *   http://www.apache.org/licenses/LICENSE-2.0
723 *
724 * Unless required by applicable law or agreed to in writing, softw
724are
725 * distributed under the License is distributed on an "AS IS" BASIS,
726 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
727 * See the License for the specific language governing permissions and
728 * limitations under the License.
729 */function Pa(e,t,r){return`firebase:${e}:${t}:${r}`}class mn{constructor(t,r,n){this.persistence=t,this.auth=r,this.userKey=n;const{config:i,name:a}=this.auth;this.fullUserKey=Pa(this.userKey,i.apiKey,a),this.fullPersistenceKey=Pa("persistence",i.apiKey,a),this.boundEventHandler=r._onStorageEvent.bind(r),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(t){return this.persistence._set(this.fullUserKey,t.toJSON())}async getCurrentUser(){const t=await this.persistence._get(this.fullUserKey);if(!t)return null;if(typeof t=="string"){const r=await Na(this.auth,{idToken:t}).catch(()=>{});return r?vt._fromGetAccountInfoResponse(this.auth,r,t):null}return vt._fromJSON(this.auth,t)}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(t){if(this.persistence===t)return;const r=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=t,r)return this.setCurrentUser(r)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(t,r,n="authUser"){if(!r.length)return new mn(Kt(Ef),t,n);const i=(await Promise.all(r.map(async l=>{if(await l._isAvailable())return l}))).filter(l=>l);let a=i[0]||Kt(Ef);const o=Pa(n,t.config.apiKey,t.name);let s=null;for(const l of r)try{const u=await l._get(o);if(u){let d;if(typeof u=="string"){const f=await Na(t,{idToken:u}).catch(()=>{});if(!f)break;d=await vt._fromGetAccountInfoResponse(t,f,u)}else d=vt._fromJSON(t,u);l!==a&&(s=d),a=l;break}}catch{}const c=i.filter(l=>l._shouldAllowMigration);return!a._shouldAllowMigration||!c.length?new mn(a,t,n):(a=c[0],s&&await a._set(o,s.toJSON()),await Promise.all(r.map(async l=>{if(l!==a)try{await l._remove(o)}catch{}})),new mn(a,t,n))}}/**
730 * @license
731 * Copyright 2020 Google LLC
732 *
733 * Licensed under the Apache License, Version 2.0 (the "License");
734 * you may not use this file except in compliance with the License.
735 * You may obtain a copy of the License at
736 *
737 *   http://www.apache.org/licenses/LICENSE-2.0
738 *
739 * Unless required by applicable law or agreed to in writing, software
740 * distributed under the License is distributed on an "AS IS" BASIS,
741 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
742 * See the License for the specific language governing permissions and
743 * limitations under the License.
744 */function If(e){const t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(Mg(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(Cg(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(Rg(t))return"Blackberry";if($g(t))return"Webos";if(Ng(t))return"Safari";if((t.includes("chrome/")||jg(t))&&!t.includes("edge/"))return"Chrome";if(Dg(t))return"Android";{const r=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,n=e.match(r);if((n==null?void 0:n.length)===2)return n[1]}return"Other"}function Cg(e=$e()){return/firefox\//i.test(e)}function Ng(e=$e()){const t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function jg(e=$e()){return/crios\//i.test(e)}function Mg(e=$e()){return/iemobile/i.test(e)}function Dg(e=$e()){return/android/i.test(e)}function Rg(e=$e()){return/blackberry/i.test(e)}function $g(e=$e()){return/webos/i.test(e)}function ql(e=$e()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function d_(e=$e()){var t;return ql(e)&&!!((t=window.navigator)!=null&&t.standalone)}function f_(){return SS()&&document.documentMode===10}function Lg(e=$e()){return ql(e)||Dg(e)||$g(e)||Rg(e)||/windows phone/i.test(e)||Mg(e)}/**
745 * @license
746 * Copyright 2020 Google LLC
747 *
748 * Licensed under the Apache License, Version 2.0 (the "License");
749 * you may not use this file except in compliance with the License.
750 * You may obtain a copy of the License at
751 *
752 *   http://www.apache.org/licenses/LICENSE-2.0
753 *
754 * Unless required by applicable law or agreed to in writing, software
755 * distributed under the License is distributed on an "AS IS" BASIS,
756 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
757 * See the License for the specific language governing permissions and
758 * limitations under the License.
759 */function Fg(e,t=[]){let r;switch(e){case"Browser":r=If($e());break;case"Worker":r=`${If($e())}-${e}`;break;default:r=e}const n=t.length?t.join(","):"FirebaseCore-web";return`${r}/JsCore/${Ci}/${n}`}/**
760 * @license
761 * Copyright 2022 Google LLC
762 *
763 * Licensed under the Apache License, Version 2.0 (the "License");
764 * you may not use this file except in compliance with the License.
765 * You may obtain a copy of the License at
766 *
767 *   http://www.apache.org/licenses/LICENSE-2.0
768 *
769 * Unless required by applicable law or agreed to in writing, software
770 * distributed under the License is distributed on an "AS IS" BASIS,
771 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
772 * See the License for the specific language governing permissions and
773 * limitations under the License.
774 */class h_{constructor(t){this.auth=t,this.queue=[]}pushCallback(t,r){const n=a=>new Promise((o,s)=>{try{const c=t(a);o(c)}catch(c){s(c)}});n.onAbort=r,this.queue.push(n);const i=this.queue.length-1;return()=>{this.queue[i]=()=>Promise.resolve()}}async runMiddleware(t){if(this.auth.currentUser===t)return;const r=[];try{for(const n of this.queue)await n(t),n.onAbort&&r.push(n.onAbort)}catch(n){r.reverse();for(const i of r)try{i()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:n==null?void 0:n.message})}}}/**
775 * @license
776 * Copyright 2023 Google LLC
777 *
778 * Licensed under the Apache License, Version 2.0 (the "License");
779 * you may not use this file except in compliance with the License.
780 * You may obtain a copy of the License at
781 *
782 *   http://www.apache.org/licenses/LICENSE-2.0
783 *
784 * Unless required by applicable law or agreed to in writing, software
785 * distributed under the License is distributed on an "AS IS" BASIS,
786 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
787 * See the License for the specific language governing permissions and
788 * limitations under the License.
789 */async function p_(e,t={}){return $t(e,"GET","/v2/passwordPolicy",ar(e,t))}/**
790 * @license
791 * Copyright 2023 Google LLC
792 *
793 * Licensed under the Apache License, Version 2.0 (the "License");
794 * you may not use this file except in compliance with the License.
795 * You may obtain a copy of the License at
796 *
797 *   http://www.apache.org/licenses/LICENSE-2.0
798 *
799 * Unless required by applicable law or agreed to in writing, software
800 * distributed under the License is distributed on an "AS IS" BASIS,
801 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
802 * See the License for the specific language governing permissions and
803 * limitations under the License.
804 */const m_=6;class g_{constructor(t){var n;const r=t.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=r.minPasswordLength??m_,r.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=r.maxPasswordLength),r.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=r.containsLowercaseCharacter),r.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=r.containsUppercaseCharacter),r.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=r.containsNumericCharacter),r.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=r.containsNonAlphanumericCharacter),this.enforcementState=t.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=((n=t.allowedNonAlphanumericCharacters)==null?void 0:n.join(""))??"",this.forceUpgradeOnSignin=t.forceUpgradeOnSignin??!1,this.schemaVersion=t.schemaVersion}validatePassword(t){const r={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(t,r),this.validatePasswordCharacterOptions(t,r),r.isValid&&
804(r.isValid=r.meetsMinPasswordLength??!0),r.isValid&&(r.isValid=r.meetsMaxPasswordLength??!0),r.isValid&&(r.isValid=r.containsLowercaseLetter??!0),r.isValid&&(r.isValid=r.containsUppercaseLetter??!0),r.isValid&&(r.isValid=r.containsNumericCharacter??!0),r.isValid&&(r.isValid=r.containsNonAlphanumericCharacter??!0),r}validatePasswordLengthOptions(t,r){const n=this.customStrengthOptions.minPasswordLength,i=this.customStrengthOptions.maxPasswordLength;n&&(r.meetsMinPasswordLength=t.length>=n),i&&(r.meetsMaxPasswordLength=t.length<=i)}validatePasswordCharacterOptions(t,r){this.updatePasswordCharacterOptionsStatuses(r,!1,!1,!1,!1);let n;for(let i=0;i<t.length;i++)n=t.charAt(i),this.updatePasswordCharacterOptionsStatuses(r,n>="a"&&n<="z",n>="A"&&n<="Z",n>="0"&&n<="9",this.allowedNonAlphanumericCharacters.includes(n))}updatePasswordCharacterOptionsStatuses(t,r,n,i,a){this.customStrengthOptions.containsLowercaseLetter&&(t.containsLowercaseLetter||(t.containsLowercaseLetter=r)),this.customStrengthOptions.containsUppercaseLetter&&(t.containsUppercaseLetter||(t.containsUppercaseLetter=n)),this.customStrengthOptions.containsNumericCharacter&&(t.containsNumericCharacter||(t.containsNumericCharacter=i)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(t.containsNonAlphanumericCharacter||(t.containsNonAlphanumericCharacter=a))}}/**
805 * @license
806 * Copyright 2020 Google LLC
807 *
808 * Licensed under the Apache License, Version 2.0 (the "License");
809 * you may not use this file except in compliance with the License.
810 * You may obtain a copy of the License at
811 *
812 *   http://www.apache.org/licenses/LICENSE-2.0
813 *
814 * Unless required by applicable law or agreed to in writing, software
815 * distributed under the License is distributed on an "AS IS" BASIS,
816 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
817 * See the License for the specific language governing permissions and
818 * limitations under the License.
819 */class y_{constructor(t,r,n,i){this.app=t,this.heartbeatServiceProvider=r,this.appCheckServiceProvider=n,this.config=i,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new kf(this),this.idTokenSubscription=new kf(this),this.beforeStateQueue=new h_(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=_g,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this._resolvePersistenceManagerAvailable=void 0,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=t.name,this.clientVersion=i.sdkClientVersion,this._persistenceManagerAvailable=new Promise(a=>this._resolvePersistenceManagerAvailable=a)}_initializeWithPersistence(t,r){return r&&(this._popupRedirectResolver=Kt(r)),this._initializationPromise=this.queue(async()=>{var n,i,a;if(!this._deleted&&(this.persistenceManager=await mn.create(this,t),(n=this._resolvePersistenceManagerAvailable)==null||n.call(this),!this._deleted)){if((i=this._popupRedirectResolver)!=null&&i._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(r),this.lastNotifiedUid=((a=this.currentUser)==null?void 0:a.uid)||null,!this._deleted&&(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const t=await this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!t)){if(this.currentUser&&t&&this.currentUser.uid===t.uid){this._currentUser._assign(t),await this.currentUser.getIdToken();return}await this._updateCurrentUser(t,!0)}}async initializeCurrentUserFromIdToken(t){try{const r=await Na(this,{idToken:t}),n=await vt._fromGetAccountInfoResponse(this,r,t);await this.directlySetCurrentUser(n)}catch(r){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",r),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(t){var a;if(At(this.app)){const o=this.app.settings.authIdToken;return o?new Promise(s=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(o).then(s,s))}):this.directlySetCurrentUser(null)}const r=await this.assertedPersistence.getCurrentUser();let n=r,i=!1;if(t&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const o=(a=this.redirectUser)==null?void 0:a._redirectEventId,s=n==null?void 0:n._redirectEventId,c=await this.tryRedirectSignIn(t);(!o||o===s)&&(c!=null&&c.user)&&(n=c.user,i=!0)}if(!n)return this.directlySetCurrentUser(null);
819if(!n._redirectEventId){if(i)try{await this.beforeStateQueue.runMiddleware(n)}catch(o){n=r,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(o))}return n?this.reloadAndSetCurrentUserOrClear(n):this.directlySetCurrentUser(null)}return H(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===n._redirectEventId?this.directlySetCurrentUser(n):this.reloadAndSetCurrentUserOrClear(n)}async tryRedirectSignIn(t){let r=null;try{r=await this._popupRedirectResolver._completeRedirectFn(this,t,!0)}catch{await this._setRedirectUser(null)}return r}async reloadAndSetCurrentUserOrClear(t){try{await ja(t)}catch(r){if((r==null?void 0:r.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(t)}useDeviceLanguage(){this.languageCode=YP()}async _delete(){this._deleted=!0}async updateCurrentUser(t){if(At(this.app))return Promise.reject(_r(this));const r=t?et(t):null;return r&&H(r.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(r&&r._clone(this))}async _updateCurrentUser(t,r=!1){if(!this._deleted)return t&&H(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),r||await this.beforeStateQueue.runMiddleware(t),this.queue(async()=>{await this.directlySetCurrentUser(t),this.notifyAuthListeners()})}async signOut(){return At(this.app)?Promise.reject(_r(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(t){return At(this.app)?Promise.reject(_r(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(Kt(t))})}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(t){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const r=this._getPasswordPolicyInternal();return r.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):r.validatePassword(t)}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const t=await p_(this),r=new g_(t);this.tenantId===null?this._projectPasswordPolicy=r:this._tenantPasswordPolicies[this.tenantId]=r}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(t){this._errorFactory=new rn("auth","Firebase",t())}onAuthStateChanged(t,r,n){return this.registerStateListener(this.authStateSubscription,t,r,n)}beforeAuthStateChanged(t,r){return this.beforeStateQueue.pushCallback(t,r)}onIdTokenChanged(t,r,n){return this.registerStateListener(this.idTokenSubscription,t,r,n)}authStateReady(){return new Promise((t,r)=>{if(this.currentUser)t();else{const n=this.onAuthStateChanged(()=>{n(),t()},r)}})}async revokeAccessToken(t){if(this.currentUser){const r=await this.currentUser.getIdToken(),n={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:t,idToken:r};this.tenantId!=null&&(n.tenantId=this.tenantId),await u_(this,n)}}toJSON(){var t;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(t=this._currentUser)==null?void 0:t.toJSON()}}async _setRedirectUser(t,r){const n=await this.getOrInitRedirectPersistenceManager(r);return t===null?n.removeCurrentUser():n.setCurrentUser(t)}async getOrInitRedirectPersistenceManager(t){if(!this.redirectPersistenceManager){const r=t&&Kt(t)||this._popupRedirectResolver;H(r,this,"argument-error"),this.redirectPersistenceManager=await mn.create(this,[Kt(r._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(t){var r,n;return this._isInitialized&&await this.queue(async()=>{}),((r=this._currentUser)==null?void 0:r._redirectEventId)===t?this._currentUser:((n=this.redirectUser)==null?void 0:n._redirectEventId)===t?this.redirectUser:null}async _persistUserIfCurrent(t){if(t===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(t))}_notifyListenersIfCurrent(t){t===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var r;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const t=((r=this.currentUser)==null?void 0:r.uid)??null;this.lastNotifiedUid!==t&&(this.lastNotifiedUid=t,this.authStateSubscription.next(this.currentUser))}registerStateListener(t,r,n,i){if(this._deleted)return()=>{};const a=typeof r=="function"?r:r.next.bind(r);let o=!1;const s=this._isInitialized?Promise.resolve():this._initializationPromise;if(H(s,this,"internal-error"),s.then(()=>{o||a(this.currentUser)}),typeof r=="function"){const c=t.addObserver(r,n,i);return()=>{o=!0,c()}}else{const c=t.addObserver(r);return()=>{o=!0,c()}}}async directlySetCurrentUser(t){this.currentUser&&this.currentUser!==t&&this._currentUser._stopProactiveRefresh(),t&&this.isProactiveRefreshEnabled&&t._startProactiveRefresh(),this.currentUser=t,t?await this.assertedPersistence.setCurrentUser(t):await this.assertedPersistence.removeCurrentUser()}queue(t){return this.operations=this.operations.then(t,t),this.operations}get assertedPersistence(){return H(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(t){!t||this.frameworks.includes(t)||(this.frameworks.push(t),this.frameworks.sort(),this.clientVersion=Fg(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var i;const t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);const r=await((i=this.heartbeatServiceProvider.getImmediate({optional:!0}))==null?void 0:i.getHeartbeatsHeader());r&&(t["X-Firebase-Client"]=r);const n=await this._getAppCheckToken();return n&&(t["X-Firebase-AppCheck"]=n),t}async _getAppCheckToken(){var r;if(At(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;const t=await((r=this.appCheckServiceProvider.getImmediate({optional:!0}))==null?void 0:r.getToken());return t!=null&&t.error&&VP(`Error while retrieving App Check token: ${t.error}`),t==null?void 0:t.token}}function jn(e){return et(e)}class kf{constructor(t){this.auth=t,this.observer=null,this.addObserver=IS(r=>this.observer=r)}get next(){return H(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}/**
820 * @license
821 * Copyright 2020 Google LLC
822 *
823 * Licensed under the Apache License, Version 2.0 (the "License");
824 * you may not use this file except in compliance with the License.
825 * You may obtain a copy of the License at
826 *
827 *   http://www.apache.org/licenses/LICENSE-2.0
828 *
829 * Unless required by applicable law or agreed to in writing, software
830 * distributed under the License is distributed on an "AS IS" BASIS,
831 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
832 * See the License for the specific language governing permissions and
833 * limitations under the License.
834 */let $o={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function v_(e){$o=e}function Ug(e){return $o.loadJS(e)}function b_(){return $o.recaptchaEnterpriseScript}function w_(){return $o.gapiScript}function x_(e){return`__${e}${Math.floor(Math.random()*1e6)}`}class S_{constructor(){this.enterprise=new P_}ready(t){t()}execute(t,r){return Promise.resolve("token")}render(t,r){return""}}class P_{ready(t){t()}execute(t,r){return Promise.resolve("token")}render(t,r){return""}}const __="recaptcha-enterprise",Bg="NO_RECAPTCHA";class O_{constructor(t){this.type=__,this.auth=jn(t)}async verify(t="verify",r=!1){async function n(a){if(!r){if(a.tenantId==null&&a._agentRecaptchaConfig!=null)return a._agentRecaptchaConfig.siteKey;if(a.tenantId!=null&&a._tenantRecaptchaConfigs[a.tenantId]!==void 0)return a._tenantRecaptchaConfigs[a.tenantId].siteKey}return new Promise(async(o,s)=>{r_(a,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(c=>{if(c.recaptchaKey===void 0)s(new Error("recaptcha Enterprise site key undefined"));else{const l=new t_(c);return a.tenantId==null?a._agentRecaptchaConfig=l:a._tenantRecaptchaConfigs[a.tenantId]=l,o(l.siteKey)}}).catch(c=>{s(c)})})}function i(a,o,s){const c=window.grecaptcha;_f(c)?c.enterprise.ready(()=>{c.enterprise.execute(a,{action:t}).then(l=>{o(l)}).catch(()=>{o(Bg)})}):s(Error("No reCAPTCHA enterprise script loaded."))}return this.auth.settings.appVerificationDisabledForTesting?new S_().execute("siteKey",{action:"verify"}):new Promise((a,o)=>{n(this.auth).then(s=>{if(!r&&_f(window.grecaptcha))i(s,a,o);else{if(typeof window>"u"){o(new Error("RecaptchaVerifier is only supported in browser"));return}let c=b_();c.length!==0&&(c+=s),Ug(c).then(()=>{i(s,a,o)}).catch(l=>{o(l)})}}).catch(s=>{o(s)})})}}async function Tf(e,t,r,n=!1,i=!1){const a=new O_(e);let o;if(i)o=Bg;else try{o=await a.verify(r)}catch{o=await a.verify(r,!0)}const s={...t};if(r==="mfaSmsEnrollment"||r==="mfaSmsSignIn"){if("phoneEnrollmentInfo"in s){const c=s.phoneEnrollmentInfo.phoneNumber,l=s.phoneEnrollmentInfo.recaptchaToken;Object.assign(s,{phoneEnrollmentInfo:{phoneNumber:c,recaptchaToken:l,captchaResponse:o,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}else if("phoneSignInInfo"in s){const c=s.phoneSignInInfo.recaptchaToken;Object.assign(s,{phoneSignInInfo:{recaptchaToken:c,captchaResponse:o,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}return s}return n?Object.assign(s,{captchaResp:o}):Object.assign(s,{captchaResponse:o}),Object.assign(s,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(s,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),s}async function Cf(e,t,r,n,i){var a;if((a=e._getRecaptchaConfig())!=null&&a.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){const o=await Tf(e,t,r,r==="getOobCode");return n(e,o)}else return n(e,t).catch(async o=>{if(o.code==="auth/missing-recaptcha-token"){console.log(`${r} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);const s=await Tf(e,t,r,r==="getOobCode");return n(e,s)}else return Promise.reject(o)})}/**
835 * @license
836 * Copyright 2020 Google LLC
837 *
838 * Licensed under the Apache License, Version 2.0 (the "License");
839 * you may not use this file except in compliance with the License.
840 * You may obtain a copy of the License at
841 *
842 *   http://www.apache.org/licenses/LICENSE-2.0
843 *
844 * Unless required by applicable law or agreed to in writing, software
845 * distributed under the License is distributed on an "AS IS" BASIS,
846 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
847 * See the License for the specific language governing permissions and
848 * limitations under the License.
849 */function A_(e,t){const r=Do(e,"auth");if(r.isInitialized()){const i=r.getImmediate(),a=r.getOptions();if(wn(a,t??{}))return i;wt(i,"already-initialized")}return r.initialize({options:t})}function E_(e,t){const r=(t==null?void 0:t.persistence)||[],n=(Array.isArray(r)?r:[r]).map(Kt);t!=null&&t.errorMap&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(n,t==null?void 0:t.popupRedirectResolver)}function I_(e,t,r){const n=jn(e);H(/^https?:\/\//.test(t),n,"invalid-emulator-scheme");const i=!1,a=zg(t),{host:o,port:s}=k_(t),c=s===null?"":`:${s}`,l={url:`${a}//${o}${c}/`},u=Object.freeze({host:o,port:s,protocol:a.replace(":",""),options:Object.freeze({disableWarnings:i})});if(!n._canInitEmulator){H(n.config.emulator&&n.emulatorConfig,n,"emulator-config-failed"),H(wn(l,n.config.emulator)&&wn(u,n.emulatorConfig),n,"emulator-config-failed");return}n.config.emulator=l,n.emulatorConfig=u,n.settings.appVerificationDisabledForTesting=!0,Mo(o)?(mS(`${a}//${o}${c}`),vS("Auth",!0)):T_()}function zg(e){const t=e.indexOf(":");
849return t<0?"":e.substr(0,t+1)}function k_(e){const t=zg(e),r=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!r)return{host:"",port:null};const n=r[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(n);if(i){const a=i[1];return{host:a,port:Nf(n.substr(a.length+1))}}else{const[a,o]=n.split(":");return{host:a,port:Nf(o)}}}function Nf(e){if(!e)return null;const t=Number(e);return isNaN(t)?null:t}function T_(){function e(){const t=document.createElement("p"),r=t.style;t.innerText="Running in emulator mode. Do not use with production credentials.",r.position="fixed",r.width="100%",r.backgroundColor="#ffffff",r.border=".1em solid #000000",r.color="#b50000",r.bottom="0px",r.left="0px",r.margin="0px",r.zIndex="10000",r.textAlign="center",t.classList.add("firebase-emulator-warning"),document.body.appendChild(t)}typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only.  Do not use with production credentials."),typeof window<"u"&&typeof document<"u"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",e):e())}/**
850 * @license
851 * Copyright 2020 Google LLC
852 *
853 * Licensed under the Apache License, Version 2.0 (the "License");
854 * you may not use this file except in compliance with the License.
855 * You may obtain a copy of the License at
856 *
857 *   http://www.apache.org/licenses/LICENSE-2.0
858 *
859 * Unless required by applicable law or agreed to in writing, software
860 * distributed under the License is distributed on an "AS IS" BASIS,
861 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
862 * See the License for the specific language governing permissions and
863 * limitations under the License.
864 */class Gl{constructor(t,r){this.providerId=t,this.signInMethod=r}toJSON(){return Ht("not implemented")}_getIdTokenResponse(t){return Ht("not implemented")}_linkToIdToken(t,r){return Ht("not implemented")}_getReauthenticationResolver(t){return Ht("not implemented")}}/**
865 * @license
866 * Copyright 2020 Google LLC
867 *
868 * Licensed under the Apache License, Version 2.0 (the "License");
869 * you may not use this file except in compliance with the License.
870 * You may obtain a copy of the License at
871 *
872 *   http://www.apache.org/licenses/LICENSE-2.0
873 *
874 * Unless required by applicable law or agreed to in writing, software
875 * distributed under the License is distributed on an "AS IS" BASIS,
876 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
877 * See the License for the specific language governing permissions and
878 * limitations under the License.
879 */async function C_(e,t){return $t(e,"POST","/v1/accounts:resetPassword",ar(e,t))}async function N_(e,t){return $t(e,"POST","/v1/accounts:signUp",t)}/**
880 * @license
881 * Copyright 2020 Google LLC
882 *
883 * Licensed under the Apache License, Version 2.0 (the "License");
884 * you may not use this file except in compliance with the License.
885 * You may obtain a copy of the License at
886 *
887 *   http://www.apache.org/licenses/LICENSE-2.0
888 *
889 * Unless required by applicable law or agreed to in writing, software
890 * distributed under the License is distributed on an "AS IS" BASIS,
891 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
892 * See the License for the specific language governing permissions and
893 * limitations under the License.
894 */async function j_(e,t){return Ro(e,"POST","/v1/accounts:signInWithPassword",ar(e,t))}async function M_(e,t){return $t(e,"POST","/v1/accounts:sendOobCode",ar(e,t))}async function D_(e,t){return M_(e,t)}/**
895 * @license
896 * Copyright 2020 Google LLC
897 *
898 * Licensed under the Apache License, Version 2.0 (the "License");
899 * you may not use this file except in compliance with the License.
900 * You may obtain a copy of the License at
901 *
902 *   http://www.apache.org/licenses/LICENSE-2.0
903 *
904 * Unless required by applicable law or agreed to in writing, software
905 * distributed under the License is distributed on an "AS IS" BASIS,
906 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
907 * See the License for the specific language governing permissions and
908 * limitations under the License.
909 */async function R_(e,t){return Ro(e,"POST","/v1/accounts:signInWithEmailLink",ar(e,t))}async function $_(e,t){return Ro(e,"POST","/v1/accounts:signInWithEmailLink",ar(e,t))}/**
910 * @license
911 * Copyright 2020 Google LLC
912 *
913 * Licensed under the Apache License, Version 2.0 (the "License");
914 * you may not use this file except in compliance with the License.
915 * You may obtain a copy of the License at
916 *
917 *   http://www.apache.org/licenses/LICENSE-2.0
918 *
919 * Unless required by applicable law or agreed to in writing, software
920 * distributed under the License is distributed on an "AS IS" BASIS,
921 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
922 * See the License for the specific language governing permissions and
923 * limitations under the License.
924 */class hi extends Gl{constructor(t,r,n,i=null){super("password",n),this._email=t,this._password=r,this._tenantId=i}static _fromEmailAndPassword(t,r){return new hi(t,r,"password")}static _fromEmailAndCode(t,r,n=null){return new hi(t,r,"emailLink",n)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(t){const r=typeof t=="string"?JSON.parse(t):t;if(r!=null&&r.email&&(r!=null&&r.password)){if(r.signInMethod==="password")return this._fromEmailAndPassword(r.email,r.password);if(r.signInMethod==="emailLink")return this._fromEmailAndCode(r.email,r.password,r.tenantId)}return null}async _getIdTokenResponse(t){switch(this.signInMethod){case"password":const r={returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return Cf(t,r,"signInWithPassword",j_);case"emailLink":return R_(t,{email:this._email,oobCode:this._password});default:wt(t,"internal-error")}}async _linkToIdToken(t,r){switch(this.signInMethod){case"password":const n={idToken:r,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return Cf(t,n,"signUpPassword",N_);case"emailLink":return $_(t,{idToken:r,email:this._email,oobCode:this._password});default:wt(t,"internal-error")}}_getReauthenticationResolver(t){return this._getIdTokenResponse(t)}}/**
925 * @license
926 * Copyright 2020 Google LLC
927 *
928 * Licensed under the Apache License, Version 2.0 (the "License");
929 * you may not use this file except in compliance with the License.
930 * You may obtain a copy of the License at
931 *
932 *   http://www.apache.org/licenses/LICENSE-2.0
933 *
934 * Unless required by applicable law or agreed to in writing, software
935 * distributed under the License is distributed on an "AS IS" BASIS,
936 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
937 * See the License for the specific language governing permissions and
938 * limitations under the License.
939 */async function gn(e,t){return Ro(e,"POST","/v1/accounts:signInWithIdp",ar(e,t))}/**
940 * @license
941 * Copyright 2020 Google LLC
942 *
943 * Licensed under the Apache License, Version 2.0 (the "License");
944 * you may not use this file except in compliance with the License.
945 * You may obtain a copy of the License at
946 *
947 *   http://www.apache.org/licenses/LICENSE-2.0
948 *
949 * Unless required by applicable law or agreed to in writing, software
950 * distributed under the License is distributed on an "AS IS" BASIS,
951 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
952 * See the License for the specific language governing permissions and
953 * limitations under the License.
954 */const L_="http://localhost";class Gr extends Gl{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(t){const r=new Gr(t.providerId,t.signInMethod);return t.idToken||t.accessToken?(t.idToken&&(r.idToken=t.idToken),t.accessToken&&(r.accessToken=t.accessToken),t.nonce&&!t.pendingToken&&(r.nonce=t.nonce),t.pendingToken&&(r.pendingToken=t.pendingToken)):t.oauthToken&&t.oauthTokenSecret?(r.accessToken=t.oauthToken,r.secret=t.oauthTokenSecret):wt("argument-error"),r}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,n
954once:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(t){const r=typeof t=="string"?JSON.parse(t):t,{providerId:n,signInMethod:i,...a}=r;if(!n||!i)return null;const o=new Gr(n,i);return o.idToken=a.idToken||void 0,o.accessToken=a.accessToken||void 0,o.secret=a.secret,o.nonce=a.nonce,o.pendingToken=a.pendingToken||null,o}_getIdTokenResponse(t){const r=this.buildRequest();return gn(t,r)}_linkToIdToken(t,r){const n=this.buildRequest();return n.idToken=r,gn(t,n)}_getReauthenticationResolver(t){const r=this.buildRequest();return r.autoCreate=!1,gn(t,r)}buildRequest(){const t={requestUri:L_,returnSecureToken:!0};if(this.pendingToken)t.pendingToken=this.pendingToken;else{const r={};this.idToken&&(r.id_token=this.idToken),this.accessToken&&(r.access_token=this.accessToken),this.secret&&(r.oauth_token_secret=this.secret),r.providerId=this.providerId,this.nonce&&!this.pendingToken&&(r.nonce=this.nonce),t.postBody=Ti(r)}return t}}/**
955 * @license
956 * Copyright 2020 Google LLC
957 *
958 * Licensed under the Apache License, Version 2.0 (the "License");
959 * you may not use this file except in compliance with the License.
960 * You may obtain a copy of the License at
961 *
962 *   http://www.apache.org/licenses/LICENSE-2.0
963 *
964 * Unless required by applicable law or agreed to in writing, software
965 * distributed under the License is distributed on an "AS IS" BASIS,
966 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
967 * See the License for the specific language governing permissions and
968 * limitations under the License.
969 */function F_(e){switch(e){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}function U_(e){const t=ti(ri(e)).link,r=t?ti(ri(t)).deep_link_id:null,n=ti(ri(e)).deep_link_id;return(n?ti(ri(n)).link:null)||n||r||t||e}class Yl{constructor(t){const r=ti(ri(t)),n=r.apiKey??null,i=r.oobCode??null,a=F_(r.mode??null);H(n&&i&&a,"argument-error"),this.apiKey=n,this.operation=a,this.code=i,this.continueUrl=r.continueUrl??null,this.languageCode=r.lang??null,this.tenantId=r.tenantId??null}static parseLink(t){const r=U_(t);try{return new Yl(r)}catch{return null}}}/**
970 * @license
971 * Copyright 2020 Google LLC
972 *
973 * Licensed under the Apache License, Version 2.0 (the "License");
974 * you may not use this file except in compliance with the License.
975 * You may obtain a copy of the License at
976 *
977 *   http://www.apache.org/licenses/LICENSE-2.0
978 *
979 * Unless required by applicable law or agreed to in writing, software
980 * distributed under the License is distributed on an "AS IS" BASIS,
981 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
982 * See the License for the specific language governing permissions and
983 * limitations under the License.
984 */class Mn{constructor(){this.providerId=Mn.PROVIDER_ID}static credential(t,r){return hi._fromEmailAndPassword(t,r)}static credentialWithLink(t,r){const n=Yl.parseLink(r);return H(n,"argument-error"),hi._fromEmailAndCode(t,n.code,n.tenantId)}}Mn.PROVIDER_ID="password";Mn.EMAIL_PASSWORD_SIGN_IN_METHOD="password";Mn.EMAIL_LINK_SIGN_IN_METHOD="emailLink";/**
985 * @license
986 * Copyright 2020 Google LLC
987 *
988 * Licensed under the Apache License, Version 2.0 (the "License");
989 * you may not use this file except in compliance with the License.
990 * You may obtain a copy of the License at
991 *
992 *   http://www.apache.org/licenses/LICENSE-2.0
993 *
994 * Unless required by applicable law or agreed to in writing, software
995 * distributed under the License is distributed on an "AS IS" BASIS,
996 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
997 * See the License for the specific language governing permissions and
998 * limitations under the License.
999 */class Wg{constructor(t){this.providerId=t,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(t){this.defaultLanguageCode=t}setCustomParameters(t){return this.customParameters=t,this}getCustomParameters(){return this.customParameters}}/**
1000 * @license
1001 * Copyright 2019 Google LLC
1002 *
1003 * Licensed under the Apache License, Version 2.0 (the "License");
1004 * you may not use this file except in compliance with the License.
1005 * You may obtain a copy of the License at
1006 *
1007 *   http://www.apache.org/licenses/LICENSE-2.0
1008 *
1009 * Unless required by applicable law or agreed to in writing, software
1010 * distributed under the License is distributed on an "AS IS" BASIS,
1011 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1012 * See the License for the specific language governing permissions and
1013 * limitations under the License.
1014 */class ji extends Wg{constructor(){super(...arguments),this.scopes=[]}addScope(t){return this.scopes.includes(t)||this.scopes.push(t),this}getScopes(){return[...this.scopes]}}/**
1015 * @license
1016 * Copyright 2020 Google LLC
1017 *
1018 * Licensed under the Apache License, Version 2.0 (the "License");
1019 * you may not use this file except in compliance with the License.
1020 * You may obtain a copy of the License at
1021 *
1022 *   http://www.apache.org/licenses/LICENSE-2.0
1023 *
1024 * Unless required by applicable law or agreed to in writing, software
1025 * distributed under the License is distributed on an "AS IS" BASIS,
1026 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1027 * See the License for the specific language governing permissions and
1028 * limitations under the License.
1029 */class gr extends ji{constructor(){super("facebook.com")}static credential(t){return Gr._fromParams({providerId:gr.PROVIDER_ID,signInMethod:gr.FACEBOOK_SIGN_IN_METHOD,accessToken:t})}static credentialFromResult(t){return gr.credentialFromTaggedObject(t)}static credentialFromError(t){return gr.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t||!("oauthAccessToken"in t)||!t.oauthAccessToken)return null;try{return gr.credential(t.oauthAccessToken)}catch{return null}}}gr.FACEBOOK_SIGN_IN_METHOD="facebook.com";gr.PROVIDER_ID="facebook.com";/**
1030 * @license
1031 * Copyright 2020 Google LLC
1032 *
1033 * Licensed under the Apache License, Version 2.0 (the "License");
1034 * you may not use this file except in compliance with the License.
1035 * You may obtain a copy of the License at
1036 *
1037 *   http://www.apache.org/licenses/LICENSE-2.0
1038 *
1039 * Unless required by applicable law or agreed to in writing, software
1040 * distributed under the License is distributed on an "AS IS" BASIS,
1041 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1042 * See the License for the specific language governing permissions and
1043 * limitations under the License.
1044 */class yr extends ji{constructor(){super("google.com"),this.addScope("profile")}static credential(t,r){return Gr._fromParams({providerId:yr.PROVIDER_ID,signInMethod:yr.GOOGLE_SIGN_IN_METHOD,idToken:t,accessToken:r})}static credentialFromResult(t){return yr.credentialFromTaggedObject(t)}static credentialFromError(t){return yr.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;const{oauthIdToken:r,oauthAccessToken:n}=t;if(!r&&!n)return null;try{return yr.credential(r,n)}catch{return null}}}yr.GOOGLE_SIGN_IN_METHOD="google.com";yr.PROVIDER_ID="google.com";/**
1045 * @license
1046 * Copyright 2020 Google LLC
1047 *
1048 * Licensed under the Apache License, Version 2.0 (the "License");
1049 * you may not use this file except in compliance with the License.
1050 * You may obtain a copy of the License at
1051 *
1052 *   http://www.apache.org/licenses/LICENSE-2.0
1053 *
1054 * Unless required by applicable law or agreed to in writing, software
1055 * distributed under the License is distributed on an "AS IS" BASIS,
1056 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1057 * See the License for the specific language governing permissions and
1058 * limitations under the License.
1059 */class vr extends ji{constructor(){super("github.com")}static credential(t){return Gr._fromParams({providerId:vr.PROVIDER_ID,signInMethod:vr.GITHUB_SIGN_IN_METHOD,accessToken:t})}static credentialFromResult(t){return vr.credentialFromTaggedObject(t)}static credentialFromError(t){return vr.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t||!("oauthAccessToken"in t)||!t.oauthAccessToken)return null;try{return vr.credential(t.oauthAccessToken)}catch{return null}}}vr.GITHUB_SIGN_IN_METHOD="github.com";vr.PROVIDER_ID="github.com";/**
1060 * @license
1061 * Copyright 2020 Google LLC
1062 *
1063 * Licensed under the Apache License, Version 2.0 (the "License");
1064 * you may not use this file except in compliance with the License.
1065 * You may obtain a copy of the License at
1066 *
1067 *   http://www.apache.org/licenses/LICENSE-2.0
1068 *
1069 * Unless required by applicable law or agreed to in writing, software
1070 * distributed under the License is distributed on an "AS IS" BASIS,
1071 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1072 * See the License for the specific language governing permissions and
1073 * limitations under the License.
1074 */class br extends ji{constructor(){super("twitter.com")}static credential(t,r){return Gr._fromParams({providerId:br.PROVIDER_ID,signInMethod:br.TWITTER_SIGN_IN_METHOD,oauthToken:t,oauthTokenSecret:r})}static credentialFromResult(t){return br.credentialFromTaggedObject(t)}static credentialFromError(t){return br.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;const{oauthAccessToken:r,oauthTokenSecret:n}=t;if(!r||!n)return null;try{return br.credential(r,n)}catch{return null}}}br.TWITTER_SIGN_IN_METHOD="twitter.com";br.PROVIDER_ID="twitter.com";/**
1075 * @license
1076 * Copyright 2020 Google LLC
1077 *
1078 * Licensed under the Apache License, Version 2.0 (the "License");
1079 * you may not use this file except in compliance with the License.
1080 * You may obtain a copy of the License at
1081 *
1082 *   http://www.apache.org/licenses/LICENSE-2.0
1083 *
1084 * Unless required by applicable law or agreed to in writing, software
1085 * distributed under the License is distributed on an "AS IS" BASIS,
1086 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1087 * See the License for the specific language governing permissions and
1088 * limitations under the License.
1089 */class xn{constructor(t){this.user=t.user,this.providerId=t.providerId,this._tokenResponse=t._tokenResponse,this.operationType=t.operationType}static async _fromIdTokenResponse(t,r,n,i=!1){const a=await vt._fromIdTokenResponse(t,n,i),o=jf(n);return new xn({user:a,providerId:o,_tokenResponse:n,operationType:r})}static async _forOperation(t,r,n){await t._updateTokensIfNecessary(n,!0);const i=jf(n);return new xn({user:t,providerId:i,_tokenResponse:n,operationType:r})}}function jf(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}/**
1090 * @license
1091 * Copyright 2020 Google LLC
1092 *
1093 * Licensed under the Apache License, Version 2.0 (the "License");
1094 * you may not use this file except in compliance with the License.
1095 * You may obtain a copy of the License at
1096 *
1097 *   http://www.apache.org/licenses/LICENSE-2.0
1098 *
1099 * Unless required by applicable law or agreed to in writing, software
1100 * distributed under the License is distributed on an "AS IS" BASIS,
1101 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1102 * See the License for the specific language governing permissions and
1103 * limitations under the License.
1104 */class Ma extends Rt{constructor(t,r,n,i){super(r.code,r.message),this.operationType=n,this.user=i,Object.setPrototypeOf(this,Ma.prototype),this.customData={appName:t.name,tenantId:t.tenantId??void 0,_serverResponse:r.customData._serverResponse,operationType:n}}static _fromErrorAndOperation(t,r,n,i){return new Ma(t,r,n,i)}}function Hg(e,t,r,n){return(t==="reauthenticate"?r._getReauthenticationResolver(e):r._getIdTokenResponse(e)).catch(a=>{throw a.code==="auth/multi-factor-auth-required"?Ma._fromErrorAndOperation(e,a,t,n):a})}async function B_(e,t,r=!1){const n=await fi(e,t._linkToIdToken(e.auth,await e.getIdToken()),r);return xn._forOperation(e,"link",n)}/**
1105 * @license
1106 * Copyright 2019 Google LLC
1107 *
1108 * Licensed under the Apache License, Version 2.0 (the "License");
1109 * you may not use this file except in compliance with the License.
1110 * You may obtain a copy of the License at
1111 *
1112 *   http://www.apache.org/licenses/LICENSE-2.0
1113 *
1114 * Unless required by applicable law or agreed to in writing, software
1115 * distributed under the License is distributed on an "AS IS" BASIS,
1116 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1117 * See the License for the specific language governing permissions and
1118 * limitations under the License.
1119 */async function z_(e,t,r=!1){const{auth:n}=e;if(At(n.app))return Promise.reject(_r(n));const i="reauthenticate";try{const a=await fi(e,Hg(n,i,t,e),r);H(a.idToken,n,"internal-error");const o=Vl(a.idToken);H(o,n,"internal-error");const{sub:s}=o;return H(e.uid===s,n,"user-mismatch"),xn._forOperation(e,i,a)}catch(a){throw(a==null?void 0:a.code)==="auth/user-not-found"&&wt(n,"user-mismatch"),a}
1119}/**
1120 * @license
1121 * Copyright 2020 Google LLC
1122 *
1123 * Licensed under the Apache License, Version 2.0 (the "License");
1124 * you may not use this file except in compliance with the License.
1125 * You may obtain a copy of the License at
1126 *
1127 *   http://www.apache.org/licenses/LICENSE-2.0
1128 *
1129 * Unless required by applicable law or agreed to in writing, software
1130 * distributed under the License is distributed on an "AS IS" BASIS,
1131 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1132 * See the License for the specific language governing permissions and
1133 * limitations under the License.
1134 */async function Kg(e,t,r=!1){if(At(e.app))return Promise.reject(_r(e));const n="signIn",i=await Hg(e,n,t),a=await xn._fromIdTokenResponse(e,n,i);return r||await e._updateCurrentUser(a.user),a}async function W_(e,t){return Kg(jn(e),t)}/**
1135 * @license
1136 * Copyright 2020 Google LLC
1137 *
1138 * Licensed under the Apache License, Version 2.0 (the "License");
1139 * you may not use this file except in compliance with the License.
1140 * You may obtain a copy of the License at
1141 *
1142 *   http://www.apache.org/licenses/LICENSE-2.0
1143 *
1144 * Unless required by applicable law or agreed to in writing, software
1145 * distributed under the License is distributed on an "AS IS" BASIS,
1146 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1147 * See the License for the specific language governing permissions and
1148 * limitations under the License.
1149 */async function Vg(e){const t=jn(e);t._getPasswordPolicyInternal()&&await t._updatePasswordPolicy()}async function r8(e,t,r){await C_(et(e),{oobCode:t,newPassword:r}).catch(async n=>{throw n.code==="auth/password-does-not-meet-requirements"&&Vg(e),n})}function H_(e,t,r){return At(e.app)?Promise.reject(_r(e)):W_(et(e),Mn.credential(t,r)).catch(async n=>{throw n.code==="auth/password-does-not-meet-requirements"&&Vg(e),n})}async function K_(e,t){const r=et(e),i={requestType:"VERIFY_EMAIL",idToken:await e.getIdToken()},{email:a}=await D_(r.auth,i);a!==e.email&&await e.reload()}function V_(e,t,r,n){return et(e).onIdTokenChanged(t,r,n)}function q_(e,t,r){return et(e).beforeAuthStateChanged(t,r)}function G_(e,t,r,n){return et(e).onAuthStateChanged(t,r,n)}function Mf(e){return et(e).signOut()}const Da="__sak";/**
1150 * @license
1151 * Copyright 2019 Google LLC
1152 *
1153 * Licensed under the Apache License, Version 2.0 (the "License");
1154 * you may not use this file except in compliance with the License.
1155 * You may obtain a copy of the License at
1156 *
1157 *   http://www.apache.org/licenses/LICENSE-2.0
1158 *
1159 * Unless required by applicable law or agreed to in writing, software
1160 * distributed under the License is distributed on an "AS IS" BASIS,
1161 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1162 * See the License for the specific language governing permissions and
1163 * limitations under the License.
1164 */class qg{constructor(t,r){this.storageRetriever=t,this.type=r}_isAvailable(){try{return this.storage?(this.storage.setItem(Da,"1"),this.storage.removeItem(Da),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(t,r){return this.storage.setItem(t,JSON.stringify(r)),Promise.resolve()}_get(t){const r=this.storage.getItem(t);return Promise.resolve(r?JSON.parse(r):null)}_remove(t){return this.storage.removeItem(t),Promise.resolve()}get storage(){return this.storageRetriever()}}/**
1165 * @license
1166 * Copyright 2020 Google LLC
1167 *
1168 * Licensed under the Apache License, Version 2.0 (the "License");
1169 * you may not use this file except in compliance with the License.
1170 * You may obtain a copy of the License at
1171 *
1172 *   http://www.apache.org/licenses/LICENSE-2.0
1173 *
1174 * Unless required by applicable law or agreed to in writing, software
1175 * distributed under the License is distributed on an "AS IS" BASIS,
1176 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1177 * See the License for the specific language governing permissions and
1178 * limitations under the License.
1179 */const Y_=1e3,J_=10;class Gg extends qg{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(t,r)=>this.onStorageEvent(t,r),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=Lg(),this._shouldAllowMigration=!0}forAllChangedKeys(t){for(const r of Object.keys(this.listeners)){const n=this.storage.getItem(r),i=this.localCache[r];n!==i&&t(r,i,n)}}onStorageEvent(t,r=!1){if(!t.key){this.forAllChangedKeys((o,s,c)=>{this.notifyListeners(o,c)});return}const n=t.key;r?this.detachListener():this.stopPolling();const i=()=>{const o=this.storage.getItem(n);!r&&this.localCache[n]===o||this.notifyListeners(n,o)},a=this.storage.getItem(n);f_()&&a!==t.newValue&&t.newValue!==t.oldValue?setTimeout(i,J_):i()}notifyListeners(t,r){this.localCache[t]=r;const n=this.listeners[t];if(n)for(const i of Array.from(n))i(r&&JSON.parse(r))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((t,r,n)=>{this.onStorageEvent(new StorageEvent("storage",{key:t,oldValue:r,newValue:n}),!0)})},Y_)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(t,r){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[t]||(this.listeners[t]=new Set,this.localCache[t]=this.storage.getItem(t)),this.listeners[t].add(r)}_removeListener(t,r){this.listeners[t]&&(this.listeners[t].delete(r),this.listeners[t].size===0&&delete this.listeners[t]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}async _set(t,r){await super._set(t,r),this.localCache[t]=JSON.stringify(r)}async _get(t){const r=await super._get(t);return this.localCache[t]=JSON.stringify(r),r}async _remove(t){await super._remove(t),delete this.localCache[t]}}Gg.type="LOCAL";const X_=Gg;/**
1180 * @license
1181 * Copyright 2020 Google LLC
1182 *
1183 * Licensed under the Apache License, Version 2.0 (the "License");
1184 * you may not use this file except in compliance with the License.
1185 * You may obtain a copy of the License at
1186 *
1187 *   http://www.apache.org/licenses/LICENSE-2.0
1188 *
1189 * Unless required by applicable law or agreed to in writing, software
1190 * distributed under the License is distributed on an "AS IS" BASIS,
1191 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1192 * See the License for the specific language governing permissions and
1193 * limitations under the License.
1194 */class Yg extends qg{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(t,r){}_removeListener(t,r){}}Yg.type="SESSION";const Jg=Yg;/**
1195 * @license
1196 * Copyright 2019 Google LLC
1197 *
1198 * Licensed under the Apache License, Version 2.0 (the "License");
1199 * you may not use this file except in compliance with the License.
1200 * You may obtain a copy of the License at
1201 *
1202 *   http://www.apache.org/licenses/LICENSE-2.0
1203 *
1204 * Unless required by applicable law or agreed to in writing, software
1205 * distributed under the License is distributed on an "AS IS" BASIS,
1206 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1207 * See the License for the specific language governing permissions and
1208 * limitations under the License.
1209 */function Z_(e){return Promise.all(e.map(async t=>{try{return{fulfilled:!0,value:await t}}catch(r){return{fulfilled:!1,reason:r}}}))}/**
1210 * @license
1211 * Copyright 2019 Google LLC
1212 *
1213 * Licensed under the Apache License, Version 2.0 (the "License");
1214 * you may not use this file except in compliance with the License.
1215 * You may obtain a copy of the License at
1216 *
1217 *   http://www.apache.org/licenses/LICENSE-2.0
1218 *
1219 * Unless required by applicable law or agreed to in writing, software
1220 * distributed under the License is distributed on an "AS IS" BASIS,
1221 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1222 * See the License for the specific language governing permissions and
1223 * limitations under the License.
1224 */class Lo{constructor(t){this.eventTarget=t,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(t){const r=this.receivers.find(i=>i.isListeningto(t));if(r)return r;const n=new Lo(t);return this.receivers.push(n),n}isListeningto(t){return this.eventTarget===t}async handleEvent(t){const r=t,{eventId:n,eventType:i,data:a}=r.data,o=this.handlersMap[i];if(!(o!=null&&o.size))return;r.ports[0].postMessage({status:"ack",eventId:n,eventType:i});const s=Array.from(o).map(async l=>l(r.origin,a)),c=await Z_(s);r.ports[0].postMessage({status:"done",eventId:n,eventType:i,response:c})}_subscribe(t,r){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[t]||(this.handlersMap[t]=new Set),this.handlersMap[t].add(r)}_unsubscribe(t,r){this.handlersMap[t]&&r&&this.handlersMap[t].delete(r),(!r||this.handlersMap[t].size===0)&&delete this.handlersMap[t],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}Lo.receivers=[];/**
1225 * @license
1226 * Copyright 2020 Google LLC
1227 *
1228 * Licensed under the Apache License, Version 2.0 (the "License");
1229 * you may not use this file except in compliance with the License.
1230 * You may obtain a copy of the License at
1231 *
1232 *   http://www.apache.org/licenses/LICENSE-2.0
1233 *
1234 * Unless required by applicable law or agreed to in writing, software
1235 * distributed under the License is distributed on an "AS IS" BASIS,
1236 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1237 * See the License for the specific language governing permissions and
1238 * limitations under the License.
1239 */function Jl(e="",t=10){let r="";for(let n=0;n<t;n++)r+=Math.floor(Math.random()*10);return e+r}/**
1240 * @license
1241 * Copyright 2019 Google LLC
1242 *
1243 * Licensed under the Apache License, Version 2.0 (the "License");
1244 * you may not use this file except in compliance with the License.
1245 * You may obtain a copy of the License at
1246 *
1247 *   http://www.apache.org/licenses/LICENSE-2.0
1248 *
1249 * Unless required by applicable law or agreed to in writing, softw
1249are
1250 * distributed under the License is distributed on an "AS IS" BASIS,
1251 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1252 * See the License for the specific language governing permissions and
1253 * limitations under the License.
1254 */class Q_{constructor(t){this.target=t,this.handlers=new Set}removeMessageHandler(t){t.messageChannel&&(t.messageChannel.port1.removeEventListener("message",t.onMessage),t.messageChannel.port1.close()),this.handlers.delete(t)}async _send(t,r,n=50){const i=typeof MessageChannel<"u"?new MessageChannel:null;if(!i)throw new Error("connection_unavailable");let a,o;return new Promise((s,c)=>{const l=Jl("",20);i.port1.start();const u=setTimeout(()=>{c(new Error("unsupported_event"))},n);o={messageChannel:i,onMessage(d){const f=d;if(f.data.eventId===l)switch(f.data.status){case"ack":clearTimeout(u),a=setTimeout(()=>{c(new Error("timeout"))},3e3);break;case"done":clearTimeout(a),s(f.data.response);break;default:clearTimeout(u),clearTimeout(a),c(new Error("invalid_response"));break}}},this.handlers.add(o),i.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:t,eventId:l,data:r},[i.port2])}).finally(()=>{o&&this.removeMessageHandler(o)})}}/**
1255 * @license
1256 * Copyright 2020 Google LLC
1257 *
1258 * Licensed under the Apache License, Version 2.0 (the "License");
1259 * you may not use this file except in compliance with the License.
1260 * You may obtain a copy of the License at
1261 *
1262 *   http://www.apache.org/licenses/LICENSE-2.0
1263 *
1264 * Unless required by applicable law or agreed to in writing, software
1265 * distributed under the License is distributed on an "AS IS" BASIS,
1266 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1267 * See the License for the specific language governing permissions and
1268 * limitations under the License.
1269 */function Tt(){return window}function eO(e){Tt().location.href=e}/**
1270 * @license
1271 * Copyright 2020 Google LLC.
1272 *
1273 * Licensed under the Apache License, Version 2.0 (the "License");
1274 * you may not use this file except in compliance with the License.
1275 * You may obtain a copy of the License at
1276 *
1277 *   http://www.apache.org/licenses/LICENSE-2.0
1278 *
1279 * Unless required by applicable law or agreed to in writing, software
1280 * distributed under the License is distributed on an "AS IS" BASIS,
1281 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1282 * See the License for the specific language governing permissions and
1283 * limitations under the License.
1284 */function Xg(){return typeof Tt().WorkerGlobalScope<"u"&&typeof Tt().importScripts=="function"}async function tO(){if(!(navigator!=null&&navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function rO(){var e;return((e=navigator==null?void 0:navigator.serviceWorker)==null?void 0:e.controller)||null}function nO(){return Xg()?self:null}/**
1285 * @license
1286 * Copyright 2019 Google LLC
1287 *
1288 * Licensed under the Apache License, Version 2.0 (the "License");
1289 * you may not use this file except in compliance with the License.
1290 * You may obtain a copy of the License at
1291 *
1292 *   http://www.apache.org/licenses/LICENSE-2.0
1293 *
1294 * Unless required by applicable law or agreed to in writing, software
1295 * distributed under the License is distributed on an "AS IS" BASIS,
1296 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1297 * See the License for the specific language governing permissions and
1298 * limitations under the License.
1299 */const Zg="firebaseLocalStorageDb",iO=1,Ra="firebaseLocalStorage",Qg="fbase_key";class Mi{constructor(t){this.request=t}toPromise(){return new Promise((t,r)=>{this.request.addEventListener("success",()=>{t(this.request.result)}),this.request.addEventListener("error",()=>{r(this.request.error)})})}}function Fo(e,t){return e.transaction([Ra],t?"readwrite":"readonly").objectStore(Ra)}function aO(){const e=indexedDB.deleteDatabase(Zg);return new Mi(e).toPromise()}function Rc(){const e=indexedDB.open(Zg,iO);return new Promise((t,r)=>{e.addEventListener("error",()=>{r(e.error)}),e.addEventListener("upgradeneeded",()=>{const n=e.result;try{n.createObjectStore(Ra,{keyPath:Qg})}catch(i){r(i)}}),e.addEventListener("success",async()=>{const n=e.result;n.objectStoreNames.contains(Ra)?t(n):(n.close(),await aO(),t(await Rc()))})})}async function Df(e,t,r){const n=Fo(e,!0).put({[Qg]:t,value:r});return new Mi(n).toPromise()}async function oO(e,t){const r=Fo(e,!1).get(t),n=await new Mi(r).toProm
1299ise();return n===void 0?null:n.value}function Rf(e,t){const r=Fo(e,!0).delete(t);return new Mi(r).toPromise()}const sO=800,cO=3;class ey{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.db?this.db:(this.db=await Rc(),this.db)}async _withRetries(t){let r=0;for(;;)try{const n=await this._openDb();return await t(n)}catch(n){if(r++>cO)throw n;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return Xg()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=Lo._getInstance(nO()),this.receiver._subscribe("keyChanged",async(t,r)=>({keyProcessed:(await this._poll()).includes(r.key)})),this.receiver._subscribe("ping",async(t,r)=>["keyChanged"])}async initializeSender(){var r,n;if(this.activeServiceWorker=await tO(),!this.activeServiceWorker)return;this.sender=new Q_(this.activeServiceWorker);const t=await this.sender._send("ping",{},800);t&&(r=t[0])!=null&&r.fulfilled&&(n=t[0])!=null&&n.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(t){if(!(!this.sender||!this.activeServiceWorker||rO()!==this.activeServiceWorker))try{await this.sender._send("keyChanged",{key:t},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;const t=await Rc();return await Df(t,Da,"1"),await Rf(t,Da),!0}catch{}return!1}async _withPendingWrite(t){this.pendingWrites++;try{await t()}finally{this.pendingWrites--}}async _set(t,r){return this._withPendingWrite(async()=>(await this._withRetries(n=>Df(n,t,r)),this.localCache[t]=r,this.notifyServiceWorker(t)))}async _get(t){const r=await this._withRetries(n=>oO(n,t));return this.localCache[t]=r,r}async _remove(t){return this._withPendingWrite(async()=>(await this._withRetries(r=>Rf(r,t)),delete this.localCache[t],this.notifyServiceWorker(t)))}async _poll(){const t=await this._withRetries(i=>{const a=Fo(i,!1).getAll();return new Mi(a).toPromise()});if(!t)return[];if(this.pendingWrites!==0)return[];const r=[],n=new Set;if(t.length!==0)for(const{fbase_key:i,value:a}of t)n.add(i),JSON.stringify(this.localCache[i])!==JSON.stringify(a)&&(this.notifyListeners(i,a),r.push(i));for(const i of Object.keys(this.localCache))this.localCache[i]&&!n.has(i)&&(this.notifyListeners(i,null),r.push(i));return r}notifyListeners(t,r){this.localCache[t]=r;const n=this.listeners[t];if(n)for(const i of Array.from(n))i(r)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),sO)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(t,r){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[t]||(this.listeners[t]=new Set,this._get(t)),this.listeners[t].add(r)}_removeListener(t,r){this.listeners[t]&&(this.listeners[t].delete(r),this.listeners[t].size===0&&delete this.listeners[t]),Object.keys(this.listeners).length===0&&this.stopPolling()}}ey.type="LOCAL";const lO=ey;new Ni(3e4,6e4);/**
1300 * @license
1301 * Copyright 2021 Google LLC
1302 *
1303 * Licensed under the Apache License, Version 2.0 (the "License");
1304 * you may not use this file except in compliance with the License.
1305 * You may obtain a copy of the License at
1306 *
1307 *   http://www.apache.org/licenses/LICENSE-2.0
1308 *
1309 * Unless required by applicable law or agreed to in writing, software
1310 * distributed under the License is distributed on an "AS IS" BASIS,
1311 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1312 * See the License for the specific language governing permissions and
1313 * limitations under the License.
1314 */function uO(e,t){return t?Kt(t):(H(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}/**
1315 * @license
1316 * Copyright 2019 Google LLC
1317 *
1318 * Licensed under the Apache License, Version 2.0 (the "License");
1319 * you may not use this file except in compliance with the License.
1320 * You may obtain a copy of the License at
1321 *
1322 *   http://www.apache.org/licenses/LICENSE-2.0
1323 *
1324 * Unless required by applicable law or agreed to in writing, software
1325 * distributed under the License is distributed on an "AS IS" BASIS,
1326 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1327 * See the License for the specific language governing permissions and
1328 * limitations under the License.
1329 */class Xl extends Gl{constructor(t){super("custom","custom"),this.params=t}_getIdTokenResponse(t){return gn(t,this._buildIdpRequest())}_linkToIdToken(t,r){return gn(t,this._buildIdpRequest(r))}_getReauthenticationResolver(t){return gn(t,this._buildIdpRequest())}_buildIdpRequest(t){const r={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return t&&(r.idToken=t),r}}function dO(e){return Kg(e.auth,new Xl(e),e.bypassAuthState)}function fO(e){const{auth:t,user:r}=e;return H(r,t,"internal-error"),z_(r,new Xl(e),e.bypassAuthState)}async function hO(e){const{auth:t,user:r}=e;return H(r,t,"internal-error"),B_(r,new Xl(e),e.bypassAuthState)}/**
1330 * @license
1331 * Copyright 2020 Google LLC
1332 *
1333 * Licensed under the Apache License, Version 2.0 (the "License");
1334 * you may not use this file except in compliance with the License.
1335 * You may obtain a copy of the License at
1336 *
1337 *   http://www.apache.org/licenses/LICENSE-2.0
1338 *
1339 * Unless required by applicable law or agreed to in writing, software
1340 * distributed under the License is distributed on an "AS IS" BASIS,
1341 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1342 * See the License for the specific language governing permissions and
1343 * limitations under the License.
1344 */class ty{constructor(t,r,n,i,a=!1){this.auth=t,this.resolver=n,this.user=i,this.bypassAuthState=a,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(r)?r:[r]}execute(){return new Promise(async(t,r)=>{this.pendingPromise={resolve:t,reject:r};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(n){this.reject(n)}})}async onAuthEvent(t){const{urlResponse:r,sessionId:n,postBody:i,tenantId:a,error:o,type:s}=t;if(o){this.reject(o);return}const c={auth:this.auth,requestUri:r,sessionId:n,tenantId:a||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(s)(c))}catch(l){this.reject(l)}}onError(t){this.reject(t)}getIdpTask(t){switch(t){case"signInViaPopup":case"signInViaRedirect":return dO;case"linkViaPopup":case"linkViaRedirect":return hO;case"reauthViaPopup":case"reauthViaRedirect":return fO;default:wt(this.auth,"internal-error")}}resolve(t){Zt(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(t),this.unregisterAndCleanUp()}reject(t){Zt(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(t),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}/**
1345 * @license
1346 * Copyright 2020 Google LLC
1347 *
1348 * Licensed under the Apache License, Version 2.0 (the "License");
1349 * you may not use this file except in compliance with the License.
1350 * You may obtain a copy of the License at
1351 *
1352 *   http://www.apache.org/licenses/LICENSE-2.0
1353 *
1354 * Unless required by applicable law or agreed to in writing, software
1355 * distributed under the License is distributed on an "AS IS" BASIS,
1356 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1357 * See the License for the specific language governing permissions and
1358 * limitations under the License.
1359 */const pO=new Ni(2e3,1e4);class un extends ty{constructor(t,r,n,i,a){super(t,r,i,a),this.provider=n,this.authWindow=null,this.pollId=null,un.currentPopupAction&&un.currentPopupAction.cancel(),un.currentPopupAction=this}async executeNotNull(){const t=await this.execute();return H(t,this.auth,"internal-error"),t}async onExecution(){Zt(this.filter.length===1,"Popup operations only handle one event");const t=Jl();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],t),this.authWindow.associatedEvent=t,this.resolver._originValidation(this.auth).catch(r=>{this.reject(r)}),this.resolver._isIframeWebStorageSupported(this.auth,r=>{r||this.reject(kt(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var t;return((t=this.authWindow)==null?void 0:t.associatedEvent)||null}cancel(){this.reject(kt(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,un.currentPopupAction=null}pollUserCancellation(){const t=()=>{var r,n;if((n=(r=this.authWindow)==null?void 0:r.window)!=null&&n.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(kt(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(t,pO.get())};t()}}un.currentPopupAction=null;/**
1360 * @license
1361 * Copyright 2020 Google LLC
1362 *
1363 * Licensed under the Apache License, Version 2.0 (the "License");
1364 * you may not use this file except in compliance with the License.
1365 * You may obtain a copy of the License at
1366 *
1367 *   http://www.apache.org/licenses/LICENSE-2.0
1368 *
1369 * Unless required by applicable law or agreed to in writing, software
1370 * distributed under the License is distributed on an "AS IS" BASIS,
1371 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1372 * See the License for the specific language governing permissions and
1373 * limitations under the License.
1374 */const mO="pendingRedirect",_a=new Map;class gO extends ty{constructor(t,r,n=!1){super(t,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],r,void 0,n),this.eventId=null}async execute(){let t=_a.get(this.auth._key());if(!t){try{const n=await yO(this.resolver,this.auth)?await super.execute():null;t=()=>Promise.resolve(n)}catch(r){t=()=>Promise.reject(r)}_a.set(this.auth._key(),t)}return this.bypassAuthState||_a.set(this.auth._key(),()=>Promise.resolve(null)),t()}async onAuthEvent(t){if(t.type==="signInViaRedirect")return super.onAuthEvent(t);if(t.type==="unknown"){this.resolve(null);return}if(t.eventId){const r=await this.auth._redirectUserForId(t.eventId);if(r)return this.user=r,super.onAuthEvent(t);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function yO(e,t){const r=wO(t),n=bO(e);if(!await n._isAvailable())return!1;const i=await n._get(r)==="true";return await n._remove(r),i}function vO(e,t){_a.set(e._key(),t)}function bO(e){return Kt(e._redirectPersistence)}function wO(e){return Pa(mO,e.config.apiKey,e.name)}async function xO(e,t,r=!1){if(At(e.app))return Promise.reject(_r(e));const n=jn(e),i=uO(n,t),o=await new gO(n,i,r).execute();return o&&!r&&(delete o.user._redirectEventId,await n._persistUserIfCurrent(o.user),await n._setRedirectUser(null,t)),o}/**
1375 * @license
1376 * Copyright 2020 Google LLC
1377 *
1378 * Licensed under the Apache License, Version 2.0 (the "License");
1379 * you may not use this file except in compliance with the License.
1380 * You may obtain a copy of the License at
1381 *
1382 *   http://www.apache.org/licenses/LICENSE-2.0
1383 *
1384 * Unless required by applicable law or agreed to in writing, software
1385 * distributed under the License is distributed on an "AS IS" BASIS,
1386 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1387 * See the License for the specific language governing permissions and
1388 * limitations under the License.
1389 */const SO=10*60*1e3;class PO{constructor(t){this.auth=t,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(t){this.consumers.add(t),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,t)&&(this.sendToConsumer(this.queuedRedirectEvent,t),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(t){this.consumers.delete(t)}onEvent(t){if(this.hasEventBeenHandled(t))return!1;let r=!1;return this.consumers.forEach(n=>{this.isEventForConsumer(t,n)&&(r=!0,this.sendToConsumer(t,n),this.saveEventToCache(t))}),this.hasHandledPotentialRedirect||!_O(t)||(this.hasHandledPotentialRedirect=!0,r||(this.queuedRedirectEvent=t,r=!0)),r}sendToConsumer(t,r){var n;if(t.error&&!ry(t)){const i=((n=t.error.code)==null?void 0:n.split("auth/")[1])||"internal-error";r.onError(kt(this.auth,i))}else r.onAuthEvent(t)}isEventForConsumer(t,r){const n=r.eventId===null||!!t.eventId&&t.eventId===r.eventId;return r.filter.includes(t.type)&&n}hasEventBeenHandled(t){return Date.now()-this.lastProcessedEventTime>=SO&&this.cachedEventUids.clear(),this.cachedEventUids.has($f(t))}saveEventToCache(t){this.cachedEventUids.add($f(t)),this.lastProcessedEventTime=Date.now()}}function $f(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(t=>t).join("-")}function ry({type:e,error:t}){return e==="unknown"&&(t==null?void 0:t.code)==="auth/no-auth-event"}function _O(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return ry(e);default:return!1}}/**
1390 * @license
1391 * Copyright 2020 Google LLC
1392 *
1393 * Licensed under the Apache License, Version 2.0 (the "License");
1394 * you may not use this file except in compliance with the License.
1395 * You may obtain a copy of the License at
1396 *
1397 *   http://www.apache.org/licenses/LICENSE-2.0
1398 *
1399 * Unless required by applicable law or agreed to in writing, software
1400 * distributed under the License is distributed on an "AS IS" BASIS,
1401 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1402 * See the License for the specific language governing permissions and
1403 * limitations under the License.
1404 */async function OO(e,t={}){return $t(e,"GET","/v1/projects",t)}/**
1405 * @license
1406 * Copyright 2020 Google LLC
1407 *
1408 * Licensed under the Apache License, Version 2.0 (the "License");
1409 * you may not use this file except in compliance with the License.
1410 * You may obtain a copy of the License at
1411 *
1412 *   http://www.apache.org/licenses/LICENSE-2.0
1413 *
1414 * Unless required by applicable law or agreed to in writing, software
1415 * distributed under the License is distributed on an "AS IS" BASIS,
1416 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1417 * See the License for the specific language governing permissions and
1418 * limitations under the License.
1419 */const AO=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,EO=/^https?/;async function IO(e){if(e.config.emulator)return;const{authorizedDomains:t}=await OO(e);for(const r of t)try{if(kO(r))return}catch{}wt(e,"unauthorized-domain")}function kO(e){const t=Mc(),{protocol:r,hostname:n}=new URL(t);if(e.startsWith("chrome-extension://")){const o=new URL(e);return o.hostname===""&&n===""?r==="chrome-extension:"&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):r==="chrome-extension:"&&o.hostname===n}if(!EO.test(r))return!1;if(AO.test(e))return n===e;const i=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(n)}/**
1420 * @license
1421 * Copyright 2020 Google LLC.
1422 *
1423 * Licensed under the Apache License, Version 2.0 (the "License");
1424 * you may not use this file except in compliance with the License.
1425 * You may obtain a copy of the License at
1426 *
1427 *   http://www.apache.org/licenses/LICENSE-2.0
1428 *
1429 * Unless required by applicable law or agreed to in writing, software
1430 * distributed under the License is distributed on an "AS IS" BASIS,
1431 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1432 * See the License for the specific language governing permissions and
1433 * limitations under the License.
1434 */const TO=new Ni(3e4,6e4);function Lf(){const e=Tt().___jsl;if(e!=null&&e.H){for(const t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let r=0;r<e.CP.length;r++)e.CP[r]=null}}function CO(e){return new Promise((t,r)=>{var i,a,o;function n(){Lf(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{Lf(),r(kt(e,"network-request-failed"))},timeout:TO.get()})}if((a=(i=Tt().gapi)==null?void 0:i.iframes)!=null&&a.Iframe)t(gapi.iframes.getContext());else if((o=Tt().gapi)!=null&&o.load)n();else{const s=x_("iframefcb");return Tt()[s]=()=>{gapi.load?n():r(kt(e,"network-request-failed"))},Ug(`${w_()}?onload=${s}`).catch(c=>r(c))}}).catch(t=>{throw Oa=null,t})}let Oa=null;function NO(e){return Oa=Oa||CO(e),Oa}/**
1435 * @license
1436 * Copyright 2020 Google LLC.
1437 *
1438 * Licensed under the Apache License, Version 2.0 (the "License");
1439 * you may not use this file except in compliance with the License.
1440 * You may obtain a copy of the License at
1441 *
1442 *   http://www.apache.org/licenses/LICENSE-2.0
1443 *
1444 * Unless required by applicable law or agreed to in writing, software
1445 * distributed under the License is distributed on an "AS IS" BASIS,
1446 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1447 * See the License for the specific language governing permissions and
1448 * limitations under the License.
1449 */const jO=new Ni(5e3,15e3),MO="__/auth/iframe",DO="emulator/auth/iframe",RO={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},$O=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function LO(e){const t=e.config;H(t.authDomain,e,"auth-domain-config-required");const r=t.emulator?Kl(t,DO):`https://${e.config.authDomain}/${MO}
1449`,n={apiKey:t.apiKey,appName:e.name,v:Ci},i=$O.get(e.config.apiHost);i&&(n.eid=i);const a=e._getFrameworks();return a.length&&(n.fw=a.join(",")),`${r}?${Ti(n).slice(1)}`}async function FO(e){const t=await NO(e),r=Tt().gapi;return H(r,e,"internal-error"),t.open({where:document.body,url:LO(e),messageHandlersFilter:r.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:RO,dontclear:!0},n=>new Promise(async(i,a)=>{await n.restyle({setHideOnLeave:!1});const o=kt(e,"network-request-failed"),s=Tt().setTimeout(()=>{a(o)},jO.get());function c(){Tt().clearTimeout(s),i(n)}n.ping(c).then(c,()=>{a(o)})}))}/**
1450 * @license
1451 * Copyright 2020 Google LLC.
1452 *
1453 * Licensed under the Apache License, Version 2.0 (the "License");
1454 * you may not use this file except in compliance with the License.
1455 * You may obtain a copy of the License at
1456 *
1457 *   http://www.apache.org/licenses/LICENSE-2.0
1458 *
1459 * Unless required by applicable law or agreed to in writing, software
1460 * distributed under the License is distributed on an "AS IS" BASIS,
1461 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1462 * See the License for the specific language governing permissions and
1463 * limitations under the License.
1464 */const UO={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},BO=500,zO=600,WO="_blank",HO="http://localhost";class Ff{constructor(t){this.window=t,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function KO(e,t,r,n=BO,i=zO){const a=Math.max((window.screen.availHeight-i)/2,0).toString(),o=Math.max((window.screen.availWidth-n)/2,0).toString();let s="";const c={...UO,width:n.toString(),height:i.toString(),top:a,left:o},l=$e().toLowerCase();r&&(s=jg(l)?WO:r),Cg(l)&&(t=t||HO,c.scrollbars="yes");const u=Object.entries(c).reduce((f,[h,g])=>`${f}${h}=${g},`,"");if(d_(l)&&s!=="_self")return VO(t||"",s),new Ff(null);const d=window.open(t||"",s,u);H(d,e,"popup-blocked");try{d.focus()}catch{}return new Ff(d)}function VO(e,t){const r=document.createElement("a");r.href=e,r.target=t;const n=document.createEvent("MouseEvent");n.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),r.dispatchEvent(n)}/**
1465 * @license
1466 * Copyright 2021 Google LLC
1467 *
1468 * Licensed under the Apache License, Version 2.0 (the "License");
1469 * you may not use this file except in compliance with the License.
1470 * You may obtain a copy of the License at
1471 *
1472 *   http://www.apache.org/licenses/LICENSE-2.0
1473 *
1474 * Unless required by applicable law or agreed to in writing, software
1475 * distributed under the License is distributed on an "AS IS" BASIS,
1476 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1477 * See the License for the specific language governing permissions and
1478 * limitations under the License.
1479 */const qO="__/auth/handler",GO="emulator/auth/handler",YO=encodeURIComponent("fac");async function Uf(e,t,r,n,i,a){H(e.config.authDomain,e,"auth-domain-config-required"),H(e.config.apiKey,e,"invalid-api-key");const o={apiKey:e.config.apiKey,appName:e.name,authType:r,redirectUrl:n,v:Ci,eventId:i};if(t instanceof Wg){t.setDefaultLanguage(e.languageCode),o.providerId=t.providerId||"",ES(t.getCustomParameters())||(o.customParameters=JSON.stringify(t.getCustomParameters()));for(const[u,d]of Object.entries({}))o[u]=d}if(t instanceof ji){const u=t.getScopes().filter(d=>d!=="");u.length>0&&(o.scopes=u.join(","))}e.tenantId&&(o.tid=e.tenantId);const s=o;for(const u of Object.keys(s))s[u]===void 0&&delete s[u];const c=await e._getAppCheckToken(),l=c?`#${YO}=${encodeURIComponent(c)}`:"";return`${JO(e)}?${Ti(s).slice(1)}${l}`}function JO({config:e}){return e.emulator?Kl(e,GO):`https://${e.authDomain}/${qO}`}/**
1480 * @license
1481 * Copyright 2020 Google LLC
1482 *
1483 * Licensed under the Apache License, Version 2.0 (the "License");
1484 * you may not use this file except in compliance with the License.
1485 * You may obtain a copy of the License at
1486 *
1487 *   http://www.apache.org/licenses/LICENSE-2.0
1488 *
1489 * Unless required by applicable law or agreed to in writing, software
1490 * distributed under the License is distributed on an "AS IS" BASIS,
1491 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1492 * See the License for the specific language governing permissions and
1493 * limitations under the License.
1494 */const Ys="webStorageSupport";class XO{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Jg,this._completeRedirectFn=xO,this._overrideRedirectResult=vO}async _openPopup(t,r,n,i){var o;Zt((o=this.eventManagers[t._key()])==null?void 0:o.manager,"_initialize() not called before _openPopup()");const a=await Uf(t,r,n,Mc(),i);return KO(t,a,Jl())}async _openRedirect(t,r,n,i){await this._originValidation(t);const a=await Uf(t,r,n,Mc(),i);return eO(a),new Promise(()=>{})}_initialize(t){const r=t._key();if(this.eventManagers[r]){const{manager:i,promise:a}=this.eventManagers[r];return i?Promise.resolve(i):(Zt(a,"If manager is not set, promise should be"),a)}const n=this.initAndGetManager(t);return this.eventManagers[r]={promise:n},n.catch(()=>{delete this.eventManagers[r]}),n}async initAndGetManager(t){const r=await FO(t),n=new PO(t);return r.register("authEvent",i=>
1494(H(i==null?void 0:i.authEvent,t,"invalid-auth-event"),{status:n.onEvent(i.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[t._key()]={manager:n},this.iframes[t._key()]=r,n}_isIframeWebStorageSupported(t,r){this.iframes[t._key()].send(Ys,{type:Ys},i=>{var o;const a=(o=i==null?void 0:i[0])==null?void 0:o[Ys];a!==void 0&&r(!!a),wt(t,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(t){const r=t._key();return this.originValidationPromises[r]||(this.originValidationPromises[r]=IO(t)),this.originValidationPromises[r]}get _shouldInitProactively(){return Lg()||Ng()||ql()}}const ZO=XO;var Bf="@firebase/auth",zf="1.12.0";/**
1495 * @license
1496 * Copyright 2020 Google LLC
1497 *
1498 * Licensed under the Apache License, Version 2.0 (the "License");
1499 * you may not use this file except in compliance with the License.
1500 * You may obtain a copy of the License at
1501 *
1502 *   http://www.apache.org/licenses/LICENSE-2.0
1503 *
1504 * Unless required by applicable law or agreed to in writing, software
1505 * distributed under the License is distributed on an "AS IS" BASIS,
1506 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1507 * See the License for the specific language governing permissions and
1508 * limitations under the License.
1509 */class QO{constructor(t){this.auth=t,this.internalListeners=new Map}getUid(){var t;return this.assertAuthConfigured(),((t=this.auth.currentUser)==null?void 0:t.uid)||null}async getToken(t){return this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser?{accessToken:await this.auth.currentUser.getIdToken(t)}:null}addAuthTokenListener(t){if(this.assertAuthConfigured(),this.internalListeners.has(t))return;const r=this.auth.onIdTokenChanged(n=>{t((n==null?void 0:n.stsTokenManager.accessToken)||null)});this.internalListeners.set(t,r),this.updateProactiveRefresh()}removeAuthTokenListener(t){this.assertAuthConfigured();const r=this.internalListeners.get(t);r&&(this.internalListeners.delete(t),r(),this.updateProactiveRefresh())}assertAuthConfigured(){H(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}/**
1510 * @license
1511 * Copyright 2020 Google LLC
1512 *
1513 * Licensed under the Apache License, Version 2.0 (the "License");
1514 * you may not use this file except in compliance with the License.
1515 * You may obtain a copy of the License at
1516 *
1517 *   http://www.apache.org/licenses/LICENSE-2.0
1518 *
1519 * Unless required by applicable law or agreed to in writing, software
1520 * distributed under the License is distributed on an "AS IS" BASIS,
1521 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1522 * See the License for the specific language governing permissions and
1523 * limitations under the License.
1524 */function eA(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function tA(e){Xt(new Nt("auth",(t,{options:r})=>{const n=t.getProvider("app").getImmediate(),i=t.getProvider("heartbeat"),a=t.getProvider("app-check-internal"),{apiKey:o,authDomain:s}=n.options;H(o&&!o.includes(":"),"invalid-api-key",{appName:n.name});const c={apiKey:o,authDomain:s,clientPlatform:e,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:Fg(e)},l=new y_(n,i,a,c);return E_(l,r),l},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,r,n)=>{t.getProvider("auth-internal").initialize()})),Xt(new Nt("auth-internal",t=>{const r=jn(t.getProvider("auth").getImmediate());return(n=>new QO(n))(r)},"PRIVATE").setInstantiationMode("EXPLICIT")),It(Bf,zf,eA(e)),It(Bf,zf,"esm2020")}/**
1525 * @license
1526 * Copyright 2021 Google LLC
1527 *
1528 * Licensed under the Apache License, Version 2.0 (the "License");
1529 * you may not use this file except in compliance with the License.
1530 * You may obtain a copy of the License at
1531 *
1532 *   http://www.apache.org/licenses/LICENSE-2.0
1533 *
1534 * Unless required by applicable law or agreed to in writing, softw
1534are
1535 * distributed under the License is distributed on an "AS IS" BASIS,
1536 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1537 * See the License for the specific language governing permissions and
1538 * limitations under the License.
1539 */const rA=5*60,nA=fg("authIdTokenMaxAge")||rA;let Wf=null;const iA=e=>async t=>{const r=t&&await t.getIdTokenResult(),n=r&&(new Date().getTime()-Date.parse(r.issuedAtTime))/1e3;if(n&&n>nA)return;const i=r==null?void 0:r.token;Wf!==i&&(Wf=i,await fetch(e,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))};function aA(e=wg()){const t=Do(e,"auth");if(t.isInitialized())return t.getImmediate();const r=A_(e,{popupRedirectResolver:ZO,persistence:[lO,X_,Jg]}),n=fg("authTokenSyncURL");if(n&&typeof isSecureContext=="boolean"&&isSecureContext){const a=new URL(n,location.origin);if(location.origin===a.origin){const o=iA(a.toString());q_(r,o,()=>o(r.currentUser)),V_(r,s=>o(s))}}const i=hS("auth");return i&&I_(r,`http://${i}`),r}function oA(){var e;return((e=document.getElementsByTagName("head"))==null?void 0:e[0])??document}v_({loadJS(e){return new Promise((t,r)=>{const n=document.createElement("script");n.setAttribute("src",e),n.onload=t,n.onerror=i=>{const a=kt("internal-error");a.customData=i,r(a)},n.type="text/javascript",n.charset="UTF-8",oA().appendChild(n)})},gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="});tA("Browser");const ny="@firebase/installations",Zl="0.6.19";/**
1540 * @license
1541 * Copyright 2019 Google LLC
1542 *
1543 * Licensed under the Apache License, Version 2.0 (the "License");
1544 * you may not use this file except in compliance with the License.
1545 * You may obtain a copy of the License at
1546 *
1547 *   http://www.apache.org/licenses/LICENSE-2.0
1548 *
1549 * Unless required by applicable law or agreed to in writing, software
1550 * distributed under the License is distributed on an "AS IS" BASIS,
1551 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1552 * See the License for the specific language governing permissions and
1553 * limitations under the License.
1554 */const iy=1e4,ay=`w:${Zl}`,oy="FIS_v2",sA="https://firebaseinstallations.googleapis.com/v1",cA=60*60*1e3,lA="installations",uA="Installations";/**
1555 * @license
1556 * Copyright 2019 Google LLC
1557 *
1558 * Licensed under the Apache License, Version 2.0 (the "License");
1559 * you may not use this file except in compliance with the License.
1560 * You may obtain a copy of the License at
1561 *
1562 *   http://www.apache.org/licenses/LICENSE-2.0
1563 *
1564 * Unless required by applicable law or agreed to in writing, software
1565 * distributed under the License is distributed on an "AS IS" BASIS,
1566 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1567 * See the License for the specific language governing permissions and
1568 * limitations under the License.
1569 */const dA={"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."},Yr=new rn(lA,uA,dA);function sy(e){return e instanceof Rt&&e.code.includes("request-failed")}/**
1570 * @license
1571 * Copyright 2019 Google LLC
1572 *
1573 * Licensed under the Apache License, Version 2.0 (the "License");
1574 * you may not use this file except in compliance with the License.
1575 * You may obtain a copy of the License at
1576 *
1577 *   http://www.apache.org/licenses/LICENSE-2.0
1578 *
1579 * Unless required by applicable law or agreed to in writing, software
1580 * distributed under the License is distributed on an "AS IS" BASIS,
1581 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1582 * See the License for the specific language governing permissions and
1583 * limitations under the License.
1584 */function cy({projectId:e}){return`${sA}/projects/${e}/installations`}
1584function ly(e){return{token:e.token,requestStatus:2,expiresIn:hA(e.expiresIn),creationTime:Date.now()}}async function uy(e,t){const n=(await t.json()).error;return Yr.create("request-failed",{requestName:e,serverCode:n.code,serverMessage:n.message,serverStatus:n.status})}function dy({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function fA(e,{refreshToken:t}){const r=dy(e);return r.append("Authorization",pA(t)),r}async function fy(e){const t=await e();return t.status>=500&&t.status<600?e():t}function hA(e){return Number(e.replace("s","000"))}function pA(e){return`${oy} ${e}`}/**
1585 * @license
1586 * Copyright 2019 Google LLC
1587 *
1588 * Licensed under the Apache License, Version 2.0 (the "License");
1589 * you may not use this file except in compliance with the License.
1590 * You may obtain a copy of the License at
1591 *
1592 *   http://www.apache.org/licenses/LICENSE-2.0
1593 *
1594 * Unless required by applicable law or agreed to in writing, software
1595 * distributed under the License is distributed on an "AS IS" BASIS,
1596 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1597 * See the License for the specific language governing permissions and
1598 * limitations under the License.
1599 */async function mA({appConfig:e,heartbeatServiceProvider:t},{fid:r}){const n=cy(e),i=dy(e),a=t.getImmediate({optional:!0});if(a){const l=await a.getHeartbeatsHeader();l&&i.append("x-firebase-client",l)}const o={fid:r,authVersion:oy,appId:e.appId,sdkVersion:ay},s={method:"POST",headers:i,body:JSON.stringify(o)},c=await fy(()=>fetch(n,s));if(c.ok){const l=await c.json();return{fid:l.fid||r,registrationStatus:2,refreshToken:l.refreshToken,authToken:ly(l.authToken)}}else throw await uy("Create Installation",c)}/**
1600 * @license
1601 * Copyright 2019 Google LLC
1602 *
1603 * Licensed under the Apache License, Version 2.0 (the "License");
1604 * you may not use this file except in compliance with the License.
1605 * You may obtain a copy of the License at
1606 *
1607 *   http://www.apache.org/licenses/LICENSE-2.0
1608 *
1609 * Unless required by applicable law or agreed to in writing, software
1610 * distributed under the License is distributed on an "AS IS" BASIS,
1611 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1612 * See the License for the specific language governing permissions and
1613 * limitations under the License.
1614 */function hy(e){return new Promise(t=>{setTimeout(t,e)})}/**
1615 * @license
1616 * Copyright 2019 Google LLC
1617 *
1618 * Licensed under the Apache License, Version 2.0 (the "License");
1619 * you may not use this file except in compliance with the License.
1620 * You may obtain a copy of the License at
1621 *
1622 *   http://www.apache.org/licenses/LICENSE-2.0
1623 *
1624 * Unless required by applicable law or agreed to in writing, software
1625 * distributed under the License is distributed on an "AS IS" BASIS,
1626 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1627 * See the License for the specific language governing permissions and
1628 * limitations under the License.
1629 */function gA(e){return btoa(String.fromCharCode(...e)).replace(/\+/g,"-").replace(/\//g,"_")}/**
1630 * @license
1631 * Copyright 2019 Google LLC
1632 *
1633 * Licensed under the Apache License, Version 2.0 (the "License");
1634 * you may not use this file except in compliance with the License.
1635 * You may obtain a copy of the License at
1636 *
1637 *   http://www.apache.org/licenses/LICENSE-2.0
1638 *
1639 * Unless required by applicable law or agreed to in writing, software
1640 * distributed under the License is distributed on an "AS IS" BASIS,
1641 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1642 * See the License for the specific language governing permissions and
1643 * limitations under the License.
1644 */const yA=/^[cdef][\w-]{21}$/,$c="";function vA(){try{const e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;const r=bA(e);return yA.test(r)?r:$c}catch{return $c}}function bA(e){return gA(e).substr(0,22)}/**
1645 * @license
1646 * Copyright 2019 Google LLC
1647 *
1648 * Licensed under the Apache License, Version 2.0 (the "License");
1649 * you may not use this file except in compliance with the License.
1650 * You may obtain a copy of the License at
1651 *
1652 *   http://www.apache.org/licenses/LICENSE-2.0
1653 *
1654 * Unless required by applicable law or agreed to in writing, softw
1654are
1655 * distributed under the License is distributed on an "AS IS" BASIS,
1656 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1657 * See the License for the specific language governing permissions and
1658 * limitations under the License.
1659 */function Uo(e){return`${e.appName}!${e.appId}`}/**
1660 * @license
1661 * Copyright 2019 Google LLC
1662 *
1663 * Licensed under the Apache License, Version 2.0 (the "License");
1664 * you may not use this file except in compliance with the License.
1665 * You may obtain a copy of the License at
1666 *
1667 *   http://www.apache.org/licenses/LICENSE-2.0
1668 *
1669 * Unless required by applicable law or agreed to in writing, software
1670 * distributed under the License is distributed on an "AS IS" BASIS,
1671 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1672 * See the License for the specific language governing permissions and
1673 * limitations under the License.
1674 */const py=new Map;function my(e,t){const r=Uo(e);gy(r,t),wA(r,t)}function gy(e,t){const r=py.get(e);if(r)for(const n of r)n(t)}function wA(e,t){const r=xA();r&&r.postMessage({key:e,fid:t}),SA()}let Ur=null;function xA(){return!Ur&&"BroadcastChannel"in self&&(Ur=new BroadcastChannel("[Firebase] FID Change"),Ur.onmessage=e=>{gy(e.data.key,e.data.fid)}),Ur}function SA(){py.size===0&&Ur&&(Ur.close(),Ur=null)}/**
1675 * @license
1676 * Copyright 2019 Google LLC
1677 *
1678 * Licensed under the Apache License, Version 2.0 (the "License");
1679 * you may not use this file except in compliance with the License.
1680 * You may obtain a copy of the License at
1681 *
1682 *   http://www.apache.org/licenses/LICENSE-2.0
1683 *
1684 * Unless required by applicable law or agreed to in writing, software
1685 * distributed under the License is distributed on an "AS IS" BASIS,
1686 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1687 * See the License for the specific language governing permissions and
1688 * limitations under the License.
1689 */const PA="firebase-installations-database",_A=1,Jr="firebase-installations-store";let Js=null;function Ql(){return Js||(Js=vg(PA,_A,{upgrade:(e,t)=>{switch(t){case 0:e.createObjectStore(Jr)}}})),Js}async function $a(e,t){const r=Uo(e),i=(await Ql()).transaction(Jr,"readwrite"),a=i.objectStore(Jr),o=await a.get(r);return await a.put(t,r),await i.done,(!o||o.fid!==t.fid)&&my(e,t.fid),t}async function yy(e){const t=Uo(e),n=(await Ql()).transaction(Jr,"readwrite");await n.objectStore(Jr).delete(t),await n.done}async function Bo(e,t){const r=Uo(e),i=(await Ql()).transaction(Jr,"readwrite"),a=i.objectStore(Jr),o=await a.get(r),s=t(o);return s===void 0?await a.delete(r):await a.put(s,r),await i.done,s&&(!o||o.fid!==s.fid)&&my(e,s.fid),s}/**
1690 * @license
1691 * Copyright 2019 Google LLC
1692 *
1693 * Licensed under the Apache License, Version 2.0 (the "License");
1694 * you may not use this file except in compliance with the License.
1695 * You may obtain a copy of the License at
1696 *
1697 *   http://www.apache.org/licenses/LICENSE-2.0
1698 *
1699 * Unless required by applicable law or agreed to in writing, software
1700 * distributed under the License is distributed on an "AS IS" BASIS,
1701 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1702 * See the License for the specific language governing permissions and
1703 * limitations under the License.
1704 */async function eu(e){let t;const r=await Bo(e.appConfig,n=>{const i=OA(n),a=AA(e,i);return t=a.registrationPromise,a.installationEntry});return r.fid===$c?{installationEntry:await t}:{installationEntry:r,registrationPromise:t}}function OA(e){const t=e||{fid:vA(),registrationStatus:0};return vy(t)}function AA(e,t){if(t.registrationStatus===0){if(!navigator.onLine){const i=Promise.reject(Yr.create("app-offline"));return{installationEntry:t,registrationPromise:i}}const r={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},n=EA(e,r);return{installationEntry:r,registrationPromise:n}}else return t.registrationStatus===1?{installationEntry:t,registrationPromise:IA(e)}:{installationEntry:t}}async function EA(e,t){try{const r=await mA(e,t);return $a(e.appConfig,r)}catch(r){throw sy(r)&&r.customData.serverCode===409?await yy(e.appConfig):await $a(e.appConfig,{fid:t.fid,registrationStatus:0}),r}}async function IA(e){let t=await Hf(e.appConfig);for(;t.registrationStatus===1;)await hy(100),t=await Hf(e.appConfig);if(t.registrationStatus===0){const{installationEntry:r,registrationPromise:n}=await eu(e);return n||r}return t}function Hf(e){return Bo(e,t=>{if(!t)throw Yr.create("installation-not-found");return vy(t)})}function vy(e){return kA(e)?{fid:e.fid,registrationStatus:0}:e}function kA(e){return e.registrationStatus===1&&e.registrationTime+iy<Date.now()}/**
1705 * @license
1706 * Copyright 2019 Google LLC
1707 *
1708 * Licensed under the Apache License, Version 2.0 (the "License");
1709 * you may not use this file except in compliance with the License.
1710 * You may obtain a copy of the License at
1711 *
1712 *   http://www.apache.org/licenses/LICENSE-2.0
1713 *
1714 * Unless required by applicable law or agreed to in writing, software
1715 * distributed under the License is distributed on an "AS IS" BASIS,
1716 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1717 * See the License for the specific language governing permissions and
1718 * limitations under the License.
1719 */async function TA({appConfig:e,heartbeatServiceProvider:t},r){const n=CA(e,r),i=fA(e,r),a=t.getImmediate({optional:!0});if(a){const l=await a.getHeartbeatsHeader();l&&i.append("x-firebase-client",l)}const o={installation:{sdkVersion:ay,appId:e.appId}},s={method:"POST",headers:i,body:JSON.stringify(o)},c=await fy(()=>fetch(n,s));if(c.ok){const l=await c.json();return ly(l)}else throw await uy("Generate Auth Token",c)}function CA(e,{fid:t}){return`${cy(e)}/${t}/authTokens:generate`}/**
1720 * @license
1721 * Copyright 2019 Google LLC
1722 *
1723 * Licensed under the Apache License, Version 2.0 (the "License");
1724 * you may not use this file except in compliance with the License.
1725 * You may obtain a copy of the License at
1726 *
1727 *   http://www.apache.org/licenses/LICENSE-2.0
1728 *
1729 * Unless required by applicable law or agreed to in writing, software
1730 * distributed under the License is distributed on an "AS IS" BASIS,
1731 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1732 * See the License for the specific language governing permissions and
1733 * limitations under the License.
1734 */async function tu(e,t=!1){let r;const n=await Bo(e.appConfig,a=>{if(!by(a))throw Yr.create("not-registered");const o=a.authToken;if(!t&&MA(o))return a;if(o.requestStatus===1)return r=NA(e,t),a;{if(!navigator.onLine)throw Yr.create("app-offline");const s=RA(a);return r=jA(e,s),s}});return r?await r:n.authToken}async function NA(e,t){let r=await Kf(e.appConfig);for(;r.authToken.requestStatus===1;)await hy(100),r=await Kf(e.appConfig);const n=r.authToken;return n.requestStatus===0?tu(e,t):n}function Kf(e){return Bo(e,t=>{if(!by(t))throw Yr.create("not-registered");const r=t.authToken;return $A(r)?{...t,authToken:{requestStatus:0}}:t})}async function jA(e,t){try{const r=await TA(e,t),n={...t,authToken:r};return await $a(e.appConfig,n),r}catch(r){if(sy(r)&&(r.customData.serverCode===401||r.customData.serverCode===404))await yy(e.appConfig);else{const n={...t,authToken:{requestStatus:0}};await $a(e.appConfig,n)}throw r}}function by(e){return e!==void 0&&e.registrationStatus===2}function MA(e){return e.requestStatus===2&&!DA(e)}function DA(e){const t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+cA}function RA(e){const t={requestStatus:1,requestTime:Date.now()};return{...e,authToken:t}}function $A(e){return e.requestStatus===1&&e.requestTime+iy<Date.now()}/**
1735 * @license
1736 * Copyright 2019 Google LLC
1737 *
1738 * Licensed under the Apache License, Version 2.0 (the "License");
1739 * you may not use this file except in compliance with the License.
1740 * You may obtain a copy of the License at
1741 *
1742 *   http://www.apache.org/licenses/LICENSE-2.0
1743 *
1744 * Unless required by applicable law or agreed to in writing, software
1745 * distributed under the License is distributed on an "AS IS" BASIS,
1746 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1747 * See the License for the specific language governing permissions and
1748 * limitations under the License.
1749 */async function LA(e){const t=e,{installationEntry:r,registrationPromise:n}=await eu(t);return n?n.catch(console.error):tu(t).catch(console.error),r.fid}/**
1750 * @license
1751 * Copyright 2019 Google LLC
1752 *
1753 * Licensed under the Apache License, Version 2.0 (the "License");
1754 * you may not use this file except in compliance with the License.
1755 * You may obtain a copy of the License at
1756 *
1757 *   http://www.apache.org/licenses/LICENSE-2.0
1758 *
1759 * Unless required by applicable law or agreed to in writing, software
1760 * distributed under the License is distributed on an "AS IS" BASIS,
1761 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1762 * See the License for the specific language governing permissions and
1763 * limitations under the License.
1764 */async function FA(e,t=!1){const r=e;return await UA(r),(await tu(r,t)).token}async function UA(e){const{registrationPromise:t}=await eu(e);t&&await t}/**
1765 * @license
1766 * Copyright 2019 Google LLC
1767 *
1768 * Licensed under the Apache License, Version 2.0 (the "License");
1769 * you may not use this file except in compliance with the License.
1770 * You may obtain a copy of the License at
1771 *
1772 *   http://www.apache.org/licenses/LICENSE-2.0
1773 *
1774 * Unless required by applicable law or agreed to in writing, software
1775 * distributed under the License is distributed on an "AS IS" BASIS,
1776 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1777 * See the License for the specific language governing permissions and
1778 * limitations under the License.
1779 */function BA(e){if(!e||!e.options)throw Xs("App Configuration");if(!e.name)throw Xs("App Name");const t=["projectId","apiKey","appId"];for(const r of t)if(!e.options[r])throw Xs(r);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}function Xs(e){return Yr.create("missing-app-config-values",{valueName:e})}/**
1780 * @license
1781 * Copyright 2020 Google LLC
1782 *
1783 * Licensed under the Apache License, Version 2.0 (the "License");
1784 * you may not use this file except in compliance with the License.
1785 * You may obtain a copy of the License at
1786 *
1787 *   http://www.apache.org/licenses/LICENSE-2.0
1788 *
1789 * Unless required by applicable law or agreed to in writing, software
1790 * distributed under the License is distributed on an "AS IS" BASIS,
1791 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1792 * See the License for the specific language governing permissions and
1793 * limitations under the License.
1794 */const wy="installations",zA="installations-internal",WA=e=>{const t=e.getProvider("app").getImmediate(),r=BA(t),n=Do(t,"heartbeat");return{app:t,appConfig:r,heartbeatServiceProvider:n,_delete:()=>Promise.resolve()}},HA=e=>{const t=e.getProvider("app").getImmediate(),r=Do(t,wy).getImmediate();return{getId:()=>LA(r),getToken:i=>FA(r,i)}};function KA(){Xt(new Nt(wy,WA,"PUBLIC")),Xt(new Nt(zA,HA,"PRIVATE"))}KA();It(ny,Zl);It(ny,Zl,"esm2020");/**
1795 * @license
1796 * Copyright 2019 Google LLC
1797 *
1798 * Licensed under the Apache License, Version 2.0 (the "License");
1799 * you may not use this file except in compliance with the License.
1800 * You may obtain a copy of the License at
1801 *
1802 *   http://www.apache.org/licenses/LICENSE-2.0
1803 *
1804 * Unless required by applicable law or agreed to in writing, software
1805 * distributed under the License is distributed on an "AS IS" BASIS,
1806 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1807 * See the License for the specific language governing permissions and
1808 * limitations under the License.
1809 */const Vf="analytics",VA="firebase_id",qA="origin",GA=60*1e3,YA="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig",ru="https://www.googletagmanager.com/gtag/js";/**
1810 * @license
1811 * Copyright 2019 Google LLC
1812 *
1813 * Licensed under the Apache License, Version 2.0 (the "License");
1814 * you may not use this file except in compliance with the License.
1815 * You may obtain a copy of the License at
1816 *
1817 *   http://www.apache.org/licenses/LICENSE-2.0
1818 *
1819 * Unless required by applicable law or agreed to in writing, software
1820 * distributed under the License is distributed on an "AS IS" BASIS,
1821 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1822 * See the License for the specific language governing permissions and
1823 * limitations under the License.
1824 */const Re=new zl("@firebase/analytics");/**
1825 * @license
1826 * Copyright 2019 Google LLC
1827 *
1828 * Licensed under the Apache License, Version 2.0 (the "License");
1829 * you may not use this file except in compliance with the License.
1830 * You may obtain a copy of the License at
1831 *
1832 *   http://www.apache.org/licenses/LICENSE-2.0
1833 *
1834 * Unless required by applicable law or agreed to in writing, software
1835 * distributed under the License is distributed on an "AS IS" BASIS,
1836 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1837 * See the License for the specific language governing permissions and
1838 * limitations under the License.
1839 */const JA={"already-exists":"A Firebase Analytics instance with the appId {$id}  already exists. Only one Firebase Analytics instance can be created for each appId.","already-initialized":"initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-initialized instance.","already-initialized-settings":"Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.","interop-component-reg-failed":"Firebase Analytics Interop Component failed to instantiate: {$reason}
1839","invalid-analytics-context":"Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","indexeddb-unavailable":"IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","fetch-throttle":"The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.","config-fetch-failed":"Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}","no-api-key":'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',"no-app-id":'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',"no-client-id":'The "client_id" field is empty.',"invalid-gtag-resource":"Trusted Types detected an invalid gtag resource: {$gtagURL}."},ct=new rn("analytics","Analytics",JA);/**
1840 * @license
1841 * Copyright 2019 Google LLC
1842 *
1843 * Licensed under the Apache License, Version 2.0 (the "License");
1844 * you may not use this file except in compliance with the License.
1845 * You may obtain a copy of the License at
1846 *
1847 *   http://www.apache.org/licenses/LICENSE-2.0
1848 *
1849 * Unless required by applicable law or agreed to in writing, software
1850 * distributed under the License is distributed on an "AS IS" BASIS,
1851 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1852 * See the License for the specific language governing permissions and
1853 * limitations under the License.
1854 */function XA(e){if(!e.startsWith(ru)){const t=ct.create("invalid-gtag-resource",{gtagURL:e});return Re.warn(t.message),""}return e}function xy(e){return Promise.all(e.map(t=>t.catch(r=>r)))}function ZA(e,t){let r;return window.trustedTypes&&(r=window.trustedTypes.createPolicy(e,t)),r}function QA(e,t){const r=ZA("firebase-js-sdk-policy",{createScriptURL:XA}),n=document.createElement("script"),i=`${ru}?l=${e}&id=${t}`;n.src=r?r==null?void 0:r.createScriptURL(i):i,n.async=!0,document.head.appendChild(n)}function eE(e){let t=[];return Array.isArray(window[e])?t=window[e]:window[e]=t,t}async function tE(e,t,r,n,i,a){const o=n[i];try{if(o)await t[o];else{const c=(await xy(r)).find(l=>l.measurementId===i);c&&await t[c.appId]}}catch(s){Re.error(s)}e("config",i,a)}async function rE(e,t,r,n,i){try{let a=[];if(i&&i.send_to){let o=i.send_to;Array.isArray(o)||(o=[o]);const s=await xy(r);for(const c of o){const l=s.find(d=>d.measurementId===c),u=l&&t[l.appId];if(u)a.push(u);else{a=[];break}}}a.length===0&&(a=Object.values(t)),await Promise.all(a),e("event",n,i||{})}catch(a){Re.error(a)}}function nE(e,t,r,n){async function i(a,...o){try{if(a==="event"){const[s,c]=o;await rE(e,t,r,s,c)}else if(a==="config"){const[s,c]=o;await tE(e,t,r,n,s,c)}else if(a==="consent"){const[s,c]=o;e("consent",s,c)}else if(a==="get"){const[s,c,l]=o;e("get",s,c,l)}else if(a==="set"){const[s]=o;e("set",s)}else e(a,...o)}catch(s){Re.error(s)}}return i}function iE(e,t,r,n,i){let a=function(...o){window[n].push(arguments)};return window[i]&&typeof window[i]=="function"&&(a=window[i]),window[i]=nE(a,e,t,r),{gtagCore:a,wrappedGtag:window[i]}}function aE(e){const t=window.document.getElementsByTagName("script");for(const r of Object.values(t))if(r.src&&r.src.includes(ru)&&r.src.includes(e))return r;return null}/**
1855 * @license
1856 * Copyright 2020 Google LLC
1857 *
1858 * Licensed under the Apache License, Version 2.0 (the "License");
1859 * you may not use this file except in compliance with the License.
1860 * You may obtain a copy of the License at
1861 *
1862 *   http://www.apache.org/licenses/LICENSE-2.0
1863 *
1864 * Unless required by applicable law or agreed to in writing, software
1865 * distributed under the License is distributed on an "AS IS" BASIS,
1866 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1867 * See the License for the specific language governing permissions and
1868 * limitations under the License.
1869 */const oE=30,sE=1e3;class cE{constructor(t={},r=sE){this.throttleMetadata=t,this.intervalMillis=r}getThrottleMetadata(t){return this.throttleMetadata[t]}setThrottleMetadata(t,r){this.throttleMetadata[t]=r}deleteThrottleMetadata(t){delete this.throttleMetadata[t]}}const Sy=new cE;function lE(e){return new Headers({Accept:"application/json","x-goog-api-key":e})}async function uE(e){var o;const{appId:t,apiKey:r}=e,n={method:"GET",headers:lE(r)},i=YA.replace("{app-id}",t),a=await fetch(i,n);if(a.status!==200&&a.status!==304){let s="";try{const c=await a.json();(o=c.error)!=null&&o.message&&(s=c.error.message)}catch{}throw ct.create("config-fetch-failed",{httpStatus:a.status,responseMessage:s})}return a.json()}async function dE(e,t=Sy,r){const{appId:n,apiKey:i,measurementId:a}=e.options;if(!n)throw ct.create("no-app-id");if(!i){if(a)return{measurementId:a,appId:n};throw ct.create("no-api-key")}const o=t.getThrottleMetadata(n)||{backoffCount:0,throttleEndTimeMillis:Date.now()},s=new pE;return setTimeout(async()=>{s.abort()},GA),Py({appId:n,apiKey:i,measurementId:a},o,s,t)}
1869async function Py(e,{throttleEndTimeMillis:t,backoffCount:r},n,i=Sy){var s;const{appId:a,measurementId:o}=e;try{await fE(n,t)}catch(c){if(o)return Re.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${o} provided in the "measurementId" field in the local Firebase config. [${c==null?void 0:c.message}]`),{appId:a,measurementId:o};throw c}try{const c=await uE(e);return i.deleteThrottleMetadata(a),c}catch(c){const l=c;if(!hE(l)){if(i.deleteThrottleMetadata(a),o)return Re.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${o} provided in the "measurementId" field in the local Firebase config. [${l==null?void 0:l.message}]`),{appId:a,measurementId:o};throw c}const u=Number((s=l==null?void 0:l.customData)==null?void 0:s.httpStatus)===503?pf(r,i.intervalMillis,oE):pf(r,i.intervalMillis),d={throttleEndTimeMillis:Date.now()+u,backoffCount:r+1};return i.setThrottleMetadata(a,d),Re.debug(`Calling attemptFetch again in ${u} millis`),Py(e,d,n,i)}}function fE(e,t){return new Promise((r,n)=>{const i=Math.max(t-Date.now(),0),a=setTimeout(r,i);e.addEventListener(()=>{clearTimeout(a),n(ct.create("fetch-throttle",{throttleEndTimeMillis:t}))})})}function hE(e){if(!(e instanceof Rt)||!e.customData)return!1;const t=Number(e.customData.httpStatus);return t===429||t===500||t===503||t===504}class pE{constructor(){this.listeners=[]}addEventListener(t){this.listeners.push(t)}abort(){this.listeners.forEach(t=>t())}}async function mE(e,t,r,n,i){if(i&&i.global){e("event",r,n);return}else{const a=await t,o={...n,send_to:a};e("event",r,o)}}async function gE(e,t,r,n){if(n&&n.global){const i={};for(const a of Object.keys(r))i[`user_properties.${a}`]=r[a];return e("set",i),Promise.resolve()}else{const i=await t;e("config",i,{update:!0,user_properties:r})}}/**
1870 * @license
1871 * Copyright 2020 Google LLC
1872 *
1873 * Licensed under the Apache License, Version 2.0 (the "License");
1874 * you may not use this file except in compliance with the License.
1875 * You may obtain a copy of the License at
1876 *
1877 *   http://www.apache.org/licenses/LICENSE-2.0
1878 *
1879 * Unless required by applicable law or agreed to in writing, software
1880 * distributed under the License is distributed on an "AS IS" BASIS,
1881 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1882 * See the License for the specific language governing permissions and
1883 * limitations under the License.
1884 */async function yE(){if(pg())try{await mg()}catch(e){return Re.warn(ct.create("indexeddb-unavailable",{errorInfo:e==null?void 0:e.toString()}).message),!1}else return Re.warn(ct.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;return!0}async function vE(e,t,r,n,i,a,o){const s=dE(e);s.then(f=>{r[f.measurementId]=f.appId,e.options.measurementId&&f.measurementId!==e.options.measurementId&&Re.warn(`The measurement ID in the local Firebase config (${e.options.measurementId}) does not match the measurement ID fetched from the server (${f.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`)}).catch(f=>Re.error(f)),t.push(s);const c=yE().then(f=>{if(f)return n.getId()}),[l,u]=await Promise.all([s,c]);aE(a)||QA(a,l.measurementId),i("js",new Date);const d=(o==null?void 0:o.config)??{};return d[qA]="firebase",d.update=!0,u!=null&&(d[VA]=u),i("config",l.measurementId,d),l.measurementId}/**
1885 * @license
1886 * Copyright 2019 Google LLC
1887 *
1888 * Licensed under the Apache License, Version 2.0 (the "License");
1889 * you may not use this file except in compliance with the License.
1890 * You may obtain a copy of the License at
1891 *
1892 *   http://www.apache.org/licenses/LICENSE-2.0
1893 *
1894 * Unless required by applicable law or agreed to in writing, software
1895 * distributed under the License is distributed on an "AS IS" BASIS,
1896 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1897 * See the License for the specific language governing permissions and
1898 * limitations under the License.
1899 */class bE{constructor(t){this.app=t}_delete(){return delete yn[this.app.options.appId],Promise.resolve()}}let yn={},qf=[];const Gf={};let Zs="dataLayer",wE="gtag",Yf,nu,Jf=!1;function xE(){const e=[];
1899if(hg()&&e.push("This is a browser extension environment."),PS()||e.push("Cookies are not available."),e.length>0){const t=e.map((n,i)=>`(${i+1}) ${n}`).join(" "),r=ct.create("invalid-analytics-context",{errorInfo:t});Re.warn(r.message)}}function SE(e,t,r){xE();const n=e.options.appId;if(!n)throw ct.create("no-app-id");if(!e.options.apiKey)if(e.options.measurementId)Re.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${e.options.measurementId} provided in the "measurementId" field in the local Firebase config.`);else throw ct.create("no-api-key");if(yn[n]!=null)throw ct.create("already-exists",{id:n});if(!Jf){eE(Zs);const{wrappedGtag:a,gtagCore:o}=iE(yn,qf,Gf,Zs,wE);nu=a,Yf=o,Jf=!0}return yn[n]=vE(e,qf,Gf,t,Yf,Zs,r),new bE(e)}function PE(e,t,r){e=et(e),gE(nu,yn[e.app.options.appId],t,r).catch(n=>Re.error(n))}function _E(e,t,r,n){e=et(e),mE(nu,yn[e.app.options.appId],t,r,n).catch(i=>Re.error(i))}const Xf="@firebase/analytics",Zf="0.10.19";function OE(){Xt(new Nt(Vf,(t,{options:r})=>{const n=t.getProvider("app").getImmediate(),i=t.getProvider("installations-internal").getImmediate();return SE(n,i,r)},"PUBLIC")),Xt(new Nt("analytics-internal",e,"PRIVATE")),It(Xf,Zf),It(Xf,Zf,"esm2020");function e(t){try{const r=t.getProvider(Vf).getImmediate();return{logEvent:(n,i,a)=>_E(r,n,i,a),setUserProperties:(n,i)=>PE(r,n,i)}}catch(r){throw ct.create("interop-component-reg-failed",{reason:r})}}}OE();const ni={apiKey:"AIzaSyBR0vsKViEZmngnAuOfnpPhM3VVW4NkdNE",authDomain:"auth.fanflowy.com",projectId:"fanflowy-app",storageBucket:"fanflowy-app.firebasestorage.app",messagingSenderId:"589404510563",appId:"1:589404510563:web:356911969c8a02b76e9b56",measurementId:"G-7CK4CQ05K1"},AE=()=>!!(ni.apiKey&&ni.authDomain&&ni.projectId&&ni.appId);let Qf,ke;
1899try{AE()?(Qf=NP().length?wg():bg(ni),ke=aA(Qf)):ke=null}catch(e){console.error("[Firebase] Failed to initialize Firebase:",e),ke=null}const zo=pt.apiBaseUrl,_y="fanflowy_refresh_token";function Oy(){return typeof window>"u"?null:window.localStorage.getItem("fanflowy_token")}function EE(){return typeof window>"u"?null:window.localStorage.getItem(_y)}function IE(e){if(!e||typeof e!="object")return null;if("accessToken"in e&&typeof e.accessToken=="string")return e.accessToken;if("token"in e&&typeof e.token=="string")return e.token;if("data"in e&&e.data&&typeof e.data=="object"){const t=e.data;return t.accessToken||t.token||null}return null}function kE(e){try{const t=e.split(".");if(t.length<2)return null;const n=t[1].replace(/-/g,"+").replace(/_/g,"/"),i=n.padEnd(n.length+(4-n.length%4)%4,"="),a=atob(i),o=JSON.parse(a);return!(o!=null&&o.exp)||typeof o.exp!="number"?null:o.exp*1e3}catch{return null}}let Vn=null;function TE(e){if(!e||typeof e!="object")return{accessToken:null,refreshToken:null};if("accessToken"in e||"refreshToken"in e){const t=e;return{accessToken:typeof t.accessToken=="string"?t.accessToken:null,refreshToken:typeof t.refreshToken=="string"?t.refreshToken:null}}if("data"in e&&e.data&&typeof e.data=="object"){const t=e.data;return{accessToken:typeof t.accessToken=="string"?t.accessToken:null,refreshToken:typeof t.refreshToken=="string"?t.refreshToken:null}}return{accessToken:null,refreshToken:null}}async function CE(){if(typeof window>"u")return null;const e=EE();if(!e)return null;const t=await fetch(`${zo}/auth/refresh`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:e})});if(!t.ok)return null;const r=await t.json(),n=TE(r);return n.accessToken?(window.localStorage.setItem("fanflowy_token",n.accessToken),n.refreshToken&&window.localStorage.setItem(_y,n.refreshToken),n.accessToken):null}async function NE(){if(typeof window>"u"||!(ke!=null&&ke.currentUser))return null;const e=await ke.currentUser.getIdToken(!0),t=await fetch(`${zo}/auth/verify-firebase-token`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({idToken:e})});if(!t.ok)return null;const r=await t.json(),n=IE(r);return n?(window.localStorage.setItem("fanflowy_token",n),n):null}async function Ay(){return Vn||(Vn=CE().then(e=>e||NE()).catch(()=>null).finally(()=>{Vn=null}),Vn)}async function La(e){const t=(e==null?void 0:e.minTtlMs)??6e4,r=Oy();if(!(e!=null&&e.forceRefresh)&&r){const n=kE(r);if(!n||n-Date.now()>t)return r}return Ay()}async function or(e,t={}){const r=await La();if(!r)throw new Error("No authentication token found");const n=new Headers(t.headers||{});n.set("Authorization",`Bearer ${r}`);const i=t.body!==void 0&&t.body!==null,a=typeof FormData<"u"&&t.body instanceof FormData;i&&!a&&!n.has("Content-Type")&&n.set("Content-Type","application/json");const o=`${zo}${e}`,s=await fetch(o,{...t,headers:n});if(s.status!==401)return s;const c=await Ay();if(!c||c===r)return s;const l=new Headers(t.headers||{});return l.set("Authorization",`Bearer ${c}`),i&&!a&&!l.has("Content-Type")&&l.set("Content-Type","application/json"),fetch(o,{...t,headers:l})}async function A(e,t={}){const r=await or(e,t);if(!r.ok){let n=`API error: ${r.status}`;try{const i=await r.text();if(i)try{const a=JSON.parse(i);a!=null&&a.error&&typeof a.error=="object"&&a.error.message?(n=a.error.message,a.error.code&&(n=`[${a.error.code}] ${n}`)):typeof(a==null?void 0:a.error)=="string"?n=a.error:a!=null&&a.message?n=a.message:n=i}catch{n=i||`API error: ${r.status}`}}catch{n=`API error: ${r.status}`}throw r.status===401&&typeof window<"u"&&(window.localStorage.removeItem("fanflowy_token"),window.localStorage.removeItem("fanflowy_refresh_token")),new Error(n)}if(r.status!==204)return await r.json()}function je(e){return e&&typeof e=="object"&&"data"in e&&e.data!==void 0?e.data:e}const iu="fanflowy_fan_id",au="fanflowy_fan_token";function ou(){if(typeof window>"u")return null;const e=window.localStorage.getItem(iu);return e||null}function su(){return typeof window>"u"?null:window.localStorage.getItem(au)}function Ey(e,t){typeof window>"u"||(window.localStorage.setItem(iu,e),t&&window.localStorage.setItem(au,t))}function Iy(){typeof window>"u"||(window.localStorage.removeItem(iu),window.localStorage.removeItem(au))}async function kr(e,t={}){const r=su(),n=ou();if(!r&&!n)throw new Error("No fan ID found. Please sign up first.");const i={"Content-Type":"application/json",...t.headers||{}};r?i["x-fan-token"]=r:n&&(i["x-fan-id"]=n);const a=await fetch(`${zo}${e}`,{...t,headers:i});if(!a.ok){let o=`API error: ${a.status}`;try{const s=await a.text();if(s)try{const c=JSON.parse(s);c!=null&&c.error?o=c.error:o=s}catch{o=s}}catch{}throw new Error(o)}if(a.status!==204)return await a.json()}function Qs(e){if(!(e!=null&&e.trim()))return"Login failed";try{const t=JSON.parse(e);if(typeof t.error=="string")return t.error;if(typeof t.message=="string")return t.message}catch{}return e}const ky=m.createContext(void 0);function n8({children:e}){const[t,r]=m.useState(null),[n,i]=m.useState(null),[a,o]=m.useState(null),[s,c]=m.useState([]),[l,u]=m.useState(!0),[d,f]=m.useState(null),h=H1(),g=!!t&&!!n,v=async()=>
1899{if(!ke)throw new Error("Firebase is not configured. Email verification is not available.");const w=ke.currentUser;if(!w)throw new Error("No user logged in");if(w.emailVerified)throw new Error("Email is already verified");await K_(w)},y=async(w,_=!1)=>{const x=await fetch(`${pt.apiBaseUrl}/auth/me`,{headers:{Authorization:`Bearer ${w}`}});if(x.status===401){if(!_){const k=await La({forceRefresh:!0});if(k&&k!==w)return r(k),localStorage.setItem("fanflowy_token",k),y(k,!0)}r(null),localStorage.removeItem("fanflowy_token");return}if(!x.ok)throw new Error("Failed to fetch user data");const O=await x.json(),P=O.data||O;i(P.user),o(P.account),c(P.artists||[])},b=async(w,_)=>{try{if(!ke){const R=await fetch(`${pt.apiBaseUrl}/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:w,password:_})});if(!R.ok){const K=await R.text();throw new Error(K||"Login failed")}const j=await R.json(),$=j.data||j,W=$.accessToken||$.token,z=$.refreshToken;if(!W)throw new Error("No token received from server");r(W),localStorage.setItem("fanflowy_token",W),z&&localStorage.setItem("fanflowy_refresh_token",z),await y(W);return}let x,O;try{x=await H_(ke,w,_),O=x.user}catch(R){if((R==null?void 0:R.code)==="auth/invalid-credential"||(R==null?void 0:R.code)==="auth/user-not-found"||(R==null?void 0:R.code)==="auth/invalid-api-key"){const j=await fetch(`${pt.apiBaseUrl}/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:w,password:_})});if(!j.ok){const F=await j.text();throw new Error(Qs(F))}const $=await j.json(),W=$.data||$,z=W.accessToken||W.token,K=W.refreshToken;if(!z)throw new Error("No token received from server");r(z),localStorage.setItem("fanflowy_token",z),K&&localStorage.setItem("fanflowy_refresh_token",K),await y(z);return}throw R}const P=await O.getIdToken(),k=await fetch(`${pt.apiBaseUrl}/auth/verify-firebase-token`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({idToken:P})});if(!k.ok){if(k.status===503){const j=await fetch(`${pt.apiBaseUrl}/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:w,password:_})});if(!j.ok){const F=await j.text(),_e=Qs(F);throw new Error(_e)}const $=await j.json(),W=$.data||$,z=W.accessToken||W.token,K=W.refreshToken;if(!z)throw new Error("No token received from server");r(z),localStorage.setItem("fanflowy_token",z),K&&localStorage.setItem("fanflowy_refresh_token",K),await y(z);return}const R=await k.text();throw new Error(Qs(R))}const I=await k.json(),D=I.data||I,T=D.accessToken||D.token,C=D.refreshToken;if(!T)throw new Error("No token received from server");r(T),localStorage.setItem("fanflowy_token",T),C&&localStorage.setItem("fanflowy_refresh_token",C),await y(T)}catch(x){throw x.code==="auth/user-not-found"||x.code==="auth/wrong-password"?new Error("Invalid email or password"):x.code==="auth/invalid-email"?new Error("Invalid email address"):x.code==="auth/user-disabled"?new Error("This account has been disabled"):x.code==="auth/too-many-requests"?new Error("Too many failed login attempts. Please try again later."):(x.message==="EMAIL_NOT_VERIFIED",x)}},S=async()=>{try{ke&&await Mf(ke)}catch(w){console.error("Firebase sign out error:",w)}r(null),i(null),o(null),c([]),localStorage.removeItem("fanflowy_token"),localStorage.removeItem("fanflowy_refresh_token"),h("/login")};return m.useEffect(()=>{if(typeof window>"u")return;let w=Date.now();const _=3e4,x=async()=>{if(document.hidden)return;const O=Date.now();if(O-w<_)return;const k=localStorage.getItem("fanflowy_token");if(k)try{w=O;const I=await La({forceRefresh:!1,minTtlMs:12e4});I&&I!==k&&(r(I),localStorage.setItem("fanflowy_token",I))}catch(I){console.warn("Failed to proactively refresh token on tab focus:",I)}};return document.addEventListener("visibilitychange",x),window.addEventListener("focus",x),()=>{document.removeEventListener("visibilitychange",x),window.removeEventListener("focus",x)}},[]),m.useEffect(()=>{const w=ke;if(!w){const x=localStorage.getItem("fanflowy_token");x&&y(x).catch(()=>{localStorage.removeItem("fanflowy_token")}),u(!1);return}const _=G_(w,async x=>{if(f(x),x)try{const O=await x.getIdToken(),P=await fetch(`${pt.apiBaseUrl}/auth/verify-firebase-token`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({idToken:O})});if(P.ok){const k=await P.json(),I=k.data||k,D=I.accessToken||I.token,T=I.refreshToken;D&&(r(D),localStorage.setItem("fanflowy_token",D),T&&localStorage.setItem("fanflowy_refresh_token",T),await y(D))}else if(P.status===503){ke&&await Mf(ke);const k=localStorage.getItem("fanflowy_token");if(k){r(k);try{await y(k)}catch(I){console.error("Failed to fetch user data:",I),r(null),localStorage.removeItem("fanflowy_token"),localStorage.removeItem("fanflowy_refresh_token")}}else r(null),localStorage.removeItem("fanflowy_token"),localStorage.removeItem("fanflowy_refresh_token")}else r(null),localStorage.removeItem("fanflowy_token"),localStorage.removeItem("fanflowy_refresh_token")}catch(O){console.error("Failed to verify Firebase token:",O),r(null),localStorage.removeItem("fanflowy_token"),localStorage.removeItem("fanflowy_refresh_token")}finally{u(!1)}else{const O=localStorage.getItem("fanflowy_token");O?(r(O),y(O).catch(P=>{console.error("Failed to fetch user data:",P),r(null),localStorage.removeItem("fanflowy_token"),localStorage.removeItem("fanflowy_refresh_token")}).finally(()=>{u(!1)})):u(!1)}});return()=>_()},[]),p.jsx(ky.Provider,{value:{token:t,user:n,account:a,artists:s,isLoading:l,isAuthenticated:g,login:b,logout:S,resendEmailVerification:v,firebaseUser:d},children:e})}function jE(){const e=m.useContext(ky);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e}const ME="modulepreload",DE=function(e){return"/"+e},eh={},RE=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),s=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(r.map(c=>{if(c=DE(c),c in eh)return;eh[c]=!0;const l=c.endsWith(".css"),u=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${u}`))return;const d=document.createElement("link");if(d.rel=l?"stylesheet":ME,l||(d.as="script"),d.crossOrigin="",d.href=c,s&&d.setAttribute("nonce",s),document.head.appendChild(d),l)return new Promise((f,h)=>{d.addEventListener("load",f),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${c}`)))})}))}function a(o){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o}return i.then(o=>{for(const s of o||[])s.status==="rejected"&&a(s.reason);return t().catch(a)})},Ty=pt.apiBaseUrl;async function $E(e){const t=await fetch(`${Ty}/api/v1/auth/forgot-password`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e})});if(!t.ok){const r=await t.json().catch(()=>({error:"Failed to request password reset",message:"Failed to request password reset"}));throw new Error(r.message||r.error||"Failed to request password reset")}return t.json()}async function LE(e,t){const r=await fetch(`${Ty}/api/v1/auth/reset-password`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:e,password:t})});if(!r.ok){const n=await r.json().catch(()=>({error:"Failed to reset password",message:"Failed to reset password"}));throw new Error(n.message||n.error||"Failed to reset password")}return r.json()}async function Cy(e){return A(`/artists/${e}`)}async function Ny(e,t){return A(`/artists/${e}/settings`,{method:"PUT",body:JSON.stringify(t)})}async function cu(e){const t=await A(`/artists/${e}/onboarding/status`);return je(t)}async function Fa(e){return A(`/artists/by-slug/${e}/summary`)}async function lu(e){const t=await A(`/artists/${e}/dashboard/summary`);return je(t)}async function uu(e){const t=await A(`/artists/${e}/metrics/available-years`);return je(t)}async function du(e,t){const r=t?`?range=${t}`:"",n=await A(`/artists/${e}/metrics${r}`);return je(n)}async function fu(e){const t=await A(`/artists/${e}/ad-performance/summary`);return je(t)}async function jy(e){return(await A(`/artists/${e}/announcements`)).data}async function My(e,t){return A(`/artists/${e}/announcements`,{method:"POST",body:JSON.stringify(t)})}async function Dy(e,t){return A(`/artists/${e}/announcements/${t}`,{method:"DELETE"})}async function Ry(e){return A(`/artist-settings/${e}/integration`)}async function $y(e){return A(`/artist-settings/${e}/team`)}async function Ly(e,t){return A(`/artist-settings/${e}/team`,{method:"POST",body:JSON.stringify(t)})}async function Wo(e){const t=await A(`/artists/${e}/member-questionnaire/pending`);return t.data??t}async function hu(e,t){return A(`/artists/${e}/member-questionnaire`,{method:"POST",body:JSON.stringify(t)})}async function Fy(e){var i;const t=await A(`/artists/${e}/member-questionnaire/members`),r=je(t);return{members:Array.isArray(r.members)?r.members:Array.isArray((i=r.data)==null?void 0:i.members)?r.data.members:[]}}async function Uy(e){const t=await A(`/artists/${e}/onboarding/members`);return t&&"data"in t?t.data:t}async function pu(e,t,r){const n=new FormData;n.append("file",r),n.append("assetType",t);const i=await or(`/artists/${e}/onboarding/brand-asset`,{method:"POST",body:n});if(!i.ok){let a="Failed to upload brand asset";try{const o=await i.json();o!=null&&o.error&&(a=o.error)}catch{}throw new Error(a)}return await i.json()}const i8=Object.freeze(Object.defineProperty({__proto__:null,addArtistTeamMember:Ly,createAnnouncement:My,deleteAnnouncement:Dy,getAdPerformanceSummary:fu,getArtist:Cy,getArtistAnnouncements:jy,getArtistDashboardSummary:lu,getArtistIntegrationSettings:Ry,getArtistMetrics:du,getArtistMetricsAvailableYears:uu,getArtistSummaryBySlug:Fa,getArtistTeam:$y,getBandMembers:Fy,getCurrentUserMemberQuestionnaire:Uy,getOnboardingStatus:cu,getPendingMemberQuestionnaire:Wo,submitMemberQuestionnaire:hu,updateArtistSettings:Ny,uploadBrandAsset:pu},Symbol.toStringTag,{value:"Module"}));async function FE(e){return A(`/artists/${e}/releases`)}async function UE(e,t){return(await A(`/artists/${e}/releases`,{method:"POST",body:JSON.stringify(t)})).data}async function BE(e,t,r){return(await A(`/artists/${e}/releases/${t}`,{method:"PUT",body:JSON.stringify(r)})).data}async function zE(e,t){const r=await A(`/artists/${e}/releases/${t}/launch`,{method:"POST"});return je(r)}async function WE(e,t){const r=new FormData;r.append("file",t);const n=await or(`/artists/${e}/releases/cover-art-upload`,{method:"POST",body:r});if(!n.ok){let i="Failed to upload cover art";try{const a=await n.json();a!=null&&a.error&&(i=a.error)}catch{}throw new Error(i)}return await n.json()}function Di(e){return e&&typeof e=="object"&&"data"in e&&e.data!==void 0?e.data:e}async function HE(e,t={}
1899){const r=new URLSearchParams;t.cursor?r.append("cursor",t.cursor):t.page&&r.append("page",t.page.toString()),t.pageSize&&r.append("pageSize",t.pageSize.toString()),t.search&&r.append("search",t.search),t.source&&r.append("source",t.source),t.tag&&r.append("tag",t.tag),t.city&&r.append("city",t.city),t.state&&r.append("state",t.state);const n=r.toString(),i=`/artists/${e}/fans${n?`?${n}`:""}`;return A(i)}async function KE(e,t){const r=await A(`/artists/${e}/fans/${t}`);return Di(r)}async function VE(e,t,r){const n=await A(`/artists/${e}/fans/${t}`,{method:"PUT",body:JSON.stringify(r)});return Di(n)}async function qE(e,t){const r=await A(`/artists/${e}/fans/${t}`,{method:"DELETE"});return Di(r)}async function GE(e,t){const r=await A(`/artists/${e}/fans/bulk`,{method:"DELETE",body:JSON.stringify({fanIds:t})});return Di(r)}async function YE(e,t){const r=new FormData;r.append("file",t);const n=await or(`/artists/${e}/fans/import-csv`,{method:"POST",body:r});if(!n.ok){let i=`API error: ${n.status}`;try{const a=await n.text();if(a)try{const o=JSON.parse(a);o!=null&&o.error?i=o.error:i=a}catch{i=a}}catch{}throw new Error(i)}return n.json()}async function JE(e){const t=await A(`/artists/${e}/fans/regions`);return Di(t).regions}async function XE(e){return(await A(`/artists/${e}/products`)).products}async function ZE(e,t){return(await A(`/artists/${e}/products`,{method:"POST",body:JSON.stringify(t)})).product}async function QE(e,t,r){return(await A(`/artists/${e}/products/${t}`,{method:"PUT",body:JSON.stringify(r)})).product}async function eI(e,t){return(await A(`/artists/${e}/products/${t}`,{method:"DELETE"})).product}async function tI(e,t){await A(`/artists/${e}/products/reorder`,{method:"PUT",body:JSON.stringify({productIds:t})})}async function rI(e,t,r){return(await A(`/artists/${e}/products/${t}/toggle-visibility`,{method:"PATCH",body:JSON.stringify({isActive:r})})).product}async function nI(e,t){return(await A(`/artists/${e}/products/${t}/variants`)).variants}async function iI(e,t,r){return(await A(`/artists/${e}/products/${t}/variants`,{method:"POST",body:JSON.stringify(r)})).variant}async function aI(e,t,r,n){return(await A(`/artists/${e}/products/${t}/variants/${r}`,{method:"PUT",body:JSON.stringify(n)})).variant}async function oI(e,t,r){return(await A(`/artists/${e}/products/${t}/variants/${r}`,{method:"DELETE"})).variant}async function sI(e,t){return(await A(`/artists/${e}/products/${t}/images`)).images}async function cI(e,t,r){return(await A(`/artists/${e}/products/${t}/images`,{method:"POST",body:JSON.stringify(r)})).image}async function lI(e,t,r,n){return(await A(`/artists/${e}/products/${t}/images/${r}`,{method:"PUT",body:JSON.stringify(n)})).image}async function uI(e,t,r){return(await A(`/artists/${e}/products/${t}/images/${r}`,{method:"DELETE"})).image}async function dI(e){return(await A(`/artists/${e}/fanpack-config`)).config}async function fI(e,t){return(await A(`/artists/${e}/fanpack-config`,{method:"PUT",body:JSON.stringify(t)})).config}async function hI(e,t){const r=new URLSearchParams;t!=null&&t.page&&r.set("page",String(t.page)),r.set("pageSize",String(t.pageSize)),t!=null&&t.q&&r.set("q",t.q);const n=r.toString(),i=n?`/artists/${e}/orders?${n}`:`/artists/${e}/orders`;return await A(i)}async function pI(e,t,r){return(await A(`/artists/${e}/orders/${t}`,{method:"PATCH",body:JSON.stringify(r)})).order}async function mI(e,t){const n=await fetch(`https://backend.fanflowy.com/artists/${e}/fanpack-orders`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){const a=await n.json();throw new Error(a.error||"Failed to create order")}return(await n.json()).order}async function gI(e){return(await A(`/artists/${e}/store-settings`)).settings}async function yI(e,t){return(await A(`/artists/${e}/store-settings`,{method:"PUT",body:JSON.stringify(t)})).settings}async function vI(e,t){const r=new FormData;r.append("file",t);const n=await or(`/artists/${e}/uploads/image`,{method:"POST",body:r});if(!n.ok){const a=await n.json().catch(()=>({error:"Upload failed"}));throw new Error(a.error||"Upload failed")}return(await n.json()).url}const mu=pt.apiBaseUrl;async function bI(e){return(await A(`/artists/${e}/printful-config`)).config}async function wI(e){return(await A(`/artists/${e}/printful/connect`)).url}async function xI(e){return await A(`/artists/${e}/printful/sync-products`,{method:"POST"})}async function SI(e){await A(`/artists/${e}/printful/disconnect`,{method:"POST"})}async function PI(e,t){const r=`${mu}/public/artists/${e}/products/${t}`,n=await fetch(r);if(!n.ok){if(n.status===404)return null;throw new Error("Failed to fetch product")}return(await n.json()).product??null}async function _I(e,t){const r=await fetch(`${mu}/artists/${e}/checkout/quote`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){const n=await r.json().catch(()=>
1899({error:"Quote calculation failed"}));throw new Error(n.error||"Quote calculation failed")}return await r.json()}async function OI(e,t){const r=await fetch(`${mu}/artists/${e}/fanpack-orders`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){const i=await r.json().catch(()=>({})),a=i==null?void 0:i.error,o=typeof a=="string"?a:(a==null?void 0:a.message)??(i==null?void 0:i.message)??"Order creation failed";throw new Error(o)}const n=await r.json();return n.order??n}async function AI(e){return(await A(`/artists/${e}/email-campaigns`)).data}async function EI(e,t){return A(`/artists/${e}/email-campaigns`,{method:"POST",body:JSON.stringify(t)})}async function II(e,t,r){return A(`/artists/${e}/email-campaigns/${t}`,{method:"PUT",body:JSON.stringify(r)})}async function kI(e,t){return A(`/artists/${e}/email-campaigns/${t}`,{method:"DELETE"})}async function TI(e,t){return A(`/artists/${e}/email-campaigns/${t}/preview`,{method:"POST"})}async function CI(e,t){return A(`/artists/${e}/email-campaigns/${t}/send`,{method:"POST"})}async function NI(e){return(await A(`/artists/${e}/hl-tags`)).tags}async function jI(e,t){const r=new FormData;r.append("image",t);const n=await or(`/artists/${e}/email-assets`,{method:"POST",body:r});if(!n.ok){let i="Failed to upload email asset";try{const a=await n.json();a!=null&&a.error&&(i=a.error)}catch{}throw new Error(i)}return await n.json()}async function MI(e){return(await A(`/artists/${e}/text-blasts`)).data}async function DI(e,t){return A(`/artists/${e}/text-blasts`,{method:"POST",body:JSON.stringify(t)})}async function RI(e,t,r){return A(`/artists/${e}/text-blasts/${t}`,{method:"PUT",body:JSON.stringify(r)})}async function $I(e,t){return A(`/artists/${e}/text-blasts/${t}`,{method:"DELETE"})}async function LI(e,t){return A(`/artists/${e}/text-blasts/${t}/send`,{method:"POST"})}async function By(e){return await A(`/artists/${e}/growth/status`)}async function zy(e,t,r){let n=`/artists/${e}/growth/oauth/connect?redirect_uri=${encodeURIComponent(t)}`;return r&&(n+=`&return_to=${encodeURIComponent(r)}`),(await A(n)).oauthUrl}async function Wy(e){await A(`/artists/${e}/growth/oauth/disconnect`,{method:"POST"})}async function Hy(e){return await A(`/artists/${e}/growth/campaigns`)}async function Ky(e,t){return await A(`/artists/${e}/growth/campaigns/${t}`)}async function Vy(e,t){return await A(`/artists/${e}/growth/campaigns`,{method:"POST",body:JSON.stringify(t)})}async function qy(e,t){await A(`/artists/${e}/growth/campaigns/${t}/launch`,{method:"POST"})}async function Gy(e,t){await A(`/artists/${e}/growth/campaigns/${t}/pause`,{method:"POST"})}async function Yy(e,t,r){return await A(`/artists/${e}/growth/campaigns/${t}`,{method:"PUT",body:JSON.stringify({name:r})})}async function Jy(e,t,r){await A(`/artists/${e}/growth/campaigns/${t}/config`,{method:"PUT",body:JSON.stringify(r)})}async function Xy(e,t){await A(`/artists/${e}/growth/campaigns/${t}`,{method:"DELETE"})}async function Zy(e){return await A(`/artists/${e}/growth/forms/template`)}async function Qy(e){return(await A(`/artists/${e}/growth/forms/existing`)).forms}async function ev(e){return await A(`/artists/${e}/growth/targeting/music-genres`)}async function tv(e,t){return await A(`/artists/${e}/growth/targeting/music-genres/search?q=${encodeURIComponent(t)}`)}const a8=Object.freeze(Object.defineProperty({__proto__:null,connectMetaOAuth:zy,createLeadAdCampaign:Vy,deleteCampaign:Xy,disconnectMetaOAuth:Wy,getExistingLeadForms:Qy,getFormTemplate:Zy,getGrowthCampaign:Ky,getGrowthStatus:By,getMusicGenres:ev,launchCampaign:qy,listGrowthCampaigns:Hy,pauseCampaign:Gy,searchMusicGenres:tv,updateCampaign:Yy,updateCampaignConfig:Jy},Symbol.toStringTag,{value:"Module"}));async function FI(e){return(await A(`/artists/${e}/quests`)).data}async function UI(e,t){return A(`/artists/${e}/quests`,{method:"POST",body:JSON.stringify(t)})}async function BI(e,t,r){return A(`/artists/${e}/quests/${t}`,{method:"PUT",body:JSON.stringify(r)})}async function zI(e){const t=e?`?type=${e}`:"",r=await A(`/admin/accounts${t}`),n=je(r);return Array.isArray(n)?{data:n}:n}async function WI(e){return A("/admin/accounts/labels",{method:"POST",body:JSON.stringify(e)})}async function HI(e){const t=await A(`/admin/accounts/${e}`);return je(t)}async function KI(){const e=await A("/admin/artists"),t=je(e);return Array.isArray(t)?{data:t}:t}async function VI(e){return A("/admin/artists",{method:"POST",body:JSON.stringify(e)})}async function qI(e){return A(`/admin/artists/${e}`,{method:"DELETE"})}async function GI(e){return A(`/admin/accounts/${e}`,{method:"DELETE"})}async function YI(e=!1){return A(e?"/admin/releases/process-today?force=true":"/admin/releases/process-today",{method:"POST"})}async function JI(e,t){return A("/admin/releases/update-from-url",{method:"POST",body:JSON.stringify({artistId:e,url:t})})}async function XI(e,t){return A(`/admin/artists/${e}/reassign`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async function ZI(e){return A(`/admin/ad-integrations/artists/${e}`)}async function QI(e,t){return A(`/admin/ad-integrations/artists/${e}`,{method:"POST",body:JSON.stringify(t)})}async function ek(e){return A(`/admin/ad-integrations/${e}/campaigns`)}async function tk(e,t){return A(`/admin/ad-integrations/${e}/campaigns`,{method:"POST",body:JSON.stringify(t)})}async function rk(e){return A(`/admin/ad-integrations/campaigns/${e}`,{method:"DELETE"})}async function nk(e){return A(`/admin/ad-integrations/${e}`,{method:"DELETE"})}async function ik(){return A("/admin/meta-oauth/status")}async function ak(e){return A(`/admin/meta-oauth/connect?artistSlug=${encodeURIComponent(e)}`)}
1899async function ok(){return A("/admin/meta-oauth/disconnect",{method:"POST"})}async function sk(){return A("/admin/meta-oauth/ad-accounts")}async function ck(){const e=await A("/api/v1/admin/superadmins"),t=e.data??e;return Array.isArray(t)?t:[]}async function lk(){const e=await A("/api/v1/admin/feature-flags"),t=e.data??e;return Array.isArray(t)?t:[]}async function uk(e,t){const r=new URLSearchParams;t!=null&&t.artistId&&r.set("artistId",t.artistId),t!=null&&t.accountId&&r.set("accountId",t.accountId),t!=null&&t.userId&&r.set("userId",t.userId);const n=r.toString(),i=n?`/api/v1/admin/feature-flags/${e}?${n}`:`/api/v1/admin/feature-flags/${e}`,a=await A(i);return a.data??a}async function dk(e,t){const r=await A(`/api/v1/admin/feature-flags/${e}`,{method:"PUT",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}});return r.data??r}async function fk(e){return A(`/venues/search?q=${encodeURIComponent(e)}`)}async function hk(e){return A("/venues",{method:"POST",body:JSON.stringify(e)})}async function pk(e,t){return A(`/artists/${e}/shows`,{method:"POST",body:JSON.stringify(t)})}async function mk(e,t,r){return A(`/artists/${e}/shows/${t}/targeting-preview`,{method:"POST",body:JSON.stringify({regions:r})})}async function gk(e,t,r){return A(`/artists/${e}/shows/${t}/launch`,{method:"POST",body:JSON.stringify(r)})}async function yk(e){return A(`/artists/${e}/events/sync-bandsintown`,{method:"POST"})}async function vk(e){return A(`/artists/${e}/site`)}async function bk(e,t){return A(`/artists/${e}/site/domain`,{method:"PUT",body:JSON.stringify({customDomain:t})})}async function wk(e){return A(`/artists/${e}/site/domain/instructions`)}async function xk(e){return A(`/artists/${e}/site/domain/verify`,{method:"POST"})}async function Sk(e){return(await A(`/artists/${e}/integration/highlevel`)).data}async function Pk(e){return(await A("/account/highlevel/claim-install",{method:"POST",body:JSON.stringify({companyId:e})})).data}async function _k(e){return(await A(`/artists/${e}/integration/highlevel/locations`)).data}async function Ok(e,t){return(await A(`/artists/${e}/integration/highlevel/connect-location`,{method:"POST",body:JSON.stringify({locationId:t})})).data}async function Ak(e){return(await A(`/artists/${e}/integration/highlevel/disconnect`,{method:"POST"})).data}async function Ek(e){return A(`/artists/${e}/integration/highlevel/sync`,{method:"POST"})}async function Ik(e,t=!1){const r=t?`/artists/${e}/sync-settings-from-highlevel?markOnboardingComplete=true`:`/artists/${e}/sync-settings-from-highlevel`;return A(r,{method:"POST"})}async function kk(e,t){var a;const r=new FormData;r.append("file",t);const n=await or(`/artists/${e}/highlevel/import-orders`,{method:"POST",body:r});if(!n.ok){let o="Failed to import orders";try{const s=await n.json();(a=s==null?void 0:s.error)!=null&&a.message?o=s.error.message:s!=null&&s.error&&(o=s.error)}catch{}throw new Error(o)}const i=await n.json();return i.data||i}async function Tk(e,t){const r=new URLSearchParams;t!=null&&t.search&&r.append("search",t.search),t!=null&&t.status&&r.append("status",t.status),(t==null?void 0:t.page)!==void 0&&r.append("page",t.page.toString()),t!=null&&t.contactId&&r.append("contactId",t.contactId);const n=`/artists/${e}/conversations${r.toString()?`?${r.toString()}`:""}`;return A(n)}async function Ck(e,t,r){const n=new URLSearchParams;r!=null&&r.limit&&n.append("limit",r.limit.toString()),r!=null&&r.before&&n.append("before",r.before);const i=n.toString(),a=`/artists/${e}/conversations/${t}/messages${i?`?${i}`:""}`;return A(a)}async function Nk(e,t,r){return A(`/artists/${e}/conversations/${t}/messages`,{method:"POST",body:JSON.stringify(r)})}async function jk(e,t){var a;const r=new FormData;r.append("file",t);const n=await or(`/artists/${e}/shopify/import-orders`,{method:"POST",body:r});if(!n.ok){let o="Failed to import Shopify orders";try{const s=await n.json();(a=s==null?void 0:s.error)!=null&&a.message?o=s.error.message:s!=null&&s.error&&(o=s.error)}catch{}throw new Error(o)}const i=await n.json();return i.data||i}async function Mk(){return kr("/fan-portal/profile/initialize",{method:"POST"})}async function Dk(e){return kr("/fan-portal/profile",{method:"PUT",body:JSON.stringify(e)})}async function Rk(e,t){if(!e)throw new Error("Artist ID is required to fetch chat messages");
1899const r=new URLSearchParams({artistId:e});return kr(`/fan-portal/chat/messages?${r.toString()}`)}async function $k(e,t){if(!e)throw new Error("Artist ID is required to post a chat message");if(!t||!t.trim())throw new Error("Message cannot be empty");return kr("/fan-portal/chat/messages",{method:"POST",body:JSON.stringify({artistId:e,body:t})})}async function Lk(e){return kr(`/fan-portal/${e}/quests`)}async function Fk(e,t){return kr(`/fan-portal/${e}/quests/${t}/complete`,{method:"POST"})}async function Uk(e){return kr(`/fan-portal/${e}/leaderboard`)}async function Bk(e){const t=await fetch(`${pt.apiBaseUrl}/fan-portal/verify-magic-link?token=${encodeURIComponent(e)}`,{method:"GET"});if(!t.ok){const r=await t.json().catch(()=>({error:"Invalid or expired magic link"}));throw new Error(r.error||"Invalid or expired magic link")}return await t.json()}const zk={getFanId:ou,setFanId:Ey,clearFanId:Iy,getFanToken:su},Tr=pt.apiBaseUrl,qn=new Map,Wk=5*60*1e3;async function Hk(e){const t=qn.get(e);if(t&&Date.now()-t.timestamp<Wk)return t.result;try{const r=await fetch(`${Tr}/public/artists/by-domain/${encodeURIComponent(e)}`);
1899if(r.status===429)return console.warn("Rate limited on domain lookup:",e),qn.set(e,{result:null,timestamp:Date.now()}),null;if(!r.ok)return qn.set(e,{result:null,timestamp:Date.now()}),null;const i=(await r.json()).data||null;return qn.set(e,{result:i,timestamp:Date.now()}),i}catch(r){return console.error("Failed to lookup artist by domain:",r),qn.set(e,{result:null,timestamp:Date.now()}),null}}async function gu(e){try{const t=await fetch(`${Tr}/public/artists/${encodeURIComponent(e)}/site`);return t.ok&&(await t.json()).data||null}catch(t){return console.error("Failed to fetch artist public site:",t),null}}async function Kk(e){try{const t=await fetch(`${Tr}/public/artists/${encodeURIComponent(e)}/fanpack-config`);return t.ok&&(await t.json()).data||null}catch(t){return console.error("Failed to fetch FanPack config:",t),null}}async function Vk(e){try{const t=await fetch(`${Tr}/public/link-in-bio/${encodeURIComponent(e)}`);if(!t.ok)return null;const n=(await t.json()).data||null;return n&&!n.links&&(n.links={}),n}catch(t){return console.error("Failed to fetch link-in-bio data:",t),null}}async function qk(e){const t=await gu(e);return t||null}async function Gk(e){var n,i;const t=await gu(e);return t?{...t,artistName:t.artist.name,releaseTitle:((n=t.latestRelease)==null?void 0:n.title)??null,releaseArtworkUrl:((i=t.latestRelease)==null?void 0:i.artworkUrl)??null,promoImageUrl:t.artist.headerImageUrl??null,streamingLinks:t.latestRelease?{spotify:t.latestRelease.spotifyUrl??null,appleMusic:t.latestRelease.appleMusicUrl??null,youtube:t.latestRelease.youtubeUrl??null,youtubeMusic:t.latestRelease.youtubeUrl??null,amazonMusic:t.latestRelease.amazonMusicUrl??null,pandora:t.latestRelease.pandoraUrl??null,deezer:t.latestRelease.deezerUrl??null,tidal:t.latestRelease.tidalUrl??null}:void 0}:null}async function Yk(e){try{const t=await fetch(`${Tr}/public/artists/${encodeURIComponent(e)}/vip-list`);return t.ok&&(await t.json()).data||null}catch(t){return console.error("Failed to fetch VIP list page data:",t),null}}async function Jk(e,t){try{const r=await fetch(`${Tr}/public/artists/${encodeURIComponent(e)}/vip-list/signup`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){const i=await r.json().catch(()=>({}));return{success:!1,message:i.message||i.error||"Failed to submit signup"}}return{success:!0,message:(await r.json()).message}}catch(r){return console.error("Failed to submit VIP list signup:",r),{success:!1,message:r instanceof Error?r.message:"Failed to submit signup"}}}async function Xk(e){try{const t=await fetch(`${Tr}/public/band-member-invites/${encodeURIComponent(e)}`);return t.ok&&(await t.json()).data||null}catch(t){return console.error("Failed to fetch band member invite:",t),null}}async function Zk(e,t){try{const r=await fetch(`${Tr}/public/band-member-invites/${encodeURIComponent(e)}/submit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){const i=await r.json().catch(()=>({}));return{success:!1,message:i.message||i.error||"Failed to submit questionnaire"}}return{success:!0,message:(await r.json()).message}}catch(r){return console.error("Failed to submit band member questionnaire:",r),{success:!1,message:r instanceof Error?r.message:"Failed to submit questionnaire"}}}async function Qk(){const e=await A("/me/accessible-artists"),t=je(e);return t&&typeof t=="object"?{globalRole:t.globalRole||"USER",accounts:Array.isArray(t.accounts)?t.accounts:[],artists:Array.isArray(t.artists)?t.artists:[]}:{globalRole:"USER",accounts:[],artists:[]}}async function rv(e){const t=e?`?accountId=${encodeURIComponent(e)}`:"",r=await A(`/account/settings${t}`);return je(r)}async function eT(e,t){const r=t!=null&&t.accountId?`?accountId=${encodeURIComponent(t.accountId)}`:"",n=await A(`/account/settings${r}`,{method:"PUT",body:JSON.stringify(e)});return je(n)}async function tT(e){const t=e?`?accountId=${encodeURIComponent(e)}`:"";return(await A(`/account/team${t}`)).data}async function rT(e){return A("/account/team/invite",{method:"POST",body:JSON.stringify(e)})}async function nT(e,t){return A(`/account/team/${e}`,{method:"PUT",body:JSON.stringify(t)})}async function iT(e){const t=await A("/account/team/resend-invite",{method:"POST",body:JSON.stringify({userId:e})});return je(t)}async function aT(e,t){return(await A(`/artists/${e}/social-planner/oauth/facebook/pages?accountId=${encodeURIComponent(t)}`)).pages??[]}async function oT(e){return(await A(`/artists/${e}/social-planner/accounts`)).accounts}
1899async function sT(e,t){const r=new URLSearchParams;t!=null&&t.status&&r.append("status",t.status),t!=null&&t.platform&&r.append("platform",t.platform),t!=null&&t.accountId&&r.append("accountId",t.accountId),t!=null&&t.startDate&&r.append("startDate",t.startDate),t!=null&&t.endDate&&r.append("endDate",t.endDate),t!=null&&t.limit&&r.append("limit",t.limit.toString()),t!=null&&t.skip&&r.append("skip",t.skip.toString());const n=r.toString(),i=`/artists/${e}/social-planner/posts${n?`?${n}`:""}`;return A(i)}async function cT(e,t){return(await A(`/artists/${e}/social-planner/posts`,{method:"POST",body:JSON.stringify(t)})).post}async function lT(e,t){await A(`/artists/${e}/social-planner/posts/${t}`,{method:"DELETE"})}async function uT(e,t){await A(`/artists/${e}/social-planner/accounts/${t}`,{method:"DELETE"})}async function dT(e,t,r){const n=new URLSearchParams;r!=null&&r.redirectUri&&n.append("redirect_uri",r.redirectUri),r!=null&&r.returnTo&&n.append("return_to",r.returnTo);const i=n.toString(),a=`/artists/${e}/social-planner/oauth/${t}/start${i?`?${i}`:""}`,o=await A(a);return je(o).oauthUrl}async function fT(e,t,r,n){await A(`/artists/${e}/social-planner/oauth/attach`,{method:"POST",body:JSON.stringify({accountId:t,platform:r,...n})})}const hT=["InstantLinkDrop","PreSaveNewSingle","NewMerchDrop","TourTickets","VipListSignup","GiveawayEntry"];async function pT(e){var r;const t=await A(`/artists/${e}/social-planner/comment-automations`);return((r=t==null?void 0:t.data)==null?void 0:r.automations)??[]}async function mT(e,t){const r=await A(`/artists/${e}/social-planner/comment-automations/${t}`);return(r==null?void 0:r.data)??null}async function gT(e,t){const r=await A(`/artists/${e}/social-planner/comment-automations`,{method:"POST",body:JSON.stringify(t)}),n=r;return n!=null&&n.data?n.data:r}async function yT(e,t,r){const n=await A(`/artists/${e}/social-planner/comment-automations/${t}`,{method:"PATCH",body:JSON.stringify(r)}),i=n;return i!=null&&i.data?i.data:n}async function vT(e,t){const r=await A(`/artists/${e}/social-planner/comment-automations/${t}/duplicate`,{method:"POST"}),n=r;return n!=null&&n.data?n.data:r}async function bT(e,t){await A(`/artists/${e}/social-planner/comment-automations/${t}/test-dm`,{method:"POST"})}async function nv(e){return(await A(`/artists/${e}/integrations/shippo`)).config}async function wT(e,t){return(await A(`/artists/${e}/integrations/shippo`,{method:"POST",body:JSON.stringify({apiKey:t})})).config}async function xT(e){return(await A(`/artists/${e}/integrations/shippo/test`,{method:"POST"})).connected}async function ST(e,t){return(await A(`/artists/${e}/orders/${t}/shipping-rates`)).rates}async function PT(e,t,r){return(await A(`/artists/${e}/orders/${t}/shipping-label`,{method:"POST",body:JSON.stringify({rateId:r})})).label}async function _T(e){const t=await nv(e);return(t==null?void 0:t.isConfigured)??!1}async function OT(e){return(await A(`/artists/${e}/integrations/stripe`)).data.config}async function AT(e){return(await A(`/artists/${e}/integrations/stripe/connect`)).data.url}async function ET(e){return(await A(`/artists/${e}/integrations/stripe/test`,{method:"POST"})).data.connected}async function IT(e,t){return(await A(`/artists/${e}/integrations/stripe/live-mode`,{method:"PATCH",body:JSON.stringify({liveMode:t}),headers:{"Content-Type":"application/json"}})).data.config}async function kT(e){await A(`/artists/${e}/integrations/stripe/disconnect`,{method:"POST"})}async function TT(e,t,r,n="usd"){const a=await fetch(`https://backend.fanflowy.com/artists/${e}/checkout/payment-intent`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({orderId:t,amountCents:r,currency:n})});if(!a.ok){const s=await a.json().catch(()=>({})),c=s==null?void 0:s.error,l=typeof c=="string"?c:(c==null?void 0:c.message)??(s==null?void 0:s.message)??"Failed to create payment intent";throw new Error(l)}return(await a.json()).data}async function CT(e,t){const n=await fetch(`https://backend.fanflowy.com/artists/${e}/checkout/confirm-payment-by-order`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({orderId:t})});if(!n.ok){const a=await n.json().catch(()=>({}
1899)),o=a==null?void 0:a.error,s=typeof o=="string"?o:(o==null?void 0:o.message)??"Failed to confirm payment";throw new Error(s)}return(await n.json()).data}async function NT(e,t){const n=await fetch(`https://backend.fanflowy.com/artists/${e}/checkout/confirm-payment`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paymentIntentId:t})});if(!n.ok){const a=await n.json().catch(()=>({})),o=a==null?void 0:a.error,s=typeof o=="string"?o:(o==null?void 0:o.message)??"Failed to confirm payment";throw new Error(s)}return(await n.json()).data}const o8=Object.freeze(Object.defineProperty({__proto__:null,COMMENT_AUTOMATION_TEMPLATE_TYPES:hT,addArtistTeamMember:Ly,attachSocialAccount:fT,authenticatedFetch:A,authenticatedFetchResponse:or,bulkDeleteFans:GE,claimHighLevelInstall:Pk,clearFanId:Iy,completeFanQuestForArtistSlug:Fk,confirmPayment:NT,confirmPaymentByOrderId:CT,connectHighLevelLocation:Ok,connectMetaOAuth:zy,connectShippoAccount:wT,createAdIntegration:QI,createAnnouncement:My,createArtist:VI,createArtistMission:UI,createCommentAutomation:gT,createEmailCampaign:EI,createFanPackOrder:mI,createLabelAccount:WI,createLeadAdCampaign:Vy,createOrder:OI,createPaymentIntent:TT,createProduct:ZE,createProductImage:cI,createRelease:UE,createShippingLabel:PT,createShow:pk,createSocialPost:cT,createTextBlast:DI,createTrackedCampaign:tk,createVariant:iI,createVenue:hk,deactivateTrackedCampaign:rk,deleteAccount:GI,deleteAdIntegration:nk,deleteAnnouncement:Dy,deleteArtist:qI,deleteCampaign:Xy,deleteEmailCampaign:kI,deleteFan:qE,deleteProduct:eI,deleteProductImage:uI,deleteSocialPost:lT,deleteTextBlast:$I,deleteVariant:oI,disconnectAdminMetaOAuth:ok,disconnectHighLevel:Ak,disconnectMetaOAuth:Wy,disconnectPrintful:SI,disconnectSocialAccount:uT,disconnectStripe:kT,duplicateCommentAutomation:vT,fanAuth:zk,fanAuthenticatedFetch:kr,fetchArtistPublicSite:gu,fetchBandMemberInvite:Xk,fetchLinkInBioData:Vk,fetchPublicFanPackConfig:Kk,fetchPublicProduct:PI,fetchReleasePageData:Gk,fetchSpotifyPageData:qk,fetchVipListPageData:Yk,getAccessibleArtists:Qk,getAccountSettings:rv,getAccountTeam:tT,getAdIntegrations:ZI,getAdPerformanceSummary:fu,getAdminAccountById:HI,getAdminAccounts:zI,getAdminAdAccounts:sk,getAdminArtists:KI,getAdminFeatureFlag:uk,getAdminFeatureFlags:lk,getAdminMetaOAuthStatus:ik,getArtist:Cy,getArtistAnnouncements:jy,getArtistDashboardSummary:lu,getArtistFans:HE,getArtistIntegrationSettings:Ry,getArtistMetrics:du,getArtistMetricsAvailableYears:uu,getArtistMissions:FI,getArtistReleases:FE,getArtistSite:vk,getArtistSummaryBySlug:Fa,getArtistTeam:$y,getBandMembers:Fy,getCheckoutQuote:_I,getCommentAutomation:mT,getCurrentUserMemberQuestionnaire:Uy,getDomainInstructions:wk,getExistingLeadForms:Qy,getFacebookPages:aT,getFanChatConversations:Tk,getFanChatMessages:Rk,getFanDetail:KE,getFanId:ou,getFanLeaderboardForArtistSlug:Uk,getFanPackConfig:dI,getFanQuestsForArtistSlug:Lk,getFanRegions:JE,getFanToken:su,getFormTemplate:Zy,getGrowthCampaign:Ky,getGrowthStatus:By,getHighLevelConversationMessages:Ck,getHighLevelIntegration:Sk,getHighLevelLocations:_k,getHighLevelTags:NI,getIntegrationCampaigns:ek,getMusicGenres:ev,getOnboardingStatus:cu,getOrders:hI,getPendingMemberQuestionnaire:Wo,getPrintfulConfig:bI,getPrintfulConnectUrl:wI,getProductImages:sI,getProductVariants:nI,getProducts:XE,getShippingRates:ST,getShippoConfig:nv,getShippoConnectionStatus:_T,getShowTargetingPreview:mk,getSocialAccounts:oT,getStoreSettings:gI,getStripeConfig:OT,getStripeConnectUrl:AT,getSuperadmins:ck,getToken:Oy,getValidToken:La,importFansCsv:YE,importOrdersCsv:kk,importShopifyOrdersCsv:jk,initializeFanProfile:Mk,initiateAdminMetaOAuth:ak,inviteAccountUser:rT,launchCampaign:qy,launchRelease:zE,launchShow:gk,listCommentAutomations:pT,listEmailCampaigns:AI,listGrowthCampaigns:Hy,listSocialPosts:sT,listTextBlasts:MI,lookupArtistByDomain:Hk,pauseCampaign:Gy,postFanChatMessage:$k,previewEmailCampaign:TI,processReleasesForToday:YI,reassignArtist:XI,reorderProducts:tI,requestPasswordReset:$E,resendTeamInvite:iT,resetPassword:LE,searchMusicGenres:tv,searchVenues:fk,sendCommentAutomationTestDm:bT,sendEmailCampaign:CI,sendHighLevelConversationMessage:Nk,sendTextBlast:LI,setFanId:Ey,startOAuthFlow:dT,submitBandMemberQuestionnaire:Zk,submitMemberQuestionnaire:hu,submitVipListSignup:Jk,syncBandsintownEvents:yk,syncHighLevelContacts:Ek,syncPrintfulProducts:xI,syncSettingsFromHighLevel:Ik,testShippoConnection:xT,testStripeConnection:ET,toggleProductVisibility:rI,unwrapData:je,updateAccountSettings:eT,updateAccountUser:nT,updateAdminFeatureFlag:dk,updateArtistMission:BI,updateArtistSettings:Ny,updateCampaign:Yy,updateCampaignConfig:Jy,updateCommentAutomation:yT,updateCustomDomain:bk,updateEmailCampaign:II,updateFan:VE,updateFanPackConfig:fI,updateFanProfile:Dk,updateLatestReleaseFromUrl:JI,updateOrder:pI,updateProduct:QE,updateProductImage:lI,updateRelease:BE,updateStoreSettings:yI,updateStripeLiveMode:IT,updateTextBlast:RI,updateV
vendor: 5,787 bytes, lines 1899-1969
1899ariant:aI,uploadBrandAsset:pu,uploadEmailAsset:jI,uploadImage:vI,uploadReleaseCoverArt:WE,verifyDomainStatus:xk,verifyMagicLink:Bk},Symbol.toStringTag,{value:"Module"})),yu={SUPERADMIN:"SUPERADMIN"},Sn={OWNER:"ACCOUNT_OWNER",STAFF:"ACCOUNT_STAFF"};function _t(e){return e===yu.SUPERADMIN||e==="SUPERADMIN"}function jT(e){return e===yu.SUPERADMIN||e===Sn.OWNER}function MT(e,t){return e===Sn.OWNER&&t==="LABEL"}function s8(e,t){return e===Sn.OWNER&&t==="INDIVIDUAL"}function c8(e,t){return _t(e)||MT(e,t)}function l8(e){return _t(e)||e===Sn.OWNER}function u8(e){if(!e)return"Unknown";switch(e){case yu.SUPERADMIN:return"Global";case Sn.OWNER:return"Owner";case Sn.STAFF:return"Staff";default:return e}}const iv="/assets/fanflowy-logo-mark-DKwkcnX0.svg";/**
1900 * @license lucide-react v0.562.0 - ISC
1901 *
1902 * This source code is licensed under the ISC license.
1903 * See the LICENSE file in the root directory of this source tree.
1904 */const DT=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),RT=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),th=e=>{const t=RT(e);return t.charAt(0).toUpperCase()+t.slice(1)},av=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),$T=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
1905 * @license lucide-react v0.562.0 - ISC
1906 *
1907 * This source code is licensed under the ISC license.
1908 * See the LICENSE file in the root directory of this source tree.
1909 */var LT={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"};/**
1910 * @license lucide-react v0.562.0 - ISC
1911 *
1912 * This source code is licensed under the ISC license.
1913 * See the LICENSE file in the root directory of this source tree.
1914 */const FT=m.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:o,...s},c)=>m.createElement("svg",{ref:c,...LT,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:av("lucide",i),...!a&&!$T(s)&&{"aria-hidden":"true"},...s},[...o.map(([l,u])=>m.createElement(l,u)),...Array.isArray(a)?a:[a]]));/**
1915 * @license lucide-react v0.562.0 - ISC
1916 *
1917 * This source code is licensed under the ISC license.
1918 * See the LICENSE file in the root directory of this source tree.
1919 */const X=(e,t)=>{const r=m.forwardRef(({className:n,...i},a)=>m.createElement(FT,{ref:a,iconNode:t,className:av(`lucide-${DT(th(e))}`,`lucide-${e}`,n),...i}));return r.displayName=th(e),r};/**
1920 * @license lucide-react v0.562.0 - ISC
1921 *
1922 * This source code is licensed under the ISC license.
1923 * See the LICENSE file in the root directory of this source tree.
1924 */const UT=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],d8=X("bold",UT);/**
1925 * @license lucide-react v0.562.0 - ISC
1926 *
1927 * This source code is licensed under the ISC license.
1928 * See the LICENSE file in the root directory of this source tree.
1929 */const BT=[["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"}]],f8=X("calendar",BT);/**
1930 * @license lucide-react v0.562.0 - ISC
1931 *
1932 * This source code is licensed under the ISC license.
1933 * See the LICENSE file in the root directory of this source tree.
1934 */const zT=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],WT=X("check",zT);/**
1935 * @license lucide-react v0.562.0 - ISC
1936 *
1937 * This source code is licensed under the ISC license.
1938 * See the LICENSE file in the root directory of this source tree.
1939 */const HT=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],h8=X("chevron-down",HT);/**
1940 * @license lucide-react v0.562.0 - ISC
1941 *
1942 * This source code is licensed under the ISC license.
1943 * See the LICENSE file in the root directory of this source tree.
1944 */const KT=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],p8=X("chevron-left",KT);/**
1945 * @license lucide-react v0.562.0 - ISC
1946 *
1947 * This source code is licensed under the ISC license.
1948 * See the LICENSE file in the root directory of this source tree.
1949 */const VT=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],m8=X("chevron-right",VT);/**
1950 * @license lucide-react v0.562.0 - ISC
1951 *
1952 * This source code is licensed under the ISC license.
1953 * See the LICENSE file in the root directory of this source tree.
1954 */const qT=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],g8=X("chevron-up",qT);/**
1955 * @license lucide-react v0.562.0 - ISC
1956 *
1957 * This source code is licensed under the ISC license.
1958 * See the LICENSE file in the root directory of this source tree.
1959 */const GT=[["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"}]],y8=X("eye-off",GT);/**
1960 * @license lucide-react v0.562.0 - ISC
1961 *
1962 * This source code is licensed under the ISC license.
1963 * See the LICENSE file in the root directory of this source tree.
1964 */const YT=[["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"}]],v8=X("eye",YT);/**
1965 * @license lucide-react v0.562.0 - ISC
1966 *
1967 * This source code is licensed under the ISC license.
1968 * See the LICENSE file in the root directory of this source tree.
1969 */const JT=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],b8=X("heart",JT);
1969/**
1970 * @license lucide-react v0.562.0 - ISC
1971 *
1972 * This source code is licensed under the ISC license.
1973 * See the LICENSE file in the root directory of this source tree.
1974 */const XT=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],w8=X("italic",XT);/**
1975 * @license lucide-react v0.562.0 - ISC
1976 *
1977 * This source code is licensed under the ISC license.
1978 * See the LICENSE file in the root directory of this source tree.
1979 */const ZT=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],x8=X("link",ZT);/**
1980 * @license lucide-react v0.562.0 - ISC
1981 *
1982 * This source code is licensed under the ISC license.
1983 * See the LICENSE file in the root directory of this source tree.
1984 */const QT=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],S8=X("list",QT);/**
1985 * @license lucide-react v0.562.0 - ISC
1986 *
1987 * This source code is licensed under the ISC license.
1988 * See the LICENSE file in the root directory of this source tree.
1989 */const eC=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],rh=X("map-pin",eC);/**
1990 * @license lucide-react v0.562.0 - ISC
1991 *
1992 * This source code is licensed under the ISC license.
1993 * See the LICENSE file in the root directory of this source tree.
1994 */const tC=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],P8=X("message-circle",tC);/**
1995 * @license lucide-react v0.562.0 - ISC
1996 *
1997 * This source code is licensed under the ISC license.
1998 * See the LICENSE file in the root directory of this source tree.
1999 */const rC=[["path",{d:"M5 12h14",key:"1ays0h"}]],nC=X("minus",rC);/**
2000 * @license lucide-react v0.562.0 - ISC
2001 *
2002 * This source code is licensed under the ISC license.
2003 * See the LICENSE file in the root directory of this source tree.
2004 */const iC=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],_8=X("play",iC);/**
2005 * @license lucide-react v0.562.0 - ISC
2006 *
2007 * This source code is licensed under the ISC license.
2008 * See the LICENSE file in the root directory of this source tree.
2009 */const aC=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],O8=X("plus",aC);/**
2010 * @license lucide-react v0.562.0 - ISC
2011 *
2012 * This source code is licensed under the ISC license.
2013 * See the LICENSE file in the root directory of this source tree.
2014 */const oC=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],A8=X("search",oC);/**
2015 * @license lucide-react v0.562.0 - ISC
2016 *
2017 * This source code is licensed under the ISC license.
2018 * See the LICENSE file in the root directory of this source tree.
2019 */const sC=[["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"}]],E8=X("send",sC);/**
2020 * @license lucide-react v0.562.0 - ISC
2021 *
2022 * This source code is licensed under the ISC license.
2023 * See the LICENSE file in the root directory of this source tree.
2024 */const cC=[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",key:"o988cm"}]],I8=X("shopping-bag",cC);/**
2025 * @license lucide-react v0.562.0 - ISC
2026 *
2027 * This source code is licensed under the ISC license.
2028 * See the LICENSE file in the root directory of this source tree.
2029 */const lC=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 
20291.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],k8=X("sparkles",lC);/**
2030 * @license lucide-react v0.562.0 - ISC
2031 *
2032 * This source code is licensed under the ISC license.
2033 * See the LICENSE file in the root directory of this source tree.
2034 */const uC=[["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}],["path",{d:"M7 10v12",key:"1qc93n"}]],T8=X("thumbs-up",uC);/**
2035 * @license lucide-react v0.562.0 - ISC
2036 *
2037 * This source code is licensed under the ISC license.
2038 * See the LICENSE file in the root directory of this source tree.
2039 */const dC=[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]],fC=X("trending-down",dC);/**
2040 * @license lucide-react v0.562.0 - ISC
2041 *
2042 * This source code is licensed under the ISC license.
2043 * See the LICENSE file in the root directory of this source tree.
2044 */const hC=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],pC=X("trending-up",hC);/**
2045 * @license lucide-react v0.562.0 - ISC
2046 *
2047 * This source code is licensed under the ISC license.
2048 * See the LICENSE file in the root directory of this source tree.
2049 */const mC=[["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"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],C8=X("user-plus",mC);/**
2050 * @license lucide-react v0.562.0 - ISC
2051 *
2052 * This source code is licensed under the ISC license.
2053 * See the LICENSE file in the root directory of this source tree.
2054 */const gC=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],N8=X("users",gC);/**
2055 * @license lucide-react v0.562.0 - ISC
2056 *
2057 * This source code is licensed under the ISC license.
2058 * See the LICENSE file in the root directory of this source tree.
2059 */const yC=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],vC=X("x",yC),bC=m.lazy(()=>RE(()=>import("./ArtistOnboardingWizard-SiasiV9i.js"),__vite__mapDeps([0,1,2,3])));function wC({isOpen:e,onComplete:t,completedSteps:r,totalSteps:n}){const[i,a]=m.useState(1),[o,s]=m.useState("BAND"),[c,l]=m.useState({});if(m.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),!e)return null;const u=Object.values(c).filter(Boolean).length,d=n>0?Math.round(u/n*100):0,f=[{id:1,title:"Identity",shortTitle:"Identity"},{id:2,title:"Merch Store",shortTitle:"Merch Store"},{id:3,title:"Social",shortTitle:"Social"},{id:4,title:"Latest Release",shortTitle:"Latest Release"},{id:5,title:"Highlighted Releases",shortTitle:"Highlighted"},{id:6,title:"Welcome",shortTitle:"Welcome"},{id:7,title:"Content",shortTitle:"Content"}],h=o==="BAND"?[...f,{id:8,title:"Targeting",shortTitle:"Targeting"},{id:9,title:"Members",shortTitle:"Members"}]:[...f,{id:8,title:"Targeting",shortTitle:"Targeting"}];return p.jsx("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center bg-black/90 backdrop-blur-sm",children:p.jsxs("div",{className:"relative w-full h-full max-w-6xl max-h-[90vh] bg-[#0a0a0a] border border-white/10 rounded-2xl overflow-hidden flex flex-col",children:[p.jsxs("div",{className:"px-6 py-4 border-b border-white/10 bg-[#050505] relative",children:[p.jsx("div",{className:"absolute top-4 right-6",children:p.jsx("img",{src:iv,alt:"FanFlowy",className:"h-6 w-auto opacity-80 hover:opacity-100 transition-opacity"})}),p.jsxs("div",{className:"mb-4",children:[p.jsx("h1",{className:"text-3xl font-bold mb-2 text-white",children:"Onboarding"}),p.jsxs("p",{className:"text-gray-400 text-sm",children:["Complete all ",n," steps to set up your artist profile"]})]}),p.jsxs("div",{className:"bg-[#161616] rounded-2xl border border-white/5 p-5 mb-4",children:[p.jsxs("div",{className:"flex items-center justify-between mb-3",children:[p.jsx("p",{className:"text-sm font-medium text-white",children:"Overall Progress"}),p.jsxs("p",{className:"text-sm text-gray-400",children:["Step ",i," of ",n]})]}),p.jsx("div",{className:"w-full bg-white/5 rounded-full h-3 overflow-hidden",children:p.jsx("div",{className:"bg-gradient-to-r from-[#6d60ff] to-[#de33ae] h-3 transition-all duration-300",style:{width:`${d}%`}})})]}),p.jsx("div",{className:"bg-[#161616] rounded-2xl border border-white/5 p-4",children:p.jsx("div",{className:"md:overflow-visible overflow-x-auto -mx-4 md:mx-0",children:p.jsx("div",{className:"inline-flex md:flex md:flex-wrap items-center gap-2 px-4 md:px-0",children:h.map(g=>{const v=c[g.id]===!0,y=i===g.id;return p.jsxs("button",{type:"button",onClick:()=>{a(g.id)},className:`flex items-center gap-1.5 px-4 py-2 rounded-full text-sm font-medium border transition-colors whitespace-nowrap ${y?"bg-[#6d60ff] border-[#6d60ff] text-white shadow-lg":v?"bg-[#181818] border-[#6d60ff] text-gray-100 hover:bg-white/10":"bg-[#181818] border-white/10 text-gray-300 hover:border-white/30"}`,children:[v&&p.jsx(WT,{className:`h-4 w-4 flex-shrink-0 ${y?"text-white":"text-[#6d60ff]"}`}),p.jsx("span",{children:g.shortTitle})]},g.id)})})})})]}),p.jsx("div",{className:"flex-1 overflow-y-auto",children:p.jsx(m.Suspense,{fallback:p.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:p.jsxs("div",{className:"text-center",children:[p.jsx("div",{className:"inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-purple-500 border-r-transparent"}),p.jsx("p",{className:"mt-2 text-sm text-gray-400",children:"Loading onboarding..."})]})}),children:p.jsx(bC,{onComplete:t,isModal:!0,externalCurrentStep:i,onStepChange:a,onProjectTypeChange:s,onCompletedStepsChange:l})})})]})})}function xC({label:e,artistId:t,assetType:r,value:n,onChange:i}){const[a,o]=m.useState(!1),[s,c]=m.useState(n||null);m.useEffect(()=>{c(n||null)},[n]);const l=async u=>{var f;const d=(f=u.target.files)==null?void 0:f[0];if(!(!d||!t)){if(!d.type.startsWith("image/")){xr.error("Please upload an image file");return}if(d.size>10*1024*1024){xr.error("File size must be less than 10MB");return}o(!0);try{const h=await pu(t,r,d);i(h.url),c(h.url),xr.success("Image uploaded successfully")}catch(h){xr.error(h.message||"Failed to upload image")}finally{o(!1)}}};return p.jsxs("div",{children:[p.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:e}),p.jsxs("div",{className:"space-y-3",children:[s&&p.jsx("div",{className:"relative w-full h-48 rounded-lg overflow-hidden border border-white/10",children:p.jsx("img",{src:s,alt:e,className:"w-full h-full object-cover"})}),p.jsx("input",{type:"file",accept:"image/*",onChange:l,disabled:a,className:"w-full text-sm text-gray-400 file:mr-4 file:py-2 file:px-4 file:rounded-lg file:border-0 file:text-sm file:font-semibold file:bg-[#6d60ff] file:text-white hover:file:bg-[#5d50ef] file:cursor-pointer disabled:opacity-50"}),a&&p.jsx("p",{className:"text-sm text-gray-400",children:"Uploading..."})]})]})}const SC=["Singer","Guitarist","Bassist","Drummer","Pianist","Keyboardist","Synth Player","DJ","Violinist","Saxophonist","Trumpeter","Trombonist","Flutist","Clarinet
2059ist","Percussionist","Other"];function PC({isOpen:e,onComplete:t}){const{artistId:r}=sv(),[n,i]=m.useState(!0),[a,o]=m.useState(!1),[s,c]=m.useState(null),[l,u]=m.useState({});m.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),m.useEffect(()=>{e&&r?(console.log("[MemberQuestionnaireModal] Modal opened, fetching pending questionnaire"),d()):e||(console.log("[MemberQuestionnaireModal] Modal closed, resetting state"),c(null),u({}),i(!0))},[e,r]);const d=async()=>{if(r)try{i(!0),console.log("[MemberQuestionnaireModal] Fetching pending questionnaire",{artistId:r});const g=await Wo(r);console.log("[MemberQuestionnaireModal] Fetch result:",g),g.hasPending&&g.inviteId?(console.log("[MemberQuestionnaireModal] Setting inviteId:",g.inviteId),c(g.inviteId)):(console.log("[MemberQuestionnaireModal] No pending questionnaire, closing modal"),t())}catch(g){console.error("[MemberQuestionnaireModal] Error fetching pending questionnaire:",g),xr.error(g.message||"Failed to check pending questionnaire"),t()}finally{i(!1)}},f=(g,v)=>{u({...l,[g]:v})},h=async()=>{if(!(!r||!s)){if(!l.name||!l.instrument){xr.error("Please fill out your name and instrument");return}o(!0);try{console.log("[MemberQuestionnaireModal] Submitting questionnaire",{artistId:r,inviteId:s,responses:l}),await hu(r,{inviteId:s,responses:l}),console.log("[MemberQuestionnaireModal] Submission successful"),xr.success("Questionnaire submitted successfully!"),setTimeout(()=>{console.log("[MemberQuestionnaireModal] Calling onComplete after successful submission"),t()},500)}catch(g){console.error("[MemberQuestionnaireModal] Submission failed:",g),xr.error(g.message||"Failed to submit questionnaire"),o(!1)}}};return e?n?p.jsx("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center bg-black/90 backdrop-blur-sm",children:p.jsxs("div",{className:"text-center",children:[p.jsx("div",{className:"inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-purple-500 border-r-transparent"}),p.jsx("p",{className:"mt-2 text-sm text-gray-400",children:"Loading..."})]})}):s?p.jsx("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center bg-black/90 backdrop-blur-sm",children:p.jsxs("div",{className:"relative w-full h-full max-w-4xl max-h-[90vh] bg-[#0a0a0a] border border-white/10 rounded-2xl overflow-hidden flex flex-col",children:[p.jsxs("div",{className:"px-6 py-4 border-b border-white/10 bg-[#050505]",children:[p.jsx("div",{className:"flex items-center justify-between mb-3",children:p.jsx("h2",{className:"text-xl font-bold text-white",children:"Complete Your Member Profile"})}),p.jsx("p",{className:"text-sm text-gray-400",children:"Please fill out your information to continue"})]}),p.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:p.jsxs("div",{className:"space-y-4 max-w-2xl mx-auto",children:[p.jsxs("div",{children:[p.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:"Your Name *"}),p.jsx("input",{type:"text",value:l.name||"",onChange:g=>f("name",g.target.value),placeholder:"Enter your name",className:"w-full px-3 py-2.5 bg-[#0a0a0a] border border-white/10 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-[#6d60ff] transition-all"})]}),p.jsxs("div",{children:[p.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:"What instrument do you play? *"}),p.jsxs("select",{value:l.instrument||"",onChange:g=>f("instrument",g.target.value),className:"w-full px-3 py-2.5 bg-[#0a0a0a] border border-white/10 rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-[#6d60ff] transition-all",children:[p.jsx("option",{value:"",children:"Select an instrument..."}),SC.map(g=>p.jsx("option",{value:g,children:g},g))]})]}),p.jsxs("div",{children:[p.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:"Upload Your Promo Photo"}),p.jsx(xC,{label:"",artistId:r,assetType:"band_promo_photo_1",value:l.promoPhotoUrl,onChange:g=>f("promoPhotoUrl",g)})]}),p.jsxs("div",{children:[p.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:"Where were you born?"}),p.jsx("input",{type:"text",value:l.birthLocation||"",onChange:g=>f("birthLocation",g.target.value),placeholder:"Enter your birth location",className:"w-full px-3 py-2.5 bg-[#0a0a0a] border border-white/10 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-[#6d60ff] transition-all"})]}),p.jsxs("div",{children:[p.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:"Where do you live now?"}),p.jsx("input",{type:"text",value:l.residence||"",onChange:g=>f("residence",g.target.value),placeholder:"Enter your current residence",className:"w-full px-3 py-2.5 bg-[#0a0a0a] border border-white/10 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-[#6d60ff] transition-all"})]}),p.jsxs("div",{children:[p.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:"What do you like to do for fun outside of the band?"}),p.jsx("textarea",{value:l.hobbies||"",onChange:g=>f("hobbies",g.target.value),placeholder:"Tell us about your hobbies...",rows:4,className:"w-full px-3 py-2.5 bg-[#0a0a0a] border border-white/10 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-[#6d60ff] transition-all resize-none"})]}),p.jsxs("div",{children:[p.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:"What was your first show ever like?"}),p.jsx("textarea",{value:l.firstShow||"",onChange:g=>f("firstShow",g.target.value),placeholder:"Describe your first show experience...",rows:4,className:"w-full px-3 py-2.5 bg-[#0a0a0a] border border-white/10 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-[#6d60ff] transition-all resize-none"})]}),p.jsxs("div",{children:[p.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:"What inspired you to start playing music?"}),p.jsx("textarea",{value:l.inspiration||"",onChange:g=>f("inspiration",g.target.value),placeholder:"Share what inspired you...",rows:4,className:"w-full px-3 py-2.5 bg-[#0a0a0a] border border-white/10 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-[#6d60ff] transition-all resize-none"})]}),p.jsxs("div",{children:[p.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:"How did you become part of this band?"}),p.jsx("textarea",{value:l.apartOf||"",onChange:g=>f("apartOf",g.target.value),placeholder:"Tell us how you joined...",rows:4,className:"w-full px-3 py-2.5 bg-[#0a0a0a] border border-white/10 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-[#6d60ff] transition-all resize-none"})]}),p.jsxs("div",{children:[p.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:"What was your first band that you performed in like?"}),p.jsx("textarea",{value:l.firstBand||"",onChange:g=>f("firstBand",g.target.value),placeholder:"Describe your first band experience...",rows:4,className:"w-full px-3 py-2.5 bg-[#0a0a0a] border border-white/10 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-[#6d60ff] transition-all resize-none"})]}),p.jsxs("div",{children:[p.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:"What are some of your favorite artists and/or songs you're listening to now?"}),p.jsx("textarea",{value:l.favorites||"",onChange:g=>f("favorites",g.target.value),placeholder:"Share your current favorites...",rows:4,className:"w-full px-3 py-2.5 bg-[#0a0a0a] border border-white/10 rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-[#6d60ff] transition-all resize-none"})]})]})}),p.jsx("div",{className:"px-6 py-4 border-t border-white/10 bg-[#050505]",children:p.jsx("div",{className:"flex justify-end",children:p.jsx("button",{onClick:h,disabled:a||!l.name||!l.instrument,className:"px-6 py-2.5 bg-[#6d60ff] text-white rounded-lg font-medium hover:bg-[#5d50ef] transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:a?"Submitting...":"Submit & Continue"})})})]})}):null:null}const aa={fanAds:!0,community:!0,merchandise:!0,socialPlanner:!0};function _C(e){const{accountId:t,userRole:r,userGlobalRole:n}=e,i=m.useMemo(()=>_t(r)||_t(n),[r,n]),[a,o]=m.useState(aa),[s,c]=m.useState(!1);return m.useEffect(()=>{if(i){o(aa),c(!1);return}if(!t){o(aa),c(!1);return}let l=!1;return c(!0),(async()=>{try{const u=await rv(t);if(l)return;o({fanAds:u.featureFanAdsEnabled??!0,community:u.featureCommunityEnabled??!0,merchandise:u.featureMerchandiseEnabled??!0,socialPlanner:u.featureSocialPlannerEnabled??!0})}catch{l||o(aa)}finally{l||c(!1)}})(),()=>{l=!0}},[t,i]),{flags:a,isLoading:s}}const ec=[{key:"dashboard",label:"FanStats",path:"dashboard",icon:"📊"},{key:"fans",label:"FanList",path:"fans",icon:"👥"},{key:"fan-chat",label:"FanChat",path:"fan-chat",icon:"💬"},{key:"pages",label:"FanTools",path:"pages",icon:"🧰"},{key:"email-blasts",label:"FanBlasts",path:"email-blasts",icon:"📣"},{key:"growth",label:"FanAds",path:"growth",icon:"📈"},{key:"merchandise",label:"FanMerch",path:"merchandise",icon:"🛍️"},{key:"community",label:"FanClub",path:"community",icon:"🗣️"},{key:"social-planner",label:"SocialFlow",path:"social-planner",icon:"🗓️"},{key:"launch",label:"LaunchFlows",path:"launch",icon:"🚀"}],OC=[{key:"artist-settings",label:"Artist Settings",path:"artist-settings",icon:"⚙️"},{key:"settings",label:"Admin",path:"settings",icon:"🔧"}],ov=m.createContext(null);function sv(){const e=m.useContext(ov);
2059if(!e)throw new Error("useArtist must be used within ArtistLayout");return e}function j8(){var T,C,R;const{artistSlug:e}=K1(),{user:t,logout:r}=jE(),n=V1(),[i,a]=m.useState(null),[o,s]=m.useState(!0),[c,l]=m.useState(null),[u,d]=m.useState(!1),f=jT(t==null?void 0:t.role),h=_t(t==null?void 0:t.role)||_t(t==null?void 0:t.globalRole),{flags:g,isLoading:v}=_C({accountId:(i==null?void 0:i.artist.account.id)||null,userRole:t==null?void 0:t.role,userGlobalRole:t==null?void 0:t.globalRole}),y=m.useMemo(()=>h?ec:!i||v?ec.filter(j=>{switch(j.key){case"growth":case"social-planner":case"merchandise":case"community":case"fan-chat":return!1;default:return!0}}):ec.filter(j=>{switch(j.key){case"growth":return g.fanAds;case"social-planner":return g.socialPlanner;case"merchandise":return g.merchandise;case"community":case"fan-chat":return g.community;default:return!0}}),[g,v,i,h]);m.useEffect(()=>{if(!e)return;(async()=>{try{s(!0),l(null);const $=await Fa(e);a($)}catch($){console.error("Failed to fetch artist info:",$),l($ instanceof Error?$.message:"Failed to load artist")}finally{s(!1)}})()},[e]);const b=m.useMemo(()=>{if(h||!e||!i||v)return null;const j=n.pathname.split("/").filter(Boolean),$=j[0],W=j[1]||"";return $!==e||!(W==="growth"&&!g.fanAds||W==="social-planner"&&!g.socialPlanner||W==="merchandise"&&!g.merchandise||(W==="community"||W==="fan-chat")&&!g.community)?null:`/${e}/dashboard`},[e,g.community,g.fanAds,g.merchandise,g.socialPlanner,v,n.pathname,i,h]),[S,w]=m.useState(!1),[_,x]=m.useState(!1),[O,P]=m.useState(!1);m.useEffect(()=>{var $;if(!(($=i==null?void 0:i.artist)!=null&&$.id)||o)return;(async()=>{try{(await Wo(i.artist.id)).hasPending?(P(!0),x(!0)):(P(!1),x(!1))}catch(W){console.error("[MemberQuestionnaire] Failed to check pending questionnaire",W)}})()},[(T=i==null?void 0:i.artist)==null?void 0:T.id,o]),m.useEffect(()=>{if(!(i!=null&&i.onboarding)||o||O)return;if(_t(t==null?void 0:t.role)||_t(t==null?void 0:t.globalRole)){w(!1);return}const{shouldShowOnboarding:j,completedSteps:$,totalSteps:W,completed:z}=i.onboarding,K=(t==null?void 0:t.role)==="ACCOUNT_OWNER",F=!z&&$<W;w(!!(j||K&&F))},[i,o,O,t==null?void 0:t.role,t==null?void 0:t.globalRole]);const k=async()=>{w(!1),e&&window.location.reload()},I=async()=>{if(x(!1),P(!1),e)try{const j=await Fa(e);a(j)}catch(j){console.error("[MemberQuestionnaire] Failed to refetch summary:",j),window.location.reload()}};if(c)return p.jsx("div",{className:"min-h-screen bg-black text-gray-100 flex items-center justify-center",children:p.jsx("div",{className:"max-w-md",children:p.jsxs("div",{className:"bg-[#161616] border border-red-500/30 rounded-2xl p-6",children:[p.jsx("p",{className:"text-red-300 mb-4",children:c}),p.jsxs("div",{className:"flex gap-3",children:[e&&p.jsx(na,{to:`/${e}/dashboard`,className:"inline-block px-4 py-2 bg-[#6d60ff] text-white rounded-lg hover:bg-[#5d50ef] transition-colors text-sm font-medium",children:"← Back to Dashboard"}),!e&&p.jsx(na,{to:"/app",className:"inline-block px-4 py-2 bg-[#6d60ff] text-white rounded-lg hover:bg-[#5d50ef] transition-colors text-sm font-medium",children:"← Back to Account Dashboard"})]})]})})});if(b)return p.jsx(q1,{to:b,replace:!0});const D={artistId:(i==null?void 0:i.artist.id)||"",artistSlug:(i==null?void 0:i.artist.slug)||e||"",summary:i||null};return p.jsx(ov.Provider,{value:D,children:p.jsxs("div",{className:"flex min-h-screen bg-[#0a0a0a] text-gray-100",children:[u&&p.jsx("div",{className:"fixed inset-0 bg-black/50 z-40 md:hidden",onClick:()=>d(!1)}),p.jsxs("aside",{className:`
2060          fixed md:sticky top-0 h-screen z-50
2061          w-64 border-r border-white/5 bg-[#050505]
2062          flex flex-col
2063          transform transition-transform duration-300 ease-in-out
2064          ${u?"translate-x-0":"-translate-x-full"}
2065          md:translate-x-0
2066        `,children:[p.jsxs("div",{className:"px-6 py-5 border-b border-white/5",children:[p.jsx("div",{className:"py-4",children:p.jsxs(na,{to:"/",className:"flex items-center gap-2",children:[p.jsx("img",{src:iv,alt:"FanFlowy",className:"h-6 w-auto md:h-7"}),p.jsx("span",{className:"sr-only",children:"FanFlowy"})]})}),o?p.jsxs("div",{className:"animate-pulse",children:[p.jsx("div",{className:"h-4 bg-white/10 rounded w-32 mb-2"}),p.jsx("div",{className:"h-3 bg-white/5 rounded w-24"})]}):i?p.jsxs("div",{children:[p.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[p.jsx("h2",{className:"text-lg font-bold text-white",children:i.artist.name}),i.artist.account.type==="LABEL"&&p.jsx("span",{className:"px-2 py-0.5 text-xs font-medium rounded bg-blue-500/20 text-blue-300",children:i.artist.account.name})]}),p.jsxs("p",{className:"text-sm text-gray-500",children:["/",i.artist.slug]})]}):null]}),p.jsxs("nav",{className:"flex-1 px-4 py-6 flex flex-col justify-between overflow-y-auto",children:[p.jsx("div",{className:"space-y-1",children:y.map(j=>p.jsxs(uf,{to:j.path,end:j.path==="",onClick:()=>d(!1),className:({isActive:$})=>`flex items-center gap-3 px-4 py-2.5 rounded-lg text-sm font-medium transition-colors ${$?"bg-[#161616] text-white border-l-2 border-[#6d60ff] pl-[
206614px]":"text-gray-400 hover:bg-[#161616] hover:text-gray-200"}`,children:[p.jsx("span",{className:"text-base",children:j.icon}),p.jsx("span",{children:j.label})]},j.key))}),p.jsx("div",{className:"space-y-1 pt-4 border-t border-white/5",children:OC.filter(j=>j.key==="settings"?_t(t==null?void 0:t.role)||_t(t==null?void 0:t.globalRole):!0).map(j=>p.jsxs(uf,{to:j.path,end:j.path==="",onClick:()=>d(!1),className:({isActive:$})=>`flex items-center gap-3 px-4 py-2.5 rounded-lg text-sm font-medium transition-colors ${$?"bg-[#161616] text-white border-l-2 border-[#6d60ff] pl-[14px]":"text-gray-400 hover:bg-[#161616] hover:text-gray-200"}`,children:[p.jsx("span",{className:"text-base",children:j.icon}),p.jsx("span",{children:j.label})]},j.key))})]}),f&&p.jsx("div",{className:"px-4 py-4 border-t border-white/5",children:p.jsxs(na,{to:"/app",className:"flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg text-gray-400 hover:bg-[#161616] hover:text-gray-200 transition-colors",children:[p.jsx("span",{children:"←"}),p.jsx("span",{children:"Account Dashboard"})]})}),p.jsxs("div",{className:`px-4 py-4 ${f?"":"border-t border-white/5"}`,children:[p.jsxs("div",{className:"mb-3 px-4",children:[p.jsx("p",{className:"text-xs text-gray-500",children:"Logged in as:"}),p.jsx("p",{className:"text-sm font-medium text-gray-300 truncate",children:t==null?void 0:t.email})]}),p.jsx("button",{onClick:r,className:"w-full px-4 py-2 text-sm font-medium rounded-lg bg-[#161616] hover:bg-white/5 transition-colors border border-white/10 text-gray-300 hover:text-white",children:"Sign Out"})]})]}),p.jsxs("main",{className:"flex-1 bg-[#0a0a0a] w-full md:w-auto flex flex-col",children:[p.jsx("div",{className:"border-b border-white/5 bg-black/30 px-4 sm:px-6 lg:px-8 py-3 sm:py-4 flex-shrink-0",children:p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("button",{onClick:()=>d(!u),className:"md:hidden p-2 text-gray-400 hover:text-white transition-colors","aria-label":"Toggle menu",children:p.jsx("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),o?p.jsx("div",{className:"h-6 w-48 bg-white/5 rounded animate-pulse"}):i?p.jsxs("div",{className:"flex items-center gap-2 sm:gap-3",children:[p.jsx("h1",{className:"text-base sm:text-xl font-semibold text-white",children:i.artist.name}),i.artist.account.type==="LABEL"&&p.jsx("span",{className:"px-2 py-0.5 text-xs font-medium rounded bg-blue-500/20 text-blue-300",children:i.artist.account.name}),p.jsx("span",{className:"text-xs sm:text-sm text-gray-500 hidden sm:inline",children:"Workspace"})]}):null,p.jsx("div",{className:"w-6 md:hidden"})]})}),p.jsx("div",{className:"flex-1 overflow-y-auto p-4 sm:p-6 lg:p-8",children:p.jsx(G1,{})})]}),_&&p.jsx(PC,{isOpen:_,onComplete:I}),i&&!o&&S&&!_&&p.jsx(wC,{isOpen:S,onComplete:k,completedSteps:((C=i.onboarding)==null?void 0:C.completedSteps)||0,totalSteps:((R=i.onboarding)==null?void 0:R.totalSteps)||8})]})})}function AC(e,t){const[r,n]=m.useState(null),[i,a]=m.useState(null),[o,s]=m.useState(null),[c,l]=m.useState(null),[u,d]=m.useState(!0),[f,h]=m.useState(!0),[g,v]=m.useState(!0),[y,b]=m.useState(null),[S,w]=m.useState(null),[_,x]=m.useState(null);return m.useEffect(()=>{if(!e)return;(async()=>{try{d(!0),b(null);const P=await du(e,t);n(P)}catch(P){console.error("Failed to fetch artist metrics:",P),b(P instanceof Error?P.message:"Failed to load artist metrics")}finally{d(!1)}})()},[e,t]),m.useEffect(()=>{if(!e)return;(async()=>{try{h(!0),w(null);const P=await lu(e);a(P)}catch(P){console.error("Failed to fetch dashboard summary:",P),w(P instanceof Error?P.message:"Failed to load streaming metrics"),a({totalFans:0,newFansLast30Days:0,streaming:{spotifyFans:0,appleMusicFans:0,amazonMusicFans:0,youtubeFans:0,tidalFans:0,deezerFans:0,pandoraFans:0},revenue:{totalRevenue:0,averageOrderValue:0,totalOrders:0,payingFans:0,topSpenders:[]}})}finally{h(!1)}})()},[e]),m.useEffect(()=>{if(!e)return;(async()=>{try{v(!0),x(null);const P=await fu(e);s(P)}catch(P){console.error("Failed to fetch ad performance:",P),x(P instanceof Error?P.message:"Failed to load ad performance"),s(null)}finally{v(!1)}})()},[e]),m.useEffect(()=>{if(!e)return;(async()=>{try{const P=await cu(e);l(P)}catch(P){console.error("Failed to fetch onboarding status:",P),l(null)}})()},[e]),{metrics:r,dashboardData:i,adPerformance:o,onboardingStatus:c,isLoading:u,isDashboardLoading:f,isAdPerformanceLoading:g,error:y,dashboardError:S,adPerformanceError:_}}function nh(e){const t=e/100;return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0,maximumFractionDigits:0}).format(t)}function tc(e,t){if(t===void 0||t===0)return{percentage:0,isPositive:!1,isNeutral:!0};const r=(e-t)/t*100;return{percentage:Math.abs(r),isPositive:r>0,isNeutral:r===0}}function rc({growth:e}){return e.isNeutral?p.jsxs("div",{className:"flex items-center gap-1 text-gray-400",children:[p.jsx(nC,{className:"h-3 w-3"}),p.jsx("span",{className:"text-xs",children:"No change"})]}):p.jsxs("div",{className:`flex items-center gap-1 ${e.isPositive?"text-green-400":"text-red-400"}`,children:[e.isPositive?p.jsx(pC,{className:"h-3 w-3"}):p.jsx(fC,{className:"h-3 w-3"}),p.jsxs("span",{className:"text-xs font-medium",children:[e.isPositive?"+":"-",e.percentage.toFixed(1),"%"]})]})}function EC({fansTotal:e,fansLast7Days:t,revenueLast30DaysCents:r,ordersLast30Days:n,fansPrevious7Days:i,revenuePrevious30DaysCents:a,ordersPrevious30Days:o}){const s=tc(t,i),c=tc(r,a),l=tc(n,o);return p.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-6",children:[p.jsxs("div",{className:"bg-[#161616] border border-white/5 rounded-xl p-5 shadow-lg",children:[p.jsx("p",{className:"text-sm text-gray-400 mb-1",children:"Total Fans"}),p.jsx("p",{className:"text-3xl font-bold text-white mb-1",children:e.toLocaleStr
2066ing()}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("div",{className:"w-2 h-2 rounded-full bg-[#6d60ff]"}),p.jsx("p",{className:"text-xs text-gray-500",children:"All time"})]})]}),p.jsxs("div",{className:"bg-[#161616] border border-white/5 rounded-xl p-5 shadow-lg",children:[p.jsx("p",{className:"text-sm text-gray-400 mb-1",children:"New Fans (7 Days)"}),p.jsx("p",{className:"text-3xl font-bold text-white mb-2",children:t.toLocaleString()}),p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("div",{className:"w-2 h-2 rounded-full bg-[#6d60ff]"}),p.jsx("p",{className:"text-xs text-gray-500",children:"vs prev 7 days"})]}),i!==void 0&&p.jsx(rc,{growth:s})]})]}),p.jsxs("div",{className:"bg-[#161616] border border-white/5 rounded-xl p-5 shadow-lg",children:[p.jsx("p",{className:"text-sm text-gray-400 mb-1",children:"Revenue (30 Days)"}),p.jsx("p",{className:"text-3xl font-bold text-white mb-2",children:nh(r)}),p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("div",{className:"w-2 h-2 rounded-full bg-[#de33ae]"}),p.jsx("p",{className:"text-xs text-gray-500",children:"vs prev 30 days"})]}),a!==void 0&&p.jsx(rc,{growth:c})]})]}),p.jsxs("div",{className:"bg-[#161616] border border-white/5 rounded-xl p-5 shadow-lg",children:[p.jsx("p",{className:"text-sm text-gray-400 mb-1",children:"Orders (30 Days)"}),p.jsx("p",{className:"text-3xl font-bold text-white mb-2",children:n.toLocaleString()}),p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("div",{className:"w-2 h-2 rounded-full bg-[#de33ae]"}),p.jsx("p",{className:"text-xs text-gray-500",children:n>0?`${nh(r/n)} avg`:"vs prev 30 days"})]}),o!==void 0&&p.jsx(rc,{growth:l})]})]})]})}function IC({dashboardData:e,isLoading:t}){return p.jsxs("div",{className:"mb-6",children:[p.jsxs("div",{className:"mb-4",children:[p.jsx("h2",{className:"text-2xl font-bold text-white mb-1",children:"Streaming Fans"}),p.jsx("p",{className:"text-sm text-gray-400",children:"Breakdown of fans by streaming platform (based on fan tags)"})]}),t?p.jsx("div",{className:"bg-[#161616] border border-white/5 rounded-xl p-8 shadow-lg text-center",children:p.jsx("div",{className:"text-gray-400",children:"Loading streaming metrics..."})}):e&&e.streaming?p.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[p.jsxs("div",{className:"bg-[#161616] border border-white/5 rounded-xl p-5 shadow-lg",children:[p.jsx("p",{className:"text-sm text-gray-400 mb-1",children:"Spotify"}),p.jsx("p",{className:"text-3xl font-bold text-white mb-1",children:e.streaming.spotifyFans.toLocaleString()}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("div",{className:"w-2 h-2 rounded-full bg-[#1DB954]"}),p.jsx("p",{className:"text-xs text-gray-500",children:"fans"})]})]}),p.jsxs("div",{className:"bg-[#161616] border border-white/5 rounded-xl p-5 shadow-lg",children:[p.jsx("p",{className:"text-sm text-gray-400 mb-1",children:"Apple Music"}),p.jsx("p",{className:"text-3xl font-bold text-white mb-1",children:e.streaming.appleMusicFans.toLocaleString()}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("div",{className:"w-2 h-2 rounded-full bg-[#FA243C]"}),p.jsx("p",{className:"text-xs text-gray-500",children:"fans"})]})]}),p.jsxs("div",{className:"bg-[#161616] border border-white/5 rounded-xl p-5 shadow-lg",children:[p.jsx("p",{className:"text-sm text-gray-400 mb-1",children:"Amazon Music"}),p.jsx("p",{className:"text-3xl font-bold text-white mb-1",children:e.streaming.amazonMusicFans.toLocaleString()}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("div",{className:"w-2 h-2 rounded-full bg-[#FF9900]"}),p.jsx("p",{className:"text-xs text-gray-500",children:"fans"})]})]}),p.jsxs("div",{className:"bg-[#161616] border border-white/5 rounded-xl p-5 shadow-lg",children:[p.jsx("p",{className:"text-sm text-gray-400 mb-1",children:"YouTube"}),p.jsx("p",{className:"text-3xl font-bold text-white mb-1",children:e.streaming.youtubeFans.toLocaleStr
2066ing()}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("div",{className:"w-2 h-2 rounded-full bg-[#FF0000]"}),p.jsx("p",{className:"text-xs text-gray-500",children:"fans"})]})]}),p.jsxs("div",{className:"bg-[#161616] border border-white/5 rounded-xl p-5 shadow-lg",children:[p.jsx("p",{className:"text-sm text-gray-400 mb-1",children:"Tidal"}),p.jsx("p",{className:"text-3xl font-bold text-white mb-1",children:e.streaming.tidalFans.toLocaleString()}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("div",{className:"w-2 h-2 rounded-full bg-[#00FFFF]"}),p.jsx("p",{className:"text-xs text-gray-500",children:"fans"})]})]}),p.jsxs("div",{className:"bg-[#161616] border border-white/5 rounded-xl p-5 shadow-lg",children:[p.jsx("p",{className:"text-sm text-gray-400 mb-1",children:"Deezer"}),p.jsx("p",{className:"text-3xl font-bold text-white mb-1",children:e.streaming.deezerFans.toLocaleString()}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("div",{className:"w-2 h-2 rounded-full bg-[#FF0092]"}),p.jsx("p",{className:"text-xs text-gray-500",children:"fans"})]})]}),p.jsxs("div",{className:"bg-[#161616] border border-white/5 rounded-xl p-5 shadow-lg",children:[p.jsx("p",{className:"text-sm text-gray-400 mb-1",children:"Pandora"}),p.jsx("p",{className:"text-3xl font-bold text-white mb-1",children:e.streaming.pandoraFans.toLocaleString()}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("div",{className:"w-2 h-2 rounded-full bg-[#005483]"}),p.jsx("p",{className:"text-xs text-gray-500",children:"fans"})]})]}),p.jsxs("div",{className:"bg-[#161616] border border-white/5 rounded-xl p-5 shadow-lg",children:[p.jsx("p",{className:"text-sm text-gray-400 mb-1",children:"Other"}),p.jsx("p",{className:"text-3xl font-bold text-white mb-1",children:(()=>{const r=e.streaming.spotifyFans+e.streaming.appleMusicFans+e.streaming.amazonMusicFans+e.streaming.youtubeFans+e.streaming.tidalFans+e.streaming.deezerFans+e.streaming.pandoraFans;return Math.max(0,e.totalFans-r).toLocaleString()})()}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("div",{className:"w-2 h-2 rounded-full bg-[#9ca3af]"}),p.jsx("p",{className:"text-xs text-gray-500",children:"fans"})]})]})]}):null]})}function nc(e){const t=e/100;return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0,maximumFractionDigits:0}).format(t)}function kC({dashboardData:e,isLoading:t}){const r=e==null?void 0:e.revenue,n=r&&r.totalRevenue>0;return p.jsxs("div",{className:"mb-6",children:[p.jsxs("div",{className:"mb-4",children:[p.jsx("h2",{className:"text-2xl font-bold text-white mb-1",children:"Revenue"}),p.jsx("p",{className:"text-sm text-gray-400",children:"Fan purchases from your store & FanPack funnels"})]}),t?p.jsx("div",{className:"bg-[#161616] border border-white/5 rounded-xl p-8 shadow-lg text-center",children:p.jsx("div",{className:"text-gray-400",children:"Loading revenue metrics..."})}):n?p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-6",children:[p.jsxs("div",{className:"bg-[#161616] border border-white/5 rounded-xl p-5 shadow-lg",children:[p.jsx("p",{className:"text-sm text-gray-400 mb-1",children:"Total Revenue"}),p.jsx("p",{className:"text-3xl font-bold text-white mb-1",children:nc(r.totalRevenue)}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500"}),p.jsx("p",{className:"text-xs text-gray-500",children:"all time"})]})]}),p.jsxs("div",{className:"bg-[#161616] border border-white/5 rounded-xl p-5 shadow-lg",children:[p.jsx("p",{className:"text-sm text-gray-400 mb-1",children:"Avg Order Value"}),p.jsx("p",{className:"text-3xl font-bold text-white mb-1",children:nc(r.averageOrderValue)}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("div",{className:"w-2 h-2 rounded-full bg-blue-500"}),p.jsx("p",{className:"text-xs text-gray-500",children:"per order"})]})]}),p.jsxs("div",{className:"bg-[#161616] border border-white/5 rounded-xl p-5 shadow-lg",children:[p.jsx("p",{className:"text-sm text-gray-400 mb-1",children:"Total Orders"}),p.jsx("p",{className:"text-3xl font-bold text-white mb-1",children:r.totalOrders.toLocaleStr
2066ing()}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("div",{className:"w-2 h-2 rounded-full bg-purple-500"}),p.jsx("p",{className:"text-xs text-gray-500",children:"completed"})]})]}),p.jsxs("div",{className:"bg-[#161616] border border-white/5 rounded-xl p-5 shadow-lg",children:[p.jsx("p",{className:"text-sm text-gray-400 mb-1",children:"Paying Fans"}),p.jsx("p",{className:"text-3xl font-bold text-white mb-1",children:r.payingFans.toLocaleString()}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("div",{className:"w-2 h-2 rounded-full bg-yellow-500"}),p.jsx("p",{className:"text-xs text-gray-500",children:"fans"})]})]})]}),r.topSpenders.length>0&&p.jsxs("div",{className:"bg-[#161616] border border-white/5 rounded-2xl p-6 shadow-lg",children:[p.jsxs("div",{className:"mb-6",children:[p.jsx("h3",{className:"text-lg font-semibold text-white mb-1",children:"Top Spenders"}),p.jsx("p",{className:"text-sm text-gray-400",children:"Your highest-value customers"})]}),p.jsx("div",{className:"space-y-3",children:r.topSpenders.map((i,a)=>p.jsxs("div",{className:"flex items-start gap-4",children:[p.jsxs("div",{className:"flex items-center justify-center w-8 h-8 rounded-full bg-[#de33ae]/10 border-2 border-[#de33ae] text-xs font-bold text-[#de33ae] shrink-0",children:["#",a+1]}),p.jsx("div",{className:"flex-1 bg-[#0a0a0a] border border-white/10 rounded-lg p-3 -mt-1",children:p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{children:[p.jsx("p",{className:"text-sm font-medium text-white",children:i.name||"Anonymous"}),p.jsx("p",{className:"text-xs text-gray-400 mt-0.5",children:i.email})]}),p.jsxs("div",{className:"text-right",children:[p.jsx("p",{className:"text-sm font-bold text-white",children:nc(i.totalRevenue)}),p.jsxs("p",{className:"text-xs text-gray-400 mt-0.5",children:[i.orderCount," ",i.orderCount===1?"order":"orders"]})]})]})})]},i.fanId))})]})]}):p.jsx("div",{className:"bg-[#161616] border border-white/5 rounded-xl p-8 shadow-lg text-center",children:p.jsxs("div",{className:"text-gray-400",children:[p.jsx("p",{className:"mb-2",children:"💰"}),p.jsx("p",{children:"No revenue data yet. Revenue will appear here once fans make purchases."}),p.jsx("p",{className:"text-sm mt-2",children:"Import historical orders in Settings → Integrations"})]})})]})}function cv(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=cv(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function J(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=cv(e))&&(n&&(n+=" "),n+=t);return n}var TC=["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","onAuxCl
2066ick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function vu(e){if(typeof e!="string")return!1;var t=TC;return t.includes(e)}var CC=["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"],NC=new Set(CC);function lv(e){return typeof e!="string"?!1:NC.has(e)}function uv(e){return typeof e=="string"&&e.startsWith("data-")}function lt(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(lv(r)||uv(r))&&(t[r]=e[r]);return t}function Ho(e){if(e==null)return null;if(m.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return lt(t)}return typeof e=="object"&&!Array.isArray(e)?lt(e):null}function Ne(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(lv(r)||uv(r)||vu(r))&&(t[r]=e[r]);return t}function jC(e){return e==null?null:m.isValidElement(e)?Ne(e.props):typeof e=="object"&&!Array.isArray(e)?Ne(e):null}var MC=["children","width","height","viewBox","className","style","title","desc"];function Lc(){return Lc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}
2066).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Lc.apply(null,arguments)}function DC(e,t){if(e==null)return{};var r,n,i=RC(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function RC(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var bu=m.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:a,className:o,style:s,title:c,desc:l}=e,u=DC(e,MC),d=a||{width:n,height:i,x:0,y:0},f=J("recharts-surface",o);return m.createElement("svg",Lc({},Ne(u),{className:f,width:n,height:i,style:s,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height),ref:t}),m.createElement("title",null,c),m.createElement("desc",null,l),r)}),$C=["children","className"];function Fc(){return Fc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fc.apply(null,arguments)}function LC(e,t){if(e==null)return{};var r,n,i=FC(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function FC(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var ut=m.forwardRef((e,t)=>{var{children:r,className:n}=e,i=LC(e,$C),a=J("recharts-layer",n);return m.createElement("g",Fc({className:a},Ne(i),{ref:t}),r)}),dv=m.createContext(null),UC=()=>m.useContext(dv);function re(e){return function(){return e}}const fv=Math.cos,Ua=Math.sin,Pt=Math.sqrt,Ba=Math.PI,Ko=2*Ba,Uc=Math.PI,Bc=2*Uc,$r=1e-6,BC=Bc-$r;function hv(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function zC(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return hv;const r=10**t;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 WC{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?hv:zC(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,o){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,c=n-t,l=i-r,u=o-t,d=s-r,f=u*u+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>$r)if(!(Math.abs(d*c-l*u)>$r)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-o,g=i-s,v=c*c+l*l,y=h*h+g*g,b=Math.sqrt(v),S=Math.sqrt(f),w=a*Math.tan((Uc-Math.acos((v+f-y)/(2*b*S)))/2),_=w/S,x=w/b;Math.abs(_-1)>$r&&this._append`L${t+_*u},${r+_*d}`,this._append`A${a},${a},0,0,${+(d*h>u*g)},${this._x1=t+x*c},${this._y1=r+x*l}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),c=n*Math.sin(i),l=t+s,u=r+c,d=1^o,f=o?i-a:a-i;this._x1===null?this._append`M${l},${u}`:(Math.abs(this._x1-l)>$r||Math.abs(this._y1-u)>$r)&&this._append`L${l},${u}`,n&&(f<0&&(f=f%Bc+Bc),f>BC?this._append`A${n},${n},0,1,${d},${t-s},${r-c}A${n},${n},0,1,${d},${this._x1=l},${this._y1=u}`:f>$r&&this._append`A${n},${n},0,${+(f>=Uc)},${d},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function wu(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new WC(t)}function xu(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function pv(e){this._context=e}pv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Vo(e){return new pv(e)}function mv(e){return e[0]}
2066function gv(e){return e[1]}function yv(e,t){var r=re(!0),n=null,i=Vo,a=null,o=wu(s);e=typeof e=="function"?e:e===void 0?mv:re(e),t=typeof t=="function"?t:t===void 0?gv:re(t);function s(c){var l,u=(c=xu(c)).length,d,f=!1,h;for(n==null&&(a=i(h=o())),l=0;l<=u;++l)!(l<u&&r(d=c[l],l,c))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+e(d,l,c),+t(d,l,c));if(h)return a=null,h+""||null}return s.x=function(c){return arguments.length?(e=typeof c=="function"?c:re(+c),s):e},s.y=function(c){return arguments.length?(t=typeof c=="function"?c:re(+c),s):t},s.defined=function(c){return arguments.length?(r=typeof c=="function"?c:re(!!c),s):r},s.curve=function(c){return arguments.length?(i=c,n!=null&&(a=i(n)),s):i},s.context=function(c){return arguments.length?(c==null?n=a=null:a=i(n=c),s):n},s}function oa(e,t,r){var n=null,i=re(!0),a=null,o=Vo,s=null,c=wu(l);e=typeof e=="function"?e:e===void 0?mv:re(+e),t=typeof t=="function"?t:re(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?gv:re(+r);function l(d){var f,h,g,v=(d=xu(d)).length,y,b=!1,S,w=new Array(v),_=new Array(v);for(a==null&&(s=o(S=c())),f=0;f<=v;++f){if(!(f<v&&i(y=d[f],f,d))===b)if(b=!b)h=f,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),g=f-1;g>=h;--g)s.point(w[g],_[g]);s.lineEnd(),s.areaEnd()}b&&(w[f]=+e(y,f,d),_[f]=+t(y,f,d),s.point(n?+n(y,f,d):w[f],r?+r(y,f,d):_[f]))}if(S)return s=null,S+""||null}function u(){return yv().defined(i).curve(o).context(a)}return l.x=function(d){return arguments.length?(e=typeof d=="function"?d:re(+d),n=null,l):e},l.x0=function(d){return arguments.length?(e=typeof d=="function"?d:re(+d),l):e},l.x1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:re(+d),l):n},l.y=function(d){return arguments.length?(t=typeof d=="function"?d:re(+d),r=null,l):t},l.y0=function(d){return arguments.length?(t=typeof d=="function"?d:re(+d),l):t},l.y1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:re(+d),l):r},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(r)},l.lineX1=function(){return u().x(n).y(t)},l.defined=function(d){return arguments.length?(i=typeof d=="function"?d:re(!!d),l):i},l.curve=function(d){return arguments.length?(o=d,a!=null&&(s=o(a)),l):o},l.context=function(d){return arguments.length?(d==null?a=s=null:s=o(a=d),l):a},l}class vv{constructor(t,r){this._context=t,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(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function HC(e){return new vv(e,!0)}function KC(e){return new vv(e,!1)}const Su={draw(e,t){const r=Pt(t/Ba);e.moveTo(r,0),e.arc(0,0,r,0,Ko)}},VC={draw(e,t){const r=Pt(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},bv=Pt(1/3),qC=bv*2,GC={draw(e,t){const r=Pt(t/qC),n=r*bv;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},YC={draw(e,t){const r=Pt(t),n=-r/2;e.rect(n,n,r,r)}},JC=.8908130915292852,wv=Ua(Ba/10)/Ua(7*Ba/10),XC=Ua(Ko/10)*wv,ZC=-fv(Ko/10)*wv,QC={draw(e,t){const r=Pt(t*JC),n=XC*r,i=ZC*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=Ko*a/5,s=fv(o),c=Ua(o);e.lineTo(c*r,-s*r),e.lineTo(s*n-c*i,c*n+s*i)}e.closePath()}},ic=Pt(3),eN={draw(e,t){const r=-Pt(t/(ic*3));e.moveTo(0,r*2),e.lineTo(-ic*r,-r),e.lineTo(ic*r,-r),e.closePath()}},rt=-.5,nt=Pt(3)/2,zc=1/Pt(12),tN=(zc/2+1)*3,rN={draw(e,t){const r=Pt(t/tN),n=r/2,i=r*zc,a=n,o=r*zc+r,s=-a,c=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,c),e.lineTo(rt*n-nt*i,nt*n+rt*i),e.lineTo(rt*a-nt*o,nt*a+rt*o),e.lineTo(rt*s-nt*c,nt*s+rt*c),e.lineTo(rt*n+nt*i,rt*i-nt*n),e.lineTo(rt*a+nt*o,rt*o-nt*a),e.lineTo(rt*s+nt*c,rt*c-nt*s),e.closePath()}};function nN(e,t){let r=null,n=wu(i);e=typeof e=="function"?e:re(e||Su),t=typeof t=="function"?t:re(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:re(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:re(+a),i):t}
vendor: 6,361 bytes, line 2066
2066,i.context=function(a){return arguments.length?(r=a??null,i):r},i}function za(){}function Wa(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function xv(e){this._context=e}xv.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:Wa(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);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:Wa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function iN(e){return new xv(e)}function Sv(e){this._context=e}Sv.prototype={areaStart:za,areaEnd:za,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Wa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function aN(e){return new Sv(e)}function Pv(e){this._context=e}Pv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,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+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Wa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function oN(e){return new Pv(e)}function _v(e){this._context=e}_v.prototype={areaStart:za,areaEnd:za,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function sN(e){return new _v(e)}function ih(e){return e<0?-1:1}function ah(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(ih(a)+ih(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function oh(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function ac(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-n)/3;e._context.bezierCurveTo(n+s,i+s*t,a-s,o-s*r,a,o)}function Ha(e){this._context=e}Ha.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:ac(this,this._t0,oh(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ac(this,oh(this,r=ah(this,e,t)),r);break;default:ac(this,this._t0,r=ah(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Ov(e){this._context=new Av(e)}(Ov.prototype=Object.create(Ha.prototype)).point=function(e,t){Ha.prototype.point.call(this,t,e)};function Av(e){this._context=e}Av.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function cN(e){return new Ha(e)}function lN(e){return new Ov(e)}function Ev(e){this._context=e}Ev.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=sh(e),i=sh(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function sh(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function uN(e){return new Ev(e)}function qo(e,t){this._context=e,this._t=t}qo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;
2066default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function dN(e){return new qo(e,.5)}function fN(e){return new qo(e,0)}function hN(e){return new qo(e,1)}function Pn(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,s=a.length;r<o;++r)for(i=a,a=e[t[r]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function Wc(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function pN(e,t){return e[t]}function mN(e){const t=[];return t.key=e,t}function gN(){var e=re([]),t=Wc,r=Pn,n=pN;function i(a){var o=Array.from(e.apply(this,arguments),mN),s,c=o.length,l=-1,u;for(const d of a)for(s=0,++l;s<c;++s)(o[s][l]=[0,+n(d,o[s].key,l,a)]).data=d;for(s=0,u=xu(t(o));s<c;++s)o[u[s]].index=s;return r(o,u),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:re(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:re(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?Wc:typeof a=="function"?a:re(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??Pn,i):r},i}function yN(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,o;i<a;++i){for(o=r=0;r<n;++r)o+=e[r][i][1]||0;if(o)for(r=0;r<n;++r)e[r][i][1]/=o}Pn(e,t)}}function vN(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var o=0,s=0;o<i;++o)s+=e[o][r][1]||0;n[r][1]+=n[r][0]=-s/2}Pn(e,t)}}function bN(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n<a;++n){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[n][1]||0,f=u[n-1][1]||0,h=(d-f)/2,g=0;g<s;++g){var v=e[t[g]],y=v[n][1]||0,b=v[n-1][1]||0;h+=y-b}c+=d,l+=h*d}i[n-1][1]+=i[n-1][0]=r,c&&(r-=l/c)}i[n-1][1]+=i[n-1][0]=r,Pn(e,t)}}var Go={},Iv={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(Iv);var Pu={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){switch(typeof r){case"number":case"symbol":return!1;case"string":return r.includes(".")||r.includes("[")||r.includes("]")}}e.isDeepKey=t})(Pu);var Yo={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){var n;return typeof r=="string"||typeof r=="symbol"?r:Object.is((n=r==null?void 0:r.valueOf)==null?void 0:n.call(r),-0)?"-0":String(r)}e.toKey=t})(Yo);var Jo={},kv={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){if(r==null)return"";if(typeof r=="string")return r;if(Array.isArray(r))return r.map(t).join(",");const n=String(r);return n==="0"&&Object.is(Number(r),-0)?"-0":n}e.toString=t})(kv);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=kv,r=Yo;function n(i){if(Array.isArray(i))return i.map(r.toKey);if(typeof i=="symbol")return[i];i=t.toString(i);const a=[],o=i.length;if(o===0)return a;let s=0,c="",l="",u=!1;for(i.charCodeAt(0)===46&&(a.push(""),s++);s<o;){const d=i[s];l?d==="\\"&&s+1<o?(s++,c+=i[s]):d===l?l="":c+=d:u?d==='"'||d==="'"?l=d:d==="]"?(u=!1,a.push(c),c=""):c+=d:d==="["?(u=!0,c&&(a.push(c),c="")):d==="."?c&&(a.push(c),c=""):c+=d,s++}return c&&a.push(c),a}e.toPath=n})(Jo);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Iv,r=Pu,n=Yo,i=Jo;function a(s,c,l){if(s==null)return l;switch(typeof c){case"string":{if(t.isUnsafeProperty(c))return l;const u=s[c];return u===void 0?r.isDeepKey(c)?a(s,i.toPath(c),l):l:u}case"number":case"symbol":{typeof c=="number"&&(c=n.toKey(c));const u=s[c];return u===void 0?l:u}default:{if(Array.isArray(c))return o(s,c,l);if(Object.is(c==null?void 0:c.valueOf(),-0)?c="-0":c=String(c),t.isUnsafeProperty(c))return l;const u=s[c];return u===void 0?l:u}}}function o(s,c,l){if(c.length===0)return l;let u=s;for(let d=0;d<c.length;d++){if(u==null||t.isUnsafeProperty(c[d]))return l;u=u[c[d]]}return u===void 0?l:u}e.get=a})(Go);var wN=Go.get;const Xo=Ir(wN);var ot=e=>e===0?0:e>0?1:-1,xt=e=>typeof e=="number"&&e!=+e,Qt=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,U=e=>(typeof e=="number"||e instanceof Number)&&!xt(e),jt=e=>
2066U(e)||typeof e=="string",xN=0,pi=e=>{var t=++xN;return"".concat(e||"").concat(t)},Ar=function(t,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(!U(t)&&typeof t!="string")return n;var a;if(Qt(t)){if(r==null)return n;var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return xt(a)&&(a=n),i&&r!=null&&a>r&&(a=r),a},Tv=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[e[n]])r[e[n]]=!0;else return!0;return!1};function le(e,t,r){return U(e)&&U(t)?e+r*(t-e):t}function Cv(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):Xo(n,t))===r)}var he=e=>e===null||typeof e>"u",Ri=e=>he(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function SN(e){return e!=null}function $i(){}var PN=["type","size","sizeType"];function Hc(){return Hc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hc.apply(null,arguments)}function ch(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function lh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ch(Object(r),!0).forEach(function(n){_N(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ch(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _N(e,t,r){return(t=ON(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ON(e){var t=AN(e,"string");return typeof t=="symbol"?t:t+""}function AN(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function EN(e,t){if(e==null)return{};var r,n,i=IN(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function IN(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Nv={symbolCircle:Su,symbolCross:VC,symbolDiamond:GC,symbolSquare:YC,symbolStar:QC,symbolTriangle:eN,symbolWye:rN},kN=Math.PI/180,TN=e=>{var t="symbol".concat(Ri(e));return Nv[t]||Su},CN=(e,t,r)=>{if(t==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var n=18*kN;return 1.25*e*e*(Math.tan(n)-Math.tan(n*2)*Math.tan(n)**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}},NN=(e,t)=>{Nv["symbol".concat(Ri(e))]=t},_u=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=EN(e,PN),a=lh(lh({},i),{},{type:t,size:r,sizeType:n}),o="circle";typeof t=="string"&&(o=t);var s=()=>{var f=TN(o),h=nN().type(f).size(CN(r,n,o)),g=h();if(g!==null)return g},{className:c,cx:l,cy:u}=a,d=Ne(a);return U(l)&&U(u)&&U(r)?m.createElement("path",Hc({}
2066,d,{className:J("recharts-symbols",c),transform:"translate(".concat(l,", ").concat(u,")"),d:s()})):null};_u.registerSymbol=NN;var jv=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Ou=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(m.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{vu(i)&&(n[i]=a=>r[i](r,a))}),n},jN=(e,t,r)=>n=>(e(t,r,n),null),Mv=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var a=e[i];vu(i)&&typeof a=="function"&&(n||(n={}),n[i]=jN(a,t,r))}),n};function uh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function MN(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uh(Object(r),!0).forEach(function(n){DN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function DN(e,t,r){return(t=RN(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RN(e){var t=$N(e,"string");return typeof t=="symbol"?t:t+""}function $N(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Se(e,t){var r=MN({},e),n=t,i=Object.keys(t),a=i.reduce((o,s)=>(o[s]===void 0&&n[s]!==void 0&&(o[s]=n[s]),o),r);return a}function Ka(){return Ka=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ka.apply(null,arguments)}function dh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function LN(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dh(Object(r),!0).forEach(function(n){FN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FN(e,t,r){return(t=UN(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UN(e){var t=BN(e,"string");return typeof t=="symbol"?t:t+""}function BN(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var at=32,zN={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle"};function WN(e){var{data:t,iconType:r,inactiveColor:n}=e,i=at/2,a=at/6,o=at/3,s=t.inactive?n:t.color,c=r??t.type;if(c==="none")return null;if(c==="plainline"){var l;return m.createElement("line",{strokeWidth:4,fill:"none",stroke:s,strokeDasharray:(l=t.payload)===null||l===void 0?void 0:l.strokeDasharray,x1:0,y1:i,x2:at,y2:i,className:"recharts-legend-icon"})}if(c==="line")return m.createElement("path",{strokeWidth:4,fill:"none",stroke:s,d:"M0,".concat(i,"h").concat(o,`
2067            A`).concat(a,",").concat(a,",0,1,1,").concat(2*o,",").concat(i,`
2068            H`).concat(at,"M").concat(2*o,",").concat(i,`
2069            A`).concat(a,",").concat(a,",0,1,1,").concat(o,",").concat(i),className:"recharts-legend-icon"});if(c==="rect")return m.createElement("path",{stroke:"none",fill:s,d:"M0,".concat(at/8,"h").concat(at,"v").concat(at*3/4,"h").concat(-at,"z"),className:"recharts-legend-icon"});if(m.isValidElement(t.legendIcon)){var u=LN({},t);return delete u.legendIcon,m.cloneElement(t.legendIcon,u)}return m.createElement(_u,{fill:s,cx:i,cy:i,size:at,sizeType:"diameter",type:c})}function HN(e){var{payload:t,iconSize:r,layout:n,formatter:i,inactiveColor:a,iconType:o}=e,s={x:0,y:0,width:at,height:at},c={display:n==="horizontal"?"inline-block":"block",marginRight:10},l={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((u,d)=>{var f=u.formatter||i,h=J({"recharts-legend-item":!0,["legend-item-".concat(d)]:!0,inactive:u.inactive});if(u.type==="none")return null;var g=u.inactive?a:u.color,v=f?f(u.value,u,d):u.value;return m.createElement("li",Ka({className:h,style:c,key:"legend-item-".concat(d)},Mv(e,u,d)),m.createElement(bu,{width:r,height:r,viewBox:s,style:l,"aria-label":"".concat(v," legend icon")},m.createElement(WN,{data:u,iconType:o,inactiveColor:a})),m.createElement("span",{className:"recharts-legend-item-text",style:{color:g}},v))})}var KN=e=>{var t=Se(e,zN),{payload:r,layout:n,align:i}=t;if(!r||!r.length)return null;var a={padding:0,margin:0,textAlign:n==="horizontal"?i:"left"};return m.createElement("ul",{className:"recharts-default-legend",style:a},m.createElement(HN,Ka({},t,{payload:r})))},Dv={},Rv={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){const i=new Map;for(let a=0;a<r.length;a++){const o=r[a],s=n(o);i.has(s)||i.set(s,o)}return Array.from(i.values())}e.uniqBy=t})(Rv);var Au={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(Au);var $v={},Zo={},Lv={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(Lv);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Lv;function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(Zo);var Fv={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(Fv);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Zo,r=Fv;function n(i){return r.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=n})($v);var Uv={},Bv={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Go;function r(n){return function(i){return t.get(i,n)}}e.property=r})(Bv);var zv={},Eu={},Wv={},Iu={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r!==null&&(typeof r=="object"||typeof r=="function")}e.isObject=t})(Iu);var ku={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null||typeof r!="object"&&typeof r!="function"}e.isPrimitive=t})(ku);var Tu={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return r===n||Number.isNaN(r)&&Number.isNaN(n)}e.eq=t})(Tu);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Iu,r=ku,n=Tu;function i(u,d,f){return typeof f!="function"?i(u,d,()=>{}):a(u,d,function h(g,v,y,b,S,w){const _=f(g,v,y,b,S,w);return _!==void 0?!!_:a(g,v,h,w)},new Map)}function a(u,d,f,h){if(d===u)return!0;switch(typeof d){case"object":return o(u,d,f,h);case"function":return Object.keys(d).length>0?a(u,{...d},f,h):n.eq(u,d);
2069default:return t.isObject(u)?typeof d=="string"?d==="":!0:n.eq(u,d)}}function o(u,d,f,h){if(d==null)return!0;if(Array.isArray(d))return c(u,d,f,h);if(d instanceof Map)return s(u,d,f,h);if(d instanceof Set)return l(u,d,f,h);const g=Object.keys(d);if(u==null)return g.length===0;if(g.length===0)return!0;if(h!=null&&h.has(d))return h.get(d)===u;h==null||h.set(d,u);try{for(let v=0;v<g.length;v++){const y=g[v];if(!r.isPrimitive(u)&&!(y in u)||d[y]===void 0&&u[y]!==void 0||d[y]===null&&u[y]!==null||!f(u[y],d[y],y,u,d,h))return!1}return!0}finally{h==null||h.delete(d)}}function s(u,d,f,h){if(d.size===0)return!0;if(!(u instanceof Map))return!1;for(const[g,v]of d.entries()){const y=u.get(g);if(f(y,v,g,u,d,h)===!1)return!1}return!0}function c(u,d,f,h){if(d.length===0)return!0;if(!Array.isArray(u))return!1;const g=new Set;for(let v=0;v<d.length;v++){const y=d[v];let b=!1;for(let S=0;S<u.length;S++){if(g.has(S))continue;const w=u[S];let _=!1;if(f(w,y,v,u,d,h)&&(_=!0),_){g.add(S),b=!0;break}}if(!b)return!1}return!0}function l(u,d,f,h){return d.size===0?!0:u instanceof Set?c([...u],[...d],f,h):!1}e.isMatchWith=i,e.isSetMatch=l})(Wv);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Wv;function r(n,i){return t.isMatchWith(n,i,()=>{})}e.isMatch=r})(Eu);var Hv={},Cu={},Kv={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Object.getOwnPropertySymbols(r).filter(n=>Object.prototype.propertyIsEnumerable.call(r,n))}e.getSymbols=t})(Kv);var Nu={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}e.getTag=t})(Nu);var ju={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",r="[object String]",n="[object Number]",i="[object Boolean]",a="[object Arguments]",o="[object Symbol]",s="[object Date]",c="[object Map]",l="[object Set]",u="[object Array]",d="[object Function]",f="[object ArrayBuffer]",h="[object Object]",g="[object Error]",v="[object DataView]",y="[object Uint8Array]",b="[object Uint8ClampedArray]",S="[object Uint16Array]",w="[object Uint32Array]",_="[object BigUint64Array]",x="[object Int8Array]",O="[object Int16Array]",P="[object Int32Array]",k="[object BigInt64Array]",I="[object Float32Array]",D="[object Float64Array]";e.argumentsTag=a,e.arrayBufferTag=f,e.arrayTag=u,e.bigInt64ArrayTag=k,e.bigUint64ArrayTag=_,e.booleanTag=i,e.dataViewTag=v,e.dateTag=s,e.errorTag=g,e.float32ArrayTag=I,e.float64ArrayTag=D,e.functionTag=d,e.int16ArrayTag=O,e.int32ArrayTag=P,e.int8ArrayTag=x,e.mapTag=c,e.numberTag=n,e.objectTag=h,e.regexpTag=t,e.setTag=l,e.stringTag=r,e.symbolTag=o,e.uint16ArrayTag=S,e.uint32ArrayTag=w,e.uint8ArrayTag=y,e.uint8ClampedArrayTag=b})(ju);var Vv={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(Vv);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Kv,r=Nu,n=ju,i=ku,a=Vv;function o(u,d){return s(u,void 0,u,new Map,d)}function s(u,d,f,h=new Map,g=void 0){const v=g==null?void 0:g(u,d,f,h);if(v!==void 0)return v;if(i.isPrimitive(u))return u;if(h.has(u))return h.get(u);if(Array.isArray(u)){const y=new Array(u.length);h.set(u,y);for(let b=0;b<u.length;b++)y[b]=s(u[b],b,f,h,g);return Object.hasOwn(u,"index")&&(y.index=u.index),Object.hasOwn(u,"input")&&(y.input=u.input),y}if(u instanceof Date)return new Date(u.getTime());if(u instanceof RegExp){const y=new RegExp(u.source,u.flags);return y.lastIndex=u.lastIndex,y}if(u instanceof Map){const y=new Map;h.set(u,y);for(const[b,S]of u)y.set(b,s(S,b,f,h,g));return y}if(u instanceof Set){const y=new Set;h.set(u,y);for(const b of u)y.add(s(b,void 0,f,h,g));return y}if(typeof Buffer<"u"&&Buffer.isBuffer(u))return u.subarray();if(a.isTypedArray(u)){const y=new(Object.getPrototypeOf(u)).constructor(u.length);h.set(u,y);for(let b=0;b<u.length;b++)y[b]=s(u[b],b,f,h,g);return y}if(u instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&u instanceof SharedArrayBuffer)return u.slice(0);if(u instanceof DataView){const y=new DataView(u.buffer.slice(0),u.byteOffset,u.byteLength);return h.set(u,y),c(y,u,f,h,g),y}if(typeof File<"u"&&u instanceof File){const y=new File([u],u.name,{type:u.type});return h.set(u,y),c(y,u,f,h,g),y}if(typeof Blob<"u"&&u instanceof Blob){const y=new Blob([u],{type:u.type});return h.set(u,y),c(y,u,f,h,g),y}if(u instanceof Error){const y=new u.constructor;return h.set(u,y),y.message=u.message,y.name=u.name,y.stack=u.stack,y.cause=u.cause,c(y,u,f,h,g),y}if(u instanceof Boolean){const y=new Boolean(u.valueOf());return h.set(u,y),c(y,u,f,h,g),y}if(u instanceof Number){const y=new Number(u.valueOf());return h.set(u,y),c(y,u,f,h,g),y}if(u instanceof String){const y=new String(u.valueOf());return h.set(u,y),c(y,u,f,h,g),y}if(typeof u=="object"&&l(u)){const y=Object.create(Object.getPrototypeOf(u));return h.set(u,y),c(y,u,f,h,g),y}return u}function c(u,d,f=u,h,g){const v=[...Object.keys(d),...t.getSymbols(d)];for(let y=0;y<v.length;y++){const b=v[y],S=Object.getOwnPropertyDescriptor(u,b);(S==null||S.writable)&&(u[b]=s(d[b],b,f,h,g))}}function l(u){switch(r.getTag(u)){case n.argumentsTag:case n.arrayTag:case n.arrayBufferTag:case n.dataViewTag:case n.booleanTag:case n.dateTag:case n.float32ArrayTag:case n.float64ArrayTag:case n.int8ArrayTag:case n.int16ArrayTag:case n.int32ArrayTag:case n.mapTag:case n.numberTag:case n.objectTag:case n.regexpTag:case n.setTag:case n.stringTag:case n.symbolTag:case n.uint8ArrayTag:case n.uint8ClampedArrayTag:case n.uint16ArrayTag:case n.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=o,e.cloneDeepWithImpl=s,e.copyProperties=c})(Cu);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Cu;function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(Hv);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Eu,r=Hv;function n(i){return i=r.cloneDeep(i),a=>t.isMatch(a,i)}e.matches=n})(zv);var qv={},Gv={},Yv={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Cu,r=ju;function n(i,a){return t.cloneDeepWith(i,(o,s,c,l)=>{const u=a==null?void 0:a(o,s,c,l);if(u!==void 0)return u;if(typeof i=="object")switch(Object.prototype.toString.call(i)){case r.numberTag:case r.stringTag:case r.booleanTag:{const d=new i.constructor(i==null?void 0:i.valueOf());return t.copyProperties(d,i),d}case r.argumentsTag:{const d={};return t.copyProperties(d,i),d.length=i.length,d[Symbol.iterator]=i[Symbol.iterator],d}default:return}})}e.cloneDeepWith=n})(Yv);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Yv;function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(Gv);var Jv={},Mu={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function r(n,i=Number.MAX_SAFE_INTEGER){switch(typeof n){case"number":return Number.isInteger(n)&&n>=0&&n<i;case"symbol":return!1;case"string":return t.test(n)}}e.isIndex=r})(Mu);var Xv={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Nu;function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(Xv);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Pu,r=Mu,n=Xv,i=Jo;function a(o,s){let c;if(Array.isArray(s)?c=s:typeof s=="string"&&t.isDeepKey(s)&&(o==null?void 0:o[s])==null?c=i.toPath(s):c=[s],c.length===0)return!1;let l=o;for(let u=0;u<c.length;u++){const d=c[u];if((l==null||!Object.hasOwn(l,d))&&!((Array.isArray(l)||n.isArguments(l))&&r.isIndex(d)&&d<l.length))return!1;l=l[d]}return!0}e.has=a})(Jv);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Eu,r=Yo,n=Gv,i=Go,a=Jv;function o(s,c){switch(typeof s){case"object":{Object.is(s==null?void 0:s.valueOf(),-0)&&(s="-0");break}case"number":{s=r.toKey(s);break}}return c=n.cloneDeep(c),function(l){const u=i.get(l,s);return u===void 0?a.has(l,s):c===void 0?u===void 0:t.isMatch(u,c)}}e.matchesProperty=o})(qv);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Au,r=Bv,n=zv,i=qv;function a(o){if(o==null)return t.identity;switch(typeof o){case"function":return o;case"object":return Array.isArray(o)&&o.length===2?i.matchesProperty(o[0],o[1]):n.matches(o);case"string":case"symbol":case"number":return r.property(o)}}e.iteratee=a})(Uv);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Rv,r=Au,n=$v,i=Uv;function a(o,s=r.identity){return n.isArrayLikeObject(o)?t.uniqBy(Array.from(o),i.iteratee(s)):[]}e.uniqBy=a})(Dv);var VN=Dv.uniqBy;const fh=Ir(VN);function Zv(e,t,r){return t===!0?fh(e,r):typeof t=="function"?fh(e,t):e}var Qv={exports:{}},eb={},tb={exports:{}},rb={};/**
2070 * @license React
2071 * use-sync-external-store-shim.production.js
2072 *
2073 * Copyright (c) Meta Platforms, Inc. and affiliates.
2074 *
2075 * This source code is licensed under the MIT license found in the
2076 * LICENSE file in the root directory of this source tree.
2077 */var _n=m;function qN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var GN=typeof Object.is=="function"?Object.is:qN,YN=_n.useState,JN=_n.useEffect,XN=_n.useLayoutEffect,ZN=_n.useDebugValue;function QN(e,t){var r=t(),n=YN({inst:{value:r,getSnapshot:t}}),i=n[0].inst,a=n[1];return XN(function(){i.value=r,i.getSnapshot=t,oc(i)&&a({inst:i})},[e,r,t]),JN(function(){return oc(i)&&a({inst:i}),e(function(){oc(i)&&a({inst:i})})},[e]),ZN(r),r}function oc(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!GN(e,r)}catch{return!0}}function ej(e,t){return t()}var tj=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?ej:QN;
vendor: 4,485 bytes, lines 2077-2085
2077rb.useSyncExternalStore=_n.useSyncExternalStore!==void 0?_n.useSyncExternalStore:tj;tb.exports=rb;var rj=tb.exports;/**
2078 * @license React
2079 * use-sync-external-store-shim/with-selector.production.js
2080 *
2081 * Copyright (c) Meta Platforms, Inc. and affiliates.
2082 *
2083 * This source code is licensed under the MIT license found in the
2084 * LICENSE file in the root directory of this source tree.
2085 */var Qo=m,nj=rj;function ij(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var aj=typeof Object.is=="function"?Object.is:ij,oj=nj.useSyncExternalStore,sj=Qo.useRef,cj=Qo.useEffect,lj=Qo.useMemo,uj=Qo.useDebugValue;eb.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var a=sj(null);if(a.current===null){var o={hasValue:!1,value:null};a.current=o}else o=a.current;a=lj(function(){function c(h){if(!l){if(l=!0,u=h,h=n(h),i!==void 0&&o.hasValue){var g=o.value;if(i(g,h))return d=g}return d=h}if(g=d,aj(u,h))return g;var v=n(h);return i!==void 0&&i(g,v)?(u=h,g):(u=h,d=v)}var l=!1,u,d,f=r===void 0?null:r;return[function(){return c(t())},f===null?void 0:function(){return c(f())}]},[t,r,n,i]);var s=oj(e,a[0],a[1]);return cj(function(){o.hasValue=!0,o.value=s},[s]),uj(s),s};Qv.exports=eb;var dj=Qv.exports,Du=m.createContext(null),fj=e=>e,de=()=>{var e=m.useContext(Du);return e?e.store.dispatch:fj},Aa=()=>{},hj=()=>Aa,pj=(e,t)=>e===t;function B(e){var t=m.useContext(Du);return dj.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:hj,t?t.store.getState:Aa,t?t.store.getState:Aa,t?e:Aa,pj)}function mj(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function gj(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function yj(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var hh=e=>Array.isArray(e)?e:[e];function vj(e){const t=Array.isArray(e[0])?e[0]:e;return yj(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function bj(e,t){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var wj=class{constructor(e){this.value=e}deref(){return this.value}},xj=typeof WeakRef<"u"?WeakRef:wj,Sj=0,ph=1;function sa(){return{s:Sj,v:void 0,o:null,p:null}}function nb(e,t={}){let r=sa();const{resultEqualityCheck:n}=t;let i,a=0;function o(){var d;let s=r;const{length:c}=arguments;for(let f=0,h=c;f<h;f++){const g=arguments[f];if(typeof g=="function"||typeof g=="object"&&g!==null){let v=s.o;v===null&&(s.o=v=new WeakMap);const y=v.get(g);y===void 0?(s=sa(),v.set(g,s)):s=y}else{let v=s.p;v===null&&(s.p=v=new Map);const y=v.get(g);y===void 0?(s=sa(),v.set(g,s)):s=y}}const l=s;let u;if(s.s===ph)u=s.v;else if(u=e.apply(null,arguments),a++,n){const f=((d=i==null?void 0:i.deref)==null?void 0:d.call(i))??i;f!=null&&n(f,u)&&(u=f,a!==0&&a--),i=typeof u=="object"&&u!==null||typeof u=="function"?new xj(u):u}return l.s=ph,l.v=u,u}return o.clearCache=()=>{r=sa(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function Pj(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let a=0,o=0,s,c={},l=i.pop();typeof l=="object"&&(c=l,l=i.pop()),mj(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const u={...r,...c},{memoize:d,memoizeOptions:f=[],argsMemoize:h=nb,argsMemoizeOptions:g=[]}=u,v=hh(f),y=hh(g),b=vj(i),S=d(function(){return a++,l.apply(null,arguments)},...v),w=h(function(){o++;const x=bj(b,arguments);return s=S.apply(null,x),s},...y);return Object.assign(w,{resultFunc:l,memoizedResultFunc:S,dependencies:b,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>s,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:d,argsMemoize:h})};return Object.assign(n,{withTypes:()=>n}),n}var E=Pj(nb),_j=Object.assign((e,t=E)=>{gj(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),n=r.map(a=>e[a]);return t(n,(...a)=>a.reduce((o,s,c)=>(o[r[c]]=s,o),{}))},{withTypes:()=>_j}),ib={},ab={},ob={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"?1:n===null?2:n===void 0?3:n!==n?4:0}const r=(n,i,a)=>
2085{if(n!==i){const o=t(n),s=t(i);if(o===s&&o===0){if(n<i)return a==="desc"?1:-1;if(n>i)return a==="desc"?-1:1}return a==="desc"?s-o:o-s}return 0};e.compareValues=r})(ob);var sb={},Ru={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(Ru);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ru,r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,o){return Array.isArray(a)?!1:typeof a=="number"||typeof a=="boolean"||a==null||t.isSymbol(a)?!0:typeof a=="string"&&(n.test(a)||!r.test(a))||o!=null&&Object.hasOwn(o,a)}e.isKey=i})(sb);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ob,r=sb,n=Jo;function i(a,o,s,c){if(a==null)return[];s=c?void 0:s,Array.isArray(a)||(a=Object.values(a)),Array.isArray(o)||(o=o==null?[null]:[o]),o.length===0&&(o=[null]),Array.isArray(s)||(s=s==null?[]:[s]),s=s.map(h=>String(h));const l=(h,g)=>{let v=h;for(let y=0;y<g.length&&v!=null;++y)v=v[g[y]];return v},u=(h,g)=>g==null||h==null?g:typeof h=="object"&&"key"in h?Object.hasOwn(g,h.key)?g[h.key]:l(g,h.path):typeof h=="function"?h(g):Array.isArray(h)?l(g,h):typeof g=="object"?g[h]:g,d=o.map(h=>(Array.isArray(h)&&h.length===1&&(h=h[0]),h==null||typeof h=="function"||Array.isArray(h)||r.isKey(h)?h:{key:h,path:n.toPath(h)}));return a.map(h=>({original:h,criteria:d.map(g=>u(g,h))})).slice().sort((h,g)=>{for(let v=0;v<d.length;v++){const y=t.compareValues(h.criteria[v],g.criteria[v],s[v]);if(y!==0)return y}return 0}).map(h=>h.original)}e.orderBy=i})(ab);var cb={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n=1){const i=[],a=Math.floor(n),o=(s,c)=>{for(let l=0;l<s.length;l++){const u=s[l];Array.isArray(u)&&c<a?o(u,c+1):i.push(u)}};return o(r,0),i}e.flatten=t})(cb);var $u={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Mu,r=Zo,n=Iu,i=Tu;function a(o,s,c){return n.isObject(c)&&(typeof s=="number"&&r.isArrayLike(c)&&t.isIndex(s)&&s<c.length||typeof s=="string"&&s in c)?i.eq(c[s],o):!1}e.isIterateeCall=a})($u);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ab,r=cb,n=$u;function i(a,...o){const s=o.length;return s>1&&n.isIterateeCall(a,o[0],o[1])?o=[]:s>2&&n.isIterateeCall(o[0],o[1],o[2])&&(o=[o[0]]),t.orderBy(a,r.flatten(o),["asc"])}e.sortBy=i})(ib);var Oj=ib.sortBy;const es=Ir(Oj);var lb=e=>e.legend.settings,Aj=e=>e.legend.size,Ej=e=>e.legend.payload,Ij=E([Ej,lb],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?es(n,r):n});function kj(){return B(Ij)}var ca=1;function ub(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=m.useState({height:0,left:0,top:0,width:0}),n=m.useCallback(i=>{if(i!=null){var a=i.getBoundingClientRect(),o={height:a.height,left:a.left,top:a.top,width:a.width};(Math.abs(o.height-t.height)>ca||Math.abs(o.left-t.left)>ca||Math.abs(o.top-t.top)>ca||Math.abs(o.width-t.width)>ca)&&r({height:o.height,left:o.left,top:o.top,width:o.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,n]}function Oe(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Tj=typeof Symbol=="function"&&Symbol.observable||"@@observable",mh=Tj,sc=()=>Math.random().toString(36).substring(7).split("").join("."),Cj={INIT:`@@redux/INIT${sc()}`,REPLACE:`@@redux/REPLACE${sc()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${sc()}`},Va=Cj;function Lu(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function db(e,t,r){if(typeof e!="function")throw new Error(Oe(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Oe(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Oe(1));return r(db)(e,t)}let n=e,i=t,a=new Map,o=a,s=0,c=!1;function l(){o===a&&(o=new Map,a.forEach((y,b)=>{o.set(b,y)}))}function u(){if(c)throw new Error(Oe(3));return i}function d(y){if(typeof y!="function")throw new Error(Oe(4));if(c)throw new Error(Oe(5));let b=!0;l();const S=s++;return o.set(S,y),function(){if(b){if(c)throw new Error(Oe(6));b=!1,l(),o.delete(S),a=null}}}function f(y){if(!Lu(y))throw new Error(Oe(7));if(typeof y.type>"u")throw new Error(Oe(8));if(typeof y.type!="string")throw new Error(Oe(17));if(c)throw new Error(Oe(9));try{c=!0,i=n(i,y)}finally{c=!1}
2085return(a=o).forEach(S=>{S()}),y}function h(y){if(typeof y!="function")throw new Error(Oe(10));n=y,f({type:Va.REPLACE})}function g(){const y=d;return{subscribe(b){if(typeof b!="object"||b===null)throw new Error(Oe(11));function S(){const _=b;_.next&&_.next(u())}return S(),{unsubscribe:y(S)}},[mh](){return this}}}return f({type:Va.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:h,[mh]:g}}function Nj(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:Va.INIT})>"u")throw new Error(Oe(12));if(typeof r(void 0,{type:Va.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Oe(13))})}function fb(e){const t=Object.keys(e),r={};for(let a=0;a<t.length;a++){const o=t[a];typeof e[o]=="function"&&(r[o]=e[o])}const n=Object.keys(r);let i;try{Nj(r)}catch(a){i=a}return function(o={},s){if(i)throw i;let c=!1;const l={};for(let u=0;u<n.length;u++){const d=n[u],f=r[d],h=o[d],g=f(h,s);if(typeof g>"u")throw s&&s.type,new Error(Oe(14));l[d]=g,c=c||g!==h}return c=c||n.length!==Object.keys(o).length,c?l:o}}function qa(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function jj(...e){return t=>(r,n)=>{const i=t(r,n);let a=()=>{throw new Error(Oe(15))};const o={getState:i.getState,dispatch:(c,...l)=>a(c,...l)},s=e.map(c=>c(o));return a=qa(...s)(i.dispatch),{...i,dispatch:a}}}function hb(e){return Lu(e)&&"type"in e&&typeof e.type=="string"}var pb=Symbol.for("immer-nothing"),gh=Symbol.for("immer-draftable"),Le=Symbol.for("immer-state");function mt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Xe=Object,On=Xe.getPrototypeOf,Ga="constructor",ts="prototype",Kc="configurable",Ya="enumerable",Ea="writable",mi="value",er=e=>!!e&&!!e[Le];function St(e){var t;return e?mb(e)||rs(e)||!!e[gh]||!!((t=e[Ga])!=null&&t[gh])||ns(e)||is(e):!1}var Mj=Xe[ts][Ga].toString(),yh=new WeakMap;function mb(e){if(!e||!Fu(e))return!1;const t=On(e);if(t===null||t===Xe[ts])return!0;const r=Xe.hasOwnProperty.call(t,Ga)&&t[Ga];if(r===Object)return!0;if(!ln(r))return!1;let n=yh.get(r);return n===void 0&&(n=Function.toString.call(r),yh.set(r,n)),n===Mj}function Li(e,t,r=!0){Fi(e)===0?(r?Reflect.ownKeys(e):Xe.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function Fi(e){const t=e[Le];return t?t.type_:rs(e)?1:ns(e)?2:is(e)?3:0}var vh=(e,t,r=Fi(e))=>r===2?e.has(t):Xe[ts].hasOwnProperty.call(e,t),Vc=(e,t,r=Fi(e))=>r===2?e.get(t):e[t],Ja=(e,t,r,n=Fi(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function Dj(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var rs=Array.isArray,ns=e=>e instanceof Map,is=e=>e instanceof Set,Fu=e=>typeof e=="object",ln=e=>typeof e=="function",cc=e=>typeof e=="boolean",Bt=e=>e.copy_||e.base_,Uu=e=>e.modified_?e.copy_:e.base_;function qc(e,t){if(ns(e))return new Map(e);if(is(e))return new Set(e);if(rs(e))return Array[ts].slice.call(e);const r=mb(e);if(t===!0||t==="class_only"&&!r){const n=Xe.getOwnPropertyDescriptors(e);delete n[Le];let i=Reflect.ownKeys(n);for(let a=0;a<i.length;a++){const o=i[a],s=n[o];s[Ea]===!1&&(s[Ea]=!0,s[Kc]=!0),(s.get||s.set)&&(n[o]={[Kc]:!0,[Ea]:!0,[Ya]:s[Ya],[mi]:e[o]})}return Xe.create(On(e),n)}else{const n=On(e);if(n!==null&&r)return{...e};const i=Xe.create(n);return Xe.assign(i,e)}}function Bu(e,t=!1){return as(e)||er(e)||!St(e)||(Fi(e)>1&&Xe.defineProperties(e,{set:la,add:la,clear:la,delete:la}),Xe.freeze(e),t&&Li(e,(r,n)=>{Bu(n,!0)},!1)),e}function Rj(){mt(2)}var la={[mi]:Rj};function as(e){return e===null||!Fu(e)?!0:Xe.isFrozen(e)}var Xa="MapSet",Gc="Patches",gb={};function An(e){const t=gb[e];return t||mt(0,e),t}var $j=e=>!!gb[e],gi,yb=()=>gi,Lj=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:$j(Xa)?An(Xa):void 0});function bh(e,t){t&&(e.patchPlugin_=An(Gc),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Yc(e){Jc(e),e.drafts_.forEach(Fj),e.drafts_=null}function Jc(e){e===gi&&(gi=e.parent_)}var wh=e=>gi=Lj(gi,e);function Fj(e){const t=e[Le];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function xh(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[Le].modified_&&(Yc(t),mt(4)),St(e)&&(e=Sh(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[Le].base_,e,t)}else e=Sh(t,r);return Uj(t,e,!0),Yc(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==pb?e:void 0}function Sh(e,t){if(as(t))return t;const r=t[Le];if(!r)return zu(t,e.handledSet_,e);if(!os(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);wb(r,e)}return r.copy_}function Uj(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Bu(t,r)}function vb(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var os=(e,t)=>e.scope_===t,Bj=[];function bb(e,t,r,n){const i=Bt(e),a=e.type_;if(n!==void 0&&Vc(i,n,a)===t){Ja(i,n,r,a);return}if(!e.draftLocations_){const s=e.draftLocations_=new Map;Li(i,(c,l)=>{if(er(l)){const u=s.get(l)||[];u.push(c),s.set(l,u)}})}const o=e.draftLocations_.get(t)??Bj;for(const s of o)Ja(i,s,r,a)}function zj(e,t,r){e.callbacks_.push(function(i){var s;const a=t;if(!a||!os(a,i))return;(s=i.mapSetPlugin_)==null||s.fixSetContents(a);const o=Uu(a);bb(e,a.draft_??a,o,r),wb(a,i)})}function wb(e,t){var n;if(e.modified_&&!e.finalized_&&(e.type_===3||(((n=e.assigned_)==null?void 0:n.size)??0)>0)){const{patchPlugin_:i}=t;if(i){const a=i.getPath(e);a&&i.generatePatches_(e,a,t)}vb(e)}}function Wj(e,t,r){const{scope_:n}=e;if(er(r)){const i=r[Le];os(i,n)&&i.callbacks_.push(function(){Ia(e);const o=Uu(i);bb(e,r,o,t)})}else St(r)&&e.callbacks_.push(function(){const a=Bt(e);Vc(a,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&zu(Vc(e.copy_,t,e.type_),n.handledSet_,n)})}function zu(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||er(e)||t.has(e)||!St(e)||as(e)||(t.add(e),Li(e,(n,i)=>{if(er(i)){const a=i[Le];if(os(a,r)){const o=Uu(a);Ja(e,n,o,e.type_),vb(a)}}else St(i)&&zu(i,t,r)})),e}function Hj(e,t){const r=rs(e),n={type_:r?1:0,scope_:t?t.scope_:yb(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=n,a=Wu;r&&(i=[n],a=yi);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return n.draft_=s,n.revoke_=o,[s,n]}var Wu={get(e,t){if(t===Le)return e;const r=Bt(e);
2085if(!vh(r,t,e.type_))return Kj(e,r,t);const n=r[t];if(e.finalized_||!St(n))return n;if(n===lc(e.base_,t)){Ia(e);const i=e.type_===1?+t:t,a=Zc(e.scope_,n,e,i);return e.copy_[i]=a}return n},has(e,t){return t in Bt(e)},ownKeys(e){return Reflect.ownKeys(Bt(e))},set(e,t,r){const n=xb(Bt(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=lc(Bt(e),t),a=i==null?void 0:i[Le];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(Dj(r,i)&&(r!==void 0||vh(e.base_,t,e.type_)))return!0;Ia(e),Xc(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),Wj(e,t,r)),!0},deleteProperty(e,t){return Ia(e),lc(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Xc(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Bt(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Ea]:!0,[Kc]:e.type_!==1||t!=="length",[Ya]:n[Ya],[mi]:r[t]}},defineProperty(){mt(11)},getPrototypeOf(e){return On(e.base_)},setPrototypeOf(){mt(12)}},yi={};Li(Wu,(e,t)=>{yi[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}});yi.deleteProperty=function(e,t){return yi.set.call(this,e,t,void 0)};yi.set=function(e,t,r){return Wu.set.call(this,e[0],t,r,e[0])};function lc(e,t){const r=e[Le];return(r?Bt(r):e)[t]}function Kj(e,t,r){var i;const n=xb(t,r);return n?mi in n?n[mi]:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function xb(e,t){if(!(t in e))return;let r=On(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=On(r)}}function Xc(e){e.modified_||(e.modified_=!0,e.parent_&&Xc(e.parent_))}function Ia(e){e.copy_||(e.assigned_=new Map,e.copy_=qc(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Vj=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,i)=>{if(ln(r)&&!ln(n)){const o=n;n=r;const s=this;return function(l=o,...u){return s.produce(l,d=>n.call(this,d,...u))}}ln(n)||mt(6),i!==void 0&&!ln(i)&&mt(7);let a;if(St(r)){const o=wh(this),s=Zc(o,r,void 0);let c=!0;try{a=n(s),c=!1}finally{c?Yc(o):Jc(o)}return bh(o,i),xh(a,o)}else if(!r||!Fu(r)){if(a=n(r),a===void 0&&(a=r),a===pb&&(a=void 0),this.autoFreeze_&&Bu(a,!0),i){const o=[],s=[];An(Gc).generateReplacementPatches_(r,a,{patches_:o,inversePatches_:s}),i(o,s)}return a}else mt(1,r)},this.produceWithPatches=(r,n)=>{if(ln(r))return(s,...c)=>this.produceWithPatches(s,l=>r(l,...c));let i,a;return[this.produce(r,n,(s,c)=>{i=s,a=c}),i,a]},cc(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),cc(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),cc(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){St(t)||mt(8),er(t)&&(t=bt(t));const r=wh(this),n=Zc(r,t,void 0);return n[Le].isManual_=!0,Jc(r),n}finishDraft(t,r){const n=t&&t[Le];(!n||!n.isManual_)&&mt(9);const{scope_:i}=n;return bh(i,r),xh(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const a=r[n];if(a.path.length===0&&a.op==="replace"){t=a.value;break}}n>-1&&(r=r.slice(n+1));const i=An(Gc).applyPatches_;return er(t)?i(t,r):this.produce(t,a=>i(a,r))}};function Zc(e,t,r,n){const[i,a]=ns(t)?An(Xa).proxyMap_(t,r):is(t)?An(Xa).proxySet_(t,r):Hj(t,r);return((r==null?void 0:r.scope_)??yb()).drafts_.push(i),a.callbacks_=(r==null?void 0:r.callbacks_)??[],a.key_=n,r&&n!==void 0?zj(r,a,n):a.callbacks_.push(function(c){var u;(u=c.mapSetPlugin_)==null||u.fixSetContents(a);const{patchPlugin_:l}=c;a.modified_&&l&&l.generatePatches_(a,[],c)}),i}function bt(e){return er(e)||mt(10,e),Sb(e)}function Sb(e){if(!St(e)||as(e))return e;const t=e[Le];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=qc(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=qc(e,!0);return Li(r,(i,a)=>{Ja(r,i,Sb(a))},n),t&&(t.finalized_=!1),r}var qj=new Vj,Pb=qj.produce;function _b(e){return({dispatch:r,getState:n})=>i=>a=>typeof a=="function"?a(r,n,e):i(a)}var Gj=_b(),Yj=_b,Jj=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?qa:qa.apply(null,arguments)};function dt(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(Ze(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>hb(n)&&n.type===e,r}var Ob=class ii extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ii.prototype)}static get[Symbol.species](){return ii}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ii(...t[0].concat(this)):new ii(...t.concat(this))}};function Ph(e){return St(e)?Pb(e,()=>{}):e}function ua(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Xj(e){return typeof e=="boolean"}var Zj=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=t??{};let o=new Ob;return r&&(Xj(r)?o.push(Gj):o.push(Yj(r.extraArgument))),o},Ab="RTK_autoBatch",ie=()=>e=>({payload:e,meta:{[Ab]:!0}}),_h=e=>t=>{setTimeout(t,e)},Eb=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,a=!1,o=!1;const s=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:_h(10):e.type==="callback"?e.queueNotification:_h(e.timeout),l=()=>
2085{o=!1,a&&(a=!1,s.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){const d=()=>i&&u(),f=n.subscribe(d);return s.add(u),()=>{f(),s.delete(u)}},dispatch(u){var d;try{return i=!((d=u==null?void 0:u.meta)!=null&&d[Ab]),a=!i,a&&(o||(o=!0,c(l))),n.dispatch(u)}finally{i=!0}}})},Qj=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new Ob(e);return n&&i.push(Eb(typeof n=="object"?n:void 0)),i};function eM(e){const t=Zj(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:a=void 0,enhancers:o=void 0}=e||{};let s;if(typeof r=="function")s=r;else if(Lu(r))s=fb(r);else throw new Error(Ze(1));let c;typeof n=="function"?c=n(t):c=t();let l=qa;i&&(l=Jj({trace:!1,...typeof i=="object"&&i}));const u=jj(...c),d=Qj(u);let f=typeof o=="function"?o(d):d();const h=l(...f);return db(s,a,h)}function Ib(e){const t={},r=[];let n;const i={addCase(a,o){const s=typeof a=="string"?a:a.type;if(!s)throw new Error(Ze(28));if(s in t)throw new Error(Ze(29));return t[s]=o,i},addAsyncThunk(a,o){return o.pending&&(t[a.pending.type]=o.pending),o.rejected&&(t[a.rejected.type]=o.rejected),o.fulfilled&&(t[a.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:a.settled,reducer:o.settled}),i},addMatcher(a,o){return r.push({matcher:a,reducer:o}),i},addDefaultCase(a){return n=a,i}};return e(i),[t,r,n]}function tM(e){return typeof e=="function"}function rM(e,t){let[r,n,i]=Ib(t),a;if(tM(e))a=()=>Ph(e());else{const s=Ph(e);a=()=>s}function o(s=a(),c){let l=[r[c.type],...n.filter(({matcher:u})=>u(c)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[i]),l.reduce((u,d)=>{if(d)if(er(u)){const h=d(u,c);return h===void 0?u:h}else{if(St(u))return Pb(u,f=>d(f,c));{const f=d(u,c);if(f===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return u},s)}return o.getInitialState=a,o}var nM="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",iM=(e=21)=>{let t="",r=e;for(;r--;)t+=nM[Math.random()*64|0];return t},aM=Symbol.for("rtk-slice-createasyncthunk");function oM(e,t){return`${e}/${t}`}function sM({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[aM];return function(i){const{name:a,reducerPath:o=a}=i;if(!a)throw new Error(Ze(11));const s=(typeof i.reducers=="function"?i.reducers(lM()):i.reducers)||{},c=Object.keys(s),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(_,x){const O=typeof _=="string"?_:_.type;if(!O)throw new Error(Ze(12));if(O in l.sliceCaseReducersByType)throw new Error(Ze(13));return l.sliceCaseReducersByType[O]=x,u},addMatcher(_,x){return l.sliceMatchers.push({matcher:_,reducer:x}),u},exposeAction(_,x){return l.actionCreators[_]=x,u},exposeCaseReducer(_,x){return l.sliceCaseReducersByName[_]=x,u}};c.forEach(_=>{const x=s[_],O={reducerName:_,type:oM(a,_),createNotation:typeof i.reducers=="function"};dM(x)?hM(O,x,u,t):uM(O,x,u)});function d(){const[_={},x=[],O=void 0]=typeof i.extraReducers=="function"?Ib(i.extraReducers):[i.extraReducers],P={..._,...l.sliceCaseReducersByType};return rM(i.initialState,k=>{for(let I in P)k.addCase(I,P[I]);for(let I of l.sliceMatchers)k.addMatcher(I.matcher,I.reducer);for(let I of x)k.addMatcher(I.matcher,I.reducer);O&&k.addDefaultCase(O)})}const f=_=>_,h=new Map,g=new WeakMap;let v;function y(_,x){return v||(v=d()),v(_,x)}function b(){return v||(v=d()),v.getInitialState()}function S(_,x=!1){function O(k){let I=k[_];return typeof I>"u"&&x&&(I=ua(g,O,b)),I}function P(k=f){const I=ua(h,x,()=>new WeakMap);return ua(I,k,()=>{const D={};for(const[T,C]of Object.entries(i.selectors??{}))D[T]=cM(C,k,()=>ua(g,k,b),x);return D})}return{reducerPath:_,getSelectors:P,get selectors(){return P(O)},selectSlice:O}}const w={name:a,reducer:y,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:b,...S(o),injectInto(_,{reducerPath:x,...O}={}){const P=x??o;return _.inject({reducerPath:P,reducer:y},O),{...w,...S(P,!0)}}};return w}}function cM(e,t,r,n){function i(a,...o){let s=t(a);return typeof s>"u"&&n&&(s=r()),e(s,...o)}return i.unwrapped=e,i}var Ke=sM();function lM(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}
2085[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function uM({type:e,reducerName:t,createNotation:r},n,i){let a,o;if("reducer"in n){if(r&&!fM(n))throw new Error(Ze(17));a=n.reducer,o=n.prepare}else a=n;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?dt(e,o):dt(e))}function dM(e){return e._reducerDefinitionType==="asyncThunk"}function fM(e){return e._reducerDefinitionType==="reducerWithPrepare"}function hM({type:e,reducerName:t},r,n,i){if(!i)throw new Error(Ze(18));const{payloadCreator:a,fulfilled:o,pending:s,rejected:c,settled:l,options:u}=r,d=i(e,a,u);n.exposeAction(t,d),o&&n.addCase(d.fulfilled,o),s&&n.addCase(d.pending,s),c&&n.addCase(d.rejected,c),l&&n.addMatcher(d.settled,l),n.exposeCaseReducer(t,{fulfilled:o||da,pending:s||da,rejected:c||da,settled:l||da})}function da(){}var pM="task",kb="listener",Tb="completed",Hu="cancelled",mM=`task-${Hu}`,gM=`task-${Tb}`,Qc=`${kb}-${Hu}`,yM=`${kb}-${Tb}`,ss=class{constructor(e){zs(this,"name","TaskAbortError");zs(this,"message");this.code=e,this.message=`${pM} ${Hu} (reason: ${e})`}},Ku=(e,t)=>{if(typeof e!="function")throw new TypeError(Ze(32))},Za=()=>{},Cb=(e,t=Za)=>(e.catch(t),e),Nb=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Hr=e=>{if(e.aborted)throw new ss(e.reason)};function jb(e,t){let r=Za;return new Promise((n,i)=>{const a=()=>i(new ss(e.reason));if(e.aborted){a();return}r=Nb(e,a),t.finally(()=>r()).then(n,i)}).finally(()=>{r=Za})}var vM=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof ss?"cancelled":"rejected",error:r}}finally{t==null||t()}},Qa=e=>t=>Cb(jb(e,t).then(r=>(Hr(e),r))),Mb=e=>{const t=Qa(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:vn}=Object,Oh={},cs="listenerMiddleware",bM=(e,t)=>{const r=n=>Nb(e,()=>n.abort(e.reason));return(n,i)=>{Ku(n);const a=new AbortController;r(a);const o=vM(async()=>{Hr(e),Hr(a.signal);const s=await n({pause:Qa(a.signal),delay:Mb(a.signal),signal:a.signal});return Hr(a.signal),s},()=>a.abort(gM));return i!=null&&i.autoJoin&&t.push(o.catch(Za)),{result:Qa(e)(o),cancel(){a.abort(mM)}}}},wM=(e,t)=>{const r=async(n,i)=>{Hr(t);let a=()=>{};const s=[new Promise((c,l)=>{let u=e({predicate:n,effect:(d,f)=>{f.unsubscribe(),c([d,f.getState(),f.getOriginalState()])}});a=()=>{u(),l()}})];i!=null&&s.push(new Promise(c=>setTimeout(c,i,null)));try{const c=await jb(t,Promise.race(s));return Hr(t),c}finally{a()}};return(n,i)=>Cb(r(n,i))},Db=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:a}=e;if(t)i=dt(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(Ze(21));return Ku(a),{predicate:i,type:t,effect:a}},Rb=vn(e=>{const{type:t,predicate:r,effect:n}=Db(e);
2085return{id:iM(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Ze(22))}}},{withTypes:()=>Rb}),Ah=(e,t)=>{const{type:r,effect:n,predicate:i}=Db(t);return Array.from(e.values()).find(a=>(typeof r=="string"?a.type===r:a.predicate===i)&&a.effect===n)},el=e=>{e.pending.forEach(t=>{t.abort(Qc)})},xM=(e,t)=>()=>{for(const r of t.keys())el(r);e.clear()},Eh=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},$b=vn(dt(`${cs}/add`),{withTypes:()=>$b}),SM=dt(`${cs}/removeAll`),Lb=vn(dt(`${cs}/remove`),{withTypes:()=>Lb}),PM=(...e)=>{console.error(`${cs}/error`,...e)},Ui=(e={})=>{const t=new Map,r=new Map,n=h=>{const g=r.get(h)??0;r.set(h,g+1)},i=h=>{const g=r.get(h)??1;g===1?r.delete(h):r.set(h,g-1)},{extra:a,onError:o=PM}=e;Ku(o);const s=h=>(h.unsubscribe=()=>t.delete(h.id),t.set(h.id,h),g=>{h.unsubscribe(),g!=null&&g.cancelActive&&el(h)}),c=h=>{const g=Ah(t,h)??Rb(h);return s(g)};vn(c,{withTypes:()=>c});const l=h=>{const g=Ah(t,h);return g&&(g.unsubscribe(),h.cancelActive&&el(g)),!!g};vn(l,{withTypes:()=>l});const u=async(h,g,v,y)=>{const b=new AbortController,S=wM(c,b.signal),w=[];try{h.pending.add(b),n(h),await Promise.resolve(h.effect(g,vn({},v,{getOriginalState:y,condition:(_,x)=>S(_,x).then(Boolean),take:S,delay:Mb(b.signal),pause:Qa(b.signal),extra:a,signal:b.signal,fork:bM(b.signal,w),unsubscribe:h.unsubscribe,subscribe:()=>{t.set(h.id,h)},cancelActiveListeners:()=>{h.pending.forEach((_,x,O)=>{_!==b&&(_.abort(Qc),O.delete(_))})},cancel:()=>{b.abort(Qc),h.pending.delete(b)},throwIfCancelled:()=>{Hr(b.signal)}})))}catch(_){_ instanceof ss||Eh(o,_,{raisedBy:"effect"})}finally{await Promise.all(w),b.abort(yM),i(h),h.pending.delete(b)}},d=xM(t,r);return{middleware:h=>g=>v=>{if(!hb(v))return g(v);if($b.match(v))return c(v.payload);if(SM.match(v)){d();return}if(Lb.match(v))return l(v.payload);let y=h.getState();const b=()=>{if(y===Oh)throw new Error(Ze(23));return y};let S;try{if(S=g(v),t.size>0){const w=h.getState(),_=Array.from(t.values());for(const x of _){let O=!1;try{O=x.predicate(v,w,y)}catch(P){O=!1,Eh(o,P,{raisedBy:"predicate"})}O&&u(x,v,h,b)}}}finally{y=Oh}return S},startListening:c,stopListening:l,clearListeners:d}};function Ze(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var _M={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},Fb=Ke({name:"chartLayout",initialState:_M,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,i,a;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(a=t.payload.left)!==null&&a!==void 0?a:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:OM,setLayout:AM,setChartSize:EM,setScale:IM}=Fb.actions,kM=Fb.reducer;function Ub(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function Ih(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function dn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ih(Object(r),!0).forEach(function(n){TM(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ih(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TM(e,t,r){return(t=CM(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function CM(e){var t=NM(e,"string");return typeof t=="symbol"?t:t+""}function NM(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xe(e,t,r){return he(e)||he(t)?r:jt(t)?Xo(e,t,r):typeof t=="function"?t(e):r}var jM=(e,t,r)=>{if(t&&r){var{width:n,height:i}=r,{align:a,verticalAlign:o,layout:s}=t;if((s==="vertical"||s==="horizontal"&&o==="middle")&&a!=="center"&&U(e[a]))return dn(dn({},e),{},{[a]:e[a]+(n||0)});if((s==="horizontal"||s==="vertical"&&a==="center")&&o!=="middle"&&U(e[o]))return dn(dn({},e),{},{[o]:e[o]+(i||0)})}return e},Lt=(e,t)=>
2085e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",Bb=(e,t,r,n)=>{if(n)return e.map(s=>s.coordinate);var i,a,o=e.map(s=>(s.coordinate===t&&(i=!0),s.coordinate===r&&(a=!0),s.coordinate));return i||o.push(t),a||o.push(r),o},zb=(e,t,r)=>{if(!e)return null;var{duplicateDomain:n,type:i,range:a,scale:o,realScaleType:s,isCategorical:c,categoricalDomain:l,tickCount:u,ticks:d,niceTicks:f,axisType:h}=e;if(!o)return null;var g=s==="scaleBand"&&o.bandwidth?o.bandwidth()/2:2,v=i==="category"&&o.bandwidth?o.bandwidth()/g:0;if(v=h==="angleAxis"&&a&&a.length>=2?ot(a[0]-a[1])*2*v:v,d||f){var y=(d||f||[]).map((b,S)=>{var w=n?n.indexOf(b):b;return{coordinate:o(w)+v,value:b,offset:v,index:S}});return y.filter(b=>!xt(b.coordinate))}return c&&l?l.map((b,S)=>({coordinate:o(b)+v,value:b,index:S,offset:v})):o.ticks&&u!=null?o.ticks(u).map((b,S)=>({coordinate:o(b)+v,value:b,offset:v,index:S})):o.domain().map((b,S)=>({coordinate:o(b)+v,value:n?n[b]:b,index:S,offset:v}))},kh=1e-4,MM=e=>{var t=e.domain();if(!(!t||t.length<=2)){var r=t.length,n=e.range(),i=Math.min(n[0],n[1])-kh,a=Math.max(n[0],n[1])+kh,o=e(t[0]),s=e(t[r-1]);(o<i||o>a||s<i||s>a)&&e.domain([t[0],t[r-1]])}},DM=e=>{var t=e.length;if(!(t<=0))for(var r=0,n=e[0].length;r<n;++r)for(var i=0,a=0,o=0;o<t;++o){var s=xt(e[o][r][1])?e[o][r][0]:e[o][r][1];s>=0?(e[o][r][0]=i,e[o][r][1]=i+s,i=e[o][r][1]):(e[o][r][0]=a,e[o][r][1]=a+s,a=e[o][r][1])}},RM=e=>{var t=e.length;if(!(t<=0))for(var r=0,n=e[0].length;r<n;++r)for(var i=0,a=0;a<t;++a){var o=xt(e[a][r][1])?e[a][r][0]:e[a][r][1];o>=0?(e[a][r][0]=i,e[a][r][1]=i+o,i=e[a][r][1]):(e[a][r][0]=0,e[a][r][1]=0)}},$M={sign:DM,expand:yN,none:Pn,silhouette:vN,wiggle:bN,positive:RM},LM=(e,t,r)=>{var n=$M[r],i=gN().keys(t).value((a,o)=>Number(xe(a,o,0))).order(Wc).offset(n);return i(e)};function FM(e){return e==null?void 0:String(e)}function eo(e){var{axis:t,ticks:r,bandSize:n,entry:i,index:a,dataKey:o}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!he(i[t.dataKey])){var s=Cv(r,"value",i[t.dataKey]);if(s)return s.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var c=xe(i,he(o)?t.dataKey:o);return he(c)?null:t.scale(c)}var UM=e=>{var t=e.flat(2).filter(U);return[Math.min(...t),Math.max(...t)]},BM=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],zM=(e,t,r)=>{if(e!=null)return BM(Object.keys(e).reduce((n,i)=>{var a=e[i],{stackedData:o}=a,s=o.reduce((c,l)=>{var u=Ub(l,t,r),d=UM(u);return[Math.min(c[0],d[0]),Math.max(c[1],d[1])]},[1/0,-1/0]);return[Math.min(s[0],n[0]),Math.max(s[1],n[1])]},[1/0,-1/0]))},Th=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Ch=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,En=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=es(t,u=>u.coordinate),a=1/0,o=1,s=i.length;o<s;o++){var c=i[o],l=i[o-1];a=Math.min((c.coordinate||0)-(l.coordinate||0),a)}return a===1/0?0:a}return r?void 0:0};function Nh(e){var{tooltipEntrySettings:t,dataKey:r,payload:n,value:i,name:a}=e;return dn(dn({},t),{},{dataKey:r,payload:n,value:i,name:a})}function ls(e,t){if(e)return String(e);if(typeof t=="string")return t}var WM=(e,t)=>{if(t==="horizontal")return e.chartX;if(t==="vertical")return e.chartY},HM=(e,t)=>t==="centric"?e.angle:e.radius,sr=e=>e.layout.width,cr=e=>e.layout.height,KM=e=>e.layout.scale,Wb=e=>e.layout.margin,us=E(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),ds=E(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),VM="data-recharts-item-index",qM="data-recharts-item-data-key",Bi=60;function jh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jh(Object(r),!0).forEach(function(n){GM(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function GM(e,t,r){return(t=YM(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YM(e){var t=JM(e,"string");return typeof t=="symbol"?t:t+""}function JM(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var XM=e=>e.brush.height;function ZM(e){var t=ds(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:Bi;return r+i}return r},0)}function QM(e){var t=ds(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:Bi;return r+i}return r},0)}function eD(e){var t=us(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function tD(e){var t=us(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Ee=E([sr,cr,Wb,XM,ZM,QM,eD,tD,lb,Aj],(e,t,r,n,i,a,o,s,c,l)=>{var u={left:(r.left||0)+i,right:(r.right||0)+a},d={top:(r.top||0)+o,bottom:(r.bottom||0)+s},f=fa(fa({},d),u),h=f.bottom;f.bottom+=n,f=jM(f,c,l);var g=e-f.left-f.right,v=t-f.top-f.bottom;return fa(fa({brushBottom:h},f),{},{width:Math.max(g,0),height:Math.max(v,0)})}),rD=E(Ee,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),Hb=E(sr,cr,(e,t)=>({x:0,y:0,width:e,height:t})),nD=m.createContext(null),Me=()=>m.useContext(nD)!=null,fs=e=>e.brush,hs=E([fs,Ee,Wb],(e,t,r)=>({height:e.height,x:U(e.x)?e.x:t.left,y:U(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:U(e.width)?e.width:t.width})),Kb={},Vb={},qb={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n,{signal:i,edges:a}={}){let o,s=null;const c=a!=null&&a.includes("leading"),l=a==null||a.includes("trailing"),u=()=>{s!==null&&(r.apply(o,s),o=void 0,s=null)},d=()=>
2085{l&&u(),v()};let f=null;const h=()=>{f!=null&&clearTimeout(f),f=setTimeout(()=>{f=null,d()},n)},g=()=>{f!==null&&(clearTimeout(f),f=null)},v=()=>{g(),o=void 0,s=null},y=()=>{u()},b=function(...S){if(i!=null&&i.aborted)return;o=this,s=S;const w=f==null;h(),c&&w&&u()};return b.schedule=h,b.cancel=v,b.flush=y,i==null||i.addEventListener("abort",v,{once:!0}),b}e.debounce=t})(qb);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=qb;function r(n,i=0,a={}){typeof a!="object"&&(a={});const{leading:o=!1,trailing:s=!0,maxWait:c}=a,l=Array(2);o&&(l[0]="leading"),s&&(l[1]="trailing");let u,d=null;const f=t.debounce(function(...v){u=n.apply(this,v),d=null},i,{edges:l}),h=function(...v){return c!=null&&(d===null&&(d=Date.now()),Date.now()-d>=c)?(u=n.apply(this,v),d=Date.now(),f.cancel(),f.schedule(),u):(f.apply(this,v),u)},g=()=>(f.flush(),u);return h.cancel=f.cancel,h.flush=g,h}e.debounce=r})(Vb);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Vb;function r(n,i=0,a={}){const{leading:o=!0,trailing:s=!0}=a;return t.debounce(n,i,{leading:o,maxWait:i,trailing:s})}e.throttle=r})(Kb);var iD=Kb.throttle;const aD=Ir(iD);var to=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];if(typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;console.warn(r.replace(/%s/g,()=>i[o++]))}},Gb=(e,t,r)=>{var{width:n="100%",height:i="100%",aspect:a,maxHeight:o}=r,s=Qt(n)?e:Number(n),c=Qt(i)?t:Number(i);return a&&a>0&&(s?c=s/a:c&&(s=c*a),o&&c!=null&&c>o&&(c=o)),{calculatedWidth:s,calculatedHeight:c}},oD={width:0,height:0,overflow:"visible"},sD={width:0,overflowX:"visible"},cD={height:0,overflowY:"visible"},lD={},uD=e=>{var{width:t,height:r}=e,n=Qt(t),i=Qt(r);return n&&i?oD:n?sD:i?cD:lD};function dD(e){var{width:t,height:r,aspect:n}=e,i=t,a=r;return i===void 0&&a===void 0?(i="100%",a="100%"):i===void 0?i=n&&n>0?void 0:"100%":a===void 0&&(a=n&&n>0?void 0:"100%"),{width:i,height:a}}function oe(e){return Number.isFinite(e)}function Mt(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function tl(){return tl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tl.apply(null,arguments)}function Mh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Dh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mh(Object(r),!0).forEach(function(n){fD(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fD(e,t,r){return(t=hD(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hD(e){var t=pD(e,"string");return typeof t=="symbol"?t:t+""}function pD(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Yb=m.createContext({width:-1,height:-1});function mD(e){return Mt(e.width)&&Mt(e.height)}function Jb(e){var{children:t,width:r,height:n}=e,i=m.useMemo(()=>({width:r,height:n}),[r,n]);return mD(i)?m.createElement(Yb.Provider,{value:i},t):null}var Vu=()=>m.useContext(Yb),gD=m.forwardRef((e,t)=>{var{aspect:r,initialDimension:n={width:-1,height:-1},width:i,height:a,minWidth:o=0,minHeight:s,maxHeight:c,children:l,debounce:u=0,id:d,className:f,onResize:h,style:g={}}=e,v=m.useRef(null),y=m.useRef();y.current=h,m.useImperativeHandle(t,()=>v.current);var[b,S]=m.useState({containerWidth:n.width,containerHeight:n.height}),w=m.useCallback((k,I)=>{S(D=>{var T=Math.round(k),C=Math.round(I);return D.containerWidth===T&&D.containerHeight===C?D:{containerWidth:T,containerHeight:C}})},[]);m.useEffect(()=>{if(v.current==null||typeof ResizeObserver>"u")return $i;var k=C=>{var R,{width:j,height:$}=C[0].contentRect;w(j,$),(R=y.current)===null||R===void 0||R.call(y,j,$)};u>0&&(k=aD(k,u,{trailing:!0,leading:!1}));var I=new ResizeObserver(k),{width:D,height:T}=v.current.getBoundingClientRect();return w(D,T),I.observe(v.current),()=>{I.disconnect()}},[w,u]);var{containerWidth:_,containerHeight:x}=b;to(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:O,calculatedHeight:P}=Gb(_,x,{width:i,height:a,aspect:r,maxHeight:c});return to(O!=null&&O>0||P!=null&&P>0,`The width(%s) and height(%s) of chart should be greater than 0,
2086       please check the style of container, or the props width(%s) and height(%s),
2087       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
2088       height and width.`,O,P,i,a,o,s,r),m.createElement("div",{id:d?"".concat(d):void 0,className:J("recharts-responsive-container",f),style:Dh(Dh({},g),{},{width:i,height:a,minWidth:o,minHeight:s,maxHeight:c}),ref:v},m.createElement("div",{style:uD({width:i,height:a})},m.createElement(Jb,{width:O,height:P},l)))}),Xb=m.forwardRef((e,t)=>
2088{var r=Vu();if(Mt(r.width)&&Mt(r.height))return e.children;var{width:n,height:i}=dD({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:a,calculatedHeight:o}=Gb(void 0,void 0,{width:n,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return U(a)&&U(o)?m.createElement(Jb,{width:a,height:o},e.children):m.createElement(gD,tl({},e,{width:n,height:i,ref:t}))});function Zb(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var ps=()=>{var e,t=Me(),r=B(rD),n=B(hs),i=(e=B(fs))===null||e===void 0?void 0:e.padding;return!t||!n||!i?r:{width:n.width-i.left-i.right,height:n.height-i.top-i.bottom,x:i.left,y:i.top}},yD={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},Qb=()=>{var e;return(e=B(Ee))!==null&&e!==void 0?e:yD},qu=()=>B(sr),Gu=()=>B(cr),vD=()=>B(e=>e.layout.margin),Z=e=>e.layout.layoutType,Dn=()=>B(Z),bD=()=>{var e=Dn();if(e==="horizontal"||e==="vertical")return e},wD=()=>{var e=Dn();return e!==void 0},ms=e=>{var t=de(),r=Me(),{width:n,height:i}=e,a=Vu(),o=n,s=i;return a&&(o=a.width>0?a.width:n,s=a.height>0?a.height:i),m.useEffect(()=>{!r&&Mt(o)&&Mt(s)&&t(EM({width:o,height:s}))},[t,r,o,s]),null},e0=Symbol.for("immer-nothing"),Rh=Symbol.for("immer-draftable"),Qe=Symbol.for("immer-state");function gt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var vi=Object.getPrototypeOf;function In(e){return!!e&&!!e[Qe]}function Xr(e){var t;return e?t0(e)||Array.isArray(e)||!!e[Rh]||!!((t=e.constructor)!=null&&t[Rh])||zi(e)||ys(e):!1}var xD=Object.prototype.constructor.toString(),$h=new WeakMap;function t0(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=$h.get(r);return n===void 0&&(n=Function.toString.call(r),$h.set(r,n)),n===xD}function ro(e,t,r=!0){gs(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function gs(e){const t=e[Qe];return t?t.type_:Array.isArray(e)?1:zi(e)?2:ys(e)?3:0}function rl(e,t){return gs(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function r0(e,t,r){const n=gs(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function SD(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function zi(e){return e instanceof Map}function ys(e){return e instanceof Set}function Lr(e){return e.copy_||e.base_}function nl(e,t){if(zi(e))return new Map(e);if(ys(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=t0(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[Qe];let i=Reflect.ownKeys(n);for(let a=0;a<i.length;a++){const o=i[a],s=n[o];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[o]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[o]})}return Object.create(vi(e),n)}else{const n=vi(e);if(n!==null&&r)return{...e};const i=Object.create(n);return Object.assign(i,e)}}function Yu(e,t=!1){return vs(e)||In(e)||!Xr(e)||(gs(e)>1&&Object.defineProperties(e,{set:ha,add:ha,clear:ha,delete:ha}),Object.freeze(e),t&&Object.values(e).forEach(r=>Yu(r,!0))),e}function PD(){gt(2)}var ha={value:PD};function vs(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var _D={};function Zr(e){const t=_D[e];return t||gt(0,e),t}var bi;function n0(){return bi}function OD(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Lh(e,t){t&&(Zr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function il(e){al(e),e.drafts_.forEach(AD),e.drafts_=null}function al(e){e===bi&&(bi=e.parent_)}function Fh(e){return bi=OD(bi,e)}function AD(e){const t=e[Qe];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Uh(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[Qe].modified_&&(il(t),gt(4)),Xr(e)&&(e=no(t,e),t.parent_||io(t,e)),t.patches_&&Zr("Patches").generateReplacementPatches_(r[Qe].base_,e,t.patches_,t.inversePatches_)):e=no(t,r,[]),il(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==e0?e:void 0}function no(e,t,r){if(vs(t))return t;const n=e.immer_.shouldUseStrictIteration(),i=t[Qe];if(!i)return ro(t,(a,o)=>Bh(e,i,t,a,o,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return io(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const a=i.copy_;let o=a,s=!1;
2088i.type_===3&&(o=new Set(a),a.clear(),s=!0),ro(o,(c,l)=>Bh(e,i,a,c,l,r,s),n),io(e,a,!1),r&&e.patches_&&Zr("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function Bh(e,t,r,n,i,a,o){if(i==null||typeof i!="object"&&!o)return;const s=vs(i);if(!(s&&!o)){if(In(i)){const c=a&&t&&t.type_!==3&&!rl(t.assigned_,n)?a.concat(n):void 0,l=no(e,i,c);if(r0(r,n,l),In(l))e.canAutoFreeze_=!1;else return}else o&&r.add(i);if(Xr(i)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===i&&s)return;no(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(zi(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&io(e,i)}}}function io(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Yu(t,r)}function ED(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:n0(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,a=Ju;r&&(i=[n],a=wi);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return n.draft_=s,n.revoke_=o,s}var Ju={get(e,t){if(t===Qe)return e;const r=Lr(e);if(!rl(r,t))return ID(e,r,t);const n=r[t];return e.finalized_||!Xr(n)?n:n===uc(e.base_,t)?(dc(e),e.copy_[t]=sl(n,e)):n},has(e,t){return t in Lr(e)},ownKeys(e){return Reflect.ownKeys(Lr(e))},set(e,t,r){const n=i0(Lr(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=uc(Lr(e),t),a=i==null?void 0:i[Qe];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(SD(r,i)&&(r!==void 0||rl(e.base_,t)))return!0;dc(e),ol(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return uc(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,dc(e),ol(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Lr(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){gt(11)},getPrototypeOf(e){return vi(e.base_)},setPrototypeOf(){gt(12)}},wi={};ro(Ju,(e,t)=>{wi[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});wi.deleteProperty=function(e,t){return wi.set.call(this,e,t,void 0)};wi.set=function(e,t,r){return Ju.set.call(this,e[0],t,r,e[0])};function uc(e,t){const r=e[Qe];return(r?Lr(r):e)[t]}function ID(e,t,r){var i;const n=i0(t,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function i0(e,t){if(!(t in e))return;let r=vi(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=vi(r)}}function ol(e){e.modified_||(e.modified_=!0,e.parent_&&ol(e.parent_))}function dc(e){e.copy_||(e.copy_=nl(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var kD=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const a=r;r=t;const o=this;return function(c=a,...l){return o.produce(c,u=>r.call(this,u,...l))}}typeof r!="function"&&gt(6),n!==void 0&&typeof n!="function"&&gt(7);let i;if(Xr(t)){const a=Fh(this),o=sl(t,void 0);let s=!0;try{i=r(o),s=!1}finally{s?il(a):al(a)}return Lh(a,n),Uh(i,a)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===e0&&(i=void 0),this.autoFreeze_&&Yu(i,!0),n){const a=[],o=[];Zr("Patches").generateReplacementPatches_(t,i,a,o),n(a,o)}return i}else gt(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(o,...s)=>this.produceWithPatches(o,c=>t(c,...s));let n,i;return[this.produce(t,r,(o,s)=>{n=o,i=s}),n,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Xr(e)||gt(8),In(e)&&(e=TD(e));const t=Fh(this),r=sl(e,void 0);return r[Qe].isManual_=!0,al(t),r}finishDraft(e,t){const r=e&&e[Qe];(!r||!r.isManual_)&&gt(9);const{scope_:n}=r;return Lh(n,t),Uh(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const i=t[r];
2088if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));const n=Zr("Patches").applyPatches_;return In(e)?n(e,t):this.produce(e,i=>n(i,t))}};function sl(e,t){const r=zi(e)?Zr("MapSet").proxyMap_(e,t):ys(e)?Zr("MapSet").proxySet_(e,t):ED(e,t);return(t?t.scope_:n0()).drafts_.push(r),r}function TD(e){return In(e)||gt(10,e),a0(e)}function a0(e){if(!Xr(e)||vs(e))return e;const t=e[Qe];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=nl(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=nl(e,!0);return ro(r,(i,a)=>{r0(r,i,a0(a))},n),t&&(t.finalized_=!1),r}var CD=new kD;CD.produce;var ND={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},o0=Ke({name:"legend",initialState:ND,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:ie()},replaceLegendPayload:{reducer(e,t){var{prev:r,next:n}=t.payload,i=bt(e).payload.indexOf(r);i>-1&&(e.payload[i]=n)},prepare:ie()},removeLegendPayload:{reducer(e,t){var r=bt(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:ie()}}}),{setLegendSize:zh,setLegendSettings:jD,addLegendPayload:MD,replaceLegendPayload:DD,removeLegendPayload:RD}=o0.actions,$D=o0.reducer,LD=["contextPayload"];function cl(){return cl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cl.apply(null,arguments)}function Wh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function kn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wh(Object(r),!0).forEach(function(n){FD(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FD(e,t,r){return(t=UD(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UD(e){var t=BD(e,"string");return typeof t=="symbol"?t:t+""}function BD(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zD(e,t){if(e==null)return{};var r,n,i=WD(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function WD(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function HD(e){return e.value}function KD(e){var{contextPayload:t}=e,r=zD(e,LD),n=Zv(t,e.payloadUniqBy,HD),i=kn(kn({},r),{},{payload:n});return m.isValidElement(e.content)?m.cloneElement(e.content,i):typeof e.content=="function"?m.createElement(e.content,i):m.createElement(KN,i)}function VD(e,t,r,n,i,a){var{layout:o,align:s,verticalAlign:c}=t,l,u;return(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null))&&(s==="center"&&o==="vertical"?l={left:((n||0)-a.width)/2}:l=s==="right"?{right:r&&r.right||0}:{left:r&&r.left||0}),(!e||(e.top===void 0||e.top===null)&&(e.bottom===void 0||e.bottom===null))&&(c==="middle"?u={top:((i||0)-a.height)/2}:u=c==="bottom"?{bottom:r&&r.bottom||0}:{top:r&&r.top||0}),kn(kn({},l),u)}function qD(e){var t=de();return m.useEffect(()=>{t(jD(e))},[t,e]),null}function GD(e){var t=de();return m.useEffect(()=>(t(zh(e)),()=>{t(zh({width:0,height:0}))}),[t,e]),null}function YD(e,t,r,n){return e==="vertical"&&U(t)?{height:t}
2088:e==="horizontal"?{width:r||n}:null}var JD={align:"center",iconSize:14,itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"};function XD(e){var t=Se(e,JD),r=kj(),n=UC(),i=vD(),{width:a,height:o,wrapperStyle:s,portal:c}=t,[l,u]=ub([r]),d=qu(),f=Gu();if(d==null||f==null)return null;var h=d-((i==null?void 0:i.left)||0)-((i==null?void 0:i.right)||0),g=YD(t.layout,o,a,h),v=c?s:kn(kn({position:"absolute",width:(g==null?void 0:g.width)||a||"auto",height:(g==null?void 0:g.height)||o||"auto"},VD(s,t,i,d,f,l)),s),y=c??n;if(y==null||r==null)return null;var b=m.createElement("div",{className:"recharts-legend-wrapper",style:v,ref:u},m.createElement(qD,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),!c&&m.createElement(GD,{width:l.width,height:l.height}),m.createElement(KD,cl({},t,g,{margin:i,chartWidth:d,chartHeight:f,contextPayload:r})));return Fl.createPortal(b,y)}XD.displayName="Legend";function ll(){return ll=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ll.apply(null,arguments)}function Hh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Hh(Object(r),!0).forEach(function(n){ZD(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ZD(e,t,r){return(t=QD(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function QD(e){var t=e2(e,"string");return typeof t=="symbol"?t:t+""}function e2(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function t2(e){return Array.isArray(e)&&jt(e[0])&&jt(e[1])?e.join(" ~ "):e}var r2=e=>{var{separator:t=" : ",contentStyle:r={},itemStyle:n={},labelStyle:i={},payload:a,formatter:o,itemSorter:s,wrapperClassName:c,labelClassName:l,label:u,labelFormatter:d,accessibilityLayer:f=!1}=e,h=()=>{if(a&&a.length){var x={padding:0,margin:0},O=(s?es(a,s):a).map((P,k)=>{if(P.type==="none")return null;var I=P.formatter||o||t2,{value:D,name:T}=P,C=D,R=T;if(I){var j=I(D,T,P,k,a);if(Array.isArray(j))[C,R]=j;else if(j!=null)C=j;else return null}var $=fc({display:"block",paddingTop:4,paddingBottom:4,color:P.color||"#000"},n);return m.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(k),style:$},jt(R)?m.createElement("span",{className:"recharts-tooltip-item-name"},R):null,jt(R)?m.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,m.createElement("span",{className:"recharts-tooltip-item-value"},C),m.createElement("span",{className:"recharts-tooltip-item-unit"},P.unit||""))});return m.createElement("ul",{className:"recharts-tooltip-item-list",style:x},O)}return null},g=fc({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},r),v=fc({margin:0},i),y=!he(u),b=y?u:"",S=J("recharts-default-tooltip",c),w=J("recharts-tooltip-label",l);y&&d&&a!==void 0&&a!==null&&(b=d(u,a));var _=f?{role:"status","aria-live":"assertive"}:{};return m.createElement("div",ll({className:S,style:g},_),m.createElement("p",{className:w,style:v},m.isValidElement(b)?b:"".concat(b)),h())},Gn="recharts-tooltip-wrapper",n2={visibility:"hidden"};function i2(e){var{coordinate:t,translateX:r,translateY:n}=e;return J(Gn,{["".concat(Gn,"-right")]:U(r)&&t&&U(t.x)&&r>=t.x,["".concat(Gn,"-left")]:U(r)&&t&&U(t.x)&&r<t.x,["".concat(Gn,"-bottom")]:U(n)&&t&&U(t.y)&&n>=t.y,["".concat(Gn,"-top")]:U(n)&&t&&U(t.y)&&n<t.y})}function Kh(e){var{allowEscapeViewBox:t,coordinate:r,key:n,offsetTopLeft:i,position:a,reverseDirection:o,tooltipDimension:s,viewBox:c,viewBoxDimension:l}=e;
2088if(a&&U(a[n]))return a[n];var u=r[n]-s-(i>0?i:0),d=r[n]+i;if(t[n])return o[n]?u:d;var f=c[n];if(f==null)return 0;if(o[n]){var h=u,g=f;return h<g?Math.max(d,f):Math.max(u,f)}if(l==null)return 0;var v=d+s,y=f+l;return v>y?Math.max(u,f):Math.max(d,f)}function a2(e){var{translateX:t,translateY:r,useTranslate3d:n}=e;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function o2(e){var{allowEscapeViewBox:t,coordinate:r,offsetTopLeft:n,position:i,reverseDirection:a,tooltipBox:o,useTranslate3d:s,viewBox:c}=e,l,u,d;return o.height>0&&o.width>0&&r?(u=Kh({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),d=Kh({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),l=a2({translateX:u,translateY:d,useTranslate3d:s})):l=n2,{cssProperties:l,cssClasses:i2({translateX:u,translateY:d,coordinate:r})}}function Vh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function pa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vh(Object(r),!0).forEach(function(n){ul(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ul(e,t,r){return(t=s2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s2(e){var t=c2(e,"string");return typeof t=="symbol"?t:t+""}function c2(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class l2 extends m.PureComponent{constructor(){super(...arguments),ul(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),ul(this,"handleKeyDown",t=>{if(t.key==="Escape"){var r,n,i,a;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(r=(n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==null&&r!==void 0?r:0,y:(i=(a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var t,r;this.state.dismissed&&(((t=this.props.coordinate)===null||t===void 0?void 0:t.x)!==this.state.dismissedAtCoordinate.x||((r=this.props.coordinate)===null||r===void 0?void 0:r.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}render(){var{active:t,allowEscapeViewBox:r,animationDuration:n,animationEasing:i,children:a,coordinate:o,hasPayload:s,isAnimationActive:c,offset:l,position:u,reverseDirection:d,useTranslate3d:f,viewBox:h,wrapperStyle:g,lastBoundingBox:v,innerRef:y,hasPortalFromProps:b}=this.props,{cssClasses:S,cssProperties:w}=o2({allowEscapeViewBox:r,coordinate:o,offsetTopLeft:l,position:u,reverseDirection:d,tooltipBox:{height:v.height,width:v.width},useTranslate3d:f,viewBox:h}),_=b?{}:pa(pa({transition:c&&t?"transform ".concat(n,"ms ").concat(i):void 0},w),{},{pointerEvents:"none",visibility:!this.state.dismissed&&t&&s?"visible":"hidden",position:"absolute",top:0,left:0}),x=pa(pa({},_),{},{visibility:!this.state.dismissed&&t&&s?"visible":"hidden"},g);return m.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:S,style:x,ref:y},a)}}var s0=()=>{var e;return(e=B(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function dl(){return dl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},dl.apply(null,arguments)}function qh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Gh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
2088t%2?qh(Object(r),!0).forEach(function(n){u2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function u2(e,t,r){return(t=d2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d2(e){var t=f2(e,"string");return typeof t=="symbol"?t:t+""}function f2(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Yh={curveBasisClosed:aN,curveBasisOpen:oN,curveBasis:iN,curveBumpX:HC,curveBumpY:KC,curveLinearClosed:sN,curveLinear:Vo,curveMonotoneX:cN,curveMonotoneY:lN,curveNatural:uN,curveStep:dN,curveStepAfter:hN,curveStepBefore:fN},ao=e=>oe(e.x)&&oe(e.y),Jh=e=>e.base!=null&&ao(e.base)&&ao(e),Yn=e=>e.x,Jn=e=>e.y,h2=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(Ri(e));return(r==="curveMonotone"||r==="curveBump")&&t?Yh["".concat(r).concat(t==="vertical"?"Y":"X")]:Yh[r]||Vo},p2=e=>{var{type:t="linear",points:r=[],baseLine:n,layout:i,connectNulls:a=!1}=e,o=h2(t,i),s=a?r.filter(ao):r,c;if(Array.isArray(n)){var l=r.map((h,g)=>Gh(Gh({},h),{},{base:n[g]}));i==="vertical"?c=oa().y(Jn).x1(Yn).x0(h=>h.base.x):c=oa().x(Yn).y1(Jn).y0(h=>h.base.y);var u=c.defined(Jh).curve(o),d=a?l.filter(Jh):l;return u(d)}i==="vertical"&&U(n)?c=oa().y(Jn).x1(Yn).x0(n):U(n)?c=oa().x(Yn).y1(Jn).y0(n):c=yv().x(Yn).y(Jn);var f=c.defined(ao).curve(o);return f(s)},ci=e=>{var{className:t,points:r,path:n,pathRef:i}=e;if((!r||!r.length)&&!n)return null;var a=r&&r.length?p2(e):n;return m.createElement("path",dl({},lt(e),Ou(e),{className:J("recharts-curve",t),d:a===null?void 0:a,ref:i}))},m2=["x","y","top","left","width","height","className"];function fl(){return fl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fl.apply(null,arguments)}function Xh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function g2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xh(Object(r),!0).forEach(function(n){y2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function y2(e,t,r){return(t=v2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v2(e){var t=b2(e,"string");return typeof t=="symbol"?t:t+""}function b2(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function w2(e,t){if(e==null)return{};var r,n,i=x2(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function x2(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var S2=(e,t,r,n,i,a)=>"M".concat(e,",").concat(i,"v").concat(n,"M").concat(a,",").concat(t,"h").concat(r),P2=e=>{var{x:t=0,y:r=0,top:n=0,left:i=0,width:a=0,height:o=0,className:s}=e,c=w2(e,m2),l=g2({x:t,y:r,top:n,left:i,width:a,height:o},c);return!U(t)||!U(r)||!U(a)||!U(o)||!U(n)||!U(i)?null:m.createElement("path",fl({},Ne(l),{className:J("recharts-cross",s),d:S2(t,r,a,o,n,i)}))};function _2(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function Zh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Qh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
2088t%2?Zh(Object(r),!0).forEach(function(n){O2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function O2(e,t,r){return(t=A2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function A2(e){var t=E2(e,"string");return typeof t=="symbol"?t:t+""}function E2(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var I2=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),c0=(e,t,r)=>e.map(n=>"".concat(I2(n)," ").concat(t,"ms ").concat(r)).join(","),k2=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((r,n)=>r.filter(i=>n.includes(i))),xi=(e,t)=>Object.keys(t).reduce((r,n)=>Qh(Qh({},r),{},{[n]:e(n,t[n])}),{});function ep(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ep(Object(r),!0).forEach(function(n){T2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ep(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function T2(e,t,r){return(t=C2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function C2(e){var t=N2(e,"string");return typeof t=="symbol"?t:t+""}function N2(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var oo=(e,t,r)=>e+(t-e)*r,hl=e=>{var{from:t,to:r}=e;return t!==r},l0=(e,t,r)=>{var n=xi((i,a)=>
2088{if(hl(a)){var[o,s]=e(a.from,a.to,a.velocity);return fe(fe({},a),{},{from:o,velocity:s})}return a},t);return r<1?xi((i,a)=>hl(a)?fe(fe({},a),{},{velocity:oo(a.velocity,n[i].velocity,r),from:oo(a.from,n[i].from,r)}):a,t):l0(e,n,r-1)};function j2(e,t,r,n,i,a){var o,s=n.reduce((f,h)=>fe(fe({},f),{},{[h]:{from:e[h],velocity:0,to:t[h]}}),{}),c=()=>xi((f,h)=>h.from,s),l=()=>!Object.values(s).filter(hl).length,u=null,d=f=>{o||(o=f);var h=f-o,g=h/r.dt;s=l0(r,s,g),i(fe(fe(fe({},e),t),c())),o=f,l()||(u=a.setTimeout(d))};return()=>(u=a.setTimeout(d),()=>{var f;(f=u)===null||f===void 0||f()})}function M2(e,t,r,n,i,a,o){var s=null,c=i.reduce((d,f)=>fe(fe({},d),{},{[f]:[e[f],t[f]]}),{}),l,u=d=>{l||(l=d);var f=(d-l)/n,h=xi((v,y)=>oo(...y,r(f)),c);if(a(fe(fe(fe({},e),t),h)),f<1)s=o.setTimeout(u);else{var g=xi((v,y)=>oo(...y,r(1)),c);a(fe(fe(fe({},e),t),g))}};return()=>(s=o.setTimeout(u),()=>{var d;(d=s)===null||d===void 0||d()})}const D2=(e,t,r,n,i,a)=>{var o=k2(e,t);return r==null?()=>(i(fe(fe({},e),t)),()=>{}):r.isStepper===!0?j2(e,t,r,o,i,a):M2(e,t,r,n,o,i,a)};var so=1e-4,u0=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],d0=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),tp=(e,t)=>r=>{var n=u0(e,t);return d0(n,r)},R2=(e,t)=>r=>{var n=u0(e,t),i=[...n.map((a,o)=>a*o).slice(1),0];return d0(i,r)},$2=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(r.length===1)switch(r[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var i,a=r[0].split("(");if(a[0]==="cubic-bezier"&&((i=a[1])===null||i===void 0?void 0:i.split(")")[0].split(",").length)===4){var o=a[1].split(")")[0].split(",").map(s=>parseFloat(s));return[o[0],o[1],o[2],o[3]]}}}return r.length===4?r:[0,0,1,1]},L2=(e,t,r,n)=>{var i=tp(e,r),a=tp(t,n),o=R2(e,r),s=l=>l>1?1:l<0?0:l,c=l=>{for(var u=l>1?1:l,d=u,f=0;f<8;++f){var h=i(d)-u,g=o(d);if(Math.abs(h-u)<so||g<so)return a(d);d=s(d-h/g)}return a(d)};return c.isStepper=!1,c},rp=function(){return L2(...$2(...arguments))},F2=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:r=100,damping:n=8,dt:i=17}=t,a=(o,s,c)=>{var l=-(o-s)*r,u=c*n,d=c+(l-u)*i/1e3,f=c*i/1e3+o;return Math.abs(f-s)<so&&Math.abs(d)<so?[s,0]:[f,d]};return a.isStepper=!0,a.dt=i,a},U2=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return rp(e);case"spring":return F2();default:if(e.split("(")[0]==="cubic-bezier")return rp(e)}return typeof e=="function"?e:null};function B2(e){var t,r=()=>null,n=!1,i=null,a=o=>{if(!n){if(Array.isArray(o)){if(!o.length)return;var s=o,[c,...l]=s;if(typeof c=="number"){i=e.setTimeout(a.bind(null,l),c);return}a(c),i=e.setTimeout(a.bind(null,l));return}typeof o=="string"&&(t=o,r(t)),typeof o=="object"&&(t=o,r(t)),typeof o=="function"&&o()}};return{stop:()=>{n=!0},start:o=>{n=!1,i&&(i(),i=null),a(o)},subscribe:o=>(r=o,()=>{r=()=>null}),getTimeoutController:()=>e}}class z2{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),i=null,a=o=>{o-n>=r?t(o):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(a))};return i=requestAnimationFrame(a),()=>{i!=null&&cancelAnimationFrame(i)}}}function W2(){return B2(new z2)}var H2=m.createContext(W2);function K2(e,t){var r=m.useContext(H2);return m.useMemo(()=>t??r(e),[e,t,r])}var V2=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Rn={devToolsEnabled:!1,isSsr:V2()},q2={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},np={t:0},hc={t:1};function bs(e){var t=Se(e,q2),{isActive:r,canBegin:n,duration:i,easing:a,begin:o,onAnimationEnd:s,onAnimationStart:c,children:l}=t,u=r==="auto"?!Rn.isSsr:r,d=K2(t.animationId,t.animationManager),[f,h]=m.useState(u?np:hc),g=m.useRef(null);return m.useEffect(()=>{u||h(hc)},[u]),m.useEffect(()=>{if(!u||!n)return $i;var v=D2(np,hc,U2(a),i,h,d.getTimeoutController()),y=()=>{g.current=v()};return d.start([c,o,y,i,s]),()=>{d.stop(),g.current&&g.current(),s()}},[u,n,i,a,o,c,s,d]),l(f.t)}function ws(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=m.useRef(pi(t)),n=m.useRef(e);return n.current!==e&&(r.current=pi(t),n.current=e),r.current}
2088var G2=["radius"],Y2=["radius"];function ip(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ap(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ip(Object(r),!0).forEach(function(n){J2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ip(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function J2(e,t,r){return(t=X2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function X2(e){var t=Z2(e,"string");return typeof t=="symbol"?t:t+""}function Z2(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function co(){return co=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},co.apply(null,arguments)}function op(e,t){if(e==null)return{};var r,n,i=Q2(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Q2(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var sp=(e,t,r,n,i)=>{var a=Math.min(Math.abs(r)/2,Math.abs(n)/2),o=n>=0?1:-1,s=r>=0?1:-1,c=n>=0&&r>=0||n<0&&r<0?1:0,l;if(a>0&&i instanceof Array){for(var u=[0,0,0,0],d=0,f=4;d<f;d++)u[d]=i[d]>a?a:i[d];l="M".concat(e,",").concat(t+o*u[0]),u[0]>0&&(l+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(c,",").concat(e+s*u[0],",").concat(t)),l+="L ".concat(e+r-s*u[1],",").concat(t),u[1]>0&&(l+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(c,`,
2089        `).concat(e+r,",").concat(t+o*u[1])),l+="L ".concat(e+r,",").concat(t+n-o*u[2]),u[2]>0&&(l+="A ".concat(u[2],",").concat(u[2],",0,0,").concat(c,`,
2090        `).concat(e+r-s*u[2],",").concat(t+n)),l+="L ".concat(e+s*u[3],",").concat(t+n),u[3]>0&&(l+="A ".concat(u[3],",").concat(u[3],",0,0,").concat(c,`,
2091        `).concat(e,",").concat(t+n-o*u[3])),l+="Z"}else if(a>0&&i===+i&&i>0){var h=Math.min(a,i);l="M ".concat(e,",").concat(t+o*h,`
2092            A `).concat(h,",").concat(h,",0,0,").concat(c,",").concat(e+s*h,",").concat(t,`
2093            L `).concat(e+r-s*h,",").concat(t,`
2094            A `).concat(h,",").concat(h,",0,0,").concat(c,",").concat(e+r,",").concat(t+o*h,`
2095            L `).concat(e+r,",").concat(t+n-o*h,`
2096            A `).concat(h,",").concat(h,",0,0,").concat(c,",").concat(e+r-s*h,",").concat(t+n,`
2097            L `).concat(e+s*h,",").concat(t+n,`
2098            A `).concat(h,",").concat(h,",0,0,").concat(c,",").concat(e,",").concat(t+n-o*h," Z")}else l="M ".concat(e,",").concat(t," h ").concat(r," v ").concat(n," h ").concat(-r," Z");return l},cp={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},f0=e=>{var t=Se(e,cp),r=m.useRef(null),[n,i]=m.useState(-1);m.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var z=r.current.getTotalLength();z&&i(z)}catch{}},[]);var{x:a,y:o,width:s,height:c,radius:l,className:u}=t,{animationEasing:d,animationDuration:f,animationBegin:h,isAnimationActive:g,isUpdateAnimationActive:v}=t,y=m.useRef(s),b=m.useRef(c),S=m.useRef(a),w=m.useRef(o),_=m.useMemo(()=>({x:a,y:o,width:s,height:c,radius:l}),[a,o,s,c,l]),x=ws(_,"rectangle-");if(a!==+a||o!==+o||s!==+s||c!==+c||s===0||c===0)return null;var O=J("recharts-rectangle",u);if(!v){var P=Ne(t),{radius:k}=P,I=op(P,G2);return m.createElement("path",co({},I,{radius:typeof l=="number"?l:void 0,className:O,d:sp(a,o,s,c,l)}))}var D=y.current,T=b.current,C=S.current,R=w.current,j="0px ".concat(n===-1?1:n,"px"),$="".concat(n,"px 0px"),W=c0(["strokeDasharray"],f,typeof d=="str
2098ing"?d:cp.animationEasing);return m.createElement(bs,{animationId:x,key:x,canBegin:n>0,duration:f,easing:d,isActive:v,begin:h},z=>{var K=le(D,s,z),F=le(T,c,z),_e=le(C,a,z),Ve=le(R,o,z);r.current&&(y.current=K,b.current=F,S.current=_e,w.current=Ve);var Ue;g?z>0?Ue={transition:W,strokeDasharray:$}:Ue={strokeDasharray:j}:Ue={strokeDasharray:$};var Ut=Ne(t),{radius:tt}=Ut,Mr=op(Ut,Y2);return m.createElement("path",co({},Mr,{radius:typeof l=="number"?l:void 0,className:O,d:sp(_e,Ve,K,F,l),ref:r,style:ap(ap({},Ue),t.style)}))})};function lp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function up(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lp(Object(r),!0).forEach(function(n){eR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eR(e,t,r){return(t=tR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tR(e){var t=rR(e,"string");return typeof t=="symbol"?t:t+""}function rR(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lo=Math.PI/180,nR=e=>e*180/Math.PI,Ae=(e,t,r,n)=>({x:e+Math.cos(-lo*n)*r,y:t+Math.sin(-lo*n)*r}),iR=function(t,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(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},aR=(e,t)=>{var{x:r,y:n}=e,{x:i,y:a}=t;return Math.sqrt((r-i)**2+(n-a)**2)},oR=(e,t)=>{var{x:r,y:n}=e,{cx:i,cy:a}=t,o=aR({x:r,y:n},{x:i,y:a});if(o<=0)return{radius:o,angle:0};var s=(r-i)/o,c=Math.acos(s);return n>a&&(c=2*Math.PI-c),{radius:o,angle:nR(c),angleInRadian:c}},sR=e=>{var{startAngle:t,endAngle:r}=e,n=Math.floor(t/360),i=Math.floor(r/360),a=Math.min(n,i);return{startAngle:t-a*360,endAngle:r-a*360}},cR=(e,t)=>{var{startAngle:r,endAngle:n}=t,i=Math.floor(r/360),a=Math.floor(n/360),o=Math.min(i,a);return e+o*360},lR=(e,t)=>{var{chartX:r,chartY:n}=e,{radius:i,angle:a}=oR({x:r,y:n},t),{innerRadius:o,outerRadius:s}=t;if(i<o||i>s||i===0)return null;var{startAngle:c,endAngle:l}=sR(t),u=a,d;if(c<=l){for(;u>l;)u-=360;for(;u<c;)u+=360;d=u>=c&&u<=l}else{for(;u>c;)u-=360;for(;u<l;)u+=360;d=u>=l&&u<=c}return d?up(up({},t),{},{radius:i,angle:cR(u,t)}):null};function h0(e){var{cx:t,cy:r,radius:n,startAngle:i,endAngle:a}=e,o=Ae(t,r,n,i),s=Ae(t,r,n,a);return{points:[o,s],cx:t,cy:r,radius:n,startAngle:i,endAngle:a}}function pl(){return pl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pl.apply(null,arguments)}var uR=(e,t)=>{var r=ot(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},ma=e=>{var{cx:t,cy:r,radius:n,angle:i,sign:a,isExternal:o,cornerRadius:s,cornerIsExternal:c}=e,l=s*(o?1:-1)+n,u=Math.asin(s/l)/lo,d=c?i:i+a*u,f=Ae(t,r,l,d),h=Ae(t,r,n,d),g=c?i-a*u:i,v=Ae(t,r,l*Math.cos(u*lo),g);return{center:f,circleTangency:h,lineTangency:v,theta:u}},p0=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:a,endAngle:o}=e,s=uR(a,o),c=a+s,l=Ae(t,r,i,a),u=Ae(t,r,i,c),d="M ".concat(l.x,",").concat(l.y,`
2099    A `).concat(i,",").concat(i,`,0,
2100    `).concat(+(Math.abs(s)>180),",").concat(+(a>c),`,
2101    `).concat(u.x,",").concat(u.y,`
2102  `);if(n>0){var f=Ae(t,r,n,a),h=Ae(t,r,n,c);d+="L ".concat(h.x,",").concat(h.y,`
2103            A `).concat(n,",").concat(n,`,0,
2104            `).concat(+(Math.abs(s)>180),",").concat(+(a<=c),`,
2105            `).concat(f.x,",").concat(f.y," Z")}else d+="L ".concat(t,",").concat(r," Z");return d},dR=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,cornerRadius:a,forceCornerRadius:o,cornerIsExternal:s,startAngle:c,endAngle:l}=e,u=ot(l-c),{circleTangency:d,lineTangency:f,theta:h}=ma({cx:t,cy:r,radius:i,angle:c,sign:u,cornerRadius:a,cornerIsExternal:s}),{circleTangency:g,lineTangency:v,theta:y}=ma({cx:t,cy:r,radius:i,angle:l,sign:-u,cornerRadius:a,cornerIsExternal:s}),b=s?Math.abs(c-l):Math.abs(c-l)-h-y;if(b<0)return o?"M ".concat(f.x,",").concat(f.y,`
2106        a`).concat(a,",").concat(a,",0,0,1,").concat(a*2,`,0
2107        a`).concat(a,",").concat(a,",0,0,1,").concat(-a*2,`,0
2108      `):p0({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:c,endAngle:l});var S="M ".concat(f.x,",").concat(f.y,`
2109    A`).concat(a,",").concat(a,",0,0,").concat(+(u<0),",").concat(d.x,",").concat(d.y,`
2110    A`).concat(i,",").concat(i,",0,").concat(+(b>180),",").concat(+(u<0),",").concat(g.x,",").concat(g.y,`
2111    A`).concat(a,",").concat(a,",0,0,").concat(+(u<0),",").concat(v.x,",").concat(v.y,`
2112  `);if(n>0){var{circleTangency:w,lineTangency:_,theta:x}=ma({cx:t,cy:r,radius:n,angle:c,sign:u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),{circleTangency:O,lineTangency:P,theta:k}=ma({cx:t,cy:r,radius:n,angle:l,sign:-u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),I=s?Math.abs(c-l):Math.abs(c-l)-x-k;if(I<0&&a===0)return"".concat(S,"L").concat(t,",").concat(r,"Z");S+="L".concat(P.x,",").concat(P.y,`
2113      A`).concat(a,",").concat(a,",0,0,").concat(+(u<0),",").concat(O.x,",").concat(O.y,`
2114      A`).concat(n,",").concat(n,",0,").concat(+(I>180),",").concat(+(u>0),",").concat(w.x,",").concat(w.y,`
2115      A`).concat(a,",").concat(a,",0,0,").concat(+(u<0),",").concat(_.x,",").concat(_.y,"Z")}else S+="L".concat(t,",").concat(r,"Z");return S},fR={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},m0=e=>{var t=Se(e,fR),{cx:r,cy:n,innerRadius:i,outerRadius:a,cornerRadius:o,forceCornerRadius:s,cornerIsExternal:c,startAngle:l,endAngle:u,className:d}=t;if(a<i||l===u)return null;var f=J("recharts-sector",d),h=a-i,g=Ar(o,h,0,!0),v;return g>0&&Math.abs(l-u)<360?v=dR({cx:r,cy:n,innerRadius:i,outerRadius:a,cornerRadius:Math.min(g,h/2),forceCornerRadius:s,cornerIsExternal:c,startAngle:l,endAngle:u}):v=p0({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:l,endAngle:u}),m.createElement("path",pl({},Ne(t),{className:f,d:v}))};function hR(e,t,r){if(e==="horizontal")return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if(e==="vertical")return[{x:r.left,y:t.y}
2115,{x:r.left+r.width,y:t.y}];if(jv(t)){if(e==="centric"){var{cx:n,cy:i,innerRadius:a,outerRadius:o,angle:s}=t,c=Ae(n,i,a,s),l=Ae(n,i,o,s);return[{x:c.x,y:c.y},{x:l.x,y:l.y}]}return h0(t)}}var g0={},y0={},v0={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ru;function r(n){return t.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(v0);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=v0;function r(n){return n?(n=t.toNumber(n),n===1/0||n===-1/0?(n<0?-1:1)*Number.MAX_VALUE:n===n?n:0):n===0?n:0}e.toFinite=r})(y0);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$u,r=y0;function n(i,a,o){o&&typeof o!="number"&&t.isIterateeCall(i,a,o)&&(a=o=void 0),i=r.toFinite(i),a===void 0?(a=i,i=0):a=r.toFinite(a),o=o===void 0?i<a?1:-1:r.toFinite(o);const s=Math.max(Math.ceil((a-i)/(o||1)),0),c=new Array(s);for(let l=0;l<s;l++)c[l]=i,i+=o;return c}e.range=n})(g0);var pR=g0.range;const b0=Ir(pR);function Or(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function mR(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Xu(e){let t,r,n;e.length!==2?(t=Or,r=(s,c)=>Or(e(s),c),n=(s,c)=>e(s)-c):(t=e===Or||e===mR?e:gR,r=e,n=e);function i(s,c,l=0,u=s.length){if(l<u){if(t(c,c)!==0)return u;do{const d=l+u>>>1;r(s[d],c)<0?l=d+1:u=d}while(l<u)}return l}function a(s,c,l=0,u=s.length){if(l<u){if(t(c,c)!==0)return u;do{const d=l+u>>>1;r(s[d],c)<=0?l=d+1:u=d}while(l<u)}return l}function o(s,c,l=0,u=s.length){const d=i(s,c,l,u-1);return d>l&&n(s[d-1],c)>-n(s[d],c)?d-1:d}return{left:i,center:o,right:a}}function gR(){return 0}function w0(e){return e===null?NaN:+e}function*yR(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const vR=Xu(Or),Wi=vR.right;Xu(w0).center;class dp extends Map{constructor(t,r=xR){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(fp(this,t))}has(t){return super.has(fp(this,t))}set(t,r){return super.set(bR(this,t),r)}delete(t){return super.delete(wR(this,t))}}function fp({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function bR({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function wR({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function xR(e){return e!==null&&typeof e=="object"?e.valueOf():e}function SR(e=Or){if(e===Or)return x0;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function x0(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const PR=Math.sqrt(50),_R=Math.sqrt(10),OR=Math.sqrt(2);function uo(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=PR?10:a>=_R?5:a>=OR?2:1;let s,c,l;return i<0?(l=Math.pow(10,-i)/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=Math.pow(10,i)*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=r&&r<2?uo(e,t,r*2):[s,c,l]}function ml(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,a,o]=n?uo(t,e,r):uo(e,t,r);if(!(a>=i))return[];const s=a-i+1,c=new Array(s);if(n)if(o<0)for(let l=0;l<s;++l)c[l]=(a-l)/-o;else for(let l=0;l<s;++l)c[l]=(a-l)*o;else if(o<0)for(let l=0;l<s;++l)c[l]=(i+l)/-o;else for(let l=0;l<s;++l)c[l]=(i+l)*o;return c}function gl(e,t,r){return t=+t,e=+e,r=+r,uo(e,t,r)[2]}function yl(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?gl(t,e,r):gl(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function hp(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function pp(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function S0(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?x0:SR(i);n>r;){if(n-r>600){const c=n-r+1,l=t-r+1,u=Math.log(c),d=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*d*(c-d)/c)*(l-c/2<0?-1:1),h=Math.max(r,Math.floor(t-l*d/c+f)),g=Math.min(n,Math.floor(t+(c-l)*d/c+f));S0(e,t,h,g,i)}const a=e[t];let o=r,s=n;for(Xn(e,r,t),i(e[n],a)>
21150&&Xn(e,r,n);o<s;){for(Xn(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[r],a)===0?Xn(e,r,s):(++s,Xn(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function Xn(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function AR(e,t,r){if(e=Float64Array.from(yR(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return pp(e);if(t>=1)return hp(e);var n,i=(n-1)*t,a=Math.floor(i),o=hp(S0(e,a).subarray(0,a+1)),s=pp(e.subarray(a+1));return o+(s-o)*(i-a)}}function ER(e,t,r=w0){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),s=+r(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function IR(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n<i;)a[n]=e+n*r;return a}function ht(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function lr(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const vl=Symbol("implicit");function Zu(){var e=new dp,t=[],r=[],n=vl;function i(a){let o=e.get(a);if(o===void 0){if(n!==vl)return n;e.set(a,o=t.push(a)-1)}return r[o%r.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new dp;for(const o of a)e.has(o)||e.set(o,t.push(o)-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 Zu(t,r).unknown(n)},ht.apply(i,arguments),i}function Qu(){var e=Zu().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var f=t().length,h=i<n,g=h?i:n,v=h?n:i;a=(v-g)/Math.max(1,f-c+l*2),s&&(a=Math.floor(a)),g+=(v-g-a*(f-c))*u,o=a*(1-c),s&&(g=Math.round(g),o=Math.round(o));var y=IR(f).map(function(b){return g+a*b});return r(h?y.reverse():y)}return e.domain=function(f){return arguments.length?(t(f),d()):t()},e.range=function(f){return arguments.length?([n,i]=f,n=+n,i=+i,d()):[n,i]},e.rangeRound=function(f){return[n,i]=f,n=+n,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(f){return arguments.length?(s=!!f,d()):s},e.padding=function(f){return arguments.length?(c=Math.min(1,l=+f),d()):c},e.paddingInner=function(f){return arguments.length?(c=Math.min(1,f),d()):c},e.paddingOuter=function(f){return arguments.length?(l=+f,d()):l},e.align=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),d()):u},e.copy=function(){return Qu(t(),[n,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},ht.apply(d(),arguments)}function P0(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return P0(t())},e}function kR(){return P0(Qu.apply(null,arguments).paddingInner(1))}function ed(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function _0(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Hi(){}var Si=.7,fo=1/Si,bn="\\s*([+-]?\\d+)\\s*",Pi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ct="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",TR=/^#([0-9a-f]{3,8})$/,CR=new RegExp(`^rgb\\(${bn},${bn},${bn}\\)$`),NR=new RegExp(`^rgb\\(${Ct},${Ct},${Ct}\\)$`),jR=new RegExp(`^rgba\\(${bn},${bn},${bn},${Pi}\\)$`),MR=new RegExp(`^rgba\\(${Ct},${Ct},${Ct},${Pi}\\)$`),DR=new RegExp(`^hsl\\(${Pi},${Ct},${Ct}\\)$`),RR=new RegExp(`^hsla\\(${Pi},${Ct},${Ct},${Pi}\\)$`),mp={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};ed(Hi,_i,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:gp,formatHex:gp,formatHex8:$R,formatHsl:LR,formatRgb:yp,toString:yp});function gp(){return this.rgb().formatHex()}function $R(){return this.rgb().formatHex8()}function LR(){return O0(this).formatHsl()}function yp(){return this.rgb().formatRgb()}function _i(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=TR.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?vp(t):r===3?new He(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?ga(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?ga(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=CR.exec(e))?new He(t[1],t[2],t[3],1):(t=NR.exec(e))?new He(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=jR.exec(e))?ga(t[1],t[2],t[3],t[4]):(t=MR.exec(e))?ga(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=D
vendor: 5,363 bytes, line 2115
2115R.exec(e))?xp(t[1],t[2]/100,t[3]/100,1):(t=RR.exec(e))?xp(t[1],t[2]/100,t[3]/100,t[4]):mp.hasOwnProperty(e)?vp(mp[e]):e==="transparent"?new He(NaN,NaN,NaN,0):null}function vp(e){return new He(e>>16&255,e>>8&255,e&255,1)}function ga(e,t,r,n){return n<=0&&(e=t=r=NaN),new He(e,t,r,n)}function FR(e){return e instanceof Hi||(e=_i(e)),e?(e=e.rgb(),new He(e.r,e.g,e.b,e.opacity)):new He}function bl(e,t,r,n){return arguments.length===1?FR(e):new He(e,t,r,n??1)}function He(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}ed(He,bl,_0(Hi,{brighter(e){return e=e==null?fo:Math.pow(fo,e),new He(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Si:Math.pow(Si,e),new He(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new He(Kr(this.r),Kr(this.g),Kr(this.b),ho(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:bp,formatHex:bp,formatHex8:UR,formatRgb:wp,toString:wp}));function bp(){return`#${Br(this.r)}${Br(this.g)}${Br(this.b)}`}function UR(){return`#${Br(this.r)}${Br(this.g)}${Br(this.b)}${Br((isNaN(this.opacity)?1:this.opacity)*255)}`}function wp(){const e=ho(this.opacity);return`${e===1?"rgb(":"rgba("}${Kr(this.r)}, ${Kr(this.g)}, ${Kr(this.b)}${e===1?")":`, ${e})`}`}function ho(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Kr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Br(e){return e=Kr(e),(e<16?"0":"")+e.toString(16)}function xp(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new yt(e,t,r,n)}function O0(e){if(e instanceof yt)return new yt(e.h,e.s,e.l,e.opacity);if(e instanceof Hi||(e=_i(e)),!e)return new yt;if(e instanceof yt)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,c=(a+i)/2;return s?(t===a?o=(r-n)/s+(r<n)*6:r===a?o=(n-t)/s+2:o=(t-r)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new yt(o,s,c,e.opacity)}function BR(e,t,r,n){return arguments.length===1?O0(e):new yt(e,t,r,n??1)}function yt(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}ed(yt,BR,_0(Hi,{brighter(e){return e=e==null?fo:Math.pow(fo,e),new yt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Si:Math.pow(Si,e),new yt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new He(pc(e>=240?e-240:e+120,i,n),pc(e,i,n),pc(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new yt(Sp(this.h),ya(this.s),ya(this.l),ho(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=ho(this.opacity);return`${e===1?"hsl(":"hsla("}${Sp(this.h)}, ${ya(this.s)*100}%, ${ya(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Sp(e){return e=(e||0)%360,e<0?e+360:e}function ya(e){return Math.max(0,Math.min(1,e||0))}function pc(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const td=e=>()=>e;function zR(e,t){return function(r){return e+r*t}}function WR(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function HR(e){return(e=+e)==1?A0:function(t,r){return r-t?WR(t,r,e):td(isNaN(t)?r:t)}}function A0(e,t){var r=t-e;return r?zR(e,r):td(isNaN(e)?t:e)}const Pp=function e(t){var r=HR(t);function n(i,a){var o=r((i=bl(i)).r,(a=bl(a)).r),s=r(i.g,a.g),c=r(i.b,a.b),l=A0(i.opacity,a.opacity);return function(u){return i.r=o(u),i.g=s(u),i.b=c(u),i.opacity=l(u),i+""}}return n.gamma=e,n}(1);function KR(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=e[i]*(1-a)+t[i]*a;return n}}function VR(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function qR(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),o;for(o=0;o<n;++o)i[o]=$n(e[o],t[o]);for(;o<r;++o)a[o]=t[o];return function(s){for(o=0;o<n;++o)a[o]=i[o](s);return a}}function GR(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function po(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function YR(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=$n(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var wl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,mc=new RegExp(wl.source,"g");function JR(e){return function(){return e}}function XR(e){return function(t){return e(t)+""}}function ZR(e,t){var r=wl.lastIndex=mc.lastIndex=0,n,i,a,o=-1,s=[],c=[];for(e=e+"",t=t+"";(n=wl.exec(e))&&(i=mc.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:po(n,i)})),r=mc.lastIndex;return r<t.length&&(a=t.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?XR(c[0].x):JR(t):(t=c.length,function(l){for(var u=0,d;u<t;++u)s[(d=c[u]).i]=d.x(l);return s.join("")})}function $n(e,t){var r=typeof t,n;return t==null||r==="boolean"?td(t):(r==="number"?po:r==="string"?(n=_i(t))?(t=n,Pp):ZR:t instanceof _i?Pp:t instanceof Date?GR:VR(t)?KR:Array.isArray(t)?qR:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?YR:po)(e,t)}function rd(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}
vendor: 8,450 bytes, line 2115
2115function QR(e,t){t===void 0&&(t=e,e=$n);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return a[s](o-s)}}function e$(e){return function(){return e}}function mo(e){return+e}var _p=[0,1];function De(e){return e}function xl(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:e$(isNaN(t)?NaN:.5)}function t$(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function r$(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i<n?(n=xl(i,n),a=r(o,a)):(n=xl(n,i),a=r(a,o)),function(s){return a(n(s))}}function n$(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),a=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)i[o]=xl(e[o],e[o+1]),a[o]=r(t[o],t[o+1]);return function(s){var c=Wi(e,s,1,n)-1;return a[c](i[c](s))}}function Ki(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function xs(){var e=_p,t=_p,r=$n,n,i,a,o=De,s,c,l;function u(){var f=Math.min(e.length,t.length);return o!==De&&(o=t$(e[0],e[f-1])),s=f>2?n$:r$,c=l=null,d}function d(f){return f==null||isNaN(f=+f)?a:(c||(c=s(e.map(n),t,r)))(n(o(f)))}return d.invert=function(f){return o(i((l||(l=s(t,e.map(n),po)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,mo),u()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),u()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),r=rd,u()},d.clamp=function(f){return arguments.length?(o=f?!0:De,u()):o!==De},d.interpolate=function(f){return arguments.length?(r=f,u()):r},d.unknown=function(f){return arguments.length?(a=f,d):a},function(f,h){return n=f,i=h,u()}}function nd(){return xs()(De,De)}function i$(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function go(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Tn(e){return e=go(Math.abs(e)),e?e[1]:NaN}function a$(e,t){return function(r,n){for(var i=r.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>n&&(s=Math.max(1,n-c)),a.push(r.substring(i-=s,i+s)),!((c+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function o$(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var s$=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Oi(e){if(!(t=s$.exec(e)))throw new Error("invalid format: "+e);var t;return new id({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Oi.prototype=id.prototype;function id(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}id.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 c$(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var E0;function l$(e,t){var r=go(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(E0=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+go(e,Math.max(0,t+a-1))[0]}function Op(e,t){var r=go(e,t);if(!r)return e+"";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 Ap={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:i$,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Op(e*100,t),r:Op,s:l$,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Ep(e){return e}var Ip=Array.prototype.map,kp=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function u$(e){var t=e.grouping===void 0||e.thousands===void 0?Ep:a$(Ip.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?Ep:o$(Ip.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function l(d){d=Oi(d);var f=d.fill,h=d.align,g=d.sign,v=d.symbol,y=d.zero,b=d.width,S=d.comma,w=d.precision,_=d.trim,x=d.type;x==="n"?(S=!0,x="g"):Ap[x]||(w===void 0&&(w=12),_=!0,x="g"),(y||f==="0"&&h==="=")&&(y=!0,f="0",h="=");var O=v==="$"?r:v==="#"&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",P=v==="$"?n:/[%p]/.test(x)?o:"",k=Ap[x],I=/[defgprs%]/.test(x);w=w===void 0?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function D(T){var C=O,R=P,j,$,W;if(x==="c")R=k(T)+R,T="";else{T=+T;var z=T<0||1/T<0;if(T=isNaN(T)?c:k(Math.abs(T),w),_&&(T=c$(T)),z&&+T==0&&g!=="+"&&(z=!1),C=(z?g==="("?g:s:g==="-"||g==="("?"":g)+C,R=(x==="s"?kp[8+E0/3]:"")+R+(z&&g==="("?")":""),I){for(j=-1,$=T.length;++j<$;)if(W=T.charCodeAt(j),48>W||W>57){R=(W===46?i+T.slice(j+1):T.slice(j))+R,T=T.slice(0,j);break}}}S&&!y&&(T=t(T,1/0));var K=C.length+T.length+R.length,F=K<b?new Array(b-K+1).join(f):"";switch(S&&y&&(T=t(F+T,F.length?b-R.length:1/0),F=""),h){case"<":T=C+T+R+F;break;case"=":T=C+F+T+R;break;case"^":T=F.slice(0,K=F.length>>1)+C+T+R+F.slice(K);break;default:T=F+C+T+R;break}return a(T)}return D.toString=function(){return d+""},D}function u(d,f){var h=l((d=Oi(d),d.type="f",d)),g=Math.max(-8,Math.min(8,Math.floor(Tn(f)/3)))*3,v=Math.pow(10,-g),y=kp[8+g/3];return function(b){return h(v*b)+y}}return{format:l,formatPrefix:u}}var va,ad,I0;d$({thousands:",",grouping:[3],currency:["$",""]});function d$(e){return va=u$(e),ad=va.format,I0=va.formatPrefix,va}function f$(e){return Math.max(0,-Tn(Math.abs(e)))}function h$(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Tn(t)/3)))*3-Tn(Math.abs(e)))}function p$(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Tn(t)-Tn(e))+1}function k0(e,t,r,n){var i=yl(e,t,r),a;switch(n=Oi(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=h$(i,o))&&(n.precision=a),I0(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=p$(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=f$(i))&&(n.precision=a-(n.type==="%")*2);break}}return ad(n)}function Cr(e){var t=e.domain;return e.ticks=function(r){var n=t();return ml(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return k0(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],s=n[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-- >0;){if(l=gl(o,s,r),l===c)return n[i]=o,n[a]=s,t(n);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function T0(){var e=nd();return e.copy=function(){return Ki(e,T0())},ht.apply(e,arguments),Cr(e)}function C0(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,mo),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return C0(e).unknown(t)},e=arguments.length?Array.from(e,mo):[0,1],Cr(r)}function N0(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return a<i&&(o=r,r=n,n=o,o=i,i=a,a=o),e[r]=t.floor(i),e[n]=t.ceil(a),e}function Tp(e){return Math.log(e)}function Cp(e){return Math.exp(e)}function m$(e){return-Math.log(-e)}function g$(e){return-Math.exp(-e)}function y$(e){return isFinite(e)?+("1e"+e):e<0?0:e}function v$(e){return e===10?y$:e===Math.E?Math.exp:t=>Math.pow(e,t)}function b$(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Np(e){return(t,r)=>-e(-t,r)}
vendor: 4,915 bytes, line 2115
2115function od(e){const t=e(Tp,Cp),r=t.domain;let n=10,i,a;function o(){return i=b$(n),a=v$(n),r()[0]<0?(i=Np(i),a=Np(a),e(m$,g$)):e(Tp,Cp),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const c=r();let l=c[0],u=c[c.length-1];const d=u<l;d&&([l,u]=[u,l]);let f=i(l),h=i(u),g,v;const y=s==null?10:+s;let b=[];if(!(n%1)&&h-f<y){if(f=Math.floor(f),h=Math.ceil(h),l>0){for(;f<=h;++f)for(g=1;g<n;++g)if(v=f<0?g/a(-f):g*a(f),!(v<l)){if(v>u)break;b.push(v)}}else for(;f<=h;++f)for(g=n-1;g>=1;--g)if(v=f>0?g/a(-f):g*a(f),!(v<l)){if(v>u)break;b.push(v)}b.length*2<y&&(b=ml(l,u,y))}else b=ml(f,h,Math.min(h-f,y)).map(a);return d?b.reverse():b},t.tickFormat=(s,c)=>{if(s==null&&(s=10),c==null&&(c=n===10?"s":","),typeof c!="function"&&(!(n%1)&&(c=Oi(c)).precision==null&&(c.trim=!0),c=ad(c)),s===1/0)return c;const l=Math.max(1,n*s/t.ticks().length);return u=>{let d=u/a(Math.round(i(u)));return d*n<n-.5&&(d*=n),d<=l?c(u):""}},t.nice=()=>r(N0(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function j0(){const e=od(xs()).domain([1,10]);return e.copy=()=>Ki(e,j0()).base(e.base()),ht.apply(e,arguments),e}function jp(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Mp(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function sd(e){var t=1,r=e(jp(t),Mp(t));return r.constant=function(n){return arguments.length?e(jp(t=+n),Mp(t)):t},Cr(r)}function M0(){var e=sd(xs());return e.copy=function(){return Ki(e,M0()).constant(e.constant())},ht.apply(e,arguments)}function Dp(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function w$(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function x$(e){return e<0?-e*e:e*e}function cd(e){var t=e(De,De),r=1;function n(){return r===1?e(De,De):r===.5?e(w$,x$):e(Dp(r),Dp(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},Cr(t)}function ld(){var e=cd(xs());return e.copy=function(){return Ki(e,ld()).exponent(e.exponent())},ht.apply(e,arguments),e}function S$(){return ld.apply(null,arguments).exponent(.5)}function Rp(e){return Math.sign(e)*e*e}function P$(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function D0(){var e=nd(),t=[0,1],r=!1,n;function i(a){var o=P$(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(Rp(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,mo)).map(Rp)),i):t.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?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return D0(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},ht.apply(i,arguments),Cr(i)}function R0(){var e=[],t=[],r=[],n;function i(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o<s;)r[o-1]=ER(e,o/s);return a}function a(o){return o==null||isNaN(o=+o)?n:t[Wi(r,o)]}return a.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Or),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return R0().domain(e).range(t).unknown(n)},ht.apply(a,arguments)}function $0(){var e=0,t=1,r=1,n=[.5],i=[0,1],a;function o(c){return c!=null&&c<=c?i[Wi(n,c,0,r)]:a}function s(){var c=-1;for(n=new Array(r);++c<r;)n[c]=((c+1)*t-(c-r)*e)/(r+1);return o}return o.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,s()):[e,t]},o.range=function(c){return arguments.length?(r=(i=Array.from(c)).length-1,s()):i.slice()},o.invertExtent=function(c){var l=i.indexOf(c);return l<0?[NaN,NaN]:l<1?[e,n[0]]:l>=r?[n[r-1],t]:[n[l-1],n[l]]},o.unknown=function(c){return arguments.length&&(a=c),o},o.thresholds=function(){return n.slice()},o.copy=function(){return $0().domain([e,t]).range(i).unknown(a)},ht.apply(Cr(o),arguments)}function L0(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[Wi(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return L0().domain(e).range(t).unknown(r)},ht.apply(i,arguments)}const gc=new Date,yc=new Date;function pe(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>
vendor: 7,266 bytes, line 2115
2115(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const c=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return c;let l;do c.push(l=new Date(+a)),t(a,s),e(a);while(l<a&&a<o);return c},i.filter=a=>pe(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(gc.setTime(+a),yc.setTime(+o),e(gc),e(yc),Math.floor(r(gc,yc))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const yo=pe(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);yo.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?pe(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):yo);yo.range;const Vt=1e3,st=Vt*60,qt=st*60,tr=qt*24,ud=tr*7,$p=tr*30,vc=tr*365,zr=pe(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Vt)},(e,t)=>(t-e)/Vt,e=>e.getUTCSeconds());zr.range;const dd=pe(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Vt)},(e,t)=>{e.setTime(+e+t*st)},(e,t)=>(t-e)/st,e=>e.getMinutes());dd.range;const fd=pe(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*st)},(e,t)=>(t-e)/st,e=>e.getUTCMinutes());fd.range;const hd=pe(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Vt-e.getMinutes()*st)},(e,t)=>{e.setTime(+e+t*qt)},(e,t)=>(t-e)/qt,e=>e.getHours());hd.range;const pd=pe(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*qt)},(e,t)=>(t-e)/qt,e=>e.getUTCHours());pd.range;const Vi=pe(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*st)/tr,e=>e.getDate()-1);Vi.range;const Ss=pe(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/tr,e=>e.getUTCDate()-1);Ss.range;const F0=pe(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/tr,e=>Math.floor(e/tr));F0.range;function nn(e){return pe(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*st)/ud)}const Ps=nn(0),vo=nn(1),_$=nn(2),O$=nn(3),Cn=nn(4),A$=nn(5),E$=nn(6);Ps.range;vo.range;_$.range;O$.range;Cn.range;A$.range;E$.range;function an(e){return pe(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/ud)}const _s=an(0),bo=an(1),I$=an(2),k$=an(3),Nn=an(4),T$=an(5),C$=an(6);_s.range;bo.range;I$.range;k$.range;Nn.range;T$.range;C$.range;const md=pe(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());md.range;const gd=pe(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());gd.range;const rr=pe(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());rr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:pe(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});rr.range;const nr=pe(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());nr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:pe(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});nr.range;function U0(e,t,r,n,i,a){const o=[[zr,1,Vt],[zr,5,5*Vt],[zr,15,15*Vt],[zr,30,30*Vt],[a,1,st],[a,5,5*st],[a,15,15*st],[a,30,30*st],[i,1,qt],[i,3,3*qt],[i,6,6*qt],[i,12,12*qt],[n,1,tr],[n,2,2*tr],[r,1,ud],[t,1,$p],[t,3,3*$p],[e,1,vc]];function s(l,u,d){const f=u<l;f&&([l,u]=[u,l]);const h=d&&typeof d.range=="function"?d:c(l,u,d),g=h?h.range(l,+u+1):[];return f?g.reverse():g}function c(l,u,d){const f=Math.abs(u-l)/d,h=Xu(([,,y])=>y).right(o,f);if(h===o.length)return e.every(yl(l/vc,u/vc,d));if(h===0)return yo.every(Math.max(yl(l,u,d),1));const[g,v]=o[f/o[h-1][2]<o[h][2]/f?h-1:h];return g.every(v)}return[s,c]}const[N$,j$]=U0(nr,gd,_s,F0,pd,fd),[M$,D$]=U0(rr,md,Ps,Vi,hd,dd);function bc(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function wc(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Zn(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function R$(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=Qn(i),u=ei(i),d=Qn(a),f=ei(a),h=Qn(o),g=ei(o),v=Qn(s),y=ei(s),b=Qn(c),S=ei(c),w={a:z,A:K,b:F,B:_e,c:null,d:Wp,e:Wp,f:aL,g:mL,G:yL,H:rL,I:nL,j:iL,L:B0,m:oL,M:sL,p:Ve,q:Ue,Q:Vp,s:qp,S:cL,u:lL,U:uL,V:dL,w:fL,W:hL,x:null,X:null,y:pL,Y:gL,Z:vL,"%":Kp},_={a:Ut,A:tt,b:Mr,B:Kn,c:null,d:Hp,e:Hp,f:SL,g:NL,G:ML,H:bL,I:wL,j:xL,L:W0,m:PL,M:_L,p:Be,q:Bs,Q:Vp,s:qp,S:OL,u:AL,U:EL,V:IL,w:kL,W:TL,x:null,X:null,y:CL,Y:jL,Z:DL,"%":Kp},x={a:D,A:T,b:C,B:R,c:j,d:Bp,e:Bp,f:Z$,g:Up,G:Fp,H:zp,I:zp,j:G$,L:X$,m:q$,M:Y$,p:I,q:V$,Q:eL,s:tL,S:J$,u:B$,U:z$,V:W$,w:U$,W:H$,x:$,X:W,y:Up,Y:Fp,Z:K$,"%":Q$};w.x=O(r,w),w.X=O(n,w),w.c=O(t,w),_.x=O(r,_),_.X=O(n,_),_.c=O(t,_);function O(N,V){return function(q){var M=[],ze=-1,te=0,qe=N.length,Ge,Dr,lf;for(q instanceof Date||(q=new Date(+q));++ze<qe;)N.charCodeAt(ze)===37&&(M.push(N.slice(te,ze)),(Dr=Lp[Ge=N.charAt(++ze)])!=null?Ge=N.charAt(++ze):Dr=Ge==="e"?" ":"0",(lf=V[Ge])&&(Ge=lf(q,Dr)),M.push(Ge),te=ze+1);return M.push(N.slice(te,ze)),M.join("")}}function P(N,V){return function(q){var M=Zn(1900,void 0,1),ze=k(M,N,q+="",0),te,qe;if(ze!=q.length)return null;if("Q"in M)return new Date(M.Q);if("s"in M)return new Date(M.s*1e3+("L"in M?M.L:0));if(V&&!("Z"in M)&&(M.Z=0),"p"in M&&(M.H=M.H%12+M.p*12),M.m===void 0&&(M.m="q"in M?M.q:0),"V"in M){if(M.V<1||M.V>53)return null;"w"in M||(M.w=1),"Z"in M?(te=wc(Zn(M.y,0,1)),qe=te.getUTCDay(),te=qe>4||qe===0?bo.ceil(te):bo(te),te=Ss.offset(te,(M.V-1)*7),M.y=te.getUTCFullYear(),M.m=te.getUTCMonth(),M.d=te.getUTCDate()+(M.w+6)%7):(te=bc(Zn(M.y,0,1)),qe=te.getDay(),te=qe>4||qe===0?vo.ceil(te):vo(te),te=Vi.offset(te,(M.V-1)*7),M.y=te.getFullYear(),M.m=te.getMonth(),M.d=te.getDate()+(M.w+6)%7)}else("W"in M||"U"in M)&&("w"in M||(M.w="u"in M?M.u%7:"W"in M?1:0),qe="Z"in M?wc(Zn(M.y,0,1)).getUTCDay():bc(Zn(M.y,0,1)).getDay(),M.m=0,M.d="W"in M?(M.w+6)%7+M.W*7-(qe+5)%7:M.w+M.U*7-(qe+6)%7);return"Z"in M?(M.H+=M.Z/100|0,M.M+=M.Z%100,wc(M)):bc(M)}}function k(N,V,q,M){for(var ze=0,te=V.length,qe=q.length,Ge,Dr;ze<te;){if(M>=qe)return-1;if(Ge=V.charCodeAt(ze++),Ge===37){if(Ge=V.charAt(ze++),Dr=x[Ge in Lp?V.charAt(ze++):Ge],!Dr||(M=Dr(N,q,M))<0)return-1}else if(Ge!=q.charCodeAt(M++))return-1}return M}function I(N,V,q){var M=l.exec(V.slice(q));return M?(N.p=u.get(M[0].toLowerCase()),q+M[0].length):-1}function D(N,V,q){var M=h.exec(V.slice(q));
vendor: 5,885 bytes, line 2115
2115return M?(N.w=g.get(M[0].toLowerCase()),q+M[0].length):-1}function T(N,V,q){var M=d.exec(V.slice(q));return M?(N.w=f.get(M[0].toLowerCase()),q+M[0].length):-1}function C(N,V,q){var M=b.exec(V.slice(q));return M?(N.m=S.get(M[0].toLowerCase()),q+M[0].length):-1}function R(N,V,q){var M=v.exec(V.slice(q));return M?(N.m=y.get(M[0].toLowerCase()),q+M[0].length):-1}function j(N,V,q){return k(N,t,V,q)}function $(N,V,q){return k(N,r,V,q)}function W(N,V,q){return k(N,n,V,q)}function z(N){return o[N.getDay()]}function K(N){return a[N.getDay()]}function F(N){return c[N.getMonth()]}function _e(N){return s[N.getMonth()]}function Ve(N){return i[+(N.getHours()>=12)]}function Ue(N){return 1+~~(N.getMonth()/3)}function Ut(N){return o[N.getUTCDay()]}function tt(N){return a[N.getUTCDay()]}function Mr(N){return c[N.getUTCMonth()]}function Kn(N){return s[N.getUTCMonth()]}function Be(N){return i[+(N.getUTCHours()>=12)]}function Bs(N){return 1+~~(N.getUTCMonth()/3)}return{format:function(N){var V=O(N+="",w);return V.toString=function(){return N},V},parse:function(N){var V=P(N+="",!1);return V.toString=function(){return N},V},utcFormat:function(N){var V=O(N+="",_);return V.toString=function(){return N},V},utcParse:function(N){var V=P(N+="",!0);return V.toString=function(){return N},V}}}var Lp={"-":"",_:" ",0:"0"},Pe=/^\s*\d+/,$$=/^%/,L$=/[\\^$*+?|[\]().{}]/g;function G(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(t)+i:i)}function F$(e){return e.replace(L$,"\\$&")}function Qn(e){return new RegExp("^(?:"+e.map(F$).join("|")+")","i")}function ei(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function U$(e,t,r){var n=Pe.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function B$(e,t,r){var n=Pe.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function z$(e,t,r){var n=Pe.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function W$(e,t,r){var n=Pe.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function H$(e,t,r){var n=Pe.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Fp(e,t,r){var n=Pe.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Up(e,t,r){var n=Pe.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function K$(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function V$(e,t,r){var n=Pe.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function q$(e,t,r){var n=Pe.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Bp(e,t,r){var n=Pe.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function G$(e,t,r){var n=Pe.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function zp(e,t,r){var n=Pe.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function Y$(e,t,r){var n=Pe.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function J$(e,t,r){var n=Pe.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function X$(e,t,r){var n=Pe.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function Z$(e,t,r){var n=Pe.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function Q$(e,t,r){var n=$$.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function eL(e,t,r){var n=Pe.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function tL(e,t,r){var n=Pe.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Wp(e,t){return G(e.getDate(),t,2)}function rL(e,t){return G(e.getHours(),t,2)}function nL(e,t){return G(e.getHours()%12||12,t,2)}function iL(e,t){return G(1+Vi.count(rr(e),e),t,3)}function B0(e,t){return G(e.getMilliseconds(),t,3)}function aL(e,t){return B0(e,t)+"000"}function oL(e,t){return G(e.getMonth()+1,t,2)}function sL(e,t){return G(e.getMinutes(),t,2)}function cL(e,t){return G(e.getSeconds(),t,2)}function lL(e){var t=e.getDay();return t===0?7:t}function uL(e,t){return G(Ps.count(rr(e)-1,e),t,2)}function z0(e){var t=e.getDay();return t>=4||t===0?Cn(e):Cn.ceil(e)}function dL(e,t){return e=z0(e),G(Cn.count(rr(e),e)+(rr(e).getDay()===4),t,2)}function fL(e){return e.getDay()}function hL(e,t){return G(vo.count(rr(e)-1,e),t,2)}function pL(e,t){return G(e.getFullYear()%100,t,2)}function mL(e,t){return e=z0(e),G(e.getFullYear()%100,t,2)}function gL(e,t){return G(e.getFullYear()%1e4,t,4)}function yL(e,t){var r=e.getDay();return e=r>=4||r===0?Cn(e):Cn.ceil(e),G(e.getFullYear()%1e4,t,4)}function vL(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+G(t/60|0,"0",2)+G(t%60,"0",2)}function Hp(e,t){return G(e.getUTCDate(),t,2)}function bL(e,t){return G(e.getUTCHours(),t,2)}function wL(e,t){return G(e.getUTCHours()%12||12,t,2)}function xL(e,t){return G(1+Ss.count(nr(e),e),t,3)}function W0(e,t){return G(e.getUTCMilliseconds(),t,3)}function SL(e,t){return W0(e,t)+"000"}function PL(e,t){return G(e.getUTCMonth()+1,t,2)}function _L(e,t){return G(e.getUTCMinutes(),t,2)}function OL(e,t){return G(e.getUTCSeconds(),t,2)}function AL(e){var t=e.getUTCDay();return t===0?7:t}function EL(e,t){return G(_s.count(nr(e)-1,e),t,2)}function H0(e){var t=e.getUTCDay();return t>=4||t===0?Nn(e):Nn.ceil(e)}function IL(e,t){return e=H0(e),G(Nn.count(nr(e),e)+(nr(e).getUTCDay()===4),t,2)}function kL(e){return e.getUTCDay()}function TL(e,t){return G(bo.count(nr(e)-1,e),t,2)}function CL(e,t){return G(e.getUTCFullYear()%100,t,2)}function NL(e,t){return e=H0(e),G(e.getUTCFullYear()%100,t,2)}function jL(e,t){return G(e.getUTCFullYear()%1e4,t,4)}function ML(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Nn(e):Nn.ceil(e),G(e.getUTCFullYear()%1e4,t,4)}function DL(){return"+0000"}function Kp(){return"%"}function Vp(e){return+e}function qp(e){return Math.floor(+e/1e3)}var on,K0,V0;RL({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
2115ay","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 RL(e){return on=R$(e),K0=on.format,on.parse,V0=on.utcFormat,on.utcParse,on}function $L(e){return new Date(e)}function LL(e){return e instanceof Date?+e:+new Date(+e)}function yd(e,t,r,n,i,a,o,s,c,l){var u=nd(),d=u.invert,f=u.domain,h=l(".%L"),g=l(":%S"),v=l("%I:%M"),y=l("%I %p"),b=l("%a %d"),S=l("%b %d"),w=l("%B"),_=l("%Y");function x(O){return(c(O)<O?h:s(O)<O?g:o(O)<O?v:a(O)<O?y:n(O)<O?i(O)<O?b:S:r(O)<O?w:_)(O)}return u.invert=function(O){return new Date(d(O))},u.domain=function(O){return arguments.length?f(Array.from(O,LL)):f().map($L)},u.ticks=function(O){var P=f();return e(P[0],P[P.length-1],O??10)},u.tickFormat=function(O,P){return P==null?x:l(P)},u.nice=function(O){var P=f();return(!O||typeof O.range!="function")&&(O=t(P[0],P[P.length-1],O??10)),O?f(N0(P,O)):u},u.copy=function(){return Ki(u,yd(e,t,r,n,i,a,o,s,c,l))},u}function FL(){return ht.apply(yd(M$,D$,rr,md,Ps,Vi,hd,dd,zr,K0).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function UL(){return ht.apply(yd(N$,j$,nr,gd,_s,Ss,pd,fd,zr,V0).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Os(){var e=0,t=1,r,n,i,a,o=De,s=!1,c;function l(d){return d==null||isNaN(d=+d)?c:o(i===0?.5:(d=(a(d)-r)*i,s?Math.max(0,Math.min(1,d)):d))}l.domain=function(d){return arguments.length?([e,t]=d,r=a(e=+e),n=a(t=+t),i=r===n?0:1/(n-r),l):[e,t]},l.clamp=function(d){return arguments.length?(s=!!d,l):s},l.interpolator=function(d){return arguments.length?(o=d,l):o};function u(d){return function(f){var h,g;return arguments.length?([h,g]=f,o=d(h,g),l):[o(0),o(1)]}}return l.range=u($n),l.rangeRound=u(rd),l.unknown=function(d){return arguments.length?(c=d,l):c},function(d){return a=d,r=d(e),n=d(t),i=r===n?0:1/(n-r),l}}function Nr(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function q0(){var e=Cr(Os()(De));return e.copy=function(){return Nr(e,q0())},lr.apply(e,arguments)}function G0(){var e=od(Os()).domain([1,10]);return e.copy=function(){return Nr(e,G0()).base(e.base())},lr.apply(e,arguments)}function Y0(){var e=sd(Os());return e.copy=function(){return Nr(e,Y0()).constant(e.constant())},lr.apply(e,arguments)}function vd(){var e=cd(Os());return e.copy=function(){return Nr(e,vd()).exponent(e.exponent())},lr.apply(e,arguments)}function BL(){return vd.apply(null,arguments).exponent(.5)}function J0(){var e=[],t=De;function r(n){if(n!=null&&!isNaN(n=+n))return t((Wi(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Or),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>AR(e,a/n))},r.copy=function(){return J0(t).domain(e)},lr.apply(r,arguments)}function As(){var e=0,t=.5,r=1,n=1,i,a,o,s,c,l=De,u,d=!1,f;function h(v){return isNaN(v=+v)?f:(v=.5+((v=+u(v))-a)*(n*v<n*a?s:c),l(d?Math.max(0,Math.min(1,v)):v))}h.domain=function(v){return arguments.length?([e,t,r]=v,i=u(e=+e),a=u(t=+t),o=u(r=+r),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),n=a<i?-1:1,h):[e,t,r]},h.clamp=function(v){return arguments.length?(d=!!v,h):d},h.interpolator=function(v){return arguments.length?(l=v,h):l};function g(v){return function(y){var b,S,w;return arguments.length?([b,S,w]=y,l=QR(v,[b,S,w]),h):[l(0),l(.5),l(1)]}}return h.range=g($n),h.rangeRound=g(rd),h.unknown=function(v){return arguments.length?(f=v,h):f},function(v){return u=v,i=v(e),a=v(t),o=v(r),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),n=a<i?-1:1,h}}function X0(){var e=Cr(As()(De));return e.copy=function(){return Nr(e,X0())},lr.apply(e,arguments)}function Z0(){var e=od(As()).domain([.1,1,10]);return e.copy=function(){return Nr(e,Z0()).base(e.base())},lr.apply(e,arguments)}function Q0(){var e=sd(As());return e.copy=function(){return Nr(e,Q0()).constant(e.constant())},lr.apply(e,arguments)}function bd(){var e=cd(As());return e.copy=function(){return Nr(e,bd()).exponent(e.exponent())},lr.apply(e,arguments)}function zL(){return bd.apply(null,arguments).exponent(.5)}const ai=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Qu,scaleDiverging:X0,scaleDivergingLog:Z0,scaleDivergingPow:bd,scaleDivergingSqrt:zL,scaleDivergingSymlog:Q0,scaleIdentity:C0,scaleImplicit:vl,scaleLinear:T0,scaleLog:j0,scaleOrdinal:Zu,scalePoint:kR,scalePow:ld,scaleQuantile:R0,scaleQuantize:$0,scaleRadial:D0,scaleSequential:q0,scaleSequentialLog:G0,scaleSequentialPow:vd,scaleSequentialQuantile:J0,scaleSequentialSqrt:BL,scaleSequentialSymlog:Y0,scaleSqrt:S$,scaleSymlog:M0,scaleThreshold:L0,scaleTime:FL,scaleUtc:UL,tickFormat:k0},Symbol.toStringTag,{value:"Module"}));var jr=e=>e.chartData,WL=E([jr],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Es=(e,t,r,n)=>n?WL(e):jr(e);function Er(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(oe(t)&&oe(r))return!0}return!1}function Gp(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function ew(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,n]=e,i,a;if(oe(r))i=r;else if(typeof r=="function")return;if(oe(n))a=n;else if(typeof n=="function")return;var o=[i,a];if(Er(o))return o}}function HL(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);
vendor: 15,288 bytes, line 2115
2115if(Er(n))return Gp(n,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var[i,a]=e,o,s;if(i==="auto")t!=null&&(o=Math.min(...t));else if(U(i))o=i;else if(typeof i=="function")try{t!=null&&(o=i(t==null?void 0:t[0]))}catch{}else if(typeof i=="string"&&Th.test(i)){var c=Th.exec(i);if(c==null||t==null)o=void 0;else{var l=+c[1];o=t[0]-l}}else o=t==null?void 0:t[0];if(a==="auto")t!=null&&(s=Math.max(...t));else if(U(a))s=a;else if(typeof a=="function")try{t!=null&&(s=a(t==null?void 0:t[1]))}catch{}else if(typeof a=="string"&&Ch.test(a)){var u=Ch.exec(a);if(u==null||t==null)s=void 0;else{var d=+u[1];s=t[1]+d}}else s=t==null?void 0:t[1];var f=[o,s];if(Er(f))return t==null?f:Gp(f,t,r)}}}var Ln=1e9,KL={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},xd,ae=!0,ft="[DecimalError] ",Vr=ft+"Invalid argument: ",wd=ft+"Exponent out of range: ",Fn=Math.floor,Fr=Math.pow,VL=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Je,we=1e7,ne=7,tw=9007199254740991,wo=Fn(tw/ne),L={};L.absoluteValue=L.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};L.comparedTo=L.cmp=function(e){var t,r,n,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};L.decimalPlaces=L.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*ne;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};L.dividedBy=L.div=function(e){return Gt(this,new this.constructor(e))};L.dividedToIntegerBy=L.idiv=function(e){var t=this,r=t.constructor;return ee(Gt(t,new r(e),0,1),r.precision)};L.equals=L.eq=function(e){return!this.cmp(e)};L.exponent=function(){return ue(this)};L.greaterThan=L.gt=function(e){return this.cmp(e)>0};L.greaterThanOrEqualTo=L.gte=function(e){return this.cmp(e)>=0};L.isInteger=L.isint=function(){return this.e>this.d.length-2};L.isNegative=L.isneg=function(){return this.s<0};L.isPositive=L.ispos=function(){return this.s>0};L.isZero=function(){return this.s===0};L.lessThan=L.lt=function(e){return this.cmp(e)<0};L.lessThanOrEqualTo=L.lte=function(e){return this.cmp(e)<1};L.logarithm=L.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Je))throw Error(ft+"NaN");if(r.s<1)throw Error(ft+(r.s?"NaN":"-Infinity"));return r.eq(Je)?new n(0):(ae=!1,t=Gt(Ai(r,a),Ai(e,a),a),ae=!0,ee(t,i))};L.minus=L.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?iw(t,e):rw(t,(e.s=-e.s,e))};L.modulo=L.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(ft+"NaN");return r.s?(ae=!1,t=Gt(r,e,0,1).times(e),ae=!0,r.minus(t)):ee(new n(r),i)};L.naturalExponential=L.exp=function(){return nw(this)};L.naturalLogarithm=L.ln=function(){return Ai(this)};L.negated=L.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};L.plus=L.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?rw(t,e):iw(t,(e.s=-e.s,e))};L.precision=L.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Vr+e);if(t=ue(i)+1,n=i.d.length-1,r=n*ne+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};L.squareRoot=L.sqrt=function(){var e,t,r,n,i,a,o,s=this,c=s.constructor;if(s.s<1){if(!s.s)return new c(0);throw Error(ft+"NaN")}for(e=ue(s),ae=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=Et(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Fn((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new c(t)):n=new c(i.toString()),r=c.precision,i=o=r+3;;)if(a=n,n=a.plus(Gt(s,a,o+2)).times(.5),Et(a.d).slice(0,o)===(t=Et(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(ee(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if(t!="9999")break;o+=4}return ae=!0,ee(n,r)};L.times=L.mul=function(e){var t,r,n,i,a,o,s,c,l,u=this,d=u.constructor,f=u.d,h=(e=new d(e)).d;if(!u.s||!e.s)return new d(0);for(e.s*=u.s,r=u.e+e.e,c=f.length,l=h.length,c<l&&(a=f,f=h,h=a,o=c,c=l,l=o),a=[],o=c+l,n=o;n--;)a.push(0);for(n=l;--n>=0;){for(t=0,i=c+n;i>n;)s=a[i]+h[n]*f[i-n-1]+t,a[i--]=s%we|0,t=s/we|0;a[i]=(a[i]+t)%we|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,ae?ee(e,d.precision):e};L.toDecimalPlaces=L.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Dt(e,0,Ln),t===void 0?t=n.rounding:Dt(t,0,8),ee(r,e+ue(r)+1,t))};L.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Qr(n,!0):(Dt(e,0,Ln),t===void 0?t=i.rounding:Dt(t,0,8),n=ee(new i(n),e+1,t),r=Qr(n,!0,e+1)),r};L.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?Qr(i):(Dt(e,0,Ln),t===void 0?t=a.rounding:Dt(t,0,8),n=ee(new a(i),e+ue(i)+1,t),r=Qr(n.abs(),!1,e+ue(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};L.toInteger=L.toint=function(){var e=this,t=e.constructor;return ee(new t(e),ue(e)+1,t.rounding)};L.toNumber=function(){return+this};L.toPower=L.pow=function(e){var t,r,n,i,a,o,s=this,c=s.constructor,l=12,u=+(e=new c(e));if(!e.s)return new c(Je);if(s=new c(s),!s.s){if(e.s<1)throw Error(ft+"Infinity");return s}if(s.eq(Je))return s;if(n=c.precision,e.eq(Je))return ee(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=s.s,o){if((r=u<0?-u:u)<=tw){for(i=new c(Je),t=Math.ceil(n/ne+4),ae=!1;r%2&&(i=i.times(s),Jp(i.d,t)),r=Fn(r/2),r!==0;)s=s.times(s),Jp(s.d,t);return ae=!0,e.s<0?new c(Je).div(i):ee(i,n)}}else if(a<0)throw Error(ft+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,ae=!1,i=e.times(Ai(s,n+l)),ae=!0,i=nw(i),i.s=a,i};L.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=ue(i),n=Qr(i,r<=a.toExpNeg||r>=a.toExpPos)):(Dt(e,1,Ln),t===void 0?t=a.rounding:Dt(t,0,8),i=ee(new a(i),e,t),r=ue(i),n=Qr(i,e<=r||r<=a.toExpNeg,e)),n};L.toSignificantDigits=L.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Dt(e,1,Ln),t===void 0?t=n.rounding:Dt(t,0,8)),ee(new n(r),e,t)};L.toString=L.valueOf=L.val=L.toJSON=L[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=ue(e),r=e.constructor;return Qr(e,t<=r.toExpNeg||t>=r.toExpPos)};function rw(e,t){var r,n,i,a,o,s,c,l,u=e.constructor,d=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),ae?ee(t,d):t;if(c=e.d,l=t.d,o=e.e,i=t.e,c=c.slice(),a=o-i,a){for(a<0?(n=c,a=-a,s=l.length):(n=l,i=o,s=c.length),o=Math.ceil(d/ne),s=o>s?o+1:s+1,a>s&&(a=s,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(s=c.length,a=l.length,s-a<0&&(a=s,n=l,l=c,c=n),r=0;a;)r=(c[--a]=c[a]+l[a]+r)/we|0,c[a]%=we;for(r&&(c.unshift(r),++i),s=c.length;c[--s]==0;)c.pop();return t.d=c,t.e=i,ae?ee(t,d):t}function Dt(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Vr+e)}function Et(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)n=e[t]+"",r=ne-n.length,r&&(a+=pr(r)),a+=n;o=e[t],n=o+"",r=ne-n.length,r&&(a+=pr(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var Gt=function(){function e(n,i){var a,o=0,s=n.length;for(n=n.slice();s--;)a=n[s]*i+o,n[s]=a%we|0,o=a/we|0;return o&&n.unshift(o),n}function t(n,i,a,o){var s,c;if(a!=o)c=a>o?1:-1;else for(s=c=0;s<a;s++)if(n[s]!=i[s]){c=n[s]>i[s]?1:-1;break}return c}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]<i[a]?1:0,n[a]=o*we+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,o){var s,c,l,u,d,f,h,g,v,y,b,S,w,_,x,O,P,k,I=n.constructor,D=n.s==i.s?1:-1,T=n.d,C=i.d;if(!n.s)return new I(n);if(!i.s)throw Error(ft+"Division by zero");for(c=n.e-i.e,P=C.length,x=T.length,h=new I(D),g=h.d=[],l=0;C[l]==(T[l]||0);)++l;if(C[l]>(T[l]||0)&&--c,a==null?S=a=I.precision:o?S=a+(ue(n)-ue(i))+1:S=a,S<0)return new I(0);if(S=S/ne+2|0,l=0,P==1)for(u=0,C=C[0],S++;(l<x||u)&&S--;l++)w=u*we+(T[l]||0),g[l]=w/C|0,u=w%C|0;else{for(u=we/(C[0]+1)|0,u>1&&(C=e(C,u),T=e(T,u),P=C.length,x=T.length),_=P,v=T.slice(0,P),y=v.length;y<P;)v[y++]=0;k=C.slice(),k.unshift(0),O=C[0],C[1]>=we/2&&++O;do u=0,s=t(C,v,P,y),s<0?(b=v[0],P!=y&&(b=b*we+(v[1]||0)),u=b/O|0,u>1?(u>=we&&(u=we-1),d=e(C,u),f=d.length,y=v.length,s=t(d,v,f,y),s==1&&(u--,r(d,P<f?k:C,f))):(u==0&&(s=u=1),d=C.slice()),f=d.length,f<y&&d.unshift(0),r(v,d,y),s==-1&&(y=v.length,s=t(C,v,P,y),s<1&&(u++,r(v,P<y?k:C,y))),y=v.length):s===0&&(u++,v=[0]),g[l++]=u,s&&v[0]?v[y++]=T[_]||0:(v=[T[_]],y=1);while((_++<x||v[0]!==void 0)&&S--)}return g[0]||g.shift(),h.e=c,ee(h,o?a+ue(h)+1:a)}}();function nw(e,t){var r,n,i,a,o,s,c=0,l=0,u=e.constructor,d=u.precision;if(ue(e)>16)throw Error(wd+ue(e));if(!e.s)return new u(Je);for(ae=!1,s=d,o=new u(.03125);e.abs().gte(.1);)e=e.times(o),l+=5;for(n=Math.log(Fr(2,l))/Math.LN10*2+5|0,s+=n,r=i=a=new u(Je),u.precision=s;;){if(i=ee(i.times(e),s),r=r.times(++c),o=a.plus(Gt(i,r,s)),Et(o.d).slice(0,s)===Et(a.d).slice(0,s)){for(;l--;)a=ee(a.times(a),s);return u.precision=d,t==null?(ae=!0,ee(a,d)):a}a=o}}function ue(e){for(var t=e.e*ne,r=e.d[0];r>=10;r/=10)t++;return t}function xc(e,t,r){if(t>e.LN10.sd())throw ae=!0,r&&(e.precision=r),Error(ft+"LN10 precision limit exceeded");return ee(new e(e.LN10),t)}function pr(e){for(var t="";e--;)t+="0";return t}function Ai(e,t){var r,n,i,a,o,s,c,l,u,d=1,f=10,h=e,g=h.d,v=h.constructor,y=v.precision;if(h.s<1)throw Error(ft+(h.s?"NaN":"-Infinity"));if(h.eq(Je))return new v(0);if(t==null?(ae=!1,l=y):l=t,h.eq(10))return t==null&&(ae=!0),xc(v,l);if(l+=f,v.precision=l,r=Et(g),n=r.charAt(0),a=ue(h),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=Et(h.d),n=r.charAt(0),d++;a=ue(h),n>1?(h=new v("0."+r),a++):h=new v(n+"."+r.slice(1))}else return c=xc(v,l+2,y).times(a+""),h=Ai(new v(n+"."+r.slice(1)),l-f).plus(c),v.precision=y,t==null?(ae=!0,ee(h,y)):h;for(s=o=h=Gt(h.minus(Je),h.plus(Je),l),u=ee(h.times(h),l),i=3;;){if(o=ee(o.times(u),l),c=s.plus(Gt(o,new v(i),l)),Et(c.d).slice(0,l)===Et(s.d).slice(0,l))return s=s.times(2),a!==0&&(s=s.plus(xc(v,l+2,y).times(a+""))),s=Gt(s,new v(d),l),v.precision=y,t==null?(ae=!0,ee(s,y)):s;s=c,i+=2}}function Yp(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Fn(r/ne),e.d=[],n=(r+1)%ne,r<0&&(n+=ne),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=ne;n<i;)e.d.push(+t.slice(n,n+=ne));t=t.slice(n),n=ne-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),ae&&(e.e>wo||e.e<-wo))throw Error(wd+r)}else e.s=0,e.e=0,e.d=[0];return e}function ee(e,t,r){var n,i,a,o,s,c,l,u,d=e.d;for(o=1,a=d[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=ne,i=t,l=d[u=0];else{if(u=Math.ceil((n+1)/ne),a=d.length,u>=a)return e;for(l=a=d[u],o=1;a>=10;a/=10)o++;n%=ne,i=n-ne+o}if(r!==void 0&&(a=Fr(10,o-i-1),s=l/a%10|0,c=t<0||d[u+1]!==void 0||l%a,c=r<4?(s||c)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||c||r==6&&(n>0?i>0?l/Fr(10,o-i):0:d[u-1])%10&1||r==(e.s<0?8:7))),t<1||!d[0])return c?(a=ue(e),d.length=1,t=t-a-1,d[0]=Fr(10,(ne-t%ne)%ne),e.e=Fn(-t/ne)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(n==0?(d.length=u,a=1,u--):(d.length=u+1,a=Fr(10,ne-n),d[u]=i>0?(l/Fr(10,o-i)%Fr(10,i)|0)*a:0),c)for(;;)if(u==0){(d[0]+=a)==we&&(d[0]=1,++e.e);break}else{if(d[u]+=a,d[u]!=we)break;d[u--]=0,a=1}for(n=d.length;d[--n]===0;)d.pop();if(ae&&(e.e>wo||e.e<-wo))throw Error(wd+ue(e));return e}function iw(e,t){var r,n,i,a,o,s,c,l,u,d,f=e.constructor,h=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),ae?ee(t,h):t;if(c=e.d,d=t.d,n=t.e,l=e.e,c=c.slice(),o=l-n,o){for(u=o<0,u?(r=c,o=-o,s=d.length):(r=d,n=l,s=c.length),i=Math.max(Math.ceil(h/ne),s)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=c.length,s=d.length,u=i<s,u&&(s=i),i=0;i<s;i++)if(c[i]!=d[i]){u=c[i]<d[i];break}o=0}for(u&&(r=c,c=d,d=r,t.s=-t.s),s=c.length,i=d.length-s;i>0;--i)c[s++]=0;for(i=d.length;i>o;){if(c[--i]<d[i]){for(a=i;a&&c[--a]===0;)c[a]=we-1;--c[a],c[i]+=we}c[i]-=d[i]}for(;c[--s]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(t.d=c,t.e=n,ae?ee(t,h):t):new f(0)}function Qr(e,t,r){var n,i=ue(e),a=Et(e.d),o=a.length;return t?(r&&(n=r-o)>0?a=a.charAt(0)+"."+a.slice(1)+pr(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+pr(-i-1)+a,r&&(n=r-o)>0&&(a+=pr(n))):i>=o?(a+=pr(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+pr(n))):((n=i+1)<o&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(a+="."),a+=pr(n))),e.s<0?"-"+a:a}function Jp(e,t){if(e.length>t)return e.length=t,!0}function aw(e){var t,r,n;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Vr+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return Yp(o,a.toString())}else if(typeof a!="string")throw Error(Vr+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,VL.test(a))Yp(o,a);else throw Error(Vr+a)}if(i.prototype=L,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=aw,i.config=i.set=qL,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function qL(e){if(!e||typeof e!="object")throw Error(ft+"Object expected");var t,r,n,i=["precision",1,Ln,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(Fn(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Vr+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Vr+r+": "+n);return this}var xd=aw(KL);Je=new xd(1);const Y=xd;var GL=e=>e,ow={},sw=e=>e===ow,Xp=e=>function t(){return arguments.length===0||arguments.length===1&&sw(arguments.length<=0?void 0:arguments[0])?t:e(...arguments)},cw=(e,t)=>e===1?t:Xp(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var a=n.filter(o=>o!==ow).length;return a>=e?t(...n):cw(e-a,Xp(function(){for(var o=arguments.length,s=new Array(o),c=0;c<o;c++)s[c]=arguments[c];var l=n.map(u=>sw(u)?s.shift():u);return t(...l,...s)}))}),YL=e=>cw(e.length,e),Sl=(e,t)=>{for(var r=[],n=e;n<t;++n)r[n-e]=n;return r},JL=YL((e,t)=>Array.isArray(t)?t.map(e):Object.keys(t).map(r=>t[r]).map(e)),XL=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return GL;var i=r.reverse(),a=i[0],o=i.slice(1);return function(){return o.reduce((s,c)=>c(s),a(...arguments))}},Pl=e=>Array.isArray(e)?e.reverse():e.split("").reverse().join("");function lw(e){var t;return e===0?t=1:t=Math.floor(new Y(e).abs().log(10).toNumber())+1,t}function uw(e,t,r){for(var n=new Y(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var dw=e=>{var[t,r]=e,[n,i]=[t,r];return t>r&&([n,i]=[r,t]),[n,i]},fw=(e,t,r)=>{if(e.lte(0))return new Y(0);var n=lw(e.toNumber()),i=new Y(10).pow(n),a=e.div(i),o=n!==1?.05:.1,s=new Y(Math.ceil(a.div(o).toNumber())).add(r).mul(o),c=s.mul(i);return t?new Y(c.toNumber()):new Y(Math.ceil(c.toNumber()))},ZL=(e,t,r)=>{var n=new Y(1),i=new Y(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new Y(10).pow(lw(e)-1),i=new Y(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new Y(Math.floor(e)))}
2115else e===0?i=new Y(Math.floor((t-1)/2)):r||(i=new Y(Math.floor(e)));var o=Math.floor((t-1)/2),s=XL(JL(c=>i.add(new Y(c-o).mul(n)).toNumber()),Sl);return s(0,t)},hw=function(t,r,n,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((r-t)/(n-1)))return{step:new Y(0),tickMin:new Y(0),tickMax:new Y(0)};var o=fw(new Y(r).sub(t).div(n-1),i,a),s;t<=0&&r>=0?s=new Y(0):(s=new Y(t).add(r).div(2),s=s.sub(new Y(s).mod(o)));var c=Math.ceil(s.sub(t).div(o).toNumber()),l=Math.ceil(new Y(r).sub(s).div(o).toNumber()),u=c+l+1;return u>n?hw(t,r,n,i,a+1):(u<n&&(l=r>0?l+(n-u):l,c=r>0?c:c+(n-u)),{step:o,tickMin:s.sub(new Y(c).mul(o)),tickMax:s.add(new Y(l).mul(o))})},QL=function(t){var[r,n]=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),[s,c]=dw([r,n]);if(s===-1/0||c===1/0){var l=c===1/0?[s,...Sl(0,i-1).map(()=>1/0)]:[...Sl(0,i-1).map(()=>-1/0),c];return r>n?Pl(l):l}if(s===c)return ZL(s,i,a);var{step:u,tickMin:d,tickMax:f}=hw(s,c,o,a,0),h=uw(d,f.add(new Y(.1).mul(u)),u);return r>n?Pl(h):h},e6=function(t,r){var[n,i]=t,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[o,s]=dw([n,i]);if(o===-1/0||s===1/0)return[n,i];if(o===s)return[o];var c=Math.max(r,2),l=fw(new Y(s).sub(o).div(c-1),a,0),u=[...uw(new Y(o),new Y(s),l),s];return a===!1&&(u=u.map(d=>Math.round(d))),n>i?Pl(u):u},t6=e=>e.rootProps.barCategoryGap,Is=e=>e.rootProps.stackOffset,pw=e=>e.rootProps.reverseStackOrder,Sd=e=>e.options.chartName,Pd=e=>e.rootProps.syncId,mw=e=>e.rootProps.syncMethod,_d=e=>e.options.eventEmitter,r6=e=>e.rootProps.baseValue,Ce={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},zt={allowDuplicatedCategory:!0,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"category"},Ye={allowDataOverflow:!1,allowDuplicatedCategory:!0,radiusAxisId:0,scale:"auto",tick:!0,tickCount:5,type:"number"},ks=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t},n6={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:zt.angleAxisId,includeHidden:!1,name:void 0,reversed:zt.reversed,scale:zt.scale,tick:zt.tick,tickCount:void 0,ticks:void 0,type:zt.type,unit:void 0},i6={allowDataOverflow:Ye.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:Ye.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Ye.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:Ye.scale,tick:Ye.tick,tickCount:Ye.tickCount,ticks:void 0,type:Ye.type,unit:void 0},a6={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:zt.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:zt.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:zt.scale,tick:zt.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},o6={allowDataOverflow:Ye.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:Ye.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Ye.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:Ye.scale,tick:Ye.tick,tickCount:Ye.tickCount,ticks:void 0,type:"category",unit:void 0},Od=(e,t)=>e.polarAxis.angleAxis[t]!=null?e.polarAxis.angleAxis[t]:e.layout.layoutType==="radial"?a6:n6,Ad=(e,t)=>e.polarAxis.radiusAxis[t]!=null?e.polarAxis.radiusAxis[t]:e.layout.layoutType==="radial"?o6:i6,Ts=e=>e.polarOptions,Ed=E([sr,cr,Ee],iR),gw=E([Ts,Ed],(e,t)=>{if(e!=null)return Ar(e.innerRadius,t,0)}),yw=E([Ts,Ed],(e,t)=>{if(e!=null)return Ar(e.outerRadius,t,t*.8)}),s6=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},vw=E([Ts],s6);E([Od,vw],ks);var bw=E([Ed,gw,yw],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});E([Ad,bw],ks);var ww=E([Z,Ts,gw,yw,sr,cr],(e,t,r,n,i,a)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var{cx:o,cy:s,startAngle:c,endAngle:l}=t;return{cx:Ar(o,i,i/2),cy:Ar(s,a,a/2),innerRadius:r,outerRadius:n,startAngle:c,endAngle:l,clockWise:!1}}}),me=(e,t)=>
2115t,Cs=(e,t,r)=>r;function Id(e){return e==null?void 0:e.id}function xw(e,t,r){var{chartData:n=[]}=t,{allowDuplicatedCategory:i,dataKey:a}=r,o=new Map;return e.forEach(s=>{var c,l=(c=s.data)!==null&&c!==void 0?c:n;if(!(l==null||l.length===0)){var u=Id(s);l.forEach((d,f)=>{var h=a==null||i?f:String(xe(d,a,null)),g=xe(d,s.dataKey,0),v;o.has(h)?v=o.get(h):v={},Object.assign(v,{[u]:g}),o.set(h,v)})}}),Array.from(o.values())}function kd(e){return e.stackId!=null&&e.dataKey!=null}var Ns=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function js(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function c6(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return!1}var ge=e=>{var t=Z(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Un=e=>e.tooltip.settings.axisId;function Zp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function xo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zp(Object(r),!0).forEach(function(n){l6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function l6(e,t,r){return(t=u6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u6(e){var t=d6(e,"string");return typeof t=="symbol"?t:t+""}function d6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _l=[0,"auto"],ve={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0},Sw=(e,t)=>e.cartesianAxis.xAxis[t],ur=(e,t)=>{var r=Sw(e,t);return r??ve},be={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:_l,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:Bi},Pw=(e,t)=>e.cartesianAxis.yAxis[t],dr=(e,t)=>{var r=Pw(e,t);return r??be},f6={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},Td=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??f6},Fe=(e,t,r)=>{switch(t){case"xAxis":return ur(e,r);case"yAxis":return dr(e,r);case"zAxis":return Td(e,r);case"angleAxis":return Od(e,r);case"radiusAxis":return Ad(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},h6=(e,t,r)=>{switch(t){case"xAxis":return ur(e,r);case"yAxis":return dr(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},qi=(e,t,r)=>{switch(t){case"xAxis":return ur(e,r);case"yAxis":return dr(e,r);case"angleAxis":return Od(e,r);case"radiusAxis":return Ad(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},_w=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function Ow(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var Cd=e=>e.graphicalItems.cartesianItems,p6=E([me,Cs],Ow),Aw=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),Gi=E([Cd,Fe,p6],Aw,{memoizeOptions:{resultEqualityCheck:js}}),Ew=E([Gi],e=>e.filter(t=>
2115t.type==="area"||t.type==="bar").filter(kd)),Iw=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),m6=E([Gi],Iw),kw=e=>e.map(t=>t.data).filter(Boolean).flat(1),g6=E([Gi],kw,{memoizeOptions:{resultEqualityCheck:js}}),Tw=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:i}=t;return e.length>0?e:r.slice(n,i+1)},Nd=E([g6,Es],Tw),Cw=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:xe(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(i=>({value:xe(i,n)}))):e.map(n=>({value:n})),Ms=E([Nd,Fe,Gi],Cw);function Nw(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function ka(e){if(jt(e)||e instanceof Date){var t=Number(e);if(oe(t))return t}}function Qp(e){if(Array.isArray(e)){var t=[ka(e[0]),ka(e[1])];return Er(t)?t:void 0}var r=ka(e);if(r!=null)return[r,r]}function ir(e){return e.map(ka).filter(SN)}function y6(e,t,r){return!r||typeof t!="number"||xt(t)?[]:r.length?ir(r.flatMap(n=>{var i=xe(e,n.dataKey),a,o;if(Array.isArray(i)?[a,o]=i:a=o=i,!(!oe(a)||!oe(o)))return[t-a,t+o]})):[]}var ye=e=>{var t=ge(e),r=Un(e);return qi(e,t,r)},Yi=E([ye],e=>e==null?void 0:e.dataKey),v6=E([Ew,Es,ye],xw),jw=(e,t,r,n)=>{var i={},a=t.reduce((o,s)=>(s.stackId==null||(o[s.stackId]==null&&(o[s.stackId]=[]),o[s.stackId].push(s)),o),i);return Object.fromEntries(Object.entries(a).map(o=>{var[s,c]=o,l=n?[...c].reverse():c,u=l.map(Id);return[s,{stackedData:LM(e,u,r),graphicalItems:l}]}))},Ol=E([v6,Ew,Is,pw],jw),Mw=(e,t,r,n)=>{var{dataStartIndex:i,dataEndIndex:a}=t;if(n==null&&r!=="zAxis"){var o=zM(e,i,a);if(!(o!=null&&o[0]===0&&o[1]===0))return o}},b6=E([Fe],e=>e.allowDataOverflow),jd=e=>{var t;if(e==null||!("domain"in e))return _l;if(e.domain!=null)return e.domain;if(e.ticks!=null){if(e.type==="number"){var r=ir(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:_l},Dw=E([Fe],jd),Rw=E([Dw,b6],ew),w6=E([Ol,jr,me,Rw],Mw,{memoizeOptions:{resultEqualityCheck:Ns}}),Md=e=>e.errorBars,x6=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>Nw(r,n)),So=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r.filter(Boolean);if(i.length!==0){var a=i.flat(),o=Math.min(...a),s=Math.max(...a);return[o,s]}},$w=(e,t,r,n,i)=>{var a,o;if(r.length>0&&e.forEach(s=>{r.forEach(c=>{var l,u,d=(l=n[c.id])===null||l===void 0?void 0:l.filter(b=>Nw(i,b)),f=xe(s,(u=t.dataKey)!==null&&u!==void 0?u:c.dataKey),h=y6(s,f,d);if(h.length>=2){var g=Math.min(...h),v=Math.max(...h);(a==null||g<a)&&(a=g),(o==null||v>o)&&(o=v)}var y=Qp(f);y!=null&&(a=a==null?y[0]:Math.min(a,y[0]),o=o==null?y[1]:Math.max(o,y[1]))})}),(t==null?void 0:t.dataKey)!=null&&e.forEach(s=>{var c=Qp(xe(s,t.dataKey));c!=null&&(a=a==null?c[0]:Math.min(a,c[0]),o=o==null?c[1]:Math.max(o,c[1]))}),oe(a)&&oe(o))return[a,o]},S6=E([Nd,Fe,m6,Md,me],$w,{memoizeOptions:{resultEqualityCheck:Ns}});function P6(e){var{value:t}=e;if(jt(t)||t instanceof Date)return t}var _6=(e,t,r)=>{var n=e.map(P6).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&Tv(n))?b0(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},Lw=e=>e.referenceElements.dots,Bn=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),O6=E([Lw,me,Cs],Bn),Fw=e=>e.referenceElements.areas,A6=E([Fw,me,Cs],Bn),Uw=e=>e.referenceElements.lines,E6=E([Uw,me,Cs],Bn),Bw=(e,t)=>{var r=ir(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},I6=E(O6,me,Bw),zw=(e,t)=>{var r=ir(e.flatMap(n=>[t==="xAxis"?n.x1:n.y1,t==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},k6=E([A6,me],zw);function T6(e){var t;if(e.x!=null)return ir([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:ir(r)}function C6(e){var t;if(e.y!=null)return ir([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:ir(r)}var Ww=(e,t)=>{var r=e.flatMap(n=>t==="xAxis"?T6(n):C6(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},N6=E([E6,me],Ww),j6=E(I6,N6,k6,(e,t,r)=>So(e,r,t)),Hw=(e,t,r,n,i,a,o,s)=>{if(r!=null)return r;var c=o==="vertical"&&s==="xAxis"||o==="horizontal"&&s==="yAxis",l=c?So(n,a,i):So(a,i);return HL(t,l,e.allowDataOverflow)},M6=E([Fe,Dw,Rw,w6,S6,j6,Z,me],Hw,{memoizeOptions:{resultEqualityCheck:Ns}}),D6=[0,1],Kw=(e,t,r,n,i,a,o)=>
2115{if(!((e==null||r==null||r.length===0)&&o===void 0)){var{dataKey:s,type:c}=e,l=Lt(t,a);if(l&&s==null){var u;return b0(0,(u=r==null?void 0:r.length)!==null&&u!==void 0?u:0)}return c==="category"?_6(n,e,l):i==="expand"?D6:o}},Dd=E([Fe,Z,Nd,Ms,Is,me,M6],Kw),Vw=(e,t,r,n,i)=>{if(e!=null){var{scale:a,type:o}=e;if(a==="auto")return t==="radial"&&i==="radiusAxis"?"band":t==="radial"&&i==="angleAxis"?"linear":o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?"point":o==="category"?"band":"linear";if(typeof a=="string"){var s="scale".concat(Ri(a));return s in ai?s:"point"}}},Ji=E([Fe,Z,_w,Sd,me],Vw);function R6(e){if(e!=null){if(e in ai)return ai[e]();var t="scale".concat(Ri(e));if(t in ai)return ai[t]()}}function Rd(e,t,r,n){if(!(r==null||n==null)){if(typeof e.scale=="function")return e.scale.copy().domain(r).range(n);var i=R6(t);if(i!=null){var a=i.domain(r).range(n);return MM(a),a}}}var qw=(e,t,r)=>{var n=jd(t);if(!(r!=="auto"&&r!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(n)&&(n[0]==="auto"||n[1]==="auto")&&Er(e))return QL(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&Er(e))return e6(e,t.tickCount,t.allowDecimals)}},$d=E([Dd,qi,Ji],qw),Gw=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&Er(t)&&Array.isArray(r)&&r.length>0){var i=t[0],a=r[0],o=t[1],s=r[r.length-1];return[Math.min(i,a),Math.max(o,s)]}return t},$6=E([Fe,Dd,$d,me],Gw),L6=E(Ms,Fe,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(ir(e.map(s=>s.value))).sort((s,c)=>s-c);if(n.length<2)return 1/0;var i=n[n.length-1]-n[0];if(i===0)return 1/0;for(var a=0;a<n.length-1;a++){var o=n[a+1]-n[a];r=Math.min(r,o)}return r/i}}),Yw=E(L6,Z,t6,Ee,(e,t,r,n)=>n,(e,t,r,n,i)=>{if(!oe(e))return 0;var a=t==="vertical"?n.height:n.width;if(i==="gap")return e*a/2;if(i==="no-gap"){var o=Ar(r,e*a),s=e*a/2;return s-o-(s-o)/a*o}return 0}),F6=(e,t)=>{var r=ur(e,t);return r==null||typeof r.padding!="string"?0:Yw(e,"xAxis",t,r.padding)},U6=(e,t)=>{var r=dr(e,t);return r==null||typeof r.padding!="string"?0:Yw(e,"yAxis",t,r.padding)},B6=E(ur,F6,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((r=i.left)!==null&&r!==void 0?r:0)+t,right:((n=i.right)!==null&&n!==void 0?n:0)+t}}),z6=E(dr,U6,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((r=i.top)!==null&&r!==void 0?r:0)+t,bottom:((n=i.bottom)!==null&&n!==void 0?n:0)+t}}),W6=E([Ee,B6,hs,fs,(e,t,r)=>r],(e,t,r,n,i)=>{var{padding:a}=n;return i?[a.left,r.width-a.right]:[e.left+t.left,e.left+e.width-t.right]}),H6=E([Ee,Z,z6,hs,fs,(e,t,r)=>r],(e,t,r,n,i,a)=>{var{padding:o}=i;return a?[n.height-o.bottom,o.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),Xi=(e,t,r,n)=>{var i;switch(t){case"xAxis":return W6(e,r,n);case"yAxis":return H6(e,r,n);case"zAxis":return(i=Td(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return vw(e);case"radiusAxis":return bw(e,r);default:return}},Jw=E([Fe,Xi],ks),zn=E([Fe,Ji,$6,Jw],Rd);E([Gi,Md,me],x6);function Xw(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Ds=(e,t)=>t,Rs=(e,t,r)=>r,K6=E(us,Ds,Rs,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(Xw)),V6=E(ds,Ds,Rs,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(Xw)),Zw=(e,t)=>({width:e.width,height:t.height}),q6=(e,t)=>{var r=typeof t.width=="number"?t.width:Bi;return{width:r,height:e.height}},G6=E(Ee,ur,Zw),Y6=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},J6=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},X6=E(cr,Ee,K6,Ds,Rs,(e,t,r,n,i)=>{var a={},o;return r.forEach(s=>{var c=Zw(t,s);o==null&&(o=Y6(t,n,e));var l=n==="top"&&!i||n==="bottom"&&i;a[s.id]=o-Number(l)*c.height,o+=(l?-1:1)*c.height}),a}),Z6=E(sr,Ee,V6,Ds,Rs,(e,t,r,n,i)=>{var a={},o;return r.forEach(s=>{var c=q6(t,s);o==null&&(o=J6(t,n,e));var l=n==="left"&&!i||n==="right"&&i;a[s.id]=o-Number(l)*c.width,o+=(l?-1:1)*c.width}),a}),Q6=(e,t)=>{var r=ur(e,t);if(r!=null)return X6(e,r.orientation,r.mirror)},eF=E([Ee,ur,Q6,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r==null?void 0:r[n];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),tF=(e,t)=>{var r=dr(e,t);if(r!=null)return Z6(e,r.orientation,r.mirror)},rF=E([Ee,dr,tF,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r==null?void 0:r[n];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),nF=E(Ee,dr,(e,t)=>{var r=typeof t.width=="number"?t.width:Bi;return{width:r,height:e.height}}),Qw=(e,t,r,n)=>{if(r!=null){var{allowDuplicatedCategory:i,type:a,dataKey:o}=r,s=Lt(e,n),c=t.map(l=>l.value);if(o&&s&&a==="category"&&i&&Tv(c))return c}},Ld=E([Z,Ms,Fe,me],Qw),ex=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:i,scale:a}=r,o=Lt(e,n);if(o&&(i==="number"||a!=="auto"))return t.map(s=>s.value)}},Fd=E([Z,Ms,qi,me],ex),em=E([Z,h6,Ji,zn,Ld,Fd,Xi,$d,me],(e,t,r,n,i,a,o,s,c)=>{if(t!=null){var l=Lt(e,c);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:c,categoricalDomain:a,duplicateDomain:i,isCategorical:l,niceTicks:s,range:o,realScaleType:r,scale:n}}}),iF=(e,t,r,n,i,a,o,s,c)=>{if(!(t==null||n==null)){var l=Lt(e,c),{type:u,ticks:d,tickCount:f}=t,h=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,g=u==="category"&&n.bandwidth?n.bandwidth()/h:0;g=c==="angleAxis"&&a!=null&&a.length>=2?ot(a[0]-a[1])*2*g:g;var v=d||i;if(v){var y=v.map((b,S)=>{var w=o?o.indexOf(b):b;return{index:S,coordinate:n(w)+g,value:b,offset:g}});return y.filter(b=>oe(b.coordinate))}return l&&s?s.map((b,S)=>({coordinate:n(b)+g,value:b,index:S,offset:g})).filter(b=>oe(b.coordinate)):n.ticks?n.ticks(f).map(b=>({coordinate:n(b)+g,value:b,offset:g})):n.domain().map((b,S)=>({coordinate:n(b)+g,value:o?o[b]:b,index:S,offset:g}))}},tx=E([Z,qi,Ji,zn,$d,Xi,Ld,Fd,me],iF),aF=(e,t,r,n,i,a,o)=>
2115{if(!(t==null||r==null||n==null||n[0]===n[1])){var s=Lt(e,o),{tickCount:c}=t,l=0;return l=o==="angleAxis"&&(n==null?void 0:n.length)>=2?ot(n[0]-n[1])*2*l:l,s&&a?a.map((u,d)=>({coordinate:r(u)+l,value:u,index:d,offset:l})):r.ticks?r.ticks(c).map(u=>({coordinate:r(u)+l,value:u,offset:l})):r.domain().map((u,d)=>({coordinate:r(u)+l,value:i?i[u]:u,index:d,offset:l}))}},$s=E([Z,qi,zn,Xi,Ld,Fd,me],aF),Ls=E(Fe,zn,(e,t)=>{if(!(e==null||t==null))return xo(xo({},e),{},{scale:t})}),oF=E([Fe,Ji,Dd,Jw],Rd);E((e,t,r)=>Td(e,r),oF,(e,t)=>{if(!(e==null||t==null))return xo(xo({},e),{},{scale:t})});var sF=E([Z,us,ds],(e,t,r)=>{switch(e){case"horizontal":return t.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),rx=e=>e.options.defaultTooltipEventType,nx=e=>e.options.validateTooltipEventTypes;function ix(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function Ud(e,t){var r=rx(e),n=nx(e);return ix(t,r,n)}function cF(e){return B(t=>Ud(t,e))}var ax=(e,t)=>{var r,n=Number(t);if(!(xt(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},lF=e=>e.tooltip.settings,wr={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},uF={itemInteraction:{click:wr,hover:wr},axisInteraction:{click:wr,hover:wr},keyboardInteraction:wr,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},ox=Ke({name:"tooltip",initialState:uF,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:ie()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:r,next:n}=t.payload,i=bt(e).tooltipItemPayloads.indexOf(r);i>-1&&(e.tooltipItemPayloads[i]=n)},prepare:ie()},removeTooltipEntrySettings:{reducer(e,t){var r=bt(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:ie()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate,e.keyboardInteraction.dataKey=t.payload.activeDataKey}}}),{addTooltipEntrySettings:dF,replaceTooltipEntrySettings:fF,removeTooltipEntrySettings:hF,setTooltipSettingsState:pF,setActiveMouseOverItemIndex:mF,mouseLeaveItem:D8,mouseLeaveChart:sx,setActiveClickItemIndex:R8,setMouseOverAxisIndex:cx,setMouseClickAxisIndex:gF,setSyncInteraction:Al,setKeyboardInteraction:El}=ox.actions,yF=ox.reducer;function tm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ba(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
2115t%2?tm(Object(r),!0).forEach(function(n){vF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vF(e,t,r){return(t=bF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bF(e){var t=wF(e,"string");return typeof t=="symbol"?t:t+""}function wF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xF(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function SF(e){return e.index!=null}var lx=(e,t,r,n)=>{if(t==null)return wr;var i=xF(e,t,r);if(i==null)return wr;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var a=e.settings.active===!0;if(SF(i)){if(a)return ba(ba({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return ba(ba({},wr),{},{coordinate:i.coordinate})};function PF(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var r=Number(e);return Number.isFinite(r)?r:void 0}function _F(e,t){var r=PF(e),n=t[0],i=t[1];if(r===void 0)return!1;var a=Math.min(n,i),o=Math.max(n,i);return r>=a&&r<=o}function OF(e,t,r){if(r==null||t==null)return!0;var n=xe(e,t);return n==null||!Er(r)?!0:_F(n,r)}var Bd=(e,t,r,n)=>{var i=e==null?void 0:e.index;if(i==null)return null;var a=Number(i);if(!oe(a))return i;var o=0,s=1/0;t.length>0&&(s=t.length-1);var c=Math.max(o,Math.min(a,s)),l=t[c];return l==null||OF(l,r,n)?String(c):null},ux=(e,t,r,n,i,a,o,s)=>{if(!(a==null||s==null)){var c=o[0],l=c==null?void 0:s(c.positions,a);if(l!=null)return l;var u=i==null?void 0:i[Number(a)];if(u)switch(r){case"horizontal":return{x:u.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:u.coordinate}}}},dx=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;return r==="hover"?i=e.itemInteraction.hover.dataKey:i=e.itemInteraction.click.dataKey,i==null&&n!=null?[e.tooltipItemPayloads[0]]:e.tooltipItemPayloads.filter(a=>{var o;return((o=a.settings)===null||o===void 0?void 0:o.dataKey)===i})},Zi=e=>e.options.tooltipPayloadSearcher,Wn=e=>e.tooltip;function rm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rm(Object(r),!0).forEach(function(n){AF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AF(e,t,r){return(t=EF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EF(e){var t=IF(e,"string");return typeof t=="symbol"?t:t+""}function IF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kF(e,t){return e??t}var fx=(e,t,r,n,i,a,o)=>{if(!(t==null||a==null)){var{chartData:s,computedData:c,dataStartIndex:l,dataEndIndex:u}=r,d=[];return e.reduce((f,h)=>{var g,{dataDefinedOnItem:v,settings:y}=h,b=kF(v,s),S=Array.isArray(b)?Ub(b,l,u):b,w=(g=y==null?void 0:y.dataKey)!==null&&g!==void 0?g:n,_=y==null?void 0:y.nameKey,x;if(n&&Array.isArray(S)&&!Array.isArray(S[0])&&o==="axis"?x=Cv(S,n,i):x=a(S,t,c,_),Array.isArray(x))x.forEac
2115h(P=>{var k=nm(nm({},y),{},{name:P.name,unit:P.unit,color:void 0,fill:void 0});f.push(Nh({tooltipEntrySettings:k,dataKey:P.dataKey,payload:P.payload,value:xe(P.payload,P.dataKey),name:P.name}))});else{var O;f.push(Nh({tooltipEntrySettings:y,dataKey:w,payload:x,value:xe(x,w),name:(O=xe(x,_))!==null&&O!==void 0?O:y==null?void 0:y.name}))}return f},d)}},zd=E([ye,Z,_w,Sd,ge],Vw),TF=E([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),CF=E([ge,Un],Ow),Qi=E([TF,ye,CF],Aw,{memoizeOptions:{resultEqualityCheck:js}}),NF=E([Qi],e=>e.filter(kd)),jF=E([Qi],kw,{memoizeOptions:{resultEqualityCheck:js}}),Hn=E([jF,jr],Tw),MF=E([NF,jr,ye],xw),Wd=E([Hn,ye,Qi],Cw),hx=E([ye],jd),DF=E([ye],e=>e.allowDataOverflow),px=E([hx,DF],ew),RF=E([Qi],e=>e.filter(kd)),$F=E([MF,RF,Is,pw],jw),LF=E([$F,jr,ge,px],Mw),FF=E([Qi],Iw),UF=E([Hn,ye,FF,Md,ge],$w,{memoizeOptions:{resultEqualityCheck:Ns}}),BF=E([Lw,ge,Un],Bn),zF=E([BF,ge],Bw),WF=E([Fw,ge,Un],Bn),HF=E([WF,ge],zw),KF=E([Uw,ge,Un],Bn),VF=E([KF,ge],Ww),qF=E([zF,VF,HF],So),GF=E([ye,hx,px,LF,UF,qF,Z,ge],Hw),ea=E([ye,Z,Hn,Wd,Is,ge,GF],Kw),YF=E([ea,ye,zd],qw),JF=E([ye,ea,YF,ge],Gw),mx=e=>{var t=ge(e),r=Un(e),n=!1;return Xi(e,t,r,n)},gx=E([ye,mx],ks),yx=E([ye,zd,JF,gx],Rd),XF=E([Z,Wd,ye,ge],Qw),ZF=E([Z,Wd,ye,ge],ex),QF=(e,t,r,n,i,a,o,s)=>{if(t){var{type:c}=t,l=Lt(e,s);if(n){var u=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,d=c==="category"&&n.bandwidth?n.bandwidth()/u:0;return d=s==="angleAxis"&&i!=null&&(i==null?void 0:i.length)>=2?ot(i[0]-i[1])*2*d:d,l&&o?o.map((f,h)=>({coordinate:n(f)+d,value:f,index:h,offset:d})):n.domain().map((f,h)=>({coordinate:n(f)+d,value:a?a[f]:f,index:h,offset:d}))}}},fr=E([Z,ye,zd,yx,mx,XF,ZF,ge],QF),Hd=E([rx,nx,lF],(e,t,r)=>ix(r.shared,e,t)),vx=e=>e.tooltip.settings.trigger,Kd=e=>e.tooltip.settings.defaultIndex,ta=E([Wn,Hd,vx,Kd],lx),Ei=E([ta,Hn,Yi,ea],Bd),bx=E([fr,Ei],ax),e3=E([ta],e=>{if(e)return e.dataKey});E([ta],e=>{if(e)return e.graphicalItemId});var wx=E([Wn,Hd,vx,Kd],dx),t3=E([sr,cr,Z,Ee,fr,Kd,wx,Zi],ux),r3=E([ta,t3],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),n3=E([ta],e=>e.active),i3=E([wx,Ei,jr,Yi,bx,Zi,Hd],fx),a3=E([i3],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function im(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function am(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?im(Object(r),!0).forEach(function(n){o3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):im(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function o3(e,t,r){return(t=s3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s3(e){var t=c3(e,"string");return typeof t=="symbol"?t:t+""}function c3(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var l3=()=>B(ye),u3=()=>{var e=l3(),t=B(fr),r=B(yx);return En(!e||!r?void 0:am(am({},e),{},{scale:r}),t)};function om(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function sn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?om(Object(r),!0).forEach(function(n){d3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):om(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function d3(e,t,r){return(t=f3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f3(e){var t=h3(e,"string");return typeof t=="symbol"?t:t+""}function h3(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var p3=(e,t,r,n)=>{var i=t.find(a=>a&&a.index===r);if(i){if(e==="horizontal")return{x:i.coordinate,y:n.chartY};
2115if(e==="vertical")return{x:n.chartX,y:i.coordinate}}return{x:0,y:0}},m3=(e,t,r,n)=>{var i=t.find(l=>l&&l.index===r);if(i){if(e==="centric"){var a=i.coordinate,{radius:o}=n;return sn(sn(sn({},n),Ae(n.cx,n.cy,o,a)),{},{angle:a,radius:o})}var s=i.coordinate,{angle:c}=n;return sn(sn(sn({},n),Ae(n.cx,n.cy,s,c)),{},{angle:c,radius:s})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function g3(e,t){var{chartX:r,chartY:n}=e;return r>=t.left&&r<=t.left+t.width&&n>=t.top&&n<=t.top+t.height}var xx=(e,t,r,n,i)=>{var a,o=-1,s=(a=t==null?void 0:t.length)!==null&&a!==void 0?a:0;if(s<=1||e==null)return 0;if(n==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var c=0;c<s;c++){var l=c>0?r[c-1].coordinate:r[s-1].coordinate,u=r[c].coordinate,d=c>=s-1?r[0].coordinate:r[c+1].coordinate,f=void 0;if(ot(u-l)!==ot(d-u)){var h=[];if(ot(d-u)===ot(i[1]-i[0])){f=d;var g=u+i[1]-i[0];h[0]=Math.min(g,(g+l)/2),h[1]=Math.max(g,(g+l)/2)}else{f=l;var v=d+i[1]-i[0];h[0]=Math.min(u,(v+u)/2),h[1]=Math.max(u,(v+u)/2)}var y=[Math.min(u,(f+u)/2),Math.max(u,(f+u)/2)];if(e>y[0]&&e<=y[1]||e>=h[0]&&e<=h[1]){({index:o}=r[c]);break}}else{var b=Math.min(l,d),S=Math.max(l,d);if(e>(b+u)/2&&e<=(S+u)/2){({index:o}=r[c]);break}}}else if(t){for(var w=0;w<s;w++)if(w===0&&e<=(t[w].coordinate+t[w+1].coordinate)/2||w>0&&w<s-1&&e>(t[w].coordinate+t[w-1].coordinate)/2&&e<=(t[w].coordinate+t[w+1].coordinate)/2||w===s-1&&e>(t[w].coordinate+t[w-1].coordinate)/2){({index:o}=t[w]);break}}return o},Sx=()=>B(Sd),Vd=(e,t)=>t,Px=(e,t,r)=>r,qd=(e,t,r,n)=>n,y3=E(fr,e=>es(e,t=>t.coordinate)),Gd=E([Wn,Vd,Px,qd],lx),Yd=E([Gd,Hn,Yi,ea],Bd),v3=(e,t,r)=>{if(t!=null){var n=Wn(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},_x=E([Wn,Vd,Px,qd],dx),Po=E([sr,cr,Z,Ee,fr,qd,_x,Zi],ux),b3=E([Gd,Po],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),Ox=E([fr,Yd],ax),w3=E([_x,Yd,jr,Yi,Ox,Zi,Vd],fx),x3=E([Gd,Yd],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),S3=(e,t,r,n,i,a,o)=>{if(!(!e||!r||!n||!i)&&g3(e,o)){var s=WM(e,t),c=xx(s,a,i,r,n),l=p3(t,i,c,e);return{activeIndex:String(c),activeCoordinate:l}}},P3=(e,t,r,n,i,a,o)=>{if(!(!e||!n||!i||!a||!r)){var s=lR(e,r);if(s){var c=HM(s,t),l=xx(c,o,a,n,i),u=m3(t,a,l,s);return{activeIndex:String(l),activeCoordinate:u}}}},_3=(e,t,r,n,i,a,o,s)=>{if(!(!e||!t||!n||!i||!a))return t==="horizontal"||t==="vertical"?S3(e,t,n,i,a,o,s):P3(e,t,r,n,i,a,o)},O3=E(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(t!=null){var n=e[t];if(n!=null)return r?n.panoramaElementId:n.elementId}}),A3=E(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(Ce)),r=Array.from(new Set(t));return r.sort((n,i)=>n-i)},{memoizeOptions:{resultEqualityCheck:c6}});function sm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sm(Object(r),!0).forEach(function(n){E3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function E3(e,t,r){return(t=I3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function I3(e){var t=k3(e,"string");return typeof t=="symbol"?t:t+""}function k3(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var T3={},C3={zIndexMap:Object.values(Ce).reduce((e,t)=>cm(cm({},e),{},{[t]:{elementId:void 0,panoramaElementId:void 0,consumers:0}}),T3)},N3=new Set(Object.values(Ce));function j3(e){return N3.has(e)}var Ax=Ke({name:"zIndex",initialState:C3,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,elementId:void 0,panoramaElementId:void 0}},prepare:ie()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!j3(r)&&delete e.zIndexMap[r])},prepare:ie()},registerZIndexPortalId:{reducer:(e,t)=>{var{zIndex:r,elementId:n,isPanorama:i}=t.payload;e.zIndexMap[r]?i?e.zIndexMap[r].panoramaElementId=n:e.zIndexMap[r].elementId=n:e.zIndexMap[r]={consumers:0,elementId:i?void 0:n,panoramaElementId:i?n:void 0}},prepare:ie()},unregisterZIndexPortalId:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElementId=void 0:e.zIndexMap[r].elementId=void 0)},prepare:ie()}}}),{registerZIndexPortal:M3,unregisterZIndexPortal:D3,registerZIndexPortalId:R3,unregisterZIndexPortalId:$3}=Ax.actions,L3=Ax.reducer;function Ft(e){var{zIndex:t,children:r}=e,n=wD(),i=n&&t!==void 0&&t!==0,a=Me(),o=de();m.useLayoutEffect(()=>i?(o(M3({zIndex:t})),()=>{o(D3({zIndex:t}))}):$i,[o,t,i]);var s=B(l=>O3(l,t,a));if(!i)return r;if(!s)return null;var c=document.getElementById(s);return c?Fl.createPortal(r,c):null}function Il(){return Il=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}
2115).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Il.apply(null,arguments)}function lm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function wa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lm(Object(r),!0).forEach(function(n){F3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function F3(e,t,r){return(t=U3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function U3(e){var t=B3(e,"string");return typeof t=="symbol"?t:t+""}function B3(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function z3(e){var{cursor:t,cursorComp:r,cursorProps:n}=e;return m.isValidElement(t)?m.cloneElement(t,n):m.createElement(r,n)}function W3(e){var t,{coordinate:r,payload:n,index:i,offset:a,tooltipAxisBandSize:o,layout:s,cursor:c,tooltipEventType:l,chartName:u}=e,d=r,f=n,h=i;if(!c||!d||u!=="ScatterChart"&&l!=="axis")return null;var g,v,y;if(u==="ScatterChart")g=d,v=P2,y=Ce.cursorLine;else if(u==="BarChart")g=_2(s,d,a,o),v=f0,y=Ce.cursorRectangle;else if(s==="radial"&&jv(d)){var{cx:b,cy:S,radius:w,startAngle:_,endAngle:x}=h0(d);g={cx:b,cy:S,startAngle:_,endAngle:x,innerRadius:w,outerRadius:w},v=m0,y=Ce.cursorLine}else g={points:hR(s,d,a)},v=ci,y=Ce.cursorLine;var O=typeof c=="object"&&"className"in c?c.className:void 0,P=wa(wa(wa(wa({stroke:"#ccc",pointerEvents:"none"},a),g),Ho(c)),{},{payload:f,payloadIndex:h,className:J("recharts-tooltip-cursor",O)});return m.createElement(Ft,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:y},m.createElement(z3,{cursor:c,cursorComp:v,cursorProps:P}))}function H3(e){var t=u3(),r=Qb(),n=Dn(),i=Sx();return t==null||r==null||n==null||i==null?null:m.createElement(W3,Il({}
2115,e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:i}))}var Ex=m.createContext(null),K3=()=>m.useContext(Ex),Ix={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(c,l,u){this.fn=c,this.context=l,this.once=u||!1}function a(c,l,u,d,f){if(typeof u!="function")throw new TypeError("The listener must be a function");var h=new i(u,d||c,f),g=r?r+l:l;return c._events[g]?c._events[g].fn?c._events[g]=[c._events[g],h]:c._events[g].push(h):(c._events[g]=h,c._eventsCount++),c}function o(c,l){--c._eventsCount===0?c._events=new n:delete c._events[l]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var l=[],u,d;if(this._eventsCount===0)return l;for(d in u=this._events)t.call(u,d)&&l.push(r?d.slice(1):d);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(u)):l},s.prototype.listeners=function(l){var u=r?r+l:l,d=this._events[u];if(!d)return[];if(d.fn)return[d.fn];for(var f=0,h=d.length,g=new Array(h);f<h;f++)g[f]=d[f].fn;return g},s.prototype.listenerCount=function(l){var u=r?r+l:l,d=this._events[u];return d?d.fn?1:d.length:0},s.prototype.emit=function(l,u,d,f,h,g){var v=r?r+l:l;if(!this._events[v])return!1;var y=this._events[v],b=arguments.length,S,w;if(y.fn){switch(y.once&&this.removeListener(l,y.fn,void 0,!0),b){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,u),!0;case 3:return y.fn.call(y.context,u,d),!0;case 4:return y.fn.call(y.context,u,d,f),!0;case 5:return y.fn.call(y.context,u,d,f,h),!0;case 6:return y.fn.call(y.context,u,d,f,h,g),!0}for(w=1,S=new Array(b-1);w<b;w++)S[w-1]=arguments[w];y.fn.apply(y.context,S)}else{var _=y.length,x;for(w=0;w<_;w++)switch(y[w].once&&this.removeListener(l,y[w].fn,void 0,!0),b){case 1:y[w].fn.call(y[w].context);break;case 2:y[w].fn.call(y[w].context,u);break;case 3:y[w].fn.call(y[w].context,u,d);break;case 4:y[w].fn.call(y[w].context,u,d,f);break;default:if(!S)for(x=1,S=new Array(b-1);x<b;x++)S[x-1]=arguments[x];y[w].fn.apply(y[w].context,S)}}return!0},s.prototype.on=function(l,u,d){return a(this,l,u,d,!1)},s.prototype.once=function(l,u,d){return a(this,l,u,d,!0)},s.prototype.removeListener=function(l,u,d,f){var h=r?r+l:l;if(!this._events[h])return this;if(!u)return o(this,h),this;var g=this._events[h];if(g.fn)g.fn===u&&(!f||g.once)&&(!d||g.context===d)&&o(this,h);else{for(var v=0,y=[],b=g.length;v<b;v++)(g[v].fn!==u||f&&!g[v].once||d&&g[v].context!==d)&&y.push(g[v]);y.length?this._events[h]=y.length===1?y[0]:y:o(this,h)}return this},s.prototype.removeAllListeners=function(l){var u;return l?(u=r?r+l:l,this._events[u]&&o(this,u)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s})(Ix);var V3=Ix.exports;const q3=Ir(V3);var Ii=new q3,kl="recharts.syncEvent.tooltip",um="recharts.syncEvent.brush";function kx(e,t){if(t){var r=Number.parseInt(t,10);if(!xt(r))return e==null?void 0:e[r]}}var G3={chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},Tx=Ke({name:"options",initialState:G3,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),Y3=Tx.reducer,{createEventEmitter:J3}=Tx.actions;function X3(e){return e.tooltip.syncInteraction}var Z3={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},Cx=Ke({name:"chartData",initialState:Z3,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:r,endIndex:n}=t.payload;r!=null&&(e.dataStartIndex=r),n!=null&&(e.dataEndIndex=n)}}}),{setChartData:dm,setDataStartEndIndexes:Q3,setComputedData:$8}=Cx.actions,e4=Cx.reducer,t4=["x","y"];function fm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
2115t%2?fm(Object(r),!0).forEach(function(n){r4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function r4(e,t,r){return(t=n4(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n4(e){var t=i4(e,"string");return typeof t=="symbol"?t:t+""}function i4(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function a4(e,t){if(e==null)return{};var r,n,i=o4(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function o4(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function s4(){var e=B(Pd),t=B(_d),r=de(),n=B(mw),i=B(fr),a=Dn(),o=ps(),s=B(c=>c.rootProps.className);m.useEffect(()=>{if(e==null)return $i;var c=(l,u,d)=>{if(t!==d&&e===l){if(n==="index"){var f;if(o&&u!==null&&u!==void 0&&(f=u.payload)!==null&&f!==void 0&&f.coordinate&&u.payload.sourceViewBox){var h=u.payload.coordinate,{x:g,y:v}=h,y=a4(h,t4),{x:b,y:S,width:w,height:_}=u.payload.sourceViewBox,x=cn(cn({},y),{},{x:o.x+(w?(g-b)/w:0)*o.width,y:o.y+(_?(v-S)/_:0)*o.height});r(cn(cn({},u),{},{payload:cn(cn({},u.payload),{},{coordinate:x})}))}else r(u);return}if(i!=null){var O;if(typeof n=="function"){var P={activeTooltipIndex:u.payload.index==null?void 0:Number(u.payload.index),isTooltipActive:u.payload.active,activeIndex:u.payload.index==null?void 0:Number(u.payload.index),activeLabel:u.payload.label,activeDataKey:u.payload.dataKey,activeCoordinate:u.payload.coordinate},k=n(i,P);O=i[k]}else n==="value"&&(O=i.find(W=>String(W.value)===u.payload.label));var{coordinate:I}=u.payload;if(O==null||u.payload.active===!1||I==null||o==null){r(Al({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}var{x:D,y:T}=I,C=Math.min(D,o.x+o.width),R=Math.min(T,o.y+o.height),j={x:a==="horizontal"?O.coordinate:C,y:a==="horizontal"?R:O.coordinate},$=Al({active:u.payload.active,coordinate:j,dataKey:u.payload.dataKey,index:String(O.index),label:u.payload.label,sourceViewBox:u.payload.sourceViewBox,graphicalItemId:u.payload.graphicalItemId});r($)}}};return Ii.on(kl,c),()=>{Ii.off(kl,c)}},[s,r,t,e,n,i,a,o])}function c4(){var e=B(Pd),t=B(_d),r=de();m.useEffect(()=>{if(e==null)return $i;var n=(i,a,o)=>{t!==o&&e===i&&r(Q3(a))};return Ii.on(um,n),()=>{Ii.off(um,n)}},[r,t,e])}function l4(){var e=de();m.useEffect(()=>{e(J3())},[e]),s4(),c4()}function u4(e,t,r,n,i,a){var o=B(h=>v3(h,e,t)),s=B(_d),c=B(Pd),l=B(mw),u=B(X3),d=u==null?void 0:u.active,f=ps();m.useEffect(()=>{if(!d&&c!=null&&s!=null){var h=Al({active:a,coordinate:r,dataKey:o,index:i,label:typeof n=="number"?String(n):n,sourceViewBox:f,graphicalItemId:void 0});Ii.emit(kl,c,h,s)}},[d,r,o,i,n,s,c,l,a,f])}function hm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function pm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hm(Object(r),!0).forEach(function(n){d4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function d4(e,t,r){return(t=f4(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f4(e){var t=h4(e,"string");return typeof t=="symbol"?t:t+""}function h4(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function p4(e){return e.dataKey}function m4(e,t){return m.isValidElement(e)?m.cloneElement(e,t):typeof e=="function"?m.createElement(e,t):m.createElement(r2,t)}var mm=[],g4={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function y4(e){var t,r,n=Se(e,g4),{active:i,allowEscapeViewBox:a,animationDuration:o,animationEasing:s,content:c,filterNull:l,isAnimationActive:u,offset:d,payloadUniqBy:f,position:h,reverseDirection:g,useTranslate3d:v,wrapperStyle:y,cursor:b,shared:S,trigger:w,defaultIndex:_,portal:x,axisId:O}=n,P=de(),k=typeof _=="number"?String(_):_;m.useEffect(()=>{P(pF({shared:S,trigger:w,axisId:O,active:i,defaultIndex:k}))},[P,S,w,O,i,k]);var I=ps(),D=s0(),T=cF(S),{activeIndex:C,isActive:R}=(t=B(Be=>x3(Be,T,w,k)))!==null&&t!==void 0?t:{},j=B(Be=>w3(Be,T,w,k)),$=B(Be=>Ox(Be,T,w,k)),W=B(Be=>b3(Be,T,w,k)),z=j,K=K3(),F=(r=i??R)!==null&&r!==void 0?r:!1,[_e,Ve]=ub([z,F]),Ue=T==="axis"?$:void 0;u4(T,w,W,Ue,C,F);var Ut=x??K;if(Ut==null||I==null||T==null)return null;var tt=z??mm;F||(tt=mm),l&&tt.length&&(tt=Zv(tt.filter(Be=>Be.value!=null&&(Be.hide!==!0||n.includeHidden)),f,p4));var Mr=tt.length>0,Kn=m.createElement(l2,{allowEscapeViewBox:a,animationDuration:o,animationEasing:s,isAnimationActive:u,active:F,coordinate:W,hasPayload:Mr,offset:d,position:h,reverseDirection:g,useTranslate3d:v,viewBox:I,wrapperStyle:y,lastBoundingBox:_e,innerRef:Ve,hasPortalFromProps:!!x},m4(c,pm(pm({},n),{},{payload:tt,label:Ue,active:F,activeIndex:C,coordinate:W,accessibilityLayer:D})));return m.createElement(m.Fragment,null,Fl.createPortal(Kn,Ut),F&&m.createElement(H3,{cursor:b,tooltipEventType:T,coordinate:W,payload:tt,index:C}))}function v4(e,t,r){return(t=b4(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b4(e){var t=w4(e,"string");return typeof t=="symbol"?t:t+""}function w4(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}
2115class x4{constructor(t){v4(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;n!=null&&this.cache.delete(n)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function gm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function S4(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gm(Object(r),!0).forEach(function(n){P4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function P4(e,t,r){return(t=_4(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _4(e){var t=O4(e,"string");return typeof t=="symbol"?t:t+""}function O4(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var A4={cacheSize:2e3,enableCache:!0},Nx=S4({},A4),ym=new x4(Nx.cacheSize),E4={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},vm="recharts_measurement_span";function I4(e,t){var r=t.fontSize||"",n=t.fontFamily||"",i=t.fontWeight||"",a=t.fontStyle||"",o=t.letterSpacing||"",s=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(n,"|").concat(i,"|").concat(a,"|").concat(o,"|").concat(s)}var bm=(e,t)=>{try{var r=document.getElementById(vm);r||(r=document.createElement("span"),r.setAttribute("id",vm),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,E4,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},li=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Rn.isSsr)return{width:0,height:0};if(!Nx.enableCache)return bm(t,r);var n=I4(t,r),i=ym.get(n);if(i)return i;var a=bm(t,r);return ym.set(n,a),a},wm=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,xm=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,k4=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,T4=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,jx={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},C4=Object.keys(jx),fn="NaN";function N4(e,t){return e*jx[t]}class We{static parse(t){var r,[,n,i]=(r=T4.exec(t))!==null&&r!==void 0?r:[];return new We(parseFloat(n),i??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,xt(t)&&(this.unit=""),r!==""&&!k4.test(r)&&(this.num=NaN,this.unit=""),C4.includes(r)&&(this.num=N4(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new We(NaN,""):new We(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new We(NaN,""):new We(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new We(NaN,""):new We(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new We(NaN,""):new We(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return xt(this.num)}}function Mx(e){if(e.includes(fn))return fn;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,i,a]=(r=wm.exec(t))!==null&&r!==void 0?r:[],o=We.parse(n??""),s=We.parse(a??""),c=i==="*"?o.multiply(s):o.divide(s);if(c.isNaN())return fn;t=t.replace(wm,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var l,[,u,d,f]=(l=xm.exec(t))!==null&&l!==void 0?l:[],h=We.parse(u??""),g=We.parse(f??""),v=d==="+"?h.add(g):h.subtract(g);if(v.isNaN())return fn;t=t.replace(xm,v.toString())}return t}var Sm=/\(([^()]*)\)/;function j4(e){for(var t=e,r;(r=Sm.exec(t))!=null;){var[,n]=r;t=t.replace(Sm,Mx(n))}return t}function M4(e){var t=e.replace(/\s+/g,"");return t=j4(t),t=Mx(t),t}function D4(e){try{return M4(e)}catch{return fn}}function Sc(e){var t=D4(e.slice(5,-1));return t===fn?"":t}var R4=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],$4=["dx","dy","angle","className","breakAll"];function Tl(){return Tl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}
2115).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Tl.apply(null,arguments)}function Pm(e,t){if(e==null)return{};var r,n,i=L4(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function L4(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Dx=/[ \f\n\r\t\v\u2028\u2029]+/,Rx=e=>{var{children:t,breakAll:r,style:n}=e;try{var i=[];he(t)||(r?i=t.toString().split(""):i=t.toString().split(Dx));var a=i.map(s=>({word:s,width:li(s,n).width})),o=r?0:li(" ",n).width;return{wordsWithComputedWidth:a,spaceWidth:o}}catch{return null}};function F4(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}var $x=(e,t,r,n)=>e.reduce((i,a)=>{var{word:o,width:s}=a,c=i[i.length-1];if(c&&s!=null&&(t==null||n||c.width+s+r<Number(t)))c.words.push(o),c.width+=s+r;else{var l={words:[o],width:s};i.push(l)}return i},[]),Lx=e=>e.reduce((t,r)=>t.width>r.width?t:r),U4="…",_m=(e,t,r,n,i,a,o,s)=>{var c=e.slice(0,t),l=Rx({breakAll:r,style:n,children:c+U4});if(!l)return[!1,[]];var u=$x(l.wordsWithComputedWidth,a,o,s),d=u.length>i||Lx(u).width>Number(a);return[d,u]},B4=(e,t,r,n,i)=>{var{maxLines:a,children:o,style:s,breakAll:c}=e,l=U(a),u=String(o),d=$x(t,n,r,i);if(!l||i)return d;var f=d.length>a||Lx(d).width>Number(n);if(!f)return d;for(var h=0,g=u.length-1,v=0,y;h<=g&&v<=u.length-1;){var b=Math.floor((h+g)/2),S=b-1,[w,_]=_m(u,S,c,s,a,n,r,i),[x]=_m(u,b,c,s,a,n,r,i);if(!w&&!x&&(h=b+1),w&&x&&(g=b-1),!w&&x){y=_;break}v++}return y||d},Om=e=>{var t=he(e)?[]:e.toString().split(Dx);return[{words:t,width:void 0}]},z4=e=>{var{width:t,scaleToFit:r,children:n,style:i,breakAll:a,maxLines:o}=e;if((t||r)&&!Rn.isSsr){var s,c,l=Rx({breakAll:a,children:n,style:i});if(l){var{wordsWithComputedWidth:u,spaceWidth:d}=l;s=u,c=d}else return Om(n);return B4({breakAll:a,children:n,maxLines:o,style:i},s,c,t,!!r)}return Om(n)},Fx="#808080",W4={angle:0,breakAll:!1,capHeight:"0.71em",fill:Fx,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},Jd=m.forwardRef((e,t)=>{var r=Se(e,W4),{x:n,y:i,lineHeight:a,capHeight:o,fill:s,scaleToFit:c,textAnchor:l,verticalAnchor:u}=r,d=Pm(r,R4),f=m.useMemo(()=>z4({breakAll:d.breakAll,children:d.children,maxLines:d.maxLines,scaleToFit:c,style:d.style,width:d.width}),[d.breakAll,d.children,d.maxLines,c,d.style,d.width]),{dx:h,dy:g,angle:v,className:y,breakAll:b}=d,S=Pm(d,$4);if(!jt(n)||!jt(i)||f.length===0)return null;var w=Number(n)+(U(h)?h:0),_=Number(i)+(U(g)?g:0);if(!oe(w)||!oe(_))return null;var x;switch(u){case"start":x=Sc("calc(".concat(o,")"));break;case"middle":x=Sc("calc(".concat((f.length-1)/2," * -").concat(a," + (").concat(o," / 2))"));break;default:x=Sc("calc(".concat(f.length-1," * -").concat(a,")"));break}var O=[];if(c){var P=f[0].width,{width:k}=d;O.push("scale(".concat(U(k)&&U(P)?k/P:1,")"))}return v&&O.push("rotate(".concat(v,", ").concat(w,", ").concat(_,")")),O.length&&(S.transform=O.join(" ")),m.createElement("text",Tl({},Ne(S),{ref:t,x:w,y:_,className:J("recharts-text",y),textAnchor:l,fill:s.includes("url")?Fx:s}),f.map((I,D)=>{var T=I.words.join(b?"":" ");return m.createElement("tspan",{x:w,dy:D===0?x:a,key:"".concat(T,"-").concat(D)},T)}))});Jd.displayName="Text";var H4=["labelRef"];function K4(e,t){if(e==null)return{};var r,n,i=V4(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function V4(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Am(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function se(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Am(Object(r),!0).forEach(function(n){q4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Am(Object(r)).forEac
2115h(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function q4(e,t,r){return(t=G4(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function G4(e){var t=Y4(e,"string");return typeof t=="symbol"?t:t+""}function Y4(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wt(){return Wt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wt.apply(null,arguments)}var Ux=m.createContext(null),J4=e=>{var{x:t,y:r,upperWidth:n,lowerWidth:i,width:a,height:o,children:s}=e,c=m.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:i,width:a,height:o}),[t,r,n,i,a,o]);return m.createElement(Ux.Provider,{value:c},s)},Bx=()=>{var e=m.useContext(Ux),t=ps();return e||Zb(t)},X4=m.createContext(null),Z4=()=>{var e=m.useContext(X4),t=B(ww);return e||t},Q4=e=>{var{value:t,formatter:r}=e,n=he(e.children)?t:e.children;return typeof r=="function"?r(n):n},Xd=e=>e!=null&&typeof e=="function",e5=(e,t)=>{var r=ot(t-e),n=Math.min(Math.abs(t-e),360);return r*n},t5=(e,t,r,n,i)=>{var{offset:a,className:o}=e,{cx:s,cy:c,innerRadius:l,outerRadius:u,startAngle:d,endAngle:f,clockWise:h}=i,g=(l+u)/2,v=e5(d,f),y=v>=0?1:-1,b,S;switch(t){case"insideStart":b=d+y*a,S=h;break;case"insideEnd":b=f-y*a,S=!h;break;case"end":b=f+y*a,S=h;break;default:throw new Error("Unsupported position ".concat(t))}S=v<=0?S:!S;var w=Ae(s,c,g,b),_=Ae(s,c,g,b+(S?1:-1)*359),x="M".concat(w.x,",").concat(w.y,`
2116    A`).concat(g,",").concat(g,",0,1,").concat(S?0:1,`,
2117    `).concat(_.x,",").concat(_.y),O=he(e.id)?pi("recharts-radial-line-"):e.id;return m.createElement("text",Wt({},n,{dominantBaseline:"central",className:J("recharts-radial-bar-label",o)}),m.createElement("defs",null,m.createElement("path",{id:O,d:x})),m.createElement("textPath",{xlinkHref:"#".concat(O)},r))},r5=(e,t,r)=>{var{cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:s,endAngle:c}=e,l=(s+c)/2;if(r==="outside"){var{x:u,y:d}=Ae(n,i,o+t,l);return{x:u,y:d,textAnchor:u>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"end"};var f=(a+o)/2,{x:h,y:g}=Ae(n,i,f,l);return{x:h,y:g,textAnchor:"middle",verticalAnchor:"middle"}},Cl=e=>"cx"in e&&U(e.cx),n5=(e,t)=>{var{parentViewBox:r,offset:n,position:i}=e,a;r!=null&&!Cl(r)&&(a=r);var{x:o,y:s,upperWidth:c,lowerWidth:l,height:u}=t,d=o,f=o+(c-l)/2,h=(d+f)/2,g=(c+l)/2,v=d+c/2,y=u>=0?1:-1,b=y*n,S=y>0?"end":"start",w=y>0?"start":"end",_=c>=0?1:-1,x=_*n,O=_>0?"end":"start",P=_>0?"start":"end";if(i==="top"){var k={x:d+c/2,y:s-b,textAnchor:"middle",verticalAnchor:S};return se(se({},k),a?{height:Math.max(s-a.y,0),width:c}:{})}if(i==="bottom"){var I={x:f+l/2,y:s+u+b,textAnchor:"middle",verticalAnchor:w};return se(se({},I),a?{height:Math.max(a.y+a.height-(s+u),0),width:l}:{})}if(i==="left"){var D={x:h-x,y:s+u/2,textAnchor:O,verticalAnchor:"middle"};return se(se({},D),a?{width:Math.max(D.x-a.x,0),height:u}:{})}if(i==="right"){var T={x:h+g+x,y:s+u/2,textAnchor:P,verticalAnchor:"middle"};return se(se({},T),a?{width:Math.max(a.x+a.width-T.x,0),height:u}:{})}var C=a?{width:g,height:u}:{};return i==="insideLeft"?se({x:h+x,y:s+u/2,textAnchor:P,verticalAnchor:"middle"},C):i==="insideRight"?se({x:h+g-x,y:s+u/2,textAnchor:O,verticalAnchor:"middle"},C):i==="insideTop"?se({x:d+c/2,y:s+b,textAnchor:"middle",verticalAnchor:w},C):i==="insideBottom"?se({x:f+l/2,y:s+u-b,textAnchor:"middle",verticalAnchor:S},C):i==="insideTopLeft"?se({x:d+x,y:s+b,textAnchor:P,verticalAnchor:w},C):i==="insideTopRight"?se({x:d+c-x,y:s+b,textAnchor:O,verticalAnchor:w},C):i==="insideBottomLeft"?se({x:f+x,y:s+u-b,textAnchor:P,verticalAnchor:S},C):i==="insideBottomRight"?se({x:f+l-x,y:s+u-b,textAnchor:O,verticalAnchor:S},C):i&&typeof i=="object"&&(U(i.x)||Qt(i.x))&&(U(i.y)||Qt(i.y))?se({x:o+Ar(i.x,g),y:s+Ar(i.y,u),textAnchor:"end",verticalAnchor:"end"},C):se({x:v,y:s+u/2,textAnchor:"middle",verticalAnchor:"middle"},C)},i5={angle:0,offset:5,zIndex:Ce.label,position:"middle",textBreakAll:!1};function mr(e){var t=Se(e,i5),{viewBox:r,position:n,value:i,children:a,content:o,className:s="",textBreakAll:c,labelRef:l}=t,u=Z4(),d=Bx(),f=n==="center"?d:u??d,h,g,v;
2117if(r==null?h=f:Cl(r)?h=r:h=Zb(r),!h||he(i)&&he(a)&&!m.isValidElement(o)&&typeof o!="function")return null;var y=se(se({},t),{},{viewBox:h});if(m.isValidElement(o)){var{labelRef:b}=y,S=K4(y,H4);return m.cloneElement(o,S)}if(typeof o=="function"){if(g=m.createElement(o,y),m.isValidElement(g))return g}else g=Q4(t);var w=Ne(t);if(Cl(h)){if(n==="insideStart"||n==="insideEnd"||n==="end")return t5(t,n,g,w,h);v=r5(h,t.offset,t.position)}else v=n5(t,h);return m.createElement(Ft,{zIndex:t.zIndex},m.createElement(Jd,Wt({ref:l,className:J("recharts-label",s)},w,v,{textAnchor:F4(w.textAnchor)?w.textAnchor:v.textAnchor,breakAll:c}),g))}mr.displayName="Label";var a5=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?m.createElement(mr,Wt({key:"label-implicit"},n)):jt(e)?m.createElement(mr,Wt({key:"label-implicit",value:e},n)):m.isValidElement(e)?e.type===mr?m.cloneElement(e,se({key:"label-implicit"},n)):m.createElement(mr,Wt({key:"label-implicit",content:e},n)):Xd(e)?m.createElement(mr,Wt({key:"label-implicit",content:e},n)):e&&typeof e=="object"?m.createElement(mr,Wt({},e,{key:"label-implicit"},n)):null};function o5(e){var{label:t,labelRef:r}=e,n=Bx();return a5(t,n,r)||null}var zx={},Wx={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r[r.length-1]}e.last=t})(Wx);var Hx={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Array.isArray(r)?r:Array.from(r)}e.toArray=t})(Hx);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Wx,r=Hx,n=Zo;function i(a){if(n.isArrayLike(a))return t.last(r.toArray(a))}e.last=i})(zx);var s5=zx.last;const c5=Ir(s5);var l5=["valueAccessor"],u5=["dataKey","clockWise","id","textBreakAll","zIndex"];function _o(){return _o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_o.apply(null,arguments)}function Em(e,t){if(e==null)return{};var r,n,i=d5(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function d5(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var f5=e=>Array.isArray(e.value)?c5(e.value):e.value,Kx=m.createContext(void 0),Vx=Kx.Provider,qx=m.createContext(void 0);qx.Provider;function h5(){return m.useContext(Kx)}function p5(){return m.useContext(qx)}function Ta(e){var{valueAccessor:t=f5}=e,r=Em(e,l5),{dataKey:n,clockWise:i,id:a,textBreakAll:o,zIndex:s}=r,c=Em(r,u5),l=h5(),u=p5(),d=l||u;return!d||!d.length?null:m.createElement(Ft,{zIndex:s??Ce.label},m.createElement(ut,{className:"recharts-label-list"},d.map((f,h)=>{var g,v=he(n)?t(f,h):xe(f&&f.payload,n),y=he(a)?{}:{id:"".concat(a,"-").concat(h)};return m.createElement(mr,_o({key:"label-".concat(h)},Ne(f),c,y,{fill:(g=r.fill)!==null&&g!==void 0?g:f.fill,parentViewBox:f.parentViewBox,value:v,textBreakAll:o,viewBox:f.viewBox,index:h,zIndex:0}))})))}Ta.displayName="LabelList";function Gx(e){var{label:t}=e;return t?t===!0?m.createElement(Ta,{key:"labelList-implicit"}):m.isValidElement(t)||Xd(t)?m.createElement(Ta,{key:"labelList-implicit",content:t}):typeof t=="object"?m.createElement(Ta,_o({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function Nl(){return Nl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Nl.apply(null,arguments)}var Yx=e=>{var{cx:t,cy:r,r:n,className:i}=e,a=J("recharts-dot",i);return U(t)&&U(r)&&U(n)?m.createElement("circle",Nl({},lt(e),Ou(e),{className:a,cx:t,cy:r,r:n})):null},m5={radiusAxis:{},angleAxis:{}},Jx=Ke({name:"polarAxis",initialState:m5,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:L8,removeRadiusAxis:F8,addAngleAxis:U8,removeAngleAxis:B8}=Jx.actions,g5=Jx.reducer,Zd=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,Xx={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){var i;if(typeof r!="object"||r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;
2117if(Object.prototype.toString.call(r)!=="[object Object]"){const a=r[Symbol.toStringTag];return a==null||!((i=Object.getOwnPropertyDescriptor(r,Symbol.toStringTag))!=null&&i.writable)?!1:r.toString()===`[object ${a}]`}let n=r;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(r)===n}e.isPlainObject=t})(Xx);var y5=Xx.isPlainObject;const v5=Ir(y5);function Im(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function km(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Im(Object(r),!0).forEach(function(n){b5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Im(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function b5(e,t,r){return(t=w5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w5(e){var t=x5(e,"string");return typeof t=="symbol"?t:t+""}function x5(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Oo(){return Oo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Oo.apply(null,arguments)}var Tm=(e,t,r,n,i)=>{var a=r-n,o;return o="M ".concat(e,",").concat(t),o+="L ".concat(e+r,",").concat(t),o+="L ".concat(e+r-a/2,",").concat(t+i),o+="L ".concat(e+r-a/2-n,",").concat(t+i),o+="L ".concat(e,",").concat(t," Z"),o},S5={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},P5=e=>{var t=Se(e,S5),{x:r,y:n,upperWidth:i,lowerWidth:a,height:o,className:s}=t,{animationEasing:c,animationDuration:l,animationBegin:u,isUpdateAnimationActive:d}=t,f=m.useRef(null),[h,g]=m.useState(-1),v=m.useRef(i),y=m.useRef(a),b=m.useRef(o),S=m.useRef(r),w=m.useRef(n),_=ws(e,"trapezoid-");if(m.useEffect(()=>{if(f.current&&f.current.getTotalLength)try{var j=f.current.getTotalLength();j&&g(j)}catch{}},[]),r!==+r||n!==+n||i!==+i||a!==+a||o!==+o||i===0&&a===0||o===0)return null;var x=J("recharts-trapezoid",s);if(!d)return m.createElement("g",null,m.createElement("path",Oo({},Ne(t),{className:x,d:Tm(r,n,i,a,o)})));var O=v.current,P=y.current,k=b.current,I=S.current,D=w.current,T="0px ".concat(h===-1?1:h,"px"),C="".concat(h,"px 0px"),R=c0(["strokeDasharray"],l,c);return m.createElement(bs,{animationId:_,key:_,canBegin:h>0,duration:l,easing:c,isActive:d,begin:u},j=>{var $=le(O,i,j),W=le(P,a,j),z=le(k,o,j),K=le(I,r,j),F=le(D,n,j);f.current&&(v.current=$,y.current=W,b.current=z,S.current=K,w.current=F);var _e=j>0?{transition:R,strokeDasharray:C}:{strokeDasharray:T};return m.createElement("path",Oo({},Ne(t),{className:x,d:Tm(K,F,$,W,z),ref:f,style:km(km({},_e),t.style)}))})},_5=["option","shapeType","propTransformer","activeClassName"];function O5(e,t){if(e==null)return{};var r,n,i=A5(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function A5(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Cm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ao(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cm(Object(r),!0).forEach(function(n){E5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cm(Object(r)).forEac
2117h(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function E5(e,t,r){return(t=I5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function I5(e){var t=k5(e,"string");return typeof t=="symbol"?t:t+""}function k5(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function T5(e,t){return Ao(Ao({},t),e)}function C5(e,t){return e==="symbols"}function Nm(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return m.createElement(f0,r);case"trapezoid":return m.createElement(P5,r);case"sector":return m.createElement(m0,r);case"symbols":if(C5(t))return m.createElement(_u,r);break;case"curve":return m.createElement(ci,r);default:return null}}function N5(e){return m.isValidElement(e)?e.props:e}function j5(e){var{option:t,shapeType:r,propTransformer:n=T5,activeClassName:i="recharts-active-shape"}=e,a=O5(e,_5),o;if(m.isValidElement(t))o=m.cloneElement(t,Ao(Ao({},a),N5(t)));else if(typeof t=="function")o=t(a,a.index);else if(v5(t)&&typeof t!="boolean"){var s=n(t,a);o=m.createElement(Nm,{shapeType:r,elementProps:s})}else{var c=a;o=m.createElement(Nm,{shapeType:r,elementProps:c})}return a.isActive?m.createElement(ut,{className:i},o):o}function Zx(e){var{tooltipEntrySettings:t}=e,r=de(),n=Me(),i=m.useRef(null);return m.useLayoutEffect(()=>{n||(i.current===null?r(dF(t)):i.current!==t&&r(fF({prev:i.current,next:t})),i.current=t)},[t,r,n]),m.useLayoutEffect(()=>()=>{i.current&&(r(hF(i.current)),i.current=null)},[r]),null}function Qx(e){var{legendPayload:t}=e,r=de(),n=Me(),i=m.useRef(null);return m.useLayoutEffect(()=>{n||(i.current===null?r(MD(t)):i.current!==t&&r(DD({prev:i.current,next:t})),i.current=t)},[r,n,t]),m.useLayoutEffect(()=>()=>{i.current&&(r(RD(i.current)),i.current=null)},[r]),null}var Pc,M5=()=>{var[e]=m.useState(()=>pi("uid-"));return e},D5=(Pc=Y1.useId)!==null&&Pc!==void 0?Pc:M5;function e1(e,t){var r=D5();return t||(e?"".concat(e,"-").concat(r):r)}var R5=m.createContext(void 0),t1=e=>{var{id:t,type:r,children:n}=e,i=e1("recharts-".concat(r),t);return m.createElement(R5.Provider,{value:i},n(i))},$5={cartesianItems:[],polarItems:[]},r1=Ke({name:"graphicalItems",initialState:$5,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:ie()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,i=bt(e).cartesianItems.indexOf(r);i>-1&&(e.cartesianItems[i]=n)},prepare:ie()},removeCartesianGraphicalItem:{reducer(e,t){var r=bt(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:ie()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:ie()},removePolarGraphicalItem:{reducer(e,t){var r=bt(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:ie()}}}),{addCartesianGraphicalItem:L5,replaceCartesianGraphicalItem:F5,removeCartesianGraphicalItem:U5,addPolarGraphicalItem:z8,removePolarGraphicalItem:W8}=r1.actions,B5=r1.reducer,z5=e=>{var t=de(),r=m.useRef(null);return m.useLayoutEffect(()=>{r.current===null?t(L5(e)):r.current!==e&&t(F5({prev:r.current,next:e})),r.current=e},[t,e]),m.useLayoutEffect(()=>()=>{r.current&&(t(U5(r.current)),r.current=null)},[t]),null},n1=m.memo(z5),W5=["points"];function jm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _c(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jm(Object(r),!0).forEach(function(n){H5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function H5(e,t,r){return(t=K5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function K5(e){var t=V5(e,"string");return typeof t=="symbol"?t:t+""}function V5(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Eo(){return Eo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}
2117).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Eo.apply(null,arguments)}function q5(e,t){if(e==null)return{};var r,n,i=G5(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function G5(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Y5(e){var{option:t,dotProps:r,className:n}=e;if(m.isValidElement(t))return m.cloneElement(t,r);if(typeof t=="function")return t(r);var i=J(n,typeof t!="boolean"?t.className:""),a=r??{},{points:o}=a,s=q5(a,W5);return m.createElement(Yx,Eo({},s,{className:i}))}function J5(e,t){return e==null?!1:t?!0:e.length===1}function i1(e){var{points:t,dot:r,className:n,dotClassName:i,dataKey:a,baseProps:o,needClip:s,clipPathId:c,zIndex:l=Ce.scatter}=e;if(!J5(t,r))return null;var u=Zd(r),d=jC(r),f=t.map((g,v)=>{var y,b,S=_c(_c(_c({r:3},o),d),{},{index:v,cx:(y=g.x)!==null&&y!==void 0?y:void 0,cy:(b=g.y)!==null&&b!==void 0?b:void 0,dataKey:a,value:g.value,payload:g.payload,points:t});return m.createElement(Y5,{key:"dot-".concat(v),option:r,dotProps:S,className:i})}),h={};return s&&c!=null&&(h.clipPath="url(#clipPath-".concat(u?"":"dots-").concat(c,")")),m.createElement(Ft,{zIndex:l},m.createElement(ut,Eo({className:n},h),f))}function Mm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Dm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mm(Object(r),!0).forEach(function(n){X5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function X5(e,t,r){return(t=Z5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z5(e){var t=Q5(e,"string");return typeof t=="symbol"?t:t+""}function Q5(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var eU={xAxis:{},yAxis:{},zAxis:{}},a1=Ke({name:"cartesianAxis",initialState:eU,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:ie()},replaceXAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.xAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.xAxis[r.id],e.xAxis[n.id]=n)},prepare:ie()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:ie()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:ie()},replaceYAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.yAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.yAxis[r.id],e.yAxis[n.id]=n)},prepare:ie()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:ie()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:ie()},replaceZAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.zAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.zAxis[r.id],e.zAxis[n.id]=n)},prepare:ie()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:ie()},updateYAxisWidth(e,t){var{id:r,width:n}=t.payload,i=e.yAxis[r];if(i){var a=i.widthHistory||[];if(a.length===3&&a[0]===a[2]&&n===a[1]&&n!==i.width&&Math.abs(n-a[0])<=1)return;var o=[...a,n].slice(-3);e.yAxis[r]=Dm(Dm({},e.yAxis[r]),{},{width:n,widthHistory:o})}}}}),{addXAxis:tU,replaceXAxis:rU,removeXAxis:nU,addYAxis:iU,replaceYAxis:aU,removeYAxis:oU,addZAxis:H8,replaceZAxis:K8,removeZAxis:V8,updateYAxisWidth:sU}=a1.actions,cU=a1.reducer,lU=E([Ee],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),uU=E([lU,sr,cr],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),Fs=()=>B(uU),dU=()=>B(a3);function Rm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Oc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
2117t%2?Rm(Object(r),!0).forEach(function(n){fU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fU(e,t,r){return(t=hU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hU(e){var t=pU(e,"string");return typeof t=="symbol"?t:t+""}function pU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mU=e=>{var{point:t,childIndex:r,mainColor:n,activeDot:i,dataKey:a,clipPath:o}=e;if(i===!1||t.x==null||t.y==null)return null;var s={index:r,dataKey:a,cx:t.x,cy:t.y,r:4,fill:n??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},c=Oc(Oc(Oc({},s),Ho(i)),Ou(i)),l;return m.isValidElement(i)?l=m.cloneElement(i,c):typeof i=="function"?l=i(c):l=m.createElement(Yx,c),m.createElement(ut,{className:"recharts-active-dot",clipPath:o},l)};function jl(e){var{points:t,mainColor:r,activeDot:n,itemDataKey:i,clipPath:a,zIndex:o=Ce.activeDot}=e,s=B(Ei),c=dU();if(t==null||c==null)return null;var l=t.find(u=>c.includes(u.payload));return he(l)?null:m.createElement(Ft,{zIndex:o},m.createElement(mU,{point:l,childIndex:Number(s),mainColor:r,dataKey:i,activeDot:n,clipPath:a}))}var gU={},o1=Ke({name:"errorBars",initialState:gU,reducers:{addErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]||(e[r]=[]),e[r].push(n)},replaceErrorBar:(e,t)=>{var{itemId:r,prev:n,next:i}=t.payload;e[r]&&(e[r]=e[r].map(a=>a.dataKey===n.dataKey&&a.direction===n.direction?i:a))},removeErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]&&(e[r]=e[r].filter(i=>i.dataKey!==n.dataKey||i.direction!==n.direction))}}}),{addErrorBar:q8,replaceErrorBar:G8,removeErrorBar:Y8}=o1.actions,yU=o1.reducer,vU=["children"];function bU(e,t){if(e==null)return{};var r,n,i=wU(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function wU(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var xU={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},SU=m.createContext(xU);function PU(e){var{children:t}=e,r=bU(e,vU);return m.createElement(SU.Provider,{value:r},t)}function Qd(e,t){var r,n,i=B(l=>ur(l,e)),a=B(l=>dr(l,t)),o=(r=i==null?void 0:i.allowDataOverflow)!==null&&r!==void 0?r:ve.allowDataOverflow,s=(n=a==null?void 0:a.allowDataOverflow)!==null&&n!==void 0?n:be.allowDataOverflow,c=o||s;return{needClip:c,needClipX:o,needClipY:s}}function s1(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,i=Fs(),{needClipX:a,needClipY:o,needClip:s}=Qd(t,r);if(!s||!i)return null;var{x:c,y:l,width:u,height:d}=i;return m.createElement("clipPath",{id:"clipPath-".concat(n)},m.createElement("rect",{x:a?c:c-u/2,y:o?l:l-d/2,width:a?u:u*2,height:o?d:d*2}))}var _U={};/**
2118 * @license React
2119 * use-sync-external-store-with-selector.production.js
2120 *
2121 * Copyright (c) Meta Platforms, Inc. and affiliates.
2122 *
2123 * This source code is licensed under the MIT license found in the
2124 * LICENSE file in the root directory of this source tree.
2125 */var ra=m;function OU(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var AU=typeof Object.is=="function"?Object.is:OU,EU=ra.useSyncExternalStore,IU=ra.useRef,kU=ra.useEffect,TU=ra.useMemo,CU=ra.useDebugValue;_U.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var a=IU(null);if(a.current===null){var o={hasValue:!1,value:null};a.current=o}else o=a.current;a=TU(function(){function c(h){if(!l){if(l=!0,u=h,h=n(h),i!==void 0&&o.hasValue){var g=o.value;if(i(g,h))return d=g}return d=h}if(g=d,AU(u,h))return g;var v=n(h);return i!==void 0&&i(g,v)?(u=h,g):(u=h,d=v)}var l=!1,u,d,f=r===void 0?null:r;return[function(){return c(t())},f===null?void 0:function(){return c(f())}]},[t,r,n,i]);var s=EU(e,a[0],a[1]);return kU(function(){o.hasValue=!0,o.value=s},[s]),CU(s),s};function NU(e){e()}function jU(){let e=null,t=null;return{clear(){e=null,t=null},notify(){NU(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const i=t={callback:r,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!n||e===null||(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var $m={notify(){},get:()=>[]};function MU(e,t){let r,n=$m,i=0,a=!1;function o(v){u();const y=n.subscribe(v);let b=!1;return()=>{b||(b=!0,y(),d())}}function s(){n.notify()}function c(){g.onStateChange&&g.onStateChange()}function l(){return a}function u(){i++,r||(r=e.subscribe(c),n=jU())}function d(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=$m)}function f(){a||(a=!0,u())}function h(){a&&(a=!1,d())}const g={addNestedSub:o,notifyNestedSubs:s,handleChangeWrapper:c,isSubscribed:l,trySubscribe:f,tryUnsubscribe:h,getListeners:()=>n};return g}var DU=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",RU=DU(),$U=()=>typeof navigator<"u"&&navigator.product==="ReactNative",LU=$U(),FU=()=>RU||LU?m.useLayoutEffect:m.useEffect,UU=FU();function Lm(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function BU(e,t){if(Lm(e,t))return!0;
2125if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let i=0;i<r.length;i++)if(!Object.prototype.hasOwnProperty.call(t,r[i])||!Lm(e[r[i]],t[r[i]]))return!1;return!0}var Ac=Symbol.for("react-redux-context"),Ec=typeof globalThis<"u"?globalThis:{};function zU(){if(!m.createContext)return{};const e=Ec[Ac]??(Ec[Ac]=new Map);let t=e.get(m.createContext);return t||(t=m.createContext(null),e.set(m.createContext,t)),t}var WU=zU();function HU(e){const{children:t,context:r,serverState:n,store:i}=e,a=m.useMemo(()=>{const c=MU(i);return{store:i,subscription:c,getServerState:n?()=>n:void 0}},[i,n]),o=m.useMemo(()=>i.getState(),[i]);UU(()=>{const{subscription:c}=a;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),o!==i.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[a,o]);const s=r||WU;return m.createElement(s.Provider,{value:a},t)}var KU=HU,VU=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle"]);function qU(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Us(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(VU.has(n)){if(e[n]==null&&t[n]==null)continue;if(!BU(e[n],t[n]))return!1}else if(!qU(e[n],t[n]))return!1;return!0}var GU=e=>{var{chartData:t}=e,r=de(),n=Me();return m.useEffect(()=>n?()=>{}:(r(dm(t)),()=>{r(dm(void 0))}),[t,r,n]),null},Fm={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},c1=Ke({name:"brush",initialState:Fm,reducers:{setBrushSettings(e,t){return t.payload==null?Fm:t.payload}}}),{setBrushSettings:J8}=c1.actions,YU=c1.reducer;function JU(e,t,r){return(t=XU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function XU(e){var t=ZU(e,"string");return typeof t=="symbol"?t:t+""}function ZU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class ef{static create(t){return new ef(t)}constructor(t){this.scale=t}get domain(){return this.scale.domain}get range(){return this.scale.range}get rangeMin(){return this.range()[0]}get rangeMax(){return this.range()[1]}get bandwidth(){return this.scale.bandwidth}
2125apply(t){var{bandAware:r,position:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t!==void 0){if(n)switch(n){case"start":return this.scale(t);case"middle":{var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+i}case"end":{var a=this.bandwidth?this.bandwidth():0;return this.scale(t)+a}default:return this.scale(t)}if(r){var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+o}return this.scale(t)}}isInRange(t){var r=this.range(),n=r[0],i=r[r.length-1];return n<=i?t>=n&&t<=i:t>=i&&t<=n}}JU(ef,"EPS",1e-4);function QU(e){return(e%180+180)%180}var eB=function(t){var{width:r,height:n}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=QU(i),o=a*Math.PI/180,s=Math.atan(n/r),c=o>s&&o<Math.PI-s?n/Math.sin(o):r/Math.cos(o);return Math.abs(c)},tB={dots:[],areas:[],lines:[]},l1=Ke({name:"referenceElements",initialState:tB,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=bt(e).dots.findIndex(n=>n===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=bt(e).areas.findIndex(n=>n===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=bt(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),{addDot:X8,removeDot:Z8,addArea:Q8,removeArea:eH,addLine:tH,removeLine:rH}=l1.actions,rB=l1.reducer,nB=m.createContext(void 0),iB=e=>{var{children:t}=e,[r]=m.useState("".concat(pi("recharts"),"-clip")),n=Fs();if(n==null)return null;var{x:i,y:a,width:o,height:s}=n;return m.createElement(nB.Provider,{value:r},m.createElement("defs",null,m.createElement("clipPath",{id:r},m.createElement("rect",{x:i,y:a,height:s,width:o}))),t)};function u1(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;n<e.length;n+=t)r.push(e[n]);return r}function aB(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return eB(n,r)}function oB(e,t,r){var n=r==="width",{x:i,y:a,width:o,height:s}=e;return t===1?{start:n?i:a,end:n?i+o:a+s}:{start:n?i+o:a+s,end:n?i:a}}function Io(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function sB(e,t){return u1(e,t+1)}function cB(e,t,r,n,i){for(var a=(n||[]).slice(),{start:o,end:s}=t,c=0,l=1,u=o,d=function(){var g=n==null?void 0:n[c];if(g===void 0)return{v:u1(n,l)};var v=c,y,b=()=>(y===void 0&&(y=r(g,v)),y),S=g.coordinate,w=c===0||Io(e,S,b,u,s);w||(c=0,u=o,l+=1),w&&(u=S+e*(b()/2+i),c+=l)},f;l<=a.length;)if(f=d(),f)return f.v;return[]}function Um(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Um(Object(r),!0).forEach(function(n){lB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Um(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lB(e,t,r){return(t=uB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uB(e){var t=dB(e,"string");return typeof t=="symbol"?t:t+""}function dB(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fB(e,t,r,n,i){for(var a=(n||[]).slice(),o=a.length,{start:s}=t,{end:c}=t,l=function(f){var h=a[f],g,v=()=>(g===void 0&&(g=r(h,f)),g);if(f===o-1){var y=e*(h.coordinate+e*v()/2-c);a[f]=h=Ie(Ie({},h),{},{tickCoord:y>0?h.coordinate-y*e:h.coordinate})}else a[f]=h=Ie(Ie({},h),{},{tickCoord:h.coordinate});if(h.tickCoord!=null){var b=Io(e,h.tickCoord,v,s,c);b&&(c=h.tickCoord-e*(v()/2+i),a[f]=Ie(Ie({},h),{},{isShow:!0}))}},u=o-1;u>=0;u--)l(u);return a}function hB(e,t,r,n,i,a){var o=(n||[]).slice(),s=o.length,{start:c,end:l}=t;if(a){var u=n[s-1],d=r(u,s-1),f=e*(u.coordinate+e*d/2-l);if(o[s-1]=u=Ie(Ie({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate}),u.tickCoord!=null){var h=Io(e,u.tickCoord,()=>d,c,l);h&&(l=u.tickCoord-e*(d/2+i),o[s-1]=Ie(Ie({},u),{},{isShow:!0}
2125))}}for(var g=a?s-1:s,v=function(S){var w=o[S],_,x=()=>(_===void 0&&(_=r(w,S)),_);if(S===0){var O=e*(w.coordinate-e*x()/2-c);o[S]=w=Ie(Ie({},w),{},{tickCoord:O<0?w.coordinate-O*e:w.coordinate})}else o[S]=w=Ie(Ie({},w),{},{tickCoord:w.coordinate});if(w.tickCoord!=null){var P=Io(e,w.tickCoord,x,c,l);P&&(c=w.tickCoord+e*(x()/2+i),o[S]=Ie(Ie({},w),{},{isShow:!0}))}},y=0;y<g;y++)v(y);return o}function tf(e,t,r){var{tick:n,ticks:i,viewBox:a,minTickGap:o,orientation:s,interval:c,tickFormatter:l,unit:u,angle:d}=e;if(!i||!i.length||!n)return[];if(U(c)||Rn.isSsr){var f;return(f=sB(i,U(c)?c:0))!==null&&f!==void 0?f:[]}var h=[],g=s==="top"||s==="bottom"?"width":"height",v=u&&g==="width"?li(u,{fontSize:t,letterSpacing:r}):{width:0,height:0},y=(w,_)=>{var x=typeof l=="function"?l(w.value,_):w.value;return g==="width"?aB(li(x,{fontSize:t,letterSpacing:r}),v,d):li(x,{fontSize:t,letterSpacing:r})[g]},b=i.length>=2?ot(i[1].coordinate-i[0].coordinate):1,S=oB(a,b,g);return c==="equidistantPreserveStart"?cB(b,S,y,i,o):(c==="preserveStart"||c==="preserveStartEnd"?h=hB(b,S,y,i,o,c==="preserveStartEnd"):h=fB(b,S,y,i,o),h.filter(w=>w.isShow))}var pB=e=>{var{ticks:t,label:r,labelGapWithTick:n=5,tickSize:i=0,tickMargin:a=0}=e,o=0;if(t){Array.from(t).forEach(u=>{if(u){var d=u.getBoundingClientRect();d.width>o&&(o=d.width)}});var s=r?r.getBoundingClientRect().width:0,c=i+a,l=o+c+s+(r?n:0);return Math.round(l)}return 0},mB=["axisLine","width","height","className","hide","ticks","axisType"];function gB(e,t){if(e==null)return{};var r,n,i=yB(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function yB(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function en(){return en=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},en.apply(null,arguments)}function Bm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ce(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bm(Object(r),!0).forEach(function(n){vB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vB(e,t,r){return(t=bB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bB(e){var t=wB(e,"string");return typeof t=="symbol"?t:t+""}function wB(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Yt={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:Ce.axis};function xB(e){var{x:t,y:r,width:n,height:i,orientation:a,mirror:o,axisLine:s,otherSvgProps:c}=e;if(!s)return null;var l=ce(ce(ce({},c),lt(s)),{},{fill:"none"});if(a==="top"||a==="bottom"){var u=+(a==="top"&&!o||a==="bottom"&&o);l=ce(ce({},l),{},{x1:t,y1:r+u*i,x2:t+n,y2:r+u*i})}else{var d=+(a==="left"&&!o||a==="right"&&o);l=ce(ce({},l),{},{x1:t+d*n,y1:r,x2:t+d*n,y2:r+i})}return m.createElement("line",en({},l,{className:J("recharts-cartesian-axis-line",Xo(s,"className"))}))}function SB(e,t,r,n,i,a,o,s,c){var l,u,d,f,h,g,v=s?-1:1,y=e.tickSize||o,b=U(e.tickCoord)?e.tickCoord:e.coordinate;switch(a){case"top":l=u=e.coordinate,f=r+ +!s*i,d=f-v*y,g=d-v*c,h=b;break;case"left":d=f=e.coordinate,u=t+ +!s*n,l=u-v*y,h=l-v*c,g=b;break;case"right":d=f=e.coordinate,u=t+ +s*n,l=u+v*y,h=l+v*c,g=b;break;default:l=u=e.coordinate,f=r+ +s*i,d=f+v*y,g=d+v*c,h=b;break}return{line:{x1:l,y1:d,x2:u,y2:f},tick:{x:h,y:g}}}function PB(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function _B(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function OB(e){var{option:t,tickProps:r,value:n}=e,i,a=J(r.className,"recharts-cartesian-axis-tick-value");if(m.isValidElement(t))i=m.cloneElement(t,ce(ce({},r),{},{className:a}));else if(typeof t=="function")i=t(ce(ce({},r),{},{className:a}));else{var o="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(o=J(o,t==null?void 0:t.className)),i=m.createElement(Jd,en({},r,{className:o}),n)}return i}var AB=m.forwardRef((e,t)=>
2125{var{ticks:r=[],tick:n,tickLine:i,stroke:a,tickFormatter:o,unit:s,padding:c,tickTextProps:l,orientation:u,mirror:d,x:f,y:h,width:g,height:v,tickSize:y,tickMargin:b,fontSize:S,letterSpacing:w,getTicksConfig:_,events:x,axisType:O}=e,P=tf(ce(ce({},_),{},{ticks:r}),S,w),k=PB(u,d),I=_B(u,d),D=lt(_),T=Ho(n),C={};typeof i=="object"&&(C=i);var R=ce(ce({},D),{},{fill:"none"},C),j=P.map(z=>ce({entry:z},SB(z,f,h,g,v,u,y,d,b))),$=j.map(z=>{var{entry:K,line:F}=z;return m.createElement(ut,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(K.value,"-").concat(K.coordinate,"-").concat(K.tickCoord)},i&&m.createElement("line",en({},R,F,{className:J("recharts-cartesian-axis-tick-line",Xo(i,"className"))})))}),W=j.map((z,K)=>{var{entry:F,tick:_e}=z,Ve=ce(ce(ce(ce({textAnchor:k,verticalAnchor:I},D),{},{stroke:"none",fill:a},T),_e),{},{index:K,payload:F,visibleTicksCount:P.length,tickFormatter:o,padding:c},l);return m.createElement(ut,en({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(F.value,"-").concat(F.coordinate,"-").concat(F.tickCoord)},Mv(x,F,K)),n&&m.createElement(OB,{option:n,tickProps:Ve,value:"".concat(typeof o=="function"?o(F.value,K):F.value).concat(s||"")}))});return m.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(O,"-ticks")},W.length>0&&m.createElement(Ft,{zIndex:Ce.label},m.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(O,"-tick-labels"),ref:t},W)),$.length>0&&m.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(O,"-tick-lines")},$))}),EB=m.forwardRef((e,t)=>{var{axisLine:r,width:n,height:i,className:a,hide:o,ticks:s,axisType:c}=e,l=gB(e,mB),[u,d]=m.useState(""),[f,h]=m.useState(""),g=m.useRef(null);m.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var y;return pB({ticks:g.current,label:(y=e.labelRef)===null||y===void 0?void 0:y.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var v=m.useCallback(y=>{if(y){var b=y.getElementsByClassName("recharts-cartesian-axis-tick-value");g.current=b;var S=b[0];if(S){var w=window.getComputedStyle(S),_=w.fontSize,x=w.letterSpacing;(_!==u||x!==f)&&(d(_),h(x))}}},[u,f]);return o||n!=null&&n<=0||i!=null&&i<=0?null:m.createElement(Ft,{zIndex:e.zIndex},m.createElement(ut,{className:J("recharts-cartesian-axis",a)},m.createElement(xB,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:lt(e)}),m.createElement(AB,{ref:v,axisType:c,events:l,fontSize:u,getTicksConfig:e,height:e.height,letterSpacing:f,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:s,unit:e.unit,width:e.width,x:e.x,y:e.y}),m.createElement(J4,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},m.createElement(o5,{label:e.label,labelRef:e.labelRef}),e.children)))}),rf=m.forwardRef((e,t)=>{var r=Se(e,Yt);return m.createElement(EB,en({},r,{ref:t}))});rf.displayName="CartesianAxis";var IB=["x1","y1","x2","y2","key"],kB=["offset"],TB=["xAxisId","yAxisId"],CB=["xAxisId","yAxisId"];function zm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Te(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zm(Object(r),!0).forEach(function(n){NB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function NB(e,t,r){return(t=jB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jB(e){var t=MB(e,"string");return typeof t=="symbol"?t:t+""}function MB(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wr(){return Wr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}
2125).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wr.apply(null,arguments)}function ko(e,t){if(e==null)return{};var r,n,i=DB(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function DB(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var RB=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:r,x:n,y:i,width:a,height:o,ry:s}=e;return m.createElement("rect",{x:n,y:i,ry:s,width:a,height:o,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function d1(e){var{option:t,lineItemProps:r}=e,n;if(m.isValidElement(t))n=m.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var i,{x1:a,y1:o,x2:s,y2:c,key:l}=r,u=ko(r,IB),d=(i=lt(u))!==null&&i!==void 0?i:{},{offset:f}=d,h=ko(d,kB);n=m.createElement("line",Wr({},h,{x1:a,y1:o,x2:s,y2:c,fill:"none",key:l}))}return n}function $B(e){var{x:t,width:r,horizontal:n=!0,horizontalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:a,yAxisId:o}=e,s=ko(e,TB),c=i.map((l,u)=>{var d=Te(Te({},s),{},{x1:t,y1:l,x2:t+r,y2:l,key:"line-".concat(u),index:u});return m.createElement(d1,{key:"line-".concat(u),option:n,lineItemProps:d})});return m.createElement("g",{className:"recharts-cartesian-grid-horizontal"},c)}function LB(e){var{y:t,height:r,vertical:n=!0,verticalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:a,yAxisId:o}=e,s=ko(e,CB),c=i.map((l,u)=>{var d=Te(Te({},s),{},{x1:l,y1:t,x2:l,y2:t+r,key:"line-".concat(u),index:u});return m.createElement(d1,{option:n,lineItemProps:d,key:"line-".concat(u)})});return m.createElement("g",{className:"recharts-cartesian-grid-vertical"},c)}function FB(e){var{horizontalFill:t,fillOpacity:r,x:n,y:i,width:a,height:o,horizontalPoints:s,horizontal:c=!0}=e;if(!c||!t||!t.length||s==null)return null;var l=s.map(d=>Math.round(d+i-i)).sort((d,f)=>d-f);i!==l[0]&&l.unshift(0);var u=l.map((d,f)=>{var h=!l[f+1],g=h?i+o-d:l[f+1]-d;if(g<=0)return null;var v=f%t.length;return m.createElement("rect",{key:"react-".concat(f),y:d,x:n,height:g,width:a,stroke:"none",fill:t[v],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return m.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},u)}function UB(e){var{vertical:t=!0,verticalFill:r,fillOpacity:n,x:i,y:a,width:o,height:s,verticalPoints:c}=e;if(!t||!r||!r.length)return null;var l=c.map(d=>Math.round(d+i-i)).sort((d,f)=>d-f);i!==l[0]&&l.unshift(0);var u=l.map((d,f)=>{var h=!l[f+1],g=h?i+o-d:l[f+1]-d;if(g<=0)return null;var v=f%r.length;return m.createElement("rect",{key:"react-".concat(f),x:d,y:a,width:g,height:s,stroke:"none",fill:r[v],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return m.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},u)}var BB=(e,t)=>{var{xAxis:r,width:n,height:i,offset:a}=e;return Bb(tf(Te(Te(Te({},Yt),r),{},{ticks:zb(r),viewBox:{x:0,y:0,width:n,height:i}})),a.left,a.left+a.width,t)},zB=(e,t)=>{var{yAxis:r,width:n,height:i,offset:a}=e;return Bb(tf(Te(Te(Te({},Yt),r),{},{ticks:zb(r),viewBox:{x:0,y:0,width:n,height:i}})),a.top,a.top+a.height,t)},WB={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:Ce.grid};function f1(e){var t=qu(),r=Gu(),n=Qb(),i=Te(Te({},Se(e,WB)),{},{x:U(e.x)?e.x:n.left,y:U(e.y)?e.y:n.top,width:U(e.width)?e.width:n.width,height:U(e.height)?e.height:n.height}),{xAxisId:a,yAxisId:o,x:s,y:c,width:l,height:u,syncWithTicks:d,horizontalValues:f,verticalValues:h}=i,g=Me(),v=B(I=>em(I,"xAxis",a,g)),y=B(I=>em(I,"yAxis",o,g));if(!Mt(l)||!Mt(u)||!U(s)||!U(c))return null;var b=i.verticalCoordinatesGenerator||BB,S=i.horizontalCoordinatesGenerator||zB,{horizontalPoints:w,verticalPoints:_}=i;if((!w||!w.length)&&typeof S=="function"){var x=f&&f.length,O=S({yAxis:y?Te(Te({},y),{},{ticks:x?f:y.ticks}):void 0,width:t??l,height:r??u,offset:n},x?!0:d);to(Array.isArray(O),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof O,"]")),Array.isArray(O)&&(w=O)}if((!_||!_.length)&&typeof b=="function"){var P=h&&h.length,k=b({xAxis:v?Te(Te({},v),{},{ticks:P?h:v.ticks}):void 0,width:t??l,height:r??u,offset:n},P?!0:d);to(Array.isArray(k),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof k,"]")),Array.isArray(k)&&(_=k)}return m.createElement(Ft,{zIndex:i.zIndex},m.createElement("g",{className:"recharts-cartesian-grid"},m.createElement(RB,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),m.createElement(FB,Wr({},i,{horizontalPoints:w})),m.createElement(UB,Wr({},i,{verticalPoints:_})),m.createElement($B,Wr({},i,{offset:n,horizontalPoints:w,xAxis:v,yAxis:y})),m.createElement(LB,Wr({},i,{offset:n,verticalPoints:_,xAxis:v,yAxis:y}))))}
2125f1.displayName="CartesianGrid";var h1=(e,t,r,n)=>Ls(e,"xAxis",t,n),p1=(e,t,r,n)=>$s(e,"xAxis",t,n),m1=(e,t,r,n)=>Ls(e,"yAxis",r,n),g1=(e,t,r,n)=>$s(e,"yAxis",r,n),HB=E([Z,h1,m1,p1,g1],(e,t,r,n,i)=>Lt(e,"xAxis")?En(t,n,!1):En(r,i,!1)),KB=(e,t,r,n,i)=>i;function VB(e){return e.type==="line"}var qB=E([Cd,KB],(e,t)=>e.filter(VB).find(r=>r.id===t)),GB=E([Z,h1,m1,p1,g1,qB,HB,Es],(e,t,r,n,i,a,o,s)=>{var{chartData:c,dataStartIndex:l,dataEndIndex:u}=s;if(!(a==null||t==null||r==null||n==null||i==null||n.length===0||i.length===0||o==null||e!=="horizontal"&&e!=="vertical")){var{dataKey:d,data:f}=a,h;if(f!=null&&f.length>0?h=f:h=c==null?void 0:c.slice(l,u+1),h!=null)return pz({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataKey:d,bandSize:o,displayedData:h})}});function y1(e){var t=Ho(e),r=3,n=2;if(t!=null){var{r:i,strokeWidth:a}=t,o=Number(i),s=Number(a);return(Number.isNaN(o)||o<0)&&(o=r),(Number.isNaN(s)||s<0)&&(s=n),{r:o,strokeWidth:s}}return{r,strokeWidth:n}}var YB=["id"],JB=["type","layout","connectNulls","needClip","shape"],XB=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function ki(){return ki=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ki.apply(null,arguments)}function Wm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ot(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wm(Object(r),!0).forEach(function(n){ZB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ZB(e,t,r){return(t=QB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function QB(e){var t=ez(e,"string");return typeof t=="symbol"?t:t+""}function ez(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nf(e,t){if(e==null)return{};var r,n,i=tz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function tz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var rz=e=>{var{dataKey:t,name:r,stroke:n,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:n,value:ls(r,t),payload:e}]},nz=m.memo(e=>{var{dataKey:t,data:r,stroke:n,strokeWidth:i,fill:a,name:o,hide:s,unit:c,tooltipType:l}=e,u={dataDefinedOnItem:r,positions:void 0,settings:{stroke:n,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:ls(o,t),hide:s,type:l,color:n,unit:c}};return m.createElement(Zx,{tooltipEntrySettings:u})}),v1=(e,t)=>"".concat(t,"px ").concat(e-t,"px");function iz(e,t){for(var r=e.length%2!==0?[...e,0]:e,n=[],i=0;i<t;++i)n=[...n,...r];return n}var az=(e,t,r)=>{var n=r.reduce((d,f)=>d+f);if(!n)return v1(t,e);for(var i=Math.floor(e/n),a=e%n,o=t-e,s=[],c=0,l=0;c<r.length;l+=r[c],++c)if(l+r[c]>a){s=[...r.slice(0,c),a-l];break}var u=s.length%2===0?[0,o]:[o];return[...iz(r,i),...s,...u].map(d=>"".concat(d,"px")).join(", ")};function oz(e){var{clipPathId:t,points:r,props:n}=e,{dot:i,dataKey:a,needClip:o}=n,{id:s}=n,c=nf(n,YB),l=lt(c);return m.createElement(i1,{points:r,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:a,baseProps:l,needClip:o,clipPathId:t})}function sz(e){var{showLabels:t,children:r,points:n}=e,i=m.useMemo(()=>n==null?void 0:n.map(a=>{var o,s,c={x:(o=a.x)!==null&&o!==void 0?o:0,y:(s=a.y)!==null&&s!==void 0?s:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Ot(Ot({},c),{},{value:a.value,payload:a.payload,viewBox:c,parentViewBox:void 0,fill:void 0})}),[n]);return m.createElement(Vx,{value:t?i:void 0},r)}function Hm(e){var{clipPathId:t,pathRef:r,points:n,strokeDasharray:i,props:a}=e,{type:o,layout:s,connectNulls:c,needClip:l,shape:u}=a,d=nf(a,JB),f=Ot(Ot({},Ne(d)),{},{fill:"none",className:"recharts-line-curve",clipPath:l?"url(#clipPath-".concat(t,")"):void 0,points:n,type:o,layout:s,connectNulls:c,strokeDasharray:i??a.strokeDasharray});return m.createElement(m.Fragment,null,(n==null?void 0:n.length)>1&&m.createElement(j5,ki({shapeType:"curve",option:u},f,{pathRef:r})),m.createElement(oz,{points:n,clipPathId:t,props:a}))}function cz(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function lz(e){var{clipPathId:t,props:r,pathRef:n,previousPointsRef:i,longestAnimatedLengthRef:a}=e,{points:o,strokeDasharray:s,isAnimationActive:c,animationBegin:l,animationDuration:u,animationEasing:d,animateNewValues:f,width:h,height:g,onAnimationEnd:v,onAnimationStart:y}=r,b=i.current,S=ws(o,"recharts-line-"),w=m.useRef(S),[_,x]=m.useState(!1),O=!_,P
2125=m.useCallback(()=>{typeof v=="function"&&v(),x(!1)},[v]),k=m.useCallback(()=>{typeof y=="function"&&y(),x(!0)},[y]),I=cz(n.current),D=m.useRef(0);w.current!==S&&(D.current=a.current,w.current=S);var T=D.current;return m.createElement(sz,{points:o,showLabels:O},r.children,m.createElement(bs,{animationId:S,begin:l,duration:u,isActive:c,easing:d,onAnimationEnd:P,onAnimationStart:k,key:S},C=>{var R=le(T,I+T,C),j=Math.min(R,I),$;if(c)if(s){var W="".concat(s).split(/[,\s]+/gim).map(F=>parseFloat(F));$=az(j,I,W)}else $=v1(I,j);else $=s==null?void 0:String(s);if(C>0&&I>0&&(i.current=o,a.current=Math.max(a.current,j)),b){var z=b.length/o.length,K=C===1?o:o.map((F,_e)=>{var Ve=Math.floor(_e*z);if(b[Ve]){var Ue=b[Ve];return Ot(Ot({},F),{},{x:le(Ue.x,F.x,C),y:le(Ue.y,F.y,C)})}return f?Ot(Ot({},F),{},{x:le(h*2,F.x,C),y:le(g/2,F.y,C)}):Ot(Ot({},F),{},{x:F.x,y:F.y})});return i.current=K,m.createElement(Hm,{props:r,points:K,clipPathId:t,pathRef:n,strokeDasharray:$})}return m.createElement(Hm,{props:r,points:o,clipPathId:t,pathRef:n,strokeDasharray:$})}),m.createElement(Gx,{label:r.label}))}function uz(e){var{clipPathId:t,props:r}=e,n=m.useRef(null),i=m.useRef(0),a=m.useRef(null);return m.createElement(lz,{props:r,clipPathId:t,previousPointsRef:n,longestAnimatedLengthRef:i,pathRef:a})}var dz=(e,t)=>{var r,n;return{x:(r=e.x)!==null&&r!==void 0?r:void 0,y:(n=e.y)!==null&&n!==void 0?n:void 0,value:e.value,errorVal:xe(e.payload,t)}};class fz extends m.Component{render(){var{hide:t,dot:r,points:n,className:i,xAxisId:a,yAxisId:o,top:s,left:c,width:l,height:u,id:d,needClip:f,zIndex:h}=this.props;if(t)return null;var g=J("recharts-line",i),v=d,{r:y,strokeWidth:b}=y1(r),S=Zd(r),w=y*2+b,_=f?"url(#clipPath-".concat(S?"":"dots-").concat(v,")"):void 0;return m.createElement(Ft,{zIndex:h},m.createElement(ut,{className:g},f&&m.createElement("defs",null,m.createElement(s1,{clipPathId:v,xAxisId:a,yAxisId:o}),!S&&m.createElement("clipPath",{id:"clipPath-dots-".concat(v)}
2125,m.createElement("rect",{x:c-w/2,y:s-w/2,width:l+w,height:u+w}))),m.createElement(PU,{xAxisId:a,yAxisId:o,data:n,dataPointFormatter:dz,errorBarOffset:0},m.createElement(uz,{props:this.props,clipPathId:v}))),m.createElement(jl,{activeDot:this.props.activeDot,points:n,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:_}))}}var b1={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:Ce.line,type:"linear"};function hz(e){var t=Se(e,b1),{activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:a,animationEasing:o,connectNulls:s,dot:c,hide:l,isAnimationActive:u,label:d,legendType:f,xAxisId:h,yAxisId:g,id:v}=t,y=nf(t,XB),{needClip:b}=Qd(h,g),S=Fs(),w=Dn(),_=Me(),x=B(D=>GB(D,h,g,_,v));if(w!=="horizontal"&&w!=="vertical"||x==null||S==null)return null;var{height:O,width:P,x:k,y:I}=S;return m.createElement(fz,ki({},y,{id:v,connectNulls:s,dot:c,activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:a,animationEasing:o,isAnimationActive:u,hide:l,label:d,legendType:f,xAxisId:h,yAxisId:g,points:x,layout:w,height:O,width:P,left:k,top:I,needClip:b}))}function pz(e){var{layout:t,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:a,dataKey:o,bandSize:s,displayedData:c}=e;return c.map((l,u)=>{var d=xe(l,o);if(t==="horizontal"){var f=eo({axis:r,ticks:i,bandSize:s,entry:l,index:u}),h=he(d)?null:n.scale(d);return{x:f,y:h,value:d,payload:l}}var g=he(d)?null:r.scale(d),v=eo({axis:n,ticks:a,bandSize:s,entry:l,index:u});return g==null||v==null?null:{x:g,y:v,value:d,payload:l}}).filter(Boolean)}function mz(e){var t=Se(e,b1),r=Me();return m.createElement(t1,{id:t.id,type:"line"},n=>m.createElement(m.Fragment,null,m.createElement(Qx,{legendPayload:rz(t)}),m.createElement(nz,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType}),m.createElement(n1,{type:"line",id:n,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:r}),m.createElement(hz,ki({},t,{id:n}))))}var w1=m.memo(mz,Us);w1.displayName="Line";var x1=(e,t,r,n)=>Ls(e,"xAxis",t,n),S1=(e,t,r,n)=>$s(e,"xAxis",t,n),P1=(e,t,r,n)=>Ls(e,"yAxis",r,n),_1=(e,t,r,n)=>$s(e,"yAxis",r,n),gz=E([Z,x1,P1,S1,_1],(e,t,r,n,i)=>Lt(e,"xAxis")?En(t,n,!1):En(r,i,!1)),yz=(e,t,r,n,i)=>i,O1=E([Cd,yz],(e,t)=>e.filter(r=>r.type==="area").find(r=>r.id===t)),vz=(e,t,r,n,i)=>{var a,o=O1(e,t,r,n,i);if(o!=null){var s=Z(e),c=Lt(s,"xAxis"),l;if(c?l=Ol(e,"yAxis",r,n):l=Ol(e,"xAxis",t,n),l!=null){var{stackId:u}=o,d=Id(o);if(!(u==null||d==null)){var f=(a=l[u])===null||a===void 0?void 0:a.stackedData;return f==null?void 0:f.find(h=>h.key===d)}}}},bz=E([Z,x1,P1,S1,_1,vz,Es,gz,O1,r6],(e,t,r,n,i,a,o,s,c,l)=>{var{chartData:u,dataStartIndex:d,dataEndIndex:f}=o;if(!(c==null||e!=="horizontal"&&e!=="vertical"||t==null||r==null||n==null||i==null||n.length===0||i.length===0||s==null)){var{data:h}=c,g;if(h&&h.length>0?g=h:g=u==null?void 0:u.slice(d,f+1),g!=null)return Lz({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataStartIndex:d,areaSettings:c,stackedData:a,displayedData:g,chartBaseValue:l,bandSize:s})}}),wz=["id"],xz=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function qr(){return qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qr.apply(null,arguments)}function A1(e,t){if(e==null)return{};var r,n,i=Sz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Sz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Km(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function hn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
2125t%2?Km(Object(r),!0).forEach(function(n){Pz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Km(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pz(e,t,r){return(t=_z(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _z(e){var t=Oz(e,"string");return typeof t=="symbol"?t:t+""}function Oz(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function To(e,t){return e&&e!=="none"?e:t}var Az=e=>{var{dataKey:t,name:r,stroke:n,fill:i,legendType:a,hide:o}=e;return[{inactive:o,dataKey:t,type:a,color:To(n,i),value:ls(r,t),payload:e}]},Ez=m.memo(e=>{var{dataKey:t,data:r,stroke:n,strokeWidth:i,fill:a,name:o,hide:s,unit:c,tooltipType:l}=e,u={dataDefinedOnItem:r,positions:void 0,settings:{stroke:n,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:ls(o,t),hide:s,type:l,color:To(n,a),unit:c}};return m.createElement(Zx,{tooltipEntrySettings:u})});function Iz(e){var{clipPathId:t,points:r,props:n}=e,{needClip:i,dot:a,dataKey:o}=n,s=lt(n);return m.createElement(i1,{points:r,dot:a,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:o,baseProps:s,needClip:i,clipPathId:t})}function kz(e){var{showLabels:t,children:r,points:n}=e,i=n.map(a=>{var o,s,c={x:(o=a.x)!==null&&o!==void 0?o:0,y:(s=a.y)!==null&&s!==void 0?s:0,width:0,lowerWidth:0,upperWidth:0,height:0};return hn(hn({},c),{},{value:a.value,payload:a.payload,parentViewBox:void 0,viewBox:c,fill:void 0})});return m.createElement(Vx,{value:t?i:void 0},r)}function Vm(e){var{points:t,baseLine:r,needClip:n,clipPathId:i,props:a}=e,{layout:o,type:s,stroke:c,connectNulls:l,isRange:u}=a,{id:d}=a,f=A1(a,wz),h=lt(f),g=Ne(f);return m.createElement(m.Fragment,null,(t==null?void 0:t.length)>1&&m.createElement(ut,{clipPath:n?"url(#clipPath-".concat(i,")"):void 0},m.createElement(ci,qr({},g,{id:d,points:t,connectNulls:l,type:s,baseLine:r,layout:o,stroke:"none",className:"recharts-area-area"})),c!=="none"&&m.createElement(ci,qr({},h,{className:"recharts-area-curve",layout:o,type:s,connectNulls:l,fill:"none",points:t})),c!=="none"&&u&&m.createElement(ci,qr({},h,{className:"recharts-area-curve",layout:o,type:s,connectNulls:l,fill:"none",points:r}))),m.createElement(Iz,{points:t,props:f,clipPathId:i}))}function Tz(e){var{alpha:t,baseLine:r,points:n,strokeWidth:i}=e,a=n[0].y,o=n[n.length-1].y;if(!oe(a)||!oe(o))return null;var s=t*Math.abs(a-o),c=Math.max(...n.map(l=>l.x||0));return U(r)?c=Math.max(r,c):r&&Array.isArray(r)&&r.length&&(c=Math.max(...r.map(l=>l.x||0),c)),U(c)?m.createElement("rect",{x:0,y:a<o?a:a-s,width:c+(i?parseInt("".concat(i),10):1),height:Math.floor(s)}):null}function Cz(e){var{alpha:t,baseLine:r,points:n,strokeWidth:i}=e,a=n[0].x,o=n[n.length-1].x;if(!oe(a)||!oe(o))return null;var s=t*Math.abs(a-o),c=Math.max(...n.map(l=>l.y||0));return U(r)?c=Math.max(r,c):r&&Array.isArray(r)&&r.length&&(c=Math.max(...r.map(l=>l.y||0),c)),U(c)?m.createElement("rect",{x:a<o?a:a-s,y:0,width:s,height:Math.floor(c+(i?parseInt("".concat(i),10):1))}):null}function Nz(e){var{alpha:t,layout:r,points:n,baseLine:i,strokeWidth:a}=e;return r==="vertical"?m.createElement(Tz,{alpha:t,points:n,baseLine:i,strokeWidth:a}):m.createElement(Cz,{alpha:t,points:n,baseLine:i,strokeWidth:a})}function jz(e){var{needClip:t,clipPathId:r,props:n,previousPointsRef:i,previousBaselineRef:a}=e,{points:o,baseLine:s,isAnimationActive:c,animationBegin:l,animationDuration:u,animationEasing:d,onAnimationStart:f,onAnimationEnd:h}=n,g=m.useMemo(()=>({points:o,baseLine:s}),[o,s]),v=ws(g,"recharts-area-"),y=bD(),[b,S]=m.useState(!1),w=!b,_=m.useCallback(()=>{typeof h=="function"&&h(),S(!1)},[h]),x=m.useCallback(()=>{typeof f=="function"&&f(),S(!0)},[f]);if(y==null)return null;var O=i.current,P=a.current;return m.createElement(kz,{showLabels:w,points:o},n.children,m.createElement(bs,{animationId:v,begin:l,duration:u,isActive:c,easing:d,onAnimationEnd:_,onAnimationStart:x,key:v},k=>{if(O){var I=O.length/o.length,D=k===1?o:o.map((C,R)=>{var j=Math.floor(R*I);if(O[j]){var $=O[j];return hn(hn({},C),{},{x:le($.x,C.x,k),y:le($.y,C.y,k)})}return C}),T;return U(s)?T=le(P,s,k):he(s)||xt(s)?T=le(P,0,k):T=s.map((C,R)=>{var j=Math.floor(R*I);if(Array.isArray(P)&&P[j]){var $=P[j];return hn(hn({},C),{},{x:le($.x,C.x,k),y:le($.y,C.y,k)})}return C}),k>0&&(i.current=D,a.current=T),m.createElement(Vm,{points:D,baseLine:T,needClip:t,clipPathId:r,props:n})}return k>0&&(i.current=o,a.current=s),m.createElement(ut,null,c&&m.createElement("defs",null,m.createElement("clipPath",{id:"animationClipPath-".concat(r)},m.createElement(Nz,{alpha:k,points:o,baseLine:s,layout:y,strokeWidth:n.strokeWidth}))),m.createElement(ut,{clipPath:"url(#animationClipPath-".concat(r,")")},m.createElement(Vm,{points:o,baseLine:s,needClip:t,clipPathId:r,props:n})))}),m.createElement(Gx,{label:n.label}))}function Mz(e){var{needClip:t,clipPathId:r,props:n}=e,i=m.useRef(null),a=m.useRef();return m.createElement(jz,{needClip:t,clipPathId:r,props:n,previousPointsRef:i,previousBaselineRef:a})}class Dz extends m.PureComponent{render(){var{hide:t,dot:r,points:n,className:i,top:a,left:o,needClip:s,xAxisId:c,yAxisId:l,width:u,height:d,id:f,baseLine:h,zIndex:g}=this.props;if(t)return null;var v=J("recharts-area",i),y=f,{r:b,strokeWidth:S}=y1(r),w=Zd(r),_=b*2+S,x=s?"url(#clipPath-".concat(w?"":"dots-").concat(y,")"):void 0;return m.createElement(Ft,{zIndex:g},m.createElement(ut,{className:v},s&&m.createElement("defs",null,m.createElement(s1,{clipPathId:y,xAxisId:c,yAxisId:l}),!w&&m.createElement("clipPath",{id:"clipPath-dots-".concat(y)}
2125,m.createElement("rect",{x:o-_/2,y:a-_/2,width:u+_,height:d+_}))),m.createElement(Mz,{needClip:s,clipPathId:y,props:this.props})),m.createElement(jl,{points:n,mainColor:To(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:x}),this.props.isRange&&Array.isArray(h)&&m.createElement(jl,{points:h,mainColor:To(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:x}))}}var E1={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,xAxisId:0,yAxisId:0,zIndex:Ce.area};function Rz(e){var t,r=Se(e,E1),{activeDot:n,animationBegin:i,animationDuration:a,animationEasing:o,connectNulls:s,dot:c,fill:l,fillOpacity:u,hide:d,isAnimationActive:f,legendType:h,stroke:g,xAxisId:v,yAxisId:y}=r,b=A1(r,xz),S=Dn(),w=Sx(),{needClip:_}=Qd(v,y),x=Me(),{points:O,isRange:P,baseLine:k}=(t=B(j=>bz(j,v,y,x,e.id)))!==null&&t!==void 0?t:{},I=Fs();if(S!=="horizontal"&&S!=="vertical"||I==null||w!=="AreaChart"&&w!=="ComposedChart")return null;var{height:D,width:T,x:C,y:R}=I;return!O||!O.length?null:m.createElement(Dz,qr({},b,{activeDot:n,animationBegin:i,animationDuration:a,animationEasing:o,baseLine:k,connectNulls:s,dot:c,fill:l,fillOpacity:u,height:D,hide:d,layout:S,isAnimationActive:f==="auto"?!Rn.isSsr:f,isRange:P,legendType:h,needClip:_,points:O,stroke:g,width:T,left:C,top:R,xAxisId:v,yAxisId:y}))}var $z=(e,t,r,n,i)=>{var a=r??t;if(U(a))return a;var o=e==="horizontal"?i:n,s=o.scale.domain();if(o.type==="number"){var c=Math.max(s[0],s[1]),l=Math.min(s[0],s[1]);return a==="dataMin"?l:a==="dataMax"||c<0?c:Math.max(Math.min(s[0],s[1]),0)}return a==="dataMin"?s[0]:a==="dataMax"?s[1]:s[0]};function Lz(e){var{areaSettings:{connectNulls:t,baseValue:r,dataKey:n},stackedData:i,layout:a,chartBaseValue:o,xAxis:s,yAxis:c,displayedData:l,dataStartIndex:u,xAxisTicks:d,yAxisTicks:f,bandSize:h}=e,g=i&&i.length,v=$z(a,o,r,s,c),y=a==="horizontal",b=!1,S=l.map((_,x)=>{var O;g?O=i[u+x]:(O=xe(_,n),Array.isArray(O)?b=!0:O=[v,O]);var P=O[1]==null||g&&!t&&xe(_,n)==null;return y?{x:eo({axis:s,ticks:d,bandSize:h,entry:_,index:x}),y:P?null:c.scale(O[1]),value:O,payload:_}:{x:P?null:s.scale(O[1]),y:eo({axis:c,ticks:f,bandSize:h,entry:_,index:x}),value:O,payload:_}}),w;return g||b?w=S.map(_=>{var x=Array.isArray(_.value)?_.value[0]:null;return y?{x:_.x,y:x!=null&&_.y!=null?c.scale(x):null,payload:_.payload}:{x:x!=null?s.scale(x):null,y:_.y,payload:_.payload}}):w=y?c.scale(v):s.scale(v),{points:S,baseLine:w,isRange:b}}function Fz(e){var t=Se(e,E1),r=Me();return m.createElement(t1,{id:t.id,type:"area"},n=>m.createElement(m.Fragment,null,m.createElement(Qx,{legendPayload:Az(t)}),m.createElement(Ez,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType}),m.createElement(n1,{type:"area",id:n,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:FM(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:r,connectNulls:t.connectNulls}),m.createElement(Rz,qr({},t,{id:n}))))}var af=m.memo(Fz,Us);af.displayName="Area";var Uz=["domain","range"],Bz=["domain","range"];function qm(e,t){if(e==null)return{};var r,n,i=zz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function zz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Gm(e,t){return e===t?!0:Array.isArray(e)&&e.length===2&&Array.isArray(t)&&t.length===2?e[0]===t[0]&&e[1]===t[1]:!1}function I1(e,t){if(e===t)return!0;var{domain:r,range:n}=e,i=qm(e,Uz),{domain:a,range:o}=t,s=qm(t,Bz);return!Gm(r,a)||!Gm(n,o)?!1:Us(i,s)}var Wz=["dangerouslySetInnerHTML","ticks"],Hz=["id"];function Ml(){return Ml=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}
2125).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ml.apply(null,arguments)}function Ym(e,t){if(e==null)return{};var r,n,i=Kz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Kz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Vz(e){var t=de(),r=m.useRef(null);return m.useLayoutEffect(()=>{r.current===null?t(tU(e)):r.current!==e&&t(rU({prev:r.current,next:e})),r.current=e},[e,t]),m.useLayoutEffect(()=>()=>{r.current&&(t(nU(r.current)),r.current=null)},[t]),null}var qz=e=>{var{xAxisId:t,className:r}=e,n=B(Hb),i=Me(),a="xAxis",o=B(y=>zn(y,a,t,i)),s=B(y=>tx(y,a,t,i)),c=B(y=>G6(y,t)),l=B(y=>eF(y,t)),u=B(y=>Sw(y,t));if(c==null||l==null||u==null)return null;var{dangerouslySetInnerHTML:d,ticks:f}=e,h=Ym(e,Wz),{id:g}=u,v=Ym(u,Hz);return m.createElement(rf,Ml({},h,v,{scale:o,x:l.x,y:l.y,width:c.width,height:c.height,className:J("recharts-".concat(a," ").concat(a),r),viewBox:n,ticks:s,axisType:a}))},Gz={allowDataOverflow:ve.allowDataOverflow,allowDecimals:ve.allowDecimals,allowDuplicatedCategory:ve.allowDuplicatedCategory,angle:ve.angle,axisLine:Yt.axisLine,height:ve.height,hide:!1,includeHidden:ve.includeHidden,interval:ve.interval,minTickGap:ve.minTickGap,mirror:ve.mirror,orientation:ve.orientation,padding:ve.padding,reversed:ve.reversed,scale:ve.scale,tick:ve.tick,tickCount:ve.tickCount,tickLine:Yt.tickLine,tickSize:Yt.tickSize,type:ve.type,xAxisId:0},Yz=e=>{var t=Se(e,Gz);return m.createElement(m.Fragment,null,m.createElement(Vz,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit}),m.createElement(qz,t))},k1=m.memo(Yz,I1);k1.displayName="XAxis";var Jz=["dangerouslySetInnerHTML","ticks"],Xz=["id"];function Dl(){return Dl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Dl.apply(null,arguments)}function Jm(e,t){if(e==null)return{};var r,n,i=Zz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Zz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Qz(e){var t=de(),r=m.useRef(null);return m.useLayoutEffect(()=>{r.current===null?t(iU(e)):r.current!==e&&t(aU({prev:r.current,next:e})),r.current=e},[e,t]),m.useLayoutEffect(()=>()=>{r.current&&(t(oU(r.current)),r.current=null)},[t]),null}var eW=e=>{var{yAxisId:t,className:r,width:n,label:i}=e,a=m.useRef(null),o=m.useRef(null),s=B(Hb),c=Me(),l=de(),u="yAxis",d=B(x=>zn(x,u,t,c)),f=B(x=>nF(x,t)),h=B(x=>rF(x,t)),g=B(x=>tx(x,u,t,c)),v=B(x=>Pw(x,t));if(m.useLayoutEffect(()=>{if(!(n!=="auto"||!f||Xd(i)||m.isValidElement(i)||v==null)){var x=a.current;if(x){var O=x.getCalculatedWidth();Math.round(f.width)!==Math.round(O)&&l(sU({id:t,width:O}))}}},[g,f,l,i,t,n,v]),f==null||h==null||v==null)return null;var{dangerouslySetInnerHTML:y,ticks:b}=e,S=Jm(e,Jz),{id:w}=v,_=Jm(v,Xz);return m.createElement(rf,Dl({},S,_,{ref:a,labelRef:o,scale:d,x:h.x,y:h.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:f.width,height:f.height,className:J("recharts-".concat(u," ").concat(u),r),viewBox:s,ticks:g,axisType:u}))},tW={allowDataOverflow:be.allowDataOverflow,allowDecimals:be.allowDecimals,allowDuplicatedCategory:be.allowDuplicatedCategory,angle:be.angle,axisLine:Yt.axisLine,hide:!1,includeHidden:be.includeHidden,interval:be.interval,minTickGap:be.minTickGap,mirror:be.mirror,orientation:be.orientation,padding:be.padding,reversed:be.reversed,scale:be.scale,tick:be.tick,tickCount:be.tickCount,tickLine:Yt.tickLine,tickSize:Yt.tickSize,type:be.type,width:be.width,yAxisId:0},rW=e=>{var t=Se(e,tW);return m.createElement(m.Fragment,null,m.createElement(Qz,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter}),m.createElement(eW,t))},Rl=m.memo(rW,I1);Rl.displayName="YAxis";var nW=(e,t)=>
2125t,of=E([nW,Z,ww,ge,gx,fr,y3,Ee],_3),sf=e=>{var t=e.currentTarget.getBoundingClientRect(),r=t.width/e.currentTarget.offsetWidth,n=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/r),chartY:Math.round((e.clientY-t.top)/n)}},T1=dt("mouseClick"),C1=Ui();C1.startListening({actionCreator:T1,effect:(e,t)=>{var r=e.payload,n=of(t.getState(),sf(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(gF({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var $l=dt("mouseMove"),N1=Ui(),xa=null;N1.startListening({actionCreator:$l,effect:(e,t)=>{var r=e.payload;xa!==null&&cancelAnimationFrame(xa);var n=sf(r);xa=requestAnimationFrame(()=>{var i=t.getState(),a=Ud(i,i.tooltip.settings.shared);if(a==="axis"){var o=of(i,n);(o==null?void 0:o.activeIndex)!=null?t.dispatch(cx({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate})):t.dispatch(sx())}xa=null})}});var Xm={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},j1=Ke({name:"rootProps",initialState:Xm,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:Xm.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),iW=j1.reducer,{updateOptions:aW}=j1.actions,M1=Ke({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:nH}=M1.actions,oW=M1.reducer,D1=dt("keyDown"),R1=dt("focus"),cf=Ui();cf.startListening({actionCreator:D1,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip,a=e.payload;if(!(a!=="ArrowRight"&&a!=="ArrowLeft"&&a!=="Enter")){var o=Bd(i,Hn(r),Yi(r),ea(r)),s=o==null?-1:Number(o);if(!(!Number.isFinite(s)||s<0)){var c=fr(r);if(a==="Enter"){var l=Po(r,"axis","hover",String(i.index));t.dispatch(El({active:!i.active,activeIndex:i.index,activeDataKey:i.dataKey,activeCoordinate:l}));return}var u=sF(r),d=u==="left-to-right"?1:-1,f=a==="ArrowRight"?1:-1,h=s+f*d;if(!(c==null||h>=c.length||h<0)){var g=Po(r,"axis","hover",String(h));t.dispatch(El({active:!0,activeIndex:h.toString(),activeDataKey:void 0,activeCoordinate:g}))}}}}}});cf.startListening({actionCreator:R1,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;if(!i.active&&i.index==null){var a="0",o=Po(r,"axis","hover",String(a));t.dispatch(El({activeDataKey:void 0,active:!0,activeIndex:a,activeCoordinate:o}))}}}});var it=dt("externalEvent"),$1=Ui(),Ic=new Map;$1.startListening({actionCreator:it,effect:(e,t)=>{var{handler:r,reactEvent:n}=e.payload;if(r!=null){n.persist();var i=n.type,a=Ic.get(i);a!==void 0&&cancelAnimationFrame(a);var o=requestAnimationFrame(()=>{try{var s=t.getState(),c={activeCoordinate:r3(s),activeDataKey:e3(s),activeIndex:Ei(s),activeLabel:bx(s),activeTooltipIndex:Ei(s),isTooltipActive:n3(s)};r(c,n)}finally{Ic.delete(i)}});Ic.set(i,o)}}});var sW=E([Wn],e=>e.tooltipItemPayloads),cW=E([sW,Zi,(e,t,r)=>t,(e,t,r)=>r],(e,t,r,n)=>{var i=e.find(s=>s.settings.dataKey===n);if(i!=null){var{positions:a}=i;if(a!=null){var o=t(a,r);return o}}}),L1=dt("touchMove"),F1=Ui();F1.startListening({actionCreator:L1,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){var n=t.getState(),i=Ud(n,n.tooltip.settings.shared);if(i==="axis"){var a=of(n,sf({clientX:r.touches[0].clientX,clientY:r.touches[0].clientY,currentTarget:r.currentTarget}));(a==null?void 0:a.activeIndex)!=null&&t.dispatch(cx({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate}))}else if(i==="item"){var o,s=r.touches[0];if(document.elementFromPoint==null)return;var c=document.elementFromPoint(s.clientX,s.clientY);if(!c||!c.getAttribute)return;var l=c.getAttribute(VM),u=(o=c.getAttribute(qM))!==null&&o!==void 0?o:void 0,d=cW(t.getState(),l,u);t.dispatch(mF({activeDataKey:u,activeIndex:l,activeCoordinate:d}))}}}});var lW=fb({brush:YU,cartesianAxis:cU,chartData:e4,errorBars:yU,graphicalItems:B5,layout:kM,legend:$D,options:Y3,polarAxis:g5,polarOptions:oW,referenceElements:rB,rootProps:iW,tooltip:yF,zIndex:L3}),uW=function(t){return eM({reducer:lW,preloadedState:t,middleware:r=>{var n;return r({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((n="es6")!==null&&n!==void 0?n:"")}).concat([C1.middleware,N1.middleware,cf.middleware,$1.middleware,F1.middleware])},enhancers:r=>{var n=r;return typeof r=="function"&&(n=r()),n.concat(Eb({type:"raf"}))},devTools:Rn.devToolsEnabled})};function dW(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,i=Me(),a=m.useRef(null);if(i)return r;a.current==null&&(a.current=uW(t));var o=Du;return m.createElement(KU,{context:o,store:a.current},r)}function fW(e){var{layout:t,margin:r}=e,n=de(),i=Me();return m.useEffect(()=>{i||(n(AM(t)),n(OM(r)))},[n,i,t,r]),null}var hW=m.memo(fW,Us);function pW(e){var t=de();return m.useEffect(()=>{t(aW(e))},[t,e]),null}function Zm(e){var{zIndex:t,isPanorama:r}=e,n=r?"recharts-zindex-panorama-":"recharts-zindex-",i=e1("".concat(n).concat(t)),a=de();return m.useLayoutEffect(()=>(a(R3({zIndex:t,elementId:i,isPanorama:r})),()=>{a($3({zIndex:t,isPanorama:r}))}),[a,t,i,r]),m.createElement("g",{tabIndex:-1,id:i})}function Qm(e){var{children:t,isPanorama:r}=e,n=B(A3);if(!n||n.length===0)return t;var i=n.filter(o=>o<0),a=n.filter(o=>o>0);return m.createElement(m.Fragment,null,i.map(o=>m.createElement(Zm,{key:o,zIndex:o,isPanorama:r})),t,a.map(o=>m.createElement(Zm,{key:o,zIndex:o,isPanorama:r})))}var mW=["children"];function gW(e,t){if(e==null)return{};var r,n,i=yW(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function yW(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Co(){return Co=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}
2125).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Co.apply(null,arguments)}var vW={width:"100%",height:"100%",display:"block"},bW=m.forwardRef((e,t)=>{var r=qu(),n=Gu(),i=s0();if(!Mt(r)||!Mt(n))return null;var{children:a,otherAttributes:o,title:s,desc:c}=e,l,u;return o!=null&&(typeof o.tabIndex=="number"?l=o.tabIndex:l=i?0:void 0,typeof o.role=="string"?u=o.role:u=i?"application":void 0),m.createElement(bu,Co({},o,{title:s,desc:c,role:u,tabIndex:l,width:r,height:n,style:vW,ref:t}),a)}),wW=e=>{var{children:t}=e,r=B(hs);if(!r)return null;var{width:n,height:i,y:a,x:o}=r;return m.createElement(bu,{width:n,height:i,x:o,y:a},t)},eg=m.forwardRef((e,t)=>{var{children:r}=e,n=gW(e,mW),i=Me();return i?m.createElement(wW,null,m.createElement(Qm,{isPanorama:!0},r)):m.createElement(bW,Co({ref:t},n),m.createElement(Qm,{isPanorama:!1},r))});function xW(){var e=de(),[t,r]=m.useState(null),n=B(KM);return m.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),a=i.width/t.offsetWidth;oe(a)&&a!==n&&e(IM(a))}},[t,e,n]),r}function tg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function SW(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tg(Object(r),!0).forEach(function(n){PW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function PW(e,t,r){return(t=_W(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _W(e){var t=OW(e,"string");return typeof t=="symbol"?t:t+""}function OW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tn(){return tn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tn.apply(null,arguments)}var AW=()=>(l4(),null);function No(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var EW=m.forwardRef((e,t)=>{var r,n,i=m.useRef(null),[a,o]=m.useState({containerWidth:No((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:No((n=e.style)===null||n===void 0?void 0:n.height)}),s=m.useCallback((l,u)=>{o(d=>{var f=Math.round(l),h=Math.round(u);return d.containerWidth===f&&d.containerHeight===h?d:{containerWidth:f,containerHeight:h}})},[]),c=m.useCallback(l=>{if(typeof t=="function"&&t(l),l!=null&&typeof ResizeObserver<"u"){var{width:u,height:d}=l.getBoundingClientRect();s(u,d);var f=g=>{var{width:v,height:y}=g[0].contentRect;s(v,y)},h=new ResizeObserver(f);h.observe(l),i.current=h}},[t,s]);return m.useEffect(()=>()=>{var l=i.current;l!=null&&l.disconnect()},[s]),m.createElement(m.Fragment,null,m.createElement(ms,{width:a.containerWidth,height:a.containerHeight}),m.createElement("div",tn({ref:c},e)))}),IW=m.forwardRef((e,t)=>{var{width:r,height:n}=e,[i,a]=m.useState({containerWidth:No(r),containerHeight:No(n)}),o=m.useCallback((c,l)=>{a(u=>{var d=Math.round(c),f=Math.round(l);return u.containerWidth===d&&u.containerHeight===f?u:{containerWidth:d,containerHeight:f}})},[]),s=m.useCallback(c=>{if(typeof t=="function"&&t(c),c!=null){var{width:l,height:u}=c.getBoundingClientRect();o(l,u)}},[t,o]);return m.createElement(m.Fragment,null,m.createElement(ms,{width:i.containerWidth,height:i.containerHeight}),m.createElement("div",tn({ref:s},e)))}),kW=m.forwardRef((e,t)=>{var{width:r,height:n}=e;return m.createElement(m.Fragment,null,m.createElement(ms,{width:r,height:n}),m.createElement("div",tn({ref:t},e)))}),TW=m.forwardRef((e,t)=>{var{width:r,height:n}=e;return Qt(r)||Qt(n)?m.createElement(IW,tn({},e,{ref:t})):m.createElement(kW,tn({},e,{ref:t}))});function CW(e){return e===!0?EW:TW}var NW=m.forwardRef((e,t)=>
2125{var{children:r,className:n,height:i,onClick:a,onContextMenu:o,onDoubleClick:s,onMouseDown:c,onMouseEnter:l,onMouseLeave:u,onMouseMove:d,onMouseUp:f,onTouchEnd:h,onTouchMove:g,onTouchStart:v,style:y,width:b,responsive:S,dispatchTouchEvents:w=!0}=e,_=m.useRef(null),x=de(),[O,P]=m.useState(null),[k,I]=m.useState(null),D=xW(),T=Vu(),C=(T==null?void 0:T.width)>0?T.width:b,R=(T==null?void 0:T.height)>0?T.height:i,j=m.useCallback(N=>{D(N),typeof t=="function"&&t(N),P(N),I(N),N!=null&&(_.current=N)},[D,t,P,I]),$=m.useCallback(N=>{x(T1(N)),x(it({handler:a,reactEvent:N}))},[x,a]),W=m.useCallback(N=>{x($l(N)),x(it({handler:l,reactEvent:N}))},[x,l]),z=m.useCallback(N=>{x(sx()),x(it({handler:u,reactEvent:N}))},[x,u]),K=m.useCallback(N=>{x($l(N)),x(it({handler:d,reactEvent:N}))},[x,d]),F=m.useCallback(()=>{x(R1())},[x]),_e=m.useCallback(N=>{x(D1(N.key))},[x]),Ve=m.useCallback(N=>{x(it({handler:o,reactEvent:N}))},[x,o]),Ue=m.useCallback(N=>{x(it({handler:s,reactEvent:N}))},[x,s]),Ut=m.useCallback(N=>{x(it({handler:c,reactEvent:N}))},[x,c]),tt=m.useCallback(N=>{x(it({handler:f,reactEvent:N}))},[x,f]),Mr=m.useCallback(N=>{x(it({handler:v,reactEvent:N}))},[x,v]),Kn=m.useCallback(N=>{w&&x(L1(N)),x(it({handler:g,reactEvent:N}))},[x,w,g]),Be=m.useCallback(N=>{x(it({handler:h,reactEvent:N}))},[x,h]),Bs=CW(S);return m.createElement(Ex.Provider,{value:O},m.createElement(dv.Provider,{value:k},m.createElement(Bs,{width:C??(y==null?void 0:y.width),height:R??(y==null?void 0:y.height),className:J("recharts-wrapper",n),style:SW({position:"relative",cursor:"default",width:C,height:R},y),onClick:$,onContextMenu:Ve,onDoubleClick:Ue,onFocus:F,onKeyDown:_e,onMouseDown:Ut,onMouseEnter:W,onMouseLeave:z,onMouseMove:K,onMouseUp:tt,onTouchEnd:Be,onTouchMove:Kn,onTouchStart:Mr,ref:j},m.createElement(AW,null),r)))}),jW=["width","height","responsive","children","className","style","compact","title","desc"];function MW(e,t){if(e==null)return{};var r,n,i=DW(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function DW(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var RW=m.forwardRef((e,t)=>{var{width:r,height:n,responsive:i,children:a,className:o,style:s,compact:c,title:l,desc:u}=e,d=MW(e,jW),f=lt(d);return c?m.createElement(m.Fragment,null,m.createElement(ms,{width:r,height:n}),m.createElement(eg,{otherAttributes:f,title:l,desc:u},a)):m.createElement(NW,{className:o,style:s,width:r,height:n,responsive:i??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},m.createElement(eg,{otherAttributes:f,title:l,desc:u,ref:t},m.createElement(iB,null,a)))});function Ll(){return Ll=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ll.apply(null,arguments)}var $W={top:5,right:5,bottom:5,left:5},LW={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:$W,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},U1=m.forwardRef(function(t,r){var n,i=Se(t.categoricalChartProps,LW),{chartName:a,defaultTooltipEventType:o,validateTooltipEventTypes:s,tooltipPayloadSearcher:c,categoricalChartProps:l}=t,u={chartName:a,defaultTooltipEventType:o,validateTooltipEventTypes:s,tooltipPayloadSearcher:c,eventEmitter:void 0};return m.createElement(dW,{preloadedState:{options:u},reduxStoreName:(n=l.id)!==null&&n!==void 0?n:a},m.createElement(GU,{chartData:l.data}),m.createElement(hW,{layout:i.layout,margin:i.margin}),m.createElement(pW,{baseValue:i.baseValue,accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className,reverseStackOrder:i.reverseStackOrder}),m.createElement(RW,Ll({},i,{ref:r})))}),FW=["axis"],iH=m.forwardRef((e,t)=>
2125m.createElement(U1,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:FW,tooltipPayloadSearcher:kx,categoricalChartProps:e,ref:t})),UW=["axis"],B1=m.forwardRef((e,t)=>m.createElement(U1,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:UW,tooltipPayloadSearcher:kx,categoricalChartProps:e,ref:t}));function BW(e){const[t,r]=m.useState(()=>{if(typeof window>"u")return!1;try{return window.matchMedia(e).matches}catch{return!1}});return m.useEffect(()=>{if(typeof window>"u")return;const n=window.matchMedia(e);r(n.matches);const i=a=>{r(a.matches)};return n.addEventListener?(n.addEventListener("change",i),()=>n.removeEventListener("change",i)):(n.addListener(i),()=>n.removeListener(i))},[e]),t}function zW(e){return/^\d{4}$/.test(String(e))}function rg(e){const t=e/100;return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(t)}function WW(e){const t=e/100;return t>=1e3?`$${(t/1e3).toFixed(1)}k`:`$${t.toFixed(0)}`}function ng({data:e,dataKey:t,stroke:r,fill:n}){return p.jsx(Xb,{width:"100%",height:44,children:p.jsxs(B1,{data:e,margin:{top:6,right:2,left:2,bottom:0},children:[p.jsx("defs",{children:n&&p.jsxs("linearGradient",{id:`spark-${t}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[p.jsx("stop",{offset:"5%",stopColor:n,stopOpacity:.25}),p.jsx("stop",{offset:"95%",stopColor:n,stopOpacity:0})]})}),p.jsx(af,{type:"monotone",dataKey:t,stroke:r,strokeWidth:2,fill:n?`url(#spark-${t})`:"transparent",dot:!1,isAnimationActive:!1})]})})}function HW({chartData:e,chartRange:t,onRangeChange:r,hasData:n,availableYears:i=[]}){const a=BW("(max-width: 639px)"),[o,s]=m.useState("both"),[c,l]=m.useState(!1),[u,d]=m.useState(!1),f=new Date().getFullYear(),h=[{id:"7d",label:"7 days"},{id:"30d",label:"30 days"},{id:"90d",label:"90 days"},{id:String(f),label:String(f)},...i.filter(P=>P!==f).slice(0,4).map(P=>({id:String(P),label:String(P)}))],g=m.useMemo(()=>{const P=[{id:"7d",label:"7 days"},{id:"30d",label:"30 days"},{id:"90d",label:"90 days"}],k=String(t);return!P.some(I=>I.id===k)&&zW(t)&&P.push({id:k,label:k}),P},[t]),v=m.useMemo(()=>{const P=[{id:String(f),label:String(f)},...i.filter(I=>I!==f).slice(0,6).map(I=>({id:String(I),label:String(I)}))],k=new Set;return P.filter(I=>k.has(I.id)?!1:(k.add(I.id),!0))},[i,f]),y=P=>P==="7d"?"Last 7 days":P==="30d"?"Last 30 days":P==="90d"?"Last 90 days":/^\d{4}$/.test(P)?P:"Custom range",b=o==="both"||o==="fans",S=o==="both"||o==="revenue",w=m.useMemo(()=>{const P=e.reduce((I,D)=>I+(D.fans||0),0),k=e.reduce((I,D)=>I+Math.round((D.revenue||0)*100),0);return{totalFans:P,totalRevenueCents:k}},[e]),_=P=>{s(P),d(!1),l(!0)},x=()=>{l(!1),d(!1)},O=p.jsx(p.Fragment,{children:n?p.jsx(Xb,{width:"100%",height:320,children:p.jsxs(B1,{data:e,margin:{top:10,right:30,left:0,bottom:0},children:[p.jsxs("defs",{children:[p.jsxs("linearGradient",{id:"colorFans",x1:"0",y1:"0",x2:"0",y2:"1",children:[p.jsx("stop",{offset:"5%",stopColor:"#6d60ff",stopOpacity:.3}),p.jsx("stop",{offset:"95%",stopColor:"#6d60ff",stopOpacity:0})]}),p.jsxs("linearGradient",{id:"colorRevenue",x1:"0",y1:"0",x2:"0",y2:"1",children:[p.jsx("stop",{offset:"5%",stopColor:"#de33ae",stopOpacity:.3}),p.jsx("stop",{offset:"95%",stopColor:"#de33ae",stopOpacity:0})]})]}),p.jsx(f1,{strokeDasharray:"3 3",stroke:"#ffffff10"}),p.jsx(k1,{dataKey:"date",stroke:"#666666",tick:{fill:"#999999",fontSize:12},tickMargin:10}),b&&p.jsx(Rl,{yAxisId:"left",stroke:"#6d60ff",tick:{fill:"#999999",fontSize:12},tickMargin:10}),S&&p.jsx(Rl,{yAxisId:b?"right":"left",orientation:b?"right":"left",stroke:"#de33ae",tick:{fill:"#999999",fontSize:12},tickFormatter:P=>WW(P*100),tickMargin:10}),p.jsx(y4,{contentStyle:{backgroundColor:"#000000",border:"1px solid #ffffff20",borderRadius:"8px",padding:"12px"},labelStyle:{color:"#ffffff",fontWeight:"bold",marginBottom:"8px"},itemStyle:{color:"#cccccc"},formatter:(P,k)=>k==="revenue"?[rg(P*100),"Revenue"]:[P,"New Fans"]}),b&&p.jsx(af,{yAxisId:"left",type:"monotone",dataKey:"fans",stroke:"#6d60ff",strokeWidth:2,fillOpacity:1,fill:"url(#colorFans)"}),S&&p.jsx(w1,{yAxisId:b?"right":"left",type:"monotone",dataKey:"revenue",stroke:"#de33ae",strokeWidth:2,dot:{fill:"#de33ae",r:3},activeDot:{r:5}})]})}):p.jsx("div",{className:"flex items-center justify-center h-[320px] text-gray-500",children:p.jsxs("div",{className:"text-center",children:[p.jsx("p",{className:"text-lg mb-2",children:"📊"}),p.jsx("p",{children:"We'll show fan and revenue trends here once you start getting data."})]})})});return p.jsxs("div",{className:"bg-[#161616] border border-white/5 rounded-2xl p-6 shadow-lg mb-6",children:[p.jsx("div",{className:"flex flex-col gap-4 mb-6",children:p.jsxs("div",{className:"flex items-start justify-between gap-4",children:[p.jsxs("div",{children:[p.jsx("h2",{className:"text-lg font-semibold text-white mb-1",children:"Fans & Revenue"}),p.jsxs("p",{className:"text-sm text-gray-400",children:["Daily metrics · ",y(t)]})]}),p.jsxs("div",{className:`flex flex-col gap-2 items-end ${a?"hidden":""}`,children:[p.jsxs("div",{className:"flex items-center gap-2 bg-black/40 border border-white/10 rounded-lg p-1",children:[p.jsx("button",{onClick:()=>s("both"),className:`px-3 py-1.5 rounded text-xs font-medium transition-colors ${o==="both"?"bg-purple-600 text-white":"text-gray-400 hover:text-gray-300"}`,children:"Both"}),p.jsxs("button",{onClick:()=>s("fans"),className:`px-3 py-1.5 rounded text-xs font-medium transition-colors flex items-center gap-1.5 ${o==="fans"?"bg-[#6d60ff] text-white":"text-gray-400 hover:text-gray-300"}`,children:[p.jsx("div",{className:"w-2 h-2 rounded-full bg-current"}),"Fans"]}),p.jsxs("button",{onClick:()=>s("revenue"),className:`px-3 py-1.5 rounded text-xs font-medium transition-colors flex items-center gap-1.5 ${o==="revenue"?"bg-[#de33ae] text-white":"text-gray-400 hover:text-gray-300"}`,children:[p.jsx("div",{className:"w-2 h-2 rounded-full bg-current"}),"Revenue"]})]}),p.jsx("div",{className:"flex items-center gap-2 bg-black/40 border border-white/10 rounded-lg p-1 flex-wrap",children:h.map(P=>p.jsx("button",{type:"button",onClick:()=>r(P.id),className:`px-3 py-1.5 rounded text-xs font-medium transition-colors whitespace-nowrap ${t===P.id?"bg-purple-600 text-white":"text-gray-400 hover:text-gray-300"}`,children:P.label},P.id))})]})]})}),a?p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"grid grid-cols-1 gap-3",children:[p.jsxs("button",{type:"button",onClick:()=>_("fans"),className:"text-left bg-black/40 border border-white/10 rounded-xl p-4 active:opacity-90 transition-opacity",children:[p.jsxs("div",{className:"flex items-start justify-between gap-4 mb-2",children:[p.jsxs("div",{children:[p.jsx("p",{className:"text-sm text-gray-400",children:"Fans"}),p.jsx("p",{className:"text-2xl font-bold text-white",children:w.totalFans.toLocaleStr
2125ing()}),p.jsxs("p",{className:"text-xs text-gray-500 mt-0.5",children:[y(t),n?"":" · No data yet"]})]}),p.jsxs("div",{className:"flex items-center gap-1 text-xs text-gray-400 mt-1",children:[p.jsx("span",{className:"w-2 h-2 rounded-full bg-[#6d60ff]"}),p.jsx("span",{children:"Tap to expand"})]})]}),p.jsx(ng,{data:e,dataKey:"fans",stroke:"#6d60ff",fill:"#6d60ff"})]}),p.jsxs("button",{type:"button",onClick:()=>_("revenue"),className:"text-left bg-black/40 border border-white/10 rounded-xl p-4 active:opacity-90 transition-opacity",children:[p.jsxs("div",{className:"flex items-start justify-between gap-4 mb-2",children:[p.jsxs("div",{children:[p.jsx("p",{className:"text-sm text-gray-400",children:"Revenue"}),p.jsx("p",{className:"text-2xl font-bold text-white",children:rg(w.totalRevenueCents)}),p.jsxs("p",{className:"text-xs text-gray-500 mt-0.5",children:[y(t),n?"":" · No data yet"]})]}),p.jsxs("div",{className:"flex items-center gap-1 text-xs text-gray-400 mt-1",children:[p.jsx("span",{className:"w-2 h-2 rounded-full bg-[#de33ae]"}),p.jsx("span",{children:"Tap to expand"})]})]}),p.jsx(ng,{data:e,dataKey:"revenue",stroke:"#de33ae",fill:"#de33ae"})]})]}),c&&p.jsx("div",{className:"fixed inset-0 bg-black/60 z-50 p-3 sm:p-4 flex items-end sm:items-center justify-center",children:p.jsxs("div",{className:"bg-[#161616] w-full max-w-2xl rounded-2xl border border-white/10 overflow-hidden shadow-2xl max-h-[92vh] flex flex-col",children:[p.jsxs("div",{className:"p-4 border-b border-white/10 flex items-center justify-between gap-3",children:[p.jsxs("div",{children:[p.jsx("p",{className:"text-xs text-gray-400",children:"Fans & Revenue"}),p.jsxs("p",{className:"text-base font-semibold text-white",children:["Daily metrics · ",y(t)]})]}),p.jsx("button",{type:"button",onClick:x,className:"p-2 rounded-lg bg-white/5 hover:bg-white/10 text-gray-200","aria-label":"Close",children:p.jsx(vC,{className:"h-5 w-5"})})]}),p.jsx("div",{className:"px-4 pt-3",children:p.jsxs("div",{className:"flex items-center gap-2 bg-black/40 border border-white/10 rounded-lg p-1 w-fit",children:[p.jsxs("button",{type:"button",onClick:()=>s("fans"),className:`px-3 py-1.5 rounded text-xs font-medium transition-colors flex items-center gap-1.5 ${o==="fans"?"bg-[#6d60ff] text-white":"text-gray-400 hover:text-gray-300"}`,children:[p.jsx("div",{className:"w-2 h-2 rounded-full bg-current"}),"Fans"]}),p.jsxs("button",{type:"button",onClick:()=>s("revenue"),className:`px-3 py-1.5 rounded text-xs font-medium transition-colors flex items-center gap-1.5 ${o==="revenue"?"bg-[#de33ae] text-white":"text-gray-400 hover:text-gray-300"}`,children:[p.jsx("div",{className:"w-2 h-2 rounded-full bg-current"}),"Revenue"]})]})}),p.jsxs("div",{className:"px-4 pt-3 pb-2",children:[p.jsxs("div",{className:"flex items-center justify-between gap-3",children:[p.jsx("div",{className:"flex-1 overflow-x-auto",children:p.jsx("div",{className:"inline-flex items-center gap-2 bg-black/40 border border-white/10 rounded-lg p-1",children:g.map(P=>p.jsx("button",{type:"button",onClick:()=>r(P.id),className:`px-3 py-1.5 rounded text-xs font-medium transition-colors whitespace-nowrap ${String(t)===P.id?"bg-purple-600 text-white":"text-gray-400 hover:text-gray-300"}`,children:P.label},P.id))})}),v.length>0&&p.jsx("button",{type:"button",onClick:()=>d(P=>!P),className:"px-3 py-2 text-xs rounded-lg bg-white/5 hover:bg-white/10 text-gray-200 whitespace-nowrap",children:u?"Hide years":"Years"})]}),u&&v.length>0&&p.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:v.map(P=>p.jsx("button",{type:"button",onClick:()=>r(P.id),className:`px-3 py-1.5 rounded-lg text-xs font-medium border transition-colors ${String(t)===P.id?"bg-purple-600 text-white border-purple-500/30":"bg-black/40 text-gray-300 border-white/10 hover:bg-white/5"}`,children:P.label},P.id))})]}),p.jsx("div",{className:"px-2 pb-3",children:O})]})})]}):O]})}function KW({summary:e,view:t,onViewChange:r,releaseLaunchSteps:n}){return p.jsxs("div",{children:[p.jsx("h2",{className:"text-2xl font-bold text-white mb-6",children:"Growth Insights"}),p.jsx("div",{className:"mb-6",children:p.jsxs("div",{className:"bg-[#161616] rounded-2xl border border-white/5 p-6 shadow-lg",children:[p.jsx("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-6",children:p.jsxs("div",{className:"flex items-center gap-2 bg-[#0a0a0a] border border-white/10 rounded-lg p-1",children:[p.jsx("button",{onClick:()=>r("fanJourney"),className:`px-4 py-2 rounded-md text-sm font-medium transition-colors ${t==="fanJourney"?"bg-[#6d60ff] text-white":"text-gray-400 hover:text-gray-300"}`,children:"FanJourney"}),p.jsx("button",{onClick:()=>r("releaseLaunch"),className:`px-4 py-2 rounded-md text-sm font-medium transition-colors whitespace-nowrap ${t==="releaseLaunch"?"bg-[#6d60ff] text-white":"text-gray-400 hover:text-gray-300"}`,children:"Launch New Release"})]})}),t==="fanJourney"&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"mb-6",children:[p.jsx("h3",{className:"text-lg font-semibold text-white mb-1",children:"FanJourney Email Sequence"}),p.jsx("p",{className:"text-sm text-gray-400",children:"This is the automated journey your new fans go through once they join your list."})]}),p.jsx("div",{className:"mb-6",children:p.jsx("div",{className:"space-y-3",children:e.fanJourney.steps.map((i,a)=>p.jsxs("div",{className:"flex items-start gap-4",children:[p.jsxs("div",{className:"flex flex-col items-center",children:[p.jsx("div",{className:"flex items-center justify-center w-8 h-8 rounded-full bg-[#6d60ff]/10 border-2 border-[#6d60ff] text-xs font-bold text-[#6d60ff] shrink-0",children:a+1}),a<e.fanJourney.steps.length-1&&p.jsx("div",{className:"w-0.5 h-8 bg-white/10 my-1"})]}),p.jsxs("div",{className:"flex-1 bg-[#0a0a0a] border border-white/10 rounded-lg p-3 -mt-1",children:[p.jsxs("div",{className:"flex items-center justify-between mb-1",children:[p.jsx("p",{className:"text-sm font-medium text-white",children:i.label}),p.jsx("span",{className:`text-xs px-2 py-1 rounded-md ${i.type==="email+sms"?"bg-[#6d60ff]/10 text-[#6d60ff] border border-[#6d60ff]/30":"bg-[#de33ae]/10 text-[#de33ae] border border-[#de33ae]/30"}`,children:i.type==="email+sms"?"Email + Text":"Email"})]}),p.jsxs("div",{className:"space-y-1.5 mt-2",children:[p.jsxs("p",{className:"text-xs text-gray-400",children:["In step: ",p.jsx("span",{className:"text-white font-semibold",children:i.inStepCount})," · Completed: ",p.jsx("span",{className:"text-white font-semibold",children:i.doneCount})]}),i.emailMetrics&&p.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[p.jsxs("span",{className:"text-gray-400",children:["Open: ",p.jsxs("span",{className:"text-emerald-400 font-semibold",children:[i.emailMetrics.openRate.toFixed(1),"%"]})]}),p.jsxs("span",{className:"text-gray-400",children:["Click: ",p.jsxs("span",{className:"text-blue-400 font-semibold",children:[i.emailMetrics.clickRate.toFixed(1),"%"]})]}),p.jsxs("span",{className:"text-gray-400",children:["Complete: ",p.jsxs("span",{className:"text-purple-400 font-semibold",children:[i.emailMetrics.conversionRate.toFixed(1),"%"]})]})]})]})]})]},i.key))})}),p.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4 mb-4",children:[p.jsxs("div",{className:"bg-[#0a0a0a] border border-white/5 rounded-lg p-4",children:[p.jsx("p",{className:"text-xs text-gray-400 mb-1",children:"Fans in Journey"}),p.jsx("p",{className:"text-2xl font-bold text-white",children:e.fanJourney.stats.totalFansInJourney.toLocaleStr
2125ing()})]}),p.jsxs("div",{className:"bg-[#0a0a0a] border border-white/5 rounded-lg p-4",children:[p.jsx("p",{className:"text-xs text-gray-400 mb-1",children:"Estimated Duration"}),p.jsxs("p",{className:"text-2xl font-bold text-white",children:[e.fanJourney.stats.estimatedAvgDaysToComplete," days"]})]}),p.jsxs("div",{className:"bg-[#0a0a0a] border border-white/5 rounded-lg p-4",children:[p.jsx("p",{className:"text-xs text-gray-400 mb-1",children:"Estimated Emails (30d)"}),p.jsx("p",{className:"text-2xl font-bold text-white",children:e.fanJourney.stats.estimatedEmailsSentLast30Days.toLocaleString()})]})]}),e.fanJourney.stats.hasFanPacks&&p.jsx("div",{className:"mb-4",children:p.jsxs("span",{className:"inline-flex items-center gap-2 px-3 py-1.5 bg-[#6d60ff]/10 border border-[#6d60ff]/30 rounded-lg text-sm text-[#6d60ff]",children:[p.jsx("span",{children:"✨"}),"FanPack touchpoints active"]})}),p.jsx("p",{className:"text-xs text-gray-500 italic",children:"Contact counts and email engagement metrics are synced from your HighLevel account in real-time."})]}),t==="releaseLaunch"&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"mb-6",children:[p.jsx("h3",{className:"text-lg font-semibold text-white mb-1",children:"Launch New Release"}),p.jsx("p",{className:"text-sm text-gray-400",children:"This is the recommended messaging cadence for your next release."})]}),p.jsx("div",{className:"mb-6",children:p.jsx("div",{className:"space-y-3",children:n.map((i,a)=>{var o,s,c;return p.jsxs("div",{className:"flex items-start gap-4",children:[p.jsxs("div",{className:"flex flex-col items-center",children:[p.jsx("div",{className:"flex items-center justify-center w-8 h-8 rounded-full bg-[#6d60ff]/10 border-2 border-[#6d60ff] text-xs font-bold text-[#6d60ff] shrink-0",children:i.id}),a<n.length-1&&p.jsx("div",{className:"w-0.5 h-8 bg-white/10 my-1"})]}),p.jsxs("div",{className:"flex-1 bg-[#0a0a0a] border border-white/10 rounded-lg p-3 -mt-1",children:[p.jsxs("div",{className:"flex items-center justify-between mb-1",children:[p.jsx("p",{className:"text-sm font-medium text-white",children:i.title}),p.jsx("span",{className:`text-xs px-2 py-1 rounded-md ${i.channel==="Email + Text"?"bg-[#6d60ff]/10 text-[#6d60ff] border border-[#6d60ff]/30":"bg-[#de33ae]/10 text-[#de33ae] border border-[#de33ae]/30"}`,children:i.channel})]}),p.jsxs("p",{className:"text-xs text-gray-400 mt-1",children:["Contacts: ",p.jsx("span",{className:"text-white font-semibold",children:((c=(s=(o=e.launchFlows)==null?void 0:o.release)==null?void 0:s.find(l=>l.id===i.id))==null?void 0:c.contactCount)||0})]})]})]},i.id)})})}),p.jsx("p",{className:"text-xs text-gray-500 italic",children:"Release automation tracking will be available soon. These steps represent the recommended messaging flow for launching new music."})]})]})})]})}function VW(e){return e==null||!Number.isFinite(e)?{status:"no-data",message:"Not enough data yet. Let your ads run a bit longer.",containerClass:"bg-slate-800/80 border border-slate-700",textClass:"text-slate-200"}:e<1?{status:"great",message:"Ads are doing great! No changes needed right now.",containerClass:"bg-emerald-500/10 border border-emerald-500/40",textClass:"text-emerald-300"}:e<2?{status:"ok",message:"Ads are performing okay, but could be optimized.",containerClass:"bg-amber-500/10 border border-amber-500/40",textClass:"text-amber-300"}:{status:"bad",message:"CPF is high. Consider optimizing, testing new creatives, or pausing.",containerClass:"bg-rose-500/10 border border-rose-500/40",textClass:"text-rose-300"}}function qW({adPerformance:e,isLoading:t,error:r}){return p.jsxs("div",{className:"bg-[#161616] rounded-2xl border border-white/5 p-6 shadow-lg",children:[p.jsx("h3",{className:"text-lg font-semibold text-white mb-4",children:"Ad Performance"}),t?p.jsx("div",{className:"flex items-center justify-center h-48 text-center",children:p.jsx("p",{className:"text-sm text-gray-400",children:"Loading ad performance..."})}):r?p.jsx("div",{className:"flex items-center justify-center h-48 text-center",children:p.jsx("p",{className:"text-sm text-red-400",children:"Failed to load ad metrics"})}):e!=null&&e.hasConfiguredCampaigns?e.managedAdsActive&&!e.adsRunning?p.jsx("div",{className:"flex items-center justify-center h-48 text-center",children:p.jsxs("div",{children:[p.jsx("div",{className:"text-4xl mb-3",children:"⚠️"}),p.jsx("p",{className:"text-sm text-yellow-400 max-w-xs",children:"Your ads aren't currently running. Please make sure your monthly fee is up to date so we can keep your campaigns live."})]})}):e.fanCampaign||e.secondaryCampaign||e.metaLeadCampaigns&&e.metaLeadCampaigns.length>0?p.jsxs("div",{className:"space-y-4",children:[e.fanCampaign&&p.jsxs("div",{className:"space-y-3",children:[p.jsxs("div",{children:[p.jsx("p",{className:"text-xs text-gray-400 mb-1",children:"Fan Campaign"}),p.jsx("p",{className:"text-sm font-semibold text-white mb-2",children:e.fanCampaign.campaignName})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"bg-[#0a0a0a] border border-white/5 rounded-lg p-3",children:[p.jsx("p",{className:"text-xs text-gray-400 mb-1",children:"Fans (30d
2125)"}),p.jsx("p",{className:"text-2xl font-bold text-white",children:e.fanCampaign.results.toLocaleString()})]}),p.jsxs("div",{className:"bg-[#0a0a0a] border border-white/5 rounded-lg p-3",children:[p.jsx("p",{className:"text-xs text-gray-400 mb-1",children:"CPF (Cost Per Fan)"}),p.jsx("p",{className:"text-2xl font-bold text-[#6d60ff]",children:e.fanCampaign.cpr!==null?`$${e.fanCampaign.cpr.toFixed(2)}`:"N/A"})]})]}),(()=>{const n=VW(e.fanCampaign.cpr);return p.jsx("div",{className:`rounded-lg px-4 py-3 text-sm flex items-center justify-between ${n.containerClass}`,children:p.jsx("span",{className:n.textClass,children:n.message})})})()]}),e.secondaryCampaign&&p.jsxs("div",{className:`${e.fanCampaign?"pt-4 border-t border-white/5":""} space-y-3`,children:[p.jsxs("div",{children:[p.jsx("p",{className:"text-xs text-gray-400 mb-1",children:"Secondary Campaign"}),p.jsx("p",{className:"text-sm font-semibold text-white mb-2",children:e.secondaryCampaign.campaignName})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"bg-[#0a0a0a] border border-white/5 rounded-lg p-3",children:[p.jsx("p",{className:"text-xs text-gray-400 mb-1",children:"Fans (30d)"}),p.jsx("p",{className:"text-xl font-bold text-white",children:e.secondaryCampaign.results!=null?e.secondaryCampaign.results.toLocaleString():"0"})]}),p.jsxs("div",{className:"bg-[#0a0a0a] border border-white/5 rounded-lg p-3",children:[p.jsx("p",{className:"text-xs text-gray-400 mb-1",children:"CPF (Cost Per Fan)"}),p.jsx("p",{className:"text-xl font-bold text-[#de33ae]",children:e.secondaryCampaign.cpr!=null&&Number.isFinite(e.secondaryCampaign.cpr)?`$${e.secondaryCampaign.cpr.toFixed(2)}`:"N/A"})]})]})]}),e.metaLeadCampaigns&&e.metaLeadCampaigns.length>0&&p.jsx("div",{className:`${e.fanCampaign||e.secondaryCampaign?"pt-4 border-t border-white/5":""} space-y-3`,children:e.metaLeadCampaigns.map((n,i)=>p.jsxs("div",{className:i>0?"pt-3 border-t border-white/5":"",children:[p.jsxs("div",{children:[p.jsx("p",{className:"text-xs text-gray-400 mb-1",children:"Lead Ad Campaign"}),p.jsx("p",{className:"text-sm font-semibold text-white mb-2",children:n.campaignName})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"bg-[#0a0a0a] border border-white/5 rounded-lg p-3",children:[p.jsx("p",{className:"text-xs text-gray-400 mb-1",children:"Fans"}),p.jsx("p",{className:"text-xl font-bold text-white",children:n.results!=null?n.results.toLocaleString():"0"})]}),p.jsxs("div",{className:"bg-[#0a0a0a] border border-white/5 rounded-lg p-3",children:[p.jsx("p",{className:"text-xs text-gray-400 mb-1",children:"CPF (Cost Per Fan)"}),p.jsx("p",{className:"text-xl font-bold text-[#6d60ff]",children:n.cpr!=null&&Number.isFinite(n.cpr)?`$${n.cpr.toFixed(2)}`:"N/A"})]})]})]},i))})]}):p.jsx("div",{className:"flex items-center justify-center h-48 text-center",children:p.jsxs("div",{children:[p.jsx("div",{className:"text-4xl mb-3",children:"📱"}),p.jsx("p",{className:"text-sm text-gray-400 max-w-xs",children:"Once you start sending paid traffic to your forms, your ad-sourced fans will show up here."})]})}):p.jsx("div",{className:"flex items-center justify-center h-48 text-center",children:p.jsxs("div",{children:[p.jsx("div",{className:"text-4xl mb-3",children:"📱"}),p.jsx("p",{className:"text-sm text-gray-400 max-w-xs",children:"No ad campaigns are connected yet. Ask your artist rep to connect your ads to FanFlowy."})]})})]})}function GW({summary:e}){return p.jsxs("div",{className:"bg-[#161616] rounded-2xl border border-white/5 p-6 shadow-lg",children:[p.jsxs("div",{className:"mb-4",children:[p.jsx("h3",{className:"text-lg font-semibold text-white mb-1",children:"Streaming Snapshot"}),p.jsx("p",{className:"text-sm text-gray-400",children:"Quick Spotify-style estimates based on your current fan & order data."})]}),p.jsxs("div",{className:"space-y-5",children:[p.jsxs("div",{className:"bg-[#0a0a0a] border border-white/5 rounded-lg p-4",children:[p.jsx("p",{className:"text-xs text-gray-400 mb-1",children:"Followers"}),p.jsx("p",{className:"text-3xl font-bold text-white",children:e.streamingSnapshot.followers.toLocaleStr
2125ing()})]}),p.jsxs("div",{className:"bg-[#0a0a0a] border border-white/5 rounded-lg p-4",children:[p.jsx("p",{className:"text-xs text-gray-400 mb-1",children:"Monthly Listeners"}),p.jsx("p",{className:"text-3xl font-bold text-[#6d60ff]",children:e.streamingSnapshot.monthlyListeners.toLocaleString()})]}),p.jsxs("div",{className:"bg-[#0a0a0a] border border-white/5 rounded-lg p-4",children:[p.jsx("p",{className:"text-xs text-gray-400 mb-1",children:"Streams (Last 28 Days)"}),p.jsx("p",{className:"text-3xl font-bold text-[#de33ae]",children:e.streamingSnapshot.streamsLast28Days.toLocaleString()})]})]})]})}async function YW(e){return(await A(`/artists/${e}/analytics/location`)).data}function JW({artistId:e}){const[t,r]=m.useState(null),[n,i]=m.useState(!0),[a,o]=m.useState(null),[s,c]=m.useState("states");if(console.log("[LocationAnalytics] Component rendered with artistId:",e),m.useEffect(()=>{(async()=>{try{i(!0),console.log("[LocationAnalytics] Fetching for artistId:",e);const y=await YW(e);console.log("[LocationAnalytics] Received data:",{artistId:e,totalFans:y.totalFans,statesCount:y.byState.length,countriesCount:y.byCountry.length,citiesCount:y.byCity.length}),r(y),o(null)}catch(y){console.error("Failed to fetch location analytics:",y),o("Failed to load location data")}finally{i(!1)}})()},[e]),n)return p.jsx("div",{className:"bg-[#161616] rounded-2xl border border-white/5 p-6 shadow-lg mb-8",children:p.jsx("div",{className:"flex items-center justify-center h-64",children:p.jsx("div",{className:"text-gray-400",children:"Loading location data..."})})});if(a||!t)return p.jsx("div",{className:"bg-[#161616] rounded-2xl border border-white/5 p-6 shadow-lg mb-8",children:p.jsx("div",{className:"flex items-center justify-center h-64",children:p.jsx("div",{className:"text-red-400",children:a||"No location data available"})})});if(!(t.byState.length>0||t.byCountry.length>0||t.byCity.length>0))return p.jsxs("div",{className:"bg-[#161616] rounded-2xl border border-white/5 p-6 shadow-lg mb-8",children:[p.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[p.jsx(rh,{className:"h-5 w-5 text-[#6d60ff]"}),p.jsx("h2",{className:"text-xl font-semibold text-white",children:"Fan Locations"})]}),p.jsxs("div",{className:"flex flex-col items-center justify-center h-48 text-center",children:[p.jsx(rh,{className:"h-12 w-12 text-gray-600 mb-3"}),p.jsx("p",{className:"text-gray-400 mb-2",children:"No location data yet"}),p.jsx("p",{className:"text-sm text-gray-500",children:"Location data will appear as fans sign up"})]})]});const u=s==="states"?t.byState:s==="countries"?t.byCountry:t.byCity,d=u.slice(0,5),f=["#6d60ff","#de33ae","#9333ea","#ec4899","#8b5cf6"],h=d.reduce((v,y)=>v+y.count,0),g=()=>{const S=2*Math.PI*108;let w=-90;return p.jsxs("svg",{width:240,height:240,viewBox:"0 0 240 240",className:"transform -rotate-90",children:[p.jsx("circle",{cx:240/2,cy:240/2,r:108,fill:"none",stroke:"rgba(255, 255, 255, 0.05)",strokeWidth:24}),d.map((_,x)=>{const P=_.count/h*100,k=P/100*S,I=p.jsx("circle",{cx:240/2,cy:240/2,r:108,fill:"none",stroke:f[x],strokeWidth:24,strokeDasharray:`${k} ${S}`,strokeDashoffset:-w*(S/360),className:"transition-all duration-300"},x);return w+=P/100*360,I})]})};return p.jsxs("div",{className:"mb-6",children:[p.jsxs("div",{className:"mb-4",children:[p.jsx("h2",{className:"text-2xl font-bold text-white mb-1",children:"Fan Locations"}),p.jsx("p",{className:"text-sm text-gray-400",children:"Geographic distribution of your fanbase"})]}),p.jsxs("div",{className:"bg-[#161616] rounded-2xl border border-white/5 p-6 shadow-lg",children:[p.jsx("div",{className:"flex items-center justify-end mb-6",children:p.jsxs("div",{className:"flex items-center gap-2 bg-[#0a0a0a] rounded-lg p-1 border border-white/5",children:[p.jsx("button",{onClick:()=>c("states"),className:`px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${s==="states"?"bg-[#6d60ff] text-white":"text-gray-400 hover:text-gray-200"}`,children:"States"}),p.jsx("button",{onClick:()=>c("countries"),className:`px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${s==="countries"?"bg-[#6d60ff] text-white":"text-gray-400 hover:text-gray-200"}`,children:"Countries"}),p.jsx("button",{onClick:()=>c("cities"),className:`px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${s==="cities"?"bg-[#6d60ff] text-white":"text-gray-400 hover:text-gray-200"}`,children:"Cities"})]})}),p.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 items-center",children:[p.jsx("div",{className:"flex flex-col items-center justify-center",children:p.jsxs("div",{className:"relative",children:[g(),p.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[p.jsx("p",{className:"text-3xl font-bold text-white",children:t.totalFans.toLocaleStr
2125ing()}),p.jsx("p",{className:"text-sm text-gray-400",children:"Total Fans"})]})]})}),p.jsx("div",{className:"space-y-4",children:d.map((v,y)=>{const b=s==="states"?v.stateName:s==="countries"?v.countryName:`${v.city}, ${v.state}`,S=v.count,w=(S/h*100).toFixed(1);return p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("div",{className:"w-3 h-3 rounded-full flex-shrink-0",style:{backgroundColor:f[y]}}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("p",{className:"text-sm font-medium text-white truncate",children:b}),p.jsxs("p",{className:"text-xs text-gray-500",children:[S.toLocaleString()," fans"]})]}),p.jsx("div",{className:"text-right flex-shrink-0",children:p.jsxs("p",{className:"text-sm font-semibold text-white",children:[w,"%"]})})]},y)})})]}),p.jsxs("div",{className:"mt-6 pt-6 border-t border-white/5 grid grid-cols-2 md:grid-cols-3 gap-4",children:[p.jsxs("div",{children:[p.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Total Locations"}),p.jsx("p",{className:"text-lg font-semibold text-white",children:s==="states"?t.byState.length:s==="countries"?t.byCountry.length:t.byCity.length})]}),p.jsxs("div",{children:[p.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Top Location"}),p.jsx("p",{className:"text-lg font-semibold text-white truncate",children:d.length>0?s==="states"?d[0].stateName:s==="countries"?d[0].countryName:d[0].city:"N/A"})]}),p.jsxs("div",{children:[p.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Top Location %"}),p.jsx("p",{className:"text-lg font-semibold text-white",children:d.length>0?`${(d[0].count/h*100).toFixed(1)}%`:"N/A"})]})]})]})]})}function XW(){var k;const{artistId:e,summary:t}=sv(),[r,n]=m.useState("fanJourney"),[i,a]=m.useState([]),[o,s]=m.useState(()=>typeof window<"u"&&window.innerWidth<640?"7d":"30d");m.useEffect(()=>{if(!e)return;(async()=>{try{const{years:D}=await uu(e);a(D)}catch(D){console.error("Failed to fetch available years:",D),a([new Date().getFullYear()])}})()},[e]);const{metrics:c,dashboardData:l,adPerformance:u,isLoading:d,isDashboardLoading:f,isAdPerformanceLoading:h,error:g,adPerformanceError:v}=AC(e,o),y=g&&!c,b=m.useMemo(()=>(I,D)=>{if(D!=="7d"&&D!=="30d"&&D!=="90d")return I;const T=new Date,C=D==="7d"?7:D==="30d"?30:90,R=new Date(T);return R.setDate(R.getDate()-(C-1)),I.filter(j=>new Date(j.date)>=R)},[]),S=m.useMemo(()=>c?b(c.days,o):[],[c,o,b]),w=m.useMemo(()=>{if(/^\d{4}$/.test(o))return!0;if(S.length>0){const I=new Date(S[0].date),D=new Date(S[S.length-1].date);return I.getFullYear()!==D.getFullYear()}return!1},[o,S]),_=m.useMemo(()=>S.map(I=>{const D=new Date(I.date);return{date:w?D.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):D.toLocaleDateString("en-US",{month:"short",day:"numeric"}),fans:I.newFans,revenue:I.ordersRevenueCents/100}}),[S,w]),x=m.useMemo(()=>!!(c&&(c.totals.fansTotal>0||c.totals.revenueLast30DaysCents>0)),[c]),O=m.useMemo(()=>{if(!c||!c.days||c.days.length===0)return{fansPrevious7Days:void 0,revenuePrevious30DaysCents:void 0,ordersPrevious30Days:void 0};const I=new Date;I.setHours(0,0,0,0);const D=new Date(I);D.setDate(D.getDate()-7);const T=new Date(I);T.setDate(T.getDate()-14);const C=new Date(I);C.setDate(C.getDate()-7);const R=new Date(I);R.setDate(R.getDate()-30);const j=new Date(I);j.setDate(j.getDate()-60);const $=new Date(I);$.setDate($.getDate()-30);const W=c.days.filter(K=>{const F=new Date(K.date);return F>=T&&F<C}).reduce((K,F)=>K+F.newFans,0),z=c.days.filter(K=>{const F=new Date(K.date);return F>=j&&F<$}).reduce((K,F)=>({revenue:K.revenue+F.ordersRevenueCents,orders:K.orders+F.ordersCount}),{revenue:0,orders:0});return{fansPrevious7Days:W,revenuePrevious30DaysCents:z.revenue,ordersPrevious30Days:z.orders}},[c]),P=m.useMemo(()=>{var I;return(I=t==null?void 0:t.launchFlows)!=null&&I.release?t.launchFlows.release.map(D=>({id:D.id,title:D.title,channel:D.channel,status:D.contactCount>0?"in_progress":"not_started"})):[{id:1,title:"Initial announcement",channel:"Email + Text",status:"not_started"},{id:2,title:"Week before",channel:"Email",status:"not_started"},{id:3,title:"Day before",channel:"Email",status:"not_started"},{id:4,title:"Release day",channel:"Email + Text",status:"not_started"},{id:5,title:"Week after release",channel:"Email",status:"not_started"}]},[(k=t==null?void 0:t.launchFlows)==null?void 0:k.release]);return d?p.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:p.jsx("div",{className:"text-gray-400",children:"Loading dashboard..."})}):y||!t||!c?p.jsx("div",{className:"max-w-7xl mx-auto",children:p.jsx("div",{className:"bg-[#161616] border border-red-500/30 rounded-2xl p-6",children:p.jsx("p",{className:"text-red-300",children:g||"Failed to load dashboard"})})}):p.jsxs("div",{className:"max-w-7xl mx-auto",children:[p.jsxs("div",{className:"mb-6",children:[p.jsx("h1",{className:"text-3xl font-bold text-white mb-2",children:"FanStats"}),p.jsx("p",{className:"text-gray-400",children:"Track your growth and engagement metrics"})]}),p.jsx(EC,{fansTotal:c.totals.fansTotal,fansLast7Days:c.totals.fansLast7Days,revenueLast30DaysCents:c.totals.revenueLast30DaysCents,ordersLast30Days:c.totals.ordersLast30Days,fansPrevious7Days:O.fansPrevious7Days,revenuePrevious30DaysCents:O.revenuePrevious30DaysCents,ordersPrevious30Days:O.ordersPrevious30Days}),p.jsx(HW,{chartData:_,chartRange:o,onRangeChange:s,hasData:x,availableYears:i}),p.jsx(IC,{dashboardData:l,isLoading:f}),p.jsx(kC,{dashboardData:l,isLoading:f}),p.jsx(JW,{artistId:e}),p.jsx(KW,{summary:t,view:r,onViewChange:n,releaseLaunchSteps:P}),p.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[p.jsx(qW,{adPerformance:u,isLoading:h,error:v}),p.jsx(GW,{summary:t})]})]})}const aH=Object.freeze(Object.defineProperty({__proto__:null,default:XW},Symbol.toStringTag,{value:"Module"}));
2125export{iv as $,dI as A,d8 as B,vk as C,_T as D,y8 as E,fI as F,J as G,wT as H,w8 as I,xT as J,IT as K,x8 as L,ET as M,kT as N,AT as O,bI as P,nv as Q,OT as R,xI as S,SI as T,wI as U,ST as V,PT as W,hI as X,pI as Y,eI as Z,jE as _,v8 as a,pu as a$,ke as a0,K_ as a1,Qk as a2,_t as a3,$E as a4,r8 as a5,LE as a6,yu as a7,Sn as a8,RE as a9,u8 as aA,rT as aB,nT as aC,iT as aD,YI as aE,JI as aF,XI as aG,ck as aH,lk as aI,uk as aJ,dk as aK,ZI as aL,ik as aM,ak as aN,sk as aO,ok as aP,QI as aQ,ek as aR,tk as aS,rk as aT,nk as aU,Sk as aV,Ik as aW,Ek as aX,kk as aY,jk as aZ,Fy as a_,j8 as aa,Hk as ab,n8 as ac,Ak as ad,_k as ae,Ok as af,Ry as ag,Cy as ah,$y as ai,tT as aj,Ly as ak,qI as al,Pk as am,zI as an,HI as ao,KI as ap,rv as aq,eT as ar,VI as as,WI as at,GI as au,jT as av,c8 as aw,l8 as ax,MT as ay,s8 as az,sv as b,sI as b$,La as b0,pt as b1,Ny as b2,xC as b3,ov as b4,cu as b5,WT as b6,g8 as b7,h8 as b8,Tk as b9,y4 as bA,af as bB,w1 as bC,By as bD,zy as bE,Wy as bF,Fa as bG,tv as bH,Qy as bI,Ky as bJ,ev as bK,Zy as bL,Jy as bM,Vy as bN,gu as bO,Vk as bP,wk as bQ,xk as bR,bk as bS,FI as bT,UI as bU,BI as bV,My as bW,Dy as bX,yk as bY,jy as bZ,nI as b_,Ck as ba,Nk as bb,f8 as bc,WE as bd,k8 as be,vC as bf,FE as bg,UE as bh,BE as bi,zE as bj,fk as bk,mk as bl,JE as bm,gk as bn,pk as bo,hk as bp,Yy as bq,qy as br,Gy as bs,Xy as bt,Hy as bu,Xb as bv,B1 as bw,f1 as bx,k1 as by,Rl as bz,EI as c,o8 as c$,vI as c0,uI as c1,oI as c2,lI as c3,cI as c4,aI as c5,iI as c6,QE as c7,ZE as c8,gI as c9,$k as cA,Lk as cB,Fk as cC,Uk as cD,Bk as cE,Mk as cF,Dk as cG,PI as cH,NT as cI,CT as cJ,_I as cK,OI as cL,TT as cM,Gk as cN,C8 as cO,b8 as cP,_8 as cQ,I8 as cR,qk as cS,Yk as cT,Jk as cU,Xk as cV,Zk as cW,Kk as cX,mI as cY,i8 as cZ,a8 as c_,yI as ca,A8 as cb,O8 as cc,P8 as cd,oT as ce,cT as cf,aT as cg,fT as ch,p8 as ci,m8 as cj,E8 as ck,T8 as cl,N8 as cm,iH as cn,XD as co,sT as cp,dT as cq,mT as cr,hT as cs,bT as ct,yT as cu,gT as cv,pT as cw,vT as cx,zk as cy,Rk as cz,kI as d,aH as d0,MI as e,RI as f,DI as g,LI as h,$I as i,p as j,S8 as k,AI as l,NI as m,jI as n,HE as o,TI as p,KE as q,YE as r,CI as s,VE as t,II as u,qE as v,GE as w,tI as x,rI as y,XE as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.