@prisma/studio-core 0.19.1 → 0.19.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-GFC3LDB7.js → chunk-5TS6UALC.js} +2 -2
- package/dist/data/mysql-core/index.js +1 -1
- package/dist/data/pglite/index.cjs +2 -2
- package/dist/data/pglite/index.js +1 -1
- package/dist/data/postgres-core/index.cjs +2 -2
- package/dist/data/postgres-core/index.js +1 -1
- package/dist/data/postgresjs/index.js +1 -1
- package/dist/data/sqlite-core/index.js +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/ui/index.cjs +1 -1
- package/dist/ui/index.js +1 -1
- package/package.json +1 -1
package/dist/ui/index.js
CHANGED
|
@@ -26,7 +26,7 @@ Instead, use a query builder function:
|
|
|
26
26
|
const { data } = useLiveQuery((q) => q.from({ c: myCollection }).select(({ c }) => c))
|
|
27
27
|
|
|
28
28
|
Or switch to syncMode "eager" if you want all data to sync automatically.`),t.startSyncImmediate(),r.current=t,i.current=t;else if(typeof t=="function"){let p=new Mu,m=t(p);if(m==null)r.current=null;else if(m instanceof Hl)m.startSyncImmediate(),r.current=m;else if(m instanceof Mu)r.current=Sy({query:t,startSync:!0,gcTime:ZL});else if(m&&typeof m=="object")r.current=Sy({startSync:!0,gcTime:ZL,...m});else throw new Error(`useLiveQuery callback must return a QueryBuilder, LiveQueryCollectionConfig, Collection, undefined, or null. Got: ${typeof m}`);o.current=[...e]}else r.current=Sy({startSync:!0,gcTime:ZL,...t}),o.current=[...e];l&&(s.current=0,a.current=null);let c=Da(null);(!c.current||l)&&(c.current=p=>{if(!r.current)return()=>{};let m=r.current.subscribeChanges(()=>{s.current+=1,p()});return r.current.status==="ready"&&(s.current+=1,p()),()=>{m.unsubscribe()}});let u=Da(null);(!u.current||l)&&(u.current=()=>{let p=s.current,m=r.current;return(!a.current||a.current.version!==p||a.current.collection!==m)&&(a.current={collection:m,version:p}),a.current});let f=Rse(c.current,u.current),d=Da(null),h=Da(null);if(!d.current||d.current.version!==f.version||d.current.collection!==f.collection){if(!f.collection)h.current={state:void 0,data:void 0,collection:void 0,status:"disabled",isLoading:!1,isReady:!0,isIdle:!1,isError:!1,isCleanedUp:!1,isEnabled:!1};else{let p=Array.from(f.collection.entries()),g=f.collection.config.singleResult,y=null,x=null;h.current={get state(){return y||(y=new Map(p)),y},get data(){return x||(x=p.map(([,v])=>v)),g?x[0]:x},collection:f.collection,status:f.collection.status,isLoading:f.collection.status==="loading",isReady:f.collection.status==="ready",isIdle:f.collection.status==="idle",isError:f.collection.status==="error",isCleanedUp:f.collection.status==="cleaned-up",isEnabled:!0}}d.current=f}return h.current}var di=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};var Mse={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},Pse=class{#e=Mse;#t=!1;setTimeoutProvider(t){this.#t&&t!==this.#e&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:this.#e,provider:t}),this.#e=t,this.#t=!1}setTimeout(t,e){return this.#t=!0,this.#e.setTimeout(t,e)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,e){return this.#t=!0,this.#e.setInterval(t,e)}clearInterval(t){this.#e.clearInterval(t)}},_s=new Pse;function pH(t){setTimeout(t,0)}var vo=typeof window>"u"||"Deno"in globalThis;function Sn(){}function yH(t,e){return typeof t=="function"?t(e):t}function Cy(t){return typeof t=="number"&&t>=0&&t!==1/0}function Q0(t,e){return Math.max(t+(e||0)-Date.now(),0)}function qi(t,e){return typeof t=="function"?t(e):t}function bo(t,e){return typeof t=="function"?t(e):t}function X0(t,e){let{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:s,stale:a}=t;if(s){if(r){if(e.queryHash!==Iy(s,e.options))return!1}else if(!Lu(e.queryKey,s))return!1}if(n!=="all"){let l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||o&&o!==e.state.fetchStatus||i&&!i(e))}function J0(t,e){let{exact:n,status:r,predicate:o,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(n){if(eo(e.options.mutationKey)!==eo(i))return!1}else if(!Lu(e.options.mutationKey,i))return!1}return!(r&&e.state.status!==r||o&&!o(e))}function Iy(t,e){return(e?.queryKeyHashFn||eo)(t)}function eo(t){return JSON.stringify(t,(e,n)=>eT(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Lu(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>Lu(t[n],e[n])):!1}var Lse=Object.prototype.hasOwnProperty;function ch(t,e,n=0){if(t===e)return t;if(n>500)return e;let r=mH(t)&&mH(e);if(!r&&!(eT(t)&&eT(e)))return e;let i=(r?t:Object.keys(t)).length,s=r?e:Object.keys(e),a=s.length,l=r?new Array(a):{},c=0;for(let u=0;u<a;u++){let f=r?u:s[u],d=t[f],h=e[f];if(d===h){l[f]=d,(r?u<i:Lse.call(t,f))&&c++;continue}if(d===null||h===null||typeof d!="object"||typeof h!="object"){l[f]=h;continue}let p=ch(d,h,n+1);l[f]=p,p===d&&c++}return i===a&&c===i?t:l}function uh(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(let n in t)if(t[n]!==e[n])return!1;return!0}function mH(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function eT(t){if(!gH(t))return!1;let e=t.constructor;if(e===void 0)return!0;let n=e.prototype;return!(!gH(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function gH(t){return Object.prototype.toString.call(t)==="[object Object]"}function xH(t){return new Promise(e=>{_s.setTimeout(e,t)})}function ky(t,e,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(t,e);if(n.structuralSharing!==!1){try{return ch(t,e)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`),r}return ch(t,e)}return e}function vH(t,e,n=0){let r=[...t,e];return n&&r.length>n?r.slice(1):r}function bH(t,e,n=0){let r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var Pu=Symbol();function Z0(t,e){return t.queryFn===Pu&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${t.queryHash}'`),!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===Pu?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function fh(t,e){return typeof t=="function"?t(...e):!!t}function wH(t,e,n){let r=!1,o;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(o??=e(),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),t}var Tse=class extends di{#e;#t;#n;constructor(){super(),this.#n=t=>{if(!vo&&window.addEventListener){let e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){let t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},dh=new Tse;function Ry(){let t,e,n=new Promise((o,i)=>{t=o,e=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),t(o)},n.reject=o=>{r({status:"rejected",reason:o}),e(o)},n}var SH=pH;function Ese(){let t=[],e=0,n=a=>{a()},r=a=>{a()},o=SH,i=a=>{e?t.push(a):o(()=>{n(a)})},s=()=>{let a=t;t=[],a.length&&o(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||s()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{o=a}}}var wt=Ese();var Ase=class extends di{#e=!0;#t;#n;constructor(){super(),this.#n=t=>{if(!vo&&window.addEventListener){let e=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(n=>{n(t)}))}isOnline(){return this.#e}},hh=new Ase;function Dse(t){return Math.min(1e3*2**t,3e4)}function tT(t){return(t??"online")==="online"?hh.isOnline():!0}var eS=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function tS(t){let e=!1,n=0,r,o=Ry(),i=()=>o.status!=="pending",s=m=>{if(!i()){let g=new eS(m);d(g),t.onCancel?.(g)}},a=()=>{e=!0},l=()=>{e=!1},c=()=>dh.isFocused()&&(t.networkMode==="always"||hh.isOnline())&&t.canRun(),u=()=>tT(t.networkMode)&&t.canRun(),f=m=>{i()||(r?.(),o.resolve(m))},d=m=>{i()||(r?.(),o.reject(m))},h=()=>new Promise(m=>{r=g=>{(i()||c())&&m(g)},t.onPause?.()}).then(()=>{r=void 0,i()||t.onContinue?.()}),p=()=>{if(i())return;let m,g=n===0?t.initialPromise:void 0;try{m=g??t.fn()}catch(y){m=Promise.reject(y)}Promise.resolve(m).then(f).catch(y=>{if(i())return;let x=t.retry??(vo?0:3),v=t.retryDelay??Dse,b=typeof v=="function"?v(n,y):v,S=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,y);if(e||!S){d(y);return}n++,t.onFail?.(n,y),xH(b).then(()=>c()?void 0:h()).then(()=>{e?d(y):p()})})};return{promise:o,status:()=>o.status,cancel:s,continue:()=>(r?.(),o),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?p():h().then(p),o)}}var nS=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Cy(this.gcTime)&&(this.#e=_s.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(vo?1/0:300*1e3))}clearGcTimeout(){this.#e&&(_s.clearTimeout(this.#e),this.#e=void 0)}};var kH=class extends nS{#e;#t;#n;#r;#o;#s;#a;constructor(t){super(),this.#a=!1,this.#s=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#r=t.client,this.#n=this.#r.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#e=IH(this.options),this.state=t.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#o?.promise}setOptions(t){if(this.options={...this.#s,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=IH(this.options);e.data!==void 0&&(this.setState(CH(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(t,e){let n=ky(this.state.data,t,this.options);return this.#i({data:n,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),n}setState(t,e){this.#i({type:"setState",state:t,setStateOptions:e})}cancel(t){let e=this.#o?.promise;return this.#o?.cancel(t),e?e.then(Sn).catch(Sn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(t=>bo(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Pu||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>qi(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Q0(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#o?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#o?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#o&&(this.#a?this.#o.cancel({revert:!0}):this.#o.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#o?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#o)return this.#o.continueRetry(),this.#o.promise}if(t&&this.setOptions(t),!this.options.queryFn){let a=this.observers.find(l=>l.options.queryFn);a&&this.setOptions(a.options)}Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']");let n=new AbortController,r=a=>{Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},o=()=>{let a=Z0(this.options,e),c=(()=>{let u={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(u),u})();return this.#a=!1,this.options.persister?this.options.persister(a,c,this):a(c)},s=(()=>{let a={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:o};return r(a),a})();this.options.behavior?.onFetch(s,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==s.fetchOptions?.meta)&&this.#i({type:"fetch",meta:s.fetchOptions?.meta}),this.#o=tS({initialPromise:e?.initialPromise,fn:s.fetchFn,onCancel:a=>{a instanceof eS&&a.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(a,l)=>{this.#i({type:"failed",failureCount:a,error:l})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0});try{let a=await this.#o.start();if(a===void 0)throw console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(a),this.#n.config.onSuccess?.(a,this),this.#n.config.onSettled?.(a,this.state.error,this),a}catch(a){if(a instanceof eS){if(a.silent)return this.#o.promise;if(a.revert){if(this.state.data===void 0)throw a;return this.state.data}}throw this.#i({type:"error",error:a}),this.#n.config.onError?.(a,this),this.#n.config.onSettled?.(this.state.data,a,this),a}finally{this.scheduleGc()}}#i(t){let e=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...nT(n.data,this.options),fetchMeta:t.meta??null};case"success":let r={...n,...CH(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=t.manual?r:void 0,r;case"error":let o=t.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=e(this.state),wt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:t})})}};function nT(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:tT(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function CH(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function IH(t){let e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var My=class extends di{constructor(t,e){super(),this.options=e,this.#e=t,this.#i=null,this.#a=Ry(),this.bindMethods(),this.setOptions(e)}#e;#t=void 0;#n=void 0;#r=void 0;#o;#s;#a;#i;#m;#d;#h;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),RH(this.#t,this.options)?this.#f():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return rT(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return rT(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#w(),this.#t.removeObserver(this)}setOptions(t){let e=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof bo(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),e._defaulted&&!uh(this.options,e)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});let r=this.hasListeners();r&&MH(this.#t,n,this.options,e)&&this.#f(),this.updateResult(),r&&(this.#t!==n||bo(this.options.enabled,this.#t)!==bo(e.enabled,this.#t)||qi(this.options.staleTime,this.#t)!==qi(e.staleTime,this.#t))&&this.#g();let o=this.#y();r&&(this.#t!==n||bo(this.options.enabled,this.#t)!==bo(e.enabled,this.#t)||o!==this.#l)&&this.#x(o)}getOptimisticResult(t){let e=this.#e.getQueryCache().build(this.#e,t),n=this.createResult(e,t);return _se(this,n)&&(this.#r=n,this.#s=this.options,this.#o=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(t,e){return new Proxy(t,{get:(n,r)=>(this.trackProp(r),e?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(t){this.#p.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){let e=this.#e.defaultQueryOptions(t),n=this.#e.getQueryCache().build(this.#e,e);return n.fetch().then(()=>this.createResult(n,e))}fetch(t){return this.#f({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#f(t){this.#S();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(Sn)),e}#g(){this.#b();let t=qi(this.options.staleTime,this.#t);if(vo||this.#r.isStale||!Cy(t))return;let n=Q0(this.#r.dataUpdatedAt,t)+1;this.#c=_s.setTimeout(()=>{this.#r.isStale||this.updateResult()},n)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#x(t){this.#w(),this.#l=t,!(vo||bo(this.options.enabled,this.#t)===!1||!Cy(this.#l)||this.#l===0)&&(this.#u=_s.setInterval(()=>{(this.options.refetchIntervalInBackground||dh.isFocused())&&this.#f()},this.#l))}#v(){this.#g(),this.#x(this.#y())}#b(){this.#c&&(_s.clearTimeout(this.#c),this.#c=void 0)}#w(){this.#u&&(_s.clearInterval(this.#u),this.#u=void 0)}createResult(t,e){let n=this.#t,r=this.options,o=this.#r,i=this.#o,s=this.#s,l=t!==n?t.state:this.#n,{state:c}=t,u={...c},f=!1,d;if(e._optimisticResults){let C=this.hasListeners(),k=!C&&RH(t,e),P=C&&MH(t,n,e,r);(k||P)&&(u={...u,...nT(c.data,t.options)}),e._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:h,errorUpdatedAt:p,status:m}=u;d=u.data;let g=!1;if(e.placeholderData!==void 0&&d===void 0&&m==="pending"){let C;o?.isPlaceholderData&&e.placeholderData===s?.placeholderData?(C=o.data,g=!0):C=typeof e.placeholderData=="function"?e.placeholderData(this.#h?.state.data,this.#h):e.placeholderData,C!==void 0&&(m="success",d=ky(o?.data,C,e),f=!0)}if(e.select&&d!==void 0&&!g)if(o&&d===i?.data&&e.select===this.#m)d=this.#d;else try{this.#m=e.select,d=e.select(d),d=ky(o?.data,d,e),this.#d=d,this.#i=null}catch(C){this.#i=C}this.#i&&(h=this.#i,d=this.#d,p=Date.now(),m="error");let y=u.fetchStatus==="fetching",x=m==="pending",v=m==="error",b=x&&y,S=d!==void 0,I={status:m,fetchStatus:u.fetchStatus,isPending:x,isSuccess:m==="success",isError:v,isInitialLoading:b,isLoading:b,data:d,dataUpdatedAt:u.dataUpdatedAt,error:h,errorUpdatedAt:p,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>l.dataUpdateCount||u.errorUpdateCount>l.errorUpdateCount,isFetching:y,isRefetching:y&&!x,isLoadingError:v&&!S,isPaused:u.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:v&&S,isStale:oT(t,e),refetch:this.refetch,promise:this.#a,isEnabled:bo(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){let C=I.data!==void 0,k=I.status==="error"&&!C,P=A=>{k?A.reject(I.error):C&&A.resolve(I.data)},E=()=>{let A=this.#a=I.promise=Ry();P(A)},O=this.#a;switch(O.status){case"pending":t.queryHash===n.queryHash&&P(O);break;case"fulfilled":(k||I.data!==O.value)&&E();break;case"rejected":(!k||I.error!==O.reason)&&E();break}}return I}updateResult(){let t=this.#r,e=this.createResult(this.#t,this.options);if(this.#o=this.#t.state,this.#s=this.options,this.#o.data!==void 0&&(this.#h=this.#t),uh(e,t))return;this.#r=e;let n=()=>{if(!t)return!0;let{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!this.#p.size)return!0;let i=new Set(o??this.#p);return this.options.throwOnError&&i.add("error"),Object.keys(this.#r).some(s=>{let a=s;return this.#r[a]!==t[a]&&i.has(a)})};this.#C({listeners:n()})}#S(){let t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;let e=this.#t;this.#t=t,this.#n=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#C(t){wt.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Ose(t,e){return bo(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function RH(t,e){return Ose(t,e)||t.state.data!==void 0&&rT(t,e,e.refetchOnMount)}function rT(t,e,n){if(bo(e.enabled,t)!==!1&&qi(e.staleTime,t)!=="static"){let r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&oT(t,e)}return!1}function MH(t,e,n,r){return(t!==e||bo(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&oT(t,n)}function oT(t,e){return bo(e.enabled,t)!==!1&&t.isStaleByTime(qi(e.staleTime,t))}function _se(t,e){return!uh(t.getCurrentResult(),e)}function iT(t){return{onFetch:(e,n)=>{let r=e.options,o=e.fetchOptions?.meta?.fetchMore?.direction,i=e.state.data?.pages||[],s=e.state.data?.pageParams||[],a={pages:[],pageParams:[]},l=0,c=async()=>{let u=!1,f=p=>{wH(p,()=>e.signal,()=>u=!0)},d=Z0(e.options,e.fetchOptions),h=async(p,m,g)=>{if(u)return Promise.reject();if(m==null&&p.pages.length)return Promise.resolve(p);let x=(()=>{let w={client:e.client,queryKey:e.queryKey,pageParam:m,direction:g?"backward":"forward",meta:e.options.meta};return f(w),w})(),v=await d(x),{maxPages:b}=e.options,S=g?bH:vH;return{pages:S(p.pages,v,b),pageParams:S(p.pageParams,m,b)}};if(o&&i.length){let p=o==="backward",m=p?Nse:PH,g={pages:i,pageParams:s},y=m(r,g);a=await h(g,y,p)}else{let p=t??i.length;do{let m=l===0?s[0]??r.initialPageParam:PH(r,a);if(l>0&&m==null)break;a=await h(a,m),l++}while(l<p)}return a};e.options.persister?e.fetchFn=()=>e.options.persister?.(c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n):e.fetchFn=c}}}function PH(t,{pages:e,pageParams:n}){let r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function Nse(t,{pages:e,pageParams:n}){return e.length>0?t.getPreviousPageParam?.(e[0],e,n[0],n):void 0}var LH=class extends nS{#e;#t;#n;#r;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#t=[],this.state=t.state||sT(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(e=>e!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(t){let e=()=>{this.#o({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=tS({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(i,s)=>{this.#o({type:"failed",failureCount:i,error:s})},onPause:()=>{this.#o({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status==="pending",o=!this.#r.canStart();try{if(r)e();else{this.#o({type:"pending",variables:t,isPaused:o}),await this.#n.config.onMutate?.(t,this,n);let s=await this.options.onMutate?.(t,n);s!==this.state.context&&this.#o({type:"pending",context:s,variables:t,isPaused:o})}let i=await this.#r.start();return await this.#n.config.onSuccess?.(i,t,this.state.context,this,n),await this.options.onSuccess?.(i,t,this.state.context,n),await this.#n.config.onSettled?.(i,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(i,null,t,this.state.context,n),this.#o({type:"success",data:i}),i}catch(i){try{await this.#n.config.onError?.(i,t,this.state.context,this,n)}catch(s){Promise.reject(s)}try{await this.options.onError?.(i,t,this.state.context,n)}catch(s){Promise.reject(s)}try{await this.#n.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,n)}catch(s){Promise.reject(s)}try{await this.options.onSettled?.(void 0,i,t,this.state.context,n)}catch(s){Promise.reject(s)}throw this.#o({type:"error",error:i}),i}finally{this.#n.runNext(this)}}#o(t){let e=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),wt.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function sT(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var TH=class extends di{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(t,e,n){let r=new LH({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(e),state:n});return this.add(r),r}add(t){this.#e.add(t);let e=rS(t);if(typeof e=="string"){let n=this.#t.get(e);n?n.push(t):this.#t.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){let e=rS(t);if(typeof e=="string"){let n=this.#t.get(e);if(n)if(n.length>1){let r=n.indexOf(t);r!==-1&&n.splice(r,1)}else n[0]===t&&this.#t.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){let e=rS(t);if(typeof e=="string"){let r=this.#t.get(e)?.find(o=>o.state.status==="pending");return!r||r===t}else return!0}runNext(t){let e=rS(t);return typeof e=="string"?this.#t.get(e)?.find(r=>r!==t&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){wt.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){let e={exact:!0,...t};return this.getAll().find(n=>J0(e,n))}findAll(t={}){return this.getAll().filter(e=>J0(t,e))}notify(t){wt.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){let t=this.getAll().filter(e=>e.state.isPaused);return wt.batch(()=>Promise.all(t.map(e=>e.continue().catch(Sn))))}};function rS(t){return t.options.scope?.id}var aT=class extends di{#e;#t=void 0;#n;#r;constructor(t,e){super(),this.#e=t,this.setOptions(e),this.bindMethods(),this.#o()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#e.defaultMutationOptions(t),uh(this.options,e)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),e?.mutationKey&&this.options.mutationKey&&eo(e.mutationKey)!==eo(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#o(),this.#s(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#o(),this.#s()}mutate(t,e){return this.#r=e,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#o(){let t=this.#n?.state??sT();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#s(t){wt.batch(()=>{if(this.#r&&this.hasListeners()){let e=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#r.onSuccess?.(t.data,e,n,r)}catch(o){Promise.reject(o)}try{this.#r.onSettled?.(t.data,null,e,n,r)}catch(o){Promise.reject(o)}}else if(t?.type==="error"){try{this.#r.onError?.(t.error,e,n,r)}catch(o){Promise.reject(o)}try{this.#r.onSettled?.(void 0,t.error,e,n,r)}catch(o){Promise.reject(o)}}}this.listeners.forEach(e=>{e(this.#t)})})}};var EH=class extends di{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,e,n){let r=e.queryKey,o=e.queryHash??Iy(r,e),i=this.get(o);return i||(i=new kH({client:t,queryKey:r,queryHash:o,options:t.defaultQueryOptions(e),state:n,defaultOptions:t.getQueryDefaults(r)}),this.add(i)),i}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){let e=this.#e.get(t.queryHash);e&&(t.destroy(),e===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){wt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){let e={exact:!0,...t};return this.getAll().find(n=>X0(e,n))}findAll(t={}){let e=this.getAll();return Object.keys(t).length>0?e.filter(n=>X0(t,n)):e}notify(t){wt.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){wt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){wt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}};var lT=class{#e;#t;#n;#r;#o;#s;#a;#i;constructor(t={}){this.#e=t.queryCache||new EH,this.#t=t.mutationCache||new TH,this.#n=t.defaultOptions||{},this.#r=new Map,this.#o=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#a=dh.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=hh.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#a?.(),this.#a=void 0,this.#i?.(),this.#i=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){let e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){let e=this.defaultQueryOptions(t),n=this.#e.build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(qi(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:n})=>{let r=n.data;return[e,r]})}setQueryData(t,e,n){let r=this.defaultQueryOptions({queryKey:t}),i=this.#e.get(r.queryHash)?.state.data,s=yH(e,i);if(s!==void 0)return this.#e.build(this,r).setData(s,{...n,manual:!0})}setQueriesData(t,e,n){return wt.batch(()=>this.#e.findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){let e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){let e=this.#e;wt.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){let n=this.#e;return wt.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){let n={revert:!0,...e},r=wt.batch(()=>this.#e.findAll(t).map(o=>o.cancel(n)));return Promise.all(r).then(Sn).catch(Sn)}invalidateQueries(t,e={}){return wt.batch(()=>(this.#e.findAll(t).forEach(n=>{n.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){let n={...e,cancelRefetch:e.cancelRefetch??!0},r=wt.batch(()=>this.#e.findAll(t).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(Sn)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Sn)}fetchQuery(t){let e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);let n=this.#e.build(this,e);return n.isStaleByTime(qi(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Sn).catch(Sn)}fetchInfiniteQuery(t){return t.behavior=iT(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Sn).catch(Sn)}ensureInfiniteQueryData(t){return t.behavior=iT(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return hh.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,e){this.#r.set(eo(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){let e=[...this.#r.values()],n={};return e.forEach(r=>{Lu(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){this.#o.set(eo(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){let e=[...this.#o.values()],n={};return e.forEach(r=>{Lu(t,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;let e={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Iy(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Pu&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};import*as ph from"react";import{jsx as Fse}from"react/jsx-runtime";var cT=ph.createContext(void 0),Ns=t=>{let e=ph.useContext(cT);if(t)return t;if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},uT=({client:t,children:e})=>(ph.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),Fse(cT.Provider,{value:t,children:e}));import*as oS from"react";var AH=oS.createContext(!1),DH=()=>oS.useContext(AH),r9e=AH.Provider;import*as Py from"react";import{jsx as s9e}from"react/jsx-runtime";function Bse(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var Vse=Py.createContext(Bse()),OH=()=>Py.useContext(Vse);import*as _H from"react";var NH=(t,e,n)=>{let r=n?.state.error&&typeof t.throwOnError=="function"?fh(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||r)&&(e.isReset()||(t.retryOnMount=!1))},FH=t=>{_H.useEffect(()=>{t.clearReset()},[t])},BH=({result:t,errorResetBoundary:e,throwOnError:n,query:r,suspense:o})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(o&&t.data===void 0||fh(n,[t.error,r]));var VH=t=>{if(t.suspense){let n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},zH=(t,e)=>t.isLoading&&t.isFetching&&!e,HH=(t,e)=>t?.suspense&&e.isPending,fT=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});import*as ql from"react";function qH(t,e,n){if(typeof t!="object"||Array.isArray(t))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');let r=DH(),o=OH(),i=Ns(n),s=i.defaultQueryOptions(t);i.getDefaultOptions().queries?._experimental_beforeQuery?.(s);let a=i.getQueryCache().get(s.queryHash);s.queryFn||console.error(`[${s.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`),s._optimisticResults=r?"isRestoring":"optimistic",VH(s),NH(s,o,a),FH(o);let l=!i.getQueryCache().get(s.queryHash),[c]=ql.useState(()=>new e(i,s)),u=c.getOptimisticResult(s),f=!r&&t.subscribed!==!1;if(ql.useSyncExternalStore(ql.useCallback(d=>{let h=f?c.subscribe(wt.batchCalls(d)):Sn;return c.updateResult(),h},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),ql.useEffect(()=>{c.setOptions(s)},[s,c]),HH(s,u))throw fT(s,c,o);if(BH({result:u,errorResetBoundary:o,throwOnError:s.throwOnError,query:a,suspense:s.suspense}))throw u.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(s,u),s.experimental_prefetchInRender&&!vo&&zH(u,r)&&(l?fT(s,c,o):a?.promise)?.catch(Sn).finally(()=>{c.updateResult()}),s.notifyOnChangeProps?u:c.trackResult(u)}function dT(t,e){return qH(t,My,e)}import*as iS from"react";function hT(t,e){let n=Ns(e),r=n.getQueryCache();return iS.useSyncExternalStore(iS.useCallback(o=>r.subscribe(wt.batchCalls(o)),[r]),()=>n.isFetching(t),()=>n.isFetching(t))}import*as Oa from"react";function Ly(t,e){let n=Ns(e);return WH({filters:{...t,status:"pending"}},n).length}function UH(t,e){return t.findAll(e.filters).map(n=>e.select?e.select(n):n.state)}function WH(t={},e){let n=Ns(e).getMutationCache(),r=Oa.useRef(t),o=Oa.useRef(null);return o.current===null&&(o.current=UH(n,t)),Oa.useEffect(()=>{r.current=t}),Oa.useSyncExternalStore(Oa.useCallback(i=>n.subscribe(()=>{let s=ch(o.current,UH(n,r.current));o.current!==s&&(o.current=s,wt.schedule(i))}),[n]),()=>o.current,()=>o.current)}import*as _a from"react";function Tu(t,e){let n=Ns(e),[r]=_a.useState(()=>new aT(n,t));_a.useEffect(()=>{r.setOptions(t)},[r,t]);let o=_a.useSyncExternalStore(_a.useCallback(s=>r.subscribe(wt.batchCalls(s)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=_a.useCallback((s,a)=>{r.mutate(s,a).catch(Sn)},[r]);if(o.error&&fh(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}import{createContext as Cle,useCallback as vh,useContext as Ile,useEffect as OT,useMemo as kle,useRef as zs}from"react";import se from"react";import Hse from"react-dom";function zse(t){if(!t||typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}var qse=t=>{switch(t){case"success":return $se;case"info":return Kse;case"warning":return Gse;case"error":return jse;default:return null}},Use=Array(12).fill(0),Wse=({visible:t,className:e})=>se.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},se.createElement("div",{className:"sonner-spinner"},Use.map((n,r)=>se.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),$se=se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},se.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Gse=se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},se.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Kse=se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},se.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),jse=se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},se.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Yse=se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},se.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),se.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Qse=()=>{let[t,e]=se.useState(document.hidden);return se.useEffect(()=>{let n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},pT=1,mT=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let n=this.subscribers.indexOf(e);this.subscribers.splice(n,1)}),this.publish=e=>{this.subscribers.forEach(n=>n(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var n;let{message:r,...o}=e,i=typeof e?.id=="number"||((n=e.id)==null?void 0:n.length)>0?e.id:pT++,s=this.toasts.find(l=>l.id===i),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),s?this.toasts=this.toasts.map(l=>l.id===i?(this.publish({...l,...e,id:i,title:r}),{...l,...e,id:i,dismissible:a,title:r}):l):this.addToast({title:r,...o,dismissible:a,id:i}),i},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:e,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),e),this.message=(e,n)=>this.create({...n,message:e}),this.error=(e,n)=>this.create({...n,message:e,type:"error"}),this.success=(e,n)=>this.create({...n,type:"success",message:e}),this.info=(e,n)=>this.create({...n,type:"info",message:e}),this.warning=(e,n)=>this.create({...n,type:"warning",message:e}),this.loading=(e,n)=>this.create({...n,type:"loading",message:e}),this.promise=(e,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:e,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));let o=Promise.resolve(e instanceof Function?e():e),i=r!==void 0,s,a=o.then(async c=>{if(s=["resolve",c],se.isValidElement(c))i=!1,this.create({id:r,type:"default",message:c});else if(Jse(c)&&!c.ok){i=!1;let f=typeof n.error=="function"?await n.error(`HTTP error! status: ${c.status}`):n.error,d=typeof n.description=="function"?await n.description(`HTTP error! status: ${c.status}`):n.description,p=typeof f=="object"&&!se.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:d,...p})}else if(c instanceof Error){i=!1;let f=typeof n.error=="function"?await n.error(c):n.error,d=typeof n.description=="function"?await n.description(c):n.description,p=typeof f=="object"&&!se.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:d,...p})}else if(n.success!==void 0){i=!1;let f=typeof n.success=="function"?await n.success(c):n.success,d=typeof n.description=="function"?await n.description(c):n.description,p=typeof f=="object"&&!se.isValidElement(f)?f:{message:f};this.create({id:r,type:"success",description:d,...p})}}).catch(async c=>{if(s=["reject",c],n.error!==void 0){i=!1;let u=typeof n.error=="function"?await n.error(c):n.error,f=typeof n.description=="function"?await n.description(c):n.description,h=typeof u=="object"&&!se.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:f,...h})}}).finally(()=>{i&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((c,u)=>a.then(()=>s[0]==="reject"?u(s[1]):c(s[1])).catch(u));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(e,n)=>{let r=n?.id||pT++;return this.create({jsx:e(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},wo=new mT,Xse=(t,e)=>{let n=e?.id||pT++;return wo.addToast({title:t,...e,id:n}),n},Jse=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",Zse=Xse,eae=()=>wo.toasts,tae=()=>wo.getActiveToasts(),Ul=Object.assign(Zse,{success:wo.success,info:wo.info,warning:wo.warning,error:wo.error,custom:wo.custom,message:wo.message,promise:wo.promise,dismiss:wo.dismiss,loading:wo.loading},{getHistory:eae,getToasts:tae});zse("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function sS(t){return t.label!==void 0}var nae=3,rae="24px",oae="16px",$H=4e3,iae=356,sae=14,aae=45,lae=200;function Fs(...t){return t.filter(Boolean).join(" ")}function cae(t){let[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}var uae=t=>{var e,n,r,o,i,s,a,l,c;let{invert:u,toast:f,unstyled:d,interacting:h,setHeights:p,visibleToasts:m,heights:g,index:y,toasts:x,expanded:v,removeToast:b,defaultRichColors:S,closeButton:w,style:I,cancelButtonStyle:C,actionButtonStyle:k,className:P="",descriptionClassName:E="",duration:O,position:A,gap:R,expandByDefault:N,classNames:T,icons:_,closeButtonAriaLabel:L="Close toast"}=t,[M,D]=se.useState(null),[B,V]=se.useState(null),[H,U]=se.useState(!1),[F,q]=se.useState(!1),[z,Y]=se.useState(!1),[J,j]=se.useState(!1),[de,ie]=se.useState(!1),[Ee,Ne]=se.useState(0),[ze,pe]=se.useState(0),ge=se.useRef(f.duration||O||$H),te=se.useRef(null),He=se.useRef(null),yt=y===0,Mt=y+1<=m,ee=f.type,Ae=f.dismissible!==!1,Me=f.className||"",Pe=f.descriptionClassName||"",rt=se.useMemo(()=>g.findIndex(X=>X.toastId===f.id)||0,[g,f.id]),xt=se.useMemo(()=>{var X;return(X=f.closeButton)!=null?X:w},[f.closeButton,w]),Dt=se.useMemo(()=>f.duration||O||$H,[f.duration,O]),Ot=se.useRef(0),Qe=se.useRef(0),Fe=se.useRef(0),Ze=se.useRef(null),[Xe,Ln]=A.split("-"),_n=se.useMemo(()=>g.reduce((X,nt,ot)=>ot>=rt?X:X+nt.height,0),[g,rt]),sn=Qse(),Nn=f.invert||u,yo=ee==="loading";Qe.current=se.useMemo(()=>rt*R+_n,[rt,_n]),se.useEffect(()=>{ge.current=Dt},[Dt]),se.useEffect(()=>{U(!0)},[]),se.useEffect(()=>{let X=He.current;if(X){let nt=X.getBoundingClientRect().height;return pe(nt),p(ot=>[{toastId:f.id,height:nt,position:f.position},...ot]),()=>p(ot=>ot.filter(vt=>vt.toastId!==f.id))}},[p,f.id]),se.useLayoutEffect(()=>{if(!H)return;let X=He.current,nt=X.style.height;X.style.height="auto";let ot=X.getBoundingClientRect().height;X.style.height=nt,pe(ot),p(vt=>vt.find(dt=>dt.toastId===f.id)?vt.map(dt=>dt.toastId===f.id?{...dt,height:ot}:dt):[{toastId:f.id,height:ot,position:f.position},...vt])},[H,f.title,f.description,p,f.id,f.jsx,f.action,f.cancel]);let ye=se.useCallback(()=>{q(!0),Ne(Qe.current),p(X=>X.filter(nt=>nt.toastId!==f.id)),setTimeout(()=>{b(f)},lae)},[f,b,p,Qe]);se.useEffect(()=>{if(f.promise&&ee==="loading"||f.duration===1/0||f.type==="loading")return;let X;return v||h||sn?(()=>{if(Fe.current<Ot.current){let vt=new Date().getTime()-Ot.current;ge.current=ge.current-vt}Fe.current=new Date().getTime()})():ge.current!==1/0&&(Ot.current=new Date().getTime(),X=setTimeout(()=>{f.onAutoClose==null||f.onAutoClose.call(f,f),ye()},ge.current)),()=>clearTimeout(X)},[v,h,f,ee,sn,ye]),se.useEffect(()=>{f.delete&&(ye(),f.onDismiss==null||f.onDismiss.call(f,f))},[ye,f.delete]);function We(){var X;if(_?.loading){var nt;return se.createElement("div",{className:Fs(T?.loader,f==null||(nt=f.classNames)==null?void 0:nt.loader,"sonner-loader"),"data-visible":ee==="loading"},_.loading)}return se.createElement(Wse,{className:Fs(T?.loader,f==null||(X=f.classNames)==null?void 0:X.loader),visible:ee==="loading"})}let me=f.icon||_?.[ee]||qse(ee);var Se,Ye;return se.createElement("li",{tabIndex:0,ref:He,className:Fs(P,Me,T?.toast,f==null||(e=f.classNames)==null?void 0:e.toast,T?.default,T?.[ee],f==null||(n=f.classNames)==null?void 0:n[ee]),"data-sonner-toast":"","data-rich-colors":(Se=f.richColors)!=null?Se:S,"data-styled":!(f.jsx||f.unstyled||d),"data-mounted":H,"data-promise":!!f.promise,"data-swiped":de,"data-removed":F,"data-visible":Mt,"data-y-position":Xe,"data-x-position":Ln,"data-index":y,"data-front":yt,"data-swiping":z,"data-dismissible":Ae,"data-type":ee,"data-invert":Nn,"data-swipe-out":J,"data-swipe-direction":B,"data-expanded":!!(v||N&&H),"data-testid":f.testId,style:{"--index":y,"--toasts-before":y,"--z-index":x.length-y,"--offset":`${F?Ee:Qe.current}px`,"--initial-height":N?"auto":`${ze}px`,...I,...f.style},onDragEnd:()=>{Y(!1),D(null),Ze.current=null},onPointerDown:X=>{X.button!==2&&(yo||!Ae||(te.current=new Date,Ne(Qe.current),X.target.setPointerCapture(X.pointerId),X.target.tagName!=="BUTTON"&&(Y(!0),Ze.current={x:X.clientX,y:X.clientY})))},onPointerUp:()=>{var X,nt,ot;if(J||!Ae)return;Ze.current=null;let vt=Number(((X=He.current)==null?void 0:X.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Wt=Number(((nt=He.current)==null?void 0:nt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),dt=new Date().getTime()-((ot=te.current)==null?void 0:ot.getTime()),et=M==="x"?vt:Wt,Xt=Math.abs(et)/dt;if(Math.abs(et)>=aae||Xt>.11){Ne(Qe.current),f.onDismiss==null||f.onDismiss.call(f,f),V(M==="x"?vt>0?"right":"left":Wt>0?"down":"up"),ye(),j(!0);return}else{var bt,it;(bt=He.current)==null||bt.style.setProperty("--swipe-amount-x","0px"),(it=He.current)==null||it.style.setProperty("--swipe-amount-y","0px")}ie(!1),Y(!1),D(null)},onPointerMove:X=>{var nt,ot,vt;if(!Ze.current||!Ae||((nt=window.getSelection())==null?void 0:nt.toString().length)>0)return;let dt=X.clientY-Ze.current.y,et=X.clientX-Ze.current.x;var Xt;let bt=(Xt=t.swipeDirections)!=null?Xt:cae(A);!M&&(Math.abs(et)>1||Math.abs(dt)>1)&&D(Math.abs(et)>Math.abs(dt)?"x":"y");let it={x:0,y:0},Sr=gn=>1/(1.5+Math.abs(gn)/20);if(M==="y"){if(bt.includes("top")||bt.includes("bottom"))if(bt.includes("top")&&dt<0||bt.includes("bottom")&&dt>0)it.y=dt;else{let gn=dt*Sr(dt);it.y=Math.abs(gn)<Math.abs(dt)?gn:dt}}else if(M==="x"&&(bt.includes("left")||bt.includes("right")))if(bt.includes("left")&&et<0||bt.includes("right")&&et>0)it.x=et;else{let gn=et*Sr(et);it.x=Math.abs(gn)<Math.abs(et)?gn:et}(Math.abs(it.x)>0||Math.abs(it.y)>0)&&ie(!0),(ot=He.current)==null||ot.style.setProperty("--swipe-amount-x",`${it.x}px`),(vt=He.current)==null||vt.style.setProperty("--swipe-amount-y",`${it.y}px`)}},xt&&!f.jsx&&ee!=="loading"?se.createElement("button",{"aria-label":L,"data-disabled":yo,"data-close-button":!0,onClick:yo||!Ae?()=>{}:()=>{ye(),f.onDismiss==null||f.onDismiss.call(f,f)},className:Fs(T?.closeButton,f==null||(r=f.classNames)==null?void 0:r.closeButton)},(Ye=_?.close)!=null?Ye:Yse):null,(ee||f.icon||f.promise)&&f.icon!==null&&(_?.[ee]!==null||f.icon)?se.createElement("div",{"data-icon":"",className:Fs(T?.icon,f==null||(o=f.classNames)==null?void 0:o.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||We():null,f.type!=="loading"?me:null):null,se.createElement("div",{"data-content":"",className:Fs(T?.content,f==null||(i=f.classNames)==null?void 0:i.content)},se.createElement("div",{"data-title":"",className:Fs(T?.title,f==null||(s=f.classNames)==null?void 0:s.title)},f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title),f.description?se.createElement("div",{"data-description":"",className:Fs(E,Pe,T?.description,f==null||(a=f.classNames)==null?void 0:a.description)},typeof f.description=="function"?f.description():f.description):null),se.isValidElement(f.cancel)?f.cancel:f.cancel&&sS(f.cancel)?se.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||C,onClick:X=>{sS(f.cancel)&&Ae&&(f.cancel.onClick==null||f.cancel.onClick.call(f.cancel,X),ye())},className:Fs(T?.cancelButton,f==null||(l=f.classNames)==null?void 0:l.cancelButton)},f.cancel.label):null,se.isValidElement(f.action)?f.action:f.action&&sS(f.action)?se.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||k,onClick:X=>{sS(f.action)&&(f.action.onClick==null||f.action.onClick.call(f.action,X),!X.defaultPrevented&&ye())},className:Fs(T?.actionButton,f==null||(c=f.classNames)==null?void 0:c.actionButton)},f.action.label):null)};function GH(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function fae(t,e){let n={};return[t,e].forEach((r,o)=>{let i=o===1,s=i?"--mobile-offset":"--offset",a=i?oae:rae;function l(c){["top","right","bottom","left"].forEach(u=>{n[`${s}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${s}-${c}`]=a:n[`${s}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}var KH=se.forwardRef(function(e,n){let{id:r,invert:o,position:i="bottom-right",hotkey:s=["altKey","KeyT"],expand:a,closeButton:l,className:c,offset:u,mobileOffset:f,theme:d="light",richColors:h,duration:p,style:m,visibleToasts:g=nae,toastOptions:y,dir:x=GH(),gap:v=sae,icons:b,containerAriaLabel:S="Notifications"}=e,[w,I]=se.useState([]),C=se.useMemo(()=>r?w.filter(H=>H.toasterId===r):w.filter(H=>!H.toasterId),[w,r]),k=se.useMemo(()=>Array.from(new Set([i].concat(C.filter(H=>H.position).map(H=>H.position)))),[C,i]),[P,E]=se.useState([]),[O,A]=se.useState(!1),[R,N]=se.useState(!1),[T,_]=se.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),L=se.useRef(null),M=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),D=se.useRef(null),B=se.useRef(!1),V=se.useCallback(H=>{I(U=>{var F;return(F=U.find(q=>q.id===H.id))!=null&&F.delete||wo.dismiss(H.id),U.filter(({id:q})=>q!==H.id)})},[]);return se.useEffect(()=>wo.subscribe(H=>{if(H.dismiss){requestAnimationFrame(()=>{I(U=>U.map(F=>F.id===H.id?{...F,delete:!0}:F))});return}setTimeout(()=>{Hse.flushSync(()=>{I(U=>{let F=U.findIndex(q=>q.id===H.id);return F!==-1?[...U.slice(0,F),{...U[F],...H},...U.slice(F+1)]:[H,...U]})})})}),[w]),se.useEffect(()=>{if(d!=="system"){_(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?_("dark"):_("light")),typeof window>"u")return;let H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:U})=>{_(U?"dark":"light")})}catch{H.addListener(({matches:F})=>{try{_(F?"dark":"light")}catch(q){console.error(q)}})}},[d]),se.useEffect(()=>{w.length<=1&&A(!1)},[w]),se.useEffect(()=>{let H=U=>{var F;if(s.every(Y=>U[Y]||U.code===Y)){var z;A(!0),(z=L.current)==null||z.focus()}U.code==="Escape"&&(document.activeElement===L.current||(F=L.current)!=null&&F.contains(document.activeElement))&&A(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[s]),se.useEffect(()=>{if(L.current)return()=>{D.current&&(D.current.focus({preventScroll:!0}),D.current=null,B.current=!1)}},[L.current]),se.createElement("section",{ref:n,"aria-label":`${S} ${M}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},k.map((H,U)=>{var F;let[q,z]=H.split("-");return C.length?se.createElement("ol",{key:H,dir:x==="auto"?GH():x,tabIndex:-1,ref:L,className:c,"data-sonner-toaster":!0,"data-sonner-theme":T,"data-y-position":q,"data-x-position":z,style:{"--front-toast-height":`${((F=P[0])==null?void 0:F.height)||0}px`,"--width":`${iae}px`,"--gap":`${v}px`,...m,...fae(u,f)},onBlur:Y=>{B.current&&!Y.currentTarget.contains(Y.relatedTarget)&&(B.current=!1,D.current&&(D.current.focus({preventScroll:!0}),D.current=null))},onFocus:Y=>{Y.target instanceof HTMLElement&&Y.target.dataset.dismissible==="false"||B.current||(B.current=!0,D.current=Y.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{R||A(!1)},onDragEnd:()=>A(!1),onPointerDown:Y=>{Y.target instanceof HTMLElement&&Y.target.dataset.dismissible==="false"||N(!0)},onPointerUp:()=>N(!1)},C.filter(Y=>!Y.position&&U===0||Y.position===H).map((Y,J)=>{var j,de;return se.createElement(uae,{key:Y.id,icons:b,index:J,toast:Y,defaultRichColors:h,duration:(j=y?.duration)!=null?j:p,className:y?.className,descriptionClassName:y?.descriptionClassName,invert:o,visibleToasts:g,closeButton:(de=y?.closeButton)!=null?de:l,interacting:R,position:H,style:y?.style,unstyled:y?.unstyled,classNames:y?.classNames,cancelButtonStyle:y?.cancelButtonStyle,actionButtonStyle:y?.actionButtonStyle,closeButtonAriaLabel:y?.closeButtonAriaLabel,removeToast:V,toasts:C.filter(ie=>ie.position==Y.position),heights:P.filter(ie=>ie.position==Y.position),setHeights:E,expandByDefault:a,gap:v,expanded:O,swipeDirections:e.swipeDirections})})):null}))});var aS=Object.create(null),Ty=t=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(t?aS:globalThis),Wl=new Proxy(aS,{get(t,e){return Ty()[e]??aS[e]},has(t,e){let n=Ty();return e in n||e in aS},set(t,e,n){let r=Ty(!0);return r[e]=n,!0},deleteProperty(t,e){if(!e)return!1;let n=Ty(!0);return delete n[e],!0},ownKeys(){let t=Ty(!0);return Object.keys(t)}}),dae=typeof process<"u"&&process.env&&"true"||"",hae=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CLOUDFLARE_WORKERS","WORKERS_CI",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["CODESANDBOX","CODESANDBOX_HOST",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"],["ZEABUR"],["CODESPHERE","CODESPHERE_APP_ID",{ci:!0}],["RAILWAY","RAILWAY_PROJECT_ID"],["RAILWAY","RAILWAY_SERVICE_ID"],["DENO-DEPLOY","DENO_DEPLOYMENT_ID"],["FIREBASE_APP_HOSTING","FIREBASE_APP_HOSTING",{ci:!0}]];function pae(){if(globalThis.process?.env)for(let t of hae){let e=t[1]||t[0];if(globalThis.process?.env[e])return{name:t[0].toLowerCase(),...t[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}var YH=pae(),QH=YH.name;function Eu(t){return t?t!=="false":!1}var Ey=globalThis.process?.platform||"",mh=Eu(Wl.CI)||YH.ci!==!1,XH=Eu(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY),Au=typeof window<"u",H9e=Eu(Wl.DEBUG),mae=dae==="test"||Eu(Wl.TEST);var q9e=Eu(Wl.MINIMAL)||mh||mae||!XH,gae=/^win/i.test(Ey),U9e=/^linux/i.test(Ey),W9e=/^darwin/i.test(Ey),$9e=!Eu(Wl.NO_COLOR)&&(Eu(Wl.FORCE_COLOR)||(XH||gae)&&Wl.TERM!=="dumb"||mh),gT=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null,G9e=Number(gT?.split(".")[0])||null,yae=globalThis.process||Object.create(null),jH={versions:{}},JH=new Proxy(yae,{get(t,e){if(e==="env")return Wl;if(e in t)return t[e];if(e in jH)return jH[e]}}),xae=globalThis.process?.release?.name==="node",vae=!!globalThis.Bun||!!globalThis.process?.versions?.bun,bae=!!globalThis.Deno,wae=!!globalThis.fastly,Sae=!!globalThis.Netlify,Cae=!!globalThis.EdgeRuntime,Iae=globalThis.navigator?.userAgent==="Cloudflare-Workers",kae=[[Sae,"netlify"],[Cae,"edge-light"],[Iae,"workerd"],[wae,"fastly"],[bae,"deno"],[vae,"bun"],[xae,"node"]];function Rae(){let t=kae.find(e=>e[0]);if(t)return{name:t[1]}}var Mae=Rae(),K9e=Mae?.name||"";function ZH(t=new Date){return`${Pae(t)}T${Lae(t)}${Tae(t)}`}function Pae(t){return[t.getFullYear(),Du(t.getMonth()+1),Du(t.getDate())].join("-")}function Lae(t){return[Du(t.getHours()),Du(t.getMinutes()),Du(t.getSeconds())].join(":")}function Tae(t){let e=t.getTimezoneOffset();if(!e)return"Z";let n=Math.abs(e),r=Math.floor(n/60),o=n%60;return`${e>0?"-":"+"}${Du(r)}:${Du(o)}`}function Du(t){return String(t).padStart(2,"0")}var Eae="https://checkpoint.prisma.io/v1";var Aae="check/:product";async function eq(t){let e=new URL(Aae,t.baseURL||Eae);e.pathname=e.pathname.replace(":product",t.product);let{additionalData:n}=t;e.search=new URLSearchParams([...Object.entries({arch:t.architecture||JH.arch||"unknown",check_if_update_available:`${t.skipUpdateCheck!==!0}`,ci:`${mh}`,ci_name:QH,cli_install_type:t.cliInstallType||"",cli_path_hash:t.cliPathHash||"",client_event_id:t.eventId||"",command:t.command||"",information:typeof n=="string"?n:n?JSON.stringify(n):"",local_timestamp:ZH(t.timestamp),node_version:gT||"0.0.0",os:t.platform||Ey||"unknown",previous_client_event_id:t.previousEventId||"",project_hash:t.projectHash||"",signature:t.signature,version:t.version}),...yT("schema_generators_providers",t.ormGeneratorProviders),...yT("schema_preview_features",t.ormPreviewFeatures),...yT("schema_providers",[t.ormDatasourceProvider])]).toString(),t.debug&&console.debug("Sending request to:",e.toString());let r=await fetch(e,{headers:{Accept:"application/json","User-Agent":"prisma/js-checkpoint"},method:"GET"});if(!r.ok)throw new Error(`checkpoint response error: ${r.status} ${r.statusText}`);return await r.json()}function yT(t,e){return e?.filter(Boolean).map(n=>[t,n])||[]}import{jsx as Dae}from"react/jsx-runtime";var tq=({...t})=>Dae(KH,{className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t});import{useEffect as nq,useMemo as rq}from"react";function iq(t){try{let e={light:{},dark:{}},n=t.replace(/@layer\s+base\s*\{|\}$/g,"").trim(),r=n.match(/:root\s*\{([^}]+)\}/),o=n.match(/\.dark\s*\{([^}]+)\}/);return r&&r[1]&&(e.light=oq(r[1])),o&&o[1]&&(e.dark=oq(o[1])),Object.keys(e.light).length===0&&Object.keys(e.dark).length===0?null:e}catch{return null}}function oq(t){let e={},n=/--([\w-]+):\s*([^;]+);?/g,r;for(;(r=n.exec(t))!==null;){let[,o,i]=r;o&&i&&(e[`--${o}`]=i.trim())}return e}function Oae(t){let e=document.documentElement;Object.entries(t).forEach(([n,r])=>{e.style.setProperty(n,r)})}function _ae(t){let e=document.querySelector(".ps");e&&(t?e.classList.add("dark"):e.classList.remove("dark"))}function sq(t,e){let n=rq(()=>t?typeof t=="string"?iq(t):t:null,[t]),r=rq(()=>n?n[e?"dark":"light"]||{}:null,[n,e]);return nq(()=>{r&&Oae(r)},[r]),nq(()=>{_ae(e??!1)},[e]),{parsedTheme:n,currentThemeVariables:r,hasCustomTheme:!!n}}var wq=fd(xq(),1);var uS="0123456789abcdef",fS=class t{constructor(e){this.bytes=e}static ofInner(e){if(e.length!==16)throw new TypeError("not 128-bit length");return new t(e)}static fromFieldsV7(e,n,r,o){if(!Number.isInteger(e)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(o)||e<0||n<0||r<0||o<0||e>0xffffffffffff||n>4095||r>1073741823||o>4294967295)throw new RangeError("invalid field value");let i=new Uint8Array(16);return i[0]=e/2**40,i[1]=e/2**32,i[2]=e/2**24,i[3]=e/2**16,i[4]=e/2**8,i[5]=e,i[6]=112|n>>>8,i[7]=n,i[8]=128|r>>>24,i[9]=r>>>16,i[10]=r>>>8,i[11]=r,i[12]=o>>>24,i[13]=o>>>16,i[14]=o>>>8,i[15]=o,new t(i)}static parse(e){var n,r,o,i;let s;switch(e.length){case 32:s=(n=/^[0-9a-f]{32}$/i.exec(e))===null||n===void 0?void 0:n[0];break;case 36:s=(r=/^([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(e))===null||r===void 0?void 0:r.slice(1,6).join("");break;case 38:s=(o=/^\{([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})\}$/i.exec(e))===null||o===void 0?void 0:o.slice(1,6).join("");break;case 45:s=(i=/^urn:uuid:([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(e))===null||i===void 0?void 0:i.slice(1,6).join("");break;default:break}if(s){let a=new Uint8Array(16);for(let l=0;l<16;l+=4){let c=parseInt(s.substring(2*l,2*l+8),16);a[l+0]=c>>>24,a[l+1]=c>>>16,a[l+2]=c>>>8,a[l+3]=c}return new t(a)}else throw new SyntaxError("could not parse UUID string")}toString(){let e="";for(let n=0;n<this.bytes.length;n++)e+=uS.charAt(this.bytes[n]>>>4),e+=uS.charAt(this.bytes[n]&15),(n===3||n===5||n===7||n===9)&&(e+="-");return e}toHex(){let e="";for(let n=0;n<this.bytes.length;n++)e+=uS.charAt(this.bytes[n]>>>4),e+=uS.charAt(this.bytes[n]&15);return e}toJSON(){return this.toString()}getVariant(){let e=this.bytes[8]>>>4;if(e<0)throw new Error("unreachable");if(e<=7)return this.bytes.every(n=>n===0)?"NIL":"VAR_0";if(e<=11)return"VAR_10";if(e<=13)return"VAR_110";if(e<=15)return this.bytes.every(n=>n===255)?"MAX":"VAR_RESERVED";throw new Error("unreachable")}getVersion(){return this.getVariant()==="VAR_10"?this.bytes[6]>>>4:void 0}clone(){return new t(this.bytes.slice(0))}equals(e){return this.compareTo(e)===0}compareTo(e){for(let n=0;n<16;n++){let r=this.bytes[n]-e.bytes[n];if(r!==0)return Math.sign(r)}return 0}},RT=class{constructor(e){this.timestamp_biased=0,this.counter=0,this.random=e??tle()}generate(){return this.generateOrResetCore(Date.now(),1e4)}generateOrAbort(){return this.generateOrAbortCore(Date.now(),1e4)}generateOrResetCore(e,n){let r=this.generateOrAbortCore(e,n);return r===void 0&&(this.timestamp_biased=0,r=this.generateOrAbortCore(e,n)),r}generateOrAbortCore(e,n){if(!Number.isInteger(e)||e<0||e>0xffffffffffff)throw new RangeError("`unixTsMs` must be a 48-bit unsigned integer");if(n<0||n>0xffffffffffff)throw new RangeError("`rollbackAllowance` out of reasonable range");if(e++,e>this.timestamp_biased)this.timestamp_biased=e,this.resetCounter();else if(e+n>=this.timestamp_biased)this.counter++,this.counter>4398046511103&&(this.timestamp_biased++,this.resetCounter());else return;return fS.fromFieldsV7(this.timestamp_biased-1,Math.trunc(this.counter/2**30),this.counter&2**30-1,this.random.nextUint32())}resetCounter(){this.counter=this.random.nextUint32()*1024+(this.random.nextUint32()&1023)}generateV4(){let e=new Uint8Array(Uint32Array.of(this.random.nextUint32(),this.random.nextUint32(),this.random.nextUint32(),this.random.nextUint32()).buffer);return e[6]=64|e[6]>>>4,e[8]=128|e[8]>>>2,fS.ofInner(e)}},tle=()=>{if(typeof crypto<"u"&&typeof crypto.getRandomValues<"u")return new MT;if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");return{nextUint32:()=>Math.trunc(Math.random()*65536)*65536+Math.trunc(Math.random()*65536)}},MT=class{constructor(){this.buffer=new Uint32Array(8),this.cursor=65535}nextUint32(){return this.cursor>=this.buffer.length&&(crypto.getRandomValues(this.buffer),this.cursor=0),this.buffer[this.cursor++]}},vq,bq=()=>nle().toString(),nle=()=>(vq||(vq=new RT)).generate();var Uo=wq.default.createTranslator({uuid:bq});import{createContext as rle,createElement as ole,useContext as PT}from"react";var LT=sle();function un(t,...e){if(!LT)return;let n=ile(t,...e);performance.mark(n);try{console.log(t,...e)}catch{console.log(n)}}function Sq(t,...e){LT&&console.warn(t,...e)}function ile(t,...e){return t.replace(/%[sfdO]/g,n=>{let r=e.shift();return n==="%O"&&r?JSON.stringify(r).replace(/"([^"]+)":/g,"$1:"):String(r)})}function sle(){try{let t="nuqs-localStorage-test";if(typeof localStorage>"u")return!1;localStorage.setItem(t,t);let e=localStorage.getItem(t)===t;return localStorage.removeItem(t),e&&(localStorage.getItem("debug")||"").includes("nuqs")}catch{return!1}}var ale={303:"Multiple adapter contexts detected. This might happen in monorepos.",404:"nuqs requires an adapter to work with your framework.",409:"Multiple versions of the library are loaded. This may lead to unexpected behavior. Currently using `%s`, but `%s` (via the %s adapter) was about to load on top.",414:"Max safe URL length exceeded. Some browsers may not be able to accept this URL. Consider limiting the amount of state stored in the URL.",422:"Invalid options combination: `limitUrlUpdates: debounce` should be used in SSR scenarios, with `shallow: false`",429:"URL update rate-limited by the browser. Consider increasing `throttleMs` for key(s) `%s`. %O",500:"Empty search params cache. Search params can't be accessed in Layouts.",501:"Search params cache already populated. Have you called `parse` twice?"};function _u(t){return`[nuqs] ${ale[t]}
|
|
29
|
-
See https://nuqs.dev/NUQS-${t}`}var Ou=rle({useAdapter(){throw new Error(_u(404))}});Ou.displayName="NuqsAdapterContext";LT&&typeof window<"u"&&(window.__NuqsAdapterContext&&window.__NuqsAdapterContext!==Ou&&console.error(_u(303)),window.__NuqsAdapterContext=Ou);function TT(t){return({children:e,defaultOptions:n,processUrlSearchParams:r,...o})=>ole(Ou.Provider,{...o,value:{useAdapter:t,defaultOptions:n,processUrlSearchParams:r}},e)}function Cq(t){let e=PT(Ou);if(!("useAdapter"in e))throw new Error(_u(404));return e.useAdapter(t)}var Iq=()=>PT(Ou).defaultOptions,kq=()=>PT(Ou).processUrlSearchParams;import{useEffect as Tq,useMemo as vle}from"react";import{useCallback as dS,useEffect as Pq,useRef as Lq,useState as yle}from"react";var ET=120,Rq=Symbol("prisma.studio.tanstack_db_mutation_guard.instrumented");function cle(t){if(typeof t!="object"||t==null)return!1;let e=t;return typeof e.insert=="function"&&typeof e.update=="function"&&typeof e.delete=="function"}function ule(t){let{maxMutationsPerTick:e,mutationCount:n,triggeredBy:r}=t;return[`[TanStack DB] Mutation burst detected: ${n} mutations in one event-loop tick`,`(threshold: ${e}).`,`Triggered by ${r.collectionName}.${r.method}().`,"This often indicates render-driven write loops.","Keep transient input state local and avoid collection writes on every keystroke."].join(" ")}function fle(t){return[...t.entries()].sort((e,n)=>n[1]-e[1]).slice(0,5).map(([e,n])=>({collectionName:e,count:n}))}function dle(t={}){let e=t.enabled??!1,n=t.maxMutationsPerTick??ET,r=t.mode??"warn",o=t.onViolation,i=0,s=!1,a=!1,l=new Map;function c(){i=0,l.clear(),a=!1,s=!1}function u(){s||(s=!0,setTimeout(c,0))}function f(d){if(!e||(u(),i+=1,l.set(d.collectionName,(l.get(d.collectionName)??0)+1),i<=n||a))return;a=!0;let h={collectionBreakdown:fle(l),maxMutationsPerTick:n,message:ule({maxMutationsPerTick:n,mutationCount:i,triggeredBy:d}),mutationCount:i,triggeredBy:d};if(o?.(h),r==="throw")throw new Error(h.message);console.warn(h.message,{collectionBreakdown:h.collectionBreakdown,maxMutationsPerTick:h.maxMutationsPerTick,mutationCount:h.mutationCount,triggeredBy:h.triggeredBy})}return{recordMutation:f}}function Mq(){return Au&&window.__PRISMA_STUDIO_STRICT_TANSTACK_DB__===!0}function hle(){return Mq()}function ple(){return Mq()?"throw":"warn"}function mle(){if(!Au)return ET;let t=window.__PRISMA_STUDIO_TANSTACK_DB_MAX_MUTATIONS_PER_TICK__;return Number.isInteger(t)&&t>0?t:ET}var gle=dle({maxMutationsPerTick:mle(),mode:ple()});function Ui(t,e){if(!cle(t)||!e.guard&&!hle())return t;let n=t;if(n[Rq])return t;let r=e.guard??gle,{collectionName:o}=e,i=n.insert.bind(n),s=n.update.bind(n),a=n.delete.bind(n);return n.insert=(...l)=>(r.recordMutation({collectionName:o,method:"insert"}),i(...l)),n.update=(...l)=>(r.recordMutation({collectionName:o,method:"update"}),s(...l)),n.delete=(...l)=>(r.recordMutation({collectionName:o,method:"delete"}),a(...l)),n[Rq]=!0,t}var xle=Ui(Zr(Aa({id:"fallback-ui-local-state",getKey(t){return t.id},initialData:[]})),{collectionName:"fallback-ui-local-state"});function hi(t){return typeof t!="object"||t==null?t:structuredClone(t)}function AT(t,e){return typeof e=="function"?e(t):e}function $l(t){let e=Lq(null);return e.current||(e.current=`${t}:${Uo.generate()}`),e.current}function Ct(t,e,n={}){let{cleanupOnUnmount:r=!1}=n,[o,i]=yle(()=>hi(e)),s=Lq(t),l=DT()?.uiLocalStateCollection??xle,{data:c}=fi(p=>{if(!(r||!t))return p.from({item:l}).where(({item:m})=>ui(m.id,t)).select(({item:m})=>({id:m.id,value:m.value})).findOne()},[r,t,l]);Pq(()=>{if(r){if(s.current!==t){s.current=t,i(hi(e));return}i(p=>Object.is(p,e)?p:hi(e))}},[r,e,t]);let u=dS(p=>{i(m=>hi(AT(m,p)))},[]),f=dS(()=>{i(hi(e))},[e]);Pq(()=>{r||t&&(l.has(t)||l.insert({id:t,value:hi(e)}))},[r,e,t,l]);let d=dS(p=>{if(r){u(p);return}if(!t)return;if(!l.get(t)){l.insert({id:t,value:hi(AT(hi(e),p))});return}l.update(t,g=>{let y=g.value;g.value=hi(AT(y,p))})},[r,e,t,u,l]),h=dS(()=>{if(r){f();return}if(t){if(!l.has(t)){l.insert({id:t,value:hi(e)});return}l.update(t,p=>{p.value=hi(e)})}},[r,e,t,f,l]);return[r?o:c?.value??hi(e),d,h]}var ble="nuqs-hash";function wle(t,e){let n;return(...r)=>{n&&clearTimeout(n),n=setTimeout(()=>t(...r),e)}}function Sle(){let t=typeof window<"u"?window.location.hash.slice(1):"",[e,n]=Ct(ble,t),r=a=>{n(a)};Tq(()=>{e!==t&&r(t)},[t,e]);function o(a,{history:l}){let{pathname:c,search:u}=window.location,f=a.toString(),d=`${c}${u}#${f}`;l==="push"?window.history.pushState(null,"",d):window.history.replaceState(null,"",d),r(f)}function i(){if(typeof window>"u")return new URLSearchParams;let a=window.location.hash.slice(1);return new URLSearchParams(a)}return Tq(()=>{let a=wle(()=>{r(window.location.hash.slice(1))},50);return window.addEventListener("hashchange",a),()=>window.removeEventListener("hashchange",a)},[]),{searchParams:vle(()=>new URLSearchParams(e),[e]),updateUrl:o,getSearchParamsSnapshot:i}}var Eq=TT(Sle);import{jsx as hS,jsxs as Dle}from"react/jsx-runtime";var Nu="studio-ui-state",Rle="prisma-studio-ui-state-v1",Mle="studio-sql-editor-state",Ple="prisma-studio-sql-editor-state-v1";function Lle(t){return typeof t=="object"&&t!==null&&"cleanup"in t}function _T(){return{id:Nu,isFullscreen:!1,isNavigationOpen:!0,isDarkMode:typeof document<"u"&&document.documentElement.classList.contains("dark")}}var Aq=Cle(void 0);function Dq(t){let{children:e,onEvent:n,adapter:r,theme:o}=t,i=zs(new lT),s=zs(Uo.generate()),a=zs(new Map),l=zs(Ui(Zr(U0({id:Nu,storageKey:Rle,getKey(L){return L.id}})),{collectionName:"studio-ui-state"})),c=zs(Ui(Zr(Aa({id:"studio-operation-events",getKey(L){return L.eventId},initialData:[]})),{collectionName:"studio-operation-events"})),u=zs(Ui(Zr(Aa({id:"studio-table-ui-state",getKey(L){return L.id},initialData:[]})),{collectionName:"studio-table-ui-state"})),f=zs(Ui(Zr(Aa({id:"studio-table-query-meta",getKey(L){return L.id},initialData:[]})),{collectionName:"studio-table-query-meta"})),d=zs(Ui(Zr(Aa({id:"studio-local-ui-state",getKey(L){return L.id},initialData:[]})),{collectionName:"studio-local-ui-state"})),h=zs(Ui(Zr(U0({id:Mle,storageKey:Ple,getKey(L){return L.id}})),{collectionName:"studio-sql-editor-state"})),p=zs(Ui(Zr(Aa({id:"studio-navigation-table-names",getKey(L){return L.id},initialData:[]})),{collectionName:"studio-navigation-table-names"})),m=i.current,g=l.current,y=c.current,x=u.current,v=f.current,b=d.current,S=h.current,w=p.current,{data:I=[]}=fi(g),{data:C=[]}=fi(y),k=I.find(L=>L.id===Nu)??_T(),P=kle(()=>[...C].sort((L,M)=>new Date(L.timestamp).getTime()-new Date(M.timestamp).getTime()),[C]),E=vh(L=>{if(!g.get(Nu)){let D=_T();L(D),g.insert(D);return}g.update(Nu,L)},[g]),O=vh((L,M)=>{let D=a.current.get(L);if(D!=null)return D;let B=Ui(M(),{collectionName:`rows:${L}`});return a.current.set(L,B),B},[]),A=vh(()=>{for(let L of a.current.values())Lle(L)&&typeof L.cleanup=="function"&&L.cleanup().catch(M=>{console.error("Failed to cleanup cached rows collection",M)});a.current.clear()},[]);OT(()=>{g.has(Nu)||g.insert(_T())},[g]),OT(()=>{A(),m.resetQueries({exact:!1,queryKey:[]})},[r,A,m]),OT(()=>{if(typeof document>"u")return;let L=()=>{let D=document.documentElement.classList.contains("dark");g.get(Nu)?.isDarkMode!==D&&E(B=>{B.isDarkMode=D})};L();let M=new MutationObserver(D=>{for(let B of D)if(B.type==="attributes"&&B.attributeName==="class"){L();break}});return M.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>M.disconnect()},[g,E]);let{hasCustomTheme:R}=sq(o,k.isDarkMode),N=vh(L=>{let{name:M,payload:D}=L;if(M==="studio_operation_error"){if(D.error.name==="AbortError")return;Ul.error(`"${D.operation}" operation failed`,{action:{label:"Console",onClick:()=>{window.location.hash=NT({viewParam:"console"})}}})}let B=Uo.generate(),V=new Date().toISOString(),H={...L,eventId:B,timestamp:V};if(H.name==="studio_operation_success"||H.name==="studio_operation_error"){y.insert(H);let U=y.size-100;if(U>0){let F=[...y.toArray].sort((q,z)=>new Date(q.timestamp).getTime()-new Date(z.timestamp).getTime()).slice(0,U).map(q=>q.eventId);F.length>0&&y.delete(F)}}n?.(H),M==="studio_launched"&&Au&&!mh&&!Tle()&&!Ale()&&eq({additionalData:{eventPayload:D,variant:"free"},command:M,eventId:B,product:"prisma-studio-embedded",signature:s.current,skipUpdateCheck:!0,timestamp:new Date(V),version:"0.19.1"}).catch(U=>{console.error(U)})},[n,y]),T=vh(()=>{E(L=>{L.isFullscreen=!L.isFullscreen})},[E]),_=vh(()=>{E(L=>{L.isNavigationOpen=!L.isNavigationOpen})},[E]);return Dle(uT,{client:m,children:[hS(tq,{}),hS(Aq.Provider,{value:{adapter:r,isFullscreen:k.isFullscreen,onEvent:N,operationEvents:P,toggleFullscreen:T,isNavigationOpen:k.isNavigationOpen,toggleNavigation:_,isDarkMode:k.isDarkMode,hasCustomTheme:R,queryClient:m,tableUiStateCollection:x,tableQueryMetaCollection:v,uiLocalStateCollection:b,sqlEditorStateCollection:S,navigationTableNamesCollection:w,getOrCreateRowsCollection:O},children:hS(Eq,{children:hS(Oq,{children:e})})})]})}function DT(){return Ile(Aq)}function Cn(){let t=DT();if(!t)throw new Error("`useStudio` must be used within a `StudioContext.Provider`");return t}function Tle(){return Ele()&&"__PVCE__"in window&&window.__PVCE__===!0}function Ele(){return Au&&"acquireVsCodeApi"in window&&typeof window.acquireVsCodeApi=="function"}function Ale(){if(!Au)return!1;let{hostname:t}=window.location;return"__PDPCP__"in window&&window.__PDPCP__===!0||t.includes("console.prisma.io")||t.includes("datacdn.workers.dev")}function FT(){return{kind:"FilterGroup",filters:[],after:"and",id:Uo.generate()}}var pS=FT();function BT(t){let e=0;for(let n of t.filters){if(n.kind==="ColumnFilter"){n.column.trim()&&e++;continue}e+=BT(n)}return e}import{useCallback as _q,useRef as Ole,useSyncExternalStore as _le}from"react";function Nle(){if(typeof window>"u"||!window.GestureEvent)return 50;try{let t=navigator.userAgent?.match(/version\/([\d\.]+) safari/i);return parseFloat(t[1])>=17?120:320}catch{return 320}}function Nq(t){return{method:"throttle",timeMs:t}}var bh=Nq(Nle());function Fq(t){return t===null||Array.isArray(t)&&t.length===0}function Bq(t,e,n){if(typeof t=="string")n.set(e,t);else{n.delete(e);for(let r of t)n.append(e,r);n.has(e)||n.set(e,"")}return n}function qT(){let t=new Map;return{on(e,n){let r=t.get(e)||[];return r.push(n),t.set(e,r),()=>this.off(e,n)},off(e,n){let r=t.get(e);r&&t.set(e,r.filter(o=>o!==n))},emit(e,n){t.get(e)?.forEach(r=>r(n))}}}function VT(t,e,n){function r(){t(),n.removeEventListener("abort",i)}let o=setTimeout(r,e);function i(){clearTimeout(o),n.removeEventListener("abort",i)}n.addEventListener("abort",i)}function zT(){let t=Promise;if(Promise.hasOwnProperty("withResolvers"))return Promise.withResolvers();let e=()=>{},n=()=>{};return{promise:new t((r,o)=>{e=r,n=o}),resolve:e,reject:n}}function Fle(t,e){let n=e;for(let r=t.length-1;r>=0;r--){let o=t[r];if(!o)continue;let i=n;n=()=>o(i)}n()}function HT(){return new URLSearchParams(location.search)}var Vq=class{updateMap=new Map;options={history:"replace",scroll:!1,shallow:!0};timeMs=bh.timeMs;transitions=new Set;resolvers=null;controller=null;lastFlushedAt=0;resetQueueOnNextPush=!1;push({key:t,query:e,options:n},r=bh.timeMs){this.resetQueueOnNextPush&&(this.reset(),this.resetQueueOnNextPush=!1),un("[nuqs gtq] Enqueueing %s=%s %O",t,e,n),this.updateMap.set(t,e),n.history==="push"&&(this.options.history="push"),n.scroll&&(this.options.scroll=!0),n.shallow===!1&&(this.options.shallow=!1),n.startTransition&&this.transitions.add(n.startTransition),(!Number.isFinite(this.timeMs)||r>this.timeMs)&&(this.timeMs=r)}getQueuedQuery(t){return this.updateMap.get(t)}getPendingPromise({getSearchParamsSnapshot:t=HT}){return this.resolvers?.promise??Promise.resolve(t())}flush({getSearchParamsSnapshot:t=HT,rateLimitFactor:e=1,...n},r){if(this.controller??=new AbortController,!Number.isFinite(this.timeMs))return un("[nuqs gtq] Skipping flush due to throttleMs=Infinity"),Promise.resolve(t());if(this.resolvers)return this.resolvers.promise;this.resolvers=zT();let o=()=>{this.lastFlushedAt=performance.now();let[s,a]=this.applyPendingUpdates({...n,autoResetQueueOnUpdate:n.autoResetQueueOnUpdate??!0,getSearchParamsSnapshot:t},r);a===null?(this.resolvers.resolve(s),this.resetQueueOnNextPush=!0):this.resolvers.reject(s),this.resolvers=null};return VT(()=>{let s=performance.now()-this.lastFlushedAt,a=this.timeMs,l=e*Math.max(0,a-s);un("[nuqs gtq] Scheduling flush in %f ms. Throttled at %f ms (x%f)",l,a,e),l===0?o():VT(o,l,this.controller.signal)},0,this.controller.signal),this.resolvers.promise}abort(){return this.controller?.abort(),this.controller=new AbortController,this.resolvers?.resolve(new URLSearchParams),this.resolvers=null,this.reset()}reset(){let t=Array.from(this.updateMap.keys());return un("[nuqs gtq] Resetting queue %s",JSON.stringify(Object.fromEntries(this.updateMap))),this.updateMap.clear(),this.transitions.clear(),this.options={history:"replace",scroll:!1,shallow:!0},this.timeMs=bh.timeMs,t}applyPendingUpdates(t,e){let{updateUrl:n,getSearchParamsSnapshot:r}=t,o=r();if(un("[nuqs gtq] Applying %d pending update(s) on top of %s",this.updateMap.size,o.toString()),this.updateMap.size===0)return[o,null];let i=Array.from(this.updateMap.entries()),s={...this.options},a=Array.from(this.transitions);t.autoResetQueueOnUpdate&&this.reset(),un("[nuqs gtq] Flushing queue %O with options %O",i,s);for(let[l,c]of i)c===null?o.delete(l):o=Bq(c,l,o);e&&(o=e(o));try{return Fle(a,()=>{n(o,s)}),[o,null]}catch(l){return console.error(_u(429),i.map(([c])=>c).join(),l),[o,l]}}},Dy=new Vq;function Ble(t,e,n){let r=_q(()=>{let i=Object.fromEntries(t.map(s=>[s,n(s)]));return[JSON.stringify(i),i]},[t.join(","),n]),o=Ole(null);return o.current===null&&(o.current=r()),_le(_q(i=>{let s=t.map(a=>e(a,i));return()=>s.forEach(a=>a())},[t.join(","),e]),()=>{let[i,s]=r();return o.current[0]===i?o.current[1]:(o.current=[i,s],s)},()=>o.current[1])}var Vle=class{callback;resolvers=zT();controller=new AbortController;queuedValue=void 0;constructor(t){this.callback=t}abort(){this.controller.abort(),this.queuedValue=void 0}push(t,e){return this.queuedValue=t,this.controller.abort(),this.controller=new AbortController,VT(()=>{let n=this.resolvers;try{un("[nuqs dq] Flushing debounce queue",t);let r=this.callback(t);un("[nuqs dq] Reset debounce queue %O",this.queuedValue),this.queuedValue=void 0,this.resolvers=zT(),r.then(o=>n.resolve(o)).catch(o=>n.reject(o))}catch(r){this.queuedValue=void 0,n.reject(r)}},e,this.controller.signal),this.resolvers.promise}},zle=class{throttleQueue;queues=new Map;queuedQuerySync=qT();constructor(t=new Vq){this.throttleQueue=t}useQueuedQueries(t){return Ble(t,(e,n)=>this.queuedQuerySync.on(e,n),e=>this.getQueuedQuery(e))}push(t,e,n,r){if(!Number.isFinite(e)){let s=n.getSearchParamsSnapshot??HT;return Promise.resolve(s())}let o=t.key;if(!this.queues.has(o)){un("[nuqs dqc] Creating debounce queue for `%s`",o);let s=new Vle(a=>(this.throttleQueue.push(a),this.throttleQueue.flush(n,r).finally(()=>{this.queues.get(a.key)?.queuedValue===void 0&&(un("[nuqs dqc] Cleaning up empty queue for `%s`",a.key),this.queues.delete(a.key)),this.queuedQuerySync.emit(a.key)})));this.queues.set(o,s)}un("[nuqs dqc] Enqueueing debounce update %O",t);let i=this.queues.get(o).push(t,e);return this.queuedQuerySync.emit(o),i}abort(t){let e=this.queues.get(t);return e?(un("[nuqs dqc] Aborting debounce queue %s=%s",t,e.queuedValue?.query),this.queues.delete(t),e.abort(),this.queuedQuerySync.emit(t),n=>(n.then(e.resolvers.resolve,e.resolvers.reject),n)):n=>n}abortAll(){for(let[t,e]of this.queues.entries())un("[nuqs dqc] Aborting debounce queue %s=%s",t,e.queuedValue?.query),e.abort(),e.resolvers.resolve(new URLSearchParams),this.queuedQuerySync.emit(t);this.queues.clear()}getQueuedQuery(t){let e=this.queues.get(t)?.queuedValue?.query;return e!==void 0?e:this.throttleQueue.getQueuedQuery(t)}},mS=new zle(Dy);function zq(t,e){return t===e?!0:t===null||e===null||typeof t=="string"||typeof e=="string"||t.length!==e.length?!1:t.every((n,r)=>n===e[r])}import{useCallback as Wq,useEffect as Hq,useId as Hle,useMemo as UT,useRef as qq,useState as qle}from"react";function $q(t,e,n){try{return t(e)}catch(r){return Sq("[nuqs] Error while parsing value `%s`: %O"+(n?" (for key `%s`)":""),e,r,n),null}}function Na(t){function e(n){if(typeof n>"u")return null;let r="";if(Array.isArray(n)){if(n[0]===void 0)return null;r=n[0]}return typeof n=="string"&&(r=n),$q(t.parse,r)}return{type:"single",eq:(n,r)=>n===r,...t,parseServerSide:e,withDefault(n){return{...this,defaultValue:n,parseServerSide(r){return e(r)??n}}},withOptions(n){return{...this,...n}}}}var uQe=Na({parse:t=>t,serialize:String}),fQe=Na({parse:t=>{let e=parseInt(t);return e==e?e:null},serialize:t=>""+Math.round(t)}),dQe=Na({parse:t=>{let e=parseInt(t);return e==e?e-1:null},serialize:t=>""+Math.round(t+1)}),hQe=Na({parse:t=>{let e=parseInt(t,16);return e==e?e:null},serialize:t=>{let e=Math.round(t).toString(16);return(e.length&1?"0":"")+e}}),pQe=Na({parse:t=>{let e=parseFloat(t);return e==e?e:null},serialize:String}),mQe=Na({parse:t=>t.toLowerCase()==="true",serialize:String});function GT(t,e){return t.valueOf()===e.valueOf()}var gQe=Na({parse:t=>{let e=parseInt(t);return e==e?new Date(e):null},serialize:t=>""+t.valueOf(),eq:GT}),yQe=Na({parse:t=>{let e=new Date(t);return e.valueOf()==e.valueOf()?e:null},serialize:t=>t.toISOString(),eq:GT}),xQe=Na({parse:t=>{let e=new Date(t.slice(0,10));return e.valueOf()==e.valueOf()?e:null},serialize:t=>t.toISOString().slice(0,10),eq:GT});var WT=qT(),Ule={};function Gq(t,e={}){let n=Hle(),r=Iq(),o=kq(),{history:i="replace",scroll:s=r?.scroll??!1,shallow:a=r?.shallow??!0,throttleMs:l=bh.timeMs,limitUrlUpdates:c=r?.limitUrlUpdates,clearOnDefault:u=r?.clearOnDefault??!0,startTransition:f,urlKeys:d=Ule}=e,h=Object.keys(t).join(","),p=UT(()=>Object.fromEntries(Object.keys(t).map(C=>[C,d[C]??C])),[h,JSON.stringify(d)]),m=Cq(Object.values(p)),g=m.searchParams,y=qq({}),x=UT(()=>Object.fromEntries(Object.keys(t).map(C=>[C,t[C].defaultValue??null])),[Object.values(t).map(({defaultValue:C})=>C).join(",")]),v=mS.useQueuedQueries(Object.values(p)),[b,S]=qle(()=>$T(t,d,g??new URLSearchParams,v).state),w=qq(b);if(un("[nuq+ %s `%s`] render - state: %O, iSP: %s",n,h,b,g),Object.keys(y.current).join("&")!==Object.values(p).join("&")){let{state:C,hasChanged:k}=$T(t,d,g,v,y.current,w.current);k&&(un("[nuq+ %s `%s`] State changed: %O",n,h,{state:C,initialSearchParams:g,queuedQueries:v,queryRef:y.current,stateRef:w.current}),w.current=C,S(C)),y.current=Object.fromEntries(Object.entries(p).map(([P,E])=>[E,t[P]?.type==="multi"?g?.getAll(E):g?.get(E)??null]))}Hq(()=>{let{state:C,hasChanged:k}=$T(t,d,g,v,y.current,w.current);k&&(un("[nuq+ %s `%s`] State changed: %O",n,h,{state:C,initialSearchParams:g,queuedQueries:v,queryRef:y.current,stateRef:w.current}),w.current=C,S(C))},[Object.values(p).map(C=>`${C}=${g?.getAll(C)}`).join("&"),JSON.stringify(v)]),Hq(()=>{let C=Object.keys(t).reduce((k,P)=>(k[P]=({state:E,query:O})=>{S(A=>{let{defaultValue:R}=t[P],N=p[P],T=E??R??null,_=A[P]??R??null;return Object.is(_,T)?(un("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). no change, skipping, resolved: %O",n,h,N,E,R,w.current),A):(w.current={...w.current,[P]:T},y.current[N]=O,un("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). updateInternalState, resolved: %O",n,h,N,E,R,w.current),w.current)})},k),{});for(let k of Object.keys(t)){let P=p[k];un("[nuq+ %s `%s`] Subscribing to sync for `%s`",n,P,h),WT.on(P,C[k])}return()=>{for(let k of Object.keys(t)){let P=p[k];un("[nuq+ %s `%s`] Unsubscribing to sync for `%s`",n,P,h),WT.off(P,C[k])}}},[h,p]);let I=Wq((C,k={})=>{let P=Object.fromEntries(Object.keys(t).map(_=>[_,null])),E=typeof C=="function"?C(Uq(w.current,x))??P:C??P;un("[nuq+ %s `%s`] setState: %O",n,h,E);let O,A=0,R=!1,N=[];for(let[_,L]of Object.entries(E)){let M=t[_],D=p[_];if(!M||L===void 0)continue;(k.clearOnDefault??M.clearOnDefault??u)&&L!==null&&M.defaultValue!==void 0&&(M.eq??((H,U)=>H===U))(L,M.defaultValue)&&(L=null);let B=L===null?null:(M.serialize??String)(L);WT.emit(D,{state:L,query:B});let V={key:D,query:B,options:{history:k.history??M.history??i,shallow:k.shallow??M.shallow??a,scroll:k.scroll??M.scroll??s,startTransition:k.startTransition??M.startTransition??f}};if(k?.limitUrlUpdates?.method==="debounce"||c?.method==="debounce"||M.limitUrlUpdates?.method==="debounce"){V.options.shallow===!0&&console.warn(_u(422));let H=k?.limitUrlUpdates?.timeMs??c?.timeMs??M.limitUrlUpdates?.timeMs??bh.timeMs,U=mS.push(V,H,m,o);A<H&&(O=U,A=H)}else{let H=k?.limitUrlUpdates?.timeMs??M?.limitUrlUpdates?.timeMs??c?.timeMs??k.throttleMs??M.throttleMs??l;N.push(mS.abort(D)),Dy.push(V,H),R=!0}}let T=N.reduce((_,L)=>L(_),R?Dy.flush(m,o):Dy.getPendingPromise(m));return O??T},[h,i,a,s,l,c?.method,c?.timeMs,f,p,m.updateUrl,m.getSearchParamsSnapshot,m.rateLimitFactor,o,x]);return[UT(()=>Uq(b,x),[b,x]),I]}function $T(t,e,n,r,o,i){let s=!1,a=Object.entries(t).reduce((l,[c,u])=>{let f=e?.[c]??c,d=r[f],h=u.type==="multi"?[]:null,p=d===void 0?(u.type==="multi"?n?.getAll(f):n?.get(f))??h:d;return o&&i&&zq(o[f]??h,p)?(l[c]=i[c]??null,l):(s=!0,l[c]=(Fq(p)?null:$q(u.parse,p,f))??null,o&&(o[f]=p),l)},{});if(!s){let l=Object.keys(t),c=Object.keys(i??{});s=l.length!==c.length||l.some(u=>!c.includes(u))}return{state:a,hasChanged:s}}function Uq(t,e){return Object.fromEntries(Object.keys(t).map(n=>[n,t[n]??e[n]??null]))}function Kq(t,e={}){let{parse:n,type:r,serialize:o,eq:i,defaultValue:s,...a}=e,[{[t]:l},c]=Gq({[t]:{parse:n??(u=>u),type:r,serialize:o,eq:i,defaultValue:s}},a);return[l,Wq((u,f={})=>c(d=>({[t]:typeof u=="function"?u(d[t]):u}),f),[t,c])]}function Wi(t,e){return Kq(t,e)}var jq=-1;function pi(){let{adapter:t,onEvent:e}=Cn();return dT({initialData:{schemas:{[t.defaultSchema||"db"]:{name:t.defaultSchema||"db",tables:{}}},timezone:"UTC",filterOperators:[],query:{parameters:[],sql:""}},initialDataUpdatedAt:jq,queryFn:async({signal:n})=>{let[r,o]=await t.introspect({abortSignal:n});if(r)throw e({name:"studio_operation_error",payload:{operation:"introspect",query:r.query,error:r}}),r;e({name:"studio_operation_success",payload:{operation:"introspect",query:o.query,error:void 0}});let i=Object.values(o.schemas).reduce((s,a)=>s+Object.keys(a.tables).length,0);return e({name:"studio_launched",payload:{tableCount:i}}),o},queryKey:["introspection"],staleTime:n=>n.state.dataUpdatedAt===jq?0:1/0})}import{jsx as Qle}from"react/jsx-runtime";function NT(t){return`#${Object.entries(t).map(([n,r])=>{let o=n.endsWith("Param")?n.slice(0,-5):n;return`${encodeURIComponent(o)}=${encodeURIComponent(r)}`}).join("&")}`}function Kle(t){let{adapter:e,introspection:n}=t,{schemas:r}=n,{defaultSchema:o}=e,i=o??Object.keys(r)[0]??"public",s=Object.keys(r[i]?.tables??{})[0]??"",a=JSON.stringify(pS);return{schema:i,table:s,filter:a,pageIndex:"0",pageSize:"25",search:"",searchScope:"table",view:"table"}}function jle(t){let e=[];for(let[n,r]of Object.entries(t.schemas))for(let o of Object.keys(r.tables))e.push({id:`${n}.${o}`,schema:n,table:o,qualifiedName:`${n}.${o}`});return e}function Yle(){let{adapter:t,navigationTableNamesCollection:e}=Cn(),{data:n,isFetching:r}=pi(),{schemas:o}=n,i=Yq(()=>Kle({adapter:t,introspection:n}),[t,n]);Gle(()=>{let T=jle(n),_=new Map(T.map(D=>[D.id,D])),M=Array.from(e.toArray).map(D=>D.id).filter(D=>!_.has(D));M.length>0&&e.delete(M);for(let D of T){let B=e.get(D.id);if(!B){e.insert(D);continue}B.schema===D.schema&&B.table===D.table&&B.qualifiedName===D.qualifiedName||e.update(D.id,V=>{V.schema=D.schema,V.table=D.table,V.qualifiedName=D.qualifiedName})}},[n,e]);let[s,a]=Wi("filter",{defaultValue:i.filter}),[l,c]=Wi("pageIndex",{defaultValue:i.pageIndex}),[u,f]=Wi("pageSize",{defaultValue:i.pageSize}),[d,h]=Wi("pin"),[p,m]=Wi("schema",{defaultValue:i.schema}),[g,y]=Wi("search",{defaultValue:i.search}),[x,v]=Wi("searchScope",{defaultValue:i.searchScope}),[b,S]=Wi("sort"),[w,I]=Wi("table",{defaultValue:i.table}),[C,k]=Wi("view",{defaultValue:i.view}),P=p&&o[p]?p:i.schema,E=P?o[P]:void 0,O=E?E.tables:void 0,A=w&&O?.[w]?w:Object.keys(O??{})[0],R=O&&A?O[A]:void 0;return{metadata:Yq(()=>({activeSchema:E,activeTables:O,activeTable:R,isFetching:r}),[E,O,R,r]),createUrl:NT,filterParam:s,pageIndexParam:l,pageSizeParam:u,pinParam:d,schemaParam:p,searchParam:g,searchScopeParam:x,sortParam:b,tableParam:w,viewParam:C,setFilterParam:a,setPageIndexParam:c,setPageSizeParam:f,setPinParam:h,setSchemaParam:m,setSearchParam:y,setSearchScopeParam:v,setSortParam:S,setTableParam:I,setViewParam:k}}var Qq=Wle(void 0);function Oq({children:t}){let e=Yle();return Qle(Qq.Provider,{value:e,children:t})}function Ht(){let t=$le(Qq);if(t===void 0)throw new Error("useNavigationContext must be used within a NavigationContextProvider");return t}function Xq(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=Xq(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function gS(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=Xq(t))&&(r&&(r+=" "),r+=e);return r}var Xle=(t,e)=>{let n=new Array(t.length+e.length);for(let r=0;r<t.length;r++)n[r]=t[r];for(let r=0;r<e.length;r++)n[t.length+r]=e[r];return n},Jle=(t,e)=>({classGroupId:t,validator:e}),oU=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n});var Jq=[],Zle="arbitrary..",ece=t=>{let e=nce(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return tce(s);let a=s.split("-"),l=a[0]===""&&a.length>1?1:0;return iU(a,l,e)},getConflictingClassGroupIds:(s,a)=>{if(a){let l=r[s],c=n[s];return l?c?Xle(c,l):l:c||Jq}return n[s]||Jq}}},iU=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;let o=t[e],i=n.nextPart.get(o);if(i){let c=iU(t,e+1,i);if(c)return c}let s=n.validators;if(s===null)return;let a=e===0?t.join("-"):t.slice(e).join("-"),l=s.length;for(let c=0;c<l;c++){let u=s[c];if(u.validator(a))return u.classGroupId}},tce=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{let e=t.slice(1,-1),n=e.indexOf(":"),r=e.slice(0,n);return r?Zle+r:void 0})(),nce=t=>{let{theme:e,classGroups:n}=t;return rce(n,e)},rce=(t,e)=>{let n=oU();for(let r in t){let o=t[r];YT(o,n,r,e)}return n},YT=(t,e,n,r)=>{let o=t.length;for(let i=0;i<o;i++){let s=t[i];oce(s,e,n,r)}},oce=(t,e,n,r)=>{if(typeof t=="string"){ice(t,e,n);return}if(typeof t=="function"){sce(t,e,n,r);return}ace(t,e,n,r)},ice=(t,e,n)=>{let r=t===""?e:sU(e,t);r.classGroupId=n},sce=(t,e,n,r)=>{if(lce(t)){YT(t(r),e,n,r);return}e.validators===null&&(e.validators=[]),e.validators.push(Jle(n,t))},ace=(t,e,n,r)=>{let o=Object.entries(t),i=o.length;for(let s=0;s<i;s++){let[a,l]=o[s];YT(l,sU(e,a),n,r)}},sU=(t,e)=>{let n=t,r=e.split("-"),o=r.length;for(let i=0;i<o;i++){let s=r[i],a=n.nextPart.get(s);a||(a=oU(),n.nextPart.set(s,a)),n=a}return n},lce=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,cce=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),r=Object.create(null),o=(i,s)=>{n[i]=s,e++,e>t&&(e=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}};var uce=[],Zq=(t,e,n,r,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),fce=t=>{let{prefix:e,experimentalParseClassName:n}=t,r=o=>{let i=[],s=0,a=0,l=0,c,u=o.length;for(let m=0;m<u;m++){let g=o[m];if(s===0&&a===0){if(g===":"){i.push(o.slice(l,m)),l=m+1;continue}if(g==="/"){c=m;continue}}g==="["?s++:g==="]"?s--:g==="("?a++:g===")"&&a--}let f=i.length===0?o:o.slice(l),d=f,h=!1;f.endsWith("!")?(d=f.slice(0,-1),h=!0):f.startsWith("!")&&(d=f.slice(1),h=!0);let p=c&&c>l?c-l:void 0;return Zq(i,h,d,p)};if(e){let o=e+":",i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):Zq(uce,!1,s,void 0,!0)}if(n){let o=r;r=i=>n({className:i,parseClassName:o})}return r},dce=t=>{let e=new Map;return t.orderSensitiveModifiers.forEach((n,r)=>{e.set(n,1e6+r)}),n=>{let r=[],o=[];for(let i=0;i<n.length;i++){let s=n[i],a=s[0]==="[",l=e.has(s);a||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},hce=t=>({cache:cce(t.cacheSize),parseClassName:fce(t),sortModifiers:dce(t),...ece(t)}),pce=/\s+/,mce=(t,e)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=e,s=[],a=t.trim().split(pce),l="";for(let c=a.length-1;c>=0;c-=1){let u=a[c],{isExternal:f,modifiers:d,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}=n(u);if(f){l=u+(l.length>0?" "+l:l);continue}let g=!!m,y=r(g?p.substring(0,m):p);if(!y){if(!g){l=u+(l.length>0?" "+l:l);continue}if(y=r(p),!y){l=u+(l.length>0?" "+l:l);continue}g=!1}let x=d.length===0?"":d.length===1?d[0]:i(d).join(":"),v=h?x+"!":x,b=v+y;if(s.indexOf(b)>-1)continue;s.push(b);let S=o(y,g);for(let w=0;w<S.length;++w){let I=S[w];s.push(v+I)}l=u+(l.length>0?" "+l:l)}return l},gce=(...t)=>{let e=0,n,r,o="";for(;e<t.length;)(n=t[e++])&&(r=aU(n))&&(o&&(o+=" "),o+=r);return o},aU=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=aU(t[r]))&&(n&&(n+=" "),n+=e);return n},eU=(t,...e)=>{let n,r,o,i,s=l=>{let c=e.reduce((u,f)=>f(u),t());return n=hce(c),r=n.cache.get,o=n.cache.set,i=a,a(l)},a=l=>{let c=r(l);if(c)return c;let u=mce(l,n);return o(l,u),u};return i=s,(...l)=>i(gce(...l))},yce=[],er=t=>{let e=n=>n[t]||yce;return e.isThemeGetter=!0,e},lU=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,cU=/^\((?:(\w[\w-]*):)?(.+)\)$/i,xce=/^\d+\/\d+$/,vce=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,bce=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,wce=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Sce=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Cce=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,wh=t=>xce.test(t),Je=t=>!!t&&!Number.isNaN(Number(t)),Gl=t=>!!t&&Number.isInteger(Number(t)),KT=t=>t.endsWith("%")&&Je(t.slice(0,-1)),Fa=t=>vce.test(t),Ice=()=>!0,kce=t=>bce.test(t)&&!wce.test(t),uU=()=>!1,Rce=t=>Sce.test(t),Mce=t=>Cce.test(t),Pce=t=>!be(t)&&!we(t),Lce=t=>Sh(t,hU,uU),be=t=>lU.test(t),Fu=t=>Sh(t,pU,kce),jT=t=>Sh(t,Oce,Je),tU=t=>Sh(t,fU,uU),Tce=t=>Sh(t,dU,Mce),yS=t=>Sh(t,mU,Rce),we=t=>cU.test(t),Oy=t=>Ch(t,pU),Ece=t=>Ch(t,_ce),nU=t=>Ch(t,fU),Ace=t=>Ch(t,hU),Dce=t=>Ch(t,dU),xS=t=>Ch(t,mU,!0),Sh=(t,e,n)=>{let r=lU.exec(t);return r?r[1]?e(r[1]):n(r[2]):!1},Ch=(t,e,n=!1)=>{let r=cU.exec(t);return r?r[1]?e(r[1]):n:!1},fU=t=>t==="position"||t==="percentage",dU=t=>t==="image"||t==="url",hU=t=>t==="length"||t==="size"||t==="bg-size",pU=t=>t==="length",Oce=t=>t==="number",_ce=t=>t==="family-name",mU=t=>t==="shadow";var rU=()=>{let t=er("color"),e=er("font"),n=er("text"),r=er("font-weight"),o=er("tracking"),i=er("leading"),s=er("breakpoint"),a=er("container"),l=er("spacing"),c=er("radius"),u=er("shadow"),f=er("inset-shadow"),d=er("text-shadow"),h=er("drop-shadow"),p=er("blur"),m=er("perspective"),g=er("aspect"),y=er("ease"),x=er("animate"),v=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...b(),we,be],w=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],C=()=>[we,be,l],k=()=>[wh,"full","auto",...C()],P=()=>[Gl,"none","subgrid",we,be],E=()=>["auto",{span:["full",Gl,we,be]},Gl,we,be],O=()=>[Gl,"auto",we,be],A=()=>["auto","min","max","fr",we,be],R=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],N=()=>["start","end","center","stretch","center-safe","end-safe"],T=()=>["auto",...C()],_=()=>[wh,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],L=()=>[t,we,be],M=()=>[...b(),nU,tU,{position:[we,be]}],D=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",Ace,Lce,{size:[we,be]}],V=()=>[KT,Oy,Fu],H=()=>["","none","full",c,we,be],U=()=>["",Je,Oy,Fu],F=()=>["solid","dashed","dotted","double"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>[Je,KT,nU,tU],Y=()=>["","none",p,we,be],J=()=>["none",Je,we,be],j=()=>["none",Je,we,be],de=()=>[Je,we,be],ie=()=>[wh,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fa],breakpoint:[Fa],color:[Ice],container:[Fa],"drop-shadow":[Fa],ease:["in","out","in-out"],font:[Pce],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Fa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Fa],shadow:[Fa],spacing:["px",Je],text:[Fa],"text-shadow":[Fa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",wh,be,we,g]}],container:["container"],columns:[{columns:[Je,be,we,a]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:w()}],"overflow-x":[{"overflow-x":w()}],"overflow-y":[{"overflow-y":w()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:k()}],"inset-x":[{"inset-x":k()}],"inset-y":[{"inset-y":k()}],start:[{start:k()}],end:[{end:k()}],top:[{top:k()}],right:[{right:k()}],bottom:[{bottom:k()}],left:[{left:k()}],visibility:["visible","invisible","collapse"],z:[{z:[Gl,"auto",we,be]}],basis:[{basis:[wh,"full","auto",a,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Je,wh,"auto","initial","none",be]}],grow:[{grow:["",Je,we,be]}],shrink:[{shrink:["",Je,we,be]}],order:[{order:[Gl,"first","last","none",we,be]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:E()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:E()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":A()}],"auto-rows":[{"auto-rows":A()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...R(),"normal"]}],"justify-items":[{"justify-items":[...N(),"normal"]}],"justify-self":[{"justify-self":["auto",...N()]}],"align-content":[{content:["normal",...R()]}],"align-items":[{items:[...N(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...N(),{baseline:["","last"]}]}],"place-content":[{"place-content":R()}],"place-items":[{"place-items":[...N(),"baseline"]}],"place-self":[{"place-self":["auto",...N()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:T()}],mx:[{mx:T()}],my:[{my:T()}],ms:[{ms:T()}],me:[{me:T()}],mt:[{mt:T()}],mr:[{mr:T()}],mb:[{mb:T()}],ml:[{ml:T()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:_()}],w:[{w:[a,"screen",..._()]}],"min-w":[{"min-w":[a,"screen","none",..._()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},..._()]}],h:[{h:["screen","lh",..._()]}],"min-h":[{"min-h":["screen","lh","none",..._()]}],"max-h":[{"max-h":["screen","lh",..._()]}],"font-size":[{text:["base",n,Oy,Fu]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,we,jT]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",KT,be]}],"font-family":[{font:[Ece,be,e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,we,be]}],"line-clamp":[{"line-clamp":[Je,"none",we,jT]}],leading:[{leading:[i,...C()]}],"list-image":[{"list-image":["none",we,be]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",we,be]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:[Je,"from-font","auto",we,Fu]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[Je,"auto",we,be]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",we,be]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",we,be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:D()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Gl,we,be],radial:["",we,be],conic:[Gl,we,be]},Dce,Tce]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:U()}],"border-w-x":[{"border-x":U()}],"border-w-y":[{"border-y":U()}],"border-w-s":[{"border-s":U()}],"border-w-e":[{"border-e":U()}],"border-w-t":[{"border-t":U()}],"border-w-r":[{"border-r":U()}],"border-w-b":[{"border-b":U()}],"border-w-l":[{"border-l":U()}],"divide-x":[{"divide-x":U()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":U()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...F(),"hidden","none"]}],"divide-style":[{divide:[...F(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...F(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Je,we,be]}],"outline-w":[{outline:["",Je,Oy,Fu]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",u,xS,yS]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",f,xS,yS]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[Je,Fu]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":U()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",d,xS,yS]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[Je,we,be]}],"mix-blend":[{"mix-blend":[...q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":q()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Je]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[we,be]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Je]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:D()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",we,be]}],filter:[{filter:["","none",we,be]}],blur:[{blur:Y()}],brightness:[{brightness:[Je,we,be]}],contrast:[{contrast:[Je,we,be]}],"drop-shadow":[{"drop-shadow":["","none",h,xS,yS]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",Je,we,be]}],"hue-rotate":[{"hue-rotate":[Je,we,be]}],invert:[{invert:["",Je,we,be]}],saturate:[{saturate:[Je,we,be]}],sepia:[{sepia:["",Je,we,be]}],"backdrop-filter":[{"backdrop-filter":["","none",we,be]}],"backdrop-blur":[{"backdrop-blur":Y()}],"backdrop-brightness":[{"backdrop-brightness":[Je,we,be]}],"backdrop-contrast":[{"backdrop-contrast":[Je,we,be]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Je,we,be]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Je,we,be]}],"backdrop-invert":[{"backdrop-invert":["",Je,we,be]}],"backdrop-opacity":[{"backdrop-opacity":[Je,we,be]}],"backdrop-saturate":[{"backdrop-saturate":[Je,we,be]}],"backdrop-sepia":[{"backdrop-sepia":["",Je,we,be]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",we,be]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Je,"initial",we,be]}],ease:[{ease:["linear","initial",y,we,be]}],delay:[{delay:[Je,we,be]}],animate:[{animate:["none",x,we,be]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,we,be]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:J()}],"rotate-x":[{"rotate-x":J()}],"rotate-y":[{"rotate-y":J()}],"rotate-z":[{"rotate-z":J()}],scale:[{scale:j()}],"scale-x":[{"scale-x":j()}],"scale-y":[{"scale-y":j()}],"scale-z":[{"scale-z":j()}],"scale-3d":["scale-3d"],skew:[{skew:de()}],"skew-x":[{"skew-x":de()}],"skew-y":[{"skew-y":de()}],transform:[{transform:[we,be,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ie()}],"translate-x":[{"translate-x":ie()}],"translate-y":[{"translate-y":ie()}],"translate-z":[{"translate-z":ie()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",we,be]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",we,be]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[Je,Oy,Fu,jT]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Nce=(t,{cacheSize:e,prefix:n,experimentalParseClassName:r,extend:o={},override:i={}})=>(_y(t,"cacheSize",e),_y(t,"prefix",n),_y(t,"experimentalParseClassName",r),vS(t.theme,i.theme),vS(t.classGroups,i.classGroups),vS(t.conflictingClassGroups,i.conflictingClassGroups),vS(t.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),_y(t,"orderSensitiveModifiers",i.orderSensitiveModifiers),bS(t.theme,o.theme),bS(t.classGroups,o.classGroups),bS(t.conflictingClassGroups,o.conflictingClassGroups),bS(t.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),gU(t,o,"orderSensitiveModifiers"),t),_y=(t,e,n)=>{n!==void 0&&(t[e]=n)},vS=(t,e)=>{if(e)for(let n in e)_y(t,n,e[n])},bS=(t,e)=>{if(e)for(let n in e)gU(t,e,n)},gU=(t,e,n)=>{let r=e[n];r!==void 0&&(t[n]=t[n]?t[n].concat(r):r)},yU=(t,...e)=>typeof t=="function"?eU(rU,t,...e):eU(()=>Nce(rU(),t),...e);var Fce=yU({});function G(...t){return Fce(gS(t))}import*as Hn from"react";import*as vU from"react";function xU(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Ba(...t){return e=>{let n=!1,r=t.map(o=>{let i=xU(o,e);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){let i=r[o];typeof i=="function"?i():xU(t[o],null)}}}}function Ke(...t){return vU.useCallback(Ba(...t),t)}import{Fragment as qQe,jsx as bU}from"react/jsx-runtime";var Bce=Symbol.for("react.lazy"),wS=Hn[" use ".trim().toString()];function Vce(t){return typeof t=="object"&&t!==null&&"then"in t}function wU(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===Bce&&"_payload"in t&&Vce(t._payload)}function QT(t){let e=zce(t),n=Hn.forwardRef((r,o)=>{let{children:i,...s}=r;wU(i)&&typeof wS=="function"&&(i=wS(i._payload));let a=Hn.Children.toArray(i),l=a.find(qce);if(l){let c=l.props.children,u=a.map(f=>f===l?Hn.Children.count(c)>1?Hn.Children.only(null):Hn.isValidElement(c)?c.props.children:null:f);return bU(e,{...s,ref:o,children:Hn.isValidElement(c)?Hn.cloneElement(c,void 0,u):null})}return bU(e,{...s,ref:o,children:i})});return n.displayName=`${t}.Slot`,n}var SS=QT("Slot");function zce(t){let e=Hn.forwardRef((n,r)=>{let{children:o,...i}=n;if(wU(o)&&typeof wS=="function"&&(o=wS(o._payload)),Hn.isValidElement(o)){let s=Wce(o),a=Uce(i,o.props);return o.type!==Hn.Fragment&&(a.ref=r?Ba(r,s):s),Hn.cloneElement(o,a)}return Hn.Children.count(o)>1?Hn.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var Hce=Symbol("radix.slottable");function qce(t){return Hn.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Hce}function Uce(t,e){let n={...e};for(let r in e){let o=t[r],i=e[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{let l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...t,...n}}function Wce(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}import{forwardRef as Kce,createElement as jce}from"react";var SU=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),$ce=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase()),XT=t=>{let e=$ce(t);return e.charAt(0).toUpperCase()+e.slice(1)},CS=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim(),CU=t=>{for(let e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};import{forwardRef as Gce,createElement as kU}from"react";var IU={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var RU=Gce(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>kU("svg",{ref:l,...IU,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:CS("lucide",o),...!i&&!CU(a)&&{"aria-hidden":"true"},...a},[...s.map(([c,u])=>kU(c,u)),...Array.isArray(i)?i:[i]]));var he=(t,e)=>{let n=Kce(({className:r,...o},i)=>jce(RU,{ref:i,iconNode:e,className:CS(`lucide-${SU(XT(t))}`,`lucide-${t}`,r),...o}));return n.displayName=XT(t),n};var Yce=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Ny=he("arrow-down",Yce);var Qce=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Fy=he("arrow-right",Qce);var Xce=[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M17 10V4h-2",key:"zcsr5x"}],["path",{d:"M15 10h4",key:"id2lce"}],["rect",{x:"15",y:"14",width:"4",height:"6",ry:"2",key:"33xykx"}]],By=he("arrow-up-1-0",Xce);var Jce=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Vy=he("arrow-up",Jce);var Zce=[["path",{d:"M12 6v12",key:"1vza4d"}],["path",{d:"M17.196 9 6.804 15",key:"1ah31z"}],["path",{d:"m6.804 9 10.392 6",key:"1b6pxd"}]],zy=he("asterisk",Zce);var eue=[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]],Hy=he("calculator",eue);var tue=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],$i=he("check",tue);var nue=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Hs=he("chevron-down",nue);var rue=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],qy=he("chevron-left",rue);var oue=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Wo=he("chevron-right",oue);var iue=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Uy=he("chevron-up",iue);var sue=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],Wy=he("chevrons-left",sue);var aue=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],$y=he("chevrons-right",aue);var lue=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],qs=he("circle-alert",lue);var cue=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Kl=he("circle-check-big",cue);var uue=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Gi=he("circle-question-mark",uue);var fue=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Bu=he("circle",fue);var due=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Vu=he("copy",due);var hue=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],Gy=he("corner-down-left",hue);var pue=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],jl=he("funnel",pue);var mue=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],Ky=he("grip-vertical",mue);var gue=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],Ih=he("key-round",gue);var yue=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],Va=he("key",yue);var xue=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],jy=he("maximize",xue);var vue=[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]],Yy=he("minimize",vue);var bue=[["path",{d:"M5 12h14",key:"1ays0h"}]],zu=he("minus",bue);var wue=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],Yl=he("panel-left-close",wue);var Sue=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],Ql=he("panel-left-open",Sue);var Cue=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]],Qy=he("pin",Cue);var Iue=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Xy=he("play",Iue);var kue=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Jy=he("refresh-cw",kue);var Rue=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Hu=he("search",Rue);var Mue=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"m12 16 4-4-4-4",key:"1i9zcv"}]],Xl=he("square-arrow-right",Mue);var Pue=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Zy=he("square",Pue);var Lue=[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",key:"gugj83"}]],kh=he("table-2",Lue);var Tue=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Jl=he("triangle-alert",Tue);var Eue=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Rh=he("x",Eue);import{useEffect as ehe,useRef as the}from"react";var MU='data:image/svg+xml, <svg width="12" height="14" viewBox="0 0 12 14" fill="none" xmlns="http://www.w3.org/2000/svg">%0A <path%0A fill-rule="evenodd"%0A clip-rule="evenodd"%0A d="M0.396923 8.8719C0.25789 9.09869 0.260041 9.38484 0.402469 9.60951L2.98037 13.6761C3.14768 13.94 3.47018 14.0603 3.76949 13.9705L11.2087 11.7388C11.6147 11.617 11.8189 11.1641 11.6415 10.7792L6.8592 0.405309C6.62598 -0.100601 5.92291 -0.142128 5.63176 0.332808L0.396923 8.8719ZM6.73214 2.77688C6.6305 2.54169 6.2863 2.57792 6.23585 2.82912L4.3947 11.9965C4.35588 12.1898 4.53686 12.3549 4.72578 12.2985L9.86568 10.7642C10.0157 10.7194 10.093 10.5537 10.0309 10.41L6.73214 2.77688Z"%0A fill="currentColor"%0A />%0A </svg>';import*as PU from"react";import{jsx as Due}from"react/jsx-runtime";var tr=PU.forwardRef(({className:t,type:e,...n},r)=>Due("input",{type:e,className:G("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm leading-5 font-normal shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t),ref:r,...n}));tr.displayName="Input";import*as fe from"react";import*as _1 from"react-dom";function JT(t,[e,n]){return Math.min(n,Math.max(e,t))}var cJe=!!(typeof window<"u"&&window.document&&window.document.createElement);function ae(t,e,{checkForDefaultPrevented:n=!0}={}){return function(o){if(t?.(o),n===!1||!o.defaultPrevented)return e?.(o)}}import qu from"react";import*as za from"react";import{jsx as Oue}from"react/jsx-runtime";function qn(t,e=[]){let n=[];function r(i,s){let a=za.createContext(s),l=n.length;n=[...n,s];let c=f=>{let{scope:d,children:h,...p}=f,m=d?.[t]?.[l]||a,g=za.useMemo(()=>p,Object.values(p));return Oue(m.Provider,{value:g,children:h})};c.displayName=i+"Provider";function u(f,d){let h=d?.[t]?.[l]||a,p=za.useContext(h);if(p)return p;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[c,u]}let o=()=>{let i=n.map(s=>za.createContext(s));return function(a){let l=a?.[t]||i;return za.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return o.scopeName=t,[r,_ue(o,...e)]}function _ue(...t){let e=t[0];if(t.length===1)return e;let n=()=>{let r=t.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){let s=r.reduce((a,{useScope:l,scopeName:c})=>{let f=l(i)[`__scope${c}`];return{...a,...f}},{});return za.useMemo(()=>({[`__scope${e.scopeName}`]:s}),[s])}};return n.scopeName=e.scopeName,n}import*as nr from"react";import{Fragment as Nue,jsx as ZT}from"react/jsx-runtime";function Ki(t){let e=Fue(t),n=nr.forwardRef((r,o)=>{let{children:i,...s}=r,a=nr.Children.toArray(i),l=a.find(Bue);if(l){let c=l.props.children,u=a.map(f=>f===l?nr.Children.count(c)>1?nr.Children.only(null):nr.isValidElement(c)?c.props.children:null:f);return ZT(e,{...s,ref:o,children:nr.isValidElement(c)?nr.cloneElement(c,void 0,u):null})}return ZT(e,{...s,ref:o,children:i})});return n.displayName=`${t}.Slot`,n}function Fue(t){let e=nr.forwardRef((n,r)=>{let{children:o,...i}=n;if(nr.isValidElement(o)){let s=zue(o),a=Vue(i,o.props);return o.type!==nr.Fragment&&(a.ref=r?Ba(r,s):s),nr.cloneElement(o,a)}return nr.Children.count(o)>1?nr.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var LU=Symbol("radix.slottable");function TU(t){let e=({children:n})=>ZT(Nue,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=LU,e}function Bue(t){return nr.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===LU}function Vue(t,e){let n={...e};for(let r in e){let o=t[r],i=e[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{let l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...t,...n}}function zue(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}import{jsx as e1}from"react/jsx-runtime";import SJe from"react";import{jsx as IJe}from"react/jsx-runtime";function Mh(t){let e=t+"CollectionProvider",[n,r]=qn(e),[o,i]=n(e,{collectionRef:{current:null},itemMap:new Map}),s=m=>{let{scope:g,children:y}=m,x=qu.useRef(null),v=qu.useRef(new Map).current;return e1(o,{scope:g,itemMap:v,collectionRef:x,children:y})};s.displayName=e;let a=t+"CollectionSlot",l=Ki(a),c=qu.forwardRef((m,g)=>{let{scope:y,children:x}=m,v=i(a,y),b=Ke(g,v.collectionRef);return e1(l,{ref:b,children:x})});c.displayName=a;let u=t+"CollectionItemSlot",f="data-radix-collection-item",d=Ki(u),h=qu.forwardRef((m,g)=>{let{scope:y,children:x,...v}=m,b=qu.useRef(null),S=Ke(g,b),w=i(u,y);return qu.useEffect(()=>(w.itemMap.set(b,{ref:b,...v}),()=>{w.itemMap.delete(b)})),e1(d,{[f]:"",ref:S,children:x})});h.displayName=u;function p(m){let g=i(t+"CollectionConsumer",m);return qu.useCallback(()=>{let x=g.collectionRef.current;if(!x)return[];let v=Array.from(x.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((w,I)=>v.indexOf(w.ref.current)-v.indexOf(I.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:s,Slot:c,ItemSlot:h},p,r]}import*as IS from"react";import{jsx as MJe}from"react/jsx-runtime";var Hue=IS.createContext(void 0);function Ph(t){let e=IS.useContext(Hue);return t||e||"ltr"}import*as fn from"react";import*as EU from"react";import*as AU from"react-dom";import{jsx as que}from"react/jsx-runtime";var Uue=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Oe=Uue.reduce((t,e)=>{let n=Ki(`Primitive.${e}`),r=EU.forwardRef((o,i)=>{let{asChild:s,...a}=o,l=s?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),que(l,{...a,ref:i})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function kS(t,e){t&&AU.flushSync(()=>t.dispatchEvent(e))}import*as Lh from"react";function Un(t){let e=Lh.useRef(t);return Lh.useEffect(()=>{e.current=t}),Lh.useMemo(()=>(...n)=>e.current?.(...n),[])}import*as DU from"react";function OU(t,e=globalThis?.document){let n=Un(t);DU.useEffect(()=>{let r=o=>{o.key==="Escape"&&n(o)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}import{jsx as FU}from"react/jsx-runtime";var Wue="DismissableLayer",t1="dismissableLayer.update",$ue="dismissableLayer.pointerDownOutside",Gue="dismissableLayer.focusOutside",_U,BU=fn.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ha=fn.forwardRef((t,e)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=t,c=fn.useContext(BU),[u,f]=fn.useState(null),d=u?.ownerDocument??globalThis?.document,[,h]=fn.useState({}),p=Ke(e,I=>f(I)),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),x=u?m.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,b=x>=y,S=Yue(I=>{let C=I.target,k=[...c.branches].some(P=>P.contains(C));!b||k||(o?.(I),s?.(I),I.defaultPrevented||a?.())},d),w=Que(I=>{let C=I.target;[...c.branches].some(P=>P.contains(C))||(i?.(I),s?.(I),I.defaultPrevented||a?.())},d);return OU(I=>{x===c.layers.size-1&&(r?.(I),!I.defaultPrevented&&a&&(I.preventDefault(),a()))},d),fn.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(_U=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),NU(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=_U)}},[u,d,n,c]),fn.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),NU())},[u,c]),fn.useEffect(()=>{let I=()=>h({});return document.addEventListener(t1,I),()=>document.removeEventListener(t1,I)},[]),FU(Oe.div,{...l,ref:p,style:{pointerEvents:v?b?"auto":"none":void 0,...t.style},onFocusCapture:ae(t.onFocusCapture,w.onFocusCapture),onBlurCapture:ae(t.onBlurCapture,w.onBlurCapture),onPointerDownCapture:ae(t.onPointerDownCapture,S.onPointerDownCapture)})});Ha.displayName=Wue;var Kue="DismissableLayerBranch",jue=fn.forwardRef((t,e)=>{let n=fn.useContext(BU),r=fn.useRef(null),o=Ke(e,r);return fn.useEffect(()=>{let i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),FU(Oe.div,{...t,ref:o})});jue.displayName=Kue;function Yue(t,e=globalThis?.document){let n=Un(t),r=fn.useRef(!1),o=fn.useRef(()=>{});return fn.useEffect(()=>{let i=a=>{if(a.target&&!r.current){let c=function(){VU($ue,n,u,{discrete:!0})};var l=c;let u={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",o.current),o.current=c,e.addEventListener("click",o.current,{once:!0})):c()}else e.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),e.removeEventListener("pointerdown",i),e.removeEventListener("click",o.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function Que(t,e=globalThis?.document){let n=Un(t),r=fn.useRef(!1);return fn.useEffect(()=>{let o=i=>{i.target&&!r.current&&VU(Gue,n,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",o),()=>e.removeEventListener("focusin",o)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function NU(){let t=new CustomEvent(t1);document.dispatchEvent(t)}function VU(t,e,n,{discrete:r}){let o=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&o.addEventListener(t,e,{once:!0}),r?kS(o,i):o.dispatchEvent(i)}import*as HU from"react";var n1=0;function Th(){HU.useEffect(()=>{let t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??zU()),document.body.insertAdjacentElement("beforeend",t[1]??zU()),n1++,()=>{n1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),n1--}},[])}function zU(){let t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}import*as mi from"react";import{jsx as Xue}from"react/jsx-runtime";var r1="focusScope.autoFocusOnMount",o1="focusScope.autoFocusOnUnmount",qU={bubbles:!1,cancelable:!0},Jue="FocusScope",Uu=mi.forwardRef((t,e)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=t,[a,l]=mi.useState(null),c=Un(o),u=Un(i),f=mi.useRef(null),d=Ke(e,m=>l(m)),h=mi.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;mi.useEffect(()=>{if(r){let x=function(w){if(h.paused||!a)return;let I=w.target;a.contains(I)?f.current=I:Zl(f.current,{select:!0})},v=function(w){if(h.paused||!a)return;let I=w.relatedTarget;I!==null&&(a.contains(I)||Zl(f.current,{select:!0}))},b=function(w){if(document.activeElement===document.body)for(let C of w)C.removedNodes.length>0&&Zl(a)};var m=x,g=v,y=b;document.addEventListener("focusin",x),document.addEventListener("focusout",v);let S=new MutationObserver(b);return a&&S.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",v),S.disconnect()}}},[r,a,h.paused]),mi.useEffect(()=>{if(a){WU.add(h);let m=document.activeElement;if(!a.contains(m)){let y=new CustomEvent(r1,qU);a.addEventListener(r1,c),a.dispatchEvent(y),y.defaultPrevented||(Zue(ofe(GU(a)),{select:!0}),document.activeElement===m&&Zl(a))}return()=>{a.removeEventListener(r1,c),setTimeout(()=>{let y=new CustomEvent(o1,qU);a.addEventListener(o1,u),a.dispatchEvent(y),y.defaultPrevented||Zl(m??document.body,{select:!0}),a.removeEventListener(o1,u),WU.remove(h)},0)}}},[a,c,u,h]);let p=mi.useCallback(m=>{if(!n&&!r||h.paused)return;let g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(g&&y){let x=m.currentTarget,[v,b]=efe(x);v&&b?!m.shiftKey&&y===b?(m.preventDefault(),n&&Zl(v,{select:!0})):m.shiftKey&&y===v&&(m.preventDefault(),n&&Zl(b,{select:!0})):y===x&&m.preventDefault()}},[n,r,h.paused]);return Xue(Oe.div,{tabIndex:-1,...s,ref:d,onKeyDown:p})});Uu.displayName=Jue;function Zue(t,{select:e=!1}={}){let n=document.activeElement;for(let r of t)if(Zl(r,{select:e}),document.activeElement!==n)return}function efe(t){let e=GU(t),n=UU(e,t),r=UU(e.reverse(),t);return[n,r]}function GU(t){let e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{let o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function UU(t,e){for(let n of t)if(!tfe(n,{upTo:e}))return n}function tfe(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function nfe(t){return t instanceof HTMLInputElement&&"select"in t}function Zl(t,{select:e=!1}={}){if(t&&t.focus){let n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&nfe(t)&&e&&t.select()}}var WU=rfe();function rfe(){let t=[];return{add(e){let n=t[0];e!==n&&n?.pause(),t=$U(t,e),t.unshift(e)},remove(e){t=$U(t,e),t[0]?.resume()}}}function $U(t,e){let n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function ofe(t){return t.filter(e=>e.tagName!=="A")}import*as i1 from"react";import*as KU from"react";var dn=globalThis?.document?KU.useLayoutEffect:()=>{};var ife=i1[" useId ".trim().toString()]||(()=>{}),sfe=0;function zr(t){let[e,n]=i1.useState(ife());return dn(()=>{t||n(r=>r??String(sfe++))},[t]),t||(e?`radix-${e}`:"")}import*as Co from"react";var QU=["top","right","bottom","left"];var Us=Math.min,no=Math.max,tx=Math.round,nx=Math.floor,ji=t=>({x:t,y:t}),afe={left:"right",right:"left",bottom:"top",top:"bottom"},lfe={start:"end",end:"start"};function MS(t,e,n){return no(t,Us(e,n))}function Ws(t,e){return typeof t=="function"?t(e):t}function $s(t){return t.split("-")[0]}function Wu(t){return t.split("-")[1]}function PS(t){return t==="x"?"y":"x"}function LS(t){return t==="y"?"height":"width"}var cfe=new Set(["top","bottom"]);function Yi(t){return cfe.has($s(t))?"y":"x"}function TS(t){return PS(Yi(t))}function XU(t,e,n){n===void 0&&(n=!1);let r=Wu(t),o=TS(t),i=LS(o),s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=ex(s)),[s,ex(s)]}function JU(t){let e=ex(t);return[RS(t),e,RS(e)]}function RS(t){return t.replace(/start|end/g,e=>lfe[e])}var jU=["left","right"],YU=["right","left"],ufe=["top","bottom"],ffe=["bottom","top"];function dfe(t,e,n){switch(t){case"top":case"bottom":return n?e?YU:jU:e?jU:YU;case"left":case"right":return e?ufe:ffe;default:return[]}}function ZU(t,e,n,r){let o=Wu(t),i=dfe($s(t),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),e&&(i=i.concat(i.map(RS)))),i}function ex(t){return t.replace(/left|right|bottom|top/g,e=>afe[e])}function hfe(t){return{top:0,right:0,bottom:0,left:0,...t}}function s1(t){return typeof t!="number"?hfe(t):{top:t,right:t,bottom:t,left:t}}function $u(t){let{x:e,y:n,width:r,height:o}=t;return{width:r,height:o,top:n,left:e,right:e+r,bottom:n+o,x:e,y:n}}function eW(t,e,n){let{reference:r,floating:o}=t,i=Yi(e),s=TS(e),a=LS(s),l=$s(e),c=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2,h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(Wu(e)){case"start":h[s]-=d*(n&&c?-1:1);break;case"end":h[s]+=d*(n&&c?-1:1);break}return h}async function rW(t,e){var n;e===void 0&&(e={});let{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=Ws(e,t),p=s1(h),g=a[d?f==="floating"?"reference":"floating":f],y=$u(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),x=f==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),b=await(i.isElement==null?void 0:i.isElement(v))?await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1}:{x:1,y:1},S=$u(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:v,strategy:l}):x);return{top:(y.top-S.top+p.top)/b.y,bottom:(S.bottom-y.bottom+p.bottom)/b.y,left:(y.left-S.left+p.left)/b.x,right:(S.right-y.right+p.right)/b.x}}var oW=async(t,e,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e)),c=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:u,y:f}=eW(c,r,l),d=r,h={},p=0;for(let g=0;g<a.length;g++){var m;let{name:y,fn:x}=a[g],{x:v,y:b,data:S,reset:w}=await x({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:h,rects:c,platform:{...s,detectOverflow:(m=s.detectOverflow)!=null?m:rW},elements:{reference:t,floating:e}});u=v??u,f=b??f,h={...h,[y]:{...h[y],...S}},w&&p<=50&&(p++,typeof w=="object"&&(w.placement&&(d=w.placement),w.rects&&(c=w.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:o}):w.rects),{x:u,y:f}=eW(c,d,l)),g=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:h}},iW=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=Ws(t,e)||{};if(c==null)return{};let f=s1(u),d={x:n,y:r},h=TS(o),p=LS(h),m=await s.getDimensions(c),g=h==="y",y=g?"top":"left",x=g?"bottom":"right",v=g?"clientHeight":"clientWidth",b=i.reference[p]+i.reference[h]-d[h]-i.floating[p],S=d[h]-i.reference[h],w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c)),I=w?w[v]:0;(!I||!await(s.isElement==null?void 0:s.isElement(w)))&&(I=a.floating[v]||i.floating[p]);let C=b/2-S/2,k=I/2-m[p]/2-1,P=Us(f[y],k),E=Us(f[x],k),O=P,A=I-m[p]-E,R=I/2-m[p]/2+C,N=MS(O,R,A),T=!l.arrow&&Wu(o)!=null&&R!==N&&i.reference[p]/2-(R<O?P:E)-m[p]/2<0,_=T?R<O?R-O:R-A:0;return{[h]:d[h]+_,data:{[h]:N,centerOffset:R-N-_,...T&&{alignmentOffset:_}},reset:T}}});var sW=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;let{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=Ws(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let y=$s(o),x=Yi(a),v=$s(a)===a,b=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=d||(v||!m?[ex(a)]:JU(a)),w=p!=="none";!d&&w&&S.push(...ZU(a,m,p,b));let I=[a,...S],C=await l.detectOverflow(e,g),k=[],P=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&k.push(C[y]),f){let R=XU(o,s,b);k.push(C[R[0]],C[R[1]])}if(P=[...P,{placement:o,overflows:k}],!k.every(R=>R<=0)){var E,O;let R=(((E=i.flip)==null?void 0:E.index)||0)+1,N=I[R];if(N&&(!(f==="alignment"?x!==Yi(N):!1)||P.every(L=>Yi(L.placement)===x?L.overflows[0]>0:!0)))return{data:{index:R,overflows:P},reset:{placement:N}};let T=(O=P.filter(_=>_.overflows[0]<=0).sort((_,L)=>_.overflows[1]-L.overflows[1])[0])==null?void 0:O.placement;if(!T)switch(h){case"bestFit":{var A;let _=(A=P.filter(L=>{if(w){let M=Yi(L.placement);return M===x||M==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(M=>M>0).reduce((M,D)=>M+D,0)]).sort((L,M)=>L[1]-M[1])[0])==null?void 0:A[0];_&&(T=_);break}case"initialPlacement":T=a;break}if(o!==T)return{reset:{placement:T}}}return{}}}};function tW(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function nW(t){return QU.some(e=>t[e]>=0)}var aW=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:n,platform:r}=e,{strategy:o="referenceHidden",...i}=Ws(t,e);switch(o){case"referenceHidden":{let s=await r.detectOverflow(e,{...i,elementContext:"reference"}),a=tW(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:nW(a)}}}case"escaped":{let s=await r.detectOverflow(e,{...i,altBoundary:!0}),a=tW(s,n.floating);return{data:{escapedOffsets:a,escaped:nW(a)}}}default:return{}}}}};var lW=new Set(["left","top"]);async function pfe(t,e){let{placement:n,platform:r,elements:o}=t,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=$s(n),a=Wu(n),l=Yi(n)==="y",c=lW.has(s)?-1:1,u=i&&l?-1:1,f=Ws(e,t),{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*u,y:d*c}:{x:d*c,y:h*u}}var cW=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;let{x:o,y:i,placement:s,middlewareData:a}=e,l=await pfe(e,t);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},uW=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:r,placement:o,platform:i}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:y=>{let{x,y:v}=y;return{x,y:v}}},...c}=Ws(t,e),u={x:n,y:r},f=await i.detectOverflow(e,c),d=Yi($s(o)),h=PS(d),p=u[h],m=u[d];if(s){let y=h==="y"?"top":"left",x=h==="y"?"bottom":"right",v=p+f[y],b=p-f[x];p=MS(v,p,b)}if(a){let y=d==="y"?"top":"left",x=d==="y"?"bottom":"right",v=m+f[y],b=m-f[x];m=MS(v,m,b)}let g=l.fn({...e,[h]:p,[d]:m});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[h]:s,[d]:a}}}}}},fW=function(t){return t===void 0&&(t={}),{options:t,fn(e){let{x:n,y:r,placement:o,rects:i,middlewareData:s}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Ws(t,e),u={x:n,y:r},f=Yi(o),d=PS(f),h=u[d],p=u[f],m=Ws(a,e),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let v=d==="y"?"height":"width",b=i.reference[d]-i.floating[v]+g.mainAxis,S=i.reference[d]+i.reference[v]-g.mainAxis;h<b?h=b:h>S&&(h=S)}if(c){var y,x;let v=d==="y"?"width":"height",b=lW.has($s(o)),S=i.reference[f]-i.floating[v]+(b&&((y=s.offset)==null?void 0:y[f])||0)+(b?0:g.crossAxis),w=i.reference[f]+i.reference[v]+(b?0:((x=s.offset)==null?void 0:x[f])||0)-(b?g.crossAxis:0);p<S?p=S:p>w&&(p=w)}return{[d]:h,[f]:p}}}},dW=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;let{placement:o,rects:i,platform:s,elements:a}=e,{apply:l=()=>{},...c}=Ws(t,e),u=await s.detectOverflow(e,c),f=$s(o),d=Wu(o),h=Yi(o)==="y",{width:p,height:m}=i.floating,g,y;f==="top"||f==="bottom"?(g=f,y=d===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=f,g=d==="end"?"top":"bottom");let x=m-u.top-u.bottom,v=p-u.left-u.right,b=Us(m-u[g],x),S=Us(p-u[y],v),w=!e.middlewareData.shift,I=b,C=S;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(C=v),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(I=x),w&&!d){let P=no(u.left,0),E=no(u.right,0),O=no(u.top,0),A=no(u.bottom,0);h?C=p-2*(P!==0||E!==0?P+E:no(u.left,u.right)):I=m-2*(O!==0||A!==0?O+A:no(u.top,u.bottom))}await l({...e,availableWidth:C,availableHeight:I});let k=await s.getDimensions(a.floating);return p!==k.width||m!==k.height?{reset:{rects:!0}}:{}}}};function ES(){return typeof window<"u"}function Ku(t){return pW(t)?(t.nodeName||"").toLowerCase():"#document"}function So(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Qi(t){var e;return(e=(pW(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function pW(t){return ES()?t instanceof Node||t instanceof So(t).Node:!1}function gi(t){return ES()?t instanceof Element||t instanceof So(t).Element:!1}function Xi(t){return ES()?t instanceof HTMLElement||t instanceof So(t).HTMLElement:!1}function hW(t){return!ES()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof So(t).ShadowRoot}var mfe=new Set(["inline","contents"]);function Eh(t){let{overflow:e,overflowX:n,overflowY:r,display:o}=yi(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!mfe.has(o)}var gfe=new Set(["table","td","th"]);function mW(t){return gfe.has(Ku(t))}var yfe=[":popover-open",":modal"];function rx(t){return yfe.some(e=>{try{return t.matches(e)}catch{return!1}})}var xfe=["transform","translate","scale","rotate","perspective"],vfe=["transform","translate","scale","rotate","perspective","filter"],bfe=["paint","layout","strict","content"];function AS(t){let e=DS(),n=gi(t)?yi(t):t;return xfe.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||vfe.some(r=>(n.willChange||"").includes(r))||bfe.some(r=>(n.contain||"").includes(r))}function gW(t){let e=qa(t);for(;Xi(e)&&!ju(e);){if(AS(e))return e;if(rx(e))return null;e=qa(e)}return null}function DS(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var wfe=new Set(["html","body","#document"]);function ju(t){return wfe.has(Ku(t))}function yi(t){return So(t).getComputedStyle(t)}function ox(t){return gi(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function qa(t){if(Ku(t)==="html")return t;let e=t.assignedSlot||t.parentNode||hW(t)&&t.host||Qi(t);return hW(e)?e.host:e}function yW(t){let e=qa(t);return ju(e)?t.ownerDocument?t.ownerDocument.body:t.body:Xi(e)&&Eh(e)?e:yW(e)}function Gu(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);let o=yW(t),i=o===((r=t.ownerDocument)==null?void 0:r.body),s=So(o);if(i){let a=OS(s);return e.concat(s,s.visualViewport||[],Eh(o)?o:[],a&&n?Gu(a):[])}return e.concat(o,Gu(o,[],n))}function OS(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function wW(t){let e=yi(t),n=parseFloat(e.width)||0,r=parseFloat(e.height)||0,o=Xi(t),i=o?t.offsetWidth:n,s=o?t.offsetHeight:r,a=tx(n)!==i||tx(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function l1(t){return gi(t)?t:t.contextElement}function Ah(t){let e=l1(t);if(!Xi(e))return ji(1);let n=e.getBoundingClientRect(),{width:r,height:o,$:i}=wW(e),s=(i?tx(n.width):n.width)/r,a=(i?tx(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Sfe=ji(0);function SW(t){let e=So(t);return!DS()||!e.visualViewport?Sfe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Cfe(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==So(t)?!1:e}function Yu(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);let o=t.getBoundingClientRect(),i=l1(t),s=ji(1);e&&(r?gi(r)&&(s=Ah(r)):s=Ah(t));let a=Cfe(i,n,r)?SW(i):ji(0),l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(i){let d=So(i),h=r&&gi(r)?So(r):r,p=d,m=OS(p);for(;m&&r&&h!==p;){let g=Ah(m),y=m.getBoundingClientRect(),x=yi(m),v=y.left+(m.clientLeft+parseFloat(x.paddingLeft))*g.x,b=y.top+(m.clientTop+parseFloat(x.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,f*=g.y,l+=v,c+=b,p=So(m),m=OS(p)}}return $u({width:u,height:f,x:l,y:c})}function _S(t,e){let n=ox(t).scrollLeft;return e?e.left+n:Yu(Qi(t)).left+n}function CW(t,e){let n=t.getBoundingClientRect(),r=n.left+e.scrollLeft-_S(t,n),o=n.top+e.scrollTop;return{x:r,y:o}}function Ife(t){let{elements:e,rect:n,offsetParent:r,strategy:o}=t,i=o==="fixed",s=Qi(r),a=e?rx(e.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=ji(1),u=ji(0),f=Xi(r);if((f||!f&&!i)&&((Ku(r)!=="body"||Eh(s))&&(l=ox(r)),Xi(r))){let h=Yu(r);c=Ah(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}let d=s&&!f&&!i?CW(s,l):ji(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:n.y*c.y-l.scrollTop*c.y+u.y+d.y}}function kfe(t){return Array.from(t.getClientRects())}function Rfe(t){let e=Qi(t),n=ox(t),r=t.ownerDocument.body,o=no(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=no(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),s=-n.scrollLeft+_S(t),a=-n.scrollTop;return yi(r).direction==="rtl"&&(s+=no(e.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}var xW=25;function Mfe(t,e){let n=So(t),r=Qi(t),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;let u=DS();(!u||u&&e==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}let c=_S(r);if(c<=0){let u=r.ownerDocument,f=u.body,d=getComputedStyle(f),h=u.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,p=Math.abs(r.clientWidth-f.clientWidth-h);p<=xW&&(i-=p)}else c<=xW&&(i+=c);return{width:i,height:s,x:a,y:l}}var Pfe=new Set(["absolute","fixed"]);function Lfe(t,e){let n=Yu(t,!0,e==="fixed"),r=n.top+t.clientTop,o=n.left+t.clientLeft,i=Xi(t)?Ah(t):ji(1),s=t.clientWidth*i.x,a=t.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function vW(t,e,n){let r;if(e==="viewport")r=Mfe(t,n);else if(e==="document")r=Rfe(Qi(t));else if(gi(e))r=Lfe(e,n);else{let o=SW(t);r={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return $u(r)}function IW(t,e){let n=qa(t);return n===e||!gi(n)||ju(n)?!1:yi(n).position==="fixed"||IW(n,e)}function Tfe(t,e){let n=e.get(t);if(n)return n;let r=Gu(t,[],!1).filter(a=>gi(a)&&Ku(a)!=="body"),o=null,i=yi(t).position==="fixed",s=i?qa(t):t;for(;gi(s)&&!ju(s);){let a=yi(s),l=AS(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&Pfe.has(o.position)||Eh(s)&&!l&&IW(t,s))?r=r.filter(u=>u!==s):o=a,s=qa(s)}return e.set(t,r),r}function Efe(t){let{element:e,boundary:n,rootBoundary:r,strategy:o}=t,s=[...n==="clippingAncestors"?rx(e)?[]:Tfe(e,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{let f=vW(e,u,o);return c.top=no(f.top,c.top),c.right=Us(f.right,c.right),c.bottom=Us(f.bottom,c.bottom),c.left=no(f.left,c.left),c},vW(e,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Afe(t){let{width:e,height:n}=wW(t);return{width:e,height:n}}function Dfe(t,e,n){let r=Xi(e),o=Qi(e),i=n==="fixed",s=Yu(t,!0,i,e),a={scrollLeft:0,scrollTop:0},l=ji(0);function c(){l.x=_S(o)}if(r||!r&&!i)if((Ku(e)!=="body"||Eh(o))&&(a=ox(e)),r){let h=Yu(e,!0,i,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else o&&c();i&&!r&&o&&c();let u=o&&!r&&!i?CW(o,a):ji(0),f=s.left+a.scrollLeft-l.x-u.x,d=s.top+a.scrollTop-l.y-u.y;return{x:f,y:d,width:s.width,height:s.height}}function a1(t){return yi(t).position==="static"}function bW(t,e){if(!Xi(t)||yi(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Qi(t)===n&&(n=n.ownerDocument.body),n}function kW(t,e){let n=So(t);if(rx(t))return n;if(!Xi(t)){let o=qa(t);for(;o&&!ju(o);){if(gi(o)&&!a1(o))return o;o=qa(o)}return n}let r=bW(t,e);for(;r&&mW(r)&&a1(r);)r=bW(r,e);return r&&ju(r)&&a1(r)&&!AS(r)?n:r||gW(t)||n}var Ofe=async function(t){let e=this.getOffsetParent||kW,n=this.getDimensions,r=await n(t.floating);return{reference:Dfe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function _fe(t){return yi(t).direction==="rtl"}var RW={convertOffsetParentRelativeRectToViewportRelativeRect:Ife,getDocumentElement:Qi,getClippingRect:Efe,getOffsetParent:kW,getElementRects:Ofe,getClientRects:kfe,getDimensions:Afe,getScale:Ah,isElement:gi,isRTL:_fe};function MW(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Nfe(t,e){let n=null,r,o=Qi(t);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();let c=t.getBoundingClientRect(),{left:u,top:f,width:d,height:h}=c;if(a||e(),!d||!h)return;let p=nx(f),m=nx(o.clientWidth-(u+d)),g=nx(o.clientHeight-(f+h)),y=nx(u),v={rootMargin:-p+"px "+-m+"px "+-g+"px "+-y+"px",threshold:no(0,Us(1,l))||1},b=!0;function S(w){let I=w[0].intersectionRatio;if(I!==l){if(!b)return s();I?s(!1,I):r=setTimeout(()=>{s(!1,1e-7)},1e3)}I===1&&!MW(c,t.getBoundingClientRect())&&s(),b=!1}try{n=new IntersectionObserver(S,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,v)}n.observe(t)}return s(!0),i}function c1(t,e,n,r){r===void 0&&(r={});let{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=l1(t),u=o||i?[...c?Gu(c):[],...Gu(e)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});let f=c&&a?Nfe(c,n):null,d=-1,h=null;s&&(h=new ResizeObserver(y=>{let[x]=y;x&&x.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var v;(v=h)==null||v.observe(e)})),n()}),c&&!l&&h.observe(c),h.observe(e));let p,m=l?Yu(t):null;l&&g();function g(){let y=Yu(t);m&&!MW(m,y)&&n(),m=y,p=requestAnimationFrame(g)}return n(),()=>{var y;u.forEach(x=>{o&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),f?.(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(p)}}var PW=cW;var LW=uW,TW=sW,EW=dW,AW=aW,u1=iW;var DW=fW,f1=(t,e,n)=>{let r=new Map,o={platform:RW,...n},i={...o.platform,_c:r};return oW(t,e,{...o,platform:i})};import*as Wn from"react";import{useLayoutEffect as Ffe}from"react";import*as _W from"react-dom";var Bfe=typeof document<"u",Vfe=function(){},NS=Bfe?Ffe:Vfe;function FS(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,o;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!FS(t[r],e[r]))return!1;return!0}if(o=Object.keys(t),n=o.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,o[r]))return!1;for(r=n;r--!==0;){let i=o[r];if(!(i==="_owner"&&t.$$typeof)&&!FS(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function NW(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function OW(t,e){let n=NW(t);return Math.round(e*n)/n}function d1(t){let e=Wn.useRef(t);return NS(()=>{e.current=t}),e}function FW(t){t===void 0&&(t={});let{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,f]=Wn.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=Wn.useState(r);FS(d,r)||h(r);let[p,m]=Wn.useState(null),[g,y]=Wn.useState(null),x=Wn.useCallback(L=>{L!==w.current&&(w.current=L,m(L))},[]),v=Wn.useCallback(L=>{L!==I.current&&(I.current=L,y(L))},[]),b=i||p,S=s||g,w=Wn.useRef(null),I=Wn.useRef(null),C=Wn.useRef(u),k=l!=null,P=d1(l),E=d1(o),O=d1(c),A=Wn.useCallback(()=>{if(!w.current||!I.current)return;let L={placement:e,strategy:n,middleware:d};E.current&&(L.platform=E.current),f1(w.current,I.current,L).then(M=>{let D={...M,isPositioned:O.current!==!1};R.current&&!FS(C.current,D)&&(C.current=D,_W.flushSync(()=>{f(D)}))})},[d,e,n,E,O]);NS(()=>{c===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,f(L=>({...L,isPositioned:!1})))},[c]);let R=Wn.useRef(!1);NS(()=>(R.current=!0,()=>{R.current=!1}),[]),NS(()=>{if(b&&(w.current=b),S&&(I.current=S),b&&S){if(P.current)return P.current(b,S,A);A()}},[b,S,A,P,k]);let N=Wn.useMemo(()=>({reference:w,floating:I,setReference:x,setFloating:v}),[x,v]),T=Wn.useMemo(()=>({reference:b,floating:S}),[b,S]),_=Wn.useMemo(()=>{let L={position:n,left:0,top:0};if(!T.floating)return L;let M=OW(T.floating,u.x),D=OW(T.floating,u.y);return a?{...L,transform:"translate("+M+"px, "+D+"px)",...NW(T.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:M,top:D}},[n,a,T.floating,u.x,u.y]);return Wn.useMemo(()=>({...u,update:A,refs:N,elements:T,floatingStyles:_}),[u,A,N,T,_])}var zfe=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){let{element:r,padding:o}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?u1({element:r.current,padding:o}).fn(n):{}:r?u1({element:r,padding:o}).fn(n):{}}}},BW=(t,e)=>({...PW(t),options:[t,e]}),VW=(t,e)=>({...LW(t),options:[t,e]}),zW=(t,e)=>({...DW(t),options:[t,e]}),HW=(t,e)=>({...TW(t),options:[t,e]}),qW=(t,e)=>({...EW(t),options:[t,e]});var UW=(t,e)=>({...AW(t),options:[t,e]});var WW=(t,e)=>({...zfe(t),options:[t,e]});import*as GW from"react";import{jsx as $W}from"react/jsx-runtime";var Hfe="Arrow",KW=GW.forwardRef((t,e)=>{let{children:n,width:r=10,height:o=5,...i}=t;return $W(Oe.svg,{...i,ref:e,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:$W("polygon",{points:"0,0 30,0 15,10"})})});KW.displayName=Hfe;var jW=KW;import*as YW from"react";function BS(t){let[e,n]=YW.useState(void 0);return dn(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});let r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;let i=o[0],s,a;if("borderBoxSize"in i){let l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;s=c.inlineSize,a=c.blockSize}else s=t.offsetWidth,a=t.offsetHeight;n({width:s,height:a})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}import{jsx as Qu}from"react/jsx-runtime";var h1="Popper",[QW,xi]=qn(h1),[Ufe,XW]=QW(h1),JW=t=>{let{__scopePopper:e,children:n}=t,[r,o]=Co.useState(null);return Qu(Ufe,{scope:e,anchor:r,onAnchorChange:o,children:n})};JW.displayName=h1;var ZW="PopperAnchor",e$=Co.forwardRef((t,e)=>{let{__scopePopper:n,virtualRef:r,...o}=t,i=XW(ZW,n),s=Co.useRef(null),a=Ke(e,s),l=Co.useRef(null);return Co.useEffect(()=>{let c=l.current;l.current=r?.current||s.current,c!==l.current&&i.onAnchorChange(l.current)}),r?null:Qu(Oe.div,{...o,ref:a})});e$.displayName=ZW;var p1="PopperContent",[Wfe,$fe]=QW(p1),t$=Co.forwardRef((t,e)=>{let{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:d=!1,updatePositionStrategy:h="optimized",onPlaced:p,...m}=t,g=XW(p1,n),[y,x]=Co.useState(null),v=Ke(e,z=>x(z)),[b,S]=Co.useState(null),w=BS(b),I=w?.width??0,C=w?.height??0,k=r+(i!=="center"?"-"+i:""),P=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},E=Array.isArray(c)?c:[c],O=E.length>0,A={padding:P,boundary:E.filter(Kfe),altBoundary:O},{refs:R,floatingStyles:N,placement:T,isPositioned:_,middlewareData:L}=FW({strategy:"fixed",placement:k,whileElementsMounted:(...z)=>c1(...z,{animationFrame:h==="always"}),elements:{reference:g.anchor},middleware:[BW({mainAxis:o+C,alignmentAxis:s}),l&&VW({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?zW():void 0,...A}),l&&HW({...A}),qW({...A,apply:({elements:z,rects:Y,availableWidth:J,availableHeight:j})=>{let{width:de,height:ie}=Y.reference,Ee=z.floating.style;Ee.setProperty("--radix-popper-available-width",`${J}px`),Ee.setProperty("--radix-popper-available-height",`${j}px`),Ee.setProperty("--radix-popper-anchor-width",`${de}px`),Ee.setProperty("--radix-popper-anchor-height",`${ie}px`)}}),b&&WW({element:b,padding:a}),jfe({arrowWidth:I,arrowHeight:C}),d&&UW({strategy:"referenceHidden",...A})]}),[M,D]=o$(T),B=Un(p);dn(()=>{_&&B?.()},[_,B]);let V=L.arrow?.x,H=L.arrow?.y,U=L.arrow?.centerOffset!==0,[F,q]=Co.useState();return dn(()=>{y&&q(window.getComputedStyle(y).zIndex)},[y]),Qu("div",{ref:R.setFloating,"data-radix-popper-content-wrapper":"",style:{...N,transform:_?N.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:F,"--radix-popper-transform-origin":[L.transformOrigin?.x,L.transformOrigin?.y].join(" "),...L.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:Qu(Wfe,{scope:n,placedSide:M,onArrowChange:S,arrowX:V,arrowY:H,shouldHideArrow:U,children:Qu(Oe.div,{"data-side":M,"data-align":D,...m,ref:v,style:{...m.style,animation:_?void 0:"none"}})})})});t$.displayName=p1;var n$="PopperArrow",Gfe={top:"bottom",right:"left",bottom:"top",left:"right"},r$=Co.forwardRef(function(e,n){let{__scopePopper:r,...o}=e,i=$fe(n$,r),s=Gfe[i.placedSide];return Qu("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:Qu(jW,{...o,ref:n,style:{...o.style,display:"block"}})})});r$.displayName=n$;function Kfe(t){return t!==null}var jfe=t=>({name:"transformOrigin",options:t,fn(e){let{placement:n,rects:r,middlewareData:o}=e,s=o.arrow?.centerOffset!==0,a=s?0:t.arrowWidth,l=s?0:t.arrowHeight,[c,u]=o$(n),f={start:"0%",center:"50%",end:"100%"}[u],d=(o.arrow?.x??0)+a/2,h=(o.arrow?.y??0)+l/2,p="",m="";return c==="bottom"?(p=s?f:`${d}px`,m=`${-l}px`):c==="top"?(p=s?f:`${d}px`,m=`${r.floating.height+l}px`):c==="right"?(p=`${-l}px`,m=s?f:`${h}px`):c==="left"&&(p=`${r.floating.width+l}px`,m=s?f:`${h}px`),{data:{x:p,y:m}}}});function o$(t){let[e,n="center"]=t.split("-");return[e,n]}var Ua=JW,Wa=e$,ec=t$,tc=r$;import*as zS from"react";import Yfe from"react-dom";import{jsx as Qfe}from"react/jsx-runtime";var Xfe="Portal",$a=zS.forwardRef((t,e)=>{let{container:n,...r}=t,[o,i]=zS.useState(!1);dn(()=>i(!0),[]);let s=n||o&&globalThis?.document?.body;return s?Yfe.createPortal(Qfe(Oe.div,{...r,ref:e}),s):null});$a.displayName=Xfe;import*as vi from"react";import*as HS from"react";var Jfe=vi[" useInsertionEffect ".trim().toString()]||dn;function ro({prop:t,defaultProp:e,onChange:n=()=>{},caller:r}){let[o,i,s]=Zfe({defaultProp:e,onChange:n}),a=t!==void 0,l=a?t:o;{let u=vi.useRef(t!==void 0);vi.useEffect(()=>{let f=u.current;f!==a&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,r])}let c=vi.useCallback(u=>{if(a){let f=ede(u)?u(t):u;f!==t&&s.current?.(f)}else i(u)},[a,t,i,s]);return[l,c]}function Zfe({defaultProp:t,onChange:e}){let[n,r]=vi.useState(t),o=vi.useRef(n),i=vi.useRef(e);return Jfe(()=>{i.current=e},[e]),vi.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function ede(t){return typeof t=="function"}import*as qS from"react";function US(t){let e=qS.useRef({value:t,previous:t});return qS.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}import*as i$ from"react";import{jsx as tde}from"react/jsx-runtime";var m1=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),nde="VisuallyHidden",s$=i$.forwardRef((t,e)=>tde(Oe.span,{...t,ref:e,style:{...m1,...t.style}}));s$.displayName=nde;var a$=s$;var ode=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Dh=new WeakMap,WS=new WeakMap,$S={},g1=0,l$=function(t){return t&&(t.host||l$(t.parentNode))},ide=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=l$(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},sde=function(t,e,n,r){var o=ide(e,Array.isArray(t)?t:[t]);$S[n]||($S[n]=new WeakMap);var i=$S[n],s=[],a=new Set,l=new Set(o),c=function(f){!f||a.has(f)||(a.add(f),c(f.parentNode))};o.forEach(c);var u=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(d){if(a.has(d))u(d);else try{var h=d.getAttribute(r),p=h!==null&&h!=="false",m=(Dh.get(d)||0)+1,g=(i.get(d)||0)+1;Dh.set(d,m),i.set(d,g),s.push(d),m===1&&p&&WS.set(d,!0),g===1&&d.setAttribute(n,"true"),p||d.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",d,y)}})};return u(e),a.clear(),g1++,function(){s.forEach(function(f){var d=Dh.get(f)-1,h=i.get(f)-1;Dh.set(f,d),i.set(f,h),d||(WS.has(f)||f.removeAttribute(r),WS.delete(f)),h||f.removeAttribute(n)}),g1--,g1||(Dh=new WeakMap,Dh=new WeakMap,WS=new WeakMap,$S={})}},Oh=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),o=e||ode(t);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),sde(r,o,n,"aria-hidden")):function(){return null}};var Io=function(){return Io=Object.assign||function(e){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Io.apply(this,arguments)};function GS(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n}function c$(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r<o;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}import*as XS from"react";import*as Hr from"react";var Xu="right-scroll-bar-position",Ju="width-before-scroll-bar",y1="with-scroll-bars-hidden",x1="--removed-body-scroll-bar-size";function KS(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}import{useState as ade}from"react";function u$(t,e){var n=ade(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=e,n.facade}import*as jS from"react";var lde=typeof window<"u"?jS.useLayoutEffect:jS.useEffect,f$=new WeakMap;function v1(t,e){var n=u$(e||null,function(r){return t.forEach(function(o){return KS(o,r)})});return lde(function(){var r=f$.get(n);if(r){var o=new Set(r),i=new Set(t),s=n.current;o.forEach(function(a){i.has(a)||KS(a,null)}),i.forEach(function(a){o.has(a)||KS(a,s)})}f$.set(n,t)},[t]),n}function cde(t){return t}function ude(t,e){e===void 0&&(e=cde);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(i){var s=e(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var l=function(){var u=s;s=[],u.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){s.push(u),c()},filter:function(u){return s=s.filter(u),n}}}};return o}function b1(t){t===void 0&&(t={});var e=ude(null);return e.options=Io({async:!0,ssr:!1},t),e}import*as d$ from"react";var h$=function(t){var e=t.sideCar,n=GS(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return d$.createElement(r,Io({},n))};h$.isSideCarExport=!0;function w1(t,e){return t.useMedium(e),h$}var YS=b1();var S1=function(){},ix=Hr.forwardRef(function(t,e){var n=Hr.useRef(null),r=Hr.useState({onScrollCapture:S1,onWheelCapture:S1,onTouchMoveCapture:S1}),o=r[0],i=r[1],s=t.forwardProps,a=t.children,l=t.className,c=t.removeScrollBar,u=t.enabled,f=t.shards,d=t.sideCar,h=t.noRelative,p=t.noIsolation,m=t.inert,g=t.allowPinchZoom,y=t.as,x=y===void 0?"div":y,v=t.gapMode,b=GS(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=d,w=v1([n,e]),I=Io(Io({},b),o);return Hr.createElement(Hr.Fragment,null,u&&Hr.createElement(S,{sideCar:YS,removeScrollBar:c,shards:f,noRelative:h,noIsolation:p,inert:m,setCallbacks:i,allowPinchZoom:!!g,lockRef:n,gapMode:v}),s?Hr.cloneElement(Hr.Children.only(a),Io(Io({},I),{ref:w})):Hr.createElement(x,Io({},I,{className:l,ref:w}),a))});ix.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ix.classNames={fullWidth:Ju,zeroRight:Xu};import*as Qt from"react";import*as Nh from"react";import*as g$ from"react";var p$;var m$=function(){if(p$)return p$;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function fde(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=m$();return e&&t.setAttribute("nonce",e),t}function dde(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function hde(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var C1=function(){var t=0,e=null;return{add:function(n){t==0&&(e=fde())&&(dde(e,n),hde(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}};var I1=function(){var t=C1();return function(e,n){g$.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}};var sx=function(){var t=I1(),e=function(n){var r=n.styles,o=n.dynamic;return t(r,o),null};return e};var pde={left:0,top:0,right:0,gap:0},k1=function(t){return parseInt(t||"",10)||0},mde=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],o=e[t==="padding"?"paddingRight":"marginRight"];return[k1(n),k1(r),k1(o)]},R1=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return pde;var e=mde(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}};var gde=sx(),_h="data-scroll-locked",yde=function(t,e,n,r){var o=t.left,i=t.top,s=t.right,a=t.gap;return n===void 0&&(n="margin"),`
|
|
29
|
+
See https://nuqs.dev/NUQS-${t}`}var Ou=rle({useAdapter(){throw new Error(_u(404))}});Ou.displayName="NuqsAdapterContext";LT&&typeof window<"u"&&(window.__NuqsAdapterContext&&window.__NuqsAdapterContext!==Ou&&console.error(_u(303)),window.__NuqsAdapterContext=Ou);function TT(t){return({children:e,defaultOptions:n,processUrlSearchParams:r,...o})=>ole(Ou.Provider,{...o,value:{useAdapter:t,defaultOptions:n,processUrlSearchParams:r}},e)}function Cq(t){let e=PT(Ou);if(!("useAdapter"in e))throw new Error(_u(404));return e.useAdapter(t)}var Iq=()=>PT(Ou).defaultOptions,kq=()=>PT(Ou).processUrlSearchParams;import{useEffect as Tq,useMemo as vle}from"react";import{useCallback as dS,useEffect as Pq,useRef as Lq,useState as yle}from"react";var ET=120,Rq=Symbol("prisma.studio.tanstack_db_mutation_guard.instrumented");function cle(t){if(typeof t!="object"||t==null)return!1;let e=t;return typeof e.insert=="function"&&typeof e.update=="function"&&typeof e.delete=="function"}function ule(t){let{maxMutationsPerTick:e,mutationCount:n,triggeredBy:r}=t;return[`[TanStack DB] Mutation burst detected: ${n} mutations in one event-loop tick`,`(threshold: ${e}).`,`Triggered by ${r.collectionName}.${r.method}().`,"This often indicates render-driven write loops.","Keep transient input state local and avoid collection writes on every keystroke."].join(" ")}function fle(t){return[...t.entries()].sort((e,n)=>n[1]-e[1]).slice(0,5).map(([e,n])=>({collectionName:e,count:n}))}function dle(t={}){let e=t.enabled??!1,n=t.maxMutationsPerTick??ET,r=t.mode??"warn",o=t.onViolation,i=0,s=!1,a=!1,l=new Map;function c(){i=0,l.clear(),a=!1,s=!1}function u(){s||(s=!0,setTimeout(c,0))}function f(d){if(!e||(u(),i+=1,l.set(d.collectionName,(l.get(d.collectionName)??0)+1),i<=n||a))return;a=!0;let h={collectionBreakdown:fle(l),maxMutationsPerTick:n,message:ule({maxMutationsPerTick:n,mutationCount:i,triggeredBy:d}),mutationCount:i,triggeredBy:d};if(o?.(h),r==="throw")throw new Error(h.message);console.warn(h.message,{collectionBreakdown:h.collectionBreakdown,maxMutationsPerTick:h.maxMutationsPerTick,mutationCount:h.mutationCount,triggeredBy:h.triggeredBy})}return{recordMutation:f}}function Mq(){return Au&&window.__PRISMA_STUDIO_STRICT_TANSTACK_DB__===!0}function hle(){return Mq()}function ple(){return Mq()?"throw":"warn"}function mle(){if(!Au)return ET;let t=window.__PRISMA_STUDIO_TANSTACK_DB_MAX_MUTATIONS_PER_TICK__;return Number.isInteger(t)&&t>0?t:ET}var gle=dle({maxMutationsPerTick:mle(),mode:ple()});function Ui(t,e){if(!cle(t)||!e.guard&&!hle())return t;let n=t;if(n[Rq])return t;let r=e.guard??gle,{collectionName:o}=e,i=n.insert.bind(n),s=n.update.bind(n),a=n.delete.bind(n);return n.insert=(...l)=>(r.recordMutation({collectionName:o,method:"insert"}),i(...l)),n.update=(...l)=>(r.recordMutation({collectionName:o,method:"update"}),s(...l)),n.delete=(...l)=>(r.recordMutation({collectionName:o,method:"delete"}),a(...l)),n[Rq]=!0,t}var xle=Ui(Zr(Aa({id:"fallback-ui-local-state",getKey(t){return t.id},initialData:[]})),{collectionName:"fallback-ui-local-state"});function hi(t){return typeof t!="object"||t==null?t:structuredClone(t)}function AT(t,e){return typeof e=="function"?e(t):e}function $l(t){let e=Lq(null);return e.current||(e.current=`${t}:${Uo.generate()}`),e.current}function Ct(t,e,n={}){let{cleanupOnUnmount:r=!1}=n,[o,i]=yle(()=>hi(e)),s=Lq(t),l=DT()?.uiLocalStateCollection??xle,{data:c}=fi(p=>{if(!(r||!t))return p.from({item:l}).where(({item:m})=>ui(m.id,t)).select(({item:m})=>({id:m.id,value:m.value})).findOne()},[r,t,l]);Pq(()=>{if(r){if(s.current!==t){s.current=t,i(hi(e));return}i(p=>Object.is(p,e)?p:hi(e))}},[r,e,t]);let u=dS(p=>{i(m=>hi(AT(m,p)))},[]),f=dS(()=>{i(hi(e))},[e]);Pq(()=>{r||t&&(l.has(t)||l.insert({id:t,value:hi(e)}))},[r,e,t,l]);let d=dS(p=>{if(r){u(p);return}if(!t)return;if(!l.get(t)){l.insert({id:t,value:hi(AT(hi(e),p))});return}l.update(t,g=>{let y=g.value;g.value=hi(AT(y,p))})},[r,e,t,u,l]),h=dS(()=>{if(r){f();return}if(t){if(!l.has(t)){l.insert({id:t,value:hi(e)});return}l.update(t,p=>{p.value=hi(e)})}},[r,e,t,f,l]);return[r?o:c?.value??hi(e),d,h]}var ble="nuqs-hash";function wle(t,e){let n;return(...r)=>{n&&clearTimeout(n),n=setTimeout(()=>t(...r),e)}}function Sle(){let t=typeof window<"u"?window.location.hash.slice(1):"",[e,n]=Ct(ble,t),r=a=>{n(a)};Tq(()=>{e!==t&&r(t)},[t,e]);function o(a,{history:l}){let{pathname:c,search:u}=window.location,f=a.toString(),d=`${c}${u}#${f}`;l==="push"?window.history.pushState(null,"",d):window.history.replaceState(null,"",d),r(f)}function i(){if(typeof window>"u")return new URLSearchParams;let a=window.location.hash.slice(1);return new URLSearchParams(a)}return Tq(()=>{let a=wle(()=>{r(window.location.hash.slice(1))},50);return window.addEventListener("hashchange",a),()=>window.removeEventListener("hashchange",a)},[]),{searchParams:vle(()=>new URLSearchParams(e),[e]),updateUrl:o,getSearchParamsSnapshot:i}}var Eq=TT(Sle);import{jsx as hS,jsxs as Dle}from"react/jsx-runtime";var Nu="studio-ui-state",Rle="prisma-studio-ui-state-v1",Mle="studio-sql-editor-state",Ple="prisma-studio-sql-editor-state-v1";function Lle(t){return typeof t=="object"&&t!==null&&"cleanup"in t}function _T(){return{id:Nu,isFullscreen:!1,isNavigationOpen:!0,isDarkMode:typeof document<"u"&&document.documentElement.classList.contains("dark")}}var Aq=Cle(void 0);function Dq(t){let{children:e,onEvent:n,adapter:r,theme:o}=t,i=zs(new lT),s=zs(Uo.generate()),a=zs(new Map),l=zs(Ui(Zr(U0({id:Nu,storageKey:Rle,getKey(L){return L.id}})),{collectionName:"studio-ui-state"})),c=zs(Ui(Zr(Aa({id:"studio-operation-events",getKey(L){return L.eventId},initialData:[]})),{collectionName:"studio-operation-events"})),u=zs(Ui(Zr(Aa({id:"studio-table-ui-state",getKey(L){return L.id},initialData:[]})),{collectionName:"studio-table-ui-state"})),f=zs(Ui(Zr(Aa({id:"studio-table-query-meta",getKey(L){return L.id},initialData:[]})),{collectionName:"studio-table-query-meta"})),d=zs(Ui(Zr(Aa({id:"studio-local-ui-state",getKey(L){return L.id},initialData:[]})),{collectionName:"studio-local-ui-state"})),h=zs(Ui(Zr(U0({id:Mle,storageKey:Ple,getKey(L){return L.id}})),{collectionName:"studio-sql-editor-state"})),p=zs(Ui(Zr(Aa({id:"studio-navigation-table-names",getKey(L){return L.id},initialData:[]})),{collectionName:"studio-navigation-table-names"})),m=i.current,g=l.current,y=c.current,x=u.current,v=f.current,b=d.current,S=h.current,w=p.current,{data:I=[]}=fi(g),{data:C=[]}=fi(y),k=I.find(L=>L.id===Nu)??_T(),P=kle(()=>[...C].sort((L,M)=>new Date(L.timestamp).getTime()-new Date(M.timestamp).getTime()),[C]),E=vh(L=>{if(!g.get(Nu)){let D=_T();L(D),g.insert(D);return}g.update(Nu,L)},[g]),O=vh((L,M)=>{let D=a.current.get(L);if(D!=null)return D;let B=Ui(M(),{collectionName:`rows:${L}`});return a.current.set(L,B),B},[]),A=vh(()=>{for(let L of a.current.values())Lle(L)&&typeof L.cleanup=="function"&&L.cleanup().catch(M=>{console.error("Failed to cleanup cached rows collection",M)});a.current.clear()},[]);OT(()=>{g.has(Nu)||g.insert(_T())},[g]),OT(()=>{A(),m.resetQueries({exact:!1,queryKey:[]})},[r,A,m]),OT(()=>{if(typeof document>"u")return;let L=()=>{let D=document.documentElement.classList.contains("dark");g.get(Nu)?.isDarkMode!==D&&E(B=>{B.isDarkMode=D})};L();let M=new MutationObserver(D=>{for(let B of D)if(B.type==="attributes"&&B.attributeName==="class"){L();break}});return M.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>M.disconnect()},[g,E]);let{hasCustomTheme:R}=sq(o,k.isDarkMode),N=vh(L=>{let{name:M,payload:D}=L;if(M==="studio_operation_error"){if(D.error.name==="AbortError")return;Ul.error(`"${D.operation}" operation failed`,{action:{label:"Console",onClick:()=>{window.location.hash=NT({viewParam:"console"})}}})}let B=Uo.generate(),V=new Date().toISOString(),H={...L,eventId:B,timestamp:V};if(H.name==="studio_operation_success"||H.name==="studio_operation_error"){y.insert(H);let U=y.size-100;if(U>0){let F=[...y.toArray].sort((q,z)=>new Date(q.timestamp).getTime()-new Date(z.timestamp).getTime()).slice(0,U).map(q=>q.eventId);F.length>0&&y.delete(F)}}n?.(H),M==="studio_launched"&&Au&&!mh&&!Tle()&&!Ale()&&eq({additionalData:{eventPayload:D,variant:"free"},command:M,eventId:B,product:"prisma-studio-embedded",signature:s.current,skipUpdateCheck:!0,timestamp:new Date(V),version:"0.19.2"}).catch(U=>{console.error(U)})},[n,y]),T=vh(()=>{E(L=>{L.isFullscreen=!L.isFullscreen})},[E]),_=vh(()=>{E(L=>{L.isNavigationOpen=!L.isNavigationOpen})},[E]);return Dle(uT,{client:m,children:[hS(tq,{}),hS(Aq.Provider,{value:{adapter:r,isFullscreen:k.isFullscreen,onEvent:N,operationEvents:P,toggleFullscreen:T,isNavigationOpen:k.isNavigationOpen,toggleNavigation:_,isDarkMode:k.isDarkMode,hasCustomTheme:R,queryClient:m,tableUiStateCollection:x,tableQueryMetaCollection:v,uiLocalStateCollection:b,sqlEditorStateCollection:S,navigationTableNamesCollection:w,getOrCreateRowsCollection:O},children:hS(Eq,{children:hS(Oq,{children:e})})})]})}function DT(){return Ile(Aq)}function Cn(){let t=DT();if(!t)throw new Error("`useStudio` must be used within a `StudioContext.Provider`");return t}function Tle(){return Ele()&&"__PVCE__"in window&&window.__PVCE__===!0}function Ele(){return Au&&"acquireVsCodeApi"in window&&typeof window.acquireVsCodeApi=="function"}function Ale(){if(!Au)return!1;let{hostname:t}=window.location;return"__PDPCP__"in window&&window.__PDPCP__===!0||t.includes("console.prisma.io")||t.includes("datacdn.workers.dev")}function FT(){return{kind:"FilterGroup",filters:[],after:"and",id:Uo.generate()}}var pS=FT();function BT(t){let e=0;for(let n of t.filters){if(n.kind==="ColumnFilter"){n.column.trim()&&e++;continue}e+=BT(n)}return e}import{useCallback as _q,useRef as Ole,useSyncExternalStore as _le}from"react";function Nle(){if(typeof window>"u"||!window.GestureEvent)return 50;try{let t=navigator.userAgent?.match(/version\/([\d\.]+) safari/i);return parseFloat(t[1])>=17?120:320}catch{return 320}}function Nq(t){return{method:"throttle",timeMs:t}}var bh=Nq(Nle());function Fq(t){return t===null||Array.isArray(t)&&t.length===0}function Bq(t,e,n){if(typeof t=="string")n.set(e,t);else{n.delete(e);for(let r of t)n.append(e,r);n.has(e)||n.set(e,"")}return n}function qT(){let t=new Map;return{on(e,n){let r=t.get(e)||[];return r.push(n),t.set(e,r),()=>this.off(e,n)},off(e,n){let r=t.get(e);r&&t.set(e,r.filter(o=>o!==n))},emit(e,n){t.get(e)?.forEach(r=>r(n))}}}function VT(t,e,n){function r(){t(),n.removeEventListener("abort",i)}let o=setTimeout(r,e);function i(){clearTimeout(o),n.removeEventListener("abort",i)}n.addEventListener("abort",i)}function zT(){let t=Promise;if(Promise.hasOwnProperty("withResolvers"))return Promise.withResolvers();let e=()=>{},n=()=>{};return{promise:new t((r,o)=>{e=r,n=o}),resolve:e,reject:n}}function Fle(t,e){let n=e;for(let r=t.length-1;r>=0;r--){let o=t[r];if(!o)continue;let i=n;n=()=>o(i)}n()}function HT(){return new URLSearchParams(location.search)}var Vq=class{updateMap=new Map;options={history:"replace",scroll:!1,shallow:!0};timeMs=bh.timeMs;transitions=new Set;resolvers=null;controller=null;lastFlushedAt=0;resetQueueOnNextPush=!1;push({key:t,query:e,options:n},r=bh.timeMs){this.resetQueueOnNextPush&&(this.reset(),this.resetQueueOnNextPush=!1),un("[nuqs gtq] Enqueueing %s=%s %O",t,e,n),this.updateMap.set(t,e),n.history==="push"&&(this.options.history="push"),n.scroll&&(this.options.scroll=!0),n.shallow===!1&&(this.options.shallow=!1),n.startTransition&&this.transitions.add(n.startTransition),(!Number.isFinite(this.timeMs)||r>this.timeMs)&&(this.timeMs=r)}getQueuedQuery(t){return this.updateMap.get(t)}getPendingPromise({getSearchParamsSnapshot:t=HT}){return this.resolvers?.promise??Promise.resolve(t())}flush({getSearchParamsSnapshot:t=HT,rateLimitFactor:e=1,...n},r){if(this.controller??=new AbortController,!Number.isFinite(this.timeMs))return un("[nuqs gtq] Skipping flush due to throttleMs=Infinity"),Promise.resolve(t());if(this.resolvers)return this.resolvers.promise;this.resolvers=zT();let o=()=>{this.lastFlushedAt=performance.now();let[s,a]=this.applyPendingUpdates({...n,autoResetQueueOnUpdate:n.autoResetQueueOnUpdate??!0,getSearchParamsSnapshot:t},r);a===null?(this.resolvers.resolve(s),this.resetQueueOnNextPush=!0):this.resolvers.reject(s),this.resolvers=null};return VT(()=>{let s=performance.now()-this.lastFlushedAt,a=this.timeMs,l=e*Math.max(0,a-s);un("[nuqs gtq] Scheduling flush in %f ms. Throttled at %f ms (x%f)",l,a,e),l===0?o():VT(o,l,this.controller.signal)},0,this.controller.signal),this.resolvers.promise}abort(){return this.controller?.abort(),this.controller=new AbortController,this.resolvers?.resolve(new URLSearchParams),this.resolvers=null,this.reset()}reset(){let t=Array.from(this.updateMap.keys());return un("[nuqs gtq] Resetting queue %s",JSON.stringify(Object.fromEntries(this.updateMap))),this.updateMap.clear(),this.transitions.clear(),this.options={history:"replace",scroll:!1,shallow:!0},this.timeMs=bh.timeMs,t}applyPendingUpdates(t,e){let{updateUrl:n,getSearchParamsSnapshot:r}=t,o=r();if(un("[nuqs gtq] Applying %d pending update(s) on top of %s",this.updateMap.size,o.toString()),this.updateMap.size===0)return[o,null];let i=Array.from(this.updateMap.entries()),s={...this.options},a=Array.from(this.transitions);t.autoResetQueueOnUpdate&&this.reset(),un("[nuqs gtq] Flushing queue %O with options %O",i,s);for(let[l,c]of i)c===null?o.delete(l):o=Bq(c,l,o);e&&(o=e(o));try{return Fle(a,()=>{n(o,s)}),[o,null]}catch(l){return console.error(_u(429),i.map(([c])=>c).join(),l),[o,l]}}},Dy=new Vq;function Ble(t,e,n){let r=_q(()=>{let i=Object.fromEntries(t.map(s=>[s,n(s)]));return[JSON.stringify(i),i]},[t.join(","),n]),o=Ole(null);return o.current===null&&(o.current=r()),_le(_q(i=>{let s=t.map(a=>e(a,i));return()=>s.forEach(a=>a())},[t.join(","),e]),()=>{let[i,s]=r();return o.current[0]===i?o.current[1]:(o.current=[i,s],s)},()=>o.current[1])}var Vle=class{callback;resolvers=zT();controller=new AbortController;queuedValue=void 0;constructor(t){this.callback=t}abort(){this.controller.abort(),this.queuedValue=void 0}push(t,e){return this.queuedValue=t,this.controller.abort(),this.controller=new AbortController,VT(()=>{let n=this.resolvers;try{un("[nuqs dq] Flushing debounce queue",t);let r=this.callback(t);un("[nuqs dq] Reset debounce queue %O",this.queuedValue),this.queuedValue=void 0,this.resolvers=zT(),r.then(o=>n.resolve(o)).catch(o=>n.reject(o))}catch(r){this.queuedValue=void 0,n.reject(r)}},e,this.controller.signal),this.resolvers.promise}},zle=class{throttleQueue;queues=new Map;queuedQuerySync=qT();constructor(t=new Vq){this.throttleQueue=t}useQueuedQueries(t){return Ble(t,(e,n)=>this.queuedQuerySync.on(e,n),e=>this.getQueuedQuery(e))}push(t,e,n,r){if(!Number.isFinite(e)){let s=n.getSearchParamsSnapshot??HT;return Promise.resolve(s())}let o=t.key;if(!this.queues.has(o)){un("[nuqs dqc] Creating debounce queue for `%s`",o);let s=new Vle(a=>(this.throttleQueue.push(a),this.throttleQueue.flush(n,r).finally(()=>{this.queues.get(a.key)?.queuedValue===void 0&&(un("[nuqs dqc] Cleaning up empty queue for `%s`",a.key),this.queues.delete(a.key)),this.queuedQuerySync.emit(a.key)})));this.queues.set(o,s)}un("[nuqs dqc] Enqueueing debounce update %O",t);let i=this.queues.get(o).push(t,e);return this.queuedQuerySync.emit(o),i}abort(t){let e=this.queues.get(t);return e?(un("[nuqs dqc] Aborting debounce queue %s=%s",t,e.queuedValue?.query),this.queues.delete(t),e.abort(),this.queuedQuerySync.emit(t),n=>(n.then(e.resolvers.resolve,e.resolvers.reject),n)):n=>n}abortAll(){for(let[t,e]of this.queues.entries())un("[nuqs dqc] Aborting debounce queue %s=%s",t,e.queuedValue?.query),e.abort(),e.resolvers.resolve(new URLSearchParams),this.queuedQuerySync.emit(t);this.queues.clear()}getQueuedQuery(t){let e=this.queues.get(t)?.queuedValue?.query;return e!==void 0?e:this.throttleQueue.getQueuedQuery(t)}},mS=new zle(Dy);function zq(t,e){return t===e?!0:t===null||e===null||typeof t=="string"||typeof e=="string"||t.length!==e.length?!1:t.every((n,r)=>n===e[r])}import{useCallback as Wq,useEffect as Hq,useId as Hle,useMemo as UT,useRef as qq,useState as qle}from"react";function $q(t,e,n){try{return t(e)}catch(r){return Sq("[nuqs] Error while parsing value `%s`: %O"+(n?" (for key `%s`)":""),e,r,n),null}}function Na(t){function e(n){if(typeof n>"u")return null;let r="";if(Array.isArray(n)){if(n[0]===void 0)return null;r=n[0]}return typeof n=="string"&&(r=n),$q(t.parse,r)}return{type:"single",eq:(n,r)=>n===r,...t,parseServerSide:e,withDefault(n){return{...this,defaultValue:n,parseServerSide(r){return e(r)??n}}},withOptions(n){return{...this,...n}}}}var uQe=Na({parse:t=>t,serialize:String}),fQe=Na({parse:t=>{let e=parseInt(t);return e==e?e:null},serialize:t=>""+Math.round(t)}),dQe=Na({parse:t=>{let e=parseInt(t);return e==e?e-1:null},serialize:t=>""+Math.round(t+1)}),hQe=Na({parse:t=>{let e=parseInt(t,16);return e==e?e:null},serialize:t=>{let e=Math.round(t).toString(16);return(e.length&1?"0":"")+e}}),pQe=Na({parse:t=>{let e=parseFloat(t);return e==e?e:null},serialize:String}),mQe=Na({parse:t=>t.toLowerCase()==="true",serialize:String});function GT(t,e){return t.valueOf()===e.valueOf()}var gQe=Na({parse:t=>{let e=parseInt(t);return e==e?new Date(e):null},serialize:t=>""+t.valueOf(),eq:GT}),yQe=Na({parse:t=>{let e=new Date(t);return e.valueOf()==e.valueOf()?e:null},serialize:t=>t.toISOString(),eq:GT}),xQe=Na({parse:t=>{let e=new Date(t.slice(0,10));return e.valueOf()==e.valueOf()?e:null},serialize:t=>t.toISOString().slice(0,10),eq:GT});var WT=qT(),Ule={};function Gq(t,e={}){let n=Hle(),r=Iq(),o=kq(),{history:i="replace",scroll:s=r?.scroll??!1,shallow:a=r?.shallow??!0,throttleMs:l=bh.timeMs,limitUrlUpdates:c=r?.limitUrlUpdates,clearOnDefault:u=r?.clearOnDefault??!0,startTransition:f,urlKeys:d=Ule}=e,h=Object.keys(t).join(","),p=UT(()=>Object.fromEntries(Object.keys(t).map(C=>[C,d[C]??C])),[h,JSON.stringify(d)]),m=Cq(Object.values(p)),g=m.searchParams,y=qq({}),x=UT(()=>Object.fromEntries(Object.keys(t).map(C=>[C,t[C].defaultValue??null])),[Object.values(t).map(({defaultValue:C})=>C).join(",")]),v=mS.useQueuedQueries(Object.values(p)),[b,S]=qle(()=>$T(t,d,g??new URLSearchParams,v).state),w=qq(b);if(un("[nuq+ %s `%s`] render - state: %O, iSP: %s",n,h,b,g),Object.keys(y.current).join("&")!==Object.values(p).join("&")){let{state:C,hasChanged:k}=$T(t,d,g,v,y.current,w.current);k&&(un("[nuq+ %s `%s`] State changed: %O",n,h,{state:C,initialSearchParams:g,queuedQueries:v,queryRef:y.current,stateRef:w.current}),w.current=C,S(C)),y.current=Object.fromEntries(Object.entries(p).map(([P,E])=>[E,t[P]?.type==="multi"?g?.getAll(E):g?.get(E)??null]))}Hq(()=>{let{state:C,hasChanged:k}=$T(t,d,g,v,y.current,w.current);k&&(un("[nuq+ %s `%s`] State changed: %O",n,h,{state:C,initialSearchParams:g,queuedQueries:v,queryRef:y.current,stateRef:w.current}),w.current=C,S(C))},[Object.values(p).map(C=>`${C}=${g?.getAll(C)}`).join("&"),JSON.stringify(v)]),Hq(()=>{let C=Object.keys(t).reduce((k,P)=>(k[P]=({state:E,query:O})=>{S(A=>{let{defaultValue:R}=t[P],N=p[P],T=E??R??null,_=A[P]??R??null;return Object.is(_,T)?(un("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). no change, skipping, resolved: %O",n,h,N,E,R,w.current),A):(w.current={...w.current,[P]:T},y.current[N]=O,un("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). updateInternalState, resolved: %O",n,h,N,E,R,w.current),w.current)})},k),{});for(let k of Object.keys(t)){let P=p[k];un("[nuq+ %s `%s`] Subscribing to sync for `%s`",n,P,h),WT.on(P,C[k])}return()=>{for(let k of Object.keys(t)){let P=p[k];un("[nuq+ %s `%s`] Unsubscribing to sync for `%s`",n,P,h),WT.off(P,C[k])}}},[h,p]);let I=Wq((C,k={})=>{let P=Object.fromEntries(Object.keys(t).map(_=>[_,null])),E=typeof C=="function"?C(Uq(w.current,x))??P:C??P;un("[nuq+ %s `%s`] setState: %O",n,h,E);let O,A=0,R=!1,N=[];for(let[_,L]of Object.entries(E)){let M=t[_],D=p[_];if(!M||L===void 0)continue;(k.clearOnDefault??M.clearOnDefault??u)&&L!==null&&M.defaultValue!==void 0&&(M.eq??((H,U)=>H===U))(L,M.defaultValue)&&(L=null);let B=L===null?null:(M.serialize??String)(L);WT.emit(D,{state:L,query:B});let V={key:D,query:B,options:{history:k.history??M.history??i,shallow:k.shallow??M.shallow??a,scroll:k.scroll??M.scroll??s,startTransition:k.startTransition??M.startTransition??f}};if(k?.limitUrlUpdates?.method==="debounce"||c?.method==="debounce"||M.limitUrlUpdates?.method==="debounce"){V.options.shallow===!0&&console.warn(_u(422));let H=k?.limitUrlUpdates?.timeMs??c?.timeMs??M.limitUrlUpdates?.timeMs??bh.timeMs,U=mS.push(V,H,m,o);A<H&&(O=U,A=H)}else{let H=k?.limitUrlUpdates?.timeMs??M?.limitUrlUpdates?.timeMs??c?.timeMs??k.throttleMs??M.throttleMs??l;N.push(mS.abort(D)),Dy.push(V,H),R=!0}}let T=N.reduce((_,L)=>L(_),R?Dy.flush(m,o):Dy.getPendingPromise(m));return O??T},[h,i,a,s,l,c?.method,c?.timeMs,f,p,m.updateUrl,m.getSearchParamsSnapshot,m.rateLimitFactor,o,x]);return[UT(()=>Uq(b,x),[b,x]),I]}function $T(t,e,n,r,o,i){let s=!1,a=Object.entries(t).reduce((l,[c,u])=>{let f=e?.[c]??c,d=r[f],h=u.type==="multi"?[]:null,p=d===void 0?(u.type==="multi"?n?.getAll(f):n?.get(f))??h:d;return o&&i&&zq(o[f]??h,p)?(l[c]=i[c]??null,l):(s=!0,l[c]=(Fq(p)?null:$q(u.parse,p,f))??null,o&&(o[f]=p),l)},{});if(!s){let l=Object.keys(t),c=Object.keys(i??{});s=l.length!==c.length||l.some(u=>!c.includes(u))}return{state:a,hasChanged:s}}function Uq(t,e){return Object.fromEntries(Object.keys(t).map(n=>[n,t[n]??e[n]??null]))}function Kq(t,e={}){let{parse:n,type:r,serialize:o,eq:i,defaultValue:s,...a}=e,[{[t]:l},c]=Gq({[t]:{parse:n??(u=>u),type:r,serialize:o,eq:i,defaultValue:s}},a);return[l,Wq((u,f={})=>c(d=>({[t]:typeof u=="function"?u(d[t]):u}),f),[t,c])]}function Wi(t,e){return Kq(t,e)}var jq=-1;function pi(){let{adapter:t,onEvent:e}=Cn();return dT({initialData:{schemas:{[t.defaultSchema||"db"]:{name:t.defaultSchema||"db",tables:{}}},timezone:"UTC",filterOperators:[],query:{parameters:[],sql:""}},initialDataUpdatedAt:jq,queryFn:async({signal:n})=>{let[r,o]=await t.introspect({abortSignal:n});if(r)throw e({name:"studio_operation_error",payload:{operation:"introspect",query:r.query,error:r}}),r;e({name:"studio_operation_success",payload:{operation:"introspect",query:o.query,error:void 0}});let i=Object.values(o.schemas).reduce((s,a)=>s+Object.keys(a.tables).length,0);return e({name:"studio_launched",payload:{tableCount:i}}),o},queryKey:["introspection"],staleTime:n=>n.state.dataUpdatedAt===jq?0:1/0})}import{jsx as Qle}from"react/jsx-runtime";function NT(t){return`#${Object.entries(t).map(([n,r])=>{let o=n.endsWith("Param")?n.slice(0,-5):n;return`${encodeURIComponent(o)}=${encodeURIComponent(r)}`}).join("&")}`}function Kle(t){let{adapter:e,introspection:n}=t,{schemas:r}=n,{defaultSchema:o}=e,i=o??Object.keys(r)[0]??"public",s=Object.keys(r[i]?.tables??{})[0]??"",a=JSON.stringify(pS);return{schema:i,table:s,filter:a,pageIndex:"0",pageSize:"25",search:"",searchScope:"table",view:"table"}}function jle(t){let e=[];for(let[n,r]of Object.entries(t.schemas))for(let o of Object.keys(r.tables))e.push({id:`${n}.${o}`,schema:n,table:o,qualifiedName:`${n}.${o}`});return e}function Yle(){let{adapter:t,navigationTableNamesCollection:e}=Cn(),{data:n,isFetching:r}=pi(),{schemas:o}=n,i=Yq(()=>Kle({adapter:t,introspection:n}),[t,n]);Gle(()=>{let T=jle(n),_=new Map(T.map(D=>[D.id,D])),M=Array.from(e.toArray).map(D=>D.id).filter(D=>!_.has(D));M.length>0&&e.delete(M);for(let D of T){let B=e.get(D.id);if(!B){e.insert(D);continue}B.schema===D.schema&&B.table===D.table&&B.qualifiedName===D.qualifiedName||e.update(D.id,V=>{V.schema=D.schema,V.table=D.table,V.qualifiedName=D.qualifiedName})}},[n,e]);let[s,a]=Wi("filter",{defaultValue:i.filter}),[l,c]=Wi("pageIndex",{defaultValue:i.pageIndex}),[u,f]=Wi("pageSize",{defaultValue:i.pageSize}),[d,h]=Wi("pin"),[p,m]=Wi("schema",{defaultValue:i.schema}),[g,y]=Wi("search",{defaultValue:i.search}),[x,v]=Wi("searchScope",{defaultValue:i.searchScope}),[b,S]=Wi("sort"),[w,I]=Wi("table",{defaultValue:i.table}),[C,k]=Wi("view",{defaultValue:i.view}),P=p&&o[p]?p:i.schema,E=P?o[P]:void 0,O=E?E.tables:void 0,A=w&&O?.[w]?w:Object.keys(O??{})[0],R=O&&A?O[A]:void 0;return{metadata:Yq(()=>({activeSchema:E,activeTables:O,activeTable:R,isFetching:r}),[E,O,R,r]),createUrl:NT,filterParam:s,pageIndexParam:l,pageSizeParam:u,pinParam:d,schemaParam:p,searchParam:g,searchScopeParam:x,sortParam:b,tableParam:w,viewParam:C,setFilterParam:a,setPageIndexParam:c,setPageSizeParam:f,setPinParam:h,setSchemaParam:m,setSearchParam:y,setSearchScopeParam:v,setSortParam:S,setTableParam:I,setViewParam:k}}var Qq=Wle(void 0);function Oq({children:t}){let e=Yle();return Qle(Qq.Provider,{value:e,children:t})}function Ht(){let t=$le(Qq);if(t===void 0)throw new Error("useNavigationContext must be used within a NavigationContextProvider");return t}function Xq(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=Xq(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function gS(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=Xq(t))&&(r&&(r+=" "),r+=e);return r}var Xle=(t,e)=>{let n=new Array(t.length+e.length);for(let r=0;r<t.length;r++)n[r]=t[r];for(let r=0;r<e.length;r++)n[t.length+r]=e[r];return n},Jle=(t,e)=>({classGroupId:t,validator:e}),oU=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n});var Jq=[],Zle="arbitrary..",ece=t=>{let e=nce(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return tce(s);let a=s.split("-"),l=a[0]===""&&a.length>1?1:0;return iU(a,l,e)},getConflictingClassGroupIds:(s,a)=>{if(a){let l=r[s],c=n[s];return l?c?Xle(c,l):l:c||Jq}return n[s]||Jq}}},iU=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;let o=t[e],i=n.nextPart.get(o);if(i){let c=iU(t,e+1,i);if(c)return c}let s=n.validators;if(s===null)return;let a=e===0?t.join("-"):t.slice(e).join("-"),l=s.length;for(let c=0;c<l;c++){let u=s[c];if(u.validator(a))return u.classGroupId}},tce=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{let e=t.slice(1,-1),n=e.indexOf(":"),r=e.slice(0,n);return r?Zle+r:void 0})(),nce=t=>{let{theme:e,classGroups:n}=t;return rce(n,e)},rce=(t,e)=>{let n=oU();for(let r in t){let o=t[r];YT(o,n,r,e)}return n},YT=(t,e,n,r)=>{let o=t.length;for(let i=0;i<o;i++){let s=t[i];oce(s,e,n,r)}},oce=(t,e,n,r)=>{if(typeof t=="string"){ice(t,e,n);return}if(typeof t=="function"){sce(t,e,n,r);return}ace(t,e,n,r)},ice=(t,e,n)=>{let r=t===""?e:sU(e,t);r.classGroupId=n},sce=(t,e,n,r)=>{if(lce(t)){YT(t(r),e,n,r);return}e.validators===null&&(e.validators=[]),e.validators.push(Jle(n,t))},ace=(t,e,n,r)=>{let o=Object.entries(t),i=o.length;for(let s=0;s<i;s++){let[a,l]=o[s];YT(l,sU(e,a),n,r)}},sU=(t,e)=>{let n=t,r=e.split("-"),o=r.length;for(let i=0;i<o;i++){let s=r[i],a=n.nextPart.get(s);a||(a=oU(),n.nextPart.set(s,a)),n=a}return n},lce=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,cce=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),r=Object.create(null),o=(i,s)=>{n[i]=s,e++,e>t&&(e=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}};var uce=[],Zq=(t,e,n,r,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),fce=t=>{let{prefix:e,experimentalParseClassName:n}=t,r=o=>{let i=[],s=0,a=0,l=0,c,u=o.length;for(let m=0;m<u;m++){let g=o[m];if(s===0&&a===0){if(g===":"){i.push(o.slice(l,m)),l=m+1;continue}if(g==="/"){c=m;continue}}g==="["?s++:g==="]"?s--:g==="("?a++:g===")"&&a--}let f=i.length===0?o:o.slice(l),d=f,h=!1;f.endsWith("!")?(d=f.slice(0,-1),h=!0):f.startsWith("!")&&(d=f.slice(1),h=!0);let p=c&&c>l?c-l:void 0;return Zq(i,h,d,p)};if(e){let o=e+":",i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):Zq(uce,!1,s,void 0,!0)}if(n){let o=r;r=i=>n({className:i,parseClassName:o})}return r},dce=t=>{let e=new Map;return t.orderSensitiveModifiers.forEach((n,r)=>{e.set(n,1e6+r)}),n=>{let r=[],o=[];for(let i=0;i<n.length;i++){let s=n[i],a=s[0]==="[",l=e.has(s);a||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},hce=t=>({cache:cce(t.cacheSize),parseClassName:fce(t),sortModifiers:dce(t),...ece(t)}),pce=/\s+/,mce=(t,e)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=e,s=[],a=t.trim().split(pce),l="";for(let c=a.length-1;c>=0;c-=1){let u=a[c],{isExternal:f,modifiers:d,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}=n(u);if(f){l=u+(l.length>0?" "+l:l);continue}let g=!!m,y=r(g?p.substring(0,m):p);if(!y){if(!g){l=u+(l.length>0?" "+l:l);continue}if(y=r(p),!y){l=u+(l.length>0?" "+l:l);continue}g=!1}let x=d.length===0?"":d.length===1?d[0]:i(d).join(":"),v=h?x+"!":x,b=v+y;if(s.indexOf(b)>-1)continue;s.push(b);let S=o(y,g);for(let w=0;w<S.length;++w){let I=S[w];s.push(v+I)}l=u+(l.length>0?" "+l:l)}return l},gce=(...t)=>{let e=0,n,r,o="";for(;e<t.length;)(n=t[e++])&&(r=aU(n))&&(o&&(o+=" "),o+=r);return o},aU=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=aU(t[r]))&&(n&&(n+=" "),n+=e);return n},eU=(t,...e)=>{let n,r,o,i,s=l=>{let c=e.reduce((u,f)=>f(u),t());return n=hce(c),r=n.cache.get,o=n.cache.set,i=a,a(l)},a=l=>{let c=r(l);if(c)return c;let u=mce(l,n);return o(l,u),u};return i=s,(...l)=>i(gce(...l))},yce=[],er=t=>{let e=n=>n[t]||yce;return e.isThemeGetter=!0,e},lU=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,cU=/^\((?:(\w[\w-]*):)?(.+)\)$/i,xce=/^\d+\/\d+$/,vce=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,bce=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,wce=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Sce=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Cce=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,wh=t=>xce.test(t),Je=t=>!!t&&!Number.isNaN(Number(t)),Gl=t=>!!t&&Number.isInteger(Number(t)),KT=t=>t.endsWith("%")&&Je(t.slice(0,-1)),Fa=t=>vce.test(t),Ice=()=>!0,kce=t=>bce.test(t)&&!wce.test(t),uU=()=>!1,Rce=t=>Sce.test(t),Mce=t=>Cce.test(t),Pce=t=>!be(t)&&!we(t),Lce=t=>Sh(t,hU,uU),be=t=>lU.test(t),Fu=t=>Sh(t,pU,kce),jT=t=>Sh(t,Oce,Je),tU=t=>Sh(t,fU,uU),Tce=t=>Sh(t,dU,Mce),yS=t=>Sh(t,mU,Rce),we=t=>cU.test(t),Oy=t=>Ch(t,pU),Ece=t=>Ch(t,_ce),nU=t=>Ch(t,fU),Ace=t=>Ch(t,hU),Dce=t=>Ch(t,dU),xS=t=>Ch(t,mU,!0),Sh=(t,e,n)=>{let r=lU.exec(t);return r?r[1]?e(r[1]):n(r[2]):!1},Ch=(t,e,n=!1)=>{let r=cU.exec(t);return r?r[1]?e(r[1]):n:!1},fU=t=>t==="position"||t==="percentage",dU=t=>t==="image"||t==="url",hU=t=>t==="length"||t==="size"||t==="bg-size",pU=t=>t==="length",Oce=t=>t==="number",_ce=t=>t==="family-name",mU=t=>t==="shadow";var rU=()=>{let t=er("color"),e=er("font"),n=er("text"),r=er("font-weight"),o=er("tracking"),i=er("leading"),s=er("breakpoint"),a=er("container"),l=er("spacing"),c=er("radius"),u=er("shadow"),f=er("inset-shadow"),d=er("text-shadow"),h=er("drop-shadow"),p=er("blur"),m=er("perspective"),g=er("aspect"),y=er("ease"),x=er("animate"),v=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...b(),we,be],w=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],C=()=>[we,be,l],k=()=>[wh,"full","auto",...C()],P=()=>[Gl,"none","subgrid",we,be],E=()=>["auto",{span:["full",Gl,we,be]},Gl,we,be],O=()=>[Gl,"auto",we,be],A=()=>["auto","min","max","fr",we,be],R=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],N=()=>["start","end","center","stretch","center-safe","end-safe"],T=()=>["auto",...C()],_=()=>[wh,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],L=()=>[t,we,be],M=()=>[...b(),nU,tU,{position:[we,be]}],D=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",Ace,Lce,{size:[we,be]}],V=()=>[KT,Oy,Fu],H=()=>["","none","full",c,we,be],U=()=>["",Je,Oy,Fu],F=()=>["solid","dashed","dotted","double"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>[Je,KT,nU,tU],Y=()=>["","none",p,we,be],J=()=>["none",Je,we,be],j=()=>["none",Je,we,be],de=()=>[Je,we,be],ie=()=>[wh,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fa],breakpoint:[Fa],color:[Ice],container:[Fa],"drop-shadow":[Fa],ease:["in","out","in-out"],font:[Pce],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Fa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Fa],shadow:[Fa],spacing:["px",Je],text:[Fa],"text-shadow":[Fa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",wh,be,we,g]}],container:["container"],columns:[{columns:[Je,be,we,a]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:w()}],"overflow-x":[{"overflow-x":w()}],"overflow-y":[{"overflow-y":w()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:k()}],"inset-x":[{"inset-x":k()}],"inset-y":[{"inset-y":k()}],start:[{start:k()}],end:[{end:k()}],top:[{top:k()}],right:[{right:k()}],bottom:[{bottom:k()}],left:[{left:k()}],visibility:["visible","invisible","collapse"],z:[{z:[Gl,"auto",we,be]}],basis:[{basis:[wh,"full","auto",a,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Je,wh,"auto","initial","none",be]}],grow:[{grow:["",Je,we,be]}],shrink:[{shrink:["",Je,we,be]}],order:[{order:[Gl,"first","last","none",we,be]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:E()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:E()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":A()}],"auto-rows":[{"auto-rows":A()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...R(),"normal"]}],"justify-items":[{"justify-items":[...N(),"normal"]}],"justify-self":[{"justify-self":["auto",...N()]}],"align-content":[{content:["normal",...R()]}],"align-items":[{items:[...N(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...N(),{baseline:["","last"]}]}],"place-content":[{"place-content":R()}],"place-items":[{"place-items":[...N(),"baseline"]}],"place-self":[{"place-self":["auto",...N()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:T()}],mx:[{mx:T()}],my:[{my:T()}],ms:[{ms:T()}],me:[{me:T()}],mt:[{mt:T()}],mr:[{mr:T()}],mb:[{mb:T()}],ml:[{ml:T()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:_()}],w:[{w:[a,"screen",..._()]}],"min-w":[{"min-w":[a,"screen","none",..._()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},..._()]}],h:[{h:["screen","lh",..._()]}],"min-h":[{"min-h":["screen","lh","none",..._()]}],"max-h":[{"max-h":["screen","lh",..._()]}],"font-size":[{text:["base",n,Oy,Fu]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,we,jT]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",KT,be]}],"font-family":[{font:[Ece,be,e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,we,be]}],"line-clamp":[{"line-clamp":[Je,"none",we,jT]}],leading:[{leading:[i,...C()]}],"list-image":[{"list-image":["none",we,be]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",we,be]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:[Je,"from-font","auto",we,Fu]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[Je,"auto",we,be]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",we,be]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",we,be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:D()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Gl,we,be],radial:["",we,be],conic:[Gl,we,be]},Dce,Tce]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:U()}],"border-w-x":[{"border-x":U()}],"border-w-y":[{"border-y":U()}],"border-w-s":[{"border-s":U()}],"border-w-e":[{"border-e":U()}],"border-w-t":[{"border-t":U()}],"border-w-r":[{"border-r":U()}],"border-w-b":[{"border-b":U()}],"border-w-l":[{"border-l":U()}],"divide-x":[{"divide-x":U()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":U()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...F(),"hidden","none"]}],"divide-style":[{divide:[...F(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...F(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Je,we,be]}],"outline-w":[{outline:["",Je,Oy,Fu]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",u,xS,yS]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",f,xS,yS]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[Je,Fu]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":U()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",d,xS,yS]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[Je,we,be]}],"mix-blend":[{"mix-blend":[...q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":q()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Je]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[we,be]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Je]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:D()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",we,be]}],filter:[{filter:["","none",we,be]}],blur:[{blur:Y()}],brightness:[{brightness:[Je,we,be]}],contrast:[{contrast:[Je,we,be]}],"drop-shadow":[{"drop-shadow":["","none",h,xS,yS]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",Je,we,be]}],"hue-rotate":[{"hue-rotate":[Je,we,be]}],invert:[{invert:["",Je,we,be]}],saturate:[{saturate:[Je,we,be]}],sepia:[{sepia:["",Je,we,be]}],"backdrop-filter":[{"backdrop-filter":["","none",we,be]}],"backdrop-blur":[{"backdrop-blur":Y()}],"backdrop-brightness":[{"backdrop-brightness":[Je,we,be]}],"backdrop-contrast":[{"backdrop-contrast":[Je,we,be]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Je,we,be]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Je,we,be]}],"backdrop-invert":[{"backdrop-invert":["",Je,we,be]}],"backdrop-opacity":[{"backdrop-opacity":[Je,we,be]}],"backdrop-saturate":[{"backdrop-saturate":[Je,we,be]}],"backdrop-sepia":[{"backdrop-sepia":["",Je,we,be]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",we,be]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Je,"initial",we,be]}],ease:[{ease:["linear","initial",y,we,be]}],delay:[{delay:[Je,we,be]}],animate:[{animate:["none",x,we,be]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,we,be]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:J()}],"rotate-x":[{"rotate-x":J()}],"rotate-y":[{"rotate-y":J()}],"rotate-z":[{"rotate-z":J()}],scale:[{scale:j()}],"scale-x":[{"scale-x":j()}],"scale-y":[{"scale-y":j()}],"scale-z":[{"scale-z":j()}],"scale-3d":["scale-3d"],skew:[{skew:de()}],"skew-x":[{"skew-x":de()}],"skew-y":[{"skew-y":de()}],transform:[{transform:[we,be,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ie()}],"translate-x":[{"translate-x":ie()}],"translate-y":[{"translate-y":ie()}],"translate-z":[{"translate-z":ie()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",we,be]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",we,be]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[Je,Oy,Fu,jT]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Nce=(t,{cacheSize:e,prefix:n,experimentalParseClassName:r,extend:o={},override:i={}})=>(_y(t,"cacheSize",e),_y(t,"prefix",n),_y(t,"experimentalParseClassName",r),vS(t.theme,i.theme),vS(t.classGroups,i.classGroups),vS(t.conflictingClassGroups,i.conflictingClassGroups),vS(t.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),_y(t,"orderSensitiveModifiers",i.orderSensitiveModifiers),bS(t.theme,o.theme),bS(t.classGroups,o.classGroups),bS(t.conflictingClassGroups,o.conflictingClassGroups),bS(t.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),gU(t,o,"orderSensitiveModifiers"),t),_y=(t,e,n)=>{n!==void 0&&(t[e]=n)},vS=(t,e)=>{if(e)for(let n in e)_y(t,n,e[n])},bS=(t,e)=>{if(e)for(let n in e)gU(t,e,n)},gU=(t,e,n)=>{let r=e[n];r!==void 0&&(t[n]=t[n]?t[n].concat(r):r)},yU=(t,...e)=>typeof t=="function"?eU(rU,t,...e):eU(()=>Nce(rU(),t),...e);var Fce=yU({});function G(...t){return Fce(gS(t))}import*as Hn from"react";import*as vU from"react";function xU(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Ba(...t){return e=>{let n=!1,r=t.map(o=>{let i=xU(o,e);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){let i=r[o];typeof i=="function"?i():xU(t[o],null)}}}}function Ke(...t){return vU.useCallback(Ba(...t),t)}import{Fragment as qQe,jsx as bU}from"react/jsx-runtime";var Bce=Symbol.for("react.lazy"),wS=Hn[" use ".trim().toString()];function Vce(t){return typeof t=="object"&&t!==null&&"then"in t}function wU(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===Bce&&"_payload"in t&&Vce(t._payload)}function QT(t){let e=zce(t),n=Hn.forwardRef((r,o)=>{let{children:i,...s}=r;wU(i)&&typeof wS=="function"&&(i=wS(i._payload));let a=Hn.Children.toArray(i),l=a.find(qce);if(l){let c=l.props.children,u=a.map(f=>f===l?Hn.Children.count(c)>1?Hn.Children.only(null):Hn.isValidElement(c)?c.props.children:null:f);return bU(e,{...s,ref:o,children:Hn.isValidElement(c)?Hn.cloneElement(c,void 0,u):null})}return bU(e,{...s,ref:o,children:i})});return n.displayName=`${t}.Slot`,n}var SS=QT("Slot");function zce(t){let e=Hn.forwardRef((n,r)=>{let{children:o,...i}=n;if(wU(o)&&typeof wS=="function"&&(o=wS(o._payload)),Hn.isValidElement(o)){let s=Wce(o),a=Uce(i,o.props);return o.type!==Hn.Fragment&&(a.ref=r?Ba(r,s):s),Hn.cloneElement(o,a)}return Hn.Children.count(o)>1?Hn.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var Hce=Symbol("radix.slottable");function qce(t){return Hn.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Hce}function Uce(t,e){let n={...e};for(let r in e){let o=t[r],i=e[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{let l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...t,...n}}function Wce(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}import{forwardRef as Kce,createElement as jce}from"react";var SU=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),$ce=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase()),XT=t=>{let e=$ce(t);return e.charAt(0).toUpperCase()+e.slice(1)},CS=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim(),CU=t=>{for(let e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};import{forwardRef as Gce,createElement as kU}from"react";var IU={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var RU=Gce(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>kU("svg",{ref:l,...IU,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:CS("lucide",o),...!i&&!CU(a)&&{"aria-hidden":"true"},...a},[...s.map(([c,u])=>kU(c,u)),...Array.isArray(i)?i:[i]]));var he=(t,e)=>{let n=Kce(({className:r,...o},i)=>jce(RU,{ref:i,iconNode:e,className:CS(`lucide-${SU(XT(t))}`,`lucide-${t}`,r),...o}));return n.displayName=XT(t),n};var Yce=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Ny=he("arrow-down",Yce);var Qce=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Fy=he("arrow-right",Qce);var Xce=[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M17 10V4h-2",key:"zcsr5x"}],["path",{d:"M15 10h4",key:"id2lce"}],["rect",{x:"15",y:"14",width:"4",height:"6",ry:"2",key:"33xykx"}]],By=he("arrow-up-1-0",Xce);var Jce=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Vy=he("arrow-up",Jce);var Zce=[["path",{d:"M12 6v12",key:"1vza4d"}],["path",{d:"M17.196 9 6.804 15",key:"1ah31z"}],["path",{d:"m6.804 9 10.392 6",key:"1b6pxd"}]],zy=he("asterisk",Zce);var eue=[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]],Hy=he("calculator",eue);var tue=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],$i=he("check",tue);var nue=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Hs=he("chevron-down",nue);var rue=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],qy=he("chevron-left",rue);var oue=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Wo=he("chevron-right",oue);var iue=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Uy=he("chevron-up",iue);var sue=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],Wy=he("chevrons-left",sue);var aue=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],$y=he("chevrons-right",aue);var lue=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],qs=he("circle-alert",lue);var cue=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Kl=he("circle-check-big",cue);var uue=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Gi=he("circle-question-mark",uue);var fue=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Bu=he("circle",fue);var due=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Vu=he("copy",due);var hue=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],Gy=he("corner-down-left",hue);var pue=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],jl=he("funnel",pue);var mue=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],Ky=he("grip-vertical",mue);var gue=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],Ih=he("key-round",gue);var yue=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],Va=he("key",yue);var xue=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],jy=he("maximize",xue);var vue=[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]],Yy=he("minimize",vue);var bue=[["path",{d:"M5 12h14",key:"1ays0h"}]],zu=he("minus",bue);var wue=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],Yl=he("panel-left-close",wue);var Sue=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],Ql=he("panel-left-open",Sue);var Cue=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]],Qy=he("pin",Cue);var Iue=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Xy=he("play",Iue);var kue=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Jy=he("refresh-cw",kue);var Rue=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Hu=he("search",Rue);var Mue=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"m12 16 4-4-4-4",key:"1i9zcv"}]],Xl=he("square-arrow-right",Mue);var Pue=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Zy=he("square",Pue);var Lue=[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",key:"gugj83"}]],kh=he("table-2",Lue);var Tue=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Jl=he("triangle-alert",Tue);var Eue=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Rh=he("x",Eue);import{useEffect as ehe,useRef as the}from"react";var MU='data:image/svg+xml, <svg width="12" height="14" viewBox="0 0 12 14" fill="none" xmlns="http://www.w3.org/2000/svg">%0A <path%0A fill-rule="evenodd"%0A clip-rule="evenodd"%0A d="M0.396923 8.8719C0.25789 9.09869 0.260041 9.38484 0.402469 9.60951L2.98037 13.6761C3.14768 13.94 3.47018 14.0603 3.76949 13.9705L11.2087 11.7388C11.6147 11.617 11.8189 11.1641 11.6415 10.7792L6.8592 0.405309C6.62598 -0.100601 5.92291 -0.142128 5.63176 0.332808L0.396923 8.8719ZM6.73214 2.77688C6.6305 2.54169 6.2863 2.57792 6.23585 2.82912L4.3947 11.9965C4.35588 12.1898 4.53686 12.3549 4.72578 12.2985L9.86568 10.7642C10.0157 10.7194 10.093 10.5537 10.0309 10.41L6.73214 2.77688Z"%0A fill="currentColor"%0A />%0A </svg>';import*as PU from"react";import{jsx as Due}from"react/jsx-runtime";var tr=PU.forwardRef(({className:t,type:e,...n},r)=>Due("input",{type:e,className:G("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm leading-5 font-normal shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t),ref:r,...n}));tr.displayName="Input";import*as fe from"react";import*as _1 from"react-dom";function JT(t,[e,n]){return Math.min(n,Math.max(e,t))}var cJe=!!(typeof window<"u"&&window.document&&window.document.createElement);function ae(t,e,{checkForDefaultPrevented:n=!0}={}){return function(o){if(t?.(o),n===!1||!o.defaultPrevented)return e?.(o)}}import qu from"react";import*as za from"react";import{jsx as Oue}from"react/jsx-runtime";function qn(t,e=[]){let n=[];function r(i,s){let a=za.createContext(s),l=n.length;n=[...n,s];let c=f=>{let{scope:d,children:h,...p}=f,m=d?.[t]?.[l]||a,g=za.useMemo(()=>p,Object.values(p));return Oue(m.Provider,{value:g,children:h})};c.displayName=i+"Provider";function u(f,d){let h=d?.[t]?.[l]||a,p=za.useContext(h);if(p)return p;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[c,u]}let o=()=>{let i=n.map(s=>za.createContext(s));return function(a){let l=a?.[t]||i;return za.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return o.scopeName=t,[r,_ue(o,...e)]}function _ue(...t){let e=t[0];if(t.length===1)return e;let n=()=>{let r=t.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){let s=r.reduce((a,{useScope:l,scopeName:c})=>{let f=l(i)[`__scope${c}`];return{...a,...f}},{});return za.useMemo(()=>({[`__scope${e.scopeName}`]:s}),[s])}};return n.scopeName=e.scopeName,n}import*as nr from"react";import{Fragment as Nue,jsx as ZT}from"react/jsx-runtime";function Ki(t){let e=Fue(t),n=nr.forwardRef((r,o)=>{let{children:i,...s}=r,a=nr.Children.toArray(i),l=a.find(Bue);if(l){let c=l.props.children,u=a.map(f=>f===l?nr.Children.count(c)>1?nr.Children.only(null):nr.isValidElement(c)?c.props.children:null:f);return ZT(e,{...s,ref:o,children:nr.isValidElement(c)?nr.cloneElement(c,void 0,u):null})}return ZT(e,{...s,ref:o,children:i})});return n.displayName=`${t}.Slot`,n}function Fue(t){let e=nr.forwardRef((n,r)=>{let{children:o,...i}=n;if(nr.isValidElement(o)){let s=zue(o),a=Vue(i,o.props);return o.type!==nr.Fragment&&(a.ref=r?Ba(r,s):s),nr.cloneElement(o,a)}return nr.Children.count(o)>1?nr.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var LU=Symbol("radix.slottable");function TU(t){let e=({children:n})=>ZT(Nue,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=LU,e}function Bue(t){return nr.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===LU}function Vue(t,e){let n={...e};for(let r in e){let o=t[r],i=e[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{let l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...t,...n}}function zue(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}import{jsx as e1}from"react/jsx-runtime";import SJe from"react";import{jsx as IJe}from"react/jsx-runtime";function Mh(t){let e=t+"CollectionProvider",[n,r]=qn(e),[o,i]=n(e,{collectionRef:{current:null},itemMap:new Map}),s=m=>{let{scope:g,children:y}=m,x=qu.useRef(null),v=qu.useRef(new Map).current;return e1(o,{scope:g,itemMap:v,collectionRef:x,children:y})};s.displayName=e;let a=t+"CollectionSlot",l=Ki(a),c=qu.forwardRef((m,g)=>{let{scope:y,children:x}=m,v=i(a,y),b=Ke(g,v.collectionRef);return e1(l,{ref:b,children:x})});c.displayName=a;let u=t+"CollectionItemSlot",f="data-radix-collection-item",d=Ki(u),h=qu.forwardRef((m,g)=>{let{scope:y,children:x,...v}=m,b=qu.useRef(null),S=Ke(g,b),w=i(u,y);return qu.useEffect(()=>(w.itemMap.set(b,{ref:b,...v}),()=>{w.itemMap.delete(b)})),e1(d,{[f]:"",ref:S,children:x})});h.displayName=u;function p(m){let g=i(t+"CollectionConsumer",m);return qu.useCallback(()=>{let x=g.collectionRef.current;if(!x)return[];let v=Array.from(x.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((w,I)=>v.indexOf(w.ref.current)-v.indexOf(I.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:s,Slot:c,ItemSlot:h},p,r]}import*as IS from"react";import{jsx as MJe}from"react/jsx-runtime";var Hue=IS.createContext(void 0);function Ph(t){let e=IS.useContext(Hue);return t||e||"ltr"}import*as fn from"react";import*as EU from"react";import*as AU from"react-dom";import{jsx as que}from"react/jsx-runtime";var Uue=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Oe=Uue.reduce((t,e)=>{let n=Ki(`Primitive.${e}`),r=EU.forwardRef((o,i)=>{let{asChild:s,...a}=o,l=s?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),que(l,{...a,ref:i})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function kS(t,e){t&&AU.flushSync(()=>t.dispatchEvent(e))}import*as Lh from"react";function Un(t){let e=Lh.useRef(t);return Lh.useEffect(()=>{e.current=t}),Lh.useMemo(()=>(...n)=>e.current?.(...n),[])}import*as DU from"react";function OU(t,e=globalThis?.document){let n=Un(t);DU.useEffect(()=>{let r=o=>{o.key==="Escape"&&n(o)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}import{jsx as FU}from"react/jsx-runtime";var Wue="DismissableLayer",t1="dismissableLayer.update",$ue="dismissableLayer.pointerDownOutside",Gue="dismissableLayer.focusOutside",_U,BU=fn.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ha=fn.forwardRef((t,e)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=t,c=fn.useContext(BU),[u,f]=fn.useState(null),d=u?.ownerDocument??globalThis?.document,[,h]=fn.useState({}),p=Ke(e,I=>f(I)),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),x=u?m.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,b=x>=y,S=Yue(I=>{let C=I.target,k=[...c.branches].some(P=>P.contains(C));!b||k||(o?.(I),s?.(I),I.defaultPrevented||a?.())},d),w=Que(I=>{let C=I.target;[...c.branches].some(P=>P.contains(C))||(i?.(I),s?.(I),I.defaultPrevented||a?.())},d);return OU(I=>{x===c.layers.size-1&&(r?.(I),!I.defaultPrevented&&a&&(I.preventDefault(),a()))},d),fn.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(_U=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),NU(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=_U)}},[u,d,n,c]),fn.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),NU())},[u,c]),fn.useEffect(()=>{let I=()=>h({});return document.addEventListener(t1,I),()=>document.removeEventListener(t1,I)},[]),FU(Oe.div,{...l,ref:p,style:{pointerEvents:v?b?"auto":"none":void 0,...t.style},onFocusCapture:ae(t.onFocusCapture,w.onFocusCapture),onBlurCapture:ae(t.onBlurCapture,w.onBlurCapture),onPointerDownCapture:ae(t.onPointerDownCapture,S.onPointerDownCapture)})});Ha.displayName=Wue;var Kue="DismissableLayerBranch",jue=fn.forwardRef((t,e)=>{let n=fn.useContext(BU),r=fn.useRef(null),o=Ke(e,r);return fn.useEffect(()=>{let i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),FU(Oe.div,{...t,ref:o})});jue.displayName=Kue;function Yue(t,e=globalThis?.document){let n=Un(t),r=fn.useRef(!1),o=fn.useRef(()=>{});return fn.useEffect(()=>{let i=a=>{if(a.target&&!r.current){let c=function(){VU($ue,n,u,{discrete:!0})};var l=c;let u={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",o.current),o.current=c,e.addEventListener("click",o.current,{once:!0})):c()}else e.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),e.removeEventListener("pointerdown",i),e.removeEventListener("click",o.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function Que(t,e=globalThis?.document){let n=Un(t),r=fn.useRef(!1);return fn.useEffect(()=>{let o=i=>{i.target&&!r.current&&VU(Gue,n,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",o),()=>e.removeEventListener("focusin",o)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function NU(){let t=new CustomEvent(t1);document.dispatchEvent(t)}function VU(t,e,n,{discrete:r}){let o=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&o.addEventListener(t,e,{once:!0}),r?kS(o,i):o.dispatchEvent(i)}import*as HU from"react";var n1=0;function Th(){HU.useEffect(()=>{let t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??zU()),document.body.insertAdjacentElement("beforeend",t[1]??zU()),n1++,()=>{n1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),n1--}},[])}function zU(){let t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}import*as mi from"react";import{jsx as Xue}from"react/jsx-runtime";var r1="focusScope.autoFocusOnMount",o1="focusScope.autoFocusOnUnmount",qU={bubbles:!1,cancelable:!0},Jue="FocusScope",Uu=mi.forwardRef((t,e)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=t,[a,l]=mi.useState(null),c=Un(o),u=Un(i),f=mi.useRef(null),d=Ke(e,m=>l(m)),h=mi.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;mi.useEffect(()=>{if(r){let x=function(w){if(h.paused||!a)return;let I=w.target;a.contains(I)?f.current=I:Zl(f.current,{select:!0})},v=function(w){if(h.paused||!a)return;let I=w.relatedTarget;I!==null&&(a.contains(I)||Zl(f.current,{select:!0}))},b=function(w){if(document.activeElement===document.body)for(let C of w)C.removedNodes.length>0&&Zl(a)};var m=x,g=v,y=b;document.addEventListener("focusin",x),document.addEventListener("focusout",v);let S=new MutationObserver(b);return a&&S.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",v),S.disconnect()}}},[r,a,h.paused]),mi.useEffect(()=>{if(a){WU.add(h);let m=document.activeElement;if(!a.contains(m)){let y=new CustomEvent(r1,qU);a.addEventListener(r1,c),a.dispatchEvent(y),y.defaultPrevented||(Zue(ofe(GU(a)),{select:!0}),document.activeElement===m&&Zl(a))}return()=>{a.removeEventListener(r1,c),setTimeout(()=>{let y=new CustomEvent(o1,qU);a.addEventListener(o1,u),a.dispatchEvent(y),y.defaultPrevented||Zl(m??document.body,{select:!0}),a.removeEventListener(o1,u),WU.remove(h)},0)}}},[a,c,u,h]);let p=mi.useCallback(m=>{if(!n&&!r||h.paused)return;let g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(g&&y){let x=m.currentTarget,[v,b]=efe(x);v&&b?!m.shiftKey&&y===b?(m.preventDefault(),n&&Zl(v,{select:!0})):m.shiftKey&&y===v&&(m.preventDefault(),n&&Zl(b,{select:!0})):y===x&&m.preventDefault()}},[n,r,h.paused]);return Xue(Oe.div,{tabIndex:-1,...s,ref:d,onKeyDown:p})});Uu.displayName=Jue;function Zue(t,{select:e=!1}={}){let n=document.activeElement;for(let r of t)if(Zl(r,{select:e}),document.activeElement!==n)return}function efe(t){let e=GU(t),n=UU(e,t),r=UU(e.reverse(),t);return[n,r]}function GU(t){let e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{let o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function UU(t,e){for(let n of t)if(!tfe(n,{upTo:e}))return n}function tfe(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function nfe(t){return t instanceof HTMLInputElement&&"select"in t}function Zl(t,{select:e=!1}={}){if(t&&t.focus){let n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&nfe(t)&&e&&t.select()}}var WU=rfe();function rfe(){let t=[];return{add(e){let n=t[0];e!==n&&n?.pause(),t=$U(t,e),t.unshift(e)},remove(e){t=$U(t,e),t[0]?.resume()}}}function $U(t,e){let n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function ofe(t){return t.filter(e=>e.tagName!=="A")}import*as i1 from"react";import*as KU from"react";var dn=globalThis?.document?KU.useLayoutEffect:()=>{};var ife=i1[" useId ".trim().toString()]||(()=>{}),sfe=0;function zr(t){let[e,n]=i1.useState(ife());return dn(()=>{t||n(r=>r??String(sfe++))},[t]),t||(e?`radix-${e}`:"")}import*as Co from"react";var QU=["top","right","bottom","left"];var Us=Math.min,no=Math.max,tx=Math.round,nx=Math.floor,ji=t=>({x:t,y:t}),afe={left:"right",right:"left",bottom:"top",top:"bottom"},lfe={start:"end",end:"start"};function MS(t,e,n){return no(t,Us(e,n))}function Ws(t,e){return typeof t=="function"?t(e):t}function $s(t){return t.split("-")[0]}function Wu(t){return t.split("-")[1]}function PS(t){return t==="x"?"y":"x"}function LS(t){return t==="y"?"height":"width"}var cfe=new Set(["top","bottom"]);function Yi(t){return cfe.has($s(t))?"y":"x"}function TS(t){return PS(Yi(t))}function XU(t,e,n){n===void 0&&(n=!1);let r=Wu(t),o=TS(t),i=LS(o),s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=ex(s)),[s,ex(s)]}function JU(t){let e=ex(t);return[RS(t),e,RS(e)]}function RS(t){return t.replace(/start|end/g,e=>lfe[e])}var jU=["left","right"],YU=["right","left"],ufe=["top","bottom"],ffe=["bottom","top"];function dfe(t,e,n){switch(t){case"top":case"bottom":return n?e?YU:jU:e?jU:YU;case"left":case"right":return e?ufe:ffe;default:return[]}}function ZU(t,e,n,r){let o=Wu(t),i=dfe($s(t),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),e&&(i=i.concat(i.map(RS)))),i}function ex(t){return t.replace(/left|right|bottom|top/g,e=>afe[e])}function hfe(t){return{top:0,right:0,bottom:0,left:0,...t}}function s1(t){return typeof t!="number"?hfe(t):{top:t,right:t,bottom:t,left:t}}function $u(t){let{x:e,y:n,width:r,height:o}=t;return{width:r,height:o,top:n,left:e,right:e+r,bottom:n+o,x:e,y:n}}function eW(t,e,n){let{reference:r,floating:o}=t,i=Yi(e),s=TS(e),a=LS(s),l=$s(e),c=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2,h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(Wu(e)){case"start":h[s]-=d*(n&&c?-1:1);break;case"end":h[s]+=d*(n&&c?-1:1);break}return h}async function rW(t,e){var n;e===void 0&&(e={});let{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=Ws(e,t),p=s1(h),g=a[d?f==="floating"?"reference":"floating":f],y=$u(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),x=f==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),b=await(i.isElement==null?void 0:i.isElement(v))?await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1}:{x:1,y:1},S=$u(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:v,strategy:l}):x);return{top:(y.top-S.top+p.top)/b.y,bottom:(S.bottom-y.bottom+p.bottom)/b.y,left:(y.left-S.left+p.left)/b.x,right:(S.right-y.right+p.right)/b.x}}var oW=async(t,e,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e)),c=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:u,y:f}=eW(c,r,l),d=r,h={},p=0;for(let g=0;g<a.length;g++){var m;let{name:y,fn:x}=a[g],{x:v,y:b,data:S,reset:w}=await x({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:h,rects:c,platform:{...s,detectOverflow:(m=s.detectOverflow)!=null?m:rW},elements:{reference:t,floating:e}});u=v??u,f=b??f,h={...h,[y]:{...h[y],...S}},w&&p<=50&&(p++,typeof w=="object"&&(w.placement&&(d=w.placement),w.rects&&(c=w.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:o}):w.rects),{x:u,y:f}=eW(c,d,l)),g=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:h}},iW=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=Ws(t,e)||{};if(c==null)return{};let f=s1(u),d={x:n,y:r},h=TS(o),p=LS(h),m=await s.getDimensions(c),g=h==="y",y=g?"top":"left",x=g?"bottom":"right",v=g?"clientHeight":"clientWidth",b=i.reference[p]+i.reference[h]-d[h]-i.floating[p],S=d[h]-i.reference[h],w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c)),I=w?w[v]:0;(!I||!await(s.isElement==null?void 0:s.isElement(w)))&&(I=a.floating[v]||i.floating[p]);let C=b/2-S/2,k=I/2-m[p]/2-1,P=Us(f[y],k),E=Us(f[x],k),O=P,A=I-m[p]-E,R=I/2-m[p]/2+C,N=MS(O,R,A),T=!l.arrow&&Wu(o)!=null&&R!==N&&i.reference[p]/2-(R<O?P:E)-m[p]/2<0,_=T?R<O?R-O:R-A:0;return{[h]:d[h]+_,data:{[h]:N,centerOffset:R-N-_,...T&&{alignmentOffset:_}},reset:T}}});var sW=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;let{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=Ws(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let y=$s(o),x=Yi(a),v=$s(a)===a,b=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=d||(v||!m?[ex(a)]:JU(a)),w=p!=="none";!d&&w&&S.push(...ZU(a,m,p,b));let I=[a,...S],C=await l.detectOverflow(e,g),k=[],P=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&k.push(C[y]),f){let R=XU(o,s,b);k.push(C[R[0]],C[R[1]])}if(P=[...P,{placement:o,overflows:k}],!k.every(R=>R<=0)){var E,O;let R=(((E=i.flip)==null?void 0:E.index)||0)+1,N=I[R];if(N&&(!(f==="alignment"?x!==Yi(N):!1)||P.every(L=>Yi(L.placement)===x?L.overflows[0]>0:!0)))return{data:{index:R,overflows:P},reset:{placement:N}};let T=(O=P.filter(_=>_.overflows[0]<=0).sort((_,L)=>_.overflows[1]-L.overflows[1])[0])==null?void 0:O.placement;if(!T)switch(h){case"bestFit":{var A;let _=(A=P.filter(L=>{if(w){let M=Yi(L.placement);return M===x||M==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(M=>M>0).reduce((M,D)=>M+D,0)]).sort((L,M)=>L[1]-M[1])[0])==null?void 0:A[0];_&&(T=_);break}case"initialPlacement":T=a;break}if(o!==T)return{reset:{placement:T}}}return{}}}};function tW(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function nW(t){return QU.some(e=>t[e]>=0)}var aW=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:n,platform:r}=e,{strategy:o="referenceHidden",...i}=Ws(t,e);switch(o){case"referenceHidden":{let s=await r.detectOverflow(e,{...i,elementContext:"reference"}),a=tW(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:nW(a)}}}case"escaped":{let s=await r.detectOverflow(e,{...i,altBoundary:!0}),a=tW(s,n.floating);return{data:{escapedOffsets:a,escaped:nW(a)}}}default:return{}}}}};var lW=new Set(["left","top"]);async function pfe(t,e){let{placement:n,platform:r,elements:o}=t,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=$s(n),a=Wu(n),l=Yi(n)==="y",c=lW.has(s)?-1:1,u=i&&l?-1:1,f=Ws(e,t),{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*u,y:d*c}:{x:d*c,y:h*u}}var cW=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;let{x:o,y:i,placement:s,middlewareData:a}=e,l=await pfe(e,t);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},uW=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:r,placement:o,platform:i}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:y=>{let{x,y:v}=y;return{x,y:v}}},...c}=Ws(t,e),u={x:n,y:r},f=await i.detectOverflow(e,c),d=Yi($s(o)),h=PS(d),p=u[h],m=u[d];if(s){let y=h==="y"?"top":"left",x=h==="y"?"bottom":"right",v=p+f[y],b=p-f[x];p=MS(v,p,b)}if(a){let y=d==="y"?"top":"left",x=d==="y"?"bottom":"right",v=m+f[y],b=m-f[x];m=MS(v,m,b)}let g=l.fn({...e,[h]:p,[d]:m});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[h]:s,[d]:a}}}}}},fW=function(t){return t===void 0&&(t={}),{options:t,fn(e){let{x:n,y:r,placement:o,rects:i,middlewareData:s}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Ws(t,e),u={x:n,y:r},f=Yi(o),d=PS(f),h=u[d],p=u[f],m=Ws(a,e),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let v=d==="y"?"height":"width",b=i.reference[d]-i.floating[v]+g.mainAxis,S=i.reference[d]+i.reference[v]-g.mainAxis;h<b?h=b:h>S&&(h=S)}if(c){var y,x;let v=d==="y"?"width":"height",b=lW.has($s(o)),S=i.reference[f]-i.floating[v]+(b&&((y=s.offset)==null?void 0:y[f])||0)+(b?0:g.crossAxis),w=i.reference[f]+i.reference[v]+(b?0:((x=s.offset)==null?void 0:x[f])||0)-(b?g.crossAxis:0);p<S?p=S:p>w&&(p=w)}return{[d]:h,[f]:p}}}},dW=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;let{placement:o,rects:i,platform:s,elements:a}=e,{apply:l=()=>{},...c}=Ws(t,e),u=await s.detectOverflow(e,c),f=$s(o),d=Wu(o),h=Yi(o)==="y",{width:p,height:m}=i.floating,g,y;f==="top"||f==="bottom"?(g=f,y=d===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=f,g=d==="end"?"top":"bottom");let x=m-u.top-u.bottom,v=p-u.left-u.right,b=Us(m-u[g],x),S=Us(p-u[y],v),w=!e.middlewareData.shift,I=b,C=S;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(C=v),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(I=x),w&&!d){let P=no(u.left,0),E=no(u.right,0),O=no(u.top,0),A=no(u.bottom,0);h?C=p-2*(P!==0||E!==0?P+E:no(u.left,u.right)):I=m-2*(O!==0||A!==0?O+A:no(u.top,u.bottom))}await l({...e,availableWidth:C,availableHeight:I});let k=await s.getDimensions(a.floating);return p!==k.width||m!==k.height?{reset:{rects:!0}}:{}}}};function ES(){return typeof window<"u"}function Ku(t){return pW(t)?(t.nodeName||"").toLowerCase():"#document"}function So(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Qi(t){var e;return(e=(pW(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function pW(t){return ES()?t instanceof Node||t instanceof So(t).Node:!1}function gi(t){return ES()?t instanceof Element||t instanceof So(t).Element:!1}function Xi(t){return ES()?t instanceof HTMLElement||t instanceof So(t).HTMLElement:!1}function hW(t){return!ES()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof So(t).ShadowRoot}var mfe=new Set(["inline","contents"]);function Eh(t){let{overflow:e,overflowX:n,overflowY:r,display:o}=yi(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!mfe.has(o)}var gfe=new Set(["table","td","th"]);function mW(t){return gfe.has(Ku(t))}var yfe=[":popover-open",":modal"];function rx(t){return yfe.some(e=>{try{return t.matches(e)}catch{return!1}})}var xfe=["transform","translate","scale","rotate","perspective"],vfe=["transform","translate","scale","rotate","perspective","filter"],bfe=["paint","layout","strict","content"];function AS(t){let e=DS(),n=gi(t)?yi(t):t;return xfe.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||vfe.some(r=>(n.willChange||"").includes(r))||bfe.some(r=>(n.contain||"").includes(r))}function gW(t){let e=qa(t);for(;Xi(e)&&!ju(e);){if(AS(e))return e;if(rx(e))return null;e=qa(e)}return null}function DS(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var wfe=new Set(["html","body","#document"]);function ju(t){return wfe.has(Ku(t))}function yi(t){return So(t).getComputedStyle(t)}function ox(t){return gi(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function qa(t){if(Ku(t)==="html")return t;let e=t.assignedSlot||t.parentNode||hW(t)&&t.host||Qi(t);return hW(e)?e.host:e}function yW(t){let e=qa(t);return ju(e)?t.ownerDocument?t.ownerDocument.body:t.body:Xi(e)&&Eh(e)?e:yW(e)}function Gu(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);let o=yW(t),i=o===((r=t.ownerDocument)==null?void 0:r.body),s=So(o);if(i){let a=OS(s);return e.concat(s,s.visualViewport||[],Eh(o)?o:[],a&&n?Gu(a):[])}return e.concat(o,Gu(o,[],n))}function OS(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function wW(t){let e=yi(t),n=parseFloat(e.width)||0,r=parseFloat(e.height)||0,o=Xi(t),i=o?t.offsetWidth:n,s=o?t.offsetHeight:r,a=tx(n)!==i||tx(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function l1(t){return gi(t)?t:t.contextElement}function Ah(t){let e=l1(t);if(!Xi(e))return ji(1);let n=e.getBoundingClientRect(),{width:r,height:o,$:i}=wW(e),s=(i?tx(n.width):n.width)/r,a=(i?tx(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Sfe=ji(0);function SW(t){let e=So(t);return!DS()||!e.visualViewport?Sfe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Cfe(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==So(t)?!1:e}function Yu(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);let o=t.getBoundingClientRect(),i=l1(t),s=ji(1);e&&(r?gi(r)&&(s=Ah(r)):s=Ah(t));let a=Cfe(i,n,r)?SW(i):ji(0),l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(i){let d=So(i),h=r&&gi(r)?So(r):r,p=d,m=OS(p);for(;m&&r&&h!==p;){let g=Ah(m),y=m.getBoundingClientRect(),x=yi(m),v=y.left+(m.clientLeft+parseFloat(x.paddingLeft))*g.x,b=y.top+(m.clientTop+parseFloat(x.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,f*=g.y,l+=v,c+=b,p=So(m),m=OS(p)}}return $u({width:u,height:f,x:l,y:c})}function _S(t,e){let n=ox(t).scrollLeft;return e?e.left+n:Yu(Qi(t)).left+n}function CW(t,e){let n=t.getBoundingClientRect(),r=n.left+e.scrollLeft-_S(t,n),o=n.top+e.scrollTop;return{x:r,y:o}}function Ife(t){let{elements:e,rect:n,offsetParent:r,strategy:o}=t,i=o==="fixed",s=Qi(r),a=e?rx(e.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=ji(1),u=ji(0),f=Xi(r);if((f||!f&&!i)&&((Ku(r)!=="body"||Eh(s))&&(l=ox(r)),Xi(r))){let h=Yu(r);c=Ah(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}let d=s&&!f&&!i?CW(s,l):ji(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:n.y*c.y-l.scrollTop*c.y+u.y+d.y}}function kfe(t){return Array.from(t.getClientRects())}function Rfe(t){let e=Qi(t),n=ox(t),r=t.ownerDocument.body,o=no(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=no(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),s=-n.scrollLeft+_S(t),a=-n.scrollTop;return yi(r).direction==="rtl"&&(s+=no(e.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}var xW=25;function Mfe(t,e){let n=So(t),r=Qi(t),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;let u=DS();(!u||u&&e==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}let c=_S(r);if(c<=0){let u=r.ownerDocument,f=u.body,d=getComputedStyle(f),h=u.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,p=Math.abs(r.clientWidth-f.clientWidth-h);p<=xW&&(i-=p)}else c<=xW&&(i+=c);return{width:i,height:s,x:a,y:l}}var Pfe=new Set(["absolute","fixed"]);function Lfe(t,e){let n=Yu(t,!0,e==="fixed"),r=n.top+t.clientTop,o=n.left+t.clientLeft,i=Xi(t)?Ah(t):ji(1),s=t.clientWidth*i.x,a=t.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function vW(t,e,n){let r;if(e==="viewport")r=Mfe(t,n);else if(e==="document")r=Rfe(Qi(t));else if(gi(e))r=Lfe(e,n);else{let o=SW(t);r={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return $u(r)}function IW(t,e){let n=qa(t);return n===e||!gi(n)||ju(n)?!1:yi(n).position==="fixed"||IW(n,e)}function Tfe(t,e){let n=e.get(t);if(n)return n;let r=Gu(t,[],!1).filter(a=>gi(a)&&Ku(a)!=="body"),o=null,i=yi(t).position==="fixed",s=i?qa(t):t;for(;gi(s)&&!ju(s);){let a=yi(s),l=AS(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&Pfe.has(o.position)||Eh(s)&&!l&&IW(t,s))?r=r.filter(u=>u!==s):o=a,s=qa(s)}return e.set(t,r),r}function Efe(t){let{element:e,boundary:n,rootBoundary:r,strategy:o}=t,s=[...n==="clippingAncestors"?rx(e)?[]:Tfe(e,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{let f=vW(e,u,o);return c.top=no(f.top,c.top),c.right=Us(f.right,c.right),c.bottom=Us(f.bottom,c.bottom),c.left=no(f.left,c.left),c},vW(e,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Afe(t){let{width:e,height:n}=wW(t);return{width:e,height:n}}function Dfe(t,e,n){let r=Xi(e),o=Qi(e),i=n==="fixed",s=Yu(t,!0,i,e),a={scrollLeft:0,scrollTop:0},l=ji(0);function c(){l.x=_S(o)}if(r||!r&&!i)if((Ku(e)!=="body"||Eh(o))&&(a=ox(e)),r){let h=Yu(e,!0,i,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else o&&c();i&&!r&&o&&c();let u=o&&!r&&!i?CW(o,a):ji(0),f=s.left+a.scrollLeft-l.x-u.x,d=s.top+a.scrollTop-l.y-u.y;return{x:f,y:d,width:s.width,height:s.height}}function a1(t){return yi(t).position==="static"}function bW(t,e){if(!Xi(t)||yi(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Qi(t)===n&&(n=n.ownerDocument.body),n}function kW(t,e){let n=So(t);if(rx(t))return n;if(!Xi(t)){let o=qa(t);for(;o&&!ju(o);){if(gi(o)&&!a1(o))return o;o=qa(o)}return n}let r=bW(t,e);for(;r&&mW(r)&&a1(r);)r=bW(r,e);return r&&ju(r)&&a1(r)&&!AS(r)?n:r||gW(t)||n}var Ofe=async function(t){let e=this.getOffsetParent||kW,n=this.getDimensions,r=await n(t.floating);return{reference:Dfe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function _fe(t){return yi(t).direction==="rtl"}var RW={convertOffsetParentRelativeRectToViewportRelativeRect:Ife,getDocumentElement:Qi,getClippingRect:Efe,getOffsetParent:kW,getElementRects:Ofe,getClientRects:kfe,getDimensions:Afe,getScale:Ah,isElement:gi,isRTL:_fe};function MW(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Nfe(t,e){let n=null,r,o=Qi(t);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();let c=t.getBoundingClientRect(),{left:u,top:f,width:d,height:h}=c;if(a||e(),!d||!h)return;let p=nx(f),m=nx(o.clientWidth-(u+d)),g=nx(o.clientHeight-(f+h)),y=nx(u),v={rootMargin:-p+"px "+-m+"px "+-g+"px "+-y+"px",threshold:no(0,Us(1,l))||1},b=!0;function S(w){let I=w[0].intersectionRatio;if(I!==l){if(!b)return s();I?s(!1,I):r=setTimeout(()=>{s(!1,1e-7)},1e3)}I===1&&!MW(c,t.getBoundingClientRect())&&s(),b=!1}try{n=new IntersectionObserver(S,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,v)}n.observe(t)}return s(!0),i}function c1(t,e,n,r){r===void 0&&(r={});let{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=l1(t),u=o||i?[...c?Gu(c):[],...Gu(e)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});let f=c&&a?Nfe(c,n):null,d=-1,h=null;s&&(h=new ResizeObserver(y=>{let[x]=y;x&&x.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var v;(v=h)==null||v.observe(e)})),n()}),c&&!l&&h.observe(c),h.observe(e));let p,m=l?Yu(t):null;l&&g();function g(){let y=Yu(t);m&&!MW(m,y)&&n(),m=y,p=requestAnimationFrame(g)}return n(),()=>{var y;u.forEach(x=>{o&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),f?.(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(p)}}var PW=cW;var LW=uW,TW=sW,EW=dW,AW=aW,u1=iW;var DW=fW,f1=(t,e,n)=>{let r=new Map,o={platform:RW,...n},i={...o.platform,_c:r};return oW(t,e,{...o,platform:i})};import*as Wn from"react";import{useLayoutEffect as Ffe}from"react";import*as _W from"react-dom";var Bfe=typeof document<"u",Vfe=function(){},NS=Bfe?Ffe:Vfe;function FS(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,o;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!FS(t[r],e[r]))return!1;return!0}if(o=Object.keys(t),n=o.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,o[r]))return!1;for(r=n;r--!==0;){let i=o[r];if(!(i==="_owner"&&t.$$typeof)&&!FS(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function NW(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function OW(t,e){let n=NW(t);return Math.round(e*n)/n}function d1(t){let e=Wn.useRef(t);return NS(()=>{e.current=t}),e}function FW(t){t===void 0&&(t={});let{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,f]=Wn.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=Wn.useState(r);FS(d,r)||h(r);let[p,m]=Wn.useState(null),[g,y]=Wn.useState(null),x=Wn.useCallback(L=>{L!==w.current&&(w.current=L,m(L))},[]),v=Wn.useCallback(L=>{L!==I.current&&(I.current=L,y(L))},[]),b=i||p,S=s||g,w=Wn.useRef(null),I=Wn.useRef(null),C=Wn.useRef(u),k=l!=null,P=d1(l),E=d1(o),O=d1(c),A=Wn.useCallback(()=>{if(!w.current||!I.current)return;let L={placement:e,strategy:n,middleware:d};E.current&&(L.platform=E.current),f1(w.current,I.current,L).then(M=>{let D={...M,isPositioned:O.current!==!1};R.current&&!FS(C.current,D)&&(C.current=D,_W.flushSync(()=>{f(D)}))})},[d,e,n,E,O]);NS(()=>{c===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,f(L=>({...L,isPositioned:!1})))},[c]);let R=Wn.useRef(!1);NS(()=>(R.current=!0,()=>{R.current=!1}),[]),NS(()=>{if(b&&(w.current=b),S&&(I.current=S),b&&S){if(P.current)return P.current(b,S,A);A()}},[b,S,A,P,k]);let N=Wn.useMemo(()=>({reference:w,floating:I,setReference:x,setFloating:v}),[x,v]),T=Wn.useMemo(()=>({reference:b,floating:S}),[b,S]),_=Wn.useMemo(()=>{let L={position:n,left:0,top:0};if(!T.floating)return L;let M=OW(T.floating,u.x),D=OW(T.floating,u.y);return a?{...L,transform:"translate("+M+"px, "+D+"px)",...NW(T.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:M,top:D}},[n,a,T.floating,u.x,u.y]);return Wn.useMemo(()=>({...u,update:A,refs:N,elements:T,floatingStyles:_}),[u,A,N,T,_])}var zfe=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){let{element:r,padding:o}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?u1({element:r.current,padding:o}).fn(n):{}:r?u1({element:r,padding:o}).fn(n):{}}}},BW=(t,e)=>({...PW(t),options:[t,e]}),VW=(t,e)=>({...LW(t),options:[t,e]}),zW=(t,e)=>({...DW(t),options:[t,e]}),HW=(t,e)=>({...TW(t),options:[t,e]}),qW=(t,e)=>({...EW(t),options:[t,e]});var UW=(t,e)=>({...AW(t),options:[t,e]});var WW=(t,e)=>({...zfe(t),options:[t,e]});import*as GW from"react";import{jsx as $W}from"react/jsx-runtime";var Hfe="Arrow",KW=GW.forwardRef((t,e)=>{let{children:n,width:r=10,height:o=5,...i}=t;return $W(Oe.svg,{...i,ref:e,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:$W("polygon",{points:"0,0 30,0 15,10"})})});KW.displayName=Hfe;var jW=KW;import*as YW from"react";function BS(t){let[e,n]=YW.useState(void 0);return dn(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});let r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;let i=o[0],s,a;if("borderBoxSize"in i){let l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;s=c.inlineSize,a=c.blockSize}else s=t.offsetWidth,a=t.offsetHeight;n({width:s,height:a})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}import{jsx as Qu}from"react/jsx-runtime";var h1="Popper",[QW,xi]=qn(h1),[Ufe,XW]=QW(h1),JW=t=>{let{__scopePopper:e,children:n}=t,[r,o]=Co.useState(null);return Qu(Ufe,{scope:e,anchor:r,onAnchorChange:o,children:n})};JW.displayName=h1;var ZW="PopperAnchor",e$=Co.forwardRef((t,e)=>{let{__scopePopper:n,virtualRef:r,...o}=t,i=XW(ZW,n),s=Co.useRef(null),a=Ke(e,s),l=Co.useRef(null);return Co.useEffect(()=>{let c=l.current;l.current=r?.current||s.current,c!==l.current&&i.onAnchorChange(l.current)}),r?null:Qu(Oe.div,{...o,ref:a})});e$.displayName=ZW;var p1="PopperContent",[Wfe,$fe]=QW(p1),t$=Co.forwardRef((t,e)=>{let{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:d=!1,updatePositionStrategy:h="optimized",onPlaced:p,...m}=t,g=XW(p1,n),[y,x]=Co.useState(null),v=Ke(e,z=>x(z)),[b,S]=Co.useState(null),w=BS(b),I=w?.width??0,C=w?.height??0,k=r+(i!=="center"?"-"+i:""),P=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},E=Array.isArray(c)?c:[c],O=E.length>0,A={padding:P,boundary:E.filter(Kfe),altBoundary:O},{refs:R,floatingStyles:N,placement:T,isPositioned:_,middlewareData:L}=FW({strategy:"fixed",placement:k,whileElementsMounted:(...z)=>c1(...z,{animationFrame:h==="always"}),elements:{reference:g.anchor},middleware:[BW({mainAxis:o+C,alignmentAxis:s}),l&&VW({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?zW():void 0,...A}),l&&HW({...A}),qW({...A,apply:({elements:z,rects:Y,availableWidth:J,availableHeight:j})=>{let{width:de,height:ie}=Y.reference,Ee=z.floating.style;Ee.setProperty("--radix-popper-available-width",`${J}px`),Ee.setProperty("--radix-popper-available-height",`${j}px`),Ee.setProperty("--radix-popper-anchor-width",`${de}px`),Ee.setProperty("--radix-popper-anchor-height",`${ie}px`)}}),b&&WW({element:b,padding:a}),jfe({arrowWidth:I,arrowHeight:C}),d&&UW({strategy:"referenceHidden",...A})]}),[M,D]=o$(T),B=Un(p);dn(()=>{_&&B?.()},[_,B]);let V=L.arrow?.x,H=L.arrow?.y,U=L.arrow?.centerOffset!==0,[F,q]=Co.useState();return dn(()=>{y&&q(window.getComputedStyle(y).zIndex)},[y]),Qu("div",{ref:R.setFloating,"data-radix-popper-content-wrapper":"",style:{...N,transform:_?N.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:F,"--radix-popper-transform-origin":[L.transformOrigin?.x,L.transformOrigin?.y].join(" "),...L.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:Qu(Wfe,{scope:n,placedSide:M,onArrowChange:S,arrowX:V,arrowY:H,shouldHideArrow:U,children:Qu(Oe.div,{"data-side":M,"data-align":D,...m,ref:v,style:{...m.style,animation:_?void 0:"none"}})})})});t$.displayName=p1;var n$="PopperArrow",Gfe={top:"bottom",right:"left",bottom:"top",left:"right"},r$=Co.forwardRef(function(e,n){let{__scopePopper:r,...o}=e,i=$fe(n$,r),s=Gfe[i.placedSide];return Qu("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:Qu(jW,{...o,ref:n,style:{...o.style,display:"block"}})})});r$.displayName=n$;function Kfe(t){return t!==null}var jfe=t=>({name:"transformOrigin",options:t,fn(e){let{placement:n,rects:r,middlewareData:o}=e,s=o.arrow?.centerOffset!==0,a=s?0:t.arrowWidth,l=s?0:t.arrowHeight,[c,u]=o$(n),f={start:"0%",center:"50%",end:"100%"}[u],d=(o.arrow?.x??0)+a/2,h=(o.arrow?.y??0)+l/2,p="",m="";return c==="bottom"?(p=s?f:`${d}px`,m=`${-l}px`):c==="top"?(p=s?f:`${d}px`,m=`${r.floating.height+l}px`):c==="right"?(p=`${-l}px`,m=s?f:`${h}px`):c==="left"&&(p=`${r.floating.width+l}px`,m=s?f:`${h}px`),{data:{x:p,y:m}}}});function o$(t){let[e,n="center"]=t.split("-");return[e,n]}var Ua=JW,Wa=e$,ec=t$,tc=r$;import*as zS from"react";import Yfe from"react-dom";import{jsx as Qfe}from"react/jsx-runtime";var Xfe="Portal",$a=zS.forwardRef((t,e)=>{let{container:n,...r}=t,[o,i]=zS.useState(!1);dn(()=>i(!0),[]);let s=n||o&&globalThis?.document?.body;return s?Yfe.createPortal(Qfe(Oe.div,{...r,ref:e}),s):null});$a.displayName=Xfe;import*as vi from"react";import*as HS from"react";var Jfe=vi[" useInsertionEffect ".trim().toString()]||dn;function ro({prop:t,defaultProp:e,onChange:n=()=>{},caller:r}){let[o,i,s]=Zfe({defaultProp:e,onChange:n}),a=t!==void 0,l=a?t:o;{let u=vi.useRef(t!==void 0);vi.useEffect(()=>{let f=u.current;f!==a&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,r])}let c=vi.useCallback(u=>{if(a){let f=ede(u)?u(t):u;f!==t&&s.current?.(f)}else i(u)},[a,t,i,s]);return[l,c]}function Zfe({defaultProp:t,onChange:e}){let[n,r]=vi.useState(t),o=vi.useRef(n),i=vi.useRef(e);return Jfe(()=>{i.current=e},[e]),vi.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function ede(t){return typeof t=="function"}import*as qS from"react";function US(t){let e=qS.useRef({value:t,previous:t});return qS.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}import*as i$ from"react";import{jsx as tde}from"react/jsx-runtime";var m1=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),nde="VisuallyHidden",s$=i$.forwardRef((t,e)=>tde(Oe.span,{...t,ref:e,style:{...m1,...t.style}}));s$.displayName=nde;var a$=s$;var ode=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Dh=new WeakMap,WS=new WeakMap,$S={},g1=0,l$=function(t){return t&&(t.host||l$(t.parentNode))},ide=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=l$(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},sde=function(t,e,n,r){var o=ide(e,Array.isArray(t)?t:[t]);$S[n]||($S[n]=new WeakMap);var i=$S[n],s=[],a=new Set,l=new Set(o),c=function(f){!f||a.has(f)||(a.add(f),c(f.parentNode))};o.forEach(c);var u=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(d){if(a.has(d))u(d);else try{var h=d.getAttribute(r),p=h!==null&&h!=="false",m=(Dh.get(d)||0)+1,g=(i.get(d)||0)+1;Dh.set(d,m),i.set(d,g),s.push(d),m===1&&p&&WS.set(d,!0),g===1&&d.setAttribute(n,"true"),p||d.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",d,y)}})};return u(e),a.clear(),g1++,function(){s.forEach(function(f){var d=Dh.get(f)-1,h=i.get(f)-1;Dh.set(f,d),i.set(f,h),d||(WS.has(f)||f.removeAttribute(r),WS.delete(f)),h||f.removeAttribute(n)}),g1--,g1||(Dh=new WeakMap,Dh=new WeakMap,WS=new WeakMap,$S={})}},Oh=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),o=e||ode(t);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),sde(r,o,n,"aria-hidden")):function(){return null}};var Io=function(){return Io=Object.assign||function(e){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Io.apply(this,arguments)};function GS(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n}function c$(t,e,n){if(n||arguments.length===2)for(var r=0,o=e.length,i;r<o;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}import*as XS from"react";import*as Hr from"react";var Xu="right-scroll-bar-position",Ju="width-before-scroll-bar",y1="with-scroll-bars-hidden",x1="--removed-body-scroll-bar-size";function KS(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}import{useState as ade}from"react";function u$(t,e){var n=ade(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=e,n.facade}import*as jS from"react";var lde=typeof window<"u"?jS.useLayoutEffect:jS.useEffect,f$=new WeakMap;function v1(t,e){var n=u$(e||null,function(r){return t.forEach(function(o){return KS(o,r)})});return lde(function(){var r=f$.get(n);if(r){var o=new Set(r),i=new Set(t),s=n.current;o.forEach(function(a){i.has(a)||KS(a,null)}),i.forEach(function(a){o.has(a)||KS(a,s)})}f$.set(n,t)},[t]),n}function cde(t){return t}function ude(t,e){e===void 0&&(e=cde);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(i){var s=e(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var l=function(){var u=s;s=[],u.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){s.push(u),c()},filter:function(u){return s=s.filter(u),n}}}};return o}function b1(t){t===void 0&&(t={});var e=ude(null);return e.options=Io({async:!0,ssr:!1},t),e}import*as d$ from"react";var h$=function(t){var e=t.sideCar,n=GS(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return d$.createElement(r,Io({},n))};h$.isSideCarExport=!0;function w1(t,e){return t.useMedium(e),h$}var YS=b1();var S1=function(){},ix=Hr.forwardRef(function(t,e){var n=Hr.useRef(null),r=Hr.useState({onScrollCapture:S1,onWheelCapture:S1,onTouchMoveCapture:S1}),o=r[0],i=r[1],s=t.forwardProps,a=t.children,l=t.className,c=t.removeScrollBar,u=t.enabled,f=t.shards,d=t.sideCar,h=t.noRelative,p=t.noIsolation,m=t.inert,g=t.allowPinchZoom,y=t.as,x=y===void 0?"div":y,v=t.gapMode,b=GS(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=d,w=v1([n,e]),I=Io(Io({},b),o);return Hr.createElement(Hr.Fragment,null,u&&Hr.createElement(S,{sideCar:YS,removeScrollBar:c,shards:f,noRelative:h,noIsolation:p,inert:m,setCallbacks:i,allowPinchZoom:!!g,lockRef:n,gapMode:v}),s?Hr.cloneElement(Hr.Children.only(a),Io(Io({},I),{ref:w})):Hr.createElement(x,Io({},I,{className:l,ref:w}),a))});ix.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ix.classNames={fullWidth:Ju,zeroRight:Xu};import*as Qt from"react";import*as Nh from"react";import*as g$ from"react";var p$;var m$=function(){if(p$)return p$;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function fde(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=m$();return e&&t.setAttribute("nonce",e),t}function dde(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function hde(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var C1=function(){var t=0,e=null;return{add:function(n){t==0&&(e=fde())&&(dde(e,n),hde(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}};var I1=function(){var t=C1();return function(e,n){g$.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}};var sx=function(){var t=I1(),e=function(n){var r=n.styles,o=n.dynamic;return t(r,o),null};return e};var pde={left:0,top:0,right:0,gap:0},k1=function(t){return parseInt(t||"",10)||0},mde=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],o=e[t==="padding"?"paddingRight":"marginRight"];return[k1(n),k1(r),k1(o)]},R1=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return pde;var e=mde(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}};var gde=sx(),_h="data-scroll-locked",yde=function(t,e,n,r){var o=t.left,i=t.top,s=t.right,a=t.gap;return n===void 0&&(n="margin"),`
|
|
30
30
|
.`.concat(y1,` {
|
|
31
31
|
overflow: hidden `).concat(r,`;
|
|
32
32
|
padding-right: `).concat(a,"px ").concat(r,`;
|