obs-admin-dashboard 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +384 -0
- package/dist/obs-admin-dashboard.js +26439 -0
- package/dist/obs-admin-dashboard.umd.cjs +118 -0
- package/package.json +1 -1
- package/dist/Logo.svg +0 -9
- package/dist/assets/AdminLogList-BfZ7mBhN.js +0 -1
- package/dist/assets/AuditLogList-BxAcvoWb.js +0 -1
- package/dist/assets/PrivacyPolicy-CNCYcFG4.js +0 -1
- package/dist/assets/RichTextEditor-CAtXb3v9.js +0 -142
- package/dist/assets/SmtpSettings-JxQfk9ji.js +0 -1
- package/dist/assets/TermsAndConditions-DLe9KIOS.js +0 -1
- package/dist/assets/badge-Cs6Fs9eg.js +0 -1
- package/dist/assets/dm-sans-latin-ext-wght-normal-BOFOeGcA.woff2 +0 -0
- package/dist/assets/dm-sans-latin-wght-normal-Xz1IZZA0.woff2 +0 -0
- package/dist/assets/index-CfBF1H5J.css +0 -1
- package/dist/assets/index-au6lwlT0.js +0 -150
- package/dist/assets/useSettings-DO84-Dur.js +0 -1
- package/dist/index.html +0 -15
- package/dist/logo.png +0 -0
- package/dist/vite.svg +0 -1
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
(function(oe,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],g):(oe=typeof globalThis<"u"?globalThis:oe||self,g(oe.ObsAdminDashboard={},oe.jsxRuntime,oe.React,oe.ReactDOM))})(this,(function(oe,g,$,ic){"use strict";function _h(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const v=_h($),Ni=_h(ic);var Ho=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},JS=class extends Ho{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},ac=new JS,YS={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},QS=class{#e=YS;#t=!1;setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&this.#t&&e!==this.#e&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:this.#e,provider:e}),this.#e=e,process.env.NODE_ENV!=="production"&&(this.#t=!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&(this.#t=!0),this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&(this.#t=!0),this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},uo=new QS;function XS(e){setTimeout(e,0)}var ex=typeof window>"u"||"Deno"in globalThis;function jt(){}function tx(e,t){return typeof e=="function"?e(t):e}function lc(e){return typeof e=="number"&&e>=0&&e!==1/0}function Sh(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Lr(e,t){return typeof e=="function"?e(t):e}function An(e,t){return typeof e=="function"?e(t):e}function xh(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:l,stale:c}=e;if(l){if(r){if(t.queryHash!==cc(l,t.options))return!1}else if(!Is(t.queryKey,l))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||o&&o!==t.state.fetchStatus||i&&!i(t))}function Ch(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(fo(t.options.mutationKey)!==fo(i))return!1}else if(!Is(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function cc(e,t){return(t?.queryKeyHashFn||fo)(e)}function fo(e){return JSON.stringify(e,(t,n)=>dc(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Is(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Is(e[n],t[n])):!1}var nx=Object.prototype.hasOwnProperty;function uc(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=Eh(e)&&Eh(t);if(!r&&!(dc(e)&&dc(t)))return t;const i=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),c=l.length,d=r?new Array(c):{};let f=0;for(let p=0;p<c;p++){const h=r?p:l[p],y=e[h],w=t[h];if(y===w){d[h]=y,(r?p<i:nx.call(e,h))&&f++;continue}if(y===null||w===null||typeof y!="object"||typeof w!="object"){d[h]=w;continue}const b=uc(y,w,n+1);d[h]=b,b===y&&f++}return i===c&&f===i?e:d}function ki(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Eh(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function dc(e){if(!Ph(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Ph(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ph(e){return Object.prototype.toString.call(e)==="[object Object]"}function rx(e){return new Promise(t=>{uo.setTimeout(t,e)})}function fc(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return uc(e,t)}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 uc(e,t)}return t}function ox(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function sx(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Di=Symbol();function Ah(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Di&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Di?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function hc(e,t){return typeof e=="function"?e(...t):!!e}function ix(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var Ns=(()=>{let e=()=>ex;return{isServer(){return e()},setIsServer(t){e=t}}})();function pc(){let e,t;const n=new Promise((o,i)=>{e=o,t=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}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var ax=XS;function lx(){let e=[],t=0,n=c=>{c()},r=c=>{c()},o=ax;const i=c=>{t?e.push(c):o(()=>{n(c)})},l=()=>{const c=e;e=[],c.length&&o(()=>{r(()=>{c.forEach(d=>{n(d)})})})};return{batch:c=>{let d;t++;try{d=c()}finally{t--,t||l()}return d},batchCalls:c=>(...d)=>{i(()=>{c(...d)})},schedule:i,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{o=c}}}var Et=lx(),cx=class extends Ho{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Ri=new cx;function ux(e){return Math.min(1e3*2**e,3e4)}function Oh(e){return(e??"online")==="online"?Ri.isOnline():!0}var gc=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Th(e){let t=!1,n=0,r;const o=pc(),i=()=>o.status!=="pending",l=_=>{if(!i()){const x=new gc(_);y(x),e.onCancel?.(x)}},c=()=>{t=!0},d=()=>{t=!1},f=()=>ac.isFocused()&&(e.networkMode==="always"||Ri.isOnline())&&e.canRun(),p=()=>Oh(e.networkMode)&&e.canRun(),h=_=>{i()||(r?.(),o.resolve(_))},y=_=>{i()||(r?.(),o.reject(_))},w=()=>new Promise(_=>{r=x=>{(i()||f())&&_(x)},e.onPause?.()}).then(()=>{r=void 0,i()||e.onContinue?.()}),b=()=>{if(i())return;let _;const x=n===0?e.initialPromise:void 0;try{_=x??e.fn()}catch(E){_=Promise.reject(E)}Promise.resolve(_).then(h).catch(E=>{if(i())return;const A=e.retry??(Ns.isServer()?0:3),O=e.retryDelay??ux,N=typeof O=="function"?O(n,E):O,D=A===!0||typeof A=="number"&&n<A||typeof A=="function"&&A(n,E);if(t||!D){y(E);return}n++,e.onFail?.(n,E),rx(N).then(()=>f()?void 0:w()).then(()=>{t?y(E):b()})})};return{promise:o,status:()=>o.status,cancel:l,continue:()=>(r?.(),o),cancelRetry:c,continueRetry:d,canStart:p,start:()=>(p()?b():w().then(b),o)}}var Ih=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),lc(this.gcTime)&&(this.#e=uo.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ns.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e&&(uo.clearTimeout(this.#e),this.#e=void 0)}},dx=class extends Ih{#e;#t;#n;#o;#r;#i;#a;constructor(e){super(),this.#a=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#o=e.client,this.#n=this.#o.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Dh(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Dh(this.options);t.data!==void 0&&(this.setState(kh(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=fc(this.state.data,e,this.options);return this.#s({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#s({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(jt).catch(jt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>An(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Di||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Lr(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Sh(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#a?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const c=this.observers.find(d=>d.options.queryFn);c&&this.setOptions(c.options)}process.env.NODE_ENV!=="production"&&(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']"));const n=new AbortController,r=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},o=()=>{const c=Ah(this.options,t),f=(()=>{const p={client:this.#o,queryKey:this.queryKey,meta:this.meta};return r(p),p})();return this.#a=!1,this.options.persister?this.options.persister(c,f,this):c(f)},l=(()=>{const c={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:o};return r(c),c})();this.options.behavior?.onFetch(l,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#s({type:"fetch",meta:l.fetchOptions?.meta}),this.#r=Th({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:c=>{c instanceof gc&&c.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(c,d)=>{this.#s({type:"failed",failureCount:c,error:d})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{const c=await this.#r.start();if(c===void 0)throw process.env.NODE_ENV!=="production"&&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(c),this.#n.config.onSuccess?.(c,this),this.#n.config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof gc){if(c.silent)return this.#r.promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw this.#s({type:"error",error:c}),this.#n.config.onError?.(c,this),this.#n.config.onSettled?.(this.state.data,c,this),c}finally{this.scheduleGc()}}#s(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Nh(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...kh(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":const o=e.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,...e.state}}};this.state=t(this.state),Et.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function Nh(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Oh(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function kh(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Dh(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var fx=class extends Ho{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#a=pc(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#o=void 0;#r;#i;#a;#s;#g;#f;#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.#d():this.updateResult(),this.#w())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return mc(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return mc(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#_(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof An(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),t._defaulted&&!ki(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&Mh(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),r&&(this.#t!==n||An(this.options.enabled,this.#t)!==An(t.enabled,this.#t)||Lr(this.options.staleTime,this.#t)!==Lr(t.staleTime,this.#t))&&this.#m();const o=this.#v();r&&(this.#t!==n||An(this.options.enabled,this.#t)!==An(t.enabled,this.#t)||o!==this.#l)&&this.#y(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return px(this,n)&&(this.#o=n,this.#i=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#o}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#o))}#d(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(jt)),t}#m(){this.#b();const e=Lr(this.options.staleTime,this.#t);if(Ns.isServer()||this.#o.isStale||!lc(e))return;const n=Sh(this.#o.dataUpdatedAt,e)+1;this.#c=uo.setTimeout(()=>{this.#o.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#_(),this.#l=e,!(Ns.isServer()||An(this.options.enabled,this.#t)===!1||!lc(this.#l)||this.#l===0)&&(this.#u=uo.setInterval(()=>{(this.options.refetchIntervalInBackground||ac.isFocused())&&this.#d()},this.#l))}#w(){this.#m(),this.#y(this.#v())}#b(){this.#c&&(uo.clearTimeout(this.#c),this.#c=void 0)}#_(){this.#u&&(uo.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,r=this.options,o=this.#o,i=this.#r,l=this.#i,d=e!==n?e.state:this.#n,{state:f}=e;let p={...f},h=!1,y;if(t._optimisticResults){const L=this.hasListeners(),ee=!L&&Rh(e,t),le=L&&Mh(e,n,t,r);(ee||le)&&(p={...p,...Nh(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:w,errorUpdatedAt:b,status:_}=p;y=p.data;let x=!1;if(t.placeholderData!==void 0&&y===void 0&&_==="pending"){let L;o?.isPlaceholderData&&t.placeholderData===l?.placeholderData?(L=o.data,x=!0):L=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,L!==void 0&&(_="success",y=fc(o?.data,L,t),h=!0)}if(t.select&&y!==void 0&&!x)if(o&&y===i?.data&&t.select===this.#g)y=this.#f;else try{this.#g=t.select,y=t.select(y),y=fc(o?.data,y,t),this.#f=y,this.#s=null}catch(L){this.#s=L}this.#s&&(w=this.#s,y=this.#f,b=Date.now(),_="error");const E=p.fetchStatus==="fetching",A=_==="pending",O=_==="error",N=A&&E,D=y!==void 0,z={status:_,fetchStatus:p.fetchStatus,isPending:A,isSuccess:_==="success",isError:O,isInitialLoading:N,isLoading:N,data:y,dataUpdatedAt:p.dataUpdatedAt,error:w,errorUpdatedAt:b,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>d.dataUpdateCount||p.errorUpdateCount>d.errorUpdateCount,isFetching:E,isRefetching:E&&!A,isLoadingError:O&&!D,isPaused:p.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:O&&D,isStale:vc(e,t),refetch:this.refetch,promise:this.#a,isEnabled:An(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const L=z.data!==void 0,ee=z.status==="error"&&!L,le=Q=>{ee?Q.reject(z.error):L&&Q.resolve(z.data)},be=()=>{const Q=this.#a=z.promise=pc();le(Q)},J=this.#a;switch(J.status){case"pending":e.queryHash===n.queryHash&&le(J);break;case"fulfilled":(ee||z.data!==J.value)&&be();break;case"rejected":(!ee||z.error!==J.reason)&&be();break}}return z}updateResult(){const e=this.#o,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#i=this.options,this.#r.data!==void 0&&(this.#h=this.#t),ki(t,e))return;this.#o=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!this.#p.size)return!0;const i=new Set(o??this.#p);return this.options.throwOnError&&i.add("error"),Object.keys(this.#o).some(l=>{const c=l;return this.#o[c]!==e[c]&&i.has(c)})};this.#x({listeners:n()})}#S(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#w()}#x(e){Et.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#o)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function hx(e,t){return An(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Rh(e,t){return hx(e,t)||e.state.data!==void 0&&mc(e,t,t.refetchOnMount)}function mc(e,t,n){if(An(t.enabled,e)!==!1&&Lr(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&vc(e,t)}return!1}function Mh(e,t,n,r){return(e!==t||An(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&vc(e,n)}function vc(e,t){return An(t.enabled,e)!==!1&&e.isStaleByTime(Lr(t.staleTime,e))}function px(e,t){return!ki(e.getCurrentResult(),t)}function Fh(e){return{onFetch:(t,n)=>{const r=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let c={pages:[],pageParams:[]},d=0;const f=async()=>{let p=!1;const h=b=>{ix(b,()=>t.signal,()=>p=!0)},y=Ah(t.options,t.fetchOptions),w=async(b,_,x)=>{if(p)return Promise.reject();if(_==null&&b.pages.length)return Promise.resolve(b);const A=(()=>{const H={client:t.client,queryKey:t.queryKey,pageParam:_,direction:x?"backward":"forward",meta:t.options.meta};return h(H),H})(),O=await y(A),{maxPages:N}=t.options,D=x?sx:ox;return{pages:D(b.pages,O,N),pageParams:D(b.pageParams,_,N)}};if(o&&i.length){const b=o==="backward",_=b?gx:$h,x={pages:i,pageParams:l},E=_(r,x);c=await w(x,E,b)}else{const b=e??i.length;do{const _=d===0?l[0]??r.initialPageParam:$h(r,c);if(d>0&&_==null)break;c=await w(c,_),d++}while(d<b)}return c};t.options.persister?t.fetchFn=()=>t.options.persister?.(f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=f}}}function $h(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function gx(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var mx=class extends Ih{#e;#t;#n;#o;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Lh(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#o?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#o=Th({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(i,l)=>{this.#r({type:"failed",failureCount:i,error:l})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",o=!this.#o.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:o}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const l=await this.options.onMutate?.(e,n);l!==this.state.context&&this.#r({type:"pending",context:l,variables:e,isPaused:o})}const i=await this.#o.start();return await this.#n.config.onSuccess?.(i,e,this.state.context,this,n),await this.options.onSuccess?.(i,e,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,e,this.state.context,n),this.#r({type:"success",data:i}),i}catch(i){try{await this.#n.config.onError?.(i,e,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onError?.(i,e,this.state.context,n)}catch(l){Promise.reject(l)}try{await this.#n.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onSettled?.(void 0,i,e,this.state.context,n)}catch(l){Promise.reject(l)}throw this.#r({type:"error",error:i}),i}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Et.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function Lh(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var vx=class extends Ho{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new mx({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=Mi(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Mi(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Mi(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(o=>o.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=Mi(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Et.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Ch(t,n))}findAll(e={}){return this.getAll().filter(t=>Ch(e,t))}notify(e){Et.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Et.batch(()=>Promise.all(e.map(t=>t.continue().catch(jt))))}};function Mi(e){return e.options.scope?.id}var yx=class extends Ho{#e;#t=void 0;#n;#o;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),ki(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&fo(n.mutationKey)!==fo(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#i(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#i()}mutate(t,n){return this.#o=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??Lh();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}}#i(t){Et.batch(()=>{if(this.#o&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#o.onSuccess?.(t.data,n,r,o)}catch(i){Promise.reject(i)}try{this.#o.onSettled?.(t.data,null,n,r,o)}catch(i){Promise.reject(i)}}else if(t?.type==="error"){try{this.#o.onError?.(t.error,n,r,o)}catch(i){Promise.reject(i)}try{this.#o.onSettled?.(void 0,t.error,n,r,o)}catch(i){Promise.reject(i)}}}this.listeners.forEach(n=>{n(this.#t)})})}},wx=class extends Ho{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,o=t.queryHash??cc(r,t);let i=this.get(o);return i||(i=new dx({client:e,queryKey:r,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(i)),i}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Et.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>xh(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>xh(e,n)):t}notify(e){Et.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Et.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Et.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},bx=class{#e;#t;#n;#o;#r;#i;#a;#s;constructor(e={}){this.#e=e.queryCache||new wx,this.#t=e.mutationCache||new vx,this.#n=e.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=ac.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Ri.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Lr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,l=tx(t,i);if(l!==void 0)return this.#e.build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return Et.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Et.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Et.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Et.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(jt).catch(jt)}invalidateQueries(e,t={}){return Et.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Et.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(jt)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(jt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Lr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(jt).catch(jt)}fetchInfiniteQuery(e){return e.behavior=Fh(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(jt).catch(jt)}ensureInfiniteQueryData(e){return e.behavior=Fh(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ri.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#o.set(fo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#o.values()],n={};return t.forEach(r=>{Is(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(fo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{Is(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=cc(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Di&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},zh=v.createContext(void 0),yc=e=>{const t=v.useContext(zh);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},_x=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),g.jsx(zh.Provider,{value:e,children:t})),Vh=v.createContext(!1),Sx=()=>v.useContext(Vh);Vh.Provider;function xx(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Cx=v.createContext(xx()),Ex=()=>v.useContext(Cx),Px=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?hc(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Ax=e=>{v.useEffect(()=>{e.clearReset()},[e])},Ox=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||hc(n,[e.error,r])),Tx=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Ix=(e,t)=>e.isLoading&&e.isFetching&&!t,Nx=(e,t)=>e?.suspense&&t.isPending,Uh=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function kx(e,t,n){if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))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');const r=Sx(),o=Ex(),i=yc(),l=i.defaultQueryOptions(e);i.getDefaultOptions().queries?._experimental_beforeQuery?.(l);const c=i.getQueryCache().get(l.queryHash);process.env.NODE_ENV!=="production"&&(l.queryFn||console.error(`[${l.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`)),l._optimisticResults=r?"isRestoring":"optimistic",Tx(l),Px(l,o,c),Ax(o);const d=!i.getQueryCache().get(l.queryHash),[f]=v.useState(()=>new t(i,l)),p=f.getOptimisticResult(l),h=!r&&e.subscribed!==!1;if(v.useSyncExternalStore(v.useCallback(y=>{const w=h?f.subscribe(Et.batchCalls(y)):jt;return f.updateResult(),w},[f,h]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),v.useEffect(()=>{f.setOptions(l)},[l,f]),Nx(l,p))throw Uh(l,f,o);if(Ox({result:p,errorResetBoundary:o,throwOnError:l.throwOnError,query:c,suspense:l.suspense}))throw p.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(l,p),l.experimental_prefetchInRender&&!Ns.isServer()&&Ix(p,r)&&(d?Uh(l,f,o):c?.promise)?.catch(jt).finally(()=>{f.updateResult()}),l.notifyOnChangeProps?p:f.trackResult(p)}function Dx(e,t){return kx(e,fx)}function Bh(e,t){const n=yc(),[r]=v.useState(()=>new yx(n,e));v.useEffect(()=>{r.setOptions(e)},[r,e]);const o=v.useSyncExternalStore(v.useCallback(l=>r.subscribe(Et.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=v.useCallback((l,c)=>{r.mutate(l,c).catch(jt)},[r]);if(o.error&&hc(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}const Hh="(prefers-color-scheme: dark)",Rx=["dark","light","system"],Wh=v.createContext(void 0);function Gh(e){return e===null?!1:Rx.includes(e)}function jh(){return window.matchMedia(Hh).matches?"dark":"light"}function Mx(){const e=document.createElement("style");return e.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{e.remove()})})}}function Fx(e){return e instanceof HTMLElement?!!(e.isContentEditable||e.closest("input, textarea, select, [contenteditable='true']")):!1}function qh({children:e,defaultTheme:t="system",storageKey:n="theme",disableTransitionOnChange:r=!0,...o}){const[i,l]=v.useState(()=>{const p=localStorage.getItem(n);return Gh(p)?p:t}),c=v.useCallback(p=>{localStorage.setItem(n,p),l(p)},[n]),d=v.useCallback(p=>{const h=document.documentElement,y=p==="system"?jh():p,w=r?Mx():null;h.classList.remove("light","dark"),h.classList.add(y),w&&w()},[r]);v.useEffect(()=>{if(d(i),i!=="system")return;const p=window.matchMedia(Hh),h=()=>{d("system")};return p.addEventListener("change",h),()=>{p.removeEventListener("change",h)}},[i,d]),v.useEffect(()=>{const p=h=>{h.repeat||h.metaKey||h.ctrlKey||h.altKey||Fx(h.target)||h.key.toLowerCase()==="d"&&l(y=>{const w=y==="dark"?"light":y==="light"?"dark":jh()==="dark"?"light":"dark";return localStorage.setItem(n,w),w})};return window.addEventListener("keydown",p),()=>{window.removeEventListener("keydown",p)}},[n]),v.useEffect(()=>{const p=h=>{if(h.storageArea===localStorage&&h.key===n){if(Gh(h.newValue)){l(h.newValue);return}l(t)}};return window.addEventListener("storage",p),()=>{window.removeEventListener("storage",p)}},[t,n]);const f=v.useMemo(()=>({theme:i,setTheme:c}),[i,c]);return g.jsx(Wh.Provider,{...o,value:f,children:e})}const $x=()=>{const e=v.useContext(Wh);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function Zh(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Fi(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Zh(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Zh(e[o],null)}}}}function Ye(...e){return v.useCallback(Fi(...e),e)}function ho(e){const t=Lx(e),n=v.forwardRef((r,o)=>{const{children:i,...l}=r,c=v.Children.toArray(i),d=c.find(zx);if(d){const f=d.props.children,p=c.map(h=>h===d?v.Children.count(f)>1?v.Children.only(null):v.isValidElement(f)?f.props.children:null:h);return g.jsx(t,{...l,ref:o,children:v.isValidElement(f)?v.cloneElement(f,void 0,p):null})}return g.jsx(t,{...l,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var $i=ho("Slot");function Lx(e){const t=v.forwardRef((n,r)=>{const{children:o,...i}=n;if(v.isValidElement(o)){const l=Ux(o),c=Vx(i,o.props);return o.type!==v.Fragment&&(c.ref=r?Fi(r,l):l),v.cloneElement(o,c)}return v.Children.count(o)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Kh=Symbol("radix.slottable");function Jh(e){const t=({children:n})=>g.jsx(g.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Kh,t}function zx(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Kh}function Vx(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...c)=>{const d=i(...c);return o(...c),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Ux(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Bx=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Fe=Bx.reduce((e,t)=>{const n=ho(`Primitive.${t}`),r=v.forwardRef((o,i)=>{const{asChild:l,...c}=o,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(d,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Yh(e,t){e&&Ni.flushSync(()=>e.dispatchEvent(t))}var Qh=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"}),Hx="VisuallyHidden",Xh=v.forwardRef((e,t)=>g.jsx(Fe.span,{...e,ref:t,style:{...Qh,...e.style}}));Xh.displayName=Hx;var Wx=Xh;function Gx(e,t){const n=v.createContext(t),r=i=>{const{children:l,...c}=i,d=v.useMemo(()=>c,Object.values(c));return g.jsx(n.Provider,{value:d,children:l})};r.displayName=e+"Provider";function o(i){const l=v.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function Un(e,t=[]){let n=[];function r(i,l){const c=v.createContext(l),d=n.length;n=[...n,l];const f=h=>{const{scope:y,children:w,...b}=h,_=y?.[e]?.[d]||c,x=v.useMemo(()=>b,Object.values(b));return g.jsx(_.Provider,{value:x,children:w})};f.displayName=i+"Provider";function p(h,y){const w=y?.[e]?.[d]||c,b=v.useContext(w);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[f,p]}const o=()=>{const i=n.map(l=>v.createContext(l));return function(c){const d=c?.[e]||i;return v.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])}};return o.scopeName=e,[r,jx(o,...t)]}function jx(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const l=r.reduce((c,{useScope:d,scopeName:f})=>{const h=d(i)[`__scope${f}`];return{...c,...h}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function wc(e){const t=e+"CollectionProvider",[n,r]=Un(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=_=>{const{scope:x,children:E}=_,A=$.useRef(null),O=$.useRef(new Map).current;return g.jsx(o,{scope:x,itemMap:O,collectionRef:A,children:E})};l.displayName=t;const c=e+"CollectionSlot",d=ho(c),f=$.forwardRef((_,x)=>{const{scope:E,children:A}=_,O=i(c,E),N=Ye(x,O.collectionRef);return g.jsx(d,{ref:N,children:A})});f.displayName=c;const p=e+"CollectionItemSlot",h="data-radix-collection-item",y=ho(p),w=$.forwardRef((_,x)=>{const{scope:E,children:A,...O}=_,N=$.useRef(null),D=Ye(x,N),H=i(p,E);return $.useEffect(()=>(H.itemMap.set(N,{ref:N,...O}),()=>{H.itemMap.delete(N)})),g.jsx(y,{[h]:"",ref:D,children:A})});w.displayName=p;function b(_){const x=i(e+"CollectionConsumer",_);return $.useCallback(()=>{const A=x.collectionRef.current;if(!A)return[];const O=Array.from(A.querySelectorAll(`[${h}]`));return Array.from(x.itemMap.values()).sort((H,z)=>O.indexOf(H.ref.current)-O.indexOf(z.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:l,Slot:f,ItemSlot:w},b,r]}function ge(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var bt=globalThis?.document?v.useLayoutEffect:()=>{},qx=v[" useInsertionEffect ".trim().toString()]||bt;function po({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,l]=Zx({defaultProp:t,onChange:n}),c=e!==void 0,d=c?e:o;{const p=v.useRef(e!==void 0);v.useEffect(()=>{const h=p.current;h!==c&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=c},[c,r])}const f=v.useCallback(p=>{if(c){const h=Kx(p)?p(e):p;h!==e&&l.current?.(h)}else i(p)},[c,e,i,l]);return[d,f]}function Zx({defaultProp:e,onChange:t}){const[n,r]=v.useState(e),o=v.useRef(n),i=v.useRef(t);return qx(()=>{i.current=t},[t]),v.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function Kx(e){return typeof e=="function"}function Jx(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var Bn=e=>{const{present:t,children:n}=e,r=Yx(t),o=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),i=Ye(r.ref,Qx(o));return typeof n=="function"||r.isPresent?v.cloneElement(o,{ref:i}):null};Bn.displayName="Presence";function Yx(e){const[t,n]=v.useState(),r=v.useRef(null),o=v.useRef(e),i=v.useRef("none"),l=e?"mounted":"unmounted",[c,d]=Jx(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const f=Li(r.current);i.current=c==="mounted"?f:"none"},[c]),bt(()=>{const f=r.current,p=o.current;if(p!==e){const y=i.current,w=Li(f);e?d("MOUNT"):w==="none"||f?.display==="none"?d("UNMOUNT"):d(p&&y!==w?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),bt(()=>{if(t){let f;const p=t.ownerDocument.defaultView??window,h=w=>{const _=Li(r.current).includes(CSS.escape(w.animationName));if(w.target===t&&_&&(d("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",f=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},y=w=>{w.target===t&&(i.current=Li(r.current))};return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{p.clearTimeout(f),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:v.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function Li(e){return e?.animationName||"none"}function Qx(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Xx=v[" useId ".trim().toString()]||(()=>{}),eC=0;function Hn(e){const[t,n]=v.useState(Xx());return bt(()=>{n(r=>r??String(eC++))},[e]),e||(t?`radix-${t}`:"")}var zi="Collapsible",[tC]=Un(zi),[nC,bc]=tC(zi),ep=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:l,...c}=e,[d,f]=po({prop:r,defaultProp:o??!1,onChange:l,caller:zi});return g.jsx(nC,{scope:n,disabled:i,contentId:Hn(),open:d,onOpenToggle:v.useCallback(()=>f(p=>!p),[f]),children:g.jsx(Fe.div,{"data-state":Sc(d),"data-disabled":i?"":void 0,...c,ref:t})})});ep.displayName=zi;var tp="CollapsibleTrigger",np=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=bc(tp,n);return g.jsx(Fe.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Sc(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:ge(e.onClick,o.onOpenToggle)})});np.displayName=tp;var _c="CollapsibleContent",rp=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=bc(_c,e.__scopeCollapsible);return g.jsx(Bn,{present:n||o.open,children:({present:i})=>g.jsx(rC,{...r,ref:t,present:i})})});rp.displayName=_c;var rC=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,l=bc(_c,n),[c,d]=v.useState(r),f=v.useRef(null),p=Ye(t,f),h=v.useRef(0),y=h.current,w=v.useRef(0),b=w.current,_=l.open||c,x=v.useRef(_),E=v.useRef(void 0);return v.useEffect(()=>{const A=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(A)},[]),bt(()=>{const A=f.current;if(A){E.current=E.current||{transitionDuration:A.style.transitionDuration,animationName:A.style.animationName},A.style.transitionDuration="0s",A.style.animationName="none";const O=A.getBoundingClientRect();h.current=O.height,w.current=O.width,x.current||(A.style.transitionDuration=E.current.transitionDuration,A.style.animationName=E.current.animationName),d(r)}},[l.open,r]),g.jsx(Fe.div,{"data-state":Sc(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!_,...i,ref:p,style:{"--radix-collapsible-content-height":y?`${y}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:_&&o})});function Sc(e){return e?"open":"closed"}var oC=ep,sC=v.createContext(void 0);function xc(e){const t=v.useContext(sC);return e||t||"ltr"}function Wn(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>t.current?.(...n),[])}function iC(e,t=globalThis?.document){const n=Wn(e);v.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var aC="DismissableLayer",Cc="dismissableLayer.update",lC="dismissableLayer.pointerDownOutside",cC="dismissableLayer.focusOutside",op,sp=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ks=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:l,onDismiss:c,...d}=e,f=v.useContext(sp),[p,h]=v.useState(null),y=p?.ownerDocument??globalThis?.document,[,w]=v.useState({}),b=Ye(t,z=>h(z)),_=Array.from(f.layers),[x]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),E=_.indexOf(x),A=p?_.indexOf(p):-1,O=f.layersWithOutsidePointerEventsDisabled.size>0,N=A>=E,D=fC(z=>{const L=z.target,ee=[...f.branches].some(le=>le.contains(L));!N||ee||(o?.(z),l?.(z),z.defaultPrevented||c?.())},y),H=hC(z=>{const L=z.target;[...f.branches].some(le=>le.contains(L))||(i?.(z),l?.(z),z.defaultPrevented||c?.())},y);return iC(z=>{A===f.layers.size-1&&(r?.(z),!z.defaultPrevented&&c&&(z.preventDefault(),c()))},y),v.useEffect(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(op=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),ip(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=op)}},[p,y,n,f]),v.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),ip())},[p,f]),v.useEffect(()=>{const z=()=>w({});return document.addEventListener(Cc,z),()=>document.removeEventListener(Cc,z)},[]),g.jsx(Fe.div,{...d,ref:b,style:{pointerEvents:O?N?"auto":"none":void 0,...e.style},onFocusCapture:ge(e.onFocusCapture,H.onFocusCapture),onBlurCapture:ge(e.onBlurCapture,H.onBlurCapture),onPointerDownCapture:ge(e.onPointerDownCapture,D.onPointerDownCapture)})});ks.displayName=aC;var uC="DismissableLayerBranch",dC=v.forwardRef((e,t)=>{const n=v.useContext(sp),r=v.useRef(null),o=Ye(t,r);return v.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),g.jsx(Fe.div,{...e,ref:o})});dC.displayName=uC;function fC(e,t=globalThis?.document){const n=Wn(e),r=v.useRef(!1),o=v.useRef(()=>{});return v.useEffect(()=>{const i=c=>{if(c.target&&!r.current){let d=function(){ap(lC,n,f,{discrete:!0})};const f={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function hC(e,t=globalThis?.document){const n=Wn(e),r=v.useRef(!1);return v.useEffect(()=>{const o=i=>{i.target&&!r.current&&ap(cC,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ip(){const e=new CustomEvent(Cc);document.dispatchEvent(e)}function ap(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Yh(o,i):o.dispatchEvent(i)}var Ec="focusScope.autoFocusOnMount",Pc="focusScope.autoFocusOnUnmount",lp={bubbles:!1,cancelable:!0},pC="FocusScope",Vi=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...l}=e,[c,d]=v.useState(null),f=Wn(o),p=Wn(i),h=v.useRef(null),y=Ye(t,_=>d(_)),w=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let _=function(O){if(w.paused||!c)return;const N=O.target;c.contains(N)?h.current=N:zr(h.current,{select:!0})},x=function(O){if(w.paused||!c)return;const N=O.relatedTarget;N!==null&&(c.contains(N)||zr(h.current,{select:!0}))},E=function(O){if(document.activeElement===document.body)for(const D of O)D.removedNodes.length>0&&zr(c)};document.addEventListener("focusin",_),document.addEventListener("focusout",x);const A=new MutationObserver(E);return c&&A.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",_),document.removeEventListener("focusout",x),A.disconnect()}}},[r,c,w.paused]),v.useEffect(()=>{if(c){dp.add(w);const _=document.activeElement;if(!c.contains(_)){const E=new CustomEvent(Ec,lp);c.addEventListener(Ec,f),c.dispatchEvent(E),E.defaultPrevented||(gC(bC(cp(c)),{select:!0}),document.activeElement===_&&zr(c))}return()=>{c.removeEventListener(Ec,f),setTimeout(()=>{const E=new CustomEvent(Pc,lp);c.addEventListener(Pc,p),c.dispatchEvent(E),E.defaultPrevented||zr(_??document.body,{select:!0}),c.removeEventListener(Pc,p),dp.remove(w)},0)}}},[c,f,p,w]);const b=v.useCallback(_=>{if(!n&&!r||w.paused)return;const x=_.key==="Tab"&&!_.altKey&&!_.ctrlKey&&!_.metaKey,E=document.activeElement;if(x&&E){const A=_.currentTarget,[O,N]=mC(A);O&&N?!_.shiftKey&&E===N?(_.preventDefault(),n&&zr(O,{select:!0})):_.shiftKey&&E===O&&(_.preventDefault(),n&&zr(N,{select:!0})):E===A&&_.preventDefault()}},[n,r,w.paused]);return g.jsx(Fe.div,{tabIndex:-1,...l,ref:y,onKeyDown:b})});Vi.displayName=pC;function gC(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(zr(r,{select:t}),document.activeElement!==n)return}function mC(e){const t=cp(e),n=up(t,e),r=up(t.reverse(),e);return[n,r]}function cp(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const 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();)t.push(n.currentNode);return t}function up(e,t){for(const n of e)if(!vC(n,{upTo:t}))return n}function vC(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function yC(e){return e instanceof HTMLInputElement&&"select"in e}function zr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&yC(e)&&t&&e.select()}}var dp=wC();function wC(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=fp(e,t),e.unshift(t)},remove(t){e=fp(e,t),e[0]?.resume()}}}function fp(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function bC(e){return e.filter(t=>t.tagName!=="A")}var _C="Portal",Ds=v.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=v.useState(!1);bt(()=>i(!0),[]);const l=n||o&&globalThis?.document?.body;return l?ic.createPortal(g.jsx(Fe.div,{...r,ref:t}),l):null});Ds.displayName=_C;var Ac=0;function Oc(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??hp()),document.body.insertAdjacentElement("beforeend",e[1]??hp()),Ac++,()=>{Ac===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ac--}},[])}function hp(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var lr=function(){return lr=Object.assign||function(t){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)&&(t[i]=n[i])}return t},lr.apply(this,arguments)};function pp(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function SC(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ui="right-scroll-bar-position",Bi="width-before-scroll-bar",xC="with-scroll-bars-hidden",CC="--removed-body-scroll-bar-size";function Tc(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function EC(e,t){var n=$.useState(function(){return{value:e,callback:t,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=t,n.facade}var PC=typeof window<"u"?v.useLayoutEffect:v.useEffect,gp=new WeakMap;function AC(e,t){var n=EC(null,function(r){return e.forEach(function(o){return Tc(o,r)})});return PC(function(){var r=gp.get(n);if(r){var o=new Set(r),i=new Set(e),l=n.current;o.forEach(function(c){i.has(c)||Tc(c,null)}),i.forEach(function(c){o.has(c)||Tc(c,l)})}gp.set(n,e)},[e]),n}function OC(e){return e}function TC(e,t){t===void 0&&(t=OC);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]:e},useMedium:function(i){var l=t(i,r);return n.push(l),function(){n=n.filter(function(c){return c!==l})}},assignSyncMedium:function(i){for(r=!0;n.length;){var l=n;n=[],l.forEach(i)}n={push:function(c){return i(c)},filter:function(){return n}}},assignMedium:function(i){r=!0;var l=[];if(n.length){var c=n;n=[],c.forEach(i),l=n}var d=function(){var p=l;l=[],p.forEach(i)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(p){l.push(p),f()},filter:function(p){return l=l.filter(p),n}}}};return o}function IC(e){e===void 0&&(e={});var t=TC(null);return t.options=lr({async:!0,ssr:!1},e),t}var mp=function(e){var t=e.sideCar,n=pp(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,lr({},n))};mp.isSideCarExport=!0;function NC(e,t){return e.useMedium(t),mp}var vp=IC(),Ic=function(){},Hi=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:Ic,onWheelCapture:Ic,onTouchMoveCapture:Ic}),o=r[0],i=r[1],l=e.forwardProps,c=e.children,d=e.className,f=e.removeScrollBar,p=e.enabled,h=e.shards,y=e.sideCar,w=e.noRelative,b=e.noIsolation,_=e.inert,x=e.allowPinchZoom,E=e.as,A=E===void 0?"div":E,O=e.gapMode,N=pp(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),D=y,H=AC([n,t]),z=lr(lr({},N),o);return v.createElement(v.Fragment,null,p&&v.createElement(D,{sideCar:vp,removeScrollBar:f,shards:h,noRelative:w,noIsolation:b,inert:_,setCallbacks:i,allowPinchZoom:!!x,lockRef:n,gapMode:O}),l?v.cloneElement(v.Children.only(c),lr(lr({},z),{ref:H})):v.createElement(A,lr({},z,{className:d,ref:H}),c))});Hi.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Hi.classNames={fullWidth:Bi,zeroRight:Ui};var kC=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function DC(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=kC();return t&&e.setAttribute("nonce",t),e}function RC(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function MC(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var FC=function(){var e=0,t=null;return{add:function(n){e==0&&(t=DC())&&(RC(t,n),MC(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},$C=function(){var e=FC();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},yp=function(){var e=$C(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},LC={left:0,top:0,right:0,gap:0},Nc=function(e){return parseInt(e||"",10)||0},zC=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Nc(n),Nc(r),Nc(o)]},VC=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return LC;var t=zC(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},UC=yp(),Wo="data-scroll-locked",BC=function(e,t,n,r){var o=e.left,i=e.top,l=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
+
.`.concat(xC,` {
|
|
3
|
+
overflow: hidden `).concat(r,`;
|
|
4
|
+
padding-right: `).concat(c,"px ").concat(r,`;
|
|
5
|
+
}
|
|
6
|
+
body[`).concat(Wo,`] {
|
|
7
|
+
overflow: hidden `).concat(r,`;
|
|
8
|
+
overscroll-behavior: contain;
|
|
9
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
10
|
+
padding-left: `.concat(o,`px;
|
|
11
|
+
padding-top: `).concat(i,`px;
|
|
12
|
+
padding-right: `).concat(l,`px;
|
|
13
|
+
margin-left:0;
|
|
14
|
+
margin-top:0;
|
|
15
|
+
margin-right: `).concat(c,"px ").concat(r,`;
|
|
16
|
+
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.`).concat(Ui,` {
|
|
20
|
+
right: `).concat(c,"px ").concat(r,`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.`).concat(Bi,` {
|
|
24
|
+
margin-right: `).concat(c,"px ").concat(r,`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.`).concat(Ui," .").concat(Ui,` {
|
|
28
|
+
right: 0 `).concat(r,`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.`).concat(Bi," .").concat(Bi,` {
|
|
32
|
+
margin-right: 0 `).concat(r,`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
body[`).concat(Wo,`] {
|
|
36
|
+
`).concat(CC,": ").concat(c,`px;
|
|
37
|
+
}
|
|
38
|
+
`)},wp=function(){var e=parseInt(document.body.getAttribute(Wo)||"0",10);return isFinite(e)?e:0},HC=function(){v.useEffect(function(){return document.body.setAttribute(Wo,(wp()+1).toString()),function(){var e=wp()-1;e<=0?document.body.removeAttribute(Wo):document.body.setAttribute(Wo,e.toString())}},[])},WC=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;HC();var i=v.useMemo(function(){return VC(o)},[o]);return v.createElement(UC,{styles:BC(i,!t,o,n?"":"!important")})},kc=!1;if(typeof window<"u")try{var Wi=Object.defineProperty({},"passive",{get:function(){return kc=!0,!0}});window.addEventListener("test",Wi,Wi),window.removeEventListener("test",Wi,Wi)}catch{kc=!1}var Go=kc?{passive:!1}:!1,GC=function(e){return e.tagName==="TEXTAREA"},bp=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!GC(e)&&n[t]==="visible")},jC=function(e){return bp(e,"overflowY")},qC=function(e){return bp(e,"overflowX")},_p=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Sp(e,r);if(o){var i=xp(e,r),l=i[1],c=i[2];if(l>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ZC=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},KC=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Sp=function(e,t){return e==="v"?jC(t):qC(t)},xp=function(e,t){return e==="v"?ZC(t):KC(t)},JC=function(e,t){return e==="h"&&t==="rtl"?-1:1},YC=function(e,t,n,r,o){var i=JC(e,window.getComputedStyle(t).direction),l=i*r,c=n.target,d=t.contains(c),f=!1,p=l>0,h=0,y=0;do{if(!c)break;var w=xp(e,c),b=w[0],_=w[1],x=w[2],E=_-x-i*b;(b||E)&&Sp(e,c)&&(h+=E,y+=b);var A=c.parentNode;c=A&&A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?A.host:A}while(!d&&c!==document.body||d&&(t.contains(c)||t===c));return(p&&Math.abs(h)<1||!p&&Math.abs(y)<1)&&(f=!0),f},Gi=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Cp=function(e){return[e.deltaX,e.deltaY]},Ep=function(e){return e&&"current"in e?e.current:e},QC=function(e,t){return e[0]===t[0]&&e[1]===t[1]},XC=function(e){return`
|
|
39
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
+
`)},eE=0,jo=[];function tE(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),o=v.useState(eE++)[0],i=v.useState(yp)[0],l=v.useRef(e);v.useEffect(function(){l.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var _=SC([e.lockRef.current],(e.shards||[]).map(Ep),!0).filter(Boolean);return _.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),_.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=v.useCallback(function(_,x){if("touches"in _&&_.touches.length===2||_.type==="wheel"&&_.ctrlKey)return!l.current.allowPinchZoom;var E=Gi(_),A=n.current,O="deltaX"in _?_.deltaX:A[0]-E[0],N="deltaY"in _?_.deltaY:A[1]-E[1],D,H=_.target,z=Math.abs(O)>Math.abs(N)?"h":"v";if("touches"in _&&z==="h"&&H.type==="range")return!1;var L=window.getSelection(),ee=L&&L.anchorNode,le=ee?ee===H||ee.contains(H):!1;if(le)return!1;var be=_p(z,H);if(!be)return!0;if(be?D=z:(D=z==="v"?"h":"v",be=_p(z,H)),!be)return!1;if(!r.current&&"changedTouches"in _&&(O||N)&&(r.current=D),!D)return!0;var J=r.current||D;return YC(J,x,_,J==="h"?O:N)},[]),d=v.useCallback(function(_){var x=_;if(!(!jo.length||jo[jo.length-1]!==i)){var E="deltaY"in x?Cp(x):Gi(x),A=t.current.filter(function(D){return D.name===x.type&&(D.target===x.target||x.target===D.shadowParent)&&QC(D.delta,E)})[0];if(A&&A.should){x.cancelable&&x.preventDefault();return}if(!A){var O=(l.current.shards||[]).map(Ep).filter(Boolean).filter(function(D){return D.contains(x.target)}),N=O.length>0?c(x,O[0]):!l.current.noIsolation;N&&x.cancelable&&x.preventDefault()}}},[]),f=v.useCallback(function(_,x,E,A){var O={name:_,delta:x,target:E,should:A,shadowParent:nE(E)};t.current.push(O),setTimeout(function(){t.current=t.current.filter(function(N){return N!==O})},1)},[]),p=v.useCallback(function(_){n.current=Gi(_),r.current=void 0},[]),h=v.useCallback(function(_){f(_.type,Cp(_),_.target,c(_,e.lockRef.current))},[]),y=v.useCallback(function(_){f(_.type,Gi(_),_.target,c(_,e.lockRef.current))},[]);v.useEffect(function(){return jo.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:y}),document.addEventListener("wheel",d,Go),document.addEventListener("touchmove",d,Go),document.addEventListener("touchstart",p,Go),function(){jo=jo.filter(function(_){return _!==i}),document.removeEventListener("wheel",d,Go),document.removeEventListener("touchmove",d,Go),document.removeEventListener("touchstart",p,Go)}},[]);var w=e.removeScrollBar,b=e.inert;return v.createElement(v.Fragment,null,b?v.createElement(i,{styles:XC(o)}):null,w?v.createElement(WC,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function nE(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const rE=NC(vp,tE);var ji=v.forwardRef(function(e,t){return v.createElement(Hi,lr({},e,{ref:t,sideCar:rE}))});ji.classNames=Hi.classNames;var oE=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},qo=new WeakMap,qi=new WeakMap,Zi={},Dc=0,Pp=function(e){return e&&(e.host||Pp(e.parentNode))},sE=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Pp(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},iE=function(e,t,n,r){var o=sE(t,Array.isArray(e)?e:[e]);Zi[n]||(Zi[n]=new WeakMap);var i=Zi[n],l=[],c=new Set,d=new Set(o),f=function(h){!h||c.has(h)||(c.add(h),f(h.parentNode))};o.forEach(f);var p=function(h){!h||d.has(h)||Array.prototype.forEach.call(h.children,function(y){if(c.has(y))p(y);else try{var w=y.getAttribute(r),b=w!==null&&w!=="false",_=(qo.get(y)||0)+1,x=(i.get(y)||0)+1;qo.set(y,_),i.set(y,x),l.push(y),_===1&&b&&qi.set(y,!0),x===1&&y.setAttribute(n,"true"),b||y.setAttribute(r,"true")}catch(E){console.error("aria-hidden: cannot operate on ",y,E)}})};return p(t),c.clear(),Dc++,function(){l.forEach(function(h){var y=qo.get(h)-1,w=i.get(h)-1;qo.set(h,y),i.set(h,w),y||(qi.has(h)||h.removeAttribute(r),qi.delete(h)),w||h.removeAttribute(n)}),Dc--,Dc||(qo=new WeakMap,qo=new WeakMap,qi=new WeakMap,Zi={})}},Rc=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=oE(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),iE(r,o,n,"aria-hidden")):function(){return null}},Ki="Dialog",[Ap,Op]=Un(Ki),[aE,Gn]=Ap(Ki),Tp=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:l=!0}=e,c=v.useRef(null),d=v.useRef(null),[f,p]=po({prop:r,defaultProp:o??!1,onChange:i,caller:Ki});return g.jsx(aE,{scope:t,triggerRef:c,contentRef:d,contentId:Hn(),titleId:Hn(),descriptionId:Hn(),open:f,onOpenChange:p,onOpenToggle:v.useCallback(()=>p(h=>!h),[p]),modal:l,children:n})};Tp.displayName=Ki;var Ip="DialogTrigger",Np=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Gn(Ip,n),i=Ye(t,o.triggerRef);return g.jsx(Fe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":$c(o.open),...r,ref:i,onClick:ge(e.onClick,o.onOpenToggle)})});Np.displayName=Ip;var Mc="DialogPortal",[lE,kp]=Ap(Mc,{forceMount:void 0}),Dp=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Gn(Mc,t);return g.jsx(lE,{scope:t,forceMount:n,children:v.Children.map(r,l=>g.jsx(Bn,{present:n||i.open,children:g.jsx(Ds,{asChild:!0,container:o,children:l})}))})};Dp.displayName=Mc;var Ji="DialogOverlay",Rp=v.forwardRef((e,t)=>{const n=kp(Ji,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Gn(Ji,e.__scopeDialog);return i.modal?g.jsx(Bn,{present:r||i.open,children:g.jsx(uE,{...o,ref:t})}):null});Rp.displayName=Ji;var cE=ho("DialogOverlay.RemoveScroll"),uE=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Gn(Ji,n);return g.jsx(ji,{as:cE,allowPinchZoom:!0,shards:[o.contentRef],children:g.jsx(Fe.div,{"data-state":$c(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),go="DialogContent",Mp=v.forwardRef((e,t)=>{const n=kp(go,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Gn(go,e.__scopeDialog);return g.jsx(Bn,{present:r||i.open,children:i.modal?g.jsx(dE,{...o,ref:t}):g.jsx(fE,{...o,ref:t})})});Mp.displayName=go;var dE=v.forwardRef((e,t)=>{const n=Gn(go,e.__scopeDialog),r=v.useRef(null),o=Ye(t,n.contentRef,r);return v.useEffect(()=>{const i=r.current;if(i)return Rc(i)},[]),g.jsx(Fp,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ge(e.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:ge(e.onPointerDownOutside,i=>{const l=i.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&i.preventDefault()}),onFocusOutside:ge(e.onFocusOutside,i=>i.preventDefault())})}),fE=v.forwardRef((e,t)=>{const n=Gn(go,e.__scopeDialog),r=v.useRef(!1),o=v.useRef(!1);return g.jsx(Fp,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=i.target;n.triggerRef.current?.contains(l)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),Fp=v.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...l}=e,c=Gn(go,n),d=v.useRef(null),f=Ye(t,d);return Oc(),g.jsxs(g.Fragment,{children:[g.jsx(Vi,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:g.jsx(ks,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":$c(c.open),...l,ref:f,onDismiss:()=>c.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(pE,{titleId:c.titleId}),g.jsx(mE,{contentRef:d,descriptionId:c.descriptionId})]})]})}),Fc="DialogTitle",$p=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Gn(Fc,n);return g.jsx(Fe.h2,{id:o.titleId,...r,ref:t})});$p.displayName=Fc;var Lp="DialogDescription",zp=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Gn(Lp,n);return g.jsx(Fe.p,{id:o.descriptionId,...r,ref:t})});zp.displayName=Lp;var Vp="DialogClose",Up=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Gn(Vp,n);return g.jsx(Fe.button,{type:"button",...r,ref:t,onClick:ge(e.onClick,()=>o.onOpenChange(!1))})});Up.displayName=Vp;function $c(e){return e?"open":"closed"}var Bp="DialogTitleWarning",[hE,Hp]=Gx(Bp,{contentName:go,titleName:Fc,docsSlug:"dialog"}),pE=({titleId:e})=>{const t=Hp(Bp),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
42
|
+
|
|
43
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
|
+
|
|
45
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},gE="DialogDescriptionWarning",mE=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Hp(gE).contentName}}.`;return v.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Lc=Tp,vE=Np,zc=Dp,Vc=Rp,Uc=Mp,Bc=$p,Hc=zp,Rs=Up,Wp="AlertDialog",[yE]=Un(Wp,[Op]),br=Op(),Gp=e=>{const{__scopeAlertDialog:t,...n}=e,r=br(t);return g.jsx(Lc,{...r,...n,modal:!0})};Gp.displayName=Wp;var wE="AlertDialogTrigger",bE=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=br(n);return g.jsx(vE,{...o,...r,ref:t})});bE.displayName=wE;var _E="AlertDialogPortal",jp=e=>{const{__scopeAlertDialog:t,...n}=e,r=br(t);return g.jsx(zc,{...r,...n})};jp.displayName=_E;var SE="AlertDialogOverlay",qp=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=br(n);return g.jsx(Vc,{...o,...r,ref:t})});qp.displayName=SE;var Zo="AlertDialogContent",[xE,CE]=yE(Zo),EE=Jh("AlertDialogContent"),Zp=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,i=br(n),l=v.useRef(null),c=Ye(t,l),d=v.useRef(null);return g.jsx(hE,{contentName:Zo,titleName:Kp,docsSlug:"alert-dialog",children:g.jsx(xE,{scope:n,cancelRef:d,children:g.jsxs(Uc,{role:"alertdialog",...i,...o,ref:c,onOpenAutoFocus:ge(o.onOpenAutoFocus,f=>{f.preventDefault(),d.current?.focus({preventScroll:!0})}),onPointerDownOutside:f=>f.preventDefault(),onInteractOutside:f=>f.preventDefault(),children:[g.jsx(EE,{children:r}),g.jsx(AE,{contentRef:l})]})})})});Zp.displayName=Zo;var Kp="AlertDialogTitle",Jp=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=br(n);return g.jsx(Bc,{...o,...r,ref:t})});Jp.displayName=Kp;var Yp="AlertDialogDescription",Qp=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=br(n);return g.jsx(Hc,{...o,...r,ref:t})});Qp.displayName=Yp;var PE="AlertDialogAction",Xp=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=br(n);return g.jsx(Rs,{...o,...r,ref:t})});Xp.displayName=PE;var eg="AlertDialogCancel",tg=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=CE(eg,n),i=br(n),l=Ye(t,o);return g.jsx(Rs,{...i,...r,ref:l})});tg.displayName=eg;var AE=({contentRef:e})=>{const t=`\`${Zo}\` requires a description for the component to be accessible for screen reader users.
|
|
46
|
+
|
|
47
|
+
You can add a description to the \`${Zo}\` by passing a \`${Yp}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
48
|
+
|
|
49
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Zo}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
50
|
+
|
|
51
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return v.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},OE=Gp,TE=jp,IE=qp,NE=Zp,kE=Xp,DE=tg,RE=Jp,ME=Qp,Yi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Qi={exports:{}},Wc={};var ng;function FE(){if(ng)return Wc;ng=1;var e=$;function t(h,y){return h===y&&(h!==0||1/h===1/y)||h!==h&&y!==y}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,l=e.useDebugValue;function c(h,y){var w=y(),b=r({inst:{value:w,getSnapshot:y}}),_=b[0].inst,x=b[1];return i(function(){_.value=w,_.getSnapshot=y,d(_)&&x({inst:_})},[h,w,y]),o(function(){return d(_)&&x({inst:_}),h(function(){d(_)&&x({inst:_})})},[h]),l(w),w}function d(h){var y=h.getSnapshot;h=h.value;try{var w=y();return!n(h,w)}catch{return!0}}function f(h,y){return y()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:c;return Wc.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,Wc}var Gc={};var rg;function $E(){return rg||(rg=1,process.env.NODE_ENV!=="production"&&(function(){function e(w,b){return w===b&&(w!==0||1/w===1/b)||w!==w&&b!==b}function t(w,b){p||o.startTransition===void 0||(p=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var _=b();if(!h){var x=b();i(_,x)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),h=!0)}x=l({inst:{value:_,getSnapshot:b}});var E=x[0].inst,A=x[1];return d(function(){E.value=_,E.getSnapshot=b,n(E)&&A({inst:E})},[w,_,b]),c(function(){return n(E)&&A({inst:E}),w(function(){n(E)&&A({inst:E})})},[w]),f(_),_}function n(w){var b=w.getSnapshot;w=w.value;try{var _=b();return!i(w,_)}catch{return!0}}function r(w,b){return b()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=$,i=typeof Object.is=="function"?Object.is:e,l=o.useState,c=o.useEffect,d=o.useLayoutEffect,f=o.useDebugValue,p=!1,h=!1,y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Gc.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:y,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Gc}var og;function LE(){return og||(og=1,process.env.NODE_ENV==="production"?Qi.exports=FE():Qi.exports=$E()),Qi.exports}var zE=LE();function VE(){return zE.useSyncExternalStore(UE,()=>!0,()=>!1)}function UE(){return()=>{}}var jc="Avatar",[BE]=Un(jc),[HE,sg]=BE(jc),ig=v.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,i]=v.useState("idle");return g.jsx(HE,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:i,children:g.jsx(Fe.span,{...r,ref:t})})});ig.displayName=jc;var ag="AvatarImage",lg=v.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...i}=e,l=sg(ag,n),c=WE(r,i),d=Wn(f=>{o(f),l.onImageLoadingStatusChange(f)});return bt(()=>{c!=="idle"&&d(c)},[c,d]),c==="loaded"?g.jsx(Fe.img,{...i,ref:t,src:r}):null});lg.displayName=ag;var cg="AvatarFallback",ug=v.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,i=sg(cg,n),[l,c]=v.useState(r===void 0);return v.useEffect(()=>{if(r!==void 0){const d=window.setTimeout(()=>c(!0),r);return()=>window.clearTimeout(d)}},[r]),l&&i.imageLoadingStatus!=="loaded"?g.jsx(Fe.span,{...o,ref:t}):null});ug.displayName=cg;function dg(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function WE(e,{referrerPolicy:t,crossOrigin:n}){const r=VE(),o=v.useRef(null),i=r?(o.current||(o.current=new window.Image),o.current):null,[l,c]=v.useState(()=>dg(i,e));return bt(()=>{c(dg(i,e))},[i,e]),bt(()=>{const d=h=>()=>{c(h)};if(!i)return;const f=d("loaded"),p=d("error");return i.addEventListener("load",f),i.addEventListener("error",p),t&&(i.referrerPolicy=t),typeof n=="string"&&(i.crossOrigin=n),()=>{i.removeEventListener("load",f),i.removeEventListener("error",p)}},[i,n,t]),l}var GE=ig,jE=lg,qE=ug;function ZE(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function KE(e){const[t,n]=v.useState(void 0);return bt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let l,c;if("borderBoxSize"in i){const d=i.borderBoxSize,f=Array.isArray(d)?d[0]:d;l=f.inlineSize,c=f.blockSize}else l=e.offsetWidth,c=e.offsetHeight;n({width:l,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const JE=["top","right","bottom","left"],Vr=Math.min,pn=Math.max,Xi=Math.round,ea=Math.floor,cr=e=>({x:e,y:e}),YE={left:"right",right:"left",bottom:"top",top:"bottom"};function qc(e,t,n){return pn(e,Vr(t,n))}function _r(e,t){return typeof e=="function"?e(t):e}function Sr(e){return e.split("-")[0]}function Ko(e){return e.split("-")[1]}function Zc(e){return e==="x"?"y":"x"}function Kc(e){return e==="y"?"height":"width"}function ur(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Jc(e){return Zc(ur(e))}function QE(e,t,n){n===void 0&&(n=!1);const r=Ko(e),o=Jc(e),i=Kc(o);let l=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=ta(l)),[l,ta(l)]}function XE(e){const t=ta(e);return[Yc(e),t,Yc(t)]}function Yc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const fg=["left","right"],hg=["right","left"],e1=["top","bottom"],t1=["bottom","top"];function n1(e,t,n){switch(e){case"top":case"bottom":return n?t?hg:fg:t?fg:hg;case"left":case"right":return t?e1:t1;default:return[]}}function r1(e,t,n,r){const o=Ko(e);let i=n1(Sr(e),n==="start",r);return o&&(i=i.map(l=>l+"-"+o),t&&(i=i.concat(i.map(Yc)))),i}function ta(e){const t=Sr(e);return YE[t]+e.slice(t.length)}function o1(e){return{top:0,right:0,bottom:0,left:0,...e}}function pg(e){return typeof e!="number"?o1(e):{top:e,right:e,bottom:e,left:e}}function na(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function gg(e,t,n){let{reference:r,floating:o}=e;const i=ur(t),l=Jc(t),c=Kc(l),d=Sr(t),f=i==="y",p=r.x+r.width/2-o.width/2,h=r.y+r.height/2-o.height/2,y=r[c]/2-o[c]/2;let w;switch(d){case"top":w={x:p,y:r.y-o.height};break;case"bottom":w={x:p,y:r.y+r.height};break;case"right":w={x:r.x+r.width,y:h};break;case"left":w={x:r.x-o.width,y:h};break;default:w={x:r.x,y:r.y}}switch(Ko(t)){case"start":w[l]-=y*(n&&f?-1:1);break;case"end":w[l]+=y*(n&&f?-1:1);break}return w}async function s1(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:l,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:h="floating",altBoundary:y=!1,padding:w=0}=_r(t,e),b=pg(w),x=c[y?h==="floating"?"reference":"floating":h],E=na(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:d})),A=h==="floating"?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,O=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),N=await(i.isElement==null?void 0:i.isElement(O))?await(i.getScale==null?void 0:i.getScale(O))||{x:1,y:1}:{x:1,y:1},D=na(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:A,offsetParent:O,strategy:d}):A);return{top:(E.top-D.top+b.top)/N.y,bottom:(D.bottom-E.bottom+b.bottom)/N.y,left:(E.left-D.left+b.left)/N.x,right:(D.right-E.right+b.right)/N.x}}const i1=50,a1=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,c=l.detectOverflow?l:{...l,detectOverflow:s1},d=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:h}=gg(f,r,d),y=r,w=0;const b={};for(let _=0;_<i.length;_++){const x=i[_];if(!x)continue;const{name:E,fn:A}=x,{x:O,y:N,data:D,reset:H}=await A({x:p,y:h,initialPlacement:r,placement:y,strategy:o,middlewareData:b,rects:f,platform:c,elements:{reference:e,floating:t}});p=O??p,h=N??h,b[E]={...b[E],...D},H&&w<i1&&(w++,typeof H=="object"&&(H.placement&&(y=H.placement),H.rects&&(f=H.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:o}):H.rects),{x:p,y:h}=gg(f,y,d)),_=-1)}return{x:p,y:h,placement:y,strategy:o,middlewareData:b}},l1=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:l,elements:c,middlewareData:d}=t,{element:f,padding:p=0}=_r(e,t)||{};if(f==null)return{};const h=pg(p),y={x:n,y:r},w=Jc(o),b=Kc(w),_=await l.getDimensions(f),x=w==="y",E=x?"top":"left",A=x?"bottom":"right",O=x?"clientHeight":"clientWidth",N=i.reference[b]+i.reference[w]-y[w]-i.floating[b],D=y[w]-i.reference[w],H=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let z=H?H[O]:0;(!z||!await(l.isElement==null?void 0:l.isElement(H)))&&(z=c.floating[O]||i.floating[b]);const L=N/2-D/2,ee=z/2-_[b]/2-1,le=Vr(h[E],ee),be=Vr(h[A],ee),J=le,Q=z-_[b]-be,ie=z/2-_[b]/2+L,he=qc(J,ie,Q),q=!d.arrow&&Ko(o)!=null&&ie!==he&&i.reference[b]/2-(ie<J?le:be)-_[b]/2<0,se=q?ie<J?ie-J:ie-Q:0;return{[w]:y[w]+se,data:{[w]:he,centerOffset:ie-he-se,...q&&{alignmentOffset:se}},reset:q}}}),c1=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:c,platform:d,elements:f}=t,{mainAxis:p=!0,crossAxis:h=!0,fallbackPlacements:y,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:_=!0,...x}=_r(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const E=Sr(o),A=ur(c),O=Sr(c)===c,N=await(d.isRTL==null?void 0:d.isRTL(f.floating)),D=y||(O||!_?[ta(c)]:XE(c)),H=b!=="none";!y&&H&&D.push(...r1(c,_,b,N));const z=[c,...D],L=await d.detectOverflow(t,x),ee=[];let le=((r=i.flip)==null?void 0:r.overflows)||[];if(p&&ee.push(L[E]),h){const ie=QE(o,l,N);ee.push(L[ie[0]],L[ie[1]])}if(le=[...le,{placement:o,overflows:ee}],!ee.every(ie=>ie<=0)){var be,J;const ie=(((be=i.flip)==null?void 0:be.index)||0)+1,he=z[ie];if(he&&(!(h==="alignment"?A!==ur(he):!1)||le.every(ne=>ur(ne.placement)===A?ne.overflows[0]>0:!0)))return{data:{index:ie,overflows:le},reset:{placement:he}};let q=(J=le.filter(se=>se.overflows[0]<=0).sort((se,ne)=>se.overflows[1]-ne.overflows[1])[0])==null?void 0:J.placement;if(!q)switch(w){case"bestFit":{var Q;const se=(Q=le.filter(ne=>{if(H){const te=ur(ne.placement);return te===A||te==="y"}return!0}).map(ne=>[ne.placement,ne.overflows.filter(te=>te>0).reduce((te,Y)=>te+Y,0)]).sort((ne,te)=>ne[1]-te[1])[0])==null?void 0:Q[0];se&&(q=se);break}case"initialPlacement":q=c;break}if(o!==q)return{reset:{placement:q}}}return{}}}};function mg(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function vg(e){return JE.some(t=>e[t]>=0)}const u1=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=_r(e,t);switch(o){case"referenceHidden":{const l=await r.detectOverflow(t,{...i,elementContext:"reference"}),c=mg(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:vg(c)}}}case"escaped":{const l=await r.detectOverflow(t,{...i,altBoundary:!0}),c=mg(l,n.floating);return{data:{escapedOffsets:c,escaped:vg(c)}}}default:return{}}}}},yg=new Set(["left","top"]);async function d1(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),l=Sr(n),c=Ko(n),d=ur(n)==="y",f=yg.has(l)?-1:1,p=i&&d?-1:1,h=_r(t,e);let{mainAxis:y,crossAxis:w,alignmentAxis:b}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return c&&typeof b=="number"&&(w=c==="end"?b*-1:b),d?{x:w*p,y:y*f}:{x:y*f,y:w*p}}const f1=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:l,middlewareData:c}=t,d=await d1(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:o+d.x,y:i+d.y,data:{...d,placement:l}}}}},h1=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:d={fn:E=>{let{x:A,y:O}=E;return{x:A,y:O}}},...f}=_r(e,t),p={x:n,y:r},h=await i.detectOverflow(t,f),y=ur(Sr(o)),w=Zc(y);let b=p[w],_=p[y];if(l){const E=w==="y"?"top":"left",A=w==="y"?"bottom":"right",O=b+h[E],N=b-h[A];b=qc(O,b,N)}if(c){const E=y==="y"?"top":"left",A=y==="y"?"bottom":"right",O=_+h[E],N=_-h[A];_=qc(O,_,N)}const x=d.fn({...t,[w]:b,[y]:_});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[w]:l,[y]:c}}}}}},p1=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:l}=t,{offset:c=0,mainAxis:d=!0,crossAxis:f=!0}=_r(e,t),p={x:n,y:r},h=ur(o),y=Zc(h);let w=p[y],b=p[h];const _=_r(c,t),x=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:0,crossAxis:0,..._};if(d){const O=y==="y"?"height":"width",N=i.reference[y]-i.floating[O]+x.mainAxis,D=i.reference[y]+i.reference[O]-x.mainAxis;w<N?w=N:w>D&&(w=D)}if(f){var E,A;const O=y==="y"?"width":"height",N=yg.has(Sr(o)),D=i.reference[h]-i.floating[O]+(N&&((E=l.offset)==null?void 0:E[h])||0)+(N?0:x.crossAxis),H=i.reference[h]+i.reference[O]+(N?0:((A=l.offset)==null?void 0:A[h])||0)-(N?x.crossAxis:0);b<D?b=D:b>H&&(b=H)}return{[y]:w,[h]:b}}}},g1=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:l,elements:c}=t,{apply:d=()=>{},...f}=_r(e,t),p=await l.detectOverflow(t,f),h=Sr(o),y=Ko(o),w=ur(o)==="y",{width:b,height:_}=i.floating;let x,E;h==="top"||h==="bottom"?(x=h,E=y===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(E=h,x=y==="end"?"top":"bottom");const A=_-p.top-p.bottom,O=b-p.left-p.right,N=Vr(_-p[x],A),D=Vr(b-p[E],O),H=!t.middlewareData.shift;let z=N,L=D;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(L=O),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(z=A),H&&!y){const le=pn(p.left,0),be=pn(p.right,0),J=pn(p.top,0),Q=pn(p.bottom,0);w?L=b-2*(le!==0||be!==0?le+be:pn(p.left,p.right)):z=_-2*(J!==0||Q!==0?J+Q:pn(p.top,p.bottom))}await d({...t,availableWidth:L,availableHeight:z});const ee=await l.getDimensions(c.floating);return b!==ee.width||_!==ee.height?{reset:{rects:!0}}:{}}}};function ra(){return typeof window<"u"}function Jo(e){return wg(e)?(e.nodeName||"").toLowerCase():"#document"}function gn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function dr(e){var t;return(t=(wg(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wg(e){return ra()?e instanceof Node||e instanceof gn(e).Node:!1}function jn(e){return ra()?e instanceof Element||e instanceof gn(e).Element:!1}function xr(e){return ra()?e instanceof HTMLElement||e instanceof gn(e).HTMLElement:!1}function bg(e){return!ra()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof gn(e).ShadowRoot}function Ms(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=qn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function m1(e){return/^(table|td|th)$/.test(Jo(e))}function oa(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const v1=/transform|translate|scale|rotate|perspective|filter/,y1=/paint|layout|strict|content/,mo=e=>!!e&&e!=="none";let Qc;function Xc(e){const t=jn(e)?qn(e):e;return mo(t.transform)||mo(t.translate)||mo(t.scale)||mo(t.rotate)||mo(t.perspective)||!eu()&&(mo(t.backdropFilter)||mo(t.filter))||v1.test(t.willChange||"")||y1.test(t.contain||"")}function w1(e){let t=Ur(e);for(;xr(t)&&!Yo(t);){if(Xc(t))return t;if(oa(t))return null;t=Ur(t)}return null}function eu(){return Qc==null&&(Qc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Qc}function Yo(e){return/^(html|body|#document)$/.test(Jo(e))}function qn(e){return gn(e).getComputedStyle(e)}function sa(e){return jn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ur(e){if(Jo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||bg(e)&&e.host||dr(e);return bg(t)?t.host:t}function _g(e){const t=Ur(e);return Yo(t)?e.ownerDocument?e.ownerDocument.body:e.body:xr(t)&&Ms(t)?t:_g(t)}function Fs(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=_g(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),l=gn(o);if(i){const c=tu(l);return t.concat(l,l.visualViewport||[],Ms(o)?o:[],c&&n?Fs(c):[])}else return t.concat(o,Fs(o,[],n))}function tu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Sg(e){const t=qn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=xr(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,c=Xi(n)!==i||Xi(r)!==l;return c&&(n=i,r=l),{width:n,height:r,$:c}}function nu(e){return jn(e)?e:e.contextElement}function Qo(e){const t=nu(e);if(!xr(t))return cr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Sg(t);let l=(i?Xi(n.width):n.width)/r,c=(i?Xi(n.height):n.height)/o;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const b1=cr(0);function xg(e){const t=gn(e);return!eu()||!t.visualViewport?b1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _1(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==gn(e)?!1:t}function vo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=nu(e);let l=cr(1);t&&(r?jn(r)&&(l=Qo(r)):l=Qo(e));const c=_1(i,n,r)?xg(i):cr(0);let d=(o.left+c.x)/l.x,f=(o.top+c.y)/l.y,p=o.width/l.x,h=o.height/l.y;if(i){const y=gn(i),w=r&&jn(r)?gn(r):r;let b=y,_=tu(b);for(;_&&r&&w!==b;){const x=Qo(_),E=_.getBoundingClientRect(),A=qn(_),O=E.left+(_.clientLeft+parseFloat(A.paddingLeft))*x.x,N=E.top+(_.clientTop+parseFloat(A.paddingTop))*x.y;d*=x.x,f*=x.y,p*=x.x,h*=x.y,d+=O,f+=N,b=gn(_),_=tu(b)}}return na({width:p,height:h,x:d,y:f})}function ia(e,t){const n=sa(e).scrollLeft;return t?t.left+n:vo(dr(e)).left+n}function Cg(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ia(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function S1(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",l=dr(r),c=t?oa(t.floating):!1;if(r===l||c&&i)return n;let d={scrollLeft:0,scrollTop:0},f=cr(1);const p=cr(0),h=xr(r);if((h||!h&&!i)&&((Jo(r)!=="body"||Ms(l))&&(d=sa(r)),h)){const w=vo(r);f=Qo(r),p.x=w.x+r.clientLeft,p.y=w.y+r.clientTop}const y=l&&!h&&!i?Cg(l,d):cr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+y.x,y:n.y*f.y-d.scrollTop*f.y+p.y+y.y}}function x1(e){return Array.from(e.getClientRects())}function C1(e){const t=dr(e),n=sa(e),r=e.ownerDocument.body,o=pn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=pn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+ia(e);const c=-n.scrollTop;return qn(r).direction==="rtl"&&(l+=pn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:c}}const Eg=25;function E1(e,t){const n=gn(e),r=dr(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,c=0,d=0;if(o){i=o.width,l=o.height;const p=eu();(!p||p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const f=ia(r);if(f<=0){const p=r.ownerDocument,h=p.body,y=getComputedStyle(h),w=p.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,b=Math.abs(r.clientWidth-h.clientWidth-w);b<=Eg&&(i-=b)}else f<=Eg&&(i+=f);return{width:i,height:l,x:c,y:d}}function P1(e,t){const n=vo(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=xr(e)?Qo(e):cr(1),l=e.clientWidth*i.x,c=e.clientHeight*i.y,d=o*i.x,f=r*i.y;return{width:l,height:c,x:d,y:f}}function Pg(e,t,n){let r;if(t==="viewport")r=E1(e,n);else if(t==="document")r=C1(dr(e));else if(jn(t))r=P1(t,n);else{const o=xg(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return na(r)}function Ag(e,t){const n=Ur(e);return n===t||!jn(n)||Yo(n)?!1:qn(n).position==="fixed"||Ag(n,t)}function A1(e,t){const n=t.get(e);if(n)return n;let r=Fs(e,[],!1).filter(c=>jn(c)&&Jo(c)!=="body"),o=null;const i=qn(e).position==="fixed";let l=i?Ur(e):e;for(;jn(l)&&!Yo(l);){const c=qn(l),d=Xc(l);!d&&c.position==="fixed"&&(o=null),(i?!d&&!o:!d&&c.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Ms(l)&&!d&&Ag(e,l))?r=r.filter(p=>p!==l):o=c,l=Ur(l)}return t.set(e,r),r}function O1(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const l=[...n==="clippingAncestors"?oa(t)?[]:A1(t,this._c):[].concat(n),r],c=Pg(t,l[0],o);let d=c.top,f=c.right,p=c.bottom,h=c.left;for(let y=1;y<l.length;y++){const w=Pg(t,l[y],o);d=pn(w.top,d),f=Vr(w.right,f),p=Vr(w.bottom,p),h=pn(w.left,h)}return{width:f-h,height:p-d,x:h,y:d}}function T1(e){const{width:t,height:n}=Sg(e);return{width:t,height:n}}function I1(e,t,n){const r=xr(t),o=dr(t),i=n==="fixed",l=vo(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const d=cr(0);function f(){d.x=ia(o)}if(r||!r&&!i)if((Jo(t)!=="body"||Ms(o))&&(c=sa(t)),r){const w=vo(t,!0,i,t);d.x=w.x+t.clientLeft,d.y=w.y+t.clientTop}else o&&f();i&&!r&&o&&f();const p=o&&!r&&!i?Cg(o,c):cr(0),h=l.left+c.scrollLeft-d.x-p.x,y=l.top+c.scrollTop-d.y-p.y;return{x:h,y,width:l.width,height:l.height}}function ru(e){return qn(e).position==="static"}function Og(e,t){if(!xr(e)||qn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return dr(e)===n&&(n=n.ownerDocument.body),n}function Tg(e,t){const n=gn(e);if(oa(e))return n;if(!xr(e)){let o=Ur(e);for(;o&&!Yo(o);){if(jn(o)&&!ru(o))return o;o=Ur(o)}return n}let r=Og(e,t);for(;r&&m1(r)&&ru(r);)r=Og(r,t);return r&&Yo(r)&&ru(r)&&!Xc(r)?n:r||w1(e)||n}const N1=async function(e){const t=this.getOffsetParent||Tg,n=this.getDimensions,r=await n(e.floating);return{reference:I1(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function k1(e){return qn(e).direction==="rtl"}const D1={convertOffsetParentRelativeRectToViewportRelativeRect:S1,getDocumentElement:dr,getClippingRect:O1,getOffsetParent:Tg,getElementRects:N1,getClientRects:x1,getDimensions:T1,getScale:Qo,isElement:jn,isRTL:k1};function Ig(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function R1(e,t){let n=null,r;const o=dr(e);function i(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function l(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),i();const f=e.getBoundingClientRect(),{left:p,top:h,width:y,height:w}=f;if(c||t(),!y||!w)return;const b=ea(h),_=ea(o.clientWidth-(p+y)),x=ea(o.clientHeight-(h+w)),E=ea(p),O={rootMargin:-b+"px "+-_+"px "+-x+"px "+-E+"px",threshold:pn(0,Vr(1,d))||1};let N=!0;function D(H){const z=H[0].intersectionRatio;if(z!==d){if(!N)return l();z?l(!1,z):r=setTimeout(()=>{l(!1,1e-7)},1e3)}z===1&&!Ig(f,e.getBoundingClientRect())&&l(),N=!1}try{n=new IntersectionObserver(D,{...O,root:o.ownerDocument})}catch{n=new IntersectionObserver(D,O)}n.observe(e)}return l(!0),i}function M1(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=nu(e),p=o||i?[...f?Fs(f):[],...t?Fs(t):[]]:[];p.forEach(E=>{o&&E.addEventListener("scroll",n,{passive:!0}),i&&E.addEventListener("resize",n)});const h=f&&c?R1(f,n):null;let y=-1,w=null;l&&(w=new ResizeObserver(E=>{let[A]=E;A&&A.target===f&&w&&t&&(w.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var O;(O=w)==null||O.observe(t)})),n()}),f&&!d&&w.observe(f),t&&w.observe(t));let b,_=d?vo(e):null;d&&x();function x(){const E=vo(e);_&&!Ig(_,E)&&n(),_=E,b=requestAnimationFrame(x)}return n(),()=>{var E;p.forEach(A=>{o&&A.removeEventListener("scroll",n),i&&A.removeEventListener("resize",n)}),h?.(),(E=w)==null||E.disconnect(),w=null,d&&cancelAnimationFrame(b)}}const F1=f1,$1=h1,L1=c1,z1=g1,V1=u1,Ng=l1,U1=p1,B1=(e,t,n)=>{const r=new Map,o={platform:D1,...n},i={...o.platform,_c:r};return a1(e,t,{...o,platform:i})};var H1=typeof document<"u",W1=function(){},aa=H1?$.useLayoutEffect:W1;function la(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!la(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!la(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function kg(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Dg(e,t){const n=kg(e);return Math.round(t*n)/n}function ou(e){const t=v.useRef(e);return aa(()=>{t.current=e}),t}function G1(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:l}={},transform:c=!0,whileElementsMounted:d,open:f}=e,[p,h]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[y,w]=v.useState(r);la(y,r)||w(r);const[b,_]=v.useState(null),[x,E]=v.useState(null),A=v.useCallback(ne=>{ne!==H.current&&(H.current=ne,_(ne))},[]),O=v.useCallback(ne=>{ne!==z.current&&(z.current=ne,E(ne))},[]),N=i||b,D=l||x,H=v.useRef(null),z=v.useRef(null),L=v.useRef(p),ee=d!=null,le=ou(d),be=ou(o),J=ou(f),Q=v.useCallback(()=>{if(!H.current||!z.current)return;const ne={placement:t,strategy:n,middleware:y};be.current&&(ne.platform=be.current),B1(H.current,z.current,ne).then(te=>{const Y={...te,isPositioned:J.current!==!1};ie.current&&!la(L.current,Y)&&(L.current=Y,Ni.flushSync(()=>{h(Y)}))})},[y,t,n,be,J]);aa(()=>{f===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,h(ne=>({...ne,isPositioned:!1})))},[f]);const ie=v.useRef(!1);aa(()=>(ie.current=!0,()=>{ie.current=!1}),[]),aa(()=>{if(N&&(H.current=N),D&&(z.current=D),N&&D){if(le.current)return le.current(N,D,Q);Q()}},[N,D,Q,le,ee]);const he=v.useMemo(()=>({reference:H,floating:z,setReference:A,setFloating:O}),[A,O]),q=v.useMemo(()=>({reference:N,floating:D}),[N,D]),se=v.useMemo(()=>{const ne={position:n,left:0,top:0};if(!q.floating)return ne;const te=Dg(q.floating,p.x),Y=Dg(q.floating,p.y);return c?{...ne,transform:"translate("+te+"px, "+Y+"px)",...kg(q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:te,top:Y}},[n,c,q.floating,p.x,p.y]);return v.useMemo(()=>({...p,update:Q,refs:he,elements:q,floatingStyles:se}),[p,Q,he,q,se])}const j1=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ng({element:r.current,padding:o}).fn(n):{}:r?Ng({element:r,padding:o}).fn(n):{}}}},q1=(e,t)=>{const n=F1(e);return{name:n.name,fn:n.fn,options:[e,t]}},Z1=(e,t)=>{const n=$1(e);return{name:n.name,fn:n.fn,options:[e,t]}},K1=(e,t)=>({fn:U1(e).fn,options:[e,t]}),J1=(e,t)=>{const n=L1(e);return{name:n.name,fn:n.fn,options:[e,t]}},Y1=(e,t)=>{const n=z1(e);return{name:n.name,fn:n.fn,options:[e,t]}},Q1=(e,t)=>{const n=V1(e);return{name:n.name,fn:n.fn,options:[e,t]}},X1=(e,t)=>{const n=j1(e);return{name:n.name,fn:n.fn,options:[e,t]}};var eP="Arrow",Rg=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return g.jsx(Fe.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});Rg.displayName=eP;var tP=Rg,su="Popper",[Mg,Xo]=Un(su),[nP,Fg]=Mg(su),$g=e=>{const{__scopePopper:t,children:n}=e,[r,o]=v.useState(null);return g.jsx(nP,{scope:t,anchor:r,onAnchorChange:o,children:n})};$g.displayName=su;var Lg="PopperAnchor",zg=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Fg(Lg,n),l=v.useRef(null),c=Ye(t,l),d=v.useRef(null);return v.useEffect(()=>{const f=d.current;d.current=r?.current||l.current,f!==d.current&&i.onAnchorChange(d.current)}),r?null:g.jsx(Fe.div,{...o,ref:c})});zg.displayName=Lg;var iu="PopperContent",[rP,oP]=Mg(iu),Vg=v.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:h="partial",hideWhenDetached:y=!1,updatePositionStrategy:w="optimized",onPlaced:b,..._}=e,x=Fg(iu,n),[E,A]=v.useState(null),O=Ye(t,ce=>A(ce)),[N,D]=v.useState(null),H=KE(N),z=H?.width??0,L=H?.height??0,ee=r+(i!=="center"?"-"+i:""),le=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},be=Array.isArray(f)?f:[f],J=be.length>0,Q={padding:le,boundary:be.filter(iP),altBoundary:J},{refs:ie,floatingStyles:he,placement:q,isPositioned:se,middlewareData:ne}=G1({strategy:"fixed",placement:ee,whileElementsMounted:(...ce)=>M1(...ce,{animationFrame:w==="always"}),elements:{reference:x.anchor},middleware:[q1({mainAxis:o+L,alignmentAxis:l}),d&&Z1({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?K1():void 0,...Q}),d&&J1({...Q}),Y1({...Q,apply:({elements:ce,rects:ye,availableWidth:Pe,availableHeight:He})=>{const{width:$e,height:We}=ye.reference,dt=ce.floating.style;dt.setProperty("--radix-popper-available-width",`${Pe}px`),dt.setProperty("--radix-popper-available-height",`${He}px`),dt.setProperty("--radix-popper-anchor-width",`${$e}px`),dt.setProperty("--radix-popper-anchor-height",`${We}px`)}}),N&&X1({element:N,padding:c}),aP({arrowWidth:z,arrowHeight:L}),y&&Q1({strategy:"referenceHidden",...Q})]}),[te,Y]=Hg(q),Te=Wn(b);bt(()=>{se&&Te?.()},[se,Te]);const Qe=ne.arrow?.x,xe=ne.arrow?.y,Ne=ne.arrow?.centerOffset!==0,[_e,Ee]=v.useState();return bt(()=>{E&&Ee(window.getComputedStyle(E).zIndex)},[E]),g.jsx("div",{ref:ie.setFloating,"data-radix-popper-content-wrapper":"",style:{...he,transform:se?he.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:_e,"--radix-popper-transform-origin":[ne.transformOrigin?.x,ne.transformOrigin?.y].join(" "),...ne.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(rP,{scope:n,placedSide:te,onArrowChange:D,arrowX:Qe,arrowY:xe,shouldHideArrow:Ne,children:g.jsx(Fe.div,{"data-side":te,"data-align":Y,..._,ref:O,style:{..._.style,animation:se?void 0:"none"}})})})});Vg.displayName=iu;var Ug="PopperArrow",sP={top:"bottom",right:"left",bottom:"top",left:"right"},Bg=v.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=oP(Ug,r),l=sP[i.placedSide];return g.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[l]: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:g.jsx(tP,{...o,ref:n,style:{...o.style,display:"block"}})})});Bg.displayName=Ug;function iP(e){return e!==null}var aP=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,l=o.arrow?.centerOffset!==0,c=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[f,p]=Hg(n),h={start:"0%",center:"50%",end:"100%"}[p],y=(o.arrow?.x??0)+c/2,w=(o.arrow?.y??0)+d/2;let b="",_="";return f==="bottom"?(b=l?h:`${y}px`,_=`${-d}px`):f==="top"?(b=l?h:`${y}px`,_=`${r.floating.height+d}px`):f==="right"?(b=`${-d}px`,_=l?h:`${w}px`):f==="left"&&(b=`${r.floating.width+d}px`,_=l?h:`${w}px`),{data:{x:b,y:_}}}});function Hg(e){const[t,n="center"]=e.split("-");return[t,n]}var au=$g,lu=zg,cu=Vg,uu=Bg,du="rovingFocusGroup.onEntryFocus",lP={bubbles:!1,cancelable:!0},$s="RovingFocusGroup",[fu,Wg,cP]=wc($s),[uP,Gg]=Un($s,[cP]),[dP,fP]=uP($s),jg=v.forwardRef((e,t)=>g.jsx(fu.Provider,{scope:e.__scopeRovingFocusGroup,children:g.jsx(fu.Slot,{scope:e.__scopeRovingFocusGroup,children:g.jsx(hP,{...e,ref:t})})}));jg.displayName=$s;var hP=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:d,onEntryFocus:f,preventScrollOnEntryFocus:p=!1,...h}=e,y=v.useRef(null),w=Ye(t,y),b=xc(i),[_,x]=po({prop:l,defaultProp:c??null,onChange:d,caller:$s}),[E,A]=v.useState(!1),O=Wn(f),N=Wg(n),D=v.useRef(!1),[H,z]=v.useState(0);return v.useEffect(()=>{const L=y.current;if(L)return L.addEventListener(du,O),()=>L.removeEventListener(du,O)},[O]),g.jsx(dP,{scope:n,orientation:r,dir:b,loop:o,currentTabStopId:_,onItemFocus:v.useCallback(L=>x(L),[x]),onItemShiftTab:v.useCallback(()=>A(!0),[]),onFocusableItemAdd:v.useCallback(()=>z(L=>L+1),[]),onFocusableItemRemove:v.useCallback(()=>z(L=>L-1),[]),children:g.jsx(Fe.div,{tabIndex:E||H===0?-1:0,"data-orientation":r,...h,ref:w,style:{outline:"none",...e.style},onMouseDown:ge(e.onMouseDown,()=>{D.current=!0}),onFocus:ge(e.onFocus,L=>{const ee=!D.current;if(L.target===L.currentTarget&&ee&&!E){const le=new CustomEvent(du,lP);if(L.currentTarget.dispatchEvent(le),!le.defaultPrevented){const be=N().filter(q=>q.focusable),J=be.find(q=>q.active),Q=be.find(q=>q.id===_),he=[J,Q,...be].filter(Boolean).map(q=>q.ref.current);Kg(he,p)}}D.current=!1}),onBlur:ge(e.onBlur,()=>A(!1))})})}),qg="RovingFocusGroupItem",Zg=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,children:l,...c}=e,d=Hn(),f=i||d,p=fP(qg,n),h=p.currentTabStopId===f,y=Wg(n),{onFocusableItemAdd:w,onFocusableItemRemove:b,currentTabStopId:_}=p;return v.useEffect(()=>{if(r)return w(),()=>b()},[r,w,b]),g.jsx(fu.ItemSlot,{scope:n,id:f,focusable:r,active:o,children:g.jsx(Fe.span,{tabIndex:h?0:-1,"data-orientation":p.orientation,...c,ref:t,onMouseDown:ge(e.onMouseDown,x=>{r?p.onItemFocus(f):x.preventDefault()}),onFocus:ge(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:ge(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){p.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const E=mP(x,p.orientation,p.dir);if(E!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let O=y().filter(N=>N.focusable).map(N=>N.ref.current);if(E==="last")O.reverse();else if(E==="prev"||E==="next"){E==="prev"&&O.reverse();const N=O.indexOf(x.currentTarget);O=p.loop?vP(O,N+1):O.slice(N+1)}setTimeout(()=>Kg(O))}}),children:typeof l=="function"?l({isCurrentTabStop:h,hasTabStop:_!=null}):l})})});Zg.displayName=qg;var pP={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function gP(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function mP(e,t,n){const r=gP(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return pP[r]}function Kg(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function vP(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var yP=jg,wP=Zg,hu=["Enter"," "],bP=["ArrowDown","PageUp","Home"],Jg=["ArrowUp","PageDown","End"],_P=[...bP,...Jg],SP={ltr:[...hu,"ArrowRight"],rtl:[...hu,"ArrowLeft"]},xP={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ls="Menu",[zs,CP,EP]=wc(Ls),[yo,Yg]=Un(Ls,[EP,Xo,Gg]),ca=Xo(),Qg=Gg(),[PP,wo]=yo(Ls),[AP,Vs]=yo(Ls),Xg=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:l=!0}=e,c=ca(t),[d,f]=v.useState(null),p=v.useRef(!1),h=Wn(i),y=xc(o);return v.useEffect(()=>{const w=()=>{p.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>p.current=!1;return document.addEventListener("keydown",w,{capture:!0}),()=>{document.removeEventListener("keydown",w,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),g.jsx(au,{...c,children:g.jsx(PP,{scope:t,open:n,onOpenChange:h,content:d,onContentChange:f,children:g.jsx(AP,{scope:t,onClose:v.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:p,dir:y,modal:l,children:r})})})};Xg.displayName=Ls;var OP="MenuAnchor",pu=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=ca(n);return g.jsx(lu,{...o,...r,ref:t})});pu.displayName=OP;var gu="MenuPortal",[TP,em]=yo(gu,{forceMount:void 0}),tm=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=wo(gu,t);return g.jsx(TP,{scope:t,forceMount:n,children:g.jsx(Bn,{present:n||i.open,children:g.jsx(Ds,{asChild:!0,container:o,children:r})})})};tm.displayName=gu;var On="MenuContent",[IP,mu]=yo(On),nm=v.forwardRef((e,t)=>{const n=em(On,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=wo(On,e.__scopeMenu),l=Vs(On,e.__scopeMenu);return g.jsx(zs.Provider,{scope:e.__scopeMenu,children:g.jsx(Bn,{present:r||i.open,children:g.jsx(zs.Slot,{scope:e.__scopeMenu,children:l.modal?g.jsx(NP,{...o,ref:t}):g.jsx(kP,{...o,ref:t})})})})}),NP=v.forwardRef((e,t)=>{const n=wo(On,e.__scopeMenu),r=v.useRef(null),o=Ye(t,r);return v.useEffect(()=>{const i=r.current;if(i)return Rc(i)},[]),g.jsx(vu,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ge(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),kP=v.forwardRef((e,t)=>{const n=wo(On,e.__scopeMenu);return g.jsx(vu,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),DP=ho("MenuContent.ScrollLock"),vu=v.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:d,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:h,onInteractOutside:y,onDismiss:w,disableOutsideScroll:b,..._}=e,x=wo(On,n),E=Vs(On,n),A=ca(n),O=Qg(n),N=CP(n),[D,H]=v.useState(null),z=v.useRef(null),L=Ye(t,z,x.onContentChange),ee=v.useRef(0),le=v.useRef(""),be=v.useRef(0),J=v.useRef(null),Q=v.useRef("right"),ie=v.useRef(0),he=b?ji:v.Fragment,q=b?{as:DP,allowPinchZoom:!0}:void 0,se=te=>{const Y=le.current+te,Te=N().filter(ce=>!ce.disabled),Qe=document.activeElement,xe=Te.find(ce=>ce.ref.current===Qe)?.textValue,Ne=Te.map(ce=>ce.textValue),_e=GP(Ne,Y,xe),Ee=Te.find(ce=>ce.textValue===_e)?.ref.current;(function ce(ye){le.current=ye,window.clearTimeout(ee.current),ye!==""&&(ee.current=window.setTimeout(()=>ce(""),1e3))})(Y),Ee&&setTimeout(()=>Ee.focus())};v.useEffect(()=>()=>window.clearTimeout(ee.current),[]),Oc();const ne=v.useCallback(te=>Q.current===J.current?.side&&qP(te,J.current?.area),[]);return g.jsx(IP,{scope:n,searchRef:le,onItemEnter:v.useCallback(te=>{ne(te)&&te.preventDefault()},[ne]),onItemLeave:v.useCallback(te=>{ne(te)||(z.current?.focus(),H(null))},[ne]),onTriggerLeave:v.useCallback(te=>{ne(te)&&te.preventDefault()},[ne]),pointerGraceTimerRef:be,onPointerGraceIntentChange:v.useCallback(te=>{J.current=te},[]),children:g.jsx(he,{...q,children:g.jsx(Vi,{asChild:!0,trapped:o,onMountAutoFocus:ge(i,te=>{te.preventDefault(),z.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:g.jsx(ks,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:h,onInteractOutside:y,onDismiss:w,children:g.jsx(yP,{asChild:!0,...O,dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:D,onCurrentTabStopIdChange:H,onEntryFocus:ge(d,te=>{E.isUsingKeyboardRef.current||te.preventDefault()}),preventScrollOnEntryFocus:!0,children:g.jsx(cu,{role:"menu","aria-orientation":"vertical","data-state":wm(x.open),"data-radix-menu-content":"",dir:E.dir,...A,..._,ref:L,style:{outline:"none",..._.style},onKeyDown:ge(_.onKeyDown,te=>{const Te=te.target.closest("[data-radix-menu-content]")===te.currentTarget,Qe=te.ctrlKey||te.altKey||te.metaKey,xe=te.key.length===1;Te&&(te.key==="Tab"&&te.preventDefault(),!Qe&&xe&&se(te.key));const Ne=z.current;if(te.target!==Ne||!_P.includes(te.key))return;te.preventDefault();const Ee=N().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);Jg.includes(te.key)&&Ee.reverse(),HP(Ee)}),onBlur:ge(e.onBlur,te=>{te.currentTarget.contains(te.target)||(window.clearTimeout(ee.current),le.current="")}),onPointerMove:ge(e.onPointerMove,Bs(te=>{const Y=te.target,Te=ie.current!==te.clientX;if(te.currentTarget.contains(Y)&&Te){const Qe=te.clientX>ie.current?"right":"left";Q.current=Qe,ie.current=te.clientX}}))})})})})})})});nm.displayName=On;var RP="MenuGroup",yu=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(Fe.div,{role:"group",...r,ref:t})});yu.displayName=RP;var MP="MenuLabel",rm=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(Fe.div,{...r,ref:t})});rm.displayName=MP;var ua="MenuItem",om="menu.itemSelect",da=v.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=v.useRef(null),l=Vs(ua,e.__scopeMenu),c=mu(ua,e.__scopeMenu),d=Ye(t,i),f=v.useRef(!1),p=()=>{const h=i.current;if(!n&&h){const y=new CustomEvent(om,{bubbles:!0,cancelable:!0});h.addEventListener(om,w=>r?.(w),{once:!0}),Yh(h,y),y.defaultPrevented?f.current=!1:l.onClose()}};return g.jsx(sm,{...o,ref:d,disabled:n,onClick:ge(e.onClick,p),onPointerDown:h=>{e.onPointerDown?.(h),f.current=!0},onPointerUp:ge(e.onPointerUp,h=>{f.current||h.currentTarget?.click()}),onKeyDown:ge(e.onKeyDown,h=>{const y=c.searchRef.current!=="";n||y&&h.key===" "||hu.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});da.displayName=ua;var sm=v.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,l=mu(ua,n),c=Qg(n),d=v.useRef(null),f=Ye(t,d),[p,h]=v.useState(!1),[y,w]=v.useState("");return v.useEffect(()=>{const b=d.current;b&&w((b.textContent??"").trim())},[i.children]),g.jsx(zs.ItemSlot,{scope:n,disabled:r,textValue:o??y,children:g.jsx(wP,{asChild:!0,...c,focusable:!r,children:g.jsx(Fe.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:f,onPointerMove:ge(e.onPointerMove,Bs(b=>{r?l.onItemLeave(b):(l.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ge(e.onPointerLeave,Bs(b=>l.onItemLeave(b))),onFocus:ge(e.onFocus,()=>h(!0)),onBlur:ge(e.onBlur,()=>h(!1))})})})}),FP="MenuCheckboxItem",im=v.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return g.jsx(dm,{scope:e.__scopeMenu,checked:n,children:g.jsx(da,{role:"menuitemcheckbox","aria-checked":fa(n)?"mixed":n,...o,ref:t,"data-state":bu(n),onSelect:ge(o.onSelect,()=>r?.(fa(n)?!0:!n),{checkForDefaultPrevented:!1})})})});im.displayName=FP;var am="MenuRadioGroup",[$P,LP]=yo(am,{value:void 0,onValueChange:()=>{}}),lm=v.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=Wn(r);return g.jsx($P,{scope:e.__scopeMenu,value:n,onValueChange:i,children:g.jsx(yu,{...o,ref:t})})});lm.displayName=am;var cm="MenuRadioItem",um=v.forwardRef((e,t)=>{const{value:n,...r}=e,o=LP(cm,e.__scopeMenu),i=n===o.value;return g.jsx(dm,{scope:e.__scopeMenu,checked:i,children:g.jsx(da,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":bu(i),onSelect:ge(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});um.displayName=cm;var wu="MenuItemIndicator",[dm,zP]=yo(wu,{checked:!1}),fm=v.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=zP(wu,n);return g.jsx(Bn,{present:r||fa(i.checked)||i.checked===!0,children:g.jsx(Fe.span,{...o,ref:t,"data-state":bu(i.checked)})})});fm.displayName=wu;var VP="MenuSeparator",hm=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(Fe.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});hm.displayName=VP;var UP="MenuArrow",pm=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=ca(n);return g.jsx(uu,{...o,...r,ref:t})});pm.displayName=UP;var BP="MenuSub",[M5,gm]=yo(BP),Us="MenuSubTrigger",mm=v.forwardRef((e,t)=>{const n=wo(Us,e.__scopeMenu),r=Vs(Us,e.__scopeMenu),o=gm(Us,e.__scopeMenu),i=mu(Us,e.__scopeMenu),l=v.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:d}=i,f={__scopeMenu:e.__scopeMenu},p=v.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return v.useEffect(()=>p,[p]),v.useEffect(()=>{const h=c.current;return()=>{window.clearTimeout(h),d(null)}},[c,d]),g.jsx(pu,{asChild:!0,...f,children:g.jsx(sm,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":wm(n.open),...e,ref:Fi(t,o.onTriggerChange),onClick:h=>{e.onClick?.(h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ge(e.onPointerMove,Bs(h=>{i.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(i.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100))})),onPointerLeave:ge(e.onPointerLeave,Bs(h=>{p();const y=n.content?.getBoundingClientRect();if(y){const w=n.content?.dataset.side,b=w==="right",_=b?-5:5,x=y[b?"left":"right"],E=y[b?"right":"left"];i.onPointerGraceIntentChange({area:[{x:h.clientX+_,y:h.clientY},{x,y:y.top},{x:E,y:y.top},{x:E,y:y.bottom},{x,y:y.bottom}],side:w}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(h),h.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:ge(e.onKeyDown,h=>{const y=i.searchRef.current!=="";e.disabled||y&&h.key===" "||SP[r.dir].includes(h.key)&&(n.onOpenChange(!0),n.content?.focus(),h.preventDefault())})})})});mm.displayName=Us;var vm="MenuSubContent",ym=v.forwardRef((e,t)=>{const n=em(On,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=wo(On,e.__scopeMenu),l=Vs(On,e.__scopeMenu),c=gm(vm,e.__scopeMenu),d=v.useRef(null),f=Ye(t,d);return g.jsx(zs.Provider,{scope:e.__scopeMenu,children:g.jsx(Bn,{present:r||i.open,children:g.jsx(zs.Slot,{scope:e.__scopeMenu,children:g.jsx(vu,{id:c.contentId,"aria-labelledby":c.triggerId,...o,ref:f,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{l.isUsingKeyboardRef.current&&d.current?.focus(),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:ge(e.onFocusOutside,p=>{p.target!==c.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:ge(e.onEscapeKeyDown,p=>{l.onClose(),p.preventDefault()}),onKeyDown:ge(e.onKeyDown,p=>{const h=p.currentTarget.contains(p.target),y=xP[l.dir].includes(p.key);h&&y&&(i.onOpenChange(!1),c.trigger?.focus(),p.preventDefault())})})})})})});ym.displayName=vm;function wm(e){return e?"open":"closed"}function fa(e){return e==="indeterminate"}function bu(e){return fa(e)?"indeterminate":e?"checked":"unchecked"}function HP(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function WP(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function GP(e,t,n){const o=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let l=WP(e,Math.max(i,0));o.length===1&&(l=l.filter(f=>f!==n));const d=l.find(f=>f.toLowerCase().startsWith(o.toLowerCase()));return d!==n?d:void 0}function jP(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,l=t.length-1;i<t.length;l=i++){const c=t[i],d=t[l],f=c.x,p=c.y,h=d.x,y=d.y;p>r!=y>r&&n<(h-f)*(r-p)/(y-p)+f&&(o=!o)}return o}function qP(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return jP(n,t)}function Bs(e){return t=>t.pointerType==="mouse"?e(t):void 0}var ZP=Xg,KP=pu,JP=tm,YP=nm,QP=yu,XP=rm,eA=da,tA=im,nA=lm,rA=um,oA=fm,sA=hm,iA=pm,aA=mm,lA=ym,ha="DropdownMenu",[cA]=Un(ha,[Yg]),qt=Yg(),[uA,bm]=cA(ha),_m=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:l,modal:c=!0}=e,d=qt(t),f=v.useRef(null),[p,h]=po({prop:o,defaultProp:i??!1,onChange:l,caller:ha});return g.jsx(uA,{scope:t,triggerId:Hn(),triggerRef:f,contentId:Hn(),open:p,onOpenChange:h,onOpenToggle:v.useCallback(()=>h(y=>!y),[h]),modal:c,children:g.jsx(ZP,{...d,open:p,onOpenChange:h,dir:r,modal:c,children:n})})};_m.displayName=ha;var Sm="DropdownMenuTrigger",xm=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=bm(Sm,n),l=qt(n);return g.jsx(KP,{asChild:!0,...l,children:g.jsx(Fe.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Fi(t,i.triggerRef),onPointerDown:ge(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(i.onOpenToggle(),i.open||c.preventDefault())}),onKeyDown:ge(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&i.onOpenToggle(),c.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});xm.displayName=Sm;var dA="DropdownMenuPortal",Cm=e=>{const{__scopeDropdownMenu:t,...n}=e,r=qt(t);return g.jsx(JP,{...r,...n})};Cm.displayName=dA;var Em="DropdownMenuContent",Pm=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=bm(Em,n),i=qt(n),l=v.useRef(!1);return g.jsx(YP,{id:o.contentId,"aria-labelledby":o.triggerId,...i,...r,ref:t,onCloseAutoFocus:ge(e.onCloseAutoFocus,c=>{l.current||o.triggerRef.current?.focus(),l.current=!1,c.preventDefault()}),onInteractOutside:ge(e.onInteractOutside,c=>{const d=c.detail.originalEvent,f=d.button===0&&d.ctrlKey===!0,p=d.button===2||f;(!o.modal||p)&&(l.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Pm.displayName=Em;var fA="DropdownMenuGroup",hA=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qt(n);return g.jsx(QP,{...o,...r,ref:t})});hA.displayName=fA;var pA="DropdownMenuLabel",gA=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qt(n);return g.jsx(XP,{...o,...r,ref:t})});gA.displayName=pA;var mA="DropdownMenuItem",Am=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qt(n);return g.jsx(eA,{...o,...r,ref:t})});Am.displayName=mA;var vA="DropdownMenuCheckboxItem",yA=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qt(n);return g.jsx(tA,{...o,...r,ref:t})});yA.displayName=vA;var wA="DropdownMenuRadioGroup",bA=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qt(n);return g.jsx(nA,{...o,...r,ref:t})});bA.displayName=wA;var _A="DropdownMenuRadioItem",SA=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qt(n);return g.jsx(rA,{...o,...r,ref:t})});SA.displayName=_A;var xA="DropdownMenuItemIndicator",CA=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qt(n);return g.jsx(oA,{...o,...r,ref:t})});CA.displayName=xA;var EA="DropdownMenuSeparator",PA=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qt(n);return g.jsx(sA,{...o,...r,ref:t})});PA.displayName=EA;var AA="DropdownMenuArrow",OA=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qt(n);return g.jsx(iA,{...o,...r,ref:t})});OA.displayName=AA;var TA="DropdownMenuSubTrigger",IA=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qt(n);return g.jsx(aA,{...o,...r,ref:t})});IA.displayName=TA;var NA="DropdownMenuSubContent",kA=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qt(n);return g.jsx(lA,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});kA.displayName=NA;var DA=_m,RA=xm,MA=Cm,FA=Pm,$A=Am,LA="Label",Om=v.forwardRef((e,t)=>g.jsx(Fe.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Om.displayName=LA;var zA=Om;function Tm(e,[t,n]){return Math.min(n,Math.max(t,e))}var VA=[" ","Enter","ArrowUp","ArrowDown"],UA=[" ","Enter"],bo="Select",[pa,ga,BA]=wc(bo),[es]=Un(bo,[BA,Xo]),ma=Xo(),[HA,Br]=es(bo),[WA,GA]=es(bo),Im=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:l,defaultValue:c,onValueChange:d,dir:f,name:p,autoComplete:h,disabled:y,required:w,form:b}=e,_=ma(t),[x,E]=v.useState(null),[A,O]=v.useState(null),[N,D]=v.useState(!1),H=xc(f),[z,L]=po({prop:r,defaultProp:o??!1,onChange:i,caller:bo}),[ee,le]=po({prop:l,defaultProp:c,onChange:d,caller:bo}),be=v.useRef(null),J=x?b||!!x.closest("form"):!0,[Q,ie]=v.useState(new Set),he=Array.from(Q).map(q=>q.props.value).join(";");return g.jsx(au,{..._,children:g.jsxs(HA,{required:w,scope:t,trigger:x,onTriggerChange:E,valueNode:A,onValueNodeChange:O,valueNodeHasChildren:N,onValueNodeHasChildrenChange:D,contentId:Hn(),value:ee,onValueChange:le,open:z,onOpenChange:L,dir:H,triggerPointerDownPosRef:be,disabled:y,children:[g.jsx(pa.Provider,{scope:t,children:g.jsx(WA,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(q=>{ie(se=>new Set(se).add(q))},[]),onNativeOptionRemove:v.useCallback(q=>{ie(se=>{const ne=new Set(se);return ne.delete(q),ne})},[]),children:n})}),J?g.jsxs(Qm,{"aria-hidden":!0,required:w,tabIndex:-1,name:p,autoComplete:h,value:ee,onChange:q=>le(q.target.value),disabled:y,form:b,children:[ee===void 0?g.jsx("option",{value:""}):null,Array.from(Q)]},he):null]})})};Im.displayName=bo;var Nm="SelectTrigger",km=v.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=ma(n),l=Br(Nm,n),c=l.disabled||r,d=Ye(t,l.onTriggerChange),f=ga(n),p=v.useRef("touch"),[h,y,w]=ev(_=>{const x=f().filter(O=>!O.disabled),E=x.find(O=>O.value===l.value),A=tv(x,_,E);A!==void 0&&l.onValueChange(A.value)}),b=_=>{c||(l.onOpenChange(!0),w()),_&&(l.triggerPointerDownPosRef.current={x:Math.round(_.pageX),y:Math.round(_.pageY)})};return g.jsx(lu,{asChild:!0,...i,children:g.jsx(Fe.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":Xm(l.value)?"":void 0,...o,ref:d,onClick:ge(o.onClick,_=>{_.currentTarget.focus(),p.current!=="mouse"&&b(_)}),onPointerDown:ge(o.onPointerDown,_=>{p.current=_.pointerType;const x=_.target;x.hasPointerCapture(_.pointerId)&&x.releasePointerCapture(_.pointerId),_.button===0&&_.ctrlKey===!1&&_.pointerType==="mouse"&&(b(_),_.preventDefault())}),onKeyDown:ge(o.onKeyDown,_=>{const x=h.current!=="";!(_.ctrlKey||_.altKey||_.metaKey)&&_.key.length===1&&y(_.key),!(x&&_.key===" ")&&VA.includes(_.key)&&(b(),_.preventDefault())})})})});km.displayName=Nm;var Dm="SelectValue",Rm=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:l="",...c}=e,d=Br(Dm,n),{onValueNodeHasChildrenChange:f}=d,p=i!==void 0,h=Ye(t,d.onValueNodeChange);return bt(()=>{f(p)},[f,p]),g.jsx(Fe.span,{...c,ref:h,style:{pointerEvents:"none"},children:Xm(d.value)?g.jsx(g.Fragment,{children:l}):i})});Rm.displayName=Dm;var jA="SelectIcon",Mm=v.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return g.jsx(Fe.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Mm.displayName=jA;var qA="SelectPortal",Fm=e=>g.jsx(Ds,{asChild:!0,...e});Fm.displayName=qA;var _o="SelectContent",$m=v.forwardRef((e,t)=>{const n=Br(_o,e.__scopeSelect),[r,o]=v.useState();if(bt(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?Ni.createPortal(g.jsx(Lm,{scope:e.__scopeSelect,children:g.jsx(pa.Slot,{scope:e.__scopeSelect,children:g.jsx("div",{children:e.children})})}),i):null}return g.jsx(zm,{...e,ref:t})});$m.displayName=_o;var Zn=10,[Lm,Hr]=es(_o),ZA="SelectContentImpl",KA=ho("SelectContent.RemoveScroll"),zm=v.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:l,side:c,sideOffset:d,align:f,alignOffset:p,arrowPadding:h,collisionBoundary:y,collisionPadding:w,sticky:b,hideWhenDetached:_,avoidCollisions:x,...E}=e,A=Br(_o,n),[O,N]=v.useState(null),[D,H]=v.useState(null),z=Ye(t,ce=>N(ce)),[L,ee]=v.useState(null),[le,be]=v.useState(null),J=ga(n),[Q,ie]=v.useState(!1),he=v.useRef(!1);v.useEffect(()=>{if(O)return Rc(O)},[O]),Oc();const q=v.useCallback(ce=>{const[ye,...Pe]=J().map(We=>We.ref.current),[He]=Pe.slice(-1),$e=document.activeElement;for(const We of ce)if(We===$e||(We?.scrollIntoView({block:"nearest"}),We===ye&&D&&(D.scrollTop=0),We===He&&D&&(D.scrollTop=D.scrollHeight),We?.focus(),document.activeElement!==$e))return},[J,D]),se=v.useCallback(()=>q([L,O]),[q,L,O]);v.useEffect(()=>{Q&&se()},[Q,se]);const{onOpenChange:ne,triggerPointerDownPosRef:te}=A;v.useEffect(()=>{if(O){let ce={x:0,y:0};const ye=He=>{ce={x:Math.abs(Math.round(He.pageX)-(te.current?.x??0)),y:Math.abs(Math.round(He.pageY)-(te.current?.y??0))}},Pe=He=>{ce.x<=10&&ce.y<=10?He.preventDefault():O.contains(He.target)||ne(!1),document.removeEventListener("pointermove",ye),te.current=null};return te.current!==null&&(document.addEventListener("pointermove",ye),document.addEventListener("pointerup",Pe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ye),document.removeEventListener("pointerup",Pe,{capture:!0})}}},[O,ne,te]),v.useEffect(()=>{const ce=()=>ne(!1);return window.addEventListener("blur",ce),window.addEventListener("resize",ce),()=>{window.removeEventListener("blur",ce),window.removeEventListener("resize",ce)}},[ne]);const[Y,Te]=ev(ce=>{const ye=J().filter($e=>!$e.disabled),Pe=ye.find($e=>$e.ref.current===document.activeElement),He=tv(ye,ce,Pe);He&&setTimeout(()=>He.ref.current.focus())}),Qe=v.useCallback((ce,ye,Pe)=>{const He=!he.current&&!Pe;(A.value!==void 0&&A.value===ye||He)&&(ee(ce),He&&(he.current=!0))},[A.value]),xe=v.useCallback(()=>O?.focus(),[O]),Ne=v.useCallback((ce,ye,Pe)=>{const He=!he.current&&!Pe;(A.value!==void 0&&A.value===ye||He)&&be(ce)},[A.value]),_e=r==="popper"?_u:Vm,Ee=_e===_u?{side:c,sideOffset:d,align:f,alignOffset:p,arrowPadding:h,collisionBoundary:y,collisionPadding:w,sticky:b,hideWhenDetached:_,avoidCollisions:x}:{};return g.jsx(Lm,{scope:n,content:O,viewport:D,onViewportChange:H,itemRefCallback:Qe,selectedItem:L,onItemLeave:xe,itemTextRefCallback:Ne,focusSelectedItem:se,selectedItemText:le,position:r,isPositioned:Q,searchRef:Y,children:g.jsx(ji,{as:KA,allowPinchZoom:!0,children:g.jsx(Vi,{asChild:!0,trapped:A.open,onMountAutoFocus:ce=>{ce.preventDefault()},onUnmountAutoFocus:ge(o,ce=>{A.trigger?.focus({preventScroll:!0}),ce.preventDefault()}),children:g.jsx(ks,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:ce=>ce.preventDefault(),onDismiss:()=>A.onOpenChange(!1),children:g.jsx(_e,{role:"listbox",id:A.contentId,"data-state":A.open?"open":"closed",dir:A.dir,onContextMenu:ce=>ce.preventDefault(),...E,...Ee,onPlaced:()=>ie(!0),ref:z,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:ge(E.onKeyDown,ce=>{const ye=ce.ctrlKey||ce.altKey||ce.metaKey;if(ce.key==="Tab"&&ce.preventDefault(),!ye&&ce.key.length===1&&Te(ce.key),["ArrowUp","ArrowDown","Home","End"].includes(ce.key)){let He=J().filter($e=>!$e.disabled).map($e=>$e.ref.current);if(["ArrowUp","End"].includes(ce.key)&&(He=He.slice().reverse()),["ArrowUp","ArrowDown"].includes(ce.key)){const $e=ce.target,We=He.indexOf($e);He=He.slice(We+1)}setTimeout(()=>q(He)),ce.preventDefault()}})})})})})})});zm.displayName=ZA;var JA="SelectItemAlignedPosition",Vm=v.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=Br(_o,n),l=Hr(_o,n),[c,d]=v.useState(null),[f,p]=v.useState(null),h=Ye(t,z=>p(z)),y=ga(n),w=v.useRef(!1),b=v.useRef(!0),{viewport:_,selectedItem:x,selectedItemText:E,focusSelectedItem:A}=l,O=v.useCallback(()=>{if(i.trigger&&i.valueNode&&c&&f&&_&&x&&E){const z=i.trigger.getBoundingClientRect(),L=f.getBoundingClientRect(),ee=i.valueNode.getBoundingClientRect(),le=E.getBoundingClientRect();if(i.dir!=="rtl"){const $e=le.left-L.left,We=ee.left-$e,dt=z.left-We,et=z.width+dt,an=Math.max(et,L.width),rr=window.innerWidth-Zn,vt=Tm(We,[Zn,Math.max(Zn,rr-an)]);c.style.minWidth=et+"px",c.style.left=vt+"px"}else{const $e=L.right-le.right,We=window.innerWidth-ee.right-$e,dt=window.innerWidth-z.right-We,et=z.width+dt,an=Math.max(et,L.width),rr=window.innerWidth-Zn,vt=Tm(We,[Zn,Math.max(Zn,rr-an)]);c.style.minWidth=et+"px",c.style.right=vt+"px"}const be=y(),J=window.innerHeight-Zn*2,Q=_.scrollHeight,ie=window.getComputedStyle(f),he=parseInt(ie.borderTopWidth,10),q=parseInt(ie.paddingTop,10),se=parseInt(ie.borderBottomWidth,10),ne=parseInt(ie.paddingBottom,10),te=he+q+Q+ne+se,Y=Math.min(x.offsetHeight*5,te),Te=window.getComputedStyle(_),Qe=parseInt(Te.paddingTop,10),xe=parseInt(Te.paddingBottom,10),Ne=z.top+z.height/2-Zn,_e=J-Ne,Ee=x.offsetHeight/2,ce=x.offsetTop+Ee,ye=he+q+ce,Pe=te-ye;if(ye<=Ne){const $e=be.length>0&&x===be[be.length-1].ref.current;c.style.bottom="0px";const We=f.clientHeight-_.offsetTop-_.offsetHeight,dt=Math.max(_e,Ee+($e?xe:0)+We+se),et=ye+dt;c.style.height=et+"px"}else{const $e=be.length>0&&x===be[0].ref.current;c.style.top="0px";const dt=Math.max(Ne,he+_.offsetTop+($e?Qe:0)+Ee)+Pe;c.style.height=dt+"px",_.scrollTop=ye-Ne+_.offsetTop}c.style.margin=`${Zn}px 0`,c.style.minHeight=Y+"px",c.style.maxHeight=J+"px",r?.(),requestAnimationFrame(()=>w.current=!0)}},[y,i.trigger,i.valueNode,c,f,_,x,E,i.dir,r]);bt(()=>O(),[O]);const[N,D]=v.useState();bt(()=>{f&&D(window.getComputedStyle(f).zIndex)},[f]);const H=v.useCallback(z=>{z&&b.current===!0&&(O(),A?.(),b.current=!1)},[O,A]);return g.jsx(QA,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:w,onScrollButtonChange:H,children:g.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:g.jsx(Fe.div,{...o,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Vm.displayName=JA;var YA="SelectPopperPosition",_u=v.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Zn,...i}=e,l=ma(n);return g.jsx(cu,{...l,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});_u.displayName=YA;var[QA,Su]=es(_o,{}),xu="SelectViewport",Um=v.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,i=Hr(xu,n),l=Su(xu,n),c=Ye(t,i.onViewportChange),d=v.useRef(0);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),g.jsx(pa.Slot,{scope:n,children:g.jsx(Fe.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:ge(o.onScroll,f=>{const p=f.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:y}=l;if(y?.current&&h){const w=Math.abs(d.current-p.scrollTop);if(w>0){const b=window.innerHeight-Zn*2,_=parseFloat(h.style.minHeight),x=parseFloat(h.style.height),E=Math.max(_,x);if(E<b){const A=E+w,O=Math.min(b,A),N=A-O;h.style.height=O+"px",h.style.bottom==="0px"&&(p.scrollTop=N>0?N:0,h.style.justifyContent="flex-end")}}}d.current=p.scrollTop})})})]})});Um.displayName=xu;var Bm="SelectGroup",[XA,eO]=es(Bm),tO=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Hn();return g.jsx(XA,{scope:n,id:o,children:g.jsx(Fe.div,{role:"group","aria-labelledby":o,...r,ref:t})})});tO.displayName=Bm;var Hm="SelectLabel",nO=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=eO(Hm,n);return g.jsx(Fe.div,{id:o.id,...r,ref:t})});nO.displayName=Hm;var va="SelectItem",[rO,Wm]=es(va),Gm=v.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...l}=e,c=Br(va,n),d=Hr(va,n),f=c.value===r,[p,h]=v.useState(i??""),[y,w]=v.useState(!1),b=Ye(t,A=>d.itemRefCallback?.(A,r,o)),_=Hn(),x=v.useRef("touch"),E=()=>{o||(c.onValueChange(r),c.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return g.jsx(rO,{scope:n,value:r,disabled:o,textId:_,isSelected:f,onItemTextChange:v.useCallback(A=>{h(O=>O||(A?.textContent??"").trim())},[]),children:g.jsx(pa.ItemSlot,{scope:n,value:r,disabled:o,textValue:p,children:g.jsx(Fe.div,{role:"option","aria-labelledby":_,"data-highlighted":y?"":void 0,"aria-selected":f&&y,"data-state":f?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...l,ref:b,onFocus:ge(l.onFocus,()=>w(!0)),onBlur:ge(l.onBlur,()=>w(!1)),onClick:ge(l.onClick,()=>{x.current!=="mouse"&&E()}),onPointerUp:ge(l.onPointerUp,()=>{x.current==="mouse"&&E()}),onPointerDown:ge(l.onPointerDown,A=>{x.current=A.pointerType}),onPointerMove:ge(l.onPointerMove,A=>{x.current=A.pointerType,o?d.onItemLeave?.():x.current==="mouse"&&A.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ge(l.onPointerLeave,A=>{A.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:ge(l.onKeyDown,A=>{d.searchRef?.current!==""&&A.key===" "||(UA.includes(A.key)&&E(),A.key===" "&&A.preventDefault())})})})})});Gm.displayName=va;var Hs="SelectItemText",jm=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,l=Br(Hs,n),c=Hr(Hs,n),d=Wm(Hs,n),f=GA(Hs,n),[p,h]=v.useState(null),y=Ye(t,E=>h(E),d.onItemTextChange,E=>c.itemTextRefCallback?.(E,d.value,d.disabled)),w=p?.textContent,b=v.useMemo(()=>g.jsx("option",{value:d.value,disabled:d.disabled,children:w},d.value),[d.disabled,d.value,w]),{onNativeOptionAdd:_,onNativeOptionRemove:x}=f;return bt(()=>(_(b),()=>x(b)),[_,x,b]),g.jsxs(g.Fragment,{children:[g.jsx(Fe.span,{id:d.textId,...i,ref:y}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Ni.createPortal(i.children,l.valueNode):null]})});jm.displayName=Hs;var qm="SelectItemIndicator",Zm=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Wm(qm,n).isSelected?g.jsx(Fe.span,{"aria-hidden":!0,...r,ref:t}):null});Zm.displayName=qm;var Cu="SelectScrollUpButton",Km=v.forwardRef((e,t)=>{const n=Hr(Cu,e.__scopeSelect),r=Su(Cu,e.__scopeSelect),[o,i]=v.useState(!1),l=Ye(t,r.onScrollButtonChange);return bt(()=>{if(n.viewport&&n.isPositioned){let c=function(){const f=d.scrollTop>0;i(f)};const d=n.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?g.jsx(Ym,{...e,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop-d.offsetHeight)}}):null});Km.displayName=Cu;var Eu="SelectScrollDownButton",Jm=v.forwardRef((e,t)=>{const n=Hr(Eu,e.__scopeSelect),r=Su(Eu,e.__scopeSelect),[o,i]=v.useState(!1),l=Ye(t,r.onScrollButtonChange);return bt(()=>{if(n.viewport&&n.isPositioned){let c=function(){const f=d.scrollHeight-d.clientHeight,p=Math.ceil(d.scrollTop)<f;i(p)};const d=n.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?g.jsx(Ym,{...e,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop+d.offsetHeight)}}):null});Jm.displayName=Eu;var Ym=v.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=Hr("SelectScrollButton",n),l=v.useRef(null),c=ga(n),d=v.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return v.useEffect(()=>()=>d(),[d]),bt(()=>{c().find(p=>p.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),g.jsx(Fe.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:ge(o.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:ge(o.onPointerMove,()=>{i.onItemLeave?.(),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:ge(o.onPointerLeave,()=>{d()})})}),oO="SelectSeparator",sO=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return g.jsx(Fe.div,{"aria-hidden":!0,...r,ref:t})});sO.displayName=oO;var Pu="SelectArrow",iO=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ma(n),i=Br(Pu,n),l=Hr(Pu,n);return i.open&&l.position==="popper"?g.jsx(uu,{...o,...r,ref:t}):null});iO.displayName=Pu;var aO="SelectBubbleInput",Qm=v.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=v.useRef(null),i=Ye(r,o),l=ZE(t);return v.useEffect(()=>{const c=o.current;if(!c)return;const d=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(d,"value").set;if(l!==t&&p){const h=new Event("change",{bubbles:!0});p.call(c,t),c.dispatchEvent(h)}},[l,t]),g.jsx(Fe.select,{...n,style:{...Qh,...n.style},ref:i,defaultValue:t})});Qm.displayName=aO;function Xm(e){return e===""||e===void 0}function ev(e){const t=Wn(e),n=v.useRef(""),r=v.useRef(0),o=v.useCallback(l=>{const c=n.current+l;t(c),(function d(f){n.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>d(""),1e3))})(c)},[t]),i=v.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function tv(e,t,n){const o=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let l=lO(e,Math.max(i,0));o.length===1&&(l=l.filter(f=>f!==n));const d=l.find(f=>f.textValue.toLowerCase().startsWith(o.toLowerCase()));return d!==n?d:void 0}function lO(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var cO=Im,uO=km,dO=Rm,fO=Mm,hO=Fm,pO=$m,gO=Um,mO=Gm,vO=jm,yO=Zm,wO=Km,bO=Jm,_O="Separator",nv="horizontal",SO=["horizontal","vertical"],rv=v.forwardRef((e,t)=>{const{decorative:n,orientation:r=nv,...o}=e,i=xO(r)?r:nv,c=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return g.jsx(Fe.div,{"data-orientation":i,...c,...o,ref:t})});rv.displayName=_O;function xO(e){return SO.includes(e)}var CO=rv,[ya]=Un("Tooltip",[Xo]),wa=Xo(),ov="TooltipProvider",EO=700,Au="tooltip.open",[PO,Ou]=ya(ov),sv=e=>{const{__scopeTooltip:t,delayDuration:n=EO,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,l=v.useRef(!0),c=v.useRef(!1),d=v.useRef(0);return v.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),g.jsx(PO,{scope:t,isOpenDelayedRef:l,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(d.current),l.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:v.useCallback(f=>{c.current=f},[]),disableHoverableContent:o,children:i})};sv.displayName=ov;var Ws="Tooltip",[AO,Gs]=ya(Ws),iv=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:i,disableHoverableContent:l,delayDuration:c}=e,d=Ou(Ws,e.__scopeTooltip),f=wa(t),[p,h]=v.useState(null),y=Hn(),w=v.useRef(0),b=l??d.disableHoverableContent,_=c??d.delayDuration,x=v.useRef(!1),[E,A]=po({prop:r,defaultProp:o??!1,onChange:z=>{z?(d.onOpen(),document.dispatchEvent(new CustomEvent(Au))):d.onClose(),i?.(z)},caller:Ws}),O=v.useMemo(()=>E?x.current?"delayed-open":"instant-open":"closed",[E]),N=v.useCallback(()=>{window.clearTimeout(w.current),w.current=0,x.current=!1,A(!0)},[A]),D=v.useCallback(()=>{window.clearTimeout(w.current),w.current=0,A(!1)},[A]),H=v.useCallback(()=>{window.clearTimeout(w.current),w.current=window.setTimeout(()=>{x.current=!0,A(!0),w.current=0},_)},[_,A]);return v.useEffect(()=>()=>{w.current&&(window.clearTimeout(w.current),w.current=0)},[]),g.jsx(au,{...f,children:g.jsx(AO,{scope:t,contentId:y,open:E,stateAttribute:O,trigger:p,onTriggerChange:h,onTriggerEnter:v.useCallback(()=>{d.isOpenDelayedRef.current?H():N()},[d.isOpenDelayedRef,H,N]),onTriggerLeave:v.useCallback(()=>{b?D():(window.clearTimeout(w.current),w.current=0)},[D,b]),onOpen:N,onClose:D,disableHoverableContent:b,children:n})})};iv.displayName=Ws;var Tu="TooltipTrigger",av=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Gs(Tu,n),i=Ou(Tu,n),l=wa(n),c=v.useRef(null),d=Ye(t,c,o.onTriggerChange),f=v.useRef(!1),p=v.useRef(!1),h=v.useCallback(()=>f.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),g.jsx(lu,{asChild:!0,...l,children:g.jsx(Fe.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:d,onPointerMove:ge(e.onPointerMove,y=>{y.pointerType!=="touch"&&!p.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),p.current=!0)}),onPointerLeave:ge(e.onPointerLeave,()=>{o.onTriggerLeave(),p.current=!1}),onPointerDown:ge(e.onPointerDown,()=>{o.open&&o.onClose(),f.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:ge(e.onFocus,()=>{f.current||o.onOpen()}),onBlur:ge(e.onBlur,o.onClose),onClick:ge(e.onClick,o.onClose)})})});av.displayName=Tu;var Iu="TooltipPortal",[OO,TO]=ya(Iu,{forceMount:void 0}),lv=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=Gs(Iu,t);return g.jsx(OO,{scope:t,forceMount:n,children:g.jsx(Bn,{present:n||i.open,children:g.jsx(Ds,{asChild:!0,container:o,children:r})})})};lv.displayName=Iu;var ts="TooltipContent",cv=v.forwardRef((e,t)=>{const n=TO(ts,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,l=Gs(ts,e.__scopeTooltip);return g.jsx(Bn,{present:r||l.open,children:l.disableHoverableContent?g.jsx(uv,{side:o,...i,ref:t}):g.jsx(IO,{side:o,...i,ref:t})})}),IO=v.forwardRef((e,t)=>{const n=Gs(ts,e.__scopeTooltip),r=Ou(ts,e.__scopeTooltip),o=v.useRef(null),i=Ye(t,o),[l,c]=v.useState(null),{trigger:d,onClose:f}=n,p=o.current,{onPointerInTransitChange:h}=r,y=v.useCallback(()=>{c(null),h(!1)},[h]),w=v.useCallback((b,_)=>{const x=b.currentTarget,E={x:b.clientX,y:b.clientY},A=RO(E,x.getBoundingClientRect()),O=MO(E,A),N=FO(_.getBoundingClientRect()),D=LO([...O,...N]);c(D),h(!0)},[h]);return v.useEffect(()=>()=>y(),[y]),v.useEffect(()=>{if(d&&p){const b=x=>w(x,p),_=x=>w(x,d);return d.addEventListener("pointerleave",b),p.addEventListener("pointerleave",_),()=>{d.removeEventListener("pointerleave",b),p.removeEventListener("pointerleave",_)}}},[d,p,w,y]),v.useEffect(()=>{if(l){const b=_=>{const x=_.target,E={x:_.clientX,y:_.clientY},A=d?.contains(x)||p?.contains(x),O=!$O(E,l);A?y():O&&(y(),f())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[d,p,l,f,y]),g.jsx(uv,{...e,ref:i})}),[NO,kO]=ya(Ws,{isInside:!1}),DO=Jh("TooltipContent"),uv=v.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:l,...c}=e,d=Gs(ts,n),f=wa(n),{onClose:p}=d;return v.useEffect(()=>(document.addEventListener(Au,p),()=>document.removeEventListener(Au,p)),[p]),v.useEffect(()=>{if(d.trigger){const h=y=>{y.target?.contains(d.trigger)&&p()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[d.trigger,p]),g.jsx(ks,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:h=>h.preventDefault(),onDismiss:p,children:g.jsxs(cu,{"data-state":d.stateAttribute,...f,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(DO,{children:r}),g.jsx(NO,{scope:n,isInside:!0,children:g.jsx(Wx,{id:d.contentId,role:"tooltip",children:o||r})})]})})});cv.displayName=ts;var dv="TooltipArrow",fv=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=wa(n);return kO(dv,n).isInside?null:g.jsx(uu,{...o,...r,ref:t})});fv.displayName=dv;function RO(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function MO(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function FO(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function $O(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,l=t.length-1;i<t.length;l=i++){const c=t[i],d=t[l],f=c.x,p=c.y,h=d.x,y=d.y;p>r!=y>r&&n<(h-f)*(r-p)/(y-p)+f&&(o=!o)}return o}function LO(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),zO(t)}function zO(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],l=t[t.length-2];if((i.x-l.x)*(o.y-l.y)>=(i.y-l.y)*(o.x-l.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],l=n[n.length-2];if((i.x-l.x)*(o.y-l.y)>=(i.y-l.y)*(o.x-l.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var VO=sv,UO=iv,BO=av,HO=lv,WO=cv,GO=fv;function hv(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=hv(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function pv(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=hv(e))&&(r&&(r+=" "),r+=t);return r}const jO=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},qO=(e,t)=>({classGroupId:e,validator:t}),gv=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ba="-",mv=[],ZO="arbitrary..",KO=e=>{const t=YO(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return JO(l);const c=l.split(ba),d=c[0]===""&&c.length>1?1:0;return vv(c,d,t)},getConflictingClassGroupIds:(l,c)=>{if(c){const d=r[l],f=n[l];return d?f?jO(f,d):d:f||mv}return n[l]||mv}}},vv=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const f=vv(e,t+1,i);if(f)return f}const l=n.validators;if(l===null)return;const c=t===0?e.join(ba):e.slice(t).join(ba),d=l.length;for(let f=0;f<d;f++){const p=l[f];if(p.validator(c))return p.classGroupId}},JO=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?ZO+r:void 0})(),YO=e=>{const{theme:t,classGroups:n}=e;return QO(n,t)},QO=(e,t)=>{const n=gv();for(const r in e){const o=e[r];Nu(o,n,r,t)}return n},Nu=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const l=e[i];XO(l,t,n,r)}},XO=(e,t,n,r)=>{if(typeof e=="string"){eT(e,t,n);return}if(typeof e=="function"){tT(e,t,n,r);return}nT(e,t,n,r)},eT=(e,t,n)=>{const r=e===""?t:yv(t,e);r.classGroupId=n},tT=(e,t,n,r)=>{if(rT(e)){Nu(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(qO(n,e))},nT=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let l=0;l<i;l++){const[c,d]=o[l];Nu(d,yv(t,c),n,r)}},yv=(e,t)=>{let n=e;const r=t.split(ba),o=r.length;for(let i=0;i<o;i++){const l=r[i];let c=n.nextPart.get(l);c||(c=gv(),n.nextPart.set(l,c)),n=c}return n},rT=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,oT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,l)=>{n[i]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let l=n[i];if(l!==void 0)return l;if((l=r[i])!==void 0)return o(i,l),l},set(i,l){i in n?n[i]=l:o(i,l)}}},ku="!",wv=":",sT=[],bv=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),iT=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let l=0,c=0,d=0,f;const p=o.length;for(let _=0;_<p;_++){const x=o[_];if(l===0&&c===0){if(x===wv){i.push(o.slice(d,_)),d=_+1;continue}if(x==="/"){f=_;continue}}x==="["?l++:x==="]"?l--:x==="("?c++:x===")"&&c--}const h=i.length===0?o:o.slice(d);let y=h,w=!1;h.endsWith(ku)?(y=h.slice(0,-1),w=!0):h.startsWith(ku)&&(y=h.slice(1),w=!0);const b=f&&f>d?f-d:void 0;return bv(i,w,y,b)};if(t){const o=t+wv,i=r;r=l=>l.startsWith(o)?i(l.slice(o.length)):bv(sT,!1,l,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},aT=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const l=n[i],c=l[0]==="[",d=t.has(l);c||d?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(l)):o.push(l)}return o.length>0&&(o.sort(),r.push(...o)),r}},lT=e=>({cache:oT(e.cacheSize),parseClassName:iT(e),sortModifiers:aT(e),...KO(e)}),cT=/\s+/,uT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,l=[],c=e.trim().split(cT);let d="";for(let f=c.length-1;f>=0;f-=1){const p=c[f],{isExternal:h,modifiers:y,hasImportantModifier:w,baseClassName:b,maybePostfixModifierPosition:_}=n(p);if(h){d=p+(d.length>0?" "+d:d);continue}let x=!!_,E=r(x?b.substring(0,_):b);if(!E){if(!x){d=p+(d.length>0?" "+d:d);continue}if(E=r(b),!E){d=p+(d.length>0?" "+d:d);continue}x=!1}const A=y.length===0?"":y.length===1?y[0]:i(y).join(":"),O=w?A+ku:A,N=O+E;if(l.indexOf(N)>-1)continue;l.push(N);const D=o(E,x);for(let H=0;H<D.length;++H){const z=D[H];l.push(O+z)}d=p+(d.length>0?" "+d:d)}return d},dT=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=_v(n))&&(o&&(o+=" "),o+=r);return o},_v=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=_v(e[r]))&&(n&&(n+=" "),n+=t);return n},fT=(e,...t)=>{let n,r,o,i;const l=d=>{const f=t.reduce((p,h)=>h(p),e());return n=lT(f),r=n.cache.get,o=n.cache.set,i=c,c(d)},c=d=>{const f=r(d);if(f)return f;const p=uT(d,n);return o(d,p),p};return i=l,(...d)=>i(dT(...d))},hT=[],Pt=e=>{const t=n=>n[e]||hT;return t.isThemeGetter=!0,t},Sv=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,xv=/^\((?:(\w[\w-]*):)?(.+)\)$/i,pT=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,gT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,mT=/\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$/,vT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,yT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Wr=e=>pT.test(e),Be=e=>!!e&&!Number.isNaN(Number(e)),Gr=e=>!!e&&Number.isInteger(Number(e)),Du=e=>e.endsWith("%")&&Be(e.slice(0,-1)),Cr=e=>gT.test(e),Cv=()=>!0,bT=e=>mT.test(e)&&!vT.test(e),Ru=()=>!1,_T=e=>yT.test(e),ST=e=>wT.test(e),xT=e=>!me(e)&&!ve(e),CT=e=>jr(e,Iv,Ru),me=e=>Sv.test(e),So=e=>jr(e,Nv,bT),Ev=e=>jr(e,kT,Be),ET=e=>jr(e,Dv,Cv),PT=e=>jr(e,kv,Ru),Pv=e=>jr(e,Ov,Ru),AT=e=>jr(e,Tv,ST),_a=e=>jr(e,Rv,_T),ve=e=>xv.test(e),js=e=>xo(e,Nv),OT=e=>xo(e,kv),Av=e=>xo(e,Ov),TT=e=>xo(e,Iv),IT=e=>xo(e,Tv),Sa=e=>xo(e,Rv,!0),NT=e=>xo(e,Dv,!0),jr=(e,t,n)=>{const r=Sv.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},xo=(e,t,n=!1)=>{const r=xv.exec(e);return r?r[1]?t(r[1]):n:!1},Ov=e=>e==="position"||e==="percentage",Tv=e=>e==="image"||e==="url",Iv=e=>e==="length"||e==="size"||e==="bg-size",Nv=e=>e==="length",kT=e=>e==="number",kv=e=>e==="family-name",Dv=e=>e==="number"||e==="weight",Rv=e=>e==="shadow",DT=fT(()=>{const e=Pt("color"),t=Pt("font"),n=Pt("text"),r=Pt("font-weight"),o=Pt("tracking"),i=Pt("leading"),l=Pt("breakpoint"),c=Pt("container"),d=Pt("spacing"),f=Pt("radius"),p=Pt("shadow"),h=Pt("inset-shadow"),y=Pt("text-shadow"),w=Pt("drop-shadow"),b=Pt("blur"),_=Pt("perspective"),x=Pt("aspect"),E=Pt("ease"),A=Pt("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],D=()=>[...N(),ve,me],H=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],L=()=>[ve,me,d],ee=()=>[Wr,"full","auto",...L()],le=()=>[Gr,"none","subgrid",ve,me],be=()=>["auto",{span:["full",Gr,ve,me]},Gr,ve,me],J=()=>[Gr,"auto",ve,me],Q=()=>["auto","min","max","fr",ve,me],ie=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],he=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",...L()],se=()=>[Wr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...L()],ne=()=>[Wr,"screen","full","dvw","lvw","svw","min","max","fit",...L()],te=()=>[Wr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...L()],Y=()=>[e,ve,me],Te=()=>[...N(),Av,Pv,{position:[ve,me]}],Qe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],xe=()=>["auto","cover","contain",TT,CT,{size:[ve,me]}],Ne=()=>[Du,js,So],_e=()=>["","none","full",f,ve,me],Ee=()=>["",Be,js,So],ce=()=>["solid","dashed","dotted","double"],ye=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Pe=()=>[Be,Du,Av,Pv],He=()=>["","none",b,ve,me],$e=()=>["none",Be,ve,me],We=()=>["none",Be,ve,me],dt=()=>[Be,ve,me],et=()=>[Wr,"full",...L()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Cr],breakpoint:[Cr],color:[Cv],container:[Cr],"drop-shadow":[Cr],ease:["in","out","in-out"],font:[xT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Cr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Cr],shadow:[Cr],spacing:["px",Be],text:[Cr],"text-shadow":[Cr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Wr,me,ve,x]}],container:["container"],columns:[{columns:[Be,me,ve,c]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"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:D()}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ee()}],"inset-x":[{"inset-x":ee()}],"inset-y":[{"inset-y":ee()}],start:[{"inset-s":ee(),start:ee()}],end:[{"inset-e":ee(),end:ee()}],"inset-bs":[{"inset-bs":ee()}],"inset-be":[{"inset-be":ee()}],top:[{top:ee()}],right:[{right:ee()}],bottom:[{bottom:ee()}],left:[{left:ee()}],visibility:["visible","invisible","collapse"],z:[{z:[Gr,"auto",ve,me]}],basis:[{basis:[Wr,"full","auto",c,...L()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Be,Wr,"auto","initial","none",me]}],grow:[{grow:["",Be,ve,me]}],shrink:[{shrink:["",Be,ve,me]}],order:[{order:[Gr,"first","last","none",ve,me]}],"grid-cols":[{"grid-cols":le()}],"col-start-end":[{col:be()}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":le()}],"row-start-end":[{row:be()}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Q()}],"auto-rows":[{"auto-rows":Q()}],gap:[{gap:L()}],"gap-x":[{"gap-x":L()}],"gap-y":[{"gap-y":L()}],"justify-content":[{justify:[...ie(),"normal"]}],"justify-items":[{"justify-items":[...he(),"normal"]}],"justify-self":[{"justify-self":["auto",...he()]}],"align-content":[{content:["normal",...ie()]}],"align-items":[{items:[...he(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...he(),{baseline:["","last"]}]}],"place-content":[{"place-content":ie()}],"place-items":[{"place-items":[...he(),"baseline"]}],"place-self":[{"place-self":["auto",...he()]}],p:[{p:L()}],px:[{px:L()}],py:[{py:L()}],ps:[{ps:L()}],pe:[{pe:L()}],pbs:[{pbs:L()}],pbe:[{pbe:L()}],pt:[{pt:L()}],pr:[{pr:L()}],pb:[{pb:L()}],pl:[{pl:L()}],m:[{m:q()}],mx:[{mx:q()}],my:[{my:q()}],ms:[{ms:q()}],me:[{me:q()}],mbs:[{mbs:q()}],mbe:[{mbe:q()}],mt:[{mt:q()}],mr:[{mr:q()}],mb:[{mb:q()}],ml:[{ml:q()}],"space-x":[{"space-x":L()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":L()}],"space-y-reverse":["space-y-reverse"],size:[{size:se()}],"inline-size":[{inline:["auto",...ne()]}],"min-inline-size":[{"min-inline":["auto",...ne()]}],"max-inline-size":[{"max-inline":["none",...ne()]}],"block-size":[{block:["auto",...te()]}],"min-block-size":[{"min-block":["auto",...te()]}],"max-block-size":[{"max-block":["none",...te()]}],w:[{w:[c,"screen",...se()]}],"min-w":[{"min-w":[c,"screen","none",...se()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...se()]}],h:[{h:["screen","lh",...se()]}],"min-h":[{"min-h":["screen","lh","none",...se()]}],"max-h":[{"max-h":["screen","lh",...se()]}],"font-size":[{text:["base",n,js,So]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,NT,ET]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Du,me]}],"font-family":[{font:[OT,PT,t]}],"font-features":[{"font-features":[me]}],"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,ve,me]}],"line-clamp":[{"line-clamp":[Be,"none",ve,Ev]}],leading:[{leading:[i,...L()]}],"list-image":[{"list-image":["none",ve,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ve,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Y()}],"text-color":[{text:Y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[Be,"from-font","auto",ve,So]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[Be,"auto",ve,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve,me]}],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",ve,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Te()}],"bg-repeat":[{bg:Qe()}],"bg-size":[{bg:xe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Gr,ve,me],radial:["",ve,me],conic:[Gr,ve,me]},IT,AT]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:Ne()}],"gradient-via-pos":[{via:Ne()}],"gradient-to-pos":[{to:Ne()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:_e()}],"rounded-s":[{"rounded-s":_e()}],"rounded-e":[{"rounded-e":_e()}],"rounded-t":[{"rounded-t":_e()}],"rounded-r":[{"rounded-r":_e()}],"rounded-b":[{"rounded-b":_e()}],"rounded-l":[{"rounded-l":_e()}],"rounded-ss":[{"rounded-ss":_e()}],"rounded-se":[{"rounded-se":_e()}],"rounded-ee":[{"rounded-ee":_e()}],"rounded-es":[{"rounded-es":_e()}],"rounded-tl":[{"rounded-tl":_e()}],"rounded-tr":[{"rounded-tr":_e()}],"rounded-br":[{"rounded-br":_e()}],"rounded-bl":[{"rounded-bl":_e()}],"border-w":[{border:Ee()}],"border-w-x":[{"border-x":Ee()}],"border-w-y":[{"border-y":Ee()}],"border-w-s":[{"border-s":Ee()}],"border-w-e":[{"border-e":Ee()}],"border-w-bs":[{"border-bs":Ee()}],"border-w-be":[{"border-be":Ee()}],"border-w-t":[{"border-t":Ee()}],"border-w-r":[{"border-r":Ee()}],"border-w-b":[{"border-b":Ee()}],"border-w-l":[{"border-l":Ee()}],"divide-x":[{"divide-x":Ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ce(),"hidden","none"]}],"divide-style":[{divide:[...ce(),"hidden","none"]}],"border-color":[{border:Y()}],"border-color-x":[{"border-x":Y()}],"border-color-y":[{"border-y":Y()}],"border-color-s":[{"border-s":Y()}],"border-color-e":[{"border-e":Y()}],"border-color-bs":[{"border-bs":Y()}],"border-color-be":[{"border-be":Y()}],"border-color-t":[{"border-t":Y()}],"border-color-r":[{"border-r":Y()}],"border-color-b":[{"border-b":Y()}],"border-color-l":[{"border-l":Y()}],"divide-color":[{divide:Y()}],"outline-style":[{outline:[...ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Be,ve,me]}],"outline-w":[{outline:["",Be,js,So]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",p,Sa,_a]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",h,Sa,_a]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:Ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[Be,So]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":Ee()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",y,Sa,_a]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[Be,ve,me]}],"mix-blend":[{"mix-blend":[...ye(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ye()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Be]}],"mask-image-linear-from-pos":[{"mask-linear-from":Pe()}],"mask-image-linear-to-pos":[{"mask-linear-to":Pe()}],"mask-image-linear-from-color":[{"mask-linear-from":Y()}],"mask-image-linear-to-color":[{"mask-linear-to":Y()}],"mask-image-t-from-pos":[{"mask-t-from":Pe()}],"mask-image-t-to-pos":[{"mask-t-to":Pe()}],"mask-image-t-from-color":[{"mask-t-from":Y()}],"mask-image-t-to-color":[{"mask-t-to":Y()}],"mask-image-r-from-pos":[{"mask-r-from":Pe()}],"mask-image-r-to-pos":[{"mask-r-to":Pe()}],"mask-image-r-from-color":[{"mask-r-from":Y()}],"mask-image-r-to-color":[{"mask-r-to":Y()}],"mask-image-b-from-pos":[{"mask-b-from":Pe()}],"mask-image-b-to-pos":[{"mask-b-to":Pe()}],"mask-image-b-from-color":[{"mask-b-from":Y()}],"mask-image-b-to-color":[{"mask-b-to":Y()}],"mask-image-l-from-pos":[{"mask-l-from":Pe()}],"mask-image-l-to-pos":[{"mask-l-to":Pe()}],"mask-image-l-from-color":[{"mask-l-from":Y()}],"mask-image-l-to-color":[{"mask-l-to":Y()}],"mask-image-x-from-pos":[{"mask-x-from":Pe()}],"mask-image-x-to-pos":[{"mask-x-to":Pe()}],"mask-image-x-from-color":[{"mask-x-from":Y()}],"mask-image-x-to-color":[{"mask-x-to":Y()}],"mask-image-y-from-pos":[{"mask-y-from":Pe()}],"mask-image-y-to-pos":[{"mask-y-to":Pe()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[ve,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":Pe()}],"mask-image-radial-to-pos":[{"mask-radial-to":Pe()}],"mask-image-radial-from-color":[{"mask-radial-from":Y()}],"mask-image-radial-to-color":[{"mask-radial-to":Y()}],"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":N()}],"mask-image-conic-pos":[{"mask-conic":[Be]}],"mask-image-conic-from-pos":[{"mask-conic-from":Pe()}],"mask-image-conic-to-pos":[{"mask-conic-to":Pe()}],"mask-image-conic-from-color":[{"mask-conic-from":Y()}],"mask-image-conic-to-color":[{"mask-conic-to":Y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Te()}],"mask-repeat":[{mask:Qe()}],"mask-size":[{mask:xe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ve,me]}],filter:[{filter:["","none",ve,me]}],blur:[{blur:He()}],brightness:[{brightness:[Be,ve,me]}],contrast:[{contrast:[Be,ve,me]}],"drop-shadow":[{"drop-shadow":["","none",w,Sa,_a]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",Be,ve,me]}],"hue-rotate":[{"hue-rotate":[Be,ve,me]}],invert:[{invert:["",Be,ve,me]}],saturate:[{saturate:[Be,ve,me]}],sepia:[{sepia:["",Be,ve,me]}],"backdrop-filter":[{"backdrop-filter":["","none",ve,me]}],"backdrop-blur":[{"backdrop-blur":He()}],"backdrop-brightness":[{"backdrop-brightness":[Be,ve,me]}],"backdrop-contrast":[{"backdrop-contrast":[Be,ve,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Be,ve,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Be,ve,me]}],"backdrop-invert":[{"backdrop-invert":["",Be,ve,me]}],"backdrop-opacity":[{"backdrop-opacity":[Be,ve,me]}],"backdrop-saturate":[{"backdrop-saturate":[Be,ve,me]}],"backdrop-sepia":[{"backdrop-sepia":["",Be,ve,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":L()}],"border-spacing-x":[{"border-spacing-x":L()}],"border-spacing-y":[{"border-spacing-y":L()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ve,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Be,"initial",ve,me]}],ease:[{ease:["linear","initial",E,ve,me]}],delay:[{delay:[Be,ve,me]}],animate:[{animate:["none",A,ve,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,ve,me]}],"perspective-origin":[{"perspective-origin":D()}],rotate:[{rotate:$e()}],"rotate-x":[{"rotate-x":$e()}],"rotate-y":[{"rotate-y":$e()}],"rotate-z":[{"rotate-z":$e()}],scale:[{scale:We()}],"scale-x":[{"scale-x":We()}],"scale-y":[{"scale-y":We()}],"scale-z":[{"scale-z":We()}],"scale-3d":["scale-3d"],skew:[{skew:dt()}],"skew-x":[{"skew-x":dt()}],"skew-y":[{"skew-y":dt()}],transform:[{transform:[ve,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:D()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:et()}],"translate-x":[{"translate-x":et()}],"translate-y":[{"translate-y":et()}],"translate-z":[{"translate-z":et()}],"translate-none":["translate-none"],accent:[{accent:Y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Y()}],"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",ve,me]}],"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":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mbs":[{"scroll-mbs":L()}],"scroll-mbe":[{"scroll-mbe":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pbs":[{"scroll-pbs":L()}],"scroll-pbe":[{"scroll-pbe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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",ve,me]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[Be,js,So,Ev]}],stroke:[{stroke:["none",...Y()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function ae(...e){return DT(pv(e))}function RT({delayDuration:e=0,...t}){return g.jsx(VO,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function MT({...e}){return g.jsx(UO,{"data-slot":"tooltip",...e})}function FT({...e}){return g.jsx(BO,{"data-slot":"tooltip-trigger",...e})}function $T({className:e,sideOffset:t=0,children:n,...r}){return g.jsx(HO,{children:g.jsxs(WO,{"data-slot":"tooltip-content",sideOffset:t,className:ae("z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...r,children:[n,g.jsx(GO,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}var LT=(e,t,n,r,o,i,l,c)=>{let d=document.documentElement,f=["light","dark"];function p(w){(Array.isArray(e)?e:[e]).forEach(b=>{let _=b==="class",x=_&&i?o.map(E=>i[E]||E):o;_?(d.classList.remove(...x),d.classList.add(i&&i[w]?i[w]:w)):d.setAttribute(b,w)}),h(w)}function h(w){c&&f.includes(w)&&(d.style.colorScheme=w)}function y(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)p(r);else try{let w=localStorage.getItem(t)||n,b=l&&w==="system"?y():w;p(b)}catch{}},zT=v.createContext(void 0),VT={setTheme:e=>{},themes:[]},UT=()=>{var e;return(e=v.useContext(zT))!=null?e:VT};v.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:i,value:l,themes:c,nonce:d,scriptProps:f})=>{let p=JSON.stringify([n,t,i,e,c,l,r,o]).slice(1,-1);return v.createElement("script",{...f,suppressHydrationWarning:!0,nonce:typeof window>"u"?d:"",dangerouslySetInnerHTML:{__html:`(${LT.toString()})(${p})`}})});function BT(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const HT=e=>{switch(e){case"success":return jT;case"info":return ZT;case"warning":return qT;case"error":return KT;default:return null}},WT=Array(12).fill(0),GT=({visible:e,className:t})=>$.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},$.createElement("div",{className:"sonner-spinner"},WT.map((n,r)=>$.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),jT=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$.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"})),qT=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},$.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"})),ZT=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$.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"})),KT=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$.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"})),JT=$.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"},$.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),$.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),YT=()=>{const[e,t]=$.useState(document.hidden);return $.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Mu=1;class QT{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...o}=t,i=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Mu++,l=this.toasts.find(d=>d.id===i),c=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),l?this.toasts=this.toasts.map(d=>d.id===i?(this.publish({...d,...t,id:i,title:r}),{...d,...t,id:i,dismissible:c,title:r}):d):this.addToast({title:r,...o,dismissible:c,id:i}),i},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let i=r!==void 0,l;const c=o.then(async f=>{if(l=["resolve",f],$.isValidElement(f))i=!1,this.create({id:r,type:"default",message:f});else if(eI(f)&&!f.ok){i=!1;const h=typeof n.error=="function"?await n.error(`HTTP error! status: ${f.status}`):n.error,y=typeof n.description=="function"?await n.description(`HTTP error! status: ${f.status}`):n.description,b=typeof h=="object"&&!$.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:y,...b})}else if(f instanceof Error){i=!1;const h=typeof n.error=="function"?await n.error(f):n.error,y=typeof n.description=="function"?await n.description(f):n.description,b=typeof h=="object"&&!$.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:y,...b})}else if(n.success!==void 0){i=!1;const h=typeof n.success=="function"?await n.success(f):n.success,y=typeof n.description=="function"?await n.description(f):n.description,b=typeof h=="object"&&!$.isValidElement(h)?h:{message:h};this.create({id:r,type:"success",description:y,...b})}}).catch(async f=>{if(l=["reject",f],n.error!==void 0){i=!1;const p=typeof n.error=="function"?await n.error(f):n.error,h=typeof n.description=="function"?await n.description(f):n.description,w=typeof p=="object"&&!$.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:h,...w})}}).finally(()=>{i&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),d=()=>new Promise((f,p)=>c.then(()=>l[0]==="reject"?p(l[1]):f(l[1])).catch(p));return typeof r!="string"&&typeof r!="number"?{unwrap:d}:Object.assign(r,{unwrap:d})},this.custom=(t,n)=>{const r=n?.id||Mu++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const tn=new QT,XT=(e,t)=>{const n=t?.id||Mu++;return tn.addToast({title:e,...t,id:n}),n},eI=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",tI=XT,nI=()=>tn.toasts,rI=()=>tn.getActiveToasts(),xa=Object.assign(tI,{success:tn.success,info:tn.info,warning:tn.warning,error:tn.error,custom:tn.custom,message:tn.message,promise:tn.promise,dismiss:tn.dismiss,loading:tn.loading},{getHistory:nI,getToasts:rI});BT("[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 Ca(e){return e.label!==void 0}const oI=3,sI="24px",iI="16px",Mv=4e3,aI=356,lI=14,cI=45,uI=200;function fr(...e){return e.filter(Boolean).join(" ")}function dI(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const fI=e=>{var t,n,r,o,i,l,c,d,f;const{invert:p,toast:h,unstyled:y,interacting:w,setHeights:b,visibleToasts:_,heights:x,index:E,toasts:A,expanded:O,removeToast:N,defaultRichColors:D,closeButton:H,style:z,cancelButtonStyle:L,actionButtonStyle:ee,className:le="",descriptionClassName:be="",duration:J,position:Q,gap:ie,expandByDefault:he,classNames:q,icons:se,closeButtonAriaLabel:ne="Close toast"}=e,[te,Y]=$.useState(null),[Te,Qe]=$.useState(null),[xe,Ne]=$.useState(!1),[_e,Ee]=$.useState(!1),[ce,ye]=$.useState(!1),[Pe,He]=$.useState(!1),[$e,We]=$.useState(!1),[dt,et]=$.useState(0),[an,rr]=$.useState(0),vt=$.useRef(h.duration||J||Mv),No=$.useRef(null),kn=$.useRef(null),gr=E===0,I=E+1<=_,M=h.type,U=h.dismissible!==!1,fe=h.className||"",re=h.descriptionClassName||"",X=$.useMemo(()=>x.findIndex(Le=>Le.toastId===h.id)||0,[x,h.id]),we=$.useMemo(()=>{var Le;return(Le=h.closeButton)!=null?Le:H},[h.closeButton,H]),Ge=$.useMemo(()=>h.duration||J||Mv,[h.duration,J]),qe=$.useRef(0),it=$.useRef(0),ln=$.useRef(0),It=$.useRef(null),[ko,Ar]=Q.split("-"),mr=$.useMemo(()=>x.reduce((Le,Ct,Mt)=>Mt>=X?Le:Le+Ct.height,0),[x,X]),Qr=YT(),Xr=h.invert||p,Do=M==="loading";it.current=$.useMemo(()=>X*ie+mr,[X,mr]),$.useEffect(()=>{vt.current=Ge},[Ge]),$.useEffect(()=>{Ne(!0)},[]),$.useEffect(()=>{const Le=kn.current;if(Le){const Ct=Le.getBoundingClientRect().height;return rr(Ct),b(Mt=>[{toastId:h.id,height:Ct,position:h.position},...Mt]),()=>b(Mt=>Mt.filter(Ht=>Ht.toastId!==h.id))}},[b,h.id]),$.useLayoutEffect(()=>{if(!xe)return;const Le=kn.current,Ct=Le.style.height;Le.style.height="auto";const Mt=Le.getBoundingClientRect().height;Le.style.height=Ct,rr(Mt),b(Ht=>Ht.find(Nt=>Nt.toastId===h.id)?Ht.map(Nt=>Nt.toastId===h.id?{...Nt,height:Mt}:Nt):[{toastId:h.id,height:Mt,position:h.position},...Ht])},[xe,h.title,h.description,b,h.id,h.jsx,h.action,h.cancel]);const wn=$.useCallback(()=>{Ee(!0),et(it.current),b(Le=>Le.filter(Ct=>Ct.toastId!==h.id)),setTimeout(()=>{N(h)},uI)},[h,N,b,it]);$.useEffect(()=>{if(h.promise&&M==="loading"||h.duration===1/0||h.type==="loading")return;let Le;return O||w||Qr?(()=>{if(ln.current<qe.current){const Ht=new Date().getTime()-qe.current;vt.current=vt.current-Ht}ln.current=new Date().getTime()})():vt.current!==1/0&&(qe.current=new Date().getTime(),Le=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),wn()},vt.current)),()=>clearTimeout(Le)},[O,w,h,M,Qr,wn]),$.useEffect(()=>{h.delete&&(wn(),h.onDismiss==null||h.onDismiss.call(h,h))},[wn,h.delete]);function uf(){var Le;if(se?.loading){var Ct;return $.createElement("div",{className:fr(q?.loader,h==null||(Ct=h.classNames)==null?void 0:Ct.loader,"sonner-loader"),"data-visible":M==="loading"},se.loading)}return $.createElement(GT,{className:fr(q?.loader,h==null||(Le=h.classNames)==null?void 0:Le.loader),visible:M==="loading"})}const gl=h.icon||se?.[M]||HT(M);var gi,ml;return $.createElement("li",{tabIndex:0,ref:kn,className:fr(le,fe,q?.toast,h==null||(t=h.classNames)==null?void 0:t.toast,q?.default,q?.[M],h==null||(n=h.classNames)==null?void 0:n[M]),"data-sonner-toast":"","data-rich-colors":(gi=h.richColors)!=null?gi:D,"data-styled":!(h.jsx||h.unstyled||y),"data-mounted":xe,"data-promise":!!h.promise,"data-swiped":$e,"data-removed":_e,"data-visible":I,"data-y-position":ko,"data-x-position":Ar,"data-index":E,"data-front":gr,"data-swiping":ce,"data-dismissible":U,"data-type":M,"data-invert":Xr,"data-swipe-out":Pe,"data-swipe-direction":Te,"data-expanded":!!(O||he&&xe),"data-testid":h.testId,style:{"--index":E,"--toasts-before":E,"--z-index":A.length-E,"--offset":`${_e?dt:it.current}px`,"--initial-height":he?"auto":`${an}px`,...z,...h.style},onDragEnd:()=>{ye(!1),Y(null),It.current=null},onPointerDown:Le=>{Le.button!==2&&(Do||!U||(No.current=new Date,et(it.current),Le.target.setPointerCapture(Le.pointerId),Le.target.tagName!=="BUTTON"&&(ye(!0),It.current={x:Le.clientX,y:Le.clientY})))},onPointerUp:()=>{var Le,Ct,Mt;if(Pe||!U)return;It.current=null;const Ht=Number(((Le=kn.current)==null?void 0:Le.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),gs=Number(((Ct=kn.current)==null?void 0:Ct.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Nt=new Date().getTime()-((Mt=No.current)==null?void 0:Mt.getTime()),cn=te==="x"?Ht:gs,eo=Math.abs(cn)/Nt;if(Math.abs(cn)>=cI||eo>.11){et(it.current),h.onDismiss==null||h.onDismiss.call(h,h),Qe(te==="x"?Ht>0?"right":"left":gs>0?"down":"up"),wn(),He(!0);return}else{var bn,Yt;(bn=kn.current)==null||bn.style.setProperty("--swipe-amount-x","0px"),(Yt=kn.current)==null||Yt.style.setProperty("--swipe-amount-y","0px")}We(!1),ye(!1),Y(null)},onPointerMove:Le=>{var Ct,Mt,Ht;if(!It.current||!U||((Ct=window.getSelection())==null?void 0:Ct.toString().length)>0)return;const Nt=Le.clientY-It.current.y,cn=Le.clientX-It.current.x;var eo;const bn=(eo=e.swipeDirections)!=null?eo:dI(Q);!te&&(Math.abs(cn)>1||Math.abs(Nt)>1)&&Y(Math.abs(cn)>Math.abs(Nt)?"x":"y");let Yt={x:0,y:0};const vl=Or=>1/(1.5+Math.abs(Or)/20);if(te==="y"){if(bn.includes("top")||bn.includes("bottom"))if(bn.includes("top")&&Nt<0||bn.includes("bottom")&&Nt>0)Yt.y=Nt;else{const Or=Nt*vl(Nt);Yt.y=Math.abs(Or)<Math.abs(Nt)?Or:Nt}}else if(te==="x"&&(bn.includes("left")||bn.includes("right")))if(bn.includes("left")&&cn<0||bn.includes("right")&&cn>0)Yt.x=cn;else{const Or=cn*vl(cn);Yt.x=Math.abs(Or)<Math.abs(cn)?Or:cn}(Math.abs(Yt.x)>0||Math.abs(Yt.y)>0)&&We(!0),(Mt=kn.current)==null||Mt.style.setProperty("--swipe-amount-x",`${Yt.x}px`),(Ht=kn.current)==null||Ht.style.setProperty("--swipe-amount-y",`${Yt.y}px`)}},we&&!h.jsx&&M!=="loading"?$.createElement("button",{"aria-label":ne,"data-disabled":Do,"data-close-button":!0,onClick:Do||!U?()=>{}:()=>{wn(),h.onDismiss==null||h.onDismiss.call(h,h)},className:fr(q?.closeButton,h==null||(r=h.classNames)==null?void 0:r.closeButton)},(ml=se?.close)!=null?ml:JT):null,(M||h.icon||h.promise)&&h.icon!==null&&(se?.[M]!==null||h.icon)?$.createElement("div",{"data-icon":"",className:fr(q?.icon,h==null||(o=h.classNames)==null?void 0:o.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||uf():null,h.type!=="loading"?gl:null):null,$.createElement("div",{"data-content":"",className:fr(q?.content,h==null||(i=h.classNames)==null?void 0:i.content)},$.createElement("div",{"data-title":"",className:fr(q?.title,h==null||(l=h.classNames)==null?void 0:l.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?$.createElement("div",{"data-description":"",className:fr(be,re,q?.description,h==null||(c=h.classNames)==null?void 0:c.description)},typeof h.description=="function"?h.description():h.description):null),$.isValidElement(h.cancel)?h.cancel:h.cancel&&Ca(h.cancel)?$.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||L,onClick:Le=>{Ca(h.cancel)&&U&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,Le),wn())},className:fr(q?.cancelButton,h==null||(d=h.classNames)==null?void 0:d.cancelButton)},h.cancel.label):null,$.isValidElement(h.action)?h.action:h.action&&Ca(h.action)?$.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||ee,onClick:Le=>{Ca(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,Le),!Le.defaultPrevented&&wn())},className:fr(q?.actionButton,h==null||(f=h.classNames)==null?void 0:f.actionButton)},h.action.label):null)};function Fv(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function hI(e,t){const n={};return[e,t].forEach((r,o)=>{const i=o===1,l=i?"--mobile-offset":"--offset",c=i?iI:sI;function d(f){["top","right","bottom","left"].forEach(p=>{n[`${l}-${p}`]=typeof f=="number"?`${f}px`:f})}typeof r=="number"||typeof r=="string"?d(r):typeof r=="object"?["top","right","bottom","left"].forEach(f=>{r[f]===void 0?n[`${l}-${f}`]=c:n[`${l}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):d(c)}),n}const pI=$.forwardRef(function(t,n){const{id:r,invert:o,position:i="bottom-right",hotkey:l=["altKey","KeyT"],expand:c,closeButton:d,className:f,offset:p,mobileOffset:h,theme:y="light",richColors:w,duration:b,style:_,visibleToasts:x=oI,toastOptions:E,dir:A=Fv(),gap:O=lI,icons:N,containerAriaLabel:D="Notifications"}=t,[H,z]=$.useState([]),L=$.useMemo(()=>r?H.filter(xe=>xe.toasterId===r):H.filter(xe=>!xe.toasterId),[H,r]),ee=$.useMemo(()=>Array.from(new Set([i].concat(L.filter(xe=>xe.position).map(xe=>xe.position)))),[L,i]),[le,be]=$.useState([]),[J,Q]=$.useState(!1),[ie,he]=$.useState(!1),[q,se]=$.useState(y!=="system"?y:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ne=$.useRef(null),te=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),Y=$.useRef(null),Te=$.useRef(!1),Qe=$.useCallback(xe=>{z(Ne=>{var _e;return(_e=Ne.find(Ee=>Ee.id===xe.id))!=null&&_e.delete||tn.dismiss(xe.id),Ne.filter(({id:Ee})=>Ee!==xe.id)})},[]);return $.useEffect(()=>tn.subscribe(xe=>{if(xe.dismiss){requestAnimationFrame(()=>{z(Ne=>Ne.map(_e=>_e.id===xe.id?{..._e,delete:!0}:_e))});return}setTimeout(()=>{ic.flushSync(()=>{z(Ne=>{const _e=Ne.findIndex(Ee=>Ee.id===xe.id);return _e!==-1?[...Ne.slice(0,_e),{...Ne[_e],...xe},...Ne.slice(_e+1)]:[xe,...Ne]})})})}),[H]),$.useEffect(()=>{if(y!=="system"){se(y);return}if(y==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?se("dark"):se("light")),typeof window>"u")return;const xe=window.matchMedia("(prefers-color-scheme: dark)");try{xe.addEventListener("change",({matches:Ne})=>{se(Ne?"dark":"light")})}catch{xe.addListener(({matches:_e})=>{try{se(_e?"dark":"light")}catch(Ee){console.error(Ee)}})}},[y]),$.useEffect(()=>{H.length<=1&&Q(!1)},[H]),$.useEffect(()=>{const xe=Ne=>{var _e;if(l.every(ye=>Ne[ye]||Ne.code===ye)){var ce;Q(!0),(ce=ne.current)==null||ce.focus()}Ne.code==="Escape"&&(document.activeElement===ne.current||(_e=ne.current)!=null&&_e.contains(document.activeElement))&&Q(!1)};return document.addEventListener("keydown",xe),()=>document.removeEventListener("keydown",xe)},[l]),$.useEffect(()=>{if(ne.current)return()=>{Y.current&&(Y.current.focus({preventScroll:!0}),Y.current=null,Te.current=!1)}},[ne.current]),$.createElement("section",{ref:n,"aria-label":`${D} ${te}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},ee.map((xe,Ne)=>{var _e;const[Ee,ce]=xe.split("-");return L.length?$.createElement("ol",{key:xe,dir:A==="auto"?Fv():A,tabIndex:-1,ref:ne,className:f,"data-sonner-toaster":!0,"data-sonner-theme":q,"data-y-position":Ee,"data-x-position":ce,style:{"--front-toast-height":`${((_e=le[0])==null?void 0:_e.height)||0}px`,"--width":`${aI}px`,"--gap":`${O}px`,..._,...hI(p,h)},onBlur:ye=>{Te.current&&!ye.currentTarget.contains(ye.relatedTarget)&&(Te.current=!1,Y.current&&(Y.current.focus({preventScroll:!0}),Y.current=null))},onFocus:ye=>{ye.target instanceof HTMLElement&&ye.target.dataset.dismissible==="false"||Te.current||(Te.current=!0,Y.current=ye.relatedTarget)},onMouseEnter:()=>Q(!0),onMouseMove:()=>Q(!0),onMouseLeave:()=>{ie||Q(!1)},onDragEnd:()=>Q(!1),onPointerDown:ye=>{ye.target instanceof HTMLElement&&ye.target.dataset.dismissible==="false"||he(!0)},onPointerUp:()=>he(!1)},L.filter(ye=>!ye.position&&Ne===0||ye.position===xe).map((ye,Pe)=>{var He,$e;return $.createElement(fI,{key:ye.id,icons:N,index:Pe,toast:ye,defaultRichColors:w,duration:(He=E?.duration)!=null?He:b,className:E?.className,descriptionClassName:E?.descriptionClassName,invert:o,visibleToasts:x,closeButton:($e=E?.closeButton)!=null?$e:d,interacting:ie,position:xe,style:E?.style,unstyled:E?.unstyled,classNames:E?.classNames,cancelButtonStyle:E?.cancelButtonStyle,actionButtonStyle:E?.actionButtonStyle,closeButtonAriaLabel:E?.closeButtonAriaLabel,removeToast:Qe,toasts:L.filter(We=>We.position==ye.position),heights:le.filter(We=>We.position==ye.position),setHeights:be,expandByDefault:c,gap:O,expanded:J,swipeDirections:t.swipeDirections})})):null}))}),gI=({...e})=>{const{theme:t="system"}=UT(),n=g.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center",children:g.jsx("img",{src:"/logo.png",alt:"Logo",className:"h-10 w-10 object-contain"})});return g.jsx(pI,{theme:t,className:"toaster group",icons:{success:n,info:n,warning:n,error:n,loading:n},toastOptions:{classNames:{toast:"group toast !bg-white !text-slate-900 !border !border-gray-100 !shadow-xl !px-4 !py-4 !flex !items-center !gap-4 !w-full !max-w-[420px]",description:"!text-gray-500 !text-[14px] !font-medium !m-0",title:"!text-[16px] !font-bold !text-slate-900 !m-0",icon:"!bg-transparent !p-0 !m-0 !w-10 !h-10 !flex !shrink-0 !items-center !justify-center",content:"!flex !flex-col !gap-1 !m-0 !p-0"}},...e})};function $v(e,t){return function(){return e.apply(t,arguments)}}const{toString:mI}=Object.prototype,{getPrototypeOf:Fu}=Object,{iterator:Ea,toStringTag:Lv}=Symbol,Pa=(e=>t=>{const n=mI.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Kn=e=>(e=e.toLowerCase(),t=>Pa(t)===e),Aa=e=>t=>typeof t===e,{isArray:ns}=Array,rs=Aa("undefined");function qs(e){return e!==null&&!rs(e)&&e.constructor!==null&&!rs(e.constructor)&&nn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const zv=Kn("ArrayBuffer");function vI(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&zv(e.buffer),t}const yI=Aa("string"),nn=Aa("function"),Vv=Aa("number"),Zs=e=>e!==null&&typeof e=="object",wI=e=>e===!0||e===!1,Oa=e=>{if(Pa(e)!=="object")return!1;const t=Fu(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Lv in e)&&!(Ea in e)},bI=e=>{if(!Zs(e)||qs(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},_I=Kn("Date"),SI=Kn("File"),xI=e=>!!(e&&typeof e.uri<"u"),CI=e=>e&&typeof e.getParts<"u",EI=Kn("Blob"),PI=Kn("FileList"),AI=e=>Zs(e)&&nn(e.pipe);function OI(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Uv=OI(),Bv=typeof Uv.FormData<"u"?Uv.FormData:void 0,TI=e=>{let t;return e&&(Bv&&e instanceof Bv||nn(e.append)&&((t=Pa(e))==="formdata"||t==="object"&&nn(e.toString)&&e.toString()==="[object FormData]"))},II=Kn("URLSearchParams"),[NI,kI,DI,RI]=["ReadableStream","Request","Response","Headers"].map(Kn),MI=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ks(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),ns(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(qs(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),l=i.length;let c;for(r=0;r<l;r++)c=i[r],t.call(null,e[c],c,e)}}function Hv(e,t){if(qs(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Co=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Wv=e=>!rs(e)&&e!==Co;function $u(){const{caseless:e,skipUndefined:t}=Wv(this)&&this||{},n={},r=(o,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const l=e&&Hv(n,i)||i;Oa(n[l])&&Oa(o)?n[l]=$u(n[l],o):Oa(o)?n[l]=$u({},o):ns(o)?n[l]=o.slice():(!t||!rs(o))&&(n[l]=o)};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&Ks(arguments[o],r);return n}const FI=(e,t,n,{allOwnKeys:r}={})=>(Ks(t,(o,i)=>{n&&nn(o)?Object.defineProperty(e,i,{value:$v(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),$I=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),LI=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},zI=(e,t,n,r)=>{let o,i,l;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)l=o[i],(!r||r(l,e,t))&&!c[l]&&(t[l]=e[l],c[l]=!0);e=n!==!1&&Fu(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},VI=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},UI=e=>{if(!e)return null;if(ns(e))return e;let t=e.length;if(!Vv(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},BI=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Fu(Uint8Array)),HI=(e,t)=>{const r=(e&&e[Ea]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},WI=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},GI=Kn("HTMLFormElement"),jI=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Gv=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),qI=Kn("RegExp"),jv=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ks(n,(o,i)=>{let l;(l=t(o,i,e))!==!1&&(r[i]=l||o)}),Object.defineProperties(e,r)},ZI=e=>{jv(e,(t,n)=>{if(nn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(nn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},KI=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return ns(e)?r(e):r(String(e).split(t)),n},JI=()=>{},YI=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function QI(e){return!!(e&&nn(e.append)&&e[Lv]==="FormData"&&e[Ea])}const XI=e=>{const t=new Array(10),n=(r,o)=>{if(Zs(r)){if(t.indexOf(r)>=0)return;if(qs(r))return r;if(!("toJSON"in r)){t[o]=r;const i=ns(r)?[]:{};return Ks(r,(l,c)=>{const d=n(l,o+1);!rs(d)&&(i[c]=d)}),t[o]=void 0,i}}return r};return n(e,0)},eN=Kn("AsyncFunction"),tN=e=>e&&(Zs(e)||nn(e))&&nn(e.then)&&nn(e.catch),qv=((e,t)=>e?setImmediate:t?((n,r)=>(Co.addEventListener("message",({source:o,data:i})=>{o===Co&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Co.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",nn(Co.postMessage)),nN=typeof queueMicrotask<"u"?queueMicrotask.bind(Co):typeof process<"u"&&process.nextTick||qv,V={isArray:ns,isArrayBuffer:zv,isBuffer:qs,isFormData:TI,isArrayBufferView:vI,isString:yI,isNumber:Vv,isBoolean:wI,isObject:Zs,isPlainObject:Oa,isEmptyObject:bI,isReadableStream:NI,isRequest:kI,isResponse:DI,isHeaders:RI,isUndefined:rs,isDate:_I,isFile:SI,isReactNativeBlob:xI,isReactNative:CI,isBlob:EI,isRegExp:qI,isFunction:nn,isStream:AI,isURLSearchParams:II,isTypedArray:BI,isFileList:PI,forEach:Ks,merge:$u,extend:FI,trim:MI,stripBOM:$I,inherits:LI,toFlatObject:zI,kindOf:Pa,kindOfTest:Kn,endsWith:VI,toArray:UI,forEachEntry:HI,matchAll:WI,isHTMLForm:GI,hasOwnProperty:Gv,hasOwnProp:Gv,reduceDescriptors:jv,freezeMethods:ZI,toObjectSet:KI,toCamelCase:jI,noop:JI,toFiniteNumber:YI,findKey:Hv,global:Co,isContextDefined:Wv,isSpecCompliantForm:QI,toJSONObject:XI,isAsyncFn:eN,isThenable:tN,setImmediate:qv,asap:nN,isIterable:e=>e!=null&&nn(e[Ea])};let Ie=class ZS extends Error{static from(t,n,r,o,i,l){const c=new ZS(t.message,n||t.code,r,o,i);return c.cause=t,c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),l&&Object.assign(c,l),c}constructor(t,n,r,o,i){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:V.toJSONObject(this.config),code:this.code,status:this.status}}};Ie.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ie.ERR_BAD_OPTION="ERR_BAD_OPTION",Ie.ECONNABORTED="ECONNABORTED",Ie.ETIMEDOUT="ETIMEDOUT",Ie.ERR_NETWORK="ERR_NETWORK",Ie.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ie.ERR_DEPRECATED="ERR_DEPRECATED",Ie.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ie.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ie.ERR_CANCELED="ERR_CANCELED",Ie.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ie.ERR_INVALID_URL="ERR_INVALID_URL";const rN=null;function Lu(e){return V.isPlainObject(e)||V.isArray(e)}function Zv(e){return V.endsWith(e,"[]")?e.slice(0,-2):e}function zu(e,t,n){return e?e.concat(t).map(function(o,i){return o=Zv(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function oN(e){return V.isArray(e)&&!e.some(Lu)}const sN=V.toFlatObject(V,{},null,function(t){return/^is[A-Z]/.test(t)});function Ta(e,t,n){if(!V.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=V.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,x){return!V.isUndefined(x[_])});const r=n.metaTokens,o=n.visitor||p,i=n.dots,l=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&V.isSpecCompliantForm(t);if(!V.isFunction(o))throw new TypeError("visitor must be a function");function f(b){if(b===null)return"";if(V.isDate(b))return b.toISOString();if(V.isBoolean(b))return b.toString();if(!d&&V.isBlob(b))throw new Ie("Blob is not supported. Use a Buffer instead.");return V.isArrayBuffer(b)||V.isTypedArray(b)?d&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function p(b,_,x){let E=b;if(V.isReactNative(t)&&V.isReactNativeBlob(b))return t.append(zu(x,_,i),f(b)),!1;if(b&&!x&&typeof b=="object"){if(V.endsWith(_,"{}"))_=r?_:_.slice(0,-2),b=JSON.stringify(b);else if(V.isArray(b)&&oN(b)||(V.isFileList(b)||V.endsWith(_,"[]"))&&(E=V.toArray(b)))return _=Zv(_),E.forEach(function(O,N){!(V.isUndefined(O)||O===null)&&t.append(l===!0?zu([_],N,i):l===null?_:_+"[]",f(O))}),!1}return Lu(b)?!0:(t.append(zu(x,_,i),f(b)),!1)}const h=[],y=Object.assign(sN,{defaultVisitor:p,convertValue:f,isVisitable:Lu});function w(b,_){if(!V.isUndefined(b)){if(h.indexOf(b)!==-1)throw Error("Circular reference detected in "+_.join("."));h.push(b),V.forEach(b,function(E,A){(!(V.isUndefined(E)||E===null)&&o.call(t,E,V.isString(A)?A.trim():A,_,y))===!0&&w(E,_?_.concat(A):[A])}),h.pop()}}if(!V.isObject(e))throw new TypeError("data must be an object");return w(e),t}function Kv(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Vu(e,t){this._pairs=[],e&&Ta(e,this,t)}const Jv=Vu.prototype;Jv.append=function(t,n){this._pairs.push([t,n])},Jv.toString=function(t){const n=t?function(r){return t.call(this,r,Kv)}:Kv;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function iN(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Yv(e,t,n){if(!t)return e;const r=n&&n.encode||iN,o=V.isFunction(n)?{serialize:n}:n,i=o&&o.serialize;let l;if(i?l=i(t,o):l=V.isURLSearchParams(t)?t.toString():new Vu(t,o).toString(r),l){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+l}return e}class Qv{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){V.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Uu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},aN={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Vu,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Bu=typeof window<"u"&&typeof document<"u",Hu=typeof navigator=="object"&&navigator||void 0,lN=Bu&&(!Hu||["ReactNative","NativeScript","NS"].indexOf(Hu.product)<0),cN=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",uN=Bu&&window.location.href||"http://localhost",Vt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Bu,hasStandardBrowserEnv:lN,hasStandardBrowserWebWorkerEnv:cN,navigator:Hu,origin:uN},Symbol.toStringTag,{value:"Module"})),...aN};function dN(e,t){return Ta(e,new Vt.classes.URLSearchParams,{visitor:function(n,r,o,i){return Vt.isNode&&V.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function fN(e){return V.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function hN(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}function Xv(e){function t(n,r,o,i){let l=n[i++];if(l==="__proto__")return!0;const c=Number.isFinite(+l),d=i>=n.length;return l=!l&&V.isArray(o)?o.length:l,d?(V.hasOwnProp(o,l)?o[l]=[o[l],r]:o[l]=r,!c):((!o[l]||!V.isObject(o[l]))&&(o[l]=[]),t(n,r,o[l],i)&&V.isArray(o[l])&&(o[l]=hN(o[l])),!c)}if(V.isFormData(e)&&V.isFunction(e.entries)){const n={};return V.forEachEntry(e,(r,o)=>{t(fN(r),o,n,0)}),n}return null}function pN(e,t,n){if(V.isString(e))try{return(t||JSON.parse)(e),V.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Js={transitional:Uu,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=V.isObject(t);if(i&&V.isHTMLForm(t)&&(t=new FormData(t)),V.isFormData(t))return o?JSON.stringify(Xv(t)):t;if(V.isArrayBuffer(t)||V.isBuffer(t)||V.isStream(t)||V.isFile(t)||V.isBlob(t)||V.isReadableStream(t))return t;if(V.isArrayBufferView(t))return t.buffer;if(V.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return dN(t,this.formSerializer).toString();if((c=V.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Ta(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),pN(t)):t}],transformResponse:[function(t){const n=this.transitional||Js.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(V.isResponse(t)||V.isReadableStream(t))return t;if(t&&V.isString(t)&&(r&&!this.responseType||o)){const l=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(c){if(l)throw c.name==="SyntaxError"?Ie.from(c,Ie.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Vt.classes.FormData,Blob:Vt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};V.forEach(["delete","get","head","post","put","patch"],e=>{Js.headers[e]={}});const gN=V.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),mN=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
52
|
+
`).forEach(function(l){o=l.indexOf(":"),n=l.substring(0,o).trim().toLowerCase(),r=l.substring(o+1).trim(),!(!n||t[n]&&gN[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},ey=Symbol("internals");function Ys(e){return e&&String(e).trim().toLowerCase()}function Ia(e){return e===!1||e==null?e:V.isArray(e)?e.map(Ia):String(e)}function vN(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const yN=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Wu(e,t,n,r,o){if(V.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!V.isString(t)){if(V.isString(r))return t.indexOf(r)!==-1;if(V.isRegExp(r))return r.test(t)}}function wN(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function bN(e,t){const n=V.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,l){return this[r].call(this,t,o,i,l)},configurable:!0})})}let rn=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(c,d,f){const p=Ys(d);if(!p)throw new Error("header name must be a non-empty string");const h=V.findKey(o,p);(!h||o[h]===void 0||f===!0||f===void 0&&o[h]!==!1)&&(o[h||d]=Ia(c))}const l=(c,d)=>V.forEach(c,(f,p)=>i(f,p,d));if(V.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(V.isString(t)&&(t=t.trim())&&!yN(t))l(mN(t),n);else if(V.isObject(t)&&V.isIterable(t)){let c={},d,f;for(const p of t){if(!V.isArray(p))throw TypeError("Object iterator must return a key-value pair");c[f=p[0]]=(d=c[f])?V.isArray(d)?[...d,p[1]]:[d,p[1]]:p[1]}l(c,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=Ys(t),t){const r=V.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return vN(o);if(V.isFunction(n))return n.call(this,o,r);if(V.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ys(t),t){const r=V.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Wu(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(l){if(l=Ys(l),l){const c=V.findKey(r,l);c&&(!n||Wu(r,r[c],c,n))&&(delete r[c],o=!0)}}return V.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||Wu(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return V.forEach(this,(o,i)=>{const l=V.findKey(r,i);if(l){n[l]=Ia(o),delete n[i];return}const c=t?wN(i):String(i).trim();c!==i&&delete n[i],n[c]=Ia(o),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return V.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&V.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
53
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[ey]=this[ey]={accessors:{}}).accessors,o=this.prototype;function i(l){const c=Ys(l);r[c]||(bN(o,l),r[c]=!0)}return V.isArray(t)?t.forEach(i):i(t),this}};rn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),V.reduceDescriptors(rn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),V.freezeMethods(rn);function Gu(e,t){const n=this||Js,r=t||n,o=rn.from(r.headers);let i=r.data;return V.forEach(e,function(c){i=c.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function ty(e){return!!(e&&e.__CANCEL__)}let Qs=class extends Ie{constructor(t,n,r){super(t??"canceled",Ie.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function ny(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ie("Request failed with status code "+n.status,[Ie.ERR_BAD_REQUEST,Ie.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function _N(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function SN(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,l;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),p=r[i];l||(l=f),n[o]=d,r[o]=f;let h=i,y=0;for(;h!==o;)y+=n[h++],h=h%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),f-l<t)return;const w=p&&f-p;return w?Math.round(y*1e3/w):void 0}}function xN(e,t){let n=0,r=1e3/t,o,i;const l=(f,p=Date.now())=>{n=p,o=null,i&&(clearTimeout(i),i=null),e(...f)};return[(...f)=>{const p=Date.now(),h=p-n;h>=r?l(f,p):(o=f,i||(i=setTimeout(()=>{i=null,l(o)},r-h)))},()=>o&&l(o)]}const Na=(e,t,n=3)=>{let r=0;const o=SN(50,250);return xN(i=>{const l=i.loaded,c=i.lengthComputable?i.total:void 0,d=l-r,f=o(d),p=l<=c;r=l;const h={loaded:l,total:c,progress:c?l/c:void 0,bytes:d,rate:f||void 0,estimated:f&&c&&p?(c-l)/f:void 0,event:i,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(h)},n)},ry=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},oy=e=>(...t)=>V.asap(()=>e(...t)),CN=Vt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Vt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Vt.origin),Vt.navigator&&/(msie|trident)/i.test(Vt.navigator.userAgent)):()=>!0,EN=Vt.hasStandardBrowserEnv?{write(e,t,n,r,o,i,l){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];V.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),V.isString(r)&&c.push(`path=${r}`),V.isString(o)&&c.push(`domain=${o}`),i===!0&&c.push("secure"),V.isString(l)&&c.push(`SameSite=${l}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function PN(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function AN(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function sy(e,t,n){let r=!PN(t);return e&&(r||n==!1)?AN(e,t):t}const iy=e=>e instanceof rn?{...e}:e;function Eo(e,t){t=t||{};const n={};function r(f,p,h,y){return V.isPlainObject(f)&&V.isPlainObject(p)?V.merge.call({caseless:y},f,p):V.isPlainObject(p)?V.merge({},p):V.isArray(p)?p.slice():p}function o(f,p,h,y){if(V.isUndefined(p)){if(!V.isUndefined(f))return r(void 0,f,h,y)}else return r(f,p,h,y)}function i(f,p){if(!V.isUndefined(p))return r(void 0,p)}function l(f,p){if(V.isUndefined(p)){if(!V.isUndefined(f))return r(void 0,f)}else return r(void 0,p)}function c(f,p,h){if(h in t)return r(f,p);if(h in e)return r(void 0,f)}const d={url:i,method:i,data:i,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:c,headers:(f,p,h)=>o(iy(f),iy(p),h,!0)};return V.forEach(Object.keys({...e,...t}),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const h=V.hasOwnProp(d,p)?d[p]:o,y=h(e[p],t[p],p);V.isUndefined(y)&&h!==c||(n[p]=y)}),n}const ay=e=>{const t=Eo({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:l,auth:c}=t;if(t.headers=l=rn.from(l),t.url=Yv(sy(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&l.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),V.isFormData(n)){if(Vt.hasStandardBrowserEnv||Vt.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(V.isFunction(n.getHeaders)){const d=n.getHeaders(),f=["content-type","content-length"];Object.entries(d).forEach(([p,h])=>{f.includes(p.toLowerCase())&&l.set(p,h)})}}if(Vt.hasStandardBrowserEnv&&(r&&V.isFunction(r)&&(r=r(t)),r||r!==!1&&CN(t.url))){const d=o&&i&&EN.read(i);d&&l.set(o,d)}return t},ON=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=ay(e);let i=o.data;const l=rn.from(o.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=o,p,h,y,w,b;function _(){w&&w(),b&&b(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let x=new XMLHttpRequest;x.open(o.method.toUpperCase(),o.url,!0),x.timeout=o.timeout;function E(){if(!x)return;const O=rn.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),D={data:!c||c==="text"||c==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:O,config:e,request:x};ny(function(z){n(z),_()},function(z){r(z),_()},D),x=null}"onloadend"in x?x.onloadend=E:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(E)},x.onabort=function(){x&&(r(new Ie("Request aborted",Ie.ECONNABORTED,e,x)),x=null)},x.onerror=function(N){const D=N&&N.message?N.message:"Network Error",H=new Ie(D,Ie.ERR_NETWORK,e,x);H.event=N||null,r(H),x=null},x.ontimeout=function(){let N=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const D=o.transitional||Uu;o.timeoutErrorMessage&&(N=o.timeoutErrorMessage),r(new Ie(N,D.clarifyTimeoutError?Ie.ETIMEDOUT:Ie.ECONNABORTED,e,x)),x=null},i===void 0&&l.setContentType(null),"setRequestHeader"in x&&V.forEach(l.toJSON(),function(N,D){x.setRequestHeader(D,N)}),V.isUndefined(o.withCredentials)||(x.withCredentials=!!o.withCredentials),c&&c!=="json"&&(x.responseType=o.responseType),f&&([y,b]=Na(f,!0),x.addEventListener("progress",y)),d&&x.upload&&([h,w]=Na(d),x.upload.addEventListener("progress",h),x.upload.addEventListener("loadend",w)),(o.cancelToken||o.signal)&&(p=O=>{x&&(r(!O||O.type?new Qs(null,e,x):O),x.abort(),x=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const A=_N(o.url);if(A&&Vt.protocols.indexOf(A)===-1){r(new Ie("Unsupported protocol "+A+":",Ie.ERR_BAD_REQUEST,e));return}x.send(i||null)})},TN=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(f){if(!o){o=!0,c();const p=f instanceof Error?f:this.reason;r.abort(p instanceof Ie?p:new Qs(p instanceof Error?p.message:p))}};let l=t&&setTimeout(()=>{l=null,i(new Ie(`timeout of ${t}ms exceeded`,Ie.ETIMEDOUT))},t);const c=()=>{e&&(l&&clearTimeout(l),l=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(i):f.removeEventListener("abort",i)}),e=null)};e.forEach(f=>f.addEventListener("abort",i));const{signal:d}=r;return d.unsubscribe=()=>V.asap(c),d}},IN=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},NN=async function*(e,t){for await(const n of kN(e))yield*IN(n,t)},kN=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},ly=(e,t,n,r)=>{const o=NN(e,t);let i=0,l,c=d=>{l||(l=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:f,value:p}=await o.next();if(f){c(),d.close();return}let h=p.byteLength;if(n){let y=i+=h;n(y)}d.enqueue(new Uint8Array(p))}catch(f){throw c(f),f}},cancel(d){return c(d),o.return()}},{highWaterMark:2})},cy=64*1024,{isFunction:ka}=V,DN=(({Request:e,Response:t})=>({Request:e,Response:t}))(V.global),{ReadableStream:uy,TextEncoder:dy}=V.global,fy=(e,...t)=>{try{return!!e(...t)}catch{return!1}},RN=e=>{e=V.merge.call({skipUndefined:!0},DN,e);const{fetch:t,Request:n,Response:r}=e,o=t?ka(t):typeof fetch=="function",i=ka(n),l=ka(r);if(!o)return!1;const c=o&&ka(uy),d=o&&(typeof dy=="function"?(b=>_=>b.encode(_))(new dy):async b=>new Uint8Array(await new n(b).arrayBuffer())),f=i&&c&&fy(()=>{let b=!1;const _=new n(Vt.origin,{body:new uy,method:"POST",get duplex(){return b=!0,"half"}}).headers.has("Content-Type");return b&&!_}),p=l&&c&&fy(()=>V.isReadableStream(new r("").body)),h={stream:p&&(b=>b.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(b=>{!h[b]&&(h[b]=(_,x)=>{let E=_&&_[b];if(E)return E.call(_);throw new Ie(`Response type '${b}' is not supported`,Ie.ERR_NOT_SUPPORT,x)})});const y=async b=>{if(b==null)return 0;if(V.isBlob(b))return b.size;if(V.isSpecCompliantForm(b))return(await new n(Vt.origin,{method:"POST",body:b}).arrayBuffer()).byteLength;if(V.isArrayBufferView(b)||V.isArrayBuffer(b))return b.byteLength;if(V.isURLSearchParams(b)&&(b=b+""),V.isString(b))return(await d(b)).byteLength},w=async(b,_)=>{const x=V.toFiniteNumber(b.getContentLength());return x??y(_)};return async b=>{let{url:_,method:x,data:E,signal:A,cancelToken:O,timeout:N,onDownloadProgress:D,onUploadProgress:H,responseType:z,headers:L,withCredentials:ee="same-origin",fetchOptions:le}=ay(b),be=t||fetch;z=z?(z+"").toLowerCase():"text";let J=TN([A,O&&O.toAbortSignal()],N),Q=null;const ie=J&&J.unsubscribe&&(()=>{J.unsubscribe()});let he;try{if(H&&f&&x!=="get"&&x!=="head"&&(he=await w(L,E))!==0){let Te=new n(_,{method:"POST",body:E,duplex:"half"}),Qe;if(V.isFormData(E)&&(Qe=Te.headers.get("content-type"))&&L.setContentType(Qe),Te.body){const[xe,Ne]=ry(he,Na(oy(H)));E=ly(Te.body,cy,xe,Ne)}}V.isString(ee)||(ee=ee?"include":"omit");const q=i&&"credentials"in n.prototype,se={...le,signal:J,method:x.toUpperCase(),headers:L.normalize().toJSON(),body:E,duplex:"half",credentials:q?ee:void 0};Q=i&&new n(_,se);let ne=await(i?be(Q,le):be(_,se));const te=p&&(z==="stream"||z==="response");if(p&&(D||te&&ie)){const Te={};["status","statusText","headers"].forEach(_e=>{Te[_e]=ne[_e]});const Qe=V.toFiniteNumber(ne.headers.get("content-length")),[xe,Ne]=D&&ry(Qe,Na(oy(D),!0))||[];ne=new r(ly(ne.body,cy,xe,()=>{Ne&&Ne(),ie&&ie()}),Te)}z=z||"text";let Y=await h[V.findKey(h,z)||"text"](ne,b);return!te&&ie&&ie(),await new Promise((Te,Qe)=>{ny(Te,Qe,{data:Y,headers:rn.from(ne.headers),status:ne.status,statusText:ne.statusText,config:b,request:Q})})}catch(q){throw ie&&ie(),q&&q.name==="TypeError"&&/Load failed|fetch/i.test(q.message)?Object.assign(new Ie("Network Error",Ie.ERR_NETWORK,b,Q,q&&q.response),{cause:q.cause||q}):Ie.from(q,q&&q.code,b,Q,q&&q.response)}}},MN=new Map,hy=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,i=[r,o,n];let l=i.length,c=l,d,f,p=MN;for(;c--;)d=i[c],f=p.get(d),f===void 0&&p.set(d,f=c?new Map:RN(t)),p=f;return f};hy();const ju={http:rN,xhr:ON,fetch:{get:hy}};V.forEach(ju,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const py=e=>`- ${e}`,FN=e=>V.isFunction(e)||e===null||e===!1;function $N(e,t){e=V.isArray(e)?e:[e];const{length:n}=e;let r,o;const i={};for(let l=0;l<n;l++){r=e[l];let c;if(o=r,!FN(r)&&(o=ju[(c=String(r)).toLowerCase()],o===void 0))throw new Ie(`Unknown adapter '${c}'`);if(o&&(V.isFunction(o)||(o=o.get(t))))break;i[c||"#"+l]=o}if(!o){const l=Object.entries(i).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?l.length>1?`since :
|
|
54
|
+
`+l.map(py).join(`
|
|
55
|
+
`):" "+py(l[0]):"as no adapter specified";throw new Ie("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return o}const gy={getAdapter:$N,adapters:ju};function qu(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Qs(null,e)}function my(e){return qu(e),e.headers=rn.from(e.headers),e.data=Gu.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),gy.getAdapter(e.adapter||Js.adapter,e)(e).then(function(r){return qu(e),r.data=Gu.call(e,e.transformResponse,r),r.headers=rn.from(r.headers),r},function(r){return ty(r)||(qu(e),r&&r.response&&(r.response.data=Gu.call(e,e.transformResponse,r.response),r.response.headers=rn.from(r.response.headers))),Promise.reject(r)})}const vy="1.13.6",Da={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Da[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const yy={};Da.transitional=function(t,n,r){function o(i,l){return"[Axios v"+vy+"] Transitional option '"+i+"'"+l+(r?". "+r:"")}return(i,l,c)=>{if(t===!1)throw new Ie(o(l," has been removed"+(n?" in "+n:"")),Ie.ERR_DEPRECATED);return n&&!yy[l]&&(yy[l]=!0,console.warn(o(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,l,c):!0}},Da.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function LN(e,t,n){if(typeof e!="object")throw new Ie("options must be an object",Ie.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],l=t[i];if(l){const c=e[i],d=c===void 0||l(c,i,e);if(d!==!0)throw new Ie("option "+i+" must be "+d,Ie.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ie("Unknown option "+i,Ie.ERR_BAD_OPTION)}}const Ra={assertOptions:LN,validators:Da},Tn=Ra.validators;let Po=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Qv,response:new Qv}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
56
|
+
`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Eo(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&Ra.assertOptions(r,{silentJSONParsing:Tn.transitional(Tn.boolean),forcedJSONParsing:Tn.transitional(Tn.boolean),clarifyTimeoutError:Tn.transitional(Tn.boolean),legacyInterceptorReqResOrdering:Tn.transitional(Tn.boolean)},!1),o!=null&&(V.isFunction(o)?n.paramsSerializer={serialize:o}:Ra.assertOptions(o,{encode:Tn.function,serialize:Tn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ra.assertOptions(n,{baseUrl:Tn.spelling("baseURL"),withXsrfToken:Tn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=i&&V.merge(i.common,i[n.method]);i&&V.forEach(["delete","get","head","post","put","patch","common"],b=>{delete i[b]}),n.headers=rn.concat(l,i);const c=[];let d=!0;this.interceptors.request.forEach(function(_){if(typeof _.runWhen=="function"&&_.runWhen(n)===!1)return;d=d&&_.synchronous;const x=n.transitional||Uu;x&&x.legacyInterceptorReqResOrdering?c.unshift(_.fulfilled,_.rejected):c.push(_.fulfilled,_.rejected)});const f=[];this.interceptors.response.forEach(function(_){f.push(_.fulfilled,_.rejected)});let p,h=0,y;if(!d){const b=[my.bind(this),void 0];for(b.unshift(...c),b.push(...f),y=b.length,p=Promise.resolve(n);h<y;)p=p.then(b[h++],b[h++]);return p}y=c.length;let w=n;for(;h<y;){const b=c[h++],_=c[h++];try{w=b(w)}catch(x){_.call(this,x);break}}try{p=my.call(this,w)}catch(b){return Promise.reject(b)}for(h=0,y=f.length;h<y;)p=p.then(f[h++],f[h++]);return p}getUri(t){t=Eo(this.defaults,t);const n=sy(t.baseURL,t.url,t.allowAbsoluteUrls);return Yv(n,t.params,t.paramsSerializer)}};V.forEach(["delete","get","head","options"],function(t){Po.prototype[t]=function(n,r){return this.request(Eo(r||{},{method:t,url:n,data:(r||{}).data}))}}),V.forEach(["post","put","patch"],function(t){function n(r){return function(i,l,c){return this.request(Eo(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:l}))}}Po.prototype[t]=n(),Po.prototype[t+"Form"]=n(!0)});let zN=class KS{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const l=new Promise(c=>{r.subscribe(c),i=c}).then(o);return l.cancel=function(){r.unsubscribe(i)},l},t(function(i,l,c){r.reason||(r.reason=new Qs(i,l,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new KS(function(o){t=o}),cancel:t}}};function VN(e){return function(n){return e.apply(null,n)}}function UN(e){return V.isObject(e)&&e.isAxiosError===!0}const Zu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Zu).forEach(([e,t])=>{Zu[t]=e});function wy(e){const t=new Po(e),n=$v(Po.prototype.request,t);return V.extend(n,Po.prototype,t,{allOwnKeys:!0}),V.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return wy(Eo(e,o))},n}const ht=wy(Js);ht.Axios=Po,ht.CanceledError=Qs,ht.CancelToken=zN,ht.isCancel=ty,ht.VERSION=vy,ht.toFormData=Ta,ht.AxiosError=Ie,ht.Cancel=ht.CanceledError,ht.all=function(t){return Promise.all(t)},ht.spread=VN,ht.isAxiosError=UN,ht.mergeConfig=Eo,ht.AxiosHeaders=rn,ht.formToJSON=e=>Xv(V.isHTMLForm(e)?new FormData(e):e),ht.getAdapter=gy.getAdapter,ht.HttpStatusCode=Zu,ht.default=ht;const{Axios:H5,AxiosError:W5,CanceledError:G5,isCancel:j5,CancelToken:q5,VERSION:Z5,all:K5,Cancel:J5,isAxiosError:Y5,spread:Q5,toFormData:X5,AxiosHeaders:eW,HttpStatusCode:tW,formToJSON:nW,getAdapter:rW,mergeConfig:oW}=ht;oe.BASE_URL="https://happyeat-b.origin.com.mm/api/v1";function by(e){e&&(oe.BASE_URL=e,Ku.defaults.baseURL=e,on.defaults.baseURL=e)}const Ku=ht.create({baseURL:oe.BASE_URL,headers:{"Content-Type":"application/json"}});Ku.interceptors.response.use(e=>e,e=>Promise.reject(e));const on=ht.create({baseURL:oe.BASE_URL,headers:{"Content-Type":"application/json"}});let Ju=!1,Yu=[];const _y=(e,t=null)=>{Yu.forEach(({resolve:n,reject:r})=>{e?r(e):n(t)}),Yu=[]},BN=async()=>{const e=localStorage.getItem("refreshToken");if(!e)throw new Error("No refresh token available");const t=await ht.post(`${oe.BASE_URL}/auth/refresh`,{refreshToken:e}),{data:n}=t.data;return n.accessToken&&localStorage.setItem("accessToken",n.accessToken),n.accessToken};on.interceptors.request.use(e=>{const t=localStorage.getItem("accessToken");return t&&(e.headers=e.headers||{},e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e)),on.interceptors.response.use(e=>e,async e=>{const t=e.config;if(e.response?.status===401&&!t._retry){if(t._retry=!0,Ju)return new Promise((n,r)=>{Yu.push({resolve:n,reject:r})}).then(n=>(t.headers.Authorization=`Bearer ${n}`,on(t)));Ju=!0;try{const n=await BN();return _y(null,n),t.headers.Authorization=`Bearer ${n}`,on(t)}catch(n){return _y(n,null),localStorage.clear(),window.location.href="/login",Promise.reject(n)}finally{Ju=!1}}return Promise.reject(e)});const HN=new bx({defaultOptions:{queries:{staleTime:300*1e3,retry:1}}});function WN({config:e={},children:t}){const{apiUrl:n,theme:r="system",toastPosition:o="top-center"}=e;return $.useEffect(()=>{n&&by(n)},[n]),g.jsx(_x,{client:HN,children:g.jsx(qh,{defaultTheme:r,storageKey:"obs-ui-theme",children:g.jsxs(RT,{children:[t,g.jsx(gI,{position:o})]})})})}class GN{endpoint;constructor(t){this.endpoint=t}async getAll(t){return(await on.get(this.endpoint,{params:t})).data}async getById(t){return(await on.get(`${this.endpoint}/${t}`)).data}async create(t){return(await on.post(this.endpoint,t)).data}async update(t,n){return(await on.put(`${this.endpoint}/${t}`,n)).data}async delete(t){return(await on.delete(`${this.endpoint}/${t}`)).data}}function Rt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Jn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Qu({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Xu(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Sy(e,t,n="/"){return jN(e,t,n,!1)}function jN(e,t,n,r){let o=typeof t=="string"?Xu(t):t,i=qr(o.pathname||"/",n);if(i==null)return null;let l=xy(e);qN(l);let c=null;for(let d=0;c==null&&d<l.length;++d){let f=ok(i);c=nk(l[d],f,r)}return c}function xy(e,t=[],n=[],r="",o=!1){let i=(l,c,d=o,f)=>{let p={relativePath:f===void 0?l.path||"":f,caseSensitive:l.caseSensitive===!0,childrenIndex:c,route:l};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(r)&&d)return;Rt(p.relativePath.startsWith(r),`Absolute route path "${p.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(r.length)}let h=hr([r,p.relativePath]),y=n.concat(p);l.children&&l.children.length>0&&(Rt(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),xy(l.children,t,y,h,d)),!(l.path==null&&!l.index)&&t.push({path:h,score:ek(h,l.index),routesMeta:y})};return e.forEach((l,c)=>{if(l.path===""||!l.path?.includes("?"))i(l,c);else for(let d of Cy(l.path))i(l,c,!0,d)}),t}function Cy(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let l=Cy(r.join("/")),c=[];return c.push(...l.map(d=>d===""?i:[i,d].join("/"))),o&&c.push(...l),c.map(d=>e.startsWith("/")&&d===""?"/":d)}function qN(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:tk(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var ZN=/^:[\w-]+$/,KN=3,JN=2,YN=1,QN=10,XN=-2,Ey=e=>e==="*";function ek(e,t){let n=e.split("/"),r=n.length;return n.some(Ey)&&(r+=XN),t&&(r+=JN),n.filter(o=>!Ey(o)).reduce((o,i)=>o+(ZN.test(i)?KN:i===""?YN:QN),r)}function tk(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function nk(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",l=[];for(let c=0;c<r.length;++c){let d=r[c],f=c===r.length-1,p=i==="/"?t:t.slice(i.length)||"/",h=Ma({path:d.relativePath,caseSensitive:d.caseSensitive,end:f},p),y=d.route;if(!h&&f&&n&&!r[r.length-1].route.index&&(h=Ma({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},p)),!h)return null;Object.assign(o,h.params),l.push({params:o,pathname:hr([i,h.pathname]),pathnameBase:lk(hr([i,h.pathnameBase])),route:y}),h.pathnameBase!=="/"&&(i=hr([i,h.pathnameBase]))}return l}function Ma(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=rk(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],l=i.replace(/(.)\/+$/,"$1"),c=o.slice(1);return{params:r.reduce((f,{paramName:p,isOptional:h},y)=>{if(p==="*"){let b=c[y]||"";l=i.slice(0,i.length-b.length).replace(/(.)\/+$/,"$1")}const w=c[y];return h&&!w?f[p]=void 0:f[p]=(w||"").replace(/%2F/g,"/"),f},{}),pathname:i,pathnameBase:l,pattern:e}}function rk(e,t=!1,n=!0){Jn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,c,d,f,p)=>{if(r.push({paramName:c,isOptional:d!=null}),d){let h=p.charAt(f+l.length);return h&&h!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function ok(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Jn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function qr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var sk=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function ik(e,t="/"){let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Xu(e):e,i;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?i=Py(n.substring(1),"/"):i=Py(n,t)):i=t,{pathname:i,search:ck(r),hash:uk(o)}}function Py(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function ed(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ak(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function td(e){let t=ak(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Fa(e,t,n,r=!1){let o;typeof e=="string"?o=Xu(e):(o={...e},Rt(!o.pathname||!o.pathname.includes("?"),ed("?","pathname","search",o)),Rt(!o.pathname||!o.pathname.includes("#"),ed("#","pathname","hash",o)),Rt(!o.search||!o.search.includes("#"),ed("#","search","hash",o)));let i=e===""||o.pathname==="",l=i?"/":o.pathname,c;if(l==null)c=n;else{let h=t.length-1;if(!r&&l.startsWith("..")){let y=l.split("/");for(;y[0]==="..";)y.shift(),h-=1;o.pathname=y.join("/")}c=h>=0?t[h]:"/"}let d=ik(o,c),f=l&&l!=="/"&&l.endsWith("/"),p=(i||l===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(f||p)&&(d.pathname+="/"),d}var hr=e=>e.join("/").replace(/\/\/+/g,"/"),lk=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),ck=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,uk=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,dk=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function fk(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function hk(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Ay=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Oy(e,t){let n=e;if(typeof n!="string"||!sk.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,o=!1;if(Ay)try{let i=new URL(window.location.href),l=n.startsWith("//")?new URL(i.protocol+n):new URL(n),c=qr(l.pathname,t);l.origin===i.origin&&c!=null?n=c+l.search+l.hash:o=!0}catch{Jn(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:o,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ty=["POST","PUT","PATCH","DELETE"];new Set(Ty);var pk=["GET",...Ty];new Set(pk);var os=v.createContext(null);os.displayName="DataRouter";var $a=v.createContext(null);$a.displayName="DataRouterState";var gk=v.createContext(!1),Iy=v.createContext({isTransitioning:!1});Iy.displayName="ViewTransition";var mk=v.createContext(new Map);mk.displayName="Fetchers";var vk=v.createContext(null);vk.displayName="Await";var In=v.createContext(null);In.displayName="Navigation";var nd=v.createContext(null);nd.displayName="Location";var Yn=v.createContext({outlet:null,matches:[],isDataRoute:!1});Yn.displayName="Route";var rd=v.createContext(null);rd.displayName="RouteError";var Ny="REACT_ROUTER_ERROR",yk="REDIRECT",wk="ROUTE_ERROR_RESPONSE";function bk(e){if(e.startsWith(`${Ny}:${yk}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function _k(e){if(e.startsWith(`${Ny}:${wk}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new dk(t.status,t.statusText,t.data)}catch{}}function Sk(e,{relative:t}={}){Rt(Xs(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=v.useContext(In),{hash:o,pathname:i,search:l}=ei(e,{relative:t}),c=i;return n!=="/"&&(c=i==="/"?n:hr([n,i])),r.createHref({pathname:c,search:l,hash:o})}function Xs(){return v.useContext(nd)!=null}function Qn(){return Rt(Xs(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(nd).location}var ky="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Dy(e){v.useContext(In).static||v.useLayoutEffect(e)}function od(){let{isDataRoute:e}=v.useContext(Yn);return e?$k():xk()}function xk(){Rt(Xs(),"useNavigate() may be used only in the context of a <Router> component.");let e=v.useContext(os),{basename:t,navigator:n}=v.useContext(In),{matches:r}=v.useContext(Yn),{pathname:o}=Qn(),i=JSON.stringify(td(r)),l=v.useRef(!1);return Dy(()=>{l.current=!0}),v.useCallback((d,f={})=>{if(Jn(l.current,ky),!l.current)return;if(typeof d=="number"){n.go(d);return}let p=Fa(d,JSON.parse(i),o,f.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:hr([t,p.pathname])),(f.replace?n.replace:n.push)(p,f.state,f)},[t,n,i,o,e])}var Ck=v.createContext(null);function Ek(e){let t=v.useContext(Yn).outlet;return v.useMemo(()=>t&&v.createElement(Ck.Provider,{value:e},t),[t,e])}function ei(e,{relative:t}={}){let{matches:n}=v.useContext(Yn),{pathname:r}=Qn(),o=JSON.stringify(td(n));return v.useMemo(()=>Fa(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}function Pk(e,t,n){Rt(Xs(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=v.useContext(In),{matches:o}=v.useContext(Yn),i=o[o.length-1],l=i?i.params:{},c=i?i.pathname:"/",d=i?i.pathnameBase:"/",f=i&&i.route;{let x=f&&f.path||"";Fy(c,!f||x.endsWith("*")||x.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${x}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
57
|
+
|
|
58
|
+
Please change the parent <Route path="${x}"> to <Route path="${x==="/"?"*":`${x}/*`}">.`)}let p=Qn(),h;h=p;let y=h.pathname||"/",w=y;if(d!=="/"){let x=d.replace(/^\//,"").split("/");w="/"+y.replace(/^\//,"").split("/").slice(x.length).join("/")}let b=Sy(e,{pathname:w});return Jn(f||b!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),Jn(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),Nk(b&&b.map(x=>Object.assign({},x,{params:Object.assign({},l,x.params),pathname:hr([d,r.encodeLocation?r.encodeLocation(x.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?d:hr([d,r.encodeLocation?r.encodeLocation(x.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:x.pathnameBase])})),o,n)}function Ak(){let e=Fk(),t=fk(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=v.createElement(v.Fragment,null,v.createElement("p",null,"💿 Hey developer 👋"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:i},"ErrorBoundary")," or"," ",v.createElement("code",{style:i},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:o},n):null,l)}var Ok=v.createElement(Ak,null),Ry=class extends v.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=_k(e.digest);n&&(e=n)}let t=e!==void 0?v.createElement(Yn.Provider,{value:this.props.routeContext},v.createElement(rd.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?v.createElement(Tk,{error:e},t):t}};Ry.contextType=gk;var sd=new WeakMap;function Tk({children:e,error:t}){let{basename:n}=v.useContext(In);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=bk(t.digest);if(r){let o=sd.get(t);if(o)throw o;let i=Oy(r.location,n);if(Ay&&!sd.get(t))if(i.isExternal||r.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:r.replace}));throw sd.set(t,l),l}return v.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function Ik({routeContext:e,match:t,children:n}){let r=v.useContext(os);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),v.createElement(Yn.Provider,{value:e},n)}function Nk(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,i=r?.errors;if(i!=null){let p=o.findIndex(h=>h.route.id&&i?.[h.route.id]!==void 0);Rt(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,p+1))}let l=!1,c=-1;if(n&&r){l=r.renderFallback;for(let p=0;p<o.length;p++){let h=o[p];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(c=p),h.route.id){let{loaderData:y,errors:w}=r,b=h.route.loader&&!y.hasOwnProperty(h.route.id)&&(!w||w[h.route.id]===void 0);if(h.route.lazy||b){n.isStatic&&(l=!0),c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}}let d=n?.onError,f=r&&d?(p,h)=>{d(p,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:hk(r.matches),errorInfo:h})}:void 0;return o.reduceRight((p,h,y)=>{let w,b=!1,_=null,x=null;r&&(w=i&&h.route.id?i[h.route.id]:void 0,_=h.route.errorElement||Ok,l&&(c<0&&y===0?(Fy("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,x=null):c===y&&(b=!0,x=h.route.hydrateFallbackElement||null)));let E=t.concat(o.slice(0,y+1)),A=()=>{let O;return w?O=_:b?O=x:h.route.Component?O=v.createElement(h.route.Component,null):h.route.element?O=h.route.element:O=p,v.createElement(Ik,{match:h,routeContext:{outlet:p,matches:E,isDataRoute:r!=null},children:O})};return r&&(h.route.ErrorBoundary||h.route.errorElement||y===0)?v.createElement(Ry,{location:r.location,revalidation:r.revalidation,component:_,error:w,children:A(),routeContext:{outlet:null,matches:E,isDataRoute:!0},onError:f}):A()},null)}function id(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function kk(e){let t=v.useContext(os);return Rt(t,id(e)),t}function Dk(e){let t=v.useContext($a);return Rt(t,id(e)),t}function Rk(e){let t=v.useContext(Yn);return Rt(t,id(e)),t}function ad(e){let t=Rk(e),n=t.matches[t.matches.length-1];return Rt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Mk(){return ad("useRouteId")}function Fk(){let e=v.useContext(rd),t=Dk("useRouteError"),n=ad("useRouteError");return e!==void 0?e:t.errors?.[n]}function $k(){let{router:e}=kk("useNavigate"),t=ad("useNavigate"),n=v.useRef(!1);return Dy(()=>{n.current=!0}),v.useCallback(async(o,i={})=>{Jn(n.current,ky),n.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...i}))},[e,t])}var My={};function Fy(e,t,n){!t&&!My[e]&&(My[e]=!0,Jn(!1,n))}v.memo(Lk);function Lk({routes:e,future:t,state:n,isStatic:r,onError:o}){return Pk(e,void 0,{state:n,isStatic:r,onError:o})}function $y({to:e,replace:t,state:n,relative:r}){Rt(Xs(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=v.useContext(In);Jn(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=v.useContext(Yn),{pathname:l}=Qn(),c=od(),d=Fa(e,td(i),l,r==="path"),f=JSON.stringify(d);return v.useEffect(()=>{c(JSON.parse(f),{replace:t,state:n,relative:r})},[c,f,r,t,n]),null}function Ly(e){return Ek(e.context)}var La="get",za="application/x-www-form-urlencoded";function Va(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function zk(e){return Va(e)&&e.tagName.toLowerCase()==="button"}function Vk(e){return Va(e)&&e.tagName.toLowerCase()==="form"}function Uk(e){return Va(e)&&e.tagName.toLowerCase()==="input"}function Bk(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Hk(e,t){return e.button===0&&(!t||t==="_self")&&!Bk(e)}function ld(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(o=>[n,o]):[[n,r]])},[]))}function Wk(e,t){let n=ld(e);return t&&t.forEach((r,o)=>{n.has(o)||t.getAll(o).forEach(i=>{n.append(o,i)})}),n}var Ua=null;function Gk(){if(Ua===null)try{new FormData(document.createElement("form"),0),Ua=!1}catch{Ua=!0}return Ua}var jk=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function cd(e){return e!=null&&!jk.has(e)?(Jn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${za}"`),null):e}function qk(e,t){let n,r,o,i,l;if(Vk(e)){let c=e.getAttribute("action");r=c?qr(c,t):null,n=e.getAttribute("method")||La,o=cd(e.getAttribute("enctype"))||za,i=new FormData(e)}else if(zk(e)||Uk(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||c.getAttribute("action");if(r=d?qr(d,t):null,n=e.getAttribute("formmethod")||c.getAttribute("method")||La,o=cd(e.getAttribute("formenctype"))||cd(c.getAttribute("enctype"))||za,i=new FormData(c,e),!Gk()){let{name:f,type:p,value:h}=e;if(p==="image"){let y=f?`${f}.`:"";i.append(`${y}x`,"0"),i.append(`${y}y`,"0")}else f&&i.append(f,h)}}else{if(Va(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=La,r=null,o=za,l=e}return i&&o==="text/plain"&&(l=i,i=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:i,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ud(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Zk(e,t,n,r){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${r}`:o.pathname=`${o.pathname}.${r}`:o.pathname==="/"?o.pathname=`_root.${r}`:t&&qr(o.pathname,t)==="/"?o.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${r}`,o}async function Kk(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Jk(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Yk(e,t,n){let r=await Promise.all(e.map(async o=>{let i=t.routes[o.route.id];if(i){let l=await Kk(i,n);return l.links?l.links():[]}return[]}));return tD(r.flat(1).filter(Jk).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function zy(e,t,n,r,o,i){let l=(d,f)=>n[f]?d.route.id!==n[f].route.id:!0,c=(d,f)=>n[f].pathname!==d.pathname||n[f].route.path?.endsWith("*")&&n[f].params["*"]!==d.params["*"];return i==="assets"?t.filter((d,f)=>l(d,f)||c(d,f)):i==="data"?t.filter((d,f)=>{let p=r.routes[d.route.id];if(!p||!p.hasLoader)return!1;if(l(d,f)||c(d,f))return!0;if(d.route.shouldRevalidate){let h=d.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function Qk(e,t,{includeHydrateFallback:n}={}){return Xk(e.map(r=>{let o=t.routes[r.route.id];if(!o)return[];let i=[o.module];return o.clientActionModule&&(i=i.concat(o.clientActionModule)),o.clientLoaderModule&&(i=i.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(i=i.concat(o.hydrateFallbackModule)),o.imports&&(i=i.concat(o.imports)),i}).flat(1))}function Xk(e){return[...new Set(e)]}function eD(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function tD(e,t){let n=new Set;return new Set(t),e.reduce((r,o)=>{let i=JSON.stringify(eD(o));return n.has(i)||(n.add(i),r.push({key:i,link:o})),r},[])}function Vy(){let e=v.useContext(os);return ud(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function nD(){let e=v.useContext($a);return ud(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var dd=v.createContext(void 0);dd.displayName="FrameworkContext";function Uy(){let e=v.useContext(dd);return ud(e,"You must render this element inside a <HydratedRouter> element"),e}function rD(e,t){let n=v.useContext(dd),[r,o]=v.useState(!1),[i,l]=v.useState(!1),{onFocus:c,onBlur:d,onMouseEnter:f,onMouseLeave:p,onTouchStart:h}=t,y=v.useRef(null);v.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let _=E=>{E.forEach(A=>{l(A.isIntersecting)})},x=new IntersectionObserver(_,{threshold:.5});return y.current&&x.observe(y.current),()=>{x.disconnect()}}},[e]),v.useEffect(()=>{if(r){let _=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(_)}}},[r]);let w=()=>{o(!0)},b=()=>{o(!1),l(!1)};return n?e!=="intent"?[i,y,{}]:[i,y,{onFocus:ti(c,w),onBlur:ti(d,b),onMouseEnter:ti(f,w),onMouseLeave:ti(p,b),onTouchStart:ti(h,w)}]:[!1,y,{}]}function ti(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function oD({page:e,...t}){let{router:n}=Vy(),r=v.useMemo(()=>Sy(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?v.createElement(iD,{page:e,matches:r,...t}):null}function sD(e){let{manifest:t,routeModules:n}=Uy(),[r,o]=v.useState([]);return v.useEffect(()=>{let i=!1;return Yk(e,t,n).then(l=>{i||o(l)}),()=>{i=!0}},[e,t,n]),r}function iD({page:e,matches:t,...n}){let r=Qn(),{future:o,manifest:i,routeModules:l}=Uy(),{basename:c}=Vy(),{loaderData:d,matches:f}=nD(),p=v.useMemo(()=>zy(e,t,f,i,r,"data"),[e,t,f,i,r]),h=v.useMemo(()=>zy(e,t,f,i,r,"assets"),[e,t,f,i,r]),y=v.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let _=new Set,x=!1;if(t.forEach(A=>{let O=i.routes[A.route.id];!O||!O.hasLoader||(!p.some(N=>N.route.id===A.route.id)&&A.route.id in d&&l[A.route.id]?.shouldRevalidate||O.hasClientLoader?x=!0:_.add(A.route.id))}),_.size===0)return[];let E=Zk(e,c,o.unstable_trailingSlashAwareDataRequests,"data");return x&&_.size>0&&E.searchParams.set("_routes",t.filter(A=>_.has(A.route.id)).map(A=>A.route.id).join(",")),[E.pathname+E.search]},[c,o.unstable_trailingSlashAwareDataRequests,d,r,i,p,t,e,l]),w=v.useMemo(()=>Qk(h,i),[h,i]),b=sD(h);return v.createElement(v.Fragment,null,y.map(_=>v.createElement("link",{key:_,rel:"prefetch",as:"fetch",href:_,...n})),w.map(_=>v.createElement("link",{key:_,rel:"modulepreload",href:_,...n})),b.map(({key:_,link:x})=>v.createElement("link",{key:_,nonce:n.nonce,...x,crossOrigin:x.crossOrigin??n.crossOrigin})))}function aD(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var lD=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{lD&&(window.__reactRouterVersion="7.13.1")}catch{}var By=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,fd=v.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:o,reloadDocument:i,replace:l,unstable_mask:c,state:d,target:f,to:p,preventScrollReset:h,viewTransition:y,unstable_defaultShouldRevalidate:w,...b},_){let{basename:x,navigator:E,unstable_useTransitions:A}=v.useContext(In),O=typeof p=="string"&&By.test(p),N=Oy(p,x);p=N.to;let D=Sk(p,{relative:o}),H=Qn(),z=null;if(c){let he=Fa(c,[],H.unstable_mask?H.unstable_mask.pathname:"/",!0);x!=="/"&&(he.pathname=he.pathname==="/"?x:hr([x,he.pathname])),z=E.createHref(he)}let[L,ee,le]=rD(r,b),be=dD(p,{replace:l,unstable_mask:c,state:d,target:f,preventScrollReset:h,relative:o,viewTransition:y,unstable_defaultShouldRevalidate:w,unstable_useTransitions:A});function J(he){t&&t(he),he.defaultPrevented||be(he)}let Q=!(N.isExternal||i),ie=v.createElement("a",{...b,...le,href:(Q?z:void 0)||N.absoluteURL||D,onClick:Q?J:t,ref:aD(_,ee),target:f,"data-discover":!O&&n==="render"?"true":void 0});return L&&!O?v.createElement(v.Fragment,null,ie,v.createElement(oD,{page:D})):ie});fd.displayName="Link";var hd=v.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:o=!1,style:i,to:l,viewTransition:c,children:d,...f},p){let h=ei(l,{relative:f.relative}),y=Qn(),w=v.useContext($a),{navigator:b,basename:_}=v.useContext(In),x=w!=null&&mD(h)&&c===!0,E=b.encodeLocation?b.encodeLocation(h).pathname:h.pathname,A=y.pathname,O=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;n||(A=A.toLowerCase(),O=O?O.toLowerCase():null,E=E.toLowerCase()),O&&_&&(O=qr(O,_)||O);const N=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let D=A===E||!o&&A.startsWith(E)&&A.charAt(N)==="/",H=O!=null&&(O===E||!o&&O.startsWith(E)&&O.charAt(E.length)==="/"),z={isActive:D,isPending:H,isTransitioning:x},L=D?t:void 0,ee;typeof r=="function"?ee=r(z):ee=[r,D?"active":null,H?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let le=typeof i=="function"?i(z):i;return v.createElement(fd,{...f,"aria-current":L,className:ee,ref:p,style:le,to:l,viewTransition:c},typeof d=="function"?d(z):d)});hd.displayName="NavLink";var cD=v.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:i,method:l=La,action:c,onSubmit:d,relative:f,preventScrollReset:p,viewTransition:h,unstable_defaultShouldRevalidate:y,...w},b)=>{let{unstable_useTransitions:_}=v.useContext(In),x=pD(),E=gD(c,{relative:f}),A=l.toLowerCase()==="get"?"get":"post",O=typeof c=="string"&&By.test(c),N=D=>{if(d&&d(D),D.defaultPrevented)return;D.preventDefault();let H=D.nativeEvent.submitter,z=H?.getAttribute("formmethod")||l,L=()=>x(H||D.currentTarget,{fetcherKey:t,method:z,navigate:n,replace:o,state:i,relative:f,preventScrollReset:p,viewTransition:h,unstable_defaultShouldRevalidate:y});_&&n!==!1?v.startTransition(()=>L()):L()};return v.createElement("form",{ref:b,method:A,action:E,onSubmit:r?d:N,...w,"data-discover":!O&&e==="render"?"true":void 0})});cD.displayName="Form";function uD(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Hy(e){let t=v.useContext(os);return Rt(t,uD(e)),t}function dD(e,{target:t,replace:n,unstable_mask:r,state:o,preventScrollReset:i,relative:l,viewTransition:c,unstable_defaultShouldRevalidate:d,unstable_useTransitions:f}={}){let p=od(),h=Qn(),y=ei(e,{relative:l});return v.useCallback(w=>{if(Hk(w,t)){w.preventDefault();let b=n!==void 0?n:Qu(h)===Qu(y),_=()=>p(e,{replace:b,unstable_mask:r,state:o,preventScrollReset:i,relative:l,viewTransition:c,unstable_defaultShouldRevalidate:d});f?v.startTransition(()=>_()):_()}},[h,p,y,n,r,o,t,e,i,l,c,d,f])}function Wy(e){Jn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=v.useRef(ld(e)),n=v.useRef(!1),r=Qn(),o=v.useMemo(()=>Wk(r.search,n.current?null:t.current),[r.search]),i=od(),l=v.useCallback((c,d)=>{const f=ld(typeof c=="function"?c(new URLSearchParams(o)):c);n.current=!0,i("?"+f,d)},[i,o]);return[o,l]}var fD=0,hD=()=>`__${String(++fD)}__`;function pD(){let{router:e}=Hy("useSubmit"),{basename:t}=v.useContext(In),n=Mk(),r=e.fetch,o=e.navigate;return v.useCallback(async(i,l={})=>{let{action:c,method:d,encType:f,formData:p,body:h}=qk(i,t);if(l.navigate===!1){let y=l.fetcherKey||hD();await r(y,n,l.action||c,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:p,body:h,formMethod:l.method||d,formEncType:l.encType||f,flushSync:l.flushSync})}else await o(l.action||c,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:p,body:h,formMethod:l.method||d,formEncType:l.encType||f,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[r,o,t,n])}function gD(e,{relative:t}={}){let{basename:n}=v.useContext(In),r=v.useContext(Yn);Rt(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),i={...ei(e||".",{relative:t})},l=Qn();if(e==null){i.search=l.search;let c=new URLSearchParams(i.search),d=c.getAll("index");if(d.some(p=>p==="")){c.delete("index"),d.filter(h=>h).forEach(h=>c.append("index",h));let p=c.toString();i.search=p?`?${p}`:""}}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:hr([n,i.pathname])),Qu(i)}function mD(e,{relative:t}={}){let n=v.useContext(Iy);Rt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Hy("useViewTransitionState"),o=ei(e,{relative:t});if(!n.isTransitioning)return!1;let i=qr(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=qr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ma(o.pathname,l)!=null||Ma(o.pathname,i)!=null}const Gy=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,jy=pv,qy=(e,t)=>n=>{var r;if(t?.variants==null)return jy(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,l=Object.keys(o).map(f=>{const p=n?.[f],h=i?.[f];if(p===null)return null;const y=Gy(p)||Gy(h);return o[f][y]}),c=n&&Object.entries(n).reduce((f,p)=>{let[h,y]=p;return y===void 0||(f[h]=y),f},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,p)=>{let{class:h,className:y,...w}=p;return Object.entries(w).every(b=>{let[_,x]=b;return Array.isArray(x)?x.includes({...i,...c}[_]):{...i,...c}[_]===x})?[...f,h,y]:f},[]);return jy(e,l,d,n?.class,n?.className)},pd=768;function Zy(){const[e,t]=v.useState(void 0);return v.useEffect(()=>{const n=window.matchMedia(`(max-width: ${pd-1}px)`),r=()=>{t(window.innerWidth<pd)};return n.addEventListener("change",r),t(window.innerWidth<pd),()=>n.removeEventListener("change",r)},[]),!!e}const vD=qy("group/button inline-flex shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",lg:"h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-9","icon-xs":"size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Ut({className:e,variant:t="default",size:n="default",asChild:r=!1,...o}){const i=r?$i:"button";return g.jsx(i,{"data-slot":"button","data-variant":t,"data-size":n,className:ae(vD({variant:t,size:n,className:e})),...o})}function ss({className:e,type:t,...n}){return g.jsx("input",{type:t,"data-slot":"input",className:ae("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...n})}function Ky({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return g.jsx(CO,{"data-slot":"separator",decorative:n,orientation:t,className:ae("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",e),...r})}const Jy=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const yD=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const wD=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const Yy=e=>{const t=wD(e);return t.charAt(0).toUpperCase()+t.slice(1)};var bD={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const _D=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const SD=$.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:l,...c},d)=>$.createElement("svg",{ref:d,...bD,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Jy("lucide",o),...!i&&!_D(c)&&{"aria-hidden":"true"},...c},[...l.map(([f,p])=>$.createElement(f,p)),...Array.isArray(i)?i:[i]]));const At=(e,t)=>{const n=$.forwardRef(({className:r,...o},i)=>$.createElement(SD,{ref:i,iconNode:t,className:Jy(`lucide-${yD(Yy(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Yy(e),n};const xD=At("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);const CD=At("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Ba=At("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const ED=At("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const PD=At("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const Qy=At("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const AD=At("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);const gd=At("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);const md=At("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const OD=At("key-round",[["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"}]]);const TD=At("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);const Xy=At("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const ID=At("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);const ND=At("panel-left-close",[["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"}]]);const kD=At("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);const ew=At("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);const DD=At("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const RD=At("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);const tw=At("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function nw({...e}){return g.jsx(Lc,{"data-slot":"sheet",...e})}function MD({...e}){return g.jsx(zc,{"data-slot":"sheet-portal",...e})}function FD({className:e,...t}){return g.jsx(Vc,{"data-slot":"sheet-overlay",className:ae("fixed inset-0 z-50 bg-black/30 duration-100 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...t})}function rw({className:e,children:t,side:n="right",showCloseButton:r=!0,...o}){return g.jsxs(MD,{children:[g.jsx(FD,{}),g.jsxs(Uc,{"data-slot":"sheet-content","data-side":n,className:ae("fixed z-50 flex flex-col gap-4 bg-background bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10",e),...o,children:[t,r&&g.jsx(Rs,{"data-slot":"sheet-close",asChild:!0,children:g.jsxs(Ut,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm",children:[g.jsx(tw,{}),g.jsx("span",{className:"sr-only",children:"Close"})]})})]})]})}function ow({className:e,...t}){return g.jsx("div",{"data-slot":"sheet-header",className:ae("flex flex-col gap-1.5 p-4",e),...t})}function sw({className:e,...t}){return g.jsx(Bc,{"data-slot":"sheet-title",className:ae("font-medium text-foreground",e),...t})}function iw({className:e,...t}){return g.jsx(Hc,{"data-slot":"sheet-description",className:ae("text-sm text-muted-foreground",e),...t})}function Xn({className:e,...t}){return g.jsx("div",{"data-slot":"skeleton",className:ae("animate-pulse rounded-md bg-muted",e),...t})}const $D="sidebar_state",LD=3600*24*7,zD="16rem",VD="18rem",UD="3rem",BD="b",aw=v.createContext(null);function ni(){const e=v.useContext(aw);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function lw({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:i,...l}){const c=Zy(),[d,f]=v.useState(!1),[p,h]=v.useState(e),y=t??p,w=v.useCallback(E=>{const A=typeof E=="function"?E(y):E;n?n(A):h(A),document.cookie=`${$D}=${A}; path=/; max-age=${LD}`},[n,y]),b=v.useCallback(()=>c?f(E=>!E):w(E=>!E),[c,w,f]);v.useEffect(()=>{const E=A=>{A.key===BD&&(A.metaKey||A.ctrlKey)&&(A.preventDefault(),b())};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[b]);const _=y?"expanded":"collapsed",x=v.useMemo(()=>({state:_,open:y,setOpen:w,isMobile:c,openMobile:d,setOpenMobile:f,toggleSidebar:b}),[_,y,w,c,d,f,b]);return g.jsx(aw.Provider,{value:x,children:g.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":zD,"--sidebar-width-icon":UD,...o},className:ae("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",r),...l,children:i})})}function cw({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,dir:i,...l}){const{isMobile:c,state:d,openMobile:f,setOpenMobile:p}=ni();return n==="none"?g.jsx("div",{"data-slot":"sidebar",className:ae("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",r),...l,children:o}):c?g.jsx(nw,{open:f,onOpenChange:p,...l,children:g.jsxs(rw,{dir:i,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":VD},side:e,children:[g.jsxs(ow,{className:"sr-only",children:[g.jsx(sw,{children:"Sidebar"}),g.jsx(iw,{children:"Displays the mobile sidebar."})]}),g.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):g.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":d,"data-collapsible":d==="collapsed"?n:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[g.jsx("div",{"data-slot":"sidebar-gap",className:ae("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),g.jsx("div",{"data-slot":"sidebar-container","data-side":e,className:ae("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...l,children:g.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:o})})]})}function uw({className:e,...t}){return g.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:ae("flex flex-col gap-2 p-2",e),...t})}function dw({className:e,...t}){return g.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:ae("flex flex-col gap-2 p-2",e),...t})}function fw({className:e,...t}){return g.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:ae("no-scrollbar flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function HD({className:e,...t}){return g.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:ae("relative flex w-full min-w-0 flex-col p-2",e),...t})}function WD({className:e,...t}){return g.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:ae("w-full text-sm",e),...t})}function GD({className:e,...t}){return g.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:ae("flex w-full min-w-0 flex-col gap-1",e),...t})}function hw({className:e,...t}){return g.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:ae("group/menu-item relative",e),...t})}const jD=qy("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function pw({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:i,...l}){const c=e?$i:"button",{isMobile:d,state:f}=ni(),p=g.jsx(c,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":r,"data-active":t,className:ae(jD({variant:n,size:r}),i),...l});return o?(typeof o=="string"&&(o={children:o}),g.jsxs(MT,{children:[g.jsx(FT,{asChild:!0,children:p}),g.jsx($T,{side:"right",align:"center",hidden:f!=="collapsed"||d,...o})]})):p}function qD({className:e,...t}){return g.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:ae("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden",e),...t})}function ZD({className:e,...t}){return g.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:ae("group/menu-sub-item relative",e),...t})}function KD({asChild:e=!1,size:t="md",isActive:n=!1,className:r,...o}){const i=e?$i:"a";return g.jsx(i,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:ae("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",r),...o})}function JD({...e}){return g.jsx(oC,{"data-slot":"collapsible",...e})}function YD({...e}){return g.jsx(np,{"data-slot":"collapsible-trigger",...e})}function QD({...e}){return g.jsx(rp,{"data-slot":"collapsible-content",...e})}const XD=[{label:"Dashboard",icon:TD,path:"/"},{label:"Contents",icon:xD,children:[{label:"Categories",path:"/videos/categories"},{label:"Packages",path:"/subscription/packages"},{label:"Meal Plans",path:"/meal-plans"},{label:"Meal Portions",path:"/meal-portions"},{label:"Promotions",path:"/subscription/promotions"}]},{label:"Administration",icon:RD,children:[{label:"Admins",path:"/admins"},{label:"Roles",path:"/roles"},{label:"User Logs",path:"/admin-logs"},{label:"Audit Logs",path:"/audit-logs"}]},{label:"Settings",icon:DD,children:[{label:"SMTP",path:"/smtp"},{label:"Terms & Conditions",path:"/terms"},{label:"Privacy Policy",path:"/privacy"}]}];function eR(e,t){return e.path?t===e.path:e.children?.some(n=>t.startsWith(n.path))??!1}function gw({search:e="",items:t}){const n=Qn(),r=t??XD,[o,i]=$.useState(()=>r.filter(d=>d.children?.some(f=>n.pathname.startsWith(f.path))).map(d=>d.label)),l=$.useMemo(()=>{const d=e.trim().toLowerCase();return d?r.map(f=>{if(f.label.toLowerCase().includes(d))return f;if(f.children){const p=f.children.filter(h=>h.label.toLowerCase().includes(d));if(p.length>0)return{...f,children:p}}return null}).filter(Boolean):r},[e,r]),c=d=>{i(f=>f.includes(d)?[]:[d])};return g.jsx(HD,{children:g.jsx(WD,{children:g.jsx(GD,{className:"mt-2 space-y-2",children:l.map(d=>{const f=d.icon,p=eR(d,n.pathname),h=e.trim()?!0:o.includes(d.label);return d.children?g.jsx(hw,{children:g.jsxs(JD,{open:h,onOpenChange:()=>c(d.label),children:[g.jsx(YD,{asChild:!0,children:g.jsxs(pw,{tooltip:d.label,className:ae(h&&"!hover:text-black !bg-primary py-6 !text-white hover:!bg-primary/90","py-6"),children:[g.jsx(f,{}),g.jsx("span",{children:d.label}),h?g.jsx(Qy,{className:"ml-auto h-4 w-4"}):g.jsx(Ba,{className:"ml-auto h-4 w-4"})]})}),g.jsx(QD,{className:"!mx-0",children:g.jsx(qD,{className:"!mx-0 mt-4 space-y-2",children:d.children.map(y=>g.jsx(ZD,{children:g.jsx(KD,{asChild:!0,isActive:n.pathname===y.path,className:ae(n.pathname===y.path&&"border py-6 font-medium text-foreground"),children:g.jsx(hd,{className:"block w-full py-6",to:y.path,children:y.label})})},y.path))})})]})},d.label):g.jsx(hw,{children:g.jsx(pw,{asChild:!0,isActive:p,tooltip:d.label,className:ae(p&&"!bg-primary !text-white hover:bg-primary/90 hover:text-white","py-6"),children:g.jsxs(hd,{to:d.path,end:!0,className:"block w-full",children:[g.jsx(f,{}),g.jsx("span",{children:d.label})]})})},d.path)})})})})}function mw({className:e,size:t="default",...n}){return g.jsx(GE,{"data-slot":"avatar","data-size":t,className:ae("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",e),...n})}function vw({className:e,...t}){return g.jsx(jE,{"data-slot":"avatar-image",className:ae("aspect-square size-full rounded-full object-cover",e),...t})}function yw({className:e,...t}){return g.jsx(qE,{"data-slot":"avatar-fallback",className:ae("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",e),...t})}const tR=async()=>(await on.get("/auth/me")).data,nR=async e=>(await on.patch("/auth/me",e)).data,rR=async e=>(await on.patch("/auth/change-password",e)).data,ww=()=>{const{data:e,isLoading:t,...n}=Dx({queryKey:["profile"],queryFn:tR,select:r=>r.data});return{data:e,isLoading:t,...n}},oR=()=>{const e=yc();return Bh({mutationFn:nR,onSuccess:t=>{e.invalidateQueries({queryKey:["profile"]}),xa.success("Profile Updated",{description:t.message||"Your profile has been updated."})},onError:t=>{xa.error("Update Failed",{description:t.response?.data?.message||"Failed to update profile."})}})},sR=()=>Bh({mutationFn:rR,onSuccess:e=>{xa.success("Password Changed",{description:e.message||"Your password has been changed successfully."})},onError:e=>{xa.error("Password Change Failed",{description:e.response?.data?.message||"Failed to change password."})}});var ri=e=>e.type==="checkbox",Ao=e=>e instanceof Date,sn=e=>e==null;const bw=e=>typeof e=="object";var _t=e=>!sn(e)&&!Array.isArray(e)&&bw(e)&&!Ao(e),_w=e=>_t(e)&&e.target?ri(e.target)?e.target.checked:e.target.value:e,iR=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Sw=(e,t)=>e.has(iR(t)),aR=e=>{const t=e.constructor&&e.constructor.prototype;return _t(t)&&t.hasOwnProperty("isPrototypeOf")},vd=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function St(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(vd&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(_t(e)&&aR(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=St(e[o]));return r}var Ha=e=>/^\w*$/.test(e),ct=e=>e===void 0,yd=e=>Array.isArray(e)?e.filter(Boolean):[],wd=e=>yd(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ue=(e,t,n)=>{if(!t||!_t(e))return n;const r=(Ha(t)?[t]:wd(t)).reduce((o,i)=>sn(o)?o:o[i],e);return ct(r)||r===e?ct(e[t])?n:e[t]:r},mn=e=>typeof e=="boolean",Zt=e=>typeof e=="function",rt=(e,t,n)=>{let r=-1;const o=Ha(t)?[t]:wd(t),i=o.length,l=i-1;for(;++r<i;){const c=o[r];let d=n;if(r!==l){const f=e[c];d=_t(f)||Array.isArray(f)?f:isNaN(+o[r+1])?{}:[]}if(c==="__proto__"||c==="constructor"||c==="prototype")return;e[c]=d,e=e[c]}};const Wa={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},er={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Er={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},bd=$.createContext(null);bd.displayName="HookFormControlContext";const _d=()=>$.useContext(bd);var xw=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const l=i;return t._proxyFormState[l]!==er.all&&(t._proxyFormState[l]=!r||er.all),n&&(n[l]=!0),e[l]}});return o};const Sd=typeof window<"u"?$.useLayoutEffect:$.useEffect;function lR(e){const t=_d(),{control:n=t,disabled:r,name:o,exact:i}=e||{},[l,c]=$.useState(n._formState),d=$.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Sd(()=>n._subscribe({name:o,formState:d.current,exact:i,callback:f=>{!r&&c({...n._formState,...f})}}),[o,r,i]),$.useEffect(()=>{d.current.isValid&&n._setValid(!0)},[n]),$.useMemo(()=>xw(l,n,d.current,!1),[l,n])}var vn=e=>typeof e=="string",xd=(e,t,n,r,o)=>vn(e)?(r&&t.watch.add(e),ue(n,e,o)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),ue(n,i))):(r&&(t.watchAll=!0),n),Cd=e=>sn(e)||!bw(e);function tr(e,t,n=new WeakSet){if(Cd(e)||Cd(t))return Object.is(e,t);if(Ao(e)&&Ao(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const i of r){const l=e[i];if(!o.includes(i))return!1;if(i!=="ref"){const c=t[i];if(Ao(l)&&Ao(c)||_t(l)&&_t(c)||Array.isArray(l)&&Array.isArray(c)?!tr(l,c,n):!Object.is(l,c))return!1}}return!0}function cR(e){const t=_d(),{control:n=t,name:r,defaultValue:o,disabled:i,exact:l,compute:c}=e||{},d=$.useRef(o),f=$.useRef(c),p=$.useRef(void 0),h=$.useRef(n),y=$.useRef(r);f.current=c;const[w,b]=$.useState(()=>{const N=n._getWatch(r,d.current);return f.current?f.current(N):N}),_=$.useCallback(N=>{const D=xd(r,n._names,N||n._formValues,!1,d.current);return f.current?f.current(D):D},[n._formValues,n._names,r]),x=$.useCallback(N=>{if(!i){const D=xd(r,n._names,N||n._formValues,!1,d.current);if(f.current){const H=f.current(D);tr(H,p.current)||(b(H),p.current=H)}else b(D)}},[n._formValues,n._names,i,r]);Sd(()=>((h.current!==n||!tr(y.current,r))&&(h.current=n,y.current=r,x()),n._subscribe({name:r,formState:{values:!0},exact:l,callback:N=>{x(N.values)}})),[n,l,r,x]),$.useEffect(()=>n._removeUnmounted());const E=h.current!==n,A=y.current,O=$.useMemo(()=>{if(i)return null;const N=!E&&!tr(A,r);return E||N?_():null},[i,E,r,A,_]);return O!==null?O:w}function uR(e){const t=_d(),{name:n,disabled:r,control:o=t,shouldUnregister:i,defaultValue:l,exact:c=!0}=e,d=Sw(o._names.array,n),f=$.useMemo(()=>ue(o._formValues,n,ue(o._defaultValues,n,l)),[o,n,l]),p=cR({control:o,name:n,defaultValue:f,exact:c}),h=lR({control:o,name:n,exact:c}),y=$.useRef(e),w=$.useRef(void 0),b=$.useRef(o.register(n,{...e.rules,value:p,...mn(e.disabled)?{disabled:e.disabled}:{}}));y.current=e;const _=$.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ue(h.errors,n)},isDirty:{enumerable:!0,get:()=>!!ue(h.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!ue(h.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!ue(h.validatingFields,n)},error:{enumerable:!0,get:()=>ue(h.errors,n)}}),[h,n]),x=$.useCallback(N=>b.current.onChange({target:{value:_w(N),name:n},type:Wa.CHANGE}),[n]),E=$.useCallback(()=>b.current.onBlur({target:{value:ue(o._formValues,n),name:n},type:Wa.BLUR}),[n,o._formValues]),A=$.useCallback(N=>{const D=ue(o._fields,n);D&&D._f&&N&&(D._f.ref={focus:()=>Zt(N.focus)&&N.focus(),select:()=>Zt(N.select)&&N.select(),setCustomValidity:H=>Zt(N.setCustomValidity)&&N.setCustomValidity(H),reportValidity:()=>Zt(N.reportValidity)&&N.reportValidity()})},[o._fields,n]),O=$.useMemo(()=>({name:n,value:p,...mn(r)||h.disabled?{disabled:h.disabled||r}:{},onChange:x,onBlur:E,ref:A}),[n,r,h.disabled,x,E,A,p]);return $.useEffect(()=>{const N=o._options.shouldUnregister||i,D=w.current;D&&D!==n&&!d&&o.unregister(D),o.register(n,{...y.current.rules,...mn(y.current.disabled)?{disabled:y.current.disabled}:{}});const H=(z,L)=>{const ee=ue(o._fields,z);ee&&ee._f&&(ee._f.mount=L)};if(H(n,!0),N){const z=St(ue(o._options.defaultValues,n,y.current.defaultValue));rt(o._defaultValues,n,z),ct(ue(o._formValues,n))&&rt(o._formValues,n,z)}return!d&&o.register(n),w.current=n,()=>{(d?N&&!o._state.action:N)?o.unregister(n):H(n,!1)}},[n,o,d,i]),$.useEffect(()=>{o._setDisabledField({disabled:r,name:n})},[r,n,o]),$.useMemo(()=>({field:O,formState:h,fieldState:_}),[O,h,_])}const dR=e=>e.render(uR(e)),Ed=$.createContext(null);Ed.displayName="HookFormContext";const fR=()=>$.useContext(Ed),hR=e=>{const{children:t,watch:n,getValues:r,getFieldState:o,setError:i,clearErrors:l,setValue:c,trigger:d,formState:f,resetField:p,reset:h,handleSubmit:y,unregister:w,control:b,register:_,setFocus:x,subscribe:E}=e;return $.createElement(Ed.Provider,{value:$.useMemo(()=>({watch:n,getValues:r,getFieldState:o,setError:i,clearErrors:l,setValue:c,trigger:d,formState:f,resetField:p,reset:h,handleSubmit:y,unregister:w,control:b,register:_,setFocus:x,subscribe:E}),[l,b,f,o,r,y,_,h,p,i,x,c,E,d,w,n])},$.createElement(bd.Provider,{value:b},t))};var Pd=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},oi=e=>Array.isArray(e)?e:[e],Cw=()=>{let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}};function Ew(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const o=e[r],i=t[r];if(o&&_t(o)&&i){const l=Ew(o,i);_t(l)&&(n[r]=l)}else e[r]&&(n[r]=i)}return n}var Kt=e=>_t(e)&&!Object.keys(e).length,Ad=e=>e.type==="file",Ga=e=>{if(!vd)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Pw=e=>e.type==="select-multiple",Od=e=>e.type==="radio",pR=e=>Od(e)||ri(e),Td=e=>Ga(e)&&e.isConnected;function gR(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=ct(e)?r++:e[t[r++]];return e}function mR(e){for(const t in e)if(e.hasOwnProperty(t)&&!ct(e[t]))return!1;return!0}function xt(e,t){const n=Array.isArray(t)?t:Ha(t)?[t]:wd(t),r=n.length===1?e:gR(e,n),o=n.length-1,i=n[o];return r&&delete r[i],o!==0&&(_t(r)&&Kt(r)||Array.isArray(r)&&mR(r))&&xt(e,n.slice(0,-1)),e}var vR=e=>{for(const t in e)if(Zt(e[t]))return!0;return!1};function Aw(e){return Array.isArray(e)||_t(e)&&!vR(e)}function Id(e,t={}){for(const n in e){const r=e[n];Aw(r)?(t[n]=Array.isArray(r)?[]:{},Id(r,t[n])):ct(r)||(t[n]=!0)}return t}function is(e,t,n){n||(n=Id(t));for(const r in e){const o=e[r];if(Aw(o))ct(t)||Cd(n[r])?n[r]=Id(o,Array.isArray(o)?[]:{}):is(o,sn(t)?{}:t[r],n[r]);else{const i=t[r];n[r]=!tr(o,i)}}return n}const Ow={value:!1,isValid:!1},Tw={value:!0,isValid:!0};var Iw=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!ct(e[0].attributes.value)?ct(e[0].value)||e[0].value===""?Tw:{value:e[0].value,isValid:!0}:Tw:Ow}return Ow},Nw=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>ct(e)?e:t?e===""?NaN:e&&+e:n&&vn(e)?new Date(e):r?r(e):e;const kw={isValid:!1,value:null};var Dw=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,kw):kw;function Rw(e){const t=e.ref;return Ad(t)?t.files:Od(t)?Dw(e.refs).value:Pw(t)?[...t.selectedOptions].map(({value:n})=>n):ri(t)?Iw(e.refs).value:Nw(ct(t.value)?e.ref.value:t.value,e)}var yR=(e,t,n,r)=>{const o={};for(const i of e){const l=ue(t,i);l&&rt(o,i,l._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},ja=e=>e instanceof RegExp,si=e=>ct(e)?e:ja(e)?e.source:_t(e)?ja(e.value)?e.value.source:e.value:e,Mw=e=>({isOnSubmit:!e||e===er.onSubmit,isOnBlur:e===er.onBlur,isOnChange:e===er.onChange,isOnAll:e===er.all,isOnTouch:e===er.onTouched});const Fw="AsyncFunction";var wR=e=>!!e&&!!e.validate&&!!(Zt(e.validate)&&e.validate.constructor.name===Fw||_t(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Fw)),bR=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),$w=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const ii=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const i=ue(e,o);if(i){const{_f:l,...c}=i;if(l){if(l.refs&&l.refs[0]&&t(l.refs[0],o)&&!r)return!0;if(l.ref&&t(l.ref,l.name)&&!r)return!0;if(ii(c,t))break}else if(_t(c)&&ii(c,t))break}}};function Lw(e,t,n){const r=ue(e,n);if(r||Ha(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const i=o.join("."),l=ue(t,i),c=ue(e,i);if(l&&!Array.isArray(l)&&n!==i)return{name:n};if(c&&c.type)return{name:i,error:c};if(c&&c.root&&c.root.type)return{name:`${i}.root`,error:c.root};o.pop()}return{name:n}}var _R=(e,t,n,r)=>{n(e);const{name:o,...i}=e;return Kt(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(l=>t[l]===(!r||er.all))},SR=(e,t,n)=>!e||!t||e===t||oi(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),xR=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,CR=(e,t)=>!yd(ue(e,t)).length&&xt(e,t),ER=(e,t,n)=>{const r=oi(ue(e,n));return rt(r,"root",t[n]),rt(e,n,r),e};function zw(e,t,n="validate"){if(vn(e)||Array.isArray(e)&&e.every(vn)||mn(e)&&!e)return{type:n,message:vn(e)?e:"",ref:t}}var as=e=>_t(e)&&!ja(e)?e:{value:e,message:""},Vw=async(e,t,n,r,o,i)=>{const{ref:l,refs:c,required:d,maxLength:f,minLength:p,min:h,max:y,pattern:w,validate:b,name:_,valueAsNumber:x,mount:E}=e._f,A=ue(n,_);if(!E||t.has(_))return{};const O=c?c[0]:l,N=J=>{o&&O.reportValidity&&(O.setCustomValidity(mn(J)?"":J||""),O.reportValidity())},D={},H=Od(l),z=ri(l),L=H||z,ee=(x||Ad(l))&&ct(l.value)&&ct(A)||Ga(l)&&l.value===""||A===""||Array.isArray(A)&&!A.length,le=Pd.bind(null,_,r,D),be=(J,Q,ie,he=Er.maxLength,q=Er.minLength)=>{const se=J?Q:ie;D[_]={type:J?he:q,message:se,ref:l,...le(J?he:q,se)}};if(i?!Array.isArray(A)||!A.length:d&&(!L&&(ee||sn(A))||mn(A)&&!A||z&&!Iw(c).isValid||H&&!Dw(c).isValid)){const{value:J,message:Q}=vn(d)?{value:!!d,message:d}:as(d);if(J&&(D[_]={type:Er.required,message:Q,ref:O,...le(Er.required,Q)},!r))return N(Q),D}if(!ee&&(!sn(h)||!sn(y))){let J,Q;const ie=as(y),he=as(h);if(!sn(A)&&!isNaN(A)){const q=l.valueAsNumber||A&&+A;sn(ie.value)||(J=q>ie.value),sn(he.value)||(Q=q<he.value)}else{const q=l.valueAsDate||new Date(A),se=Y=>new Date(new Date().toDateString()+" "+Y),ne=l.type=="time",te=l.type=="week";vn(ie.value)&&A&&(J=ne?se(A)>se(ie.value):te?A>ie.value:q>new Date(ie.value)),vn(he.value)&&A&&(Q=ne?se(A)<se(he.value):te?A<he.value:q<new Date(he.value))}if((J||Q)&&(be(!!J,ie.message,he.message,Er.max,Er.min),!r))return N(D[_].message),D}if((f||p)&&!ee&&(vn(A)||i&&Array.isArray(A))){const J=as(f),Q=as(p),ie=!sn(J.value)&&A.length>+J.value,he=!sn(Q.value)&&A.length<+Q.value;if((ie||he)&&(be(ie,J.message,Q.message),!r))return N(D[_].message),D}if(w&&!ee&&vn(A)){const{value:J,message:Q}=as(w);if(ja(J)&&!A.match(J)&&(D[_]={type:Er.pattern,message:Q,ref:l,...le(Er.pattern,Q)},!r))return N(Q),D}if(b){if(Zt(b)){const J=await b(A,n),Q=zw(J,O);if(Q&&(D[_]={...Q,...le(Er.validate,Q.message)},!r))return N(Q.message),D}else if(_t(b)){let J={};for(const Q in b){if(!Kt(J)&&!r)break;const ie=zw(await b[Q](A,n),O,Q);ie&&(J={...ie,...le(Q,ie.message)},N(ie.message),r&&(D[_]=J))}if(!Kt(J)&&(D[_]={ref:O,...J},!r))return D}}return N(!0),D};const PR={mode:er.onSubmit,reValidateMode:er.onChange,shouldFocusError:!0};function AR(e={}){let t={...PR,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Zt(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},o=_t(t.defaultValues)||_t(t.values)?St(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:St(o),l={action:!1,mount:!1,watch:!1,keepIsValid:!1},c={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},d,f=0;const p={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={...p};let y={...h};const w={array:Cw(),state:Cw()},b=t.criteriaMode===er.all,_=I=>M=>{clearTimeout(f),f=setTimeout(I,M)},x=async I=>{if(!l.keepIsValid&&!t.disabled&&(h.isValid||y.isValid||I)){let M;t.resolver?(M=Kt((await L()).errors),E()):M=await le(r,!0),M!==n.isValid&&w.state.next({isValid:M})}},E=(I,M)=>{!t.disabled&&(h.isValidating||h.validatingFields||y.isValidating||y.validatingFields)&&((I||Array.from(c.mount)).forEach(U=>{U&&(M?rt(n.validatingFields,U,M):xt(n.validatingFields,U))}),w.state.next({validatingFields:n.validatingFields,isValidating:!Kt(n.validatingFields)}))},A=(I,M=[],U,fe,re=!0,X=!0)=>{if(fe&&U&&!t.disabled){if(l.action=!0,X&&Array.isArray(ue(r,I))){const we=U(ue(r,I),fe.argA,fe.argB);re&&rt(r,I,we)}if(X&&Array.isArray(ue(n.errors,I))){const we=U(ue(n.errors,I),fe.argA,fe.argB);re&&rt(n.errors,I,we),CR(n.errors,I)}if((h.touchedFields||y.touchedFields)&&X&&Array.isArray(ue(n.touchedFields,I))){const we=U(ue(n.touchedFields,I),fe.argA,fe.argB);re&&rt(n.touchedFields,I,we)}(h.dirtyFields||y.dirtyFields)&&(n.dirtyFields=is(o,i)),w.state.next({name:I,isDirty:J(I,M),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else rt(i,I,M)},O=(I,M)=>{rt(n.errors,I,M),w.state.next({errors:n.errors})},N=I=>{n.errors=I,w.state.next({errors:n.errors,isValid:!1})},D=(I,M,U,fe)=>{const re=ue(r,I);if(re){const X=ue(i,I,ct(U)?ue(o,I):U);ct(X)||fe&&fe.defaultChecked||M?rt(i,I,M?X:Rw(re._f)):he(I,X),l.mount&&!l.action&&x()}},H=(I,M,U,fe,re)=>{let X=!1,we=!1;const Ge={name:I};if(!t.disabled){if(!U||fe){(h.isDirty||y.isDirty)&&(we=n.isDirty,n.isDirty=Ge.isDirty=J(),X=we!==Ge.isDirty);const qe=tr(ue(o,I),M);we=!!ue(n.dirtyFields,I),qe?xt(n.dirtyFields,I):rt(n.dirtyFields,I,!0),Ge.dirtyFields=n.dirtyFields,X=X||(h.dirtyFields||y.dirtyFields)&&we!==!qe}if(U){const qe=ue(n.touchedFields,I);qe||(rt(n.touchedFields,I,U),Ge.touchedFields=n.touchedFields,X=X||(h.touchedFields||y.touchedFields)&&qe!==U)}X&&re&&w.state.next(Ge)}return X?Ge:{}},z=(I,M,U,fe)=>{const re=ue(n.errors,I),X=(h.isValid||y.isValid)&&mn(M)&&n.isValid!==M;if(t.delayError&&U?(d=_(()=>O(I,U)),d(t.delayError)):(clearTimeout(f),d=null,U?rt(n.errors,I,U):xt(n.errors,I)),(U?!tr(re,U):re)||!Kt(fe)||X){const we={...fe,...X&&mn(M)?{isValid:M}:{},errors:n.errors,name:I};n={...n,...we},w.state.next(we)}},L=async I=>(E(I,!0),await t.resolver(i,t.context,yR(I||c.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),ee=async I=>{const{errors:M}=await L(I);if(E(I),I)for(const U of I){const fe=ue(M,U);fe?rt(n.errors,U,fe):xt(n.errors,U)}else n.errors=M;return M},le=async(I,M,U={valid:!0})=>{for(const fe in I){const re=I[fe];if(re){const{_f:X,...we}=re;if(X){const Ge=c.array.has(X.name),qe=re._f&&wR(re._f);qe&&h.validatingFields&&E([X.name],!0);const it=await Vw(re,c.disabled,i,b,t.shouldUseNativeValidation&&!M,Ge);if(qe&&h.validatingFields&&E([X.name]),it[X.name]&&(U.valid=!1,M||e.shouldUseNativeValidation))break;!M&&(ue(it,X.name)?Ge?ER(n.errors,it,X.name):rt(n.errors,X.name,it[X.name]):xt(n.errors,X.name))}!Kt(we)&&await le(we,M,U)}}return U.valid},be=()=>{for(const I of c.unMount){const M=ue(r,I);M&&(M._f.refs?M._f.refs.every(U=>!Td(U)):!Td(M._f.ref))&&ye(I)}c.unMount=new Set},J=(I,M)=>!t.disabled&&(I&&M&&rt(i,I,M),!tr(Te(),o)),Q=(I,M,U)=>xd(I,c,{...l.mount?i:ct(M)?o:vn(I)?{[I]:M}:M},U,M),ie=I=>yd(ue(l.mount?i:o,I,t.shouldUnregister?ue(o,I,[]):[])),he=(I,M,U={})=>{const fe=ue(r,I);let re=M;if(fe){const X=fe._f;X&&(!X.disabled&&rt(i,I,Nw(M,X)),re=Ga(X.ref)&&sn(M)?"":M,Pw(X.ref)?[...X.ref.options].forEach(we=>we.selected=re.includes(we.value)):X.refs?ri(X.ref)?X.refs.forEach(we=>{(!we.defaultChecked||!we.disabled)&&(Array.isArray(re)?we.checked=!!re.find(Ge=>Ge===we.value):we.checked=re===we.value||!!re)}):X.refs.forEach(we=>we.checked=we.value===re):Ad(X.ref)?X.ref.value="":(X.ref.value=re,X.ref.type||w.state.next({name:I,values:St(i)})))}(U.shouldDirty||U.shouldTouch)&&H(I,re,U.shouldTouch,U.shouldDirty,!0),U.shouldValidate&&Y(I)},q=(I,M,U)=>{for(const fe in M){if(!M.hasOwnProperty(fe))return;const re=M[fe],X=I+"."+fe,we=ue(r,X);(c.array.has(I)||_t(re)||we&&!we._f)&&!Ao(re)?q(X,re,U):he(X,re,U)}},se=(I,M,U={})=>{const fe=ue(r,I),re=c.array.has(I),X=St(M);rt(i,I,X),re?(w.array.next({name:I,values:St(i)}),(h.isDirty||h.dirtyFields||y.isDirty||y.dirtyFields)&&U.shouldDirty&&w.state.next({name:I,dirtyFields:is(o,i),isDirty:J(I,X)})):fe&&!fe._f&&!sn(X)?q(I,X,U):he(I,X,U),$w(I,c)?w.state.next({...n,name:I,values:St(i)}):w.state.next({name:l.mount?I:void 0,values:St(i)})},ne=async I=>{l.mount=!0;const M=I.target;let U=M.name,fe=!0;const re=ue(r,U),X=qe=>{fe=Number.isNaN(qe)||Ao(qe)&&isNaN(qe.getTime())||tr(qe,ue(i,U,qe))},we=Mw(t.mode),Ge=Mw(t.reValidateMode);if(re){let qe,it;const ln=M.type?Rw(re._f):_w(I),It=I.type===Wa.BLUR||I.type===Wa.FOCUS_OUT,ko=!bR(re._f)&&!t.resolver&&!ue(n.errors,U)&&!re._f.deps||xR(It,ue(n.touchedFields,U),n.isSubmitted,Ge,we),Ar=$w(U,c,It);rt(i,U,ln),It?(!M||!M.readOnly)&&(re._f.onBlur&&re._f.onBlur(I),d&&d(0)):re._f.onChange&&re._f.onChange(I);const mr=H(U,ln,It),Qr=!Kt(mr)||Ar;if(!It&&w.state.next({name:U,type:I.type,values:St(i)}),ko)return(h.isValid||y.isValid)&&(t.mode==="onBlur"?It&&x():It||x()),Qr&&w.state.next({name:U,...Ar?{}:mr});if(!It&&Ar&&w.state.next({...n}),t.resolver){const{errors:Xr}=await L([U]);if(E([U]),X(ln),fe){const Do=Lw(n.errors,r,U),wn=Lw(Xr,r,Do.name||U);qe=wn.error,U=wn.name,it=Kt(Xr)}}else E([U],!0),qe=(await Vw(re,c.disabled,i,b,t.shouldUseNativeValidation))[U],E([U]),X(ln),fe&&(qe?it=!1:(h.isValid||y.isValid)&&(it=await le(r,!0)));fe&&(re._f.deps&&(!Array.isArray(re._f.deps)||re._f.deps.length>0)&&Y(re._f.deps),z(U,it,qe,mr))}},te=(I,M)=>{if(ue(n.errors,M)&&I.focus)return I.focus(),1},Y=async(I,M={})=>{let U,fe;const re=oi(I);if(t.resolver){const X=await ee(ct(I)?I:re);U=Kt(X),fe=I?!re.some(we=>ue(X,we)):U}else I?(fe=(await Promise.all(re.map(async X=>{const we=ue(r,X);return await le(we&&we._f?{[X]:we}:we)}))).every(Boolean),!(!fe&&!n.isValid)&&x()):fe=U=await le(r);return w.state.next({...!vn(I)||(h.isValid||y.isValid)&&U!==n.isValid?{}:{name:I},...t.resolver||!I?{isValid:U}:{},errors:n.errors}),M.shouldFocus&&!fe&&ii(r,te,I?re:c.mount),fe},Te=(I,M)=>{let U={...l.mount?i:o};return M&&(U=Ew(M.dirtyFields?n.dirtyFields:n.touchedFields,U)),ct(I)?U:vn(I)?ue(U,I):I.map(fe=>ue(U,fe))},Qe=(I,M)=>({invalid:!!ue((M||n).errors,I),isDirty:!!ue((M||n).dirtyFields,I),error:ue((M||n).errors,I),isValidating:!!ue(n.validatingFields,I),isTouched:!!ue((M||n).touchedFields,I)}),xe=I=>{const M=I?oi(I):void 0;M?.forEach(U=>xt(n.errors,U)),M?M.forEach(U=>{w.state.next({name:U,errors:n.errors})}):w.state.next({errors:{}})},Ne=(I,M,U)=>{const fe=(ue(r,I,{_f:{}})._f||{}).ref,re=ue(n.errors,I)||{},{ref:X,message:we,type:Ge,...qe}=re;rt(n.errors,I,{...qe,...M,ref:fe}),w.state.next({name:I,errors:n.errors,isValid:!1}),U&&U.shouldFocus&&fe&&fe.focus&&fe.focus()},_e=(I,M)=>Zt(I)?w.state.subscribe({next:U=>"values"in U&&I(Q(void 0,M),U)}):Q(I,M,!0),Ee=I=>w.state.subscribe({next:M=>{SR(I.name,M.name,I.exact)&&_R(M,I.formState||h,No,I.reRenderRoot)&&I.callback({values:{...i},...n,...M,defaultValues:o})}}).unsubscribe,ce=I=>(l.mount=!0,y={...y,...I.formState},Ee({...I,formState:{...p,...I.formState}})),ye=(I,M={})=>{for(const U of I?oi(I):c.mount)c.mount.delete(U),c.array.delete(U),M.keepValue||(xt(r,U),xt(i,U)),!M.keepError&&xt(n.errors,U),!M.keepDirty&&xt(n.dirtyFields,U),!M.keepTouched&&xt(n.touchedFields,U),!M.keepIsValidating&&xt(n.validatingFields,U),!t.shouldUnregister&&!M.keepDefaultValue&&xt(o,U);w.state.next({values:St(i)}),w.state.next({...n,...M.keepDirty?{isDirty:J()}:{}}),!M.keepIsValid&&x()},Pe=({disabled:I,name:M})=>{if(mn(I)&&l.mount||I||c.disabled.has(M)){const re=c.disabled.has(M)!==!!I;I?c.disabled.add(M):c.disabled.delete(M),re&&l.mount&&!l.action&&x()}},He=(I,M={})=>{let U=ue(r,I);const fe=mn(M.disabled)||mn(t.disabled);return rt(r,I,{...U||{},_f:{...U&&U._f?U._f:{ref:{name:I}},name:I,mount:!0,...M}}),c.mount.add(I),U?Pe({disabled:mn(M.disabled)?M.disabled:t.disabled,name:I}):D(I,!0,M.value),{...fe?{disabled:M.disabled||t.disabled}:{},...t.progressive?{required:!!M.required,min:si(M.min),max:si(M.max),minLength:si(M.minLength),maxLength:si(M.maxLength),pattern:si(M.pattern)}:{},name:I,onChange:ne,onBlur:ne,ref:re=>{if(re){He(I,M),U=ue(r,I);const X=ct(re.value)&&re.querySelectorAll&&re.querySelectorAll("input,select,textarea")[0]||re,we=pR(X),Ge=U._f.refs||[];if(we?Ge.find(qe=>qe===X):X===U._f.ref)return;rt(r,I,{_f:{...U._f,...we?{refs:[...Ge.filter(Td),X,...Array.isArray(ue(o,I))?[{}]:[]],ref:{type:X.type,name:I}}:{ref:X}}}),D(I,!1,void 0,X)}else U=ue(r,I,{}),U._f&&(U._f.mount=!1),(t.shouldUnregister||M.shouldUnregister)&&!(Sw(c.array,I)&&l.action)&&c.unMount.add(I)}}},$e=()=>t.shouldFocusError&&ii(r,te,c.mount),We=I=>{mn(I)&&(w.state.next({disabled:I}),ii(r,(M,U)=>{const fe=ue(r,U);fe&&(M.disabled=fe._f.disabled||I,Array.isArray(fe._f.refs)&&fe._f.refs.forEach(re=>{re.disabled=fe._f.disabled||I}))},0,!1))},dt=(I,M)=>async U=>{let fe;U&&(U.preventDefault&&U.preventDefault(),U.persist&&U.persist());let re=St(i);if(w.state.next({isSubmitting:!0}),t.resolver){const{errors:X,values:we}=await L();E(),n.errors=X,re=St(we)}else await le(r);if(c.disabled.size)for(const X of c.disabled)xt(re,X);if(xt(n.errors,"root"),Kt(n.errors)){w.state.next({errors:{}});try{await I(re,U)}catch(X){fe=X}}else M&&await M({...n.errors},U),$e(),setTimeout($e);if(w.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Kt(n.errors)&&!fe,submitCount:n.submitCount+1,errors:n.errors}),fe)throw fe},et=(I,M={})=>{ue(r,I)&&(ct(M.defaultValue)?se(I,St(ue(o,I))):(se(I,M.defaultValue),rt(o,I,St(M.defaultValue))),M.keepTouched||xt(n.touchedFields,I),M.keepDirty||(xt(n.dirtyFields,I),n.isDirty=M.defaultValue?J(I,St(ue(o,I))):J()),M.keepError||(xt(n.errors,I),h.isValid&&x()),w.state.next({...n}))},an=(I,M={})=>{const U=I?St(I):o,fe=St(U),re=Kt(I),X=re?o:fe;if(M.keepDefaultValues||(o=U),!M.keepValues){if(M.keepDirtyValues){const we=new Set([...c.mount,...Object.keys(is(o,i))]);for(const Ge of Array.from(we)){const qe=ue(n.dirtyFields,Ge),it=ue(i,Ge),ln=ue(X,Ge);qe&&!ct(it)?rt(X,Ge,it):!qe&&!ct(ln)&&se(Ge,ln)}}else{if(vd&&ct(I))for(const we of c.mount){const Ge=ue(r,we);if(Ge&&Ge._f){const qe=Array.isArray(Ge._f.refs)?Ge._f.refs[0]:Ge._f.ref;if(Ga(qe)){const it=qe.closest("form");if(it){it.reset();break}}}}if(M.keepFieldsRef)for(const we of c.mount)se(we,ue(X,we));else r={}}i=t.shouldUnregister?M.keepDefaultValues?St(o):{}:St(X),w.array.next({values:{...X}}),w.state.next({values:{...X}})}c={mount:M.keepDirtyValues?c.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!h.isValid||!!M.keepIsValid||!!M.keepDirtyValues||!t.shouldUnregister&&!Kt(X),l.watch=!!t.shouldUnregister,l.keepIsValid=!!M.keepIsValid,l.action=!1,M.keepErrors||(n.errors={}),w.state.next({submitCount:M.keepSubmitCount?n.submitCount:0,isDirty:re?!1:M.keepDirty?n.isDirty:!!(M.keepDefaultValues&&!tr(I,o)),isSubmitted:M.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:re?{}:M.keepDirtyValues?M.keepDefaultValues&&i?is(o,i):n.dirtyFields:M.keepDefaultValues&&I?is(o,I):M.keepDirty?n.dirtyFields:{},touchedFields:M.keepTouched?n.touchedFields:{},errors:M.keepErrors?n.errors:{},isSubmitSuccessful:M.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},rr=(I,M)=>an(Zt(I)?I(i):I,{...t.resetOptions,...M}),vt=(I,M={})=>{const U=ue(r,I),fe=U&&U._f;if(fe){const re=fe.refs?fe.refs[0]:fe.ref;re.focus&&setTimeout(()=>{re.focus(),M.shouldSelect&&Zt(re.select)&&re.select()})}},No=I=>{n={...n,...I}},gr={control:{register:He,unregister:ye,getFieldState:Qe,handleSubmit:dt,setError:Ne,_subscribe:Ee,_runSchema:L,_updateIsValidating:E,_focusError:$e,_getWatch:Q,_getDirty:J,_setValid:x,_setFieldArray:A,_setDisabledField:Pe,_setErrors:N,_getFieldArray:ie,_reset:an,_resetDefaultValues:()=>Zt(t.defaultValues)&&t.defaultValues().then(I=>{rr(I,t.resetOptions),w.state.next({isLoading:!1})}),_removeUnmounted:be,_disableForm:We,_subjects:w,_proxyFormState:h,get _fields(){return r},get _formValues(){return i},get _state(){return l},set _state(I){l=I},get _defaultValues(){return o},get _names(){return c},set _names(I){c=I},get _formState(){return n},get _options(){return t},set _options(I){t={...t,...I}}},subscribe:ce,trigger:Y,register:He,handleSubmit:dt,watch:_e,setValue:se,getValues:Te,reset:rr,resetField:et,clearErrors:xe,unregister:ye,setError:Ne,setFocus:vt,getFieldState:Qe};return{...gr,formControl:gr}}function Uw(e={}){const t=$.useRef(void 0),n=$.useRef(void 0),[r,o]=$.useState({isDirty:!1,isValidating:!1,isLoading:Zt(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Zt(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!Zt(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:l,...c}=AR(e);t.current={...c,formState:r}}const i=t.current.control;return i._options=e,Sd(()=>{const l=i._subscribe({formState:i._proxyFormState,callback:()=>o({...i._formState}),reRenderRoot:!0});return o(c=>({...c,isReady:!0})),i._formState.isReady=!0,l},[i]),$.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),$.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),$.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),$.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),$.useEffect(()=>{if(i._proxyFormState.isDirty){const l=i._getDirty();l!==r.isDirty&&i._subjects.state.next({isDirty:l})}},[i,r.isDirty]),$.useEffect(()=>{var l;e.values&&!tr(e.values,n.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),!((l=i._options.resetOptions)===null||l===void 0)&&l.keepIsValid||i._setValid(),n.current=e.values,o(c=>({...c}))):i._resetDefaultValues()},[i,e.values]),$.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=$.useMemo(()=>xw(r,i),[i,r]),t.current}const Bw=(e,t,n)=>{if(e&&"reportValidity"in e){const r=ue(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},Nd=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?Bw(r.ref,n,e):r&&r.refs&&r.refs.forEach(o=>Bw(o,n,e))}},Hw=(e,t)=>{t.shouldUseNativeValidation&&Nd(e,t);const n={};for(const r in e){const o=ue(t.fields,r),i=Object.assign(e[r]||{},{ref:o&&o.ref});if(OR(t.names||Object.keys(e),r)){const l=Object.assign({},ue(n,r));rt(l,"root",i),rt(n,r,l)}else rt(n,r,i)}return n},OR=(e,t)=>{const n=Ww(t);return e.some(r=>Ww(r).match(`^${n}\\.\\d+`))};function Ww(e){return e.replace(/\]|\[/g,"")}function Z(e,t,n){function r(c,d){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:d,constr:l,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,d);const f=l.prototype,p=Object.keys(f);for(let h=0;h<p.length;h++){const y=p[h];y in c||(c[y]=f[y].bind(c))}}const o=n?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function l(c){var d;const f=n?.Parent?new i:this;r(f,c),(d=f._zod).deferred??(d.deferred=[]);for(const p of f._zod.deferred)p();return f}return Object.defineProperty(l,"init",{value:r}),Object.defineProperty(l,Symbol.hasInstance,{value:c=>n?.Parent&&c instanceof n.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class ls extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Gw extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const jw={};function Oo(e){return jw}function qw(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function kd(e,t){return typeof t=="bigint"?t.toString():t}function Dd(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Rd(e){return e==null}function Md(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const Zw=Symbol("evaluating");function ot(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Zw)return r===void 0&&(r=Zw,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function To(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Zr(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Kw(e){return JSON.stringify(e)}function TR(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Jw="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function qa(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const IR=Dd(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function ai(e){if(qa(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(qa(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Yw(e){return ai(e)?{...e}:Array.isArray(e)?[...e]:e}const NR=new Set(["string","number","symbol"]);function Za(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Kr(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Re(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function kR(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function DR(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=Zr(e._zod.def,{get shape(){const l={};for(const c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(l[c]=n.shape[c])}return To(this,"shape",l),l},checks:[]});return Kr(e,i)}function RR(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=Zr(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete l[c]}return To(this,"shape",l),l},checks:[]});return Kr(e,i)}function MR(e,t){if(!ai(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(i,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=Zr(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return To(this,"shape",i),i}});return Kr(e,o)}function FR(e,t){if(!ai(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Zr(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return To(this,"shape",r),r}});return Kr(e,n)}function $R(e,t){const n=Zr(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return To(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Kr(e,n)}function LR(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=Zr(t._zod.def,{get shape(){const c=t._zod.def.shape,d={...c};if(n)for(const f in n){if(!(f in c))throw new Error(`Unrecognized key: "${f}"`);n[f]&&(d[f]=e?new e({type:"optional",innerType:c[f]}):c[f])}else for(const f in c)d[f]=e?new e({type:"optional",innerType:c[f]}):c[f];return To(this,"shape",d),d},checks:[]});return Kr(t,l)}function zR(e,t,n){const r=Zr(t._zod.def,{get shape(){const o=t._zod.def.shape,i={...o};if(n)for(const l in n){if(!(l in i))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(i[l]=new e({type:"nonoptional",innerType:o[l]}))}else for(const l in o)i[l]=new e({type:"nonoptional",innerType:o[l]});return To(this,"shape",i),i}});return Kr(t,r)}function cs(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Qw(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Ka(e){return typeof e=="string"?e:e?.message}function Io(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=Ka(e.inst?._zod.def?.error?.(e))??Ka(t?.error?.(e))??Ka(n.customError?.(e))??Ka(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Fd(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function li(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const Xw=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,kd,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},$d=Z("$ZodError",Xw),Ja=Z("$ZodError",Xw,{Parent:Error});function VR(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function UR(e,t=n=>n.message){const n={_errors:[]},r=o=>{for(const i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(l=>r({issues:l}));else if(i.code==="invalid_key")r({issues:i.issues});else if(i.code==="invalid_element")r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let l=n,c=0;for(;c<i.path.length;){const d=i.path[c];c===i.path.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(i))):l[d]=l[d]||{_errors:[]},l=l[d],c++}}};return r(e),n}const Ya=e=>(t,n,r,o)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw new ls;if(l.issues.length){const c=new(o?.Err??e)(l.issues.map(d=>Io(d,i,Oo())));throw Jw(c,o?.callee),c}return l.value},BR=Ya(Ja),Qa=e=>async(t,n,r,o)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise&&(l=await l),l.issues.length){const c=new(o?.Err??e)(l.issues.map(d=>Io(d,i,Oo())));throw Jw(c,o?.callee),c}return l.value},HR=Qa(Ja),Xa=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new ls;return i.issues.length?{success:!1,error:new(e??$d)(i.issues.map(l=>Io(l,o,Oo())))}:{success:!0,data:i.value}},WR=Xa(Ja),el=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(l=>Io(l,o,Oo())))}:{success:!0,data:i.value}},GR=el(Ja),jR=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ya(e)(t,n,o)},qR=e=>(t,n,r)=>Ya(e)(t,n,r),ZR=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Qa(e)(t,n,o)},KR=e=>async(t,n,r)=>Qa(e)(t,n,r),JR=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Xa(e)(t,n,o)},YR=e=>(t,n,r)=>Xa(e)(t,n,r),QR=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return el(e)(t,n,o)},XR=e=>async(t,n,r)=>el(e)(t,n,r),eM=/^[cC][^\s-]{8,}$/,tM=/^[0-9a-z]+$/,nM=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,rM=/^[0-9a-vA-V]{20}$/,oM=/^[A-Za-z0-9]{27}$/,sM=/^[a-zA-Z0-9_-]{21}$/,iM=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,aM=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,eb=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,lM=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,cM="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function uM(){return new RegExp(cM,"u")}const dM=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,fM=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,hM=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,pM=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,gM=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,tb=/^[A-Za-z0-9_-]*$/,mM=/^\+[1-9]\d{6,14}$/,nb="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",vM=new RegExp(`^${nb}$`);function rb(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function yM(e){return new RegExp(`^${rb(e)}$`)}function wM(e){const t=rb({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${nb}T(?:${r})$`)}const bM=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},_M=/^[^A-Z]*$/,SM=/^[^a-z]*$/,pr=Z("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),xM=Z("$ZodCheckMaxLength",(e,t)=>{var n;pr.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Rd(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const l=Fd(o);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),CM=Z("$ZodCheckMinLength",(e,t)=>{var n;pr.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Rd(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const l=Fd(o);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),EM=Z("$ZodCheckLengthEquals",(e,t)=>{var n;pr.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!Rd(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,i=o.length;if(i===t.length)return;const l=Fd(o),c=i>t.length;r.issues.push({origin:l,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),tl=Z("$ZodCheckStringFormat",(e,t)=>{var n,r;pr.init(e,t),e._zod.onattach.push(o=>{const i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),PM=Z("$ZodCheckRegex",(e,t)=>{tl.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),AM=Z("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=_M),tl.init(e,t)}),OM=Z("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=SM),tl.init(e,t)}),TM=Z("$ZodCheckIncludes",(e,t)=>{pr.init(e,t);const n=Za(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),IM=Z("$ZodCheckStartsWith",(e,t)=>{pr.init(e,t);const n=new RegExp(`^${Za(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),NM=Z("$ZodCheckEndsWith",(e,t)=>{pr.init(e,t);const n=new RegExp(`.*${Za(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),kM=Z("$ZodCheckOverwrite",(e,t)=>{pr.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class DM{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
59
|
+
`).filter(l=>l),o=Math.min(...r.map(l=>l.length-l.trimStart().length)),i=r.map(l=>l.slice(o)).map(l=>" ".repeat(this.indent*2)+l);for(const l of i)this.content.push(l)}compile(){const t=Function,n=this?.args,o=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,o.join(`
|
|
60
|
+
`))}}const RM={major:4,minor:3,patch:6},Ot=Z("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=RM;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const i of o._zod.onattach)i(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(l,c,d)=>{let f=cs(l),p;for(const h of c){if(h._zod.def.when){if(!h._zod.def.when(l))continue}else if(f)continue;const y=l.issues.length,w=h._zod.check(l);if(w instanceof Promise&&d?.async===!1)throw new ls;if(p||w instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await w,l.issues.length!==y&&(f||(f=cs(l,y)))});else{if(l.issues.length===y)continue;f||(f=cs(l,y))}}return p?p.then(()=>l):l},i=(l,c,d)=>{if(cs(l))return l.aborted=!0,l;const f=o(c,r,d);if(f instanceof Promise){if(d.async===!1)throw new ls;return f.then(p=>e._zod.parse(p,d))}return e._zod.parse(f,d)};e._zod.run=(l,c)=>{if(c.skipChecks)return e._zod.parse(l,c);if(c.direction==="backward"){const f=e._zod.parse({value:l.value,issues:[]},{...c,skipChecks:!0});return f instanceof Promise?f.then(p=>i(p,l,c)):i(f,l,c)}const d=e._zod.parse(l,c);if(d instanceof Promise){if(c.async===!1)throw new ls;return d.then(f=>o(f,r,c))}return o(d,r,c)}}ot(e,"~standard",()=>({validate:o=>{try{const i=WR(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return GR(e,o).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),Ld=Z("$ZodString",(e,t)=>{Ot.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??bM(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),ut=Z("$ZodStringFormat",(e,t)=>{tl.init(e,t),Ld.init(e,t)}),MM=Z("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=aM),ut.init(e,t)}),FM=Z("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=eb(r))}else t.pattern??(t.pattern=eb());ut.init(e,t)}),$M=Z("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=lM),ut.init(e,t)}),LM=Z("$ZodURL",(e,t)=>{ut.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),zM=Z("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=uM()),ut.init(e,t)}),VM=Z("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=sM),ut.init(e,t)}),UM=Z("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=eM),ut.init(e,t)}),BM=Z("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=tM),ut.init(e,t)}),HM=Z("$ZodULID",(e,t)=>{t.pattern??(t.pattern=nM),ut.init(e,t)}),WM=Z("$ZodXID",(e,t)=>{t.pattern??(t.pattern=rM),ut.init(e,t)}),GM=Z("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=oM),ut.init(e,t)}),jM=Z("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=wM(t)),ut.init(e,t)}),qM=Z("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=vM),ut.init(e,t)}),ZM=Z("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=yM(t)),ut.init(e,t)}),KM=Z("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=iM),ut.init(e,t)}),JM=Z("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=dM),ut.init(e,t),e._zod.bag.format="ipv4"}),YM=Z("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=fM),ut.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),QM=Z("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=hM),ut.init(e,t)}),XM=Z("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=pM),ut.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[o,i]=r;if(!i)throw new Error;const l=Number(i);if(`${l}`!==i)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function ob(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const eF=Z("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=gM),ut.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{ob(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function tF(e){if(!tb.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return ob(n)}const nF=Z("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=tb),ut.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{tF(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),rF=Z("$ZodE164",(e,t)=>{t.pattern??(t.pattern=mM),ut.init(e,t)});function oF(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const sF=Z("$ZodJWT",(e,t)=>{ut.init(e,t),e._zod.check=n=>{oF(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),iF=Z("$ZodUnknown",(e,t)=>{Ot.init(e,t),e._zod.parse=n=>n}),aF=Z("$ZodNever",(e,t)=>{Ot.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function sb(e,t,n){e.issues.length&&t.issues.push(...Qw(n,e.issues)),t.value[n]=e.value}const lF=Z("$ZodArray",(e,t)=>{Ot.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const i=[];for(let l=0;l<o.length;l++){const c=o[l],d=t.element._zod.run({value:c,issues:[]},r);d instanceof Promise?i.push(d.then(f=>sb(f,n,l))):sb(d,n,l)}return i.length?Promise.all(i).then(()=>n):n}});function nl(e,t,n,r,o){if(e.issues.length){if(o&&!(n in r))return;t.issues.push(...Qw(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function ib(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=kR(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function ab(e,t,n,r,o,i){const l=[],c=o.keySet,d=o.catchall._zod,f=d.def.type,p=d.optout==="optional";for(const h in t){if(c.has(h))continue;if(f==="never"){l.push(h);continue}const y=d.run({value:t[h],issues:[]},r);y instanceof Promise?e.push(y.then(w=>nl(w,n,h,t,p))):nl(y,n,h,t,p)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const cF=Z("$ZodObject",(e,t)=>{if(Ot.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const c=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...c};return Object.defineProperty(t,"shape",{value:d}),d}})}const r=Dd(()=>ib(t));ot(e._zod,"propValues",()=>{const c=t.shape,d={};for(const f in c){const p=c[f]._zod;if(p.values){d[f]??(d[f]=new Set);for(const h of p.values)d[f].add(h)}}return d});const o=qa,i=t.catchall;let l;e._zod.parse=(c,d)=>{l??(l=r.value);const f=c.value;if(!o(f))return c.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),c;c.value={};const p=[],h=l.shape;for(const y of l.keys){const w=h[y],b=w._zod.optout==="optional",_=w._zod.run({value:f[y],issues:[]},d);_ instanceof Promise?p.push(_.then(x=>nl(x,c,y,f,b))):nl(_,c,y,f,b)}return i?ab(p,f,c,d,r.value,e):p.length?Promise.all(p).then(()=>c):c}}),uF=Z("$ZodObjectJIT",(e,t)=>{cF.init(e,t);const n=e._zod.parse,r=Dd(()=>ib(t)),o=y=>{const w=new DM(["shape","payload","ctx"]),b=r.value,_=O=>{const N=Kw(O);return`shape[${N}]._zod.run({ value: input[${N}], issues: [] }, ctx)`};w.write("const input = payload.value;");const x=Object.create(null);let E=0;for(const O of b.keys)x[O]=`key_${E++}`;w.write("const newResult = {};");for(const O of b.keys){const N=x[O],D=Kw(O),z=y[O]?._zod?.optout==="optional";w.write(`const ${N} = ${_(O)};`),z?w.write(`
|
|
61
|
+
if (${N}.issues.length) {
|
|
62
|
+
if (${D} in input) {
|
|
63
|
+
payload.issues = payload.issues.concat(${N}.issues.map(iss => ({
|
|
64
|
+
...iss,
|
|
65
|
+
path: iss.path ? [${D}, ...iss.path] : [${D}]
|
|
66
|
+
})));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (${N}.value === undefined) {
|
|
71
|
+
if (${D} in input) {
|
|
72
|
+
newResult[${D}] = undefined;
|
|
73
|
+
}
|
|
74
|
+
} else {
|
|
75
|
+
newResult[${D}] = ${N}.value;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
`):w.write(`
|
|
79
|
+
if (${N}.issues.length) {
|
|
80
|
+
payload.issues = payload.issues.concat(${N}.issues.map(iss => ({
|
|
81
|
+
...iss,
|
|
82
|
+
path: iss.path ? [${D}, ...iss.path] : [${D}]
|
|
83
|
+
})));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (${N}.value === undefined) {
|
|
87
|
+
if (${D} in input) {
|
|
88
|
+
newResult[${D}] = undefined;
|
|
89
|
+
}
|
|
90
|
+
} else {
|
|
91
|
+
newResult[${D}] = ${N}.value;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
`)}w.write("payload.value = newResult;"),w.write("return payload;");const A=w.compile();return(O,N)=>A(y,O,N)};let i;const l=qa,c=!jw.jitless,f=c&&IR.value,p=t.catchall;let h;e._zod.parse=(y,w)=>{h??(h=r.value);const b=y.value;return l(b)?c&&f&&w?.async===!1&&w.jitless!==!0?(i||(i=o(t.shape)),y=i(y,w),p?ab([],b,y,w,h,e):y):n(y,w):(y.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),y)}});function lb(e,t,n,r){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const o=e.filter(i=>!cs(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(l=>Io(l,r,Oo())))}),t)}const dF=Z("$ZodUnion",(e,t)=>{Ot.init(e,t),ot(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),ot(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),ot(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),ot(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>Md(i.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(n)return r(o,i);let l=!1;const c=[];for(const d of t.options){const f=d._zod.run({value:o.value,issues:[]},i);if(f instanceof Promise)c.push(f),l=!0;else{if(f.issues.length===0)return f;c.push(f)}}return l?Promise.all(c).then(d=>lb(d,o,e,i)):lb(c,o,e,i)}}),fF=Z("$ZodIntersection",(e,t)=>{Ot.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,i=t.left._zod.run({value:o,issues:[]},r),l=t.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||l instanceof Promise?Promise.all([i,l]).then(([d,f])=>cb(n,d,f)):cb(n,i,l)}});function zd(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ai(e)&&ai(t)){const n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),o={...e,...t};for(const i of r){const l=zd(e[i],t[i]);if(!l.valid)return{valid:!1,mergeErrorPath:[i,...l.mergeErrorPath]};o[i]=l.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],i=t[r],l=zd(o,i);if(!l.valid)return{valid:!1,mergeErrorPath:[r,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function cb(e,t,n){const r=new Map;let o;for(const c of t.issues)if(c.code==="unrecognized_keys"){o??(o=c);for(const d of c.keys)r.has(d)||r.set(d,{}),r.get(d).l=!0}else e.issues.push(c);for(const c of n.issues)if(c.code==="unrecognized_keys")for(const d of c.keys)r.has(d)||r.set(d,{}),r.get(d).r=!0;else e.issues.push(c);const i=[...r].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(i.length&&o&&e.issues.push({...o,keys:i}),cs(e))return e;const l=zd(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const hF=Z("$ZodEnum",(e,t)=>{Ot.init(e,t);const n=qw(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>NR.has(typeof o)).map(o=>typeof o=="string"?Za(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const l=o.value;return r.has(l)||o.issues.push({code:"invalid_value",values:n,input:l,inst:e}),o}}),pF=Z("$ZodTransform",(e,t)=>{Ot.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Gw(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(l=>(n.value=l,n));if(o instanceof Promise)throw new ls;return n.value=o,n}});function ub(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const db=Z("$ZodOptional",(e,t)=>{Ot.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ot(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ot(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Md(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>ub(i,n.value)):ub(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),gF=Z("$ZodExactOptional",(e,t)=>{db.init(e,t),ot(e._zod,"values",()=>t.innerType._zod.values),ot(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),mF=Z("$ZodNullable",(e,t)=>{Ot.init(e,t),ot(e._zod,"optin",()=>t.innerType._zod.optin),ot(e._zod,"optout",()=>t.innerType._zod.optout),ot(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Md(n.source)}|null)$`):void 0}),ot(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),vF=Z("$ZodDefault",(e,t)=>{Ot.init(e,t),e._zod.optin="optional",ot(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>fb(i,t)):fb(o,t)}});function fb(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const yF=Z("$ZodPrefault",(e,t)=>{Ot.init(e,t),e._zod.optin="optional",ot(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),wF=Z("$ZodNonOptional",(e,t)=>{Ot.init(e,t),ot(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>hb(i,e)):hb(o,e)}});function hb(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const bF=Z("$ZodCatch",(e,t)=>{Ot.init(e,t),ot(e._zod,"optin",()=>t.innerType._zod.optin),ot(e._zod,"optout",()=>t.innerType._zod.optout),ot(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(l=>Io(l,r,Oo()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(i=>Io(i,r,Oo()))},input:n.value}),n.issues=[]),n)}}),_F=Z("$ZodPipe",(e,t)=>{Ot.init(e,t),ot(e._zod,"values",()=>t.in._zod.values),ot(e._zod,"optin",()=>t.in._zod.optin),ot(e._zod,"optout",()=>t.out._zod.optout),ot(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const i=t.out._zod.run(n,r);return i instanceof Promise?i.then(l=>rl(l,t.in,r)):rl(i,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(i=>rl(i,t.out,r)):rl(o,t.out,r)}});function rl(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const SF=Z("$ZodReadonly",(e,t)=>{Ot.init(e,t),ot(e._zod,"propValues",()=>t.innerType._zod.propValues),ot(e._zod,"values",()=>t.innerType._zod.values),ot(e._zod,"optin",()=>t.innerType?._zod?.optin),ot(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(pb):pb(o)}});function pb(e){return e.value=Object.freeze(e.value),e}const xF=Z("$ZodCustom",(e,t)=>{pr.init(e,t),Ot.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(i=>gb(i,n,r,e));gb(o,n,r,e)}});function gb(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(li(o))}}var mb;class CF{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function EF(){return new CF}(mb=globalThis).__zod_globalRegistry??(mb.__zod_globalRegistry=EF());const ci=globalThis.__zod_globalRegistry;function PF(e,t){return new e({type:"string",...Re(t)})}function AF(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Re(t)})}function vb(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Re(t)})}function OF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Re(t)})}function TF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Re(t)})}function IF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Re(t)})}function NF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Re(t)})}function kF(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Re(t)})}function DF(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Re(t)})}function RF(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Re(t)})}function MF(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Re(t)})}function FF(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Re(t)})}function $F(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Re(t)})}function LF(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Re(t)})}function zF(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Re(t)})}function VF(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Re(t)})}function UF(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Re(t)})}function BF(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Re(t)})}function HF(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Re(t)})}function WF(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Re(t)})}function GF(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Re(t)})}function jF(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Re(t)})}function qF(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Re(t)})}function ZF(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Re(t)})}function KF(e,t){return new e({type:"string",format:"date",check:"string_format",...Re(t)})}function JF(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Re(t)})}function YF(e,t){return new e({type:"string",format:"duration",check:"string_format",...Re(t)})}function QF(e){return new e({type:"unknown"})}function XF(e,t){return new e({type:"never",...Re(t)})}function yb(e,t){return new xM({check:"max_length",...Re(t),maximum:e})}function ol(e,t){return new CM({check:"min_length",...Re(t),minimum:e})}function wb(e,t){return new EM({check:"length_equals",...Re(t),length:e})}function e$(e,t){return new PM({check:"string_format",format:"regex",...Re(t),pattern:e})}function t$(e){return new AM({check:"string_format",format:"lowercase",...Re(e)})}function n$(e){return new OM({check:"string_format",format:"uppercase",...Re(e)})}function r$(e,t){return new TM({check:"string_format",format:"includes",...Re(t),includes:e})}function o$(e,t){return new IM({check:"string_format",format:"starts_with",...Re(t),prefix:e})}function s$(e,t){return new NM({check:"string_format",format:"ends_with",...Re(t),suffix:e})}function us(e){return new kM({check:"overwrite",tx:e})}function i$(e){return us(t=>t.normalize(e))}function a$(){return us(e=>e.trim())}function l$(){return us(e=>e.toLowerCase())}function c$(){return us(e=>e.toUpperCase())}function u$(){return us(e=>TR(e))}function d$(e,t,n){return new e({type:"array",element:t,...Re(n)})}function f$(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Re(n)})}function h$(e){const t=p$(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(li(r,n.value,t._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(li(o))}},e(n.value,n)));return t}function p$(e,t){const n=new pr({check:"custom",...Re(t)});return n._zod.check=e,n}function bb(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ci,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function $t(e,t,n={path:[],schemaPath:[]}){var r;const o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const c=e._zod.toJSONSchema?.();if(c)l.schema=c;else{const p={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,p);else{const y=l.schema,w=t.processors[o.type];if(!w)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);w(e,t,y,p)}const h=e._zod.parent;h&&(l.ref||(l.ref=h),$t(h,t,p),t.seen.get(h).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(l.schema,d),t.io==="input"&&Jt(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&l.schema._prefault&&((r=l.schema).default??(r.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function _b(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const l of e.seen.entries()){const c=e.metadataRegistry.get(l[0])?.id;if(c){const d=r.get(c);if(d&&d!==l[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(c,l[0])}}const o=l=>{const c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const h=e.external.registry.get(l[0])?.id,y=e.external.uri??(b=>b);if(h)return{ref:y(h)};const w=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=w,{defId:w,ref:`${y("__shared")}#/${c}/${w}`}}if(l[1]===n)return{ref:"#"};const f=`#/${c}/`,p=l[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:f+p}},i=l=>{if(l[1].schema.$ref)return;const c=l[1],{ref:d,defId:f}=o(l);c.def={...c.schema},f&&(c.defId=f);const p=c.schema;for(const h in p)delete p[h];p.$ref=d};if(e.cycles==="throw")for(const l of e.seen.entries()){const c=l[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
|
|
95
|
+
|
|
96
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const c=l[1];if(t===l[0]){i(l);continue}if(e.external){const f=e.external.registry.get(l[0])?.id;if(t!==l[0]&&f){i(l);continue}}if(e.metadataRegistry.get(l[0])?.id){i(l);continue}if(c.cycle){i(l);continue}if(c.count>1&&e.reused==="ref"){i(l);continue}}}function Sb(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=l=>{const c=e.seen.get(l);if(c.ref===null)return;const d=c.def??c.schema,f={...d},p=c.ref;if(c.ref=null,p){r(p);const y=e.seen.get(p),w=y.schema;if(w.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(w)):Object.assign(d,w),Object.assign(d,f),l._zod.parent===p)for(const _ in d)_==="$ref"||_==="allOf"||_ in f||delete d[_];if(w.$ref&&y.def)for(const _ in d)_==="$ref"||_==="allOf"||_ in y.def&&JSON.stringify(d[_])===JSON.stringify(y.def[_])&&delete d[_]}const h=l._zod.parent;if(h&&h!==p){r(h);const y=e.seen.get(h);if(y?.schema.$ref&&(d.$ref=y.schema.$ref,y.def))for(const w in d)w==="$ref"||w==="allOf"||w in y.def&&JSON.stringify(d[w])===JSON.stringify(y.def[w])&&delete d[w]}e.override({zodSchema:l,jsonSchema:d,path:c.path??[]})};for(const l of[...e.seen.entries()].reverse())r(l[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(l)}Object.assign(o,n.def??n.schema);const i=e.external?.defs??{};for(const l of e.seen.entries()){const c=l[1];c.def&&c.defId&&(i[c.defId]=c.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{const l=JSON.parse(JSON.stringify(o));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:sl(t,"input",e.processors),output:sl(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function Jt(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return Jt(r.element,n);if(r.type==="set")return Jt(r.valueType,n);if(r.type==="lazy")return Jt(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return Jt(r.innerType,n);if(r.type==="intersection")return Jt(r.left,n)||Jt(r.right,n);if(r.type==="record"||r.type==="map")return Jt(r.keyType,n)||Jt(r.valueType,n);if(r.type==="pipe")return Jt(r.in,n)||Jt(r.out,n);if(r.type==="object"){for(const o in r.shape)if(Jt(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(Jt(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(Jt(o,n))return!0;return!!(r.rest&&Jt(r.rest,n))}return!1}const g$=(e,t={})=>n=>{const r=bb({...n,processors:t});return $t(e,r),_b(r,e),Sb(r,e)},sl=(e,t,n={})=>r=>{const{libraryOptions:o,target:i}=r??{},l=bb({...o??{},target:i,io:t,processors:n});return $t(e,l),_b(l,e),Sb(l,e)},m$={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},v$=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:i,maximum:l,format:c,patterns:d,contentEncoding:f}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof l=="number"&&(o.maxLength=l),c&&(o.format=m$[c]??c,o.format===""&&delete o.format,c==="time"&&delete o.format),f&&(o.contentEncoding=f),d&&d.size>0){const p=[...d];p.length===1?o.pattern=p[0].source:p.length>1&&(o.allOf=[...p.map(h=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:h.source}))])}},y$=(e,t,n,r)=>{n.not={}},w$=(e,t,n,r)=>{},b$=(e,t,n,r)=>{const o=e._zod.def,i=qw(o.entries);i.every(l=>typeof l=="number")&&(n.type="number"),i.every(l=>typeof l=="string")&&(n.type="string"),n.enum=i},_$=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},S$=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},x$=(e,t,n,r)=>{const o=n,i=e._zod.def,{minimum:l,maximum:c}=e._zod.bag;typeof l=="number"&&(o.minItems=l),typeof c=="number"&&(o.maxItems=c),o.type="array",o.items=$t(i.element,t,{...r,path:[...r.path,"items"]})},C$=(e,t,n,r)=>{const o=n,i=e._zod.def;o.type="object",o.properties={};const l=i.shape;for(const f in l)o.properties[f]=$t(l[f],t,{...r,path:[...r.path,"properties",f]});const c=new Set(Object.keys(l)),d=new Set([...c].filter(f=>{const p=i.shape[f]._zod;return t.io==="input"?p.optin===void 0:p.optout===void 0}));d.size>0&&(o.required=Array.from(d)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=$t(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},E$=(e,t,n,r)=>{const o=e._zod.def,i=o.inclusive===!1,l=o.options.map((c,d)=>$t(c,t,{...r,path:[...r.path,i?"oneOf":"anyOf",d]}));i?n.oneOf=l:n.anyOf=l},P$=(e,t,n,r)=>{const o=e._zod.def,i=$t(o.left,t,{...r,path:[...r.path,"allOf",0]}),l=$t(o.right,t,{...r,path:[...r.path,"allOf",1]}),c=f=>"allOf"in f&&Object.keys(f).length===1,d=[...c(i)?i.allOf:[i],...c(l)?l.allOf:[l]];n.allOf=d},A$=(e,t,n,r)=>{const o=e._zod.def,i=$t(o.innerType,t,r),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},O$=(e,t,n,r)=>{const o=e._zod.def;$t(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},T$=(e,t,n,r)=>{const o=e._zod.def;$t(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},I$=(e,t,n,r)=>{const o=e._zod.def;$t(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},N$=(e,t,n,r)=>{const o=e._zod.def;$t(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType;let l;try{l=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},k$=(e,t,n,r)=>{const o=e._zod.def,i=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;$t(i,t,r);const l=t.seen.get(e);l.ref=i},D$=(e,t,n,r)=>{const o=e._zod.def;$t(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},xb=(e,t,n,r)=>{const o=e._zod.def;$t(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType};function Cb(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function R$(e,t){for(var n={};e.length;){var r=e[0],o=r.code,i=r.message,l=r.path.join(".");if(!n[l])if("unionErrors"in r){var c=r.unionErrors[0].errors[0];n[l]={message:c.message,type:c.code}}else n[l]={message:i,type:o};if("unionErrors"in r&&r.unionErrors.forEach(function(p){return p.errors.forEach(function(h){return e.push(h)})}),t){var d=n[l].types,f=d&&d[r.code];n[l]=Pd(l,t,n,o,f?[].concat(f,r.message):r.message)}e.shift()}return n}function M$(e,t){for(var n={};e.length;){var r=e[0],o=r.code,i=r.message,l=r.path.join(".");if(!n[l])if(r.code==="invalid_union"&&r.errors.length>0){var c=r.errors[0][0];n[l]={message:c.message,type:c.code}}else n[l]={message:i,type:o};if(r.code==="invalid_union"&&r.errors.forEach(function(p){return p.forEach(function(h){return e.push(h)})}),t){var d=n[l].types,f=d&&d[r.code];n[l]=Pd(l,t,n,o,f?[].concat(f,r.message):r.message)}e.shift()}return n}function Eb(e,t,n){if(n===void 0&&(n={}),(function(r){return"_def"in r&&typeof r._def=="object"&&"typeName"in r._def})(e))return function(r,o,i){try{return Promise.resolve(Cb(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return i.shouldUseNativeValidation&&Nd({},i),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if((function(c){return Array.isArray(c?.issues)})(l))return{values:{},errors:Hw(R$(l.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw l}))}catch(l){return Promise.reject(l)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,o,i){try{return Promise.resolve(Cb(function(){return Promise.resolve((n.mode==="sync"?BR:HR)(e,r,t)).then(function(l){return i.shouldUseNativeValidation&&Nd({},i),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if((function(c){return c instanceof $d})(l))return{values:{},errors:Hw(M$(l.issues,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw l}))}catch(l){return Promise.reject(l)}};throw new Error("Invalid input: not a Zod schema")}function Vd({...e}){return g.jsx(Lc,{"data-slot":"dialog",...e})}function F$({...e}){return g.jsx(zc,{"data-slot":"dialog-portal",...e})}function $$({className:e,...t}){return g.jsx(Vc,{"data-slot":"dialog-overlay",className:ae("fixed inset-0 isolate z-50 bg-black/30 duration-200 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...t})}function Ud({className:e,children:t,showCloseButton:n=!0,...r}){return g.jsxs(F$,{children:[g.jsx($$,{}),g.jsxs(Uc,{"data-slot":"dialog-content",className:ae("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-background p-6 text-sm ring-1 ring-foreground/10 duration-200 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:slide-in-from-bottom-8 data-closed:animate-out data-closed:fade-out-0 data-closed:slide-out-to-bottom-8",e),...r,children:[t,n&&g.jsx(Rs,{"data-slot":"dialog-close",asChild:!0,children:g.jsxs(Ut,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm",children:[g.jsx(tw,{}),g.jsx("span",{className:"sr-only",children:"Close"})]})})]})]})}function Bd({className:e,...t}){return g.jsx("div",{"data-slot":"dialog-header",className:ae("flex flex-col gap-2",e),...t})}function Hd({className:e,showCloseButton:t=!1,children:n,...r}){return g.jsxs("div",{"data-slot":"dialog-footer",className:ae("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...r,children:[n,t&&g.jsx(Rs,{asChild:!0,children:g.jsx(Ut,{variant:"outline",children:"Close"})})]})}function Wd({className:e,...t}){return g.jsx(Bc,{"data-slot":"dialog-title",className:ae("leading-none font-medium",e),...t})}function L$({className:e,...t}){return g.jsx(Hc,{"data-slot":"dialog-description",className:ae("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...t})}function Pb({className:e,...t}){return g.jsx(zA,{"data-slot":"label",className:ae("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const Gd=hR,Ab=v.createContext(null),ui=({...e})=>g.jsx(Ab.Provider,{value:{name:e.name},children:g.jsx(dR,{...e})}),il=()=>{const e=v.useContext(Ab),t=v.useContext(Ob),{getFieldState:n,formState:r}=fR();if(!e)throw new Error("useFormField should be used within <FormField>");if(!t)throw new Error("useFormField should be used within <FormItem>");const o=n(e.name,r),{id:i}=t;return{id:i,name:e.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...o}},Ob=v.createContext(null),ds=v.forwardRef(({className:e,...t},n)=>{const r=v.useId();return g.jsx(Ob.Provider,{value:{id:r},children:g.jsx("div",{ref:n,className:ae("space-y-2",e),...t})})});ds.displayName="FormItem";const fs=v.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:o}=il();return g.jsx(Pb,{ref:n,className:ae(r&&"text-destructive",e),htmlFor:o,...t})});fs.displayName="FormLabel";const hs=v.forwardRef(({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:o,formMessageId:i}=il();return g.jsx($i,{ref:t,id:r,"aria-describedby":n?`${o} ${i}`:`${o}`,"aria-invalid":!!n,...e})});hs.displayName="FormControl";const Tb=v.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:r}=il();return g.jsx("p",{ref:n,id:r,className:ae("text-[0.8rem] text-muted-foreground",e),...t})});Tb.displayName="FormDescription";const ps=v.forwardRef(({className:e,children:t,...n},r)=>{const{error:o,formMessageId:i}=il(),l=o?String(o?.message??""):t;return l?g.jsx("p",{ref:r,id:i,className:ae("text-[0.8rem] font-medium text-destructive",e),...n,children:l}):null});ps.displayName="FormMessage";const z$=Z("ZodISODateTime",(e,t)=>{jM.init(e,t),pt.init(e,t)});function V$(e){return ZF(z$,e)}const U$=Z("ZodISODate",(e,t)=>{qM.init(e,t),pt.init(e,t)});function B$(e){return KF(U$,e)}const H$=Z("ZodISOTime",(e,t)=>{ZM.init(e,t),pt.init(e,t)});function W$(e){return JF(H$,e)}const G$=Z("ZodISODuration",(e,t)=>{KM.init(e,t),pt.init(e,t)});function j$(e){return YF(G$,e)}const Nn=Z("ZodError",(e,t)=>{$d.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>UR(e,n)},flatten:{value:n=>VR(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,kd,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,kd,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),q$=Ya(Nn),Z$=Qa(Nn),K$=Xa(Nn),J$=el(Nn),Y$=jR(Nn),Q$=qR(Nn),X$=ZR(Nn),eL=KR(Nn),tL=JR(Nn),nL=YR(Nn),rL=QR(Nn),oL=XR(Nn),Tt=Z("ZodType",(e,t)=>(Ot.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:sl(e,"input"),output:sl(e,"output")}}),e.toJSONSchema=g$(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Zr(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>Kr(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>q$(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>K$(e,n,r),e.parseAsync=async(n,r)=>Z$(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>J$(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>Y$(e,n,r),e.decode=(n,r)=>Q$(e,n,r),e.encodeAsync=async(n,r)=>X$(e,n,r),e.decodeAsync=async(n,r)=>eL(e,n,r),e.safeEncode=(n,r)=>tL(e,n,r),e.safeDecode=(n,r)=>nL(e,n,r),e.safeEncodeAsync=async(n,r)=>rL(e,n,r),e.safeDecodeAsync=async(n,r)=>oL(e,n,r),e.refine=(n,r)=>e.check(JL(n,r)),e.superRefine=n=>e.check(YL(n)),e.overwrite=n=>e.check(us(n)),e.optional=()=>Mb(e),e.exactOptional=()=>$L(e),e.nullable=()=>Fb(e),e.nullish=()=>Mb(Fb(e)),e.nonoptional=n=>HL(e,n),e.array=()=>AL(e),e.or=n=>IL([e,n]),e.and=n=>kL(e,n),e.transform=n=>Lb(e,ML(n)),e.default=n=>VL(e,n),e.prefault=n=>BL(e,n),e.catch=n=>GL(e,n),e.pipe=n=>Lb(e,n),e.readonly=()=>ZL(e),e.describe=n=>{const r=e.clone();return ci.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return ci.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return ci.get(e);const r=e.clone();return ci.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),Ib=Z("_ZodString",(e,t)=>{Ld.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(r,o,i)=>v$(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(e$(...r)),e.includes=(...r)=>e.check(r$(...r)),e.startsWith=(...r)=>e.check(o$(...r)),e.endsWith=(...r)=>e.check(s$(...r)),e.min=(...r)=>e.check(ol(...r)),e.max=(...r)=>e.check(yb(...r)),e.length=(...r)=>e.check(wb(...r)),e.nonempty=(...r)=>e.check(ol(1,...r)),e.lowercase=r=>e.check(t$(r)),e.uppercase=r=>e.check(n$(r)),e.trim=()=>e.check(a$()),e.normalize=(...r)=>e.check(i$(...r)),e.toLowerCase=()=>e.check(l$()),e.toUpperCase=()=>e.check(c$()),e.slugify=()=>e.check(u$())}),sL=Z("ZodString",(e,t)=>{Ld.init(e,t),Ib.init(e,t),e.email=n=>e.check(AF(iL,n)),e.url=n=>e.check(kF(aL,n)),e.jwt=n=>e.check(qF(SL,n)),e.emoji=n=>e.check(DF(lL,n)),e.guid=n=>e.check(vb(Nb,n)),e.uuid=n=>e.check(OF(ll,n)),e.uuidv4=n=>e.check(TF(ll,n)),e.uuidv6=n=>e.check(IF(ll,n)),e.uuidv7=n=>e.check(NF(ll,n)),e.nanoid=n=>e.check(RF(cL,n)),e.guid=n=>e.check(vb(Nb,n)),e.cuid=n=>e.check(MF(uL,n)),e.cuid2=n=>e.check(FF(dL,n)),e.ulid=n=>e.check($F(fL,n)),e.base64=n=>e.check(WF(wL,n)),e.base64url=n=>e.check(GF(bL,n)),e.xid=n=>e.check(LF(hL,n)),e.ksuid=n=>e.check(zF(pL,n)),e.ipv4=n=>e.check(VF(gL,n)),e.ipv6=n=>e.check(UF(mL,n)),e.cidrv4=n=>e.check(BF(vL,n)),e.cidrv6=n=>e.check(HF(yL,n)),e.e164=n=>e.check(jF(_L,n)),e.datetime=n=>e.check(V$(n)),e.date=n=>e.check(B$(n)),e.time=n=>e.check(W$(n)),e.duration=n=>e.check(j$(n))});function al(e){return PF(sL,e)}const pt=Z("ZodStringFormat",(e,t)=>{ut.init(e,t),Ib.init(e,t)}),iL=Z("ZodEmail",(e,t)=>{$M.init(e,t),pt.init(e,t)}),Nb=Z("ZodGUID",(e,t)=>{MM.init(e,t),pt.init(e,t)}),ll=Z("ZodUUID",(e,t)=>{FM.init(e,t),pt.init(e,t)}),aL=Z("ZodURL",(e,t)=>{LM.init(e,t),pt.init(e,t)}),lL=Z("ZodEmoji",(e,t)=>{zM.init(e,t),pt.init(e,t)}),cL=Z("ZodNanoID",(e,t)=>{VM.init(e,t),pt.init(e,t)}),uL=Z("ZodCUID",(e,t)=>{UM.init(e,t),pt.init(e,t)}),dL=Z("ZodCUID2",(e,t)=>{BM.init(e,t),pt.init(e,t)}),fL=Z("ZodULID",(e,t)=>{HM.init(e,t),pt.init(e,t)}),hL=Z("ZodXID",(e,t)=>{WM.init(e,t),pt.init(e,t)}),pL=Z("ZodKSUID",(e,t)=>{GM.init(e,t),pt.init(e,t)}),gL=Z("ZodIPv4",(e,t)=>{JM.init(e,t),pt.init(e,t)}),mL=Z("ZodIPv6",(e,t)=>{YM.init(e,t),pt.init(e,t)}),vL=Z("ZodCIDRv4",(e,t)=>{QM.init(e,t),pt.init(e,t)}),yL=Z("ZodCIDRv6",(e,t)=>{XM.init(e,t),pt.init(e,t)}),wL=Z("ZodBase64",(e,t)=>{eF.init(e,t),pt.init(e,t)}),bL=Z("ZodBase64URL",(e,t)=>{nF.init(e,t),pt.init(e,t)}),_L=Z("ZodE164",(e,t)=>{rF.init(e,t),pt.init(e,t)}),SL=Z("ZodJWT",(e,t)=>{sF.init(e,t),pt.init(e,t)}),xL=Z("ZodUnknown",(e,t)=>{iF.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>w$()});function kb(){return QF(xL)}const CL=Z("ZodNever",(e,t)=>{aF.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>y$(e,n,r)});function EL(e){return XF(CL,e)}const PL=Z("ZodArray",(e,t)=>{lF.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>x$(e,n,r,o),e.element=t.element,e.min=(n,r)=>e.check(ol(n,r)),e.nonempty=n=>e.check(ol(1,n)),e.max=(n,r)=>e.check(yb(n,r)),e.length=(n,r)=>e.check(wb(n,r)),e.unwrap=()=>e.element});function AL(e,t){return d$(PL,e,t)}const OL=Z("ZodObject",(e,t)=>{uF.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>C$(e,n,r,o),ot(e,"shape",()=>t.shape),e.keyof=()=>DL(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:kb()}),e.loose=()=>e.clone({...e._zod.def,catchall:kb()}),e.strict=()=>e.clone({...e._zod.def,catchall:EL()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>MR(e,n),e.safeExtend=n=>FR(e,n),e.merge=n=>$R(e,n),e.pick=n=>DR(e,n),e.omit=n=>RR(e,n),e.partial=(...n)=>LR(Rb,e,n[0]),e.required=(...n)=>zR($b,e,n[0])});function Db(e,t){const n={type:"object",shape:e??{},...Re(t)};return new OL(n)}const TL=Z("ZodUnion",(e,t)=>{dF.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>E$(e,n,r,o),e.options=t.options});function IL(e,t){return new TL({type:"union",options:e,...Re(t)})}const NL=Z("ZodIntersection",(e,t)=>{fF.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>P$(e,n,r,o)});function kL(e,t){return new NL({type:"intersection",left:e,right:t})}const jd=Z("ZodEnum",(e,t)=>{hF.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(r,o,i)=>b$(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const i={};for(const l of r)if(n.has(l))i[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new jd({...t,checks:[],...Re(o),entries:i})},e.exclude=(r,o)=>{const i={...t.entries};for(const l of r)if(n.has(l))delete i[l];else throw new Error(`Key ${l} not found in enum`);return new jd({...t,checks:[],...Re(o),entries:i})}});function DL(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new jd({type:"enum",entries:n,...Re(t)})}const RL=Z("ZodTransform",(e,t)=>{pF.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>S$(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Gw(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(li(i,n.value,t));else{const l=i;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(li(l))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n)):(n.value=o,n)}});function ML(e){return new RL({type:"transform",transform:e})}const Rb=Z("ZodOptional",(e,t)=>{db.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>xb(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Mb(e){return new Rb({type:"optional",innerType:e})}const FL=Z("ZodExactOptional",(e,t)=>{gF.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>xb(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function $L(e){return new FL({type:"optional",innerType:e})}const LL=Z("ZodNullable",(e,t)=>{mF.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>A$(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function Fb(e){return new LL({type:"nullable",innerType:e})}const zL=Z("ZodDefault",(e,t)=>{vF.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>T$(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function VL(e,t){return new zL({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Yw(t)}})}const UL=Z("ZodPrefault",(e,t)=>{yF.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>I$(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function BL(e,t){return new UL({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Yw(t)}})}const $b=Z("ZodNonOptional",(e,t)=>{wF.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>O$(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function HL(e,t){return new $b({type:"nonoptional",innerType:e,...Re(t)})}const WL=Z("ZodCatch",(e,t)=>{bF.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>N$(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function GL(e,t){return new WL({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const jL=Z("ZodPipe",(e,t)=>{_F.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>k$(e,n,r,o),e.in=t.in,e.out=t.out});function Lb(e,t){return new jL({type:"pipe",in:e,out:t})}const qL=Z("ZodReadonly",(e,t)=>{SF.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>D$(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function ZL(e){return new qL({type:"readonly",innerType:e})}const KL=Z("ZodCustom",(e,t)=>{xF.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>_$(e,n)});function JL(e,t={}){return f$(KL,e,t)}function YL(e){return h$(e)}const QL=Db({fullName:al().min(1,{message:"Username is required"})}),XL=Db({currentPassword:al().min(1,{message:"Current password is required"}),newPassword:al().min(8,{message:"Password must be at least 8 characters"}),confirmPassword:al()}).refine(e=>e.newPassword===e.confirmPassword,{message:"Passwords do not match",path:["confirmPassword"]});function e2({open:e,onOpenChange:t}){const[n,r]=$.useState(!1),[o,i]=$.useState(!1),[l,c]=$.useState(!1),d=Uw({resolver:Eb(XL),defaultValues:{currentPassword:"",newPassword:"",confirmPassword:""}}),{mutate:f,isPending:p}=sR(),h=w=>{f({currentPassword:w.currentPassword,newPassword:w.newPassword},{onSuccess:()=>{d.reset(),t(!1)}})},y=w=>{w||d.reset(),t(w)};return g.jsx(Vd,{open:e,onOpenChange:y,children:g.jsxs(Ud,{children:[g.jsx(Bd,{children:g.jsx(Wd,{className:"text-lg font-bold",children:"Change Your Password"})}),g.jsx(Gd,{...d,children:g.jsxs("form",{onSubmit:d.handleSubmit(h),className:"space-y-4",children:[g.jsx(ui,{control:d.control,name:"currentPassword",render:({field:w})=>g.jsxs(ds,{children:[g.jsxs(fs,{className:"font-semibold",children:["Old Password ",g.jsx("span",{className:"text-destructive",children:"*"})]}),g.jsx(hs,{children:g.jsxs("div",{className:"relative",children:[g.jsx(ss,{type:n?"text":"password",placeholder:"Old Password",className:"pr-10",...w,disabled:p}),g.jsx("button",{type:"button",onClick:()=>r(b=>!b),className:"absolute top-1/2 right-3 -translate-y-1/2 text-muted-foreground transition-colors hover:text-foreground",disabled:p,children:n?g.jsx(gd,{className:"size-4"}):g.jsx(md,{className:"size-4"})})]})}),g.jsx(ps,{})]})}),g.jsx(ui,{control:d.control,name:"newPassword",render:({field:w})=>g.jsxs(ds,{children:[g.jsxs(fs,{className:"font-semibold",children:["New Password ",g.jsx("span",{className:"text-destructive",children:"*"})]}),g.jsx(hs,{children:g.jsxs("div",{className:"relative",children:[g.jsx(ss,{type:o?"text":"password",placeholder:"New Password",className:"pr-10",...w,disabled:p}),g.jsx("button",{type:"button",onClick:()=>i(b=>!b),className:"absolute top-1/2 right-3 -translate-y-1/2 text-muted-foreground transition-colors hover:text-foreground",disabled:p,children:o?g.jsx(gd,{className:"size-4"}):g.jsx(md,{className:"size-4"})})]})}),g.jsx(ps,{})]})}),g.jsx(ui,{control:d.control,name:"confirmPassword",render:({field:w})=>g.jsxs(ds,{children:[g.jsxs(fs,{className:"font-semibold",children:["Confirm Password ",g.jsx("span",{className:"text-destructive",children:"*"})]}),g.jsx(hs,{children:g.jsxs("div",{className:"relative",children:[g.jsx(ss,{type:l?"text":"password",placeholder:"Confirm Password",className:"pr-10",...w,disabled:p}),g.jsx("button",{type:"button",onClick:()=>c(b=>!b),className:"absolute top-1/2 right-3 -translate-y-1/2 text-muted-foreground transition-colors hover:text-foreground",disabled:p,children:l?g.jsx(gd,{className:"size-4"}):g.jsx(md,{className:"size-4"})})]})}),g.jsx(ps,{})]})}),g.jsxs(Hd,{children:[g.jsx(Ut,{type:"button",variant:"outline",onClick:()=>y(!1),disabled:p,children:"Cancel"}),g.jsx(Ut,{type:"submit",disabled:p,children:p?g.jsxs(g.Fragment,{children:[g.jsx(Xy,{className:"size-4 animate-spin"}),"Updating..."]}):"Update"})]})]})})]})})}function t2({open:e,onOpenChange:t,defaultValues:n}){const{mutate:r,isPending:o}=oR(),i=Uw({resolver:Eb(QL),defaultValues:n}),l=d=>{r(d,{onSuccess:()=>{t(!1)}})},c=d=>{d||i.reset(n),t(d)};return g.jsx(Vd,{open:e,onOpenChange:c,children:g.jsxs(Ud,{children:[g.jsx(Bd,{children:g.jsx(Wd,{className:"text-lg font-bold",children:"Edit Profile"})}),g.jsx(Gd,{...i,children:g.jsxs("form",{onSubmit:i.handleSubmit(l),className:"space-y-4",children:[g.jsx(ui,{control:i.control,name:"fullName",render:({field:d})=>g.jsxs(ds,{children:[g.jsxs(fs,{className:"font-semibold",children:["Username ",g.jsx("span",{className:"text-destructive",children:"*"})]}),g.jsx(hs,{children:g.jsx(ss,{placeholder:"Enter your name",...d,disabled:o})}),g.jsx(ps,{})]})}),g.jsxs(Hd,{children:[g.jsx(Ut,{type:"button",variant:"outline",onClick:()=>c(!1),disabled:o,children:"Cancel"}),g.jsx(Ut,{type:"submit",disabled:o,children:o?g.jsxs(g.Fragment,{children:[g.jsx(Xy,{className:"size-4 animate-spin"}),"Saving..."]}):"Save"})]})]})})]})})}function n2(e){return e.split(" ").map(t=>t[0]).join("").toUpperCase().slice(0,2)}function r2(e){return e?e.startsWith("http")?e:`${oe.BASE_URL}/${e}`:""}function o2({open:e,onOpenChange:t}){const{data:n,isLoading:r}=ww(),[o,i]=$.useState(!1),[l,c]=$.useState(!1);return g.jsxs(g.Fragment,{children:[g.jsx(nw,{open:e,onOpenChange:t,children:g.jsxs(rw,{side:"right",className:"w-full overflow-y-auto sm:max-w-md",children:[g.jsxs(ow,{className:"border-b pb-4",children:[g.jsx(sw,{className:"text-center text-xl font-bold",children:"Profile Setting"}),g.jsx(iw,{className:"sr-only",children:"View and manage your profile settings"})]}),r?g.jsx(s2,{}):n?g.jsxs("div",{className:"flex flex-col px-4",children:[g.jsxs("div",{className:"flex flex-col items-center py-8",children:[g.jsxs(mw,{className:"mb-4 h-24 w-24",children:[g.jsx(vw,{src:r2(n.profileImage),alt:n.fullName}),g.jsx(yw,{className:"bg-primary text-xl text-white",children:n2(n.fullName)})]}),g.jsx("h3",{className:"text-lg font-bold text-foreground",children:n.fullName}),g.jsx("p",{className:"text-sm text-muted-foreground",children:n.role?.name}),g.jsx(Ut,{variant:"outline",size:"sm",className:"mt-3",onClick:()=>c(!0),children:"Edit Profile"})]}),g.jsx(Ky,{}),g.jsxs("div",{className:"space-y-5 py-6",children:[g.jsx("h4",{className:"text-lg font-bold text-foreground",children:"Personal Information"}),g.jsxs("div",{className:"space-y-1",children:[g.jsx("p",{className:"text-sm text-muted-foreground",children:"Username"}),g.jsx("p",{className:"text-sm font-semibold text-foreground",children:n.fullName})]}),g.jsxs("div",{className:"space-y-1",children:[g.jsx("p",{className:"text-sm text-muted-foreground",children:"Email"}),g.jsx("p",{className:"text-sm font-semibold text-foreground",children:n.email})]}),g.jsxs("div",{className:"space-y-1",children:[g.jsx("p",{className:"text-sm text-muted-foreground",children:"Role"}),g.jsx("p",{className:"text-sm font-semibold text-foreground",children:n.role?.name})]}),g.jsxs(Ut,{variant:"outline",className:"mt-2 w-full",onClick:()=>i(!0),children:[g.jsx(OD,{className:"mr-2 size-4"}),"Change Password"]})]})]}):null]})}),g.jsx(e2,{open:o,onOpenChange:i}),n&&g.jsx(t2,{open:l,onOpenChange:c,defaultValues:{fullName:n.fullName}})]})}function s2(){return g.jsxs("div",{className:"flex flex-col px-4",children:[g.jsxs("div",{className:"flex flex-col items-center py-8",children:[g.jsx(Xn,{className:"mb-4 h-24 w-24 rounded-full"}),g.jsx(Xn,{className:"mb-2 h-5 w-40"}),g.jsx(Xn,{className:"h-4 w-24"})]}),g.jsx(Ky,{}),g.jsxs("div",{className:"space-y-5 py-6",children:[g.jsx(Xn,{className:"h-5 w-48"}),g.jsxs("div",{className:"space-y-1",children:[g.jsx(Xn,{className:"h-4 w-20"}),g.jsx(Xn,{className:"h-4 w-32"})]}),g.jsxs("div",{className:"space-y-1",children:[g.jsx(Xn,{className:"h-4 w-20"}),g.jsx(Xn,{className:"h-4 w-44"})]}),g.jsxs("div",{className:"space-y-1",children:[g.jsx(Xn,{className:"h-4 w-20"}),g.jsx(Xn,{className:"h-4 w-28"})]}),g.jsx(Xn,{className:"h-10 w-full"})]})]})}function i2(e){return e.split(" ").map(t=>t[0]).join("").toUpperCase().slice(0,2)}function a2(e){return e?e.startsWith("http")?e:`${oe.BASE_URL}/${e}`:""}function zb(){const{state:e}=ni(),t=e==="collapsed",{data:n}=ww(),[r,o]=$.useState(!1),i=n?.fullName??"User",l=n?.role?.name??"",c=i2(i),d=a2(n?.profileImage??null);return g.jsxs(g.Fragment,{children:[g.jsx(dw,{className:"border-t border-border px-3 py-3",children:g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("button",{onClick:()=>o(!0),children:g.jsxs(mw,{className:"h-9 w-9 shrink-0",children:[g.jsx(vw,{src:d,alt:i}),g.jsx(yw,{className:"bg-primary text-sm text-white",children:c})]})}),!t&&g.jsxs(g.Fragment,{children:[g.jsxs("button",{onClick:()=>o(!0),className:"min-w-0 flex-1 text-left",children:[g.jsx("p",{className:"truncate text-sm font-semibold text-foreground",children:i}),g.jsx("p",{className:"truncate text-xs text-muted-foreground",children:l})]}),g.jsx("button",{onClick:()=>{localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),window.location.href="/login"},className:"shrink-0 text-muted-foreground transition-colors hover:text-foreground",children:g.jsx(ID,{className:"h-4 w-4"})})]})]})}),g.jsx(o2,{open:r,onOpenChange:o})]})}function Vb({items:e,brandName:t="OBS Co.Ltd",logoUrl:n="/logo.png",footer:r}){const{toggleSidebar:o,state:i}=ni(),l=i==="collapsed",[c,d]=$.useState("");return g.jsxs(cw,{collapsible:"icon",className:"border-r border-border bg-white",children:[g.jsxs(uw,{className:"pt-4 pb-0",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[!l&&g.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[g.jsx("img",{src:n,alt:"Logo",className:"h-8 w-8 shrink-0"}),g.jsx("span",{className:"truncate text-base font-bold text-foreground",children:t})]}),g.jsx("button",{onClick:o,className:"shrink-0 rounded-md p-1 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:l?g.jsx(kD,{className:"h-4 w-4"}):g.jsx(ND,{className:"h-4 w-4"})})]}),!l&&g.jsxs("div",{className:"relative mt-4",children:[g.jsx(ew,{className:"absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),g.jsx("input",{placeholder:"Search ....",value:c,onChange:f=>d(f.target.value),className:"w-full rounded-md bg-neutral-200 py-2.5 pr-3 pl-9 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none"})]})]}),g.jsx(fw,{children:g.jsx(gw,{search:c,items:e})}),r||g.jsx(zb,{})]})}const l2=({navItems:e,brandName:t,logoUrl:n,sidebarFooter:r,redirectPath:o="/login"})=>localStorage.getItem("accessToken")?g.jsx(lw,{children:g.jsxs("div",{className:"flex min-h-screen w-full bg-neutral-100",children:[g.jsx(Vb,{items:e,brandName:t,logoUrl:n,footer:r}),g.jsx("div",{className:"flex min-h-screen flex-1 flex-col min-w-0 overflow-hidden",children:g.jsx(Ly,{})})]})}):g.jsx($y,{to:o}),c2=()=>localStorage.getItem("accessToken")?g.jsx($y,{to:"/"}):g.jsx("div",{children:g.jsxs("div",{className:"grid h-screen grid-cols-12 overflow-hidden bg-primary text-white",children:[g.jsx("section",{className:"col-span-8 flex h-full items-center",children:g.jsxs("div",{className:"mx-auto flex h-full w-full max-w-2xl items-center",children:[g.jsx("div",{className:"fixed top-32",children:g.jsx("img",{src:"/Logo.svg",alt:"logo"})}),g.jsxs("div",{className:"space-y-5",children:[g.jsx("h1",{className:"max-w-sm text-4xl leading-tight font-bold tracking-tight lg:text-6xl",children:"Manage Everything in One Place"}),g.jsx("p",{className:"max-w-md text-sm leading-7 text-primary-foreground/85 lg:text-base",children:"Sign in to access your dashboard and manage your data, monitor activity, and stay in control of your workspace."})]})]})}),g.jsx("section",{className:"col-span-4 flex animate-in items-center bg-white text-foreground duration-700 ease-out fade-in slide-in-from-right-[100%] lg:rounded-l-[3rem] lg:px-14",children:g.jsx("div",{className:"mx-auto w-full max-w-md",children:g.jsx(Ly,{})})})]})});function Ub({...e}){return g.jsx(DA,{"data-slot":"dropdown-menu",...e})}function Bb({...e}){return g.jsx(RA,{"data-slot":"dropdown-menu-trigger",...e})}function Hb({className:e,align:t="start",sideOffset:n=4,...r}){return g.jsx(MA,{children:g.jsx(FA,{"data-slot":"dropdown-menu-content",sideOffset:n,align:t,className:ae("dark z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:overflow-hidden data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...r})})}function Wb({className:e,inset:t,variant:n="default",...r}){return g.jsx($A,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:ae("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...r})}function u2({title:e,action:t,total:n}){return g.jsxs("header",{className:"sticky top-0 z-50 flex shrink-0 items-center justify-between border-b border-border bg-white px-4 py-6",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("h1",{className:"text-base font-bold text-foreground",children:e}),n!==void 0&&n>0&&g.jsx("span",{className:"rounded-md bg-[#f3f4f6] px-2.5 py-0.5 text-[11px] font-semibold text-foreground",children:n})]}),t&&t.type!=="none"&&g.jsxs("div",{children:[t.type==="button"&&g.jsxs(Ut,{size:"sm",variant:t.variant??"default",onClick:t.onClick,children:[t.icon,t.label]}),t.type==="dropdown"&&g.jsxs("div",{className:"flex items-center",children:[g.jsxs(Ut,{size:"sm",onClick:t.items[0]?.onClick,className:"rounded-r-none",children:[t.icon,t.label]}),g.jsxs(Ub,{children:[g.jsx(Bb,{asChild:!0,children:g.jsx(Ut,{size:"sm",variant:t.variant??"default",className:"rounded-l-none border-l border-l-border/50 px-2",children:g.jsx(Ba,{className:"size-4"})})}),g.jsx(Hb,{align:"end",children:t.items.map(r=>g.jsx(Wb,{onClick:r.onClick,children:r.label},r.label))})]})]})]})]})}function Jr(e,t){return typeof e=="function"?e(t):e}function yn(e,t){return n=>{t.setState(r=>({...r,[e]:Jr(n,r[e])}))}}function cl(e){return e instanceof Function}function d2(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function f2(e,t){const n=[],r=o=>{o.forEach(i=>{n.push(i);const l=t(i);l!=null&&l.length&&r(l)})};return r(e),n}function ke(e,t,n){let r=[],o;return i=>{let l;n.key&&n.debug&&(l=Date.now());const c=e(i);if(!(c.length!==r.length||c.some((p,h)=>r[h]!==p)))return o;r=c;let f;if(n.key&&n.debug&&(f=Date.now()),o=t(...c),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const p=Math.round((Date.now()-l)*100)/100,h=Math.round((Date.now()-f)*100)/100,y=h/16,w=(b,_)=>{for(b=String(b);b.length<_;)b=" "+b;return b};console.info(`%c⏱ ${w(h,5)} /${w(p,5)} ms`,`
|
|
97
|
+
font-size: .6rem;
|
|
98
|
+
font-weight: bold;
|
|
99
|
+
color: hsl(${Math.max(0,Math.min(120-120*y,120))}deg 100% 31%);`,n?.key)}return o}}function De(e,t,n,r){return{debug:()=>{var o;return(o=e?.debugAll)!=null?o:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:r}}function h2(e,t,n,r){const o=()=>{var l;return(l=i.getValue())!=null?l:e.options.renderFallbackValue},i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:o,getContext:ke(()=>[e,n,t,i],(l,c,d,f)=>({table:l,column:c,row:d,cell:f,getValue:f.getValue,renderValue:f.renderValue}),De(e.options,"debugCells","cell.getContext"))};return e._features.forEach(l=>{l.createCell==null||l.createCell(i,n,t,e)},{}),i}function p2(e,t,n,r){var o,i;const c={...e._getDefaultColumnDef(),...t},d=c.accessorKey;let f=(o=(i=c.id)!=null?i:d?typeof String.prototype.replaceAll=="function"?d.replaceAll(".","_"):d.replace(/\./g,"_"):void 0)!=null?o:typeof c.header=="string"?c.header:void 0,p;if(c.accessorFn?p=c.accessorFn:d&&(d.includes(".")?p=y=>{let w=y;for(const _ of d.split(".")){var b;w=(b=w)==null?void 0:b[_],process.env.NODE_ENV!=="production"&&w===void 0&&console.warn(`"${_}" in deeply nested key "${d}" returned undefined.`)}return w}:p=y=>y[c.accessorKey]),!f)throw process.env.NODE_ENV!=="production"?new Error(c.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let h={id:`${String(f)}`,accessorFn:p,parent:r,depth:n,columnDef:c,columns:[],getFlatColumns:ke(()=>[!0],()=>{var y;return[h,...(y=h.columns)==null?void 0:y.flatMap(w=>w.getFlatColumns())]},De(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:ke(()=>[e._getOrderColumnsFn()],y=>{var w;if((w=h.columns)!=null&&w.length){let b=h.columns.flatMap(_=>_.getLeafColumns());return y(b)}return[h]},De(e.options,"debugColumns","column.getLeafColumns"))};for(const y of e._features)y.createColumn==null||y.createColumn(h,e);return h}const Bt="debugHeaders";function Gb(e,t,n){var r;let i={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const l=[],c=d=>{d.subHeaders&&d.subHeaders.length&&d.subHeaders.map(c),l.push(d)};return c(i),l},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(l=>{l.createHeader==null||l.createHeader(i,e)}),i}const g2={createTable:e=>{e.getHeaderGroups=ke(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>{var i,l;const c=(i=r?.map(h=>n.find(y=>y.id===h)).filter(Boolean))!=null?i:[],d=(l=o?.map(h=>n.find(y=>y.id===h)).filter(Boolean))!=null?l:[],f=n.filter(h=>!(r!=null&&r.includes(h.id))&&!(o!=null&&o.includes(h.id)));return ul(t,[...c,...f,...d],e)},De(e.options,Bt,"getHeaderGroups")),e.getCenterHeaderGroups=ke(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>(n=n.filter(i=>!(r!=null&&r.includes(i.id))&&!(o!=null&&o.includes(i.id))),ul(t,n,e,"center")),De(e.options,Bt,"getCenterHeaderGroups")),e.getLeftHeaderGroups=ke(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var o;const i=(o=r?.map(l=>n.find(c=>c.id===l)).filter(Boolean))!=null?o:[];return ul(t,i,e,"left")},De(e.options,Bt,"getLeftHeaderGroups")),e.getRightHeaderGroups=ke(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var o;const i=(o=r?.map(l=>n.find(c=>c.id===l)).filter(Boolean))!=null?o:[];return ul(t,i,e,"right")},De(e.options,Bt,"getRightHeaderGroups")),e.getFooterGroups=ke(()=>[e.getHeaderGroups()],t=>[...t].reverse(),De(e.options,Bt,"getFooterGroups")),e.getLeftFooterGroups=ke(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),De(e.options,Bt,"getLeftFooterGroups")),e.getCenterFooterGroups=ke(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),De(e.options,Bt,"getCenterFooterGroups")),e.getRightFooterGroups=ke(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),De(e.options,Bt,"getRightFooterGroups")),e.getFlatHeaders=ke(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),De(e.options,Bt,"getFlatHeaders")),e.getLeftFlatHeaders=ke(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),De(e.options,Bt,"getLeftFlatHeaders")),e.getCenterFlatHeaders=ke(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),De(e.options,Bt,"getCenterFlatHeaders")),e.getRightFlatHeaders=ke(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),De(e.options,Bt,"getRightFlatHeaders")),e.getCenterLeafHeaders=ke(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),De(e.options,Bt,"getCenterLeafHeaders")),e.getLeftLeafHeaders=ke(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),De(e.options,Bt,"getLeftLeafHeaders")),e.getRightLeafHeaders=ke(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),De(e.options,Bt,"getRightLeafHeaders")),e.getLeafHeaders=ke(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var o,i,l,c,d,f;return[...(o=(i=t[0])==null?void 0:i.headers)!=null?o:[],...(l=(c=n[0])==null?void 0:c.headers)!=null?l:[],...(d=(f=r[0])==null?void 0:f.headers)!=null?d:[]].map(p=>p.getLeafHeaders()).flat()},De(e.options,Bt,"getLeafHeaders"))}};function ul(e,t,n,r){var o,i;let l=0;const c=function(y,w){w===void 0&&(w=1),l=Math.max(l,w),y.filter(b=>b.getIsVisible()).forEach(b=>{var _;(_=b.columns)!=null&&_.length&&c(b.columns,w+1)},0)};c(e);let d=[];const f=(y,w)=>{const b={depth:w,id:[r,`${w}`].filter(Boolean).join("_"),headers:[]},_=[];y.forEach(x=>{const E=[..._].reverse()[0],A=x.column.depth===b.depth;let O,N=!1;if(A&&x.column.parent?O=x.column.parent:(O=x.column,N=!0),E&&E?.column===O)E.subHeaders.push(x);else{const D=Gb(n,O,{id:[r,w,O.id,x?.id].filter(Boolean).join("_"),isPlaceholder:N,placeholderId:N?`${_.filter(H=>H.column===O).length}`:void 0,depth:w,index:_.length});D.subHeaders.push(x),_.push(D)}b.headers.push(x),x.headerGroup=b}),d.push(b),w>0&&f(_,w-1)},p=t.map((y,w)=>Gb(n,y,{depth:l,index:w}));f(p,l-1),d.reverse();const h=y=>y.filter(b=>b.column.getIsVisible()).map(b=>{let _=0,x=0,E=[0];b.subHeaders&&b.subHeaders.length?(E=[],h(b.subHeaders).forEach(O=>{let{colSpan:N,rowSpan:D}=O;_+=N,E.push(D)})):_=1;const A=Math.min(...E);return x=x+A,b.colSpan=_,b.rowSpan=x,{colSpan:_,rowSpan:x}});return h((o=(i=d[0])==null?void 0:i.headers)!=null?o:[]),d}const m2=(e,t,n,r,o,i,l)=>{let c={id:t,index:r,original:n,depth:o,parentId:l,_valuesCache:{},_uniqueValuesCache:{},getValue:d=>{if(c._valuesCache.hasOwnProperty(d))return c._valuesCache[d];const f=e.getColumn(d);if(f!=null&&f.accessorFn)return c._valuesCache[d]=f.accessorFn(c.original,r),c._valuesCache[d]},getUniqueValues:d=>{if(c._uniqueValuesCache.hasOwnProperty(d))return c._uniqueValuesCache[d];const f=e.getColumn(d);if(f!=null&&f.accessorFn)return f.columnDef.getUniqueValues?(c._uniqueValuesCache[d]=f.columnDef.getUniqueValues(c.original,r),c._uniqueValuesCache[d]):(c._uniqueValuesCache[d]=[c.getValue(d)],c._uniqueValuesCache[d])},renderValue:d=>{var f;return(f=c.getValue(d))!=null?f:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>f2(c.subRows,d=>d.subRows),getParentRow:()=>c.parentId?e.getRow(c.parentId,!0):void 0,getParentRows:()=>{let d=[],f=c;for(;;){const p=f.getParentRow();if(!p)break;d.push(p),f=p}return d.reverse()},getAllCells:ke(()=>[e.getAllLeafColumns()],d=>d.map(f=>h2(e,c,f,f.id)),De(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:ke(()=>[c.getAllCells()],d=>d.reduce((f,p)=>(f[p.column.id]=p,f),{}),De(e.options,"debugRows","getAllCellsByColumnId"))};for(let d=0;d<e._features.length;d++){const f=e._features[d];f==null||f.createRow==null||f.createRow(c,e)}return c},v2={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},jb=(e,t,n)=>{var r,o;const i=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((o=e.getValue(t))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(i))};jb.autoRemove=e=>nr(e);const qb=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};qb.autoRemove=e=>nr(e);const Zb=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};Zb.autoRemove=e=>nr(e);const Kb=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};Kb.autoRemove=e=>nr(e);const Jb=(e,t,n)=>!n.some(r=>{var o;return!((o=e.getValue(t))!=null&&o.includes(r))});Jb.autoRemove=e=>nr(e)||!(e!=null&&e.length);const Yb=(e,t,n)=>n.some(r=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)});Yb.autoRemove=e=>nr(e)||!(e!=null&&e.length);const Qb=(e,t,n)=>e.getValue(t)===n;Qb.autoRemove=e=>nr(e);const Xb=(e,t,n)=>e.getValue(t)==n;Xb.autoRemove=e=>nr(e);const qd=(e,t,n)=>{let[r,o]=n;const i=e.getValue(t);return i>=r&&i<=o};qd.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,o=typeof n!="number"?parseFloat(n):n,i=t===null||Number.isNaN(r)?-1/0:r,l=n===null||Number.isNaN(o)?1/0:o;if(i>l){const c=i;i=l,l=c}return[i,l]},qd.autoRemove=e=>nr(e)||nr(e[0])&&nr(e[1]);const Pr={includesString:jb,includesStringSensitive:qb,equalsString:Zb,arrIncludes:Kb,arrIncludesAll:Jb,arrIncludesSome:Yb,equals:Qb,weakEquals:Xb,inNumberRange:qd};function nr(e){return e==null||e===""}const y2={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:yn("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);return typeof r=="string"?Pr.includesString:typeof r=="number"?Pr.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Pr.equals:Array.isArray(r)?Pr.arrIncludes:Pr.weakEquals},e.getFilterFn=()=>{var n,r;return cl(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:Pr[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const o=e.getFilterFn(),i=r?.find(p=>p.id===e.id),l=Jr(n,i?i.value:void 0);if(e0(o,l,e)){var c;return(c=r?.filter(p=>p.id!==e.id))!=null?c:[]}const d={id:e.id,value:l};if(i){var f;return(f=r?.map(p=>p.id===e.id?d:p))!=null?f:[]}return r!=null&&r.length?[...r,d]:[d]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=o=>{var i;return(i=Jr(t,o))==null?void 0:i.filter(l=>{const c=n.find(d=>d.id===l.id);if(c){const d=c.getFilterFn();if(e0(d,l.value,c))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function e0(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Zd={sum:(e,t,n)=>n.reduce((r,o)=>{const i=o.getValue(e);return r+(typeof i=="number"?i:0)},0),min:(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}),r},max:(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}),r},extent:(e,t,n)=>{let r,o;return n.forEach(i=>{const l=i.getValue(e);l!=null&&(r===void 0?l>=l&&(r=o=l):(r>l&&(r=l),o<l&&(o=l)))}),[r,o]},mean:(e,t)=>{let n=0,r=0;if(t.forEach(o=>{let i=o.getValue(e);i!=null&&(i=+i)>=i&&(++n,r+=i)}),n)return r/n},median:(e,t)=>{if(!t.length)return;const n=t.map(i=>i.getValue(e));if(!d2(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),o=n.sort((i,l)=>i-l);return n.length%2!==0?o[r]:(o[r-1]+o[r])/2},unique:(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),uniqueCount:(e,t)=>new Set(t.map(n=>n.getValue(e))).size,count:(e,t)=>t.length},w2={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:yn("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);if(typeof r=="number")return Zd.sum;if(Object.prototype.toString.call(r)==="[object Date]")return Zd.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return cl(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:Zd[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)}}};function b2(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(i=>!t.includes(i.id));return n==="remove"?r:[...t.map(i=>e.find(l=>l.id===i)).filter(Boolean),...r]}const _2={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:yn("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=ke(n=>[di(t,n)],n=>n.findIndex(r=>r.id===e.id),De(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return((r=di(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=di(t,n);return((r=o[o.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=ke(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>o=>{let i=[];if(!(t!=null&&t.length))i=o;else{const l=[...t],c=[...o];for(;c.length&&l.length;){const d=l.shift(),f=c.findIndex(p=>p.id===d);f>-1&&i.push(c.splice(f,1)[0])}i=[...i,...c]}return b2(i,n,r)},De(e.options,"debugTable","_getOrderColumnsFn"))}},Kd=()=>({left:[],right:[]}),S2={getInitialState:e=>({columnPinning:Kd(),...e}),getDefaultOptions:e=>({onColumnPinningChange:yn("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(o=>o.id).filter(Boolean);t.setColumnPinning(o=>{var i,l;if(n==="right"){var c,d;return{left:((c=o?.left)!=null?c:[]).filter(h=>!(r!=null&&r.includes(h))),right:[...((d=o?.right)!=null?d:[]).filter(h=>!(r!=null&&r.includes(h))),...r]}}if(n==="left"){var f,p;return{left:[...((f=o?.left)!=null?f:[]).filter(h=>!(r!=null&&r.includes(h))),...r],right:((p=o?.right)!=null?p:[]).filter(h=>!(r!=null&&r.includes(h)))}}return{left:((i=o?.left)!=null?i:[]).filter(h=>!(r!=null&&r.includes(h))),right:((l=o?.right)!=null?l:[]).filter(h=>!(r!=null&&r.includes(h)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var o,i,l;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((i=(l=t.options.enableColumnPinning)!=null?l:t.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(c=>c.id),{left:r,right:o}=t.getState().columnPinning,i=n.some(c=>r?.includes(c)),l=n.some(c=>o?.includes(c));return i?"left":l?"right":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?(n=(r=t.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=ke(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,o)=>{const i=[...r??[],...o??[]];return n.filter(l=>!i.includes(l.column.id))},De(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=ke(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(i=>n.find(l=>l.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),De(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=ke(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(i=>n.find(l=>l.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),De(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?Kd():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:Kd())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var o,i;return!!((o=r.left)!=null&&o.length||(i=r.right)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=ke(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),De(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=ke(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),De(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=ke(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const o=[...n??[],...r??[]];return t.filter(i=>!o.includes(i.id))},De(e.options,"debugColumns","getCenterLeafColumns"))}};function x2(e){return e||(typeof document<"u"?document:null)}const dl={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Jd=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),C2={getDefaultColumnDef:()=>dl,getInitialState:e=>({columnSizing:{},columnSizingInfo:Jd(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:yn("columnSizing",e),onColumnSizingInfoChange:yn("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const i=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:dl.minSize,(r=i??e.columnDef.size)!=null?r:dl.size),(o=e.columnDef.maxSize)!=null?o:dl.maxSize)},e.getStart=ke(n=>[n,di(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((o,i)=>o+i.getSize(),0),De(t.options,"debugColumns","getStart")),e.getAfter=ke(n=>[n,di(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((o,i)=>o+i.getSize(),0),De(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...o}=n;return o})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var i;n+=(i=o.column.getSize())!=null?i:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=r?.getCanResize();return i=>{if(!r||!o||(i.persist==null||i.persist(),Yd(i)&&i.touches&&i.touches.length>1))return;const l=e.getSize(),c=e?e.getLeafHeaders().map(E=>[E.column.id,E.column.getSize()]):[[r.id,r.getSize()]],d=Yd(i)?Math.round(i.touches[0].clientX):i.clientX,f={},p=(E,A)=>{typeof A=="number"&&(t.setColumnSizingInfo(O=>{var N,D;const H=t.options.columnResizeDirection==="rtl"?-1:1,z=(A-((N=O?.startOffset)!=null?N:0))*H,L=Math.max(z/((D=O?.startSize)!=null?D:0),-.999999);return O.columnSizingStart.forEach(ee=>{let[le,be]=ee;f[le]=Math.round(Math.max(be+be*L,0)*100)/100}),{...O,deltaOffset:z,deltaPercentage:L}}),(t.options.columnResizeMode==="onChange"||E==="end")&&t.setColumnSizing(O=>({...O,...f})))},h=E=>p("move",E),y=E=>{p("end",E),t.setColumnSizingInfo(A=>({...A,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},w=x2(n),b={moveHandler:E=>h(E.clientX),upHandler:E=>{w?.removeEventListener("mousemove",b.moveHandler),w?.removeEventListener("mouseup",b.upHandler),y(E.clientX)}},_={moveHandler:E=>(E.cancelable&&(E.preventDefault(),E.stopPropagation()),h(E.touches[0].clientX),!1),upHandler:E=>{var A;w?.removeEventListener("touchmove",_.moveHandler),w?.removeEventListener("touchend",_.upHandler),E.cancelable&&(E.preventDefault(),E.stopPropagation()),y((A=E.touches[0])==null?void 0:A.clientX)}},x=E2()?{passive:!1}:!1;Yd(i)?(w?.addEventListener("touchmove",_.moveHandler,x),w?.addEventListener("touchend",_.upHandler,x)):(w?.addEventListener("mousemove",b.moveHandler,x),w?.addEventListener("mouseup",b.upHandler,x)),t.setColumnSizingInfo(E=>({...E,startOffset:d,startSize:l,deltaOffset:0,deltaPercentage:0,columnSizingStart:c,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?Jd():(n=e.initialState.columnSizingInfo)!=null?n:Jd())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0}}};let fl=null;function E2(){if(typeof fl=="boolean")return fl;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return fl=e,fl}function Yd(e){return e.type==="touchstart"}const P2={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:yn("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const o=e.columns;return(n=o.length?o.some(i=>i.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=ke(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),De(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=ke(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,o)=>[...n,...r,...o],De(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,r)=>ke(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),De(e.options,"debugColumns",n));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,i)=>({...o,[i.id]:n||!(i.getCanHide!=null&&i.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function di(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const A2={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},O2={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:yn("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,o,i;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&((i=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Pr.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return cl(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Pr[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},T2={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:yn("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var o,i;e.setExpanded(r?{}:(o=(i=e.initialState)==null?void 0:i.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const l=i.split(".");r=Math.max(r,l.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var o;const i=r===!0?!0:!!(r!=null&&r[e.id]);let l={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(c=>{l[c]=!0}):l=r,n=(o=n)!=null?o:!i,!i&&n)return{...l,[e.id]:!0};if(i&&!n){const{[e.id]:c,...d}=l;return d}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r?.[e.id])},e.getCanExpand=()=>{var n,r,o;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},Qd=0,Xd=10,ef=()=>({pageIndex:Qd,pageSize:Xd}),I2={getInitialState:e=>({...e,pagination:{...ef(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:yn("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const o=i=>Jr(r,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?ef():(o=e.initialState.pagination)!=null?o:ef())},e.setPageIndex=r=>{e.setPagination(o=>{let i=Jr(r,o.pageIndex);const l=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,l)),{...o,pageIndex:i}})},e.resetPageIndex=r=>{var o,i;e.setPageIndex(r?Qd:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?o:Qd)},e.resetPageSize=r=>{var o,i;e.setPageSize(r?Xd:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?o:Xd)},e.setPageSize=r=>{e.setPagination(o=>{const i=Math.max(1,Jr(r,o.pageSize)),l=o.pageSize*o.pageIndex,c=Math.floor(l/i);return{...o,pageIndex:c,pageSize:i}})},e.setPageCount=r=>e.setPagination(o=>{var i;let l=Jr(r,(i=e.options.pageCount)!=null?i:-1);return typeof l=="number"&&(l=Math.max(-1,l)),{...o,pageCount:l}}),e.getPageOptions=ke(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((i,l)=>l)),o},De(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:r<o-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},tf=()=>({top:[],bottom:[]}),N2={getInitialState:e=>({rowPinning:tf(),...e}),getDefaultOptions:e=>({onRowPinningChange:yn("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const i=r?e.getLeafRows().map(d=>{let{id:f}=d;return f}):[],l=o?e.getParentRows().map(d=>{let{id:f}=d;return f}):[],c=new Set([...l,e.id,...i]);t.setRowPinning(d=>{var f,p;if(n==="bottom"){var h,y;return{top:((h=d?.top)!=null?h:[]).filter(_=>!(c!=null&&c.has(_))),bottom:[...((y=d?.bottom)!=null?y:[]).filter(_=>!(c!=null&&c.has(_))),...Array.from(c)]}}if(n==="top"){var w,b;return{top:[...((w=d?.top)!=null?w:[]).filter(_=>!(c!=null&&c.has(_))),...Array.from(c)],bottom:((b=d?.bottom)!=null?b:[]).filter(_=>!(c!=null&&c.has(_)))}}return{top:((f=d?.top)!=null?f:[]).filter(_=>!(c!=null&&c.has(_))),bottom:((p=d?.bottom)!=null?p:[]).filter(_=>!(c!=null&&c.has(_)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return typeof r=="function"?r(e):(n=r??o)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,i=n.some(c=>r?.includes(c)),l=n.some(c=>o?.includes(c));return i?"top":l?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const i=(n=o==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(l=>{let{id:c}=l;return c});return(r=i?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?tf():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:tf())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var o,i;return!!((o=r.top)!=null&&o.length||(i=r.bottom)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(n??[]).map(l=>{const c=e.getRow(l,!0);return c.getIsAllParentsExpanded()?c:null}):(n??[]).map(l=>t.find(c=>c.id===l))).filter(Boolean).map(l=>({...l,position:r}))},e.getTopRows=ke(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),De(e.options,"debugRows","getTopRows")),e.getBottomRows=ke(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),De(e.options,"debugRows","getBottomRows")),e.getCenterRows=ke(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const o=new Set([...n??[],...r??[]]);return t.filter(i=>!o.has(i.id))},De(e.options,"debugRows","getCenterRows"))}},k2={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:yn("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(i=>{i.getCanSelect()&&(r[i.id]=!0)}):o.forEach(i=>{delete r[i.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(i=>{nf(o,i.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=ke(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?rf(e,n):{rows:[],flatRows:[],rowsById:{}},De(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=ke(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?rf(e,n):{rows:[],flatRows:[],rowsById:{}},De(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=ke(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?rf(e,n):{rows:[],flatRows:[],rowsById:{}},De(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(o=>o.getCanSelect()&&!n[o.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(o=>!n[o.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection(i=>{var l;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return i;const c={...i};return nf(c,e.id,n,(l=r?.selectChildren)!=null?l:!0,t),c})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return of(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return sf(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return sf(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var o;n&&e.toggleSelected((o=r.target)==null?void 0:o.checked)}}}},nf=(e,t,n,r,o)=>{var i;const l=o.getRow(t,!0);n?(l.getCanMultiSelect()||Object.keys(e).forEach(c=>delete e[c]),l.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(i=l.subRows)!=null&&i.length&&l.getCanSelectSubRows()&&l.subRows.forEach(c=>nf(e,c.id,n,r,o))};function rf(e,t){const n=e.getState().rowSelection,r=[],o={},i=function(l,c){return l.map(d=>{var f;const p=of(d,n);if(p&&(r.push(d),o[d.id]=d),(f=d.subRows)!=null&&f.length&&(d={...d,subRows:i(d.subRows)}),p)return d}).filter(Boolean)};return{rows:i(t.rows),flatRows:r,rowsById:o}}function of(e,t){var n;return(n=t[e.id])!=null?n:!1}function sf(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let o=!0,i=!1;return e.subRows.forEach(l=>{if(!(i&&!o)&&(l.getCanSelect()&&(of(l,t)?i=!0:o=!1),l.subRows&&l.subRows.length)){const c=sf(l,t);c==="all"?i=!0:(c==="some"&&(i=!0),o=!1)}}),o?"all":i?"some":!1}const af=/([0-9]+)/gm,D2=(e,t,n)=>t0(Yr(e.getValue(n)).toLowerCase(),Yr(t.getValue(n)).toLowerCase()),R2=(e,t,n)=>t0(Yr(e.getValue(n)),Yr(t.getValue(n))),M2=(e,t,n)=>lf(Yr(e.getValue(n)).toLowerCase(),Yr(t.getValue(n)).toLowerCase()),F2=(e,t,n)=>lf(Yr(e.getValue(n)),Yr(t.getValue(n))),$2=(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},L2=(e,t,n)=>lf(e.getValue(n),t.getValue(n));function lf(e,t){return e===t?0:e>t?1:-1}function Yr(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function t0(e,t){const n=e.split(af).filter(Boolean),r=t.split(af).filter(Boolean);for(;n.length&&r.length;){const o=n.shift(),i=r.shift(),l=parseInt(o,10),c=parseInt(i,10),d=[l,c].sort();if(isNaN(d[0])){if(o>i)return 1;if(i>o)return-1;continue}if(isNaN(d[1]))return isNaN(l)?-1:1;if(l>c)return 1;if(c>l)return-1}return n.length-r.length}const fi={alphanumeric:D2,alphanumericCaseSensitive:R2,text:M2,textCaseSensitive:F2,datetime:$2,basic:L2},z2=[g2,P2,_2,S2,v2,y2,A2,O2,{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:yn("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const o of n){const i=o?.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return fi.datetime;if(typeof i=="string"&&(r=!0,i.split(af).length>1))return fi.alphanumeric}return r?fi.text:fi.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return cl(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:fi[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),i=typeof n<"u"&&n!==null;t.setSorting(l=>{const c=l?.find(w=>w.id===e.id),d=l?.findIndex(w=>w.id===e.id);let f=[],p,h=i?n:o==="desc";if(l!=null&&l.length&&e.getCanMultiSort()&&r?c?p="toggle":p="add":l!=null&&l.length&&d!==l.length-1?p="replace":c?p="toggle":p="replace",p==="toggle"&&(i||o||(p="remove")),p==="add"){var y;f=[...l,{id:e.id,desc:h}],f.splice(0,f.length-((y=t.options.maxMultiSortColCount)!=null?y:Number.MAX_SAFE_INTEGER))}else p==="toggle"?f=l.map(w=>w.id===e.id?{...w,desc:h}:w):p==="remove"?f=l.filter(w=>w.id!==e.id):f=[{id:e.id,desc:h}];return f})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const i=e.getFirstSortDir(),l=e.getIsSorted();return l?l!==i&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(o=t.options.enableMultiRemove)!=null)||o)?!1:l==="desc"?"asc":"desc":i},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(o=>o.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},w2,T2,I2,N2,k2,C2];function V2(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...z2,...(t=e._features)!=null?t:[]];let o={_features:r};const i=o._features.reduce((y,w)=>Object.assign(y,w.getDefaultOptions==null?void 0:w.getDefaultOptions(o)),{}),l=y=>o.options.mergeOptions?o.options.mergeOptions(i,y):{...i,...y};let d={...{},...(n=e.initialState)!=null?n:{}};o._features.forEach(y=>{var w;d=(w=y.getInitialState==null?void 0:y.getInitialState(d))!=null?w:d});const f=[];let p=!1;const h={_features:r,options:{...i,...e},initialState:d,_queue:y=>{f.push(y),p||(p=!0,Promise.resolve().then(()=>{for(;f.length;)f.shift()();p=!1}).catch(w=>setTimeout(()=>{throw w})))},reset:()=>{o.setState(o.initialState)},setOptions:y=>{const w=Jr(y,o.options);o.options=l(w)},getState:()=>o.options.state,setState:y=>{o.options.onStateChange==null||o.options.onStateChange(y)},_getRowId:(y,w,b)=>{var _;return(_=o.options.getRowId==null?void 0:o.options.getRowId(y,w,b))!=null?_:`${b?[b.id,w].join("."):w}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(y,w)=>{let b=(w?o.getPrePaginationRowModel():o.getRowModel()).rowsById[y];if(!b&&(b=o.getCoreRowModel().rowsById[y],!b))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${y}`):new Error;return b},_getDefaultColumnDef:ke(()=>[o.options.defaultColumn],y=>{var w;return y=(w=y)!=null?w:{},{header:b=>{const _=b.header.column.columnDef;return _.accessorKey?_.accessorKey:_.accessorFn?_.id:null},cell:b=>{var _,x;return(_=(x=b.renderValue())==null||x.toString==null?void 0:x.toString())!=null?_:null},...o._features.reduce((b,_)=>Object.assign(b,_.getDefaultColumnDef==null?void 0:_.getDefaultColumnDef()),{}),...y}},De(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>o.options.columns,getAllColumns:ke(()=>[o._getColumnDefs()],y=>{const w=function(b,_,x){return x===void 0&&(x=0),b.map(E=>{const A=p2(o,E,x,_),O=E;return A.columns=O.columns?w(O.columns,A,x+1):[],A})};return w(y)},De(e,"debugColumns","getAllColumns")),getAllFlatColumns:ke(()=>[o.getAllColumns()],y=>y.flatMap(w=>w.getFlatColumns()),De(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:ke(()=>[o.getAllFlatColumns()],y=>y.reduce((w,b)=>(w[b.id]=b,w),{}),De(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:ke(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(y,w)=>{let b=y.flatMap(_=>_.getLeafColumns());return w(b)},De(e,"debugColumns","getAllLeafColumns")),getColumn:y=>{const w=o._getAllFlatColumnsById()[y];return process.env.NODE_ENV!=="production"&&!w&&console.error(`[Table] Column with id '${y}' does not exist.`),w}};Object.assign(o,h);for(let y=0;y<o._features.length;y++){const w=o._features[y];w==null||w.createTable==null||w.createTable(o)}return o}function U2(){return e=>ke(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(o,i,l){i===void 0&&(i=0);const c=[];for(let f=0;f<o.length;f++){const p=m2(e,e._getRowId(o[f],f,l),o[f],f,i,void 0,l?.id);if(n.flatRows.push(p),n.rowsById[p.id]=p,c.push(p),e.options.getSubRows){var d;p.originalSubRows=e.options.getSubRows(o[f],f),(d=p.originalSubRows)!=null&&d.length&&(p.subRows=r(p.originalSubRows,i+1,p))}}return c};return n.rows=r(t),n},De(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function n0(e,t){return e?B2(e)?v.createElement(e,t):e:null}function B2(e){return H2(e)||typeof e=="function"||W2(e)}function H2(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function W2(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function G2(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=v.useState(()=>({current:V2(t)})),[r,o]=v.useState(()=>n.current.initialState);return n.current.setOptions(i=>({...i,...e,state:{...r,...e.state},onStateChange:l=>{o(l),e.onStateChange==null||e.onStateChange(l)}})),n.current}function r0({className:e,...t}){return g.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:g.jsx("table",{"data-slot":"table",className:ae("w-full caption-bottom text-sm",e),...t})})}function o0({className:e,...t}){return g.jsx("thead",{"data-slot":"table-header",className:ae("bg-gray-100 [&_tr]:border-b",e),...t})}function s0({className:e,...t}){return g.jsx("tbody",{"data-slot":"table-body",className:ae("[&_tr:last-child]:border-0",e),...t})}function hi({className:e,...t}){return g.jsx("tr",{"data-slot":"table-row",className:ae("transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t})}function i0({className:e,...t}){return g.jsx("th",{"data-slot":"table-head",className:ae("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",e),...t})}function hl({className:e,...t}){return g.jsx("td",{"data-slot":"table-cell",className:ae("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",e),...t})}function j2({data:e,columns:t,isLoading:n,emptyMessage:r="No data found.",renderRow:o}){const i=G2({data:e,columns:t,getCoreRowModel:U2()});return g.jsxs(r0,{children:[g.jsx(o0,{children:i.getHeaderGroups().map(l=>g.jsx(hi,{children:l.headers.map(c=>g.jsx(i0,{className:c.id==="drag"?"w-10":c.id==="no"?"w-14":c.id==="actions"?"w-16":"",children:c.isPlaceholder?null:n0(c.column.columnDef.header,c.getContext())},c.id))},l.id))}),g.jsx(s0,{children:n?Array.from({length:5}).map((l,c)=>g.jsx(hi,{children:t.map((d,f)=>g.jsx(hl,{children:g.jsx("div",{className:"h-4 animate-pulse rounded bg-muted"})},f))},c)):i.getRowModel().rows?.length?i.getRowModel().rows.map(l=>{const c=l.getVisibleCells().map(d=>g.jsx(hl,{children:n0(d.column.columnDef.cell,d.getContext())},d.id));return o?o(l,c):g.jsx(hi,{"data-state":l.getIsSelected()&&"selected",children:c},l.id)}):g.jsx(hi,{children:g.jsx(hl,{colSpan:t.length,className:"py-10 text-center text-muted-foreground",children:r})})})]})}function q2({className:e,...t}){return g.jsx("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:ae("mx-auto flex w-full justify-center",e),...t})}function Z2({className:e,...t}){return g.jsx("ul",{"data-slot":"pagination-content",className:ae("flex items-center gap-1",e),...t})}function pl({...e}){return g.jsx("li",{"data-slot":"pagination-item",...e})}function cf({className:e,isActive:t,size:n="icon",...r}){return g.jsx(Ut,{asChild:!0,variant:t?"outline":"ghost",size:n,className:ae(e),children:g.jsx("a",{"aria-current":t?"page":void 0,"data-slot":"pagination-link","data-active":t,...r})})}function K2({className:e,text:t="Previous",...n}){return g.jsxs(cf,{"aria-label":"Go to previous page",size:"default",className:ae("pl-2!",e),...n,children:[g.jsx(ED,{"data-icon":"inline-start"}),g.jsx("span",{className:"hidden sm:block",children:t})]})}function J2({className:e,text:t="Next",...n}){return g.jsxs(cf,{"aria-label":"Go to next page",size:"default",className:ae("pr-2!",e),...n,children:[g.jsx("span",{className:"hidden sm:block",children:t}),g.jsx(PD,{"data-icon":"inline-end"})]})}function Y2({className:e,...t}){return g.jsxs("span",{"aria-hidden":!0,"data-slot":"pagination-ellipsis",className:ae("flex size-9 items-center justify-center [&_svg:not([class*='size-'])]:size-4",e),...t,children:[g.jsx(AD,{}),g.jsx("span",{className:"sr-only",children:"More pages"})]})}function a0({...e}){return g.jsx(cO,{"data-slot":"select",...e})}function l0({...e}){return g.jsx(dO,{"data-slot":"select-value",...e})}function c0({className:e,size:t="default",children:n,...r}){return g.jsxs(uO,{"data-slot":"select-trigger","data-size":t,className:ae("flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,g.jsx(fO,{asChild:!0,children:g.jsx(Ba,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}function u0({className:e,children:t,position:n="popper",align:r="center",...o}){return g.jsx(hO,{children:g.jsxs(pO,{"data-slot":"select-content","data-align-trigger":n==="item-aligned",className:ae("dark relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,align:r,...o,children:[g.jsx(Q2,{}),g.jsx(gO,{"data-position":n,className:ae("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",n==="popper"&&""),children:t}),g.jsx(X2,{})]})})}function d0({className:e,children:t,...n}){return g.jsxs(mO,{"data-slot":"select-item",className:ae("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[g.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center",children:g.jsx(yO,{children:g.jsx(CD,{className:"pointer-events-none"})})}),g.jsx(vO,{children:t})]})}function Q2({className:e,...t}){return g.jsx(wO,{"data-slot":"select-scroll-up-button",className:ae("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...t,children:g.jsx(Qy,{})})}function X2({className:e,...t}){return g.jsx(bO,{"data-slot":"select-scroll-down-button",className:ae("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...t,children:g.jsx(Ba,{})})}const ez=[10,20,50,100];function tz({meta:e}){const[t,n]=Wy(),{total:r,page:o,limit:i,totalPages:l}=e,c=r===0?0:(o-1)*i+1,d=Math.min(o*i,r),f=y=>{n(w=>{const b=new URLSearchParams(w);return b.set("page",String(y)),b})},p=y=>{n(w=>{const b=new URLSearchParams(w);return b.set("limit",y),b.set("page","1"),b})},h=()=>l<=7?Array.from({length:l},(y,w)=>w+1):o<=4?[1,2,3,4,5,"...",l]:o>=l-3?[1,"...",l-4,l-3,l-2,l-1,l]:[1,"...",o-1,o,o+1,"...",l];return g.jsxs("div",{className:"flex items-center justify-between rounded-b-lg bg-white px-4 py-4",children:[g.jsxs("p",{className:"text-[13px] font-medium whitespace-nowrap text-foreground",children:["Showing ",c,"-",d," out of ",r]}),g.jsx(q2,{className:"flex-1",children:g.jsxs(Z2,{children:[g.jsx(pl,{children:g.jsx(K2,{href:"#",onClick:y=>{y.preventDefault(),o>1&&f(o-1)},"aria-disabled":o<=1,className:o<=1?"pointer-events-none opacity-50":""})}),h().map((y,w)=>y==="..."?g.jsx(pl,{children:g.jsx(Y2,{})},`ellipsis-${w}`):g.jsx(pl,{children:g.jsx(cf,{href:"#",isActive:y===o,onClick:b=>{b.preventDefault(),f(y)},children:y})},y)),g.jsx(pl,{children:g.jsx(J2,{href:"#",onClick:y=>{y.preventDefault(),o<l&&f(o+1)},"aria-disabled":o>=l,className:o>=l?"pointer-events-none opacity-50":""})})]})}),g.jsxs("div",{className:"flex items-center gap-2 whitespace-nowrap",children:[g.jsx("span",{className:"text-[13px] font-medium text-foreground",children:"Count per page"}),g.jsxs(a0,{value:String(i),onValueChange:p,children:[g.jsx(c0,{className:"h-8 w-[60px] bg-[#f3f4f6] text-sm font-medium",children:g.jsx(l0,{})}),g.jsx(u0,{children:ez.map(y=>g.jsx(d0,{value:String(y),children:y},y))})]})]})]})}var pi={exports:{}};var nz=pi.exports,f0;function rz(){return f0||(f0=1,(function(e,t){(function(){var n,r="4.17.23",o=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",c="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",f=500,p="__lodash_placeholder__",h=1,y=2,w=4,b=1,_=2,x=1,E=2,A=4,O=8,N=16,D=32,H=64,z=128,L=256,ee=512,le=30,be="...",J=800,Q=16,ie=1,he=2,q=3,se=1/0,ne=9007199254740991,te=17976931348623157e292,Y=NaN,Te=4294967295,Qe=Te-1,xe=Te>>>1,Ne=[["ary",z],["bind",x],["bindKey",E],["curry",O],["curryRight",N],["flip",ee],["partial",D],["partialRight",H],["rearg",L]],_e="[object Arguments]",Ee="[object Array]",ce="[object AsyncFunction]",ye="[object Boolean]",Pe="[object Date]",He="[object DOMException]",$e="[object Error]",We="[object Function]",dt="[object GeneratorFunction]",et="[object Map]",an="[object Number]",rr="[object Null]",vt="[object Object]",No="[object Promise]",kn="[object Proxy]",gr="[object RegExp]",I="[object Set]",M="[object String]",U="[object Symbol]",fe="[object Undefined]",re="[object WeakMap]",X="[object WeakSet]",we="[object ArrayBuffer]",Ge="[object DataView]",qe="[object Float32Array]",it="[object Float64Array]",ln="[object Int8Array]",It="[object Int16Array]",ko="[object Int32Array]",Ar="[object Uint8Array]",mr="[object Uint8ClampedArray]",Qr="[object Uint16Array]",Xr="[object Uint32Array]",Do=/\b__p \+= '';/g,wn=/\b(__p \+=) '' \+/g,uf=/(__e\(.*?\)|\b__t\)) \+\n'';/g,gl=/&(?:amp|lt|gt|quot|#39);/g,gi=/[&<>"']/g,ml=RegExp(gl.source),Le=RegExp(gi.source),Ct=/<%-([\s\S]+?)%>/g,Mt=/<%([\s\S]+?)%>/g,Ht=/<%=([\s\S]+?)%>/g,gs=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Nt=/^\w*$/,cn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,eo=/[\\^$.*+?()[\]{}|]/g,bn=RegExp(eo.source),Yt=/^\s+/,vl=/\s/,Or=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_0=/\{\n\/\* \[wrapped with (.+)\] \*/,mz=/,? & /,vz=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,yz=/[()=,{}\[\]\/\s]/,wz=/\\(\\)?/g,bz=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,S0=/\w*$/,_z=/^[-+]0x[0-9a-f]+$/i,Sz=/^0b[01]+$/i,xz=/^\[object .+?Constructor\]$/,Cz=/^0o[0-7]+$/i,Ez=/^(?:0|[1-9]\d*)$/,Pz=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,yl=/($^)/,Az=/['\n\r\u2028\u2029\\]/g,wl="\\ud800-\\udfff",Oz="\\u0300-\\u036f",Tz="\\ufe20-\\ufe2f",Iz="\\u20d0-\\u20ff",x0=Oz+Tz+Iz,C0="\\u2700-\\u27bf",E0="a-z\\xdf-\\xf6\\xf8-\\xff",Nz="\\xac\\xb1\\xd7\\xf7",kz="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Dz="\\u2000-\\u206f",Rz=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",P0="A-Z\\xc0-\\xd6\\xd8-\\xde",A0="\\ufe0e\\ufe0f",O0=Nz+kz+Dz+Rz,df="['’]",Mz="["+wl+"]",T0="["+O0+"]",bl="["+x0+"]",I0="\\d+",Fz="["+C0+"]",N0="["+E0+"]",k0="[^"+wl+O0+I0+C0+E0+P0+"]",ff="\\ud83c[\\udffb-\\udfff]",$z="(?:"+bl+"|"+ff+")",D0="[^"+wl+"]",hf="(?:\\ud83c[\\udde6-\\uddff]){2}",pf="[\\ud800-\\udbff][\\udc00-\\udfff]",ms="["+P0+"]",R0="\\u200d",M0="(?:"+N0+"|"+k0+")",Lz="(?:"+ms+"|"+k0+")",F0="(?:"+df+"(?:d|ll|m|re|s|t|ve))?",$0="(?:"+df+"(?:D|LL|M|RE|S|T|VE))?",L0=$z+"?",z0="["+A0+"]?",zz="(?:"+R0+"(?:"+[D0,hf,pf].join("|")+")"+z0+L0+")*",Vz="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Uz="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",V0=z0+L0+zz,Bz="(?:"+[Fz,hf,pf].join("|")+")"+V0,Hz="(?:"+[D0+bl+"?",bl,hf,pf,Mz].join("|")+")",Wz=RegExp(df,"g"),Gz=RegExp(bl,"g"),gf=RegExp(ff+"(?="+ff+")|"+Hz+V0,"g"),jz=RegExp([ms+"?"+N0+"+"+F0+"(?="+[T0,ms,"$"].join("|")+")",Lz+"+"+$0+"(?="+[T0,ms+M0,"$"].join("|")+")",ms+"?"+M0+"+"+F0,ms+"+"+$0,Uz,Vz,I0,Bz].join("|"),"g"),qz=RegExp("["+R0+wl+x0+A0+"]"),Zz=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Kz=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Jz=-1,lt={};lt[qe]=lt[it]=lt[ln]=lt[It]=lt[ko]=lt[Ar]=lt[mr]=lt[Qr]=lt[Xr]=!0,lt[_e]=lt[Ee]=lt[we]=lt[ye]=lt[Ge]=lt[Pe]=lt[$e]=lt[We]=lt[et]=lt[an]=lt[vt]=lt[gr]=lt[I]=lt[M]=lt[re]=!1;var at={};at[_e]=at[Ee]=at[we]=at[Ge]=at[ye]=at[Pe]=at[qe]=at[it]=at[ln]=at[It]=at[ko]=at[et]=at[an]=at[vt]=at[gr]=at[I]=at[M]=at[U]=at[Ar]=at[mr]=at[Qr]=at[Xr]=!0,at[$e]=at[We]=at[re]=!1;var Yz={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Qz={"&":"&","<":"<",">":">",'"':""","'":"'"},Xz={"&":"&","<":"<",">":">",""":'"',"'":"'"},eV={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tV=parseFloat,nV=parseInt,U0=typeof Yi=="object"&&Yi&&Yi.Object===Object&&Yi,rV=typeof self=="object"&&self&&self.Object===Object&&self,Lt=U0||rV||Function("return this")(),mf=t&&!t.nodeType&&t,Ro=mf&&!0&&e&&!e.nodeType&&e,B0=Ro&&Ro.exports===mf,vf=B0&&U0.process,Dn=(function(){try{var R=Ro&&Ro.require&&Ro.require("util").types;return R||vf&&vf.binding&&vf.binding("util")}catch{}})(),H0=Dn&&Dn.isArrayBuffer,W0=Dn&&Dn.isDate,G0=Dn&&Dn.isMap,j0=Dn&&Dn.isRegExp,q0=Dn&&Dn.isSet,Z0=Dn&&Dn.isTypedArray;function _n(R,W,B){switch(B.length){case 0:return R.call(W);case 1:return R.call(W,B[0]);case 2:return R.call(W,B[0],B[1]);case 3:return R.call(W,B[0],B[1],B[2])}return R.apply(W,B)}function oV(R,W,B,pe){for(var Me=-1,Xe=R==null?0:R.length;++Me<Xe;){var kt=R[Me];W(pe,kt,B(kt),R)}return pe}function Rn(R,W){for(var B=-1,pe=R==null?0:R.length;++B<pe&&W(R[B],B,R)!==!1;);return R}function sV(R,W){for(var B=R==null?0:R.length;B--&&W(R[B],B,R)!==!1;);return R}function K0(R,W){for(var B=-1,pe=R==null?0:R.length;++B<pe;)if(!W(R[B],B,R))return!1;return!0}function to(R,W){for(var B=-1,pe=R==null?0:R.length,Me=0,Xe=[];++B<pe;){var kt=R[B];W(kt,B,R)&&(Xe[Me++]=kt)}return Xe}function _l(R,W){var B=R==null?0:R.length;return!!B&&vs(R,W,0)>-1}function yf(R,W,B){for(var pe=-1,Me=R==null?0:R.length;++pe<Me;)if(B(W,R[pe]))return!0;return!1}function ft(R,W){for(var B=-1,pe=R==null?0:R.length,Me=Array(pe);++B<pe;)Me[B]=W(R[B],B,R);return Me}function no(R,W){for(var B=-1,pe=W.length,Me=R.length;++B<pe;)R[Me+B]=W[B];return R}function wf(R,W,B,pe){var Me=-1,Xe=R==null?0:R.length;for(pe&&Xe&&(B=R[++Me]);++Me<Xe;)B=W(B,R[Me],Me,R);return B}function iV(R,W,B,pe){var Me=R==null?0:R.length;for(pe&&Me&&(B=R[--Me]);Me--;)B=W(B,R[Me],Me,R);return B}function bf(R,W){for(var B=-1,pe=R==null?0:R.length;++B<pe;)if(W(R[B],B,R))return!0;return!1}var aV=_f("length");function lV(R){return R.split("")}function cV(R){return R.match(vz)||[]}function J0(R,W,B){var pe;return B(R,function(Me,Xe,kt){if(W(Me,Xe,kt))return pe=Xe,!1}),pe}function Sl(R,W,B,pe){for(var Me=R.length,Xe=B+(pe?1:-1);pe?Xe--:++Xe<Me;)if(W(R[Xe],Xe,R))return Xe;return-1}function vs(R,W,B){return W===W?_V(R,W,B):Sl(R,Y0,B)}function uV(R,W,B,pe){for(var Me=B-1,Xe=R.length;++Me<Xe;)if(pe(R[Me],W))return Me;return-1}function Y0(R){return R!==R}function Q0(R,W){var B=R==null?0:R.length;return B?xf(R,W)/B:Y}function _f(R){return function(W){return W==null?n:W[R]}}function Sf(R){return function(W){return R==null?n:R[W]}}function X0(R,W,B,pe,Me){return Me(R,function(Xe,kt,st){B=pe?(pe=!1,Xe):W(B,Xe,kt,st)}),B}function dV(R,W){var B=R.length;for(R.sort(W);B--;)R[B]=R[B].value;return R}function xf(R,W){for(var B,pe=-1,Me=R.length;++pe<Me;){var Xe=W(R[pe]);Xe!==n&&(B=B===n?Xe:B+Xe)}return B}function Cf(R,W){for(var B=-1,pe=Array(R);++B<R;)pe[B]=W(B);return pe}function fV(R,W){return ft(W,function(B){return[B,R[B]]})}function e_(R){return R&&R.slice(0,o_(R)+1).replace(Yt,"")}function Sn(R){return function(W){return R(W)}}function Ef(R,W){return ft(W,function(B){return R[B]})}function mi(R,W){return R.has(W)}function t_(R,W){for(var B=-1,pe=R.length;++B<pe&&vs(W,R[B],0)>-1;);return B}function n_(R,W){for(var B=R.length;B--&&vs(W,R[B],0)>-1;);return B}function hV(R,W){for(var B=R.length,pe=0;B--;)R[B]===W&&++pe;return pe}var pV=Sf(Yz),gV=Sf(Qz);function mV(R){return"\\"+eV[R]}function vV(R,W){return R==null?n:R[W]}function ys(R){return qz.test(R)}function yV(R){return Zz.test(R)}function wV(R){for(var W,B=[];!(W=R.next()).done;)B.push(W.value);return B}function Pf(R){var W=-1,B=Array(R.size);return R.forEach(function(pe,Me){B[++W]=[Me,pe]}),B}function r_(R,W){return function(B){return R(W(B))}}function ro(R,W){for(var B=-1,pe=R.length,Me=0,Xe=[];++B<pe;){var kt=R[B];(kt===W||kt===p)&&(R[B]=p,Xe[Me++]=B)}return Xe}function xl(R){var W=-1,B=Array(R.size);return R.forEach(function(pe){B[++W]=pe}),B}function bV(R){var W=-1,B=Array(R.size);return R.forEach(function(pe){B[++W]=[pe,pe]}),B}function _V(R,W,B){for(var pe=B-1,Me=R.length;++pe<Me;)if(R[pe]===W)return pe;return-1}function SV(R,W,B){for(var pe=B+1;pe--;)if(R[pe]===W)return pe;return pe}function ws(R){return ys(R)?CV(R):aV(R)}function or(R){return ys(R)?EV(R):lV(R)}function o_(R){for(var W=R.length;W--&&vl.test(R.charAt(W)););return W}var xV=Sf(Xz);function CV(R){for(var W=gf.lastIndex=0;gf.test(R);)++W;return W}function EV(R){return R.match(gf)||[]}function PV(R){return R.match(jz)||[]}var AV=(function R(W){W=W==null?Lt:bs.defaults(Lt.Object(),W,bs.pick(Lt,Kz));var B=W.Array,pe=W.Date,Me=W.Error,Xe=W.Function,kt=W.Math,st=W.Object,Af=W.RegExp,OV=W.String,Mn=W.TypeError,Cl=B.prototype,TV=Xe.prototype,_s=st.prototype,El=W["__core-js_shared__"],Pl=TV.toString,tt=_s.hasOwnProperty,IV=0,s_=(function(){var s=/[^.]+$/.exec(El&&El.keys&&El.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""})(),Al=_s.toString,NV=Pl.call(st),kV=Lt._,DV=Af("^"+Pl.call(tt).replace(eo,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ol=B0?W.Buffer:n,oo=W.Symbol,Tl=W.Uint8Array,i_=Ol?Ol.allocUnsafe:n,Il=r_(st.getPrototypeOf,st),a_=st.create,l_=_s.propertyIsEnumerable,Nl=Cl.splice,c_=oo?oo.isConcatSpreadable:n,vi=oo?oo.iterator:n,Mo=oo?oo.toStringTag:n,kl=(function(){try{var s=Vo(st,"defineProperty");return s({},"",{}),s}catch{}})(),RV=W.clearTimeout!==Lt.clearTimeout&&W.clearTimeout,MV=pe&&pe.now!==Lt.Date.now&&pe.now,FV=W.setTimeout!==Lt.setTimeout&&W.setTimeout,Dl=kt.ceil,Rl=kt.floor,Of=st.getOwnPropertySymbols,$V=Ol?Ol.isBuffer:n,u_=W.isFinite,LV=Cl.join,zV=r_(st.keys,st),Dt=kt.max,Wt=kt.min,VV=pe.now,UV=W.parseInt,d_=kt.random,BV=Cl.reverse,Tf=Vo(W,"DataView"),yi=Vo(W,"Map"),If=Vo(W,"Promise"),Ss=Vo(W,"Set"),wi=Vo(W,"WeakMap"),bi=Vo(st,"create"),Ml=wi&&new wi,xs={},HV=Uo(Tf),WV=Uo(yi),GV=Uo(If),jV=Uo(Ss),qV=Uo(wi),Fl=oo?oo.prototype:n,_i=Fl?Fl.valueOf:n,f_=Fl?Fl.toString:n;function C(s){if(mt(s)&&!ze(s)&&!(s instanceof Ke)){if(s instanceof Fn)return s;if(tt.call(s,"__wrapped__"))return hS(s)}return new Fn(s)}var Cs=(function(){function s(){}return function(a){if(!gt(a))return{};if(a_)return a_(a);s.prototype=a;var u=new s;return s.prototype=n,u}})();function $l(){}function Fn(s,a){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=n}C.templateSettings={escape:Ct,evaluate:Mt,interpolate:Ht,variable:"",imports:{_:C}},C.prototype=$l.prototype,C.prototype.constructor=C,Fn.prototype=Cs($l.prototype),Fn.prototype.constructor=Fn;function Ke(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Te,this.__views__=[]}function ZV(){var s=new Ke(this.__wrapped__);return s.__actions__=un(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=un(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=un(this.__views__),s}function KV(){if(this.__filtered__){var s=new Ke(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function JV(){var s=this.__wrapped__.value(),a=this.__dir__,u=ze(s),m=a<0,S=u?s.length:0,P=lB(0,S,this.__views__),T=P.start,k=P.end,F=k-T,G=m?k:T-1,j=this.__iteratees__,K=j.length,de=0,Se=Wt(F,this.__takeCount__);if(!u||!m&&S==F&&Se==F)return F_(s,this.__actions__);var Ae=[];e:for(;F--&&de<Se;){G+=a;for(var Ue=-1,Oe=s[G];++Ue<K;){var Ze=j[Ue],Je=Ze.iteratee,En=Ze.type,en=Je(Oe);if(En==he)Oe=en;else if(!en){if(En==ie)continue e;break e}}Ae[de++]=Oe}return Ae}Ke.prototype=Cs($l.prototype),Ke.prototype.constructor=Ke;function Fo(s){var a=-1,u=s==null?0:s.length;for(this.clear();++a<u;){var m=s[a];this.set(m[0],m[1])}}function YV(){this.__data__=bi?bi(null):{},this.size=0}function QV(s){var a=this.has(s)&&delete this.__data__[s];return this.size-=a?1:0,a}function XV(s){var a=this.__data__;if(bi){var u=a[s];return u===d?n:u}return tt.call(a,s)?a[s]:n}function eU(s){var a=this.__data__;return bi?a[s]!==n:tt.call(a,s)}function tU(s,a){var u=this.__data__;return this.size+=this.has(s)?0:1,u[s]=bi&&a===n?d:a,this}Fo.prototype.clear=YV,Fo.prototype.delete=QV,Fo.prototype.get=XV,Fo.prototype.has=eU,Fo.prototype.set=tU;function Tr(s){var a=-1,u=s==null?0:s.length;for(this.clear();++a<u;){var m=s[a];this.set(m[0],m[1])}}function nU(){this.__data__=[],this.size=0}function rU(s){var a=this.__data__,u=Ll(a,s);if(u<0)return!1;var m=a.length-1;return u==m?a.pop():Nl.call(a,u,1),--this.size,!0}function oU(s){var a=this.__data__,u=Ll(a,s);return u<0?n:a[u][1]}function sU(s){return Ll(this.__data__,s)>-1}function iU(s,a){var u=this.__data__,m=Ll(u,s);return m<0?(++this.size,u.push([s,a])):u[m][1]=a,this}Tr.prototype.clear=nU,Tr.prototype.delete=rU,Tr.prototype.get=oU,Tr.prototype.has=sU,Tr.prototype.set=iU;function Ir(s){var a=-1,u=s==null?0:s.length;for(this.clear();++a<u;){var m=s[a];this.set(m[0],m[1])}}function aU(){this.size=0,this.__data__={hash:new Fo,map:new(yi||Tr),string:new Fo}}function lU(s){var a=Jl(this,s).delete(s);return this.size-=a?1:0,a}function cU(s){return Jl(this,s).get(s)}function uU(s){return Jl(this,s).has(s)}function dU(s,a){var u=Jl(this,s),m=u.size;return u.set(s,a),this.size+=u.size==m?0:1,this}Ir.prototype.clear=aU,Ir.prototype.delete=lU,Ir.prototype.get=cU,Ir.prototype.has=uU,Ir.prototype.set=dU;function $o(s){var a=-1,u=s==null?0:s.length;for(this.__data__=new Ir;++a<u;)this.add(s[a])}function fU(s){return this.__data__.set(s,d),this}function hU(s){return this.__data__.has(s)}$o.prototype.add=$o.prototype.push=fU,$o.prototype.has=hU;function sr(s){var a=this.__data__=new Tr(s);this.size=a.size}function pU(){this.__data__=new Tr,this.size=0}function gU(s){var a=this.__data__,u=a.delete(s);return this.size=a.size,u}function mU(s){return this.__data__.get(s)}function vU(s){return this.__data__.has(s)}function yU(s,a){var u=this.__data__;if(u instanceof Tr){var m=u.__data__;if(!yi||m.length<o-1)return m.push([s,a]),this.size=++u.size,this;u=this.__data__=new Ir(m)}return u.set(s,a),this.size=u.size,this}sr.prototype.clear=pU,sr.prototype.delete=gU,sr.prototype.get=mU,sr.prototype.has=vU,sr.prototype.set=yU;function h_(s,a){var u=ze(s),m=!u&&Bo(s),S=!u&&!m&&co(s),P=!u&&!m&&!S&&Os(s),T=u||m||S||P,k=T?Cf(s.length,OV):[],F=k.length;for(var G in s)(a||tt.call(s,G))&&!(T&&(G=="length"||S&&(G=="offset"||G=="parent")||P&&(G=="buffer"||G=="byteLength"||G=="byteOffset")||Rr(G,F)))&&k.push(G);return k}function p_(s){var a=s.length;return a?s[Uf(0,a-1)]:n}function wU(s,a){return Yl(un(s),Lo(a,0,s.length))}function bU(s){return Yl(un(s))}function Nf(s,a,u){(u!==n&&!ir(s[a],u)||u===n&&!(a in s))&&Nr(s,a,u)}function Si(s,a,u){var m=s[a];(!(tt.call(s,a)&&ir(m,u))||u===n&&!(a in s))&&Nr(s,a,u)}function Ll(s,a){for(var u=s.length;u--;)if(ir(s[u][0],a))return u;return-1}function _U(s,a,u,m){return so(s,function(S,P,T){a(m,S,u(S),T)}),m}function g_(s,a){return s&&yr(a,Ft(a),s)}function SU(s,a){return s&&yr(a,fn(a),s)}function Nr(s,a,u){a=="__proto__"&&kl?kl(s,a,{configurable:!0,enumerable:!0,value:u,writable:!0}):s[a]=u}function kf(s,a){for(var u=-1,m=a.length,S=B(m),P=s==null;++u<m;)S[u]=P?n:fh(s,a[u]);return S}function Lo(s,a,u){return s===s&&(u!==n&&(s=s<=u?s:u),a!==n&&(s=s>=a?s:a)),s}function $n(s,a,u,m,S,P){var T,k=a&h,F=a&y,G=a&w;if(u&&(T=S?u(s,m,S,P):u(s)),T!==n)return T;if(!gt(s))return s;var j=ze(s);if(j){if(T=uB(s),!k)return un(s,T)}else{var K=Gt(s),de=K==We||K==dt;if(co(s))return z_(s,k);if(K==vt||K==_e||de&&!S){if(T=F||de?{}:oS(s),!k)return F?XU(s,SU(T,s)):QU(s,g_(T,s))}else{if(!at[K])return S?s:{};T=dB(s,K,k)}}P||(P=new sr);var Se=P.get(s);if(Se)return Se;P.set(s,T),DS(s)?s.forEach(function(Oe){T.add($n(Oe,a,u,Oe,s,P))}):NS(s)&&s.forEach(function(Oe,Ze){T.set(Ze,$n(Oe,a,u,Ze,s,P))});var Ae=G?F?Qf:Yf:F?fn:Ft,Ue=j?n:Ae(s);return Rn(Ue||s,function(Oe,Ze){Ue&&(Ze=Oe,Oe=s[Ze]),Si(T,Ze,$n(Oe,a,u,Ze,s,P))}),T}function xU(s){var a=Ft(s);return function(u){return m_(u,s,a)}}function m_(s,a,u){var m=u.length;if(s==null)return!m;for(s=st(s);m--;){var S=u[m],P=a[S],T=s[S];if(T===n&&!(S in s)||!P(T))return!1}return!0}function v_(s,a,u){if(typeof s!="function")throw new Mn(l);return Ti(function(){s.apply(n,u)},a)}function xi(s,a,u,m){var S=-1,P=_l,T=!0,k=s.length,F=[],G=a.length;if(!k)return F;u&&(a=ft(a,Sn(u))),m?(P=yf,T=!1):a.length>=o&&(P=mi,T=!1,a=new $o(a));e:for(;++S<k;){var j=s[S],K=u==null?j:u(j);if(j=m||j!==0?j:0,T&&K===K){for(var de=G;de--;)if(a[de]===K)continue e;F.push(j)}else P(a,K,m)||F.push(j)}return F}var so=W_(vr),y_=W_(Rf,!0);function CU(s,a){var u=!0;return so(s,function(m,S,P){return u=!!a(m,S,P),u}),u}function zl(s,a,u){for(var m=-1,S=s.length;++m<S;){var P=s[m],T=a(P);if(T!=null&&(k===n?T===T&&!Cn(T):u(T,k)))var k=T,F=P}return F}function EU(s,a,u,m){var S=s.length;for(u=Ve(u),u<0&&(u=-u>S?0:S+u),m=m===n||m>S?S:Ve(m),m<0&&(m+=S),m=u>m?0:MS(m);u<m;)s[u++]=a;return s}function w_(s,a){var u=[];return so(s,function(m,S,P){a(m,S,P)&&u.push(m)}),u}function zt(s,a,u,m,S){var P=-1,T=s.length;for(u||(u=hB),S||(S=[]);++P<T;){var k=s[P];a>0&&u(k)?a>1?zt(k,a-1,u,m,S):no(S,k):m||(S[S.length]=k)}return S}var Df=G_(),b_=G_(!0);function vr(s,a){return s&&Df(s,a,Ft)}function Rf(s,a){return s&&b_(s,a,Ft)}function Vl(s,a){return to(a,function(u){return Mr(s[u])})}function zo(s,a){a=ao(a,s);for(var u=0,m=a.length;s!=null&&u<m;)s=s[wr(a[u++])];return u&&u==m?s:n}function __(s,a,u){var m=a(s);return ze(s)?m:no(m,u(s))}function Qt(s){return s==null?s===n?fe:rr:Mo&&Mo in st(s)?aB(s):bB(s)}function Mf(s,a){return s>a}function PU(s,a){return s!=null&&tt.call(s,a)}function AU(s,a){return s!=null&&a in st(s)}function OU(s,a,u){return s>=Wt(a,u)&&s<Dt(a,u)}function Ff(s,a,u){for(var m=u?yf:_l,S=s[0].length,P=s.length,T=P,k=B(P),F=1/0,G=[];T--;){var j=s[T];T&&a&&(j=ft(j,Sn(a))),F=Wt(j.length,F),k[T]=!u&&(a||S>=120&&j.length>=120)?new $o(T&&j):n}j=s[0];var K=-1,de=k[0];e:for(;++K<S&&G.length<F;){var Se=j[K],Ae=a?a(Se):Se;if(Se=u||Se!==0?Se:0,!(de?mi(de,Ae):m(G,Ae,u))){for(T=P;--T;){var Ue=k[T];if(!(Ue?mi(Ue,Ae):m(s[T],Ae,u)))continue e}de&&de.push(Ae),G.push(Se)}}return G}function TU(s,a,u,m){return vr(s,function(S,P,T){a(m,u(S),P,T)}),m}function Ci(s,a,u){a=ao(a,s),s=lS(s,a);var m=s==null?s:s[wr(zn(a))];return m==null?n:_n(m,s,u)}function S_(s){return mt(s)&&Qt(s)==_e}function IU(s){return mt(s)&&Qt(s)==we}function NU(s){return mt(s)&&Qt(s)==Pe}function Ei(s,a,u,m,S){return s===a?!0:s==null||a==null||!mt(s)&&!mt(a)?s!==s&&a!==a:kU(s,a,u,m,Ei,S)}function kU(s,a,u,m,S,P){var T=ze(s),k=ze(a),F=T?Ee:Gt(s),G=k?Ee:Gt(a);F=F==_e?vt:F,G=G==_e?vt:G;var j=F==vt,K=G==vt,de=F==G;if(de&&co(s)){if(!co(a))return!1;T=!0,j=!1}if(de&&!j)return P||(P=new sr),T||Os(s)?tS(s,a,u,m,S,P):sB(s,a,F,u,m,S,P);if(!(u&b)){var Se=j&&tt.call(s,"__wrapped__"),Ae=K&&tt.call(a,"__wrapped__");if(Se||Ae){var Ue=Se?s.value():s,Oe=Ae?a.value():a;return P||(P=new sr),S(Ue,Oe,u,m,P)}}return de?(P||(P=new sr),iB(s,a,u,m,S,P)):!1}function DU(s){return mt(s)&&Gt(s)==et}function $f(s,a,u,m){var S=u.length,P=S,T=!m;if(s==null)return!P;for(s=st(s);S--;){var k=u[S];if(T&&k[2]?k[1]!==s[k[0]]:!(k[0]in s))return!1}for(;++S<P;){k=u[S];var F=k[0],G=s[F],j=k[1];if(T&&k[2]){if(G===n&&!(F in s))return!1}else{var K=new sr;if(m)var de=m(G,j,F,s,a,K);if(!(de===n?Ei(j,G,b|_,m,K):de))return!1}}return!0}function x_(s){if(!gt(s)||gB(s))return!1;var a=Mr(s)?DV:xz;return a.test(Uo(s))}function RU(s){return mt(s)&&Qt(s)==gr}function MU(s){return mt(s)&&Gt(s)==I}function FU(s){return mt(s)&&rc(s.length)&&!!lt[Qt(s)]}function C_(s){return typeof s=="function"?s:s==null?hn:typeof s=="object"?ze(s)?A_(s[0],s[1]):P_(s):jS(s)}function Lf(s){if(!Oi(s))return zV(s);var a=[];for(var u in st(s))tt.call(s,u)&&u!="constructor"&&a.push(u);return a}function $U(s){if(!gt(s))return wB(s);var a=Oi(s),u=[];for(var m in s)m=="constructor"&&(a||!tt.call(s,m))||u.push(m);return u}function zf(s,a){return s<a}function E_(s,a){var u=-1,m=dn(s)?B(s.length):[];return so(s,function(S,P,T){m[++u]=a(S,P,T)}),m}function P_(s){var a=eh(s);return a.length==1&&a[0][2]?iS(a[0][0],a[0][1]):function(u){return u===s||$f(u,s,a)}}function A_(s,a){return nh(s)&&sS(a)?iS(wr(s),a):function(u){var m=fh(u,s);return m===n&&m===a?hh(u,s):Ei(a,m,b|_)}}function Ul(s,a,u,m,S){s!==a&&Df(a,function(P,T){if(S||(S=new sr),gt(P))LU(s,a,T,u,Ul,m,S);else{var k=m?m(oh(s,T),P,T+"",s,a,S):n;k===n&&(k=P),Nf(s,T,k)}},fn)}function LU(s,a,u,m,S,P,T){var k=oh(s,u),F=oh(a,u),G=T.get(F);if(G){Nf(s,u,G);return}var j=P?P(k,F,u+"",s,a,T):n,K=j===n;if(K){var de=ze(F),Se=!de&&co(F),Ae=!de&&!Se&&Os(F);j=F,de||Se||Ae?ze(k)?j=k:yt(k)?j=un(k):Se?(K=!1,j=z_(F,!0)):Ae?(K=!1,j=V_(F,!0)):j=[]:Ii(F)||Bo(F)?(j=k,Bo(k)?j=FS(k):(!gt(k)||Mr(k))&&(j=oS(F))):K=!1}K&&(T.set(F,j),S(j,F,m,P,T),T.delete(F)),Nf(s,u,j)}function O_(s,a){var u=s.length;if(u)return a+=a<0?u:0,Rr(a,u)?s[a]:n}function T_(s,a,u){a.length?a=ft(a,function(P){return ze(P)?function(T){return zo(T,P.length===1?P[0]:P)}:P}):a=[hn];var m=-1;a=ft(a,Sn(Ce()));var S=E_(s,function(P,T,k){var F=ft(a,function(G){return G(P)});return{criteria:F,index:++m,value:P}});return dV(S,function(P,T){return YU(P,T,u)})}function zU(s,a){return I_(s,a,function(u,m){return hh(s,m)})}function I_(s,a,u){for(var m=-1,S=a.length,P={};++m<S;){var T=a[m],k=zo(s,T);u(k,T)&&Pi(P,ao(T,s),k)}return P}function VU(s){return function(a){return zo(a,s)}}function Vf(s,a,u,m){var S=m?uV:vs,P=-1,T=a.length,k=s;for(s===a&&(a=un(a)),u&&(k=ft(s,Sn(u)));++P<T;)for(var F=0,G=a[P],j=u?u(G):G;(F=S(k,j,F,m))>-1;)k!==s&&Nl.call(k,F,1),Nl.call(s,F,1);return s}function N_(s,a){for(var u=s?a.length:0,m=u-1;u--;){var S=a[u];if(u==m||S!==P){var P=S;Rr(S)?Nl.call(s,S,1):Wf(s,S)}}return s}function Uf(s,a){return s+Rl(d_()*(a-s+1))}function UU(s,a,u,m){for(var S=-1,P=Dt(Dl((a-s)/(u||1)),0),T=B(P);P--;)T[m?P:++S]=s,s+=u;return T}function Bf(s,a){var u="";if(!s||a<1||a>ne)return u;do a%2&&(u+=s),a=Rl(a/2),a&&(s+=s);while(a);return u}function je(s,a){return sh(aS(s,a,hn),s+"")}function BU(s){return p_(Ts(s))}function HU(s,a){var u=Ts(s);return Yl(u,Lo(a,0,u.length))}function Pi(s,a,u,m){if(!gt(s))return s;a=ao(a,s);for(var S=-1,P=a.length,T=P-1,k=s;k!=null&&++S<P;){var F=wr(a[S]),G=u;if(F==="__proto__"||F==="constructor"||F==="prototype")return s;if(S!=T){var j=k[F];G=m?m(j,F,k):n,G===n&&(G=gt(j)?j:Rr(a[S+1])?[]:{})}Si(k,F,G),k=k[F]}return s}var k_=Ml?function(s,a){return Ml.set(s,a),s}:hn,WU=kl?function(s,a){return kl(s,"toString",{configurable:!0,enumerable:!1,value:gh(a),writable:!0})}:hn;function GU(s){return Yl(Ts(s))}function Ln(s,a,u){var m=-1,S=s.length;a<0&&(a=-a>S?0:S+a),u=u>S?S:u,u<0&&(u+=S),S=a>u?0:u-a>>>0,a>>>=0;for(var P=B(S);++m<S;)P[m]=s[m+a];return P}function jU(s,a){var u;return so(s,function(m,S,P){return u=a(m,S,P),!u}),!!u}function Bl(s,a,u){var m=0,S=s==null?m:s.length;if(typeof a=="number"&&a===a&&S<=xe){for(;m<S;){var P=m+S>>>1,T=s[P];T!==null&&!Cn(T)&&(u?T<=a:T<a)?m=P+1:S=P}return S}return Hf(s,a,hn,u)}function Hf(s,a,u,m){var S=0,P=s==null?0:s.length;if(P===0)return 0;a=u(a);for(var T=a!==a,k=a===null,F=Cn(a),G=a===n;S<P;){var j=Rl((S+P)/2),K=u(s[j]),de=K!==n,Se=K===null,Ae=K===K,Ue=Cn(K);if(T)var Oe=m||Ae;else G?Oe=Ae&&(m||de):k?Oe=Ae&&de&&(m||!Se):F?Oe=Ae&&de&&!Se&&(m||!Ue):Se||Ue?Oe=!1:Oe=m?K<=a:K<a;Oe?S=j+1:P=j}return Wt(P,Qe)}function D_(s,a){for(var u=-1,m=s.length,S=0,P=[];++u<m;){var T=s[u],k=a?a(T):T;if(!u||!ir(k,F)){var F=k;P[S++]=T===0?0:T}}return P}function R_(s){return typeof s=="number"?s:Cn(s)?Y:+s}function xn(s){if(typeof s=="string")return s;if(ze(s))return ft(s,xn)+"";if(Cn(s))return f_?f_.call(s):"";var a=s+"";return a=="0"&&1/s==-se?"-0":a}function io(s,a,u){var m=-1,S=_l,P=s.length,T=!0,k=[],F=k;if(u)T=!1,S=yf;else if(P>=o){var G=a?null:rB(s);if(G)return xl(G);T=!1,S=mi,F=new $o}else F=a?[]:k;e:for(;++m<P;){var j=s[m],K=a?a(j):j;if(j=u||j!==0?j:0,T&&K===K){for(var de=F.length;de--;)if(F[de]===K)continue e;a&&F.push(K),k.push(j)}else S(F,K,u)||(F!==k&&F.push(K),k.push(j))}return k}function Wf(s,a){a=ao(a,s);var u=-1,m=a.length;if(!m)return!0;for(var S=s==null||typeof s!="object"&&typeof s!="function";++u<m;){var P=a[u];if(typeof P=="string"){if(P==="__proto__"&&!tt.call(s,"__proto__"))return!1;if(P==="constructor"&&u+1<m&&typeof a[u+1]=="string"&&a[u+1]==="prototype"){if(S&&u===0)continue;return!1}}}var T=lS(s,a);return T==null||delete T[wr(zn(a))]}function M_(s,a,u,m){return Pi(s,a,u(zo(s,a)),m)}function Hl(s,a,u,m){for(var S=s.length,P=m?S:-1;(m?P--:++P<S)&&a(s[P],P,s););return u?Ln(s,m?0:P,m?P+1:S):Ln(s,m?P+1:0,m?S:P)}function F_(s,a){var u=s;return u instanceof Ke&&(u=u.value()),wf(a,function(m,S){return S.func.apply(S.thisArg,no([m],S.args))},u)}function Gf(s,a,u){var m=s.length;if(m<2)return m?io(s[0]):[];for(var S=-1,P=B(m);++S<m;)for(var T=s[S],k=-1;++k<m;)k!=S&&(P[S]=xi(P[S]||T,s[k],a,u));return io(zt(P,1),a,u)}function $_(s,a,u){for(var m=-1,S=s.length,P=a.length,T={};++m<S;){var k=m<P?a[m]:n;u(T,s[m],k)}return T}function jf(s){return yt(s)?s:[]}function qf(s){return typeof s=="function"?s:hn}function ao(s,a){return ze(s)?s:nh(s,a)?[s]:fS(nt(s))}var qU=je;function lo(s,a,u){var m=s.length;return u=u===n?m:u,!a&&u>=m?s:Ln(s,a,u)}var L_=RV||function(s){return Lt.clearTimeout(s)};function z_(s,a){if(a)return s.slice();var u=s.length,m=i_?i_(u):new s.constructor(u);return s.copy(m),m}function Zf(s){var a=new s.constructor(s.byteLength);return new Tl(a).set(new Tl(s)),a}function ZU(s,a){var u=a?Zf(s.buffer):s.buffer;return new s.constructor(u,s.byteOffset,s.byteLength)}function KU(s){var a=new s.constructor(s.source,S0.exec(s));return a.lastIndex=s.lastIndex,a}function JU(s){return _i?st(_i.call(s)):{}}function V_(s,a){var u=a?Zf(s.buffer):s.buffer;return new s.constructor(u,s.byteOffset,s.length)}function U_(s,a){if(s!==a){var u=s!==n,m=s===null,S=s===s,P=Cn(s),T=a!==n,k=a===null,F=a===a,G=Cn(a);if(!k&&!G&&!P&&s>a||P&&T&&F&&!k&&!G||m&&T&&F||!u&&F||!S)return 1;if(!m&&!P&&!G&&s<a||G&&u&&S&&!m&&!P||k&&u&&S||!T&&S||!F)return-1}return 0}function YU(s,a,u){for(var m=-1,S=s.criteria,P=a.criteria,T=S.length,k=u.length;++m<T;){var F=U_(S[m],P[m]);if(F){if(m>=k)return F;var G=u[m];return F*(G=="desc"?-1:1)}}return s.index-a.index}function B_(s,a,u,m){for(var S=-1,P=s.length,T=u.length,k=-1,F=a.length,G=Dt(P-T,0),j=B(F+G),K=!m;++k<F;)j[k]=a[k];for(;++S<T;)(K||S<P)&&(j[u[S]]=s[S]);for(;G--;)j[k++]=s[S++];return j}function H_(s,a,u,m){for(var S=-1,P=s.length,T=-1,k=u.length,F=-1,G=a.length,j=Dt(P-k,0),K=B(j+G),de=!m;++S<j;)K[S]=s[S];for(var Se=S;++F<G;)K[Se+F]=a[F];for(;++T<k;)(de||S<P)&&(K[Se+u[T]]=s[S++]);return K}function un(s,a){var u=-1,m=s.length;for(a||(a=B(m));++u<m;)a[u]=s[u];return a}function yr(s,a,u,m){var S=!u;u||(u={});for(var P=-1,T=a.length;++P<T;){var k=a[P],F=m?m(u[k],s[k],k,u,s):n;F===n&&(F=s[k]),S?Nr(u,k,F):Si(u,k,F)}return u}function QU(s,a){return yr(s,th(s),a)}function XU(s,a){return yr(s,nS(s),a)}function Wl(s,a){return function(u,m){var S=ze(u)?oV:_U,P=a?a():{};return S(u,s,Ce(m,2),P)}}function Es(s){return je(function(a,u){var m=-1,S=u.length,P=S>1?u[S-1]:n,T=S>2?u[2]:n;for(P=s.length>3&&typeof P=="function"?(S--,P):n,T&&Xt(u[0],u[1],T)&&(P=S<3?n:P,S=1),a=st(a);++m<S;){var k=u[m];k&&s(a,k,m,P)}return a})}function W_(s,a){return function(u,m){if(u==null)return u;if(!dn(u))return s(u,m);for(var S=u.length,P=a?S:-1,T=st(u);(a?P--:++P<S)&&m(T[P],P,T)!==!1;);return u}}function G_(s){return function(a,u,m){for(var S=-1,P=st(a),T=m(a),k=T.length;k--;){var F=T[s?k:++S];if(u(P[F],F,P)===!1)break}return a}}function eB(s,a,u){var m=a&x,S=Ai(s);function P(){var T=this&&this!==Lt&&this instanceof P?S:s;return T.apply(m?u:this,arguments)}return P}function j_(s){return function(a){a=nt(a);var u=ys(a)?or(a):n,m=u?u[0]:a.charAt(0),S=u?lo(u,1).join(""):a.slice(1);return m[s]()+S}}function Ps(s){return function(a){return wf(WS(HS(a).replace(Wz,"")),s,"")}}function Ai(s){return function(){var a=arguments;switch(a.length){case 0:return new s;case 1:return new s(a[0]);case 2:return new s(a[0],a[1]);case 3:return new s(a[0],a[1],a[2]);case 4:return new s(a[0],a[1],a[2],a[3]);case 5:return new s(a[0],a[1],a[2],a[3],a[4]);case 6:return new s(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new s(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var u=Cs(s.prototype),m=s.apply(u,a);return gt(m)?m:u}}function tB(s,a,u){var m=Ai(s);function S(){for(var P=arguments.length,T=B(P),k=P,F=As(S);k--;)T[k]=arguments[k];var G=P<3&&T[0]!==F&&T[P-1]!==F?[]:ro(T,F);if(P-=G.length,P<u)return Y_(s,a,Gl,S.placeholder,n,T,G,n,n,u-P);var j=this&&this!==Lt&&this instanceof S?m:s;return _n(j,this,T)}return S}function q_(s){return function(a,u,m){var S=st(a);if(!dn(a)){var P=Ce(u,3);a=Ft(a),u=function(k){return P(S[k],k,S)}}var T=s(a,u,m);return T>-1?S[P?a[T]:T]:n}}function Z_(s){return Dr(function(a){var u=a.length,m=u,S=Fn.prototype.thru;for(s&&a.reverse();m--;){var P=a[m];if(typeof P!="function")throw new Mn(l);if(S&&!T&&Kl(P)=="wrapper")var T=new Fn([],!0)}for(m=T?m:u;++m<u;){P=a[m];var k=Kl(P),F=k=="wrapper"?Xf(P):n;F&&rh(F[0])&&F[1]==(z|O|D|L)&&!F[4].length&&F[9]==1?T=T[Kl(F[0])].apply(T,F[3]):T=P.length==1&&rh(P)?T[k]():T.thru(P)}return function(){var G=arguments,j=G[0];if(T&&G.length==1&&ze(j))return T.plant(j).value();for(var K=0,de=u?a[K].apply(this,G):j;++K<u;)de=a[K].call(this,de);return de}})}function Gl(s,a,u,m,S,P,T,k,F,G){var j=a&z,K=a&x,de=a&E,Se=a&(O|N),Ae=a&ee,Ue=de?n:Ai(s);function Oe(){for(var Ze=arguments.length,Je=B(Ze),En=Ze;En--;)Je[En]=arguments[En];if(Se)var en=As(Oe),Pn=hV(Je,en);if(m&&(Je=B_(Je,m,S,Se)),P&&(Je=H_(Je,P,T,Se)),Ze-=Pn,Se&&Ze<G){var wt=ro(Je,en);return Y_(s,a,Gl,Oe.placeholder,u,Je,wt,k,F,G-Ze)}var ar=K?u:this,$r=de?ar[s]:s;return Ze=Je.length,k?Je=_B(Je,k):Ae&&Ze>1&&Je.reverse(),j&&F<Ze&&(Je.length=F),this&&this!==Lt&&this instanceof Oe&&($r=Ue||Ai($r)),$r.apply(ar,Je)}return Oe}function K_(s,a){return function(u,m){return TU(u,s,a(m),{})}}function jl(s,a){return function(u,m){var S;if(u===n&&m===n)return a;if(u!==n&&(S=u),m!==n){if(S===n)return m;typeof u=="string"||typeof m=="string"?(u=xn(u),m=xn(m)):(u=R_(u),m=R_(m)),S=s(u,m)}return S}}function Kf(s){return Dr(function(a){return a=ft(a,Sn(Ce())),je(function(u){var m=this;return s(a,function(S){return _n(S,m,u)})})})}function ql(s,a){a=a===n?" ":xn(a);var u=a.length;if(u<2)return u?Bf(a,s):a;var m=Bf(a,Dl(s/ws(a)));return ys(a)?lo(or(m),0,s).join(""):m.slice(0,s)}function nB(s,a,u,m){var S=a&x,P=Ai(s);function T(){for(var k=-1,F=arguments.length,G=-1,j=m.length,K=B(j+F),de=this&&this!==Lt&&this instanceof T?P:s;++G<j;)K[G]=m[G];for(;F--;)K[G++]=arguments[++k];return _n(de,S?u:this,K)}return T}function J_(s){return function(a,u,m){return m&&typeof m!="number"&&Xt(a,u,m)&&(u=m=n),a=Fr(a),u===n?(u=a,a=0):u=Fr(u),m=m===n?a<u?1:-1:Fr(m),UU(a,u,m,s)}}function Zl(s){return function(a,u){return typeof a=="string"&&typeof u=="string"||(a=Vn(a),u=Vn(u)),s(a,u)}}function Y_(s,a,u,m,S,P,T,k,F,G){var j=a&O,K=j?T:n,de=j?n:T,Se=j?P:n,Ae=j?n:P;a|=j?D:H,a&=~(j?H:D),a&A||(a&=-4);var Ue=[s,a,S,Se,K,Ae,de,k,F,G],Oe=u.apply(n,Ue);return rh(s)&&cS(Oe,Ue),Oe.placeholder=m,uS(Oe,s,a)}function Jf(s){var a=kt[s];return function(u,m){if(u=Vn(u),m=m==null?0:Wt(Ve(m),292),m&&u_(u)){var S=(nt(u)+"e").split("e"),P=a(S[0]+"e"+(+S[1]+m));return S=(nt(P)+"e").split("e"),+(S[0]+"e"+(+S[1]-m))}return a(u)}}var rB=Ss&&1/xl(new Ss([,-0]))[1]==se?function(s){return new Ss(s)}:yh;function Q_(s){return function(a){var u=Gt(a);return u==et?Pf(a):u==I?bV(a):fV(a,s(a))}}function kr(s,a,u,m,S,P,T,k){var F=a&E;if(!F&&typeof s!="function")throw new Mn(l);var G=m?m.length:0;if(G||(a&=-97,m=S=n),T=T===n?T:Dt(Ve(T),0),k=k===n?k:Ve(k),G-=S?S.length:0,a&H){var j=m,K=S;m=S=n}var de=F?n:Xf(s),Se=[s,a,u,m,S,j,K,P,T,k];if(de&&yB(Se,de),s=Se[0],a=Se[1],u=Se[2],m=Se[3],S=Se[4],k=Se[9]=Se[9]===n?F?0:s.length:Dt(Se[9]-G,0),!k&&a&(O|N)&&(a&=-25),!a||a==x)var Ae=eB(s,a,u);else a==O||a==N?Ae=tB(s,a,k):(a==D||a==(x|D))&&!S.length?Ae=nB(s,a,u,m):Ae=Gl.apply(n,Se);var Ue=de?k_:cS;return uS(Ue(Ae,Se),s,a)}function X_(s,a,u,m){return s===n||ir(s,_s[u])&&!tt.call(m,u)?a:s}function eS(s,a,u,m,S,P){return gt(s)&>(a)&&(P.set(a,s),Ul(s,a,n,eS,P),P.delete(a)),s}function oB(s){return Ii(s)?n:s}function tS(s,a,u,m,S,P){var T=u&b,k=s.length,F=a.length;if(k!=F&&!(T&&F>k))return!1;var G=P.get(s),j=P.get(a);if(G&&j)return G==a&&j==s;var K=-1,de=!0,Se=u&_?new $o:n;for(P.set(s,a),P.set(a,s);++K<k;){var Ae=s[K],Ue=a[K];if(m)var Oe=T?m(Ue,Ae,K,a,s,P):m(Ae,Ue,K,s,a,P);if(Oe!==n){if(Oe)continue;de=!1;break}if(Se){if(!bf(a,function(Ze,Je){if(!mi(Se,Je)&&(Ae===Ze||S(Ae,Ze,u,m,P)))return Se.push(Je)})){de=!1;break}}else if(!(Ae===Ue||S(Ae,Ue,u,m,P))){de=!1;break}}return P.delete(s),P.delete(a),de}function sB(s,a,u,m,S,P,T){switch(u){case Ge:if(s.byteLength!=a.byteLength||s.byteOffset!=a.byteOffset)return!1;s=s.buffer,a=a.buffer;case we:return!(s.byteLength!=a.byteLength||!P(new Tl(s),new Tl(a)));case ye:case Pe:case an:return ir(+s,+a);case $e:return s.name==a.name&&s.message==a.message;case gr:case M:return s==a+"";case et:var k=Pf;case I:var F=m&b;if(k||(k=xl),s.size!=a.size&&!F)return!1;var G=T.get(s);if(G)return G==a;m|=_,T.set(s,a);var j=tS(k(s),k(a),m,S,P,T);return T.delete(s),j;case U:if(_i)return _i.call(s)==_i.call(a)}return!1}function iB(s,a,u,m,S,P){var T=u&b,k=Yf(s),F=k.length,G=Yf(a),j=G.length;if(F!=j&&!T)return!1;for(var K=F;K--;){var de=k[K];if(!(T?de in a:tt.call(a,de)))return!1}var Se=P.get(s),Ae=P.get(a);if(Se&&Ae)return Se==a&&Ae==s;var Ue=!0;P.set(s,a),P.set(a,s);for(var Oe=T;++K<F;){de=k[K];var Ze=s[de],Je=a[de];if(m)var En=T?m(Je,Ze,de,a,s,P):m(Ze,Je,de,s,a,P);if(!(En===n?Ze===Je||S(Ze,Je,u,m,P):En)){Ue=!1;break}Oe||(Oe=de=="constructor")}if(Ue&&!Oe){var en=s.constructor,Pn=a.constructor;en!=Pn&&"constructor"in s&&"constructor"in a&&!(typeof en=="function"&&en instanceof en&&typeof Pn=="function"&&Pn instanceof Pn)&&(Ue=!1)}return P.delete(s),P.delete(a),Ue}function Dr(s){return sh(aS(s,n,mS),s+"")}function Yf(s){return __(s,Ft,th)}function Qf(s){return __(s,fn,nS)}var Xf=Ml?function(s){return Ml.get(s)}:yh;function Kl(s){for(var a=s.name+"",u=xs[a],m=tt.call(xs,a)?u.length:0;m--;){var S=u[m],P=S.func;if(P==null||P==s)return S.name}return a}function As(s){var a=tt.call(C,"placeholder")?C:s;return a.placeholder}function Ce(){var s=C.iteratee||mh;return s=s===mh?C_:s,arguments.length?s(arguments[0],arguments[1]):s}function Jl(s,a){var u=s.__data__;return pB(a)?u[typeof a=="string"?"string":"hash"]:u.map}function eh(s){for(var a=Ft(s),u=a.length;u--;){var m=a[u],S=s[m];a[u]=[m,S,sS(S)]}return a}function Vo(s,a){var u=vV(s,a);return x_(u)?u:n}function aB(s){var a=tt.call(s,Mo),u=s[Mo];try{s[Mo]=n;var m=!0}catch{}var S=Al.call(s);return m&&(a?s[Mo]=u:delete s[Mo]),S}var th=Of?function(s){return s==null?[]:(s=st(s),to(Of(s),function(a){return l_.call(s,a)}))}:wh,nS=Of?function(s){for(var a=[];s;)no(a,th(s)),s=Il(s);return a}:wh,Gt=Qt;(Tf&&Gt(new Tf(new ArrayBuffer(1)))!=Ge||yi&&Gt(new yi)!=et||If&&Gt(If.resolve())!=No||Ss&&Gt(new Ss)!=I||wi&&Gt(new wi)!=re)&&(Gt=function(s){var a=Qt(s),u=a==vt?s.constructor:n,m=u?Uo(u):"";if(m)switch(m){case HV:return Ge;case WV:return et;case GV:return No;case jV:return I;case qV:return re}return a});function lB(s,a,u){for(var m=-1,S=u.length;++m<S;){var P=u[m],T=P.size;switch(P.type){case"drop":s+=T;break;case"dropRight":a-=T;break;case"take":a=Wt(a,s+T);break;case"takeRight":s=Dt(s,a-T);break}}return{start:s,end:a}}function cB(s){var a=s.match(_0);return a?a[1].split(mz):[]}function rS(s,a,u){a=ao(a,s);for(var m=-1,S=a.length,P=!1;++m<S;){var T=wr(a[m]);if(!(P=s!=null&&u(s,T)))break;s=s[T]}return P||++m!=S?P:(S=s==null?0:s.length,!!S&&rc(S)&&Rr(T,S)&&(ze(s)||Bo(s)))}function uB(s){var a=s.length,u=new s.constructor(a);return a&&typeof s[0]=="string"&&tt.call(s,"index")&&(u.index=s.index,u.input=s.input),u}function oS(s){return typeof s.constructor=="function"&&!Oi(s)?Cs(Il(s)):{}}function dB(s,a,u){var m=s.constructor;switch(a){case we:return Zf(s);case ye:case Pe:return new m(+s);case Ge:return ZU(s,u);case qe:case it:case ln:case It:case ko:case Ar:case mr:case Qr:case Xr:return V_(s,u);case et:return new m;case an:case M:return new m(s);case gr:return KU(s);case I:return new m;case U:return JU(s)}}function fB(s,a){var u=a.length;if(!u)return s;var m=u-1;return a[m]=(u>1?"& ":"")+a[m],a=a.join(u>2?", ":" "),s.replace(Or,`{
|
|
100
|
+
/* [wrapped with `+a+`] */
|
|
101
|
+
`)}function hB(s){return ze(s)||Bo(s)||!!(c_&&s&&s[c_])}function Rr(s,a){var u=typeof s;return a=a??ne,!!a&&(u=="number"||u!="symbol"&&Ez.test(s))&&s>-1&&s%1==0&&s<a}function Xt(s,a,u){if(!gt(u))return!1;var m=typeof a;return(m=="number"?dn(u)&&Rr(a,u.length):m=="string"&&a in u)?ir(u[a],s):!1}function nh(s,a){if(ze(s))return!1;var u=typeof s;return u=="number"||u=="symbol"||u=="boolean"||s==null||Cn(s)?!0:Nt.test(s)||!gs.test(s)||a!=null&&s in st(a)}function pB(s){var a=typeof s;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?s!=="__proto__":s===null}function rh(s){var a=Kl(s),u=C[a];if(typeof u!="function"||!(a in Ke.prototype))return!1;if(s===u)return!0;var m=Xf(u);return!!m&&s===m[0]}function gB(s){return!!s_&&s_ in s}var mB=El?Mr:bh;function Oi(s){var a=s&&s.constructor,u=typeof a=="function"&&a.prototype||_s;return s===u}function sS(s){return s===s&&!gt(s)}function iS(s,a){return function(u){return u==null?!1:u[s]===a&&(a!==n||s in st(u))}}function vB(s){var a=tc(s,function(m){return u.size===f&&u.clear(),m}),u=a.cache;return a}function yB(s,a){var u=s[1],m=a[1],S=u|m,P=S<(x|E|z),T=m==z&&u==O||m==z&&u==L&&s[7].length<=a[8]||m==(z|L)&&a[7].length<=a[8]&&u==O;if(!(P||T))return s;m&x&&(s[2]=a[2],S|=u&x?0:A);var k=a[3];if(k){var F=s[3];s[3]=F?B_(F,k,a[4]):k,s[4]=F?ro(s[3],p):a[4]}return k=a[5],k&&(F=s[5],s[5]=F?H_(F,k,a[6]):k,s[6]=F?ro(s[5],p):a[6]),k=a[7],k&&(s[7]=k),m&z&&(s[8]=s[8]==null?a[8]:Wt(s[8],a[8])),s[9]==null&&(s[9]=a[9]),s[0]=a[0],s[1]=S,s}function wB(s){var a=[];if(s!=null)for(var u in st(s))a.push(u);return a}function bB(s){return Al.call(s)}function aS(s,a,u){return a=Dt(a===n?s.length-1:a,0),function(){for(var m=arguments,S=-1,P=Dt(m.length-a,0),T=B(P);++S<P;)T[S]=m[a+S];S=-1;for(var k=B(a+1);++S<a;)k[S]=m[S];return k[a]=u(T),_n(s,this,k)}}function lS(s,a){return a.length<2?s:zo(s,Ln(a,0,-1))}function _B(s,a){for(var u=s.length,m=Wt(a.length,u),S=un(s);m--;){var P=a[m];s[m]=Rr(P,u)?S[P]:n}return s}function oh(s,a){if(!(a==="constructor"&&typeof s[a]=="function")&&a!="__proto__")return s[a]}var cS=dS(k_),Ti=FV||function(s,a){return Lt.setTimeout(s,a)},sh=dS(WU);function uS(s,a,u){var m=a+"";return sh(s,fB(m,SB(cB(m),u)))}function dS(s){var a=0,u=0;return function(){var m=VV(),S=Q-(m-u);if(u=m,S>0){if(++a>=J)return arguments[0]}else a=0;return s.apply(n,arguments)}}function Yl(s,a){var u=-1,m=s.length,S=m-1;for(a=a===n?m:a;++u<a;){var P=Uf(u,S),T=s[P];s[P]=s[u],s[u]=T}return s.length=a,s}var fS=vB(function(s){var a=[];return s.charCodeAt(0)===46&&a.push(""),s.replace(cn,function(u,m,S,P){a.push(S?P.replace(wz,"$1"):m||u)}),a});function wr(s){if(typeof s=="string"||Cn(s))return s;var a=s+"";return a=="0"&&1/s==-se?"-0":a}function Uo(s){if(s!=null){try{return Pl.call(s)}catch{}try{return s+""}catch{}}return""}function SB(s,a){return Rn(Ne,function(u){var m="_."+u[0];a&u[1]&&!_l(s,m)&&s.push(m)}),s.sort()}function hS(s){if(s instanceof Ke)return s.clone();var a=new Fn(s.__wrapped__,s.__chain__);return a.__actions__=un(s.__actions__),a.__index__=s.__index__,a.__values__=s.__values__,a}function xB(s,a,u){(u?Xt(s,a,u):a===n)?a=1:a=Dt(Ve(a),0);var m=s==null?0:s.length;if(!m||a<1)return[];for(var S=0,P=0,T=B(Dl(m/a));S<m;)T[P++]=Ln(s,S,S+=a);return T}function CB(s){for(var a=-1,u=s==null?0:s.length,m=0,S=[];++a<u;){var P=s[a];P&&(S[m++]=P)}return S}function EB(){var s=arguments.length;if(!s)return[];for(var a=B(s-1),u=arguments[0],m=s;m--;)a[m-1]=arguments[m];return no(ze(u)?un(u):[u],zt(a,1))}var PB=je(function(s,a){return yt(s)?xi(s,zt(a,1,yt,!0)):[]}),AB=je(function(s,a){var u=zn(a);return yt(u)&&(u=n),yt(s)?xi(s,zt(a,1,yt,!0),Ce(u,2)):[]}),OB=je(function(s,a){var u=zn(a);return yt(u)&&(u=n),yt(s)?xi(s,zt(a,1,yt,!0),n,u):[]});function TB(s,a,u){var m=s==null?0:s.length;return m?(a=u||a===n?1:Ve(a),Ln(s,a<0?0:a,m)):[]}function IB(s,a,u){var m=s==null?0:s.length;return m?(a=u||a===n?1:Ve(a),a=m-a,Ln(s,0,a<0?0:a)):[]}function NB(s,a){return s&&s.length?Hl(s,Ce(a,3),!0,!0):[]}function kB(s,a){return s&&s.length?Hl(s,Ce(a,3),!0):[]}function DB(s,a,u,m){var S=s==null?0:s.length;return S?(u&&typeof u!="number"&&Xt(s,a,u)&&(u=0,m=S),EU(s,a,u,m)):[]}function pS(s,a,u){var m=s==null?0:s.length;if(!m)return-1;var S=u==null?0:Ve(u);return S<0&&(S=Dt(m+S,0)),Sl(s,Ce(a,3),S)}function gS(s,a,u){var m=s==null?0:s.length;if(!m)return-1;var S=m-1;return u!==n&&(S=Ve(u),S=u<0?Dt(m+S,0):Wt(S,m-1)),Sl(s,Ce(a,3),S,!0)}function mS(s){var a=s==null?0:s.length;return a?zt(s,1):[]}function RB(s){var a=s==null?0:s.length;return a?zt(s,se):[]}function MB(s,a){var u=s==null?0:s.length;return u?(a=a===n?1:Ve(a),zt(s,a)):[]}function FB(s){for(var a=-1,u=s==null?0:s.length,m={};++a<u;){var S=s[a];m[S[0]]=S[1]}return m}function vS(s){return s&&s.length?s[0]:n}function $B(s,a,u){var m=s==null?0:s.length;if(!m)return-1;var S=u==null?0:Ve(u);return S<0&&(S=Dt(m+S,0)),vs(s,a,S)}function LB(s){var a=s==null?0:s.length;return a?Ln(s,0,-1):[]}var zB=je(function(s){var a=ft(s,jf);return a.length&&a[0]===s[0]?Ff(a):[]}),VB=je(function(s){var a=zn(s),u=ft(s,jf);return a===zn(u)?a=n:u.pop(),u.length&&u[0]===s[0]?Ff(u,Ce(a,2)):[]}),UB=je(function(s){var a=zn(s),u=ft(s,jf);return a=typeof a=="function"?a:n,a&&u.pop(),u.length&&u[0]===s[0]?Ff(u,n,a):[]});function BB(s,a){return s==null?"":LV.call(s,a)}function zn(s){var a=s==null?0:s.length;return a?s[a-1]:n}function HB(s,a,u){var m=s==null?0:s.length;if(!m)return-1;var S=m;return u!==n&&(S=Ve(u),S=S<0?Dt(m+S,0):Wt(S,m-1)),a===a?SV(s,a,S):Sl(s,Y0,S,!0)}function WB(s,a){return s&&s.length?O_(s,Ve(a)):n}var GB=je(yS);function yS(s,a){return s&&s.length&&a&&a.length?Vf(s,a):s}function jB(s,a,u){return s&&s.length&&a&&a.length?Vf(s,a,Ce(u,2)):s}function qB(s,a,u){return s&&s.length&&a&&a.length?Vf(s,a,n,u):s}var ZB=Dr(function(s,a){var u=s==null?0:s.length,m=kf(s,a);return N_(s,ft(a,function(S){return Rr(S,u)?+S:S}).sort(U_)),m});function KB(s,a){var u=[];if(!(s&&s.length))return u;var m=-1,S=[],P=s.length;for(a=Ce(a,3);++m<P;){var T=s[m];a(T,m,s)&&(u.push(T),S.push(m))}return N_(s,S),u}function ih(s){return s==null?s:BV.call(s)}function JB(s,a,u){var m=s==null?0:s.length;return m?(u&&typeof u!="number"&&Xt(s,a,u)?(a=0,u=m):(a=a==null?0:Ve(a),u=u===n?m:Ve(u)),Ln(s,a,u)):[]}function YB(s,a){return Bl(s,a)}function QB(s,a,u){return Hf(s,a,Ce(u,2))}function XB(s,a){var u=s==null?0:s.length;if(u){var m=Bl(s,a);if(m<u&&ir(s[m],a))return m}return-1}function e4(s,a){return Bl(s,a,!0)}function t4(s,a,u){return Hf(s,a,Ce(u,2),!0)}function n4(s,a){var u=s==null?0:s.length;if(u){var m=Bl(s,a,!0)-1;if(ir(s[m],a))return m}return-1}function r4(s){return s&&s.length?D_(s):[]}function o4(s,a){return s&&s.length?D_(s,Ce(a,2)):[]}function s4(s){var a=s==null?0:s.length;return a?Ln(s,1,a):[]}function i4(s,a,u){return s&&s.length?(a=u||a===n?1:Ve(a),Ln(s,0,a<0?0:a)):[]}function a4(s,a,u){var m=s==null?0:s.length;return m?(a=u||a===n?1:Ve(a),a=m-a,Ln(s,a<0?0:a,m)):[]}function l4(s,a){return s&&s.length?Hl(s,Ce(a,3),!1,!0):[]}function c4(s,a){return s&&s.length?Hl(s,Ce(a,3)):[]}var u4=je(function(s){return io(zt(s,1,yt,!0))}),d4=je(function(s){var a=zn(s);return yt(a)&&(a=n),io(zt(s,1,yt,!0),Ce(a,2))}),f4=je(function(s){var a=zn(s);return a=typeof a=="function"?a:n,io(zt(s,1,yt,!0),n,a)});function h4(s){return s&&s.length?io(s):[]}function p4(s,a){return s&&s.length?io(s,Ce(a,2)):[]}function g4(s,a){return a=typeof a=="function"?a:n,s&&s.length?io(s,n,a):[]}function ah(s){if(!(s&&s.length))return[];var a=0;return s=to(s,function(u){if(yt(u))return a=Dt(u.length,a),!0}),Cf(a,function(u){return ft(s,_f(u))})}function wS(s,a){if(!(s&&s.length))return[];var u=ah(s);return a==null?u:ft(u,function(m){return _n(a,n,m)})}var m4=je(function(s,a){return yt(s)?xi(s,a):[]}),v4=je(function(s){return Gf(to(s,yt))}),y4=je(function(s){var a=zn(s);return yt(a)&&(a=n),Gf(to(s,yt),Ce(a,2))}),w4=je(function(s){var a=zn(s);return a=typeof a=="function"?a:n,Gf(to(s,yt),n,a)}),b4=je(ah);function _4(s,a){return $_(s||[],a||[],Si)}function S4(s,a){return $_(s||[],a||[],Pi)}var x4=je(function(s){var a=s.length,u=a>1?s[a-1]:n;return u=typeof u=="function"?(s.pop(),u):n,wS(s,u)});function bS(s){var a=C(s);return a.__chain__=!0,a}function C4(s,a){return a(s),s}function Ql(s,a){return a(s)}var E4=Dr(function(s){var a=s.length,u=a?s[0]:0,m=this.__wrapped__,S=function(P){return kf(P,s)};return a>1||this.__actions__.length||!(m instanceof Ke)||!Rr(u)?this.thru(S):(m=m.slice(u,+u+(a?1:0)),m.__actions__.push({func:Ql,args:[S],thisArg:n}),new Fn(m,this.__chain__).thru(function(P){return a&&!P.length&&P.push(n),P}))});function P4(){return bS(this)}function A4(){return new Fn(this.value(),this.__chain__)}function O4(){this.__values__===n&&(this.__values__=RS(this.value()));var s=this.__index__>=this.__values__.length,a=s?n:this.__values__[this.__index__++];return{done:s,value:a}}function T4(){return this}function I4(s){for(var a,u=this;u instanceof $l;){var m=hS(u);m.__index__=0,m.__values__=n,a?S.__wrapped__=m:a=m;var S=m;u=u.__wrapped__}return S.__wrapped__=s,a}function N4(){var s=this.__wrapped__;if(s instanceof Ke){var a=s;return this.__actions__.length&&(a=new Ke(this)),a=a.reverse(),a.__actions__.push({func:Ql,args:[ih],thisArg:n}),new Fn(a,this.__chain__)}return this.thru(ih)}function k4(){return F_(this.__wrapped__,this.__actions__)}var D4=Wl(function(s,a,u){tt.call(s,u)?++s[u]:Nr(s,u,1)});function R4(s,a,u){var m=ze(s)?K0:CU;return u&&Xt(s,a,u)&&(a=n),m(s,Ce(a,3))}function M4(s,a){var u=ze(s)?to:w_;return u(s,Ce(a,3))}var F4=q_(pS),$4=q_(gS);function L4(s,a){return zt(Xl(s,a),1)}function z4(s,a){return zt(Xl(s,a),se)}function V4(s,a,u){return u=u===n?1:Ve(u),zt(Xl(s,a),u)}function _S(s,a){var u=ze(s)?Rn:so;return u(s,Ce(a,3))}function SS(s,a){var u=ze(s)?sV:y_;return u(s,Ce(a,3))}var U4=Wl(function(s,a,u){tt.call(s,u)?s[u].push(a):Nr(s,u,[a])});function B4(s,a,u,m){s=dn(s)?s:Ts(s),u=u&&!m?Ve(u):0;var S=s.length;return u<0&&(u=Dt(S+u,0)),oc(s)?u<=S&&s.indexOf(a,u)>-1:!!S&&vs(s,a,u)>-1}var H4=je(function(s,a,u){var m=-1,S=typeof a=="function",P=dn(s)?B(s.length):[];return so(s,function(T){P[++m]=S?_n(a,T,u):Ci(T,a,u)}),P}),W4=Wl(function(s,a,u){Nr(s,u,a)});function Xl(s,a){var u=ze(s)?ft:E_;return u(s,Ce(a,3))}function G4(s,a,u,m){return s==null?[]:(ze(a)||(a=a==null?[]:[a]),u=m?n:u,ze(u)||(u=u==null?[]:[u]),T_(s,a,u))}var j4=Wl(function(s,a,u){s[u?0:1].push(a)},function(){return[[],[]]});function q4(s,a,u){var m=ze(s)?wf:X0,S=arguments.length<3;return m(s,Ce(a,4),u,S,so)}function Z4(s,a,u){var m=ze(s)?iV:X0,S=arguments.length<3;return m(s,Ce(a,4),u,S,y_)}function K4(s,a){var u=ze(s)?to:w_;return u(s,nc(Ce(a,3)))}function J4(s){var a=ze(s)?p_:BU;return a(s)}function Y4(s,a,u){(u?Xt(s,a,u):a===n)?a=1:a=Ve(a);var m=ze(s)?wU:HU;return m(s,a)}function Q4(s){var a=ze(s)?bU:GU;return a(s)}function X4(s){if(s==null)return 0;if(dn(s))return oc(s)?ws(s):s.length;var a=Gt(s);return a==et||a==I?s.size:Lf(s).length}function eH(s,a,u){var m=ze(s)?bf:jU;return u&&Xt(s,a,u)&&(a=n),m(s,Ce(a,3))}var tH=je(function(s,a){if(s==null)return[];var u=a.length;return u>1&&Xt(s,a[0],a[1])?a=[]:u>2&&Xt(a[0],a[1],a[2])&&(a=[a[0]]),T_(s,zt(a,1),[])}),ec=MV||function(){return Lt.Date.now()};function nH(s,a){if(typeof a!="function")throw new Mn(l);return s=Ve(s),function(){if(--s<1)return a.apply(this,arguments)}}function xS(s,a,u){return a=u?n:a,a=s&&a==null?s.length:a,kr(s,z,n,n,n,n,a)}function CS(s,a){var u;if(typeof a!="function")throw new Mn(l);return s=Ve(s),function(){return--s>0&&(u=a.apply(this,arguments)),s<=1&&(a=n),u}}var lh=je(function(s,a,u){var m=x;if(u.length){var S=ro(u,As(lh));m|=D}return kr(s,m,a,u,S)}),ES=je(function(s,a,u){var m=x|E;if(u.length){var S=ro(u,As(ES));m|=D}return kr(a,m,s,u,S)});function PS(s,a,u){a=u?n:a;var m=kr(s,O,n,n,n,n,n,a);return m.placeholder=PS.placeholder,m}function AS(s,a,u){a=u?n:a;var m=kr(s,N,n,n,n,n,n,a);return m.placeholder=AS.placeholder,m}function OS(s,a,u){var m,S,P,T,k,F,G=0,j=!1,K=!1,de=!0;if(typeof s!="function")throw new Mn(l);a=Vn(a)||0,gt(u)&&(j=!!u.leading,K="maxWait"in u,P=K?Dt(Vn(u.maxWait)||0,a):P,de="trailing"in u?!!u.trailing:de);function Se(wt){var ar=m,$r=S;return m=S=n,G=wt,T=s.apply($r,ar),T}function Ae(wt){return G=wt,k=Ti(Ze,a),j?Se(wt):T}function Ue(wt){var ar=wt-F,$r=wt-G,qS=a-ar;return K?Wt(qS,P-$r):qS}function Oe(wt){var ar=wt-F,$r=wt-G;return F===n||ar>=a||ar<0||K&&$r>=P}function Ze(){var wt=ec();if(Oe(wt))return Je(wt);k=Ti(Ze,Ue(wt))}function Je(wt){return k=n,de&&m?Se(wt):(m=S=n,T)}function En(){k!==n&&L_(k),G=0,m=F=S=k=n}function en(){return k===n?T:Je(ec())}function Pn(){var wt=ec(),ar=Oe(wt);if(m=arguments,S=this,F=wt,ar){if(k===n)return Ae(F);if(K)return L_(k),k=Ti(Ze,a),Se(F)}return k===n&&(k=Ti(Ze,a)),T}return Pn.cancel=En,Pn.flush=en,Pn}var rH=je(function(s,a){return v_(s,1,a)}),oH=je(function(s,a,u){return v_(s,Vn(a)||0,u)});function sH(s){return kr(s,ee)}function tc(s,a){if(typeof s!="function"||a!=null&&typeof a!="function")throw new Mn(l);var u=function(){var m=arguments,S=a?a.apply(this,m):m[0],P=u.cache;if(P.has(S))return P.get(S);var T=s.apply(this,m);return u.cache=P.set(S,T)||P,T};return u.cache=new(tc.Cache||Ir),u}tc.Cache=Ir;function nc(s){if(typeof s!="function")throw new Mn(l);return function(){var a=arguments;switch(a.length){case 0:return!s.call(this);case 1:return!s.call(this,a[0]);case 2:return!s.call(this,a[0],a[1]);case 3:return!s.call(this,a[0],a[1],a[2])}return!s.apply(this,a)}}function iH(s){return CS(2,s)}var aH=qU(function(s,a){a=a.length==1&&ze(a[0])?ft(a[0],Sn(Ce())):ft(zt(a,1),Sn(Ce()));var u=a.length;return je(function(m){for(var S=-1,P=Wt(m.length,u);++S<P;)m[S]=a[S].call(this,m[S]);return _n(s,this,m)})}),ch=je(function(s,a){var u=ro(a,As(ch));return kr(s,D,n,a,u)}),TS=je(function(s,a){var u=ro(a,As(TS));return kr(s,H,n,a,u)}),lH=Dr(function(s,a){return kr(s,L,n,n,n,a)});function cH(s,a){if(typeof s!="function")throw new Mn(l);return a=a===n?a:Ve(a),je(s,a)}function uH(s,a){if(typeof s!="function")throw new Mn(l);return a=a==null?0:Dt(Ve(a),0),je(function(u){var m=u[a],S=lo(u,0,a);return m&&no(S,m),_n(s,this,S)})}function dH(s,a,u){var m=!0,S=!0;if(typeof s!="function")throw new Mn(l);return gt(u)&&(m="leading"in u?!!u.leading:m,S="trailing"in u?!!u.trailing:S),OS(s,a,{leading:m,maxWait:a,trailing:S})}function fH(s){return xS(s,1)}function hH(s,a){return ch(qf(a),s)}function pH(){if(!arguments.length)return[];var s=arguments[0];return ze(s)?s:[s]}function gH(s){return $n(s,w)}function mH(s,a){return a=typeof a=="function"?a:n,$n(s,w,a)}function vH(s){return $n(s,h|w)}function yH(s,a){return a=typeof a=="function"?a:n,$n(s,h|w,a)}function wH(s,a){return a==null||m_(s,a,Ft(a))}function ir(s,a){return s===a||s!==s&&a!==a}var bH=Zl(Mf),_H=Zl(function(s,a){return s>=a}),Bo=S_((function(){return arguments})())?S_:function(s){return mt(s)&&tt.call(s,"callee")&&!l_.call(s,"callee")},ze=B.isArray,SH=H0?Sn(H0):IU;function dn(s){return s!=null&&rc(s.length)&&!Mr(s)}function yt(s){return mt(s)&&dn(s)}function xH(s){return s===!0||s===!1||mt(s)&&Qt(s)==ye}var co=$V||bh,CH=W0?Sn(W0):NU;function EH(s){return mt(s)&&s.nodeType===1&&!Ii(s)}function PH(s){if(s==null)return!0;if(dn(s)&&(ze(s)||typeof s=="string"||typeof s.splice=="function"||co(s)||Os(s)||Bo(s)))return!s.length;var a=Gt(s);if(a==et||a==I)return!s.size;if(Oi(s))return!Lf(s).length;for(var u in s)if(tt.call(s,u))return!1;return!0}function AH(s,a){return Ei(s,a)}function OH(s,a,u){u=typeof u=="function"?u:n;var m=u?u(s,a):n;return m===n?Ei(s,a,n,u):!!m}function uh(s){if(!mt(s))return!1;var a=Qt(s);return a==$e||a==He||typeof s.message=="string"&&typeof s.name=="string"&&!Ii(s)}function TH(s){return typeof s=="number"&&u_(s)}function Mr(s){if(!gt(s))return!1;var a=Qt(s);return a==We||a==dt||a==ce||a==kn}function IS(s){return typeof s=="number"&&s==Ve(s)}function rc(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=ne}function gt(s){var a=typeof s;return s!=null&&(a=="object"||a=="function")}function mt(s){return s!=null&&typeof s=="object"}var NS=G0?Sn(G0):DU;function IH(s,a){return s===a||$f(s,a,eh(a))}function NH(s,a,u){return u=typeof u=="function"?u:n,$f(s,a,eh(a),u)}function kH(s){return kS(s)&&s!=+s}function DH(s){if(mB(s))throw new Me(i);return x_(s)}function RH(s){return s===null}function MH(s){return s==null}function kS(s){return typeof s=="number"||mt(s)&&Qt(s)==an}function Ii(s){if(!mt(s)||Qt(s)!=vt)return!1;var a=Il(s);if(a===null)return!0;var u=tt.call(a,"constructor")&&a.constructor;return typeof u=="function"&&u instanceof u&&Pl.call(u)==NV}var dh=j0?Sn(j0):RU;function FH(s){return IS(s)&&s>=-ne&&s<=ne}var DS=q0?Sn(q0):MU;function oc(s){return typeof s=="string"||!ze(s)&&mt(s)&&Qt(s)==M}function Cn(s){return typeof s=="symbol"||mt(s)&&Qt(s)==U}var Os=Z0?Sn(Z0):FU;function $H(s){return s===n}function LH(s){return mt(s)&&Gt(s)==re}function zH(s){return mt(s)&&Qt(s)==X}var VH=Zl(zf),UH=Zl(function(s,a){return s<=a});function RS(s){if(!s)return[];if(dn(s))return oc(s)?or(s):un(s);if(vi&&s[vi])return wV(s[vi]());var a=Gt(s),u=a==et?Pf:a==I?xl:Ts;return u(s)}function Fr(s){if(!s)return s===0?s:0;if(s=Vn(s),s===se||s===-se){var a=s<0?-1:1;return a*te}return s===s?s:0}function Ve(s){var a=Fr(s),u=a%1;return a===a?u?a-u:a:0}function MS(s){return s?Lo(Ve(s),0,Te):0}function Vn(s){if(typeof s=="number")return s;if(Cn(s))return Y;if(gt(s)){var a=typeof s.valueOf=="function"?s.valueOf():s;s=gt(a)?a+"":a}if(typeof s!="string")return s===0?s:+s;s=e_(s);var u=Sz.test(s);return u||Cz.test(s)?nV(s.slice(2),u?2:8):_z.test(s)?Y:+s}function FS(s){return yr(s,fn(s))}function BH(s){return s?Lo(Ve(s),-ne,ne):s===0?s:0}function nt(s){return s==null?"":xn(s)}var HH=Es(function(s,a){if(Oi(a)||dn(a)){yr(a,Ft(a),s);return}for(var u in a)tt.call(a,u)&&Si(s,u,a[u])}),$S=Es(function(s,a){yr(a,fn(a),s)}),sc=Es(function(s,a,u,m){yr(a,fn(a),s,m)}),WH=Es(function(s,a,u,m){yr(a,Ft(a),s,m)}),GH=Dr(kf);function jH(s,a){var u=Cs(s);return a==null?u:g_(u,a)}var qH=je(function(s,a){s=st(s);var u=-1,m=a.length,S=m>2?a[2]:n;for(S&&Xt(a[0],a[1],S)&&(m=1);++u<m;)for(var P=a[u],T=fn(P),k=-1,F=T.length;++k<F;){var G=T[k],j=s[G];(j===n||ir(j,_s[G])&&!tt.call(s,G))&&(s[G]=P[G])}return s}),ZH=je(function(s){return s.push(n,eS),_n(LS,n,s)});function KH(s,a){return J0(s,Ce(a,3),vr)}function JH(s,a){return J0(s,Ce(a,3),Rf)}function YH(s,a){return s==null?s:Df(s,Ce(a,3),fn)}function QH(s,a){return s==null?s:b_(s,Ce(a,3),fn)}function XH(s,a){return s&&vr(s,Ce(a,3))}function e3(s,a){return s&&Rf(s,Ce(a,3))}function t3(s){return s==null?[]:Vl(s,Ft(s))}function n3(s){return s==null?[]:Vl(s,fn(s))}function fh(s,a,u){var m=s==null?n:zo(s,a);return m===n?u:m}function r3(s,a){return s!=null&&rS(s,a,PU)}function hh(s,a){return s!=null&&rS(s,a,AU)}var o3=K_(function(s,a,u){a!=null&&typeof a.toString!="function"&&(a=Al.call(a)),s[a]=u},gh(hn)),s3=K_(function(s,a,u){a!=null&&typeof a.toString!="function"&&(a=Al.call(a)),tt.call(s,a)?s[a].push(u):s[a]=[u]},Ce),i3=je(Ci);function Ft(s){return dn(s)?h_(s):Lf(s)}function fn(s){return dn(s)?h_(s,!0):$U(s)}function a3(s,a){var u={};return a=Ce(a,3),vr(s,function(m,S,P){Nr(u,a(m,S,P),m)}),u}function l3(s,a){var u={};return a=Ce(a,3),vr(s,function(m,S,P){Nr(u,S,a(m,S,P))}),u}var c3=Es(function(s,a,u){Ul(s,a,u)}),LS=Es(function(s,a,u,m){Ul(s,a,u,m)}),u3=Dr(function(s,a){var u={};if(s==null)return u;var m=!1;a=ft(a,function(P){return P=ao(P,s),m||(m=P.length>1),P}),yr(s,Qf(s),u),m&&(u=$n(u,h|y|w,oB));for(var S=a.length;S--;)Wf(u,a[S]);return u});function d3(s,a){return zS(s,nc(Ce(a)))}var f3=Dr(function(s,a){return s==null?{}:zU(s,a)});function zS(s,a){if(s==null)return{};var u=ft(Qf(s),function(m){return[m]});return a=Ce(a),I_(s,u,function(m,S){return a(m,S[0])})}function h3(s,a,u){a=ao(a,s);var m=-1,S=a.length;for(S||(S=1,s=n);++m<S;){var P=s==null?n:s[wr(a[m])];P===n&&(m=S,P=u),s=Mr(P)?P.call(s):P}return s}function p3(s,a,u){return s==null?s:Pi(s,a,u)}function g3(s,a,u,m){return m=typeof m=="function"?m:n,s==null?s:Pi(s,a,u,m)}var VS=Q_(Ft),US=Q_(fn);function m3(s,a,u){var m=ze(s),S=m||co(s)||Os(s);if(a=Ce(a,4),u==null){var P=s&&s.constructor;S?u=m?new P:[]:gt(s)?u=Mr(P)?Cs(Il(s)):{}:u={}}return(S?Rn:vr)(s,function(T,k,F){return a(u,T,k,F)}),u}function v3(s,a){return s==null?!0:Wf(s,a)}function y3(s,a,u){return s==null?s:M_(s,a,qf(u))}function w3(s,a,u,m){return m=typeof m=="function"?m:n,s==null?s:M_(s,a,qf(u),m)}function Ts(s){return s==null?[]:Ef(s,Ft(s))}function b3(s){return s==null?[]:Ef(s,fn(s))}function _3(s,a,u){return u===n&&(u=a,a=n),u!==n&&(u=Vn(u),u=u===u?u:0),a!==n&&(a=Vn(a),a=a===a?a:0),Lo(Vn(s),a,u)}function S3(s,a,u){return a=Fr(a),u===n?(u=a,a=0):u=Fr(u),s=Vn(s),OU(s,a,u)}function x3(s,a,u){if(u&&typeof u!="boolean"&&Xt(s,a,u)&&(a=u=n),u===n&&(typeof a=="boolean"?(u=a,a=n):typeof s=="boolean"&&(u=s,s=n)),s===n&&a===n?(s=0,a=1):(s=Fr(s),a===n?(a=s,s=0):a=Fr(a)),s>a){var m=s;s=a,a=m}if(u||s%1||a%1){var S=d_();return Wt(s+S*(a-s+tV("1e-"+((S+"").length-1))),a)}return Uf(s,a)}var C3=Ps(function(s,a,u){return a=a.toLowerCase(),s+(u?BS(a):a)});function BS(s){return ph(nt(s).toLowerCase())}function HS(s){return s=nt(s),s&&s.replace(Pz,pV).replace(Gz,"")}function E3(s,a,u){s=nt(s),a=xn(a);var m=s.length;u=u===n?m:Lo(Ve(u),0,m);var S=u;return u-=a.length,u>=0&&s.slice(u,S)==a}function P3(s){return s=nt(s),s&&Le.test(s)?s.replace(gi,gV):s}function A3(s){return s=nt(s),s&&bn.test(s)?s.replace(eo,"\\$&"):s}var O3=Ps(function(s,a,u){return s+(u?"-":"")+a.toLowerCase()}),T3=Ps(function(s,a,u){return s+(u?" ":"")+a.toLowerCase()}),I3=j_("toLowerCase");function N3(s,a,u){s=nt(s),a=Ve(a);var m=a?ws(s):0;if(!a||m>=a)return s;var S=(a-m)/2;return ql(Rl(S),u)+s+ql(Dl(S),u)}function k3(s,a,u){s=nt(s),a=Ve(a);var m=a?ws(s):0;return a&&m<a?s+ql(a-m,u):s}function D3(s,a,u){s=nt(s),a=Ve(a);var m=a?ws(s):0;return a&&m<a?ql(a-m,u)+s:s}function R3(s,a,u){return u||a==null?a=0:a&&(a=+a),UV(nt(s).replace(Yt,""),a||0)}function M3(s,a,u){return(u?Xt(s,a,u):a===n)?a=1:a=Ve(a),Bf(nt(s),a)}function F3(){var s=arguments,a=nt(s[0]);return s.length<3?a:a.replace(s[1],s[2])}var $3=Ps(function(s,a,u){return s+(u?"_":"")+a.toLowerCase()});function L3(s,a,u){return u&&typeof u!="number"&&Xt(s,a,u)&&(a=u=n),u=u===n?Te:u>>>0,u?(s=nt(s),s&&(typeof a=="string"||a!=null&&!dh(a))&&(a=xn(a),!a&&ys(s))?lo(or(s),0,u):s.split(a,u)):[]}var z3=Ps(function(s,a,u){return s+(u?" ":"")+ph(a)});function V3(s,a,u){return s=nt(s),u=u==null?0:Lo(Ve(u),0,s.length),a=xn(a),s.slice(u,u+a.length)==a}function U3(s,a,u){var m=C.templateSettings;u&&Xt(s,a,u)&&(a=n),s=nt(s),a=sc({},a,m,X_);var S=sc({},a.imports,m.imports,X_),P=Ft(S),T=Ef(S,P),k,F,G=0,j=a.interpolate||yl,K="__p += '",de=Af((a.escape||yl).source+"|"+j.source+"|"+(j===Ht?bz:yl).source+"|"+(a.evaluate||yl).source+"|$","g"),Se="//# sourceURL="+(tt.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Jz+"]")+`
|
|
102
|
+
`;s.replace(de,function(Oe,Ze,Je,En,en,Pn){return Je||(Je=En),K+=s.slice(G,Pn).replace(Az,mV),Ze&&(k=!0,K+=`' +
|
|
103
|
+
__e(`+Ze+`) +
|
|
104
|
+
'`),en&&(F=!0,K+=`';
|
|
105
|
+
`+en+`;
|
|
106
|
+
__p += '`),Je&&(K+=`' +
|
|
107
|
+
((__t = (`+Je+`)) == null ? '' : __t) +
|
|
108
|
+
'`),G=Pn+Oe.length,Oe}),K+=`';
|
|
109
|
+
`;var Ae=tt.call(a,"variable")&&a.variable;if(!Ae)K=`with (obj) {
|
|
110
|
+
`+K+`
|
|
111
|
+
}
|
|
112
|
+
`;else if(yz.test(Ae))throw new Me(c);K=(F?K.replace(Do,""):K).replace(wn,"$1").replace(uf,"$1;"),K="function("+(Ae||"obj")+`) {
|
|
113
|
+
`+(Ae?"":`obj || (obj = {});
|
|
114
|
+
`)+"var __t, __p = ''"+(k?", __e = _.escape":"")+(F?`, __j = Array.prototype.join;
|
|
115
|
+
function print() { __p += __j.call(arguments, '') }
|
|
116
|
+
`:`;
|
|
117
|
+
`)+K+`return __p
|
|
118
|
+
}`;var Ue=GS(function(){return Xe(P,Se+"return "+K).apply(n,T)});if(Ue.source=K,uh(Ue))throw Ue;return Ue}function B3(s){return nt(s).toLowerCase()}function H3(s){return nt(s).toUpperCase()}function W3(s,a,u){if(s=nt(s),s&&(u||a===n))return e_(s);if(!s||!(a=xn(a)))return s;var m=or(s),S=or(a),P=t_(m,S),T=n_(m,S)+1;return lo(m,P,T).join("")}function G3(s,a,u){if(s=nt(s),s&&(u||a===n))return s.slice(0,o_(s)+1);if(!s||!(a=xn(a)))return s;var m=or(s),S=n_(m,or(a))+1;return lo(m,0,S).join("")}function j3(s,a,u){if(s=nt(s),s&&(u||a===n))return s.replace(Yt,"");if(!s||!(a=xn(a)))return s;var m=or(s),S=t_(m,or(a));return lo(m,S).join("")}function q3(s,a){var u=le,m=be;if(gt(a)){var S="separator"in a?a.separator:S;u="length"in a?Ve(a.length):u,m="omission"in a?xn(a.omission):m}s=nt(s);var P=s.length;if(ys(s)){var T=or(s);P=T.length}if(u>=P)return s;var k=u-ws(m);if(k<1)return m;var F=T?lo(T,0,k).join(""):s.slice(0,k);if(S===n)return F+m;if(T&&(k+=F.length-k),dh(S)){if(s.slice(k).search(S)){var G,j=F;for(S.global||(S=Af(S.source,nt(S0.exec(S))+"g")),S.lastIndex=0;G=S.exec(j);)var K=G.index;F=F.slice(0,K===n?k:K)}}else if(s.indexOf(xn(S),k)!=k){var de=F.lastIndexOf(S);de>-1&&(F=F.slice(0,de))}return F+m}function Z3(s){return s=nt(s),s&&ml.test(s)?s.replace(gl,xV):s}var K3=Ps(function(s,a,u){return s+(u?" ":"")+a.toUpperCase()}),ph=j_("toUpperCase");function WS(s,a,u){return s=nt(s),a=u?n:a,a===n?yV(s)?PV(s):cV(s):s.match(a)||[]}var GS=je(function(s,a){try{return _n(s,n,a)}catch(u){return uh(u)?u:new Me(u)}}),J3=Dr(function(s,a){return Rn(a,function(u){u=wr(u),Nr(s,u,lh(s[u],s))}),s});function Y3(s){var a=s==null?0:s.length,u=Ce();return s=a?ft(s,function(m){if(typeof m[1]!="function")throw new Mn(l);return[u(m[0]),m[1]]}):[],je(function(m){for(var S=-1;++S<a;){var P=s[S];if(_n(P[0],this,m))return _n(P[1],this,m)}})}function Q3(s){return xU($n(s,h))}function gh(s){return function(){return s}}function X3(s,a){return s==null||s!==s?a:s}var e5=Z_(),t5=Z_(!0);function hn(s){return s}function mh(s){return C_(typeof s=="function"?s:$n(s,h))}function n5(s){return P_($n(s,h))}function r5(s,a){return A_(s,$n(a,h))}var o5=je(function(s,a){return function(u){return Ci(u,s,a)}}),s5=je(function(s,a){return function(u){return Ci(s,u,a)}});function vh(s,a,u){var m=Ft(a),S=Vl(a,m);u==null&&!(gt(a)&&(S.length||!m.length))&&(u=a,a=s,s=this,S=Vl(a,Ft(a)));var P=!(gt(u)&&"chain"in u)||!!u.chain,T=Mr(s);return Rn(S,function(k){var F=a[k];s[k]=F,T&&(s.prototype[k]=function(){var G=this.__chain__;if(P||G){var j=s(this.__wrapped__),K=j.__actions__=un(this.__actions__);return K.push({func:F,args:arguments,thisArg:s}),j.__chain__=G,j}return F.apply(s,no([this.value()],arguments))})}),s}function i5(){return Lt._===this&&(Lt._=kV),this}function yh(){}function a5(s){return s=Ve(s),je(function(a){return O_(a,s)})}var l5=Kf(ft),c5=Kf(K0),u5=Kf(bf);function jS(s){return nh(s)?_f(wr(s)):VU(s)}function d5(s){return function(a){return s==null?n:zo(s,a)}}var f5=J_(),h5=J_(!0);function wh(){return[]}function bh(){return!1}function p5(){return{}}function g5(){return""}function m5(){return!0}function v5(s,a){if(s=Ve(s),s<1||s>ne)return[];var u=Te,m=Wt(s,Te);a=Ce(a),s-=Te;for(var S=Cf(m,a);++u<s;)a(u);return S}function y5(s){return ze(s)?ft(s,wr):Cn(s)?[s]:un(fS(nt(s)))}function w5(s){var a=++IV;return nt(s)+a}var b5=jl(function(s,a){return s+a},0),_5=Jf("ceil"),S5=jl(function(s,a){return s/a},1),x5=Jf("floor");function C5(s){return s&&s.length?zl(s,hn,Mf):n}function E5(s,a){return s&&s.length?zl(s,Ce(a,2),Mf):n}function P5(s){return Q0(s,hn)}function A5(s,a){return Q0(s,Ce(a,2))}function O5(s){return s&&s.length?zl(s,hn,zf):n}function T5(s,a){return s&&s.length?zl(s,Ce(a,2),zf):n}var I5=jl(function(s,a){return s*a},1),N5=Jf("round"),k5=jl(function(s,a){return s-a},0);function D5(s){return s&&s.length?xf(s,hn):0}function R5(s,a){return s&&s.length?xf(s,Ce(a,2)):0}return C.after=nH,C.ary=xS,C.assign=HH,C.assignIn=$S,C.assignInWith=sc,C.assignWith=WH,C.at=GH,C.before=CS,C.bind=lh,C.bindAll=J3,C.bindKey=ES,C.castArray=pH,C.chain=bS,C.chunk=xB,C.compact=CB,C.concat=EB,C.cond=Y3,C.conforms=Q3,C.constant=gh,C.countBy=D4,C.create=jH,C.curry=PS,C.curryRight=AS,C.debounce=OS,C.defaults=qH,C.defaultsDeep=ZH,C.defer=rH,C.delay=oH,C.difference=PB,C.differenceBy=AB,C.differenceWith=OB,C.drop=TB,C.dropRight=IB,C.dropRightWhile=NB,C.dropWhile=kB,C.fill=DB,C.filter=M4,C.flatMap=L4,C.flatMapDeep=z4,C.flatMapDepth=V4,C.flatten=mS,C.flattenDeep=RB,C.flattenDepth=MB,C.flip=sH,C.flow=e5,C.flowRight=t5,C.fromPairs=FB,C.functions=t3,C.functionsIn=n3,C.groupBy=U4,C.initial=LB,C.intersection=zB,C.intersectionBy=VB,C.intersectionWith=UB,C.invert=o3,C.invertBy=s3,C.invokeMap=H4,C.iteratee=mh,C.keyBy=W4,C.keys=Ft,C.keysIn=fn,C.map=Xl,C.mapKeys=a3,C.mapValues=l3,C.matches=n5,C.matchesProperty=r5,C.memoize=tc,C.merge=c3,C.mergeWith=LS,C.method=o5,C.methodOf=s5,C.mixin=vh,C.negate=nc,C.nthArg=a5,C.omit=u3,C.omitBy=d3,C.once=iH,C.orderBy=G4,C.over=l5,C.overArgs=aH,C.overEvery=c5,C.overSome=u5,C.partial=ch,C.partialRight=TS,C.partition=j4,C.pick=f3,C.pickBy=zS,C.property=jS,C.propertyOf=d5,C.pull=GB,C.pullAll=yS,C.pullAllBy=jB,C.pullAllWith=qB,C.pullAt=ZB,C.range=f5,C.rangeRight=h5,C.rearg=lH,C.reject=K4,C.remove=KB,C.rest=cH,C.reverse=ih,C.sampleSize=Y4,C.set=p3,C.setWith=g3,C.shuffle=Q4,C.slice=JB,C.sortBy=tH,C.sortedUniq=r4,C.sortedUniqBy=o4,C.split=L3,C.spread=uH,C.tail=s4,C.take=i4,C.takeRight=a4,C.takeRightWhile=l4,C.takeWhile=c4,C.tap=C4,C.throttle=dH,C.thru=Ql,C.toArray=RS,C.toPairs=VS,C.toPairsIn=US,C.toPath=y5,C.toPlainObject=FS,C.transform=m3,C.unary=fH,C.union=u4,C.unionBy=d4,C.unionWith=f4,C.uniq=h4,C.uniqBy=p4,C.uniqWith=g4,C.unset=v3,C.unzip=ah,C.unzipWith=wS,C.update=y3,C.updateWith=w3,C.values=Ts,C.valuesIn=b3,C.without=m4,C.words=WS,C.wrap=hH,C.xor=v4,C.xorBy=y4,C.xorWith=w4,C.zip=b4,C.zipObject=_4,C.zipObjectDeep=S4,C.zipWith=x4,C.entries=VS,C.entriesIn=US,C.extend=$S,C.extendWith=sc,vh(C,C),C.add=b5,C.attempt=GS,C.camelCase=C3,C.capitalize=BS,C.ceil=_5,C.clamp=_3,C.clone=gH,C.cloneDeep=vH,C.cloneDeepWith=yH,C.cloneWith=mH,C.conformsTo=wH,C.deburr=HS,C.defaultTo=X3,C.divide=S5,C.endsWith=E3,C.eq=ir,C.escape=P3,C.escapeRegExp=A3,C.every=R4,C.find=F4,C.findIndex=pS,C.findKey=KH,C.findLast=$4,C.findLastIndex=gS,C.findLastKey=JH,C.floor=x5,C.forEach=_S,C.forEachRight=SS,C.forIn=YH,C.forInRight=QH,C.forOwn=XH,C.forOwnRight=e3,C.get=fh,C.gt=bH,C.gte=_H,C.has=r3,C.hasIn=hh,C.head=vS,C.identity=hn,C.includes=B4,C.indexOf=$B,C.inRange=S3,C.invoke=i3,C.isArguments=Bo,C.isArray=ze,C.isArrayBuffer=SH,C.isArrayLike=dn,C.isArrayLikeObject=yt,C.isBoolean=xH,C.isBuffer=co,C.isDate=CH,C.isElement=EH,C.isEmpty=PH,C.isEqual=AH,C.isEqualWith=OH,C.isError=uh,C.isFinite=TH,C.isFunction=Mr,C.isInteger=IS,C.isLength=rc,C.isMap=NS,C.isMatch=IH,C.isMatchWith=NH,C.isNaN=kH,C.isNative=DH,C.isNil=MH,C.isNull=RH,C.isNumber=kS,C.isObject=gt,C.isObjectLike=mt,C.isPlainObject=Ii,C.isRegExp=dh,C.isSafeInteger=FH,C.isSet=DS,C.isString=oc,C.isSymbol=Cn,C.isTypedArray=Os,C.isUndefined=$H,C.isWeakMap=LH,C.isWeakSet=zH,C.join=BB,C.kebabCase=O3,C.last=zn,C.lastIndexOf=HB,C.lowerCase=T3,C.lowerFirst=I3,C.lt=VH,C.lte=UH,C.max=C5,C.maxBy=E5,C.mean=P5,C.meanBy=A5,C.min=O5,C.minBy=T5,C.stubArray=wh,C.stubFalse=bh,C.stubObject=p5,C.stubString=g5,C.stubTrue=m5,C.multiply=I5,C.nth=WB,C.noConflict=i5,C.noop=yh,C.now=ec,C.pad=N3,C.padEnd=k3,C.padStart=D3,C.parseInt=R3,C.random=x3,C.reduce=q4,C.reduceRight=Z4,C.repeat=M3,C.replace=F3,C.result=h3,C.round=N5,C.runInContext=R,C.sample=J4,C.size=X4,C.snakeCase=$3,C.some=eH,C.sortedIndex=YB,C.sortedIndexBy=QB,C.sortedIndexOf=XB,C.sortedLastIndex=e4,C.sortedLastIndexBy=t4,C.sortedLastIndexOf=n4,C.startCase=z3,C.startsWith=V3,C.subtract=k5,C.sum=D5,C.sumBy=R5,C.template=U3,C.times=v5,C.toFinite=Fr,C.toInteger=Ve,C.toLength=MS,C.toLower=B3,C.toNumber=Vn,C.toSafeInteger=BH,C.toString=nt,C.toUpper=H3,C.trim=W3,C.trimEnd=G3,C.trimStart=j3,C.truncate=q3,C.unescape=Z3,C.uniqueId=w5,C.upperCase=K3,C.upperFirst=ph,C.each=_S,C.eachRight=SS,C.first=vS,vh(C,(function(){var s={};return vr(C,function(a,u){tt.call(C.prototype,u)||(s[u]=a)}),s})(),{chain:!1}),C.VERSION=r,Rn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){C[s].placeholder=C}),Rn(["drop","take"],function(s,a){Ke.prototype[s]=function(u){u=u===n?1:Dt(Ve(u),0);var m=this.__filtered__&&!a?new Ke(this):this.clone();return m.__filtered__?m.__takeCount__=Wt(u,m.__takeCount__):m.__views__.push({size:Wt(u,Te),type:s+(m.__dir__<0?"Right":"")}),m},Ke.prototype[s+"Right"]=function(u){return this.reverse()[s](u).reverse()}}),Rn(["filter","map","takeWhile"],function(s,a){var u=a+1,m=u==ie||u==q;Ke.prototype[s]=function(S){var P=this.clone();return P.__iteratees__.push({iteratee:Ce(S,3),type:u}),P.__filtered__=P.__filtered__||m,P}}),Rn(["head","last"],function(s,a){var u="take"+(a?"Right":"");Ke.prototype[s]=function(){return this[u](1).value()[0]}}),Rn(["initial","tail"],function(s,a){var u="drop"+(a?"":"Right");Ke.prototype[s]=function(){return this.__filtered__?new Ke(this):this[u](1)}}),Ke.prototype.compact=function(){return this.filter(hn)},Ke.prototype.find=function(s){return this.filter(s).head()},Ke.prototype.findLast=function(s){return this.reverse().find(s)},Ke.prototype.invokeMap=je(function(s,a){return typeof s=="function"?new Ke(this):this.map(function(u){return Ci(u,s,a)})}),Ke.prototype.reject=function(s){return this.filter(nc(Ce(s)))},Ke.prototype.slice=function(s,a){s=Ve(s);var u=this;return u.__filtered__&&(s>0||a<0)?new Ke(u):(s<0?u=u.takeRight(-s):s&&(u=u.drop(s)),a!==n&&(a=Ve(a),u=a<0?u.dropRight(-a):u.take(a-s)),u)},Ke.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Ke.prototype.toArray=function(){return this.take(Te)},vr(Ke.prototype,function(s,a){var u=/^(?:filter|find|map|reject)|While$/.test(a),m=/^(?:head|last)$/.test(a),S=C[m?"take"+(a=="last"?"Right":""):a],P=m||/^find/.test(a);S&&(C.prototype[a]=function(){var T=this.__wrapped__,k=m?[1]:arguments,F=T instanceof Ke,G=k[0],j=F||ze(T),K=function(Ze){var Je=S.apply(C,no([Ze],k));return m&&de?Je[0]:Je};j&&u&&typeof G=="function"&&G.length!=1&&(F=j=!1);var de=this.__chain__,Se=!!this.__actions__.length,Ae=P&&!de,Ue=F&&!Se;if(!P&&j){T=Ue?T:new Ke(this);var Oe=s.apply(T,k);return Oe.__actions__.push({func:Ql,args:[K],thisArg:n}),new Fn(Oe,de)}return Ae&&Ue?s.apply(this,k):(Oe=this.thru(K),Ae?m?Oe.value()[0]:Oe.value():Oe)})}),Rn(["pop","push","shift","sort","splice","unshift"],function(s){var a=Cl[s],u=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",m=/^(?:pop|shift)$/.test(s);C.prototype[s]=function(){var S=arguments;if(m&&!this.__chain__){var P=this.value();return a.apply(ze(P)?P:[],S)}return this[u](function(T){return a.apply(ze(T)?T:[],S)})}}),vr(Ke.prototype,function(s,a){var u=C[a];if(u){var m=u.name+"";tt.call(xs,m)||(xs[m]=[]),xs[m].push({name:a,func:u})}}),xs[Gl(n,E).name]=[{name:"wrapper",func:n}],Ke.prototype.clone=ZV,Ke.prototype.reverse=KV,Ke.prototype.value=JV,C.prototype.at=E4,C.prototype.chain=P4,C.prototype.commit=A4,C.prototype.next=O4,C.prototype.plant=I4,C.prototype.reverse=N4,C.prototype.toJSON=C.prototype.valueOf=C.prototype.value=k4,C.prototype.first=C.prototype.head,vi&&(C.prototype[vi]=T4),C}),bs=AV();Ro?((Ro.exports=bs)._=bs,mf._=bs):Lt._=bs}).call(nz)})(pi,pi.exports)),pi.exports}var oz=rz();const sz=({title:e})=>{const[t,n]=Wy(),r=t.get("search")||"",[o,i]=$.useState(r),l=$.useCallback(oz.debounce(d=>{const f=new URLSearchParams(t);d?f.set("search",d):f.delete("search"),n(f)},300),[t,n]);$.useEffect(()=>{i(r)},[r]);const c=d=>{const f=d.target.value;i(f),l(f)};return g.jsx("div",{className:"flex w-full items-center justify-between gap-3 rounded-t-md bg-white px-4 py-3",children:g.jsxs("div",{className:"relative w-[340px] rounded bg-gray-100",children:[g.jsx(ew,{className:"absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground"}),g.jsx(ss,{placeholder:e,value:o,onChange:c,className:"h-10 border-none pl-9 text-[13px]"})]})})};function h0({...e}){return g.jsx(OE,{"data-slot":"alert-dialog",...e})}function iz({...e}){return g.jsx(TE,{"data-slot":"alert-dialog-portal",...e})}function az({className:e,...t}){return g.jsx(IE,{"data-slot":"alert-dialog-overlay",className:ae("fixed inset-0 z-50 bg-black/30 duration-100 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...t})}function p0({className:e,size:t="default",...n}){return g.jsxs(iz,{children:[g.jsx(az,{}),g.jsx(NE,{"data-slot":"alert-dialog-content","data-size":t,className:ae("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-background p-6 ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...n})]})}function g0({className:e,...t}){return g.jsx("div",{"data-slot":"alert-dialog-header",className:ae("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...t})}function m0({className:e,...t}){return g.jsx("div",{"data-slot":"alert-dialog-footer",className:ae("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...t})}function v0({className:e,...t}){return g.jsx(RE,{"data-slot":"alert-dialog-title",className:ae("text-lg font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...t})}function y0({className:e,...t}){return g.jsx(ME,{"data-slot":"alert-dialog-description",className:ae("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...t})}function w0({className:e,variant:t="default",size:n="default",...r}){return g.jsx(Ut,{variant:t,size:n,asChild:!0,children:g.jsx(kE,{"data-slot":"alert-dialog-action",className:ae(e),...r})})}function b0({className:e,variant:t="outline",size:n="default",...r}){return g.jsx(Ut,{variant:t,size:n,asChild:!0,children:g.jsx(DE,{"data-slot":"alert-dialog-cancel",className:ae(e),...r})})}function lz({open:e,onOpenChange:t,onConfirm:n,title:r="Are you sure?",description:o="This action cannot be undone.",isLoading:i=!1,variant:l="destructive",confirmLabel:c="Confirm"}){return g.jsx(h0,{open:e,onOpenChange:t,children:g.jsxs(p0,{size:"sm",children:[g.jsxs(g0,{children:[g.jsx(v0,{children:r}),g.jsx(y0,{children:o})]}),g.jsxs(m0,{children:[g.jsx(b0,{disabled:i,children:"Cancel"}),g.jsx(w0,{variant:l,className:" border",disabled:i,onClick:d=>{d.preventDefault(),n()},children:i?"Loading...":c})]})]})})}class cz extends $.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("ErrorBoundary caught:",t,n)}render(){return this.state.hasError?g.jsxs("div",{className:"flex h-64 flex-col items-center justify-center gap-2 text-muted-foreground",children:[g.jsx("p",{className:"text-xl font-medium text-destructive",children:"Something went wrong"}),g.jsx("p",{className:"text-sm",children:this.state.error?.message}),g.jsx(fd,{to:"/",className:"text-sm text-blue-500 underline",onClick:()=>this.setState({hasError:!1,error:null}),children:"Go Home"})]}):this.props.children}}function uz({className:e,size:t="default",...n}){return g.jsx("div",{"data-slot":"card","data-size":t,className:ae("group/card flex flex-col gap-6 overflow-hidden rounded-xl bg-card py-6 text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 has-[>img:first-child]:pt-0 data-[size=sm]:gap-4 data-[size=sm]:py-4 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...n})}function dz({className:e,...t}){return g.jsx("div",{"data-slot":"card-header",className:ae("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-6 group-data-[size=sm]/card:px-4 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-6 group-data-[size=sm]/card:[.border-b]:pb-4",e),...t})}function fz({className:e,...t}){return g.jsx("div",{"data-slot":"card-title",className:ae("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...t})}function hz({className:e,...t}){return g.jsx("div",{"data-slot":"card-description",className:ae("text-sm text-muted-foreground",e),...t})}function pz({className:e,...t}){return g.jsx("div",{"data-slot":"card-content",className:ae("px-6 group-data-[size=sm]/card:px-4",e),...t})}function gz({className:e,...t}){return g.jsx("div",{"data-slot":"card-footer",className:ae("flex items-center rounded-b-xl px-6 group-data-[size=sm]/card:px-4 [.border-t]:pt-6 group-data-[size=sm]/card:[.border-t]:pt-4",e),...t})}oe.AlertDialog=h0,oe.AlertDialogAction=w0,oe.AlertDialogCancel=b0,oe.AlertDialogContent=p0,oe.AlertDialogDescription=y0,oe.AlertDialogFooter=m0,oe.AlertDialogHeader=g0,oe.AlertDialogTitle=v0,oe.AppHeader=u2,oe.AppLayout=l2,oe.AppSidebar=Vb,oe.AuthLayout=c2,oe.Button=Ut,oe.Card=uz,oe.CardContent=pz,oe.CardDescription=hz,oe.CardFooter=gz,oe.CardHeader=dz,oe.CardTitle=fz,oe.ConfirmDialog=lz,oe.CrudService=GN,oe.DashboardProvider=WN,oe.DataPagination=tz,oe.DataTable=j2,oe.Dialog=Vd,oe.DialogContent=Ud,oe.DialogDescription=L$,oe.DialogFooter=Hd,oe.DialogHeader=Bd,oe.DialogTitle=Wd,oe.DropdownMenu=Ub,oe.DropdownMenuContent=Hb,oe.DropdownMenuItem=Wb,oe.DropdownMenuTrigger=Bb,oe.ErrorBoundary=cz,oe.Form=Gd,oe.FormControl=hs,oe.FormDescription=Tb,oe.FormField=ui,oe.FormItem=ds,oe.FormLabel=fs,oe.FormMessage=ps,oe.Input=ss,oe.Label=Pb,oe.SearchBar=sz,oe.Select=a0,oe.SelectContent=u0,oe.SelectItem=d0,oe.SelectTrigger=c0,oe.SelectValue=l0,oe.Sidebar=cw,oe.SidebarContent=fw,oe.SidebarFooter=dw,oe.SidebarHeader=uw,oe.SidebarNav=gw,oe.SidebarProvider=lw,oe.SidebarUserFooter=zb,oe.Table=r0,oe.TableBody=s0,oe.TableCell=hl,oe.TableHead=i0,oe.TableHeader=o0,oe.TableRow=hi,oe.ThemeProvider=qh,oe.apiClient=on,oe.authClient=Ku,oe.cn=ae,oe.configureApi=by,oe.useIsMobile=Zy,oe.useSidebar=ni,oe.useTheme=$x,Object.defineProperty(oe,Symbol.toStringTag,{value:"Module"})}));
|