@frumu/tandem-panel 0.4.3 → 0.4.5
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/assets/{index-4aX9RGDL.css → index-DF-KLBYn.css} +1 -1
- package/dist/assets/index-DvotFhS5.js +35 -0
- package/dist/assets/react-query-DqS47hY2.js +1 -0
- package/dist/assets/vendor-B5SLbWPm.js +42 -0
- package/dist/index.html +4 -4
- package/package.json +1 -1
- package/dist/assets/index-CpH1IYO9.js +0 -22
- package/dist/assets/react-query-PgFuErlI.js +0 -1
- package/dist/assets/vendor-CdeM8LjL.js +0 -42
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{R as f,y as l,u as d,x as m,d as g,C,q as h}from"./preact-vendor-jo0muZ28.js";import{s as E,n as S,a as y,i as O,Q as I,M as T}from"./vendor-CdeM8LjL.js";var b=f(void 0),M=e=>{const s=m(b);if(!s)throw new Error("No QueryClient set, use QueryClientProvider to set one");return s},j=({client:e,children:s})=>(l(()=>(e.mount(),()=>{e.unmount()}),[e]),d(b.Provider,{value:e,children:s})),_=f(!1),x=()=>m(_);_.Provider;function P(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var N=f(P()),q=()=>m(N),B=(e,s,o)=>{const t=o?.state.error&&typeof e.throwOnError=="function"?E(e.throwOnError,[o.state.error,o]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||t)&&(s.isReset()||(e.retryOnMount=!1))},U=e=>{l(()=>{e.clearReset()},[e])},F=({result:e,errorResetBoundary:s,throwOnError:o,query:t,suspense:n})=>e.isError&&!s.isReset()&&!e.isFetching&&t&&(n&&e.data===void 0||E(o,[e.error,t])),H=e=>{if(e.suspense){const o=n=>n==="static"?n:Math.max(n??1e3,1e3),t=e.staleTime;e.staleTime=typeof t=="function"?(...n)=>o(t(...n)):o(t),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},D=(e,s)=>e.isLoading&&e.isFetching&&!s,k=(e,s)=>e?.suspense&&s.isPending,R=(e,s,o)=>s.fetchOptimistic(e).catch(()=>{o.clearReset()});function A(e,s,o){const t=x(),n=q(),u=M(),r=u.defaultQueryOptions(e);u.getDefaultOptions().queries?._experimental_beforeQuery?.(r);const c=u.getQueryCache().get(r.queryHash);r._optimisticResults=t?"isRestoring":"optimistic",H(r),B(r,n,c),U(n);const w=!u.getQueryCache().get(r.queryHash),[i]=g(()=>new s(u,r)),a=i.getOptimisticResult(r),p=!t&&e.subscribed!==!1;if(C(h(v=>{const Q=p?i.subscribe(S.batchCalls(v)):y;return i.updateResult(),Q},[i,p]),()=>i.getCurrentResult()),l(()=>{i.setOptions(r)},[r,i]),k(r,a))throw R(r,i,n);if(F({result:a,errorResetBoundary:n,throwOnError:r.throwOnError,query:c,suspense:r.suspense}))throw a.error;return u.getDefaultOptions().queries?._experimental_afterQuery?.(r,a),r.experimental_prefetchInRender&&!O&&D(a,t)&&(w?R(r,i,n):c?.promise)?.catch(y).finally(()=>{i.updateResult()}),r.notifyOnChangeProps?a:i.trackResult(a)}function z(e,s){return A(e,I)}function G(e,s){const o=M(),[t]=g(()=>new T(o,e));l(()=>{t.setOptions(e)},[t,e]);const n=C(h(r=>t.subscribe(S.batchCalls(r)),[t]),()=>t.getCurrentResult()),u=h((r,c)=>{t.mutate(r,c).catch(y)},[t]);if(n.error&&E(t.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:u,mutateAsync:n.mutate}}export{j as Q,M as a,G as b,z as u};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
var W=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(){}},ln={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},dn=class{#e=ln;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},V=new dn;function fn(e){setTimeout(e,0)}var B=typeof window>"u"||"Deno"in globalThis;function A(){}function pn(e,t){return typeof e=="function"?e(t):e}function ke(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ot(e,t){return Math.max(e+(t||0)-Date.now(),0)}function F(e,t){return typeof e=="function"?e(t):e}function R(e,t){return typeof e=="function"?e(t):e}function Qe(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Te(o,t.options))return!1}else if(!te(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function Je(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Q(t.options.mutationKey)!==Q(i))return!1}else if(!te(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Te(e,t){return(t?.queryKeyHashFn||Q)(e)}function Q(e){return JSON.stringify(e,(t,n)=>Oe(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function te(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>te(e[n],t[n])):!1}var mn=Object.prototype.hasOwnProperty;function St(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=He(e)&&He(t);if(!r&&!(Oe(e)&&Oe(t)))return t;const i=(r?e:Object.keys(e)).length,o=r?t:Object.keys(t),a=o.length,c=r?new Array(a):{};let u=0;for(let l=0;l<a;l++){const f=r?l:o[l],d=e[f],p=t[f];if(d===p){c[f]=d,(r?l<i:mn.call(e,f))&&u++;continue}if(d===null||p===null||typeof d!="object"||typeof p!="object"){c[f]=p;continue}const g=St(d,p,n+1);c[f]=g,g===d&&u++}return i===a&&u===i?e:c}function le(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 He(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Oe(e){if(!Ke(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Ke(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ke(e){return Object.prototype.toString.call(e)==="[object Object]"}function vn(e){return new Promise(t=>{V.setTimeout(t,e)})}function Se(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?St(e,t):t}function gn(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function yn(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ce=Symbol();function Mt(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Ce?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Sa(e,t){return typeof e=="function"?e(...t):!!e}function _n(e,t,n){let r=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=t(),r||(r=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var bn=class extends W{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!B&&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"}},Ae=new bn;function Me(){let e,t;const n=new Promise((s,i)=>{e=s,t=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}var wn=fn;function zn(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=wn;const i=a=>{t?e.push(a):s(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{r(()=>{a.forEach(c=>{n(c)})})})};return{batch:a=>{let c;t++;try{c=a()}finally{t--,t||o()}return c},batchCalls:a=>(...c)=>{i(()=>{a(...c)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var P=zn(),kn=class extends W{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!B&&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}},de=new kn;function On(e){return Math.min(1e3*2**e,3e4)}function $t(e){return(e??"online")==="online"?de.isOnline():!0}var $e=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Pt(e){let t=!1,n=0,r;const s=Me(),i=()=>s.status!=="pending",o=v=>{if(!i()){const O=new $e(v);d(O),e.onCancel?.(O)}},a=()=>{t=!0},c=()=>{t=!1},u=()=>Ae.isFocused()&&(e.networkMode==="always"||de.isOnline())&&e.canRun(),l=()=>$t(e.networkMode)&&e.canRun(),f=v=>{i()||(r?.(),s.resolve(v))},d=v=>{i()||(r?.(),s.reject(v))},p=()=>new Promise(v=>{r=O=>{(i()||u())&&v(O)},e.onPause?.()}).then(()=>{r=void 0,i()||e.onContinue?.()}),g=()=>{if(i())return;let v;const O=n===0?e.initialPromise:void 0;try{v=O??e.fn()}catch(Z){v=Promise.reject(Z)}Promise.resolve(v).then(f).catch(Z=>{if(i())return;const T=e.retry??(B?0:3),S=e.retryDelay??On,k=typeof S=="function"?S(n,Z):S,$=T===!0||typeof T=="number"&&n<T||typeof T=="function"&&T(n,Z);if(t||!$){d(Z);return}n++,e.onFail?.(n,Z),vn(k).then(()=>u()?void 0:p()).then(()=>{t?d(Z):g()})})};return{promise:s,status:()=>s.status,cancel:o,continue:()=>(r?.(),s),cancelRetry:a,continueRetry:c,canStart:l,start:()=>(l()?g():p().then(g),s)}}var Zt=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ke(this.gcTime)&&(this.#e=V.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(B?1/0:300*1e3))}clearGcTimeout(){this.#e&&(V.clearTimeout(this.#e),this.#e=void 0)}},Sn=class extends Zt{#e;#t;#n;#s;#r;#i;#a;constructor(e){super(),this.#a=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#n=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Be(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=Be(this.options);t.data!==void 0&&(this.setState(qe(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=Se(this.state.data,e,this.options);return this.#o({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(A).catch(A):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>R(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ce||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>F(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:!Ot(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.#o({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 a=this.observers.find(c=>c.options.queryFn);a&&this.setOptions(a.options)}const n=new AbortController,r=a=>{Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},s=()=>{const a=Mt(this.options,t),u=(()=>{const l={client:this.#s,queryKey:this.queryKey,meta:this.meta};return r(l),l})();return this.#a=!1,this.options.persister?this.options.persister(a,u,this):a(u)},o=(()=>{const a={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:s};return r(a),a})();this.options.behavior?.onFetch(o,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#o({type:"fetch",meta:o.fetchOptions?.meta}),this.#r=Pt({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:a=>{a instanceof $e&&a.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(a,c)=>{this.#o({type:"failed",failureCount:a,error:c})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const a=await this.#r.start();if(a===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(a),this.#n.config.onSuccess?.(a,this),this.#n.config.onSettled?.(a,this.state.error,this),a}catch(a){if(a instanceof $e){if(a.silent)return this.#r.promise;if(a.revert){if(this.state.data===void 0)throw a;return this.state.data}}throw this.#o({type:"error",error:a}),this.#n.config.onError?.(a,this),this.#n.config.onSettled?.(this.state.data,a,this),a}finally{this.scheduleGc()}}#o(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,...Et(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...qe(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 s=e.error;return{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),P.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function Et(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:$t(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function qe(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Be(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 Ma=class extends W{constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.#a=Me(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#s=void 0;#r;#i;#a;#o;#m;#d;#f;#u;#h;#c;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Ge(this.#t,this.options)?this.#l():this.updateResult(),this.#_())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Pe(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Pe(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof R(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#z(),this.#t.setOptions(this.options),t._defaulted&&!le(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&We(this.#t,n,this.options,t)&&this.#l(),this.updateResult(),r&&(this.#t!==n||R(this.options.enabled,this.#t)!==R(t.enabled,this.#t)||F(this.options.staleTime,this.#t)!==F(t.staleTime,this.#t))&&this.#v();const s=this.#g();r&&(this.#t!==n||R(this.options.enabled,this.#t)!==R(t.enabled,this.#t)||s!==this.#c)&&this.#y(s)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return $n(this,n)&&(this.#s=n,this.#i=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#s}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.#l({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#l(e){this.#z();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(A)),t}#v(){this.#b();const e=F(this.options.staleTime,this.#t);if(B||this.#s.isStale||!ke(e))return;const n=Ot(this.#s.dataUpdatedAt,e)+1;this.#u=V.setTimeout(()=>{this.#s.isStale||this.updateResult()},n)}#g(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#w(),this.#c=e,!(B||R(this.options.enabled,this.#t)===!1||!ke(this.#c)||this.#c===0)&&(this.#h=V.setInterval(()=>{(this.options.refetchIntervalInBackground||Ae.isFocused())&&this.#l()},this.#c))}#_(){this.#v(),this.#y(this.#g())}#b(){this.#u&&(V.clearTimeout(this.#u),this.#u=void 0)}#w(){this.#h&&(V.clearInterval(this.#h),this.#h=void 0)}createResult(e,t){const n=this.#t,r=this.options,s=this.#s,i=this.#r,o=this.#i,c=e!==n?e.state:this.#n,{state:u}=e;let l={...u},f=!1,d;if(t._optimisticResults){const C=this.hasListeners(),Y=!C&&Ge(e,t),se=C&&We(e,n,t,r);(Y||se)&&(l={...l,...Et(u.data,e.options)}),t._optimisticResults==="isRestoring"&&(l.fetchStatus="idle")}let{error:p,errorUpdatedAt:g,status:v}=l;d=l.data;let O=!1;if(t.placeholderData!==void 0&&d===void 0&&v==="pending"){let C;s?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(C=s.data,O=!0):C=typeof t.placeholderData=="function"?t.placeholderData(this.#f?.state.data,this.#f):t.placeholderData,C!==void 0&&(v="success",d=Se(s?.data,C,t),f=!0)}if(t.select&&d!==void 0&&!O)if(s&&d===i?.data&&t.select===this.#m)d=this.#d;else try{this.#m=t.select,d=t.select(d),d=Se(s?.data,d,t),this.#d=d,this.#o=null}catch(C){this.#o=C}this.#o&&(p=this.#o,d=this.#d,g=Date.now(),v="error");const Z=l.fetchStatus==="fetching",T=v==="pending",S=v==="error",k=T&&Z,$=d!==void 0,x={status:v,fetchStatus:l.fetchStatus,isPending:T,isSuccess:v==="success",isError:S,isInitialLoading:k,isLoading:k,data:d,dataUpdatedAt:l.dataUpdatedAt,error:p,errorUpdatedAt:g,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>c.dataUpdateCount||l.errorUpdateCount>c.errorUpdateCount,isFetching:Z,isRefetching:Z&&!T,isLoadingError:S&&!$,isPaused:l.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:S&&$,isStale:Re(e,t),refetch:this.refetch,promise:this.#a,isEnabled:R(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const C=x.data!==void 0,Y=x.status==="error"&&!C,se=ie=>{Y?ie.reject(x.error):C&&ie.resolve(x.data)},Ve=()=>{const ie=this.#a=x.promise=Me();se(ie)},oe=this.#a;switch(oe.status){case"pending":e.queryHash===n.queryHash&&se(oe);break;case"fulfilled":(Y||x.data!==oe.value)&&Ve();break;case"rejected":(!Y||x.error!==oe.reason)&&Ve();break}}return x}updateResult(){const e=this.#s,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#i=this.options,this.#r.data!==void 0&&(this.#f=this.#t),le(t,e))return;this.#s=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,s=typeof r=="function"?r():r;if(s==="all"||!s&&!this.#p.size)return!0;const i=new Set(s??this.#p);return this.options.throwOnError&&i.add("error"),Object.keys(this.#s).some(o=>{const a=o;return this.#s[a]!==e[a]&&i.has(a)})};this.#k({listeners:n()})}#z(){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.#_()}#k(e){P.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#s)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Mn(e,t){return R(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Ge(e,t){return Mn(e,t)||e.state.data!==void 0&&Pe(e,t,t.refetchOnMount)}function Pe(e,t,n){if(R(t.enabled,e)!==!1&&F(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Re(e,t)}return!1}function We(e,t,n,r){return(e!==t||R(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Re(e,n)}function Re(e,t){return R(t.enabled,e)!==!1&&e.isStaleByTime(F(t.staleTime,e))}function $n(e,t){return!le(e.getCurrentResult(),t)}function Xe(e){return{onFetch:(t,n)=>{const r=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],o=t.state.data?.pageParams||[];let a={pages:[],pageParams:[]},c=0;const u=async()=>{let l=!1;const f=g=>{_n(g,()=>t.signal,()=>l=!0)},d=Mt(t.options,t.fetchOptions),p=async(g,v,O)=>{if(l)return Promise.reject();if(v==null&&g.pages.length)return Promise.resolve(g);const T=(()=>{const re={client:t.client,queryKey:t.queryKey,pageParam:v,direction:O?"backward":"forward",meta:t.options.meta};return f(re),re})(),S=await d(T),{maxPages:k}=t.options,$=O?yn:gn;return{pages:$(g.pages,S,k),pageParams:$(g.pageParams,v,k)}};if(s&&i.length){const g=s==="backward",v=g?Pn:Ye,O={pages:i,pageParams:o},Z=v(r,O);a=await p(O,Z,g)}else{const g=e??i.length;do{const v=c===0?o[0]??r.initialPageParam:Ye(r,a);if(c>0&&v==null)break;a=await p(a,v),c++}while(c<g)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function Ye(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 Pn(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Zn=class extends Zt{#e;#t;#n;#s;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||It(),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.#s?.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.#s=Pt({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(i,o)=>{this.#r({type:"failed",failureCount:i,error:o})},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",s=!this.#s.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:s}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const o=await this.options.onMutate?.(e,n);o!==this.state.context&&this.#r({type:"pending",context:o,variables:e,isPaused:s})}const i=await this.#s.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(o){Promise.reject(o)}try{await this.options.onError?.(i,e,this.state.context,n)}catch(o){Promise.reject(o)}try{await this.#n.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,n)}catch(o){Promise.reject(o)}try{await this.options.onSettled?.(void 0,i,e,this.state.context,n)}catch(o){Promise.reject(o)}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),P.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function It(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var En=class extends W{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 Zn({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=ae(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=ae(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=ae(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(s=>s.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=ae(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){P.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=>Je(t,n))}findAll(e={}){return this.getAll().filter(t=>Je(e,t))}notify(e){P.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return P.batch(()=>Promise.all(e.map(t=>t.continue().catch(A))))}};function ae(e){return e.options.scope?.id}var $a=class extends W{#e;#t=void 0;#n;#s;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#e.defaultMutationOptions(e),le(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&Q(t.mutationKey)!==Q(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#r(),this.#i(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#i()}mutate(e,t){return this.#s=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#r(){const e=this.#n?.state??It();this.#t={...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset}}#i(e){P.batch(()=>{if(this.#s&&this.hasListeners()){const t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#s.onSuccess?.(e.data,t,n,r)}catch(s){Promise.reject(s)}try{this.#s.onSettled?.(e.data,null,t,n,r)}catch(s){Promise.reject(s)}}else if(e?.type==="error"){try{this.#s.onError?.(e.error,t,n,r)}catch(s){Promise.reject(s)}try{this.#s.onSettled?.(void 0,e.error,t,n,r)}catch(s){Promise.reject(s)}}}this.listeners.forEach(t=>{t(this.#t)})})}},In=class extends W{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,s=t.queryHash??Te(r,t);let i=this.get(s);return i||(i=new Sn({client:e,queryKey:r,queryHash:s,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(){P.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=>Qe(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>Qe(e,n)):t}notify(e){P.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){P.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){P.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Pa=class{#e;#t;#n;#s;#r;#i;#a;#o;constructor(e={}){this.#e=e.queryCache||new In,this.#t=e.mutationCache||new En,this.#n=e.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#a=Ae.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=de.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#a?.(),this.#a=void 0,this.#o?.(),this.#o=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(F(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,o=pn(t,i);if(o!==void 0)return this.#e.build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return P.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;P.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return P.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=P.batch(()=>this.#e.findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(A).catch(A)}invalidateQueries(e,t={}){return P.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=P.batch(()=>this.#e.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(A)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(A)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(F(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(A).catch(A)}fetchInfiniteQuery(e){return e.behavior=Xe(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(A).catch(A)}ensureInfiniteQueryData(e){return e.behavior=Xe(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return de.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.#s.set(Q(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#s.values()],n={};return t.forEach(r=>{te(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(Q(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{te(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=Te(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===Ce&&(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()}};function h(e,t,n){function r(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:o,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);const u=o.prototype,l=Object.keys(u);for(let f=0;f<l.length;f++){const d=l[f];d in a||(a[d]=u[d].bind(a))}}const s=n?.Parent??Object;class i extends s{}Object.defineProperty(i,"name",{value:e});function o(a){var c;const u=n?.Parent?new i:this;r(u,a),(c=u._zod).deferred??(c.deferred=[]);for(const l of u._zod.deferred)l();return u}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:a=>n?.Parent&&a instanceof n.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}class q extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Tt extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Ct={};function N(e){return Ct}function At(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,s])=>t.indexOf(+r)===-1).map(([r,s])=>s)}function Ze(e,t){return typeof t=="bigint"?t.toString():t}function je(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function xe(e){return e==null}function Fe(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Tn(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let s=(r.split(".")[1]||"").length;if(s===0&&/\d?e-\d?/.test(r)){const c=r.match(/\d?e-(\d?)/);c?.[1]&&(s=Number.parseInt(c[1]))}const i=n>s?n:s,o=Number.parseInt(e.toFixed(i).replace(".","")),a=Number.parseInt(t.toFixed(i).replace(".",""));return o%a/10**i}const et=Symbol("evaluating");function y(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==et)return r===void 0&&(r=et,r=n()),r},set(s){Object.defineProperty(e,t,{value:s})},configurable:!0})}function J(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function U(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function tt(e){return JSON.stringify(e)}function Cn(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Rt="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function fe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const An=je(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function G(e){if(fe(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(fe(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function jt(e){return G(e)?{...e}:Array.isArray(e)?[...e]:e}const Rn=new Set(["string","number","symbol"]);function ge(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function L(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function m(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 jn(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const xn={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Fn(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=U(e._zod.def,{get shape(){const o={};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(o[a]=n.shape[a])}return J(this,"shape",o),o},checks:[]});return L(e,i)}function Nn(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=U(e._zod.def,{get shape(){const o={...e._zod.def.shape};for(const a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete o[a]}return J(this,"shape",o),o},checks:[]});return L(e,i)}function Dn(e,t){if(!G(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 o in t)if(Object.getOwnPropertyDescriptor(i,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=U(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return J(this,"shape",i),i}});return L(e,s)}function Un(e,t){if(!G(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=U(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return J(this,"shape",r),r}});return L(e,n)}function Ln(e,t){const n=U(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return J(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return L(e,n)}function Vn(e,t,n){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const o=U(t._zod.def,{get shape(){const a=t._zod.def.shape,c={...a};if(n)for(const u in n){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(c[u]=e?new e({type:"optional",innerType:a[u]}):a[u])}else for(const u in a)c[u]=e?new e({type:"optional",innerType:a[u]}):a[u];return J(this,"shape",c),c},checks:[]});return L(t,o)}function Qn(e,t,n){const r=U(t._zod.def,{get shape(){const s=t._zod.def.shape,i={...s};if(n)for(const o in n){if(!(o in i))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(i[o]=new e({type:"nonoptional",innerType:s[o]}))}else for(const o in s)i[o]=new e({type:"nonoptional",innerType:s[o]});return J(this,"shape",i),i}});return L(t,r)}function H(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 K(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function ce(e){return typeof e=="string"?e:e?.message}function D(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const s=ce(e.inst?._zod.def?.error?.(e))??ce(t?.error?.(e))??ce(n.customError?.(e))??ce(n.localeError?.(e))??"Invalid input";r.message=s}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Ne(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ne(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const xt=(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,Ze,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ft=h("$ZodError",xt),Nt=h("$ZodError",xt,{Parent:Error});function Jn(e,t=n=>n.message){const n={},r=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}function Hn(e,t=n=>n.message){const n={_errors:[]},r=s=>{for(const i of s.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(o=>r({issues:o}));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 o=n,a=0;for(;a<i.path.length;){const c=i.path[a];a===i.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(t(i))):o[c]=o[c]||{_errors:[]},o=o[c],a++}}};return r(e),n}const De=e=>(t,n,r,s)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new q;if(o.issues.length){const a=new(s?.Err??e)(o.issues.map(c=>D(c,i,N())));throw Rt(a,s?.callee),a}return o.value},Ue=e=>async(t,n,r,s)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise&&(o=await o),o.issues.length){const a=new(s?.Err??e)(o.issues.map(c=>D(c,i,N())));throw Rt(a,s?.callee),a}return o.value},ye=e=>(t,n,r)=>{const s=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new q;return i.issues.length?{success:!1,error:new(e??Ft)(i.issues.map(o=>D(o,s,N())))}:{success:!0,data:i.value}},Kn=ye(Nt),_e=e=>async(t,n,r)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},s);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(o=>D(o,s,N())))}:{success:!0,data:i.value}},qn=_e(Nt),Bn=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return De(e)(t,n,s)},Gn=e=>(t,n,r)=>De(e)(t,n,r),Wn=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ue(e)(t,n,s)},Xn=e=>async(t,n,r)=>Ue(e)(t,n,r),Yn=e=>(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ye(e)(t,n,s)},er=e=>(t,n,r)=>ye(e)(t,n,r),tr=e=>async(t,n,r)=>{const s=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return _e(e)(t,n,s)},nr=e=>async(t,n,r)=>_e(e)(t,n,r),rr=/^[cC][^\s-]{8,}$/,sr=/^[0-9a-z]+$/,or=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ir=/^[0-9a-vA-V]{20}$/,ar=/^[A-Za-z0-9]{27}$/,cr=/^[a-zA-Z0-9_-]{21}$/,ur=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,hr=/^([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})$/,nt=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)$/,lr=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,dr="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function fr(){return new RegExp(dr,"u")}const pr=/^(?:(?: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])$/,mr=/^(([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}|:))$/,vr=/^((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])$/,gr=/^(([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])$/,yr=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Dt=/^[A-Za-z0-9_-]*$/,_r=/^\+[1-9]\d{6,14}$/,Ut="(?:(?:\\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])))",br=new RegExp(`^${Ut}$`);function Lt(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 wr(e){return new RegExp(`^${Lt(e)}$`)}function zr(e){const t=Lt({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(`^${Ut}T(?:${r})$`)}const kr=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Or=/^-?\d+$/,Vt=/^-?\d+(?:\.\d+)?$/,Sr=/^(?:true|false)$/i,Mr=/^[^A-Z]*$/,$r=/^[^a-z]*$/,I=h("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Qt={number:"number",bigint:"bigint",object:"date"},Jt=h("$ZodCheckLessThan",(e,t)=>{I.init(e,t);const n=Qt[typeof t.value];e._zod.onattach.push(r=>{const s=r._zod.bag,i=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?s.maximum=t.value:s.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ht=h("$ZodCheckGreaterThan",(e,t)=>{I.init(e,t);const n=Qt[typeof t.value];e._zod.onattach.push(r=>{const s=r._zod.bag,i=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Pr=h("$ZodCheckMultipleOf",(e,t)=>{I.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):Tn(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Zr=h("$ZodCheckNumberFormat",(e,t)=>{I.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[s,i]=xn[t.format];e._zod.onattach.push(o=>{const a=o._zod.bag;a.format=t.format,a.minimum=s,a.maximum=i,n&&(a.pattern=Or)}),e._zod.check=o=>{const a=o.value;if(n){if(!Number.isInteger(a)){o.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?o.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}a<s&&o.issues.push({origin:"number",input:a,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort}),a>i&&o.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Er=h("$ZodCheckMaxLength",(e,t)=>{var n;I.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!xe(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<s&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const s=r.value;if(s.length<=t.maximum)return;const o=Ne(s);r.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),Ir=h("$ZodCheckMinLength",(e,t)=>{var n;I.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!xe(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const s=r.value;if(s.length>=t.minimum)return;const o=Ne(s);r.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),Tr=h("$ZodCheckLengthEquals",(e,t)=>{var n;I.init(e,t),(n=e._zod.def).when??(n.when=r=>{const s=r.value;return!xe(s)&&s.length!==void 0}),e._zod.onattach.push(r=>{const s=r._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=r=>{const s=r.value,i=s.length;if(i===t.length)return;const o=Ne(s),a=i>t.length;r.issues.push({origin:o,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),be=h("$ZodCheckStringFormat",(e,t)=>{var n,r;I.init(e,t),e._zod.onattach.push(s=>{const i=s._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=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Cr=h("$ZodCheckRegex",(e,t)=>{be.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})}}),Ar=h("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Mr),be.init(e,t)}),Rr=h("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=$r),be.init(e,t)}),jr=h("$ZodCheckIncludes",(e,t)=>{I.init(e,t);const n=ge(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(s=>{const i=s._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),xr=h("$ZodCheckStartsWith",(e,t)=>{I.init(e,t);const n=new RegExp(`^${ge(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const s=r._zod.bag;s.patterns??(s.patterns=new Set),s.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})}}),Fr=h("$ZodCheckEndsWith",(e,t)=>{I.init(e,t);const n=new RegExp(`.*${ge(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const s=r._zod.bag;s.patterns??(s.patterns=new Set),s.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})}}),Nr=h("$ZodCheckOverwrite",(e,t)=>{I.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Dr{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(`
|
|
2
|
-
`).filter(o=>o),s=Math.min(...r.map(o=>o.length-o.trimStart().length)),i=r.map(o=>o.slice(s)).map(o=>" ".repeat(this.indent*2)+o);for(const o of i)this.content.push(o)}compile(){const t=Function,n=this?.args,s=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,s.join(`
|
|
3
|
-
`))}}const Ur={major:4,minor:3,patch:6},b=h("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ur;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const s of r)for(const i of s._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 s=(o,a,c)=>{let u=H(o),l;for(const f of a){if(f._zod.def.when){if(!f._zod.def.when(o))continue}else if(u)continue;const d=o.issues.length,p=f._zod.check(o);if(p instanceof Promise&&c?.async===!1)throw new q;if(l||p instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await p,o.issues.length!==d&&(u||(u=H(o,d)))});else{if(o.issues.length===d)continue;u||(u=H(o,d))}}return l?l.then(()=>o):o},i=(o,a,c)=>{if(H(o))return o.aborted=!0,o;const u=s(a,r,c);if(u instanceof Promise){if(c.async===!1)throw new q;return u.then(l=>e._zod.parse(l,c))}return e._zod.parse(u,c)};e._zod.run=(o,a)=>{if(a.skipChecks)return e._zod.parse(o,a);if(a.direction==="backward"){const u=e._zod.parse({value:o.value,issues:[]},{...a,skipChecks:!0});return u instanceof Promise?u.then(l=>i(l,o,a)):i(u,o,a)}const c=e._zod.parse(o,a);if(c instanceof Promise){if(a.async===!1)throw new q;return c.then(u=>s(u,r,a))}return s(c,r,a)}}y(e,"~standard",()=>({validate:s=>{try{const i=Kn(e,s);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return qn(e,s).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}))}),Le=h("$ZodString",(e,t)=>{b.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??kr(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}}),_=h("$ZodStringFormat",(e,t)=>{be.init(e,t),Le.init(e,t)}),Lr=h("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=hr),_.init(e,t)}),Vr=h("$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=nt(r))}else t.pattern??(t.pattern=nt());_.init(e,t)}),Qr=h("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=lr),_.init(e,t)}),Jr=h("$ZodURL",(e,t)=>{_.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),s=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.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(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.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=s.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Hr=h("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=fr()),_.init(e,t)}),Kr=h("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=cr),_.init(e,t)}),qr=h("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=rr),_.init(e,t)}),Br=h("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=sr),_.init(e,t)}),Gr=h("$ZodULID",(e,t)=>{t.pattern??(t.pattern=or),_.init(e,t)}),Wr=h("$ZodXID",(e,t)=>{t.pattern??(t.pattern=ir),_.init(e,t)}),Xr=h("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=ar),_.init(e,t)}),Yr=h("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=zr(t)),_.init(e,t)}),es=h("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=br),_.init(e,t)}),ts=h("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=wr(t)),_.init(e,t)}),ns=h("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=ur),_.init(e,t)}),rs=h("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=pr),_.init(e,t),e._zod.bag.format="ipv4"}),ss=h("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=mr),_.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})}}}),os=h("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=vr),_.init(e,t)}),is=h("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=gr),_.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[s,i]=r;if(!i)throw new Error;const o=Number(i);if(`${o}`!==i)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${s}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Kt(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const as=h("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=yr),_.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Kt(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function cs(e){if(!Dt.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Kt(n)}const us=h("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Dt),_.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{cs(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),hs=h("$ZodE164",(e,t)=>{t.pattern??(t.pattern=_r),_.init(e,t)});function ls(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const s=JSON.parse(atob(r));return!("typ"in s&&s?.typ!=="JWT"||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}}const ds=h("$ZodJWT",(e,t)=>{_.init(e,t),e._zod.check=n=>{ls(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),qt=h("$ZodNumber",(e,t)=>{b.init(e,t),e._zod.pattern=e._zod.bag.pattern??Vt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const s=n.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return n;const i=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...i?{received:i}:{}}),n}}),fs=h("$ZodNumberFormat",(e,t)=>{Zr.init(e,t),qt.init(e,t)}),ps=h("$ZodBoolean",(e,t)=>{b.init(e,t),e._zod.pattern=Sr,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const s=n.value;return typeof s=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),n}}),ms=h("$ZodAny",(e,t)=>{b.init(e,t),e._zod.parse=n=>n}),vs=h("$ZodUnknown",(e,t)=>{b.init(e,t),e._zod.parse=n=>n}),gs=h("$ZodNever",(e,t)=>{b.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function rt(e,t,n){e.issues.length&&t.issues.push(...K(n,e.issues)),t.value[n]=e.value}const ys=h("$ZodArray",(e,t)=>{b.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),n;n.value=Array(s.length);const i=[];for(let o=0;o<s.length;o++){const a=s[o],c=t.element._zod.run({value:a,issues:[]},r);c instanceof Promise?i.push(c.then(u=>rt(u,n,o))):rt(c,n,o)}return i.length?Promise.all(i).then(()=>n):n}});function pe(e,t,n,r,s){if(e.issues.length){if(s&&!(n in r))return;t.issues.push(...K(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function Bt(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=jn(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Gt(e,t,n,r,s,i){const o=[],a=s.keySet,c=s.catchall._zod,u=c.def.type,l=c.optout==="optional";for(const f in t){if(a.has(f))continue;if(u==="never"){o.push(f);continue}const d=c.run({value:t[f],issues:[]},r);d instanceof Promise?e.push(d.then(p=>pe(p,n,f,t,l))):pe(d,n,f,t,l)}return o.length&&n.issues.push({code:"unrecognized_keys",keys:o,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const _s=h("$ZodObject",(e,t)=>{if(b.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const c={...a};return Object.defineProperty(t,"shape",{value:c}),c}})}const r=je(()=>Bt(t));y(e._zod,"propValues",()=>{const a=t.shape,c={};for(const u in a){const l=a[u]._zod;if(l.values){c[u]??(c[u]=new Set);for(const f of l.values)c[u].add(f)}}return c});const s=fe,i=t.catchall;let o;e._zod.parse=(a,c)=>{o??(o=r.value);const u=a.value;if(!s(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),a;a.value={};const l=[],f=o.shape;for(const d of o.keys){const p=f[d],g=p._zod.optout==="optional",v=p._zod.run({value:u[d],issues:[]},c);v instanceof Promise?l.push(v.then(O=>pe(O,a,d,u,g))):pe(v,a,d,u,g)}return i?Gt(l,u,a,c,r.value,e):l.length?Promise.all(l).then(()=>a):a}}),bs=h("$ZodObjectJIT",(e,t)=>{_s.init(e,t);const n=e._zod.parse,r=je(()=>Bt(t)),s=d=>{const p=new Dr(["shape","payload","ctx"]),g=r.value,v=S=>{const k=tt(S);return`shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`};p.write("const input = payload.value;");const O=Object.create(null);let Z=0;for(const S of g.keys)O[S]=`key_${Z++}`;p.write("const newResult = {};");for(const S of g.keys){const k=O[S],$=tt(S),x=d[S]?._zod?.optout==="optional";p.write(`const ${k} = ${v(S)};`),x?p.write(`
|
|
4
|
-
if (${k}.issues.length) {
|
|
5
|
-
if (${$} in input) {
|
|
6
|
-
payload.issues = payload.issues.concat(${k}.issues.map(iss => ({
|
|
7
|
-
...iss,
|
|
8
|
-
path: iss.path ? [${$}, ...iss.path] : [${$}]
|
|
9
|
-
})));
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
if (${k}.value === undefined) {
|
|
14
|
-
if (${$} in input) {
|
|
15
|
-
newResult[${$}] = undefined;
|
|
16
|
-
}
|
|
17
|
-
} else {
|
|
18
|
-
newResult[${$}] = ${k}.value;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
`):p.write(`
|
|
22
|
-
if (${k}.issues.length) {
|
|
23
|
-
payload.issues = payload.issues.concat(${k}.issues.map(iss => ({
|
|
24
|
-
...iss,
|
|
25
|
-
path: iss.path ? [${$}, ...iss.path] : [${$}]
|
|
26
|
-
})));
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if (${k}.value === undefined) {
|
|
30
|
-
if (${$} in input) {
|
|
31
|
-
newResult[${$}] = undefined;
|
|
32
|
-
}
|
|
33
|
-
} else {
|
|
34
|
-
newResult[${$}] = ${k}.value;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
`)}p.write("payload.value = newResult;"),p.write("return payload;");const T=p.compile();return(S,k)=>T(d,S,k)};let i;const o=fe,a=!Ct.jitless,u=a&&An.value,l=t.catchall;let f;e._zod.parse=(d,p)=>{f??(f=r.value);const g=d.value;return o(g)?a&&u&&p?.async===!1&&p.jitless!==!0?(i||(i=s(t.shape)),d=i(d,p),l?Gt([],g,d,p,f,e):d):n(d,p):(d.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),d)}});function st(e,t,n,r){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const s=e.filter(i=>!H(i));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(o=>D(o,r,N())))}),t)}const ws=h("$ZodUnion",(e,t)=>{b.init(e,t),y(e._zod,"optin",()=>t.options.some(s=>s._zod.optin==="optional")?"optional":void 0),y(e._zod,"optout",()=>t.options.some(s=>s._zod.optout==="optional")?"optional":void 0),y(e._zod,"values",()=>{if(t.options.every(s=>s._zod.values))return new Set(t.options.flatMap(s=>Array.from(s._zod.values)))}),y(e._zod,"pattern",()=>{if(t.options.every(s=>s._zod.pattern)){const s=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${s.map(i=>Fe(i.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(s,i)=>{if(n)return r(s,i);let o=!1;const a=[];for(const c of t.options){const u=c._zod.run({value:s.value,issues:[]},i);if(u instanceof Promise)a.push(u),o=!0;else{if(u.issues.length===0)return u;a.push(u)}}return o?Promise.all(a).then(c=>st(c,s,e,i)):st(a,s,e,i)}}),zs=h("$ZodIntersection",(e,t)=>{b.init(e,t),e._zod.parse=(n,r)=>{const s=n.value,i=t.left._zod.run({value:s,issues:[]},r),o=t.right._zod.run({value:s,issues:[]},r);return i instanceof Promise||o instanceof Promise?Promise.all([i,o]).then(([c,u])=>ot(n,c,u)):ot(n,i,o)}});function Ee(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(G(e)&&G(t)){const n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),s={...e,...t};for(const i of r){const o=Ee(e[i],t[i]);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};s[i]=o.data}return{valid:!0,data:s}}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 s=e[r],i=t[r],o=Ee(s,i);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function ot(e,t,n){const r=new Map;let s;for(const a of t.issues)if(a.code==="unrecognized_keys"){s??(s=a);for(const c of a.keys)r.has(c)||r.set(c,{}),r.get(c).l=!0}else e.issues.push(a);for(const a of n.issues)if(a.code==="unrecognized_keys")for(const c of a.keys)r.has(c)||r.set(c,{}),r.get(c).r=!0;else e.issues.push(a);const i=[...r].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(i.length&&s&&e.issues.push({...s,keys:i}),H(e))return e;const o=Ee(t.value,n.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}const ks=h("$ZodRecord",(e,t)=>{b.init(e,t),e._zod.parse=(n,r)=>{const s=n.value;if(!G(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const i=[],o=t.keyType._zod.values;if(o){n.value={};const a=new Set;for(const u of o)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){a.add(typeof u=="number"?u.toString():u);const l=t.valueType._zod.run({value:s[u],issues:[]},r);l instanceof Promise?i.push(l.then(f=>{f.issues.length&&n.issues.push(...K(u,f.issues)),n.value[u]=f.value})):(l.issues.length&&n.issues.push(...K(u,l.issues)),n.value[u]=l.value)}let c;for(const u in s)a.has(u)||(c=c??[],c.push(u));c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:c})}else{n.value={};for(const a of Reflect.ownKeys(s)){if(a==="__proto__")continue;let c=t.keyType._zod.run({value:a,issues:[]},r);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&Vt.test(a)&&c.issues.length){const f=t.keyType._zod.run({value:Number(a),issues:[]},r);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");f.issues.length===0&&(c=f)}if(c.issues.length){t.mode==="loose"?n.value[a]=s[a]:n.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(f=>D(f,r,N())),input:a,path:[a],inst:e});continue}const l=t.valueType._zod.run({value:s[a],issues:[]},r);l instanceof Promise?i.push(l.then(f=>{f.issues.length&&n.issues.push(...K(a,f.issues)),n.value[c.value]=f.value})):(l.issues.length&&n.issues.push(...K(a,l.issues)),n.value[c.value]=l.value)}}return i.length?Promise.all(i).then(()=>n):n}}),Os=h("$ZodEnum",(e,t)=>{b.init(e,t);const n=At(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(s=>Rn.has(typeof s)).map(s=>typeof s=="string"?ge(s):s.toString()).join("|")})$`),e._zod.parse=(s,i)=>{const o=s.value;return r.has(o)||s.issues.push({code:"invalid_value",values:n,input:o,inst:e}),s}}),Ss=h("$ZodTransform",(e,t)=>{b.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Tt(e.constructor.name);const s=t.transform(n.value,n);if(r.async)return(s instanceof Promise?s:Promise.resolve(s)).then(o=>(n.value=o,n));if(s instanceof Promise)throw new q;return n.value=s,n}});function it(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Wt=h("$ZodOptional",(e,t)=>{b.init(e,t),e._zod.optin="optional",e._zod.optout="optional",y(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),y(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Fe(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(i=>it(i,n.value)):it(s,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),Ms=h("$ZodExactOptional",(e,t)=>{Wt.init(e,t),y(e._zod,"values",()=>t.innerType._zod.values),y(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),$s=h("$ZodNullable",(e,t)=>{b.init(e,t),y(e._zod,"optin",()=>t.innerType._zod.optin),y(e._zod,"optout",()=>t.innerType._zod.optout),y(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Fe(n.source)}|null)$`):void 0}),y(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)}),Ps=h("$ZodDefault",(e,t)=>{b.init(e,t),e._zod.optin="optional",y(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 s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(i=>at(i,t)):at(s,t)}});function at(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Zs=h("$ZodPrefault",(e,t)=>{b.init(e,t),e._zod.optin="optional",y(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))}),Es=h("$ZodNonOptional",(e,t)=>{b.init(e,t),y(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 s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(i=>ct(i,e)):ct(s,e)}});function ct(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 Is=h("$ZodCatch",(e,t)=>{b.init(e,t),y(e._zod,"optin",()=>t.innerType._zod.optin),y(e._zod,"optout",()=>t.innerType._zod.optout),y(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(o=>D(o,r,N()))},input:n.value}),n.issues=[]),n)):(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(i=>D(i,r,N()))},input:n.value}),n.issues=[]),n)}}),Ts=h("$ZodPipe",(e,t)=>{b.init(e,t),y(e._zod,"values",()=>t.in._zod.values),y(e._zod,"optin",()=>t.in._zod.optin),y(e._zod,"optout",()=>t.out._zod.optout),y(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(o=>ue(o,t.in,r)):ue(i,t.in,r)}const s=t.in._zod.run(n,r);return s instanceof Promise?s.then(i=>ue(i,t.out,r)):ue(s,t.out,r)}});function ue(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Cs=h("$ZodReadonly",(e,t)=>{b.init(e,t),y(e._zod,"propValues",()=>t.innerType._zod.propValues),y(e._zod,"values",()=>t.innerType._zod.values),y(e._zod,"optin",()=>t.innerType?._zod?.optin),y(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const s=t.innerType._zod.run(n,r);return s instanceof Promise?s.then(ut):ut(s)}});function ut(e){return e.value=Object.freeze(e.value),e}const As=h("$ZodCustom",(e,t)=>{I.init(e,t),b.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,s=t.fn(r);if(s instanceof Promise)return s.then(i=>ht(i,n,r,e));ht(s,n,r,e)}});function ht(e,t,n,r){if(!e){const s={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(s.params=r._zod.def.params),t.issues.push(ne(s))}}var lt;class Rs{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 s={...r,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function js(){return new Rs}(lt=globalThis).__zod_globalRegistry??(lt.__zod_globalRegistry=js());const ee=globalThis.__zod_globalRegistry;function xs(e,t){return new e({type:"string",...m(t)})}function Fs(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...m(t)})}function dt(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...m(t)})}function Ns(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...m(t)})}function Ds(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...m(t)})}function Us(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...m(t)})}function Ls(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...m(t)})}function Vs(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...m(t)})}function Qs(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...m(t)})}function Js(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...m(t)})}function Hs(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...m(t)})}function Ks(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...m(t)})}function qs(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...m(t)})}function Bs(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...m(t)})}function Gs(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...m(t)})}function Ws(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...m(t)})}function Xs(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...m(t)})}function Ys(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...m(t)})}function eo(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...m(t)})}function to(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...m(t)})}function no(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...m(t)})}function ro(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...m(t)})}function so(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...m(t)})}function oo(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...m(t)})}function io(e,t){return new e({type:"string",format:"date",check:"string_format",...m(t)})}function ao(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...m(t)})}function co(e,t){return new e({type:"string",format:"duration",check:"string_format",...m(t)})}function uo(e,t){return new e({type:"number",checks:[],...m(t)})}function ho(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...m(t)})}function lo(e,t){return new e({type:"boolean",...m(t)})}function fo(e){return new e({type:"any"})}function po(e){return new e({type:"unknown"})}function mo(e,t){return new e({type:"never",...m(t)})}function ft(e,t){return new Jt({check:"less_than",...m(t),value:e,inclusive:!1})}function we(e,t){return new Jt({check:"less_than",...m(t),value:e,inclusive:!0})}function pt(e,t){return new Ht({check:"greater_than",...m(t),value:e,inclusive:!1})}function ze(e,t){return new Ht({check:"greater_than",...m(t),value:e,inclusive:!0})}function mt(e,t){return new Pr({check:"multiple_of",...m(t),value:e})}function Xt(e,t){return new Er({check:"max_length",...m(t),maximum:e})}function me(e,t){return new Ir({check:"min_length",...m(t),minimum:e})}function Yt(e,t){return new Tr({check:"length_equals",...m(t),length:e})}function vo(e,t){return new Cr({check:"string_format",format:"regex",...m(t),pattern:e})}function go(e){return new Ar({check:"string_format",format:"lowercase",...m(e)})}function yo(e){return new Rr({check:"string_format",format:"uppercase",...m(e)})}function _o(e,t){return new jr({check:"string_format",format:"includes",...m(t),includes:e})}function bo(e,t){return new xr({check:"string_format",format:"starts_with",...m(t),prefix:e})}function wo(e,t){return new Fr({check:"string_format",format:"ends_with",...m(t),suffix:e})}function X(e){return new Nr({check:"overwrite",tx:e})}function zo(e){return X(t=>t.normalize(e))}function ko(){return X(e=>e.trim())}function Oo(){return X(e=>e.toLowerCase())}function So(){return X(e=>e.toUpperCase())}function Mo(){return X(e=>Cn(e))}function $o(e,t,n){return new e({type:"array",element:t,...m(n)})}function Po(e,t,n){return new e({type:"custom",check:"custom",fn:t,...m(n)})}function Zo(e){const t=Eo(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(ne(r,n.value,t._zod.def));else{const s=r;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=t),s.continue??(s.continue=!t._zod.def.abort),n.issues.push(ne(s))}},e(n.value,n)));return t}function Eo(e,t){const n=new I({check:"custom",...m(t)});return n._zod.check=e,n}function en(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??ee,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 M(e,t,n={path:[],schemaPath:[]}){var r;const s=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);const a=e._zod.toJSONSchema?.();if(a)o.schema=a;else{const l={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,l);else{const d=o.schema,p=t.processors[s.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);p(e,t,d,l)}const f=e._zod.parent;f&&(o.ref||(o.ref=f),M(f,t,l),t.seen.get(f).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io==="input"&&E(e)&&(delete o.schema.examples,delete o.schema.default),t.io==="input"&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function tn(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 o of e.seen.entries()){const a=e.metadataRegistry.get(o[0])?.id;if(a){const c=r.get(a);if(c&&c!==o[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(a,o[0])}}const s=o=>{const a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const f=e.external.registry.get(o[0])?.id,d=e.external.uri??(g=>g);if(f)return{ref:d(f)};const p=o[1].defId??o[1].schema.id??`schema${e.counter++}`;return o[1].defId=p,{defId:p,ref:`${d("__shared")}#/${a}/${p}`}}if(o[1]===n)return{ref:"#"};const u=`#/${a}/`,l=o[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:u+l}},i=o=>{if(o[1].schema.$ref)return;const a=o[1],{ref:c,defId:u}=s(o);a.def={...a.schema},u&&(a.defId=u);const l=a.schema;for(const f in l)delete l[f];l.$ref=c};if(e.cycles==="throw")for(const o of e.seen.entries()){const a=o[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
|
|
38
|
-
|
|
39
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const o of e.seen.entries()){const a=o[1];if(t===o[0]){i(o);continue}if(e.external){const u=e.external.registry.get(o[0])?.id;if(t!==o[0]&&u){i(o);continue}}if(e.metadataRegistry.get(o[0])?.id){i(o);continue}if(a.cycle){i(o);continue}if(a.count>1&&e.reused==="ref"){i(o);continue}}}function nn(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=o=>{const a=e.seen.get(o);if(a.ref===null)return;const c=a.def??a.schema,u={...c},l=a.ref;if(a.ref=null,l){r(l);const d=e.seen.get(l),p=d.schema;if(p.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(p)):Object.assign(c,p),Object.assign(c,u),o._zod.parent===l)for(const v in c)v==="$ref"||v==="allOf"||v in u||delete c[v];if(p.$ref&&d.def)for(const v in c)v==="$ref"||v==="allOf"||v in d.def&&JSON.stringify(c[v])===JSON.stringify(d.def[v])&&delete c[v]}const f=o._zod.parent;if(f&&f!==l){r(f);const d=e.seen.get(f);if(d?.schema.$ref&&(c.$ref=d.schema.$ref,d.def))for(const p in c)p==="$ref"||p==="allOf"||p in d.def&&JSON.stringify(c[p])===JSON.stringify(d.def[p])&&delete c[p]}e.override({zodSchema:o,jsonSchema:c,path:a.path??[]})};for(const o of[...e.seen.entries()].reverse())r(o[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const o=e.external.registry.get(t)?.id;if(!o)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(o)}Object.assign(s,n.def??n.schema);const i=e.external?.defs??{};for(const o of e.seen.entries()){const a=o[1];a.def&&a.defId&&(i[a.defId]=a.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?s.$defs=i:s.definitions=i);try{const o=JSON.parse(JSON.stringify(s));return Object.defineProperty(o,"~standard",{value:{...t["~standard"],jsonSchema:{input:ve(t,"input",e.processors),output:ve(t,"output",e.processors)}},enumerable:!1,writable:!1}),o}catch{throw new Error("Error converting schema to JSON.")}}function E(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 E(r.element,n);if(r.type==="set")return E(r.valueType,n);if(r.type==="lazy")return E(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 E(r.innerType,n);if(r.type==="intersection")return E(r.left,n)||E(r.right,n);if(r.type==="record"||r.type==="map")return E(r.keyType,n)||E(r.valueType,n);if(r.type==="pipe")return E(r.in,n)||E(r.out,n);if(r.type==="object"){for(const s in r.shape)if(E(r.shape[s],n))return!0;return!1}if(r.type==="union"){for(const s of r.options)if(E(s,n))return!0;return!1}if(r.type==="tuple"){for(const s of r.items)if(E(s,n))return!0;return!!(r.rest&&E(r.rest,n))}return!1}const Io=(e,t={})=>n=>{const r=en({...n,processors:t});return M(e,r),tn(r,e),nn(r,e)},ve=(e,t,n={})=>r=>{const{libraryOptions:s,target:i}=r??{},o=en({...s??{},target:i,io:t,processors:n});return M(e,o),tn(o,e),nn(o,e)},To={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Co=(e,t,n,r)=>{const s=n;s.type="string";const{minimum:i,maximum:o,format:a,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof i=="number"&&(s.minLength=i),typeof o=="number"&&(s.maxLength=o),a&&(s.format=To[a]??a,s.format===""&&delete s.format,a==="time"&&delete s.format),u&&(s.contentEncoding=u),c&&c.size>0){const l=[...c];l.length===1?s.pattern=l[0].source:l.length>1&&(s.allOf=[...l.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},Ao=(e,t,n,r)=>{const s=n,{minimum:i,maximum:o,format:a,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:l}=e._zod.bag;typeof a=="string"&&a.includes("int")?s.type="integer":s.type="number",typeof l=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.minimum=l,s.exclusiveMinimum=!0):s.exclusiveMinimum=l),typeof i=="number"&&(s.minimum=i,typeof l=="number"&&t.target!=="draft-04"&&(l>=i?delete s.minimum:delete s.exclusiveMinimum)),typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.maximum=u,s.exclusiveMaximum=!0):s.exclusiveMaximum=u),typeof o=="number"&&(s.maximum=o,typeof u=="number"&&t.target!=="draft-04"&&(u<=o?delete s.maximum:delete s.exclusiveMaximum)),typeof c=="number"&&(s.multipleOf=c)},Ro=(e,t,n,r)=>{n.type="boolean"},jo=(e,t,n,r)=>{n.not={}},xo=(e,t,n,r)=>{},Fo=(e,t,n,r)=>{},No=(e,t,n,r)=>{const s=e._zod.def,i=At(s.entries);i.every(o=>typeof o=="number")&&(n.type="number"),i.every(o=>typeof o=="string")&&(n.type="string"),n.enum=i},Do=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Uo=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Lo=(e,t,n,r)=>{const s=n,i=e._zod.def,{minimum:o,maximum:a}=e._zod.bag;typeof o=="number"&&(s.minItems=o),typeof a=="number"&&(s.maxItems=a),s.type="array",s.items=M(i.element,t,{...r,path:[...r.path,"items"]})},Vo=(e,t,n,r)=>{const s=n,i=e._zod.def;s.type="object",s.properties={};const o=i.shape;for(const u in o)s.properties[u]=M(o[u],t,{...r,path:[...r.path,"properties",u]});const a=new Set(Object.keys(o)),c=new Set([...a].filter(u=>{const l=i.shape[u]._zod;return t.io==="input"?l.optin===void 0:l.optout===void 0}));c.size>0&&(s.required=Array.from(c)),i.catchall?._zod.def.type==="never"?s.additionalProperties=!1:i.catchall?i.catchall&&(s.additionalProperties=M(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},Qo=(e,t,n,r)=>{const s=e._zod.def,i=s.inclusive===!1,o=s.options.map((a,c)=>M(a,t,{...r,path:[...r.path,i?"oneOf":"anyOf",c]}));i?n.oneOf=o:n.anyOf=o},Jo=(e,t,n,r)=>{const s=e._zod.def,i=M(s.left,t,{...r,path:[...r.path,"allOf",0]}),o=M(s.right,t,{...r,path:[...r.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,c=[...a(i)?i.allOf:[i],...a(o)?o.allOf:[o]];n.allOf=c},Ho=(e,t,n,r)=>{const s=n,i=e._zod.def;s.type="object";const o=i.keyType,c=o._zod.bag?.patterns;if(i.mode==="loose"&&c&&c.size>0){const l=M(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});s.patternProperties={};for(const f of c)s.patternProperties[f.source]=l}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(s.propertyNames=M(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),s.additionalProperties=M(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const u=o._zod.values;if(u){const l=[...u].filter(f=>typeof f=="string"||typeof f=="number");l.length>0&&(s.required=l)}},Ko=(e,t,n,r)=>{const s=e._zod.def,i=M(s.innerType,t,r),o=t.seen.get(e);t.target==="openapi-3.0"?(o.ref=s.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},qo=(e,t,n,r)=>{const s=e._zod.def;M(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType},Bo=(e,t,n,r)=>{const s=e._zod.def;M(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType,n.default=JSON.parse(JSON.stringify(s.defaultValue))},Go=(e,t,n,r)=>{const s=e._zod.def;M(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},Wo=(e,t,n,r)=>{const s=e._zod.def;M(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType;let o;try{o=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=o},Xo=(e,t,n,r)=>{const s=e._zod.def,i=t.io==="input"?s.in._zod.def.type==="transform"?s.out:s.in:s.out;M(i,t,r);const o=t.seen.get(e);o.ref=i},Yo=(e,t,n,r)=>{const s=e._zod.def;M(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType,n.readOnly=!0},rn=(e,t,n,r)=>{const s=e._zod.def;M(s.innerType,t,r);const i=t.seen.get(e);i.ref=s.innerType},ei=h("ZodISODateTime",(e,t)=>{Yr.init(e,t),z.init(e,t)});function ti(e){return oo(ei,e)}const ni=h("ZodISODate",(e,t)=>{es.init(e,t),z.init(e,t)});function ri(e){return io(ni,e)}const si=h("ZodISOTime",(e,t)=>{ts.init(e,t),z.init(e,t)});function oi(e){return ao(si,e)}const ii=h("ZodISODuration",(e,t)=>{ns.init(e,t),z.init(e,t)});function ai(e){return co(ii,e)}const ci=(e,t)=>{Ft.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Hn(e,n)},flatten:{value:n=>Jn(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Ze,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Ze,2)}},isEmpty:{get(){return e.issues.length===0}}})},j=h("ZodError",ci,{Parent:Error}),ui=De(j),hi=Ue(j),li=ye(j),di=_e(j),fi=Bn(j),pi=Gn(j),mi=Wn(j),vi=Xn(j),gi=Yn(j),yi=er(j),_i=tr(j),bi=nr(j),w=h("ZodType",(e,t)=>(b.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:ve(e,"input"),output:ve(e,"output")}}),e.toJSONSchema=Io(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(U(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)=>L(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>ui(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>li(e,n,r),e.parseAsync=async(n,r)=>hi(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>di(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>fi(e,n,r),e.decode=(n,r)=>pi(e,n,r),e.encodeAsync=async(n,r)=>mi(e,n,r),e.decodeAsync=async(n,r)=>vi(e,n,r),e.safeEncode=(n,r)=>gi(e,n,r),e.safeDecode=(n,r)=>yi(e,n,r),e.safeEncodeAsync=async(n,r)=>_i(e,n,r),e.safeDecodeAsync=async(n,r)=>bi(e,n,r),e.refine=(n,r)=>e.check(va(n,r)),e.superRefine=n=>e.check(ga(n)),e.overwrite=n=>e.check(X(n)),e.optional=()=>_t(e),e.exactOptional=()=>ra(e),e.nullable=()=>bt(e),e.nullish=()=>_t(bt(e)),e.nonoptional=n=>ua(e,n),e.array=()=>Hi(e),e.or=n=>Bi([e,n]),e.and=n=>Wi(e,n),e.transform=n=>wt(e,ta(n)),e.default=n=>ia(e,n),e.prefault=n=>ca(e,n),e.catch=n=>la(e,n),e.pipe=n=>wt(e,n),e.readonly=()=>pa(e),e.describe=n=>{const r=e.clone();return ee.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return ee.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return ee.get(e);const r=e.clone();return ee.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),sn=h("_ZodString",(e,t)=>{Le.init(e,t),w.init(e,t),e._zod.processJSONSchema=(r,s,i)=>Co(e,r,s);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(vo(...r)),e.includes=(...r)=>e.check(_o(...r)),e.startsWith=(...r)=>e.check(bo(...r)),e.endsWith=(...r)=>e.check(wo(...r)),e.min=(...r)=>e.check(me(...r)),e.max=(...r)=>e.check(Xt(...r)),e.length=(...r)=>e.check(Yt(...r)),e.nonempty=(...r)=>e.check(me(1,...r)),e.lowercase=r=>e.check(go(r)),e.uppercase=r=>e.check(yo(r)),e.trim=()=>e.check(ko()),e.normalize=(...r)=>e.check(zo(...r)),e.toLowerCase=()=>e.check(Oo()),e.toUpperCase=()=>e.check(So()),e.slugify=()=>e.check(Mo())}),wi=h("ZodString",(e,t)=>{Le.init(e,t),sn.init(e,t),e.email=n=>e.check(Fs(zi,n)),e.url=n=>e.check(Vs(ki,n)),e.jwt=n=>e.check(so(Fi,n)),e.emoji=n=>e.check(Qs(Oi,n)),e.guid=n=>e.check(dt(vt,n)),e.uuid=n=>e.check(Ns(he,n)),e.uuidv4=n=>e.check(Ds(he,n)),e.uuidv6=n=>e.check(Us(he,n)),e.uuidv7=n=>e.check(Ls(he,n)),e.nanoid=n=>e.check(Js(Si,n)),e.guid=n=>e.check(dt(vt,n)),e.cuid=n=>e.check(Hs(Mi,n)),e.cuid2=n=>e.check(Ks($i,n)),e.ulid=n=>e.check(qs(Pi,n)),e.base64=n=>e.check(to(Ri,n)),e.base64url=n=>e.check(no(ji,n)),e.xid=n=>e.check(Bs(Zi,n)),e.ksuid=n=>e.check(Gs(Ei,n)),e.ipv4=n=>e.check(Ws(Ii,n)),e.ipv6=n=>e.check(Xs(Ti,n)),e.cidrv4=n=>e.check(Ys(Ci,n)),e.cidrv6=n=>e.check(eo(Ai,n)),e.e164=n=>e.check(ro(xi,n)),e.datetime=n=>e.check(ti(n)),e.date=n=>e.check(ri(n)),e.time=n=>e.check(oi(n)),e.duration=n=>e.check(ai(n))});function Za(e){return xs(wi,e)}const z=h("ZodStringFormat",(e,t)=>{_.init(e,t),sn.init(e,t)}),zi=h("ZodEmail",(e,t)=>{Qr.init(e,t),z.init(e,t)}),vt=h("ZodGUID",(e,t)=>{Lr.init(e,t),z.init(e,t)}),he=h("ZodUUID",(e,t)=>{Vr.init(e,t),z.init(e,t)}),ki=h("ZodURL",(e,t)=>{Jr.init(e,t),z.init(e,t)}),Oi=h("ZodEmoji",(e,t)=>{Hr.init(e,t),z.init(e,t)}),Si=h("ZodNanoID",(e,t)=>{Kr.init(e,t),z.init(e,t)}),Mi=h("ZodCUID",(e,t)=>{qr.init(e,t),z.init(e,t)}),$i=h("ZodCUID2",(e,t)=>{Br.init(e,t),z.init(e,t)}),Pi=h("ZodULID",(e,t)=>{Gr.init(e,t),z.init(e,t)}),Zi=h("ZodXID",(e,t)=>{Wr.init(e,t),z.init(e,t)}),Ei=h("ZodKSUID",(e,t)=>{Xr.init(e,t),z.init(e,t)}),Ii=h("ZodIPv4",(e,t)=>{rs.init(e,t),z.init(e,t)}),Ti=h("ZodIPv6",(e,t)=>{ss.init(e,t),z.init(e,t)}),Ci=h("ZodCIDRv4",(e,t)=>{os.init(e,t),z.init(e,t)}),Ai=h("ZodCIDRv6",(e,t)=>{is.init(e,t),z.init(e,t)}),Ri=h("ZodBase64",(e,t)=>{as.init(e,t),z.init(e,t)}),ji=h("ZodBase64URL",(e,t)=>{us.init(e,t),z.init(e,t)}),xi=h("ZodE164",(e,t)=>{hs.init(e,t),z.init(e,t)}),Fi=h("ZodJWT",(e,t)=>{ds.init(e,t),z.init(e,t)}),on=h("ZodNumber",(e,t)=>{qt.init(e,t),w.init(e,t),e._zod.processJSONSchema=(r,s,i)=>Ao(e,r,s),e.gt=(r,s)=>e.check(pt(r,s)),e.gte=(r,s)=>e.check(ze(r,s)),e.min=(r,s)=>e.check(ze(r,s)),e.lt=(r,s)=>e.check(ft(r,s)),e.lte=(r,s)=>e.check(we(r,s)),e.max=(r,s)=>e.check(we(r,s)),e.int=r=>e.check(gt(r)),e.safe=r=>e.check(gt(r)),e.positive=r=>e.check(pt(0,r)),e.nonnegative=r=>e.check(ze(0,r)),e.negative=r=>e.check(ft(0,r)),e.nonpositive=r=>e.check(we(0,r)),e.multipleOf=(r,s)=>e.check(mt(r,s)),e.step=(r,s)=>e.check(mt(r,s)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Ea(e){return uo(on,e)}const Ni=h("ZodNumberFormat",(e,t)=>{fs.init(e,t),on.init(e,t)});function gt(e){return ho(Ni,e)}const Di=h("ZodBoolean",(e,t)=>{ps.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Ro(e,n,r)});function Ia(e){return lo(Di,e)}const Ui=h("ZodAny",(e,t)=>{ms.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>xo()});function Ta(){return fo(Ui)}const Li=h("ZodUnknown",(e,t)=>{vs.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Fo()});function yt(){return po(Li)}const Vi=h("ZodNever",(e,t)=>{gs.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>jo(e,n,r)});function Qi(e){return mo(Vi,e)}const Ji=h("ZodArray",(e,t)=>{ys.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Lo(e,n,r,s),e.element=t.element,e.min=(n,r)=>e.check(me(n,r)),e.nonempty=n=>e.check(me(1,n)),e.max=(n,r)=>e.check(Xt(n,r)),e.length=(n,r)=>e.check(Yt(n,r)),e.unwrap=()=>e.element});function Hi(e,t){return $o(Ji,e,t)}const Ki=h("ZodObject",(e,t)=>{bs.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Vo(e,n,r,s),y(e,"shape",()=>t.shape),e.keyof=()=>Yi(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:yt()}),e.loose=()=>e.clone({...e._zod.def,catchall:yt()}),e.strict=()=>e.clone({...e._zod.def,catchall:Qi()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>Dn(e,n),e.safeExtend=n=>Un(e,n),e.merge=n=>Ln(e,n),e.pick=n=>Fn(e,n),e.omit=n=>Nn(e,n),e.partial=(...n)=>Vn(an,e,n[0]),e.required=(...n)=>Qn(cn,e,n[0])});function Ca(e,t){const n={type:"object",shape:e??{},...m(t)};return new Ki(n)}const qi=h("ZodUnion",(e,t)=>{ws.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Qo(e,n,r,s),e.options=t.options});function Bi(e,t){return new qi({type:"union",options:e,...m(t)})}const Gi=h("ZodIntersection",(e,t)=>{zs.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Jo(e,n,r,s)});function Wi(e,t){return new Gi({type:"intersection",left:e,right:t})}const Xi=h("ZodRecord",(e,t)=>{ks.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Ho(e,n,r,s),e.keyType=t.keyType,e.valueType=t.valueType});function Aa(e,t,n){return new Xi({type:"record",keyType:e,valueType:t,...m(n)})}const Ie=h("ZodEnum",(e,t)=>{Os.init(e,t),w.init(e,t),e._zod.processJSONSchema=(r,s,i)=>No(e,r,s),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,s)=>{const i={};for(const o of r)if(n.has(o))i[o]=t.entries[o];else throw new Error(`Key ${o} not found in enum`);return new Ie({...t,checks:[],...m(s),entries:i})},e.exclude=(r,s)=>{const i={...t.entries};for(const o of r)if(n.has(o))delete i[o];else throw new Error(`Key ${o} not found in enum`);return new Ie({...t,checks:[],...m(s),entries:i})}});function Yi(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Ie({type:"enum",entries:n,...m(t)})}const ea=h("ZodTransform",(e,t)=>{Ss.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Uo(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Tt(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(ne(i,n.value,t));else{const o=i;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=e),n.issues.push(ne(o))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(i=>(n.value=i,n)):(n.value=s,n)}});function ta(e){return new ea({type:"transform",transform:e})}const an=h("ZodOptional",(e,t)=>{Wt.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>rn(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function _t(e){return new an({type:"optional",innerType:e})}const na=h("ZodExactOptional",(e,t)=>{Ms.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>rn(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function ra(e){return new na({type:"optional",innerType:e})}const sa=h("ZodNullable",(e,t)=>{$s.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Ko(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function bt(e){return new sa({type:"nullable",innerType:e})}const oa=h("ZodDefault",(e,t)=>{Ps.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Bo(e,n,r,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function ia(e,t){return new oa({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():jt(t)}})}const aa=h("ZodPrefault",(e,t)=>{Zs.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Go(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function ca(e,t){return new aa({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():jt(t)}})}const cn=h("ZodNonOptional",(e,t)=>{Es.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>qo(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function ua(e,t){return new cn({type:"nonoptional",innerType:e,...m(t)})}const ha=h("ZodCatch",(e,t)=>{Is.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Wo(e,n,r,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function la(e,t){return new ha({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const da=h("ZodPipe",(e,t)=>{Ts.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Xo(e,n,r,s),e.in=t.in,e.out=t.out});function wt(e,t){return new da({type:"pipe",in:e,out:t})}const fa=h("ZodReadonly",(e,t)=>{Cs.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Yo(e,n,r,s),e.unwrap=()=>e._zod.def.innerType});function pa(e){return new fa({type:"readonly",innerType:e})}const ma=h("ZodCustom",(e,t)=>{As.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,r,s)=>Do(e,n)});function va(e,t={}){return Po(ma,e,t)}function ga(e){return Zo(e)}const un={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const hn=([e,t,n])=>{const r=document.createElementNS("http://www.w3.org/2000/svg",e);return Object.keys(t).forEach(s=>{r.setAttribute(s,String(t[s]))}),n?.length&&n.forEach(s=>{const i=hn(s);r.appendChild(i)}),r},ya=(e,t={})=>{const r={...un,...t};return hn(["svg",r,e])};const _a=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const ba=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const wa=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const za=e=>{const t=wa(e);return t.charAt(0).toUpperCase()+t.slice(1)};const ka=e=>Array.from(e.attributes).reduce((t,n)=>(t[n.name]=n.value,t),{}),zt=e=>typeof e=="string"?e:!e||!e.class?"":e.class&&typeof e.class=="string"?e.class.split(" "):e.class&&Array.isArray(e.class)?e.class:"",kt=(e,{nameAttr:t,icons:n,attrs:r})=>{const s=e.getAttribute(t);if(s==null)return;const i=za(s),o=n[i];if(!o)return console.warn(`${e.outerHTML} icon name was not found in the provided icons object.`);const a=ka(e),c=_a(a)?{}:{"aria-hidden":"true"},u={...un,"data-lucide":s,...c,...r,...a},l=zt(a),f=zt(r),d=ba("lucide",`lucide-${s}`,...l,...f);d&&Object.assign(u,{class:d});const p=ya(o,u);return e.parentNode?.replaceChild(p,e)};const Ra=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"}]];const ja=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8"}],["path",{d:"M10 12h4"}]];const xa=[["path",{d:"M3 19V5"}],["path",{d:"m13 6-6 6 6 6"}],["path",{d:"M7 12h14"}]];const Fa=[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z"}],["path",{d:"m9 12 2 2 4-4"}]];const Na=[["rect",{x:"14",y:"14",width:"4",height:"6",rx:"2"}],["rect",{x:"6",y:"4",width:"4",height:"6",rx:"2"}],["path",{d:"M6 20h4"}],["path",{d:"M14 10h4"}],["path",{d:"M6 14h2v6"}],["path",{d:"M14 4h2v6"}]];const Da=[["path",{d:"M12 7v14"}],["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"}]];const Ua=[["path",{d:"M12 8V4H8"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}],["path",{d:"M2 14h2"}],["path",{d:"M20 14h2"}],["path",{d:"M15 13v2"}],["path",{d:"M9 13v2"}]];const La=[["path",{d:"M10 19.655A6 6 0 0 1 6 14v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 3.97"}],["path",{d:"M14 15.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997a1 1 0 0 1-1.517-.86z"}],["path",{d:"M14.12 3.88 16 2"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97"}],["path",{d:"M6 13H2"}],["path",{d:"m8 2 1.88 1.88"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13"}]];const Va=[["path",{d:"M12 20v-9"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z"}],["path",{d:"M14.12 3.88 16 2"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97"}],["path",{d:"M22 13h-4"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97"}],["path",{d:"M6 13H2"}],["path",{d:"m8 2 1.88 1.88"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13"}]];const Qa=[["path",{d:"M20 6 9 17l-5-5"}]];const Ja=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m16 12-4-4-4 4"}],["path",{d:"M12 16V8"}]];const Ha=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m15 9-6 6"}],["path",{d:"m9 9 6 6"}]];const Ka=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"}],["path",{d:"M12 11h4"}],["path",{d:"M12 16h4"}],["path",{d:"M8 11h.01"}],["path",{d:"M8 16h.01"}]];const qa=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 6v6h4"}]];const Ba=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 6v6l4 2"}]];const Ga=[["line",{x1:"15",x2:"15",y1:"12",y2:"18"}],["line",{x1:"12",x2:"18",y1:"15",y2:"15"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]];const Wa=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]];const Xa=[["path",{d:"M12 20v2"}],["path",{d:"M12 2v2"}],["path",{d:"M17 20v2"}],["path",{d:"M17 2v2"}],["path",{d:"M2 12h2"}],["path",{d:"M2 17h2"}],["path",{d:"M2 7h2"}],["path",{d:"M20 12h2"}],["path",{d:"M20 17h2"}],["path",{d:"M20 7h2"}],["path",{d:"M7 20v2"}],["path",{d:"M7 2v2"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1"}]];const Ya=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5"}],["path",{d:"M3 12A9 3 0 0 0 21 12"}]];const ec=[["path",{d:"M12 15V3"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["path",{d:"m7 10 5 5 5-5"}]];const tc=[["path",{d:"M15 3h6v6"}],["path",{d:"M10 14 21 3"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}]];const nc=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}],["path",{d:"M12 12v6"}],["path",{d:"m15 15-3-3-3 3"}]];const rc=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2"}],["path",{d:"M6.453 15h11.094"}],["path",{d:"M8.5 2h7"}]];const sc=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"}]];const oc=[["path",{d:"M12.531 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14v6a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341l.427-.473"}],["path",{d:"m16.5 3.5 5 5"}],["path",{d:"m21.5 3.5-5 5"}]];const ic=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z"}]];const ac=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}],["path",{d:"M3 3v5h5"}],["path",{d:"M12 7v5l4 2"}]];const cc=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}]];const uc=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]];const hc=[["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"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor"}]];const lc=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"}]];const dc=[["path",{d:"M3 5h.01"}],["path",{d:"M3 12h.01"}],["path",{d:"M3 19h.01"}],["path",{d:"M8 5h13"}],["path",{d:"M8 12h13"}],["path",{d:"M8 19h13"}]];const fc=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];const pc=[["path",{d:"m16 17 5-5-5-5"}],["path",{d:"M21 12H9"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}]];const mc=[["path",{d:"M4 5h16"}],["path",{d:"M4 12h16"}],["path",{d:"M4 19h16"}]];const vc=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719"}]];const gc=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z"}]];const yc=[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1"}]];const _c=[["path",{d:"M12 17v4"}],["path",{d:"m14.305 7.53.923-.382"}],["path",{d:"m15.228 4.852-.923-.383"}],["path",{d:"m16.852 3.228-.383-.924"}],["path",{d:"m16.852 8.772-.383.923"}],["path",{d:"m19.148 3.228.383-.924"}],["path",{d:"m19.53 9.696-.382-.924"}],["path",{d:"m20.772 4.852.924-.383"}],["path",{d:"m20.772 7.148.924.383"}],["path",{d:"M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7"}],["path",{d:"M8 21h8"}],["circle",{cx:"18",cy:"6",r:"3"}]];const bc=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z"}],["path",{d:"M12 22V12"}],["polyline",{points:"3.29 7 12 12 20.71 7"}],["path",{d:"m7.5 4.27 9 5.15"}]];const wc=[["path",{d:"M11 7 6 2"}],["path",{d:"M18.992 12H2.041"}],["path",{d:"M21.145 18.38A3.34 3.34 0 0 1 20 16.5a3.3 3.3 0 0 1-1.145 1.88c-.575.46-.855 1.02-.855 1.595A2 2 0 0 0 20 22a2 2 0 0 0 2-2.025c0-.58-.285-1.13-.855-1.595"}],["path",{d:"m8.5 4.5 2.148-2.148a1.205 1.205 0 0 1 1.704 0l7.296 7.296a1.205 1.205 0 0 1 0 1.704l-7.592 7.592a3.615 3.615 0 0 1-5.112 0l-3.888-3.888a3.615 3.615 0 0 1 0-5.112L5.67 7.33"}]];const zc=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551"}]];const kc=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1"}]];const Oc=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];const Sc=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"}]];const Mc=[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z"}],["path",{d:"m2 22 3-3"}],["path",{d:"M7.5 13.5 10 11"}],["path",{d:"M10.5 16.5 13 14"}],["path",{d:"m18 3-4 4h6l-4 4"}]];const $c=[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]];const Pc=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478"}],["circle",{cx:"12",cy:"12",r:"2"}]];const Zc=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}],["path",{d:"M8 16H3v5"}]];const Ec=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}]];const Ic=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7"}]];const Tc=[["path",{d:"m21 21-4.34-4.34"}],["circle",{cx:"11",cy:"11",r:"8"}]];const Cc=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z"}],["path",{d:"m21.854 2.147-10.94 10.939"}]];const Ac=[["path",{d:"M14 17H5"}],["path",{d:"M19 7h-9"}],["circle",{cx:"17",cy:"17",r:"3"}],["circle",{cx:"7",cy:"7",r:"3"}]];const Rc=[["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"}],["circle",{cx:"12",cy:"12",r:"3"}]];const jc=[["circle",{cx:"18",cy:"5",r:"3"}],["circle",{cx:"6",cy:"12",r:"3"}],["circle",{cx:"18",cy:"19",r:"3"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49"}]];const xc=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}],["path",{d:"M12 8v4"}],["path",{d:"M12 16h.01"}]];const Fc=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}],["path",{d:"m9 12 2 2 4-4"}]];const Nc=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}]];const Dc=[["path",{d:"M7 18v-6a5 5 0 1 1 10 0v6"}],["path",{d:"M5 21a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-1a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2z"}],["path",{d:"M21 12h1"}],["path",{d:"M18.5 4.5 18 5"}],["path",{d:"M2 12h1"}],["path",{d:"M12 2v1"}],["path",{d:"m4.929 4.929.707.707"}],["path",{d:"M12 12v6"}]];const Uc=[["path",{d:"M10 5H3"}],["path",{d:"M12 19H3"}],["path",{d:"M14 3v4"}],["path",{d:"M16 17v4"}],["path",{d:"M21 12h-9"}],["path",{d:"M21 19h-5"}],["path",{d:"M21 5h-7"}],["path",{d:"M8 10v4"}],["path",{d:"M8 12H3"}]];const Lc=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z"}],["path",{d:"M20 2v4"}],["path",{d:"M22 4h-4"}],["circle",{cx:"4",cy:"20",r:"2"}]];const Vc=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}]];const Qc=[["path",{d:"M10 11v6"}],["path",{d:"M14 11v6"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}],["path",{d:"M3 6h18"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}]];const Jc=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}],["path",{d:"M12 9v4"}],["path",{d:"M12 17h.01"}]];const Hc=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87"}],["circle",{cx:"9",cy:"7",r:"4"}]];const Kc=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2"}]];const qc=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];const Oa=({icons:e={},nameAttr:t="data-lucide",attrs:n={},root:r=document,inTemplates:s}={})=>{if(!Object.values(e).length)throw new Error(`Please provide an icons object.
|
|
40
|
-
If you want to use all the icons you can import it like:
|
|
41
|
-
\`import { createIcons, icons } from 'lucide';
|
|
42
|
-
lucide.createIcons({icons});\``);if(typeof r>"u")throw new Error("`createIcons()` only works in a browser environment.");if(Array.from(r.querySelectorAll(`[${t}]`)).forEach(o=>kt(o,{nameAttr:t,icons:e,attrs:n})),s&&Array.from(r.querySelectorAll("template")).forEach(a=>Oa({icons:e,nameAttr:t,attrs:n,root:a.content,inTemplates:s})),t==="data-lucide"){const o=r.querySelectorAll("[icon-name]");o.length>0&&(console.warn("[Lucide] Some icons were found with the now deprecated icon-name attribute. These will still be replaced for backwards compatibility, but will no longer be supported in v1.0 and you should switch to data-lucide"),Array.from(o).forEach(a=>kt(a,{nameAttr:"icon-name",icons:e,attrs:n})))}};export{hc as $,Pc as A,$c as B,Ha as C,Mc as D,Sc as E,Oc as F,wc as G,bc as H,zc as I,_c as J,mc as K,yc as L,$a as M,gc as N,vc as O,kc as P,Ma as Q,Ec as R,Vc as S,Jc as T,Hc as U,pc as V,Kc as W,qc as X,dc as Y,fc as Z,lc as _,A as a,uc as a0,cc as a1,ac as a2,sc as a3,rc as a4,oc as a5,ic as a6,nc as a7,ec as a8,Ya as a9,Xa as aa,tc as ab,Ga as ac,Wa as ad,qa as ae,Ba as af,Ka as ag,Qa as ah,Da as ai,Ua as aj,La as ak,Va as al,Na as am,Fa as an,Ja as ao,xa as ap,ja as aq,Ra as ar,Pa as as,Za as b,Ta as c,Ia as d,Ea as e,Hi as f,Oa as g,Qc as h,B as i,Nc as j,jc as k,Dc as l,Lc as m,P as n,Ca as o,Uc as p,Fc as q,Aa as r,Sa as s,xc as t,Ac as u,Rc as v,Cc as w,Tc as x,Ic as y,Zc as z};
|