@its/core 1.1.32 → 1.1.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core.es.js +18 -20
- package/dist/core.umd.js +2 -2
- package/dist/src/state_manager/adapters/index.d.ts +1 -1
- package/dist/src/state_manager/adapters/index.d.ts.map +1 -1
- package/dist/src/state_manager/adapters/jotaiAdapter.d.ts +1 -1
- package/dist/src/state_manager/adapters/jotaiAdapter.d.ts.map +1 -1
- package/dist/types/src/state_manager/adapters/index.d.ts +1 -1
- package/dist/types/src/state_manager/adapters/index.d.ts.map +1 -1
- package/dist/types/src/state_manager/adapters/jotaiAdapter.d.ts +1 -1
- package/dist/types/src/state_manager/adapters/jotaiAdapter.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/core.umd.js
CHANGED
|
@@ -69,7 +69,7 @@ Recoil Snapshots only last for the duration of the callback they are provided to
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
This is currently a DEV-only warning but will become a thrown exception in the next release of Recoil.
|
|
72
|
-
`;class jg{constructor(t,r){jt(this,"_store",void 0),jt(this,"_refCount",1),jt(this,"getLoadable",n=>(this.checkRefCount_INTERNAL(),Use(this._store,n))),jt(this,"getPromise",n=>(this.checkRefCount_INTERNAL(),this.getLoadable(n).toPromise())),jt(this,"getNodes_UNSTABLE",n=>{if(this.checkRefCount_INTERNAL(),n?.isModified===!0){if(n?.isInitialized===!1)return[];const o=this._store.getState().currentTree;return n5(o.dirtyAtoms)}const i=this._store.getState().knownAtoms,a=this._store.getState().knownSelectors;return n?.isInitialized==null?r5.values():n.isInitialized===!0?n5(e5([i,a])):qS(r5.values(),({key:o})=>!i.has(o)&&!a.has(o))}),jt(this,"getInfo_UNSTABLE",({key:n})=>(this.checkRefCount_INTERNAL(),Fse(this._store,this._store.getState().currentTree,n))),jt(this,"map",n=>{this.checkRefCount_INTERNAL();const i=new GS(this,HS);return n(i),i}),jt(this,"asyncMap",async n=>{this.checkRefCount_INTERNAL();const i=new GS(this,HS);return i.retain(),await n(i),i.autoRelease_INTERNAL(),i}),this._store={storeID:Vse(),parentStoreID:r,getState:()=>t,replaceState:n=>{t.currentTree=n(t.currentTree)},getGraph:n=>{const i=t.graphsByVersion;if(i.has(n))return zr(i.get(n));const a=$se();return i.set(n,a),a},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw Pt("Cannot subscribe to Snapshots")}};for(const n of this._store.getState().knownAtoms)jse(this._store,n,"get"),Lg(this._store,n,1);this.autoRelease_INTERNAL()}retain(){if(this._refCount<=0){if(process.env.NODE_ENV!=="production")throw Pt("Snapshot has already been released.");Xn("Attempt to retain() Snapshot that was already released.")}this._refCount++;let t=!1;return()=>{t||(t=!0,this._release())}}autoRelease_INTERNAL(){Kse||window.setTimeout(()=>this._release(),10)}_release(){if(this._refCount--,this._refCount===0){if(this._store.getState().nodeCleanupFunctions.forEach(t=>t()),this._store.getState().nodeCleanupFunctions.clear(),!Mr("recoil_memory_managament_2020"))return}else this._refCount<0&&process.env.NODE_ENV!=="production"&&Xn("Snapshot released an extra time.")}isRetained(){return this._refCount>0}checkRefCount_INTERNAL(){Mr("recoil_memory_managament_2020")&&this._refCount<=0&&process.env.NODE_ENV!=="production"&&Xn(Qse)}getStore_INTERNAL(){return this.checkRefCount_INTERNAL(),this._store}getID(){return this.checkRefCount_INTERNAL(),this._store.getState().currentTree.stateID}getStoreID(){return this.checkRefCount_INTERNAL(),this._store.storeID}}function a5(e,t,r=!1){const n=e.getState(),i=r?Hse():t.version;return{currentTree:{version:r?i:t.version,stateID:r?i:t.stateID,transactionMetadata:{...t.transactionMetadata},dirtyAtoms:new Set(t.dirtyAtoms),atomValues:t.atomValues.clone(),nonvalidatedAtoms:t.nonvalidatedAtoms.clone()},commitDepth:0,nextTree:null,previousTree:null,knownAtoms:new Set(n.knownAtoms),knownSelectors:new Set(n.knownSelectors),transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(i,e.getGraph(t.version)),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map(Ng(n.nodeCleanupFunctions.entries(),([a])=>[a,()=>{}]))}}function Xse(e){const t=new jg(Gse());return e!=null?t.map(e):t}const[o5,s5]=Yse((e,t)=>{var r;const n=e.getState(),i=t==="latest"?(r=n.nextTree)!==null&&r!==void 0?r:n.currentTree:zr(n.previousTree);return new jg(a5(e,i),e.storeID)},(e,t)=>{var r,n;return String(t)+String(e.storeID)+String((r=e.getState().nextTree)===null||r===void 0?void 0:r.version)+String(e.getState().currentTree.version)+String((n=e.getState().previousTree)===null||n===void 0?void 0:n.version)});Wse(s5);function Zse(e,t="latest"){const r=o5(e,t);return r.isRetained()?r:(s5(),o5(e,t))}class GS extends jg{constructor(t,r){super(a5(t.getStore_INTERNAL(),t.getStore_INTERNAL().getState().currentTree,!0),t.getStoreID()),jt(this,"_batch",void 0),jt(this,"set",(n,i)=>{this.checkRefCount_INTERNAL();const a=this.getStore_INTERNAL();this._batch(()=>{Lg(a,n.key,1),i5(this.getStore_INTERNAL(),n,i)})}),jt(this,"reset",n=>{this.checkRefCount_INTERNAL();const i=this.getStore_INTERNAL();this._batch(()=>{Lg(i,n.key,1),i5(this.getStore_INTERNAL(),n,qse)})}),jt(this,"setUnvalidatedAtomValues_DEPRECATED",n=>{this.checkRefCount_INTERNAL();const i=this.getStore_INTERNAL();HS(()=>{for(const[a,o]of n.entries())Lg(i,a,1),zse(i,new Bse(a),o)})}),this._batch=r}}var Fg={Snapshot:jg,MutableSnapshot:GS,freshSnapshot:Xse,cloneSnapshot:Zse},Jse=Fg.Snapshot,eue=Fg.MutableSnapshot,tue=Fg.freshSnapshot,rue=Fg.cloneSnapshot,$g=Object.freeze({__proto__:null,Snapshot:Jse,MutableSnapshot:eue,freshSnapshot:tue,cloneSnapshot:rue});function nue(...e){const t=new Set;for(const r of e)for(const n of r)t.add(n);return t}var iue=nue;const{useRef:aue}=K;function oue(e){const t=aue(e);return t.current===e&&typeof e=="function"&&(t.current=e()),t}var u5=oue;const{getNextTreeStateVersion:sue,makeEmptyStoreState:l5}=Mj,{cleanUpNode:uue,getDownstreamNodes:lue,initializeNode:cue,setNodeValue:fue,setUnvalidatedAtomValue_DEPRECATED:due}=nl,{graph:hue}=Xd,{cloneGraph:pue}=Xd,{getNextStoreID:c5}=Ig,{createMutableSource:KS,reactMode:f5}=IS,{applyAtomValueWrites:vue}=es,{releaseScheduledRetainablesNow:d5}=Ic,{freshSnapshot:gue}=$g,{useCallback:mue,useContext:h5,useEffect:YS,useMemo:yue,useRef:_ue,useState:bue}=K;function eh(){throw Pt("This component must be used inside a <RecoilRoot> component.")}const p5=Object.freeze({storeID:c5(),getState:eh,replaceState:eh,getGraph:eh,subscribeToTransactions:eh,addTransactionMetadata:eh});let QS=!1;function v5(e){if(QS)throw Pt("An atom update was triggered within the execution of a state updater function. State updater functions provided to Recoil must be pure functions.");const t=e.getState();if(t.nextTree===null){Mr("recoil_memory_managament_2020")&&Mr("recoil_release_on_cascading_update_killswitch_2021")&&t.commitDepth>0&&d5(e);const r=t.currentTree.version,n=sue();t.nextTree={...t.currentTree,version:n,stateID:n,dirtyAtoms:new Set,transactionMetadata:{}},t.graphsByVersion.set(n,pue(zr(t.graphsByVersion.get(r))))}}const g5=K.createContext({current:p5}),XS=()=>h5(g5),m5=K.createContext(null);function Eue(){const e=h5(m5);return e==null&&MS("Attempted to use a Recoil hook outside of a <RecoilRoot>. <RecoilRoot> must be an ancestor of any component that uses Recoil hooks."),e}function y5(e,t,r){const n=lue(e,r,r.dirtyAtoms);for(const i of n){const a=t.nodeToComponentSubscriptions.get(i);if(a)for(const[o,[s,u]]of a)u(r)}}function wue(e){const t=e.getState(),r=t.currentTree,n=r.dirtyAtoms;if(n.size){for(const[i,a]of t.nodeTransactionSubscriptions)if(n.has(i))for(const[o,s]of a)s(e);for(const[i,a]of t.transactionSubscriptions)a(e);(!f5().early||t.suspendedComponentResolvers.size>0)&&(y5(e,t,r),t.suspendedComponentResolvers.forEach(i=>i()),t.suspendedComponentResolvers.clear())}t.queuedComponentCallbacks_DEPRECATED.forEach(i=>i(r)),t.queuedComponentCallbacks_DEPRECATED.splice(0,t.queuedComponentCallbacks_DEPRECATED.length)}function xue(e){const t=e.getState();t.commitDepth++;try{const{nextTree:r}=t;if(r==null)return;t.previousTree=t.currentTree,t.currentTree=r,t.nextTree=null,wue(e),t.previousTree!=null?t.graphsByVersion.delete(t.previousTree.version):Xn("Ended batch with no previous state, which is unexpected","recoil"),t.previousTree=null,Mr("recoil_memory_managament_2020")&&r==null&&d5(e)}finally{t.commitDepth--}}function Sue({setNotifyBatcherOfChange:e}){const t=XS(),[,r]=bue([]);return e(()=>r({})),YS(()=>(e(()=>r({})),()=>{e(()=>{})}),[e]),YS(()=>{coe.enqueueExecution("Batcher",()=>{xue(t.current)})}),null}process.env.NODE_ENV!=="production"&&typeof window<"u"&&!window.$recoilDebugStates&&(window.$recoilDebugStates=[]);function Rue(e,t){const r=l5();return t({set:(n,i)=>{const a=r.currentTree,o=fue(e,a,n.key,i),s=new Set(o.keys()),u=a.nonvalidatedAtoms.clone();for(const l of s)u.delete(l);r.currentTree={...a,dirtyAtoms:iue(a.dirtyAtoms,s),atomValues:vue(a.atomValues,o),nonvalidatedAtoms:u}},setUnvalidatedAtomValues:n=>{n.forEach((i,a)=>{r.currentTree=due(r.currentTree,a,i)})}}),r}function Oue(e){const t=gue(e),r=t.getStore_INTERNAL().getState();return t.retain(),r.nodeCleanupFunctions.forEach(n=>n()),r.nodeCleanupFunctions.clear(),r}let _5=0;function Aue({initializeState_DEPRECATED:e,initializeState:t,store_INTERNAL:r,children:n}){let i;const a=h=>{const m=i.current.graphsByVersion;if(m.has(h))return zr(m.get(h));const p=hue();return m.set(h,p),p},o=(h,m)=>{if(m==null){const{transactionSubscriptions:p}=f.current.getState(),g=_5++;return p.set(g,h),{release:()=>{p.delete(g)}}}else{const{nodeTransactionSubscriptions:p}=f.current.getState();p.has(m)||p.set(m,new Map);const g=_5++;return zr(p.get(m)).set(g,h),{release:()=>{const y=p.get(m);y&&(y.delete(g),y.size===0&&p.delete(m))}}}},s=h=>{v5(f.current);for(const m of Object.keys(h))zr(f.current.getState().nextTree).transactionMetadata[m]=h[m]},u=h=>{v5(f.current);const m=zr(i.current.nextTree);let p;try{QS=!0,p=h(m)}finally{QS=!1}p!==m&&(process.env.NODE_ENV!=="production"&&typeof window<"u"&&window.$recoilDebugStates.push(p),i.current.nextTree=p,f5().early&&y5(f.current,i.current,p),zr(l.current)())},l=_ue(null),c=mue(h=>{l.current=h},[l]),f=u5(()=>r??{storeID:c5(),getState:()=>i.current,replaceState:u,getGraph:a,subscribeToTransactions:o,addTransactionMetadata:s});r!=null&&(f.current=r),i=u5(()=>e!=null?Rue(f.current,e):t!=null?Oue(t):l5());const d=yue(()=>KS?.(i,()=>i.current.currentTree.version),[i]);return YS(()=>{const h=f.current;for(const m of new Set(h.getState().knownAtoms))cue(h,m,"get");return()=>{for(const m of h.getState().knownAtoms)uue(h,m)}},[f]),K.createElement(g5.Provider,{value:f},K.createElement(m5.Provider,{value:d},K.createElement(Sue,{setNotifyBatcherOfChange:c}),n))}function Tue(e){const{override:t,...r}=e,n=XS();return t===!1&&n.current!==p5?e.children:K.createElement(Aue,r)}var Vg={RecoilRoot:Tue,useStoreRef:XS,useRecoilMutableSource:Eue};function Cue(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1;return!0}var Pue=Cue;const{useEffect:Nue,useRef:Due}=K;function Iue(e){const t=Due();return Nue(()=>{t.current=e}),t.current}var kue=Iue;const{useStoreRef:Mue}=Vg,{SUSPENSE_TIMEOUT_MS:Lue}=Ic,{updateRetainCount:th}=Ic,{RetentionZone:jue}=VS,{useEffect:Fue,useRef:$ue}=K,{isSSR:b5}=Mg;function Vue(e){if(Mr("recoil_memory_managament_2020"))return que(e)}function que(e){const r=(Array.isArray(e)?e:[e]).map(o=>o instanceof jue?o:o.key),n=Mue();Fue(()=>{if(!Mr("recoil_memory_managament_2020"))return;const o=n.current;if(i.current&&!b5)window.clearTimeout(i.current),i.current=null;else for(const s of r)th(o,s,1);return()=>{for(const s of r)th(o,s,-1)}},[n,...r]);const i=$ue(),a=kue(r);if(!b5&&(a===void 0||!Pue(a,r))){const o=n.current;for(const s of r)th(o,s,1);if(a)for(const s of a)th(o,s,-1);i.current&&window.clearTimeout(i.current),i.current=window.setTimeout(()=>{i.current=null;for(const s of r)th(o,s,-1)},Lue)}}var Bue=Vue;function Uue(){return"<component name not available>"}var qg=Uue;const{currentRendererSupportsUseSyncExternalStore:zue,reactMode:rh,useMutableSource:Wue,useSyncExternalStore:Hue}=IS,{useRecoilMutableSource:Gue,useStoreRef:kc}=Vg,{isRecoilValue:Kue}=rl,{getRecoilValueAsLoadable:Bg,setRecoilValue:Yue,subscribeToRecoilValue:Ug}=es,{useCallback:Ga,useEffect:zg,useMemo:Que,useRef:E5,useState:w5}=K,{isSSR:Xue}=Mg;function Zue(e,t,r){if(e.state==="hasValue")return e.contents;throw e.state==="loading"?new Promise(i=>{const a=r.current.getState().suspendedComponentResolvers;a.add(i),Xue&&Tr(e.contents)&&e.contents.finally(()=>{a.delete(i)})}):e.state==="hasError"?e.contents:Pt(`Invalid value of loadable atom "${t.key}"`)}function ZS(e,t){if(!Kue(e))throw Pt(`Invalid argument to ${t}: expected an atom or selector but got ${String(e)}`)}function Jue(e){const t=kc(),r=qg(),n=Ga(()=>{var s;process.env.NODE_ENV;const u=t.current,l=u.getState(),c=rh().early&&(s=l.nextTree)!==null&&s!==void 0?s:l.currentTree;return{loadable:Bg(u,e,c),key:e.key}},[t,e]),i=Ga(s=>{let u;return()=>{var l,c;const f=s();return(l=u)!==null&&l!==void 0&&l.loadable.is(f.loadable)&&((c=u)===null||c===void 0?void 0:c.key)===f.key?u:(u=f,f)}},[]),a=Que(()=>i(n),[n,i]),o=Ga(s=>{const u=t.current;return Ug(u,e,s,r).release},[t,e,r]);return Hue(o,a,a).loadable}function ele(e){const t=kc(),r=Ga(()=>{var l;const c=t.current,f=c.getState(),d=rh().early&&(l=f.nextTree)!==null&&l!==void 0?l:f.currentTree;return Bg(c,e,d)},[t,e]),n=Ga(()=>(process.env.NODE_ENV,r()),[r]),i=qg(),a=Ga((l,c)=>{const f=t.current;return Ug(f,e,()=>{if(!Mr("recoil_suppress_rerender_in_callback"))return c();const h=r();u.current.is(h)||c(),u.current=h},i).release},[t,e,i,r]),o=Gue();if(o==null)throw Pt("Recoil hooks must be used in components contained within a <RecoilRoot> component.");const s=Wue(o,n,a),u=E5(s);return zg(()=>{u.current=s}),s}function x5(e){const t=kc(),r=qg(),n=Ga(()=>{var u;process.env.NODE_ENV;const l=t.current,c=l.getState(),f=rh().early&&(u=c.nextTree)!==null&&u!==void 0?u:c.currentTree;return Bg(l,e,f)},[t,e]),i=Ga(()=>({loadable:n(),key:e.key}),[n,e.key]),a=Ga(u=>{const l=i();return u.loadable.is(l.loadable)&&u.key===l.key?u:l},[i]);zg(()=>{const u=Ug(t.current,e,l=>{s(a)},r);return s(a),u.release},[r,e,t,a]);const[o,s]=w5(i);return o.key!==e.key?i().loadable:o.loadable}function tle(e){const t=kc(),[,r]=w5([]),n=qg(),i=Ga(()=>{var s;process.env.NODE_ENV;const u=t.current,l=u.getState(),c=rh().early&&(s=l.nextTree)!==null&&s!==void 0?s:l.currentTree;return Bg(u,e,c)},[t,e]),a=i(),o=E5(a);return zg(()=>{o.current=a}),zg(()=>{const s=t.current,u=s.getState(),l=Ug(s,e,f=>{var d;if(!Mr("recoil_suppress_rerender_in_callback"))return r([]);const h=i();(d=o.current)!==null&&d!==void 0&&d.is(h)||r(h),o.current=h},n);if(u.nextTree)s.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{o.current=null,r([])});else{var c;if(!Mr("recoil_suppress_rerender_in_callback"))return r([]);const f=i();(c=o.current)!==null&&c!==void 0&&c.is(f)||r(f),o.current=f}return l.release},[n,i,e,t]),a}function rle(e){return process.env.NODE_ENV!=="production"&&ZS(e,"useRecoilValueLoadable"),Mr("recoil_memory_managament_2020")&&Bue(e),{TRANSITION_SUPPORT:x5,SYNC_EXTERNAL_STORE:zue()?Jue:x5,MUTABLE_SOURCE:ele,LEGACY:tle}[rh().mode](e)}function nle(e){process.env.NODE_ENV!=="production"&&ZS(e,"useRecoilValue");const t=kc(),r=rle(e);return Zue(r,e,t)}function ile(e){process.env.NODE_ENV!=="production"&&ZS(e,"useSetRecoilState");const t=kc();return Ga(r=>{Yue(t.current,e,r)},[t,e])}var ale={useRecoilValue:nle,useSetRecoilState:ile};const{batchUpdates:ole}=WS,{DEFAULT_VALUE:sle,getNode:ule}=Ha,{AbstractRecoilValue:lle,setRecoilValueLoadable:cle}=es,{cloneSnapshot:wGe}=$g,{useCallback:xGe,useEffect:SGe,useRef:RGe,useState:OGe}=K;function fle(e,t){var r;const n=e.getState(),i=(r=n.nextTree)!==null&&r!==void 0?r:n.currentTree,a=t.getStore_INTERNAL().getState().currentTree;ole(()=>{const o=new Set;for(const l of[i.atomValues.keys(),a.atomValues.keys()])for(const c of l){var s,u;((s=i.atomValues.get(c))===null||s===void 0?void 0:s.contents)!==((u=a.atomValues.get(c))===null||u===void 0?void 0:u.contents)&&ule(c).shouldRestoreFromSnapshots&&o.add(c)}o.forEach(l=>{cle(e,new lle(l),a.atomValues.has(l)?zr(a.atomValues.get(l)):sle)}),e.replaceState(l=>({...l,stateID:t.getID()}))})}var dle={gotoSnapshot:fle};const{useMemo:AGe}=K,{loadableWithValue:hle}=Yd,{initializeNode:ple}=nl,{DEFAULT_VALUE:vle,getNode:gle}=Ha,{copyTreeState:mle,getRecoilValueAsLoadable:yle,invalidateDownstreams:_le,writeLoadableToTreeState:ble}=es;function S5(e){return gle(e.key).nodeType==="atom"}class Ele{constructor(t,r){jt(this,"_store",void 0),jt(this,"_treeState",void 0),jt(this,"_changes",void 0),jt(this,"get",n=>{if(this._changes.has(n.key))return this._changes.get(n.key);if(!S5(n))throw Pt("Reading selectors within atomicUpdate is not supported");const i=yle(this._store,n,this._treeState);if(i.state==="hasValue")return i.contents;throw i.state==="hasError"?i.contents:Pt(`Expected Recoil atom ${n.key} to have a value, but it is in a loading state.`)}),jt(this,"set",(n,i)=>{if(!S5(n))throw Pt("Setting selectors within atomicUpdate is not supported");if(typeof i=="function"){const a=this.get(n);this._changes.set(n.key,i(a))}else ple(this._store,n.key,"set"),this._changes.set(n.key,i)}),jt(this,"reset",n=>{this.set(n,vle)}),this._store=t,this._treeState=r,this._changes=new Map}newTreeState_INTERNAL(){if(this._changes.size===0)return this._treeState;const t=mle(this._treeState);for(const[r,n]of this._changes)ble(t,r,hle(n));return _le(this._store,t),t}}function wle(e){return t=>{e.replaceState(r=>{const n=new Ele(e,r);return t(n),n.newTreeState_INTERNAL()})}}var xle={atomicUpdater:wle},Sle=xle.atomicUpdater,R5=Object.freeze({__proto__:null,atomicUpdater:Sle});function Rle(e,t){if(!e)throw new Error(t)}var Ole=Rle,Eo=Ole;const{atomicUpdater:Ale}=R5,{batchUpdates:Tle}=WS,{DEFAULT_VALUE:Cle}=Ha,{useStoreRef:Ple}=Vg,{refreshRecoilValue:Nle,setRecoilValue:O5}=es,{cloneSnapshot:Dle}=$g,{gotoSnapshot:Ile}=dle,{useCallback:kle}=K;class A5{}const Mle=new A5;function T5(e,t,r,n){let i=Mle,a;if(Tle(()=>{const s="useRecoilCallback() expects a function that returns a function: it accepts a function of the type (RecoilInterface) => (Args) => ReturnType and returns a callback function (Args) => ReturnType, where RecoilInterface is an object {snapshot, set, ...} and Args and ReturnType are the argument and return types of the callback you want to create. Please see the docs at recoiljs.org for details.";if(typeof t!="function")throw Pt(s);const u=Lj({...n??{},set:(c,f)=>O5(e,c,f),reset:c=>O5(e,c,Cle),refresh:c=>Nle(e,c),gotoSnapshot:c=>Ile(e,c),transact_UNSTABLE:c=>Ale(e)(c)},{snapshot:()=>{const c=Dle(e);return a=c.retain(),c}}),l=t(u);if(typeof l!="function")throw Pt(s);i=l(...r)}),i instanceof A5&&(process.env.NODE_ENV!=="production"?Eo(!1,"batchUpdates should return immediately"):Eo(!1)),Tr(i))i=i.finally(()=>{var s;(s=a)===null||s===void 0||s()});else{var o;(o=a)===null||o===void 0||o()}return i}function Lle(e,t){const r=Ple();return kle((...n)=>T5(r.current,e,n),t!=null?[...t,r]:void 0)}var C5={recoilCallback:T5,useRecoilCallback:Lle};const{useCallback:TGe}=K,{atomicUpdater:CGe}=R5,{useMemo:PGe}=K;class jle{constructor(t){jt(this,"value",void 0),this.value=t}}var Fle={WrappedValue:jle},$le=Fle.WrappedValue,P5=Object.freeze({__proto__:null,WrappedValue:$le});class N5 extends Error{}class Vle{constructor(t){var r,n,i;jt(this,"_name",void 0),jt(this,"_numLeafs",void 0),jt(this,"_root",void 0),jt(this,"_onHit",void 0),jt(this,"_onSet",void 0),jt(this,"_mapNodeValue",void 0),this._name=t?.name,this._numLeafs=0,this._root=null,this._onHit=(r=t?.onHit)!==null&&r!==void 0?r:()=>{},this._onSet=(n=t?.onSet)!==null&&n!==void 0?n:()=>{},this._mapNodeValue=(i=t?.mapNodeValue)!==null&&i!==void 0?i:a=>a}size(){return this._numLeafs}root(){return this._root}get(t,r){var n;return(n=this.getLeafNode(t,r))===null||n===void 0?void 0:n.value}getLeafNode(t,r){if(this._root==null)return;let n=this._root;for(;n;){if(r?.onNodeVisit(n),n.type==="leaf")return this._onHit(n),n;const i=this._mapNodeValue(t(n.nodeKey));n=n.branches.get(i)}}set(t,r,n){const i=()=>{var a,o,s,u;let l,c;for(const[g,y]of t){var f,d,h;const b=this._root;if(b?.type==="leaf")throw this.invalidCacheError();const E=l;if(l=E?E.branches.get(c):b,l=(f=l)!==null&&f!==void 0?f:{type:"branch",nodeKey:g,parent:E,branches:new Map,branchKey:c},l.type!=="branch"||l.nodeKey!==g)throw this.invalidCacheError();E?.branches.set(c,l),n==null||(d=n.onNodeVisit)===null||d===void 0||d.call(n,l),c=this._mapNodeValue(y),this._root=(h=this._root)!==null&&h!==void 0?h:l}const m=l?(a=l)===null||a===void 0?void 0:a.branches.get(c):this._root;if(m!=null&&(m.type!=="leaf"||m.branchKey!==c))throw this.invalidCacheError();const p={type:"leaf",value:r,parent:l,branchKey:c};(o=l)===null||o===void 0||o.branches.set(c,p),this._root=(s=this._root)!==null&&s!==void 0?s:p,this._numLeafs++,this._onSet(p),n==null||(u=n.onNodeVisit)===null||u===void 0||u.call(n,p)};try{i()}catch(a){if(a instanceof N5)this.clear(),i();else throw a}}delete(t){const r=this.root();if(!r)return!1;if(t===r)return this._root=null,this._numLeafs=0,!0;let n=t.parent,i=t.branchKey;for(;n;){var a;if(n.branches.delete(i),n===r)return n.branches.size===0?(this._root=null,this._numLeafs=0):this._numLeafs--,!0;if(n.branches.size>0)break;i=(a=n)===null||a===void 0?void 0:a.branchKey,n=n.parent}for(;n!==r;n=n.parent)if(n==null)return!1;return this._numLeafs--,!0}clear(){this._numLeafs=0,this._root=null}invalidCacheError(){throw Xn("Invalid cache values. This happens when selectors do not return consistent values for the same input dependency values. That may also be caused when using Fast Refresh to change a selector implementation. Resetting cache."+(this._name!=null?` - ${this._name}`:"")),new N5}}var qle={TreeCache:Vle},Ble=qle.TreeCache,D5=Object.freeze({__proto__:null,TreeCache:Ble});class Ule{constructor(t){var r;jt(this,"_maxSize",void 0),jt(this,"_size",void 0),jt(this,"_head",void 0),jt(this,"_tail",void 0),jt(this,"_map",void 0),jt(this,"_keyMapper",void 0),this._maxSize=t.maxSize,this._size=0,this._head=null,this._tail=null,this._map=new Map,this._keyMapper=(r=t.mapKey)!==null&&r!==void 0?r:n=>n}head(){return this._head}tail(){return this._tail}size(){return this._size}maxSize(){return this._maxSize}has(t){return this._map.has(this._keyMapper(t))}get(t){const r=this._keyMapper(t),n=this._map.get(r);if(n)return this.set(t,n.value),n.value}set(t,r){const n=this._keyMapper(t);this._map.get(n)&&this.delete(t);const a=this.head(),o={key:t,right:a,left:null,value:r};a?a.left=o:this._tail=o,this._map.set(n,o),this._head=o,this._size++,this._maybeDeleteLRU()}_maybeDeleteLRU(){this.size()>this.maxSize()&&this.deleteLru()}deleteLru(){const t=this.tail();t&&this.delete(t.key)}delete(t){const r=this._keyMapper(t);if(!this._size||!this._map.has(r))return;const n=zr(this._map.get(r)),i=n.right,a=n.left;i&&(i.left=n.left),a&&(a.right=n.right),n===this.head()&&(this._head=i),n===this.tail()&&(this._tail=a),this._map.delete(r),this._size--}clear(){this._size=0,this._head=null,this._tail=null,this._map=new Map}}var zle={LRUCache:Ule},Wle=zle.LRUCache,I5=Object.freeze({__proto__:null,LRUCache:Wle});const{LRUCache:Hle}=I5,{TreeCache:Gle}=D5;function Kle({name:e,maxSize:t,mapNodeValue:r=n=>n}){const n=new Hle({maxSize:t}),i=new Gle({name:e,mapNodeValue:r,onHit:a=>{n.set(a,!0)},onSet:a=>{const o=n.tail();n.set(a,!0),o&&i.size()>t&&i.delete(o.key)}});return i}var k5=Kle;const Yle=15;function ma(e,t,r){if(typeof e=="string"&&!e.includes('"')&&!e.includes("\\"))return`"${e}"`;switch(typeof e){case"undefined":return"";case"boolean":return e?"true":"false";case"number":case"symbol":return String(e);case"string":return JSON.stringify(e);case"function":if(t?.allowFunctions!==!0)throw Pt("Attempt to serialize function in a Recoil cache key");return`__FUNCTION(${e.name})__`}if(e===null)return"null";if(typeof e!="object"){var n;return(n=JSON.stringify(e))!==null&&n!==void 0?n:""}if(Tr(e))return"__PROMISE__";if(Array.isArray(e))return`[${e.map((i,a)=>ma(i,t,a.toString()))}]`;if(typeof e.toJSON=="function")return ma(e.toJSON(r),t,r);if(e instanceof Map){const i={};for(const[a,o]of e)i[typeof a=="string"?a:ma(a,t)]=o;return ma(i,t,r)}return e instanceof Set?ma(Array.from(e).sort((i,a)=>ma(i,t).localeCompare(ma(a,t))),t,r):Symbol!==void 0&&e[Symbol.iterator]!=null&&typeof e[Symbol.iterator]=="function"?ma(Array.from(e),t,r):`{${Object.keys(e).filter(i=>e[i]!==void 0).sort().map(i=>`${ma(i,t)}:${ma(e[i],t,i)}`).join(",")}}`}function Qle(e,t={allowFunctions:!1}){if(process.env.NODE_ENV!=="production"&&typeof window<"u"){const r=window.performance?window.performance.now():0,n=ma(e,t),i=window.performance?window.performance.now():0;return i-r>Yle&&(console.groupCollapsed(`Recoil: Spent ${i-r}ms computing a cache key`),console.warn(e,n),console.groupEnd()),n}return ma(e,t)}var JS=Qle;const{TreeCache:Xle}=D5,Wg={equality:"reference",eviction:"keep-all",maxSize:1/0};function Zle({equality:e=Wg.equality,eviction:t=Wg.eviction,maxSize:r=Wg.maxSize}=Wg,n){const i=Jle(e);return ece(t,r,i,n)}function Jle(e){switch(e){case"reference":return t=>t;case"value":return t=>JS(t)}throw Pt(`Unrecognized equality policy ${e}`)}function ece(e,t,r,n){switch(e){case"keep-all":return new Xle({name:n,mapNodeValue:r});case"lru":return k5({name:n,maxSize:zr(t),mapNodeValue:r});case"most-recent":return k5({name:n,maxSize:1,mapNodeValue:r})}throw Pt(`Unrecognized eviction policy ${e}`)}var tce=Zle;function rce(e){var t,r;if(typeof window>"u")return!1;const i=(r=(e!=null?(t=e.ownerDocument)!==null&&t!==void 0?t:e:document).defaultView)!==null&&r!==void 0?r:window;return e!=null&&(typeof i.Node=="function"?e instanceof i.Node:typeof e=="object"&&typeof e.nodeType=="number"&&typeof e.nodeName=="string")}var nce=rce;const{isReactNative:ice,isWindow:ace}=Mg;function oce(e){if(e===null||typeof e!="object")return!0;switch(typeof e.$$typeof){case"symbol":return!0;case"number":return!0}return!!(e["@@__IMMUTABLE_ITERABLE__@@"]!=null||e["@@__IMMUTABLE_KEYED__@@"]!=null||e["@@__IMMUTABLE_INDEXED__@@"]!=null||e["@@__IMMUTABLE_ORDERED__@@"]!=null||e["@@__IMMUTABLE_RECORD__@@"]!=null||nce(e)||Tr(e)||e instanceof Error||ArrayBuffer.isView(e)||!ice&&ace(e))}function M5(e){if(!(typeof e!="object"||oce(e))){Object.freeze(e);for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const r=e[t];typeof r=="object"&&r!=null&&!Object.isFrozen(r)&&M5(r)}Object.seal(e)}}var eR=M5;const{isLoadable:sce,loadableWithError:Hg,loadableWithPromise:uce,loadableWithValue:tR}=Yd,{WrappedValue:L5}=P5,{getNodeLoadable:Gg,peekNodeLoadable:lce,setNodeValue:cce}=nl,{saveDepsToStore:fce}=Xd,{DEFAULT_VALUE:dce,getConfigDeletionHandler:hce,getNode:pce,registerNode:j5}=Ha,{isRecoilValue:vce}=rl,{markRecoilValueModified:F5}=es,{retainedByOptionWithDefault:gce}=Ic,{recoilCallback:mce}=C5;class $5{}const nh=new $5,ih=[],Kg=new Map,yce=(()=>{let e=0;return()=>e++})();function V5(e){let t=null;const{key:r,get:n,cachePolicy_UNSTABLE:i}=e,a=e.set!=null?e.set:void 0;if(process.env.NODE_ENV!=="production"){if(typeof r!="string")throw Pt("A key option with a unique string value must be provided when creating a selector.");if(typeof n!="function")throw Pt("Selectors must specify a get callback option to get the selector value.")}const o=new Set,s=tce(i??{equality:"reference",eviction:"keep-all"},r),u=gce(e.retainedBy_UNSTABLE),l=new Map;let c=0;function f(){return!Mr("recoil_memory_managament_2020")||c>0}function d(O){return O.getState().knownSelectors.add(r),c++,()=>{c--}}function h(){return hce(r)!==void 0&&!f()}function m(O,$,q,W,z){L($,W,z),p(O,q)}function p(O,$){A(O,$)&&P(O),y($,!0)}function g(O,$){A(O,$)&&(zr(k(O)).stateVersions.clear(),y($,!1))}function y(O,$){const q=Kg.get(O);if(q!=null){for(const W of q)F5(W,zr(t));$&&Kg.delete(O)}}function b(O,$){let q=Kg.get($);q==null&&Kg.set($,q=new Set),q.add(O)}function E(O,$,q,W,z,Y){return $.then(Q=>{if(!f())throw P(O),nh;const Z=tR(Q);return m(O,q,z,Z,W),Q}).catch(Q=>{if(!f())throw P(O),nh;if(Tr(Q))return w(O,Q,q,W,z,Y);const Z=Hg(Q);throw m(O,q,z,Z,W),Q})}function w(O,$,q,W,z,Y){return $.then(Q=>{if(!f())throw P(O),nh;Y.loadingDepKey!=null&&Y.loadingDepPromise===$?q.atomValues.set(Y.loadingDepKey,tR(Q)):O.getState().knownSelectors.forEach(ee=>{q.atomValues.delete(ee)});const Z=S(O,q);if(Z&&Z.state!=="loading"){if((A(O,z)||k(O)==null)&&p(O,z),Z.state==="hasValue")return Z.contents;throw Z.contents}if(!A(O,z)){const ee=M(O,q);if(ee!=null)return ee.loadingLoadable.contents}const[re,ie]=R(O,q,z);if(re.state!=="loading"&&m(O,q,z,re,ie),re.state==="hasError")throw re.contents;return re.contents}).catch(Q=>{if(Q instanceof $5)throw nh;if(!f())throw P(O),nh;const Z=Hg(Q);throw m(O,q,z,Z,W),Q})}function x(O,$,q,W){var z,Y,Q,Z;if(A(O,W)||$.version===((z=O.getState())===null||z===void 0||(Y=z.currentTree)===null||Y===void 0?void 0:Y.version)||$.version===((Q=O.getState())===null||Q===void 0||(Z=Q.nextTree)===null||Z===void 0?void 0:Z.version)){var re,ie,ee;fce(r,q,O,(re=(ie=O.getState())===null||ie===void 0||(ee=ie.nextTree)===null||ee===void 0?void 0:ee.version)!==null&&re!==void 0?re:O.getState().currentTree.version)}for(const fe of q)o.add(fe)}function R(O,$,q){let W=!0,z=!0;const Y=()=>{z=!1};let Q,Z=!1,re;const ie={loadingDepKey:null,loadingDepPromise:null},ee=new Map;function fe({key:se}){const ce=Gg(O,$,se);switch(ee.set(se,ce),W||(x(O,$,new Set(ee.keys()),q),g(O,q)),ce.state){case"hasValue":return ce.contents;case"hasError":throw ce.contents;case"loading":throw ie.loadingDepKey=se,ie.loadingDepPromise=ce.contents,ce.contents}throw Pt("Invalid Loadable state")}const ue=se=>(...ce)=>{if(z)throw Pt("Callbacks from getCallback() should only be called asynchronously after the selector is evalutated. It can be used for selectors to return objects with callbacks that can work with Recoil state without a subscription.");return t==null&&(process.env.NODE_ENV!=="production"?Eo(!1,"Recoil Value can never be null"):Eo(!1)),mce(O,se,ce,{node:t})};try{Q=n({get:fe,getCallback:ue}),Q=vce(Q)?fe(Q):Q,sce(Q)&&(Q.state==="hasError"&&(Z=!0),Q=Q.contents),Tr(Q)?Q=E(O,Q,$,ee,q,ie).finally(Y):Y(),Q=Q instanceof L5?Q.value:Q}catch(se){Q=se,Tr(Q)?Q=w(O,Q,$,ee,q,ie).finally(Y):(Z=!0,Y())}return Z?re=Hg(Q):Tr(Q)?re=uce(Q):re=tR(Q),W=!1,V(O,q,ee),x(O,$,new Set(ee.keys()),q),[re,ee]}function S(O,$){let q=$.atomValues.get(r);if(q!=null)return q;const W=new Set;try{q=s.get(Y=>(typeof Y!="string"&&(process.env.NODE_ENV!=="production"?Eo(!1,"Cache nodeKey is type string"):Eo(!1)),Gg(O,$,Y).contents),{onNodeVisit:Y=>{Y.type==="branch"&&Y.nodeKey!==r&&W.add(Y.nodeKey)}})}catch(Y){throw Pt(`Problem with cache lookup for selector "${r}": ${Y.message}`)}if(q){var z;$.atomValues.set(r,q),x(O,$,W,(z=k(O))===null||z===void 0?void 0:z.executionID)}return q}function j(O,$){const q=S(O,$);if(q!=null)return P(O),q;const W=M(O,$);if(W!=null){var z;return((z=W.loadingLoadable)===null||z===void 0?void 0:z.state)==="loading"&&b(O,W.executionID),W.loadingLoadable}const Y=yce(),[Q,Z]=R(O,$,Y);return Q.state==="loading"?(F(O,Y,Q,Z,$),b(O,Y)):(P(O),L($,Q,Z)),Q}function M(O,$){const q=e5([l.has(O)?[zr(l.get(O))]:[],Ng(qS(l,([z])=>z!==O),([,z])=>z)]);function W(z){for(const[Y,Q]of z)if(!Gg(O,$,Y).is(Q))return!0;return!1}for(const z of q){if(z.stateVersions.get($.version)||!W(z.depValuesDiscoveredSoFarDuringAsyncWork))return z.stateVersions.set($.version,!0),z;z.stateVersions.set($.version,!1)}}function k(O){return l.get(O)}function F(O,$,q,W,z){l.set(O,{depValuesDiscoveredSoFarDuringAsyncWork:W,executionID:$,loadingLoadable:q,stateVersions:new Map([[z.version,!0]])})}function V(O,$,q){if(A(O,$)){const W=k(O);W!=null&&(W.depValuesDiscoveredSoFarDuringAsyncWork=q)}}function P(O){l.delete(O)}function A(O,$){var q;return $===((q=k(O))===null||q===void 0?void 0:q.executionID)}function I(O){return Array.from(O.entries()).map(([$,q])=>[$,q.contents])}function L(O,$,q){process.env.NODE_ENV!=="production"&&$.state!=="loading"&&!e.dangerouslyAllowMutability&&eR($.contents),O.atomValues.set(r,$);try{s.set(I(q),$)}catch(W){throw Pt(`Problem with setting cache for selector "${r}": ${W.message}`)}}function B(O){if(ih.includes(r)){const $=`Recoil selector has circular dependencies: ${ih.slice(ih.indexOf(r)).join(" → ")}`;return Hg(Pt($))}ih.push(r);try{return O()}finally{ih.pop()}}function H(O,$){const q=$.atomValues.get(r);return q??s.get(W=>{var z;return typeof W!="string"&&(process.env.NODE_ENV!=="production"?Eo(!1,"Cache nodeKey is type string"):Eo(!1)),(z=lce(O,$,W))===null||z===void 0?void 0:z.contents})}function U(O,$){return B(()=>j(O,$))}function T(O){O.atomValues.delete(r)}function D(O,$){t==null&&(process.env.NODE_ENV!=="production"?Eo(!1,"Recoil Value can never be null"):Eo(!1));for(const W of o){var q;const z=pce(W);(q=z.clearCache)===null||q===void 0||q.call(z,O,$)}o.clear(),T($),s.clear(),F5(O,t)}return a!=null?t=j5({key:r,nodeType:"selector",peek:H,get:U,set:($,q,W)=>{let z=!1;const Y=new Map;function Q({key:ee}){if(z)throw Pt("Recoil: Async selector sets are not currently supported.");const fe=Gg($,q,ee);if(fe.state==="hasValue")return fe.contents;if(fe.state==="loading"){const ue=`Getting value of asynchronous atom or selector "${ee}" in a pending state while setting selector "${r}" is not yet supported.`;throw Xn(ue),Pt(ue)}else throw fe.contents}function Z(ee,fe){if(z){const ce="Recoil: Async selector sets are not currently supported.";throw Xn(ce),Pt(ce)}const ue=typeof fe=="function"?fe(Q(ee)):fe;cce($,q,ee.key,ue).forEach((ce,ae)=>Y.set(ae,ce))}function re(ee){Z(ee,dce)}const ie=a({set:Z,get:Q,reset:re},W);if(ie!==void 0)throw Tr(ie)?Pt("Recoil: Async selector sets are not currently supported."):Pt("Recoil: selector set should be a void function.");return z=!0,Y},init:d,invalidate:T,clearCache:D,shouldDeleteConfigOnRelease:h,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:u}):t=j5({key:r,nodeType:"selector",peek:H,get:U,init:d,invalidate:T,clearCache:D,shouldDeleteConfigOnRelease:h,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:u})}V5.value=e=>new L5(e);var ah=V5;const{isLoadable:_ce,loadableWithError:rR,loadableWithPromise:nR,loadableWithValue:Mc}=Yd,{WrappedValue:q5}=P5,{peekNodeInfo:bce}=nl,{DEFAULT_VALUE:il,DefaultValue:au,getConfigDeletionHandler:B5,registerNode:Ece,setConfigDeletionHandler:wce}=Ha,{isRecoilValue:xce}=rl,{getRecoilValueAsLoadable:Sce,markRecoilValueModified:Rce,setRecoilValue:U5,setRecoilValueLoadable:Oce}=es,{retainedByOptionWithDefault:Ace}=Ic,oh=e=>e instanceof q5?e.value:e;function Tce(e){const{key:t,persistence_UNSTABLE:r}=e,n=Ace(e.retainedBy_UNSTABLE);let i=0;function a(b){return nR(b.then(E=>(o=Mc(E),E)).catch(E=>{throw o=rR(E),E}))}let o=Tr(e.default)?a(e.default):_ce(e.default)?e.default.state==="loading"?a(e.default.contents):e.default:Mc(oh(e.default));l(o.contents);let s;const u=new Map;function l(b){return process.env.NODE_ENV!=="production"&&e.dangerouslyAllowMutability!==!0?Tr(b)?b.then(E=>(eR(E),E)):(eR(b),b):b}function c(b,E){const w=E.then(x=>{var R,S;return((S=((R=b.getState().nextTree)!==null&&R!==void 0?R:b.getState().currentTree).atomValues.get(t))===null||S===void 0?void 0:S.contents)===w&&U5(b,y,x),x}).catch(x=>{var R,S;throw((S=((R=b.getState().nextTree)!==null&&R!==void 0?R:b.getState().currentTree).atomValues.get(t))===null||S===void 0?void 0:S.contents)===w&&Oce(b,y,rR(x)),x});return w}function f(b,E,w){var x;i++;const R=()=>{var k;i--,(k=u.get(b))===null||k===void 0||k.forEach(F=>F()),u.delete(b)};if(b.getState().knownAtoms.add(t),o.state==="loading"){const k=()=>{var F;((F=b.getState().nextTree)!==null&&F!==void 0?F:b.getState().currentTree).atomValues.has(t)||Rce(b,y)};o.contents.finally(k)}const S=(x=e.effects)!==null&&x!==void 0?x:e.effects_UNSTABLE;if(S!=null){let A=function(T){if(F&&T.key===t){const D=k;return D instanceof au?d(b,E):Tr(D)?nR(D.then(O=>O instanceof au?o.toPromise():O)):Mc(D)}return Sce(b,T)},I=function(T){return A(T).toPromise()},L=function(T){var D;const O=bce(b,(D=b.getState().nextTree)!==null&&D!==void 0?D:b.getState().currentTree,T.key);return F&&T.key===t&&!(k instanceof au)?{...O,isSet:!0,loadable:A(T)}:O},k=il,F=!0,V=!1,P=null;const B=T=>D=>{if(F){const O=A(y),$=O.state==="hasValue"?O.contents:il;k=typeof D=="function"?D($):D,Tr(k)&&(k=k.then(q=>(P={effect:T,value:q},q)))}else{if(Tr(D))throw Pt("Setting atoms to async values is not implemented.");typeof D!="function"&&(P={effect:T,value:oh(D)}),U5(b,y,typeof D=="function"?O=>{const $=oh(D(O));return P={effect:T,value:$},$}:oh(D))}},H=T=>()=>B(T)(il),U=T=>D=>{var O;const{release:$}=b.subscribeToTransactions(q=>{var W;let{currentTree:z,previousTree:Y}=q.getState();Y||(Xn("Transaction subscribers notified without a next tree being present -- this is a bug in Recoil"),Y=z);const Q=(W=z.atomValues.get(t))!==null&&W!==void 0?W:o;if(Q.state==="hasValue"){var Z,re,ie,ee;const fe=Q.contents,ue=(Z=Y.atomValues.get(t))!==null&&Z!==void 0?Z:o,se=ue.state==="hasValue"?ue.contents:il;((re=P)===null||re===void 0?void 0:re.effect)!==T||((ie=P)===null||ie===void 0?void 0:ie.value)!==fe?D(fe,se,!z.atomValues.has(t)):((ee=P)===null||ee===void 0?void 0:ee.effect)===T&&(P=null)}},t);u.set(b,[...(O=u.get(b))!==null&&O!==void 0?O:[],$])};for(const T of S)try{const D=T({node:y,storeID:b.storeID,parentStoreID_UNSTABLE:b.parentStoreID,trigger:w,setSelf:B(T),resetSelf:H(T),onSet:U(T),getPromise:I,getLoadable:A,getInfo_UNSTABLE:L});if(D!=null){var j;u.set(b,[...(j=u.get(b))!==null&&j!==void 0?j:[],D])}}catch(D){k=D,V=!0}if(F=!1,!(k instanceof au)){var M;const T=V?rR(k):Tr(k)?nR(c(b,k)):Mc(oh(k));l(T.contents),E.atomValues.set(t,T),(M=b.getState().nextTree)===null||M===void 0||M.atomValues.set(t,T)}}return R}function d(b,E){var w,x;return(w=(x=E.atomValues.get(t))!==null&&x!==void 0?x:s)!==null&&w!==void 0?w:o}function h(b,E){if(E.atomValues.has(t))return zr(E.atomValues.get(t));if(E.nonvalidatedAtoms.has(t)){if(s!=null)return s;if(r==null)return MS(`Tried to restore a persisted value for atom ${t} but it has no persistence settings.`),o;const w=E.nonvalidatedAtoms.get(t),x=r.validator(w,il);return s=x instanceof au?o:Mc(x),s}else return o}function m(){s=void 0}function p(b,E,w){if(E.atomValues.has(t)){const x=zr(E.atomValues.get(t));if(x.state==="hasValue"&&w===x.contents)return new Map}else if(!E.nonvalidatedAtoms.has(t)&&w instanceof au)return new Map;return l(w),s=void 0,new Map().set(t,Mc(w))}function g(){return B5(t)!==void 0&&i<=0}const y=Ece({key:t,nodeType:"atom",peek:d,get:h,set:p,init:f,invalidate:m,shouldDeleteConfigOnRelease:g,dangerouslyAllowMutability:e.dangerouslyAllowMutability,persistence_UNSTABLE:e.persistence_UNSTABLE?{type:e.persistence_UNSTABLE.type,backButton:e.persistence_UNSTABLE.backButton}:void 0,shouldRestoreFromSnapshots:!0,retainedBy:n});return y}function iR(e){if(process.env.NODE_ENV!=="production"&&typeof e.key!="string")throw Pt("A key option with a unique string value must be provided when creating an atom.");const{...t}=e,r="default"in e?e.default:new Promise(()=>{});return xce(r)?Cce({...t,default:r}):Tce({...t,default:r})}function Cce(e){const t=iR({...e,default:il,persistence_UNSTABLE:e.persistence_UNSTABLE===void 0?void 0:{...e.persistence_UNSTABLE,validator:n=>n instanceof au?n:zr(e.persistence_UNSTABLE).validator(n,il)},effects:e.effects,effects_UNSTABLE:e.effects_UNSTABLE}),r=ah({key:`${e.key}__withFallback`,get:({get:n})=>{const i=n(t);return i instanceof au?e.default:i},set:({set:n},i)=>n(t,i),cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:e.dangerouslyAllowMutability});return wce(r.key,B5(e.key)),r}iR.value=e=>new q5(e);var Pce=iR;class Nce{constructor(t){var r;jt(this,"_map",void 0),jt(this,"_keyMapper",void 0),this._map=new Map,this._keyMapper=(r=t?.mapKey)!==null&&r!==void 0?r:n=>n}size(){return this._map.size}has(t){return this._map.has(this._keyMapper(t))}get(t){return this._map.get(this._keyMapper(t))}set(t,r){this._map.set(this._keyMapper(t),r)}delete(t){this._map.delete(this._keyMapper(t))}clear(){this._map.clear()}}var Dce={MapCache:Nce},Ice=Dce.MapCache,kce=Object.freeze({__proto__:null,MapCache:Ice});const{LRUCache:z5}=I5,{MapCache:Mce}=kce,Yg={equality:"reference",eviction:"none",maxSize:1/0};function Lce({equality:e=Yg.equality,eviction:t=Yg.eviction,maxSize:r=Yg.maxSize}=Yg){const n=jce(e);return Fce(t,r,n)}function jce(e){switch(e){case"reference":return t=>t;case"value":return t=>JS(t)}throw Pt(`Unrecognized equality policy ${e}`)}function Fce(e,t,r){switch(e){case"keep-all":return new Mce({mapKey:r});case"lru":return new z5({mapKey:r,maxSize:zr(t)});case"most-recent":return new z5({mapKey:r,maxSize:1})}throw Pt(`Unrecognized eviction policy ${e}`)}var $ce=Lce;const{setConfigDeletionHandler:Vce}=Ha;let qce=0;function Bce(e){var t,r;const n=$ce({equality:(t=(r=e.cachePolicyForParams_UNSTABLE)===null||r===void 0?void 0:r.equality)!==null&&t!==void 0?t:"value",eviction:"keep-all"});return i=>{var a;let o;try{o=n.get(i)}catch(d){throw Pt(`Problem with cache lookup for selector ${e.key}: ${d.message}`)}if(o!=null)return o;const s=`${e.key}__selectorFamily/${(a=JS(i,{allowFunctions:!0}))!==null&&a!==void 0?a:"void"}/${qce++}`,u=d=>e.get(i)(d),l=e.cachePolicy_UNSTABLE,c=typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(i):e.retainedBy_UNSTABLE;let f;if(e.set!=null){const d=e.set;f=ah({key:s,get:u,set:(m,p)=>d(i)(m,p),cachePolicy_UNSTABLE:l,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:c})}else f=ah({key:s,get:u,cachePolicy_UNSTABLE:l,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:c});return n.set(i,f),Vce(f.key,()=>{n.delete(i)}),f}}var al=Bce;al({key:"__constant",get:e=>()=>e,cachePolicyForParams_UNSTABLE:{equality:"reference"}}),al({key:"__error",get:e=>()=>{throw Pt(e)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});const{loadableWithError:W5,loadableWithPromise:H5,loadableWithValue:G5}=Yd;function Qg(e,t){const r=Array(t.length).fill(void 0),n=Array(t.length).fill(void 0);for(const[i,a]of t.entries())try{r[i]=e(a)}catch(o){n[i]=o}return[r,n]}function Uce(e){return e!=null&&!Tr(e)}function Xg(e){return Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(t=>e[t])}function aR(e,t){return Array.isArray(e)?t:Object.getOwnPropertyNames(e).reduce((r,n,i)=>({...r,[n]:t[i]}),{})}function Lc(e,t,r){const n=r.map((i,a)=>i==null?G5(t[a]):Tr(i)?H5(i):W5(i));return aR(e,n)}function zce(e,t){return t.map((r,n)=>r===void 0?e[n]:r)}al({key:"__waitForNone",get:e=>({get:t})=>{const r=Xg(e),[n,i]=Qg(t,r);return Lc(e,n,i)},dangerouslyAllowMutability:!0}),al({key:"__waitForAny",get:e=>({get:t})=>{const r=Xg(e),[n,i]=Qg(t,r);return i.some(a=>!Tr(a))?Lc(e,n,i):new Promise(a=>{for(const[o,s]of i.entries())Tr(s)&&s.then(u=>{n[o]=u,i[o]=void 0,a(Lc(e,n,i))}).catch(u=>{i[o]=u,a(Lc(e,n,i))})})},dangerouslyAllowMutability:!0}),al({key:"__waitForAll",get:e=>({get:t})=>{const r=Xg(e),[n,i]=Qg(t,r);if(i.every(o=>o==null))return aR(e,n);const a=i.find(Uce);if(a!=null)throw a;return Promise.all(i).then(o=>aR(e,zce(n,o)))},dangerouslyAllowMutability:!0}),al({key:"__waitForAllSettled",get:e=>({get:t})=>{const r=Xg(e),[n,i]=Qg(t,r);return i.every(a=>!Tr(a))?Lc(e,n,i):Promise.all(i.map((a,o)=>Tr(a)?a.then(s=>{n[o]=s,i[o]=void 0}).catch(s=>{n[o]=void 0,i[o]=s}):null)).then(()=>Lc(e,n,i))},dangerouslyAllowMutability:!0}),al({key:"__noWait",get:e=>({get:t})=>{try{return ah.value(G5(t(e)))}catch(r){return ah.value(Tr(r)?H5(r):W5(r))}},dangerouslyAllowMutability:!0});const{RecoilLoadable:NGe}=Yd,{RecoilRoot:Wce}=Vg,{isRecoilValue:DGe}=rl,{freshSnapshot:IGe}=$g,{useRecoilValue:Hce,useSetRecoilState:Gce}=ale,{useRecoilCallback:Kce}=C5;var sh={RecoilRoot:Wce,atom:Pce,useRecoilValue:Hce,useSetRecoilState:Gce,useRecoilCallback:Kce},Yce=sh.RecoilRoot,Qce=sh.atom,Xce=sh.useRecoilValue,Zce=sh.useSetRecoilState,Jce=sh.useRecoilCallback;const K5=K.createContext(null);function efe({adapter:e,children:t}){const[r]=K.useState({}),n=C.jsx(K5.Provider,{value:{stateFactory:r,adapter:e},children:t});return e.type==="recoilAdapter"?C.jsx(Yce,{children:n}):n}function tfe(){const e=K.useContext(K5);if(!e)throw new Error("useStateContext must be used within a StateProvider");return e}function Ka(e,t){const{stateFactory:r,adapter:n}=tfe();let i=r[e];if(!i){if(t===void 0)throw new Error(`State manager for key "${e}" does not exist and no initial value was provided.`);i=n.createState(t),r[e]=i}const[a,o]=K.useState(i.get());return K.useEffect(()=>{const u=i.subscribe(l=>{o(l)});return()=>u()},[i]),[a,u=>{typeof u=="function"?i.set(u(i.get())):Array.isArray(u)?i.set(u.filter(l=>l!==null)):i.set(u)}]}function Y5(){return window.innerHeight>window.innerWidth}function rfe(){const[e,t]=K.useState(Y5());return K.useEffect(()=>{function r(){t(Y5())}return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]),e}function nfe(){const[e,t]=K.useState(!document.hidden),r=()=>{t(!document.hidden)};return K.useEffect(()=>(document.addEventListener("visibilitychange",r),()=>{document.removeEventListener("visibilitychange",r)})),e}function oR(e,t){const[r,n]=K.useState(e),i=K.useRef(null);function a(o){i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{n(o)},t)}return[r,a]}const ife=1e3*30,afe=["mousedown","mousemove","wheel","keydown","touchstart","scroll"],ofe=(e,t)=>(e.forEach(r=>window.addEventListener(r,t,{passive:!0})),()=>{e.forEach(r=>window.removeEventListener(r,t))});function Q5(e=ife){const t=K.useRef(null),[r,n]=K.useState(!1),[i,a]=K.useState(!1),[o,s]=K.useState(!0),u=K.useCallback(()=>{!o||i||(t.current&&clearTimeout(t.current),n(!1),t.current=window.setTimeout(()=>{n(!0)},e))},[e,i,o]),l=()=>{a(!0),n(!0)},c=()=>{a(!1),u()},f=()=>{s(!1),n(!1),t.current&&clearTimeout(t.current)},d=()=>{s(!0),u()};return K.useEffect(()=>{if(!o)return;const m=ofe(afe,u);return u(),()=>{t.current&&clearTimeout(t.current),m()}},[u,o]),[r,{disableIdleMode:f,enableIdleMode:d,lockInIdleMode:l,unlockIdleMode:c}]}function jc(e){const[t,r]=K.useState(()=>matchMedia(e).matches);return K.useLayoutEffect(()=>{const n=matchMedia(e);function i(){r(n.matches)}return n.addEventListener("change",i),()=>{n.removeEventListener("change",i)}},[e]),t}var ts=(e=>(e[e.equal=1]="equal",e[e.greater=2]="greater",e[e.lessThan=3]="lessThan",e[e.like=4]="like",e[e.endsWith=5]="endsWith",e[e.startsWith=6]="startsWith",e[e.in=7]="in",e))(ts||{}),rs=(e=>(e[e.readOnly=1]="readOnly",e[e.search=2]="search",e[e.select=3]="select",e[e.multipleSelect=4]="multipleSelect",e[e.boolean=5]="boolean",e[e.date=6]="date",e[e.dateTime=7]="dateTime",e))(rs||{});const X5=K.createContext(null),Z5=K.createContext(null),J5=K.createContext(null),e4=K.createContext(null);function sR(){return K.useContext(X5)}function uR(){return K.useContext(Z5)}function lR(){return K.useContext(J5)}function cR(){return K.useContext(e4)}const Fc=(e,t,r="")=>btoa(`After=0${sfe(t)}${ufe(e)}${r?`&${r}`:""}`),sfe=e=>{const t="&Sort=";if(Object.keys(e).length===0)throw new Error("No sortings found");return Object.keys(e).reduce((r,n)=>{const i=e[n];return r===t?`${r}${i.name}:${i.direction}`:`${r},${i.name}:${i.direction}`},t)},ufe=e=>{if(Object.keys(e).length===0)return"";const t="&Filter=[";return Object.keys(e).reduce((r,n,i)=>{const a=e[n];if(!a.value||a.value.length===0)return r;if(a.names.length===1)return r===t?`${r}{"${a.names[0]}":{"${Zg(a.operator)}":${JSON.stringify(a.value)}},"g":${i}}`:`${r},{"${a.names[0]}":{"${Zg(a.operator)}":${JSON.stringify(a.value)}},"g":${i}}`;const o=a.names.reduce((s,u)=>s===""?`${s}{"${u}":{"${Zg(a.operator)}":${JSON.stringify(a.value)}},"g":${i}}`:`${s},{"${u}":{"${Zg(a.operator)}":${JSON.stringify(a.value)}},"g":${i}}`,"");return r===t?`${r}${o}`:`${r},${o}`},t)+"]"};function Zg(e){switch(e){case ts.equal:return"eq";case ts.greater:return"gt";case ts.lessThan:return"lt";case ts.like:return"like";case ts.endsWith:return"like*";case ts.startsWith:return"*like";case ts.in:return"in";default:throw`Operator ${e} unknown`}}function t4({children:e,contextKey:t,defaultSorting:r,defaultFilters:n,defaultPersistance:i,canTogglePersistance:a}){function o(){if(!i||a&&!localStorage.getItem(t)&&!Object.values(n).find(k=>k.isShared))return n;let S={...n};const j=Object.keys(n).filter(k=>n[k].isShared);if(j.length>0){const k=localStorage.getItem("sharedFilters")??"{}";let F=JSON.parse(k);S=j.reduce((V,P)=>F.hasOwnProperty(P)?{...V,[P]:F[P]}:(F={...F,[P]:n[P]},V),S),localStorage.setItem("sharedFilters",JSON.stringify(F))}const M=Object.keys(n).filter(k=>!n[k].isShared);if(M.length>0){const k=localStorage.getItem(t)??"{}";let F=JSON.parse(k);S=M.reduce((V,P)=>F.hasOwnProperty(P)?{...V,[P]:F[P]}:(F={...F,[P]:n[P]},V),S),localStorage.setItem(t,JSON.stringify(F))}return S}function s(){if(!i||a&&!localStorage.getItem(t)&&!Object.values(r).find(k=>k.isShared))return r;let S={...r};const j=Object.keys(r).filter(k=>r[k].isShared);if(j.length>0){const k=localStorage.getItem("sharedSortings")??"{}";let F=JSON.parse(k);S=j.reduce((V,P)=>F.hasOwnProperty(P)?{...V,[P]:F[P]}:(F={...F,[P]:r[P]},V),S),localStorage.setItem("sharedSortings",JSON.stringify(F))}const M=Object.keys(r).filter(k=>!r[k].isShared);if(M.length>0){const k=localStorage.getItem(t)??"{}";let F=JSON.parse(k);S=M.reduce((V,P)=>F.hasOwnProperty(P)?{...V,[P]:F[P]}:(F={...F,[P]:r[P]},V),S),localStorage.setItem(t,JSON.stringify(F))}return S}const[u,l]=K.useState(o),[c,f]=K.useState(s),[d,h]=K.useState(()=>Fc(u,c,t)),[m,p]=K.useState(i),[g,y]=K.useState(t);K.useEffect(()=>y(t),[t]),K.useEffect(()=>l(o),[n]),K.useEffect(()=>f(s),[r]),K.useEffect(()=>h(Fc(n,r,t)),[t]);const b=K.useCallback(()=>{throw a&&(m&&localStorage.removeItem(t),p(!m)),new Error("Context is not configured to allow persistance toggle")},[]),E=K.useMemo(()=>({settings:{currentPersistance:m,canToggle:a,contextKey:t},setPersistance:b}),[m,t]),w=K.useMemo(()=>({filters:u,setFilters:l}),[u,t]),x=K.useMemo(()=>({sortings:c,setSortings:f}),[c,t]),R=K.useMemo(()=>({cursor:g!==t?Fc(n,r,t):d,updateCursor:()=>{h(()=>Fc(u,c,t))},updateRawCursor:(S,j)=>{const M=Fc(S,j,t);h(M)}}),[d,w,x,n,r,t]);return C.jsx(e4.Provider,{value:E,children:C.jsx(X5.Provider,{value:w,children:C.jsx(Z5.Provider,{value:x,children:C.jsx(J5.Provider,{value:R,children:e})})})})}function fR(){const e=sR(),t=uR(),r=lR(),n=cR();if(!e||!t||!r||!n)throw new Error("usePagination must be used within PaginationProvider");return{getFilterValue:u=>{const{filters:l}=e;return l[u].value},updateFilters:(u,l=!1)=>{const c={...e.filters,...u};e.setFilters(c);const f=Object.keys(c).filter(d=>c[d].isShared);if(f.length>0){const d=localStorage.getItem("sharedFilters")??"{}",h=JSON.parse(d),m=f.reduce((p,g)=>({...p,[g]:c[g]}),{...h});localStorage.setItem("sharedFilters",JSON.stringify(m))}if(n.settings.currentPersistance){const d=Object.keys(c).filter(g=>!c[g].isShared),h=localStorage.getItem(n.settings.contextKey)??"{}",m=JSON.parse(h),p=d.reduce((g,y)=>({...g,[y]:c[y]}),{...m});localStorage.setItem(n.settings.contextKey,JSON.stringify(p))}l&&r.updateRawCursor(c,t.sortings)},getSortingValue:u=>{const{sortings:l}=t;return l[u].direction},updateSortings:(u,l=!1)=>{const c={...t.sortings,...u};t.setSortings(c);const f=Object.keys(c).filter(d=>c[d].isShared);if(f.length>0){const d=localStorage.getItem("sharedSortings"),h=d?JSON.parse(d):{},m=f.reduce((p,g)=>({...p,[g]:h[g]}),{...h});localStorage.setItem("sharedSortings",JSON.stringify(m))}if(n.settings.currentPersistance){const d=Object.keys(c).filter(g=>!c[g].isShared),h=localStorage.getItem(n.settings.contextKey),m=h?JSON.parse(h):{},p=d.reduce((g,y)=>({...g,[y]:m[y]}),{...m});localStorage.setItem(n.settings.contextKey,JSON.stringify(p))}l&&r.updateRawCursor(e.filters,c)}}}function lfe(e=99){const[t,r]=K.useState(!1),[n,i]=K.useState(!1),[a,o]=K.useState([]),[s,u]=Ka("tagDistance",0);window.stopRunningLocate=function(){window.rfid.stop()};const l=b=>{try{h(0,"Beginning enumerate");const E=JSON.stringify(b);h(0,`readerID = ${E}`),window.rfid.readerID=b.RFID_Array[0].ID,i(!0),h(0,"Finished enumerate")}catch(E){i(!1),h(3,String(E))}};function c(b){console.log(b),b&&(b.errorCode,b.errorCode==1e3&&b?.vendorMessage==="CONNECTION_EVENT"?(h(0,"Connection event"),m()):h(3,`Error code: ${b.errorCode} Vendor message: ${b.vendorMessage}`))}K.useEffect(()=>{h(0,"Beginning connect"),n&&window.rfid.connect(),h(0,"Finished connect")},[n]);function f(){h(1,n.toString()),h(1,window.rfid),!n&&window.rfid&&(h(0,"Mount hook"),window.onEnumerate=l,window.statusLogger=c,window.rfid.statusEvent="statusLogger(%json);",h(0,`Set statusEvent = ${window.rfid.statusEvent}`),window.rfid.enumRFIDEvent="onEnumerate(%json);",h(0,`Set reportTrigger = ${window.rfid.reportTrigger}`),window.rfid.enumerate())}function d(){window.rfid&&(h(0,"Unomunt hook"),window.scanSingleRfidHandler=()=>{},window.rfid.tagEvent="",window._locate=void 0,window._inventory=()=>{},window.onEnumerate=()=>{},window.rfid.tagID="",h(0,"Stopping rfid"),window.rfid.stop(),h(0,"Rfid stopped"),h(0,"Disconnecting"),window.rfid.disconnect(),h(0,"Disconnected"),r(!1),i(!1))}K.useEffect(()=>{h(0,`isConnected = ${t}`)},[t]);function h(b,E){if(e<=b){let w="";switch(b){case 0:w="Trace -";break;case 1:w="Information -";break;case 2:w="Warning -";break;case 3:w="Error -";break;default:w="Unknown -"}o(x=>[...x,`${w} ${E}`])}}function m(){r(!0)}function p(b){window.rfid.reportTrigger=1,window.rfid.useSoftTrigger=0,window.rfid.reportUniqueTags="false",window.rfid.transport="serial",window.rfid.beepOnRead=1,window.rfid.lowerTriggerType="RFID_SCAN",window.rfid.upperTriggerType="RFID_SCAN",window.rfid.startTriggerType="triggerPress",window.rfid.stopTriggerType="triggerRelease",t&&(window.scanSingleRfidHandler=E=>{const w=E.TagData[0].tagID,x=JSON.stringify(E);h(0,`data = ${x}`),b(w)},window.rfid.tagEvent="scanSingleRfidHandler(%json);")}function g(b){window.rfid.tagEvent="TagLocateHandler(%json)";function E(w){u(w.TagLocate)}window.rfid.reportUniqueTags="false",window.rfid.transport="serial",window.rfid.reportTrigger=0,window.TagLocateHandler=E,window.rfid.beepOnRead=1,window.rfid.lowerTriggerType="NO_ACTION",window.rfid.upperTriggerType="NO_ACTION",window.rfid.startTriggerType="immediate",window.rfid.useSoftTrigger=0,window.rfid.antennaSelected=1,window.rfid.tagID=b,window.rfid.locateTag()}function y(b){try{t&&(h(0,"Beginning inventoryScan"),window.rfid.reportTrigger=0,window.rfid.useSoftTrigger=0,window.rfid.reportUniqueTags="true",window.rfid.transport="serial",window.rfid.beepOnRead=1,window.rfid.lowerTriggerType="RFID_SCAN",window.rfid.upperTriggerType="RFID_SCAN",window.rfid.startTriggerType="triggerPress",window.rfid.stopTriggerType="triggerRelease",window._inventory=E=>{b(E.TagData),h(0,`data = ${E.TagData[0].tagID}`),h(0,`datacomplete = ${E}`)},window.rfid.tagEvent="_inventory(%json);",h(0,`tagEvent = ${window.rfid.tagEvent}`),h(0,"Ended inventoryScan"))}catch(E){h(3,String(E))}}return{locateTag:g,inventoryScan:y,isConnected:t,canConnect:n,debugLog:a,mount:f,unMount:d,logDebug:h,scanSingleElement:p}}function Jg(e=".scrollable-container"){const t=new Map;K.useEffect(()=>{const r=document.querySelectorAll(e),n=a=>{a.classList.add("show-scrollbar"),setTimeout(()=>{a.classList.remove("show-scrollbar")},2e3)},i=a=>{a.classList.add("show-scrollbar"),t.has(a)&&clearTimeout(t.get(a));const o=window.setTimeout(()=>{a.classList.remove("show-scrollbar")},1e3);t.set(a,o)};return r.forEach(a=>{n(a);const o=()=>i(a);return a.addEventListener("scroll",o),()=>{a.removeEventListener("scroll",o),t.has(a)&&clearTimeout(t.get(a))}}),()=>{t.forEach(a=>clearTimeout(a))}},[e])}function r4({bufferName:e,callback:t}){const[r,n]=K.useState("- - - - - - - -"),[i,a]=K.useState(!1),[o,s]=K.useState(0),[u,l]=K.useState([]),c=K.useRef("- - - - - - - -"),f=K.useRef(null),d=x=>{const R=JSON.parse(localStorage.getItem(e)||"[]");!R.includes(x)&&x!=="- - - - - - - -"&&(R.push(x),localStorage.setItem(e,JSON.stringify(R)))},h=x=>{const S=JSON.parse(localStorage.getItem(e)||"[]").filter(j=>j!==x);localStorage.setItem(e,JSON.stringify(S))},m=x=>{n(c.current);const R=c.current;if(x!=="- - - - - - - -"&&typeof x=="string"){const S=t(c.current);if(S instanceof Promise)S.then(j=>{l(M=>[...M,j]),h(c.current)}).catch(()=>{d(R),p()});else return S}},p=()=>{const x=e,R=localStorage.getItem(x);if(R){const S=setInterval(async()=>{const j=o;if(j>=9){clearInterval(S);return}await g(JSON.parse(R))?(clearInterval(S),s(0)):s(j+1)},5e3);return()=>clearInterval(S)}},g=async x=>{let R=!0;for(const S of x)try{const j=await t(S);if(j instanceof Promise)j.then(M=>{l(k=>[...k,M])}),h(S);else return j}catch(j){console.trace("Error:",S,j),R=!1}return R},y=x=>{f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{m(x),c.current="- - - - - - - -"},250)},b=K.useCallback(x=>{!x.repeat&&x.key.length===1&&x.key!=="Unidentified"&&(c.current==="- - - - - - - -"?c.current=x.key:(c.current+=x.key,y(c.current)))},[]),E={activateScanner:()=>{window.addEventListener("keydown",b),a(!0),w(),console.log(`${e} scanner activated`)},disableScanner:()=>{window.removeEventListener("keydown",b),a(!1),console.log(`${e} scanner disabled`)}},w=()=>{c.current="- - - - - - - -"};return{lastScanned:r,scannerActions:E,isScannerActive:i,labelRead:u}}const n4=K.createContext(void 0);function i4(){const e=K.useContext(n4);if(e===void 0)throw new Error("BreadCrumbContext must be used within an BreadCrumbProvider");return e}function a4(){const[e,t]=Ka("hotKeysDialogState",!1),r=K.useCallback(()=>{t(o=>!o)},[t]),n=K.useCallback(()=>{t(!1)},[t]),i=K.useCallback(()=>{t(!0)},[t]),a=K.useMemo(()=>({toggle:r,close:n,open:i}),[r,n,i]);return[e,a]}function dR(e){const[t,r]=Ka("languageDialogState",!1),[n]=Ka("languageDialogPopover",!1),{i18n:i}=Qt(),a=i.resolvedLanguage??"",o=K.useCallback(()=>{r(!1)},[r]),s=K.useCallback(()=>{r(!0)},[r]),u=K.useCallback(()=>{r(!0);const c=Object.keys(e),f=c.indexOf(a);let d;f!==-1&&f<c.length-1?d=c[f+1]:d=c[0],i.changeLanguage(d)},[r,i,a,e]),l=K.useMemo(()=>({close:o,open:s,toggle:u}),[o,s,u]);return[t,l,n]}const o4=Qn(Iee,{shouldForwardProp:e=>e==="children"||e==="elevation"||e==="variant"})(({theme:e,backgroundColor:t,blur:r,saturate:n="180%",color:i,borderRadius:a="24px",border:o,padding:s="2vw",width:u="100%",height:l="100%",marginLeft:c="auto",marginRight:f="auto",marginTop:d="auto",marginBottom:h="auto",style:m={}})=>({display:"flex",flexDirection:"column",width:u,height:l,backgroundColor:t||e.palette.background.paper,backdropFilter:r&&`blur(${r}) saturate(${n})`,color:i||e.palette.primary.main,border:o,padding:s,borderRadius:a,marginLeft:c,marginRight:f,marginTop:d,marginBottom:h,...m}));function s4({children:e,value:t,index:r,styles:n}){return C.jsx(Gv,{id:`tabpanel-${r}`,role:"tabpanel","aria-labelledby":`tab-${r}`,display:t!==r?"none":"flex",sx:n,children:e})}function u4({tabs:e,value:t,onChange:r,color:n="primary.main",textColor:i="inherit",fullWidth:a=!1,size:o="medium",height:s,width:u}){const{t:l}=Qt(),c=(f,d)=>{d!==null&&r(f,d)};return C.jsx(Se.ToggleButtonGroup,{value:t,exclusive:!0,onChange:c,fullWidth:a,"aria-label":"toggle buttons as custom rounded tabs",children:e.map((f,d)=>C.jsx(Se.ToggleButton,{disableRipple:!0,disableFocusRipple:!0,size:o,value:typeof f=="string"?d:f?.value,selected:typeof f=="string"?t===d:t===f?.value,sx:{height:s,width:u,fontWeight:600,minWidth:"160px",textTransform:"capitalize","&.Mui-selected":{color:i,backgroundColor:n,transition:"background-color 0.2s ease-in-out",":hover":{backgroundColor:n}},borderRadius:d===0?"24px 0px 0px 24px":d===e.length-1?"0px 24px 24px 0px":void 0},children:C.jsxs(Kr,{gap:"4px",alignItems:"center",children:[typeof f!="string"&&f?.icon?f?.icon:typeof f=="string"?t===d&&C.jsx(v1,{}):t===f?.value&&C.jsx(v1,{}),l(typeof f=="string"?f:f?.label)]})},typeof f=="string"?f:f?.label))})}function l4({tabs:e,value:t,onChange:r,color:n="primary.main",textColor:i="inherit",fullWidth:a=!1}){const{t:o}=Qt();return C.jsx(Se.Tabs,{value:t,onChange:r,"aria-label":"custom tabs",variant:"scrollable",scrollButtons:e.length>3,slotProps:{indicator:{children:C.jsx("span",{className:"MuiTabs-indicatorSpan"})}},sx:{"& .Mui-selected":{color:`${i}!important`},"& .MuiTabs-indicator":{display:"flex",justifyContent:"center",backgroundColor:"transparent"},"& .MuiTabs-indicatorSpan":{maxWidth:40,width:"100%",backgroundColor:n}},children:e.map((s,u)=>C.jsx(Se.Tab,{value:typeof s=="string"?u:s?.value,id:typeof s=="string"?s:s?.label,label:o(typeof s=="string"?s:s?.label),"aria-controls":`tabPanel-${u}`,icon:typeof s=="string"?void 0:s?.icon,sx:a?{minWidth:"fit-content",flex:1}:{}},typeof s=="string"?s:s?.label))})}function c4({tabs:e,value:t,onChange:r,color:n,textColor:i="inherit",variant:a="standard",fullWidth:o=!1,size:s="medium"}){return a==="rounded"?C.jsx(u4,{tabs:e,value:t,onChange:r,color:n,fullWidth:o,size:s,textColor:i}):C.jsx(l4,{tabs:e,value:t,onChange:r,color:n,textColor:i,fullWidth:o})}function cfe({doLogin:e,pendingLogin:t,doLogout:r,pendingLogout:n}){const i=Rg([]),a=Og(),o=[f=>{const d={credentials:{username:f.get("username")?.toString()||"",password:f.get("password")?.toString()||"",rFID:f.get("rfid")?.toString()||"",client_id:a.CLIENT_ID}};e({variables:d,onCompleted:h=>{const m=h.authMutation.login,{expires:p,token:g,errors:y,username:b}=m;if(y&&y.length>0){i.set((m.errors??[]).map(({code:E,description:w})=>({code:E,description:w})));return}a.AUTH_SCHEMA!=="Cookies"&&g&&localStorage.setItem("token",`Bearer ${g}`),p&&localStorage.setItem("authExpiration",p),b&&localStorage.setItem("username",b)}})},t],s=[()=>{r({variables:{},onCompleted:()=>{localStorage.removeItem("token"),localStorage.removeItem("authExpiration"),localStorage.removeItem("username")}})},n],u=localStorage.getItem("authExpiration")!==void 0&&localStorage.getItem("authExpiration")!==null&&new Date(localStorage.getItem("authExpiration")).getTime()>new Date().getTime(),l=!!(a.AUTH_SCHEMA!=="Cookies"?localStorage.getItem("token")&&u:u),c={login:o,logout:s,removeError:i.remove};return[l,i.value,c]}const f4=K.createContext(null);function ffe({children:e,doLogin:t,pendingLogin:r,doLogout:n,pendingLogout:i}){const[a,o,{login:s,logout:u,removeError:l}]=cfe({doLogin:t,pendingLogin:r,doLogout:n,pendingLogout:i});return C.jsx(f4.Provider,{value:[a,o,{login:s,logout:u,removeError:l}],children:e})}function d4(){const e=K.useContext(f4);if(e===null)throw new Error("useAuthContext must be used within an AuthProvider");return e}const h4={tabPanel:{width:"100%",flexDirection:"column",justifyContent:"flex-end",padding:"18px 0px 0px px",gap:"32px",flexGrow:1},contentFadeOut:{transition:"opacity 0.5s ease-out",opacity:0,pointerEvents:"none"}};function dfe({ChangePasswordWidget:e,children:t,title:r,tabs:n,backgroundColor:i,blur:a,elevation:o,color:s,borderRadius:u,border:l,padding:c,width:f,height:d,redirect:h=!0,redirectPath:m="/",loggedCallback:p,logo:g}){const{t:y}=Qt(),[b,E]=K.useState(!1),[w,x,{login:R,removeError:S}]=d4(),j=jc("(min-height:700px)"),[M,k]=R,[F,V]=K.useState(0),[P,A]=K.useState(!1),[I,L]=K.useState(!1),[B,H]=K.useState(!1),U=(T,D)=>{V(D)};return K.useEffect(()=>{x.length>0&&x.find(({code:T})=>T==="PASSWORD_EXPIRED")&&E(!0)},[x]),K.useEffect(()=>{p&&w&&p()},[w,p]),K.useEffect(()=>{const T=x.map((D,O)=>setTimeout(()=>S(O),2e3));return()=>{T.forEach(clearTimeout)}},[x,S]),K.useEffect(()=>{if(w&&h){L(!0);const T=setTimeout(()=>{A(!0)},500),D=setTimeout(()=>{H(!0)},2500);return()=>{clearTimeout(T),clearTimeout(D)}}},[w,h]),w&&h&&B?C.jsx(cre,{to:m,replace:!0}):C.jsxs(C.Fragment,{children:[P?C.jsx(Sg,{}):null,C.jsx(o4,{elevation:o,variant:o!==void 0?"elevation":"outlined",blur:a,border:l,color:s,backgroundColor:i,borderRadius:u,padding:c,width:P?"0px":f,height:P?"0px":d,style:I?h4.contentFadeOut:{flexGrow:0},children:C.jsxs(AS,{height:"100%",marginTop:"auto",marginBottom:"auto",justifyContent:"space-between",children:[n&&C.jsx(Kr,{borderBottom:"1px solid",borderColor:"divider",children:n&&n.length>0&&C.jsx(c4,{value:F,onChange:U,tabs:n,color:s})}),x.length>0&&C.jsx(Se.Stack,{spacing:1,sx:{padding:"16px",minHeight:"20%",justifyContent:"center"},children:x.map(({code:T,description:D},O)=>C.jsx(Se.Alert,{variant:"filled",severity:"error",onClose:()=>S(O),children:y(T||D)},T))}),C.jsx(Kr,{style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",flex:1},children:C.jsx("img",{src:g,alt:"Logo",width:j?"60px":"40px"})}),C.jsx(Kr,{flex:1,alignContent:"center",flexDirection:"column",children:C.jsx(Se.Typography,{variant:j?"h4":"h5",sx:{fontWeight:300,textAlign:"center",marginTop:"auto",marginBottom:"auto"},children:r})}),C.jsx("form",{id:"authForm",action:M,children:b&&e?C.jsx(e,{pending:k}):n&&n.length>0?n.map(({label:T,child:D},O)=>C.jsx(s4,{value:F,index:O,styles:h4.tabPanel,children:C.jsx(D,{pending:k})},T)):t})]})})]})}const Ct=e=>typeof e=="string",uh=()=>{let e,t;const r=new Promise((n,i)=>{e=n,t=i});return r.resolve=e,r.reject=t,r},p4=e=>e==null?"":""+e,hfe=(e,t,r)=>{e.forEach(n=>{t[n]&&(r[n]=t[n])})},pfe=/###/g,v4=e=>e&&e.indexOf("###")>-1?e.replace(pfe,"."):e,g4=e=>!e||Ct(e),lh=(e,t,r)=>{const n=Ct(t)?t.split("."):t;let i=0;for(;i<n.length-1;){if(g4(e))return{};const a=v4(n[i]);!e[a]&&r&&(e[a]=new r),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={},++i}return g4(e)?{}:{obj:e,k:v4(n[i])}},m4=(e,t,r)=>{const{obj:n,k:i}=lh(e,t,Object);if(n!==void 0||t.length===1){n[i]=r;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=lh(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=lh(e,o,Object),s?.obj&&typeof s.obj[`${s.k}.${a}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=r},vfe=(e,t,r,n)=>{const{obj:i,k:a}=lh(e,t,Object);i[a]=i[a]||[],i[a].push(r)},em=(e,t)=>{const{obj:r,k:n}=lh(e,t);if(r&&Object.prototype.hasOwnProperty.call(r,n))return r[n]},gfe=(e,t,r)=>{const n=em(e,r);return n!==void 0?n:em(t,r)},y4=(e,t,r)=>{for(const n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?Ct(e[n])||e[n]instanceof String||Ct(t[n])||t[n]instanceof String?r&&(e[n]=t[n]):y4(e[n],t[n],r):e[n]=t[n]);return e},$c=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var mfe={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const yfe=e=>Ct(e)?e.replace(/[&<>"'\/]/g,t=>mfe[t]):e;class _fe{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const r=this.regExpMap.get(t);if(r!==void 0)return r;const n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}}const bfe=[" ",",","?","!",";"],Efe=new _fe(20),wfe=(e,t,r)=>{t=t||"",r=r||"";const n=bfe.filter(o=>t.indexOf(o)<0&&r.indexOf(o)<0);if(n.length===0)return!0;const i=Efe.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let a=!i.test(e);if(!a){const o=e.indexOf(r);o>0&&!i.test(e.substring(0,o))&&(a=!0)}return a},hR=(e,t,r=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const n=t.split(r);let i=e;for(let a=0;a<n.length;){if(!i||typeof i!="object")return;let o,s="";for(let u=a;u<n.length;++u)if(u!==a&&(s+=r),s+=n[u],o=i[s],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&u<n.length-1)continue;a+=u-a+1;break}i=o}return i},ch=e=>e?.replace("_","-"),xfe={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class tm{constructor(t,r={}){this.init(t,r)}init(t,r={}){this.prefix=r.prefix||"i18next:",this.logger=t||xfe,this.options=r,this.debug=r.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,r,n,i){return i&&!this.debug?null:(Ct(t[0])&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[r](t))}create(t){return new tm(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new tm(this.logger,t)}}var wo=new tm;let rm=class{constructor(){this.observers={}}on(t,r){return t.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(r)||0;this.observers[n].set(r,i+1)}),this}off(t,r){if(this.observers[t]){if(!r){delete this.observers[t];return}this.observers[t].delete(r)}}emit(t,...r){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([i,a])=>{for(let o=0;o<a;o++)i(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([i,a])=>{for(let o=0;o<a;o++)i.apply(i,[t,...r])})}};class _4 extends rm{constructor(t,r={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const r=this.options.ns.indexOf(t);r>-1&&this.options.ns.splice(r,1)}getResource(t,r,n,i={}){const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,r],n&&(Array.isArray(n)?s.push(...n):Ct(n)&&a?s.push(...n.split(a)):s.push(n)));const u=em(this.data,s);return!u&&!r&&!n&&t.indexOf(".")>-1&&(t=s[0],r=s[1],n=s.slice(2).join(".")),u||!o||!Ct(n)?u:hR(this.data?.[t]?.[r],n,a)}addResource(t,r,n,i,a={silent:!1}){const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let s=[t,r];n&&(s=s.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(s=t.split("."),i=r,r=s[1]),this.addNamespaces(r),m4(this.data,s,i),a.silent||this.emit("added",t,r,n,i)}addResources(t,r,n,i={silent:!1}){for(const a in n)(Ct(n[a])||Array.isArray(n[a]))&&this.addResource(t,r,a,n[a],{silent:!0});i.silent||this.emit("added",t,r,n)}addResourceBundle(t,r,n,i,a,o={silent:!1,skipCopy:!1}){let s=[t,r];t.indexOf(".")>-1&&(s=t.split("."),i=n,n=r,r=s[1]),this.addNamespaces(r);let u=em(this.data,s)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?y4(u,n,a):u={...u,...n},m4(this.data,s,u),o.silent||this.emit("added",t,r,n)}removeResourceBundle(t,r){this.hasResourceBundle(t,r)&&delete this.data[t][r],this.removeNamespaces(r),this.emit("removed",t,r)}hasResourceBundle(t,r){return this.getResource(t,r)!==void 0}getResourceBundle(t,r){return r||(r=this.options.defaultNS),this.getResource(t,r)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const r=this.getDataByLanguage(t);return!!(r&&Object.keys(r)||[]).find(i=>r[i]&&Object.keys(r[i]).length>0)}toJSON(){return this.data}}var b4={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,i){return e.forEach(a=>{t=this.processors[a]?.process(t,r,n,i)??t}),t}};const E4={},w4=e=>!Ct(e)&&typeof e!="boolean"&&typeof e!="number";class nm extends rm{constructor(t,r={}){super(),hfe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=wo.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,r={interpolation:{}}){const n={...r};return t==null?!1:this.resolve(t,n)?.res!==void 0}extractFromKey(t,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let a=r.ns||this.options.defaultNS||[];const o=n&&t.indexOf(n)>-1,s=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!wfe(t,n,i);if(o&&!s){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:Ct(a)?[a]:a};const l=t.split(n);(n!==i||n===i&&this.options.ns.indexOf(l[0])>-1)&&(a=l.shift()),t=l.join(i)}return{key:t,namespaces:Ct(a)?[a]:a}}translate(t,r,n){let i=typeof r=="object"?{...r}:r;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(i={...i}),i||(i={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const a=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:s,namespaces:u}=this.extractFromKey(t[t.length-1],i),l=u[u.length-1];let c=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;c===void 0&&(c=":");const f=i.lng||this.language,d=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()==="cimode")return d?a?{res:`${l}${c}${s}`,usedKey:s,exactUsedKey:s,usedLng:f,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${c}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:f,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;const h=this.resolve(t,i);let m=h?.res;const p=h?.usedKey||s,g=h?.exactUsedKey||s,y=["[object Number]","[object Function]","[object RegExp]"],b=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,w=i.count!==void 0&&!Ct(i.count),x=nm.hasDefaultValue(i),R=w?this.pluralResolver.getSuffix(f,i.count,i):"",S=i.ordinal&&w?this.pluralResolver.getSuffix(f,i.count,{ordinal:!1}):"",j=w&&!i.ordinal&&i.count===0,M=j&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${R}`]||i[`defaultValue${S}`]||i.defaultValue;let k=m;E&&!m&&x&&(k=M);const F=w4(k),V=Object.prototype.toString.apply(k);if(E&&k&&F&&y.indexOf(V)<0&&!(Ct(b)&&Array.isArray(k))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const P=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,k,{...i,ns:u}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(h.res=P,h.usedParams=this.getUsedParamsDetails(i),h):P}if(o){const P=Array.isArray(k),A=P?[]:{},I=P?g:p;for(const L in k)if(Object.prototype.hasOwnProperty.call(k,L)){const B=`${I}${o}${L}`;x&&!m?A[L]=this.translate(B,{...i,defaultValue:w4(M)?M[L]:void 0,joinArrays:!1,ns:u}):A[L]=this.translate(B,{...i,joinArrays:!1,ns:u}),A[L]===B&&(A[L]=k[L])}m=A}}else if(E&&Ct(b)&&Array.isArray(m))m=m.join(b),m&&(m=this.extendTranslation(m,t,i,n));else{let P=!1,A=!1;!this.isValidLookup(m)&&x&&(P=!0,m=M),this.isValidLookup(m)||(A=!0,m=s);const L=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&A?void 0:m,B=x&&M!==m&&this.options.updateMissing;if(A||P||B){if(this.logger.log(B?"updateKey":"missingKey",f,l,s,B?M:m),o){const D=this.resolve(s,{...i,keySeparator:!1});D&&D.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let H=[];const U=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&U&&U[0])for(let D=0;D<U.length;D++)H.push(U[D]);else this.options.saveMissingTo==="all"?H=this.languageUtils.toResolveHierarchy(i.lng||this.language):H.push(i.lng||this.language);const T=(D,O,$)=>{const q=x&&$!==m?$:L;this.options.missingKeyHandler?this.options.missingKeyHandler(D,l,O,q,B,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(D,l,O,q,B,i),this.emit("missingKey",D,l,O,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?H.forEach(D=>{const O=this.pluralResolver.getSuffixes(D,i);j&&i[`defaultValue${this.options.pluralSeparator}zero`]&&O.indexOf(`${this.options.pluralSeparator}zero`)<0&&O.push(`${this.options.pluralSeparator}zero`),O.forEach($=>{T([D],s+$,i[`defaultValue${$}`]||M)})}):T(H,s,M))}m=this.extendTranslation(m,t,i,h,n),A&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${c}${s}`),(A||P)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${s}`:s,P?m:void 0,i))}return a?(h.res=m,h.usedParams=this.getUsedParamsDetails(i),h):m}extendTranslation(t,r,n,i,a){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const u=Ct(t)&&(n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let l;if(u){const f=t.match(this.interpolator.nestingRegexp);l=f&&f.length}let c=n.replace&&!Ct(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),t=this.interpolator.interpolate(t,c,n.lng||this.language||i.usedLng,n),u){const f=t.match(this.interpolator.nestingRegexp),d=f&&f.length;l<d&&(n.nest=!1)}!n.lng&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(t=this.interpolator.nest(t,(...f)=>a?.[0]===f[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${r[0]}`),null):this.translate(...f,r),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,s=Ct(o)?[o]:o;return t!=null&&s?.length&&n.applyPostProcessor!==!1&&(t=b4.handle(s,t,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),t}resolve(t,r={}){let n,i,a,o,s;return Ct(t)&&(t=[t]),t.forEach(u=>{if(this.isValidLookup(n))return;const l=this.extractFromKey(u,r),c=l.key;i=c;let f=l.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const d=r.count!==void 0&&!Ct(r.count),h=d&&!r.ordinal&&r.count===0,m=r.context!==void 0&&(Ct(r.context)||typeof r.context=="number")&&r.context!=="",p=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);f.forEach(g=>{this.isValidLookup(n)||(s=g,!E4[`${p[0]}-${g}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(s)&&(E4[`${p[0]}-${g}`]=!0,this.logger.warn(`key "${i}" for languages "${p.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(y=>{if(this.isValidLookup(n))return;o=y;const b=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(b,c,y,g,r);else{let w;d&&(w=this.pluralResolver.getSuffix(y,r.count,r));const x=`${this.options.pluralSeparator}zero`,R=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(b.push(c+w),r.ordinal&&w.indexOf(R)===0&&b.push(c+w.replace(R,this.options.pluralSeparator)),h&&b.push(c+x)),m){const S=`${c}${this.options.contextSeparator}${r.context}`;b.push(S),d&&(b.push(S+w),r.ordinal&&w.indexOf(R)===0&&b.push(S+w.replace(R,this.options.pluralSeparator)),h&&b.push(S+x))}}let E;for(;E=b.pop();)this.isValidLookup(n)||(a=E,n=this.getResource(y,g,E,r))}))})}),{res:n,usedKey:i,exactUsedKey:a,usedLng:o,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,r,n,i={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,r,n,i):this.resourceStore.getResource(t,r,n,i)}getUsedParamsDetails(t={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&!Ct(t.replace);let i=n?t.replace:t;if(n&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const a of r)delete i[a]}return i}static hasDefaultValue(t){const r="defaultValue";for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&r===n.substring(0,r.length)&&t[n]!==void 0)return!0;return!1}}class x4{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=wo.create("languageUtils")}getScriptPartFromCode(t){if(t=ch(t),!t||t.indexOf("-")<0)return null;const r=t.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(t){if(t=ch(t),!t||t.indexOf("-")<0)return t;const r=t.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(t){if(Ct(t)&&t.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(t)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let r;return t.forEach(n=>{if(r)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(r=i)}),!r&&this.options.supportedLngs&&t.forEach(n=>{if(r)return;const i=this.getScriptPartFromCode(n);if(this.isSupportedCode(i))return r=i;const a=this.getLanguagePartFromCode(n);if(this.isSupportedCode(a))return r=a;r=this.options.supportedLngs.find(o=>{if(o===a)return o;if(!(o.indexOf("-")<0&&a.indexOf("-")<0)&&(o.indexOf("-")>0&&a.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===a||o.indexOf(a)===0&&a.length>1))return o})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),Ct(t)&&(t=[t]),Array.isArray(t))return t;if(!r)return t.default||[];let n=t[r];return n||(n=t[this.getScriptPartFromCode(r)]),n||(n=t[this.formatLanguageCode(r)]),n||(n=t[this.getLanguagePartFromCode(r)]),n||(n=t.default),n||[]}toResolveHierarchy(t,r){const n=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],t),i=[],a=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return Ct(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):Ct(t)&&a(this.formatLanguageCode(t)),n.forEach(o=>{i.indexOf(o)<0&&a(this.formatLanguageCode(o))}),i}}const S4={zero:0,one:1,two:2,few:3,many:4,other:5},R4={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Sfe{constructor(t,r={}){this.languageUtils=t,this.options=r,this.logger=wo.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,r){this.rules[t]=r}clearCache(){this.pluralRulesCache={}}getRule(t,r={}){const n=ch(t==="dev"?"en":t),i=r.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:n,type:i});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let o;try{o=new Intl.PluralRules(n,{type:i})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),R4;if(!t.match(/-|_/))return R4;const u=this.languageUtils.getLanguagePartFromCode(t);o=this.getRule(u,r)}return this.pluralRulesCache[a]=o,o}needsPlural(t,r={}){let n=this.getRule(t,r);return n||(n=this.getRule("dev",r)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,r,n={}){return this.getSuffixes(t,n).map(i=>`${r}${i}`)}getSuffixes(t,r={}){let n=this.getRule(t,r);return n||(n=this.getRule("dev",r)),n?n.resolvedOptions().pluralCategories.sort((i,a)=>S4[i]-S4[a]).map(i=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,r,n={}){const i=this.getRule(t,n);return i?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(r)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",r,n))}}const O4=(e,t,r,n=".",i=!0)=>{let a=gfe(e,t,r);return!a&&i&&Ct(r)&&(a=hR(e,r,n),a===void 0&&(a=hR(t,r,n))),a},pR=e=>e.replace(/\$/g,"$$$$");class Rfe{constructor(t={}){this.logger=wo.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(r=>r),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:i,prefix:a,prefixEscaped:o,suffix:s,suffixEscaped:u,formatSeparator:l,unescapeSuffix:c,unescapePrefix:f,nestingPrefix:d,nestingPrefixEscaped:h,nestingSuffix:m,nestingSuffixEscaped:p,nestingOptionsSeparator:g,maxReplaces:y,alwaysFormat:b}=t.interpolation;this.escape=r!==void 0?r:yfe,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=a?$c(a):o||"{{",this.suffix=s?$c(s):u||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?$c(d):h||$c("$t("),this.nestingSuffix=m?$c(m):p||$c(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=y||1e3,this.alwaysFormat=b!==void 0?b:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(r,n)=>r?.source===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,r,n,i){let a,o,s;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=h=>{if(h.indexOf(this.formatSeparator)<0){const y=O4(r,u,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,n,{...i,...r,interpolationkey:h}):y}const m=h.split(this.formatSeparator),p=m.shift().trim(),g=m.join(this.formatSeparator).trim();return this.format(O4(r,u,p,this.options.keySeparator,this.options.ignoreJSONStructure),g,n,{...i,...r,interpolationkey:p})};this.resetRegExp();const c=i?.missingInterpolationHandler||this.options.missingInterpolationHandler,f=i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>pR(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?pR(this.escape(h)):pR(h)}].forEach(h=>{for(s=0;a=h.regex.exec(t);){const m=a[1].trim();if(o=l(m),o===void 0)if(typeof c=="function"){const g=c(t,a,i);o=Ct(g)?g:""}else if(i&&Object.prototype.hasOwnProperty.call(i,m))o="";else if(f){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${t}`),o="";else!Ct(o)&&!this.useRawValueToEscape&&(o=p4(o));const p=h.safeValue(o);if(t=t.replace(a[0],p),f?(h.regex.lastIndex+=o.length,h.regex.lastIndex-=a[0].length):h.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,r,n={}){let i,a,o;const s=(u,l)=>{const c=this.nestingOptionsSeparator;if(u.indexOf(c)<0)return u;const f=u.split(new RegExp(`${c}[ ]*{`));let d=`{${f[1]}`;u=f[0],d=this.interpolate(d,o);const h=d.match(/'/g),m=d.match(/"/g);((h?.length??0)%2===0&&!m||m.length%2!==0)&&(d=d.replace(/'/g,'"'));try{o=JSON.parse(d),l&&(o={...l,...o})}catch(p){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,p),`${u}${c}${d}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,u};for(;i=this.nestingRegexp.exec(t);){let u=[];o={...n},o=o.replace&&!Ct(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const l=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(l!==-1&&(u=i[1].slice(l).split(this.formatSeparator).map(c=>c.trim()).filter(Boolean),i[1]=i[1].slice(0,l)),a=r(s.call(this,i[1].trim(),o),o),a&&i[0]===t&&!Ct(a))return a;Ct(a)||(a=p4(a)),a||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),a=""),u.length&&(a=u.reduce((c,f)=>this.format(c,f,n.lng,{...n,interpolationkey:i[1].trim()}),a.trim())),t=t.replace(i[0],a),this.regexp.lastIndex=0}return t}}const Ofe=e=>{let t=e.toLowerCase().trim();const r={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);t==="currency"&&i.indexOf(":")<0?r.currency||(r.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?r.range||(r.range=i.trim()):i.split(";").forEach(o=>{if(o){const[s,...u]=o.split(":"),l=u.join(":").trim().replace(/^'+|'+$/g,""),c=s.trim();r[c]||(r[c]=l),l==="false"&&(r[c]=!1),l==="true"&&(r[c]=!0),isNaN(l)||(r[c]=parseInt(l,10))}})}return{formatName:t,formatOptions:r}},A4=e=>{const t={};return(r,n,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});const o=n+JSON.stringify(a);let s=t[o];return s||(s=e(ch(n),i),t[o]=s),s(r)}},Afe=e=>(t,r,n)=>e(ch(r),n)(t);class Tfe{constructor(t={}){this.logger=wo.create("formatter"),this.options=t,this.init(t)}init(t,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const n=r.cacheInBuiltFormats?A4:Afe;this.formats={number:n((i,a)=>{const o=new Intl.NumberFormat(i,{...a});return s=>o.format(s)}),currency:n((i,a)=>{const o=new Intl.NumberFormat(i,{...a,style:"currency"});return s=>o.format(s)}),datetime:n((i,a)=>{const o=new Intl.DateTimeFormat(i,{...a});return s=>o.format(s)}),relativetime:n((i,a)=>{const o=new Intl.RelativeTimeFormat(i,{...a});return s=>o.format(s,a.range||"day")}),list:n((i,a)=>{const o=new Intl.ListFormat(i,{...a});return s=>o.format(s)})}}add(t,r){this.formats[t.toLowerCase().trim()]=r}addCached(t,r){this.formats[t.toLowerCase().trim()]=A4(r)}format(t,r,n,i={}){const a=r.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(s=>s.indexOf(")")>-1)){const s=a.findIndex(u=>u.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,s)].join(this.formatSeparator)}return a.reduce((s,u)=>{const{formatName:l,formatOptions:c}=Ofe(u);if(this.formats[l]){let f=s;try{const d=i?.formatParams?.[i.interpolationkey]||{},h=d.locale||d.lng||i.locale||i.lng||n;f=this.formats[l](s,h,{...c,...i,...d})}catch(d){this.logger.warn(d)}return f}else this.logger.warn(`there was no format function for ${l}`);return s},t)}}const Cfe=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class Pfe extends rm{constructor(t,r,n,i={}){super(),this.backend=t,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=wo.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,i.backend,i)}queueLoad(t,r,n,i){const a={},o={},s={},u={};return t.forEach(l=>{let c=!0;r.forEach(f=>{const d=`${l}|${f}`;!n.reload&&this.store.hasResourceBundle(l,f)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?o[d]===void 0&&(o[d]=!0):(this.state[d]=1,c=!1,o[d]===void 0&&(o[d]=!0),a[d]===void 0&&(a[d]=!0),u[f]===void 0&&(u[f]=!0)))}),c||(s[l]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(u)}}loaded(t,r,n){const i=t.split("|"),a=i[0],o=i[1];r&&this.emit("failedLoading",a,o,r),!r&&n&&this.store.addResourceBundle(a,o,n,void 0,void 0,{skipCopy:!0}),this.state[t]=r?-1:2,r&&n&&(this.state[t]=0);const s={};this.queue.forEach(u=>{vfe(u.loaded,[a],o),Cfe(u,t),r&&u.errors.push(r),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(l=>{s[l]||(s[l]={});const c=u.loaded[l];c.length&&c.forEach(f=>{s[l][f]===void 0&&(s[l][f]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(u=>!u.done)}read(t,r,n,i=0,a=this.retryTimeout,o){if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:r,fcName:n,tried:i,wait:a,callback:o});return}this.readingCalls++;const s=(l,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(l&&c&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,r,n,i+1,a*2,o)},a);return}o(l,c)},u=this.backend[n].bind(this.backend);if(u.length===2){try{const l=u(t,r);l&&typeof l.then=="function"?l.then(c=>s(null,c)).catch(s):s(null,l)}catch(l){s(l)}return}return u(t,r,s)}prepareLoading(t,r,n={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Ct(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Ct(r)&&(r=[r]);const a=this.queueLoad(t,r,n,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(o=>{this.loadOne(o)})}load(t,r,n){this.prepareLoading(t,r,{},n)}reload(t,r,n){this.prepareLoading(t,r,{reload:!0},n)}loadOne(t,r=""){const n=t.split("|"),i=n[0],a=n[1];this.read(i,a,"read",void 0,void 0,(o,s)=>{o&&this.logger.warn(`${r}loading namespace ${a} for language ${i} failed`,o),!o&&s&&this.logger.log(`${r}loaded namespace ${a} for language ${i}`,s),this.loaded(t,o,s)})}saveMissing(t,r,n,i,a,o={},s=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend?.create){const u={...o,isUpdate:a},l=this.backend.create.bind(this.backend);if(l.length<6)try{let c;l.length===5?c=l(t,r,n,i,u):c=l(t,r,n,i),c&&typeof c.then=="function"?c.then(f=>s(null,f)).catch(s):s(null,c)}catch(c){s(c)}else l(t,r,n,i,s,u)}!t||!t[0]||this.store.addResource(t[0],r,n,i)}}}const T4=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Ct(e[1])&&(t.defaultValue=e[1]),Ct(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const r=e[3]||e[2];Object.keys(r).forEach(n=>{t[n]=r[n]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),C4=e=>(Ct(e.ns)&&(e.ns=[e.ns]),Ct(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Ct(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),im=()=>{},Nfe=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(r=>{typeof e[r]=="function"&&(e[r]=e[r].bind(e))})};class fh extends rm{constructor(t={},r){if(super(),this.options=C4(t),this.services={},this.logger=wo,this.modules={external:[]},Nfe(this),r&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,r),this;setTimeout(()=>{this.init(t,r)},0)}}init(t={},r){this.isInitializing=!0,typeof t=="function"&&(r=t,t={}),t.defaultNS==null&&t.ns&&(Ct(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const n=T4();this.options={...n,...this.options,...C4(t)},this.options.interpolation={...n.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const i=l=>l?typeof l=="function"?new l:l:null;if(!this.options.isClone){this.modules.logger?wo.init(i(this.modules.logger),this.options):wo.init(null,this.options);let l;this.modules.formatter?l=this.modules.formatter:l=Tfe;const c=new x4(this.options);this.store=new _4(this.options.resources,this.options);const f=this.services;f.logger=wo,f.resourceStore=this.store,f.languageUtils=c,f.pluralResolver=new Sfe(c,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.warn("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),l&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(f.formatter=i(l),f.formatter.init&&f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new Rfe(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Pfe(i(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(h,...m)=>{this.emit(h,...m)}),this.modules.languageDetector&&(f.languageDetector=i(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=i(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new nm(this.services,this.options),this.translator.on("*",(h,...m)=>{this.emit(h,...m)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,r||(r=im),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&l[0]!=="dev"&&(this.options.lng=l[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(l=>{this[l]=(...c)=>this.store[l](...c)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(l=>{this[l]=(...c)=>(this.store[l](...c),this)});const s=uh(),u=()=>{const l=(c,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(f),r(c,f)};if(this.languages&&!this.isInitialized)return l(null,this.t.bind(this));this.changeLanguage(this.options.lng,l)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),s}loadResources(t,r=im){let n=r;const i=Ct(t)?t:this.language;if(typeof t=="function"&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if(i?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const a=[],o=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(l=>{l!=="cimode"&&a.indexOf(l)<0&&a.push(l)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>o(u)),this.options.preload?.forEach?.(s=>o(s)),this.services.backendConnector.load(a,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(s)})}else n(null)}reloadResources(t,r,n){const i=uh();return typeof t=="function"&&(n=t,t=void 0),typeof r=="function"&&(n=r,r=void 0),t||(t=this.languages),r||(r=this.options.ns),n||(n=im),this.services.backendConnector.reload(t,r,a=>{i.resolve(),n(a)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&b4.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let r=0;r<this.languages.length;r++){const n=this.languages[r];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,r){this.isLanguageChangingTo=t;const n=uh();this.emit("languageChanging",t);const i=s=>{this.language=s,this.languages=this.services.languageUtils.toResolveHierarchy(s),this.resolvedLanguage=void 0,this.setResolvedLanguage(s)},a=(s,u)=>{u?this.isLanguageChangingTo===t&&(i(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,n.resolve((...l)=>this.t(...l)),r&&r(s,(...l)=>this.t(...l))},o=s=>{!t&&!s&&this.services.languageDetector&&(s=[]);const u=Ct(s)?s:s&&s[0],l=this.store.hasLanguageSomeTranslations(u)?u:this.services.languageUtils.getBestMatchFromCodes(Ct(s)?[s]:s);l&&(this.language||i(l),this.translator.language||this.translator.changeLanguage(l),this.services.languageDetector?.cacheUserLanguage?.(l)),this.loadResources(l,c=>{a(c,l)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(t),n}getFixedT(t,r,n){const i=(a,o,...s)=>{let u;typeof o!="object"?u=this.options.overloadTranslationOptionHandler([a,o].concat(s)):u={...o},u.lng=u.lng||i.lng,u.lngs=u.lngs||i.lngs,u.ns=u.ns||i.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||n||i.keyPrefix);const l=this.options.keySeparator||".";let c;return u.keyPrefix&&Array.isArray(a)?c=a.map(f=>`${u.keyPrefix}${l}${f}`):c=u.keyPrefix?`${u.keyPrefix}${l}${a}`:a,this.t(c,u)};return Ct(t)?i.lng=t:i.lngs=t,i.ns=r,i.keyPrefix=n,i}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,r={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(s,u)=>{const l=this.services.backendConnector.state[`${s}|${u}`];return l===-1||l===0||l===2};if(r.precheck){const s=r.precheck(this,o);if(s!==void 0)return s}return!!(this.hasResourceBundle(n,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,t)&&(!i||o(a,t)))}loadNamespaces(t,r){const n=uh();return this.options.ns?(Ct(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),r&&r(i)}),n):(r&&r(),Promise.resolve())}loadLanguages(t,r){const n=uh();Ct(t)&&(t=[t]);const i=this.options.preload||[],a=t.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return a.length?(this.options.preload=i.concat(a),this.loadResources(o=>{n.resolve(),r&&r(o)}),n):(r&&r(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const i=new Intl.Locale(t);if(i&&i.getTextInfo){const a=i.getTextInfo();if(a&&a.direction)return a.direction}}catch{}const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services?.languageUtils||new x4(T4());return t.toLowerCase().indexOf("-latn")>1?"ltr":r.indexOf(n.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},r){return new fh(t,r)}cloneInstance(t={},r=im){const n=t.forkResourceStore;n&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},a=new fh(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(s=>{a[s]=this[s]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n){const s=Object.keys(this.store.data).reduce((u,l)=>(u[l]={...this.store.data[l]},u[l]=Object.keys(u[l]).reduce((c,f)=>(c[f]={...u[l][f]},c),u[l]),u),{});a.store=new _4(s,i),a.services.resourceStore=a.store}return a.translator=new nm(a.services,i),a.translator.on("*",(s,...u)=>{a.emit(s,...u)}),a.init(i,r),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const hn=fh.createInstance();hn.createInstance=fh.createInstance,hn.createInstance,hn.dir,hn.init,hn.loadResources,hn.reloadResources,hn.use,hn.changeLanguage,hn.getFixedT;const P4=hn.t;hn.exists,hn.setDefaultNamespace,hn.hasLoadedNamespace,hn.loadNamespaces,hn.loadLanguages;function Dfe({callback:e,title:t,subtitle:r}){const{scannerActions:n}=r4({bufferName:"BadgeScanner",callback:e});return K.useEffect(()=>(n.activateScanner(),()=>{n.disableScanner()}),[n]),C.jsxs(Gd,{sx:{flexDirection:"column",justifyContent:"space-around",height:"100%"},children:[C.jsxs(Se.Box,{children:[C.jsx(Se.Typography,{variant:"h4",children:P4(t)}),C.jsx(Se.Typography,{variant:"h6",children:P4(r)})]}),C.jsx(kee,{sx:{fontSize:"10rem"}})]})}function N4({id:e,children:t,ratio:r=0,unit:n=1}){const i=100/r,a=Array.from({length:r}).reduce((o,s,u)=>{const l=u*i,c=u%2===0?1:0;return o[`${l}%`]={opacity:c},o},{});return C.jsx(Gv,{sx:{[`@keyframes blink-${e}`]:a,animation:`blink-${e} ${n}s infinite`,display:"inline-flex"},children:t})}function D4(){const{crumbs:e,slice:t}=i4(),{t:r}=Qt();return K.useEffect(()=>console.log("Crumbs:",e),[e]),C.jsxs(Ju,{children:[C.jsx(Se.Breadcrumbs,{"aria-label":"breadcrumb",sx:{padding:"8px"},children:e.map((n,i)=>C.jsx(Se.Link,{color:"inherit",underline:"hover",sx:{cursor:"pointer"},onClick:()=>{console.log("Clicked crumb:",n.text),console.log("index:",i),t(i)},children:r(n.text)},i))}),C.jsx(Se.Divider,{}),C.jsx(Pc,{gap:2,flexWrap:"wrap",alignContent:"center",overflow:"hidden",padding:0,children:e[e.length-1].component})]})}function Ife({root:e}){const[t,r]=K.useState([e]),n=a=>r(o=>[...o,a]),i=a=>r(o=>o.slice(0,a+1));return C.jsx(n4.Provider,{value:{crumbs:t,push:n,slice:i},children:C.jsx(D4,{})})}function I4({value:e}){const{t}=Qt(),[r,n]=K.useState(!1),i=()=>{e&&(n(!0),navigator.clipboard.writeText(e))};return K.useEffect(()=>{r&&setTimeout(()=>{n(!1)},1e3)},[r]),C.jsx(Se.Tooltip,{placement:"top",title:t(r?"COPIED":"COPY"),disableFocusListener:!0,disableTouchListener:!0,arrow:!0,children:C.jsx(Se.IconButton,{id:"copy-to-clipboard-icnBtn",onClick:i,color:r?"primary":"default",disabled:!e,size:"small",children:r?C.jsx(v1,{}):C.jsx(Mee,{})})})}function k4({id:e,anchor:t,onClose:r,children:n,width:i,centerPopover:a}){return C.jsx(Se.Popover,{id:e,open:!!t,anchorEl:t,onClose:r,anchorOrigin:{vertical:"bottom",horizontal:a?"center":"left"},transformOrigin:{vertical:"top",horizontal:a?"center":"left"},slotProps:{paper:{sx:{overflow:"hidden",minWidth:i,width:i}}},children:n})}function vR({Icon:e,label:t,menuContent:r,centerPopover:n}){const{t:i}=Qt(),[a,o]=K.useState(null),s=c=>{o(c.currentTarget)},u=()=>{o(null)},l=K.Children.map(r,c=>K.isValidElement(c)?K.cloneElement(c,{onClose:u}):c);return C.jsxs(C.Fragment,{children:[C.jsx(Se.Tooltip,{title:i("OPEN_MENU",{value:i(t)}),children:C.jsx(Se.Button,{id:`${t}-btn`,variant:"outlined",onClick:s,startIcon:C.jsx(e,{}),children:i(t)})}),C.jsx(k4,{centerPopover:n,id:`${t}-menu`,anchor:a,onClose:u,children:l})]})}function M4({styles:e={},languages:t,flags:r,isPopover:n}){const{i18n:i}=Qt(),[,a]=Ka("languageDialogPopover");K.useEffect(()=>{a(n??!1)},[n,a]);const[o,s]=dR(t),u=r[i.language];return u?C.jsx(Lee,{id:"flags-btn",role:"button","aria-label":"change language flag button",onClick:s.open,sx:e,children:C.jsx(u,{size:36})}):(console.warn(`No flag component found for language: ${i.language}`),null)}function am(){const[e,t]=Ka("sidebarIsOpenState",!1),r=K.useCallback(()=>{t(o=>!o)},[t]),n=K.useCallback(()=>{t(!1)},[t]),i=K.useCallback(()=>{t(!0)},[t]),a=K.useMemo(()=>({toggle:r,close:n,open:i}),[r,n,i]);return[e,a]}const L4="300px",j4="56px",gR=.5,F4=Qn(jee,{shouldForwardProp:e=>e!=="open"&&e!=="isMobile"&&e!=="isIdle"})(({theme:e,open:t,isMobile:r,isIdle:n})=>({flexShrink:0,boxSizing:"border-box",whiteSpace:"nowrap",height:"100% !important","& .MuiDrawer-paper":{opacity:r&&!t||n?0:1,position:"relative",width:n?0:r?t?"98vw":"0":t?L4:j4,transition:`all ${gR}s ease-in-out`,overflow:"hidden",backgroundColor:e.palette.background.paper}}));function kfe({children:e,Logo:t,theme:r,isIdle:n}){const{i18n:i}=Qt(),a=jc("(max-width: 600px)"),[o,s]=am(),[u,l]=K.Children.toArray(e),c=i.dir();return C.jsxs(F4,{id:"sidebar-drawer",dir:c,variant:"permanent",anchor:c==="rtl"?"right":"left",open:o,onClose:s.close,slotProps:{paper:{variant:"outlined"}},isMobile:a,"data-pw":"sidebar",isIdle:n,children:[t&&C.jsx(Kr,{pt:"1vw",pb:"1vw",alignItems:"center",justifyContent:"center",minHeight:"64px",marginTop:"1vh",children:C.jsx(Se.Collapse,{in:o,timeout:500,orientation:"horizontal",collapsedSize:"0px",children:C.jsx(t,{width:"200px",height:"64px",theme:r})})}),C.jsx(Se.Box,{sx:{flexGrow:1,overflowY:"scroll",overflowX:"hidden",scrollbarWidth:"none"},children:u}),C.jsx(Se.Divider,{}),l]})}var Vc=(e=>(e.DARK="dark",e.LIGHT="light",e))(Vc||{});function qc(){const[e,t]=Ka("themeModeState",localStorage.getItem("theme-mode")||Vc.DARK);K.useEffect(()=>{localStorage.setItem("theme-mode",e)},[e]);const r=K.useCallback(()=>{t(i=>i===Vc.DARK?Vc.LIGHT:Vc.DARK)},[t]),n=K.useMemo(()=>({toggle:r}),[r]);return[e,n]}function Mfe({onClick:e,isIdle:t}){const[r]=qc(),[n]=am(),[i,a]=K.useState(n);K.useEffect(()=>{t&&n&&(a(!1),e())},[t,n,e]),K.useEffect(()=>{a(n)},[n]);const o=()=>{a(!i),e()};return C.jsxs("div",{id:"menu-icon","aria-label":"menu-icon",style:{marginRight:"19px"},className:`${r} ${i?"open":"closed"}`,onClick:o,children:[C.jsx("span",{}),C.jsx("span",{}),C.jsx("span",{})]})}const Lfe=g1.styled(e=>C.jsx($ee,{disableRipple:!0,...e}))(({theme:e})=>({width:42,height:26,padding:0,"& .MuiSwitch-switchBase":{padding:2,margin:3,transitionDuration:"300ms","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{opacity:1,border:0},"& .MuiSwitch-thumb:before":{content:"''",position:"absolute",width:"100%",height:"100%",left:0,top:0,backgroundColor:"#fff",borderRadius:"50%",backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundImage:`url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" viewBox="0 0 24 24"><path fill="${encodeURIComponent("#111")}" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"/></svg>')`}},"&.Mui-disabled .MuiSwitch-thumb":{color:e.palette.grey[100]}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:16,height:16,"&::before":{content:"''",position:"absolute",width:"100%",height:"100%",left:0,top:0,backgroundColor:"#79747e",borderRadius:"50%",backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundImage:`url('data:image/svg+xml;utf8,<svg fill="${encodeURIComponent("#fff")}" width="16" height="16" viewBox="-6 -6 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7.314 5.9l3.535-3.536A1 1 0 1 0 9.435.95L5.899 4.485 2.364.95A1 1 0 1 0 .95 2.364l3.535 3.535L.95 9.435a1 1 0 1 0 1.414 1.414l3.535-3.535 3.536 3.535a1 1 0 1 0 1.414-1.414L7.314 5.899z" /></svg>')`}},"& .MuiSwitch-track":{border:"2px solid #79747e",borderRadius:26/2,backgroundColor:"#e6e0e9",opacity:1,transition:e.transitions.create(["background-color"],{duration:500})}}));function $4({label:e,value:t,onChange:r}){const{t:n}=Qt();return C.jsx(Fee,{labelPlacement:"start",control:C.jsx(Lfe,{sx:{ml:1.69},checked:t,onChange:r}),label:e&&n(e),slotProps:{typography:{noWrap:!0}}})}function jfe({translation:e,globalStateString:t,defaultValue:r}){const[n,i]=Ka(t,r),a=o=>{i(o.target.checked)};return C.jsx($4,{label:e,value:n,onChange:a})}var om=(e=>(e.Column="column",e.Row="row",e))(om||{});function mR({caption:e,value:t,captionColor:r="textSecondary",valueColor:n="textPrimary",reverse:i,direction:a=om.Column,width:o,height:s,gap:u="4px",flex:l,padding:c,textAlign:f,captionStyle:d,valueStyle:h,fallback:m="N/A",enableCopy:p,className:g}){const{t:y}=Qt();return C.jsxs(Kr,{className:g,flexDirection:i?`${a}-reverse`:a,alignItems:a===om.Row?"center":"stretch",width:o,gap:u,height:s,flex:l,padding:c,children:[C.jsx(Se.Typography,{variant:"body2",color:r,sx:{textAlign:f,userSelect:"none",...d},noWrap:!0,children:y(e)}),typeof t=="string"||typeof t=="number"||!t&&(typeof m=="string"||typeof m=="number")?C.jsxs(Kr,{alignItems:"center",gap:"8px",children:[C.jsx(Se.Typography,{variant:"body1",color:n,sx:{textAlign:f,userSelect:"none",...h},noWrap:!0,children:t||m}),p&&C.jsx(I4,{value:t?.toString()})]}):t||m]})}function Ffe({CustomAvatarIcon:e,title:t,displayValue:r,subtitle:n}){const{t:i}=Qt(),[a]=qc(),o=a==="light"?"#e0e0e0":"#303030";return C.jsxs(Se.Paper,{sx:{borderRadius:"10px",border:"1px solid "+o,padding:"8px",gap:"8px",alignItems:"center",minWidth:"230px",display:"flex"},children:[C.jsx(Se.Avatar,{sx:{backgroundColor:"#12322f",width:"80px",height:"80px"},children:e}),C.jsxs(bo,{textAlign:"left",margin:"auto",children:[C.jsx(Se.Typography,{variant:"caption",color:"grey",sx:{margin:0,lineHeight:1},children:i(t)}),C.jsx(Se.Typography,{variant:"body1",sx:{padding:"0!important",fontSize:"2rem",margin:1,ml:0,fontWeight:600,lineHeight:1.1},children:i(r)}),typeof n=="string"?C.jsx(Se.Typography,{sx:{margin:0,lineHeight:1.2,fontSize:".75rem"},variant:"body2",children:i(n||"")}):n]})]})}function V4(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=V4(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ht(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=V4(e))&&(n&&(n+=" "),n+=t);return n}var yR={},_R={},q4;function $fe(){return q4||(q4=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t}(_R)),_R}var bR={},B4;function U4(){return B4||(B4=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){switch(typeof r){case"number":case"symbol":return!1;case"string":return r.includes(".")||r.includes("[")||r.includes("]")}}e.isDeepKey=t}(bR)),bR}var ER={},z4;function W4(){return z4||(z4=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="string"||typeof r=="symbol"?r:Object.is(r?.valueOf?.(),-0)?"-0":String(r)}e.toKey=t}(ER)),ER}var wR={},H4;function xR(){return H4||(H4=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){const n=[],i=r.length;if(i===0)return n;let a=0,o="",s="",u=!1;for(r.charCodeAt(0)===46&&(n.push(""),a++);a<i;){const l=r[a];s?l==="\\"&&a+1<i?(a++,o+=r[a]):l===s?s="":o+=l:u?l==='"'||l==="'"?s=l:l==="]"?(u=!1,n.push(o),o=""):o+=l:l==="["?(u=!0,o&&(n.push(o),o="")):l==="."?o&&(n.push(o),o=""):o+=l,a++}return o&&n.push(o),n}e.toPath=t}(wR)),wR}var G4;function SR(){return G4||(G4=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$fe(),r=U4(),n=W4(),i=xR();function a(s,u,l){if(s==null)return l;switch(typeof u){case"string":{if(t.isUnsafeProperty(u))return l;const c=s[u];return c===void 0?r.isDeepKey(u)?a(s,i.toPath(u),l):l:c}case"number":case"symbol":{typeof u=="number"&&(u=n.toKey(u));const c=s[u];return c===void 0?l:c}default:{if(Array.isArray(u))return o(s,u,l);if(Object.is(u?.valueOf(),-0)?u="-0":u=String(u),t.isUnsafeProperty(u))return l;const c=s[u];return c===void 0?l:c}}}function o(s,u,l){if(u.length===0)return l;let c=s;for(let f=0;f<u.length;f++){if(c==null||t.isUnsafeProperty(u[f]))return l;c=c[u[f]]}return c===void 0?l:c}e.get=a}(yR)),yR}var RR,K4;function Vfe(){return K4||(K4=1,RR=SR().get),RR}var qfe=Vfe();const ou=Ua(qfe);var Bfe=SS(),Cn=e=>e===0?0:e>0?1:-1,Zn=e=>typeof e=="number"&&e!=+e,ol=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,Xe=e=>(typeof e=="number"||e instanceof Number)&&!Zn(e),Ni=e=>Xe(e)||typeof e=="string",Ufe=0,ns=e=>{var t=++Ufe;return"".concat(e||"").concat(t)},fi=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Xe(t)&&typeof t!="string")return n;var a;if(ol(t)){if(r==null)return n;var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return Zn(a)&&(a=n),i&&r!=null&&a>r&&(a=r),a},Y4=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[e[n]])r[e[n]]=!0;else return!0;return!1},Fn=(e,t)=>Xe(e)&&Xe(t)?r=>e+r*(t-e):()=>t;function Bc(e,t,r){return Xe(e)&&Xe(t)?e+r*(t-e):t}function Q4(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):ou(n,t))===r)}var zfe=e=>{if(!e||!e.length)return null;for(var t=e.length,r=0,n=0,i=0,a=0,o=1/0,s=-1/0,u=0,l=0,c=0;c<t;c++)u=e[c].cx||0,l=e[c].cy||0,r+=u,n+=l,i+=u*l,a+=u*u,o=Math.min(o,u),s=Math.max(s,u);var f=t*a!==r*r?(t*i-r*n)/(t*a-r*r):0;return{xmin:o,xmax:s,a:f,b:(n-f*r)/t}},rr=e=>e===null||typeof e>"u",dh=e=>rr(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1)),Wfe=["viewBox","children"],Hfe=["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"],X4=["points","pathLength"],OR={svg:Wfe,polygon:X4,polyline:X4},AR=["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"],TR=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(K.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{AR.includes(i)&&(n[i]=a=>r[i](r,a))}),n},Gfe=(e,t,r)=>n=>(e(t,r,n),null),Uc=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var a=e[i];AR.includes(i)&&typeof a=="function"&&(n||(n={}),n[i]=Gfe(a,t,r))}),n},Z4=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",J4=null,CR=null,e6=e=>{if(e===J4&&Array.isArray(CR))return CR;var t=[];return K.Children.forEach(e,r=>{rr(r)||(Bfe.isFragment(r)?t=t.concat(e6(r.props.children)):t.push(r))}),CR=t,J4=e,t};function zc(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(i=>Z4(i)):n=[Z4(t)],e6(e).forEach(i=>{var a=ou(i,"type.displayName")||ou(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}var sm=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,Kfe=(e,t,r,n)=>{var i,a=(i=n&&OR?.[n])!==null&&i!==void 0?i:[];return t.startsWith("data-")||typeof e!="function"&&(n&&a.includes(t)||Hfe.includes(t))||r&&AR.includes(t)},xt=(e,t,r)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(K.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var i={};return Object.keys(n).forEach(a=>{var o;Kfe((o=n)===null||o===void 0?void 0:o[a],a,t,r)&&(i[a]=n[a])}),i},Yfe=["children","width","height","viewBox","className","style","title","desc"];function PR(){return PR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},PR.apply(null,arguments)}function Qfe(e,t){if(e==null)return{};var r,n,i=Xfe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Xfe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var NR=K.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:a,className:o,style:s,title:u,desc:l}=e,c=Qfe(e,Yfe),f=a||{width:n,height:i,x:0,y:0},d=Ht("recharts-surface",o);return X.createElement("svg",PR({},xt(c,!0,"svg"),{className:d,width:n,height:i,style:s,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),X.createElement("title",null,u),X.createElement("desc",null,l),r)}),Zfe=["children","className"];function DR(){return DR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},DR.apply(null,arguments)}function Jfe(e,t){if(e==null)return{};var r,n,i=ede(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ede(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var hr=X.forwardRef((e,t)=>{var{children:r,className:n}=e,i=Jfe(e,Zfe),a=Ht("recharts-layer",n);return X.createElement("g",DR({className:a},xt(i,!0),{ref:t}),r)}),t6=K.createContext(null),tde=()=>K.useContext(t6);function Mt(e){return function(){return e}}const r6=Math.abs,Jn=Math.atan2,is=Math.cos,rde=Math.max,Wc=Math.min,Di=Math.sin,Fr=Math.sqrt,ei=1e-12,su=Math.PI,um=su/2,uu=2*su;function nde(e){return e>1?0:e<-1?su:Math.acos(e)}function n6(e){return e>=1?um:e<=-1?-um:Math.asin(e)}const IR=Math.PI,kR=2*IR,sl=1e-6,ide=kR-sl;function i6(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function ade(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return i6;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}let hh=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?i6:ade(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,o){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,u=n-t,l=i-r,c=o-t,f=s-r,d=c*c+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>sl)if(!(Math.abs(f*u-l*c)>sl)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-o,m=i-s,p=u*u+l*l,g=h*h+m*m,y=Math.sqrt(p),b=Math.sqrt(d),E=a*Math.tan((IR-Math.acos((p+d-g)/(2*y*b)))/2),w=E/b,x=E/y;Math.abs(w-1)>sl&&this._append`L${t+w*c},${r+w*f}`,this._append`A${a},${a},0,0,${+(f*h>c*m)},${this._x1=t+x*u},${this._y1=r+x*l}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),u=n*Math.sin(i),l=t+s,c=r+u,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${l},${c}`:(Math.abs(this._x1-l)>sl||Math.abs(this._y1-c)>sl)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%kR+kR),d>ide?this._append`A${n},${n},0,1,${f},${t-s},${r-u}A${n},${n},0,1,${f},${this._x1=l},${this._y1=c}`:d>sl&&this._append`A${n},${n},0,${+(d>=IR)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}};function MR(){return new hh}MR.prototype=hh.prototype;function ode(e=3){return new hh(+e)}function ph(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new hh(t)}function sde(e){return e.innerRadius}function ude(e){return e.outerRadius}function lde(e){return e.startAngle}function cde(e){return e.endAngle}function fde(e){return e&&e.padAngle}function dde(e,t,r,n,i,a,o,s){var u=r-e,l=n-t,c=o-i,f=s-a,d=f*u-c*l;if(!(d*d<ei))return d=(c*(t-a)-f*(e-i))/d,[e+d*u,t+d*l]}function lm(e,t,r,n,i,a,o){var s=e-r,u=t-n,l=(o?a:-a)/Fr(s*s+u*u),c=l*u,f=-l*s,d=e+c,h=t+f,m=r+c,p=n+f,g=(d+m)/2,y=(h+p)/2,b=m-d,E=p-h,w=b*b+E*E,x=i-a,R=d*p-m*h,S=(E<0?-1:1)*Fr(rde(0,x*x*w-R*R)),j=(R*E-b*S)/w,M=(-R*b-E*S)/w,k=(R*E+b*S)/w,F=(-R*b+E*S)/w,V=j-g,P=M-y,A=k-g,I=F-y;return V*V+P*P>A*A+I*I&&(j=k,M=F),{cx:j,cy:M,x01:-c,y01:-f,x11:j*(i/x-1),y11:M*(i/x-1)}}function hde(){var e=sde,t=ude,r=Mt(0),n=null,i=lde,a=cde,o=fde,s=null,u=ph(l);function l(){var c,f,d=+e.apply(this,arguments),h=+t.apply(this,arguments),m=i.apply(this,arguments)-um,p=a.apply(this,arguments)-um,g=r6(p-m),y=p>m;if(s||(s=c=u()),h<d&&(f=h,h=d,d=f),!(h>ei))s.moveTo(0,0);else if(g>uu-ei)s.moveTo(h*is(m),h*Di(m)),s.arc(0,0,h,m,p,!y),d>ei&&(s.moveTo(d*is(p),d*Di(p)),s.arc(0,0,d,p,m,y));else{var b=m,E=p,w=m,x=p,R=g,S=g,j=o.apply(this,arguments)/2,M=j>ei&&(n?+n.apply(this,arguments):Fr(d*d+h*h)),k=Wc(r6(h-d)/2,+r.apply(this,arguments)),F=k,V=k,P,A;if(M>ei){var I=n6(M/d*Di(j)),L=n6(M/h*Di(j));(R-=I*2)>ei?(I*=y?1:-1,w+=I,x-=I):(R=0,w=x=(m+p)/2),(S-=L*2)>ei?(L*=y?1:-1,b+=L,E-=L):(S=0,b=E=(m+p)/2)}var B=h*is(b),H=h*Di(b),U=d*is(x),T=d*Di(x);if(k>ei){var D=h*is(E),O=h*Di(E),$=d*is(w),q=d*Di(w),W;if(g<su)if(W=dde(B,H,$,q,D,O,U,T)){var z=B-W[0],Y=H-W[1],Q=D-W[0],Z=O-W[1],re=1/Di(nde((z*Q+Y*Z)/(Fr(z*z+Y*Y)*Fr(Q*Q+Z*Z)))/2),ie=Fr(W[0]*W[0]+W[1]*W[1]);F=Wc(k,(d-ie)/(re-1)),V=Wc(k,(h-ie)/(re+1))}else F=V=0}S>ei?V>ei?(P=lm($,q,B,H,h,V,y),A=lm(D,O,U,T,h,V,y),s.moveTo(P.cx+P.x01,P.cy+P.y01),V<k?s.arc(P.cx,P.cy,V,Jn(P.y01,P.x01),Jn(A.y01,A.x01),!y):(s.arc(P.cx,P.cy,V,Jn(P.y01,P.x01),Jn(P.y11,P.x11),!y),s.arc(0,0,h,Jn(P.cy+P.y11,P.cx+P.x11),Jn(A.cy+A.y11,A.cx+A.x11),!y),s.arc(A.cx,A.cy,V,Jn(A.y11,A.x11),Jn(A.y01,A.x01),!y))):(s.moveTo(B,H),s.arc(0,0,h,b,E,!y)):s.moveTo(B,H),!(d>ei)||!(R>ei)?s.lineTo(U,T):F>ei?(P=lm(U,T,D,O,d,-F,y),A=lm(B,H,$,q,d,-F,y),s.lineTo(P.cx+P.x01,P.cy+P.y01),F<k?s.arc(P.cx,P.cy,F,Jn(P.y01,P.x01),Jn(A.y01,A.x01),!y):(s.arc(P.cx,P.cy,F,Jn(P.y01,P.x01),Jn(P.y11,P.x11),!y),s.arc(0,0,d,Jn(P.cy+P.y11,P.cx+P.x11),Jn(A.cy+A.y11,A.cx+A.x11),y),s.arc(A.cx,A.cy,F,Jn(A.y11,A.x11),Jn(A.y01,A.x01),!y))):s.arc(0,0,d,x,w,y)}if(s.closePath(),c)return s=null,c+""||null}return l.centroid=function(){var c=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,f=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-su/2;return[is(f)*c,Di(f)*c]},l.innerRadius=function(c){return arguments.length?(e=typeof c=="function"?c:Mt(+c),l):e},l.outerRadius=function(c){return arguments.length?(t=typeof c=="function"?c:Mt(+c),l):t},l.cornerRadius=function(c){return arguments.length?(r=typeof c=="function"?c:Mt(+c),l):r},l.padRadius=function(c){return arguments.length?(n=c==null?null:typeof c=="function"?c:Mt(+c),l):n},l.startAngle=function(c){return arguments.length?(i=typeof c=="function"?c:Mt(+c),l):i},l.endAngle=function(c){return arguments.length?(a=typeof c=="function"?c:Mt(+c),l):a},l.padAngle=function(c){return arguments.length?(o=typeof c=="function"?c:Mt(+c),l):o},l.context=function(c){return arguments.length?(s=c??null,l):s},l}var pde=Array.prototype.slice;function cm(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function a6(e){this._context=e}a6.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 Hc(e){return new a6(e)}function LR(e){return e[0]}function jR(e){return e[1]}function fm(e,t){var r=Mt(!0),n=null,i=Hc,a=null,o=ph(s);e=typeof e=="function"?e:e===void 0?LR:Mt(e),t=typeof t=="function"?t:t===void 0?jR:Mt(t);function s(u){var l,c=(u=cm(u)).length,f,d=!1,h;for(n==null&&(a=i(h=o())),l=0;l<=c;++l)!(l<c&&r(f=u[l],l,u))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(f,l,u),+t(f,l,u));if(h)return a=null,h+""||null}return s.x=function(u){return arguments.length?(e=typeof u=="function"?u:Mt(+u),s):e},s.y=function(u){return arguments.length?(t=typeof u=="function"?u:Mt(+u),s):t},s.defined=function(u){return arguments.length?(r=typeof u=="function"?u:Mt(!!u),s):r},s.curve=function(u){return arguments.length?(i=u,n!=null&&(a=i(n)),s):i},s.context=function(u){return arguments.length?(u==null?n=a=null:a=i(n=u),s):n},s}function Gc(e,t,r){var n=null,i=Mt(!0),a=null,o=Hc,s=null,u=ph(l);e=typeof e=="function"?e:e===void 0?LR:Mt(+e),t=typeof t=="function"?t:Mt(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?jR:Mt(+r);function l(f){var d,h,m,p=(f=cm(f)).length,g,y=!1,b,E=new Array(p),w=new Array(p);for(a==null&&(s=o(b=u())),d=0;d<=p;++d){if(!(d<p&&i(g=f[d],d,f))===y)if(y=!y)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),m=d-1;m>=h;--m)s.point(E[m],w[m]);s.lineEnd(),s.areaEnd()}y&&(E[d]=+e(g,d,f),w[d]=+t(g,d,f),s.point(n?+n(g,d,f):E[d],r?+r(g,d,f):w[d]))}if(b)return s=null,b+""||null}function c(){return fm().defined(i).curve(o).context(a)}return l.x=function(f){return arguments.length?(e=typeof f=="function"?f:Mt(+f),n=null,l):e},l.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Mt(+f),l):e},l.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Mt(+f),l):n},l.y=function(f){return arguments.length?(t=typeof f=="function"?f:Mt(+f),r=null,l):t},l.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Mt(+f),l):t},l.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Mt(+f),l):r},l.lineX0=l.lineY0=function(){return c().x(e).y(t)},l.lineY1=function(){return c().x(e).y(r)},l.lineX1=function(){return c().x(n).y(t)},l.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Mt(!!f),l):i},l.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),l):o},l.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),l):a},l}function vde(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function gde(e){return e}function mde(){var e=gde,t=vde,r=null,n=Mt(0),i=Mt(uu),a=Mt(0);function o(s){var u,l=(s=cm(s)).length,c,f,d=0,h=new Array(l),m=new Array(l),p=+n.apply(this,arguments),g=Math.min(uu,Math.max(-uu,i.apply(this,arguments)-p)),y,b=Math.min(Math.abs(g)/l,a.apply(this,arguments)),E=b*(g<0?-1:1),w;for(u=0;u<l;++u)(w=m[h[u]=u]=+e(s[u],u,s))>0&&(d+=w);for(t!=null?h.sort(function(x,R){return t(m[x],m[R])}):r!=null&&h.sort(function(x,R){return r(s[x],s[R])}),u=0,f=d?(g-l*E)/d:0;u<l;++u,p=y)c=h[u],w=m[c],y=p+(w>0?w*f:0)+E,m[c]={data:s[c],index:u,value:w,startAngle:p,endAngle:y,padAngle:b};return m}return o.value=function(s){return arguments.length?(e=typeof s=="function"?s:Mt(+s),o):e},o.sortValues=function(s){return arguments.length?(t=s,r=null,o):t},o.sort=function(s){return arguments.length?(r=s,t=null,o):r},o.startAngle=function(s){return arguments.length?(n=typeof s=="function"?s:Mt(+s),o):n},o.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:Mt(+s),o):i},o.padAngle=function(s){return arguments.length?(a=typeof s=="function"?s:Mt(+s),o):a},o}var o6=FR(Hc);function s6(e){this._curve=e}s6.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function FR(e){function t(r){return new s6(e(r))}return t._curve=e,t}function vh(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(r){return arguments.length?t(FR(r)):t()._curve},e}function u6(){return vh(fm().curve(o6))}function l6(){var e=Gc().curve(o6),t=e.curve,r=e.lineX0,n=e.lineX1,i=e.lineY0,a=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return vh(r())},delete e.lineX0,e.lineEndAngle=function(){return vh(n())},delete e.lineX1,e.lineInnerRadius=function(){return vh(i())},delete e.lineY0,e.lineOuterRadius=function(){return vh(a())},delete e.lineY1,e.curve=function(o){return arguments.length?t(FR(o)):t()._curve},e}function gh(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}class c6{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}class yde{constructor(t){this._context=t}lineStart(){this._point=0}lineEnd(){}point(t,r){if(t=+t,r=+r,this._point===0)this._point=1;else{const n=gh(this._x0,this._y0),i=gh(this._x0,this._y0=(this._y0+r)/2),a=gh(t,this._y0),o=gh(t,r);this._context.moveTo(...n),this._context.bezierCurveTo(...i,...a,...o)}this._x0=t,this._y0=r}}function $R(e){return new c6(e,!0)}function VR(e){return new c6(e,!1)}function _de(e){return new yde(e)}function bde(e){return e.source}function Ede(e){return e.target}function dm(e){let t=bde,r=Ede,n=LR,i=jR,a=null,o=null,s=ph(u);function u(){let l;const c=pde.call(arguments),f=t.apply(this,c),d=r.apply(this,c);if(a==null&&(o=e(l=s())),o.lineStart(),c[0]=f,o.point(+n.apply(this,c),+i.apply(this,c)),c[0]=d,o.point(+n.apply(this,c),+i.apply(this,c)),o.lineEnd(),l)return o=null,l+""||null}return u.source=function(l){return arguments.length?(t=l,u):t},u.target=function(l){return arguments.length?(r=l,u):r},u.x=function(l){return arguments.length?(n=typeof l=="function"?l:Mt(+l),u):n},u.y=function(l){return arguments.length?(i=typeof l=="function"?l:Mt(+l),u):i},u.context=function(l){return arguments.length?(l==null?a=o=null:o=e(a=l),u):a},u}function wde(){return dm($R)}function xde(){return dm(VR)}function Sde(){const e=dm(_de);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}const Rde=Fr(3),f6={draw(e,t){const r=Fr(t+Wc(t/28,.75))*.59436,n=r/2,i=n*Rde;e.moveTo(0,r),e.lineTo(0,-r),e.moveTo(-i,-n),e.lineTo(i,n),e.moveTo(-i,n),e.lineTo(i,-n)}},Kc={draw(e,t){const r=Fr(t/su);e.moveTo(r,0),e.arc(0,0,r,0,uu)}},qR={draw(e,t){const r=Fr(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},d6=Fr(1/3),Ode=d6*2,BR={draw(e,t){const r=Fr(t/Ode),n=r*d6;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},h6={draw(e,t){const r=Fr(t)*.62625;e.moveTo(0,-r),e.lineTo(r,0),e.lineTo(0,r),e.lineTo(-r,0),e.closePath()}},p6={draw(e,t){const r=Fr(t-Wc(t/7,2))*.87559;e.moveTo(-r,0),e.lineTo(r,0),e.moveTo(0,r),e.lineTo(0,-r)}},UR={draw(e,t){const r=Fr(t),n=-r/2;e.rect(n,n,r,r)}},v6={draw(e,t){const r=Fr(t)*.4431;e.moveTo(r,r),e.lineTo(r,-r),e.lineTo(-r,-r),e.lineTo(-r,r),e.closePath()}},Ade=.8908130915292852,g6=Di(su/10)/Di(7*su/10),Tde=Di(uu/10)*g6,Cde=-is(uu/10)*g6,zR={draw(e,t){const r=Fr(t*Ade),n=Tde*r,i=Cde*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=uu*a/5,s=is(o),u=Di(o);e.lineTo(u*r,-s*r),e.lineTo(s*n-u*i,u*n+s*i)}e.closePath()}},WR=Fr(3),HR={draw(e,t){const r=-Fr(t/(WR*3));e.moveTo(0,r*2),e.lineTo(-WR*r,-r),e.lineTo(WR*r,-r),e.closePath()}},Pde=Fr(3),m6={draw(e,t){const r=Fr(t)*.6824,n=r/2,i=r*Pde/2;e.moveTo(0,-r),e.lineTo(i,n),e.lineTo(-i,n),e.closePath()}},ya=-.5,_a=Fr(3)/2,GR=1/Fr(12),Nde=(GR/2+1)*3,KR={draw(e,t){const r=Fr(t/Nde),n=r/2,i=r*GR,a=n,o=r*GR+r,s=-a,u=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,u),e.lineTo(ya*n-_a*i,_a*n+ya*i),e.lineTo(ya*a-_a*o,_a*a+ya*o),e.lineTo(ya*s-_a*u,_a*s+ya*u),e.lineTo(ya*n+_a*i,ya*i-_a*n),e.lineTo(ya*a+_a*o,ya*o-_a*a),e.lineTo(ya*s+_a*u,ya*u-_a*s),e.closePath()}},YR={draw(e,t){const r=Fr(t-Wc(t/6,1.7))*.6189;e.moveTo(-r,-r),e.lineTo(r,r),e.moveTo(-r,r),e.lineTo(r,-r)}},y6=[Kc,qR,BR,UR,zR,HR,KR],Dde=[Kc,p6,YR,m6,f6,v6,h6];function _6(e,t){let r=null,n=ph(i);e=typeof e=="function"?e:Mt(e||Kc),t=typeof t=="function"?t:Mt(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:Mt(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Mt(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function lu(){}function hm(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function pm(e){this._context=e}pm.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:hm(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:hm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function b6(e){return new pm(e)}function E6(e){this._context=e}E6.prototype={areaStart:lu,areaEnd:lu,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:hm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function w6(e){return new E6(e)}function x6(e){this._context=e}x6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:hm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function S6(e){return new x6(e)}function R6(e,t){this._basis=new pm(e),this._beta=t}R6.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var n=e[0],i=t[0],a=e[r]-n,o=t[r]-i,s=-1,u;++s<=r;)u=s/r,this._basis.point(this._beta*e[s]+(1-this._beta)*(n+u*a),this._beta*t[s]+(1-this._beta)*(i+u*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Ide=function e(t){function r(n){return t===1?new pm(n):new R6(n,t)}return r.beta=function(n){return e(+n)},r}(.85);function vm(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function QR(e,t){this._context=e,this._k=(1-t)/6}QR.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:vm(this,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,this._x1=e,this._y1=t;break;case 2:this._point=3;default:vm(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const kde=function e(t){function r(n){return new QR(n,t)}return r.tension=function(n){return e(+n)},r}(0);function XR(e,t){this._context=e,this._k=(1-t)/6}XR.prototype={areaStart:lu,areaEnd:lu,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:vm(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Mde=function e(t){function r(n){return new XR(n,t)}return r.tension=function(n){return e(+n)},r}(0);function ZR(e,t){this._context=e,this._k=(1-t)/6}ZR.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=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,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:vm(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Lde=function e(t){function r(n){return new ZR(n,t)}return r.tension=function(n){return e(+n)},r}(0);function JR(e,t,r){var n=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>ei){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);n=(n*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>ei){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/c,o=(o*l+e._y1*e._l23_2a-r*e._l12_2a)/c}e._context.bezierCurveTo(n,i,a,o,e._x2,e._y2)}function O6(e,t){this._context=e,this._alpha=t}O6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}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;default:JR(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const jde=function e(t){function r(n){return t?new O6(n,t):new QR(n,0)}return r.alpha=function(n){return e(+n)},r}(.5);function A6(e,t){this._context=e,this._alpha=t}A6.prototype={areaStart:lu,areaEnd:lu,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:JR(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Fde=function e(t){function r(n){return t?new A6(n,t):new XR(n,0)}return r.alpha=function(n){return e(+n)},r}(.5);function T6(e,t){this._context=e,this._alpha=t}T6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=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){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:JR(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const $de=function e(t){function r(n){return t?new T6(n,t):new ZR(n,0)}return r.alpha=function(n){return e(+n)},r}(.5);function C6(e){this._context=e}C6.prototype={areaStart:lu,areaEnd:lu,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 P6(e){return new C6(e)}function N6(e){return e<0?-1:1}function D6(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(N6(a)+N6(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function I6(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function eO(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-n)/3;e._context.bezierCurveTo(n+s,i+s*t,a-s,o-s*r,a,o)}function gm(e){this._context=e}gm.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:eO(this,this._t0,I6(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,eO(this,I6(this,r=D6(this,e,t)),r);break;default:eO(this,this._t0,r=D6(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function k6(e){this._context=new M6(e)}(k6.prototype=Object.create(gm.prototype)).point=function(e,t){gm.prototype.point.call(this,t,e)};function M6(e){this._context=e}M6.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function L6(e){return new gm(e)}function j6(e){return new k6(e)}function F6(e){this._context=e}F6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=$6(e),i=$6(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function $6(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function V6(e){return new F6(e)}function mm(e,t){this._context=e,this._t=t}mm.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 r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function q6(e){return new mm(e,.5)}function B6(e){return new mm(e,0)}function U6(e){return new mm(e,1)}function ul(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,s=a.length;r<o;++r)for(i=a,a=e[t[r]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function ll(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function Vde(e,t){return e[t]}function qde(e){const t=[];return t.key=e,t}function z6(){var e=Mt([]),t=ll,r=ul,n=Vde;function i(a){var o=Array.from(e.apply(this,arguments),qde),s,u=o.length,l=-1,c;for(const f of a)for(s=0,++l;s<u;++s)(o[s][l]=[0,+n(f,o[s].key,l,a)]).data=f;for(s=0,c=cm(t(o));s<u;++s)o[c[s]].index=s;return r(o,c),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:Mt(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:Mt(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?ll:typeof a=="function"?a:Mt(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??ul,i):r},i}function W6(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,o;i<a;++i){for(o=r=0;r<n;++r)o+=e[r][i][1]||0;if(o)for(r=0;r<n;++r)e[r][i][1]/=o}ul(e,t)}}function Bde(e,t){if((u=e.length)>0)for(var r,n=0,i,a,o,s,u,l=e[t[0]].length;n<l;++n)for(o=s=0,r=0;r<u;++r)(a=(i=e[t[r]][n])[1]-i[0])>0?(i[0]=o,i[1]=o+=a):a<0?(i[1]=s,i[0]=s+=a):(i[0]=0,i[1]=a)}function H6(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var o=0,s=0;o<i;++o)s+=e[o][r][1]||0;n[r][1]+=n[r][0]=-s/2}ul(e,t)}}function G6(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n<a;++n){for(var s=0,u=0,l=0;s<o;++s){for(var c=e[t[s]],f=c[n][1]||0,d=c[n-1][1]||0,h=(f-d)/2,m=0;m<s;++m){var p=e[t[m]],g=p[n][1]||0,y=p[n-1][1]||0;h+=g-y}u+=f,l+=h*f}i[n-1][1]+=i[n-1][0]=r,u&&(r-=l/u)}i[n-1][1]+=i[n-1][0]=r,ul(e,t)}}function K6(e){var t=e.map(Ude);return ll(e).sort(function(r,n){return t[r]-t[n]})}function Ude(e){for(var t=-1,r=0,n=e.length,i,a=-1/0;++t<n;)(i=+e[t][1])>a&&(a=i,r=t);return r}function Y6(e){var t=e.map(Q6);return ll(e).sort(function(r,n){return t[r]-t[n]})}function Q6(e){for(var t=0,r=-1,n=e.length,i;++r<n;)(i=+e[r][1])&&(t+=i);return t}function zde(e){return Y6(e).reverse()}function Wde(e){var t=e.length,r,n,i=e.map(Q6),a=K6(e),o=0,s=0,u=[],l=[];for(r=0;r<t;++r)n=a[r],o<s?(o+=i[n],u.push(n)):(s+=i[n],l.push(n));return l.reverse().concat(u)}function Hde(e){return ll(e).reverse()}var Gde=["type","size","sizeType"];function tO(){return tO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tO.apply(null,arguments)}function X6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Z6(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?X6(Object(r),!0).forEach(function(n){Kde(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X6(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Kde(e,t,r){return(t=Yde(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yde(e){var t=Qde(e,"string");return typeof t=="symbol"?t:t+""}function Qde(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xde(e,t){if(e==null)return{};var r,n,i=Zde(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Zde(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var J6={symbolCircle:Kc,symbolCross:qR,symbolDiamond:BR,symbolSquare:UR,symbolStar:zR,symbolTriangle:HR,symbolWye:KR},Jde=Math.PI/180,ehe=e=>{var t="symbol".concat(dh(e));return J6[t]||Kc},the=(e,t,r)=>{if(t==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var n=18*Jde;return 1.25*e*e*(Math.tan(n)-Math.tan(n*2)*Math.tan(n)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},rhe=(e,t)=>{J6["symbol".concat(dh(e))]=t},ym=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=Xde(e,Gde),a=Z6(Z6({},i),{},{type:t,size:r,sizeType:n}),o=()=>{var f=ehe(t),d=_6().type(f).size(the(r,n,t));return d()},{className:s,cx:u,cy:l}=a,c=xt(a,!0);return u===+u&&l===+l&&r===+r?X.createElement("path",tO({},c,{className:Ht("recharts-symbols",s),transform:"translate(".concat(u,", ").concat(l,")"),d:o()})):null};ym.registerSymbol=rhe;function rO(){return rO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rO.apply(null,arguments)}function eF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nhe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eF(Object(r),!0).forEach(function(n){nO(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nO(e,t,r){return(t=ihe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ihe(e){var t=ahe(e,"string");return typeof t=="symbol"?t:t+""}function ahe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ba=32;class iO extends K.PureComponent{renderIcon(t,r){var{inactiveColor:n}=this.props,i=ba/2,a=ba/6,o=ba/3,s=t.inactive?n:t.color,u=r??t.type;if(u==="none")return null;if(u==="plainline")return X.createElement("line",{strokeWidth:4,fill:"none",stroke:s,strokeDasharray:t.payload.strokeDasharray,x1:0,y1:i,x2:ba,y2:i,className:"recharts-legend-icon"});if(u==="line")return X.createElement("path",{strokeWidth:4,fill:"none",stroke:s,d:"M0,".concat(i,"h").concat(o,`
|
|
72
|
+
`;class jg{constructor(t,r){jt(this,"_store",void 0),jt(this,"_refCount",1),jt(this,"getLoadable",n=>(this.checkRefCount_INTERNAL(),Use(this._store,n))),jt(this,"getPromise",n=>(this.checkRefCount_INTERNAL(),this.getLoadable(n).toPromise())),jt(this,"getNodes_UNSTABLE",n=>{if(this.checkRefCount_INTERNAL(),n?.isModified===!0){if(n?.isInitialized===!1)return[];const o=this._store.getState().currentTree;return n5(o.dirtyAtoms)}const i=this._store.getState().knownAtoms,a=this._store.getState().knownSelectors;return n?.isInitialized==null?r5.values():n.isInitialized===!0?n5(e5([i,a])):qS(r5.values(),({key:o})=>!i.has(o)&&!a.has(o))}),jt(this,"getInfo_UNSTABLE",({key:n})=>(this.checkRefCount_INTERNAL(),Fse(this._store,this._store.getState().currentTree,n))),jt(this,"map",n=>{this.checkRefCount_INTERNAL();const i=new GS(this,HS);return n(i),i}),jt(this,"asyncMap",async n=>{this.checkRefCount_INTERNAL();const i=new GS(this,HS);return i.retain(),await n(i),i.autoRelease_INTERNAL(),i}),this._store={storeID:Vse(),parentStoreID:r,getState:()=>t,replaceState:n=>{t.currentTree=n(t.currentTree)},getGraph:n=>{const i=t.graphsByVersion;if(i.has(n))return zr(i.get(n));const a=$se();return i.set(n,a),a},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw Pt("Cannot subscribe to Snapshots")}};for(const n of this._store.getState().knownAtoms)jse(this._store,n,"get"),Lg(this._store,n,1);this.autoRelease_INTERNAL()}retain(){if(this._refCount<=0){if(process.env.NODE_ENV!=="production")throw Pt("Snapshot has already been released.");Xn("Attempt to retain() Snapshot that was already released.")}this._refCount++;let t=!1;return()=>{t||(t=!0,this._release())}}autoRelease_INTERNAL(){Kse||window.setTimeout(()=>this._release(),10)}_release(){if(this._refCount--,this._refCount===0){if(this._store.getState().nodeCleanupFunctions.forEach(t=>t()),this._store.getState().nodeCleanupFunctions.clear(),!Mr("recoil_memory_managament_2020"))return}else this._refCount<0&&process.env.NODE_ENV!=="production"&&Xn("Snapshot released an extra time.")}isRetained(){return this._refCount>0}checkRefCount_INTERNAL(){Mr("recoil_memory_managament_2020")&&this._refCount<=0&&process.env.NODE_ENV!=="production"&&Xn(Qse)}getStore_INTERNAL(){return this.checkRefCount_INTERNAL(),this._store}getID(){return this.checkRefCount_INTERNAL(),this._store.getState().currentTree.stateID}getStoreID(){return this.checkRefCount_INTERNAL(),this._store.storeID}}function a5(e,t,r=!1){const n=e.getState(),i=r?Hse():t.version;return{currentTree:{version:r?i:t.version,stateID:r?i:t.stateID,transactionMetadata:{...t.transactionMetadata},dirtyAtoms:new Set(t.dirtyAtoms),atomValues:t.atomValues.clone(),nonvalidatedAtoms:t.nonvalidatedAtoms.clone()},commitDepth:0,nextTree:null,previousTree:null,knownAtoms:new Set(n.knownAtoms),knownSelectors:new Set(n.knownSelectors),transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(i,e.getGraph(t.version)),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map(Ng(n.nodeCleanupFunctions.entries(),([a])=>[a,()=>{}]))}}function Xse(e){const t=new jg(Gse());return e!=null?t.map(e):t}const[o5,s5]=Yse((e,t)=>{var r;const n=e.getState(),i=t==="latest"?(r=n.nextTree)!==null&&r!==void 0?r:n.currentTree:zr(n.previousTree);return new jg(a5(e,i),e.storeID)},(e,t)=>{var r,n;return String(t)+String(e.storeID)+String((r=e.getState().nextTree)===null||r===void 0?void 0:r.version)+String(e.getState().currentTree.version)+String((n=e.getState().previousTree)===null||n===void 0?void 0:n.version)});Wse(s5);function Zse(e,t="latest"){const r=o5(e,t);return r.isRetained()?r:(s5(),o5(e,t))}class GS extends jg{constructor(t,r){super(a5(t.getStore_INTERNAL(),t.getStore_INTERNAL().getState().currentTree,!0),t.getStoreID()),jt(this,"_batch",void 0),jt(this,"set",(n,i)=>{this.checkRefCount_INTERNAL();const a=this.getStore_INTERNAL();this._batch(()=>{Lg(a,n.key,1),i5(this.getStore_INTERNAL(),n,i)})}),jt(this,"reset",n=>{this.checkRefCount_INTERNAL();const i=this.getStore_INTERNAL();this._batch(()=>{Lg(i,n.key,1),i5(this.getStore_INTERNAL(),n,qse)})}),jt(this,"setUnvalidatedAtomValues_DEPRECATED",n=>{this.checkRefCount_INTERNAL();const i=this.getStore_INTERNAL();HS(()=>{for(const[a,o]of n.entries())Lg(i,a,1),zse(i,new Bse(a),o)})}),this._batch=r}}var Fg={Snapshot:jg,MutableSnapshot:GS,freshSnapshot:Xse,cloneSnapshot:Zse},Jse=Fg.Snapshot,eue=Fg.MutableSnapshot,tue=Fg.freshSnapshot,rue=Fg.cloneSnapshot,$g=Object.freeze({__proto__:null,Snapshot:Jse,MutableSnapshot:eue,freshSnapshot:tue,cloneSnapshot:rue});function nue(...e){const t=new Set;for(const r of e)for(const n of r)t.add(n);return t}var iue=nue;const{useRef:aue}=K;function oue(e){const t=aue(e);return t.current===e&&typeof e=="function"&&(t.current=e()),t}var u5=oue;const{getNextTreeStateVersion:sue,makeEmptyStoreState:l5}=Mj,{cleanUpNode:uue,getDownstreamNodes:lue,initializeNode:cue,setNodeValue:fue,setUnvalidatedAtomValue_DEPRECATED:due}=nl,{graph:hue}=Xd,{cloneGraph:pue}=Xd,{getNextStoreID:c5}=Ig,{createMutableSource:KS,reactMode:f5}=IS,{applyAtomValueWrites:vue}=es,{releaseScheduledRetainablesNow:d5}=Ic,{freshSnapshot:gue}=$g,{useCallback:mue,useContext:h5,useEffect:YS,useMemo:yue,useRef:_ue,useState:bue}=K;function eh(){throw Pt("This component must be used inside a <RecoilRoot> component.")}const p5=Object.freeze({storeID:c5(),getState:eh,replaceState:eh,getGraph:eh,subscribeToTransactions:eh,addTransactionMetadata:eh});let QS=!1;function v5(e){if(QS)throw Pt("An atom update was triggered within the execution of a state updater function. State updater functions provided to Recoil must be pure functions.");const t=e.getState();if(t.nextTree===null){Mr("recoil_memory_managament_2020")&&Mr("recoil_release_on_cascading_update_killswitch_2021")&&t.commitDepth>0&&d5(e);const r=t.currentTree.version,n=sue();t.nextTree={...t.currentTree,version:n,stateID:n,dirtyAtoms:new Set,transactionMetadata:{}},t.graphsByVersion.set(n,pue(zr(t.graphsByVersion.get(r))))}}const g5=K.createContext({current:p5}),XS=()=>h5(g5),m5=K.createContext(null);function Eue(){const e=h5(m5);return e==null&&MS("Attempted to use a Recoil hook outside of a <RecoilRoot>. <RecoilRoot> must be an ancestor of any component that uses Recoil hooks."),e}function y5(e,t,r){const n=lue(e,r,r.dirtyAtoms);for(const i of n){const a=t.nodeToComponentSubscriptions.get(i);if(a)for(const[o,[s,u]]of a)u(r)}}function wue(e){const t=e.getState(),r=t.currentTree,n=r.dirtyAtoms;if(n.size){for(const[i,a]of t.nodeTransactionSubscriptions)if(n.has(i))for(const[o,s]of a)s(e);for(const[i,a]of t.transactionSubscriptions)a(e);(!f5().early||t.suspendedComponentResolvers.size>0)&&(y5(e,t,r),t.suspendedComponentResolvers.forEach(i=>i()),t.suspendedComponentResolvers.clear())}t.queuedComponentCallbacks_DEPRECATED.forEach(i=>i(r)),t.queuedComponentCallbacks_DEPRECATED.splice(0,t.queuedComponentCallbacks_DEPRECATED.length)}function xue(e){const t=e.getState();t.commitDepth++;try{const{nextTree:r}=t;if(r==null)return;t.previousTree=t.currentTree,t.currentTree=r,t.nextTree=null,wue(e),t.previousTree!=null?t.graphsByVersion.delete(t.previousTree.version):Xn("Ended batch with no previous state, which is unexpected","recoil"),t.previousTree=null,Mr("recoil_memory_managament_2020")&&r==null&&d5(e)}finally{t.commitDepth--}}function Sue({setNotifyBatcherOfChange:e}){const t=XS(),[,r]=bue([]);return e(()=>r({})),YS(()=>(e(()=>r({})),()=>{e(()=>{})}),[e]),YS(()=>{coe.enqueueExecution("Batcher",()=>{xue(t.current)})}),null}process.env.NODE_ENV!=="production"&&typeof window<"u"&&!window.$recoilDebugStates&&(window.$recoilDebugStates=[]);function Rue(e,t){const r=l5();return t({set:(n,i)=>{const a=r.currentTree,o=fue(e,a,n.key,i),s=new Set(o.keys()),u=a.nonvalidatedAtoms.clone();for(const l of s)u.delete(l);r.currentTree={...a,dirtyAtoms:iue(a.dirtyAtoms,s),atomValues:vue(a.atomValues,o),nonvalidatedAtoms:u}},setUnvalidatedAtomValues:n=>{n.forEach((i,a)=>{r.currentTree=due(r.currentTree,a,i)})}}),r}function Oue(e){const t=gue(e),r=t.getStore_INTERNAL().getState();return t.retain(),r.nodeCleanupFunctions.forEach(n=>n()),r.nodeCleanupFunctions.clear(),r}let _5=0;function Aue({initializeState_DEPRECATED:e,initializeState:t,store_INTERNAL:r,children:n}){let i;const a=h=>{const m=i.current.graphsByVersion;if(m.has(h))return zr(m.get(h));const p=hue();return m.set(h,p),p},o=(h,m)=>{if(m==null){const{transactionSubscriptions:p}=f.current.getState(),g=_5++;return p.set(g,h),{release:()=>{p.delete(g)}}}else{const{nodeTransactionSubscriptions:p}=f.current.getState();p.has(m)||p.set(m,new Map);const g=_5++;return zr(p.get(m)).set(g,h),{release:()=>{const y=p.get(m);y&&(y.delete(g),y.size===0&&p.delete(m))}}}},s=h=>{v5(f.current);for(const m of Object.keys(h))zr(f.current.getState().nextTree).transactionMetadata[m]=h[m]},u=h=>{v5(f.current);const m=zr(i.current.nextTree);let p;try{QS=!0,p=h(m)}finally{QS=!1}p!==m&&(process.env.NODE_ENV!=="production"&&typeof window<"u"&&window.$recoilDebugStates.push(p),i.current.nextTree=p,f5().early&&y5(f.current,i.current,p),zr(l.current)())},l=_ue(null),c=mue(h=>{l.current=h},[l]),f=u5(()=>r??{storeID:c5(),getState:()=>i.current,replaceState:u,getGraph:a,subscribeToTransactions:o,addTransactionMetadata:s});r!=null&&(f.current=r),i=u5(()=>e!=null?Rue(f.current,e):t!=null?Oue(t):l5());const d=yue(()=>KS?.(i,()=>i.current.currentTree.version),[i]);return YS(()=>{const h=f.current;for(const m of new Set(h.getState().knownAtoms))cue(h,m,"get");return()=>{for(const m of h.getState().knownAtoms)uue(h,m)}},[f]),K.createElement(g5.Provider,{value:f},K.createElement(m5.Provider,{value:d},K.createElement(Sue,{setNotifyBatcherOfChange:c}),n))}function Tue(e){const{override:t,...r}=e,n=XS();return t===!1&&n.current!==p5?e.children:K.createElement(Aue,r)}var Vg={RecoilRoot:Tue,useStoreRef:XS,useRecoilMutableSource:Eue};function Cue(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1;return!0}var Pue=Cue;const{useEffect:Nue,useRef:Due}=K;function Iue(e){const t=Due();return Nue(()=>{t.current=e}),t.current}var kue=Iue;const{useStoreRef:Mue}=Vg,{SUSPENSE_TIMEOUT_MS:Lue}=Ic,{updateRetainCount:th}=Ic,{RetentionZone:jue}=VS,{useEffect:Fue,useRef:$ue}=K,{isSSR:b5}=Mg;function Vue(e){if(Mr("recoil_memory_managament_2020"))return que(e)}function que(e){const r=(Array.isArray(e)?e:[e]).map(o=>o instanceof jue?o:o.key),n=Mue();Fue(()=>{if(!Mr("recoil_memory_managament_2020"))return;const o=n.current;if(i.current&&!b5)window.clearTimeout(i.current),i.current=null;else for(const s of r)th(o,s,1);return()=>{for(const s of r)th(o,s,-1)}},[n,...r]);const i=$ue(),a=kue(r);if(!b5&&(a===void 0||!Pue(a,r))){const o=n.current;for(const s of r)th(o,s,1);if(a)for(const s of a)th(o,s,-1);i.current&&window.clearTimeout(i.current),i.current=window.setTimeout(()=>{i.current=null;for(const s of r)th(o,s,-1)},Lue)}}var Bue=Vue;function Uue(){return"<component name not available>"}var qg=Uue;const{currentRendererSupportsUseSyncExternalStore:zue,reactMode:rh,useMutableSource:Wue,useSyncExternalStore:Hue}=IS,{useRecoilMutableSource:Gue,useStoreRef:kc}=Vg,{isRecoilValue:Kue}=rl,{getRecoilValueAsLoadable:Bg,setRecoilValue:Yue,subscribeToRecoilValue:Ug}=es,{useCallback:Ga,useEffect:zg,useMemo:Que,useRef:E5,useState:w5}=K,{isSSR:Xue}=Mg;function Zue(e,t,r){if(e.state==="hasValue")return e.contents;throw e.state==="loading"?new Promise(i=>{const a=r.current.getState().suspendedComponentResolvers;a.add(i),Xue&&Tr(e.contents)&&e.contents.finally(()=>{a.delete(i)})}):e.state==="hasError"?e.contents:Pt(`Invalid value of loadable atom "${t.key}"`)}function ZS(e,t){if(!Kue(e))throw Pt(`Invalid argument to ${t}: expected an atom or selector but got ${String(e)}`)}function Jue(e){const t=kc(),r=qg(),n=Ga(()=>{var s;process.env.NODE_ENV;const u=t.current,l=u.getState(),c=rh().early&&(s=l.nextTree)!==null&&s!==void 0?s:l.currentTree;return{loadable:Bg(u,e,c),key:e.key}},[t,e]),i=Ga(s=>{let u;return()=>{var l,c;const f=s();return(l=u)!==null&&l!==void 0&&l.loadable.is(f.loadable)&&((c=u)===null||c===void 0?void 0:c.key)===f.key?u:(u=f,f)}},[]),a=Que(()=>i(n),[n,i]),o=Ga(s=>{const u=t.current;return Ug(u,e,s,r).release},[t,e,r]);return Hue(o,a,a).loadable}function ele(e){const t=kc(),r=Ga(()=>{var l;const c=t.current,f=c.getState(),d=rh().early&&(l=f.nextTree)!==null&&l!==void 0?l:f.currentTree;return Bg(c,e,d)},[t,e]),n=Ga(()=>(process.env.NODE_ENV,r()),[r]),i=qg(),a=Ga((l,c)=>{const f=t.current;return Ug(f,e,()=>{if(!Mr("recoil_suppress_rerender_in_callback"))return c();const h=r();u.current.is(h)||c(),u.current=h},i).release},[t,e,i,r]),o=Gue();if(o==null)throw Pt("Recoil hooks must be used in components contained within a <RecoilRoot> component.");const s=Wue(o,n,a),u=E5(s);return zg(()=>{u.current=s}),s}function x5(e){const t=kc(),r=qg(),n=Ga(()=>{var u;process.env.NODE_ENV;const l=t.current,c=l.getState(),f=rh().early&&(u=c.nextTree)!==null&&u!==void 0?u:c.currentTree;return Bg(l,e,f)},[t,e]),i=Ga(()=>({loadable:n(),key:e.key}),[n,e.key]),a=Ga(u=>{const l=i();return u.loadable.is(l.loadable)&&u.key===l.key?u:l},[i]);zg(()=>{const u=Ug(t.current,e,l=>{s(a)},r);return s(a),u.release},[r,e,t,a]);const[o,s]=w5(i);return o.key!==e.key?i().loadable:o.loadable}function tle(e){const t=kc(),[,r]=w5([]),n=qg(),i=Ga(()=>{var s;process.env.NODE_ENV;const u=t.current,l=u.getState(),c=rh().early&&(s=l.nextTree)!==null&&s!==void 0?s:l.currentTree;return Bg(u,e,c)},[t,e]),a=i(),o=E5(a);return zg(()=>{o.current=a}),zg(()=>{const s=t.current,u=s.getState(),l=Ug(s,e,f=>{var d;if(!Mr("recoil_suppress_rerender_in_callback"))return r([]);const h=i();(d=o.current)!==null&&d!==void 0&&d.is(h)||r(h),o.current=h},n);if(u.nextTree)s.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{o.current=null,r([])});else{var c;if(!Mr("recoil_suppress_rerender_in_callback"))return r([]);const f=i();(c=o.current)!==null&&c!==void 0&&c.is(f)||r(f),o.current=f}return l.release},[n,i,e,t]),a}function rle(e){return process.env.NODE_ENV!=="production"&&ZS(e,"useRecoilValueLoadable"),Mr("recoil_memory_managament_2020")&&Bue(e),{TRANSITION_SUPPORT:x5,SYNC_EXTERNAL_STORE:zue()?Jue:x5,MUTABLE_SOURCE:ele,LEGACY:tle}[rh().mode](e)}function nle(e){process.env.NODE_ENV!=="production"&&ZS(e,"useRecoilValue");const t=kc(),r=rle(e);return Zue(r,e,t)}function ile(e){process.env.NODE_ENV!=="production"&&ZS(e,"useSetRecoilState");const t=kc();return Ga(r=>{Yue(t.current,e,r)},[t,e])}var ale={useRecoilValue:nle,useSetRecoilState:ile};const{batchUpdates:ole}=WS,{DEFAULT_VALUE:sle,getNode:ule}=Ha,{AbstractRecoilValue:lle,setRecoilValueLoadable:cle}=es,{cloneSnapshot:wGe}=$g,{useCallback:xGe,useEffect:SGe,useRef:RGe,useState:OGe}=K;function fle(e,t){var r;const n=e.getState(),i=(r=n.nextTree)!==null&&r!==void 0?r:n.currentTree,a=t.getStore_INTERNAL().getState().currentTree;ole(()=>{const o=new Set;for(const l of[i.atomValues.keys(),a.atomValues.keys()])for(const c of l){var s,u;((s=i.atomValues.get(c))===null||s===void 0?void 0:s.contents)!==((u=a.atomValues.get(c))===null||u===void 0?void 0:u.contents)&&ule(c).shouldRestoreFromSnapshots&&o.add(c)}o.forEach(l=>{cle(e,new lle(l),a.atomValues.has(l)?zr(a.atomValues.get(l)):sle)}),e.replaceState(l=>({...l,stateID:t.getID()}))})}var dle={gotoSnapshot:fle};const{useMemo:AGe}=K,{loadableWithValue:hle}=Yd,{initializeNode:ple}=nl,{DEFAULT_VALUE:vle,getNode:gle}=Ha,{copyTreeState:mle,getRecoilValueAsLoadable:yle,invalidateDownstreams:_le,writeLoadableToTreeState:ble}=es;function S5(e){return gle(e.key).nodeType==="atom"}class Ele{constructor(t,r){jt(this,"_store",void 0),jt(this,"_treeState",void 0),jt(this,"_changes",void 0),jt(this,"get",n=>{if(this._changes.has(n.key))return this._changes.get(n.key);if(!S5(n))throw Pt("Reading selectors within atomicUpdate is not supported");const i=yle(this._store,n,this._treeState);if(i.state==="hasValue")return i.contents;throw i.state==="hasError"?i.contents:Pt(`Expected Recoil atom ${n.key} to have a value, but it is in a loading state.`)}),jt(this,"set",(n,i)=>{if(!S5(n))throw Pt("Setting selectors within atomicUpdate is not supported");if(typeof i=="function"){const a=this.get(n);this._changes.set(n.key,i(a))}else ple(this._store,n.key,"set"),this._changes.set(n.key,i)}),jt(this,"reset",n=>{this.set(n,vle)}),this._store=t,this._treeState=r,this._changes=new Map}newTreeState_INTERNAL(){if(this._changes.size===0)return this._treeState;const t=mle(this._treeState);for(const[r,n]of this._changes)ble(t,r,hle(n));return _le(this._store,t),t}}function wle(e){return t=>{e.replaceState(r=>{const n=new Ele(e,r);return t(n),n.newTreeState_INTERNAL()})}}var xle={atomicUpdater:wle},Sle=xle.atomicUpdater,R5=Object.freeze({__proto__:null,atomicUpdater:Sle});function Rle(e,t){if(!e)throw new Error(t)}var Ole=Rle,Eo=Ole;const{atomicUpdater:Ale}=R5,{batchUpdates:Tle}=WS,{DEFAULT_VALUE:Cle}=Ha,{useStoreRef:Ple}=Vg,{refreshRecoilValue:Nle,setRecoilValue:O5}=es,{cloneSnapshot:Dle}=$g,{gotoSnapshot:Ile}=dle,{useCallback:kle}=K;class A5{}const Mle=new A5;function T5(e,t,r,n){let i=Mle,a;if(Tle(()=>{const s="useRecoilCallback() expects a function that returns a function: it accepts a function of the type (RecoilInterface) => (Args) => ReturnType and returns a callback function (Args) => ReturnType, where RecoilInterface is an object {snapshot, set, ...} and Args and ReturnType are the argument and return types of the callback you want to create. Please see the docs at recoiljs.org for details.";if(typeof t!="function")throw Pt(s);const u=Lj({...n??{},set:(c,f)=>O5(e,c,f),reset:c=>O5(e,c,Cle),refresh:c=>Nle(e,c),gotoSnapshot:c=>Ile(e,c),transact_UNSTABLE:c=>Ale(e)(c)},{snapshot:()=>{const c=Dle(e);return a=c.retain(),c}}),l=t(u);if(typeof l!="function")throw Pt(s);i=l(...r)}),i instanceof A5&&(process.env.NODE_ENV!=="production"?Eo(!1,"batchUpdates should return immediately"):Eo(!1)),Tr(i))i=i.finally(()=>{var s;(s=a)===null||s===void 0||s()});else{var o;(o=a)===null||o===void 0||o()}return i}function Lle(e,t){const r=Ple();return kle((...n)=>T5(r.current,e,n),t!=null?[...t,r]:void 0)}var C5={recoilCallback:T5,useRecoilCallback:Lle};const{useCallback:TGe}=K,{atomicUpdater:CGe}=R5,{useMemo:PGe}=K;class jle{constructor(t){jt(this,"value",void 0),this.value=t}}var Fle={WrappedValue:jle},$le=Fle.WrappedValue,P5=Object.freeze({__proto__:null,WrappedValue:$le});class N5 extends Error{}class Vle{constructor(t){var r,n,i;jt(this,"_name",void 0),jt(this,"_numLeafs",void 0),jt(this,"_root",void 0),jt(this,"_onHit",void 0),jt(this,"_onSet",void 0),jt(this,"_mapNodeValue",void 0),this._name=t?.name,this._numLeafs=0,this._root=null,this._onHit=(r=t?.onHit)!==null&&r!==void 0?r:()=>{},this._onSet=(n=t?.onSet)!==null&&n!==void 0?n:()=>{},this._mapNodeValue=(i=t?.mapNodeValue)!==null&&i!==void 0?i:a=>a}size(){return this._numLeafs}root(){return this._root}get(t,r){var n;return(n=this.getLeafNode(t,r))===null||n===void 0?void 0:n.value}getLeafNode(t,r){if(this._root==null)return;let n=this._root;for(;n;){if(r?.onNodeVisit(n),n.type==="leaf")return this._onHit(n),n;const i=this._mapNodeValue(t(n.nodeKey));n=n.branches.get(i)}}set(t,r,n){const i=()=>{var a,o,s,u;let l,c;for(const[g,y]of t){var f,d,h;const b=this._root;if(b?.type==="leaf")throw this.invalidCacheError();const E=l;if(l=E?E.branches.get(c):b,l=(f=l)!==null&&f!==void 0?f:{type:"branch",nodeKey:g,parent:E,branches:new Map,branchKey:c},l.type!=="branch"||l.nodeKey!==g)throw this.invalidCacheError();E?.branches.set(c,l),n==null||(d=n.onNodeVisit)===null||d===void 0||d.call(n,l),c=this._mapNodeValue(y),this._root=(h=this._root)!==null&&h!==void 0?h:l}const m=l?(a=l)===null||a===void 0?void 0:a.branches.get(c):this._root;if(m!=null&&(m.type!=="leaf"||m.branchKey!==c))throw this.invalidCacheError();const p={type:"leaf",value:r,parent:l,branchKey:c};(o=l)===null||o===void 0||o.branches.set(c,p),this._root=(s=this._root)!==null&&s!==void 0?s:p,this._numLeafs++,this._onSet(p),n==null||(u=n.onNodeVisit)===null||u===void 0||u.call(n,p)};try{i()}catch(a){if(a instanceof N5)this.clear(),i();else throw a}}delete(t){const r=this.root();if(!r)return!1;if(t===r)return this._root=null,this._numLeafs=0,!0;let n=t.parent,i=t.branchKey;for(;n;){var a;if(n.branches.delete(i),n===r)return n.branches.size===0?(this._root=null,this._numLeafs=0):this._numLeafs--,!0;if(n.branches.size>0)break;i=(a=n)===null||a===void 0?void 0:a.branchKey,n=n.parent}for(;n!==r;n=n.parent)if(n==null)return!1;return this._numLeafs--,!0}clear(){this._numLeafs=0,this._root=null}invalidCacheError(){throw Xn("Invalid cache values. This happens when selectors do not return consistent values for the same input dependency values. That may also be caused when using Fast Refresh to change a selector implementation. Resetting cache."+(this._name!=null?` - ${this._name}`:"")),new N5}}var qle={TreeCache:Vle},Ble=qle.TreeCache,D5=Object.freeze({__proto__:null,TreeCache:Ble});class Ule{constructor(t){var r;jt(this,"_maxSize",void 0),jt(this,"_size",void 0),jt(this,"_head",void 0),jt(this,"_tail",void 0),jt(this,"_map",void 0),jt(this,"_keyMapper",void 0),this._maxSize=t.maxSize,this._size=0,this._head=null,this._tail=null,this._map=new Map,this._keyMapper=(r=t.mapKey)!==null&&r!==void 0?r:n=>n}head(){return this._head}tail(){return this._tail}size(){return this._size}maxSize(){return this._maxSize}has(t){return this._map.has(this._keyMapper(t))}get(t){const r=this._keyMapper(t),n=this._map.get(r);if(n)return this.set(t,n.value),n.value}set(t,r){const n=this._keyMapper(t);this._map.get(n)&&this.delete(t);const a=this.head(),o={key:t,right:a,left:null,value:r};a?a.left=o:this._tail=o,this._map.set(n,o),this._head=o,this._size++,this._maybeDeleteLRU()}_maybeDeleteLRU(){this.size()>this.maxSize()&&this.deleteLru()}deleteLru(){const t=this.tail();t&&this.delete(t.key)}delete(t){const r=this._keyMapper(t);if(!this._size||!this._map.has(r))return;const n=zr(this._map.get(r)),i=n.right,a=n.left;i&&(i.left=n.left),a&&(a.right=n.right),n===this.head()&&(this._head=i),n===this.tail()&&(this._tail=a),this._map.delete(r),this._size--}clear(){this._size=0,this._head=null,this._tail=null,this._map=new Map}}var zle={LRUCache:Ule},Wle=zle.LRUCache,I5=Object.freeze({__proto__:null,LRUCache:Wle});const{LRUCache:Hle}=I5,{TreeCache:Gle}=D5;function Kle({name:e,maxSize:t,mapNodeValue:r=n=>n}){const n=new Hle({maxSize:t}),i=new Gle({name:e,mapNodeValue:r,onHit:a=>{n.set(a,!0)},onSet:a=>{const o=n.tail();n.set(a,!0),o&&i.size()>t&&i.delete(o.key)}});return i}var k5=Kle;const Yle=15;function ma(e,t,r){if(typeof e=="string"&&!e.includes('"')&&!e.includes("\\"))return`"${e}"`;switch(typeof e){case"undefined":return"";case"boolean":return e?"true":"false";case"number":case"symbol":return String(e);case"string":return JSON.stringify(e);case"function":if(t?.allowFunctions!==!0)throw Pt("Attempt to serialize function in a Recoil cache key");return`__FUNCTION(${e.name})__`}if(e===null)return"null";if(typeof e!="object"){var n;return(n=JSON.stringify(e))!==null&&n!==void 0?n:""}if(Tr(e))return"__PROMISE__";if(Array.isArray(e))return`[${e.map((i,a)=>ma(i,t,a.toString()))}]`;if(typeof e.toJSON=="function")return ma(e.toJSON(r),t,r);if(e instanceof Map){const i={};for(const[a,o]of e)i[typeof a=="string"?a:ma(a,t)]=o;return ma(i,t,r)}return e instanceof Set?ma(Array.from(e).sort((i,a)=>ma(i,t).localeCompare(ma(a,t))),t,r):Symbol!==void 0&&e[Symbol.iterator]!=null&&typeof e[Symbol.iterator]=="function"?ma(Array.from(e),t,r):`{${Object.keys(e).filter(i=>e[i]!==void 0).sort().map(i=>`${ma(i,t)}:${ma(e[i],t,i)}`).join(",")}}`}function Qle(e,t={allowFunctions:!1}){if(process.env.NODE_ENV!=="production"&&typeof window<"u"){const r=window.performance?window.performance.now():0,n=ma(e,t),i=window.performance?window.performance.now():0;return i-r>Yle&&(console.groupCollapsed(`Recoil: Spent ${i-r}ms computing a cache key`),console.warn(e,n),console.groupEnd()),n}return ma(e,t)}var JS=Qle;const{TreeCache:Xle}=D5,Wg={equality:"reference",eviction:"keep-all",maxSize:1/0};function Zle({equality:e=Wg.equality,eviction:t=Wg.eviction,maxSize:r=Wg.maxSize}=Wg,n){const i=Jle(e);return ece(t,r,i,n)}function Jle(e){switch(e){case"reference":return t=>t;case"value":return t=>JS(t)}throw Pt(`Unrecognized equality policy ${e}`)}function ece(e,t,r,n){switch(e){case"keep-all":return new Xle({name:n,mapNodeValue:r});case"lru":return k5({name:n,maxSize:zr(t),mapNodeValue:r});case"most-recent":return k5({name:n,maxSize:1,mapNodeValue:r})}throw Pt(`Unrecognized eviction policy ${e}`)}var tce=Zle;function rce(e){var t,r;if(typeof window>"u")return!1;const i=(r=(e!=null?(t=e.ownerDocument)!==null&&t!==void 0?t:e:document).defaultView)!==null&&r!==void 0?r:window;return e!=null&&(typeof i.Node=="function"?e instanceof i.Node:typeof e=="object"&&typeof e.nodeType=="number"&&typeof e.nodeName=="string")}var nce=rce;const{isReactNative:ice,isWindow:ace}=Mg;function oce(e){if(e===null||typeof e!="object")return!0;switch(typeof e.$$typeof){case"symbol":return!0;case"number":return!0}return!!(e["@@__IMMUTABLE_ITERABLE__@@"]!=null||e["@@__IMMUTABLE_KEYED__@@"]!=null||e["@@__IMMUTABLE_INDEXED__@@"]!=null||e["@@__IMMUTABLE_ORDERED__@@"]!=null||e["@@__IMMUTABLE_RECORD__@@"]!=null||nce(e)||Tr(e)||e instanceof Error||ArrayBuffer.isView(e)||!ice&&ace(e))}function M5(e){if(!(typeof e!="object"||oce(e))){Object.freeze(e);for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const r=e[t];typeof r=="object"&&r!=null&&!Object.isFrozen(r)&&M5(r)}Object.seal(e)}}var eR=M5;const{isLoadable:sce,loadableWithError:Hg,loadableWithPromise:uce,loadableWithValue:tR}=Yd,{WrappedValue:L5}=P5,{getNodeLoadable:Gg,peekNodeLoadable:lce,setNodeValue:cce}=nl,{saveDepsToStore:fce}=Xd,{DEFAULT_VALUE:dce,getConfigDeletionHandler:hce,getNode:pce,registerNode:j5}=Ha,{isRecoilValue:vce}=rl,{markRecoilValueModified:F5}=es,{retainedByOptionWithDefault:gce}=Ic,{recoilCallback:mce}=C5;class $5{}const nh=new $5,ih=[],Kg=new Map,yce=(()=>{let e=0;return()=>e++})();function V5(e){let t=null;const{key:r,get:n,cachePolicy_UNSTABLE:i}=e,a=e.set!=null?e.set:void 0;if(process.env.NODE_ENV!=="production"){if(typeof r!="string")throw Pt("A key option with a unique string value must be provided when creating a selector.");if(typeof n!="function")throw Pt("Selectors must specify a get callback option to get the selector value.")}const o=new Set,s=tce(i??{equality:"reference",eviction:"keep-all"},r),u=gce(e.retainedBy_UNSTABLE),l=new Map;let c=0;function f(){return!Mr("recoil_memory_managament_2020")||c>0}function d(O){return O.getState().knownSelectors.add(r),c++,()=>{c--}}function h(){return hce(r)!==void 0&&!f()}function m(O,$,q,W,z){L($,W,z),p(O,q)}function p(O,$){A(O,$)&&P(O),y($,!0)}function g(O,$){A(O,$)&&(zr(k(O)).stateVersions.clear(),y($,!1))}function y(O,$){const q=Kg.get(O);if(q!=null){for(const W of q)F5(W,zr(t));$&&Kg.delete(O)}}function b(O,$){let q=Kg.get($);q==null&&Kg.set($,q=new Set),q.add(O)}function E(O,$,q,W,z,Y){return $.then(Q=>{if(!f())throw P(O),nh;const Z=tR(Q);return m(O,q,z,Z,W),Q}).catch(Q=>{if(!f())throw P(O),nh;if(Tr(Q))return w(O,Q,q,W,z,Y);const Z=Hg(Q);throw m(O,q,z,Z,W),Q})}function w(O,$,q,W,z,Y){return $.then(Q=>{if(!f())throw P(O),nh;Y.loadingDepKey!=null&&Y.loadingDepPromise===$?q.atomValues.set(Y.loadingDepKey,tR(Q)):O.getState().knownSelectors.forEach(ee=>{q.atomValues.delete(ee)});const Z=S(O,q);if(Z&&Z.state!=="loading"){if((A(O,z)||k(O)==null)&&p(O,z),Z.state==="hasValue")return Z.contents;throw Z.contents}if(!A(O,z)){const ee=M(O,q);if(ee!=null)return ee.loadingLoadable.contents}const[re,ie]=R(O,q,z);if(re.state!=="loading"&&m(O,q,z,re,ie),re.state==="hasError")throw re.contents;return re.contents}).catch(Q=>{if(Q instanceof $5)throw nh;if(!f())throw P(O),nh;const Z=Hg(Q);throw m(O,q,z,Z,W),Q})}function x(O,$,q,W){var z,Y,Q,Z;if(A(O,W)||$.version===((z=O.getState())===null||z===void 0||(Y=z.currentTree)===null||Y===void 0?void 0:Y.version)||$.version===((Q=O.getState())===null||Q===void 0||(Z=Q.nextTree)===null||Z===void 0?void 0:Z.version)){var re,ie,ee;fce(r,q,O,(re=(ie=O.getState())===null||ie===void 0||(ee=ie.nextTree)===null||ee===void 0?void 0:ee.version)!==null&&re!==void 0?re:O.getState().currentTree.version)}for(const fe of q)o.add(fe)}function R(O,$,q){let W=!0,z=!0;const Y=()=>{z=!1};let Q,Z=!1,re;const ie={loadingDepKey:null,loadingDepPromise:null},ee=new Map;function fe({key:se}){const ce=Gg(O,$,se);switch(ee.set(se,ce),W||(x(O,$,new Set(ee.keys()),q),g(O,q)),ce.state){case"hasValue":return ce.contents;case"hasError":throw ce.contents;case"loading":throw ie.loadingDepKey=se,ie.loadingDepPromise=ce.contents,ce.contents}throw Pt("Invalid Loadable state")}const ue=se=>(...ce)=>{if(z)throw Pt("Callbacks from getCallback() should only be called asynchronously after the selector is evalutated. It can be used for selectors to return objects with callbacks that can work with Recoil state without a subscription.");return t==null&&(process.env.NODE_ENV!=="production"?Eo(!1,"Recoil Value can never be null"):Eo(!1)),mce(O,se,ce,{node:t})};try{Q=n({get:fe,getCallback:ue}),Q=vce(Q)?fe(Q):Q,sce(Q)&&(Q.state==="hasError"&&(Z=!0),Q=Q.contents),Tr(Q)?Q=E(O,Q,$,ee,q,ie).finally(Y):Y(),Q=Q instanceof L5?Q.value:Q}catch(se){Q=se,Tr(Q)?Q=w(O,Q,$,ee,q,ie).finally(Y):(Z=!0,Y())}return Z?re=Hg(Q):Tr(Q)?re=uce(Q):re=tR(Q),W=!1,V(O,q,ee),x(O,$,new Set(ee.keys()),q),[re,ee]}function S(O,$){let q=$.atomValues.get(r);if(q!=null)return q;const W=new Set;try{q=s.get(Y=>(typeof Y!="string"&&(process.env.NODE_ENV!=="production"?Eo(!1,"Cache nodeKey is type string"):Eo(!1)),Gg(O,$,Y).contents),{onNodeVisit:Y=>{Y.type==="branch"&&Y.nodeKey!==r&&W.add(Y.nodeKey)}})}catch(Y){throw Pt(`Problem with cache lookup for selector "${r}": ${Y.message}`)}if(q){var z;$.atomValues.set(r,q),x(O,$,W,(z=k(O))===null||z===void 0?void 0:z.executionID)}return q}function j(O,$){const q=S(O,$);if(q!=null)return P(O),q;const W=M(O,$);if(W!=null){var z;return((z=W.loadingLoadable)===null||z===void 0?void 0:z.state)==="loading"&&b(O,W.executionID),W.loadingLoadable}const Y=yce(),[Q,Z]=R(O,$,Y);return Q.state==="loading"?(F(O,Y,Q,Z,$),b(O,Y)):(P(O),L($,Q,Z)),Q}function M(O,$){const q=e5([l.has(O)?[zr(l.get(O))]:[],Ng(qS(l,([z])=>z!==O),([,z])=>z)]);function W(z){for(const[Y,Q]of z)if(!Gg(O,$,Y).is(Q))return!0;return!1}for(const z of q){if(z.stateVersions.get($.version)||!W(z.depValuesDiscoveredSoFarDuringAsyncWork))return z.stateVersions.set($.version,!0),z;z.stateVersions.set($.version,!1)}}function k(O){return l.get(O)}function F(O,$,q,W,z){l.set(O,{depValuesDiscoveredSoFarDuringAsyncWork:W,executionID:$,loadingLoadable:q,stateVersions:new Map([[z.version,!0]])})}function V(O,$,q){if(A(O,$)){const W=k(O);W!=null&&(W.depValuesDiscoveredSoFarDuringAsyncWork=q)}}function P(O){l.delete(O)}function A(O,$){var q;return $===((q=k(O))===null||q===void 0?void 0:q.executionID)}function I(O){return Array.from(O.entries()).map(([$,q])=>[$,q.contents])}function L(O,$,q){process.env.NODE_ENV!=="production"&&$.state!=="loading"&&!e.dangerouslyAllowMutability&&eR($.contents),O.atomValues.set(r,$);try{s.set(I(q),$)}catch(W){throw Pt(`Problem with setting cache for selector "${r}": ${W.message}`)}}function B(O){if(ih.includes(r)){const $=`Recoil selector has circular dependencies: ${ih.slice(ih.indexOf(r)).join(" → ")}`;return Hg(Pt($))}ih.push(r);try{return O()}finally{ih.pop()}}function H(O,$){const q=$.atomValues.get(r);return q??s.get(W=>{var z;return typeof W!="string"&&(process.env.NODE_ENV!=="production"?Eo(!1,"Cache nodeKey is type string"):Eo(!1)),(z=lce(O,$,W))===null||z===void 0?void 0:z.contents})}function U(O,$){return B(()=>j(O,$))}function T(O){O.atomValues.delete(r)}function D(O,$){t==null&&(process.env.NODE_ENV!=="production"?Eo(!1,"Recoil Value can never be null"):Eo(!1));for(const W of o){var q;const z=pce(W);(q=z.clearCache)===null||q===void 0||q.call(z,O,$)}o.clear(),T($),s.clear(),F5(O,t)}return a!=null?t=j5({key:r,nodeType:"selector",peek:H,get:U,set:($,q,W)=>{let z=!1;const Y=new Map;function Q({key:ee}){if(z)throw Pt("Recoil: Async selector sets are not currently supported.");const fe=Gg($,q,ee);if(fe.state==="hasValue")return fe.contents;if(fe.state==="loading"){const ue=`Getting value of asynchronous atom or selector "${ee}" in a pending state while setting selector "${r}" is not yet supported.`;throw Xn(ue),Pt(ue)}else throw fe.contents}function Z(ee,fe){if(z){const ce="Recoil: Async selector sets are not currently supported.";throw Xn(ce),Pt(ce)}const ue=typeof fe=="function"?fe(Q(ee)):fe;cce($,q,ee.key,ue).forEach((ce,ae)=>Y.set(ae,ce))}function re(ee){Z(ee,dce)}const ie=a({set:Z,get:Q,reset:re},W);if(ie!==void 0)throw Tr(ie)?Pt("Recoil: Async selector sets are not currently supported."):Pt("Recoil: selector set should be a void function.");return z=!0,Y},init:d,invalidate:T,clearCache:D,shouldDeleteConfigOnRelease:h,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:u}):t=j5({key:r,nodeType:"selector",peek:H,get:U,init:d,invalidate:T,clearCache:D,shouldDeleteConfigOnRelease:h,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:u})}V5.value=e=>new L5(e);var ah=V5;const{isLoadable:_ce,loadableWithError:rR,loadableWithPromise:nR,loadableWithValue:Mc}=Yd,{WrappedValue:q5}=P5,{peekNodeInfo:bce}=nl,{DEFAULT_VALUE:il,DefaultValue:au,getConfigDeletionHandler:B5,registerNode:Ece,setConfigDeletionHandler:wce}=Ha,{isRecoilValue:xce}=rl,{getRecoilValueAsLoadable:Sce,markRecoilValueModified:Rce,setRecoilValue:U5,setRecoilValueLoadable:Oce}=es,{retainedByOptionWithDefault:Ace}=Ic,oh=e=>e instanceof q5?e.value:e;function Tce(e){const{key:t,persistence_UNSTABLE:r}=e,n=Ace(e.retainedBy_UNSTABLE);let i=0;function a(b){return nR(b.then(E=>(o=Mc(E),E)).catch(E=>{throw o=rR(E),E}))}let o=Tr(e.default)?a(e.default):_ce(e.default)?e.default.state==="loading"?a(e.default.contents):e.default:Mc(oh(e.default));l(o.contents);let s;const u=new Map;function l(b){return process.env.NODE_ENV!=="production"&&e.dangerouslyAllowMutability!==!0?Tr(b)?b.then(E=>(eR(E),E)):(eR(b),b):b}function c(b,E){const w=E.then(x=>{var R,S;return((S=((R=b.getState().nextTree)!==null&&R!==void 0?R:b.getState().currentTree).atomValues.get(t))===null||S===void 0?void 0:S.contents)===w&&U5(b,y,x),x}).catch(x=>{var R,S;throw((S=((R=b.getState().nextTree)!==null&&R!==void 0?R:b.getState().currentTree).atomValues.get(t))===null||S===void 0?void 0:S.contents)===w&&Oce(b,y,rR(x)),x});return w}function f(b,E,w){var x;i++;const R=()=>{var k;i--,(k=u.get(b))===null||k===void 0||k.forEach(F=>F()),u.delete(b)};if(b.getState().knownAtoms.add(t),o.state==="loading"){const k=()=>{var F;((F=b.getState().nextTree)!==null&&F!==void 0?F:b.getState().currentTree).atomValues.has(t)||Rce(b,y)};o.contents.finally(k)}const S=(x=e.effects)!==null&&x!==void 0?x:e.effects_UNSTABLE;if(S!=null){let A=function(T){if(F&&T.key===t){const D=k;return D instanceof au?d(b,E):Tr(D)?nR(D.then(O=>O instanceof au?o.toPromise():O)):Mc(D)}return Sce(b,T)},I=function(T){return A(T).toPromise()},L=function(T){var D;const O=bce(b,(D=b.getState().nextTree)!==null&&D!==void 0?D:b.getState().currentTree,T.key);return F&&T.key===t&&!(k instanceof au)?{...O,isSet:!0,loadable:A(T)}:O},k=il,F=!0,V=!1,P=null;const B=T=>D=>{if(F){const O=A(y),$=O.state==="hasValue"?O.contents:il;k=typeof D=="function"?D($):D,Tr(k)&&(k=k.then(q=>(P={effect:T,value:q},q)))}else{if(Tr(D))throw Pt("Setting atoms to async values is not implemented.");typeof D!="function"&&(P={effect:T,value:oh(D)}),U5(b,y,typeof D=="function"?O=>{const $=oh(D(O));return P={effect:T,value:$},$}:oh(D))}},H=T=>()=>B(T)(il),U=T=>D=>{var O;const{release:$}=b.subscribeToTransactions(q=>{var W;let{currentTree:z,previousTree:Y}=q.getState();Y||(Xn("Transaction subscribers notified without a next tree being present -- this is a bug in Recoil"),Y=z);const Q=(W=z.atomValues.get(t))!==null&&W!==void 0?W:o;if(Q.state==="hasValue"){var Z,re,ie,ee;const fe=Q.contents,ue=(Z=Y.atomValues.get(t))!==null&&Z!==void 0?Z:o,se=ue.state==="hasValue"?ue.contents:il;((re=P)===null||re===void 0?void 0:re.effect)!==T||((ie=P)===null||ie===void 0?void 0:ie.value)!==fe?D(fe,se,!z.atomValues.has(t)):((ee=P)===null||ee===void 0?void 0:ee.effect)===T&&(P=null)}},t);u.set(b,[...(O=u.get(b))!==null&&O!==void 0?O:[],$])};for(const T of S)try{const D=T({node:y,storeID:b.storeID,parentStoreID_UNSTABLE:b.parentStoreID,trigger:w,setSelf:B(T),resetSelf:H(T),onSet:U(T),getPromise:I,getLoadable:A,getInfo_UNSTABLE:L});if(D!=null){var j;u.set(b,[...(j=u.get(b))!==null&&j!==void 0?j:[],D])}}catch(D){k=D,V=!0}if(F=!1,!(k instanceof au)){var M;const T=V?rR(k):Tr(k)?nR(c(b,k)):Mc(oh(k));l(T.contents),E.atomValues.set(t,T),(M=b.getState().nextTree)===null||M===void 0||M.atomValues.set(t,T)}}return R}function d(b,E){var w,x;return(w=(x=E.atomValues.get(t))!==null&&x!==void 0?x:s)!==null&&w!==void 0?w:o}function h(b,E){if(E.atomValues.has(t))return zr(E.atomValues.get(t));if(E.nonvalidatedAtoms.has(t)){if(s!=null)return s;if(r==null)return MS(`Tried to restore a persisted value for atom ${t} but it has no persistence settings.`),o;const w=E.nonvalidatedAtoms.get(t),x=r.validator(w,il);return s=x instanceof au?o:Mc(x),s}else return o}function m(){s=void 0}function p(b,E,w){if(E.atomValues.has(t)){const x=zr(E.atomValues.get(t));if(x.state==="hasValue"&&w===x.contents)return new Map}else if(!E.nonvalidatedAtoms.has(t)&&w instanceof au)return new Map;return l(w),s=void 0,new Map().set(t,Mc(w))}function g(){return B5(t)!==void 0&&i<=0}const y=Ece({key:t,nodeType:"atom",peek:d,get:h,set:p,init:f,invalidate:m,shouldDeleteConfigOnRelease:g,dangerouslyAllowMutability:e.dangerouslyAllowMutability,persistence_UNSTABLE:e.persistence_UNSTABLE?{type:e.persistence_UNSTABLE.type,backButton:e.persistence_UNSTABLE.backButton}:void 0,shouldRestoreFromSnapshots:!0,retainedBy:n});return y}function iR(e){if(process.env.NODE_ENV!=="production"&&typeof e.key!="string")throw Pt("A key option with a unique string value must be provided when creating an atom.");const{...t}=e,r="default"in e?e.default:new Promise(()=>{});return xce(r)?Cce({...t,default:r}):Tce({...t,default:r})}function Cce(e){const t=iR({...e,default:il,persistence_UNSTABLE:e.persistence_UNSTABLE===void 0?void 0:{...e.persistence_UNSTABLE,validator:n=>n instanceof au?n:zr(e.persistence_UNSTABLE).validator(n,il)},effects:e.effects,effects_UNSTABLE:e.effects_UNSTABLE}),r=ah({key:`${e.key}__withFallback`,get:({get:n})=>{const i=n(t);return i instanceof au?e.default:i},set:({set:n},i)=>n(t,i),cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:e.dangerouslyAllowMutability});return wce(r.key,B5(e.key)),r}iR.value=e=>new q5(e);var Pce=iR;class Nce{constructor(t){var r;jt(this,"_map",void 0),jt(this,"_keyMapper",void 0),this._map=new Map,this._keyMapper=(r=t?.mapKey)!==null&&r!==void 0?r:n=>n}size(){return this._map.size}has(t){return this._map.has(this._keyMapper(t))}get(t){return this._map.get(this._keyMapper(t))}set(t,r){this._map.set(this._keyMapper(t),r)}delete(t){this._map.delete(this._keyMapper(t))}clear(){this._map.clear()}}var Dce={MapCache:Nce},Ice=Dce.MapCache,kce=Object.freeze({__proto__:null,MapCache:Ice});const{LRUCache:z5}=I5,{MapCache:Mce}=kce,Yg={equality:"reference",eviction:"none",maxSize:1/0};function Lce({equality:e=Yg.equality,eviction:t=Yg.eviction,maxSize:r=Yg.maxSize}=Yg){const n=jce(e);return Fce(t,r,n)}function jce(e){switch(e){case"reference":return t=>t;case"value":return t=>JS(t)}throw Pt(`Unrecognized equality policy ${e}`)}function Fce(e,t,r){switch(e){case"keep-all":return new Mce({mapKey:r});case"lru":return new z5({mapKey:r,maxSize:zr(t)});case"most-recent":return new z5({mapKey:r,maxSize:1})}throw Pt(`Unrecognized eviction policy ${e}`)}var $ce=Lce;const{setConfigDeletionHandler:Vce}=Ha;let qce=0;function Bce(e){var t,r;const n=$ce({equality:(t=(r=e.cachePolicyForParams_UNSTABLE)===null||r===void 0?void 0:r.equality)!==null&&t!==void 0?t:"value",eviction:"keep-all"});return i=>{var a;let o;try{o=n.get(i)}catch(d){throw Pt(`Problem with cache lookup for selector ${e.key}: ${d.message}`)}if(o!=null)return o;const s=`${e.key}__selectorFamily/${(a=JS(i,{allowFunctions:!0}))!==null&&a!==void 0?a:"void"}/${qce++}`,u=d=>e.get(i)(d),l=e.cachePolicy_UNSTABLE,c=typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(i):e.retainedBy_UNSTABLE;let f;if(e.set!=null){const d=e.set;f=ah({key:s,get:u,set:(m,p)=>d(i)(m,p),cachePolicy_UNSTABLE:l,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:c})}else f=ah({key:s,get:u,cachePolicy_UNSTABLE:l,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:c});return n.set(i,f),Vce(f.key,()=>{n.delete(i)}),f}}var al=Bce;al({key:"__constant",get:e=>()=>e,cachePolicyForParams_UNSTABLE:{equality:"reference"}}),al({key:"__error",get:e=>()=>{throw Pt(e)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});const{loadableWithError:W5,loadableWithPromise:H5,loadableWithValue:G5}=Yd;function Qg(e,t){const r=Array(t.length).fill(void 0),n=Array(t.length).fill(void 0);for(const[i,a]of t.entries())try{r[i]=e(a)}catch(o){n[i]=o}return[r,n]}function Uce(e){return e!=null&&!Tr(e)}function Xg(e){return Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(t=>e[t])}function aR(e,t){return Array.isArray(e)?t:Object.getOwnPropertyNames(e).reduce((r,n,i)=>({...r,[n]:t[i]}),{})}function Lc(e,t,r){const n=r.map((i,a)=>i==null?G5(t[a]):Tr(i)?H5(i):W5(i));return aR(e,n)}function zce(e,t){return t.map((r,n)=>r===void 0?e[n]:r)}al({key:"__waitForNone",get:e=>({get:t})=>{const r=Xg(e),[n,i]=Qg(t,r);return Lc(e,n,i)},dangerouslyAllowMutability:!0}),al({key:"__waitForAny",get:e=>({get:t})=>{const r=Xg(e),[n,i]=Qg(t,r);return i.some(a=>!Tr(a))?Lc(e,n,i):new Promise(a=>{for(const[o,s]of i.entries())Tr(s)&&s.then(u=>{n[o]=u,i[o]=void 0,a(Lc(e,n,i))}).catch(u=>{i[o]=u,a(Lc(e,n,i))})})},dangerouslyAllowMutability:!0}),al({key:"__waitForAll",get:e=>({get:t})=>{const r=Xg(e),[n,i]=Qg(t,r);if(i.every(o=>o==null))return aR(e,n);const a=i.find(Uce);if(a!=null)throw a;return Promise.all(i).then(o=>aR(e,zce(n,o)))},dangerouslyAllowMutability:!0}),al({key:"__waitForAllSettled",get:e=>({get:t})=>{const r=Xg(e),[n,i]=Qg(t,r);return i.every(a=>!Tr(a))?Lc(e,n,i):Promise.all(i.map((a,o)=>Tr(a)?a.then(s=>{n[o]=s,i[o]=void 0}).catch(s=>{n[o]=void 0,i[o]=s}):null)).then(()=>Lc(e,n,i))},dangerouslyAllowMutability:!0}),al({key:"__noWait",get:e=>({get:t})=>{try{return ah.value(G5(t(e)))}catch(r){return ah.value(Tr(r)?H5(r):W5(r))}},dangerouslyAllowMutability:!0});const{RecoilLoadable:NGe}=Yd,{RecoilRoot:Wce}=Vg,{isRecoilValue:DGe}=rl,{freshSnapshot:IGe}=$g,{useRecoilValue:Hce,useSetRecoilState:Gce}=ale,{useRecoilCallback:Kce}=C5;var sh={RecoilRoot:Wce,atom:Pce,useRecoilValue:Hce,useSetRecoilState:Gce,useRecoilCallback:Kce},Yce=sh.RecoilRoot,Qce=sh.atom,Xce=sh.useRecoilValue,Zce=sh.useSetRecoilState,Jce=sh.useRecoilCallback;const K5=K.createContext(null);function efe({adapter:e,children:t}){const[r]=K.useState({}),n=C.jsx(K5.Provider,{value:{stateFactory:r,adapter:e},children:t});return e.type==="recoilAdapter"?C.jsx(Yce,{children:n}):n}function tfe(){const e=K.useContext(K5);if(!e)throw new Error("useStateContext must be used within a StateProvider");return e}function Ka(e,t){const{stateFactory:r,adapter:n}=tfe();let i=r[e];if(!i){if(t===void 0)throw new Error(`State manager for key "${e}" does not exist and no initial value was provided.`);i=n.createState(t),r[e]=i}const[a,o]=K.useState(i.get());return K.useEffect(()=>{const u=i.subscribe(l=>{o(l)});return()=>u()},[i]),[a,u=>{typeof u=="function"?i.set(u(i.get())):Array.isArray(u)?i.set(u.filter(l=>l!==null)):i.set(u)}]}function Y5(){return window.innerHeight>window.innerWidth}function rfe(){const[e,t]=K.useState(Y5());return K.useEffect(()=>{function r(){t(Y5())}return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]),e}function nfe(){const[e,t]=K.useState(!document.hidden),r=()=>{t(!document.hidden)};return K.useEffect(()=>(document.addEventListener("visibilitychange",r),()=>{document.removeEventListener("visibilitychange",r)})),e}function oR(e,t){const[r,n]=K.useState(e),i=K.useRef(null);function a(o){i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{n(o)},t)}return[r,a]}const ife=1e3*30,afe=["mousedown","mousemove","wheel","keydown","touchstart","scroll"],ofe=(e,t)=>(e.forEach(r=>window.addEventListener(r,t,{passive:!0})),()=>{e.forEach(r=>window.removeEventListener(r,t))});function Q5(e=ife){const t=K.useRef(null),[r,n]=K.useState(!1),[i,a]=K.useState(!1),[o,s]=K.useState(!0),u=K.useCallback(()=>{!o||i||(t.current&&clearTimeout(t.current),n(!1),t.current=window.setTimeout(()=>{n(!0)},e))},[e,i,o]),l=()=>{a(!0),n(!0)},c=()=>{a(!1),u()},f=()=>{s(!1),n(!1),t.current&&clearTimeout(t.current)},d=()=>{s(!0),u()};return K.useEffect(()=>{if(!o)return;const m=ofe(afe,u);return u(),()=>{t.current&&clearTimeout(t.current),m()}},[u,o]),[r,{disableIdleMode:f,enableIdleMode:d,lockInIdleMode:l,unlockIdleMode:c}]}function jc(e){const[t,r]=K.useState(()=>matchMedia(e).matches);return K.useLayoutEffect(()=>{const n=matchMedia(e);function i(){r(n.matches)}return n.addEventListener("change",i),()=>{n.removeEventListener("change",i)}},[e]),t}var ts=(e=>(e[e.equal=1]="equal",e[e.greater=2]="greater",e[e.lessThan=3]="lessThan",e[e.like=4]="like",e[e.endsWith=5]="endsWith",e[e.startsWith=6]="startsWith",e[e.in=7]="in",e))(ts||{}),rs=(e=>(e[e.readOnly=1]="readOnly",e[e.search=2]="search",e[e.select=3]="select",e[e.multipleSelect=4]="multipleSelect",e[e.boolean=5]="boolean",e[e.date=6]="date",e[e.dateTime=7]="dateTime",e))(rs||{});const X5=K.createContext(null),Z5=K.createContext(null),J5=K.createContext(null),e4=K.createContext(null);function sR(){return K.useContext(X5)}function uR(){return K.useContext(Z5)}function lR(){return K.useContext(J5)}function cR(){return K.useContext(e4)}const Fc=(e,t,r="")=>btoa(`After=0${sfe(t)}${ufe(e)}${r?`&${r}`:""}`),sfe=e=>{const t="&Sort=";if(Object.keys(e).length===0)throw new Error("No sortings found");return Object.keys(e).reduce((r,n)=>{const i=e[n];return r===t?`${r}${i.name}:${i.direction}`:`${r},${i.name}:${i.direction}`},t)},ufe=e=>{if(Object.keys(e).length===0)return"";const t="&Filter=[";return Object.keys(e).reduce((r,n,i)=>{const a=e[n];if(!a.value||a.value.length===0)return r;if(a.names.length===1)return r===t?`${r}{"${a.names[0]}":{"${Zg(a.operator)}":${JSON.stringify(a.value)}},"g":${i}}`:`${r},{"${a.names[0]}":{"${Zg(a.operator)}":${JSON.stringify(a.value)}},"g":${i}}`;const o=a.names.reduce((s,u)=>s===""?`${s}{"${u}":{"${Zg(a.operator)}":${JSON.stringify(a.value)}},"g":${i}}`:`${s},{"${u}":{"${Zg(a.operator)}":${JSON.stringify(a.value)}},"g":${i}}`,"");return r===t?`${r}${o}`:`${r},${o}`},t)+"]"};function Zg(e){switch(e){case ts.equal:return"eq";case ts.greater:return"gt";case ts.lessThan:return"lt";case ts.like:return"like";case ts.endsWith:return"like*";case ts.startsWith:return"*like";case ts.in:return"in";default:throw`Operator ${e} unknown`}}function t4({children:e,contextKey:t,defaultSorting:r,defaultFilters:n,defaultPersistance:i,canTogglePersistance:a}){function o(){if(!i||a&&!localStorage.getItem(t)&&!Object.values(n).find(k=>k.isShared))return n;let S={...n};const j=Object.keys(n).filter(k=>n[k].isShared);if(j.length>0){const k=localStorage.getItem("sharedFilters")??"{}";let F=JSON.parse(k);S=j.reduce((V,P)=>F.hasOwnProperty(P)?{...V,[P]:F[P]}:(F={...F,[P]:n[P]},V),S),localStorage.setItem("sharedFilters",JSON.stringify(F))}const M=Object.keys(n).filter(k=>!n[k].isShared);if(M.length>0){const k=localStorage.getItem(t)??"{}";let F=JSON.parse(k);S=M.reduce((V,P)=>F.hasOwnProperty(P)?{...V,[P]:F[P]}:(F={...F,[P]:n[P]},V),S),localStorage.setItem(t,JSON.stringify(F))}return S}function s(){if(!i||a&&!localStorage.getItem(t)&&!Object.values(r).find(k=>k.isShared))return r;let S={...r};const j=Object.keys(r).filter(k=>r[k].isShared);if(j.length>0){const k=localStorage.getItem("sharedSortings")??"{}";let F=JSON.parse(k);S=j.reduce((V,P)=>F.hasOwnProperty(P)?{...V,[P]:F[P]}:(F={...F,[P]:r[P]},V),S),localStorage.setItem("sharedSortings",JSON.stringify(F))}const M=Object.keys(r).filter(k=>!r[k].isShared);if(M.length>0){const k=localStorage.getItem(t)??"{}";let F=JSON.parse(k);S=M.reduce((V,P)=>F.hasOwnProperty(P)?{...V,[P]:F[P]}:(F={...F,[P]:r[P]},V),S),localStorage.setItem(t,JSON.stringify(F))}return S}const[u,l]=K.useState(o),[c,f]=K.useState(s),[d,h]=K.useState(()=>Fc(u,c,t)),[m,p]=K.useState(i),[g,y]=K.useState(t);K.useEffect(()=>y(t),[t]),K.useEffect(()=>l(o),[n]),K.useEffect(()=>f(s),[r]),K.useEffect(()=>h(Fc(n,r,t)),[t]);const b=K.useCallback(()=>{throw a&&(m&&localStorage.removeItem(t),p(!m)),new Error("Context is not configured to allow persistance toggle")},[]),E=K.useMemo(()=>({settings:{currentPersistance:m,canToggle:a,contextKey:t},setPersistance:b}),[m,t]),w=K.useMemo(()=>({filters:u,setFilters:l}),[u,t]),x=K.useMemo(()=>({sortings:c,setSortings:f}),[c,t]),R=K.useMemo(()=>({cursor:g!==t?Fc(n,r,t):d,updateCursor:()=>{h(()=>Fc(u,c,t))},updateRawCursor:(S,j)=>{const M=Fc(S,j,t);h(M)}}),[d,w,x,n,r,t]);return C.jsx(e4.Provider,{value:E,children:C.jsx(X5.Provider,{value:w,children:C.jsx(Z5.Provider,{value:x,children:C.jsx(J5.Provider,{value:R,children:e})})})})}function fR(){const e=sR(),t=uR(),r=lR(),n=cR();if(!e||!t||!r||!n)throw new Error("usePagination must be used within PaginationProvider");return{getFilterValue:u=>{const{filters:l}=e;return l[u].value},updateFilters:(u,l=!1)=>{const c={...e.filters,...u};e.setFilters(c);const f=Object.keys(c).filter(d=>c[d].isShared);if(f.length>0){const d=localStorage.getItem("sharedFilters")??"{}",h=JSON.parse(d),m=f.reduce((p,g)=>({...p,[g]:c[g]}),{...h});localStorage.setItem("sharedFilters",JSON.stringify(m))}if(n.settings.currentPersistance){const d=Object.keys(c).filter(g=>!c[g].isShared),h=localStorage.getItem(n.settings.contextKey)??"{}",m=JSON.parse(h),p=d.reduce((g,y)=>({...g,[y]:c[y]}),{...m});localStorage.setItem(n.settings.contextKey,JSON.stringify(p))}l&&r.updateRawCursor(c,t.sortings)},getSortingValue:u=>{const{sortings:l}=t;return l[u].direction},updateSortings:(u,l=!1)=>{const c={...t.sortings,...u};t.setSortings(c);const f=Object.keys(c).filter(d=>c[d].isShared);if(f.length>0){const d=localStorage.getItem("sharedSortings"),h=d?JSON.parse(d):{},m=f.reduce((p,g)=>({...p,[g]:h[g]}),{...h});localStorage.setItem("sharedSortings",JSON.stringify(m))}if(n.settings.currentPersistance){const d=Object.keys(c).filter(g=>!c[g].isShared),h=localStorage.getItem(n.settings.contextKey),m=h?JSON.parse(h):{},p=d.reduce((g,y)=>({...g,[y]:m[y]}),{...m});localStorage.setItem(n.settings.contextKey,JSON.stringify(p))}l&&r.updateRawCursor(e.filters,c)}}}function lfe(e=99){const[t,r]=K.useState(!1),[n,i]=K.useState(!1),[a,o]=K.useState([]),[s,u]=Ka("tagDistance",0);window.stopRunningLocate=function(){window.rfid.stop()};const l=b=>{try{h(0,"Beginning enumerate");const E=JSON.stringify(b);h(0,`readerID = ${E}`),window.rfid.readerID=b.RFID_Array[0].ID,i(!0),h(0,"Finished enumerate")}catch(E){i(!1),h(3,String(E))}};function c(b){console.log(b),b&&(b.errorCode,b.errorCode==1e3&&b?.vendorMessage==="CONNECTION_EVENT"?(h(0,"Connection event"),m()):h(3,`Error code: ${b.errorCode} Vendor message: ${b.vendorMessage}`))}K.useEffect(()=>{h(0,"Beginning connect"),n&&window.rfid.connect(),h(0,"Finished connect")},[n]);function f(){h(1,n.toString()),h(1,window.rfid),!n&&window.rfid&&(h(0,"Mount hook"),window.onEnumerate=l,window.statusLogger=c,window.rfid.statusEvent="statusLogger(%json);",h(0,`Set statusEvent = ${window.rfid.statusEvent}`),window.rfid.enumRFIDEvent="onEnumerate(%json);",h(0,`Set reportTrigger = ${window.rfid.reportTrigger}`),window.rfid.enumerate())}function d(){window.rfid&&(h(0,"Unomunt hook"),window.scanSingleRfidHandler=()=>{},window.rfid.tagEvent="",window._locate=void 0,window._inventory=()=>{},window.onEnumerate=()=>{},window.rfid.tagID="",h(0,"Stopping rfid"),window.rfid.stop(),h(0,"Rfid stopped"),h(0,"Disconnecting"),window.rfid.disconnect(),h(0,"Disconnected"),r(!1),i(!1))}K.useEffect(()=>{h(0,`isConnected = ${t}`)},[t]);function h(b,E){if(e<=b){let w="";switch(b){case 0:w="Trace -";break;case 1:w="Information -";break;case 2:w="Warning -";break;case 3:w="Error -";break;default:w="Unknown -"}o(x=>[...x,`${w} ${E}`])}}function m(){r(!0)}function p(b){window.rfid.reportTrigger=1,window.rfid.useSoftTrigger=0,window.rfid.reportUniqueTags="false",window.rfid.transport="serial",window.rfid.beepOnRead=1,window.rfid.lowerTriggerType="RFID_SCAN",window.rfid.upperTriggerType="RFID_SCAN",window.rfid.startTriggerType="triggerPress",window.rfid.stopTriggerType="triggerRelease",t&&(window.scanSingleRfidHandler=E=>{const w=E.TagData[0].tagID,x=JSON.stringify(E);h(0,`data = ${x}`),b(w)},window.rfid.tagEvent="scanSingleRfidHandler(%json);")}function g(b){window.rfid.tagEvent="TagLocateHandler(%json)";function E(w){u(w.TagLocate)}window.rfid.reportUniqueTags="false",window.rfid.transport="serial",window.rfid.reportTrigger=0,window.TagLocateHandler=E,window.rfid.beepOnRead=1,window.rfid.lowerTriggerType="NO_ACTION",window.rfid.upperTriggerType="NO_ACTION",window.rfid.startTriggerType="immediate",window.rfid.useSoftTrigger=0,window.rfid.antennaSelected=1,window.rfid.tagID=b,window.rfid.locateTag()}function y(b){try{t&&(h(0,"Beginning inventoryScan"),window.rfid.reportTrigger=0,window.rfid.useSoftTrigger=0,window.rfid.reportUniqueTags="true",window.rfid.transport="serial",window.rfid.beepOnRead=1,window.rfid.lowerTriggerType="RFID_SCAN",window.rfid.upperTriggerType="RFID_SCAN",window.rfid.startTriggerType="triggerPress",window.rfid.stopTriggerType="triggerRelease",window._inventory=E=>{b(E.TagData),h(0,`data = ${E.TagData[0].tagID}`),h(0,`datacomplete = ${E}`)},window.rfid.tagEvent="_inventory(%json);",h(0,`tagEvent = ${window.rfid.tagEvent}`),h(0,"Ended inventoryScan"))}catch(E){h(3,String(E))}}return{locateTag:g,inventoryScan:y,isConnected:t,canConnect:n,debugLog:a,mount:f,unMount:d,logDebug:h,scanSingleElement:p}}function Jg(e=".scrollable-container"){const t=new Map;K.useEffect(()=>{const r=document.querySelectorAll(e),n=a=>{a.classList.add("show-scrollbar"),setTimeout(()=>{a.classList.remove("show-scrollbar")},2e3)},i=a=>{a.classList.add("show-scrollbar"),t.has(a)&&clearTimeout(t.get(a));const o=window.setTimeout(()=>{a.classList.remove("show-scrollbar")},1e3);t.set(a,o)};return r.forEach(a=>{n(a);const o=()=>i(a);return a.addEventListener("scroll",o),()=>{a.removeEventListener("scroll",o),t.has(a)&&clearTimeout(t.get(a))}}),()=>{t.forEach(a=>clearTimeout(a))}},[e])}function r4({bufferName:e,callback:t}){const[r,n]=K.useState("- - - - - - - -"),[i,a]=K.useState(!1),[o,s]=K.useState(0),[u,l]=K.useState([]),c=K.useRef("- - - - - - - -"),f=K.useRef(null),d=x=>{const R=JSON.parse(localStorage.getItem(e)||"[]");!R.includes(x)&&x!=="- - - - - - - -"&&(R.push(x),localStorage.setItem(e,JSON.stringify(R)))},h=x=>{const S=JSON.parse(localStorage.getItem(e)||"[]").filter(j=>j!==x);localStorage.setItem(e,JSON.stringify(S))},m=x=>{n(c.current);const R=c.current;if(x!=="- - - - - - - -"&&typeof x=="string"){const S=t(c.current);if(S instanceof Promise)S.then(j=>{l(M=>[...M,j]),h(c.current)}).catch(()=>{d(R),p()});else return S}},p=()=>{const x=e,R=localStorage.getItem(x);if(R){const S=setInterval(async()=>{const j=o;if(j>=9){clearInterval(S);return}await g(JSON.parse(R))?(clearInterval(S),s(0)):s(j+1)},5e3);return()=>clearInterval(S)}},g=async x=>{let R=!0;for(const S of x)try{const j=await t(S);if(j instanceof Promise)j.then(M=>{l(k=>[...k,M])}),h(S);else return j}catch(j){console.trace("Error:",S,j),R=!1}return R},y=x=>{f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{m(x),c.current="- - - - - - - -"},250)},b=K.useCallback(x=>{!x.repeat&&x.key.length===1&&x.key!=="Unidentified"&&(c.current==="- - - - - - - -"?c.current=x.key:(c.current+=x.key,y(c.current)))},[]),E={activateScanner:()=>{window.addEventListener("keydown",b),a(!0),w(),console.log(`${e} scanner activated`)},disableScanner:()=>{window.removeEventListener("keydown",b),a(!1),console.log(`${e} scanner disabled`)}},w=()=>{c.current="- - - - - - - -"};return{lastScanned:r,scannerActions:E,isScannerActive:i,labelRead:u}}const n4=K.createContext(void 0);function i4(){const e=K.useContext(n4);if(e===void 0)throw new Error("BreadCrumbContext must be used within an BreadCrumbProvider");return e}function a4(){const[e,t]=Ka("hotKeysDialogState",!1),r=K.useCallback(()=>{t(o=>!o)},[t]),n=K.useCallback(()=>{t(!1)},[t]),i=K.useCallback(()=>{t(!0)},[t]),a=K.useMemo(()=>({toggle:r,close:n,open:i}),[r,n,i]);return[e,a]}function dR(e){const[t,r]=Ka("languageDialogState",!1),[n]=Ka("languageDialogPopover",!1),{i18n:i}=Qt(),a=i.resolvedLanguage??"",o=K.useCallback(()=>{r(!1)},[r]),s=K.useCallback(()=>{r(!0)},[r]),u=K.useCallback(()=>{r(!0);const c=Object.keys(e),f=c.indexOf(a);let d;f!==-1&&f<c.length-1?d=c[f+1]:d=c[0],i.changeLanguage(d)},[r,i,a,e]),l=K.useMemo(()=>({close:o,open:s,toggle:u}),[o,s,u]);return[t,l,n]}const o4=Qn(Iee,{shouldForwardProp:e=>e==="children"||e==="elevation"||e==="variant"})(({theme:e,backgroundColor:t,blur:r,saturate:n="180%",color:i,borderRadius:a="24px",border:o,padding:s="2vw",width:u="100%",height:l="100%",marginLeft:c="auto",marginRight:f="auto",marginTop:d="auto",marginBottom:h="auto",style:m={}})=>({display:"flex",flexDirection:"column",width:u,height:l,backgroundColor:t||e.palette.background.paper,backdropFilter:r&&`blur(${r}) saturate(${n})`,color:i||e.palette.primary.main,border:o,padding:s,borderRadius:a,marginLeft:c,marginRight:f,marginTop:d,marginBottom:h,...m}));function s4({children:e,value:t,index:r,styles:n}){return C.jsx(Gv,{id:`tabpanel-${r}`,role:"tabpanel","aria-labelledby":`tab-${r}`,display:t!==r?"none":"flex",sx:n,children:e})}function u4({tabs:e,value:t,onChange:r,color:n="primary.main",textColor:i="inherit",fullWidth:a=!1,size:o="medium",height:s,width:u}){const{t:l}=Qt(),c=(f,d)=>{d!==null&&r(f,d)};return C.jsx(Se.ToggleButtonGroup,{value:t,exclusive:!0,onChange:c,fullWidth:a,"aria-label":"toggle buttons as custom rounded tabs",children:e.map((f,d)=>C.jsx(Se.ToggleButton,{disableRipple:!0,disableFocusRipple:!0,size:o,value:typeof f=="string"?d:f?.value,selected:typeof f=="string"?t===d:t===f?.value,sx:{height:s,width:u,fontWeight:600,minWidth:"160px",textTransform:"capitalize","&.Mui-selected":{color:i,backgroundColor:n,transition:"background-color 0.2s ease-in-out",":hover":{backgroundColor:n}},borderRadius:d===0?"24px 0px 0px 24px":d===e.length-1?"0px 24px 24px 0px":void 0},children:C.jsxs(Kr,{gap:"4px",alignItems:"center",children:[typeof f!="string"&&f?.icon?f?.icon:typeof f=="string"?t===d&&C.jsx(v1,{}):t===f?.value&&C.jsx(v1,{}),l(typeof f=="string"?f:f?.label)]})},typeof f=="string"?f:f?.label))})}function l4({tabs:e,value:t,onChange:r,color:n="primary.main",textColor:i="inherit",fullWidth:a=!1}){const{t:o}=Qt();return C.jsx(Se.Tabs,{value:t,onChange:r,"aria-label":"custom tabs",variant:"scrollable",scrollButtons:e.length>3,slotProps:{indicator:{children:C.jsx("span",{className:"MuiTabs-indicatorSpan"})}},sx:{"& .Mui-selected":{color:`${i}!important`},"& .MuiTabs-indicator":{display:"flex",justifyContent:"center",backgroundColor:"transparent"},"& .MuiTabs-indicatorSpan":{maxWidth:40,width:"100%",backgroundColor:n}},children:e.map((s,u)=>C.jsx(Se.Tab,{value:typeof s=="string"?u:s?.value,id:typeof s=="string"?s:s?.label,label:o(typeof s=="string"?s:s?.label),"aria-controls":`tabPanel-${u}`,icon:typeof s=="string"?void 0:s?.icon,sx:a?{minWidth:"fit-content",flex:1}:{}},typeof s=="string"?s:s?.label))})}function c4({tabs:e,value:t,onChange:r,color:n,textColor:i="inherit",variant:a="standard",fullWidth:o=!1,size:s="medium"}){return a==="rounded"?C.jsx(u4,{tabs:e,value:t,onChange:r,color:n,fullWidth:o,size:s,textColor:i}):C.jsx(l4,{tabs:e,value:t,onChange:r,color:n,textColor:i,fullWidth:o})}function cfe({doLogin:e,pendingLogin:t,doLogout:r,pendingLogout:n}){const i=Rg([]),a=Og(),o=[f=>{const d={credentials:{username:f.get("username")?.toString()||"",password:f.get("password")?.toString()||"",rFID:f.get("rfid")?.toString()||"",client_id:a.CLIENT_ID}};e({variables:d,onCompleted:h=>{const m=h.authMutation.login,{expires:p,token:g,errors:y,username:b}=m;if(y&&y.length>0){i.set((m.errors??[]).map(({code:E,description:w})=>({code:E,description:w})));return}a.AUTH_SCHEMA!=="Cookies"&&g&&localStorage.setItem("token",`Bearer ${g}`),p&&localStorage.setItem("authExpiration",p),b&&localStorage.setItem("username",b)}})},t],s=[()=>{r({variables:{},onCompleted:()=>{localStorage.removeItem("token"),localStorage.removeItem("authExpiration"),localStorage.removeItem("username")}})},n],u=localStorage.getItem("authExpiration")!==void 0&&localStorage.getItem("authExpiration")!==null&&new Date(localStorage.getItem("authExpiration")).getTime()>new Date().getTime(),l=!!(a.AUTH_SCHEMA!=="Cookies"?localStorage.getItem("token")&&u:u),c={login:o,logout:s,removeError:i.remove};return[l,i.value,c]}const f4=K.createContext(null);function ffe({children:e,doLogin:t,pendingLogin:r,doLogout:n,pendingLogout:i}){const[a,o,{login:s,logout:u,removeError:l}]=cfe({doLogin:t,pendingLogin:r,doLogout:n,pendingLogout:i});return C.jsx(f4.Provider,{value:[a,o,{login:s,logout:u,removeError:l}],children:e})}function d4(){const e=K.useContext(f4);if(e===null)throw new Error("useAuthContext must be used within an AuthProvider");return e}const h4={tabPanel:{width:"100%",flexDirection:"column",justifyContent:"flex-end",padding:"18px 0px 0px px",gap:"32px",flexGrow:1},contentFadeOut:{transition:"opacity 0.5s ease-out",opacity:0,pointerEvents:"none"}};function dfe({ChangePasswordWidget:e,children:t,title:r,tabs:n,backgroundColor:i,blur:a,elevation:o,color:s,borderRadius:u,border:l,padding:c,width:f,height:d,redirect:h=!0,redirectPath:m="/",loggedCallback:p,logo:g}){const{t:y}=Qt(),[b,E]=K.useState(!1),[w,x,{login:R,removeError:S}]=d4(),j=jc("(min-height:700px)"),[M,k]=R,[F,V]=K.useState(0),[P,A]=K.useState(!1),[I,L]=K.useState(!1),[B,H]=K.useState(!1),U=(T,D)=>{V(D)};return K.useEffect(()=>{x.length>0&&x.find(({code:T})=>T==="PASSWORD_EXPIRED")&&E(!0)},[x]),K.useEffect(()=>{p&&w&&p()},[w,p]),K.useEffect(()=>{const T=x.map((D,O)=>setTimeout(()=>S(O),2e3));return()=>{T.forEach(clearTimeout)}},[x,S]),K.useEffect(()=>{if(w&&h){L(!0);const T=setTimeout(()=>{A(!0)},500),D=setTimeout(()=>{H(!0)},2500);return()=>{clearTimeout(T),clearTimeout(D)}}},[w,h]),w&&h&&B?C.jsx(cre,{to:m,replace:!0}):C.jsxs(C.Fragment,{children:[P?C.jsx(Sg,{}):null,C.jsx(o4,{elevation:o,variant:o!==void 0?"elevation":"outlined",blur:a,border:l,color:s,backgroundColor:i,borderRadius:u,padding:c,width:P?"0px":f,height:P?"0px":d,style:I?h4.contentFadeOut:{flexGrow:0},children:C.jsxs(AS,{height:"100%",marginTop:"auto",marginBottom:"auto",justifyContent:"space-between",children:[n&&C.jsx(Kr,{borderBottom:"1px solid",borderColor:"divider",children:n&&n.length>0&&C.jsx(c4,{value:F,onChange:U,tabs:n,color:s})}),x.length>0&&C.jsx(Se.Stack,{spacing:1,sx:{padding:"16px",minHeight:"20%",justifyContent:"center"},children:x.map(({code:T,description:D},O)=>C.jsx(Se.Alert,{variant:"filled",severity:"error",onClose:()=>S(O),children:y(T||D)},T))}),C.jsx(Kr,{style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",flex:1},children:C.jsx("img",{src:g,alt:"Logo",width:j?"60px":"40px"})}),C.jsx(Kr,{flex:1,alignContent:"center",flexDirection:"column",children:C.jsx(Se.Typography,{variant:j?"h4":"h5",sx:{fontWeight:300,textAlign:"center",marginTop:"auto",marginBottom:"auto"},children:r})}),C.jsx("form",{id:"authForm",action:M,children:b&&e?C.jsx(e,{pending:k}):n&&n.length>0?n.map(({label:T,child:D},O)=>C.jsx(s4,{value:F,index:O,styles:h4.tabPanel,children:C.jsx(D,{pending:k})},T)):t})]})})]})}const Ct=e=>typeof e=="string",uh=()=>{let e,t;const r=new Promise((n,i)=>{e=n,t=i});return r.resolve=e,r.reject=t,r},p4=e=>e==null?"":""+e,hfe=(e,t,r)=>{e.forEach(n=>{t[n]&&(r[n]=t[n])})},pfe=/###/g,v4=e=>e&&e.indexOf("###")>-1?e.replace(pfe,"."):e,g4=e=>!e||Ct(e),lh=(e,t,r)=>{const n=Ct(t)?t.split("."):t;let i=0;for(;i<n.length-1;){if(g4(e))return{};const a=v4(n[i]);!e[a]&&r&&(e[a]=new r),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={},++i}return g4(e)?{}:{obj:e,k:v4(n[i])}},m4=(e,t,r)=>{const{obj:n,k:i}=lh(e,t,Object);if(n!==void 0||t.length===1){n[i]=r;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=lh(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=lh(e,o,Object),s?.obj&&typeof s.obj[`${s.k}.${a}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=r},vfe=(e,t,r,n)=>{const{obj:i,k:a}=lh(e,t,Object);i[a]=i[a]||[],i[a].push(r)},em=(e,t)=>{const{obj:r,k:n}=lh(e,t);if(r&&Object.prototype.hasOwnProperty.call(r,n))return r[n]},gfe=(e,t,r)=>{const n=em(e,r);return n!==void 0?n:em(t,r)},y4=(e,t,r)=>{for(const n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?Ct(e[n])||e[n]instanceof String||Ct(t[n])||t[n]instanceof String?r&&(e[n]=t[n]):y4(e[n],t[n],r):e[n]=t[n]);return e},$c=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var mfe={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const yfe=e=>Ct(e)?e.replace(/[&<>"'\/]/g,t=>mfe[t]):e;class _fe{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const r=this.regExpMap.get(t);if(r!==void 0)return r;const n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}}const bfe=[" ",",","?","!",";"],Efe=new _fe(20),wfe=(e,t,r)=>{t=t||"",r=r||"";const n=bfe.filter(o=>t.indexOf(o)<0&&r.indexOf(o)<0);if(n.length===0)return!0;const i=Efe.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let a=!i.test(e);if(!a){const o=e.indexOf(r);o>0&&!i.test(e.substring(0,o))&&(a=!0)}return a},hR=(e,t,r=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const n=t.split(r);let i=e;for(let a=0;a<n.length;){if(!i||typeof i!="object")return;let o,s="";for(let u=a;u<n.length;++u)if(u!==a&&(s+=r),s+=n[u],o=i[s],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&u<n.length-1)continue;a+=u-a+1;break}i=o}return i},ch=e=>e?.replace("_","-"),xfe={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class tm{constructor(t,r={}){this.init(t,r)}init(t,r={}){this.prefix=r.prefix||"i18next:",this.logger=t||xfe,this.options=r,this.debug=r.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,r,n,i){return i&&!this.debug?null:(Ct(t[0])&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[r](t))}create(t){return new tm(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new tm(this.logger,t)}}var wo=new tm;let rm=class{constructor(){this.observers={}}on(t,r){return t.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(r)||0;this.observers[n].set(r,i+1)}),this}off(t,r){if(this.observers[t]){if(!r){delete this.observers[t];return}this.observers[t].delete(r)}}emit(t,...r){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([i,a])=>{for(let o=0;o<a;o++)i(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([i,a])=>{for(let o=0;o<a;o++)i.apply(i,[t,...r])})}};class _4 extends rm{constructor(t,r={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const r=this.options.ns.indexOf(t);r>-1&&this.options.ns.splice(r,1)}getResource(t,r,n,i={}){const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,r],n&&(Array.isArray(n)?s.push(...n):Ct(n)&&a?s.push(...n.split(a)):s.push(n)));const u=em(this.data,s);return!u&&!r&&!n&&t.indexOf(".")>-1&&(t=s[0],r=s[1],n=s.slice(2).join(".")),u||!o||!Ct(n)?u:hR(this.data?.[t]?.[r],n,a)}addResource(t,r,n,i,a={silent:!1}){const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let s=[t,r];n&&(s=s.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(s=t.split("."),i=r,r=s[1]),this.addNamespaces(r),m4(this.data,s,i),a.silent||this.emit("added",t,r,n,i)}addResources(t,r,n,i={silent:!1}){for(const a in n)(Ct(n[a])||Array.isArray(n[a]))&&this.addResource(t,r,a,n[a],{silent:!0});i.silent||this.emit("added",t,r,n)}addResourceBundle(t,r,n,i,a,o={silent:!1,skipCopy:!1}){let s=[t,r];t.indexOf(".")>-1&&(s=t.split("."),i=n,n=r,r=s[1]),this.addNamespaces(r);let u=em(this.data,s)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?y4(u,n,a):u={...u,...n},m4(this.data,s,u),o.silent||this.emit("added",t,r,n)}removeResourceBundle(t,r){this.hasResourceBundle(t,r)&&delete this.data[t][r],this.removeNamespaces(r),this.emit("removed",t,r)}hasResourceBundle(t,r){return this.getResource(t,r)!==void 0}getResourceBundle(t,r){return r||(r=this.options.defaultNS),this.getResource(t,r)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const r=this.getDataByLanguage(t);return!!(r&&Object.keys(r)||[]).find(i=>r[i]&&Object.keys(r[i]).length>0)}toJSON(){return this.data}}var b4={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,i){return e.forEach(a=>{t=this.processors[a]?.process(t,r,n,i)??t}),t}};const E4={},w4=e=>!Ct(e)&&typeof e!="boolean"&&typeof e!="number";class nm extends rm{constructor(t,r={}){super(),hfe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=wo.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,r={interpolation:{}}){const n={...r};return t==null?!1:this.resolve(t,n)?.res!==void 0}extractFromKey(t,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let a=r.ns||this.options.defaultNS||[];const o=n&&t.indexOf(n)>-1,s=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!wfe(t,n,i);if(o&&!s){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:Ct(a)?[a]:a};const l=t.split(n);(n!==i||n===i&&this.options.ns.indexOf(l[0])>-1)&&(a=l.shift()),t=l.join(i)}return{key:t,namespaces:Ct(a)?[a]:a}}translate(t,r,n){let i=typeof r=="object"?{...r}:r;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(i={...i}),i||(i={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const a=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:s,namespaces:u}=this.extractFromKey(t[t.length-1],i),l=u[u.length-1];let c=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;c===void 0&&(c=":");const f=i.lng||this.language,d=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()==="cimode")return d?a?{res:`${l}${c}${s}`,usedKey:s,exactUsedKey:s,usedLng:f,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${c}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:f,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;const h=this.resolve(t,i);let m=h?.res;const p=h?.usedKey||s,g=h?.exactUsedKey||s,y=["[object Number]","[object Function]","[object RegExp]"],b=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,w=i.count!==void 0&&!Ct(i.count),x=nm.hasDefaultValue(i),R=w?this.pluralResolver.getSuffix(f,i.count,i):"",S=i.ordinal&&w?this.pluralResolver.getSuffix(f,i.count,{ordinal:!1}):"",j=w&&!i.ordinal&&i.count===0,M=j&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${R}`]||i[`defaultValue${S}`]||i.defaultValue;let k=m;E&&!m&&x&&(k=M);const F=w4(k),V=Object.prototype.toString.apply(k);if(E&&k&&F&&y.indexOf(V)<0&&!(Ct(b)&&Array.isArray(k))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const P=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,k,{...i,ns:u}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(h.res=P,h.usedParams=this.getUsedParamsDetails(i),h):P}if(o){const P=Array.isArray(k),A=P?[]:{},I=P?g:p;for(const L in k)if(Object.prototype.hasOwnProperty.call(k,L)){const B=`${I}${o}${L}`;x&&!m?A[L]=this.translate(B,{...i,defaultValue:w4(M)?M[L]:void 0,joinArrays:!1,ns:u}):A[L]=this.translate(B,{...i,joinArrays:!1,ns:u}),A[L]===B&&(A[L]=k[L])}m=A}}else if(E&&Ct(b)&&Array.isArray(m))m=m.join(b),m&&(m=this.extendTranslation(m,t,i,n));else{let P=!1,A=!1;!this.isValidLookup(m)&&x&&(P=!0,m=M),this.isValidLookup(m)||(A=!0,m=s);const L=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&A?void 0:m,B=x&&M!==m&&this.options.updateMissing;if(A||P||B){if(this.logger.log(B?"updateKey":"missingKey",f,l,s,B?M:m),o){const D=this.resolve(s,{...i,keySeparator:!1});D&&D.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let H=[];const U=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&U&&U[0])for(let D=0;D<U.length;D++)H.push(U[D]);else this.options.saveMissingTo==="all"?H=this.languageUtils.toResolveHierarchy(i.lng||this.language):H.push(i.lng||this.language);const T=(D,O,$)=>{const q=x&&$!==m?$:L;this.options.missingKeyHandler?this.options.missingKeyHandler(D,l,O,q,B,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(D,l,O,q,B,i),this.emit("missingKey",D,l,O,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?H.forEach(D=>{const O=this.pluralResolver.getSuffixes(D,i);j&&i[`defaultValue${this.options.pluralSeparator}zero`]&&O.indexOf(`${this.options.pluralSeparator}zero`)<0&&O.push(`${this.options.pluralSeparator}zero`),O.forEach($=>{T([D],s+$,i[`defaultValue${$}`]||M)})}):T(H,s,M))}m=this.extendTranslation(m,t,i,h,n),A&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${c}${s}`),(A||P)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${c}${s}`:s,P?m:void 0,i))}return a?(h.res=m,h.usedParams=this.getUsedParamsDetails(i),h):m}extendTranslation(t,r,n,i,a){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const u=Ct(t)&&(n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let l;if(u){const f=t.match(this.interpolator.nestingRegexp);l=f&&f.length}let c=n.replace&&!Ct(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),t=this.interpolator.interpolate(t,c,n.lng||this.language||i.usedLng,n),u){const f=t.match(this.interpolator.nestingRegexp),d=f&&f.length;l<d&&(n.nest=!1)}!n.lng&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(t=this.interpolator.nest(t,(...f)=>a?.[0]===f[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${r[0]}`),null):this.translate(...f,r),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,s=Ct(o)?[o]:o;return t!=null&&s?.length&&n.applyPostProcessor!==!1&&(t=b4.handle(s,t,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),t}resolve(t,r={}){let n,i,a,o,s;return Ct(t)&&(t=[t]),t.forEach(u=>{if(this.isValidLookup(n))return;const l=this.extractFromKey(u,r),c=l.key;i=c;let f=l.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const d=r.count!==void 0&&!Ct(r.count),h=d&&!r.ordinal&&r.count===0,m=r.context!==void 0&&(Ct(r.context)||typeof r.context=="number")&&r.context!=="",p=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);f.forEach(g=>{this.isValidLookup(n)||(s=g,!E4[`${p[0]}-${g}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(s)&&(E4[`${p[0]}-${g}`]=!0,this.logger.warn(`key "${i}" for languages "${p.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(y=>{if(this.isValidLookup(n))return;o=y;const b=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(b,c,y,g,r);else{let w;d&&(w=this.pluralResolver.getSuffix(y,r.count,r));const x=`${this.options.pluralSeparator}zero`,R=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(b.push(c+w),r.ordinal&&w.indexOf(R)===0&&b.push(c+w.replace(R,this.options.pluralSeparator)),h&&b.push(c+x)),m){const S=`${c}${this.options.contextSeparator}${r.context}`;b.push(S),d&&(b.push(S+w),r.ordinal&&w.indexOf(R)===0&&b.push(S+w.replace(R,this.options.pluralSeparator)),h&&b.push(S+x))}}let E;for(;E=b.pop();)this.isValidLookup(n)||(a=E,n=this.getResource(y,g,E,r))}))})}),{res:n,usedKey:i,exactUsedKey:a,usedLng:o,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,r,n,i={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,r,n,i):this.resourceStore.getResource(t,r,n,i)}getUsedParamsDetails(t={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&!Ct(t.replace);let i=n?t.replace:t;if(n&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const a of r)delete i[a]}return i}static hasDefaultValue(t){const r="defaultValue";for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&r===n.substring(0,r.length)&&t[n]!==void 0)return!0;return!1}}class x4{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=wo.create("languageUtils")}getScriptPartFromCode(t){if(t=ch(t),!t||t.indexOf("-")<0)return null;const r=t.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(t){if(t=ch(t),!t||t.indexOf("-")<0)return t;const r=t.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(t){if(Ct(t)&&t.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(t)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let r;return t.forEach(n=>{if(r)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(r=i)}),!r&&this.options.supportedLngs&&t.forEach(n=>{if(r)return;const i=this.getScriptPartFromCode(n);if(this.isSupportedCode(i))return r=i;const a=this.getLanguagePartFromCode(n);if(this.isSupportedCode(a))return r=a;r=this.options.supportedLngs.find(o=>{if(o===a)return o;if(!(o.indexOf("-")<0&&a.indexOf("-")<0)&&(o.indexOf("-")>0&&a.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===a||o.indexOf(a)===0&&a.length>1))return o})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),Ct(t)&&(t=[t]),Array.isArray(t))return t;if(!r)return t.default||[];let n=t[r];return n||(n=t[this.getScriptPartFromCode(r)]),n||(n=t[this.formatLanguageCode(r)]),n||(n=t[this.getLanguagePartFromCode(r)]),n||(n=t.default),n||[]}toResolveHierarchy(t,r){const n=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],t),i=[],a=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return Ct(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):Ct(t)&&a(this.formatLanguageCode(t)),n.forEach(o=>{i.indexOf(o)<0&&a(this.formatLanguageCode(o))}),i}}const S4={zero:0,one:1,two:2,few:3,many:4,other:5},R4={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Sfe{constructor(t,r={}){this.languageUtils=t,this.options=r,this.logger=wo.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,r){this.rules[t]=r}clearCache(){this.pluralRulesCache={}}getRule(t,r={}){const n=ch(t==="dev"?"en":t),i=r.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:n,type:i});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let o;try{o=new Intl.PluralRules(n,{type:i})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),R4;if(!t.match(/-|_/))return R4;const u=this.languageUtils.getLanguagePartFromCode(t);o=this.getRule(u,r)}return this.pluralRulesCache[a]=o,o}needsPlural(t,r={}){let n=this.getRule(t,r);return n||(n=this.getRule("dev",r)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,r,n={}){return this.getSuffixes(t,n).map(i=>`${r}${i}`)}getSuffixes(t,r={}){let n=this.getRule(t,r);return n||(n=this.getRule("dev",r)),n?n.resolvedOptions().pluralCategories.sort((i,a)=>S4[i]-S4[a]).map(i=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,r,n={}){const i=this.getRule(t,n);return i?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(r)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",r,n))}}const O4=(e,t,r,n=".",i=!0)=>{let a=gfe(e,t,r);return!a&&i&&Ct(r)&&(a=hR(e,r,n),a===void 0&&(a=hR(t,r,n))),a},pR=e=>e.replace(/\$/g,"$$$$");class Rfe{constructor(t={}){this.logger=wo.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(r=>r),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:i,prefix:a,prefixEscaped:o,suffix:s,suffixEscaped:u,formatSeparator:l,unescapeSuffix:c,unescapePrefix:f,nestingPrefix:d,nestingPrefixEscaped:h,nestingSuffix:m,nestingSuffixEscaped:p,nestingOptionsSeparator:g,maxReplaces:y,alwaysFormat:b}=t.interpolation;this.escape=r!==void 0?r:yfe,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=a?$c(a):o||"{{",this.suffix=s?$c(s):u||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?$c(d):h||$c("$t("),this.nestingSuffix=m?$c(m):p||$c(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=y||1e3,this.alwaysFormat=b!==void 0?b:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(r,n)=>r?.source===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,r,n,i){let a,o,s;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=h=>{if(h.indexOf(this.formatSeparator)<0){const y=O4(r,u,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,n,{...i,...r,interpolationkey:h}):y}const m=h.split(this.formatSeparator),p=m.shift().trim(),g=m.join(this.formatSeparator).trim();return this.format(O4(r,u,p,this.options.keySeparator,this.options.ignoreJSONStructure),g,n,{...i,...r,interpolationkey:p})};this.resetRegExp();const c=i?.missingInterpolationHandler||this.options.missingInterpolationHandler,f=i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>pR(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?pR(this.escape(h)):pR(h)}].forEach(h=>{for(s=0;a=h.regex.exec(t);){const m=a[1].trim();if(o=l(m),o===void 0)if(typeof c=="function"){const g=c(t,a,i);o=Ct(g)?g:""}else if(i&&Object.prototype.hasOwnProperty.call(i,m))o="";else if(f){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${t}`),o="";else!Ct(o)&&!this.useRawValueToEscape&&(o=p4(o));const p=h.safeValue(o);if(t=t.replace(a[0],p),f?(h.regex.lastIndex+=o.length,h.regex.lastIndex-=a[0].length):h.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,r,n={}){let i,a,o;const s=(u,l)=>{const c=this.nestingOptionsSeparator;if(u.indexOf(c)<0)return u;const f=u.split(new RegExp(`${c}[ ]*{`));let d=`{${f[1]}`;u=f[0],d=this.interpolate(d,o);const h=d.match(/'/g),m=d.match(/"/g);((h?.length??0)%2===0&&!m||m.length%2!==0)&&(d=d.replace(/'/g,'"'));try{o=JSON.parse(d),l&&(o={...l,...o})}catch(p){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,p),`${u}${c}${d}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,u};for(;i=this.nestingRegexp.exec(t);){let u=[];o={...n},o=o.replace&&!Ct(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const l=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(l!==-1&&(u=i[1].slice(l).split(this.formatSeparator).map(c=>c.trim()).filter(Boolean),i[1]=i[1].slice(0,l)),a=r(s.call(this,i[1].trim(),o),o),a&&i[0]===t&&!Ct(a))return a;Ct(a)||(a=p4(a)),a||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),a=""),u.length&&(a=u.reduce((c,f)=>this.format(c,f,n.lng,{...n,interpolationkey:i[1].trim()}),a.trim())),t=t.replace(i[0],a),this.regexp.lastIndex=0}return t}}const Ofe=e=>{let t=e.toLowerCase().trim();const r={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);t==="currency"&&i.indexOf(":")<0?r.currency||(r.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?r.range||(r.range=i.trim()):i.split(";").forEach(o=>{if(o){const[s,...u]=o.split(":"),l=u.join(":").trim().replace(/^'+|'+$/g,""),c=s.trim();r[c]||(r[c]=l),l==="false"&&(r[c]=!1),l==="true"&&(r[c]=!0),isNaN(l)||(r[c]=parseInt(l,10))}})}return{formatName:t,formatOptions:r}},A4=e=>{const t={};return(r,n,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});const o=n+JSON.stringify(a);let s=t[o];return s||(s=e(ch(n),i),t[o]=s),s(r)}},Afe=e=>(t,r,n)=>e(ch(r),n)(t);class Tfe{constructor(t={}){this.logger=wo.create("formatter"),this.options=t,this.init(t)}init(t,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const n=r.cacheInBuiltFormats?A4:Afe;this.formats={number:n((i,a)=>{const o=new Intl.NumberFormat(i,{...a});return s=>o.format(s)}),currency:n((i,a)=>{const o=new Intl.NumberFormat(i,{...a,style:"currency"});return s=>o.format(s)}),datetime:n((i,a)=>{const o=new Intl.DateTimeFormat(i,{...a});return s=>o.format(s)}),relativetime:n((i,a)=>{const o=new Intl.RelativeTimeFormat(i,{...a});return s=>o.format(s,a.range||"day")}),list:n((i,a)=>{const o=new Intl.ListFormat(i,{...a});return s=>o.format(s)})}}add(t,r){this.formats[t.toLowerCase().trim()]=r}addCached(t,r){this.formats[t.toLowerCase().trim()]=A4(r)}format(t,r,n,i={}){const a=r.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(s=>s.indexOf(")")>-1)){const s=a.findIndex(u=>u.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,s)].join(this.formatSeparator)}return a.reduce((s,u)=>{const{formatName:l,formatOptions:c}=Ofe(u);if(this.formats[l]){let f=s;try{const d=i?.formatParams?.[i.interpolationkey]||{},h=d.locale||d.lng||i.locale||i.lng||n;f=this.formats[l](s,h,{...c,...i,...d})}catch(d){this.logger.warn(d)}return f}else this.logger.warn(`there was no format function for ${l}`);return s},t)}}const Cfe=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class Pfe extends rm{constructor(t,r,n,i={}){super(),this.backend=t,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=wo.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,i.backend,i)}queueLoad(t,r,n,i){const a={},o={},s={},u={};return t.forEach(l=>{let c=!0;r.forEach(f=>{const d=`${l}|${f}`;!n.reload&&this.store.hasResourceBundle(l,f)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?o[d]===void 0&&(o[d]=!0):(this.state[d]=1,c=!1,o[d]===void 0&&(o[d]=!0),a[d]===void 0&&(a[d]=!0),u[f]===void 0&&(u[f]=!0)))}),c||(s[l]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(u)}}loaded(t,r,n){const i=t.split("|"),a=i[0],o=i[1];r&&this.emit("failedLoading",a,o,r),!r&&n&&this.store.addResourceBundle(a,o,n,void 0,void 0,{skipCopy:!0}),this.state[t]=r?-1:2,r&&n&&(this.state[t]=0);const s={};this.queue.forEach(u=>{vfe(u.loaded,[a],o),Cfe(u,t),r&&u.errors.push(r),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(l=>{s[l]||(s[l]={});const c=u.loaded[l];c.length&&c.forEach(f=>{s[l][f]===void 0&&(s[l][f]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(u=>!u.done)}read(t,r,n,i=0,a=this.retryTimeout,o){if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:r,fcName:n,tried:i,wait:a,callback:o});return}this.readingCalls++;const s=(l,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(l&&c&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,r,n,i+1,a*2,o)},a);return}o(l,c)},u=this.backend[n].bind(this.backend);if(u.length===2){try{const l=u(t,r);l&&typeof l.then=="function"?l.then(c=>s(null,c)).catch(s):s(null,l)}catch(l){s(l)}return}return u(t,r,s)}prepareLoading(t,r,n={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Ct(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Ct(r)&&(r=[r]);const a=this.queueLoad(t,r,n,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(o=>{this.loadOne(o)})}load(t,r,n){this.prepareLoading(t,r,{},n)}reload(t,r,n){this.prepareLoading(t,r,{reload:!0},n)}loadOne(t,r=""){const n=t.split("|"),i=n[0],a=n[1];this.read(i,a,"read",void 0,void 0,(o,s)=>{o&&this.logger.warn(`${r}loading namespace ${a} for language ${i} failed`,o),!o&&s&&this.logger.log(`${r}loaded namespace ${a} for language ${i}`,s),this.loaded(t,o,s)})}saveMissing(t,r,n,i,a,o={},s=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend?.create){const u={...o,isUpdate:a},l=this.backend.create.bind(this.backend);if(l.length<6)try{let c;l.length===5?c=l(t,r,n,i,u):c=l(t,r,n,i),c&&typeof c.then=="function"?c.then(f=>s(null,f)).catch(s):s(null,c)}catch(c){s(c)}else l(t,r,n,i,s,u)}!t||!t[0]||this.store.addResource(t[0],r,n,i)}}}const T4=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Ct(e[1])&&(t.defaultValue=e[1]),Ct(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const r=e[3]||e[2];Object.keys(r).forEach(n=>{t[n]=r[n]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),C4=e=>(Ct(e.ns)&&(e.ns=[e.ns]),Ct(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Ct(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),im=()=>{},Nfe=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(r=>{typeof e[r]=="function"&&(e[r]=e[r].bind(e))})};class fh extends rm{constructor(t={},r){if(super(),this.options=C4(t),this.services={},this.logger=wo,this.modules={external:[]},Nfe(this),r&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,r),this;setTimeout(()=>{this.init(t,r)},0)}}init(t={},r){this.isInitializing=!0,typeof t=="function"&&(r=t,t={}),t.defaultNS==null&&t.ns&&(Ct(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const n=T4();this.options={...n,...this.options,...C4(t)},this.options.interpolation={...n.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const i=l=>l?typeof l=="function"?new l:l:null;if(!this.options.isClone){this.modules.logger?wo.init(i(this.modules.logger),this.options):wo.init(null,this.options);let l;this.modules.formatter?l=this.modules.formatter:l=Tfe;const c=new x4(this.options);this.store=new _4(this.options.resources,this.options);const f=this.services;f.logger=wo,f.resourceStore=this.store,f.languageUtils=c,f.pluralResolver=new Sfe(c,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.warn("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),l&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(f.formatter=i(l),f.formatter.init&&f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new Rfe(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Pfe(i(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(h,...m)=>{this.emit(h,...m)}),this.modules.languageDetector&&(f.languageDetector=i(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=i(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new nm(this.services,this.options),this.translator.on("*",(h,...m)=>{this.emit(h,...m)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,r||(r=im),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&l[0]!=="dev"&&(this.options.lng=l[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(l=>{this[l]=(...c)=>this.store[l](...c)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(l=>{this[l]=(...c)=>(this.store[l](...c),this)});const s=uh(),u=()=>{const l=(c,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(f),r(c,f)};if(this.languages&&!this.isInitialized)return l(null,this.t.bind(this));this.changeLanguage(this.options.lng,l)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),s}loadResources(t,r=im){let n=r;const i=Ct(t)?t:this.language;if(typeof t=="function"&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if(i?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const a=[],o=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(l=>{l!=="cimode"&&a.indexOf(l)<0&&a.push(l)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>o(u)),this.options.preload?.forEach?.(s=>o(s)),this.services.backendConnector.load(a,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(s)})}else n(null)}reloadResources(t,r,n){const i=uh();return typeof t=="function"&&(n=t,t=void 0),typeof r=="function"&&(n=r,r=void 0),t||(t=this.languages),r||(r=this.options.ns),n||(n=im),this.services.backendConnector.reload(t,r,a=>{i.resolve(),n(a)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&b4.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let r=0;r<this.languages.length;r++){const n=this.languages[r];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,r){this.isLanguageChangingTo=t;const n=uh();this.emit("languageChanging",t);const i=s=>{this.language=s,this.languages=this.services.languageUtils.toResolveHierarchy(s),this.resolvedLanguage=void 0,this.setResolvedLanguage(s)},a=(s,u)=>{u?this.isLanguageChangingTo===t&&(i(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,n.resolve((...l)=>this.t(...l)),r&&r(s,(...l)=>this.t(...l))},o=s=>{!t&&!s&&this.services.languageDetector&&(s=[]);const u=Ct(s)?s:s&&s[0],l=this.store.hasLanguageSomeTranslations(u)?u:this.services.languageUtils.getBestMatchFromCodes(Ct(s)?[s]:s);l&&(this.language||i(l),this.translator.language||this.translator.changeLanguage(l),this.services.languageDetector?.cacheUserLanguage?.(l)),this.loadResources(l,c=>{a(c,l)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(t),n}getFixedT(t,r,n){const i=(a,o,...s)=>{let u;typeof o!="object"?u=this.options.overloadTranslationOptionHandler([a,o].concat(s)):u={...o},u.lng=u.lng||i.lng,u.lngs=u.lngs||i.lngs,u.ns=u.ns||i.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||n||i.keyPrefix);const l=this.options.keySeparator||".";let c;return u.keyPrefix&&Array.isArray(a)?c=a.map(f=>`${u.keyPrefix}${l}${f}`):c=u.keyPrefix?`${u.keyPrefix}${l}${a}`:a,this.t(c,u)};return Ct(t)?i.lng=t:i.lngs=t,i.ns=r,i.keyPrefix=n,i}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,r={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(s,u)=>{const l=this.services.backendConnector.state[`${s}|${u}`];return l===-1||l===0||l===2};if(r.precheck){const s=r.precheck(this,o);if(s!==void 0)return s}return!!(this.hasResourceBundle(n,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,t)&&(!i||o(a,t)))}loadNamespaces(t,r){const n=uh();return this.options.ns?(Ct(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),r&&r(i)}),n):(r&&r(),Promise.resolve())}loadLanguages(t,r){const n=uh();Ct(t)&&(t=[t]);const i=this.options.preload||[],a=t.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return a.length?(this.options.preload=i.concat(a),this.loadResources(o=>{n.resolve(),r&&r(o)}),n):(r&&r(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const i=new Intl.Locale(t);if(i&&i.getTextInfo){const a=i.getTextInfo();if(a&&a.direction)return a.direction}}catch{}const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services?.languageUtils||new x4(T4());return t.toLowerCase().indexOf("-latn")>1?"ltr":r.indexOf(n.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},r){return new fh(t,r)}cloneInstance(t={},r=im){const n=t.forkResourceStore;n&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},a=new fh(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(s=>{a[s]=this[s]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n){const s=Object.keys(this.store.data).reduce((u,l)=>(u[l]={...this.store.data[l]},u[l]=Object.keys(u[l]).reduce((c,f)=>(c[f]={...u[l][f]},c),u[l]),u),{});a.store=new _4(s,i),a.services.resourceStore=a.store}return a.translator=new nm(a.services,i),a.translator.on("*",(s,...u)=>{a.emit(s,...u)}),a.init(i,r),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const hn=fh.createInstance();hn.createInstance=fh.createInstance,hn.createInstance,hn.dir,hn.init,hn.loadResources,hn.reloadResources,hn.use,hn.changeLanguage,hn.getFixedT;const P4=hn.t;hn.exists,hn.setDefaultNamespace,hn.hasLoadedNamespace,hn.loadNamespaces,hn.loadLanguages;function Dfe({callback:e,title:t,subtitle:r}){const{scannerActions:n}=r4({bufferName:"BadgeScanner",callback:e});return K.useEffect(()=>(n.activateScanner(),()=>{n.disableScanner()}),[n]),C.jsxs(Gd,{sx:{flexDirection:"column",justifyContent:"space-around",height:"100%"},children:[C.jsxs(Se.Box,{children:[C.jsx(Se.Typography,{variant:"h4",children:P4(t)}),C.jsx(Se.Typography,{variant:"h6",children:P4(r)})]}),C.jsx(kee,{sx:{fontSize:"10rem"}})]})}function N4({id:e,children:t,ratio:r=0,unit:n=1}){const i=100/r,a=Array.from({length:r}).reduce((o,s,u)=>{const l=u*i,c=u%2===0?1:0;return o[`${l}%`]={opacity:c},o},{});return C.jsx(Gv,{sx:{[`@keyframes blink-${e}`]:a,animation:`blink-${e} ${n}s infinite`,display:"inline-flex"},children:t})}function D4(){const{crumbs:e,slice:t}=i4(),{t:r}=Qt();return K.useEffect(()=>console.log("Crumbs:",e),[e]),C.jsxs(Ju,{children:[C.jsx(Se.Breadcrumbs,{"aria-label":"breadcrumb",sx:{padding:"8px"},children:e.map((n,i)=>C.jsx(Se.Link,{color:"inherit",underline:"hover",sx:{cursor:"pointer"},onClick:()=>{console.log("Clicked crumb:",n.text),console.log("index:",i),t(i)},children:r(n.text)},i))}),C.jsx(Se.Divider,{}),C.jsx(Pc,{gap:2,flexWrap:"wrap",alignContent:"center",overflow:"hidden",padding:0,children:e[e.length-1].component})]})}function Ife({root:e}){const[t,r]=K.useState([e]),n=a=>r(o=>[...o,a]),i=a=>r(o=>o.slice(0,a+1));return C.jsx(n4.Provider,{value:{crumbs:t,push:n,slice:i},children:C.jsx(D4,{})})}function I4({value:e}){const{t}=Qt(),[r,n]=K.useState(!1),i=()=>{e&&(n(!0),navigator.clipboard.writeText(e))};return K.useEffect(()=>{r&&setTimeout(()=>{n(!1)},1e3)},[r]),C.jsx(Se.Tooltip,{placement:"top",title:t(r?"COPIED":"COPY"),disableFocusListener:!0,disableTouchListener:!0,arrow:!0,children:C.jsx(Se.IconButton,{id:"copy-to-clipboard-icnBtn",onClick:i,color:r?"primary":"default",disabled:!e,size:"small",children:r?C.jsx(v1,{}):C.jsx(Mee,{})})})}function k4({id:e,anchor:t,onClose:r,children:n,width:i,centerPopover:a}){return C.jsx(Se.Popover,{id:e,open:!!t,anchorEl:t,onClose:r,anchorOrigin:{vertical:"bottom",horizontal:a?"center":"left"},transformOrigin:{vertical:"top",horizontal:a?"center":"left"},slotProps:{paper:{sx:{overflow:"hidden",minWidth:i,width:i}}},children:n})}function vR({Icon:e,label:t,menuContent:r,centerPopover:n}){const{t:i}=Qt(),[a,o]=K.useState(null),s=c=>{o(c.currentTarget)},u=()=>{o(null)},l=K.Children.map(r,c=>K.isValidElement(c)?K.cloneElement(c,{onClose:u}):c);return C.jsxs(C.Fragment,{children:[C.jsx(Se.Tooltip,{title:i("OPEN_MENU",{value:i(t)}),children:C.jsx(Se.Button,{id:`${t}-btn`,variant:"outlined",onClick:s,startIcon:C.jsx(e,{}),children:i(t)})}),C.jsx(k4,{centerPopover:n,id:`${t}-menu`,anchor:a,onClose:u,children:l})]})}function M4({styles:e={},languages:t,flags:r,isPopover:n}){const{i18n:i}=Qt(),[,a]=Ka("languageDialogPopover",!1);K.useEffect(()=>{a(n??!1)},[n,a]);const[o,s]=dR(t),u=r[i.language];return u?C.jsx(Lee,{id:"flags-btn",role:"button","aria-label":"change language flag button",onClick:s.open,sx:e,children:C.jsx(u,{size:36})}):(console.warn(`No flag component found for language: ${i.language}`),null)}function am(){const[e,t]=Ka("sidebarIsOpenState",!1),r=K.useCallback(()=>{t(o=>!o)},[t]),n=K.useCallback(()=>{t(!1)},[t]),i=K.useCallback(()=>{t(!0)},[t]),a=K.useMemo(()=>({toggle:r,close:n,open:i}),[r,n,i]);return[e,a]}const L4="300px",j4="56px",gR=.5,F4=Qn(jee,{shouldForwardProp:e=>e!=="open"&&e!=="isMobile"&&e!=="isIdle"})(({theme:e,open:t,isMobile:r,isIdle:n})=>({flexShrink:0,boxSizing:"border-box",whiteSpace:"nowrap",height:"100% !important","& .MuiDrawer-paper":{opacity:r&&!t||n?0:1,position:"relative",width:n?0:r?t?"98vw":"0":t?L4:j4,transition:`all ${gR}s ease-in-out`,overflow:"hidden",backgroundColor:e.palette.background.paper}}));function kfe({children:e,Logo:t,theme:r,isIdle:n}){const{i18n:i}=Qt(),a=jc("(max-width: 600px)"),[o,s]=am(),[u,l]=K.Children.toArray(e),c=i.dir();return C.jsxs(F4,{id:"sidebar-drawer",dir:c,variant:"permanent",anchor:c==="rtl"?"right":"left",open:o,onClose:s.close,slotProps:{paper:{variant:"outlined"}},isMobile:a,"data-pw":"sidebar",isIdle:n,children:[t&&C.jsx(Kr,{pt:"1vw",pb:"1vw",alignItems:"center",justifyContent:"center",minHeight:"64px",marginTop:"1vh",children:C.jsx(Se.Collapse,{in:o,timeout:500,orientation:"horizontal",collapsedSize:"0px",children:C.jsx(t,{width:"200px",height:"64px",theme:r})})}),C.jsx(Se.Box,{sx:{flexGrow:1,overflowY:"scroll",overflowX:"hidden",scrollbarWidth:"none"},children:u}),C.jsx(Se.Divider,{}),l]})}var Vc=(e=>(e.DARK="dark",e.LIGHT="light",e))(Vc||{});function qc(){const[e,t]=Ka("themeModeState",localStorage.getItem("theme-mode")||Vc.DARK);K.useEffect(()=>{localStorage.setItem("theme-mode",e)},[e]);const r=K.useCallback(()=>{t(i=>i===Vc.DARK?Vc.LIGHT:Vc.DARK)},[t]),n=K.useMemo(()=>({toggle:r}),[r]);return[e,n]}function Mfe({onClick:e,isIdle:t}){const[r]=qc(),[n]=am(),[i,a]=K.useState(n);K.useEffect(()=>{t&&n&&(a(!1),e())},[t,n,e]),K.useEffect(()=>{a(n)},[n]);const o=()=>{a(!i),e()};return C.jsxs("div",{id:"menu-icon","aria-label":"menu-icon",style:{marginRight:"19px"},className:`${r} ${i?"open":"closed"}`,onClick:o,children:[C.jsx("span",{}),C.jsx("span",{}),C.jsx("span",{})]})}const Lfe=g1.styled(e=>C.jsx($ee,{disableRipple:!0,...e}))(({theme:e})=>({width:42,height:26,padding:0,"& .MuiSwitch-switchBase":{padding:2,margin:3,transitionDuration:"300ms","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{opacity:1,border:0},"& .MuiSwitch-thumb:before":{content:"''",position:"absolute",width:"100%",height:"100%",left:0,top:0,backgroundColor:"#fff",borderRadius:"50%",backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundImage:`url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" viewBox="0 0 24 24"><path fill="${encodeURIComponent("#111")}" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"/></svg>')`}},"&.Mui-disabled .MuiSwitch-thumb":{color:e.palette.grey[100]}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:16,height:16,"&::before":{content:"''",position:"absolute",width:"100%",height:"100%",left:0,top:0,backgroundColor:"#79747e",borderRadius:"50%",backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundImage:`url('data:image/svg+xml;utf8,<svg fill="${encodeURIComponent("#fff")}" width="16" height="16" viewBox="-6 -6 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7.314 5.9l3.535-3.536A1 1 0 1 0 9.435.95L5.899 4.485 2.364.95A1 1 0 1 0 .95 2.364l3.535 3.535L.95 9.435a1 1 0 1 0 1.414 1.414l3.535-3.535 3.536 3.535a1 1 0 1 0 1.414-1.414L7.314 5.899z" /></svg>')`}},"& .MuiSwitch-track":{border:"2px solid #79747e",borderRadius:26/2,backgroundColor:"#e6e0e9",opacity:1,transition:e.transitions.create(["background-color"],{duration:500})}}));function $4({label:e,value:t,onChange:r}){const{t:n}=Qt();return C.jsx(Fee,{labelPlacement:"start",control:C.jsx(Lfe,{sx:{ml:1.69},checked:t,onChange:r}),label:e&&n(e),slotProps:{typography:{noWrap:!0}}})}function jfe({translation:e,globalStateString:t,defaultValue:r}){const[n,i]=Ka(t,r),a=o=>{i(o.target.checked)};return C.jsx($4,{label:e,value:n,onChange:a})}var om=(e=>(e.Column="column",e.Row="row",e))(om||{});function mR({caption:e,value:t,captionColor:r="textSecondary",valueColor:n="textPrimary",reverse:i,direction:a=om.Column,width:o,height:s,gap:u="4px",flex:l,padding:c,textAlign:f,captionStyle:d,valueStyle:h,fallback:m="N/A",enableCopy:p,className:g}){const{t:y}=Qt();return C.jsxs(Kr,{className:g,flexDirection:i?`${a}-reverse`:a,alignItems:a===om.Row?"center":"stretch",width:o,gap:u,height:s,flex:l,padding:c,children:[C.jsx(Se.Typography,{variant:"body2",color:r,sx:{textAlign:f,userSelect:"none",...d},noWrap:!0,children:y(e)}),typeof t=="string"||typeof t=="number"||!t&&(typeof m=="string"||typeof m=="number")?C.jsxs(Kr,{alignItems:"center",gap:"8px",children:[C.jsx(Se.Typography,{variant:"body1",color:n,sx:{textAlign:f,userSelect:"none",...h},noWrap:!0,children:t||m}),p&&C.jsx(I4,{value:t?.toString()})]}):t||m]})}function Ffe({CustomAvatarIcon:e,title:t,displayValue:r,subtitle:n}){const{t:i}=Qt(),[a]=qc(),o=a==="light"?"#e0e0e0":"#303030";return C.jsxs(Se.Paper,{sx:{borderRadius:"10px",border:"1px solid "+o,padding:"8px",gap:"8px",alignItems:"center",minWidth:"230px",display:"flex"},children:[C.jsx(Se.Avatar,{sx:{backgroundColor:"#12322f",width:"80px",height:"80px"},children:e}),C.jsxs(bo,{textAlign:"left",margin:"auto",children:[C.jsx(Se.Typography,{variant:"caption",color:"grey",sx:{margin:0,lineHeight:1},children:i(t)}),C.jsx(Se.Typography,{variant:"body1",sx:{padding:"0!important",fontSize:"2rem",margin:1,ml:0,fontWeight:600,lineHeight:1.1},children:i(r)}),typeof n=="string"?C.jsx(Se.Typography,{sx:{margin:0,lineHeight:1.2,fontSize:".75rem"},variant:"body2",children:i(n||"")}):n]})]})}function V4(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=V4(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ht(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=V4(e))&&(n&&(n+=" "),n+=t);return n}var yR={},_R={},q4;function $fe(){return q4||(q4=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t}(_R)),_R}var bR={},B4;function U4(){return B4||(B4=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){switch(typeof r){case"number":case"symbol":return!1;case"string":return r.includes(".")||r.includes("[")||r.includes("]")}}e.isDeepKey=t}(bR)),bR}var ER={},z4;function W4(){return z4||(z4=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="string"||typeof r=="symbol"?r:Object.is(r?.valueOf?.(),-0)?"-0":String(r)}e.toKey=t}(ER)),ER}var wR={},H4;function xR(){return H4||(H4=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){const n=[],i=r.length;if(i===0)return n;let a=0,o="",s="",u=!1;for(r.charCodeAt(0)===46&&(n.push(""),a++);a<i;){const l=r[a];s?l==="\\"&&a+1<i?(a++,o+=r[a]):l===s?s="":o+=l:u?l==='"'||l==="'"?s=l:l==="]"?(u=!1,n.push(o),o=""):o+=l:l==="["?(u=!0,o&&(n.push(o),o="")):l==="."?o&&(n.push(o),o=""):o+=l,a++}return o&&n.push(o),n}e.toPath=t}(wR)),wR}var G4;function SR(){return G4||(G4=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$fe(),r=U4(),n=W4(),i=xR();function a(s,u,l){if(s==null)return l;switch(typeof u){case"string":{if(t.isUnsafeProperty(u))return l;const c=s[u];return c===void 0?r.isDeepKey(u)?a(s,i.toPath(u),l):l:c}case"number":case"symbol":{typeof u=="number"&&(u=n.toKey(u));const c=s[u];return c===void 0?l:c}default:{if(Array.isArray(u))return o(s,u,l);if(Object.is(u?.valueOf(),-0)?u="-0":u=String(u),t.isUnsafeProperty(u))return l;const c=s[u];return c===void 0?l:c}}}function o(s,u,l){if(u.length===0)return l;let c=s;for(let f=0;f<u.length;f++){if(c==null||t.isUnsafeProperty(u[f]))return l;c=c[u[f]]}return c===void 0?l:c}e.get=a}(yR)),yR}var RR,K4;function Vfe(){return K4||(K4=1,RR=SR().get),RR}var qfe=Vfe();const ou=Ua(qfe);var Bfe=SS(),Cn=e=>e===0?0:e>0?1:-1,Zn=e=>typeof e=="number"&&e!=+e,ol=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,Xe=e=>(typeof e=="number"||e instanceof Number)&&!Zn(e),Ni=e=>Xe(e)||typeof e=="string",Ufe=0,ns=e=>{var t=++Ufe;return"".concat(e||"").concat(t)},fi=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Xe(t)&&typeof t!="string")return n;var a;if(ol(t)){if(r==null)return n;var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return Zn(a)&&(a=n),i&&r!=null&&a>r&&(a=r),a},Y4=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[e[n]])r[e[n]]=!0;else return!0;return!1},Fn=(e,t)=>Xe(e)&&Xe(t)?r=>e+r*(t-e):()=>t;function Bc(e,t,r){return Xe(e)&&Xe(t)?e+r*(t-e):t}function Q4(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):ou(n,t))===r)}var zfe=e=>{if(!e||!e.length)return null;for(var t=e.length,r=0,n=0,i=0,a=0,o=1/0,s=-1/0,u=0,l=0,c=0;c<t;c++)u=e[c].cx||0,l=e[c].cy||0,r+=u,n+=l,i+=u*l,a+=u*u,o=Math.min(o,u),s=Math.max(s,u);var f=t*a!==r*r?(t*i-r*n)/(t*a-r*r):0;return{xmin:o,xmax:s,a:f,b:(n-f*r)/t}},rr=e=>e===null||typeof e>"u",dh=e=>rr(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1)),Wfe=["viewBox","children"],Hfe=["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"],X4=["points","pathLength"],OR={svg:Wfe,polygon:X4,polyline:X4},AR=["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"],TR=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(K.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{AR.includes(i)&&(n[i]=a=>r[i](r,a))}),n},Gfe=(e,t,r)=>n=>(e(t,r,n),null),Uc=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var a=e[i];AR.includes(i)&&typeof a=="function"&&(n||(n={}),n[i]=Gfe(a,t,r))}),n},Z4=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",J4=null,CR=null,e6=e=>{if(e===J4&&Array.isArray(CR))return CR;var t=[];return K.Children.forEach(e,r=>{rr(r)||(Bfe.isFragment(r)?t=t.concat(e6(r.props.children)):t.push(r))}),CR=t,J4=e,t};function zc(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(i=>Z4(i)):n=[Z4(t)],e6(e).forEach(i=>{var a=ou(i,"type.displayName")||ou(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}var sm=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,Kfe=(e,t,r,n)=>{var i,a=(i=n&&OR?.[n])!==null&&i!==void 0?i:[];return t.startsWith("data-")||typeof e!="function"&&(n&&a.includes(t)||Hfe.includes(t))||r&&AR.includes(t)},xt=(e,t,r)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(K.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var i={};return Object.keys(n).forEach(a=>{var o;Kfe((o=n)===null||o===void 0?void 0:o[a],a,t,r)&&(i[a]=n[a])}),i},Yfe=["children","width","height","viewBox","className","style","title","desc"];function PR(){return PR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},PR.apply(null,arguments)}function Qfe(e,t){if(e==null)return{};var r,n,i=Xfe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Xfe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var NR=K.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:a,className:o,style:s,title:u,desc:l}=e,c=Qfe(e,Yfe),f=a||{width:n,height:i,x:0,y:0},d=Ht("recharts-surface",o);return X.createElement("svg",PR({},xt(c,!0,"svg"),{className:d,width:n,height:i,style:s,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),X.createElement("title",null,u),X.createElement("desc",null,l),r)}),Zfe=["children","className"];function DR(){return DR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},DR.apply(null,arguments)}function Jfe(e,t){if(e==null)return{};var r,n,i=ede(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ede(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var hr=X.forwardRef((e,t)=>{var{children:r,className:n}=e,i=Jfe(e,Zfe),a=Ht("recharts-layer",n);return X.createElement("g",DR({className:a},xt(i,!0),{ref:t}),r)}),t6=K.createContext(null),tde=()=>K.useContext(t6);function Mt(e){return function(){return e}}const r6=Math.abs,Jn=Math.atan2,is=Math.cos,rde=Math.max,Wc=Math.min,Di=Math.sin,Fr=Math.sqrt,ei=1e-12,su=Math.PI,um=su/2,uu=2*su;function nde(e){return e>1?0:e<-1?su:Math.acos(e)}function n6(e){return e>=1?um:e<=-1?-um:Math.asin(e)}const IR=Math.PI,kR=2*IR,sl=1e-6,ide=kR-sl;function i6(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function ade(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return i6;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}let hh=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?i6:ade(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,o){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,u=n-t,l=i-r,c=o-t,f=s-r,d=c*c+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>sl)if(!(Math.abs(f*u-l*c)>sl)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-o,m=i-s,p=u*u+l*l,g=h*h+m*m,y=Math.sqrt(p),b=Math.sqrt(d),E=a*Math.tan((IR-Math.acos((p+d-g)/(2*y*b)))/2),w=E/b,x=E/y;Math.abs(w-1)>sl&&this._append`L${t+w*c},${r+w*f}`,this._append`A${a},${a},0,0,${+(f*h>c*m)},${this._x1=t+x*u},${this._y1=r+x*l}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),u=n*Math.sin(i),l=t+s,c=r+u,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${l},${c}`:(Math.abs(this._x1-l)>sl||Math.abs(this._y1-c)>sl)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%kR+kR),d>ide?this._append`A${n},${n},0,1,${f},${t-s},${r-u}A${n},${n},0,1,${f},${this._x1=l},${this._y1=c}`:d>sl&&this._append`A${n},${n},0,${+(d>=IR)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}};function MR(){return new hh}MR.prototype=hh.prototype;function ode(e=3){return new hh(+e)}function ph(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new hh(t)}function sde(e){return e.innerRadius}function ude(e){return e.outerRadius}function lde(e){return e.startAngle}function cde(e){return e.endAngle}function fde(e){return e&&e.padAngle}function dde(e,t,r,n,i,a,o,s){var u=r-e,l=n-t,c=o-i,f=s-a,d=f*u-c*l;if(!(d*d<ei))return d=(c*(t-a)-f*(e-i))/d,[e+d*u,t+d*l]}function lm(e,t,r,n,i,a,o){var s=e-r,u=t-n,l=(o?a:-a)/Fr(s*s+u*u),c=l*u,f=-l*s,d=e+c,h=t+f,m=r+c,p=n+f,g=(d+m)/2,y=(h+p)/2,b=m-d,E=p-h,w=b*b+E*E,x=i-a,R=d*p-m*h,S=(E<0?-1:1)*Fr(rde(0,x*x*w-R*R)),j=(R*E-b*S)/w,M=(-R*b-E*S)/w,k=(R*E+b*S)/w,F=(-R*b+E*S)/w,V=j-g,P=M-y,A=k-g,I=F-y;return V*V+P*P>A*A+I*I&&(j=k,M=F),{cx:j,cy:M,x01:-c,y01:-f,x11:j*(i/x-1),y11:M*(i/x-1)}}function hde(){var e=sde,t=ude,r=Mt(0),n=null,i=lde,a=cde,o=fde,s=null,u=ph(l);function l(){var c,f,d=+e.apply(this,arguments),h=+t.apply(this,arguments),m=i.apply(this,arguments)-um,p=a.apply(this,arguments)-um,g=r6(p-m),y=p>m;if(s||(s=c=u()),h<d&&(f=h,h=d,d=f),!(h>ei))s.moveTo(0,0);else if(g>uu-ei)s.moveTo(h*is(m),h*Di(m)),s.arc(0,0,h,m,p,!y),d>ei&&(s.moveTo(d*is(p),d*Di(p)),s.arc(0,0,d,p,m,y));else{var b=m,E=p,w=m,x=p,R=g,S=g,j=o.apply(this,arguments)/2,M=j>ei&&(n?+n.apply(this,arguments):Fr(d*d+h*h)),k=Wc(r6(h-d)/2,+r.apply(this,arguments)),F=k,V=k,P,A;if(M>ei){var I=n6(M/d*Di(j)),L=n6(M/h*Di(j));(R-=I*2)>ei?(I*=y?1:-1,w+=I,x-=I):(R=0,w=x=(m+p)/2),(S-=L*2)>ei?(L*=y?1:-1,b+=L,E-=L):(S=0,b=E=(m+p)/2)}var B=h*is(b),H=h*Di(b),U=d*is(x),T=d*Di(x);if(k>ei){var D=h*is(E),O=h*Di(E),$=d*is(w),q=d*Di(w),W;if(g<su)if(W=dde(B,H,$,q,D,O,U,T)){var z=B-W[0],Y=H-W[1],Q=D-W[0],Z=O-W[1],re=1/Di(nde((z*Q+Y*Z)/(Fr(z*z+Y*Y)*Fr(Q*Q+Z*Z)))/2),ie=Fr(W[0]*W[0]+W[1]*W[1]);F=Wc(k,(d-ie)/(re-1)),V=Wc(k,(h-ie)/(re+1))}else F=V=0}S>ei?V>ei?(P=lm($,q,B,H,h,V,y),A=lm(D,O,U,T,h,V,y),s.moveTo(P.cx+P.x01,P.cy+P.y01),V<k?s.arc(P.cx,P.cy,V,Jn(P.y01,P.x01),Jn(A.y01,A.x01),!y):(s.arc(P.cx,P.cy,V,Jn(P.y01,P.x01),Jn(P.y11,P.x11),!y),s.arc(0,0,h,Jn(P.cy+P.y11,P.cx+P.x11),Jn(A.cy+A.y11,A.cx+A.x11),!y),s.arc(A.cx,A.cy,V,Jn(A.y11,A.x11),Jn(A.y01,A.x01),!y))):(s.moveTo(B,H),s.arc(0,0,h,b,E,!y)):s.moveTo(B,H),!(d>ei)||!(R>ei)?s.lineTo(U,T):F>ei?(P=lm(U,T,D,O,d,-F,y),A=lm(B,H,$,q,d,-F,y),s.lineTo(P.cx+P.x01,P.cy+P.y01),F<k?s.arc(P.cx,P.cy,F,Jn(P.y01,P.x01),Jn(A.y01,A.x01),!y):(s.arc(P.cx,P.cy,F,Jn(P.y01,P.x01),Jn(P.y11,P.x11),!y),s.arc(0,0,d,Jn(P.cy+P.y11,P.cx+P.x11),Jn(A.cy+A.y11,A.cx+A.x11),y),s.arc(A.cx,A.cy,F,Jn(A.y11,A.x11),Jn(A.y01,A.x01),!y))):s.arc(0,0,d,x,w,y)}if(s.closePath(),c)return s=null,c+""||null}return l.centroid=function(){var c=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,f=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-su/2;return[is(f)*c,Di(f)*c]},l.innerRadius=function(c){return arguments.length?(e=typeof c=="function"?c:Mt(+c),l):e},l.outerRadius=function(c){return arguments.length?(t=typeof c=="function"?c:Mt(+c),l):t},l.cornerRadius=function(c){return arguments.length?(r=typeof c=="function"?c:Mt(+c),l):r},l.padRadius=function(c){return arguments.length?(n=c==null?null:typeof c=="function"?c:Mt(+c),l):n},l.startAngle=function(c){return arguments.length?(i=typeof c=="function"?c:Mt(+c),l):i},l.endAngle=function(c){return arguments.length?(a=typeof c=="function"?c:Mt(+c),l):a},l.padAngle=function(c){return arguments.length?(o=typeof c=="function"?c:Mt(+c),l):o},l.context=function(c){return arguments.length?(s=c??null,l):s},l}var pde=Array.prototype.slice;function cm(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function a6(e){this._context=e}a6.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 Hc(e){return new a6(e)}function LR(e){return e[0]}function jR(e){return e[1]}function fm(e,t){var r=Mt(!0),n=null,i=Hc,a=null,o=ph(s);e=typeof e=="function"?e:e===void 0?LR:Mt(e),t=typeof t=="function"?t:t===void 0?jR:Mt(t);function s(u){var l,c=(u=cm(u)).length,f,d=!1,h;for(n==null&&(a=i(h=o())),l=0;l<=c;++l)!(l<c&&r(f=u[l],l,u))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(f,l,u),+t(f,l,u));if(h)return a=null,h+""||null}return s.x=function(u){return arguments.length?(e=typeof u=="function"?u:Mt(+u),s):e},s.y=function(u){return arguments.length?(t=typeof u=="function"?u:Mt(+u),s):t},s.defined=function(u){return arguments.length?(r=typeof u=="function"?u:Mt(!!u),s):r},s.curve=function(u){return arguments.length?(i=u,n!=null&&(a=i(n)),s):i},s.context=function(u){return arguments.length?(u==null?n=a=null:a=i(n=u),s):n},s}function Gc(e,t,r){var n=null,i=Mt(!0),a=null,o=Hc,s=null,u=ph(l);e=typeof e=="function"?e:e===void 0?LR:Mt(+e),t=typeof t=="function"?t:Mt(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?jR:Mt(+r);function l(f){var d,h,m,p=(f=cm(f)).length,g,y=!1,b,E=new Array(p),w=new Array(p);for(a==null&&(s=o(b=u())),d=0;d<=p;++d){if(!(d<p&&i(g=f[d],d,f))===y)if(y=!y)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),m=d-1;m>=h;--m)s.point(E[m],w[m]);s.lineEnd(),s.areaEnd()}y&&(E[d]=+e(g,d,f),w[d]=+t(g,d,f),s.point(n?+n(g,d,f):E[d],r?+r(g,d,f):w[d]))}if(b)return s=null,b+""||null}function c(){return fm().defined(i).curve(o).context(a)}return l.x=function(f){return arguments.length?(e=typeof f=="function"?f:Mt(+f),n=null,l):e},l.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Mt(+f),l):e},l.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Mt(+f),l):n},l.y=function(f){return arguments.length?(t=typeof f=="function"?f:Mt(+f),r=null,l):t},l.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Mt(+f),l):t},l.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Mt(+f),l):r},l.lineX0=l.lineY0=function(){return c().x(e).y(t)},l.lineY1=function(){return c().x(e).y(r)},l.lineX1=function(){return c().x(n).y(t)},l.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Mt(!!f),l):i},l.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),l):o},l.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),l):a},l}function vde(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function gde(e){return e}function mde(){var e=gde,t=vde,r=null,n=Mt(0),i=Mt(uu),a=Mt(0);function o(s){var u,l=(s=cm(s)).length,c,f,d=0,h=new Array(l),m=new Array(l),p=+n.apply(this,arguments),g=Math.min(uu,Math.max(-uu,i.apply(this,arguments)-p)),y,b=Math.min(Math.abs(g)/l,a.apply(this,arguments)),E=b*(g<0?-1:1),w;for(u=0;u<l;++u)(w=m[h[u]=u]=+e(s[u],u,s))>0&&(d+=w);for(t!=null?h.sort(function(x,R){return t(m[x],m[R])}):r!=null&&h.sort(function(x,R){return r(s[x],s[R])}),u=0,f=d?(g-l*E)/d:0;u<l;++u,p=y)c=h[u],w=m[c],y=p+(w>0?w*f:0)+E,m[c]={data:s[c],index:u,value:w,startAngle:p,endAngle:y,padAngle:b};return m}return o.value=function(s){return arguments.length?(e=typeof s=="function"?s:Mt(+s),o):e},o.sortValues=function(s){return arguments.length?(t=s,r=null,o):t},o.sort=function(s){return arguments.length?(r=s,t=null,o):r},o.startAngle=function(s){return arguments.length?(n=typeof s=="function"?s:Mt(+s),o):n},o.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:Mt(+s),o):i},o.padAngle=function(s){return arguments.length?(a=typeof s=="function"?s:Mt(+s),o):a},o}var o6=FR(Hc);function s6(e){this._curve=e}s6.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function FR(e){function t(r){return new s6(e(r))}return t._curve=e,t}function vh(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(r){return arguments.length?t(FR(r)):t()._curve},e}function u6(){return vh(fm().curve(o6))}function l6(){var e=Gc().curve(o6),t=e.curve,r=e.lineX0,n=e.lineX1,i=e.lineY0,a=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return vh(r())},delete e.lineX0,e.lineEndAngle=function(){return vh(n())},delete e.lineX1,e.lineInnerRadius=function(){return vh(i())},delete e.lineY0,e.lineOuterRadius=function(){return vh(a())},delete e.lineY1,e.curve=function(o){return arguments.length?t(FR(o)):t()._curve},e}function gh(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}class c6{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}class yde{constructor(t){this._context=t}lineStart(){this._point=0}lineEnd(){}point(t,r){if(t=+t,r=+r,this._point===0)this._point=1;else{const n=gh(this._x0,this._y0),i=gh(this._x0,this._y0=(this._y0+r)/2),a=gh(t,this._y0),o=gh(t,r);this._context.moveTo(...n),this._context.bezierCurveTo(...i,...a,...o)}this._x0=t,this._y0=r}}function $R(e){return new c6(e,!0)}function VR(e){return new c6(e,!1)}function _de(e){return new yde(e)}function bde(e){return e.source}function Ede(e){return e.target}function dm(e){let t=bde,r=Ede,n=LR,i=jR,a=null,o=null,s=ph(u);function u(){let l;const c=pde.call(arguments),f=t.apply(this,c),d=r.apply(this,c);if(a==null&&(o=e(l=s())),o.lineStart(),c[0]=f,o.point(+n.apply(this,c),+i.apply(this,c)),c[0]=d,o.point(+n.apply(this,c),+i.apply(this,c)),o.lineEnd(),l)return o=null,l+""||null}return u.source=function(l){return arguments.length?(t=l,u):t},u.target=function(l){return arguments.length?(r=l,u):r},u.x=function(l){return arguments.length?(n=typeof l=="function"?l:Mt(+l),u):n},u.y=function(l){return arguments.length?(i=typeof l=="function"?l:Mt(+l),u):i},u.context=function(l){return arguments.length?(l==null?a=o=null:o=e(a=l),u):a},u}function wde(){return dm($R)}function xde(){return dm(VR)}function Sde(){const e=dm(_de);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}const Rde=Fr(3),f6={draw(e,t){const r=Fr(t+Wc(t/28,.75))*.59436,n=r/2,i=n*Rde;e.moveTo(0,r),e.lineTo(0,-r),e.moveTo(-i,-n),e.lineTo(i,n),e.moveTo(-i,n),e.lineTo(i,-n)}},Kc={draw(e,t){const r=Fr(t/su);e.moveTo(r,0),e.arc(0,0,r,0,uu)}},qR={draw(e,t){const r=Fr(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},d6=Fr(1/3),Ode=d6*2,BR={draw(e,t){const r=Fr(t/Ode),n=r*d6;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},h6={draw(e,t){const r=Fr(t)*.62625;e.moveTo(0,-r),e.lineTo(r,0),e.lineTo(0,r),e.lineTo(-r,0),e.closePath()}},p6={draw(e,t){const r=Fr(t-Wc(t/7,2))*.87559;e.moveTo(-r,0),e.lineTo(r,0),e.moveTo(0,r),e.lineTo(0,-r)}},UR={draw(e,t){const r=Fr(t),n=-r/2;e.rect(n,n,r,r)}},v6={draw(e,t){const r=Fr(t)*.4431;e.moveTo(r,r),e.lineTo(r,-r),e.lineTo(-r,-r),e.lineTo(-r,r),e.closePath()}},Ade=.8908130915292852,g6=Di(su/10)/Di(7*su/10),Tde=Di(uu/10)*g6,Cde=-is(uu/10)*g6,zR={draw(e,t){const r=Fr(t*Ade),n=Tde*r,i=Cde*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=uu*a/5,s=is(o),u=Di(o);e.lineTo(u*r,-s*r),e.lineTo(s*n-u*i,u*n+s*i)}e.closePath()}},WR=Fr(3),HR={draw(e,t){const r=-Fr(t/(WR*3));e.moveTo(0,r*2),e.lineTo(-WR*r,-r),e.lineTo(WR*r,-r),e.closePath()}},Pde=Fr(3),m6={draw(e,t){const r=Fr(t)*.6824,n=r/2,i=r*Pde/2;e.moveTo(0,-r),e.lineTo(i,n),e.lineTo(-i,n),e.closePath()}},ya=-.5,_a=Fr(3)/2,GR=1/Fr(12),Nde=(GR/2+1)*3,KR={draw(e,t){const r=Fr(t/Nde),n=r/2,i=r*GR,a=n,o=r*GR+r,s=-a,u=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,u),e.lineTo(ya*n-_a*i,_a*n+ya*i),e.lineTo(ya*a-_a*o,_a*a+ya*o),e.lineTo(ya*s-_a*u,_a*s+ya*u),e.lineTo(ya*n+_a*i,ya*i-_a*n),e.lineTo(ya*a+_a*o,ya*o-_a*a),e.lineTo(ya*s+_a*u,ya*u-_a*s),e.closePath()}},YR={draw(e,t){const r=Fr(t-Wc(t/6,1.7))*.6189;e.moveTo(-r,-r),e.lineTo(r,r),e.moveTo(-r,r),e.lineTo(r,-r)}},y6=[Kc,qR,BR,UR,zR,HR,KR],Dde=[Kc,p6,YR,m6,f6,v6,h6];function _6(e,t){let r=null,n=ph(i);e=typeof e=="function"?e:Mt(e||Kc),t=typeof t=="function"?t:Mt(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:Mt(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Mt(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function lu(){}function hm(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function pm(e){this._context=e}pm.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:hm(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:hm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function b6(e){return new pm(e)}function E6(e){this._context=e}E6.prototype={areaStart:lu,areaEnd:lu,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:hm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function w6(e){return new E6(e)}function x6(e){this._context=e}x6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:hm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function S6(e){return new x6(e)}function R6(e,t){this._basis=new pm(e),this._beta=t}R6.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var n=e[0],i=t[0],a=e[r]-n,o=t[r]-i,s=-1,u;++s<=r;)u=s/r,this._basis.point(this._beta*e[s]+(1-this._beta)*(n+u*a),this._beta*t[s]+(1-this._beta)*(i+u*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Ide=function e(t){function r(n){return t===1?new pm(n):new R6(n,t)}return r.beta=function(n){return e(+n)},r}(.85);function vm(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function QR(e,t){this._context=e,this._k=(1-t)/6}QR.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:vm(this,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,this._x1=e,this._y1=t;break;case 2:this._point=3;default:vm(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const kde=function e(t){function r(n){return new QR(n,t)}return r.tension=function(n){return e(+n)},r}(0);function XR(e,t){this._context=e,this._k=(1-t)/6}XR.prototype={areaStart:lu,areaEnd:lu,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:vm(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Mde=function e(t){function r(n){return new XR(n,t)}return r.tension=function(n){return e(+n)},r}(0);function ZR(e,t){this._context=e,this._k=(1-t)/6}ZR.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=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,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:vm(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Lde=function e(t){function r(n){return new ZR(n,t)}return r.tension=function(n){return e(+n)},r}(0);function JR(e,t,r){var n=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>ei){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);n=(n*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>ei){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/c,o=(o*l+e._y1*e._l23_2a-r*e._l12_2a)/c}e._context.bezierCurveTo(n,i,a,o,e._x2,e._y2)}function O6(e,t){this._context=e,this._alpha=t}O6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}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;default:JR(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const jde=function e(t){function r(n){return t?new O6(n,t):new QR(n,0)}return r.alpha=function(n){return e(+n)},r}(.5);function A6(e,t){this._context=e,this._alpha=t}A6.prototype={areaStart:lu,areaEnd:lu,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:JR(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Fde=function e(t){function r(n){return t?new A6(n,t):new XR(n,0)}return r.alpha=function(n){return e(+n)},r}(.5);function T6(e,t){this._context=e,this._alpha=t}T6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=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){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:JR(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const $de=function e(t){function r(n){return t?new T6(n,t):new ZR(n,0)}return r.alpha=function(n){return e(+n)},r}(.5);function C6(e){this._context=e}C6.prototype={areaStart:lu,areaEnd:lu,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 P6(e){return new C6(e)}function N6(e){return e<0?-1:1}function D6(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(N6(a)+N6(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function I6(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function eO(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-n)/3;e._context.bezierCurveTo(n+s,i+s*t,a-s,o-s*r,a,o)}function gm(e){this._context=e}gm.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:eO(this,this._t0,I6(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,eO(this,I6(this,r=D6(this,e,t)),r);break;default:eO(this,this._t0,r=D6(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function k6(e){this._context=new M6(e)}(k6.prototype=Object.create(gm.prototype)).point=function(e,t){gm.prototype.point.call(this,t,e)};function M6(e){this._context=e}M6.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function L6(e){return new gm(e)}function j6(e){return new k6(e)}function F6(e){this._context=e}F6.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=$6(e),i=$6(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function $6(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function V6(e){return new F6(e)}function mm(e,t){this._context=e,this._t=t}mm.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 r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function q6(e){return new mm(e,.5)}function B6(e){return new mm(e,0)}function U6(e){return new mm(e,1)}function ul(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,s=a.length;r<o;++r)for(i=a,a=e[t[r]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function ll(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function Vde(e,t){return e[t]}function qde(e){const t=[];return t.key=e,t}function z6(){var e=Mt([]),t=ll,r=ul,n=Vde;function i(a){var o=Array.from(e.apply(this,arguments),qde),s,u=o.length,l=-1,c;for(const f of a)for(s=0,++l;s<u;++s)(o[s][l]=[0,+n(f,o[s].key,l,a)]).data=f;for(s=0,c=cm(t(o));s<u;++s)o[c[s]].index=s;return r(o,c),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:Mt(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:Mt(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?ll:typeof a=="function"?a:Mt(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??ul,i):r},i}function W6(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,o;i<a;++i){for(o=r=0;r<n;++r)o+=e[r][i][1]||0;if(o)for(r=0;r<n;++r)e[r][i][1]/=o}ul(e,t)}}function Bde(e,t){if((u=e.length)>0)for(var r,n=0,i,a,o,s,u,l=e[t[0]].length;n<l;++n)for(o=s=0,r=0;r<u;++r)(a=(i=e[t[r]][n])[1]-i[0])>0?(i[0]=o,i[1]=o+=a):a<0?(i[1]=s,i[0]=s+=a):(i[0]=0,i[1]=a)}function H6(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var o=0,s=0;o<i;++o)s+=e[o][r][1]||0;n[r][1]+=n[r][0]=-s/2}ul(e,t)}}function G6(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n<a;++n){for(var s=0,u=0,l=0;s<o;++s){for(var c=e[t[s]],f=c[n][1]||0,d=c[n-1][1]||0,h=(f-d)/2,m=0;m<s;++m){var p=e[t[m]],g=p[n][1]||0,y=p[n-1][1]||0;h+=g-y}u+=f,l+=h*f}i[n-1][1]+=i[n-1][0]=r,u&&(r-=l/u)}i[n-1][1]+=i[n-1][0]=r,ul(e,t)}}function K6(e){var t=e.map(Ude);return ll(e).sort(function(r,n){return t[r]-t[n]})}function Ude(e){for(var t=-1,r=0,n=e.length,i,a=-1/0;++t<n;)(i=+e[t][1])>a&&(a=i,r=t);return r}function Y6(e){var t=e.map(Q6);return ll(e).sort(function(r,n){return t[r]-t[n]})}function Q6(e){for(var t=0,r=-1,n=e.length,i;++r<n;)(i=+e[r][1])&&(t+=i);return t}function zde(e){return Y6(e).reverse()}function Wde(e){var t=e.length,r,n,i=e.map(Q6),a=K6(e),o=0,s=0,u=[],l=[];for(r=0;r<t;++r)n=a[r],o<s?(o+=i[n],u.push(n)):(s+=i[n],l.push(n));return l.reverse().concat(u)}function Hde(e){return ll(e).reverse()}var Gde=["type","size","sizeType"];function tO(){return tO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tO.apply(null,arguments)}function X6(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Z6(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?X6(Object(r),!0).forEach(function(n){Kde(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X6(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Kde(e,t,r){return(t=Yde(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yde(e){var t=Qde(e,"string");return typeof t=="symbol"?t:t+""}function Qde(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xde(e,t){if(e==null)return{};var r,n,i=Zde(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Zde(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var J6={symbolCircle:Kc,symbolCross:qR,symbolDiamond:BR,symbolSquare:UR,symbolStar:zR,symbolTriangle:HR,symbolWye:KR},Jde=Math.PI/180,ehe=e=>{var t="symbol".concat(dh(e));return J6[t]||Kc},the=(e,t,r)=>{if(t==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var n=18*Jde;return 1.25*e*e*(Math.tan(n)-Math.tan(n*2)*Math.tan(n)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},rhe=(e,t)=>{J6["symbol".concat(dh(e))]=t},ym=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=Xde(e,Gde),a=Z6(Z6({},i),{},{type:t,size:r,sizeType:n}),o=()=>{var f=ehe(t),d=_6().type(f).size(the(r,n,t));return d()},{className:s,cx:u,cy:l}=a,c=xt(a,!0);return u===+u&&l===+l&&r===+r?X.createElement("path",tO({},c,{className:Ht("recharts-symbols",s),transform:"translate(".concat(u,", ").concat(l,")"),d:o()})):null};ym.registerSymbol=rhe;function rO(){return rO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rO.apply(null,arguments)}function eF(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nhe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eF(Object(r),!0).forEach(function(n){nO(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eF(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nO(e,t,r){return(t=ihe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ihe(e){var t=ahe(e,"string");return typeof t=="symbol"?t:t+""}function ahe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ba=32;class iO extends K.PureComponent{renderIcon(t,r){var{inactiveColor:n}=this.props,i=ba/2,a=ba/6,o=ba/3,s=t.inactive?n:t.color,u=r??t.type;if(u==="none")return null;if(u==="plainline")return X.createElement("line",{strokeWidth:4,fill:"none",stroke:s,strokeDasharray:t.payload.strokeDasharray,x1:0,y1:i,x2:ba,y2:i,className:"recharts-legend-icon"});if(u==="line")return X.createElement("path",{strokeWidth:4,fill:"none",stroke:s,d:"M0,".concat(i,"h").concat(o,`
|
|
73
73
|
A`).concat(a,",").concat(a,",0,1,1,").concat(2*o,",").concat(i,`
|
|
74
74
|
H`).concat(ba,"M").concat(2*o,",").concat(i,`
|
|
75
75
|
A`).concat(a,",").concat(a,",0,1,1,").concat(o,",").concat(i),className:"recharts-legend-icon"});if(u==="rect")return X.createElement("path",{stroke:"none",fill:s,d:"M0,".concat(ba/8,"h").concat(ba,"v").concat(ba*3/4,"h").concat(-ba,"z"),className:"recharts-legend-icon"});if(X.isValidElement(t.legendIcon)){var l=nhe({},t);return delete l.legendIcon,X.cloneElement(t.legendIcon,l)}return X.createElement(ym,{fill:s,cx:i,cy:i,size:ba,sizeType:"diameter",type:u})}renderItems(){var{payload:t,iconSize:r,layout:n,formatter:i,inactiveColor:a,iconType:o}=this.props,s={x:0,y:0,width:ba,height:ba},u={display:n==="horizontal"?"inline-block":"block",marginRight:10},l={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((c,f)=>{var d=c.formatter||i,h=Ht({"recharts-legend-item":!0,["legend-item-".concat(f)]:!0,inactive:c.inactive});if(c.type==="none")return null;var m=c.inactive?a:c.color,p=d?d(c.value,c,f):c.value;return X.createElement("li",rO({className:h,style:u,key:"legend-item-".concat(f)},Uc(this.props,c,f)),X.createElement(NR,{width:r,height:r,viewBox:s,style:l,"aria-label":"".concat(p," legend icon")},this.renderIcon(c,o)),X.createElement("span",{className:"recharts-legend-item-text",style:{color:m}},p))})}render(){var{payload:t,layout:r,align:n}=this.props;if(!t||!t.length)return null;var i={padding:0,margin:0,textAlign:r==="horizontal"?n:"left"};return X.createElement("ul",{className:"recharts-default-legend",style:i},this.renderItems())}}nO(iO,"displayName","Legend"),nO(iO,"defaultProps",{align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle"});var aO={},oO={},tF;function ohe(){return tF||(tF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){const i=new Map;for(let a=0;a<r.length;a++){const o=r[a],s=n(o);i.has(s)||i.set(s,o)}return Array.from(i.values())}e.uniqBy=t}(oO)),oO}var sO={},rF;function nF(){return rF||(rF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t}(sO)),sO}var uO={},lO={},cO={},iF;function she(){return iF||(iF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t}(cO)),cO}var aF;function fO(){return aF||(aF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=she();function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r}(lO)),lO}var dO={},oF;function uhe(){return oF||(oF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t}(dO)),dO}var sF;function lhe(){return sF||(sF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=fO(),r=uhe();function n(i){return r.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=n}(uO)),uO}var hO={},pO={},uF;function che(){return uF||(uF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=SR();function r(n){return function(i){return t.get(i,n)}}e.property=r}(pO)),pO}var vO={},gO={},mO={},yO={},lF;function cF(){return lF||(lF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r!==null&&(typeof r=="object"||typeof r=="function")}e.isObject=t}(yO)),yO}var _O={},fF;function dF(){return fF||(fF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null||typeof r!="object"&&typeof r!="function"}e.isPrimitive=t}(_O)),_O}var bO={},hF;function EO(){return hF||(hF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return r===n||Number.isNaN(r)&&Number.isNaN(n)}e.eq=t}(bO)),bO}var pF;function fhe(){return pF||(pF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=wO(),r=cF(),n=dF(),i=EO();function a(f,d,h){return typeof h!="function"?t.isMatch(f,d):o(f,d,function m(p,g,y,b,E,w){const x=h(p,g,y,b,E,w);return x!==void 0?!!x:o(p,g,m,w)},new Map)}function o(f,d,h,m){if(d===f)return!0;switch(typeof d){case"object":return s(f,d,h,m);case"function":return Object.keys(d).length>0?o(f,{...d},h,m):i.eq(f,d);default:return r.isObject(f)?typeof d=="string"?d==="":!0:i.eq(f,d)}}function s(f,d,h,m){if(d==null)return!0;if(Array.isArray(d))return l(f,d,h,m);if(d instanceof Map)return u(f,d,h,m);if(d instanceof Set)return c(f,d,h,m);const p=Object.keys(d);if(f==null)return p.length===0;if(p.length===0)return!0;if(m&&m.has(d))return m.get(d)===f;m&&m.set(d,f);try{for(let g=0;g<p.length;g++){const y=p[g];if(!n.isPrimitive(f)&&!(y in f)||d[y]===void 0&&f[y]!==void 0||d[y]===null&&f[y]!==null||!h(f[y],d[y],y,f,d,m))return!1}return!0}finally{m&&m.delete(d)}}function u(f,d,h,m){if(d.size===0)return!0;if(!(f instanceof Map))return!1;for(const[p,g]of d.entries()){const y=f.get(p);if(h(y,g,p,f,d,m)===!1)return!1}return!0}function l(f,d,h,m){if(d.length===0)return!0;if(!Array.isArray(f))return!1;const p=new Set;for(let g=0;g<d.length;g++){const y=d[g];let b=!1;for(let E=0;E<f.length;E++){if(p.has(E))continue;const w=f[E];let x=!1;if(h(w,y,g,f,d,m)&&(x=!0),x){p.add(E),b=!0;break}}if(!b)return!1}return!0}function c(f,d,h,m){return d.size===0?!0:f instanceof Set?l([...f],[...d],h,m):!1}e.isMatchWith=a,e.isSetMatch=c}(mO)),mO}var vF;function wO(){return vF||(vF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=fhe();function r(n,i){return t.isMatchWith(n,i,()=>{})}e.isMatch=r}(gO)),gO}var xO={},SO={},RO={},gF;function mF(){return gF||(gF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Object.getOwnPropertySymbols(r).filter(n=>Object.prototype.propertyIsEnumerable.call(r,n))}e.getSymbols=t}(RO)),RO}var OO={},yF;function AO(){return yF||(yF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}e.getTag=t}(OO)),OO}var TO={},_F;function CO(){return _F||(_F=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",r="[object String]",n="[object Number]",i="[object Boolean]",a="[object Arguments]",o="[object Symbol]",s="[object Date]",u="[object Map]",l="[object Set]",c="[object Array]",f="[object Function]",d="[object ArrayBuffer]",h="[object Object]",m="[object Error]",p="[object DataView]",g="[object Uint8Array]",y="[object Uint8ClampedArray]",b="[object Uint16Array]",E="[object Uint32Array]",w="[object BigUint64Array]",x="[object Int8Array]",R="[object Int16Array]",S="[object Int32Array]",j="[object BigInt64Array]",M="[object Float32Array]",k="[object Float64Array]";e.argumentsTag=a,e.arrayBufferTag=d,e.arrayTag=c,e.bigInt64ArrayTag=j,e.bigUint64ArrayTag=w,e.booleanTag=i,e.dataViewTag=p,e.dateTag=s,e.errorTag=m,e.float32ArrayTag=M,e.float64ArrayTag=k,e.functionTag=f,e.int16ArrayTag=R,e.int32ArrayTag=S,e.int8ArrayTag=x,e.mapTag=u,e.numberTag=n,e.objectTag=h,e.regexpTag=t,e.setTag=l,e.stringTag=r,e.symbolTag=o,e.uint16ArrayTag=b,e.uint32ArrayTag=E,e.uint8ArrayTag=g,e.uint8ClampedArrayTag=y}(TO)),TO}var PO={},bF;function dhe(){return bF||(bF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t}(PO)),PO}var EF;function wF(){return EF||(EF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=mF(),r=AO(),n=CO(),i=dF(),a=dhe();function o(c,f){return s(c,void 0,c,new Map,f)}function s(c,f,d,h=new Map,m=void 0){const p=m?.(c,f,d,h);if(p!=null)return p;if(i.isPrimitive(c))return c;if(h.has(c))return h.get(c);if(Array.isArray(c)){const g=new Array(c.length);h.set(c,g);for(let y=0;y<c.length;y++)g[y]=s(c[y],y,d,h,m);return Object.hasOwn(c,"index")&&(g.index=c.index),Object.hasOwn(c,"input")&&(g.input=c.input),g}if(c instanceof Date)return new Date(c.getTime());if(c instanceof RegExp){const g=new RegExp(c.source,c.flags);return g.lastIndex=c.lastIndex,g}if(c instanceof Map){const g=new Map;h.set(c,g);for(const[y,b]of c)g.set(y,s(b,y,d,h,m));return g}if(c instanceof Set){const g=new Set;h.set(c,g);for(const y of c)g.add(s(y,void 0,d,h,m));return g}if(typeof Buffer<"u"&&Buffer.isBuffer(c))return c.subarray();if(a.isTypedArray(c)){const g=new(Object.getPrototypeOf(c)).constructor(c.length);h.set(c,g);for(let y=0;y<c.length;y++)g[y]=s(c[y],y,d,h,m);return g}if(c instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&c instanceof SharedArrayBuffer)return c.slice(0);if(c instanceof DataView){const g=new DataView(c.buffer.slice(0),c.byteOffset,c.byteLength);return h.set(c,g),u(g,c,d,h,m),g}if(typeof File<"u"&&c instanceof File){const g=new File([c],c.name,{type:c.type});return h.set(c,g),u(g,c,d,h,m),g}if(c instanceof Blob){const g=new Blob([c],{type:c.type});return h.set(c,g),u(g,c,d,h,m),g}if(c instanceof Error){const g=new c.constructor;return h.set(c,g),g.message=c.message,g.name=c.name,g.stack=c.stack,g.cause=c.cause,u(g,c,d,h,m),g}if(typeof c=="object"&&l(c)){const g=Object.create(Object.getPrototypeOf(c));return h.set(c,g),u(g,c,d,h,m),g}return c}function u(c,f,d=c,h,m){const p=[...Object.keys(f),...t.getSymbols(f)];for(let g=0;g<p.length;g++){const y=p[g],b=Object.getOwnPropertyDescriptor(c,y);(b==null||b.writable)&&(c[y]=s(f[y],y,d,h,m))}}function l(c){switch(r.getTag(c)){case n.argumentsTag:case n.arrayTag:case n.arrayBufferTag:case n.dataViewTag:case n.booleanTag:case n.dateTag:case n.float32ArrayTag:case n.float64ArrayTag:case n.int8ArrayTag:case n.int16ArrayTag:case n.int32ArrayTag:case n.mapTag:case n.numberTag:case n.objectTag:case n.regexpTag:case n.setTag:case n.stringTag:case n.symbolTag:case n.uint8ArrayTag:case n.uint8ClampedArrayTag:case n.uint16ArrayTag:case n.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=o,e.cloneDeepWithImpl=s,e.copyProperties=u}(SO)),SO}var xF;function hhe(){return xF||(xF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=wF();function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r}(xO)),xO}var SF;function phe(){return SF||(SF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=wO(),r=hhe();function n(i){return i=r.cloneDeep(i),a=>t.isMatch(a,i)}e.matches=n}(vO)),vO}var NO={},DO={},IO={},RF;function vhe(){return RF||(RF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=wF(),r=CO();function n(i,a){return t.cloneDeepWith(i,(o,s,u,l)=>{const c=a?.(o,s,u,l);if(c!=null)return c;if(typeof i=="object")switch(Object.prototype.toString.call(i)){case r.numberTag:case r.stringTag:case r.booleanTag:{const f=new i.constructor(i?.valueOf());return t.copyProperties(f,i),f}case r.argumentsTag:{const f={};return t.copyProperties(f,i),f.length=i.length,f[Symbol.iterator]=i[Symbol.iterator],f}default:return}})}e.cloneDeepWith=n}(IO)),IO}var OF;function ghe(){return OF||(OF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=vhe();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r}(DO)),DO}var kO={},MO={},AF;function TF(){return AF||(AF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function r(n,i=Number.MAX_SAFE_INTEGER){switch(typeof n){case"number":return Number.isInteger(n)&&n>=0&&n<i;case"symbol":return!1;case"string":return t.test(n)}}e.isIndex=r}(MO)),MO}var LO={},CF;function mhe(){return CF||(CF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=AO();function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r}(LO)),LO}var PF;function yhe(){return PF||(PF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=U4(),r=TF(),n=mhe(),i=xR();function a(o,s){let u;if(Array.isArray(s)?u=s:typeof s=="string"&&t.isDeepKey(s)&&o?.[s]==null?u=i.toPath(s):u=[s],u.length===0)return!1;let l=o;for(let c=0;c<u.length;c++){const f=u[c];if((l==null||!Object.hasOwn(l,f))&&!((Array.isArray(l)||n.isArguments(l))&&r.isIndex(f)&&f<l.length))return!1;l=l[f]}return!0}e.has=a}(kO)),kO}var NF;function _he(){return NF||(NF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=wO(),r=W4(),n=ghe(),i=SR(),a=yhe();function o(s,u){switch(typeof s){case"object":{Object.is(s?.valueOf(),-0)&&(s="-0");break}case"number":{s=r.toKey(s);break}}return u=n.cloneDeep(u),function(l){const c=i.get(l,s);return c===void 0?a.has(l,s):u===void 0?c===void 0:t.isMatch(c,u)}}e.matchesProperty=o}(NO)),NO}var DF;function bhe(){return DF||(DF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nF(),r=che(),n=phe(),i=_he();function a(o){if(o==null)return t.identity;switch(typeof o){case"function":return o;case"object":return Array.isArray(o)&&o.length===2?i.matchesProperty(o[0],o[1]):n.matches(o);case"string":case"symbol":case"number":return r.property(o)}}e.iteratee=a}(hO)),hO}var IF;function Ehe(){return IF||(IF=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ohe(),r=nF(),n=lhe(),i=bhe();function a(o,s=r.identity){return n.isArrayLikeObject(o)?t.uniqBy(Array.from(o),i.iteratee(s)):[]}e.uniqBy=a}(aO)),aO}var jO,kF;function whe(){return kF||(kF=1,jO=Ehe().uniqBy),jO}var xhe=whe();const MF=Ua(xhe);function LF(e,t,r){return t===!0?MF(e,r):typeof t=="function"?MF(e,t):e}var _m={exports:{}},FO={},bm={exports:{}},$O={};/**
|
|
@@ -258,7 +258,7 @@ Valid keys: `+JSON.stringify(Object.keys(T),null," "));var ee=ie(Y,re,q,W,z+"."
|
|
|
258
258
|
C268.103,7.763,253.549,0,236.836,0c-3.938,0-7.872,0.101-11.817,0.292c-11.649,0.583-23.073,2.016-34.225,4.215v191.531\r
|
|
259
259
|
L66.808,72.055c-7.618,7.861-14.704,16.237-21.189,25.089l79.313,79.313l20.291,20.284H3.448C1.227,209.784,0,223.164,0,236.844\r
|
|
260
260
|
c0,17.034,1.84,33.626,5.25,49.643h184.834L70.847,405.724c7.808,7.67,16.121,14.813,24.921,21.349l95.023-95.023v137.116\r
|
|
261
|
-
c11.151,2.199,22.583,3.631,34.232,4.215c3.938,0.191,7.872,0.299,11.81,0.299C253.549,473.68,268.103,465.917,280.545,452.432z`})]});function K4e({size:e=24,color:t="currentColor"}){return C.jsx(Se.SvgIcon,{children:C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",version:"1.1",width:e,height:e,viewBox:"0 0 24 24",fill:t,children:C.jsx("path",{d:"M4,6H6V18H4V6M7,6H8V18H7V6M9,6H12V18H9V6M13,6H14V18H13V6M16,6H18V18H16V6M19,6H20V18H19V6M2,4V8H0V4A2,2 0 0,1 2,2H6V4H2M22,2A2,2 0 0,1 24,4V8H22V4H18V2H22M2,16V20H6V22H2A2,2 0 0,1 0,20V16H2M22,20V16H24V20A2,2 0 0,1 22,22H18V20H22Z"})})})}const{slice:Y4e,forEach:Q4e}=[];function X4e(e){return Q4e.call(Y4e.call(arguments,1),t=>{if(t)for(const r in t)e[r]===void 0&&(e[r]=t[r])}),e}function Z4e(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(r=>r.test(e))}const UQ=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,J4e=function(e,t){const n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(t);let a=`${e}=${i}`;if(n.maxAge>0){const o=n.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");a+=`; Max-Age=${Math.floor(o)}`}if(n.domain){if(!UQ.test(n.domain))throw new TypeError("option domain is invalid");a+=`; Domain=${n.domain}`}if(n.path){if(!UQ.test(n.path))throw new TypeError("option path is invalid");a+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(a+="; HttpOnly"),n.secure&&(a+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(a+="; Partitioned"),a},zQ={create(e,t,r,n){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+r*60*1e3)),n&&(i.domain=n),document.cookie=J4e(e,t,i)},read(e){const t=`${e}=`,r=document.cookie.split(";");for(let n=0;n<r.length;n++){let i=r[n];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return i.substring(t.length,i.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var e6e={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return zQ.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:r,cookieMinutes:n,cookieDomain:i,cookieOptions:a}=t;r&&typeof document<"u"&&zQ.create(r,e,n,i,a)}},t6e={name:"querystring",lookup(e){let{lookupQuerystring:t}=e,r;if(typeof window<"u"){let{search:n}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));const a=n.substring(1).split("&");for(let o=0;o<a.length;o++){const s=a[o].indexOf("=");s>0&&a[o].substring(0,s)===t&&(r=a[o].substring(s+1))}}return r}},r6e={name:"hash",lookup(e){let{lookupHash:t,lookupFromHashIndex:r}=e,n;if(typeof window<"u"){const{hash:i}=window.location;if(i&&i.length>2){const a=i.substring(1);if(t){const o=a.split("&");for(let s=0;s<o.length;s++){const u=o[s].indexOf("=");u>0&&o[s].substring(0,u)===t&&(n=o[s].substring(u+1))}}if(n)return n;if(!n&&r>-1){const o=i.match(/\/([a-zA-Z-]*)/g);return Array.isArray(o)?o[typeof r=="number"?r:0]?.replace("/",""):void 0}}}return n}};let hd=null;const WQ=()=>{if(hd!==null)return hd;try{if(hd=typeof window<"u"&&window.localStorage!==null,!hd)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{hd=!1}return hd};var n6e={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&WQ())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:r}=t;r&&WQ()&&window.localStorage.setItem(r,e)}};let pd=null;const HQ=()=>{if(pd!==null)return pd;try{if(pd=typeof window<"u"&&window.sessionStorage!==null,!pd)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{pd=!1}return pd};var i6e={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&HQ())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:r}=t;r&&HQ()&&window.sessionStorage.setItem(r,e)}},a6e={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:r,userLanguage:n,language:i}=navigator;if(r)for(let a=0;a<r.length;a++)t.push(r[a]);n&&t.push(n),i&&t.push(i)}return t.length>0?t:void 0}},o6e={name:"htmlTag",lookup(e){let{htmlTag:t}=e,r;const n=t||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(r=n.getAttribute("lang")),r}},s6e={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?r[typeof t=="number"?t:0]?.replace("/",""):void 0}},u6e={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const r=typeof t=="number"?t+1:1,n=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[r]}};let GQ=!1;try{document.cookie,GQ=!0}catch{}const KQ=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];GQ||KQ.splice(1,1);const l6e=()=>({order:KQ,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class YQ{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,r)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=X4e(r,this.options||{},l6e()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(e6e),this.addDetector(t6e),this.addDetector(n6e),this.addDetector(i6e),this.addDetector(a6e),this.addDetector(o6e),this.addDetector(s6e),this.addDetector(u6e),this.addDetector(r6e)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,r=[];return t.forEach(n=>{if(this.detectors[n]){let i=this.detectors[n].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(r=r.concat(i))}}),r=r.filter(n=>n!=null&&!Z4e(n)).map(n=>this.options.convertDetectedLanguage(n)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||r.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(t,this.options)}))}}YQ.type="languageDetector";const c6e=e=>{let t={};for(const n of Object.keys(e)){const i=n.match(/\w+\.json/);if(i){const a=i[0]?.split(".")[0];t={...t,[a]:{translation:e[n]}}}}const r=Object.keys(t);return hn.use(YQ).use(Ete).init({resources:t,fallbackLng:"en",interpolation:{escapeValue:!1},supportedLngs:r,missingKeyHandler:function(n,i,a){console.warn(`MISSING TRANSLATION: [${n}] ${i}:${a}`)}}),hn};function QQ({children:e}){return C.jsx(Kr,{paddingBottom:"16px",gap:"8px",children:e})}function XQ({children:e}){return C.jsx(Gd,{mt:"auto",mb:"auto",width:"100%",children:C.jsx(Se.Paper,{sx:{width:"100%"},children:C.jsx(Kr,{height:"70px",flexDirection:"row",alignItems:"center",gap:"16px",padding:"16px",children:e})})})}function ZQ({tabValue:e,columnValues:t,columnWidths:r}){const{t:n}=Qt();return C.jsx(Se.Paper,{sx:{display:"grid",gridTemplateColumns:r?.[e]??[],padding:"0.5rem",fontWeight:"bold",position:"sticky",textAlign:"center",zIndex:10,top:0,border:"none",gap:"8px"},children:t[e].map((i,a)=>C.jsx(Se.Typography,{children:C.jsx("b",{children:n(i)})},a))})}function f6e({InnerHeaderContent:e,TableHeaderContent:t,FirstTabContent:r,SecondTabContent:n,ThirdTabContent:i,tabValue:a,columnValues:o,columnWidths:s,FirstTabNearbyContent:u,SecondTabNearbyContent:l,ThirdTabNearbyContent:c}){return C.jsxs(Ju,{gap:"16px",children:[C.jsx(XQ,{children:e}),C.jsxs(OS,{gap:"16px",children:[C.jsxs(Se.Paper,{sx:{padding:"16px",overflow:"hidden",flexGrow:2,minWidth:u&&a===0||l&&a===1||c&&a===2?"70%":"unset",maxWidth:u&&a===0||l&&a===1||c&&a===2?"70%":"unset"},children:[C.jsx(QQ,{children:t}),C.jsxs(Ju,{children:[C.jsx(ZQ,{columnValues:o,columnWidths:s,tabValue:a}),C.jsx(Se.Divider,{sx:{marginBottom:"16px"}}),C.jsxs(Ju,{gap:"16px",overflow:"auto",paddingTop:0,sx:{scrollbarWidth:"none",paddingBottom:"72px"},children:[a===0?C.jsx(r,{}):null,a===1?C.jsx(n,{}):null,a===2&&i?C.jsx(i,{}):null]})]})]}),a===0&&u?C.jsx(Se.Paper,{sx:{padding:"16px",overflow:"hidden",flexGrow:1},children:u}):null,a===1&&l?C.jsx(Se.Paper,{sx:{padding:"16px",flexGrow:1,overflow:"hidden"},children:l}):null,a===2&&c?C.jsx(Se.Paper,{sx:{padding:"16px",flexGrow:1,overflow:"hidden"},children:c}):null]})]})}function d6e({children:e,position:t}){return C.jsx(J5e,{maxSnack:3,autoHideDuration:3e3,anchorOrigin:{vertical:"bottom",horizontal:t??"center"},preventDuplicate:!0,Components:{default:cv,info:cv,success:cv,error:cv,warning:cv},children:e})}const no={};function h6e(e,t){return{name:"vite-plugin-graphql-rewrite",enforce:"pre",resolveId(r,n){if(r.endsWith(".graphql")){const i=no.resolve(r),a=no.basename(i);if(!n.includes(t))return no.resolve(e,"graphQL","__generated__",`${a}.ts`);const o=no.resolve(__dirname,".."),s=n.slice(o.length).split("/")[1];return no.resolve(o,s,"__generated__",`${a}.ts`)}return null}}}function p6e(e,t){return{name:"vite-plugin-graphql-rewrite-build",enforce:"pre",resolveId(r,n){if(r.endsWith(".graphql")){const i=no.resolve(r),a=no.basename(i),o=no.resolve(e,".."),s=no.resolve(o,t,"__generated__",`${a}.ts`);return console.log("corepath",t),console.log("reporoot",o),console.log("fileproject",s),console.log("importer",n),n.includes(t)?no.resolve(o,t,"__generated__",`${a}.ts`):no.resolve(e,"graphQL","__generated__",`${a}.ts`)}return null}}}var vd=Wt(),v6e=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},oc="1.9.0",JQ=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function g6e(e){var t=new Set([e]),r=new Set,n=e.match(JQ);if(!n)return function(){return!1};var i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null)return function(u){return u===e};function a(s){return r.add(s),!1}function o(s){return t.add(s),!0}return function(u){if(t.has(u))return!0;if(r.has(u))return!1;var l=u.match(JQ);if(!l)return a(u);var c={major:+l[1],minor:+l[2],patch:+l[3],prerelease:l[4]};return c.prerelease!=null||i.major!==c.major?a(u):i.major===0?i.minor===c.minor&&i.patch<=c.patch?o(u):a(u):i.minor<=c.minor?o(u):a(u)}}var m6e=g6e(oc),y6e=oc.split(".")[0],fv=Symbol.for("opentelemetry.js.api."+y6e),dv=v6e;function hv(e,t,r,n){var i;n===void 0&&(n=!1);var a=dv[fv]=(i=dv[fv])!==null&&i!==void 0?i:{version:oc};if(!n&&a[e]){var o=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return r.error(o.stack||o.message),!1}if(a.version!==oc){var o=new Error("@opentelemetry/api: Registration of version v"+a.version+" for "+e+" does not match previously registered API v"+oc);return r.error(o.stack||o.message),!1}return a[e]=t,r.debug("@opentelemetry/api: Registered a global for "+e+" v"+oc+"."),!0}function sc(e){var t,r,n=(t=dv[fv])===null||t===void 0?void 0:t.version;if(!(!n||!m6e(n)))return(r=dv[fv])===null||r===void 0?void 0:r[e]}function pv(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+oc+".");var r=dv[fv];r&&delete r[e]}var _6e=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a},b6e=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},E6e=function(){function e(t){this._namespace=t.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return vv("debug",this._namespace,t)},e.prototype.error=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return vv("error",this._namespace,t)},e.prototype.info=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return vv("info",this._namespace,t)},e.prototype.warn=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return vv("warn",this._namespace,t)},e.prototype.verbose=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return vv("verbose",this._namespace,t)},e}();function vv(e,t,r){var n=sc("diag");if(n)return r.unshift(t),n[e].apply(n,b6e([],_6e(r),!1))}var sa;(function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"})(sa||(sa={}));function w6e(e,t){e<sa.NONE?e=sa.NONE:e>sa.ALL&&(e=sa.ALL),t=t||{};function r(n,i){var a=t[n];return typeof a=="function"&&e>=i?a.bind(t):function(){}}return{error:r("error",sa.ERROR),warn:r("warn",sa.WARN),info:r("info",sa.INFO),debug:r("debug",sa.DEBUG),verbose:r("verbose",sa.VERBOSE)}}var x6e=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a},S6e=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},R6e="diag",zo=function(){function e(){function t(i){return function(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];var s=sc("diag");if(s)return s[i].apply(s,S6e([],x6e(a),!1))}}var r=this,n=function(i,a){var o,s,u;if(a===void 0&&(a={logLevel:sa.INFO}),i===r){var l=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return r.error((o=l.stack)!==null&&o!==void 0?o:l.message),!1}typeof a=="number"&&(a={logLevel:a});var c=sc("diag"),f=w6e((s=a.logLevel)!==null&&s!==void 0?s:sa.INFO,i);if(c&&!a.suppressOverrideMessage){var d=(u=new Error().stack)!==null&&u!==void 0?u:"<failed to generate stacktrace>";c.warn("Current logger will be overwritten from "+d),f.warn("Current logger will overwrite one already registered from "+d)}return hv("diag",f,r,!0)};r.setLogger=n,r.disable=function(){pv(R6e,r)},r.createComponentLogger=function(i){return new E6e(i)},r.verbose=t("verbose"),r.debug=t("debug"),r.info=t("info"),r.warn=t("warn"),r.error=t("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}(),O6e=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a},A6e=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},T6e=function(){function e(t){this._entries=t?new Map(t):new Map}return e.prototype.getEntry=function(t){var r=this._entries.get(t);if(r)return Object.assign({},r)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(t){var r=O6e(t,2),n=r[0],i=r[1];return[n,i]})},e.prototype.setEntry=function(t,r){var n=new e(this._entries);return n._entries.set(t,r),n},e.prototype.removeEntry=function(t){var r=new e(this._entries);return r._entries.delete(t),r},e.prototype.removeEntries=function(){for(var t,r,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var a=new e(this._entries);try{for(var o=A6e(n),s=o.next();!s.done;s=o.next()){var u=s.value;a._entries.delete(u)}}catch(l){t={error:l}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return a},e.prototype.clear=function(){return new e},e}(),C6e=Symbol("BaggageEntryMetadata"),P6e=zo.instance();function N6e(e){return e===void 0&&(e={}),new T6e(new Map(Object.entries(e)))}function D6e(e){return typeof e!="string"&&(P6e.error("Cannot create baggage metadata from unknown type: "+typeof e),e=""),{__TYPE__:C6e,toString:function(){return e}}}function pD(e){return Symbol.for(e)}var I6e=function(){function e(t){var r=this;r._currentContext=t?new Map(t):new Map,r.getValue=function(n){return r._currentContext.get(n)},r.setValue=function(n,i){var a=new e(r._currentContext);return a._currentContext.set(n,i),a},r.deleteValue=function(n){var i=new e(r._currentContext);return i._currentContext.delete(n),i}}return e}(),Ms=new I6e,uc=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),k6e=function(){function e(){}return e.prototype.createGauge=function(t,r){return z6e},e.prototype.createHistogram=function(t,r){return W6e},e.prototype.createCounter=function(t,r){return U6e},e.prototype.createUpDownCounter=function(t,r){return H6e},e.prototype.createObservableGauge=function(t,r){return K6e},e.prototype.createObservableCounter=function(t,r){return G6e},e.prototype.createObservableUpDownCounter=function(t,r){return Y6e},e.prototype.addBatchObservableCallback=function(t,r){},e.prototype.removeBatchObservableCallback=function(t){},e}(),lb=function(){function e(){}return e}(),M6e=function(e){uc(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(r,n){},t}(lb),L6e=function(e){uc(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(r,n){},t}(lb),j6e=function(e){uc(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(r,n){},t}(lb),F6e=function(e){uc(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(r,n){},t}(lb),vD=function(){function e(){}return e.prototype.addCallback=function(t){},e.prototype.removeCallback=function(t){},e}(),$6e=function(e){uc(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(vD),V6e=function(e){uc(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(vD),q6e=function(e){uc(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(vD),B6e=new k6e,U6e=new M6e,z6e=new j6e,W6e=new F6e,H6e=new L6e,G6e=new $6e,K6e=new V6e,Y6e=new q6e,Q6e={get:function(e,t){if(e!=null)return e[t]},keys:function(e){return e==null?[]:Object.keys(e)}},X6e={set:function(e,t,r){e!=null&&(e[t]=r)}},Z6e=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a},J6e=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},eFe=function(){function e(){}return e.prototype.active=function(){return Ms},e.prototype.with=function(t,r,n){for(var i=[],a=3;a<arguments.length;a++)i[a-3]=arguments[a];return r.call.apply(r,J6e([n],Z6e(i),!1))},e.prototype.bind=function(t,r){return r},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}(),tFe=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a},rFe=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},gD="context",nFe=new eFe,cb=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(t){return hv(gD,t,zo.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(t,r,n){for(var i,a=[],o=3;o<arguments.length;o++)a[o-3]=arguments[o];return(i=this._getContextManager()).with.apply(i,rFe([t,r,n],tFe(a),!1))},e.prototype.bind=function(t,r){return this._getContextManager().bind(t,r)},e.prototype._getContextManager=function(){return sc(gD)||nFe},e.prototype.disable=function(){this._getContextManager().disable(),pv(gD,zo.instance())},e}(),Ls;(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(Ls||(Ls={}));var eX="0000000000000000",tX="00000000000000000000000000000000",rX={traceId:tX,spanId:eX,traceFlags:Ls.NONE},gv=function(){function e(t){t===void 0&&(t=rX),this._spanContext=t}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(t,r){return this},e.prototype.setAttributes=function(t){return this},e.prototype.addEvent=function(t,r){return this},e.prototype.addLink=function(t){return this},e.prototype.addLinks=function(t){return this},e.prototype.setStatus=function(t){return this},e.prototype.updateName=function(t){return this},e.prototype.end=function(t){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(t,r){},e}(),mD=pD("OpenTelemetry Context Key SPAN");function yD(e){return e.getValue(mD)||void 0}function iFe(){return yD(cb.getInstance().active())}function _D(e,t){return e.setValue(mD,t)}function aFe(e){return e.deleteValue(mD)}function oFe(e,t){return _D(e,new gv(t))}function nX(e){var t;return(t=yD(e))===null||t===void 0?void 0:t.spanContext()}var sFe=/^([0-9a-f]{32})$/i,uFe=/^[0-9a-f]{16}$/i;function iX(e){return sFe.test(e)&&e!==tX}function lFe(e){return uFe.test(e)&&e!==eX}function fb(e){return iX(e.traceId)&&lFe(e.spanId)}function cFe(e){return new gv(e)}var bD=cb.getInstance(),aX=function(){function e(){}return e.prototype.startSpan=function(t,r,n){n===void 0&&(n=bD.active());var i=!!r?.root;if(i)return new gv;var a=n&&nX(n);return fFe(a)&&fb(a)?new gv(a):new gv},e.prototype.startActiveSpan=function(t,r,n,i){var a,o,s;if(!(arguments.length<2)){arguments.length===2?s=r:arguments.length===3?(a=r,s=n):(a=r,o=n,s=i);var u=o??bD.active(),l=this.startSpan(t,a,u),c=_D(u,l);return bD.with(c,s,void 0,l)}},e}();function fFe(e){return typeof e=="object"&&typeof e.spanId=="string"&&typeof e.traceId=="string"&&typeof e.traceFlags=="number"}var dFe=new aX,hFe=function(){function e(t,r,n,i){this._provider=t,this.name=r,this.version=n,this.options=i}return e.prototype.startSpan=function(t,r,n){return this._getTracer().startSpan(t,r,n)},e.prototype.startActiveSpan=function(t,r,n,i){var a=this._getTracer();return Reflect.apply(a.startActiveSpan,a,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateTracer(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):dFe},e}(),pFe=function(){function e(){}return e.prototype.getTracer=function(t,r,n){return new aX},e}(),vFe=new pFe,oX=function(){function e(){}return e.prototype.getTracer=function(t,r,n){var i;return(i=this.getDelegateTracer(t,r,n))!==null&&i!==void 0?i:new hFe(this,t,r,n)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:vFe},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateTracer=function(t,r,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(t,r,n)},e}(),db;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(db||(db={}));var hb;(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(hb||(hb={}));var lc;(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(lc||(lc={}));var zn=cb.getInstance(),vr=zo.instance(),gFe=function(){function e(){}return e.prototype.getMeter=function(t,r,n){return B6e},e}(),mFe=new gFe,ED="metrics",yFe=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalMeterProvider=function(t){return hv(ED,t,zo.instance())},e.prototype.getMeterProvider=function(){return sc(ED)||mFe},e.prototype.getMeter=function(t,r,n){return this.getMeterProvider().getMeter(t,r,n)},e.prototype.disable=function(){pv(ED,zo.instance())},e}(),sX=yFe.getInstance(),_Fe=function(){function e(){}return e.prototype.inject=function(t,r){},e.prototype.extract=function(t,r){return t},e.prototype.fields=function(){return[]},e}(),wD=pD("OpenTelemetry Baggage Key");function uX(e){return e.getValue(wD)||void 0}function bFe(){return uX(cb.getInstance().active())}function EFe(e,t){return e.setValue(wD,t)}function wFe(e){return e.deleteValue(wD)}var xD="propagation",xFe=new _Fe,SFe=function(){function e(){this.createBaggage=N6e,this.getBaggage=uX,this.getActiveBaggage=bFe,this.setBaggage=EFe,this.deleteBaggage=wFe}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(t){return hv(xD,t,zo.instance())},e.prototype.inject=function(t,r,n){return n===void 0&&(n=X6e),this._getGlobalPropagator().inject(t,r,n)},e.prototype.extract=function(t,r,n){return n===void 0&&(n=Q6e),this._getGlobalPropagator().extract(t,r,n)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){pv(xD,zo.instance())},e.prototype._getGlobalPropagator=function(){return sc(xD)||xFe},e}(),Wo=SFe.getInstance(),SD="trace",RFe=function(){function e(){this._proxyTracerProvider=new oX,this.wrapSpanContext=cFe,this.isSpanContextValid=fb,this.deleteSpan=aFe,this.getSpan=yD,this.getActiveSpan=iFe,this.getSpanContext=nX,this.setSpan=_D,this.setSpanContext=oFe}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(t){var r=hv(SD,this._proxyTracerProvider,zo.instance());return r&&this._proxyTracerProvider.setDelegate(t),r},e.prototype.getTracerProvider=function(){return sc(SD)||this._proxyTracerProvider},e.prototype.getTracer=function(t,r){return this.getTracerProvider().getTracer(t,r)},e.prototype.disable=function(){pv(SD,zo.instance()),this._proxyTracerProvider=new oX},e}(),Si=RFe.getInstance();function Bi(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function cc(e){return Bi(e)==="object"}function OFe(e){return Array.isArray(e)&&e.length>0&&e.every(t=>"message"in t)}function lX(e,t){return e.length<124?e:t}const AFe="graphql-transport-ws";var Da=(e=>(e[e.InternalServerError=4500]="InternalServerError",e[e.InternalClientError=4005]="InternalClientError",e[e.BadRequest=4400]="BadRequest",e[e.BadResponse=4004]="BadResponse",e[e.Unauthorized=4401]="Unauthorized",e[e.Forbidden=4403]="Forbidden",e[e.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",e[e.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",e[e.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",e[e.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",e[e.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",e))(Da||{}),Ia=(e=>(e.ConnectionInit="connection_init",e.ConnectionAck="connection_ack",e.Ping="ping",e.Pong="pong",e.Subscribe="subscribe",e.Next="next",e.Error="error",e.Complete="complete",e))(Ia||{});function cX(e){if(!cc(e))throw new Error(`Message is expected to be an object, but got ${Bi(e)}`);if(!e.type)throw new Error("Message is missing the 'type' property");if(typeof e.type!="string")throw new Error(`Message is expects the 'type' property to be a string, but got ${Bi(e.type)}`);switch(e.type){case"connection_init":case"connection_ack":case"ping":case"pong":{if(e.payload!=null&&!cc(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break}case"subscribe":{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${Bi(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!cc(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${Bi(e.payload)}`);if(typeof e.payload.query!="string")throw new Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${Bi(e.payload.query)}`);if(e.payload.variables!=null&&!cc(e.payload.variables))throw new Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${Bi(e.payload.variables)}`);if(e.payload.operationName!=null&&Bi(e.payload.operationName)!=="string")throw new Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${Bi(e.payload.operationName)}`);if(e.payload.extensions!=null&&!cc(e.payload.extensions))throw new Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${Bi(e.payload.extensions)}`);break}case"next":{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${Bi(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!cc(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${Bi(e.payload)}`);break}case"error":{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${Bi(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!OFe(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break}case"complete":{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${Bi(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);break}default:throw new Error(`Invalid message 'type' property "${e.type}"`)}return e}function TFe(e,t){return cX(typeof e=="string"?JSON.parse(e,t):e)}function mv(e,t){return cX(e),JSON.stringify(e,t)}function CFe(e){const{url:t,connectionParams:r,lazy:n=!0,onNonLazyError:i=console.error,lazyCloseTimeout:a=0,keepAlive:o=0,disablePong:s,connectionAckWaitTimeout:u=0,retryAttempts:l=5,retryWait:c=async function(I){const L=Math.pow(2,I);await new Promise(B=>setTimeout(B,L*1e3+Math.floor(Math.random()*2700+300)))},shouldRetry:f=RD,on:d,webSocketImpl:h,generateID:m=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,I=>{const L=Math.random()*16|0;return(I=="x"?L:L&3|8).toString(16)})},jsonMessageReplacer:p,jsonMessageReviver:g}=e;let y;if(h){if(!NFe(h))throw new Error("Invalid WebSocket implementation provided");y=h}else typeof WebSocket<"u"?y=WebSocket:typeof global<"u"?y=global.WebSocket||global.MozWebSocket:typeof window<"u"&&(y=window.WebSocket||window.MozWebSocket);if(!y)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const b=y,E=(()=>{const A=(()=>{const L={};return{on(B,H){return L[B]=H,()=>{delete L[B]}},emit(B){"id"in B&&L[B.id]?.(B)}}})(),I={connecting:d?.connecting?[d.connecting]:[],opened:d?.opened?[d.opened]:[],connected:d?.connected?[d.connected]:[],ping:d?.ping?[d.ping]:[],pong:d?.pong?[d.pong]:[],message:d?.message?[A.emit,d.message]:[A.emit],closed:d?.closed?[d.closed]:[],error:d?.error?[d.error]:[]};return{onMessage:A.on,on(L,B){const H=I[L];return H.push(B),()=>{H.splice(H.indexOf(B),1)}},emit(L,...B){for(const H of[...I[L]])H(...B)}}})();function w(A){const I=[E.on("error",L=>{I.forEach(B=>B()),A(L)}),E.on("closed",L=>{I.forEach(B=>B()),A(L)})]}let x,R=0,S,j=!1,M=0,k=!1;async function F(){clearTimeout(S);const[A,I]=await(x??(x=new Promise((H,U)=>(async()=>{if(j){if(await c(M),!R)return x=void 0,U({code:1e3,reason:"All Subscriptions Gone"});M++}E.emit("connecting",j);const T=new b(typeof t=="function"?await t():t,AFe);let D,O;function $(){isFinite(o)&&o>0&&(clearTimeout(O),O=setTimeout(()=>{T.readyState===b.OPEN&&(T.send(mv({type:Ia.Ping})),E.emit("ping",!1,void 0))},o))}w(W=>{x=void 0,clearTimeout(D),clearTimeout(O),U(W),W instanceof fX&&(T.close(4499,"Terminated"),T.onerror=null,T.onclose=null)}),T.onerror=W=>E.emit("error",W),T.onclose=W=>E.emit("closed",W),T.onopen=async()=>{try{E.emit("opened",T);const W=typeof r=="function"?await r():r;if(T.readyState!==b.OPEN)return;T.send(mv(W?{type:Ia.ConnectionInit,payload:W}:{type:Ia.ConnectionInit},p)),isFinite(u)&&u>0&&(D=setTimeout(()=>{T.close(Da.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},u)),$()}catch(W){E.emit("error",W),T.close(Da.InternalClientError,lX(W instanceof Error?W.message:String(W),"Internal client error"))}};let q=!1;T.onmessage=({data:W})=>{try{const z=TFe(W,g);if(E.emit("message",z),z.type==="ping"||z.type==="pong"){E.emit(z.type,!0,z.payload),z.type==="pong"?$():s||(T.send(mv(z.payload?{type:Ia.Pong,payload:z.payload}:{type:Ia.Pong})),E.emit("pong",!1,z.payload));return}if(q)return;if(z.type!==Ia.ConnectionAck)throw new Error(`First message cannot be of type ${z.type}`);clearTimeout(D),q=!0,E.emit("connected",T,z.payload,j),j=!1,M=0,H([T,new Promise((Y,Q)=>w(Q))])}catch(z){T.onmessage=null,E.emit("error",z),T.close(Da.BadResponse,lX(z instanceof Error?z.message:String(z),"Bad response"))}}})())));A.readyState===b.CLOSING&&await I;let L=()=>{};const B=new Promise(H=>L=H);return[A,L,Promise.race([B.then(()=>{if(!R){const H=()=>A.close(1e3,"Normal Closure");isFinite(a)&&a>0?S=setTimeout(()=>{A.readyState===b.OPEN&&H()},a):H()}}),I])]}function V(A){if(RD(A)&&(PFe(A.code)||[Da.InternalServerError,Da.InternalClientError,Da.BadRequest,Da.BadResponse,Da.Unauthorized,Da.SubprotocolNotAcceptable,Da.SubscriberAlreadyExists,Da.TooManyInitialisationRequests].includes(A.code)))throw A;if(k)return!1;if(RD(A)&&A.code===1e3)return R>0;if(!l||M>=l||!f(A))throw A;return j=!0}n||(async()=>{for(R++;;)try{const[,,A]=await F();await A}catch(A){try{if(!V(A))return}catch(I){return i?.(I)}}})();function P(A,I){const L=m(A);let B=!1,H=!1,U=()=>{R--,B=!0};return(async()=>{for(R++;;)try{const[T,D,O]=await F();if(B)return D();const $=E.onMessage(L,q=>{switch(q.type){case Ia.Next:{I.next(q.payload);return}case Ia.Error:{H=!0,B=!0,I.error(q.payload),U();return}case Ia.Complete:{B=!0,U();return}}});T.send(mv({id:L,type:Ia.Subscribe,payload:A},p)),U=()=>{!B&&T.readyState===b.OPEN&&T.send(mv({id:L,type:Ia.Complete},p)),R--,B=!0,D()},await O.finally($);return}catch(T){if(!V(T))return}})().then(()=>{H||I.complete()}).catch(T=>{I.error(T)}),()=>{B||U()}}return{on:E.on,subscribe:P,iterate(A){const I=[],L={done:!1,error:null,resolve:()=>{}},B=P(A,{next(U){I.push(U),L.resolve()},error(U){L.done=!0,L.error=U,L.resolve()},complete(){L.done=!0,L.resolve()}}),H=async function*(){for(;;){for(I.length||await new Promise(T=>L.resolve=T);I.length;)yield I.shift();if(L.error)throw L.error;if(L.done)return}}();return H.throw=async U=>(L.done||(L.done=!0,L.error=U,L.resolve()),{done:!0,value:void 0}),H.return=async()=>(B(),{done:!0,value:void 0}),H},async dispose(){if(k=!0,x){const[A]=await x;A.close(1e3,"Normal Closure")}},terminate(){x&&E.emit("closed",new fX)}}}class fX extends Error{name="TerminatedCloseEvent";message="4499: Terminated";code=4499;reason="Terminated";wasClean=!1}function RD(e){return cc(e)&&"code"in e&&"reason"in e}function PFe(e){return[1e3,1001,1006,1005,1012,1013,1014].includes(e)?!1:e>=1e3&&e<=1999}function NFe(e){return typeof e=="function"&&"constructor"in e&&"CLOSED"in e&&"CLOSING"in e&&"CONNECTING"in e&&"OPEN"in e}const DFe=e=>CFe({url:e.API_URL}),IFe=(e,t,r)=>vd.Observable.create(n=>DFe(r).subscribe({operationName:e.name,query:e.text,variables:t},n)),kFe=(e,t,r)=>vd.Observable.from(zn.with(zn.active(),()=>{const n=Si.getTracer("RelayNetwork").startSpan("GraphQL fetch");n.setAttribute("variables",JSON.stringify(t)),n.setAttribute("path",e.name);const i=n.spanContext();return fetch(r.API_URL,{method:"POST",headers:{"Content-Type":"application/json",traceparent:`00-${i.traceId}-${i.spanId}-01`,...localStorage.getItem("token")?{authorization:localStorage.getItem("token")}:{},"x-auth-scheme":r.AUTH_SCHEMA,...r.CUSTOM_HEADERS},body:JSON.stringify({query:e.text,variables:t}),...r.AUTH_SCHEMA==="Cookies"?{credentials:"include"}:{}}).then(a=>a.json().then(o=>(o.errors?(n.setStatus({code:lc.ERROR}),n.recordException(JSON.stringify(o.errors))):n.setStatus({code:lc.OK}),o))).catch(a=>{n.setStatus({code:lc.ERROR}),n.recordException(JSON.stringify(a))}).finally(()=>n.end())})),MFe=e=>{const t=e.id;return t!==null&&typeof t!="string"?String(t):t};function dX(e){return new vd.Environment({network:vd.Network.create((t,r)=>kFe(t,r,e),(t,r)=>IFe(t,r,e)),store:new vd.Store(new vd.RecordSource),getDataID:MFe})}function LFe({children:e}){const t=Og();return C.jsx(X9.RelayEnvironmentProvider,{environment:dX(t),children:e})}const jFe=(e,t,r)=>{const n=[];for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)){const a=e[i],o=i.match(/pages\/(?!core)(.*)\/index\.ts?$/);if(!o)continue;const s=o[1],u=Object.keys(t).find(y=>y.includes(`${s}/loader.ts`)),l=Object.keys(r).find(y=>y.includes(`${s}/action.ts`)),c=s.match(/\[(.+)\]/)?s.replace(/\[(.+)\]/,"$1/:data"):s.replace(/\/index/,""),f=s==="index"?"/":`${c.toLowerCase()}`,d=K.lazy(a),h=K.lazy(async()=>({default:(await a()).icon||ite})),m=u?t[u].default:void 0,p=l?r[l].default:void 0,g={id:f,Icon:h,name:c,path:f,element:C.jsx(K.Suspense,{fallback:C.jsx(Sg,{}),children:C.jsx(d,{})}),...u?{loader:m}:{},...l?{action:p}:{}};n.push(g)}return n};var hX=(e=>(e[e.Container=1]="Container",e[e.File=2]="File",e[e.Rad=3]="Rad",e))(hX||{});const yv={},pX=(e,t)=>e.unstable_is?e.unstable_is(t):t===e,vX=e=>"init"in e,OD=e=>!!e.write,gX=e=>"v"in e||"e"in e,pb=e=>{if("e"in e)throw e.e;if((yv?"production":void 0)!=="production"&&!("v"in e))throw new Error("[Bug] atom state is not initialized");return e.v},vb=new WeakMap,mX=e=>{var t;return gb(e)&&!!((t=vb.get(e))!=null&&t[0])},FFe=e=>{const t=vb.get(e);t?.[0]&&(t[0]=!1,t[1].forEach(r=>r()))},$Fe=(e,t)=>{let r=vb.get(e);if(!r){r=[!0,new Set],vb.set(e,r);const n=()=>{r[0]=!1};e.then(n,n)}r[1].add(t)},gb=e=>typeof e?.then=="function",yX=(e,t,r)=>{r.p.has(e)||(r.p.add(e),t.then(()=>{r.p.delete(e)},()=>{r.p.delete(e)}))},AD=(e,t,r)=>{const n=r(e),i="v"in n,a=n.v;if(gb(t))for(const o of n.d.keys())yX(e,t,r(o));n.v=t,delete n.e,(!i||!Object.is(a,n.v))&&(++n.n,gb(a)&&FFe(a))},_X=(e,t,r)=>{var n;const i=new Set;for(const a of((n=r.get(e))==null?void 0:n.t)||[])r.has(a)&&i.add(a);for(const a of t.p)i.add(a);return i},VFe=()=>{const e=new Set,t=()=>{e.forEach(r=>r())};return t.add=r=>(e.add(r),()=>{e.delete(r)}),t},TD=()=>{const e={},t=new WeakMap,r=n=>{var i,a;(i=t.get(e))==null||i.forEach(o=>o(n)),(a=t.get(n))==null||a.forEach(o=>o())};return r.add=(n,i)=>{const a=n||e,o=(t.has(a)?t:t.set(a,new Set)).get(a);return o.add(i),()=>{o?.delete(i),o.size||t.delete(a)}},r},qFe=e=>(e.c||(e.c=TD()),e.m||(e.m=TD()),e.u||(e.u=TD()),e.f||(e.f=VFe()),e),BFe=Symbol(),bX=(e=new WeakMap,t=new WeakMap,r=new WeakMap,n=new Set,i=new Set,a=new Set,o={},s=(d,...h)=>d.read(...h),u=(d,...h)=>d.write(...h),l=(d,h)=>{var m;return(m=d.unstable_onInit)==null?void 0:m.call(d,h)},c=(d,h)=>{var m;return(m=d.onMount)==null?void 0:m.call(d,h)},...f)=>{const d=f[0]||(S=>{if((yv?"production":void 0)!=="production"&&!S)throw new Error("Atom is undefined or null");let j=e.get(S);return j||(j={d:new Map,p:new Set,n:0},e.set(S,j),l?.(S,R)),j}),h=f[1]||(()=>{const S=[],j=M=>{try{M()}catch(k){S.push(k)}};do{o.f&&j(o.f);const M=new Set,k=M.add.bind(M);n.forEach(F=>{var V;return(V=t.get(F))==null?void 0:V.l.forEach(k)}),n.clear(),a.forEach(k),a.clear(),i.forEach(k),i.clear(),M.forEach(j),n.size&&m()}while(n.size||a.size||i.size);if(S.length)throw new AggregateError(S)}),m=f[2]||(()=>{const S=[],j=new WeakSet,M=new WeakSet,k=Array.from(n);for(;k.length;){const F=k[k.length-1],V=d(F);if(M.has(F)){k.pop();continue}if(j.has(F)){if(r.get(F)===V.n)S.push([F,V]);else if((yv?"production":void 0)!=="production"&&r.has(F))throw new Error("[Bug] invalidated atom exists");M.add(F),k.pop();continue}j.add(F);for(const P of _X(F,V,t))j.has(P)||k.push(P)}for(let F=S.length-1;F>=0;--F){const[V,P]=S[F];let A=!1;for(const I of P.d.keys())if(I!==V&&n.has(I)){A=!0;break}A&&(p(V),b(V)),r.delete(V)}}),p=f[3]||(S=>{var j;const M=d(S);if(gX(M)&&(t.has(S)&&r.get(S)!==M.n||Array.from(M.d).every(([B,H])=>p(B).n===H)))return M;M.d.clear();let k=!0;const F=()=>{t.has(S)&&(b(S),m(),h())},V=B=>{var H;if(pX(S,B)){const T=d(B);if(!gX(T))if(vX(B))AD(B,B.init,d);else throw new Error("no atom init");return pb(T)}const U=p(B);try{return pb(U)}finally{M.d.set(B,U.n),mX(M.v)&&yX(S,M.v,U),(H=t.get(B))==null||H.t.add(S),k||F()}};let P,A;const I={get signal(){return P||(P=new AbortController),P.signal},get setSelf(){return(yv?"production":void 0)!=="production"&&!OD(S)&&console.warn("setSelf function cannot be used with read-only atom"),!A&&OD(S)&&(A=(...B)=>{if((yv?"production":void 0)!=="production"&&k&&console.warn("setSelf function cannot be called in sync"),!k)try{return y(S,...B)}finally{m(),h()}}),A}},L=M.n;try{const B=s(S,V,I);return AD(S,B,d),gb(B)&&($Fe(B,()=>P?.abort()),B.then(F,F)),M}catch(B){return delete M.v,M.e=B,++M.n,M}finally{k=!1,L!==M.n&&r.get(S)===L&&(r.set(S,M.n),n.add(S),(j=o.c)==null||j.call(o,S))}}),g=f[4]||(S=>{const j=[S];for(;j.length;){const M=j.pop(),k=d(M);for(const F of _X(M,k,t)){const V=d(F);r.set(F,V.n),j.push(F)}}}),y=f[5]||((S,...j)=>{let M=!0;const k=V=>pb(p(V)),F=(V,...P)=>{var A;const I=d(V);try{if(pX(S,V)){if(!vX(V))throw new Error("atom not writable");const L=I.n,B=P[0];AD(V,B,d),b(V),L!==I.n&&(n.add(V),(A=o.c)==null||A.call(o,V),g(V));return}else return y(V,...P)}finally{M||(m(),h())}};try{return u(S,k,F,...j)}finally{M=!1}}),b=f[6]||(S=>{var j;const M=d(S),k=t.get(S);if(k&&!mX(M.v)){for(const[F,V]of M.d)if(!k.d.has(F)){const P=d(F);E(F).t.add(S),k.d.add(F),V!==P.n&&(n.add(F),(j=o.c)==null||j.call(o,F),g(F))}for(const F of k.d||[])if(!M.d.has(F)){k.d.delete(F);const V=w(F);V?.t.delete(S)}}}),E=f[7]||(S=>{var j;const M=d(S);let k=t.get(S);if(!k){p(S);for(const F of M.d.keys())E(F).t.add(S);if(k={l:new Set,d:new Set(M.d.keys()),t:new Set},t.set(S,k),(j=o.m)==null||j.call(o,S),OD(S)){const F=()=>{let V=!0;const P=(...A)=>{try{return y(S,...A)}finally{V||(m(),h())}};try{const A=c(S,P);A&&(k.u=()=>{V=!0;try{A()}finally{V=!1}})}finally{V=!1}};i.add(F)}}return k}),w=f[8]||(S=>{var j;const M=d(S);let k=t.get(S);if(k&&!k.l.size&&!Array.from(k.t).some(F=>{var V;return(V=t.get(F))==null?void 0:V.d.has(S)})){k.u&&a.add(k.u),k=void 0,t.delete(S),(j=o.u)==null||j.call(o,S);for(const F of M.d.keys()){const V=w(F);V?.t.delete(S)}return}return k}),x=[e,t,r,n,i,a,o,s,u,l,c,d,h,m,p,g,y,b,E,w],R={get:S=>pb(p(S)),set:(S,...j)=>{try{return y(S,...j)}finally{m(),h()}},sub:(S,j)=>{const k=E(S).l;return k.add(j),h(),()=>{k.delete(j),w(S),h()}}};return Object.defineProperty(R,BFe,{value:x}),R},UFe=qFe,CD={};let zFe=0;function WFe(e,t){const r=`atom${++zFe}`,n={toString(){return(CD?"production":void 0)!=="production"&&this.debugLabel?r+":"+this.debugLabel:r}};return typeof e=="function"?n.read=e:(n.init=e,n.read=HFe,n.write=GFe),n}function HFe(e){return e(this)}function GFe(e,t,r){return t(this,typeof r=="function"?r(e(this)):r)}const KFe=()=>{let e=0;const t=UFe({}),r=new WeakMap,n=new WeakMap,i=bX(r,n,void 0,void 0,void 0,void 0,t,void 0,(s,u,l,...c)=>e?l(s,...c):s.write(u,l,...c)),a=new Set;return t.m.add(void 0,s=>{a.add(s);const u=r.get(s);u.m=n.get(s)}),t.u.add(void 0,s=>{a.delete(s);const u=r.get(s);delete u.m}),Object.assign(i,{dev4_get_internal_weak_map:()=>(console.log("Deprecated: Use devstore from the devtools library"),r),dev4_get_mounted_atoms:()=>a,dev4_restore_atoms:s=>{const u={read:()=>null,write:(l,c)=>{++e;try{for(const[f,d]of s)"init"in f&&c(f,d)}finally{--e}}};i.set(u)}})};function YFe(){return(CD?"production":void 0)!=="production"?KFe():bX()}let _v;function QFe(){return _v||(_v=YFe(),(CD?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=_v),globalThis.__JOTAI_DEFAULT_STORE__!==_v&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),_v}function XFe(){return{createState:e=>{const t=WFe(e),r=QFe();return{get:()=>r.get(t),set:n=>r.set(t,n),subscribe:n=>{const i=()=>{const a=r.get(t);n(a)};return r.sub(t,i)}}},type:"jotaiAdapter"}}function ZFe(){return{createState:e=>{const t=Qce({key:`recoilAtom_${Math.random()}`,default:e});return{get:()=>(console.log("Getting value from Recoil atom"),Xce(t)),set:a=>{console.log("Setting value to Recoil atom"),Zce(t)(a)},subscribe:a=>(console.log("Subscribing to Recoil atom"),Jce(({snapshot:s})=>()=>{const u=s.getLoadable(t).contents;a(u)}))}},type:"recoilAdapter"}}function EX(){return K.createContext([!1,{}])}function JFe({timer:e,children:t}){const r=Q5(e),n=EX();return C.jsx(n.Provider,{value:r,children:t})}const wX={palette:{greyCustom:{main:"#787474",light:"#f8f4f4",dark:"#464646"}},components:{MuiButton:{defaultProps:{variant:"contained",disableElevation:!0},styleOverrides:{root:{borderRadius:"24px",textTransform:"capitalize",fontSize:"1rem"}}},MuiOutlinedInput:{styleOverrides:{root:{borderRadius:"12px"}},defaultProps:{style:{borderRadius:"12px"}}},MuiSelect:{defaultProps:{IconComponent:ate}},MuiFilledInput:{defaultProps:{sx:{backgroundColor:"rgba(255,255,255,0.3)",borderRadius:"12px","&:hover::before":{border:"unset!important"},"&::before":{borderBottom:"unset"},"&::after":{borderBottom:"unset"}}}},MuiTextField:{defaultProps:{fullWidth:!0,variant:"outlined"}},MuiFormControl:{defaultProps:{fullWidth:!0,variant:"outlined"}},MuiPaper:{defaultProps:{variant:"outlined"},styleOverrides:{root:{borderRadius:"18px",backgroundImage:"unset",transition:"all 0.5s ease-in-out"}}},MuiCheckbox:{defaultProps:{color:"primary"}},MuiTypography:{defaultProps:{variant:"body1"}}},typography:{fontFamily:"Manrope"}},e8e={light:e=>ck.deepmerge({...wX,...e},{palette:{primary:{main:"#00796b",border:"rgba(0, 0, 0, 0.12)"},mode:"light",background:{default:"#fafafa"}}}),dark:e=>ck.deepmerge({...wX,...e},{palette:{primary:{main:"#009f93",border:"rgba(255, 255, 255, 0.12)"},mode:"dark",background:{default:"#111111",paper:"#171717"}}})};function t8e({children:e,theme:t}){const[r]=qc();return C.jsx(Se.ThemeProvider,{theme:Se.createTheme(e8e[r](t)),children:e})}const r8e=(e,t,r)=>{if(!od(e))return;const n=new Date(e);switch(r){case"milliseconds":n.setMilliseconds(n.getMilliseconds()+t);break;case"seconds":n.setSeconds(n.getSeconds()+t);break;case"minutes":n.setMinutes(n.getMinutes()+t);break;case"hours":n.setHours(n.getHours()+t);break;case"days":n.setDate(n.getDate()+t);break;case"weeks":n.setDate(n.getDate()+t*7);break;case"months":n.setMonth(n.getMonth()+t);break;case"years":n.setFullYear(n.getFullYear()+t);break;default:throw new Error(`Unsupported time unit: ${r}`)}return n};var xX=(e=>(e[e.days=86400]="days",e[e.hours=3600]="hours",e[e.minutes=6e4]="minutes",e[e.seconds=1e3]="seconds",e[e.milliseconds=1]="milliseconds",e))(xX||{});const n8e=(e,t,r="milliseconds")=>{if(!od(e)||!od(t))return;const n=new Date(e).getTime();return(new Date(t).getTime()-n)/xX[r]},i8e=e=>{if(e==null)return"";const t=Math.floor(e/(3600*24)),r=Math.floor(e%(3600*24)/3600),n=Math.floor(e%3600/60),i=e%60;return[t?`${t}d`:"",r?`${r}h`:"",n?`${n}min`:"",i?`${i}sec`:""].filter(Boolean).join(" ")},a8e=(e,t,r)=>{if(!od(e))throw new Error("Invalid Date");const n=new Date(e);switch(r){case"milliseconds":n.setMilliseconds(n.getMilliseconds()-t);break;case"seconds":n.setSeconds(n.getSeconds()-t);break;case"minutes":n.setMinutes(n.getMinutes()-t);break;case"hours":n.setHours(n.getHours()-t);break;case"days":n.setDate(n.getDate()-t);break;case"weeks":n.setDate(n.getDate()-t*7);break;case"months":n.setMonth(n.getMonth()-t);break;case"years":n.setFullYear(n.getFullYear()-t);break;default:throw new Error(`Unsupported time unit: ${r}`)}return n},o8e=(e,t)=>e<=1?12:Math.floor(12/t),s8e=(e,t)=>(e&t)===t;function u8e(e){const t={};function r(n){Object.prototype.hasOwnProperty.call(n,"edges")&&(t.edges=n.edges);for(const i in n)typeof n[i]=="object"&&n[i]!==null&&r(n[i])}return r(e),t}const l8e=(e,t)=>{if(e==null)return 0;if(isNaN(e))return e;const r=[...Array(t)].reduce(n=>n+"0",".");return e.toFixed(t).toString().replace(r,"")},SX=pD("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function c8e(e){return e.setValue(SX,!0)}function PD(e){return e.getValue(SX)===!0}const f8e="=",ND=";",DD=",",ID="baggage",d8e=180,h8e=4096,p8e=8192;function v8e(e){return e.reduce((t,r)=>{const n=`${t}${t!==""?DD:""}${r}`;return n.length>p8e?t:n},"")}function g8e(e){return e.getAllEntries().map(([t,r])=>{let n=`${encodeURIComponent(t)}=${encodeURIComponent(r.value)}`;return r.metadata!==void 0&&(n+=ND+r.metadata.toString()),n})}function m8e(e){const t=e.split(ND);if(t.length<=0)return;const r=t.shift();if(!r)return;const n=r.indexOf(f8e);if(n<=0)return;const i=decodeURIComponent(r.substring(0,n).trim()),a=decodeURIComponent(r.substring(n+1).trim());let o;return t.length>0&&(o=D6e(t.join(ND))),{key:i,value:a,metadata:o}}class y8e{inject(t,r,n){const i=Wo.getBaggage(t);if(!i||PD(t))return;const a=g8e(i).filter(s=>s.length<=h8e).slice(0,d8e),o=v8e(a);o.length>0&&n.set(r,ID,o)}extract(t,r,n){const i=n.get(r,ID),a=Array.isArray(i)?i.join(DD):i;if(!a)return t;const o={};return a.length===0||(a.split(DD).forEach(u=>{const l=m8e(u);if(l){const c={value:l.value};l.metadata&&(c.metadata=l.metadata),o[l.key]=c}}),Object.entries(o).length===0)?t:Wo.setBaggage(t,Wo.createBaggage(o))}fields(){return[ID]}}function mb(e){const t={};if(typeof e!="object"||e==null)return t;for(const[r,n]of Object.entries(e)){if(!_8e(r)){vr.warn(`Invalid attribute key: ${r}`);continue}if(!RX(n)){vr.warn(`Invalid attribute value set for key: ${r}`);continue}Array.isArray(n)?t[r]=n.slice():t[r]=n}return t}function _8e(e){return typeof e=="string"&&e.length>0}function RX(e){return e==null?!0:Array.isArray(e)?b8e(e):OX(e)}function b8e(e){let t;for(const r of e)if(r!=null){if(!t){if(OX(r)){t=typeof r;continue}return!1}if(typeof r!==t)return!1}return!0}function OX(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}function E8e(){return e=>{vr.error(w8e(e))}}function w8e(e){return typeof e=="string"?e:JSON.stringify(x8e(e))}function x8e(e){const t={};let r=e;for(;r!==null;)Object.getOwnPropertyNames(r).forEach(n=>{if(t[n])return;const i=r[n];i&&(t[n]=String(i))}),r=Object.getPrototypeOf(r);return t}let S8e=E8e();function kD(e){try{S8e(e)}catch{}}function GGe(e){}const MD=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},gd=performance,R8e="2.0.1",O8e="error.type",LD="exception.message",A8e="exception.stacktrace",jD="exception.type",T8e="http.request.method",C8e="http.request.method_original",P8e="http.response.status_code",N8e="server.address",D8e="server.port",AX="service.name",FD="telemetry.sdk.language",I8e="webjs",$D="telemetry.sdk.name",VD="telemetry.sdk.version",k8e="url.full",M8e="process.runtime.name",qD={[$D]:"opentelemetry",[M8e]:"browser",[FD]:I8e,[VD]:R8e},L8e=9,j8e=Math.pow(10,6),yb=Math.pow(10,L8e);function js(e){const t=e/1e3,r=Math.trunc(t),n=Math.round(e%1e3*j8e);return[r,n]}function BD(){let e=gd.timeOrigin;if(typeof e!="number"){const t=gd;e=t.timing&&t.timing.fetchStart}return e}function _b(e){const t=js(BD()),r=js(typeof e=="number"?e:gd.now());return PX(t,r)}function bv(e){if(UD(e))return e;if(typeof e=="number")return e<BD()?_b(e):js(e);if(e instanceof Date)return js(e.getTime());throw TypeError("Invalid input type")}function F8e(e,t){let r=t[0]-e[0],n=t[1]-e[1];return n<0&&(r-=1,n+=yb),[r,n]}function Fs(e){return e[0]*yb+e[1]}function TX(e){return e[0]*1e6+e[1]/1e3}function UD(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}function CX(e){return UD(e)||typeof e=="number"||e instanceof Date}function PX(e,t){const r=[e[0]+t[0],e[1]+t[1]];return r[1]>=yb&&(r[1]-=yb,r[0]+=1),r}var io;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(io||(io={}));class $8e{_propagators;_fields;constructor(t={}){this._propagators=t.propagators??[],this._fields=Array.from(new Set(this._propagators.map(r=>typeof r.fields=="function"?r.fields():[]).reduce((r,n)=>r.concat(n),[])))}inject(t,r,n){for(const i of this._propagators)try{i.inject(t,r,n)}catch(a){vr.warn(`Failed to inject with ${i.constructor.name}. Err: ${a.message}`)}}extract(t,r,n){return this._propagators.reduce((i,a)=>{try{return a.extract(i,r,n)}catch(o){vr.warn(`Failed to extract with ${a.constructor.name}. Err: ${o.message}`)}return i},t)}fields(){return this._fields.slice()}}const zD="[_0-9a-z-*/]",V8e=`[a-z]${zD}{0,255}`,q8e=`[a-z0-9]${zD}{0,240}@[a-z]${zD}{0,13}`,B8e=new RegExp(`^(?:${V8e}|${q8e})$`),U8e=/^[ -~]{0,255}[!-~]$/,z8e=/,|=/;function W8e(e){return B8e.test(e)}function H8e(e){return U8e.test(e)&&!z8e.test(e)}const NX=32,G8e=512,DX=",",IX="=";class WD{_internalState=new Map;constructor(t){t&&this._parse(t)}set(t,r){const n=this._clone();return n._internalState.has(t)&&n._internalState.delete(t),n._internalState.set(t,r),n}unset(t){const r=this._clone();return r._internalState.delete(t),r}get(t){return this._internalState.get(t)}serialize(){return this._keys().reduce((t,r)=>(t.push(r+IX+this.get(r)),t),[]).join(DX)}_parse(t){t.length>G8e||(this._internalState=t.split(DX).reverse().reduce((r,n)=>{const i=n.trim(),a=i.indexOf(IX);if(a!==-1){const o=i.slice(0,a),s=i.slice(a+1,n.length);W8e(o)&&H8e(s)&&r.set(o,s)}return r},new Map),this._internalState.size>NX&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,NX))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){const t=new WD;return t._internalState=new Map(this._internalState),t}}const HD="traceparent",GD="tracestate",K8e="00",Y8e="(?!ff)[\\da-f]{2}",Q8e="(?![0]{32})[\\da-f]{32}",X8e="(?![0]{16})[\\da-f]{16}",Z8e="[\\da-f]{2}",J8e=new RegExp(`^\\s?(${Y8e})-(${Q8e})-(${X8e})-(${Z8e})(-.*)?\\s?$`);function e7e(e){const t=J8e.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}class t7e{inject(t,r,n){const i=Si.getSpanContext(t);if(!i||PD(t)||!fb(i))return;const a=`${K8e}-${i.traceId}-${i.spanId}-0${Number(i.traceFlags||Ls.NONE).toString(16)}`;n.set(r,HD,a),i.traceState&&n.set(r,GD,i.traceState.serialize())}extract(t,r,n){const i=n.get(r,HD);if(!i)return t;const a=Array.isArray(i)?i[0]:i;if(typeof a!="string")return t;const o=e7e(a);if(!o)return t;o.isRemote=!0;const s=n.get(r,GD);if(s){const u=Array.isArray(s)?s.join(","):s;o.traceState=new WD(typeof u=="string"?u:void 0)}return Si.setSpanContext(t,o)}fields(){return[HD,GD]}}const r7e="[object Object]",n7e="[object Null]",i7e="[object Undefined]",kX=Function.prototype.toString,a7e=kX.call(Object),o7e=Object.getPrototypeOf,MX=Object.prototype,LX=MX.hasOwnProperty,fc=Symbol?Symbol.toStringTag:void 0,jX=MX.toString;function FX(e){if(!s7e(e)||u7e(e)!==r7e)return!1;const t=o7e(e);if(t===null)return!0;const r=LX.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&kX.call(r)===a7e}function s7e(e){return e!=null&&typeof e=="object"}function u7e(e){return e==null?e===void 0?i7e:n7e:fc&&fc in Object(e)?l7e(e):c7e(e)}function l7e(e){const t=LX.call(e,fc),r=e[fc];let n=!1;try{e[fc]=void 0,n=!0}catch{}const i=jX.call(e);return n&&(t?e[fc]=r:delete e[fc]),i}function c7e(e){return jX.call(e)}const f7e=20;function d7e(...e){let t=e.shift();const r=new WeakMap;for(;e.length>0;)t=$X(t,e.shift(),0,r);return t}function KD(e){return bb(e)?e.slice():e}function $X(e,t,r=0,n){let i;if(!(r>f7e)){if(r++,Eb(e)||Eb(t)||qX(t))i=KD(t);else if(bb(e)){if(i=e.slice(),bb(t))for(let a=0,o=t.length;a<o;a++)i.push(KD(t[a]));else if(Ev(t)){const a=Object.keys(t);for(let o=0,s=a.length;o<s;o++){const u=a[o];i[u]=KD(t[u])}}}else if(Ev(e))if(Ev(t)){if(!h7e(e,t))return t;i=Object.assign({},e);const a=Object.keys(t);for(let o=0,s=a.length;o<s;o++){const u=a[o],l=t[u];if(Eb(l))typeof l>"u"?delete i[u]:i[u]=l;else{const c=i[u],f=l;if(VX(e,u,n)||VX(t,u,n))delete i[u];else{if(Ev(c)&&Ev(f)){const d=n.get(c)||[],h=n.get(f)||[];d.push({obj:e,key:u}),h.push({obj:t,key:u}),n.set(c,d),n.set(f,h)}i[u]=$X(i[u],l,r,n)}}}}else i=t;return i}}function VX(e,t,r){const n=r.get(e[t])||[];for(let i=0,a=n.length;i<a;i++){const o=n[i];if(o.key===t&&o.obj===e)return!0}return!1}function bb(e){return Array.isArray(e)}function qX(e){return typeof e=="function"}function Ev(e){return!Eb(e)&&!bb(e)&&!qX(e)&&typeof e=="object"}function Eb(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function h7e(e,t){return!(!FX(e)||!FX(t))}function BX(e,t){return typeof t=="string"?e===t:!!e.match(t)}function p7e(e,t){if(!t)return!1;for(const r of t)if(BX(e,r))return!0;return!1}class v7e{_promise;_resolve;_reject;constructor(){this._promise=new Promise((t,r)=>{this._resolve=t,this._reject=r})}get promise(){return this._promise}resolve(t){this._resolve(t)}reject(t){this._reject(t)}}class g7e{_callback;_that;_isCalled=!1;_deferred=new v7e;constructor(t,r){this._callback=t,this._that=r}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...t){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...t)).then(r=>this._deferred.resolve(r),r=>this._deferred.reject(r))}catch(r){this._deferred.reject(r)}}return this._deferred.promise}}function m7e(e,t){return new Promise(r=>{zn.with(c8e(zn.active()),()=>{e.export(t,n=>{r(n)})})})}const y7e={_export:m7e};function _7e(){return"unknown_service"}const wv=e=>e!==null&&typeof e=="object"&&typeof e.then=="function";class wb{_rawAttributes;_asyncAttributesPending=!1;_memoizedAttributes;static FromAttributeList(t){const r=new wb({});return r._rawAttributes=zX(t),r._asyncAttributesPending=t.filter(([n,i])=>wv(i)).length>0,r}constructor(t){const r=t.attributes??{};this._rawAttributes=Object.entries(r).map(([n,i])=>(wv(i)&&(this._asyncAttributesPending=!0),[n,i])),this._rawAttributes=zX(this._rawAttributes)}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(this.asyncAttributesPending){for(let t=0;t<this._rawAttributes.length;t++){const[r,n]=this._rawAttributes[t];this._rawAttributes[t]=[r,wv(n)?await n:n]}this._asyncAttributesPending=!1}}get attributes(){if(this.asyncAttributesPending&&vr.error("Accessing resource attributes before async attributes settled"),this._memoizedAttributes)return this._memoizedAttributes;const t={};for(const[r,n]of this._rawAttributes){if(wv(n)){vr.debug(`Unsettled resource attribute ${r} skipped`);continue}n!=null&&(t[r]??=n)}return this._asyncAttributesPending||(this._memoizedAttributes=t),t}getRawAttributes(){return this._rawAttributes}merge(t){return t==null?this:wb.FromAttributeList([...t.getRawAttributes(),...this.getRawAttributes()])}}function UX(e){return wb.FromAttributeList(Object.entries(e))}function b7e(){return UX({[AX]:_7e(),[FD]:qD[FD],[$D]:qD[$D],[VD]:qD[VD]})}function zX(e){return e.map(([t,r])=>wv(r)?[t,r.catch(n=>{vr.debug("promise rejection for resource attribute: %s - %s",t,n)})]:[t,r])}const E7e="exception";class w7e{_spanContext;kind;parentSpanContext;attributes={};links=[];events=[];startTime;resource;instrumentationScope;_droppedAttributesCount=0;_droppedEventsCount=0;_droppedLinksCount=0;name;status={code:lc.UNSET};endTime=[0,0];_ended=!1;_duration=[-1,-1];_spanProcessor;_spanLimits;_attributeValueLengthLimit;_performanceStartTime;_performanceOffset;_startTimeProvided;constructor(t){const r=Date.now();this._spanContext=t.spanContext,this._performanceStartTime=gd.now(),this._performanceOffset=r-(this._performanceStartTime+BD()),this._startTimeProvided=t.startTime!=null,this._spanLimits=t.spanLimits,this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,this._spanProcessor=t.spanProcessor,this.name=t.name,this.parentSpanContext=t.parentSpanContext,this.kind=t.kind,this.links=t.links||[],this.startTime=this._getTime(t.startTime??r),this.resource=t.resource,this.instrumentationScope=t.scope,t.attributes!=null&&this.setAttributes(t.attributes),this._spanProcessor.onStart(this,t.context)}spanContext(){return this._spanContext}setAttribute(t,r){if(r==null||this._isSpanEnded())return this;if(t.length===0)return vr.warn(`Invalid attribute key: ${t}`),this;if(!RX(r))return vr.warn(`Invalid attribute value set for key: ${t}`),this;const{attributeCountLimit:n}=this._spanLimits;return n!==void 0&&Object.keys(this.attributes).length>=n&&!Object.prototype.hasOwnProperty.call(this.attributes,t)?(this._droppedAttributesCount++,this):(this.attributes[t]=this._truncateToSize(r),this)}setAttributes(t){for(const[r,n]of Object.entries(t))this.setAttribute(r,n);return this}addEvent(t,r,n){if(this._isSpanEnded())return this;const{eventCountLimit:i}=this._spanLimits;if(i===0)return vr.warn("No events allowed."),this._droppedEventsCount++,this;i!==void 0&&this.events.length>=i&&(this._droppedEventsCount===0&&vr.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),CX(r)&&(CX(n)||(n=r),r=void 0);const a=mb(r);return this.events.push({name:t,attributes:a,time:this._getTime(n),droppedAttributesCount:0}),this}addLink(t){return this.links.push(t),this}addLinks(t){return this.links.push(...t),this}setStatus(t){return this._isSpanEnded()?this:(this.status={...t},this.status.message!=null&&typeof t.message!="string"&&(vr.warn(`Dropping invalid status.message of type '${typeof t.message}', expected 'string'`),delete this.status.message),this)}updateName(t){return this._isSpanEnded()?this:(this.name=t,this)}end(t){if(this._isSpanEnded()){vr.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`);return}this._ended=!0,this.endTime=this._getTime(t),this._duration=F8e(this.startTime,this.endTime),this._duration[0]<0&&(vr.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&vr.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`),this._spanProcessor.onEnd(this)}_getTime(t){if(typeof t=="number"&&t<=gd.now())return _b(t+this._performanceOffset);if(typeof t=="number")return js(t);if(t instanceof Date)return js(t.getTime());if(UD(t))return t;if(this._startTimeProvided)return js(Date.now());const r=gd.now()-this._performanceStartTime;return PX(this.startTime,js(r))}isRecording(){return this._ended===!1}recordException(t,r){const n={};typeof t=="string"?n[LD]=t:t&&(t.code?n[jD]=t.code.toString():t.name&&(n[jD]=t.name),t.message&&(n[LD]=t.message),t.stack&&(n[A8e]=t.stack)),n[jD]||n[LD]?this.addEvent(E7e,n,r):vr.warn(`Failed to record an exception ${t}`)}get duration(){return this._duration}get ended(){return this._ended}get droppedAttributesCount(){return this._droppedAttributesCount}get droppedEventsCount(){return this._droppedEventsCount}get droppedLinksCount(){return this._droppedLinksCount}_isSpanEnded(){if(this._ended){const t=new Error(`Operation attempted on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`);vr.warn(`Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`,t)}return this._ended}_truncateToLimitUtil(t,r){return t.length<=r?t:t.substring(0,r)}_truncateToSize(t){const r=this._attributeValueLengthLimit;return r<=0?(vr.warn(`Attribute value limit must be positive, got ${r}`),t):typeof t=="string"?this._truncateToLimitUtil(t,r):Array.isArray(t)?t.map(n=>typeof n=="string"?this._truncateToLimitUtil(n,r):n):t}}var md;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(md||(md={}));class xb{shouldSample(){return{decision:md.NOT_RECORD}}toString(){return"AlwaysOffSampler"}}class yd{shouldSample(){return{decision:md.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}}class Sb{_root;_remoteParentSampled;_remoteParentNotSampled;_localParentSampled;_localParentNotSampled;constructor(t){this._root=t.root,this._root||(kD(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new yd),this._remoteParentSampled=t.remoteParentSampled??new yd,this._remoteParentNotSampled=t.remoteParentNotSampled??new xb,this._localParentSampled=t.localParentSampled??new yd,this._localParentNotSampled=t.localParentNotSampled??new xb}shouldSample(t,r,n,i,a,o){const s=Si.getSpanContext(t);return!s||!fb(s)?this._root.shouldSample(t,r,n,i,a,o):s.isRemote?s.traceFlags&Ls.SAMPLED?this._remoteParentSampled.shouldSample(t,r,n,i,a,o):this._remoteParentNotSampled.shouldSample(t,r,n,i,a,o):s.traceFlags&Ls.SAMPLED?this._localParentSampled.shouldSample(t,r,n,i,a,o):this._localParentNotSampled.shouldSample(t,r,n,i,a,o)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}}class WX{_ratio;_upperBound;constructor(t=0){this._ratio=t,this._ratio=this._normalize(t),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(t,r){return{decision:iX(r)&&this._accumulate(r)<this._upperBound?md.RECORD_AND_SAMPLED:md.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(t){return typeof t!="number"||isNaN(t)?0:t>=1?1:t<=0?0:t}_accumulate(t){let r=0;for(let n=0;n<t.length/8;n++){const i=n*8,a=parseInt(t.slice(i,i+8),16);r=(r^a)>>>0}return r}}const HX=1;function GX(){return{sampler:KX(),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:1/0,attributeCountLimit:128},spanLimits:{attributeValueLengthLimit:1/0,attributeCountLimit:128,linkCountLimit:128,eventCountLimit:128,attributePerEventCountLimit:128,attributePerLinkCountLimit:128}}}function KX(){const e="parentbased_always_on";switch(e){case"always_on":return new yd;case"always_off":return new xb;case"parentbased_always_on":return new Sb({root:new yd});case"parentbased_always_off":return new Sb({root:new xb});case"traceidratio":return new WX(YX());case"parentbased_traceidratio":return new Sb({root:new WX(YX())});default:return vr.error(`OTEL_TRACES_SAMPLER value "${e}" invalid, defaulting to "parentbased_always_on".`),new Sb({root:new yd})}}function YX(){return vr.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${HX}.`),HX}const x7e=128,S7e=1/0;function R7e(e){const t={sampler:KX()},r=GX(),n=Object.assign({},r,t,e);return n.generalLimits=Object.assign({},r.generalLimits,e.generalLimits||{}),n.spanLimits=Object.assign({},r.spanLimits,e.spanLimits||{}),n}function O7e(e){const t=Object.assign({},e.spanLimits);return t.attributeCountLimit=e.spanLimits?.attributeCountLimit??e.generalLimits?.attributeCountLimit??void 0??void 0??x7e,t.attributeValueLengthLimit=e.spanLimits?.attributeValueLengthLimit??e.generalLimits?.attributeValueLengthLimit??void 0??void 0??S7e,Object.assign({},e,{spanLimits:t})}const A7e=8,T7e=16;class C7e{generateTraceId=QX(T7e);generateSpanId=QX(A7e)}const Rb=Array(32);function QX(e){return function(){for(let r=0;r<e*2;r++)Rb[r]=Math.floor(Math.random()*16)+48,Rb[r]>=58&&(Rb[r]+=39);return String.fromCharCode.apply(null,Rb.slice(0,e*2))}}class P7e{_sampler;_generalLimits;_spanLimits;_idGenerator;instrumentationScope;_resource;_spanProcessor;constructor(t,r,n,i){const a=R7e(r);this._sampler=a.sampler,this._generalLimits=a.generalLimits,this._spanLimits=a.spanLimits,this._idGenerator=r.idGenerator||new C7e,this._resource=n,this._spanProcessor=i,this.instrumentationScope=t}startSpan(t,r={},n=zn.active()){r.root&&(n=Si.deleteSpan(n));const i=Si.getSpan(n);if(PD(n))return vr.debug("Instrumentation suppressed, returning Noop Span"),Si.wrapSpanContext(rX);const a=i?.spanContext(),o=this._idGenerator.generateSpanId();let s,u,l;!a||!Si.isSpanContextValid(a)?u=this._idGenerator.generateTraceId():(u=a.traceId,l=a.traceState,s=a);const c=r.kind??hb.INTERNAL,f=(r.links??[]).map(b=>({context:b.context,attributes:mb(b.attributes)})),d=mb(r.attributes),h=this._sampler.shouldSample(n,u,t,c,d,f);l=h.traceState??l;const m=h.decision===db.RECORD_AND_SAMPLED?Ls.SAMPLED:Ls.NONE,p={traceId:u,spanId:o,traceFlags:m,traceState:l};if(h.decision===db.NOT_RECORD)return vr.debug("Recording is off, propagating context in a non-recording span"),Si.wrapSpanContext(p);const g=mb(Object.assign(d,h.attributes));return new w7e({resource:this._resource,scope:this.instrumentationScope,context:n,spanContext:p,name:t,kind:c,links:f,parentSpanContext:s,attributes:g,startTime:r.startTime,spanProcessor:this._spanProcessor,spanLimits:this._spanLimits})}startActiveSpan(t,r,n,i){let a,o,s;if(arguments.length<2)return;arguments.length===2?s=r:arguments.length===3?(a=r,s=n):(a=r,o=n,s=i);const u=o??zn.active(),l=this.startSpan(t,a,u),c=Si.setSpan(u,l);return zn.with(c,s,void 0,l)}getGeneralLimits(){return this._generalLimits}getSpanLimits(){return this._spanLimits}}class N7e{_spanProcessors;constructor(t){this._spanProcessors=t}forceFlush(){const t=[];for(const r of this._spanProcessors)t.push(r.forceFlush());return new Promise(r=>{Promise.all(t).then(()=>{r()}).catch(n=>{kD(n||new Error("MultiSpanProcessor: forceFlush failed")),r()})})}onStart(t,r){for(const n of this._spanProcessors)n.onStart(t,r)}onEnd(t){for(const r of this._spanProcessors)r.onEnd(t)}shutdown(){const t=[];for(const r of this._spanProcessors)t.push(r.shutdown());return new Promise((r,n)=>{Promise.all(t).then(()=>{r()},n)})}}var dc;(function(e){e[e.resolved=0]="resolved",e[e.timeout=1]="timeout",e[e.error=2]="error",e[e.unresolved=3]="unresolved"})(dc||(dc={}));class D7e{_config;_tracers=new Map;_resource;_activeSpanProcessor;constructor(t={}){const r=d7e({},GX(),O7e(t));this._resource=r.resource??b7e(),this._config=Object.assign({},r,{resource:this._resource});const n=[];t.spanProcessors?.length&&n.push(...t.spanProcessors),this._activeSpanProcessor=new N7e(n)}getTracer(t,r,n){const i=`${t}@${r||""}:${n?.schemaUrl||""}`;return this._tracers.has(i)||this._tracers.set(i,new P7e({name:t,version:r,schemaUrl:n?.schemaUrl},this._config,this._resource,this._activeSpanProcessor)),this._tracers.get(i)}forceFlush(){const t=this._config.forceFlushTimeoutMillis,r=this._activeSpanProcessor._spanProcessors.map(n=>new Promise(i=>{let a;const o=setTimeout(()=>{i(new Error(`Span processor did not completed within timeout period of ${t} ms`)),a=dc.timeout},t);n.forceFlush().then(()=>{clearTimeout(o),a!==dc.timeout&&(a=dc.resolved,i(a))}).catch(s=>{clearTimeout(o),a=dc.error,i(s)})}));return new Promise((n,i)=>{Promise.all(r).then(a=>{const o=a.filter(s=>s!==dc.resolved);o.length>0?i(o):n()}).catch(a=>i([a]))})}shutdown(){return this._activeSpanProcessor.shutdown()}}class I7e{export(t,r){return this._sendSpans(t,r)}shutdown(){return this._sendSpans([]),this.forceFlush()}forceFlush(){return Promise.resolve()}_exportInfo(t){return{resource:{attributes:t.resource.attributes},instrumentationScope:t.instrumentationScope,traceId:t.spanContext().traceId,parentSpanContext:t.parentSpanContext,traceState:t.spanContext().traceState?.serialize(),name:t.name,id:t.spanContext().spanId,kind:t.kind,timestamp:TX(t.startTime),duration:TX(t.duration),attributes:t.attributes,status:t.status,events:t.events,links:t.links}}_sendSpans(t,r){for(const n of t)console.dir(this._exportInfo(n),{depth:3});if(r)return r({code:io.SUCCESS})}}class XX{_exporter;_shutdownOnce;_pendingExports;constructor(t){this._exporter=t,this._shutdownOnce=new g7e(this._shutdown,this),this._pendingExports=new Set}async forceFlush(){await Promise.all(Array.from(this._pendingExports)),this._exporter.forceFlush&&await this._exporter.forceFlush()}onStart(t,r){}onEnd(t){if(this._shutdownOnce.isCalled||(t.spanContext().traceFlags&Ls.SAMPLED)===0)return;const r=this._doExport(t).catch(n=>kD(n));this._pendingExports.add(r),r.finally(()=>this._pendingExports.delete(r))}async _doExport(t){t.resource.asyncAttributesPending&&await t.resource.waitForAsyncAttributes?.();const r=await y7e._export(this._exporter,[t]);if(r.code!==io.SUCCESS)throw r.error??new Error(`SimpleSpanProcessor: span export failed (status ${r})`)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}}class k7e{_enabled=!1;_currentContext=Ms;_bindFunction(t=Ms,r){const n=this,i=function(...a){return n.with(t,()=>r.apply(this,a))};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:r.length}),i}active(){return this._currentContext}bind(t,r){return t===void 0&&(t=this.active()),typeof r=="function"?this._bindFunction(t,r):r}disable(){return this._currentContext=Ms,this._enabled=!1,this}enable(){return this._enabled?this:(this._enabled=!0,this._currentContext=Ms,this)}with(t,r,n,...i){const a=this._currentContext;this._currentContext=t||Ms;try{return r.call(n,...i)}finally{this._currentContext=a}}}function M7e(e){if(e!==null){if(e===void 0){const t=new k7e;t.enable(),zn.setGlobalContextManager(t);return}e.enable(),zn.setGlobalContextManager(e)}}function L7e(e){if(e!==null){if(e===void 0){Wo.setGlobalPropagator(new $8e({propagators:[new t7e,new y8e]}));return}Wo.setGlobalPropagator(e)}}class j7e extends D7e{constructor(t={}){super(t)}register(t={}){Si.setGlobalTracerProvider(this),L7e(t.propagator),M7e(t.contextManager)}}var Vr;(function(e){e.CONNECT_END="connectEnd",e.CONNECT_START="connectStart",e.DECODED_BODY_SIZE="decodedBodySize",e.DOM_COMPLETE="domComplete",e.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",e.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",e.DOM_INTERACTIVE="domInteractive",e.DOMAIN_LOOKUP_END="domainLookupEnd",e.DOMAIN_LOOKUP_START="domainLookupStart",e.ENCODED_BODY_SIZE="encodedBodySize",e.FETCH_START="fetchStart",e.LOAD_EVENT_END="loadEventEnd",e.LOAD_EVENT_START="loadEventStart",e.NAVIGATION_START="navigationStart",e.REDIRECT_END="redirectEnd",e.REDIRECT_START="redirectStart",e.REQUEST_START="requestStart",e.RESPONSE_END="responseEnd",e.RESPONSE_START="responseStart",e.SECURE_CONNECTION_START="secureConnectionStart",e.START_TIME="startTime",e.UNLOAD_EVENT_END="unloadEventEnd",e.UNLOAD_EVENT_START="unloadEventStart"})(Vr||(Vr={}));const F7e="http.response_content_length",$7e="http.response_content_length_uncompressed";let YD;function V7e(){return YD||(YD=document.createElement("a")),YD}function q7e(e,t){return t in e}function $s(e,t,r,n=!0){if(q7e(r,t)&&typeof r[t]=="number"&&!(n&&r[t]===0))return e.addEvent(t,r[t])}function ZX(e,t,r=!1,n,i){if(n===void 0&&(n=t[Vr.START_TIME]!==0),r||($s(e,Vr.FETCH_START,t,n),$s(e,Vr.DOMAIN_LOOKUP_START,t,n),$s(e,Vr.DOMAIN_LOOKUP_END,t,n),$s(e,Vr.CONNECT_START,t,n),$s(e,Vr.SECURE_CONNECTION_START,t,n),$s(e,Vr.CONNECT_END,t,n),$s(e,Vr.REQUEST_START,t,n),$s(e,Vr.RESPONSE_START,t,n),$s(e,Vr.RESPONSE_END,t,n)),!i){const a=t[Vr.ENCODED_BODY_SIZE];a!==void 0&&e.setAttribute(F7e,a);const o=t[Vr.DECODED_BODY_SIZE];o!==void 0&&a!==o&&e.setAttribute($7e,o)}}function B7e(e){return e.slice().sort((t,r)=>{const n=t[Vr.FETCH_START],i=r[Vr.FETCH_START];return n>i?1:n<i?-1:0})}function JX(){return typeof location<"u"?location.origin:void 0}function U7e(e,t,r,n,i=new WeakSet,a){const o=Ob(e);e=o.toString();const s=W7e(e,t,r,n,i,a);if(s.length===0)return{mainRequest:void 0};if(s.length===1)return{mainRequest:s[0]};const u=B7e(s);if(o.origin!==JX()&&u.length>1){let l=u[0],c=z7e(u,l[Vr.RESPONSE_END],r);const f=l[Vr.RESPONSE_END];return c[Vr.FETCH_START]<f&&(c=l,l=void 0),{corsPreFlightRequest:l,mainRequest:c}}else return{mainRequest:s[0]}}function z7e(e,t,r){const n=Fs(r),i=Fs(bv(t));let a=e[1],o;const s=e.length;for(let u=1;u<s;u++){const l=e[u],c=Fs(bv(l[Vr.FETCH_START])),f=Fs(bv(l[Vr.RESPONSE_END])),d=n-f;c>=i&&(!o||d<o)&&(o=d,a=l)}return a}function W7e(e,t,r,n,i,a){const o=Fs(t),s=Fs(r);let u=n.filter(l=>{const c=Fs(bv(l[Vr.FETCH_START])),f=Fs(bv(l[Vr.RESPONSE_END]));return l.initiatorType.toLowerCase()===a&&l.name===e&&c>=o&&f<=s});return u.length>0&&(u=u.filter(l=>!i.has(l))),u}function Ob(e){if(typeof URL=="function")return new URL(e,typeof document<"u"?document.baseURI:typeof location<"u"?location.href:void 0);const t=V7e();return t.href=e,t}function H7e(e,t){let r=t||[];return(typeof r=="string"||r instanceof RegExp)&&(r=[r]),Ob(e).origin===JX()?!0:r.some(i=>BX(e,i))}class G7e{_delegate;constructor(t){this._delegate=t}export(t,r){this._delegate.export(t,r)}forceFlush(){return this._delegate.forceFlush()}shutdown(){return this._delegate.shutdown()}}class eZ extends Error{code;name="OTLPExporterError";data;constructor(t,r,n){super(t),this.data=n,this.code=r}}function K7e(e){if(Number.isFinite(e)&&e>0)return e;throw new Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${e}')`)}function Y7e(e){if(e!=null)return()=>e}function Q7e(e,t,r){return{timeoutMillis:K7e(e.timeoutMillis??t.timeoutMillis??r.timeoutMillis),concurrencyLimit:e.concurrencyLimit??t.concurrencyLimit??r.concurrencyLimit,compression:e.compression??t.compression??r.compression}}function X7e(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}class Z7e{_concurrencyLimit;_sendingPromises=[];constructor(t){this._concurrencyLimit=t}pushPromise(t){if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this._sendingPromises.push(t);const r=()=>{const n=this._sendingPromises.indexOf(t);this._sendingPromises.splice(n,1)};t.then(r,r)}hasReachedLimit(){return this._sendingPromises.length>=this._concurrencyLimit}async awaitAll(){await Promise.all(this._sendingPromises)}}function J7e(e){return new Z7e(e.concurrencyLimit)}function e$e(e){return Object.prototype.hasOwnProperty.call(e,"partialSuccess")}function t$e(){return{handleResponse(e){e==null||!e$e(e)||e.partialSuccess==null||Object.keys(e.partialSuccess).length===0||vr.warn("Received Partial Success response:",JSON.stringify(e.partialSuccess))}}}class r$e{_transport;_serializer;_responseHandler;_promiseQueue;_timeout;_diagLogger;constructor(t,r,n,i,a){this._transport=t,this._serializer=r,this._responseHandler=n,this._promiseQueue=i,this._timeout=a,this._diagLogger=vr.createComponentLogger({namespace:"OTLPExportDelegate"})}export(t,r){if(this._diagLogger.debug("items to be sent",t),this._promiseQueue.hasReachedLimit()){r({code:io.FAILED,error:new Error("Concurrent export limit reached")});return}const n=this._serializer.serializeRequest(t);if(n==null){r({code:io.FAILED,error:new Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(n,this._timeout).then(i=>{if(i.status==="success"){if(i.data!=null)try{this._responseHandler.handleResponse(this._serializer.deserializeResponse(i.data))}catch(a){this._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",a,i.data)}r({code:io.SUCCESS});return}else if(i.status==="failure"&&i.error){r({code:io.FAILED,error:i.error});return}else i.status==="retryable"?r({code:io.FAILED,error:new eZ("Export failed with retryable status")}):r({code:io.FAILED,error:new eZ("Export failed with unknown error")})},i=>r({code:io.FAILED,error:i})))}forceFlush(){return this._promiseQueue.awaitAll()}async shutdown(){this._diagLogger.debug("shutdown started"),await this.forceFlush(),this._transport.shutdown()}}function n$e(e,t){return new r$e(e.transport,e.serializer,t$e(),e.promiseHandler,t.timeout)}function tZ(e,t,r){return n$e({transport:r,serializer:t,promiseHandler:J7e(e)},{timeout:e.timeoutMillis})}function rZ(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}function nZ(e){const t=new Uint8Array(e.length/2);let r=0;for(let n=0;n<e.length;n+=2){const i=rZ(e.charCodeAt(n)),a=rZ(e.charCodeAt(n+1));t[r++]=i<<4|a}return t}function iZ(e){const t=BigInt(1e9);return BigInt(e[0])*t+BigInt(e[1])}function i$e(e){const t=Number(BigInt.asUintN(32,e)),r=Number(BigInt.asUintN(32,e>>BigInt(32)));return{low:t,high:r}}function a$e(e){const t=iZ(e);return i$e(t)}function o$e(e){return iZ(e).toString()}const s$e=typeof BigInt<"u"?o$e:Fs;function aZ(e){return e}function u$e(e){if(e!==void 0)return nZ(e)}const l$e={encodeHrTime:a$e,encodeSpanContext:nZ,encodeOptionalSpanContext:u$e};function c$e(e){return e===void 0?l$e:{encodeHrTime:s$e,encodeSpanContext:aZ,encodeOptionalSpanContext:aZ}}function f$e(e){return{attributes:Ab(e.attributes),droppedAttributesCount:0}}function d$e(e){return{name:e.name,version:e.version}}function Ab(e){return Object.keys(e).map(t=>oZ(t,e[t]))}function oZ(e,t){return{key:e,value:sZ(t)}}function sZ(e){const t=typeof e;return t==="string"?{stringValue:e}:t==="number"?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:t==="boolean"?{boolValue:e}:e instanceof Uint8Array?{bytesValue:e}:Array.isArray(e)?{arrayValue:{values:e.map(sZ)}}:t==="object"&&e!=null?{kvlistValue:{values:Object.entries(e).map(([r,n])=>oZ(r,n))}}:{}}function h$e(e,t){const r=e.spanContext(),n=e.status,i=e.parentSpanContext?.spanId?t.encodeSpanContext(e.parentSpanContext?.spanId):void 0;return{traceId:t.encodeSpanContext(r.traceId),spanId:t.encodeSpanContext(r.spanId),parentSpanId:i,traceState:r.traceState?.serialize(),name:e.name,kind:e.kind==null?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:Ab(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(a=>v$e(a,t)),droppedEventsCount:e.droppedEventsCount,status:{code:n.code,message:n.message},links:e.links.map(a=>p$e(a,t)),droppedLinksCount:e.droppedLinksCount}}function p$e(e,t){return{attributes:e.attributes?Ab(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:e.context.traceState?.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}function v$e(e,t){return{attributes:e.attributes?Ab(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}function g$e(e,t){const r=c$e(t);return{resourceSpans:y$e(e,r)}}function m$e(e){const t=new Map;for(const r of e){let n=t.get(r.resource);n||(n=new Map,t.set(r.resource,n));const i=`${r.instrumentationScope.name}@${r.instrumentationScope.version||""}:${r.instrumentationScope.schemaUrl||""}`;let a=n.get(i);a||(a=[],n.set(i,a)),a.push(r)}return t}function y$e(e,t){const r=m$e(e),n=[],i=r.entries();let a=i.next();for(;!a.done;){const[o,s]=a.value,u=[],l=s.values();let c=l.next();for(;!c.done;){const d=c.value;if(d.length>0){const h=d.map(m=>h$e(m,t));u.push({scope:d$e(d[0].instrumentationScope),spans:h,schemaUrl:d[0].instrumentationScope.schemaUrl})}c=l.next()}const f={resource:f$e(o),scopeSpans:u,schemaUrl:void 0};n.push(f),a=i.next()}return n}const _$e={serializeRequest:e=>{const t=g$e(e,{});return new TextEncoder().encode(JSON.stringify(t))},deserializeResponse:e=>{if(e.length===0)return{};const t=new TextDecoder;return JSON.parse(t.decode(e))}},b$e=5,E$e=1e3,w$e=5e3,x$e=1.5,uZ=.2;function S$e(){return Math.random()*(2*uZ)-uZ}class R$e{_transport;constructor(t){this._transport=t}retry(t,r,n){return new Promise((i,a)=>{setTimeout(()=>{this._transport.send(t,r).then(i,a)},n)})}async send(t,r){const n=Date.now()+r;let i=await this._transport.send(t,r),a=b$e,o=E$e;for(;i.status==="retryable"&&a>0;){a--;const s=Math.max(Math.min(o,w$e)+S$e(),0);o=o*x$e;const u=i.retryInMillis??s,l=n-Date.now();if(u>l)return i;i=await this.retry(t,l,u)}return i}shutdown(){return this._transport.shutdown()}}function lZ(e){return new R$e(e.transport)}function O$e(e){return[429,502,503,504].includes(e)}function A$e(e){if(e==null)return;const t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?t*1e3:-1;const r=new Date(e).getTime()-Date.now();return r>=0?r:0}class T$e{_parameters;constructor(t){this._parameters=t}send(t,r){return new Promise(n=>{const i=new XMLHttpRequest;i.timeout=r,i.open("POST",this._parameters.url);const a=this._parameters.headers();Object.entries(a).forEach(([o,s])=>{i.setRequestHeader(o,s)}),i.ontimeout=o=>{n({status:"failure",error:new Error("XHR request timed out")})},i.onreadystatechange=()=>{i.status>=200&&i.status<=299?(vr.debug("XHR success"),n({status:"success"})):i.status&&O$e(i.status)?n({status:"retryable",retryInMillis:A$e(i.getResponseHeader("Retry-After"))}):i.status!==0&&n({status:"failure",error:new Error("XHR request failed with non-retryable status")})},i.onabort=()=>{n({status:"failure",error:new Error("XHR request aborted")})},i.onerror=()=>{n({status:"failure",error:new Error("XHR request errored")})},i.send(t)})}shutdown(){}}function C$e(e){return new T$e(e)}class P$e{_params;constructor(t){this._params=t}send(t){return new Promise(r=>{navigator.sendBeacon(this._params.url,new Blob([t],{type:this._params.blobType}))?(vr.debug("SendBeacon success"),r({status:"success"})):r({status:"failure",error:new Error("SendBeacon failed")})})}shutdown(){}}function N$e(e){return new P$e(e)}function D$e(e,t){return tZ(e,t,lZ({transport:C$e(e)}))}function I$e(e,t){return tZ(e,t,lZ({transport:N$e({url:e.url,blobType:e.headers()["Content-Type"]})}))}function k$e(e){return()=>{const t={};return Object.entries(e?.()??{}).forEach(([r,n])=>{typeof n<"u"?t[r]=String(n):vr.warn(`Header "${r}" has invalid value (${n}) and will be ignored`)}),t}}function M$e(e,t,r){const n={...r()},i={};return()=>(t!=null&&Object.assign(i,t()),e!=null&&Object.assign(i,e()),Object.assign(i,n))}function L$e(e){if(e!=null)try{return new URL(e),e}catch{throw new Error(`Configuration: Could not parse user-provided export URL: '${e}'`)}}function j$e(e,t,r){return{...Q7e(e,t,r),headers:M$e(k$e(e.headers),t.headers,r.headers),url:L$e(e.url)??t.url??r.url,agentOptions:e.agentOptions??t.agentOptions??r.agentOptions}}function F$e(e,t){return{...X7e(),headers:()=>e,url:"http://localhost:4318/"+t,agentOptions:{keepAlive:!0}}}function $$e(e,t,r){return j$e({url:e.url,timeoutMillis:e.timeoutMillis,headers:Y7e(e.headers),concurrencyLimit:e.concurrencyLimit},{},F$e(r,t))}function V$e(e,t,r,n){const i=!!e.headers||typeof navigator.sendBeacon!="function",a=$$e(e,r,n);return i?D$e(a,t):I$e(a,t)}class q$e extends G7e{constructor(t={}){super(V$e(t,_$e,"v1/traces",{"Content-Type":"application/json"}))}}class cZ{emit(t){}}const B$e=new cZ;class U$e{getLogger(t,r,n){return new cZ}}const fZ=new U$e;class z$e{constructor(t,r,n,i){this._provider=t,this.name=r,this.version=n,this.options=i}emit(t){this._getLogger().emit(t)}_getLogger(){if(this._delegate)return this._delegate;const t=this._provider.getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):B$e}}class dZ{getLogger(t,r,n){var i;return(i=this.getDelegateLogger(t,r,n))!==null&&i!==void 0?i:new z$e(this,t,r,n)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:fZ}setDelegate(t){this._delegate=t}getDelegateLogger(t,r,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getLogger(t,r,n)}}const W$e=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Tb=Symbol.for("io.opentelemetry.js.api.logs"),xv=W$e;function H$e(e,t,r){return n=>n===e?t:r}const hZ=1;class QD{constructor(){this._proxyLoggerProvider=new dZ}static getInstance(){return this._instance||(this._instance=new QD),this._instance}setGlobalLoggerProvider(t){return xv[Tb]?this.getLoggerProvider():(xv[Tb]=H$e(hZ,t,fZ),this._proxyLoggerProvider.setDelegate(t),t)}getLoggerProvider(){var t,r;return(r=(t=xv[Tb])===null||t===void 0?void 0:t.call(xv,hZ))!==null&&r!==void 0?r:this._proxyLoggerProvider}getLogger(t,r,n){return this.getLoggerProvider().getLogger(t,r,n)}disable(){delete xv[Tb],this._proxyLoggerProvider=new dZ}}const pZ=QD.getInstance();function G$e(e,t,r,n){for(let i=0,a=e.length;i<a;i++){const o=e[i];t&&o.setTracerProvider(t),r&&o.setMeterProvider(r),n&&o.setLoggerProvider&&o.setLoggerProvider(n),o.getConfig().enabled||o.enable()}}function K$e(e){e.forEach(t=>t.disable())}function Y$e(e){const t=e.tracerProvider||Si.getTracerProvider(),r=e.meterProvider||sX.getMeterProvider(),n=e.loggerProvider||pZ.getLoggerProvider(),i=e.instrumentations?.flat()??[];return G$e(i,t,r,n),()=>{K$e(i)}}let ua=console.error.bind(console);function Sv(e,t,r){const n=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:n,writable:!0,value:r})}const vZ=(e,t,r)=>{if(!e||!e[t]){ua("no original function "+String(t)+" to wrap");return}if(!r){ua("no wrapper function"),ua(new Error().stack);return}const n=e[t];if(typeof n!="function"||typeof r!="function"){ua("original object and wrapper must be functions");return}const i=r(n,t);return Sv(i,"__original",n),Sv(i,"__unwrap",()=>{e[t]===i&&Sv(e,t,n)}),Sv(i,"__wrapped",!0),Sv(e,t,i),i},Q$e=(e,t,r)=>{if(e)Array.isArray(e)||(e=[e]);else{ua("must provide one or more modules to patch"),ua(new Error().stack);return}if(!(t&&Array.isArray(t))){ua("must provide one or more functions to wrap on modules");return}e.forEach(n=>{t.forEach(i=>{vZ(n,i,r)})})},gZ=(e,t)=>{if(!e||!e[t]){ua("no function to unwrap."),ua(new Error().stack);return}const r=e[t];if(!r.__unwrap)ua("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{r.__unwrap();return}},X$e=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{ua("must provide one or more modules to patch"),ua(new Error().stack);return}if(!(t&&Array.isArray(t))){ua("must provide one or more functions to unwrap on modules");return}e.forEach(r=>{t.forEach(n=>{gZ(r,n)})})};class Z$e{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,r,n){this.instrumentationName=t,this.instrumentationVersion=r,this.setConfig(n),this._diag=vr.createComponentLogger({namespace:t}),this._tracer=Si.getTracer(t,r),this._meter=sX.getMeter(t,r),this._logger=pZ.getLogger(t,r),this._updateMetricInstruments()}_wrap=vZ;_unwrap=gZ;_massWrap=Q$e;_massUnwrap=X$e;get meter(){return this._meter}setMeterProvider(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){const t=this.init()??[];return Array.isArray(t)?t:[t]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(t){this._config={enabled:!0,...t}}setTracerProvider(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(t,r,n,i){if(t)try{t(n,i)}catch(a){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:r},a)}}}class J$e extends Z$e{constructor(t,r,n){super(t,r,n),this._config.enabled&&this.enable()}}function mZ(e,t,r){let n,i;try{i=e()}catch(a){n=a}finally{return t(n,i),i}}function eVe(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}var Ui;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(Ui||(Ui={}));function tVe(e,t){let r=Ui.OLD;const n=t?.split(",").map(i=>i.trim()).filter(i=>i!=="");for(const i of n??[])if(i.toLowerCase()===e+"/dup"){r=Ui.DUPLICATE;break}else i.toLowerCase()===e&&(r=Ui.STABLE);return r}var Cb;(function(e){e.COMPONENT="component",e.HTTP_STATUS_TEXT="http.status_text"})(Cb||(Cb={}));var ln={},yZ;function rVe(){return yZ||(yZ=1,Object.defineProperty(ln,"__esModule",{value:!0}),ln.ATTR_HTTP_USER_AGENT=ln.ATTR_HTTP_URL=ln.ATTR_HTTP_STATUS_CODE=ln.ATTR_HTTP_SCHEME=ln.ATTR_HTTP_RESPONSE_CONTENT_LENGTH=ln.ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED=ln.ATTR_HTTP_REQUEST_BODY_SIZE=ln.ATTR_HTTP_METHOD=ln.ATTR_HTTP_HOST=void 0,ln.ATTR_HTTP_HOST="http.host",ln.ATTR_HTTP_METHOD="http.method",ln.ATTR_HTTP_REQUEST_BODY_SIZE="http.request.body.size",ln.ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED="http.request_content_length_uncompressed",ln.ATTR_HTTP_RESPONSE_CONTENT_LENGTH="http.response_content_length",ln.ATTR_HTTP_SCHEME="http.scheme",ln.ATTR_HTTP_STATUS_CODE="http.status_code",ln.ATTR_HTTP_URL="http.url",ln.ATTR_HTTP_USER_AGENT="http.user_agent"),ln}var ju=rVe();const _Z=vr.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function nVe(...e){if(e[0]instanceof URL||typeof e[0]=="string"){const t=e[1];if(!t?.body)return Promise.resolve();if(t.body instanceof ReadableStream){const{body:r,length:n}=iVe(t.body);return t.body=r,n}else return Promise.resolve(oVe(t.body))}else{const t=e[0];return t?.body?t.clone().text().then(r=>XD(r)):Promise.resolve()}}function iVe(e){if(!e.pipeThrough)return _Z.warn("Platform has ReadableStream but not pipeThrough!"),{body:e,length:Promise.resolve(void 0)};let t=0,r;const n=new Promise(a=>{r=a}),i=new TransformStream({start(){},async transform(a,o){const s=await a;t+=s.byteLength,o.enqueue(a)},flush(){r(t)}});return{body:e.pipeThrough(i),length:n}}function aVe(e){return typeof Document<"u"&&e instanceof Document}function oVe(e){if(aVe(e))return new XMLSerializer().serializeToString(document).length;if(typeof e=="string")return XD(e);if(e instanceof Blob)return e.size;if(e instanceof FormData)return uVe(e);if(e instanceof URLSearchParams)return XD(e.toString());if(e.byteLength!==void 0)return e.byteLength;_Z.warn("unknown body type")}const sVe=new TextEncoder;function XD(e){return sVe.encode(e).byteLength}function uVe(e){let t=0;for(const[r,n]of e.entries())t+=r.length,n instanceof Blob?t+=n.size:t+=n.length;return t}function lVe(e){const t=fVe(),r=e.toUpperCase();return r in t?r:"_OTHER"}const cVe={CONNECT:!0,DELETE:!0,GET:!0,HEAD:!0,OPTIONS:!0,PATCH:!0,POST:!0,PUT:!0,TRACE:!0};let ZD;function fVe(){return ZD===void 0&&(ZD=cVe),ZD}const dVe={"https:":"443","http:":"80"};function hVe(e){const t=Number(e.port||dVe[e.protocol]);if(t&&!isNaN(t))return t}const bZ="0.203.0",pVe=300,EZ=typeof process=="object"&&process.release?.name==="node";class vVe extends J$e{component="fetch";version=bZ;moduleName=this.component;_usedResources=new WeakSet;_tasksCount=0;_semconvStability;constructor(t={}){super("@opentelemetry/instrumentation-fetch",bZ,t),this._semconvStability=tVe("http",t?.semconvStabilityOptIn)}init(){}_addChildSpan(t,r){const n=this.tracer.startSpan("CORS Preflight",{startTime:r[Vr.FETCH_START]},Si.setSpan(zn.active(),t)),i=!(this._semconvStability&Ui.OLD);ZX(n,r,this.getConfig().ignoreNetworkEvents,void 0,i),n.end(r[Vr.RESPONSE_END])}_addFinalSpanAttributes(t,r){const n=Ob(r.url);if(this._semconvStability&Ui.OLD&&(t.setAttribute(ju.ATTR_HTTP_STATUS_CODE,r.status),r.statusText!=null&&t.setAttribute(Cb.HTTP_STATUS_TEXT,r.statusText),t.setAttribute(ju.ATTR_HTTP_HOST,n.host),t.setAttribute(ju.ATTR_HTTP_SCHEME,n.protocol.replace(":","")),typeof navigator<"u"&&t.setAttribute(ju.ATTR_HTTP_USER_AGENT,navigator.userAgent)),this._semconvStability&Ui.STABLE){t.setAttribute(P8e,r.status),t.setAttribute(N8e,n.hostname);const i=hVe(n);i&&t.setAttribute(D8e,i)}}_addHeaders(t,r){if(!H7e(r,this.getConfig().propagateTraceHeaderCorsUrls)){const n={};Wo.inject(zn.active(),n),Object.keys(n).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}if(t instanceof Request)Wo.inject(zn.active(),t.headers,{set:(n,i,a)=>n.set(i,typeof a=="string"?a:String(a))});else if(t.headers instanceof Headers)Wo.inject(zn.active(),t.headers,{set:(n,i,a)=>n.set(i,typeof a=="string"?a:String(a))});else if(t.headers instanceof Map)Wo.inject(zn.active(),t.headers,{set:(n,i,a)=>n.set(i,typeof a=="string"?a:String(a))});else{const n={};Wo.inject(zn.active(),n),t.headers=Object.assign({},n,t.headers||{})}}_clearResources(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)}_createSpan(t,r={}){if(p7e(t,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}let n="";const i={};if(this._semconvStability&Ui.OLD){const a=(r.method||"GET").toUpperCase();n=`HTTP ${a}`,i[Cb.COMPONENT]=this.moduleName,i[ju.ATTR_HTTP_METHOD]=a,i[ju.ATTR_HTTP_URL]=t}if(this._semconvStability&Ui.STABLE){const a=r.method,o=lVe(r.method||"GET");n||(n=o),i[T8e]=o,o!==a&&(i[C8e]=a),i[k8e]=t}return this.tracer.startSpan(n,{kind:hb.CLIENT,attributes:i})}_findResourceAndAddNetworkEvents(t,r,n){let i=r.entries;if(!i.length){if(!performance.getEntriesByType)return;i=performance.getEntriesByType("resource")}const a=U7e(r.spanUrl,r.startTime,n,i,this._usedResources,"fetch");if(a.mainRequest){const o=a.mainRequest;this._markResourceAsUsed(o);const s=a.corsPreFlightRequest;s&&(this._addChildSpan(t,s),this._markResourceAsUsed(s));const u=!(this._semconvStability&Ui.OLD);ZX(t,o,this.getConfig().ignoreNetworkEvents,void 0,u)}}_markResourceAsUsed(t){this._usedResources.add(t)}_endSpan(t,r,n){const i=js(Date.now()),a=_b();this._addFinalSpanAttributes(t,n),this._semconvStability&Ui.STABLE&&n.status>=400&&(t.setStatus({code:lc.ERROR}),t.setAttribute(O8e,String(n.status))),setTimeout(()=>{r.observer?.disconnect(),this._findResourceAndAddNetworkEvents(t,r,a),this._tasksCount--,this._clearResources(),t.end(i)},pVe)}_patchConstructor(){return t=>{const r=this;return function(...i){const a=this,o=Ob(i[0]instanceof Request?i[0].url:String(i[0])).href,s=i[0]instanceof Request?i[0]:i[1]||{},u=r._createSpan(o,s);if(!u)return t.apply(this,i);const l=r._prepareSpanData(o);r.getConfig().measureRequestSize&&nVe(...i).then(m=>{m&&(r._semconvStability&Ui.OLD&&u.setAttribute(ju.ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED,m),r._semconvStability&Ui.STABLE&&u.setAttribute(ju.ATTR_HTTP_REQUEST_BODY_SIZE,m))}).catch(m=>{r._diag.warn("getFetchBodyLength",m)});function c(m,p){r._applyAttributesAfterFetch(m,s,p),r._endSpan(m,l,{status:p.status||0,statusText:p.message,url:o})}function f(m,p){r._applyAttributesAfterFetch(m,s,p),p.status>=200&&p.status<400?r._endSpan(m,l,p):r._endSpan(m,l,{status:p.status,statusText:p.statusText,url:o})}function d(m,p,g){try{const b=g.clone().body;if(b){const E=b.getReader(),w=()=>{E.read().then(({done:x})=>{x?f(m,g):w()},x=>{c(m,x)})};w()}else f(m,g)}finally{p(g)}}function h(m,p,g){try{c(m,g)}finally{p(g)}}return new Promise((m,p)=>zn.with(Si.setSpan(zn.active(),u),()=>(r._addHeaders(s,o),r._callRequestHook(u,s),r._tasksCount++,t.apply(a,s instanceof Request?[s]:[o,s]).then(d.bind(a,u,m),h.bind(a,u,p)))))}}}_applyAttributesAfterFetch(t,r,n){const i=this.getConfig().applyCustomAttributesOnSpan;i&&mZ(()=>i(t,r,n),a=>{a&&this._diag.error("applyCustomAttributesOnSpan",a)})}_callRequestHook(t,r){const n=this.getConfig().requestHook;n&&mZ(()=>n(t,r),i=>{i&&this._diag.error("requestHook",i)})}_prepareSpanData(t){const r=_b(),n=[];if(typeof PerformanceObserver!="function")return{entries:n,startTime:r,spanUrl:t};const i=new PerformanceObserver(a=>{a.getEntries().forEach(s=>{s.initiatorType==="fetch"&&s.name===t&&n.push(s)})});return i.observe({entryTypes:["resource"]}),{entries:n,observer:i,startTime:r,spanUrl:t}}enable(){if(EZ){this._diag.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()");return}eVe(fetch)&&(this._unwrap(MD,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(MD,"fetch",this._patchConstructor())}disable(){EZ||(this._unwrap(MD,"fetch"),this._usedResources=new WeakSet)}}function gVe(e){return typeof e=="object"&&e!==null&&"addEventListener"in e&&typeof e.addEventListener=="function"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"}const wZ="OT_ZONE_CONTEXT";class mVe{_enabled=!1;_zoneCounter=0;_activeContextFromZone(t){return t&&t.get(wZ)||Ms}_bindFunction(t,r){const n=this,i=function(...a){return n.with(t,()=>r.apply(this,a))};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:r.length}),i}_bindListener(t,r){const n=r;return n.__ot_listeners!==void 0||(n.__ot_listeners={},typeof n.addEventListener=="function"&&(n.addEventListener=this._patchAddEventListener(n,n.addEventListener,t)),typeof n.removeEventListener=="function"&&(n.removeEventListener=this._patchRemoveEventListener(n,n.removeEventListener))),r}_createZoneName(){this._zoneCounter++;const t=Math.random();return`${this._zoneCounter}-${t}`}_createZone(t,r){return Zone.current.fork({name:t,properties:{[wZ]:r}})}_getActiveZone(){return Zone.current}_patchAddEventListener(t,r,n){const i=this;return function(a,o,s){t.__ot_listeners===void 0&&(t.__ot_listeners={});let u=t.__ot_listeners[a];u===void 0&&(u=new WeakMap,t.__ot_listeners[a]=u);const l=i.bind(n,o);return u.set(o,l),r.call(this,a,l,s)}}_patchRemoveEventListener(t,r){return function(n,i){if(t.__ot_listeners===void 0||t.__ot_listeners[n]===void 0)return r.call(this,n,i);const a=t.__ot_listeners[n],o=a.get(i);return a.delete(i),r.call(this,n,o||i)}}active(){if(!this._enabled)return Ms;const t=this._getActiveZone(),r=this._activeContextFromZone(t);return r||Ms}bind(t,r){return t===void 0&&(t=this.active()),typeof r=="function"?this._bindFunction(t,r):(gVe(r)&&this._bindListener(t,r),r)}disable(){return this._enabled=!1,this}enable(){return this._enabled=!0,this}with(t,r,n,...i){const a=this._createZoneName();return this._createZone(a,t).run(r,n,i)}}var xZ={},SZ;function yVe(){if(SZ)return xZ;SZ=1;/**
|
|
261
|
+
c11.151,2.199,22.583,3.631,34.232,4.215c3.938,0.191,7.872,0.299,11.81,0.299C253.549,473.68,268.103,465.917,280.545,452.432z`})]});function K4e({size:e=24,color:t="currentColor"}){return C.jsx(Se.SvgIcon,{children:C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",version:"1.1",width:e,height:e,viewBox:"0 0 24 24",fill:t,children:C.jsx("path",{d:"M4,6H6V18H4V6M7,6H8V18H7V6M9,6H12V18H9V6M13,6H14V18H13V6M16,6H18V18H16V6M19,6H20V18H19V6M2,4V8H0V4A2,2 0 0,1 2,2H6V4H2M22,2A2,2 0 0,1 24,4V8H22V4H18V2H22M2,16V20H6V22H2A2,2 0 0,1 0,20V16H2M22,20V16H24V20A2,2 0 0,1 22,22H18V20H22Z"})})})}const{slice:Y4e,forEach:Q4e}=[];function X4e(e){return Q4e.call(Y4e.call(arguments,1),t=>{if(t)for(const r in t)e[r]===void 0&&(e[r]=t[r])}),e}function Z4e(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(r=>r.test(e))}const UQ=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,J4e=function(e,t){const n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(t);let a=`${e}=${i}`;if(n.maxAge>0){const o=n.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");a+=`; Max-Age=${Math.floor(o)}`}if(n.domain){if(!UQ.test(n.domain))throw new TypeError("option domain is invalid");a+=`; Domain=${n.domain}`}if(n.path){if(!UQ.test(n.path))throw new TypeError("option path is invalid");a+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(a+="; HttpOnly"),n.secure&&(a+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(a+="; Partitioned"),a},zQ={create(e,t,r,n){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+r*60*1e3)),n&&(i.domain=n),document.cookie=J4e(e,t,i)},read(e){const t=`${e}=`,r=document.cookie.split(";");for(let n=0;n<r.length;n++){let i=r[n];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return i.substring(t.length,i.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var e6e={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return zQ.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:r,cookieMinutes:n,cookieDomain:i,cookieOptions:a}=t;r&&typeof document<"u"&&zQ.create(r,e,n,i,a)}},t6e={name:"querystring",lookup(e){let{lookupQuerystring:t}=e,r;if(typeof window<"u"){let{search:n}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));const a=n.substring(1).split("&");for(let o=0;o<a.length;o++){const s=a[o].indexOf("=");s>0&&a[o].substring(0,s)===t&&(r=a[o].substring(s+1))}}return r}},r6e={name:"hash",lookup(e){let{lookupHash:t,lookupFromHashIndex:r}=e,n;if(typeof window<"u"){const{hash:i}=window.location;if(i&&i.length>2){const a=i.substring(1);if(t){const o=a.split("&");for(let s=0;s<o.length;s++){const u=o[s].indexOf("=");u>0&&o[s].substring(0,u)===t&&(n=o[s].substring(u+1))}}if(n)return n;if(!n&&r>-1){const o=i.match(/\/([a-zA-Z-]*)/g);return Array.isArray(o)?o[typeof r=="number"?r:0]?.replace("/",""):void 0}}}return n}};let hd=null;const WQ=()=>{if(hd!==null)return hd;try{if(hd=typeof window<"u"&&window.localStorage!==null,!hd)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{hd=!1}return hd};var n6e={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&WQ())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:r}=t;r&&WQ()&&window.localStorage.setItem(r,e)}};let pd=null;const HQ=()=>{if(pd!==null)return pd;try{if(pd=typeof window<"u"&&window.sessionStorage!==null,!pd)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{pd=!1}return pd};var i6e={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&HQ())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:r}=t;r&&HQ()&&window.sessionStorage.setItem(r,e)}},a6e={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:r,userLanguage:n,language:i}=navigator;if(r)for(let a=0;a<r.length;a++)t.push(r[a]);n&&t.push(n),i&&t.push(i)}return t.length>0?t:void 0}},o6e={name:"htmlTag",lookup(e){let{htmlTag:t}=e,r;const n=t||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(r=n.getAttribute("lang")),r}},s6e={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?r[typeof t=="number"?t:0]?.replace("/",""):void 0}},u6e={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const r=typeof t=="number"?t+1:1,n=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[r]}};let GQ=!1;try{document.cookie,GQ=!0}catch{}const KQ=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];GQ||KQ.splice(1,1);const l6e=()=>({order:KQ,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class YQ{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,r)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=X4e(r,this.options||{},l6e()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(e6e),this.addDetector(t6e),this.addDetector(n6e),this.addDetector(i6e),this.addDetector(a6e),this.addDetector(o6e),this.addDetector(s6e),this.addDetector(u6e),this.addDetector(r6e)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,r=[];return t.forEach(n=>{if(this.detectors[n]){let i=this.detectors[n].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(r=r.concat(i))}}),r=r.filter(n=>n!=null&&!Z4e(n)).map(n=>this.options.convertDetectedLanguage(n)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||r.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(t,this.options)}))}}YQ.type="languageDetector";const c6e=e=>{let t={};for(const n of Object.keys(e)){const i=n.match(/\w+\.json/);if(i){const a=i[0]?.split(".")[0];t={...t,[a]:{translation:e[n]}}}}const r=Object.keys(t);return hn.use(YQ).use(Ete).init({resources:t,fallbackLng:"en",interpolation:{escapeValue:!1},supportedLngs:r,missingKeyHandler:function(n,i,a){console.warn(`MISSING TRANSLATION: [${n}] ${i}:${a}`)}}),hn};function QQ({children:e}){return C.jsx(Kr,{paddingBottom:"16px",gap:"8px",children:e})}function XQ({children:e}){return C.jsx(Gd,{mt:"auto",mb:"auto",width:"100%",children:C.jsx(Se.Paper,{sx:{width:"100%"},children:C.jsx(Kr,{height:"70px",flexDirection:"row",alignItems:"center",gap:"16px",padding:"16px",children:e})})})}function ZQ({tabValue:e,columnValues:t,columnWidths:r}){const{t:n}=Qt();return C.jsx(Se.Paper,{sx:{display:"grid",gridTemplateColumns:r?.[e]??[],padding:"0.5rem",fontWeight:"bold",position:"sticky",textAlign:"center",zIndex:10,top:0,border:"none",gap:"8px"},children:t[e].map((i,a)=>C.jsx(Se.Typography,{children:C.jsx("b",{children:n(i)})},a))})}function f6e({InnerHeaderContent:e,TableHeaderContent:t,FirstTabContent:r,SecondTabContent:n,ThirdTabContent:i,tabValue:a,columnValues:o,columnWidths:s,FirstTabNearbyContent:u,SecondTabNearbyContent:l,ThirdTabNearbyContent:c}){return C.jsxs(Ju,{gap:"16px",children:[C.jsx(XQ,{children:e}),C.jsxs(OS,{gap:"16px",children:[C.jsxs(Se.Paper,{sx:{padding:"16px",overflow:"hidden",flexGrow:2,minWidth:u&&a===0||l&&a===1||c&&a===2?"70%":"unset",maxWidth:u&&a===0||l&&a===1||c&&a===2?"70%":"unset"},children:[C.jsx(QQ,{children:t}),C.jsxs(Ju,{children:[C.jsx(ZQ,{columnValues:o,columnWidths:s,tabValue:a}),C.jsx(Se.Divider,{sx:{marginBottom:"16px"}}),C.jsxs(Ju,{gap:"16px",overflow:"auto",paddingTop:0,sx:{scrollbarWidth:"none",paddingBottom:"72px"},children:[a===0?C.jsx(r,{}):null,a===1?C.jsx(n,{}):null,a===2&&i?C.jsx(i,{}):null]})]})]}),a===0&&u?C.jsx(Se.Paper,{sx:{padding:"16px",overflow:"hidden",flexGrow:1},children:u}):null,a===1&&l?C.jsx(Se.Paper,{sx:{padding:"16px",flexGrow:1,overflow:"hidden"},children:l}):null,a===2&&c?C.jsx(Se.Paper,{sx:{padding:"16px",flexGrow:1,overflow:"hidden"},children:c}):null]})]})}function d6e({children:e,position:t}){return C.jsx(J5e,{maxSnack:3,autoHideDuration:3e3,anchorOrigin:{vertical:"bottom",horizontal:t??"center"},preventDuplicate:!0,Components:{default:cv,info:cv,success:cv,error:cv,warning:cv},children:e})}const no={};function h6e(e,t){return{name:"vite-plugin-graphql-rewrite",enforce:"pre",resolveId(r,n){if(r.endsWith(".graphql")){const i=no.resolve(r),a=no.basename(i);if(!n.includes(t))return no.resolve(e,"graphQL","__generated__",`${a}.ts`);const o=no.resolve(__dirname,".."),s=n.slice(o.length).split("/")[1];return no.resolve(o,s,"__generated__",`${a}.ts`)}return null}}}function p6e(e,t){return{name:"vite-plugin-graphql-rewrite-build",enforce:"pre",resolveId(r,n){if(r.endsWith(".graphql")){const i=no.resolve(r),a=no.basename(i),o=no.resolve(e,".."),s=no.resolve(o,t,"__generated__",`${a}.ts`);return console.log("corepath",t),console.log("reporoot",o),console.log("fileproject",s),console.log("importer",n),n.includes(t)?no.resolve(o,t,"__generated__",`${a}.ts`):no.resolve(e,"graphQL","__generated__",`${a}.ts`)}return null}}}var vd=Wt(),v6e=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},oc="1.9.0",JQ=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function g6e(e){var t=new Set([e]),r=new Set,n=e.match(JQ);if(!n)return function(){return!1};var i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null)return function(u){return u===e};function a(s){return r.add(s),!1}function o(s){return t.add(s),!0}return function(u){if(t.has(u))return!0;if(r.has(u))return!1;var l=u.match(JQ);if(!l)return a(u);var c={major:+l[1],minor:+l[2],patch:+l[3],prerelease:l[4]};return c.prerelease!=null||i.major!==c.major?a(u):i.major===0?i.minor===c.minor&&i.patch<=c.patch?o(u):a(u):i.minor<=c.minor?o(u):a(u)}}var m6e=g6e(oc),y6e=oc.split(".")[0],fv=Symbol.for("opentelemetry.js.api."+y6e),dv=v6e;function hv(e,t,r,n){var i;n===void 0&&(n=!1);var a=dv[fv]=(i=dv[fv])!==null&&i!==void 0?i:{version:oc};if(!n&&a[e]){var o=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return r.error(o.stack||o.message),!1}if(a.version!==oc){var o=new Error("@opentelemetry/api: Registration of version v"+a.version+" for "+e+" does not match previously registered API v"+oc);return r.error(o.stack||o.message),!1}return a[e]=t,r.debug("@opentelemetry/api: Registered a global for "+e+" v"+oc+"."),!0}function sc(e){var t,r,n=(t=dv[fv])===null||t===void 0?void 0:t.version;if(!(!n||!m6e(n)))return(r=dv[fv])===null||r===void 0?void 0:r[e]}function pv(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+oc+".");var r=dv[fv];r&&delete r[e]}var _6e=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a},b6e=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},E6e=function(){function e(t){this._namespace=t.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return vv("debug",this._namespace,t)},e.prototype.error=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return vv("error",this._namespace,t)},e.prototype.info=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return vv("info",this._namespace,t)},e.prototype.warn=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return vv("warn",this._namespace,t)},e.prototype.verbose=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return vv("verbose",this._namespace,t)},e}();function vv(e,t,r){var n=sc("diag");if(n)return r.unshift(t),n[e].apply(n,b6e([],_6e(r),!1))}var sa;(function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"})(sa||(sa={}));function w6e(e,t){e<sa.NONE?e=sa.NONE:e>sa.ALL&&(e=sa.ALL),t=t||{};function r(n,i){var a=t[n];return typeof a=="function"&&e>=i?a.bind(t):function(){}}return{error:r("error",sa.ERROR),warn:r("warn",sa.WARN),info:r("info",sa.INFO),debug:r("debug",sa.DEBUG),verbose:r("verbose",sa.VERBOSE)}}var x6e=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a},S6e=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},R6e="diag",zo=function(){function e(){function t(i){return function(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];var s=sc("diag");if(s)return s[i].apply(s,S6e([],x6e(a),!1))}}var r=this,n=function(i,a){var o,s,u;if(a===void 0&&(a={logLevel:sa.INFO}),i===r){var l=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return r.error((o=l.stack)!==null&&o!==void 0?o:l.message),!1}typeof a=="number"&&(a={logLevel:a});var c=sc("diag"),f=w6e((s=a.logLevel)!==null&&s!==void 0?s:sa.INFO,i);if(c&&!a.suppressOverrideMessage){var d=(u=new Error().stack)!==null&&u!==void 0?u:"<failed to generate stacktrace>";c.warn("Current logger will be overwritten from "+d),f.warn("Current logger will overwrite one already registered from "+d)}return hv("diag",f,r,!0)};r.setLogger=n,r.disable=function(){pv(R6e,r)},r.createComponentLogger=function(i){return new E6e(i)},r.verbose=t("verbose"),r.debug=t("debug"),r.info=t("info"),r.warn=t("warn"),r.error=t("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}(),O6e=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a},A6e=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},T6e=function(){function e(t){this._entries=t?new Map(t):new Map}return e.prototype.getEntry=function(t){var r=this._entries.get(t);if(r)return Object.assign({},r)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(t){var r=O6e(t,2),n=r[0],i=r[1];return[n,i]})},e.prototype.setEntry=function(t,r){var n=new e(this._entries);return n._entries.set(t,r),n},e.prototype.removeEntry=function(t){var r=new e(this._entries);return r._entries.delete(t),r},e.prototype.removeEntries=function(){for(var t,r,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var a=new e(this._entries);try{for(var o=A6e(n),s=o.next();!s.done;s=o.next()){var u=s.value;a._entries.delete(u)}}catch(l){t={error:l}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return a},e.prototype.clear=function(){return new e},e}(),C6e=Symbol("BaggageEntryMetadata"),P6e=zo.instance();function N6e(e){return e===void 0&&(e={}),new T6e(new Map(Object.entries(e)))}function D6e(e){return typeof e!="string"&&(P6e.error("Cannot create baggage metadata from unknown type: "+typeof e),e=""),{__TYPE__:C6e,toString:function(){return e}}}function pD(e){return Symbol.for(e)}var I6e=function(){function e(t){var r=this;r._currentContext=t?new Map(t):new Map,r.getValue=function(n){return r._currentContext.get(n)},r.setValue=function(n,i){var a=new e(r._currentContext);return a._currentContext.set(n,i),a},r.deleteValue=function(n){var i=new e(r._currentContext);return i._currentContext.delete(n),i}}return e}(),Ms=new I6e,uc=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),k6e=function(){function e(){}return e.prototype.createGauge=function(t,r){return z6e},e.prototype.createHistogram=function(t,r){return W6e},e.prototype.createCounter=function(t,r){return U6e},e.prototype.createUpDownCounter=function(t,r){return H6e},e.prototype.createObservableGauge=function(t,r){return K6e},e.prototype.createObservableCounter=function(t,r){return G6e},e.prototype.createObservableUpDownCounter=function(t,r){return Y6e},e.prototype.addBatchObservableCallback=function(t,r){},e.prototype.removeBatchObservableCallback=function(t){},e}(),lb=function(){function e(){}return e}(),M6e=function(e){uc(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(r,n){},t}(lb),L6e=function(e){uc(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(r,n){},t}(lb),j6e=function(e){uc(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(r,n){},t}(lb),F6e=function(e){uc(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(r,n){},t}(lb),vD=function(){function e(){}return e.prototype.addCallback=function(t){},e.prototype.removeCallback=function(t){},e}(),$6e=function(e){uc(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(vD),V6e=function(e){uc(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(vD),q6e=function(e){uc(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(vD),B6e=new k6e,U6e=new M6e,z6e=new j6e,W6e=new F6e,H6e=new L6e,G6e=new $6e,K6e=new V6e,Y6e=new q6e,Q6e={get:function(e,t){if(e!=null)return e[t]},keys:function(e){return e==null?[]:Object.keys(e)}},X6e={set:function(e,t,r){e!=null&&(e[t]=r)}},Z6e=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a},J6e=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},eFe=function(){function e(){}return e.prototype.active=function(){return Ms},e.prototype.with=function(t,r,n){for(var i=[],a=3;a<arguments.length;a++)i[a-3]=arguments[a];return r.call.apply(r,J6e([n],Z6e(i),!1))},e.prototype.bind=function(t,r){return r},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}(),tFe=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a},rFe=function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},gD="context",nFe=new eFe,cb=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(t){return hv(gD,t,zo.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(t,r,n){for(var i,a=[],o=3;o<arguments.length;o++)a[o-3]=arguments[o];return(i=this._getContextManager()).with.apply(i,rFe([t,r,n],tFe(a),!1))},e.prototype.bind=function(t,r){return this._getContextManager().bind(t,r)},e.prototype._getContextManager=function(){return sc(gD)||nFe},e.prototype.disable=function(){this._getContextManager().disable(),pv(gD,zo.instance())},e}(),Ls;(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(Ls||(Ls={}));var eX="0000000000000000",tX="00000000000000000000000000000000",rX={traceId:tX,spanId:eX,traceFlags:Ls.NONE},gv=function(){function e(t){t===void 0&&(t=rX),this._spanContext=t}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(t,r){return this},e.prototype.setAttributes=function(t){return this},e.prototype.addEvent=function(t,r){return this},e.prototype.addLink=function(t){return this},e.prototype.addLinks=function(t){return this},e.prototype.setStatus=function(t){return this},e.prototype.updateName=function(t){return this},e.prototype.end=function(t){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(t,r){},e}(),mD=pD("OpenTelemetry Context Key SPAN");function yD(e){return e.getValue(mD)||void 0}function iFe(){return yD(cb.getInstance().active())}function _D(e,t){return e.setValue(mD,t)}function aFe(e){return e.deleteValue(mD)}function oFe(e,t){return _D(e,new gv(t))}function nX(e){var t;return(t=yD(e))===null||t===void 0?void 0:t.spanContext()}var sFe=/^([0-9a-f]{32})$/i,uFe=/^[0-9a-f]{16}$/i;function iX(e){return sFe.test(e)&&e!==tX}function lFe(e){return uFe.test(e)&&e!==eX}function fb(e){return iX(e.traceId)&&lFe(e.spanId)}function cFe(e){return new gv(e)}var bD=cb.getInstance(),aX=function(){function e(){}return e.prototype.startSpan=function(t,r,n){n===void 0&&(n=bD.active());var i=!!r?.root;if(i)return new gv;var a=n&&nX(n);return fFe(a)&&fb(a)?new gv(a):new gv},e.prototype.startActiveSpan=function(t,r,n,i){var a,o,s;if(!(arguments.length<2)){arguments.length===2?s=r:arguments.length===3?(a=r,s=n):(a=r,o=n,s=i);var u=o??bD.active(),l=this.startSpan(t,a,u),c=_D(u,l);return bD.with(c,s,void 0,l)}},e}();function fFe(e){return typeof e=="object"&&typeof e.spanId=="string"&&typeof e.traceId=="string"&&typeof e.traceFlags=="number"}var dFe=new aX,hFe=function(){function e(t,r,n,i){this._provider=t,this.name=r,this.version=n,this.options=i}return e.prototype.startSpan=function(t,r,n){return this._getTracer().startSpan(t,r,n)},e.prototype.startActiveSpan=function(t,r,n,i){var a=this._getTracer();return Reflect.apply(a.startActiveSpan,a,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateTracer(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):dFe},e}(),pFe=function(){function e(){}return e.prototype.getTracer=function(t,r,n){return new aX},e}(),vFe=new pFe,oX=function(){function e(){}return e.prototype.getTracer=function(t,r,n){var i;return(i=this.getDelegateTracer(t,r,n))!==null&&i!==void 0?i:new hFe(this,t,r,n)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:vFe},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateTracer=function(t,r,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(t,r,n)},e}(),db;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(db||(db={}));var hb;(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(hb||(hb={}));var lc;(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(lc||(lc={}));var zn=cb.getInstance(),vr=zo.instance(),gFe=function(){function e(){}return e.prototype.getMeter=function(t,r,n){return B6e},e}(),mFe=new gFe,ED="metrics",yFe=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalMeterProvider=function(t){return hv(ED,t,zo.instance())},e.prototype.getMeterProvider=function(){return sc(ED)||mFe},e.prototype.getMeter=function(t,r,n){return this.getMeterProvider().getMeter(t,r,n)},e.prototype.disable=function(){pv(ED,zo.instance())},e}(),sX=yFe.getInstance(),_Fe=function(){function e(){}return e.prototype.inject=function(t,r){},e.prototype.extract=function(t,r){return t},e.prototype.fields=function(){return[]},e}(),wD=pD("OpenTelemetry Baggage Key");function uX(e){return e.getValue(wD)||void 0}function bFe(){return uX(cb.getInstance().active())}function EFe(e,t){return e.setValue(wD,t)}function wFe(e){return e.deleteValue(wD)}var xD="propagation",xFe=new _Fe,SFe=function(){function e(){this.createBaggage=N6e,this.getBaggage=uX,this.getActiveBaggage=bFe,this.setBaggage=EFe,this.deleteBaggage=wFe}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(t){return hv(xD,t,zo.instance())},e.prototype.inject=function(t,r,n){return n===void 0&&(n=X6e),this._getGlobalPropagator().inject(t,r,n)},e.prototype.extract=function(t,r,n){return n===void 0&&(n=Q6e),this._getGlobalPropagator().extract(t,r,n)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){pv(xD,zo.instance())},e.prototype._getGlobalPropagator=function(){return sc(xD)||xFe},e}(),Wo=SFe.getInstance(),SD="trace",RFe=function(){function e(){this._proxyTracerProvider=new oX,this.wrapSpanContext=cFe,this.isSpanContextValid=fb,this.deleteSpan=aFe,this.getSpan=yD,this.getActiveSpan=iFe,this.getSpanContext=nX,this.setSpan=_D,this.setSpanContext=oFe}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(t){var r=hv(SD,this._proxyTracerProvider,zo.instance());return r&&this._proxyTracerProvider.setDelegate(t),r},e.prototype.getTracerProvider=function(){return sc(SD)||this._proxyTracerProvider},e.prototype.getTracer=function(t,r){return this.getTracerProvider().getTracer(t,r)},e.prototype.disable=function(){pv(SD,zo.instance()),this._proxyTracerProvider=new oX},e}(),Si=RFe.getInstance();function Bi(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function cc(e){return Bi(e)==="object"}function OFe(e){return Array.isArray(e)&&e.length>0&&e.every(t=>"message"in t)}function lX(e,t){return e.length<124?e:t}const AFe="graphql-transport-ws";var Da=(e=>(e[e.InternalServerError=4500]="InternalServerError",e[e.InternalClientError=4005]="InternalClientError",e[e.BadRequest=4400]="BadRequest",e[e.BadResponse=4004]="BadResponse",e[e.Unauthorized=4401]="Unauthorized",e[e.Forbidden=4403]="Forbidden",e[e.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",e[e.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",e[e.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",e[e.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",e[e.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",e))(Da||{}),Ia=(e=>(e.ConnectionInit="connection_init",e.ConnectionAck="connection_ack",e.Ping="ping",e.Pong="pong",e.Subscribe="subscribe",e.Next="next",e.Error="error",e.Complete="complete",e))(Ia||{});function cX(e){if(!cc(e))throw new Error(`Message is expected to be an object, but got ${Bi(e)}`);if(!e.type)throw new Error("Message is missing the 'type' property");if(typeof e.type!="string")throw new Error(`Message is expects the 'type' property to be a string, but got ${Bi(e.type)}`);switch(e.type){case"connection_init":case"connection_ack":case"ping":case"pong":{if(e.payload!=null&&!cc(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break}case"subscribe":{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${Bi(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!cc(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${Bi(e.payload)}`);if(typeof e.payload.query!="string")throw new Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${Bi(e.payload.query)}`);if(e.payload.variables!=null&&!cc(e.payload.variables))throw new Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${Bi(e.payload.variables)}`);if(e.payload.operationName!=null&&Bi(e.payload.operationName)!=="string")throw new Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${Bi(e.payload.operationName)}`);if(e.payload.extensions!=null&&!cc(e.payload.extensions))throw new Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${Bi(e.payload.extensions)}`);break}case"next":{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${Bi(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!cc(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${Bi(e.payload)}`);break}case"error":{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${Bi(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);if(!OFe(e.payload))throw new Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break}case"complete":{if(typeof e.id!="string")throw new Error(`"${e.type}" message expects the 'id' property to be a string, but got ${Bi(e.id)}`);if(!e.id)throw new Error(`"${e.type}" message requires a non-empty 'id' property`);break}default:throw new Error(`Invalid message 'type' property "${e.type}"`)}return e}function TFe(e,t){return cX(typeof e=="string"?JSON.parse(e,t):e)}function mv(e,t){return cX(e),JSON.stringify(e,t)}function CFe(e){const{url:t,connectionParams:r,lazy:n=!0,onNonLazyError:i=console.error,lazyCloseTimeout:a=0,keepAlive:o=0,disablePong:s,connectionAckWaitTimeout:u=0,retryAttempts:l=5,retryWait:c=async function(I){const L=Math.pow(2,I);await new Promise(B=>setTimeout(B,L*1e3+Math.floor(Math.random()*2700+300)))},shouldRetry:f=RD,on:d,webSocketImpl:h,generateID:m=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,I=>{const L=Math.random()*16|0;return(I=="x"?L:L&3|8).toString(16)})},jsonMessageReplacer:p,jsonMessageReviver:g}=e;let y;if(h){if(!NFe(h))throw new Error("Invalid WebSocket implementation provided");y=h}else typeof WebSocket<"u"?y=WebSocket:typeof global<"u"?y=global.WebSocket||global.MozWebSocket:typeof window<"u"&&(y=window.WebSocket||window.MozWebSocket);if(!y)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const b=y,E=(()=>{const A=(()=>{const L={};return{on(B,H){return L[B]=H,()=>{delete L[B]}},emit(B){"id"in B&&L[B.id]?.(B)}}})(),I={connecting:d?.connecting?[d.connecting]:[],opened:d?.opened?[d.opened]:[],connected:d?.connected?[d.connected]:[],ping:d?.ping?[d.ping]:[],pong:d?.pong?[d.pong]:[],message:d?.message?[A.emit,d.message]:[A.emit],closed:d?.closed?[d.closed]:[],error:d?.error?[d.error]:[]};return{onMessage:A.on,on(L,B){const H=I[L];return H.push(B),()=>{H.splice(H.indexOf(B),1)}},emit(L,...B){for(const H of[...I[L]])H(...B)}}})();function w(A){const I=[E.on("error",L=>{I.forEach(B=>B()),A(L)}),E.on("closed",L=>{I.forEach(B=>B()),A(L)})]}let x,R=0,S,j=!1,M=0,k=!1;async function F(){clearTimeout(S);const[A,I]=await(x??(x=new Promise((H,U)=>(async()=>{if(j){if(await c(M),!R)return x=void 0,U({code:1e3,reason:"All Subscriptions Gone"});M++}E.emit("connecting",j);const T=new b(typeof t=="function"?await t():t,AFe);let D,O;function $(){isFinite(o)&&o>0&&(clearTimeout(O),O=setTimeout(()=>{T.readyState===b.OPEN&&(T.send(mv({type:Ia.Ping})),E.emit("ping",!1,void 0))},o))}w(W=>{x=void 0,clearTimeout(D),clearTimeout(O),U(W),W instanceof fX&&(T.close(4499,"Terminated"),T.onerror=null,T.onclose=null)}),T.onerror=W=>E.emit("error",W),T.onclose=W=>E.emit("closed",W),T.onopen=async()=>{try{E.emit("opened",T);const W=typeof r=="function"?await r():r;if(T.readyState!==b.OPEN)return;T.send(mv(W?{type:Ia.ConnectionInit,payload:W}:{type:Ia.ConnectionInit},p)),isFinite(u)&&u>0&&(D=setTimeout(()=>{T.close(Da.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},u)),$()}catch(W){E.emit("error",W),T.close(Da.InternalClientError,lX(W instanceof Error?W.message:String(W),"Internal client error"))}};let q=!1;T.onmessage=({data:W})=>{try{const z=TFe(W,g);if(E.emit("message",z),z.type==="ping"||z.type==="pong"){E.emit(z.type,!0,z.payload),z.type==="pong"?$():s||(T.send(mv(z.payload?{type:Ia.Pong,payload:z.payload}:{type:Ia.Pong})),E.emit("pong",!1,z.payload));return}if(q)return;if(z.type!==Ia.ConnectionAck)throw new Error(`First message cannot be of type ${z.type}`);clearTimeout(D),q=!0,E.emit("connected",T,z.payload,j),j=!1,M=0,H([T,new Promise((Y,Q)=>w(Q))])}catch(z){T.onmessage=null,E.emit("error",z),T.close(Da.BadResponse,lX(z instanceof Error?z.message:String(z),"Bad response"))}}})())));A.readyState===b.CLOSING&&await I;let L=()=>{};const B=new Promise(H=>L=H);return[A,L,Promise.race([B.then(()=>{if(!R){const H=()=>A.close(1e3,"Normal Closure");isFinite(a)&&a>0?S=setTimeout(()=>{A.readyState===b.OPEN&&H()},a):H()}}),I])]}function V(A){if(RD(A)&&(PFe(A.code)||[Da.InternalServerError,Da.InternalClientError,Da.BadRequest,Da.BadResponse,Da.Unauthorized,Da.SubprotocolNotAcceptable,Da.SubscriberAlreadyExists,Da.TooManyInitialisationRequests].includes(A.code)))throw A;if(k)return!1;if(RD(A)&&A.code===1e3)return R>0;if(!l||M>=l||!f(A))throw A;return j=!0}n||(async()=>{for(R++;;)try{const[,,A]=await F();await A}catch(A){try{if(!V(A))return}catch(I){return i?.(I)}}})();function P(A,I){const L=m(A);let B=!1,H=!1,U=()=>{R--,B=!0};return(async()=>{for(R++;;)try{const[T,D,O]=await F();if(B)return D();const $=E.onMessage(L,q=>{switch(q.type){case Ia.Next:{I.next(q.payload);return}case Ia.Error:{H=!0,B=!0,I.error(q.payload),U();return}case Ia.Complete:{B=!0,U();return}}});T.send(mv({id:L,type:Ia.Subscribe,payload:A},p)),U=()=>{!B&&T.readyState===b.OPEN&&T.send(mv({id:L,type:Ia.Complete},p)),R--,B=!0,D()},await O.finally($);return}catch(T){if(!V(T))return}})().then(()=>{H||I.complete()}).catch(T=>{I.error(T)}),()=>{B||U()}}return{on:E.on,subscribe:P,iterate(A){const I=[],L={done:!1,error:null,resolve:()=>{}},B=P(A,{next(U){I.push(U),L.resolve()},error(U){L.done=!0,L.error=U,L.resolve()},complete(){L.done=!0,L.resolve()}}),H=async function*(){for(;;){for(I.length||await new Promise(T=>L.resolve=T);I.length;)yield I.shift();if(L.error)throw L.error;if(L.done)return}}();return H.throw=async U=>(L.done||(L.done=!0,L.error=U,L.resolve()),{done:!0,value:void 0}),H.return=async()=>(B(),{done:!0,value:void 0}),H},async dispose(){if(k=!0,x){const[A]=await x;A.close(1e3,"Normal Closure")}},terminate(){x&&E.emit("closed",new fX)}}}class fX extends Error{name="TerminatedCloseEvent";message="4499: Terminated";code=4499;reason="Terminated";wasClean=!1}function RD(e){return cc(e)&&"code"in e&&"reason"in e}function PFe(e){return[1e3,1001,1006,1005,1012,1013,1014].includes(e)?!1:e>=1e3&&e<=1999}function NFe(e){return typeof e=="function"&&"constructor"in e&&"CLOSED"in e&&"CLOSING"in e&&"CONNECTING"in e&&"OPEN"in e}const DFe=e=>CFe({url:e.API_URL}),IFe=(e,t,r)=>vd.Observable.create(n=>DFe(r).subscribe({operationName:e.name,query:e.text,variables:t},n)),kFe=(e,t,r)=>vd.Observable.from(zn.with(zn.active(),()=>{const n=Si.getTracer("RelayNetwork").startSpan("GraphQL fetch");n.setAttribute("variables",JSON.stringify(t)),n.setAttribute("path",e.name);const i=n.spanContext();return fetch(r.API_URL,{method:"POST",headers:{"Content-Type":"application/json",traceparent:`00-${i.traceId}-${i.spanId}-01`,...localStorage.getItem("token")?{authorization:localStorage.getItem("token")}:{},"x-auth-scheme":r.AUTH_SCHEMA,...r.CUSTOM_HEADERS},body:JSON.stringify({query:e.text,variables:t}),...r.AUTH_SCHEMA==="Cookies"?{credentials:"include"}:{}}).then(a=>a.json().then(o=>(o.errors?(n.setStatus({code:lc.ERROR}),n.recordException(JSON.stringify(o.errors))):n.setStatus({code:lc.OK}),o))).catch(a=>{n.setStatus({code:lc.ERROR}),n.recordException(JSON.stringify(a))}).finally(()=>n.end())})),MFe=e=>{const t=e.id;return t!==null&&typeof t!="string"?String(t):t};function dX(e){return new vd.Environment({network:vd.Network.create((t,r)=>kFe(t,r,e),(t,r)=>IFe(t,r,e)),store:new vd.Store(new vd.RecordSource),getDataID:MFe})}function LFe({children:e}){const t=Og();return C.jsx(X9.RelayEnvironmentProvider,{environment:dX(t),children:e})}const jFe=(e,t,r)=>{const n=[];for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)){const a=e[i],o=i.match(/pages\/(?!core)(.*)\/index\.ts?$/);if(!o)continue;const s=o[1],u=Object.keys(t).find(y=>y.includes(`${s}/loader.ts`)),l=Object.keys(r).find(y=>y.includes(`${s}/action.ts`)),c=s.match(/\[(.+)\]/)?s.replace(/\[(.+)\]/,"$1/:data"):s.replace(/\/index/,""),f=s==="index"?"/":`${c.toLowerCase()}`,d=K.lazy(a),h=K.lazy(async()=>({default:(await a()).icon||ite})),m=u?t[u].default:void 0,p=l?r[l].default:void 0,g={id:f,Icon:h,name:c,path:f,element:C.jsx(K.Suspense,{fallback:C.jsx(Sg,{}),children:C.jsx(d,{})}),...u?{loader:m}:{},...l?{action:p}:{}};n.push(g)}return n};var hX=(e=>(e[e.Container=1]="Container",e[e.File=2]="File",e[e.Rad=3]="Rad",e))(hX||{});const yv={},pX=(e,t)=>e.unstable_is?e.unstable_is(t):t===e,vX=e=>"init"in e,OD=e=>!!e.write,gX=e=>"v"in e||"e"in e,pb=e=>{if("e"in e)throw e.e;if((yv?"production":void 0)!=="production"&&!("v"in e))throw new Error("[Bug] atom state is not initialized");return e.v},vb=new WeakMap,mX=e=>{var t;return gb(e)&&!!((t=vb.get(e))!=null&&t[0])},FFe=e=>{const t=vb.get(e);t?.[0]&&(t[0]=!1,t[1].forEach(r=>r()))},$Fe=(e,t)=>{let r=vb.get(e);if(!r){r=[!0,new Set],vb.set(e,r);const n=()=>{r[0]=!1};e.then(n,n)}r[1].add(t)},gb=e=>typeof e?.then=="function",yX=(e,t,r)=>{r.p.has(e)||(r.p.add(e),t.then(()=>{r.p.delete(e)},()=>{r.p.delete(e)}))},AD=(e,t,r)=>{const n=r(e),i="v"in n,a=n.v;if(gb(t))for(const o of n.d.keys())yX(e,t,r(o));n.v=t,delete n.e,(!i||!Object.is(a,n.v))&&(++n.n,gb(a)&&FFe(a))},_X=(e,t,r)=>{var n;const i=new Set;for(const a of((n=r.get(e))==null?void 0:n.t)||[])r.has(a)&&i.add(a);for(const a of t.p)i.add(a);return i},VFe=()=>{const e=new Set,t=()=>{e.forEach(r=>r())};return t.add=r=>(e.add(r),()=>{e.delete(r)}),t},TD=()=>{const e={},t=new WeakMap,r=n=>{var i,a;(i=t.get(e))==null||i.forEach(o=>o(n)),(a=t.get(n))==null||a.forEach(o=>o())};return r.add=(n,i)=>{const a=n||e,o=(t.has(a)?t:t.set(a,new Set)).get(a);return o.add(i),()=>{o?.delete(i),o.size||t.delete(a)}},r},qFe=e=>(e.c||(e.c=TD()),e.m||(e.m=TD()),e.u||(e.u=TD()),e.f||(e.f=VFe()),e),BFe=Symbol(),bX=(e=new WeakMap,t=new WeakMap,r=new WeakMap,n=new Set,i=new Set,a=new Set,o={},s=(d,...h)=>d.read(...h),u=(d,...h)=>d.write(...h),l=(d,h)=>{var m;return(m=d.unstable_onInit)==null?void 0:m.call(d,h)},c=(d,h)=>{var m;return(m=d.onMount)==null?void 0:m.call(d,h)},...f)=>{const d=f[0]||(S=>{if((yv?"production":void 0)!=="production"&&!S)throw new Error("Atom is undefined or null");let j=e.get(S);return j||(j={d:new Map,p:new Set,n:0},e.set(S,j),l?.(S,R)),j}),h=f[1]||(()=>{const S=[],j=M=>{try{M()}catch(k){S.push(k)}};do{o.f&&j(o.f);const M=new Set,k=M.add.bind(M);n.forEach(F=>{var V;return(V=t.get(F))==null?void 0:V.l.forEach(k)}),n.clear(),a.forEach(k),a.clear(),i.forEach(k),i.clear(),M.forEach(j),n.size&&m()}while(n.size||a.size||i.size);if(S.length)throw new AggregateError(S)}),m=f[2]||(()=>{const S=[],j=new WeakSet,M=new WeakSet,k=Array.from(n);for(;k.length;){const F=k[k.length-1],V=d(F);if(M.has(F)){k.pop();continue}if(j.has(F)){if(r.get(F)===V.n)S.push([F,V]);else if((yv?"production":void 0)!=="production"&&r.has(F))throw new Error("[Bug] invalidated atom exists");M.add(F),k.pop();continue}j.add(F);for(const P of _X(F,V,t))j.has(P)||k.push(P)}for(let F=S.length-1;F>=0;--F){const[V,P]=S[F];let A=!1;for(const I of P.d.keys())if(I!==V&&n.has(I)){A=!0;break}A&&(p(V),b(V)),r.delete(V)}}),p=f[3]||(S=>{var j;const M=d(S);if(gX(M)&&(t.has(S)&&r.get(S)!==M.n||Array.from(M.d).every(([B,H])=>p(B).n===H)))return M;M.d.clear();let k=!0;const F=()=>{t.has(S)&&(b(S),m(),h())},V=B=>{var H;if(pX(S,B)){const T=d(B);if(!gX(T))if(vX(B))AD(B,B.init,d);else throw new Error("no atom init");return pb(T)}const U=p(B);try{return pb(U)}finally{M.d.set(B,U.n),mX(M.v)&&yX(S,M.v,U),(H=t.get(B))==null||H.t.add(S),k||F()}};let P,A;const I={get signal(){return P||(P=new AbortController),P.signal},get setSelf(){return(yv?"production":void 0)!=="production"&&!OD(S)&&console.warn("setSelf function cannot be used with read-only atom"),!A&&OD(S)&&(A=(...B)=>{if((yv?"production":void 0)!=="production"&&k&&console.warn("setSelf function cannot be called in sync"),!k)try{return y(S,...B)}finally{m(),h()}}),A}},L=M.n;try{const B=s(S,V,I);return AD(S,B,d),gb(B)&&($Fe(B,()=>P?.abort()),B.then(F,F)),M}catch(B){return delete M.v,M.e=B,++M.n,M}finally{k=!1,L!==M.n&&r.get(S)===L&&(r.set(S,M.n),n.add(S),(j=o.c)==null||j.call(o,S))}}),g=f[4]||(S=>{const j=[S];for(;j.length;){const M=j.pop(),k=d(M);for(const F of _X(M,k,t)){const V=d(F);r.set(F,V.n),j.push(F)}}}),y=f[5]||((S,...j)=>{let M=!0;const k=V=>pb(p(V)),F=(V,...P)=>{var A;const I=d(V);try{if(pX(S,V)){if(!vX(V))throw new Error("atom not writable");const L=I.n,B=P[0];AD(V,B,d),b(V),L!==I.n&&(n.add(V),(A=o.c)==null||A.call(o,V),g(V));return}else return y(V,...P)}finally{M||(m(),h())}};try{return u(S,k,F,...j)}finally{M=!1}}),b=f[6]||(S=>{var j;const M=d(S),k=t.get(S);if(k&&!mX(M.v)){for(const[F,V]of M.d)if(!k.d.has(F)){const P=d(F);E(F).t.add(S),k.d.add(F),V!==P.n&&(n.add(F),(j=o.c)==null||j.call(o,F),g(F))}for(const F of k.d||[])if(!M.d.has(F)){k.d.delete(F);const V=w(F);V?.t.delete(S)}}}),E=f[7]||(S=>{var j;const M=d(S);let k=t.get(S);if(!k){p(S);for(const F of M.d.keys())E(F).t.add(S);if(k={l:new Set,d:new Set(M.d.keys()),t:new Set},t.set(S,k),(j=o.m)==null||j.call(o,S),OD(S)){const F=()=>{let V=!0;const P=(...A)=>{try{return y(S,...A)}finally{V||(m(),h())}};try{const A=c(S,P);A&&(k.u=()=>{V=!0;try{A()}finally{V=!1}})}finally{V=!1}};i.add(F)}}return k}),w=f[8]||(S=>{var j;const M=d(S);let k=t.get(S);if(k&&!k.l.size&&!Array.from(k.t).some(F=>{var V;return(V=t.get(F))==null?void 0:V.d.has(S)})){k.u&&a.add(k.u),k=void 0,t.delete(S),(j=o.u)==null||j.call(o,S);for(const F of M.d.keys()){const V=w(F);V?.t.delete(S)}return}return k}),x=[e,t,r,n,i,a,o,s,u,l,c,d,h,m,p,g,y,b,E,w],R={get:S=>pb(p(S)),set:(S,...j)=>{try{return y(S,...j)}finally{m(),h()}},sub:(S,j)=>{const k=E(S).l;return k.add(j),h(),()=>{k.delete(j),w(S),h()}}};return Object.defineProperty(R,BFe,{value:x}),R},UFe=qFe,CD={};let zFe=0;function WFe(e,t){const r=`atom${++zFe}`,n={toString(){return(CD?"production":void 0)!=="production"&&this.debugLabel?r+":"+this.debugLabel:r}};return typeof e=="function"?n.read=e:(n.init=e,n.read=HFe,n.write=GFe),n}function HFe(e){return e(this)}function GFe(e,t,r){return t(this,typeof r=="function"?r(e(this)):r)}const KFe=()=>{let e=0;const t=UFe({}),r=new WeakMap,n=new WeakMap,i=bX(r,n,void 0,void 0,void 0,void 0,t,void 0,(s,u,l,...c)=>e?l(s,...c):s.write(u,l,...c)),a=new Set;return t.m.add(void 0,s=>{a.add(s);const u=r.get(s);u.m=n.get(s)}),t.u.add(void 0,s=>{a.delete(s);const u=r.get(s);delete u.m}),Object.assign(i,{dev4_get_internal_weak_map:()=>(console.log("Deprecated: Use devstore from the devtools library"),r),dev4_get_mounted_atoms:()=>a,dev4_restore_atoms:s=>{const u={read:()=>null,write:(l,c)=>{++e;try{for(const[f,d]of s)"init"in f&&c(f,d)}finally{--e}}};i.set(u)}})};function YFe(){return(CD?"production":void 0)!=="production"?KFe():bX()}let _v;function QFe(){return _v||(_v=YFe(),(CD?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=_v),globalThis.__JOTAI_DEFAULT_STORE__!==_v&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),_v}const XFe={createState:e=>{const t=WFe(e),r=QFe();return{get:()=>r.get(t),set:n=>r.set(t,n),subscribe:n=>{const i=()=>{const a=r.get(t);n(a)};return r.sub(t,i)}}},type:"jotaiAdapter"};function ZFe(){return{createState:e=>{const t=Qce({key:`recoilAtom_${Math.random()}`,default:e});return{get:()=>(console.log("Getting value from Recoil atom"),Xce(t)),set:a=>{console.log("Setting value to Recoil atom"),Zce(t)(a)},subscribe:a=>(console.log("Subscribing to Recoil atom"),Jce(({snapshot:s})=>()=>{const u=s.getLoadable(t).contents;a(u)}))}},type:"recoilAdapter"}}function EX(){return K.createContext([!1,{}])}function JFe({timer:e,children:t}){const r=Q5(e),n=EX();return C.jsx(n.Provider,{value:r,children:t})}const wX={palette:{greyCustom:{main:"#787474",light:"#f8f4f4",dark:"#464646"}},components:{MuiButton:{defaultProps:{variant:"contained",disableElevation:!0},styleOverrides:{root:{borderRadius:"24px",textTransform:"capitalize",fontSize:"1rem"}}},MuiOutlinedInput:{styleOverrides:{root:{borderRadius:"12px"}},defaultProps:{style:{borderRadius:"12px"}}},MuiSelect:{defaultProps:{IconComponent:ate}},MuiFilledInput:{defaultProps:{sx:{backgroundColor:"rgba(255,255,255,0.3)",borderRadius:"12px","&:hover::before":{border:"unset!important"},"&::before":{borderBottom:"unset"},"&::after":{borderBottom:"unset"}}}},MuiTextField:{defaultProps:{fullWidth:!0,variant:"outlined"}},MuiFormControl:{defaultProps:{fullWidth:!0,variant:"outlined"}},MuiPaper:{defaultProps:{variant:"outlined"},styleOverrides:{root:{borderRadius:"18px",backgroundImage:"unset",transition:"all 0.5s ease-in-out"}}},MuiCheckbox:{defaultProps:{color:"primary"}},MuiTypography:{defaultProps:{variant:"body1"}}},typography:{fontFamily:"Manrope"}},e8e={light:e=>ck.deepmerge({...wX,...e},{palette:{primary:{main:"#00796b",border:"rgba(0, 0, 0, 0.12)"},mode:"light",background:{default:"#fafafa"}}}),dark:e=>ck.deepmerge({...wX,...e},{palette:{primary:{main:"#009f93",border:"rgba(255, 255, 255, 0.12)"},mode:"dark",background:{default:"#111111",paper:"#171717"}}})};function t8e({children:e,theme:t}){const[r]=qc();return C.jsx(Se.ThemeProvider,{theme:Se.createTheme(e8e[r](t)),children:e})}const r8e=(e,t,r)=>{if(!od(e))return;const n=new Date(e);switch(r){case"milliseconds":n.setMilliseconds(n.getMilliseconds()+t);break;case"seconds":n.setSeconds(n.getSeconds()+t);break;case"minutes":n.setMinutes(n.getMinutes()+t);break;case"hours":n.setHours(n.getHours()+t);break;case"days":n.setDate(n.getDate()+t);break;case"weeks":n.setDate(n.getDate()+t*7);break;case"months":n.setMonth(n.getMonth()+t);break;case"years":n.setFullYear(n.getFullYear()+t);break;default:throw new Error(`Unsupported time unit: ${r}`)}return n};var xX=(e=>(e[e.days=86400]="days",e[e.hours=3600]="hours",e[e.minutes=6e4]="minutes",e[e.seconds=1e3]="seconds",e[e.milliseconds=1]="milliseconds",e))(xX||{});const n8e=(e,t,r="milliseconds")=>{if(!od(e)||!od(t))return;const n=new Date(e).getTime();return(new Date(t).getTime()-n)/xX[r]},i8e=e=>{if(e==null)return"";const t=Math.floor(e/(3600*24)),r=Math.floor(e%(3600*24)/3600),n=Math.floor(e%3600/60),i=e%60;return[t?`${t}d`:"",r?`${r}h`:"",n?`${n}min`:"",i?`${i}sec`:""].filter(Boolean).join(" ")},a8e=(e,t,r)=>{if(!od(e))throw new Error("Invalid Date");const n=new Date(e);switch(r){case"milliseconds":n.setMilliseconds(n.getMilliseconds()-t);break;case"seconds":n.setSeconds(n.getSeconds()-t);break;case"minutes":n.setMinutes(n.getMinutes()-t);break;case"hours":n.setHours(n.getHours()-t);break;case"days":n.setDate(n.getDate()-t);break;case"weeks":n.setDate(n.getDate()-t*7);break;case"months":n.setMonth(n.getMonth()-t);break;case"years":n.setFullYear(n.getFullYear()-t);break;default:throw new Error(`Unsupported time unit: ${r}`)}return n},o8e=(e,t)=>e<=1?12:Math.floor(12/t),s8e=(e,t)=>(e&t)===t;function u8e(e){const t={};function r(n){Object.prototype.hasOwnProperty.call(n,"edges")&&(t.edges=n.edges);for(const i in n)typeof n[i]=="object"&&n[i]!==null&&r(n[i])}return r(e),t}const l8e=(e,t)=>{if(e==null)return 0;if(isNaN(e))return e;const r=[...Array(t)].reduce(n=>n+"0",".");return e.toFixed(t).toString().replace(r,"")},SX=pD("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function c8e(e){return e.setValue(SX,!0)}function PD(e){return e.getValue(SX)===!0}const f8e="=",ND=";",DD=",",ID="baggage",d8e=180,h8e=4096,p8e=8192;function v8e(e){return e.reduce((t,r)=>{const n=`${t}${t!==""?DD:""}${r}`;return n.length>p8e?t:n},"")}function g8e(e){return e.getAllEntries().map(([t,r])=>{let n=`${encodeURIComponent(t)}=${encodeURIComponent(r.value)}`;return r.metadata!==void 0&&(n+=ND+r.metadata.toString()),n})}function m8e(e){const t=e.split(ND);if(t.length<=0)return;const r=t.shift();if(!r)return;const n=r.indexOf(f8e);if(n<=0)return;const i=decodeURIComponent(r.substring(0,n).trim()),a=decodeURIComponent(r.substring(n+1).trim());let o;return t.length>0&&(o=D6e(t.join(ND))),{key:i,value:a,metadata:o}}class y8e{inject(t,r,n){const i=Wo.getBaggage(t);if(!i||PD(t))return;const a=g8e(i).filter(s=>s.length<=h8e).slice(0,d8e),o=v8e(a);o.length>0&&n.set(r,ID,o)}extract(t,r,n){const i=n.get(r,ID),a=Array.isArray(i)?i.join(DD):i;if(!a)return t;const o={};return a.length===0||(a.split(DD).forEach(u=>{const l=m8e(u);if(l){const c={value:l.value};l.metadata&&(c.metadata=l.metadata),o[l.key]=c}}),Object.entries(o).length===0)?t:Wo.setBaggage(t,Wo.createBaggage(o))}fields(){return[ID]}}function mb(e){const t={};if(typeof e!="object"||e==null)return t;for(const[r,n]of Object.entries(e)){if(!_8e(r)){vr.warn(`Invalid attribute key: ${r}`);continue}if(!RX(n)){vr.warn(`Invalid attribute value set for key: ${r}`);continue}Array.isArray(n)?t[r]=n.slice():t[r]=n}return t}function _8e(e){return typeof e=="string"&&e.length>0}function RX(e){return e==null?!0:Array.isArray(e)?b8e(e):OX(e)}function b8e(e){let t;for(const r of e)if(r!=null){if(!t){if(OX(r)){t=typeof r;continue}return!1}if(typeof r!==t)return!1}return!0}function OX(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}function E8e(){return e=>{vr.error(w8e(e))}}function w8e(e){return typeof e=="string"?e:JSON.stringify(x8e(e))}function x8e(e){const t={};let r=e;for(;r!==null;)Object.getOwnPropertyNames(r).forEach(n=>{if(t[n])return;const i=r[n];i&&(t[n]=String(i))}),r=Object.getPrototypeOf(r);return t}let S8e=E8e();function kD(e){try{S8e(e)}catch{}}function GGe(e){}const MD=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},gd=performance,R8e="2.0.1",O8e="error.type",LD="exception.message",A8e="exception.stacktrace",jD="exception.type",T8e="http.request.method",C8e="http.request.method_original",P8e="http.response.status_code",N8e="server.address",D8e="server.port",AX="service.name",FD="telemetry.sdk.language",I8e="webjs",$D="telemetry.sdk.name",VD="telemetry.sdk.version",k8e="url.full",M8e="process.runtime.name",qD={[$D]:"opentelemetry",[M8e]:"browser",[FD]:I8e,[VD]:R8e},L8e=9,j8e=Math.pow(10,6),yb=Math.pow(10,L8e);function js(e){const t=e/1e3,r=Math.trunc(t),n=Math.round(e%1e3*j8e);return[r,n]}function BD(){let e=gd.timeOrigin;if(typeof e!="number"){const t=gd;e=t.timing&&t.timing.fetchStart}return e}function _b(e){const t=js(BD()),r=js(typeof e=="number"?e:gd.now());return PX(t,r)}function bv(e){if(UD(e))return e;if(typeof e=="number")return e<BD()?_b(e):js(e);if(e instanceof Date)return js(e.getTime());throw TypeError("Invalid input type")}function F8e(e,t){let r=t[0]-e[0],n=t[1]-e[1];return n<0&&(r-=1,n+=yb),[r,n]}function Fs(e){return e[0]*yb+e[1]}function TX(e){return e[0]*1e6+e[1]/1e3}function UD(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}function CX(e){return UD(e)||typeof e=="number"||e instanceof Date}function PX(e,t){const r=[e[0]+t[0],e[1]+t[1]];return r[1]>=yb&&(r[1]-=yb,r[0]+=1),r}var io;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(io||(io={}));class $8e{_propagators;_fields;constructor(t={}){this._propagators=t.propagators??[],this._fields=Array.from(new Set(this._propagators.map(r=>typeof r.fields=="function"?r.fields():[]).reduce((r,n)=>r.concat(n),[])))}inject(t,r,n){for(const i of this._propagators)try{i.inject(t,r,n)}catch(a){vr.warn(`Failed to inject with ${i.constructor.name}. Err: ${a.message}`)}}extract(t,r,n){return this._propagators.reduce((i,a)=>{try{return a.extract(i,r,n)}catch(o){vr.warn(`Failed to extract with ${a.constructor.name}. Err: ${o.message}`)}return i},t)}fields(){return this._fields.slice()}}const zD="[_0-9a-z-*/]",V8e=`[a-z]${zD}{0,255}`,q8e=`[a-z0-9]${zD}{0,240}@[a-z]${zD}{0,13}`,B8e=new RegExp(`^(?:${V8e}|${q8e})$`),U8e=/^[ -~]{0,255}[!-~]$/,z8e=/,|=/;function W8e(e){return B8e.test(e)}function H8e(e){return U8e.test(e)&&!z8e.test(e)}const NX=32,G8e=512,DX=",",IX="=";class WD{_internalState=new Map;constructor(t){t&&this._parse(t)}set(t,r){const n=this._clone();return n._internalState.has(t)&&n._internalState.delete(t),n._internalState.set(t,r),n}unset(t){const r=this._clone();return r._internalState.delete(t),r}get(t){return this._internalState.get(t)}serialize(){return this._keys().reduce((t,r)=>(t.push(r+IX+this.get(r)),t),[]).join(DX)}_parse(t){t.length>G8e||(this._internalState=t.split(DX).reverse().reduce((r,n)=>{const i=n.trim(),a=i.indexOf(IX);if(a!==-1){const o=i.slice(0,a),s=i.slice(a+1,n.length);W8e(o)&&H8e(s)&&r.set(o,s)}return r},new Map),this._internalState.size>NX&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,NX))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){const t=new WD;return t._internalState=new Map(this._internalState),t}}const HD="traceparent",GD="tracestate",K8e="00",Y8e="(?!ff)[\\da-f]{2}",Q8e="(?![0]{32})[\\da-f]{32}",X8e="(?![0]{16})[\\da-f]{16}",Z8e="[\\da-f]{2}",J8e=new RegExp(`^\\s?(${Y8e})-(${Q8e})-(${X8e})-(${Z8e})(-.*)?\\s?$`);function e7e(e){const t=J8e.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}class t7e{inject(t,r,n){const i=Si.getSpanContext(t);if(!i||PD(t)||!fb(i))return;const a=`${K8e}-${i.traceId}-${i.spanId}-0${Number(i.traceFlags||Ls.NONE).toString(16)}`;n.set(r,HD,a),i.traceState&&n.set(r,GD,i.traceState.serialize())}extract(t,r,n){const i=n.get(r,HD);if(!i)return t;const a=Array.isArray(i)?i[0]:i;if(typeof a!="string")return t;const o=e7e(a);if(!o)return t;o.isRemote=!0;const s=n.get(r,GD);if(s){const u=Array.isArray(s)?s.join(","):s;o.traceState=new WD(typeof u=="string"?u:void 0)}return Si.setSpanContext(t,o)}fields(){return[HD,GD]}}const r7e="[object Object]",n7e="[object Null]",i7e="[object Undefined]",kX=Function.prototype.toString,a7e=kX.call(Object),o7e=Object.getPrototypeOf,MX=Object.prototype,LX=MX.hasOwnProperty,fc=Symbol?Symbol.toStringTag:void 0,jX=MX.toString;function FX(e){if(!s7e(e)||u7e(e)!==r7e)return!1;const t=o7e(e);if(t===null)return!0;const r=LX.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&kX.call(r)===a7e}function s7e(e){return e!=null&&typeof e=="object"}function u7e(e){return e==null?e===void 0?i7e:n7e:fc&&fc in Object(e)?l7e(e):c7e(e)}function l7e(e){const t=LX.call(e,fc),r=e[fc];let n=!1;try{e[fc]=void 0,n=!0}catch{}const i=jX.call(e);return n&&(t?e[fc]=r:delete e[fc]),i}function c7e(e){return jX.call(e)}const f7e=20;function d7e(...e){let t=e.shift();const r=new WeakMap;for(;e.length>0;)t=$X(t,e.shift(),0,r);return t}function KD(e){return bb(e)?e.slice():e}function $X(e,t,r=0,n){let i;if(!(r>f7e)){if(r++,Eb(e)||Eb(t)||qX(t))i=KD(t);else if(bb(e)){if(i=e.slice(),bb(t))for(let a=0,o=t.length;a<o;a++)i.push(KD(t[a]));else if(Ev(t)){const a=Object.keys(t);for(let o=0,s=a.length;o<s;o++){const u=a[o];i[u]=KD(t[u])}}}else if(Ev(e))if(Ev(t)){if(!h7e(e,t))return t;i=Object.assign({},e);const a=Object.keys(t);for(let o=0,s=a.length;o<s;o++){const u=a[o],l=t[u];if(Eb(l))typeof l>"u"?delete i[u]:i[u]=l;else{const c=i[u],f=l;if(VX(e,u,n)||VX(t,u,n))delete i[u];else{if(Ev(c)&&Ev(f)){const d=n.get(c)||[],h=n.get(f)||[];d.push({obj:e,key:u}),h.push({obj:t,key:u}),n.set(c,d),n.set(f,h)}i[u]=$X(i[u],l,r,n)}}}}else i=t;return i}}function VX(e,t,r){const n=r.get(e[t])||[];for(let i=0,a=n.length;i<a;i++){const o=n[i];if(o.key===t&&o.obj===e)return!0}return!1}function bb(e){return Array.isArray(e)}function qX(e){return typeof e=="function"}function Ev(e){return!Eb(e)&&!bb(e)&&!qX(e)&&typeof e=="object"}function Eb(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function h7e(e,t){return!(!FX(e)||!FX(t))}function BX(e,t){return typeof t=="string"?e===t:!!e.match(t)}function p7e(e,t){if(!t)return!1;for(const r of t)if(BX(e,r))return!0;return!1}class v7e{_promise;_resolve;_reject;constructor(){this._promise=new Promise((t,r)=>{this._resolve=t,this._reject=r})}get promise(){return this._promise}resolve(t){this._resolve(t)}reject(t){this._reject(t)}}class g7e{_callback;_that;_isCalled=!1;_deferred=new v7e;constructor(t,r){this._callback=t,this._that=r}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...t){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...t)).then(r=>this._deferred.resolve(r),r=>this._deferred.reject(r))}catch(r){this._deferred.reject(r)}}return this._deferred.promise}}function m7e(e,t){return new Promise(r=>{zn.with(c8e(zn.active()),()=>{e.export(t,n=>{r(n)})})})}const y7e={_export:m7e};function _7e(){return"unknown_service"}const wv=e=>e!==null&&typeof e=="object"&&typeof e.then=="function";class wb{_rawAttributes;_asyncAttributesPending=!1;_memoizedAttributes;static FromAttributeList(t){const r=new wb({});return r._rawAttributes=zX(t),r._asyncAttributesPending=t.filter(([n,i])=>wv(i)).length>0,r}constructor(t){const r=t.attributes??{};this._rawAttributes=Object.entries(r).map(([n,i])=>(wv(i)&&(this._asyncAttributesPending=!0),[n,i])),this._rawAttributes=zX(this._rawAttributes)}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(this.asyncAttributesPending){for(let t=0;t<this._rawAttributes.length;t++){const[r,n]=this._rawAttributes[t];this._rawAttributes[t]=[r,wv(n)?await n:n]}this._asyncAttributesPending=!1}}get attributes(){if(this.asyncAttributesPending&&vr.error("Accessing resource attributes before async attributes settled"),this._memoizedAttributes)return this._memoizedAttributes;const t={};for(const[r,n]of this._rawAttributes){if(wv(n)){vr.debug(`Unsettled resource attribute ${r} skipped`);continue}n!=null&&(t[r]??=n)}return this._asyncAttributesPending||(this._memoizedAttributes=t),t}getRawAttributes(){return this._rawAttributes}merge(t){return t==null?this:wb.FromAttributeList([...t.getRawAttributes(),...this.getRawAttributes()])}}function UX(e){return wb.FromAttributeList(Object.entries(e))}function b7e(){return UX({[AX]:_7e(),[FD]:qD[FD],[$D]:qD[$D],[VD]:qD[VD]})}function zX(e){return e.map(([t,r])=>wv(r)?[t,r.catch(n=>{vr.debug("promise rejection for resource attribute: %s - %s",t,n)})]:[t,r])}const E7e="exception";class w7e{_spanContext;kind;parentSpanContext;attributes={};links=[];events=[];startTime;resource;instrumentationScope;_droppedAttributesCount=0;_droppedEventsCount=0;_droppedLinksCount=0;name;status={code:lc.UNSET};endTime=[0,0];_ended=!1;_duration=[-1,-1];_spanProcessor;_spanLimits;_attributeValueLengthLimit;_performanceStartTime;_performanceOffset;_startTimeProvided;constructor(t){const r=Date.now();this._spanContext=t.spanContext,this._performanceStartTime=gd.now(),this._performanceOffset=r-(this._performanceStartTime+BD()),this._startTimeProvided=t.startTime!=null,this._spanLimits=t.spanLimits,this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,this._spanProcessor=t.spanProcessor,this.name=t.name,this.parentSpanContext=t.parentSpanContext,this.kind=t.kind,this.links=t.links||[],this.startTime=this._getTime(t.startTime??r),this.resource=t.resource,this.instrumentationScope=t.scope,t.attributes!=null&&this.setAttributes(t.attributes),this._spanProcessor.onStart(this,t.context)}spanContext(){return this._spanContext}setAttribute(t,r){if(r==null||this._isSpanEnded())return this;if(t.length===0)return vr.warn(`Invalid attribute key: ${t}`),this;if(!RX(r))return vr.warn(`Invalid attribute value set for key: ${t}`),this;const{attributeCountLimit:n}=this._spanLimits;return n!==void 0&&Object.keys(this.attributes).length>=n&&!Object.prototype.hasOwnProperty.call(this.attributes,t)?(this._droppedAttributesCount++,this):(this.attributes[t]=this._truncateToSize(r),this)}setAttributes(t){for(const[r,n]of Object.entries(t))this.setAttribute(r,n);return this}addEvent(t,r,n){if(this._isSpanEnded())return this;const{eventCountLimit:i}=this._spanLimits;if(i===0)return vr.warn("No events allowed."),this._droppedEventsCount++,this;i!==void 0&&this.events.length>=i&&(this._droppedEventsCount===0&&vr.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),CX(r)&&(CX(n)||(n=r),r=void 0);const a=mb(r);return this.events.push({name:t,attributes:a,time:this._getTime(n),droppedAttributesCount:0}),this}addLink(t){return this.links.push(t),this}addLinks(t){return this.links.push(...t),this}setStatus(t){return this._isSpanEnded()?this:(this.status={...t},this.status.message!=null&&typeof t.message!="string"&&(vr.warn(`Dropping invalid status.message of type '${typeof t.message}', expected 'string'`),delete this.status.message),this)}updateName(t){return this._isSpanEnded()?this:(this.name=t,this)}end(t){if(this._isSpanEnded()){vr.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`);return}this._ended=!0,this.endTime=this._getTime(t),this._duration=F8e(this.startTime,this.endTime),this._duration[0]<0&&(vr.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&vr.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`),this._spanProcessor.onEnd(this)}_getTime(t){if(typeof t=="number"&&t<=gd.now())return _b(t+this._performanceOffset);if(typeof t=="number")return js(t);if(t instanceof Date)return js(t.getTime());if(UD(t))return t;if(this._startTimeProvided)return js(Date.now());const r=gd.now()-this._performanceStartTime;return PX(this.startTime,js(r))}isRecording(){return this._ended===!1}recordException(t,r){const n={};typeof t=="string"?n[LD]=t:t&&(t.code?n[jD]=t.code.toString():t.name&&(n[jD]=t.name),t.message&&(n[LD]=t.message),t.stack&&(n[A8e]=t.stack)),n[jD]||n[LD]?this.addEvent(E7e,n,r):vr.warn(`Failed to record an exception ${t}`)}get duration(){return this._duration}get ended(){return this._ended}get droppedAttributesCount(){return this._droppedAttributesCount}get droppedEventsCount(){return this._droppedEventsCount}get droppedLinksCount(){return this._droppedLinksCount}_isSpanEnded(){if(this._ended){const t=new Error(`Operation attempted on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`);vr.warn(`Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`,t)}return this._ended}_truncateToLimitUtil(t,r){return t.length<=r?t:t.substring(0,r)}_truncateToSize(t){const r=this._attributeValueLengthLimit;return r<=0?(vr.warn(`Attribute value limit must be positive, got ${r}`),t):typeof t=="string"?this._truncateToLimitUtil(t,r):Array.isArray(t)?t.map(n=>typeof n=="string"?this._truncateToLimitUtil(n,r):n):t}}var md;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(md||(md={}));class xb{shouldSample(){return{decision:md.NOT_RECORD}}toString(){return"AlwaysOffSampler"}}class yd{shouldSample(){return{decision:md.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}}class Sb{_root;_remoteParentSampled;_remoteParentNotSampled;_localParentSampled;_localParentNotSampled;constructor(t){this._root=t.root,this._root||(kD(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new yd),this._remoteParentSampled=t.remoteParentSampled??new yd,this._remoteParentNotSampled=t.remoteParentNotSampled??new xb,this._localParentSampled=t.localParentSampled??new yd,this._localParentNotSampled=t.localParentNotSampled??new xb}shouldSample(t,r,n,i,a,o){const s=Si.getSpanContext(t);return!s||!fb(s)?this._root.shouldSample(t,r,n,i,a,o):s.isRemote?s.traceFlags&Ls.SAMPLED?this._remoteParentSampled.shouldSample(t,r,n,i,a,o):this._remoteParentNotSampled.shouldSample(t,r,n,i,a,o):s.traceFlags&Ls.SAMPLED?this._localParentSampled.shouldSample(t,r,n,i,a,o):this._localParentNotSampled.shouldSample(t,r,n,i,a,o)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}}class WX{_ratio;_upperBound;constructor(t=0){this._ratio=t,this._ratio=this._normalize(t),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(t,r){return{decision:iX(r)&&this._accumulate(r)<this._upperBound?md.RECORD_AND_SAMPLED:md.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(t){return typeof t!="number"||isNaN(t)?0:t>=1?1:t<=0?0:t}_accumulate(t){let r=0;for(let n=0;n<t.length/8;n++){const i=n*8,a=parseInt(t.slice(i,i+8),16);r=(r^a)>>>0}return r}}const HX=1;function GX(){return{sampler:KX(),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:1/0,attributeCountLimit:128},spanLimits:{attributeValueLengthLimit:1/0,attributeCountLimit:128,linkCountLimit:128,eventCountLimit:128,attributePerEventCountLimit:128,attributePerLinkCountLimit:128}}}function KX(){const e="parentbased_always_on";switch(e){case"always_on":return new yd;case"always_off":return new xb;case"parentbased_always_on":return new Sb({root:new yd});case"parentbased_always_off":return new Sb({root:new xb});case"traceidratio":return new WX(YX());case"parentbased_traceidratio":return new Sb({root:new WX(YX())});default:return vr.error(`OTEL_TRACES_SAMPLER value "${e}" invalid, defaulting to "parentbased_always_on".`),new Sb({root:new yd})}}function YX(){return vr.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${HX}.`),HX}const x7e=128,S7e=1/0;function R7e(e){const t={sampler:KX()},r=GX(),n=Object.assign({},r,t,e);return n.generalLimits=Object.assign({},r.generalLimits,e.generalLimits||{}),n.spanLimits=Object.assign({},r.spanLimits,e.spanLimits||{}),n}function O7e(e){const t=Object.assign({},e.spanLimits);return t.attributeCountLimit=e.spanLimits?.attributeCountLimit??e.generalLimits?.attributeCountLimit??void 0??void 0??x7e,t.attributeValueLengthLimit=e.spanLimits?.attributeValueLengthLimit??e.generalLimits?.attributeValueLengthLimit??void 0??void 0??S7e,Object.assign({},e,{spanLimits:t})}const A7e=8,T7e=16;class C7e{generateTraceId=QX(T7e);generateSpanId=QX(A7e)}const Rb=Array(32);function QX(e){return function(){for(let r=0;r<e*2;r++)Rb[r]=Math.floor(Math.random()*16)+48,Rb[r]>=58&&(Rb[r]+=39);return String.fromCharCode.apply(null,Rb.slice(0,e*2))}}class P7e{_sampler;_generalLimits;_spanLimits;_idGenerator;instrumentationScope;_resource;_spanProcessor;constructor(t,r,n,i){const a=R7e(r);this._sampler=a.sampler,this._generalLimits=a.generalLimits,this._spanLimits=a.spanLimits,this._idGenerator=r.idGenerator||new C7e,this._resource=n,this._spanProcessor=i,this.instrumentationScope=t}startSpan(t,r={},n=zn.active()){r.root&&(n=Si.deleteSpan(n));const i=Si.getSpan(n);if(PD(n))return vr.debug("Instrumentation suppressed, returning Noop Span"),Si.wrapSpanContext(rX);const a=i?.spanContext(),o=this._idGenerator.generateSpanId();let s,u,l;!a||!Si.isSpanContextValid(a)?u=this._idGenerator.generateTraceId():(u=a.traceId,l=a.traceState,s=a);const c=r.kind??hb.INTERNAL,f=(r.links??[]).map(b=>({context:b.context,attributes:mb(b.attributes)})),d=mb(r.attributes),h=this._sampler.shouldSample(n,u,t,c,d,f);l=h.traceState??l;const m=h.decision===db.RECORD_AND_SAMPLED?Ls.SAMPLED:Ls.NONE,p={traceId:u,spanId:o,traceFlags:m,traceState:l};if(h.decision===db.NOT_RECORD)return vr.debug("Recording is off, propagating context in a non-recording span"),Si.wrapSpanContext(p);const g=mb(Object.assign(d,h.attributes));return new w7e({resource:this._resource,scope:this.instrumentationScope,context:n,spanContext:p,name:t,kind:c,links:f,parentSpanContext:s,attributes:g,startTime:r.startTime,spanProcessor:this._spanProcessor,spanLimits:this._spanLimits})}startActiveSpan(t,r,n,i){let a,o,s;if(arguments.length<2)return;arguments.length===2?s=r:arguments.length===3?(a=r,s=n):(a=r,o=n,s=i);const u=o??zn.active(),l=this.startSpan(t,a,u),c=Si.setSpan(u,l);return zn.with(c,s,void 0,l)}getGeneralLimits(){return this._generalLimits}getSpanLimits(){return this._spanLimits}}class N7e{_spanProcessors;constructor(t){this._spanProcessors=t}forceFlush(){const t=[];for(const r of this._spanProcessors)t.push(r.forceFlush());return new Promise(r=>{Promise.all(t).then(()=>{r()}).catch(n=>{kD(n||new Error("MultiSpanProcessor: forceFlush failed")),r()})})}onStart(t,r){for(const n of this._spanProcessors)n.onStart(t,r)}onEnd(t){for(const r of this._spanProcessors)r.onEnd(t)}shutdown(){const t=[];for(const r of this._spanProcessors)t.push(r.shutdown());return new Promise((r,n)=>{Promise.all(t).then(()=>{r()},n)})}}var dc;(function(e){e[e.resolved=0]="resolved",e[e.timeout=1]="timeout",e[e.error=2]="error",e[e.unresolved=3]="unresolved"})(dc||(dc={}));class D7e{_config;_tracers=new Map;_resource;_activeSpanProcessor;constructor(t={}){const r=d7e({},GX(),O7e(t));this._resource=r.resource??b7e(),this._config=Object.assign({},r,{resource:this._resource});const n=[];t.spanProcessors?.length&&n.push(...t.spanProcessors),this._activeSpanProcessor=new N7e(n)}getTracer(t,r,n){const i=`${t}@${r||""}:${n?.schemaUrl||""}`;return this._tracers.has(i)||this._tracers.set(i,new P7e({name:t,version:r,schemaUrl:n?.schemaUrl},this._config,this._resource,this._activeSpanProcessor)),this._tracers.get(i)}forceFlush(){const t=this._config.forceFlushTimeoutMillis,r=this._activeSpanProcessor._spanProcessors.map(n=>new Promise(i=>{let a;const o=setTimeout(()=>{i(new Error(`Span processor did not completed within timeout period of ${t} ms`)),a=dc.timeout},t);n.forceFlush().then(()=>{clearTimeout(o),a!==dc.timeout&&(a=dc.resolved,i(a))}).catch(s=>{clearTimeout(o),a=dc.error,i(s)})}));return new Promise((n,i)=>{Promise.all(r).then(a=>{const o=a.filter(s=>s!==dc.resolved);o.length>0?i(o):n()}).catch(a=>i([a]))})}shutdown(){return this._activeSpanProcessor.shutdown()}}class I7e{export(t,r){return this._sendSpans(t,r)}shutdown(){return this._sendSpans([]),this.forceFlush()}forceFlush(){return Promise.resolve()}_exportInfo(t){return{resource:{attributes:t.resource.attributes},instrumentationScope:t.instrumentationScope,traceId:t.spanContext().traceId,parentSpanContext:t.parentSpanContext,traceState:t.spanContext().traceState?.serialize(),name:t.name,id:t.spanContext().spanId,kind:t.kind,timestamp:TX(t.startTime),duration:TX(t.duration),attributes:t.attributes,status:t.status,events:t.events,links:t.links}}_sendSpans(t,r){for(const n of t)console.dir(this._exportInfo(n),{depth:3});if(r)return r({code:io.SUCCESS})}}class XX{_exporter;_shutdownOnce;_pendingExports;constructor(t){this._exporter=t,this._shutdownOnce=new g7e(this._shutdown,this),this._pendingExports=new Set}async forceFlush(){await Promise.all(Array.from(this._pendingExports)),this._exporter.forceFlush&&await this._exporter.forceFlush()}onStart(t,r){}onEnd(t){if(this._shutdownOnce.isCalled||(t.spanContext().traceFlags&Ls.SAMPLED)===0)return;const r=this._doExport(t).catch(n=>kD(n));this._pendingExports.add(r),r.finally(()=>this._pendingExports.delete(r))}async _doExport(t){t.resource.asyncAttributesPending&&await t.resource.waitForAsyncAttributes?.();const r=await y7e._export(this._exporter,[t]);if(r.code!==io.SUCCESS)throw r.error??new Error(`SimpleSpanProcessor: span export failed (status ${r})`)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}}class k7e{_enabled=!1;_currentContext=Ms;_bindFunction(t=Ms,r){const n=this,i=function(...a){return n.with(t,()=>r.apply(this,a))};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:r.length}),i}active(){return this._currentContext}bind(t,r){return t===void 0&&(t=this.active()),typeof r=="function"?this._bindFunction(t,r):r}disable(){return this._currentContext=Ms,this._enabled=!1,this}enable(){return this._enabled?this:(this._enabled=!0,this._currentContext=Ms,this)}with(t,r,n,...i){const a=this._currentContext;this._currentContext=t||Ms;try{return r.call(n,...i)}finally{this._currentContext=a}}}function M7e(e){if(e!==null){if(e===void 0){const t=new k7e;t.enable(),zn.setGlobalContextManager(t);return}e.enable(),zn.setGlobalContextManager(e)}}function L7e(e){if(e!==null){if(e===void 0){Wo.setGlobalPropagator(new $8e({propagators:[new t7e,new y8e]}));return}Wo.setGlobalPropagator(e)}}class j7e extends D7e{constructor(t={}){super(t)}register(t={}){Si.setGlobalTracerProvider(this),L7e(t.propagator),M7e(t.contextManager)}}var Vr;(function(e){e.CONNECT_END="connectEnd",e.CONNECT_START="connectStart",e.DECODED_BODY_SIZE="decodedBodySize",e.DOM_COMPLETE="domComplete",e.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",e.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",e.DOM_INTERACTIVE="domInteractive",e.DOMAIN_LOOKUP_END="domainLookupEnd",e.DOMAIN_LOOKUP_START="domainLookupStart",e.ENCODED_BODY_SIZE="encodedBodySize",e.FETCH_START="fetchStart",e.LOAD_EVENT_END="loadEventEnd",e.LOAD_EVENT_START="loadEventStart",e.NAVIGATION_START="navigationStart",e.REDIRECT_END="redirectEnd",e.REDIRECT_START="redirectStart",e.REQUEST_START="requestStart",e.RESPONSE_END="responseEnd",e.RESPONSE_START="responseStart",e.SECURE_CONNECTION_START="secureConnectionStart",e.START_TIME="startTime",e.UNLOAD_EVENT_END="unloadEventEnd",e.UNLOAD_EVENT_START="unloadEventStart"})(Vr||(Vr={}));const F7e="http.response_content_length",$7e="http.response_content_length_uncompressed";let YD;function V7e(){return YD||(YD=document.createElement("a")),YD}function q7e(e,t){return t in e}function $s(e,t,r,n=!0){if(q7e(r,t)&&typeof r[t]=="number"&&!(n&&r[t]===0))return e.addEvent(t,r[t])}function ZX(e,t,r=!1,n,i){if(n===void 0&&(n=t[Vr.START_TIME]!==0),r||($s(e,Vr.FETCH_START,t,n),$s(e,Vr.DOMAIN_LOOKUP_START,t,n),$s(e,Vr.DOMAIN_LOOKUP_END,t,n),$s(e,Vr.CONNECT_START,t,n),$s(e,Vr.SECURE_CONNECTION_START,t,n),$s(e,Vr.CONNECT_END,t,n),$s(e,Vr.REQUEST_START,t,n),$s(e,Vr.RESPONSE_START,t,n),$s(e,Vr.RESPONSE_END,t,n)),!i){const a=t[Vr.ENCODED_BODY_SIZE];a!==void 0&&e.setAttribute(F7e,a);const o=t[Vr.DECODED_BODY_SIZE];o!==void 0&&a!==o&&e.setAttribute($7e,o)}}function B7e(e){return e.slice().sort((t,r)=>{const n=t[Vr.FETCH_START],i=r[Vr.FETCH_START];return n>i?1:n<i?-1:0})}function JX(){return typeof location<"u"?location.origin:void 0}function U7e(e,t,r,n,i=new WeakSet,a){const o=Ob(e);e=o.toString();const s=W7e(e,t,r,n,i,a);if(s.length===0)return{mainRequest:void 0};if(s.length===1)return{mainRequest:s[0]};const u=B7e(s);if(o.origin!==JX()&&u.length>1){let l=u[0],c=z7e(u,l[Vr.RESPONSE_END],r);const f=l[Vr.RESPONSE_END];return c[Vr.FETCH_START]<f&&(c=l,l=void 0),{corsPreFlightRequest:l,mainRequest:c}}else return{mainRequest:s[0]}}function z7e(e,t,r){const n=Fs(r),i=Fs(bv(t));let a=e[1],o;const s=e.length;for(let u=1;u<s;u++){const l=e[u],c=Fs(bv(l[Vr.FETCH_START])),f=Fs(bv(l[Vr.RESPONSE_END])),d=n-f;c>=i&&(!o||d<o)&&(o=d,a=l)}return a}function W7e(e,t,r,n,i,a){const o=Fs(t),s=Fs(r);let u=n.filter(l=>{const c=Fs(bv(l[Vr.FETCH_START])),f=Fs(bv(l[Vr.RESPONSE_END]));return l.initiatorType.toLowerCase()===a&&l.name===e&&c>=o&&f<=s});return u.length>0&&(u=u.filter(l=>!i.has(l))),u}function Ob(e){if(typeof URL=="function")return new URL(e,typeof document<"u"?document.baseURI:typeof location<"u"?location.href:void 0);const t=V7e();return t.href=e,t}function H7e(e,t){let r=t||[];return(typeof r=="string"||r instanceof RegExp)&&(r=[r]),Ob(e).origin===JX()?!0:r.some(i=>BX(e,i))}class G7e{_delegate;constructor(t){this._delegate=t}export(t,r){this._delegate.export(t,r)}forceFlush(){return this._delegate.forceFlush()}shutdown(){return this._delegate.shutdown()}}class eZ extends Error{code;name="OTLPExporterError";data;constructor(t,r,n){super(t),this.data=n,this.code=r}}function K7e(e){if(Number.isFinite(e)&&e>0)return e;throw new Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${e}')`)}function Y7e(e){if(e!=null)return()=>e}function Q7e(e,t,r){return{timeoutMillis:K7e(e.timeoutMillis??t.timeoutMillis??r.timeoutMillis),concurrencyLimit:e.concurrencyLimit??t.concurrencyLimit??r.concurrencyLimit,compression:e.compression??t.compression??r.compression}}function X7e(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}class Z7e{_concurrencyLimit;_sendingPromises=[];constructor(t){this._concurrencyLimit=t}pushPromise(t){if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this._sendingPromises.push(t);const r=()=>{const n=this._sendingPromises.indexOf(t);this._sendingPromises.splice(n,1)};t.then(r,r)}hasReachedLimit(){return this._sendingPromises.length>=this._concurrencyLimit}async awaitAll(){await Promise.all(this._sendingPromises)}}function J7e(e){return new Z7e(e.concurrencyLimit)}function e$e(e){return Object.prototype.hasOwnProperty.call(e,"partialSuccess")}function t$e(){return{handleResponse(e){e==null||!e$e(e)||e.partialSuccess==null||Object.keys(e.partialSuccess).length===0||vr.warn("Received Partial Success response:",JSON.stringify(e.partialSuccess))}}}class r$e{_transport;_serializer;_responseHandler;_promiseQueue;_timeout;_diagLogger;constructor(t,r,n,i,a){this._transport=t,this._serializer=r,this._responseHandler=n,this._promiseQueue=i,this._timeout=a,this._diagLogger=vr.createComponentLogger({namespace:"OTLPExportDelegate"})}export(t,r){if(this._diagLogger.debug("items to be sent",t),this._promiseQueue.hasReachedLimit()){r({code:io.FAILED,error:new Error("Concurrent export limit reached")});return}const n=this._serializer.serializeRequest(t);if(n==null){r({code:io.FAILED,error:new Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(n,this._timeout).then(i=>{if(i.status==="success"){if(i.data!=null)try{this._responseHandler.handleResponse(this._serializer.deserializeResponse(i.data))}catch(a){this._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",a,i.data)}r({code:io.SUCCESS});return}else if(i.status==="failure"&&i.error){r({code:io.FAILED,error:i.error});return}else i.status==="retryable"?r({code:io.FAILED,error:new eZ("Export failed with retryable status")}):r({code:io.FAILED,error:new eZ("Export failed with unknown error")})},i=>r({code:io.FAILED,error:i})))}forceFlush(){return this._promiseQueue.awaitAll()}async shutdown(){this._diagLogger.debug("shutdown started"),await this.forceFlush(),this._transport.shutdown()}}function n$e(e,t){return new r$e(e.transport,e.serializer,t$e(),e.promiseHandler,t.timeout)}function tZ(e,t,r){return n$e({transport:r,serializer:t,promiseHandler:J7e(e)},{timeout:e.timeoutMillis})}function rZ(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}function nZ(e){const t=new Uint8Array(e.length/2);let r=0;for(let n=0;n<e.length;n+=2){const i=rZ(e.charCodeAt(n)),a=rZ(e.charCodeAt(n+1));t[r++]=i<<4|a}return t}function iZ(e){const t=BigInt(1e9);return BigInt(e[0])*t+BigInt(e[1])}function i$e(e){const t=Number(BigInt.asUintN(32,e)),r=Number(BigInt.asUintN(32,e>>BigInt(32)));return{low:t,high:r}}function a$e(e){const t=iZ(e);return i$e(t)}function o$e(e){return iZ(e).toString()}const s$e=typeof BigInt<"u"?o$e:Fs;function aZ(e){return e}function u$e(e){if(e!==void 0)return nZ(e)}const l$e={encodeHrTime:a$e,encodeSpanContext:nZ,encodeOptionalSpanContext:u$e};function c$e(e){return e===void 0?l$e:{encodeHrTime:s$e,encodeSpanContext:aZ,encodeOptionalSpanContext:aZ}}function f$e(e){return{attributes:Ab(e.attributes),droppedAttributesCount:0}}function d$e(e){return{name:e.name,version:e.version}}function Ab(e){return Object.keys(e).map(t=>oZ(t,e[t]))}function oZ(e,t){return{key:e,value:sZ(t)}}function sZ(e){const t=typeof e;return t==="string"?{stringValue:e}:t==="number"?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:t==="boolean"?{boolValue:e}:e instanceof Uint8Array?{bytesValue:e}:Array.isArray(e)?{arrayValue:{values:e.map(sZ)}}:t==="object"&&e!=null?{kvlistValue:{values:Object.entries(e).map(([r,n])=>oZ(r,n))}}:{}}function h$e(e,t){const r=e.spanContext(),n=e.status,i=e.parentSpanContext?.spanId?t.encodeSpanContext(e.parentSpanContext?.spanId):void 0;return{traceId:t.encodeSpanContext(r.traceId),spanId:t.encodeSpanContext(r.spanId),parentSpanId:i,traceState:r.traceState?.serialize(),name:e.name,kind:e.kind==null?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:Ab(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(a=>v$e(a,t)),droppedEventsCount:e.droppedEventsCount,status:{code:n.code,message:n.message},links:e.links.map(a=>p$e(a,t)),droppedLinksCount:e.droppedLinksCount}}function p$e(e,t){return{attributes:e.attributes?Ab(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:e.context.traceState?.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}function v$e(e,t){return{attributes:e.attributes?Ab(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}function g$e(e,t){const r=c$e(t);return{resourceSpans:y$e(e,r)}}function m$e(e){const t=new Map;for(const r of e){let n=t.get(r.resource);n||(n=new Map,t.set(r.resource,n));const i=`${r.instrumentationScope.name}@${r.instrumentationScope.version||""}:${r.instrumentationScope.schemaUrl||""}`;let a=n.get(i);a||(a=[],n.set(i,a)),a.push(r)}return t}function y$e(e,t){const r=m$e(e),n=[],i=r.entries();let a=i.next();for(;!a.done;){const[o,s]=a.value,u=[],l=s.values();let c=l.next();for(;!c.done;){const d=c.value;if(d.length>0){const h=d.map(m=>h$e(m,t));u.push({scope:d$e(d[0].instrumentationScope),spans:h,schemaUrl:d[0].instrumentationScope.schemaUrl})}c=l.next()}const f={resource:f$e(o),scopeSpans:u,schemaUrl:void 0};n.push(f),a=i.next()}return n}const _$e={serializeRequest:e=>{const t=g$e(e,{});return new TextEncoder().encode(JSON.stringify(t))},deserializeResponse:e=>{if(e.length===0)return{};const t=new TextDecoder;return JSON.parse(t.decode(e))}},b$e=5,E$e=1e3,w$e=5e3,x$e=1.5,uZ=.2;function S$e(){return Math.random()*(2*uZ)-uZ}class R$e{_transport;constructor(t){this._transport=t}retry(t,r,n){return new Promise((i,a)=>{setTimeout(()=>{this._transport.send(t,r).then(i,a)},n)})}async send(t,r){const n=Date.now()+r;let i=await this._transport.send(t,r),a=b$e,o=E$e;for(;i.status==="retryable"&&a>0;){a--;const s=Math.max(Math.min(o,w$e)+S$e(),0);o=o*x$e;const u=i.retryInMillis??s,l=n-Date.now();if(u>l)return i;i=await this.retry(t,l,u)}return i}shutdown(){return this._transport.shutdown()}}function lZ(e){return new R$e(e.transport)}function O$e(e){return[429,502,503,504].includes(e)}function A$e(e){if(e==null)return;const t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?t*1e3:-1;const r=new Date(e).getTime()-Date.now();return r>=0?r:0}class T$e{_parameters;constructor(t){this._parameters=t}send(t,r){return new Promise(n=>{const i=new XMLHttpRequest;i.timeout=r,i.open("POST",this._parameters.url);const a=this._parameters.headers();Object.entries(a).forEach(([o,s])=>{i.setRequestHeader(o,s)}),i.ontimeout=o=>{n({status:"failure",error:new Error("XHR request timed out")})},i.onreadystatechange=()=>{i.status>=200&&i.status<=299?(vr.debug("XHR success"),n({status:"success"})):i.status&&O$e(i.status)?n({status:"retryable",retryInMillis:A$e(i.getResponseHeader("Retry-After"))}):i.status!==0&&n({status:"failure",error:new Error("XHR request failed with non-retryable status")})},i.onabort=()=>{n({status:"failure",error:new Error("XHR request aborted")})},i.onerror=()=>{n({status:"failure",error:new Error("XHR request errored")})},i.send(t)})}shutdown(){}}function C$e(e){return new T$e(e)}class P$e{_params;constructor(t){this._params=t}send(t){return new Promise(r=>{navigator.sendBeacon(this._params.url,new Blob([t],{type:this._params.blobType}))?(vr.debug("SendBeacon success"),r({status:"success"})):r({status:"failure",error:new Error("SendBeacon failed")})})}shutdown(){}}function N$e(e){return new P$e(e)}function D$e(e,t){return tZ(e,t,lZ({transport:C$e(e)}))}function I$e(e,t){return tZ(e,t,lZ({transport:N$e({url:e.url,blobType:e.headers()["Content-Type"]})}))}function k$e(e){return()=>{const t={};return Object.entries(e?.()??{}).forEach(([r,n])=>{typeof n<"u"?t[r]=String(n):vr.warn(`Header "${r}" has invalid value (${n}) and will be ignored`)}),t}}function M$e(e,t,r){const n={...r()},i={};return()=>(t!=null&&Object.assign(i,t()),e!=null&&Object.assign(i,e()),Object.assign(i,n))}function L$e(e){if(e!=null)try{return new URL(e),e}catch{throw new Error(`Configuration: Could not parse user-provided export URL: '${e}'`)}}function j$e(e,t,r){return{...Q7e(e,t,r),headers:M$e(k$e(e.headers),t.headers,r.headers),url:L$e(e.url)??t.url??r.url,agentOptions:e.agentOptions??t.agentOptions??r.agentOptions}}function F$e(e,t){return{...X7e(),headers:()=>e,url:"http://localhost:4318/"+t,agentOptions:{keepAlive:!0}}}function $$e(e,t,r){return j$e({url:e.url,timeoutMillis:e.timeoutMillis,headers:Y7e(e.headers),concurrencyLimit:e.concurrencyLimit},{},F$e(r,t))}function V$e(e,t,r,n){const i=!!e.headers||typeof navigator.sendBeacon!="function",a=$$e(e,r,n);return i?D$e(a,t):I$e(a,t)}class q$e extends G7e{constructor(t={}){super(V$e(t,_$e,"v1/traces",{"Content-Type":"application/json"}))}}class cZ{emit(t){}}const B$e=new cZ;class U$e{getLogger(t,r,n){return new cZ}}const fZ=new U$e;class z$e{constructor(t,r,n,i){this._provider=t,this.name=r,this.version=n,this.options=i}emit(t){this._getLogger().emit(t)}_getLogger(){if(this._delegate)return this._delegate;const t=this._provider.getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):B$e}}class dZ{getLogger(t,r,n){var i;return(i=this.getDelegateLogger(t,r,n))!==null&&i!==void 0?i:new z$e(this,t,r,n)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:fZ}setDelegate(t){this._delegate=t}getDelegateLogger(t,r,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getLogger(t,r,n)}}const W$e=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Tb=Symbol.for("io.opentelemetry.js.api.logs"),xv=W$e;function H$e(e,t,r){return n=>n===e?t:r}const hZ=1;class QD{constructor(){this._proxyLoggerProvider=new dZ}static getInstance(){return this._instance||(this._instance=new QD),this._instance}setGlobalLoggerProvider(t){return xv[Tb]?this.getLoggerProvider():(xv[Tb]=H$e(hZ,t,fZ),this._proxyLoggerProvider.setDelegate(t),t)}getLoggerProvider(){var t,r;return(r=(t=xv[Tb])===null||t===void 0?void 0:t.call(xv,hZ))!==null&&r!==void 0?r:this._proxyLoggerProvider}getLogger(t,r,n){return this.getLoggerProvider().getLogger(t,r,n)}disable(){delete xv[Tb],this._proxyLoggerProvider=new dZ}}const pZ=QD.getInstance();function G$e(e,t,r,n){for(let i=0,a=e.length;i<a;i++){const o=e[i];t&&o.setTracerProvider(t),r&&o.setMeterProvider(r),n&&o.setLoggerProvider&&o.setLoggerProvider(n),o.getConfig().enabled||o.enable()}}function K$e(e){e.forEach(t=>t.disable())}function Y$e(e){const t=e.tracerProvider||Si.getTracerProvider(),r=e.meterProvider||sX.getMeterProvider(),n=e.loggerProvider||pZ.getLoggerProvider(),i=e.instrumentations?.flat()??[];return G$e(i,t,r,n),()=>{K$e(i)}}let ua=console.error.bind(console);function Sv(e,t,r){const n=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:n,writable:!0,value:r})}const vZ=(e,t,r)=>{if(!e||!e[t]){ua("no original function "+String(t)+" to wrap");return}if(!r){ua("no wrapper function"),ua(new Error().stack);return}const n=e[t];if(typeof n!="function"||typeof r!="function"){ua("original object and wrapper must be functions");return}const i=r(n,t);return Sv(i,"__original",n),Sv(i,"__unwrap",()=>{e[t]===i&&Sv(e,t,n)}),Sv(i,"__wrapped",!0),Sv(e,t,i),i},Q$e=(e,t,r)=>{if(e)Array.isArray(e)||(e=[e]);else{ua("must provide one or more modules to patch"),ua(new Error().stack);return}if(!(t&&Array.isArray(t))){ua("must provide one or more functions to wrap on modules");return}e.forEach(n=>{t.forEach(i=>{vZ(n,i,r)})})},gZ=(e,t)=>{if(!e||!e[t]){ua("no function to unwrap."),ua(new Error().stack);return}const r=e[t];if(!r.__unwrap)ua("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{r.__unwrap();return}},X$e=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{ua("must provide one or more modules to patch"),ua(new Error().stack);return}if(!(t&&Array.isArray(t))){ua("must provide one or more functions to unwrap on modules");return}e.forEach(r=>{t.forEach(n=>{gZ(r,n)})})};class Z$e{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,r,n){this.instrumentationName=t,this.instrumentationVersion=r,this.setConfig(n),this._diag=vr.createComponentLogger({namespace:t}),this._tracer=Si.getTracer(t,r),this._meter=sX.getMeter(t,r),this._logger=pZ.getLogger(t,r),this._updateMetricInstruments()}_wrap=vZ;_unwrap=gZ;_massWrap=Q$e;_massUnwrap=X$e;get meter(){return this._meter}setMeterProvider(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){const t=this.init()??[];return Array.isArray(t)?t:[t]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(t){this._config={enabled:!0,...t}}setTracerProvider(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(t,r,n,i){if(t)try{t(n,i)}catch(a){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:r},a)}}}class J$e extends Z$e{constructor(t,r,n){super(t,r,n),this._config.enabled&&this.enable()}}function mZ(e,t,r){let n,i;try{i=e()}catch(a){n=a}finally{return t(n,i),i}}function eVe(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}var Ui;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(Ui||(Ui={}));function tVe(e,t){let r=Ui.OLD;const n=t?.split(",").map(i=>i.trim()).filter(i=>i!=="");for(const i of n??[])if(i.toLowerCase()===e+"/dup"){r=Ui.DUPLICATE;break}else i.toLowerCase()===e&&(r=Ui.STABLE);return r}var Cb;(function(e){e.COMPONENT="component",e.HTTP_STATUS_TEXT="http.status_text"})(Cb||(Cb={}));var ln={},yZ;function rVe(){return yZ||(yZ=1,Object.defineProperty(ln,"__esModule",{value:!0}),ln.ATTR_HTTP_USER_AGENT=ln.ATTR_HTTP_URL=ln.ATTR_HTTP_STATUS_CODE=ln.ATTR_HTTP_SCHEME=ln.ATTR_HTTP_RESPONSE_CONTENT_LENGTH=ln.ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED=ln.ATTR_HTTP_REQUEST_BODY_SIZE=ln.ATTR_HTTP_METHOD=ln.ATTR_HTTP_HOST=void 0,ln.ATTR_HTTP_HOST="http.host",ln.ATTR_HTTP_METHOD="http.method",ln.ATTR_HTTP_REQUEST_BODY_SIZE="http.request.body.size",ln.ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED="http.request_content_length_uncompressed",ln.ATTR_HTTP_RESPONSE_CONTENT_LENGTH="http.response_content_length",ln.ATTR_HTTP_SCHEME="http.scheme",ln.ATTR_HTTP_STATUS_CODE="http.status_code",ln.ATTR_HTTP_URL="http.url",ln.ATTR_HTTP_USER_AGENT="http.user_agent"),ln}var ju=rVe();const _Z=vr.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function nVe(...e){if(e[0]instanceof URL||typeof e[0]=="string"){const t=e[1];if(!t?.body)return Promise.resolve();if(t.body instanceof ReadableStream){const{body:r,length:n}=iVe(t.body);return t.body=r,n}else return Promise.resolve(oVe(t.body))}else{const t=e[0];return t?.body?t.clone().text().then(r=>XD(r)):Promise.resolve()}}function iVe(e){if(!e.pipeThrough)return _Z.warn("Platform has ReadableStream but not pipeThrough!"),{body:e,length:Promise.resolve(void 0)};let t=0,r;const n=new Promise(a=>{r=a}),i=new TransformStream({start(){},async transform(a,o){const s=await a;t+=s.byteLength,o.enqueue(a)},flush(){r(t)}});return{body:e.pipeThrough(i),length:n}}function aVe(e){return typeof Document<"u"&&e instanceof Document}function oVe(e){if(aVe(e))return new XMLSerializer().serializeToString(document).length;if(typeof e=="string")return XD(e);if(e instanceof Blob)return e.size;if(e instanceof FormData)return uVe(e);if(e instanceof URLSearchParams)return XD(e.toString());if(e.byteLength!==void 0)return e.byteLength;_Z.warn("unknown body type")}const sVe=new TextEncoder;function XD(e){return sVe.encode(e).byteLength}function uVe(e){let t=0;for(const[r,n]of e.entries())t+=r.length,n instanceof Blob?t+=n.size:t+=n.length;return t}function lVe(e){const t=fVe(),r=e.toUpperCase();return r in t?r:"_OTHER"}const cVe={CONNECT:!0,DELETE:!0,GET:!0,HEAD:!0,OPTIONS:!0,PATCH:!0,POST:!0,PUT:!0,TRACE:!0};let ZD;function fVe(){return ZD===void 0&&(ZD=cVe),ZD}const dVe={"https:":"443","http:":"80"};function hVe(e){const t=Number(e.port||dVe[e.protocol]);if(t&&!isNaN(t))return t}const bZ="0.203.0",pVe=300,EZ=typeof process=="object"&&process.release?.name==="node";class vVe extends J$e{component="fetch";version=bZ;moduleName=this.component;_usedResources=new WeakSet;_tasksCount=0;_semconvStability;constructor(t={}){super("@opentelemetry/instrumentation-fetch",bZ,t),this._semconvStability=tVe("http",t?.semconvStabilityOptIn)}init(){}_addChildSpan(t,r){const n=this.tracer.startSpan("CORS Preflight",{startTime:r[Vr.FETCH_START]},Si.setSpan(zn.active(),t)),i=!(this._semconvStability&Ui.OLD);ZX(n,r,this.getConfig().ignoreNetworkEvents,void 0,i),n.end(r[Vr.RESPONSE_END])}_addFinalSpanAttributes(t,r){const n=Ob(r.url);if(this._semconvStability&Ui.OLD&&(t.setAttribute(ju.ATTR_HTTP_STATUS_CODE,r.status),r.statusText!=null&&t.setAttribute(Cb.HTTP_STATUS_TEXT,r.statusText),t.setAttribute(ju.ATTR_HTTP_HOST,n.host),t.setAttribute(ju.ATTR_HTTP_SCHEME,n.protocol.replace(":","")),typeof navigator<"u"&&t.setAttribute(ju.ATTR_HTTP_USER_AGENT,navigator.userAgent)),this._semconvStability&Ui.STABLE){t.setAttribute(P8e,r.status),t.setAttribute(N8e,n.hostname);const i=hVe(n);i&&t.setAttribute(D8e,i)}}_addHeaders(t,r){if(!H7e(r,this.getConfig().propagateTraceHeaderCorsUrls)){const n={};Wo.inject(zn.active(),n),Object.keys(n).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}if(t instanceof Request)Wo.inject(zn.active(),t.headers,{set:(n,i,a)=>n.set(i,typeof a=="string"?a:String(a))});else if(t.headers instanceof Headers)Wo.inject(zn.active(),t.headers,{set:(n,i,a)=>n.set(i,typeof a=="string"?a:String(a))});else if(t.headers instanceof Map)Wo.inject(zn.active(),t.headers,{set:(n,i,a)=>n.set(i,typeof a=="string"?a:String(a))});else{const n={};Wo.inject(zn.active(),n),t.headers=Object.assign({},n,t.headers||{})}}_clearResources(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)}_createSpan(t,r={}){if(p7e(t,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}let n="";const i={};if(this._semconvStability&Ui.OLD){const a=(r.method||"GET").toUpperCase();n=`HTTP ${a}`,i[Cb.COMPONENT]=this.moduleName,i[ju.ATTR_HTTP_METHOD]=a,i[ju.ATTR_HTTP_URL]=t}if(this._semconvStability&Ui.STABLE){const a=r.method,o=lVe(r.method||"GET");n||(n=o),i[T8e]=o,o!==a&&(i[C8e]=a),i[k8e]=t}return this.tracer.startSpan(n,{kind:hb.CLIENT,attributes:i})}_findResourceAndAddNetworkEvents(t,r,n){let i=r.entries;if(!i.length){if(!performance.getEntriesByType)return;i=performance.getEntriesByType("resource")}const a=U7e(r.spanUrl,r.startTime,n,i,this._usedResources,"fetch");if(a.mainRequest){const o=a.mainRequest;this._markResourceAsUsed(o);const s=a.corsPreFlightRequest;s&&(this._addChildSpan(t,s),this._markResourceAsUsed(s));const u=!(this._semconvStability&Ui.OLD);ZX(t,o,this.getConfig().ignoreNetworkEvents,void 0,u)}}_markResourceAsUsed(t){this._usedResources.add(t)}_endSpan(t,r,n){const i=js(Date.now()),a=_b();this._addFinalSpanAttributes(t,n),this._semconvStability&Ui.STABLE&&n.status>=400&&(t.setStatus({code:lc.ERROR}),t.setAttribute(O8e,String(n.status))),setTimeout(()=>{r.observer?.disconnect(),this._findResourceAndAddNetworkEvents(t,r,a),this._tasksCount--,this._clearResources(),t.end(i)},pVe)}_patchConstructor(){return t=>{const r=this;return function(...i){const a=this,o=Ob(i[0]instanceof Request?i[0].url:String(i[0])).href,s=i[0]instanceof Request?i[0]:i[1]||{},u=r._createSpan(o,s);if(!u)return t.apply(this,i);const l=r._prepareSpanData(o);r.getConfig().measureRequestSize&&nVe(...i).then(m=>{m&&(r._semconvStability&Ui.OLD&&u.setAttribute(ju.ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED,m),r._semconvStability&Ui.STABLE&&u.setAttribute(ju.ATTR_HTTP_REQUEST_BODY_SIZE,m))}).catch(m=>{r._diag.warn("getFetchBodyLength",m)});function c(m,p){r._applyAttributesAfterFetch(m,s,p),r._endSpan(m,l,{status:p.status||0,statusText:p.message,url:o})}function f(m,p){r._applyAttributesAfterFetch(m,s,p),p.status>=200&&p.status<400?r._endSpan(m,l,p):r._endSpan(m,l,{status:p.status,statusText:p.statusText,url:o})}function d(m,p,g){try{const b=g.clone().body;if(b){const E=b.getReader(),w=()=>{E.read().then(({done:x})=>{x?f(m,g):w()},x=>{c(m,x)})};w()}else f(m,g)}finally{p(g)}}function h(m,p,g){try{c(m,g)}finally{p(g)}}return new Promise((m,p)=>zn.with(Si.setSpan(zn.active(),u),()=>(r._addHeaders(s,o),r._callRequestHook(u,s),r._tasksCount++,t.apply(a,s instanceof Request?[s]:[o,s]).then(d.bind(a,u,m),h.bind(a,u,p)))))}}}_applyAttributesAfterFetch(t,r,n){const i=this.getConfig().applyCustomAttributesOnSpan;i&&mZ(()=>i(t,r,n),a=>{a&&this._diag.error("applyCustomAttributesOnSpan",a)})}_callRequestHook(t,r){const n=this.getConfig().requestHook;n&&mZ(()=>n(t,r),i=>{i&&this._diag.error("requestHook",i)})}_prepareSpanData(t){const r=_b(),n=[];if(typeof PerformanceObserver!="function")return{entries:n,startTime:r,spanUrl:t};const i=new PerformanceObserver(a=>{a.getEntries().forEach(s=>{s.initiatorType==="fetch"&&s.name===t&&n.push(s)})});return i.observe({entryTypes:["resource"]}),{entries:n,observer:i,startTime:r,spanUrl:t}}enable(){if(EZ){this._diag.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()");return}eVe(fetch)&&(this._unwrap(MD,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(MD,"fetch",this._patchConstructor())}disable(){EZ||(this._unwrap(MD,"fetch"),this._usedResources=new WeakSet)}}function gVe(e){return typeof e=="object"&&e!==null&&"addEventListener"in e&&typeof e.addEventListener=="function"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"}const wZ="OT_ZONE_CONTEXT";class mVe{_enabled=!1;_zoneCounter=0;_activeContextFromZone(t){return t&&t.get(wZ)||Ms}_bindFunction(t,r){const n=this,i=function(...a){return n.with(t,()=>r.apply(this,a))};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:r.length}),i}_bindListener(t,r){const n=r;return n.__ot_listeners!==void 0||(n.__ot_listeners={},typeof n.addEventListener=="function"&&(n.addEventListener=this._patchAddEventListener(n,n.addEventListener,t)),typeof n.removeEventListener=="function"&&(n.removeEventListener=this._patchRemoveEventListener(n,n.removeEventListener))),r}_createZoneName(){this._zoneCounter++;const t=Math.random();return`${this._zoneCounter}-${t}`}_createZone(t,r){return Zone.current.fork({name:t,properties:{[wZ]:r}})}_getActiveZone(){return Zone.current}_patchAddEventListener(t,r,n){const i=this;return function(a,o,s){t.__ot_listeners===void 0&&(t.__ot_listeners={});let u=t.__ot_listeners[a];u===void 0&&(u=new WeakMap,t.__ot_listeners[a]=u);const l=i.bind(n,o);return u.set(o,l),r.call(this,a,l,s)}}_patchRemoveEventListener(t,r){return function(n,i){if(t.__ot_listeners===void 0||t.__ot_listeners[n]===void 0)return r.call(this,n,i);const a=t.__ot_listeners[n],o=a.get(i);return a.delete(i),r.call(this,n,o||i)}}active(){if(!this._enabled)return Ms;const t=this._getActiveZone(),r=this._activeContextFromZone(t);return r||Ms}bind(t,r){return t===void 0&&(t=this.active()),typeof r=="function"?this._bindFunction(t,r):(gVe(r)&&this._bindListener(t,r),r)}disable(){return this._enabled=!1,this}enable(){return this._enabled=!0,this}with(t,r,n,...i){const a=this._createZoneName();return this._createZone(a,t).run(r,n,i)}}var xZ={},SZ;function yVe(){if(SZ)return xZ;SZ=1;/**
|
|
262
262
|
* @license Angular v<unknown>
|
|
263
263
|
* (c) 2010-2025 Google LLC. https://angular.io/
|
|
264
264
|
* License: MIT
|