@anton.andrusenko/shopify-mcp-admin 2.1.2 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,107 +0,0 @@
1
- function p6(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const l=Object.getOwnPropertyDescriptor(r,i);l&&Object.defineProperty(e,i,l.get?l:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const s of l.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();function Ma(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ey={exports:{}},ru={};var kO;function m6(){if(kO)return ru;kO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,l){var s=null;if(l!==void 0&&(s=""+l),i.key!==void 0&&(s=""+i.key),"key"in i){l={};for(var u in i)u!=="key"&&(l[u]=i[u])}else l=i;return i=l.ref,{$$typeof:e,type:r,key:s,ref:i!==void 0?i:null,props:l}}return ru.Fragment=t,ru.jsx=n,ru.jsxs=n,ru}var IO;function v6(){return IO||(IO=1,Ey.exports=m6()),Ey.exports}var g=v6(),$s=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},g6={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},y6=class{#e=g6;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Wo=new y6;function b6(e){setTimeout(e,0)}var al=typeof window>"u"||"Deno"in globalThis;function Pn(){}function x6(e,t){return typeof e=="function"?e(t):e}function _b(e){return typeof e=="number"&&e>=0&&e!==1/0}function aM(e,t){return Math.max(e+(t||0)-Date.now(),0)}function uo(e,t){return typeof e=="function"?e(t):e}function Ir(e,t){return typeof e=="function"?e(t):e}function LO(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:l,queryKey:s,stale:u}=e;if(s){if(r){if(t.queryHash!==fw(s,t.options))return!1}else if(!Ou(t.queryKey,s))return!1}if(n!=="all"){const f=t.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||i&&i!==t.state.fetchStatus||l&&!l(t))}function zO(e,t){const{exact:n,status:r,predicate:i,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(il(t.options.mutationKey)!==il(l))return!1}else if(!Ou(t.options.mutationKey,l))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function fw(e,t){return(t?.queryKeyHashFn||il)(e)}function il(e){return JSON.stringify(e,(t,n)=>jb(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Ou(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Ou(e[n],t[n])):!1}var w6=Object.prototype.hasOwnProperty;function iM(e,t){if(e===t)return e;const n=$O(e)&&$O(t);if(!n&&!(jb(e)&&jb(t)))return t;const i=(n?e:Object.keys(e)).length,l=n?t:Object.keys(t),s=l.length,u=n?new Array(s):{};let f=0;for(let h=0;h<s;h++){const p=n?h:l[h],m=e[p],b=t[p];if(m===b){u[p]=m,(n?h<i:w6.call(e,p))&&f++;continue}if(m===null||b===null||typeof m!="object"||typeof b!="object"){u[p]=b;continue}const x=iM(m,b);u[p]=x,x===m&&f++}return i===s&&f===i?e:u}function Ih(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function $O(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function jb(e){if(!BO(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!BO(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function BO(e){return Object.prototype.toString.call(e)==="[object Object]"}function S6(e){return new Promise(t=>{Wo.setTimeout(t,e)})}function Tb(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?iM(e,t):t}function E6(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function C6(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var dw=Symbol();function oM(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===dw?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function lM(e,t){return typeof e=="function"?e(...t):!!e}var A6=class extends $s{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!al&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},hw=new A6;function Mb(){let e,t;const n=new Promise((i,l)=>{e=i,t=l});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var O6=b6;function N6(){let e=[],t=0,n=u=>{u()},r=u=>{u()},i=O6;const l=u=>{t?e.push(u):i(()=>{n(u)})},s=()=>{const u=e;e=[],u.length&&i(()=>{r(()=>{u.forEach(f=>{n(f)})})})};return{batch:u=>{let f;t++;try{f=u()}finally{t--,t||s()}return f},batchCalls:u=>(...f)=>{l(()=>{u(...f)})},schedule:l,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{i=u}}}var Yt=N6(),_6=class extends $s{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!al&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Lh=new _6;function j6(e){return Math.min(1e3*2**e,3e4)}function sM(e){return(e??"online")==="online"?Lh.isOnline():!0}var Rb=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function cM(e){let t=!1,n=0,r;const i=Mb(),l=()=>i.status!=="pending",s=E=>{if(!l()){const C=new Rb(E);b(C),e.onCancel?.(C)}},u=()=>{t=!0},f=()=>{t=!1},h=()=>hw.isFocused()&&(e.networkMode==="always"||Lh.isOnline())&&e.canRun(),p=()=>sM(e.networkMode)&&e.canRun(),m=E=>{l()||(r?.(),i.resolve(E))},b=E=>{l()||(r?.(),i.reject(E))},x=()=>new Promise(E=>{r=C=>{(l()||h())&&E(C)},e.onPause?.()}).then(()=>{r=void 0,l()||e.onContinue?.()}),S=()=>{if(l())return;let E;const C=n===0?e.initialPromise:void 0;try{E=C??e.fn()}catch(A){E=Promise.reject(A)}Promise.resolve(E).then(m).catch(A=>{if(l())return;const _=e.retry??(al?0:3),N=e.retryDelay??j6,j=typeof N=="function"?N(n,A):N,T=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,A);if(t||!T){b(A);return}n++,e.onFail?.(n,A),S6(j).then(()=>h()?void 0:x()).then(()=>{t?b(A):S()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(r?.(),i),cancelRetry:u,continueRetry:f,canStart:p,start:()=>(p()?S():x().then(S),i)}}var uM=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),_b(this.gcTime)&&(this.#e=Wo.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(al?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Wo.clearTimeout(this.#e),this.#e=void 0)}},T6=class extends uM{#e;#t;#n;#a;#r;#o;#l;constructor(e){super(),this.#l=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#a=e.client,this.#n=this.#a.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=HO(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#o,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=HO(this.options);t.data!==void 0&&(this.setState(UO(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=Tb(this.state.data,e,this.options);return this.#i({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Pn).catch(Pn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Ir(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===dw||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>uo(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!aM(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#l?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const u=this.observers.find(f=>f.options.queryFn);u&&this.setOptions(u.options)}const n=new AbortController,r=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(this.#l=!0,n.signal)})},i=()=>{const u=oM(this.options,t),h=(()=>{const p={client:this.#a,queryKey:this.queryKey,meta:this.meta};return r(p),p})();return this.#l=!1,this.options.persister?this.options.persister(u,h,this):u(h)},s=(()=>{const u={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#a,state:this.state,fetchFn:i};return r(u),u})();this.options.behavior?.onFetch(s,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==s.fetchOptions?.meta)&&this.#i({type:"fetch",meta:s.fetchOptions?.meta}),this.#r=cM({initialPromise:t?.initialPromise,fn:s.fetchFn,onCancel:u=>{u instanceof Rb&&u.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(u,f)=>{this.#i({type:"failed",failureCount:u,error:f})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0});try{const u=await this.#r.start();if(u===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(u),this.#n.config.onSuccess?.(u,this),this.#n.config.onSettled?.(u,this.state.error,this),u}catch(u){if(u instanceof Rb){if(u.silent)return this.#r.promise;if(u.revert){if(this.state.data===void 0)throw u;return this.state.data}}throw this.#i({type:"error",error:u}),this.#n.config.onError?.(u,this),this.#n.config.onSettled?.(this.state.data,u,this),u}finally{this.scheduleGc()}}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...fM(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...UO(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":const i=e.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Yt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function fM(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:sM(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function UO(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function HO(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var M6=class extends $s{constructor(e,t){super(),this.options=t,this.#e=e,this.#i=null,this.#l=Mb(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#a=void 0;#r;#o;#l;#i;#m;#d;#h;#c;#u;#s;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),qO(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Db(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Db(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ir(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Ih(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&FO(this.#t,n,this.options,t)&&this.#f(),this.updateResult(),r&&(this.#t!==n||Ir(this.options.enabled,this.#t)!==Ir(t.enabled,this.#t)||uo(this.options.staleTime,this.#t)!==uo(t.staleTime,this.#t))&&this.#v();const i=this.#g();r&&(this.#t!==n||Ir(this.options.enabled,this.#t)!==Ir(t.enabled,this.#t)||i!==this.#s)&&this.#y(i)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return D6(this,n)&&(this.#a=n,this.#o=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#a}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#l.status==="pending"&&this.#l.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#a))}#f(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Pn)),t}#v(){this.#x();const e=uo(this.options.staleTime,this.#t);if(al||this.#a.isStale||!_b(e))return;const n=aM(this.#a.dataUpdatedAt,e)+1;this.#c=Wo.setTimeout(()=>{this.#a.isStale||this.updateResult()},n)}#g(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#w(),this.#s=e,!(al||Ir(this.options.enabled,this.#t)===!1||!_b(this.#s)||this.#s===0)&&(this.#u=Wo.setInterval(()=>{(this.options.refetchIntervalInBackground||hw.isFocused())&&this.#f()},this.#s))}#b(){this.#v(),this.#y(this.#g())}#x(){this.#c&&(Wo.clearTimeout(this.#c),this.#c=void 0)}#w(){this.#u&&(Wo.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,r=this.options,i=this.#a,l=this.#r,s=this.#o,f=e!==n?e.state:this.#n,{state:h}=e;let p={...h},m=!1,b;if(t._optimisticResults){const D=this.hasListeners(),B=!D&&qO(e,t),Q=D&&FO(e,n,t,r);(B||Q)&&(p={...p,...fM(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:x,errorUpdatedAt:S,status:E}=p;b=p.data;let C=!1;if(t.placeholderData!==void 0&&b===void 0&&E==="pending"){let D;i?.isPlaceholderData&&t.placeholderData===s?.placeholderData?(D=i.data,C=!0):D=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,D!==void 0&&(E="success",b=Tb(i?.data,D,t),m=!0)}if(t.select&&b!==void 0&&!C)if(i&&b===l?.data&&t.select===this.#m)b=this.#d;else try{this.#m=t.select,b=t.select(b),b=Tb(i?.data,b,t),this.#d=b,this.#i=null}catch(D){this.#i=D}this.#i&&(x=this.#i,b=this.#d,S=Date.now(),E="error");const A=p.fetchStatus==="fetching",_=E==="pending",N=E==="error",j=_&&A,T=b!==void 0,R={status:E,fetchStatus:p.fetchStatus,isPending:_,isSuccess:E==="success",isError:N,isInitialLoading:j,isLoading:j,data:b,dataUpdatedAt:p.dataUpdatedAt,error:x,errorUpdatedAt:S,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>f.dataUpdateCount||p.errorUpdateCount>f.errorUpdateCount,isFetching:A,isRefetching:A&&!_,isLoadingError:N&&!T,isPaused:p.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:N&&T,isStale:pw(e,t),refetch:this.refetch,promise:this.#l,isEnabled:Ir(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const D=F=>{R.status==="error"?F.reject(R.error):R.data!==void 0&&F.resolve(R.data)},B=()=>{const F=this.#l=R.promise=Mb();D(F)},Q=this.#l;switch(Q.status){case"pending":e.queryHash===n.queryHash&&D(Q);break;case"fulfilled":(R.status==="error"||R.data!==Q.value)&&B();break;case"rejected":(R.status!=="error"||R.error!==Q.reason)&&B();break}}return R}updateResult(){const e=this.#a,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#o=this.options,this.#r.data!==void 0&&(this.#h=this.#t),Ih(t,e))return;this.#a=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,i=typeof r=="function"?r():r;if(i==="all"||!i&&!this.#p.size)return!0;const l=new Set(i??this.#p);return this.options.throwOnError&&l.add("error"),Object.keys(this.#a).some(s=>{const u=s;return this.#a[u]!==e[u]&&l.has(u)})};this.#E({listeners:n()})}#S(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#E(e){Yt.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#a)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function R6(e,t){return Ir(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function qO(e,t){return R6(e,t)||e.state.data!==void 0&&Db(e,t,t.refetchOnMount)}function Db(e,t,n){if(Ir(t.enabled,e)!==!1&&uo(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&pw(e,t)}return!1}function FO(e,t,n,r){return(e!==t||Ir(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&pw(e,n)}function pw(e,t){return Ir(t.enabled,e)!==!1&&e.isStaleByTime(uo(t.staleTime,e))}function D6(e,t){return!Ih(e.getCurrentResult(),t)}function KO(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],s=t.state.data?.pageParams||[];let u={pages:[],pageParams:[]},f=0;const h=async()=>{let p=!1;const m=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},b=oM(t.options,t.fetchOptions),x=async(S,E,C)=>{if(p)return Promise.reject();if(E==null&&S.pages.length)return Promise.resolve(S);const _=(()=>{const k={client:t.client,queryKey:t.queryKey,pageParam:E,direction:C?"backward":"forward",meta:t.options.meta};return m(k),k})(),N=await b(_),{maxPages:j}=t.options,T=C?C6:E6;return{pages:T(S.pages,N,j),pageParams:T(S.pageParams,E,j)}};if(i&&l.length){const S=i==="backward",E=S?P6:VO,C={pages:l,pageParams:s},A=E(r,C);u=await x(C,A,S)}else{const S=e??l.length;do{const E=f===0?s[0]??r.initialPageParam:VO(r,u);if(f>0&&E==null)break;u=await x(u,E),f++}while(f<S)}return u};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=h}}}function VO(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function P6(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var k6=class extends uM{#e;#t;#n;#a;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||dM(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#a?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#a=cM({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(l,s)=>{this.#r({type:"failed",failureCount:l,error:s})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",i=!this.#a.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:i}),await this.#n.config.onMutate?.(e,this,n);const s=await this.options.onMutate?.(e,n);s!==this.state.context&&this.#r({type:"pending",context:s,variables:e,isPaused:i})}const l=await this.#a.start();return await this.#n.config.onSuccess?.(l,e,this.state.context,this,n),await this.options.onSuccess?.(l,e,this.state.context,n),await this.#n.config.onSettled?.(l,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(l,null,e,this.state.context,n),this.#r({type:"success",data:l}),l}catch(l){try{throw await this.#n.config.onError?.(l,e,this.state.context,this,n),await this.options.onError?.(l,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,l,e,this.state.context,n),l}finally{this.#r({type:"error",error:l})}}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Yt.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function dM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var I6=class extends $s{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new k6({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=Vd(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Vd(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Vd(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(i=>i.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=Vd(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Yt.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>zO(t,n))}findAll(e={}){return this.getAll().filter(t=>zO(e,t))}notify(e){Yt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Yt.batch(()=>Promise.all(e.map(t=>t.continue().catch(Pn))))}};function Vd(e){return e.options.scope?.id}var L6=class extends $s{#e;#t=void 0;#n;#a;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),Ih(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&il(n.mutationKey)!==il(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#o()}mutate(t,n){return this.#a=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??dM();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){Yt.batch(()=>{if(this.#a&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#a.onSuccess?.(t.data,n,r,i),this.#a.onSettled?.(t.data,null,n,r,i)):t?.type==="error"&&(this.#a.onError?.(t.error,n,r,i),this.#a.onSettled?.(void 0,t.error,n,r,i))}this.listeners.forEach(n=>{n(this.#t)})})}},z6=class extends $s{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??fw(r,t);let l=this.get(i);return l||(l=new T6({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(l)),l}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Yt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>LO(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>LO(e,n)):t}notify(e){Yt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Yt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Yt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},$6=class{#e;#t;#n;#a;#r;#o;#l;#i;constructor(e={}){this.#e=e.queryCache||new z6,this.#t=e.mutationCache||new I6,this.#n=e.defaultOptions||{},this.#a=new Map,this.#r=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#l=hw.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=Lh.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#l?.(),this.#l=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(uo(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),l=this.#e.get(r.queryHash)?.state.data,s=x6(t,l);if(s!==void 0)return this.#e.build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return Yt.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Yt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Yt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Yt.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Pn).catch(Pn)}invalidateQueries(e,t={}){return Yt.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Yt.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let l=i.fetch(void 0,n);return n.throwOnError||(l=l.catch(Pn)),i.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(r).then(Pn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(uo(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Pn).catch(Pn)}fetchInfiniteQuery(e){return e.behavior=KO(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Pn).catch(Pn)}ensureInfiniteQueryData(e){return e.behavior=KO(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Lh.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#a.set(il(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#a.values()],n={};return t.forEach(r=>{Ou(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(il(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{Ou(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=fw(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===dw&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Cy={exports:{}},Re={};var GO;function B6(){if(GO)return Re;GO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),b=Symbol.iterator;function x(L){return L===null||typeof L!="object"?null:(L=b&&L[b]||L["@@iterator"],typeof L=="function"?L:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,C={};function A(L,z,P){this.props=L,this.context=z,this.refs=C,this.updater=P||S}A.prototype.isReactComponent={},A.prototype.setState=function(L,z){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,z,"setState")},A.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function _(){}_.prototype=A.prototype;function N(L,z,P){this.props=L,this.context=z,this.refs=C,this.updater=P||S}var j=N.prototype=new _;j.constructor=N,E(j,A.prototype),j.isPureReactComponent=!0;var T=Array.isArray;function k(){}var R={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function B(L,z,P){var W=P.ref;return{$$typeof:e,type:L,key:z,ref:W!==void 0?W:null,props:P}}function Q(L,z){return B(L.type,z,L.props)}function F(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function G(L){var z={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(P){return z[P]})}var te=/\/+/g;function ce(L,z){return typeof L=="object"&&L!==null&&L.key!=null?G(""+L.key):z.toString(36)}function he(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(k,k):(L.status="pending",L.then(function(z){L.status==="pending"&&(L.status="fulfilled",L.value=z)},function(z){L.status==="pending"&&(L.status="rejected",L.reason=z)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function I(L,z,P,W,ne){var se=typeof L;(se==="undefined"||se==="boolean")&&(L=null);var Y=!1;if(L===null)Y=!0;else switch(se){case"bigint":case"string":case"number":Y=!0;break;case"object":switch(L.$$typeof){case e:case t:Y=!0;break;case p:return Y=L._init,I(Y(L._payload),z,P,W,ne)}}if(Y)return ne=ne(L),Y=W===""?"."+ce(L,0):W,T(ne)?(P="",Y!=null&&(P=Y.replace(te,"$&/")+"/"),I(ne,z,P,"",function(me){return me})):ne!=null&&(F(ne)&&(ne=Q(ne,P+(ne.key==null||L&&L.key===ne.key?"":(""+ne.key).replace(te,"$&/")+"/")+Y)),z.push(ne)),1;Y=0;var pe=W===""?".":W+":";if(T(L))for(var V=0;V<L.length;V++)W=L[V],se=pe+ce(W,V),Y+=I(W,z,P,se,ne);else if(V=x(L),typeof V=="function")for(L=V.call(L),V=0;!(W=L.next()).done;)W=W.value,se=pe+ce(W,V++),Y+=I(W,z,P,se,ne);else if(se==="object"){if(typeof L.then=="function")return I(he(L),z,P,W,ne);throw z=String(L),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.")}return Y}function q(L,z,P){if(L==null)return L;var W=[],ne=0;return I(L,W,"","",function(se){return z.call(P,se,ne++)}),W}function H(L){if(L._status===-1){var z=L._result;z=z(),z.then(function(P){(L._status===0||L._status===-1)&&(L._status=1,L._result=P)},function(P){(L._status===0||L._status===-1)&&(L._status=2,L._result=P)}),L._status===-1&&(L._status=0,L._result=z)}if(L._status===1)return L._result.default;throw L._result}var X=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof L=="object"&&L!==null&&typeof L.message=="string"?String(L.message):String(L),error:L});if(!window.dispatchEvent(z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},ge={map:q,forEach:function(L,z,P){q(L,function(){z.apply(this,arguments)},P)},count:function(L){var z=0;return q(L,function(){z++}),z},toArray:function(L){return q(L,function(z){return z})||[]},only:function(L){if(!F(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return Re.Activity=m,Re.Children=ge,Re.Component=A,Re.Fragment=n,Re.Profiler=i,Re.PureComponent=N,Re.StrictMode=r,Re.Suspense=f,Re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,Re.__COMPILER_RUNTIME={__proto__:null,c:function(L){return R.H.useMemoCache(L)}},Re.cache=function(L){return function(){return L.apply(null,arguments)}},Re.cacheSignal=function(){return null},Re.cloneElement=function(L,z,P){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var W=E({},L.props),ne=L.key;if(z!=null)for(se in z.key!==void 0&&(ne=""+z.key),z)!D.call(z,se)||se==="key"||se==="__self"||se==="__source"||se==="ref"&&z.ref===void 0||(W[se]=z[se]);var se=arguments.length-2;if(se===1)W.children=P;else if(1<se){for(var Y=Array(se),pe=0;pe<se;pe++)Y[pe]=arguments[pe+2];W.children=Y}return B(L.type,ne,W)},Re.createContext=function(L){return L={$$typeof:s,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:l,_context:L},L},Re.createElement=function(L,z,P){var W,ne={},se=null;if(z!=null)for(W in z.key!==void 0&&(se=""+z.key),z)D.call(z,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(ne[W]=z[W]);var Y=arguments.length-2;if(Y===1)ne.children=P;else if(1<Y){for(var pe=Array(Y),V=0;V<Y;V++)pe[V]=arguments[V+2];ne.children=pe}if(L&&L.defaultProps)for(W in Y=L.defaultProps,Y)ne[W]===void 0&&(ne[W]=Y[W]);return B(L,se,ne)},Re.createRef=function(){return{current:null}},Re.forwardRef=function(L){return{$$typeof:u,render:L}},Re.isValidElement=F,Re.lazy=function(L){return{$$typeof:p,_payload:{_status:-1,_result:L},_init:H}},Re.memo=function(L,z){return{$$typeof:h,type:L,compare:z===void 0?null:z}},Re.startTransition=function(L){var z=R.T,P={};R.T=P;try{var W=L(),ne=R.S;ne!==null&&ne(P,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(k,X)}catch(se){X(se)}finally{z!==null&&P.types!==null&&(z.types=P.types),R.T=z}},Re.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},Re.use=function(L){return R.H.use(L)},Re.useActionState=function(L,z,P){return R.H.useActionState(L,z,P)},Re.useCallback=function(L,z){return R.H.useCallback(L,z)},Re.useContext=function(L){return R.H.useContext(L)},Re.useDebugValue=function(){},Re.useDeferredValue=function(L,z){return R.H.useDeferredValue(L,z)},Re.useEffect=function(L,z){return R.H.useEffect(L,z)},Re.useEffectEvent=function(L){return R.H.useEffectEvent(L)},Re.useId=function(){return R.H.useId()},Re.useImperativeHandle=function(L,z,P){return R.H.useImperativeHandle(L,z,P)},Re.useInsertionEffect=function(L,z){return R.H.useInsertionEffect(L,z)},Re.useLayoutEffect=function(L,z){return R.H.useLayoutEffect(L,z)},Re.useMemo=function(L,z){return R.H.useMemo(L,z)},Re.useOptimistic=function(L,z){return R.H.useOptimistic(L,z)},Re.useReducer=function(L,z,P){return R.H.useReducer(L,z,P)},Re.useRef=function(L){return R.H.useRef(L)},Re.useState=function(L){return R.H.useState(L)},Re.useSyncExternalStore=function(L,z,P){return R.H.useSyncExternalStore(L,z,P)},Re.useTransition=function(){return R.H.useTransition()},Re.version="19.2.1",Re}var YO;function Bs(){return YO||(YO=1,Cy.exports=B6()),Cy.exports}var v=Bs();const ee=Ma(v),Wp=p6({__proto__:null,default:ee},[v]);var hM=v.createContext(void 0),gl=e=>{const t=v.useContext(hM);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},U6=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),g.jsx(hM.Provider,{value:e,children:t})),pM=v.createContext(!1),H6=()=>v.useContext(pM);pM.Provider;function q6(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var F6=v.createContext(q6()),K6=()=>v.useContext(F6),V6=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},G6=e=>{v.useEffect(()=>{e.clearReset()},[e])},Y6=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||lM(n,[e.error,r])),W6=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},X6=(e,t)=>e.isLoading&&e.isFetching&&!t,Q6=(e,t)=>e?.suspense&&t.isPending,WO=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Z6(e,t,n){const r=H6(),i=K6(),l=gl(),s=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(s),s._optimisticResults=r?"isRestoring":"optimistic",W6(s),V6(s,i),G6(i);const u=!l.getQueryCache().get(s.queryHash),[f]=v.useState(()=>new t(l,s)),h=f.getOptimisticResult(s),p=!r&&e.subscribed!==!1;if(v.useSyncExternalStore(v.useCallback(m=>{const b=p?f.subscribe(Yt.batchCalls(m)):Pn;return f.updateResult(),b},[f,p]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),v.useEffect(()=>{f.setOptions(s)},[s,f]),Q6(s,h))throw WO(s,f,i);if(Y6({result:h,errorResetBoundary:i,throwOnError:s.throwOnError,query:l.getQueryCache().get(s.queryHash),suspense:s.suspense}))throw h.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(s,h),s.experimental_prefetchInRender&&!al&&X6(h,r)&&(u?WO(s,f,i):l.getQueryCache().get(s.queryHash)?.promise)?.catch(Pn).finally(()=>{f.updateResult()}),s.notifyOnChangeProps?h:f.trackResult(h)}function mM(e,t){return Z6(e,M6)}function Us(e,t){const n=gl(),[r]=v.useState(()=>new L6(n,e));v.useEffect(()=>{r.setOptions(e)},[r,e]);const i=v.useSyncExternalStore(v.useCallback(s=>r.subscribe(Yt.batchCalls(s)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),l=v.useCallback((s,u)=>{r.mutate(s,u).catch(Pn)},[r]);if(i.error&&lM(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:l,mutateAsync:i.mutate}}var Ay={exports:{}},au={},Oy={exports:{}},Ny={};var XO;function J6(){return XO||(XO=1,(function(e){function t(I,q){var H=I.length;I.push(q);e:for(;0<H;){var X=H-1>>>1,ge=I[X];if(0<i(ge,q))I[X]=q,I[H]=ge,H=X;else break e}}function n(I){return I.length===0?null:I[0]}function r(I){if(I.length===0)return null;var q=I[0],H=I.pop();if(H!==q){I[0]=H;e:for(var X=0,ge=I.length,L=ge>>>1;X<L;){var z=2*(X+1)-1,P=I[z],W=z+1,ne=I[W];if(0>i(P,H))W<ge&&0>i(ne,P)?(I[X]=ne,I[W]=H,X=W):(I[X]=P,I[z]=H,X=z);else if(W<ge&&0>i(ne,H))I[X]=ne,I[W]=H,X=W;else break e}}return q}function i(I,q){var H=I.sortIndex-q.sortIndex;return H!==0?H:I.id-q.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var s=Date,u=s.now();e.unstable_now=function(){return s.now()-u}}var f=[],h=[],p=1,m=null,b=3,x=!1,S=!1,E=!1,C=!1,A=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function j(I){for(var q=n(h);q!==null;){if(q.callback===null)r(h);else if(q.startTime<=I)r(h),q.sortIndex=q.expirationTime,t(f,q);else break;q=n(h)}}function T(I){if(E=!1,j(I),!S)if(n(f)!==null)S=!0,k||(k=!0,G());else{var q=n(h);q!==null&&he(T,q.startTime-I)}}var k=!1,R=-1,D=5,B=-1;function Q(){return C?!0:!(e.unstable_now()-B<D)}function F(){if(C=!1,k){var I=e.unstable_now();B=I;var q=!0;try{e:{S=!1,E&&(E=!1,_(R),R=-1),x=!0;var H=b;try{t:{for(j(I),m=n(f);m!==null&&!(m.expirationTime>I&&Q());){var X=m.callback;if(typeof X=="function"){m.callback=null,b=m.priorityLevel;var ge=X(m.expirationTime<=I);if(I=e.unstable_now(),typeof ge=="function"){m.callback=ge,j(I),q=!0;break t}m===n(f)&&r(f),j(I)}else r(f);m=n(f)}if(m!==null)q=!0;else{var L=n(h);L!==null&&he(T,L.startTime-I),q=!1}}break e}finally{m=null,b=H,x=!1}q=void 0}}finally{q?G():k=!1}}}var G;if(typeof N=="function")G=function(){N(F)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,ce=te.port2;te.port1.onmessage=F,G=function(){ce.postMessage(null)}}else G=function(){A(F,0)};function he(I,q){R=A(function(){I(e.unstable_now())},q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(I){I.callback=null},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(I){switch(b){case 1:case 2:case 3:var q=3;break;default:q=b}var H=b;b=q;try{return I()}finally{b=H}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(I,q){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var H=b;b=I;try{return q()}finally{b=H}},e.unstable_scheduleCallback=function(I,q,H){var X=e.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?X+H:X):H=X,I){case 1:var ge=-1;break;case 2:ge=250;break;case 5:ge=1073741823;break;case 4:ge=1e4;break;default:ge=5e3}return ge=H+ge,I={id:p++,callback:q,priorityLevel:I,startTime:H,expirationTime:ge,sortIndex:-1},H>X?(I.sortIndex=H,t(h,I),n(f)===null&&I===n(h)&&(E?(_(R),R=-1):E=!0,he(T,H-X))):(I.sortIndex=ge,t(f,I),S||x||(S=!0,k||(k=!0,G()))),I},e.unstable_shouldYield=Q,e.unstable_wrapCallback=function(I){var q=b;return function(){var H=b;b=q;try{return I.apply(this,arguments)}finally{b=H}}}})(Ny)),Ny}var QO;function eU(){return QO||(QO=1,Oy.exports=J6()),Oy.exports}var _y={exports:{}},_n={};var ZO;function tU(){if(ZO)return _n;ZO=1;var e=Bs();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)h+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function l(f,h,p){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:m==null?null:""+m,children:f,containerInfo:h,implementation:p}}var s=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return _n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,_n.createPortal=function(f,h){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return l(f,h,null,p)},_n.flushSync=function(f){var h=s.T,p=r.p;try{if(s.T=null,r.p=2,f)return f()}finally{s.T=h,r.p=p,r.d.f()}},_n.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(f,h))},_n.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},_n.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var p=h.as,m=u(p,h.crossOrigin),b=typeof h.integrity=="string"?h.integrity:void 0,x=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;p==="style"?r.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:m,integrity:b,fetchPriority:x}):p==="script"&&r.d.X(f,{crossOrigin:m,integrity:b,fetchPriority:x,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},_n.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var p=u(h.as,h.crossOrigin);r.d.M(f,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(f)},_n.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var p=h.as,m=u(p,h.crossOrigin);r.d.L(f,p,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},_n.preloadModule=function(f,h){if(typeof f=="string")if(h){var p=u(h.as,h.crossOrigin);r.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(f)},_n.requestFormReset=function(f){r.d.r(f)},_n.unstable_batchedUpdates=function(f,h){return f(h)},_n.useFormState=function(f,h,p){return s.H.useFormState(f,h,p)},_n.useFormStatus=function(){return s.H.useHostTransitionStatus()},_n.version="19.2.1",_n}var JO;function vM(){if(JO)return _y.exports;JO=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),_y.exports=tU(),_y.exports}var eN;function nU(){if(eN)return au;eN=1;var e=eU(),t=Bs(),n=vM();function r(a){var o="https://react.dev/errors/"+a;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)o+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+a+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function l(a){var o=a,c=a;if(a.alternate)for(;o.return;)o=o.return;else{a=o;do o=a,(o.flags&4098)!==0&&(c=o.return),a=o.return;while(a)}return o.tag===3?c:null}function s(a){if(a.tag===13){var o=a.memoizedState;if(o===null&&(a=a.alternate,a!==null&&(o=a.memoizedState)),o!==null)return o.dehydrated}return null}function u(a){if(a.tag===31){var o=a.memoizedState;if(o===null&&(a=a.alternate,a!==null&&(o=a.memoizedState)),o!==null)return o.dehydrated}return null}function f(a){if(l(a)!==a)throw Error(r(188))}function h(a){var o=a.alternate;if(!o){if(o=l(a),o===null)throw Error(r(188));return o!==a?null:a}for(var c=a,d=o;;){var y=c.return;if(y===null)break;var w=y.alternate;if(w===null){if(d=y.return,d!==null){c=d;continue}break}if(y.child===w.child){for(w=y.child;w;){if(w===c)return f(y),a;if(w===d)return f(y),o;w=w.sibling}throw Error(r(188))}if(c.return!==d.return)c=y,d=w;else{for(var O=!1,M=y.child;M;){if(M===c){O=!0,c=y,d=w;break}if(M===d){O=!0,d=y,c=w;break}M=M.sibling}if(!O){for(M=w.child;M;){if(M===c){O=!0,c=w,d=y;break}if(M===d){O=!0,d=w,c=y;break}M=M.sibling}if(!O)throw Error(r(189))}}if(c.alternate!==d)throw Error(r(190))}if(c.tag!==3)throw Error(r(188));return c.stateNode.current===c?a:o}function p(a){var o=a.tag;if(o===5||o===26||o===27||o===6)return a;for(a=a.child;a!==null;){if(o=p(a),o!==null)return o;a=a.sibling}return null}var m=Object.assign,b=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),N=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),Q=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function G(a){return a===null||typeof a!="object"?null:(a=F&&a[F]||a["@@iterator"],typeof a=="function"?a:null)}var te=Symbol.for("react.client.reference");function ce(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===te?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case E:return"Fragment";case A:return"Profiler";case C:return"StrictMode";case T:return"Suspense";case k:return"SuspenseList";case B:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case S:return"Portal";case N:return a.displayName||"Context";case _:return(a._context.displayName||"Context")+".Consumer";case j:var o=a.render;return a=a.displayName,a||(a=o.displayName||o.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case R:return o=a.displayName||null,o!==null?o:ce(a.type)||"Memo";case D:o=a._payload,a=a._init;try{return ce(a(o))}catch{}}return null}var he=Array.isArray,I=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H={pending:!1,data:null,method:null,action:null},X=[],ge=-1;function L(a){return{current:a}}function z(a){0>ge||(a.current=X[ge],X[ge]=null,ge--)}function P(a,o){ge++,X[ge]=a.current,a.current=o}var W=L(null),ne=L(null),se=L(null),Y=L(null);function pe(a,o){switch(P(se,o),P(ne,a),P(W,null),o.nodeType){case 9:case 11:a=(a=o.documentElement)&&(a=a.namespaceURI)?aO(a):0;break;default:if(a=o.tagName,o=o.namespaceURI)o=aO(o),a=iO(o,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}z(W),P(W,a)}function V(){z(W),z(ne),z(se)}function me(a){a.memoizedState!==null&&P(Y,a);var o=W.current,c=iO(o,a.type);o!==c&&(P(ne,a),P(W,c))}function ye(a){ne.current===a&&(z(W),z(ne)),Y.current===a&&(z(Y),Jc._currentValue=H)}var ie,ke;function ve(a){if(ie===void 0)try{throw Error()}catch(c){var o=c.stack.trim().match(/\n( *(at )?)/);ie=o&&o[1]||"",ke=-1<c.stack.indexOf(`
2
- at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+ie+a+ke}var Je=!1;function tt(a,o){if(!a||Je)return"";Je=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:function(){try{if(o){var de=function(){throw Error()};if(Object.defineProperty(de.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(de,[])}catch(ae){var re=ae}Reflect.construct(a,[],de)}else{try{de.call()}catch(ae){re=ae}a.call(de.prototype)}}else{try{throw Error()}catch(ae){re=ae}(de=a())&&typeof de.catch=="function"&&de.catch(function(){})}}catch(ae){if(ae&&re&&typeof ae.stack=="string")return[ae.stack,re.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var w=d.DetermineComponentFrameRoot(),O=w[0],M=w[1];if(O&&M){var $=O.split(`
4
- `),J=M.split(`
5
- `);for(y=d=0;d<$.length&&!$[d].includes("DetermineComponentFrameRoot");)d++;for(;y<J.length&&!J[y].includes("DetermineComponentFrameRoot");)y++;if(d===$.length||y===J.length)for(d=$.length-1,y=J.length-1;1<=d&&0<=y&&$[d]!==J[y];)y--;for(;1<=d&&0<=y;d--,y--)if($[d]!==J[y]){if(d!==1||y!==1)do if(d--,y--,0>y||$[d]!==J[y]){var le=`
6
- `+$[d].replace(" at new "," at ");return a.displayName&&le.includes("<anonymous>")&&(le=le.replace("<anonymous>",a.displayName)),le}while(1<=d&&0<=y);break}}}finally{Je=!1,Error.prepareStackTrace=c}return(c=a?a.displayName||a.name:"")?ve(c):""}function mt(a,o){switch(a.tag){case 26:case 27:case 5:return ve(a.type);case 16:return ve("Lazy");case 13:return a.child!==o&&o!==null?ve("Suspense Fallback"):ve("Suspense");case 19:return ve("SuspenseList");case 0:case 15:return tt(a.type,!1);case 11:return tt(a.type.render,!1);case 1:return tt(a.type,!0);case 31:return ve("Activity");default:return""}}function wr(a){try{var o="",c=null;do o+=mt(a,c),c=a,a=a.return;while(a);return o}catch(d){return`
7
- Error generating stack: `+d.message+`
8
- `+d.stack}}var Ut=Object.prototype.hasOwnProperty,An=e.unstable_scheduleCallback,Sr=e.unstable_cancelCallback,Ht=e.unstable_shouldYield,en=e.unstable_requestPaint,qt=e.unstable_now,Ot=e.unstable_getCurrentPriorityLevel,tn=e.unstable_ImmediatePriority,Gr=e.unstable_UserBlockingPriority,dn=e.unstable_NormalPriority,Yr=e.unstable_LowPriority,On=e.unstable_IdlePriority,Er=e.log,nn=e.unstable_setDisableYieldValue,rr=null,hn=null;function ar(a){if(typeof Er=="function"&&nn(a),hn&&typeof hn.setStrictMode=="function")try{hn.setStrictMode(rr,a)}catch{}}var rn=Math.clz32?Math.clz32:Oe,hc=Math.log,Oo=Math.LN2;function Oe(a){return a>>>=0,a===0?32:31-(hc(a)/Oo|0)|0}var Ue=256,Ve=262144,Ie=4194304;function Ge(a){var o=a&42;if(o!==0)return o;switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function Ce(a,o,c){var d=a.pendingLanes;if(d===0)return 0;var y=0,w=a.suspendedLanes,O=a.pingedLanes;a=a.warmLanes;var M=d&134217727;return M!==0?(d=M&~w,d!==0?y=Ge(d):(O&=M,O!==0?y=Ge(O):c||(c=M&~a,c!==0&&(y=Ge(c))))):(M=d&~w,M!==0?y=Ge(M):O!==0?y=Ge(O):c||(c=d&~a,c!==0&&(y=Ge(c)))),y===0?0:o!==0&&o!==y&&(o&w)===0&&(w=y&-y,c=o&-o,w>=c||w===32&&(c&4194048)!==0)?o:y}function Le(a,o){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&o)===0}function ut(a,o){switch(a){case 1:case 2:case 4:case 8:case 64:return o+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function it(){var a=Ie;return Ie<<=1,(Ie&62914560)===0&&(Ie=4194304),a}function Nn(a){for(var o=[],c=0;31>c;c++)o.push(a);return o}function Ye(a,o){a.pendingLanes|=o,o!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function vt(a,o,c,d,y,w){var O=a.pendingLanes;a.pendingLanes=c,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=c,a.entangledLanes&=c,a.errorRecoveryDisabledLanes&=c,a.shellSuspendCounter=0;var M=a.entanglements,$=a.expirationTimes,J=a.hiddenUpdates;for(c=O&~c;0<c;){var le=31-rn(c),de=1<<le;M[le]=0,$[le]=-1;var re=J[le];if(re!==null)for(J[le]=null,le=0;le<re.length;le++){var ae=re[le];ae!==null&&(ae.lane&=-536870913)}c&=~de}d!==0&&Cr(a,d,0),w!==0&&y===0&&a.tag!==0&&(a.suspendedLanes|=w&~(O&~o))}function Cr(a,o,c){a.pendingLanes|=o,a.suspendedLanes&=~o;var d=31-rn(o);a.entangledLanes|=o,a.entanglements[d]=a.entanglements[d]|1073741824|c&261930}function pn(a,o){var c=a.entangledLanes|=o;for(a=a.entanglements;c;){var d=31-rn(c),y=1<<d;y&o|a[d]&o&&(a[d]|=o),c&=~y}}function Un(a,o){var c=o&-o;return c=(c&42)!==0?1:Al(c),(c&(a.suspendedLanes|o))!==0?0:c}function Al(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function Wr(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function hv(){var a=q.p;return a!==0?a:(a=window.event,a===void 0?32:_O(a.type))}function FS(a,o){var c=q.p;try{return q.p=a,o()}finally{q.p=c}}var Pi=Math.random().toString(36).slice(2),mn="__reactFiber$"+Pi,Hn="__reactProps$"+Pi,Ol="__reactContainer$"+Pi,pv="__reactEvents$"+Pi,r$="__reactListeners$"+Pi,a$="__reactHandles$"+Pi,KS="__reactResources$"+Pi,pc="__reactMarker$"+Pi;function mv(a){delete a[mn],delete a[Hn],delete a[pv],delete a[r$],delete a[a$]}function Nl(a){var o=a[mn];if(o)return o;for(var c=a.parentNode;c;){if(o=c[Ol]||c[mn]){if(c=o.alternate,o.child!==null||c!==null&&c.child!==null)for(a=dO(a);a!==null;){if(c=a[mn])return c;a=dO(a)}return o}a=c,c=a.parentNode}return null}function _l(a){if(a=a[mn]||a[Ol]){var o=a.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return a}return null}function mc(a){var o=a.tag;if(o===5||o===26||o===27||o===6)return a.stateNode;throw Error(r(33))}function jl(a){var o=a[KS];return o||(o=a[KS]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function an(a){a[pc]=!0}var VS=new Set,GS={};function No(a,o){Tl(a,o),Tl(a+"Capture",o)}function Tl(a,o){for(GS[a]=o,a=0;a<o.length;a++)VS.add(o[a])}var i$=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),YS={},WS={};function o$(a){return Ut.call(WS,a)?!0:Ut.call(YS,a)?!1:i$.test(a)?WS[a]=!0:(YS[a]=!0,!1)}function Pf(a,o,c){if(o$(o))if(c===null)a.removeAttribute(o);else{switch(typeof c){case"undefined":case"function":case"symbol":a.removeAttribute(o);return;case"boolean":var d=o.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){a.removeAttribute(o);return}}a.setAttribute(o,""+c)}}function kf(a,o,c){if(c===null)a.removeAttribute(o);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(o);return}a.setAttribute(o,""+c)}}function ka(a,o,c,d){if(d===null)a.removeAttribute(c);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(c);return}a.setAttributeNS(o,c,""+d)}}function Ar(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function XS(a){var o=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function l$(a,o,c){var d=Object.getOwnPropertyDescriptor(a.constructor.prototype,o);if(!a.hasOwnProperty(o)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var y=d.get,w=d.set;return Object.defineProperty(a,o,{configurable:!0,get:function(){return y.call(this)},set:function(O){c=""+O,w.call(this,O)}}),Object.defineProperty(a,o,{enumerable:d.enumerable}),{getValue:function(){return c},setValue:function(O){c=""+O},stopTracking:function(){a._valueTracker=null,delete a[o]}}}}function vv(a){if(!a._valueTracker){var o=XS(a)?"checked":"value";a._valueTracker=l$(a,o,""+a[o])}}function QS(a){if(!a)return!1;var o=a._valueTracker;if(!o)return!0;var c=o.getValue(),d="";return a&&(d=XS(a)?a.checked?"true":"false":a.value),a=d,a!==c?(o.setValue(a),!0):!1}function If(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var s$=/[\n"\\]/g;function Or(a){return a.replace(s$,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function gv(a,o,c,d,y,w,O,M){a.name="",O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"?a.type=O:a.removeAttribute("type"),o!=null?O==="number"?(o===0&&a.value===""||a.value!=o)&&(a.value=""+Ar(o)):a.value!==""+Ar(o)&&(a.value=""+Ar(o)):O!=="submit"&&O!=="reset"||a.removeAttribute("value"),o!=null?yv(a,O,Ar(o)):c!=null?yv(a,O,Ar(c)):d!=null&&a.removeAttribute("value"),y==null&&w!=null&&(a.defaultChecked=!!w),y!=null&&(a.checked=y&&typeof y!="function"&&typeof y!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?a.name=""+Ar(M):a.removeAttribute("name")}function ZS(a,o,c,d,y,w,O,M){if(w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(a.type=w),o!=null||c!=null){if(!(w!=="submit"&&w!=="reset"||o!=null)){vv(a);return}c=c!=null?""+Ar(c):"",o=o!=null?""+Ar(o):c,M||o===a.value||(a.value=o),a.defaultValue=o}d=d??y,d=typeof d!="function"&&typeof d!="symbol"&&!!d,a.checked=M?a.checked:!!d,a.defaultChecked=!!d,O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(a.name=O),vv(a)}function yv(a,o,c){o==="number"&&If(a.ownerDocument)===a||a.defaultValue===""+c||(a.defaultValue=""+c)}function Ml(a,o,c,d){if(a=a.options,o){o={};for(var y=0;y<c.length;y++)o["$"+c[y]]=!0;for(c=0;c<a.length;c++)y=o.hasOwnProperty("$"+a[c].value),a[c].selected!==y&&(a[c].selected=y),y&&d&&(a[c].defaultSelected=!0)}else{for(c=""+Ar(c),o=null,y=0;y<a.length;y++){if(a[y].value===c){a[y].selected=!0,d&&(a[y].defaultSelected=!0);return}o!==null||a[y].disabled||(o=a[y])}o!==null&&(o.selected=!0)}}function JS(a,o,c){if(o!=null&&(o=""+Ar(o),o!==a.value&&(a.value=o),c==null)){a.defaultValue!==o&&(a.defaultValue=o);return}a.defaultValue=c!=null?""+Ar(c):""}function eE(a,o,c,d){if(o==null){if(d!=null){if(c!=null)throw Error(r(92));if(he(d)){if(1<d.length)throw Error(r(93));d=d[0]}c=d}c==null&&(c=""),o=c}c=Ar(o),a.defaultValue=c,d=a.textContent,d===c&&d!==""&&d!==null&&(a.value=d),vv(a)}function Rl(a,o){if(o){var c=a.firstChild;if(c&&c===a.lastChild&&c.nodeType===3){c.nodeValue=o;return}}a.textContent=o}var c$=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function tE(a,o,c){var d=o.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?d?a.setProperty(o,""):o==="float"?a.cssFloat="":a[o]="":d?a.setProperty(o,c):typeof c!="number"||c===0||c$.has(o)?o==="float"?a.cssFloat=c:a[o]=(""+c).trim():a[o]=c+"px"}function nE(a,o,c){if(o!=null&&typeof o!="object")throw Error(r(62));if(a=a.style,c!=null){for(var d in c)!c.hasOwnProperty(d)||o!=null&&o.hasOwnProperty(d)||(d.indexOf("--")===0?a.setProperty(d,""):d==="float"?a.cssFloat="":a[d]="");for(var y in o)d=o[y],o.hasOwnProperty(y)&&c[y]!==d&&tE(a,y,d)}else for(var w in o)o.hasOwnProperty(w)&&tE(a,w,o[w])}function bv(a){if(a.indexOf("-")===-1)return!1;switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var u$=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),f$=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Lf(a){return f$.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function Ia(){}var xv=null;function wv(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Dl=null,Pl=null;function rE(a){var o=_l(a);if(o&&(a=o.stateNode)){var c=a[Hn]||null;e:switch(a=o.stateNode,o.type){case"input":if(gv(a,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),o=c.name,c.type==="radio"&&o!=null){for(c=a;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+Or(""+o)+'"][type="radio"]'),o=0;o<c.length;o++){var d=c[o];if(d!==a&&d.form===a.form){var y=d[Hn]||null;if(!y)throw Error(r(90));gv(d,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(o=0;o<c.length;o++)d=c[o],d.form===a.form&&QS(d)}break e;case"textarea":JS(a,c.value,c.defaultValue);break e;case"select":o=c.value,o!=null&&Ml(a,!!c.multiple,o,!1)}}}var Sv=!1;function aE(a,o,c){if(Sv)return a(o,c);Sv=!0;try{var d=a(o);return d}finally{if(Sv=!1,(Dl!==null||Pl!==null)&&(Cd(),Dl&&(o=Dl,a=Pl,Pl=Dl=null,rE(o),a)))for(o=0;o<a.length;o++)rE(a[o])}}function vc(a,o){var c=a.stateNode;if(c===null)return null;var d=c[Hn]||null;if(d===null)return null;c=d[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(a=a.type,d=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!d;break e;default:a=!1}if(a)return null;if(c&&typeof c!="function")throw Error(r(231,o,typeof c));return c}var La=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ev=!1;if(La)try{var gc={};Object.defineProperty(gc,"passive",{get:function(){Ev=!0}}),window.addEventListener("test",gc,gc),window.removeEventListener("test",gc,gc)}catch{Ev=!1}var ki=null,Cv=null,zf=null;function iE(){if(zf)return zf;var a,o=Cv,c=o.length,d,y="value"in ki?ki.value:ki.textContent,w=y.length;for(a=0;a<c&&o[a]===y[a];a++);var O=c-a;for(d=1;d<=O&&o[c-d]===y[w-d];d++);return zf=y.slice(a,1<d?1-d:void 0)}function $f(a){var o=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&o===13&&(a=13)):a=o,a===10&&(a=13),32<=a||a===13?a:0}function Bf(){return!0}function oE(){return!1}function qn(a){function o(c,d,y,w,O){this._reactName=c,this._targetInst=y,this.type=d,this.nativeEvent=w,this.target=O,this.currentTarget=null;for(var M in a)a.hasOwnProperty(M)&&(c=a[M],this[M]=c?c(w):w[M]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?Bf:oE,this.isPropagationStopped=oE,this}return m(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Bf)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Bf)},persist:function(){},isPersistent:Bf}),o}var _o={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Uf=qn(_o),yc=m({},_o,{view:0,detail:0}),d$=qn(yc),Av,Ov,bc,Hf=m({},yc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_v,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==bc&&(bc&&a.type==="mousemove"?(Av=a.screenX-bc.screenX,Ov=a.screenY-bc.screenY):Ov=Av=0,bc=a),Av)},movementY:function(a){return"movementY"in a?a.movementY:Ov}}),lE=qn(Hf),h$=m({},Hf,{dataTransfer:0}),p$=qn(h$),m$=m({},yc,{relatedTarget:0}),Nv=qn(m$),v$=m({},_o,{animationName:0,elapsedTime:0,pseudoElement:0}),g$=qn(v$),y$=m({},_o,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),b$=qn(y$),x$=m({},_o,{data:0}),sE=qn(x$),w$={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},S$={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},E$={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function C$(a){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(a):(a=E$[a])?!!o[a]:!1}function _v(){return C$}var A$=m({},yc,{key:function(a){if(a.key){var o=w$[a.key]||a.key;if(o!=="Unidentified")return o}return a.type==="keypress"?(a=$f(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?S$[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_v,charCode:function(a){return a.type==="keypress"?$f(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?$f(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),O$=qn(A$),N$=m({},Hf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cE=qn(N$),_$=m({},yc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_v}),j$=qn(_$),T$=m({},_o,{propertyName:0,elapsedTime:0,pseudoElement:0}),M$=qn(T$),R$=m({},Hf,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),D$=qn(R$),P$=m({},_o,{newState:0,oldState:0}),k$=qn(P$),I$=[9,13,27,32],jv=La&&"CompositionEvent"in window,xc=null;La&&"documentMode"in document&&(xc=document.documentMode);var L$=La&&"TextEvent"in window&&!xc,uE=La&&(!jv||xc&&8<xc&&11>=xc),fE=" ",dE=!1;function hE(a,o){switch(a){case"keyup":return I$.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function pE(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var kl=!1;function z$(a,o){switch(a){case"compositionend":return pE(o);case"keypress":return o.which!==32?null:(dE=!0,fE);case"textInput":return a=o.data,a===fE&&dE?null:a;default:return null}}function $$(a,o){if(kl)return a==="compositionend"||!jv&&hE(a,o)?(a=iE(),zf=Cv=ki=null,kl=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return uE&&o.locale!=="ko"?null:o.data;default:return null}}var B$={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function mE(a){var o=a&&a.nodeName&&a.nodeName.toLowerCase();return o==="input"?!!B$[a.type]:o==="textarea"}function vE(a,o,c,d){Dl?Pl?Pl.push(d):Pl=[d]:Dl=d,o=Md(o,"onChange"),0<o.length&&(c=new Uf("onChange","change",null,c,d),a.push({event:c,listeners:o}))}var wc=null,Sc=null;function U$(a){ZA(a,0)}function qf(a){var o=mc(a);if(QS(o))return a}function gE(a,o){if(a==="change")return o}var yE=!1;if(La){var Tv;if(La){var Mv="oninput"in document;if(!Mv){var bE=document.createElement("div");bE.setAttribute("oninput","return;"),Mv=typeof bE.oninput=="function"}Tv=Mv}else Tv=!1;yE=Tv&&(!document.documentMode||9<document.documentMode)}function xE(){wc&&(wc.detachEvent("onpropertychange",wE),Sc=wc=null)}function wE(a){if(a.propertyName==="value"&&qf(Sc)){var o=[];vE(o,Sc,a,wv(a)),aE(U$,o)}}function H$(a,o,c){a==="focusin"?(xE(),wc=o,Sc=c,wc.attachEvent("onpropertychange",wE)):a==="focusout"&&xE()}function q$(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return qf(Sc)}function F$(a,o){if(a==="click")return qf(o)}function K$(a,o){if(a==="input"||a==="change")return qf(o)}function V$(a,o){return a===o&&(a!==0||1/a===1/o)||a!==a&&o!==o}var ir=typeof Object.is=="function"?Object.is:V$;function Ec(a,o){if(ir(a,o))return!0;if(typeof a!="object"||a===null||typeof o!="object"||o===null)return!1;var c=Object.keys(a),d=Object.keys(o);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++){var y=c[d];if(!Ut.call(o,y)||!ir(a[y],o[y]))return!1}return!0}function SE(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function EE(a,o){var c=SE(a);a=0;for(var d;c;){if(c.nodeType===3){if(d=a+c.textContent.length,a<=o&&d>=o)return{node:c,offset:o-a};a=d}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=SE(c)}}function CE(a,o){return a&&o?a===o?!0:a&&a.nodeType===3?!1:o&&o.nodeType===3?CE(a,o.parentNode):"contains"in a?a.contains(o):a.compareDocumentPosition?!!(a.compareDocumentPosition(o)&16):!1:!1}function AE(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var o=If(a.document);o instanceof a.HTMLIFrameElement;){try{var c=typeof o.contentWindow.location.href=="string"}catch{c=!1}if(c)a=o.contentWindow;else break;o=If(a.document)}return o}function Rv(a){var o=a&&a.nodeName&&a.nodeName.toLowerCase();return o&&(o==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||o==="textarea"||a.contentEditable==="true")}var G$=La&&"documentMode"in document&&11>=document.documentMode,Il=null,Dv=null,Cc=null,Pv=!1;function OE(a,o,c){var d=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Pv||Il==null||Il!==If(d)||(d=Il,"selectionStart"in d&&Rv(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Cc&&Ec(Cc,d)||(Cc=d,d=Md(Dv,"onSelect"),0<d.length&&(o=new Uf("onSelect","select",null,o,c),a.push({event:o,listeners:d}),o.target=Il)))}function jo(a,o){var c={};return c[a.toLowerCase()]=o.toLowerCase(),c["Webkit"+a]="webkit"+o,c["Moz"+a]="moz"+o,c}var Ll={animationend:jo("Animation","AnimationEnd"),animationiteration:jo("Animation","AnimationIteration"),animationstart:jo("Animation","AnimationStart"),transitionrun:jo("Transition","TransitionRun"),transitionstart:jo("Transition","TransitionStart"),transitioncancel:jo("Transition","TransitionCancel"),transitionend:jo("Transition","TransitionEnd")},kv={},NE={};La&&(NE=document.createElement("div").style,"AnimationEvent"in window||(delete Ll.animationend.animation,delete Ll.animationiteration.animation,delete Ll.animationstart.animation),"TransitionEvent"in window||delete Ll.transitionend.transition);function To(a){if(kv[a])return kv[a];if(!Ll[a])return a;var o=Ll[a],c;for(c in o)if(o.hasOwnProperty(c)&&c in NE)return kv[a]=o[c];return a}var _E=To("animationend"),jE=To("animationiteration"),TE=To("animationstart"),Y$=To("transitionrun"),W$=To("transitionstart"),X$=To("transitioncancel"),ME=To("transitionend"),RE=new Map,Iv="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Iv.push("scrollEnd");function Xr(a,o){RE.set(a,o),No(o,[a])}var Ff=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},Nr=[],zl=0,Lv=0;function Kf(){for(var a=zl,o=Lv=zl=0;o<a;){var c=Nr[o];Nr[o++]=null;var d=Nr[o];Nr[o++]=null;var y=Nr[o];Nr[o++]=null;var w=Nr[o];if(Nr[o++]=null,d!==null&&y!==null){var O=d.pending;O===null?y.next=y:(y.next=O.next,O.next=y),d.pending=y}w!==0&&DE(c,y,w)}}function Vf(a,o,c,d){Nr[zl++]=a,Nr[zl++]=o,Nr[zl++]=c,Nr[zl++]=d,Lv|=d,a.lanes|=d,a=a.alternate,a!==null&&(a.lanes|=d)}function zv(a,o,c,d){return Vf(a,o,c,d),Gf(a)}function Mo(a,o){return Vf(a,null,null,o),Gf(a)}function DE(a,o,c){a.lanes|=c;var d=a.alternate;d!==null&&(d.lanes|=c);for(var y=!1,w=a.return;w!==null;)w.childLanes|=c,d=w.alternate,d!==null&&(d.childLanes|=c),w.tag===22&&(a=w.stateNode,a===null||a._visibility&1||(y=!0)),a=w,w=w.return;return a.tag===3?(w=a.stateNode,y&&o!==null&&(y=31-rn(c),a=w.hiddenUpdates,d=a[y],d===null?a[y]=[o]:d.push(o),o.lane=c|536870912),w):null}function Gf(a){if(50<Vc)throw Vc=0,Gg=null,Error(r(185));for(var o=a.return;o!==null;)a=o,o=a.return;return a.tag===3?a.stateNode:null}var $l={};function Q$(a,o,c,d){this.tag=a,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function or(a,o,c,d){return new Q$(a,o,c,d)}function $v(a){return a=a.prototype,!(!a||!a.isReactComponent)}function za(a,o){var c=a.alternate;return c===null?(c=or(a.tag,o,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=o,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=a.flags&65011712,c.childLanes=a.childLanes,c.lanes=a.lanes,c.child=a.child,c.memoizedProps=a.memoizedProps,c.memoizedState=a.memoizedState,c.updateQueue=a.updateQueue,o=a.dependencies,c.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},c.sibling=a.sibling,c.index=a.index,c.ref=a.ref,c.refCleanup=a.refCleanup,c}function PE(a,o){a.flags&=65011714;var c=a.alternate;return c===null?(a.childLanes=0,a.lanes=o,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=c.childLanes,a.lanes=c.lanes,a.child=c.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=c.memoizedProps,a.memoizedState=c.memoizedState,a.updateQueue=c.updateQueue,a.type=c.type,o=c.dependencies,a.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),a}function Yf(a,o,c,d,y,w){var O=0;if(d=a,typeof a=="function")$v(a)&&(O=1);else if(typeof a=="string")O=n6(a,c,W.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case B:return a=or(31,c,o,y),a.elementType=B,a.lanes=w,a;case E:return Ro(c.children,y,w,o);case C:O=8,y|=24;break;case A:return a=or(12,c,o,y|2),a.elementType=A,a.lanes=w,a;case T:return a=or(13,c,o,y),a.elementType=T,a.lanes=w,a;case k:return a=or(19,c,o,y),a.elementType=k,a.lanes=w,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case N:O=10;break e;case _:O=9;break e;case j:O=11;break e;case R:O=14;break e;case D:O=16,d=null;break e}O=29,c=Error(r(130,a===null?"null":typeof a,"")),d=null}return o=or(O,c,o,y),o.elementType=a,o.type=d,o.lanes=w,o}function Ro(a,o,c,d){return a=or(7,a,d,o),a.lanes=c,a}function Bv(a,o,c){return a=or(6,a,null,o),a.lanes=c,a}function kE(a){var o=or(18,null,null,0);return o.stateNode=a,o}function Uv(a,o,c){return o=or(4,a.children!==null?a.children:[],a.key,o),o.lanes=c,o.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},o}var IE=new WeakMap;function _r(a,o){if(typeof a=="object"&&a!==null){var c=IE.get(a);return c!==void 0?c:(o={value:a,source:o,stack:wr(o)},IE.set(a,o),o)}return{value:a,source:o,stack:wr(o)}}var Bl=[],Ul=0,Wf=null,Ac=0,jr=[],Tr=0,Ii=null,da=1,ha="";function $a(a,o){Bl[Ul++]=Ac,Bl[Ul++]=Wf,Wf=a,Ac=o}function LE(a,o,c){jr[Tr++]=da,jr[Tr++]=ha,jr[Tr++]=Ii,Ii=a;var d=da;a=ha;var y=32-rn(d)-1;d&=~(1<<y),c+=1;var w=32-rn(o)+y;if(30<w){var O=y-y%5;w=(d&(1<<O)-1).toString(32),d>>=O,y-=O,da=1<<32-rn(o)+y|c<<y|d,ha=w+a}else da=1<<w|c<<y|d,ha=a}function Hv(a){a.return!==null&&($a(a,1),LE(a,1,0))}function qv(a){for(;a===Wf;)Wf=Bl[--Ul],Bl[Ul]=null,Ac=Bl[--Ul],Bl[Ul]=null;for(;a===Ii;)Ii=jr[--Tr],jr[Tr]=null,ha=jr[--Tr],jr[Tr]=null,da=jr[--Tr],jr[Tr]=null}function zE(a,o){jr[Tr++]=da,jr[Tr++]=ha,jr[Tr++]=Ii,da=o.id,ha=o.overflow,Ii=a}var vn=null,gt=null,Fe=!1,Li=null,Mr=!1,Fv=Error(r(519));function zi(a){var o=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Oc(_r(o,a)),Fv}function $E(a){var o=a.stateNode,c=a.type,d=a.memoizedProps;switch(o[mn]=a,o[Hn]=d,c){case"dialog":Be("cancel",o),Be("close",o);break;case"iframe":case"object":case"embed":Be("load",o);break;case"video":case"audio":for(c=0;c<Yc.length;c++)Be(Yc[c],o);break;case"source":Be("error",o);break;case"img":case"image":case"link":Be("error",o),Be("load",o);break;case"details":Be("toggle",o);break;case"input":Be("invalid",o),ZS(o,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"select":Be("invalid",o);break;case"textarea":Be("invalid",o),eE(o,d.value,d.defaultValue,d.children)}c=d.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||o.textContent===""+c||d.suppressHydrationWarning===!0||nO(o.textContent,c)?(d.popover!=null&&(Be("beforetoggle",o),Be("toggle",o)),d.onScroll!=null&&Be("scroll",o),d.onScrollEnd!=null&&Be("scrollend",o),d.onClick!=null&&(o.onclick=Ia),o=!0):o=!1,o||zi(a,!0)}function BE(a){for(vn=a.return;vn;)switch(vn.tag){case 5:case 31:case 13:Mr=!1;return;case 27:case 3:Mr=!0;return;default:vn=vn.return}}function Hl(a){if(a!==vn)return!1;if(!Fe)return BE(a),Fe=!0,!1;var o=a.tag,c;if((c=o!==3&&o!==27)&&((c=o===5)&&(c=a.type,c=!(c!=="form"&&c!=="button")||sy(a.type,a.memoizedProps)),c=!c),c&&gt&&zi(a),BE(a),o===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));gt=fO(a)}else if(o===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));gt=fO(a)}else o===27?(o=gt,Zi(a.type)?(a=hy,hy=null,gt=a):gt=o):gt=vn?Dr(a.stateNode.nextSibling):null;return!0}function Do(){gt=vn=null,Fe=!1}function Kv(){var a=Li;return a!==null&&(Gn===null?Gn=a:Gn.push.apply(Gn,a),Li=null),a}function Oc(a){Li===null?Li=[a]:Li.push(a)}var Vv=L(null),Po=null,Ba=null;function $i(a,o,c){P(Vv,o._currentValue),o._currentValue=c}function Ua(a){a._currentValue=Vv.current,z(Vv)}function Gv(a,o,c){for(;a!==null;){var d=a.alternate;if((a.childLanes&o)!==o?(a.childLanes|=o,d!==null&&(d.childLanes|=o)):d!==null&&(d.childLanes&o)!==o&&(d.childLanes|=o),a===c)break;a=a.return}}function Yv(a,o,c,d){var y=a.child;for(y!==null&&(y.return=a);y!==null;){var w=y.dependencies;if(w!==null){var O=y.child;w=w.firstContext;e:for(;w!==null;){var M=w;w=y;for(var $=0;$<o.length;$++)if(M.context===o[$]){w.lanes|=c,M=w.alternate,M!==null&&(M.lanes|=c),Gv(w.return,c,a),d||(O=null);break e}w=M.next}}else if(y.tag===18){if(O=y.return,O===null)throw Error(r(341));O.lanes|=c,w=O.alternate,w!==null&&(w.lanes|=c),Gv(O,c,a),O=null}else O=y.child;if(O!==null)O.return=y;else for(O=y;O!==null;){if(O===a){O=null;break}if(y=O.sibling,y!==null){y.return=O.return,O=y;break}O=O.return}y=O}}function ql(a,o,c,d){a=null;for(var y=o,w=!1;y!==null;){if(!w){if((y.flags&524288)!==0)w=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var O=y.alternate;if(O===null)throw Error(r(387));if(O=O.memoizedProps,O!==null){var M=y.type;ir(y.pendingProps.value,O.value)||(a!==null?a.push(M):a=[M])}}else if(y===Y.current){if(O=y.alternate,O===null)throw Error(r(387));O.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(a!==null?a.push(Jc):a=[Jc])}y=y.return}a!==null&&Yv(o,a,c,d),o.flags|=262144}function Xf(a){for(a=a.firstContext;a!==null;){if(!ir(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function ko(a){Po=a,Ba=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function gn(a){return UE(Po,a)}function Qf(a,o){return Po===null&&ko(a),UE(a,o)}function UE(a,o){var c=o._currentValue;if(o={context:o,memoizedValue:c,next:null},Ba===null){if(a===null)throw Error(r(308));Ba=o,a.dependencies={lanes:0,firstContext:o},a.flags|=524288}else Ba=Ba.next=o;return c}var Z$=typeof AbortController<"u"?AbortController:function(){var a=[],o=this.signal={aborted:!1,addEventListener:function(c,d){a.push(d)}};this.abort=function(){o.aborted=!0,a.forEach(function(c){return c()})}},J$=e.unstable_scheduleCallback,eB=e.unstable_NormalPriority,Pt={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Wv(){return{controller:new Z$,data:new Map,refCount:0}}function Nc(a){a.refCount--,a.refCount===0&&J$(eB,function(){a.controller.abort()})}var _c=null,Xv=0,Fl=0,Kl=null;function tB(a,o){if(_c===null){var c=_c=[];Xv=0,Fl=Jg(),Kl={status:"pending",value:void 0,then:function(d){c.push(d)}}}return Xv++,o.then(HE,HE),o}function HE(){if(--Xv===0&&_c!==null){Kl!==null&&(Kl.status="fulfilled");var a=_c;_c=null,Fl=0,Kl=null;for(var o=0;o<a.length;o++)(0,a[o])()}}function nB(a,o){var c=[],d={status:"pending",value:null,reason:null,then:function(y){c.push(y)}};return a.then(function(){d.status="fulfilled",d.value=o;for(var y=0;y<c.length;y++)(0,c[y])(o)},function(y){for(d.status="rejected",d.reason=y,y=0;y<c.length;y++)(0,c[y])(void 0)}),d}var qE=I.S;I.S=function(a,o){OA=qt(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&tB(a,o),qE!==null&&qE(a,o)};var Io=L(null);function Qv(){var a=Io.current;return a!==null?a:ft.pooledCache}function Zf(a,o){o===null?P(Io,Io.current):P(Io,o.pool)}function FE(){var a=Qv();return a===null?null:{parent:Pt._currentValue,pool:a}}var Vl=Error(r(460)),Zv=Error(r(474)),Jf=Error(r(542)),ed={then:function(){}};function KE(a){return a=a.status,a==="fulfilled"||a==="rejected"}function VE(a,o,c){switch(c=a[c],c===void 0?a.push(o):c!==o&&(o.then(Ia,Ia),o=c),o.status){case"fulfilled":return o.value;case"rejected":throw a=o.reason,YE(a),a;default:if(typeof o.status=="string")o.then(Ia,Ia);else{if(a=ft,a!==null&&100<a.shellSuspendCounter)throw Error(r(482));a=o,a.status="pending",a.then(function(d){if(o.status==="pending"){var y=o;y.status="fulfilled",y.value=d}},function(d){if(o.status==="pending"){var y=o;y.status="rejected",y.reason=d}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw a=o.reason,YE(a),a}throw zo=o,Vl}}function Lo(a){try{var o=a._init;return o(a._payload)}catch(c){throw c!==null&&typeof c=="object"&&typeof c.then=="function"?(zo=c,Vl):c}}var zo=null;function GE(){if(zo===null)throw Error(r(459));var a=zo;return zo=null,a}function YE(a){if(a===Vl||a===Jf)throw Error(r(483))}var Gl=null,jc=0;function td(a){var o=jc;return jc+=1,Gl===null&&(Gl=[]),VE(Gl,a,o)}function Tc(a,o){o=o.props.ref,a.ref=o!==void 0?o:null}function nd(a,o){throw o.$$typeof===b?Error(r(525)):(a=Object.prototype.toString.call(o),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":a)))}function WE(a){function o(K,U){if(a){var Z=K.deletions;Z===null?(K.deletions=[U],K.flags|=16):Z.push(U)}}function c(K,U){if(!a)return null;for(;U!==null;)o(K,U),U=U.sibling;return null}function d(K){for(var U=new Map;K!==null;)K.key!==null?U.set(K.key,K):U.set(K.index,K),K=K.sibling;return U}function y(K,U){return K=za(K,U),K.index=0,K.sibling=null,K}function w(K,U,Z){return K.index=Z,a?(Z=K.alternate,Z!==null?(Z=Z.index,Z<U?(K.flags|=67108866,U):Z):(K.flags|=67108866,U)):(K.flags|=1048576,U)}function O(K){return a&&K.alternate===null&&(K.flags|=67108866),K}function M(K,U,Z,ue){return U===null||U.tag!==6?(U=Bv(Z,K.mode,ue),U.return=K,U):(U=y(U,Z),U.return=K,U)}function $(K,U,Z,ue){var _e=Z.type;return _e===E?le(K,U,Z.props.children,ue,Z.key):U!==null&&(U.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===D&&Lo(_e)===U.type)?(U=y(U,Z.props),Tc(U,Z),U.return=K,U):(U=Yf(Z.type,Z.key,Z.props,null,K.mode,ue),Tc(U,Z),U.return=K,U)}function J(K,U,Z,ue){return U===null||U.tag!==4||U.stateNode.containerInfo!==Z.containerInfo||U.stateNode.implementation!==Z.implementation?(U=Uv(Z,K.mode,ue),U.return=K,U):(U=y(U,Z.children||[]),U.return=K,U)}function le(K,U,Z,ue,_e){return U===null||U.tag!==7?(U=Ro(Z,K.mode,ue,_e),U.return=K,U):(U=y(U,Z),U.return=K,U)}function de(K,U,Z){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return U=Bv(""+U,K.mode,Z),U.return=K,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case x:return Z=Yf(U.type,U.key,U.props,null,K.mode,Z),Tc(Z,U),Z.return=K,Z;case S:return U=Uv(U,K.mode,Z),U.return=K,U;case D:return U=Lo(U),de(K,U,Z)}if(he(U)||G(U))return U=Ro(U,K.mode,Z,null),U.return=K,U;if(typeof U.then=="function")return de(K,td(U),Z);if(U.$$typeof===N)return de(K,Qf(K,U),Z);nd(K,U)}return null}function re(K,U,Z,ue){var _e=U!==null?U.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return _e!==null?null:M(K,U,""+Z,ue);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case x:return Z.key===_e?$(K,U,Z,ue):null;case S:return Z.key===_e?J(K,U,Z,ue):null;case D:return Z=Lo(Z),re(K,U,Z,ue)}if(he(Z)||G(Z))return _e!==null?null:le(K,U,Z,ue,null);if(typeof Z.then=="function")return re(K,U,td(Z),ue);if(Z.$$typeof===N)return re(K,U,Qf(K,Z),ue);nd(K,Z)}return null}function ae(K,U,Z,ue,_e){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return K=K.get(Z)||null,M(U,K,""+ue,_e);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case x:return K=K.get(ue.key===null?Z:ue.key)||null,$(U,K,ue,_e);case S:return K=K.get(ue.key===null?Z:ue.key)||null,J(U,K,ue,_e);case D:return ue=Lo(ue),ae(K,U,Z,ue,_e)}if(he(ue)||G(ue))return K=K.get(Z)||null,le(U,K,ue,_e,null);if(typeof ue.then=="function")return ae(K,U,Z,td(ue),_e);if(ue.$$typeof===N)return ae(K,U,Z,Qf(U,ue),_e);nd(U,ue)}return null}function we(K,U,Z,ue){for(var _e=null,We=null,Ae=U,Pe=U=0,qe=null;Ae!==null&&Pe<Z.length;Pe++){Ae.index>Pe?(qe=Ae,Ae=null):qe=Ae.sibling;var Xe=re(K,Ae,Z[Pe],ue);if(Xe===null){Ae===null&&(Ae=qe);break}a&&Ae&&Xe.alternate===null&&o(K,Ae),U=w(Xe,U,Pe),We===null?_e=Xe:We.sibling=Xe,We=Xe,Ae=qe}if(Pe===Z.length)return c(K,Ae),Fe&&$a(K,Pe),_e;if(Ae===null){for(;Pe<Z.length;Pe++)Ae=de(K,Z[Pe],ue),Ae!==null&&(U=w(Ae,U,Pe),We===null?_e=Ae:We.sibling=Ae,We=Ae);return Fe&&$a(K,Pe),_e}for(Ae=d(Ae);Pe<Z.length;Pe++)qe=ae(Ae,K,Pe,Z[Pe],ue),qe!==null&&(a&&qe.alternate!==null&&Ae.delete(qe.key===null?Pe:qe.key),U=w(qe,U,Pe),We===null?_e=qe:We.sibling=qe,We=qe);return a&&Ae.forEach(function(ro){return o(K,ro)}),Fe&&$a(K,Pe),_e}function Me(K,U,Z,ue){if(Z==null)throw Error(r(151));for(var _e=null,We=null,Ae=U,Pe=U=0,qe=null,Xe=Z.next();Ae!==null&&!Xe.done;Pe++,Xe=Z.next()){Ae.index>Pe?(qe=Ae,Ae=null):qe=Ae.sibling;var ro=re(K,Ae,Xe.value,ue);if(ro===null){Ae===null&&(Ae=qe);break}a&&Ae&&ro.alternate===null&&o(K,Ae),U=w(ro,U,Pe),We===null?_e=ro:We.sibling=ro,We=ro,Ae=qe}if(Xe.done)return c(K,Ae),Fe&&$a(K,Pe),_e;if(Ae===null){for(;!Xe.done;Pe++,Xe=Z.next())Xe=de(K,Xe.value,ue),Xe!==null&&(U=w(Xe,U,Pe),We===null?_e=Xe:We.sibling=Xe,We=Xe);return Fe&&$a(K,Pe),_e}for(Ae=d(Ae);!Xe.done;Pe++,Xe=Z.next())Xe=ae(Ae,K,Pe,Xe.value,ue),Xe!==null&&(a&&Xe.alternate!==null&&Ae.delete(Xe.key===null?Pe:Xe.key),U=w(Xe,U,Pe),We===null?_e=Xe:We.sibling=Xe,We=Xe);return a&&Ae.forEach(function(h6){return o(K,h6)}),Fe&&$a(K,Pe),_e}function st(K,U,Z,ue){if(typeof Z=="object"&&Z!==null&&Z.type===E&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case x:e:{for(var _e=Z.key;U!==null;){if(U.key===_e){if(_e=Z.type,_e===E){if(U.tag===7){c(K,U.sibling),ue=y(U,Z.props.children),ue.return=K,K=ue;break e}}else if(U.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===D&&Lo(_e)===U.type){c(K,U.sibling),ue=y(U,Z.props),Tc(ue,Z),ue.return=K,K=ue;break e}c(K,U);break}else o(K,U);U=U.sibling}Z.type===E?(ue=Ro(Z.props.children,K.mode,ue,Z.key),ue.return=K,K=ue):(ue=Yf(Z.type,Z.key,Z.props,null,K.mode,ue),Tc(ue,Z),ue.return=K,K=ue)}return O(K);case S:e:{for(_e=Z.key;U!==null;){if(U.key===_e)if(U.tag===4&&U.stateNode.containerInfo===Z.containerInfo&&U.stateNode.implementation===Z.implementation){c(K,U.sibling),ue=y(U,Z.children||[]),ue.return=K,K=ue;break e}else{c(K,U);break}else o(K,U);U=U.sibling}ue=Uv(Z,K.mode,ue),ue.return=K,K=ue}return O(K);case D:return Z=Lo(Z),st(K,U,Z,ue)}if(he(Z))return we(K,U,Z,ue);if(G(Z)){if(_e=G(Z),typeof _e!="function")throw Error(r(150));return Z=_e.call(Z),Me(K,U,Z,ue)}if(typeof Z.then=="function")return st(K,U,td(Z),ue);if(Z.$$typeof===N)return st(K,U,Qf(K,Z),ue);nd(K,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,U!==null&&U.tag===6?(c(K,U.sibling),ue=y(U,Z),ue.return=K,K=ue):(c(K,U),ue=Bv(Z,K.mode,ue),ue.return=K,K=ue),O(K)):c(K,U)}return function(K,U,Z,ue){try{jc=0;var _e=st(K,U,Z,ue);return Gl=null,_e}catch(Ae){if(Ae===Vl||Ae===Jf)throw Ae;var We=or(29,Ae,null,K.mode);return We.lanes=ue,We.return=K,We}finally{}}}var $o=WE(!0),XE=WE(!1),Bi=!1;function Jv(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function eg(a,o){a=a.updateQueue,o.updateQueue===a&&(o.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function Ui(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function Hi(a,o,c){var d=a.updateQueue;if(d===null)return null;if(d=d.shared,(Ze&2)!==0){var y=d.pending;return y===null?o.next=o:(o.next=y.next,y.next=o),d.pending=o,o=Gf(a),DE(a,null,c),o}return Vf(a,d,o,c),Gf(a)}function Mc(a,o,c){if(o=o.updateQueue,o!==null&&(o=o.shared,(c&4194048)!==0)){var d=o.lanes;d&=a.pendingLanes,c|=d,o.lanes=c,pn(a,c)}}function tg(a,o){var c=a.updateQueue,d=a.alternate;if(d!==null&&(d=d.updateQueue,c===d)){var y=null,w=null;if(c=c.firstBaseUpdate,c!==null){do{var O={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};w===null?y=w=O:w=w.next=O,c=c.next}while(c!==null);w===null?y=w=o:w=w.next=o}else y=w=o;c={baseState:d.baseState,firstBaseUpdate:y,lastBaseUpdate:w,shared:d.shared,callbacks:d.callbacks},a.updateQueue=c;return}a=c.lastBaseUpdate,a===null?c.firstBaseUpdate=o:a.next=o,c.lastBaseUpdate=o}var ng=!1;function Rc(){if(ng){var a=Kl;if(a!==null)throw a}}function Dc(a,o,c,d){ng=!1;var y=a.updateQueue;Bi=!1;var w=y.firstBaseUpdate,O=y.lastBaseUpdate,M=y.shared.pending;if(M!==null){y.shared.pending=null;var $=M,J=$.next;$.next=null,O===null?w=J:O.next=J,O=$;var le=a.alternate;le!==null&&(le=le.updateQueue,M=le.lastBaseUpdate,M!==O&&(M===null?le.firstBaseUpdate=J:M.next=J,le.lastBaseUpdate=$))}if(w!==null){var de=y.baseState;O=0,le=J=$=null,M=w;do{var re=M.lane&-536870913,ae=re!==M.lane;if(ae?(He&re)===re:(d&re)===re){re!==0&&re===Fl&&(ng=!0),le!==null&&(le=le.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var we=a,Me=M;re=o;var st=c;switch(Me.tag){case 1:if(we=Me.payload,typeof we=="function"){de=we.call(st,de,re);break e}de=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=Me.payload,re=typeof we=="function"?we.call(st,de,re):we,re==null)break e;de=m({},de,re);break e;case 2:Bi=!0}}re=M.callback,re!==null&&(a.flags|=64,ae&&(a.flags|=8192),ae=y.callbacks,ae===null?y.callbacks=[re]:ae.push(re))}else ae={lane:re,tag:M.tag,payload:M.payload,callback:M.callback,next:null},le===null?(J=le=ae,$=de):le=le.next=ae,O|=re;if(M=M.next,M===null){if(M=y.shared.pending,M===null)break;ae=M,M=ae.next,ae.next=null,y.lastBaseUpdate=ae,y.shared.pending=null}}while(!0);le===null&&($=de),y.baseState=$,y.firstBaseUpdate=J,y.lastBaseUpdate=le,w===null&&(y.shared.lanes=0),Gi|=O,a.lanes=O,a.memoizedState=de}}function QE(a,o){if(typeof a!="function")throw Error(r(191,a));a.call(o)}function ZE(a,o){var c=a.callbacks;if(c!==null)for(a.callbacks=null,a=0;a<c.length;a++)QE(c[a],o)}var Yl=L(null),rd=L(0);function JE(a,o){a=Xa,P(rd,a),P(Yl,o),Xa=a|o.baseLanes}function rg(){P(rd,Xa),P(Yl,Yl.current)}function ag(){Xa=rd.current,z(Yl),z(rd)}var lr=L(null),Rr=null;function qi(a){var o=a.alternate;P(Mt,Mt.current&1),P(lr,a),Rr===null&&(o===null||Yl.current!==null||o.memoizedState!==null)&&(Rr=a)}function ig(a){P(Mt,Mt.current),P(lr,a),Rr===null&&(Rr=a)}function eC(a){a.tag===22?(P(Mt,Mt.current),P(lr,a),Rr===null&&(Rr=a)):Fi()}function Fi(){P(Mt,Mt.current),P(lr,lr.current)}function sr(a){z(lr),Rr===a&&(Rr=null),z(Mt)}var Mt=L(0);function ad(a){for(var o=a;o!==null;){if(o.tag===13){var c=o.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||fy(c)||dy(c)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===a)break;for(;o.sibling===null;){if(o.return===null||o.return===a)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var Ha=0,De=null,ot=null,kt=null,id=!1,Wl=!1,Bo=!1,od=0,Pc=0,Xl=null,rB=0;function Nt(){throw Error(r(321))}function og(a,o){if(o===null)return!1;for(var c=0;c<o.length&&c<a.length;c++)if(!ir(a[c],o[c]))return!1;return!0}function lg(a,o,c,d,y,w){return Ha=w,De=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,I.H=a===null||a.memoizedState===null?LC:Sg,Bo=!1,w=c(d,y),Bo=!1,Wl&&(w=nC(o,c,d,y)),tC(a),w}function tC(a){I.H=Lc;var o=ot!==null&&ot.next!==null;if(Ha=0,kt=ot=De=null,id=!1,Pc=0,Xl=null,o)throw Error(r(300));a===null||It||(a=a.dependencies,a!==null&&Xf(a)&&(It=!0))}function nC(a,o,c,d){De=a;var y=0;do{if(Wl&&(Xl=null),Pc=0,Wl=!1,25<=y)throw Error(r(301));if(y+=1,kt=ot=null,a.updateQueue!=null){var w=a.updateQueue;w.lastEffect=null,w.events=null,w.stores=null,w.memoCache!=null&&(w.memoCache.index=0)}I.H=zC,w=o(c,d)}while(Wl);return w}function aB(){var a=I.H,o=a.useState()[0];return o=typeof o.then=="function"?kc(o):o,a=a.useState()[0],(ot!==null?ot.memoizedState:null)!==a&&(De.flags|=1024),o}function sg(){var a=od!==0;return od=0,a}function cg(a,o,c){o.updateQueue=a.updateQueue,o.flags&=-2053,a.lanes&=~c}function ug(a){if(id){for(a=a.memoizedState;a!==null;){var o=a.queue;o!==null&&(o.pending=null),a=a.next}id=!1}Ha=0,kt=ot=De=null,Wl=!1,Pc=od=0,Xl=null}function Dn(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return kt===null?De.memoizedState=kt=a:kt=kt.next=a,kt}function Rt(){if(ot===null){var a=De.alternate;a=a!==null?a.memoizedState:null}else a=ot.next;var o=kt===null?De.memoizedState:kt.next;if(o!==null)kt=o,ot=a;else{if(a===null)throw De.alternate===null?Error(r(467)):Error(r(310));ot=a,a={memoizedState:ot.memoizedState,baseState:ot.baseState,baseQueue:ot.baseQueue,queue:ot.queue,next:null},kt===null?De.memoizedState=kt=a:kt=kt.next=a}return kt}function ld(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function kc(a){var o=Pc;return Pc+=1,Xl===null&&(Xl=[]),a=VE(Xl,a,o),o=De,(kt===null?o.memoizedState:kt.next)===null&&(o=o.alternate,I.H=o===null||o.memoizedState===null?LC:Sg),a}function sd(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return kc(a);if(a.$$typeof===N)return gn(a)}throw Error(r(438,String(a)))}function fg(a){var o=null,c=De.updateQueue;if(c!==null&&(o=c.memoCache),o==null){var d=De.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(o={data:d.data.map(function(y){return y.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),c===null&&(c=ld(),De.updateQueue=c),c.memoCache=o,c=o.data[o.index],c===void 0)for(c=o.data[o.index]=Array(a),d=0;d<a;d++)c[d]=Q;return o.index++,c}function qa(a,o){return typeof o=="function"?o(a):o}function cd(a){var o=Rt();return dg(o,ot,a)}function dg(a,o,c){var d=a.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=c;var y=a.baseQueue,w=d.pending;if(w!==null){if(y!==null){var O=y.next;y.next=w.next,w.next=O}o.baseQueue=y=w,d.pending=null}if(w=a.baseState,y===null)a.memoizedState=w;else{o=y.next;var M=O=null,$=null,J=o,le=!1;do{var de=J.lane&-536870913;if(de!==J.lane?(He&de)===de:(Ha&de)===de){var re=J.revertLane;if(re===0)$!==null&&($=$.next={lane:0,revertLane:0,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),de===Fl&&(le=!0);else if((Ha&re)===re){J=J.next,re===Fl&&(le=!0);continue}else de={lane:0,revertLane:J.revertLane,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},$===null?(M=$=de,O=w):$=$.next=de,De.lanes|=re,Gi|=re;de=J.action,Bo&&c(w,de),w=J.hasEagerState?J.eagerState:c(w,de)}else re={lane:de,revertLane:J.revertLane,gesture:J.gesture,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},$===null?(M=$=re,O=w):$=$.next=re,De.lanes|=de,Gi|=de;J=J.next}while(J!==null&&J!==o);if($===null?O=w:$.next=M,!ir(w,a.memoizedState)&&(It=!0,le&&(c=Kl,c!==null)))throw c;a.memoizedState=w,a.baseState=O,a.baseQueue=$,d.lastRenderedState=w}return y===null&&(d.lanes=0),[a.memoizedState,d.dispatch]}function hg(a){var o=Rt(),c=o.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=a;var d=c.dispatch,y=c.pending,w=o.memoizedState;if(y!==null){c.pending=null;var O=y=y.next;do w=a(w,O.action),O=O.next;while(O!==y);ir(w,o.memoizedState)||(It=!0),o.memoizedState=w,o.baseQueue===null&&(o.baseState=w),c.lastRenderedState=w}return[w,d]}function rC(a,o,c){var d=De,y=Rt(),w=Fe;if(w){if(c===void 0)throw Error(r(407));c=c()}else c=o();var O=!ir((ot||y).memoizedState,c);if(O&&(y.memoizedState=c,It=!0),y=y.queue,vg(oC.bind(null,d,y,a),[a]),y.getSnapshot!==o||O||kt!==null&&kt.memoizedState.tag&1){if(d.flags|=2048,Ql(9,{destroy:void 0},iC.bind(null,d,y,c,o),null),ft===null)throw Error(r(349));w||(Ha&127)!==0||aC(d,o,c)}return c}function aC(a,o,c){a.flags|=16384,a={getSnapshot:o,value:c},o=De.updateQueue,o===null?(o=ld(),De.updateQueue=o,o.stores=[a]):(c=o.stores,c===null?o.stores=[a]:c.push(a))}function iC(a,o,c,d){o.value=c,o.getSnapshot=d,lC(o)&&sC(a)}function oC(a,o,c){return c(function(){lC(o)&&sC(a)})}function lC(a){var o=a.getSnapshot;a=a.value;try{var c=o();return!ir(a,c)}catch{return!0}}function sC(a){var o=Mo(a,2);o!==null&&Yn(o,a,2)}function pg(a){var o=Dn();if(typeof a=="function"){var c=a;if(a=c(),Bo){ar(!0);try{c()}finally{ar(!1)}}}return o.memoizedState=o.baseState=a,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qa,lastRenderedState:a},o}function cC(a,o,c,d){return a.baseState=c,dg(a,ot,typeof d=="function"?d:qa)}function iB(a,o,c,d,y){if(dd(a))throw Error(r(485));if(a=o.action,a!==null){var w={payload:y,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(O){w.listeners.push(O)}};I.T!==null?c(!0):w.isTransition=!1,d(w),c=o.pending,c===null?(w.next=o.pending=w,uC(o,w)):(w.next=c.next,o.pending=c.next=w)}}function uC(a,o){var c=o.action,d=o.payload,y=a.state;if(o.isTransition){var w=I.T,O={};I.T=O;try{var M=c(y,d),$=I.S;$!==null&&$(O,M),fC(a,o,M)}catch(J){mg(a,o,J)}finally{w!==null&&O.types!==null&&(w.types=O.types),I.T=w}}else try{w=c(y,d),fC(a,o,w)}catch(J){mg(a,o,J)}}function fC(a,o,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(d){dC(a,o,d)},function(d){return mg(a,o,d)}):dC(a,o,c)}function dC(a,o,c){o.status="fulfilled",o.value=c,hC(o),a.state=c,o=a.pending,o!==null&&(c=o.next,c===o?a.pending=null:(c=c.next,o.next=c,uC(a,c)))}function mg(a,o,c){var d=a.pending;if(a.pending=null,d!==null){d=d.next;do o.status="rejected",o.reason=c,hC(o),o=o.next;while(o!==d)}a.action=null}function hC(a){a=a.listeners;for(var o=0;o<a.length;o++)(0,a[o])()}function pC(a,o){return o}function mC(a,o){if(Fe){var c=ft.formState;if(c!==null){e:{var d=De;if(Fe){if(gt){t:{for(var y=gt,w=Mr;y.nodeType!==8;){if(!w){y=null;break t}if(y=Dr(y.nextSibling),y===null){y=null;break t}}w=y.data,y=w==="F!"||w==="F"?y:null}if(y){gt=Dr(y.nextSibling),d=y.data==="F!";break e}}zi(d)}d=!1}d&&(o=c[0])}}return c=Dn(),c.memoizedState=c.baseState=o,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pC,lastRenderedState:o},c.queue=d,c=PC.bind(null,De,d),d.dispatch=c,d=pg(!1),w=wg.bind(null,De,!1,d.queue),d=Dn(),y={state:o,dispatch:null,action:a,pending:null},d.queue=y,c=iB.bind(null,De,y,w,c),y.dispatch=c,d.memoizedState=a,[o,c,!1]}function vC(a){var o=Rt();return gC(o,ot,a)}function gC(a,o,c){if(o=dg(a,o,pC)[0],a=cd(qa)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var d=kc(o)}catch(O){throw O===Vl?Jf:O}else d=o;o=Rt();var y=o.queue,w=y.dispatch;return c!==o.memoizedState&&(De.flags|=2048,Ql(9,{destroy:void 0},oB.bind(null,y,c),null)),[d,w,a]}function oB(a,o){a.action=o}function yC(a){var o=Rt(),c=ot;if(c!==null)return gC(o,c,a);Rt(),o=o.memoizedState,c=Rt();var d=c.queue.dispatch;return c.memoizedState=a,[o,d,!1]}function Ql(a,o,c,d){return a={tag:a,create:c,deps:d,inst:o,next:null},o=De.updateQueue,o===null&&(o=ld(),De.updateQueue=o),c=o.lastEffect,c===null?o.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,o.lastEffect=a),a}function bC(){return Rt().memoizedState}function ud(a,o,c,d){var y=Dn();De.flags|=a,y.memoizedState=Ql(1|o,{destroy:void 0},c,d===void 0?null:d)}function fd(a,o,c,d){var y=Rt();d=d===void 0?null:d;var w=y.memoizedState.inst;ot!==null&&d!==null&&og(d,ot.memoizedState.deps)?y.memoizedState=Ql(o,w,c,d):(De.flags|=a,y.memoizedState=Ql(1|o,w,c,d))}function xC(a,o){ud(8390656,8,a,o)}function vg(a,o){fd(2048,8,a,o)}function lB(a){De.flags|=4;var o=De.updateQueue;if(o===null)o=ld(),De.updateQueue=o,o.events=[a];else{var c=o.events;c===null?o.events=[a]:c.push(a)}}function wC(a){var o=Rt().memoizedState;return lB({ref:o,nextImpl:a}),function(){if((Ze&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}function SC(a,o){return fd(4,2,a,o)}function EC(a,o){return fd(4,4,a,o)}function CC(a,o){if(typeof o=="function"){a=a();var c=o(a);return function(){typeof c=="function"?c():o(null)}}if(o!=null)return a=a(),o.current=a,function(){o.current=null}}function AC(a,o,c){c=c!=null?c.concat([a]):null,fd(4,4,CC.bind(null,o,a),c)}function gg(){}function OC(a,o){var c=Rt();o=o===void 0?null:o;var d=c.memoizedState;return o!==null&&og(o,d[1])?d[0]:(c.memoizedState=[a,o],a)}function NC(a,o){var c=Rt();o=o===void 0?null:o;var d=c.memoizedState;if(o!==null&&og(o,d[1]))return d[0];if(d=a(),Bo){ar(!0);try{a()}finally{ar(!1)}}return c.memoizedState=[d,o],d}function yg(a,o,c){return c===void 0||(Ha&1073741824)!==0&&(He&261930)===0?a.memoizedState=o:(a.memoizedState=c,a=_A(),De.lanes|=a,Gi|=a,c)}function _C(a,o,c,d){return ir(c,o)?c:Yl.current!==null?(a=yg(a,c,d),ir(a,o)||(It=!0),a):(Ha&42)===0||(Ha&1073741824)!==0&&(He&261930)===0?(It=!0,a.memoizedState=c):(a=_A(),De.lanes|=a,Gi|=a,o)}function jC(a,o,c,d,y){var w=q.p;q.p=w!==0&&8>w?w:8;var O=I.T,M={};I.T=M,wg(a,!1,o,c);try{var $=y(),J=I.S;if(J!==null&&J(M,$),$!==null&&typeof $=="object"&&typeof $.then=="function"){var le=nB($,d);Ic(a,o,le,fr(a))}else Ic(a,o,d,fr(a))}catch(de){Ic(a,o,{then:function(){},status:"rejected",reason:de},fr())}finally{q.p=w,O!==null&&M.types!==null&&(O.types=M.types),I.T=O}}function sB(){}function bg(a,o,c,d){if(a.tag!==5)throw Error(r(476));var y=TC(a).queue;jC(a,y,o,H,c===null?sB:function(){return MC(a),c(d)})}function TC(a){var o=a.memoizedState;if(o!==null)return o;o={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qa,lastRenderedState:H},next:null};var c={};return o.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qa,lastRenderedState:c},next:null},a.memoizedState=o,a=a.alternate,a!==null&&(a.memoizedState=o),o}function MC(a){var o=TC(a);o.next===null&&(o=a.alternate.memoizedState),Ic(a,o.next.queue,{},fr())}function xg(){return gn(Jc)}function RC(){return Rt().memoizedState}function DC(){return Rt().memoizedState}function cB(a){for(var o=a.return;o!==null;){switch(o.tag){case 24:case 3:var c=fr();a=Ui(c);var d=Hi(o,a,c);d!==null&&(Yn(d,o,c),Mc(d,o,c)),o={cache:Wv()},a.payload=o;return}o=o.return}}function uB(a,o,c){var d=fr();c={lane:d,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},dd(a)?kC(o,c):(c=zv(a,o,c,d),c!==null&&(Yn(c,a,d),IC(c,o,d)))}function PC(a,o,c){var d=fr();Ic(a,o,c,d)}function Ic(a,o,c,d){var y={lane:d,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null};if(dd(a))kC(o,y);else{var w=a.alternate;if(a.lanes===0&&(w===null||w.lanes===0)&&(w=o.lastRenderedReducer,w!==null))try{var O=o.lastRenderedState,M=w(O,c);if(y.hasEagerState=!0,y.eagerState=M,ir(M,O))return Vf(a,o,y,0),ft===null&&Kf(),!1}catch{}finally{}if(c=zv(a,o,y,d),c!==null)return Yn(c,a,d),IC(c,o,d),!0}return!1}function wg(a,o,c,d){if(d={lane:2,revertLane:Jg(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},dd(a)){if(o)throw Error(r(479))}else o=zv(a,c,d,2),o!==null&&Yn(o,a,2)}function dd(a){var o=a.alternate;return a===De||o!==null&&o===De}function kC(a,o){Wl=id=!0;var c=a.pending;c===null?o.next=o:(o.next=c.next,c.next=o),a.pending=o}function IC(a,o,c){if((c&4194048)!==0){var d=o.lanes;d&=a.pendingLanes,c|=d,o.lanes=c,pn(a,c)}}var Lc={readContext:gn,use:sd,useCallback:Nt,useContext:Nt,useEffect:Nt,useImperativeHandle:Nt,useLayoutEffect:Nt,useInsertionEffect:Nt,useMemo:Nt,useReducer:Nt,useRef:Nt,useState:Nt,useDebugValue:Nt,useDeferredValue:Nt,useTransition:Nt,useSyncExternalStore:Nt,useId:Nt,useHostTransitionStatus:Nt,useFormState:Nt,useActionState:Nt,useOptimistic:Nt,useMemoCache:Nt,useCacheRefresh:Nt};Lc.useEffectEvent=Nt;var LC={readContext:gn,use:sd,useCallback:function(a,o){return Dn().memoizedState=[a,o===void 0?null:o],a},useContext:gn,useEffect:xC,useImperativeHandle:function(a,o,c){c=c!=null?c.concat([a]):null,ud(4194308,4,CC.bind(null,o,a),c)},useLayoutEffect:function(a,o){return ud(4194308,4,a,o)},useInsertionEffect:function(a,o){ud(4,2,a,o)},useMemo:function(a,o){var c=Dn();o=o===void 0?null:o;var d=a();if(Bo){ar(!0);try{a()}finally{ar(!1)}}return c.memoizedState=[d,o],d},useReducer:function(a,o,c){var d=Dn();if(c!==void 0){var y=c(o);if(Bo){ar(!0);try{c(o)}finally{ar(!1)}}}else y=o;return d.memoizedState=d.baseState=y,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:y},d.queue=a,a=a.dispatch=uB.bind(null,De,a),[d.memoizedState,a]},useRef:function(a){var o=Dn();return a={current:a},o.memoizedState=a},useState:function(a){a=pg(a);var o=a.queue,c=PC.bind(null,De,o);return o.dispatch=c,[a.memoizedState,c]},useDebugValue:gg,useDeferredValue:function(a,o){var c=Dn();return yg(c,a,o)},useTransition:function(){var a=pg(!1);return a=jC.bind(null,De,a.queue,!0,!1),Dn().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,o,c){var d=De,y=Dn();if(Fe){if(c===void 0)throw Error(r(407));c=c()}else{if(c=o(),ft===null)throw Error(r(349));(He&127)!==0||aC(d,o,c)}y.memoizedState=c;var w={value:c,getSnapshot:o};return y.queue=w,xC(oC.bind(null,d,w,a),[a]),d.flags|=2048,Ql(9,{destroy:void 0},iC.bind(null,d,w,c,o),null),c},useId:function(){var a=Dn(),o=ft.identifierPrefix;if(Fe){var c=ha,d=da;c=(d&~(1<<32-rn(d)-1)).toString(32)+c,o="_"+o+"R_"+c,c=od++,0<c&&(o+="H"+c.toString(32)),o+="_"}else c=rB++,o="_"+o+"r_"+c.toString(32)+"_";return a.memoizedState=o},useHostTransitionStatus:xg,useFormState:mC,useActionState:mC,useOptimistic:function(a){var o=Dn();o.memoizedState=o.baseState=a;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=c,o=wg.bind(null,De,!0,c),c.dispatch=o,[a,o]},useMemoCache:fg,useCacheRefresh:function(){return Dn().memoizedState=cB.bind(null,De)},useEffectEvent:function(a){var o=Dn(),c={impl:a};return o.memoizedState=c,function(){if((Ze&2)!==0)throw Error(r(440));return c.impl.apply(void 0,arguments)}}},Sg={readContext:gn,use:sd,useCallback:OC,useContext:gn,useEffect:vg,useImperativeHandle:AC,useInsertionEffect:SC,useLayoutEffect:EC,useMemo:NC,useReducer:cd,useRef:bC,useState:function(){return cd(qa)},useDebugValue:gg,useDeferredValue:function(a,o){var c=Rt();return _C(c,ot.memoizedState,a,o)},useTransition:function(){var a=cd(qa)[0],o=Rt().memoizedState;return[typeof a=="boolean"?a:kc(a),o]},useSyncExternalStore:rC,useId:RC,useHostTransitionStatus:xg,useFormState:vC,useActionState:vC,useOptimistic:function(a,o){var c=Rt();return cC(c,ot,a,o)},useMemoCache:fg,useCacheRefresh:DC};Sg.useEffectEvent=wC;var zC={readContext:gn,use:sd,useCallback:OC,useContext:gn,useEffect:vg,useImperativeHandle:AC,useInsertionEffect:SC,useLayoutEffect:EC,useMemo:NC,useReducer:hg,useRef:bC,useState:function(){return hg(qa)},useDebugValue:gg,useDeferredValue:function(a,o){var c=Rt();return ot===null?yg(c,a,o):_C(c,ot.memoizedState,a,o)},useTransition:function(){var a=hg(qa)[0],o=Rt().memoizedState;return[typeof a=="boolean"?a:kc(a),o]},useSyncExternalStore:rC,useId:RC,useHostTransitionStatus:xg,useFormState:yC,useActionState:yC,useOptimistic:function(a,o){var c=Rt();return ot!==null?cC(c,ot,a,o):(c.baseState=a,[a,c.queue.dispatch])},useMemoCache:fg,useCacheRefresh:DC};zC.useEffectEvent=wC;function Eg(a,o,c,d){o=a.memoizedState,c=c(d,o),c=c==null?o:m({},o,c),a.memoizedState=c,a.lanes===0&&(a.updateQueue.baseState=c)}var Cg={enqueueSetState:function(a,o,c){a=a._reactInternals;var d=fr(),y=Ui(d);y.payload=o,c!=null&&(y.callback=c),o=Hi(a,y,d),o!==null&&(Yn(o,a,d),Mc(o,a,d))},enqueueReplaceState:function(a,o,c){a=a._reactInternals;var d=fr(),y=Ui(d);y.tag=1,y.payload=o,c!=null&&(y.callback=c),o=Hi(a,y,d),o!==null&&(Yn(o,a,d),Mc(o,a,d))},enqueueForceUpdate:function(a,o){a=a._reactInternals;var c=fr(),d=Ui(c);d.tag=2,o!=null&&(d.callback=o),o=Hi(a,d,c),o!==null&&(Yn(o,a,c),Mc(o,a,c))}};function $C(a,o,c,d,y,w,O){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(d,w,O):o.prototype&&o.prototype.isPureReactComponent?!Ec(c,d)||!Ec(y,w):!0}function BC(a,o,c,d){a=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(c,d),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(c,d),o.state!==a&&Cg.enqueueReplaceState(o,o.state,null)}function Uo(a,o){var c=o;if("ref"in o){c={};for(var d in o)d!=="ref"&&(c[d]=o[d])}if(a=a.defaultProps){c===o&&(c=m({},c));for(var y in a)c[y]===void 0&&(c[y]=a[y])}return c}function UC(a){Ff(a)}function HC(a){console.error(a)}function qC(a){Ff(a)}function hd(a,o){try{var c=a.onUncaughtError;c(o.value,{componentStack:o.stack})}catch(d){setTimeout(function(){throw d})}}function FC(a,o,c){try{var d=a.onCaughtError;d(c.value,{componentStack:c.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function Ag(a,o,c){return c=Ui(c),c.tag=3,c.payload={element:null},c.callback=function(){hd(a,o)},c}function KC(a){return a=Ui(a),a.tag=3,a}function VC(a,o,c,d){var y=c.type.getDerivedStateFromError;if(typeof y=="function"){var w=d.value;a.payload=function(){return y(w)},a.callback=function(){FC(o,c,d)}}var O=c.stateNode;O!==null&&typeof O.componentDidCatch=="function"&&(a.callback=function(){FC(o,c,d),typeof y!="function"&&(Yi===null?Yi=new Set([this]):Yi.add(this));var M=d.stack;this.componentDidCatch(d.value,{componentStack:M!==null?M:""})})}function fB(a,o,c,d,y){if(c.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(o=c.alternate,o!==null&&ql(o,c,y,!0),c=lr.current,c!==null){switch(c.tag){case 31:case 13:return Rr===null?Ad():c.alternate===null&&_t===0&&(_t=3),c.flags&=-257,c.flags|=65536,c.lanes=y,d===ed?c.flags|=16384:(o=c.updateQueue,o===null?c.updateQueue=new Set([d]):o.add(d),Xg(a,d,y)),!1;case 22:return c.flags|=65536,d===ed?c.flags|=16384:(o=c.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([d])},c.updateQueue=o):(c=o.retryQueue,c===null?o.retryQueue=new Set([d]):c.add(d)),Xg(a,d,y)),!1}throw Error(r(435,c.tag))}return Xg(a,d,y),Ad(),!1}if(Fe)return o=lr.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=y,d!==Fv&&(a=Error(r(422),{cause:d}),Oc(_r(a,c)))):(d!==Fv&&(o=Error(r(423),{cause:d}),Oc(_r(o,c))),a=a.current.alternate,a.flags|=65536,y&=-y,a.lanes|=y,d=_r(d,c),y=Ag(a.stateNode,d,y),tg(a,y),_t!==4&&(_t=2)),!1;var w=Error(r(520),{cause:d});if(w=_r(w,c),Kc===null?Kc=[w]:Kc.push(w),_t!==4&&(_t=2),o===null)return!0;d=_r(d,c),c=o;do{switch(c.tag){case 3:return c.flags|=65536,a=y&-y,c.lanes|=a,a=Ag(c.stateNode,d,a),tg(c,a),!1;case 1:if(o=c.type,w=c.stateNode,(c.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Yi===null||!Yi.has(w))))return c.flags|=65536,y&=-y,c.lanes|=y,y=KC(y),VC(y,a,c,d),tg(c,y),!1}c=c.return}while(c!==null);return!1}var Og=Error(r(461)),It=!1;function yn(a,o,c,d){o.child=a===null?XE(o,null,c,d):$o(o,a.child,c,d)}function GC(a,o,c,d,y){c=c.render;var w=o.ref;if("ref"in d){var O={};for(var M in d)M!=="ref"&&(O[M]=d[M])}else O=d;return ko(o),d=lg(a,o,c,O,w,y),M=sg(),a!==null&&!It?(cg(a,o,y),Fa(a,o,y)):(Fe&&M&&Hv(o),o.flags|=1,yn(a,o,d,y),o.child)}function YC(a,o,c,d,y){if(a===null){var w=c.type;return typeof w=="function"&&!$v(w)&&w.defaultProps===void 0&&c.compare===null?(o.tag=15,o.type=w,WC(a,o,w,d,y)):(a=Yf(c.type,null,d,o,o.mode,y),a.ref=o.ref,a.return=o,o.child=a)}if(w=a.child,!Pg(a,y)){var O=w.memoizedProps;if(c=c.compare,c=c!==null?c:Ec,c(O,d)&&a.ref===o.ref)return Fa(a,o,y)}return o.flags|=1,a=za(w,d),a.ref=o.ref,a.return=o,o.child=a}function WC(a,o,c,d,y){if(a!==null){var w=a.memoizedProps;if(Ec(w,d)&&a.ref===o.ref)if(It=!1,o.pendingProps=d=w,Pg(a,y))(a.flags&131072)!==0&&(It=!0);else return o.lanes=a.lanes,Fa(a,o,y)}return Ng(a,o,c,d,y)}function XC(a,o,c,d){var y=d.children,w=a!==null?a.memoizedState:null;if(a===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((o.flags&128)!==0){if(w=w!==null?w.baseLanes|c:c,a!==null){for(d=o.child=a.child,y=0;d!==null;)y=y|d.lanes|d.childLanes,d=d.sibling;d=y&~w}else d=0,o.child=null;return QC(a,o,w,c,d)}if((c&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},a!==null&&Zf(o,w!==null?w.cachePool:null),w!==null?JE(o,w):rg(),eC(o);else return d=o.lanes=536870912,QC(a,o,w!==null?w.baseLanes|c:c,c,d)}else w!==null?(Zf(o,w.cachePool),JE(o,w),Fi(),o.memoizedState=null):(a!==null&&Zf(o,null),rg(),Fi());return yn(a,o,y,c),o.child}function zc(a,o){return a!==null&&a.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function QC(a,o,c,d,y){var w=Qv();return w=w===null?null:{parent:Pt._currentValue,pool:w},o.memoizedState={baseLanes:c,cachePool:w},a!==null&&Zf(o,null),rg(),eC(o),a!==null&&ql(a,o,d,!0),o.childLanes=y,null}function pd(a,o){return o=vd({mode:o.mode,children:o.children},a.mode),o.ref=a.ref,a.child=o,o.return=a,o}function ZC(a,o,c){return $o(o,a.child,null,c),a=pd(o,o.pendingProps),a.flags|=2,sr(o),o.memoizedState=null,a}function dB(a,o,c){var d=o.pendingProps,y=(o.flags&128)!==0;if(o.flags&=-129,a===null){if(Fe){if(d.mode==="hidden")return a=pd(o,d),o.lanes=536870912,zc(null,a);if(ig(o),(a=gt)?(a=uO(a,Mr),a=a!==null&&a.data==="&"?a:null,a!==null&&(o.memoizedState={dehydrated:a,treeContext:Ii!==null?{id:da,overflow:ha}:null,retryLane:536870912,hydrationErrors:null},c=kE(a),c.return=o,o.child=c,vn=o,gt=null)):a=null,a===null)throw zi(o);return o.lanes=536870912,null}return pd(o,d)}var w=a.memoizedState;if(w!==null){var O=w.dehydrated;if(ig(o),y)if(o.flags&256)o.flags&=-257,o=ZC(a,o,c);else if(o.memoizedState!==null)o.child=a.child,o.flags|=128,o=null;else throw Error(r(558));else if(It||ql(a,o,c,!1),y=(c&a.childLanes)!==0,It||y){if(d=ft,d!==null&&(O=Un(d,c),O!==0&&O!==w.retryLane))throw w.retryLane=O,Mo(a,O),Yn(d,a,O),Og;Ad(),o=ZC(a,o,c)}else a=w.treeContext,gt=Dr(O.nextSibling),vn=o,Fe=!0,Li=null,Mr=!1,a!==null&&zE(o,a),o=pd(o,d),o.flags|=4096;return o}return a=za(a.child,{mode:d.mode,children:d.children}),a.ref=o.ref,o.child=a,a.return=o,a}function md(a,o){var c=o.ref;if(c===null)a!==null&&a.ref!==null&&(o.flags|=4194816);else{if(typeof c!="function"&&typeof c!="object")throw Error(r(284));(a===null||a.ref!==c)&&(o.flags|=4194816)}}function Ng(a,o,c,d,y){return ko(o),c=lg(a,o,c,d,void 0,y),d=sg(),a!==null&&!It?(cg(a,o,y),Fa(a,o,y)):(Fe&&d&&Hv(o),o.flags|=1,yn(a,o,c,y),o.child)}function JC(a,o,c,d,y,w){return ko(o),o.updateQueue=null,c=nC(o,d,c,y),tC(a),d=sg(),a!==null&&!It?(cg(a,o,w),Fa(a,o,w)):(Fe&&d&&Hv(o),o.flags|=1,yn(a,o,c,w),o.child)}function eA(a,o,c,d,y){if(ko(o),o.stateNode===null){var w=$l,O=c.contextType;typeof O=="object"&&O!==null&&(w=gn(O)),w=new c(d,w),o.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,w.updater=Cg,o.stateNode=w,w._reactInternals=o,w=o.stateNode,w.props=d,w.state=o.memoizedState,w.refs={},Jv(o),O=c.contextType,w.context=typeof O=="object"&&O!==null?gn(O):$l,w.state=o.memoizedState,O=c.getDerivedStateFromProps,typeof O=="function"&&(Eg(o,c,O,d),w.state=o.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(O=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),O!==w.state&&Cg.enqueueReplaceState(w,w.state,null),Dc(o,d,w,y),Rc(),w.state=o.memoizedState),typeof w.componentDidMount=="function"&&(o.flags|=4194308),d=!0}else if(a===null){w=o.stateNode;var M=o.memoizedProps,$=Uo(c,M);w.props=$;var J=w.context,le=c.contextType;O=$l,typeof le=="object"&&le!==null&&(O=gn(le));var de=c.getDerivedStateFromProps;le=typeof de=="function"||typeof w.getSnapshotBeforeUpdate=="function",M=o.pendingProps!==M,le||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(M||J!==O)&&BC(o,w,d,O),Bi=!1;var re=o.memoizedState;w.state=re,Dc(o,d,w,y),Rc(),J=o.memoizedState,M||re!==J||Bi?(typeof de=="function"&&(Eg(o,c,de,d),J=o.memoizedState),($=Bi||$C(o,c,$,d,re,J,O))?(le||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(o.flags|=4194308)):(typeof w.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=d,o.memoizedState=J),w.props=d,w.state=J,w.context=O,d=$):(typeof w.componentDidMount=="function"&&(o.flags|=4194308),d=!1)}else{w=o.stateNode,eg(a,o),O=o.memoizedProps,le=Uo(c,O),w.props=le,de=o.pendingProps,re=w.context,J=c.contextType,$=$l,typeof J=="object"&&J!==null&&($=gn(J)),M=c.getDerivedStateFromProps,(J=typeof M=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(O!==de||re!==$)&&BC(o,w,d,$),Bi=!1,re=o.memoizedState,w.state=re,Dc(o,d,w,y),Rc();var ae=o.memoizedState;O!==de||re!==ae||Bi||a!==null&&a.dependencies!==null&&Xf(a.dependencies)?(typeof M=="function"&&(Eg(o,c,M,d),ae=o.memoizedState),(le=Bi||$C(o,c,le,d,re,ae,$)||a!==null&&a.dependencies!==null&&Xf(a.dependencies))?(J||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(d,ae,$),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(d,ae,$)),typeof w.componentDidUpdate=="function"&&(o.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof w.componentDidUpdate!="function"||O===a.memoizedProps&&re===a.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||O===a.memoizedProps&&re===a.memoizedState||(o.flags|=1024),o.memoizedProps=d,o.memoizedState=ae),w.props=d,w.state=ae,w.context=$,d=le):(typeof w.componentDidUpdate!="function"||O===a.memoizedProps&&re===a.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||O===a.memoizedProps&&re===a.memoizedState||(o.flags|=1024),d=!1)}return w=d,md(a,o),d=(o.flags&128)!==0,w||d?(w=o.stateNode,c=d&&typeof c.getDerivedStateFromError!="function"?null:w.render(),o.flags|=1,a!==null&&d?(o.child=$o(o,a.child,null,y),o.child=$o(o,null,c,y)):yn(a,o,c,y),o.memoizedState=w.state,a=o.child):a=Fa(a,o,y),a}function tA(a,o,c,d){return Do(),o.flags|=256,yn(a,o,c,d),o.child}var _g={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function jg(a){return{baseLanes:a,cachePool:FE()}}function Tg(a,o,c){return a=a!==null?a.childLanes&~c:0,o&&(a|=ur),a}function nA(a,o,c){var d=o.pendingProps,y=!1,w=(o.flags&128)!==0,O;if((O=w)||(O=a!==null&&a.memoizedState===null?!1:(Mt.current&2)!==0),O&&(y=!0,o.flags&=-129),O=(o.flags&32)!==0,o.flags&=-33,a===null){if(Fe){if(y?qi(o):Fi(),(a=gt)?(a=uO(a,Mr),a=a!==null&&a.data!=="&"?a:null,a!==null&&(o.memoizedState={dehydrated:a,treeContext:Ii!==null?{id:da,overflow:ha}:null,retryLane:536870912,hydrationErrors:null},c=kE(a),c.return=o,o.child=c,vn=o,gt=null)):a=null,a===null)throw zi(o);return dy(a)?o.lanes=32:o.lanes=536870912,null}var M=d.children;return d=d.fallback,y?(Fi(),y=o.mode,M=vd({mode:"hidden",children:M},y),d=Ro(d,y,c,null),M.return=o,d.return=o,M.sibling=d,o.child=M,d=o.child,d.memoizedState=jg(c),d.childLanes=Tg(a,O,c),o.memoizedState=_g,zc(null,d)):(qi(o),Mg(o,M))}var $=a.memoizedState;if($!==null&&(M=$.dehydrated,M!==null)){if(w)o.flags&256?(qi(o),o.flags&=-257,o=Rg(a,o,c)):o.memoizedState!==null?(Fi(),o.child=a.child,o.flags|=128,o=null):(Fi(),M=d.fallback,y=o.mode,d=vd({mode:"visible",children:d.children},y),M=Ro(M,y,c,null),M.flags|=2,d.return=o,M.return=o,d.sibling=M,o.child=d,$o(o,a.child,null,c),d=o.child,d.memoizedState=jg(c),d.childLanes=Tg(a,O,c),o.memoizedState=_g,o=zc(null,d));else if(qi(o),dy(M)){if(O=M.nextSibling&&M.nextSibling.dataset,O)var J=O.dgst;O=J,d=Error(r(419)),d.stack="",d.digest=O,Oc({value:d,source:null,stack:null}),o=Rg(a,o,c)}else if(It||ql(a,o,c,!1),O=(c&a.childLanes)!==0,It||O){if(O=ft,O!==null&&(d=Un(O,c),d!==0&&d!==$.retryLane))throw $.retryLane=d,Mo(a,d),Yn(O,a,d),Og;fy(M)||Ad(),o=Rg(a,o,c)}else fy(M)?(o.flags|=192,o.child=a.child,o=null):(a=$.treeContext,gt=Dr(M.nextSibling),vn=o,Fe=!0,Li=null,Mr=!1,a!==null&&zE(o,a),o=Mg(o,d.children),o.flags|=4096);return o}return y?(Fi(),M=d.fallback,y=o.mode,$=a.child,J=$.sibling,d=za($,{mode:"hidden",children:d.children}),d.subtreeFlags=$.subtreeFlags&65011712,J!==null?M=za(J,M):(M=Ro(M,y,c,null),M.flags|=2),M.return=o,d.return=o,d.sibling=M,o.child=d,zc(null,d),d=o.child,M=a.child.memoizedState,M===null?M=jg(c):(y=M.cachePool,y!==null?($=Pt._currentValue,y=y.parent!==$?{parent:$,pool:$}:y):y=FE(),M={baseLanes:M.baseLanes|c,cachePool:y}),d.memoizedState=M,d.childLanes=Tg(a,O,c),o.memoizedState=_g,zc(a.child,d)):(qi(o),c=a.child,a=c.sibling,c=za(c,{mode:"visible",children:d.children}),c.return=o,c.sibling=null,a!==null&&(O=o.deletions,O===null?(o.deletions=[a],o.flags|=16):O.push(a)),o.child=c,o.memoizedState=null,c)}function Mg(a,o){return o=vd({mode:"visible",children:o},a.mode),o.return=a,a.child=o}function vd(a,o){return a=or(22,a,null,o),a.lanes=0,a}function Rg(a,o,c){return $o(o,a.child,null,c),a=Mg(o,o.pendingProps.children),a.flags|=2,o.memoizedState=null,a}function rA(a,o,c){a.lanes|=o;var d=a.alternate;d!==null&&(d.lanes|=o),Gv(a.return,o,c)}function Dg(a,o,c,d,y,w){var O=a.memoizedState;O===null?a.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:d,tail:c,tailMode:y,treeForkCount:w}:(O.isBackwards=o,O.rendering=null,O.renderingStartTime=0,O.last=d,O.tail=c,O.tailMode=y,O.treeForkCount=w)}function aA(a,o,c){var d=o.pendingProps,y=d.revealOrder,w=d.tail;d=d.children;var O=Mt.current,M=(O&2)!==0;if(M?(O=O&1|2,o.flags|=128):O&=1,P(Mt,O),yn(a,o,d,c),d=Fe?Ac:0,!M&&a!==null&&(a.flags&128)!==0)e:for(a=o.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&rA(a,c,o);else if(a.tag===19)rA(a,c,o);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===o)break e;for(;a.sibling===null;){if(a.return===null||a.return===o)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(y){case"forwards":for(c=o.child,y=null;c!==null;)a=c.alternate,a!==null&&ad(a)===null&&(y=c),c=c.sibling;c=y,c===null?(y=o.child,o.child=null):(y=c.sibling,c.sibling=null),Dg(o,!1,y,c,w,d);break;case"backwards":case"unstable_legacy-backwards":for(c=null,y=o.child,o.child=null;y!==null;){if(a=y.alternate,a!==null&&ad(a)===null){o.child=y;break}a=y.sibling,y.sibling=c,c=y,y=a}Dg(o,!0,c,null,w,d);break;case"together":Dg(o,!1,null,null,void 0,d);break;default:o.memoizedState=null}return o.child}function Fa(a,o,c){if(a!==null&&(o.dependencies=a.dependencies),Gi|=o.lanes,(c&o.childLanes)===0)if(a!==null){if(ql(a,o,c,!1),(c&o.childLanes)===0)return null}else return null;if(a!==null&&o.child!==a.child)throw Error(r(153));if(o.child!==null){for(a=o.child,c=za(a,a.pendingProps),o.child=c,c.return=o;a.sibling!==null;)a=a.sibling,c=c.sibling=za(a,a.pendingProps),c.return=o;c.sibling=null}return o.child}function Pg(a,o){return(a.lanes&o)!==0?!0:(a=a.dependencies,!!(a!==null&&Xf(a)))}function hB(a,o,c){switch(o.tag){case 3:pe(o,o.stateNode.containerInfo),$i(o,Pt,a.memoizedState.cache),Do();break;case 27:case 5:me(o);break;case 4:pe(o,o.stateNode.containerInfo);break;case 10:$i(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,ig(o),null;break;case 13:var d=o.memoizedState;if(d!==null)return d.dehydrated!==null?(qi(o),o.flags|=128,null):(c&o.child.childLanes)!==0?nA(a,o,c):(qi(o),a=Fa(a,o,c),a!==null?a.sibling:null);qi(o);break;case 19:var y=(a.flags&128)!==0;if(d=(c&o.childLanes)!==0,d||(ql(a,o,c,!1),d=(c&o.childLanes)!==0),y){if(d)return aA(a,o,c);o.flags|=128}if(y=o.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),P(Mt,Mt.current),d)break;return null;case 22:return o.lanes=0,XC(a,o,c,o.pendingProps);case 24:$i(o,Pt,a.memoizedState.cache)}return Fa(a,o,c)}function iA(a,o,c){if(a!==null)if(a.memoizedProps!==o.pendingProps)It=!0;else{if(!Pg(a,c)&&(o.flags&128)===0)return It=!1,hB(a,o,c);It=(a.flags&131072)!==0}else It=!1,Fe&&(o.flags&1048576)!==0&&LE(o,Ac,o.index);switch(o.lanes=0,o.tag){case 16:e:{var d=o.pendingProps;if(a=Lo(o.elementType),o.type=a,typeof a=="function")$v(a)?(d=Uo(a,d),o.tag=1,o=eA(null,o,a,d,c)):(o.tag=0,o=Ng(null,o,a,d,c));else{if(a!=null){var y=a.$$typeof;if(y===j){o.tag=11,o=GC(null,o,a,d,c);break e}else if(y===R){o.tag=14,o=YC(null,o,a,d,c);break e}}throw o=ce(a)||a,Error(r(306,o,""))}}return o;case 0:return Ng(a,o,o.type,o.pendingProps,c);case 1:return d=o.type,y=Uo(d,o.pendingProps),eA(a,o,d,y,c);case 3:e:{if(pe(o,o.stateNode.containerInfo),a===null)throw Error(r(387));d=o.pendingProps;var w=o.memoizedState;y=w.element,eg(a,o),Dc(o,d,null,c);var O=o.memoizedState;if(d=O.cache,$i(o,Pt,d),d!==w.cache&&Yv(o,[Pt],c,!0),Rc(),d=O.element,w.isDehydrated)if(w={element:d,isDehydrated:!1,cache:O.cache},o.updateQueue.baseState=w,o.memoizedState=w,o.flags&256){o=tA(a,o,d,c);break e}else if(d!==y){y=_r(Error(r(424)),o),Oc(y),o=tA(a,o,d,c);break e}else{switch(a=o.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(gt=Dr(a.firstChild),vn=o,Fe=!0,Li=null,Mr=!0,c=XE(o,null,d,c),o.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling}else{if(Do(),d===y){o=Fa(a,o,c);break e}yn(a,o,d,c)}o=o.child}return o;case 26:return md(a,o),a===null?(c=vO(o.type,null,o.pendingProps,null))?o.memoizedState=c:Fe||(c=o.type,a=o.pendingProps,d=Rd(se.current).createElement(c),d[mn]=o,d[Hn]=a,bn(d,c,a),an(d),o.stateNode=d):o.memoizedState=vO(o.type,a.memoizedProps,o.pendingProps,a.memoizedState),null;case 27:return me(o),a===null&&Fe&&(d=o.stateNode=hO(o.type,o.pendingProps,se.current),vn=o,Mr=!0,y=gt,Zi(o.type)?(hy=y,gt=Dr(d.firstChild)):gt=y),yn(a,o,o.pendingProps.children,c),md(a,o),a===null&&(o.flags|=4194304),o.child;case 5:return a===null&&Fe&&((y=d=gt)&&(d=qB(d,o.type,o.pendingProps,Mr),d!==null?(o.stateNode=d,vn=o,gt=Dr(d.firstChild),Mr=!1,y=!0):y=!1),y||zi(o)),me(o),y=o.type,w=o.pendingProps,O=a!==null?a.memoizedProps:null,d=w.children,sy(y,w)?d=null:O!==null&&sy(y,O)&&(o.flags|=32),o.memoizedState!==null&&(y=lg(a,o,aB,null,null,c),Jc._currentValue=y),md(a,o),yn(a,o,d,c),o.child;case 6:return a===null&&Fe&&((a=c=gt)&&(c=FB(c,o.pendingProps,Mr),c!==null?(o.stateNode=c,vn=o,gt=null,a=!0):a=!1),a||zi(o)),null;case 13:return nA(a,o,c);case 4:return pe(o,o.stateNode.containerInfo),d=o.pendingProps,a===null?o.child=$o(o,null,d,c):yn(a,o,d,c),o.child;case 11:return GC(a,o,o.type,o.pendingProps,c);case 7:return yn(a,o,o.pendingProps,c),o.child;case 8:return yn(a,o,o.pendingProps.children,c),o.child;case 12:return yn(a,o,o.pendingProps.children,c),o.child;case 10:return d=o.pendingProps,$i(o,o.type,d.value),yn(a,o,d.children,c),o.child;case 9:return y=o.type._context,d=o.pendingProps.children,ko(o),y=gn(y),d=d(y),o.flags|=1,yn(a,o,d,c),o.child;case 14:return YC(a,o,o.type,o.pendingProps,c);case 15:return WC(a,o,o.type,o.pendingProps,c);case 19:return aA(a,o,c);case 31:return dB(a,o,c);case 22:return XC(a,o,c,o.pendingProps);case 24:return ko(o),d=gn(Pt),a===null?(y=Qv(),y===null&&(y=ft,w=Wv(),y.pooledCache=w,w.refCount++,w!==null&&(y.pooledCacheLanes|=c),y=w),o.memoizedState={parent:d,cache:y},Jv(o),$i(o,Pt,y)):((a.lanes&c)!==0&&(eg(a,o),Dc(o,null,null,c),Rc()),y=a.memoizedState,w=o.memoizedState,y.parent!==d?(y={parent:d,cache:d},o.memoizedState=y,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=y),$i(o,Pt,d)):(d=w.cache,$i(o,Pt,d),d!==y.cache&&Yv(o,[Pt],c,!0))),yn(a,o,o.pendingProps.children,c),o.child;case 29:throw o.pendingProps}throw Error(r(156,o.tag))}function Ka(a){a.flags|=4}function kg(a,o,c,d,y){if((o=(a.mode&32)!==0)&&(o=!1),o){if(a.flags|=16777216,(y&335544128)===y)if(a.stateNode.complete)a.flags|=8192;else if(RA())a.flags|=8192;else throw zo=ed,Zv}else a.flags&=-16777217}function oA(a,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!wO(o))if(RA())a.flags|=8192;else throw zo=ed,Zv}function gd(a,o){o!==null&&(a.flags|=4),a.flags&16384&&(o=a.tag!==22?it():536870912,a.lanes|=o,ts|=o)}function $c(a,o){if(!Fe)switch(a.tailMode){case"hidden":o=a.tail;for(var c=null;o!==null;)o.alternate!==null&&(c=o),o=o.sibling;c===null?a.tail=null:c.sibling=null;break;case"collapsed":c=a.tail;for(var d=null;c!==null;)c.alternate!==null&&(d=c),c=c.sibling;d===null?o||a.tail===null?a.tail=null:a.tail.sibling=null:d.sibling=null}}function yt(a){var o=a.alternate!==null&&a.alternate.child===a.child,c=0,d=0;if(o)for(var y=a.child;y!==null;)c|=y.lanes|y.childLanes,d|=y.subtreeFlags&65011712,d|=y.flags&65011712,y.return=a,y=y.sibling;else for(y=a.child;y!==null;)c|=y.lanes|y.childLanes,d|=y.subtreeFlags,d|=y.flags,y.return=a,y=y.sibling;return a.subtreeFlags|=d,a.childLanes=c,o}function pB(a,o,c){var d=o.pendingProps;switch(qv(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yt(o),null;case 1:return yt(o),null;case 3:return c=o.stateNode,d=null,a!==null&&(d=a.memoizedState.cache),o.memoizedState.cache!==d&&(o.flags|=2048),Ua(Pt),V(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(a===null||a.child===null)&&(Hl(o)?Ka(o):a===null||a.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Kv())),yt(o),null;case 26:var y=o.type,w=o.memoizedState;return a===null?(Ka(o),w!==null?(yt(o),oA(o,w)):(yt(o),kg(o,y,null,d,c))):w?w!==a.memoizedState?(Ka(o),yt(o),oA(o,w)):(yt(o),o.flags&=-16777217):(a=a.memoizedProps,a!==d&&Ka(o),yt(o),kg(o,y,a,d,c)),null;case 27:if(ye(o),c=se.current,y=o.type,a!==null&&o.stateNode!=null)a.memoizedProps!==d&&Ka(o);else{if(!d){if(o.stateNode===null)throw Error(r(166));return yt(o),null}a=W.current,Hl(o)?$E(o):(a=hO(y,d,c),o.stateNode=a,Ka(o))}return yt(o),null;case 5:if(ye(o),y=o.type,a!==null&&o.stateNode!=null)a.memoizedProps!==d&&Ka(o);else{if(!d){if(o.stateNode===null)throw Error(r(166));return yt(o),null}if(w=W.current,Hl(o))$E(o);else{var O=Rd(se.current);switch(w){case 1:w=O.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:w=O.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":w=O.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":w=O.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":w=O.createElement("div"),w.innerHTML="<script><\/script>",w=w.removeChild(w.firstChild);break;case"select":w=typeof d.is=="string"?O.createElement("select",{is:d.is}):O.createElement("select"),d.multiple?w.multiple=!0:d.size&&(w.size=d.size);break;default:w=typeof d.is=="string"?O.createElement(y,{is:d.is}):O.createElement(y)}}w[mn]=o,w[Hn]=d;e:for(O=o.child;O!==null;){if(O.tag===5||O.tag===6)w.appendChild(O.stateNode);else if(O.tag!==4&&O.tag!==27&&O.child!==null){O.child.return=O,O=O.child;continue}if(O===o)break e;for(;O.sibling===null;){if(O.return===null||O.return===o)break e;O=O.return}O.sibling.return=O.return,O=O.sibling}o.stateNode=w;e:switch(bn(w,y,d),y){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&Ka(o)}}return yt(o),kg(o,o.type,a===null?null:a.memoizedProps,o.pendingProps,c),null;case 6:if(a&&o.stateNode!=null)a.memoizedProps!==d&&Ka(o);else{if(typeof d!="string"&&o.stateNode===null)throw Error(r(166));if(a=se.current,Hl(o)){if(a=o.stateNode,c=o.memoizedProps,d=null,y=vn,y!==null)switch(y.tag){case 27:case 5:d=y.memoizedProps}a[mn]=o,a=!!(a.nodeValue===c||d!==null&&d.suppressHydrationWarning===!0||nO(a.nodeValue,c)),a||zi(o,!0)}else a=Rd(a).createTextNode(d),a[mn]=o,o.stateNode=a}return yt(o),null;case 31:if(c=o.memoizedState,a===null||a.memoizedState!==null){if(d=Hl(o),c!==null){if(a===null){if(!d)throw Error(r(318));if(a=o.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(557));a[mn]=o}else Do(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;yt(o),a=!1}else c=Kv(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=c),a=!0;if(!a)return o.flags&256?(sr(o),o):(sr(o),null);if((o.flags&128)!==0)throw Error(r(558))}return yt(o),null;case 13:if(d=o.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(y=Hl(o),d!==null&&d.dehydrated!==null){if(a===null){if(!y)throw Error(r(318));if(y=o.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(r(317));y[mn]=o}else Do(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;yt(o),y=!1}else y=Kv(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=y),y=!0;if(!y)return o.flags&256?(sr(o),o):(sr(o),null)}return sr(o),(o.flags&128)!==0?(o.lanes=c,o):(c=d!==null,a=a!==null&&a.memoizedState!==null,c&&(d=o.child,y=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(y=d.alternate.memoizedState.cachePool.pool),w=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(w=d.memoizedState.cachePool.pool),w!==y&&(d.flags|=2048)),c!==a&&c&&(o.child.flags|=8192),gd(o,o.updateQueue),yt(o),null);case 4:return V(),a===null&&ry(o.stateNode.containerInfo),yt(o),null;case 10:return Ua(o.type),yt(o),null;case 19:if(z(Mt),d=o.memoizedState,d===null)return yt(o),null;if(y=(o.flags&128)!==0,w=d.rendering,w===null)if(y)$c(d,!1);else{if(_t!==0||a!==null&&(a.flags&128)!==0)for(a=o.child;a!==null;){if(w=ad(a),w!==null){for(o.flags|=128,$c(d,!1),a=w.updateQueue,o.updateQueue=a,gd(o,a),o.subtreeFlags=0,a=c,c=o.child;c!==null;)PE(c,a),c=c.sibling;return P(Mt,Mt.current&1|2),Fe&&$a(o,d.treeForkCount),o.child}a=a.sibling}d.tail!==null&&qt()>Sd&&(o.flags|=128,y=!0,$c(d,!1),o.lanes=4194304)}else{if(!y)if(a=ad(w),a!==null){if(o.flags|=128,y=!0,a=a.updateQueue,o.updateQueue=a,gd(o,a),$c(d,!0),d.tail===null&&d.tailMode==="hidden"&&!w.alternate&&!Fe)return yt(o),null}else 2*qt()-d.renderingStartTime>Sd&&c!==536870912&&(o.flags|=128,y=!0,$c(d,!1),o.lanes=4194304);d.isBackwards?(w.sibling=o.child,o.child=w):(a=d.last,a!==null?a.sibling=w:o.child=w,d.last=w)}return d.tail!==null?(a=d.tail,d.rendering=a,d.tail=a.sibling,d.renderingStartTime=qt(),a.sibling=null,c=Mt.current,P(Mt,y?c&1|2:c&1),Fe&&$a(o,d.treeForkCount),a):(yt(o),null);case 22:case 23:return sr(o),ag(),d=o.memoizedState!==null,a!==null?a.memoizedState!==null!==d&&(o.flags|=8192):d&&(o.flags|=8192),d?(c&536870912)!==0&&(o.flags&128)===0&&(yt(o),o.subtreeFlags&6&&(o.flags|=8192)):yt(o),c=o.updateQueue,c!==null&&gd(o,c.retryQueue),c=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),d=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),d!==c&&(o.flags|=2048),a!==null&&z(Io),null;case 24:return c=null,a!==null&&(c=a.memoizedState.cache),o.memoizedState.cache!==c&&(o.flags|=2048),Ua(Pt),yt(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function mB(a,o){switch(qv(o),o.tag){case 1:return a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 3:return Ua(Pt),V(),a=o.flags,(a&65536)!==0&&(a&128)===0?(o.flags=a&-65537|128,o):null;case 26:case 27:case 5:return ye(o),null;case 31:if(o.memoizedState!==null){if(sr(o),o.alternate===null)throw Error(r(340));Do()}return a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 13:if(sr(o),a=o.memoizedState,a!==null&&a.dehydrated!==null){if(o.alternate===null)throw Error(r(340));Do()}return a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 19:return z(Mt),null;case 4:return V(),null;case 10:return Ua(o.type),null;case 22:case 23:return sr(o),ag(),a!==null&&z(Io),a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 24:return Ua(Pt),null;case 25:return null;default:return null}}function lA(a,o){switch(qv(o),o.tag){case 3:Ua(Pt),V();break;case 26:case 27:case 5:ye(o);break;case 4:V();break;case 31:o.memoizedState!==null&&sr(o);break;case 13:sr(o);break;case 19:z(Mt);break;case 10:Ua(o.type);break;case 22:case 23:sr(o),ag(),a!==null&&z(Io);break;case 24:Ua(Pt)}}function Bc(a,o){try{var c=o.updateQueue,d=c!==null?c.lastEffect:null;if(d!==null){var y=d.next;c=y;do{if((c.tag&a)===a){d=void 0;var w=c.create,O=c.inst;d=w(),O.destroy=d}c=c.next}while(c!==y)}}catch(M){rt(o,o.return,M)}}function Ki(a,o,c){try{var d=o.updateQueue,y=d!==null?d.lastEffect:null;if(y!==null){var w=y.next;d=w;do{if((d.tag&a)===a){var O=d.inst,M=O.destroy;if(M!==void 0){O.destroy=void 0,y=o;var $=c,J=M;try{J()}catch(le){rt(y,$,le)}}}d=d.next}while(d!==w)}}catch(le){rt(o,o.return,le)}}function sA(a){var o=a.updateQueue;if(o!==null){var c=a.stateNode;try{ZE(o,c)}catch(d){rt(a,a.return,d)}}}function cA(a,o,c){c.props=Uo(a.type,a.memoizedProps),c.state=a.memoizedState;try{c.componentWillUnmount()}catch(d){rt(a,o,d)}}function Uc(a,o){try{var c=a.ref;if(c!==null){switch(a.tag){case 26:case 27:case 5:var d=a.stateNode;break;case 30:d=a.stateNode;break;default:d=a.stateNode}typeof c=="function"?a.refCleanup=c(d):c.current=d}}catch(y){rt(a,o,y)}}function pa(a,o){var c=a.ref,d=a.refCleanup;if(c!==null)if(typeof d=="function")try{d()}catch(y){rt(a,o,y)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(y){rt(a,o,y)}else c.current=null}function uA(a){var o=a.type,c=a.memoizedProps,d=a.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":c.autoFocus&&d.focus();break e;case"img":c.src?d.src=c.src:c.srcSet&&(d.srcset=c.srcSet)}}catch(y){rt(a,a.return,y)}}function Ig(a,o,c){try{var d=a.stateNode;LB(d,a.type,c,o),d[Hn]=o}catch(y){rt(a,a.return,y)}}function fA(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&Zi(a.type)||a.tag===4}function Lg(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||fA(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&Zi(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function zg(a,o,c){var d=a.tag;if(d===5||d===6)a=a.stateNode,o?(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c).insertBefore(a,o):(o=c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,o.appendChild(a),c=c._reactRootContainer,c!=null||o.onclick!==null||(o.onclick=Ia));else if(d!==4&&(d===27&&Zi(a.type)&&(c=a.stateNode,o=null),a=a.child,a!==null))for(zg(a,o,c),a=a.sibling;a!==null;)zg(a,o,c),a=a.sibling}function yd(a,o,c){var d=a.tag;if(d===5||d===6)a=a.stateNode,o?c.insertBefore(a,o):c.appendChild(a);else if(d!==4&&(d===27&&Zi(a.type)&&(c=a.stateNode),a=a.child,a!==null))for(yd(a,o,c),a=a.sibling;a!==null;)yd(a,o,c),a=a.sibling}function dA(a){var o=a.stateNode,c=a.memoizedProps;try{for(var d=a.type,y=o.attributes;y.length;)o.removeAttributeNode(y[0]);bn(o,d,c),o[mn]=a,o[Hn]=c}catch(w){rt(a,a.return,w)}}var Va=!1,Lt=!1,$g=!1,hA=typeof WeakSet=="function"?WeakSet:Set,on=null;function vB(a,o){if(a=a.containerInfo,oy=$d,a=AE(a),Rv(a)){if("selectionStart"in a)var c={start:a.selectionStart,end:a.selectionEnd};else e:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&d.rangeCount!==0){c=d.anchorNode;var y=d.anchorOffset,w=d.focusNode;d=d.focusOffset;try{c.nodeType,w.nodeType}catch{c=null;break e}var O=0,M=-1,$=-1,J=0,le=0,de=a,re=null;t:for(;;){for(var ae;de!==c||y!==0&&de.nodeType!==3||(M=O+y),de!==w||d!==0&&de.nodeType!==3||($=O+d),de.nodeType===3&&(O+=de.nodeValue.length),(ae=de.firstChild)!==null;)re=de,de=ae;for(;;){if(de===a)break t;if(re===c&&++J===y&&(M=O),re===w&&++le===d&&($=O),(ae=de.nextSibling)!==null)break;de=re,re=de.parentNode}de=ae}c=M===-1||$===-1?null:{start:M,end:$}}else c=null}c=c||{start:0,end:0}}else c=null;for(ly={focusedElem:a,selectionRange:c},$d=!1,on=o;on!==null;)if(o=on,a=o.child,(o.subtreeFlags&1028)!==0&&a!==null)a.return=o,on=a;else for(;on!==null;){switch(o=on,w=o.alternate,a=o.flags,o.tag){case 0:if((a&4)!==0&&(a=o.updateQueue,a=a!==null?a.events:null,a!==null))for(c=0;c<a.length;c++)y=a[c],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&w!==null){a=void 0,c=o,y=w.memoizedProps,w=w.memoizedState,d=c.stateNode;try{var we=Uo(c.type,y);a=d.getSnapshotBeforeUpdate(we,w),d.__reactInternalSnapshotBeforeUpdate=a}catch(Me){rt(c,c.return,Me)}}break;case 3:if((a&1024)!==0){if(a=o.stateNode.containerInfo,c=a.nodeType,c===9)uy(a);else if(c===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":uy(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(r(163))}if(a=o.sibling,a!==null){a.return=o.return,on=a;break}on=o.return}}function pA(a,o,c){var d=c.flags;switch(c.tag){case 0:case 11:case 15:Ya(a,c),d&4&&Bc(5,c);break;case 1:if(Ya(a,c),d&4)if(a=c.stateNode,o===null)try{a.componentDidMount()}catch(O){rt(c,c.return,O)}else{var y=Uo(c.type,o.memoizedProps);o=o.memoizedState;try{a.componentDidUpdate(y,o,a.__reactInternalSnapshotBeforeUpdate)}catch(O){rt(c,c.return,O)}}d&64&&sA(c),d&512&&Uc(c,c.return);break;case 3:if(Ya(a,c),d&64&&(a=c.updateQueue,a!==null)){if(o=null,c.child!==null)switch(c.child.tag){case 27:case 5:o=c.child.stateNode;break;case 1:o=c.child.stateNode}try{ZE(a,o)}catch(O){rt(c,c.return,O)}}break;case 27:o===null&&d&4&&dA(c);case 26:case 5:Ya(a,c),o===null&&d&4&&uA(c),d&512&&Uc(c,c.return);break;case 12:Ya(a,c);break;case 31:Ya(a,c),d&4&&gA(a,c);break;case 13:Ya(a,c),d&4&&yA(a,c),d&64&&(a=c.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(c=AB.bind(null,c),KB(a,c))));break;case 22:if(d=c.memoizedState!==null||Va,!d){o=o!==null&&o.memoizedState!==null||Lt,y=Va;var w=Lt;Va=d,(Lt=o)&&!w?Wa(a,c,(c.subtreeFlags&8772)!==0):Ya(a,c),Va=y,Lt=w}break;case 30:break;default:Ya(a,c)}}function mA(a){var o=a.alternate;o!==null&&(a.alternate=null,mA(o)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(o=a.stateNode,o!==null&&mv(o)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var wt=null,Fn=!1;function Ga(a,o,c){for(c=c.child;c!==null;)vA(a,o,c),c=c.sibling}function vA(a,o,c){if(hn&&typeof hn.onCommitFiberUnmount=="function")try{hn.onCommitFiberUnmount(rr,c)}catch{}switch(c.tag){case 26:Lt||pa(c,o),Ga(a,o,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:Lt||pa(c,o);var d=wt,y=Fn;Zi(c.type)&&(wt=c.stateNode,Fn=!1),Ga(a,o,c),Xc(c.stateNode),wt=d,Fn=y;break;case 5:Lt||pa(c,o);case 6:if(d=wt,y=Fn,wt=null,Ga(a,o,c),wt=d,Fn=y,wt!==null)if(Fn)try{(wt.nodeType===9?wt.body:wt.nodeName==="HTML"?wt.ownerDocument.body:wt).removeChild(c.stateNode)}catch(w){rt(c,o,w)}else try{wt.removeChild(c.stateNode)}catch(w){rt(c,o,w)}break;case 18:wt!==null&&(Fn?(a=wt,sO(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,c.stateNode),cs(a)):sO(wt,c.stateNode));break;case 4:d=wt,y=Fn,wt=c.stateNode.containerInfo,Fn=!0,Ga(a,o,c),wt=d,Fn=y;break;case 0:case 11:case 14:case 15:Ki(2,c,o),Lt||Ki(4,c,o),Ga(a,o,c);break;case 1:Lt||(pa(c,o),d=c.stateNode,typeof d.componentWillUnmount=="function"&&cA(c,o,d)),Ga(a,o,c);break;case 21:Ga(a,o,c);break;case 22:Lt=(d=Lt)||c.memoizedState!==null,Ga(a,o,c),Lt=d;break;default:Ga(a,o,c)}}function gA(a,o){if(o.memoizedState===null&&(a=o.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{cs(a)}catch(c){rt(o,o.return,c)}}}function yA(a,o){if(o.memoizedState===null&&(a=o.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{cs(a)}catch(c){rt(o,o.return,c)}}function gB(a){switch(a.tag){case 31:case 13:case 19:var o=a.stateNode;return o===null&&(o=a.stateNode=new hA),o;case 22:return a=a.stateNode,o=a._retryCache,o===null&&(o=a._retryCache=new hA),o;default:throw Error(r(435,a.tag))}}function bd(a,o){var c=gB(a);o.forEach(function(d){if(!c.has(d)){c.add(d);var y=OB.bind(null,a,d);d.then(y,y)}})}function Kn(a,o){var c=o.deletions;if(c!==null)for(var d=0;d<c.length;d++){var y=c[d],w=a,O=o,M=O;e:for(;M!==null;){switch(M.tag){case 27:if(Zi(M.type)){wt=M.stateNode,Fn=!1;break e}break;case 5:wt=M.stateNode,Fn=!1;break e;case 3:case 4:wt=M.stateNode.containerInfo,Fn=!0;break e}M=M.return}if(wt===null)throw Error(r(160));vA(w,O,y),wt=null,Fn=!1,w=y.alternate,w!==null&&(w.return=null),y.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)bA(o,a),o=o.sibling}var Qr=null;function bA(a,o){var c=a.alternate,d=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Kn(o,a),Vn(a),d&4&&(Ki(3,a,a.return),Bc(3,a),Ki(5,a,a.return));break;case 1:Kn(o,a),Vn(a),d&512&&(Lt||c===null||pa(c,c.return)),d&64&&Va&&(a=a.updateQueue,a!==null&&(d=a.callbacks,d!==null&&(c=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=c===null?d:c.concat(d))));break;case 26:var y=Qr;if(Kn(o,a),Vn(a),d&512&&(Lt||c===null||pa(c,c.return)),d&4){var w=c!==null?c.memoizedState:null;if(d=a.memoizedState,c===null)if(d===null)if(a.stateNode===null){e:{d=a.type,c=a.memoizedProps,y=y.ownerDocument||y;t:switch(d){case"title":w=y.getElementsByTagName("title")[0],(!w||w[pc]||w[mn]||w.namespaceURI==="http://www.w3.org/2000/svg"||w.hasAttribute("itemprop"))&&(w=y.createElement(d),y.head.insertBefore(w,y.querySelector("head > title"))),bn(w,d,c),w[mn]=a,an(w),d=w;break e;case"link":var O=bO("link","href",y).get(d+(c.href||""));if(O){for(var M=0;M<O.length;M++)if(w=O[M],w.getAttribute("href")===(c.href==null||c.href===""?null:c.href)&&w.getAttribute("rel")===(c.rel==null?null:c.rel)&&w.getAttribute("title")===(c.title==null?null:c.title)&&w.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){O.splice(M,1);break t}}w=y.createElement(d),bn(w,d,c),y.head.appendChild(w);break;case"meta":if(O=bO("meta","content",y).get(d+(c.content||""))){for(M=0;M<O.length;M++)if(w=O[M],w.getAttribute("content")===(c.content==null?null:""+c.content)&&w.getAttribute("name")===(c.name==null?null:c.name)&&w.getAttribute("property")===(c.property==null?null:c.property)&&w.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&w.getAttribute("charset")===(c.charSet==null?null:c.charSet)){O.splice(M,1);break t}}w=y.createElement(d),bn(w,d,c),y.head.appendChild(w);break;default:throw Error(r(468,d))}w[mn]=a,an(w),d=w}a.stateNode=d}else xO(y,a.type,a.stateNode);else a.stateNode=yO(y,d,a.memoizedProps);else w!==d?(w===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):w.count--,d===null?xO(y,a.type,a.stateNode):yO(y,d,a.memoizedProps)):d===null&&a.stateNode!==null&&Ig(a,a.memoizedProps,c.memoizedProps)}break;case 27:Kn(o,a),Vn(a),d&512&&(Lt||c===null||pa(c,c.return)),c!==null&&d&4&&Ig(a,a.memoizedProps,c.memoizedProps);break;case 5:if(Kn(o,a),Vn(a),d&512&&(Lt||c===null||pa(c,c.return)),a.flags&32){y=a.stateNode;try{Rl(y,"")}catch(we){rt(a,a.return,we)}}d&4&&a.stateNode!=null&&(y=a.memoizedProps,Ig(a,y,c!==null?c.memoizedProps:y)),d&1024&&($g=!0);break;case 6:if(Kn(o,a),Vn(a),d&4){if(a.stateNode===null)throw Error(r(162));d=a.memoizedProps,c=a.stateNode;try{c.nodeValue=d}catch(we){rt(a,a.return,we)}}break;case 3:if(kd=null,y=Qr,Qr=Dd(o.containerInfo),Kn(o,a),Qr=y,Vn(a),d&4&&c!==null&&c.memoizedState.isDehydrated)try{cs(o.containerInfo)}catch(we){rt(a,a.return,we)}$g&&($g=!1,xA(a));break;case 4:d=Qr,Qr=Dd(a.stateNode.containerInfo),Kn(o,a),Vn(a),Qr=d;break;case 12:Kn(o,a),Vn(a);break;case 31:Kn(o,a),Vn(a),d&4&&(d=a.updateQueue,d!==null&&(a.updateQueue=null,bd(a,d)));break;case 13:Kn(o,a),Vn(a),a.child.flags&8192&&a.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(wd=qt()),d&4&&(d=a.updateQueue,d!==null&&(a.updateQueue=null,bd(a,d)));break;case 22:y=a.memoizedState!==null;var $=c!==null&&c.memoizedState!==null,J=Va,le=Lt;if(Va=J||y,Lt=le||$,Kn(o,a),Lt=le,Va=J,Vn(a),d&8192)e:for(o=a.stateNode,o._visibility=y?o._visibility&-2:o._visibility|1,y&&(c===null||$||Va||Lt||Ho(a)),c=null,o=a;;){if(o.tag===5||o.tag===26){if(c===null){$=c=o;try{if(w=$.stateNode,y)O=w.style,typeof O.setProperty=="function"?O.setProperty("display","none","important"):O.display="none";else{M=$.stateNode;var de=$.memoizedProps.style,re=de!=null&&de.hasOwnProperty("display")?de.display:null;M.style.display=re==null||typeof re=="boolean"?"":(""+re).trim()}}catch(we){rt($,$.return,we)}}}else if(o.tag===6){if(c===null){$=o;try{$.stateNode.nodeValue=y?"":$.memoizedProps}catch(we){rt($,$.return,we)}}}else if(o.tag===18){if(c===null){$=o;try{var ae=$.stateNode;y?cO(ae,!0):cO($.stateNode,!1)}catch(we){rt($,$.return,we)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===a)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===a)break e;for(;o.sibling===null;){if(o.return===null||o.return===a)break e;c===o&&(c=null),o=o.return}c===o&&(c=null),o.sibling.return=o.return,o=o.sibling}d&4&&(d=a.updateQueue,d!==null&&(c=d.retryQueue,c!==null&&(d.retryQueue=null,bd(a,c))));break;case 19:Kn(o,a),Vn(a),d&4&&(d=a.updateQueue,d!==null&&(a.updateQueue=null,bd(a,d)));break;case 30:break;case 21:break;default:Kn(o,a),Vn(a)}}function Vn(a){var o=a.flags;if(o&2){try{for(var c,d=a.return;d!==null;){if(fA(d)){c=d;break}d=d.return}if(c==null)throw Error(r(160));switch(c.tag){case 27:var y=c.stateNode,w=Lg(a);yd(a,w,y);break;case 5:var O=c.stateNode;c.flags&32&&(Rl(O,""),c.flags&=-33);var M=Lg(a);yd(a,M,O);break;case 3:case 4:var $=c.stateNode.containerInfo,J=Lg(a);zg(a,J,$);break;default:throw Error(r(161))}}catch(le){rt(a,a.return,le)}a.flags&=-3}o&4096&&(a.flags&=-4097)}function xA(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var o=a;xA(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),a=a.sibling}}function Ya(a,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)pA(a,o.alternate,o),o=o.sibling}function Ho(a){for(a=a.child;a!==null;){var o=a;switch(o.tag){case 0:case 11:case 14:case 15:Ki(4,o,o.return),Ho(o);break;case 1:pa(o,o.return);var c=o.stateNode;typeof c.componentWillUnmount=="function"&&cA(o,o.return,c),Ho(o);break;case 27:Xc(o.stateNode);case 26:case 5:pa(o,o.return),Ho(o);break;case 22:o.memoizedState===null&&Ho(o);break;case 30:Ho(o);break;default:Ho(o)}a=a.sibling}}function Wa(a,o,c){for(c=c&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var d=o.alternate,y=a,w=o,O=w.flags;switch(w.tag){case 0:case 11:case 15:Wa(y,w,c),Bc(4,w);break;case 1:if(Wa(y,w,c),d=w,y=d.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(J){rt(d,d.return,J)}if(d=w,y=d.updateQueue,y!==null){var M=d.stateNode;try{var $=y.shared.hiddenCallbacks;if($!==null)for(y.shared.hiddenCallbacks=null,y=0;y<$.length;y++)QE($[y],M)}catch(J){rt(d,d.return,J)}}c&&O&64&&sA(w),Uc(w,w.return);break;case 27:dA(w);case 26:case 5:Wa(y,w,c),c&&d===null&&O&4&&uA(w),Uc(w,w.return);break;case 12:Wa(y,w,c);break;case 31:Wa(y,w,c),c&&O&4&&gA(y,w);break;case 13:Wa(y,w,c),c&&O&4&&yA(y,w);break;case 22:w.memoizedState===null&&Wa(y,w,c),Uc(w,w.return);break;case 30:break;default:Wa(y,w,c)}o=o.sibling}}function Bg(a,o){var c=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),a=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(a=o.memoizedState.cachePool.pool),a!==c&&(a!=null&&a.refCount++,c!=null&&Nc(c))}function Ug(a,o){a=null,o.alternate!==null&&(a=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==a&&(o.refCount++,a!=null&&Nc(a))}function Zr(a,o,c,d){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)wA(a,o,c,d),o=o.sibling}function wA(a,o,c,d){var y=o.flags;switch(o.tag){case 0:case 11:case 15:Zr(a,o,c,d),y&2048&&Bc(9,o);break;case 1:Zr(a,o,c,d);break;case 3:Zr(a,o,c,d),y&2048&&(a=null,o.alternate!==null&&(a=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==a&&(o.refCount++,a!=null&&Nc(a)));break;case 12:if(y&2048){Zr(a,o,c,d),a=o.stateNode;try{var w=o.memoizedProps,O=w.id,M=w.onPostCommit;typeof M=="function"&&M(O,o.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch($){rt(o,o.return,$)}}else Zr(a,o,c,d);break;case 31:Zr(a,o,c,d);break;case 13:Zr(a,o,c,d);break;case 23:break;case 22:w=o.stateNode,O=o.alternate,o.memoizedState!==null?w._visibility&2?Zr(a,o,c,d):Hc(a,o):w._visibility&2?Zr(a,o,c,d):(w._visibility|=2,Zl(a,o,c,d,(o.subtreeFlags&10256)!==0||!1)),y&2048&&Bg(O,o);break;case 24:Zr(a,o,c,d),y&2048&&Ug(o.alternate,o);break;default:Zr(a,o,c,d)}}function Zl(a,o,c,d,y){for(y=y&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var w=a,O=o,M=c,$=d,J=O.flags;switch(O.tag){case 0:case 11:case 15:Zl(w,O,M,$,y),Bc(8,O);break;case 23:break;case 22:var le=O.stateNode;O.memoizedState!==null?le._visibility&2?Zl(w,O,M,$,y):Hc(w,O):(le._visibility|=2,Zl(w,O,M,$,y)),y&&J&2048&&Bg(O.alternate,O);break;case 24:Zl(w,O,M,$,y),y&&J&2048&&Ug(O.alternate,O);break;default:Zl(w,O,M,$,y)}o=o.sibling}}function Hc(a,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var c=a,d=o,y=d.flags;switch(d.tag){case 22:Hc(c,d),y&2048&&Bg(d.alternate,d);break;case 24:Hc(c,d),y&2048&&Ug(d.alternate,d);break;default:Hc(c,d)}o=o.sibling}}var qc=8192;function Jl(a,o,c){if(a.subtreeFlags&qc)for(a=a.child;a!==null;)SA(a,o,c),a=a.sibling}function SA(a,o,c){switch(a.tag){case 26:Jl(a,o,c),a.flags&qc&&a.memoizedState!==null&&r6(c,Qr,a.memoizedState,a.memoizedProps);break;case 5:Jl(a,o,c);break;case 3:case 4:var d=Qr;Qr=Dd(a.stateNode.containerInfo),Jl(a,o,c),Qr=d;break;case 22:a.memoizedState===null&&(d=a.alternate,d!==null&&d.memoizedState!==null?(d=qc,qc=16777216,Jl(a,o,c),qc=d):Jl(a,o,c));break;default:Jl(a,o,c)}}function EA(a){var o=a.alternate;if(o!==null&&(a=o.child,a!==null)){o.child=null;do o=a.sibling,a.sibling=null,a=o;while(a!==null)}}function Fc(a){var o=a.deletions;if((a.flags&16)!==0){if(o!==null)for(var c=0;c<o.length;c++){var d=o[c];on=d,AA(d,a)}EA(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)CA(a),a=a.sibling}function CA(a){switch(a.tag){case 0:case 11:case 15:Fc(a),a.flags&2048&&Ki(9,a,a.return);break;case 3:Fc(a);break;case 12:Fc(a);break;case 22:var o=a.stateNode;a.memoizedState!==null&&o._visibility&2&&(a.return===null||a.return.tag!==13)?(o._visibility&=-3,xd(a)):Fc(a);break;default:Fc(a)}}function xd(a){var o=a.deletions;if((a.flags&16)!==0){if(o!==null)for(var c=0;c<o.length;c++){var d=o[c];on=d,AA(d,a)}EA(a)}for(a=a.child;a!==null;){switch(o=a,o.tag){case 0:case 11:case 15:Ki(8,o,o.return),xd(o);break;case 22:c=o.stateNode,c._visibility&2&&(c._visibility&=-3,xd(o));break;default:xd(o)}a=a.sibling}}function AA(a,o){for(;on!==null;){var c=on;switch(c.tag){case 0:case 11:case 15:Ki(8,c,o);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var d=c.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:Nc(c.memoizedState.cache)}if(d=c.child,d!==null)d.return=c,on=d;else e:for(c=a;on!==null;){d=on;var y=d.sibling,w=d.return;if(mA(d),d===c){on=null;break e}if(y!==null){y.return=w,on=y;break e}on=w}}}var yB={getCacheForType:function(a){var o=gn(Pt),c=o.data.get(a);return c===void 0&&(c=a(),o.data.set(a,c)),c},cacheSignal:function(){return gn(Pt).controller.signal}},bB=typeof WeakMap=="function"?WeakMap:Map,Ze=0,ft=null,$e=null,He=0,nt=0,cr=null,Vi=!1,es=!1,Hg=!1,Xa=0,_t=0,Gi=0,qo=0,qg=0,ur=0,ts=0,Kc=null,Gn=null,Fg=!1,wd=0,OA=0,Sd=1/0,Ed=null,Yi=null,Ft=0,Wi=null,ns=null,Qa=0,Kg=0,Vg=null,NA=null,Vc=0,Gg=null;function fr(){return(Ze&2)!==0&&He!==0?He&-He:I.T!==null?Jg():hv()}function _A(){if(ur===0)if((He&536870912)===0||Fe){var a=Ve;Ve<<=1,(Ve&3932160)===0&&(Ve=262144),ur=a}else ur=536870912;return a=lr.current,a!==null&&(a.flags|=32),ur}function Yn(a,o,c){(a===ft&&(nt===2||nt===9)||a.cancelPendingCommit!==null)&&(rs(a,0),Xi(a,He,ur,!1)),Ye(a,c),((Ze&2)===0||a!==ft)&&(a===ft&&((Ze&2)===0&&(qo|=c),_t===4&&Xi(a,He,ur,!1)),ma(a))}function jA(a,o,c){if((Ze&6)!==0)throw Error(r(327));var d=!c&&(o&127)===0&&(o&a.expiredLanes)===0||Le(a,o),y=d?SB(a,o):Wg(a,o,!0),w=d;do{if(y===0){es&&!d&&Xi(a,o,0,!1);break}else{if(c=a.current.alternate,w&&!xB(c)){y=Wg(a,o,!1),w=!1;continue}if(y===2){if(w=o,a.errorRecoveryDisabledLanes&w)var O=0;else O=a.pendingLanes&-536870913,O=O!==0?O:O&536870912?536870912:0;if(O!==0){o=O;e:{var M=a;y=Kc;var $=M.current.memoizedState.isDehydrated;if($&&(rs(M,O).flags|=256),O=Wg(M,O,!1),O!==2){if(Hg&&!$){M.errorRecoveryDisabledLanes|=w,qo|=w,y=4;break e}w=Gn,Gn=y,w!==null&&(Gn===null?Gn=w:Gn.push.apply(Gn,w))}y=O}if(w=!1,y!==2)continue}}if(y===1){rs(a,0),Xi(a,o,0,!0);break}e:{switch(d=a,w=y,w){case 0:case 1:throw Error(r(345));case 4:if((o&4194048)!==o)break;case 6:Xi(d,o,ur,!Vi);break e;case 2:Gn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((o&62914560)===o&&(y=wd+300-qt(),10<y)){if(Xi(d,o,ur,!Vi),Ce(d,0,!0)!==0)break e;Qa=o,d.timeoutHandle=oO(TA.bind(null,d,c,Gn,Ed,Fg,o,ur,qo,ts,Vi,w,"Throttled",-0,0),y);break e}TA(d,c,Gn,Ed,Fg,o,ur,qo,ts,Vi,w,null,-0,0)}}break}while(!0);ma(a)}function TA(a,o,c,d,y,w,O,M,$,J,le,de,re,ae){if(a.timeoutHandle=-1,de=o.subtreeFlags,de&8192||(de&16785408)===16785408){de={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ia},SA(o,w,de);var we=(w&62914560)===w?wd-qt():(w&4194048)===w?OA-qt():0;if(we=a6(de,we),we!==null){Qa=w,a.cancelPendingCommit=we(zA.bind(null,a,o,w,c,d,y,O,M,$,le,de,null,re,ae)),Xi(a,w,O,!J);return}}zA(a,o,w,c,d,y,O,M,$)}function xB(a){for(var o=a;;){var c=o.tag;if((c===0||c===11||c===15)&&o.flags&16384&&(c=o.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var d=0;d<c.length;d++){var y=c[d],w=y.getSnapshot;y=y.value;try{if(!ir(w(),y))return!1}catch{return!1}}if(c=o.child,o.subtreeFlags&16384&&c!==null)c.return=o,o=c;else{if(o===a)break;for(;o.sibling===null;){if(o.return===null||o.return===a)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Xi(a,o,c,d){o&=~qg,o&=~qo,a.suspendedLanes|=o,a.pingedLanes&=~o,d&&(a.warmLanes|=o),d=a.expirationTimes;for(var y=o;0<y;){var w=31-rn(y),O=1<<w;d[w]=-1,y&=~O}c!==0&&Cr(a,c,o)}function Cd(){return(Ze&6)===0?(Gc(0),!1):!0}function Yg(){if($e!==null){if(nt===0)var a=$e.return;else a=$e,Ba=Po=null,ug(a),Gl=null,jc=0,a=$e;for(;a!==null;)lA(a.alternate,a),a=a.return;$e=null}}function rs(a,o){var c=a.timeoutHandle;c!==-1&&(a.timeoutHandle=-1,BB(c)),c=a.cancelPendingCommit,c!==null&&(a.cancelPendingCommit=null,c()),Qa=0,Yg(),ft=a,$e=c=za(a.current,null),He=o,nt=0,cr=null,Vi=!1,es=Le(a,o),Hg=!1,ts=ur=qg=qo=Gi=_t=0,Gn=Kc=null,Fg=!1,(o&8)!==0&&(o|=o&32);var d=a.entangledLanes;if(d!==0)for(a=a.entanglements,d&=o;0<d;){var y=31-rn(d),w=1<<y;o|=a[y],d&=~w}return Xa=o,Kf(),c}function MA(a,o){De=null,I.H=Lc,o===Vl||o===Jf?(o=GE(),nt=3):o===Zv?(o=GE(),nt=4):nt=o===Og?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,cr=o,$e===null&&(_t=1,hd(a,_r(o,a.current)))}function RA(){var a=lr.current;return a===null?!0:(He&4194048)===He?Rr===null:(He&62914560)===He||(He&536870912)!==0?a===Rr:!1}function DA(){var a=I.H;return I.H=Lc,a===null?Lc:a}function PA(){var a=I.A;return I.A=yB,a}function Ad(){_t=4,Vi||(He&4194048)!==He&&lr.current!==null||(es=!0),(Gi&134217727)===0&&(qo&134217727)===0||ft===null||Xi(ft,He,ur,!1)}function Wg(a,o,c){var d=Ze;Ze|=2;var y=DA(),w=PA();(ft!==a||He!==o)&&(Ed=null,rs(a,o)),o=!1;var O=_t;e:do try{if(nt!==0&&$e!==null){var M=$e,$=cr;switch(nt){case 8:Yg(),O=6;break e;case 3:case 2:case 9:case 6:lr.current===null&&(o=!0);var J=nt;if(nt=0,cr=null,as(a,M,$,J),c&&es){O=0;break e}break;default:J=nt,nt=0,cr=null,as(a,M,$,J)}}wB(),O=_t;break}catch(le){MA(a,le)}while(!0);return o&&a.shellSuspendCounter++,Ba=Po=null,Ze=d,I.H=y,I.A=w,$e===null&&(ft=null,He=0,Kf()),O}function wB(){for(;$e!==null;)kA($e)}function SB(a,o){var c=Ze;Ze|=2;var d=DA(),y=PA();ft!==a||He!==o?(Ed=null,Sd=qt()+500,rs(a,o)):es=Le(a,o);e:do try{if(nt!==0&&$e!==null){o=$e;var w=cr;t:switch(nt){case 1:nt=0,cr=null,as(a,o,w,1);break;case 2:case 9:if(KE(w)){nt=0,cr=null,IA(o);break}o=function(){nt!==2&&nt!==9||ft!==a||(nt=7),ma(a)},w.then(o,o);break e;case 3:nt=7;break e;case 4:nt=5;break e;case 7:KE(w)?(nt=0,cr=null,IA(o)):(nt=0,cr=null,as(a,o,w,7));break;case 5:var O=null;switch($e.tag){case 26:O=$e.memoizedState;case 5:case 27:var M=$e;if(O?wO(O):M.stateNode.complete){nt=0,cr=null;var $=M.sibling;if($!==null)$e=$;else{var J=M.return;J!==null?($e=J,Od(J)):$e=null}break t}}nt=0,cr=null,as(a,o,w,5);break;case 6:nt=0,cr=null,as(a,o,w,6);break;case 8:Yg(),_t=6;break e;default:throw Error(r(462))}}EB();break}catch(le){MA(a,le)}while(!0);return Ba=Po=null,I.H=d,I.A=y,Ze=c,$e!==null?0:(ft=null,He=0,Kf(),_t)}function EB(){for(;$e!==null&&!Ht();)kA($e)}function kA(a){var o=iA(a.alternate,a,Xa);a.memoizedProps=a.pendingProps,o===null?Od(a):$e=o}function IA(a){var o=a,c=o.alternate;switch(o.tag){case 15:case 0:o=JC(c,o,o.pendingProps,o.type,void 0,He);break;case 11:o=JC(c,o,o.pendingProps,o.type.render,o.ref,He);break;case 5:ug(o);default:lA(c,o),o=$e=PE(o,Xa),o=iA(c,o,Xa)}a.memoizedProps=a.pendingProps,o===null?Od(a):$e=o}function as(a,o,c,d){Ba=Po=null,ug(o),Gl=null,jc=0;var y=o.return;try{if(fB(a,y,o,c,He)){_t=1,hd(a,_r(c,a.current)),$e=null;return}}catch(w){if(y!==null)throw $e=y,w;_t=1,hd(a,_r(c,a.current)),$e=null;return}o.flags&32768?(Fe||d===1?a=!0:es||(He&536870912)!==0?a=!1:(Vi=a=!0,(d===2||d===9||d===3||d===6)&&(d=lr.current,d!==null&&d.tag===13&&(d.flags|=16384))),LA(o,a)):Od(o)}function Od(a){var o=a;do{if((o.flags&32768)!==0){LA(o,Vi);return}a=o.return;var c=pB(o.alternate,o,Xa);if(c!==null){$e=c;return}if(o=o.sibling,o!==null){$e=o;return}$e=o=a}while(o!==null);_t===0&&(_t=5)}function LA(a,o){do{var c=mB(a.alternate,a);if(c!==null){c.flags&=32767,$e=c;return}if(c=a.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!o&&(a=a.sibling,a!==null)){$e=a;return}$e=a=c}while(a!==null);_t=6,$e=null}function zA(a,o,c,d,y,w,O,M,$){a.cancelPendingCommit=null;do Nd();while(Ft!==0);if((Ze&6)!==0)throw Error(r(327));if(o!==null){if(o===a.current)throw Error(r(177));if(w=o.lanes|o.childLanes,w|=Lv,vt(a,c,w,O,M,$),a===ft&&($e=ft=null,He=0),ns=o,Wi=a,Qa=c,Kg=w,Vg=y,NA=d,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,NB(dn,function(){return qA(),null})):(a.callbackNode=null,a.callbackPriority=0),d=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||d){d=I.T,I.T=null,y=q.p,q.p=2,O=Ze,Ze|=4;try{vB(a,o,c)}finally{Ze=O,q.p=y,I.T=d}}Ft=1,$A(),BA(),UA()}}function $A(){if(Ft===1){Ft=0;var a=Wi,o=ns,c=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||c){c=I.T,I.T=null;var d=q.p;q.p=2;var y=Ze;Ze|=4;try{bA(o,a);var w=ly,O=AE(a.containerInfo),M=w.focusedElem,$=w.selectionRange;if(O!==M&&M&&M.ownerDocument&&CE(M.ownerDocument.documentElement,M)){if($!==null&&Rv(M)){var J=$.start,le=$.end;if(le===void 0&&(le=J),"selectionStart"in M)M.selectionStart=J,M.selectionEnd=Math.min(le,M.value.length);else{var de=M.ownerDocument||document,re=de&&de.defaultView||window;if(re.getSelection){var ae=re.getSelection(),we=M.textContent.length,Me=Math.min($.start,we),st=$.end===void 0?Me:Math.min($.end,we);!ae.extend&&Me>st&&(O=st,st=Me,Me=O);var K=EE(M,Me),U=EE(M,st);if(K&&U&&(ae.rangeCount!==1||ae.anchorNode!==K.node||ae.anchorOffset!==K.offset||ae.focusNode!==U.node||ae.focusOffset!==U.offset)){var Z=de.createRange();Z.setStart(K.node,K.offset),ae.removeAllRanges(),Me>st?(ae.addRange(Z),ae.extend(U.node,U.offset)):(Z.setEnd(U.node,U.offset),ae.addRange(Z))}}}}for(de=[],ae=M;ae=ae.parentNode;)ae.nodeType===1&&de.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<de.length;M++){var ue=de[M];ue.element.scrollLeft=ue.left,ue.element.scrollTop=ue.top}}$d=!!oy,ly=oy=null}finally{Ze=y,q.p=d,I.T=c}}a.current=o,Ft=2}}function BA(){if(Ft===2){Ft=0;var a=Wi,o=ns,c=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||c){c=I.T,I.T=null;var d=q.p;q.p=2;var y=Ze;Ze|=4;try{pA(a,o.alternate,o)}finally{Ze=y,q.p=d,I.T=c}}Ft=3}}function UA(){if(Ft===4||Ft===3){Ft=0,en();var a=Wi,o=ns,c=Qa,d=NA;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?Ft=5:(Ft=0,ns=Wi=null,HA(a,a.pendingLanes));var y=a.pendingLanes;if(y===0&&(Yi=null),Wr(c),o=o.stateNode,hn&&typeof hn.onCommitFiberRoot=="function")try{hn.onCommitFiberRoot(rr,o,void 0,(o.current.flags&128)===128)}catch{}if(d!==null){o=I.T,y=q.p,q.p=2,I.T=null;try{for(var w=a.onRecoverableError,O=0;O<d.length;O++){var M=d[O];w(M.value,{componentStack:M.stack})}}finally{I.T=o,q.p=y}}(Qa&3)!==0&&Nd(),ma(a),y=a.pendingLanes,(c&261930)!==0&&(y&42)!==0?a===Gg?Vc++:(Vc=0,Gg=a):Vc=0,Gc(0)}}function HA(a,o){(a.pooledCacheLanes&=o)===0&&(o=a.pooledCache,o!=null&&(a.pooledCache=null,Nc(o)))}function Nd(){return $A(),BA(),UA(),qA()}function qA(){if(Ft!==5)return!1;var a=Wi,o=Kg;Kg=0;var c=Wr(Qa),d=I.T,y=q.p;try{q.p=32>c?32:c,I.T=null,c=Vg,Vg=null;var w=Wi,O=Qa;if(Ft=0,ns=Wi=null,Qa=0,(Ze&6)!==0)throw Error(r(331));var M=Ze;if(Ze|=4,CA(w.current),wA(w,w.current,O,c),Ze=M,Gc(0,!1),hn&&typeof hn.onPostCommitFiberRoot=="function")try{hn.onPostCommitFiberRoot(rr,w)}catch{}return!0}finally{q.p=y,I.T=d,HA(a,o)}}function FA(a,o,c){o=_r(c,o),o=Ag(a.stateNode,o,2),a=Hi(a,o,2),a!==null&&(Ye(a,2),ma(a))}function rt(a,o,c){if(a.tag===3)FA(a,a,c);else for(;o!==null;){if(o.tag===3){FA(o,a,c);break}else if(o.tag===1){var d=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Yi===null||!Yi.has(d))){a=_r(c,a),c=KC(2),d=Hi(o,c,2),d!==null&&(VC(c,d,o,a),Ye(d,2),ma(d));break}}o=o.return}}function Xg(a,o,c){var d=a.pingCache;if(d===null){d=a.pingCache=new bB;var y=new Set;d.set(o,y)}else y=d.get(o),y===void 0&&(y=new Set,d.set(o,y));y.has(c)||(Hg=!0,y.add(c),a=CB.bind(null,a,o,c),o.then(a,a))}function CB(a,o,c){var d=a.pingCache;d!==null&&d.delete(o),a.pingedLanes|=a.suspendedLanes&c,a.warmLanes&=~c,ft===a&&(He&c)===c&&(_t===4||_t===3&&(He&62914560)===He&&300>qt()-wd?(Ze&2)===0&&rs(a,0):qg|=c,ts===He&&(ts=0)),ma(a)}function KA(a,o){o===0&&(o=it()),a=Mo(a,o),a!==null&&(Ye(a,o),ma(a))}function AB(a){var o=a.memoizedState,c=0;o!==null&&(c=o.retryLane),KA(a,c)}function OB(a,o){var c=0;switch(a.tag){case 31:case 13:var d=a.stateNode,y=a.memoizedState;y!==null&&(c=y.retryLane);break;case 19:d=a.stateNode;break;case 22:d=a.stateNode._retryCache;break;default:throw Error(r(314))}d!==null&&d.delete(o),KA(a,c)}function NB(a,o){return An(a,o)}var _d=null,is=null,Qg=!1,jd=!1,Zg=!1,Qi=0;function ma(a){a!==is&&a.next===null&&(is===null?_d=is=a:is=is.next=a),jd=!0,Qg||(Qg=!0,jB())}function Gc(a,o){if(!Zg&&jd){Zg=!0;do for(var c=!1,d=_d;d!==null;){if(a!==0){var y=d.pendingLanes;if(y===0)var w=0;else{var O=d.suspendedLanes,M=d.pingedLanes;w=(1<<31-rn(42|a)+1)-1,w&=y&~(O&~M),w=w&201326741?w&201326741|1:w?w|2:0}w!==0&&(c=!0,WA(d,w))}else w=He,w=Ce(d,d===ft?w:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(w&3)===0||Le(d,w)||(c=!0,WA(d,w));d=d.next}while(c);Zg=!1}}function _B(){VA()}function VA(){jd=Qg=!1;var a=0;Qi!==0&&$B()&&(a=Qi);for(var o=qt(),c=null,d=_d;d!==null;){var y=d.next,w=GA(d,o);w===0?(d.next=null,c===null?_d=y:c.next=y,y===null&&(is=c)):(c=d,(a!==0||(w&3)!==0)&&(jd=!0)),d=y}Ft!==0&&Ft!==5||Gc(a),Qi!==0&&(Qi=0)}function GA(a,o){for(var c=a.suspendedLanes,d=a.pingedLanes,y=a.expirationTimes,w=a.pendingLanes&-62914561;0<w;){var O=31-rn(w),M=1<<O,$=y[O];$===-1?((M&c)===0||(M&d)!==0)&&(y[O]=ut(M,o)):$<=o&&(a.expiredLanes|=M),w&=~M}if(o=ft,c=He,c=Ce(a,a===o?c:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),d=a.callbackNode,c===0||a===o&&(nt===2||nt===9)||a.cancelPendingCommit!==null)return d!==null&&d!==null&&Sr(d),a.callbackNode=null,a.callbackPriority=0;if((c&3)===0||Le(a,c)){if(o=c&-c,o===a.callbackPriority)return o;switch(d!==null&&Sr(d),Wr(c)){case 2:case 8:c=Gr;break;case 32:c=dn;break;case 268435456:c=On;break;default:c=dn}return d=YA.bind(null,a),c=An(c,d),a.callbackPriority=o,a.callbackNode=c,o}return d!==null&&d!==null&&Sr(d),a.callbackPriority=2,a.callbackNode=null,2}function YA(a,o){if(Ft!==0&&Ft!==5)return a.callbackNode=null,a.callbackPriority=0,null;var c=a.callbackNode;if(Nd()&&a.callbackNode!==c)return null;var d=He;return d=Ce(a,a===ft?d:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),d===0?null:(jA(a,d,o),GA(a,qt()),a.callbackNode!=null&&a.callbackNode===c?YA.bind(null,a):null)}function WA(a,o){if(Nd())return null;jA(a,o,!0)}function jB(){UB(function(){(Ze&6)!==0?An(tn,_B):VA()})}function Jg(){if(Qi===0){var a=Fl;a===0&&(a=Ue,Ue<<=1,(Ue&261888)===0&&(Ue=256)),Qi=a}return Qi}function XA(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:Lf(""+a)}function QA(a,o){var c=o.ownerDocument.createElement("input");return c.name=o.name,c.value=o.value,a.id&&c.setAttribute("form",a.id),o.parentNode.insertBefore(c,o),a=new FormData(a),c.parentNode.removeChild(c),a}function TB(a,o,c,d,y){if(o==="submit"&&c&&c.stateNode===y){var w=XA((y[Hn]||null).action),O=d.submitter;O&&(o=(o=O[Hn]||null)?XA(o.formAction):O.getAttribute("formAction"),o!==null&&(w=o,O=null));var M=new Uf("action","action",null,d,y);a.push({event:M,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(Qi!==0){var $=O?QA(y,O):new FormData(y);bg(c,{pending:!0,data:$,method:y.method,action:w},null,$)}}else typeof w=="function"&&(M.preventDefault(),$=O?QA(y,O):new FormData(y),bg(c,{pending:!0,data:$,method:y.method,action:w},w,$))},currentTarget:y}]})}}for(var ey=0;ey<Iv.length;ey++){var ty=Iv[ey],MB=ty.toLowerCase(),RB=ty[0].toUpperCase()+ty.slice(1);Xr(MB,"on"+RB)}Xr(_E,"onAnimationEnd"),Xr(jE,"onAnimationIteration"),Xr(TE,"onAnimationStart"),Xr("dblclick","onDoubleClick"),Xr("focusin","onFocus"),Xr("focusout","onBlur"),Xr(Y$,"onTransitionRun"),Xr(W$,"onTransitionStart"),Xr(X$,"onTransitionCancel"),Xr(ME,"onTransitionEnd"),Tl("onMouseEnter",["mouseout","mouseover"]),Tl("onMouseLeave",["mouseout","mouseover"]),Tl("onPointerEnter",["pointerout","pointerover"]),Tl("onPointerLeave",["pointerout","pointerover"]),No("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),No("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),No("onBeforeInput",["compositionend","keypress","textInput","paste"]),No("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),No("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),No("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Yc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),DB=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Yc));function ZA(a,o){o=(o&4)!==0;for(var c=0;c<a.length;c++){var d=a[c],y=d.event;d=d.listeners;e:{var w=void 0;if(o)for(var O=d.length-1;0<=O;O--){var M=d[O],$=M.instance,J=M.currentTarget;if(M=M.listener,$!==w&&y.isPropagationStopped())break e;w=M,y.currentTarget=J;try{w(y)}catch(le){Ff(le)}y.currentTarget=null,w=$}else for(O=0;O<d.length;O++){if(M=d[O],$=M.instance,J=M.currentTarget,M=M.listener,$!==w&&y.isPropagationStopped())break e;w=M,y.currentTarget=J;try{w(y)}catch(le){Ff(le)}y.currentTarget=null,w=$}}}}function Be(a,o){var c=o[pv];c===void 0&&(c=o[pv]=new Set);var d=a+"__bubble";c.has(d)||(JA(o,a,2,!1),c.add(d))}function ny(a,o,c){var d=0;o&&(d|=4),JA(c,a,d,o)}var Td="_reactListening"+Math.random().toString(36).slice(2);function ry(a){if(!a[Td]){a[Td]=!0,VS.forEach(function(c){c!=="selectionchange"&&(DB.has(c)||ny(c,!1,a),ny(c,!0,a))});var o=a.nodeType===9?a:a.ownerDocument;o===null||o[Td]||(o[Td]=!0,ny("selectionchange",!1,o))}}function JA(a,o,c,d){switch(_O(o)){case 2:var y=l6;break;case 8:y=s6;break;default:y=yy}c=y.bind(null,o,c,a),y=void 0,!Ev||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(y=!0),d?y!==void 0?a.addEventListener(o,c,{capture:!0,passive:y}):a.addEventListener(o,c,!0):y!==void 0?a.addEventListener(o,c,{passive:y}):a.addEventListener(o,c,!1)}function ay(a,o,c,d,y){var w=d;if((o&1)===0&&(o&2)===0&&d!==null)e:for(;;){if(d===null)return;var O=d.tag;if(O===3||O===4){var M=d.stateNode.containerInfo;if(M===y)break;if(O===4)for(O=d.return;O!==null;){var $=O.tag;if(($===3||$===4)&&O.stateNode.containerInfo===y)return;O=O.return}for(;M!==null;){if(O=Nl(M),O===null)return;if($=O.tag,$===5||$===6||$===26||$===27){d=w=O;continue e}M=M.parentNode}}d=d.return}aE(function(){var J=w,le=wv(c),de=[];e:{var re=RE.get(a);if(re!==void 0){var ae=Uf,we=a;switch(a){case"keypress":if($f(c)===0)break e;case"keydown":case"keyup":ae=O$;break;case"focusin":we="focus",ae=Nv;break;case"focusout":we="blur",ae=Nv;break;case"beforeblur":case"afterblur":ae=Nv;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ae=lE;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=p$;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=j$;break;case _E:case jE:case TE:ae=g$;break;case ME:ae=M$;break;case"scroll":case"scrollend":ae=d$;break;case"wheel":ae=D$;break;case"copy":case"cut":case"paste":ae=b$;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=cE;break;case"toggle":case"beforetoggle":ae=k$}var Me=(o&4)!==0,st=!Me&&(a==="scroll"||a==="scrollend"),K=Me?re!==null?re+"Capture":null:re;Me=[];for(var U=J,Z;U!==null;){var ue=U;if(Z=ue.stateNode,ue=ue.tag,ue!==5&&ue!==26&&ue!==27||Z===null||K===null||(ue=vc(U,K),ue!=null&&Me.push(Wc(U,ue,Z))),st)break;U=U.return}0<Me.length&&(re=new ae(re,we,null,c,le),de.push({event:re,listeners:Me}))}}if((o&7)===0){e:{if(re=a==="mouseover"||a==="pointerover",ae=a==="mouseout"||a==="pointerout",re&&c!==xv&&(we=c.relatedTarget||c.fromElement)&&(Nl(we)||we[Ol]))break e;if((ae||re)&&(re=le.window===le?le:(re=le.ownerDocument)?re.defaultView||re.parentWindow:window,ae?(we=c.relatedTarget||c.toElement,ae=J,we=we?Nl(we):null,we!==null&&(st=l(we),Me=we.tag,we!==st||Me!==5&&Me!==27&&Me!==6)&&(we=null)):(ae=null,we=J),ae!==we)){if(Me=lE,ue="onMouseLeave",K="onMouseEnter",U="mouse",(a==="pointerout"||a==="pointerover")&&(Me=cE,ue="onPointerLeave",K="onPointerEnter",U="pointer"),st=ae==null?re:mc(ae),Z=we==null?re:mc(we),re=new Me(ue,U+"leave",ae,c,le),re.target=st,re.relatedTarget=Z,ue=null,Nl(le)===J&&(Me=new Me(K,U+"enter",we,c,le),Me.target=Z,Me.relatedTarget=st,ue=Me),st=ue,ae&&we)t:{for(Me=PB,K=ae,U=we,Z=0,ue=K;ue;ue=Me(ue))Z++;ue=0;for(var _e=U;_e;_e=Me(_e))ue++;for(;0<Z-ue;)K=Me(K),Z--;for(;0<ue-Z;)U=Me(U),ue--;for(;Z--;){if(K===U||U!==null&&K===U.alternate){Me=K;break t}K=Me(K),U=Me(U)}Me=null}else Me=null;ae!==null&&eO(de,re,ae,Me,!1),we!==null&&st!==null&&eO(de,st,we,Me,!0)}}e:{if(re=J?mc(J):window,ae=re.nodeName&&re.nodeName.toLowerCase(),ae==="select"||ae==="input"&&re.type==="file")var We=gE;else if(mE(re))if(yE)We=K$;else{We=q$;var Ae=H$}else ae=re.nodeName,!ae||ae.toLowerCase()!=="input"||re.type!=="checkbox"&&re.type!=="radio"?J&&bv(J.elementType)&&(We=gE):We=F$;if(We&&(We=We(a,J))){vE(de,We,c,le);break e}Ae&&Ae(a,re,J),a==="focusout"&&J&&re.type==="number"&&J.memoizedProps.value!=null&&yv(re,"number",re.value)}switch(Ae=J?mc(J):window,a){case"focusin":(mE(Ae)||Ae.contentEditable==="true")&&(Il=Ae,Dv=J,Cc=null);break;case"focusout":Cc=Dv=Il=null;break;case"mousedown":Pv=!0;break;case"contextmenu":case"mouseup":case"dragend":Pv=!1,OE(de,c,le);break;case"selectionchange":if(G$)break;case"keydown":case"keyup":OE(de,c,le)}var Pe;if(jv)e:{switch(a){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else kl?hE(a,c)&&(qe="onCompositionEnd"):a==="keydown"&&c.keyCode===229&&(qe="onCompositionStart");qe&&(uE&&c.locale!=="ko"&&(kl||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&kl&&(Pe=iE()):(ki=le,Cv="value"in ki?ki.value:ki.textContent,kl=!0)),Ae=Md(J,qe),0<Ae.length&&(qe=new sE(qe,a,null,c,le),de.push({event:qe,listeners:Ae}),Pe?qe.data=Pe:(Pe=pE(c),Pe!==null&&(qe.data=Pe)))),(Pe=L$?z$(a,c):$$(a,c))&&(qe=Md(J,"onBeforeInput"),0<qe.length&&(Ae=new sE("onBeforeInput","beforeinput",null,c,le),de.push({event:Ae,listeners:qe}),Ae.data=Pe)),TB(de,a,J,c,le)}ZA(de,o)})}function Wc(a,o,c){return{instance:a,listener:o,currentTarget:c}}function Md(a,o){for(var c=o+"Capture",d=[];a!==null;){var y=a,w=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||w===null||(y=vc(a,c),y!=null&&d.unshift(Wc(a,y,w)),y=vc(a,o),y!=null&&d.push(Wc(a,y,w))),a.tag===3)return d;a=a.return}return[]}function PB(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function eO(a,o,c,d,y){for(var w=o._reactName,O=[];c!==null&&c!==d;){var M=c,$=M.alternate,J=M.stateNode;if(M=M.tag,$!==null&&$===d)break;M!==5&&M!==26&&M!==27||J===null||($=J,y?(J=vc(c,w),J!=null&&O.unshift(Wc(c,J,$))):y||(J=vc(c,w),J!=null&&O.push(Wc(c,J,$)))),c=c.return}O.length!==0&&a.push({event:o,listeners:O})}var kB=/\r\n?/g,IB=/\u0000|\uFFFD/g;function tO(a){return(typeof a=="string"?a:""+a).replace(kB,`
9
- `).replace(IB,"")}function nO(a,o){return o=tO(o),tO(a)===o}function lt(a,o,c,d,y,w){switch(c){case"children":typeof d=="string"?o==="body"||o==="textarea"&&d===""||Rl(a,d):(typeof d=="number"||typeof d=="bigint")&&o!=="body"&&Rl(a,""+d);break;case"className":kf(a,"class",d);break;case"tabIndex":kf(a,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":kf(a,c,d);break;case"style":nE(a,d,w);break;case"data":if(o!=="object"){kf(a,"data",d);break}case"src":case"href":if(d===""&&(o!=="a"||c!=="href")){a.removeAttribute(c);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){a.removeAttribute(c);break}d=Lf(""+d),a.setAttribute(c,d);break;case"action":case"formAction":if(typeof d=="function"){a.setAttribute(c,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof w=="function"&&(c==="formAction"?(o!=="input"&&lt(a,o,"name",y.name,y,null),lt(a,o,"formEncType",y.formEncType,y,null),lt(a,o,"formMethod",y.formMethod,y,null),lt(a,o,"formTarget",y.formTarget,y,null)):(lt(a,o,"encType",y.encType,y,null),lt(a,o,"method",y.method,y,null),lt(a,o,"target",y.target,y,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){a.removeAttribute(c);break}d=Lf(""+d),a.setAttribute(c,d);break;case"onClick":d!=null&&(a.onclick=Ia);break;case"onScroll":d!=null&&Be("scroll",a);break;case"onScrollEnd":d!=null&&Be("scrollend",a);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(r(61));if(c=d.__html,c!=null){if(y.children!=null)throw Error(r(60));a.innerHTML=c}}break;case"multiple":a.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":a.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){a.removeAttribute("xlink:href");break}c=Lf(""+d),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?a.setAttribute(c,""+d):a.removeAttribute(c);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":d&&typeof d!="function"&&typeof d!="symbol"?a.setAttribute(c,""):a.removeAttribute(c);break;case"capture":case"download":d===!0?a.setAttribute(c,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?a.setAttribute(c,d):a.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?a.setAttribute(c,d):a.removeAttribute(c);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?a.removeAttribute(c):a.setAttribute(c,d);break;case"popover":Be("beforetoggle",a),Be("toggle",a),Pf(a,"popover",d);break;case"xlinkActuate":ka(a,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":ka(a,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":ka(a,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":ka(a,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":ka(a,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":ka(a,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":ka(a,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":ka(a,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":ka(a,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":Pf(a,"is",d);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=u$.get(c)||c,Pf(a,c,d))}}function iy(a,o,c,d,y,w){switch(c){case"style":nE(a,d,w);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(r(61));if(c=d.__html,c!=null){if(y.children!=null)throw Error(r(60));a.innerHTML=c}}break;case"children":typeof d=="string"?Rl(a,d):(typeof d=="number"||typeof d=="bigint")&&Rl(a,""+d);break;case"onScroll":d!=null&&Be("scroll",a);break;case"onScrollEnd":d!=null&&Be("scrollend",a);break;case"onClick":d!=null&&(a.onclick=Ia);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!GS.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(y=c.endsWith("Capture"),o=c.slice(2,y?c.length-7:void 0),w=a[Hn]||null,w=w!=null?w[c]:null,typeof w=="function"&&a.removeEventListener(o,w,y),typeof d=="function")){typeof w!="function"&&w!==null&&(c in a?a[c]=null:a.hasAttribute(c)&&a.removeAttribute(c)),a.addEventListener(o,d,y);break e}c in a?a[c]=d:d===!0?a.setAttribute(c,""):Pf(a,c,d)}}}function bn(a,o,c){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Be("error",a),Be("load",a);var d=!1,y=!1,w;for(w in c)if(c.hasOwnProperty(w)){var O=c[w];if(O!=null)switch(w){case"src":d=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:lt(a,o,w,O,c,null)}}y&&lt(a,o,"srcSet",c.srcSet,c,null),d&&lt(a,o,"src",c.src,c,null);return;case"input":Be("invalid",a);var M=w=O=y=null,$=null,J=null;for(d in c)if(c.hasOwnProperty(d)){var le=c[d];if(le!=null)switch(d){case"name":y=le;break;case"type":O=le;break;case"checked":$=le;break;case"defaultChecked":J=le;break;case"value":w=le;break;case"defaultValue":M=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(r(137,o));break;default:lt(a,o,d,le,c,null)}}ZS(a,w,M,$,J,O,y,!1);return;case"select":Be("invalid",a),d=O=w=null;for(y in c)if(c.hasOwnProperty(y)&&(M=c[y],M!=null))switch(y){case"value":w=M;break;case"defaultValue":O=M;break;case"multiple":d=M;default:lt(a,o,y,M,c,null)}o=w,c=O,a.multiple=!!d,o!=null?Ml(a,!!d,o,!1):c!=null&&Ml(a,!!d,c,!0);return;case"textarea":Be("invalid",a),w=y=d=null;for(O in c)if(c.hasOwnProperty(O)&&(M=c[O],M!=null))switch(O){case"value":d=M;break;case"defaultValue":y=M;break;case"children":w=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(r(91));break;default:lt(a,o,O,M,c,null)}eE(a,d,y,w);return;case"option":for($ in c)if(c.hasOwnProperty($)&&(d=c[$],d!=null))switch($){case"selected":a.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:lt(a,o,$,d,c,null)}return;case"dialog":Be("beforetoggle",a),Be("toggle",a),Be("cancel",a),Be("close",a);break;case"iframe":case"object":Be("load",a);break;case"video":case"audio":for(d=0;d<Yc.length;d++)Be(Yc[d],a);break;case"image":Be("error",a),Be("load",a);break;case"details":Be("toggle",a);break;case"embed":case"source":case"link":Be("error",a),Be("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(J in c)if(c.hasOwnProperty(J)&&(d=c[J],d!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:lt(a,o,J,d,c,null)}return;default:if(bv(o)){for(le in c)c.hasOwnProperty(le)&&(d=c[le],d!==void 0&&iy(a,o,le,d,c,void 0));return}}for(M in c)c.hasOwnProperty(M)&&(d=c[M],d!=null&&lt(a,o,M,d,c,null))}function LB(a,o,c,d){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,w=null,O=null,M=null,$=null,J=null,le=null;for(ae in c){var de=c[ae];if(c.hasOwnProperty(ae)&&de!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":$=de;default:d.hasOwnProperty(ae)||lt(a,o,ae,null,d,de)}}for(var re in d){var ae=d[re];if(de=c[re],d.hasOwnProperty(re)&&(ae!=null||de!=null))switch(re){case"type":w=ae;break;case"name":y=ae;break;case"checked":J=ae;break;case"defaultChecked":le=ae;break;case"value":O=ae;break;case"defaultValue":M=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(r(137,o));break;default:ae!==de&&lt(a,o,re,ae,d,de)}}gv(a,O,M,$,J,le,w,y);return;case"select":ae=O=M=re=null;for(w in c)if($=c[w],c.hasOwnProperty(w)&&$!=null)switch(w){case"value":break;case"multiple":ae=$;default:d.hasOwnProperty(w)||lt(a,o,w,null,d,$)}for(y in d)if(w=d[y],$=c[y],d.hasOwnProperty(y)&&(w!=null||$!=null))switch(y){case"value":re=w;break;case"defaultValue":M=w;break;case"multiple":O=w;default:w!==$&&lt(a,o,y,w,d,$)}o=M,c=O,d=ae,re!=null?Ml(a,!!c,re,!1):!!d!=!!c&&(o!=null?Ml(a,!!c,o,!0):Ml(a,!!c,c?[]:"",!1));return;case"textarea":ae=re=null;for(M in c)if(y=c[M],c.hasOwnProperty(M)&&y!=null&&!d.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:lt(a,o,M,null,d,y)}for(O in d)if(y=d[O],w=c[O],d.hasOwnProperty(O)&&(y!=null||w!=null))switch(O){case"value":re=y;break;case"defaultValue":ae=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(91));break;default:y!==w&&lt(a,o,O,y,d,w)}JS(a,re,ae);return;case"option":for(var we in c)if(re=c[we],c.hasOwnProperty(we)&&re!=null&&!d.hasOwnProperty(we))switch(we){case"selected":a.selected=!1;break;default:lt(a,o,we,null,d,re)}for($ in d)if(re=d[$],ae=c[$],d.hasOwnProperty($)&&re!==ae&&(re!=null||ae!=null))switch($){case"selected":a.selected=re&&typeof re!="function"&&typeof re!="symbol";break;default:lt(a,o,$,re,d,ae)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Me in c)re=c[Me],c.hasOwnProperty(Me)&&re!=null&&!d.hasOwnProperty(Me)&&lt(a,o,Me,null,d,re);for(J in d)if(re=d[J],ae=c[J],d.hasOwnProperty(J)&&re!==ae&&(re!=null||ae!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(r(137,o));break;default:lt(a,o,J,re,d,ae)}return;default:if(bv(o)){for(var st in c)re=c[st],c.hasOwnProperty(st)&&re!==void 0&&!d.hasOwnProperty(st)&&iy(a,o,st,void 0,d,re);for(le in d)re=d[le],ae=c[le],!d.hasOwnProperty(le)||re===ae||re===void 0&&ae===void 0||iy(a,o,le,re,d,ae);return}}for(var K in c)re=c[K],c.hasOwnProperty(K)&&re!=null&&!d.hasOwnProperty(K)&&lt(a,o,K,null,d,re);for(de in d)re=d[de],ae=c[de],!d.hasOwnProperty(de)||re===ae||re==null&&ae==null||lt(a,o,de,re,d,ae)}function rO(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function zB(){if(typeof performance.getEntriesByType=="function"){for(var a=0,o=0,c=performance.getEntriesByType("resource"),d=0;d<c.length;d++){var y=c[d],w=y.transferSize,O=y.initiatorType,M=y.duration;if(w&&M&&rO(O)){for(O=0,M=y.responseEnd,d+=1;d<c.length;d++){var $=c[d],J=$.startTime;if(J>M)break;var le=$.transferSize,de=$.initiatorType;le&&rO(de)&&($=$.responseEnd,O+=le*($<M?1:(M-J)/($-J)))}if(--d,o+=8*(w+O)/(y.duration/1e3),a++,10<a)break}}if(0<a)return o/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var oy=null,ly=null;function Rd(a){return a.nodeType===9?a:a.ownerDocument}function aO(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function iO(a,o){if(a===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&o==="foreignObject"?0:a}function sy(a,o){return a==="textarea"||a==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var cy=null;function $B(){var a=window.event;return a&&a.type==="popstate"?a===cy?!1:(cy=a,!0):(cy=null,!1)}var oO=typeof setTimeout=="function"?setTimeout:void 0,BB=typeof clearTimeout=="function"?clearTimeout:void 0,lO=typeof Promise=="function"?Promise:void 0,UB=typeof queueMicrotask=="function"?queueMicrotask:typeof lO<"u"?function(a){return lO.resolve(null).then(a).catch(HB)}:oO;function HB(a){setTimeout(function(){throw a})}function Zi(a){return a==="head"}function sO(a,o){var c=o,d=0;do{var y=c.nextSibling;if(a.removeChild(c),y&&y.nodeType===8)if(c=y.data,c==="/$"||c==="/&"){if(d===0){a.removeChild(y),cs(o);return}d--}else if(c==="$"||c==="$?"||c==="$~"||c==="$!"||c==="&")d++;else if(c==="html")Xc(a.ownerDocument.documentElement);else if(c==="head"){c=a.ownerDocument.head,Xc(c);for(var w=c.firstChild;w;){var O=w.nextSibling,M=w.nodeName;w[pc]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&w.rel.toLowerCase()==="stylesheet"||c.removeChild(w),w=O}}else c==="body"&&Xc(a.ownerDocument.body);c=y}while(c);cs(o)}function cO(a,o){var c=a;a=0;do{var d=c.nextSibling;if(c.nodeType===1?o?(c._stashedDisplay=c.style.display,c.style.display="none"):(c.style.display=c._stashedDisplay||"",c.getAttribute("style")===""&&c.removeAttribute("style")):c.nodeType===3&&(o?(c._stashedText=c.nodeValue,c.nodeValue=""):c.nodeValue=c._stashedText||""),d&&d.nodeType===8)if(c=d.data,c==="/$"){if(a===0)break;a--}else c!=="$"&&c!=="$?"&&c!=="$~"&&c!=="$!"||a++;c=d}while(c)}function uy(a){var o=a.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var c=o;switch(o=o.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":uy(c),mv(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}a.removeChild(c)}}function qB(a,o,c,d){for(;a.nodeType===1;){var y=c;if(a.nodeName.toLowerCase()!==o.toLowerCase()){if(!d&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(d){if(!a[pc])switch(o){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(w=a.getAttribute("rel"),w==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(w!==y.rel||a.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||a.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||a.getAttribute("title")!==(y.title==null?null:y.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(w=a.getAttribute("src"),(w!==(y.src==null?null:y.src)||a.getAttribute("type")!==(y.type==null?null:y.type)||a.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&w&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(o==="input"&&a.type==="hidden"){var w=y.name==null?null:""+y.name;if(y.type==="hidden"&&a.getAttribute("name")===w)return a}else return a;if(a=Dr(a.nextSibling),a===null)break}return null}function FB(a,o,c){if(o==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!c||(a=Dr(a.nextSibling),a===null))return null;return a}function uO(a,o){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!o||(a=Dr(a.nextSibling),a===null))return null;return a}function fy(a){return a.data==="$?"||a.data==="$~"}function dy(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function KB(a,o){var c=a.ownerDocument;if(a.data==="$~")a._reactRetry=o;else if(a.data!=="$?"||c.readyState!=="loading")o();else{var d=function(){o(),c.removeEventListener("DOMContentLoaded",d)};c.addEventListener("DOMContentLoaded",d),a._reactRetry=d}}function Dr(a){for(;a!=null;a=a.nextSibling){var o=a.nodeType;if(o===1||o===3)break;if(o===8){if(o=a.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return a}var hy=null;function fO(a){a=a.nextSibling;for(var o=0;a;){if(a.nodeType===8){var c=a.data;if(c==="/$"||c==="/&"){if(o===0)return Dr(a.nextSibling);o--}else c!=="$"&&c!=="$!"&&c!=="$?"&&c!=="$~"&&c!=="&"||o++}a=a.nextSibling}return null}function dO(a){a=a.previousSibling;for(var o=0;a;){if(a.nodeType===8){var c=a.data;if(c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"){if(o===0)return a;o--}else c!=="/$"&&c!=="/&"||o++}a=a.previousSibling}return null}function hO(a,o,c){switch(o=Rd(c),a){case"html":if(a=o.documentElement,!a)throw Error(r(452));return a;case"head":if(a=o.head,!a)throw Error(r(453));return a;case"body":if(a=o.body,!a)throw Error(r(454));return a;default:throw Error(r(451))}}function Xc(a){for(var o=a.attributes;o.length;)a.removeAttributeNode(o[0]);mv(a)}var Pr=new Map,pO=new Set;function Dd(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Za=q.d;q.d={f:VB,r:GB,D:YB,C:WB,L:XB,m:QB,X:JB,S:ZB,M:e6};function VB(){var a=Za.f(),o=Cd();return a||o}function GB(a){var o=_l(a);o!==null&&o.tag===5&&o.type==="form"?MC(o):Za.r(a)}var os=typeof document>"u"?null:document;function mO(a,o,c){var d=os;if(d&&typeof o=="string"&&o){var y=Or(o);y='link[rel="'+a+'"][href="'+y+'"]',typeof c=="string"&&(y+='[crossorigin="'+c+'"]'),pO.has(y)||(pO.add(y),a={rel:a,crossOrigin:c,href:o},d.querySelector(y)===null&&(o=d.createElement("link"),bn(o,"link",a),an(o),d.head.appendChild(o)))}}function YB(a){Za.D(a),mO("dns-prefetch",a,null)}function WB(a,o){Za.C(a,o),mO("preconnect",a,o)}function XB(a,o,c){Za.L(a,o,c);var d=os;if(d&&a&&o){var y='link[rel="preload"][as="'+Or(o)+'"]';o==="image"&&c&&c.imageSrcSet?(y+='[imagesrcset="'+Or(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(y+='[imagesizes="'+Or(c.imageSizes)+'"]')):y+='[href="'+Or(a)+'"]';var w=y;switch(o){case"style":w=ls(a);break;case"script":w=ss(a)}Pr.has(w)||(a=m({rel:"preload",href:o==="image"&&c&&c.imageSrcSet?void 0:a,as:o},c),Pr.set(w,a),d.querySelector(y)!==null||o==="style"&&d.querySelector(Qc(w))||o==="script"&&d.querySelector(Zc(w))||(o=d.createElement("link"),bn(o,"link",a),an(o),d.head.appendChild(o)))}}function QB(a,o){Za.m(a,o);var c=os;if(c&&a){var d=o&&typeof o.as=="string"?o.as:"script",y='link[rel="modulepreload"][as="'+Or(d)+'"][href="'+Or(a)+'"]',w=y;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":w=ss(a)}if(!Pr.has(w)&&(a=m({rel:"modulepreload",href:a},o),Pr.set(w,a),c.querySelector(y)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(Zc(w)))return}d=c.createElement("link"),bn(d,"link",a),an(d),c.head.appendChild(d)}}}function ZB(a,o,c){Za.S(a,o,c);var d=os;if(d&&a){var y=jl(d).hoistableStyles,w=ls(a);o=o||"default";var O=y.get(w);if(!O){var M={loading:0,preload:null};if(O=d.querySelector(Qc(w)))M.loading=5;else{a=m({rel:"stylesheet",href:a,"data-precedence":o},c),(c=Pr.get(w))&&py(a,c);var $=O=d.createElement("link");an($),bn($,"link",a),$._p=new Promise(function(J,le){$.onload=J,$.onerror=le}),$.addEventListener("load",function(){M.loading|=1}),$.addEventListener("error",function(){M.loading|=2}),M.loading|=4,Pd(O,o,d)}O={type:"stylesheet",instance:O,count:1,state:M},y.set(w,O)}}}function JB(a,o){Za.X(a,o);var c=os;if(c&&a){var d=jl(c).hoistableScripts,y=ss(a),w=d.get(y);w||(w=c.querySelector(Zc(y)),w||(a=m({src:a,async:!0},o),(o=Pr.get(y))&&my(a,o),w=c.createElement("script"),an(w),bn(w,"link",a),c.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},d.set(y,w))}}function e6(a,o){Za.M(a,o);var c=os;if(c&&a){var d=jl(c).hoistableScripts,y=ss(a),w=d.get(y);w||(w=c.querySelector(Zc(y)),w||(a=m({src:a,async:!0,type:"module"},o),(o=Pr.get(y))&&my(a,o),w=c.createElement("script"),an(w),bn(w,"link",a),c.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},d.set(y,w))}}function vO(a,o,c,d){var y=(y=se.current)?Dd(y):null;if(!y)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(o=ls(c.href),c=jl(y).hoistableStyles,d=c.get(o),d||(d={type:"style",instance:null,count:0,state:null},c.set(o,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){a=ls(c.href);var w=jl(y).hoistableStyles,O=w.get(a);if(O||(y=y.ownerDocument||y,O={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},w.set(a,O),(w=y.querySelector(Qc(a)))&&!w._p&&(O.instance=w,O.state.loading=5),Pr.has(a)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},Pr.set(a,c),w||t6(y,a,c,O.state))),o&&d===null)throw Error(r(528,""));return O}if(o&&d!==null)throw Error(r(529,""));return null;case"script":return o=c.async,c=c.src,typeof c=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=ss(c),c=jl(y).hoistableScripts,d=c.get(o),d||(d={type:"script",instance:null,count:0,state:null},c.set(o,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function ls(a){return'href="'+Or(a)+'"'}function Qc(a){return'link[rel="stylesheet"]['+a+"]"}function gO(a){return m({},a,{"data-precedence":a.precedence,precedence:null})}function t6(a,o,c,d){a.querySelector('link[rel="preload"][as="style"]['+o+"]")?d.loading=1:(o=a.createElement("link"),d.preload=o,o.addEventListener("load",function(){return d.loading|=1}),o.addEventListener("error",function(){return d.loading|=2}),bn(o,"link",c),an(o),a.head.appendChild(o))}function ss(a){return'[src="'+Or(a)+'"]'}function Zc(a){return"script[async]"+a}function yO(a,o,c){if(o.count++,o.instance===null)switch(o.type){case"style":var d=a.querySelector('style[data-href~="'+Or(c.href)+'"]');if(d)return o.instance=d,an(d),d;var y=m({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return d=(a.ownerDocument||a).createElement("style"),an(d),bn(d,"style",y),Pd(d,c.precedence,a),o.instance=d;case"stylesheet":y=ls(c.href);var w=a.querySelector(Qc(y));if(w)return o.state.loading|=4,o.instance=w,an(w),w;d=gO(c),(y=Pr.get(y))&&py(d,y),w=(a.ownerDocument||a).createElement("link"),an(w);var O=w;return O._p=new Promise(function(M,$){O.onload=M,O.onerror=$}),bn(w,"link",d),o.state.loading|=4,Pd(w,c.precedence,a),o.instance=w;case"script":return w=ss(c.src),(y=a.querySelector(Zc(w)))?(o.instance=y,an(y),y):(d=c,(y=Pr.get(w))&&(d=m({},c),my(d,y)),a=a.ownerDocument||a,y=a.createElement("script"),an(y),bn(y,"link",d),a.head.appendChild(y),o.instance=y);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(d=o.instance,o.state.loading|=4,Pd(d,c.precedence,a));return o.instance}function Pd(a,o,c){for(var d=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=d.length?d[d.length-1]:null,w=y,O=0;O<d.length;O++){var M=d[O];if(M.dataset.precedence===o)w=M;else if(w!==y)break}w?w.parentNode.insertBefore(a,w.nextSibling):(o=c.nodeType===9?c.head:c,o.insertBefore(a,o.firstChild))}function py(a,o){a.crossOrigin==null&&(a.crossOrigin=o.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=o.referrerPolicy),a.title==null&&(a.title=o.title)}function my(a,o){a.crossOrigin==null&&(a.crossOrigin=o.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=o.referrerPolicy),a.integrity==null&&(a.integrity=o.integrity)}var kd=null;function bO(a,o,c){if(kd===null){var d=new Map,y=kd=new Map;y.set(c,d)}else y=kd,d=y.get(c),d||(d=new Map,y.set(c,d));if(d.has(a))return d;for(d.set(a,null),c=c.getElementsByTagName(a),y=0;y<c.length;y++){var w=c[y];if(!(w[pc]||w[mn]||a==="link"&&w.getAttribute("rel")==="stylesheet")&&w.namespaceURI!=="http://www.w3.org/2000/svg"){var O=w.getAttribute(o)||"";O=a+O;var M=d.get(O);M?M.push(w):d.set(O,[w])}}return d}function xO(a,o,c){a=a.ownerDocument||a,a.head.insertBefore(c,o==="title"?a.querySelector("head > title"):null)}function n6(a,o,c){if(c===1||o.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;switch(o.rel){case"stylesheet":return a=o.disabled,typeof o.precedence=="string"&&a==null;default:return!0}case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function wO(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function r6(a,o,c,d){if(c.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(c.state.loading&4)===0){if(c.instance===null){var y=ls(d.href),w=o.querySelector(Qc(y));if(w){o=w._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(a.count++,a=Id.bind(a),o.then(a,a)),c.state.loading|=4,c.instance=w,an(w);return}w=o.ownerDocument||o,d=gO(d),(y=Pr.get(y))&&py(d,y),w=w.createElement("link"),an(w);var O=w;O._p=new Promise(function(M,$){O.onload=M,O.onerror=$}),bn(w,"link",d),c.instance=w}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(c,o),(o=c.state.preload)&&(c.state.loading&3)===0&&(a.count++,c=Id.bind(a),o.addEventListener("load",c),o.addEventListener("error",c))}}var vy=0;function a6(a,o){return a.stylesheets&&a.count===0&&zd(a,a.stylesheets),0<a.count||0<a.imgCount?function(c){var d=setTimeout(function(){if(a.stylesheets&&zd(a,a.stylesheets),a.unsuspend){var w=a.unsuspend;a.unsuspend=null,w()}},6e4+o);0<a.imgBytes&&vy===0&&(vy=62500*zB());var y=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&zd(a,a.stylesheets),a.unsuspend)){var w=a.unsuspend;a.unsuspend=null,w()}},(a.imgBytes>vy?50:800)+o);return a.unsuspend=c,function(){a.unsuspend=null,clearTimeout(d),clearTimeout(y)}}:null}function Id(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)zd(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var Ld=null;function zd(a,o){a.stylesheets=null,a.unsuspend!==null&&(a.count++,Ld=new Map,o.forEach(i6,a),Ld=null,Id.call(a))}function i6(a,o){if(!(o.state.loading&4)){var c=Ld.get(a);if(c)var d=c.get(null);else{c=new Map,Ld.set(a,c);for(var y=a.querySelectorAll("link[data-precedence],style[data-precedence]"),w=0;w<y.length;w++){var O=y[w];(O.nodeName==="LINK"||O.getAttribute("media")!=="not all")&&(c.set(O.dataset.precedence,O),d=O)}d&&c.set(null,d)}y=o.instance,O=y.getAttribute("data-precedence"),w=c.get(O)||d,w===d&&c.set(null,y),c.set(O,y),this.count++,d=Id.bind(this),y.addEventListener("load",d),y.addEventListener("error",d),w?w.parentNode.insertBefore(y,w.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(y,a.firstChild)),o.state.loading|=4}}var Jc={$$typeof:N,Provider:null,Consumer:null,_currentValue:H,_currentValue2:H,_threadCount:0};function o6(a,o,c,d,y,w,O,M,$){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Nn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Nn(0),this.hiddenUpdates=Nn(null),this.identifierPrefix=d,this.onUncaughtError=y,this.onCaughtError=w,this.onRecoverableError=O,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=$,this.incompleteTransitions=new Map}function SO(a,o,c,d,y,w,O,M,$,J,le,de){return a=new o6(a,o,c,O,$,J,le,de,M),o=1,w===!0&&(o|=24),w=or(3,null,null,o),a.current=w,w.stateNode=a,o=Wv(),o.refCount++,a.pooledCache=o,o.refCount++,w.memoizedState={element:d,isDehydrated:c,cache:o},Jv(w),a}function EO(a){return a?(a=$l,a):$l}function CO(a,o,c,d,y,w){y=EO(y),d.context===null?d.context=y:d.pendingContext=y,d=Ui(o),d.payload={element:c},w=w===void 0?null:w,w!==null&&(d.callback=w),c=Hi(a,d,o),c!==null&&(Yn(c,a,o),Mc(c,a,o))}function AO(a,o){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var c=a.retryLane;a.retryLane=c!==0&&c<o?c:o}}function gy(a,o){AO(a,o),(a=a.alternate)&&AO(a,o)}function OO(a){if(a.tag===13||a.tag===31){var o=Mo(a,67108864);o!==null&&Yn(o,a,67108864),gy(a,67108864)}}function NO(a){if(a.tag===13||a.tag===31){var o=fr();o=Al(o);var c=Mo(a,o);c!==null&&Yn(c,a,o),gy(a,o)}}var $d=!0;function l6(a,o,c,d){var y=I.T;I.T=null;var w=q.p;try{q.p=2,yy(a,o,c,d)}finally{q.p=w,I.T=y}}function s6(a,o,c,d){var y=I.T;I.T=null;var w=q.p;try{q.p=8,yy(a,o,c,d)}finally{q.p=w,I.T=y}}function yy(a,o,c,d){if($d){var y=by(d);if(y===null)ay(a,o,d,Bd,c),jO(a,d);else if(u6(y,a,o,c,d))d.stopPropagation();else if(jO(a,d),o&4&&-1<c6.indexOf(a)){for(;y!==null;){var w=_l(y);if(w!==null)switch(w.tag){case 3:if(w=w.stateNode,w.current.memoizedState.isDehydrated){var O=Ge(w.pendingLanes);if(O!==0){var M=w;for(M.pendingLanes|=2,M.entangledLanes|=2;O;){var $=1<<31-rn(O);M.entanglements[1]|=$,O&=~$}ma(w),(Ze&6)===0&&(Sd=qt()+500,Gc(0))}}break;case 31:case 13:M=Mo(w,2),M!==null&&Yn(M,w,2),Cd(),gy(w,2)}if(w=by(d),w===null&&ay(a,o,d,Bd,c),w===y)break;y=w}y!==null&&d.stopPropagation()}else ay(a,o,d,null,c)}}function by(a){return a=wv(a),xy(a)}var Bd=null;function xy(a){if(Bd=null,a=Nl(a),a!==null){var o=l(a);if(o===null)a=null;else{var c=o.tag;if(c===13){if(a=s(o),a!==null)return a;a=null}else if(c===31){if(a=u(o),a!==null)return a;a=null}else if(c===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;a=null}else o!==a&&(a=null)}}return Bd=a,null}function _O(a){switch(a){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ot()){case tn:return 2;case Gr:return 8;case dn:case Yr:return 32;case On:return 268435456;default:return 32}default:return 32}}var wy=!1,Ji=null,eo=null,to=null,eu=new Map,tu=new Map,no=[],c6="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function jO(a,o){switch(a){case"focusin":case"focusout":Ji=null;break;case"dragenter":case"dragleave":eo=null;break;case"mouseover":case"mouseout":to=null;break;case"pointerover":case"pointerout":eu.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":tu.delete(o.pointerId)}}function nu(a,o,c,d,y,w){return a===null||a.nativeEvent!==w?(a={blockedOn:o,domEventName:c,eventSystemFlags:d,nativeEvent:w,targetContainers:[y]},o!==null&&(o=_l(o),o!==null&&OO(o)),a):(a.eventSystemFlags|=d,o=a.targetContainers,y!==null&&o.indexOf(y)===-1&&o.push(y),a)}function u6(a,o,c,d,y){switch(o){case"focusin":return Ji=nu(Ji,a,o,c,d,y),!0;case"dragenter":return eo=nu(eo,a,o,c,d,y),!0;case"mouseover":return to=nu(to,a,o,c,d,y),!0;case"pointerover":var w=y.pointerId;return eu.set(w,nu(eu.get(w)||null,a,o,c,d,y)),!0;case"gotpointercapture":return w=y.pointerId,tu.set(w,nu(tu.get(w)||null,a,o,c,d,y)),!0}return!1}function TO(a){var o=Nl(a.target);if(o!==null){var c=l(o);if(c!==null){if(o=c.tag,o===13){if(o=s(c),o!==null){a.blockedOn=o,FS(a.priority,function(){NO(c)});return}}else if(o===31){if(o=u(c),o!==null){a.blockedOn=o,FS(a.priority,function(){NO(c)});return}}else if(o===3&&c.stateNode.current.memoizedState.isDehydrated){a.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}a.blockedOn=null}function Ud(a){if(a.blockedOn!==null)return!1;for(var o=a.targetContainers;0<o.length;){var c=by(a.nativeEvent);if(c===null){c=a.nativeEvent;var d=new c.constructor(c.type,c);xv=d,c.target.dispatchEvent(d),xv=null}else return o=_l(c),o!==null&&OO(o),a.blockedOn=c,!1;o.shift()}return!0}function MO(a,o,c){Ud(a)&&c.delete(o)}function f6(){wy=!1,Ji!==null&&Ud(Ji)&&(Ji=null),eo!==null&&Ud(eo)&&(eo=null),to!==null&&Ud(to)&&(to=null),eu.forEach(MO),tu.forEach(MO)}function Hd(a,o){a.blockedOn===o&&(a.blockedOn=null,wy||(wy=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,f6)))}var qd=null;function RO(a){qd!==a&&(qd=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){qd===a&&(qd=null);for(var o=0;o<a.length;o+=3){var c=a[o],d=a[o+1],y=a[o+2];if(typeof d!="function"){if(xy(d||c)===null)continue;break}var w=_l(c);w!==null&&(a.splice(o,3),o-=3,bg(w,{pending:!0,data:y,method:c.method,action:d},d,y))}}))}function cs(a){function o($){return Hd($,a)}Ji!==null&&Hd(Ji,a),eo!==null&&Hd(eo,a),to!==null&&Hd(to,a),eu.forEach(o),tu.forEach(o);for(var c=0;c<no.length;c++){var d=no[c];d.blockedOn===a&&(d.blockedOn=null)}for(;0<no.length&&(c=no[0],c.blockedOn===null);)TO(c),c.blockedOn===null&&no.shift();if(c=(a.ownerDocument||a).$$reactFormReplay,c!=null)for(d=0;d<c.length;d+=3){var y=c[d],w=c[d+1],O=y[Hn]||null;if(typeof w=="function")O||RO(c);else if(O){var M=null;if(w&&w.hasAttribute("formAction")){if(y=w,O=w[Hn]||null)M=O.formAction;else if(xy(y)!==null)continue}else M=O.action;typeof M=="function"?c[d+1]=M:(c.splice(d,3),d-=3),RO(c)}}}function DO(){function a(w){w.canIntercept&&w.info==="react-transition"&&w.intercept({handler:function(){return new Promise(function(O){return y=O})},focusReset:"manual",scroll:"manual"})}function o(){y!==null&&(y(),y=null),d||setTimeout(c,20)}function c(){if(!d&&!navigation.transition){var w=navigation.currentEntry;w&&w.url!=null&&navigation.navigate(w.url,{state:w.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var d=!1,y=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(c,100),function(){d=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),y!==null&&(y(),y=null)}}}function Sy(a){this._internalRoot=a}Fd.prototype.render=Sy.prototype.render=function(a){var o=this._internalRoot;if(o===null)throw Error(r(409));var c=o.current,d=fr();CO(c,d,a,o,null,null)},Fd.prototype.unmount=Sy.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var o=a.containerInfo;CO(a.current,2,null,a,null,null),Cd(),o[Ol]=null}};function Fd(a){this._internalRoot=a}Fd.prototype.unstable_scheduleHydration=function(a){if(a){var o=hv();a={blockedOn:null,target:a,priority:o};for(var c=0;c<no.length&&o!==0&&o<no[c].priority;c++);no.splice(c,0,a),c===0&&TO(a)}};var PO=t.version;if(PO!=="19.2.1")throw Error(r(527,PO,"19.2.1"));q.findDOMNode=function(a){var o=a._reactInternals;if(o===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=h(o),a=a!==null?p(a):null,a=a===null?null:a.stateNode,a};var d6={bundleType:0,version:"19.2.1",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Kd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Kd.isDisabled&&Kd.supportsFiber)try{rr=Kd.inject(d6),hn=Kd}catch{}}return au.createRoot=function(a,o){if(!i(a))throw Error(r(299));var c=!1,d="",y=UC,w=HC,O=qC;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(d=o.identifierPrefix),o.onUncaughtError!==void 0&&(y=o.onUncaughtError),o.onCaughtError!==void 0&&(w=o.onCaughtError),o.onRecoverableError!==void 0&&(O=o.onRecoverableError)),o=SO(a,1,!1,null,null,c,d,null,y,w,O,DO),a[Ol]=o.current,ry(a),new Sy(o)},au.hydrateRoot=function(a,o,c){if(!i(a))throw Error(r(299));var d=!1,y="",w=UC,O=HC,M=qC,$=null;return c!=null&&(c.unstable_strictMode===!0&&(d=!0),c.identifierPrefix!==void 0&&(y=c.identifierPrefix),c.onUncaughtError!==void 0&&(w=c.onUncaughtError),c.onCaughtError!==void 0&&(O=c.onCaughtError),c.onRecoverableError!==void 0&&(M=c.onRecoverableError),c.formState!==void 0&&($=c.formState)),o=SO(a,1,!0,o,c??null,d,y,$,w,O,M,DO),o.context=EO(null),c=o.current,d=fr(),d=Al(d),y=Ui(d),y.callback=null,Hi(c,y,d),c=d,o.current.lanes=c,Ye(o,c),ma(o),a[Ol]=o.current,ry(a),new Fd(o)},au.version="19.2.1",au}var tN;function rU(){if(tN)return Ay.exports;tN=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Ay.exports=nU(),Ay.exports}var aU=rU();const iU=Ma(aU);var nN="popstate";function oU(e={}){function t(r,i){let{pathname:l,search:s,hash:u}=r.location;return Pb("",{pathname:l,search:s,hash:u},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Nu(i)}return sU(t,n,null,e)}function Ct(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Br(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function lU(){return Math.random().toString(36).substring(2,10)}function rN(e,t){return{usr:e.state,key:e.key,idx:t}}function Pb(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Hs(t):t,state:n,key:t&&t.key||r||lU()}}function Nu({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Hs(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function sU(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:l=!1}=r,s=i.history,u="POP",f=null,h=p();h==null&&(h=0,s.replaceState({...s.state,idx:h},""));function p(){return(s.state||{idx:null}).idx}function m(){u="POP";let C=p(),A=C==null?null:C-h;h=C,f&&f({action:u,location:E.location,delta:A})}function b(C,A){u="PUSH";let _=Pb(E.location,C,A);h=p()+1;let N=rN(_,h),j=E.createHref(_);try{s.pushState(N,"",j)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;i.location.assign(j)}l&&f&&f({action:u,location:E.location,delta:1})}function x(C,A){u="REPLACE";let _=Pb(E.location,C,A);h=p();let N=rN(_,h),j=E.createHref(_);s.replaceState(N,"",j),l&&f&&f({action:u,location:E.location,delta:0})}function S(C){return cU(C)}let E={get action(){return u},get location(){return e(i,s)},listen(C){if(f)throw new Error("A history only accepts one active listener");return i.addEventListener(nN,m),f=C,()=>{i.removeEventListener(nN,m),f=null}},createHref(C){return t(i,C)},createURL:S,encodeLocation(C){let A=S(C);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:b,replace:x,go(C){return s.go(C)}};return E}function cU(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Ct(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Nu(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function gM(e,t,n="/"){return uU(e,t,n,!1)}function uU(e,t,n,r){let i=typeof t=="string"?Hs(t):t,l=pi(i.pathname||"/",n);if(l==null)return null;let s=yM(e);fU(s);let u=null;for(let f=0;u==null&&f<s.length;++f){let h=SU(l);u=xU(s[f],h,r)}return u}function yM(e,t=[],n=[],r="",i=!1){let l=(s,u,f=i,h)=>{let p={relativePath:h===void 0?s.path||"":h,caseSensitive:s.caseSensitive===!0,childrenIndex:u,route:s};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(r)&&f)return;Ct(p.relativePath.startsWith(r),`Absolute route path "${p.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(r.length)}let m=ui([r,p.relativePath]),b=n.concat(p);s.children&&s.children.length>0&&(Ct(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),yM(s.children,t,b,m,f)),!(s.path==null&&!s.index)&&t.push({path:m,score:yU(m,s.index),routesMeta:b})};return e.forEach((s,u)=>{if(s.path===""||!s.path?.includes("?"))l(s,u);else for(let f of bM(s.path))l(s,u,!0,f)}),t}function bM(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),l=n.replace(/\?$/,"");if(r.length===0)return i?[l,""]:[l];let s=bM(r.join("/")),u=[];return u.push(...s.map(f=>f===""?l:[l,f].join("/"))),i&&u.push(...s),u.map(f=>e.startsWith("/")&&f===""?"/":f)}function fU(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:bU(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var dU=/^:[\w-]+$/,hU=3,pU=2,mU=1,vU=10,gU=-2,aN=e=>e==="*";function yU(e,t){let n=e.split("/"),r=n.length;return n.some(aN)&&(r+=gU),t&&(r+=pU),n.filter(i=>!aN(i)).reduce((i,l)=>i+(dU.test(l)?hU:l===""?mU:vU),r)}function bU(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function xU(e,t,n=!1){let{routesMeta:r}=e,i={},l="/",s=[];for(let u=0;u<r.length;++u){let f=r[u],h=u===r.length-1,p=l==="/"?t:t.slice(l.length)||"/",m=zh({path:f.relativePath,caseSensitive:f.caseSensitive,end:h},p),b=f.route;if(!m&&h&&n&&!r[r.length-1].route.index&&(m=zh({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},p)),!m)return null;Object.assign(i,m.params),s.push({params:i,pathname:ui([l,m.pathname]),pathnameBase:NU(ui([l,m.pathnameBase])),route:b}),m.pathnameBase!=="/"&&(l=ui([l,m.pathnameBase]))}return s}function zh(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=wU(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let l=i[0],s=l.replace(/(.)\/+$/,"$1"),u=i.slice(1);return{params:r.reduce((h,{paramName:p,isOptional:m},b)=>{if(p==="*"){let S=u[b]||"";s=l.slice(0,l.length-S.length).replace(/(.)\/+$/,"$1")}const x=u[b];return m&&!x?h[p]=void 0:h[p]=(x||"").replace(/%2F/g,"/"),h},{}),pathname:l,pathnameBase:s,pattern:e}}function wU(e,t=!1,n=!0){Br(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,u,f)=>(r.push({paramName:u,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function SU(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Br(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function pi(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var EU=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,CU=e=>EU.test(e);function AU(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Hs(e):e,l;if(n)if(CU(n))l=n;else{if(n.includes("//")){let s=n;n=n.replace(/\/\/+/g,"/"),Br(!1,`Pathnames cannot have embedded double slashes - normalizing ${s} -> ${n}`)}n.startsWith("/")?l=iN(n.substring(1),"/"):l=iN(n,t)}else l=t;return{pathname:l,search:_U(r),hash:jU(i)}}function iN(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function jy(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function OU(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function mw(e){let t=OU(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function vw(e,t,n,r=!1){let i;typeof e=="string"?i=Hs(e):(i={...e},Ct(!i.pathname||!i.pathname.includes("?"),jy("?","pathname","search",i)),Ct(!i.pathname||!i.pathname.includes("#"),jy("#","pathname","hash",i)),Ct(!i.search||!i.search.includes("#"),jy("#","search","hash",i)));let l=e===""||i.pathname==="",s=l?"/":i.pathname,u;if(s==null)u=n;else{let m=t.length-1;if(!r&&s.startsWith("..")){let b=s.split("/");for(;b[0]==="..";)b.shift(),m-=1;i.pathname=b.join("/")}u=m>=0?t[m]:"/"}let f=AU(i,u),h=s&&s!=="/"&&s.endsWith("/"),p=(l||s===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(h||p)&&(f.pathname+="/"),f}var ui=e=>e.join("/").replace(/\/\/+/g,"/"),NU=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),_U=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,jU=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function TU(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function MU(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var xM=["POST","PUT","PATCH","DELETE"];new Set(xM);var RU=["GET",...xM];new Set(RU);var qs=v.createContext(null);qs.displayName="DataRouter";var Xp=v.createContext(null);Xp.displayName="DataRouterState";v.createContext(!1);var wM=v.createContext({isTransitioning:!1});wM.displayName="ViewTransition";var DU=v.createContext(new Map);DU.displayName="Fetchers";var PU=v.createContext(null);PU.displayName="Await";var Fr=v.createContext(null);Fr.displayName="Navigation";var Ju=v.createContext(null);Ju.displayName="Location";var Ra=v.createContext({outlet:null,matches:[],isDataRoute:!1});Ra.displayName="Route";var gw=v.createContext(null);gw.displayName="RouteError";function kU(e,{relative:t}={}){Ct(Fs(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=v.useContext(Fr),{hash:i,pathname:l,search:s}=ef(e,{relative:t}),u=l;return n!=="/"&&(u=l==="/"?n:ui([n,l])),r.createHref({pathname:u,search:s,hash:i})}function Fs(){return v.useContext(Ju)!=null}function Da(){return Ct(Fs(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(Ju).location}var SM="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function EM(e){v.useContext(Fr).static||v.useLayoutEffect(e)}function Ks(){let{isDataRoute:e}=v.useContext(Ra);return e?YU():IU()}function IU(){Ct(Fs(),"useNavigate() may be used only in the context of a <Router> component.");let e=v.useContext(qs),{basename:t,navigator:n}=v.useContext(Fr),{matches:r}=v.useContext(Ra),{pathname:i}=Da(),l=JSON.stringify(mw(r)),s=v.useRef(!1);return EM(()=>{s.current=!0}),v.useCallback((f,h={})=>{if(Br(s.current,SM),!s.current)return;if(typeof f=="number"){n.go(f);return}let p=vw(f,JSON.parse(l),i,h.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:ui([t,p.pathname])),(h.replace?n.replace:n.push)(p,h.state,h)},[t,n,l,i,e])}v.createContext(null);function ef(e,{relative:t}={}){let{matches:n}=v.useContext(Ra),{pathname:r}=Da(),i=JSON.stringify(mw(n));return v.useMemo(()=>vw(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function LU(e,t){return CM(e,t)}function CM(e,t,n,r,i){Ct(Fs(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:l}=v.useContext(Fr),{matches:s}=v.useContext(Ra),u=s[s.length-1],f=u?u.params:{},h=u?u.pathname:"/",p=u?u.pathnameBase:"/",m=u&&u.route;{let _=m&&m.path||"";AM(h,!m||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${_}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
10
-
11
- Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let b=Da(),x;if(t){let _=typeof t=="string"?Hs(t):t;Ct(p==="/"||_.pathname?.startsWith(p),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${_.pathname}" was given in the \`location\` prop.`),x=_}else x=b;let S=x.pathname||"/",E=S;if(p!=="/"){let _=p.replace(/^\//,"").split("/");E="/"+S.replace(/^\//,"").split("/").slice(_.length).join("/")}let C=gM(e,{pathname:E});Br(m||C!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),Br(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let A=HU(C&&C.map(_=>Object.assign({},_,{params:Object.assign({},f,_.params),pathname:ui([p,l.encodeLocation?l.encodeLocation(_.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?p:ui([p,l.encodeLocation?l.encodeLocation(_.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),s,n,r,i);return t&&A?v.createElement(Ju.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...x},navigationType:"POP"}},A):A}function zU(){let e=GU(),t=TU(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},l={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=v.createElement(v.Fragment,null,v.createElement("p",null,"💿 Hey developer 👋"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:l},"ErrorBoundary")," or"," ",v.createElement("code",{style:l},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:i},n):null,s)}var $U=v.createElement(zU,null),BU=class extends v.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?v.createElement(Ra.Provider,{value:this.props.routeContext},v.createElement(gw.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function UU({routeContext:e,match:t,children:n}){let r=v.useContext(qs);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),v.createElement(Ra.Provider,{value:e},n)}function HU(e,t=[],n=null,r=null,i=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let l=e,s=n?.errors;if(s!=null){let p=l.findIndex(m=>m.route.id&&s?.[m.route.id]!==void 0);Ct(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),l=l.slice(0,Math.min(l.length,p+1))}let u=!1,f=-1;if(n)for(let p=0;p<l.length;p++){let m=l[p];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(f=p),m.route.id){let{loaderData:b,errors:x}=n,S=m.route.loader&&!b.hasOwnProperty(m.route.id)&&(!x||x[m.route.id]===void 0);if(m.route.lazy||S){u=!0,f>=0?l=l.slice(0,f+1):l=[l[0]];break}}}let h=n&&r?(p,m)=>{r(p,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:MU(n.matches),errorInfo:m})}:void 0;return l.reduceRight((p,m,b)=>{let x,S=!1,E=null,C=null;n&&(x=s&&m.route.id?s[m.route.id]:void 0,E=m.route.errorElement||$U,u&&(f<0&&b===0?(AM("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,C=null):f===b&&(S=!0,C=m.route.hydrateFallbackElement||null)));let A=t.concat(l.slice(0,b+1)),_=()=>{let N;return x?N=E:S?N=C:m.route.Component?N=v.createElement(m.route.Component,null):m.route.element?N=m.route.element:N=p,v.createElement(UU,{match:m,routeContext:{outlet:p,matches:A,isDataRoute:n!=null},children:N})};return n&&(m.route.ErrorBoundary||m.route.errorElement||b===0)?v.createElement(BU,{location:n.location,revalidation:n.revalidation,component:E,error:x,children:_(),routeContext:{outlet:null,matches:A,isDataRoute:!0},onError:h}):_()},null)}function yw(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function qU(e){let t=v.useContext(qs);return Ct(t,yw(e)),t}function FU(e){let t=v.useContext(Xp);return Ct(t,yw(e)),t}function KU(e){let t=v.useContext(Ra);return Ct(t,yw(e)),t}function bw(e){let t=KU(e),n=t.matches[t.matches.length-1];return Ct(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function VU(){return bw("useRouteId")}function GU(){let e=v.useContext(gw),t=FU("useRouteError"),n=bw("useRouteError");return e!==void 0?e:t.errors?.[n]}function YU(){let{router:e}=qU("useNavigate"),t=bw("useNavigate"),n=v.useRef(!1);return EM(()=>{n.current=!0}),v.useCallback(async(i,l={})=>{Br(n.current,SM),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...l}))},[e,t])}var oN={};function AM(e,t,n){!t&&!oN[e]&&(oN[e]=!0,Br(!1,n))}v.memo(WU);function WU({routes:e,future:t,state:n,unstable_onError:r}){return CM(e,void 0,n,r,t)}function XU({to:e,replace:t,state:n,relative:r}){Ct(Fs(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=v.useContext(Fr);Br(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:l}=v.useContext(Ra),{pathname:s}=Da(),u=Ks(),f=vw(e,mw(l),s,r==="path"),h=JSON.stringify(f);return v.useEffect(()=>{u(JSON.parse(h),{replace:t,state:n,relative:r})},[u,h,r,t,n]),null}function gs(e){Ct(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function QU({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:l=!1,unstable_useTransitions:s}){Ct(!Fs(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),f=v.useMemo(()=>({basename:u,navigator:i,static:l,unstable_useTransitions:s,future:{}}),[u,i,l,s]);typeof n=="string"&&(n=Hs(n));let{pathname:h="/",search:p="",hash:m="",state:b=null,key:x="default"}=n,S=v.useMemo(()=>{let E=pi(h,u);return E==null?null:{location:{pathname:E,search:p,hash:m,state:b,key:x},navigationType:r}},[u,h,p,m,b,x,r]);return Br(S!=null,`<Router basename="${u}"> is not able to match the URL "${h}${p}${m}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:v.createElement(Fr.Provider,{value:f},v.createElement(Ju.Provider,{children:t,value:S}))}function ZU({children:e,location:t}){return LU(kb(e),t)}function kb(e,t=[]){let n=[];return v.Children.forEach(e,(r,i)=>{if(!v.isValidElement(r))return;let l=[...t,i];if(r.type===v.Fragment){n.push.apply(n,kb(r.props.children,l));return}Ct(r.type===gs,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ct(!r.props.index||!r.props.children,"An index route cannot have child routes.");let s={id:r.props.id||l.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=kb(r.props.children,l)),n.push(s)}),n}var Eh="get",Ch="application/x-www-form-urlencoded";function Qp(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function JU(e){return Qp(e)&&e.tagName.toLowerCase()==="button"}function e8(e){return Qp(e)&&e.tagName.toLowerCase()==="form"}function t8(e){return Qp(e)&&e.tagName.toLowerCase()==="input"}function n8(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function r8(e,t){return e.button===0&&(!t||t==="_self")&&!n8(e)}var Gd=null;function a8(){if(Gd===null)try{new FormData(document.createElement("form"),0),Gd=!1}catch{Gd=!0}return Gd}var i8=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ty(e){return e!=null&&!i8.has(e)?(Br(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ch}"`),null):e}function o8(e,t){let n,r,i,l,s;if(e8(e)){let u=e.getAttribute("action");r=u?pi(u,t):null,n=e.getAttribute("method")||Eh,i=Ty(e.getAttribute("enctype"))||Ch,l=new FormData(e)}else if(JU(e)||t8(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||u.getAttribute("action");if(r=f?pi(f,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||Eh,i=Ty(e.getAttribute("formenctype"))||Ty(u.getAttribute("enctype"))||Ch,l=new FormData(u,e),!a8()){let{name:h,type:p,value:m}=e;if(p==="image"){let b=h?`${h}.`:"";l.append(`${b}x`,"0"),l.append(`${b}y`,"0")}else h&&l.append(h,m)}}else{if(Qp(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Eh,r=null,i=Ch,s=e}return l&&i==="text/plain"&&(s=l,l=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:l,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function xw(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function l8(e,t,n){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r.pathname==="/"?r.pathname=`_root.${n}`:t&&pi(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${n}`,r}async function s8(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function c8(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function u8(e,t,n){let r=await Promise.all(e.map(async i=>{let l=t.routes[i.route.id];if(l){let s=await s8(l,n);return s.links?s.links():[]}return[]}));return p8(r.flat(1).filter(c8).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function lN(e,t,n,r,i,l){let s=(f,h)=>n[h]?f.route.id!==n[h].route.id:!0,u=(f,h)=>n[h].pathname!==f.pathname||n[h].route.path?.endsWith("*")&&n[h].params["*"]!==f.params["*"];return l==="assets"?t.filter((f,h)=>s(f,h)||u(f,h)):l==="data"?t.filter((f,h)=>{let p=r.routes[f.route.id];if(!p||!p.hasLoader)return!1;if(s(f,h)||u(f,h))return!0;if(f.route.shouldRevalidate){let m=f.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof m=="boolean")return m}return!0}):[]}function f8(e,t,{includeHydrateFallback:n}={}){return d8(e.map(r=>{let i=t.routes[r.route.id];if(!i)return[];let l=[i.module];return i.clientActionModule&&(l=l.concat(i.clientActionModule)),i.clientLoaderModule&&(l=l.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(l=l.concat(i.hydrateFallbackModule)),i.imports&&(l=l.concat(i.imports)),l}).flat(1))}function d8(e){return[...new Set(e)]}function h8(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function p8(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let l=JSON.stringify(h8(i));return n.has(l)||(n.add(l),r.push({key:l,link:i})),r},[])}function OM(){let e=v.useContext(qs);return xw(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function m8(){let e=v.useContext(Xp);return xw(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ww=v.createContext(void 0);ww.displayName="FrameworkContext";function NM(){let e=v.useContext(ww);return xw(e,"You must render this element inside a <HydratedRouter> element"),e}function v8(e,t){let n=v.useContext(ww),[r,i]=v.useState(!1),[l,s]=v.useState(!1),{onFocus:u,onBlur:f,onMouseEnter:h,onMouseLeave:p,onTouchStart:m}=t,b=v.useRef(null);v.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let E=A=>{A.forEach(_=>{s(_.isIntersecting)})},C=new IntersectionObserver(E,{threshold:.5});return b.current&&C.observe(b.current),()=>{C.disconnect()}}},[e]),v.useEffect(()=>{if(r){let E=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(E)}}},[r]);let x=()=>{i(!0)},S=()=>{i(!1),s(!1)};return n?e!=="intent"?[l,b,{}]:[l,b,{onFocus:iu(u,x),onBlur:iu(f,S),onMouseEnter:iu(h,x),onMouseLeave:iu(p,S),onTouchStart:iu(m,x)}]:[!1,b,{}]}function iu(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function g8({page:e,...t}){let{router:n}=OM(),r=v.useMemo(()=>gM(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?v.createElement(b8,{page:e,matches:r,...t}):null}function y8(e){let{manifest:t,routeModules:n}=NM(),[r,i]=v.useState([]);return v.useEffect(()=>{let l=!1;return u8(e,t,n).then(s=>{l||i(s)}),()=>{l=!0}},[e,t,n]),r}function b8({page:e,matches:t,...n}){let r=Da(),{manifest:i,routeModules:l}=NM(),{basename:s}=OM(),{loaderData:u,matches:f}=m8(),h=v.useMemo(()=>lN(e,t,f,i,r,"data"),[e,t,f,i,r]),p=v.useMemo(()=>lN(e,t,f,i,r,"assets"),[e,t,f,i,r]),m=v.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let S=new Set,E=!1;if(t.forEach(A=>{let _=i.routes[A.route.id];!_||!_.hasLoader||(!h.some(N=>N.route.id===A.route.id)&&A.route.id in u&&l[A.route.id]?.shouldRevalidate||_.hasClientLoader?E=!0:S.add(A.route.id))}),S.size===0)return[];let C=l8(e,s,"data");return E&&S.size>0&&C.searchParams.set("_routes",t.filter(A=>S.has(A.route.id)).map(A=>A.route.id).join(",")),[C.pathname+C.search]},[s,u,r,i,h,t,e,l]),b=v.useMemo(()=>f8(p,i),[p,i]),x=y8(p);return v.createElement(v.Fragment,null,m.map(S=>v.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...n})),b.map(S=>v.createElement("link",{key:S,rel:"modulepreload",href:S,...n})),x.map(({key:S,link:E})=>v.createElement("link",{key:S,nonce:n.nonce,...E})))}function x8(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var _M=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{_M&&(window.__reactRouterVersion="7.10.0")}catch{}function w8({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=v.useRef();i.current==null&&(i.current=oU({window:r,v5Compat:!0}));let l=i.current,[s,u]=v.useState({action:l.action,location:l.location}),f=v.useCallback(h=>{n===!1?u(h):v.startTransition(()=>u(h))},[n]);return v.useLayoutEffect(()=>l.listen(f),[l,f]),v.createElement(QU,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:l,unstable_useTransitions:n===!0})}var jM=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,TM=v.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:l,replace:s,state:u,target:f,to:h,preventScrollReset:p,viewTransition:m,...b},x){let{basename:S,unstable_useTransitions:E}=v.useContext(Fr),C=typeof h=="string"&&jM.test(h),A,_=!1;if(typeof h=="string"&&C&&(A=h,_M))try{let Q=new URL(window.location.href),F=h.startsWith("//")?new URL(Q.protocol+h):new URL(h),G=pi(F.pathname,S);F.origin===Q.origin&&G!=null?h=G+F.search+F.hash:_=!0}catch{Br(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let N=kU(h,{relative:i}),[j,T,k]=v8(r,b),R=C8(h,{replace:s,state:u,target:f,preventScrollReset:p,relative:i,viewTransition:m,unstable_useTransitions:E});function D(Q){t&&t(Q),Q.defaultPrevented||R(Q)}let B=v.createElement("a",{...b,...k,href:A||N,onClick:_||l?t:D,ref:x8(x,T),target:f,"data-discover":!C&&n==="render"?"true":void 0});return j&&!C?v.createElement(v.Fragment,null,B,v.createElement(g8,{page:N})):B});TM.displayName="Link";var Ah=v.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:l,to:s,viewTransition:u,children:f,...h},p){let m=ef(s,{relative:h.relative}),b=Da(),x=v.useContext(Xp),{navigator:S,basename:E}=v.useContext(Fr),C=x!=null&&j8(m)&&u===!0,A=S.encodeLocation?S.encodeLocation(m).pathname:m.pathname,_=b.pathname,N=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;n||(_=_.toLowerCase(),N=N?N.toLowerCase():null,A=A.toLowerCase()),N&&E&&(N=pi(N,E)||N);const j=A!=="/"&&A.endsWith("/")?A.length-1:A.length;let T=_===A||!i&&_.startsWith(A)&&_.charAt(j)==="/",k=N!=null&&(N===A||!i&&N.startsWith(A)&&N.charAt(A.length)==="/"),R={isActive:T,isPending:k,isTransitioning:C},D=T?t:void 0,B;typeof r=="function"?B=r(R):B=[r,T?"active":null,k?"pending":null,C?"transitioning":null].filter(Boolean).join(" ");let Q=typeof l=="function"?l(R):l;return v.createElement(TM,{...h,"aria-current":D,className:B,ref:p,style:Q,to:s,viewTransition:u},typeof f=="function"?f(R):f)});Ah.displayName="NavLink";var S8=v.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:l,method:s=Eh,action:u,onSubmit:f,relative:h,preventScrollReset:p,viewTransition:m,...b},x)=>{let{unstable_useTransitions:S}=v.useContext(Fr),E=N8(),C=_8(u,{relative:h}),A=s.toLowerCase()==="get"?"get":"post",_=typeof u=="string"&&jM.test(u),N=j=>{if(f&&f(j),j.defaultPrevented)return;j.preventDefault();let T=j.nativeEvent.submitter,k=T?.getAttribute("formmethod")||s,R=()=>E(T||j.currentTarget,{fetcherKey:t,method:k,navigate:n,replace:i,state:l,relative:h,preventScrollReset:p,viewTransition:m});S&&n!==!1?v.startTransition(()=>R()):R()};return v.createElement("form",{ref:x,method:A,action:C,onSubmit:r?f:N,...b,"data-discover":!_&&e==="render"?"true":void 0})});S8.displayName="Form";function E8(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function MM(e){let t=v.useContext(qs);return Ct(t,E8(e)),t}function C8(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:l,viewTransition:s,unstable_useTransitions:u}={}){let f=Ks(),h=Da(),p=ef(e,{relative:l});return v.useCallback(m=>{if(r8(m,t)){m.preventDefault();let b=n!==void 0?n:Nu(h)===Nu(p),x=()=>f(e,{replace:b,state:r,preventScrollReset:i,relative:l,viewTransition:s});u?v.startTransition(()=>x()):x()}},[h,f,p,n,r,t,e,i,l,s,u])}var A8=0,O8=()=>`__${String(++A8)}__`;function N8(){let{router:e}=MM("useSubmit"),{basename:t}=v.useContext(Fr),n=VU(),r=e.fetch,i=e.navigate;return v.useCallback(async(l,s={})=>{let{action:u,method:f,encType:h,formData:p,body:m}=o8(l,t);if(s.navigate===!1){let b=s.fetcherKey||O8();await r(b,n,s.action||u,{preventScrollReset:s.preventScrollReset,formData:p,body:m,formMethod:s.method||f,formEncType:s.encType||h,flushSync:s.flushSync})}else await i(s.action||u,{preventScrollReset:s.preventScrollReset,formData:p,body:m,formMethod:s.method||f,formEncType:s.encType||h,replace:s.replace,state:s.state,fromRouteId:n,flushSync:s.flushSync,viewTransition:s.viewTransition})},[r,i,t,n])}function _8(e,{relative:t}={}){let{basename:n}=v.useContext(Fr),r=v.useContext(Ra);Ct(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),l={...ef(e||".",{relative:t})},s=Da();if(e==null){l.search=s.search;let u=new URLSearchParams(l.search),f=u.getAll("index");if(f.some(p=>p==="")){u.delete("index"),f.filter(m=>m).forEach(m=>u.append("index",m));let p=u.toString();l.search=p?`?${p}`:""}}return(!e||e===".")&&i.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(l.pathname=l.pathname==="/"?n:ui([n,l.pathname])),Nu(l)}function j8(e,{relative:t}={}){let n=v.useContext(wM);Ct(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=MM("useViewTransitionState"),i=ef(e,{relative:t});if(!n.isTransitioning)return!1;let l=pi(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=pi(n.nextLocation.pathname,r)||n.nextLocation.pathname;return zh(i.pathname,s)!=null||zh(i.pathname,l)!=null}var yl=vM();const RM=Ma(yl);function T8(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const M8=e=>{switch(e){case"success":return P8;case"info":return I8;case"warning":return k8;case"error":return L8;default:return null}},R8=Array(12).fill(0),D8=({visible:e,className:t})=>ee.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ee.createElement("div",{className:"sonner-spinner"},R8.map((n,r)=>ee.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),P8=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),k8=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),I8=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),L8=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),z8=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ee.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ee.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),$8=()=>{const[e,t]=ee.useState(document.hidden);return ee.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Ib=1;class B8{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,l=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Ib++,s=this.toasts.find(f=>f.id===l),u=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),s?this.toasts=this.toasts.map(f=>f.id===l?(this.publish({...f,...t,id:l,title:r}),{...f,...t,id:l,dismissible:u,title:r}):f):this.addToast({title:r,...i,dismissible:u,id:l}),l},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let l=r!==void 0,s;const u=i.then(async h=>{if(s=["resolve",h],ee.isValidElement(h))l=!1,this.create({id:r,type:"default",message:h});else if(H8(h)&&!h.ok){l=!1;const m=typeof n.error=="function"?await n.error(`HTTP error! status: ${h.status}`):n.error,b=typeof n.description=="function"?await n.description(`HTTP error! status: ${h.status}`):n.description,S=typeof m=="object"&&!ee.isValidElement(m)?m:{message:m};this.create({id:r,type:"error",description:b,...S})}else if(h instanceof Error){l=!1;const m=typeof n.error=="function"?await n.error(h):n.error,b=typeof n.description=="function"?await n.description(h):n.description,S=typeof m=="object"&&!ee.isValidElement(m)?m:{message:m};this.create({id:r,type:"error",description:b,...S})}else if(n.success!==void 0){l=!1;const m=typeof n.success=="function"?await n.success(h):n.success,b=typeof n.description=="function"?await n.description(h):n.description,S=typeof m=="object"&&!ee.isValidElement(m)?m:{message:m};this.create({id:r,type:"success",description:b,...S})}}).catch(async h=>{if(s=["reject",h],n.error!==void 0){l=!1;const p=typeof n.error=="function"?await n.error(h):n.error,m=typeof n.description=="function"?await n.description(h):n.description,x=typeof p=="object"&&!ee.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:m,...x})}}).finally(()=>{l&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),f=()=>new Promise((h,p)=>u.then(()=>s[0]==="reject"?p(s[1]):h(s[1])).catch(p));return typeof r!="string"&&typeof r!="number"?{unwrap:f}:Object.assign(r,{unwrap:f})},this.custom=(t,n)=>{const r=n?.id||Ib++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Wn=new B8,U8=(e,t)=>{const n=t?.id||Ib++;return Wn.addToast({title:e,...t,id:n}),n},H8=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",q8=U8,F8=()=>Wn.toasts,K8=()=>Wn.getActiveToasts(),Mn=Object.assign(q8,{success:Wn.success,info:Wn.info,warning:Wn.warning,error:Wn.error,custom:Wn.custom,message:Wn.message,promise:Wn.promise,dismiss:Wn.dismiss,loading:Wn.loading},{getHistory:F8,getToasts:K8});T8("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Yd(e){return e.label!==void 0}const V8=3,G8="24px",Y8="16px",sN=4e3,W8=356,X8=14,Q8=45,Z8=200;function va(...e){return e.filter(Boolean).join(" ")}function J8(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const eH=e=>{var t,n,r,i,l,s,u,f,h;const{invert:p,toast:m,unstyled:b,interacting:x,setHeights:S,visibleToasts:E,heights:C,index:A,toasts:_,expanded:N,removeToast:j,defaultRichColors:T,closeButton:k,style:R,cancelButtonStyle:D,actionButtonStyle:B,className:Q="",descriptionClassName:F="",duration:G,position:te,gap:ce,expandByDefault:he,classNames:I,icons:q,closeButtonAriaLabel:H="Close toast"}=e,[X,ge]=ee.useState(null),[L,z]=ee.useState(null),[P,W]=ee.useState(!1),[ne,se]=ee.useState(!1),[Y,pe]=ee.useState(!1),[V,me]=ee.useState(!1),[ye,ie]=ee.useState(!1),[ke,ve]=ee.useState(0),[Je,tt]=ee.useState(0),mt=ee.useRef(m.duration||G||sN),wr=ee.useRef(null),Ut=ee.useRef(null),An=A===0,Sr=A+1<=E,Ht=m.type,en=m.dismissible!==!1,qt=m.className||"",Ot=m.descriptionClassName||"",tn=ee.useMemo(()=>C.findIndex(Ce=>Ce.toastId===m.id)||0,[C,m.id]),Gr=ee.useMemo(()=>{var Ce;return(Ce=m.closeButton)!=null?Ce:k},[m.closeButton,k]),dn=ee.useMemo(()=>m.duration||G||sN,[m.duration,G]),Yr=ee.useRef(0),On=ee.useRef(0),Er=ee.useRef(0),nn=ee.useRef(null),[rr,hn]=te.split("-"),ar=ee.useMemo(()=>C.reduce((Ce,Le,ut)=>ut>=tn?Ce:Ce+Le.height,0),[C,tn]),rn=$8(),hc=m.invert||p,Oo=Ht==="loading";On.current=ee.useMemo(()=>tn*ce+ar,[tn,ar]),ee.useEffect(()=>{mt.current=dn},[dn]),ee.useEffect(()=>{W(!0)},[]),ee.useEffect(()=>{const Ce=Ut.current;if(Ce){const Le=Ce.getBoundingClientRect().height;return tt(Le),S(ut=>[{toastId:m.id,height:Le,position:m.position},...ut]),()=>S(ut=>ut.filter(it=>it.toastId!==m.id))}},[S,m.id]),ee.useLayoutEffect(()=>{if(!P)return;const Ce=Ut.current,Le=Ce.style.height;Ce.style.height="auto";const ut=Ce.getBoundingClientRect().height;Ce.style.height=Le,tt(ut),S(it=>it.find(Ye=>Ye.toastId===m.id)?it.map(Ye=>Ye.toastId===m.id?{...Ye,height:ut}:Ye):[{toastId:m.id,height:ut,position:m.position},...it])},[P,m.title,m.description,S,m.id,m.jsx,m.action,m.cancel]);const Oe=ee.useCallback(()=>{se(!0),ve(On.current),S(Ce=>Ce.filter(Le=>Le.toastId!==m.id)),setTimeout(()=>{j(m)},Z8)},[m,j,S,On]);ee.useEffect(()=>{if(m.promise&&Ht==="loading"||m.duration===1/0||m.type==="loading")return;let Ce;return N||x||rn?(()=>{if(Er.current<Yr.current){const it=new Date().getTime()-Yr.current;mt.current=mt.current-it}Er.current=new Date().getTime()})():(()=>{mt.current!==1/0&&(Yr.current=new Date().getTime(),Ce=setTimeout(()=>{m.onAutoClose==null||m.onAutoClose.call(m,m),Oe()},mt.current))})(),()=>clearTimeout(Ce)},[N,x,m,Ht,rn,Oe]),ee.useEffect(()=>{m.delete&&(Oe(),m.onDismiss==null||m.onDismiss.call(m,m))},[Oe,m.delete]);function Ue(){var Ce;if(q?.loading){var Le;return ee.createElement("div",{className:va(I?.loader,m==null||(Le=m.classNames)==null?void 0:Le.loader,"sonner-loader"),"data-visible":Ht==="loading"},q.loading)}return ee.createElement(D8,{className:va(I?.loader,m==null||(Ce=m.classNames)==null?void 0:Ce.loader),visible:Ht==="loading"})}const Ve=m.icon||q?.[Ht]||M8(Ht);var Ie,Ge;return ee.createElement("li",{tabIndex:0,ref:Ut,className:va(Q,qt,I?.toast,m==null||(t=m.classNames)==null?void 0:t.toast,I?.default,I?.[Ht],m==null||(n=m.classNames)==null?void 0:n[Ht]),"data-sonner-toast":"","data-rich-colors":(Ie=m.richColors)!=null?Ie:T,"data-styled":!(m.jsx||m.unstyled||b),"data-mounted":P,"data-promise":!!m.promise,"data-swiped":ye,"data-removed":ne,"data-visible":Sr,"data-y-position":rr,"data-x-position":hn,"data-index":A,"data-front":An,"data-swiping":Y,"data-dismissible":en,"data-type":Ht,"data-invert":hc,"data-swipe-out":V,"data-swipe-direction":L,"data-expanded":!!(N||he&&P),"data-testid":m.testId,style:{"--index":A,"--toasts-before":A,"--z-index":_.length-A,"--offset":`${ne?ke:On.current}px`,"--initial-height":he?"auto":`${Je}px`,...R,...m.style},onDragEnd:()=>{pe(!1),ge(null),nn.current=null},onPointerDown:Ce=>{Ce.button!==2&&(Oo||!en||(wr.current=new Date,ve(On.current),Ce.target.setPointerCapture(Ce.pointerId),Ce.target.tagName!=="BUTTON"&&(pe(!0),nn.current={x:Ce.clientX,y:Ce.clientY})))},onPointerUp:()=>{var Ce,Le,ut;if(V||!en)return;nn.current=null;const it=Number(((Ce=Ut.current)==null?void 0:Ce.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Nn=Number(((Le=Ut.current)==null?void 0:Le.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ye=new Date().getTime()-((ut=wr.current)==null?void 0:ut.getTime()),vt=X==="x"?it:Nn,Cr=Math.abs(vt)/Ye;if(Math.abs(vt)>=Q8||Cr>.11){ve(On.current),m.onDismiss==null||m.onDismiss.call(m,m),z(X==="x"?it>0?"right":"left":Nn>0?"down":"up"),Oe(),me(!0);return}else{var pn,Un;(pn=Ut.current)==null||pn.style.setProperty("--swipe-amount-x","0px"),(Un=Ut.current)==null||Un.style.setProperty("--swipe-amount-y","0px")}ie(!1),pe(!1),ge(null)},onPointerMove:Ce=>{var Le,ut,it;if(!nn.current||!en||((Le=window.getSelection())==null?void 0:Le.toString().length)>0)return;const Ye=Ce.clientY-nn.current.y,vt=Ce.clientX-nn.current.x;var Cr;const pn=(Cr=e.swipeDirections)!=null?Cr:J8(te);!X&&(Math.abs(vt)>1||Math.abs(Ye)>1)&&ge(Math.abs(vt)>Math.abs(Ye)?"x":"y");let Un={x:0,y:0};const Al=Wr=>1/(1.5+Math.abs(Wr)/20);if(X==="y"){if(pn.includes("top")||pn.includes("bottom"))if(pn.includes("top")&&Ye<0||pn.includes("bottom")&&Ye>0)Un.y=Ye;else{const Wr=Ye*Al(Ye);Un.y=Math.abs(Wr)<Math.abs(Ye)?Wr:Ye}}else if(X==="x"&&(pn.includes("left")||pn.includes("right")))if(pn.includes("left")&&vt<0||pn.includes("right")&&vt>0)Un.x=vt;else{const Wr=vt*Al(vt);Un.x=Math.abs(Wr)<Math.abs(vt)?Wr:vt}(Math.abs(Un.x)>0||Math.abs(Un.y)>0)&&ie(!0),(ut=Ut.current)==null||ut.style.setProperty("--swipe-amount-x",`${Un.x}px`),(it=Ut.current)==null||it.style.setProperty("--swipe-amount-y",`${Un.y}px`)}},Gr&&!m.jsx&&Ht!=="loading"?ee.createElement("button",{"aria-label":H,"data-disabled":Oo,"data-close-button":!0,onClick:Oo||!en?()=>{}:()=>{Oe(),m.onDismiss==null||m.onDismiss.call(m,m)},className:va(I?.closeButton,m==null||(r=m.classNames)==null?void 0:r.closeButton)},(Ge=q?.close)!=null?Ge:z8):null,(Ht||m.icon||m.promise)&&m.icon!==null&&(q?.[Ht]!==null||m.icon)?ee.createElement("div",{"data-icon":"",className:va(I?.icon,m==null||(i=m.classNames)==null?void 0:i.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||Ue():null,m.type!=="loading"?Ve:null):null,ee.createElement("div",{"data-content":"",className:va(I?.content,m==null||(l=m.classNames)==null?void 0:l.content)},ee.createElement("div",{"data-title":"",className:va(I?.title,m==null||(s=m.classNames)==null?void 0:s.title)},m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title),m.description?ee.createElement("div",{"data-description":"",className:va(F,Ot,I?.description,m==null||(u=m.classNames)==null?void 0:u.description)},typeof m.description=="function"?m.description():m.description):null),ee.isValidElement(m.cancel)?m.cancel:m.cancel&&Yd(m.cancel)?ee.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||D,onClick:Ce=>{Yd(m.cancel)&&en&&(m.cancel.onClick==null||m.cancel.onClick.call(m.cancel,Ce),Oe())},className:va(I?.cancelButton,m==null||(f=m.classNames)==null?void 0:f.cancelButton)},m.cancel.label):null,ee.isValidElement(m.action)?m.action:m.action&&Yd(m.action)?ee.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||B,onClick:Ce=>{Yd(m.action)&&(m.action.onClick==null||m.action.onClick.call(m.action,Ce),!Ce.defaultPrevented&&Oe())},className:va(I?.actionButton,m==null||(h=m.classNames)==null?void 0:h.actionButton)},m.action.label):null)};function cN(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function tH(e,t){const n={};return[e,t].forEach((r,i)=>{const l=i===1,s=l?"--mobile-offset":"--offset",u=l?Y8:G8;function f(h){["top","right","bottom","left"].forEach(p=>{n[`${s}-${p}`]=typeof h=="number"?`${h}px`:h})}typeof r=="number"||typeof r=="string"?f(r):typeof r=="object"?["top","right","bottom","left"].forEach(h=>{r[h]===void 0?n[`${s}-${h}`]=u:n[`${s}-${h}`]=typeof r[h]=="number"?`${r[h]}px`:r[h]}):f(u)}),n}const nH=ee.forwardRef(function(t,n){const{id:r,invert:i,position:l="bottom-right",hotkey:s=["altKey","KeyT"],expand:u,closeButton:f,className:h,offset:p,mobileOffset:m,theme:b="light",richColors:x,duration:S,style:E,visibleToasts:C=V8,toastOptions:A,dir:_=cN(),gap:N=X8,icons:j,containerAriaLabel:T="Notifications"}=t,[k,R]=ee.useState([]),D=ee.useMemo(()=>r?k.filter(P=>P.toasterId===r):k.filter(P=>!P.toasterId),[k,r]),B=ee.useMemo(()=>Array.from(new Set([l].concat(D.filter(P=>P.position).map(P=>P.position)))),[D,l]),[Q,F]=ee.useState([]),[G,te]=ee.useState(!1),[ce,he]=ee.useState(!1),[I,q]=ee.useState(b!=="system"?b:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),H=ee.useRef(null),X=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),ge=ee.useRef(null),L=ee.useRef(!1),z=ee.useCallback(P=>{R(W=>{var ne;return(ne=W.find(se=>se.id===P.id))!=null&&ne.delete||Wn.dismiss(P.id),W.filter(({id:se})=>se!==P.id)})},[]);return ee.useEffect(()=>Wn.subscribe(P=>{if(P.dismiss){requestAnimationFrame(()=>{R(W=>W.map(ne=>ne.id===P.id?{...ne,delete:!0}:ne))});return}setTimeout(()=>{RM.flushSync(()=>{R(W=>{const ne=W.findIndex(se=>se.id===P.id);return ne!==-1?[...W.slice(0,ne),{...W[ne],...P},...W.slice(ne+1)]:[P,...W]})})})}),[k]),ee.useEffect(()=>{if(b!=="system"){q(b);return}if(b==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?q("dark"):q("light")),typeof window>"u")return;const P=window.matchMedia("(prefers-color-scheme: dark)");try{P.addEventListener("change",({matches:W})=>{q(W?"dark":"light")})}catch{P.addListener(({matches:ne})=>{try{q(ne?"dark":"light")}catch(se){console.error(se)}})}},[b]),ee.useEffect(()=>{k.length<=1&&te(!1)},[k]),ee.useEffect(()=>{const P=W=>{var ne;if(s.every(pe=>W[pe]||W.code===pe)){var Y;te(!0),(Y=H.current)==null||Y.focus()}W.code==="Escape"&&(document.activeElement===H.current||(ne=H.current)!=null&&ne.contains(document.activeElement))&&te(!1)};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[s]),ee.useEffect(()=>{if(H.current)return()=>{ge.current&&(ge.current.focus({preventScroll:!0}),ge.current=null,L.current=!1)}},[H.current]),ee.createElement("section",{ref:n,"aria-label":`${T} ${X}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},B.map((P,W)=>{var ne;const[se,Y]=P.split("-");return D.length?ee.createElement("ol",{key:P,dir:_==="auto"?cN():_,tabIndex:-1,ref:H,className:h,"data-sonner-toaster":!0,"data-sonner-theme":I,"data-y-position":se,"data-x-position":Y,style:{"--front-toast-height":`${((ne=Q[0])==null?void 0:ne.height)||0}px`,"--width":`${W8}px`,"--gap":`${N}px`,...E,...tH(p,m)},onBlur:pe=>{L.current&&!pe.currentTarget.contains(pe.relatedTarget)&&(L.current=!1,ge.current&&(ge.current.focus({preventScroll:!0}),ge.current=null))},onFocus:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||L.current||(L.current=!0,ge.current=pe.relatedTarget)},onMouseEnter:()=>te(!0),onMouseMove:()=>te(!0),onMouseLeave:()=>{ce||te(!1)},onDragEnd:()=>te(!1),onPointerDown:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||he(!0)},onPointerUp:()=>he(!1)},D.filter(pe=>!pe.position&&W===0||pe.position===P).map((pe,V)=>{var me,ye;return ee.createElement(eH,{key:pe.id,icons:j,index:V,toast:pe,defaultRichColors:x,duration:(me=A?.duration)!=null?me:S,className:A?.className,descriptionClassName:A?.descriptionClassName,invert:i,visibleToasts:C,closeButton:(ye=A?.closeButton)!=null?ye:f,interacting:ce,position:P,style:A?.style,unstyled:A?.unstyled,classNames:A?.classNames,cancelButtonStyle:A?.cancelButtonStyle,actionButtonStyle:A?.actionButtonStyle,closeButtonAriaLabel:A?.closeButtonAriaLabel,removeToast:z,toasts:D.filter(ie=>ie.position==pe.position),heights:Q.filter(ie=>ie.position==pe.position),setHeights:F,expandByDefault:u,gap:N,expanded:G,swipeDirections:t.swipeDirections})})):null}))});function uN(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Zn(...e){return t=>{let n=!1;const r=e.map(i=>{const l=uN(i,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let i=0;i<r.length;i++){const l=r[i];typeof l=="function"?l():uN(e[i],null)}}}}function Ke(...e){return v.useCallback(Zn(...e),e)}var rH=Symbol.for("react.lazy"),$h=Wp[" use ".trim().toString()];function aH(e){return typeof e=="object"&&e!==null&&"then"in e}function DM(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===rH&&"_payload"in e&&aH(e._payload)}function Vs(e){const t=iH(e),n=v.forwardRef((r,i)=>{let{children:l,...s}=r;DM(l)&&typeof $h=="function"&&(l=$h(l._payload));const u=v.Children.toArray(l),f=u.find(lH);if(f){const h=f.props.children,p=u.map(m=>m===f?v.Children.count(h)>1?v.Children.only(null):v.isValidElement(h)?h.props.children:null:m);return g.jsx(t,{...s,ref:i,children:v.isValidElement(h)?v.cloneElement(h,void 0,p):null})}return g.jsx(t,{...s,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}var Gs=Vs("Slot");function iH(e){const t=v.forwardRef((n,r)=>{let{children:i,...l}=n;if(DM(i)&&typeof $h=="function"&&(i=$h(i._payload)),v.isValidElement(i)){const s=cH(i),u=sH(l,i.props);return i.type!==v.Fragment&&(u.ref=r?Zn(r,s):s),v.cloneElement(i,u)}return v.Children.count(i)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var oH=Symbol("radix.slottable");function lH(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===oH}function sH(e,t){const n={...t};for(const r in t){const i=e[r],l=t[r];/^on[A-Z]/.test(r)?i&&l?n[r]=(...u)=>{const f=l(...u);return i(...u),f}:i&&(n[r]=i):r==="style"?n[r]={...i,...l}:r==="className"&&(n[r]=[i,l].filter(Boolean).join(" "))}return{...e,...n}}function cH(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function PM(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=PM(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ht(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=PM(e))&&(r&&(r+=" "),r+=t);return r}const fN=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,dN=ht,Ys=(e,t)=>n=>{var r;if(t?.variants==null)return dN(e,n?.class,n?.className);const{variants:i,defaultVariants:l}=t,s=Object.keys(i).map(h=>{const p=n?.[h],m=l?.[h];if(p===null)return null;const b=fN(p)||fN(m);return i[h][b]}),u=n&&Object.entries(n).reduce((h,p)=>{let[m,b]=p;return b===void 0||(h[m]=b),h},{}),f=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((h,p)=>{let{class:m,className:b,...x}=p;return Object.entries(x).every(S=>{let[E,C]=S;return Array.isArray(C)?C.includes({...l,...u}[E]):{...l,...u}[E]===C})?[...h,m,b]:h},[]);return dN(e,s,f,n?.class,n?.className)};const uH=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),fH=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),hN=e=>{const t=fH(e);return t.charAt(0).toUpperCase()+t.slice(1)},kM=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),dH=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var hH={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"};const pH=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:l,iconNode:s,...u},f)=>v.createElement("svg",{ref:f,...hH,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:kM("lucide",i),...!l&&!dH(u)&&{"aria-hidden":"true"},...u},[...s.map(([h,p])=>v.createElement(h,p)),...Array.isArray(l)?l:[l]]));const et=(e,t)=>{const n=v.forwardRef(({className:r,...i},l)=>v.createElement(pH,{ref:l,iconNode:t,className:kM(`lucide-${uH(hN(e))}`,`lucide-${e}`,r),...i}));return n.displayName=hN(e),n};const mH=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Wd=et("arrow-right",mH);const vH=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],tf=et("check",vH);const gH=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],IM=et("chevron-down",gH);const yH=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],bH=et("chevron-right",yH);const xH=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],wH=et("chevron-up",xH);const SH=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],EH=et("chevrons-up-down",SH);const CH=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],pN=et("circle-check",CH);const AH=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],OH=et("circle-question-mark",AH);const NH=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],_H=et("circle",NH);const jH=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],TH=et("clock",jH);const MH=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],RH=et("copy",MH);const DH=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],LM=et("house",DH);const PH=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],kH=et("key-round",PH);const IH=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],co=et("key",IH);const LH=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],zH=et("layers",LH);const $H=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],BH=et("loader-circle",$H);const UH=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],HH=et("lock",UH);const qH=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],FH=et("log-out",qH);const KH=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],VH=et("panel-left",KH);const GH=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ol=et("plus",GH);const YH=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],WH=et("refresh-cw",YH);const XH=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Sw=et("search",XH);const QH=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],zM=et("settings",QH);const ZH=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],JH=et("shield",ZH);const eq=[["path",{d:"M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5",key:"slp6dd"}],["path",{d:"M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244",key:"o0xfot"}],["path",{d:"M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05",key:"wn3emo"}]],js=et("store",eq);const tq=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],$M=et("trash-2",tq);const nq=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],rq=et("triangle-alert",nq);const aq=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],iq=et("user",aq);const oq=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],BM=et("x",oq);const lq=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],mN=et("zap",lq),sq=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},cq=(e,t)=>({classGroupId:e,validator:t}),UM=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Bh="-",vN=[],uq="arbitrary..",fq=e=>{const t=hq(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return dq(s);const u=s.split(Bh),f=u[0]===""&&u.length>1?1:0;return HM(u,f,t)},getConflictingClassGroupIds:(s,u)=>{if(u){const f=r[s],h=n[s];return f?h?sq(h,f):f:h||vN}return n[s]||vN}}},HM=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],l=n.nextPart.get(i);if(l){const h=HM(e,t+1,l);if(h)return h}const s=n.validators;if(s===null)return;const u=t===0?e.join(Bh):e.slice(t).join(Bh),f=s.length;for(let h=0;h<f;h++){const p=s[h];if(p.validator(u))return p.classGroupId}},dq=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?uq+r:void 0})(),hq=e=>{const{theme:t,classGroups:n}=e;return pq(n,t)},pq=(e,t)=>{const n=UM();for(const r in e){const i=e[r];Ew(i,n,r,t)}return n},Ew=(e,t,n,r)=>{const i=e.length;for(let l=0;l<i;l++){const s=e[l];mq(s,t,n,r)}},mq=(e,t,n,r)=>{if(typeof e=="string"){vq(e,t,n);return}if(typeof e=="function"){gq(e,t,n,r);return}yq(e,t,n,r)},vq=(e,t,n)=>{const r=e===""?t:qM(t,e);r.classGroupId=n},gq=(e,t,n,r)=>{if(bq(e)){Ew(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(cq(n,e))},yq=(e,t,n,r)=>{const i=Object.entries(e),l=i.length;for(let s=0;s<l;s++){const[u,f]=i[s];Ew(f,qM(t,u),n,r)}},qM=(e,t)=>{let n=e;const r=t.split(Bh),i=r.length;for(let l=0;l<i;l++){const s=r[l];let u=n.nextPart.get(s);u||(u=UM(),n.nextPart.set(s,u)),n=u}return n},bq=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,xq=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(l,s)=>{n[l]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(l){let s=n[l];if(s!==void 0)return s;if((s=r[l])!==void 0)return i(l,s),s},set(l,s){l in n?n[l]=s:i(l,s)}}},Lb="!",gN=":",wq=[],yN=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Sq=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const l=[];let s=0,u=0,f=0,h;const p=i.length;for(let E=0;E<p;E++){const C=i[E];if(s===0&&u===0){if(C===gN){l.push(i.slice(f,E)),f=E+1;continue}if(C==="/"){h=E;continue}}C==="["?s++:C==="]"?s--:C==="("?u++:C===")"&&u--}const m=l.length===0?i:i.slice(f);let b=m,x=!1;m.endsWith(Lb)?(b=m.slice(0,-1),x=!0):m.startsWith(Lb)&&(b=m.slice(1),x=!0);const S=h&&h>f?h-f:void 0;return yN(l,x,b,S)};if(t){const i=t+gN,l=r;r=s=>s.startsWith(i)?l(s.slice(i.length)):yN(wq,!1,s,void 0,!0)}if(n){const i=r;r=l=>n({className:l,parseClassName:i})}return r},Eq=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let l=0;l<n.length;l++){const s=n[l],u=s[0]==="[",f=t.has(s);u||f?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(s)):i.push(s)}return i.length>0&&(i.sort(),r.push(...i)),r}},Cq=e=>({cache:xq(e.cacheSize),parseClassName:Sq(e),sortModifiers:Eq(e),...fq(e)}),Aq=/\s+/,Oq=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:l}=t,s=[],u=e.trim().split(Aq);let f="";for(let h=u.length-1;h>=0;h-=1){const p=u[h],{isExternal:m,modifiers:b,hasImportantModifier:x,baseClassName:S,maybePostfixModifierPosition:E}=n(p);if(m){f=p+(f.length>0?" "+f:f);continue}let C=!!E,A=r(C?S.substring(0,E):S);if(!A){if(!C){f=p+(f.length>0?" "+f:f);continue}if(A=r(S),!A){f=p+(f.length>0?" "+f:f);continue}C=!1}const _=b.length===0?"":b.length===1?b[0]:l(b).join(":"),N=x?_+Lb:_,j=N+A;if(s.indexOf(j)>-1)continue;s.push(j);const T=i(A,C);for(let k=0;k<T.length;++k){const R=T[k];s.push(N+R)}f=p+(f.length>0?" "+f:f)}return f},Nq=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=FM(n))&&(i&&(i+=" "),i+=r);return i},FM=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=FM(e[r]))&&(n&&(n+=" "),n+=t);return n},_q=(e,...t)=>{let n,r,i,l;const s=f=>{const h=t.reduce((p,m)=>m(p),e());return n=Cq(h),r=n.cache.get,i=n.cache.set,l=u,u(f)},u=f=>{const h=r(f);if(h)return h;const p=Oq(f,n);return i(f,p),p};return l=s,(...f)=>l(Nq(...f))},jq=[],Kt=e=>{const t=n=>n[e]||jq;return t.isThemeGetter=!0,t},KM=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,VM=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Tq=/^\d+\/\d+$/,Mq=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Rq=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Dq=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Pq=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,kq=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,us=e=>Tq.test(e),ze=e=>!!e&&!Number.isNaN(Number(e)),ao=e=>!!e&&Number.isInteger(Number(e)),My=e=>e.endsWith("%")&&ze(e.slice(0,-1)),Ja=e=>Mq.test(e),Iq=()=>!0,Lq=e=>Rq.test(e)&&!Dq.test(e),GM=()=>!1,zq=e=>Pq.test(e),$q=e=>kq.test(e),Bq=e=>!Se(e)&&!Ee(e),Uq=e=>Ws(e,XM,GM),Se=e=>KM.test(e),Fo=e=>Ws(e,QM,Lq),Ry=e=>Ws(e,Vq,ze),bN=e=>Ws(e,YM,GM),Hq=e=>Ws(e,WM,$q),Xd=e=>Ws(e,ZM,zq),Ee=e=>VM.test(e),ou=e=>Xs(e,QM),qq=e=>Xs(e,Gq),xN=e=>Xs(e,YM),Fq=e=>Xs(e,XM),Kq=e=>Xs(e,WM),Qd=e=>Xs(e,ZM,!0),Ws=(e,t,n)=>{const r=KM.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Xs=(e,t,n=!1)=>{const r=VM.exec(e);return r?r[1]?t(r[1]):n:!1},YM=e=>e==="position"||e==="percentage",WM=e=>e==="image"||e==="url",XM=e=>e==="length"||e==="size"||e==="bg-size",QM=e=>e==="length",Vq=e=>e==="number",Gq=e=>e==="family-name",ZM=e=>e==="shadow",Yq=()=>{const e=Kt("color"),t=Kt("font"),n=Kt("text"),r=Kt("font-weight"),i=Kt("tracking"),l=Kt("leading"),s=Kt("breakpoint"),u=Kt("container"),f=Kt("spacing"),h=Kt("radius"),p=Kt("shadow"),m=Kt("inset-shadow"),b=Kt("text-shadow"),x=Kt("drop-shadow"),S=Kt("blur"),E=Kt("perspective"),C=Kt("aspect"),A=Kt("ease"),_=Kt("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],T=()=>[...j(),Ee,Se],k=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],D=()=>[Ee,Se,f],B=()=>[us,"full","auto",...D()],Q=()=>[ao,"none","subgrid",Ee,Se],F=()=>["auto",{span:["full",ao,Ee,Se]},ao,Ee,Se],G=()=>[ao,"auto",Ee,Se],te=()=>["auto","min","max","fr",Ee,Se],ce=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],he=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...D()],q=()=>[us,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],H=()=>[e,Ee,Se],X=()=>[...j(),xN,bN,{position:[Ee,Se]}],ge=()=>["no-repeat",{repeat:["","x","y","space","round"]}],L=()=>["auto","cover","contain",Fq,Uq,{size:[Ee,Se]}],z=()=>[My,ou,Fo],P=()=>["","none","full",h,Ee,Se],W=()=>["",ze,ou,Fo],ne=()=>["solid","dashed","dotted","double"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>[ze,My,xN,bN],pe=()=>["","none",S,Ee,Se],V=()=>["none",ze,Ee,Se],me=()=>["none",ze,Ee,Se],ye=()=>[ze,Ee,Se],ie=()=>[us,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ja],breakpoint:[Ja],color:[Iq],container:[Ja],"drop-shadow":[Ja],ease:["in","out","in-out"],font:[Bq],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ja],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ja],shadow:[Ja],spacing:["px",ze],text:[Ja],"text-shadow":[Ja],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",us,Se,Ee,C]}],container:["container"],columns:[{columns:[ze,Se,Ee,u]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:T()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{start:B()}],end:[{end:B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[ao,"auto",Ee,Se]}],basis:[{basis:[us,"full","auto",u,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ze,us,"auto","initial","none",Se]}],grow:[{grow:["",ze,Ee,Se]}],shrink:[{shrink:["",ze,Ee,Se]}],order:[{order:[ao,"first","last","none",Ee,Se]}],"grid-cols":[{"grid-cols":Q()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":Q()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...ce(),"normal"]}],"justify-items":[{"justify-items":[...he(),"normal"]}],"justify-self":[{"justify-self":["auto",...he()]}],"align-content":[{content:["normal",...ce()]}],"align-items":[{items:[...he(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...he(),{baseline:["","last"]}]}],"place-content":[{"place-content":ce()}],"place-items":[{"place-items":[...he(),"baseline"]}],"place-self":[{"place-self":["auto",...he()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],w:[{w:[u,"screen",...q()]}],"min-w":[{"min-w":[u,"screen","none",...q()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[s]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh",...q()]}],"font-size":[{text:["base",n,ou,Fo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Ee,Ry]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",My,Se]}],"font-family":[{font:[qq,Se,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Ee,Se]}],"line-clamp":[{"line-clamp":[ze,"none",Ee,Ry]}],leading:[{leading:[l,...D()]}],"list-image":[{"list-image":["none",Ee,Se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ee,Se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[ze,"from-font","auto",Ee,Fo]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[ze,"auto",Ee,Se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ee,Se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ee,Se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:X()}],"bg-repeat":[{bg:ge()}],"bg-size":[{bg:L()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ao,Ee,Se],radial:["",Ee,Se],conic:[ao,Ee,Se]},Kq,Hq]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:z()}],"gradient-via-pos":[{via:z()}],"gradient-to-pos":[{to:z()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ne(),"hidden","none"]}],"divide-style":[{divide:[...ne(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ze,Ee,Se]}],"outline-w":[{outline:["",ze,ou,Fo]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",p,Qd,Xd]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",m,Qd,Xd]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[ze,Fo]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",b,Qd,Xd]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[ze,Ee,Se]}],"mix-blend":[{"mix-blend":[...se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ze]}],"mask-image-linear-from-pos":[{"mask-linear-from":Y()}],"mask-image-linear-to-pos":[{"mask-linear-to":Y()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":Y()}],"mask-image-t-to-pos":[{"mask-t-to":Y()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":Y()}],"mask-image-r-to-pos":[{"mask-r-to":Y()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":Y()}],"mask-image-b-to-pos":[{"mask-b-to":Y()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":Y()}],"mask-image-l-to-pos":[{"mask-l-to":Y()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":Y()}],"mask-image-x-to-pos":[{"mask-x-to":Y()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":Y()}],"mask-image-y-to-pos":[{"mask-y-to":Y()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[Ee,Se]}],"mask-image-radial-from-pos":[{"mask-radial-from":Y()}],"mask-image-radial-to-pos":[{"mask-radial-to":Y()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":j()}],"mask-image-conic-pos":[{"mask-conic":[ze]}],"mask-image-conic-from-pos":[{"mask-conic-from":Y()}],"mask-image-conic-to-pos":[{"mask-conic-to":Y()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:X()}],"mask-repeat":[{mask:ge()}],"mask-size":[{mask:L()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ee,Se]}],filter:[{filter:["","none",Ee,Se]}],blur:[{blur:pe()}],brightness:[{brightness:[ze,Ee,Se]}],contrast:[{contrast:[ze,Ee,Se]}],"drop-shadow":[{"drop-shadow":["","none",x,Qd,Xd]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",ze,Ee,Se]}],"hue-rotate":[{"hue-rotate":[ze,Ee,Se]}],invert:[{invert:["",ze,Ee,Se]}],saturate:[{saturate:[ze,Ee,Se]}],sepia:[{sepia:["",ze,Ee,Se]}],"backdrop-filter":[{"backdrop-filter":["","none",Ee,Se]}],"backdrop-blur":[{"backdrop-blur":pe()}],"backdrop-brightness":[{"backdrop-brightness":[ze,Ee,Se]}],"backdrop-contrast":[{"backdrop-contrast":[ze,Ee,Se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ze,Ee,Se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ze,Ee,Se]}],"backdrop-invert":[{"backdrop-invert":["",ze,Ee,Se]}],"backdrop-opacity":[{"backdrop-opacity":[ze,Ee,Se]}],"backdrop-saturate":[{"backdrop-saturate":[ze,Ee,Se]}],"backdrop-sepia":[{"backdrop-sepia":["",ze,Ee,Se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ee,Se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ze,"initial",Ee,Se]}],ease:[{ease:["linear","initial",A,Ee,Se]}],delay:[{delay:[ze,Ee,Se]}],animate:[{animate:["none",_,Ee,Se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,Ee,Se]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:V()}],"rotate-x":[{"rotate-x":V()}],"rotate-y":[{"rotate-y":V()}],"rotate-z":[{"rotate-z":V()}],scale:[{scale:me()}],"scale-x":[{"scale-x":me()}],"scale-y":[{"scale-y":me()}],"scale-z":[{"scale-z":me()}],"scale-3d":["scale-3d"],skew:[{skew:ye()}],"skew-x":[{"skew-x":ye()}],"skew-y":[{"skew-y":ye()}],transform:[{transform:[Ee,Se,"","none","gpu","cpu"]}],"transform-origin":[{origin:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ie()}],"translate-x":[{"translate-x":ie()}],"translate-y":[{"translate-y":ie()}],"translate-z":[{"translate-z":ie()}],"translate-none":["translate-none"],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ee,Se]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ee,Se]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[ze,ou,Fo,Ry]}],stroke:[{stroke:["none",...H()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Wq=_q(Yq);function fe(...e){return Wq(ht(e))}function wN({className:e,...t}){return g.jsx("div",{className:fe("animate-pulse rounded-md bg-primary/10",e),...t})}const Zp=Ys("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),xt=v.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},l)=>{const s=r?Gs:"button";return g.jsx(s,{className:fe(Zp({variant:t,size:n,className:e})),ref:l,...i})});xt.displayName="Button";const pr=v.forwardRef(({className:e,type:t,...n},r)=>g.jsx("input",{type:t,className:fe("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm cursor-text transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:cursor-pointer placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));pr.displayName="Input";var Xq=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Qq=Xq.reduce((e,t)=>{const n=Vs(`Primitive.${t}`),r=v.forwardRef((i,l)=>{const{asChild:s,...u}=i,f=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(f,{...u,ref:l})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Zq="Separator",SN="horizontal",Jq=["horizontal","vertical"],JM=v.forwardRef((e,t)=>{const{decorative:n,orientation:r=SN,...i}=e,l=e9(r)?r:SN,u=n?{role:"none"}:{"aria-orientation":l==="vertical"?l:void 0,role:"separator"};return g.jsx(Qq.div,{"data-orientation":l,...u,...i,ref:t})});JM.displayName=Zq;function e9(e){return Jq.includes(e)}var eR=JM;const _u=v.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},i)=>g.jsx(eR,{ref:i,decorative:n,orientation:t,className:fe("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));_u.displayName=eR.displayName;function be(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function t9(e,t){const n=v.createContext(t),r=l=>{const{children:s,...u}=l,f=v.useMemo(()=>u,Object.values(u));return g.jsx(n.Provider,{value:f,children:s})};r.displayName=e+"Provider";function i(l){const s=v.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[r,i]}function Kr(e,t=[]){let n=[];function r(l,s){const u=v.createContext(s),f=n.length;n=[...n,s];const h=m=>{const{scope:b,children:x,...S}=m,E=b?.[e]?.[f]||u,C=v.useMemo(()=>S,Object.values(S));return g.jsx(E.Provider,{value:C,children:x})};h.displayName=l+"Provider";function p(m,b){const x=b?.[e]?.[f]||u,S=v.useContext(x);if(S)return S;if(s!==void 0)return s;throw new Error(`\`${m}\` must be used within \`${l}\``)}return[h,p]}const i=()=>{const l=n.map(s=>v.createContext(s));return function(u){const f=u?.[e]||l;return v.useMemo(()=>({[`__scope${e}`]:{...u,[e]:f}}),[u,f])}};return i.scopeName=e,[r,n9(i,...t)]}function n9(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(l){const s=r.reduce((u,{useScope:f,scopeName:h})=>{const m=f(l)[`__scope${h}`];return{...u,...m}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var Wt=globalThis?.document?v.useLayoutEffect:()=>{},r9=Wp[" useId ".trim().toString()]||(()=>{}),a9=0;function Sn(e){const[t,n]=v.useState(r9());return Wt(()=>{n(r=>r??String(a9++))},[e]),e||(t?`radix-${t}`:"")}var i9=Wp[" useInsertionEffect ".trim().toString()]||Wt;function mi({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,l,s]=o9({defaultProp:t,onChange:n}),u=e!==void 0,f=u?e:i;{const p=v.useRef(e!==void 0);v.useEffect(()=>{const m=p.current;m!==u&&console.warn(`${r} is changing from ${m?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=u},[u,r])}const h=v.useCallback(p=>{if(u){const m=l9(p)?p(e):p;m!==e&&s.current?.(m)}else l(p)},[u,e,l,s]);return[f,h]}function o9({defaultProp:e,onChange:t}){const[n,r]=v.useState(e),i=v.useRef(n),l=v.useRef(t);return i9(()=>{l.current=t},[t]),v.useEffect(()=>{i.current!==n&&(l.current?.(n),i.current=n)},[n,i]),[n,r,l]}function l9(e){return typeof e=="function"}function s9(e){const t=c9(e),n=v.forwardRef((r,i)=>{const{children:l,...s}=r,u=v.Children.toArray(l),f=u.find(f9);if(f){const h=f.props.children,p=u.map(m=>m===f?v.Children.count(h)>1?v.Children.only(null):v.isValidElement(h)?h.props.children:null:m);return g.jsx(t,{...s,ref:i,children:v.isValidElement(h)?v.cloneElement(h,void 0,p):null})}return g.jsx(t,{...s,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}function c9(e){const t=v.forwardRef((n,r)=>{const{children:i,...l}=n;if(v.isValidElement(i)){const s=h9(i),u=d9(l,i.props);return i.type!==v.Fragment&&(u.ref=r?Zn(r,s):s),v.cloneElement(i,u)}return v.Children.count(i)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var u9=Symbol("radix.slottable");function f9(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===u9}function d9(e,t){const n={...t};for(const r in t){const i=e[r],l=t[r];/^on[A-Z]/.test(r)?i&&l?n[r]=(...u)=>{const f=l(...u);return i(...u),f}:i&&(n[r]=i):r==="style"?n[r]={...i,...l}:r==="className"&&(n[r]=[i,l].filter(Boolean).join(" "))}return{...e,...n}}function h9(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var p9=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Te=p9.reduce((e,t)=>{const n=s9(`Primitive.${t}`),r=v.forwardRef((i,l)=>{const{asChild:s,...u}=i,f=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(f,{...u,ref:l})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function tR(e,t){e&&yl.flushSync(()=>e.dispatchEvent(t))}function ia(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>t.current?.(...n),[])}function m9(e,t=globalThis?.document){const n=ia(e);v.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var v9="DismissableLayer",zb="dismissableLayer.update",g9="dismissableLayer.pointerDownOutside",y9="dismissableLayer.focusOutside",EN,nR=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qs=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:l,onInteractOutside:s,onDismiss:u,...f}=e,h=v.useContext(nR),[p,m]=v.useState(null),b=p?.ownerDocument??globalThis?.document,[,x]=v.useState({}),S=Ke(t,R=>m(R)),E=Array.from(h.layers),[C]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),A=E.indexOf(C),_=p?E.indexOf(p):-1,N=h.layersWithOutsidePointerEventsDisabled.size>0,j=_>=A,T=w9(R=>{const D=R.target,B=[...h.branches].some(Q=>Q.contains(D));!j||B||(i?.(R),s?.(R),R.defaultPrevented||u?.())},b),k=S9(R=>{const D=R.target;[...h.branches].some(Q=>Q.contains(D))||(l?.(R),s?.(R),R.defaultPrevented||u?.())},b);return m9(R=>{_===h.layers.size-1&&(r?.(R),!R.defaultPrevented&&u&&(R.preventDefault(),u()))},b),v.useEffect(()=>{if(p)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(EN=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(p)),h.layers.add(p),CN(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=EN)}},[p,b,n,h]),v.useEffect(()=>()=>{p&&(h.layers.delete(p),h.layersWithOutsidePointerEventsDisabled.delete(p),CN())},[p,h]),v.useEffect(()=>{const R=()=>x({});return document.addEventListener(zb,R),()=>document.removeEventListener(zb,R)},[]),g.jsx(Te.div,{...f,ref:S,style:{pointerEvents:N?j?"auto":"none":void 0,...e.style},onFocusCapture:be(e.onFocusCapture,k.onFocusCapture),onBlurCapture:be(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:be(e.onPointerDownCapture,T.onPointerDownCapture)})});Qs.displayName=v9;var b9="DismissableLayerBranch",x9=v.forwardRef((e,t)=>{const n=v.useContext(nR),r=v.useRef(null),i=Ke(t,r);return v.useEffect(()=>{const l=r.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),g.jsx(Te.div,{...e,ref:i})});x9.displayName=b9;function w9(e,t=globalThis?.document){const n=ia(e),r=v.useRef(!1),i=v.useRef(()=>{});return v.useEffect(()=>{const l=u=>{if(u.target&&!r.current){let f=function(){rR(g9,n,h,{discrete:!0})};const h={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=f,t.addEventListener("click",i.current,{once:!0})):f()}else t.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",l),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function S9(e,t=globalThis?.document){const n=ia(e),r=v.useRef(!1);return v.useEffect(()=>{const i=l=>{l.target&&!r.current&&rR(y9,n,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function CN(){const e=new CustomEvent(zb);document.dispatchEvent(e)}function rR(e,t,n,{discrete:r}){const i=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?tR(i,l):i.dispatchEvent(l)}var Dy="focusScope.autoFocusOnMount",Py="focusScope.autoFocusOnUnmount",AN={bubbles:!1,cancelable:!0},E9="FocusScope",Jp=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:l,...s}=e,[u,f]=v.useState(null),h=ia(i),p=ia(l),m=v.useRef(null),b=Ke(t,E=>f(E)),x=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let E=function(N){if(x.paused||!u)return;const j=N.target;u.contains(j)?m.current=j:io(m.current,{select:!0})},C=function(N){if(x.paused||!u)return;const j=N.relatedTarget;j!==null&&(u.contains(j)||io(m.current,{select:!0}))},A=function(N){if(document.activeElement===document.body)for(const T of N)T.removedNodes.length>0&&io(u)};document.addEventListener("focusin",E),document.addEventListener("focusout",C);const _=new MutationObserver(A);return u&&_.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",E),document.removeEventListener("focusout",C),_.disconnect()}}},[r,u,x.paused]),v.useEffect(()=>{if(u){NN.add(x);const E=document.activeElement;if(!u.contains(E)){const A=new CustomEvent(Dy,AN);u.addEventListener(Dy,h),u.dispatchEvent(A),A.defaultPrevented||(C9(j9(aR(u)),{select:!0}),document.activeElement===E&&io(u))}return()=>{u.removeEventListener(Dy,h),setTimeout(()=>{const A=new CustomEvent(Py,AN);u.addEventListener(Py,p),u.dispatchEvent(A),A.defaultPrevented||io(E??document.body,{select:!0}),u.removeEventListener(Py,p),NN.remove(x)},0)}}},[u,h,p,x]);const S=v.useCallback(E=>{if(!n&&!r||x.paused)return;const C=E.key==="Tab"&&!E.altKey&&!E.ctrlKey&&!E.metaKey,A=document.activeElement;if(C&&A){const _=E.currentTarget,[N,j]=A9(_);N&&j?!E.shiftKey&&A===j?(E.preventDefault(),n&&io(N,{select:!0})):E.shiftKey&&A===N&&(E.preventDefault(),n&&io(j,{select:!0})):A===_&&E.preventDefault()}},[n,r,x.paused]);return g.jsx(Te.div,{tabIndex:-1,...s,ref:b,onKeyDown:S})});Jp.displayName=E9;function C9(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(io(r,{select:t}),document.activeElement!==n)return}function A9(e){const t=aR(e),n=ON(t,e),r=ON(t.reverse(),e);return[n,r]}function aR(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ON(e,t){for(const n of e)if(!O9(n,{upTo:t}))return n}function O9(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function N9(e){return e instanceof HTMLInputElement&&"select"in e}function io(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&N9(e)&&t&&e.select()}}var NN=_9();function _9(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=_N(e,t),e.unshift(t)},remove(t){e=_N(e,t),e[0]?.resume()}}}function _N(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function j9(e){return e.filter(t=>t.tagName!=="A")}var T9="Portal",Zs=v.forwardRef((e,t)=>{const{container:n,...r}=e,[i,l]=v.useState(!1);Wt(()=>l(!0),[]);const s=n||i&&globalThis?.document?.body;return s?RM.createPortal(g.jsx(Te.div,{...r,ref:t}),s):null});Zs.displayName=T9;function M9(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var Jn=e=>{const{present:t,children:n}=e,r=R9(t),i=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),l=Ke(r.ref,D9(i));return typeof n=="function"||r.isPresent?v.cloneElement(i,{ref:l}):null};Jn.displayName="Presence";function R9(e){const[t,n]=v.useState(),r=v.useRef(null),i=v.useRef(e),l=v.useRef("none"),s=e?"mounted":"unmounted",[u,f]=M9(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const h=Zd(r.current);l.current=u==="mounted"?h:"none"},[u]),Wt(()=>{const h=r.current,p=i.current;if(p!==e){const b=l.current,x=Zd(h);e?f("MOUNT"):x==="none"||h?.display==="none"?f("UNMOUNT"):f(p&&b!==x?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,f]),Wt(()=>{if(t){let h;const p=t.ownerDocument.defaultView??window,m=x=>{const E=Zd(r.current).includes(CSS.escape(x.animationName));if(x.target===t&&E&&(f("ANIMATION_END"),!i.current)){const C=t.style.animationFillMode;t.style.animationFillMode="forwards",h=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=C)})}},b=x=>{x.target===t&&(l.current=Zd(r.current))};return t.addEventListener("animationstart",b),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{p.clearTimeout(h),t.removeEventListener("animationstart",b),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:v.useCallback(h=>{r.current=h?getComputedStyle(h):null,n(h)},[])}}function Zd(e){return e?.animationName||"none"}function D9(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ky=0;function Cw(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??jN()),document.body.insertAdjacentElement("beforeend",e[1]??jN()),ky++,()=>{ky===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ky--}},[])}function jN(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ba=function(){return ba=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},ba.apply(this,arguments)};function iR(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function P9(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,l;r<i;r++)(l||!(r in t))&&(l||(l=Array.prototype.slice.call(t,0,r)),l[r]=t[r]);return e.concat(l||Array.prototype.slice.call(t))}var Oh="right-scroll-bar-position",Nh="width-before-scroll-bar",k9="with-scroll-bars-hidden",I9="--removed-body-scroll-bar-size";function Iy(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function L9(e,t){var n=v.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var z9=typeof window<"u"?v.useLayoutEffect:v.useEffect,TN=new WeakMap;function $9(e,t){var n=L9(null,function(r){return e.forEach(function(i){return Iy(i,r)})});return z9(function(){var r=TN.get(n);if(r){var i=new Set(r),l=new Set(e),s=n.current;i.forEach(function(u){l.has(u)||Iy(u,null)}),l.forEach(function(u){i.has(u)||Iy(u,s)})}TN.set(n,e)},[e]),n}function B9(e){return e}function U9(e,t){t===void 0&&(t=B9);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(l){var s=t(l,r);return n.push(s),function(){n=n.filter(function(u){return u!==s})}},assignSyncMedium:function(l){for(r=!0;n.length;){var s=n;n=[],s.forEach(l)}n={push:function(u){return l(u)},filter:function(){return n}}},assignMedium:function(l){r=!0;var s=[];if(n.length){var u=n;n=[],u.forEach(l),s=n}var f=function(){var p=s;s=[],p.forEach(l)},h=function(){return Promise.resolve().then(f)};h(),n={push:function(p){s.push(p),h()},filter:function(p){return s=s.filter(p),n}}}};return i}function H9(e){e===void 0&&(e={});var t=U9(null);return t.options=ba({async:!0,ssr:!1},e),t}var oR=function(e){var t=e.sideCar,n=iR(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,ba({},n))};oR.isSideCarExport=!0;function q9(e,t){return e.useMedium(t),oR}var lR=H9(),Ly=function(){},em=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:Ly,onWheelCapture:Ly,onTouchMoveCapture:Ly}),i=r[0],l=r[1],s=e.forwardProps,u=e.children,f=e.className,h=e.removeScrollBar,p=e.enabled,m=e.shards,b=e.sideCar,x=e.noRelative,S=e.noIsolation,E=e.inert,C=e.allowPinchZoom,A=e.as,_=A===void 0?"div":A,N=e.gapMode,j=iR(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=b,k=$9([n,t]),R=ba(ba({},j),i);return v.createElement(v.Fragment,null,p&&v.createElement(T,{sideCar:lR,removeScrollBar:h,shards:m,noRelative:x,noIsolation:S,inert:E,setCallbacks:l,allowPinchZoom:!!C,lockRef:n,gapMode:N}),s?v.cloneElement(v.Children.only(u),ba(ba({},R),{ref:k})):v.createElement(_,ba({},R,{className:f,ref:k}),u))});em.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};em.classNames={fullWidth:Nh,zeroRight:Oh};var F9=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function K9(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=F9();return t&&e.setAttribute("nonce",t),e}function V9(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function G9(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Y9=function(){var e=0,t=null;return{add:function(n){e==0&&(t=K9())&&(V9(t,n),G9(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},W9=function(){var e=Y9();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},sR=function(){var e=W9(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},X9={left:0,top:0,right:0,gap:0},zy=function(e){return parseInt(e||"",10)||0},Q9=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[zy(n),zy(r),zy(i)]},Z9=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return X9;var t=Q9(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},J9=sR(),Cs="data-scroll-locked",e7=function(e,t,n,r){var i=e.left,l=e.top,s=e.right,u=e.gap;return n===void 0&&(n="margin"),`
12
- .`.concat(k9,` {
13
- overflow: hidden `).concat(r,`;
14
- padding-right: `).concat(u,"px ").concat(r,`;
15
- }
16
- body[`).concat(Cs,`] {
17
- overflow: hidden `).concat(r,`;
18
- overscroll-behavior: contain;
19
- `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
20
- padding-left: `.concat(i,`px;
21
- padding-top: `).concat(l,`px;
22
- padding-right: `).concat(s,`px;
23
- margin-left:0;
24
- margin-top:0;
25
- margin-right: `).concat(u,"px ").concat(r,`;
26
- `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
27
- }
28
-
29
- .`).concat(Oh,` {
30
- right: `).concat(u,"px ").concat(r,`;
31
- }
32
-
33
- .`).concat(Nh,` {
34
- margin-right: `).concat(u,"px ").concat(r,`;
35
- }
36
-
37
- .`).concat(Oh," .").concat(Oh,` {
38
- right: 0 `).concat(r,`;
39
- }
40
-
41
- .`).concat(Nh," .").concat(Nh,` {
42
- margin-right: 0 `).concat(r,`;
43
- }
44
-
45
- body[`).concat(Cs,`] {
46
- `).concat(I9,": ").concat(u,`px;
47
- }
48
- `)},MN=function(){var e=parseInt(document.body.getAttribute(Cs)||"0",10);return isFinite(e)?e:0},t7=function(){v.useEffect(function(){return document.body.setAttribute(Cs,(MN()+1).toString()),function(){var e=MN()-1;e<=0?document.body.removeAttribute(Cs):document.body.setAttribute(Cs,e.toString())}},[])},n7=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;t7();var l=v.useMemo(function(){return Z9(i)},[i]);return v.createElement(J9,{styles:e7(l,!t,i,n?"":"!important")})},$b=!1;if(typeof window<"u")try{var Jd=Object.defineProperty({},"passive",{get:function(){return $b=!0,!0}});window.addEventListener("test",Jd,Jd),window.removeEventListener("test",Jd,Jd)}catch{$b=!1}var fs=$b?{passive:!1}:!1,r7=function(e){return e.tagName==="TEXTAREA"},cR=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!r7(e)&&n[t]==="visible")},a7=function(e){return cR(e,"overflowY")},i7=function(e){return cR(e,"overflowX")},RN=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=uR(e,r);if(i){var l=fR(e,r),s=l[1],u=l[2];if(s>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},o7=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},l7=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},uR=function(e,t){return e==="v"?a7(t):i7(t)},fR=function(e,t){return e==="v"?o7(t):l7(t)},s7=function(e,t){return e==="h"&&t==="rtl"?-1:1},c7=function(e,t,n,r,i){var l=s7(e,window.getComputedStyle(t).direction),s=l*r,u=n.target,f=t.contains(u),h=!1,p=s>0,m=0,b=0;do{if(!u)break;var x=fR(e,u),S=x[0],E=x[1],C=x[2],A=E-C-l*S;(S||A)&&uR(e,u)&&(m+=A,b+=S);var _=u.parentNode;u=_&&_.nodeType===Node.DOCUMENT_FRAGMENT_NODE?_.host:_}while(!f&&u!==document.body||f&&(t.contains(u)||t===u));return(p&&Math.abs(m)<1||!p&&Math.abs(b)<1)&&(h=!0),h},eh=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},DN=function(e){return[e.deltaX,e.deltaY]},PN=function(e){return e&&"current"in e?e.current:e},u7=function(e,t){return e[0]===t[0]&&e[1]===t[1]},f7=function(e){return`
49
- .block-interactivity-`.concat(e,` {pointer-events: none;}
50
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
51
- `)},d7=0,ds=[];function h7(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(d7++)[0],l=v.useState(sR)[0],s=v.useRef(e);v.useEffect(function(){s.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var E=P9([e.lockRef.current],(e.shards||[]).map(PN),!0).filter(Boolean);return E.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),E.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=v.useCallback(function(E,C){if("touches"in E&&E.touches.length===2||E.type==="wheel"&&E.ctrlKey)return!s.current.allowPinchZoom;var A=eh(E),_=n.current,N="deltaX"in E?E.deltaX:_[0]-A[0],j="deltaY"in E?E.deltaY:_[1]-A[1],T,k=E.target,R=Math.abs(N)>Math.abs(j)?"h":"v";if("touches"in E&&R==="h"&&k.type==="range")return!1;var D=window.getSelection(),B=D&&D.anchorNode,Q=B?B===k||B.contains(k):!1;if(Q)return!1;var F=RN(R,k);if(!F)return!0;if(F?T=R:(T=R==="v"?"h":"v",F=RN(R,k)),!F)return!1;if(!r.current&&"changedTouches"in E&&(N||j)&&(r.current=T),!T)return!0;var G=r.current||T;return c7(G,C,E,G==="h"?N:j)},[]),f=v.useCallback(function(E){var C=E;if(!(!ds.length||ds[ds.length-1]!==l)){var A="deltaY"in C?DN(C):eh(C),_=t.current.filter(function(T){return T.name===C.type&&(T.target===C.target||C.target===T.shadowParent)&&u7(T.delta,A)})[0];if(_&&_.should){C.cancelable&&C.preventDefault();return}if(!_){var N=(s.current.shards||[]).map(PN).filter(Boolean).filter(function(T){return T.contains(C.target)}),j=N.length>0?u(C,N[0]):!s.current.noIsolation;j&&C.cancelable&&C.preventDefault()}}},[]),h=v.useCallback(function(E,C,A,_){var N={name:E,delta:C,target:A,should:_,shadowParent:p7(A)};t.current.push(N),setTimeout(function(){t.current=t.current.filter(function(j){return j!==N})},1)},[]),p=v.useCallback(function(E){n.current=eh(E),r.current=void 0},[]),m=v.useCallback(function(E){h(E.type,DN(E),E.target,u(E,e.lockRef.current))},[]),b=v.useCallback(function(E){h(E.type,eh(E),E.target,u(E,e.lockRef.current))},[]);v.useEffect(function(){return ds.push(l),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:b}),document.addEventListener("wheel",f,fs),document.addEventListener("touchmove",f,fs),document.addEventListener("touchstart",p,fs),function(){ds=ds.filter(function(E){return E!==l}),document.removeEventListener("wheel",f,fs),document.removeEventListener("touchmove",f,fs),document.removeEventListener("touchstart",p,fs)}},[]);var x=e.removeScrollBar,S=e.inert;return v.createElement(v.Fragment,null,S?v.createElement(l,{styles:f7(i)}):null,x?v.createElement(n7,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function p7(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const m7=q9(lR,h7);var tm=v.forwardRef(function(e,t){return v.createElement(em,ba({},e,{ref:t,sideCar:m7}))});tm.classNames=em.classNames;var v7=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},hs=new WeakMap,th=new WeakMap,nh={},$y=0,dR=function(e){return e&&(e.host||dR(e.parentNode))},g7=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=dR(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},y7=function(e,t,n,r){var i=g7(t,Array.isArray(e)?e:[e]);nh[n]||(nh[n]=new WeakMap);var l=nh[n],s=[],u=new Set,f=new Set(i),h=function(m){!m||u.has(m)||(u.add(m),h(m.parentNode))};i.forEach(h);var p=function(m){!m||f.has(m)||Array.prototype.forEach.call(m.children,function(b){if(u.has(b))p(b);else try{var x=b.getAttribute(r),S=x!==null&&x!=="false",E=(hs.get(b)||0)+1,C=(l.get(b)||0)+1;hs.set(b,E),l.set(b,C),s.push(b),E===1&&S&&th.set(b,!0),C===1&&b.setAttribute(n,"true"),S||b.setAttribute(r,"true")}catch(A){console.error("aria-hidden: cannot operate on ",b,A)}})};return p(t),u.clear(),$y++,function(){s.forEach(function(m){var b=hs.get(m)-1,x=l.get(m)-1;hs.set(m,b),l.set(m,x),b||(th.has(m)||m.removeAttribute(r),th.delete(m)),x||m.removeAttribute(n)}),$y--,$y||(hs=new WeakMap,hs=new WeakMap,th=new WeakMap,nh={})}},Aw=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=v7(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),y7(r,i,n,"aria-hidden")):function(){return null}};function b7(e){const t=x7(e),n=v.forwardRef((r,i)=>{const{children:l,...s}=r,u=v.Children.toArray(l),f=u.find(S7);if(f){const h=f.props.children,p=u.map(m=>m===f?v.Children.count(h)>1?v.Children.only(null):v.isValidElement(h)?h.props.children:null:m);return g.jsx(t,{...s,ref:i,children:v.isValidElement(h)?v.cloneElement(h,void 0,p):null})}return g.jsx(t,{...s,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}function x7(e){const t=v.forwardRef((n,r)=>{const{children:i,...l}=n;if(v.isValidElement(i)){const s=C7(i),u=E7(l,i.props);return i.type!==v.Fragment&&(u.ref=r?Zn(r,s):s),v.cloneElement(i,u)}return v.Children.count(i)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var w7=Symbol("radix.slottable");function S7(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===w7}function E7(e,t){const n={...t};for(const r in t){const i=e[r],l=t[r];/^on[A-Z]/.test(r)?i&&l?n[r]=(...u)=>{const f=l(...u);return i(...u),f}:i&&(n[r]=i):r==="style"?n[r]={...i,...l}:r==="className"&&(n[r]=[i,l].filter(Boolean).join(" "))}return{...e,...n}}function C7(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var nm="Dialog",[hR,pR]=Kr(nm),[A7,fa]=hR(nm),mR=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:l,modal:s=!0}=e,u=v.useRef(null),f=v.useRef(null),[h,p]=mi({prop:r,defaultProp:i??!1,onChange:l,caller:nm});return g.jsx(A7,{scope:t,triggerRef:u,contentRef:f,contentId:Sn(),titleId:Sn(),descriptionId:Sn(),open:h,onOpenChange:p,onOpenToggle:v.useCallback(()=>p(m=>!m),[p]),modal:s,children:n})};mR.displayName=nm;var vR="DialogTrigger",gR=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fa(vR,n),l=Ke(t,i.triggerRef);return g.jsx(Te.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":_w(i.open),...r,ref:l,onClick:be(e.onClick,i.onOpenToggle)})});gR.displayName=vR;var Ow="DialogPortal",[O7,yR]=hR(Ow,{forceMount:void 0}),bR=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,l=fa(Ow,t);return g.jsx(O7,{scope:t,forceMount:n,children:v.Children.map(r,s=>g.jsx(Jn,{present:n||l.open,children:g.jsx(Zs,{asChild:!0,container:i,children:s})}))})};bR.displayName=Ow;var Uh="DialogOverlay",xR=v.forwardRef((e,t)=>{const n=yR(Uh,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,l=fa(Uh,e.__scopeDialog);return l.modal?g.jsx(Jn,{present:r||l.open,children:g.jsx(_7,{...i,ref:t})}):null});xR.displayName=Uh;var N7=b7("DialogOverlay.RemoveScroll"),_7=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fa(Uh,n);return g.jsx(tm,{as:N7,allowPinchZoom:!0,shards:[i.contentRef],children:g.jsx(Te.div,{"data-state":_w(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ll="DialogContent",wR=v.forwardRef((e,t)=>{const n=yR(ll,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,l=fa(ll,e.__scopeDialog);return g.jsx(Jn,{present:r||l.open,children:l.modal?g.jsx(j7,{...i,ref:t}):g.jsx(T7,{...i,ref:t})})});wR.displayName=ll;var j7=v.forwardRef((e,t)=>{const n=fa(ll,e.__scopeDialog),r=v.useRef(null),i=Ke(t,n.contentRef,r);return v.useEffect(()=>{const l=r.current;if(l)return Aw(l)},[]),g.jsx(SR,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:be(e.onCloseAutoFocus,l=>{l.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:be(e.onPointerDownOutside,l=>{const s=l.detail.originalEvent,u=s.button===0&&s.ctrlKey===!0;(s.button===2||u)&&l.preventDefault()}),onFocusOutside:be(e.onFocusOutside,l=>l.preventDefault())})}),T7=v.forwardRef((e,t)=>{const n=fa(ll,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return g.jsx(SR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{e.onCloseAutoFocus?.(l),l.defaultPrevented||(r.current||n.triggerRef.current?.focus(),l.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:l=>{e.onInteractOutside?.(l),l.defaultPrevented||(r.current=!0,l.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=l.target;n.triggerRef.current?.contains(s)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&i.current&&l.preventDefault()}})}),SR=v.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:l,...s}=e,u=fa(ll,n),f=v.useRef(null),h=Ke(t,f);return Cw(),g.jsxs(g.Fragment,{children:[g.jsx(Jp,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:l,children:g.jsx(Qs,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":_w(u.open),...s,ref:h,onDismiss:()=>u.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(R7,{titleId:u.titleId}),g.jsx(P7,{contentRef:f,descriptionId:u.descriptionId})]})]})}),Nw="DialogTitle",ER=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fa(Nw,n);return g.jsx(Te.h2,{id:i.titleId,...r,ref:t})});ER.displayName=Nw;var CR="DialogDescription",AR=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fa(CR,n);return g.jsx(Te.p,{id:i.descriptionId,...r,ref:t})});AR.displayName=CR;var OR="DialogClose",NR=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=fa(OR,n);return g.jsx(Te.button,{type:"button",...r,ref:t,onClick:be(e.onClick,()=>i.onOpenChange(!1))})});NR.displayName=OR;function _w(e){return e?"open":"closed"}var _R="DialogTitleWarning",[M7,jR]=t9(_R,{contentName:ll,titleName:Nw,docsSlug:"dialog"}),R7=({titleId:e})=>{const t=jR(_R),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
52
-
53
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
54
-
55
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},D7="DialogDescriptionWarning",P7=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${jR(D7).contentName}}.`;return v.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},nf=mR,k7=gR,rf=bR,bl=xR,xl=wR,Js=ER,ec=AR,rm=NR;const I7=nf,L7=rf,TR=v.forwardRef(({className:e,...t},n)=>g.jsx(bl,{className:fe("fixed inset-0 z-50 sheet-overlay-enhanced",e),...t,ref:n}));TR.displayName=bl.displayName;const z7=Ys("fixed z-50 gap-4 bg-background p-6",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top data-[state=closed]:duration-200 data-[state=open]:duration-300",bottom:"inset-x-0 bottom-0 border-t data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom data-[state=closed]:duration-200 data-[state=open]:duration-300",left:"inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm sheet-content-enhanced-left sheet-shadow-enhanced",right:"inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm sheet-content-enhanced-right sheet-shadow-enhanced"}},defaultVariants:{side:"right"}}),MR=v.forwardRef(({side:e="right",className:t,children:n,...r},i)=>g.jsxs(L7,{children:[g.jsx(TR,{}),g.jsxs(xl,{ref:i,className:fe(z7({side:e}),t),...r,children:[g.jsxs(rm,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-all duration-200 cursor-pointer hover:opacity-100 hover:scale-110 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:cursor-not-allowed data-[state=open]:bg-secondary",children:[g.jsx(BM,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]}),n]})]}));MR.displayName=xl.displayName;const RR=({className:e,...t})=>g.jsx("div",{className:fe("flex flex-col space-y-2 text-center sm:text-left",e),...t});RR.displayName="SheetHeader";const DR=v.forwardRef(({className:e,...t},n)=>g.jsx(Js,{ref:n,className:fe("text-lg font-semibold text-foreground",e),...t}));DR.displayName=Js.displayName;const PR=v.forwardRef(({className:e,...t},n)=>g.jsx(ec,{ref:n,className:fe("text-sm text-muted-foreground",e),...t}));PR.displayName=ec.displayName;const $7=["top","right","bottom","left"],mo=Math.min,hr=Math.max,Hh=Math.round,rh=Math.floor,Ca=e=>({x:e,y:e}),B7={left:"right",right:"left",bottom:"top",top:"bottom"},U7={start:"end",end:"start"};function Bb(e,t,n){return hr(e,mo(t,n))}function vi(e,t){return typeof e=="function"?e(t):e}function gi(e){return e.split("-")[0]}function tc(e){return e.split("-")[1]}function jw(e){return e==="x"?"y":"x"}function Tw(e){return e==="y"?"height":"width"}const H7=new Set(["top","bottom"]);function Sa(e){return H7.has(gi(e))?"y":"x"}function Mw(e){return jw(Sa(e))}function q7(e,t,n){n===void 0&&(n=!1);const r=tc(e),i=Mw(e),l=Tw(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(s=qh(s)),[s,qh(s)]}function F7(e){const t=qh(e);return[Ub(e),t,Ub(t)]}function Ub(e){return e.replace(/start|end/g,t=>U7[t])}const kN=["left","right"],IN=["right","left"],K7=["top","bottom"],V7=["bottom","top"];function G7(e,t,n){switch(e){case"top":case"bottom":return n?t?IN:kN:t?kN:IN;case"left":case"right":return t?K7:V7;default:return[]}}function Y7(e,t,n,r){const i=tc(e);let l=G7(gi(e),n==="start",r);return i&&(l=l.map(s=>s+"-"+i),t&&(l=l.concat(l.map(Ub)))),l}function qh(e){return e.replace(/left|right|bottom|top/g,t=>B7[t])}function W7(e){return{top:0,right:0,bottom:0,left:0,...e}}function kR(e){return typeof e!="number"?W7(e):{top:e,right:e,bottom:e,left:e}}function Fh(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function LN(e,t,n){let{reference:r,floating:i}=e;const l=Sa(t),s=Mw(t),u=Tw(s),f=gi(t),h=l==="y",p=r.x+r.width/2-i.width/2,m=r.y+r.height/2-i.height/2,b=r[u]/2-i[u]/2;let x;switch(f){case"top":x={x:p,y:r.y-i.height};break;case"bottom":x={x:p,y:r.y+r.height};break;case"right":x={x:r.x+r.width,y:m};break;case"left":x={x:r.x-i.width,y:m};break;default:x={x:r.x,y:r.y}}switch(tc(t)){case"start":x[s]-=b*(n&&h?-1:1);break;case"end":x[s]+=b*(n&&h?-1:1);break}return x}const X7=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:l=[],platform:s}=n,u=l.filter(Boolean),f=await(s.isRTL==null?void 0:s.isRTL(t));let h=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:p,y:m}=LN(h,r,f),b=r,x={},S=0;for(let E=0;E<u.length;E++){const{name:C,fn:A}=u[E],{x:_,y:N,data:j,reset:T}=await A({x:p,y:m,initialPlacement:r,placement:b,strategy:i,middlewareData:x,rects:h,platform:s,elements:{reference:e,floating:t}});p=_??p,m=N??m,x={...x,[C]:{...x[C],...j}},T&&S<=50&&(S++,typeof T=="object"&&(T.placement&&(b=T.placement),T.rects&&(h=T.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):T.rects),{x:p,y:m}=LN(h,b,f)),E=-1)}return{x:p,y:m,placement:b,strategy:i,middlewareData:x}};async function ju(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:l,rects:s,elements:u,strategy:f}=e,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:b=!1,padding:x=0}=vi(t,e),S=kR(x),C=u[b?m==="floating"?"reference":"floating":m],A=Fh(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(C)))==null||n?C:C.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(u.floating)),boundary:h,rootBoundary:p,strategy:f})),_=m==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,N=await(l.getOffsetParent==null?void 0:l.getOffsetParent(u.floating)),j=await(l.isElement==null?void 0:l.isElement(N))?await(l.getScale==null?void 0:l.getScale(N))||{x:1,y:1}:{x:1,y:1},T=Fh(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:_,offsetParent:N,strategy:f}):_);return{top:(A.top-T.top+S.top)/j.y,bottom:(T.bottom-A.bottom+S.bottom)/j.y,left:(A.left-T.left+S.left)/j.x,right:(T.right-A.right+S.right)/j.x}}const Q7=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:l,platform:s,elements:u,middlewareData:f}=t,{element:h,padding:p=0}=vi(e,t)||{};if(h==null)return{};const m=kR(p),b={x:n,y:r},x=Mw(i),S=Tw(x),E=await s.getDimensions(h),C=x==="y",A=C?"top":"left",_=C?"bottom":"right",N=C?"clientHeight":"clientWidth",j=l.reference[S]+l.reference[x]-b[x]-l.floating[S],T=b[x]-l.reference[x],k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(h));let R=k?k[N]:0;(!R||!await(s.isElement==null?void 0:s.isElement(k)))&&(R=u.floating[N]||l.floating[S]);const D=j/2-T/2,B=R/2-E[S]/2-1,Q=mo(m[A],B),F=mo(m[_],B),G=Q,te=R-E[S]-F,ce=R/2-E[S]/2+D,he=Bb(G,ce,te),I=!f.arrow&&tc(i)!=null&&ce!==he&&l.reference[S]/2-(ce<G?Q:F)-E[S]/2<0,q=I?ce<G?ce-G:ce-te:0;return{[x]:b[x]+q,data:{[x]:he,centerOffset:ce-he-q,...I&&{alignmentOffset:q}},reset:I}}}),Z7=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:l,rects:s,initialPlacement:u,platform:f,elements:h}=t,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:b,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:E=!0,...C}=vi(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const A=gi(i),_=Sa(u),N=gi(u)===u,j=await(f.isRTL==null?void 0:f.isRTL(h.floating)),T=b||(N||!E?[qh(u)]:F7(u)),k=S!=="none";!b&&k&&T.push(...Y7(u,E,S,j));const R=[u,...T],D=await ju(t,C),B=[];let Q=((r=l.flip)==null?void 0:r.overflows)||[];if(p&&B.push(D[A]),m){const ce=q7(i,s,j);B.push(D[ce[0]],D[ce[1]])}if(Q=[...Q,{placement:i,overflows:B}],!B.every(ce=>ce<=0)){var F,G;const ce=(((F=l.flip)==null?void 0:F.index)||0)+1,he=R[ce];if(he&&(!(m==="alignment"?_!==Sa(he):!1)||Q.every(H=>Sa(H.placement)===_?H.overflows[0]>0:!0)))return{data:{index:ce,overflows:Q},reset:{placement:he}};let I=(G=Q.filter(q=>q.overflows[0]<=0).sort((q,H)=>q.overflows[1]-H.overflows[1])[0])==null?void 0:G.placement;if(!I)switch(x){case"bestFit":{var te;const q=(te=Q.filter(H=>{if(k){const X=Sa(H.placement);return X===_||X==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(X=>X>0).reduce((X,ge)=>X+ge,0)]).sort((H,X)=>H[1]-X[1])[0])==null?void 0:te[0];q&&(I=q);break}case"initialPlacement":I=u;break}if(i!==I)return{reset:{placement:I}}}return{}}}};function zN(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $N(e){return $7.some(t=>e[t]>=0)}const J7=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=vi(e,t);switch(r){case"referenceHidden":{const l=await ju(t,{...i,elementContext:"reference"}),s=zN(l,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:$N(s)}}}case"escaped":{const l=await ju(t,{...i,altBoundary:!0}),s=zN(l,n.floating);return{data:{escapedOffsets:s,escaped:$N(s)}}}default:return{}}}}},IR=new Set(["left","top"]);async function eF(e,t){const{placement:n,platform:r,elements:i}=e,l=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=gi(n),u=tc(n),f=Sa(n)==="y",h=IR.has(s)?-1:1,p=l&&f?-1:1,m=vi(t,e);let{mainAxis:b,crossAxis:x,alignmentAxis:S}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return u&&typeof S=="number"&&(x=u==="end"?S*-1:S),f?{x:x*p,y:b*h}:{x:b*h,y:x*p}}const tF=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:l,placement:s,middlewareData:u}=t,f=await eF(t,e);return s===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+f.x,y:l+f.y,data:{...f,placement:s}}}}},nF=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:l=!0,crossAxis:s=!1,limiter:u={fn:C=>{let{x:A,y:_}=C;return{x:A,y:_}}},...f}=vi(e,t),h={x:n,y:r},p=await ju(t,f),m=Sa(gi(i)),b=jw(m);let x=h[b],S=h[m];if(l){const C=b==="y"?"top":"left",A=b==="y"?"bottom":"right",_=x+p[C],N=x-p[A];x=Bb(_,x,N)}if(s){const C=m==="y"?"top":"left",A=m==="y"?"bottom":"right",_=S+p[C],N=S-p[A];S=Bb(_,S,N)}const E=u.fn({...t,[b]:x,[m]:S});return{...E,data:{x:E.x-n,y:E.y-r,enabled:{[b]:l,[m]:s}}}}}},rF=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:l,middlewareData:s}=t,{offset:u=0,mainAxis:f=!0,crossAxis:h=!0}=vi(e,t),p={x:n,y:r},m=Sa(i),b=jw(m);let x=p[b],S=p[m];const E=vi(u,t),C=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(f){const N=b==="y"?"height":"width",j=l.reference[b]-l.floating[N]+C.mainAxis,T=l.reference[b]+l.reference[N]-C.mainAxis;x<j?x=j:x>T&&(x=T)}if(h){var A,_;const N=b==="y"?"width":"height",j=IR.has(gi(i)),T=l.reference[m]-l.floating[N]+(j&&((A=s.offset)==null?void 0:A[m])||0)+(j?0:C.crossAxis),k=l.reference[m]+l.reference[N]+(j?0:((_=s.offset)==null?void 0:_[m])||0)-(j?C.crossAxis:0);S<T?S=T:S>k&&(S=k)}return{[b]:x,[m]:S}}}},aF=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:l,platform:s,elements:u}=t,{apply:f=()=>{},...h}=vi(e,t),p=await ju(t,h),m=gi(i),b=tc(i),x=Sa(i)==="y",{width:S,height:E}=l.floating;let C,A;m==="top"||m==="bottom"?(C=m,A=b===(await(s.isRTL==null?void 0:s.isRTL(u.floating))?"start":"end")?"left":"right"):(A=m,C=b==="end"?"top":"bottom");const _=E-p.top-p.bottom,N=S-p.left-p.right,j=mo(E-p[C],_),T=mo(S-p[A],N),k=!t.middlewareData.shift;let R=j,D=T;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=N),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=_),k&&!b){const Q=hr(p.left,0),F=hr(p.right,0),G=hr(p.top,0),te=hr(p.bottom,0);x?D=S-2*(Q!==0||F!==0?Q+F:hr(p.left,p.right)):R=E-2*(G!==0||te!==0?G+te:hr(p.top,p.bottom))}await f({...t,availableWidth:D,availableHeight:R});const B=await s.getDimensions(u.floating);return S!==B.width||E!==B.height?{reset:{rects:!0}}:{}}}};function am(){return typeof window<"u"}function nc(e){return LR(e)?(e.nodeName||"").toLowerCase():"#document"}function gr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Pa(e){var t;return(t=(LR(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function LR(e){return am()?e instanceof Node||e instanceof gr(e).Node:!1}function oa(e){return am()?e instanceof Element||e instanceof gr(e).Element:!1}function Oa(e){return am()?e instanceof HTMLElement||e instanceof gr(e).HTMLElement:!1}function BN(e){return!am()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof gr(e).ShadowRoot}const iF=new Set(["inline","contents"]);function af(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=la(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!iF.has(i)}const oF=new Set(["table","td","th"]);function lF(e){return oF.has(nc(e))}const sF=[":popover-open",":modal"];function im(e){return sF.some(t=>{try{return e.matches(t)}catch{return!1}})}const cF=["transform","translate","scale","rotate","perspective"],uF=["transform","translate","scale","rotate","perspective","filter"],fF=["paint","layout","strict","content"];function Rw(e){const t=Dw(),n=oa(e)?la(e):e;return cF.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||uF.some(r=>(n.willChange||"").includes(r))||fF.some(r=>(n.contain||"").includes(r))}function dF(e){let t=vo(e);for(;Oa(t)&&!Ts(t);){if(Rw(t))return t;if(im(t))return null;t=vo(t)}return null}function Dw(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const hF=new Set(["html","body","#document"]);function Ts(e){return hF.has(nc(e))}function la(e){return gr(e).getComputedStyle(e)}function om(e){return oa(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function vo(e){if(nc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||BN(e)&&e.host||Pa(e);return BN(t)?t.host:t}function zR(e){const t=vo(e);return Ts(t)?e.ownerDocument?e.ownerDocument.body:e.body:Oa(t)&&af(t)?t:zR(t)}function Tu(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=zR(e),l=i===((r=e.ownerDocument)==null?void 0:r.body),s=gr(i);if(l){const u=Hb(s);return t.concat(s,s.visualViewport||[],af(i)?i:[],u&&n?Tu(u):[])}return t.concat(i,Tu(i,[],n))}function Hb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $R(e){const t=la(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Oa(e),l=i?e.offsetWidth:n,s=i?e.offsetHeight:r,u=Hh(n)!==l||Hh(r)!==s;return u&&(n=l,r=s),{width:n,height:r,$:u}}function Pw(e){return oa(e)?e:e.contextElement}function As(e){const t=Pw(e);if(!Oa(t))return Ca(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:l}=$R(t);let s=(l?Hh(n.width):n.width)/r,u=(l?Hh(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!u||!Number.isFinite(u))&&(u=1),{x:s,y:u}}const pF=Ca(0);function BR(e){const t=gr(e);return!Dw()||!t.visualViewport?pF:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function mF(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==gr(e)?!1:t}function sl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),l=Pw(e);let s=Ca(1);t&&(r?oa(r)&&(s=As(r)):s=As(e));const u=mF(l,n,r)?BR(l):Ca(0);let f=(i.left+u.x)/s.x,h=(i.top+u.y)/s.y,p=i.width/s.x,m=i.height/s.y;if(l){const b=gr(l),x=r&&oa(r)?gr(r):r;let S=b,E=Hb(S);for(;E&&r&&x!==S;){const C=As(E),A=E.getBoundingClientRect(),_=la(E),N=A.left+(E.clientLeft+parseFloat(_.paddingLeft))*C.x,j=A.top+(E.clientTop+parseFloat(_.paddingTop))*C.y;f*=C.x,h*=C.y,p*=C.x,m*=C.y,f+=N,h+=j,S=gr(E),E=Hb(S)}}return Fh({width:p,height:m,x:f,y:h})}function lm(e,t){const n=om(e).scrollLeft;return t?t.left+n:sl(Pa(e)).left+n}function UR(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-lm(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function vF(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const l=i==="fixed",s=Pa(r),u=t?im(t.floating):!1;if(r===s||u&&l)return n;let f={scrollLeft:0,scrollTop:0},h=Ca(1);const p=Ca(0),m=Oa(r);if((m||!m&&!l)&&((nc(r)!=="body"||af(s))&&(f=om(r)),Oa(r))){const x=sl(r);h=As(r),p.x=x.x+r.clientLeft,p.y=x.y+r.clientTop}const b=s&&!m&&!l?UR(s,f):Ca(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-f.scrollLeft*h.x+p.x+b.x,y:n.y*h.y-f.scrollTop*h.y+p.y+b.y}}function gF(e){return Array.from(e.getClientRects())}function yF(e){const t=Pa(e),n=om(e),r=e.ownerDocument.body,i=hr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),l=hr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+lm(e);const u=-n.scrollTop;return la(r).direction==="rtl"&&(s+=hr(t.clientWidth,r.clientWidth)-i),{width:i,height:l,x:s,y:u}}const UN=25;function bF(e,t){const n=gr(e),r=Pa(e),i=n.visualViewport;let l=r.clientWidth,s=r.clientHeight,u=0,f=0;if(i){l=i.width,s=i.height;const p=Dw();(!p||p&&t==="fixed")&&(u=i.offsetLeft,f=i.offsetTop)}const h=lm(r);if(h<=0){const p=r.ownerDocument,m=p.body,b=getComputedStyle(m),x=p.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,S=Math.abs(r.clientWidth-m.clientWidth-x);S<=UN&&(l-=S)}else h<=UN&&(l+=h);return{width:l,height:s,x:u,y:f}}const xF=new Set(["absolute","fixed"]);function wF(e,t){const n=sl(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,l=Oa(e)?As(e):Ca(1),s=e.clientWidth*l.x,u=e.clientHeight*l.y,f=i*l.x,h=r*l.y;return{width:s,height:u,x:f,y:h}}function HN(e,t,n){let r;if(t==="viewport")r=bF(e,n);else if(t==="document")r=yF(Pa(e));else if(oa(t))r=wF(t,n);else{const i=BR(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Fh(r)}function HR(e,t){const n=vo(e);return n===t||!oa(n)||Ts(n)?!1:la(n).position==="fixed"||HR(n,t)}function SF(e,t){const n=t.get(e);if(n)return n;let r=Tu(e,[],!1).filter(u=>oa(u)&&nc(u)!=="body"),i=null;const l=la(e).position==="fixed";let s=l?vo(e):e;for(;oa(s)&&!Ts(s);){const u=la(s),f=Rw(s);!f&&u.position==="fixed"&&(i=null),(l?!f&&!i:!f&&u.position==="static"&&!!i&&xF.has(i.position)||af(s)&&!f&&HR(e,s))?r=r.filter(p=>p!==s):i=u,s=vo(s)}return t.set(e,r),r}function EF(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?im(t)?[]:SF(t,this._c):[].concat(n),r],u=s[0],f=s.reduce((h,p)=>{const m=HN(t,p,i);return h.top=hr(m.top,h.top),h.right=mo(m.right,h.right),h.bottom=mo(m.bottom,h.bottom),h.left=hr(m.left,h.left),h},HN(t,u,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function CF(e){const{width:t,height:n}=$R(e);return{width:t,height:n}}function AF(e,t,n){const r=Oa(t),i=Pa(t),l=n==="fixed",s=sl(e,!0,l,t);let u={scrollLeft:0,scrollTop:0};const f=Ca(0);function h(){f.x=lm(i)}if(r||!r&&!l)if((nc(t)!=="body"||af(i))&&(u=om(t)),r){const x=sl(t,!0,l,t);f.x=x.x+t.clientLeft,f.y=x.y+t.clientTop}else i&&h();l&&!r&&i&&h();const p=i&&!r&&!l?UR(i,u):Ca(0),m=s.left+u.scrollLeft-f.x-p.x,b=s.top+u.scrollTop-f.y-p.y;return{x:m,y:b,width:s.width,height:s.height}}function By(e){return la(e).position==="static"}function qN(e,t){if(!Oa(e)||la(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Pa(e)===n&&(n=n.ownerDocument.body),n}function qR(e,t){const n=gr(e);if(im(e))return n;if(!Oa(e)){let i=vo(e);for(;i&&!Ts(i);){if(oa(i)&&!By(i))return i;i=vo(i)}return n}let r=qN(e,t);for(;r&&lF(r)&&By(r);)r=qN(r,t);return r&&Ts(r)&&By(r)&&!Rw(r)?n:r||dF(e)||n}const OF=async function(e){const t=this.getOffsetParent||qR,n=this.getDimensions,r=await n(e.floating);return{reference:AF(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function NF(e){return la(e).direction==="rtl"}const _F={convertOffsetParentRelativeRectToViewportRelativeRect:vF,getDocumentElement:Pa,getClippingRect:EF,getOffsetParent:qR,getElementRects:OF,getClientRects:gF,getDimensions:CF,getScale:As,isElement:oa,isRTL:NF};function FR(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function jF(e,t){let n=null,r;const i=Pa(e);function l(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function s(u,f){u===void 0&&(u=!1),f===void 0&&(f=1),l();const h=e.getBoundingClientRect(),{left:p,top:m,width:b,height:x}=h;if(u||t(),!b||!x)return;const S=rh(m),E=rh(i.clientWidth-(p+b)),C=rh(i.clientHeight-(m+x)),A=rh(p),N={rootMargin:-S+"px "+-E+"px "+-C+"px "+-A+"px",threshold:hr(0,mo(1,f))||1};let j=!0;function T(k){const R=k[0].intersectionRatio;if(R!==f){if(!j)return s();R?s(!1,R):r=setTimeout(()=>{s(!1,1e-7)},1e3)}R===1&&!FR(h,e.getBoundingClientRect())&&s(),j=!1}try{n=new IntersectionObserver(T,{...N,root:i.ownerDocument})}catch{n=new IntersectionObserver(T,N)}n.observe(e)}return s(!0),l}function TF(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:l=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,h=Pw(e),p=i||l?[...h?Tu(h):[],...Tu(t)]:[];p.forEach(A=>{i&&A.addEventListener("scroll",n,{passive:!0}),l&&A.addEventListener("resize",n)});const m=h&&u?jF(h,n):null;let b=-1,x=null;s&&(x=new ResizeObserver(A=>{let[_]=A;_&&_.target===h&&x&&(x.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var N;(N=x)==null||N.observe(t)})),n()}),h&&!f&&x.observe(h),x.observe(t));let S,E=f?sl(e):null;f&&C();function C(){const A=sl(e);E&&!FR(E,A)&&n(),E=A,S=requestAnimationFrame(C)}return n(),()=>{var A;p.forEach(_=>{i&&_.removeEventListener("scroll",n),l&&_.removeEventListener("resize",n)}),m?.(),(A=x)==null||A.disconnect(),x=null,f&&cancelAnimationFrame(S)}}const MF=tF,RF=nF,DF=Z7,PF=aF,kF=J7,FN=Q7,IF=rF,LF=(e,t,n)=>{const r=new Map,i={platform:_F,...n},l={...i.platform,_c:r};return X7(e,t,{...i,platform:l})};var zF=typeof document<"u",$F=function(){},_h=zF?v.useLayoutEffect:$F;function Kh(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Kh(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const l=i[r];if(!(l==="_owner"&&e.$$typeof)&&!Kh(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function KR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function KN(e,t){const n=KR(e);return Math.round(t*n)/n}function Uy(e){const t=v.useRef(e);return _h(()=>{t.current=e}),t}function BF(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:l,floating:s}={},transform:u=!0,whileElementsMounted:f,open:h}=e,[p,m]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,x]=v.useState(r);Kh(b,r)||x(r);const[S,E]=v.useState(null),[C,A]=v.useState(null),_=v.useCallback(H=>{H!==k.current&&(k.current=H,E(H))},[]),N=v.useCallback(H=>{H!==R.current&&(R.current=H,A(H))},[]),j=l||S,T=s||C,k=v.useRef(null),R=v.useRef(null),D=v.useRef(p),B=f!=null,Q=Uy(f),F=Uy(i),G=Uy(h),te=v.useCallback(()=>{if(!k.current||!R.current)return;const H={placement:t,strategy:n,middleware:b};F.current&&(H.platform=F.current),LF(k.current,R.current,H).then(X=>{const ge={...X,isPositioned:G.current!==!1};ce.current&&!Kh(D.current,ge)&&(D.current=ge,yl.flushSync(()=>{m(ge)}))})},[b,t,n,F,G]);_h(()=>{h===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,m(H=>({...H,isPositioned:!1})))},[h]);const ce=v.useRef(!1);_h(()=>(ce.current=!0,()=>{ce.current=!1}),[]),_h(()=>{if(j&&(k.current=j),T&&(R.current=T),j&&T){if(Q.current)return Q.current(j,T,te);te()}},[j,T,te,Q,B]);const he=v.useMemo(()=>({reference:k,floating:R,setReference:_,setFloating:N}),[_,N]),I=v.useMemo(()=>({reference:j,floating:T}),[j,T]),q=v.useMemo(()=>{const H={position:n,left:0,top:0};if(!I.floating)return H;const X=KN(I.floating,p.x),ge=KN(I.floating,p.y);return u?{...H,transform:"translate("+X+"px, "+ge+"px)",...KR(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:X,top:ge}},[n,u,I.floating,p.x,p.y]);return v.useMemo(()=>({...p,update:te,refs:he,elements:I,floatingStyles:q}),[p,te,he,I,q])}const UF=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?FN({element:r.current,padding:i}).fn(n):{}:r?FN({element:r,padding:i}).fn(n):{}}}},HF=(e,t)=>({...MF(e),options:[e,t]}),qF=(e,t)=>({...RF(e),options:[e,t]}),FF=(e,t)=>({...IF(e),options:[e,t]}),KF=(e,t)=>({...DF(e),options:[e,t]}),VF=(e,t)=>({...PF(e),options:[e,t]}),GF=(e,t)=>({...kF(e),options:[e,t]}),YF=(e,t)=>({...UF(e),options:[e,t]});var WF="Arrow",VR=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...l}=e;return g.jsx(Te.svg,{...l,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});VR.displayName=WF;var XF=VR;function GR(e){const[t,n]=v.useState(void 0);return Wt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const l=i[0];let s,u;if("borderBoxSize"in l){const f=l.borderBoxSize,h=Array.isArray(f)?f[0]:f;s=h.inlineSize,u=h.blockSize}else s=e.offsetWidth,u=e.offsetHeight;n({width:s,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var kw="Popper",[YR,xo]=Kr(kw),[QF,WR]=YR(kw),XR=e=>{const{__scopePopper:t,children:n}=e,[r,i]=v.useState(null);return g.jsx(QF,{scope:t,anchor:r,onAnchorChange:i,children:n})};XR.displayName=kw;var QR="PopperAnchor",ZR=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,l=WR(QR,n),s=v.useRef(null),u=Ke(t,s),f=v.useRef(null);return v.useEffect(()=>{const h=f.current;f.current=r?.current||s.current,h!==f.current&&l.onAnchorChange(f.current)}),r?null:g.jsx(Te.div,{...i,ref:u})});ZR.displayName=QR;var Iw="PopperContent",[ZF,JF]=YR(Iw),JR=v.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:l="center",alignOffset:s=0,arrowPadding:u=0,avoidCollisions:f=!0,collisionBoundary:h=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:b=!1,updatePositionStrategy:x="optimized",onPlaced:S,...E}=e,C=WR(Iw,n),[A,_]=v.useState(null),N=Ke(t,Y=>_(Y)),[j,T]=v.useState(null),k=GR(j),R=k?.width??0,D=k?.height??0,B=r+(l!=="center"?"-"+l:""),Q=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},F=Array.isArray(h)?h:[h],G=F.length>0,te={padding:Q,boundary:F.filter(tK),altBoundary:G},{refs:ce,floatingStyles:he,placement:I,isPositioned:q,middlewareData:H}=BF({strategy:"fixed",placement:B,whileElementsMounted:(...Y)=>TF(...Y,{animationFrame:x==="always"}),elements:{reference:C.anchor},middleware:[HF({mainAxis:i+D,alignmentAxis:s}),f&&qF({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?FF():void 0,...te}),f&&KF({...te}),VF({...te,apply:({elements:Y,rects:pe,availableWidth:V,availableHeight:me})=>{const{width:ye,height:ie}=pe.reference,ke=Y.floating.style;ke.setProperty("--radix-popper-available-width",`${V}px`),ke.setProperty("--radix-popper-available-height",`${me}px`),ke.setProperty("--radix-popper-anchor-width",`${ye}px`),ke.setProperty("--radix-popper-anchor-height",`${ie}px`)}}),j&&YF({element:j,padding:u}),nK({arrowWidth:R,arrowHeight:D}),b&&GF({strategy:"referenceHidden",...te})]}),[X,ge]=nD(I),L=ia(S);Wt(()=>{q&&L?.()},[q,L]);const z=H.arrow?.x,P=H.arrow?.y,W=H.arrow?.centerOffset!==0,[ne,se]=v.useState();return Wt(()=>{A&&se(window.getComputedStyle(A).zIndex)},[A]),g.jsx("div",{ref:ce.setFloating,"data-radix-popper-content-wrapper":"",style:{...he,transform:q?he.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[H.transformOrigin?.x,H.transformOrigin?.y].join(" "),...H.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(ZF,{scope:n,placedSide:X,onArrowChange:T,arrowX:z,arrowY:P,shouldHideArrow:W,children:g.jsx(Te.div,{"data-side":X,"data-align":ge,...E,ref:N,style:{...E.style,animation:q?void 0:"none"}})})})});JR.displayName=Iw;var eD="PopperArrow",eK={top:"bottom",right:"left",bottom:"top",left:"right"},tD=v.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,l=JF(eD,r),s=eK[l.placedSide];return g.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:g.jsx(XF,{...i,ref:n,style:{...i.style,display:"block"}})})});tD.displayName=eD;function tK(e){return e!==null}var nK=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,u=s?0:e.arrowWidth,f=s?0:e.arrowHeight,[h,p]=nD(n),m={start:"0%",center:"50%",end:"100%"}[p],b=(i.arrow?.x??0)+u/2,x=(i.arrow?.y??0)+f/2;let S="",E="";return h==="bottom"?(S=s?m:`${b}px`,E=`${-f}px`):h==="top"?(S=s?m:`${b}px`,E=`${r.floating.height+f}px`):h==="right"?(S=`${-f}px`,E=s?m:`${x}px`):h==="left"&&(S=`${r.floating.width+f}px`,E=s?m:`${x}px`),{data:{x:S,y:E}}}});function nD(e){const[t,n="center"]=e.split("-");return[t,n]}var sm=XR,cm=ZR,um=JR,fm=tD,rK=Symbol("radix.slottable");function aK(e){const t=({children:n})=>g.jsx(g.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=rK,t}var iK=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),oK="VisuallyHidden",rD=v.forwardRef((e,t)=>g.jsx(Te.span,{...e,ref:t,style:{...iK,...e.style}}));rD.displayName=oK;var lK=rD,[dm]=Kr("Tooltip",[xo]),hm=xo(),aD="TooltipProvider",sK=700,qb="tooltip.open",[cK,Lw]=dm(aD),iD=e=>{const{__scopeTooltip:t,delayDuration:n=sK,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:l}=e,s=v.useRef(!0),u=v.useRef(!1),f=v.useRef(0);return v.useEffect(()=>{const h=f.current;return()=>window.clearTimeout(h)},[]),g.jsx(cK,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(f.current),s.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:v.useCallback(h=>{u.current=h},[]),disableHoverableContent:i,children:l})};iD.displayName=aD;var Mu="Tooltip",[uK,of]=dm(Mu),oD=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:l,disableHoverableContent:s,delayDuration:u}=e,f=Lw(Mu,e.__scopeTooltip),h=hm(t),[p,m]=v.useState(null),b=Sn(),x=v.useRef(0),S=s??f.disableHoverableContent,E=u??f.delayDuration,C=v.useRef(!1),[A,_]=mi({prop:r,defaultProp:i??!1,onChange:R=>{R?(f.onOpen(),document.dispatchEvent(new CustomEvent(qb))):f.onClose(),l?.(R)},caller:Mu}),N=v.useMemo(()=>A?C.current?"delayed-open":"instant-open":"closed",[A]),j=v.useCallback(()=>{window.clearTimeout(x.current),x.current=0,C.current=!1,_(!0)},[_]),T=v.useCallback(()=>{window.clearTimeout(x.current),x.current=0,_(!1)},[_]),k=v.useCallback(()=>{window.clearTimeout(x.current),x.current=window.setTimeout(()=>{C.current=!0,_(!0),x.current=0},E)},[E,_]);return v.useEffect(()=>()=>{x.current&&(window.clearTimeout(x.current),x.current=0)},[]),g.jsx(sm,{...h,children:g.jsx(uK,{scope:t,contentId:b,open:A,stateAttribute:N,trigger:p,onTriggerChange:m,onTriggerEnter:v.useCallback(()=>{f.isOpenDelayedRef.current?k():j()},[f.isOpenDelayedRef,k,j]),onTriggerLeave:v.useCallback(()=>{S?T():(window.clearTimeout(x.current),x.current=0)},[T,S]),onOpen:j,onClose:T,disableHoverableContent:S,children:n})})};oD.displayName=Mu;var Fb="TooltipTrigger",lD=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=of(Fb,n),l=Lw(Fb,n),s=hm(n),u=v.useRef(null),f=Ke(t,u,i.onTriggerChange),h=v.useRef(!1),p=v.useRef(!1),m=v.useCallback(()=>h.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),g.jsx(cm,{asChild:!0,...s,children:g.jsx(Te.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:f,onPointerMove:be(e.onPointerMove,b=>{b.pointerType!=="touch"&&!p.current&&!l.isPointerInTransitRef.current&&(i.onTriggerEnter(),p.current=!0)}),onPointerLeave:be(e.onPointerLeave,()=>{i.onTriggerLeave(),p.current=!1}),onPointerDown:be(e.onPointerDown,()=>{i.open&&i.onClose(),h.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:be(e.onFocus,()=>{h.current||i.onOpen()}),onBlur:be(e.onBlur,i.onClose),onClick:be(e.onClick,i.onClose)})})});lD.displayName=Fb;var zw="TooltipPortal",[fK,dK]=dm(zw,{forceMount:void 0}),sD=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,l=of(zw,t);return g.jsx(fK,{scope:t,forceMount:n,children:g.jsx(Jn,{present:n||l.open,children:g.jsx(Zs,{asChild:!0,container:i,children:r})})})};sD.displayName=zw;var Ms="TooltipContent",cD=v.forwardRef((e,t)=>{const n=dK(Ms,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...l}=e,s=of(Ms,e.__scopeTooltip);return g.jsx(Jn,{present:r||s.open,children:s.disableHoverableContent?g.jsx(uD,{side:i,...l,ref:t}):g.jsx(hK,{side:i,...l,ref:t})})}),hK=v.forwardRef((e,t)=>{const n=of(Ms,e.__scopeTooltip),r=Lw(Ms,e.__scopeTooltip),i=v.useRef(null),l=Ke(t,i),[s,u]=v.useState(null),{trigger:f,onClose:h}=n,p=i.current,{onPointerInTransitChange:m}=r,b=v.useCallback(()=>{u(null),m(!1)},[m]),x=v.useCallback((S,E)=>{const C=S.currentTarget,A={x:S.clientX,y:S.clientY},_=yK(A,C.getBoundingClientRect()),N=bK(A,_),j=xK(E.getBoundingClientRect()),T=SK([...N,...j]);u(T),m(!0)},[m]);return v.useEffect(()=>()=>b(),[b]),v.useEffect(()=>{if(f&&p){const S=C=>x(C,p),E=C=>x(C,f);return f.addEventListener("pointerleave",S),p.addEventListener("pointerleave",E),()=>{f.removeEventListener("pointerleave",S),p.removeEventListener("pointerleave",E)}}},[f,p,x,b]),v.useEffect(()=>{if(s){const S=E=>{const C=E.target,A={x:E.clientX,y:E.clientY},_=f?.contains(C)||p?.contains(C),N=!wK(A,s);_?b():N&&(b(),h())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[f,p,s,h,b]),g.jsx(uD,{...e,ref:l})}),[pK,mK]=dm(Mu,{isInside:!1}),vK=aK("TooltipContent"),uD=v.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:l,onPointerDownOutside:s,...u}=e,f=of(Ms,n),h=hm(n),{onClose:p}=f;return v.useEffect(()=>(document.addEventListener(qb,p),()=>document.removeEventListener(qb,p)),[p]),v.useEffect(()=>{if(f.trigger){const m=b=>{b.target?.contains(f.trigger)&&p()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[f.trigger,p]),g.jsx(Qs,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:m=>m.preventDefault(),onDismiss:p,children:g.jsxs(um,{"data-state":f.stateAttribute,...h,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(vK,{children:r}),g.jsx(pK,{scope:n,isInside:!0,children:g.jsx(lK,{id:f.contentId,role:"tooltip",children:i||r})})]})})});cD.displayName=Ms;var fD="TooltipArrow",gK=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=hm(n);return mK(fD,n).isInside?null:g.jsx(fm,{...i,...r,ref:t})});gK.displayName=fD;function yK(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),l=Math.abs(t.left-e.x);switch(Math.min(n,r,i,l)){case l:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function bK(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function xK(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function wK(e,t){const{x:n,y:r}=e;let i=!1;for(let l=0,s=t.length-1;l<t.length;s=l++){const u=t[l],f=t[s],h=u.x,p=u.y,m=f.x,b=f.y;p>r!=b>r&&n<(m-h)*(r-p)/(b-p)+h&&(i=!i)}return i}function SK(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),EK(t)}function EK(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const l=t[t.length-1],s=t[t.length-2];if((l.x-s.x)*(i.y-s.y)>=(l.y-s.y)*(i.x-s.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const l=n[n.length-1],s=n[n.length-2];if((l.x-s.x)*(i.y-s.y)>=(l.y-s.y)*(i.x-s.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var CK=iD,AK=oD,OK=lD,NK=sD,dD=cD;const Kb=CK,Vb=AK,Gb=OK,Vh=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>g.jsx(NK,{children:g.jsx(dD,{ref:r,sideOffset:t,className:fe("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Vh.displayName=dD.displayName;const Hy=768;function $w(){const[e,t]=v.useState(void 0);return v.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Hy-1}px)`),r=()=>{t(window.innerWidth<Hy)};return n.addEventListener("change",r),t(window.innerWidth<Hy),()=>n.removeEventListener("change",r)},[]),!!e}const _K="sidebar:state",jK=3600*24*7,TK="16rem",MK="18rem",RK="3rem",DK="b",hD=v.createContext(null);function lf(){const e=v.useContext(hD);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const pD=v.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:l,...s},u)=>{const f=$w(),[h,p]=v.useState(!1),[m,b]=v.useState(e),x=t??m,S=v.useCallback(_=>{const N=typeof _=="function"?_(x):_;n?n(N):b(N),document.cookie=`${_K}=${N}; path=/; max-age=${jK}`},[n,x]),E=v.useCallback(()=>f?p(_=>!_):S(_=>!_),[f,S]);v.useEffect(()=>{const _=N=>{N.key===DK&&(N.metaKey||N.ctrlKey)&&(N.preventDefault(),E())};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[E]);const C=x?"expanded":"collapsed",A=v.useMemo(()=>({state:C,open:x,setOpen:S,isMobile:f,openMobile:h,setOpenMobile:p,toggleSidebar:E}),[C,x,S,f,h,E]);return g.jsx(hD.Provider,{value:A,children:g.jsx(Kb,{delayDuration:0,children:g.jsx("div",{style:{"--sidebar-width":TK,"--sidebar-width-icon":RK,...i},className:fe("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",r),ref:u,...s,children:l})})})});pD.displayName="SidebarProvider";const mD=v.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:i,...l},s)=>{const{isMobile:u,state:f,openMobile:h,setOpenMobile:p}=lf();return n==="none"?g.jsx("div",{"data-slot":"sidebar",className:fe("bg-sidebar text-sidebar-foreground flex h-full w-[var(--sidebar-width)] flex-col",r),ref:s,...l,children:i}):u?g.jsx(I7,{open:h,onOpenChange:p,...l,children:g.jsxs(MR,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-[var(--sidebar-width)] p-0 [&>button]:hidden",style:{"--sidebar-width":MK},side:e,children:[g.jsxs(RR,{className:"sr-only",children:[g.jsx(DR,{children:"Sidebar"}),g.jsx(PR,{children:"Displays the mobile sidebar."})]}),g.jsx("div",{className:"flex h-full w-full flex-col",children:i})]})}):g.jsxs("div",{ref:s,className:"group peer text-sidebar-foreground hidden md:block","data-state":f,"data-collapsible":f==="collapsed"?n:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[g.jsx("div",{"data-slot":"sidebar-gap",className:fe("relative w-[var(--sidebar-width)] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem)]":"group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]")}),g.jsx("div",{"data-slot":"sidebar-container",className:fe("fixed inset-y-0 z-10 hidden h-svh w-[var(--sidebar-width)] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem+2px)]":"group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...l,children:g.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:i})})]})});mD.displayName="Sidebar";const vD=v.forwardRef(({className:e,onClick:t,...n},r)=>{const{toggleSidebar:i}=lf();return g.jsxs(xt,{ref:r,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:fe("h-7 w-7",e),onClick:l=>{t?.(l),i()},...n,children:[g.jsx(VH,{}),g.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});vD.displayName="SidebarTrigger";const gD=v.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:r}=lf();return g.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:fe("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});gD.displayName="SidebarRail";const yD=v.forwardRef(({className:e,...t},n)=>g.jsx("main",{ref:n,className:fe("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...t}));yD.displayName="SidebarInset";const bD=v.forwardRef(({className:e,...t},n)=>g.jsx(pr,{ref:n,"data-sidebar":"input",className:fe("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));bD.displayName="SidebarInput";const xD=v.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,"data-sidebar":"header",className:fe("flex flex-col gap-2 p-2",e),...t}));xD.displayName="SidebarHeader";const wD=v.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,"data-sidebar":"footer",className:fe("flex flex-col gap-2 p-2",e),...t}));wD.displayName="SidebarFooter";const PK=v.forwardRef(({className:e,...t},n)=>g.jsx(_u,{ref:n,"data-sidebar":"separator",className:fe("mx-2 w-auto bg-sidebar-border",e),...t}));PK.displayName="SidebarSeparator";const SD=v.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,"data-sidebar":"content",className:fe("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));SD.displayName="SidebarContent";const Yb=v.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,"data-sidebar":"group",className:fe("relative flex w-full min-w-0 flex-col p-2",e),...t}));Yb.displayName="SidebarGroup";const kK=v.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const i=t?Gs:"div";return g.jsx(i,{ref:r,"data-sidebar":"group-label",className:fe("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})});kK.displayName="SidebarGroupLabel";const IK=v.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const i=t?Gs:"button";return g.jsx(i,{ref:r,"data-sidebar":"group-action",className:fe("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring cursor-pointer transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})});IK.displayName="SidebarGroupAction";const Wb=v.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,"data-sidebar":"group-content",className:fe("w-full text-sm",e),...t}));Wb.displayName="SidebarGroupContent";const Su=v.forwardRef(({className:e,...t},n)=>g.jsx("ul",{ref:n,"data-sidebar":"menu",className:fe("flex w-full min-w-0 flex-col gap-1",e),...t}));Su.displayName="SidebarMenu";const Eu=v.forwardRef(({className:e,...t},n)=>g.jsx("li",{ref:n,"data-sidebar":"menu-item",className:fe("group/menu-item relative",e),...t}));Eu.displayName="SidebarMenuItem";const LK=Ys("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring cursor-pointer transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-disabled:cursor-not-allowed data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Cu=v.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:i,className:l,...s},u)=>{const f=e?Gs:"button",{isMobile:h,state:p}=lf(),m=g.jsx(f,{ref:u,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:fe(LK({variant:n,size:r}),l),...s});return i?(typeof i=="string"&&(i={children:i}),g.jsxs(Vb,{children:[g.jsx(Gb,{asChild:!0,children:m}),g.jsx(Vh,{side:"right",align:"center",hidden:p!=="collapsed"||h,...i})]})):m});Cu.displayName="SidebarMenuButton";const zK=v.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},i)=>{const l=t?Gs:"button";return g.jsx(l,{ref:i,"data-sidebar":"menu-action",className:fe("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring cursor-pointer transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r})});zK.displayName="SidebarMenuAction";const $K=v.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:fe("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));$K.displayName="SidebarMenuBadge";const BK=v.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{const i=v.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return g.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:fe("rounded-md h-8 flex gap-2 px-2 items-center",e),...n,children:[t&&g.jsx(wN,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),g.jsx(wN,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":i}})]})});BK.displayName="SidebarMenuSkeleton";const UK=v.forwardRef(({className:e,...t},n)=>g.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:fe("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));UK.displayName="SidebarMenuSub";const HK=v.forwardRef(({...e},t)=>g.jsx("li",{ref:t,...e}));HK.displayName="SidebarMenuSubItem";const qK=v.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:r,...i},l)=>{const s=e?Gs:"a";return g.jsx(s,{ref:l,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:fe("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring cursor-pointer hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-disabled:cursor-not-allowed [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",r),...i})});qK.displayName="SidebarMenuSubButton";var FK=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],KK=FK.reduce((e,t)=>{const n=Vs(`Primitive.${t}`),r=v.forwardRef((i,l)=>{const{asChild:s,...u}=i,f=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(f,{...u,ref:l})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),VK="Label",ED=v.forwardRef((e,t)=>g.jsx(KK.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));ED.displayName=VK;var CD=ED;const kn=v.forwardRef(({className:e,...t},n)=>g.jsx(CD,{ref:n,className:fe("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...t}));kn.displayName=CD.displayName;function GK(e,t=[]){let n=[];function r(l,s){const u=v.createContext(s);u.displayName=l+"Context";const f=n.length;n=[...n,s];const h=m=>{const{scope:b,children:x,...S}=m,E=b?.[e]?.[f]||u,C=v.useMemo(()=>S,Object.values(S));return g.jsx(E.Provider,{value:C,children:x})};h.displayName=l+"Provider";function p(m,b){const x=b?.[e]?.[f]||u,S=v.useContext(x);if(S)return S;if(s!==void 0)return s;throw new Error(`\`${m}\` must be used within \`${l}\``)}return[h,p]}const i=()=>{const l=n.map(s=>v.createContext(s));return function(u){const f=u?.[e]||l;return v.useMemo(()=>({[`__scope${e}`]:{...u,[e]:f}}),[u,f])}};return i.scopeName=e,[r,YK(i,...t)]}function YK(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(l){const s=r.reduce((u,{useScope:f,scopeName:h})=>{const m=f(l)[`__scope${h}`];return{...u,...m}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var WK=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Bw=WK.reduce((e,t)=>{const n=Vs(`Primitive.${t}`),r=v.forwardRef((i,l)=>{const{asChild:s,...u}=i,f=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(f,{...u,ref:l})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),qy={exports:{}},Fy={};var VN;function XK(){if(VN)return Fy;VN=1;var e=Bs();function t(m,b){return m===b&&(m!==0||1/m===1/b)||m!==m&&b!==b}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,l=e.useLayoutEffect,s=e.useDebugValue;function u(m,b){var x=b(),S=r({inst:{value:x,getSnapshot:b}}),E=S[0].inst,C=S[1];return l(function(){E.value=x,E.getSnapshot=b,f(E)&&C({inst:E})},[m,x,b]),i(function(){return f(E)&&C({inst:E}),m(function(){f(E)&&C({inst:E})})},[m]),s(x),x}function f(m){var b=m.getSnapshot;m=m.value;try{var x=b();return!n(m,x)}catch{return!0}}function h(m,b){return b()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:u;return Fy.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,Fy}var GN;function AD(){return GN||(GN=1,qy.exports=XK()),qy.exports}var QK=AD();function ZK(){return QK.useSyncExternalStore(JK,()=>!0,()=>!1)}function JK(){return()=>{}}var Uw="Avatar",[eV]=GK(Uw),[tV,OD]=eV(Uw),ND=v.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,l]=v.useState("idle");return g.jsx(tV,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:l,children:g.jsx(Bw.span,{...r,ref:t})})});ND.displayName=Uw;var _D="AvatarImage",jD=v.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...l}=e,s=OD(_D,n),u=nV(r,l),f=ia(h=>{i(h),s.onImageLoadingStatusChange(h)});return Wt(()=>{u!=="idle"&&f(u)},[u,f]),u==="loaded"?g.jsx(Bw.img,{...l,ref:t,src:r}):null});jD.displayName=_D;var TD="AvatarFallback",MD=v.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,l=OD(TD,n),[s,u]=v.useState(r===void 0);return v.useEffect(()=>{if(r!==void 0){const f=window.setTimeout(()=>u(!0),r);return()=>window.clearTimeout(f)}},[r]),s&&l.imageLoadingStatus!=="loaded"?g.jsx(Bw.span,{...i,ref:t}):null});MD.displayName=TD;function YN(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function nV(e,{referrerPolicy:t,crossOrigin:n}){const r=ZK(),i=v.useRef(null),l=r?(i.current||(i.current=new window.Image),i.current):null,[s,u]=v.useState(()=>YN(l,e));return Wt(()=>{u(YN(l,e))},[l,e]),Wt(()=>{const f=m=>()=>{u(m)};if(!l)return;const h=f("loaded"),p=f("error");return l.addEventListener("load",h),l.addEventListener("error",p),t&&(l.referrerPolicy=t),typeof n=="string"&&(l.crossOrigin=n),()=>{l.removeEventListener("load",h),l.removeEventListener("error",p)}},[l,n,t]),s}var RD=ND,DD=jD,PD=MD;const Gh=v.forwardRef(({className:e,...t},n)=>g.jsx(RD,{ref:n,className:fe("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Gh.displayName=RD.displayName;const rV=v.forwardRef(({className:e,...t},n)=>g.jsx(DD,{ref:n,className:fe("aspect-square h-full w-full",e),...t}));rV.displayName=DD.displayName;const Yh=v.forwardRef(({className:e,...t},n)=>g.jsx(PD,{ref:n,className:fe("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Yh.displayName=PD.displayName;function WN(e){const t=aV(e),n=v.forwardRef((r,i)=>{const{children:l,...s}=r,u=v.Children.toArray(l),f=u.find(oV);if(f){const h=f.props.children,p=u.map(m=>m===f?v.Children.count(h)>1?v.Children.only(null):v.isValidElement(h)?h.props.children:null:m);return g.jsx(t,{...s,ref:i,children:v.isValidElement(h)?v.cloneElement(h,void 0,p):null})}return g.jsx(t,{...s,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}function aV(e){const t=v.forwardRef((n,r)=>{const{children:i,...l}=n;if(v.isValidElement(i)){const s=sV(i),u=lV(l,i.props);return i.type!==v.Fragment&&(u.ref=r?Zn(r,s):s),v.cloneElement(i,u)}return v.Children.count(i)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var iV=Symbol("radix.slottable");function oV(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===iV}function lV(e,t){const n={...t};for(const r in t){const i=e[r],l=t[r];/^on[A-Z]/.test(r)?i&&l?n[r]=(...u)=>{const f=l(...u);return i(...u),f}:i&&(n[r]=i):r==="style"?n[r]={...i,...l}:r==="className"&&(n[r]=[i,l].filter(Boolean).join(" "))}return{...e,...n}}function sV(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Hw(e){const t=e+"CollectionProvider",[n,r]=Kr(t),[i,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=E=>{const{scope:C,children:A}=E,_=ee.useRef(null),N=ee.useRef(new Map).current;return g.jsx(i,{scope:C,itemMap:N,collectionRef:_,children:A})};s.displayName=t;const u=e+"CollectionSlot",f=WN(u),h=ee.forwardRef((E,C)=>{const{scope:A,children:_}=E,N=l(u,A),j=Ke(C,N.collectionRef);return g.jsx(f,{ref:j,children:_})});h.displayName=u;const p=e+"CollectionItemSlot",m="data-radix-collection-item",b=WN(p),x=ee.forwardRef((E,C)=>{const{scope:A,children:_,...N}=E,j=ee.useRef(null),T=Ke(C,j),k=l(p,A);return ee.useEffect(()=>(k.itemMap.set(j,{ref:j,...N}),()=>void k.itemMap.delete(j))),g.jsx(b,{[m]:"",ref:T,children:_})});x.displayName=p;function S(E){const C=l(e+"CollectionConsumer",E);return ee.useCallback(()=>{const _=C.collectionRef.current;if(!_)return[];const N=Array.from(_.querySelectorAll(`[${m}]`));return Array.from(C.itemMap.values()).sort((k,R)=>N.indexOf(k.ref.current)-N.indexOf(R.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:s,Slot:h,ItemSlot:x},S,r]}var cV=v.createContext(void 0);function pm(e){const t=v.useContext(cV);return e||t||"ltr"}var Ky="rovingFocusGroup.onEntryFocus",uV={bubbles:!1,cancelable:!0},sf="RovingFocusGroup",[Xb,kD,fV]=Hw(sf),[dV,mm]=Kr(sf,[fV]),[hV,pV]=dV(sf),ID=v.forwardRef((e,t)=>g.jsx(Xb.Provider,{scope:e.__scopeRovingFocusGroup,children:g.jsx(Xb.Slot,{scope:e.__scopeRovingFocusGroup,children:g.jsx(mV,{...e,ref:t})})}));ID.displayName=sf;var mV=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:l,currentTabStopId:s,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:f,onEntryFocus:h,preventScrollOnEntryFocus:p=!1,...m}=e,b=v.useRef(null),x=Ke(t,b),S=pm(l),[E,C]=mi({prop:s,defaultProp:u??null,onChange:f,caller:sf}),[A,_]=v.useState(!1),N=ia(h),j=kD(n),T=v.useRef(!1),[k,R]=v.useState(0);return v.useEffect(()=>{const D=b.current;if(D)return D.addEventListener(Ky,N),()=>D.removeEventListener(Ky,N)},[N]),g.jsx(hV,{scope:n,orientation:r,dir:S,loop:i,currentTabStopId:E,onItemFocus:v.useCallback(D=>C(D),[C]),onItemShiftTab:v.useCallback(()=>_(!0),[]),onFocusableItemAdd:v.useCallback(()=>R(D=>D+1),[]),onFocusableItemRemove:v.useCallback(()=>R(D=>D-1),[]),children:g.jsx(Te.div,{tabIndex:A||k===0?-1:0,"data-orientation":r,...m,ref:x,style:{outline:"none",...e.style},onMouseDown:be(e.onMouseDown,()=>{T.current=!0}),onFocus:be(e.onFocus,D=>{const B=!T.current;if(D.target===D.currentTarget&&B&&!A){const Q=new CustomEvent(Ky,uV);if(D.currentTarget.dispatchEvent(Q),!Q.defaultPrevented){const F=j().filter(I=>I.focusable),G=F.find(I=>I.active),te=F.find(I=>I.id===E),he=[G,te,...F].filter(Boolean).map(I=>I.ref.current);$D(he,p)}}T.current=!1}),onBlur:be(e.onBlur,()=>_(!1))})})}),LD="RovingFocusGroupItem",zD=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:l,children:s,...u}=e,f=Sn(),h=l||f,p=pV(LD,n),m=p.currentTabStopId===h,b=kD(n),{onFocusableItemAdd:x,onFocusableItemRemove:S,currentTabStopId:E}=p;return v.useEffect(()=>{if(r)return x(),()=>S()},[r,x,S]),g.jsx(Xb.ItemSlot,{scope:n,id:h,focusable:r,active:i,children:g.jsx(Te.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...u,ref:t,onMouseDown:be(e.onMouseDown,C=>{r?p.onItemFocus(h):C.preventDefault()}),onFocus:be(e.onFocus,()=>p.onItemFocus(h)),onKeyDown:be(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){p.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const A=yV(C,p.orientation,p.dir);if(A!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let N=b().filter(j=>j.focusable).map(j=>j.ref.current);if(A==="last")N.reverse();else if(A==="prev"||A==="next"){A==="prev"&&N.reverse();const j=N.indexOf(C.currentTarget);N=p.loop?bV(N,j+1):N.slice(j+1)}setTimeout(()=>$D(N))}}),children:typeof s=="function"?s({isCurrentTabStop:m,hasTabStop:E!=null}):s})})});zD.displayName=LD;var vV={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function gV(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function yV(e,t,n){const r=gV(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return vV[r]}function $D(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function bV(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var BD=ID,UD=zD;function xV(e){const t=wV(e),n=v.forwardRef((r,i)=>{const{children:l,...s}=r,u=v.Children.toArray(l),f=u.find(EV);if(f){const h=f.props.children,p=u.map(m=>m===f?v.Children.count(h)>1?v.Children.only(null):v.isValidElement(h)?h.props.children:null:m);return g.jsx(t,{...s,ref:i,children:v.isValidElement(h)?v.cloneElement(h,void 0,p):null})}return g.jsx(t,{...s,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}function wV(e){const t=v.forwardRef((n,r)=>{const{children:i,...l}=n;if(v.isValidElement(i)){const s=AV(i),u=CV(l,i.props);return i.type!==v.Fragment&&(u.ref=r?Zn(r,s):s),v.cloneElement(i,u)}return v.Children.count(i)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var SV=Symbol("radix.slottable");function EV(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===SV}function CV(e,t){const n={...t};for(const r in t){const i=e[r],l=t[r];/^on[A-Z]/.test(r)?i&&l?n[r]=(...u)=>{const f=l(...u);return i(...u),f}:i&&(n[r]=i):r==="style"?n[r]={...i,...l}:r==="className"&&(n[r]=[i,l].filter(Boolean).join(" "))}return{...e,...n}}function AV(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Qb=["Enter"," "],OV=["ArrowDown","PageUp","Home"],HD=["ArrowUp","PageDown","End"],NV=[...OV,...HD],_V={ltr:[...Qb,"ArrowRight"],rtl:[...Qb,"ArrowLeft"]},jV={ltr:["ArrowLeft"],rtl:["ArrowRight"]},cf="Menu",[Ru,TV,MV]=Hw(cf),[wl,qD]=Kr(cf,[MV,xo,mm]),vm=xo(),FD=mm(),[RV,Sl]=wl(cf),[DV,uf]=wl(cf),KD=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:l,modal:s=!0}=e,u=vm(t),[f,h]=v.useState(null),p=v.useRef(!1),m=ia(l),b=pm(i);return v.useEffect(()=>{const x=()=>{p.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>p.current=!1;return document.addEventListener("keydown",x,{capture:!0}),()=>{document.removeEventListener("keydown",x,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),g.jsx(sm,{...u,children:g.jsx(RV,{scope:t,open:n,onOpenChange:m,content:f,onContentChange:h,children:g.jsx(DV,{scope:t,onClose:v.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:p,dir:b,modal:s,children:r})})})};KD.displayName=cf;var PV="MenuAnchor",qw=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=vm(n);return g.jsx(cm,{...i,...r,ref:t})});qw.displayName=PV;var Fw="MenuPortal",[kV,VD]=wl(Fw,{forceMount:void 0}),GD=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,l=Sl(Fw,t);return g.jsx(kV,{scope:t,forceMount:n,children:g.jsx(Jn,{present:n||l.open,children:g.jsx(Zs,{asChild:!0,container:i,children:r})})})};GD.displayName=Fw;var $r="MenuContent",[IV,Kw]=wl($r),YD=v.forwardRef((e,t)=>{const n=VD($r,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,l=Sl($r,e.__scopeMenu),s=uf($r,e.__scopeMenu);return g.jsx(Ru.Provider,{scope:e.__scopeMenu,children:g.jsx(Jn,{present:r||l.open,children:g.jsx(Ru.Slot,{scope:e.__scopeMenu,children:s.modal?g.jsx(LV,{...i,ref:t}):g.jsx(zV,{...i,ref:t})})})})}),LV=v.forwardRef((e,t)=>{const n=Sl($r,e.__scopeMenu),r=v.useRef(null),i=Ke(t,r);return v.useEffect(()=>{const l=r.current;if(l)return Aw(l)},[]),g.jsx(Vw,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:be(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),zV=v.forwardRef((e,t)=>{const n=Sl($r,e.__scopeMenu);return g.jsx(Vw,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),$V=xV("MenuContent.ScrollLock"),Vw=v.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:l,onCloseAutoFocus:s,disableOutsidePointerEvents:u,onEntryFocus:f,onEscapeKeyDown:h,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:b,onDismiss:x,disableOutsideScroll:S,...E}=e,C=Sl($r,n),A=uf($r,n),_=vm(n),N=FD(n),j=TV(n),[T,k]=v.useState(null),R=v.useRef(null),D=Ke(t,R,C.onContentChange),B=v.useRef(0),Q=v.useRef(""),F=v.useRef(0),G=v.useRef(null),te=v.useRef("right"),ce=v.useRef(0),he=S?tm:v.Fragment,I=S?{as:$V,allowPinchZoom:!0}:void 0,q=X=>{const ge=Q.current+X,L=j().filter(Y=>!Y.disabled),z=document.activeElement,P=L.find(Y=>Y.ref.current===z)?.textValue,W=L.map(Y=>Y.textValue),ne=QV(W,ge,P),se=L.find(Y=>Y.textValue===ne)?.ref.current;(function Y(pe){Q.current=pe,window.clearTimeout(B.current),pe!==""&&(B.current=window.setTimeout(()=>Y(""),1e3))})(ge),se&&setTimeout(()=>se.focus())};v.useEffect(()=>()=>window.clearTimeout(B.current),[]),Cw();const H=v.useCallback(X=>te.current===G.current?.side&&JV(X,G.current?.area),[]);return g.jsx(IV,{scope:n,searchRef:Q,onItemEnter:v.useCallback(X=>{H(X)&&X.preventDefault()},[H]),onItemLeave:v.useCallback(X=>{H(X)||(R.current?.focus(),k(null))},[H]),onTriggerLeave:v.useCallback(X=>{H(X)&&X.preventDefault()},[H]),pointerGraceTimerRef:F,onPointerGraceIntentChange:v.useCallback(X=>{G.current=X},[]),children:g.jsx(he,{...I,children:g.jsx(Jp,{asChild:!0,trapped:i,onMountAutoFocus:be(l,X=>{X.preventDefault(),R.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:g.jsx(Qs,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:h,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:b,onDismiss:x,children:g.jsx(BD,{asChild:!0,...N,dir:A.dir,orientation:"vertical",loop:r,currentTabStopId:T,onCurrentTabStopIdChange:k,onEntryFocus:be(f,X=>{A.isUsingKeyboardRef.current||X.preventDefault()}),preventScrollOnEntryFocus:!0,children:g.jsx(um,{role:"menu","aria-orientation":"vertical","data-state":uP(C.open),"data-radix-menu-content":"",dir:A.dir,..._,...E,ref:D,style:{outline:"none",...E.style},onKeyDown:be(E.onKeyDown,X=>{const L=X.target.closest("[data-radix-menu-content]")===X.currentTarget,z=X.ctrlKey||X.altKey||X.metaKey,P=X.key.length===1;L&&(X.key==="Tab"&&X.preventDefault(),!z&&P&&q(X.key));const W=R.current;if(X.target!==W||!NV.includes(X.key))return;X.preventDefault();const se=j().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);HD.includes(X.key)&&se.reverse(),WV(se)}),onBlur:be(e.onBlur,X=>{X.currentTarget.contains(X.target)||(window.clearTimeout(B.current),Q.current="")}),onPointerMove:be(e.onPointerMove,Du(X=>{const ge=X.target,L=ce.current!==X.clientX;if(X.currentTarget.contains(ge)&&L){const z=X.clientX>ce.current?"right":"left";te.current=z,ce.current=X.clientX}}))})})})})})})});YD.displayName=$r;var BV="MenuGroup",Gw=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(Te.div,{role:"group",...r,ref:t})});Gw.displayName=BV;var UV="MenuLabel",WD=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(Te.div,{...r,ref:t})});WD.displayName=UV;var Wh="MenuItem",XN="menu.itemSelect",gm=v.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,l=v.useRef(null),s=uf(Wh,e.__scopeMenu),u=Kw(Wh,e.__scopeMenu),f=Ke(t,l),h=v.useRef(!1),p=()=>{const m=l.current;if(!n&&m){const b=new CustomEvent(XN,{bubbles:!0,cancelable:!0});m.addEventListener(XN,x=>r?.(x),{once:!0}),tR(m,b),b.defaultPrevented?h.current=!1:s.onClose()}};return g.jsx(XD,{...i,ref:f,disabled:n,onClick:be(e.onClick,p),onPointerDown:m=>{e.onPointerDown?.(m),h.current=!0},onPointerUp:be(e.onPointerUp,m=>{h.current||m.currentTarget?.click()}),onKeyDown:be(e.onKeyDown,m=>{const b=u.searchRef.current!=="";n||b&&m.key===" "||Qb.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});gm.displayName=Wh;var XD=v.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...l}=e,s=Kw(Wh,n),u=FD(n),f=v.useRef(null),h=Ke(t,f),[p,m]=v.useState(!1),[b,x]=v.useState("");return v.useEffect(()=>{const S=f.current;S&&x((S.textContent??"").trim())},[l.children]),g.jsx(Ru.ItemSlot,{scope:n,disabled:r,textValue:i??b,children:g.jsx(UD,{asChild:!0,...u,focusable:!r,children:g.jsx(Te.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...l,ref:h,onPointerMove:be(e.onPointerMove,Du(S=>{r?s.onItemLeave(S):(s.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:be(e.onPointerLeave,Du(S=>s.onItemLeave(S))),onFocus:be(e.onFocus,()=>m(!0)),onBlur:be(e.onBlur,()=>m(!1))})})})}),HV="MenuCheckboxItem",QD=v.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return g.jsx(nP,{scope:e.__scopeMenu,checked:n,children:g.jsx(gm,{role:"menuitemcheckbox","aria-checked":Xh(n)?"mixed":n,...i,ref:t,"data-state":Ww(n),onSelect:be(i.onSelect,()=>r?.(Xh(n)?!0:!n),{checkForDefaultPrevented:!1})})})});QD.displayName=HV;var ZD="MenuRadioGroup",[qV,FV]=wl(ZD,{value:void 0,onValueChange:()=>{}}),JD=v.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,l=ia(r);return g.jsx(qV,{scope:e.__scopeMenu,value:n,onValueChange:l,children:g.jsx(Gw,{...i,ref:t})})});JD.displayName=ZD;var eP="MenuRadioItem",tP=v.forwardRef((e,t)=>{const{value:n,...r}=e,i=FV(eP,e.__scopeMenu),l=n===i.value;return g.jsx(nP,{scope:e.__scopeMenu,checked:l,children:g.jsx(gm,{role:"menuitemradio","aria-checked":l,...r,ref:t,"data-state":Ww(l),onSelect:be(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});tP.displayName=eP;var Yw="MenuItemIndicator",[nP,KV]=wl(Yw,{checked:!1}),rP=v.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,l=KV(Yw,n);return g.jsx(Jn,{present:r||Xh(l.checked)||l.checked===!0,children:g.jsx(Te.span,{...i,ref:t,"data-state":Ww(l.checked)})})});rP.displayName=Yw;var VV="MenuSeparator",aP=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(Te.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});aP.displayName=VV;var GV="MenuArrow",iP=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=vm(n);return g.jsx(fm,{...i,...r,ref:t})});iP.displayName=GV;var YV="MenuSub",[phe,oP]=wl(YV),gu="MenuSubTrigger",lP=v.forwardRef((e,t)=>{const n=Sl(gu,e.__scopeMenu),r=uf(gu,e.__scopeMenu),i=oP(gu,e.__scopeMenu),l=Kw(gu,e.__scopeMenu),s=v.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:f}=l,h={__scopeMenu:e.__scopeMenu},p=v.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return v.useEffect(()=>p,[p]),v.useEffect(()=>{const m=u.current;return()=>{window.clearTimeout(m),f(null)}},[u,f]),g.jsx(qw,{asChild:!0,...h,children:g.jsx(XD,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":uP(n.open),...e,ref:Zn(t,i.onTriggerChange),onClick:m=>{e.onClick?.(m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:be(e.onPointerMove,Du(m=>{l.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(l.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100))})),onPointerLeave:be(e.onPointerLeave,Du(m=>{p();const b=n.content?.getBoundingClientRect();if(b){const x=n.content?.dataset.side,S=x==="right",E=S?-5:5,C=b[S?"left":"right"],A=b[S?"right":"left"];l.onPointerGraceIntentChange({area:[{x:m.clientX+E,y:m.clientY},{x:C,y:b.top},{x:A,y:b.top},{x:A,y:b.bottom},{x:C,y:b.bottom}],side:x}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>l.onPointerGraceIntentChange(null),300)}else{if(l.onTriggerLeave(m),m.defaultPrevented)return;l.onPointerGraceIntentChange(null)}})),onKeyDown:be(e.onKeyDown,m=>{const b=l.searchRef.current!=="";e.disabled||b&&m.key===" "||_V[r.dir].includes(m.key)&&(n.onOpenChange(!0),n.content?.focus(),m.preventDefault())})})})});lP.displayName=gu;var sP="MenuSubContent",cP=v.forwardRef((e,t)=>{const n=VD($r,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,l=Sl($r,e.__scopeMenu),s=uf($r,e.__scopeMenu),u=oP(sP,e.__scopeMenu),f=v.useRef(null),h=Ke(t,f);return g.jsx(Ru.Provider,{scope:e.__scopeMenu,children:g.jsx(Jn,{present:r||l.open,children:g.jsx(Ru.Slot,{scope:e.__scopeMenu,children:g.jsx(Vw,{id:u.contentId,"aria-labelledby":u.triggerId,...i,ref:h,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{s.isUsingKeyboardRef.current&&f.current?.focus(),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:be(e.onFocusOutside,p=>{p.target!==u.trigger&&l.onOpenChange(!1)}),onEscapeKeyDown:be(e.onEscapeKeyDown,p=>{s.onClose(),p.preventDefault()}),onKeyDown:be(e.onKeyDown,p=>{const m=p.currentTarget.contains(p.target),b=jV[s.dir].includes(p.key);m&&b&&(l.onOpenChange(!1),u.trigger?.focus(),p.preventDefault())})})})})})});cP.displayName=sP;function uP(e){return e?"open":"closed"}function Xh(e){return e==="indeterminate"}function Ww(e){return Xh(e)?"indeterminate":e?"checked":"unchecked"}function WV(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function XV(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function QV(e,t,n){const i=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,l=n?e.indexOf(n):-1;let s=XV(e,Math.max(l,0));i.length===1&&(s=s.filter(h=>h!==n));const f=s.find(h=>h.toLowerCase().startsWith(i.toLowerCase()));return f!==n?f:void 0}function ZV(e,t){const{x:n,y:r}=e;let i=!1;for(let l=0,s=t.length-1;l<t.length;s=l++){const u=t[l],f=t[s],h=u.x,p=u.y,m=f.x,b=f.y;p>r!=b>r&&n<(m-h)*(r-p)/(b-p)+h&&(i=!i)}return i}function JV(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return ZV(n,t)}function Du(e){return t=>t.pointerType==="mouse"?e(t):void 0}var eG=KD,tG=qw,nG=GD,rG=YD,aG=Gw,iG=WD,oG=gm,lG=QD,sG=JD,cG=tP,uG=rP,fG=aP,dG=iP,hG=lP,pG=cP,ym="DropdownMenu",[mG]=Kr(ym,[qD]),$n=qD(),[vG,fP]=mG(ym),dP=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:l,onOpenChange:s,modal:u=!0}=e,f=$n(t),h=v.useRef(null),[p,m]=mi({prop:i,defaultProp:l??!1,onChange:s,caller:ym});return g.jsx(vG,{scope:t,triggerId:Sn(),triggerRef:h,contentId:Sn(),open:p,onOpenChange:m,onOpenToggle:v.useCallback(()=>m(b=>!b),[m]),modal:u,children:g.jsx(eG,{...f,open:p,onOpenChange:m,dir:r,modal:u,children:n})})};dP.displayName=ym;var hP="DropdownMenuTrigger",pP=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,l=fP(hP,n),s=$n(n);return g.jsx(tG,{asChild:!0,...s,children:g.jsx(Te.button,{type:"button",id:l.triggerId,"aria-haspopup":"menu","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":l.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:Zn(t,l.triggerRef),onPointerDown:be(e.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(l.onOpenToggle(),l.open||u.preventDefault())}),onKeyDown:be(e.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&l.onOpenToggle(),u.key==="ArrowDown"&&l.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});pP.displayName=hP;var gG="DropdownMenuPortal",mP=e=>{const{__scopeDropdownMenu:t,...n}=e,r=$n(t);return g.jsx(nG,{...r,...n})};mP.displayName=gG;var vP="DropdownMenuContent",gP=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=fP(vP,n),l=$n(n),s=v.useRef(!1);return g.jsx(rG,{id:i.contentId,"aria-labelledby":i.triggerId,...l,...r,ref:t,onCloseAutoFocus:be(e.onCloseAutoFocus,u=>{s.current||i.triggerRef.current?.focus(),s.current=!1,u.preventDefault()}),onInteractOutside:be(e.onInteractOutside,u=>{const f=u.detail.originalEvent,h=f.button===0&&f.ctrlKey===!0,p=f.button===2||h;(!i.modal||p)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});gP.displayName=vP;var yG="DropdownMenuGroup",yP=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=$n(n);return g.jsx(aG,{...i,...r,ref:t})});yP.displayName=yG;var bG="DropdownMenuLabel",bP=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=$n(n);return g.jsx(iG,{...i,...r,ref:t})});bP.displayName=bG;var xG="DropdownMenuItem",xP=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=$n(n);return g.jsx(oG,{...i,...r,ref:t})});xP.displayName=xG;var wG="DropdownMenuCheckboxItem",wP=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=$n(n);return g.jsx(lG,{...i,...r,ref:t})});wP.displayName=wG;var SG="DropdownMenuRadioGroup",EG=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=$n(n);return g.jsx(sG,{...i,...r,ref:t})});EG.displayName=SG;var CG="DropdownMenuRadioItem",SP=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=$n(n);return g.jsx(cG,{...i,...r,ref:t})});SP.displayName=CG;var AG="DropdownMenuItemIndicator",EP=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=$n(n);return g.jsx(uG,{...i,...r,ref:t})});EP.displayName=AG;var OG="DropdownMenuSeparator",CP=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=$n(n);return g.jsx(fG,{...i,...r,ref:t})});CP.displayName=OG;var NG="DropdownMenuArrow",_G=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=$n(n);return g.jsx(dG,{...i,...r,ref:t})});_G.displayName=NG;var jG="DropdownMenuSubTrigger",AP=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=$n(n);return g.jsx(hG,{...i,...r,ref:t})});AP.displayName=jG;var TG="DropdownMenuSubContent",OP=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=$n(n);return g.jsx(pG,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});OP.displayName=TG;var MG=dP,RG=pP,DG=mP,NP=gP,PG=yP,_P=bP,jP=xP,TP=wP,MP=SP,RP=EP,DP=CP,PP=AP,kP=OP;const kG=MG,IG=RG,LG=PG,zG=v.forwardRef(({className:e,inset:t,children:n,...r},i)=>g.jsxs(PP,{ref:i,className:fe("flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,g.jsx(bH,{className:"ml-auto h-4 w-4"})]}));zG.displayName=PP.displayName;const $G=v.forwardRef(({className:e,...t},n)=>g.jsx(kP,{ref:n,className:fe("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));$G.displayName=kP.displayName;const IP=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>g.jsx(DG,{children:g.jsx(NP,{ref:r,sideOffset:t,className:fe("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));IP.displayName=NP.displayName;const Zb=v.forwardRef(({className:e,inset:t,...n},r)=>g.jsx(jP,{ref:r,className:fe("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",t&&"pl-8",e),...n}));Zb.displayName=jP.displayName;const BG=v.forwardRef(({className:e,children:t,checked:n,...r},i)=>g.jsxs(TP,{ref:i,className:fe("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",e),checked:n,...r,children:[g.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(RP,{children:g.jsx(tf,{className:"h-4 w-4"})})}),t]}));BG.displayName=TP.displayName;const UG=v.forwardRef(({className:e,children:t,...n},r)=>g.jsxs(MP,{ref:r,className:fe("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",e),...n,children:[g.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(RP,{children:g.jsx(tf,{className:"h-2 w-2 fill-current"})})}),t]}));UG.displayName=MP.displayName;const LP=v.forwardRef(({className:e,inset:t,...n},r)=>g.jsx(_P,{ref:r,className:fe("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));LP.displayName=_P.displayName;const Jb=v.forwardRef(({className:e,...t},n)=>g.jsx(DP,{ref:n,className:fe("-mx-1 my-1 h-px bg-muted",e),...t}));Jb.displayName=DP.displayName;class zP extends Error{constructor(t,n,r){super(t),this.statusCode=n,this.code=r,this.name="ApiClientError"}}async function QN(e){const t=await e.text().catch(()=>"");if(!t)return null;try{return JSON.parse(t)}catch{return null}}async function ra(e){if(!e.ok){const n=await QN(e);throw new zP(n?.message||"Request failed",e.status,n?.code)}if(e.status===204||e.status===205)return{};const t=await QN(e);return t??{}}const Vy={login:async(e,t)=>{const n=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({email:e,password:t})});return n.ok?(await n.json().catch(()=>({})),{}):ra(n)},logout:async()=>{const e=await fetch("/api/auth/logout",{method:"POST",credentials:"include"});if(!e.ok){const t=await e.json().catch(()=>({message:"Logout failed"}));throw new zP(t.message||"Logout failed",e.status,t.code)}return{}},checkSession:async()=>{const e=await fetch("/api/tenants/me",{credentials:"include"});return e.status===401?null:ra(e)}},$P={getMe:async()=>{const e=await fetch("/api/tenants/me",{credentials:"include"});return ra(e)},updateMe:async e=>{const t=await fetch("/api/tenants/me",{method:"PATCH",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(e)});return ra(t)},changePassword:async(e,t)=>{const n=await fetch("/api/tenants/me/password",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({currentPassword:e,newPassword:t})});return ra(n)}},Xw={list:async()=>{const e=await fetch("/api/shops",{credentials:"include"}),t=await ra(e);return(Array.isArray(t.shops)?t.shops:[]).map(r=>({id:r.id,domain:r.shopDomain,status:"active",connectedAt:r.installedAt,isDefault:r.isDefault,scopes:r.scopes||[],tokenStatus:r.tokenStatus||"active",tokenExpiresAt:r.tokenExpiresAt,hasRefreshToken:r.hasRefreshToken,refreshTokenExpiresAt:r.refreshTokenExpiresAt}))},connect:async(e,t,n=!1)=>{const r=await fetch("/api/shops",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({domain:e,accessToken:t,setAsDefault:n})});return ra(r)},disconnect:async e=>{const t=await fetch(`/api/shops/${e}`,{method:"DELETE",credentials:"include"});return ra(t)}},Qw={list:async()=>{const e=await fetch("/api/keys",{credentials:"include"}),t=await ra(e);return Array.isArray(t.keys)?t.keys:[]},create:async e=>{const t=await fetch("/api/keys",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({name:e})});return ra(t)},revoke:async e=>{const t=await fetch(`/api/keys/${e}`,{method:"DELETE",credentials:"include"});return ra(t)}},BP=v.createContext(void 0);function HG({children:e}){const[t,n]=v.useState(null),[r,i]=v.useState(!0),l=Ks(),s=v.useCallback(async()=>{try{const p=await Vy.checkSession();return n(p),p}catch{return n(null),null}finally{i(!1)}},[]);v.useEffect(()=>{s()},[s]);const u=async(p,m)=>{try{await Vy.login(p,m),await new Promise(x=>setTimeout(x,0));let b=await s();if(!b&&(await new Promise(x=>setTimeout(x,50)),b=await s(),!b))throw new Error("Failed to verify session after login. Please check your credentials and try again.");l("/",{replace:!0}),Mn.success("Successfully logged in")}catch(b){const x=b instanceof Error?b.message:"Login failed";throw Mn.error(x),b}},f=async()=>{try{await Vy.logout(),n(null),l("/login"),Mn.success("Successfully logged out")}catch(p){const m=p instanceof Error?p.message:"Logout failed";Mn.error(m)}},h=async()=>{await s()};return g.jsx(BP.Provider,{value:{user:t,isAuthenticated:!!t,isLoading:r,login:u,logout:f,refreshUser:h},children:e})}function ff(){const e=v.useContext(BP);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e}function qG(){const{user:e,logout:t}=ff(),n=Ks(),{isMobile:r}=lf(),i=e?.name?e.name.split(" ").map(l=>l[0]).join("").toUpperCase().slice(0,2):"U";return g.jsx(Su,{children:g.jsx(Eu,{children:g.jsxs(kG,{children:[g.jsx(IG,{asChild:!0,children:g.jsxs(Cu,{size:"lg",className:"data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground",children:[g.jsx(Gh,{className:"h-8 w-8 rounded-lg",children:g.jsx(Yh,{className:"rounded-lg bg-primary/10 text-primary text-xs font-medium",children:i})}),g.jsxs("div",{className:"grid flex-1 text-left text-sm leading-tight",children:[g.jsx("span",{className:"truncate font-medium",children:e?.name||"User"}),g.jsx("span",{className:"truncate text-xs text-muted-foreground",children:e?.email})]}),g.jsx(EH,{className:"ml-auto size-4"})]})}),g.jsxs(IP,{className:"w-[--radix-dropdown-menu-trigger-width] min-w-56 rounded-lg",side:r?"bottom":"right",align:"end",sideOffset:4,children:[g.jsx(LP,{className:"p-0 font-normal",children:g.jsxs("div",{className:"flex items-center gap-2 px-1 py-1.5 text-left text-sm",children:[g.jsx(Gh,{className:"h-8 w-8 rounded-lg",children:g.jsx(Yh,{className:"rounded-lg bg-primary/10 text-primary text-xs font-medium",children:i})}),g.jsxs("div",{className:"grid flex-1 text-left text-sm leading-tight",children:[g.jsx("span",{className:"truncate font-medium",children:e?.name||"User"}),g.jsx("span",{className:"truncate text-xs text-muted-foreground",children:e?.email})]})]})}),g.jsx(Jb,{}),g.jsx(LG,{children:g.jsxs(Zb,{onClick:()=>n("/settings"),children:[g.jsx(zM,{className:"mr-2 h-4 w-4"}),"Settings"]})}),g.jsx(Jb,{}),g.jsxs(Zb,{onClick:t,className:"text-destructive focus:text-destructive",children:[g.jsx(FH,{className:"mr-2 h-4 w-4"}),"Log out"]})]})]})})})}const FG=[{name:"Dashboard",href:"/",icon:LM},{name:"Shops",href:"/shops",icon:js},{name:"API Keys",href:"/keys",icon:co}],KG=[{name:"Get Help",href:"https://github.com/AntonAndrusenko/shopify-mcp-admin#readme",icon:OH,external:!0}];function VG({onSearchClick:e,...t}){const n=Da();return g.jsxs(mD,{collapsible:"icon",...t,children:[g.jsx(xD,{children:g.jsx(Su,{children:g.jsx(Eu,{children:g.jsx(Cu,{asChild:!0,size:"lg",tooltip:"Shopify MCP",children:g.jsxs(Ah,{to:"/",children:[g.jsx("div",{className:"flex aspect-square size-8 items-center justify-center rounded-lg bg-primary text-primary-foreground",children:g.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":"Shopify MCP Logo",children:[g.jsx("title",{children:"Shopify MCP Logo"}),g.jsx("path",{d:"M12 2L2 7L12 12L22 7L12 2Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",fill:"currentColor"}),g.jsx("path",{d:"M2 17L12 22L22 17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M2 12L12 17L22 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),g.jsxs("div",{className:"grid flex-1 text-left text-sm leading-tight",children:[g.jsx("span",{className:"truncate font-semibold",children:"Shopify MCP"}),g.jsx("span",{className:"truncate text-xs text-sidebar-foreground/60",children:"Admin Dashboard"})]})]})})})})}),g.jsxs(SD,{children:[g.jsx(Yb,{children:g.jsxs(Wb,{className:"flex flex-col gap-2",children:[g.jsxs("div",{className:"relative group-data-[collapsible=icon]:hidden",children:[g.jsx(kn,{htmlFor:"sidebar-search",className:"sr-only",children:"Search"}),g.jsx(bD,{id:"sidebar-search",placeholder:"Search...",className:"h-8 pl-8 pr-12 cursor-pointer",readOnly:!0,onClick:e,onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),e?.())}}),g.jsx(Sw,{className:"pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground/60"}),g.jsxs("kbd",{className:"pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 hidden h-5 select-none items-center gap-0.5 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground sm:inline-flex",children:[g.jsx("span",{className:"text-xs",children:"⌘"}),"K"]})]}),g.jsx(Su,{children:FG.map(r=>{const i=n.pathname===r.href||r.href!=="/"&&n.pathname.startsWith(r.href);return g.jsx(Eu,{children:g.jsx(Cu,{asChild:!0,isActive:i,tooltip:r.name,children:g.jsxs(Ah,{to:r.href,children:[g.jsx(r.icon,{className:"size-4"}),g.jsx("span",{children:r.name})]})})},r.href)})})]})}),g.jsx(Yb,{className:"mt-auto",children:g.jsx(Wb,{children:g.jsx(Su,{children:KG.map(r=>{const i=!r.external&&n.pathname===r.href;return g.jsx(Eu,{children:g.jsx(Cu,{asChild:!0,isActive:i,tooltip:r.name,children:r.external?g.jsxs("a",{href:r.href,target:"_blank",rel:"noopener noreferrer",children:[g.jsx(r.icon,{className:"size-4"}),g.jsx("span",{children:r.name})]}):g.jsxs(Ah,{to:r.href,children:[g.jsx(r.icon,{className:"size-4"}),g.jsx("span",{children:r.name})]})})},r.name)})})})})]}),g.jsx(wD,{children:g.jsx(qG,{})}),g.jsx(gD,{})]})}var ZN=1,GG=.9,YG=.8,WG=.17,Gy=.1,Yy=.999,XG=.9999,QG=.99,ZG=/[\\\/_+.#"@\[\(\{&]/,JG=/[\\\/_+.#"@\[\(\{&]/g,eY=/[\s-]/,UP=/[\s-]/g;function ex(e,t,n,r,i,l,s){if(l===t.length)return i===e.length?ZN:QG;var u=`${i},${l}`;if(s[u]!==void 0)return s[u];for(var f=r.charAt(l),h=n.indexOf(f,i),p=0,m,b,x,S;h>=0;)m=ex(e,t,n,r,h+1,l+1,s),m>p&&(h===i?m*=ZN:ZG.test(e.charAt(h-1))?(m*=YG,x=e.slice(i,h-1).match(JG),x&&i>0&&(m*=Math.pow(Yy,x.length))):eY.test(e.charAt(h-1))?(m*=GG,S=e.slice(i,h-1).match(UP),S&&i>0&&(m*=Math.pow(Yy,S.length))):(m*=WG,i>0&&(m*=Math.pow(Yy,h-i))),e.charAt(h)!==t.charAt(l)&&(m*=XG)),(m<Gy&&n.charAt(h-1)===r.charAt(l+1)||r.charAt(l+1)===r.charAt(l)&&n.charAt(h-1)!==r.charAt(l))&&(b=ex(e,t,n,r,h+1,l+2,s),b*Gy>m&&(m=b*Gy)),m>p&&(p=m),h=n.indexOf(f,h+1);return s[u]=p,p}function JN(e){return e.toLowerCase().replace(UP," ")}function tY(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,ex(e,t,JN(e),JN(t),0,0,{})}var lu='[cmdk-group=""]',Wy='[cmdk-group-items=""]',nY='[cmdk-group-heading=""]',HP='[cmdk-item=""]',e_=`${HP}:not([aria-disabled="true"])`,tx="cmdk-item-select",ys="data-value",rY=(e,t,n)=>tY(e,t,n),qP=v.createContext(void 0),df=()=>v.useContext(qP),FP=v.createContext(void 0),Zw=()=>v.useContext(FP),KP=v.createContext(void 0),VP=v.forwardRef((e,t)=>{let n=bs(()=>{var z,P;return{search:"",value:(P=(z=e.value)!=null?z:e.defaultValue)!=null?P:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=bs(()=>new Set),i=bs(()=>new Map),l=bs(()=>new Map),s=bs(()=>new Set),u=GP(e),{label:f,children:h,value:p,onValueChange:m,filter:b,shouldFilter:x,loop:S,disablePointerSelection:E=!1,vimBindings:C=!0,...A}=e,_=Sn(),N=Sn(),j=Sn(),T=v.useRef(null),k=pY();cl(()=>{if(p!==void 0){let z=p.trim();n.current.value=z,R.emit()}},[p]),cl(()=>{k(6,te)},[]);let R=v.useMemo(()=>({subscribe:z=>(s.current.add(z),()=>s.current.delete(z)),snapshot:()=>n.current,setState:(z,P,W)=>{var ne,se,Y,pe;if(!Object.is(n.current[z],P)){if(n.current[z]=P,z==="search")G(),Q(),k(1,F);else if(z==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let V=document.getElementById(j);V?V.focus():(ne=document.getElementById(_))==null||ne.focus()}if(k(7,()=>{var V;n.current.selectedItemId=(V=ce())==null?void 0:V.id,R.emit()}),W||k(5,te),((se=u.current)==null?void 0:se.value)!==void 0){let V=P??"";(pe=(Y=u.current).onValueChange)==null||pe.call(Y,V);return}}R.emit()}},emit:()=>{s.current.forEach(z=>z())}}),[]),D=v.useMemo(()=>({value:(z,P,W)=>{var ne;P!==((ne=l.current.get(z))==null?void 0:ne.value)&&(l.current.set(z,{value:P,keywords:W}),n.current.filtered.items.set(z,B(P,W)),k(2,()=>{Q(),R.emit()}))},item:(z,P)=>(r.current.add(z),P&&(i.current.has(P)?i.current.get(P).add(z):i.current.set(P,new Set([z]))),k(3,()=>{G(),Q(),n.current.value||F(),R.emit()}),()=>{l.current.delete(z),r.current.delete(z),n.current.filtered.items.delete(z);let W=ce();k(4,()=>{G(),W?.getAttribute("id")===z&&F(),R.emit()})}),group:z=>(i.current.has(z)||i.current.set(z,new Set),()=>{l.current.delete(z),i.current.delete(z)}),filter:()=>u.current.shouldFilter,label:f||e["aria-label"],getDisablePointerSelection:()=>u.current.disablePointerSelection,listId:_,inputId:j,labelId:N,listInnerRef:T}),[]);function B(z,P){var W,ne;let se=(ne=(W=u.current)==null?void 0:W.filter)!=null?ne:rY;return z?se(z,n.current.search,P):0}function Q(){if(!n.current.search||u.current.shouldFilter===!1)return;let z=n.current.filtered.items,P=[];n.current.filtered.groups.forEach(ne=>{let se=i.current.get(ne),Y=0;se.forEach(pe=>{let V=z.get(pe);Y=Math.max(V,Y)}),P.push([ne,Y])});let W=T.current;he().sort((ne,se)=>{var Y,pe;let V=ne.getAttribute("id"),me=se.getAttribute("id");return((Y=z.get(me))!=null?Y:0)-((pe=z.get(V))!=null?pe:0)}).forEach(ne=>{let se=ne.closest(Wy);se?se.appendChild(ne.parentElement===se?ne:ne.closest(`${Wy} > *`)):W.appendChild(ne.parentElement===W?ne:ne.closest(`${Wy} > *`))}),P.sort((ne,se)=>se[1]-ne[1]).forEach(ne=>{var se;let Y=(se=T.current)==null?void 0:se.querySelector(`${lu}[${ys}="${encodeURIComponent(ne[0])}"]`);Y?.parentElement.appendChild(Y)})}function F(){let z=he().find(W=>W.getAttribute("aria-disabled")!=="true"),P=z?.getAttribute(ys);R.setState("value",P||void 0)}function G(){var z,P,W,ne;if(!n.current.search||u.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let se=0;for(let Y of r.current){let pe=(P=(z=l.current.get(Y))==null?void 0:z.value)!=null?P:"",V=(ne=(W=l.current.get(Y))==null?void 0:W.keywords)!=null?ne:[],me=B(pe,V);n.current.filtered.items.set(Y,me),me>0&&se++}for(let[Y,pe]of i.current)for(let V of pe)if(n.current.filtered.items.get(V)>0){n.current.filtered.groups.add(Y);break}n.current.filtered.count=se}function te(){var z,P,W;let ne=ce();ne&&(((z=ne.parentElement)==null?void 0:z.firstChild)===ne&&((W=(P=ne.closest(lu))==null?void 0:P.querySelector(nY))==null||W.scrollIntoView({block:"nearest"})),ne.scrollIntoView({block:"nearest"}))}function ce(){var z;return(z=T.current)==null?void 0:z.querySelector(`${HP}[aria-selected="true"]`)}function he(){var z;return Array.from(((z=T.current)==null?void 0:z.querySelectorAll(e_))||[])}function I(z){let P=he()[z];P&&R.setState("value",P.getAttribute(ys))}function q(z){var P;let W=ce(),ne=he(),se=ne.findIndex(pe=>pe===W),Y=ne[se+z];(P=u.current)!=null&&P.loop&&(Y=se+z<0?ne[ne.length-1]:se+z===ne.length?ne[0]:ne[se+z]),Y&&R.setState("value",Y.getAttribute(ys))}function H(z){let P=ce(),W=P?.closest(lu),ne;for(;W&&!ne;)W=z>0?dY(W,lu):hY(W,lu),ne=W?.querySelector(e_);ne?R.setState("value",ne.getAttribute(ys)):q(z)}let X=()=>I(he().length-1),ge=z=>{z.preventDefault(),z.metaKey?X():z.altKey?H(1):q(1)},L=z=>{z.preventDefault(),z.metaKey?I(0):z.altKey?H(-1):q(-1)};return v.createElement(Te.div,{ref:t,tabIndex:-1,...A,"cmdk-root":"",onKeyDown:z=>{var P;(P=A.onKeyDown)==null||P.call(A,z);let W=z.nativeEvent.isComposing||z.keyCode===229;if(!(z.defaultPrevented||W))switch(z.key){case"n":case"j":{C&&z.ctrlKey&&ge(z);break}case"ArrowDown":{ge(z);break}case"p":case"k":{C&&z.ctrlKey&&L(z);break}case"ArrowUp":{L(z);break}case"Home":{z.preventDefault(),I(0);break}case"End":{z.preventDefault(),X();break}case"Enter":{z.preventDefault();let ne=ce();if(ne){let se=new Event(tx);ne.dispatchEvent(se)}}}}},v.createElement("label",{"cmdk-label":"",htmlFor:D.inputId,id:D.labelId,style:vY},f),bm(e,z=>v.createElement(FP.Provider,{value:R},v.createElement(qP.Provider,{value:D},z))))}),aY=v.forwardRef((e,t)=>{var n,r;let i=Sn(),l=v.useRef(null),s=v.useContext(KP),u=df(),f=GP(e),h=(r=(n=f.current)==null?void 0:n.forceMount)!=null?r:s?.forceMount;cl(()=>{if(!h)return u.item(i,s?.id)},[h]);let p=YP(i,l,[e.value,e.children,l],e.keywords),m=Zw(),b=go(k=>k.value&&k.value===p.current),x=go(k=>h||u.filter()===!1?!0:k.search?k.filtered.items.get(i)>0:!0);v.useEffect(()=>{let k=l.current;if(!(!k||e.disabled))return k.addEventListener(tx,S),()=>k.removeEventListener(tx,S)},[x,e.onSelect,e.disabled]);function S(){var k,R;E(),(R=(k=f.current).onSelect)==null||R.call(k,p.current)}function E(){m.setState("value",p.current,!0)}if(!x)return null;let{disabled:C,value:A,onSelect:_,forceMount:N,keywords:j,...T}=e;return v.createElement(Te.div,{ref:Zn(l,t),...T,id:i,"cmdk-item":"",role:"option","aria-disabled":!!C,"aria-selected":!!b,"data-disabled":!!C,"data-selected":!!b,onPointerMove:C||u.getDisablePointerSelection()?void 0:E,onClick:C?void 0:S},e.children)}),iY=v.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...l}=e,s=Sn(),u=v.useRef(null),f=v.useRef(null),h=Sn(),p=df(),m=go(x=>i||p.filter()===!1?!0:x.search?x.filtered.groups.has(s):!0);cl(()=>p.group(s),[]),YP(s,u,[e.value,e.heading,f]);let b=v.useMemo(()=>({id:s,forceMount:i}),[i]);return v.createElement(Te.div,{ref:Zn(u,t),...l,"cmdk-group":"",role:"presentation",hidden:m?void 0:!0},n&&v.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:h},n),bm(e,x=>v.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?h:void 0},v.createElement(KP.Provider,{value:b},x))))}),oY=v.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=v.useRef(null),l=go(s=>!s.search);return!n&&!l?null:v.createElement(Te.div,{ref:Zn(i,t),...r,"cmdk-separator":"",role:"separator"})}),lY=v.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,l=Zw(),s=go(h=>h.search),u=go(h=>h.selectedItemId),f=df();return v.useEffect(()=>{e.value!=null&&l.setState("search",e.value)},[e.value]),v.createElement(Te.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":f.listId,"aria-labelledby":f.labelId,"aria-activedescendant":u,id:f.inputId,type:"text",value:i?e.value:s,onChange:h=>{i||l.setState("search",h.target.value),n?.(h.target.value)}})}),sY=v.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...i}=e,l=v.useRef(null),s=v.useRef(null),u=go(h=>h.selectedItemId),f=df();return v.useEffect(()=>{if(s.current&&l.current){let h=s.current,p=l.current,m,b=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let x=h.offsetHeight;p.style.setProperty("--cmdk-list-height",x.toFixed(1)+"px")})});return b.observe(h),()=>{cancelAnimationFrame(m),b.unobserve(h)}}},[]),v.createElement(Te.div,{ref:Zn(l,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":u,"aria-label":r,id:f.listId},bm(e,h=>v.createElement("div",{ref:Zn(s,f.listInnerRef),"cmdk-list-sizer":""},h)))}),cY=v.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:l,container:s,...u}=e;return v.createElement(nf,{open:n,onOpenChange:r},v.createElement(rf,{container:s},v.createElement(bl,{"cmdk-overlay":"",className:i}),v.createElement(xl,{"aria-label":e.label,"cmdk-dialog":"",className:l},v.createElement(VP,{ref:t,...u}))))}),uY=v.forwardRef((e,t)=>go(n=>n.filtered.count===0)?v.createElement(Te.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),fY=v.forwardRef((e,t)=>{let{progress:n,children:r,label:i="Loading...",...l}=e;return v.createElement(Te.div,{ref:t,...l,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},bm(e,s=>v.createElement("div",{"aria-hidden":!0},s)))}),er=Object.assign(VP,{List:sY,Item:aY,Input:lY,Group:iY,Separator:oY,Dialog:cY,Empty:uY,Loading:fY});function dY(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function hY(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function GP(e){let t=v.useRef(e);return cl(()=>{t.current=e}),t}var cl=typeof window>"u"?v.useEffect:v.useLayoutEffect;function bs(e){let t=v.useRef();return t.current===void 0&&(t.current=e()),t}function go(e){let t=Zw(),n=()=>e(t.snapshot());return v.useSyncExternalStore(t.subscribe,n,n)}function YP(e,t,n,r=[]){let i=v.useRef(),l=df();return cl(()=>{var s;let u=(()=>{var h;for(let p of n){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(h=p.current.textContent)==null?void 0:h.trim():i.current}})(),f=r.map(h=>h.trim());l.value(e,u,f),(s=t.current)==null||s.setAttribute(ys,u),i.current=u}),i}var pY=()=>{let[e,t]=v.useState(),n=bs(()=>new Map);return cl(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}};function mY(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function bm({asChild:e,children:t},n){return e&&v.isValidElement(t)?v.cloneElement(mY(t),{ref:t.ref},n(t.props.children)):n(t)}var vY={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Qh=nf,gY=rf,WP=v.forwardRef(({className:e,...t},n)=>g.jsx(bl,{ref:n,className:fe("fixed inset-0 z-50 dialog-overlay-enhanced",e),...t}));WP.displayName=bl.displayName;const Pu=v.forwardRef(({className:e,children:t,...n},r)=>g.jsxs(gY,{children:[g.jsx(WP,{}),g.jsxs(xl,{ref:r,className:fe("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-background text-foreground p-6 sm:rounded-lg dialog-content-enhanced dialog-shadow-enhanced",e),...n,children:[t,g.jsxs(rm,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-all duration-200 cursor-pointer hover:opacity-100 hover:scale-110 focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:cursor-not-allowed data-[state=open]:bg-accent data-[state=open]:text-muted-foreground text-foreground",children:[g.jsx(BM,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Pu.displayName=xl.displayName;const Zh=({className:e,...t})=>g.jsx("div",{className:fe("flex flex-col gap-1.5 text-center sm:text-left",e),...t});Zh.displayName="DialogHeader";const ku=v.forwardRef(({className:e,...t},n)=>g.jsx(Js,{ref:n,className:fe("text-lg font-semibold leading-none tracking-tight",e),...t}));ku.displayName=Js.displayName;const Iu=v.forwardRef(({className:e,...t},n)=>g.jsx(ec,{ref:n,className:fe("text-sm text-muted-foreground",e),...t}));Iu.displayName=ec.displayName;var yY=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],bY=yY.reduce((e,t)=>{const n=Vs(`Primitive.${t}`),r=v.forwardRef((i,l)=>{const{asChild:s,...u}=i,f=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(f,{...u,ref:l})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),xY=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),wY="VisuallyHidden",XP=v.forwardRef((e,t)=>g.jsx(bY.span,{...e,ref:t,style:{...xY,...e.style}}));XP.displayName=wY;var t_=XP;const QP=v.forwardRef(({className:e,...t},n)=>g.jsx(er,{ref:n,className:fe("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));QP.displayName=er.displayName;const SY=({children:e,...t})=>g.jsx(Qh,{...t,children:g.jsxs(Pu,{className:"overflow-hidden p-0",children:[g.jsx(t_,{asChild:!0,children:g.jsx(ku,{children:"Command Menu"})}),g.jsx(t_,{asChild:!0,children:g.jsx(Iu,{children:"Search for commands, navigate to pages, or perform quick actions"})}),g.jsx(QP,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})]})}),ZP=v.forwardRef(({className:e,...t},n)=>g.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[g.jsx(Sw,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),g.jsx(er.Input,{ref:n,className:fe("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));ZP.displayName=er.Input.displayName;const JP=v.forwardRef(({className:e,...t},n)=>g.jsx(er.List,{ref:n,className:fe("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));JP.displayName=er.List.displayName;const ek=v.forwardRef((e,t)=>g.jsx(er.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));ek.displayName=er.Empty.displayName;const yu=v.forwardRef(({className:e,...t},n)=>g.jsx(er.Group,{ref:n,className:fe("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));yu.displayName=er.Group.displayName;const jh=v.forwardRef(({className:e,...t},n)=>g.jsx(er.Separator,{ref:n,className:fe("-mx-1 h-px bg-border",e),...t}));jh.displayName=er.Separator.displayName;const ei=v.forwardRef(({className:e,...t},n)=>g.jsx(er.Item,{ref:n,className:fe("relative flex cursor-pointer gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[disabled=true]:cursor-not-allowed data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));ei.displayName=er.Item.displayName;function Jw(){return mM({queryKey:["apiKeys"],queryFn:Qw.list})}function EY(){const e=gl();return Us({mutationFn:t=>Qw.create(t),onSuccess:()=>{e.invalidateQueries({queryKey:["apiKeys"]})},onError:t=>{Mn.error(t.message||"Failed to create API key")}})}function CY(){const e=gl();return Us({mutationFn:t=>Qw.revoke(t),onSuccess:()=>{e.invalidateQueries({queryKey:["apiKeys"]}),Mn.success("API key revoked")},onError:t=>{Mn.error(t.message||"Failed to revoke API key")}})}function xm(){return mM({queryKey:["shops"],queryFn:Xw.list})}function AY(){const e=gl();return Us({mutationFn:({domain:t,accessToken:n,setAsDefault:r})=>Xw.connect(t,n,r),onSuccess:()=>{e.invalidateQueries({queryKey:["shops"]}),Mn.success("Shop connected successfully")},onError:t=>{Mn.error(t.message||"Failed to connect shop")}})}function OY(){const e=gl();return Us({mutationFn:t=>Xw.disconnect(t),onSuccess:()=>{e.invalidateQueries({queryKey:["shops"]}),Mn.success("Shop disconnected")},onError:t=>{Mn.error(t.message||"Failed to disconnect shop")}})}function NY({open:e,onOpenChange:t}){const n=Ks(),{data:r}=xm(),{data:i}=Jw(),l=v.useCallback(s=>{t(!1),s()},[t]);return g.jsxs(SY,{open:e,onOpenChange:t,children:[g.jsx(ZP,{placeholder:"Type a command or search..."}),g.jsxs(JP,{children:[g.jsx(ek,{children:"No results found."}),g.jsxs(yu,{heading:"Navigation",children:[g.jsxs(ei,{onSelect:()=>l(()=>n("/")),children:[g.jsx(LM,{className:"mr-2 h-4 w-4"}),"Dashboard"]}),g.jsxs(ei,{onSelect:()=>l(()=>n("/shops")),children:[g.jsx(js,{className:"mr-2 h-4 w-4"}),"Shops"]}),g.jsxs(ei,{onSelect:()=>l(()=>n("/keys")),children:[g.jsx(co,{className:"mr-2 h-4 w-4"}),"API Keys"]}),g.jsxs(ei,{onSelect:()=>l(()=>n("/settings")),children:[g.jsx(zM,{className:"mr-2 h-4 w-4"}),"Settings"]})]}),g.jsx(jh,{}),g.jsxs(yu,{heading:"Quick Actions",children:[g.jsxs(ei,{onSelect:()=>l(()=>{n("/shops")}),children:[g.jsx(ol,{className:"mr-2 h-4 w-4"}),"Connect Shop"]}),g.jsxs(ei,{onSelect:()=>l(()=>{n("/keys")}),children:[g.jsx(ol,{className:"mr-2 h-4 w-4"}),"Generate API Key"]})]}),r&&r.length>0&&g.jsxs(g.Fragment,{children:[g.jsx(jh,{}),g.jsx(yu,{heading:"Connected Shops",children:r.map(s=>g.jsxs(ei,{onSelect:()=>l(()=>n("/shops")),children:[g.jsx(js,{className:"mr-2 h-4 w-4"}),s.domain]},s.id))})]}),i&&i.length>0&&g.jsxs(g.Fragment,{children:[g.jsx(jh,{}),g.jsx(yu,{heading:"API Keys",children:i.slice(0,5).map(s=>g.jsxs(ei,{onSelect:()=>l(()=>n("/keys")),children:[g.jsx(co,{className:"mr-2 h-4 w-4"}),s.name,g.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:s.keyHint})]},s.id))})]})]})]})}const _Y={"/":"Dashboard","/shops":"Shops","/keys":"API Keys","/settings":"Settings"};function jY({onSearchClick:e}){const n=Da().pathname.replace(/^\/app/,"")||"/",r=_Y[n]||"Page";return g.jsx("header",{className:"flex h-[var(--header-height)] shrink-0 items-center gap-2 border-b transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-[var(--header-height)]",children:g.jsxs("div",{className:"flex w-full items-center gap-1 px-4 lg:gap-2 lg:px-6",children:[g.jsx(vD,{className:"-ml-1"}),g.jsx(_u,{orientation:"vertical",className:"mx-2 data-[orientation=vertical]:h-4"}),g.jsx("h1",{className:"text-base font-medium",children:r}),g.jsx("div",{className:"ml-auto flex items-center gap-2",children:g.jsxs(xt,{variant:"ghost",size:"sm",className:"hidden sm:flex lg:hidden",onClick:e,children:[g.jsx(Sw,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Search"})]})})]})})}function TY({children:e}){const[t,n]=v.useState(!1);return v.useEffect(()=>{const r=i=>{i.key==="k"&&(i.metaKey||i.ctrlKey)&&(i.preventDefault(),n(l=>!l))};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[]),g.jsxs(pD,{defaultOpen:!0,style:{"--sidebar-width":"calc(var(--spacing) * 72)","--header-height":"calc(var(--spacing) * 12)"},children:[g.jsx(VG,{variant:"inset",onSearchClick:()=>n(!0)}),g.jsxs(yD,{children:[g.jsx(jY,{onSearchClick:()=>n(!0)}),g.jsx("div",{className:"flex flex-1 flex-col",children:g.jsx("div",{className:"@container/main flex flex-1 flex-col gap-2",children:g.jsx("div",{className:"flex flex-col gap-4 px-4 py-4 md:gap-6 md:py-6 lg:px-6",children:e})})})]}),g.jsx(NY,{open:t,onOpenChange:n})]})}const MY=Ys("animate-spin text-muted-foreground",{variants:{size:{default:"h-4 w-4",sm:"h-3 w-3",lg:"h-6 w-6",xl:"h-8 w-8"}},defaultVariants:{size:"default"}}),fi=v.forwardRef(({className:e,size:t,...n},r)=>g.jsx(BH,{ref:r,className:fe(MY({size:t}),e),...n}));fi.displayName="Spinner";const RY=Ys("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground",success:"border-transparent bg-green-100 text-green-700 dark:bg-green-900 dark:text-green-100 hover:bg-green-100/80 dark:hover:bg-green-900/80"}},defaultVariants:{variant:"default"}});function ga({className:e,variant:t,...n}){return g.jsx("div",{className:fe(RY({variant:t}),e),...n})}const ai=v.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,className:fe("rounded-xl border bg-card text-card-foreground shadow",e),...t}));ai.displayName="Card";const ii=v.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,className:fe("flex flex-col gap-y-1.5 p-6",e),...t}));ii.displayName="CardHeader";const oi=v.forwardRef(({className:e,...t},n)=>g.jsx("h3",{ref:n,className:fe("font-semibold leading-none tracking-tight text-lg",e),...t}));oi.displayName="CardTitle";const fo=v.forwardRef(({className:e,...t},n)=>g.jsx("p",{ref:n,className:fe("text-sm text-muted-foreground",e),...t}));fo.displayName="CardDescription";const li=v.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,className:fe("p-6 pt-0",e),...t}));li.displayName="CardContent";const DY=v.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,className:fe("flex items-center p-6 pt-0",e),...t}));DY.displayName="CardFooter";const PY=v.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,className:fe("absolute right-6 top-6",e),...t}));PY.displayName="CardAction";var kY=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function e1(e){if(typeof e!="string")return!1;var t=kY;return t.includes(e)}var IY=["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"],LY=new Set(IY);function tk(e){return typeof e!="string"?!1:LY.has(e)}function nk(e){return typeof e=="string"&&e.startsWith("data-")}function sa(e){if(typeof e!="object"||e===null)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(tk(n)||nk(n))&&(t[n]=e[n]);return t}function wm(e){if(e==null)return null;if(v.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return sa(t)}return typeof e=="object"&&!Array.isArray(e)?sa(e):null}function Ur(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(tk(n)||nk(n)||e1(n))&&(t[n]=e[n]);return t}function zY(e){return e==null?null:v.isValidElement(e)?Ur(e.props):typeof e=="object"&&!Array.isArray(e)?Ur(e):null}var $Y=["children","width","height","viewBox","className","style","title","desc"];function nx(){return nx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nx.apply(null,arguments)}function BY(e,t){if(e==null)return{};var n,r,i=UY(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function UY(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var rk=v.forwardRef((e,t)=>{var{children:n,width:r,height:i,viewBox:l,className:s,style:u,title:f,desc:h}=e,p=BY(e,$Y),m=l||{width:r,height:i,x:0,y:0},b=ht("recharts-surface",s);return v.createElement("svg",nx({},Ur(p),{className:b,width:r,height:i,style:u,viewBox:"".concat(m.x," ").concat(m.y," ").concat(m.width," ").concat(m.height),ref:t}),v.createElement("title",null,f),v.createElement("desc",null,h),n)}),HY=["children","className"];function rx(){return rx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rx.apply(null,arguments)}function qY(e,t){if(e==null)return{};var n,r,i=FY(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function FY(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Na=v.forwardRef((e,t)=>{var{children:n,className:r}=e,i=qY(e,HY),l=ht("recharts-layer",r);return v.createElement("g",rx({className:l},Ur(i),{ref:t}),n)}),KY=v.createContext(null);function jt(e){return function(){return e}}const ax=Math.PI,ix=2*ax,Vo=1e-6,VY=ix-Vo;function ak(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function GY(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return ak;const n=10**t;return function(r){this._+=r[0];for(let i=1,l=r.length;i<l;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class YY{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?ak:GY(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,l,s){this._append`C${+t},${+n},${+r},${+i},${this._x1=+l},${this._y1=+s}`}arcTo(t,n,r,i,l){if(t=+t,n=+n,r=+r,i=+i,l=+l,l<0)throw new Error(`negative radius: ${l}`);let s=this._x1,u=this._y1,f=r-t,h=i-n,p=s-t,m=u-n,b=p*p+m*m;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(b>Vo)if(!(Math.abs(m*f-h*p)>Vo)||!l)this._append`L${this._x1=t},${this._y1=n}`;else{let x=r-s,S=i-u,E=f*f+h*h,C=x*x+S*S,A=Math.sqrt(E),_=Math.sqrt(b),N=l*Math.tan((ax-Math.acos((E+b-C)/(2*A*_)))/2),j=N/_,T=N/A;Math.abs(j-1)>Vo&&this._append`L${t+j*p},${n+j*m}`,this._append`A${l},${l},0,0,${+(m*x>p*S)},${this._x1=t+T*f},${this._y1=n+T*h}`}}arc(t,n,r,i,l,s){if(t=+t,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let u=r*Math.cos(i),f=r*Math.sin(i),h=t+u,p=n+f,m=1^s,b=s?i-l:l-i;this._x1===null?this._append`M${h},${p}`:(Math.abs(this._x1-h)>Vo||Math.abs(this._y1-p)>Vo)&&this._append`L${h},${p}`,r&&(b<0&&(b=b%ix+ix),b>VY?this._append`A${r},${r},0,1,${m},${t-u},${n-f}A${r},${r},0,1,${m},${this._x1=h},${this._y1=p}`:b>Vo&&this._append`A${r},${r},0,${+(b>=ax)},${m},${this._x1=t+r*Math.cos(l)},${this._y1=n+r*Math.sin(l)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function ik(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new YY(t)}function t1(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ok(e){this._context=e}ok.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 Sm(e){return new ok(e)}function lk(e){return e[0]}function sk(e){return e[1]}function ck(e,t){var n=jt(!0),r=null,i=Sm,l=null,s=ik(u);e=typeof e=="function"?e:e===void 0?lk:jt(e),t=typeof t=="function"?t:t===void 0?sk:jt(t);function u(f){var h,p=(f=t1(f)).length,m,b=!1,x;for(r==null&&(l=i(x=s())),h=0;h<=p;++h)!(h<p&&n(m=f[h],h,f))===b&&((b=!b)?l.lineStart():l.lineEnd()),b&&l.point(+e(m,h,f),+t(m,h,f));if(x)return l=null,x+""||null}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:jt(+f),u):e},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:jt(+f),u):t},u.defined=function(f){return arguments.length?(n=typeof f=="function"?f:jt(!!f),u):n},u.curve=function(f){return arguments.length?(i=f,r!=null&&(l=i(r)),u):i},u.context=function(f){return arguments.length?(f==null?r=l=null:l=i(r=f),u):r},u}function ah(e,t,n){var r=null,i=jt(!0),l=null,s=Sm,u=null,f=ik(h);e=typeof e=="function"?e:e===void 0?lk:jt(+e),t=typeof t=="function"?t:jt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?sk:jt(+n);function h(m){var b,x,S,E=(m=t1(m)).length,C,A=!1,_,N=new Array(E),j=new Array(E);for(l==null&&(u=s(_=f())),b=0;b<=E;++b){if(!(b<E&&i(C=m[b],b,m))===A)if(A=!A)x=b,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),S=b-1;S>=x;--S)u.point(N[S],j[S]);u.lineEnd(),u.areaEnd()}A&&(N[b]=+e(C,b,m),j[b]=+t(C,b,m),u.point(r?+r(C,b,m):N[b],n?+n(C,b,m):j[b]))}if(_)return u=null,_+""||null}function p(){return ck().defined(i).curve(s).context(l)}return h.x=function(m){return arguments.length?(e=typeof m=="function"?m:jt(+m),r=null,h):e},h.x0=function(m){return arguments.length?(e=typeof m=="function"?m:jt(+m),h):e},h.x1=function(m){return arguments.length?(r=m==null?null:typeof m=="function"?m:jt(+m),h):r},h.y=function(m){return arguments.length?(t=typeof m=="function"?m:jt(+m),n=null,h):t},h.y0=function(m){return arguments.length?(t=typeof m=="function"?m:jt(+m),h):t},h.y1=function(m){return arguments.length?(n=m==null?null:typeof m=="function"?m:jt(+m),h):n},h.lineX0=h.lineY0=function(){return p().x(e).y(t)},h.lineY1=function(){return p().x(e).y(n)},h.lineX1=function(){return p().x(r).y(t)},h.defined=function(m){return arguments.length?(i=typeof m=="function"?m:jt(!!m),h):i},h.curve=function(m){return arguments.length?(s=m,l!=null&&(u=s(l)),h):s},h.context=function(m){return arguments.length?(m==null?l=u=null:u=s(l=m),h):l},h}class uk{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function WY(e){return new uk(e,!0)}function XY(e){return new uk(e,!1)}function Jh(){}function ep(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function fk(e){this._context=e}fk.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:ep(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:ep(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function QY(e){return new fk(e)}function dk(e){this._context=e}dk.prototype={areaStart:Jh,areaEnd:Jh,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:ep(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ZY(e){return new dk(e)}function hk(e){this._context=e}hk.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 n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:ep(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function JY(e){return new hk(e)}function pk(e){this._context=e}pk.prototype={areaStart:Jh,areaEnd:Jh,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 eW(e){return new pk(e)}function n_(e){return e<0?-1:1}function r_(e,t,n){var r=e._x1-e._x0,i=t-e._x1,l=(e._y1-e._y0)/(r||i<0&&-0),s=(n-e._y1)/(i||r<0&&-0),u=(l*i+s*r)/(r+i);return(n_(l)+n_(s))*Math.min(Math.abs(l),Math.abs(s),.5*Math.abs(u))||0}function a_(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Xy(e,t,n){var r=e._x0,i=e._y0,l=e._x1,s=e._y1,u=(l-r)/3;e._context.bezierCurveTo(r+u,i+u*t,l-u,s-u*n,l,s)}function tp(e){this._context=e}tp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Xy(this,this._t0,a_(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 n=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,Xy(this,a_(this,n=r_(this,e,t)),n);break;default:Xy(this,this._t0,n=r_(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function mk(e){this._context=new vk(e)}(mk.prototype=Object.create(tp.prototype)).point=function(e,t){tp.prototype.point.call(this,t,e)};function vk(e){this._context=e}vk.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,n,r,i,l){this._context.bezierCurveTo(t,e,r,n,l,i)}};function tW(e){return new tp(e)}function nW(e){return new mk(e)}function gk(e){this._context=e}gk.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,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=i_(e),i=i_(t),l=0,s=1;s<n;++l,++s)this._context.bezierCurveTo(r[0][l],i[0][l],r[1][l],i[1][l],e[s],t[s]);(this._line||this._line!==0&&n===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 i_(e){var t,n=e.length-1,r,i=new Array(n),l=new Array(n),s=new Array(n);for(i[0]=0,l[0]=2,s[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,l[t]=4,s[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,l[n-1]=7,s[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/l[t-1],l[t]-=r,s[t]-=r*s[t-1];for(i[n-1]=s[n-1]/l[n-1],t=n-2;t>=0;--t)i[t]=(s[t]-i[t+1])/l[t];for(l[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)l[t]=2*e[t+1]-i[t+1];return[i,l]}function rW(e){return new gk(e)}function Em(e,t){this._context=e,this._t=t}Em.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;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function aW(e){return new Em(e,.5)}function iW(e){return new Em(e,0)}function oW(e){return new Em(e,1)}function Rs(e,t){if((s=e.length)>1)for(var n=1,r,i,l=e[t[0]],s,u=l.length;n<s;++n)for(i=l,l=e[t[n]],r=0;r<u;++r)l[r][1]+=l[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function ox(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function lW(e,t){return e[t]}function sW(e){const t=[];return t.key=e,t}function cW(){var e=jt([]),t=ox,n=Rs,r=lW;function i(l){var s=Array.from(e.apply(this,arguments),sW),u,f=s.length,h=-1,p;for(const m of l)for(u=0,++h;u<f;++u)(s[u][h]=[0,+r(m,s[u].key,h,l)]).data=m;for(u=0,p=t1(t(s));u<f;++u)s[p[u]].index=u;return n(s,p),s}return i.keys=function(l){return arguments.length?(e=typeof l=="function"?l:jt(Array.from(l)),i):e},i.value=function(l){return arguments.length?(r=typeof l=="function"?l:jt(+l),i):r},i.order=function(l){return arguments.length?(t=l==null?ox:typeof l=="function"?l:jt(Array.from(l)),i):t},i.offset=function(l){return arguments.length?(n=l??Rs,i):n},i}function uW(e,t){if((r=e.length)>0){for(var n,r,i=0,l=e[0].length,s;i<l;++i){for(s=n=0;n<r;++n)s+=e[n][i][1]||0;if(s)for(n=0;n<r;++n)e[n][i][1]/=s}Rs(e,t)}}function fW(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,l=r.length;n<l;++n){for(var s=0,u=0;s<i;++s)u+=e[s][n][1]||0;r[n][1]+=r[n][0]=-u/2}Rs(e,t)}}function dW(e,t){if(!(!((s=e.length)>0)||!((l=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,l,s;r<l;++r){for(var u=0,f=0,h=0;u<s;++u){for(var p=e[t[u]],m=p[r][1]||0,b=p[r-1][1]||0,x=(m-b)/2,S=0;S<u;++S){var E=e[t[S]],C=E[r][1]||0,A=E[r-1][1]||0;x+=C-A}f+=m,h+=x*m}i[r-1][1]+=i[r-1][0]=n,f&&(n-=h/f)}i[r-1][1]+=i[r-1][0]=n,Rs(e,t)}}var Qy={},Zy={},o_;function hW(){return o_||(o_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==="__proto__"}e.isUnsafeProperty=t})(Zy)),Zy}var Jy={},l_;function yk(){return l_||(l_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){switch(typeof n){case"number":case"symbol":return!1;case"string":return n.includes(".")||n.includes("[")||n.includes("]")}}e.isDeepKey=t})(Jy)),Jy}var e0={},s_;function n1(){return s_||(s_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="string"||typeof n=="symbol"?n:Object.is(n?.valueOf?.(),-0)?"-0":String(n)}e.toKey=t})(e0)),e0}var t0={},n0={},c_;function pW(){return c_||(c_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(n==null)return"";if(typeof n=="string")return n;if(Array.isArray(n))return n.map(t).join(",");const r=String(n);return r==="0"&&Object.is(Number(n),-0)?"-0":r}e.toString=t})(n0)),n0}var u_;function r1(){return u_||(u_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=pW(),n=n1();function r(i){if(Array.isArray(i))return i.map(n.toKey);if(typeof i=="symbol")return[i];i=t.toString(i);const l=[],s=i.length;if(s===0)return l;let u=0,f="",h="",p=!1;for(i.charCodeAt(0)===46&&(l.push(""),u++);u<s;){const m=i[u];h?m==="\\"&&u+1<s?(u++,f+=i[u]):m===h?h="":f+=m:p?m==='"'||m==="'"?h=m:m==="]"?(p=!1,l.push(f),f=""):f+=m:m==="["?(p=!0,f&&(l.push(f),f="")):m==="."?f&&(l.push(f),f=""):f+=m,u++}return f&&l.push(f),l}e.toPath=r})(t0)),t0}var f_;function a1(){return f_||(f_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=hW(),n=yk(),r=n1(),i=r1();function l(u,f,h){if(u==null)return h;switch(typeof f){case"string":{if(t.isUnsafeProperty(f))return h;const p=u[f];return p===void 0?n.isDeepKey(f)?l(u,i.toPath(f),h):h:p}case"number":case"symbol":{typeof f=="number"&&(f=r.toKey(f));const p=u[f];return p===void 0?h:p}default:{if(Array.isArray(f))return s(u,f,h);if(Object.is(f?.valueOf(),-0)?f="-0":f=String(f),t.isUnsafeProperty(f))return h;const p=u[f];return p===void 0?h:p}}}function s(u,f,h){if(f.length===0)return h;let p=u;for(let m=0;m<f.length;m++){if(p==null||t.isUnsafeProperty(f[m]))return h;p=p[f[m]]}return p===void 0?h:p}e.get=l})(Qy)),Qy}var r0,d_;function mW(){return d_||(d_=1,r0=a1().get),r0}var vW=mW();const Cm=Ma(vW);var Lr=e=>e===0?0:e>0?1:-1,ca=e=>typeof e=="number"&&e!=+e,yi=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,Ne=e=>(typeof e=="number"||e instanceof Number)&&!ca(e),_a=e=>Ne(e)||typeof e=="string",gW=0,Lu=e=>{var t=++gW;return"".concat(e||"").concat(t)},yo=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ne(t)&&typeof t!="string")return r;var l;if(yi(t)){if(n==null)return r;var s=t.indexOf("%");l=n*parseFloat(t.slice(0,s))/100}else l=+t;return ca(l)&&(l=r),i&&n!=null&&l>n&&(l=n),l},bk=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[e[r]])n[e[r]]=!0;else return!0;return!1};function ya(e,t,n){return Ne(e)&&Ne(t)?e+n*(t-e):t}function xk(e,t,n){if(!(!e||!e.length))return e.find(r=>r&&(typeof t=="function"?t(r):Cm(r,t))===n)}var En=e=>e===null||typeof e>"u",i1=e=>En(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function yW(e){return e!=null}function hf(){}var wk=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,o1=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(v.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var r={};return Object.keys(n).forEach(i=>{e1(i)&&(r[i]=(l=>n[i](n,l)))}),r},bW=(e,t,n)=>r=>(e(t,n,r),null),xW=(e,t,n)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var r=null;return Object.keys(e).forEach(i=>{var l=e[i];e1(i)&&typeof l=="function"&&(r||(r={}),r[i]=bW(l,t,n))}),r};function h_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function wW(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?h_(Object(n),!0).forEach(function(r){SW(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function SW(e,t,n){return(t=EW(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EW(e){var t=CW(e,"string");return typeof t=="symbol"?t:t+""}function CW(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xr(e,t){var n=wW({},e),r=t,i=Object.keys(t),l=i.reduce((s,u)=>(s[u]===void 0&&r[u]!==void 0&&(s[u]=r[u]),s),n);return l}var a0={},i0={},p_;function AW(){return p_||(p_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){const i=new Map;for(let l=0;l<n.length;l++){const s=n[l],u=r(s);i.has(u)||i.set(u,s)}return Array.from(i.values())}e.uniqBy=t})(i0)),i0}var o0={},m_;function Sk(){return m_||(m_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n}e.identity=t})(o0)),o0}var l0={},s0={},c0={},v_;function OW(){return v_||(v_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Number.isSafeInteger(n)&&n>=0}e.isLength=t})(c0)),c0}var g_;function l1(){return g_||(g_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=OW();function n(r){return r!=null&&typeof r!="function"&&t.isLength(r.length)}e.isArrayLike=n})(s0)),s0}var u0={},y_;function NW(){return y_||(y_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="object"&&n!==null}e.isObjectLike=t})(u0)),u0}var b_;function _W(){return b_||(b_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=l1(),n=NW();function r(i){return n.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=r})(l0)),l0}var f0={},d0={},x_;function jW(){return x_||(x_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=a1();function n(r){return function(i){return t.get(i,r)}}e.property=n})(d0)),d0}var h0={},p0={},m0={},v0={},w_;function Ek(){return w_||(w_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n!==null&&(typeof n=="object"||typeof n=="function")}e.isObject=t})(v0)),v0}var g0={},S_;function Ck(){return S_||(S_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null||typeof n!="object"&&typeof n!="function"}e.isPrimitive=t})(g0)),g0}var y0={},E_;function Ak(){return E_||(E_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return n===r||Number.isNaN(n)&&Number.isNaN(r)}e.eq=t})(y0)),y0}var C_;function TW(){return C_||(C_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ek(),n=Ck(),r=Ak();function i(p,m,b){return typeof b!="function"?i(p,m,()=>{}):l(p,m,function x(S,E,C,A,_,N){const j=b(S,E,C,A,_,N);return j!==void 0?!!j:l(S,E,x,N)},new Map)}function l(p,m,b,x){if(m===p)return!0;switch(typeof m){case"object":return s(p,m,b,x);case"function":return Object.keys(m).length>0?l(p,{...m},b,x):r.eq(p,m);default:return t.isObject(p)?typeof m=="string"?m==="":!0:r.eq(p,m)}}function s(p,m,b,x){if(m==null)return!0;if(Array.isArray(m))return f(p,m,b,x);if(m instanceof Map)return u(p,m,b,x);if(m instanceof Set)return h(p,m,b,x);const S=Object.keys(m);if(p==null)return S.length===0;if(S.length===0)return!0;if(x?.has(m))return x.get(m)===p;x?.set(m,p);try{for(let E=0;E<S.length;E++){const C=S[E];if(!n.isPrimitive(p)&&!(C in p)||m[C]===void 0&&p[C]!==void 0||m[C]===null&&p[C]!==null||!b(p[C],m[C],C,p,m,x))return!1}return!0}finally{x?.delete(m)}}function u(p,m,b,x){if(m.size===0)return!0;if(!(p instanceof Map))return!1;for(const[S,E]of m.entries()){const C=p.get(S);if(b(C,E,S,p,m,x)===!1)return!1}return!0}function f(p,m,b,x){if(m.length===0)return!0;if(!Array.isArray(p))return!1;const S=new Set;for(let E=0;E<m.length;E++){const C=m[E];let A=!1;for(let _=0;_<p.length;_++){if(S.has(_))continue;const N=p[_];let j=!1;if(b(N,C,E,p,m,x)&&(j=!0),j){S.add(_),A=!0;break}}if(!A)return!1}return!0}function h(p,m,b,x){return m.size===0?!0:p instanceof Set?f([...p],[...m],b,x):!1}e.isMatchWith=i,e.isSetMatch=h})(m0)),m0}var A_;function Ok(){return A_||(A_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=TW();function n(r,i){return t.isMatchWith(r,i,()=>{})}e.isMatch=n})(p0)),p0}var b0={},x0={},w0={},O_;function MW(){return O_||(O_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Object.getOwnPropertySymbols(n).filter(r=>Object.prototype.propertyIsEnumerable.call(n,r))}e.getSymbols=t})(w0)),w0}var S0={},N_;function Nk(){return N_||(N_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}e.getTag=t})(S0)),S0}var E0={},__;function _k(){return __||(__=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",n="[object String]",r="[object Number]",i="[object Boolean]",l="[object Arguments]",s="[object Symbol]",u="[object Date]",f="[object Map]",h="[object Set]",p="[object Array]",m="[object Function]",b="[object ArrayBuffer]",x="[object Object]",S="[object Error]",E="[object DataView]",C="[object Uint8Array]",A="[object Uint8ClampedArray]",_="[object Uint16Array]",N="[object Uint32Array]",j="[object BigUint64Array]",T="[object Int8Array]",k="[object Int16Array]",R="[object Int32Array]",D="[object BigInt64Array]",B="[object Float32Array]",Q="[object Float64Array]";e.argumentsTag=l,e.arrayBufferTag=b,e.arrayTag=p,e.bigInt64ArrayTag=D,e.bigUint64ArrayTag=j,e.booleanTag=i,e.dataViewTag=E,e.dateTag=u,e.errorTag=S,e.float32ArrayTag=B,e.float64ArrayTag=Q,e.functionTag=m,e.int16ArrayTag=k,e.int32ArrayTag=R,e.int8ArrayTag=T,e.mapTag=f,e.numberTag=r,e.objectTag=x,e.regexpTag=t,e.setTag=h,e.stringTag=n,e.symbolTag=s,e.uint16ArrayTag=_,e.uint32ArrayTag=N,e.uint8ArrayTag=C,e.uint8ClampedArrayTag=A})(E0)),E0}var C0={},j_;function RW(){return j_||(j_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}e.isTypedArray=t})(C0)),C0}var T_;function jk(){return T_||(T_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=MW(),n=Nk(),r=_k(),i=Ck(),l=RW();function s(p,m){return u(p,void 0,p,new Map,m)}function u(p,m,b,x=new Map,S=void 0){const E=S?.(p,m,b,x);if(E!==void 0)return E;if(i.isPrimitive(p))return p;if(x.has(p))return x.get(p);if(Array.isArray(p)){const C=new Array(p.length);x.set(p,C);for(let A=0;A<p.length;A++)C[A]=u(p[A],A,b,x,S);return Object.hasOwn(p,"index")&&(C.index=p.index),Object.hasOwn(p,"input")&&(C.input=p.input),C}if(p instanceof Date)return new Date(p.getTime());if(p instanceof RegExp){const C=new RegExp(p.source,p.flags);return C.lastIndex=p.lastIndex,C}if(p instanceof Map){const C=new Map;x.set(p,C);for(const[A,_]of p)C.set(A,u(_,A,b,x,S));return C}if(p instanceof Set){const C=new Set;x.set(p,C);for(const A of p)C.add(u(A,void 0,b,x,S));return C}if(typeof Buffer<"u"&&Buffer.isBuffer(p))return p.subarray();if(l.isTypedArray(p)){const C=new(Object.getPrototypeOf(p)).constructor(p.length);x.set(p,C);for(let A=0;A<p.length;A++)C[A]=u(p[A],A,b,x,S);return C}if(p instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&p instanceof SharedArrayBuffer)return p.slice(0);if(p instanceof DataView){const C=new DataView(p.buffer.slice(0),p.byteOffset,p.byteLength);return x.set(p,C),f(C,p,b,x,S),C}if(typeof File<"u"&&p instanceof File){const C=new File([p],p.name,{type:p.type});return x.set(p,C),f(C,p,b,x,S),C}if(typeof Blob<"u"&&p instanceof Blob){const C=new Blob([p],{type:p.type});return x.set(p,C),f(C,p,b,x,S),C}if(p instanceof Error){const C=new p.constructor;return x.set(p,C),C.message=p.message,C.name=p.name,C.stack=p.stack,C.cause=p.cause,f(C,p,b,x,S),C}if(p instanceof Boolean){const C=new Boolean(p.valueOf());return x.set(p,C),f(C,p,b,x,S),C}if(p instanceof Number){const C=new Number(p.valueOf());return x.set(p,C),f(C,p,b,x,S),C}if(p instanceof String){const C=new String(p.valueOf());return x.set(p,C),f(C,p,b,x,S),C}if(typeof p=="object"&&h(p)){const C=Object.create(Object.getPrototypeOf(p));return x.set(p,C),f(C,p,b,x,S),C}return p}function f(p,m,b=p,x,S){const E=[...Object.keys(m),...t.getSymbols(m)];for(let C=0;C<E.length;C++){const A=E[C],_=Object.getOwnPropertyDescriptor(p,A);(_==null||_.writable)&&(p[A]=u(m[A],A,b,x,S))}}function h(p){switch(n.getTag(p)){case r.argumentsTag:case r.arrayTag:case r.arrayBufferTag:case r.dataViewTag:case r.booleanTag:case r.dateTag:case r.float32ArrayTag:case r.float64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.mapTag:case r.numberTag:case r.objectTag:case r.regexpTag:case r.setTag:case r.stringTag:case r.symbolTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=s,e.cloneDeepWithImpl=u,e.copyProperties=f})(x0)),x0}var M_;function DW(){return M_||(M_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=jk();function n(r){return t.cloneDeepWithImpl(r,void 0,r,new Map,void 0)}e.cloneDeep=n})(b0)),b0}var R_;function PW(){return R_||(R_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ok(),n=DW();function r(i){return i=n.cloneDeep(i),l=>t.isMatch(l,i)}e.matches=r})(h0)),h0}var A0={},O0={},N0={},D_;function kW(){return D_||(D_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=jk(),n=_k();function r(i,l){return t.cloneDeepWith(i,(s,u,f,h)=>{const p=l?.(s,u,f,h);if(p!==void 0)return p;if(typeof i=="object")switch(Object.prototype.toString.call(i)){case n.numberTag:case n.stringTag:case n.booleanTag:{const m=new i.constructor(i?.valueOf());return t.copyProperties(m,i),m}case n.argumentsTag:{const m={};return t.copyProperties(m,i),m.length=i.length,m[Symbol.iterator]=i[Symbol.iterator],m}default:return}})}e.cloneDeepWith=r})(N0)),N0}var P_;function IW(){return P_||(P_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=kW();function n(r){return t.cloneDeepWith(r)}e.cloneDeep=n})(O0)),O0}var _0={},j0={},k_;function Tk(){return k_||(k_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function n(r,i=Number.MAX_SAFE_INTEGER){switch(typeof r){case"number":return Number.isInteger(r)&&r>=0&&r<i;case"symbol":return!1;case"string":return t.test(r)}}e.isIndex=n})(j0)),j0}var T0={},I_;function LW(){return I_||(I_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Nk();function n(r){return r!==null&&typeof r=="object"&&t.getTag(r)==="[object Arguments]"}e.isArguments=n})(T0)),T0}var L_;function zW(){return L_||(L_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=yk(),n=Tk(),r=LW(),i=r1();function l(s,u){let f;if(Array.isArray(u)?f=u:typeof u=="string"&&t.isDeepKey(u)&&s?.[u]==null?f=i.toPath(u):f=[u],f.length===0)return!1;let h=s;for(let p=0;p<f.length;p++){const m=f[p];if((h==null||!Object.hasOwn(h,m))&&!((Array.isArray(h)||r.isArguments(h))&&n.isIndex(m)&&m<h.length))return!1;h=h[m]}return!0}e.has=l})(_0)),_0}var z_;function $W(){return z_||(z_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ok(),n=n1(),r=IW(),i=a1(),l=zW();function s(u,f){switch(typeof u){case"object":{Object.is(u?.valueOf(),-0)&&(u="-0");break}case"number":{u=n.toKey(u);break}}return f=r.cloneDeep(f),function(h){const p=i.get(h,u);return p===void 0?l.has(h,u):f===void 0?p===void 0:t.isMatch(p,f)}}e.matchesProperty=s})(A0)),A0}var $_;function BW(){return $_||($_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Sk(),n=jW(),r=PW(),i=$W();function l(s){if(s==null)return t.identity;switch(typeof s){case"function":return s;case"object":return Array.isArray(s)&&s.length===2?i.matchesProperty(s[0],s[1]):r.matches(s);case"string":case"symbol":case"number":return n.property(s)}}e.iteratee=l})(f0)),f0}var B_;function UW(){return B_||(B_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=AW(),n=Sk(),r=_W(),i=BW();function l(s,u=n.identity){return r.isArrayLikeObject(s)?t.uniqBy(Array.from(s),i.iteratee(u)):[]}e.uniqBy=l})(a0)),a0}var M0,U_;function HW(){return U_||(U_=1,M0=UW().uniqBy),M0}var qW=HW();const H_=Ma(qW);function FW(e,t,n){return t===!0?H_(e,n):typeof t=="function"?H_(e,t):e}var R0={exports:{}},D0={};var q_;function KW(){if(q_)return D0;q_=1;var e=Bs(),t=AD();function n(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,l=e.useRef,s=e.useEffect,u=e.useMemo,f=e.useDebugValue;return D0.useSyncExternalStoreWithSelector=function(h,p,m,b,x){var S=l(null);if(S.current===null){var E={hasValue:!1,value:null};S.current=E}else E=S.current;S=u(function(){function A(k){if(!_){if(_=!0,N=k,k=b(k),x!==void 0&&E.hasValue){var R=E.value;if(x(R,k))return j=R}return j=k}if(R=j,r(N,k))return R;var D=b(k);return x!==void 0&&x(R,D)?(N=k,R):(N=k,j=D)}var _=!1,N,j,T=m===void 0?null:m;return[function(){return A(p())},T===null?void 0:function(){return A(T())}]},[p,m,b,x]);var C=i(h,S[0],S[1]);return s(function(){E.hasValue=!0,E.value=C},[C]),f(C),C},D0}var F_;function VW(){return F_||(F_=1,R0.exports=KW()),R0.exports}var GW=VW(),s1=v.createContext(null),YW=e=>e,un=()=>{var e=v.useContext(s1);return e?e.store.dispatch:YW},Th=()=>{},WW=()=>Th,XW=(e,t)=>e===t;function je(e){var t=v.useContext(s1);return GW.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:WW,t?t.store.getState:Th,t?t.store.getState:Th,t?e:Th,XW)}function QW(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function ZW(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function JW(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var K_=e=>Array.isArray(e)?e:[e];function eX(e){const t=Array.isArray(e[0])?e[0]:e;return JW(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function tX(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var nX=class{constructor(e){this.value=e}deref(){return this.value}},rX=typeof WeakRef<"u"?WeakRef:nX,aX=0,V_=1;function ih(){return{s:aX,v:void 0,o:null,p:null}}function Mk(e,t={}){let n=ih();const{resultEqualityCheck:r}=t;let i,l=0;function s(){let u=n;const{length:f}=arguments;for(let m=0,b=f;m<b;m++){const x=arguments[m];if(typeof x=="function"||typeof x=="object"&&x!==null){let S=u.o;S===null&&(u.o=S=new WeakMap);const E=S.get(x);E===void 0?(u=ih(),S.set(x,u)):u=E}else{let S=u.p;S===null&&(u.p=S=new Map);const E=S.get(x);E===void 0?(u=ih(),S.set(x,u)):u=E}}const h=u;let p;if(u.s===V_)p=u.v;else if(p=e.apply(null,arguments),l++,r){const m=i?.deref?.()??i;m!=null&&r(m,p)&&(p=m,l!==0&&l--),i=typeof p=="object"&&p!==null||typeof p=="function"?new rX(p):p}return h.s=V_,h.v=p,p}return s.clearCache=()=>{n=ih(),s.resetResultsCount()},s.resultsCount=()=>l,s.resetResultsCount=()=>{l=0},s}function iX(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let l=0,s=0,u,f={},h=i.pop();typeof h=="object"&&(f=h,h=i.pop()),QW(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const p={...n,...f},{memoize:m,memoizeOptions:b=[],argsMemoize:x=Mk,argsMemoizeOptions:S=[]}=p,E=K_(b),C=K_(S),A=eX(i),_=m(function(){return l++,h.apply(null,arguments)},...E),N=x(function(){s++;const T=tX(A,arguments);return u=_.apply(null,T),u},...C);return Object.assign(N,{resultFunc:h,memoizedResultFunc:_,dependencies:A,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>u,recomputations:()=>l,resetRecomputations:()=>{l=0},memoize:m,argsMemoize:x})};return Object.assign(r,{withTypes:()=>r}),r}var oe=iX(Mk),oX=Object.assign((e,t=oe)=>{ZW(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(l=>e[l]);return t(r,(...l)=>l.reduce((s,u,f)=>(s[n[f]]=u,s),{}))},{withTypes:()=>oX}),P0={},k0={},I0={},G_;function lX(){return G_||(G_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"?1:r===null?2:r===void 0?3:r!==r?4:0}const n=(r,i,l)=>{if(r!==i){const s=t(r),u=t(i);if(s===u&&s===0){if(r<i)return l==="desc"?1:-1;if(r>i)return l==="desc"?-1:1}return l==="desc"?u-s:s-u}return 0};e.compareValues=n})(I0)),I0}var L0={},z0={},Y_;function Rk(){return Y_||(Y_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"||n instanceof Symbol}e.isSymbol=t})(z0)),z0}var W_;function sX(){return W_||(W_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Rk(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(l,s){return Array.isArray(l)?!1:typeof l=="number"||typeof l=="boolean"||l==null||t.isSymbol(l)?!0:typeof l=="string"&&(r.test(l)||!n.test(l))||s!=null&&Object.hasOwn(s,l)}e.isKey=i})(L0)),L0}var X_;function cX(){return X_||(X_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=lX(),n=sX(),r=r1();function i(l,s,u,f){if(l==null)return[];u=f?void 0:u,Array.isArray(l)||(l=Object.values(l)),Array.isArray(s)||(s=s==null?[null]:[s]),s.length===0&&(s=[null]),Array.isArray(u)||(u=u==null?[]:[u]),u=u.map(x=>String(x));const h=(x,S)=>{let E=x;for(let C=0;C<S.length&&E!=null;++C)E=E[S[C]];return E},p=(x,S)=>S==null||x==null?S:typeof x=="object"&&"key"in x?Object.hasOwn(S,x.key)?S[x.key]:h(S,x.path):typeof x=="function"?x(S):Array.isArray(x)?h(S,x):typeof S=="object"?S[x]:S,m=s.map(x=>(Array.isArray(x)&&x.length===1&&(x=x[0]),x==null||typeof x=="function"||Array.isArray(x)||n.isKey(x)?x:{key:x,path:r.toPath(x)}));return l.map(x=>({original:x,criteria:m.map(S=>p(S,x))})).slice().sort((x,S)=>{for(let E=0;E<m.length;E++){const C=t.compareValues(x.criteria[E],S.criteria[E],u[E]);if(C!==0)return C}return 0}).map(x=>x.original)}e.orderBy=i})(k0)),k0}var $0={},Q_;function uX(){return Q_||(Q_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r=1){const i=[],l=Math.floor(r),s=(u,f)=>{for(let h=0;h<u.length;h++){const p=u[h];Array.isArray(p)&&f<l?s(p,f+1):i.push(p)}};return s(n,0),i}e.flatten=t})($0)),$0}var B0={},Z_;function Dk(){return Z_||(Z_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Tk(),n=l1(),r=Ek(),i=Ak();function l(s,u,f){return r.isObject(f)&&(typeof u=="number"&&n.isArrayLike(f)&&t.isIndex(u)&&u<f.length||typeof u=="string"&&u in f)?i.eq(f[u],s):!1}e.isIterateeCall=l})(B0)),B0}var J_;function fX(){return J_||(J_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=cX(),n=uX(),r=Dk();function i(l,...s){const u=s.length;return u>1&&r.isIterateeCall(l,s[0],s[1])?s=[]:u>2&&r.isIterateeCall(s[0],s[1],s[2])&&(s=[s[0]]),t.orderBy(l,n.flatten(s),["asc"])}e.sortBy=i})(P0)),P0}var U0,ej;function dX(){return ej||(ej=1,U0=fX().sortBy),U0}var hX=dX();const Am=Ma(hX);var Pk=e=>e.legend.settings,pX=e=>e.legend.size,mX=e=>e.legend.payload;oe([mX,Pk],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?Am(r,n):r});var oh=1;function vX(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,n]=v.useState({height:0,left:0,top:0,width:0}),r=v.useCallback(i=>{if(i!=null){var l=i.getBoundingClientRect(),s={height:l.height,left:l.left,top:l.top,width:l.width};(Math.abs(s.height-t.height)>oh||Math.abs(s.left-t.left)>oh||Math.abs(s.top-t.top)>oh||Math.abs(s.width-t.width)>oh)&&n({height:s.height,left:s.left,top:s.top,width:s.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,r]}function xn(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 gX=typeof Symbol=="function"&&Symbol.observable||"@@observable",tj=gX,H0=()=>Math.random().toString(36).substring(7).split("").join("."),yX={INIT:`@@redux/INIT${H0()}`,REPLACE:`@@redux/REPLACE${H0()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${H0()}`},np=yX;function c1(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 kk(e,t,n){if(typeof e!="function")throw new Error(xn(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(xn(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(xn(1));return n(kk)(e,t)}let r=e,i=t,l=new Map,s=l,u=0,f=!1;function h(){s===l&&(s=new Map,l.forEach((C,A)=>{s.set(A,C)}))}function p(){if(f)throw new Error(xn(3));return i}function m(C){if(typeof C!="function")throw new Error(xn(4));if(f)throw new Error(xn(5));let A=!0;h();const _=u++;return s.set(_,C),function(){if(A){if(f)throw new Error(xn(6));A=!1,h(),s.delete(_),l=null}}}function b(C){if(!c1(C))throw new Error(xn(7));if(typeof C.type>"u")throw new Error(xn(8));if(typeof C.type!="string")throw new Error(xn(17));if(f)throw new Error(xn(9));try{f=!0,i=r(i,C)}finally{f=!1}return(l=s).forEach(_=>{_()}),C}function x(C){if(typeof C!="function")throw new Error(xn(10));r=C,b({type:np.REPLACE})}function S(){const C=m;return{subscribe(A){if(typeof A!="object"||A===null)throw new Error(xn(11));function _(){const j=A;j.next&&j.next(p())}return _(),{unsubscribe:C(_)}},[tj](){return this}}}return b({type:np.INIT}),{dispatch:b,subscribe:m,getState:p,replaceReducer:x,[tj]:S}}function bX(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:np.INIT})>"u")throw new Error(xn(12));if(typeof n(void 0,{type:np.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(xn(13))})}function Ik(e){const t=Object.keys(e),n={};for(let l=0;l<t.length;l++){const s=t[l];typeof e[s]=="function"&&(n[s]=e[s])}const r=Object.keys(n);let i;try{bX(n)}catch(l){i=l}return function(s={},u){if(i)throw i;let f=!1;const h={};for(let p=0;p<r.length;p++){const m=r[p],b=n[m],x=s[m],S=b(x,u);if(typeof S>"u")throw u&&u.type,new Error(xn(14));h[m]=S,f=f||S!==x}return f=f||r.length!==Object.keys(s).length,f?h:s}}function rp(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function xX(...e){return t=>(n,r)=>{const i=t(n,r);let l=()=>{throw new Error(xn(15))};const s={getState:i.getState,dispatch:(f,...h)=>l(f,...h)},u=e.map(f=>f(s));return l=rp(...u)(i.dispatch),{...i,dispatch:l}}}function Lk(e){return c1(e)&&"type"in e&&typeof e.type=="string"}var zk=Symbol.for("immer-nothing"),nj=Symbol.for("immer-draftable"),zn=Symbol.for("immer-state");function ea(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var vr=Object,Ds=vr.getPrototypeOf,ap="constructor",Om="prototype",lx="configurable",ip="enumerable",Mh="writable",zu="value",bi=e=>!!e&&!!e[zn];function ua(e){return e?$k(e)||Nm(e)||!!e[nj]||!!e[ap]?.[nj]||_m(e)||jm(e):!1}var wX=vr[Om][ap].toString(),rj=new WeakMap;function $k(e){if(!e||!u1(e))return!1;const t=Ds(e);if(t===null||t===vr[Om])return!0;const n=vr.hasOwnProperty.call(t,ap)&&t[ap];if(n===Object)return!0;if(!xs(n))return!1;let r=rj.get(n);return r===void 0&&(r=Function.toString.call(n),rj.set(n,r)),r===wX}function pf(e,t,n=!0){mf(e)===0?(n?Reflect.ownKeys(e):vr.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function mf(e){const t=e[zn];return t?t.type_:Nm(e)?1:_m(e)?2:jm(e)?3:0}var aj=(e,t,n=mf(e))=>n===2?e.has(t):vr[Om].hasOwnProperty.call(e,t),sx=(e,t,n=mf(e))=>n===2?e.get(t):e[t],op=(e,t,n,r=mf(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function SX(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Nm=Array.isArray,_m=e=>e instanceof Map,jm=e=>e instanceof Set,u1=e=>typeof e=="object",xs=e=>typeof e=="function",q0=e=>typeof e=="boolean",ti=e=>e.copy_||e.base_,f1=e=>e.modified_?e.copy_:e.base_;function cx(e,t){if(_m(e))return new Map(e);if(jm(e))return new Set(e);if(Nm(e))return Array[Om].slice.call(e);const n=$k(e);if(t===!0||t==="class_only"&&!n){const r=vr.getOwnPropertyDescriptors(e);delete r[zn];let i=Reflect.ownKeys(r);for(let l=0;l<i.length;l++){const s=i[l],u=r[s];u[Mh]===!1&&(u[Mh]=!0,u[lx]=!0),(u.get||u.set)&&(r[s]={[lx]:!0,[Mh]:!0,[ip]:u[ip],[zu]:e[s]})}return vr.create(Ds(e),r)}else{const r=Ds(e);if(r!==null&&n)return{...e};const i=vr.create(r);return vr.assign(i,e)}}function d1(e,t=!1){return Tm(e)||bi(e)||!ua(e)||(mf(e)>1&&vr.defineProperties(e,{set:lh,add:lh,clear:lh,delete:lh}),vr.freeze(e),t&&pf(e,(n,r)=>{d1(r,!0)},!1)),e}function EX(){ea(2)}var lh={[zu]:EX};function Tm(e){return e===null||!u1(e)?!0:vr.isFrozen(e)}var lp="MapSet",ux="Patches",Bk={};function Ps(e){const t=Bk[e];return t||ea(0,e),t}var CX=e=>!!Bk[e],$u,Uk=()=>$u,AX=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:CX(lp)?Ps(lp):void 0});function ij(e,t){t&&(e.patchPlugin_=Ps(ux),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function fx(e){dx(e),e.drafts_.forEach(OX),e.drafts_=null}function dx(e){e===$u&&($u=e.parent_)}var oj=e=>$u=AX($u,e);function OX(e){const t=e[zn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function lj(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[zn].modified_&&(fx(t),ea(4)),ua(e)&&(e=sj(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(n[zn].base_,e,t)}else e=sj(t,n);return NX(t,e,!0),fx(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==zk?e:void 0}function sj(e,t){if(Tm(t))return t;const n=t[zn];if(!n)return h1(t,e.handledSet_,e);if(!Mm(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(e);Fk(n,e)}return n.copy_}function NX(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&d1(t,n)}function Hk(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Mm=(e,t)=>e.scope_===t,_X=[];function qk(e,t,n,r){const i=ti(e),l=e.type_;if(r!==void 0&&sx(i,r,l)===t){op(i,r,n,l);return}if(!e.draftLocations_){const u=e.draftLocations_=new Map;pf(i,(f,h)=>{if(bi(h)){const p=u.get(h)||[];p.push(f),u.set(h,p)}})}const s=e.draftLocations_.get(t)??_X;for(const u of s)op(i,u,n,l)}function jX(e,t,n){e.callbacks_.push(function(i){const l=t;if(!l||!Mm(l,i))return;i.mapSetPlugin_?.fixSetContents(l);const s=f1(l);qk(e,l.draft_??l,s,n),Fk(l,i)})}function Fk(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||(e.assigned_?.size??0)>0)){const{patchPlugin_:r}=t;if(r){const i=r.getPath(e);i&&r.generatePatches_(e,i,t)}Hk(e)}}function TX(e,t,n){const{scope_:r}=e;if(bi(n)){const i=n[zn];Mm(i,r)&&i.callbacks_.push(function(){Rh(e);const s=f1(i);qk(e,n,s,t)})}else ua(n)&&e.callbacks_.push(function(){const l=ti(e);sx(l,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&h1(sx(e.copy_,t,e.type_),r.handledSet_,r)})}function h1(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||bi(e)||t.has(e)||!ua(e)||Tm(e)||(t.add(e),pf(e,(r,i)=>{if(bi(i)){const l=i[zn];if(Mm(l,n)){const s=f1(l);op(e,r,s,e.type_),Hk(l)}}else ua(i)&&h1(i,t,n)})),e}function MX(e,t){const n=Nm(e),r={type_:n?1:0,scope_:t?t.scope_:Uk(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,l=p1;n&&(i=[r],l=Bu);const{revoke:s,proxy:u}=Proxy.revocable(i,l);return r.draft_=u,r.revoke_=s,[u,r]}var p1={get(e,t){if(t===zn)return e;const n=ti(e);if(!aj(n,t,e.type_))return RX(e,n,t);const r=n[t];if(e.finalized_||!ua(r))return r;if(r===F0(e.base_,t)){Rh(e);const i=e.type_===1?+t:t,l=px(e.scope_,r,e,i);return e.copy_[i]=l}return r},has(e,t){return t in ti(e)},ownKeys(e){return Reflect.ownKeys(ti(e))},set(e,t,n){const r=Kk(ti(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=F0(ti(e),t),l=i?.[zn];if(l&&l.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(SX(n,i)&&(n!==void 0||aj(e.base_,t,e.type_)))return!0;Rh(e),hx(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),TX(e,t,n)),!0},deleteProperty(e,t){return Rh(e),F0(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),hx(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=ti(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Mh]:!0,[lx]:e.type_!==1||t!=="length",[ip]:r[ip],[zu]:n[t]}},defineProperty(){ea(11)},getPrototypeOf(e){return Ds(e.base_)},setPrototypeOf(){ea(12)}},Bu={};pf(p1,(e,t)=>{Bu[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}});Bu.deleteProperty=function(e,t){return Bu.set.call(this,e,t,void 0)};Bu.set=function(e,t,n){return p1.set.call(this,e[0],t,n,e[0])};function F0(e,t){const n=e[zn];return(n?ti(n):e)[t]}function RX(e,t,n){const r=Kk(t,n);return r?zu in r?r[zu]:r.get?.call(e.draft_):void 0}function Kk(e,t){if(!(t in e))return;let n=Ds(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ds(n)}}function hx(e){e.modified_||(e.modified_=!0,e.parent_&&hx(e.parent_))}function Rh(e){e.copy_||(e.assigned_=new Map,e.copy_=cx(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var DX=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(n,r,i)=>{if(xs(n)&&!xs(r)){const s=r;r=n;const u=this;return function(h=s,...p){return u.produce(h,m=>r.call(this,m,...p))}}xs(r)||ea(6),i!==void 0&&!xs(i)&&ea(7);let l;if(ua(n)){const s=oj(this),u=px(s,n,void 0);let f=!0;try{l=r(u),f=!1}finally{f?fx(s):dx(s)}return ij(s,i),lj(l,s)}else if(!n||!u1(n)){if(l=r(n),l===void 0&&(l=n),l===zk&&(l=void 0),this.autoFreeze_&&d1(l,!0),i){const s=[],u=[];Ps(ux).generateReplacementPatches_(n,l,{patches_:s,inversePatches_:u}),i(s,u)}return l}else ea(1,n)},this.produceWithPatches=(n,r)=>{if(xs(n))return(u,...f)=>this.produceWithPatches(u,h=>n(h,...f));let i,l;return[this.produce(n,r,(u,f)=>{i=u,l=f}),i,l]},q0(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),q0(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),q0(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){ua(t)||ea(8),bi(t)&&(t=aa(t));const n=oj(this),r=px(n,t,void 0);return r[zn].isManual_=!0,dx(n),r}finishDraft(t,n){const r=t&&t[zn];(!r||!r.isManual_)&&ea(9);const{scope_:i}=r;return ij(i,n),lj(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,n){let r;for(r=n.length-1;r>=0;r--){const l=n[r];if(l.path.length===0&&l.op==="replace"){t=l.value;break}}r>-1&&(n=n.slice(r+1));const i=Ps(ux).applyPatches_;return bi(t)?i(t,n):this.produce(t,l=>i(l,n))}};function px(e,t,n,r){const[i,l]=_m(t)?Ps(lp).proxyMap_(t,n):jm(t)?Ps(lp).proxySet_(t,n):MX(t,n);return(n?.scope_??Uk()).drafts_.push(i),l.callbacks_=n?.callbacks_??[],l.key_=r,n&&r!==void 0?jX(n,l,r):l.callbacks_.push(function(f){f.mapSetPlugin_?.fixSetContents(l);const{patchPlugin_:h}=f;l.modified_&&h&&h.generatePatches_(l,[],f)}),i}function aa(e){return bi(e)||ea(10,e),Vk(e)}function Vk(e){if(!ua(e)||Tm(e))return e;const t=e[zn];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=cx(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=cx(e,!0);return pf(n,(i,l)=>{op(n,i,Vk(l))},r),t&&(t.finalized_=!1),n}var PX=new DX,Gk=PX.produce;function Yk(e){return({dispatch:n,getState:r})=>i=>l=>typeof l=="function"?l(n,r,e):i(l)}var kX=Yk(),IX=Yk,LX=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?rp:rp.apply(null,arguments)};function Hr(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(yr(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>Lk(r)&&r.type===e,n}var Wk=class bu extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,bu.prototype)}static get[Symbol.species](){return bu}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new bu(...t[0].concat(this)):new bu(...t.concat(this))}};function cj(e){return ua(e)?Gk(e,()=>{}):e}function sh(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function zX(e){return typeof e=="boolean"}var $X=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:l=!0}=t??{};let s=new Wk;return n&&(zX(n)?s.push(kX):s.push(IX(n.extraArgument))),s},Xk="RTK_autoBatch",St=()=>e=>({payload:e,meta:{[Xk]:!0}}),uj=e=>t=>{setTimeout(t,e)},Qk=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,l=!1,s=!1;const u=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:uj(10):e.type==="callback"?e.queueNotification:uj(e.timeout),h=()=>{s=!1,l&&(l=!1,u.forEach(p=>p()))};return Object.assign({},r,{subscribe(p){const m=()=>i&&p(),b=r.subscribe(m);return u.add(p),()=>{b(),u.delete(p)}},dispatch(p){try{return i=!p?.meta?.[Xk],l=!i,l&&(s||(s=!0,f(h))),r.dispatch(p)}finally{i=!0}}})},BX=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new Wk(e);return r&&i.push(Qk(typeof r=="object"?r:void 0)),i};function UX(e){const t=$X(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:l=void 0,enhancers:s=void 0}=e||{};let u;if(typeof n=="function")u=n;else if(c1(n))u=Ik(n);else throw new Error(yr(1));let f;typeof r=="function"?f=r(t):f=t();let h=rp;i&&(h=LX({trace:!1,...typeof i=="object"&&i}));const p=xX(...f),m=BX(p);let b=typeof s=="function"?s(m):m();const x=h(...b);return kk(u,l,x)}function Zk(e){const t={},n=[];let r;const i={addCase(l,s){const u=typeof l=="string"?l:l.type;if(!u)throw new Error(yr(28));if(u in t)throw new Error(yr(29));return t[u]=s,i},addAsyncThunk(l,s){return s.pending&&(t[l.pending.type]=s.pending),s.rejected&&(t[l.rejected.type]=s.rejected),s.fulfilled&&(t[l.fulfilled.type]=s.fulfilled),s.settled&&n.push({matcher:l.settled,reducer:s.settled}),i},addMatcher(l,s){return n.push({matcher:l,reducer:s}),i},addDefaultCase(l){return r=l,i}};return e(i),[t,n,r]}function HX(e){return typeof e=="function"}function qX(e,t){let[n,r,i]=Zk(t),l;if(HX(e))l=()=>cj(e());else{const u=cj(e);l=()=>u}function s(u=l(),f){let h=[n[f.type],...r.filter(({matcher:p})=>p(f)).map(({reducer:p})=>p)];return h.filter(p=>!!p).length===0&&(h=[i]),h.reduce((p,m)=>{if(m)if(bi(p)){const x=m(p,f);return x===void 0?p:x}else{if(ua(p))return Gk(p,b=>m(b,f));{const b=m(p,f);if(b===void 0){if(p===null)return p;throw Error("A case reducer on a non-draftable value must not return undefined")}return b}}return p},u)}return s.getInitialState=l,s}var FX="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",KX=(e=21)=>{let t="",n=e;for(;n--;)t+=FX[Math.random()*64|0];return t},VX=Symbol.for("rtk-slice-createasyncthunk");function GX(e,t){return`${e}/${t}`}function YX({creators:e}={}){const t=e?.asyncThunk?.[VX];return function(r){const{name:i,reducerPath:l=i}=r;if(!i)throw new Error(yr(11));const s=(typeof r.reducers=="function"?r.reducers(XX()):r.reducers)||{},u=Object.keys(s),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},h={addCase(N,j){const T=typeof N=="string"?N:N.type;if(!T)throw new Error(yr(12));if(T in f.sliceCaseReducersByType)throw new Error(yr(13));return f.sliceCaseReducersByType[T]=j,h},addMatcher(N,j){return f.sliceMatchers.push({matcher:N,reducer:j}),h},exposeAction(N,j){return f.actionCreators[N]=j,h},exposeCaseReducer(N,j){return f.sliceCaseReducersByName[N]=j,h}};u.forEach(N=>{const j=s[N],T={reducerName:N,type:GX(i,N),createNotation:typeof r.reducers=="function"};ZX(j)?eQ(T,j,h,t):QX(T,j,h)});function p(){const[N={},j=[],T=void 0]=typeof r.extraReducers=="function"?Zk(r.extraReducers):[r.extraReducers],k={...N,...f.sliceCaseReducersByType};return qX(r.initialState,R=>{for(let D in k)R.addCase(D,k[D]);for(let D of f.sliceMatchers)R.addMatcher(D.matcher,D.reducer);for(let D of j)R.addMatcher(D.matcher,D.reducer);T&&R.addDefaultCase(T)})}const m=N=>N,b=new Map,x=new WeakMap;let S;function E(N,j){return S||(S=p()),S(N,j)}function C(){return S||(S=p()),S.getInitialState()}function A(N,j=!1){function T(R){let D=R[N];return typeof D>"u"&&j&&(D=sh(x,T,C)),D}function k(R=m){const D=sh(b,j,()=>new WeakMap);return sh(D,R,()=>{const B={};for(const[Q,F]of Object.entries(r.selectors??{}))B[Q]=WX(F,R,()=>sh(x,R,C),j);return B})}return{reducerPath:N,getSelectors:k,get selectors(){return k(T)},selectSlice:T}}const _={name:i,reducer:E,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:C,...A(l),injectInto(N,{reducerPath:j,...T}={}){const k=j??l;return N.inject({reducerPath:k,reducer:E},T),{..._,...A(k,!0)}}};return _}}function WX(e,t,n,r){function i(l,...s){let u=t(l);return typeof u>"u"&&r&&(u=n()),e(u,...s)}return i.unwrapped=e,i}var tr=YX();function XX(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function QX({type:e,reducerName:t,createNotation:n},r,i){let l,s;if("reducer"in r){if(n&&!JX(r))throw new Error(yr(17));l=r.reducer,s=r.prepare}else l=r;i.addCase(e,l).exposeCaseReducer(t,l).exposeAction(t,s?Hr(e,s):Hr(e))}function ZX(e){return e._reducerDefinitionType==="asyncThunk"}function JX(e){return e._reducerDefinitionType==="reducerWithPrepare"}function eQ({type:e,reducerName:t},n,r,i){if(!i)throw new Error(yr(18));const{payloadCreator:l,fulfilled:s,pending:u,rejected:f,settled:h,options:p}=n,m=i(e,l,p);r.exposeAction(t,m),s&&r.addCase(m.fulfilled,s),u&&r.addCase(m.pending,u),f&&r.addCase(m.rejected,f),h&&r.addMatcher(m.settled,h),r.exposeCaseReducer(t,{fulfilled:s||ch,pending:u||ch,rejected:f||ch,settled:h||ch})}function ch(){}var tQ="task",Jk="listener",eI="completed",m1="cancelled",nQ=`task-${m1}`,rQ=`task-${eI}`,mx=`${Jk}-${m1}`,aQ=`${Jk}-${eI}`,Rm=class{constructor(e){this.code=e,this.message=`${tQ} ${m1} (reason: ${e})`}name="TaskAbortError";message},v1=(e,t)=>{if(typeof e!="function")throw new TypeError(yr(32))},sp=()=>{},tI=(e,t=sp)=>(e.catch(t),e),nI=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Jo=(e,t)=>{const n=e.signal;n.aborted||("reason"in n||Object.defineProperty(n,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},el=e=>{if(e.aborted){const{reason:t}=e;throw new Rm(t)}};function rI(e,t){let n=sp;return new Promise((r,i)=>{const l=()=>i(new Rm(e.reason));if(e.aborted){l();return}n=nI(e,l),t.finally(()=>n()).then(r,i)}).finally(()=>{n=sp})}var iQ=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof Rm?"cancelled":"rejected",error:n}}finally{t?.()}},cp=e=>t=>tI(rI(e,t).then(n=>(el(e),n))),aI=e=>{const t=cp(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:Os}=Object,fj={},Dm="listenerMiddleware",oQ=(e,t)=>{const n=r=>nI(e,()=>Jo(r,e.reason));return(r,i)=>{v1(r);const l=new AbortController;n(l);const s=iQ(async()=>{el(e),el(l.signal);const u=await r({pause:cp(l.signal),delay:aI(l.signal),signal:l.signal});return el(l.signal),u},()=>Jo(l,rQ));return i?.autoJoin&&t.push(s.catch(sp)),{result:cp(e)(s),cancel(){Jo(l,nQ)}}}},lQ=(e,t)=>{const n=async(r,i)=>{el(t);let l=()=>{};const u=[new Promise((f,h)=>{let p=e({predicate:r,effect:(m,b)=>{b.unsubscribe(),f([m,b.getState(),b.getOriginalState()])}});l=()=>{p(),h()}})];i!=null&&u.push(new Promise(f=>setTimeout(f,i,null)));try{const f=await rI(t,Promise.race(u));return el(t),f}finally{l()}};return(r,i)=>tI(n(r,i))},iI=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:l}=e;if(t)i=Hr(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(yr(21));return v1(l),{predicate:i,type:t,effect:l}},oI=Os(e=>{const{type:t,predicate:n,effect:r}=iI(e);return{id:KX(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(yr(22))}}},{withTypes:()=>oI}),dj=(e,t)=>{const{type:n,effect:r,predicate:i}=iI(t);return Array.from(e.values()).find(l=>(typeof n=="string"?l.type===n:l.predicate===i)&&l.effect===r)},vx=e=>{e.pending.forEach(t=>{Jo(t,mx)})},sQ=(e,t)=>()=>{for(const n of t.keys())vx(n);e.clear()},hj=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},lI=Os(Hr(`${Dm}/add`),{withTypes:()=>lI}),cQ=Hr(`${Dm}/removeAll`),sI=Os(Hr(`${Dm}/remove`),{withTypes:()=>sI}),uQ=(...e)=>{console.error(`${Dm}/error`,...e)},vf=(e={})=>{const t=new Map,n=new Map,r=x=>{const S=n.get(x)??0;n.set(x,S+1)},i=x=>{const S=n.get(x)??1;S===1?n.delete(x):n.set(x,S-1)},{extra:l,onError:s=uQ}=e;v1(s);const u=x=>(x.unsubscribe=()=>t.delete(x.id),t.set(x.id,x),S=>{x.unsubscribe(),S?.cancelActive&&vx(x)}),f=x=>{const S=dj(t,x)??oI(x);return u(S)};Os(f,{withTypes:()=>f});const h=x=>{const S=dj(t,x);return S&&(S.unsubscribe(),x.cancelActive&&vx(S)),!!S};Os(h,{withTypes:()=>h});const p=async(x,S,E,C)=>{const A=new AbortController,_=lQ(f,A.signal),N=[];try{x.pending.add(A),r(x),await Promise.resolve(x.effect(S,Os({},E,{getOriginalState:C,condition:(j,T)=>_(j,T).then(Boolean),take:_,delay:aI(A.signal),pause:cp(A.signal),extra:l,signal:A.signal,fork:oQ(A.signal,N),unsubscribe:x.unsubscribe,subscribe:()=>{t.set(x.id,x)},cancelActiveListeners:()=>{x.pending.forEach((j,T,k)=>{j!==A&&(Jo(j,mx),k.delete(j))})},cancel:()=>{Jo(A,mx),x.pending.delete(A)},throwIfCancelled:()=>{el(A.signal)}})))}catch(j){j instanceof Rm||hj(s,j,{raisedBy:"effect"})}finally{await Promise.all(N),Jo(A,aQ),i(x),x.pending.delete(A)}},m=sQ(t,n);return{middleware:x=>S=>E=>{if(!Lk(E))return S(E);if(lI.match(E))return f(E.payload);if(cQ.match(E)){m();return}if(sI.match(E))return h(E.payload);let C=x.getState();const A=()=>{if(C===fj)throw new Error(yr(23));return C};let _;try{if(_=S(E),t.size>0){const N=x.getState(),j=Array.from(t.values());for(const T of j){let k=!1;try{k=T.predicate(E,N,C)}catch(R){k=!1,hj(s,R,{raisedBy:"predicate"})}k&&p(T,E,x,A)}}}finally{C=fj}return _},startListening:f,stopListening:h,clearListeners:m}};function yr(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 fQ={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},cI=tr({name:"chartLayout",initialState:fQ,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 n,r,i,l;e.margin.top=(n=t.payload.top)!==null&&n!==void 0?n:0,e.margin.right=(r=t.payload.right)!==null&&r!==void 0?r:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(l=t.payload.left)!==null&&l!==void 0?l:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:dQ,setLayout:hQ,setChartSize:pQ,setScale:mQ}=cI.actions,vQ=cI.reducer;function uI(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function pj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ws(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pj(Object(n),!0).forEach(function(r){gQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gQ(e,t,n){return(t=yQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yQ(e){var t=bQ(e,"string");return typeof t=="symbol"?t:t+""}function bQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rn(e,t,n){return En(e)||En(t)?n:_a(t)?Cm(e,t,n):typeof t=="function"?t(e):n}var xQ=(e,t,n)=>{if(t&&n){var{width:r,height:i}=n,{align:l,verticalAlign:s,layout:u}=t;if((u==="vertical"||u==="horizontal"&&s==="middle")&&l!=="center"&&Ne(e[l]))return ws(ws({},e),{},{[l]:e[l]+(r||0)});if((u==="horizontal"||u==="vertical"&&l==="center")&&s!=="middle"&&Ne(e[s]))return ws(ws({},e),{},{[s]:e[s]+(i||0)})}return e},Ci=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",fI=(e,t,n,r)=>{if(r)return e.map(u=>u.coordinate);var i,l,s=e.map(u=>(u.coordinate===t&&(i=!0),u.coordinate===n&&(l=!0),u.coordinate));return i||s.push(t),l||s.push(n),s},dI=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:i,range:l,scale:s,realScaleType:u,isCategorical:f,categoricalDomain:h,tickCount:p,ticks:m,niceTicks:b,axisType:x}=e;if(!s)return null;var S=u==="scaleBand"&&s.bandwidth?s.bandwidth()/2:2,E=i==="category"&&s.bandwidth?s.bandwidth()/S:0;if(E=x==="angleAxis"&&l&&l.length>=2?Lr(l[0]-l[1])*2*E:E,m||b){var C=(m||b||[]).map((A,_)=>{var N=r?r.indexOf(A):A;return{coordinate:s(N)+E,value:A,offset:E,index:_}});return C.filter(A=>!ca(A.coordinate))}return f&&h?h.map((A,_)=>({coordinate:s(A)+E,value:A,index:_,offset:E})):s.ticks&&p!=null?s.ticks(p).map((A,_)=>({coordinate:s(A)+E,value:A,offset:E,index:_})):s.domain().map((A,_)=>({coordinate:s(A)+E,value:r?r[A]:A,index:_,offset:E}))},mj=1e-4,wQ=e=>{var t=e.domain();if(!(!t||t.length<=2)){var n=t.length,r=e.range(),i=Math.min(r[0],r[1])-mj,l=Math.max(r[0],r[1])+mj,s=e(t[0]),u=e(t[n-1]);(s<i||s>l||u<i||u>l)&&e.domain([t[0],t[n-1]])}},SQ=e=>{var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,l=0,s=0;s<t;++s){var u=ca(e[s][n][1])?e[s][n][0]:e[s][n][1];u>=0?(e[s][n][0]=i,e[s][n][1]=i+u,i=e[s][n][1]):(e[s][n][0]=l,e[s][n][1]=l+u,l=e[s][n][1])}},EQ=e=>{var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,l=0;l<t;++l){var s=ca(e[l][n][1])?e[l][n][0]:e[l][n][1];s>=0?(e[l][n][0]=i,e[l][n][1]=i+s,i=e[l][n][1]):(e[l][n][0]=0,e[l][n][1]=0)}},CQ={sign:SQ,expand:uW,none:Rs,silhouette:fW,wiggle:dW,positive:EQ},AQ=(e,t,n)=>{var r=CQ[n],i=cW().keys(t).value((l,s)=>Number(Rn(l,s,0))).order(ox).offset(r);return i(e)};function OQ(e){return e==null?void 0:String(e)}function vj(e){var{axis:t,ticks:n,bandSize:r,entry:i,index:l,dataKey:s}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!En(i[t.dataKey])){var u=xk(n,"value",i[t.dataKey]);if(u)return u.coordinate+r/2}return n[l]?n[l].coordinate+r/2:null}var f=Rn(i,En(s)?t.dataKey:s);return En(f)?null:t.scale(f)}var NQ=e=>{var t=e.flat(2).filter(Ne);return[Math.min(...t),Math.max(...t)]},_Q=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],jQ=(e,t,n)=>{if(e!=null)return _Q(Object.keys(e).reduce((r,i)=>{var l=e[i],{stackedData:s}=l,u=s.reduce((f,h)=>{var p=uI(h,t,n),m=NQ(p);return[Math.min(f[0],m[0]),Math.max(f[1],m[1])]},[1/0,-1/0]);return[Math.min(u[0],r[0]),Math.max(u[1],r[1])]},[1/0,-1/0]))},gj=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,yj=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,up=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=Am(t,p=>p.coordinate),l=1/0,s=1,u=i.length;s<u;s++){var f=i[s],h=i[s-1];l=Math.min((f.coordinate||0)-(h.coordinate||0),l)}return l===1/0?0:l}return n?void 0:0};function bj(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:i,name:l}=e;return ws(ws({},t),{},{dataKey:n,payload:r,value:i,name:l})}function hI(e,t){if(e)return String(e);if(typeof t=="string")return t}var TQ=(e,t)=>{if(t==="horizontal")return e.chartX;if(t==="vertical")return e.chartY},MQ=(e,t)=>t==="centric"?e.angle:e.radius,Ai=e=>e.layout.width,Oi=e=>e.layout.height,RQ=e=>e.layout.scale,pI=e=>e.layout.margin,Pm=oe(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),km=oe(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),DQ="data-recharts-item-index",PQ="data-recharts-item-data-key",gf=60;function xj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function uh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xj(Object(n),!0).forEach(function(r){kQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kQ(e,t,n){return(t=IQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IQ(e){var t=LQ(e,"string");return typeof t=="symbol"?t:t+""}function LQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var zQ=e=>e.brush.height;function $Q(e){var t=km(e);return t.reduce((n,r)=>{if(r.orientation==="left"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:gf;return n+i}return n},0)}function BQ(e){var t=km(e);return t.reduce((n,r)=>{if(r.orientation==="right"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:gf;return n+i}return n},0)}function UQ(e){var t=Pm(e);return t.reduce((n,r)=>r.orientation==="top"&&!r.mirror&&!r.hide?n+r.height:n,0)}function HQ(e){var t=Pm(e);return t.reduce((n,r)=>r.orientation==="bottom"&&!r.mirror&&!r.hide?n+r.height:n,0)}var Cn=oe([Ai,Oi,pI,zQ,$Q,BQ,UQ,HQ,Pk,pX],(e,t,n,r,i,l,s,u,f,h)=>{var p={left:(n.left||0)+i,right:(n.right||0)+l},m={top:(n.top||0)+s,bottom:(n.bottom||0)+u},b=uh(uh({},m),p),x=b.bottom;b.bottom+=r,b=xQ(b,f,h);var S=e-b.left-b.right,E=t-b.top-b.bottom;return uh(uh({brushBottom:x},b),{},{width:Math.max(S,0),height:Math.max(E,0)})}),qQ=oe(Cn,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),mI=oe(Ai,Oi,(e,t)=>({x:0,y:0,width:e,height:t})),FQ=v.createContext(null),nr=()=>v.useContext(FQ)!=null,Im=e=>e.brush,Lm=oe([Im,Cn,pI],(e,t,n)=>({height:e.height,x:Ne(e.x)?e.x:t.left,y:Ne(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:Ne(e.width)?e.width:t.width})),K0={},V0={},G0={},wj;function KQ(){return wj||(wj=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r,{signal:i,edges:l}={}){let s,u=null;const f=l!=null&&l.includes("leading"),h=l==null||l.includes("trailing"),p=()=>{u!==null&&(n.apply(s,u),s=void 0,u=null)},m=()=>{h&&p(),E()};let b=null;const x=()=>{b!=null&&clearTimeout(b),b=setTimeout(()=>{b=null,m()},r)},S=()=>{b!==null&&(clearTimeout(b),b=null)},E=()=>{S(),s=void 0,u=null},C=()=>{p()},A=function(..._){if(i?.aborted)return;s=this,u=_;const N=b==null;x(),f&&N&&p()};return A.schedule=x,A.cancel=E,A.flush=C,i?.addEventListener("abort",E,{once:!0}),A}e.debounce=t})(G0)),G0}var Sj;function VQ(){return Sj||(Sj=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=KQ();function n(r,i=0,l={}){typeof l!="object"&&(l={});const{leading:s=!1,trailing:u=!0,maxWait:f}=l,h=Array(2);s&&(h[0]="leading"),u&&(h[1]="trailing");let p,m=null;const b=t.debounce(function(...E){p=r.apply(this,E),m=null},i,{edges:h}),x=function(...E){return f!=null&&(m===null&&(m=Date.now()),Date.now()-m>=f)?(p=r.apply(this,E),m=Date.now(),b.cancel(),b.schedule(),p):(b.apply(this,E),p)},S=()=>(b.flush(),p);return x.cancel=b.cancel,x.flush=S,x}e.debounce=n})(V0)),V0}var Ej;function GQ(){return Ej||(Ej=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=VQ();function n(r,i=0,l={}){const{leading:s=!0,trailing:u=!0}=l;return t.debounce(r,i,{leading:s,maxWait:i,trailing:u})}e.throttle=n})(K0)),K0}var Y0,Cj;function YQ(){return Cj||(Cj=1,Y0=GQ().throttle),Y0}var WQ=YQ();const XQ=Ma(WQ);var fp=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),l=2;l<r;l++)i[l-2]=arguments[l];if(typeof console<"u"&&console.warn&&(n===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(n===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=0;console.warn(n.replace(/%s/g,()=>i[s++]))}},vI=(e,t,n)=>{var{width:r="100%",height:i="100%",aspect:l,maxHeight:s}=n,u=yi(r)?e:Number(r),f=yi(i)?t:Number(i);return l&&l>0&&(u?f=u/l:f&&(u=f*l),s&&f!=null&&f>s&&(f=s)),{calculatedWidth:u,calculatedHeight:f}},QQ={width:0,height:0,overflow:"visible"},ZQ={width:0,overflowX:"visible"},JQ={height:0,overflowY:"visible"},eZ={},tZ=e=>{var{width:t,height:n}=e,r=yi(t),i=yi(n);return r&&i?QQ:r?ZQ:i?JQ:eZ};function nZ(e){var{width:t,height:n,aspect:r}=e,i=t,l=n;return i===void 0&&l===void 0?(i="100%",l="100%"):i===void 0?i=r&&r>0?void 0:"100%":l===void 0&&(l=r&&r>0?void 0:"100%"),{width:i,height:l}}function Tt(e){return Number.isFinite(e)}function ja(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function gx(){return gx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gx.apply(null,arguments)}function Aj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Oj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Aj(Object(n),!0).forEach(function(r){rZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Aj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rZ(e,t,n){return(t=aZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aZ(e){var t=iZ(e,"string");return typeof t=="symbol"?t:t+""}function iZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gI=v.createContext({width:-1,height:-1});function oZ(e){return ja(e.width)&&ja(e.height)}function yI(e){var{children:t,width:n,height:r}=e,i=v.useMemo(()=>({width:n,height:r}),[n,r]);return oZ(i)?v.createElement(gI.Provider,{value:i},t):null}var g1=()=>v.useContext(gI),lZ=v.forwardRef((e,t)=>{var{aspect:n,initialDimension:r={width:-1,height:-1},width:i,height:l,minWidth:s=0,minHeight:u,maxHeight:f,children:h,debounce:p=0,id:m,className:b,onResize:x,style:S={}}=e,E=v.useRef(null),C=v.useRef();C.current=x,v.useImperativeHandle(t,()=>E.current);var[A,_]=v.useState({containerWidth:r.width,containerHeight:r.height}),N=v.useCallback((D,B)=>{_(Q=>{var F=Math.round(D),G=Math.round(B);return Q.containerWidth===F&&Q.containerHeight===G?Q:{containerWidth:F,containerHeight:G}})},[]);v.useEffect(()=>{if(E.current==null||typeof ResizeObserver>"u")return hf;var D=G=>{var te,{width:ce,height:he}=G[0].contentRect;N(ce,he),(te=C.current)===null||te===void 0||te.call(C,ce,he)};p>0&&(D=XQ(D,p,{trailing:!0,leading:!1}));var B=new ResizeObserver(D),{width:Q,height:F}=E.current.getBoundingClientRect();return N(Q,F),B.observe(E.current),()=>{B.disconnect()}},[N,p]);var{containerWidth:j,containerHeight:T}=A;fp(!n||n>0,"The aspect(%s) must be greater than zero.",n);var{calculatedWidth:k,calculatedHeight:R}=vI(j,T,{width:i,height:l,aspect:n,maxHeight:f});return fp(k!=null&&k>0||R!=null&&R>0,`The width(%s) and height(%s) of chart should be greater than 0,
56
- please check the style of container, or the props width(%s) and height(%s),
57
- or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
58
- height and width.`,k,R,i,l,s,u,n),v.createElement("div",{id:m?"".concat(m):void 0,className:ht("recharts-responsive-container",b),style:Oj(Oj({},S),{},{width:i,height:l,minWidth:s,minHeight:u,maxHeight:f}),ref:E},v.createElement("div",{style:tZ({width:i,height:l})},v.createElement(yI,{width:k,height:R},h)))}),sZ=v.forwardRef((e,t)=>{var n=g1();if(ja(n.width)&&ja(n.height))return e.children;var{width:r,height:i}=nZ({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:l,calculatedHeight:s}=vI(void 0,void 0,{width:r,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return Ne(l)&&Ne(s)?v.createElement(yI,{width:l,height:s},e.children):v.createElement(lZ,gx({},e,{width:r,height:i,ref:t}))});function bI(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 zm=()=>{var e,t=nr(),n=je(qQ),r=je(Lm),i=(e=je(Im))===null||e===void 0?void 0:e.padding;return!t||!r||!i?n:{width:r.width-i.left-i.right,height:r.height-i.top-i.bottom,x:i.left,y:i.top}},cZ={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},xI=()=>{var e;return(e=je(Cn))!==null&&e!==void 0?e:cZ},wI=()=>je(Ai),SI=()=>je(Oi),pt=e=>e.layout.layoutType,yf=()=>je(pt),uZ=()=>{var e=yf();if(e==="horizontal"||e==="vertical")return e},fZ=()=>{var e=yf();return e!==void 0},$m=e=>{var t=un(),n=nr(),{width:r,height:i}=e,l=g1(),s=r,u=i;return l&&(s=l.width>0?l.width:r,u=l.height>0?l.height:i),v.useEffect(()=>{!n&&ja(s)&&ja(u)&&t(pQ({width:s,height:u}))},[t,n,s,u]),null},EI=Symbol.for("immer-nothing"),Nj=Symbol.for("immer-draftable"),br=Symbol.for("immer-state");function ta(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Uu=Object.getPrototypeOf;function ks(e){return!!e&&!!e[br]}function ul(e){return e?CI(e)||Array.isArray(e)||!!e[Nj]||!!e.constructor?.[Nj]||bf(e)||Um(e):!1}var dZ=Object.prototype.constructor.toString(),_j=new WeakMap;function CI(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let r=_j.get(n);return r===void 0&&(r=Function.toString.call(n),_j.set(n,r)),r===dZ}function dp(e,t,n=!0){Bm(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function Bm(e){const t=e[br];return t?t.type_:Array.isArray(e)?1:bf(e)?2:Um(e)?3:0}function yx(e,t){return Bm(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function AI(e,t,n){const r=Bm(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function hZ(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function bf(e){return e instanceof Map}function Um(e){return e instanceof Set}function Go(e){return e.copy_||e.base_}function bx(e,t){if(bf(e))return new Map(e);if(Um(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=CI(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[br];let i=Reflect.ownKeys(r);for(let l=0;l<i.length;l++){const s=i[l],u=r[s];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(r[s]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[s]})}return Object.create(Uu(e),r)}else{const r=Uu(e);if(r!==null&&n)return{...e};const i=Object.create(r);return Object.assign(i,e)}}function y1(e,t=!1){return Hm(e)||ks(e)||!ul(e)||(Bm(e)>1&&Object.defineProperties(e,{set:fh,add:fh,clear:fh,delete:fh}),Object.freeze(e),t&&Object.values(e).forEach(n=>y1(n,!0))),e}function pZ(){ta(2)}var fh={value:pZ};function Hm(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var mZ={};function fl(e){const t=mZ[e];return t||ta(0,e),t}var Hu;function OI(){return Hu}function vZ(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function jj(e,t){t&&(fl("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function xx(e){wx(e),e.drafts_.forEach(gZ),e.drafts_=null}function wx(e){e===Hu&&(Hu=e.parent_)}function Tj(e){return Hu=vZ(Hu,e)}function gZ(e){const t=e[br];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Mj(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[br].modified_&&(xx(t),ta(4)),ul(e)&&(e=hp(t,e),t.parent_||pp(t,e)),t.patches_&&fl("Patches").generateReplacementPatches_(n[br].base_,e,t.patches_,t.inversePatches_)):e=hp(t,n,[]),xx(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==EI?e:void 0}function hp(e,t,n){if(Hm(t))return t;const r=e.immer_.shouldUseStrictIteration(),i=t[br];if(!i)return dp(t,(l,s)=>Rj(e,i,t,l,s,n),r),t;if(i.scope_!==e)return t;if(!i.modified_)return pp(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const l=i.copy_;let s=l,u=!1;i.type_===3&&(s=new Set(l),l.clear(),u=!0),dp(s,(f,h)=>Rj(e,i,l,f,h,n,u),r),pp(e,l,!1),n&&e.patches_&&fl("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function Rj(e,t,n,r,i,l,s){if(i==null||typeof i!="object"&&!s)return;const u=Hm(i);if(!(u&&!s)){if(ks(i)){const f=l&&t&&t.type_!==3&&!yx(t.assigned_,r)?l.concat(r):void 0,h=hp(e,i,f);if(AI(n,r,h),ks(h))e.canAutoFreeze_=!1;else return}else s&&n.add(i);if(ul(i)&&!u){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[r]===i&&u)return;hp(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(bf(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&pp(e,i)}}}function pp(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&y1(t,n)}function yZ(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:OI(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,l=b1;n&&(i=[r],l=qu);const{revoke:s,proxy:u}=Proxy.revocable(i,l);return r.draft_=u,r.revoke_=s,u}var b1={get(e,t){if(t===br)return e;const n=Go(e);if(!yx(n,t))return bZ(e,n,t);const r=n[t];return e.finalized_||!ul(r)?r:r===W0(e.base_,t)?(X0(e),e.copy_[t]=Ex(r,e)):r},has(e,t){return t in Go(e)},ownKeys(e){return Reflect.ownKeys(Go(e))},set(e,t,n){const r=NI(Go(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=W0(Go(e),t),l=i?.[br];if(l&&l.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(hZ(n,i)&&(n!==void 0||yx(e.base_,t)))return!0;X0(e),Sx(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return W0(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,X0(e),Sx(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Go(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){ta(11)},getPrototypeOf(e){return Uu(e.base_)},setPrototypeOf(){ta(12)}},qu={};dp(b1,(e,t)=>{qu[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});qu.deleteProperty=function(e,t){return qu.set.call(this,e,t,void 0)};qu.set=function(e,t,n){return b1.set.call(this,e[0],t,n,e[0])};function W0(e,t){const n=e[br];return(n?Go(n):e)[t]}function bZ(e,t,n){const r=NI(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function NI(e,t){if(!(t in e))return;let n=Uu(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Uu(n)}}function Sx(e){e.modified_||(e.modified_=!0,e.parent_&&Sx(e.parent_))}function X0(e){e.copy_||(e.copy_=bx(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var xZ=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const l=n;n=t;const s=this;return function(f=l,...h){return s.produce(f,p=>n.call(this,p,...h))}}typeof n!="function"&&ta(6),r!==void 0&&typeof r!="function"&&ta(7);let i;if(ul(t)){const l=Tj(this),s=Ex(t,void 0);let u=!0;try{i=n(s),u=!1}finally{u?xx(l):wx(l)}return jj(l,r),Mj(i,l)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===EI&&(i=void 0),this.autoFreeze_&&y1(i,!0),r){const l=[],s=[];fl("Patches").generateReplacementPatches_(t,i,l,s),r(l,s)}return i}else ta(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...u)=>this.produceWithPatches(s,f=>t(f,...u));let r,i;return[this.produce(t,n,(s,u)=>{r=s,i=u}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof e?.useStrictIteration=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ul(e)||ta(8),ks(e)&&(e=wZ(e));const t=Tj(this),n=Ex(e,void 0);return n[br].isManual_=!0,wx(t),n}finishDraft(e,t){const n=e&&e[br];(!n||!n.isManual_)&&ta(9);const{scope_:r}=n;return jj(r,t),Mj(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=fl("Patches").applyPatches_;return ks(e)?r(e,t):this.produce(e,i=>r(i,t))}};function Ex(e,t){const n=bf(e)?fl("MapSet").proxyMap_(e,t):Um(e)?fl("MapSet").proxySet_(e,t):yZ(e,t);return(t?t.scope_:OI()).drafts_.push(n),n}function wZ(e){return ks(e)||ta(10,e),_I(e)}function _I(e){if(!ul(e)||Hm(e))return e;const t=e[br];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=bx(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=bx(e,!0);return dp(n,(i,l)=>{AI(n,i,_I(l))},r),t&&(t.finalized_=!1),n}var SZ=new xZ;SZ.produce;var EZ={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},jI=tr({name:"legend",initialState:EZ,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:St()},replaceLegendPayload:{reducer(e,t){var{prev:n,next:r}=t.payload,i=aa(e).payload.indexOf(n);i>-1&&(e.payload[i]=r)},prepare:St()},removeLegendPayload:{reducer(e,t){var n=aa(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:St()}}}),{setLegendSize:vhe,setLegendSettings:ghe,addLegendPayload:CZ,replaceLegendPayload:AZ,removeLegendPayload:OZ}=jI.actions,NZ=jI.reducer;function Cx(){return Cx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cx.apply(null,arguments)}function Dj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Q0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Dj(Object(n),!0).forEach(function(r){_Z(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _Z(e,t,n){return(t=jZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jZ(e){var t=TZ(e,"string");return typeof t=="symbol"?t:t+""}function TZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function MZ(e){return Array.isArray(e)&&_a(e[0])&&_a(e[1])?e.join(" ~ "):e}var RZ=e=>{var{separator:t=" : ",contentStyle:n={},itemStyle:r={},labelStyle:i={},payload:l,formatter:s,itemSorter:u,wrapperClassName:f,labelClassName:h,label:p,labelFormatter:m,accessibilityLayer:b=!1}=e,x=()=>{if(l&&l.length){var T={padding:0,margin:0},k=(u?Am(l,u):l).map((R,D)=>{if(R.type==="none")return null;var B=R.formatter||s||MZ,{value:Q,name:F}=R,G=Q,te=F;if(B){var ce=B(Q,F,R,D,l);if(Array.isArray(ce))[G,te]=ce;else if(ce!=null)G=ce;else return null}var he=Q0({display:"block",paddingTop:4,paddingBottom:4,color:R.color||"#000"},r);return v.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(D),style:he},_a(te)?v.createElement("span",{className:"recharts-tooltip-item-name"},te):null,_a(te)?v.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,v.createElement("span",{className:"recharts-tooltip-item-value"},G),v.createElement("span",{className:"recharts-tooltip-item-unit"},R.unit||""))});return v.createElement("ul",{className:"recharts-tooltip-item-list",style:T},k)}return null},S=Q0({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},n),E=Q0({margin:0},i),C=!En(p),A=C?p:"",_=ht("recharts-default-tooltip",f),N=ht("recharts-tooltip-label",h);C&&m&&l!==void 0&&l!==null&&(A=m(p,l));var j=b?{role:"status","aria-live":"assertive"}:{};return v.createElement("div",Cx({className:_,style:S},j),v.createElement("p",{className:N,style:E},v.isValidElement(A)?A:"".concat(A)),x())},su="recharts-tooltip-wrapper",DZ={visibility:"hidden"};function PZ(e){var{coordinate:t,translateX:n,translateY:r}=e;return ht(su,{["".concat(su,"-right")]:Ne(n)&&t&&Ne(t.x)&&n>=t.x,["".concat(su,"-left")]:Ne(n)&&t&&Ne(t.x)&&n<t.x,["".concat(su,"-bottom")]:Ne(r)&&t&&Ne(t.y)&&r>=t.y,["".concat(su,"-top")]:Ne(r)&&t&&Ne(t.y)&&r<t.y})}function Pj(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offsetTopLeft:i,position:l,reverseDirection:s,tooltipDimension:u,viewBox:f,viewBoxDimension:h}=e;if(l&&Ne(l[r]))return l[r];var p=n[r]-u-(i>0?i:0),m=n[r]+i;if(t[r])return s[r]?p:m;var b=f[r];if(b==null)return 0;if(s[r]){var x=p,S=b;return x<S?Math.max(m,b):Math.max(p,b)}if(h==null)return 0;var E=m+u,C=b+h;return E>C?Math.max(p,b):Math.max(m,b)}function kZ(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function IZ(e){var{allowEscapeViewBox:t,coordinate:n,offsetTopLeft:r,position:i,reverseDirection:l,tooltipBox:s,useTranslate3d:u,viewBox:f}=e,h,p,m;return s.height>0&&s.width>0&&n?(p=Pj({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:l,tooltipDimension:s.width,viewBox:f,viewBoxDimension:f.width}),m=Pj({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:l,tooltipDimension:s.height,viewBox:f,viewBoxDimension:f.height}),h=kZ({translateX:p,translateY:m,useTranslate3d:u})):h=DZ,{cssProperties:h,cssClasses:PZ({translateX:p,translateY:m,coordinate:n})}}function kj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function dh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kj(Object(n),!0).forEach(function(r){Ax(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ax(e,t,n){return(t=LZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LZ(e){var t=zZ(e,"string");return typeof t=="symbol"?t:t+""}function zZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class $Z extends v.PureComponent{constructor(){super(...arguments),Ax(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),Ax(this,"handleKeyDown",t=>{if(t.key==="Escape"){var n,r,i,l;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(n=(r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==null&&n!==void 0?n:0,y:(i=(l=this.props.coordinate)===null||l===void 0?void 0:l.y)!==null&&i!==void 0?i:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var t,n;this.state.dismissed&&(((t=this.props.coordinate)===null||t===void 0?void 0:t.x)!==this.state.dismissedAtCoordinate.x||((n=this.props.coordinate)===null||n===void 0?void 0:n.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}render(){var{active:t,allowEscapeViewBox:n,animationDuration:r,animationEasing:i,children:l,coordinate:s,hasPayload:u,isAnimationActive:f,offset:h,position:p,reverseDirection:m,useTranslate3d:b,viewBox:x,wrapperStyle:S,lastBoundingBox:E,innerRef:C,hasPortalFromProps:A}=this.props,{cssClasses:_,cssProperties:N}=IZ({allowEscapeViewBox:n,coordinate:s,offsetTopLeft:h,position:p,reverseDirection:m,tooltipBox:{height:E.height,width:E.width},useTranslate3d:b,viewBox:x}),j=A?{}:dh(dh({transition:f&&t?"transform ".concat(r,"ms ").concat(i):void 0},N),{},{pointerEvents:"none",visibility:!this.state.dismissed&&t&&u?"visible":"hidden",position:"absolute",top:0,left:0}),T=dh(dh({},j),{},{visibility:!this.state.dismissed&&t&&u?"visible":"hidden"},S);return v.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:_,style:T,ref:C},l)}}var TI=()=>{var e;return(e=je(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function Ox(){return Ox=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ox.apply(null,arguments)}function Ij(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Lj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ij(Object(n),!0).forEach(function(r){BZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ij(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function BZ(e,t,n){return(t=UZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UZ(e){var t=HZ(e,"string");return typeof t=="symbol"?t:t+""}function HZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var zj={curveBasisClosed:ZY,curveBasisOpen:JY,curveBasis:QY,curveBumpX:WY,curveBumpY:XY,curveLinearClosed:eW,curveLinear:Sm,curveMonotoneX:tW,curveMonotoneY:nW,curveNatural:rW,curveStep:aW,curveStepAfter:oW,curveStepBefore:iW},mp=e=>Tt(e.x)&&Tt(e.y),$j=e=>e.base!=null&&mp(e.base)&&mp(e),cu=e=>e.x,uu=e=>e.y,qZ=(e,t)=>{if(typeof e=="function")return e;var n="curve".concat(i1(e));return(n==="curveMonotone"||n==="curveBump")&&t?zj["".concat(n).concat(t==="vertical"?"Y":"X")]:zj[n]||Sm},FZ=e=>{var{type:t="linear",points:n=[],baseLine:r,layout:i,connectNulls:l=!1}=e,s=qZ(t,i),u=l?n.filter(mp):n,f;if(Array.isArray(r)){var h=n.map((x,S)=>Lj(Lj({},x),{},{base:r[S]}));i==="vertical"?f=ah().y(uu).x1(cu).x0(x=>x.base.x):f=ah().x(cu).y1(uu).y0(x=>x.base.y);var p=f.defined($j).curve(s),m=l?h.filter($j):h;return p(m)}i==="vertical"&&Ne(r)?f=ah().y(uu).x1(cu).x0(r):Ne(r)?f=ah().x(cu).y1(uu).y0(r):f=ck().x(cu).y(uu);var b=f.defined(mp).curve(s);return b(u)},Dh=e=>{var{className:t,points:n,path:r,pathRef:i}=e;if((!n||!n.length)&&!r)return null;var l=n&&n.length?FZ(e):r;return v.createElement("path",Ox({},sa(e),o1(e),{className:ht("recharts-curve",t),d:l===null?void 0:l,ref:i}))},KZ=["x","y","top","left","width","height","className"];function Nx(){return Nx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nx.apply(null,arguments)}function Bj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function VZ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Bj(Object(n),!0).forEach(function(r){GZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function GZ(e,t,n){return(t=YZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YZ(e){var t=WZ(e,"string");return typeof t=="symbol"?t:t+""}function WZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function XZ(e,t){if(e==null)return{};var n,r,i=QZ(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function QZ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var ZZ=(e,t,n,r,i,l)=>"M".concat(e,",").concat(i,"v").concat(r,"M").concat(l,",").concat(t,"h").concat(n),JZ=e=>{var{x:t=0,y:n=0,top:r=0,left:i=0,width:l=0,height:s=0,className:u}=e,f=XZ(e,KZ),h=VZ({x:t,y:n,top:r,left:i,width:l,height:s},f);return!Ne(t)||!Ne(n)||!Ne(l)||!Ne(s)||!Ne(r)||!Ne(i)?null:v.createElement("path",Nx({},Ur(h),{className:ht("recharts-cross",u),d:ZZ(t,n,l,s,r,i)}))};function eJ(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function Uj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Hj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Uj(Object(n),!0).forEach(function(r){tJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tJ(e,t,n){return(t=nJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nJ(e){var t=rJ(e,"string");return typeof t=="symbol"?t:t+""}function rJ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var aJ=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),iJ=(e,t,n)=>e.map(r=>"".concat(aJ(r)," ").concat(t,"ms ").concat(n)).join(","),oJ=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((n,r)=>n.filter(i=>r.includes(i))),Fu=(e,t)=>Object.keys(t).reduce((n,r)=>Hj(Hj({},n),{},{[r]:e(r,t[r])}),{});function qj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qj(Object(n),!0).forEach(function(r){lJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lJ(e,t,n){return(t=sJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sJ(e){var t=cJ(e,"string");return typeof t=="symbol"?t:t+""}function cJ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vp=(e,t,n)=>e+(t-e)*n,_x=e=>{var{from:t,to:n}=e;return t!==n},MI=(e,t,n)=>{var r=Fu((i,l)=>{if(_x(l)){var[s,u]=e(l.from,l.to,l.velocity);return Gt(Gt({},l),{},{from:s,velocity:u})}return l},t);return n<1?Fu((i,l)=>_x(l)?Gt(Gt({},l),{},{velocity:vp(l.velocity,r[i].velocity,n),from:vp(l.from,r[i].from,n)}):l,t):MI(e,r,n-1)};function uJ(e,t,n,r,i,l){var s,u=r.reduce((b,x)=>Gt(Gt({},b),{},{[x]:{from:e[x],velocity:0,to:t[x]}}),{}),f=()=>Fu((b,x)=>x.from,u),h=()=>!Object.values(u).filter(_x).length,p=null,m=b=>{s||(s=b);var x=b-s,S=x/n.dt;u=MI(n,u,S),i(Gt(Gt(Gt({},e),t),f())),s=b,h()||(p=l.setTimeout(m))};return()=>(p=l.setTimeout(m),()=>{var b;(b=p)===null||b===void 0||b()})}function fJ(e,t,n,r,i,l,s){var u=null,f=i.reduce((m,b)=>Gt(Gt({},m),{},{[b]:[e[b],t[b]]}),{}),h,p=m=>{h||(h=m);var b=(m-h)/r,x=Fu((E,C)=>vp(...C,n(b)),f);if(l(Gt(Gt(Gt({},e),t),x)),b<1)u=s.setTimeout(p);else{var S=Fu((E,C)=>vp(...C,n(1)),f);l(Gt(Gt(Gt({},e),t),S))}};return()=>(u=s.setTimeout(p),()=>{var m;(m=u)===null||m===void 0||m()})}const dJ=(e,t,n,r,i,l)=>{var s=oJ(e,t);return n==null?()=>(i(Gt(Gt({},e),t)),()=>{}):n.isStepper===!0?uJ(e,t,n,s,i,l):fJ(e,t,n,r,s,i,l)};var gp=1e-4,RI=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],DI=(e,t)=>e.map((n,r)=>n*t**r).reduce((n,r)=>n+r),Fj=(e,t)=>n=>{var r=RI(e,t);return DI(r,n)},hJ=(e,t)=>n=>{var r=RI(e,t),i=[...r.map((l,s)=>l*s).slice(1),0];return DI(i,n)},pJ=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(n.length===1)switch(n[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var i,l=n[0].split("(");if(l[0]==="cubic-bezier"&&((i=l[1])===null||i===void 0?void 0:i.split(")")[0].split(",").length)===4){var s=l[1].split(")")[0].split(",").map(u=>parseFloat(u));return[s[0],s[1],s[2],s[3]]}}}return n.length===4?n:[0,0,1,1]},mJ=(e,t,n,r)=>{var i=Fj(e,n),l=Fj(t,r),s=hJ(e,n),u=h=>h>1?1:h<0?0:h,f=h=>{for(var p=h>1?1:h,m=p,b=0;b<8;++b){var x=i(m)-p,S=s(m);if(Math.abs(x-p)<gp||S<gp)return l(m);m=u(m-x/S)}return l(m)};return f.isStepper=!1,f},Kj=function(){return mJ(...pJ(...arguments))},vJ=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:n=100,damping:r=8,dt:i=17}=t,l=(s,u,f)=>{var h=-(s-u)*n,p=f*r,m=f+(h-p)*i/1e3,b=f*i/1e3+s;return Math.abs(b-u)<gp&&Math.abs(m)<gp?[u,0]:[b,m]};return l.isStepper=!0,l.dt=i,l},gJ=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Kj(e);case"spring":return vJ();default:if(e.split("(")[0]==="cubic-bezier")return Kj(e)}return typeof e=="function"?e:null};function yJ(e){var t,n=()=>null,r=!1,i=null,l=s=>{if(!r){if(Array.isArray(s)){if(!s.length)return;var u=s,[f,...h]=u;if(typeof f=="number"){i=e.setTimeout(l.bind(null,h),f);return}l(f),i=e.setTimeout(l.bind(null,h));return}typeof s=="string"&&(t=s,n(t)),typeof s=="object"&&(t=s,n(t)),typeof s=="function"&&s()}};return{stop:()=>{r=!0},start:s=>{r=!1,i&&(i(),i=null),l(s)},subscribe:s=>(n=s,()=>{n=()=>null}),getTimeoutController:()=>e}}class bJ{setTimeout(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=performance.now(),i=null,l=s=>{s-r>=n?t(s):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(l))};return i=requestAnimationFrame(l),()=>{i!=null&&cancelAnimationFrame(i)}}}function xJ(){return yJ(new bJ)}var wJ=v.createContext(xJ);function SJ(e,t){var n=v.useContext(wJ);return v.useMemo(()=>t??n(e),[e,t,n])}var EJ=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),rc={devToolsEnabled:!1,isSsr:EJ()},CJ={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},Vj={t:0},Z0={t:1};function PI(e){var t=xr(e,CJ),{isActive:n,canBegin:r,duration:i,easing:l,begin:s,onAnimationEnd:u,onAnimationStart:f,children:h}=t,p=n==="auto"?!rc.isSsr:n,m=SJ(t.animationId,t.animationManager),[b,x]=v.useState(p?Vj:Z0),S=v.useRef(null);return v.useEffect(()=>{p||x(Z0)},[p]),v.useEffect(()=>{if(!p||!r)return hf;var E=dJ(Vj,Z0,gJ(l),i,x,m.getTimeoutController()),C=()=>{S.current=E()};return m.start([f,s,C,i,u]),()=>{m.stop(),S.current&&S.current(),u()}},[p,r,i,l,s,f,u,m]),h(b.t)}function kI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=v.useRef(Lu(t)),r=v.useRef(e);return r.current!==e&&(n.current=Lu(t),r.current=e),n.current}var AJ=["radius"],OJ=["radius"];function Gj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Yj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gj(Object(n),!0).forEach(function(r){NJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function NJ(e,t,n){return(t=_J(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _J(e){var t=jJ(e,"string");return typeof t=="symbol"?t:t+""}function jJ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yp(){return yp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yp.apply(null,arguments)}function Wj(e,t){if(e==null)return{};var n,r,i=TJ(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function TJ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Xj=(e,t,n,r,i)=>{var l=Math.min(Math.abs(n)/2,Math.abs(r)/2),s=r>=0?1:-1,u=n>=0?1:-1,f=r>=0&&n>=0||r<0&&n<0?1:0,h;if(l>0&&i instanceof Array){for(var p=[0,0,0,0],m=0,b=4;m<b;m++)p[m]=i[m]>l?l:i[m];h="M".concat(e,",").concat(t+s*p[0]),p[0]>0&&(h+="A ".concat(p[0],",").concat(p[0],",0,0,").concat(f,",").concat(e+u*p[0],",").concat(t)),h+="L ".concat(e+n-u*p[1],",").concat(t),p[1]>0&&(h+="A ".concat(p[1],",").concat(p[1],",0,0,").concat(f,`,
59
- `).concat(e+n,",").concat(t+s*p[1])),h+="L ".concat(e+n,",").concat(t+r-s*p[2]),p[2]>0&&(h+="A ".concat(p[2],",").concat(p[2],",0,0,").concat(f,`,
60
- `).concat(e+n-u*p[2],",").concat(t+r)),h+="L ".concat(e+u*p[3],",").concat(t+r),p[3]>0&&(h+="A ".concat(p[3],",").concat(p[3],",0,0,").concat(f,`,
61
- `).concat(e,",").concat(t+r-s*p[3])),h+="Z"}else if(l>0&&i===+i&&i>0){var x=Math.min(l,i);h="M ".concat(e,",").concat(t+s*x,`
62
- A `).concat(x,",").concat(x,",0,0,").concat(f,",").concat(e+u*x,",").concat(t,`
63
- L `).concat(e+n-u*x,",").concat(t,`
64
- A `).concat(x,",").concat(x,",0,0,").concat(f,",").concat(e+n,",").concat(t+s*x,`
65
- L `).concat(e+n,",").concat(t+r-s*x,`
66
- A `).concat(x,",").concat(x,",0,0,").concat(f,",").concat(e+n-u*x,",").concat(t+r,`
67
- L `).concat(e+u*x,",").concat(t+r,`
68
- A `).concat(x,",").concat(x,",0,0,").concat(f,",").concat(e,",").concat(t+r-s*x," Z")}else h="M ".concat(e,",").concat(t," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return h},Qj={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},MJ=e=>{var t=xr(e,Qj),n=v.useRef(null),[r,i]=v.useState(-1);v.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var q=n.current.getTotalLength();q&&i(q)}catch{}},[]);var{x:l,y:s,width:u,height:f,radius:h,className:p}=t,{animationEasing:m,animationDuration:b,animationBegin:x,isAnimationActive:S,isUpdateAnimationActive:E}=t,C=v.useRef(u),A=v.useRef(f),_=v.useRef(l),N=v.useRef(s),j=v.useMemo(()=>({x:l,y:s,width:u,height:f,radius:h}),[l,s,u,f,h]),T=kI(j,"rectangle-");if(l!==+l||s!==+s||u!==+u||f!==+f||u===0||f===0)return null;var k=ht("recharts-rectangle",p);if(!E){var R=Ur(t),{radius:D}=R,B=Wj(R,AJ);return v.createElement("path",yp({},B,{radius:typeof h=="number"?h:void 0,className:k,d:Xj(l,s,u,f,h)}))}var Q=C.current,F=A.current,G=_.current,te=N.current,ce="0px ".concat(r===-1?1:r,"px"),he="".concat(r,"px 0px"),I=iJ(["strokeDasharray"],b,typeof m=="string"?m:Qj.animationEasing);return v.createElement(PI,{animationId:T,key:T,canBegin:r>0,duration:b,easing:m,isActive:E,begin:x},q=>{var H=ya(Q,u,q),X=ya(F,f,q),ge=ya(G,l,q),L=ya(te,s,q);n.current&&(C.current=H,A.current=X,_.current=ge,N.current=L);var z;S?q>0?z={transition:I,strokeDasharray:he}:z={strokeDasharray:ce}:z={strokeDasharray:he};var P=Ur(t),{radius:W}=P,ne=Wj(P,OJ);return v.createElement("path",yp({},ne,{radius:typeof h=="number"?h:void 0,className:k,d:Xj(ge,L,H,X,h),ref:n,style:Yj(Yj({},z),t.style)}))})};function Zj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Jj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zj(Object(n),!0).forEach(function(r){RJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zj(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function RJ(e,t,n){return(t=DJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DJ(e){var t=PJ(e,"string");return typeof t=="symbol"?t:t+""}function PJ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bp=Math.PI/180,kJ=e=>e*180/Math.PI,wn=(e,t,n,r)=>({x:e+Math.cos(-bp*r)*n,y:t+Math.sin(-bp*r)*n}),IJ=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},LJ=(e,t)=>{var{x:n,y:r}=e,{x:i,y:l}=t;return Math.sqrt((n-i)**2+(r-l)**2)},zJ=(e,t)=>{var{x:n,y:r}=e,{cx:i,cy:l}=t,s=LJ({x:n,y:r},{x:i,y:l});if(s<=0)return{radius:s,angle:0};var u=(n-i)/s,f=Math.acos(u);return r>l&&(f=2*Math.PI-f),{radius:s,angle:kJ(f),angleInRadian:f}},$J=e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),i=Math.floor(n/360),l=Math.min(r,i);return{startAngle:t-l*360,endAngle:n-l*360}},BJ=(e,t)=>{var{startAngle:n,endAngle:r}=t,i=Math.floor(n/360),l=Math.floor(r/360),s=Math.min(i,l);return e+s*360},UJ=(e,t)=>{var{chartX:n,chartY:r}=e,{radius:i,angle:l}=zJ({x:n,y:r},t),{innerRadius:s,outerRadius:u}=t;if(i<s||i>u||i===0)return null;var{startAngle:f,endAngle:h}=$J(t),p=l,m;if(f<=h){for(;p>h;)p-=360;for(;p<f;)p+=360;m=p>=f&&p<=h}else{for(;p>f;)p-=360;for(;p<h;)p+=360;m=p>=h&&p<=f}return m?Jj(Jj({},t),{},{radius:i,angle:BJ(p,t)}):null};function II(e){var{cx:t,cy:n,radius:r,startAngle:i,endAngle:l}=e,s=wn(t,n,r,i),u=wn(t,n,r,l);return{points:[s,u],cx:t,cy:n,radius:r,startAngle:i,endAngle:l}}function jx(){return jx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jx.apply(null,arguments)}var HJ=(e,t)=>{var n=Lr(t-e),r=Math.min(Math.abs(t-e),359.999);return n*r},hh=e=>{var{cx:t,cy:n,radius:r,angle:i,sign:l,isExternal:s,cornerRadius:u,cornerIsExternal:f}=e,h=u*(s?1:-1)+r,p=Math.asin(u/h)/bp,m=f?i:i+l*p,b=wn(t,n,h,m),x=wn(t,n,r,m),S=f?i-l*p:i,E=wn(t,n,h*Math.cos(p*bp),S);return{center:b,circleTangency:x,lineTangency:E,theta:p}},LI=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:l,endAngle:s}=e,u=HJ(l,s),f=l+u,h=wn(t,n,i,l),p=wn(t,n,i,f),m="M ".concat(h.x,",").concat(h.y,`
69
- A `).concat(i,",").concat(i,`,0,
70
- `).concat(+(Math.abs(u)>180),",").concat(+(l>f),`,
71
- `).concat(p.x,",").concat(p.y,`
72
- `);if(r>0){var b=wn(t,n,r,l),x=wn(t,n,r,f);m+="L ".concat(x.x,",").concat(x.y,`
73
- A `).concat(r,",").concat(r,`,0,
74
- `).concat(+(Math.abs(u)>180),",").concat(+(l<=f),`,
75
- `).concat(b.x,",").concat(b.y," Z")}else m+="L ".concat(t,",").concat(n," Z");return m},qJ=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,cornerRadius:l,forceCornerRadius:s,cornerIsExternal:u,startAngle:f,endAngle:h}=e,p=Lr(h-f),{circleTangency:m,lineTangency:b,theta:x}=hh({cx:t,cy:n,radius:i,angle:f,sign:p,cornerRadius:l,cornerIsExternal:u}),{circleTangency:S,lineTangency:E,theta:C}=hh({cx:t,cy:n,radius:i,angle:h,sign:-p,cornerRadius:l,cornerIsExternal:u}),A=u?Math.abs(f-h):Math.abs(f-h)-x-C;if(A<0)return s?"M ".concat(b.x,",").concat(b.y,`
76
- a`).concat(l,",").concat(l,",0,0,1,").concat(l*2,`,0
77
- a`).concat(l,",").concat(l,",0,0,1,").concat(-l*2,`,0
78
- `):LI({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:f,endAngle:h});var _="M ".concat(b.x,",").concat(b.y,`
79
- A`).concat(l,",").concat(l,",0,0,").concat(+(p<0),",").concat(m.x,",").concat(m.y,`
80
- A`).concat(i,",").concat(i,",0,").concat(+(A>180),",").concat(+(p<0),",").concat(S.x,",").concat(S.y,`
81
- A`).concat(l,",").concat(l,",0,0,").concat(+(p<0),",").concat(E.x,",").concat(E.y,`
82
- `);if(r>0){var{circleTangency:N,lineTangency:j,theta:T}=hh({cx:t,cy:n,radius:r,angle:f,sign:p,isExternal:!0,cornerRadius:l,cornerIsExternal:u}),{circleTangency:k,lineTangency:R,theta:D}=hh({cx:t,cy:n,radius:r,angle:h,sign:-p,isExternal:!0,cornerRadius:l,cornerIsExternal:u}),B=u?Math.abs(f-h):Math.abs(f-h)-T-D;if(B<0&&l===0)return"".concat(_,"L").concat(t,",").concat(n,"Z");_+="L".concat(R.x,",").concat(R.y,`
83
- A`).concat(l,",").concat(l,",0,0,").concat(+(p<0),",").concat(k.x,",").concat(k.y,`
84
- A`).concat(r,",").concat(r,",0,").concat(+(B>180),",").concat(+(p>0),",").concat(N.x,",").concat(N.y,`
85
- A`).concat(l,",").concat(l,",0,0,").concat(+(p<0),",").concat(j.x,",").concat(j.y,"Z")}else _+="L".concat(t,",").concat(n,"Z");return _},FJ={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},KJ=e=>{var t=xr(e,FJ),{cx:n,cy:r,innerRadius:i,outerRadius:l,cornerRadius:s,forceCornerRadius:u,cornerIsExternal:f,startAngle:h,endAngle:p,className:m}=t;if(l<i||h===p)return null;var b=ht("recharts-sector",m),x=l-i,S=yo(s,x,0,!0),E;return S>0&&Math.abs(h-p)<360?E=qJ({cx:n,cy:r,innerRadius:i,outerRadius:l,cornerRadius:Math.min(S,x/2),forceCornerRadius:u,cornerIsExternal:f,startAngle:h,endAngle:p}):E=LI({cx:n,cy:r,innerRadius:i,outerRadius:l,startAngle:h,endAngle:p}),v.createElement("path",jx({},Ur(t),{className:b,d:E}))};function VJ(e,t,n){if(e==="horizontal")return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if(e==="vertical")return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(wk(t)){if(e==="centric"){var{cx:r,cy:i,innerRadius:l,outerRadius:s,angle:u}=t,f=wn(r,i,l,u),h=wn(r,i,s,u);return[{x:f.x,y:f.y},{x:h.x,y:h.y}]}return II(t)}}var J0={},eb={},tb={},eT;function GJ(){return eT||(eT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Rk();function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n})(tb)),tb}var tT;function YJ(){return tT||(tT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=GJ();function n(r){return r?(r=t.toNumber(r),r===1/0||r===-1/0?(r<0?-1:1)*Number.MAX_VALUE:r===r?r:0):r===0?r:0}e.toFinite=n})(eb)),eb}var nT;function WJ(){return nT||(nT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Dk(),n=YJ();function r(i,l,s){s&&typeof s!="number"&&t.isIterateeCall(i,l,s)&&(l=s=void 0),i=n.toFinite(i),l===void 0?(l=i,i=0):l=n.toFinite(l),s=s===void 0?i<l?1:-1:n.toFinite(s);const u=Math.max(Math.ceil((l-i)/(s||1)),0),f=new Array(u);for(let h=0;h<u;h++)f[h]=i,i+=s;return f}e.range=r})(J0)),J0}var nb,rT;function XJ(){return rT||(rT=1,nb=WJ().range),nb}var QJ=XJ();const zI=Ma(QJ);function ho(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ZJ(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function x1(e){let t,n,r;e.length!==2?(t=ho,n=(u,f)=>ho(e(u),f),r=(u,f)=>e(u)-f):(t=e===ho||e===ZJ?e:JJ,n=e,r=e);function i(u,f,h=0,p=u.length){if(h<p){if(t(f,f)!==0)return p;do{const m=h+p>>>1;n(u[m],f)<0?h=m+1:p=m}while(h<p)}return h}function l(u,f,h=0,p=u.length){if(h<p){if(t(f,f)!==0)return p;do{const m=h+p>>>1;n(u[m],f)<=0?h=m+1:p=m}while(h<p)}return h}function s(u,f,h=0,p=u.length){const m=i(u,f,h,p-1);return m>h&&r(u[m-1],f)>-r(u[m],f)?m-1:m}return{left:i,center:s,right:l}}function JJ(){return 0}function $I(e){return e===null?NaN:+e}function*eee(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const tee=x1(ho),xf=tee.right;x1($I).center;class aT extends Map{constructor(t,n=aee){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(iT(this,t))}has(t){return super.has(iT(this,t))}set(t,n){return super.set(nee(this,t),n)}delete(t){return super.delete(ree(this,t))}}function iT({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function nee({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function ree({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function aee(e){return e!==null&&typeof e=="object"?e.valueOf():e}function iee(e=ho){if(e===ho)return BI;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function BI(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const oee=Math.sqrt(50),lee=Math.sqrt(10),see=Math.sqrt(2);function xp(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),l=r/Math.pow(10,i),s=l>=oee?10:l>=lee?5:l>=see?2:1;let u,f,h;return i<0?(h=Math.pow(10,-i)/s,u=Math.round(e*h),f=Math.round(t*h),u/h<e&&++u,f/h>t&&--f,h=-h):(h=Math.pow(10,i)*s,u=Math.round(e/h),f=Math.round(t/h),u*h<e&&++u,f*h>t&&--f),f<u&&.5<=n&&n<2?xp(e,t,n*2):[u,f,h]}function Tx(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,l,s]=r?xp(t,e,n):xp(e,t,n);if(!(l>=i))return[];const u=l-i+1,f=new Array(u);if(r)if(s<0)for(let h=0;h<u;++h)f[h]=(l-h)/-s;else for(let h=0;h<u;++h)f[h]=(l-h)*s;else if(s<0)for(let h=0;h<u;++h)f[h]=(i+h)/-s;else for(let h=0;h<u;++h)f[h]=(i+h)*s;return f}function Mx(e,t,n){return t=+t,e=+e,n=+n,xp(e,t,n)[2]}function Rx(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?Mx(t,e,n):Mx(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function oT(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function lT(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function UI(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?BI:iee(i);r>n;){if(r-n>600){const f=r-n+1,h=t-n+1,p=Math.log(f),m=.5*Math.exp(2*p/3),b=.5*Math.sqrt(p*m*(f-m)/f)*(h-f/2<0?-1:1),x=Math.max(n,Math.floor(t-h*m/f+b)),S=Math.min(r,Math.floor(t+(f-h)*m/f+b));UI(e,t,x,S,i)}const l=e[t];let s=n,u=r;for(fu(e,n,t),i(e[r],l)>0&&fu(e,n,r);s<u;){for(fu(e,s,u),++s,--u;i(e[s],l)<0;)++s;for(;i(e[u],l)>0;)--u}i(e[n],l)===0?fu(e,n,u):(++u,fu(e,u,r)),u<=t&&(n=u+1),t<=u&&(r=u-1)}return e}function fu(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function cee(e,t,n){if(e=Float64Array.from(eee(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return lT(e);if(t>=1)return oT(e);var r,i=(r-1)*t,l=Math.floor(i),s=oT(UI(e,l).subarray(0,l+1)),u=lT(e.subarray(l+1));return s+(u-s)*(i-l)}}function uee(e,t,n=$I){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,l=Math.floor(i),s=+n(e[l],l,e),u=+n(e[l+1],l+1,e);return s+(u-s)*(i-l)}}function fee(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,l=new Array(i);++r<i;)l[r]=e+r*n;return l}function Vr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Ni(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 Dx=Symbol("implicit");function w1(){var e=new aT,t=[],n=[],r=Dx;function i(l){let s=e.get(l);if(s===void 0){if(r!==Dx)return r;e.set(l,s=t.push(l)-1)}return n[s%n.length]}return i.domain=function(l){if(!arguments.length)return t.slice();t=[],e=new aT;for(const s of l)e.has(s)||e.set(s,t.push(s)-1);return i},i.range=function(l){return arguments.length?(n=Array.from(l),i):n.slice()},i.unknown=function(l){return arguments.length?(r=l,i):r},i.copy=function(){return w1(t,n).unknown(r)},Vr.apply(i,arguments),i}function S1(){var e=w1().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,l,s,u=!1,f=0,h=0,p=.5;delete e.unknown;function m(){var b=t().length,x=i<r,S=x?i:r,E=x?r:i;l=(E-S)/Math.max(1,b-f+h*2),u&&(l=Math.floor(l)),S+=(E-S-l*(b-f))*p,s=l*(1-f),u&&(S=Math.round(S),s=Math.round(s));var C=fee(b).map(function(A){return S+l*A});return n(x?C.reverse():C)}return e.domain=function(b){return arguments.length?(t(b),m()):t()},e.range=function(b){return arguments.length?([r,i]=b,r=+r,i=+i,m()):[r,i]},e.rangeRound=function(b){return[r,i]=b,r=+r,i=+i,u=!0,m()},e.bandwidth=function(){return s},e.step=function(){return l},e.round=function(b){return arguments.length?(u=!!b,m()):u},e.padding=function(b){return arguments.length?(f=Math.min(1,h=+b),m()):f},e.paddingInner=function(b){return arguments.length?(f=Math.min(1,b),m()):f},e.paddingOuter=function(b){return arguments.length?(h=+b,m()):h},e.align=function(b){return arguments.length?(p=Math.max(0,Math.min(1,b)),m()):p},e.copy=function(){return S1(t(),[r,i]).round(u).paddingInner(f).paddingOuter(h).align(p)},Vr.apply(m(),arguments)}function HI(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return HI(t())},e}function dee(){return HI(S1.apply(null,arguments).paddingInner(1))}function E1(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function qI(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function wf(){}var Ku=.7,wp=1/Ku,Ns="\\s*([+-]?\\d+)\\s*",Vu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Aa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",hee=/^#([0-9a-f]{3,8})$/,pee=new RegExp(`^rgb\\(${Ns},${Ns},${Ns}\\)$`),mee=new RegExp(`^rgb\\(${Aa},${Aa},${Aa}\\)$`),vee=new RegExp(`^rgba\\(${Ns},${Ns},${Ns},${Vu}\\)$`),gee=new RegExp(`^rgba\\(${Aa},${Aa},${Aa},${Vu}\\)$`),yee=new RegExp(`^hsl\\(${Vu},${Aa},${Aa}\\)$`),bee=new RegExp(`^hsla\\(${Vu},${Aa},${Aa},${Vu}\\)$`),sT={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};E1(wf,Gu,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:cT,formatHex:cT,formatHex8:xee,formatHsl:wee,formatRgb:uT,toString:uT});function cT(){return this.rgb().formatHex()}function xee(){return this.rgb().formatHex8()}function wee(){return FI(this).formatHsl()}function uT(){return this.rgb().formatRgb()}function Gu(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=hee.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?fT(t):n===3?new Qn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ph(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ph(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=pee.exec(e))?new Qn(t[1],t[2],t[3],1):(t=mee.exec(e))?new Qn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=vee.exec(e))?ph(t[1],t[2],t[3],t[4]):(t=gee.exec(e))?ph(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=yee.exec(e))?pT(t[1],t[2]/100,t[3]/100,1):(t=bee.exec(e))?pT(t[1],t[2]/100,t[3]/100,t[4]):sT.hasOwnProperty(e)?fT(sT[e]):e==="transparent"?new Qn(NaN,NaN,NaN,0):null}function fT(e){return new Qn(e>>16&255,e>>8&255,e&255,1)}function ph(e,t,n,r){return r<=0&&(e=t=n=NaN),new Qn(e,t,n,r)}function See(e){return e instanceof wf||(e=Gu(e)),e?(e=e.rgb(),new Qn(e.r,e.g,e.b,e.opacity)):new Qn}function Px(e,t,n,r){return arguments.length===1?See(e):new Qn(e,t,n,r??1)}function Qn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}E1(Qn,Px,qI(wf,{brighter(e){return e=e==null?wp:Math.pow(wp,e),new Qn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ku:Math.pow(Ku,e),new Qn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Qn(tl(this.r),tl(this.g),tl(this.b),Sp(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:dT,formatHex:dT,formatHex8:Eee,formatRgb:hT,toString:hT}));function dT(){return`#${Xo(this.r)}${Xo(this.g)}${Xo(this.b)}`}function Eee(){return`#${Xo(this.r)}${Xo(this.g)}${Xo(this.b)}${Xo((isNaN(this.opacity)?1:this.opacity)*255)}`}function hT(){const e=Sp(this.opacity);return`${e===1?"rgb(":"rgba("}${tl(this.r)}, ${tl(this.g)}, ${tl(this.b)}${e===1?")":`, ${e})`}`}function Sp(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function tl(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Xo(e){return e=tl(e),(e<16?"0":"")+e.toString(16)}function pT(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new na(e,t,n,r)}function FI(e){if(e instanceof na)return new na(e.h,e.s,e.l,e.opacity);if(e instanceof wf||(e=Gu(e)),!e)return new na;if(e instanceof na)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),l=Math.max(t,n,r),s=NaN,u=l-i,f=(l+i)/2;return u?(t===l?s=(n-r)/u+(n<r)*6:n===l?s=(r-t)/u+2:s=(t-n)/u+4,u/=f<.5?l+i:2-l-i,s*=60):u=f>0&&f<1?0:s,new na(s,u,f,e.opacity)}function Cee(e,t,n,r){return arguments.length===1?FI(e):new na(e,t,n,r??1)}function na(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}E1(na,Cee,qI(wf,{brighter(e){return e=e==null?wp:Math.pow(wp,e),new na(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ku:Math.pow(Ku,e),new na(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,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Qn(rb(e>=240?e-240:e+120,i,r),rb(e,i,r),rb(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new na(mT(this.h),mh(this.s),mh(this.l),Sp(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=Sp(this.opacity);return`${e===1?"hsl(":"hsla("}${mT(this.h)}, ${mh(this.s)*100}%, ${mh(this.l)*100}%${e===1?")":`, ${e})`}`}}));function mT(e){return e=(e||0)%360,e<0?e+360:e}function mh(e){return Math.max(0,Math.min(1,e||0))}function rb(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const C1=e=>()=>e;function Aee(e,t){return function(n){return e+n*t}}function Oee(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Nee(e){return(e=+e)==1?KI:function(t,n){return n-t?Oee(t,n,e):C1(isNaN(t)?n:t)}}function KI(e,t){var n=t-e;return n?Aee(e,n):C1(isNaN(e)?t:e)}const vT=(function e(t){var n=Nee(t);function r(i,l){var s=n((i=Px(i)).r,(l=Px(l)).r),u=n(i.g,l.g),f=n(i.b,l.b),h=KI(i.opacity,l.opacity);return function(p){return i.r=s(p),i.g=u(p),i.b=f(p),i.opacity=h(p),i+""}}return r.gamma=e,r})(1);function _ee(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(l){for(i=0;i<n;++i)r[i]=e[i]*(1-l)+t[i]*l;return r}}function jee(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Tee(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),l=new Array(n),s;for(s=0;s<r;++s)i[s]=ac(e[s],t[s]);for(;s<n;++s)l[s]=t[s];return function(u){for(s=0;s<r;++s)l[s]=i[s](u);return l}}function Mee(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Ep(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Ree(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=ac(e[i],t[i]):r[i]=t[i];return function(l){for(i in n)r[i]=n[i](l);return r}}var kx=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ab=new RegExp(kx.source,"g");function Dee(e){return function(){return e}}function Pee(e){return function(t){return e(t)+""}}function kee(e,t){var n=kx.lastIndex=ab.lastIndex=0,r,i,l,s=-1,u=[],f=[];for(e=e+"",t=t+"";(r=kx.exec(e))&&(i=ab.exec(t));)(l=i.index)>n&&(l=t.slice(n,l),u[s]?u[s]+=l:u[++s]=l),(r=r[0])===(i=i[0])?u[s]?u[s]+=i:u[++s]=i:(u[++s]=null,f.push({i:s,x:Ep(r,i)})),n=ab.lastIndex;return n<t.length&&(l=t.slice(n),u[s]?u[s]+=l:u[++s]=l),u.length<2?f[0]?Pee(f[0].x):Dee(t):(t=f.length,function(h){for(var p=0,m;p<t;++p)u[(m=f[p]).i]=m.x(h);return u.join("")})}function ac(e,t){var n=typeof t,r;return t==null||n==="boolean"?C1(t):(n==="number"?Ep:n==="string"?(r=Gu(t))?(t=r,vT):kee:t instanceof Gu?vT:t instanceof Date?Mee:jee(t)?_ee:Array.isArray(t)?Tee:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Ree:Ep)(e,t)}function A1(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Iee(e,t){t===void 0&&(t=e,e=ac);for(var n=0,r=t.length-1,i=t[0],l=new Array(r<0?0:r);n<r;)l[n]=e(i,i=t[++n]);return function(s){var u=Math.max(0,Math.min(r-1,Math.floor(s*=r)));return l[u](s-u)}}function Lee(e){return function(){return e}}function Cp(e){return+e}var gT=[0,1];function In(e){return e}function Ix(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Lee(isNaN(t)?NaN:.5)}function zee(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function $ee(e,t,n){var r=e[0],i=e[1],l=t[0],s=t[1];return i<r?(r=Ix(i,r),l=n(s,l)):(r=Ix(r,i),l=n(l,s)),function(u){return l(r(u))}}function Bee(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),l=new Array(r),s=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<r;)i[s]=Ix(e[s],e[s+1]),l[s]=n(t[s],t[s+1]);return function(u){var f=xf(e,u,1,r)-1;return l[f](i[f](u))}}function Sf(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function qm(){var e=gT,t=gT,n=ac,r,i,l,s=In,u,f,h;function p(){var b=Math.min(e.length,t.length);return s!==In&&(s=zee(e[0],e[b-1])),u=b>2?Bee:$ee,f=h=null,m}function m(b){return b==null||isNaN(b=+b)?l:(f||(f=u(e.map(r),t,n)))(r(s(b)))}return m.invert=function(b){return s(i((h||(h=u(t,e.map(r),Ep)))(b)))},m.domain=function(b){return arguments.length?(e=Array.from(b,Cp),p()):e.slice()},m.range=function(b){return arguments.length?(t=Array.from(b),p()):t.slice()},m.rangeRound=function(b){return t=Array.from(b),n=A1,p()},m.clamp=function(b){return arguments.length?(s=b?!0:In,p()):s!==In},m.interpolate=function(b){return arguments.length?(n=b,p()):n},m.unknown=function(b){return arguments.length?(l=b,m):l},function(b,x){return r=b,i=x,p()}}function O1(){return qm()(In,In)}function Uee(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Ap(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Is(e){return e=Ap(Math.abs(e)),e?e[1]:NaN}function Hee(e,t){return function(n,r){for(var i=n.length,l=[],s=0,u=e[0],f=0;i>0&&u>0&&(f+u+1>r&&(u=Math.max(1,r-f)),l.push(n.substring(i-=u,i+u)),!((f+=u+1)>r));)u=e[s=(s+1)%e.length];return l.reverse().join(t)}}function qee(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var Fee=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Yu(e){if(!(t=Fee.exec(e)))throw new Error("invalid format: "+e);var t;return new N1({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]})}Yu.prototype=N1.prototype;function N1(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+""}N1.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 Kee(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var VI;function Vee(e,t){var n=Ap(e,t);if(!n)return e+"";var r=n[0],i=n[1],l=i-(VI=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=r.length;return l===s?r:l>s?r+new Array(l-s+1).join("0"):l>0?r.slice(0,l)+"."+r.slice(l):"0."+new Array(1-l).join("0")+Ap(e,Math.max(0,t+l-1))[0]}function yT(e,t){var n=Ap(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const bT={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Uee,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)=>yT(e*100,t),r:yT,s:Vee,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function xT(e){return e}var wT=Array.prototype.map,ST=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Gee(e){var t=e.grouping===void 0||e.thousands===void 0?xT:Hee(wT.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",l=e.numerals===void 0?xT:qee(wT.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function h(m){m=Yu(m);var b=m.fill,x=m.align,S=m.sign,E=m.symbol,C=m.zero,A=m.width,_=m.comma,N=m.precision,j=m.trim,T=m.type;T==="n"?(_=!0,T="g"):bT[T]||(N===void 0&&(N=12),j=!0,T="g"),(C||b==="0"&&x==="=")&&(C=!0,b="0",x="=");var k=E==="$"?n:E==="#"&&/[boxX]/.test(T)?"0"+T.toLowerCase():"",R=E==="$"?r:/[%p]/.test(T)?s:"",D=bT[T],B=/[defgprs%]/.test(T);N=N===void 0?6:/[gprs]/.test(T)?Math.max(1,Math.min(21,N)):Math.max(0,Math.min(20,N));function Q(F){var G=k,te=R,ce,he,I;if(T==="c")te=D(F)+te,F="";else{F=+F;var q=F<0||1/F<0;if(F=isNaN(F)?f:D(Math.abs(F),N),j&&(F=Kee(F)),q&&+F==0&&S!=="+"&&(q=!1),G=(q?S==="("?S:u:S==="-"||S==="("?"":S)+G,te=(T==="s"?ST[8+VI/3]:"")+te+(q&&S==="("?")":""),B){for(ce=-1,he=F.length;++ce<he;)if(I=F.charCodeAt(ce),48>I||I>57){te=(I===46?i+F.slice(ce+1):F.slice(ce))+te,F=F.slice(0,ce);break}}}_&&!C&&(F=t(F,1/0));var H=G.length+F.length+te.length,X=H<A?new Array(A-H+1).join(b):"";switch(_&&C&&(F=t(X+F,X.length?A-te.length:1/0),X=""),x){case"<":F=G+F+te+X;break;case"=":F=G+X+F+te;break;case"^":F=X.slice(0,H=X.length>>1)+G+F+te+X.slice(H);break;default:F=X+G+F+te;break}return l(F)}return Q.toString=function(){return m+""},Q}function p(m,b){var x=h((m=Yu(m),m.type="f",m)),S=Math.max(-8,Math.min(8,Math.floor(Is(b)/3)))*3,E=Math.pow(10,-S),C=ST[8+S/3];return function(A){return x(E*A)+C}}return{format:h,formatPrefix:p}}var vh,_1,GI;Yee({thousands:",",grouping:[3],currency:["$",""]});function Yee(e){return vh=Gee(e),_1=vh.format,GI=vh.formatPrefix,vh}function Wee(e){return Math.max(0,-Is(Math.abs(e)))}function Xee(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Is(t)/3)))*3-Is(Math.abs(e)))}function Qee(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Is(t)-Is(e))+1}function YI(e,t,n,r){var i=Rx(e,t,n),l;switch(r=Yu(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(l=Xee(i,s))&&(r.precision=l),GI(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(l=Qee(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=l-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(l=Wee(i))&&(r.precision=l-(r.type==="%")*2);break}}return _1(r)}function wo(e){var t=e.domain;return e.ticks=function(n){var r=t();return Tx(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return YI(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,l=r.length-1,s=r[i],u=r[l],f,h,p=10;for(u<s&&(h=s,s=u,u=h,h=i,i=l,l=h);p-- >0;){if(h=Mx(s,u,n),h===f)return r[i]=s,r[l]=u,t(r);if(h>0)s=Math.floor(s/h)*h,u=Math.ceil(u/h)*h;else if(h<0)s=Math.ceil(s*h)/h,u=Math.floor(u*h)/h;else break;f=h}return e},e}function WI(){var e=O1();return e.copy=function(){return Sf(e,WI())},Vr.apply(e,arguments),wo(e)}function XI(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Cp),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return XI(e).unknown(t)},e=arguments.length?Array.from(e,Cp):[0,1],wo(n)}function QI(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],l=e[r],s;return l<i&&(s=n,n=r,r=s,s=i,i=l,l=s),e[n]=t.floor(i),e[r]=t.ceil(l),e}function ET(e){return Math.log(e)}function CT(e){return Math.exp(e)}function Zee(e){return-Math.log(-e)}function Jee(e){return-Math.exp(-e)}function ete(e){return isFinite(e)?+("1e"+e):e<0?0:e}function tte(e){return e===10?ete:e===Math.E?Math.exp:t=>Math.pow(e,t)}function nte(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 AT(e){return(t,n)=>-e(-t,n)}function j1(e){const t=e(ET,CT),n=t.domain;let r=10,i,l;function s(){return i=nte(r),l=tte(r),n()[0]<0?(i=AT(i),l=AT(l),e(Zee,Jee)):e(ET,CT),t}return t.base=function(u){return arguments.length?(r=+u,s()):r},t.domain=function(u){return arguments.length?(n(u),s()):n()},t.ticks=u=>{const f=n();let h=f[0],p=f[f.length-1];const m=p<h;m&&([h,p]=[p,h]);let b=i(h),x=i(p),S,E;const C=u==null?10:+u;let A=[];if(!(r%1)&&x-b<C){if(b=Math.floor(b),x=Math.ceil(x),h>0){for(;b<=x;++b)for(S=1;S<r;++S)if(E=b<0?S/l(-b):S*l(b),!(E<h)){if(E>p)break;A.push(E)}}else for(;b<=x;++b)for(S=r-1;S>=1;--S)if(E=b>0?S/l(-b):S*l(b),!(E<h)){if(E>p)break;A.push(E)}A.length*2<C&&(A=Tx(h,p,C))}else A=Tx(b,x,Math.min(x-b,C)).map(l);return m?A.reverse():A},t.tickFormat=(u,f)=>{if(u==null&&(u=10),f==null&&(f=r===10?"s":","),typeof f!="function"&&(!(r%1)&&(f=Yu(f)).precision==null&&(f.trim=!0),f=_1(f)),u===1/0)return f;const h=Math.max(1,r*u/t.ticks().length);return p=>{let m=p/l(Math.round(i(p)));return m*r<r-.5&&(m*=r),m<=h?f(p):""}},t.nice=()=>n(QI(n(),{floor:u=>l(Math.floor(i(u))),ceil:u=>l(Math.ceil(i(u)))})),t}function ZI(){const e=j1(qm()).domain([1,10]);return e.copy=()=>Sf(e,ZI()).base(e.base()),Vr.apply(e,arguments),e}function OT(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function NT(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function T1(e){var t=1,n=e(OT(t),NT(t));return n.constant=function(r){return arguments.length?e(OT(t=+r),NT(t)):t},wo(n)}function JI(){var e=T1(qm());return e.copy=function(){return Sf(e,JI()).constant(e.constant())},Vr.apply(e,arguments)}function _T(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function rte(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function ate(e){return e<0?-e*e:e*e}function M1(e){var t=e(In,In),n=1;function r(){return n===1?e(In,In):n===.5?e(rte,ate):e(_T(n),_T(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},wo(t)}function R1(){var e=M1(qm());return e.copy=function(){return Sf(e,R1()).exponent(e.exponent())},Vr.apply(e,arguments),e}function ite(){return R1.apply(null,arguments).exponent(.5)}function jT(e){return Math.sign(e)*e*e}function ote(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function eL(){var e=O1(),t=[0,1],n=!1,r;function i(l){var s=ote(e(l));return isNaN(s)?r:n?Math.round(s):s}return i.invert=function(l){return e.invert(jT(l))},i.domain=function(l){return arguments.length?(e.domain(l),i):e.domain()},i.range=function(l){return arguments.length?(e.range((t=Array.from(l,Cp)).map(jT)),i):t.slice()},i.rangeRound=function(l){return i.range(l).round(!0)},i.round=function(l){return arguments.length?(n=!!l,i):n},i.clamp=function(l){return arguments.length?(e.clamp(l),i):e.clamp()},i.unknown=function(l){return arguments.length?(r=l,i):r},i.copy=function(){return eL(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Vr.apply(i,arguments),wo(i)}function tL(){var e=[],t=[],n=[],r;function i(){var s=0,u=Math.max(1,t.length);for(n=new Array(u-1);++s<u;)n[s-1]=uee(e,s/u);return l}function l(s){return s==null||isNaN(s=+s)?r:t[xf(n,s)]}return l.invertExtent=function(s){var u=t.indexOf(s);return u<0?[NaN,NaN]:[u>0?n[u-1]:e[0],u<n.length?n[u]:e[e.length-1]]},l.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let u of s)u!=null&&!isNaN(u=+u)&&e.push(u);return e.sort(ho),i()},l.range=function(s){return arguments.length?(t=Array.from(s),i()):t.slice()},l.unknown=function(s){return arguments.length?(r=s,l):r},l.quantiles=function(){return n.slice()},l.copy=function(){return tL().domain(e).range(t).unknown(r)},Vr.apply(l,arguments)}function nL(){var e=0,t=1,n=1,r=[.5],i=[0,1],l;function s(f){return f!=null&&f<=f?i[xf(r,f,0,n)]:l}function u(){var f=-1;for(r=new Array(n);++f<n;)r[f]=((f+1)*t-(f-n)*e)/(n+1);return s}return s.domain=function(f){return arguments.length?([e,t]=f,e=+e,t=+t,u()):[e,t]},s.range=function(f){return arguments.length?(n=(i=Array.from(f)).length-1,u()):i.slice()},s.invertExtent=function(f){var h=i.indexOf(f);return h<0?[NaN,NaN]:h<1?[e,r[0]]:h>=n?[r[n-1],t]:[r[h-1],r[h]]},s.unknown=function(f){return arguments.length&&(l=f),s},s.thresholds=function(){return r.slice()},s.copy=function(){return nL().domain([e,t]).range(i).unknown(l)},Vr.apply(wo(s),arguments)}function rL(){var e=[.5],t=[0,1],n,r=1;function i(l){return l!=null&&l<=l?t[xf(e,l,0,r)]:n}return i.domain=function(l){return arguments.length?(e=Array.from(l),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(l){return arguments.length?(t=Array.from(l),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(l){var s=t.indexOf(l);return[e[s-1],e[s]]},i.unknown=function(l){return arguments.length?(n=l,i):n},i.copy=function(){return rL().domain(e).range(t).unknown(n)},Vr.apply(i,arguments)}const ib=new Date,ob=new Date;function Xt(e,t,n,r){function i(l){return e(l=arguments.length===0?new Date:new Date(+l)),l}return i.floor=l=>(e(l=new Date(+l)),l),i.ceil=l=>(e(l=new Date(l-1)),t(l,1),e(l),l),i.round=l=>{const s=i(l),u=i.ceil(l);return l-s<u-l?s:u},i.offset=(l,s)=>(t(l=new Date(+l),s==null?1:Math.floor(s)),l),i.range=(l,s,u)=>{const f=[];if(l=i.ceil(l),u=u==null?1:Math.floor(u),!(l<s)||!(u>0))return f;let h;do f.push(h=new Date(+l)),t(l,u),e(l);while(h<l&&l<s);return f},i.filter=l=>Xt(s=>{if(s>=s)for(;e(s),!l(s);)s.setTime(s-1)},(s,u)=>{if(s>=s)if(u<0)for(;++u<=0;)for(;t(s,-1),!l(s););else for(;--u>=0;)for(;t(s,1),!l(s););}),n&&(i.count=(l,s)=>(ib.setTime(+l),ob.setTime(+s),e(ib),e(ob),Math.floor(n(ib,ob))),i.every=l=>(l=Math.floor(l),!isFinite(l)||!(l>0)?null:l>1?i.filter(r?s=>r(s)%l===0:s=>i.count(0,s)%l===0):i)),i}const Op=Xt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Op.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Xt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Op);Op.range;const si=1e3,zr=si*60,ci=zr*60,xi=ci*24,D1=xi*7,TT=xi*30,lb=xi*365,Qo=Xt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*si)},(e,t)=>(t-e)/si,e=>e.getUTCSeconds());Qo.range;const P1=Xt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*si)},(e,t)=>{e.setTime(+e+t*zr)},(e,t)=>(t-e)/zr,e=>e.getMinutes());P1.range;const k1=Xt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*zr)},(e,t)=>(t-e)/zr,e=>e.getUTCMinutes());k1.range;const I1=Xt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*si-e.getMinutes()*zr)},(e,t)=>{e.setTime(+e+t*ci)},(e,t)=>(t-e)/ci,e=>e.getHours());I1.range;const L1=Xt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ci)},(e,t)=>(t-e)/ci,e=>e.getUTCHours());L1.range;const Ef=Xt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*zr)/xi,e=>e.getDate()-1);Ef.range;const Fm=Xt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/xi,e=>e.getUTCDate()-1);Fm.range;const aL=Xt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/xi,e=>Math.floor(e/xi));aL.range;function El(e){return Xt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*zr)/D1)}const Km=El(0),Np=El(1),lte=El(2),ste=El(3),Ls=El(4),cte=El(5),ute=El(6);Km.range;Np.range;lte.range;ste.range;Ls.range;cte.range;ute.range;function Cl(e){return Xt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/D1)}const Vm=Cl(0),_p=Cl(1),fte=Cl(2),dte=Cl(3),zs=Cl(4),hte=Cl(5),pte=Cl(6);Vm.range;_p.range;fte.range;dte.range;zs.range;hte.range;pte.range;const z1=Xt(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());z1.range;const $1=Xt(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());$1.range;const wi=Xt(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());wi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Xt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});wi.range;const Si=Xt(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());Si.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Xt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Si.range;function iL(e,t,n,r,i,l){const s=[[Qo,1,si],[Qo,5,5*si],[Qo,15,15*si],[Qo,30,30*si],[l,1,zr],[l,5,5*zr],[l,15,15*zr],[l,30,30*zr],[i,1,ci],[i,3,3*ci],[i,6,6*ci],[i,12,12*ci],[r,1,xi],[r,2,2*xi],[n,1,D1],[t,1,TT],[t,3,3*TT],[e,1,lb]];function u(h,p,m){const b=p<h;b&&([h,p]=[p,h]);const x=m&&typeof m.range=="function"?m:f(h,p,m),S=x?x.range(h,+p+1):[];return b?S.reverse():S}function f(h,p,m){const b=Math.abs(p-h)/m,x=x1(([,,C])=>C).right(s,b);if(x===s.length)return e.every(Rx(h/lb,p/lb,m));if(x===0)return Op.every(Math.max(Rx(h,p,m),1));const[S,E]=s[b/s[x-1][2]<s[x][2]/b?x-1:x];return S.every(E)}return[u,f]}const[mte,vte]=iL(Si,$1,Vm,aL,L1,k1),[gte,yte]=iL(wi,z1,Km,Ef,I1,P1);function sb(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 cb(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 du(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function bte(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,l=e.days,s=e.shortDays,u=e.months,f=e.shortMonths,h=hu(i),p=pu(i),m=hu(l),b=pu(l),x=hu(s),S=pu(s),E=hu(u),C=pu(u),A=hu(f),_=pu(f),N={a:q,A:H,b:X,B:ge,c:null,d:IT,e:IT,f:Hte,g:Zte,G:ene,H:$te,I:Bte,j:Ute,L:oL,m:qte,M:Fte,p:L,q:z,Q:$T,s:BT,S:Kte,u:Vte,U:Gte,V:Yte,w:Wte,W:Xte,x:null,X:null,y:Qte,Y:Jte,Z:tne,"%":zT},j={a:P,A:W,b:ne,B:se,c:null,d:LT,e:LT,f:ine,g:mne,G:gne,H:nne,I:rne,j:ane,L:sL,m:one,M:lne,p:Y,q:pe,Q:$T,s:BT,S:sne,u:cne,U:une,V:fne,w:dne,W:hne,x:null,X:null,y:pne,Y:vne,Z:yne,"%":zT},T={a:Q,A:F,b:G,B:te,c:ce,d:PT,e:PT,f:kte,g:DT,G:RT,H:kT,I:kT,j:Mte,L:Pte,m:Tte,M:Rte,p:B,q:jte,Q:Lte,s:zte,S:Dte,u:Cte,U:Ate,V:Ote,w:Ete,W:Nte,x:he,X:I,y:DT,Y:RT,Z:_te,"%":Ite};N.x=k(n,N),N.X=k(r,N),N.c=k(t,N),j.x=k(n,j),j.X=k(r,j),j.c=k(t,j);function k(V,me){return function(ye){var ie=[],ke=-1,ve=0,Je=V.length,tt,mt,wr;for(ye instanceof Date||(ye=new Date(+ye));++ke<Je;)V.charCodeAt(ke)===37&&(ie.push(V.slice(ve,ke)),(mt=MT[tt=V.charAt(++ke)])!=null?tt=V.charAt(++ke):mt=tt==="e"?" ":"0",(wr=me[tt])&&(tt=wr(ye,mt)),ie.push(tt),ve=ke+1);return ie.push(V.slice(ve,ke)),ie.join("")}}function R(V,me){return function(ye){var ie=du(1900,void 0,1),ke=D(ie,V,ye+="",0),ve,Je;if(ke!=ye.length)return null;if("Q"in ie)return new Date(ie.Q);if("s"in ie)return new Date(ie.s*1e3+("L"in ie?ie.L:0));if(me&&!("Z"in ie)&&(ie.Z=0),"p"in ie&&(ie.H=ie.H%12+ie.p*12),ie.m===void 0&&(ie.m="q"in ie?ie.q:0),"V"in ie){if(ie.V<1||ie.V>53)return null;"w"in ie||(ie.w=1),"Z"in ie?(ve=cb(du(ie.y,0,1)),Je=ve.getUTCDay(),ve=Je>4||Je===0?_p.ceil(ve):_p(ve),ve=Fm.offset(ve,(ie.V-1)*7),ie.y=ve.getUTCFullYear(),ie.m=ve.getUTCMonth(),ie.d=ve.getUTCDate()+(ie.w+6)%7):(ve=sb(du(ie.y,0,1)),Je=ve.getDay(),ve=Je>4||Je===0?Np.ceil(ve):Np(ve),ve=Ef.offset(ve,(ie.V-1)*7),ie.y=ve.getFullYear(),ie.m=ve.getMonth(),ie.d=ve.getDate()+(ie.w+6)%7)}else("W"in ie||"U"in ie)&&("w"in ie||(ie.w="u"in ie?ie.u%7:"W"in ie?1:0),Je="Z"in ie?cb(du(ie.y,0,1)).getUTCDay():sb(du(ie.y,0,1)).getDay(),ie.m=0,ie.d="W"in ie?(ie.w+6)%7+ie.W*7-(Je+5)%7:ie.w+ie.U*7-(Je+6)%7);return"Z"in ie?(ie.H+=ie.Z/100|0,ie.M+=ie.Z%100,cb(ie)):sb(ie)}}function D(V,me,ye,ie){for(var ke=0,ve=me.length,Je=ye.length,tt,mt;ke<ve;){if(ie>=Je)return-1;if(tt=me.charCodeAt(ke++),tt===37){if(tt=me.charAt(ke++),mt=T[tt in MT?me.charAt(ke++):tt],!mt||(ie=mt(V,ye,ie))<0)return-1}else if(tt!=ye.charCodeAt(ie++))return-1}return ie}function B(V,me,ye){var ie=h.exec(me.slice(ye));return ie?(V.p=p.get(ie[0].toLowerCase()),ye+ie[0].length):-1}function Q(V,me,ye){var ie=x.exec(me.slice(ye));return ie?(V.w=S.get(ie[0].toLowerCase()),ye+ie[0].length):-1}function F(V,me,ye){var ie=m.exec(me.slice(ye));return ie?(V.w=b.get(ie[0].toLowerCase()),ye+ie[0].length):-1}function G(V,me,ye){var ie=A.exec(me.slice(ye));return ie?(V.m=_.get(ie[0].toLowerCase()),ye+ie[0].length):-1}function te(V,me,ye){var ie=E.exec(me.slice(ye));return ie?(V.m=C.get(ie[0].toLowerCase()),ye+ie[0].length):-1}function ce(V,me,ye){return D(V,t,me,ye)}function he(V,me,ye){return D(V,n,me,ye)}function I(V,me,ye){return D(V,r,me,ye)}function q(V){return s[V.getDay()]}function H(V){return l[V.getDay()]}function X(V){return f[V.getMonth()]}function ge(V){return u[V.getMonth()]}function L(V){return i[+(V.getHours()>=12)]}function z(V){return 1+~~(V.getMonth()/3)}function P(V){return s[V.getUTCDay()]}function W(V){return l[V.getUTCDay()]}function ne(V){return f[V.getUTCMonth()]}function se(V){return u[V.getUTCMonth()]}function Y(V){return i[+(V.getUTCHours()>=12)]}function pe(V){return 1+~~(V.getUTCMonth()/3)}return{format:function(V){var me=k(V+="",N);return me.toString=function(){return V},me},parse:function(V){var me=R(V+="",!1);return me.toString=function(){return V},me},utcFormat:function(V){var me=k(V+="",j);return me.toString=function(){return V},me},utcParse:function(V){var me=R(V+="",!0);return me.toString=function(){return V},me}}}var MT={"-":"",_:" ",0:"0"},fn=/^\s*\d+/,xte=/^%/,wte=/[\\^$*+?|[\]().{}]/g;function Qe(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",l=i.length;return r+(l<n?new Array(n-l+1).join(t)+i:i)}function Ste(e){return e.replace(wte,"\\$&")}function hu(e){return new RegExp("^(?:"+e.map(Ste).join("|")+")","i")}function pu(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function Ete(e,t,n){var r=fn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Cte(e,t,n){var r=fn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Ate(e,t,n){var r=fn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Ote(e,t,n){var r=fn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Nte(e,t,n){var r=fn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function RT(e,t,n){var r=fn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function DT(e,t,n){var r=fn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function _te(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function jte(e,t,n){var r=fn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Tte(e,t,n){var r=fn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function PT(e,t,n){var r=fn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Mte(e,t,n){var r=fn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function kT(e,t,n){var r=fn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Rte(e,t,n){var r=fn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Dte(e,t,n){var r=fn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Pte(e,t,n){var r=fn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function kte(e,t,n){var r=fn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Ite(e,t,n){var r=xte.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Lte(e,t,n){var r=fn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function zte(e,t,n){var r=fn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function IT(e,t){return Qe(e.getDate(),t,2)}function $te(e,t){return Qe(e.getHours(),t,2)}function Bte(e,t){return Qe(e.getHours()%12||12,t,2)}function Ute(e,t){return Qe(1+Ef.count(wi(e),e),t,3)}function oL(e,t){return Qe(e.getMilliseconds(),t,3)}function Hte(e,t){return oL(e,t)+"000"}function qte(e,t){return Qe(e.getMonth()+1,t,2)}function Fte(e,t){return Qe(e.getMinutes(),t,2)}function Kte(e,t){return Qe(e.getSeconds(),t,2)}function Vte(e){var t=e.getDay();return t===0?7:t}function Gte(e,t){return Qe(Km.count(wi(e)-1,e),t,2)}function lL(e){var t=e.getDay();return t>=4||t===0?Ls(e):Ls.ceil(e)}function Yte(e,t){return e=lL(e),Qe(Ls.count(wi(e),e)+(wi(e).getDay()===4),t,2)}function Wte(e){return e.getDay()}function Xte(e,t){return Qe(Np.count(wi(e)-1,e),t,2)}function Qte(e,t){return Qe(e.getFullYear()%100,t,2)}function Zte(e,t){return e=lL(e),Qe(e.getFullYear()%100,t,2)}function Jte(e,t){return Qe(e.getFullYear()%1e4,t,4)}function ene(e,t){var n=e.getDay();return e=n>=4||n===0?Ls(e):Ls.ceil(e),Qe(e.getFullYear()%1e4,t,4)}function tne(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Qe(t/60|0,"0",2)+Qe(t%60,"0",2)}function LT(e,t){return Qe(e.getUTCDate(),t,2)}function nne(e,t){return Qe(e.getUTCHours(),t,2)}function rne(e,t){return Qe(e.getUTCHours()%12||12,t,2)}function ane(e,t){return Qe(1+Fm.count(Si(e),e),t,3)}function sL(e,t){return Qe(e.getUTCMilliseconds(),t,3)}function ine(e,t){return sL(e,t)+"000"}function one(e,t){return Qe(e.getUTCMonth()+1,t,2)}function lne(e,t){return Qe(e.getUTCMinutes(),t,2)}function sne(e,t){return Qe(e.getUTCSeconds(),t,2)}function cne(e){var t=e.getUTCDay();return t===0?7:t}function une(e,t){return Qe(Vm.count(Si(e)-1,e),t,2)}function cL(e){var t=e.getUTCDay();return t>=4||t===0?zs(e):zs.ceil(e)}function fne(e,t){return e=cL(e),Qe(zs.count(Si(e),e)+(Si(e).getUTCDay()===4),t,2)}function dne(e){return e.getUTCDay()}function hne(e,t){return Qe(_p.count(Si(e)-1,e),t,2)}function pne(e,t){return Qe(e.getUTCFullYear()%100,t,2)}function mne(e,t){return e=cL(e),Qe(e.getUTCFullYear()%100,t,2)}function vne(e,t){return Qe(e.getUTCFullYear()%1e4,t,4)}function gne(e,t){var n=e.getUTCDay();return e=n>=4||n===0?zs(e):zs.ceil(e),Qe(e.getUTCFullYear()%1e4,t,4)}function yne(){return"+0000"}function zT(){return"%"}function $T(e){return+e}function BT(e){return Math.floor(+e/1e3)}var ps,uL,fL;bne({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function bne(e){return ps=bte(e),uL=ps.format,ps.parse,fL=ps.utcFormat,ps.utcParse,ps}function xne(e){return new Date(e)}function wne(e){return e instanceof Date?+e:+new Date(+e)}function B1(e,t,n,r,i,l,s,u,f,h){var p=O1(),m=p.invert,b=p.domain,x=h(".%L"),S=h(":%S"),E=h("%I:%M"),C=h("%I %p"),A=h("%a %d"),_=h("%b %d"),N=h("%B"),j=h("%Y");function T(k){return(f(k)<k?x:u(k)<k?S:s(k)<k?E:l(k)<k?C:r(k)<k?i(k)<k?A:_:n(k)<k?N:j)(k)}return p.invert=function(k){return new Date(m(k))},p.domain=function(k){return arguments.length?b(Array.from(k,wne)):b().map(xne)},p.ticks=function(k){var R=b();return e(R[0],R[R.length-1],k??10)},p.tickFormat=function(k,R){return R==null?T:h(R)},p.nice=function(k){var R=b();return(!k||typeof k.range!="function")&&(k=t(R[0],R[R.length-1],k??10)),k?b(QI(R,k)):p},p.copy=function(){return Sf(p,B1(e,t,n,r,i,l,s,u,f,h))},p}function Sne(){return Vr.apply(B1(gte,yte,wi,z1,Km,Ef,I1,P1,Qo,uL).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Ene(){return Vr.apply(B1(mte,vte,Si,$1,Vm,Fm,L1,k1,Qo,fL).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Gm(){var e=0,t=1,n,r,i,l,s=In,u=!1,f;function h(m){return m==null||isNaN(m=+m)?f:s(i===0?.5:(m=(l(m)-n)*i,u?Math.max(0,Math.min(1,m)):m))}h.domain=function(m){return arguments.length?([e,t]=m,n=l(e=+e),r=l(t=+t),i=n===r?0:1/(r-n),h):[e,t]},h.clamp=function(m){return arguments.length?(u=!!m,h):u},h.interpolator=function(m){return arguments.length?(s=m,h):s};function p(m){return function(b){var x,S;return arguments.length?([x,S]=b,s=m(x,S),h):[s(0),s(1)]}}return h.range=p(ac),h.rangeRound=p(A1),h.unknown=function(m){return arguments.length?(f=m,h):f},function(m){return l=m,n=m(e),r=m(t),i=n===r?0:1/(r-n),h}}function So(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function dL(){var e=wo(Gm()(In));return e.copy=function(){return So(e,dL())},Ni.apply(e,arguments)}function hL(){var e=j1(Gm()).domain([1,10]);return e.copy=function(){return So(e,hL()).base(e.base())},Ni.apply(e,arguments)}function pL(){var e=T1(Gm());return e.copy=function(){return So(e,pL()).constant(e.constant())},Ni.apply(e,arguments)}function U1(){var e=M1(Gm());return e.copy=function(){return So(e,U1()).exponent(e.exponent())},Ni.apply(e,arguments)}function Cne(){return U1.apply(null,arguments).exponent(.5)}function mL(){var e=[],t=In;function n(r){if(r!=null&&!isNaN(r=+r))return t((xf(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(ho),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,l)=>cee(e,l/r))},n.copy=function(){return mL(t).domain(e)},Ni.apply(n,arguments)}function Ym(){var e=0,t=.5,n=1,r=1,i,l,s,u,f,h=In,p,m=!1,b;function x(E){return isNaN(E=+E)?b:(E=.5+((E=+p(E))-l)*(r*E<r*l?u:f),h(m?Math.max(0,Math.min(1,E)):E))}x.domain=function(E){return arguments.length?([e,t,n]=E,i=p(e=+e),l=p(t=+t),s=p(n=+n),u=i===l?0:.5/(l-i),f=l===s?0:.5/(s-l),r=l<i?-1:1,x):[e,t,n]},x.clamp=function(E){return arguments.length?(m=!!E,x):m},x.interpolator=function(E){return arguments.length?(h=E,x):h};function S(E){return function(C){var A,_,N;return arguments.length?([A,_,N]=C,h=Iee(E,[A,_,N]),x):[h(0),h(.5),h(1)]}}return x.range=S(ac),x.rangeRound=S(A1),x.unknown=function(E){return arguments.length?(b=E,x):b},function(E){return p=E,i=E(e),l=E(t),s=E(n),u=i===l?0:.5/(l-i),f=l===s?0:.5/(s-l),r=l<i?-1:1,x}}function vL(){var e=wo(Ym()(In));return e.copy=function(){return So(e,vL())},Ni.apply(e,arguments)}function gL(){var e=j1(Ym()).domain([.1,1,10]);return e.copy=function(){return So(e,gL()).base(e.base())},Ni.apply(e,arguments)}function yL(){var e=T1(Ym());return e.copy=function(){return So(e,yL()).constant(e.constant())},Ni.apply(e,arguments)}function H1(){var e=M1(Ym());return e.copy=function(){return So(e,H1()).exponent(e.exponent())},Ni.apply(e,arguments)}function Ane(){return H1.apply(null,arguments).exponent(.5)}const xu=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:S1,scaleDiverging:vL,scaleDivergingLog:gL,scaleDivergingPow:H1,scaleDivergingSqrt:Ane,scaleDivergingSymlog:yL,scaleIdentity:XI,scaleImplicit:Dx,scaleLinear:WI,scaleLog:ZI,scaleOrdinal:w1,scalePoint:dee,scalePow:R1,scaleQuantile:tL,scaleQuantize:nL,scaleRadial:eL,scaleSequential:dL,scaleSequentialLog:hL,scaleSequentialPow:U1,scaleSequentialQuantile:mL,scaleSequentialSqrt:Cne,scaleSequentialSymlog:pL,scaleSqrt:ite,scaleSymlog:JI,scaleThreshold:rL,scaleTime:Sne,scaleUtc:Ene,tickFormat:YI},Symbol.toStringTag,{value:"Module"}));var Eo=e=>e.chartData,One=oe([Eo],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),q1=(e,t,n,r)=>r?One(e):Eo(e);function bo(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(Tt(t)&&Tt(n))return!0}return!1}function UT(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function bL(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,r]=e,i,l;if(Tt(n))i=n;else if(typeof n=="function")return;if(Tt(r))l=r;else if(typeof r=="function")return;var s=[i,l];if(bo(s))return s}}function Nne(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if(bo(r))return UT(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var[i,l]=e,s,u;if(i==="auto")t!=null&&(s=Math.min(...t));else if(Ne(i))s=i;else if(typeof i=="function")try{t!=null&&(s=i(t?.[0]))}catch{}else if(typeof i=="string"&&gj.test(i)){var f=gj.exec(i);if(f==null||t==null)s=void 0;else{var h=+f[1];s=t[0]-h}}else s=t?.[0];if(l==="auto")t!=null&&(u=Math.max(...t));else if(Ne(l))u=l;else if(typeof l=="function")try{t!=null&&(u=l(t?.[1]))}catch{}else if(typeof l=="string"&&yj.test(l)){var p=yj.exec(l);if(p==null||t==null)u=void 0;else{var m=+p[1];u=t[1]+m}}else u=t?.[1];var b=[s,u];if(bo(b))return t==null?b:UT(b,t,n)}}}var ic=1e9,_ne={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},K1,Et=!0,qr="[DecimalError] ",nl=qr+"Invalid argument: ",F1=qr+"Exponent out of range: ",oc=Math.floor,Yo=Math.pow,jne=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,mr,cn=1e7,bt=7,xL=9007199254740991,jp=oc(xL/bt),xe={};xe.absoluteValue=xe.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};xe.comparedTo=xe.cmp=function(e){var t,n,r,i,l=this;if(e=new l.constructor(e),l.s!==e.s)return l.s||-e.s;if(l.e!==e.e)return l.e>e.e^l.s<0?1:-1;for(r=l.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(l.d[t]!==e.d[t])return l.d[t]>e.d[t]^l.s<0?1:-1;return r===i?0:r>i^l.s<0?1:-1};xe.decimalPlaces=xe.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*bt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};xe.dividedBy=xe.div=function(e){return di(this,new this.constructor(e))};xe.dividedToIntegerBy=xe.idiv=function(e){var t=this,n=t.constructor;return dt(di(t,new n(e),0,1),n.precision)};xe.equals=xe.eq=function(e){return!this.cmp(e)};xe.exponent=function(){return Bt(this)};xe.greaterThan=xe.gt=function(e){return this.cmp(e)>0};xe.greaterThanOrEqualTo=xe.gte=function(e){return this.cmp(e)>=0};xe.isInteger=xe.isint=function(){return this.e>this.d.length-2};xe.isNegative=xe.isneg=function(){return this.s<0};xe.isPositive=xe.ispos=function(){return this.s>0};xe.isZero=function(){return this.s===0};xe.lessThan=xe.lt=function(e){return this.cmp(e)<0};xe.lessThanOrEqualTo=xe.lte=function(e){return this.cmp(e)<1};xe.logarithm=xe.log=function(e){var t,n=this,r=n.constructor,i=r.precision,l=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(mr))throw Error(qr+"NaN");if(n.s<1)throw Error(qr+(n.s?"NaN":"-Infinity"));return n.eq(mr)?new r(0):(Et=!1,t=di(Wu(n,l),Wu(e,l),l),Et=!0,dt(t,i))};xe.minus=xe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?EL(t,e):wL(t,(e.s=-e.s,e))};xe.modulo=xe.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(qr+"NaN");return n.s?(Et=!1,t=di(n,e,0,1).times(e),Et=!0,n.minus(t)):dt(new r(n),i)};xe.naturalExponential=xe.exp=function(){return SL(this)};xe.naturalLogarithm=xe.ln=function(){return Wu(this)};xe.negated=xe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};xe.plus=xe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?wL(t,e):EL(t,(e.s=-e.s,e))};xe.precision=xe.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(nl+e);if(t=Bt(i)+1,r=i.d.length-1,n=r*bt+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};xe.squareRoot=xe.sqrt=function(){var e,t,n,r,i,l,s,u=this,f=u.constructor;if(u.s<1){if(!u.s)return new f(0);throw Error(qr+"NaN")}for(e=Bt(u),Et=!1,i=Math.sqrt(+u),i==0||i==1/0?(t=Ea(u.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=oc((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),r=new f(t)):r=new f(i.toString()),n=f.precision,i=s=n+3;;)if(l=r,r=l.plus(di(u,l,s+2)).times(.5),Ea(l.d).slice(0,s)===(t=Ea(r.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(dt(l,n+1,0),l.times(l).eq(u)){r=l;break}}else if(t!="9999")break;s+=4}return Et=!0,dt(r,n)};xe.times=xe.mul=function(e){var t,n,r,i,l,s,u,f,h,p=this,m=p.constructor,b=p.d,x=(e=new m(e)).d;if(!p.s||!e.s)return new m(0);for(e.s*=p.s,n=p.e+e.e,f=b.length,h=x.length,f<h&&(l=b,b=x,x=l,s=f,f=h,h=s),l=[],s=f+h,r=s;r--;)l.push(0);for(r=h;--r>=0;){for(t=0,i=f+r;i>r;)u=l[i]+x[r]*b[i-r-1]+t,l[i--]=u%cn|0,t=u/cn|0;l[i]=(l[i]+t)%cn|0}for(;!l[--s];)l.pop();return t?++n:l.shift(),e.d=l,e.e=n,Et?dt(e,m.precision):e};xe.toDecimalPlaces=xe.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Ta(e,0,ic),t===void 0?t=r.rounding:Ta(t,0,8),dt(n,e+Bt(n)+1,t))};xe.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=dl(r,!0):(Ta(e,0,ic),t===void 0?t=i.rounding:Ta(t,0,8),r=dt(new i(r),e+1,t),n=dl(r,!0,e+1)),n};xe.toFixed=function(e,t){var n,r,i=this,l=i.constructor;return e===void 0?dl(i):(Ta(e,0,ic),t===void 0?t=l.rounding:Ta(t,0,8),r=dt(new l(i),e+Bt(i)+1,t),n=dl(r.abs(),!1,e+Bt(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};xe.toInteger=xe.toint=function(){var e=this,t=e.constructor;return dt(new t(e),Bt(e)+1,t.rounding)};xe.toNumber=function(){return+this};xe.toPower=xe.pow=function(e){var t,n,r,i,l,s,u=this,f=u.constructor,h=12,p=+(e=new f(e));if(!e.s)return new f(mr);if(u=new f(u),!u.s){if(e.s<1)throw Error(qr+"Infinity");return u}if(u.eq(mr))return u;if(r=f.precision,e.eq(mr))return dt(u,r);if(t=e.e,n=e.d.length-1,s=t>=n,l=u.s,s){if((n=p<0?-p:p)<=xL){for(i=new f(mr),t=Math.ceil(r/bt+4),Et=!1;n%2&&(i=i.times(u),qT(i.d,t)),n=oc(n/2),n!==0;)u=u.times(u),qT(u.d,t);return Et=!0,e.s<0?new f(mr).div(i):dt(i,r)}}else if(l<0)throw Error(qr+"NaN");return l=l<0&&e.d[Math.max(t,n)]&1?-1:1,u.s=1,Et=!1,i=e.times(Wu(u,r+h)),Et=!0,i=SL(i),i.s=l,i};xe.toPrecision=function(e,t){var n,r,i=this,l=i.constructor;return e===void 0?(n=Bt(i),r=dl(i,n<=l.toExpNeg||n>=l.toExpPos)):(Ta(e,1,ic),t===void 0?t=l.rounding:Ta(t,0,8),i=dt(new l(i),e,t),n=Bt(i),r=dl(i,e<=n||n<=l.toExpNeg,e)),r};xe.toSignificantDigits=xe.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Ta(e,1,ic),t===void 0?t=r.rounding:Ta(t,0,8)),dt(new r(n),e,t)};xe.toString=xe.valueOf=xe.val=xe.toJSON=xe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Bt(e),n=e.constructor;return dl(e,t<=n.toExpNeg||t>=n.toExpPos)};function wL(e,t){var n,r,i,l,s,u,f,h,p=e.constructor,m=p.precision;if(!e.s||!t.s)return t.s||(t=new p(e)),Et?dt(t,m):t;if(f=e.d,h=t.d,s=e.e,i=t.e,f=f.slice(),l=s-i,l){for(l<0?(r=f,l=-l,u=h.length):(r=h,i=s,u=f.length),s=Math.ceil(m/bt),u=s>u?s+1:u+1,l>u&&(l=u,r.length=1),r.reverse();l--;)r.push(0);r.reverse()}for(u=f.length,l=h.length,u-l<0&&(l=u,r=h,h=f,f=r),n=0;l;)n=(f[--l]=f[l]+h[l]+n)/cn|0,f[l]%=cn;for(n&&(f.unshift(n),++i),u=f.length;f[--u]==0;)f.pop();return t.d=f,t.e=i,Et?dt(t,m):t}function Ta(e,t,n){if(e!==~~e||e<t||e>n)throw Error(nl+e)}function Ea(e){var t,n,r,i=e.length-1,l="",s=e[0];if(i>0){for(l+=s,t=1;t<i;t++)r=e[t]+"",n=bt-r.length,n&&(l+=oo(n)),l+=r;s=e[t],r=s+"",n=bt-r.length,n&&(l+=oo(n))}else if(s===0)return"0";for(;s%10===0;)s/=10;return l+s}var di=(function(){function e(r,i){var l,s=0,u=r.length;for(r=r.slice();u--;)l=r[u]*i+s,r[u]=l%cn|0,s=l/cn|0;return s&&r.unshift(s),r}function t(r,i,l,s){var u,f;if(l!=s)f=l>s?1:-1;else for(u=f=0;u<l;u++)if(r[u]!=i[u]){f=r[u]>i[u]?1:-1;break}return f}function n(r,i,l){for(var s=0;l--;)r[l]-=s,s=r[l]<i[l]?1:0,r[l]=s*cn+r[l]-i[l];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,l,s){var u,f,h,p,m,b,x,S,E,C,A,_,N,j,T,k,R,D,B=r.constructor,Q=r.s==i.s?1:-1,F=r.d,G=i.d;if(!r.s)return new B(r);if(!i.s)throw Error(qr+"Division by zero");for(f=r.e-i.e,R=G.length,T=F.length,x=new B(Q),S=x.d=[],h=0;G[h]==(F[h]||0);)++h;if(G[h]>(F[h]||0)&&--f,l==null?_=l=B.precision:s?_=l+(Bt(r)-Bt(i))+1:_=l,_<0)return new B(0);if(_=_/bt+2|0,h=0,R==1)for(p=0,G=G[0],_++;(h<T||p)&&_--;h++)N=p*cn+(F[h]||0),S[h]=N/G|0,p=N%G|0;else{for(p=cn/(G[0]+1)|0,p>1&&(G=e(G,p),F=e(F,p),R=G.length,T=F.length),j=R,E=F.slice(0,R),C=E.length;C<R;)E[C++]=0;D=G.slice(),D.unshift(0),k=G[0],G[1]>=cn/2&&++k;do p=0,u=t(G,E,R,C),u<0?(A=E[0],R!=C&&(A=A*cn+(E[1]||0)),p=A/k|0,p>1?(p>=cn&&(p=cn-1),m=e(G,p),b=m.length,C=E.length,u=t(m,E,b,C),u==1&&(p--,n(m,R<b?D:G,b))):(p==0&&(u=p=1),m=G.slice()),b=m.length,b<C&&m.unshift(0),n(E,m,C),u==-1&&(C=E.length,u=t(G,E,R,C),u<1&&(p++,n(E,R<C?D:G,C))),C=E.length):u===0&&(p++,E=[0]),S[h++]=p,u&&E[0]?E[C++]=F[j]||0:(E=[F[j]],C=1);while((j++<T||E[0]!==void 0)&&_--)}return S[0]||S.shift(),x.e=f,dt(x,s?l+Bt(x)+1:l)}})();function SL(e,t){var n,r,i,l,s,u,f=0,h=0,p=e.constructor,m=p.precision;if(Bt(e)>16)throw Error(F1+Bt(e));if(!e.s)return new p(mr);for(Et=!1,u=m,s=new p(.03125);e.abs().gte(.1);)e=e.times(s),h+=5;for(r=Math.log(Yo(2,h))/Math.LN10*2+5|0,u+=r,n=i=l=new p(mr),p.precision=u;;){if(i=dt(i.times(e),u),n=n.times(++f),s=l.plus(di(i,n,u)),Ea(s.d).slice(0,u)===Ea(l.d).slice(0,u)){for(;h--;)l=dt(l.times(l),u);return p.precision=m,t==null?(Et=!0,dt(l,m)):l}l=s}}function Bt(e){for(var t=e.e*bt,n=e.d[0];n>=10;n/=10)t++;return t}function ub(e,t,n){if(t>e.LN10.sd())throw Et=!0,n&&(e.precision=n),Error(qr+"LN10 precision limit exceeded");return dt(new e(e.LN10),t)}function oo(e){for(var t="";e--;)t+="0";return t}function Wu(e,t){var n,r,i,l,s,u,f,h,p,m=1,b=10,x=e,S=x.d,E=x.constructor,C=E.precision;if(x.s<1)throw Error(qr+(x.s?"NaN":"-Infinity"));if(x.eq(mr))return new E(0);if(t==null?(Et=!1,h=C):h=t,x.eq(10))return t==null&&(Et=!0),ub(E,h);if(h+=b,E.precision=h,n=Ea(S),r=n.charAt(0),l=Bt(x),Math.abs(l)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)x=x.times(e),n=Ea(x.d),r=n.charAt(0),m++;l=Bt(x),r>1?(x=new E("0."+n),l++):x=new E(r+"."+n.slice(1))}else return f=ub(E,h+2,C).times(l+""),x=Wu(new E(r+"."+n.slice(1)),h-b).plus(f),E.precision=C,t==null?(Et=!0,dt(x,C)):x;for(u=s=x=di(x.minus(mr),x.plus(mr),h),p=dt(x.times(x),h),i=3;;){if(s=dt(s.times(p),h),f=u.plus(di(s,new E(i),h)),Ea(f.d).slice(0,h)===Ea(u.d).slice(0,h))return u=u.times(2),l!==0&&(u=u.plus(ub(E,h+2,C).times(l+""))),u=di(u,new E(m),h),E.precision=C,t==null?(Et=!0,dt(u,C)):u;u=f,i+=2}}function HT(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=oc(n/bt),e.d=[],r=(n+1)%bt,n<0&&(r+=bt),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=bt;r<i;)e.d.push(+t.slice(r,r+=bt));t=t.slice(r),r=bt-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),Et&&(e.e>jp||e.e<-jp))throw Error(F1+n)}else e.s=0,e.e=0,e.d=[0];return e}function dt(e,t,n){var r,i,l,s,u,f,h,p,m=e.d;for(s=1,l=m[0];l>=10;l/=10)s++;if(r=t-s,r<0)r+=bt,i=t,h=m[p=0];else{if(p=Math.ceil((r+1)/bt),l=m.length,p>=l)return e;for(h=l=m[p],s=1;l>=10;l/=10)s++;r%=bt,i=r-bt+s}if(n!==void 0&&(l=Yo(10,s-i-1),u=h/l%10|0,f=t<0||m[p+1]!==void 0||h%l,f=n<4?(u||f)&&(n==0||n==(e.s<0?3:2)):u>5||u==5&&(n==4||f||n==6&&(r>0?i>0?h/Yo(10,s-i):0:m[p-1])%10&1||n==(e.s<0?8:7))),t<1||!m[0])return f?(l=Bt(e),m.length=1,t=t-l-1,m[0]=Yo(10,(bt-t%bt)%bt),e.e=oc(-t/bt)||0):(m.length=1,m[0]=e.e=e.s=0),e;if(r==0?(m.length=p,l=1,p--):(m.length=p+1,l=Yo(10,bt-r),m[p]=i>0?(h/Yo(10,s-i)%Yo(10,i)|0)*l:0),f)for(;;)if(p==0){(m[0]+=l)==cn&&(m[0]=1,++e.e);break}else{if(m[p]+=l,m[p]!=cn)break;m[p--]=0,l=1}for(r=m.length;m[--r]===0;)m.pop();if(Et&&(e.e>jp||e.e<-jp))throw Error(F1+Bt(e));return e}function EL(e,t){var n,r,i,l,s,u,f,h,p,m,b=e.constructor,x=b.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new b(e),Et?dt(t,x):t;if(f=e.d,m=t.d,r=t.e,h=e.e,f=f.slice(),s=h-r,s){for(p=s<0,p?(n=f,s=-s,u=m.length):(n=m,r=h,u=f.length),i=Math.max(Math.ceil(x/bt),u)+2,s>i&&(s=i,n.length=1),n.reverse(),i=s;i--;)n.push(0);n.reverse()}else{for(i=f.length,u=m.length,p=i<u,p&&(u=i),i=0;i<u;i++)if(f[i]!=m[i]){p=f[i]<m[i];break}s=0}for(p&&(n=f,f=m,m=n,t.s=-t.s),u=f.length,i=m.length-u;i>0;--i)f[u++]=0;for(i=m.length;i>s;){if(f[--i]<m[i]){for(l=i;l&&f[--l]===0;)f[l]=cn-1;--f[l],f[i]+=cn}f[i]-=m[i]}for(;f[--u]===0;)f.pop();for(;f[0]===0;f.shift())--r;return f[0]?(t.d=f,t.e=r,Et?dt(t,x):t):new b(0)}function dl(e,t,n){var r,i=Bt(e),l=Ea(e.d),s=l.length;return t?(n&&(r=n-s)>0?l=l.charAt(0)+"."+l.slice(1)+oo(r):s>1&&(l=l.charAt(0)+"."+l.slice(1)),l=l+(i<0?"e":"e+")+i):i<0?(l="0."+oo(-i-1)+l,n&&(r=n-s)>0&&(l+=oo(r))):i>=s?(l+=oo(i+1-s),n&&(r=n-i-1)>0&&(l=l+"."+oo(r))):((r=i+1)<s&&(l=l.slice(0,r)+"."+l.slice(r)),n&&(r=n-s)>0&&(i+1===s&&(l+="."),l+=oo(r))),e.s<0?"-"+l:l}function qT(e,t){if(e.length>t)return e.length=t,!0}function CL(e){var t,n,r;function i(l){var s=this;if(!(s instanceof i))return new i(l);if(s.constructor=i,l instanceof i){s.s=l.s,s.e=l.e,s.d=(l=l.d)?l.slice():l;return}if(typeof l=="number"){if(l*0!==0)throw Error(nl+l);if(l>0)s.s=1;else if(l<0)l=-l,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(l===~~l&&l<1e7){s.e=0,s.d=[l];return}return HT(s,l.toString())}else if(typeof l!="string")throw Error(nl+l);if(l.charCodeAt(0)===45?(l=l.slice(1),s.s=-1):s.s=1,jne.test(l))HT(s,l);else throw Error(nl+l)}if(i.prototype=xe,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=CL,i.config=i.set=Tne,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function Tne(e){if(!e||typeof e!="object")throw Error(qr+"Object expected");var t,n,r,i=["precision",1,ic,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(oc(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(nl+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(nl+n+": "+r);return this}var K1=CL(_ne);mr=new K1(1);const at=K1;var Mne=e=>e,AL={},OL=e=>e===AL,FT=e=>function t(){return arguments.length===0||arguments.length===1&&OL(arguments.length<=0?void 0:arguments[0])?t:e(...arguments)},NL=(e,t)=>e===1?t:FT(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var l=r.filter(s=>s!==AL).length;return l>=e?t(...r):NL(e-l,FT(function(){for(var s=arguments.length,u=new Array(s),f=0;f<s;f++)u[f]=arguments[f];var h=r.map(p=>OL(p)?u.shift():p);return t(...h,...u)}))}),Rne=e=>NL(e.length,e),Lx=(e,t)=>{for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},Dne=Rne((e,t)=>Array.isArray(t)?t.map(e):Object.keys(t).map(n=>t[n]).map(e)),Pne=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return Mne;var i=n.reverse(),l=i[0],s=i.slice(1);return function(){return s.reduce((u,f)=>f(u),l(...arguments))}},zx=e=>Array.isArray(e)?e.reverse():e.split("").reverse().join("");function _L(e){var t;return e===0?t=1:t=Math.floor(new at(e).abs().log(10).toNumber())+1,t}function jL(e,t,n){for(var r=new at(e),i=0,l=[];r.lt(t)&&i<1e5;)l.push(r.toNumber()),r=r.add(n),i++;return l}var TL=e=>{var[t,n]=e,[r,i]=[t,n];return t>n&&([r,i]=[n,t]),[r,i]},ML=(e,t,n)=>{if(e.lte(0))return new at(0);var r=_L(e.toNumber()),i=new at(10).pow(r),l=e.div(i),s=r!==1?.05:.1,u=new at(Math.ceil(l.div(s).toNumber())).add(n).mul(s),f=u.mul(i);return t?new at(f.toNumber()):new at(Math.ceil(f.toNumber()))},kne=(e,t,n)=>{var r=new at(1),i=new at(e);if(!i.isint()&&n){var l=Math.abs(e);l<1?(r=new at(10).pow(_L(e)-1),i=new at(Math.floor(i.div(r).toNumber())).mul(r)):l>1&&(i=new at(Math.floor(e)))}else e===0?i=new at(Math.floor((t-1)/2)):n||(i=new at(Math.floor(e)));var s=Math.floor((t-1)/2),u=Pne(Dne(f=>i.add(new at(f-s).mul(r)).toNumber()),Lx);return u(0,t)},RL=function(t,n,r,i){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((n-t)/(r-1)))return{step:new at(0),tickMin:new at(0),tickMax:new at(0)};var s=ML(new at(n).sub(t).div(r-1),i,l),u;t<=0&&n>=0?u=new at(0):(u=new at(t).add(n).div(2),u=u.sub(new at(u).mod(s)));var f=Math.ceil(u.sub(t).div(s).toNumber()),h=Math.ceil(new at(n).sub(u).div(s).toNumber()),p=f+h+1;return p>r?RL(t,n,r,i,l+1):(p<r&&(h=n>0?h+(r-p):h,f=n>0?f:f+(r-p)),{step:s,tickMin:u.sub(new at(f).mul(s)),tickMax:u.add(new at(h).mul(s))})},Ine=function(t){var[n,r]=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=Math.max(i,2),[u,f]=TL([n,r]);if(u===-1/0||f===1/0){var h=f===1/0?[u,...Lx(0,i-1).map(()=>1/0)]:[...Lx(0,i-1).map(()=>-1/0),f];return n>r?zx(h):h}if(u===f)return kne(u,i,l);var{step:p,tickMin:m,tickMax:b}=RL(u,f,s,l,0),x=jL(m,b.add(new at(.1).mul(p)),p);return n>r?zx(x):x},Lne=function(t,n){var[r,i]=t,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[s,u]=TL([r,i]);if(s===-1/0||u===1/0)return[r,i];if(s===u)return[s];var f=Math.max(n,2),h=ML(new at(u).sub(s).div(f-1),l,0),p=[...jL(new at(s),new at(u),h),u];return l===!1&&(p=p.map(m=>Math.round(m))),r>i?zx(p):p},zne=e=>e.rootProps.barCategoryGap,Wm=e=>e.rootProps.stackOffset,DL=e=>e.rootProps.reverseStackOrder,V1=e=>e.options.chartName,G1=e=>e.rootProps.syncId,PL=e=>e.rootProps.syncMethod,Y1=e=>e.options.eventEmitter,$ne=e=>e.rootProps.baseValue,Ln={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},ni={allowDuplicatedCategory:!0,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"category"},dr={allowDataOverflow:!1,allowDuplicatedCategory:!0,radiusAxisId:0,scale:"auto",tick:!0,tickCount:5,type:"number"},Xm=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t},Bne={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:ni.angleAxisId,includeHidden:!1,name:void 0,reversed:ni.reversed,scale:ni.scale,tick:ni.tick,tickCount:void 0,ticks:void 0,type:ni.type,unit:void 0},Une={allowDataOverflow:dr.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:dr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:dr.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:dr.scale,tick:dr.tick,tickCount:dr.tickCount,ticks:void 0,type:dr.type,unit:void 0},Hne={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:ni.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:ni.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:ni.scale,tick:ni.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},qne={allowDataOverflow:dr.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:dr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:dr.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:dr.scale,tick:dr.tick,tickCount:dr.tickCount,ticks:void 0,type:"category",unit:void 0},W1=(e,t)=>e.polarAxis.angleAxis[t]!=null?e.polarAxis.angleAxis[t]:e.layout.layoutType==="radial"?Hne:Bne,X1=(e,t)=>e.polarAxis.radiusAxis[t]!=null?e.polarAxis.radiusAxis[t]:e.layout.layoutType==="radial"?qne:Une,Qm=e=>e.polarOptions,Q1=oe([Ai,Oi,Cn],IJ),kL=oe([Qm,Q1],(e,t)=>{if(e!=null)return yo(e.innerRadius,t,0)}),IL=oe([Qm,Q1],(e,t)=>{if(e!=null)return yo(e.outerRadius,t,t*.8)}),Fne=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]},LL=oe([Qm],Fne);oe([W1,LL],Xm);var zL=oe([Q1,kL,IL],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});oe([X1,zL],Xm);var $L=oe([pt,Qm,kL,IL,Ai,Oi],(e,t,n,r,i,l)=>{if(!(e!=="centric"&&e!=="radial"||t==null||n==null||r==null)){var{cx:s,cy:u,startAngle:f,endAngle:h}=t;return{cx:yo(s,i,i/2),cy:yo(u,l,l/2),innerRadius:n,outerRadius:r,startAngle:f,endAngle:h,clockWise:!1}}}),Qt=(e,t)=>t,Zm=(e,t,n)=>n;function Z1(e){return e?.id}function BL(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:i,dataKey:l}=n,s=new Map;return e.forEach(u=>{var f,h=(f=u.data)!==null&&f!==void 0?f:r;if(!(h==null||h.length===0)){var p=Z1(u);h.forEach((m,b)=>{var x=l==null||i?b:String(Rn(m,l,null)),S=Rn(m,u.dataKey,0),E;s.has(x)?E=s.get(x):E={},Object.assign(E,{[p]:S}),s.set(x,E)})}}),Array.from(s.values())}function J1(e){return e.stackId!=null&&e.dataKey!=null}var Jm=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function ev(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function Kne(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return!1}var Zt=e=>{var t=pt(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},lc=e=>e.tooltip.settings.axisId;function KT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Tp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?KT(Object(n),!0).forEach(function(r){Vne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Vne(e,t,n){return(t=Gne(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gne(e){var t=Yne(e,"string");return typeof t=="symbol"?t:t+""}function Yne(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var $x=[0,"auto"],ln={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},UL=(e,t)=>e.cartesianAxis.xAxis[t],_i=(e,t)=>{var n=UL(e,t);return n??ln},sn={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:$x,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:gf},HL=(e,t)=>e.cartesianAxis.yAxis[t],ji=(e,t)=>{var n=HL(e,t);return n??sn},Wne={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:""},eS=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??Wne},Bn=(e,t,n)=>{switch(t){case"xAxis":return _i(e,n);case"yAxis":return ji(e,n);case"zAxis":return eS(e,n);case"angleAxis":return W1(e,n);case"radiusAxis":return X1(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},Xne=(e,t,n)=>{switch(t){case"xAxis":return _i(e,n);case"yAxis":return ji(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},Cf=(e,t,n)=>{switch(t){case"xAxis":return _i(e,n);case"yAxis":return ji(e,n);case"angleAxis":return W1(e,n);case"radiusAxis":return X1(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},qL=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function FL(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var KL=e=>e.graphicalItems.cartesianItems,Qne=oe([Qt,Zm],FL),VL=(e,t,n)=>e.filter(n).filter(r=>t?.includeHidden===!0?!0:!r.hide),Af=oe([KL,Bn,Qne],VL,{memoizeOptions:{resultEqualityCheck:ev}}),GL=oe([Af],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(J1)),YL=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),Zne=oe([Af],YL),WL=e=>e.map(t=>t.data).filter(Boolean).flat(1),Jne=oe([Af],WL,{memoizeOptions:{resultEqualityCheck:ev}}),XL=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:i}=t;return e.length>0?e:n.slice(r,i+1)},tS=oe([Jne,q1],XL),QL=(e,t,n)=>t?.dataKey!=null?e.map(r=>({value:Rn(r,t.dataKey)})):n.length>0?n.map(r=>r.dataKey).flatMap(r=>e.map(i=>({value:Rn(i,r)}))):e.map(r=>({value:r})),tv=oe([tS,Bn,Af],QL);function ZL(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function Ph(e){if(_a(e)||e instanceof Date){var t=Number(e);if(Tt(t))return t}}function VT(e){if(Array.isArray(e)){var t=[Ph(e[0]),Ph(e[1])];return bo(t)?t:void 0}var n=Ph(e);if(n!=null)return[n,n]}function Ei(e){return e.map(Ph).filter(yW)}function ere(e,t,n){return!n||typeof t!="number"||ca(t)?[]:n.length?Ei(n.flatMap(r=>{var i=Rn(e,r.dataKey),l,s;if(Array.isArray(i)?[l,s]=i:l=s=i,!(!Tt(l)||!Tt(s)))return[t-l,t+s]})):[]}var Jt=e=>{var t=Zt(e),n=lc(e);return Cf(e,t,n)},Of=oe([Jt],e=>e?.dataKey),tre=oe([GL,q1,Jt],BL),JL=(e,t,n,r)=>{var i={},l=t.reduce((s,u)=>(u.stackId==null||(s[u.stackId]==null&&(s[u.stackId]=[]),s[u.stackId].push(u)),s),i);return Object.fromEntries(Object.entries(l).map(s=>{var[u,f]=s,h=r?[...f].reverse():f,p=h.map(Z1);return[u,{stackedData:AQ(e,p,n),graphicalItems:h}]}))},Bx=oe([tre,GL,Wm,DL],JL),e5=(e,t,n,r)=>{var{dataStartIndex:i,dataEndIndex:l}=t;if(r==null&&n!=="zAxis"){var s=jQ(e,i,l);if(!(s!=null&&s[0]===0&&s[1]===0))return s}},nre=oe([Bn],e=>e.allowDataOverflow),nS=e=>{var t;if(e==null||!("domain"in e))return $x;if(e.domain!=null)return e.domain;if(e.ticks!=null){if(e.type==="number"){var n=Ei(e.ticks);return[Math.min(...n),Math.max(...n)]}if(e.type==="category")return e.ticks.map(String)}return(t=e?.domain)!==null&&t!==void 0?t:$x},t5=oe([Bn],nS),n5=oe([t5,nre],bL),rre=oe([Bx,Eo,Qt,n5],e5,{memoizeOptions:{resultEqualityCheck:Jm}}),rS=e=>e.errorBars,are=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>ZL(n,r)),Mp=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.filter(Boolean);if(i.length!==0){var l=i.flat(),s=Math.min(...l),u=Math.max(...l);return[s,u]}},r5=(e,t,n,r,i)=>{var l,s;if(n.length>0&&e.forEach(u=>{n.forEach(f=>{var h,p,m=(h=r[f.id])===null||h===void 0?void 0:h.filter(A=>ZL(i,A)),b=Rn(u,(p=t.dataKey)!==null&&p!==void 0?p:f.dataKey),x=ere(u,b,m);if(x.length>=2){var S=Math.min(...x),E=Math.max(...x);(l==null||S<l)&&(l=S),(s==null||E>s)&&(s=E)}var C=VT(b);C!=null&&(l=l==null?C[0]:Math.min(l,C[0]),s=s==null?C[1]:Math.max(s,C[1]))})}),t?.dataKey!=null&&e.forEach(u=>{var f=VT(Rn(u,t.dataKey));f!=null&&(l=l==null?f[0]:Math.min(l,f[0]),s=s==null?f[1]:Math.max(s,f[1]))}),Tt(l)&&Tt(s))return[l,s]},ire=oe([tS,Bn,Zne,rS,Qt],r5,{memoizeOptions:{resultEqualityCheck:Jm}});function ore(e){var{value:t}=e;if(_a(t)||t instanceof Date)return t}var lre=(e,t,n)=>{var r=e.map(ore).filter(i=>i!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&bk(r))?zI(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},a5=e=>e.referenceElements.dots,sc=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),sre=oe([a5,Qt,Zm],sc),i5=e=>e.referenceElements.areas,cre=oe([i5,Qt,Zm],sc),o5=e=>e.referenceElements.lines,ure=oe([o5,Qt,Zm],sc),l5=(e,t)=>{var n=Ei(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},fre=oe(sre,Qt,l5),s5=(e,t)=>{var n=Ei(e.flatMap(r=>[t==="xAxis"?r.x1:r.y1,t==="xAxis"?r.x2:r.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},dre=oe([cre,Qt],s5);function hre(e){var t;if(e.x!=null)return Ei([e.x]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.x);return n==null||n.length===0?[]:Ei(n)}function pre(e){var t;if(e.y!=null)return Ei([e.y]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.y);return n==null||n.length===0?[]:Ei(n)}var c5=(e,t)=>{var n=e.flatMap(r=>t==="xAxis"?hre(r):pre(r));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},mre=oe([ure,Qt],c5),vre=oe(fre,mre,dre,(e,t,n)=>Mp(e,n,t)),u5=(e,t,n,r,i,l,s,u)=>{if(n!=null)return n;var f=s==="vertical"&&u==="xAxis"||s==="horizontal"&&u==="yAxis",h=f?Mp(r,l,i):Mp(l,i);return Nne(t,h,e.allowDataOverflow)},gre=oe([Bn,t5,n5,rre,ire,vre,pt,Qt],u5,{memoizeOptions:{resultEqualityCheck:Jm}}),yre=[0,1],f5=(e,t,n,r,i,l,s)=>{if(!((e==null||n==null||n.length===0)&&s===void 0)){var{dataKey:u,type:f}=e,h=Ci(t,l);if(h&&u==null){var p;return zI(0,(p=n?.length)!==null&&p!==void 0?p:0)}return f==="category"?lre(r,e,h):i==="expand"?yre:s}},aS=oe([Bn,pt,tS,tv,Wm,Qt,gre],f5),d5=(e,t,n,r,i)=>{if(e!=null){var{scale:l,type:s}=e;if(l==="auto")return t==="radial"&&i==="radiusAxis"?"band":t==="radial"&&i==="angleAxis"?"linear":s==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?"point":s==="category"?"band":"linear";if(typeof l=="string"){var u="scale".concat(i1(l));return u in xu?u:"point"}}},Nf=oe([Bn,pt,qL,V1,Qt],d5);function bre(e){if(e!=null){if(e in xu)return xu[e]();var t="scale".concat(i1(e));if(t in xu)return xu[t]()}}function iS(e,t,n,r){if(!(n==null||r==null)){if(typeof e.scale=="function")return e.scale.copy().domain(n).range(r);var i=bre(t);if(i!=null){var l=i.domain(n).range(r);return wQ(l),l}}}var h5=(e,t,n)=>{var r=nS(t);if(!(n!=="auto"&&n!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(r)&&(r[0]==="auto"||r[1]==="auto")&&bo(e))return Ine(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&bo(e))return Lne(e,t.tickCount,t.allowDecimals)}},oS=oe([aS,Cf,Nf],h5),p5=(e,t,n,r)=>{if(r!=="angleAxis"&&e?.type==="number"&&bo(t)&&Array.isArray(n)&&n.length>0){var i=t[0],l=n[0],s=t[1],u=n[n.length-1];return[Math.min(i,l),Math.max(s,u)]}return t},xre=oe([Bn,aS,oS,Qt],p5),wre=oe(tv,Bn,(e,t)=>{if(!(!t||t.type!=="number")){var n=1/0,r=Array.from(Ei(e.map(u=>u.value))).sort((u,f)=>u-f);if(r.length<2)return 1/0;var i=r[r.length-1]-r[0];if(i===0)return 1/0;for(var l=0;l<r.length-1;l++){var s=r[l+1]-r[l];n=Math.min(n,s)}return n/i}}),m5=oe(wre,pt,zne,Cn,(e,t,n,r)=>r,(e,t,n,r,i)=>{if(!Tt(e))return 0;var l=t==="vertical"?r.height:r.width;if(i==="gap")return e*l/2;if(i==="no-gap"){var s=yo(n,e*l),u=e*l/2;return u-s-(u-s)/l*s}return 0}),Sre=(e,t)=>{var n=_i(e,t);return n==null||typeof n.padding!="string"?0:m5(e,"xAxis",t,n.padding)},Ere=(e,t)=>{var n=ji(e,t);return n==null||typeof n.padding!="string"?0:m5(e,"yAxis",t,n.padding)},Cre=oe(_i,Sre,(e,t)=>{var n,r;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((n=i.left)!==null&&n!==void 0?n:0)+t,right:((r=i.right)!==null&&r!==void 0?r:0)+t}}),Are=oe(ji,Ere,(e,t)=>{var n,r;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((n=i.top)!==null&&n!==void 0?n:0)+t,bottom:((r=i.bottom)!==null&&r!==void 0?r:0)+t}}),Ore=oe([Cn,Cre,Lm,Im,(e,t,n)=>n],(e,t,n,r,i)=>{var{padding:l}=r;return i?[l.left,n.width-l.right]:[e.left+t.left,e.left+e.width-t.right]}),Nre=oe([Cn,pt,Are,Lm,Im,(e,t,n)=>n],(e,t,n,r,i,l)=>{var{padding:s}=i;return l?[r.height-s.bottom,s.top]:t==="horizontal"?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),_f=(e,t,n,r)=>{var i;switch(t){case"xAxis":return Ore(e,n,r);case"yAxis":return Nre(e,n,r);case"zAxis":return(i=eS(e,n))===null||i===void 0?void 0:i.range;case"angleAxis":return LL(e);case"radiusAxis":return zL(e,n);default:return}},v5=oe([Bn,_f],Xm),cc=oe([Bn,Nf,xre,v5],iS);oe([Af,rS,Qt],are);function g5(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var nv=(e,t)=>t,rv=(e,t,n)=>n,_re=oe(Pm,nv,rv,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(g5)),jre=oe(km,nv,rv,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(g5)),y5=(e,t)=>({width:e.width,height:t.height}),Tre=(e,t)=>{var n=typeof t.width=="number"?t.width:gf;return{width:n,height:e.height}},Mre=oe(Cn,_i,y5),Rre=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},Dre=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},Pre=oe(Oi,Cn,_re,nv,rv,(e,t,n,r,i)=>{var l={},s;return n.forEach(u=>{var f=y5(t,u);s==null&&(s=Rre(t,r,e));var h=r==="top"&&!i||r==="bottom"&&i;l[u.id]=s-Number(h)*f.height,s+=(h?-1:1)*f.height}),l}),kre=oe(Ai,Cn,jre,nv,rv,(e,t,n,r,i)=>{var l={},s;return n.forEach(u=>{var f=Tre(t,u);s==null&&(s=Dre(t,r,e));var h=r==="left"&&!i||r==="right"&&i;l[u.id]=s-Number(h)*f.width,s+=(h?-1:1)*f.width}),l}),Ire=(e,t)=>{var n=_i(e,t);if(n!=null)return Pre(e,n.orientation,n.mirror)},Lre=oe([Cn,_i,Ire,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),zre=(e,t)=>{var n=ji(e,t);if(n!=null)return kre(e,n.orientation,n.mirror)},$re=oe([Cn,ji,zre,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),Bre=oe(Cn,ji,(e,t)=>{var n=typeof t.width=="number"?t.width:gf;return{width:n,height:e.height}}),b5=(e,t,n,r)=>{if(n!=null){var{allowDuplicatedCategory:i,type:l,dataKey:s}=n,u=Ci(e,r),f=t.map(h=>h.value);if(s&&u&&l==="category"&&i&&bk(f))return f}},lS=oe([pt,tv,Bn,Qt],b5),x5=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var{type:i,scale:l}=n,s=Ci(e,r);if(s&&(i==="number"||l!=="auto"))return t.map(u=>u.value)}},sS=oe([pt,tv,Cf,Qt],x5),GT=oe([pt,Xne,Nf,cc,lS,sS,_f,oS,Qt],(e,t,n,r,i,l,s,u,f)=>{if(t!=null){var h=Ci(e,f);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:f,categoricalDomain:l,duplicateDomain:i,isCategorical:h,niceTicks:u,range:s,realScaleType:n,scale:r}}}),Ure=(e,t,n,r,i,l,s,u,f)=>{if(!(t==null||r==null)){var h=Ci(e,f),{type:p,ticks:m,tickCount:b}=t,x=n==="scaleBand"&&typeof r.bandwidth=="function"?r.bandwidth()/2:2,S=p==="category"&&r.bandwidth?r.bandwidth()/x:0;S=f==="angleAxis"&&l!=null&&l.length>=2?Lr(l[0]-l[1])*2*S:S;var E=m||i;if(E){var C=E.map((A,_)=>{var N=s?s.indexOf(A):A;return{index:_,coordinate:r(N)+S,value:A,offset:S}});return C.filter(A=>Tt(A.coordinate))}return h&&u?u.map((A,_)=>({coordinate:r(A)+S,value:A,index:_,offset:S})).filter(A=>Tt(A.coordinate)):r.ticks?r.ticks(b).map(A=>({coordinate:r(A)+S,value:A,offset:S})):r.domain().map((A,_)=>({coordinate:r(A)+S,value:s?s[A]:A,index:_,offset:S}))}},w5=oe([pt,Cf,Nf,cc,oS,_f,lS,sS,Qt],Ure),Hre=(e,t,n,r,i,l,s)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var u=Ci(e,s),{tickCount:f}=t,h=0;return h=s==="angleAxis"&&r?.length>=2?Lr(r[0]-r[1])*2*h:h,u&&l?l.map((p,m)=>({coordinate:n(p)+h,value:p,index:m,offset:h})):n.ticks?n.ticks(f).map(p=>({coordinate:n(p)+h,value:p,offset:h})):n.domain().map((p,m)=>({coordinate:n(p)+h,value:i?i[p]:p,index:m,offset:h}))}},S5=oe([pt,Cf,cc,_f,lS,sS,Qt],Hre),E5=oe(Bn,cc,(e,t)=>{if(!(e==null||t==null))return Tp(Tp({},e),{},{scale:t})}),qre=oe([Bn,Nf,aS,v5],iS);oe((e,t,n)=>eS(e,n),qre,(e,t)=>{if(!(e==null||t==null))return Tp(Tp({},e),{},{scale:t})});var Fre=oe([pt,Pm,km],(e,t,n)=>{switch(e){case"horizontal":return t.some(r=>r.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(r=>r.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),C5=e=>e.options.defaultTooltipEventType,A5=e=>e.options.validateTooltipEventTypes;function O5(e,t,n){if(e==null)return t;var r=e?"axis":"item";return n==null?t:n.includes(r)?r:t}function cS(e,t){var n=C5(e),r=A5(e);return O5(t,n,r)}function Kre(e){return je(t=>cS(t,e))}var N5=(e,t)=>{var n,r=Number(t);if(!(ca(r)||t==null))return r>=0?e==null||(n=e[r])===null||n===void 0?void 0:n.value:void 0},Vre=e=>e.tooltip.settings,so={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},Gre={itemInteraction:{click:so,hover:so},axisInteraction:{click:so,hover:so},keyboardInteraction:so,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}},_5=tr({name:"tooltip",initialState:Gre,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:St()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:n,next:r}=t.payload,i=aa(e).tooltipItemPayloads.indexOf(n);i>-1&&(e.tooltipItemPayloads[i]=r)},prepare:St()},removeTooltipEntrySettings:{reducer(e,t){var n=aa(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:St()},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:Yre,replaceTooltipEntrySettings:Wre,removeTooltipEntrySettings:Xre,setTooltipSettingsState:Qre,setActiveMouseOverItemIndex:Zre,mouseLeaveItem:yhe,mouseLeaveChart:j5,setActiveClickItemIndex:bhe,setMouseOverAxisIndex:T5,setMouseClickAxisIndex:Jre,setSyncInteraction:Ux,setKeyboardInteraction:Hx}=_5.actions,eae=_5.reducer;function YT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YT(Object(n),!0).forEach(function(r){tae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tae(e,t,n){return(t=nae(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nae(e){var t=rae(e,"string");return typeof t=="symbol"?t:t+""}function rae(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function aae(e,t,n){return t==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function iae(e){return e.index!=null}var M5=(e,t,n,r)=>{if(t==null)return so;var i=aae(e,t,n);if(i==null)return so;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var l=e.settings.active===!0;if(iae(i)){if(l)return gh(gh({},i),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return gh(gh({},so),{},{coordinate:i.coordinate})};function oae(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 n=Number(e);return Number.isFinite(n)?n:void 0}function lae(e,t){var n=oae(e),r=t[0],i=t[1];if(n===void 0)return!1;var l=Math.min(r,i),s=Math.max(r,i);return n>=l&&n<=s}function sae(e,t,n){if(n==null||t==null)return!0;var r=Rn(e,t);return r==null||!bo(n)?!0:lae(r,n)}var uS=(e,t,n,r)=>{var i=e?.index;if(i==null)return null;var l=Number(i);if(!Tt(l))return i;var s=0,u=1/0;t.length>0&&(u=t.length-1);var f=Math.max(s,Math.min(l,u)),h=t[f];return h==null||sae(h,n,r)?String(f):null},R5=(e,t,n,r,i,l,s,u)=>{if(!(l==null||u==null)){var f=s[0],h=f==null?void 0:u(f.positions,l);if(h!=null)return h;var p=i?.[Number(l)];if(p)switch(n){case"horizontal":return{x:p.coordinate,y:(r.top+t)/2};default:return{x:(r.left+e)/2,y:p.coordinate}}}},D5=(e,t,n,r)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;return n==="hover"?i=e.itemInteraction.hover.dataKey:i=e.itemInteraction.click.dataKey,i==null&&r!=null?[e.tooltipItemPayloads[0]]:e.tooltipItemPayloads.filter(l=>{var s;return((s=l.settings)===null||s===void 0?void 0:s.dataKey)===i})},jf=e=>e.options.tooltipPayloadSearcher,uc=e=>e.tooltip;function WT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function XT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WT(Object(n),!0).forEach(function(r){cae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cae(e,t,n){return(t=uae(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uae(e){var t=fae(e,"string");return typeof t=="symbol"?t:t+""}function fae(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dae(e,t){return e??t}var P5=(e,t,n,r,i,l,s)=>{if(!(t==null||l==null)){var{chartData:u,computedData:f,dataStartIndex:h,dataEndIndex:p}=n,m=[];return e.reduce((b,x)=>{var S,{dataDefinedOnItem:E,settings:C}=x,A=dae(E,u),_=Array.isArray(A)?uI(A,h,p):A,N=(S=C?.dataKey)!==null&&S!==void 0?S:r,j=C?.nameKey,T;if(r&&Array.isArray(_)&&!Array.isArray(_[0])&&s==="axis"?T=xk(_,r,i):T=l(_,t,f,j),Array.isArray(T))T.forEach(R=>{var D=XT(XT({},C),{},{name:R.name,unit:R.unit,color:void 0,fill:void 0});b.push(bj({tooltipEntrySettings:D,dataKey:R.dataKey,payload:R.payload,value:Rn(R.payload,R.dataKey),name:R.name}))});else{var k;b.push(bj({tooltipEntrySettings:C,dataKey:N,payload:T,value:Rn(T,N),name:(k=Rn(T,j))!==null&&k!==void 0?k:C?.name}))}return b},m)}},fS=oe([Jt,pt,qL,V1,Zt],d5),hae=oe([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),pae=oe([Zt,lc],FL),Tf=oe([hae,Jt,pae],VL,{memoizeOptions:{resultEqualityCheck:ev}}),mae=oe([Tf],e=>e.filter(J1)),vae=oe([Tf],WL,{memoizeOptions:{resultEqualityCheck:ev}}),fc=oe([vae,Eo],XL),gae=oe([mae,Eo,Jt],BL),dS=oe([fc,Jt,Tf],QL),k5=oe([Jt],nS),yae=oe([Jt],e=>e.allowDataOverflow),I5=oe([k5,yae],bL),bae=oe([Tf],e=>e.filter(J1)),xae=oe([gae,bae,Wm,DL],JL),wae=oe([xae,Eo,Zt,I5],e5),Sae=oe([Tf],YL),Eae=oe([fc,Jt,Sae,rS,Zt],r5,{memoizeOptions:{resultEqualityCheck:Jm}}),Cae=oe([a5,Zt,lc],sc),Aae=oe([Cae,Zt],l5),Oae=oe([i5,Zt,lc],sc),Nae=oe([Oae,Zt],s5),_ae=oe([o5,Zt,lc],sc),jae=oe([_ae,Zt],c5),Tae=oe([Aae,jae,Nae],Mp),Mae=oe([Jt,k5,I5,wae,Eae,Tae,pt,Zt],u5),Mf=oe([Jt,pt,fc,dS,Wm,Zt,Mae],f5),Rae=oe([Mf,Jt,fS],h5),Dae=oe([Jt,Mf,Rae,Zt],p5),L5=e=>{var t=Zt(e),n=lc(e),r=!1;return _f(e,t,n,r)},z5=oe([Jt,L5],Xm),$5=oe([Jt,fS,Dae,z5],iS),Pae=oe([pt,dS,Jt,Zt],b5),kae=oe([pt,dS,Jt,Zt],x5),Iae=(e,t,n,r,i,l,s,u)=>{if(t){var{type:f}=t,h=Ci(e,u);if(r){var p=n==="scaleBand"&&r.bandwidth?r.bandwidth()/2:2,m=f==="category"&&r.bandwidth?r.bandwidth()/p:0;return m=u==="angleAxis"&&i!=null&&i?.length>=2?Lr(i[0]-i[1])*2*m:m,h&&s?s.map((b,x)=>({coordinate:r(b)+m,value:b,index:x,offset:m})):r.domain().map((b,x)=>({coordinate:r(b)+m,value:l?l[b]:b,index:x,offset:m}))}}},Ti=oe([pt,Jt,fS,$5,L5,Pae,kae,Zt],Iae),hS=oe([C5,A5,Vre],(e,t,n)=>O5(n.shared,e,t)),B5=e=>e.tooltip.settings.trigger,pS=e=>e.tooltip.settings.defaultIndex,Rf=oe([uc,hS,B5,pS],M5),Xu=oe([Rf,fc,Of,Mf],uS),U5=oe([Ti,Xu],N5),Lae=oe([Rf],e=>{if(e)return e.dataKey});oe([Rf],e=>{if(e)return e.graphicalItemId});var H5=oe([uc,hS,B5,pS],D5),zae=oe([Ai,Oi,pt,Cn,Ti,pS,H5,jf],R5),$ae=oe([Rf,zae],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),Bae=oe([Rf],e=>e.active),Uae=oe([H5,Xu,Eo,Of,U5,jf,hS],P5),Hae=oe([Uae],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});function QT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ZT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QT(Object(n),!0).forEach(function(r){qae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qae(e,t,n){return(t=Fae(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fae(e){var t=Kae(e,"string");return typeof t=="symbol"?t:t+""}function Kae(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Vae=()=>je(Jt),Gae=()=>{var e=Vae(),t=je(Ti),n=je($5);return up(!e||!n?void 0:ZT(ZT({},e),{},{scale:n}),t)};function JT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ms(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JT(Object(n),!0).forEach(function(r){Yae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yae(e,t,n){return(t=Wae(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wae(e){var t=Xae(e,"string");return typeof t=="symbol"?t:t+""}function Xae(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Qae=(e,t,n,r)=>{var i=t.find(l=>l&&l.index===n);if(i){if(e==="horizontal")return{x:i.coordinate,y:r.chartY};if(e==="vertical")return{x:r.chartX,y:i.coordinate}}return{x:0,y:0}},Zae=(e,t,n,r)=>{var i=t.find(h=>h&&h.index===n);if(i){if(e==="centric"){var l=i.coordinate,{radius:s}=r;return ms(ms(ms({},r),wn(r.cx,r.cy,s,l)),{},{angle:l,radius:s})}var u=i.coordinate,{angle:f}=r;return ms(ms(ms({},r),wn(r.cx,r.cy,u,f)),{},{angle:f,radius:u})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function Jae(e,t){var{chartX:n,chartY:r}=e;return n>=t.left&&n<=t.left+t.width&&r>=t.top&&r<=t.top+t.height}var q5=(e,t,n,r,i)=>{var l,s=-1,u=(l=t?.length)!==null&&l!==void 0?l:0;if(u<=1||e==null)return 0;if(r==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var f=0;f<u;f++){var h=f>0?n[f-1].coordinate:n[u-1].coordinate,p=n[f].coordinate,m=f>=u-1?n[0].coordinate:n[f+1].coordinate,b=void 0;if(Lr(p-h)!==Lr(m-p)){var x=[];if(Lr(m-p)===Lr(i[1]-i[0])){b=m;var S=p+i[1]-i[0];x[0]=Math.min(S,(S+h)/2),x[1]=Math.max(S,(S+h)/2)}else{b=h;var E=m+i[1]-i[0];x[0]=Math.min(p,(E+p)/2),x[1]=Math.max(p,(E+p)/2)}var C=[Math.min(p,(b+p)/2),Math.max(p,(b+p)/2)];if(e>C[0]&&e<=C[1]||e>=x[0]&&e<=x[1]){({index:s}=n[f]);break}}else{var A=Math.min(h,m),_=Math.max(h,m);if(e>(A+p)/2&&e<=(_+p)/2){({index:s}=n[f]);break}}}else if(t){for(var N=0;N<u;N++)if(N===0&&e<=(t[N].coordinate+t[N+1].coordinate)/2||N>0&&N<u-1&&e>(t[N].coordinate+t[N-1].coordinate)/2&&e<=(t[N].coordinate+t[N+1].coordinate)/2||N===u-1&&e>(t[N].coordinate+t[N-1].coordinate)/2){({index:s}=t[N]);break}}return s},F5=()=>je(V1),mS=(e,t)=>t,K5=(e,t,n)=>n,vS=(e,t,n,r)=>r,eie=oe(Ti,e=>Am(e,t=>t.coordinate)),gS=oe([uc,mS,K5,vS],M5),yS=oe([gS,fc,Of,Mf],uS),tie=(e,t,n)=>{if(t!=null){var r=uc(e);return t==="axis"?n==="hover"?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n==="hover"?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},V5=oe([uc,mS,K5,vS],D5),Rp=oe([Ai,Oi,pt,Cn,Ti,vS,V5,jf],R5),nie=oe([gS,Rp],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),G5=oe([Ti,yS],N5),rie=oe([V5,yS,Eo,Of,G5,jf,mS],P5),aie=oe([gS,yS],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),iie=(e,t,n,r,i,l,s)=>{if(!(!e||!n||!r||!i)&&Jae(e,s)){var u=TQ(e,t),f=q5(u,l,i,n,r),h=Qae(t,i,f,e);return{activeIndex:String(f),activeCoordinate:h}}},oie=(e,t,n,r,i,l,s)=>{if(!(!e||!r||!i||!l||!n)){var u=UJ(e,n);if(u){var f=MQ(u,t),h=q5(f,s,l,r,i),p=Zae(t,l,h,u);return{activeIndex:String(h),activeCoordinate:p}}}},lie=(e,t,n,r,i,l,s,u)=>{if(!(!e||!t||!r||!i||!l))return t==="horizontal"||t==="vertical"?iie(e,t,r,i,l,s,u):oie(e,t,n,r,i,l,s)},sie=oe(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(t!=null){var r=e[t];if(r!=null)return n?r.panoramaElementId:r.elementId}}),cie=oe(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(r=>parseInt(r,10)).concat(Object.values(Ln)),n=Array.from(new Set(t));return n.sort((r,i)=>r-i)},{memoizeOptions:{resultEqualityCheck:Kne}});function e2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function t2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?e2(Object(n),!0).forEach(function(r){uie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):e2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uie(e,t,n){return(t=fie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fie(e){var t=die(e,"string");return typeof t=="symbol"?t:t+""}function die(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hie={},pie={zIndexMap:Object.values(Ln).reduce((e,t)=>t2(t2({},e),{},{[t]:{elementId:void 0,panoramaElementId:void 0,consumers:0}}),hie)},mie=new Set(Object.values(Ln));function vie(e){return mie.has(e)}var Y5=tr({name:"zIndex",initialState:pie,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,elementId:void 0,panoramaElementId:void 0}},prepare:St()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(e.zIndexMap[n].consumers-=1,e.zIndexMap[n].consumers<=0&&!vie(n)&&delete e.zIndexMap[n])},prepare:St()},registerZIndexPortalId:{reducer:(e,t)=>{var{zIndex:n,elementId:r,isPanorama:i}=t.payload;e.zIndexMap[n]?i?e.zIndexMap[n].panoramaElementId=r:e.zIndexMap[n].elementId=r:e.zIndexMap[n]={consumers:0,elementId:i?void 0:r,panoramaElementId:i?r:void 0}},prepare:St()},unregisterZIndexPortalId:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElementId=void 0:e.zIndexMap[n].elementId=void 0)},prepare:St()}}}),{registerZIndexPortal:gie,unregisterZIndexPortal:yie,registerZIndexPortalId:bie,unregisterZIndexPortalId:xie}=Y5.actions,wie=Y5.reducer;function Mi(e){var{zIndex:t,children:n}=e,r=fZ(),i=r&&t!==void 0&&t!==0,l=nr(),s=un();v.useLayoutEffect(()=>i?(s(gie({zIndex:t})),()=>{s(yie({zIndex:t}))}):hf,[s,t,i]);var u=je(h=>sie(h,t,l));if(!i)return n;if(!u)return null;var f=document.getElementById(u);return f?yl.createPortal(n,f):null}function qx(){return qx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qx.apply(null,arguments)}function n2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?n2(Object(n),!0).forEach(function(r){Sie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):n2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sie(e,t,n){return(t=Eie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Eie(e){var t=Cie(e,"string");return typeof t=="symbol"?t:t+""}function Cie(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Aie(e){var{cursor:t,cursorComp:n,cursorProps:r}=e;return v.isValidElement(t)?v.cloneElement(t,r):v.createElement(n,r)}function Oie(e){var t,{coordinate:n,payload:r,index:i,offset:l,tooltipAxisBandSize:s,layout:u,cursor:f,tooltipEventType:h,chartName:p}=e,m=n,b=r,x=i;if(!f||!m||p!=="ScatterChart"&&h!=="axis")return null;var S,E,C;if(p==="ScatterChart")S=m,E=JZ,C=Ln.cursorLine;else if(p==="BarChart")S=eJ(u,m,l,s),E=MJ,C=Ln.cursorRectangle;else if(u==="radial"&&wk(m)){var{cx:A,cy:_,radius:N,startAngle:j,endAngle:T}=II(m);S={cx:A,cy:_,startAngle:j,endAngle:T,innerRadius:N,outerRadius:N},E=KJ,C=Ln.cursorLine}else S={points:VJ(u,m,l)},E=Dh,C=Ln.cursorLine;var k=typeof f=="object"&&"className"in f?f.className:void 0,R=yh(yh(yh(yh({stroke:"#ccc",pointerEvents:"none"},l),S),wm(f)),{},{payload:b,payloadIndex:x,className:ht("recharts-tooltip-cursor",k)});return v.createElement(Mi,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:C},v.createElement(Aie,{cursor:f,cursorComp:E,cursorProps:R}))}function Nie(e){var t=Gae(),n=xI(),r=yf(),i=F5();return t==null||n==null||r==null||i==null?null:v.createElement(Oie,qx({},e,{offset:n,layout:r,tooltipAxisBandSize:t,chartName:i}))}var W5=v.createContext(null),_ie=()=>v.useContext(W5),fb={exports:{}},r2;function jie(){return r2||(r2=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(f,h,p){this.fn=f,this.context=h,this.once=p||!1}function l(f,h,p,m,b){if(typeof p!="function")throw new TypeError("The listener must be a function");var x=new i(p,m||f,b),S=n?n+h:h;return f._events[S]?f._events[S].fn?f._events[S]=[f._events[S],x]:f._events[S].push(x):(f._events[S]=x,f._eventsCount++),f}function s(f,h){--f._eventsCount===0?f._events=new r:delete f._events[h]}function u(){this._events=new r,this._eventsCount=0}u.prototype.eventNames=function(){var h=[],p,m;if(this._eventsCount===0)return h;for(m in p=this._events)t.call(p,m)&&h.push(n?m.slice(1):m);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(p)):h},u.prototype.listeners=function(h){var p=n?n+h:h,m=this._events[p];if(!m)return[];if(m.fn)return[m.fn];for(var b=0,x=m.length,S=new Array(x);b<x;b++)S[b]=m[b].fn;return S},u.prototype.listenerCount=function(h){var p=n?n+h:h,m=this._events[p];return m?m.fn?1:m.length:0},u.prototype.emit=function(h,p,m,b,x,S){var E=n?n+h:h;if(!this._events[E])return!1;var C=this._events[E],A=arguments.length,_,N;if(C.fn){switch(C.once&&this.removeListener(h,C.fn,void 0,!0),A){case 1:return C.fn.call(C.context),!0;case 2:return C.fn.call(C.context,p),!0;case 3:return C.fn.call(C.context,p,m),!0;case 4:return C.fn.call(C.context,p,m,b),!0;case 5:return C.fn.call(C.context,p,m,b,x),!0;case 6:return C.fn.call(C.context,p,m,b,x,S),!0}for(N=1,_=new Array(A-1);N<A;N++)_[N-1]=arguments[N];C.fn.apply(C.context,_)}else{var j=C.length,T;for(N=0;N<j;N++)switch(C[N].once&&this.removeListener(h,C[N].fn,void 0,!0),A){case 1:C[N].fn.call(C[N].context);break;case 2:C[N].fn.call(C[N].context,p);break;case 3:C[N].fn.call(C[N].context,p,m);break;case 4:C[N].fn.call(C[N].context,p,m,b);break;default:if(!_)for(T=1,_=new Array(A-1);T<A;T++)_[T-1]=arguments[T];C[N].fn.apply(C[N].context,_)}}return!0},u.prototype.on=function(h,p,m){return l(this,h,p,m,!1)},u.prototype.once=function(h,p,m){return l(this,h,p,m,!0)},u.prototype.removeListener=function(h,p,m,b){var x=n?n+h:h;if(!this._events[x])return this;if(!p)return s(this,x),this;var S=this._events[x];if(S.fn)S.fn===p&&(!b||S.once)&&(!m||S.context===m)&&s(this,x);else{for(var E=0,C=[],A=S.length;E<A;E++)(S[E].fn!==p||b&&!S[E].once||m&&S[E].context!==m)&&C.push(S[E]);C.length?this._events[x]=C.length===1?C[0]:C:s(this,x)}return this},u.prototype.removeAllListeners=function(h){var p;return h?(p=n?n+h:h,this._events[p]&&s(this,p)):(this._events=new r,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=n,u.EventEmitter=u,e.exports=u})(fb)),fb.exports}var Tie=jie();const Mie=Ma(Tie);var Qu=new Mie,Fx="recharts.syncEvent.tooltip",a2="recharts.syncEvent.brush";function Rie(e,t){if(t){var n=Number.parseInt(t,10);if(!ca(n))return e?.[n]}}var Die={chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},X5=tr({name:"options",initialState:Die,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),Pie=X5.reducer,{createEventEmitter:kie}=X5.actions;function Iie(e){return e.tooltip.syncInteraction}var Lie={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},Q5=tr({name:"chartData",initialState:Lie,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:n,endIndex:r}=t.payload;n!=null&&(e.dataStartIndex=n),r!=null&&(e.dataEndIndex=r)}}}),{setChartData:i2,setDataStartEndIndexes:zie,setComputedData:xhe}=Q5.actions,$ie=Q5.reducer,Bie=["x","y"];function o2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function vs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?o2(Object(n),!0).forEach(function(r){Uie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Uie(e,t,n){return(t=Hie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hie(e){var t=qie(e,"string");return typeof t=="symbol"?t:t+""}function qie(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Fie(e,t){if(e==null)return{};var n,r,i=Kie(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Kie(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Vie(){var e=je(G1),t=je(Y1),n=un(),r=je(PL),i=je(Ti),l=yf(),s=zm(),u=je(f=>f.rootProps.className);v.useEffect(()=>{if(e==null)return hf;var f=(h,p,m)=>{if(t!==m&&e===h){if(r==="index"){var b;if(s&&p!==null&&p!==void 0&&(b=p.payload)!==null&&b!==void 0&&b.coordinate&&p.payload.sourceViewBox){var x=p.payload.coordinate,{x:S,y:E}=x,C=Fie(x,Bie),{x:A,y:_,width:N,height:j}=p.payload.sourceViewBox,T=vs(vs({},C),{},{x:s.x+(N?(S-A)/N:0)*s.width,y:s.y+(j?(E-_)/j:0)*s.height});n(vs(vs({},p),{},{payload:vs(vs({},p.payload),{},{coordinate:T})}))}else n(p);return}if(i!=null){var k;if(typeof r=="function"){var R={activeTooltipIndex:p.payload.index==null?void 0:Number(p.payload.index),isTooltipActive:p.payload.active,activeIndex:p.payload.index==null?void 0:Number(p.payload.index),activeLabel:p.payload.label,activeDataKey:p.payload.dataKey,activeCoordinate:p.payload.coordinate},D=r(i,R);k=i[D]}else r==="value"&&(k=i.find(I=>String(I.value)===p.payload.label));var{coordinate:B}=p.payload;if(k==null||p.payload.active===!1||B==null||s==null){n(Ux({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}var{x:Q,y:F}=B,G=Math.min(Q,s.x+s.width),te=Math.min(F,s.y+s.height),ce={x:l==="horizontal"?k.coordinate:G,y:l==="horizontal"?te:k.coordinate},he=Ux({active:p.payload.active,coordinate:ce,dataKey:p.payload.dataKey,index:String(k.index),label:p.payload.label,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:p.payload.graphicalItemId});n(he)}}};return Qu.on(Fx,f),()=>{Qu.off(Fx,f)}},[u,n,t,e,r,i,l,s])}function Gie(){var e=je(G1),t=je(Y1),n=un();v.useEffect(()=>{if(e==null)return hf;var r=(i,l,s)=>{t!==s&&e===i&&n(zie(l))};return Qu.on(a2,r),()=>{Qu.off(a2,r)}},[n,t,e])}function Yie(){var e=un();v.useEffect(()=>{e(kie())},[e]),Vie(),Gie()}function Wie(e,t,n,r,i,l){var s=je(x=>tie(x,e,t)),u=je(Y1),f=je(G1),h=je(PL),p=je(Iie),m=p?.active,b=zm();v.useEffect(()=>{if(!m&&f!=null&&u!=null){var x=Ux({active:l,coordinate:n,dataKey:s,index:i,label:typeof r=="number"?String(r):r,sourceViewBox:b,graphicalItemId:void 0});Qu.emit(Fx,f,x,u)}},[m,n,s,i,r,u,f,h,l,b])}function l2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function s2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?l2(Object(n),!0).forEach(function(r){Xie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xie(e,t,n){return(t=Qie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qie(e){var t=Zie(e,"string");return typeof t=="symbol"?t:t+""}function Zie(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jie(e){return e.dataKey}function eoe(e,t){return v.isValidElement(e)?v.cloneElement(e,t):typeof e=="function"?v.createElement(e,t):v.createElement(RZ,t)}var c2=[],toe={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 noe(e){var t,n,r=xr(e,toe),{active:i,allowEscapeViewBox:l,animationDuration:s,animationEasing:u,content:f,filterNull:h,isAnimationActive:p,offset:m,payloadUniqBy:b,position:x,reverseDirection:S,useTranslate3d:E,wrapperStyle:C,cursor:A,shared:_,trigger:N,defaultIndex:j,portal:T,axisId:k}=r,R=un(),D=typeof j=="number"?String(j):j;v.useEffect(()=>{R(Qre({shared:_,trigger:N,axisId:k,active:i,defaultIndex:D}))},[R,_,N,k,i,D]);var B=zm(),Q=TI(),F=Kre(_),{activeIndex:G,isActive:te}=(t=je(Y=>aie(Y,F,N,D)))!==null&&t!==void 0?t:{},ce=je(Y=>rie(Y,F,N,D)),he=je(Y=>G5(Y,F,N,D)),I=je(Y=>nie(Y,F,N,D)),q=ce,H=_ie(),X=(n=i??te)!==null&&n!==void 0?n:!1,[ge,L]=vX([q,X]),z=F==="axis"?he:void 0;Wie(F,N,I,z,G,X);var P=T??H;if(P==null||B==null||F==null)return null;var W=q??c2;X||(W=c2),h&&W.length&&(W=FW(W.filter(Y=>Y.value!=null&&(Y.hide!==!0||r.includeHidden)),b,Jie));var ne=W.length>0,se=v.createElement($Z,{allowEscapeViewBox:l,animationDuration:s,animationEasing:u,isAnimationActive:p,active:X,coordinate:I,hasPayload:ne,offset:m,position:x,reverseDirection:S,useTranslate3d:E,viewBox:B,wrapperStyle:C,lastBoundingBox:ge,innerRef:L,hasPortalFromProps:!!T},eoe(f,s2(s2({},r),{},{payload:W,label:z,active:X,activeIndex:G,coordinate:I,accessibilityLayer:Q})));return v.createElement(v.Fragment,null,yl.createPortal(se,P),X&&v.createElement(Nie,{cursor:A,tooltipEventType:F,coordinate:I,payload:W,index:G}))}function roe(e,t,n){return(t=aoe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aoe(e){var t=ioe(e,"string");return typeof t=="symbol"?t:t+""}function ioe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class ooe{constructor(t){roe(this,"cache",new Map),this.maxSize=t}get(t){var n=this.cache.get(t);return n!==void 0&&(this.cache.delete(t),this.cache.set(t,n)),n}set(t,n){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var r=this.cache.keys().next().value;r!=null&&this.cache.delete(r)}this.cache.set(t,n)}clear(){this.cache.clear()}size(){return this.cache.size}}function u2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function loe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?u2(Object(n),!0).forEach(function(r){soe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function soe(e,t,n){return(t=coe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function coe(e){var t=uoe(e,"string");return typeof t=="symbol"?t:t+""}function uoe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var foe={cacheSize:2e3,enableCache:!0},Z5=loe({},foe),f2=new ooe(Z5.cacheSize),doe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},d2="recharts_measurement_span";function hoe(e,t){var n=t.fontSize||"",r=t.fontFamily||"",i=t.fontWeight||"",l=t.fontStyle||"",s=t.letterSpacing||"",u=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(i,"|").concat(l,"|").concat(s,"|").concat(u)}var h2=(e,t)=>{try{var n=document.getElementById(d2);n||(n=document.createElement("span"),n.setAttribute("id",d2),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,doe,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch{return{width:0,height:0}}},Au=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||rc.isSsr)return{width:0,height:0};if(!Z5.enableCache)return h2(t,n);var r=hoe(t,n),i=f2.get(r);if(i)return i;var l=h2(t,n);return f2.set(r,l),l},p2=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,m2=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,poe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,moe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,J5={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},voe=Object.keys(J5),Ss="NaN";function goe(e,t){return e*J5[t]}class Xn{static parse(t){var n,[,r,i]=(n=moe.exec(t))!==null&&n!==void 0?n:[];return new Xn(parseFloat(r),i??"")}constructor(t,n){this.num=t,this.unit=n,this.num=t,this.unit=n,ca(t)&&(this.unit=""),n!==""&&!poe.test(n)&&(this.num=NaN,this.unit=""),voe.includes(n)&&(this.num=goe(t,n),this.unit="px")}add(t){return this.unit!==t.unit?new Xn(NaN,""):new Xn(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new Xn(NaN,""):new Xn(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Xn(NaN,""):new Xn(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Xn(NaN,""):new Xn(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return ca(this.num)}}function e3(e){if(e.includes(Ss))return Ss;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,i,l]=(n=p2.exec(t))!==null&&n!==void 0?n:[],s=Xn.parse(r??""),u=Xn.parse(l??""),f=i==="*"?s.multiply(u):s.divide(u);if(f.isNaN())return Ss;t=t.replace(p2,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var h,[,p,m,b]=(h=m2.exec(t))!==null&&h!==void 0?h:[],x=Xn.parse(p??""),S=Xn.parse(b??""),E=m==="+"?x.add(S):x.subtract(S);if(E.isNaN())return Ss;t=t.replace(m2,E.toString())}return t}var v2=/\(([^()]*)\)/;function yoe(e){for(var t=e,n;(n=v2.exec(t))!=null;){var[,r]=n;t=t.replace(v2,e3(r))}return t}function boe(e){var t=e.replace(/\s+/g,"");return t=yoe(t),t=e3(t),t}function xoe(e){try{return boe(e)}catch{return Ss}}function db(e){var t=xoe(e.slice(5,-1));return t===Ss?"":t}var woe=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],Soe=["dx","dy","angle","className","breakAll"];function Kx(){return Kx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kx.apply(null,arguments)}function g2(e,t){if(e==null)return{};var n,r,i=Eoe(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Eoe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var t3=/[ \f\n\r\t\v\u2028\u2029]+/,n3=e=>{var{children:t,breakAll:n,style:r}=e;try{var i=[];En(t)||(n?i=t.toString().split(""):i=t.toString().split(t3));var l=i.map(u=>({word:u,width:Au(u,r).width})),s=n?0:Au(" ",r).width;return{wordsWithComputedWidth:l,spaceWidth:s}}catch{return null}};function Coe(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}var r3=(e,t,n,r)=>e.reduce((i,l)=>{var{word:s,width:u}=l,f=i[i.length-1];if(f&&u!=null&&(t==null||r||f.width+u+n<Number(t)))f.words.push(s),f.width+=u+n;else{var h={words:[s],width:u};i.push(h)}return i},[]),a3=e=>e.reduce((t,n)=>t.width>n.width?t:n),Aoe="…",y2=(e,t,n,r,i,l,s,u)=>{var f=e.slice(0,t),h=n3({breakAll:n,style:r,children:f+Aoe});if(!h)return[!1,[]];var p=r3(h.wordsWithComputedWidth,l,s,u),m=p.length>i||a3(p).width>Number(l);return[m,p]},Ooe=(e,t,n,r,i)=>{var{maxLines:l,children:s,style:u,breakAll:f}=e,h=Ne(l),p=String(s),m=r3(t,r,n,i);if(!h||i)return m;var b=m.length>l||a3(m).width>Number(r);if(!b)return m;for(var x=0,S=p.length-1,E=0,C;x<=S&&E<=p.length-1;){var A=Math.floor((x+S)/2),_=A-1,[N,j]=y2(p,_,f,u,l,r,n,i),[T]=y2(p,A,f,u,l,r,n,i);if(!N&&!T&&(x=A+1),N&&T&&(S=A-1),!N&&T){C=j;break}E++}return C||m},b2=e=>{var t=En(e)?[]:e.toString().split(t3);return[{words:t,width:void 0}]},Noe=e=>{var{width:t,scaleToFit:n,children:r,style:i,breakAll:l,maxLines:s}=e;if((t||n)&&!rc.isSsr){var u,f,h=n3({breakAll:l,children:r,style:i});if(h){var{wordsWithComputedWidth:p,spaceWidth:m}=h;u=p,f=m}else return b2(r);return Ooe({breakAll:l,children:r,maxLines:s,style:i},u,f,t,!!n)}return b2(r)},i3="#808080",_oe={angle:0,breakAll:!1,capHeight:"0.71em",fill:i3,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},bS=v.forwardRef((e,t)=>{var n=xr(e,_oe),{x:r,y:i,lineHeight:l,capHeight:s,fill:u,scaleToFit:f,textAnchor:h,verticalAnchor:p}=n,m=g2(n,woe),b=v.useMemo(()=>Noe({breakAll:m.breakAll,children:m.children,maxLines:m.maxLines,scaleToFit:f,style:m.style,width:m.width}),[m.breakAll,m.children,m.maxLines,f,m.style,m.width]),{dx:x,dy:S,angle:E,className:C,breakAll:A}=m,_=g2(m,Soe);if(!_a(r)||!_a(i)||b.length===0)return null;var N=Number(r)+(Ne(x)?x:0),j=Number(i)+(Ne(S)?S:0);if(!Tt(N)||!Tt(j))return null;var T;switch(p){case"start":T=db("calc(".concat(s,")"));break;case"middle":T=db("calc(".concat((b.length-1)/2," * -").concat(l," + (").concat(s," / 2))"));break;default:T=db("calc(".concat(b.length-1," * -").concat(l,")"));break}var k=[];if(f){var R=b[0].width,{width:D}=m;k.push("scale(".concat(Ne(D)&&Ne(R)?D/R:1,")"))}return E&&k.push("rotate(".concat(E,", ").concat(N,", ").concat(j,")")),k.length&&(_.transform=k.join(" ")),v.createElement("text",Kx({},Ur(_),{ref:t,x:N,y:j,className:ht("recharts-text",C),textAnchor:h,fill:u.includes("url")?i3:u}),b.map((B,Q)=>{var F=B.words.join(A?"":" ");return v.createElement("tspan",{x:N,dy:Q===0?T:l,key:"".concat(F,"-").concat(Q)},F)}))});bS.displayName="Text";var joe=["labelRef"];function Toe(e,t){if(e==null)return{};var n,r,i=Moe(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Moe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function x2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Dt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?x2(Object(n),!0).forEach(function(r){Roe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Roe(e,t,n){return(t=Doe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Doe(e){var t=Poe(e,"string");return typeof t=="symbol"?t:t+""}function Poe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ri(){return ri=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ri.apply(null,arguments)}var o3=v.createContext(null),koe=e=>{var{x:t,y:n,upperWidth:r,lowerWidth:i,width:l,height:s,children:u}=e,f=v.useMemo(()=>({x:t,y:n,upperWidth:r,lowerWidth:i,width:l,height:s}),[t,n,r,i,l,s]);return v.createElement(o3.Provider,{value:f},u)},l3=()=>{var e=v.useContext(o3),t=zm();return e||bI(t)},Ioe=v.createContext(null),Loe=()=>{var e=v.useContext(Ioe),t=je($L);return e||t},zoe=e=>{var{value:t,formatter:n}=e,r=En(e.children)?t:e.children;return typeof n=="function"?n(r):r},xS=e=>e!=null&&typeof e=="function",$oe=(e,t)=>{var n=Lr(t-e),r=Math.min(Math.abs(t-e),360);return n*r},Boe=(e,t,n,r,i)=>{var{offset:l,className:s}=e,{cx:u,cy:f,innerRadius:h,outerRadius:p,startAngle:m,endAngle:b,clockWise:x}=i,S=(h+p)/2,E=$oe(m,b),C=E>=0?1:-1,A,_;switch(t){case"insideStart":A=m+C*l,_=x;break;case"insideEnd":A=b-C*l,_=!x;break;case"end":A=b+C*l,_=x;break;default:throw new Error("Unsupported position ".concat(t))}_=E<=0?_:!_;var N=wn(u,f,S,A),j=wn(u,f,S,A+(_?1:-1)*359),T="M".concat(N.x,",").concat(N.y,`
86
- A`).concat(S,",").concat(S,",0,1,").concat(_?0:1,`,
87
- `).concat(j.x,",").concat(j.y),k=En(e.id)?Lu("recharts-radial-line-"):e.id;return v.createElement("text",ri({},r,{dominantBaseline:"central",className:ht("recharts-radial-bar-label",s)}),v.createElement("defs",null,v.createElement("path",{id:k,d:T})),v.createElement("textPath",{xlinkHref:"#".concat(k)},n))},Uoe=(e,t,n)=>{var{cx:r,cy:i,innerRadius:l,outerRadius:s,startAngle:u,endAngle:f}=e,h=(u+f)/2;if(n==="outside"){var{x:p,y:m}=wn(r,i,s+t,h);return{x:p,y:m,textAnchor:p>=r?"start":"end",verticalAnchor:"middle"}}if(n==="center")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(n==="centerTop")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"start"};if(n==="centerBottom")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"end"};var b=(l+s)/2,{x,y:S}=wn(r,i,b,h);return{x,y:S,textAnchor:"middle",verticalAnchor:"middle"}},Vx=e=>"cx"in e&&Ne(e.cx),Hoe=(e,t)=>{var{parentViewBox:n,offset:r,position:i}=e,l;n!=null&&!Vx(n)&&(l=n);var{x:s,y:u,upperWidth:f,lowerWidth:h,height:p}=t,m=s,b=s+(f-h)/2,x=(m+b)/2,S=(f+h)/2,E=m+f/2,C=p>=0?1:-1,A=C*r,_=C>0?"end":"start",N=C>0?"start":"end",j=f>=0?1:-1,T=j*r,k=j>0?"end":"start",R=j>0?"start":"end";if(i==="top"){var D={x:m+f/2,y:u-A,textAnchor:"middle",verticalAnchor:_};return Dt(Dt({},D),l?{height:Math.max(u-l.y,0),width:f}:{})}if(i==="bottom"){var B={x:b+h/2,y:u+p+A,textAnchor:"middle",verticalAnchor:N};return Dt(Dt({},B),l?{height:Math.max(l.y+l.height-(u+p),0),width:h}:{})}if(i==="left"){var Q={x:x-T,y:u+p/2,textAnchor:k,verticalAnchor:"middle"};return Dt(Dt({},Q),l?{width:Math.max(Q.x-l.x,0),height:p}:{})}if(i==="right"){var F={x:x+S+T,y:u+p/2,textAnchor:R,verticalAnchor:"middle"};return Dt(Dt({},F),l?{width:Math.max(l.x+l.width-F.x,0),height:p}:{})}var G=l?{width:S,height:p}:{};return i==="insideLeft"?Dt({x:x+T,y:u+p/2,textAnchor:R,verticalAnchor:"middle"},G):i==="insideRight"?Dt({x:x+S-T,y:u+p/2,textAnchor:k,verticalAnchor:"middle"},G):i==="insideTop"?Dt({x:m+f/2,y:u+A,textAnchor:"middle",verticalAnchor:N},G):i==="insideBottom"?Dt({x:b+h/2,y:u+p-A,textAnchor:"middle",verticalAnchor:_},G):i==="insideTopLeft"?Dt({x:m+T,y:u+A,textAnchor:R,verticalAnchor:N},G):i==="insideTopRight"?Dt({x:m+f-T,y:u+A,textAnchor:k,verticalAnchor:N},G):i==="insideBottomLeft"?Dt({x:b+T,y:u+p-A,textAnchor:R,verticalAnchor:_},G):i==="insideBottomRight"?Dt({x:b+h-T,y:u+p-A,textAnchor:k,verticalAnchor:_},G):i&&typeof i=="object"&&(Ne(i.x)||yi(i.x))&&(Ne(i.y)||yi(i.y))?Dt({x:s+yo(i.x,S),y:u+yo(i.y,p),textAnchor:"end",verticalAnchor:"end"},G):Dt({x:E,y:u+p/2,textAnchor:"middle",verticalAnchor:"middle"},G)},qoe={angle:0,offset:5,zIndex:Ln.label,position:"middle",textBreakAll:!1};function lo(e){var t=xr(e,qoe),{viewBox:n,position:r,value:i,children:l,content:s,className:u="",textBreakAll:f,labelRef:h}=t,p=Loe(),m=l3(),b=r==="center"?m:p??m,x,S,E;if(n==null?x=b:Vx(n)?x=n:x=bI(n),!x||En(i)&&En(l)&&!v.isValidElement(s)&&typeof s!="function")return null;var C=Dt(Dt({},t),{},{viewBox:x});if(v.isValidElement(s)){var{labelRef:A}=C,_=Toe(C,joe);return v.cloneElement(s,_)}if(typeof s=="function"){if(S=v.createElement(s,C),v.isValidElement(S))return S}else S=zoe(t);var N=Ur(t);if(Vx(x)){if(r==="insideStart"||r==="insideEnd"||r==="end")return Boe(t,r,S,N,x);E=Uoe(x,t.offset,t.position)}else E=Hoe(t,x);return v.createElement(Mi,{zIndex:t.zIndex},v.createElement(bS,ri({ref:h,className:ht("recharts-label",u)},N,E,{textAnchor:Coe(N.textAnchor)?N.textAnchor:E.textAnchor,breakAll:f}),S))}lo.displayName="Label";var Foe=(e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return e===!0?v.createElement(lo,ri({key:"label-implicit"},r)):_a(e)?v.createElement(lo,ri({key:"label-implicit",value:e},r)):v.isValidElement(e)?e.type===lo?v.cloneElement(e,Dt({key:"label-implicit"},r)):v.createElement(lo,ri({key:"label-implicit",content:e},r)):xS(e)?v.createElement(lo,ri({key:"label-implicit",content:e},r)):e&&typeof e=="object"?v.createElement(lo,ri({},e,{key:"label-implicit"},r)):null};function Koe(e){var{label:t,labelRef:n}=e,r=l3();return Foe(t,r,n)||null}var hb={},pb={},w2;function Voe(){return w2||(w2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n[n.length-1]}e.last=t})(pb)),pb}var mb={},S2;function Goe(){return S2||(S2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Array.isArray(n)?n:Array.from(n)}e.toArray=t})(mb)),mb}var E2;function Yoe(){return E2||(E2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Voe(),n=Goe(),r=l1();function i(l){if(r.isArrayLike(l))return t.last(n.toArray(l))}e.last=i})(hb)),hb}var vb,C2;function Woe(){return C2||(C2=1,vb=Yoe().last),vb}var Xoe=Woe();const Qoe=Ma(Xoe);var Zoe=["valueAccessor"],Joe=["dataKey","clockWise","id","textBreakAll","zIndex"];function Dp(){return Dp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dp.apply(null,arguments)}function A2(e,t){if(e==null)return{};var n,r,i=ele(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ele(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var tle=e=>Array.isArray(e.value)?Qoe(e.value):e.value,s3=v.createContext(void 0),nle=s3.Provider,c3=v.createContext(void 0);c3.Provider;function rle(){return v.useContext(s3)}function ale(){return v.useContext(c3)}function kh(e){var{valueAccessor:t=tle}=e,n=A2(e,Zoe),{dataKey:r,clockWise:i,id:l,textBreakAll:s,zIndex:u}=n,f=A2(n,Joe),h=rle(),p=ale(),m=h||p;return!m||!m.length?null:v.createElement(Mi,{zIndex:u??Ln.label},v.createElement(Na,{className:"recharts-label-list"},m.map((b,x)=>{var S,E=En(r)?t(b,x):Rn(b&&b.payload,r),C=En(l)?{}:{id:"".concat(l,"-").concat(x)};return v.createElement(lo,Dp({key:"label-".concat(x)},Ur(b),f,C,{fill:(S=n.fill)!==null&&S!==void 0?S:b.fill,parentViewBox:b.parentViewBox,value:E,textBreakAll:s,viewBox:b.viewBox,index:x,zIndex:0}))})))}kh.displayName="LabelList";function ile(e){var{label:t}=e;return t?t===!0?v.createElement(kh,{key:"labelList-implicit"}):v.isValidElement(t)||xS(t)?v.createElement(kh,{key:"labelList-implicit",content:t}):typeof t=="object"?v.createElement(kh,Dp({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function Gx(){return Gx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gx.apply(null,arguments)}var u3=e=>{var{cx:t,cy:n,r,className:i}=e,l=ht("recharts-dot",i);return Ne(t)&&Ne(n)&&Ne(r)?v.createElement("circle",Gx({},sa(e),o1(e),{className:l,cx:t,cy:n,r})):null},ole={radiusAxis:{},angleAxis:{}},f3=tr({name:"polarAxis",initialState:ole,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:whe,removeRadiusAxis:She,addAngleAxis:Ehe,removeAngleAxis:Che}=f3.actions,lle=f3.reducer,d3=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0;function sle(e){var{tooltipEntrySettings:t}=e,n=un(),r=nr(),i=v.useRef(null);return v.useLayoutEffect(()=>{r||(i.current===null?n(Yre(t)):i.current!==t&&n(Wre({prev:i.current,next:t})),i.current=t)},[t,n,r]),v.useLayoutEffect(()=>()=>{i.current&&(n(Xre(i.current)),i.current=null)},[n]),null}function cle(e){var{legendPayload:t}=e,n=un(),r=nr(),i=v.useRef(null);return v.useLayoutEffect(()=>{r||(i.current===null?n(CZ(t)):i.current!==t&&n(AZ({prev:i.current,next:t})),i.current=t)},[n,r,t]),v.useLayoutEffect(()=>()=>{i.current&&(n(OZ(i.current)),i.current=null)},[n]),null}var gb,ule=()=>{var[e]=v.useState(()=>Lu("uid-"));return e},fle=(gb=Wp.useId)!==null&&gb!==void 0?gb:ule;function h3(e,t){var n=fle();return t||(e?"".concat(e,"-").concat(n):n)}var dle=v.createContext(void 0),hle=e=>{var{id:t,type:n,children:r}=e,i=h3("recharts-".concat(n),t);return v.createElement(dle.Provider,{value:i},r(i))},ple={cartesianItems:[],polarItems:[]},p3=tr({name:"graphicalItems",initialState:ple,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:St()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,i=aa(e).cartesianItems.indexOf(n);i>-1&&(e.cartesianItems[i]=r)},prepare:St()},removeCartesianGraphicalItem:{reducer(e,t){var n=aa(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:St()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:St()},removePolarGraphicalItem:{reducer(e,t){var n=aa(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)},prepare:St()}}}),{addCartesianGraphicalItem:mle,replaceCartesianGraphicalItem:vle,removeCartesianGraphicalItem:gle,addPolarGraphicalItem:Ahe,removePolarGraphicalItem:Ohe}=p3.actions,yle=p3.reducer,ble=e=>{var t=un(),n=v.useRef(null);return v.useLayoutEffect(()=>{n.current===null?t(mle(e)):n.current!==e&&t(vle({prev:n.current,next:e})),n.current=e},[t,e]),v.useLayoutEffect(()=>()=>{n.current&&(t(gle(n.current)),n.current=null)},[t]),null},xle=v.memo(ble),wle=["points"];function O2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?O2(Object(n),!0).forEach(function(r){Sle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sle(e,t,n){return(t=Ele(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ele(e){var t=Cle(e,"string");return typeof t=="symbol"?t:t+""}function Cle(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Pp(){return Pp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pp.apply(null,arguments)}function Ale(e,t){if(e==null)return{};var n,r,i=Ole(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ole(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Nle(e){var{option:t,dotProps:n,className:r}=e;if(v.isValidElement(t))return v.cloneElement(t,n);if(typeof t=="function")return t(n);var i=ht(r,typeof t!="boolean"?t.className:""),l=n??{},{points:s}=l,u=Ale(l,wle);return v.createElement(u3,Pp({},u,{className:i}))}function _le(e,t){return e==null?!1:t?!0:e.length===1}function jle(e){var{points:t,dot:n,className:r,dotClassName:i,dataKey:l,baseProps:s,needClip:u,clipPathId:f,zIndex:h=Ln.scatter}=e;if(!_le(t,n))return null;var p=d3(n),m=zY(n),b=t.map((S,E)=>{var C,A,_=yb(yb(yb({r:3},s),m),{},{index:E,cx:(C=S.x)!==null&&C!==void 0?C:void 0,cy:(A=S.y)!==null&&A!==void 0?A:void 0,dataKey:l,value:S.value,payload:S.payload,points:t});return v.createElement(Nle,{key:"dot-".concat(E),option:n,dotProps:_,className:i})}),x={};return u&&f!=null&&(x.clipPath="url(#clipPath-".concat(p?"":"dots-").concat(f,")")),v.createElement(Mi,{zIndex:h},v.createElement(Na,Pp({className:r},x),b))}function N2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?N2(Object(n),!0).forEach(function(r){Tle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tle(e,t,n){return(t=Mle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mle(e){var t=Rle(e,"string");return typeof t=="symbol"?t:t+""}function Rle(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Dle={xAxis:{},yAxis:{},zAxis:{}},m3=tr({name:"cartesianAxis",initialState:Dle,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:St()},replaceXAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.xAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.xAxis[n.id],e.xAxis[r.id]=r)},prepare:St()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:St()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:St()},replaceYAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.yAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.yAxis[n.id],e.yAxis[r.id]=r)},prepare:St()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:St()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:St()},replaceZAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.zAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.zAxis[n.id],e.zAxis[r.id]=r)},prepare:St()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:St()},updateYAxisWidth(e,t){var{id:n,width:r}=t.payload,i=e.yAxis[n];if(i){var l=i.widthHistory||[];if(l.length===3&&l[0]===l[2]&&r===l[1]&&r!==i.width&&Math.abs(r-l[0])<=1)return;var s=[...l,r].slice(-3);e.yAxis[n]=_2(_2({},e.yAxis[n]),{},{width:r,widthHistory:s})}}}}),{addXAxis:Ple,replaceXAxis:kle,removeXAxis:Ile,addYAxis:Lle,replaceYAxis:zle,removeYAxis:$le,addZAxis:Nhe,replaceZAxis:_he,removeZAxis:jhe,updateYAxisWidth:Ble}=m3.actions,Ule=m3.reducer,Hle=oe([Cn],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),qle=oe([Hle,Ai,Oi],(e,t,n)=>{if(!(!e||t==null||n==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),wS=()=>je(qle),Fle=()=>je(Hae);function j2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?j2(Object(n),!0).forEach(function(r){Kle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kle(e,t,n){return(t=Vle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vle(e){var t=Gle(e,"string");return typeof t=="symbol"?t:t+""}function Gle(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Yle=e=>{var{point:t,childIndex:n,mainColor:r,activeDot:i,dataKey:l,clipPath:s}=e;if(i===!1||t.x==null||t.y==null)return null;var u={index:n,dataKey:l,cx:t.x,cy:t.y,r:4,fill:r??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},f=bb(bb(bb({},u),wm(i)),o1(i)),h;return v.isValidElement(i)?h=v.cloneElement(i,f):typeof i=="function"?h=i(f):h=v.createElement(u3,f),v.createElement(Na,{className:"recharts-active-dot",clipPath:s},h)};function T2(e){var{points:t,mainColor:n,activeDot:r,itemDataKey:i,clipPath:l,zIndex:s=Ln.activeDot}=e,u=je(Xu),f=Fle();if(t==null||f==null)return null;var h=t.find(p=>f.includes(p.payload));return En(h)?null:v.createElement(Mi,{zIndex:s},v.createElement(Yle,{point:h,childIndex:Number(u),mainColor:n,dataKey:i,activeDot:r,clipPath:l}))}var Wle={},v3=tr({name:"errorBars",initialState:Wle,reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},replaceErrorBar:(e,t)=>{var{itemId:n,prev:r,next:i}=t.payload;e[n]&&(e[n]=e[n].map(l=>l.dataKey===r.dataKey&&l.direction===r.direction?i:l))},removeErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(i=>i.dataKey!==r.dataKey||i.direction!==r.direction))}}}),{addErrorBar:The,replaceErrorBar:Mhe,removeErrorBar:Rhe}=v3.actions,Xle=v3.reducer;function g3(e,t){var n,r,i=je(h=>_i(h,e)),l=je(h=>ji(h,t)),s=(n=i?.allowDataOverflow)!==null&&n!==void 0?n:ln.allowDataOverflow,u=(r=l?.allowDataOverflow)!==null&&r!==void 0?r:sn.allowDataOverflow,f=s||u;return{needClip:f,needClipX:s,needClipY:u}}function Qle(e){var{xAxisId:t,yAxisId:n,clipPathId:r}=e,i=wS(),{needClipX:l,needClipY:s,needClip:u}=g3(t,n);if(!u||!i)return null;var{x:f,y:h,width:p,height:m}=i;return v.createElement("clipPath",{id:"clipPath-".concat(r)},v.createElement("rect",{x:l?f:f-p/2,y:s?h:h-m/2,width:l?p:p*2,height:s?m:m*2}))}var xb={exports:{}},wb={};var M2;function Zle(){if(M2)return wb;M2=1;var e=Bs();function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,i=e.useRef,l=e.useEffect,s=e.useMemo,u=e.useDebugValue;return wb.useSyncExternalStoreWithSelector=function(f,h,p,m,b){var x=i(null);if(x.current===null){var S={hasValue:!1,value:null};x.current=S}else S=x.current;x=s(function(){function C(T){if(!A){if(A=!0,_=T,T=m(T),b!==void 0&&S.hasValue){var k=S.value;if(b(k,T))return N=k}return N=T}if(k=N,n(_,T))return k;var R=m(T);return b!==void 0&&b(k,R)?(_=T,k):(_=T,N=R)}var A=!1,_,N,j=p===void 0?null:p;return[function(){return C(h())},j===null?void 0:function(){return C(j())}]},[h,p,m,b]);var E=r(f,x[0],x[1]);return l(function(){S.hasValue=!0,S.value=E},[E]),u(E),E},wb}var R2;function Jle(){return R2||(R2=1,xb.exports=Zle()),xb.exports}Jle();function ese(e){e()}function tse(){let e=null,t=null;return{clear(){e=null,t=null},notify(){ese(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var D2={notify(){},get:()=>[]};function nse(e,t){let n,r=D2,i=0,l=!1;function s(E){p();const C=r.subscribe(E);let A=!1;return()=>{A||(A=!0,C(),m())}}function u(){r.notify()}function f(){S.onStateChange&&S.onStateChange()}function h(){return l}function p(){i++,n||(n=e.subscribe(f),r=tse())}function m(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=D2)}function b(){l||(l=!0,p())}function x(){l&&(l=!1,m())}const S={addNestedSub:s,notifyNestedSubs:u,handleChangeWrapper:f,isSubscribed:h,trySubscribe:b,tryUnsubscribe:x,getListeners:()=>r};return S}var rse=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ase=rse(),ise=()=>typeof navigator<"u"&&navigator.product==="ReactNative",ose=ise(),lse=()=>ase||ose?v.useLayoutEffect:v.useEffect,sse=lse();function P2(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function cse(e,t){if(P2(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!P2(e[n[i]],t[n[i]]))return!1;return!0}var use=Symbol.for("react-redux-context"),fse=typeof globalThis<"u"?globalThis:{};function dse(){if(!v.createContext)return{};const e=fse[use]??=new Map;let t=e.get(v.createContext);return t||(t=v.createContext(null),e.set(v.createContext,t)),t}var hse=dse();function pse(e){const{children:t,context:n,serverState:r,store:i}=e,l=v.useMemo(()=>{const f=nse(i);return{store:i,subscription:f,getServerState:r?()=>r:void 0}},[i,r]),s=v.useMemo(()=>i.getState(),[i]);sse(()=>{const{subscription:f}=l;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),s!==i.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[l,s]);const u=n||hse;return v.createElement(u.Provider,{value:l},t)}var mse=pse,vse=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle"]);function gse(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function SS(e,t){var n=new Set([...Object.keys(e),...Object.keys(t)]);for(var r of n)if(vse.has(r)){if(e[r]==null&&t[r]==null)continue;if(!cse(e[r],t[r]))return!1}else if(!gse(e[r],t[r]))return!1;return!0}var yse=e=>{var{chartData:t}=e,n=un(),r=nr();return v.useEffect(()=>r?()=>{}:(n(i2(t)),()=>{n(i2(void 0))}),[t,n,r]),null},k2={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},y3=tr({name:"brush",initialState:k2,reducers:{setBrushSettings(e,t){return t.payload==null?k2:t.payload}}}),{setBrushSettings:Dhe}=y3.actions,bse=y3.reducer;function xse(e,t,n){return(t=wse(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wse(e){var t=Sse(e,"string");return typeof t=="symbol"?t:t+""}function Sse(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class ES{static create(t){return new ES(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}apply(t){var{bandAware:n,position:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t!==void 0){if(r)switch(r){case"start":return this.scale(t);case"middle":{var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+i}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(t)+l}default:return this.scale(t)}if(n){var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+s}return this.scale(t)}}isInRange(t){var n=this.range(),r=n[0],i=n[n.length-1];return r<=i?t>=r&&t<=i:t>=i&&t<=r}}xse(ES,"EPS",1e-4);function Ese(e){return(e%180+180)%180}var Cse=function(t){var{width:n,height:r}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,l=Ese(i),s=l*Math.PI/180,u=Math.atan(r/n),f=s>u&&s<Math.PI-u?r/Math.sin(s):n/Math.cos(s);return Math.abs(f)},Ase={dots:[],areas:[],lines:[]},b3=tr({name:"referenceElements",initialState:Ase,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=aa(e).dots.findIndex(r=>r===t.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=aa(e).areas.findIndex(r=>r===t.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=aa(e).lines.findIndex(r=>r===t.payload);n!==-1&&e.lines.splice(n,1)}}}),{addDot:Phe,removeDot:khe,addArea:Ihe,removeArea:Lhe,addLine:zhe,removeLine:$he}=b3.actions,Ose=b3.reducer,Nse=v.createContext(void 0),_se=e=>{var{children:t}=e,[n]=v.useState("".concat(Lu("recharts"),"-clip")),r=wS();if(r==null)return null;var{x:i,y:l,width:s,height:u}=r;return v.createElement(Nse.Provider,{value:n},v.createElement("defs",null,v.createElement("clipPath",{id:n},v.createElement("rect",{x:i,y:l,height:u,width:s}))),t)};function x3(e,t){if(t<1)return[];if(t===1)return e;for(var n=[],r=0;r<e.length;r+=t)n.push(e[r]);return n}function jse(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return Cse(r,n)}function Tse(e,t,n){var r=n==="width",{x:i,y:l,width:s,height:u}=e;return t===1?{start:r?i:l,end:r?i+s:l+u}:{start:r?i+s:l+u,end:r?i:l}}function kp(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var l=n();return e*(t-e*l/2-r)>=0&&e*(t+e*l/2-i)<=0}function Mse(e,t){return x3(e,t+1)}function Rse(e,t,n,r,i){for(var l=(r||[]).slice(),{start:s,end:u}=t,f=0,h=1,p=s,m=function(){var S=r?.[f];if(S===void 0)return{v:x3(r,h)};var E=f,C,A=()=>(C===void 0&&(C=n(S,E)),C),_=S.coordinate,N=f===0||kp(e,_,A,p,u);N||(f=0,p=s,h+=1),N&&(p=_+e*(A()/2+i),f+=h)},b;h<=l.length;)if(b=m(),b)return b.v;return[]}function I2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function jn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?I2(Object(n),!0).forEach(function(r){Dse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Dse(e,t,n){return(t=Pse(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pse(e){var t=kse(e,"string");return typeof t=="symbol"?t:t+""}function kse(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ise(e,t,n,r,i){for(var l=(r||[]).slice(),s=l.length,{start:u}=t,{end:f}=t,h=function(b){var x=l[b],S,E=()=>(S===void 0&&(S=n(x,b)),S);if(b===s-1){var C=e*(x.coordinate+e*E()/2-f);l[b]=x=jn(jn({},x),{},{tickCoord:C>0?x.coordinate-C*e:x.coordinate})}else l[b]=x=jn(jn({},x),{},{tickCoord:x.coordinate});if(x.tickCoord!=null){var A=kp(e,x.tickCoord,E,u,f);A&&(f=x.tickCoord-e*(E()/2+i),l[b]=jn(jn({},x),{},{isShow:!0}))}},p=s-1;p>=0;p--)h(p);return l}function Lse(e,t,n,r,i,l){var s=(r||[]).slice(),u=s.length,{start:f,end:h}=t;if(l){var p=r[u-1],m=n(p,u-1),b=e*(p.coordinate+e*m/2-h);if(s[u-1]=p=jn(jn({},p),{},{tickCoord:b>0?p.coordinate-b*e:p.coordinate}),p.tickCoord!=null){var x=kp(e,p.tickCoord,()=>m,f,h);x&&(h=p.tickCoord-e*(m/2+i),s[u-1]=jn(jn({},p),{},{isShow:!0}))}}for(var S=l?u-1:u,E=function(_){var N=s[_],j,T=()=>(j===void 0&&(j=n(N,_)),j);if(_===0){var k=e*(N.coordinate-e*T()/2-f);s[_]=N=jn(jn({},N),{},{tickCoord:k<0?N.coordinate-k*e:N.coordinate})}else s[_]=N=jn(jn({},N),{},{tickCoord:N.coordinate});if(N.tickCoord!=null){var R=kp(e,N.tickCoord,T,f,h);R&&(f=N.tickCoord+e*(T()/2+i),s[_]=jn(jn({},N),{},{isShow:!0}))}},C=0;C<S;C++)E(C);return s}function CS(e,t,n){var{tick:r,ticks:i,viewBox:l,minTickGap:s,orientation:u,interval:f,tickFormatter:h,unit:p,angle:m}=e;if(!i||!i.length||!r)return[];if(Ne(f)||rc.isSsr){var b;return(b=Mse(i,Ne(f)?f:0))!==null&&b!==void 0?b:[]}var x=[],S=u==="top"||u==="bottom"?"width":"height",E=p&&S==="width"?Au(p,{fontSize:t,letterSpacing:n}):{width:0,height:0},C=(N,j)=>{var T=typeof h=="function"?h(N.value,j):N.value;return S==="width"?jse(Au(T,{fontSize:t,letterSpacing:n}),E,m):Au(T,{fontSize:t,letterSpacing:n})[S]},A=i.length>=2?Lr(i[1].coordinate-i[0].coordinate):1,_=Tse(l,A,S);return f==="equidistantPreserveStart"?Rse(A,_,C,i,s):(f==="preserveStart"||f==="preserveStartEnd"?x=Lse(A,_,C,i,s,f==="preserveStartEnd"):x=Ise(A,_,C,i,s),x.filter(N=>N.isShow))}var zse=e=>{var{ticks:t,label:n,labelGapWithTick:r=5,tickSize:i=0,tickMargin:l=0}=e,s=0;if(t){Array.from(t).forEach(p=>{if(p){var m=p.getBoundingClientRect();m.width>s&&(s=m.width)}});var u=n?n.getBoundingClientRect().width:0,f=i+l,h=s+f+u+(n?r:0);return Math.round(h)}return 0},$se=["axisLine","width","height","className","hide","ticks","axisType"];function Bse(e,t){if(e==null)return{};var n,r,i=Use(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Use(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function hl(){return hl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hl.apply(null,arguments)}function L2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function $t(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?L2(Object(n),!0).forEach(function(r){Hse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hse(e,t,n){return(t=qse(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qse(e){var t=Fse(e,"string");return typeof t=="symbol"?t:t+""}function Fse(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hi={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:Ln.axis};function Kse(e){var{x:t,y:n,width:r,height:i,orientation:l,mirror:s,axisLine:u,otherSvgProps:f}=e;if(!u)return null;var h=$t($t($t({},f),sa(u)),{},{fill:"none"});if(l==="top"||l==="bottom"){var p=+(l==="top"&&!s||l==="bottom"&&s);h=$t($t({},h),{},{x1:t,y1:n+p*i,x2:t+r,y2:n+p*i})}else{var m=+(l==="left"&&!s||l==="right"&&s);h=$t($t({},h),{},{x1:t+m*r,y1:n,x2:t+m*r,y2:n+i})}return v.createElement("line",hl({},h,{className:ht("recharts-cartesian-axis-line",Cm(u,"className"))}))}function Vse(e,t,n,r,i,l,s,u,f){var h,p,m,b,x,S,E=u?-1:1,C=e.tickSize||s,A=Ne(e.tickCoord)?e.tickCoord:e.coordinate;switch(l){case"top":h=p=e.coordinate,b=n+ +!u*i,m=b-E*C,S=m-E*f,x=A;break;case"left":m=b=e.coordinate,p=t+ +!u*r,h=p-E*C,x=h-E*f,S=A;break;case"right":m=b=e.coordinate,p=t+ +u*r,h=p+E*C,x=h+E*f,S=A;break;default:h=p=e.coordinate,b=n+ +u*i,m=b+E*C,S=m+E*f,x=A;break}return{line:{x1:h,y1:m,x2:p,y2:b},tick:{x,y:S}}}function Gse(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function Yse(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function Wse(e){var{option:t,tickProps:n,value:r}=e,i,l=ht(n.className,"recharts-cartesian-axis-tick-value");if(v.isValidElement(t))i=v.cloneElement(t,$t($t({},n),{},{className:l}));else if(typeof t=="function")i=t($t($t({},n),{},{className:l}));else{var s="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(s=ht(s,t?.className)),i=v.createElement(bS,hl({},n,{className:s}),r)}return i}var Xse=v.forwardRef((e,t)=>{var{ticks:n=[],tick:r,tickLine:i,stroke:l,tickFormatter:s,unit:u,padding:f,tickTextProps:h,orientation:p,mirror:m,x:b,y:x,width:S,height:E,tickSize:C,tickMargin:A,fontSize:_,letterSpacing:N,getTicksConfig:j,events:T,axisType:k}=e,R=CS($t($t({},j),{},{ticks:n}),_,N),D=Gse(p,m),B=Yse(p,m),Q=sa(j),F=wm(r),G={};typeof i=="object"&&(G=i);var te=$t($t({},Q),{},{fill:"none"},G),ce=R.map(q=>$t({entry:q},Vse(q,b,x,S,E,p,C,m,A))),he=ce.map(q=>{var{entry:H,line:X}=q;return v.createElement(Na,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(H.value,"-").concat(H.coordinate,"-").concat(H.tickCoord)},i&&v.createElement("line",hl({},te,X,{className:ht("recharts-cartesian-axis-tick-line",Cm(i,"className"))})))}),I=ce.map((q,H)=>{var{entry:X,tick:ge}=q,L=$t($t($t($t({textAnchor:D,verticalAnchor:B},Q),{},{stroke:"none",fill:l},F),ge),{},{index:H,payload:X,visibleTicksCount:R.length,tickFormatter:s,padding:f},h);return v.createElement(Na,hl({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(X.value,"-").concat(X.coordinate,"-").concat(X.tickCoord)},xW(T,X,H)),r&&v.createElement(Wse,{option:r,tickProps:L,value:"".concat(typeof s=="function"?s(X.value,H):X.value).concat(u||"")}))});return v.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(k,"-ticks")},I.length>0&&v.createElement(Mi,{zIndex:Ln.label},v.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(k,"-tick-labels"),ref:t},I)),he.length>0&&v.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(k,"-tick-lines")},he))}),Qse=v.forwardRef((e,t)=>{var{axisLine:n,width:r,height:i,className:l,hide:s,ticks:u,axisType:f}=e,h=Bse(e,$se),[p,m]=v.useState(""),[b,x]=v.useState(""),S=v.useRef(null);v.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var C;return zse({ticks:S.current,label:(C=e.labelRef)===null||C===void 0?void 0:C.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var E=v.useCallback(C=>{if(C){var A=C.getElementsByClassName("recharts-cartesian-axis-tick-value");S.current=A;var _=A[0];if(_){var N=window.getComputedStyle(_),j=N.fontSize,T=N.letterSpacing;(j!==p||T!==b)&&(m(j),x(T))}}},[p,b]);return s||r!=null&&r<=0||i!=null&&i<=0?null:v.createElement(Mi,{zIndex:e.zIndex},v.createElement(Na,{className:ht("recharts-cartesian-axis",l)},v.createElement(Kse,{x:e.x,y:e.y,width:r,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:sa(e)}),v.createElement(Xse,{ref:E,axisType:f,events:h,fontSize:p,getTicksConfig:e,height:e.height,letterSpacing:b,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:u,unit:e.unit,width:e.width,x:e.x,y:e.y}),v.createElement(koe,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},v.createElement(Koe,{label:e.label,labelRef:e.labelRef}),e.children)))}),AS=v.forwardRef((e,t)=>{var n=xr(e,hi);return v.createElement(Qse,hl({},n,{ref:t}))});AS.displayName="CartesianAxis";var Zse=["x1","y1","x2","y2","key"],Jse=["offset"],ece=["xAxisId","yAxisId"],tce=["xAxisId","yAxisId"];function z2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Tn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?z2(Object(n),!0).forEach(function(r){nce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nce(e,t,n){return(t=rce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rce(e){var t=ace(e,"string");return typeof t=="symbol"?t:t+""}function ace(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Zo(){return Zo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zo.apply(null,arguments)}function Ip(e,t){if(e==null)return{};var n,r,i=ice(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ice(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var oce=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:n,x:r,y:i,width:l,height:s,ry:u}=e;return v.createElement("rect",{x:r,y:i,ry:u,width:l,height:s,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function w3(e){var{option:t,lineItemProps:n}=e,r;if(v.isValidElement(t))r=v.cloneElement(t,n);else if(typeof t=="function")r=t(n);else{var i,{x1:l,y1:s,x2:u,y2:f,key:h}=n,p=Ip(n,Zse),m=(i=sa(p))!==null&&i!==void 0?i:{},{offset:b}=m,x=Ip(m,Jse);r=v.createElement("line",Zo({},x,{x1:l,y1:s,x2:u,y2:f,fill:"none",key:h}))}return r}function lce(e){var{x:t,width:n,horizontal:r=!0,horizontalPoints:i}=e;if(!r||!i||!i.length)return null;var{xAxisId:l,yAxisId:s}=e,u=Ip(e,ece),f=i.map((h,p)=>{var m=Tn(Tn({},u),{},{x1:t,y1:h,x2:t+n,y2:h,key:"line-".concat(p),index:p});return v.createElement(w3,{key:"line-".concat(p),option:r,lineItemProps:m})});return v.createElement("g",{className:"recharts-cartesian-grid-horizontal"},f)}function sce(e){var{y:t,height:n,vertical:r=!0,verticalPoints:i}=e;if(!r||!i||!i.length)return null;var{xAxisId:l,yAxisId:s}=e,u=Ip(e,tce),f=i.map((h,p)=>{var m=Tn(Tn({},u),{},{x1:h,y1:t,x2:h,y2:t+n,key:"line-".concat(p),index:p});return v.createElement(w3,{option:r,lineItemProps:m,key:"line-".concat(p)})});return v.createElement("g",{className:"recharts-cartesian-grid-vertical"},f)}function cce(e){var{horizontalFill:t,fillOpacity:n,x:r,y:i,width:l,height:s,horizontalPoints:u,horizontal:f=!0}=e;if(!f||!t||!t.length||u==null)return null;var h=u.map(m=>Math.round(m+i-i)).sort((m,b)=>m-b);i!==h[0]&&h.unshift(0);var p=h.map((m,b)=>{var x=!h[b+1],S=x?i+s-m:h[b+1]-m;if(S<=0)return null;var E=b%t.length;return v.createElement("rect",{key:"react-".concat(b),y:m,x:r,height:S,width:l,stroke:"none",fill:t[E],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return v.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},p)}function uce(e){var{vertical:t=!0,verticalFill:n,fillOpacity:r,x:i,y:l,width:s,height:u,verticalPoints:f}=e;if(!t||!n||!n.length)return null;var h=f.map(m=>Math.round(m+i-i)).sort((m,b)=>m-b);i!==h[0]&&h.unshift(0);var p=h.map((m,b)=>{var x=!h[b+1],S=x?i+s-m:h[b+1]-m;if(S<=0)return null;var E=b%n.length;return v.createElement("rect",{key:"react-".concat(b),x:m,y:l,width:S,height:u,stroke:"none",fill:n[E],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return v.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},p)}var fce=(e,t)=>{var{xAxis:n,width:r,height:i,offset:l}=e;return fI(CS(Tn(Tn(Tn({},hi),n),{},{ticks:dI(n),viewBox:{x:0,y:0,width:r,height:i}})),l.left,l.left+l.width,t)},dce=(e,t)=>{var{yAxis:n,width:r,height:i,offset:l}=e;return fI(CS(Tn(Tn(Tn({},hi),n),{},{ticks:dI(n),viewBox:{x:0,y:0,width:r,height:i}})),l.top,l.top+l.height,t)},hce={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:Ln.grid};function S3(e){var t=wI(),n=SI(),r=xI(),i=Tn(Tn({},xr(e,hce)),{},{x:Ne(e.x)?e.x:r.left,y:Ne(e.y)?e.y:r.top,width:Ne(e.width)?e.width:r.width,height:Ne(e.height)?e.height:r.height}),{xAxisId:l,yAxisId:s,x:u,y:f,width:h,height:p,syncWithTicks:m,horizontalValues:b,verticalValues:x}=i,S=nr(),E=je(B=>GT(B,"xAxis",l,S)),C=je(B=>GT(B,"yAxis",s,S));if(!ja(h)||!ja(p)||!Ne(u)||!Ne(f))return null;var A=i.verticalCoordinatesGenerator||fce,_=i.horizontalCoordinatesGenerator||dce,{horizontalPoints:N,verticalPoints:j}=i;if((!N||!N.length)&&typeof _=="function"){var T=b&&b.length,k=_({yAxis:C?Tn(Tn({},C),{},{ticks:T?b:C.ticks}):void 0,width:t??h,height:n??p,offset:r},T?!0:m);fp(Array.isArray(k),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof k,"]")),Array.isArray(k)&&(N=k)}if((!j||!j.length)&&typeof A=="function"){var R=x&&x.length,D=A({xAxis:E?Tn(Tn({},E),{},{ticks:R?x:E.ticks}):void 0,width:t??h,height:n??p,offset:r},R?!0:m);fp(Array.isArray(D),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof D,"]")),Array.isArray(D)&&(j=D)}return v.createElement(Mi,{zIndex:i.zIndex},v.createElement("g",{className:"recharts-cartesian-grid"},v.createElement(oce,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),v.createElement(cce,Zo({},i,{horizontalPoints:N})),v.createElement(uce,Zo({},i,{verticalPoints:j})),v.createElement(lce,Zo({},i,{offset:r,horizontalPoints:N,xAxis:E,yAxis:C})),v.createElement(sce,Zo({},i,{offset:r,verticalPoints:j,xAxis:E,yAxis:C}))))}S3.displayName="CartesianGrid";function pce(e){var t=wm(e),n=3,r=2;if(t!=null){var{r:i,strokeWidth:l}=t,s=Number(i),u=Number(l);return(Number.isNaN(s)||s<0)&&(s=n),(Number.isNaN(u)||u<0)&&(u=r),{r:s,strokeWidth:u}}return{r:n,strokeWidth:r}}var E3=(e,t,n,r)=>E5(e,"xAxis",t,r),C3=(e,t,n,r)=>S5(e,"xAxis",t,r),A3=(e,t,n,r)=>E5(e,"yAxis",n,r),O3=(e,t,n,r)=>S5(e,"yAxis",n,r),mce=oe([pt,E3,A3,C3,O3],(e,t,n,r,i)=>Ci(e,"xAxis")?up(t,r,!1):up(n,i,!1)),vce=(e,t,n,r,i)=>i,N3=oe([KL,vce],(e,t)=>e.filter(n=>n.type==="area").find(n=>n.id===t)),gce=(e,t,n,r,i)=>{var l,s=N3(e,t,n,r,i);if(s!=null){var u=pt(e),f=Ci(u,"xAxis"),h;if(f?h=Bx(e,"yAxis",n,r):h=Bx(e,"xAxis",t,r),h!=null){var{stackId:p}=s,m=Z1(s);if(!(p==null||m==null)){var b=(l=h[p])===null||l===void 0?void 0:l.stackedData;return b?.find(x=>x.key===m)}}}},yce=oe([pt,E3,A3,C3,O3,gce,q1,mce,N3,$ne],(e,t,n,r,i,l,s,u,f,h)=>{var{chartData:p,dataStartIndex:m,dataEndIndex:b}=s;if(!(f==null||e!=="horizontal"&&e!=="vertical"||t==null||n==null||r==null||i==null||r.length===0||i.length===0||u==null)){var{data:x}=f,S;if(x&&x.length>0?S=x:S=p?.slice(m,b+1),S!=null)return Lce({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:m,areaSettings:f,stackedData:l,displayedData:S,chartBaseValue:h,bandSize:u})}}),bce=["id"],xce=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function rl(){return rl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rl.apply(null,arguments)}function _3(e,t){if(e==null)return{};var n,r,i=wce(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function wce(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function $2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Es(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$2(Object(n),!0).forEach(function(r){Sce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sce(e,t,n){return(t=Ece(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ece(e){var t=Cce(e,"string");return typeof t=="symbol"?t:t+""}function Cce(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lp(e,t){return e&&e!=="none"?e:t}var Ace=e=>{var{dataKey:t,name:n,stroke:r,fill:i,legendType:l,hide:s}=e;return[{inactive:s,dataKey:t,type:l,color:Lp(r,i),value:hI(n,t),payload:e}]},Oce=v.memo(e=>{var{dataKey:t,data:n,stroke:r,strokeWidth:i,fill:l,name:s,hide:u,unit:f,tooltipType:h}=e,p={dataDefinedOnItem:n,positions:void 0,settings:{stroke:r,strokeWidth:i,fill:l,dataKey:t,nameKey:void 0,name:hI(s,t),hide:u,type:h,color:Lp(r,l),unit:f}};return v.createElement(sle,{tooltipEntrySettings:p})});function Nce(e){var{clipPathId:t,points:n,props:r}=e,{needClip:i,dot:l,dataKey:s}=r,u=sa(r);return v.createElement(jle,{points:n,dot:l,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:s,baseProps:u,needClip:i,clipPathId:t})}function _ce(e){var{showLabels:t,children:n,points:r}=e,i=r.map(l=>{var s,u,f={x:(s=l.x)!==null&&s!==void 0?s:0,y:(u=l.y)!==null&&u!==void 0?u:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Es(Es({},f),{},{value:l.value,payload:l.payload,parentViewBox:void 0,viewBox:f,fill:void 0})});return v.createElement(nle,{value:t?i:void 0},n)}function B2(e){var{points:t,baseLine:n,needClip:r,clipPathId:i,props:l}=e,{layout:s,type:u,stroke:f,connectNulls:h,isRange:p}=l,{id:m}=l,b=_3(l,bce),x=sa(b),S=Ur(b);return v.createElement(v.Fragment,null,t?.length>1&&v.createElement(Na,{clipPath:r?"url(#clipPath-".concat(i,")"):void 0},v.createElement(Dh,rl({},S,{id:m,points:t,connectNulls:h,type:u,baseLine:n,layout:s,stroke:"none",className:"recharts-area-area"})),f!=="none"&&v.createElement(Dh,rl({},x,{className:"recharts-area-curve",layout:s,type:u,connectNulls:h,fill:"none",points:t})),f!=="none"&&p&&v.createElement(Dh,rl({},x,{className:"recharts-area-curve",layout:s,type:u,connectNulls:h,fill:"none",points:n}))),v.createElement(Nce,{points:t,props:b,clipPathId:i}))}function jce(e){var{alpha:t,baseLine:n,points:r,strokeWidth:i}=e,l=r[0].y,s=r[r.length-1].y;if(!Tt(l)||!Tt(s))return null;var u=t*Math.abs(l-s),f=Math.max(...r.map(h=>h.x||0));return Ne(n)?f=Math.max(n,f):n&&Array.isArray(n)&&n.length&&(f=Math.max(...n.map(h=>h.x||0),f)),Ne(f)?v.createElement("rect",{x:0,y:l<s?l:l-u,width:f+(i?parseInt("".concat(i),10):1),height:Math.floor(u)}):null}function Tce(e){var{alpha:t,baseLine:n,points:r,strokeWidth:i}=e,l=r[0].x,s=r[r.length-1].x;if(!Tt(l)||!Tt(s))return null;var u=t*Math.abs(l-s),f=Math.max(...r.map(h=>h.y||0));return Ne(n)?f=Math.max(n,f):n&&Array.isArray(n)&&n.length&&(f=Math.max(...n.map(h=>h.y||0),f)),Ne(f)?v.createElement("rect",{x:l<s?l:l-u,y:0,width:u,height:Math.floor(f+(i?parseInt("".concat(i),10):1))}):null}function Mce(e){var{alpha:t,layout:n,points:r,baseLine:i,strokeWidth:l}=e;return n==="vertical"?v.createElement(jce,{alpha:t,points:r,baseLine:i,strokeWidth:l}):v.createElement(Tce,{alpha:t,points:r,baseLine:i,strokeWidth:l})}function Rce(e){var{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:l}=e,{points:s,baseLine:u,isAnimationActive:f,animationBegin:h,animationDuration:p,animationEasing:m,onAnimationStart:b,onAnimationEnd:x}=r,S=v.useMemo(()=>({points:s,baseLine:u}),[s,u]),E=kI(S,"recharts-area-"),C=uZ(),[A,_]=v.useState(!1),N=!A,j=v.useCallback(()=>{typeof x=="function"&&x(),_(!1)},[x]),T=v.useCallback(()=>{typeof b=="function"&&b(),_(!0)},[b]);if(C==null)return null;var k=i.current,R=l.current;return v.createElement(_ce,{showLabels:N,points:s},r.children,v.createElement(PI,{animationId:E,begin:h,duration:p,isActive:f,easing:m,onAnimationEnd:j,onAnimationStart:T,key:E},D=>{if(k){var B=k.length/s.length,Q=D===1?s:s.map((G,te)=>{var ce=Math.floor(te*B);if(k[ce]){var he=k[ce];return Es(Es({},G),{},{x:ya(he.x,G.x,D),y:ya(he.y,G.y,D)})}return G}),F;return Ne(u)?F=ya(R,u,D):En(u)||ca(u)?F=ya(R,0,D):F=u.map((G,te)=>{var ce=Math.floor(te*B);if(Array.isArray(R)&&R[ce]){var he=R[ce];return Es(Es({},G),{},{x:ya(he.x,G.x,D),y:ya(he.y,G.y,D)})}return G}),D>0&&(i.current=Q,l.current=F),v.createElement(B2,{points:Q,baseLine:F,needClip:t,clipPathId:n,props:r})}return D>0&&(i.current=s,l.current=u),v.createElement(Na,null,f&&v.createElement("defs",null,v.createElement("clipPath",{id:"animationClipPath-".concat(n)},v.createElement(Mce,{alpha:D,points:s,baseLine:u,layout:C,strokeWidth:r.strokeWidth}))),v.createElement(Na,{clipPath:"url(#animationClipPath-".concat(n,")")},v.createElement(B2,{points:s,baseLine:u,needClip:t,clipPathId:n,props:r})))}),v.createElement(ile,{label:r.label}))}function Dce(e){var{needClip:t,clipPathId:n,props:r}=e,i=v.useRef(null),l=v.useRef();return v.createElement(Rce,{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:l})}class Pce extends v.PureComponent{render(){var{hide:t,dot:n,points:r,className:i,top:l,left:s,needClip:u,xAxisId:f,yAxisId:h,width:p,height:m,id:b,baseLine:x,zIndex:S}=this.props;if(t)return null;var E=ht("recharts-area",i),C=b,{r:A,strokeWidth:_}=pce(n),N=d3(n),j=A*2+_,T=u?"url(#clipPath-".concat(N?"":"dots-").concat(C,")"):void 0;return v.createElement(Mi,{zIndex:S},v.createElement(Na,{className:E},u&&v.createElement("defs",null,v.createElement(Qle,{clipPathId:C,xAxisId:f,yAxisId:h}),!N&&v.createElement("clipPath",{id:"clipPath-dots-".concat(C)},v.createElement("rect",{x:s-j/2,y:l-j/2,width:p+j,height:m+j}))),v.createElement(Dce,{needClip:u,clipPathId:C,props:this.props})),v.createElement(T2,{points:r,mainColor:Lp(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:T}),this.props.isRange&&Array.isArray(x)&&v.createElement(T2,{points:x,mainColor:Lp(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:T}))}}var j3={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:Ln.area};function kce(e){var t,n=xr(e,j3),{activeDot:r,animationBegin:i,animationDuration:l,animationEasing:s,connectNulls:u,dot:f,fill:h,fillOpacity:p,hide:m,isAnimationActive:b,legendType:x,stroke:S,xAxisId:E,yAxisId:C}=n,A=_3(n,xce),_=yf(),N=F5(),{needClip:j}=g3(E,C),T=nr(),{points:k,isRange:R,baseLine:D}=(t=je(ce=>yce(ce,E,C,T,e.id)))!==null&&t!==void 0?t:{},B=wS();if(_!=="horizontal"&&_!=="vertical"||B==null||N!=="AreaChart"&&N!=="ComposedChart")return null;var{height:Q,width:F,x:G,y:te}=B;return!k||!k.length?null:v.createElement(Pce,rl({},A,{activeDot:r,animationBegin:i,animationDuration:l,animationEasing:s,baseLine:D,connectNulls:u,dot:f,fill:h,fillOpacity:p,height:Q,hide:m,layout:_,isAnimationActive:b==="auto"?!rc.isSsr:b,isRange:R,legendType:x,needClip:j,points:k,stroke:S,width:F,left:G,top:te,xAxisId:E,yAxisId:C}))}var Ice=(e,t,n,r,i)=>{var l=n??t;if(Ne(l))return l;var s=e==="horizontal"?i:r,u=s.scale.domain();if(s.type==="number"){var f=Math.max(u[0],u[1]),h=Math.min(u[0],u[1]);return l==="dataMin"?h:l==="dataMax"||f<0?f:Math.max(Math.min(u[0],u[1]),0)}return l==="dataMin"?u[0]:l==="dataMax"?u[1]:u[0]};function Lce(e){var{areaSettings:{connectNulls:t,baseValue:n,dataKey:r},stackedData:i,layout:l,chartBaseValue:s,xAxis:u,yAxis:f,displayedData:h,dataStartIndex:p,xAxisTicks:m,yAxisTicks:b,bandSize:x}=e,S=i&&i.length,E=Ice(l,s,n,u,f),C=l==="horizontal",A=!1,_=h.map((j,T)=>{var k;S?k=i[p+T]:(k=Rn(j,r),Array.isArray(k)?A=!0:k=[E,k]);var R=k[1]==null||S&&!t&&Rn(j,r)==null;return C?{x:vj({axis:u,ticks:m,bandSize:x,entry:j,index:T}),y:R?null:f.scale(k[1]),value:k,payload:j}:{x:R?null:u.scale(k[1]),y:vj({axis:f,ticks:b,bandSize:x,entry:j,index:T}),value:k,payload:j}}),N;return S||A?N=_.map(j=>{var T=Array.isArray(j.value)?j.value[0]:null;return C?{x:j.x,y:T!=null&&j.y!=null?f.scale(T):null,payload:j.payload}:{x:T!=null?u.scale(T):null,y:j.y,payload:j.payload}}):N=C?f.scale(E):u.scale(E),{points:_,baseLine:N,isRange:A}}function zce(e){var t=xr(e,j3),n=nr();return v.createElement(hle,{id:t.id,type:"area"},r=>v.createElement(v.Fragment,null,v.createElement(cle,{legendPayload:Ace(t)}),v.createElement(Oce,{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}),v.createElement(xle,{type:"area",id:r,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:OQ(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),v.createElement(kce,rl({},t,{id:r}))))}var T3=v.memo(zce,SS);T3.displayName="Area";var $ce=["domain","range"],Bce=["domain","range"];function U2(e,t){if(e==null)return{};var n,r,i=Uce(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Uce(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function H2(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 M3(e,t){if(e===t)return!0;var{domain:n,range:r}=e,i=U2(e,$ce),{domain:l,range:s}=t,u=U2(t,Bce);return!H2(n,l)||!H2(r,s)?!1:SS(i,u)}var Hce=["dangerouslySetInnerHTML","ticks"],qce=["id"];function Yx(){return Yx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yx.apply(null,arguments)}function q2(e,t){if(e==null)return{};var n,r,i=Fce(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Fce(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Kce(e){var t=un(),n=v.useRef(null);return v.useLayoutEffect(()=>{n.current===null?t(Ple(e)):n.current!==e&&t(kle({prev:n.current,next:e})),n.current=e},[e,t]),v.useLayoutEffect(()=>()=>{n.current&&(t(Ile(n.current)),n.current=null)},[t]),null}var Vce=e=>{var{xAxisId:t,className:n}=e,r=je(mI),i=nr(),l="xAxis",s=je(C=>cc(C,l,t,i)),u=je(C=>w5(C,l,t,i)),f=je(C=>Mre(C,t)),h=je(C=>Lre(C,t)),p=je(C=>UL(C,t));if(f==null||h==null||p==null)return null;var{dangerouslySetInnerHTML:m,ticks:b}=e,x=q2(e,Hce),{id:S}=p,E=q2(p,qce);return v.createElement(AS,Yx({},x,E,{scale:s,x:h.x,y:h.y,width:f.width,height:f.height,className:ht("recharts-".concat(l," ").concat(l),n),viewBox:r,ticks:u,axisType:l}))},Gce={allowDataOverflow:ln.allowDataOverflow,allowDecimals:ln.allowDecimals,allowDuplicatedCategory:ln.allowDuplicatedCategory,angle:ln.angle,axisLine:hi.axisLine,height:ln.height,hide:!1,includeHidden:ln.includeHidden,interval:ln.interval,minTickGap:ln.minTickGap,mirror:ln.mirror,orientation:ln.orientation,padding:ln.padding,reversed:ln.reversed,scale:ln.scale,tick:ln.tick,tickCount:ln.tickCount,tickLine:hi.tickLine,tickSize:hi.tickSize,type:ln.type,xAxisId:0},Yce=e=>{var t=xr(e,Gce);return v.createElement(v.Fragment,null,v.createElement(Kce,{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}),v.createElement(Vce,t))},R3=v.memo(Yce,M3);R3.displayName="XAxis";var Wce=["dangerouslySetInnerHTML","ticks"],Xce=["id"];function Wx(){return Wx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wx.apply(null,arguments)}function F2(e,t){if(e==null)return{};var n,r,i=Qce(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Qce(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Zce(e){var t=un(),n=v.useRef(null);return v.useLayoutEffect(()=>{n.current===null?t(Lle(e)):n.current!==e&&t(zle({prev:n.current,next:e})),n.current=e},[e,t]),v.useLayoutEffect(()=>()=>{n.current&&(t($le(n.current)),n.current=null)},[t]),null}var Jce=e=>{var{yAxisId:t,className:n,width:r,label:i}=e,l=v.useRef(null),s=v.useRef(null),u=je(mI),f=nr(),h=un(),p="yAxis",m=je(T=>cc(T,p,t,f)),b=je(T=>Bre(T,t)),x=je(T=>$re(T,t)),S=je(T=>w5(T,p,t,f)),E=je(T=>HL(T,t));if(v.useLayoutEffect(()=>{if(!(r!=="auto"||!b||xS(i)||v.isValidElement(i)||E==null)){var T=l.current;if(T){var k=T.getCalculatedWidth();Math.round(b.width)!==Math.round(k)&&h(Ble({id:t,width:k}))}}},[S,b,h,i,t,r,E]),b==null||x==null||E==null)return null;var{dangerouslySetInnerHTML:C,ticks:A}=e,_=F2(e,Wce),{id:N}=E,j=F2(E,Xce);return v.createElement(AS,Wx({},_,j,{ref:l,labelRef:s,scale:m,x:x.x,y:x.y,tickTextProps:r==="auto"?{width:void 0}:{width:r},width:b.width,height:b.height,className:ht("recharts-".concat(p," ").concat(p),n),viewBox:u,ticks:S,axisType:p}))},eue={allowDataOverflow:sn.allowDataOverflow,allowDecimals:sn.allowDecimals,allowDuplicatedCategory:sn.allowDuplicatedCategory,angle:sn.angle,axisLine:hi.axisLine,hide:!1,includeHidden:sn.includeHidden,interval:sn.interval,minTickGap:sn.minTickGap,mirror:sn.mirror,orientation:sn.orientation,padding:sn.padding,reversed:sn.reversed,scale:sn.scale,tick:sn.tick,tickCount:sn.tickCount,tickLine:hi.tickLine,tickSize:hi.tickSize,type:sn.type,width:sn.width,yAxisId:0},tue=e=>{var t=xr(e,eue);return v.createElement(v.Fragment,null,v.createElement(Zce,{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}),v.createElement(Jce,t))},D3=v.memo(tue,M3);D3.displayName="YAxis";var nue=(e,t)=>t,OS=oe([nue,pt,$L,Zt,z5,Ti,eie,Cn],lie),NS=e=>{var t=e.currentTarget.getBoundingClientRect(),n=t.width/e.currentTarget.offsetWidth,r=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/n),chartY:Math.round((e.clientY-t.top)/r)}},P3=Hr("mouseClick"),k3=vf();k3.startListening({actionCreator:P3,effect:(e,t)=>{var n=e.payload,r=OS(t.getState(),NS(n));r?.activeIndex!=null&&t.dispatch(Jre({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var Xx=Hr("mouseMove"),I3=vf(),bh=null;I3.startListening({actionCreator:Xx,effect:(e,t)=>{var n=e.payload;bh!==null&&cancelAnimationFrame(bh);var r=NS(n);bh=requestAnimationFrame(()=>{var i=t.getState(),l=cS(i,i.tooltip.settings.shared);if(l==="axis"){var s=OS(i,r);s?.activeIndex!=null?t.dispatch(T5({activeIndex:s.activeIndex,activeDataKey:void 0,activeCoordinate:s.activeCoordinate})):t.dispatch(j5())}bh=null})}});var K2={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},L3=tr({name:"rootProps",initialState:K2,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(n=t.payload.barGap)!==null&&n!==void 0?n:K2.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}}}),rue=L3.reducer,{updateOptions:aue}=L3.actions,z3=tr({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:Bhe}=z3.actions,iue=z3.reducer,$3=Hr("keyDown"),B3=Hr("focus"),_S=vf();_S.startListening({actionCreator:$3,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip,l=e.payload;if(!(l!=="ArrowRight"&&l!=="ArrowLeft"&&l!=="Enter")){var s=uS(i,fc(n),Of(n),Mf(n)),u=s==null?-1:Number(s);if(!(!Number.isFinite(u)||u<0)){var f=Ti(n);if(l==="Enter"){var h=Rp(n,"axis","hover",String(i.index));t.dispatch(Hx({active:!i.active,activeIndex:i.index,activeDataKey:i.dataKey,activeCoordinate:h}));return}var p=Fre(n),m=p==="left-to-right"?1:-1,b=l==="ArrowRight"?1:-1,x=u+b*m;if(!(f==null||x>=f.length||x<0)){var S=Rp(n,"axis","hover",String(x));t.dispatch(Hx({active:!0,activeIndex:x.toString(),activeDataKey:void 0,activeCoordinate:S}))}}}}}});_S.startListening({actionCreator:B3,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip;if(!i.active&&i.index==null){var l="0",s=Rp(n,"axis","hover",String(l));t.dispatch(Hx({activeDataKey:void 0,active:!0,activeIndex:l,activeCoordinate:s}))}}}});var kr=Hr("externalEvent"),U3=vf(),Sb=new Map;U3.startListening({actionCreator:kr,effect:(e,t)=>{var{handler:n,reactEvent:r}=e.payload;if(n!=null){r.persist();var i=r.type,l=Sb.get(i);l!==void 0&&cancelAnimationFrame(l);var s=requestAnimationFrame(()=>{try{var u=t.getState(),f={activeCoordinate:$ae(u),activeDataKey:Lae(u),activeIndex:Xu(u),activeLabel:U5(u),activeTooltipIndex:Xu(u),isTooltipActive:Bae(u)};n(f,r)}finally{Sb.delete(i)}});Sb.set(i,s)}}});var oue=oe([uc],e=>e.tooltipItemPayloads),lue=oe([oue,jf,(e,t,n)=>t,(e,t,n)=>n],(e,t,n,r)=>{var i=e.find(u=>u.settings.dataKey===r);if(i!=null){var{positions:l}=i;if(l!=null){var s=t(l,n);return s}}}),H3=Hr("touchMove"),q3=vf();q3.startListening({actionCreator:H3,effect:(e,t)=>{var n=e.payload;if(!(n.touches==null||n.touches.length===0)){var r=t.getState(),i=cS(r,r.tooltip.settings.shared);if(i==="axis"){var l=OS(r,NS({clientX:n.touches[0].clientX,clientY:n.touches[0].clientY,currentTarget:n.currentTarget}));l?.activeIndex!=null&&t.dispatch(T5({activeIndex:l.activeIndex,activeDataKey:void 0,activeCoordinate:l.activeCoordinate}))}else if(i==="item"){var s,u=n.touches[0];if(document.elementFromPoint==null)return;var f=document.elementFromPoint(u.clientX,u.clientY);if(!f||!f.getAttribute)return;var h=f.getAttribute(DQ),p=(s=f.getAttribute(PQ))!==null&&s!==void 0?s:void 0,m=lue(t.getState(),h,p);t.dispatch(Zre({activeDataKey:p,activeIndex:h,activeCoordinate:m}))}}}});var sue=Ik({brush:bse,cartesianAxis:Ule,chartData:$ie,errorBars:Xle,graphicalItems:yle,layout:vQ,legend:NZ,options:Pie,polarAxis:lle,polarOptions:iue,referenceElements:Ose,rootProps:rue,tooltip:eae,zIndex:wie}),cue=function(t){return UX({reducer:sue,preloadedState:t,middleware:n=>{var r;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((r="es6")!==null&&r!==void 0?r:"")}).concat([k3.middleware,I3.middleware,_S.middleware,U3.middleware,q3.middleware])},enhancers:n=>{var r=n;return typeof n=="function"&&(r=n()),r.concat(Qk({type:"raf"}))},devTools:rc.devToolsEnabled})};function uue(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,i=nr(),l=v.useRef(null);if(i)return n;l.current==null&&(l.current=cue(t));var s=s1;return v.createElement(mse,{context:s,store:l.current},n)}function fue(e){var{layout:t,margin:n}=e,r=un(),i=nr();return v.useEffect(()=>{i||(r(hQ(t)),r(dQ(n)))},[r,i,t,n]),null}var due=v.memo(fue,SS);function hue(e){var t=un();return v.useEffect(()=>{t(aue(e))},[t,e]),null}function V2(e){var{zIndex:t,isPanorama:n}=e,r=n?"recharts-zindex-panorama-":"recharts-zindex-",i=h3("".concat(r).concat(t)),l=un();return v.useLayoutEffect(()=>(l(bie({zIndex:t,elementId:i,isPanorama:n})),()=>{l(xie({zIndex:t,isPanorama:n}))}),[l,t,i,n]),v.createElement("g",{tabIndex:-1,id:i})}function G2(e){var{children:t,isPanorama:n}=e,r=je(cie);if(!r||r.length===0)return t;var i=r.filter(s=>s<0),l=r.filter(s=>s>0);return v.createElement(v.Fragment,null,i.map(s=>v.createElement(V2,{key:s,zIndex:s,isPanorama:n})),t,l.map(s=>v.createElement(V2,{key:s,zIndex:s,isPanorama:n})))}var pue=["children"];function mue(e,t){if(e==null)return{};var n,r,i=vue(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function vue(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function zp(){return zp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zp.apply(null,arguments)}var gue={width:"100%",height:"100%",display:"block"},yue=v.forwardRef((e,t)=>{var n=wI(),r=SI(),i=TI();if(!ja(n)||!ja(r))return null;var{children:l,otherAttributes:s,title:u,desc:f}=e,h,p;return s!=null&&(typeof s.tabIndex=="number"?h=s.tabIndex:h=i?0:void 0,typeof s.role=="string"?p=s.role:p=i?"application":void 0),v.createElement(rk,zp({},s,{title:u,desc:f,role:p,tabIndex:h,width:n,height:r,style:gue,ref:t}),l)}),bue=e=>{var{children:t}=e,n=je(Lm);if(!n)return null;var{width:r,height:i,y:l,x:s}=n;return v.createElement(rk,{width:r,height:i,x:s,y:l},t)},Y2=v.forwardRef((e,t)=>{var{children:n}=e,r=mue(e,pue),i=nr();return i?v.createElement(bue,null,v.createElement(G2,{isPanorama:!0},n)):v.createElement(yue,zp({ref:t},r),v.createElement(G2,{isPanorama:!1},n))});function xue(){var e=un(),[t,n]=v.useState(null),r=je(RQ);return v.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),l=i.width/t.offsetWidth;Tt(l)&&l!==r&&e(mQ(l))}},[t,e,r]),n}function W2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function wue(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?W2(Object(n),!0).forEach(function(r){Sue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sue(e,t,n){return(t=Eue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Eue(e){var t=Cue(e,"string");return typeof t=="symbol"?t:t+""}function Cue(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pl(){return pl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pl.apply(null,arguments)}var Aue=()=>(Yie(),null);function $p(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var Oue=v.forwardRef((e,t)=>{var n,r,i=v.useRef(null),[l,s]=v.useState({containerWidth:$p((n=e.style)===null||n===void 0?void 0:n.width),containerHeight:$p((r=e.style)===null||r===void 0?void 0:r.height)}),u=v.useCallback((h,p)=>{s(m=>{var b=Math.round(h),x=Math.round(p);return m.containerWidth===b&&m.containerHeight===x?m:{containerWidth:b,containerHeight:x}})},[]),f=v.useCallback(h=>{if(typeof t=="function"&&t(h),h!=null&&typeof ResizeObserver<"u"){var{width:p,height:m}=h.getBoundingClientRect();u(p,m);var b=S=>{var{width:E,height:C}=S[0].contentRect;u(E,C)},x=new ResizeObserver(b);x.observe(h),i.current=x}},[t,u]);return v.useEffect(()=>()=>{var h=i.current;h?.disconnect()},[u]),v.createElement(v.Fragment,null,v.createElement($m,{width:l.containerWidth,height:l.containerHeight}),v.createElement("div",pl({ref:f},e)))}),Nue=v.forwardRef((e,t)=>{var{width:n,height:r}=e,[i,l]=v.useState({containerWidth:$p(n),containerHeight:$p(r)}),s=v.useCallback((f,h)=>{l(p=>{var m=Math.round(f),b=Math.round(h);return p.containerWidth===m&&p.containerHeight===b?p:{containerWidth:m,containerHeight:b}})},[]),u=v.useCallback(f=>{if(typeof t=="function"&&t(f),f!=null){var{width:h,height:p}=f.getBoundingClientRect();s(h,p)}},[t,s]);return v.createElement(v.Fragment,null,v.createElement($m,{width:i.containerWidth,height:i.containerHeight}),v.createElement("div",pl({ref:u},e)))}),_ue=v.forwardRef((e,t)=>{var{width:n,height:r}=e;return v.createElement(v.Fragment,null,v.createElement($m,{width:n,height:r}),v.createElement("div",pl({ref:t},e)))}),jue=v.forwardRef((e,t)=>{var{width:n,height:r}=e;return yi(n)||yi(r)?v.createElement(Nue,pl({},e,{ref:t})):v.createElement(_ue,pl({},e,{ref:t}))});function Tue(e){return e===!0?Oue:jue}var Mue=v.forwardRef((e,t)=>{var{children:n,className:r,height:i,onClick:l,onContextMenu:s,onDoubleClick:u,onMouseDown:f,onMouseEnter:h,onMouseLeave:p,onMouseMove:m,onMouseUp:b,onTouchEnd:x,onTouchMove:S,onTouchStart:E,style:C,width:A,responsive:_,dispatchTouchEvents:N=!0}=e,j=v.useRef(null),T=un(),[k,R]=v.useState(null),[D,B]=v.useState(null),Q=xue(),F=g1(),G=F?.width>0?F.width:A,te=F?.height>0?F.height:i,ce=v.useCallback(V=>{Q(V),typeof t=="function"&&t(V),R(V),B(V),V!=null&&(j.current=V)},[Q,t,R,B]),he=v.useCallback(V=>{T(P3(V)),T(kr({handler:l,reactEvent:V}))},[T,l]),I=v.useCallback(V=>{T(Xx(V)),T(kr({handler:h,reactEvent:V}))},[T,h]),q=v.useCallback(V=>{T(j5()),T(kr({handler:p,reactEvent:V}))},[T,p]),H=v.useCallback(V=>{T(Xx(V)),T(kr({handler:m,reactEvent:V}))},[T,m]),X=v.useCallback(()=>{T(B3())},[T]),ge=v.useCallback(V=>{T($3(V.key))},[T]),L=v.useCallback(V=>{T(kr({handler:s,reactEvent:V}))},[T,s]),z=v.useCallback(V=>{T(kr({handler:u,reactEvent:V}))},[T,u]),P=v.useCallback(V=>{T(kr({handler:f,reactEvent:V}))},[T,f]),W=v.useCallback(V=>{T(kr({handler:b,reactEvent:V}))},[T,b]),ne=v.useCallback(V=>{T(kr({handler:E,reactEvent:V}))},[T,E]),se=v.useCallback(V=>{N&&T(H3(V)),T(kr({handler:S,reactEvent:V}))},[T,N,S]),Y=v.useCallback(V=>{T(kr({handler:x,reactEvent:V}))},[T,x]),pe=Tue(_);return v.createElement(W5.Provider,{value:k},v.createElement(KY.Provider,{value:D},v.createElement(pe,{width:G??C?.width,height:te??C?.height,className:ht("recharts-wrapper",r),style:wue({position:"relative",cursor:"default",width:G,height:te},C),onClick:he,onContextMenu:L,onDoubleClick:z,onFocus:X,onKeyDown:ge,onMouseDown:P,onMouseEnter:I,onMouseLeave:q,onMouseMove:H,onMouseUp:W,onTouchEnd:Y,onTouchMove:se,onTouchStart:ne,ref:ce},v.createElement(Aue,null),n)))}),Rue=["width","height","responsive","children","className","style","compact","title","desc"];function Due(e,t){if(e==null)return{};var n,r,i=Pue(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Pue(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var kue=v.forwardRef((e,t)=>{var{width:n,height:r,responsive:i,children:l,className:s,style:u,compact:f,title:h,desc:p}=e,m=Due(e,Rue),b=sa(m);return f?v.createElement(v.Fragment,null,v.createElement($m,{width:n,height:r}),v.createElement(Y2,{otherAttributes:b,title:h,desc:p},l)):v.createElement(Mue,{className:s,style:u,width:n,height:r,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},v.createElement(Y2,{otherAttributes:b,title:h,desc:p,ref:t},v.createElement(_se,null,l)))});function Qx(){return Qx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qx.apply(null,arguments)}var Iue={top:5,right:5,bottom:5,left:5},Lue={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:Iue,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},zue=v.forwardRef(function(t,n){var r,i=xr(t.categoricalChartProps,Lue),{chartName:l,defaultTooltipEventType:s,validateTooltipEventTypes:u,tooltipPayloadSearcher:f,categoricalChartProps:h}=t,p={chartName:l,defaultTooltipEventType:s,validateTooltipEventTypes:u,tooltipPayloadSearcher:f,eventEmitter:void 0};return v.createElement(uue,{preloadedState:{options:p},reduxStoreName:(r=h.id)!==null&&r!==void 0?r:l},v.createElement(yse,{chartData:h.data}),v.createElement(due,{layout:i.layout,margin:i.margin}),v.createElement(hue,{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}),v.createElement(kue,Qx({},i,{ref:n})))}),$ue=["axis"],Bue=v.forwardRef((e,t)=>v.createElement(zue,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:$ue,tooltipPayloadSearcher:Rie,categoricalChartProps:e,ref:t}));const Uue={light:"",dark:".dark"},F3=v.createContext(null);function K3(){const e=v.useContext(F3);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const V3=v.forwardRef(({id:e,className:t,children:n,config:r,...i},l)=>{const s=v.useId(),u=`chart-${e||s.replace(/:/g,"")}`;return g.jsx(F3.Provider,{value:{config:r},children:g.jsxs("div",{"data-chart":u,ref:l,className:fe("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",t),...i,children:[g.jsx(Hue,{id:u,config:r}),g.jsx(sZ,{children:n})]})})});V3.displayName="Chart";const Hue=({id:e,config:t})=>{const n=Object.entries(t).filter(([,r])=>r.theme||r.color);return n.length?g.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(Uue).map(([r,i])=>`
88
- ${i} [data-chart=${e}] {
89
- ${n.map(([l,s])=>{const u=s.theme?.[r]||s.color;return u?` --color-${l}: ${u};`:null}).join(`
90
- `)}
91
- }
92
- `).join(`
93
- `)}}):null},que=noe,G3=v.forwardRef(({active:e,payload:t,className:n,indicator:r="dot",hideLabel:i=!1,hideIndicator:l=!1,label:s,labelFormatter:u,labelClassName:f,formatter:h,color:p,nameKey:m,labelKey:b},x)=>{const{config:S}=K3(),E=v.useMemo(()=>{if(i||!t?.length)return null;const[A]=t,_=`${b||A.dataKey||A.name||"value"}`,N=Zx(S,A,_),j=!b&&typeof s=="string"?S[s]?.label||s:N?.label;return u?g.jsx("div",{className:fe("font-medium",f),children:u(j,t)}):j?g.jsx("div",{className:fe("font-medium",f),children:j}):null},[s,u,t,i,f,S,b]);if(!e||!t?.length)return null;const C=t.length===1&&r!=="dot";return g.jsxs("div",{ref:x,className:fe("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",n),children:[C?null:E,g.jsx("div",{className:"grid gap-1.5",children:t.map((A,_)=>{const N=`${m||A.name||A.dataKey||"value"}`,j=Zx(S,A,N),T=p||A.payload.fill||A.color;return g.jsx("div",{className:fe("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",r==="dot"&&"items-center"),children:h&&A?.value!==void 0&&A.name?h(A.value,A.name,A,_,A.payload):g.jsxs(g.Fragment,{children:[j?.icon?g.jsx(j.icon,{}):!l&&g.jsx("div",{className:fe("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":r==="dot","w-1":r==="line","w-0 border-[1.5px] border-dashed bg-transparent":r==="dashed","my-0.5":C&&r==="dashed"}),style:{"--color-bg":T,"--color-border":T}}),g.jsxs("div",{className:fe("flex flex-1 justify-between leading-none",C?"items-end":"items-center"),children:[g.jsxs("div",{className:"grid gap-1.5",children:[C?E:null,g.jsx("span",{className:"text-muted-foreground",children:j?.label||A.name})]}),A.value&&g.jsx("span",{className:"font-mono font-medium tabular-nums text-foreground",children:A.value.toLocaleString()})]})]})},A.dataKey)})})]})});G3.displayName="ChartTooltip";const Fue=v.forwardRef(({className:e,hideIcon:t=!1,payload:n,verticalAlign:r="bottom",nameKey:i},l)=>{const{config:s}=K3();return n?.length?g.jsx("div",{ref:l,className:fe("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",e),children:n.map(u=>{const f=`${i||u.dataKey||"value"}`,h=Zx(s,u,f);return g.jsxs("div",{className:fe("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),children:[h?.icon&&!t?g.jsx(h.icon,{}):g.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:u.color}}),h?.label]},u.value)})}):null});Fue.displayName="ChartLegend";function Zx(e,t,n){if(typeof t!="object"||t===null)return;const r="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0;let i=n;return n in t&&typeof t[n]=="string"?i=t[n]:r&&n in r&&typeof r[n]=="string"&&(i=r[n]),i in e?e[i]:e[n]}var Eb,av="HoverCard",[Y3]=Kr(av,[xo]),iv=xo(),[Kue,ov]=Y3(av),W3=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:l,openDelay:s=700,closeDelay:u=300}=e,f=iv(t),h=v.useRef(0),p=v.useRef(0),m=v.useRef(!1),b=v.useRef(!1),[x,S]=mi({prop:r,defaultProp:i??!1,onChange:l,caller:av}),E=v.useCallback(()=>{clearTimeout(p.current),h.current=window.setTimeout(()=>S(!0),s)},[s,S]),C=v.useCallback(()=>{clearTimeout(h.current),!m.current&&!b.current&&(p.current=window.setTimeout(()=>S(!1),u))},[u,S]),A=v.useCallback(()=>S(!1),[S]);return v.useEffect(()=>()=>{clearTimeout(h.current),clearTimeout(p.current)},[]),g.jsx(Kue,{scope:t,open:x,onOpenChange:S,onOpen:E,onClose:C,onDismiss:A,hasSelectionRef:m,isPointerDownOnContentRef:b,children:g.jsx(sm,{...f,children:n})})};W3.displayName=av;var X3="HoverCardTrigger",Q3=v.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,i=ov(X3,n),l=iv(n);return g.jsx(cm,{asChild:!0,...l,children:g.jsx(Te.a,{"data-state":i.open?"open":"closed",...r,ref:t,onPointerEnter:be(e.onPointerEnter,Up(i.onOpen)),onPointerLeave:be(e.onPointerLeave,Up(i.onClose)),onFocus:be(e.onFocus,i.onOpen),onBlur:be(e.onBlur,i.onClose),onTouchStart:be(e.onTouchStart,s=>s.preventDefault())})})});Q3.displayName=X3;var jS="HoverCardPortal",[Vue,Gue]=Y3(jS,{forceMount:void 0}),Z3=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:i}=e,l=ov(jS,t);return g.jsx(Vue,{scope:t,forceMount:n,children:g.jsx(Jn,{present:n||l.open,children:g.jsx(Zs,{asChild:!0,container:i,children:r})})})};Z3.displayName=jS;var Bp="HoverCardContent",J3=v.forwardRef((e,t)=>{const n=Gue(Bp,e.__scopeHoverCard),{forceMount:r=n.forceMount,...i}=e,l=ov(Bp,e.__scopeHoverCard);return g.jsx(Jn,{present:r||l.open,children:g.jsx(Yue,{"data-state":l.open?"open":"closed",...i,onPointerEnter:be(e.onPointerEnter,Up(l.onOpen)),onPointerLeave:be(e.onPointerLeave,Up(l.onClose)),ref:t})})});J3.displayName=Bp;var Yue=v.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:l,onInteractOutside:s,...u}=e,f=ov(Bp,n),h=iv(n),p=v.useRef(null),m=Ke(t,p),[b,x]=v.useState(!1);return v.useEffect(()=>{if(b){const S=document.body;return Eb=S.style.userSelect||S.style.webkitUserSelect,S.style.userSelect="none",S.style.webkitUserSelect="none",()=>{S.style.userSelect=Eb,S.style.webkitUserSelect=Eb}}},[b]),v.useEffect(()=>{if(p.current){const S=()=>{x(!1),f.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(f.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",S),()=>{document.removeEventListener("pointerup",S),f.hasSelectionRef.current=!1,f.isPointerDownOnContentRef.current=!1}}},[f.isPointerDownOnContentRef,f.hasSelectionRef]),v.useEffect(()=>{p.current&&Que(p.current).forEach(E=>E.setAttribute("tabindex","-1"))}),g.jsx(Qs,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:s,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:be(l,S=>{S.preventDefault()}),onDismiss:f.onDismiss,children:g.jsx(um,{...h,...u,onPointerDown:be(u.onPointerDown,S=>{S.currentTarget.contains(S.target)&&x(!0),f.hasSelectionRef.current=!1,f.isPointerDownOnContentRef.current=!0}),ref:m,style:{...u.style,userSelect:b?"text":void 0,WebkitUserSelect:b?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),Wue="HoverCardArrow",Xue=v.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,i=iv(n);return g.jsx(fm,{...i,...r,ref:t})});Xue.displayName=Wue;function Up(e){return t=>t.pointerType==="touch"?void 0:e()}function Que(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var Zue=W3,Jue=Q3,efe=Z3,ez=J3;const TS=Zue,MS=Jue,lv=v.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},i)=>g.jsx(efe,{children:g.jsx(ez,{ref:i,align:t,sideOffset:n,className:fe("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));lv.displayName=ez.displayName;function tfe(e,t=[]){let n=[];function r(l,s){const u=v.createContext(s);u.displayName=l+"Context";const f=n.length;n=[...n,s];const h=m=>{const{scope:b,children:x,...S}=m,E=b?.[e]?.[f]||u,C=v.useMemo(()=>S,Object.values(S));return g.jsx(E.Provider,{value:C,children:x})};h.displayName=l+"Provider";function p(m,b){const x=b?.[e]?.[f]||u,S=v.useContext(x);if(S)return S;if(s!==void 0)return s;throw new Error(`\`${m}\` must be used within \`${l}\``)}return[h,p]}const i=()=>{const l=n.map(s=>v.createContext(s));return function(u){const f=u?.[e]||l;return v.useMemo(()=>({[`__scope${e}`]:{...u,[e]:f}}),[u,f])}};return i.scopeName=e,[r,nfe(i,...t)]}function nfe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(l){const s=r.reduce((u,{useScope:f,scopeName:h})=>{const m=f(l)[`__scope${h}`];return{...u,...m}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var rfe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],tz=rfe.reduce((e,t)=>{const n=Vs(`Primitive.${t}`),r=v.forwardRef((i,l)=>{const{asChild:s,...u}=i,f=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(f,{...u,ref:l})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),RS="Progress",DS=100,[afe]=tfe(RS),[ife,ofe]=afe(RS),nz=v.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:l=lfe,...s}=e;(i||i===0)&&!X2(i)&&console.error(sfe(`${i}`,"Progress"));const u=X2(i)?i:DS;r!==null&&!Q2(r,u)&&console.error(cfe(`${r}`,"Progress"));const f=Q2(r,u)?r:null,h=Hp(f)?l(f,u):void 0;return g.jsx(ife,{scope:n,value:f,max:u,children:g.jsx(tz.div,{"aria-valuemax":u,"aria-valuemin":0,"aria-valuenow":Hp(f)?f:void 0,"aria-valuetext":h,role:"progressbar","data-state":iz(f,u),"data-value":f??void 0,"data-max":u,...s,ref:t})})});nz.displayName=RS;var rz="ProgressIndicator",az=v.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,i=ofe(rz,n);return g.jsx(tz.div,{"data-state":iz(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});az.displayName=rz;function lfe(e,t){return`${Math.round(e/t*100)}%`}function iz(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Hp(e){return typeof e=="number"}function X2(e){return Hp(e)&&!isNaN(e)&&e>0}function Q2(e,t){return Hp(e)&&!isNaN(e)&&e<=t&&e>=0}function sfe(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${DS}\`.`}function cfe(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
94
- - a positive number
95
- - less than the value passed to \`max\` (or ${DS} if no \`max\` prop is set)
96
- - \`null\` or \`undefined\` if the progress is indeterminate.
97
-
98
- Defaulting to \`null\`.`}var oz=nz,ufe=az;const PS=v.forwardRef(({className:e,value:t,...n},r)=>g.jsx(oz,{ref:r,className:fe("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:g.jsx(ufe,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));PS.displayName=oz.displayName;function ct({className:e,...t}){return g.jsx("div",{className:fe("animate-pulse rounded-md bg-primary/10",e),...t})}function ffe(){const e=new Date().getHours();return e<12?"Good morning":e<18?"Good afternoon":"Good evening"}function Z2(e){if(!e)return"Never";const t=new Date,n=new Date(e),r=t.getTime()-n.getTime(),i=Math.floor(r/6e4),l=Math.floor(r/36e5),s=Math.floor(r/864e5);return i<1?"Just now":i<60?`${i}m ago`:l<24?`${l}h ago`:s<7?`${s}d ago`:n.toLocaleDateString()}const dfe=[{date:"2024-01",calls:186},{date:"2024-02",calls:305},{date:"2024-03",calls:237},{date:"2024-04",calls:273},{date:"2024-05",calls:209},{date:"2024-06",calls:314}],hfe={calls:{label:"API Calls",color:"hsl(var(--primary))"}};function pfe(){const e=Ks(),{user:t}=ff(),{data:n,isLoading:r}=xm(),{data:i,isLoading:l}=Jw(),s=r||l,u=Array.isArray(n)?n:[],f=Array.isArray(i)?i:[],h=f.filter(j=>j.lastUsedAt),p=u.length>0,m=f.length>0,b=h.length>0,x=p&&m&&b,S=[{label:"Connect your first shop",done:p},{label:"Generate an API key",done:m},{label:"Make your first API call",done:b}],E=f.reduce((j,T)=>j+(T.lastUsedAt?1:0),0),C={used:E*100,limit:1e4,percentage:Math.min(E*100/1e4*100,100)},A=[{title:"Connected Shops",description:"Active Shopify stores",value:u.length,icon:js,href:"/shops",color:"text-blue-500",bgColor:"bg-blue-500/10",trend:u.length?`${u.filter(j=>j.status==="active").length} active`:"Connect a shop",trendUp:u.length>0},{title:"Active API Keys",description:"Valid MCP keys",value:f.length,icon:co,href:"/keys",color:"text-emerald-500",bgColor:"bg-emerald-500/10",trend:f.length?`${h.length} in use`:"Generate a key",trendUp:f.length>0},{title:"API Activity",description:"Recent usage",value:h.length,icon:mN,href:null,color:"text-amber-500",bgColor:"bg-amber-500/10",trend:h.length?"Keys active":"No activity yet",trendUp:h.length>0}],_=t?.name?.split(" ").map(j=>j[0]).join("").toUpperCase().slice(0,2)||"U",N=t?.name?.split(" ")[0]||"there";return g.jsxs("div",{className:"flex flex-col gap-6",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{className:"flex items-center gap-4",children:[g.jsx(Gh,{className:"h-14 w-14 border-2 border-primary/20",children:g.jsx(Yh,{className:"bg-primary/10 text-primary text-lg font-semibold",children:_})}),g.jsxs("div",{className:"space-y-1",children:[g.jsxs("h1",{className:"text-2xl font-bold tracking-tight",children:[ffe(),", ",N]}),g.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[g.jsxs("span",{className:"relative flex h-2 w-2",children:[g.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75"}),g.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-green-500"})]}),"All systems operational"]})]})]}),!x&&g.jsxs("div",{className:"hidden sm:flex items-center gap-2 text-sm",children:[g.jsx("span",{className:"text-muted-foreground",children:"Setup progress:"}),g.jsx("div",{className:"flex gap-1",children:S.map((j,T)=>g.jsx("div",{className:`h-2 w-8 rounded-full transition-colors ${j.done?"bg-primary":"bg-muted"}`},T))})]})]}),g.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3 stagger-fade-in",children:A.map((j,T)=>g.jsxs(ai,{className:`relative overflow-hidden transition-all duration-300 group ${j.href?"cursor-pointer hover:border-primary/50 hover:shadow-md":""}`,onClick:()=>j.href&&e(j.href),children:[g.jsxs(ii,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[g.jsx(oi,{className:"text-sm font-medium text-muted-foreground",children:j.title}),g.jsx("div",{className:`h-9 w-9 rounded-lg ${j.bgColor} flex items-center justify-center transition-transform group-hover:scale-110`,children:g.jsx(j.icon,{className:`h-4 w-4 ${j.color}`})})]}),g.jsx(li,{children:s?g.jsxs("div",{children:[g.jsx(ct,{className:"h-9 w-12"}),g.jsxs("div",{className:"flex items-center gap-1.5 mt-2",children:[g.jsx(ct,{className:"h-3.5 w-3.5 rounded-full"}),g.jsx(ct,{className:"h-4 w-24"})]})]}):g.jsxs("div",{className:"animate-fade-in",children:[g.jsx("div",{className:"text-3xl font-bold",children:j.value.toLocaleString()}),g.jsxs("div",{className:"flex items-center gap-1.5 mt-2",children:[j.trendUp?g.jsx(pN,{className:"h-3.5 w-3.5 text-green-500"}):g.jsx(_H,{className:"h-3.5 w-3.5 text-muted-foreground"}),g.jsx("p",{className:"text-xs text-muted-foreground",children:j.trend})]})]})}),j.href&&g.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-gradient-to-r from-transparent via-primary/50 to-transparent opacity-0 group-hover:opacity-100 transition-opacity"})]},j.title))}),g.jsxs("div",{className:"grid gap-4 lg:grid-cols-7",children:[g.jsxs(ai,{className:"lg:col-span-4",children:[g.jsxs(ii,{children:[g.jsx(oi,{children:"API Usage"}),g.jsx(fo,{children:"Your API call activity over the last 6 months"})]}),g.jsx(li,{children:g.jsx(V3,{config:hfe,className:"h-[200px] w-full",children:g.jsxs(Bue,{data:dfe,margin:{top:10,right:10,left:0,bottom:0},children:[g.jsx("defs",{children:g.jsxs("linearGradient",{id:"fillCalls",x1:"0",y1:"0",x2:"0",y2:"1",children:[g.jsx("stop",{offset:"5%",stopColor:"hsl(var(--primary))",stopOpacity:.8}),g.jsx("stop",{offset:"95%",stopColor:"hsl(var(--primary))",stopOpacity:.1})]})}),g.jsx(S3,{strokeDasharray:"3 3",vertical:!1}),g.jsx(R3,{dataKey:"date",tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:j=>new Date(j).toLocaleDateString("en-US",{month:"short"})}),g.jsx(D3,{tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:j=>`${j}`}),g.jsx(que,{content:g.jsx(G3,{labelFormatter:j=>new Date(j).toLocaleDateString("en-US",{month:"long",year:"numeric"})})}),g.jsx(T3,{type:"monotone",dataKey:"calls",stroke:"hsl(var(--primary))",fill:"url(#fillCalls)",strokeWidth:2})]})})})]}),g.jsxs(ai,{className:"lg:col-span-3",children:[g.jsxs(ii,{children:[g.jsx(oi,{children:"API Quota"}),g.jsx(fo,{children:"Monthly usage limits"})]}),g.jsxs(li,{className:"space-y-6",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsxs("div",{className:"flex items-center justify-between text-sm",children:[g.jsx("span",{className:"text-muted-foreground",children:"API Calls"}),g.jsxs("span",{className:"font-medium",children:[C.used.toLocaleString()," / ",C.limit.toLocaleString()]})]}),g.jsx(PS,{value:C.percentage,className:"h-2"}),g.jsx("p",{className:"text-xs text-muted-foreground",children:C.percentage<80?g.jsx("span",{className:"text-green-600",children:"Healthy usage"}):C.percentage<95?g.jsx("span",{className:"text-amber-600",children:"Approaching limit"}):g.jsx("span",{className:"text-red-600",children:"Near quota limit"})})]}),g.jsxs("div",{className:"space-y-3",children:[g.jsx("h4",{className:"text-sm font-medium",children:"Quick Actions"}),g.jsxs("div",{className:"grid gap-2",children:[g.jsxs(xt,{variant:"secondary",className:"justify-between h-auto py-3 px-4 group",onClick:()=>e("/shops"),children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("div",{className:"h-8 w-8 rounded-md bg-blue-500/10 flex items-center justify-center",children:g.jsx(js,{className:"h-4 w-4 text-blue-500"})}),g.jsxs("div",{className:"text-left",children:[g.jsx("div",{className:"font-medium",children:"Connect Shop"}),g.jsx("div",{className:"text-xs text-muted-foreground font-normal",children:"Add Shopify store"})]})]}),g.jsx(Wd,{className:"h-4 w-4 text-muted-foreground group-hover:translate-x-0.5 transition-transform"})]}),g.jsxs(xt,{variant:"secondary",className:"justify-between h-auto py-3 px-4 group",onClick:()=>e("/keys"),children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("div",{className:"h-8 w-8 rounded-md bg-emerald-500/10 flex items-center justify-center",children:g.jsx(co,{className:"h-4 w-4 text-emerald-500"})}),g.jsxs("div",{className:"text-left",children:[g.jsx("div",{className:"font-medium",children:"Generate Key"}),g.jsx("div",{className:"text-xs text-muted-foreground font-normal",children:"Create API key"})]})]}),g.jsx(Wd,{className:"h-4 w-4 text-muted-foreground group-hover:translate-x-0.5 transition-transform"})]})]})]})]})]})]}),g.jsxs(ai,{className:"animate-fade-in-up",style:{animationDelay:"200ms"},children:[g.jsxs(ii,{children:[g.jsx(oi,{children:x?"Recent Activity":"Get Started"}),g.jsx(fo,{children:x?"Your latest API key usage":"Complete these steps to start using Shopify MCP"})]}),g.jsx(li,{children:s?g.jsx("div",{className:"flex flex-col gap-1",children:[...Array(3)].map((j,T)=>g.jsxs("div",{className:"flex items-center gap-4 rounded-lg p-3 -mx-1",children:[g.jsx(ct,{className:"h-10 w-10 rounded-full shrink-0"}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(ct,{className:"h-5 w-28"}),g.jsx(ct,{className:"h-5 w-14 rounded-full"})]}),g.jsxs("div",{className:"flex items-center gap-1 mt-0.5",children:[g.jsx(ct,{className:"h-3 w-3 rounded-full"}),g.jsx(ct,{className:"h-4 w-32"})]})]}),g.jsx(ct,{className:"h-4 w-20 shrink-0"})]},T))}):x?f.length>0?g.jsxs("div",{className:"flex flex-col gap-1 stagger-fade-in",children:[f.slice(0,5).map((j,T)=>g.jsxs(TS,{children:[g.jsx(MS,{asChild:!0,children:g.jsxs("div",{className:"flex items-center gap-4 cursor-pointer hover:bg-muted/50 rounded-lg p-3 -mx-1 transition-colors",children:[g.jsxs("div",{className:"relative",children:[g.jsx("div",{className:`flex h-10 w-10 items-center justify-center rounded-full ${j.lastUsedAt?"bg-emerald-500/10":"bg-muted"}`,children:j.lastUsedAt?g.jsx(mN,{className:"h-4 w-4 text-emerald-500"}):g.jsx(co,{className:"h-4 w-4 text-muted-foreground"})}),j.lastUsedAt&&g.jsxs("span",{className:"absolute -top-0.5 -right-0.5 flex h-3 w-3",children:[g.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),g.jsx("span",{className:"relative inline-flex rounded-full h-3 w-3 bg-emerald-500"})]})]}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("p",{className:"text-sm font-medium truncate",children:j.name}),g.jsx(ga,{variant:j.lastUsedAt?"default":"secondary",className:"shrink-0",children:j.lastUsedAt?"Active":"Unused"})]}),g.jsxs("p",{className:"text-xs text-muted-foreground flex items-center gap-1 mt-0.5",children:[g.jsx(TH,{className:"h-3 w-3"}),j.lastUsedAt?`Last used ${Z2(j.lastUsedAt)}`:`Created ${Z2(j.createdAt)}`]})]}),g.jsx("span",{className:"font-mono text-xs text-muted-foreground shrink-0",children:j.keyHint})]})}),g.jsx(lv,{className:"w-80",children:g.jsxs("div",{className:"space-y-2",children:[g.jsx("h4",{className:"text-sm font-semibold",children:j.name}),g.jsx("p",{className:"text-sm text-muted-foreground",children:"API Key for MCP access"}),g.jsx(_u,{}),g.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[g.jsxs("div",{children:[g.jsx("p",{className:"text-muted-foreground",children:"Created"}),g.jsx("p",{className:"font-medium",children:new Date(j.createdAt).toLocaleDateString()})]}),g.jsxs("div",{children:[g.jsx("p",{className:"text-muted-foreground",children:"Last used"}),g.jsx("p",{className:"font-medium",children:j.lastUsedAt?new Date(j.lastUsedAt).toLocaleDateString():"Never"})]})]})]})})]},j.id)),f.length>5&&g.jsxs(xt,{variant:"ghost",className:"w-full mt-2 text-muted-foreground",onClick:()=>e("/keys"),children:["View all ",f.length," keys",g.jsx(Wd,{className:"h-4 w-4 ml-1"})]})]}):g.jsxs("div",{className:"text-center py-8",children:[g.jsx("div",{className:"mx-auto flex h-14 w-14 items-center justify-center rounded-full bg-muted",children:g.jsx(co,{className:"h-6 w-6 text-muted-foreground"})}),g.jsx("h3",{className:"mt-4 text-base font-semibold",children:"No API keys yet"}),g.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Generate your first API key to get started"}),g.jsxs(xt,{size:"lg",className:"mt-6",onClick:()=>e("/keys"),children:[g.jsx(ol,{}),"Generate Key"]})]}):g.jsxs("div",{className:"space-y-4",children:[S.map((j,T)=>g.jsxs("div",{className:`flex items-center gap-4 p-4 rounded-lg border transition-colors ${j.done?"bg-primary/5 border-primary/20":"bg-muted/30 border-transparent hover:border-muted"}`,children:[g.jsx("div",{className:`flex h-8 w-8 items-center justify-center rounded-full ${j.done?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"}`,children:j.done?g.jsx(pN,{className:"h-4 w-4"}):g.jsx("span",{className:"text-sm font-semibold",children:T+1})}),g.jsx("div",{className:"flex-1",children:g.jsx("p",{className:`text-sm font-medium ${j.done?"text-primary":""}`,children:j.label})}),!j.done&&T===S.findIndex(k=>!k.done)&&g.jsxs(xt,{size:"sm",onClick:()=>e(T===0?"/shops":"/keys"),children:["Start",g.jsx(Wd,{className:"h-3 w-3 ml-1"})]})]},T)),g.jsx(_u,{className:"my-4"}),g.jsxs("div",{className:"text-center text-sm text-muted-foreground",children:[g.jsx("p",{children:"Need help getting started?"}),g.jsx("a",{href:"https://github.com/AntonAndrusenko/shopify-mcp-admin#readme",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"View documentation →"})]})]})})]})]})}var mfe=Symbol("radix.slottable");function vfe(e){const t=({children:n})=>g.jsx(g.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=mfe,t}var lz="AlertDialog",[gfe]=Kr(lz,[pR]),Ri=pR(),sz=e=>{const{__scopeAlertDialog:t,...n}=e,r=Ri(t);return g.jsx(nf,{...r,...n,modal:!0})};sz.displayName=lz;var yfe="AlertDialogTrigger",bfe=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ri(n);return g.jsx(k7,{...i,...r,ref:t})});bfe.displayName=yfe;var xfe="AlertDialogPortal",cz=e=>{const{__scopeAlertDialog:t,...n}=e,r=Ri(t);return g.jsx(rf,{...r,...n})};cz.displayName=xfe;var wfe="AlertDialogOverlay",uz=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ri(n);return g.jsx(bl,{...i,...r,ref:t})});uz.displayName=wfe;var _s="AlertDialogContent",[Sfe,Efe]=gfe(_s),Cfe=vfe("AlertDialogContent"),fz=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,l=Ri(n),s=v.useRef(null),u=Ke(t,s),f=v.useRef(null);return g.jsx(M7,{contentName:_s,titleName:dz,docsSlug:"alert-dialog",children:g.jsx(Sfe,{scope:n,cancelRef:f,children:g.jsxs(xl,{role:"alertdialog",...l,...i,ref:u,onOpenAutoFocus:be(i.onOpenAutoFocus,h=>{h.preventDefault(),f.current?.focus({preventScroll:!0})}),onPointerDownOutside:h=>h.preventDefault(),onInteractOutside:h=>h.preventDefault(),children:[g.jsx(Cfe,{children:r}),g.jsx(Ofe,{contentRef:s})]})})})});fz.displayName=_s;var dz="AlertDialogTitle",hz=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ri(n);return g.jsx(Js,{...i,...r,ref:t})});hz.displayName=dz;var pz="AlertDialogDescription",mz=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ri(n);return g.jsx(ec,{...i,...r,ref:t})});mz.displayName=pz;var Afe="AlertDialogAction",vz=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Ri(n);return g.jsx(rm,{...i,...r,ref:t})});vz.displayName=Afe;var gz="AlertDialogCancel",yz=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=Efe(gz,n),l=Ri(n),s=Ke(t,i);return g.jsx(rm,{...l,...r,ref:s})});yz.displayName=gz;var Ofe=({contentRef:e})=>{const t=`\`${_s}\` requires a description for the component to be accessible for screen reader users.
99
-
100
- You can add a description to the \`${_s}\` by passing a \`${pz}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
101
-
102
- Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${_s}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
103
-
104
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return v.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},Nfe=sz,_fe=cz,bz=uz,xz=fz,wz=vz,Sz=yz,Ez=hz,Cz=mz;const jfe=Nfe,Tfe=_fe,Az=v.forwardRef(({className:e,...t},n)=>g.jsx(bz,{className:fe("fixed inset-0 z-50 dialog-overlay-enhanced",e),...t,ref:n}));Az.displayName=bz.displayName;const Oz=v.forwardRef(({className:e,...t},n)=>g.jsxs(Tfe,{children:[g.jsx(Az,{}),g.jsx(xz,{ref:n,className:fe("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 sm:rounded-lg dialog-content-enhanced dialog-shadow-enhanced",e),...t})]}));Oz.displayName=xz.displayName;const Nz=({className:e,...t})=>g.jsx("div",{className:fe("flex flex-col space-y-2 text-center sm:text-left",e),...t});Nz.displayName="AlertDialogHeader";const _z=({className:e,...t})=>g.jsx("div",{className:fe("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});_z.displayName="AlertDialogFooter";const jz=v.forwardRef(({className:e,...t},n)=>g.jsx(Ez,{ref:n,className:fe("text-lg font-semibold",e),...t}));jz.displayName=Ez.displayName;const Tz=v.forwardRef(({className:e,...t},n)=>g.jsx(Cz,{ref:n,className:fe("text-sm text-muted-foreground",e),...t}));Tz.displayName=Cz.displayName;const Mz=v.forwardRef(({className:e,...t},n)=>g.jsx(wz,{ref:n,className:fe(Zp(),"cursor-pointer",e),...t}));Mz.displayName=wz.displayName;const Rz=v.forwardRef(({className:e,...t},n)=>g.jsx(Sz,{ref:n,className:fe(Zp({variant:"outline"}),"mt-2 sm:mt-0 cursor-pointer",e),...t}));Rz.displayName=Sz.displayName;function Dz({open:e,onOpenChange:t,title:n,description:r,onConfirm:i,confirmLabel:l="Confirm",variant:s="default",isLoading:u=!1}){return g.jsx(jfe,{open:e,onOpenChange:t,children:g.jsxs(Oz,{children:[g.jsxs(Nz,{children:[g.jsx(jz,{children:n}),g.jsx(Tz,{children:r})]}),g.jsxs(_z,{children:[g.jsx(Rz,{disabled:u,children:"Cancel"}),g.jsx(Mz,{onClick:f=>{f.preventDefault(),i()},disabled:u,className:fe(s==="destructive"&&Zp({variant:"destructive"})),children:u?g.jsxs(g.Fragment,{children:[g.jsx(fi,{size:"sm"}),"Processing..."]}):l})]})]})})}function Mfe(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const Pz=ee.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Df=()=>{const e=ee.useContext(Pz);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};Mfe(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
105
- [data-state=closed]
106
- ){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function Rfe(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function Dfe(){return kS(/^Mac/)}function Pfe(){return kS(/^iPhone/)}function J2(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function kfe(){return kS(/^iPad/)||Dfe()&&navigator.maxTouchPoints>1}function kz(){return Pfe()||kfe()}function kS(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const Ife=24,Lfe=typeof window<"u"?v.useLayoutEffect:v.useEffect;function eM(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const Cb=typeof document<"u"&&window.visualViewport;function tM(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function Iz(e){for(tM(e)&&(e=e.parentElement);e&&!tM(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const zfe=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let xh=0,Ab;function $fe(e={}){let{isDisabled:t}=e;Lfe(()=>{if(!t)return xh++,xh===1&&kz()&&(Ab=Bfe()),()=>{xh--,xh===0&&Ab?.()}},[t])}function Bfe(){let e,t=0,n=m=>{e=Iz(m.target),!(e===document.documentElement&&e===document.body)&&(t=m.changedTouches[0].pageY)},r=m=>{if(!e||e===document.documentElement||e===document.body){m.preventDefault();return}let b=m.changedTouches[0].pageY,x=e.scrollTop,S=e.scrollHeight-e.clientHeight;S!==0&&((x<=0&&b>t||x>=S&&b<t)&&m.preventDefault(),t=b)},i=m=>{let b=m.target;Jx(b)&&b!==document.activeElement&&(m.preventDefault(),b.style.transform="translateY(-2000px)",b.focus(),requestAnimationFrame(()=>{b.style.transform=""}))},l=m=>{let b=m.target;Jx(b)&&(b.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{b.style.transform="",Cb&&(Cb.height<window.innerHeight?requestAnimationFrame(()=>{nM(b)}):Cb.addEventListener("resize",()=>nM(b),{once:!0}))}))},s=()=>{window.scrollTo(0,0)},u=window.pageXOffset,f=window.pageYOffset,h=eM(Ufe(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let p=eM(mu(document,"touchstart",n,{passive:!1,capture:!0}),mu(document,"touchmove",r,{passive:!1,capture:!0}),mu(document,"touchend",i,{passive:!1,capture:!0}),mu(document,"focus",l,!0),mu(window,"scroll",s));return()=>{h(),p(),window.scrollTo(u,f)}}function Ufe(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function mu(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function nM(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=Iz(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,i=e.getBoundingClientRect().top,l=e.getBoundingClientRect().bottom;const s=n.getBoundingClientRect().bottom+Ife;l>s&&(n.scrollTop+=i-r)}e=n.parentElement}}function Jx(e){return e instanceof HTMLInputElement&&!zfe.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function Hfe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function qfe(...e){return t=>e.forEach(n=>Hfe(n,t))}function Lz(...e){return v.useCallback(qfe(...e),e)}const zz=new WeakMap;function Vt(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([i,l])=>{if(i.startsWith("--")){e.style.setProperty(i,l);return}r[i]=e.style[i],e.style[i]=l}),!n&&zz.set(e,r)}function Ffe(e,t){if(!e||!(e instanceof HTMLElement))return;let n=zz.get(e);n&&(e.style[t]=n[t])}const zt=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function wh(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let i=r.match(/^matrix3d\((.+)\)$/);return i?parseFloat(i[1].split(", ")[zt(t)?13:12]):(i=r.match(/^matrix\((.+)\)$/),i?parseFloat(i[1].split(", ")[zt(t)?5:4]):null)}function Kfe(e){return 8*(Math.log(e+1)-2)}function Ob(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function Vfe(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const At={DURATION:.5,EASE:[.32,.72,0,1]},$z=.4,Gfe=.25,Yfe=100,Bz=8,Ko=16,ew=26,Nb="vaul-dragging";function Uz(e){const t=ee.useRef(e);return ee.useEffect(()=>{t.current=e}),ee.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function Wfe({defaultProp:e,onChange:t}){const n=ee.useState(e),[r]=n,i=ee.useRef(r),l=Uz(t);return ee.useEffect(()=>{i.current!==r&&(l(r),i.current=r)},[r,i,l]),n}function Hz({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Wfe({defaultProp:t,onChange:n}),l=e!==void 0,s=l?e:r,u=Uz(n),f=ee.useCallback(h=>{if(l){const m=typeof h=="function"?h(e):h;m!==e&&u(m)}else i(h)},[l,e,i,u]);return[s,f]}function Xfe({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:i,fadeFromIndex:l,onSnapPointChange:s,direction:u="bottom",container:f,snapToSequentialPoint:h}){const[p,m]=Hz({prop:e,defaultProp:n?.[0],onChange:t}),[b,x]=ee.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);ee.useEffect(()=>{function R(){x({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",R),()=>window.removeEventListener("resize",R)},[]);const S=ee.useMemo(()=>p===n?.[n.length-1]||null,[n,p]),E=ee.useMemo(()=>{var R;return(R=n?.findIndex(D=>D===p))!=null?R:null},[n,p]),C=n&&n.length>0&&(l||l===0)&&!Number.isNaN(l)&&n[l]===p||!n,A=ee.useMemo(()=>{const R=f?{width:f.getBoundingClientRect().width,height:f.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var D;return(D=n?.map(B=>{const Q=typeof B=="string";let F=0;if(Q&&(F=parseInt(B,10)),zt(u)){const te=Q?F:b?B*R.height:0;return b?u==="bottom"?R.height-te:-R.height+te:te}const G=Q?F:b?B*R.width:0;return b?u==="right"?R.width-G:-R.width+G:G}))!=null?D:[]},[n,b,f]),_=ee.useMemo(()=>E!==null?A?.[E]:null,[A,E]),N=ee.useCallback(R=>{var D;const B=(D=A?.findIndex(Q=>Q===R))!=null?D:null;s(B),Vt(r.current,{transition:`transform ${At.DURATION}s cubic-bezier(${At.EASE.join(",")})`,transform:zt(u)?`translate3d(0, ${R}px, 0)`:`translate3d(${R}px, 0, 0)`}),A&&B!==A.length-1&&l!==void 0&&B!==l&&B<l?Vt(i.current,{transition:`opacity ${At.DURATION}s cubic-bezier(${At.EASE.join(",")})`,opacity:"0"}):Vt(i.current,{transition:`opacity ${At.DURATION}s cubic-bezier(${At.EASE.join(",")})`,opacity:"1"}),m(n?.[Math.max(B,0)])},[r.current,n,A,l,i,m]);ee.useEffect(()=>{if(p||e){var R;const D=(R=n?.findIndex(B=>B===e||B===p))!=null?R:-1;A&&D!==-1&&typeof A[D]=="number"&&N(A[D])}},[p,e,n,A,N]);function j({draggedDistance:R,closeDrawer:D,velocity:B,dismissible:Q}){if(l===void 0)return;const F=u==="bottom"||u==="right"?(_??0)-R:(_??0)+R,G=E===l-1,te=E===0,ce=R>0;if(G&&Vt(i.current,{transition:`opacity ${At.DURATION}s cubic-bezier(${At.EASE.join(",")})`}),!h&&B>2&&!ce){Q?D():N(A[0]);return}if(!h&&B>2&&ce&&A&&n){N(A[n.length-1]);return}const he=A?.reduce((q,H)=>typeof q!="number"||typeof H!="number"?q:Math.abs(H-F)<Math.abs(q-F)?H:q),I=zt(u)?window.innerHeight:window.innerWidth;if(B>$z&&Math.abs(R)<I*.4){const q=ce?1:-1;if(q>0&&S&&n){N(A[n.length-1]);return}if(te&&q<0&&Q&&D(),E===null)return;N(A[E+q]);return}N(he)}function T({draggedDistance:R}){if(_===null)return;const D=u==="bottom"||u==="right"?_-R:_+R;(u==="bottom"||u==="right")&&D<A[A.length-1]||(u==="top"||u==="left")&&D>A[A.length-1]||Vt(r.current,{transform:zt(u)?`translate3d(0, ${D}px, 0)`:`translate3d(${D}px, 0, 0)`})}function k(R,D){if(!n||typeof E!="number"||!A||l===void 0)return null;const B=E===l-1;if(E>=l&&D)return 0;if(B&&!D)return 1;if(!C&&!B)return null;const F=B?E+1:E-1,G=B?A[F]-A[F-1]:A[F+1]-A[F],te=R/Math.abs(G);return B?1-te:te}return{isLastSnapPoint:S,activeSnapPoint:p,shouldFade:C,getPercentageDragged:k,setActiveSnapPoint:m,activeSnapPointIndex:E,onRelease:j,onDrag:T,snapPointsOffset:A}}const Qfe=()=>()=>{};function Zfe(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:i}=Df(),l=ee.useRef(null),s=v.useMemo(()=>document.body.style.backgroundColor,[]);function u(){return(window.innerWidth-ew)/window.innerWidth}ee.useEffect(()=>{if(t&&n){l.current&&clearTimeout(l.current);const f=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!f)return;Vfe(r&&!i?Ob(document.body,{background:"black"}):Qfe,Ob(f,{transformOrigin:zt(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${At.DURATION}s`,transitionTimingFunction:`cubic-bezier(${At.EASE.join(",")})`}));const h=Ob(f,{borderRadius:`${Bz}px`,overflow:"hidden",...zt(e)?{transform:`scale(${u()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${u()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{h(),l.current=window.setTimeout(()=>{s?document.body.style.background=s:document.body.style.removeProperty("background")},At.DURATION*1e3)}}},[t,n,s])}let vu=null;function Jfe({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:i,noBodyStyles:l}){const[s,u]=ee.useState(()=>typeof window<"u"?window.location.href:""),f=ee.useRef(0),h=ee.useCallback(()=>{if(J2()&&vu===null&&e&&!l){vu={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:m,innerHeight:b}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-f.current}px`,left:`${-m}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const x=b-window.innerHeight;x&&f.current>=b&&(document.body.style.top=`${-(f.current+x)}px`)}),300)}},[e]),p=ee.useCallback(()=>{if(J2()&&vu!==null&&!l){const m=-parseInt(document.body.style.top,10),b=-parseInt(document.body.style.left,10);Object.assign(document.body.style,vu),window.requestAnimationFrame(()=>{if(i&&s!==window.location.href){u(window.location.href);return}window.scrollTo(b,m)}),vu=null}},[s]);return ee.useEffect(()=>{function m(){f.current=window.scrollY}return m(),window.addEventListener("scroll",m),()=>{window.removeEventListener("scroll",m)}},[]),ee.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||p()}},[t,p]),ee.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&h(),t||window.setTimeout(()=>{p()},500)):p())},[e,r,s,t,n,h,p]),{restorePositionSetting:p}}function ede({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:i,snapPoints:l,shouldScaleBackground:s=!1,setBackgroundColorOnScale:u=!0,closeThreshold:f=Gfe,scrollLockTimeout:h=Yfe,dismissible:p=!0,handleOnly:m=!1,fadeFromIndex:b=l&&l.length-1,activeSnapPoint:x,setActiveSnapPoint:S,fixed:E,modal:C=!0,onClose:A,nested:_,noBodyStyles:N=!1,direction:j="bottom",defaultOpen:T=!1,disablePreventScroll:k=!0,snapToSequentialPoint:R=!1,preventScrollRestoration:D=!1,repositionInputs:B=!0,onAnimationEnd:Q,container:F,autoFocus:G=!1}){var te,ce;const[he=!1,I]=Hz({defaultProp:T,prop:e,onChange:Oe=>{t?.(Oe),!Oe&&!_&&Gr(),setTimeout(()=>{Q?.(Oe)},At.DURATION*1e3),Oe&&!C&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),Oe||(document.body.style.pointerEvents="auto")}}),[q,H]=ee.useState(!1),[X,ge]=ee.useState(!1),[L,z]=ee.useState(!1),P=ee.useRef(null),W=ee.useRef(null),ne=ee.useRef(null),se=ee.useRef(null),Y=ee.useRef(null),pe=ee.useRef(!1),V=ee.useRef(null),me=ee.useRef(0),ye=ee.useRef(!1),ie=ee.useRef(!T),ke=ee.useRef(0),ve=ee.useRef(null),Je=ee.useRef(((te=ve.current)==null?void 0:te.getBoundingClientRect().height)||0),tt=ee.useRef(((ce=ve.current)==null?void 0:ce.getBoundingClientRect().width)||0),mt=ee.useRef(0),wr=ee.useCallback(Oe=>{l&&Oe===en.length-1&&(W.current=new Date)},[]),{activeSnapPoint:Ut,activeSnapPointIndex:An,setActiveSnapPoint:Sr,onRelease:Ht,snapPointsOffset:en,onDrag:qt,shouldFade:Ot,getPercentageDragged:tn}=Xfe({snapPoints:l,activeSnapPointProp:x,setActiveSnapPointProp:S,drawerRef:ve,fadeFromIndex:b,overlayRef:P,onSnapPointChange:wr,direction:j,container:F,snapToSequentialPoint:R});$fe({isDisabled:!he||X||!C||L||!q||!B||!k});const{restorePositionSetting:Gr}=Jfe({isOpen:he,modal:C,nested:_??!1,hasBeenOpened:q,preventScrollRestoration:D,noBodyStyles:N});function dn(){return(window.innerWidth-ew)/window.innerWidth}function Yr(Oe){var Ue,Ve;!p&&!l||ve.current&&!ve.current.contains(Oe.target)||(Je.current=((Ue=ve.current)==null?void 0:Ue.getBoundingClientRect().height)||0,tt.current=((Ve=ve.current)==null?void 0:Ve.getBoundingClientRect().width)||0,ge(!0),ne.current=new Date,kz()&&window.addEventListener("touchend",()=>pe.current=!1,{once:!0}),Oe.target.setPointerCapture(Oe.pointerId),me.current=zt(j)?Oe.pageY:Oe.pageX)}function On(Oe,Ue){var Ve;let Ie=Oe;const Ge=(Ve=window.getSelection())==null?void 0:Ve.toString(),Ce=ve.current?wh(ve.current,j):null,Le=new Date;if(Ie.tagName==="SELECT"||Ie.hasAttribute("data-vaul-no-drag")||Ie.closest("[data-vaul-no-drag]"))return!1;if(j==="right"||j==="left")return!0;if(W.current&&Le.getTime()-W.current.getTime()<500)return!1;if(Ce!==null&&(j==="bottom"?Ce>0:Ce<0))return!0;if(Ge&&Ge.length>0)return!1;if(Y.current&&Le.getTime()-Y.current.getTime()<h&&Ce===0||Ue)return Y.current=Le,!1;for(;Ie;){if(Ie.scrollHeight>Ie.clientHeight){if(Ie.scrollTop!==0)return Y.current=new Date,!1;if(Ie.getAttribute("role")==="dialog")return!0}Ie=Ie.parentNode}return!0}function Er(Oe){if(ve.current&&X){const Ue=j==="bottom"||j==="right"?1:-1,Ve=(me.current-(zt(j)?Oe.pageY:Oe.pageX))*Ue,Ie=Ve>0,Ge=l&&!p&&!Ie;if(Ge&&An===0)return;const Ce=Math.abs(Ve),Le=document.querySelector("[data-vaul-drawer-wrapper]"),ut=j==="bottom"||j==="top"?Je.current:tt.current;let it=Ce/ut;const Nn=tn(Ce,Ie);if(Nn!==null&&(it=Nn),Ge&&it>=1||!pe.current&&!On(Oe.target,Ie))return;if(ve.current.classList.add(Nb),pe.current=!0,Vt(ve.current,{transition:"none"}),Vt(P.current,{transition:"none"}),l&&qt({draggedDistance:Ve}),Ie&&!l){const vt=Kfe(Ve),Cr=Math.min(vt*-1,0)*Ue;Vt(ve.current,{transform:zt(j)?`translate3d(0, ${Cr}px, 0)`:`translate3d(${Cr}px, 0, 0)`});return}const Ye=1-it;if((Ot||b&&An===b-1)&&(r?.(Oe,it),Vt(P.current,{opacity:`${Ye}`,transition:"none"},!0)),Le&&P.current&&s){const vt=Math.min(dn()+it*(1-dn()),1),Cr=8-it*8,pn=Math.max(0,14-it*14);Vt(Le,{borderRadius:`${Cr}px`,transform:zt(j)?`scale(${vt}) translate3d(0, ${pn}px, 0)`:`scale(${vt}) translate3d(${pn}px, 0, 0)`,transition:"none"},!0)}if(!l){const vt=Ce*Ue;Vt(ve.current,{transform:zt(j)?`translate3d(0, ${vt}px, 0)`:`translate3d(${vt}px, 0, 0)`})}}}ee.useEffect(()=>{window.requestAnimationFrame(()=>{ie.current=!0})},[]),ee.useEffect(()=>{var Oe;function Ue(){if(!ve.current||!B)return;const Ve=document.activeElement;if(Jx(Ve)||ye.current){var Ie;const Ge=((Ie=window.visualViewport)==null?void 0:Ie.height)||0,Ce=window.innerHeight;let Le=Ce-Ge;const ut=ve.current.getBoundingClientRect().height||0,it=ut>Ce*.8;mt.current||(mt.current=ut);const Nn=ve.current.getBoundingClientRect().top;if(Math.abs(ke.current-Le)>60&&(ye.current=!ye.current),l&&l.length>0&&en&&An){const Ye=en[An]||0;Le+=Ye}if(ke.current=Le,ut>Ge||ye.current){const Ye=ve.current.getBoundingClientRect().height;let vt=Ye;Ye>Ge&&(vt=Ge-(it?Nn:ew)),E?ve.current.style.height=`${Ye-Math.max(Le,0)}px`:ve.current.style.height=`${Math.max(vt,Ge-Nn)}px`}else Rfe()||(ve.current.style.height=`${mt.current}px`);l&&l.length>0&&!ye.current?ve.current.style.bottom="0px":ve.current.style.bottom=`${Math.max(Le,0)}px`}}return(Oe=window.visualViewport)==null||Oe.addEventListener("resize",Ue),()=>{var Ve;return(Ve=window.visualViewport)==null?void 0:Ve.removeEventListener("resize",Ue)}},[An,l,en]);function nn(Oe){hn(),A?.(),Oe||I(!1),setTimeout(()=>{l&&Sr(l[0])},At.DURATION*1e3)}function rr(){if(!ve.current)return;const Oe=document.querySelector("[data-vaul-drawer-wrapper]"),Ue=wh(ve.current,j);Vt(ve.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${At.DURATION}s cubic-bezier(${At.EASE.join(",")})`}),Vt(P.current,{transition:`opacity ${At.DURATION}s cubic-bezier(${At.EASE.join(",")})`,opacity:"1"}),s&&Ue&&Ue>0&&he&&Vt(Oe,{borderRadius:`${Bz}px`,overflow:"hidden",...zt(j)?{transform:`scale(${dn()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${dn()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${At.DURATION}s`,transitionTimingFunction:`cubic-bezier(${At.EASE.join(",")})`},!0)}function hn(){!X||!ve.current||(ve.current.classList.remove(Nb),pe.current=!1,ge(!1),se.current=new Date)}function ar(Oe){if(!X||!ve.current)return;ve.current.classList.remove(Nb),pe.current=!1,ge(!1),se.current=new Date;const Ue=wh(ve.current,j);if(!Oe||!On(Oe.target,!1)||!Ue||Number.isNaN(Ue)||ne.current===null)return;const Ve=se.current.getTime()-ne.current.getTime(),Ie=me.current-(zt(j)?Oe.pageY:Oe.pageX),Ge=Math.abs(Ie)/Ve;if(Ge>.05&&(z(!0),setTimeout(()=>{z(!1)},200)),l){Ht({draggedDistance:Ie*(j==="bottom"||j==="right"?1:-1),closeDrawer:nn,velocity:Ge,dismissible:p}),i?.(Oe,!0);return}if(j==="bottom"||j==="right"?Ie>0:Ie<0){rr(),i?.(Oe,!0);return}if(Ge>$z){nn(),i?.(Oe,!1);return}var Ce;const Le=Math.min((Ce=ve.current.getBoundingClientRect().height)!=null?Ce:0,window.innerHeight);var ut;const it=Math.min((ut=ve.current.getBoundingClientRect().width)!=null?ut:0,window.innerWidth),Nn=j==="left"||j==="right";if(Math.abs(Ue)>=(Nn?it:Le)*f){nn(),i?.(Oe,!1);return}i?.(Oe,!0),rr()}ee.useEffect(()=>(he&&(Vt(document.documentElement,{scrollBehavior:"auto"}),W.current=new Date),()=>{Ffe(document.documentElement,"scrollBehavior")}),[he]);function rn(Oe){const Ue=Oe?(window.innerWidth-Ko)/window.innerWidth:1,Ve=Oe?-Ko:0;V.current&&window.clearTimeout(V.current),Vt(ve.current,{transition:`transform ${At.DURATION}s cubic-bezier(${At.EASE.join(",")})`,transform:zt(j)?`scale(${Ue}) translate3d(0, ${Ve}px, 0)`:`scale(${Ue}) translate3d(${Ve}px, 0, 0)`}),!Oe&&ve.current&&(V.current=setTimeout(()=>{const Ie=wh(ve.current,j);Vt(ve.current,{transition:"none",transform:zt(j)?`translate3d(0, ${Ie}px, 0)`:`translate3d(${Ie}px, 0, 0)`})},500))}function hc(Oe,Ue){if(Ue<0)return;const Ve=(window.innerWidth-Ko)/window.innerWidth,Ie=Ve+Ue*(1-Ve),Ge=-Ko+Ue*Ko;Vt(ve.current,{transform:zt(j)?`scale(${Ie}) translate3d(0, ${Ge}px, 0)`:`scale(${Ie}) translate3d(${Ge}px, 0, 0)`,transition:"none"})}function Oo(Oe,Ue){const Ve=zt(j)?window.innerHeight:window.innerWidth,Ie=Ue?(Ve-Ko)/Ve:1,Ge=Ue?-Ko:0;Ue&&Vt(ve.current,{transition:`transform ${At.DURATION}s cubic-bezier(${At.EASE.join(",")})`,transform:zt(j)?`scale(${Ie}) translate3d(0, ${Ge}px, 0)`:`scale(${Ie}) translate3d(${Ge}px, 0, 0)`})}return ee.useEffect(()=>{C||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[C]),ee.createElement(nf,{defaultOpen:T,onOpenChange:Oe=>{!p&&!Oe||(Oe?H(!0):nn(!0),I(Oe))},open:he},ee.createElement(Pz.Provider,{value:{activeSnapPoint:Ut,snapPoints:l,setActiveSnapPoint:Sr,drawerRef:ve,overlayRef:P,onOpenChange:t,onPress:Yr,onRelease:ar,onDrag:Er,dismissible:p,shouldAnimate:ie,handleOnly:m,isOpen:he,isDragging:X,shouldFade:Ot,closeDrawer:nn,onNestedDrag:hc,onNestedOpenChange:rn,onNestedRelease:Oo,keyboardIsOpen:ye,modal:C,snapPointsOffset:en,activeSnapPointIndex:An,direction:j,shouldScaleBackground:s,setBackgroundColorOnScale:u,noBodyStyles:N,container:F,autoFocus:G}},n))}const qz=ee.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:i,shouldFade:l,isOpen:s,modal:u,shouldAnimate:f}=Df(),h=Lz(t,n),p=r&&r.length>0;if(!u)return null;const m=ee.useCallback(b=>i(b),[i]);return ee.createElement(bl,{onMouseUp:m,ref:h,"data-vaul-overlay":"","data-vaul-snap-points":s&&p?"true":"false","data-vaul-snap-points-overlay":s&&l?"true":"false","data-vaul-animate":f?.current?"true":"false",...e})});qz.displayName="Drawer.Overlay";const Fz=ee.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},i){const{drawerRef:l,onPress:s,onRelease:u,onDrag:f,keyboardIsOpen:h,snapPointsOffset:p,activeSnapPointIndex:m,modal:b,isOpen:x,direction:S,snapPoints:E,container:C,handleOnly:A,shouldAnimate:_,autoFocus:N}=Df(),[j,T]=ee.useState(!1),k=Lz(i,l),R=ee.useRef(null),D=ee.useRef(null),B=ee.useRef(!1),Q=E&&E.length>0;Zfe();const F=(te,ce,he=0)=>{if(B.current)return!0;const I=Math.abs(te.y),q=Math.abs(te.x),H=q>I,X=["bottom","right"].includes(ce)?1:-1;if(ce==="left"||ce==="right"){if(!(te.x*X<0)&&q>=0&&q<=he)return H}else if(!(te.y*X<0)&&I>=0&&I<=he)return!H;return B.current=!0,!0};ee.useEffect(()=>{Q&&window.requestAnimationFrame(()=>{T(!0)})},[]);function G(te){R.current=null,B.current=!1,u(te)}return ee.createElement(xl,{"data-vaul-drawer-direction":S,"data-vaul-drawer":"","data-vaul-delayed-snap-points":j?"true":"false","data-vaul-snap-points":x&&Q?"true":"false","data-vaul-custom-container":C?"true":"false","data-vaul-animate":_?.current?"true":"false",...r,ref:k,style:p&&p.length>0?{"--snap-point-height":`${p[m??0]}px`,...t}:t,onPointerDown:te=>{A||(r.onPointerDown==null||r.onPointerDown.call(r,te),R.current={x:te.pageX,y:te.pageY},s(te))},onOpenAutoFocus:te=>{n?.(te),N||te.preventDefault()},onPointerDownOutside:te=>{if(e?.(te),!b||te.defaultPrevented){te.preventDefault();return}h.current&&(h.current=!1)},onFocusOutside:te=>{if(!b){te.preventDefault();return}},onPointerMove:te=>{if(D.current=te,A||(r.onPointerMove==null||r.onPointerMove.call(r,te),!R.current))return;const ce=te.pageY-R.current.y,he=te.pageX-R.current.x,I=te.pointerType==="touch"?10:2;F({x:he,y:ce},S,I)?f(te):(Math.abs(he)>I||Math.abs(ce)>I)&&(R.current=null)},onPointerUp:te=>{r.onPointerUp==null||r.onPointerUp.call(r,te),R.current=null,B.current=!1,u(te)},onPointerOut:te=>{r.onPointerOut==null||r.onPointerOut.call(r,te),G(D.current)},onContextMenu:te=>{r.onContextMenu==null||r.onContextMenu.call(r,te),D.current&&G(D.current)}})});Fz.displayName="Drawer.Content";const tde=250,nde=120,rde=ee.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:i,isDragging:l,snapPoints:s,activeSnapPoint:u,setActiveSnapPoint:f,dismissible:h,handleOnly:p,isOpen:m,onPress:b,onDrag:x}=Df(),S=ee.useRef(null),E=ee.useRef(!1);function C(){if(E.current){N();return}window.setTimeout(()=>{A()},nde)}function A(){if(l||e||E.current){N();return}if(N(),!s||s.length===0){h||i();return}if(u===s[s.length-1]&&h){i();return}const T=s.findIndex(R=>R===u);if(T===-1)return;const k=s[T+1];f(k)}function _(){S.current=window.setTimeout(()=>{E.current=!0},tde)}function N(){S.current&&window.clearTimeout(S.current),E.current=!1}return ee.createElement("div",{onClick:C,onPointerCancel:N,onPointerDown:j=>{p&&b(j),_()},onPointerMove:j=>{p&&x(j)},ref:r,"data-vaul-drawer-visible":m?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},ee.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});rde.displayName="Drawer.Handle";function ade(e){const t=Df(),{container:n=t.container,...r}=e;return ee.createElement(rf,{container:n,...r})}const Di={Root:ede,Content:Fz,Overlay:qz,Portal:ade,Title:Js,Description:ec},qp=({shouldScaleBackground:e=!0,...t})=>g.jsx(Di.Root,{shouldScaleBackground:e,...t});qp.displayName="Drawer";const ide=Di.Portal,Kz=v.forwardRef(({className:e,...t},n)=>g.jsx(Di.Overlay,{ref:n,className:fe("fixed inset-0 z-50 bg-black/80",e),...t}));Kz.displayName=Di.Overlay.displayName;const Fp=v.forwardRef(({className:e,children:t,...n},r)=>g.jsxs(ide,{children:[g.jsx(Kz,{}),g.jsxs(Di.Content,{ref:r,className:fe("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",e),...n,children:[g.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]}));Fp.displayName="DrawerContent";const Kp=({className:e,...t})=>g.jsx("div",{className:fe("grid gap-1.5 p-4 text-center sm:text-left",e),...t});Kp.displayName="DrawerHeader";const Vp=v.forwardRef(({className:e,...t},n)=>g.jsx(Di.Title,{ref:n,className:fe("text-lg font-semibold leading-none tracking-tight",e),...t}));Vp.displayName=Di.Title.displayName;const Gp=v.forwardRef(({className:e,...t},n)=>g.jsx(Di.Description,{ref:n,className:fe("text-sm text-muted-foreground",e),...t}));Gp.displayName=Di.Description.displayName;const IS=v.forwardRef(({className:e,icon:t,title:n,description:r,action:i,...l},s)=>g.jsxs("div",{ref:s,className:fe("flex min-h-[400px] flex-col items-center justify-center rounded-md border border-dashed p-8 text-center animate-in fade-in-50",e),...l,children:[t&&g.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-muted",children:t}),g.jsx("h3",{className:"mt-4 text-lg font-semibold",children:n}),r&&g.jsx("p",{className:"mb-4 mt-2 text-sm text-muted-foreground max-w-sm",children:r}),i&&g.jsx("div",{className:"mt-4",children:i})]}));IS.displayName="Empty";const Vz=v.forwardRef(({className:e,children:t,...n},r)=>g.jsx("kbd",{ref:r,className:fe("pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100",e),...n,children:t}));Vz.displayName="Kbd";const LS=v.forwardRef(({className:e,...t},n)=>g.jsx("div",{className:"relative w-full overflow-auto",children:g.jsx("table",{ref:n,className:fe("w-full caption-bottom text-sm",e),...t})}));LS.displayName="Table";const zS=v.forwardRef(({className:e,...t},n)=>g.jsx("thead",{ref:n,className:fe("[&_tr]:border-b",e),...t}));zS.displayName="TableHeader";const $S=v.forwardRef(({className:e,...t},n)=>g.jsx("tbody",{ref:n,className:fe("[&_tr:last-child]:border-0",e),...t}));$S.displayName="TableBody";const ode=v.forwardRef(({className:e,...t},n)=>g.jsx("tfoot",{ref:n,className:fe("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));ode.displayName="TableFooter";const Zu=v.forwardRef(({className:e,...t},n)=>g.jsx("tr",{ref:n,className:fe("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Zu.displayName="TableRow";const xa=v.forwardRef(({className:e,...t},n)=>g.jsx("th",{ref:n,className:fe("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));xa.displayName="TableHead";const wa=v.forwardRef(({className:e,...t},n)=>g.jsx("td",{ref:n,className:fe("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));wa.displayName="TableCell";const lde=v.forwardRef(({className:e,...t},n)=>g.jsx("caption",{ref:n,className:fe("mt-4 text-sm text-muted-foreground",e),...t}));lde.displayName="TableCaption";function sde(){const{data:e,isLoading:t}=Jw(),n=EY(),r=CY(),i=$w(),[l,s]=v.useState(!1),[u,f]=v.useState(""),[h,p]=v.useState(null),[m,b]=v.useState(!1),[x,S]=v.useState({open:!1,keyId:null,keyName:null}),E=async T=>{T.preventDefault();const k=await n.mutateAsync(u);s(!1),p(k.key),f("")},C=async T=>{await navigator.clipboard.writeText(T),b(!0),Mn.success("Copied to clipboard"),setTimeout(()=>b(!1),2e3)},A=async()=>{x.keyId&&(await r.mutateAsync(x.keyId),S({open:!1,keyId:null,keyName:null}))},_=g.jsxs("form",{onSubmit:E,className:"space-y-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx(kn,{htmlFor:"keyName",children:"Key Name"}),g.jsx(pr,{id:"keyName",placeholder:"e.g., Production, Claude Desktop, Testing",value:u,onChange:T=>f(T.target.value),required:!0}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"Give your key a memorable name to identify its purpose"})]}),g.jsxs("div",{className:"flex flex-col-reverse sm:flex-row sm:justify-end gap-2",children:[g.jsx(xt,{type:"button",variant:"outline",onClick:()=>s(!1),children:"Cancel"}),g.jsx(xt,{type:"submit",disabled:n.isPending,children:n.isPending?g.jsxs(g.Fragment,{children:[g.jsx(fi,{size:"sm"}),"Generating..."]}):"Generate Key"})]})]}),N=g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsxs("div",{className:"flex items-center gap-2 rounded-lg border bg-muted p-4",children:[g.jsx("code",{className:"flex-1 font-mono text-sm break-all",children:h}),g.jsx(Kb,{children:g.jsxs(Vb,{children:[g.jsx(Gb,{asChild:!0,children:g.jsx(xt,{size:"icon",variant:"ghost",className:"h-8 w-8 shrink-0",onClick:()=>h&&C(h),"aria-label":"Copy to clipboard",children:m?g.jsx(tf,{}):g.jsx(RH,{})})}),g.jsx(Vh,{children:g.jsx("p",{children:"Copy to clipboard"})})]})})]}),g.jsxs("div",{className:"flex flex-col gap-2 rounded-lg border bg-muted p-4",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("p",{className:"text-sm font-semibold",children:"Usage Example (HTTP Mode)"}),g.jsx(Vz,{children:"JSON"})]}),g.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"API keys are for HTTP mode (remote server). Configure your MCP client to connect via HTTP POST requests."}),g.jsx("pre",{className:"overflow-x-auto text-xs",children:JSON.stringify({"shopify-mcp":{type:"http",url:"https://shopify-mcp.com/mcp",headers:{Authorization:`Bearer ${h||"sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}`}}},null,2)})]}),g.jsx("div",{className:"flex justify-end",children:g.jsx(xt,{onClick:()=>p(null),children:"Done"})})]}),j=e&&e.length>0;return g.jsxs("div",{className:"flex flex-col gap-6 animate-fade-in",children:[g.jsxs(ai,{children:[g.jsxs(ii,{className:"flex flex-row items-center justify-between space-y-0 pb-4",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx(oi,{children:"API Keys"}),g.jsx(fo,{children:"Generate and manage API keys for MCP access"})]}),j&&g.jsxs(xt,{onClick:()=>s(!0),children:[g.jsx(ol,{}),"Generate Key"]})]}),g.jsx(li,{children:t?g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"flex gap-4 pb-2 border-b",children:[g.jsx(ct,{className:"h-4 w-24"}),g.jsx(ct,{className:"h-4 w-32 hidden sm:block"}),g.jsx(ct,{className:"h-4 w-20 hidden md:block"}),g.jsx(ct,{className:"h-4 w-20 hidden lg:block"}),g.jsx(ct,{className:"h-4 w-16 ml-auto"})]}),[...Array(3)].map((T,k)=>g.jsxs("div",{className:"flex items-center gap-4 py-3 border-b last:border-0",children:[g.jsx(ct,{className:"h-5 w-32"}),g.jsx(ct,{className:"h-5 w-36 hidden sm:block"}),g.jsx(ct,{className:"h-4 w-20 hidden md:block"}),g.jsx(ct,{className:"h-4 w-20 hidden lg:block"}),g.jsx(ct,{className:"h-8 w-8 rounded-md ml-auto"})]},k))]}):e&&e.length>0?g.jsxs(LS,{className:"animate-fade-in",children:[g.jsx(zS,{children:g.jsxs(Zu,{children:[g.jsx(xa,{children:"Name"}),g.jsx(xa,{className:"hidden sm:table-cell",children:"Key"}),g.jsx(xa,{className:"hidden md:table-cell",children:"Created"}),g.jsx(xa,{className:"hidden lg:table-cell",children:"Last Used"}),g.jsx(xa,{className:"text-right",children:"Actions"})]})}),g.jsx($S,{children:e.map(T=>g.jsxs(Zu,{children:[g.jsx(wa,{children:g.jsxs(TS,{children:[g.jsx(MS,{asChild:!0,children:g.jsx("button",{type:"button",className:"font-medium hover:text-primary transition-colors text-left",children:T.name})}),g.jsx(lv,{className:"w-80",children:g.jsxs("div",{className:"space-y-2",children:[g.jsx("h4",{className:"text-sm font-semibold",children:T.name}),g.jsx("p",{className:"text-sm text-muted-foreground",children:"API Key for MCP access"}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(ga,{variant:T.lastUsedAt?"default":"secondary",children:T.lastUsedAt?"Active":"Never used"}),g.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:T.keyHint})]}),g.jsxs("p",{className:"text-xs text-muted-foreground pt-2",children:["Created on ",new Date(T.createdAt).toLocaleDateString()]})]})})]})}),g.jsx(wa,{className:"font-mono text-xs hidden sm:table-cell",children:T.keyHint}),g.jsx(wa,{className:"hidden md:table-cell",children:new Date(T.createdAt).toLocaleDateString()}),g.jsx(wa,{className:"hidden lg:table-cell",children:T.lastUsedAt?new Date(T.lastUsedAt).toLocaleDateString():"Never"}),g.jsx(wa,{className:"text-right",children:g.jsx(Kb,{children:g.jsxs(Vb,{children:[g.jsx(Gb,{asChild:!0,children:g.jsxs(xt,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-destructive hover:bg-destructive/10",onClick:()=>S({open:!0,keyId:T.id,keyName:T.name}),children:[g.jsx($M,{}),g.jsx("span",{className:"sr-only",children:"Revoke key"})]})}),g.jsx(Vh,{children:g.jsx("p",{children:"Revoke key"})})]})})})]},T.id))})]}):g.jsx(IS,{icon:g.jsx(co,{className:"h-6 w-6 text-muted-foreground"}),title:"No API keys yet",description:"Create your first API key to connect your AI assistant to your Shopify stores.",action:g.jsxs(xt,{size:"lg",onClick:()=>s(!0),children:[g.jsx(ol,{}),"Generate Key"]})})})]}),i?g.jsx(qp,{open:l,onOpenChange:s,children:g.jsxs(Fp,{children:[g.jsxs(Kp,{children:[g.jsx(Vp,{children:"Generate API Key"}),g.jsx(Gp,{children:"Create a new API key for MCP access"})]}),g.jsx("div",{className:"px-4 pb-4",children:_})]})}):g.jsx(Qh,{open:l,onOpenChange:s,children:g.jsxs(Pu,{children:[g.jsxs(Zh,{children:[g.jsx(ku,{children:"Generate API Key"}),g.jsx(Iu,{children:"Create a new API key for MCP access"})]}),_]})}),i?g.jsx(qp,{open:!!h,onOpenChange:()=>p(null),children:g.jsxs(Fp,{children:[g.jsxs(Kp,{children:[g.jsx(Vp,{children:"⚠️ Copy This Key Now"}),g.jsx(Gp,{children:"This key won't be shown again. Make sure to copy it to a safe place."})]}),g.jsx("div",{className:"px-4 pb-4",children:N})]})}):g.jsx(Qh,{open:!!h,onOpenChange:()=>p(null),children:g.jsxs(Pu,{className:"max-w-2xl",children:[g.jsxs(Zh,{children:[g.jsx(ku,{children:"⚠️ Copy This Key Now"}),g.jsx(Iu,{children:"This key won't be shown again. Make sure to copy it to a safe place."})]}),N]})}),g.jsx(Dz,{open:x.open,onOpenChange:T=>S({open:T,keyId:x.keyId,keyName:x.keyName}),title:`Revoke "${x.keyName}"?`,description:"This action cannot be undone. Any applications using this key will immediately lose access.",onConfirm:A,confirmLabel:"Revoke Key",variant:"destructive",isLoading:r.isPending})]})}function cde({className:e,formProgress:t=0}){const n=v.useRef(null),r=v.useRef(),i=v.useRef([]),l=v.useRef({x:-1e3,y:-1e3}),s=v.useRef(0),u=v.useRef(0),f=v.useRef(0),h=v.useRef(0),p=v.useRef(0),[m,b]=v.useState(!1);return v.useEffect(()=>{h.current=t},[t]),v.useEffect(()=>{const x=window.matchMedia("(prefers-reduced-motion: reduce)");b(x.matches);const S=E=>b(E.matches);return x.addEventListener("change",S),()=>x.removeEventListener("change",S)},[]),v.useEffect(()=>{const x=S=>{(S.key.length===1||S.key==="Backspace"||S.key==="Delete")&&(u.current=Math.min(1,u.current+.25))};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[]),v.useEffect(()=>{const x=n.current;if(!x)return;const S=x.getContext("2d",{alpha:!1});if(!S)return;let E=0,C=0;const A=[[170,195],[265,290],[185,210],[325,350],[145,165]],_=()=>{const B=A[Math.floor(Math.random()*A.length)],Q=Math.random();return{x:Math.random()*E,y:Math.random()*C,vx:(Math.random()-.5)*.2,vy:(Math.random()-.5)*.2,size:2+Q*3+Math.random()*2,rotation:Math.random()*Math.PI*2,rotationSpeed:(Math.random()-.5)*.02,shape:.3+Math.random()*.7,hue:B[0]+Math.random()*(B[1]-B[0]),brightness:.3+Q*.4,glow:0,phase:Math.random()*Math.PI*2,layer:Q,pulseTimer:Math.random()*200,pulseInterval:100+Math.random()*200,isPulsing:!1,pulseIntensity:0}},N=()=>{i.current=[];const B=Math.min(200,Math.floor(E*C/7e3));for(let Q=0;Q<B;Q++)i.current.push(_())},j=()=>{const B=Math.min(window.devicePixelRatio,2),Q=x.getBoundingClientRect();E=Q.width,C=Q.height,x.width=E*B,x.height=C*B,S.scale(B,B),N()};j(),window.addEventListener("resize",j);const T=B=>{const Q=x.getBoundingClientRect();l.current={x:B.clientX-Q.left,y:B.clientY-Q.top}},k=()=>{l.current={x:-1e3,y:-1e3}};window.addEventListener("mousemove",T),window.addEventListener("mouseleave",k);const R=(B,Q,F,G,te,ce,he)=>{B.save(),B.translate(Q,F),B.rotate(te),B.fillStyle=he,B.beginPath();const I=G*(1+ce*.5),q=G*(.5+(1-ce)*.5);B.moveTo(0,-I/2),B.lineTo(-q/2,I/2),B.lineTo(q/2,I/2),B.closePath(),B.fill(),B.restore()},D=()=>{s.current++;const B=s.current;p.current<1&&(p.current=Math.min(1,p.current+.016)),u.current*=.96;const Q=u.current,F=h.current;f.current+=(F-f.current)*.02;const G=f.current,te=S.createLinearGradient(0,0,E,C);te.addColorStop(0,"#080c14"),te.addColorStop(.35,"#0c0818"),te.addColorStop(.65,"#081018"),te.addColorStop(1,"#040608"),S.fillStyle=te,S.fillRect(0,0,E,C),S.globalAlpha=(.03+G*.025)*p.current;const ce=S.createLinearGradient(E*.2+Math.sin(B*.002)*80,0,E*.8+Math.cos(B*.0015)*80,C),he=B*.1;ce.addColorStop(0,`hsl(${180+he%60}, 45%, 30%)`),ce.addColorStop(.5,`hsl(${250+he%40}, 40%, 25%)`),ce.addColorStop(1,`hsl(${200+he%50}, 45%, 22%)`),S.fillStyle=ce,S.fillRect(0,0,E,C),S.globalAlpha=1;const I=l.current.x,q=l.current.y;if(I>0){S.globalAlpha=.08*p.current;const P=S.createRadialGradient(I,q,0,I,q,150);P.addColorStop(0,"#38bdf8"),P.addColorStop(.6,"#8b5cf6"),P.addColorStop(1,"transparent"),S.fillStyle=P,S.beginPath(),S.arc(I,q,150,0,Math.PI*2),S.fill(),S.globalAlpha=1}const H=i.current,X=[],ge=40,L=new Map;for(const P of H){const W=Math.floor(P.x/ge),ne=Math.floor(P.y/ge),se=`${W},${ne}`;L.has(se)||L.set(se,[]),L.get(se)?.push(P)}for(const P of H){if(m){const Ot=`hsla(${P.hue}, 50%, 45%, 0.4)`;R(S,P.x,P.y,P.size,P.rotation,P.shape,Ot);continue}const W=G*.4;P.pulseTimer++;const ne=P.pulseInterval*(1-G*.5);if(P.pulseTimer>=ne){P.isPulsing=!0,P.pulseTimer=0;const Ot=Math.max(Q*.4,G*.5);P.pulseInterval=(100+Math.random()*200)*(1-Ot)}if(P.isPulsing?(P.pulseIntensity+=.12+G*.08,P.pulseIntensity>=1&&(P.isPulsing=!1)):P.pulseIntensity*=.93+G*.03,G>.6){const Ot=(G-.6)*.3+Math.sin(B*.05+P.phase)*G*.08;P.pulseIntensity=Math.max(P.pulseIntensity,Ot)}Q>.1&&(P.rotation+=(Math.random()-.5)*Q*.1);const se=I-P.x,Y=q-P.y,pe=Math.sqrt(se*se+Y*Y),V=100+P.layer*60,me=pe<V?(1-pe/V)*(.4+P.layer*.4):0,ye=Math.min(1,me+P.pulseIntensity*.5+Q*.2+W*.3);if(P.glow+=(ye-P.glow)*.1,me>.05){const Ot=Math.atan2(Y,se),tn=me*(1.2+P.layer);P.vx+=-Math.cos(Ot)*tn*.15,P.vy+=-Math.sin(Ot)*tn*.15,P.rotation+=P.rotationSpeed*(1+me*6)}else P.vx+=Math.sin(B*.005+P.phase)*.02,P.vy+=Math.cos(B*.004+P.phase*1.2)*.02,P.rotation+=P.rotationSpeed*.3;const ie=Math.floor(P.x/ge),ke=Math.floor(P.y/ge);for(let Ot=ie-1;Ot<=ie+1;Ot++)for(let tn=ke-1;tn<=ke+1;tn++){const Gr=L.get(`${Ot},${tn}`);if(Gr)for(const dn of Gr){if(dn===P)continue;const Yr=P.x-dn.x,On=P.y-dn.y,Er=Math.sqrt(Yr*Yr+On*On),nn=(P.size+dn.size)*2;if(Er<nn&&Er>0){const rr=(nn-Er)/nn*.15;P.vx+=Yr/Er*rr,P.vy+=On/Er*rr}}}P.vx*=.94,P.vy*=.94;const ve=Math.sqrt(P.vx*P.vx+P.vy*P.vy),Je=2.5+me*3;ve>Je&&(P.vx=P.vx/ve*Je,P.vy=P.vy/ve*Je),P.x+=P.vx,P.y+=P.vy,P.x<-20&&(P.x=E+20),P.x>E+20&&(P.x=-20),P.y<-20&&(P.y=C+20),P.y>C+20&&(P.y=-20);const tt=P.brightness+Math.sin(B*.025+P.phase)*.06,mt=P.pulseIntensity*18,wr=Q*12,Ut=36+tt*28+P.glow*22+mt+wr,An=50+P.glow*25+P.pulseIntensity*12,Sr=(.25+P.layer*.3+P.glow*.3)*p.current,Ht=1+P.pulseIntensity*.35+P.glow*.25+Q*.15,en=P.size*Ht;if(P.glow>.2||P.pulseIntensity>.25){const Ot=Math.max(P.glow,P.pulseIntensity),tn=`hsla(${P.hue}, ${An-10}%, ${Ut}%, ${Sr*.12*Ot})`;R(S,P.x,P.y,en*2.5,P.rotation,P.shape,tn);const Gr=`hsla(${P.hue}, ${An}%, ${Ut+5}%, ${Sr*.25*Ot})`;R(S,P.x,P.y,en*1.6,P.rotation,P.shape,Gr)}const qt=`hsla(${P.hue}, ${An+5}%, ${Ut}%, ${Sr})`;R(S,P.x,P.y,en,P.rotation,P.shape,qt),(P.glow>.25||P.pulseIntensity>.35)&&X.push(P)}if(X.length>1&&X.length<40){S.lineWidth=.5;let P=0;const W=50;for(let ne=0;ne<X.length&&P<W;ne++){const se=X[ne];for(let Y=ne+1;Y<X.length&&P<W;Y++){const pe=X[Y],V=se.x-pe.x,me=se.y-pe.y,ye=V*V+me*me;if(ye<4900){const ke=(1-Math.sqrt(ye)/70)*Math.min(se.glow+se.pulseIntensity,pe.glow+pe.pulseIntensity)*.3*p.current;S.strokeStyle=`hsla(${(se.hue+pe.hue)/2}, 60%, 50%, ${ke})`,S.beginPath(),S.moveTo(se.x,se.y),S.lineTo(pe.x,pe.y),S.stroke(),P++}}}}const z=S.createRadialGradient(E/2,C/2,0,E/2,C/2,Math.max(E,C)*.75);z.addColorStop(0,"rgba(0, 0, 0, 0)"),z.addColorStop(.65,"rgba(0, 0, 0, 0)"),z.addColorStop(.85,"rgba(0, 0, 0, 0.2)"),z.addColorStop(1,"rgba(0, 0, 0, 0.45)"),S.fillStyle=z,S.fillRect(0,0,E,C),m||(r.current=requestAnimationFrame(D))};return D(),()=>{window.removeEventListener("resize",j),window.removeEventListener("mousemove",T),window.removeEventListener("mouseleave",k),r.current&&cancelAnimationFrame(r.current)}},[m]),g.jsx("canvas",{ref:n,className:`absolute inset-0 -z-10 ${e||""}`,style:{width:"100%",height:"100%"}})}function ude(){const{login:e}=ff(),[t,n]=v.useState(""),[r,i]=v.useState(""),[l,s]=v.useState(!1),[u,f]=v.useState(""),h=8,p=v.useMemo(()=>{let x=0;t.trim().length>0&&(x+=.3);const S=Math.min(r.length/h,1);return x+=S*.7,x},[t,r]),m=p>=1,b=async x=>{x.preventDefault(),f(""),s(!0);try{await e(t,r)}catch(S){f(S instanceof Error?S.message:"Login failed")}finally{s(!1)}};return g.jsxs("div",{className:"relative flex min-h-screen items-center justify-center overflow-hidden p-4",children:[g.jsx(cde,{formProgress:p}),g.jsxs("div",{className:"relative z-10 w-full max-w-md",children:[g.jsx("div",{className:"absolute -inset-1 rounded-2xl bg-gradient-to-r from-cyan-500 via-violet-500 to-pink-500 blur-xl transition-all duration-700",style:{opacity:.08+p*.15}}),g.jsxs("div",{className:"relative rounded-2xl border border-white/10 bg-slate-900/70 p-8 shadow-2xl backdrop-blur-xl",children:[g.jsxs("div",{className:"mb-8 text-center",children:[g.jsx("div",{className:"mb-6 flex justify-center",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-gradient-to-br from-teal-400 to-emerald-500 shadow-lg shadow-teal-500/25",children:g.jsx(zH,{className:"h-5 w-5 text-white"})}),g.jsx("span",{className:"text-xl font-semibold text-white",children:"shopify-mcp"})]})}),g.jsx("h1",{className:"text-2xl font-bold tracking-tight text-white",children:"Welcome back"}),g.jsx("p",{className:"mt-2 text-sm text-slate-400",children:"Sign in to your account to continue"})]}),g.jsxs("form",{onSubmit:b,className:"space-y-5",children:[u&&g.jsx("div",{className:"rounded-lg border border-red-500/30 bg-red-500/10 p-3 text-sm text-red-300",children:u}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(kn,{htmlFor:"email",className:"text-sm font-medium text-slate-300",children:"Email"}),g.jsx(pr,{id:"email",type:"email",placeholder:"you@example.com",value:t,onChange:x=>n(x.target.value),required:!0,disabled:l,className:"border-white/10 bg-white/5 text-white placeholder:text-slate-500 focus:border-cyan-500/50 focus:ring-cyan-500/20"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(kn,{htmlFor:"password",className:"text-sm font-medium text-slate-300",children:"Password"}),g.jsx(pr,{id:"password",type:"password",value:r,onChange:x=>i(x.target.value),required:!0,disabled:l,className:"border-white/10 bg-white/5 text-white placeholder:text-slate-500 focus:border-cyan-500/50 focus:ring-cyan-500/20"})]}),g.jsxs("div",{className:"relative",children:[g.jsx("div",{className:"absolute -inset-0.5 rounded-lg bg-gradient-to-r from-teal-500 via-cyan-500 to-emerald-500 opacity-0 blur-md transition-all duration-500",style:{opacity:m&&!l?.35:0}}),g.jsx(xt,{type:"submit",size:"lg",className:`relative w-full text-white shadow-lg transition-all duration-300 ${m?"bg-gradient-to-r from-teal-500 via-cyan-500 to-emerald-500 shadow-cyan-500/40":"bg-gradient-to-r from-teal-500 to-emerald-500 shadow-teal-500/25 hover:from-teal-400 hover:to-emerald-400"}`,disabled:l,children:l?g.jsxs(g.Fragment,{children:[g.jsx(fi,{size:"sm",className:"text-white"}),g.jsx("span",{className:"ml-2",children:"Signing in..."})]}):"Sign in"})]})]}),g.jsxs("div",{className:"mt-6 text-center text-sm text-slate-500",children:["Need an account?"," ",g.jsx("a",{href:"https://github.com/AntonAndrusenko/shopify-mcp-admin#readme",target:"_blank",rel:"noopener noreferrer",className:"text-cyan-400 transition-colors hover:text-cyan-300",children:"View API documentation"})]})]})]})]})}const fde=Ys("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),tw=v.forwardRef(({className:e,variant:t,...n},r)=>g.jsx("div",{ref:r,role:"alert",className:fe(fde({variant:t}),e),...n}));tw.displayName="Alert";const dde=v.forwardRef(({className:e,...t},n)=>g.jsx("h5",{ref:n,className:fe("mb-1 font-medium leading-none tracking-tight",e),...t}));dde.displayName="AlertTitle";const nw=v.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,className:fe("text-sm [&_p]:leading-relaxed",e),...t}));nw.displayName="AlertDescription";function rM(e,[t,n]){return Math.min(n,Math.max(t,e))}function hde(e){const t=pde(e),n=v.forwardRef((r,i)=>{const{children:l,...s}=r,u=v.Children.toArray(l),f=u.find(vde);if(f){const h=f.props.children,p=u.map(m=>m===f?v.Children.count(h)>1?v.Children.only(null):v.isValidElement(h)?h.props.children:null:m);return g.jsx(t,{...s,ref:i,children:v.isValidElement(h)?v.cloneElement(h,void 0,p):null})}return g.jsx(t,{...s,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}function pde(e){const t=v.forwardRef((n,r)=>{const{children:i,...l}=n;if(v.isValidElement(i)){const s=yde(i),u=gde(l,i.props);return i.type!==v.Fragment&&(u.ref=r?Zn(r,s):s),v.cloneElement(i,u)}return v.Children.count(i)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var mde=Symbol("radix.slottable");function vde(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===mde}function gde(e,t){const n={...t};for(const r in t){const i=e[r],l=t[r];/^on[A-Z]/.test(r)?i&&l?n[r]=(...u)=>{const f=l(...u);return i(...u),f}:i&&(n[r]=i):r==="style"?n[r]={...i,...l}:r==="className"&&(n[r]=[i,l].filter(Boolean).join(" "))}return{...e,...n}}function yde(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Gz(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Yz=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),bde="VisuallyHidden",xde=v.forwardRef((e,t)=>g.jsx(Te.span,{...e,ref:t,style:{...Yz,...e.style}}));xde.displayName=bde;var wde=[" ","Enter","ArrowUp","ArrowDown"],Sde=[" ","Enter"],ml="Select",[sv,cv,Ede]=Hw(ml),[dc]=Kr(ml,[Ede,xo]),uv=xo(),[Cde,Co]=dc(ml),[Ade,Ode]=dc(ml),Wz=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:l,value:s,defaultValue:u,onValueChange:f,dir:h,name:p,autoComplete:m,disabled:b,required:x,form:S}=e,E=uv(t),[C,A]=v.useState(null),[_,N]=v.useState(null),[j,T]=v.useState(!1),k=pm(h),[R,D]=mi({prop:r,defaultProp:i??!1,onChange:l,caller:ml}),[B,Q]=mi({prop:s,defaultProp:u,onChange:f,caller:ml}),F=v.useRef(null),G=C?S||!!C.closest("form"):!0,[te,ce]=v.useState(new Set),he=Array.from(te).map(I=>I.props.value).join(";");return g.jsx(sm,{...E,children:g.jsxs(Cde,{required:x,scope:t,trigger:C,onTriggerChange:A,valueNode:_,onValueNodeChange:N,valueNodeHasChildren:j,onValueNodeHasChildrenChange:T,contentId:Sn(),value:B,onValueChange:Q,open:R,onOpenChange:D,dir:k,triggerPointerDownPosRef:F,disabled:b,children:[g.jsx(sv.Provider,{scope:t,children:g.jsx(Ade,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(I=>{ce(q=>new Set(q).add(I))},[]),onNativeOptionRemove:v.useCallback(I=>{ce(q=>{const H=new Set(q);return H.delete(I),H})},[]),children:n})}),G?g.jsxs(b4,{"aria-hidden":!0,required:x,tabIndex:-1,name:p,autoComplete:m,value:B,onChange:I=>Q(I.target.value),disabled:b,form:S,children:[B===void 0?g.jsx("option",{value:""}):null,Array.from(te)]},he):null]})})};Wz.displayName=ml;var Xz="SelectTrigger",Qz=v.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,l=uv(n),s=Co(Xz,n),u=s.disabled||r,f=Ke(t,s.onTriggerChange),h=cv(n),p=v.useRef("touch"),[m,b,x]=w4(E=>{const C=h().filter(N=>!N.disabled),A=C.find(N=>N.value===s.value),_=S4(C,E,A);_!==void 0&&s.onValueChange(_.value)}),S=E=>{u||(s.onOpenChange(!0),x()),E&&(s.triggerPointerDownPosRef.current={x:Math.round(E.pageX),y:Math.round(E.pageY)})};return g.jsx(cm,{asChild:!0,...l,children:g.jsx(Te.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":x4(s.value)?"":void 0,...i,ref:f,onClick:be(i.onClick,E=>{E.currentTarget.focus(),p.current!=="mouse"&&S(E)}),onPointerDown:be(i.onPointerDown,E=>{p.current=E.pointerType;const C=E.target;C.hasPointerCapture(E.pointerId)&&C.releasePointerCapture(E.pointerId),E.button===0&&E.ctrlKey===!1&&E.pointerType==="mouse"&&(S(E),E.preventDefault())}),onKeyDown:be(i.onKeyDown,E=>{const C=m.current!=="";!(E.ctrlKey||E.altKey||E.metaKey)&&E.key.length===1&&b(E.key),!(C&&E.key===" ")&&wde.includes(E.key)&&(S(),E.preventDefault())})})})});Qz.displayName=Xz;var Zz="SelectValue",Jz=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:l,placeholder:s="",...u}=e,f=Co(Zz,n),{onValueNodeHasChildrenChange:h}=f,p=l!==void 0,m=Ke(t,f.onValueNodeChange);return Wt(()=>{h(p)},[h,p]),g.jsx(Te.span,{...u,ref:m,style:{pointerEvents:"none"},children:x4(f.value)?g.jsx(g.Fragment,{children:s}):l})});Jz.displayName=Zz;var Nde="SelectIcon",e4=v.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return g.jsx(Te.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});e4.displayName=Nde;var _de="SelectPortal",t4=e=>g.jsx(Zs,{asChild:!0,...e});t4.displayName=_de;var vl="SelectContent",n4=v.forwardRef((e,t)=>{const n=Co(vl,e.__scopeSelect),[r,i]=v.useState();if(Wt(()=>{i(new DocumentFragment)},[]),!n.open){const l=r;return l?yl.createPortal(g.jsx(r4,{scope:e.__scopeSelect,children:g.jsx(sv.Slot,{scope:e.__scopeSelect,children:g.jsx("div",{children:e.children})})}),l):null}return g.jsx(a4,{...e,ref:t})});n4.displayName=vl;var Jr=10,[r4,Ao]=dc(vl),jde="SelectContentImpl",Tde=hde("SelectContent.RemoveScroll"),a4=v.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:l,onPointerDownOutside:s,side:u,sideOffset:f,align:h,alignOffset:p,arrowPadding:m,collisionBoundary:b,collisionPadding:x,sticky:S,hideWhenDetached:E,avoidCollisions:C,...A}=e,_=Co(vl,n),[N,j]=v.useState(null),[T,k]=v.useState(null),R=Ke(t,Y=>j(Y)),[D,B]=v.useState(null),[Q,F]=v.useState(null),G=cv(n),[te,ce]=v.useState(!1),he=v.useRef(!1);v.useEffect(()=>{if(N)return Aw(N)},[N]),Cw();const I=v.useCallback(Y=>{const[pe,...V]=G().map(ie=>ie.ref.current),[me]=V.slice(-1),ye=document.activeElement;for(const ie of Y)if(ie===ye||(ie?.scrollIntoView({block:"nearest"}),ie===pe&&T&&(T.scrollTop=0),ie===me&&T&&(T.scrollTop=T.scrollHeight),ie?.focus(),document.activeElement!==ye))return},[G,T]),q=v.useCallback(()=>I([D,N]),[I,D,N]);v.useEffect(()=>{te&&q()},[te,q]);const{onOpenChange:H,triggerPointerDownPosRef:X}=_;v.useEffect(()=>{if(N){let Y={x:0,y:0};const pe=me=>{Y={x:Math.abs(Math.round(me.pageX)-(X.current?.x??0)),y:Math.abs(Math.round(me.pageY)-(X.current?.y??0))}},V=me=>{Y.x<=10&&Y.y<=10?me.preventDefault():N.contains(me.target)||H(!1),document.removeEventListener("pointermove",pe),X.current=null};return X.current!==null&&(document.addEventListener("pointermove",pe),document.addEventListener("pointerup",V,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",pe),document.removeEventListener("pointerup",V,{capture:!0})}}},[N,H,X]),v.useEffect(()=>{const Y=()=>H(!1);return window.addEventListener("blur",Y),window.addEventListener("resize",Y),()=>{window.removeEventListener("blur",Y),window.removeEventListener("resize",Y)}},[H]);const[ge,L]=w4(Y=>{const pe=G().filter(ye=>!ye.disabled),V=pe.find(ye=>ye.ref.current===document.activeElement),me=S4(pe,Y,V);me&&setTimeout(()=>me.ref.current.focus())}),z=v.useCallback((Y,pe,V)=>{const me=!he.current&&!V;(_.value!==void 0&&_.value===pe||me)&&(B(Y),me&&(he.current=!0))},[_.value]),P=v.useCallback(()=>N?.focus(),[N]),W=v.useCallback((Y,pe,V)=>{const me=!he.current&&!V;(_.value!==void 0&&_.value===pe||me)&&F(Y)},[_.value]),ne=r==="popper"?rw:i4,se=ne===rw?{side:u,sideOffset:f,align:h,alignOffset:p,arrowPadding:m,collisionBoundary:b,collisionPadding:x,sticky:S,hideWhenDetached:E,avoidCollisions:C}:{};return g.jsx(r4,{scope:n,content:N,viewport:T,onViewportChange:k,itemRefCallback:z,selectedItem:D,onItemLeave:P,itemTextRefCallback:W,focusSelectedItem:q,selectedItemText:Q,position:r,isPositioned:te,searchRef:ge,children:g.jsx(tm,{as:Tde,allowPinchZoom:!0,children:g.jsx(Jp,{asChild:!0,trapped:_.open,onMountAutoFocus:Y=>{Y.preventDefault()},onUnmountAutoFocus:be(i,Y=>{_.trigger?.focus({preventScroll:!0}),Y.preventDefault()}),children:g.jsx(Qs,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:Y=>Y.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:g.jsx(ne,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:Y=>Y.preventDefault(),...A,...se,onPlaced:()=>ce(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...A.style},onKeyDown:be(A.onKeyDown,Y=>{const pe=Y.ctrlKey||Y.altKey||Y.metaKey;if(Y.key==="Tab"&&Y.preventDefault(),!pe&&Y.key.length===1&&L(Y.key),["ArrowUp","ArrowDown","Home","End"].includes(Y.key)){let me=G().filter(ye=>!ye.disabled).map(ye=>ye.ref.current);if(["ArrowUp","End"].includes(Y.key)&&(me=me.slice().reverse()),["ArrowUp","ArrowDown"].includes(Y.key)){const ye=Y.target,ie=me.indexOf(ye);me=me.slice(ie+1)}setTimeout(()=>I(me)),Y.preventDefault()}})})})})})})});a4.displayName=jde;var Mde="SelectItemAlignedPosition",i4=v.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,l=Co(vl,n),s=Ao(vl,n),[u,f]=v.useState(null),[h,p]=v.useState(null),m=Ke(t,R=>p(R)),b=cv(n),x=v.useRef(!1),S=v.useRef(!0),{viewport:E,selectedItem:C,selectedItemText:A,focusSelectedItem:_}=s,N=v.useCallback(()=>{if(l.trigger&&l.valueNode&&u&&h&&E&&C&&A){const R=l.trigger.getBoundingClientRect(),D=h.getBoundingClientRect(),B=l.valueNode.getBoundingClientRect(),Q=A.getBoundingClientRect();if(l.dir!=="rtl"){const ye=Q.left-D.left,ie=B.left-ye,ke=R.left-ie,ve=R.width+ke,Je=Math.max(ve,D.width),tt=window.innerWidth-Jr,mt=rM(ie,[Jr,Math.max(Jr,tt-Je)]);u.style.minWidth=ve+"px",u.style.left=mt+"px"}else{const ye=D.right-Q.right,ie=window.innerWidth-B.right-ye,ke=window.innerWidth-R.right-ie,ve=R.width+ke,Je=Math.max(ve,D.width),tt=window.innerWidth-Jr,mt=rM(ie,[Jr,Math.max(Jr,tt-Je)]);u.style.minWidth=ve+"px",u.style.right=mt+"px"}const F=b(),G=window.innerHeight-Jr*2,te=E.scrollHeight,ce=window.getComputedStyle(h),he=parseInt(ce.borderTopWidth,10),I=parseInt(ce.paddingTop,10),q=parseInt(ce.borderBottomWidth,10),H=parseInt(ce.paddingBottom,10),X=he+I+te+H+q,ge=Math.min(C.offsetHeight*5,X),L=window.getComputedStyle(E),z=parseInt(L.paddingTop,10),P=parseInt(L.paddingBottom,10),W=R.top+R.height/2-Jr,ne=G-W,se=C.offsetHeight/2,Y=C.offsetTop+se,pe=he+I+Y,V=X-pe;if(pe<=W){const ye=F.length>0&&C===F[F.length-1].ref.current;u.style.bottom="0px";const ie=h.clientHeight-E.offsetTop-E.offsetHeight,ke=Math.max(ne,se+(ye?P:0)+ie+q),ve=pe+ke;u.style.height=ve+"px"}else{const ye=F.length>0&&C===F[0].ref.current;u.style.top="0px";const ke=Math.max(W,he+E.offsetTop+(ye?z:0)+se)+V;u.style.height=ke+"px",E.scrollTop=pe-W+E.offsetTop}u.style.margin=`${Jr}px 0`,u.style.minHeight=ge+"px",u.style.maxHeight=G+"px",r?.(),requestAnimationFrame(()=>x.current=!0)}},[b,l.trigger,l.valueNode,u,h,E,C,A,l.dir,r]);Wt(()=>N(),[N]);const[j,T]=v.useState();Wt(()=>{h&&T(window.getComputedStyle(h).zIndex)},[h]);const k=v.useCallback(R=>{R&&S.current===!0&&(N(),_?.(),S.current=!1)},[N,_]);return g.jsx(Dde,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:x,onScrollButtonChange:k,children:g.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:g.jsx(Te.div,{...i,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});i4.displayName=Mde;var Rde="SelectPopperPosition",rw=v.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Jr,...l}=e,s=uv(n);return g.jsx(um,{...s,...l,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});rw.displayName=Rde;var[Dde,BS]=dc(vl,{}),aw="SelectViewport",o4=v.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,l=Ao(aw,n),s=BS(aw,n),u=Ke(t,l.onViewportChange),f=v.useRef(0);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),g.jsx(sv.Slot,{scope:n,children:g.jsx(Te.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:be(i.onScroll,h=>{const p=h.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:b}=s;if(b?.current&&m){const x=Math.abs(f.current-p.scrollTop);if(x>0){const S=window.innerHeight-Jr*2,E=parseFloat(m.style.minHeight),C=parseFloat(m.style.height),A=Math.max(E,C);if(A<S){const _=A+x,N=Math.min(S,_),j=_-N;m.style.height=N+"px",m.style.bottom==="0px"&&(p.scrollTop=j>0?j:0,m.style.justifyContent="flex-end")}}}f.current=p.scrollTop})})})]})});o4.displayName=aw;var l4="SelectGroup",[Pde,kde]=dc(l4),Ide=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Sn();return g.jsx(Pde,{scope:n,id:i,children:g.jsx(Te.div,{role:"group","aria-labelledby":i,...r,ref:t})})});Ide.displayName=l4;var s4="SelectLabel",c4=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=kde(s4,n);return g.jsx(Te.div,{id:i.id,...r,ref:t})});c4.displayName=s4;var Yp="SelectItem",[Lde,u4]=dc(Yp),f4=v.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:l,...s}=e,u=Co(Yp,n),f=Ao(Yp,n),h=u.value===r,[p,m]=v.useState(l??""),[b,x]=v.useState(!1),S=Ke(t,_=>f.itemRefCallback?.(_,r,i)),E=Sn(),C=v.useRef("touch"),A=()=>{i||(u.onValueChange(r),u.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return g.jsx(Lde,{scope:n,value:r,disabled:i,textId:E,isSelected:h,onItemTextChange:v.useCallback(_=>{m(N=>N||(_?.textContent??"").trim())},[]),children:g.jsx(sv.ItemSlot,{scope:n,value:r,disabled:i,textValue:p,children:g.jsx(Te.div,{role:"option","aria-labelledby":E,"data-highlighted":b?"":void 0,"aria-selected":h&&b,"data-state":h?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...s,ref:S,onFocus:be(s.onFocus,()=>x(!0)),onBlur:be(s.onBlur,()=>x(!1)),onClick:be(s.onClick,()=>{C.current!=="mouse"&&A()}),onPointerUp:be(s.onPointerUp,()=>{C.current==="mouse"&&A()}),onPointerDown:be(s.onPointerDown,_=>{C.current=_.pointerType}),onPointerMove:be(s.onPointerMove,_=>{C.current=_.pointerType,i?f.onItemLeave?.():C.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:be(s.onPointerLeave,_=>{_.currentTarget===document.activeElement&&f.onItemLeave?.()}),onKeyDown:be(s.onKeyDown,_=>{f.searchRef?.current!==""&&_.key===" "||(Sde.includes(_.key)&&A(),_.key===" "&&_.preventDefault())})})})})});f4.displayName=Yp;var wu="SelectItemText",d4=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...l}=e,s=Co(wu,n),u=Ao(wu,n),f=u4(wu,n),h=Ode(wu,n),[p,m]=v.useState(null),b=Ke(t,A=>m(A),f.onItemTextChange,A=>u.itemTextRefCallback?.(A,f.value,f.disabled)),x=p?.textContent,S=v.useMemo(()=>g.jsx("option",{value:f.value,disabled:f.disabled,children:x},f.value),[f.disabled,f.value,x]),{onNativeOptionAdd:E,onNativeOptionRemove:C}=h;return Wt(()=>(E(S),()=>C(S)),[E,C,S]),g.jsxs(g.Fragment,{children:[g.jsx(Te.span,{id:f.textId,...l,ref:b}),f.isSelected&&s.valueNode&&!s.valueNodeHasChildren?yl.createPortal(l.children,s.valueNode):null]})});d4.displayName=wu;var h4="SelectItemIndicator",p4=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return u4(h4,n).isSelected?g.jsx(Te.span,{"aria-hidden":!0,...r,ref:t}):null});p4.displayName=h4;var iw="SelectScrollUpButton",m4=v.forwardRef((e,t)=>{const n=Ao(iw,e.__scopeSelect),r=BS(iw,e.__scopeSelect),[i,l]=v.useState(!1),s=Ke(t,r.onScrollButtonChange);return Wt(()=>{if(n.viewport&&n.isPositioned){let u=function(){const h=f.scrollTop>0;l(h)};const f=n.viewport;return u(),f.addEventListener("scroll",u),()=>f.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?g.jsx(g4,{...e,ref:s,onAutoScroll:()=>{const{viewport:u,selectedItem:f}=n;u&&f&&(u.scrollTop=u.scrollTop-f.offsetHeight)}}):null});m4.displayName=iw;var ow="SelectScrollDownButton",v4=v.forwardRef((e,t)=>{const n=Ao(ow,e.__scopeSelect),r=BS(ow,e.__scopeSelect),[i,l]=v.useState(!1),s=Ke(t,r.onScrollButtonChange);return Wt(()=>{if(n.viewport&&n.isPositioned){let u=function(){const h=f.scrollHeight-f.clientHeight,p=Math.ceil(f.scrollTop)<h;l(p)};const f=n.viewport;return u(),f.addEventListener("scroll",u),()=>f.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),i?g.jsx(g4,{...e,ref:s,onAutoScroll:()=>{const{viewport:u,selectedItem:f}=n;u&&f&&(u.scrollTop=u.scrollTop+f.offsetHeight)}}):null});v4.displayName=ow;var g4=v.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,l=Ao("SelectScrollButton",n),s=v.useRef(null),u=cv(n),f=v.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return v.useEffect(()=>()=>f(),[f]),Wt(()=>{u().find(p=>p.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[u]),g.jsx(Te.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:be(i.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:be(i.onPointerMove,()=>{l.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:be(i.onPointerLeave,()=>{f()})})}),zde="SelectSeparator",y4=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return g.jsx(Te.div,{"aria-hidden":!0,...r,ref:t})});y4.displayName=zde;var lw="SelectArrow",$de=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=uv(n),l=Co(lw,n),s=Ao(lw,n);return l.open&&s.position==="popper"?g.jsx(fm,{...i,...r,ref:t}):null});$de.displayName=lw;var Bde="SelectBubbleInput",b4=v.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=v.useRef(null),l=Ke(r,i),s=Gz(t);return v.useEffect(()=>{const u=i.current;if(!u)return;const f=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(f,"value").set;if(s!==t&&p){const m=new Event("change",{bubbles:!0});p.call(u,t),u.dispatchEvent(m)}},[s,t]),g.jsx(Te.select,{...n,style:{...Yz,...n.style},ref:l,defaultValue:t})});b4.displayName=Bde;function x4(e){return e===""||e===void 0}function w4(e){const t=ia(e),n=v.useRef(""),r=v.useRef(0),i=v.useCallback(s=>{const u=n.current+s;t(u),(function f(h){n.current=h,window.clearTimeout(r.current),h!==""&&(r.current=window.setTimeout(()=>f(""),1e3))})(u)},[t]),l=v.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,l]}function S4(e,t,n){const i=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,l=n?e.indexOf(n):-1;let s=Ude(e,Math.max(l,0));i.length===1&&(s=s.filter(h=>h!==n));const f=s.find(h=>h.textValue.toLowerCase().startsWith(i.toLowerCase()));return f!==n?f:void 0}function Ude(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Hde=Wz,E4=Qz,qde=Jz,Fde=e4,Kde=t4,C4=n4,Vde=o4,A4=c4,O4=f4,Gde=d4,Yde=p4,N4=m4,_4=v4,j4=y4;const Wde=Hde,Xde=qde,T4=v.forwardRef(({className:e,children:t,...n},r)=>g.jsxs(E4,{ref:r,className:fe("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background cursor-pointer placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,g.jsx(Fde,{asChild:!0,children:g.jsx(IM,{className:"h-4 w-4 opacity-50"})})]}));T4.displayName=E4.displayName;const M4=v.forwardRef(({className:e,...t},n)=>g.jsx(N4,{ref:n,className:fe("flex cursor-default items-center justify-center py-1",e),...t,children:g.jsx(wH,{className:"h-4 w-4"})}));M4.displayName=N4.displayName;const R4=v.forwardRef(({className:e,...t},n)=>g.jsx(_4,{ref:n,className:fe("flex cursor-default items-center justify-center py-1",e),...t,children:g.jsx(IM,{className:"h-4 w-4"})}));R4.displayName=_4.displayName;const D4=v.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>g.jsx(Kde,{children:g.jsxs(C4,{ref:i,className:fe("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[g.jsx(M4,{}),g.jsx(Vde,{className:fe("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),g.jsx(R4,{})]})}));D4.displayName=C4.displayName;const Qde=v.forwardRef(({className:e,...t},n)=>g.jsx(A4,{ref:n,className:fe("px-2 py-1.5 text-sm font-semibold",e),...t}));Qde.displayName=A4.displayName;const sw=v.forwardRef(({className:e,children:t,...n},r)=>g.jsxs(O4,{ref:r,className:fe("relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",e),...n,children:[g.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(Yde,{children:g.jsx(tf,{className:"h-4 w-4"})})}),g.jsx(Gde,{children:t})]}));sw.displayName=O4.displayName;const Zde=v.forwardRef(({className:e,...t},n)=>g.jsx(j4,{ref:n,className:fe("-mx-1 my-1 h-px bg-muted",e),...t}));Zde.displayName=j4.displayName;function Jde(){const e=gl();return Us({mutationFn:t=>$P.updateMe(t),onSuccess:()=>{e.invalidateQueries({queryKey:["tenant","me"]}),Mn.success("Profile updated successfully")},onError:t=>{Mn.error(t.message||"Failed to update profile")}})}function ehe(){return Us({mutationFn:({currentPassword:e,newPassword:t})=>$P.changePassword(e,t),onSuccess:()=>{Mn.success("Password changed successfully")},onError:e=>{Mn.error(e.message||"Failed to change password")}})}function the(){const{user:e,refreshUser:t}=ff(),{data:n,isLoading:r,error:i}=xm(),l=Jde(),s=ehe(),u=Array.isArray(n)?n:[],[f,h]=v.useState(e?.name||""),[p,m]=v.useState(e?.defaultShopId||""),[b,x]=v.useState(""),[S,E]=v.useState(""),[C,A]=v.useState(""),[_,N]=v.useState(""),T=(D=>{let B=0;return D.length>=8&&(B+=25),D.length>=12&&(B+=25),/[A-Z]/.test(D)&&/[a-z]/.test(D)&&(B+=25),/[0-9]/.test(D)&&/[^A-Za-z0-9]/.test(D)&&(B+=25),B})(S),k=async D=>{D.preventDefault();try{await l.mutateAsync({name:f,defaultShopId:p||null}),await t()}catch(B){console.error("Profile update error:",B)}},R=async D=>{if(D.preventDefault(),N(""),S.length<12){N("Password must be at least 12 characters");return}if(S!==C){N("Passwords do not match");return}try{await s.mutateAsync({currentPassword:b,newPassword:S}),x(""),E(""),A("")}catch(B){N(B instanceof Error?B.message:"Failed to change password")}};return g.jsxs("div",{className:"flex flex-col gap-6 animate-fade-in",children:[g.jsxs(ai,{className:"animate-fade-in-up",children:[g.jsx(ii,{children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-primary/10",children:g.jsx(iq,{className:"h-4 w-4 text-primary"})}),g.jsxs("div",{children:[g.jsx(oi,{className:"text-lg",children:"Profile"}),g.jsx(fo,{children:"Update your profile information and default shop"})]})]})}),g.jsx(li,{children:g.jsxs("form",{onSubmit:k,className:"space-y-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx(kn,{htmlFor:"name",children:"Display Name"}),g.jsx(pr,{id:"name",value:f,onChange:D=>h(D.target.value),required:!0})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(kn,{htmlFor:"email",children:"Email"}),g.jsx(pr,{id:"email",type:"email",value:e?.email||"",disabled:!0,className:"bg-muted"}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"Email cannot be changed"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(kn,{htmlFor:"defaultShop",children:"Default Shop"}),i?g.jsx(tw,{variant:"destructive",children:g.jsx(nw,{children:"Failed to load shops. Please refresh the page."})}):r?g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(fi,{size:"sm"}),g.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading shops..."})]}):g.jsxs(Wde,{value:p||"none",onValueChange:D=>m(D==="none"?"":D),children:[g.jsx(T4,{id:"defaultShop",children:g.jsx(Xde,{placeholder:"None"})}),g.jsxs(D4,{children:[g.jsx(sw,{value:"none",children:"None"}),u.map(D=>g.jsx(sw,{value:D.id,children:D.domain},D.id))]})]}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"The default shop will be used when no shop is specified"})]}),g.jsx(xt,{type:"submit",disabled:l.isPending,children:l.isPending?g.jsxs(g.Fragment,{children:[g.jsx(fi,{size:"sm"}),"Saving..."]}):"Save Changes"})]})})]}),g.jsxs(ai,{className:"animate-fade-in-up",style:{animationDelay:"100ms"},children:[g.jsx(ii,{children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-primary/10",children:g.jsx(JH,{className:"h-4 w-4 text-primary"})}),g.jsxs("div",{children:[g.jsx(oi,{className:"text-lg",children:"Security"}),g.jsx(fo,{children:"Change your password"})]})]})}),g.jsx(li,{children:g.jsxs("form",{onSubmit:R,className:"space-y-4",children:[_&&g.jsx(tw,{variant:"destructive",children:g.jsx(nw,{children:_})}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(kn,{htmlFor:"currentPassword",children:"Current Password"}),g.jsx(pr,{id:"currentPassword",type:"password",value:b,onChange:D=>x(D.target.value),required:!0})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(kn,{htmlFor:"newPassword",children:"New Password"}),g.jsx(pr,{id:"newPassword",type:"password",value:S,onChange:D=>E(D.target.value),required:!0}),S&&g.jsxs("div",{className:"space-y-1",children:[g.jsxs("div",{className:"flex items-center justify-between text-xs",children:[g.jsx("span",{className:"text-muted-foreground",children:"Password strength"}),g.jsx("span",{className:T<50?"text-destructive":T<75?"text-amber-500":"text-green-500",children:T<50?"Weak":T<75?"Medium":"Strong"})]}),g.jsx(PS,{value:T,className:`h-1 ${T<50?"[&>div]:bg-destructive":T<75?"[&>div]:bg-amber-500":"[&>div]:bg-green-500"}`})]}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"Must be at least 12 characters"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(kn,{htmlFor:"confirmPassword",children:"Confirm New Password"}),g.jsx(pr,{id:"confirmPassword",type:"password",value:C,onChange:D=>A(D.target.value),required:!0}),C&&S!==C&&g.jsx("p",{className:"text-xs text-destructive",children:"Passwords do not match"})]}),g.jsx(xt,{type:"submit",disabled:s.isPending,children:s.isPending?g.jsxs(g.Fragment,{children:[g.jsx(fi,{size:"sm"}),"Updating..."]}):"Update Password"})]})})]})]})}var fv="Checkbox",[nhe]=Kr(fv),[rhe,US]=nhe(fv);function ahe(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:l,form:s,name:u,onCheckedChange:f,required:h,value:p="on",internal_do_not_use_render:m}=e,[b,x]=mi({prop:n,defaultProp:i??!1,onChange:f,caller:fv}),[S,E]=v.useState(null),[C,A]=v.useState(null),_=v.useRef(!1),N=S?!!s||!!S.closest("form"):!0,j={checked:b,disabled:l,setChecked:x,control:S,setControl:E,name:u,form:s,value:p,hasConsumerStoppedPropagationRef:_,required:h,defaultChecked:po(i)?!1:i,isFormControl:N,bubbleInput:C,setBubbleInput:A};return g.jsx(rhe,{scope:t,...j,children:ihe(m)?m(j):r})}var P4="CheckboxTrigger",k4=v.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{const{control:l,value:s,disabled:u,checked:f,required:h,setControl:p,setChecked:m,hasConsumerStoppedPropagationRef:b,isFormControl:x,bubbleInput:S}=US(P4,e),E=Ke(i,p),C=v.useRef(f);return v.useEffect(()=>{const A=l?.form;if(A){const _=()=>m(C.current);return A.addEventListener("reset",_),()=>A.removeEventListener("reset",_)}},[l,m]),g.jsx(Te.button,{type:"button",role:"checkbox","aria-checked":po(f)?"mixed":f,"aria-required":h,"data-state":B4(f),"data-disabled":u?"":void 0,disabled:u,value:s,...r,ref:E,onKeyDown:be(t,A=>{A.key==="Enter"&&A.preventDefault()}),onClick:be(n,A=>{m(_=>po(_)?!0:!_),S&&x&&(b.current=A.isPropagationStopped(),b.current||A.stopPropagation())})})});k4.displayName=P4;var HS=v.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:l,required:s,disabled:u,value:f,onCheckedChange:h,form:p,...m}=e;return g.jsx(ahe,{__scopeCheckbox:n,checked:i,defaultChecked:l,disabled:u,required:s,onCheckedChange:h,name:r,form:p,value:f,internal_do_not_use_render:({isFormControl:b})=>g.jsxs(g.Fragment,{children:[g.jsx(k4,{...m,ref:t,__scopeCheckbox:n}),b&&g.jsx($4,{__scopeCheckbox:n})]})})});HS.displayName=fv;var I4="CheckboxIndicator",L4=v.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,l=US(I4,n);return g.jsx(Jn,{present:r||po(l.checked)||l.checked===!0,children:g.jsx(Te.span,{"data-state":B4(l.checked),"data-disabled":l.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});L4.displayName=I4;var z4="CheckboxBubbleInput",$4=v.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:i,checked:l,defaultChecked:s,required:u,disabled:f,name:h,value:p,form:m,bubbleInput:b,setBubbleInput:x}=US(z4,e),S=Ke(n,x),E=Gz(l),C=GR(r);v.useEffect(()=>{const _=b;if(!_)return;const N=window.HTMLInputElement.prototype,T=Object.getOwnPropertyDescriptor(N,"checked").set,k=!i.current;if(E!==l&&T){const R=new Event("click",{bubbles:k});_.indeterminate=po(l),T.call(_,po(l)?!1:l),_.dispatchEvent(R)}},[b,E,l,i]);const A=v.useRef(po(l)?!1:l);return g.jsx(Te.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??A.current,required:u,disabled:f,name:h,value:p,form:m,...t,tabIndex:-1,ref:S,style:{...t.style,...C,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});$4.displayName=z4;function ihe(e){return typeof e=="function"}function po(e){return e==="indeterminate"}function B4(e){return po(e)?"indeterminate":e?"checked":"unchecked"}const U4=v.forwardRef(({className:e,...t},n)=>g.jsx(HS,{ref:n,className:fe("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow cursor-pointer focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:g.jsx(L4,{className:fe("flex items-center justify-center text-current"),children:g.jsx(tf,{className:"h-4 w-4"})})}));U4.displayName=HS.displayName;var dv="Tabs",[ohe]=Kr(dv,[mm]),H4=mm(),[lhe,qS]=ohe(dv),q4=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:l,orientation:s="horizontal",dir:u,activationMode:f="automatic",...h}=e,p=pm(u),[m,b]=mi({prop:r,onChange:i,defaultProp:l??"",caller:dv});return g.jsx(lhe,{scope:n,baseId:Sn(),value:m,onValueChange:b,orientation:s,dir:p,activationMode:f,children:g.jsx(Te.div,{dir:p,"data-orientation":s,...h,ref:t})})});q4.displayName=dv;var F4="TabsList",K4=v.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,l=qS(F4,n),s=H4(n);return g.jsx(BD,{asChild:!0,...s,orientation:l.orientation,dir:l.dir,loop:r,children:g.jsx(Te.div,{role:"tablist","aria-orientation":l.orientation,...i,ref:t})})});K4.displayName=F4;var V4="TabsTrigger",G4=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...l}=e,s=qS(V4,n),u=H4(n),f=X4(s.baseId,r),h=Q4(s.baseId,r),p=r===s.value;return g.jsx(UD,{asChild:!0,...u,focusable:!i,active:p,children:g.jsx(Te.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":h,"data-state":p?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:f,...l,ref:t,onMouseDown:be(e.onMouseDown,m=>{!i&&m.button===0&&m.ctrlKey===!1?s.onValueChange(r):m.preventDefault()}),onKeyDown:be(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&s.onValueChange(r)}),onFocus:be(e.onFocus,()=>{const m=s.activationMode!=="manual";!p&&!i&&m&&s.onValueChange(r)})})})});G4.displayName=V4;var Y4="TabsContent",W4=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:l,...s}=e,u=qS(Y4,n),f=X4(u.baseId,r),h=Q4(u.baseId,r),p=r===u.value,m=v.useRef(p);return v.useEffect(()=>{const b=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(b)},[]),g.jsx(Jn,{present:i||p,children:({present:b})=>g.jsx(Te.div,{"data-state":p?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":f,hidden:!b,id:h,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:b&&l})})});W4.displayName=Y4;function X4(e,t){return`${e}-trigger-${t}`}function Q4(e,t){return`${e}-content-${t}`}var she=q4,Z4=K4,J4=G4,e$=W4;const che=she,t$=v.forwardRef(({className:e,...t},n)=>g.jsx(Z4,{ref:n,className:fe("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));t$.displayName=Z4.displayName;const cw=v.forwardRef(({className:e,...t},n)=>g.jsx(J4,{ref:n,className:fe("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background cursor-pointer transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));cw.displayName=J4.displayName;const uw=v.forwardRef(({className:e,...t},n)=>g.jsx(e$,{ref:n,className:fe("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));uw.displayName=e$.displayName;function uhe(){const{data:e,isLoading:t}=xm(),n=AY(),r=OY(),i=$w(),[l,s]=v.useState(!1),[u,f]=v.useState("oauth"),[h,p]=v.useState(""),[m,b]=v.useState(""),[x,S]=v.useState(""),[E,C]=v.useState(!1),[A,_]=v.useState({open:!1,shopId:null}),N=async D=>{D.preventDefault();const B=h.replace(/^https?:\/\//,"").replace(/\/$/,"");window.location.href=`/oauth/install?shop=${encodeURIComponent(B)}`},j=async D=>{D.preventDefault(),await n.mutateAsync({domain:m,accessToken:x,setAsDefault:E}),s(!1),b(""),S(""),C(!1)},T=async()=>{A.shopId&&(await r.mutateAsync(A.shopId),_({open:!1,shopId:null}))},k=g.jsxs(che,{value:u,onValueChange:D=>f(D),children:[g.jsxs(t$,{className:"grid w-full grid-cols-2",children:[g.jsxs(cw,{value:"oauth",children:[g.jsx(HH,{className:"h-4 w-4 mr-1.5"}),"OAuth"]}),g.jsxs(cw,{value:"manual",children:[g.jsx(kH,{className:"h-4 w-4 mr-1.5"}),"Manual"]})]}),g.jsx(uw,{value:"oauth",children:g.jsxs("form",{onSubmit:N,children:[g.jsxs("div",{className:"space-y-4 py-4",children:[g.jsx("div",{className:"rounded-lg bg-muted p-3",children:g.jsxs("p",{className:"text-sm text-muted-foreground",children:[g.jsx("strong",{className:"text-foreground",children:"Secure authentication:"})," You'll be redirected to Shopify to authorize this app."]})}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(kn,{htmlFor:"oauth-domain",children:"Shop Domain"}),g.jsx(pr,{id:"oauth-domain",placeholder:"mystore.myshopify.com or custom-domain.com",value:h,onChange:D=>p(D.target.value),required:!0}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"Enter your Shopify domain or custom domain"})]})]}),g.jsxs("div",{className:"flex flex-col-reverse sm:flex-row sm:justify-end gap-2",children:[g.jsx(xt,{type:"button",variant:"outline",onClick:()=>s(!1),children:"Cancel"}),g.jsx(xt,{type:"submit",children:"Continue to Shopify"})]})]})}),g.jsx(uw,{value:"manual",children:g.jsxs("form",{onSubmit:j,children:[g.jsxs("div",{className:"space-y-4 py-4",children:[g.jsx("div",{className:"rounded-lg bg-yellow-50 dark:bg-yellow-950 p-3 border border-yellow-200 dark:border-yellow-900",children:g.jsxs("p",{className:"text-sm text-yellow-800 dark:text-yellow-200",children:[g.jsx("strong",{children:"Advanced:"})," Only use this if you have an existing access token."]})}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(kn,{htmlFor:"domain",children:"Shop Domain"}),g.jsx(pr,{id:"domain",placeholder:"mystore.myshopify.com or custom-domain.com",value:m,onChange:D=>b(D.target.value),required:!0})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(kn,{htmlFor:"token",children:"Access Token"}),g.jsx(pr,{id:"token",type:"password",placeholder:"shpat_xxx",value:x,onChange:D=>S(D.target.value),required:!0})]}),g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx(U4,{id:"default",checked:E,onCheckedChange:D=>C(D)}),g.jsx(kn,{htmlFor:"default",className:"text-sm font-medium leading-none",children:"Set as default shop"})]})]}),g.jsxs("div",{className:"flex flex-col-reverse sm:flex-row sm:justify-end gap-2",children:[g.jsx(xt,{type:"button",variant:"outline",onClick:()=>s(!1),children:"Cancel"}),g.jsx(xt,{type:"submit",disabled:n.isPending,children:n.isPending?g.jsxs(g.Fragment,{children:[g.jsx(fi,{size:"sm"}),"Connecting..."]}):"Connect Shop"})]})]})})]}),R=e&&e.length>0;return g.jsxs("div",{className:"flex flex-col gap-6 animate-fade-in",children:[g.jsxs(ai,{children:[g.jsxs(ii,{className:"flex flex-row items-center justify-between space-y-0 pb-4",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx(oi,{children:"Connected Shops"}),g.jsx(fo,{children:"Manage your Shopify store connections for MCP access"})]}),R&&g.jsxs(xt,{onClick:()=>s(!0),children:[g.jsx(ol,{}),"Connect Shop"]})]}),g.jsx(li,{children:t?g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"flex gap-4 pb-2 border-b",children:[g.jsx(ct,{className:"h-4 w-32"}),g.jsx(ct,{className:"h-4 w-20"}),g.jsx(ct,{className:"h-4 w-24 hidden sm:block"}),g.jsx(ct,{className:"h-4 w-16 ml-auto"})]}),[...Array(3)].map((D,B)=>g.jsxs("div",{className:"flex items-center gap-4 py-3 border-b last:border-0",children:[g.jsx(ct,{className:"h-5 w-48"}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(ct,{className:"h-5 w-16 rounded-full"}),g.jsx(ct,{className:"h-5 w-14 rounded-full"})]}),g.jsx(ct,{className:"h-4 w-24 hidden sm:block"}),g.jsx(ct,{className:"h-8 w-8 rounded-md ml-auto"})]},B))]}):e&&e.length>0?g.jsxs(LS,{className:"animate-fade-in",children:[g.jsx(zS,{children:g.jsxs(Zu,{children:[g.jsx(xa,{children:"Domain"}),g.jsx(xa,{children:"Status"}),g.jsx(xa,{className:"hidden sm:table-cell",children:"Connected"}),g.jsx(xa,{className:"text-right",children:"Actions"})]})}),g.jsx($S,{children:e.map(D=>g.jsxs(Zu,{children:[g.jsx(wa,{children:g.jsxs(TS,{children:[g.jsx(MS,{asChild:!0,children:g.jsx("button",{type:"button",className:"font-mono text-sm hover:text-primary transition-colors text-left",children:D.domain})}),g.jsx(lv,{side:"bottom",align:"start",sideOffset:8,alignOffset:-16,className:"w-96 z-[100] max-h-[80vh] overflow-y-auto",children:g.jsxs("div",{className:"space-y-4",children:[g.jsx("div",{className:"space-y-2",children:g.jsxs("div",{className:"flex items-start justify-between gap-4",children:[g.jsxs("div",{className:"space-y-1 flex-1 min-w-0",children:[g.jsx("h4",{className:"text-sm font-semibold leading-none break-words",children:D.domain}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"Connected Shopify store"})]}),g.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[g.jsx(ga,{variant:D.status==="active"?"success":"secondary",className:"text-xs",children:D.status}),D.isDefault&&g.jsx(ga,{variant:"outline",className:"text-xs",children:"Default"})]})]})}),g.jsx("div",{className:"h-px bg-border"}),D.scopes&&D.scopes.length>0&&g.jsxs("div",{className:"space-y-2",children:[g.jsx("h5",{className:"text-xs font-semibold text-foreground",children:"OAuth Scopes"}),g.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[D.scopes.slice(0,8).map((B,Q)=>g.jsx(ga,{variant:"secondary",className:"text-xs font-mono px-2 py-0.5",children:B.replace(/_/g," ")},Q)),D.scopes.length>8&&g.jsxs(ga,{variant:"outline",className:"text-xs",children:["+",D.scopes.length-8," more"]})]})]}),g.jsxs("div",{className:"pt-2 border-t border-border",children:[g.jsxs("p",{className:"text-xs text-muted-foreground",children:[g.jsx("span",{className:"font-medium",children:"Connected:"})," ",new Date(D.connectedAt).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})]}),g.jsxs("div",{className:"mt-2 space-y-1 text-xs text-muted-foreground",children:[g.jsxs("p",{children:[g.jsx("span",{className:"font-medium",children:"Access token expires:"})," ",D.tokenExpiresAt?new Date(D.tokenExpiresAt).toLocaleString():"Not provided (likely non-expiring)"]}),g.jsxs("p",{children:[g.jsx("span",{className:"font-medium",children:"Refresh token stored:"})," ",D.hasRefreshToken?"Yes":"No"]}),D.refreshTokenExpiresAt&&g.jsxs("p",{children:[g.jsx("span",{className:"font-medium",children:"Refresh token expires:"})," ",new Date(D.refreshTokenExpiresAt).toLocaleString()]})]})]})]})})]})}),g.jsx(wa,{children:g.jsxs("div",{className:"flex items-center gap-2",children:[D.tokenStatus==="needs_reauth"?g.jsxs(ga,{variant:"destructive",className:"flex items-center gap-1",children:[g.jsx(rq,{className:"h-3 w-3"}),"Needs Reconnect"]}):D.tokenStatus==="expired"?g.jsxs(ga,{variant:"warning",className:"flex items-center gap-1",children:[g.jsx(WH,{className:"h-3 w-3"}),"Token Expired"]}):g.jsx(ga,{variant:D.status==="active"?"success":"secondary",children:D.status.charAt(0).toUpperCase()+D.status.slice(1)}),D.isDefault&&g.jsx(ga,{variant:"outline",children:"Default"})]})}),g.jsx(wa,{className:"hidden sm:table-cell",children:new Date(D.connectedAt).toLocaleDateString()}),g.jsx(wa,{className:"text-right",children:g.jsxs(xt,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-destructive hover:bg-destructive/10",onClick:()=>_({open:!0,shopId:D.id}),children:[g.jsx($M,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Disconnect shop"})]})})]},D.id))})]}):g.jsx(IS,{icon:g.jsx(js,{className:"h-6 w-6 text-muted-foreground"}),title:"No shops connected yet",description:"Connect your first Shopify store to start using shopify-mcp with your AI assistant.",action:g.jsxs(xt,{size:"lg",onClick:()=>s(!0),children:[g.jsx(ol,{}),"Connect Shop"]})})})]}),i?g.jsx(qp,{open:l,onOpenChange:s,children:g.jsxs(Fp,{children:[g.jsxs(Kp,{children:[g.jsx(Vp,{children:"Connect Shop"}),g.jsx(Gp,{children:"Choose how you'd like to connect your Shopify store"})]}),g.jsx("div",{className:"px-4 pb-4",children:k})]})}):g.jsx(Qh,{open:l,onOpenChange:s,children:g.jsxs(Pu,{className:"sm:max-w-[500px]",children:[g.jsxs(Zh,{children:[g.jsx(ku,{children:"Connect Shop"}),g.jsx(Iu,{children:"Choose how you'd like to connect your Shopify store"})]}),k]})}),g.jsx(Dz,{open:A.open,onOpenChange:D=>_({open:D,shopId:A.shopId}),title:"Disconnect Shop?",description:"This action cannot be undone. Any applications using this shop's data will lose access.",onConfirm:T,confirmLabel:"Disconnect",variant:"destructive",isLoading:r.isPending})]})}function Sh({children:e}){const{isAuthenticated:t,isLoading:n}=ff();return n?g.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background",children:g.jsxs("div",{className:"flex flex-col items-center gap-4",children:[g.jsx(fi,{size:"xl",className:"text-primary"}),g.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]})}):t?g.jsx(TY,{children:e}):g.jsx(XU,{to:"/login",replace:!0})}function fhe(){return g.jsx(w8,{basename:"/app",children:g.jsxs(HG,{children:[g.jsxs(ZU,{children:[g.jsx(gs,{path:"/login",element:g.jsx(ude,{})}),g.jsx(gs,{path:"/",element:g.jsx(Sh,{children:g.jsx(pfe,{})})}),g.jsx(gs,{path:"/shops",element:g.jsx(Sh,{children:g.jsx(uhe,{})})}),g.jsx(gs,{path:"/keys",element:g.jsx(Sh,{children:g.jsx(sde,{})})}),g.jsx(gs,{path:"/settings",element:g.jsx(Sh,{children:g.jsx(the,{})})})]}),g.jsx(nH,{position:"bottom-right",richColors:!0})]})})}const dhe=new $6({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),n$=document.getElementById("root");if(!n$)throw new Error("Root element not found");iU.createRoot(n$).render(g.jsx(ee.StrictMode,{children:g.jsx(U6,{client:dhe,children:g.jsx(fhe,{})})}));
107
- //# sourceMappingURL=index-BSh6M640.js.map