mobileboost-cli 0.1.3 → 0.2.0
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/.output/nitro.json +1 -1
- package/.output/public/assets/index-B9xOUxIH.js +492 -0
- package/.output/public/assets/{main-BOWxdROu.js → main-Dc24NDnw.js} +1 -1
- package/.output/server/chunks/_/{_tanstack-start-manifest_v-CUvi9Zok.mjs → _tanstack-start-manifest_v-DWF0_Gj8.mjs} +1 -1
- package/.output/server/chunks/_/actions-AXnOoTLJ.mjs +1 -0
- package/.output/server/chunks/_/agent-CUyzfc4e.mjs +1 -0
- package/.output/server/chunks/_/ai-client-waGeh-P8.mjs +1 -0
- package/.output/server/chunks/_/{appium-BbkeYpmk.mjs → appium-C-D6h2jM.mjs} +1 -1
- package/.output/server/chunks/_/appium-client-Dxm_q6FS.mjs +1 -0
- package/.output/server/chunks/_/cache-CtBF0d8x.mjs +1 -0
- package/.output/server/chunks/_/client-CM5hUS2d.mjs +1 -0
- package/.output/server/chunks/_/constants-Dh9o88yr.mjs +1 -0
- package/.output/server/chunks/_/describe-BfbyupMJ.mjs +1 -0
- package/.output/server/chunks/_/device-CWFVkH1s.mjs +1 -0
- package/.output/server/chunks/_/files-hj9HVaKT.mjs +1 -0
- package/.output/server/chunks/_/hierarchy-D3NdBpb6.mjs +1 -0
- package/.output/server/chunks/_/hierarchy-helpers-BaGN7WBn.mjs +3 -0
- package/.output/server/chunks/_/index-CLteVPoM.mjs +474 -0
- package/.output/server/chunks/_/{router-Bufjq1jN.mjs → router-CnslKYM2.mjs} +1 -1
- package/.output/server/chunks/_/{screenshot-BD59si87.mjs → screenshot-Csbvymnl.mjs} +1 -1
- package/.output/server/chunks/_/server.mjs +3 -3
- package/.output/server/chunks/_/step-D2WQqd4J.mjs +1 -0
- package/.output/server/chunks/_/stores-03HL60eP.mjs +1 -0
- package/.output/server/index.mjs +6 -6
- package/.output/server/package.json +8 -0
- package/dist/cli.js +3 -2
- package/dist/cli.js.map +1 -1
- package/dist/commands/studio.js +29 -18
- package/dist/commands/studio.js.map +1 -1
- package/package.json +5 -3
- package/.output/public/assets/index-Bu1akwRM.js +0 -437
- package/.output/server/chunks/_/actions-2SMY1JO3.mjs +0 -1
- package/.output/server/chunks/_/agent-CeaBVldB.mjs +0 -1
- package/.output/server/chunks/_/ai-client-BtI1TeHN.mjs +0 -1
- package/.output/server/chunks/_/appium-client-D-NjeB35.mjs +0 -1
- package/.output/server/chunks/_/cache-D_LOBxSY.mjs +0 -1
- package/.output/server/chunks/_/client-DG3m9828.mjs +0 -1
- package/.output/server/chunks/_/describe-NXd8kuzS.mjs +0 -1
- package/.output/server/chunks/_/device-8ONaG49P.mjs +0 -1
- package/.output/server/chunks/_/files-CIdgnUJn.mjs +0 -1
- package/.output/server/chunks/_/hierarchy-Q35yGKlr.mjs +0 -1
- package/.output/server/chunks/_/hierarchy-helpers-DF8QSYE6.mjs +0 -1
- package/.output/server/chunks/_/index-Cz7u2rY_.mjs +0 -419
- package/.output/server/chunks/_/step-CEQtT3SD.mjs +0 -1
- package/.output/server/chunks/_/stores-C1dCcTeV.mjs +0 -1
|
@@ -0,0 +1,492 @@
|
|
|
1
|
+
import{S as pf,p as Hu,r as Kt,s as Oi,a as ho,n as Ri,i as ps,b as Ku,t as Vx,c as ri,f as Wx,d as Zx,e as qu,g as aa,h as Ju,j as Gx,k as b,l as ff,u as Wr,m as mf,o as fs,q as hf,v as Hx,w as f,x as ee,y as rr,z as Kx,A as qx,B as Jx,C as gf,T as qs,D as Ie,E as Z,F as fn,R as He,G as so,_ as Js,H as Xx,I as Xu,J as Yu,K as Mo,L as vf,M as mr,N as Yx,O as Xs,P as Ys,Q as Qx,U as bf,V as eS,W as yf,X as Qs,Y as Qu,Z as tS,$ as nS,a0 as xf,a1 as Re,a2 as ed,a3 as rS,a4 as oS,a5 as iS,a6 as et,a7 as Xe}from"./main-Dc24NDnw.js";function Sf(e){if(Array.isArray(e))return e.flatMap(u=>Sf(u));if(typeof e!="string")return[];const t=[];let r=0,o,n,i,a,s;const l=()=>{for(;r<e.length&&/\s/.test(e.charAt(r));)r+=1;return r<e.length},c=()=>(n=e.charAt(r),n!=="="&&n!==";"&&n!==",");for(;r<e.length;){for(o=r,s=!1;l();)if(n=e.charAt(r),n===","){for(i=r,r+=1,l(),a=r;r<e.length&&c();)r+=1;r<e.length&&e.charAt(r)==="="?(s=!0,r=a,t.push(e.slice(o,i)),o=r):r=i+1}else r+=1;(!s||r>=e.length)&&t.push(e.slice(o))}return t}function aS(e){return e instanceof Headers?new Headers(e):Array.isArray(e)?new Headers(e):typeof e=="object"?new Headers(e):new Headers}function sS(...e){return e.reduce((t,r)=>{const o=aS(r);for(const[n,i]of o.entries())n==="set-cookie"?Sf(i).forEach(s=>t.append("set-cookie",s)):t.set(n,i);return t},new Headers)}var lS=class extends pf{constructor(e,t){super(),this.options=t,this.#n=e,this.#s=null,this.#i=Hu(),this.bindMethods(),this.setOptions(t)}#n;#e=void 0;#t=void 0;#r=void 0;#o;#a;#i;#s;#p;#f;#l;#u;#c;#d;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),td(this.#e,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ms(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ms(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#S(),this.#e.removeObserver(this)}setOptions(e){const t=this.options,r=this.#e;if(this.options=this.#n.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Kt(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#e.setOptions(this.options),t._defaulted&&!Oi(this.options,t)&&this.#n.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const o=this.hasListeners();o&&nd(this.#e,r,this.options,t)&&this.#m(),this.updateResult(),o&&(this.#e!==r||Kt(this.options.enabled,this.#e)!==Kt(t.enabled,this.#e)||ho(this.options.staleTime,this.#e)!==ho(t.staleTime,this.#e))&&this.#g();const n=this.#v();o&&(this.#e!==r||Kt(this.options.enabled,this.#e)!==Kt(t.enabled,this.#e)||n!==this.#d)&&this.#b(n)}getOptimisticResult(e){const t=this.#n.getQueryCache().build(this.#n,e),r=this.createResult(t,e);return uS(this,r)&&(this.#r=r,this.#a=this.options,this.#o=this.#e.state),r}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(r,o)=>(this.trackProp(o),t?.(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#i.status==="pending"&&this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,o))})}trackProp(e){this.#h.add(e)}getCurrentQuery(){return this.#e}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#n.defaultQueryOptions(e),r=this.#n.getQueryCache().build(this.#n,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#w();let t=this.#e.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Ri)),t}#g(){this.#x();const e=ho(this.options.staleTime,this.#e);if(ps||this.#r.isStale||!Ku(e))return;const r=Vx(this.#r.dataUpdatedAt,e)+1;this.#u=ri.setTimeout(()=>{this.#r.isStale||this.updateResult()},r)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#b(e){this.#S(),this.#d=e,!(ps||Kt(this.options.enabled,this.#e)===!1||!Ku(this.#d)||this.#d===0)&&(this.#c=ri.setInterval(()=>{(this.options.refetchIntervalInBackground||Wx.isFocused())&&this.#m()},this.#d))}#y(){this.#g(),this.#b(this.#v())}#x(){this.#u&&(ri.clearTimeout(this.#u),this.#u=void 0)}#S(){this.#c&&(ri.clearInterval(this.#c),this.#c=void 0)}createResult(e,t){const r=this.#e,o=this.options,n=this.#r,i=this.#o,a=this.#a,l=e!==r?e.state:this.#t,{state:c}=e;let u={...c},d=!1,p;if(t._optimisticResults){const k=this.hasListeners(),D=!k&&td(e,t),j=k&&nd(e,r,t,o);(D||j)&&(u={...u,...Zx(c.data,e.options)}),t._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:m,errorUpdatedAt:h,status:g}=u;p=u.data;let v=!1;if(t.placeholderData!==void 0&&p===void 0&&g==="pending"){let k;n?.isPlaceholderData&&t.placeholderData===a?.placeholderData?(k=n.data,v=!0):k=typeof t.placeholderData=="function"?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,k!==void 0&&(g="success",p=qu(n?.data,k,t),d=!0)}if(t.select&&p!==void 0&&!v)if(n&&p===i?.data&&t.select===this.#p)p=this.#f;else try{this.#p=t.select,p=t.select(p),p=qu(n?.data,p,t),this.#f=p,this.#s=null}catch(k){this.#s=k}this.#s&&(m=this.#s,p=this.#f,h=Date.now(),g="error");const y=u.fetchStatus==="fetching",S=g==="pending",w=g==="error",x=S&&y,$=p!==void 0,E={status:g,fetchStatus:u.fetchStatus,isPending:S,isSuccess:g==="success",isError:w,isInitialLoading:x,isLoading:x,data:p,dataUpdatedAt:u.dataUpdatedAt,error:m,errorUpdatedAt:h,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>l.dataUpdateCount||u.errorUpdateCount>l.errorUpdateCount,isFetching:y,isRefetching:y&&!S,isLoadingError:w&&!$,isPaused:u.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:w&&$,isStale:el(e,t),refetch:this.refetch,promise:this.#i,isEnabled:Kt(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const k=C=>{E.status==="error"?C.reject(E.error):E.data!==void 0&&C.resolve(E.data)},D=()=>{const C=this.#i=E.promise=Hu();k(C)},j=this.#i;switch(j.status){case"pending":e.queryHash===r.queryHash&&k(j);break;case"fulfilled":(E.status==="error"||E.data!==j.value)&&D();break;case"rejected":(E.status!=="error"||E.error!==j.reason)&&D();break}}return E}updateResult(){const e=this.#r,t=this.createResult(this.#e,this.options);if(this.#o=this.#e.state,this.#a=this.options,this.#o.data!==void 0&&(this.#l=this.#e),Oi(t,e))return;this.#r=t;const r=()=>{if(!e)return!0;const{notifyOnChangeProps:o}=this.options,n=typeof o=="function"?o():o;if(n==="all"||!n&&!this.#h.size)return!0;const i=new Set(n??this.#h);return this.options.throwOnError&&i.add("error"),Object.keys(this.#r).some(a=>{const s=a;return this.#r[s]!==e[s]&&i.has(s)})};this.#$({listeners:r()})}#w(){const e=this.#n.getQueryCache().build(this.#n,this.options);if(e===this.#e)return;const t=this.#e;this.#e=e,this.#t=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#$(e){aa.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#r)}),this.#n.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function cS(e,t){return Kt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function td(e,t){return cS(e,t)||e.state.data!==void 0&&ms(e,t,t.refetchOnMount)}function ms(e,t,r){if(Kt(t.enabled,e)!==!1&&ho(t.staleTime,e)!=="static"){const o=typeof r=="function"?r(e):r;return o==="always"||o!==!1&&el(e,t)}return!1}function nd(e,t,r,o){return(e!==t||Kt(o.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&el(e,r)}function el(e,t){return Kt(t.enabled,e)!==!1&&e.isStaleByTime(ho(t.staleTime,e))}function uS(e,t){return!Oi(e.getCurrentResult(),t)}var dS=class extends pf{#n;#e=void 0;#t;#r;constructor(e,t){super(),this.#n=e,this.setOptions(t),this.bindMethods(),this.#o()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#n.defaultMutationOptions(e),Oi(this.options,t)||this.#n.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),t?.mutationKey&&this.options.mutationKey&&Ju(t.mutationKey)!==Ju(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(e){this.#o(),this.#a(e)}getCurrentResult(){return this.#e}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#o(),this.#a()}mutate(e,t){return this.#r=t,this.#t?.removeObserver(this),this.#t=this.#n.getMutationCache().build(this.#n,this.options),this.#t.addObserver(this),this.#t.execute(e)}#o(){const e=this.#t?.state??Gx();this.#e={...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset}}#a(e){aa.batch(()=>{if(this.#r&&this.hasListeners()){const t=this.#e.variables,r=this.#e.context,o={client:this.#n,meta:this.options.meta,mutationKey:this.options.mutationKey};e?.type==="success"?(this.#r.onSuccess?.(e.data,t,r,o),this.#r.onSettled?.(e.data,null,t,r,o)):e?.type==="error"&&(this.#r.onError?.(e.error,t,r,o),this.#r.onSettled?.(void 0,e.error,t,r,o))}this.listeners.forEach(t=>{t(this.#e)})})}},wf=b.createContext(!1),pS=()=>b.useContext(wf);wf.Provider;function fS(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var mS=b.createContext(fS()),hS=()=>b.useContext(mS),gS=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},vS=e=>{b.useEffect(()=>{e.clearReset()},[e])},bS=({result:e,errorResetBoundary:t,throwOnError:r,query:o,suspense:n})=>e.isError&&!t.isReset()&&!e.isFetching&&o&&(n&&e.data===void 0||ff(r,[e.error,o])),yS=e=>{if(e.suspense){const r=n=>n==="static"?n:Math.max(n??1e3,1e3),o=e.staleTime;e.staleTime=typeof o=="function"?(...n)=>r(o(...n)):r(o),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},xS=(e,t)=>e.isLoading&&e.isFetching&&!t,SS=(e,t)=>e?.suspense&&t.isPending,rd=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function wS(e,t,r){const o=pS(),n=hS(),i=Wr(),a=i.defaultQueryOptions(e);i.getDefaultOptions().queries?._experimental_beforeQuery?.(a),a._optimisticResults=o?"isRestoring":"optimistic",yS(a),gS(a,n),vS(n);const s=!i.getQueryCache().get(a.queryHash),[l]=b.useState(()=>new t(i,a)),c=l.getOptimisticResult(a),u=!o&&e.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(d=>{const p=u?l.subscribe(aa.batchCalls(d)):Ri;return l.updateResult(),p},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),b.useEffect(()=>{l.setOptions(a)},[a,l]),SS(a,c))throw rd(a,l,n);if(bS({result:c,errorResetBoundary:n,throwOnError:a.throwOnError,query:i.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw c.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(a,c),a.experimental_prefetchInRender&&!ps&&xS(c,o)&&(s?rd(a,l,n):i.getQueryCache().get(a.queryHash)?.promise)?.catch(Ri).finally(()=>{l.updateResult()}),a.notifyOnChangeProps?c:l.trackResult(c)}function dn(e,t){return wS(e,lS)}function Ze(e,t){const r=Wr(),[o]=b.useState(()=>new dS(r,e));b.useEffect(()=>{o.setOptions(e)},[o,e]);const n=b.useSyncExternalStore(b.useCallback(a=>o.subscribe(aa.batchCalls(a)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),i=b.useCallback((a,s)=>{o.mutate(a,s).catch(Ri)},[o]);if(n.error&&ff(o.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:i,mutateAsync:n.mutate}}const od=e=>e,$S=()=>{let e=od;return{configure(t){e=t},generate(t){return e(t)},reset(){e=od}}},$f=$S();function IS(e={}){const{themeId:t,defaultTheme:r,defaultClassName:o="MuiBox-root",generateClassName:n}=e,i=mf("div",{shouldForwardProp:s=>s!=="theme"&&s!=="sx"&&s!=="as"})(fs);return b.forwardRef(function(l,c){const u=hf(r),{className:d,component:p="div",...m}=Hx(l);return f.jsx(i,{as:p,ref:c,className:ee(d,n?n(o):o),theme:t&&u[t]||u,...m})})}const kS={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function ge(e,t,r="Mui"){const o=kS[t];return o?`${r}-${o}`:`${$f.generate(e)}-${t}`}function fe(e,t,r="Mui"){const o={};return t.forEach(n=>{o[n]=ge(e,n,r)}),o}function If(e){const{variants:t,...r}=e,o={variants:t,style:rr(r),isProcessed:!0};return o.style===r||t&&t.forEach(n=>{typeof n.style!="function"&&(n.style=rr(n.style))}),o}const _S=Kx();function Va(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Yn(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function CS(e){return e?(t,r)=>r[e]:null}function ES(e,t,r){e.theme=OS(e.theme)?r:e.theme[t]||e.theme}function Ii(e,t,r){const o=typeof t=="function"?t(e):t;if(Array.isArray(o))return o.flatMap(n=>Ii(e,n,r));if(Array.isArray(o?.variants)){let n;if(o.isProcessed)n=r?Yn(o.style,r):o.style;else{const{variants:i,...a}=o;n=r?Yn(rr(a),r):a}return kf(e,o.variants,[n],r)}return o?.isProcessed?r?Yn(rr(o.style),r):o.style:r?Yn(rr(o),r):o}function kf(e,t,r=[],o=void 0){let n;e:for(let i=0;i<t.length;i+=1){const a=t[i];if(typeof a.props=="function"){if(n??={...e,...e.ownerState,ownerState:e.ownerState},!a.props(n))continue}else for(const s in a.props)if(e[s]!==a.props[s]&&e.ownerState?.[s]!==a.props[s])continue e;typeof a.style=="function"?(n??={...e,...e.ownerState,ownerState:e.ownerState},r.push(o?Yn(rr(a.style(n)),o):a.style(n))):r.push(o?Yn(rr(a.style),o):a.style)}return r}function PS(e={}){const{themeId:t,defaultTheme:r=_S,rootShouldForwardProp:o=Va,slotShouldForwardProp:n=Va}=e;function i(s){ES(s,t,r)}return(s,l={})=>{qx(s,I=>I.filter(E=>E!==fs));const{name:c,slot:u,skipVariantsResolver:d,skipSx:p,overridesResolver:m=CS(DS(u)),...h}=l,g=c&&c.startsWith("Mui")||u?"components":"custom",v=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,y=p||!1;let S=Va;u==="Root"||u==="root"?S=o:u?S=n:RS(s)&&(S=void 0);const w=mf(s,{shouldForwardProp:S,label:jS(),...h}),x=I=>{if(I.__emotion_real===I)return I;if(typeof I=="function")return function(k){return Ii(k,I,k.theme.modularCssLayers?g:void 0)};if(Jx(I)){const E=If(I);return function(D){return E.variants?Ii(D,E,D.theme.modularCssLayers?g:void 0):D.theme.modularCssLayers?Yn(E.style,g):E.style}}return I},$=(...I)=>{const E=[],k=I.map(x),D=[];if(E.push(i),c&&m&&D.push(function(O){const T=O.theme.components?.[c]?.styleOverrides;if(!T)return null;const P={};for(const M in T)P[M]=Ii(O,T[M],O.theme.modularCssLayers?"theme":void 0);return m(O,P)}),c&&!v&&D.push(function(O){const T=O.theme?.components?.[c]?.variants;return T?kf(O,T,[],O.theme.modularCssLayers?"theme":void 0):null}),y||D.push(fs),Array.isArray(k[0])){const z=k.shift(),O=new Array(E.length).fill(""),A=new Array(D.length).fill("");let T;T=[...O,...z,...A],T.raw=[...O,...z.raw,...A],E.unshift(T)}const j=[...E,...k,...D],C=w(...j);return s.muiName&&(C.muiName=s.muiName),C};return w.withConfig&&($.withConfig=w.withConfig),$}}function jS(e,t){return void 0}function OS(e){for(const t in e)return!1;return!0}function RS(e){return typeof e=="string"&&e.charCodeAt(0)>96}function DS(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const id={theme:void 0};function TS(e){let t,r;return function(n){let i=t;return(i===void 0||n.theme!==r)&&(id.theme=n.theme,i=If(e(id)),t=i,r=n.theme),i}}function ve(e,t,r=void 0){const o={};for(const n in e){const i=e[n];let a="",s=!0;for(let l=0;l<i.length;l+=1){const c=i[l];c&&(a+=(s===!0?"":" ")+t(c),s=!1,r&&r[c]&&(a+=" "+r[c]))}o[n]=a}return o}function ki(e,t){return b.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}function hr(){const e=hf(gf);return e[qs]||e}function _f(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const yt=e=>_f(e)&&e!=="classes",N=PS({themeId:qs,defaultTheme:gf,rootShouldForwardProp:yt});function hs(...e){return e.reduce((t,r)=>r==null?t:function(...n){t.apply(this,n),r.apply(this,n)},()=>{})}const _e=TS;function zS(e){return ge("MuiSvgIcon",e)}fe("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const AS=e=>{const{color:t,fontSize:r,classes:o}=e,n={root:["root",t!=="inherit"&&`color${Z(t)}`,`fontSize${Z(r)}`]};return ve(n,zS,o)},MS=N("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${Z(r.color)}`],t[`fontSize${Z(r.fontSize)}`]]}})(_e(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),gs=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiSvgIcon"}),{children:n,className:i,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:p="0 0 24 24",...m}=o,h=b.isValidElement(n)&&n.type==="svg",g={...o,color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:p,hasSvgAsChild:h},v={};u||(v.viewBox=p);const y=AS(g);return f.jsxs(MS,{as:s,className:ee(y.root,i),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:r,...v,...m,...h&&n.props,ownerState:g,children:[h?n.props.children:n,d?f.jsx("title",{children:d}):null]})});gs.muiName="SvgIcon";function De(e,t){function r(o,n){return f.jsx(gs,{"data-testid":void 0,ref:n,...o,children:e})}return r.muiName=gs.muiName,b.memo(b.forwardRef(r))}function Cf(e,t=166){let r;function o(...n){const i=()=>{e.apply(this,n)};clearTimeout(r),r=setTimeout(i,t)}return o.clear=()=>{clearTimeout(r)},o}function bt(e){return e&&e.ownerDocument||document}function Cn(e){return bt(e).defaultView||window}function ad(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function $o(e){const{controlled:t,default:r,name:o,state:n="value"}=e,{current:i}=b.useRef(t!==void 0),[a,s]=b.useState(r),l=i?t:a,c=b.useCallback(u=>{i||s(u)},[]);return[l,c]}function Lt(e){const t=b.useRef(e);return fn(()=>{t.current=e}),b.useRef((...r)=>(0,t.current)(...r)).current}function at(...e){const t=b.useRef(void 0),r=b.useCallback(o=>{const n=e.map(i=>{if(i==null)return null;if(typeof i=="function"){const a=i,s=a(o);return typeof s=="function"?s:()=>{a(null)}}return i.current=o,()=>{i.current=null}});return()=>{n.forEach(i=>i?.())}},e);return b.useMemo(()=>e.every(o=>o==null)?null:o=>{t.current&&(t.current(),t.current=void 0),o!=null&&(t.current=r(o))},e)}function NS(e,t){const r=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&r>=65&&r<=90&&typeof t=="function"}function Ef(e,t){if(!e)return t;function r(a,s){const l={};return Object.keys(s).forEach(c=>{NS(c,s[c])&&typeof a[c]=="function"&&(l[c]=(...u)=>{a[c](...u),s[c](...u)})}),l}if(typeof e=="function"||typeof t=="function")return a=>{const s=typeof t=="function"?t(a):t,l=typeof e=="function"?e({...a,...s}):e,c=ee(a?.className,s?.className,l?.className),u=r(l,s);return{...s,...l,...u,...!!c&&{className:c},...s?.style&&l?.style&&{style:{...s.style,...l.style}},...s?.sx&&l?.sx&&{sx:[...Array.isArray(s.sx)?s.sx:[s.sx],...Array.isArray(l.sx)?l.sx:[l.sx]]}}};const o=t,n=r(e,o),i=ee(o?.className,e?.className);return{...t,...e,...n,...!!i&&{className:i},...o?.style&&e?.style&&{style:{...o.style,...e.style}},...o?.sx&&e?.sx&&{sx:[...Array.isArray(o.sx)?o.sx:[o.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}function Pf(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}function vs(e,t){return vs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},vs(e,t)}function jf(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,vs(e,t)}const sd={disabled:!1},Di=He.createContext(null);var FS=function(t){return t.scrollTop},lo="unmounted",qn="exited",Jn="entering",Ir="entered",bs="exiting",nn=(function(e){jf(t,e);function t(o,n){var i;i=e.call(this,o,n)||this;var a=n,s=a&&!a.isMounting?o.enter:o.appear,l;return i.appearStatus=null,o.in?s?(l=qn,i.appearStatus=Jn):l=Ir:o.unmountOnExit||o.mountOnEnter?l=lo:l=qn,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(n,i){var a=n.in;return a&&i.status===lo?{status:qn}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(n){var i=null;if(n!==this.props){var a=this.state.status;this.props.in?a!==Jn&&a!==Ir&&(i=Jn):(a===Jn||a===Ir)&&(i=bs)}this.updateStatus(!1,i)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var n=this.props.timeout,i,a,s;return i=a=s=n,n!=null&&typeof n!="number"&&(i=n.exit,a=n.enter,s=n.appear!==void 0?n.appear:a),{exit:i,enter:a,appear:s}},r.updateStatus=function(n,i){if(n===void 0&&(n=!1),i!==null)if(this.cancelNextCallback(),i===Jn){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:so.findDOMNode(this);a&&FS(a)}this.performEnter(n)}else this.performExit();else this.props.unmountOnExit&&this.state.status===qn&&this.setState({status:lo})},r.performEnter=function(n){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:n,l=this.props.nodeRef?[s]:[so.findDOMNode(this),s],c=l[0],u=l[1],d=this.getTimeouts(),p=s?d.appear:d.enter;if(!n&&!a||sd.disabled){this.safeSetState({status:Ir},function(){i.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:Jn},function(){i.props.onEntering(c,u),i.onTransitionEnd(p,function(){i.safeSetState({status:Ir},function(){i.props.onEntered(c,u)})})})},r.performExit=function(){var n=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:so.findDOMNode(this);if(!i||sd.disabled){this.safeSetState({status:qn},function(){n.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:bs},function(){n.props.onExiting(s),n.onTransitionEnd(a.exit,function(){n.safeSetState({status:qn},function(){n.props.onExited(s)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(n,i){i=this.setNextCallback(i),this.setState(n,i)},r.setNextCallback=function(n){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,n(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},r.onTransitionEnd=function(n,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:so.findDOMNode(this),s=n==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}n!=null&&setTimeout(this.nextCallback,n)},r.render=function(){var n=this.state.status;if(n===lo)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=Pf(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return He.createElement(Di.Provider,{value:null},typeof a=="function"?a(n,s):He.cloneElement(He.Children.only(a),s))},t})(He.Component);nn.contextType=Di;nn.propTypes={};function Sr(){}nn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Sr,onEntering:Sr,onEntered:Sr,onExit:Sr,onExiting:Sr,onExited:Sr};nn.UNMOUNTED=lo;nn.EXITED=qn;nn.ENTERING=Jn;nn.ENTERED=Ir;nn.EXITING=bs;function LS(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tl(e,t){var r=function(i){return t&&b.isValidElement(i)?t(i):i},o=Object.create(null);return e&&b.Children.map(e,function(n){return n}).forEach(function(n){o[n.key]=r(n)}),o}function US(e,t){e=e||{},t=t||{};function r(u){return u in t?t[u]:e[u]}var o=Object.create(null),n=[];for(var i in e)i in t?n.length&&(o[i]=n,n=[]):n.push(i);var a,s={};for(var l in t){if(o[l])for(a=0;a<o[l].length;a++){var c=o[l][a];s[o[l][a]]=r(c)}s[l]=r(l)}for(a=0;a<n.length;a++)s[n[a]]=r(n[a]);return s}function Qn(e,t,r){return r[t]!=null?r[t]:e.props[t]}function BS(e,t){return tl(e.children,function(r){return b.cloneElement(r,{onExited:t.bind(null,r),in:!0,appear:Qn(r,"appear",e),enter:Qn(r,"enter",e),exit:Qn(r,"exit",e)})})}function VS(e,t,r){var o=tl(e.children),n=US(t,o);return Object.keys(n).forEach(function(i){var a=n[i];if(b.isValidElement(a)){var s=i in t,l=i in o,c=t[i],u=b.isValidElement(c)&&!c.props.in;l&&(!s||u)?n[i]=b.cloneElement(a,{onExited:r.bind(null,a),in:!0,exit:Qn(a,"exit",e),enter:Qn(a,"enter",e)}):!l&&s&&!u?n[i]=b.cloneElement(a,{in:!1}):l&&s&&b.isValidElement(c)&&(n[i]=b.cloneElement(a,{onExited:r.bind(null,a),in:c.props.in,exit:Qn(a,"exit",e),enter:Qn(a,"enter",e)}))}}),n}var WS=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},ZS={component:"div",childFactory:function(t){return t}},nl=(function(e){jf(t,e);function t(o,n){var i;i=e.call(this,o,n)||this;var a=i.handleExited.bind(LS(i));return i.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},i}var r=t.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(n,i){var a=i.children,s=i.handleExited,l=i.firstRender;return{children:l?BS(n,s):VS(n,a,s),firstRender:!1}},r.handleExited=function(n,i){var a=tl(this.props.children);n.key in a||(n.props.onExited&&n.props.onExited(i),this.mounted&&this.setState(function(s){var l=Js({},s.children);return delete l[n.key],{children:l}}))},r.render=function(){var n=this.props,i=n.component,a=n.childFactory,s=Pf(n,["component","childFactory"]),l=this.state.contextValue,c=WS(this.state.children).map(a);return delete s.appear,delete s.enter,delete s.exit,i===null?He.createElement(Di.Provider,{value:l},c):He.createElement(Di.Provider,{value:l},He.createElement(i,s,c))},t})(He.Component);nl.propTypes={};nl.defaultProps=ZS;const ld={};function Of(e,t){const r=b.useRef(ld);return r.current===ld&&(r.current=e(t)),r}const GS=[];function HS(e){b.useEffect(e,GS)}class sa{static create(){return new sa}currentId=null;start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},t)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function An(){const e=Of(sa.create).current;return HS(e.disposeEffect),e}const Rf=e=>e.scrollTop;function Pr(e,t){const{timeout:r,easing:o,style:n={}}=e;return{duration:n.transitionDuration??(typeof r=="number"?r:r[t.mode]||0),easing:n.transitionTimingFunction??(typeof o=="object"?o[t.mode]:o),delay:n.transitionDelay}}function jr(e){return typeof e=="string"}function Df(e,t,r){return e===void 0||jr(e)?t:{...t,ownerState:{...t.ownerState,...r}}}function Tf(e,t,r){return typeof e=="function"?e(t,r):e}function Ti(e,t=[]){if(e===void 0)return{};const r={};return Object.keys(e).filter(o=>o.match(/^on[A-Z]/)&&typeof e[o]=="function"&&!t.includes(o)).forEach(o=>{r[o]=e[o]}),r}function cd(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(r=>!(r.match(/^on[A-Z]/)&&typeof e[r]=="function")).forEach(r=>{t[r]=e[r]}),t}function zf(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:o,externalForwardedProps:n,className:i}=e;if(!t){const m=ee(r?.className,i,n?.className,o?.className),h={...r?.style,...n?.style,...o?.style},g={...r,...n,...o};return m.length>0&&(g.className=m),Object.keys(h).length>0&&(g.style=h),{props:g,internalRef:void 0}}const a=Ti({...n,...o}),s=cd(o),l=cd(n),c=t(a),u=ee(c?.className,r?.className,i,n?.className,o?.className),d={...c?.style,...r?.style,...n?.style,...o?.style},p={...c,...r,...l,...s};return u.length>0&&(p.className=u),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:c.ref}}function xe(e,t){const{className:r,elementType:o,ownerState:n,externalForwardedProps:i,internalForwardedProps:a,shouldForwardComponentProp:s=!1,...l}=t,{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...p}=i,m=u[e]||o,h=Tf(d[e],n),{props:{component:g,...v},internalRef:y}=zf({className:r,...l,externalForwardedProps:e==="root"?p:void 0,externalSlotProps:h}),S=at(y,h?.ref,t.ref),w=e==="root"?g||c:g,x=Df(m,{...e==="root"&&!c&&!u[e]&&a,...e!=="root"&&!u[e]&&a,...v,...w&&!s&&{as:w},...w&&s&&{component:w},ref:S},n);return[m,x]}function KS(e){return ge("MuiCollapse",e)}fe("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const qS=e=>{const{orientation:t,classes:r}=e,o={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return ve(o,KS,r)},JS=N("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.orientation],r.state==="entered"&&t.entered,r.state==="exited"&&!r.in&&r.collapsedSize==="0px"&&t.hidden]}})(_e(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:t})=>t.state==="exited"&&!t.in&&t.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),XS=N("div",{name:"MuiCollapse",slot:"Wrapper"})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),YS=N("div",{name:"MuiCollapse",slot:"WrapperInner"})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),ys=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiCollapse"}),{addEndListener:n,children:i,className:a,collapsedSize:s="0px",component:l,easing:c,in:u,onEnter:d,onEntered:p,onEntering:m,onExit:h,onExited:g,onExiting:v,orientation:y="vertical",slots:S={},slotProps:w={},style:x,timeout:$=Xx.standard,TransitionComponent:I=nn,...E}=o,k={...o,orientation:y,collapsedSize:s},D=qS(k),j=hr(),C=An(),z=b.useRef(null),O=b.useRef(),A=typeof s=="number"?`${s}px`:s,T=y==="horizontal",P=T?"width":"height",M=b.useRef(null),F=at(r,M),L=B=>ne=>{if(B){const ce=M.current;ne===void 0?B(ce):B(ce,ne)}},X=()=>z.current?z.current[T?"clientWidth":"clientHeight"]:0,Q=L((B,ne)=>{z.current&&T&&(z.current.style.position="absolute"),B.style[P]=A,d&&d(B,ne)}),pe=L((B,ne)=>{const ce=X();z.current&&T&&(z.current.style.position="");const{duration:oe,easing:ke}=Pr({style:x,timeout:$,easing:c},{mode:"enter"});if($==="auto"){const ye=j.transitions.getAutoHeightDuration(ce);B.style.transitionDuration=`${ye}ms`,O.current=ye}else B.style.transitionDuration=typeof oe=="string"?oe:`${oe}ms`;B.style[P]=`${ce}px`,B.style.transitionTimingFunction=ke,m&&m(B,ne)}),le=L((B,ne)=>{B.style[P]="auto",p&&p(B,ne)}),be=L(B=>{B.style[P]=`${X()}px`,h&&h(B)}),te=L(g),q=L(B=>{const ne=X(),{duration:ce,easing:oe}=Pr({style:x,timeout:$,easing:c},{mode:"exit"});if($==="auto"){const ke=j.transitions.getAutoHeightDuration(ne);B.style.transitionDuration=`${ke}ms`,O.current=ke}else B.style.transitionDuration=typeof ce=="string"?ce:`${ce}ms`;B.style[P]=A,B.style.transitionTimingFunction=oe,v&&v(B)}),se=B=>{$==="auto"&&C.start(O.current||0,B),n&&n(M.current,B)},Oe={slots:S,slotProps:w,component:l},[Se,ie]=xe("root",{ref:F,className:ee(D.root,a),elementType:JS,externalForwardedProps:Oe,ownerState:k,additionalProps:{style:{[T?"minWidth":"minHeight"]:A,...x}}}),[de,_]=xe("wrapper",{ref:z,className:D.wrapper,elementType:XS,externalForwardedProps:Oe,ownerState:k}),[W,V]=xe("wrapperInner",{className:D.wrapperInner,elementType:YS,externalForwardedProps:Oe,ownerState:k});return f.jsx(I,{in:u,onEnter:Q,onEntered:le,onEntering:pe,onExit:be,onExited:te,onExiting:q,addEndListener:se,nodeRef:M,timeout:$==="auto"?null:$,...E,children:(B,{ownerState:ne,...ce})=>{const oe={...k,state:B};return f.jsx(Se,{...ie,className:ee(ie.className,{entered:D.entered,exited:!u&&A==="0px"&&D.hidden}[B]),ownerState:oe,...ce,children:f.jsx(de,{..._,ownerState:oe,children:f.jsx(W,{...V,ownerState:oe,children:i})})})}})});ys&&(ys.muiSupportAuto=!0);function QS(e){return ge("MuiPaper",e)}fe("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const ew=e=>{const{square:t,elevation:r,variant:o,classes:n}=e,i={root:["root",o,!t&&"rounded",o==="elevation"&&`elevation${r}`]};return ve(i,QS,n)},tw=N("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],!r.square&&t.rounded,r.variant==="elevation"&&t[`elevation${r.elevation}`]]}})(_e(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),gr=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiPaper"}),n=hr(),{className:i,component:a="div",elevation:s=1,square:l=!1,variant:c="elevation",...u}=o,d={...o,component:a,elevation:s,square:l,variant:c},p=ew(d);return f.jsx(tw,{as:a,ownerState:d,className:ee(p.root,i),ref:r,...u,style:{...c==="elevation"&&{"--Paper-shadow":(n.vars||n).shadows[s],...n.vars&&{"--Paper-overlay":n.vars.overlays?.[s]},...!n.vars&&n.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${Xu("#fff",Yu(s))}, ${Xu("#fff",Yu(s))})`}},...u.style}})});function zi(e){try{return e.matches(":focus-visible")}catch{}return!1}class Ai{static create(){return new Ai}static use(){const t=Of(Ai.create).current,[r,o]=b.useState(!1);return t.shouldMount=r,t.setShouldMount=o,b.useEffect(t.mountEffect,[r]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=rw(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...t){this.mount().then(()=>this.ref.current?.start(...t))}stop(...t){this.mount().then(()=>this.ref.current?.stop(...t))}pulsate(...t){this.mount().then(()=>this.ref.current?.pulsate(...t))}}function nw(){return Ai.use()}function rw(){let e,t;const r=new Promise((o,n)=>{e=o,t=n});return r.resolve=e,r.reject=t,r}function ow(e){const{className:t,classes:r,pulsate:o=!1,rippleX:n,rippleY:i,rippleSize:a,in:s,onExited:l,timeout:c}=e,[u,d]=b.useState(!1),p=ee(t,r.ripple,r.rippleVisible,o&&r.ripplePulsate),m={width:a,height:a,top:-(a/2)+i,left:-(a/2)+n},h=ee(r.child,u&&r.childLeaving,o&&r.childPulsate);return!s&&!u&&d(!0),b.useEffect(()=>{if(!s&&l!=null){const g=setTimeout(l,c);return()=>{clearTimeout(g)}}},[l,s,c]),f.jsx("span",{className:p,style:m,children:f.jsx("span",{className:h})})}const Nt=fe("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),xs=550,iw=80,aw=Mo`
|
|
2
|
+
0% {
|
|
3
|
+
transform: scale(0);
|
|
4
|
+
opacity: 0.1;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
100% {
|
|
8
|
+
transform: scale(1);
|
|
9
|
+
opacity: 0.3;
|
|
10
|
+
}
|
|
11
|
+
`,sw=Mo`
|
|
12
|
+
0% {
|
|
13
|
+
opacity: 1;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
100% {
|
|
17
|
+
opacity: 0;
|
|
18
|
+
}
|
|
19
|
+
`,lw=Mo`
|
|
20
|
+
0% {
|
|
21
|
+
transform: scale(1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
50% {
|
|
25
|
+
transform: scale(0.92);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
100% {
|
|
29
|
+
transform: scale(1);
|
|
30
|
+
}
|
|
31
|
+
`,cw=N("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),uw=N(ow,{name:"MuiTouchRipple",slot:"Ripple"})`
|
|
32
|
+
opacity: 0;
|
|
33
|
+
position: absolute;
|
|
34
|
+
|
|
35
|
+
&.${Nt.rippleVisible} {
|
|
36
|
+
opacity: 0.3;
|
|
37
|
+
transform: scale(1);
|
|
38
|
+
animation-name: ${aw};
|
|
39
|
+
animation-duration: ${xs}ms;
|
|
40
|
+
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&.${Nt.ripplePulsate} {
|
|
44
|
+
animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
& .${Nt.child} {
|
|
48
|
+
opacity: 1;
|
|
49
|
+
display: block;
|
|
50
|
+
width: 100%;
|
|
51
|
+
height: 100%;
|
|
52
|
+
border-radius: 50%;
|
|
53
|
+
background-color: currentColor;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
& .${Nt.childLeaving} {
|
|
57
|
+
opacity: 0;
|
|
58
|
+
animation-name: ${sw};
|
|
59
|
+
animation-duration: ${xs}ms;
|
|
60
|
+
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
& .${Nt.childPulsate} {
|
|
64
|
+
position: absolute;
|
|
65
|
+
/* @noflip */
|
|
66
|
+
left: 0px;
|
|
67
|
+
top: 0;
|
|
68
|
+
animation-name: ${lw};
|
|
69
|
+
animation-duration: 2500ms;
|
|
70
|
+
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
71
|
+
animation-iteration-count: infinite;
|
|
72
|
+
animation-delay: 200ms;
|
|
73
|
+
}
|
|
74
|
+
`,dw=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiTouchRipple"}),{center:n=!1,classes:i={},className:a,...s}=o,[l,c]=b.useState([]),u=b.useRef(0),d=b.useRef(null);b.useEffect(()=>{d.current&&(d.current(),d.current=null)},[l]);const p=b.useRef(!1),m=An(),h=b.useRef(null),g=b.useRef(null),v=b.useCallback(x=>{const{pulsate:$,rippleX:I,rippleY:E,rippleSize:k,cb:D}=x;c(j=>[...j,f.jsx(uw,{classes:{ripple:ee(i.ripple,Nt.ripple),rippleVisible:ee(i.rippleVisible,Nt.rippleVisible),ripplePulsate:ee(i.ripplePulsate,Nt.ripplePulsate),child:ee(i.child,Nt.child),childLeaving:ee(i.childLeaving,Nt.childLeaving),childPulsate:ee(i.childPulsate,Nt.childPulsate)},timeout:xs,pulsate:$,rippleX:I,rippleY:E,rippleSize:k},u.current)]),u.current+=1,d.current=D},[i]),y=b.useCallback((x={},$={},I=()=>{})=>{const{pulsate:E=!1,center:k=n||$.pulsate,fakeElement:D=!1}=$;if(x?.type==="mousedown"&&p.current){p.current=!1;return}x?.type==="touchstart"&&(p.current=!0);const j=D?null:g.current,C=j?j.getBoundingClientRect():{width:0,height:0,left:0,top:0};let z,O,A;if(k||x===void 0||x.clientX===0&&x.clientY===0||!x.clientX&&!x.touches)z=Math.round(C.width/2),O=Math.round(C.height/2);else{const{clientX:T,clientY:P}=x.touches&&x.touches.length>0?x.touches[0]:x;z=Math.round(T-C.left),O=Math.round(P-C.top)}if(k)A=Math.sqrt((2*C.width**2+C.height**2)/3),A%2===0&&(A+=1);else{const T=Math.max(Math.abs((j?j.clientWidth:0)-z),z)*2+2,P=Math.max(Math.abs((j?j.clientHeight:0)-O),O)*2+2;A=Math.sqrt(T**2+P**2)}x?.touches?h.current===null&&(h.current=()=>{v({pulsate:E,rippleX:z,rippleY:O,rippleSize:A,cb:I})},m.start(iw,()=>{h.current&&(h.current(),h.current=null)})):v({pulsate:E,rippleX:z,rippleY:O,rippleSize:A,cb:I})},[n,v,m]),S=b.useCallback(()=>{y({},{pulsate:!0})},[y]),w=b.useCallback((x,$)=>{if(m.clear(),x?.type==="touchend"&&h.current){h.current(),h.current=null,m.start(0,()=>{w(x,$)});return}h.current=null,c(I=>I.length>0?I.slice(1):I),d.current=$},[m]);return b.useImperativeHandle(r,()=>({pulsate:S,start:y,stop:w}),[S,y,w]),f.jsx(cw,{className:ee(Nt.root,i.root,a),ref:g,...s,children:f.jsx(nl,{component:null,exit:!0,children:l})})});function pw(e){return ge("MuiButtonBase",e)}const fw=fe("MuiButtonBase",["root","disabled","focusVisible"]),mw=e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:o,classes:n}=e,a=ve({root:["root",t&&"disabled",r&&"focusVisible"]},pw,n);return r&&o&&(a.root+=` ${o}`),a},hw=N("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${fw.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),ar=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiButtonBase"}),{action:n,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:p=!1,focusVisibleClassName:m,LinkComponent:h="a",onBlur:g,onClick:v,onContextMenu:y,onDragLeave:S,onFocus:w,onFocusVisible:x,onKeyDown:$,onKeyUp:I,onMouseDown:E,onMouseLeave:k,onMouseUp:D,onTouchEnd:j,onTouchMove:C,onTouchStart:z,tabIndex:O=0,TouchRippleProps:A,touchRippleRef:T,type:P,...M}=o,F=b.useRef(null),L=nw(),X=at(L.ref,T),[Q,pe]=b.useState(!1);c&&Q&&pe(!1),b.useImperativeHandle(n,()=>({focusVisible:()=>{pe(!0),F.current.focus()}}),[]);const le=L.shouldMount&&!u&&!c;b.useEffect(()=>{Q&&p&&!u&&L.pulsate()},[u,p,Q,L]);const be=wn(L,"start",E,d),te=wn(L,"stop",y,d),q=wn(L,"stop",S,d),se=wn(L,"stop",D,d),Oe=wn(L,"stop",G=>{Q&&G.preventDefault(),k&&k(G)},d),Se=wn(L,"start",z,d),ie=wn(L,"stop",j,d),de=wn(L,"stop",C,d),_=wn(L,"stop",G=>{zi(G.target)||pe(!1),g&&g(G)},!1),W=Lt(G=>{F.current||(F.current=G.currentTarget),zi(G.target)&&(pe(!0),x&&x(G)),w&&w(G)}),V=()=>{const G=F.current;return l&&l!=="button"&&!(G.tagName==="A"&&G.href)},B=Lt(G=>{p&&!G.repeat&&Q&&G.key===" "&&L.stop(G,()=>{L.start(G)}),G.target===G.currentTarget&&V()&&G.key===" "&&G.preventDefault(),$&&$(G),G.target===G.currentTarget&&V()&&G.key==="Enter"&&!c&&(G.preventDefault(),v&&v(G))}),ne=Lt(G=>{p&&G.key===" "&&Q&&!G.defaultPrevented&&L.stop(G,()=>{L.pulsate(G)}),I&&I(G),v&&G.target===G.currentTarget&&V()&&G.key===" "&&!G.defaultPrevented&&v(G)});let ce=l;ce==="button"&&(M.href||M.to)&&(ce=h);const oe={};if(ce==="button"){const G=!!M.formAction;oe.type=P===void 0&&!G?"button":P,oe.disabled=c}else!M.href&&!M.to&&(oe.role="button"),c&&(oe["aria-disabled"]=c);const ke=at(r,F),ye={...o,centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:p,tabIndex:O,focusVisible:Q},we=mw(ye);return f.jsxs(hw,{as:ce,className:ee(we.root,s),ownerState:ye,onBlur:_,onClick:v,onContextMenu:te,onFocus:W,onKeyDown:B,onKeyUp:ne,onMouseDown:be,onMouseLeave:Oe,onMouseUp:se,onDragLeave:q,onTouchEnd:ie,onTouchMove:de,onTouchStart:Se,ref:ke,tabIndex:c?-1:O,type:P,...oe,...M,children:[a,le?f.jsx(dw,{ref:X,center:i,...A}):null]})});function wn(e,t,r,o=!1){return Lt(n=>(r&&r(n),o||e[t](n),!0))}function gw(e){return typeof e.main=="string"}function vw(e,t=[]){if(!gw(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function lt(e=[]){return([,t])=>t&&vw(t,e)}function bw(e){return ge("MuiAlert",e)}const ud=fe("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);function yw(e){return ge("MuiCircularProgress",e)}fe("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","track","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Ht=44,Ss=Mo`
|
|
75
|
+
0% {
|
|
76
|
+
transform: rotate(0deg);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
100% {
|
|
80
|
+
transform: rotate(360deg);
|
|
81
|
+
}
|
|
82
|
+
`,ws=Mo`
|
|
83
|
+
0% {
|
|
84
|
+
stroke-dasharray: 1px, 200px;
|
|
85
|
+
stroke-dashoffset: 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
50% {
|
|
89
|
+
stroke-dasharray: 100px, 200px;
|
|
90
|
+
stroke-dashoffset: -15px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
100% {
|
|
94
|
+
stroke-dasharray: 1px, 200px;
|
|
95
|
+
stroke-dashoffset: -126px;
|
|
96
|
+
}
|
|
97
|
+
`,xw=typeof Ss!="string"?vf`
|
|
98
|
+
animation: ${Ss} 1.4s linear infinite;
|
|
99
|
+
`:null,Sw=typeof ws!="string"?vf`
|
|
100
|
+
animation: ${ws} 1.4s ease-in-out infinite;
|
|
101
|
+
`:null,ww=e=>{const{classes:t,variant:r,color:o,disableShrink:n}=e,i={root:["root",r,`color${Z(o)}`],svg:["svg"],track:["track"],circle:["circle",`circle${Z(r)}`,n&&"circleDisableShrink"]};return ve(i,yw,t)},$w=N("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`color${Z(r.color)}`]]}})(_e(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:xw||{animation:`${Ss} 1.4s linear infinite`}},...Object.entries(e.palette).filter(lt()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),Iw=N("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),kw=N("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t[`circle${Z(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})(_e(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:Sw||{animation:`${ws} 1.4s ease-in-out infinite`}}]}))),_w=N("circle",{name:"MuiCircularProgress",slot:"Track"})(_e(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),la=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiCircularProgress"}),{className:n,color:i="primary",disableShrink:a=!1,enableTrackSlot:s=!1,size:l=40,style:c,thickness:u=3.6,value:d=0,variant:p="indeterminate",...m}=o,h={...o,color:i,disableShrink:a,size:l,thickness:u,value:d,variant:p,enableTrackSlot:s},g=ww(h),v={},y={},S={};if(p==="determinate"){const w=2*Math.PI*((Ht-u)/2);v.strokeDasharray=w.toFixed(3),S["aria-valuenow"]=Math.round(d),v.strokeDashoffset=`${((100-d)/100*w).toFixed(3)}px`,y.transform="rotate(-90deg)"}return f.jsx($w,{className:ee(g.root,n),style:{width:l,height:l,...y,...c},ownerState:h,ref:r,role:"progressbar",...S,...m,children:f.jsxs(Iw,{className:g.svg,ownerState:h,viewBox:`${Ht/2} ${Ht/2} ${Ht} ${Ht}`,children:[s?f.jsx(_w,{className:g.track,ownerState:h,cx:Ht,cy:Ht,r:(Ht-u)/2,fill:"none",strokeWidth:u,"aria-hidden":"true"}):null,f.jsx(kw,{className:g.circle,style:v,ownerState:h,cx:Ht,cy:Ht,r:(Ht-u)/2,fill:"none",strokeWidth:u})]})})});function Cw(e){return ge("MuiIconButton",e)}const dd=fe("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),Ew=e=>{const{classes:t,disabled:r,color:o,edge:n,size:i,loading:a}=e,s={root:["root",a&&"loading",r&&"disabled",o!=="default"&&`color${Z(o)}`,n&&`edge${Z(n)}`,`size${Z(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return ve(s,Cw,t)},Pw=N(ar,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.loading&&t.loading,r.color!=="default"&&t[`color${Z(r.color)}`],r.edge&&t[`edge${Z(r.edge)}`],t[`size${Z(r.size)}`]]}})(_e(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),_e(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(lt()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(lt()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${dd.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${dd.loading}`]:{color:"transparent"}}))),jw=N("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),he=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiIconButton"}),{edge:n=!1,children:i,className:a,color:s="default",disabled:l=!1,disableFocusRipple:c=!1,size:u="medium",id:d,loading:p=null,loadingIndicator:m,...h}=o,g=mr(d),v=m??f.jsx(la,{"aria-labelledby":g,color:"inherit",size:16}),y={...o,edge:n,color:s,disabled:l,disableFocusRipple:c,loading:p,loadingIndicator:v,size:u},S=Ew(y);return f.jsxs(Pw,{id:p?g:d,className:ee(S.root,a),centerRipple:!0,focusRipple:!c,disabled:l||p,ref:r,...h,ownerState:y,children:[typeof p=="boolean"&&f.jsx("span",{className:S.loadingWrapper,style:{display:"contents"},children:f.jsx(jw,{className:S.loadingIndicator,ownerState:y,children:p&&v})}),i]})}),Ow=De(f.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"})),Rw=De(f.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"})),Dw=De(f.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),Tw=De(f.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"})),zw=De(f.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),Aw=e=>{const{variant:t,color:r,severity:o,classes:n}=e,i={root:["root",`color${Z(r||o)}`,`${t}${Z(r||o)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return ve(i,bw,n)},Mw=N(gr,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`${r.variant}${Z(r.color||r.severity)}`]]}})(_e(({theme:e})=>{const t=e.palette.mode==="light"?e.darken:e.lighten,r=e.palette.mode==="light"?e.lighten:e.darken;return{...e.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter(lt(["light"])).map(([o])=>({props:{colorSeverity:o,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${o}Color`]:t(e.palette[o].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${o}StandardBg`]:r(e.palette[o].light,.9),[`& .${ud.icon}`]:e.vars?{color:e.vars.palette.Alert[`${o}IconColor`]}:{color:e.palette[o].main}}})),...Object.entries(e.palette).filter(lt(["light"])).map(([o])=>({props:{colorSeverity:o,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${o}Color`]:t(e.palette[o].light,.6),border:`1px solid ${(e.vars||e).palette[o].light}`,[`& .${ud.icon}`]:e.vars?{color:e.vars.palette.Alert[`${o}IconColor`]}:{color:e.palette[o].main}}})),...Object.entries(e.palette).filter(lt(["dark"])).map(([o])=>({props:{colorSeverity:o,variant:"filled"},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${o}FilledColor`],backgroundColor:e.vars.palette.Alert[`${o}FilledBg`]}:{backgroundColor:e.palette.mode==="dark"?e.palette[o].dark:e.palette[o].main,color:e.palette.getContrastText(e.palette[o].main)}}}))]}})),Nw=N("div",{name:"MuiAlert",slot:"Icon"})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),Fw=N("div",{name:"MuiAlert",slot:"Message"})({padding:"8px 0",minWidth:0,overflow:"auto"}),Lw=N("div",{name:"MuiAlert",slot:"Action"})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),pd={success:f.jsx(Ow,{fontSize:"inherit"}),warning:f.jsx(Rw,{fontSize:"inherit"}),error:f.jsx(Dw,{fontSize:"inherit"}),info:f.jsx(Tw,{fontSize:"inherit"})},Uw=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiAlert"}),{action:n,children:i,className:a,closeText:s="Close",color:l,components:c={},componentsProps:u={},icon:d,iconMapping:p=pd,onClose:m,role:h="alert",severity:g="success",slotProps:v={},slots:y={},variant:S="standard",...w}=o,x={...o,color:l,severity:g,variant:S,colorSeverity:l||g},$=Aw(x),I={slots:{closeButton:c.CloseButton,closeIcon:c.CloseIcon,...y},slotProps:{...u,...v}},[E,k]=xe("root",{ref:r,shouldForwardComponentProp:!0,className:ee($.root,a),elementType:Mw,externalForwardedProps:{...I,...w},ownerState:x,additionalProps:{role:h,elevation:0}}),[D,j]=xe("icon",{className:$.icon,elementType:Nw,externalForwardedProps:I,ownerState:x}),[C,z]=xe("message",{className:$.message,elementType:Fw,externalForwardedProps:I,ownerState:x}),[O,A]=xe("action",{className:$.action,elementType:Lw,externalForwardedProps:I,ownerState:x}),[T,P]=xe("closeButton",{elementType:he,externalForwardedProps:I,ownerState:x}),[M,F]=xe("closeIcon",{elementType:zw,externalForwardedProps:I,ownerState:x});return f.jsxs(E,{...k,children:[d!==!1?f.jsx(D,{...j,children:d||p[g]||pd[g]}):null,f.jsx(C,{...z,children:i}),n!=null?f.jsx(O,{...A,children:n}):null,n==null&&m?f.jsx(O,{...A,children:f.jsx(T,{size:"small","aria-label":s,title:s,color:"inherit",onClick:m,...P,children:f.jsx(M,{fontSize:"small",...F})})}):null]})});function Bw(e){return ge("MuiTypography",e)}const fd=fe("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]),Vw={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Ww=Yx(),Zw=e=>{const{align:t,gutterBottom:r,noWrap:o,paragraph:n,variant:i,classes:a}=e,s={root:["root",i,e.align!=="inherit"&&`align${Z(t)}`,r&&"gutterBottom",o&&"noWrap",n&&"paragraph"]};return ve(s,Bw,a)},Gw=N("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.variant&&t[r.variant],r.align!=="inherit"&&t[`align${Z(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(_e(({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([t,r])=>t!=="inherit"&&r&&typeof r=="object").map(([t,r])=>({props:{variant:t},style:r})),...Object.entries(e.palette).filter(lt()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,t])=>typeof t=="string").map(([t])=>({props:{color:`text${Z(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:t})=>t.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:t})=>t.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:t})=>t.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:t})=>t.paragraph,style:{marginBottom:16}}]}))),md={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},je=b.forwardRef(function(t,r){const{color:o,...n}=Ie({props:t,name:"MuiTypography"}),i=!Vw[o],a=Ww({...n,...i&&{color:o}}),{align:s="inherit",className:l,component:c,gutterBottom:u=!1,noWrap:d=!1,paragraph:p=!1,variant:m="body1",variantMapping:h=md,...g}=a,v={...a,align:s,color:o,className:l,component:c,gutterBottom:u,noWrap:d,paragraph:p,variant:m,variantMapping:h},y=c||(p?"p":h[m]||md[m])||"span",S=Zw(v);return f.jsx(Gw,{as:y,ref:r,className:ee(S.root,l),...g,ownerState:v,style:{...s!=="inherit"&&{"--Typography-textAlign":s},...g.style}})});function Hw(e){return ge("MuiAlertTitle",e)}fe("MuiAlertTitle",["root"]);const Kw=e=>{const{classes:t}=e;return ve({root:["root"]},Hw,t)},qw=N(je,{name:"MuiAlertTitle",slot:"Root"})(_e(({theme:e})=>({fontWeight:e.typography.fontWeightMedium,marginTop:-2}))),Jw=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiAlertTitle"}),{className:n,...i}=o,a=o,s=Kw(a);return f.jsx(qw,{gutterBottom:!0,component:"div",ownerState:a,ref:r,className:ee(s.root,n),...i})});var _t="top",Vt="bottom",Wt="right",Ct="left",rl="auto",No=[_t,Vt,Wt,Ct],Or="start",Io="end",Xw="clippingParents",Af="viewport",Jr="popper",Yw="reference",hd=No.reduce(function(e,t){return e.concat([t+"-"+Or,t+"-"+Io])},[]),Mf=[].concat(No,[rl]).reduce(function(e,t){return e.concat([t,t+"-"+Or,t+"-"+Io])},[]),Qw="beforeRead",e$="read",t$="afterRead",n$="beforeMain",r$="main",o$="afterMain",i$="beforeWrite",a$="write",s$="afterWrite",l$=[Qw,e$,t$,n$,r$,o$,i$,a$,s$];function mn(e){return e?(e.nodeName||"").toLowerCase():null}function Dt(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function sr(e){var t=Dt(e).Element;return e instanceof t||e instanceof Element}function Ut(e){var t=Dt(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function ol(e){if(typeof ShadowRoot>"u")return!1;var t=Dt(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function c$(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var o=t.styles[r]||{},n=t.attributes[r]||{},i=t.elements[r];!Ut(i)||!mn(i)||(Object.assign(i.style,o),Object.keys(n).forEach(function(a){var s=n[a];s===!1?i.removeAttribute(a):i.setAttribute(a,s===!0?"":s)}))})}function u$(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(o){var n=t.elements[o],i=t.attributes[o]||{},a=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:r[o]),s=a.reduce(function(l,c){return l[c]="",l},{});!Ut(n)||!mn(n)||(Object.assign(n.style,s),Object.keys(i).forEach(function(l){n.removeAttribute(l)}))})}}const d$={name:"applyStyles",enabled:!0,phase:"write",fn:c$,effect:u$,requires:["computeStyles"]};function pn(e){return e.split("-")[0]}var or=Math.max,Mi=Math.min,Rr=Math.round;function $s(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Nf(){return!/^((?!chrome|android).)*safari/i.test($s())}function Dr(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var o=e.getBoundingClientRect(),n=1,i=1;t&&Ut(e)&&(n=e.offsetWidth>0&&Rr(o.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Rr(o.height)/e.offsetHeight||1);var a=sr(e)?Dt(e):window,s=a.visualViewport,l=!Nf()&&r,c=(o.left+(l&&s?s.offsetLeft:0))/n,u=(o.top+(l&&s?s.offsetTop:0))/i,d=o.width/n,p=o.height/i;return{width:d,height:p,top:u,right:c+d,bottom:u+p,left:c,x:c,y:u}}function il(e){var t=Dr(e),r=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:o}}function Ff(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&ol(r)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function En(e){return Dt(e).getComputedStyle(e)}function p$(e){return["table","td","th"].indexOf(mn(e))>=0}function Bn(e){return((sr(e)?e.ownerDocument:e.document)||window.document).documentElement}function ca(e){return mn(e)==="html"?e:e.assignedSlot||e.parentNode||(ol(e)?e.host:null)||Bn(e)}function gd(e){return!Ut(e)||En(e).position==="fixed"?null:e.offsetParent}function f$(e){var t=/firefox/i.test($s()),r=/Trident/i.test($s());if(r&&Ut(e)){var o=En(e);if(o.position==="fixed")return null}var n=ca(e);for(ol(n)&&(n=n.host);Ut(n)&&["html","body"].indexOf(mn(n))<0;){var i=En(n);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return n;n=n.parentNode}return null}function Fo(e){for(var t=Dt(e),r=gd(e);r&&p$(r)&&En(r).position==="static";)r=gd(r);return r&&(mn(r)==="html"||mn(r)==="body"&&En(r).position==="static")?t:r||f$(e)||t}function al(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function go(e,t,r){return or(e,Mi(t,r))}function m$(e,t,r){var o=go(e,t,r);return o>r?r:o}function Lf(){return{top:0,right:0,bottom:0,left:0}}function Uf(e){return Object.assign({},Lf(),e)}function Bf(e,t){return t.reduce(function(r,o){return r[o]=e,r},{})}var h$=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,Uf(typeof t!="number"?t:Bf(t,No))};function g$(e){var t,r=e.state,o=e.name,n=e.options,i=r.elements.arrow,a=r.modifiersData.popperOffsets,s=pn(r.placement),l=al(s),c=[Ct,Wt].indexOf(s)>=0,u=c?"height":"width";if(!(!i||!a)){var d=h$(n.padding,r),p=il(i),m=l==="y"?_t:Ct,h=l==="y"?Vt:Wt,g=r.rects.reference[u]+r.rects.reference[l]-a[l]-r.rects.popper[u],v=a[l]-r.rects.reference[l],y=Fo(i),S=y?l==="y"?y.clientHeight||0:y.clientWidth||0:0,w=g/2-v/2,x=d[m],$=S-p[u]-d[h],I=S/2-p[u]/2+w,E=go(x,I,$),k=l;r.modifiersData[o]=(t={},t[k]=E,t.centerOffset=E-I,t)}}function v$(e){var t=e.state,r=e.options,o=r.element,n=o===void 0?"[data-popper-arrow]":o;n!=null&&(typeof n=="string"&&(n=t.elements.popper.querySelector(n),!n)||Ff(t.elements.popper,n)&&(t.elements.arrow=n))}const b$={name:"arrow",enabled:!0,phase:"main",fn:g$,effect:v$,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Tr(e){return e.split("-")[1]}var y$={top:"auto",right:"auto",bottom:"auto",left:"auto"};function x$(e,t){var r=e.x,o=e.y,n=t.devicePixelRatio||1;return{x:Rr(r*n)/n||0,y:Rr(o*n)/n||0}}function vd(e){var t,r=e.popper,o=e.popperRect,n=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,p=a.x,m=p===void 0?0:p,h=a.y,g=h===void 0?0:h,v=typeof u=="function"?u({x:m,y:g}):{x:m,y:g};m=v.x,g=v.y;var y=a.hasOwnProperty("x"),S=a.hasOwnProperty("y"),w=Ct,x=_t,$=window;if(c){var I=Fo(r),E="clientHeight",k="clientWidth";if(I===Dt(r)&&(I=Bn(r),En(I).position!=="static"&&s==="absolute"&&(E="scrollHeight",k="scrollWidth")),I=I,n===_t||(n===Ct||n===Wt)&&i===Io){x=Vt;var D=d&&I===$&&$.visualViewport?$.visualViewport.height:I[E];g-=D-o.height,g*=l?1:-1}if(n===Ct||(n===_t||n===Vt)&&i===Io){w=Wt;var j=d&&I===$&&$.visualViewport?$.visualViewport.width:I[k];m-=j-o.width,m*=l?1:-1}}var C=Object.assign({position:s},c&&y$),z=u===!0?x$({x:m,y:g},Dt(r)):{x:m,y:g};if(m=z.x,g=z.y,l){var O;return Object.assign({},C,(O={},O[x]=S?"0":"",O[w]=y?"0":"",O.transform=($.devicePixelRatio||1)<=1?"translate("+m+"px, "+g+"px)":"translate3d("+m+"px, "+g+"px, 0)",O))}return Object.assign({},C,(t={},t[x]=S?g+"px":"",t[w]=y?m+"px":"",t.transform="",t))}function S$(e){var t=e.state,r=e.options,o=r.gpuAcceleration,n=o===void 0?!0:o,i=r.adaptive,a=i===void 0?!0:i,s=r.roundOffsets,l=s===void 0?!0:s,c={placement:pn(t.placement),variation:Tr(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:n,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,vd(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,vd(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const w$={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:S$,data:{}};var oi={passive:!0};function $$(e){var t=e.state,r=e.instance,o=e.options,n=o.scroll,i=n===void 0?!0:n,a=o.resize,s=a===void 0?!0:a,l=Dt(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",r.update,oi)}),s&&l.addEventListener("resize",r.update,oi),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",r.update,oi)}),s&&l.removeEventListener("resize",r.update,oi)}}const I$={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:$$,data:{}};var k$={left:"right",right:"left",bottom:"top",top:"bottom"};function _i(e){return e.replace(/left|right|bottom|top/g,function(t){return k$[t]})}var _$={start:"end",end:"start"};function bd(e){return e.replace(/start|end/g,function(t){return _$[t]})}function sl(e){var t=Dt(e),r=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:r,scrollTop:o}}function ll(e){return Dr(Bn(e)).left+sl(e).scrollLeft}function C$(e,t){var r=Dt(e),o=Bn(e),n=r.visualViewport,i=o.clientWidth,a=o.clientHeight,s=0,l=0;if(n){i=n.width,a=n.height;var c=Nf();(c||!c&&t==="fixed")&&(s=n.offsetLeft,l=n.offsetTop)}return{width:i,height:a,x:s+ll(e),y:l}}function E$(e){var t,r=Bn(e),o=sl(e),n=(t=e.ownerDocument)==null?void 0:t.body,i=or(r.scrollWidth,r.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),a=or(r.scrollHeight,r.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),s=-o.scrollLeft+ll(e),l=-o.scrollTop;return En(n||r).direction==="rtl"&&(s+=or(r.clientWidth,n?n.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}function cl(e){var t=En(e),r=t.overflow,o=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+n+o)}function Vf(e){return["html","body","#document"].indexOf(mn(e))>=0?e.ownerDocument.body:Ut(e)&&cl(e)?e:Vf(ca(e))}function vo(e,t){var r;t===void 0&&(t=[]);var o=Vf(e),n=o===((r=e.ownerDocument)==null?void 0:r.body),i=Dt(o),a=n?[i].concat(i.visualViewport||[],cl(o)?o:[]):o,s=t.concat(a);return n?s:s.concat(vo(ca(a)))}function Is(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function P$(e,t){var r=Dr(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function yd(e,t,r){return t===Af?Is(C$(e,r)):sr(t)?P$(t,r):Is(E$(Bn(e)))}function j$(e){var t=vo(ca(e)),r=["absolute","fixed"].indexOf(En(e).position)>=0,o=r&&Ut(e)?Fo(e):e;return sr(o)?t.filter(function(n){return sr(n)&&Ff(n,o)&&mn(n)!=="body"}):[]}function O$(e,t,r,o){var n=t==="clippingParents"?j$(e):[].concat(t),i=[].concat(n,[r]),a=i[0],s=i.reduce(function(l,c){var u=yd(e,c,o);return l.top=or(u.top,l.top),l.right=Mi(u.right,l.right),l.bottom=Mi(u.bottom,l.bottom),l.left=or(u.left,l.left),l},yd(e,a,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Wf(e){var t=e.reference,r=e.element,o=e.placement,n=o?pn(o):null,i=o?Tr(o):null,a=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,l;switch(n){case _t:l={x:a,y:t.y-r.height};break;case Vt:l={x:a,y:t.y+t.height};break;case Wt:l={x:t.x+t.width,y:s};break;case Ct:l={x:t.x-r.width,y:s};break;default:l={x:t.x,y:t.y}}var c=n?al(n):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case Or:l[c]=l[c]-(t[u]/2-r[u]/2);break;case Io:l[c]=l[c]+(t[u]/2-r[u]/2);break}}return l}function ko(e,t){t===void 0&&(t={});var r=t,o=r.placement,n=o===void 0?e.placement:o,i=r.strategy,a=i===void 0?e.strategy:i,s=r.boundary,l=s===void 0?Xw:s,c=r.rootBoundary,u=c===void 0?Af:c,d=r.elementContext,p=d===void 0?Jr:d,m=r.altBoundary,h=m===void 0?!1:m,g=r.padding,v=g===void 0?0:g,y=Uf(typeof v!="number"?v:Bf(v,No)),S=p===Jr?Yw:Jr,w=e.rects.popper,x=e.elements[h?S:p],$=O$(sr(x)?x:x.contextElement||Bn(e.elements.popper),l,u,a),I=Dr(e.elements.reference),E=Wf({reference:I,element:w,placement:n}),k=Is(Object.assign({},w,E)),D=p===Jr?k:I,j={top:$.top-D.top+y.top,bottom:D.bottom-$.bottom+y.bottom,left:$.left-D.left+y.left,right:D.right-$.right+y.right},C=e.modifiersData.offset;if(p===Jr&&C){var z=C[n];Object.keys(j).forEach(function(O){var A=[Wt,Vt].indexOf(O)>=0?1:-1,T=[_t,Vt].indexOf(O)>=0?"y":"x";j[O]+=z[T]*A})}return j}function R$(e,t){t===void 0&&(t={});var r=t,o=r.placement,n=r.boundary,i=r.rootBoundary,a=r.padding,s=r.flipVariations,l=r.allowedAutoPlacements,c=l===void 0?Mf:l,u=Tr(o),d=u?s?hd:hd.filter(function(h){return Tr(h)===u}):No,p=d.filter(function(h){return c.indexOf(h)>=0});p.length===0&&(p=d);var m=p.reduce(function(h,g){return h[g]=ko(e,{placement:g,boundary:n,rootBoundary:i,padding:a})[pn(g)],h},{});return Object.keys(m).sort(function(h,g){return m[h]-m[g]})}function D$(e){if(pn(e)===rl)return[];var t=_i(e);return[bd(e),t,bd(t)]}function T$(e){var t=e.state,r=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var n=r.mainAxis,i=n===void 0?!0:n,a=r.altAxis,s=a===void 0?!0:a,l=r.fallbackPlacements,c=r.padding,u=r.boundary,d=r.rootBoundary,p=r.altBoundary,m=r.flipVariations,h=m===void 0?!0:m,g=r.allowedAutoPlacements,v=t.options.placement,y=pn(v),S=y===v,w=l||(S||!h?[_i(v)]:D$(v)),x=[v].concat(w).reduce(function(be,te){return be.concat(pn(te)===rl?R$(t,{placement:te,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:g}):te)},[]),$=t.rects.reference,I=t.rects.popper,E=new Map,k=!0,D=x[0],j=0;j<x.length;j++){var C=x[j],z=pn(C),O=Tr(C)===Or,A=[_t,Vt].indexOf(z)>=0,T=A?"width":"height",P=ko(t,{placement:C,boundary:u,rootBoundary:d,altBoundary:p,padding:c}),M=A?O?Wt:Ct:O?Vt:_t;$[T]>I[T]&&(M=_i(M));var F=_i(M),L=[];if(i&&L.push(P[z]<=0),s&&L.push(P[M]<=0,P[F]<=0),L.every(function(be){return be})){D=C,k=!1;break}E.set(C,L)}if(k)for(var X=h?3:1,Q=function(te){var q=x.find(function(se){var Oe=E.get(se);if(Oe)return Oe.slice(0,te).every(function(Se){return Se})});if(q)return D=q,"break"},pe=X;pe>0;pe--){var le=Q(pe);if(le==="break")break}t.placement!==D&&(t.modifiersData[o]._skip=!0,t.placement=D,t.reset=!0)}}const z$={name:"flip",enabled:!0,phase:"main",fn:T$,requiresIfExists:["offset"],data:{_skip:!1}};function xd(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Sd(e){return[_t,Wt,Vt,Ct].some(function(t){return e[t]>=0})}function A$(e){var t=e.state,r=e.name,o=t.rects.reference,n=t.rects.popper,i=t.modifiersData.preventOverflow,a=ko(t,{elementContext:"reference"}),s=ko(t,{altBoundary:!0}),l=xd(a,o),c=xd(s,n,i),u=Sd(l),d=Sd(c);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const M$={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:A$};function N$(e,t,r){var o=pn(e),n=[Ct,_t].indexOf(o)>=0?-1:1,i=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,a=i[0],s=i[1];return a=a||0,s=(s||0)*n,[Ct,Wt].indexOf(o)>=0?{x:s,y:a}:{x:a,y:s}}function F$(e){var t=e.state,r=e.options,o=e.name,n=r.offset,i=n===void 0?[0,0]:n,a=Mf.reduce(function(u,d){return u[d]=N$(d,t.rects,i),u},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[o]=a}const L$={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:F$};function U$(e){var t=e.state,r=e.name;t.modifiersData[r]=Wf({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const B$={name:"popperOffsets",enabled:!0,phase:"read",fn:U$,data:{}};function V$(e){return e==="x"?"y":"x"}function W$(e){var t=e.state,r=e.options,o=e.name,n=r.mainAxis,i=n===void 0?!0:n,a=r.altAxis,s=a===void 0?!1:a,l=r.boundary,c=r.rootBoundary,u=r.altBoundary,d=r.padding,p=r.tether,m=p===void 0?!0:p,h=r.tetherOffset,g=h===void 0?0:h,v=ko(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),y=pn(t.placement),S=Tr(t.placement),w=!S,x=al(y),$=V$(x),I=t.modifiersData.popperOffsets,E=t.rects.reference,k=t.rects.popper,D=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,j=typeof D=="number"?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),C=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,z={x:0,y:0};if(I){if(i){var O,A=x==="y"?_t:Ct,T=x==="y"?Vt:Wt,P=x==="y"?"height":"width",M=I[x],F=M+v[A],L=M-v[T],X=m?-k[P]/2:0,Q=S===Or?E[P]:k[P],pe=S===Or?-k[P]:-E[P],le=t.elements.arrow,be=m&&le?il(le):{width:0,height:0},te=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Lf(),q=te[A],se=te[T],Oe=go(0,E[P],be[P]),Se=w?E[P]/2-X-Oe-q-j.mainAxis:Q-Oe-q-j.mainAxis,ie=w?-E[P]/2+X+Oe+se+j.mainAxis:pe+Oe+se+j.mainAxis,de=t.elements.arrow&&Fo(t.elements.arrow),_=de?x==="y"?de.clientTop||0:de.clientLeft||0:0,W=(O=C?.[x])!=null?O:0,V=M+Se-W-_,B=M+ie-W,ne=go(m?Mi(F,V):F,M,m?or(L,B):L);I[x]=ne,z[x]=ne-M}if(s){var ce,oe=x==="x"?_t:Ct,ke=x==="x"?Vt:Wt,ye=I[$],we=$==="y"?"height":"width",G=ye+v[oe],Pe=ye-v[ke],ae=[_t,Ct].indexOf(y)!==-1,Fe=(ce=C?.[$])!=null?ce:0,ze=ae?G:ye-E[we]-k[we]-Fe+j.altAxis,Ke=ae?ye+E[we]+k[we]-Fe-j.altAxis:Pe,dt=m&&ae?m$(ze,ye,Ke):go(m?ze:G,ye,m?Ke:Pe);I[$]=dt,z[$]=dt-ye}t.modifiersData[o]=z}}const Z$={name:"preventOverflow",enabled:!0,phase:"main",fn:W$,requiresIfExists:["offset"]};function G$(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function H$(e){return e===Dt(e)||!Ut(e)?sl(e):G$(e)}function K$(e){var t=e.getBoundingClientRect(),r=Rr(t.width)/e.offsetWidth||1,o=Rr(t.height)/e.offsetHeight||1;return r!==1||o!==1}function q$(e,t,r){r===void 0&&(r=!1);var o=Ut(t),n=Ut(t)&&K$(t),i=Bn(t),a=Dr(e,n,r),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(o||!o&&!r)&&((mn(t)!=="body"||cl(i))&&(s=H$(t)),Ut(t)?(l=Dr(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=ll(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function J$(e){var t=new Map,r=new Set,o=[];e.forEach(function(i){t.set(i.name,i)});function n(i){r.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!r.has(s)){var l=t.get(s);l&&n(l)}}),o.push(i)}return e.forEach(function(i){r.has(i.name)||n(i)}),o}function X$(e){var t=J$(e);return l$.reduce(function(r,o){return r.concat(t.filter(function(n){return n.phase===o}))},[])}function Y$(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function Q$(e){var t=e.reduce(function(r,o){var n=r[o.name];return r[o.name]=n?Object.assign({},n,o,{options:Object.assign({},n.options,o.options),data:Object.assign({},n.data,o.data)}):o,r},{});return Object.keys(t).map(function(r){return t[r]})}var wd={placement:"bottom",modifiers:[],strategy:"absolute"};function $d(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(o){return!(o&&typeof o.getBoundingClientRect=="function")})}function e0(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,o=r===void 0?[]:r,n=t.defaultOptions,i=n===void 0?wd:n;return function(s,l,c){c===void 0&&(c=i);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},wd,i),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],p=!1,m={state:u,setOptions:function(y){var S=typeof y=="function"?y(u.options):y;g(),u.options=Object.assign({},i,u.options,S),u.scrollParents={reference:sr(s)?vo(s):s.contextElement?vo(s.contextElement):[],popper:vo(l)};var w=X$(Q$([].concat(o,u.options.modifiers)));return u.orderedModifiers=w.filter(function(x){return x.enabled}),h(),m.update()},forceUpdate:function(){if(!p){var y=u.elements,S=y.reference,w=y.popper;if($d(S,w)){u.rects={reference:q$(S,Fo(w),u.options.strategy==="fixed"),popper:il(w)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(j){return u.modifiersData[j.name]=Object.assign({},j.data)});for(var x=0;x<u.orderedModifiers.length;x++){if(u.reset===!0){u.reset=!1,x=-1;continue}var $=u.orderedModifiers[x],I=$.fn,E=$.options,k=E===void 0?{}:E,D=$.name;typeof I=="function"&&(u=I({state:u,options:k,name:D,instance:m})||u)}}}},update:Y$(function(){return new Promise(function(v){m.forceUpdate(),v(u)})}),destroy:function(){g(),p=!0}};if(!$d(s,l))return m;m.setOptions(c).then(function(v){!p&&c.onFirstUpdate&&c.onFirstUpdate(v)});function h(){u.orderedModifiers.forEach(function(v){var y=v.name,S=v.options,w=S===void 0?{}:S,x=v.effect;if(typeof x=="function"){var $=x({state:u,name:y,instance:m,options:w}),I=function(){};d.push($||I)}})}function g(){d.forEach(function(v){return v()}),d=[]}return m}}var t0=[I$,B$,w$,d$,L$,z$,Z$,b$,M$],n0=e0({defaultModifiers:t0});function Zf(e){const{elementType:t,externalSlotProps:r,ownerState:o,skipResolvingSlotProps:n=!1,...i}=e,a=n?{}:Tf(r,o),{props:s,internalRef:l}=zf({...i,externalSlotProps:a}),c=at(l,a?.ref,e.additionalProps?.ref);return Df(t,{...s,ref:c},o)}function vr(e){return parseInt(b.version,10)>=19?e?.props?.ref||null:e?.ref||null}function r0(e){return typeof e=="function"?e():e}const Gf=b.forwardRef(function(t,r){const{children:o,container:n,disablePortal:i=!1}=t,[a,s]=b.useState(null),l=at(b.isValidElement(o)?vr(o):null,r);if(fn(()=>{i||s(r0(n)||document.body)},[n,i]),fn(()=>{if(a&&!i)return ad(r,a),()=>{ad(r,null)}},[r,a,i]),i){if(b.isValidElement(o)){const c={ref:l};return b.cloneElement(o,c)}return o}return a&&Xs.createPortal(o,a)});function o0(e){return ge("MuiPopper",e)}fe("MuiPopper",["root"]);function i0(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function ks(e){return typeof e=="function"?e():e}function a0(e){return e.nodeType!==void 0}const s0=e=>{const{classes:t}=e;return ve({root:["root"]},o0,t)},l0={},c0=b.forwardRef(function(t,r){const{anchorEl:o,children:n,direction:i,disablePortal:a,modifiers:s,open:l,placement:c,popperOptions:u,popperRef:d,slotProps:p={},slots:m={},TransitionProps:h,ownerState:g,...v}=t,y=b.useRef(null),S=at(y,r),w=b.useRef(null),x=at(w,d),$=b.useRef(x);fn(()=>{$.current=x},[x]),b.useImperativeHandle(d,()=>w.current,[]);const I=i0(c,i),[E,k]=b.useState(I),[D,j]=b.useState(ks(o));b.useEffect(()=>{w.current&&w.current.forceUpdate()}),b.useEffect(()=>{o&&j(ks(o))},[o]),fn(()=>{if(!D||!l)return;const T=F=>{k(F.placement)};let P=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:F})=>{T(F)}}];s!=null&&(P=P.concat(s)),u&&u.modifiers!=null&&(P=P.concat(u.modifiers));const M=n0(D,y.current,{placement:I,...u,modifiers:P});return $.current(M),()=>{M.destroy(),$.current(null)}},[D,a,s,l,u,I]);const C={placement:E};h!==null&&(C.TransitionProps=h);const z=s0(t),O=m.root??"div",A=Zf({elementType:O,externalSlotProps:p.root,externalForwardedProps:v,additionalProps:{role:"tooltip",ref:S},ownerState:t,className:z.root});return f.jsx(O,{...A,children:typeof n=="function"?n(C):n})}),u0=b.forwardRef(function(t,r){const{anchorEl:o,children:n,container:i,direction:a="ltr",disablePortal:s=!1,keepMounted:l=!1,modifiers:c,open:u,placement:d="bottom",popperOptions:p=l0,popperRef:m,style:h,transition:g=!1,slotProps:v={},slots:y={},...S}=t,[w,x]=b.useState(!0),$=()=>{x(!1)},I=()=>{x(!0)};if(!l&&!u&&(!g||w))return null;let E;if(i)E=i;else if(o){const j=ks(o);E=j&&a0(j)?bt(j).body:bt(null).body}const k=!u&&l&&(!g||w)?"none":void 0,D=g?{in:u,onEnter:$,onExited:I}:void 0;return f.jsx(Gf,{disablePortal:s,container:E,children:f.jsx(c0,{anchorEl:o,direction:a,disablePortal:s,modifiers:c,ref:r,open:g?!w:u,placement:d,popperOptions:p,popperRef:m,slotProps:v,slots:y,...S,style:{position:"fixed",top:0,left:0,display:k,...h},TransitionProps:D,children:n})})}),d0=N(u0,{name:"MuiPopper",slot:"Root"})({}),Hf=b.forwardRef(function(t,r){const o=Ys(),n=Ie({props:t,name:"MuiPopper"}),{anchorEl:i,component:a,components:s,componentsProps:l,container:c,disablePortal:u,keepMounted:d,modifiers:p,open:m,placement:h,popperOptions:g,popperRef:v,transition:y,slots:S,slotProps:w,...x}=n,$=S?.root??s?.Root,I={anchorEl:i,container:c,disablePortal:u,keepMounted:d,modifiers:p,open:m,placement:h,popperOptions:g,popperRef:v,transition:y,...x};return f.jsx(d0,{as:a,direction:o?"rtl":"ltr",slots:{root:$},slotProps:w??l,...I,ref:r})}),p0=De(f.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}));function f0(e){return ge("MuiChip",e)}const Me=fe("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),m0=e=>{const{classes:t,disabled:r,size:o,color:n,iconColor:i,onDelete:a,clickable:s,variant:l}=e,c={root:["root",l,r&&"disabled",`size${Z(o)}`,`color${Z(n)}`,s&&"clickable",s&&`clickableColor${Z(n)}`,a&&"deletable",a&&`deletableColor${Z(n)}`,`${l}${Z(n)}`],label:["label",`label${Z(o)}`],avatar:["avatar",`avatar${Z(o)}`,`avatarColor${Z(n)}`],icon:["icon",`icon${Z(o)}`,`iconColor${Z(i)}`],deleteIcon:["deleteIcon",`deleteIcon${Z(o)}`,`deleteIconColor${Z(n)}`,`deleteIcon${Z(l)}Color${Z(n)}`]};return ve(c,f0,t)},h0=N("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e,{color:o,iconColor:n,clickable:i,onDelete:a,size:s,variant:l}=r;return[{[`& .${Me.avatar}`]:t.avatar},{[`& .${Me.avatar}`]:t[`avatar${Z(s)}`]},{[`& .${Me.avatar}`]:t[`avatarColor${Z(o)}`]},{[`& .${Me.icon}`]:t.icon},{[`& .${Me.icon}`]:t[`icon${Z(s)}`]},{[`& .${Me.icon}`]:t[`iconColor${Z(n)}`]},{[`& .${Me.deleteIcon}`]:t.deleteIcon},{[`& .${Me.deleteIcon}`]:t[`deleteIcon${Z(s)}`]},{[`& .${Me.deleteIcon}`]:t[`deleteIconColor${Z(o)}`]},{[`& .${Me.deleteIcon}`]:t[`deleteIcon${Z(l)}Color${Z(o)}`]},t.root,t[`size${Z(s)}`],t[`color${Z(o)}`],i&&t.clickable,i&&o!=="default"&&t[`clickableColor${Z(o)}`],a&&t.deletable,a&&o!=="default"&&t[`deletableColor${Z(o)}`],t[l],t[`${l}${Z(o)}`]]}})(_e(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,lineHeight:1.5,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${Me.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Me.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${Me.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Me.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Me.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Me.icon}`]:{marginLeft:5,marginRight:-6},[`& .${Me.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.alpha((e.vars||e).palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.alpha((e.vars||e).palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${Me.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${Me.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(lt(["contrastText"])).map(([r])=>({props:{color:r},style:{backgroundColor:(e.vars||e).palette[r].main,color:(e.vars||e).palette[r].contrastText,[`& .${Me.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[r].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[r].contrastText}}}})),{props:r=>r.iconColor===r.color,style:{[`& .${Me.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:r=>r.iconColor===r.color&&r.color!=="default",style:{[`& .${Me.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${Me.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},...Object.entries(e.palette).filter(lt(["dark"])).map(([r])=>({props:{color:r,onDelete:!0},style:{[`&.${Me.focusVisible}`]:{background:(e.vars||e).palette[r].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)},[`&.${Me.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(lt(["dark"])).map(([r])=>({props:{color:r,clickable:!0},style:{[`&:hover, &.${Me.focusVisible}`]:{backgroundColor:(e.vars||e).palette[r].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${Me.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Me.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Me.avatar}`]:{marginLeft:4},[`& .${Me.avatarSmall}`]:{marginLeft:2},[`& .${Me.icon}`]:{marginLeft:4},[`& .${Me.iconSmall}`]:{marginLeft:2},[`& .${Me.deleteIcon}`]:{marginRight:5},[`& .${Me.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(lt()).map(([r])=>({props:{variant:"outlined",color:r},style:{color:(e.vars||e).palette[r].main,border:`1px solid ${e.alpha((e.vars||e).palette[r].main,.7)}`,[`&.${Me.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[r].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${Me.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[r].main,(e.vars||e).palette.action.focusOpacity)},[`& .${Me.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[r].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[r].main}}}}))]}})),g0=N("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:r}=e,{size:o}=r;return[t.label,t[`label${Z(o)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function Id(e){return e.key==="Backspace"||e.key==="Delete"}const Ue=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiChip"}),{avatar:n,className:i,clickable:a,color:s="default",component:l,deleteIcon:c,disabled:u=!1,icon:d,label:p,onClick:m,onDelete:h,onKeyDown:g,onKeyUp:v,size:y="medium",variant:S="filled",tabIndex:w,skipFocusWhenDisabled:x=!1,slots:$={},slotProps:I={},...E}=o,k=b.useRef(null),D=at(k,r),j=q=>{q.stopPropagation(),h&&h(q)},C=q=>{q.currentTarget===q.target&&Id(q)&&q.preventDefault(),g&&g(q)},z=q=>{q.currentTarget===q.target&&h&&Id(q)&&h(q),v&&v(q)},O=a!==!1&&m?!0:a,A=O||h?ar:l||"div",T={...o,component:A,disabled:u,size:y,color:s,iconColor:b.isValidElement(d)&&d.props.color||s,onDelete:!!h,clickable:O,variant:S},P=m0(T),M=A===ar?{component:l||"div",focusVisibleClassName:P.focusVisible,...h&&{disableRipple:!0}}:{};let F=null;h&&(F=c&&b.isValidElement(c)?b.cloneElement(c,{className:ee(c.props.className,P.deleteIcon),onClick:j}):f.jsx(p0,{className:P.deleteIcon,onClick:j}));let L=null;n&&b.isValidElement(n)&&(L=b.cloneElement(n,{className:ee(P.avatar,n.props.className)}));let X=null;d&&b.isValidElement(d)&&(X=b.cloneElement(d,{className:ee(P.icon,d.props.className)}));const Q={slots:$,slotProps:I},[pe,le]=xe("root",{elementType:h0,externalForwardedProps:{...Q,...E},ownerState:T,shouldForwardComponentProp:!0,ref:D,className:ee(P.root,i),additionalProps:{disabled:O&&u?!0:void 0,tabIndex:x&&u?-1:w,...M},getSlotProps:q=>({...q,onClick:se=>{q.onClick?.(se),m?.(se)},onKeyDown:se=>{q.onKeyDown?.(se),C(se)},onKeyUp:se=>{q.onKeyUp?.(se),z(se)}})}),[be,te]=xe("label",{elementType:g0,externalForwardedProps:Q,ownerState:T,className:P.label});return f.jsxs(pe,{as:A,...le,children:[L||X,f.jsx(be,{...te,children:p}),F]})});function ii(e){return parseInt(e,10)||0}const v0={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function b0(e){for(const t in e)return!1;return!0}function kd(e){return b0(e)||e.outerHeightStyle===0&&!e.overflowing}const y0=b.forwardRef(function(t,r){const{onChange:o,maxRows:n,minRows:i=1,style:a,value:s,...l}=t,{current:c}=b.useRef(s!=null),u=b.useRef(null),d=at(r,u),p=b.useRef(null),m=b.useRef(null),h=b.useCallback(()=>{const w=u.current,x=m.current;if(!w||!x)return;const I=Cn(w).getComputedStyle(w);if(I.width==="0px")return{outerHeightStyle:0,overflowing:!1};x.style.width=I.width,x.value=w.value||t.placeholder||"x",x.value.slice(-1)===`
|
|
102
|
+
`&&(x.value+=" ");const E=I.boxSizing,k=ii(I.paddingBottom)+ii(I.paddingTop),D=ii(I.borderBottomWidth)+ii(I.borderTopWidth),j=x.scrollHeight;x.value="x";const C=x.scrollHeight;let z=j;i&&(z=Math.max(Number(i)*C,z)),n&&(z=Math.min(Number(n)*C,z)),z=Math.max(z,C);const O=z+(E==="border-box"?k+D:0),A=Math.abs(z-j)<=1;return{outerHeightStyle:O,overflowing:A}},[n,i,t.placeholder]),g=Lt(()=>{const w=u.current,x=h();if(!w||!x||kd(x))return!1;const $=x.outerHeightStyle;return p.current!=null&&p.current!==$}),v=b.useCallback(()=>{const w=u.current,x=h();if(!w||!x||kd(x))return;const $=x.outerHeightStyle;p.current!==$&&(p.current=$,w.style.height=`${$}px`),w.style.overflow=x.overflowing?"hidden":""},[h]),y=b.useRef(-1);fn(()=>{const w=Cf(v),x=u?.current;if(!x)return;const $=Cn(x);$.addEventListener("resize",w);let I;return typeof ResizeObserver<"u"&&(I=new ResizeObserver(()=>{g()&&(I.unobserve(x),cancelAnimationFrame(y.current),v(),y.current=requestAnimationFrame(()=>{I.observe(x)}))}),I.observe(x)),()=>{w.clear(),cancelAnimationFrame(y.current),$.removeEventListener("resize",w),I&&I.disconnect()}},[h,v,g]),fn(()=>{v()});const S=w=>{c||v();const x=w.target,$=x.value.length,I=x.value.endsWith(`
|
|
103
|
+
`),E=x.selectionStart===$;I&&E&&x.setSelectionRange($,$),o&&o(w)};return f.jsxs(b.Fragment,{children:[f.jsx("textarea",{value:s,onChange:S,ref:d,rows:i,style:a,...l}),f.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:m,tabIndex:-1,style:{...v0.shadow,...a,paddingTop:0,paddingBottom:0}})]})});function Vn({props:e,states:t,muiFormControl:r}){return t.reduce((o,n)=>(o[n]=e[n],r&&typeof e[n]>"u"&&(o[n]=r[n]),o),{})}const ua=b.createContext(void 0);function rn(){return b.useContext(ua)}function _d(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Ni(e,t=!1){return e&&(_d(e.value)&&e.value!==""||t&&_d(e.defaultValue)&&e.defaultValue!=="")}function x0(e){return e.startAdornment}function S0(e){return ge("MuiInputBase",e)}const zr=fe("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var Cd;const da=(e,t)=>{const{ownerState:r}=e;return[t.root,r.formControl&&t.formControl,r.startAdornment&&t.adornedStart,r.endAdornment&&t.adornedEnd,r.error&&t.error,r.size==="small"&&t.sizeSmall,r.multiline&&t.multiline,r.color&&t[`color${Z(r.color)}`],r.fullWidth&&t.fullWidth,r.hiddenLabel&&t.hiddenLabel]},pa=(e,t)=>{const{ownerState:r}=e;return[t.input,r.size==="small"&&t.inputSizeSmall,r.multiline&&t.inputMultiline,r.type==="search"&&t.inputTypeSearch,r.startAdornment&&t.inputAdornedStart,r.endAdornment&&t.inputAdornedEnd,r.hiddenLabel&&t.inputHiddenLabel]},w0=e=>{const{classes:t,color:r,disabled:o,error:n,endAdornment:i,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:p,startAdornment:m,type:h}=e,g={root:["root",`color${Z(r)}`,o&&"disabled",n&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",p&&p!=="medium"&&`size${Z(p)}`,u&&"multiline",m&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",o&&"disabled",h==="search"&&"inputTypeSearch",u&&"inputMultiline",p==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",m&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]};return ve(g,S0,t)},fa=N("div",{name:"MuiInputBase",slot:"Root",overridesResolver:da})(_e(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${zr.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:r})=>t.multiline&&r==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),ma=N("input",{name:"MuiInputBase",slot:"Input",overridesResolver:pa})(_e(({theme:e})=>{const t=e.palette.mode==="light",r={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},o={opacity:"0 !important"},n=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${zr.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":n,"&:focus::-moz-placeholder":n,"&:focus::-ms-input-placeholder":n},[`&.${zr.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:i})=>!i.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:i})=>i.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),Ed=Qx({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),ul=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiInputBase"}),{"aria-describedby":n,autoComplete:i,autoFocus:a,className:s,color:l,components:c={},componentsProps:u={},defaultValue:d,disabled:p,disableInjectingGlobalStyles:m,endAdornment:h,error:g,fullWidth:v=!1,id:y,inputComponent:S="input",inputProps:w={},inputRef:x,margin:$,maxRows:I,minRows:E,multiline:k=!1,name:D,onBlur:j,onChange:C,onClick:z,onFocus:O,onKeyDown:A,onKeyUp:T,placeholder:P,readOnly:M,renderSuffix:F,rows:L,size:X,slotProps:Q={},slots:pe={},startAdornment:le,type:be="text",value:te,...q}=o,se=w.value!=null?w.value:te,{current:Oe}=b.useRef(se!=null),Se=b.useRef(),ie=b.useCallback(me=>{},[]),de=at(Se,x,w.ref,ie),[_,W]=b.useState(!1),V=rn(),B=Vn({props:o,muiFormControl:V,states:["color","disabled","error","hiddenLabel","size","required","filled"]});B.focused=V?V.focused:_,b.useEffect(()=>{!V&&p&&_&&(W(!1),j&&j())},[V,p,_,j]);const ne=V&&V.onFilled,ce=V&&V.onEmpty,oe=b.useCallback(me=>{Ni(me)?ne&&ne():ce&&ce()},[ne,ce]);fn(()=>{Oe&&oe({value:se})},[se,oe,Oe]);const ke=me=>{O&&O(me),w.onFocus&&w.onFocus(me),V&&V.onFocus?V.onFocus(me):W(!0)},ye=me=>{j&&j(me),w.onBlur&&w.onBlur(me),V&&V.onBlur?V.onBlur(me):W(!1)},we=(me,...Be)=>{if(!Oe){const nt=me.target||Se.current;if(nt==null)throw new Error(bf(1));oe({value:nt.value})}w.onChange&&w.onChange(me,...Be),C&&C(me,...Be)};b.useEffect(()=>{oe(Se.current)},[]);const G=me=>{Se.current&&me.currentTarget===me.target&&Se.current.focus(),z&&z(me)};let Pe=S,ae=w;k&&Pe==="input"&&(L?ae={type:void 0,minRows:L,maxRows:L,...ae}:ae={type:void 0,maxRows:I,minRows:E,...ae},Pe=y0);const Fe=me=>{oe(me.animationName==="mui-auto-fill-cancel"?Se.current:{value:"x"})};b.useEffect(()=>{V&&V.setAdornedStart(!!le)},[V,le]);const ze={...o,color:B.color||"primary",disabled:B.disabled,endAdornment:h,error:B.error,focused:B.focused,formControl:V,fullWidth:v,hiddenLabel:B.hiddenLabel,multiline:k,size:B.size,startAdornment:le,type:be},Ke=w0(ze),dt=pe.root||c.Root||fa,it=Q.root||u.root||{},ut=pe.input||c.Input||ma;return ae={...ae,...Q.input??u.input},f.jsxs(b.Fragment,{children:[!m&&typeof Ed=="function"&&(Cd||(Cd=f.jsx(Ed,{}))),f.jsxs(dt,{...it,ref:r,onClick:G,...q,...!jr(dt)&&{ownerState:{...ze,...it.ownerState}},className:ee(Ke.root,it.className,s,M&&"MuiInputBase-readOnly"),children:[le,f.jsx(ua.Provider,{value:null,children:f.jsx(ut,{"aria-invalid":B.error,"aria-describedby":n,autoComplete:i,autoFocus:a,defaultValue:d,disabled:B.disabled,id:y,onAnimationStart:Fe,name:D,placeholder:P,readOnly:M,required:B.required,rows:L,value:se,onKeyDown:A,onKeyUp:T,type:be,...ae,...!jr(ut)&&{as:Pe,ownerState:{...ze,...ae.ownerState}},ref:de,className:ee(Ke.input,ae.className,M&&"MuiInputBase-readOnly"),onBlur:ye,onChange:we,onFocus:ke})}),h,F?F({...B,startAdornment:le}):null]})]})});function $0(e){return ge("MuiInput",e)}const Xr={...zr,...fe("MuiInput",["root","underline","input"])};function I0(e){return ge("MuiOutlinedInput",e)}const ln={...zr,...fe("MuiOutlinedInput",["root","notchedOutline","input"])};function k0(e){return ge("MuiFilledInput",e)}const Gn={...zr,...fe("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},_0=De(f.jsx("path",{d:"M7 10l5 5 5-5z"})),C0={entering:{opacity:1},entered:{opacity:1}},_s=b.forwardRef(function(t,r){const o=hr(),n={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:s,easing:l,in:c,onEnter:u,onEntered:d,onEntering:p,onExit:m,onExited:h,onExiting:g,style:v,timeout:y=n,TransitionComponent:S=nn,...w}=t,x=b.useRef(null),$=at(x,vr(s),r),I=A=>T=>{if(A){const P=x.current;T===void 0?A(P):A(P,T)}},E=I(p),k=I((A,T)=>{Rf(A);const P=Pr({style:v,timeout:y,easing:l},{mode:"enter"});A.style.webkitTransition=o.transitions.create("opacity",P),A.style.transition=o.transitions.create("opacity",P),u&&u(A,T)}),D=I(d),j=I(g),C=I(A=>{const T=Pr({style:v,timeout:y,easing:l},{mode:"exit"});A.style.webkitTransition=o.transitions.create("opacity",T),A.style.transition=o.transitions.create("opacity",T),m&&m(A)}),z=I(h),O=A=>{i&&i(x.current,A)};return f.jsx(S,{appear:a,in:c,nodeRef:x,onEnter:k,onEntered:D,onEntering:E,onExit:C,onExited:z,onExiting:j,addEndListener:O,timeout:y,...w,children:(A,{ownerState:T,...P})=>b.cloneElement(s,{style:{opacity:0,visibility:A==="exited"&&!c?"hidden":void 0,...C0[A],...v,...s.props.style},ref:$,...P})})});function E0(e){return ge("MuiBackdrop",e)}fe("MuiBackdrop",["root","invisible"]);const P0=e=>{const{classes:t,invisible:r}=e;return ve({root:["root",r&&"invisible"]},E0,t)},j0=N("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),Kf=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiBackdrop"}),{children:n,className:i,component:a="div",invisible:s=!1,open:l,components:c={},componentsProps:u={},slotProps:d={},slots:p={},TransitionComponent:m,transitionDuration:h,...g}=o,v={...o,component:a,invisible:s},y=P0(v),S={transition:m,root:c.Root,...p},w={...u,...d},x={component:a,slots:S,slotProps:w},[$,I]=xe("root",{elementType:j0,externalForwardedProps:x,className:ee(y.root,i),ownerState:v}),[E,k]=xe("transition",{elementType:_s,externalForwardedProps:x,ownerState:v});return f.jsx(E,{in:l,timeout:h,...g,...k,children:f.jsx($,{"aria-hidden":!0,...I,classes:y,ref:r,children:n})})}),O0=fe("MuiBox",["root"]),R0=eS(),Ye=IS({themeId:qs,defaultTheme:R0,defaultClassName:O0.root,generateClassName:$f.generate});function D0(e){return ge("MuiButton",e)}const Hn=fe("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),T0=b.createContext({}),z0=b.createContext(void 0),A0=e=>{const{color:t,disableElevation:r,fullWidth:o,size:n,variant:i,loading:a,loadingPosition:s,classes:l}=e,c={root:["root",a&&"loading",i,`${i}${Z(t)}`,`size${Z(n)}`,`${i}Size${Z(n)}`,`color${Z(t)}`,r&&"disableElevation",o&&"fullWidth",a&&`loadingPosition${Z(s)}`],startIcon:["icon","startIcon",`iconSize${Z(n)}`],endIcon:["icon","endIcon",`iconSize${Z(n)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},u=ve(c,D0,l);return{...l,...u}},qf=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],M0=N(ar,{shouldForwardProp:e=>yt(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`${r.variant}${Z(r.color)}`],t[`size${Z(r.size)}`],t[`${r.variant}Size${Z(r.size)}`],r.color==="inherit"&&t.colorInherit,r.disableElevation&&t.disableElevation,r.fullWidth&&t.fullWidth,r.loading&&t.loading]}})(_e(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],r=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${Hn.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${Hn.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${Hn.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${Hn.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(lt()).map(([o])=>({props:{color:o},style:{"--variant-textColor":(e.vars||e).palette[o].main,"--variant-outlinedColor":(e.vars||e).palette[o].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[o].main,.5),"--variant-containedColor":(e.vars||e).palette[o].contrastText,"--variant-containedBg":(e.vars||e).palette[o].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[o].dark,"--variant-textBg":e.alpha((e.vars||e).palette[o].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[o].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[o].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:r,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Hn.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Hn.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${Hn.loading}`]:{color:"transparent"}}}]}})),N0=N("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.startIcon,r.loading&&t.startIconLoadingStart,t[`iconSize${Z(r.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...qf]})),F0=N("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.endIcon,r.loading&&t.endIconLoadingEnd,t[`iconSize${Z(r.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...qf]})),L0=N("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),Pd=N("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),Et=b.forwardRef(function(t,r){const o=b.useContext(T0),n=b.useContext(z0),i=yf(o,t),a=Ie({props:i,name:"MuiButton"}),{children:s,color:l="primary",component:c="button",className:u,disabled:d=!1,disableElevation:p=!1,disableFocusRipple:m=!1,endIcon:h,focusVisibleClassName:g,fullWidth:v=!1,id:y,loading:S=null,loadingIndicator:w,loadingPosition:x="center",size:$="medium",startIcon:I,type:E,variant:k="text",...D}=a,j=mr(y),C=w??f.jsx(la,{"aria-labelledby":j,color:"inherit",size:16}),z={...a,color:l,component:c,disabled:d,disableElevation:p,disableFocusRipple:m,fullWidth:v,loading:S,loadingIndicator:C,loadingPosition:x,size:$,type:E,variant:k},O=A0(z),A=(I||S&&x==="start")&&f.jsx(N0,{className:O.startIcon,ownerState:z,children:I||f.jsx(Pd,{className:O.loadingIconPlaceholder,ownerState:z})}),T=(h||S&&x==="end")&&f.jsx(F0,{className:O.endIcon,ownerState:z,children:h||f.jsx(Pd,{className:O.loadingIconPlaceholder,ownerState:z})}),P=n||"",M=typeof S=="boolean"?f.jsx("span",{className:O.loadingWrapper,style:{display:"contents"},children:S&&f.jsx(L0,{className:O.loadingIndicator,ownerState:z,children:C})}):null;return f.jsxs(M0,{ownerState:z,className:ee(o.className,O.root,u,P),component:c,disabled:d||S,focusRipple:!m,focusVisibleClassName:ee(O.focusVisible,g),ref:r,type:E,id:S?j:y,...D,classes:O,children:[A,x!=="end"&&M,s,x==="end"&&M,T]})});function U0(e){return b.Children.toArray(e).filter(t=>b.isValidElement(t))}function B0(e){return ge("PrivateSwitchBase",e)}fe("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const V0=e=>{const{classes:t,checked:r,disabled:o,edge:n}=e,i={root:["root",r&&"checked",o&&"disabled",n&&`edge${Z(n)}`],input:["input"]};return ve(i,B0,t)},W0=N(ar,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e==="start"&&t.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e==="end"&&t.size!=="small",style:{marginRight:-12}}]}),Z0=N("input",{name:"MuiSwitchBase",shouldForwardProp:yt})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Jf=b.forwardRef(function(t,r){const{autoFocus:o,checked:n,checkedIcon:i,defaultChecked:a,disabled:s,disableFocusRipple:l=!1,edge:c=!1,icon:u,id:d,inputProps:p,inputRef:m,name:h,onBlur:g,onChange:v,onFocus:y,readOnly:S,required:w=!1,tabIndex:x,type:$,value:I,slots:E={},slotProps:k={},...D}=t,[j,C]=$o({controlled:n,default:!!a,name:"SwitchBase",state:"checked"}),z=rn(),O=te=>{y&&y(te),z&&z.onFocus&&z.onFocus(te)},A=te=>{g&&g(te),z&&z.onBlur&&z.onBlur(te)},T=te=>{if(te.nativeEvent.defaultPrevented)return;const q=te.target.checked;C(q),v&&v(te,q)};let P=s;z&&typeof P>"u"&&(P=z.disabled);const M=$==="checkbox"||$==="radio",F={...t,checked:j,disabled:P,disableFocusRipple:l,edge:c},L=V0(F),X={slots:E,slotProps:{input:p,...k}},[Q,pe]=xe("root",{ref:r,elementType:W0,className:L.root,shouldForwardComponentProp:!0,externalForwardedProps:{...X,component:"span",...D},getSlotProps:te=>({...te,onFocus:q=>{te.onFocus?.(q),O(q)},onBlur:q=>{te.onBlur?.(q),A(q)}}),ownerState:F,additionalProps:{centerRipple:!0,focusRipple:!l,disabled:P,role:void 0,tabIndex:null}}),[le,be]=xe("input",{ref:m,elementType:Z0,className:L.input,externalForwardedProps:X,getSlotProps:te=>({...te,onChange:q=>{te.onChange?.(q),T(q)}}),ownerState:F,additionalProps:{autoFocus:o,checked:n,defaultChecked:a,disabled:P,id:M?d:void 0,name:h,readOnly:S,required:w,tabIndex:x,type:$,...$==="checkbox"&&I===void 0?{}:{value:I}}});return f.jsxs(Q,{...pe,children:[f.jsx(le,{...be}),j?i:u]})}),G0=De(f.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})),H0=De(f.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})),K0=De(f.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}));function q0(e){return ge("MuiCheckbox",e)}const Wa=fe("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),J0=e=>{const{classes:t,indeterminate:r,color:o,size:n}=e,i={root:["root",r&&"indeterminate",`color${Z(o)}`,`size${Z(n)}`]},a=ve(i,q0,t);return{...t,...a}},X0=N(Jf,{shouldForwardProp:e=>yt(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.indeterminate&&t.indeterminate,t[`size${Z(r.size)}`],r.color!=="default"&&t[`color${Z(r.color)}`]]}})(_e(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(lt()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(lt()).map(([t])=>({props:{color:t},style:{[`&.${Wa.checked}, &.${Wa.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${Wa.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),Y0=f.jsx(H0,{}),Q0=f.jsx(G0,{}),eI=f.jsx(K0,{}),dl=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiCheckbox"}),{checkedIcon:n=Y0,color:i="primary",icon:a=Q0,indeterminate:s=!1,indeterminateIcon:l=eI,inputProps:c,size:u="medium",disableRipple:d=!1,className:p,slots:m={},slotProps:h={},...g}=o,v=s?l:a,y=s?l:n,S={...o,disableRipple:d,color:i,indeterminate:s,size:u},w=J0(S),x=h.input??c,[$,I]=xe("root",{ref:r,elementType:X0,className:ee(w.root,p),shouldForwardComponentProp:!0,externalForwardedProps:{slots:m,slotProps:h,...g},ownerState:S,additionalProps:{type:"checkbox",icon:b.cloneElement(v,{fontSize:v.props.fontSize??u}),checkedIcon:b.cloneElement(y,{fontSize:y.props.fontSize??u}),disableRipple:d,slots:m,slotProps:{input:Ef(typeof x=="function"?x(S):x,{"data-indeterminate":s})}}});return f.jsx($,{...I,classes:w})});function jd(e){return e.substring(2).toLowerCase()}function tI(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function nI(e){const{children:t,disableReactTree:r=!1,mouseEvent:o="onClick",onClickAway:n,touchEvent:i="onTouchEnd"}=e,a=b.useRef(!1),s=b.useRef(null),l=b.useRef(!1),c=b.useRef(!1);b.useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=at(vr(t),s),d=Lt(h=>{const g=c.current;c.current=!1;const v=bt(s.current);if(!l.current||!s.current||"clientX"in h&&tI(h,v))return;if(a.current){a.current=!1;return}let y;h.composedPath?y=h.composedPath().includes(s.current):y=!v.documentElement.contains(h.target)||s.current.contains(h.target),!y&&(r||!g)&&n(h)}),p=h=>g=>{c.current=!0;const v=t.props[h];v&&v(g)},m={ref:u};return i!==!1&&(m[i]=p(i)),b.useEffect(()=>{if(i!==!1){const h=jd(i),g=bt(s.current),v=()=>{a.current=!0};return g.addEventListener(h,d),g.addEventListener("touchmove",v),()=>{g.removeEventListener(h,d),g.removeEventListener("touchmove",v)}}},[d,i]),o!==!1&&(m[o]=p(o)),b.useEffect(()=>{if(o!==!1){const h=jd(o),g=bt(s.current);return g.addEventListener(h,d),()=>{g.removeEventListener(h,d)}}},[d,o]),b.cloneElement(t,m)}function Xf(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function rI(e){const t=bt(e);return t.body===e?Cn(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function bo(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Od(e){return parseInt(Cn(e).getComputedStyle(e).paddingRight,10)||0}function oI(e){const r=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),o=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return r||o}function Rd(e,t,r,o,n){const i=[t,r,...o];[].forEach.call(e.children,a=>{const s=!i.includes(a),l=!oI(a);s&&l&&bo(a,n)})}function Za(e,t){let r=-1;return e.some((o,n)=>t(o)?(r=n,!0):!1),r}function iI(e,t){const r=[],o=e.container;if(!t.disableScrollLock){if(rI(o)){const a=Xf(Cn(o));r.push({value:o.style.paddingRight,property:"padding-right",el:o}),o.style.paddingRight=`${Od(o)+a}px`;const s=bt(o).querySelectorAll(".mui-fixed");[].forEach.call(s,l=>{r.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${Od(l)+a}px`})}let i;if(o.parentNode instanceof DocumentFragment)i=bt(o).body;else{const a=o.parentElement,s=Cn(o);i=a?.nodeName==="HTML"&&s.getComputedStyle(a).overflowY==="scroll"?a:o}r.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{r.forEach(({value:i,el:a,property:s})=>{i?a.style.setProperty(s,i):a.style.removeProperty(s)})}}function aI(e){const t=[];return[].forEach.call(e.children,r=>{r.getAttribute("aria-hidden")==="true"&&t.push(r)}),t}class sI{constructor(){this.modals=[],this.containers=[]}add(t,r){let o=this.modals.indexOf(t);if(o!==-1)return o;o=this.modals.length,this.modals.push(t),t.modalRef&&bo(t.modalRef,!1);const n=aI(r);Rd(r,t.mount,t.modalRef,n,!0);const i=Za(this.containers,a=>a.container===r);return i!==-1?(this.containers[i].modals.push(t),o):(this.containers.push({modals:[t],container:r,restore:null,hiddenSiblings:n}),o)}mount(t,r){const o=Za(this.containers,i=>i.modals.includes(t)),n=this.containers[o];n.restore||(n.restore=iI(n,r))}remove(t,r=!0){const o=this.modals.indexOf(t);if(o===-1)return o;const n=Za(this.containers,a=>a.modals.includes(t)),i=this.containers[n];if(i.modals.splice(i.modals.indexOf(t),1),this.modals.splice(o,1),i.modals.length===0)i.restore&&i.restore(),t.modalRef&&bo(t.modalRef,r),Rd(i.container,t.mount,t.modalRef,i.hiddenSiblings,!1),this.containers.splice(n,1);else{const a=i.modals[i.modals.length-1];a.modalRef&&bo(a.modalRef,!1)}return o}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function co(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}const lI=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function cI(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function uI(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=o=>e.ownerDocument.querySelector(`input[type="radio"]${o}`);let r=t(`[name="${e.name}"]:checked`);return r||(r=t(`[name="${e.name}"]`)),r!==e}function dI(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||uI(e))}function pI(e){const t=[],r=[];return Array.from(e.querySelectorAll(lI)).forEach((o,n)=>{const i=cI(o);i===-1||!dI(o)||(i===0?t.push(o):r.push({documentOrder:n,tabIndex:i,node:o}))}),r.sort((o,n)=>o.tabIndex===n.tabIndex?o.documentOrder-n.documentOrder:o.tabIndex-n.tabIndex).map(o=>o.node).concat(t)}function fI(){return!0}function mI(e){const{children:t,disableAutoFocus:r=!1,disableEnforceFocus:o=!1,disableRestoreFocus:n=!1,getTabbable:i=pI,isEnabled:a=fI,open:s}=e,l=b.useRef(!1),c=b.useRef(null),u=b.useRef(null),d=b.useRef(null),p=b.useRef(null),m=b.useRef(!1),h=b.useRef(null),g=at(vr(t),h),v=b.useRef(null);b.useEffect(()=>{!s||!h.current||(m.current=!r)},[r,s]),b.useEffect(()=>{if(!s||!h.current)return;const w=bt(h.current),x=co(w);return h.current.contains(x)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex","-1"),m.current&&h.current.focus()),()=>{n||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[s]),b.useEffect(()=>{if(!s||!h.current)return;const w=bt(h.current),x=co(w),$=k=>{v.current=k,!(o||!a()||k.key!=="Tab")&&x===h.current&&k.shiftKey&&(l.current=!0,u.current&&u.current.focus())},I=()=>{const k=h.current;if(k===null)return;const D=co(w);if(!w.hasFocus()||!a()||l.current){l.current=!1;return}if(k.contains(D)||o&&D!==c.current&&D!==u.current)return;if(D!==p.current)p.current=null;else if(p.current!==null)return;if(!m.current)return;let j=[];if((D===c.current||D===u.current)&&(j=i(h.current)),j.length>0){const C=!!(v.current?.shiftKey&&v.current?.key==="Tab"),z=j[0],O=j[j.length-1];typeof z!="string"&&typeof O!="string"&&(C?O.focus():z.focus())}else k.focus()};w.addEventListener("focusin",I),w.addEventListener("keydown",$,!0);const E=setInterval(()=>{const k=co(w);k&&k.tagName==="BODY"&&I()},50);return()=>{clearInterval(E),w.removeEventListener("focusin",I),w.removeEventListener("keydown",$,!0)}},[r,o,n,a,s,i]);const y=w=>{d.current===null&&(d.current=w.relatedTarget),m.current=!0,p.current=w.target;const x=t.props.onFocus;x&&x(w)},S=w=>{d.current===null&&(d.current=w.relatedTarget),m.current=!0};return f.jsxs(b.Fragment,{children:[f.jsx("div",{tabIndex:s?0:-1,onFocus:S,ref:c,"data-testid":"sentinelStart"}),b.cloneElement(t,{ref:g,onFocus:y}),f.jsx("div",{tabIndex:s?0:-1,onFocus:S,ref:u,"data-testid":"sentinelEnd"})]})}function hI(e){return typeof e=="function"?e():e}function gI(e){return e?e.props.hasOwnProperty("in"):!1}const Dd=()=>{},ai=new sI;function vI(e){const{container:t,disableEscapeKeyDown:r=!1,disableScrollLock:o=!1,closeAfterTransition:n=!1,onTransitionEnter:i,onTransitionExited:a,children:s,onClose:l,open:c,rootRef:u}=e,d=b.useRef({}),p=b.useRef(null),m=b.useRef(null),h=at(m,u),[g,v]=b.useState(!c),y=gI(s);let S=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(S=!1);const w=()=>bt(p.current),x=()=>(d.current.modalRef=m.current,d.current.mount=p.current,d.current),$=()=>{ai.mount(x(),{disableScrollLock:o}),m.current&&(m.current.scrollTop=0)},I=Lt(()=>{const T=hI(t)||w().body;ai.add(x(),T),m.current&&$()}),E=()=>ai.isTopModal(x()),k=Lt(T=>{p.current=T,T&&(c&&E()?$():m.current&&bo(m.current,S))}),D=b.useCallback(()=>{ai.remove(x(),S)},[S]);b.useEffect(()=>()=>{D()},[D]),b.useEffect(()=>{c?I():(!y||!n)&&D()},[c,D,y,n,I]);const j=T=>P=>{T.onKeyDown?.(P),!(P.key!=="Escape"||P.which===229||!E())&&(r||(P.stopPropagation(),l&&l(P,"escapeKeyDown")))},C=T=>P=>{T.onClick?.(P),P.target===P.currentTarget&&l&&l(P,"backdropClick")};return{getRootProps:(T={})=>{const P=Ti(e);delete P.onTransitionEnter,delete P.onTransitionExited;const M={...P,...T};return{role:"presentation",...M,onKeyDown:j(M),ref:h}},getBackdropProps:(T={})=>{const P=T;return{"aria-hidden":!0,...P,onClick:C(P),open:c}},getTransitionProps:()=>{const T=()=>{v(!1),i&&i()},P=()=>{v(!0),a&&a(),n&&D()};return{onEnter:hs(T,s?.props.onEnter??Dd),onExited:hs(P,s?.props.onExited??Dd)}},rootRef:h,portalRef:k,isTopModal:E,exited:g,hasTransition:y}}function bI(e){return ge("MuiModal",e)}fe("MuiModal",["root","hidden","backdrop"]);const yI=e=>{const{open:t,exited:r,classes:o}=e;return ve({root:["root",!t&&r&&"hidden"],backdrop:["backdrop"]},bI,o)},xI=N("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.open&&r.exited&&t.hidden]}})(_e(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),SI=N(Kf,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),Yf=b.forwardRef(function(t,r){const o=Ie({name:"MuiModal",props:t}),{BackdropComponent:n=SI,BackdropProps:i,classes:a,className:s,closeAfterTransition:l=!1,children:c,container:u,component:d,components:p={},componentsProps:m={},disableAutoFocus:h=!1,disableEnforceFocus:g=!1,disableEscapeKeyDown:v=!1,disablePortal:y=!1,disableRestoreFocus:S=!1,disableScrollLock:w=!1,hideBackdrop:x=!1,keepMounted:$=!1,onClose:I,onTransitionEnter:E,onTransitionExited:k,open:D,slotProps:j={},slots:C={},theme:z,...O}=o,A={...o,closeAfterTransition:l,disableAutoFocus:h,disableEnforceFocus:g,disableEscapeKeyDown:v,disablePortal:y,disableRestoreFocus:S,disableScrollLock:w,hideBackdrop:x,keepMounted:$},{getRootProps:T,getBackdropProps:P,getTransitionProps:M,portalRef:F,isTopModal:L,exited:X,hasTransition:Q}=vI({...A,rootRef:r}),pe={...A,exited:X},le=yI(pe),be={};if(c.props.tabIndex===void 0&&(be.tabIndex="-1"),Q){const{onEnter:ie,onExited:de}=M();be.onEnter=ie,be.onExited=de}const te={slots:{root:p.Root,backdrop:p.Backdrop,...C},slotProps:{...m,...j}},[q,se]=xe("root",{ref:r,elementType:xI,externalForwardedProps:{...te,...O,component:d},getSlotProps:T,ownerState:pe,className:ee(s,le?.root,!pe.open&&pe.exited&&le?.hidden)}),[Oe,Se]=xe("backdrop",{ref:i?.ref,elementType:n,externalForwardedProps:te,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:ie=>P({...ie,onClick:de=>{ie?.onClick&&ie.onClick(de)}}),className:ee(i?.className,le?.backdrop),ownerState:pe});return!$&&!D&&(!Q||X)?null:f.jsx(Gf,{ref:F,container:u,disablePortal:y,children:f.jsxs(q,{...se,children:[!x&&n?f.jsx(Oe,{...Se}):null,f.jsx(mI,{disableEnforceFocus:g,disableAutoFocus:h,disableRestoreFocus:S,isEnabled:L,open:D,children:b.cloneElement(c,be)})]})})});function wI(e){return ge("MuiDialog",e)}const Ga=fe("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),Qf=b.createContext({}),$I=N(Kf,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),II=e=>{const{classes:t,scroll:r,maxWidth:o,fullWidth:n,fullScreen:i}=e,a={root:["root"],container:["container",`scroll${Z(r)}`],paper:["paper",`paperScroll${Z(r)}`,`paperWidth${Z(String(o))}`,n&&"paperFullWidth",i&&"paperFullScreen"]};return ve(a,wI,t)},kI=N(Yf,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),_I=N("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.container,t[`scroll${Z(r.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),CI=N(gr,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.paper,t[`scrollPaper${Z(r.scroll)}`],t[`paperWidth${Z(String(r.maxWidth))}`],r.fullWidth&&t.paperFullWidth,r.fullScreen&&t.paperFullScreen]}})(_e(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:t})=>!t.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${Ga.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(t=>t!=="xs").map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${Ga.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:t})=>t.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:t})=>t.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${Ga.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),pl=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiDialog"}),n=hr(),i={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":s,"aria-modal":l=!0,BackdropComponent:c,BackdropProps:u,children:d,className:p,disableEscapeKeyDown:m=!1,fullScreen:h=!1,fullWidth:g=!1,maxWidth:v="sm",onClick:y,onClose:S,open:w,PaperComponent:x=gr,PaperProps:$={},scroll:I="paper",slots:E={},slotProps:k={},TransitionComponent:D=_s,transitionDuration:j=i,TransitionProps:C,...z}=o,O={...o,disableEscapeKeyDown:m,fullScreen:h,fullWidth:g,maxWidth:v,scroll:I},A=II(O),T=b.useRef(),P=W=>{T.current=W.target===W.currentTarget},M=W=>{y&&y(W),T.current&&(T.current=null,S&&S(W,"backdropClick"))},F=mr(s),L=b.useMemo(()=>({titleId:F}),[F]),X={transition:D,...E},Q={transition:C,paper:$,backdrop:u,...k},pe={slots:X,slotProps:Q},[le,be]=xe("root",{elementType:kI,shouldForwardComponentProp:!0,externalForwardedProps:pe,ownerState:O,className:ee(A.root,p),ref:r}),[te,q]=xe("backdrop",{elementType:$I,shouldForwardComponentProp:!0,externalForwardedProps:pe,ownerState:O}),[se,Oe]=xe("paper",{elementType:CI,shouldForwardComponentProp:!0,externalForwardedProps:pe,ownerState:O,className:ee(A.paper,$.className)}),[Se,ie]=xe("container",{elementType:_I,externalForwardedProps:pe,ownerState:O,className:A.container}),[de,_]=xe("transition",{elementType:_s,externalForwardedProps:pe,ownerState:O,additionalProps:{appear:!0,in:w,timeout:j,role:"presentation"}});return f.jsx(le,{closeAfterTransition:!0,slots:{backdrop:te},slotProps:{backdrop:{transitionDuration:j,as:c,...q}},disableEscapeKeyDown:m,onClose:S,open:w,onClick:M,...be,...z,children:f.jsx(de,{..._,children:f.jsx(Se,{onMouseDown:P,...ie,children:f.jsx(se,{as:x,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":F,"aria-modal":l,...Oe,children:f.jsx(Qf.Provider,{value:L,children:d})})})})})});function EI(e){return ge("MuiDialogActions",e)}fe("MuiDialogActions",["root","spacing"]);const PI=e=>{const{classes:t,disableSpacing:r}=e;return ve({root:["root",!r&&"spacing"]},EI,t)},jI=N("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),em=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiDialogActions"}),{className:n,disableSpacing:i=!1,...a}=o,s={...o,disableSpacing:i},l=PI(s);return f.jsx(jI,{className:ee(l.root,n),ownerState:s,ref:r,...a})});function OI(e){return ge("MuiDialogContent",e)}fe("MuiDialogContent",["root","dividers"]);function RI(e){return ge("MuiDialogTitle",e)}const DI=fe("MuiDialogTitle",["root"]),TI=e=>{const{classes:t,dividers:r}=e;return ve({root:["root",r&&"dividers"]},OI,t)},zI=N("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.dividers&&t.dividers]}})(_e(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:t})=>t.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>!t.dividers,style:{[`.${DI.root} + &`]:{paddingTop:0}}}]}))),fl=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiDialogContent"}),{className:n,dividers:i=!1,...a}=o,s={...o,dividers:i},l=TI(s);return f.jsx(zI,{className:ee(l.root,n),ownerState:s,ref:r,...a})}),AI=e=>{const{classes:t}=e;return ve({root:["root"]},RI,t)},MI=N(je,{name:"MuiDialogTitle",slot:"Root"})({padding:"16px 24px",flex:"0 0 auto"}),tm=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiDialogTitle"}),{className:n,id:i,...a}=o,s=o,l=AI(s),{titleId:c=i}=b.useContext(Qf);return f.jsx(MI,{component:"h2",className:ee(l.root,n),ownerState:s,ref:r,variant:"h6",id:i??c,...a})});function NI(e){return ge("MuiDivider",e)}const Td=fe("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),FI=e=>{const{absolute:t,children:r,classes:o,flexItem:n,light:i,orientation:a,textAlign:s,variant:l}=e;return ve({root:["root",t&&"absolute",l,i&&"light",a==="vertical"&&"vertical",n&&"flexItem",r&&"withChildren",r&&a==="vertical"&&"withChildrenVertical",s==="right"&&a!=="vertical"&&"textAlignRight",s==="left"&&a!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",a==="vertical"&&"wrapperVertical"]},NI,o)},LI=N("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,r.orientation==="vertical"&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&r.orientation==="vertical"&&t.withChildrenVertical,r.textAlign==="right"&&r.orientation!=="vertical"&&t.textAlignRight,r.textAlign==="left"&&r.orientation!=="vertical"&&t.textAlignLeft]}})(_e(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.alpha((e.vars||e).palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:t})=>!!t.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:t})=>t.children&&t.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:t})=>t.orientation==="vertical"&&t.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:t})=>t.textAlign==="right"&&t.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:t})=>t.textAlign==="left"&&t.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),UI=N("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.wrapper,r.orientation==="vertical"&&t.wrapperVertical]}})(_e(({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),lr=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiDivider"}),{absolute:n=!1,children:i,className:a,orientation:s="horizontal",component:l=i||s==="vertical"?"div":"hr",flexItem:c=!1,light:u=!1,role:d=l!=="hr"?"separator":void 0,textAlign:p="center",variant:m="fullWidth",...h}=o,g={...o,absolute:n,component:l,flexItem:c,light:u,orientation:s,role:d,textAlign:p,variant:m},v=FI(g);return f.jsx(LI,{as:l,className:ee(v.root,a),role:d,ref:r,ownerState:g,"aria-orientation":d==="separator"&&(l!=="hr"||s==="vertical")?s:void 0,...h,children:i?f.jsx(UI,{className:v.wrapper,ownerState:g,children:i}):null})});lr&&(lr.muiSkipListHighlight=!0);const BI=e=>{const{classes:t,disableUnderline:r,startAdornment:o,endAdornment:n,size:i,hiddenLabel:a,multiline:s}=e,l={root:["root",!r&&"underline",o&&"adornedStart",n&&"adornedEnd",i==="small"&&`size${Z(i)}`,a&&"hiddenLabel",s&&"multiline"],input:["input"]},c=ve(l,k0,t);return{...t,...c}},VI=N(fa,{shouldForwardProp:e=>yt(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[...da(e,t),!r.disableUnderline&&t.underline]}})(_e(({theme:e})=>{const t=e.palette.mode==="light",r=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",n=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:n,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o}},[`&.${Gn.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${Gn.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:a})=>!a.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Gn.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Gn.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Gn.disabled}, .${Gn.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Gn.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(lt()).map(([a])=>({props:{disableUnderline:!1,color:a},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[a]?.main}`}}})),{props:({ownerState:a})=>a.startAdornment,style:{paddingLeft:12}},{props:({ownerState:a})=>a.endAdornment,style:{paddingRight:12}},{props:({ownerState:a})=>a.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:a,size:s})=>a.multiline&&s==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel&&a.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),WI=N(ma,{name:"MuiFilledInput",slot:"Input",overridesResolver:pa})(_e(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),ml=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiFilledInput"}),{disableUnderline:n=!1,components:i={},componentsProps:a,fullWidth:s=!1,hiddenLabel:l,inputComponent:c="input",multiline:u=!1,slotProps:d,slots:p={},type:m="text",...h}=o,g={...o,disableUnderline:n,fullWidth:s,inputComponent:c,multiline:u,type:m},v=BI(o),y={root:{ownerState:g},input:{ownerState:g}},S=d??a?Qs(y,d??a):y,w=p.root??i.Root??VI,x=p.input??i.Input??WI;return f.jsx(ul,{slots:{root:w,input:x},slotProps:S,fullWidth:s,inputComponent:c,multiline:u,ref:r,type:m,...h,classes:v})});ml.muiName="Input";function ZI(e){return ge("MuiFormControl",e)}fe("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const GI=e=>{const{classes:t,margin:r,fullWidth:o}=e,n={root:["root",r!=="none"&&`margin${Z(r)}`,o&&"fullWidth"]};return ve(n,ZI,t)},HI=N("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`margin${Z(r.margin)}`],r.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),br=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiFormControl"}),{children:n,className:i,color:a="primary",component:s="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:d=!1,hiddenLabel:p=!1,margin:m="none",required:h=!1,size:g="medium",variant:v="outlined",...y}=o,S={...o,color:a,component:s,disabled:l,error:c,fullWidth:d,hiddenLabel:p,margin:m,required:h,size:g,variant:v},w=GI(S),[x,$]=b.useState(()=>{let T=!1;return n&&b.Children.forEach(n,P=>{if(!ki(P,["Input","Select"]))return;const M=ki(P,["Select"])?P.props.input:P;M&&x0(M.props)&&(T=!0)}),T}),[I,E]=b.useState(()=>{let T=!1;return n&&b.Children.forEach(n,P=>{ki(P,["Input","Select"])&&(Ni(P.props,!0)||Ni(P.props.inputProps,!0))&&(T=!0)}),T}),[k,D]=b.useState(!1);l&&k&&D(!1);const j=u!==void 0&&!l?u:k;let C;b.useRef(!1);const z=b.useCallback(()=>{E(!0)},[]),O=b.useCallback(()=>{E(!1)},[]),A=b.useMemo(()=>({adornedStart:x,setAdornedStart:$,color:a,disabled:l,error:c,filled:I,focused:j,fullWidth:d,hiddenLabel:p,size:g,onBlur:()=>{D(!1)},onFocus:()=>{D(!0)},onEmpty:O,onFilled:z,registerEffect:C,required:h,variant:v}),[x,a,l,c,I,j,d,p,C,O,z,h,g,v]);return f.jsx(ua.Provider,{value:A,children:f.jsx(HI,{as:s,ownerState:S,className:ee(w.root,i),ref:r,...y,children:n})})});function KI(e){return ge("MuiFormControlLabel",e)}const uo=fe("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),qI=e=>{const{classes:t,disabled:r,labelPlacement:o,error:n,required:i}=e,a={root:["root",r&&"disabled",`labelPlacement${Z(o)}`,n&&"error",i&&"required"],label:["label",r&&"disabled"],asterisk:["asterisk",n&&"error"]};return ve(a,KI,t)},JI=N("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${uo.label}`]:t.label},t.root,t[`labelPlacement${Z(r.labelPlacement)}`]]}})(_e(({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${uo.disabled}`]:{cursor:"default"},[`& .${uo.label}`]:{[`&.${uo.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:t})=>t==="start"||t==="top"||t==="bottom",style:{marginLeft:16}}]}))),XI=N("span",{name:"MuiFormControlLabel",slot:"Asterisk"})(_e(({theme:e})=>({[`&.${uo.error}`]:{color:(e.vars||e).palette.error.main}}))),ha=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiFormControlLabel"}),{checked:n,className:i,componentsProps:a={},control:s,disabled:l,disableTypography:c,inputRef:u,label:d,labelPlacement:p="end",name:m,onChange:h,required:g,slots:v={},slotProps:y={},value:S,...w}=o,x=rn(),$=l??s.props.disabled??x?.disabled,I=g??s.props.required,E={disabled:$,required:I};["checked","name","onChange","value","inputRef"].forEach(T=>{typeof s.props[T]>"u"&&typeof o[T]<"u"&&(E[T]=o[T])});const k=Vn({props:o,muiFormControl:x,states:["error"]}),D={...o,disabled:$,labelPlacement:p,required:I,error:k.error},j=qI(D),C={slots:v,slotProps:{...a,...y}},[z,O]=xe("typography",{elementType:je,externalForwardedProps:C,ownerState:D});let A=d;return A!=null&&A.type!==je&&!c&&(A=f.jsx(z,{component:"span",...O,className:ee(j.label,O?.className),children:A})),f.jsxs(JI,{className:ee(j.root,i),ownerState:D,ref:r,...w,children:[b.cloneElement(s,E),I?f.jsxs("div",{children:[A,f.jsxs(XI,{ownerState:D,"aria-hidden":!0,className:j.asterisk,children:[" ","*"]})]}):A]})});function YI(e){return ge("MuiFormGroup",e)}fe("MuiFormGroup",["root","row","error"]);const QI=e=>{const{classes:t,row:r,error:o}=e;return ve({root:["root",r&&"row",o&&"error"]},YI,t)},ek=N("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.row&&t.row]}})({display:"flex",flexDirection:"column",flexWrap:"wrap",variants:[{props:{row:!0},style:{flexDirection:"row"}}]}),tk=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiFormGroup"}),{className:n,row:i=!1,...a}=o,s=rn(),l=Vn({props:o,muiFormControl:s,states:["error"]}),c={...o,row:i,error:l.error},u=QI(c);return f.jsx(ek,{className:ee(u.root,n),ownerState:c,ref:r,...a})});function nk(e){return ge("MuiFormHelperText",e)}const zd=fe("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var Ad;const rk=e=>{const{classes:t,contained:r,size:o,disabled:n,error:i,filled:a,focused:s,required:l}=e,c={root:["root",n&&"disabled",i&&"error",o&&`size${Z(o)}`,r&&"contained",s&&"focused",a&&"filled",l&&"required"]};return ve(c,nk,t)},ok=N("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.size&&t[`size${Z(r.size)}`],r.contained&&t.contained,r.filled&&t.filled]}})(_e(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${zd.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${zd.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:t})=>t.contained,style:{marginLeft:14,marginRight:14}}]}))),Lo=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiFormHelperText"}),{children:n,className:i,component:a="p",disabled:s,error:l,filled:c,focused:u,margin:d,required:p,variant:m,...h}=o,g=rn(),v=Vn({props:o,muiFormControl:g,states:["variant","size","disabled","error","filled","focused","required"]}),y={...o,component:a,contained:v.variant==="filled"||v.variant==="outlined",variant:v.variant,size:v.size,disabled:v.disabled,error:v.error,filled:v.filled,focused:v.focused,required:v.required};delete y.ownerState;const S=rk(y);return f.jsx(ok,{as:a,className:ee(S.root,i),ref:r,...h,ownerState:y,children:n===" "?Ad||(Ad=f.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):n})});function ik(e){return ge("MuiFormLabel",e)}const yo=fe("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),ak=e=>{const{classes:t,color:r,focused:o,disabled:n,error:i,filled:a,required:s}=e,l={root:["root",`color${Z(r)}`,n&&"disabled",i&&"error",a&&"filled",o&&"focused",s&&"required"],asterisk:["asterisk",i&&"error"]};return ve(l,ik,t)},sk=N("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color==="secondary"&&t.colorSecondary,r.filled&&t.filled]}})(_e(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(lt()).map(([t])=>({props:{color:t},style:{[`&.${yo.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${yo.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${yo.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),lk=N("span",{name:"MuiFormLabel",slot:"Asterisk"})(_e(({theme:e})=>({[`&.${yo.error}`]:{color:(e.vars||e).palette.error.main}}))),ck=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiFormLabel"}),{children:n,className:i,color:a,component:s="label",disabled:l,error:c,filled:u,focused:d,required:p,...m}=o,h=rn(),g=Vn({props:o,muiFormControl:h,states:["color","required","focused","disabled","error","filled"]}),v={...o,color:g.color||"primary",component:s,disabled:g.disabled,error:g.error,filled:g.filled,focused:g.focused,required:g.required},y=ak(v);return f.jsxs(sk,{as:s,ownerState:v,className:ee(y.root,i),ref:r,...m,children:[n,g.required&&f.jsxs(lk,{ownerState:v,"aria-hidden":!0,className:y.asterisk,children:[" ","*"]})]})});function Cs(e){return`scale(${e}, ${e**2})`}const uk={entering:{opacity:1,transform:Cs(1)},entered:{opacity:1,transform:"none"}},Ha=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),_o=b.forwardRef(function(t,r){const{addEndListener:o,appear:n=!0,children:i,easing:a,in:s,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:p,onExiting:m,style:h,timeout:g="auto",TransitionComponent:v=nn,...y}=t,S=An(),w=b.useRef(),x=hr(),$=b.useRef(null),I=at($,vr(i),r),E=T=>P=>{if(T){const M=$.current;P===void 0?T(M):T(M,P)}},k=E(u),D=E((T,P)=>{Rf(T);const{duration:M,delay:F,easing:L}=Pr({style:h,timeout:g,easing:a},{mode:"enter"});let X;g==="auto"?(X=x.transitions.getAutoHeightDuration(T.clientHeight),w.current=X):X=M,T.style.transition=[x.transitions.create("opacity",{duration:X,delay:F}),x.transitions.create("transform",{duration:Ha?X:X*.666,delay:F,easing:L})].join(","),l&&l(T,P)}),j=E(c),C=E(m),z=E(T=>{const{duration:P,delay:M,easing:F}=Pr({style:h,timeout:g,easing:a},{mode:"exit"});let L;g==="auto"?(L=x.transitions.getAutoHeightDuration(T.clientHeight),w.current=L):L=P,T.style.transition=[x.transitions.create("opacity",{duration:L,delay:M}),x.transitions.create("transform",{duration:Ha?L:L*.666,delay:Ha?M:M||L*.333,easing:F})].join(","),T.style.opacity=0,T.style.transform=Cs(.75),d&&d(T)}),O=E(p),A=T=>{g==="auto"&&S.start(w.current||0,T),o&&o($.current,T)};return f.jsx(v,{appear:n,in:s,nodeRef:$,onEnter:D,onEntered:j,onEntering:k,onExit:z,onExited:O,onExiting:C,addEndListener:A,timeout:g==="auto"?null:g,...y,children:(T,{ownerState:P,...M})=>b.cloneElement(i,{style:{opacity:0,transform:Cs(.75),visibility:T==="exited"&&!s?"hidden":void 0,...uk[T],...h,...i.props.style},ref:I,...M})})});_o&&(_o.muiSupportAuto=!0);const dk=e=>{const{classes:t,disableUnderline:r}=e,n=ve({root:["root",!r&&"underline"],input:["input"]},$0,t);return{...t,...n}},pk=N(fa,{shouldForwardProp:e=>yt(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[...da(e,t),!r.disableUnderline&&t.underline]}})(_e(({theme:e})=>{let r=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(r=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:o})=>o.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:o})=>!o.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Xr.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Xr.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Xr.disabled}, .${Xr.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${Xr.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(lt()).map(([o])=>({props:{color:o,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[o].main}`}}}))]}})),fk=N(ma,{name:"MuiInput",slot:"Input",overridesResolver:pa})({}),hl=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiInput"}),{disableUnderline:n=!1,components:i={},componentsProps:a,fullWidth:s=!1,inputComponent:l="input",multiline:c=!1,slotProps:u,slots:d={},type:p="text",...m}=o,h=dk(o),v={root:{ownerState:{disableUnderline:n}}},y=u??a?Qs(u??a,v):v,S=d.root??i.Root??pk,w=d.input??i.Input??fk;return f.jsx(ul,{slots:{root:S,input:w},slotProps:y,fullWidth:s,inputComponent:l,multiline:c,ref:r,type:p,...m,classes:h})});hl.muiName="Input";function mk(e){return ge("MuiInputAdornment",e)}const Md=fe("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var Nd;const hk=(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${Z(r.position)}`],r.disablePointerEvents===!0&&t.disablePointerEvents,t[r.variant]]},gk=e=>{const{classes:t,disablePointerEvents:r,hiddenLabel:o,position:n,size:i,variant:a}=e,s={root:["root",r&&"disablePointerEvents",n&&`position${Z(n)}`,a,o&&"hiddenLabel",i&&`size${Z(i)}`]};return ve(s,mk,t)},vk=N("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:hk})(_e(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${Md.positionStart}&:not(.${Md.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),bk=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiInputAdornment"}),{children:n,className:i,component:a="div",disablePointerEvents:s=!1,disableTypography:l=!1,position:c,variant:u,...d}=o,p=rn()||{};let m=u;u&&p.variant,p&&!m&&(m=p.variant);const h={...o,hiddenLabel:p.hiddenLabel,size:p.size,disablePointerEvents:s,position:c,variant:m},g=gk(h);return f.jsx(ua.Provider,{value:null,children:f.jsx(vk,{as:a,ownerState:h,className:ee(g.root,i),ref:r,...d,children:typeof n=="string"&&!l?f.jsx(je,{color:"textSecondary",children:n}):f.jsxs(b.Fragment,{children:[c==="start"?Nd||(Nd=f.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):null,n]})})})});function yk(e){return ge("MuiInputLabel",e)}fe("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const xk=e=>{const{classes:t,formControl:r,size:o,shrink:n,disableAnimation:i,variant:a,required:s}=e,l={root:["root",r&&"formControl",!i&&"animated",n&&"shrink",o&&o!=="medium"&&`size${Z(o)}`,a],asterisk:[s&&"asterisk"]},c=ve(l,yk,t);return{...t,...c}},Sk=N(ck,{shouldForwardProp:e=>yt(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${yo.asterisk}`]:t.asterisk},t.root,r.formControl&&t.formControl,r.size==="small"&&t.sizeSmall,r.shrink&&t.shrink,!r.disableAnimation&&t.animated,r.focused&&t.focused,t[r.variant]]}})(_e(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:r})=>t==="filled"&&r.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:r,size:o})=>t==="filled"&&r.shrink&&o==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:r})=>t==="outlined"&&r.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),Zr=b.forwardRef(function(t,r){const o=Ie({name:"MuiInputLabel",props:t}),{disableAnimation:n=!1,margin:i,shrink:a,variant:s,className:l,...c}=o,u=rn();let d=a;typeof d>"u"&&u&&(d=u.filled||u.focused||u.adornedStart);const p=Vn({props:o,muiFormControl:u,states:["size","variant","required","focused"]}),m={...o,disableAnimation:n,formControl:u,shrink:d,size:p.size,variant:p.variant,required:p.required,focused:p.focused},h=xk(m);return f.jsx(Sk,{"data-shrink":d,ref:r,className:ee(h.root,l),...c,ownerState:m,classes:h})}),kn=b.createContext({});function wk(e){return ge("MuiList",e)}fe("MuiList",["root","padding","dense","subheader"]);const $k=e=>{const{classes:t,disablePadding:r,dense:o,subheader:n}=e;return ve({root:["root",!r&&"padding",o&&"dense",n&&"subheader"]},wk,t)},Ik=N("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disablePadding&&t.padding,r.dense&&t.dense,r.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),gl=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiList"}),{children:n,className:i,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:c,...u}=o,d=b.useMemo(()=>({dense:s}),[s]),p={...o,component:a,dense:s,disablePadding:l},m=$k(p);return f.jsx(kn.Provider,{value:d,children:f.jsxs(Ik,{as:a,className:ee(m.root,i),ref:r,ownerState:p,...u,children:[c,n]})})});function kk(e){return ge("MuiListItem",e)}fe("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);const _k=fe("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function Ck(e){return ge("MuiListItemSecondaryAction",e)}fe("MuiListItemSecondaryAction",["root","disableGutters"]);const Ek=e=>{const{disableGutters:t,classes:r}=e;return ve({root:["root",t&&"disableGutters"]},Ck,r)},Pk=N("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.disableGutters&&t.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),nm=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiListItemSecondaryAction"}),{className:n,...i}=o,a=b.useContext(kn),s={...o,disableGutters:a.disableGutters},l=Ek(s);return f.jsx(Pk,{className:ee(l.root,n),ownerState:s,ref:r,...i})});nm.muiName="ListItemSecondaryAction";const jk=(e,t)=>{const{ownerState:r}=e;return[t.root,r.dense&&t.dense,r.alignItems==="flex-start"&&t.alignItemsFlexStart,r.divider&&t.divider,!r.disableGutters&&t.gutters,!r.disablePadding&&t.padding,r.hasSecondaryAction&&t.secondaryAction]},Ok=e=>{const{alignItems:t,classes:r,dense:o,disableGutters:n,disablePadding:i,divider:a,hasSecondaryAction:s}=e;return ve({root:["root",o&&"dense",!n&&"gutters",!i&&"padding",a&&"divider",t==="flex-start"&&"alignItemsFlexStart",s&&"secondaryAction"],container:["container"],secondaryAction:["secondaryAction"]},kk,r)},Rk=N("div",{name:"MuiListItem",slot:"Root",overridesResolver:jk})(_e(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:t})=>!t.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:t})=>!t.disablePadding&&t.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:t})=>!t.disablePadding&&!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>!t.disablePadding&&!!t.secondaryAction,style:{paddingRight:48}},{props:({ownerState:t})=>!!t.secondaryAction,style:{[`& > .${_k.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>t.button,style:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:t})=>t.hasSecondaryAction,style:{paddingRight:48}}]}))),Dk=N("li",{name:"MuiListItem",slot:"Container"})({position:"relative"}),Ka=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiListItem"}),{alignItems:n="center",children:i,className:a,component:s,components:l={},componentsProps:c={},ContainerComponent:u="li",ContainerProps:{className:d,...p}={},dense:m=!1,disableGutters:h=!1,disablePadding:g=!1,divider:v=!1,secondaryAction:y,slotProps:S={},slots:w={},...x}=o,$=b.useContext(kn),I=b.useMemo(()=>({dense:m||$.dense||!1,alignItems:n,disableGutters:h}),[n,$.dense,m,h]),E=b.useRef(null),k=b.Children.toArray(i),D=k.length&&ki(k[k.length-1],["ListItemSecondaryAction"]),j={...o,alignItems:n,dense:I.dense,disableGutters:h,disablePadding:g,divider:v,hasSecondaryAction:D},C=Ok(j),z=at(E,r),O={slots:w,slotProps:S},[A,T]=xe("secondaryAction",{elementType:nm,externalForwardedProps:O,ownerState:j,className:C.secondaryAction}),P=w.root||l.Root||Rk,M=S.root||c.root||{},F={className:ee(C.root,M.className,a),...x};let L=s||"li";return D?(L=!F.component&&!s?"div":L,u==="li"&&(L==="li"?L="div":F.component==="li"&&(F.component="div")),f.jsx(kn.Provider,{value:I,children:f.jsxs(Dk,{as:u,className:ee(C.container,d),ref:z,ownerState:j,...p,children:[f.jsx(P,{...M,...!jr(P)&&{as:L,ownerState:{...j,...M.ownerState}},...F,children:k}),k.pop()]})})):f.jsx(kn.Provider,{value:I,children:f.jsxs(P,{...M,as:L,ref:z,...!jr(P)&&{ownerState:{...j,...M.ownerState}},...F,children:[k,y&&f.jsx(A,{...T,children:y})]})})});function Tk(e){return ge("MuiListItemIcon",e)}const Fd=fe("MuiListItemIcon",["root","alignItemsFlexStart"]),zk=e=>{const{alignItems:t,classes:r}=e;return ve({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},Tk,r)},Ak=N("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(_e(({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),Ld=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiListItemIcon"}),{className:n,...i}=o,a=b.useContext(kn),s={...o,alignItems:a.alignItems},l=zk(s);return f.jsx(Ak,{className:ee(l.root,n),ownerState:s,ref:r,...i})});function Mk(e){return ge("MuiListItemText",e)}const kr=fe("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),Nk=e=>{const{classes:t,inset:r,primary:o,secondary:n,dense:i}=e;return ve({root:["root",r&&"inset",i&&"dense",o&&n&&"multiline"],primary:["primary"],secondary:["secondary"]},Mk,t)},Fk=N("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${kr.primary}`]:t.primary},{[`& .${kr.secondary}`]:t.secondary},t.root,r.inset&&t.inset,r.primary&&r.secondary&&t.multiline,r.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${fd.root}:where(& .${kr.primary})`]:{display:"block"},[`.${fd.root}:where(& .${kr.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),Ud=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiListItemText"}),{children:n,className:i,disableTypography:a=!1,inset:s=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:d,slots:p={},slotProps:m={},...h}=o,{dense:g}=b.useContext(kn);let v=l??n,y=u;const S={...o,disableTypography:a,inset:s,primary:!!v,secondary:!!y,dense:g},w=Nk(S),x={slots:p,slotProps:{primary:c,secondary:d,...m}},[$,I]=xe("root",{className:ee(w.root,i),elementType:Fk,externalForwardedProps:{...x,...h},ownerState:S,ref:r}),[E,k]=xe("primary",{className:w.primary,elementType:je,externalForwardedProps:x,ownerState:S}),[D,j]=xe("secondary",{className:w.secondary,elementType:je,externalForwardedProps:x,ownerState:S});return v!=null&&v.type!==je&&!a&&(v=f.jsx(E,{variant:g?"body2":"body1",component:k?.variant?void 0:"span",...k,children:v})),y!=null&&y.type!==je&&!a&&(y=f.jsx(D,{variant:"body2",color:"textSecondary",...j,children:y})),f.jsxs($,{...I,children:[v,y]})});function qa(e,t,r){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:r?null:e.firstChild}function Bd(e,t,r){return e===t?r?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:r?null:e.lastChild}function rm(e,t){if(t===void 0)return!0;let r=e.innerText;return r===void 0&&(r=e.textContent),r=r.trim().toLowerCase(),r.length===0?!1:t.repeating?r[0]===t.keys[0]:r.startsWith(t.keys.join(""))}function Yr(e,t,r,o,n,i){let a=!1,s=n(e,t,t?r:!1);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const l=o?!1:s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||!rm(s,i)||l)s=n(e,s,r);else return s.focus(),!0}return!1}const Lk=b.forwardRef(function(t,r){const{actions:o,autoFocus:n=!1,autoFocusItem:i=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu",...p}=t,m=b.useRef(null),h=b.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});fn(()=>{n&&m.current.focus()},[n]),b.useImperativeHandle(o,()=>({adjustStyleForScrollbar:(w,{direction:x})=>{const $=!m.current.style.width;if(w.clientHeight<m.current.clientHeight&&$){const I=`${Xf(Cn(w))}px`;m.current.style[x==="rtl"?"paddingLeft":"paddingRight"]=I,m.current.style.width=`calc(100% + ${I})`}return m.current}}),[]);const g=w=>{const x=m.current,$=w.key;if(w.ctrlKey||w.metaKey||w.altKey){u&&u(w);return}const E=co(bt(x));if($==="ArrowDown")w.preventDefault(),Yr(x,E,c,l,qa);else if($==="ArrowUp")w.preventDefault(),Yr(x,E,c,l,Bd);else if($==="Home")w.preventDefault(),Yr(x,null,c,l,qa);else if($==="End")w.preventDefault(),Yr(x,null,c,l,Bd);else if($.length===1){const k=h.current,D=$.toLowerCase(),j=performance.now();k.keys.length>0&&(j-k.lastTime>500?(k.keys=[],k.repeating=!0,k.previousKeyMatched=!0):k.repeating&&D!==k.keys[0]&&(k.repeating=!1)),k.lastTime=j,k.keys.push(D);const C=E&&!k.repeating&&rm(E,k);k.previousKeyMatched&&(C||Yr(x,E,!1,l,qa,k))?w.preventDefault():k.previousKeyMatched=!1}u&&u(w)},v=at(m,r);let y=-1;b.Children.forEach(a,(w,x)=>{if(!b.isValidElement(w)){y===x&&(y+=1,y>=a.length&&(y=-1));return}w.props.disabled||(d==="selectedMenu"&&w.props.selected||y===-1)&&(y=x),y===x&&(w.props.disabled||w.props.muiSkipListHighlight||w.type.muiSkipListHighlight)&&(y+=1,y>=a.length&&(y=-1))});const S=b.Children.map(a,(w,x)=>{if(x===y){const $={};return i&&($.autoFocus=!0),w.props.tabIndex===void 0&&d==="selectedMenu"&&($.tabIndex=0),b.cloneElement(w,$)}return w});return f.jsx(gl,{role:"menu",ref:v,className:s,onKeyDown:g,tabIndex:n?0:-1,...p,children:S})});function Uk(e){return ge("MuiPopover",e)}fe("MuiPopover",["root","paper"]);function Vd(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.height/2:t==="bottom"&&(r=e.height),r}function Wd(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.width/2:t==="right"&&(r=e.width),r}function Zd(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function si(e){return typeof e=="function"?e():e}const Bk=e=>{const{classes:t}=e;return ve({root:["root"],paper:["paper"]},Uk,t)},Vk=N(Yf,{name:"MuiPopover",slot:"Root"})({}),om=N(gr,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Wk=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiPopover"}),{action:n,anchorEl:i,anchorOrigin:a={vertical:"top",horizontal:"left"},anchorPosition:s,anchorReference:l="anchorEl",children:c,className:u,container:d,elevation:p=8,marginThreshold:m=16,open:h,PaperProps:g={},slots:v={},slotProps:y={},transformOrigin:S={vertical:"top",horizontal:"left"},TransitionComponent:w,transitionDuration:x="auto",TransitionProps:$={},disableScrollLock:I=!1,...E}=o,k=b.useRef(),D={...o,anchorOrigin:a,anchorReference:l,elevation:p,marginThreshold:m,transformOrigin:S,TransitionComponent:w,transitionDuration:x,TransitionProps:$},j=Bk(D),C=b.useCallback(()=>{if(l==="anchorPosition")return s;const ie=si(i),_=(ie&&ie.nodeType===1?ie:bt(k.current).body).getBoundingClientRect();return{top:_.top+Vd(_,a.vertical),left:_.left+Wd(_,a.horizontal)}},[i,a.horizontal,a.vertical,s,l]),z=b.useCallback(ie=>({vertical:Vd(ie,S.vertical),horizontal:Wd(ie,S.horizontal)}),[S.horizontal,S.vertical]),O=b.useCallback(ie=>{const de={width:ie.offsetWidth,height:ie.offsetHeight},_=z(de);if(l==="none")return{top:null,left:null,transformOrigin:Zd(_)};const W=C();let V=W.top-_.vertical,B=W.left-_.horizontal;const ne=V+de.height,ce=B+de.width,oe=Cn(si(i)),ke=oe.innerHeight-m,ye=oe.innerWidth-m;if(m!==null&&V<m){const we=V-m;V-=we,_.vertical+=we}else if(m!==null&&ne>ke){const we=ne-ke;V-=we,_.vertical+=we}if(m!==null&&B<m){const we=B-m;B-=we,_.horizontal+=we}else if(ce>ye){const we=ce-ye;B-=we,_.horizontal+=we}return{top:`${Math.round(V)}px`,left:`${Math.round(B)}px`,transformOrigin:Zd(_)}},[i,l,C,z,m]),[A,T]=b.useState(h),P=b.useCallback(()=>{const ie=k.current;if(!ie)return;const de=O(ie);de.top!==null&&ie.style.setProperty("top",de.top),de.left!==null&&(ie.style.left=de.left),ie.style.transformOrigin=de.transformOrigin,T(!0)},[O]);b.useEffect(()=>(I&&window.addEventListener("scroll",P),()=>window.removeEventListener("scroll",P)),[i,I,P]);const M=()=>{P()},F=()=>{T(!1)};b.useEffect(()=>{h&&P()}),b.useImperativeHandle(n,()=>h?{updatePosition:()=>{P()}}:null,[h,P]),b.useEffect(()=>{if(!h)return;const ie=Cf(()=>{P()}),de=Cn(si(i));return de.addEventListener("resize",ie),()=>{ie.clear(),de.removeEventListener("resize",ie)}},[i,h,P]);let L=x;const X={slots:{transition:w,...v},slotProps:{transition:$,paper:g,...y}},[Q,pe]=xe("transition",{elementType:_o,externalForwardedProps:X,ownerState:D,getSlotProps:ie=>({...ie,onEntering:(de,_)=>{ie.onEntering?.(de,_),M()},onExited:de=>{ie.onExited?.(de),F()}}),additionalProps:{appear:!0,in:h}});x==="auto"&&!Q.muiSupportAuto&&(L=void 0);const le=d||(i?bt(si(i)).body:void 0),[be,{slots:te,slotProps:q,...se}]=xe("root",{ref:r,elementType:Vk,externalForwardedProps:{...X,...E},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:v.backdrop},slotProps:{backdrop:Ef(typeof y.backdrop=="function"?y.backdrop(D):y.backdrop,{invisible:!0})},container:le,open:h},ownerState:D,className:ee(j.root,u)}),[Oe,Se]=xe("paper",{ref:k,className:j.paper,elementType:om,externalForwardedProps:X,shouldForwardComponentProp:!0,additionalProps:{elevation:p,style:A?void 0:{opacity:0}},ownerState:D});return f.jsx(be,{...se,...!jr(be)&&{slots:te,slotProps:q,disableScrollLock:I},children:f.jsx(Q,{...pe,timeout:L,children:f.jsx(Oe,{...Se,children:c})})})});function Zk(e){return ge("MuiMenu",e)}fe("MuiMenu",["root","paper","list"]);const Gk={vertical:"top",horizontal:"right"},Hk={vertical:"top",horizontal:"left"},Kk=e=>{const{classes:t}=e;return ve({root:["root"],paper:["paper"],list:["list"]},Zk,t)},qk=N(Wk,{shouldForwardProp:e=>yt(e)||e==="classes",name:"MuiMenu",slot:"Root"})({}),Jk=N(om,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Xk=N(Lk,{name:"MuiMenu",slot:"List"})({outline:0}),Yk=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiMenu"}),{autoFocus:n=!0,children:i,className:a,disableAutoFocusItem:s=!1,MenuListProps:l={},onClose:c,open:u,PaperProps:d={},PopoverClasses:p,transitionDuration:m="auto",TransitionProps:{onEntering:h,...g}={},variant:v="selectedMenu",slots:y={},slotProps:S={},...w}=o,x=Ys(),$={...o,autoFocus:n,disableAutoFocusItem:s,MenuListProps:l,onEntering:h,PaperProps:d,transitionDuration:m,TransitionProps:g,variant:v},I=Kk($),E=n&&!s&&u,k=b.useRef(null),D=(L,X)=>{k.current&&k.current.adjustStyleForScrollbar(L,{direction:x?"rtl":"ltr"}),h&&h(L,X)},j=L=>{L.key==="Tab"&&(L.preventDefault(),c&&c(L,"tabKeyDown"))};let C=-1;b.Children.map(i,(L,X)=>{b.isValidElement(L)&&(L.props.disabled||(v==="selectedMenu"&&L.props.selected||C===-1)&&(C=X))});const z={slots:y,slotProps:{list:l,transition:g,paper:d,...S}},O=Zf({elementType:y.root,externalSlotProps:S.root,ownerState:$,className:[I.root,a]}),[A,T]=xe("paper",{className:I.paper,elementType:Jk,externalForwardedProps:z,shouldForwardComponentProp:!0,ownerState:$}),[P,M]=xe("list",{className:ee(I.list,l.className),elementType:Xk,shouldForwardComponentProp:!0,externalForwardedProps:z,getSlotProps:L=>({...L,onKeyDown:X=>{j(X),L.onKeyDown?.(X)}}),ownerState:$}),F=typeof z.slotProps.transition=="function"?z.slotProps.transition($):z.slotProps.transition;return f.jsx(qk,{onClose:c,anchorOrigin:{vertical:"bottom",horizontal:x?"right":"left"},transformOrigin:x?Gk:Hk,slots:{root:y.root,paper:A,backdrop:y.backdrop,...y.transition&&{transition:y.transition}},slotProps:{root:O,paper:T,backdrop:typeof S.backdrop=="function"?S.backdrop($):S.backdrop,transition:{...F,onEntering:(...L)=>{D(...L),F?.onEntering?.(...L)}}},open:u,ref:r,transitionDuration:m,ownerState:$,...w,classes:p,children:f.jsx(P,{actions:k,autoFocus:n&&(C===-1||s),autoFocusItem:E,variant:v,...M,children:i})})});function Qk(e){return ge("MuiMenuItem",e)}const Qr=fe("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),e1=(e,t)=>{const{ownerState:r}=e;return[t.root,r.dense&&t.dense,r.divider&&t.divider,!r.disableGutters&&t.gutters]},t1=e=>{const{disabled:t,dense:r,divider:o,disableGutters:n,selected:i,classes:a}=e,l=ve({root:["root",r&&"dense",t&&"disabled",!n&&"gutters",o&&"divider",i&&"selected"]},Qk,a);return{...a,...l}},n1=N(ar,{shouldForwardProp:e=>yt(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:e1})(_e(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Qr.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${Qr.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${Qr.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${Qr.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Qr.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${Td.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${Td.inset}`]:{marginLeft:52},[`& .${kr.root}`]:{marginTop:0,marginBottom:0},[`& .${kr.inset}`]:{paddingLeft:36},[`& .${Fd.root}`]:{minWidth:36},variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>!t.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:t})=>t.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${Fd.root} svg`]:{fontSize:"1.25rem"}}}]}))),Ln=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiMenuItem"}),{autoFocus:n=!1,component:i="li",dense:a=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:p,...m}=o,h=b.useContext(kn),g=b.useMemo(()=>({dense:a||h.dense||!1,disableGutters:l}),[h.dense,a,l]),v=b.useRef(null);fn(()=>{n&&v.current&&v.current.focus()},[n]);const y={...o,dense:g.dense,divider:s,disableGutters:l},S=t1(o),w=at(v,r);let x;return o.disabled||(x=d!==void 0?d:-1),f.jsx(kn.Provider,{value:g,children:f.jsx(n1,{ref:w,role:u,tabIndex:x,component:i,focusVisibleClassName:ee(S.focusVisible,c),className:ee(S.root,p),...m,ownerState:y,classes:S})})});function r1(e){return ge("MuiNativeSelect",e)}const vl=fe("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),o1=e=>{const{classes:t,variant:r,disabled:o,multiple:n,open:i,error:a}=e,s={select:["select",r,o&&"disabled",n&&"multiple",a&&"error"],icon:["icon",`icon${Z(r)}`,i&&"iconOpen",o&&"disabled"]};return ve(s,r1,t)},im=N("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${vl.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),i1=N(im,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:yt,overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.select,t[r.variant],r.error&&t.error,{[`&.${vl.multiple}`]:t.multiple}]}})({}),am=N("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${vl.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),a1=N(am,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.icon,r.variant&&t[`icon${Z(r.variant)}`],r.open&&t.iconOpen]}})({}),s1=b.forwardRef(function(t,r){const{className:o,disabled:n,error:i,IconComponent:a,inputRef:s,variant:l="standard",...c}=t,u={...t,disabled:n,variant:l,error:i},d=o1(u);return f.jsxs(b.Fragment,{children:[f.jsx(i1,{ownerState:u,className:ee(d.select,o),disabled:n,ref:s||r,...c}),t.multiple?null:f.jsx(a1,{as:a,ownerState:u,className:d.icon})]})});var Gd;const l1=N("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:yt})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),c1=N("legend",{name:"MuiNotchedOutlined",shouldForwardProp:yt})(_e(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function u1(e){const{children:t,classes:r,className:o,label:n,notched:i,...a}=e,s=n!=null&&n!=="",l={...e,notched:i,withLabel:s};return f.jsx(l1,{"aria-hidden":!0,className:o,ownerState:l,...a,children:f.jsx(c1,{ownerState:l,children:s?f.jsx("span",{children:n}):Gd||(Gd=f.jsx("span",{className:"notranslate","aria-hidden":!0,children:""}))})})}const d1=e=>{const{classes:t}=e,o=ve({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},I0,t);return{...t,...o}},p1=N(fa,{shouldForwardProp:e=>yt(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:da})(_e(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${ln.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${ln.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${ln.focused} .${ln.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(lt()).map(([r])=>({props:{color:r},style:{[`&.${ln.focused} .${ln.notchedOutline}`]:{borderColor:(e.vars||e).palette[r].main}}})),{props:{},style:{[`&.${ln.error} .${ln.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${ln.disabled} .${ln.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:r})=>r.startAdornment,style:{paddingLeft:14}},{props:({ownerState:r})=>r.endAdornment,style:{paddingRight:14}},{props:({ownerState:r})=>r.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:r,size:o})=>r.multiline&&o==="small",style:{padding:"8.5px 14px"}}]}})),f1=N(u1,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(_e(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),m1=N(ma,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:pa})(_e(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),bl=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiOutlinedInput"}),{components:n={},fullWidth:i=!1,inputComponent:a="input",label:s,multiline:l=!1,notched:c,slots:u={},slotProps:d={},type:p="text",...m}=o,h=d1(o),g=rn(),v=Vn({props:o,muiFormControl:g,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),y={...o,color:v.color||"primary",disabled:v.disabled,error:v.error,focused:v.focused,formControl:g,fullWidth:i,hiddenLabel:v.hiddenLabel,multiline:l,size:v.size,type:p},S=u.root??n.Root??p1,w=u.input??n.Input??m1,[x,$]=xe("notchedOutline",{elementType:f1,className:h.notchedOutline,shouldForwardComponentProp:!0,ownerState:y,externalForwardedProps:{slots:u,slotProps:d},additionalProps:{label:s!=null&&s!==""&&v.required?f.jsxs(b.Fragment,{children:[s," ","*"]}):s}});return f.jsx(ul,{slots:{root:S,input:w},slotProps:d,renderSuffix:I=>f.jsx(x,{...$,notched:typeof c<"u"?c:!!(I.startAdornment||I.filled||I.focused)}),fullWidth:i,inputComponent:a,multiline:l,ref:r,type:p,...m,classes:{...h,notchedOutline:null}})});bl.muiName="Input";const h1=De(f.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),g1=De(f.jsx("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"})),v1=N("span",{name:"MuiRadioButtonIcon",shouldForwardProp:yt})({position:"relative",display:"flex"}),b1=N(h1,{name:"MuiRadioButtonIcon"})({transform:"scale(1)"}),y1=N(g1,{name:"MuiRadioButtonIcon"})(_e(({theme:e})=>({left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest}),variants:[{props:{checked:!0},style:{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}}]})));function sm(e){const{checked:t=!1,classes:r={},fontSize:o}=e,n={...e,checked:t};return f.jsxs(v1,{className:r.root,ownerState:n,children:[f.jsx(b1,{fontSize:o,className:r.background,ownerState:n}),f.jsx(y1,{fontSize:o,className:r.dot,ownerState:n})]})}const lm=b.createContext(void 0);function x1(){return b.useContext(lm)}function S1(e){return ge("MuiRadio",e)}const Hd=fe("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"]),w1=e=>{const{classes:t,color:r,size:o}=e,n={root:["root",`color${Z(r)}`,o!=="medium"&&`size${Z(o)}`]};return{...t,...ve(n,S1,t)}},$1=N(Jf,{shouldForwardProp:e=>yt(e)||e==="classes",name:"MuiRadio",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.size!=="medium"&&t[`size${Z(r.size)}`],t[`color${Z(r.color)}`]]}})(_e(({theme:e})=>({color:(e.vars||e).palette.text.secondary,[`&.${Hd.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{color:"default",disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(lt()).map(([t])=>({props:{color:t,disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(lt()).map(([t])=>({props:{color:t,disabled:!1},style:{[`&.${Hd.checked}`]:{color:(e.vars||e).palette[t].main}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]})));function I1(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}const k1=f.jsx(sm,{checked:!0}),_1=f.jsx(sm,{}),C1=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiRadio"}),{checked:n,checkedIcon:i=k1,color:a="primary",icon:s=_1,name:l,onChange:c,size:u="medium",className:d,disabled:p,disableRipple:m=!1,slots:h={},slotProps:g={},inputProps:v,...y}=o,S=rn();let w=p;S&&typeof w>"u"&&(w=S.disabled),w??=!1;const x={...o,disabled:w,disableRipple:m,color:a,size:u},$=w1(x),I=x1();let E=n;const k=hs(c,I&&I.onChange);let D=l;I&&(typeof E>"u"&&(E=I1(I.value,o.value)),typeof D>"u"&&(D=I.name));const j=g.input??v,[C,z]=xe("root",{ref:r,elementType:$1,className:ee($.root,d),shouldForwardComponentProp:!0,externalForwardedProps:{slots:h,slotProps:g,...y},getSlotProps:O=>({...O,onChange:(A,...T)=>{O.onChange?.(A,...T),k(A,...T)}}),ownerState:x,additionalProps:{type:"radio",icon:b.cloneElement(s,{fontSize:s.props.fontSize??u}),checkedIcon:b.cloneElement(i,{fontSize:i.props.fontSize??u}),disabled:w,name:D,checked:E,slots:h,slotProps:{input:typeof j=="function"?j(x):j}}});return f.jsx(C,{...z,classes:$})});function E1(e){return ge("MuiRadioGroup",e)}fe("MuiRadioGroup",["root","row","error"]);const P1=e=>{const{classes:t,row:r,error:o}=e;return ve({root:["root",r&&"row",o&&"error"]},E1,t)},j1=b.forwardRef(function(t,r){const{actions:o,children:n,className:i,defaultValue:a,name:s,onChange:l,value:c,...u}=t,d=b.useRef(null),p=P1(t),[m,h]=$o({controlled:c,default:a,name:"RadioGroup"});b.useImperativeHandle(o,()=>({focus:()=>{let S=d.current.querySelector("input:not(:disabled):checked");S||(S=d.current.querySelector("input:not(:disabled)")),S&&S.focus()}}),[]);const g=at(r,d),v=mr(s),y=b.useMemo(()=>({name:v,onChange(S){h(S.target.value),l&&l(S,S.target.value)},value:m}),[v,l,h,m]);return f.jsx(lm.Provider,{value:y,children:f.jsx(tk,{role:"radiogroup",ref:g,className:ee(p.root,i),...u,children:n})})});function cm(e){return ge("MuiSelect",e)}const eo=fe("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var Kd;const O1=N(im,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`&.${eo.select}`]:t.select},{[`&.${eo.select}`]:t[r.variant]},{[`&.${eo.error}`]:t.error},{[`&.${eo.multiple}`]:t.multiple}]}})({[`&.${eo.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),R1=N(am,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.icon,r.variant&&t[`icon${Z(r.variant)}`],r.open&&t.iconOpen]}})({}),D1=N("input",{shouldForwardProp:e=>_f(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function qd(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function T1(e){return e==null||typeof e=="string"&&!e.trim()}const z1=e=>{const{classes:t,variant:r,disabled:o,multiple:n,open:i,error:a}=e,s={select:["select",r,o&&"disabled",n&&"multiple",a&&"error"],icon:["icon",`icon${Z(r)}`,i&&"iconOpen",o&&"disabled"],nativeInput:["nativeInput"]};return ve(s,cm,t)},A1=b.forwardRef(function(t,r){const{"aria-describedby":o,"aria-label":n,autoFocus:i,autoWidth:a,children:s,className:l,defaultOpen:c,defaultValue:u,disabled:d,displayEmpty:p,error:m=!1,IconComponent:h,inputRef:g,labelId:v,MenuProps:y={},multiple:S,name:w,onBlur:x,onChange:$,onClose:I,onFocus:E,onKeyDown:k,onMouseDown:D,onOpen:j,open:C,readOnly:z,renderValue:O,required:A,SelectDisplayProps:T={},tabIndex:P,type:M,value:F,variant:L="standard",...X}=t,[Q,pe]=$o({controlled:F,default:u,name:"Select"}),[le,be]=$o({controlled:C,default:c,name:"Select"}),te=b.useRef(null),q=b.useRef(null),[se,Oe]=b.useState(null),{current:Se}=b.useRef(C!=null),[ie,de]=b.useState(),_=at(r,g),W=b.useCallback(J=>{q.current=J,J&&Oe(J)},[]),V=se?.parentNode;b.useImperativeHandle(_,()=>({focus:()=>{q.current.focus()},node:te.current,value:Q}),[Q]),b.useEffect(()=>{c&&le&&se&&!Se&&(de(a?null:V.clientWidth),q.current.focus())},[se,a]),b.useEffect(()=>{i&&q.current.focus()},[i]),b.useEffect(()=>{if(!v)return;const J=bt(q.current).getElementById(v);if(J){const Le=()=>{getSelection().isCollapsed&&q.current.focus()};return J.addEventListener("click",Le),()=>{J.removeEventListener("click",Le)}}},[v]);const B=(J,Le)=>{J?j&&j(Le):I&&I(Le),Se||(de(a?null:V.clientWidth),be(J))},ne=J=>{D?.(J),J.button===0&&(J.preventDefault(),q.current.focus(),B(!0,J))},ce=J=>{B(!1,J)},oe=b.Children.toArray(s),ke=J=>{const Le=oe.find(We=>We.props.value===J.target.value);Le!==void 0&&(pe(Le.props.value),$&&$(J,Le))},ye=J=>Le=>{let We;if(Le.currentTarget.hasAttribute("tabindex")){if(S){We=Array.isArray(Q)?Q.slice():[];const It=Q.indexOf(J.props.value);It===-1?We.push(J.props.value):We.splice(It,1)}else We=J.props.value;if(J.props.onClick&&J.props.onClick(Le),Q!==We&&(pe(We),$)){const It=Le.nativeEvent||Le,ni=new It.constructor(It.type,It);Object.defineProperty(ni,"target",{writable:!0,value:{value:We,name:w}}),$(ni,J)}S||B(!1,Le)}},we=J=>{z||([" ","ArrowUp","ArrowDown","Enter"].includes(J.key)&&(J.preventDefault(),B(!0,J)),k?.(J))},G=se!==null&&le,Pe=J=>{!G&&x&&(Object.defineProperty(J,"target",{writable:!0,value:{value:Q,name:w}}),x(J))};delete X["aria-invalid"];let ae,Fe;const ze=[];let Ke=!1;(Ni({value:Q})||p)&&(O?ae=O(Q):Ke=!0);const dt=oe.map(J=>{if(!b.isValidElement(J))return null;let Le;if(S){if(!Array.isArray(Q))throw new Error(bf(2));Le=Q.some(We=>qd(We,J.props.value)),Le&&Ke&&ze.push(J.props.children)}else Le=qd(Q,J.props.value),Le&&Ke&&(Fe=J.props.children);return b.cloneElement(J,{"aria-selected":Le?"true":"false",onClick:ye(J),onKeyUp:We=>{We.key===" "&&We.preventDefault(),J.props.onKeyUp&&J.props.onKeyUp(We)},role:"option",selected:Le,value:void 0,"data-value":J.props.value})});Ke&&(S?ze.length===0?ae=null:ae=ze.reduce((J,Le,We)=>(J.push(Le),We<ze.length-1&&J.push(", "),J),[]):ae=Fe);let it=ie;!a&&Se&&se&&(it=V.clientWidth);let ut;typeof P<"u"?ut=P:ut=d?null:0;const me=T.id||(w?`mui-component-select-${w}`:void 0),Be={...t,variant:L,value:Q,open:G,error:m},nt=z1(Be),Ee={...y.PaperProps,...typeof y.slotProps?.paper=="function"?y.slotProps.paper(Be):y.slotProps?.paper},pt={...y.MenuListProps,...typeof y.slotProps?.list=="function"?y.slotProps.list(Be):y.slotProps?.list},Ve=mr();return f.jsxs(b.Fragment,{children:[f.jsx(O1,{as:"div",ref:W,tabIndex:ut,role:"combobox","aria-controls":G?Ve:void 0,"aria-disabled":d?"true":void 0,"aria-expanded":G?"true":"false","aria-haspopup":"listbox","aria-label":n,"aria-labelledby":[v,me].filter(Boolean).join(" ")||void 0,"aria-describedby":o,"aria-required":A?"true":void 0,"aria-invalid":m?"true":void 0,onKeyDown:we,onMouseDown:d||z?null:ne,onBlur:Pe,onFocus:E,...T,ownerState:Be,className:ee(T.className,nt.select,l),id:me,children:T1(ae)?Kd||(Kd=f.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):ae}),f.jsx(D1,{"aria-invalid":m,value:Array.isArray(Q)?Q.join(","):Q,name:w,ref:te,"aria-hidden":!0,onChange:ke,tabIndex:-1,disabled:d,className:nt.nativeInput,autoFocus:i,required:A,...X,ownerState:Be}),f.jsx(R1,{as:h,className:nt.icon,ownerState:Be}),f.jsx(Yk,{id:`menu-${w||""}`,anchorEl:V,open:G,onClose:ce,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...y,slotProps:{...y.slotProps,list:{"aria-labelledby":v,role:"listbox","aria-multiselectable":S?"true":void 0,disableListWrap:!0,id:Ve,...pt},paper:{...Ee,style:{minWidth:it,...Ee!=null?Ee.style:null}}},children:dt})]})}),M1=e=>{const{classes:t}=e,o=ve({root:["root"]},cm,t);return{...t,...o}},yl={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>yt(e)&&e!=="variant"},N1=N(hl,yl)(""),F1=N(bl,yl)(""),L1=N(ml,yl)(""),yr=b.forwardRef(function(t,r){const o=Ie({name:"MuiSelect",props:t}),{autoWidth:n=!1,children:i,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=_0,id:d,input:p,inputProps:m,label:h,labelId:g,MenuProps:v,multiple:y=!1,native:S=!1,onClose:w,onOpen:x,open:$,renderValue:I,SelectDisplayProps:E,variant:k="outlined",...D}=o,j=S?s1:A1,C=rn(),z=Vn({props:o,muiFormControl:C,states:["variant","error"]}),O=z.variant||k,A={...o,variant:O,classes:a},T=M1(A),{root:P,...M}=T,F=p||{standard:f.jsx(N1,{ownerState:A}),outlined:f.jsx(F1,{label:h,ownerState:A}),filled:f.jsx(L1,{ownerState:A})}[O],L=at(r,vr(F));return f.jsx(b.Fragment,{children:b.cloneElement(F,{inputComponent:j,inputProps:{children:i,error:z.error,IconComponent:u,variant:O,type:void 0,multiple:y,...S?{id:d}:{autoWidth:n,defaultOpen:l,displayEmpty:c,labelId:g,MenuProps:v,onClose:w,onOpen:x,open:$,renderValue:I,SelectDisplayProps:{id:d,...E}},...m,classes:m?Qs(M,m.classes):M,...p?p.props.inputProps:{}},...(y&&S||c)&&O==="outlined"?{notched:!0}:{},ref:L,className:ee(F.props.className,s,T.root),...!p&&{variant:O},...D})})});yr.muiName="Select";function U1(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:r=!1,onClose:o,open:n,resumeHideDuration:i}=e,a=An();b.useEffect(()=>{if(!n)return;function y(S){S.defaultPrevented||S.key==="Escape"&&o?.(S,"escapeKeyDown")}return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y)}},[n,o]);const s=Lt((y,S)=>{o?.(y,S)}),l=Lt(y=>{!o||y==null||a.start(y,()=>{s(null,"timeout")})});b.useEffect(()=>(n&&l(t),a.clear),[n,t,l,a]);const c=y=>{o?.(y,"clickaway")},u=a.clear,d=b.useCallback(()=>{t!=null&&l(i??t*.5)},[t,i,l]),p=y=>S=>{const w=y.onBlur;w?.(S),d()},m=y=>S=>{const w=y.onFocus;w?.(S),u()},h=y=>S=>{const w=y.onMouseEnter;w?.(S),u()},g=y=>S=>{const w=y.onMouseLeave;w?.(S),d()};return b.useEffect(()=>{if(!r&&n)return window.addEventListener("focus",d),window.addEventListener("blur",u),()=>{window.removeEventListener("focus",d),window.removeEventListener("blur",u)}},[r,n,d,u]),{getRootProps:(y={})=>{const S={...Ti(e),...Ti(y)};return{role:"presentation",...y,...S,onBlur:p(S),onFocus:m(S),onMouseEnter:h(S),onMouseLeave:g(S)}},onClickAway:c}}function B1(e){return ge("MuiSnackbarContent",e)}fe("MuiSnackbarContent",["root","message","action"]);const V1=e=>{const{classes:t}=e;return ve({root:["root"],action:["action"],message:["message"]},B1,t)},W1=N(gr,{name:"MuiSnackbarContent",slot:"Root"})(_e(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98;return{...e.typography.body2,color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(Qu(e.palette.background.default,t)),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:Qu(e.palette.background.default,t),display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}}})),Z1=N("div",{name:"MuiSnackbarContent",slot:"Message"})({padding:"8px 0"}),G1=N("div",{name:"MuiSnackbarContent",slot:"Action"})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),H1=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiSnackbarContent"}),{action:n,className:i,message:a,role:s="alert",...l}=o,c=o,u=V1(c);return f.jsxs(W1,{role:s,elevation:6,className:ee(u.root,i),ownerState:c,ref:r,...l,children:[f.jsx(Z1,{className:u.message,ownerState:c,children:a}),n?f.jsx(G1,{className:u.action,ownerState:c,children:n}):null]})});function K1(e){return ge("MuiSnackbar",e)}fe("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const q1=e=>{const{classes:t,anchorOrigin:r}=e,o={root:["root",`anchorOrigin${Z(r.vertical)}${Z(r.horizontal)}`]};return ve(o,K1,t)},J1=N("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`anchorOrigin${Z(r.anchorOrigin.vertical)}${Z(r.anchorOrigin.horizontal)}`]]}})(_e(({theme:e})=>({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center",variants:[{props:({ownerState:t})=>t.anchorOrigin.vertical==="top",style:{top:8,[e.breakpoints.up("sm")]:{top:24}}},{props:({ownerState:t})=>t.anchorOrigin.vertical!=="top",style:{bottom:8,[e.breakpoints.up("sm")]:{bottom:24}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="left",style:{justifyContent:"flex-start",[e.breakpoints.up("sm")]:{left:24,right:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="right",style:{justifyContent:"flex-end",[e.breakpoints.up("sm")]:{right:24,left:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="center",style:{[e.breakpoints.up("sm")]:{left:"50%",right:"auto",transform:"translateX(-50%)"}}}]}))),X1=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiSnackbar"}),n=hr(),i={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{action:a,anchorOrigin:{vertical:s,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:c=null,children:u,className:d,ClickAwayListenerProps:p,ContentProps:m,disableWindowBlurListener:h=!1,message:g,onBlur:v,onClose:y,onFocus:S,onMouseEnter:w,onMouseLeave:x,open:$,resumeHideDuration:I,slots:E={},slotProps:k={},TransitionComponent:D,transitionDuration:j=i,TransitionProps:{onEnter:C,onExited:z,...O}={},...A}=o,T={...o,anchorOrigin:{vertical:s,horizontal:l},autoHideDuration:c,disableWindowBlurListener:h,TransitionComponent:D,transitionDuration:j},P=q1(T),{getRootProps:M,onClickAway:F}=U1(T),[L,X]=b.useState(!0),Q=W=>{X(!0),z&&z(W)},pe=(W,V)=>{X(!1),C&&C(W,V)},le={slots:{transition:D,...E},slotProps:{content:m,clickAwayListener:p,transition:O,...k}},[be,te]=xe("root",{ref:r,className:[P.root,d],elementType:J1,getSlotProps:M,externalForwardedProps:{...le,...A},ownerState:T}),[q,{ownerState:se,...Oe}]=xe("clickAwayListener",{elementType:nI,externalForwardedProps:le,getSlotProps:W=>({onClickAway:(...V)=>{const B=V[0];W.onClickAway?.(...V),!B?.defaultMuiPrevented&&F(...V)}}),ownerState:T}),[Se,ie]=xe("content",{elementType:H1,shouldForwardComponentProp:!0,externalForwardedProps:le,additionalProps:{message:g,action:a},ownerState:T}),[de,_]=xe("transition",{elementType:_o,externalForwardedProps:le,getSlotProps:W=>({onEnter:(...V)=>{W.onEnter?.(...V),pe(...V)},onExited:(...V)=>{W.onExited?.(...V),Q(...V)}}),additionalProps:{appear:!0,in:$,timeout:j,direction:s==="top"?"down":"up"},ownerState:T});return!$&&L?null:f.jsx(q,{...Oe,...E.clickAwayListener&&{ownerState:se},children:f.jsx(be,{...te,children:f.jsx(de,{..._,children:u||f.jsx(Se,{...ie})})})})});function Y1(e){return ge("MuiTooltip",e)}const st=fe("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function Q1(e){return Math.round(e*1e5)/1e5}const e_=e=>{const{classes:t,disableInteractive:r,arrow:o,touch:n,placement:i}=e,a={popper:["popper",!r&&"popperInteractive",o&&"popperArrow"],tooltip:["tooltip",o&&"tooltipArrow",n&&"touch",`tooltipPlacement${Z(i.split("-")[0])}`],arrow:["arrow"]};return ve(a,Y1,t)},t_=N(Hf,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.popper,!r.disableInteractive&&t.popperInteractive,r.arrow&&t.popperArrow,!r.open&&t.popperClose]}})(_e(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:t})=>!t.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:t})=>!t,style:{pointerEvents:"none"}},{props:({ownerState:t})=>t.arrow,style:{[`&[data-popper-placement*="bottom"] .${st.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${st.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${st.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${st.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${st.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${st.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${st.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${st.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),n_=N("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.tooltip,r.touch&&t.touch,r.arrow&&t.tooltipArrow,t[`tooltipPlacement${Z(r.placement.split("-")[0])}`]]}})(_e(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${st.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${st.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${st.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${st.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:t})=>t.arrow,style:{position:"relative",margin:0}},{props:({ownerState:t})=>t.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${Q1(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${st.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${st.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${st.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${st.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${st.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${st.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${st.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${st.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${st.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${st.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),r_=N("span",{name:"MuiTooltip",slot:"Arrow"})(_e(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let li=!1;const Jd=new sa;let to={x:0,y:0};function ci(e,t){return(r,...o)=>{t&&t(r,...o),e(r,...o)}}const Mn=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiTooltip"}),{arrow:n=!1,children:i,classes:a,components:s={},componentsProps:l={},describeChild:c=!1,disableFocusListener:u=!1,disableHoverListener:d=!1,disableInteractive:p=!1,disableTouchListener:m=!1,enterDelay:h=100,enterNextDelay:g=0,enterTouchDelay:v=700,followCursor:y=!1,id:S,leaveDelay:w=0,leaveTouchDelay:x=1500,onClose:$,onOpen:I,open:E,placement:k="bottom",PopperComponent:D,PopperProps:j={},slotProps:C={},slots:z={},title:O,TransitionComponent:A,TransitionProps:T,...P}=o,M=b.isValidElement(i)?i:f.jsx("span",{children:i}),F=hr(),L=Ys(),[X,Q]=b.useState(),[pe,le]=b.useState(null),be=b.useRef(!1),te=p||y,q=An(),se=An(),Oe=An(),Se=An(),[ie,de]=$o({controlled:E,default:!1,name:"Tooltip",state:"open"});let _=ie;const W=mr(S),V=b.useRef(),B=Lt(()=>{V.current!==void 0&&(document.body.style.WebkitUserSelect=V.current,V.current=void 0),Se.clear()});b.useEffect(()=>B,[B]);const ne=Ae=>{Jd.clear(),li=!0,de(!0),I&&!_&&I(Ae)},ce=Lt(Ae=>{Jd.start(800+w,()=>{li=!1}),de(!1),$&&_&&$(Ae),q.start(F.transitions.duration.shortest,()=>{be.current=!1})}),oe=Ae=>{be.current&&Ae.type!=="touchstart"||(X&&X.removeAttribute("title"),se.clear(),Oe.clear(),h||li&&g?se.start(li?g:h,()=>{ne(Ae)}):ne(Ae))},ke=Ae=>{se.clear(),Oe.start(w,()=>{ce(Ae)})},[,ye]=b.useState(!1),we=Ae=>{zi(Ae.target)||(ye(!1),ke(Ae))},G=Ae=>{X||Q(Ae.currentTarget),zi(Ae.target)&&(ye(!0),oe(Ae))},Pe=Ae=>{be.current=!0;const Tn=M.props;Tn.onTouchStart&&Tn.onTouchStart(Ae)},ae=Ae=>{Pe(Ae),Oe.clear(),q.clear(),B(),V.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Se.start(v,()=>{document.body.style.WebkitUserSelect=V.current,oe(Ae)})},Fe=Ae=>{M.props.onTouchEnd&&M.props.onTouchEnd(Ae),B(),Oe.start(x,()=>{ce(Ae)})};b.useEffect(()=>{if(!_)return;function Ae(Tn){Tn.key==="Escape"&&ce(Tn)}return document.addEventListener("keydown",Ae),()=>{document.removeEventListener("keydown",Ae)}},[ce,_]);const ze=at(vr(M),Q,r);!O&&O!==0&&(_=!1);const Ke=b.useRef(),dt=Ae=>{const Tn=M.props;Tn.onMouseMove&&Tn.onMouseMove(Ae),to={x:Ae.clientX,y:Ae.clientY},Ke.current&&Ke.current.update()},it={},ut=typeof O=="string";c?(it.title=!_&&ut&&!d?O:null,it["aria-describedby"]=_?W:null):(it["aria-label"]=ut?O:null,it["aria-labelledby"]=_&&!ut?W:null);const me={...it,...P,...M.props,className:ee(P.className,M.props.className),onTouchStart:Pe,ref:ze,...y?{onMouseMove:dt}:{}},Be={};m||(me.onTouchStart=ae,me.onTouchEnd=Fe),d||(me.onMouseOver=ci(oe,me.onMouseOver),me.onMouseLeave=ci(ke,me.onMouseLeave),te||(Be.onMouseOver=oe,Be.onMouseLeave=ke)),u||(me.onFocus=ci(G,me.onFocus),me.onBlur=ci(we,me.onBlur),te||(Be.onFocus=G,Be.onBlur=we));const nt={...o,isRtl:L,arrow:n,disableInteractive:te,placement:k,PopperComponentProp:D,touch:be.current},Ee=typeof C.popper=="function"?C.popper(nt):C.popper,pt=b.useMemo(()=>{let Ae=[{name:"arrow",enabled:!!pe,options:{element:pe,padding:4}}];return j.popperOptions?.modifiers&&(Ae=Ae.concat(j.popperOptions.modifiers)),Ee?.popperOptions?.modifiers&&(Ae=Ae.concat(Ee.popperOptions.modifiers)),{...j.popperOptions,...Ee?.popperOptions,modifiers:Ae}},[pe,j.popperOptions,Ee?.popperOptions]),Ve=e_(nt),J=typeof C.transition=="function"?C.transition(nt):C.transition,Le={slots:{popper:s.Popper,transition:s.Transition??A,tooltip:s.Tooltip,arrow:s.Arrow,...z},slotProps:{arrow:C.arrow??l.arrow,popper:{...j,...Ee??l.popper},tooltip:C.tooltip??l.tooltip,transition:{...T,...J??l.transition}}},[We,It]=xe("popper",{elementType:t_,externalForwardedProps:Le,ownerState:nt,className:ee(Ve.popper,j?.className)}),[ni,Nx]=xe("transition",{elementType:_o,externalForwardedProps:Le,ownerState:nt}),[Fx,Lx]=xe("tooltip",{elementType:n_,className:Ve.tooltip,externalForwardedProps:Le,ownerState:nt}),[Ux,Bx]=xe("arrow",{elementType:r_,className:Ve.arrow,externalForwardedProps:Le,ownerState:nt,ref:le});return f.jsxs(b.Fragment,{children:[b.cloneElement(M,me),f.jsx(We,{as:D??Hf,placement:k,anchorEl:y?{getBoundingClientRect:()=>({top:to.y,left:to.x,right:to.x,bottom:to.y,width:0,height:0})}:X,popperRef:Ke,open:X?_:!1,id:W,transition:!0,...Be,...It,popperOptions:pt,children:({TransitionProps:Ae})=>f.jsx(ni,{timeout:F.transitions.duration.shorter,...Ae,...Nx,children:f.jsxs(Fx,{...Lx,children:[O,n?f.jsx(Ux,{...Bx}):null]})})})]})});function o_(e){return ge("MuiTextField",e)}fe("MuiTextField",["root"]);const i_={standard:hl,filled:ml,outlined:bl},a_=e=>{const{classes:t}=e;return ve({root:["root"]},o_,t)},s_=N(br,{name:"MuiTextField",slot:"Root"})({}),ct=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiTextField"}),{autoComplete:n,autoFocus:i=!1,children:a,className:s,color:l="primary",defaultValue:c,disabled:u=!1,error:d=!1,FormHelperTextProps:p,fullWidth:m=!1,helperText:h,id:g,InputLabelProps:v,inputProps:y,InputProps:S,inputRef:w,label:x,maxRows:$,minRows:I,multiline:E=!1,name:k,onBlur:D,onChange:j,onFocus:C,placeholder:z,required:O=!1,rows:A,select:T=!1,SelectProps:P,slots:M={},slotProps:F={},type:L,value:X,variant:Q="outlined",...pe}=o,le={...o,autoFocus:i,color:l,disabled:u,error:d,fullWidth:m,multiline:E,required:O,select:T,variant:Q},be=a_(le),te=mr(g),q=h&&te?`${te}-helper-text`:void 0,se=x&&te?`${te}-label`:void 0,Oe=i_[Q],Se={slots:M,slotProps:{input:S,inputLabel:v,htmlInput:y,formHelperText:p,select:P,...F}},ie={},de=Se.slotProps.inputLabel;Q==="outlined"&&(de&&typeof de.shrink<"u"&&(ie.notched=de.shrink),ie.label=x),T&&((!P||!P.native)&&(ie.id=void 0),ie["aria-describedby"]=void 0);const[_,W]=xe("root",{elementType:s_,shouldForwardComponentProp:!0,externalForwardedProps:{...Se,...pe},ownerState:le,className:ee(be.root,s),ref:r,additionalProps:{disabled:u,error:d,fullWidth:m,required:O,color:l,variant:Q}}),[V,B]=xe("input",{elementType:Oe,externalForwardedProps:Se,additionalProps:ie,ownerState:le}),[ne,ce]=xe("inputLabel",{elementType:Zr,externalForwardedProps:Se,ownerState:le}),[oe,ke]=xe("htmlInput",{elementType:"input",externalForwardedProps:Se,ownerState:le}),[ye,we]=xe("formHelperText",{elementType:Lo,externalForwardedProps:Se,ownerState:le}),[G,Pe]=xe("select",{elementType:yr,externalForwardedProps:Se,ownerState:le}),ae=f.jsx(V,{"aria-describedby":q,autoComplete:n,autoFocus:i,defaultValue:c,fullWidth:m,multiline:E,name:k,rows:A,maxRows:$,minRows:I,type:L,value:X,id:te,inputRef:w,onBlur:D,onChange:j,onFocus:C,placeholder:z,inputProps:ke,slots:{input:M.htmlInput?oe:void 0},...B});return f.jsxs(_,{...W,children:[x!=null&&x!==""&&f.jsx(ne,{htmlFor:te,id:se,...ce,children:x}),T?f.jsx(G,{"aria-describedby":q,id:te,labelId:se,value:X,input:ae,...Pe,children:a}):ae,h&&f.jsx(ye,{id:q,...we,children:h})]})});function l_(e){return ge("MuiToggleButton",e)}const er=fe("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),um=b.createContext({}),dm=b.createContext(void 0);function c_(e,t){return t===void 0||e===void 0?!1:Array.isArray(t)?t.includes(e):e===t}const u_=e=>{const{classes:t,fullWidth:r,selected:o,disabled:n,size:i,color:a}=e,s={root:["root",o&&"selected",n&&"disabled",r&&"fullWidth",`size${Z(i)}`,a]};return ve(s,l_,t)},d_=N(ar,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`size${Z(r.size)}`]]}})(_e(({theme:e})=>({...e.typography.button,borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active,[`&.${er.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{color:"standard"},style:{[`&.${er.selected}`]:{color:(e.vars||e).palette.text.primary,backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.text.primary,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.selectedOpacity)}}}}},...Object.entries(e.palette).filter(lt()).map(([t])=>({props:{color:t},style:{[`&.${er.selected}`]:{color:(e.vars||e).palette[t].main,backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{padding:7,fontSize:e.typography.pxToRem(13)}},{props:{size:"large"},style:{padding:15,fontSize:e.typography.pxToRem(15)}}]}))),Xd=b.forwardRef(function(t,r){const{value:o,...n}=b.useContext(um),i=b.useContext(dm),a=yf({...n,selected:c_(t.value,o)},t),s=Ie({props:a,name:"MuiToggleButton"}),{children:l,className:c,color:u="standard",disabled:d=!1,disableFocusRipple:p=!1,fullWidth:m=!1,onChange:h,onClick:g,selected:v,size:y="medium",value:S,...w}=s,x={...s,color:u,disabled:d,disableFocusRipple:p,fullWidth:m,size:y},$=u_(x),I=k=>{g&&(g(k,S),k.defaultPrevented)||h&&h(k,S)},E=i||"";return f.jsx(d_,{className:ee(n.className,$.root,c,E),disabled:d,focusRipple:!p,ref:r,onClick:I,onChange:h,value:S,ownerState:x,"aria-pressed":v,...w,children:l})});function p_(e){return ge("MuiToggleButtonGroup",e)}const rt=fe("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),f_=e=>{const{classes:t,orientation:r,fullWidth:o,disabled:n}=e,i={root:["root",r,o&&"fullWidth"],grouped:["grouped",`grouped${Z(r)}`,n&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return ve(i,p_,t)},m_=N("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${rt.grouped}`]:t.grouped},{[`& .${rt.grouped}`]:t[`grouped${Z(r.orientation)}`]},{[`& .${rt.firstButton}`]:t.firstButton},{[`& .${rt.lastButton}`]:t.lastButton},{[`& .${rt.middleButton}`]:t.middleButton},t.root,r.orientation==="vertical"&&t.vertical,r.fullWidth&&t.fullWidth]}})(_e(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${rt.grouped}`]:{[`&.${rt.selected} + .${rt.grouped}.${rt.selected}`]:{borderTop:0,marginTop:0}},[`& .${rt.firstButton},& .${rt.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${rt.lastButton},& .${rt.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},[`& .${rt.lastButton}.${er.disabled},& .${rt.middleButton}.${er.disabled}`]:{borderTop:"1px solid transparent"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"horizontal"},style:{[`& .${rt.grouped}`]:{[`&.${rt.selected} + .${rt.grouped}.${rt.selected}`]:{borderLeft:0,marginLeft:0}},[`& .${rt.firstButton},& .${rt.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${rt.lastButton},& .${rt.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},[`& .${rt.lastButton}.${er.disabled},& .${rt.middleButton}.${er.disabled}`]:{borderLeft:"1px solid transparent"}}}]}))),h_=b.forwardRef(function(t,r){const o=Ie({props:t,name:"MuiToggleButtonGroup"}),{children:n,className:i,color:a="standard",disabled:s=!1,exclusive:l=!1,fullWidth:c=!1,onChange:u,orientation:d="horizontal",size:p="medium",value:m,...h}=o,g={...o,disabled:s,fullWidth:c,orientation:d,size:p},v=f_(g),y=b.useCallback((E,k)=>{if(!u)return;const D=m&&m.indexOf(k);let j;m&&D>=0?(j=m.slice(),j.splice(D,1)):j=m?m.concat(k):[k],u(E,j)},[u,m]),S=b.useCallback((E,k)=>{u&&u(E,m===k?null:k)},[u,m]),w=b.useMemo(()=>({className:v.grouped,onChange:l?S:y,value:m,size:p,fullWidth:c,color:a,disabled:s}),[v.grouped,l,S,y,m,p,c,a,s]),x=U0(n),$=x.length,I=E=>{const k=E===0,D=E===$-1;return k&&D?"":k?v.firstButton:D?v.lastButton:v.middleButton};return f.jsx(m_,{role:"group",className:ee(v.root,i),ref:r,ownerState:g,...h,children:f.jsx(um.Provider,{value:w,children:x.map((E,k)=>f.jsx(dm.Provider,{value:I(k),children:E},k))})})}),pm=De(f.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"})),g_=De(f.jsx("path",{d:"M15 2c-2.71 0-5.05 1.54-6.22 3.78-1.28.67-2.34 1.72-3 3C3.54 9.95 2 12.29 2 15c0 3.87 3.13 7 7 7 2.71 0 5.05-1.54 6.22-3.78 1.28-.67 2.34-1.72 3-3C20.46 14.05 22 11.71 22 9c0-3.87-3.13-7-7-7M9 20c-2.76 0-5-2.24-5-5 0-1.12.37-2.16 1-3 0 3.87 3.13 7 7 7-.84.63-1.88 1-3 1m3-3c-2.76 0-5-2.24-5-5 0-1.12.37-2.16 1-3 0 3.86 3.13 6.99 7 7-.84.63-1.88 1-3 1m4.7-3.3c-.53.19-1.1.3-1.7.3-2.76 0-5-2.24-5-5 0-.6.11-1.17.3-1.7.53-.19 1.1-.3 1.7-.3 2.76 0 5 2.24 5 5 0 .6-.11 1.17-.3 1.7M19 12c0-3.86-3.13-6.99-7-7 .84-.63 1.87-1 3-1 2.76 0 5 2.24 5 5 0 1.12-.37 2.16-1 3"})),v_=De([f.jsx("circle",{cx:"12",cy:"12",r:"3.2"},"0"),f.jsx("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"1")]),b_=De(f.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})),y_=De(f.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"})),x_=De(f.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),S_=De(f.jsx("path",{d:"M20 6h-8l-2-2H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2m-1 8h-3v3h-2v-3h-3v-2h3V9h2v3h3z"})),on=De(f.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"})),hn=De(f.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"})),w_=De(f.jsx("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"})),$_=De(f.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"})),gn=De(f.jsx("path",{d:"m4 18 8.5-6L4 6zm9-12v12l8.5-6z"})),I_=De(f.jsx("circle",{cx:"12",cy:"12",r:"8"})),k_=De(f.jsx("path",{d:"M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"})),__=De(f.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"})),C_=De(f.jsx("path",{d:"M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm7 7V3.5L18.5 9z"})),E_=De(f.jsx("path",{d:"M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m-9 3h2v2h-2zm0 3h2v2h-2zM8 8h2v2H8zm0 3h2v2H8zm-1 2H5v-2h2zm0-3H5V8h2zm9 7H8v-2h8zm0-4h-2v-2h2zm0-3h-2V8h2zm3 3h-2v-2h2zm0-3h-2V8h2z"})),P_=De(f.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"})),j_=De(f.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"})),O_=De(f.jsx("path",{d:"m11.99 18.54-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27z"})),R_=De(f.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"})),an=De(f.jsx("path",{d:"M8 5v14l11-7z"})),D_=De(f.jsx("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"})),T_=De(f.jsx("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"})),z_=De(f.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"})),A_=De(f.jsx("path",{d:"M20 9V7c0-1.1-.9-2-2-2h-3c0-1.66-1.34-3-3-3S9 3.34 9 5H6c-1.1 0-2 .9-2 2v2c-1.66 0-3 1.34-3 3s1.34 3 3 3v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c1.66 0 3-1.34 3-3s-1.34-3-3-3M7.5 11.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S9.83 13 9 13s-1.5-.67-1.5-1.5M16 17H8v-2h8zm-1-4c-.83 0-1.5-.67-1.5-1.5S14.17 10 15 10s1.5.67 1.5 1.5S15.83 13 15 13"})),fm=De(f.jsx("path",{d:"M6 6h12v12H6z"})),mm=De(f.jsx("path",{d:"M1 3.5h2.02C1.13 5.82 0 8.78 0 12s1.13 6.18 3.02 8.5H1V22h5v-5H4.5v2.91c-1.86-2.11-3-4.88-3-7.91s1.14-5.79 3-7.91V7H6V2H1zm12.85 8.12-2.68-5.37c-.37-.74-1.27-1.04-2.01-.67-.75.38-1.05 1.28-.68 2.02l4.81 9.6-3.24.8c-.33.09-.59.33-.7.66L9 19.78l6.19 2.25c.5.17 1.28.02 1.75-.22l5.51-2.75c.89-.45 1.32-1.48 1-2.42l-1.43-4.27c-.27-.82-1.04-1.37-1.9-1.37h-4.56c-.31 0-.62.07-.89.21z"})),M_=De(f.jsx("path",{d:"M9 9V3H7v2.59L3.91 2.5 2.5 3.91 5.59 7H3v2zm12 0V7h-2.59l3.09-3.09-1.41-1.41L17 5.59V3h-2v6zM3 15v2h2.59L2.5 20.09l1.41 1.41L7 18.41V21h2v-6zm12 0v6h2v-2.59l3.09 3.09 1.41-1.41L18.41 17H21v-2z"}));function wt(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var N_=typeof Symbol=="function"&&Symbol.observable||"@@observable",Yd=N_,Qd=()=>Math.random().toString(36).substring(7).split("").join("."),F_={INIT:`@@redux/INIT${Qd()}`,REPLACE:`@@redux/REPLACE${Qd()}`},ep=F_;function L_(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function hm(e,t,r){if(typeof e!="function")throw new Error(wt(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(wt(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(wt(1));return r(hm)(e,t)}let o=e,n=t,i=new Map,a=i,s=0,l=!1;function c(){a===i&&(a=new Map,i.forEach((v,y)=>{a.set(y,v)}))}function u(){if(l)throw new Error(wt(3));return n}function d(v){if(typeof v!="function")throw new Error(wt(4));if(l)throw new Error(wt(5));let y=!0;c();const S=s++;return a.set(S,v),function(){if(y){if(l)throw new Error(wt(6));y=!1,c(),a.delete(S),i=null}}}function p(v){if(!L_(v))throw new Error(wt(7));if(typeof v.type>"u")throw new Error(wt(8));if(typeof v.type!="string")throw new Error(wt(17));if(l)throw new Error(wt(9));try{l=!0,n=o(n,v)}finally{l=!1}return(i=a).forEach(S=>{S()}),v}function m(v){if(typeof v!="function")throw new Error(wt(10));o=v,p({type:ep.REPLACE})}function h(){const v=d;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(wt(11));function S(){const x=y;x.next&&x.next(u())}return S(),{unsubscribe:v(S)}},[Yd](){return this}}}return p({type:ep.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:m,[Yd]:h}}function tp(e,t){return function(...r){return t(e.apply(this,r))}}function np(e,t){if(typeof e=="function")return tp(e,t);if(typeof e!="object"||e===null)throw new Error(wt(16));const r={};for(const o in e){const n=e[o];typeof n=="function"&&(r[o]=tp(n,t))}return r}function gm(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function U_(...e){return t=>(r,o)=>{const n=t(r,o);let i=()=>{throw new Error(wt(15))};const a={getState:n.getState,dispatch:(l,...c)=>i(l,...c)},s=e.map(l=>l(a));return i=gm(...s)(n.dispatch),{...n,dispatch:i}}}var Ja={exports:{}},Xa={};var rp;function B_(){if(rp)return Xa;rp=1;var e=tS();function t(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var r=typeof Object.is=="function"?Object.is:t,o=e.useSyncExternalStore,n=e.useRef,i=e.useEffect,a=e.useMemo,s=e.useDebugValue;return Xa.useSyncExternalStoreWithSelector=function(l,c,u,d,p){var m=n(null);if(m.current===null){var h={hasValue:!1,value:null};m.current=h}else h=m.current;m=a(function(){function v($){if(!y){if(y=!0,S=$,$=d($),p!==void 0&&h.hasValue){var I=h.value;if(p(I,$))return w=I}return w=$}if(I=w,r(S,$))return I;var E=d($);return p!==void 0&&p(I,E)?(S=$,I):(S=$,w=E)}var y=!1,S,w,x=u===void 0?null:u;return[function(){return v(c())},x===null?void 0:function(){return v(x())}]},[c,u,d,p]);var g=o(l,m[0],m[1]);return i(function(){h.hasValue=!0,h.value=g},[g]),s(g),g},Xa}var op;function V_(){return op||(op=1,Ja.exports=B_()),Ja.exports}V_();var W_=b.version.startsWith("19"),Z_=Symbol.for(W_?"react.transitional.element":"react.element"),G_=Symbol.for("react.portal"),H_=Symbol.for("react.fragment"),K_=Symbol.for("react.strict_mode"),q_=Symbol.for("react.profiler"),J_=Symbol.for("react.consumer"),X_=Symbol.for("react.context"),vm=Symbol.for("react.forward_ref"),Y_=Symbol.for("react.suspense"),Q_=Symbol.for("react.suspense_list"),xl=Symbol.for("react.memo"),eC=Symbol.for("react.lazy"),tC=vm,nC=xl;function rC(e){if(typeof e=="object"&&e!==null){const{$$typeof:t}=e;switch(t){case Z_:switch(e=e.type,e){case H_:case q_:case K_:case Y_:case Q_:return e;default:switch(e=e&&e.$$typeof,e){case X_:case vm:case eC:case xl:return e;case J_:return e;default:return t}}case G_:return t}}}function oC(e){return rC(e)===xl}function iC(e,t,r,o,{areStatesEqual:n,areOwnPropsEqual:i,areStatePropsEqual:a}){let s=!1,l,c,u,d,p;function m(S,w){return l=S,c=w,u=e(l,c),d=t(o,c),p=r(u,d,c),s=!0,p}function h(){return u=e(l,c),t.dependsOnOwnProps&&(d=t(o,c)),p=r(u,d,c),p}function g(){return e.dependsOnOwnProps&&(u=e(l,c)),t.dependsOnOwnProps&&(d=t(o,c)),p=r(u,d,c),p}function v(){const S=e(l,c),w=!a(S,u);return u=S,w&&(p=r(u,d,c)),p}function y(S,w){const x=!i(w,c),$=!n(S,l,w,c);return l=S,c=w,x&&$?h():x?g():$?v():p}return function(w,x){return s?y(w,x):m(w,x)}}function aC(e,{initMapStateToProps:t,initMapDispatchToProps:r,initMergeProps:o,...n}){const i=t(e,n),a=r(e,n),s=o(e,n);return iC(i,a,s,e,n)}function sC(e,t){const r={};for(const o in e){const n=e[o];typeof n=="function"&&(r[o]=(...i)=>t(n(...i)))}return r}function Es(e){return function(r){const o=e(r);function n(){return o}return n.dependsOnOwnProps=!1,n}}function ip(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function bm(e,t){return function(o,{displayName:n}){const i=function(s,l){return i.dependsOnOwnProps?i.mapToProps(s,l):i.mapToProps(s,void 0)};return i.dependsOnOwnProps=!0,i.mapToProps=function(s,l){i.mapToProps=e,i.dependsOnOwnProps=ip(e);let c=i(s,l);return typeof c=="function"&&(i.mapToProps=c,i.dependsOnOwnProps=ip(c),c=i(s,l)),c},i}}function Sl(e,t){return(r,o)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${o.wrappedComponentName}.`)}}function lC(e){return e&&typeof e=="object"?Es(t=>sC(e,t)):e?typeof e=="function"?bm(e):Sl(e,"mapDispatchToProps"):Es(t=>({dispatch:t}))}function cC(e){return e?typeof e=="function"?bm(e):Sl(e,"mapStateToProps"):Es(()=>({}))}function uC(e,t,r){return{...r,...e,...t}}function dC(e){return function(r,{displayName:o,areMergedPropsEqual:n}){let i=!1,a;return function(l,c,u){const d=e(l,c,u);return i?n(d,a)||(a=d):(i=!0,a=d),a}}}function pC(e){return e?typeof e=="function"?dC(e):Sl(e,"mergeProps"):()=>uC}function fC(e){e()}function mC(){let e=null,t=null;return{clear(){e=null,t=null},notify(){fC(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let o=e;for(;o;)r.push(o),o=o.next;return r},subscribe(r){let o=!0;const n=t={callback:r,next:null,prev:t};return n.prev?n.prev.next=n:e=n,function(){!o||e===null||(o=!1,n.next?n.next.prev=n.prev:t=n.prev,n.prev?n.prev.next=n.next:e=n.next)}}}}var ap={notify(){},get:()=>[]};function ym(e,t){let r,o=ap,n=0,i=!1;function a(g){u();const v=o.subscribe(g);let y=!1;return()=>{y||(y=!0,v(),d())}}function s(){o.notify()}function l(){h.onStateChange&&h.onStateChange()}function c(){return i}function u(){n++,r||(r=t?t.addNestedSub(l):e.subscribe(l),o=mC())}function d(){n--,r&&n===0&&(r(),r=void 0,o.clear(),o=ap)}function p(){i||(i=!0,u())}function m(){i&&(i=!1,d())}const h={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:c,trySubscribe:p,tryUnsubscribe:m,getListeners:()=>o};return h}var hC=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",gC=hC(),vC=()=>typeof navigator<"u"&&navigator.product==="ReactNative",bC=vC(),yC=()=>gC||bC?b.useLayoutEffect:b.useEffect,Fi=yC();function sp(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Ya(e,t){if(sp(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(let n=0;n<r.length;n++)if(!Object.prototype.hasOwnProperty.call(t,r[n])||!sp(e[r[n]],t[r[n]]))return!1;return!0}var xC={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},SC={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},wC={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},xm={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},$C={[tC]:wC,[nC]:xm};function lp(e){return oC(e)?xm:$C[e.$$typeof]||xC}var IC=Object.defineProperty,kC=Object.getOwnPropertyNames,cp=Object.getOwnPropertySymbols,_C=Object.getOwnPropertyDescriptor,CC=Object.getPrototypeOf,up=Object.prototype;function Ps(e,t){if(typeof t!="string"){if(up){const i=CC(t);i&&i!==up&&Ps(e,i)}let r=kC(t);cp&&(r=r.concat(cp(t)));const o=lp(e),n=lp(t);for(let i=0;i<r.length;++i){const a=r[i];if(!SC[a]&&!(n&&n[a])&&!(o&&o[a])){const s=_C(t,a);try{IC(e,a,s)}catch{}}}}return e}var EC=Symbol.for("react-redux-context"),PC=typeof globalThis<"u"?globalThis:{};function jC(){if(!b.createContext)return{};const e=PC[EC]??=new Map;let t=e.get(b.createContext);return t||(t=b.createContext(null),e.set(b.createContext,t)),t}var Sm=jC(),OC=[null,null];function RC(e,t,r){Fi(()=>e(...t),r)}function DC(e,t,r,o,n,i){e.current=o,r.current=!1,n.current&&(n.current=null,i())}function TC(e,t,r,o,n,i,a,s,l,c,u){if(!e)return()=>{};let d=!1,p=null;const m=()=>{if(d||!s.current)return;const g=t.getState();let v,y;try{v=o(g,n.current)}catch(S){y=S,p=S}y||(p=null),v===i.current?a.current||c():(i.current=v,l.current=v,a.current=!0,u())};return r.onStateChange=m,r.trySubscribe(),m(),()=>{if(d=!0,r.tryUnsubscribe(),r.onStateChange=null,p)throw p}}function zC(e,t){return e===t}function AC(e,t,r,{pure:o,areStatesEqual:n=zC,areOwnPropsEqual:i=Ya,areStatePropsEqual:a=Ya,areMergedPropsEqual:s=Ya,forwardRef:l=!1,context:c=Sm}={}){const u=c,d=cC(e),p=lC(t),m=pC(r),h=!!e;return v=>{const y=v.displayName||v.name||"Component",S=`Connect(${y})`,w={shouldHandleStateChanges:h,displayName:S,wrappedComponentName:y,WrappedComponent:v,initMapStateToProps:d,initMapDispatchToProps:p,initMergeProps:m,areStatesEqual:n,areStatePropsEqual:a,areOwnPropsEqual:i,areMergedPropsEqual:s};function x(E){const[k,D,j]=b.useMemo(()=>{const{reactReduxForwardedRef:_,...W}=E;return[E.context,_,W]},[E]),C=b.useMemo(()=>{let _=u;return k?.Consumer,_},[k,u]),z=b.useContext(C),O=!!E.store&&!!E.store.getState&&!!E.store.dispatch,A=!!z&&!!z.store,T=O?E.store:z.store,P=A?z.getServerState:T.getState,M=b.useMemo(()=>aC(T.dispatch,w),[T]),[F,L]=b.useMemo(()=>{if(!h)return OC;const _=ym(T,O?void 0:z.subscription),W=_.notifyNestedSubs.bind(_);return[_,W]},[T,O,z]),X=b.useMemo(()=>O?z:{...z,subscription:F},[O,z,F]),Q=b.useRef(void 0),pe=b.useRef(j),le=b.useRef(void 0),be=b.useRef(!1),te=b.useRef(!1),q=b.useRef(void 0);Fi(()=>(te.current=!0,()=>{te.current=!1}),[]);const se=b.useMemo(()=>()=>le.current&&j===pe.current?le.current:M(T.getState(),j),[T,j]),Oe=b.useMemo(()=>W=>F?TC(h,T,F,M,pe,Q,be,te,le,L,W):()=>{},[F]);RC(DC,[pe,Q,be,j,le,L]);let Se;try{Se=b.useSyncExternalStore(Oe,se,P?()=>M(P(),j):se)}catch(_){throw q.current&&(_.message+=`
|
|
104
|
+
The error may be correlated with this previous error:
|
|
105
|
+
${q.current.stack}
|
|
106
|
+
|
|
107
|
+
`),_}Fi(()=>{q.current=void 0,le.current=void 0,Q.current=Se});const ie=b.useMemo(()=>b.createElement(v,{...Se,ref:D}),[D,v,Se]);return b.useMemo(()=>h?b.createElement(C.Provider,{value:X},ie):ie,[C,ie,X])}const I=b.memo(x);if(I.WrappedComponent=v,I.displayName=x.displayName=S,l){const k=b.forwardRef(function(j,C){return b.createElement(I,{...j,reactReduxForwardedRef:C})});return k.displayName=S,k.WrappedComponent=v,Ps(k,v)}return Ps(I,v)}}var wm=AC;function MC(e){const{children:t,context:r,serverState:o,store:n}=e,i=b.useMemo(()=>{const l=ym(n);return{store:n,subscription:l,getServerState:o?()=>o:void 0}},[n,o]),a=b.useMemo(()=>n.getState(),[n]);Fi(()=>{const{subscription:l}=i;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),a!==n.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[i,a]);const s=r||Sm;return b.createElement(s.Provider,{value:i},t)}var NC=MC,qt=function(t){var r=t.top,o=t.right,n=t.bottom,i=t.left,a=o-i,s=n-r,l={top:r,right:o,bottom:n,left:i,width:a,height:s,x:i,y:r,center:{x:(o+i)/2,y:(n+r)/2}};return l},wl=function(t,r){return{top:t.top-r.top,left:t.left-r.left,bottom:t.bottom+r.bottom,right:t.right+r.right}},dp=function(t,r){return{top:t.top+r.top,left:t.left+r.left,bottom:t.bottom-r.bottom,right:t.right-r.right}},FC=function(t,r){return{top:t.top+r.y,left:t.left+r.x,bottom:t.bottom+r.y,right:t.right+r.x}},Qa={top:0,right:0,bottom:0,left:0},$l=function(t){var r=t.borderBox,o=t.margin,n=o===void 0?Qa:o,i=t.border,a=i===void 0?Qa:i,s=t.padding,l=s===void 0?Qa:s,c=qt(wl(r,n)),u=qt(dp(r,a)),d=qt(dp(u,l));return{marginBox:c,borderBox:qt(r),paddingBox:u,contentBox:d,margin:n,border:a,padding:l}},At=function(t){var r=t.slice(0,-2),o=t.slice(-2);if(o!=="px")return 0;var n=Number(r);return isNaN(n)&&nS(!1),n},LC=function(){return{x:window.pageXOffset,y:window.pageYOffset}},Li=function(t,r){var o=t.borderBox,n=t.border,i=t.margin,a=t.padding,s=FC(o,r);return $l({borderBox:s,border:n,margin:i,padding:a})},Ui=function(t,r){return r===void 0&&(r=LC()),Li(t,r)},$m=function(t,r){var o={top:At(r.marginTop),right:At(r.marginRight),bottom:At(r.marginBottom),left:At(r.marginLeft)},n={top:At(r.paddingTop),right:At(r.paddingRight),bottom:At(r.paddingBottom),left:At(r.paddingLeft)},i={top:At(r.borderTopWidth),right:At(r.borderRightWidth),bottom:At(r.borderBottomWidth),left:At(r.borderLeftWidth)};return $l({borderBox:t,margin:o,padding:n,border:i})},Im=function(t){var r=t.getBoundingClientRect(),o=window.getComputedStyle(t);return $m(r,o)},Co=function(t){var r=[],o=null,n=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];r=s,!o&&(o=requestAnimationFrame(function(){o=null,t.apply(void 0,r)}))};return n.cancel=function(){o&&(cancelAnimationFrame(o),o=null)},n};function km(e,t){}km.bind(null,"warn");km.bind(null,"error");function Nn(){}function UC(e,t){return{...e,...t}}function Ft(e,t,r){const o=t.map(n=>{const i=UC(r,n.options);return e.addEventListener(n.eventName,n.fn,i),function(){e.removeEventListener(n.eventName,n.fn,i)}});return function(){o.forEach(i=>{i()})}}const BC="Invariant failed";class Bi extends Error{}Bi.prototype.toString=function(){return this.message};function K(e,t){throw new Bi(BC)}class VC extends He.Component{constructor(...t){super(...t),this.callbacks=null,this.unbind=Nn,this.onWindowError=r=>{const o=this.getCallbacks();o.isDragging()&&o.tryAbort(),r.error instanceof Bi&&r.preventDefault()},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return this.callbacks},this.setCallbacks=r=>{this.callbacks=r}}componentDidMount(){this.unbind=Ft(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(t){if(t instanceof Bi){this.setState({});return}throw t}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const WC=`
|
|
108
|
+
Press space bar to start a drag.
|
|
109
|
+
When dragging you can use the arrow keys to move the item around and escape to cancel.
|
|
110
|
+
Some screen readers may require you to be in focus mode or to use your pass through key
|
|
111
|
+
`,Vi=e=>e+1,ZC=e=>`
|
|
112
|
+
You have lifted an item in position ${Vi(e.source.index)}
|
|
113
|
+
`,_m=(e,t)=>{const r=e.droppableId===t.droppableId,o=Vi(e.index),n=Vi(t.index);return r?`
|
|
114
|
+
You have moved the item from position ${o}
|
|
115
|
+
to position ${n}
|
|
116
|
+
`:`
|
|
117
|
+
You have moved the item from position ${o}
|
|
118
|
+
in list ${e.droppableId}
|
|
119
|
+
to list ${t.droppableId}
|
|
120
|
+
in position ${n}
|
|
121
|
+
`},Cm=(e,t,r)=>t.droppableId===r.droppableId?`
|
|
122
|
+
The item ${e}
|
|
123
|
+
has been combined with ${r.draggableId}`:`
|
|
124
|
+
The item ${e}
|
|
125
|
+
in list ${t.droppableId}
|
|
126
|
+
has been combined with ${r.draggableId}
|
|
127
|
+
in list ${r.droppableId}
|
|
128
|
+
`,GC=e=>{const t=e.destination;if(t)return _m(e.source,t);const r=e.combine;return r?Cm(e.draggableId,e.source,r):"You are over an area that cannot be dropped on"},pp=e=>`
|
|
129
|
+
The item has returned to its starting position
|
|
130
|
+
of ${Vi(e.index)}
|
|
131
|
+
`,HC=e=>{if(e.reason==="CANCEL")return`
|
|
132
|
+
Movement cancelled.
|
|
133
|
+
${pp(e.source)}
|
|
134
|
+
`;const t=e.destination,r=e.combine;return t?`
|
|
135
|
+
You have dropped the item.
|
|
136
|
+
${_m(e.source,t)}
|
|
137
|
+
`:r?`
|
|
138
|
+
You have dropped the item.
|
|
139
|
+
${Cm(e.draggableId,e.source,r)}
|
|
140
|
+
`:`
|
|
141
|
+
The item has been dropped while not over a drop area.
|
|
142
|
+
${pp(e.source)}
|
|
143
|
+
`},Ci={dragHandleUsageInstructions:WC,onDragStart:ZC,onDragUpdate:GC,onDragEnd:HC};function KC(e,t){return!!(e===t||Number.isNaN(e)&&Number.isNaN(t))}function Em(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!KC(e[r],t[r]))return!1;return!0}function Ge(e,t){const r=b.useState(()=>({inputs:t,result:e()}))[0],o=b.useRef(!0),n=b.useRef(r),a=o.current||!!(t&&n.current.inputs&&Em(t,n.current.inputs))?n.current:{inputs:t,result:e()};return b.useEffect(()=>{o.current=!1,n.current=a},[a]),a.result}function ue(e,t){return Ge(()=>e,t)}const mt={x:0,y:0},ht=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),jt=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),Fn=(e,t)=>e.x===t.x&&e.y===t.y,Gr=e=>({x:e.x!==0?-e.x:0,y:e.y!==0?-e.y:0}),cr=(e,t,r=0)=>e==="x"?{x:t,y:r}:{x:r,y:t},Eo=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),fp=(e,t)=>Math.min(...t.map(r=>Eo(e,r))),Pm=e=>t=>({x:e(t.x),y:e(t.y)});var qC=(e,t)=>{const r=qt({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return r.width<=0||r.height<=0?null:r};const Uo=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),mp=e=>[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}],JC={top:0,right:0,bottom:0,left:0},XC=(e,t)=>t?Uo(e,t.scroll.diff.displacement):e,YC=(e,t,r)=>r&&r.increasedBy?{...e,[t.end]:e[t.end]+r.increasedBy[t.line]}:e,QC=(e,t)=>t&&t.shouldClipSubject?qC(t.pageMarginBox,e):qt(e);var Ar=({page:e,withPlaceholder:t,axis:r,frame:o})=>{const n=XC(e.marginBox,o),i=YC(n,r,t),a=QC(i,o);return{page:e,withPlaceholder:t,active:a}},Il=(e,t)=>{e.frame||K();const r=e.frame,o=jt(t,r.scroll.initial),n=Gr(o),i={...r,scroll:{initial:r.scroll.initial,current:t,diff:{value:o,displacement:n},max:r.scroll.max}},a=Ar({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return{...e,frame:i,subject:a}};function ft(e,t=Em){let r=null;function o(...n){if(r&&r.lastThis===this&&t(n,r.lastArgs))return r.lastResult;const i=e.apply(this,n);return r={lastResult:i,lastArgs:n,lastThis:this},i}return o.clear=function(){r=null},o}const jm=ft(e=>e.reduce((t,r)=>(t[r.descriptor.id]=r,t),{})),Om=ft(e=>e.reduce((t,r)=>(t[r.descriptor.id]=r,t),{})),ga=ft(e=>Object.values(e)),eE=ft(e=>Object.values(e));var Hr=ft((e,t)=>eE(t).filter(o=>e===o.descriptor.droppableId).sort((o,n)=>o.descriptor.index-n.descriptor.index));function kl(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function va(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var ba=ft((e,t)=>t.filter(r=>r.descriptor.id!==e.descriptor.id)),tE=({isMovingForward:e,draggable:t,destination:r,insideDestination:o,previousImpact:n})=>{if(!r.isCombineEnabled||!kl(n))return null;function a(m){const h={type:"COMBINE",combine:{draggableId:m,droppableId:r.descriptor.id}};return{...n,at:h}}const s=n.displaced.all,l=s.length?s[0]:null;if(e)return l?a(l):null;const c=ba(t,o);if(!l){if(!c.length)return null;const m=c[c.length-1];return a(m.descriptor.id)}const u=c.findIndex(m=>m.descriptor.id===l);u===-1&&K();const d=u-1;if(d<0)return null;const p=c[d];return a(p.descriptor.id)},Kr=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const Rm={point:mt,value:0},Po={invisible:{},visible:{},all:[]},nE={displaced:Po,displacedBy:Rm,at:null};var Bt=(e,t)=>r=>e<=r&&r<=t,Dm=e=>{const t=Bt(e.top,e.bottom),r=Bt(e.left,e.right);return o=>{if(t(o.top)&&t(o.bottom)&&r(o.left)&&r(o.right))return!0;const i=t(o.top)||t(o.bottom),a=r(o.left)||r(o.right);if(i&&a)return!0;const l=o.top<e.top&&o.bottom>e.bottom,c=o.left<e.left&&o.right>e.right;return l&&c?!0:l&&a||c&&i}},rE=e=>{const t=Bt(e.top,e.bottom),r=Bt(e.left,e.right);return o=>t(o.top)&&t(o.bottom)&&r(o.left)&&r(o.right)};const _l={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Tm={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};var oE=e=>t=>{const r=Bt(t.top,t.bottom),o=Bt(t.left,t.right);return n=>e===_l?r(n.top)&&r(n.bottom):o(n.left)&&o(n.right)};const iE=(e,t)=>{const r=t.frame?t.frame.scroll.diff.displacement:mt;return Uo(e,r)},aE=(e,t,r)=>t.subject.active?r(t.subject.active)(e):!1,sE=(e,t,r)=>r(t)(e),Cl=({target:e,destination:t,viewport:r,withDroppableDisplacement:o,isVisibleThroughFrameFn:n})=>{const i=o?iE(e,t):e;return aE(i,t,n)&&sE(i,r,n)},lE=e=>Cl({...e,isVisibleThroughFrameFn:Dm}),zm=e=>Cl({...e,isVisibleThroughFrameFn:rE}),cE=e=>Cl({...e,isVisibleThroughFrameFn:oE(e.destination.axis)}),uE=(e,t,r)=>{if(typeof r=="boolean")return r;if(!t)return!0;const{invisible:o,visible:n}=t;if(o[e])return!1;const i=n[e];return i?i.shouldAnimate:!0};function dE(e,t){const r=e.page.marginBox,o={top:t.point.y,right:0,bottom:0,left:t.point.x};return qt(wl(r,o))}function jo({afterDragging:e,destination:t,displacedBy:r,viewport:o,forceShouldAnimate:n,last:i}){return e.reduce(function(s,l){const c=dE(l,r),u=l.descriptor.id;if(s.all.push(u),!lE({target:c,destination:t,viewport:o,withDroppableDisplacement:!0}))return s.invisible[l.descriptor.id]=!0,s;const p=uE(u,i,n),m={draggableId:u,shouldAnimate:p};return s.visible[u]=m,s},{all:[],visible:{},invisible:{}})}function pE(e,t){if(!e.length)return 0;const r=e[e.length-1].descriptor.index;return t.inHomeList?r:r+1}function hp({insideDestination:e,inHomeList:t,displacedBy:r,destination:o}){const n=pE(e,{inHomeList:t});return{displaced:Po,displacedBy:r,at:{type:"REORDER",destination:{droppableId:o.descriptor.id,index:n}}}}function Wi({draggable:e,insideDestination:t,destination:r,viewport:o,displacedBy:n,last:i,index:a,forceShouldAnimate:s}){const l=Kr(e,r);if(a==null)return hp({insideDestination:t,inHomeList:l,displacedBy:n,destination:r});const c=t.find(h=>h.descriptor.index===a);if(!c)return hp({insideDestination:t,inHomeList:l,displacedBy:n,destination:r});const u=ba(e,t),d=t.indexOf(c),p=u.slice(d);return{displaced:jo({afterDragging:p,destination:r,displacedBy:n,last:i,viewport:o.frame,forceShouldAnimate:s}),displacedBy:n,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:a}}}}function Un(e,t){return!!t.effected[e]}var fE=({isMovingForward:e,destination:t,draggables:r,combine:o,afterCritical:n})=>{if(!t.isCombineEnabled)return null;const i=o.draggableId,s=r[i].descriptor.index;return Un(i,n)?e?s:s-1:e?s+1:s},mE=({isMovingForward:e,isInHomeList:t,insideDestination:r,location:o})=>{if(!r.length)return null;const n=o.index,i=e?n+1:n-1,a=r[0].descriptor.index,s=r[r.length-1].descriptor.index,l=t?s:s+1;return i<a||i>l?null:i},hE=({isMovingForward:e,isInHomeList:t,draggable:r,draggables:o,destination:n,insideDestination:i,previousImpact:a,viewport:s,afterCritical:l})=>{const c=a.at;if(c||K(),c.type==="REORDER"){const d=mE({isMovingForward:e,isInHomeList:t,location:c.destination,insideDestination:i});return d==null?null:Wi({draggable:r,insideDestination:i,destination:n,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:d})}const u=fE({isMovingForward:e,destination:n,displaced:a.displaced,draggables:o,combine:c.combine,afterCritical:l});return u==null?null:Wi({draggable:r,insideDestination:i,destination:n,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:u})},gE=({displaced:e,afterCritical:t,combineWith:r,displacedBy:o})=>{const n=!!(e.visible[r]||e.invisible[r]);return Un(r,t)?n?mt:Gr(o.point):n?o.point:mt},vE=({afterCritical:e,impact:t,draggables:r})=>{const o=va(t);o||K();const n=o.draggableId,i=r[n].page.borderBox.center,a=gE({displaced:t.displaced,afterCritical:e,combineWith:n,displacedBy:t.displacedBy});return ht(i,a)};const Am=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,bE=(e,t)=>t.margin[e.end]+t.borderBox[e.size]/2,El=(e,t,r)=>t[e.crossAxisStart]+r.margin[e.crossAxisStart]+r.borderBox[e.crossAxisSize]/2,gp=({axis:e,moveRelativeTo:t,isMoving:r})=>cr(e.line,t.marginBox[e.end]+Am(e,r),El(e,t.marginBox,r)),vp=({axis:e,moveRelativeTo:t,isMoving:r})=>cr(e.line,t.marginBox[e.start]-bE(e,r),El(e,t.marginBox,r)),yE=({axis:e,moveInto:t,isMoving:r})=>cr(e.line,t.contentBox[e.start]+Am(e,r),El(e,t.contentBox,r));var xE=({impact:e,draggable:t,draggables:r,droppable:o,afterCritical:n})=>{const i=Hr(o.descriptor.id,r),a=t.page,s=o.axis;if(!i.length)return yE({axis:s,moveInto:o.page,isMoving:a});const{displaced:l,displacedBy:c}=e,u=l.all[0];if(u){const p=r[u];if(Un(u,n))return vp({axis:s,moveRelativeTo:p.page,isMoving:a});const m=Li(p.page,c.point);return vp({axis:s,moveRelativeTo:m,isMoving:a})}const d=i[i.length-1];if(d.descriptor.id===t.descriptor.id)return a.borderBox.center;if(Un(d.descriptor.id,n)){const p=Li(d.page,Gr(n.displacedBy.point));return gp({axis:s,moveRelativeTo:p,isMoving:a})}return gp({axis:s,moveRelativeTo:d.page,isMoving:a})},js=(e,t)=>{const r=e.frame;return r?ht(t,r.scroll.diff.displacement):t};const SE=({impact:e,draggable:t,droppable:r,draggables:o,afterCritical:n})=>{const i=t.page.borderBox.center,a=e.at;return!r||!a?i:a.type==="REORDER"?xE({impact:e,draggable:t,draggables:o,droppable:r,afterCritical:n}):vE({impact:e,draggables:o,afterCritical:n})};var ya=e=>{const t=SE(e),r=e.droppable;return r?js(r,t):t},Mm=(e,t)=>{const r=jt(t,e.scroll.initial),o=Gr(r);return{frame:qt({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:r,displacement:o}}}};function bp(e,t){return e.map(r=>t[r])}function wE(e,t){for(let r=0;r<t.length;r++){const o=t[r].visible[e];if(o)return o}return null}var $E=({impact:e,viewport:t,destination:r,draggables:o,maxScrollChange:n})=>{const i=Mm(t,ht(t.scroll.current,n)),a=r.frame?Il(r,ht(r.frame.scroll.current,n)):r,s=e.displaced,l=jo({afterDragging:bp(s.all,o),destination:r,displacedBy:e.displacedBy,viewport:i.frame,last:s,forceShouldAnimate:!1}),c=jo({afterDragging:bp(s.all,o),destination:a,displacedBy:e.displacedBy,viewport:t.frame,last:s,forceShouldAnimate:!1}),u={},d={},p=[s,l,c];return s.all.forEach(h=>{const g=wE(h,p);if(g){d[h]=g;return}u[h]=!0}),{...e,displaced:{all:s.all,invisible:u,visible:d}}},IE=(e,t)=>ht(e.scroll.diff.displacement,t),Pl=({pageBorderBoxCenter:e,draggable:t,viewport:r})=>{const o=IE(r,e),n=jt(o,t.page.borderBox.center);return ht(t.client.borderBox.center,n)},Nm=({draggable:e,destination:t,newPageBorderBoxCenter:r,viewport:o,withDroppableDisplacement:n,onlyOnMainAxis:i=!1})=>{const a=jt(r,e.page.borderBox.center),l={target:Uo(e.page.borderBox,a),destination:t,withDroppableDisplacement:n,viewport:o};return i?cE(l):zm(l)},kE=({isMovingForward:e,draggable:t,destination:r,draggables:o,previousImpact:n,viewport:i,previousPageBorderBoxCenter:a,previousClientSelection:s,afterCritical:l})=>{if(!r.isEnabled)return null;const c=Hr(r.descriptor.id,o),u=Kr(t,r),d=tE({isMovingForward:e,draggable:t,destination:r,insideDestination:c,previousImpact:n})||hE({isMovingForward:e,isInHomeList:u,draggable:t,draggables:o,destination:r,insideDestination:c,previousImpact:n,viewport:i,afterCritical:l});if(!d)return null;const p=ya({impact:d,draggable:t,droppable:r,draggables:o,afterCritical:l});if(Nm({draggable:t,destination:r,newPageBorderBoxCenter:p,viewport:i.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:Pl({pageBorderBoxCenter:p,draggable:t,viewport:i}),impact:d,scrollJumpRequest:null};const h=jt(p,a),g=$E({impact:d,viewport:i,destination:r,draggables:o,maxScrollChange:h});return{clientSelection:s,impact:g,scrollJumpRequest:h}};const xt=e=>{const t=e.subject.active;return t||K(),t};var _E=({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:o,viewport:n})=>{const i=r.subject.active;if(!i)return null;const a=r.axis,s=Bt(i[a.start],i[a.end]),l=ga(o).filter(u=>u!==r).filter(u=>u.isEnabled).filter(u=>!!u.subject.active).filter(u=>Dm(n.frame)(xt(u))).filter(u=>{const d=xt(u);return e?i[a.crossAxisEnd]<d[a.crossAxisEnd]:d[a.crossAxisStart]<i[a.crossAxisStart]}).filter(u=>{const d=xt(u),p=Bt(d[a.start],d[a.end]);return s(d[a.start])||s(d[a.end])||p(i[a.start])||p(i[a.end])}).sort((u,d)=>{const p=xt(u)[a.crossAxisStart],m=xt(d)[a.crossAxisStart];return e?p-m:m-p}).filter((u,d,p)=>xt(u)[a.crossAxisStart]===xt(p[0])[a.crossAxisStart]);if(!l.length)return null;if(l.length===1)return l[0];const c=l.filter(u=>Bt(xt(u)[a.start],xt(u)[a.end])(t[a.line]));return c.length===1?c[0]:c.length>1?c.sort((u,d)=>xt(u)[a.start]-xt(d)[a.start])[0]:l.sort((u,d)=>{const p=fp(t,mp(xt(u))),m=fp(t,mp(xt(d)));return p!==m?p-m:xt(u)[a.start]-xt(d)[a.start]})[0]};const yp=(e,t)=>{const r=e.page.borderBox.center;return Un(e.descriptor.id,t)?jt(r,t.displacedBy.point):r},CE=(e,t)=>{const r=e.page.borderBox;return Un(e.descriptor.id,t)?Uo(r,Gr(t.displacedBy.point)):r};var EE=({pageBorderBoxCenter:e,viewport:t,destination:r,insideDestination:o,afterCritical:n})=>o.filter(a=>zm({target:CE(a,n),destination:r,viewport:t.frame,withDroppableDisplacement:!0})).sort((a,s)=>{const l=Eo(e,js(r,yp(a,n))),c=Eo(e,js(r,yp(s,n)));return l<c?-1:c<l?1:a.descriptor.index-s.descriptor.index})[0]||null,Bo=ft(function(t,r){const o=r[t.line];return{value:o,point:cr(t.line,o)}});const PE=(e,t,r)=>{const o=e.axis;if(e.descriptor.mode==="virtual")return cr(o.line,t[o.line]);const n=e.subject.page.contentBox[o.size],l=Hr(e.descriptor.id,r).reduce((c,u)=>c+u.client.marginBox[o.size],0)+t[o.line]-n;return l<=0?null:cr(o.line,l)},Fm=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),Lm=(e,t,r)=>{const o=e.frame;Kr(t,e)&&K(),e.subject.withPlaceholder&&K();const n=Bo(e.axis,t.displaceBy).point,i=PE(e,n,r),a={placeholderSize:n,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!o){const u=Ar({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return{...e,subject:u}}const s=i?ht(o.scroll.max,i):o.scroll.max,l=Fm(o,s),c=Ar({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:l});return{...e,subject:c,frame:l}},jE=e=>{const t=e.subject.withPlaceholder;t||K();const r=e.frame;if(!r){const a=Ar({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:a}}const o=t.oldFrameMaxScroll;o||K();const n=Fm(r,o),i=Ar({page:e.subject.page,axis:e.axis,frame:n,withPlaceholder:null});return{...e,subject:i,frame:n}};var OE=({previousPageBorderBoxCenter:e,moveRelativeTo:t,insideDestination:r,draggable:o,draggables:n,destination:i,viewport:a,afterCritical:s})=>{if(!t){if(r.length)return null;const d={displaced:Po,displacedBy:Rm,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:0}}},p=ya({impact:d,draggable:o,droppable:i,draggables:n,afterCritical:s}),m=Kr(o,i)?i:Lm(i,o,n);return Nm({draggable:o,destination:m,newPageBorderBoxCenter:p,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?d:null}const l=e[i.axis.line]<=t.page.borderBox.center[i.axis.line],c=(()=>{const d=t.descriptor.index;return t.descriptor.id===o.descriptor.id||l?d:d+1})(),u=Bo(i.axis,o.displaceBy);return Wi({draggable:o,insideDestination:r,destination:i,viewport:a,displacedBy:u,last:Po,index:c})},RE=({isMovingForward:e,previousPageBorderBoxCenter:t,draggable:r,isOver:o,draggables:n,droppables:i,viewport:a,afterCritical:s})=>{const l=_E({isMovingForward:e,pageBorderBoxCenter:t,source:o,droppables:i,viewport:a});if(!l)return null;const c=Hr(l.descriptor.id,n),u=EE({pageBorderBoxCenter:t,viewport:a,destination:l,insideDestination:c,afterCritical:s}),d=OE({previousPageBorderBoxCenter:t,destination:l,draggable:r,draggables:n,moveRelativeTo:u,insideDestination:c,viewport:a,afterCritical:s});if(!d)return null;const p=ya({impact:d,draggable:r,droppable:l,draggables:n,afterCritical:s});return{clientSelection:Pl({pageBorderBoxCenter:p,draggable:r,viewport:a}),impact:d,scrollJumpRequest:null}},Ot=e=>{const t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null};const DE=(e,t)=>{const r=Ot(e);return r?t[r]:null};var TE=({state:e,type:t})=>{const r=DE(e.impact,e.dimensions.droppables),o=!!r,n=e.dimensions.droppables[e.critical.droppable.id],i=r||n,a=i.axis.direction,s=a==="vertical"&&(t==="MOVE_UP"||t==="MOVE_DOWN")||a==="horizontal"&&(t==="MOVE_LEFT"||t==="MOVE_RIGHT");if(s&&!o)return null;const l=t==="MOVE_DOWN"||t==="MOVE_RIGHT",c=e.dimensions.draggables[e.critical.draggable.id],u=e.current.page.borderBoxCenter,{draggables:d,droppables:p}=e.dimensions;return s?kE({isMovingForward:l,previousPageBorderBoxCenter:u,draggable:c,destination:i,draggables:d,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,afterCritical:e.afterCritical}):RE({isMovingForward:l,previousPageBorderBoxCenter:u,draggable:c,isOver:i,draggables:d,droppables:p,viewport:e.viewport,afterCritical:e.afterCritical})};function Xn(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function Um(e){const t=Bt(e.top,e.bottom),r=Bt(e.left,e.right);return function(n){return t(n.y)&&r(n.x)}}function zE(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function AE({pageBorderBox:e,draggable:t,candidates:r}){const o=t.page.borderBox.center,n=r.map(i=>{const a=i.axis,s=cr(i.axis.line,e.center[a.line],i.page.borderBox.center[a.crossAxisLine]);return{id:i.descriptor.id,distance:Eo(o,s)}}).sort((i,a)=>a.distance-i.distance);return n[0]?n[0].id:null}function ME({pageBorderBox:e,draggable:t,droppables:r}){const o=ga(r).filter(n=>{if(!n.isEnabled)return!1;const i=n.subject.active;if(!i||!zE(e,i))return!1;if(Um(i)(e.center))return!0;const a=n.axis,s=i.center[a.crossAxisLine],l=e[a.crossAxisStart],c=e[a.crossAxisEnd],u=Bt(i[a.crossAxisStart],i[a.crossAxisEnd]),d=u(l),p=u(c);return!d&&!p?!0:d?l<s:c>s});return o.length?o.length===1?o[0].descriptor.id:AE({pageBorderBox:e,draggable:t,candidates:o}):null}const Bm=(e,t)=>qt(Uo(e,t));var NE=(e,t)=>{const r=e.frame;return r?Bm(t,r.scroll.diff.value):t};function Vm({displaced:e,id:t}){return!!(e.visible[t]||e.invisible[t])}function FE({draggable:e,closest:t,inHomeList:r}){return t?r&&t.descriptor.index>e.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}var LE=({pageBorderBoxWithDroppableScroll:e,draggable:t,destination:r,insideDestination:o,last:n,viewport:i,afterCritical:a})=>{const s=r.axis,l=Bo(r.axis,t.displaceBy),c=l.value,u=e[s.start],d=e[s.end],m=ba(t,o).find(g=>{const v=g.descriptor.id,y=g.page.borderBox.center[s.line],S=Un(v,a),w=Vm({displaced:n,id:v});return S?w?d<=y:u<y-c:w?d<=y+c:u<y})||null,h=FE({draggable:t,closest:m,inHomeList:Kr(t,r)});return Wi({draggable:t,insideDestination:o,destination:r,viewport:i,last:n,displacedBy:l,index:h})};const UE=4;var BE=({draggable:e,pageBorderBoxWithDroppableScroll:t,previousImpact:r,destination:o,insideDestination:n,afterCritical:i})=>{if(!o.isCombineEnabled)return null;const a=o.axis,s=Bo(o.axis,e.displaceBy),l=s.value,c=t[a.start],u=t[a.end],p=ba(e,n).find(h=>{const g=h.descriptor.id,v=h.page.borderBox,S=v[a.size]/UE,w=Un(g,i),x=Vm({displaced:r.displaced,id:g});return w?x?u>v[a.start]+S&&u<v[a.end]-S:c>v[a.start]-l+S&&c<v[a.end]-l-S:x?u>v[a.start]+l+S&&u<v[a.end]+l-S:c>v[a.start]+S&&c<v[a.end]-S});return p?{displacedBy:s,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:p.descriptor.id,droppableId:o.descriptor.id}}}:null},Wm=({pageOffset:e,draggable:t,draggables:r,droppables:o,previousImpact:n,viewport:i,afterCritical:a})=>{const s=Bm(t.page.borderBox,e),l=ME({pageBorderBox:s,draggable:t,droppables:o});if(!l)return nE;const c=o[l],u=Hr(c.descriptor.id,r),d=NE(c,s);return BE({pageBorderBoxWithDroppableScroll:d,draggable:t,previousImpact:n,destination:c,insideDestination:u,afterCritical:a})||LE({pageBorderBoxWithDroppableScroll:d,draggable:t,destination:c,insideDestination:u,last:n.displaced,viewport:i,afterCritical:a})},jl=(e,t)=>({...e,[t.descriptor.id]:t});const VE=({previousImpact:e,impact:t,droppables:r})=>{const o=Ot(e),n=Ot(t);if(!o||o===n)return r;const i=r[o];if(!i.subject.withPlaceholder)return r;const a=jE(i);return jl(r,a)};var WE=({draggable:e,draggables:t,droppables:r,previousImpact:o,impact:n})=>{const i=VE({previousImpact:o,impact:n,droppables:r}),a=Ot(n);if(!a)return i;const s=r[a];if(Kr(e,s)||s.subject.withPlaceholder)return i;const l=Lm(s,e,t);return jl(i,l)},xo=({state:e,clientSelection:t,dimensions:r,viewport:o,impact:n,scrollJumpRequest:i})=>{const a=o||e.viewport,s=r||e.dimensions,l=t||e.current.client.selection,c=jt(l,e.initial.client.selection),u={offset:c,selection:l,borderBoxCenter:ht(e.initial.client.borderBoxCenter,c)},d={selection:ht(u.selection,a.scroll.current),borderBoxCenter:ht(u.borderBoxCenter,a.scroll.current),offset:ht(u.offset,a.scroll.diff.value)},p={client:u,page:d};if(e.phase==="COLLECTING")return{...e,dimensions:s,viewport:a,current:p};const m=s.draggables[e.critical.draggable.id],h=n||Wm({pageOffset:d.offset,draggable:m,draggables:s.draggables,droppables:s.droppables,previousImpact:e.impact,viewport:a,afterCritical:e.afterCritical}),g=WE({draggable:m,impact:h,previousImpact:e.impact,draggables:s.draggables,droppables:s.droppables});return{...e,current:p,dimensions:{draggables:s.draggables,droppables:g},impact:h,viewport:a,scrollJumpRequest:i||null,forceShouldAnimate:i?!1:null}};function ZE(e,t){return e.map(r=>t[r])}var Zm=({impact:e,viewport:t,draggables:r,destination:o,forceShouldAnimate:n})=>{const i=e.displaced,a=ZE(i.all,r),s=jo({afterDragging:a,destination:o,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:n,last:i});return{...e,displaced:s}},Gm=({impact:e,draggable:t,droppable:r,draggables:o,viewport:n,afterCritical:i})=>{const a=ya({impact:e,draggable:t,draggables:o,droppable:r,afterCritical:i});return Pl({pageBorderBoxCenter:a,draggable:t,viewport:n})},Hm=({state:e,dimensions:t,viewport:r})=>{e.movementMode!=="SNAP"&&K();const o=e.impact,n=r||e.viewport,i=t||e.dimensions,{draggables:a,droppables:s}=i,l=a[e.critical.draggable.id],c=Ot(o);c||K();const u=s[c],d=Zm({impact:o,viewport:n,destination:u,draggables:a}),p=Gm({impact:d,draggable:l,droppable:u,draggables:a,viewport:n,afterCritical:e.afterCritical});return xo({impact:d,clientSelection:p,state:e,dimensions:i,viewport:n})},GE=e=>({index:e.index,droppableId:e.droppableId}),Km=({draggable:e,home:t,draggables:r,viewport:o})=>{const n=Bo(t.axis,e.displaceBy),i=Hr(t.descriptor.id,r),a=i.indexOf(e);a===-1&&K();const s=i.slice(a+1),l=s.reduce((p,m)=>(p[m.descriptor.id]=!0,p),{}),c={inVirtualList:t.descriptor.mode==="virtual",displacedBy:n,effected:l};return{impact:{displaced:jo({afterDragging:s,destination:t,displacedBy:n,last:null,viewport:o.frame,forceShouldAnimate:!1}),displacedBy:n,at:{type:"REORDER",destination:GE(e.descriptor)}},afterCritical:c}},HE=(e,t)=>({draggables:e.draggables,droppables:jl(e.droppables,t)}),KE=({draggable:e,offset:t,initialWindowScroll:r})=>{const o=Li(e.client,t),n=Ui(o,r);return{...e,placeholder:{...e.placeholder,client:o},client:o,page:n}},qE=e=>{const t=e.frame;return t||K(),t},JE=({additions:e,updatedDroppables:t,viewport:r})=>{const o=r.scroll.diff.value;return e.map(n=>{const i=n.descriptor.droppableId,a=t[i],l=qE(a).scroll.diff.value,c=ht(o,l);return KE({draggable:n,offset:c,initialWindowScroll:r.scroll.initial})})},XE=({state:e,published:t})=>{const r=t.modified.map(y=>{const S=e.dimensions.droppables[y.droppableId];return Il(S,y.scroll)}),o={...e.dimensions.droppables,...jm(r)},n=Om(JE({additions:t.additions,updatedDroppables:o,viewport:e.viewport})),i={...e.dimensions.draggables,...n};t.removals.forEach(y=>{delete i[y]});const a={droppables:o,draggables:i},s=Ot(e.impact),l=s?a.droppables[s]:null,c=a.draggables[e.critical.draggable.id],u=a.droppables[e.critical.droppable.id],{impact:d,afterCritical:p}=Km({draggable:c,home:u,draggables:i,viewport:e.viewport}),m=l&&l.isCombineEnabled?e.impact:d,h=Wm({pageOffset:e.current.page.offset,draggable:a.draggables[e.critical.draggable.id],draggables:a.draggables,droppables:a.droppables,previousImpact:m,viewport:e.viewport,afterCritical:p}),g={...e,phase:"DRAGGING",impact:h,onLiftImpact:d,dimensions:a,afterCritical:p,forceShouldAnimate:!1};return e.phase==="COLLECTING"?g:{...g,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}};const Os=e=>e.movementMode==="SNAP",es=(e,t,r)=>{const o=HE(e.dimensions,t);return!Os(e)||r?xo({state:e,dimensions:o}):Hm({state:e,dimensions:o})};function ts(e){return e.isDragging&&e.movementMode==="SNAP"?{...e,scrollJumpRequest:null}:e}const xp={phase:"IDLE",completed:null,shouldFlush:!1};var YE=(e=xp,t)=>{if(t.type==="FLUSH")return{...xp,shouldFlush:!0};if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&K();const{critical:r,clientSelection:o,viewport:n,dimensions:i,movementMode:a}=t.payload,s=i.draggables[r.draggable.id],l=i.droppables[r.droppable.id],c={selection:o,borderBoxCenter:s.client.borderBox.center,offset:mt},u={client:c,page:{selection:ht(c.selection,n.scroll.initial),borderBoxCenter:ht(c.selection,n.scroll.initial),offset:ht(c.selection,n.scroll.diff.value)}},d=ga(i.droppables).every(g=>!g.isFixedOnPage),{impact:p,afterCritical:m}=Km({draggable:s,home:l,draggables:i.draggables,viewport:n});return{phase:"DRAGGING",isDragging:!0,critical:r,movementMode:a,dimensions:i,initial:u,current:u,isWindowScrollAllowed:d,impact:p,afterCritical:m,onLiftImpact:p,viewport:n,scrollJumpRequest:null,forceShouldAnimate:null}}if(t.type==="COLLECTION_STARTING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"?e:(e.phase!=="DRAGGING"&&K(),{...e,phase:"COLLECTING"});if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||K(),XE({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;Xn(e)||K();const{client:r}=t.payload;return Fn(r,e.current.client.selection)?e:xo({state:e,clientSelection:r,impact:Os(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return ts(e);Xn(e)||K();const{id:r,newScroll:o}=t.payload,n=e.dimensions.droppables[r];if(!n)return e;const i=Il(n,o);return es(e,i,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;Xn(e)||K();const{id:r,isEnabled:o}=t.payload,n=e.dimensions.droppables[r];n||K(),n.isEnabled===o&&K();const i={...n,isEnabled:o};return es(e,i,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;Xn(e)||K();const{id:r,isCombineEnabled:o}=t.payload,n=e.dimensions.droppables[r];n||K(),n.isCombineEnabled===o&&K();const i={...n,isCombineEnabled:o};return es(e,i,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;Xn(e)||K(),e.isWindowScrollAllowed||K();const r=t.payload.newScroll;if(Fn(e.viewport.scroll.current,r))return ts(e);const o=Mm(e.viewport,r);return Os(e)?Hm({state:e,viewport:o}):xo({state:e,viewport:o})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!Xn(e))return e;const r=t.payload.maxScroll;if(Fn(r,e.viewport.scroll.max))return e;const o={...e.viewport,scroll:{...e.viewport.scroll,max:r}};return{...e,viewport:o}}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&K();const r=TE({state:e,type:t.type});return r?xo({state:e,impact:r.impact,clientSelection:r.clientSelection,scrollJumpRequest:r.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){const r=t.payload.reason;return e.phase!=="COLLECTING"&&K(),{...e,phase:"DROP_PENDING",isWaiting:!0,reason:r}}if(t.type==="DROP_ANIMATE"){const{completed:r,dropDuration:o,newHomeClientOffset:n}=t.payload;return e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||K(),{phase:"DROP_ANIMATING",completed:r,dropDuration:o,newHomeClientOffset:n,dimensions:e.dimensions}}if(t.type==="DROP_COMPLETE"){const{completed:r}=t.payload;return{phase:"IDLE",completed:r,shouldFlush:!1}}return e};function qe(e,t){return e instanceof Object&&"type"in e&&e.type===t}const QE=e=>({type:"BEFORE_INITIAL_CAPTURE",payload:e}),eP=e=>({type:"LIFT",payload:e}),tP=e=>({type:"INITIAL_PUBLISH",payload:e}),nP=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),rP=()=>({type:"COLLECTION_STARTING",payload:null}),oP=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),iP=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),aP=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),qm=e=>({type:"MOVE",payload:e}),sP=e=>({type:"MOVE_BY_WINDOW_SCROLL",payload:e}),lP=e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}),cP=()=>({type:"MOVE_UP",payload:null}),uP=()=>({type:"MOVE_DOWN",payload:null}),dP=()=>({type:"MOVE_RIGHT",payload:null}),pP=()=>({type:"MOVE_LEFT",payload:null}),Ol=()=>({type:"FLUSH",payload:null}),fP=e=>({type:"DROP_ANIMATE",payload:e}),Rl=e=>({type:"DROP_COMPLETE",payload:e}),Jm=e=>({type:"DROP",payload:e}),mP=e=>({type:"DROP_PENDING",payload:e}),Xm=()=>({type:"DROP_ANIMATION_FINISHED",payload:null});var hP=e=>({getState:t,dispatch:r})=>o=>n=>{if(!qe(n,"LIFT")){o(n);return}const{id:i,clientSelection:a,movementMode:s}=n.payload,l=t();l.phase==="DROP_ANIMATING"&&r(Rl({completed:l.completed})),t().phase!=="IDLE"&&K(),r(Ol()),r(QE({draggableId:i,movementMode:s}));const u={draggableId:i,scrollOptions:{shouldPublishImmediately:s==="SNAP"}},{critical:d,dimensions:p,viewport:m}=e.startPublishing(u);r(tP({critical:d,dimensions:p,clientSelection:a,movementMode:s,viewport:m}))},gP=e=>()=>t=>r=>{qe(r,"INITIAL_PUBLISH")&&e.dragging(),qe(r,"DROP_ANIMATE")&&e.dropping(r.payload.completed.result.reason),(qe(r,"FLUSH")||qe(r,"DROP_COMPLETE"))&&e.resting(),t(r)};const Dl={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},Oo={opacity:{drop:0,combining:.7},scale:{drop:.75}},Ym={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Kn=`${Ym.outOfTheWay}s ${Dl.outOfTheWay}`,So={fluid:`opacity ${Kn}`,snap:`transform ${Kn}, opacity ${Kn}`,drop:e=>{const t=`${e}s ${Dl.drop}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${Kn}`,placeholder:`height ${Kn}, width ${Kn}, margin ${Kn}`},Sp=e=>Fn(e,mt)?void 0:`translate(${e.x}px, ${e.y}px)`,Rs={moveTo:Sp,drop:(e,t)=>{const r=Sp(e);if(r)return t?`${r} scale(${Oo.scale.drop})`:r}},{minDropTime:Ds,maxDropTime:Qm}=Ym,vP=Qm-Ds,wp=1500,bP=.6;var yP=({current:e,destination:t,reason:r})=>{const o=Eo(e,t);if(o<=0)return Ds;if(o>=wp)return Qm;const n=o/wp,i=Ds+vP*n,a=r==="CANCEL"?i*bP:i;return Number(a.toFixed(2))},xP=({impact:e,draggable:t,dimensions:r,viewport:o,afterCritical:n})=>{const{draggables:i,droppables:a}=r,s=Ot(e),l=s?a[s]:null,c=a[t.descriptor.droppableId],u=Gm({impact:e,draggable:t,draggables:i,afterCritical:n,droppable:l||c,viewport:o});return jt(u,t.client.borderBox.center)},SP=({draggables:e,reason:t,lastImpact:r,home:o,viewport:n,onLiftImpact:i})=>!r.at||t!=="DROP"?{impact:Zm({draggables:e,impact:i,destination:o,viewport:n,forceShouldAnimate:!0}),didDropInsideDroppable:!1}:r.at.type==="REORDER"?{impact:r,didDropInsideDroppable:!0}:{impact:{...r,displaced:Po},didDropInsideDroppable:!0};const wP=({getState:e,dispatch:t})=>r=>o=>{if(!qe(o,"DROP")){r(o);return}const n=e(),i=o.payload.reason;if(n.phase==="COLLECTING"){t(mP({reason:i}));return}if(n.phase==="IDLE")return;n.phase==="DROP_PENDING"&&n.isWaiting&&K(),n.phase==="DRAGGING"||n.phase==="DROP_PENDING"||K();const s=n.critical,l=n.dimensions,c=l.draggables[n.critical.draggable.id],{impact:u,didDropInsideDroppable:d}=SP({reason:i,lastImpact:n.impact,afterCritical:n.afterCritical,onLiftImpact:n.onLiftImpact,home:n.dimensions.droppables[n.critical.droppable.id],viewport:n.viewport,draggables:n.dimensions.draggables}),p=d?kl(u):null,m=d?va(u):null,h={index:s.draggable.index,droppableId:s.droppable.id},g={draggableId:c.descriptor.id,type:c.descriptor.type,source:h,reason:i,mode:n.movementMode,destination:p,combine:m},v=xP({impact:u,draggable:c,dimensions:l,viewport:n.viewport,afterCritical:n.afterCritical}),y={critical:n.critical,afterCritical:n.afterCritical,result:g,impact:u};if(!(!Fn(n.current.client.offset,v)||!!g.combine)){t(Rl({completed:y}));return}const w=yP({current:n.current.client.offset,destination:v,reason:i});t(fP({newHomeClientOffset:v,dropDuration:w,completed:y}))};var eh=()=>({x:window.pageXOffset,y:window.pageYOffset});function $P(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}function IP({onWindowScroll:e}){function t(){e(eh())}const r=Co(t),o=$P(r);let n=Nn;function i(){return n!==Nn}function a(){i()&&K(),n=Ft(window,[o])}function s(){i()||K(),r.cancel(),n(),n=Nn}return{start:a,stop:s,isActive:i}}const kP=e=>qe(e,"DROP_COMPLETE")||qe(e,"DROP_ANIMATE")||qe(e,"FLUSH"),_P=e=>{const t=IP({onWindowScroll:r=>{e.dispatch(sP({newScroll:r}))}});return r=>o=>{!t.isActive()&&qe(o,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&kP(o)&&t.stop(),r(o)}};var CP=e=>{let t=!1,r=!1;const o=setTimeout(()=>{r=!0}),n=i=>{t||r||(t=!0,e(i),clearTimeout(o))};return n.wasCalled=()=>t,n},EP=()=>{const e=[],t=n=>{const i=e.findIndex(s=>s.timerId===n);i===-1&&K();const[a]=e.splice(i,1);a.callback()};return{add:n=>{const i=setTimeout(()=>t(i)),a={timerId:i,callback:n};e.push(a)},flush:()=>{if(!e.length)return;const n=[...e];e.length=0,n.forEach(i=>{clearTimeout(i.timerId),i.callback()})}}};const PP=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.droppableId===t.droppableId&&e.index===t.index,jP=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.draggableId===t.draggableId&&e.droppableId===t.droppableId,OP=(e,t)=>{if(e===t)return!0;const r=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,o=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return r&&o},no=(e,t)=>{t()},ui=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function ns(e,t,r,o){if(!e){r(o(t));return}const n=CP(r);e(t,{announce:n}),n.wasCalled()||r(o(t))}var RP=(e,t)=>{const r=EP();let o=null;const n=(d,p)=>{o&&K(),no("onBeforeCapture",()=>{const m=e().onBeforeCapture;m&&m({draggableId:d,mode:p})})},i=(d,p)=>{o&&K(),no("onBeforeDragStart",()=>{const m=e().onBeforeDragStart;m&&m(ui(d,p))})},a=(d,p)=>{o&&K();const m=ui(d,p);o={mode:p,lastCritical:d,lastLocation:m.source,lastCombine:null},r.add(()=>{no("onDragStart",()=>ns(e().onDragStart,m,t,Ci.onDragStart))})},s=(d,p)=>{const m=kl(p),h=va(p);o||K();const g=!OP(d,o.lastCritical);g&&(o.lastCritical=d);const v=!PP(o.lastLocation,m);v&&(o.lastLocation=m);const y=!jP(o.lastCombine,h);if(y&&(o.lastCombine=h),!g&&!v&&!y)return;const S={...ui(d,o.mode),combine:h,destination:m};r.add(()=>{no("onDragUpdate",()=>ns(e().onDragUpdate,S,t,Ci.onDragUpdate))})},l=()=>{o||K(),r.flush()},c=d=>{o||K(),o=null,no("onDragEnd",()=>ns(e().onDragEnd,d,t,Ci.onDragEnd))};return{beforeCapture:n,beforeStart:i,start:a,update:s,flush:l,drop:c,abort:()=>{if(!o)return;const d={...ui(o.lastCritical,o.mode),combine:null,destination:null,reason:"CANCEL"};c(d)}}},DP=(e,t)=>{const r=RP(e,t);return o=>n=>i=>{if(qe(i,"BEFORE_INITIAL_CAPTURE")){r.beforeCapture(i.payload.draggableId,i.payload.movementMode);return}if(qe(i,"INITIAL_PUBLISH")){const s=i.payload.critical;r.beforeStart(s,i.payload.movementMode),n(i),r.start(s,i.payload.movementMode);return}if(qe(i,"DROP_COMPLETE")){const s=i.payload.completed.result;r.flush(),n(i),r.drop(s);return}if(n(i),qe(i,"FLUSH")){r.abort();return}const a=o.getState();a.phase==="DRAGGING"&&r.update(a.critical,a.impact)}};const TP=e=>t=>r=>{if(!qe(r,"DROP_ANIMATION_FINISHED")){t(r);return}const o=e.getState();o.phase!=="DROP_ANIMATING"&&K(),e.dispatch(Rl({completed:o.completed}))},zP=e=>{let t=null,r=null;function o(){r&&(cancelAnimationFrame(r),r=null),t&&(t(),t=null)}return n=>i=>{if((qe(i,"FLUSH")||qe(i,"DROP_COMPLETE")||qe(i,"DROP_ANIMATION_FINISHED"))&&o(),n(i),!qe(i,"DROP_ANIMATE"))return;const a={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){e.getState().phase==="DROP_ANIMATING"&&e.dispatch(Xm())}};r=requestAnimationFrame(()=>{r=null,t=Ft(window,[a])})}};var AP=e=>()=>t=>r=>{(qe(r,"DROP_COMPLETE")||qe(r,"FLUSH")||qe(r,"DROP_ANIMATE"))&&e.stopPublishing(),t(r)},MP=e=>{let t=!1;return()=>r=>o=>{if(qe(o,"INITIAL_PUBLISH")){t=!0,e.tryRecordFocus(o.payload.critical.draggable.id),r(o),e.tryRestoreFocusRecorded();return}if(r(o),!!t){if(qe(o,"FLUSH")){t=!1,e.tryRestoreFocusRecorded();return}if(qe(o,"DROP_COMPLETE")){t=!1;const n=o.payload.completed.result;n.combine&&e.tryShiftRecord(n.draggableId,n.combine.draggableId),e.tryRestoreFocusRecorded()}}}};const NP=e=>qe(e,"DROP_COMPLETE")||qe(e,"DROP_ANIMATE")||qe(e,"FLUSH");var FP=e=>t=>r=>o=>{if(NP(o)){e.stop(),r(o);return}if(qe(o,"INITIAL_PUBLISH")){r(o);const n=t.getState();n.phase!=="DRAGGING"&&K(),e.start(n);return}r(o),e.scroll(t.getState())};const LP=e=>t=>r=>{if(t(r),!qe(r,"PUBLISH_WHILE_DRAGGING"))return;const o=e.getState();o.phase==="DROP_PENDING"&&(o.isWaiting||e.dispatch(Jm({reason:o.reason})))},UP=gm;var BP=({dimensionMarshal:e,focusMarshal:t,styleMarshal:r,getResponders:o,announce:n,autoScroller:i})=>hm(YE,UP(U_(gP(r),AP(e),hP(e),wP,TP,zP,LP,FP(i),_P,MP(t),DP(o,n))));const rs=()=>({additions:{},removals:{},modified:{}});function VP({registry:e,callbacks:t}){let r=rs(),o=null;const n=()=>{o||(t.collectionStarting(),o=requestAnimationFrame(()=>{o=null;const{additions:l,removals:c,modified:u}=r,d=Object.keys(l).map(h=>e.draggable.getById(h).getDimension(mt)).sort((h,g)=>h.descriptor.index-g.descriptor.index),p=Object.keys(u).map(h=>{const v=e.droppable.getById(h).callbacks.getScrollWhileDragging();return{droppableId:h,scroll:v}}),m={additions:d,removals:Object.keys(c),modified:p};r=rs(),t.publish(m)}))};return{add:l=>{const c=l.descriptor.id;r.additions[c]=l,r.modified[l.descriptor.droppableId]=!0,r.removals[c]&&delete r.removals[c],n()},remove:l=>{const c=l.descriptor;r.removals[c.id]=!0,r.modified[c.droppableId]=!0,r.additions[c.id]&&delete r.additions[c.id],n()},stop:()=>{o&&(cancelAnimationFrame(o),o=null,r=rs())}}}var th=({scrollHeight:e,scrollWidth:t,height:r,width:o})=>{const n=jt({x:t,y:e},{x:o,y:r});return{x:Math.max(0,n.x),y:Math.max(0,n.y)}},nh=()=>{const e=document.documentElement;return e||K(),e},rh=()=>{const e=nh();return th({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},WP=()=>{const e=eh(),t=rh(),r=e.y,o=e.x,n=nh(),i=n.clientWidth,a=n.clientHeight,s=o+i,l=r+a;return{frame:qt({top:r,left:o,right:s,bottom:l}),scroll:{initial:e,current:e,max:t,diff:{value:mt,displacement:mt}}}},ZP=({critical:e,scrollOptions:t,registry:r})=>{const o=WP(),n=o.scroll.current,i=e.droppable,a=r.droppable.getAllByType(i.type).map(u=>u.callbacks.getDimensionAndWatchScroll(n,t)),s=r.draggable.getAllByType(e.draggable.type).map(u=>u.getDimension(n));return{dimensions:{draggables:Om(s),droppables:jm(a)},critical:e,viewport:o}};function $p(e,t,r){return!(r.descriptor.id===t.id||r.descriptor.type!==t.type||e.droppable.getById(r.descriptor.droppableId).descriptor.mode!=="virtual")}var GP=(e,t)=>{let r=null;const o=VP({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),n=(p,m)=>{e.droppable.exists(p)||K(),r&&t.updateDroppableIsEnabled({id:p,isEnabled:m})},i=(p,m)=>{r&&(e.droppable.exists(p)||K(),t.updateDroppableIsCombineEnabled({id:p,isCombineEnabled:m}))},a=(p,m)=>{r&&(e.droppable.exists(p)||K(),t.updateDroppableScroll({id:p,newScroll:m}))},s=(p,m)=>{r&&e.droppable.getById(p).callbacks.scroll(m)},l=()=>{if(!r)return;o.stop();const p=r.critical.droppable;e.droppable.getAllByType(p.type).forEach(m=>m.callbacks.dragStopped()),r.unsubscribe(),r=null},c=p=>{r||K();const m=r.critical.draggable;p.type==="ADDITION"&&$p(e,m,p.value)&&o.add(p.value),p.type==="REMOVAL"&&$p(e,m,p.value)&&o.remove(p.value)};return{updateDroppableIsEnabled:n,updateDroppableIsCombineEnabled:i,scrollDroppable:s,updateDroppableScroll:a,startPublishing:p=>{r&&K();const m=e.draggable.getById(p.draggableId),h=e.droppable.getById(m.descriptor.droppableId),g={draggable:m.descriptor,droppable:h.descriptor},v=e.subscribe(c);return r={critical:g,unsubscribe:v},ZP({critical:g,registry:e,scrollOptions:p.scrollOptions})},stopPublishing:l}},oh=(e,t)=>e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP",HP=e=>{window.scrollBy(e.x,e.y)};const KP=ft(e=>ga(e).filter(t=>!(!t.isEnabled||!t.frame))),qP=(e,t)=>KP(t).find(o=>(o.frame||K(),Um(o.frame.pageMarginBox)(e)))||null;var JP=({center:e,destination:t,droppables:r})=>{if(t){const n=r[t];return n.frame?n:null}return qP(e,r)};const Ro={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var XP=(e,t,r=()=>Ro)=>{const o=r(),n=e[t.size]*o.startFromPercentage,i=e[t.size]*o.maxScrollAtPercentage;return{startScrollingFrom:n,maxScrollValueAt:i}},ih=({startOfRange:e,endOfRange:t,current:r})=>{const o=t-e;return o===0?0:(r-e)/o},Tl=1,YP=(e,t,r=()=>Ro)=>{const o=r();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return o.maxPixelScroll;if(e===t.startScrollingFrom)return Tl;const i=1-ih({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),a=o.maxPixelScroll*o.ease(i);return Math.ceil(a)},QP=(e,t,r)=>{const o=r(),n=o.durationDampening.accelerateAt,i=o.durationDampening.stopDampeningAt,a=t,s=i,c=Date.now()-a;if(c>=i)return e;if(c<n)return Tl;const u=ih({startOfRange:n,endOfRange:s,current:c}),d=e*o.ease(u);return Math.ceil(d)},Ip=({distanceToEdge:e,thresholds:t,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:n})=>{const i=YP(e,t,n);return i===0?0:o?Math.max(QP(i,r,n),Tl):i},kp=({container:e,distanceToEdges:t,dragStartTime:r,axis:o,shouldUseTimeDampening:n,getAutoScrollerOptions:i})=>{const a=XP(e,o,i);return t[o.end]<t[o.start]?Ip({distanceToEdge:t[o.end],thresholds:a,dragStartTime:r,shouldUseTimeDampening:n,getAutoScrollerOptions:i}):-1*Ip({distanceToEdge:t[o.start],thresholds:a,dragStartTime:r,shouldUseTimeDampening:n,getAutoScrollerOptions:i})},ej=({container:e,subject:t,proposedScroll:r})=>{const o=t.height>e.height,n=t.width>e.width;return!n&&!o?r:n&&o?null:{x:n?0:r.x,y:o?0:r.y}};const tj=Pm(e=>e===0?0:e);var ah=({dragStartTime:e,container:t,subject:r,center:o,shouldUseTimeDampening:n,getAutoScrollerOptions:i})=>{const a={top:o.y-t.top,right:t.right-o.x,bottom:t.bottom-o.y,left:o.x-t.left},s=kp({container:t,distanceToEdges:a,dragStartTime:e,axis:_l,shouldUseTimeDampening:n,getAutoScrollerOptions:i}),l=kp({container:t,distanceToEdges:a,dragStartTime:e,axis:Tm,shouldUseTimeDampening:n,getAutoScrollerOptions:i}),c=tj({x:l,y:s});if(Fn(c,mt))return null;const u=ej({container:t,subject:r,proposedScroll:c});return u?Fn(u,mt)?null:u:null};const nj=Pm(e=>e===0?0:e>0?1:-1),zl=(()=>{const e=(t,r)=>t<0?t:t>r?t-r:0;return({current:t,max:r,change:o})=>{const n=ht(t,o),i={x:e(n.x,r.x),y:e(n.y,r.y)};return Fn(i,mt)?null:i}})(),sh=({max:e,current:t,change:r})=>{const o={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},n=nj(r),i=zl({max:o,current:t,change:n});return!i||n.x!==0&&i.x===0||n.y!==0&&i.y===0},Al=(e,t)=>sh({current:e.scroll.current,max:e.scroll.max,change:t}),rj=(e,t)=>{if(!Al(e,t))return null;const r=e.scroll.max,o=e.scroll.current;return zl({current:o,max:r,change:t})},Ml=(e,t)=>{const r=e.frame;return r?sh({current:r.scroll.current,max:r.scroll.max,change:t}):!1},oj=(e,t)=>{const r=e.frame;return!r||!Ml(e,t)?null:zl({current:r.scroll.current,max:r.scroll.max,change:t})};var ij=({viewport:e,subject:t,center:r,dragStartTime:o,shouldUseTimeDampening:n,getAutoScrollerOptions:i})=>{const a=ah({dragStartTime:o,container:e.frame,subject:t,center:r,shouldUseTimeDampening:n,getAutoScrollerOptions:i});return a&&Al(e,a)?a:null},aj=({droppable:e,subject:t,center:r,dragStartTime:o,shouldUseTimeDampening:n,getAutoScrollerOptions:i})=>{const a=e.frame;if(!a)return null;const s=ah({dragStartTime:o,container:a.pageMarginBox,subject:t,center:r,shouldUseTimeDampening:n,getAutoScrollerOptions:i});return s&&Ml(e,s)?s:null},_p=({state:e,dragStartTime:t,shouldUseTimeDampening:r,scrollWindow:o,scrollDroppable:n,getAutoScrollerOptions:i})=>{const a=e.current.page.borderBoxCenter,l=e.dimensions.draggables[e.critical.draggable.id].page.marginBox;if(e.isWindowScrollAllowed){const d=e.viewport,p=ij({dragStartTime:t,viewport:d,subject:l,center:a,shouldUseTimeDampening:r,getAutoScrollerOptions:i});if(p){o(p);return}}const c=JP({center:a,destination:Ot(e.impact),droppables:e.dimensions.droppables});if(!c)return;const u=aj({dragStartTime:t,droppable:c,subject:l,center:a,shouldUseTimeDampening:r,getAutoScrollerOptions:i});u&&n(c.descriptor.id,u)},sj=({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:r=()=>Ro})=>{const o=Co(e),n=Co(t);let i=null;const a=c=>{i||K();const{shouldUseTimeDampening:u,dragStartTime:d}=i;_p({state:c,scrollWindow:o,scrollDroppable:n,dragStartTime:d,shouldUseTimeDampening:u,getAutoScrollerOptions:r})};return{start:c=>{i&&K();const u=Date.now();let d=!1;const p=()=>{d=!0};_p({state:c,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:p,scrollDroppable:p,getAutoScrollerOptions:r}),i={dragStartTime:u,shouldUseTimeDampening:d},d&&a(c)},stop:()=>{i&&(o.cancel(),n.cancel(),i=null)},scroll:a}},lj=({move:e,scrollDroppable:t,scrollWindow:r})=>{const o=(s,l)=>{const c=ht(s.current.client.selection,l);e({client:c})},n=(s,l)=>{if(!Ml(s,l))return l;const c=oj(s,l);if(!c)return t(s.descriptor.id,l),null;const u=jt(l,c);return t(s.descriptor.id,u),jt(l,u)},i=(s,l,c)=>{if(!s||!Al(l,c))return c;const u=rj(l,c);if(!u)return r(c),null;const d=jt(c,u);return r(d),jt(c,d)};return s=>{const l=s.scrollJumpRequest;if(!l)return;const c=Ot(s.impact);c||K();const u=n(s.dimensions.droppables[c],l);if(!u)return;const d=s.viewport,p=i(s.isWindowScrollAllowed,d,u);p&&o(s,p)}},cj=({scrollDroppable:e,scrollWindow:t,move:r,getAutoScrollerOptions:o})=>{const n=sj({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:o}),i=lj({move:r,scrollWindow:t,scrollDroppable:e});return{scroll:l=>{if(!(o().disabled||l.phase!=="DRAGGING")){if(l.movementMode==="FLUID"){n.scroll(l);return}l.scrollJumpRequest&&i(l)}},start:n.start,stop:n.stop}};const Mr="data-rfd",Nr=(()=>{const e=`${Mr}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),Ts=(()=>{const e=`${Mr}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),uj=(()=>{const e=`${Mr}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),Cp={contextId:`${Mr}-scroll-container-context-id`},dj=e=>t=>`[${t}="${e}"]`,ro=(e,t)=>e.map(r=>{const o=r.styles[t];return o?`${r.selector} { ${o} }`:""}).join(" "),pj="pointer-events: none;";var fj=e=>{const t=dj(e),r=(()=>{const s=`
|
|
144
|
+
cursor: -webkit-grab;
|
|
145
|
+
cursor: grab;
|
|
146
|
+
`;return{selector:t(Nr.contextId),styles:{always:`
|
|
147
|
+
-webkit-touch-callout: none;
|
|
148
|
+
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
|
149
|
+
touch-action: manipulation;
|
|
150
|
+
`,resting:s,dragging:pj,dropAnimating:s}}})(),o=(()=>{const s=`
|
|
151
|
+
transition: ${So.outOfTheWay};
|
|
152
|
+
`;return{selector:t(Ts.contextId),styles:{dragging:s,dropAnimating:s,userCancel:s}}})(),n={selector:t(uj.contextId),styles:{always:"overflow-anchor: none;"}},a=[o,r,n,{selector:"body",styles:{dragging:`
|
|
153
|
+
cursor: grabbing;
|
|
154
|
+
cursor: -webkit-grabbing;
|
|
155
|
+
user-select: none;
|
|
156
|
+
-webkit-user-select: none;
|
|
157
|
+
-moz-user-select: none;
|
|
158
|
+
-ms-user-select: none;
|
|
159
|
+
overflow-anchor: none;
|
|
160
|
+
`}}];return{always:ro(a,"always"),resting:ro(a,"resting"),dragging:ro(a,"dragging"),dropAnimating:ro(a,"dropAnimating"),userCancel:ro(a,"userCancel")}};const Rt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?b.useLayoutEffect:b.useEffect,os=()=>{const e=document.querySelector("head");return e||K(),e},Ep=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function mj(e,t){const r=Ge(()=>fj(e),[e]),o=b.useRef(null),n=b.useRef(null),i=ue(ft(d=>{const p=n.current;p||K(),p.textContent=d}),[]),a=ue(d=>{const p=o.current;p||K(),p.textContent=d},[]);Rt(()=>{!o.current&&!n.current||K();const d=Ep(t),p=Ep(t);return o.current=d,n.current=p,d.setAttribute(`${Mr}-always`,e),p.setAttribute(`${Mr}-dynamic`,e),os().appendChild(d),os().appendChild(p),a(r.always),i(r.resting),()=>{const m=h=>{const g=h.current;g||K(),os().removeChild(g),h.current=null};m(o),m(n)}},[t,a,i,r.always,r.resting,e]);const s=ue(()=>i(r.dragging),[i,r.dragging]),l=ue(d=>{if(d==="DROP"){i(r.dropAnimating);return}i(r.userCancel)},[i,r.dropAnimating,r.userCancel]),c=ue(()=>{n.current&&i(r.resting)},[i,r.resting]);return Ge(()=>({dragging:s,dropping:l,resting:c}),[s,l,c])}function lh(e,t){return Array.from(e.querySelectorAll(t))}var ch=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function xa(e){return e instanceof ch(e).HTMLElement}function hj(e,t){const r=`[${Nr.contextId}="${e}"]`,o=lh(document,r);if(!o.length)return null;const n=o.find(i=>i.getAttribute(Nr.draggableId)===t);return!n||!xa(n)?null:n}function gj(e){const t=b.useRef({}),r=b.useRef(null),o=b.useRef(null),n=b.useRef(!1),i=ue(function(p,m){const h={id:p,focus:m};return t.current[p]=h,function(){const v=t.current;v[p]!==h&&delete v[p]}},[]),a=ue(function(p){const m=hj(e,p);m&&m!==document.activeElement&&m.focus()},[e]),s=ue(function(p,m){r.current===p&&(r.current=m)},[]),l=ue(function(){o.current||n.current&&(o.current=requestAnimationFrame(()=>{o.current=null;const p=r.current;p&&a(p)}))},[a]),c=ue(function(p){r.current=null;const m=document.activeElement;m&&m.getAttribute(Nr.draggableId)===p&&(r.current=p)},[]);return Rt(()=>(n.current=!0,function(){n.current=!1;const p=o.current;p&&cancelAnimationFrame(p)}),[]),Ge(()=>({register:i,tryRecordFocus:c,tryRestoreFocusRecorded:l,tryShiftRecord:s}),[i,c,l,s])}function vj(){const e={draggables:{},droppables:{}},t=[];function r(d){return t.push(d),function(){const m=t.indexOf(d);m!==-1&&t.splice(m,1)}}function o(d){t.length&&t.forEach(p=>p(d))}function n(d){return e.draggables[d]||null}function i(d){const p=n(d);return p||K(),p}const a={register:d=>{e.draggables[d.descriptor.id]=d,o({type:"ADDITION",value:d})},update:(d,p)=>{const m=e.draggables[p.descriptor.id];m&&m.uniqueId===d.uniqueId&&(delete e.draggables[p.descriptor.id],e.draggables[d.descriptor.id]=d)},unregister:d=>{const p=d.descriptor.id,m=n(p);m&&d.uniqueId===m.uniqueId&&(delete e.draggables[p],e.droppables[d.descriptor.droppableId]&&o({type:"REMOVAL",value:d}))},getById:i,findById:n,exists:d=>!!n(d),getAllByType:d=>Object.values(e.draggables).filter(p=>p.descriptor.type===d)};function s(d){return e.droppables[d]||null}function l(d){const p=s(d);return p||K(),p}const c={register:d=>{e.droppables[d.descriptor.id]=d},unregister:d=>{const p=s(d.descriptor.id);p&&d.uniqueId===p.uniqueId&&delete e.droppables[d.descriptor.id]},getById:l,findById:s,exists:d=>!!s(d),getAllByType:d=>Object.values(e.droppables).filter(p=>p.descriptor.type===d)};function u(){e.draggables={},e.droppables={},t.length=0}return{draggable:a,droppable:c,subscribe:r,clean:u}}function bj(){const e=Ge(vj,[]);return b.useEffect(()=>function(){e.clean()},[e]),e}var Nl=He.createContext(null),Zi=()=>{const e=document.body;return e||K(),e};const yj={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},xj=e=>`rfd-announcement-${e}`;function Sj(e){const t=Ge(()=>xj(e),[e]),r=b.useRef(null);return b.useEffect(function(){const i=document.createElement("div");return r.current=i,i.id=t,i.setAttribute("aria-live","assertive"),i.setAttribute("aria-atomic","true"),Js(i.style,yj),Zi().appendChild(i),function(){setTimeout(function(){const l=Zi();l.contains(i)&&l.removeChild(i),i===r.current&&(r.current=null)})}},[t]),ue(n=>{const i=r.current;if(i){i.textContent=n;return}},[])}const wj={separator:"::"};function Fl(e,t=wj){const r=He.useId();return Ge(()=>`${e}${t.separator}${r}`,[t.separator,e,r])}function $j({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}function Ij({contextId:e,text:t}){const r=Fl("hidden-text",{separator:"-"}),o=Ge(()=>$j({contextId:e,uniqueId:r}),[r,e]);return b.useEffect(function(){const i=document.createElement("div");return i.id=o,i.textContent=t,i.style.display="none",Zi().appendChild(i),function(){const s=Zi();s.contains(i)&&s.removeChild(i)}},[o,t]),o}var Sa=He.createContext(null);function uh(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),t}function kj(){let e=null;function t(){return!!e}function r(a){return a===e}function o(a){e&&K();const s={abandon:a};return e=s,s}function n(){e||K(),e=null}function i(){e&&(e.abandon(),n())}return{isClaimed:t,isActive:r,claim:o,release:n,tryAbandon:i}}function Do(e){return e.phase==="IDLE"||e.phase==="DROP_ANIMATING"?!1:e.isDragging}const _j=9,Cj=13,Ll=27,dh=32,Ej=33,Pj=34,jj=35,Oj=36,Rj=37,Dj=38,Tj=39,zj=40,Aj={[Cj]:!0,[_j]:!0};var ph=e=>{Aj[e.keyCode]&&e.preventDefault()};const wa=(()=>{const e="visibilitychange";return typeof document>"u"?e:[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(o=>`on${o}`in document)||e})(),fh=0,Pp=5;function Mj(e,t){return Math.abs(t.x-e.x)>=Pp||Math.abs(t.y-e.y)>=Pp}const jp={type:"IDLE"};function Nj({cancel:e,completed:t,getPhase:r,setPhase:o}){return[{eventName:"mousemove",fn:n=>{const{button:i,clientX:a,clientY:s}=n;if(i!==fh)return;const l={x:a,y:s},c=r();if(c.type==="DRAGGING"){n.preventDefault(),c.actions.move(l);return}c.type!=="PENDING"&&K();const u=c.point;if(!Mj(u,l))return;n.preventDefault();const d=c.actions.fluidLift(l);o({type:"DRAGGING",actions:d})}},{eventName:"mouseup",fn:n=>{const i=r();if(i.type!=="DRAGGING"){e();return}n.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"mousedown",fn:n=>{r().type==="DRAGGING"&&n.preventDefault(),e()}},{eventName:"keydown",fn:n=>{if(r().type==="PENDING"){e();return}if(n.keyCode===Ll){n.preventDefault(),e();return}ph(n)}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{r().type==="PENDING"&&e()}},{eventName:"webkitmouseforcedown",fn:n=>{const i=r();if(i.type==="IDLE"&&K(),i.actions.shouldRespectForcePress()){e();return}n.preventDefault()}},{eventName:wa,fn:e}]}function Fj(e){const t=b.useRef(jp),r=b.useRef(Nn),o=Ge(()=>({eventName:"mousedown",fn:function(d){if(d.defaultPrevented||d.button!==fh||d.ctrlKey||d.metaKey||d.shiftKey||d.altKey)return;const p=e.findClosestDraggableId(d);if(!p)return;const m=e.tryGetLock(p,a,{sourceEvent:d});if(!m)return;d.preventDefault();const h={x:d.clientX,y:d.clientY};r.current(),c(m,h)}}),[e]),n=Ge(()=>({eventName:"webkitmouseforcewillbegin",fn:u=>{if(u.defaultPrevented)return;const d=e.findClosestDraggableId(u);if(!d)return;const p=e.findOptionsForDraggable(d);p&&(p.shouldRespectForcePress||e.canGetLock(d)&&u.preventDefault())}}),[e]),i=ue(function(){const d={passive:!1,capture:!0};r.current=Ft(window,[n,o],d)},[n,o]),a=ue(()=>{t.current.type!=="IDLE"&&(t.current=jp,r.current(),i())},[i]),s=ue(()=>{const u=t.current;a(),u.type==="DRAGGING"&&u.actions.cancel({shouldBlockNextClick:!0}),u.type==="PENDING"&&u.actions.abort()},[a]),l=ue(function(){const d={capture:!0,passive:!1},p=Nj({cancel:s,completed:a,getPhase:()=>t.current,setPhase:m=>{t.current=m}});r.current=Ft(window,p,d)},[s,a]),c=ue(function(d,p){t.current.type!=="IDLE"&&K(),t.current={type:"PENDING",point:p,actions:d},l()},[l]);Rt(function(){return i(),function(){r.current()}},[i])}function Lj(){}const Uj={[Pj]:!0,[Ej]:!0,[Oj]:!0,[jj]:!0};function Bj(e,t){function r(){t(),e.cancel()}function o(){t(),e.drop()}return[{eventName:"keydown",fn:n=>{if(n.keyCode===Ll){n.preventDefault(),r();return}if(n.keyCode===dh){n.preventDefault(),o();return}if(n.keyCode===zj){n.preventDefault(),e.moveDown();return}if(n.keyCode===Dj){n.preventDefault(),e.moveUp();return}if(n.keyCode===Tj){n.preventDefault(),e.moveRight();return}if(n.keyCode===Rj){n.preventDefault(),e.moveLeft();return}if(Uj[n.keyCode]){n.preventDefault();return}ph(n)}},{eventName:"mousedown",fn:r},{eventName:"mouseup",fn:r},{eventName:"click",fn:r},{eventName:"touchstart",fn:r},{eventName:"resize",fn:r},{eventName:"wheel",fn:r,options:{passive:!0}},{eventName:wa,fn:r}]}function Vj(e){const t=b.useRef(Lj),r=Ge(()=>({eventName:"keydown",fn:function(i){if(i.defaultPrevented||i.keyCode!==dh)return;const a=e.findClosestDraggableId(i);if(!a)return;const s=e.tryGetLock(a,u,{sourceEvent:i});if(!s)return;i.preventDefault();let l=!0;const c=s.snapLift();t.current();function u(){l||K(),l=!1,t.current(),o()}t.current=Ft(window,Bj(c,u),{capture:!0,passive:!1})}}),[e]),o=ue(function(){const i={passive:!1,capture:!0};t.current=Ft(window,[r],i)},[r]);Rt(function(){return o(),function(){t.current()}},[o])}const is={type:"IDLE"},Wj=120,Zj=.15;function Gj({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:r=>{r.preventDefault()}},{eventName:"keydown",fn:r=>{if(t().type!=="DRAGGING"){e();return}r.keyCode===Ll&&r.preventDefault(),e()}},{eventName:wa,fn:e}]}function Hj({cancel:e,completed:t,getPhase:r}){return[{eventName:"touchmove",options:{capture:!1},fn:o=>{const n=r();if(n.type!=="DRAGGING"){e();return}n.hasMoved=!0;const{clientX:i,clientY:a}=o.touches[0],s={x:i,y:a};o.preventDefault(),n.actions.move(s)}},{eventName:"touchend",fn:o=>{const n=r();if(n.type!=="DRAGGING"){e();return}o.preventDefault(),n.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"touchcancel",fn:o=>{if(r().type!=="DRAGGING"){e();return}o.preventDefault(),e()}},{eventName:"touchforcechange",fn:o=>{const n=r();n.type==="IDLE"&&K();const i=o.touches[0];if(!i||!(i.force>=Zj))return;const s=n.actions.shouldRespectForcePress();if(n.type==="PENDING"){s&&e();return}if(s){if(n.hasMoved){o.preventDefault();return}e();return}o.preventDefault()}},{eventName:wa,fn:e}]}function Kj(e){const t=b.useRef(is),r=b.useRef(Nn),o=ue(function(){return t.current},[]),n=ue(function(m){t.current=m},[]),i=Ge(()=>({eventName:"touchstart",fn:function(m){if(m.defaultPrevented)return;const h=e.findClosestDraggableId(m);if(!h)return;const g=e.tryGetLock(h,s,{sourceEvent:m});if(!g)return;const v=m.touches[0],{clientX:y,clientY:S}=v,w={x:y,y:S};r.current(),d(g,w)}}),[e]),a=ue(function(){const m={capture:!0,passive:!1};r.current=Ft(window,[i],m)},[i]),s=ue(()=>{const p=t.current;p.type!=="IDLE"&&(p.type==="PENDING"&&clearTimeout(p.longPressTimerId),n(is),r.current(),a())},[a,n]),l=ue(()=>{const p=t.current;s(),p.type==="DRAGGING"&&p.actions.cancel({shouldBlockNextClick:!0}),p.type==="PENDING"&&p.actions.abort()},[s]),c=ue(function(){const m={capture:!0,passive:!1},h={cancel:l,completed:s,getPhase:o},g=Ft(window,Hj(h),m),v=Ft(window,Gj(h),m);r.current=function(){g(),v()}},[l,o,s]),u=ue(function(){const m=o();m.type!=="PENDING"&&K();const h=m.actions.fluidLift(m.point);n({type:"DRAGGING",actions:h,hasMoved:!1})},[o,n]),d=ue(function(m,h){o().type!=="IDLE"&&K();const g=setTimeout(u,Wj);n({type:"PENDING",point:h,actions:m,longPressTimerId:g}),c()},[c,o,n,u]);Rt(function(){return a(),function(){r.current();const h=o();h.type==="PENDING"&&(clearTimeout(h.longPressTimerId),n(is))}},[o,a,n]),Rt(function(){return Ft(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}const qj=["input","button","textarea","select","option","optgroup","video","audio"];function mh(e,t){if(t==null)return!1;if(qj.includes(t.tagName.toLowerCase()))return!0;const o=t.getAttribute("contenteditable");return o==="true"||o===""?!0:t===e?!1:mh(e,t.parentElement)}function Jj(e,t){const r=t.target;return xa(r)?mh(e,r):!1}var Xj=e=>qt(e.getBoundingClientRect()).center;function Yj(e){return e instanceof ch(e).Element}const Qj=(()=>{const e="matches";return typeof document>"u"?e:[e,"msMatchesSelector","webkitMatchesSelector"].find(o=>o in Element.prototype)||e})();function hh(e,t){return e==null?null:e[Qj](t)?e:hh(e.parentElement,t)}function eO(e,t){return e.closest?e.closest(t):hh(e,t)}function tO(e){return`[${Nr.contextId}="${e}"]`}function nO(e,t){const r=t.target;if(!Yj(r))return null;const o=tO(e),n=eO(r,o);return!n||!xa(n)?null:n}function rO(e,t){const r=nO(e,t);return r?r.getAttribute(Nr.draggableId):null}function oO(e,t){const r=`[${Ts.contextId}="${e}"]`,n=lh(document,r).find(i=>i.getAttribute(Ts.id)===t);return!n||!xa(n)?null:n}function iO(e){e.preventDefault()}function di({expected:e,phase:t,isLockActive:r,shouldWarn:o}){return!(!r()||e!==t)}function gh({lockAPI:e,store:t,registry:r,draggableId:o}){if(e.isClaimed())return!1;const n=r.draggable.findById(o);return!(!n||!n.options.isEnabled||!oh(t.getState(),o))}function aO({lockAPI:e,contextId:t,store:r,registry:o,draggableId:n,forceSensorStop:i,sourceEvent:a}){if(!gh({lockAPI:e,store:r,registry:o,draggableId:n}))return null;const l=o.draggable.getById(n),c=oO(t,l.descriptor.id);if(!c||a&&!l.options.canDragInteractiveElements&&Jj(c,a))return null;const u=e.claim(i||Nn);let d="PRE_DRAG";function p(){return l.options.shouldRespectForcePress}function m(){return e.isActive(u)}function h($,I){di({expected:$,phase:d,isLockActive:m,shouldWarn:!0})&&r.dispatch(I())}const g=h.bind(null,"DRAGGING");function v($){function I(){e.release(),d="COMPLETED"}d!=="PRE_DRAG"&&(I(),K()),r.dispatch(eP($.liftActionArgs)),d="DRAGGING";function E(k,D={shouldBlockNextClick:!1}){if($.cleanup(),D.shouldBlockNextClick){const j=Ft(window,[{eventName:"click",fn:iO,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(j)}I(),r.dispatch(Jm({reason:k}))}return{isActive:()=>di({expected:"DRAGGING",phase:d,isLockActive:m,shouldWarn:!1}),shouldRespectForcePress:p,drop:k=>E("DROP",k),cancel:k=>E("CANCEL",k),...$.actions}}function y($){const I=Co(k=>{g(()=>qm({client:k}))});return{...v({liftActionArgs:{id:n,clientSelection:$,movementMode:"FLUID"},cleanup:()=>I.cancel(),actions:{move:I}}),move:I}}function S(){const $={moveUp:()=>g(cP),moveRight:()=>g(dP),moveDown:()=>g(uP),moveLeft:()=>g(pP)};return v({liftActionArgs:{id:n,clientSelection:Xj(c),movementMode:"SNAP"},cleanup:Nn,actions:$})}function w(){di({expected:"PRE_DRAG",phase:d,isLockActive:m,shouldWarn:!0})&&e.release()}return{isActive:()=>di({expected:"PRE_DRAG",phase:d,isLockActive:m,shouldWarn:!1}),shouldRespectForcePress:p,fluidLift:y,snapLift:S,abort:w}}const sO=[Fj,Vj,Kj];function lO({contextId:e,store:t,registry:r,customSensors:o,enableDefaultSensors:n}){const i=[...n?sO:[],...o||[]],a=b.useState(()=>kj())[0],s=ue(function(v,y){Do(v)&&!Do(y)&&a.tryAbandon()},[a]);Rt(function(){let v=t.getState();return t.subscribe(()=>{const S=t.getState();s(v,S),v=S})},[a,t,s]),Rt(()=>a.tryAbandon,[a.tryAbandon]);const l=ue(g=>gh({lockAPI:a,registry:r,store:t,draggableId:g}),[a,r,t]),c=ue((g,v,y)=>aO({lockAPI:a,registry:r,contextId:e,store:t,draggableId:g,forceSensorStop:v||null,sourceEvent:y&&y.sourceEvent?y.sourceEvent:null}),[e,a,r,t]),u=ue(g=>rO(e,g),[e]),d=ue(g=>{const v=r.draggable.findById(g);return v?v.options:null},[r.draggable]),p=ue(function(){a.isClaimed()&&(a.tryAbandon(),t.getState().phase!=="IDLE"&&t.dispatch(Ol()))},[a,t]),m=ue(()=>a.isClaimed(),[a]),h=Ge(()=>({canGetLock:l,tryGetLock:c,findClosestDraggableId:u,findOptionsForDraggable:d,tryReleaseLock:p,isLockClaimed:m}),[l,c,u,d,p,m]);for(let g=0;g<i.length;g++)i[g](h)}const cO=e=>({onBeforeCapture:t=>{const r=()=>{e.onBeforeCapture&&e.onBeforeCapture(t)};Xs.flushSync(r)},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}),uO=e=>({...Ro,...e.autoScrollerOptions,durationDampening:{...Ro.durationDampening,...e.autoScrollerOptions}});function oo(e){return e.current||K(),e.current}function dO(e){const{contextId:t,setCallbacks:r,sensors:o,nonce:n,dragHandleUsageInstructions:i}=e,a=b.useRef(null),s=uh(e),l=ue(()=>cO(s.current),[s]),c=ue(()=>uO(s.current),[s]),u=Sj(t),d=Ij({contextId:t,text:i}),p=mj(t,n),m=ue(j=>{oo(a).dispatch(j)},[]),h=Ge(()=>np({publishWhileDragging:nP,updateDroppableScroll:oP,updateDroppableIsEnabled:iP,updateDroppableIsCombineEnabled:aP,collectionStarting:rP},m),[m]),g=bj(),v=Ge(()=>GP(g,h),[g,h]),y=Ge(()=>cj({scrollWindow:HP,scrollDroppable:v.scrollDroppable,getAutoScrollerOptions:c,...np({move:qm},m)}),[v.scrollDroppable,m,c]),S=gj(t),w=Ge(()=>BP({announce:u,autoScroller:y,dimensionMarshal:v,focusMarshal:S,getResponders:l,styleMarshal:p}),[u,y,v,S,l,p]);a.current=w;const x=ue(()=>{const j=oo(a);j.getState().phase!=="IDLE"&&j.dispatch(Ol())},[]),$=ue(()=>{const j=oo(a).getState();return j.phase==="DROP_ANIMATING"?!0:j.phase==="IDLE"?!1:j.isDragging},[]),I=Ge(()=>({isDragging:$,tryAbort:x}),[$,x]);r(I);const E=ue(j=>oh(oo(a).getState(),j),[]),k=ue(()=>Xn(oo(a).getState()),[]),D=Ge(()=>({marshal:v,focus:S,contextId:t,canLift:E,isMovementAllowed:k,dragHandleUsageInstructionsId:d,registry:g}),[t,v,d,S,E,k,g]);return lO({contextId:t,store:w,registry:g,customSensors:o||null,enableDefaultSensors:e.enableDefaultSensors!==!1}),b.useEffect(()=>x,[x]),He.createElement(Sa.Provider,{value:D},He.createElement(NC,{context:Nl,store:w},e.children))}function pO(){return He.useId()}function vh(e){const t=pO(),r=e.dragHandleUsageInstructions||Ci.dragHandleUsageInstructions;return He.createElement(VC,null,o=>He.createElement(dO,{nonce:e.nonce,contextId:t,setCallbacks:o,dragHandleUsageInstructions:r,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,autoScrollerOptions:e.autoScrollerOptions},e.children))}const Op={dragging:5e3,dropAnimating:4500},fO=(e,t)=>t?So.drop(t.duration):e?So.snap:So.fluid,mO=(e,t)=>{if(e)return t?Oo.opacity.drop:Oo.opacity.combining},hO=e=>e.forceShouldAnimate!=null?e.forceShouldAnimate:e.mode==="SNAP";function gO(e){const r=e.dimension.client,{offset:o,combineWith:n,dropping:i}=e,a=!!n,s=hO(e),l=!!i,c=l?Rs.drop(o,a):Rs.moveTo(o);return{position:"fixed",top:r.marginBox.top,left:r.marginBox.left,boxSizing:"border-box",width:r.borderBox.width,height:r.borderBox.height,transition:fO(s,i),transform:c,opacity:mO(a,l),zIndex:l?Op.dropAnimating:Op.dragging,pointerEvents:"none"}}function vO(e){return{transform:Rs.moveTo(e.offset),transition:e.shouldAnimateDisplacement?void 0:"none"}}function bO(e){return e.type==="DRAGGING"?gO(e):vO(e)}function yO(e,t,r=mt){const o=window.getComputedStyle(t),n=t.getBoundingClientRect(),i=$m(n,o),a=Ui(i,r),s={client:i,tagName:t.tagName.toLowerCase(),display:o.display},l={x:i.marginBox.width,y:i.marginBox.height};return{descriptor:e,placeholder:s,displaceBy:l,client:i,page:a}}function xO(e){const t=Fl("draggable"),{descriptor:r,registry:o,getDraggableRef:n,canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}=e,l=Ge(()=>({canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}),[i,s,a]),c=ue(m=>{const h=n();return h||K(),yO(r,h,m)},[r,n]),u=Ge(()=>({uniqueId:t,descriptor:r,options:l,getDimension:c}),[r,c,l,t]),d=b.useRef(u),p=b.useRef(!0);Rt(()=>(o.draggable.register(d.current),()=>o.draggable.unregister(d.current)),[o.draggable]),Rt(()=>{if(p.current){p.current=!1;return}const m=d.current;d.current=u,o.draggable.update(u,m)},[u,o.draggable])}var Ul=He.createContext(null);function Gi(e){const t=b.useContext(e);return t||K(),t}function SO(e){e.preventDefault()}const wO=e=>{const t=b.useRef(null),r=ue((I=null)=>{t.current=I},[]),o=ue(()=>t.current,[]),{contextId:n,dragHandleUsageInstructionsId:i,registry:a}=Gi(Sa),{type:s,droppableId:l}=Gi(Ul),c=Ge(()=>({id:e.draggableId,index:e.index,type:s,droppableId:l}),[e.draggableId,e.index,s,l]),{children:u,draggableId:d,isEnabled:p,shouldRespectForcePress:m,canDragInteractiveElements:h,isClone:g,mapped:v,dropAnimationFinished:y}=e;if(!g){const I=Ge(()=>({descriptor:c,registry:a,getDraggableRef:o,canDragInteractiveElements:h,shouldRespectForcePress:m,isEnabled:p}),[c,a,o,h,m,p]);xO(I)}const S=Ge(()=>p?{tabIndex:0,role:"button","aria-describedby":i,"data-rfd-drag-handle-draggable-id":d,"data-rfd-drag-handle-context-id":n,draggable:!1,onDragStart:SO}:null,[n,i,d,p]),w=ue(I=>{v.type==="DRAGGING"&&v.dropping&&I.propertyName==="transform"&&Xs.flushSync(y)},[y,v]),x=Ge(()=>{const I=bO(v),E=v.type==="DRAGGING"&&v.dropping?w:void 0;return{innerRef:r,draggableProps:{"data-rfd-draggable-context-id":n,"data-rfd-draggable-id":d,style:I,onTransitionEnd:E},dragHandleProps:S}},[n,S,d,v,w,r]),$=Ge(()=>({draggableId:c.id,type:c.type,source:{index:c.index,droppableId:c.droppableId}}),[c.droppableId,c.id,c.index,c.type]);return He.createElement(He.Fragment,null,u(x,v.snapshot,$))};var bh=(e,t)=>e===t,yh=e=>{const{combine:t,destination:r}=e;return r?r.droppableId:t?t.droppableId:null};const $O=e=>e.combine?e.combine.draggableId:null,IO=e=>e.at&&e.at.type==="COMBINE"?e.at.combine.draggableId:null;function kO(){const e=ft((n,i)=>({x:n,y:i})),t=ft((n,i,a=null,s=null,l=null)=>({isDragging:!0,isClone:i,isDropAnimating:!!l,dropAnimation:l,mode:n,draggingOver:a,combineWith:s,combineTargetFor:null})),r=ft((n,i,a,s,l=null,c=null,u=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:l,combineWith:c,mode:i,offset:n,dimension:a,forceShouldAnimate:u,snapshot:t(i,s,l,c,null)}}));return(n,i)=>{if(Do(n)){if(n.critical.draggable.id!==i.draggableId)return null;const a=n.current.client.offset,s=n.dimensions.draggables[i.draggableId],l=Ot(n.impact),c=IO(n.impact),u=n.forceShouldAnimate;return r(e(a.x,a.y),n.movementMode,s,i.isClone,l,c,u)}if(n.phase==="DROP_ANIMATING"){const a=n.completed;if(a.result.draggableId!==i.draggableId)return null;const s=i.isClone,l=n.dimensions.draggables[i.draggableId],c=a.result,u=c.mode,d=yh(c),p=$O(c),h={duration:n.dropDuration,curve:Dl.drop,moveTo:n.newHomeClientOffset,opacity:p?Oo.opacity.drop:null,scale:p?Oo.scale.drop:null};return{mapped:{type:"DRAGGING",offset:n.newHomeClientOffset,dimension:l,dropping:h,draggingOver:d,combineWith:p,mode:u,forceShouldAnimate:null,snapshot:t(u,s,d,p,h)}}}return null}}function xh(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const _O={mapped:{type:"SECONDARY",offset:mt,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:xh(null)}};function CO(){const e=ft((a,s)=>({x:a,y:s})),t=ft(xh),r=ft((a,s=null,l)=>({mapped:{type:"SECONDARY",offset:a,combineTargetFor:s,shouldAnimateDisplacement:l,snapshot:t(s)}})),o=a=>a?r(mt,a,!0):null,n=(a,s,l,c)=>{const u=l.displaced.visible[a],d=!!(c.inVirtualList&&c.effected[a]),p=va(l),m=p&&p.draggableId===a?s:null;if(!u){if(!d)return o(m);if(l.displaced.invisible[a])return null;const v=Gr(c.displacedBy.point),y=e(v.x,v.y);return r(y,m,!0)}if(d)return o(m);const h=l.displacedBy.point,g=e(h.x,h.y);return r(g,m,u.shouldAnimate)};return(a,s)=>{if(Do(a))return a.critical.draggable.id===s.draggableId?null:n(s.draggableId,a.critical.draggable.id,a.impact,a.afterCritical);if(a.phase==="DROP_ANIMATING"){const l=a.completed;return l.result.draggableId===s.draggableId?null:n(s.draggableId,l.result.draggableId,l.impact,l.afterCritical)}return null}}const EO=()=>{const e=kO(),t=CO();return(o,n)=>e(o,n)||t(o,n)||_O},PO={dropAnimationFinished:Xm},jO=wm(EO,PO,null,{context:Nl,areStatePropsEqual:bh})(wO);function Sh(e){return Gi(Ul).isUsingCloneFor===e.draggableId&&!e.isClone?null:He.createElement(jO,e)}function Bl(e){const t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,r=!!e.disableInteractiveElementBlocking,o=!!e.shouldRespectForcePress;return He.createElement(Sh,Js({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:r,shouldRespectForcePress:o}))}const wh=e=>t=>e===t,OO=wh("scroll"),RO=wh("auto"),Rp=(e,t)=>t(e.overflowX)||t(e.overflowY),DO=e=>{const t=window.getComputedStyle(e),r={overflowX:t.overflowX,overflowY:t.overflowY};return Rp(r,OO)||Rp(r,RO)},TO=()=>!1,$h=e=>e==null?null:e===document.body?TO()?e:null:e===document.documentElement?null:DO(e)?e:$h(e.parentElement);var zs=e=>({x:e.scrollLeft,y:e.scrollTop});const Ih=e=>e?window.getComputedStyle(e).position==="fixed"?!0:Ih(e.parentElement):!1;var zO=e=>{const t=$h(e),r=Ih(e);return{closestScrollable:t,isFixedOnPage:r}},AO=({descriptor:e,isEnabled:t,isCombineEnabled:r,isFixedOnPage:o,direction:n,client:i,page:a,closest:s})=>{const l=(()=>{if(!s)return null;const{scrollSize:p,client:m}=s,h=th({scrollHeight:p.scrollHeight,scrollWidth:p.scrollWidth,height:m.paddingBox.height,width:m.paddingBox.width});return{pageMarginBox:s.page.marginBox,frameClient:m,scrollSize:p,shouldClipSubject:s.shouldClipSubject,scroll:{initial:s.scroll,current:s.scroll,max:h,diff:{value:mt,displacement:mt}}}})(),c=n==="vertical"?_l:Tm,u=Ar({page:a,withPlaceholder:null,axis:c,frame:l});return{descriptor:e,isCombineEnabled:r,isFixedOnPage:o,axis:c,isEnabled:t,client:i,page:a,frame:l,subject:u}};const MO=(e,t)=>{const r=Im(e);if(!t||e!==t)return r;const o=r.paddingBox.top-t.scrollTop,n=r.paddingBox.left-t.scrollLeft,i=o+t.scrollHeight,a=n+t.scrollWidth,l=wl({top:o,right:a,bottom:i,left:n},r.border);return $l({borderBox:l,margin:r.margin,border:r.border,padding:r.padding})};var NO=({ref:e,descriptor:t,env:r,windowScroll:o,direction:n,isDropDisabled:i,isCombineEnabled:a,shouldClipSubject:s})=>{const l=r.closestScrollable,c=MO(e,l),u=Ui(c,o),d=(()=>{if(!l)return null;const m=Im(l),h={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:m,page:Ui(m,o),scroll:zs(l),scrollSize:h,shouldClipSubject:s}})();return AO({descriptor:t,isEnabled:!i,isCombineEnabled:a,isFixedOnPage:r.isFixedOnPage,direction:n,client:c,page:u,closest:d})};const FO={passive:!1},LO={passive:!0};var Dp=e=>e.shouldPublishImmediately?FO:LO;const pi=e=>e&&e.env.closestScrollable||null;function UO(e){const t=b.useRef(null),r=Gi(Sa),o=Fl("droppable"),{registry:n,marshal:i}=r,a=uh(e),s=Ge(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),l=b.useRef(s),c=Ge(()=>ft((x,$)=>{t.current||K();const I={x,y:$};i.updateDroppableScroll(s.id,I)}),[s.id,i]),u=ue(()=>{const x=t.current;return!x||!x.env.closestScrollable?mt:zs(x.env.closestScrollable)},[]),d=ue(()=>{const x=u();c(x.x,x.y)},[u,c]),p=Ge(()=>Co(d),[d]),m=ue(()=>{const x=t.current,$=pi(x);if(x&&$||K(),x.scrollOptions.shouldPublishImmediately){d();return}p()},[p,d]),h=ue((x,$)=>{t.current&&K();const I=a.current,E=I.getDroppableRef();E||K();const k=zO(E),D={ref:E,descriptor:s,env:k,scrollOptions:$};t.current=D;const j=NO({ref:E,descriptor:s,env:k,windowScroll:x,direction:I.direction,isDropDisabled:I.isDropDisabled,isCombineEnabled:I.isCombineEnabled,shouldClipSubject:!I.ignoreContainerClipping}),C=k.closestScrollable;return C&&(C.setAttribute(Cp.contextId,r.contextId),C.addEventListener("scroll",m,Dp(D.scrollOptions))),j},[r.contextId,s,m,a]),g=ue(()=>{const x=t.current,$=pi(x);return x&&$||K(),zs($)},[]),v=ue(()=>{const x=t.current;x||K();const $=pi(x);t.current=null,$&&(p.cancel(),$.removeAttribute(Cp.contextId),$.removeEventListener("scroll",m,Dp(x.scrollOptions)))},[m,p]),y=ue(x=>{const $=t.current;$||K();const I=pi($);I||K(),I.scrollTop+=x.y,I.scrollLeft+=x.x},[]),S=Ge(()=>({getDimensionAndWatchScroll:h,getScrollWhileDragging:g,dragStopped:v,scroll:y}),[v,h,g,y]),w=Ge(()=>({uniqueId:o,descriptor:s,callbacks:S}),[S,s,o]);Rt(()=>(l.current=w.descriptor,n.droppable.register(w),()=>{t.current&&v(),n.droppable.unregister(w)}),[S,s,v,w,i,n.droppable]),Rt(()=>{t.current&&i.updateDroppableIsEnabled(l.current.id,!e.isDropDisabled)},[e.isDropDisabled,i]),Rt(()=>{t.current&&i.updateDroppableIsCombineEnabled(l.current.id,e.isCombineEnabled)},[e.isCombineEnabled,i])}function as(){}const Tp={width:0,height:0,margin:JC},BO=({isAnimatingOpenOnMount:e,placeholder:t,animate:r})=>e||r==="close"?Tp:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin},VO=({isAnimatingOpenOnMount:e,placeholder:t,animate:r})=>{const o=BO({isAnimatingOpenOnMount:e,placeholder:t,animate:r});return{display:t.display,boxSizing:"border-box",width:o.width,height:o.height,marginTop:o.margin.top,marginRight:o.margin.right,marginBottom:o.margin.bottom,marginLeft:o.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:r!=="none"?So.placeholder:null}},WO=e=>{const t=b.useRef(null),r=ue(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:o,onTransitionEnd:n,onClose:i,contextId:a}=e,[s,l]=b.useState(e.animate==="open");b.useEffect(()=>s?o!=="open"?(r(),l(!1),as):t.current?as:(t.current=setTimeout(()=>{t.current=null,l(!1)}),r):as,[o,s,r]);const c=ue(d=>{d.propertyName==="height"&&(n(),o==="close"&&i())},[o,i,n]),u=VO({isAnimatingOpenOnMount:s,animate:e.animate,placeholder:e.placeholder});return He.createElement(e.placeholder.tagName,{style:u,"data-rfd-placeholder-context-id":a,onTransitionEnd:c,ref:e.innerRef})};var ZO=He.memo(WO);class GO extends He.PureComponent{constructor(...t){super(...t),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{this.state.animate==="close"&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(t,r){return t.shouldAnimate?t.on?{isVisible:!0,data:t.on,animate:"open"}:r.isVisible?{isVisible:!0,data:r.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!t.on,data:t.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const t={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(t)}}const HO=e=>{const t=b.useContext(Sa);t||K();const{contextId:r,isMovementAllowed:o}=t,n=b.useRef(null),i=b.useRef(null),{children:a,droppableId:s,type:l,mode:c,direction:u,ignoreContainerClipping:d,isDropDisabled:p,isCombineEnabled:m,snapshot:h,useClone:g,updateViewportMaxScroll:v,getContainerForClone:y}=e,S=ue(()=>n.current,[]),w=ue((C=null)=>{n.current=C},[]);ue(()=>i.current,[]);const x=ue((C=null)=>{i.current=C},[]),$=ue(()=>{o()&&v({maxScroll:rh()})},[o,v]);UO({droppableId:s,type:l,mode:c,direction:u,isDropDisabled:p,isCombineEnabled:m,ignoreContainerClipping:d,getDroppableRef:S});const I=Ge(()=>He.createElement(GO,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:C,data:z,animate:O})=>He.createElement(ZO,{placeholder:z,onClose:C,innerRef:x,animate:O,contextId:r,onTransitionEnd:$})),[r,$,e.placeholder,e.shouldAnimatePlaceholder,x]),E=Ge(()=>({innerRef:w,placeholder:I,droppableProps:{"data-rfd-droppable-id":s,"data-rfd-droppable-context-id":r}}),[r,s,I,w]),k=g?g.dragging.draggableId:null,D=Ge(()=>({droppableId:s,type:l,isUsingCloneFor:k}),[s,k,l]);function j(){if(!g)return null;const{dragging:C,render:z}=g,O=He.createElement(Sh,{draggableId:C.draggableId,index:C.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(A,T)=>z(A,T,C));return so.createPortal(O,y())}return He.createElement(Ul.Provider,{value:D},a(E,h),j())};function KO(){return document.body||K(),document.body}const zp={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:KO},kh=e=>{let t={...e},r;for(r in zp)e[r]===void 0&&(t={...t,[r]:zp[r]});return t},ss=(e,t)=>e===t.droppable.type,Ap=(e,t)=>t.draggables[e.draggable.id],qO=()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},r=ft(i=>({draggableId:i.id,type:i.type,source:{index:i.index,droppableId:i.droppableId}})),o=ft((i,a,s,l,c,u)=>{const d=c.descriptor.id;if(c.descriptor.droppableId===i){const h=u?{render:u,dragging:r(c.descriptor)}:null,g={isDraggingOver:s,draggingOverWith:s?d:null,draggingFromThisWith:d,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!1,snapshot:g,useClone:h}}if(!a)return t;if(!l)return e;const m={isDraggingOver:s,draggingOverWith:d,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!0,snapshot:m,useClone:null}});return(i,a)=>{const s=kh(a),l=s.droppableId,c=s.type,u=!s.isDropDisabled,d=s.renderClone;if(Do(i)){const p=i.critical;if(!ss(c,p))return t;const m=Ap(p,i.dimensions),h=Ot(i.impact)===l;return o(l,u,h,h,m,d)}if(i.phase==="DROP_ANIMATING"){const p=i.completed;if(!ss(c,p.critical))return t;const m=Ap(p.critical,i.dimensions);return o(l,u,yh(p.result)===l,Ot(p.impact)===l,m,d)}if(i.phase==="IDLE"&&i.completed&&!i.shouldFlush){const p=i.completed;if(!ss(c,p.critical))return t;const m=Ot(p.impact)===l,h=!!(p.impact.at&&p.impact.at.type==="COMBINE"),g=p.critical.droppable.id===l;return m?h?e:t:g?e:t}return t}},JO={updateViewportMaxScroll:lP},Hi=wm(qO,JO,(e,t,r)=>({...kh(r),...e,...t}),{context:Nl,areStatePropsEqual:bh})(HO),_h=Object.freeze({status:"aborted"});function R(e,t,r){function o(s,l){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:l,constr:a,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,l);const c=a.prototype,u=Object.keys(c);for(let d=0;d<u.length;d++){const p=u[d];p in s||(s[p]=c[p].bind(s))}}const n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:e});function a(s){var l;const c=r?.Parent?new i:this;o(c,s),(l=c._zod).deferred??(l.deferred=[]);for(const u of c._zod.deferred)u();return c}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}const Ch=Symbol("zod_brand");class ir extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class $a extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Ki={};function $t(e){return e&&Object.assign(Ki,e),Ki}function XO(e){return e}function YO(e){return e}function QO(e){}function eR(e){throw new Error}function tR(e){}function Vl(e){const t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function H(e,t="|"){return e.map(r=>$e(r)).join(t)}function qi(e,t){return typeof t=="bigint"?t.toString():t}function Vo(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function xr(e){return e==null}function Ia(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Eh(e,t){const r=(e.toString().split(".")[1]||"").length,o=t.toString();let n=(o.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(o)){const l=o.match(/\d?e-(\d?)/);l?.[1]&&(n=Number.parseInt(l[1]))}const i=r>n?r:n,a=Number.parseInt(e.toFixed(i).replace(".","")),s=Number.parseInt(t.toFixed(i).replace(".",""));return a%s/10**i}const Mp=Symbol("evaluating");function Ne(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==Mp)return o===void 0&&(o=Mp,o=r()),o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function nR(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Wn(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function jn(...e){const t={};for(const r of e){const o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o)}return Object.defineProperties({},t)}function rR(e){return jn(e._zod.def)}function oR(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function iR(e){const t=Object.keys(e),r=t.map(o=>e[o]);return Promise.all(r).then(o=>{const n={};for(let i=0;i<t.length;i++)n[t[i]]=o[i];return n})}function aR(e=10){const t="abcdefghijklmnopqrstuvwxyz";let r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function As(e){return JSON.stringify(e)}function Ph(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Wl="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Fr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const jh=Vo(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function ur(e){if(Fr(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(Fr(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function ka(e){return ur(e)?{...e}:Array.isArray(e)?[...e]:e}function sR(e){let t=0;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}const lR=e=>{const t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},Ji=new Set(["string","number","symbol"]),Oh=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Pn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Zt(e,t,r){const o=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(o._zod.parent=e),o}function U(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 cR(e){let t;return new Proxy({},{get(r,o,n){return t??(t=e()),Reflect.get(t,o,n)},set(r,o,n,i){return t??(t=e()),Reflect.set(t,o,n,i)},has(r,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(r,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(r,o,n){return t??(t=e()),Reflect.defineProperty(t,o,n)}})}function $e(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Rh(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Dh={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]},Th={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function zh(e,t){const r=e._zod.def,o=jn(e._zod.def,{get shape(){const n={};for(const i in t){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(n[i]=r.shape[i])}return Wn(this,"shape",n),n},checks:[]});return Zt(e,o)}function Ah(e,t){const r=e._zod.def,o=jn(e._zod.def,{get shape(){const n={...e._zod.def.shape};for(const i in t){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&delete n[i]}return Wn(this,"shape",n),n},checks:[]});return Zt(e,o)}function Mh(e,t){if(!ur(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const n=jn(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Wn(this,"shape",i),i},checks:[]});return Zt(e,n)}function Nh(e,t){if(!ur(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r={...e._zod.def,get shape(){const o={...e._zod.def.shape,...t};return Wn(this,"shape",o),o},checks:e._zod.def.checks};return Zt(e,r)}function Fh(e,t){const r=jn(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t._zod.def.shape};return Wn(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return Zt(e,r)}function Lh(e,t,r){const o=jn(t._zod.def,{get shape(){const n=t._zod.def.shape,i={...n};if(r)for(const a in r){if(!(a in n))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(i[a]=e?new e({type:"optional",innerType:n[a]}):n[a])}else for(const a in n)i[a]=e?new e({type:"optional",innerType:n[a]}):n[a];return Wn(this,"shape",i),i},checks:[]});return Zt(t,o)}function Uh(e,t,r){const o=jn(t._zod.def,{get shape(){const n=t._zod.def.shape,i={...n};if(r)for(const a in r){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(i[a]=new e({type:"nonoptional",innerType:n[a]}))}else for(const a in n)i[a]=new e({type:"nonoptional",innerType:n[a]});return Wn(this,"shape",i),i},checks:[]});return Zt(t,o)}function tr(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Jt(e,t){return t.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function po(e){return typeof e=="string"?e:e?.message}function en(e,t,r){const o={...e,path:e.path??[]};if(!e.message){const n=po(e.inst?._zod.def?.error?.(e))??po(t?.error?.(e))??po(r.customError?.(e))??po(r.localeError?.(e))??"Invalid input";o.message=n}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function _a(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Ca(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Lr(...e){const[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function uR(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Bh(e){const t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r}function Vh(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function dR(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Bh(t+r)}function pR(e){return Vh(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function fR(e){const t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");const r=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)r[o/2]=Number.parseInt(t.slice(o,o+2),16);return r}function mR(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}class hR{constructor(...t){}}const Wh=Object.freeze(Object.defineProperty({__proto__:null,BIGINT_FORMAT_RANGES:Th,Class:hR,NUMBER_FORMAT_RANGES:Dh,aborted:tr,allowsEval:jh,assert:tR,assertEqual:XO,assertIs:QO,assertNever:eR,assertNotEqual:YO,assignProp:Wn,base64ToUint8Array:Bh,base64urlToUint8Array:dR,cached:Vo,captureStackTrace:Wl,cleanEnum:uR,cleanRegex:Ia,clone:Zt,cloneDef:rR,createTransparentProxy:cR,defineLazy:Ne,esc:As,escapeRegex:Pn,extend:Mh,finalizeIssue:en,floatSafeRemainder:Eh,getElementAtPath:oR,getEnumValues:Vl,getLengthableOrigin:Ca,getParsedType:lR,getSizableOrigin:_a,hexToUint8Array:fR,isObject:Fr,isPlainObject:ur,issue:Lr,joinValues:H,jsonStringifyReplacer:qi,merge:Fh,mergeDefs:jn,normalizeParams:U,nullish:xr,numKeys:sR,objectClone:nR,omit:Ah,optionalKeys:Rh,partial:Lh,pick:zh,prefixIssues:Jt,primitiveTypes:Oh,promiseAllObject:iR,propertyKeyTypes:Ji,randomString:aR,required:Uh,safeExtend:Nh,shallowClone:ka,slugify:Ph,stringifyPrimitive:$e,uint8ArrayToBase64:Vh,uint8ArrayToBase64url:pR,uint8ArrayToHex:mR,unwrapMessage:po},Symbol.toStringTag,{value:"Module"})),Zh=(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,qi,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Zl=R("$ZodError",Zh),Tt=R("$ZodError",Zh,{Parent:Error});function Gl(e,t=r=>r.message){const r={},o=[];for(const n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):o.push(t(n));return{formErrors:o,fieldErrors:r}}function Hl(e,t=r=>r.message){const r={_errors:[]},o=n=>{for(const i of n.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>o({issues:a}));else if(i.code==="invalid_key")o({issues:i.issues});else if(i.code==="invalid_element")o({issues:i.issues});else if(i.path.length===0)r._errors.push(t(i));else{let a=r,s=0;for(;s<i.path.length;){const l=i.path[s];s===i.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(t(i))):a[l]=a[l]||{_errors:[]},a=a[l],s++}}};return o(e),r}function Gh(e,t=r=>r.message){const r={errors:[]},o=(n,i=[])=>{var a,s;for(const l of n.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(c=>o({issues:c},l.path));else if(l.code==="invalid_key")o({issues:l.issues},l.path);else if(l.code==="invalid_element")o({issues:l.issues},l.path);else{const c=[...i,...l.path];if(c.length===0){r.errors.push(t(l));continue}let u=r,d=0;for(;d<c.length;){const p=c[d],m=d===c.length-1;typeof p=="string"?(u.properties??(u.properties={}),(a=u.properties)[p]??(a[p]={errors:[]}),u=u.properties[p]):(u.items??(u.items=[]),(s=u.items)[p]??(s[p]={errors:[]}),u=u.items[p]),m&&u.errors.push(t(l)),d++}}};return o(e),r}function Hh(e){const t=[],r=e.map(o=>typeof o=="object"?o.key:o);for(const o of r)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}function Kh(e){const t=[],r=[...e.issues].sort((o,n)=>(o.path??[]).length-(n.path??[]).length);for(const o of r)t.push(`✖ ${o.message}`),o.path?.length&&t.push(` → at ${Hh(o.path)}`);return t.join(`
|
|
161
|
+
`)}const Wo=e=>(t,r,o,n)=>{const i=o?Object.assign(o,{async:!1}):{async:!1},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new ir;if(a.issues.length){const s=new(n?.Err??e)(a.issues.map(l=>en(l,i,$t())));throw Wl(s,n?.callee),s}return a.value},Ms=Wo(Tt),Zo=e=>async(t,r,o,n)=>{const i=o?Object.assign(o,{async:!0}):{async:!0};let a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){const s=new(n?.Err??e)(a.issues.map(l=>en(l,i,$t())));throw Wl(s,n?.callee),s}return a.value},Ns=Zo(Tt),Go=e=>(t,r,o)=>{const n=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new ir;return i.issues.length?{success:!1,error:new(e??Zl)(i.issues.map(a=>en(a,n,$t())))}:{success:!0,data:i.value}},qh=Go(Tt),Ho=e=>async(t,r,o)=>{const n=o?Object.assign(o,{async:!0}):{async:!0};let i=t._zod.run({value:r,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(a=>en(a,n,$t())))}:{success:!0,data:i.value}},Jh=Ho(Tt),Kl=e=>(t,r,o)=>{const n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Wo(e)(t,r,n)},gR=Kl(Tt),ql=e=>(t,r,o)=>Wo(e)(t,r,o),vR=ql(Tt),Jl=e=>async(t,r,o)=>{const n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Zo(e)(t,r,n)},bR=Jl(Tt),Xl=e=>async(t,r,o)=>Zo(e)(t,r,o),yR=Xl(Tt),Yl=e=>(t,r,o)=>{const n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Go(e)(t,r,n)},xR=Yl(Tt),Ql=e=>(t,r,o)=>Go(e)(t,r,o),SR=Ql(Tt),ec=e=>async(t,r,o)=>{const n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Ho(e)(t,r,n)},wR=ec(Tt),tc=e=>async(t,r,o)=>Ho(e)(t,r,o),$R=tc(Tt),Xh=/^[cC][^\s-]{8,}$/,Yh=/^[0-9a-z]+$/,Qh=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,eg=/^[0-9a-vA-V]{20}$/,tg=/^[A-Za-z0-9]{27}$/,ng=/^[a-zA-Z0-9_-]{21}$/,rg=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,IR=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,og=/^([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})$/,Ur=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)$/,kR=Ur(4),_R=Ur(6),CR=Ur(7),ig=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ER=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,PR=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,ag=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,jR=ag,OR=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,RR="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function sg(){return new RegExp(RR,"u")}const lg=/^(?:(?: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])$/,cg=/^(([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}|:))$/,ug=e=>{const t=Pn(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},dg=/^((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])$/,pg=/^(([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])$/,fg=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,nc=/^[A-Za-z0-9_-]*$/,mg=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,hg=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,gg=/^\+(?:[0-9]){6,14}[0-9]$/,vg="(?:(?:\\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])))",bg=new RegExp(`^${vg}$`);function yg(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 xg(e){return new RegExp(`^${yg(e)}$`)}function Sg(e){const t=yg({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${t}(?:${r.join("|")})`;return new RegExp(`^${vg}T(?:${o})$`)}const wg=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},$g=/^-?\d+n?$/,Ig=/^-?\d+$/,kg=/^-?\d+(?:\.\d+)?/,_g=/^(?:true|false)$/i,Cg=/^null$/i,Eg=/^undefined$/i,Pg=/^[^A-Z]*$/,jg=/^[^a-z]*$/,Og=/^[0-9a-fA-F]*$/;function Ko(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function qo(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const DR=/^[0-9a-fA-F]{32}$/,TR=Ko(22,"=="),zR=qo(22),AR=/^[0-9a-fA-F]{40}$/,MR=Ko(27,"="),NR=qo(27),FR=/^[0-9a-fA-F]{64}$/,LR=Ko(43,"="),UR=qo(43),BR=/^[0-9a-fA-F]{96}$/,VR=Ko(64,""),WR=qo(64),ZR=/^[0-9a-fA-F]{128}$/,GR=Ko(86,"=="),HR=qo(86),rc=Object.freeze(Object.defineProperty({__proto__:null,base64:fg,base64url:nc,bigint:$g,boolean:_g,browserEmail:OR,cidrv4:dg,cidrv6:pg,cuid:Xh,cuid2:Yh,date:bg,datetime:Sg,domain:hg,duration:rg,e164:gg,email:ig,emoji:sg,extendedDuration:IR,guid:og,hex:Og,hostname:mg,html5Email:ER,idnEmail:jR,integer:Ig,ipv4:lg,ipv6:cg,ksuid:tg,lowercase:Pg,mac:ug,md5_base64:TR,md5_base64url:zR,md5_hex:DR,nanoid:ng,null:Cg,number:kg,rfc5322Email:PR,sha1_base64:MR,sha1_base64url:NR,sha1_hex:AR,sha256_base64:LR,sha256_base64url:UR,sha256_hex:FR,sha384_base64:VR,sha384_base64url:WR,sha384_hex:BR,sha512_base64:GR,sha512_base64url:HR,sha512_hex:ZR,string:wg,time:xg,ulid:Qh,undefined:Eg,unicodeEmail:ag,uppercase:jg,uuid:Ur,uuid4:kR,uuid6:_R,uuid7:CR,xid:eg},Symbol.toStringTag,{value:"Module"})),ot=R("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Rg={number:"number",bigint:"bigint",object:"date"},oc=R("$ZodCheckLessThan",(e,t)=>{ot.init(e,t);const r=Rg[typeof t.value];e._zod.onattach.push(o=>{const n=o._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:r,code:"too_big",maximum:t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ic=R("$ZodCheckGreaterThan",(e,t)=>{ot.init(e,t);const r=Rg[typeof t.value];e._zod.onattach.push(o=>{const n=o._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:r,code:"too_small",minimum:t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Dg=R("$ZodCheckMultipleOf",(e,t)=>{ot.init(e,t),e._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):Eh(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Tg=R("$ZodCheckNumberFormat",(e,t)=>{ot.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),o=r?"int":"number",[n,i]=Dh[t.format];e._zod.onattach.push(a=>{const s=a._zod.bag;s.format=t.format,s.minimum=n,s.maximum=i,r&&(s.pattern=Ig)}),e._zod.check=a=>{const s=a.value;if(r){if(!Number.isInteger(s)){a.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!t.abort});return}}s<n&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inst:e})}}),zg=R("$ZodCheckBigIntFormat",(e,t)=>{ot.init(e,t);const[r,o]=Th[t.format];e._zod.onattach.push(n=>{const i=n._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o}),e._zod.check=n=>{const i=n.value;i<r&&n.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),i>o&&n.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inst:e})}}),Ag=R("$ZodCheckMaxSize",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{const n=o.value;return!xr(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{const n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{const n=o.value;n.size<=t.maximum||o.issues.push({origin:_a(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Mg=R("$ZodCheckMinSize",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{const n=o.value;return!xr(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{const n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{const n=o.value;n.size>=t.minimum||o.issues.push({origin:_a(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Ng=R("$ZodCheckSizeEquals",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{const n=o.value;return!xr(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{const n=o._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=o=>{const n=o.value,i=n.size;if(i===t.size)return;const a=i>t.size;o.issues.push({origin:_a(n),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Fg=R("$ZodCheckMaxLength",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{const n=o.value;return!xr(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{const n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{const n=o.value;if(n.length<=t.maximum)return;const a=Ca(n);o.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Lg=R("$ZodCheckMinLength",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{const n=o.value;return!xr(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{const n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{const n=o.value;if(n.length>=t.minimum)return;const a=Ca(n);o.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Ug=R("$ZodCheckLengthEquals",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{const n=o.value;return!xr(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{const n=o._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=o=>{const n=o.value,i=n.length;if(i===t.length)return;const a=Ca(n),s=i>t.length;o.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Jo=R("$ZodCheckStringFormat",(e,t)=>{var r,o;ot.init(e,t),e._zod.onattach.push(n=>{const i=n._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),Bg=R("$ZodCheckRegex",(e,t)=>{Jo.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Vg=R("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Pg),Jo.init(e,t)}),Wg=R("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=jg),Jo.init(e,t)}),Zg=R("$ZodCheckIncludes",(e,t)=>{ot.init(e,t);const r=Pn(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Gg=R("$ZodCheckStartsWith",(e,t)=>{ot.init(e,t);const r=new RegExp(`^${Pn(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{const n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),Hg=R("$ZodCheckEndsWith",(e,t)=>{ot.init(e,t);const r=new RegExp(`.*${Pn(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{const n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});function Np(e,t,r){e.issues.length&&t.issues.push(...Jt(r,e.issues))}const Kg=R("$ZodCheckProperty",(e,t)=>{ot.init(e,t),e._zod.check=r=>{const o=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(n=>Np(n,r,t.property));Np(o,r,t.property)}}),qg=R("$ZodCheckMimeType",(e,t)=>{ot.init(e,t);const r=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime}),e._zod.check=o=>{r.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),Jg=R("$ZodCheckOverwrite",(e,t)=>{ot.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class Xg{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 o=t.split(`
|
|
162
|
+
`).filter(a=>a),n=Math.min(...o.map(a=>a.length-a.trimStart().length)),i=o.map(a=>a.slice(n)).map(a=>" ".repeat(this.indent*2)+a);for(const a of i)this.content.push(a)}compile(){const t=Function,r=this?.args,n=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...r,n.join(`
|
|
163
|
+
`))}}const Yg={major:4,minor:1,patch:13},Ce=R("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Yg;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const n of o)for(const i of n._zod.onattach)i(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const n=(a,s,l)=>{let c=tr(a),u;for(const d of s){if(d._zod.def.when){if(!d._zod.def.when(a))continue}else if(c)continue;const p=a.issues.length,m=d._zod.check(a);if(m instanceof Promise&&l?.async===!1)throw new ir;if(u||m instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await m,a.issues.length!==p&&(c||(c=tr(a,p)))});else{if(a.issues.length===p)continue;c||(c=tr(a,p))}}return u?u.then(()=>a):a},i=(a,s,l)=>{if(tr(a))return a.aborted=!0,a;const c=n(s,o,l);if(c instanceof Promise){if(l.async===!1)throw new ir;return c.then(u=>e._zod.parse(u,l))}return e._zod.parse(c,l)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){const c=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return c instanceof Promise?c.then(u=>i(u,a,s)):i(c,a,s)}const l=e._zod.parse(a,s);if(l instanceof Promise){if(s.async===!1)throw new ir;return l.then(c=>n(c,o,s))}return n(l,o,s)}}e["~standard"]={validate:n=>{try{const i=qh(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Jh(e,n).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}}),Xo=R("$ZodString",(e,t)=>{Ce.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??wg(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Qe=R("$ZodStringFormat",(e,t)=>{Jo.init(e,t),Xo.init(e,t)}),Qg=R("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=og),Qe.init(e,t)}),ev=R("$ZodUUID",(e,t)=>{if(t.version){const o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Ur(o))}else t.pattern??(t.pattern=Ur());Qe.init(e,t)}),tv=R("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=ig),Qe.init(e,t)}),nv=R("$ZodURL",(e,t)=>{Qe.init(e,t),e._zod.check=r=>{try{const o=r.value.trim(),n=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),rv=R("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=sg()),Qe.init(e,t)}),ov=R("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=ng),Qe.init(e,t)}),iv=R("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Xh),Qe.init(e,t)}),av=R("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Yh),Qe.init(e,t)}),sv=R("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Qh),Qe.init(e,t)}),lv=R("$ZodXID",(e,t)=>{t.pattern??(t.pattern=eg),Qe.init(e,t)}),cv=R("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=tg),Qe.init(e,t)}),uv=R("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Sg(t)),Qe.init(e,t)}),dv=R("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=bg),Qe.init(e,t)}),pv=R("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=xg(t)),Qe.init(e,t)}),fv=R("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=rg),Qe.init(e,t)}),mv=R("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=lg),Qe.init(e,t),e._zod.bag.format="ipv4"}),hv=R("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=cg),Qe.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),gv=R("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=ug(t.delimiter)),Qe.init(e,t),e._zod.bag.format="mac"}),vv=R("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=dg),Qe.init(e,t)}),bv=R("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=pg),Qe.init(e,t),e._zod.check=r=>{const o=r.value.split("/");try{if(o.length!==2)throw new Error;const[n,i]=o;if(!i)throw new Error;const a=Number(i);if(`${a}`!==i)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function ac(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const yv=R("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=fg),Qe.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{ac(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function xv(e){if(!nc.test(e))return!1;const t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return ac(r)}const Sv=R("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=nc),Qe.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{xv(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),wv=R("$ZodE164",(e,t)=>{t.pattern??(t.pattern=gg),Qe.init(e,t)});function $v(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[o]=r;if(!o)return!1;const n=JSON.parse(atob(o));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}const Iv=R("$ZodJWT",(e,t)=>{Qe.init(e,t),e._zod.check=r=>{$v(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),kv=R("$ZodCustomStringFormat",(e,t)=>{Qe.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),sc=R("$ZodNumber",(e,t)=>{Ce.init(e,t),e._zod.pattern=e._zod.bag.pattern??kg,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;const i=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...i?{received:i}:{}}),r}}),_v=R("$ZodNumberFormat",(e,t)=>{Tg.init(e,t),sc.init(e,t)}),lc=R("$ZodBoolean",(e,t)=>{Ce.init(e,t),e._zod.pattern=_g,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=!!r.value}catch{}const n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),cc=R("$ZodBigInt",(e,t)=>{Ce.init(e,t),e._zod.pattern=$g,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),Cv=R("$ZodBigIntFormat",(e,t)=>{zg.init(e,t),cc.init(e,t)}),Ev=R("$ZodSymbol",(e,t)=>{Ce.init(e,t),e._zod.parse=(r,o)=>{const n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),Pv=R("$ZodUndefined",(e,t)=>{Ce.init(e,t),e._zod.pattern=Eg,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,o)=>{const n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),jv=R("$ZodNull",(e,t)=>{Ce.init(e,t),e._zod.pattern=Cg,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{const n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),Ov=R("$ZodAny",(e,t)=>{Ce.init(e,t),e._zod.parse=r=>r}),Rv=R("$ZodUnknown",(e,t)=>{Ce.init(e,t),e._zod.parse=r=>r}),Dv=R("$ZodNever",(e,t)=>{Ce.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),Tv=R("$ZodVoid",(e,t)=>{Ce.init(e,t),e._zod.parse=(r,o)=>{const n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),zv=R("$ZodDate",(e,t)=>{Ce.init(e,t),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}const n=r.value,i=n instanceof Date;return i&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...i?{received:"Invalid Date"}:{},inst:e}),r}});function Fp(e,t,r){e.issues.length&&t.issues.push(...Jt(r,e.issues)),t.value[r]=e.value}const Av=R("$ZodArray",(e,t)=>{Ce.init(e,t),e._zod.parse=(r,o)=>{const n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);const i=[];for(let a=0;a<n.length;a++){const s=n[a],l=t.element._zod.run({value:s,issues:[]},o);l instanceof Promise?i.push(l.then(c=>Fp(c,r,a))):Fp(l,r,a)}return i.length?Promise.all(i).then(()=>r):r}});function Xi(e,t,r,o){e.issues.length&&t.issues.push(...Jt(r,e.issues)),e.value===void 0?r in o&&(t.value[r]=void 0):t.value[r]=e.value}function Mv(e){const t=Object.keys(e.shape);for(const o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const r=Rh(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Nv(e,t,r,o,n,i){const a=[],s=n.keySet,l=n.catchall._zod,c=l.def.type;for(const u in t){if(s.has(u))continue;if(c==="never"){a.push(u);continue}const d=l.run({value:t[u],issues:[]},o);d instanceof Promise?e.push(d.then(p=>Xi(p,r,u,t))):Xi(d,r,u,t)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}const Fv=R("$ZodObject",(e,t)=>{if(Ce.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const s=t.shape;Object.defineProperty(t,"shape",{get:()=>{const l={...s};return Object.defineProperty(t,"shape",{value:l}),l}})}const o=Vo(()=>Mv(t));Ne(e._zod,"propValues",()=>{const s=t.shape,l={};for(const c in s){const u=s[c]._zod;if(u.values){l[c]??(l[c]=new Set);for(const d of u.values)l[c].add(d)}}return l});const n=Fr,i=t.catchall;let a;e._zod.parse=(s,l)=>{a??(a=o.value);const c=s.value;if(!n(c))return s.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),s;s.value={};const u=[],d=a.shape;for(const p of a.keys){const h=d[p]._zod.run({value:c[p],issues:[]},l);h instanceof Promise?u.push(h.then(g=>Xi(g,s,p,c))):Xi(h,s,p,c)}return i?Nv(u,c,s,l,o.value,e):u.length?Promise.all(u).then(()=>s):s}}),Lv=R("$ZodObjectJIT",(e,t)=>{Fv.init(e,t);const r=e._zod.parse,o=Vo(()=>Mv(t)),n=p=>{const m=new Xg(["shape","payload","ctx"]),h=o.value,g=w=>{const x=As(w);return`shape[${x}]._zod.run({ value: input[${x}], issues: [] }, ctx)`};m.write("const input = payload.value;");const v=Object.create(null);let y=0;for(const w of h.keys)v[w]=`key_${y++}`;m.write("const newResult = {};");for(const w of h.keys){const x=v[w],$=As(w);m.write(`const ${x} = ${g(w)};`),m.write(`
|
|
164
|
+
if (${x}.issues.length) {
|
|
165
|
+
payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
|
|
166
|
+
...iss,
|
|
167
|
+
path: iss.path ? [${$}, ...iss.path] : [${$}]
|
|
168
|
+
})));
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
if (${x}.value === undefined) {
|
|
173
|
+
if (${$} in input) {
|
|
174
|
+
newResult[${$}] = undefined;
|
|
175
|
+
}
|
|
176
|
+
} else {
|
|
177
|
+
newResult[${$}] = ${x}.value;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
`)}m.write("payload.value = newResult;"),m.write("return payload;");const S=m.compile();return(w,x)=>S(p,w,x)};let i;const a=Fr,s=!Ki.jitless,c=s&&jh.value,u=t.catchall;let d;e._zod.parse=(p,m)=>{d??(d=o.value);const h=p.value;return a(h)?s&&c&&m?.async===!1&&m.jitless!==!0?(i||(i=n(t.shape)),p=i(p,m),u?Nv([],h,p,m,d,e):p):r(p,m):(p.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),p)}});function Lp(e,t,r,o){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const n=e.filter(i=>!tr(i));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(a=>en(a,o,$t())))}),t)}const uc=R("$ZodUnion",(e,t)=>{Ce.init(e,t),Ne(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Ne(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Ne(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),Ne(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){const n=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${n.map(i=>Ia(i.source)).join("|")})$`)}});const r=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(n,i)=>{if(r)return o(n,i);let a=!1;const s=[];for(const l of t.options){const c=l._zod.run({value:n.value,issues:[]},i);if(c instanceof Promise)s.push(c),a=!0;else{if(c.issues.length===0)return c;s.push(c)}}return a?Promise.all(s).then(l=>Lp(l,n,e,i)):Lp(s,n,e,i)}}),Uv=R("$ZodDiscriminatedUnion",(e,t)=>{uc.init(e,t);const r=e._zod.parse;Ne(e._zod,"propValues",()=>{const n={};for(const i of t.options){const a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[s,l]of Object.entries(a)){n[s]||(n[s]=new Set);for(const c of l)n[s].add(c)}}return n});const o=Vo(()=>{const n=t.options,i=new Map;for(const a of n){const s=a._zod.propValues?.[t.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(const l of s){if(i.has(l))throw new Error(`Duplicate discriminator value "${String(l)}"`);i.set(l,a)}}return i});e._zod.parse=(n,i)=>{const a=n.value;if(!Fr(a))return n.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),n;const s=o.value.get(a?.[t.discriminator]);return s?s._zod.run(n,i):t.unionFallback?r(n,i):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:a,path:[t.discriminator],inst:e}),n)}}),Bv=R("$ZodIntersection",(e,t)=>{Ce.init(e,t),e._zod.parse=(r,o)=>{const n=r.value,i=t.left._zod.run({value:n,issues:[]},o),a=t.right._zod.run({value:n,issues:[]},o);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([l,c])=>Up(r,l,c)):Up(r,i,a)}});function Fs(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(ur(e)&&ur(t)){const r=Object.keys(t),o=Object.keys(e).filter(i=>r.indexOf(i)!==-1),n={...e,...t};for(const i of o){const a=Fs(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n[i]=a.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let o=0;o<e.length;o++){const n=e[o],i=t[o],a=Fs(n,i);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Up(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),tr(e))return e;const o=Fs(t.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}const dc=R("$ZodTuple",(e,t)=>{Ce.init(e,t);const r=t.items;e._zod.parse=(o,n)=>{const i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];const a=[],s=[...r].reverse().findIndex(u=>u._zod.optin!=="optional"),l=s===-1?0:r.length-s;if(!t.rest){const u=i.length>r.length,d=i.length<l-1;if(u||d)return o.issues.push({...u?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},input:i,inst:e,origin:"array"}),o}let c=-1;for(const u of r){if(c++,c>=i.length&&c>=l)continue;const d=u._zod.run({value:i[c],issues:[]},n);d instanceof Promise?a.push(d.then(p=>fi(p,o,c))):fi(d,o,c)}if(t.rest){const u=i.slice(r.length);for(const d of u){c++;const p=t.rest._zod.run({value:d,issues:[]},n);p instanceof Promise?a.push(p.then(m=>fi(m,o,c))):fi(p,o,c)}}return a.length?Promise.all(a).then(()=>o):o}});function fi(e,t,r){e.issues.length&&t.issues.push(...Jt(r,e.issues)),t.value[r]=e.value}const Vv=R("$ZodRecord",(e,t)=>{Ce.init(e,t),e._zod.parse=(r,o)=>{const n=r.value;if(!ur(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;const i=[],a=t.keyType._zod.values;if(a){r.value={};const s=new Set;for(const c of a)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){s.add(typeof c=="number"?c.toString():c);const u=t.valueType._zod.run({value:n[c],issues:[]},o);u instanceof Promise?i.push(u.then(d=>{d.issues.length&&r.issues.push(...Jt(c,d.issues)),r.value[c]=d.value})):(u.issues.length&&r.issues.push(...Jt(c,u.issues)),r.value[c]=u.value)}let l;for(const c in n)s.has(c)||(l=l??[],l.push(c));l&&l.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:l})}else{r.value={};for(const s of Reflect.ownKeys(n)){if(s==="__proto__")continue;const l=t.keyType._zod.run({value:s,issues:[]},o);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(l.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(u=>en(u,o,$t())),input:s,path:[s],inst:e}),r.value[l.value]=l.value;continue}const c=t.valueType._zod.run({value:n[s],issues:[]},o);c instanceof Promise?i.push(c.then(u=>{u.issues.length&&r.issues.push(...Jt(s,u.issues)),r.value[l.value]=u.value})):(c.issues.length&&r.issues.push(...Jt(s,c.issues)),r.value[l.value]=c.value)}}return i.length?Promise.all(i).then(()=>r):r}}),Wv=R("$ZodMap",(e,t)=>{Ce.init(e,t),e._zod.parse=(r,o)=>{const n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;const i=[];r.value=new Map;for(const[a,s]of n){const l=t.keyType._zod.run({value:a,issues:[]},o),c=t.valueType._zod.run({value:s,issues:[]},o);l instanceof Promise||c instanceof Promise?i.push(Promise.all([l,c]).then(([u,d])=>{Bp(u,d,r,a,n,e,o)})):Bp(l,c,r,a,n,e,o)}return i.length?Promise.all(i).then(()=>r):r}});function Bp(e,t,r,o,n,i,a){e.issues.length&&(Ji.has(typeof o)?r.issues.push(...Jt(o,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:i,issues:e.issues.map(s=>en(s,a,$t()))})),t.issues.length&&(Ji.has(typeof o)?r.issues.push(...Jt(o,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:i,key:o,issues:t.issues.map(s=>en(s,a,$t()))})),r.value.set(e.value,t.value)}const Zv=R("$ZodSet",(e,t)=>{Ce.init(e,t),e._zod.parse=(r,o)=>{const n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;const i=[];r.value=new Set;for(const a of n){const s=t.valueType._zod.run({value:a,issues:[]},o);s instanceof Promise?i.push(s.then(l=>Vp(l,r))):Vp(s,r)}return i.length?Promise.all(i).then(()=>r):r}});function Vp(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const Gv=R("$ZodEnum",(e,t)=>{Ce.init(e,t);const r=Vl(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(n=>Ji.has(typeof n)).map(n=>typeof n=="string"?Pn(n):n.toString()).join("|")})$`),e._zod.parse=(n,i)=>{const a=n.value;return o.has(a)||n.issues.push({code:"invalid_value",values:r,input:a,inst:e}),n}}),Hv=R("$ZodLiteral",(e,t)=>{if(Ce.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?Pn(o):o?Pn(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,n)=>{const i=o.value;return r.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),Kv=R("$ZodFile",(e,t)=>{Ce.init(e,t),e._zod.parse=(r,o)=>{const n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),qv=R("$ZodTransform",(e,t)=>{Ce.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new $a(e.constructor.name);const n=t.transform(r.value,r);if(o.async)return(n instanceof Promise?n:Promise.resolve(n)).then(a=>(r.value=a,r));if(n instanceof Promise)throw new ir;return r.value=n,r}});function Wp(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Jv=R("$ZodOptional",(e,t)=>{Ce.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ne(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ne(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ia(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(t.innerType._zod.optin==="optional"){const n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>Wp(i,r.value)):Wp(n,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,o)}}),Xv=R("$ZodNullable",(e,t)=>{Ce.init(e,t),Ne(e._zod,"optin",()=>t.innerType._zod.optin),Ne(e._zod,"optout",()=>t.innerType._zod.optout),Ne(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ia(r.source)}|null)$`):void 0}),Ne(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:t.innerType._zod.run(r,o)}),Yv=R("$ZodDefault",(e,t)=>{Ce.init(e,t),e._zod.optin="optional",Ne(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);if(r.value===void 0)return r.value=t.defaultValue,r;const n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>Zp(i,t)):Zp(n,t)}});function Zp(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Qv=R("$ZodPrefault",(e,t)=>{Ce.init(e,t),e._zod.optin="optional",Ne(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>(o.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,o))}),eb=R("$ZodNonOptional",(e,t)=>{Ce.init(e,t),Ne(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{const n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>Gp(i,e)):Gp(n,e)}});function Gp(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 tb=R("$ZodSuccess",(e,t)=>{Ce.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new $a("ZodSuccess");const n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),nb=R("$ZodCatch",(e,t)=>{Ce.init(e,t),Ne(e._zod,"optin",()=>t.innerType._zod.optin),Ne(e._zod,"optout",()=>t.innerType._zod.optout),Ne(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);const n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(a=>en(a,o,$t()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(i=>en(i,o,$t()))},input:r.value}),r.issues=[]),r)}}),rb=R("$ZodNaN",(e,t)=>{Ce.init(e,t),e._zod.parse=(r,o)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),ob=R("$ZodPipe",(e,t)=>{Ce.init(e,t),Ne(e._zod,"values",()=>t.in._zod.values),Ne(e._zod,"optin",()=>t.in._zod.optin),Ne(e._zod,"optout",()=>t.out._zod.optout),Ne(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){const i=t.out._zod.run(r,o);return i instanceof Promise?i.then(a=>mi(a,t.in,o)):mi(i,t.in,o)}const n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>mi(i,t.out,o)):mi(n,t.out,o)}});function mi(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const pc=R("$ZodCodec",(e,t)=>{Ce.init(e,t),Ne(e._zod,"values",()=>t.in._zod.values),Ne(e._zod,"optin",()=>t.in._zod.optin),Ne(e._zod,"optout",()=>t.out._zod.optout),Ne(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if((o.direction||"forward")==="forward"){const i=t.in._zod.run(r,o);return i instanceof Promise?i.then(a=>hi(a,t,o)):hi(i,t,o)}else{const i=t.out._zod.run(r,o);return i instanceof Promise?i.then(a=>hi(a,t,o)):hi(i,t,o)}}});function hi(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){const n=t.transform(e.value,e);return n instanceof Promise?n.then(i=>gi(e,i,t.out,r)):gi(e,n,t.out,r)}else{const n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(i=>gi(e,i,t.in,r)):gi(e,n,t.in,r)}}function gi(e,t,r,o){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},o)}const ib=R("$ZodReadonly",(e,t)=>{Ce.init(e,t),Ne(e._zod,"propValues",()=>t.innerType._zod.propValues),Ne(e._zod,"values",()=>t.innerType._zod.values),Ne(e._zod,"optin",()=>t.innerType?._zod?.optin),Ne(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);const n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(Hp):Hp(n)}});function Hp(e){return e.value=Object.freeze(e.value),e}const ab=R("$ZodTemplateLiteral",(e,t)=>{Ce.init(e,t);const r=[];for(const o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);const n=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${o._zod.traits}`);const i=n.startsWith("^")?1:0,a=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(i,a))}else if(o===null||Oh.has(typeof o))r.push(Pn(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(o,n)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"template_literal",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o)}),sb=R("$ZodFunction",(e,t)=>(Ce.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...o){const n=e._def.input?Ms(e._def.input,o):o,i=Reflect.apply(r,this,n);return e._def.output?Ms(e._def.output,i):i}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){const n=e._def.input?await Ns(e._def.input,o):o,i=await Reflect.apply(r,this,n);return e._def.output?await Ns(e._def.output,i):i}},e._zod.parse=(r,o)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{const o=e.constructor;return Array.isArray(r[0])?new o({type:"function",input:new dc({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new o({type:"function",input:r[0],output:e._def.output})},e.output=r=>{const o=e.constructor;return new o({type:"function",input:e._def.input,output:r})},e)),lb=R("$ZodPromise",(e,t)=>{Ce.init(e,t),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},o))}),cb=R("$ZodLazy",(e,t)=>{Ce.init(e,t),Ne(e._zod,"innerType",()=>t.getter()),Ne(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Ne(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Ne(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Ne(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o)}),ub=R("$ZodCustom",(e,t)=>{ot.init(e,t),Ce.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=r=>{const o=r.value,n=t.fn(o);if(n instanceof Promise)return n.then(i=>Kp(i,r,o,e));Kp(n,r,o,e)}});function Kp(e,t,r,o){if(!e){const n={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(n.params=o._zod.def.params),t.issues.push(Lr(n))}}const KR=()=>{const e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"};return n=>{switch(n.code){case"invalid_type":return`مدخلات غير مقبولة: يفترض إدخال ${n.expected}، ولكن تم إدخال ${r(n.input)}`;case"invalid_value":return n.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${$e(n.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${H(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?` أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${i} ${n.maximum.toString()} ${a.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${i} ${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${i} ${n.minimum.toString()} ${a.unit}`:`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${i} ${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`نَص غير مقبول: يجب أن يبدأ بـ "${n.prefix}"`:i.format==="ends_with"?`نَص غير مقبول: يجب أن ينتهي بـ "${i.suffix}"`:i.format==="includes"?`نَص غير مقبول: يجب أن يتضمَّن "${i.includes}"`:i.format==="regex"?`نَص غير مقبول: يجب أن يطابق النمط ${i.pattern}`:`${o[i.format]??n.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${n.divisor}`;case"unrecognized_keys":return`معرف${n.keys.length>1?"ات":""} غريب${n.keys.length>1?"ة":""}: ${H(n.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${n.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${n.origin}`;default:return"مدخل غير مقبول"}}};function qR(){return{localeError:KR()}}const JR=()=>{const e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Yanlış dəyər: gözlənilən ${n.expected}, daxil olan ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Yanlış dəyər: gözlənilən ${$e(n.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${H(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${i}${n.maximum.toString()} ${a.unit??"element"}`:`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Çox kiçik: gözlənilən ${n.origin} ${i}${n.minimum.toString()} ${a.unit}`:`Çox kiçik: gözlənilən ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Yanlış mətn: "${i.prefix}" ilə başlamalıdır`:i.format==="ends_with"?`Yanlış mətn: "${i.suffix}" ilə bitməlidir`:i.format==="includes"?`Yanlış mətn: "${i.includes}" daxil olmalıdır`:i.format==="regex"?`Yanlış mətn: ${i.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${o[i.format]??n.format}`}case"not_multiple_of":return`Yanlış ədəd: ${n.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${n.keys.length>1?"lar":""}: ${H(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${n.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function XR(){return{localeError:JR()}}function qp(e,t,r,o){const n=Math.abs(e),i=n%10,a=n%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?r:o}const YR=()=>{const e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"лік";case"object":{if(Array.isArray(n))return"масіў";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"};return n=>{switch(n.code){case"invalid_type":return`Няправільны ўвод: чакаўся ${n.expected}, атрымана ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Няправільны ўвод: чакалася ${$e(n.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${H(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);if(a){const s=Number(n.maximum),l=qp(s,a.unit.one,a.unit.few,a.unit.many);return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна ${a.verb} ${i}${n.maximum.toString()} ${l}`}return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна быць ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);if(a){const s=Number(n.minimum),l=qp(s,a.unit.one,a.unit.few,a.unit.many);return`Занадта малы: чакалася, што ${n.origin} павінна ${a.verb} ${i}${n.minimum.toString()} ${l}`}return`Занадта малы: чакалася, што ${n.origin} павінна быць ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Няправільны радок: павінен пачынацца з "${i.prefix}"`:i.format==="ends_with"?`Няправільны радок: павінен заканчвацца на "${i.suffix}"`:i.format==="includes"?`Няправільны радок: павінен змяшчаць "${i.includes}"`:i.format==="regex"?`Няправільны радок: павінен адпавядаць шаблону ${i.pattern}`:`Няправільны ${o[i.format]??n.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${n.keys.length>1?"ключы":"ключ"}: ${H(n.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${n.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${n.origin}`;default:return"Няправільны ўвод"}}};function QR(){return{localeError:YR()}}const eD=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"число";case"object":{if(Array.isArray(e))return"масив";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},tD=()=>{const e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function t(o){return e[o]??null}const r={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"};return o=>{switch(o.code){case"invalid_type":return`Невалиден вход: очакван ${o.expected}, получен ${eD(o.input)}`;case"invalid_value":return o.values.length===1?`Невалиден вход: очакван ${$e(o.values[0])}`:`Невалидна опция: очаквано едно от ${H(o.values,"|")}`;case"too_big":{const n=o.inclusive?"<=":"<",i=t(o.origin);return i?`Твърде голямо: очаква се ${o.origin??"стойност"} да съдържа ${n}${o.maximum.toString()} ${i.unit??"елемента"}`:`Твърде голямо: очаква се ${o.origin??"стойност"} да бъде ${n}${o.maximum.toString()}`}case"too_small":{const n=o.inclusive?">=":">",i=t(o.origin);return i?`Твърде малко: очаква се ${o.origin} да съдържа ${n}${o.minimum.toString()} ${i.unit}`:`Твърде малко: очаква се ${o.origin} да бъде ${n}${o.minimum.toString()}`}case"invalid_format":{const n=o;if(n.format==="starts_with")return`Невалиден низ: трябва да започва с "${n.prefix}"`;if(n.format==="ends_with")return`Невалиден низ: трябва да завършва с "${n.suffix}"`;if(n.format==="includes")return`Невалиден низ: трябва да включва "${n.includes}"`;if(n.format==="regex")return`Невалиден низ: трябва да съвпада с ${n.pattern}`;let i="Невалиден";return n.format==="emoji"&&(i="Невалидно"),n.format==="datetime"&&(i="Невалидно"),n.format==="date"&&(i="Невалидна"),n.format==="time"&&(i="Невалидно"),n.format==="duration"&&(i="Невалидна"),`${i} ${r[n.format]??o.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${o.divisor}`;case"unrecognized_keys":return`Неразпознат${o.keys.length>1?"и":""} ключ${o.keys.length>1?"ове":""}: ${H(o.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${o.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${o.origin}`;default:return"Невалиден вход"}}};function nD(){return{localeError:tD()}}const rD=()=>{const e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case"invalid_type":return`Tipus invàlid: s'esperava ${n.expected}, s'ha rebut ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Valor invàlid: s'esperava ${$e(n.values[0])}`:`Opció invàlida: s'esperava una de ${H(n.values," o ")}`;case"too_big":{const i=n.inclusive?"com a màxim":"menys de",a=t(n.origin);return a?`Massa gran: s'esperava que ${n.origin??"el valor"} contingués ${i} ${n.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${i} ${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?"com a mínim":"més de",a=t(n.origin);return a?`Massa petit: s'esperava que ${n.origin} contingués ${i} ${n.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${i} ${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Format invàlid: ha de començar amb "${i.prefix}"`:i.format==="ends_with"?`Format invàlid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format invàlid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format invàlid: ha de coincidir amb el patró ${i.pattern}`:`Format invàlid per a ${o[i.format]??n.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${H(n.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${n.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${n.origin}`;default:return"Entrada invàlida"}}};function oD(){return{localeError:rD()}}const iD=()=>{const e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"číslo";case"string":return"řetězec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(n))return"pole";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"};return n=>{switch(n.code){case"invalid_type":return`Neplatný vstup: očekáváno ${n.expected}, obdrženo ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Neplatný vstup: očekáváno ${$e(n.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${H(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Hodnota je příliš velká: ${n.origin??"hodnota"} musí mít ${i}${n.maximum.toString()} ${a.unit??"prvků"}`:`Hodnota je příliš velká: ${n.origin??"hodnota"} musí být ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Hodnota je příliš malá: ${n.origin??"hodnota"} musí mít ${i}${n.minimum.toString()} ${a.unit??"prvků"}`:`Hodnota je příliš malá: ${n.origin??"hodnota"} musí být ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Neplatný řetězec: musí začínat na "${i.prefix}"`:i.format==="ends_with"?`Neplatný řetězec: musí končit na "${i.suffix}"`:i.format==="includes"?`Neplatný řetězec: musí obsahovat "${i.includes}"`:i.format==="regex"?`Neplatný řetězec: musí odpovídat vzoru ${i.pattern}`:`Neplatný formát ${o[i.format]??n.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${n.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${H(n.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${n.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${n.origin}`;default:return"Neplatný vstup"}}};function aD(){return{localeError:iD()}}const sD=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},t={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};function r(a){return e[a]??null}function o(a){return t[a]??a}const n=a=>{const s=typeof a;switch(s){case"number":return Number.isNaN(a)?"NaN":"tal";case"object":return Array.isArray(a)?"liste":a===null?"null":Object.getPrototypeOf(a)!==Object.prototype&&a.constructor?a.constructor.name:"objekt"}return s},i={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return a=>{switch(a.code){case"invalid_type":return`Ugyldigt input: forventede ${o(a.expected)}, fik ${o(n(a.input))}`;case"invalid_value":return a.values.length===1?`Ugyldig værdi: forventede ${$e(a.values[0])}`:`Ugyldigt valg: forventede en af følgende ${H(a.values,"|")}`;case"too_big":{const s=a.inclusive?"<=":"<",l=r(a.origin),c=o(a.origin);return l?`For stor: forventede ${c??"value"} ${l.verb} ${s} ${a.maximum.toString()} ${l.unit??"elementer"}`:`For stor: forventede ${c??"value"} havde ${s} ${a.maximum.toString()}`}case"too_small":{const s=a.inclusive?">=":">",l=r(a.origin),c=o(a.origin);return l?`For lille: forventede ${c} ${l.verb} ${s} ${a.minimum.toString()} ${l.unit}`:`For lille: forventede ${c} havde ${s} ${a.minimum.toString()}`}case"invalid_format":{const s=a;return s.format==="starts_with"?`Ugyldig streng: skal starte med "${s.prefix}"`:s.format==="ends_with"?`Ugyldig streng: skal ende med "${s.suffix}"`:s.format==="includes"?`Ugyldig streng: skal indeholde "${s.includes}"`:s.format==="regex"?`Ugyldig streng: skal matche mønsteret ${s.pattern}`:`Ugyldig ${i[s.format]??a.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${a.divisor}`;case"unrecognized_keys":return`${a.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${H(a.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${a.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${a.origin}`;default:return"Ugyldigt input"}}};function lD(){return{localeError:sD()}}const cD=()=>{const e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"Zahl";case"object":{if(Array.isArray(n))return"Array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return n=>{switch(n.code){case"invalid_type":return`Ungültige Eingabe: erwartet ${n.expected}, erhalten ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ungültige Eingabe: erwartet ${$e(n.values[0])}`:`Ungültige Option: erwartet eine von ${H(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Zu groß: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ist`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ist`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Ungültiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ungültiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ungültiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ungültiger String: muss dem Muster ${i.pattern} entsprechen`:`Ungültig: ${o[i.format]??n.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${H(n.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${n.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${n.origin}`;default:return"Ungültige Eingabe"}}};function uD(){return{localeError:cD()}}const dD=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},pD=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function t(o){return e[o]??null}const r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return o=>{switch(o.code){case"invalid_type":return`Invalid input: expected ${o.expected}, received ${dD(o.input)}`;case"invalid_value":return o.values.length===1?`Invalid input: expected ${$e(o.values[0])}`:`Invalid option: expected one of ${H(o.values,"|")}`;case"too_big":{const n=o.inclusive?"<=":"<",i=t(o.origin);return i?`Too big: expected ${o.origin??"value"} to have ${n}${o.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${n}${o.maximum.toString()}`}case"too_small":{const n=o.inclusive?">=":">",i=t(o.origin);return i?`Too small: expected ${o.origin} to have ${n}${o.minimum.toString()} ${i.unit}`:`Too small: expected ${o.origin} to be ${n}${o.minimum.toString()}`}case"invalid_format":{const n=o;return n.format==="starts_with"?`Invalid string: must start with "${n.prefix}"`:n.format==="ends_with"?`Invalid string: must end with "${n.suffix}"`:n.format==="includes"?`Invalid string: must include "${n.includes}"`:n.format==="regex"?`Invalid string: must match pattern ${n.pattern}`:`Invalid ${r[n.format]??o.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${o.divisor}`;case"unrecognized_keys":return`Unrecognized key${o.keys.length>1?"s":""}: ${H(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}};function db(){return{localeError:pD()}}const fD=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombro";case"object":{if(Array.isArray(e))return"tabelo";if(e===null)return"senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},mD=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(o){return e[o]??null}const r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return o=>{switch(o.code){case"invalid_type":return`Nevalida enigo: atendiĝis ${o.expected}, riceviĝis ${fD(o.input)}`;case"invalid_value":return o.values.length===1?`Nevalida enigo: atendiĝis ${$e(o.values[0])}`:`Nevalida opcio: atendiĝis unu el ${H(o.values,"|")}`;case"too_big":{const n=o.inclusive?"<=":"<",i=t(o.origin);return i?`Tro granda: atendiĝis ke ${o.origin??"valoro"} havu ${n}${o.maximum.toString()} ${i.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${o.origin??"valoro"} havu ${n}${o.maximum.toString()}`}case"too_small":{const n=o.inclusive?">=":">",i=t(o.origin);return i?`Tro malgranda: atendiĝis ke ${o.origin} havu ${n}${o.minimum.toString()} ${i.unit}`:`Tro malgranda: atendiĝis ke ${o.origin} estu ${n}${o.minimum.toString()}`}case"invalid_format":{const n=o;return n.format==="starts_with"?`Nevalida karaktraro: devas komenciĝi per "${n.prefix}"`:n.format==="ends_with"?`Nevalida karaktraro: devas finiĝi per "${n.suffix}"`:n.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${n.includes}"`:n.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${n.pattern}`:`Nevalida ${r[n.format]??o.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${o.divisor}`;case"unrecognized_keys":return`Nekonata${o.keys.length>1?"j":""} ŝlosilo${o.keys.length>1?"j":""}: ${H(o.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${o.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${o.origin}`;default:return"Nevalida enigo"}}};function hD(){return{localeError:mD()}}const gD=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},t={string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};function r(a){return e[a]??null}function o(a){return t[a]??a}const n=a=>{const s=typeof a;switch(s){case"number":return Number.isNaN(a)?"NaN":"number";case"object":return Array.isArray(a)?"array":a===null?"null":Object.getPrototypeOf(a)!==Object.prototype?a.constructor.name:"object"}return s},i={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return a=>{switch(a.code){case"invalid_type":return`Entrada inválida: se esperaba ${o(a.expected)}, recibido ${o(n(a.input))}`;case"invalid_value":return a.values.length===1?`Entrada inválida: se esperaba ${$e(a.values[0])}`:`Opción inválida: se esperaba una de ${H(a.values,"|")}`;case"too_big":{const s=a.inclusive?"<=":"<",l=r(a.origin),c=o(a.origin);return l?`Demasiado grande: se esperaba que ${c??"valor"} tuviera ${s}${a.maximum.toString()} ${l.unit??"elementos"}`:`Demasiado grande: se esperaba que ${c??"valor"} fuera ${s}${a.maximum.toString()}`}case"too_small":{const s=a.inclusive?">=":">",l=r(a.origin),c=o(a.origin);return l?`Demasiado pequeño: se esperaba que ${c} tuviera ${s}${a.minimum.toString()} ${l.unit}`:`Demasiado pequeño: se esperaba que ${c} fuera ${s}${a.minimum.toString()}`}case"invalid_format":{const s=a;return s.format==="starts_with"?`Cadena inválida: debe comenzar con "${s.prefix}"`:s.format==="ends_with"?`Cadena inválida: debe terminar en "${s.suffix}"`:s.format==="includes"?`Cadena inválida: debe incluir "${s.includes}"`:s.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${s.pattern}`:`Inválido ${i[s.format]??a.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${a.divisor}`;case"unrecognized_keys":return`Llave${a.keys.length>1?"s":""} desconocida${a.keys.length>1?"s":""}: ${H(a.keys,", ")}`;case"invalid_key":return`Llave inválida en ${o(a.origin)}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${o(a.origin)}`;default:return"Entrada inválida"}}};function vD(){return{localeError:gD()}}const bD=()=>{const e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"عدد";case"object":{if(Array.isArray(n))return"آرایه";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"};return n=>{switch(n.code){case"invalid_type":return`ورودی نامعتبر: میبایست ${n.expected} میبود، ${r(n.input)} دریافت شد`;case"invalid_value":return n.values.length===1?`ورودی نامعتبر: میبایست ${$e(n.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${H(n.values,"|")} میبود`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`خیلی بزرگ: ${n.origin??"مقدار"} باید ${i}${n.maximum.toString()} ${a.unit??"عنصر"} باشد`:`خیلی بزرگ: ${n.origin??"مقدار"} باید ${i}${n.maximum.toString()} باشد`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`خیلی کوچک: ${n.origin} باید ${i}${n.minimum.toString()} ${a.unit} باشد`:`خیلی کوچک: ${n.origin} باید ${i}${n.minimum.toString()} باشد`}case"invalid_format":{const i=n;return i.format==="starts_with"?`رشته نامعتبر: باید با "${i.prefix}" شروع شود`:i.format==="ends_with"?`رشته نامعتبر: باید با "${i.suffix}" تمام شود`:i.format==="includes"?`رشته نامعتبر: باید شامل "${i.includes}" باشد`:i.format==="regex"?`رشته نامعتبر: باید با الگوی ${i.pattern} مطابقت داشته باشد`:`${o[i.format]??n.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${n.divisor} باشد`;case"unrecognized_keys":return`کلید${n.keys.length>1?"های":""} ناشناس: ${H(n.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${n.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${n.origin}`;default:return"ورودی نامعتبر"}}};function yD(){return{localeError:bD()}}const xD=()=>{const e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return n=>{switch(n.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${n.expected}, oli ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Virheellinen syöte: täytyy olla ${$e(n.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${H(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Liian suuri: ${a.subject} täytyy olla ${i}${n.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon täytyy olla ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Liian pieni: ${a.subject} täytyy olla ${i}${n.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon täytyy olla ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Virheellinen syöte: täytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen syöte: täytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen syöte: täytyy sisältää "${i.includes}"`:i.format==="regex"?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${i.pattern}`:`Virheellinen ${o[i.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${H(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function SD(){return{localeError:xD()}}const wD=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"nombre";case"object":{if(Array.isArray(n))return"tableau";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return n=>{switch(n.code){case"invalid_type":return`Entrée invalide : ${n.expected} attendu, ${r(n.input)} reçu`;case"invalid_value":return n.values.length===1?`Entrée invalide : ${$e(n.values[0])} attendu`:`Option invalide : une valeur parmi ${H(n.values,"|")} attendue`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Trop grand : ${n.origin??"valeur"} doit ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"élément(s)"}`:`Trop grand : ${n.origin??"valeur"} doit être ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Trop petit : ${n.origin} doit ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Trop petit : ${n.origin} doit être ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Chaîne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Chaîne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Chaîne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Chaîne invalide : doit correspondre au modèle ${i.pattern}`:`${o[i.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${n.divisor}`;case"unrecognized_keys":return`Clé${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${H(n.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${n.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entrée invalide"}}};function $D(){return{localeError:wD()}}const ID=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return n=>{switch(n.code){case"invalid_type":return`Entrée invalide : attendu ${n.expected}, reçu ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entrée invalide : attendu ${$e(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${H(n.values,"|")}`;case"too_big":{const i=n.inclusive?"≤":"<",a=t(n.origin);return a?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${i}${n.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?"≥":">",a=t(n.origin);return a?`Trop petit : attendu que ${n.origin} ait ${i}${n.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${n.origin} soit ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Chaîne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Chaîne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Chaîne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Chaîne invalide : doit correspondre au motif ${i.pattern}`:`${o[i.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${n.divisor}`;case"unrecognized_keys":return`Clé${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${H(n.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${n.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entrée invalide"}}};function kD(){return{localeError:ID()}}const _D=()=>{const e={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},t={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},r=c=>c?e[c]:void 0,o=c=>{const u=r(c);return u?u.label:c??e.unknown.label},n=c=>`ה${o(c)}`,i=c=>(r(c)?.gender??"m")==="f"?"צריכה להיות":"צריך להיות",a=c=>c?t[c]??null:null,s=c=>{const u=typeof c;switch(u){case"number":return Number.isNaN(c)?"NaN":"number";case"object":return Array.isArray(c)?"array":c===null?"null":Object.getPrototypeOf(c)!==Object.prototype&&c.constructor?c.constructor.name:"object";default:return u}},l={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}};return c=>{switch(c.code){case"invalid_type":{const u=c.expected,d=o(u),p=s(c.input),m=e[p]?.label??p;return`קלט לא תקין: צריך להיות ${d}, התקבל ${m}`}case"invalid_value":{if(c.values.length===1)return`ערך לא תקין: הערך חייב להיות ${$e(c.values[0])}`;const u=c.values.map(m=>$e(m));if(c.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${u[0]} או ${u[1]}`;const d=u[u.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${u.slice(0,-1).join(", ")} או ${d}`}case"too_big":{const u=a(c.origin),d=n(c.origin??"value");if(c.origin==="string")return`${u?.longLabel??"ארוך"} מדי: ${d} צריכה להכיל ${c.maximum.toString()} ${u?.unit??""} ${c.inclusive?"או פחות":"לכל היותר"}`.trim();if(c.origin==="number"){const h=c.inclusive?`קטן או שווה ל-${c.maximum}`:`קטן מ-${c.maximum}`;return`גדול מדי: ${d} צריך להיות ${h}`}if(c.origin==="array"||c.origin==="set"){const h=c.origin==="set"?"צריכה":"צריך",g=c.inclusive?`${c.maximum} ${u?.unit??""} או פחות`:`פחות מ-${c.maximum} ${u?.unit??""}`;return`גדול מדי: ${d} ${h} להכיל ${g}`.trim()}const p=c.inclusive?"<=":"<",m=i(c.origin??"value");return u?.unit?`${u.longLabel} מדי: ${d} ${m} ${p}${c.maximum.toString()} ${u.unit}`:`${u?.longLabel??"גדול"} מדי: ${d} ${m} ${p}${c.maximum.toString()}`}case"too_small":{const u=a(c.origin),d=n(c.origin??"value");if(c.origin==="string")return`${u?.shortLabel??"קצר"} מדי: ${d} צריכה להכיל ${c.minimum.toString()} ${u?.unit??""} ${c.inclusive?"או יותר":"לפחות"}`.trim();if(c.origin==="number"){const h=c.inclusive?`גדול או שווה ל-${c.minimum}`:`גדול מ-${c.minimum}`;return`קטן מדי: ${d} צריך להיות ${h}`}if(c.origin==="array"||c.origin==="set"){const h=c.origin==="set"?"צריכה":"צריך";if(c.minimum===1&&c.inclusive){const v=(c.origin==="set","לפחות פריט אחד");return`קטן מדי: ${d} ${h} להכיל ${v}`}const g=c.inclusive?`${c.minimum} ${u?.unit??""} או יותר`:`יותר מ-${c.minimum} ${u?.unit??""}`;return`קטן מדי: ${d} ${h} להכיל ${g}`.trim()}const p=c.inclusive?">=":">",m=i(c.origin??"value");return u?.unit?`${u.shortLabel} מדי: ${d} ${m} ${p}${c.minimum.toString()} ${u.unit}`:`${u?.shortLabel??"קטן"} מדי: ${d} ${m} ${p}${c.minimum.toString()}`}case"invalid_format":{const u=c;if(u.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${u.prefix}"`;if(u.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${u.suffix}"`;if(u.format==="includes")return`המחרוזת חייבת לכלול "${u.includes}"`;if(u.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${u.pattern}`;const d=l[u.format],p=d?.label??u.format,h=(d?.gender??"m")==="f"?"תקינה":"תקין";return`${p} לא ${h}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${c.divisor}`;case"unrecognized_keys":return`מפתח${c.keys.length>1?"ות":""} לא מזוה${c.keys.length>1?"ים":"ה"}: ${H(c.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${n(c.origin??"array")}`;default:return"קלט לא תקין"}}};function CD(){return{localeError:_D()}}const ED=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"szám";case"object":{if(Array.isArray(n))return"tömb";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"};return n=>{switch(n.code){case"invalid_type":return`Érvénytelen bemenet: a várt érték ${n.expected}, a kapott érték ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Érvénytelen bemenet: a várt érték ${$e(n.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${H(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Túl nagy: ${n.origin??"érték"} mérete túl nagy ${i}${n.maximum.toString()} ${a.unit??"elem"}`:`Túl nagy: a bemeneti érték ${n.origin??"érték"} túl nagy: ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Túl kicsi: a bemeneti érték ${n.origin} mérete túl kicsi ${i}${n.minimum.toString()} ${a.unit}`:`Túl kicsi: a bemeneti érték ${n.origin} túl kicsi ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Érvénytelen string: "${i.prefix}" értékkel kell kezdődnie`:i.format==="ends_with"?`Érvénytelen string: "${i.suffix}" értékkel kell végződnie`:i.format==="includes"?`Érvénytelen string: "${i.includes}" értéket kell tartalmaznia`:i.format==="regex"?`Érvénytelen string: ${i.pattern} mintának kell megfelelnie`:`Érvénytelen ${o[i.format]??n.format}`}case"not_multiple_of":return`Érvénytelen szám: ${n.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${H(n.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${n.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${n.origin}`;default:return"Érvénytelen bemenet"}}};function PD(){return{localeError:ED()}}const jD=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Input tidak valid: diharapkan ${n.expected}, diterima ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${$e(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${H(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${i}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: diharapkan ${n.origin} memiliki ${i}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${o[i.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${H(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};function OD(){return{localeError:jD()}}const RD=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"númer";case"object":{if(Array.isArray(e))return"fylki";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},DD=()=>{const e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function t(o){return e[o]??null}const r={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"};return o=>{switch(o.code){case"invalid_type":return`Rangt gildi: Þú slóst inn ${RD(o.input)} þar sem á að vera ${o.expected}`;case"invalid_value":return o.values.length===1?`Rangt gildi: gert ráð fyrir ${$e(o.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${H(o.values,"|")}`;case"too_big":{const n=o.inclusive?"<=":"<",i=t(o.origin);return i?`Of stórt: gert er ráð fyrir að ${o.origin??"gildi"} hafi ${n}${o.maximum.toString()} ${i.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${o.origin??"gildi"} sé ${n}${o.maximum.toString()}`}case"too_small":{const n=o.inclusive?">=":">",i=t(o.origin);return i?`Of lítið: gert er ráð fyrir að ${o.origin} hafi ${n}${o.minimum.toString()} ${i.unit}`:`Of lítið: gert er ráð fyrir að ${o.origin} sé ${n}${o.minimum.toString()}`}case"invalid_format":{const n=o;return n.format==="starts_with"?`Ógildur strengur: verður að byrja á "${n.prefix}"`:n.format==="ends_with"?`Ógildur strengur: verður að enda á "${n.suffix}"`:n.format==="includes"?`Ógildur strengur: verður að innihalda "${n.includes}"`:n.format==="regex"?`Ógildur strengur: verður að fylgja mynstri ${n.pattern}`:`Rangt ${r[n.format]??o.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${o.divisor}`;case"unrecognized_keys":return`Óþekkt ${o.keys.length>1?"ir lyklar":"ur lykill"}: ${H(o.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${o.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${o.origin}`;default:return"Rangt gildi"}}};function TD(){return{localeError:DD()}}const zD=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"numero";case"object":{if(Array.isArray(n))return"vettore";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Input non valido: atteso ${n.expected}, ricevuto ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input non valido: atteso ${$e(n.values[0])}`:`Opzione non valida: atteso uno tra ${H(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Troppo grande: ${n.origin??"valore"} deve avere ${i}${n.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Troppo piccolo: ${n.origin} deve avere ${i}${n.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${n.origin} deve essere ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Invalid ${o[i.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${H(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};function AD(){return{localeError:zD()}}const MD=()=>{const e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"数値";case"object":{if(Array.isArray(n))return"配列";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"};return n=>{switch(n.code){case"invalid_type":return`無効な入力: ${n.expected}が期待されましたが、${r(n.input)}が入力されました`;case"invalid_value":return n.values.length===1?`無効な入力: ${$e(n.values[0])}が期待されました`:`無効な選択: ${H(n.values,"、")}のいずれかである必要があります`;case"too_big":{const i=n.inclusive?"以下である":"より小さい",a=t(n.origin);return a?`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${a.unit??"要素"}${i}必要があります`:`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${i}必要があります`}case"too_small":{const i=n.inclusive?"以上である":"より大きい",a=t(n.origin);return a?`小さすぎる値: ${n.origin}は${n.minimum.toString()}${a.unit}${i}必要があります`:`小さすぎる値: ${n.origin}は${n.minimum.toString()}${i}必要があります`}case"invalid_format":{const i=n;return i.format==="starts_with"?`無効な文字列: "${i.prefix}"で始まる必要があります`:i.format==="ends_with"?`無効な文字列: "${i.suffix}"で終わる必要があります`:i.format==="includes"?`無効な文字列: "${i.includes}"を含む必要があります`:i.format==="regex"?`無効な文字列: パターン${i.pattern}に一致する必要があります`:`無効な${o[i.format]??n.format}`}case"not_multiple_of":return`無効な数値: ${n.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${n.keys.length>1?"群":""}: ${H(n.keys,"、")}`;case"invalid_key":return`${n.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${n.origin}内の無効な値`;default:return"無効な入力"}}};function ND(){return{localeError:MD()}}const FD=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"რიცხვი";case"object":{if(Array.isArray(e))return"მასივი";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return{string:"სტრინგი",boolean:"ბულეანი",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"ფუნქცია"}[t]??t},LD=()=>{const e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function t(o){return e[o]??null}const r={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"};return o=>{switch(o.code){case"invalid_type":return`არასწორი შეყვანა: მოსალოდნელი ${o.expected}, მიღებული ${FD(o.input)}`;case"invalid_value":return o.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${$e(o.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${H(o.values,"|")}-დან`;case"too_big":{const n=o.inclusive?"<=":"<",i=t(o.origin);return i?`ზედმეტად დიდი: მოსალოდნელი ${o.origin??"მნიშვნელობა"} ${i.verb} ${n}${o.maximum.toString()} ${i.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${o.origin??"მნიშვნელობა"} იყოს ${n}${o.maximum.toString()}`}case"too_small":{const n=o.inclusive?">=":">",i=t(o.origin);return i?`ზედმეტად პატარა: მოსალოდნელი ${o.origin} ${i.verb} ${n}${o.minimum.toString()} ${i.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${o.origin} იყოს ${n}${o.minimum.toString()}`}case"invalid_format":{const n=o;return n.format==="starts_with"?`არასწორი სტრინგი: უნდა იწყებოდეს "${n.prefix}"-ით`:n.format==="ends_with"?`არასწორი სტრინგი: უნდა მთავრდებოდეს "${n.suffix}"-ით`:n.format==="includes"?`არასწორი სტრინგი: უნდა შეიცავდეს "${n.includes}"-ს`:n.format==="regex"?`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${n.pattern}`:`არასწორი ${r[n.format]??o.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${o.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${o.keys.length>1?"ები":"ი"}: ${H(o.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${o.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${o.origin}-ში`;default:return"არასწორი შეყვანა"}}};function UD(){return{localeError:LD()}}const BD=()=>{const e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"មិនមែនជាលេខ (NaN)":"លេខ";case"object":{if(Array.isArray(n))return"អារេ (Array)";if(n===null)return"គ្មានតម្លៃ (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"};return n=>{switch(n.code){case"invalid_type":return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${n.expected} ប៉ុន្តែទទួលបាន ${r(n.input)}`;case"invalid_value":return n.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${$e(n.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${H(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${i} ${n.maximum.toString()} ${a.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${i} ${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`តូចពេក៖ ត្រូវការ ${n.origin} ${i} ${n.minimum.toString()} ${a.unit}`:`តូចពេក៖ ត្រូវការ ${n.origin} ${i} ${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${i.prefix}"`:i.format==="ends_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${i.suffix}"`:i.format==="includes"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${i.includes}"`:i.format==="regex"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${i.pattern}`:`មិនត្រឹមត្រូវ៖ ${o[i.format]??n.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${n.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${H(n.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function pb(){return{localeError:BD()}}function VD(){return pb()}const WD=()=>{const e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"};return n=>{switch(n.code){case"invalid_type":return`잘못된 입력: 예상 타입은 ${n.expected}, 받은 타입은 ${r(n.input)}입니다`;case"invalid_value":return n.values.length===1?`잘못된 입력: 값은 ${$e(n.values[0])} 이어야 합니다`:`잘못된 옵션: ${H(n.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const i=n.inclusive?"이하":"미만",a=i==="미만"?"이어야 합니다":"여야 합니다",s=t(n.origin),l=s?.unit??"요소";return s?`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()}${l} ${i}${a}`:`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()} ${i}${a}`}case"too_small":{const i=n.inclusive?"이상":"초과",a=i==="이상"?"이어야 합니다":"여야 합니다",s=t(n.origin),l=s?.unit??"요소";return s?`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()}${l} ${i}${a}`:`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()} ${i}${a}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`잘못된 문자열: "${i.prefix}"(으)로 시작해야 합니다`:i.format==="ends_with"?`잘못된 문자열: "${i.suffix}"(으)로 끝나야 합니다`:i.format==="includes"?`잘못된 문자열: "${i.includes}"을(를) 포함해야 합니다`:i.format==="regex"?`잘못된 문자열: 정규식 ${i.pattern} 패턴과 일치해야 합니다`:`잘못된 ${o[i.format]??n.format}`}case"not_multiple_of":return`잘못된 숫자: ${n.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${H(n.keys,", ")}`;case"invalid_key":return`잘못된 키: ${n.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${n.origin}`;default:return"잘못된 입력"}}};function ZD(){return{localeError:WD()}}const GD=e=>fo(typeof e,e),fo=(e,t=void 0)=>{switch(e){case"number":return Number.isNaN(t)?"NaN":"skaičius";case"bigint":return"sveikasis skaičius";case"string":return"eilutė";case"boolean":return"loginė reikšmė";case"undefined":case"void":return"neapibrėžta reikšmė";case"function":return"funkcija";case"symbol":return"simbolis";case"object":return t===void 0?"nežinomas objektas":t===null?"nulinė reikšmė":Array.isArray(t)?"masyvas":Object.getPrototypeOf(t)!==Object.prototype&&t.constructor?t.constructor.name:"objektas";case"null":return"nulinė reikšmė"}return e},io=e=>e.charAt(0).toUpperCase()+e.slice(1);function Jp(e){const t=Math.abs(e),r=t%10,o=t%100;return o>=11&&o<=19||r===0?"many":r===1?"one":"few"}const HD=()=>{const e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function t(o,n,i,a){const s=e[o]??null;return s===null?s:{unit:s.unit[n],verb:s.verb[a][i?"inclusive":"notInclusive"]}}const r={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"};return o=>{switch(o.code){case"invalid_type":return`Gautas tipas ${GD(o.input)}, o tikėtasi - ${fo(o.expected)}`;case"invalid_value":return o.values.length===1?`Privalo būti ${$e(o.values[0])}`:`Privalo būti vienas iš ${H(o.values,"|")} pasirinkimų`;case"too_big":{const n=fo(o.origin),i=t(o.origin,Jp(Number(o.maximum)),o.inclusive??!1,"smaller");if(i?.verb)return`${io(n??o.origin??"reikšmė")} ${i.verb} ${o.maximum.toString()} ${i.unit??"elementų"}`;const a=o.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${io(n??o.origin??"reikšmė")} turi būti ${a} ${o.maximum.toString()} ${i?.unit}`}case"too_small":{const n=fo(o.origin),i=t(o.origin,Jp(Number(o.minimum)),o.inclusive??!1,"bigger");if(i?.verb)return`${io(n??o.origin??"reikšmė")} ${i.verb} ${o.minimum.toString()} ${i.unit??"elementų"}`;const a=o.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${io(n??o.origin??"reikšmė")} turi būti ${a} ${o.minimum.toString()} ${i?.unit}`}case"invalid_format":{const n=o;return n.format==="starts_with"?`Eilutė privalo prasidėti "${n.prefix}"`:n.format==="ends_with"?`Eilutė privalo pasibaigti "${n.suffix}"`:n.format==="includes"?`Eilutė privalo įtraukti "${n.includes}"`:n.format==="regex"?`Eilutė privalo atitikti ${n.pattern}`:`Neteisingas ${r[n.format]??o.format}`}case"not_multiple_of":return`Skaičius privalo būti ${o.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${o.keys.length>1?"i":"as"} rakt${o.keys.length>1?"ai":"as"}: ${H(o.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{const n=fo(o.origin);return`${io(n??o.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function KD(){return{localeError:HD()}}const qD=()=>{const e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"број";case"object":{if(Array.isArray(n))return"низа";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"};return n=>{switch(n.code){case"invalid_type":return`Грешен внес: се очекува ${n.expected}, примено ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${$e(n.values[0])}`:`Грешана опција: се очекува една ${H(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Премногу голем: се очекува ${n.origin??"вредноста"} да има ${i}${n.maximum.toString()} ${a.unit??"елементи"}`:`Премногу голем: се очекува ${n.origin??"вредноста"} да биде ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Премногу мал: се очекува ${n.origin} да има ${i}${n.minimum.toString()} ${a.unit}`:`Премногу мал: се очекува ${n.origin} да биде ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Неважечка низа: мора да започнува со "${i.prefix}"`:i.format==="ends_with"?`Неважечка низа: мора да завршува со "${i.suffix}"`:i.format==="includes"?`Неважечка низа: мора да вклучува "${i.includes}"`:i.format==="regex"?`Неважечка низа: мора да одгоара на патернот ${i.pattern}`:`Invalid ${o[i.format]??n.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${H(n.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${n.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${n.origin}`;default:return"Грешен внес"}}};function JD(){return{localeError:qD()}}const XD=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"nombor";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Input tidak sah: dijangka ${n.expected}, diterima ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${$e(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${H(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: dijangka ${n.origin??"nilai"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: dijangka ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${o[i.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${H(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};function YD(){return{localeError:XD()}}const QD=()=>{const e={string:{unit:"tekens",verb:"te hebben"},file:{unit:"bytes",verb:"te hebben"},array:{unit:"elementen",verb:"te hebben"},set:{unit:"elementen",verb:"te hebben"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"getal";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return n=>{switch(n.code){case"invalid_type":return`Ongeldige invoer: verwacht ${n.expected}, ontving ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${$e(n.values[0])}`:`Ongeldige optie: verwacht één van ${H(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Te groot: verwacht dat ${n.origin??"waarde"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"elementen"}`:`Te groot: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} is`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Te klein: verwacht dat ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Te klein: verwacht dat ${n.origin} ${i}${n.minimum.toString()} is`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${o[i.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${H(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};function eT(){return{localeError:QD()}}const tT=()=>{const e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"tall";case"object":{if(Array.isArray(n))return"liste";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Ugyldig input: forventet ${n.expected}, fikk ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${$e(n.values[0])}`:`Ugyldig valg: forventet en av ${H(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`For stor(t): forventet ${n.origin??"value"} til å ha ${i}${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til å ha ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`For lite(n): forventet ${n.origin} til å ha ${i}${n.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${n.origin} til å ha ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Ugyldig streng: må starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: må ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: må inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: må matche mønsteret ${i.pattern}`:`Ugyldig ${o[i.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${H(n.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function nT(){return{localeError:tT()}}const rT=()=>{const e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"numara";case"object":{if(Array.isArray(n))return"saf";if(n===null)return"gayb";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"};return n=>{switch(n.code){case"invalid_type":return`Fâsit giren: umulan ${n.expected}, alınan ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Fâsit giren: umulan ${$e(n.values[0])}`:`Fâsit tercih: mûteberler ${H(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Fazla büyük: ${n.origin??"value"}, ${i}${n.maximum.toString()} ${a.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${n.origin??"value"}, ${i}${n.maximum.toString()} olmalıydı.`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Fazla küçük: ${n.origin}, ${i}${n.minimum.toString()} ${a.unit} sahip olmalıydı.`:`Fazla küçük: ${n.origin}, ${i}${n.minimum.toString()} olmalıydı.`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Fâsit metin: "${i.prefix}" ile başlamalı.`:i.format==="ends_with"?`Fâsit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`Fâsit metin: "${i.includes}" ihtivâ etmeli.`:i.format==="regex"?`Fâsit metin: ${i.pattern} nakşına uymalı.`:`Fâsit ${o[i.format]??n.format}`}case"not_multiple_of":return`Fâsit sayı: ${n.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${n.keys.length>1?"s":""}: ${H(n.keys,", ")}`;case"invalid_key":return`${n.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${n.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function oT(){return{localeError:rT()}}const iT=()=>{const e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"عدد";case"object":{if(Array.isArray(n))return"ارې";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"};return n=>{switch(n.code){case"invalid_type":return`ناسم ورودي: باید ${n.expected} وای, مګر ${r(n.input)} ترلاسه شو`;case"invalid_value":return n.values.length===1?`ناسم ورودي: باید ${$e(n.values[0])} وای`:`ناسم انتخاب: باید یو له ${H(n.values,"|")} څخه وای`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`ډیر لوی: ${n.origin??"ارزښت"} باید ${i}${n.maximum.toString()} ${a.unit??"عنصرونه"} ولري`:`ډیر لوی: ${n.origin??"ارزښت"} باید ${i}${n.maximum.toString()} وي`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`ډیر کوچنی: ${n.origin} باید ${i}${n.minimum.toString()} ${a.unit} ولري`:`ډیر کوچنی: ${n.origin} باید ${i}${n.minimum.toString()} وي`}case"invalid_format":{const i=n;return i.format==="starts_with"?`ناسم متن: باید د "${i.prefix}" سره پیل شي`:i.format==="ends_with"?`ناسم متن: باید د "${i.suffix}" سره پای ته ورسيږي`:i.format==="includes"?`ناسم متن: باید "${i.includes}" ولري`:i.format==="regex"?`ناسم متن: باید د ${i.pattern} سره مطابقت ولري`:`${o[i.format]??n.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${n.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${n.keys.length>1?"کلیډونه":"کلیډ"}: ${H(n.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${n.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${n.origin} کې`;default:return"ناسمه ورودي"}}};function aT(){return{localeError:iT()}}const sT=()=>{const e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"liczba";case"object":{if(Array.isArray(n))return"tablica";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"};return n=>{switch(n.code){case"invalid_type":return`Nieprawidłowe dane wejściowe: oczekiwano ${n.expected}, otrzymano ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${$e(n.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${H(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Za duża wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${i}${n.maximum.toString()} ${a.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Za mała wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${i}${n.minimum.toString()} ${a.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${i.prefix}"`:i.format==="ends_with"?`Nieprawidłowy ciąg znaków: musi kończyć się na "${i.suffix}"`:i.format==="includes"?`Nieprawidłowy ciąg znaków: musi zawierać "${i.includes}"`:i.format==="regex"?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${i.pattern}`:`Nieprawidłow(y/a/e) ${o[i.format]??n.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${H(n.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${n.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${n.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function lT(){return{localeError:sT()}}const cT=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"número";case"object":{if(Array.isArray(n))return"array";if(n===null)return"nulo";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case"invalid_type":return`Tipo inválido: esperado ${n.expected}, recebido ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entrada inválida: esperado ${$e(n.values[0])}`:`Opção inválida: esperada uma das ${H(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${i}${n.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Muito pequeno: esperado que ${n.origin} tivesse ${i}${n.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Texto inválido: deve começar com "${i.prefix}"`:i.format==="ends_with"?`Texto inválido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inválido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inválido: deve corresponder ao padrão ${i.pattern}`:`${o[i.format]??n.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${H(n.keys,", ")}`;case"invalid_key":return`Chave inválida em ${n.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${n.origin}`;default:return"Campo inválido"}}};function uT(){return{localeError:cT()}}function Xp(e,t,r,o){const n=Math.abs(e),i=n%10,a=n%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?r:o}const dT=()=>{const e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"число";case"object":{if(Array.isArray(n))return"массив";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"};return n=>{switch(n.code){case"invalid_type":return`Неверный ввод: ожидалось ${n.expected}, получено ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Неверный ввод: ожидалось ${$e(n.values[0])}`:`Неверный вариант: ожидалось одно из ${H(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);if(a){const s=Number(n.maximum),l=Xp(s,a.unit.one,a.unit.few,a.unit.many);return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет иметь ${i}${n.maximum.toString()} ${l}`}return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);if(a){const s=Number(n.minimum),l=Xp(s,a.unit.one,a.unit.few,a.unit.many);return`Слишком маленькое значение: ожидалось, что ${n.origin} будет иметь ${i}${n.minimum.toString()} ${l}`}return`Слишком маленькое значение: ожидалось, что ${n.origin} будет ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Неверная строка: должна начинаться с "${i.prefix}"`:i.format==="ends_with"?`Неверная строка: должна заканчиваться на "${i.suffix}"`:i.format==="includes"?`Неверная строка: должна содержать "${i.includes}"`:i.format==="regex"?`Неверная строка: должна соответствовать шаблону ${i.pattern}`:`Неверный ${o[i.format]??n.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспознанн${n.keys.length>1?"ые":"ый"} ключ${n.keys.length>1?"и":""}: ${H(n.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${n.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${n.origin}`;default:return"Неверные входные данные"}}};function pT(){return{localeError:dT()}}const fT=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"število";case"object":{if(Array.isArray(n))return"tabela";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"};return n=>{switch(n.code){case"invalid_type":return`Neveljaven vnos: pričakovano ${n.expected}, prejeto ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Neveljaven vnos: pričakovano ${$e(n.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${H(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} imelo ${i}${n.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Premajhno: pričakovano, da bo ${n.origin} imelo ${i}${n.minimum.toString()} ${a.unit}`:`Premajhno: pričakovano, da bo ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Neveljaven niz: mora se začeti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se končati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${o[i.format]??n.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i ključi":" ključ"}: ${H(n.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};function mT(){return{localeError:fT()}}const hT=()=>{const e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"antal";case"object":{if(Array.isArray(n))return"lista";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return n=>{switch(n.code){case"invalid_type":return`Ogiltig inmatning: förväntat ${n.expected}, fick ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ogiltig inmatning: förväntat ${$e(n.values[0])}`:`Ogiltigt val: förväntade en av ${H(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`För stor(t): förväntade ${n.origin??"värdet"} att ha ${i}${n.maximum.toString()} ${a.unit??"element"}`:`För stor(t): förväntat ${n.origin??"värdet"} att ha ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`För lite(t): förväntade ${n.origin??"värdet"} att ha ${i}${n.minimum.toString()} ${a.unit}`:`För lite(t): förväntade ${n.origin??"värdet"} att ha ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Ogiltig sträng: måste börja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig sträng: måste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig sträng: måste innehålla "${i.includes}"`:i.format==="regex"?`Ogiltig sträng: måste matcha mönstret "${i.pattern}"`:`Ogiltig(t) ${o[i.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${H(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${n.origin??"värdet"}`;default:return"Ogiltig input"}}};function gT(){return{localeError:hT()}}const vT=()=>{const e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"எண் அல்லாதது":"எண்";case"object":{if(Array.isArray(n))return"அணி";if(n===null)return"வெறுமை";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${n.expected}, பெறப்பட்டது ${r(n.input)}`;case"invalid_value":return n.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${$e(n.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${H(n.values,"|")} இல் ஒன்று`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${i}${n.maximum.toString()} ${a.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${i}${n.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${i}${n.minimum.toString()} ${a.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${i}${n.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const i=n;return i.format==="starts_with"?`தவறான சரம்: "${i.prefix}" இல் தொடங்க வேண்டும்`:i.format==="ends_with"?`தவறான சரம்: "${i.suffix}" இல் முடிவடைய வேண்டும்`:i.format==="includes"?`தவறான சரம்: "${i.includes}" ஐ உள்ளடக்க வேண்டும்`:i.format==="regex"?`தவறான சரம்: ${i.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${o[i.format]??n.format}`}case"not_multiple_of":return`தவறான எண்: ${n.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${n.keys.length>1?"கள்":""}: ${H(n.keys,", ")}`;case"invalid_key":return`${n.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${n.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function bT(){return{localeError:vT()}}const yT=()=>{const e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"ไม่ใช่ตัวเลข (NaN)":"ตัวเลข";case"object":{if(Array.isArray(n))return"อาร์เรย์ (Array)";if(n===null)return"ไม่มีค่า (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"};return n=>{switch(n.code){case"invalid_type":return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${n.expected} แต่ได้รับ ${r(n.input)}`;case"invalid_value":return n.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${$e(n.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${H(n.values,"|")}`;case"too_big":{const i=n.inclusive?"ไม่เกิน":"น้อยกว่า",a=t(n.origin);return a?`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${i} ${n.maximum.toString()} ${a.unit??"รายการ"}`:`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${i} ${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?"อย่างน้อย":"มากกว่า",a=t(n.origin);return a?`น้อยกว่ากำหนด: ${n.origin} ควรมี${i} ${n.minimum.toString()} ${a.unit}`:`น้อยกว่ากำหนด: ${n.origin} ควรมี${i} ${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${i.prefix}"`:i.format==="ends_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${i.suffix}"`:i.format==="includes"?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${i.includes}" อยู่ในข้อความ`:i.format==="regex"?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${i.pattern}`:`รูปแบบไม่ถูกต้อง: ${o[i.format]??n.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${n.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${H(n.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${n.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${n.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function xT(){return{localeError:yT()}}const ST=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},wT=()=>{const e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function t(o){return e[o]??null}const r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"};return o=>{switch(o.code){case"invalid_type":return`Geçersiz değer: beklenen ${o.expected}, alınan ${ST(o.input)}`;case"invalid_value":return o.values.length===1?`Geçersiz değer: beklenen ${$e(o.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${H(o.values,"|")}`;case"too_big":{const n=o.inclusive?"<=":"<",i=t(o.origin);return i?`Çok büyük: beklenen ${o.origin??"değer"} ${n}${o.maximum.toString()} ${i.unit??"öğe"}`:`Çok büyük: beklenen ${o.origin??"değer"} ${n}${o.maximum.toString()}`}case"too_small":{const n=o.inclusive?">=":">",i=t(o.origin);return i?`Çok küçük: beklenen ${o.origin} ${n}${o.minimum.toString()} ${i.unit}`:`Çok küçük: beklenen ${o.origin} ${n}${o.minimum.toString()}`}case"invalid_format":{const n=o;return n.format==="starts_with"?`Geçersiz metin: "${n.prefix}" ile başlamalı`:n.format==="ends_with"?`Geçersiz metin: "${n.suffix}" ile bitmeli`:n.format==="includes"?`Geçersiz metin: "${n.includes}" içermeli`:n.format==="regex"?`Geçersiz metin: ${n.pattern} desenine uymalı`:`Geçersiz ${r[n.format]??o.format}`}case"not_multiple_of":return`Geçersiz sayı: ${o.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${o.keys.length>1?"lar":""}: ${H(o.keys,", ")}`;case"invalid_key":return`${o.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${o.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function $T(){return{localeError:wT()}}const IT=()=>{const e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"число";case"object":{if(Array.isArray(n))return"масив";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"};return n=>{switch(n.code){case"invalid_type":return`Неправильні вхідні дані: очікується ${n.expected}, отримано ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Неправильні вхідні дані: очікується ${$e(n.values[0])}`:`Неправильна опція: очікується одне з ${H(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Занадто велике: очікується, що ${n.origin??"значення"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"елементів"}`:`Занадто велике: очікується, що ${n.origin??"значення"} буде ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Занадто мале: очікується, що ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Занадто мале: очікується, що ${n.origin} буде ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Неправильний рядок: повинен починатися з "${i.prefix}"`:i.format==="ends_with"?`Неправильний рядок: повинен закінчуватися на "${i.suffix}"`:i.format==="includes"?`Неправильний рядок: повинен містити "${i.includes}"`:i.format==="regex"?`Неправильний рядок: повинен відповідати шаблону ${i.pattern}`:`Неправильний ${o[i.format]??n.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${n.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${n.keys.length>1?"і":""}: ${H(n.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${n.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${n.origin}`;default:return"Неправильні вхідні дані"}}};function fb(){return{localeError:IT()}}function kT(){return fb()}const _T=()=>{const e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"نمبر";case"object":{if(Array.isArray(n))return"آرے";if(n===null)return"نل";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"};return n=>{switch(n.code){case"invalid_type":return`غلط ان پٹ: ${n.expected} متوقع تھا، ${r(n.input)} موصول ہوا`;case"invalid_value":return n.values.length===1?`غلط ان پٹ: ${$e(n.values[0])} متوقع تھا`:`غلط آپشن: ${H(n.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`بہت بڑا: ${n.origin??"ویلیو"} کے ${i}${n.maximum.toString()} ${a.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${n.origin??"ویلیو"} کا ${i}${n.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`بہت چھوٹا: ${n.origin} کے ${i}${n.minimum.toString()} ${a.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${n.origin} کا ${i}${n.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const i=n;return i.format==="starts_with"?`غلط سٹرنگ: "${i.prefix}" سے شروع ہونا چاہیے`:i.format==="ends_with"?`غلط سٹرنگ: "${i.suffix}" پر ختم ہونا چاہیے`:i.format==="includes"?`غلط سٹرنگ: "${i.includes}" شامل ہونا چاہیے`:i.format==="regex"?`غلط سٹرنگ: پیٹرن ${i.pattern} سے میچ ہونا چاہیے`:`غلط ${o[i.format]??n.format}`}case"not_multiple_of":return`غلط نمبر: ${n.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${n.keys.length>1?"ز":""}: ${H(n.keys,"، ")}`;case"invalid_key":return`${n.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${n.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function CT(){return{localeError:_T()}}const ET=()=>{const e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"số";case"object":{if(Array.isArray(n))return"mảng";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"};return n=>{switch(n.code){case"invalid_type":return`Đầu vào không hợp lệ: mong đợi ${n.expected}, nhận được ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Đầu vào không hợp lệ: mong đợi ${$e(n.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${H(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Quá lớn: mong đợi ${n.origin??"giá trị"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"phần tử"}`:`Quá lớn: mong đợi ${n.origin??"giá trị"} ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Quá nhỏ: mong đợi ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Quá nhỏ: mong đợi ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Chuỗi không hợp lệ: phải bắt đầu bằng "${i.prefix}"`:i.format==="ends_with"?`Chuỗi không hợp lệ: phải kết thúc bằng "${i.suffix}"`:i.format==="includes"?`Chuỗi không hợp lệ: phải bao gồm "${i.includes}"`:i.format==="regex"?`Chuỗi không hợp lệ: phải khớp với mẫu ${i.pattern}`:`${o[i.format]??n.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${n.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${H(n.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${n.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${n.origin}`;default:return"Đầu vào không hợp lệ"}}};function PT(){return{localeError:ET()}}const jT=()=>{const e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"非数字(NaN)":"数字";case"object":{if(Array.isArray(n))return"数组";if(n===null)return"空值(null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"};return n=>{switch(n.code){case"invalid_type":return`无效输入:期望 ${n.expected},实际接收 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`无效输入:期望 ${$e(n.values[0])}`:`无效选项:期望以下之一 ${H(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`数值过大:期望 ${n.origin??"值"} ${i}${n.maximum.toString()} ${a.unit??"个元素"}`:`数值过大:期望 ${n.origin??"值"} ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`数值过小:期望 ${n.origin} ${i}${n.minimum.toString()} ${a.unit}`:`数值过小:期望 ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`无效字符串:必须以 "${i.prefix}" 开头`:i.format==="ends_with"?`无效字符串:必须以 "${i.suffix}" 结尾`:i.format==="includes"?`无效字符串:必须包含 "${i.includes}"`:i.format==="regex"?`无效字符串:必须满足正则表达式 ${i.pattern}`:`无效${o[i.format]??n.format}`}case"not_multiple_of":return`无效数字:必须是 ${n.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${H(n.keys,", ")}`;case"invalid_key":return`${n.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${n.origin} 中包含无效值(value)`;default:return"无效输入"}}};function OT(){return{localeError:jT()}}const RT=()=>{const e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"};return n=>{switch(n.code){case"invalid_type":return`無效的輸入值:預期為 ${n.expected},但收到 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`無效的輸入值:預期為 ${$e(n.values[0])}`:`無效的選項:預期為以下其中之一 ${H(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`數值過大:預期 ${n.origin??"值"} 應為 ${i}${n.maximum.toString()} ${a.unit??"個元素"}`:`數值過大:預期 ${n.origin??"值"} 應為 ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`數值過小:預期 ${n.origin} 應為 ${i}${n.minimum.toString()} ${a.unit}`:`數值過小:預期 ${n.origin} 應為 ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`無效的字串:必須以 "${i.prefix}" 開頭`:i.format==="ends_with"?`無效的字串:必須以 "${i.suffix}" 結尾`:i.format==="includes"?`無效的字串:必須包含 "${i.includes}"`:i.format==="regex"?`無效的字串:必須符合格式 ${i.pattern}`:`無效的 ${o[i.format]??n.format}`}case"not_multiple_of":return`無效的數字:必須為 ${n.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${n.keys.length>1?"們":""}:${H(n.keys,"、")}`;case"invalid_key":return`${n.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${n.origin} 中有無效的值`;default:return"無效的輸入值"}}};function DT(){return{localeError:RT()}}const TT=()=>{const e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function t(n){return e[n]??null}const r=n=>{const i=typeof n;switch(i){case"number":return Number.isNaN(n)?"NaN":"nọ́mbà";case"object":{if(Array.isArray(n))return"akopọ";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"};return n=>{switch(n.code){case"invalid_type":return`Ìbáwọlé aṣìṣe: a ní láti fi ${n.expected}, àmọ̀ a rí ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${$e(n.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${H(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Tó pọ̀ jù: a ní láti jẹ́ pé ${n.origin??"iye"} ${a.verb} ${i}${n.maximum} ${a.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${i}${n.maximum}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Kéré ju: a ní láti jẹ́ pé ${n.origin} ${a.verb} ${i}${n.minimum} ${a.unit}`:`Kéré ju: a ní láti jẹ́ ${i}${n.minimum}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${i.prefix}"`:i.format==="ends_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${i.suffix}"`:i.format==="includes"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${i.includes}"`:i.format==="regex"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${i.pattern}`:`Aṣìṣe: ${o[i.format]??n.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${n.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${H(n.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${n.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${n.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function zT(){return{localeError:TT()}}const mb=Object.freeze(Object.defineProperty({__proto__:null,ar:qR,az:XR,be:QR,bg:nD,ca:oD,cs:aD,da:lD,de:uD,en:db,eo:hD,es:vD,fa:yD,fi:SD,fr:$D,frCA:kD,he:CD,hu:PD,id:OD,is:TD,it:AD,ja:ND,ka:UD,kh:VD,km:pb,ko:ZD,lt:KD,mk:JD,ms:YD,nl:eT,no:nT,ota:oT,pl:lT,ps:aT,pt:uT,ru:pT,sl:mT,sv:gT,ta:bT,th:xT,tr:$T,ua:kT,uk:fb,ur:CT,vi:PT,yo:zT,zhCN:OT,zhTW:DT},Symbol.toStringTag,{value:"Module"}));var Yp;const hb=Symbol("ZodOutput"),gb=Symbol("ZodInput");class fc{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const o=r[0];if(this._map.set(t,o),o&&typeof o=="object"&&"id"in o){if(this._idmap.has(o.id))throw new Error(`ID ${o.id} already exists in the registry`);this._idmap.set(o.id,t)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const o={...this.get(r)??{}};delete o.id;const n={...o,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function mc(){return new fc}(Yp=globalThis).__zod_globalRegistry??(Yp.__zod_globalRegistry=mc());const Xt=globalThis.__zod_globalRegistry;function vb(e,t){return new e({type:"string",...U(t)})}function bb(e,t){return new e({type:"string",coerce:!0,...U(t)})}function hc(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...U(t)})}function Yi(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...U(t)})}function gc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...U(t)})}function vc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...U(t)})}function bc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...U(t)})}function yc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...U(t)})}function Ea(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...U(t)})}function xc(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...U(t)})}function Sc(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...U(t)})}function wc(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...U(t)})}function $c(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...U(t)})}function Ic(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...U(t)})}function kc(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...U(t)})}function _c(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...U(t)})}function Cc(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...U(t)})}function Ec(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...U(t)})}function yb(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...U(t)})}function Pc(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...U(t)})}function jc(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...U(t)})}function Oc(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...U(t)})}function Rc(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...U(t)})}function Dc(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...U(t)})}function Tc(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...U(t)})}const xb={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Sb(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...U(t)})}function wb(e,t){return new e({type:"string",format:"date",check:"string_format",...U(t)})}function $b(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...U(t)})}function Ib(e,t){return new e({type:"string",format:"duration",check:"string_format",...U(t)})}function kb(e,t){return new e({type:"number",checks:[],...U(t)})}function _b(e,t){return new e({type:"number",coerce:!0,checks:[],...U(t)})}function Cb(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...U(t)})}function Eb(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...U(t)})}function Pb(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...U(t)})}function jb(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...U(t)})}function Ob(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...U(t)})}function Rb(e,t){return new e({type:"boolean",...U(t)})}function Db(e,t){return new e({type:"boolean",coerce:!0,...U(t)})}function Tb(e,t){return new e({type:"bigint",...U(t)})}function zb(e,t){return new e({type:"bigint",coerce:!0,...U(t)})}function Ab(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...U(t)})}function Mb(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...U(t)})}function Nb(e,t){return new e({type:"symbol",...U(t)})}function Fb(e,t){return new e({type:"undefined",...U(t)})}function Lb(e,t){return new e({type:"null",...U(t)})}function Ub(e){return new e({type:"any"})}function Bb(e){return new e({type:"unknown"})}function Vb(e,t){return new e({type:"never",...U(t)})}function Wb(e,t){return new e({type:"void",...U(t)})}function Zb(e,t){return new e({type:"date",...U(t)})}function Gb(e,t){return new e({type:"date",coerce:!0,...U(t)})}function Hb(e,t){return new e({type:"nan",...U(t)})}function dr(e,t){return new oc({check:"less_than",...U(t),value:e,inclusive:!1})}function Qt(e,t){return new oc({check:"less_than",...U(t),value:e,inclusive:!0})}function pr(e,t){return new ic({check:"greater_than",...U(t),value:e,inclusive:!1})}function Pt(e,t){return new ic({check:"greater_than",...U(t),value:e,inclusive:!0})}function Kb(e){return pr(0,e)}function qb(e){return dr(0,e)}function Jb(e){return Qt(0,e)}function Xb(e){return Pt(0,e)}function To(e,t){return new Dg({check:"multiple_of",...U(t),value:e})}function Pa(e,t){return new Ag({check:"max_size",...U(t),maximum:e})}function zo(e,t){return new Mg({check:"min_size",...U(t),minimum:e})}function zc(e,t){return new Ng({check:"size_equals",...U(t),size:e})}function ja(e,t){return new Fg({check:"max_length",...U(t),maximum:e})}function Br(e,t){return new Lg({check:"min_length",...U(t),minimum:e})}function Oa(e,t){return new Ug({check:"length_equals",...U(t),length:e})}function Ac(e,t){return new Bg({check:"string_format",format:"regex",...U(t),pattern:e})}function Mc(e){return new Vg({check:"string_format",format:"lowercase",...U(e)})}function Nc(e){return new Wg({check:"string_format",format:"uppercase",...U(e)})}function Fc(e,t){return new Zg({check:"string_format",format:"includes",...U(t),includes:e})}function Lc(e,t){return new Gg({check:"string_format",format:"starts_with",...U(t),prefix:e})}function Uc(e,t){return new Hg({check:"string_format",format:"ends_with",...U(t),suffix:e})}function Yb(e,t,r){return new Kg({check:"property",property:e,schema:t,...U(r)})}function Bc(e,t){return new qg({check:"mime_type",mime:e,...U(t)})}function Zn(e){return new Jg({check:"overwrite",tx:e})}function Vc(e){return Zn(t=>t.normalize(e))}function Wc(){return Zn(e=>e.trim())}function Zc(){return Zn(e=>e.toLowerCase())}function Gc(){return Zn(e=>e.toUpperCase())}function Hc(){return Zn(e=>Ph(e))}function Qb(e,t,r){return new e({type:"array",element:t,...U(r)})}function AT(e,t,r){return new e({type:"union",options:t,...U(r)})}function MT(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...U(o)})}function NT(e,t,r){return new e({type:"intersection",left:t,right:r})}function FT(e,t,r,o){const n=r instanceof Ce,i=n?o:r,a=n?r:null;return new e({type:"tuple",items:t,rest:a,...U(i)})}function LT(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...U(o)})}function UT(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...U(o)})}function BT(e,t,r){return new e({type:"set",valueType:t,...U(r)})}function VT(e,t,r){const o=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:o,...U(r)})}function WT(e,t,r){return new e({type:"enum",entries:t,...U(r)})}function ZT(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...U(r)})}function ey(e,t){return new e({type:"file",...U(t)})}function GT(e,t){return new e({type:"transform",transform:t})}function HT(e,t){return new e({type:"optional",innerType:t})}function KT(e,t){return new e({type:"nullable",innerType:t})}function qT(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():ka(r)}})}function JT(e,t,r){return new e({type:"nonoptional",innerType:t,...U(r)})}function XT(e,t){return new e({type:"success",innerType:t})}function YT(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function QT(e,t,r){return new e({type:"pipe",in:t,out:r})}function ez(e,t){return new e({type:"readonly",innerType:t})}function tz(e,t,r){return new e({type:"template_literal",parts:t,...U(r)})}function nz(e,t){return new e({type:"lazy",getter:t})}function rz(e,t){return new e({type:"promise",innerType:t})}function ty(e,t,r){const o=U(r);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function ny(e,t,r){return new e({type:"custom",check:"custom",fn:t,...U(r)})}function ry(e){const t=oy(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(Lr(o,r.value,t._zod.def));else{const n=o;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=t),n.continue??(n.continue=!t._zod.def.abort),r.issues.push(Lr(n))}},e(r.value,r)));return t}function oy(e,t){const r=new ot({check:"custom",...U(t)});return r._zod.check=e,r}function iy(e){const t=new ot({check:"describe"});return t._zod.onattach=[r=>{const o=Xt.get(r)??{};Xt.add(r,{...o,description:e})}],t._zod.check=()=>{},t}function ay(e){const t=new ot({check:"meta"});return t._zod.onattach=[r=>{const o=Xt.get(r)??{};Xt.add(r,{...o,...e})}],t._zod.check=()=>{},t}function sy(e,t){const r=U(t);let o=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(o=o.map(m=>typeof m=="string"?m.toLowerCase():m),n=n.map(m=>typeof m=="string"?m.toLowerCase():m));const i=new Set(o),a=new Set(n),s=e.Codec??pc,l=e.Boolean??lc,c=e.String??Xo,u=new c({type:"string",error:r.error}),d=new l({type:"boolean",error:r.error}),p=new s({type:"pipe",in:u,out:d,transform:((m,h)=>{let g=m;return r.case!=="sensitive"&&(g=g.toLowerCase()),i.has(g)?!0:a.has(g)?!1:(h.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:h.value,inst:p,continue:!1}),{})}),reverseTransform:((m,h)=>m===!0?o[0]||"true":n[0]||"false"),error:r.error});return p}function Yo(e,t,r,o={}){const n=U(o),i={...U(o),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:s=>r.test(s),...n};return r instanceof RegExp&&(i.pattern=r),new e(i)}class Ls{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??Xt,this.target=t?.target??"draft-2020-12",this.unrepresentable=t?.unrepresentable??"throw",this.override=t?.override??(()=>{}),this.io=t?.io??"output",this.seen=new Map}process(t,r={path:[],schemaPath:[]}){var o;const n=t._zod.def,i={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},a=this.seen.get(t);if(a)return a.count++,r.schemaPath.includes(t)&&(a.cycle=r.path),a.schema;const s={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(t,s);const l=t._zod.toJSONSchema?.();if(l)s.schema=l;else{const d={...r,schemaPath:[...r.schemaPath,t],path:r.path},p=t._zod.parent;if(p)s.ref=p,this.process(p,d),this.seen.get(p).isParent=!0;else{const m=s.schema;switch(n.type){case"string":{const h=m;h.type="string";const{minimum:g,maximum:v,format:y,patterns:S,contentEncoding:w}=t._zod.bag;if(typeof g=="number"&&(h.minLength=g),typeof v=="number"&&(h.maxLength=v),y&&(h.format=i[y]??y,h.format===""&&delete h.format),w&&(h.contentEncoding=w),S&&S.size>0){const x=[...S];x.length===1?h.pattern=x[0].source:x.length>1&&(s.schema.allOf=[...x.map($=>({...this.target==="draft-7"||this.target==="draft-4"||this.target==="openapi-3.0"?{type:"string"}:{},pattern:$.source}))])}break}case"number":{const h=m,{minimum:g,maximum:v,format:y,multipleOf:S,exclusiveMaximum:w,exclusiveMinimum:x}=t._zod.bag;typeof y=="string"&&y.includes("int")?h.type="integer":h.type="number",typeof x=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(h.minimum=x,h.exclusiveMinimum=!0):h.exclusiveMinimum=x),typeof g=="number"&&(h.minimum=g,typeof x=="number"&&this.target!=="draft-4"&&(x>=g?delete h.minimum:delete h.exclusiveMinimum)),typeof w=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(h.maximum=w,h.exclusiveMaximum=!0):h.exclusiveMaximum=w),typeof v=="number"&&(h.maximum=v,typeof w=="number"&&this.target!=="draft-4"&&(w<=v?delete h.maximum:delete h.exclusiveMaximum)),typeof S=="number"&&(h.multipleOf=S);break}case"boolean":{const h=m;h.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{this.target==="openapi-3.0"?(m.type="string",m.nullable=!0,m.enum=[null]):m.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{m.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{const h=m,{minimum:g,maximum:v}=t._zod.bag;typeof g=="number"&&(h.minItems=g),typeof v=="number"&&(h.maxItems=v),h.type="array",h.items=this.process(n.element,{...d,path:[...d.path,"items"]});break}case"object":{const h=m;h.type="object",h.properties={};const g=n.shape;for(const S in g)h.properties[S]=this.process(g[S],{...d,path:[...d.path,"properties",S]});const v=new Set(Object.keys(g)),y=new Set([...v].filter(S=>{const w=n.shape[S]._zod;return this.io==="input"?w.optin===void 0:w.optout===void 0}));y.size>0&&(h.required=Array.from(y)),n.catchall?._zod.def.type==="never"?h.additionalProperties=!1:n.catchall?n.catchall&&(h.additionalProperties=this.process(n.catchall,{...d,path:[...d.path,"additionalProperties"]})):this.io==="output"&&(h.additionalProperties=!1);break}case"union":{const h=m,g=n.discriminator!==void 0,v=n.options.map((y,S)=>this.process(y,{...d,path:[...d.path,g?"oneOf":"anyOf",S]}));g?h.oneOf=v:h.anyOf=v;break}case"intersection":{const h=m,g=this.process(n.left,{...d,path:[...d.path,"allOf",0]}),v=this.process(n.right,{...d,path:[...d.path,"allOf",1]}),y=w=>"allOf"in w&&Object.keys(w).length===1,S=[...y(g)?g.allOf:[g],...y(v)?v.allOf:[v]];h.allOf=S;break}case"tuple":{const h=m;h.type="array";const g=this.target==="draft-2020-12"?"prefixItems":"items",v=this.target==="draft-2020-12"||this.target==="openapi-3.0"?"items":"additionalItems",y=n.items.map(($,I)=>this.process($,{...d,path:[...d.path,g,I]})),S=n.rest?this.process(n.rest,{...d,path:[...d.path,v,...this.target==="openapi-3.0"?[n.items.length]:[]]}):null;this.target==="draft-2020-12"?(h.prefixItems=y,S&&(h.items=S)):this.target==="openapi-3.0"?(h.items={anyOf:y},S&&h.items.anyOf.push(S),h.minItems=y.length,S||(h.maxItems=y.length)):(h.items=y,S&&(h.additionalItems=S));const{minimum:w,maximum:x}=t._zod.bag;typeof w=="number"&&(h.minItems=w),typeof x=="number"&&(h.maxItems=x);break}case"record":{const h=m;h.type="object",(this.target==="draft-7"||this.target==="draft-2020-12")&&(h.propertyNames=this.process(n.keyType,{...d,path:[...d.path,"propertyNames"]})),h.additionalProperties=this.process(n.valueType,{...d,path:[...d.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{const h=m,g=Vl(n.entries);g.every(v=>typeof v=="number")&&(h.type="number"),g.every(v=>typeof v=="string")&&(h.type="string"),h.enum=g;break}case"literal":{const h=m,g=[];for(const v of n.values)if(v===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof v=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");g.push(Number(v))}else g.push(v);if(g.length!==0)if(g.length===1){const v=g[0];h.type=v===null?"null":typeof v,this.target==="draft-4"||this.target==="openapi-3.0"?h.enum=[v]:h.const=v}else g.every(v=>typeof v=="number")&&(h.type="number"),g.every(v=>typeof v=="string")&&(h.type="string"),g.every(v=>typeof v=="boolean")&&(h.type="string"),g.every(v=>v===null)&&(h.type="null"),h.enum=g;break}case"file":{const h=m,g={type:"string",format:"binary",contentEncoding:"binary"},{minimum:v,maximum:y,mime:S}=t._zod.bag;v!==void 0&&(g.minLength=v),y!==void 0&&(g.maxLength=y),S?S.length===1?(g.contentMediaType=S[0],Object.assign(h,g)):h.anyOf=S.map(w=>({...g,contentMediaType:w})):Object.assign(h,g);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{const h=this.process(n.innerType,d);this.target==="openapi-3.0"?(s.ref=n.innerType,m.nullable=!0):m.anyOf=[h,{type:"null"}];break}case"nonoptional":{this.process(n.innerType,d),s.ref=n.innerType;break}case"success":{const h=m;h.type="boolean";break}case"default":{this.process(n.innerType,d),s.ref=n.innerType,m.default=JSON.parse(JSON.stringify(n.defaultValue));break}case"prefault":{this.process(n.innerType,d),s.ref=n.innerType,this.io==="input"&&(m._prefault=JSON.parse(JSON.stringify(n.defaultValue)));break}case"catch":{this.process(n.innerType,d),s.ref=n.innerType;let h;try{h=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}m.default=h;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{const h=m,g=t._zod.pattern;if(!g)throw new Error("Pattern not found in template literal");h.type="string",h.pattern=g.source;break}case"pipe":{const h=this.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;this.process(h,d),s.ref=h;break}case"readonly":{this.process(n.innerType,d),s.ref=n.innerType,m.readOnly=!0;break}case"promise":{this.process(n.innerType,d),s.ref=n.innerType;break}case"optional":{this.process(n.innerType,d),s.ref=n.innerType;break}case"lazy":{const h=t._zod.innerType;this.process(h,d),s.ref=h;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}case"function":{if(this.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema");break}}}}const c=this.metadataRegistry.get(t);return c&&Object.assign(s.schema,c),this.io==="input"&&St(t)&&(delete s.schema.examples,delete s.schema.default),this.io==="input"&&s.schema._prefault&&((o=s.schema).default??(o.default=s.schema._prefault)),delete s.schema._prefault,this.seen.get(t).schema}emit(t,r){const o={cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0},n=this.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=u=>{const d=this.target==="draft-2020-12"?"$defs":"definitions";if(o.external){const g=o.external.registry.get(u[0])?.id,v=o.external.uri??(S=>S);if(g)return{ref:v(g)};const y=u[1].defId??u[1].schema.id??`schema${this.counter++}`;return u[1].defId=y,{defId:y,ref:`${v("__shared")}#/${d}/${y}`}}if(u[1]===n)return{ref:"#"};const m=`#/${d}/`,h=u[1].schema.id??`__schema${this.counter++}`;return{defId:h,ref:m+h}},a=u=>{if(u[1].schema.$ref)return;const d=u[1],{ref:p,defId:m}=i(u);d.def={...d.schema},m&&(d.defId=m);const h=d.schema;for(const g in h)delete h[g];h.$ref=p};if(o.cycles==="throw")for(const u of this.seen.entries()){const d=u[1];if(d.cycle)throw new Error(`Cycle detected: #/${d.cycle?.join("/")}/<root>
|
|
181
|
+
|
|
182
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const u of this.seen.entries()){const d=u[1];if(t===u[0]){a(u);continue}if(o.external){const m=o.external.registry.get(u[0])?.id;if(t!==u[0]&&m){a(u);continue}}if(this.metadataRegistry.get(u[0])?.id){a(u);continue}if(d.cycle){a(u);continue}if(d.count>1&&o.reused==="ref"){a(u);continue}}const s=(u,d)=>{const p=this.seen.get(u),m=p.def??p.schema,h={...m};if(p.ref===null)return;const g=p.ref;if(p.ref=null,g){s(g,d);const v=this.seen.get(g).schema;v.$ref&&(d.target==="draft-7"||d.target==="draft-4"||d.target==="openapi-3.0")?(m.allOf=m.allOf??[],m.allOf.push(v)):(Object.assign(m,v),Object.assign(m,h))}p.isParent||this.override({zodSchema:u,jsonSchema:m,path:p.path??[]})};for(const u of[...this.seen.entries()].reverse())s(u[0],{target:this.target});const l={};if(this.target==="draft-2020-12"?l.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?l.$schema="http://json-schema.org/draft-07/schema#":this.target==="draft-4"?l.$schema="http://json-schema.org/draft-04/schema#":this.target==="openapi-3.0"||console.warn(`Invalid target: ${this.target}`),o.external?.uri){const u=o.external.registry.get(t)?.id;if(!u)throw new Error("Schema is missing an `id` property");l.$id=o.external.uri(u)}Object.assign(l,n.def);const c=o.external?.defs??{};for(const u of this.seen.entries()){const d=u[1];d.def&&d.defId&&(c[d.defId]=d.def)}o.external||Object.keys(c).length>0&&(this.target==="draft-2020-12"?l.$defs=c:l.definitions=c);try{return JSON.parse(JSON.stringify(l))}catch{throw new Error("Error converting schema to JSON.")}}}function ly(e,t){if(e instanceof fc){const o=new Ls(t),n={};for(const s of e._idmap.entries()){const[l,c]=s;o.process(c)}const i={},a={registry:e,uri:t?.uri,defs:n};for(const s of e._idmap.entries()){const[l,c]=s;i[l]=o.emit(c,{...t,external:a})}if(Object.keys(n).length>0){const s=o.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[s]:n}}return{schemas:i}}const r=new Ls(t);return r.process(e),r.emit(e,t)}function St(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return St(o.element,r);if(o.type==="set")return St(o.valueType,r);if(o.type==="lazy")return St(o.getter(),r);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return St(o.innerType,r);if(o.type==="intersection")return St(o.left,r)||St(o.right,r);if(o.type==="record"||o.type==="map")return St(o.keyType,r)||St(o.valueType,r);if(o.type==="pipe")return St(o.in,r)||St(o.out,r);if(o.type==="object"){for(const n in o.shape)if(St(o.shape[n],r))return!0;return!1}if(o.type==="union"){for(const n of o.options)if(St(n,r))return!0;return!1}if(o.type==="tuple"){for(const n of o.items)if(St(n,r))return!0;return!!(o.rest&&St(o.rest,r))}return!1}const oz=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),iz=Object.freeze(Object.defineProperty({__proto__:null,$ZodAny:Ov,$ZodArray:Av,$ZodAsyncError:ir,$ZodBase64:yv,$ZodBase64URL:Sv,$ZodBigInt:cc,$ZodBigIntFormat:Cv,$ZodBoolean:lc,$ZodCIDRv4:vv,$ZodCIDRv6:bv,$ZodCUID:iv,$ZodCUID2:av,$ZodCatch:nb,$ZodCheck:ot,$ZodCheckBigIntFormat:zg,$ZodCheckEndsWith:Hg,$ZodCheckGreaterThan:ic,$ZodCheckIncludes:Zg,$ZodCheckLengthEquals:Ug,$ZodCheckLessThan:oc,$ZodCheckLowerCase:Vg,$ZodCheckMaxLength:Fg,$ZodCheckMaxSize:Ag,$ZodCheckMimeType:qg,$ZodCheckMinLength:Lg,$ZodCheckMinSize:Mg,$ZodCheckMultipleOf:Dg,$ZodCheckNumberFormat:Tg,$ZodCheckOverwrite:Jg,$ZodCheckProperty:Kg,$ZodCheckRegex:Bg,$ZodCheckSizeEquals:Ng,$ZodCheckStartsWith:Gg,$ZodCheckStringFormat:Jo,$ZodCheckUpperCase:Wg,$ZodCodec:pc,$ZodCustom:ub,$ZodCustomStringFormat:kv,$ZodDate:zv,$ZodDefault:Yv,$ZodDiscriminatedUnion:Uv,$ZodE164:wv,$ZodEmail:tv,$ZodEmoji:rv,$ZodEncodeError:$a,$ZodEnum:Gv,$ZodError:Zl,$ZodFile:Kv,$ZodFunction:sb,$ZodGUID:Qg,$ZodIPv4:mv,$ZodIPv6:hv,$ZodISODate:dv,$ZodISODateTime:uv,$ZodISODuration:fv,$ZodISOTime:pv,$ZodIntersection:Bv,$ZodJWT:Iv,$ZodKSUID:cv,$ZodLazy:cb,$ZodLiteral:Hv,$ZodMAC:gv,$ZodMap:Wv,$ZodNaN:rb,$ZodNanoID:ov,$ZodNever:Dv,$ZodNonOptional:eb,$ZodNull:jv,$ZodNullable:Xv,$ZodNumber:sc,$ZodNumberFormat:_v,$ZodObject:Fv,$ZodObjectJIT:Lv,$ZodOptional:Jv,$ZodPipe:ob,$ZodPrefault:Qv,$ZodPromise:lb,$ZodReadonly:ib,$ZodRealError:Tt,$ZodRecord:Vv,$ZodRegistry:fc,$ZodSet:Zv,$ZodString:Xo,$ZodStringFormat:Qe,$ZodSuccess:tb,$ZodSymbol:Ev,$ZodTemplateLiteral:ab,$ZodTransform:qv,$ZodTuple:dc,$ZodType:Ce,$ZodULID:sv,$ZodURL:nv,$ZodUUID:ev,$ZodUndefined:Pv,$ZodUnion:uc,$ZodUnknown:Rv,$ZodVoid:Tv,$ZodXID:lv,$brand:Ch,$constructor:R,$input:gb,$output:hb,Doc:Xg,JSONSchema:oz,JSONSchemaGenerator:Ls,NEVER:_h,TimePrecision:xb,_any:Ub,_array:Qb,_base64:Oc,_base64url:Rc,_bigint:Tb,_boolean:Rb,_catch:YT,_check:oy,_cidrv4:Pc,_cidrv6:jc,_coercedBigint:zb,_coercedBoolean:Db,_coercedDate:Gb,_coercedNumber:_b,_coercedString:bb,_cuid:wc,_cuid2:$c,_custom:ty,_date:Zb,_decode:ql,_decodeAsync:Xl,_default:qT,_discriminatedUnion:MT,_e164:Dc,_email:hc,_emoji:xc,_encode:Kl,_encodeAsync:Jl,_endsWith:Uc,_enum:VT,_file:ey,_float32:Eb,_float64:Pb,_gt:pr,_gte:Pt,_guid:Yi,_includes:Fc,_int:Cb,_int32:jb,_int64:Ab,_intersection:NT,_ipv4:Cc,_ipv6:Ec,_isoDate:wb,_isoDateTime:Sb,_isoDuration:Ib,_isoTime:$b,_jwt:Tc,_ksuid:_c,_lazy:nz,_length:Oa,_literal:ZT,_lowercase:Mc,_lt:dr,_lte:Qt,_mac:yb,_map:UT,_max:Qt,_maxLength:ja,_maxSize:Pa,_mime:Bc,_min:Pt,_minLength:Br,_minSize:zo,_multipleOf:To,_nan:Hb,_nanoid:Sc,_nativeEnum:WT,_negative:qb,_never:Vb,_nonnegative:Xb,_nonoptional:JT,_nonpositive:Jb,_normalize:Vc,_null:Lb,_nullable:KT,_number:kb,_optional:HT,_overwrite:Zn,_parse:Wo,_parseAsync:Zo,_pipe:QT,_positive:Kb,_promise:rz,_property:Yb,_readonly:ez,_record:LT,_refine:ny,_regex:Ac,_safeDecode:Ql,_safeDecodeAsync:tc,_safeEncode:Yl,_safeEncodeAsync:ec,_safeParse:Go,_safeParseAsync:Ho,_set:BT,_size:zc,_slugify:Hc,_startsWith:Lc,_string:vb,_stringFormat:Yo,_stringbool:sy,_success:XT,_superRefine:ry,_symbol:Nb,_templateLiteral:tz,_toLowerCase:Zc,_toUpperCase:Gc,_transform:GT,_trim:Wc,_tuple:FT,_uint32:Ob,_uint64:Mb,_ulid:Ic,_undefined:Fb,_union:AT,_unknown:Bb,_uppercase:Nc,_url:Ea,_uuid:gc,_uuidv4:vc,_uuidv6:bc,_uuidv7:yc,_void:Wb,_xid:kc,clone:Zt,config:$t,decode:vR,decodeAsync:yR,describe:iy,encode:gR,encodeAsync:bR,flattenError:Gl,formatError:Hl,globalConfig:Ki,globalRegistry:Xt,isValidBase64:ac,isValidBase64URL:xv,isValidJWT:$v,locales:mb,meta:ay,parse:Ms,parseAsync:Ns,prettifyError:Kh,regexes:rc,registry:mc,safeDecode:SR,safeDecodeAsync:$R,safeEncode:xR,safeEncodeAsync:wR,safeParse:qh,safeParseAsync:Jh,toDotPath:Hh,toJSONSchema:ly,treeifyError:Gh,util:Wh,version:Yg},Symbol.toStringTag,{value:"Module"})),Kc=R("ZodISODateTime",(e,t)=>{uv.init(e,t),tt.init(e,t)});function cy(e){return Sb(Kc,e)}const qc=R("ZodISODate",(e,t)=>{dv.init(e,t),tt.init(e,t)});function uy(e){return wb(qc,e)}const Jc=R("ZodISOTime",(e,t)=>{pv.init(e,t),tt.init(e,t)});function dy(e){return $b(Jc,e)}const Xc=R("ZodISODuration",(e,t)=>{fv.init(e,t),tt.init(e,t)});function py(e){return Ib(Xc,e)}const az=Object.freeze(Object.defineProperty({__proto__:null,ZodISODate:qc,ZodISODateTime:Kc,ZodISODuration:Xc,ZodISOTime:Jc,date:uy,datetime:cy,duration:py,time:dy},Symbol.toStringTag,{value:"Module"})),fy=(e,t)=>{Zl.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Hl(e,r)},flatten:{value:r=>Gl(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,qi,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,qi,2)}},isEmpty:{get(){return e.issues.length===0}}})},sz=R("ZodError",fy),zt=R("ZodError",fy,{Parent:Error}),my=Wo(zt),hy=Zo(zt),gy=Go(zt),vy=Ho(zt),by=Kl(zt),yy=ql(zt),xy=Jl(zt),Sy=Xl(zt),wy=Yl(zt),$y=Ql(zt),Iy=ec(zt),ky=tc(zt),Te=R("ZodType",(e,t)=>(Ce.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(jn(t,{checks:[...t.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]})),e.clone=(r,o)=>Zt(e,r,o),e.brand=()=>e,e.register=((r,o)=>(r.add(e,o),e)),e.parse=(r,o)=>my(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>gy(e,r,o),e.parseAsync=async(r,o)=>hy(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>vy(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>by(e,r,o),e.decode=(r,o)=>yy(e,r,o),e.encodeAsync=async(r,o)=>xy(e,r,o),e.decodeAsync=async(r,o)=>Sy(e,r,o),e.safeEncode=(r,o)=>wy(e,r,o),e.safeDecode=(r,o)=>$y(e,r,o),e.safeEncodeAsync=async(r,o)=>Iy(e,r,o),e.safeDecodeAsync=async(r,o)=>ky(e,r,o),e.refine=(r,o)=>e.check(cx(r,o)),e.superRefine=r=>e.check(ux(r)),e.overwrite=r=>e.check(Zn(r)),e.optional=()=>ea(e),e.nullable=()=>ta(e),e.nullish=()=>ea(ta(e)),e.nonoptional=r=>Xy(e,r),e.array=()=>Ma(e),e.or=r=>Fa([e,r]),e.and=r=>Ny(e,r),e.transform=r=>na(e,Su(r)),e.default=r=>Ky(e,r),e.prefault=r=>Jy(e,r),e.catch=r=>ex(e,r),e.pipe=r=>na(e,r),e.readonly=()=>rx(e),e.describe=r=>{const o=e.clone();return Xt.add(o,{description:r}),o},Object.defineProperty(e,"description",{get(){return Xt.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Xt.get(e);const o=e.clone();return Xt.add(o,r[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Yc=R("_ZodString",(e,t)=>{Xo.init(e,t),Te.init(e,t);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...o)=>e.check(Ac(...o)),e.includes=(...o)=>e.check(Fc(...o)),e.startsWith=(...o)=>e.check(Lc(...o)),e.endsWith=(...o)=>e.check(Uc(...o)),e.min=(...o)=>e.check(Br(...o)),e.max=(...o)=>e.check(ja(...o)),e.length=(...o)=>e.check(Oa(...o)),e.nonempty=(...o)=>e.check(Br(1,...o)),e.lowercase=o=>e.check(Mc(o)),e.uppercase=o=>e.check(Nc(o)),e.trim=()=>e.check(Wc()),e.normalize=(...o)=>e.check(Vc(...o)),e.toLowerCase=()=>e.check(Zc()),e.toUpperCase=()=>e.check(Gc()),e.slugify=()=>e.check(Hc())}),Ra=R("ZodString",(e,t)=>{Xo.init(e,t),Yc.init(e,t),e.email=r=>e.check(hc(Qc,r)),e.url=r=>e.check(Ea(Da,r)),e.jwt=r=>e.check(Tc(mu,r)),e.emoji=r=>e.check(xc(eu,r)),e.guid=r=>e.check(Yi(Qi,r)),e.uuid=r=>e.check(gc(In,r)),e.uuidv4=r=>e.check(vc(In,r)),e.uuidv6=r=>e.check(bc(In,r)),e.uuidv7=r=>e.check(yc(In,r)),e.nanoid=r=>e.check(Sc(tu,r)),e.guid=r=>e.check(Yi(Qi,r)),e.cuid=r=>e.check(wc(nu,r)),e.cuid2=r=>e.check($c(ru,r)),e.ulid=r=>e.check(Ic(ou,r)),e.base64=r=>e.check(Oc(du,r)),e.base64url=r=>e.check(Rc(pu,r)),e.xid=r=>e.check(kc(iu,r)),e.ksuid=r=>e.check(_c(au,r)),e.ipv4=r=>e.check(Cc(su,r)),e.ipv6=r=>e.check(Ec(lu,r)),e.cidrv4=r=>e.check(Pc(cu,r)),e.cidrv6=r=>e.check(jc(uu,r)),e.e164=r=>e.check(Dc(fu,r)),e.datetime=r=>e.check(cy(r)),e.date=r=>e.check(uy(r)),e.time=r=>e.check(dy(r)),e.duration=r=>e.check(py(r))});function gt(e){return vb(Ra,e)}const tt=R("ZodStringFormat",(e,t)=>{Qe.init(e,t),Yc.init(e,t)}),Qc=R("ZodEmail",(e,t)=>{tv.init(e,t),tt.init(e,t)});function lz(e){return hc(Qc,e)}const Qi=R("ZodGUID",(e,t)=>{Qg.init(e,t),tt.init(e,t)});function cz(e){return Yi(Qi,e)}const In=R("ZodUUID",(e,t)=>{ev.init(e,t),tt.init(e,t)});function uz(e){return gc(In,e)}function dz(e){return vc(In,e)}function pz(e){return bc(In,e)}function fz(e){return yc(In,e)}const Da=R("ZodURL",(e,t)=>{nv.init(e,t),tt.init(e,t)});function mz(e){return Ea(Da,e)}function hz(e){return Ea(Da,{protocol:/^https?$/,hostname:hg,...U(e)})}const eu=R("ZodEmoji",(e,t)=>{rv.init(e,t),tt.init(e,t)});function gz(e){return xc(eu,e)}const tu=R("ZodNanoID",(e,t)=>{ov.init(e,t),tt.init(e,t)});function vz(e){return Sc(tu,e)}const nu=R("ZodCUID",(e,t)=>{iv.init(e,t),tt.init(e,t)});function bz(e){return wc(nu,e)}const ru=R("ZodCUID2",(e,t)=>{av.init(e,t),tt.init(e,t)});function yz(e){return $c(ru,e)}const ou=R("ZodULID",(e,t)=>{sv.init(e,t),tt.init(e,t)});function xz(e){return Ic(ou,e)}const iu=R("ZodXID",(e,t)=>{lv.init(e,t),tt.init(e,t)});function Sz(e){return kc(iu,e)}const au=R("ZodKSUID",(e,t)=>{cv.init(e,t),tt.init(e,t)});function wz(e){return _c(au,e)}const su=R("ZodIPv4",(e,t)=>{mv.init(e,t),tt.init(e,t)});function $z(e){return Cc(su,e)}const _y=R("ZodMAC",(e,t)=>{gv.init(e,t),tt.init(e,t)});function Iz(e){return yb(_y,e)}const lu=R("ZodIPv6",(e,t)=>{hv.init(e,t),tt.init(e,t)});function kz(e){return Ec(lu,e)}const cu=R("ZodCIDRv4",(e,t)=>{vv.init(e,t),tt.init(e,t)});function _z(e){return Pc(cu,e)}const uu=R("ZodCIDRv6",(e,t)=>{bv.init(e,t),tt.init(e,t)});function Cz(e){return jc(uu,e)}const du=R("ZodBase64",(e,t)=>{yv.init(e,t),tt.init(e,t)});function Ez(e){return Oc(du,e)}const pu=R("ZodBase64URL",(e,t)=>{Sv.init(e,t),tt.init(e,t)});function Pz(e){return Rc(pu,e)}const fu=R("ZodE164",(e,t)=>{wv.init(e,t),tt.init(e,t)});function jz(e){return Dc(fu,e)}const mu=R("ZodJWT",(e,t)=>{Iv.init(e,t),tt.init(e,t)});function Oz(e){return Tc(mu,e)}const Qo=R("ZodCustomStringFormat",(e,t)=>{kv.init(e,t),tt.init(e,t)});function Rz(e,t,r={}){return Yo(Qo,e,t,r)}function Dz(e){return Yo(Qo,"hostname",mg,e)}function Tz(e){return Yo(Qo,"hex",Og,e)}function zz(e,t){const r=t?.enc??"hex",o=`${e}_${r}`,n=rc[o];if(!n)throw new Error(`Unrecognized hash format: ${o}`);return Yo(Qo,o,n,t)}const Ta=R("ZodNumber",(e,t)=>{sc.init(e,t),Te.init(e,t),e.gt=(o,n)=>e.check(pr(o,n)),e.gte=(o,n)=>e.check(Pt(o,n)),e.min=(o,n)=>e.check(Pt(o,n)),e.lt=(o,n)=>e.check(dr(o,n)),e.lte=(o,n)=>e.check(Qt(o,n)),e.max=(o,n)=>e.check(Qt(o,n)),e.int=o=>e.check(Us(o)),e.safe=o=>e.check(Us(o)),e.positive=o=>e.check(pr(0,o)),e.nonnegative=o=>e.check(Pt(0,o)),e.negative=o=>e.check(dr(0,o)),e.nonpositive=o=>e.check(Qt(0,o)),e.multipleOf=(o,n)=>e.check(To(o,n)),e.step=(o,n)=>e.check(To(o,n)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function Yt(e){return kb(Ta,e)}const qr=R("ZodNumberFormat",(e,t)=>{_v.init(e,t),Ta.init(e,t)});function Us(e){return Cb(qr,e)}function Az(e){return Eb(qr,e)}function Mz(e){return Pb(qr,e)}function Nz(e){return jb(qr,e)}function Fz(e){return Ob(qr,e)}const za=R("ZodBoolean",(e,t)=>{lc.init(e,t),Te.init(e,t)});function ei(e){return Rb(za,e)}const Aa=R("ZodBigInt",(e,t)=>{cc.init(e,t),Te.init(e,t),e.gte=(o,n)=>e.check(Pt(o,n)),e.min=(o,n)=>e.check(Pt(o,n)),e.gt=(o,n)=>e.check(pr(o,n)),e.gte=(o,n)=>e.check(Pt(o,n)),e.min=(o,n)=>e.check(Pt(o,n)),e.lt=(o,n)=>e.check(dr(o,n)),e.lte=(o,n)=>e.check(Qt(o,n)),e.max=(o,n)=>e.check(Qt(o,n)),e.positive=o=>e.check(pr(BigInt(0),o)),e.negative=o=>e.check(dr(BigInt(0),o)),e.nonpositive=o=>e.check(Qt(BigInt(0),o)),e.nonnegative=o=>e.check(Pt(BigInt(0),o)),e.multipleOf=(o,n)=>e.check(To(o,n));const r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function Lz(e){return Tb(Aa,e)}const hu=R("ZodBigIntFormat",(e,t)=>{Cv.init(e,t),Aa.init(e,t)});function Uz(e){return Ab(hu,e)}function Bz(e){return Mb(hu,e)}const Cy=R("ZodSymbol",(e,t)=>{Ev.init(e,t),Te.init(e,t)});function Vz(e){return Nb(Cy,e)}const Ey=R("ZodUndefined",(e,t)=>{Pv.init(e,t),Te.init(e,t)});function Wz(e){return Fb(Ey,e)}const Py=R("ZodNull",(e,t)=>{jv.init(e,t),Te.init(e,t)});function jy(e){return Lb(Py,e)}const Oy=R("ZodAny",(e,t)=>{Ov.init(e,t),Te.init(e,t)});function Zz(){return Ub(Oy)}const Ry=R("ZodUnknown",(e,t)=>{Rv.init(e,t),Te.init(e,t)});function Vr(){return Bb(Ry)}const Dy=R("ZodNever",(e,t)=>{Dv.init(e,t),Te.init(e,t)});function gu(e){return Vb(Dy,e)}const Ty=R("ZodVoid",(e,t)=>{Tv.init(e,t),Te.init(e,t)});function Gz(e){return Wb(Ty,e)}const vu=R("ZodDate",(e,t)=>{zv.init(e,t),Te.init(e,t),e.min=(o,n)=>e.check(Pt(o,n)),e.max=(o,n)=>e.check(Qt(o,n));const r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function Hz(e){return Zb(vu,e)}const zy=R("ZodArray",(e,t)=>{Av.init(e,t),Te.init(e,t),e.element=t.element,e.min=(r,o)=>e.check(Br(r,o)),e.nonempty=r=>e.check(Br(1,r)),e.max=(r,o)=>e.check(ja(r,o)),e.length=(r,o)=>e.check(Oa(r,o)),e.unwrap=()=>e.element});function Ma(e,t){return Qb(zy,e,t)}function Kz(e){const t=e._zod.def.shape;return Gt(Object.keys(t))}const Na=R("ZodObject",(e,t)=>{Lv.init(e,t),Te.init(e,t),Ne(e,"shape",()=>t.shape),e.keyof=()=>Gt(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Vr()}),e.loose=()=>e.clone({...e._zod.def,catchall:Vr()}),e.strict=()=>e.clone({...e._zod.def,catchall:gu()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>Mh(e,r),e.safeExtend=r=>Nh(e,r),e.merge=r=>Fh(e,r),e.pick=r=>zh(e,r),e.omit=r=>Ah(e,r),e.partial=(...r)=>Lh(wu,e,r[0]),e.required=(...r)=>Uh($u,e,r[0])});function sn(e,t){const r={type:"object",shape:e??{},...U(t)};return new Na(r)}function qz(e,t){return new Na({type:"object",shape:e,catchall:gu(),...U(t)})}function Jz(e,t){return new Na({type:"object",shape:e,catchall:Vr(),...U(t)})}const bu=R("ZodUnion",(e,t)=>{uc.init(e,t),Te.init(e,t),e.options=t.options});function Fa(e,t){return new bu({type:"union",options:e,...U(t)})}const Ay=R("ZodDiscriminatedUnion",(e,t)=>{bu.init(e,t),Uv.init(e,t)});function Xz(e,t,r){return new Ay({type:"union",options:t,discriminator:e,...U(r)})}const My=R("ZodIntersection",(e,t)=>{Bv.init(e,t),Te.init(e,t)});function Ny(e,t){return new My({type:"intersection",left:e,right:t})}const Fy=R("ZodTuple",(e,t)=>{dc.init(e,t),Te.init(e,t),e.rest=r=>e.clone({...e._zod.def,rest:r})});function Ly(e,t,r){const o=t instanceof Ce,n=o?r:t,i=o?t:null;return new Fy({type:"tuple",items:e,rest:i,...U(n)})}const yu=R("ZodRecord",(e,t)=>{Vv.init(e,t),Te.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function xu(e,t,r){return new yu({type:"record",keyType:e,valueType:t,...U(r)})}function Yz(e,t,r){const o=Zt(e);return o._zod.values=void 0,new yu({type:"record",keyType:o,valueType:t,...U(r)})}const Uy=R("ZodMap",(e,t)=>{Wv.init(e,t),Te.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Qz(e,t,r){return new Uy({type:"map",keyType:e,valueType:t,...U(r)})}const By=R("ZodSet",(e,t)=>{Zv.init(e,t),Te.init(e,t),e.min=(...r)=>e.check(zo(...r)),e.nonempty=r=>e.check(zo(1,r)),e.max=(...r)=>e.check(Pa(...r)),e.size=(...r)=>e.check(zc(...r))});function eA(e,t){return new By({type:"set",valueType:e,...U(t)})}const Ao=R("ZodEnum",(e,t)=>{Gv.init(e,t),Te.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(o,n)=>{const i={};for(const a of o)if(r.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Ao({...t,checks:[],...U(n),entries:i})},e.exclude=(o,n)=>{const i={...t.entries};for(const a of o)if(r.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new Ao({...t,checks:[],...U(n),entries:i})}});function Gt(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Ao({type:"enum",entries:r,...U(t)})}function tA(e,t){return new Ao({type:"enum",entries:e,...U(t)})}const Vy=R("ZodLiteral",(e,t)=>{Hv.init(e,t),Te.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function nA(e,t){return new Vy({type:"literal",values:Array.isArray(e)?e:[e],...U(t)})}const Wy=R("ZodFile",(e,t)=>{Kv.init(e,t),Te.init(e,t),e.min=(r,o)=>e.check(zo(r,o)),e.max=(r,o)=>e.check(Pa(r,o)),e.mime=(r,o)=>e.check(Bc(Array.isArray(r)?r:[r],o))});function rA(e){return ey(Wy,e)}const Zy=R("ZodTransform",(e,t)=>{qv.init(e,t),Te.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new $a(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(Lr(i,r.value,t));else{const a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(Lr(a))}};const n=t.transform(r.value,r);return n instanceof Promise?n.then(i=>(r.value=i,r)):(r.value=n,r)}});function Su(e){return new Zy({type:"transform",transform:e})}const wu=R("ZodOptional",(e,t)=>{Jv.init(e,t),Te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ea(e){return new wu({type:"optional",innerType:e})}const Gy=R("ZodNullable",(e,t)=>{Xv.init(e,t),Te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ta(e){return new Gy({type:"nullable",innerType:e})}function oA(e){return ea(ta(e))}const Hy=R("ZodDefault",(e,t)=>{Yv.init(e,t),Te.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ky(e,t){return new Hy({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():ka(t)}})}const qy=R("ZodPrefault",(e,t)=>{Qv.init(e,t),Te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Jy(e,t){return new qy({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():ka(t)}})}const $u=R("ZodNonOptional",(e,t)=>{eb.init(e,t),Te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Xy(e,t){return new $u({type:"nonoptional",innerType:e,...U(t)})}const Yy=R("ZodSuccess",(e,t)=>{tb.init(e,t),Te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function iA(e){return new Yy({type:"success",innerType:e})}const Qy=R("ZodCatch",(e,t)=>{nb.init(e,t),Te.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ex(e,t){return new Qy({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const tx=R("ZodNaN",(e,t)=>{rb.init(e,t),Te.init(e,t)});function aA(e){return Hb(tx,e)}const Iu=R("ZodPipe",(e,t)=>{ob.init(e,t),Te.init(e,t),e.in=t.in,e.out=t.out});function na(e,t){return new Iu({type:"pipe",in:e,out:t})}const ku=R("ZodCodec",(e,t)=>{Iu.init(e,t),pc.init(e,t)});function sA(e,t,r){return new ku({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}const nx=R("ZodReadonly",(e,t)=>{ib.init(e,t),Te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function rx(e){return new nx({type:"readonly",innerType:e})}const ox=R("ZodTemplateLiteral",(e,t)=>{ab.init(e,t),Te.init(e,t)});function lA(e,t){return new ox({type:"template_literal",parts:e,...U(t)})}const ix=R("ZodLazy",(e,t)=>{cb.init(e,t),Te.init(e,t),e.unwrap=()=>e._zod.def.getter()});function ax(e){return new ix({type:"lazy",getter:e})}const sx=R("ZodPromise",(e,t)=>{lb.init(e,t),Te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function cA(e){return new sx({type:"promise",innerType:e})}const lx=R("ZodFunction",(e,t)=>{sb.init(e,t),Te.init(e,t)});function Qp(e){return new lx({type:"function",input:Array.isArray(e?.input)?Ly(e?.input):e?.input??Ma(Vr()),output:e?.output??Vr()})}const La=R("ZodCustom",(e,t)=>{ub.init(e,t),Te.init(e,t)});function uA(e){const t=new ot({check:"custom"});return t._zod.check=e,t}function dA(e,t){return ty(La,e??(()=>!0),t)}function cx(e,t={}){return ny(La,e,t)}function ux(e){return ry(e)}const pA=iy,fA=ay;function mA(e,t={error:`Input not instance of ${e.name}`}){const r=new La({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...U(t)});return r._zod.bag.Class=e,r}const hA=(...e)=>sy({Codec:ku,Boolean:za,String:Ra},...e);function gA(e){const t=ax(()=>Fa([gt(e),Yt(),ei(),jy(),Ma(t),xu(gt(),t)]));return t}function vA(e,t){return na(Su(e),t)}const bA={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function yA(e){$t({customError:e})}function xA(){return $t().customError}var Bs;Bs||(Bs={});function SA(e){return bb(Ra,e)}function wA(e){return _b(Ta,e)}function $A(e){return Db(za,e)}function IA(e){return zb(Aa,e)}function kA(e){return Gb(vu,e)}const _A=Object.freeze(Object.defineProperty({__proto__:null,bigint:IA,boolean:$A,date:kA,number:wA,string:SA},Symbol.toStringTag,{value:"Module"}));$t(db());const Y=Object.freeze(Object.defineProperty({__proto__:null,$brand:Ch,$input:gb,$output:hb,NEVER:_h,TimePrecision:xb,ZodAny:Oy,ZodArray:zy,ZodBase64:du,ZodBase64URL:pu,ZodBigInt:Aa,ZodBigIntFormat:hu,ZodBoolean:za,ZodCIDRv4:cu,ZodCIDRv6:uu,ZodCUID:nu,ZodCUID2:ru,ZodCatch:Qy,ZodCodec:ku,ZodCustom:La,ZodCustomStringFormat:Qo,ZodDate:vu,ZodDefault:Hy,ZodDiscriminatedUnion:Ay,ZodE164:fu,ZodEmail:Qc,ZodEmoji:eu,ZodEnum:Ao,ZodError:sz,ZodFile:Wy,get ZodFirstPartyTypeKind(){return Bs},ZodFunction:lx,ZodGUID:Qi,ZodIPv4:su,ZodIPv6:lu,ZodISODate:qc,ZodISODateTime:Kc,ZodISODuration:Xc,ZodISOTime:Jc,ZodIntersection:My,ZodIssueCode:bA,ZodJWT:mu,ZodKSUID:au,ZodLazy:ix,ZodLiteral:Vy,ZodMAC:_y,ZodMap:Uy,ZodNaN:tx,ZodNanoID:tu,ZodNever:Dy,ZodNonOptional:$u,ZodNull:Py,ZodNullable:Gy,ZodNumber:Ta,ZodNumberFormat:qr,ZodObject:Na,ZodOptional:wu,ZodPipe:Iu,ZodPrefault:qy,ZodPromise:sx,ZodReadonly:nx,ZodRealError:zt,ZodRecord:yu,ZodSet:By,ZodString:Ra,ZodStringFormat:tt,ZodSuccess:Yy,ZodSymbol:Cy,ZodTemplateLiteral:ox,ZodTransform:Zy,ZodTuple:Fy,ZodType:Te,ZodULID:ou,ZodURL:Da,ZodUUID:In,ZodUndefined:Ey,ZodUnion:bu,ZodUnknown:Ry,ZodVoid:Ty,ZodXID:iu,_ZodString:Yc,_default:Ky,_function:Qp,any:Zz,array:Ma,base64:Ez,base64url:Pz,bigint:Lz,boolean:ei,catch:ex,check:uA,cidrv4:_z,cidrv6:Cz,clone:Zt,codec:sA,coerce:_A,config:$t,core:iz,cuid:bz,cuid2:yz,custom:dA,date:Hz,decode:yy,decodeAsync:Sy,describe:pA,discriminatedUnion:Xz,e164:jz,email:lz,emoji:gz,encode:by,encodeAsync:xy,endsWith:Uc,enum:Gt,file:rA,flattenError:Gl,float32:Az,float64:Mz,formatError:Hl,function:Qp,getErrorMap:xA,globalRegistry:Xt,gt:pr,gte:Pt,guid:cz,hash:zz,hex:Tz,hostname:Dz,httpUrl:hz,includes:Fc,instanceof:mA,int:Us,int32:Nz,int64:Uz,intersection:Ny,ipv4:$z,ipv6:kz,iso:az,json:gA,jwt:Oz,keyof:Kz,ksuid:wz,lazy:ax,length:Oa,literal:nA,locales:mb,looseObject:Jz,lowercase:Mc,lt:dr,lte:Qt,mac:Iz,map:Qz,maxLength:ja,maxSize:Pa,meta:fA,mime:Bc,minLength:Br,minSize:zo,multipleOf:To,nan:aA,nanoid:vz,nativeEnum:tA,negative:qb,never:gu,nonnegative:Xb,nonoptional:Xy,nonpositive:Jb,normalize:Vc,null:jy,nullable:ta,nullish:oA,number:Yt,object:sn,optional:ea,overwrite:Zn,parse:my,parseAsync:hy,partialRecord:Yz,pipe:na,positive:Kb,prefault:Jy,preprocess:vA,prettifyError:Kh,promise:cA,property:Yb,readonly:rx,record:xu,refine:cx,regex:Ac,regexes:rc,registry:mc,safeDecode:$y,safeDecodeAsync:ky,safeEncode:wy,safeEncodeAsync:Iy,safeParse:gy,safeParseAsync:vy,set:eA,setErrorMap:yA,size:zc,slugify:Hc,startsWith:Lc,strictObject:qz,string:gt,stringFormat:Rz,stringbool:hA,success:iA,superRefine:ux,symbol:Vz,templateLiteral:lA,toJSONSchema:ly,toLowerCase:Zc,toUpperCase:Gc,transform:Su,treeifyError:Gh,trim:Wc,tuple:Ly,uint32:Fz,uint64:Bz,ulid:xz,undefined:Wz,union:Fa,unknown:Vr,uppercase:Nc,url:mz,util:Wh,uuid:uz,uuidv4:dz,uuidv6:pz,uuidv7:fz,void:Gz,xid:Sz},Symbol.toStringTag,{value:"Module"})),CA=sn({x:Yt(),y:Yt(),screenWidth:Yt().optional(),screenHeight:Yt().optional()}),_u=CA.extend({elementId:gt().optional()}),dx=sn({text:gt()}),px=sn({direction:Gt(["up","down"])}),fx=sn({direction:Gt(["left","right"]),x:Yt().optional(),y:Yt().optional(),duration:Yt().optional().default(500)}),mx=sn({direction:Gt(["in","out"])}),hx=sn({text:gt().optional(),elementId:gt().optional(),direction:Gt(["up","down"]),maxScrolls:Yt().optional()}),gx=sn({url:gt()}),EA=sn({elementId:gt()}),PA=sn({mode:Gt(["adb","appium"])});Fa([_u,dx,px,fx,mx,hx,gx,EA,PA]);Gt(["tap","type","scroll","swipe","zoom","scrollUntil","deepLink","elementId"]);const On=Y.object({id:Y.number(),descriptionText:Y.string().optional(),optional:Y.boolean().optional(),status:Y.string().optional(),statusColor:Y.string().optional(),statusDiv:Y.custom().optional(),element:Y.custom().optional(),originRef:Y.object({refId:Y.number(),path:Y.string(),descriptionText:Y.string().optional(),optional:Y.boolean().optional(),overrides:Y.record(Y.string(),Y.string()).optional()}).optional()}),vx=On.extend({cropBase64:Y.string().optional()}),Cu=vx.extend(_u.partial().shape).extend({type:Y.literal("tap"),elementId:Y.string().optional(),timeout:Y.number().optional(),useLlmOnly:Y.boolean().optional()}),Eu=vx.extend(_u.partial().shape).extend({type:Y.literal("assert"),cropBase64:Y.string().optional(),elementId:Y.string().optional(),timeout:Y.number().optional(),useLlmOnly:Y.boolean().optional()}),Pu=On.extend(dx.shape).extend({type:Y.literal("type")}),ju=On.extend(px.shape).extend({type:Y.literal("scroll")}),bx=On.extend(mx.shape).extend({type:Y.literal("zoom")}),yx=On.extend(fx.shape).extend({type:Y.literal("swipe")}),Ou=On.extend(hx.shape).extend({type:Y.literal("scrollUntil")}),Ru=On.extend(gx.shape).extend({type:Y.literal("deeplink")}),Du=On.extend({type:Y.literal("ai"),instruction:Y.string()}),Tu=On.extend({type:Y.literal("fileRef"),path:Y.string(),overrides:Y.record(Y.string(),Y.string()).optional()}),ls={statusDiv:!0,element:!0,status:!0,statusColor:!0,originRef:!0,cropBase64:!0,x:!0,y:!0,screenWidth:!0,screenHeight:!0},$n={statusDiv:!0,element:!0,status:!0,statusColor:!0,originRef:!0},ef={...$n,cropBase64:!0,x:!0,y:!0,screenWidth:!0,screenHeight:!0},zu=Y.discriminatedUnion("type",[Cu,Eu,Pu,ju,bx,yx,Ou,Ru,Du,Tu]),tf=Y.enum(["tap","assert","type","scroll","swipe","zoom","scrollUntil","deeplink","ai","fileRef"]),jA=Y.object({name:Y.string(),steps:Y.array(zu),params:Y.record(Y.string(),Y.string())});Y.object({isRecording:Y.boolean(),enableAnimations:Y.boolean(),mode:Y.enum(["interact","assert"]),test:jA,isPlaying:Y.boolean(),isDeviceConnected:Y.boolean(),connectionStatus:Y.string(),currentStepId:Y.number().nullable(),selectedPlatform:Y.enum(["android","ios"]).default("android"),selectedDeviceId:Y.string().optional(),executionLog:Y.array(Y.object({stepId:Y.number(),stepNumber:Y.number(),screenshot:Y.string(),cacheHit:Y.boolean(),timestamp:Y.number()})).default([]),currentScreenshot:Y.string().nullable().default(null)});const OA=Y.discriminatedUnion("type",[Cu.omit(ef),Eu.omit(ef),Pu.omit($n),ju.omit($n),yx.omit($n),bx.omit($n),Ou.omit($n),Ru.omit($n),Du.omit($n),Tu.omit($n)]);Y.object({name:Y.string(),steps:Y.array(OA),params:Y.record(Y.string(),Y.string())});const re=new xf({isRecording:!1,enableAnimations:!0,mode:"interact",test:{name:"untitled",steps:[],params:{}},isPlaying:!1,isDeviceConnected:!1,connectionStatus:"Connecting...",currentStepId:null,selectedPlatform:"android",selectedDeviceId:void 0,executionLog:[],currentScreenshot:null}),Ua=Re.div`
|
|
183
|
+
/* Act as a flexible panel that can live inside grid/flex cells */
|
|
184
|
+
display: flex;
|
|
185
|
+
flex-direction: column;
|
|
186
|
+
height: 100%;
|
|
187
|
+
min-height: 0; /* allow inner children to shrink/scroll */
|
|
188
|
+
/* Contain overflow by default; individual inner areas can scroll */
|
|
189
|
+
overflow: hidden;
|
|
190
|
+
|
|
191
|
+
border-radius: 12px;
|
|
192
|
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
193
|
+
background-color: #fff;
|
|
194
|
+
padding: 1.5rem;
|
|
195
|
+
`,vn=N(gr)(({theme:e,$hasOrigin:t})=>({display:"flex",alignItems:"flex-start",padding:e.spacing(2),marginBottom:e.spacing(1),gap:e.spacing(2),animation:"fadeIn 0.3s ease-in",borderLeft:t?`4px solid ${e.palette.info.main}`:void 0,backgroundColor:t?`${e.palette.info.light}22`:void 0,"@keyframes fadeIn":{from:{opacity:0,transform:"translateY(10px)"},to:{opacity:1,transform:"translateY(0)"}},position:"relative","&:hover .step-actions-overlay":{opacity:1,transform:"translateY(0)"}})),bn=N(je)(({theme:e})=>({fontWeight:"bold",fontSize:"1.2em",color:e.palette.primary.main,minWidth:30})),yn=N(Ye)({flexGrow:1}),Rn=({path:e})=>f.jsxs(je,{variant:"caption",color:"info.main",sx:{display:"block",fontFamily:"monospace"},children:["from ",e]}),xn=N(je)(({statuscolor:e})=>({fontSize:"0.8em",marginTop:4,color:e||"#666",fontWeight:500})),Sn=N(Ye)(({theme:e})=>({position:"absolute",top:-16,right:16,backgroundColor:e.palette.background.paper,boxShadow:e.shadows[3],border:`1px solid ${e.palette.divider}`,display:"flex",alignItems:"center",justifyContent:"center",gap:e.spacing(.5),opacity:0,transition:"all 0.2s ease-in-out",zIndex:10,borderRadius:16,padding:"4px 8px",transform:"translateY(5px)","&.visible":{opacity:1,transform:"translateY(0)"}})),xx=N("img")(({theme:e})=>({border:`1px solid ${e.palette.divider}`,borderRadius:4,boxShadow:e.shadows[2],width:60,height:60,objectFit:"cover"})),RA=({step:e,stepNumber:t,onPlay:r,onPlayFromHere:o,onEdit:n,onDelete:i})=>f.jsxs(vn,{elevation:1,children:[f.jsx(bn,{children:t}),f.jsxs(yn,{children:[f.jsx(je,{variant:"body2",color:"text.secondary",fontFamily:"monospace",children:"📄 File Reference"}),f.jsx(je,{fontWeight:"bold",children:e.descriptionText||"Add steps from file"}),f.jsxs(je,{variant:"body2",children:["Path: ",e.path]}),e.overrides&&Object.keys(e.overrides).length>0&&f.jsxs(Ye,{sx:{mt:.5,display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:[f.jsx(je,{variant:"caption",color:"text.secondary",children:"Overrides:"}),Object.keys(e.overrides).map(a=>f.jsx(Ue,{size:"small",label:`${a}`},a))]}),e.status&&f.jsx(xn,{statuscolor:e.statusColor,children:e.status}),f.jsx(Ye,{sx:{mt:1,display:"flex",gap:1,alignItems:"center"},children:e.optional?f.jsx(Ue,{size:"small",label:"Optional"}):null})]}),f.jsxs(Sn,{className:"step-actions-overlay",children:[o&&f.jsx(he,{onClick:o,size:"small","aria-label":"Play",children:f.jsx(an,{})}),o&&f.jsx(he,{onClick:o,size:"small","aria-label":"Play from here",children:f.jsx(gn,{})}),n&&f.jsx(he,{onClick:n,size:"small","aria-label":"Edit",children:f.jsx(hn,{})}),i&&f.jsx(he,{onClick:i,size:"small","aria-label":"Delete",children:f.jsx(on,{})})]})]}),DA=({step:e,stepNumber:t,onPlay:r,onPlayFromHere:o,onEdit:n,onDelete:i})=>f.jsxs(vn,{elevation:1,$hasOrigin:!!e.originRef,children:[f.jsx(bn,{children:t}),e.cropBase64&&f.jsx(xx,{src:e.cropBase64,alt:"tap target"}),f.jsxs(yn,{children:[e.originRef?.path&&f.jsx(Rn,{path:e.originRef?.path}),f.jsx(je,{fontWeight:"bold",children:e.descriptionText||"Tap Interaction"}),e.status&&f.jsx(xn,{statuscolor:e.statusColor,children:e.status}),f.jsxs(Ye,{sx:{mt:1,display:"flex",gap:1,flexWrap:"wrap"},children:[e.optional?f.jsx(Ue,{size:"small",label:"Optional"}):null,e.useLlmOnly?f.jsx(Ue,{size:"small",label:"LLM Only"}):null,e.elementId?f.jsx(Ue,{size:"small",label:`Element ID: ${e.elementId}`}):null,typeof e.timeout=="number"?f.jsx(Ue,{size:"small",label:`Timeout: ${e.timeout} ms`}):null]})]}),f.jsxs(Sn,{className:"step-actions-overlay",children:[f.jsx(he,{size:"small",onClick:r,title:"Play this step",children:f.jsx(an,{})}),f.jsx(he,{size:"small",onClick:o,title:"Play from here",children:f.jsx(gn,{})}),f.jsx(he,{size:"small",onClick:n,title:"Edit",children:f.jsx(hn,{})}),f.jsx(he,{size:"small",onClick:i,title:"Delete",children:f.jsx(on,{})})]})]}),TA=({step:e,stepNumber:t,onPlay:r,onPlayFromHere:o,onEdit:n,onDelete:i})=>f.jsxs(vn,{elevation:1,$hasOrigin:!!e.originRef,children:[f.jsx(bn,{children:t}),e.cropBase64&&f.jsx(xx,{src:e.cropBase64,alt:"assert target",sx:{border:2,borderColor:"warning.main"}}),f.jsxs(yn,{children:[e.originRef?.path&&f.jsx(Rn,{path:e.originRef?.path}),f.jsx(je,{fontWeight:"bold",children:e.descriptionText||"Assert Element"}),e.status&&f.jsx(xn,{statuscolor:e.statusColor,children:e.status}),f.jsxs(Ye,{sx:{mt:1,display:"flex",gap:1,flexWrap:"wrap"},children:[e.optional?f.jsx(Ue,{size:"small",label:"Optional"}):null,e.useLlmOnly?f.jsx(Ue,{size:"small",label:"LLM Only"}):null,e.elementId?f.jsx(Ue,{size:"small",label:`Element ID: ${e.elementId}`}):null,typeof e.timeout=="number"?f.jsx(Ue,{size:"small",label:`Timeout: ${e.timeout} ms`}):null]})]}),f.jsxs(Sn,{className:"step-actions-overlay",children:[f.jsx(he,{size:"small",onClick:r,title:"Play this step",children:f.jsx(an,{})}),f.jsx(he,{size:"small",onClick:o,title:"Play from here",children:f.jsx(gn,{})}),f.jsx(he,{size:"small",onClick:n,title:"Edit",children:f.jsx(hn,{})}),f.jsx(he,{size:"small",onClick:i,title:"Delete",children:f.jsx(on,{})})]})]}),zA=({step:e,stepNumber:t,onPlay:r,onPlayFromHere:o,onEdit:n,onDelete:i})=>f.jsxs(vn,{elevation:1,$hasOrigin:!!e.originRef,children:[f.jsx(bn,{children:t}),f.jsx(Ue,{icon:f.jsx(E_,{}),label:"Type",color:"primary",variant:"outlined"}),f.jsxs(yn,{children:[e.originRef?.path&&f.jsx(Rn,{path:e.originRef?.path}),f.jsx(je,{fontWeight:"bold",children:e.descriptionText||`Type "${e.text}"`}),e.status&&f.jsx(xn,{statuscolor:e.statusColor,children:e.status}),f.jsxs(Ye,{sx:{mt:1,display:"flex",gap:1,flexWrap:"wrap"},children:[f.jsx(Ue,{size:"small",label:`Text: ${e.text}`}),e.optional?f.jsx(Ue,{size:"small",label:"Optional"}):null]})]}),f.jsxs(Sn,{className:"step-actions-overlay",children:[f.jsx(he,{size:"small",onClick:r,title:"Play this step",children:f.jsx(an,{})}),f.jsx(he,{size:"small",onClick:o,title:"Play from here",children:f.jsx(gn,{})}),f.jsx(he,{size:"small",onClick:n,title:"Edit",children:f.jsx(hn,{})}),f.jsx(he,{size:"small",onClick:i,title:"Delete",children:f.jsx(on,{})})]})]}),AA=({step:e,stepNumber:t,onPlay:r,onPlayFromHere:o,onEdit:n,onDelete:i})=>f.jsxs(vn,{elevation:1,$hasOrigin:!!e.originRef,children:[f.jsx(bn,{children:t}),f.jsx(Ue,{icon:f.jsx(mm,{}),label:"Scroll",color:"secondary",variant:"outlined"}),f.jsxs(yn,{children:[e.originRef?.path&&f.jsx(Rn,{path:e.originRef?.path}),f.jsx(je,{fontWeight:"bold",children:e.descriptionText||`Scroll ${e.direction}`}),e.status&&f.jsx(xn,{statuscolor:e.statusColor,children:e.status}),f.jsxs(Ye,{display:"flex",gap:1,mt:1,children:[f.jsx(Ue,{label:`Direction: ${e.direction}`,size:"small"}),e.optional?f.jsx(Ue,{size:"small",label:"Optional"}):null]})]}),f.jsxs(Sn,{className:"step-actions-overlay",children:[f.jsx(he,{size:"small",onClick:r,title:"Play this step",children:f.jsx(an,{})}),f.jsx(he,{size:"small",onClick:o,title:"Play from here",children:f.jsx(gn,{})}),f.jsx(he,{size:"small",onClick:n,title:"Edit",children:f.jsx(hn,{})}),f.jsx(he,{size:"small",onClick:i,title:"Delete",children:f.jsx(on,{})})]})]}),MA=({step:e,stepNumber:t,onPlay:r,onPlayFromHere:o,onEdit:n,onDelete:i})=>f.jsxs(vn,{elevation:1,$hasOrigin:!!e.originRef,children:[f.jsx(bn,{children:t}),f.jsx(Ue,{icon:f.jsx(mm,{}),label:"Swipe",color:"secondary",variant:"outlined"}),f.jsxs(yn,{children:[e.originRef?.path&&f.jsx(Rn,{path:e.originRef?.path}),f.jsx(je,{fontWeight:"bold",children:e.descriptionText||`Swipe ${e.direction}`}),e.status&&f.jsx(xn,{statuscolor:e.statusColor,children:e.status}),f.jsxs(Ye,{display:"flex",gap:1,mt:1,children:[f.jsx(Ue,{label:`Direction: ${e.direction}`,size:"small"}),typeof e.x=="number"&&typeof e.y=="number"?f.jsx(Ue,{label:`Start: ${e.x}, ${e.y}`,size:"small"}):null,typeof e.duration=="number"?f.jsx(Ue,{label:`Duration: ${e.duration}ms`,size:"small"}):null,e.optional?f.jsx(Ue,{size:"small",label:"Optional"}):null]})]}),f.jsxs(Sn,{className:"step-actions-overlay",children:[f.jsx(he,{size:"small",onClick:r,title:"Play this step",children:f.jsx(an,{})}),f.jsx(he,{size:"small",onClick:o,title:"Play from here",children:f.jsx(gn,{})}),f.jsx(he,{size:"small",onClick:n,title:"Edit",children:f.jsx(hn,{})}),f.jsx(he,{size:"small",onClick:i,title:"Delete",children:f.jsx(on,{})})]})]}),NA=({step:e,stepNumber:t,onPlay:r,onPlayFromHere:o,onEdit:n,onDelete:i})=>f.jsxs(vn,{elevation:1,$hasOrigin:!!e.originRef,children:[f.jsx(bn,{children:t}),f.jsx(Ue,{icon:f.jsx(M_,{}),label:"Zoom",color:"secondary",variant:"outlined"}),f.jsxs(yn,{children:[e.originRef?.path&&f.jsx(Rn,{path:e.originRef?.path}),f.jsx(je,{fontWeight:"bold",children:e.descriptionText||`Zoom ${e.direction}`}),e.status&&f.jsx(xn,{statuscolor:e.statusColor,children:e.status}),f.jsxs(Ye,{display:"flex",gap:1,mt:1,children:[f.jsx(Ue,{label:`Direction: ${e.direction}`,size:"small"}),e.optional?f.jsx(Ue,{size:"small",label:"Optional"}):null]})]}),f.jsxs(Sn,{className:"step-actions-overlay",children:[f.jsx(he,{size:"small",onClick:r,title:"Play this step",children:f.jsx(an,{})}),f.jsx(he,{size:"small",onClick:o,title:"Play from here",children:f.jsx(gn,{})}),f.jsx(he,{size:"small",onClick:n,title:"Edit",children:f.jsx(hn,{})}),f.jsx(he,{size:"small",onClick:i,title:"Delete",children:f.jsx(on,{})})]})]}),FA=({step:e,stepNumber:t,onPlay:r,onPlayFromHere:o,onEdit:n,onDelete:i})=>f.jsxs(vn,{elevation:1,$hasOrigin:!!e.originRef,children:[f.jsx(bn,{children:t}),f.jsx(Ue,{icon:f.jsx(z_,{}),label:"Scroll Until",color:"info",variant:"outlined"}),f.jsxs(yn,{children:[e.originRef?.path&&f.jsx(Rn,{path:e.originRef?.path}),f.jsx(je,{fontWeight:"bold",children:e.descriptionText||"Scroll Until Found"}),e.status&&f.jsx(xn,{statuscolor:e.statusColor,children:e.status}),f.jsxs(Ye,{display:"flex",gap:1,mt:1,alignItems:"center",sx:{flexWrap:"wrap"},children:[e.text?f.jsx(Ue,{label:`Find: ${e.text}`,size:"small"}):null,e.elementId?f.jsx(Ue,{label:`Element ID: ${e.elementId}`,size:"small"}):null,f.jsx(Ue,{label:`Direction: ${e.direction}`,size:"small"}),f.jsx(Ue,{label:`Max Scrolls: ${e.maxScrolls}`,size:"small"}),e.optional?f.jsx(Ue,{size:"small",label:"Optional"}):null]})]}),f.jsxs(Sn,{className:"step-actions-overlay",children:[f.jsx(he,{size:"small",onClick:r,title:"Play this step",children:f.jsx(an,{})}),f.jsx(he,{size:"small",onClick:o,title:"Play from here",children:f.jsx(gn,{})}),f.jsx(he,{size:"small",onClick:n,title:"Edit",children:f.jsx(hn,{})}),f.jsx(he,{size:"small",onClick:i,title:"Delete",children:f.jsx(on,{})})]})]}),LA=({step:e,stepNumber:t,onPlay:r,onPlayFromHere:o,onEdit:n,onDelete:i})=>f.jsxs(vn,{elevation:1,$hasOrigin:!!e.originRef,children:[f.jsx(bn,{children:t}),f.jsx(Ue,{icon:f.jsx(R_,{}),label:"Deeplink",color:"success",variant:"outlined"}),f.jsxs(yn,{children:[e.originRef?.path&&f.jsx(Rn,{path:e.originRef?.path}),f.jsx(je,{fontWeight:"bold",children:e.descriptionText||"Open Deep Link"}),e.status&&f.jsx(xn,{statuscolor:e.statusColor,children:e.status}),f.jsxs(Ye,{sx:{mt:1,display:"flex",gap:1,flexWrap:"wrap"},children:[f.jsx(Ue,{size:"small",label:`URL: ${e.url}`}),e.optional?f.jsx(Ue,{size:"small",label:"Optional"}):null]})]}),f.jsxs(Sn,{className:"step-actions-overlay",children:[f.jsx(he,{size:"small",onClick:r,title:"Play this step",children:f.jsx(an,{})}),f.jsx(he,{size:"small",onClick:o,title:"Play from here",children:f.jsx(gn,{})}),f.jsx(he,{size:"small",onClick:n,title:"Edit",children:f.jsx(hn,{})}),f.jsx(he,{size:"small",onClick:i,title:"Delete",children:f.jsx(on,{})})]})]}),UA=({step:e,stepNumber:t,onPlay:r,onPlayFromHere:o,onEdit:n,onDelete:i})=>f.jsxs(vn,{elevation:1,$hasOrigin:!!e.originRef,children:[f.jsx(bn,{children:t}),f.jsx(Ue,{icon:f.jsx(A_,{}),label:"AI",color:"secondary"}),f.jsxs(yn,{children:[e.originRef?.path&&f.jsx(Rn,{path:e.originRef?.path}),f.jsx(je,{fontWeight:"bold",children:e.descriptionText||"AI Instruction"}),e.status&&f.jsx(xn,{statuscolor:e.statusColor,children:e.status}),f.jsxs(Ye,{sx:{mt:1,display:"flex",gap:1,flexWrap:"wrap"},children:[f.jsx(Ue,{size:"small",label:`Instruction: ${e.instruction}`}),e.optional?f.jsx(Ue,{size:"small",label:"Optional"}):null]})]}),f.jsxs(Sn,{className:"step-actions-overlay",children:[f.jsx(he,{size:"small",onClick:r,title:"Play this step",children:f.jsx(an,{})}),f.jsx(he,{size:"small",onClick:o,title:"Play from here",children:f.jsx(gn,{})}),f.jsx(he,{size:"small",onClick:n,title:"Edit",children:f.jsx(hn,{})}),f.jsx(he,{size:"small",onClick:i,title:"Delete",children:f.jsx(on,{})})]})]}),BA=()=>{throw new Error("createServerOnlyFn() functions can only be called on the server!")},Je=(e,t)=>{const r=t||e||{};return typeof r.method>"u"&&(r.method="GET"),Object.assign(i=>{const a={...r,...i};return Je(void 0,a)},{options:r,middleware:i=>{const a=[...r.middleware||[]];i.map(c=>{ed in c?c.options.middleware&&a.push(...c.options.middleware):a.push(c)});const s={...r,middleware:a},l=Je(void 0,s);return l[ed]=!0,l},inputValidator:i=>{const a={...r,inputValidator:i};return Je(void 0,a)},handler:(...i)=>{const[a,s]=i,l={...r,extractedFn:a,serverFn:s},c=[...l.middleware||[],GA(l)];return Object.assign(async u=>nf(c,"client",{...a,...l,data:u?.data,headers:u?.headers,signal:u?.signal,context:{}}).then(d=>{if(d.error)throw d.error;return d.result}),{...a,__executeServer:async(u,d)=>{const p=BA(),m=p.contextAfterGlobalMiddlewares,h={...a,...u,context:{...m,...u.context},signal:d,request:p.request};return nf(c,"server",h).then(g=>({result:g.result,error:g.error,context:g.sendContext}))}})}})};async function nf(e,t,r){const o=rS()?.functionMiddleware||[],n=VA([...o,...e]),i=async a=>{const s=n.shift();if(!s)return a;"inputValidator"in s.options&&s.options.inputValidator&&t==="server"&&(a.data=await ZA(s.options.inputValidator,a.data));let l;return t==="client"?"client"in s.options&&(l=s.options.client):"server"in s.options&&(l=s.options.server),l?WA(l,a,async c=>i(c).catch(u=>{if(oS(u)||iS(u))return{...c,error:u};throw u})):i(a)};return i({...r,headers:r.headers||{},sendContext:r.sendContext||{},context:r.context||{}})}function VA(e){const t=new Set,r=[],o=n=>{n.forEach(i=>{i.options.middleware&&o(i.options.middleware),t.has(i)||(t.add(i),r.push(i))})};return o(e),r}const WA=async(e,t,r)=>e({...t,next:(async(o={})=>r({...t,...o,context:{...t.context,...o.context},sendContext:{...t.sendContext,...o.sendContext??{}},headers:sS(t.headers,o.headers),result:o.result!==void 0?o.result:o instanceof Response?o:t.result,error:o.error??t.error}))});function ZA(e,t){if(e==null)return{};if("~standard"in e){const r=e["~standard"].validate(t);if(r instanceof Promise)throw new Error("Async validation not supported");if(r.issues)throw new Error(JSON.stringify(r.issues,void 0,2));return r.value}if("parse"in e)return e.parse(t);if(typeof e=="function")return e(t);throw new Error("Invalid validator type!")}function GA(e){return{_types:void 0,options:{inputValidator:e.inputValidator,client:async({next:t,sendContext:r,...o})=>{const n={...o,context:r},i=await e.extractedFn?.(n);return t(i)},server:async({next:t,...r})=>{const o=await e.serverFn?.(r);return t({...r,result:o})}}}}const HA=et("605c05774def700303f9889c0f8a28fed026e0b5c36a1563cff2835ee01d26b1"),KA=Je({method:"POST"}).handler(HA),Au={mutationKey:["device","tap"],mutationFn:e=>KA({data:e})},qA=et("07e23aa87e88d53c6c9e3d8e88de788d27d7b10930150bc4fd510d4447aaf3de"),JA=Je({method:"POST"}).handler(qA),Mu={mutationKey:["device","type"],mutationFn:e=>JA({data:e})},XA=et("5c526b678a7596f28beca76784df0ac58acd292627c5770c0c8029e38e4681ec"),YA=Je({method:"POST"}).handler(XA),Nu={mutationKey:["device","scroll"],mutationFn:e=>YA({data:e})},QA=et("2b4a002699960d578addbcf4dd83fedcec62444d7da4bf7c2359be991ed6207e"),eM=Je({method:"POST"}).handler(QA),Fu={mutationKey:["device","swipe"],mutationFn:e=>eM({data:e})},tM=et("10b616f4aacf11bb275166e4ae03f441f1d7c9a68a670dfadb03b74e1d012900"),nM=Je({method:"POST"}).handler(tM),rM={mutationKey:["device","scrollUntil"],mutationFn:e=>nM({data:e})},oM=et("c23cd3196f54848abd64a8b8d4660d7826a70cf44169d7bf29fc82e74a2cf612"),iM=Je({method:"POST"}).handler(oM),aM={mutationKey:["device","zoom"],mutationFn:e=>iM({data:e})},sM=et("566ee4344553ab6300f847f5de346e037f92d986cb824ba1c313346e62345fbe"),lM=Je({method:"POST"}).handler(sM),cM={mutationKey:["device","deepLink"],mutationFn:e=>lM({data:e})},uM=et("eea1073a910f7f023004366aafcef05a8c47a3a1a4a09721f71a2efe311ee70f"),dM=Je({method:"POST"}).handler(uM),pM={mutationKey:["device","appium","start"],mutationFn:e=>dM({data:e})},fM=et("6dbdc2968dc27a948c345034d1e55082b86918953b61da020ea8dd5836c79db3"),mM=Je({method:"GET"}).handler(fM),hM=(e={})=>({queryKey:["device","appium","status",e],queryFn:()=>mM({data:e}),refetchInterval:2e3}),gM=et("c5aeaa72b9b3303af5d82ee2fa59e3e90ffef3c3f0fb32707cee49e78ff41066"),Sx=Je({method:"GET"}).handler(gM),wx=(e={})=>({queryKey:["device","screenshot",e],queryFn:()=>Sx({data:e}),staleTime:0,gcTime:0}),vM={mutationKey:["device","screenshot_mutation"],mutationFn:e=>Sx({data:e})},bM=et("1ed4d2aa14be99e8c5a81eefbece63cea629a89f75862c60f9ff19c4d4dc67c5"),yM=Je().handler(bM),xM=et("05faf0772038a170c70083fd8de4a8b77a40e4ec46e0bbf6878670f02621b5df"),SM=Je({method:"POST"}).handler(xM),$x={mutationKey:["device","hierarchy","getElementId"],mutationFn:e=>SM({data:e})},wM=et("9bcbf5303827d2a25f347c2054b0121655a82322fa07108653f43246875348f7"),$M=Je({method:"POST"}).handler(wM),IM={mutationKey:["device","hierarchy","findElementById"],mutationFn:e=>$M({data:e})},Ix=({enabled:e})=>({queryKey:["visibleElements"],queryFn:yM,enabled:e}),kM=et("9f335634267a450fc9f34b1ab33c55da00cb1efc709604b2e3114602020075a2"),_M=Je({method:"POST"}).handler(kM),CM={mutationKey:["device","adb","disableAnimations"],mutationFn:()=>_M()},EM=et("33557b2fcc5cedc5814d20bca9cd9cde2e45318755de1da4d613e8fa84ee38d1"),PM=Je({method:"GET"}).handler(EM),kx={queryKey:["devices"],queryFn:()=>PM()},jM=et("fcbe7e11d05240fa28a1dd79ec8c395f6c03682edbaeb19f469bd78d6399cdde"),OM=Je({method:"POST"}).handler(jM),RM=et("7d2aacaab26ab11cdc66f03a4ed01b8b38186abf16ab1f9306801ea7769aaa2a"),DM=Je({method:"POST"}).handler(RM),TM={mutationFn:e=>DM({data:e})},Lu={mutationFn:e=>OM({data:e})},zM=et("5918013064f9b88efb265b30a770275d6c9d52bf42318f451bab8a47bc850917"),AM=Je({method:"POST"}).handler(zM),MM={mutationKey:["ai","executeAgentStep"],mutationFn:e=>AM({data:e})};sn({name:gt(),type:Gt(["file","directory"]),path:gt()});const NM=et("00fb1fe03e9689cf8c179ba0d5cadc5eeaa6879def224ac38037d70a1a51300d"),FM=Je({method:"GET"}).handler(NM);xu(gt(),gt()).optional().default({});const LM=et("54b0d7153f4ee4f963b29e7c835e76cedaaf345527fdc912c49030ea79353b5e"),UM=Je({method:"GET"}).handler(LM),Uu={queryKey:["files"],queryFn:()=>FM()},BM=et("ac7bf7f1d727949cd28713a8f36bb77e7bd8fc0e48854ed8cb1ee93ce80fb6d0"),VM=Je({method:"POST"}).handler(BM),WM={mutationKey:["createFile"],mutationFn:e=>VM({data:e})},ZM=et("b41e844ce533c224e7c720e69d821468deffcbf208fc008a7f5af83cb0596b15"),GM=Je({method:"POST"}).handler(ZM),Bu={mutationKey:["readFile"],mutationFn:e=>GM({data:e})},HM=et("1b2a0d276d9ce90b2a1d72134c1bf95b9f6b7b049a8f415e8f0da3e6fc5ce4ae"),KM=Je({method:"POST"}).handler(HM),_x={queryKey:["variables"],queryFn:UM,refetchInterval:1e4},qM={mutationKey:["saveFile"],mutationFn:e=>KM({data:e})},JM=et("098d52adf25ea567d43facba347871f887828c6ab804021bbfa0f2759209c0c6"),XM=Je({method:"POST"}).handler(JM),YM={mutationKey:["renameFile"],mutationFn:e=>XM({data:e})},QM=et("efbbc22c41cf491631b07076417c9ec65d5ac71debfcc00b5a7e0d368772104f");Je({method:"POST"}).handler(QM);function eN(e){const t=e?.bounds||e?.attributes?.bounds,r=t?{x:t.x,y:t.y,width:t.width,height:t.height}:void 0,o=e?.text??e?.attributes?.text??e?.name??void 0,n=e?.resourceId??e?.attributes?.["resource-id"]??void 0,i=e?.attributes?.["content-desc"]??e?.attributes?.["accessibility-text"]??e?.accessibilityText??void 0,a=e?.label??e?.attributes?.label??void 0,s=e?.accessibilityIdentifier??e?.attributes?.accessibilityIdentifier??void 0,l=e?.hint??e?.attributes?.hint??e?.value??e?.attributes?.value??void 0,c={...r?{bounds:r}:{},...o?{text:String(o)}:{},...n?{resourceId:String(n)}:{},...i?{contentDesc:String(i)}:{},...a?{accessibilityLabel:String(a)}:{},...s?{accessibilityIdentifier:String(s)}:{},...l?{hint:String(l)}:{}};return Object.keys(c).length>0?c:void 0}function tN(e){if(!Array.isArray(e))return[];const t=[];for(const r of e){const o=eN(r);o&&t.push(o)}return t}const Cr=new WeakMap,Ei=new WeakMap,ra={current:[]};let cs=!1,wo=0;const mo=new Set,vi=new Map;function Cx(e){const t=Array.from(e).sort((r,o)=>r instanceof _n&&r.options.deps.includes(o)?1:o instanceof _n&&o.options.deps.includes(r)?-1:0);for(const r of t){if(ra.current.includes(r))continue;ra.current.push(r),r.recompute();const o=Ei.get(r);if(o)for(const n of o){const i=Cr.get(n);i&&Cx(i)}}}function nN(e){const t={prevVal:e.prevState,currentVal:e.state};for(const r of e.listeners)r(t)}function rN(e){const t={prevVal:e.prevState,currentVal:e.state};for(const r of e.listeners)r(t)}function Ex(e){if(wo>0&&!vi.has(e)&&vi.set(e,e.prevState),mo.add(e),!(wo>0)&&!cs)try{for(cs=!0;mo.size>0;){const t=Array.from(mo);mo.clear();for(const r of t){const o=vi.get(r)??r.prevState;r.prevState=o,nN(r)}for(const r of t){const o=Cr.get(r);o&&(ra.current.push(r),Cx(o))}for(const r of t){const o=Cr.get(r);if(o)for(const n of o)rN(n)}}}finally{cs=!1,ra.current=[],vi.clear()}}function un(e){wo++;try{e()}finally{if(wo--,wo===0){const t=mo.values().next().value;t&&Ex(t)}}}function oN(e){return typeof e=="function"}class Vs{constructor(t,r){this.listeners=new Set,this.subscribe=o=>{var n,i;this.listeners.add(o);const a=(i=(n=this.options)==null?void 0:n.onSubscribe)==null?void 0:i.call(n,o,this);return()=>{this.listeners.delete(o),a?.()}},this.prevState=t,this.state=t,this.options=r}setState(t){var r,o,n;this.prevState=this.state,(r=this.options)!=null&&r.updateFn?this.state=this.options.updateFn(this.prevState)(t):oN(t)?this.state=t(this.prevState):this.state=t,(n=(o=this.options)==null?void 0:o.onUpdate)==null||n.call(o),Ex(this)}}class _n{constructor(t){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const r=this.options.deps.length,o=new Array(r),n=new Array(r);for(let i=0;i<r;i++){const a=this.options.deps[i];o[i]=a.prevState,n[i]=a.state}return this.lastSeenDepValues=n,{prevDepVals:o,currDepVals:n,prevVal:this.prevState??void 0}},this.recompute=()=>{var r,o;this.prevState=this.state;const n=this.getDepVals();this.state=this.options.fn(n),(o=(r=this.options).onUpdate)==null||o.call(r)},this.checkIfRecalculationNeededDeeply=()=>{for(const i of this.options.deps)i instanceof _n&&i.checkIfRecalculationNeededDeeply();let r=!1;const o=this.lastSeenDepValues,{currDepVals:n}=this.getDepVals();for(let i=0;i<n.length;i++)if(n[i]!==o[i]){r=!0;break}r&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const r of this._subscriptions)r()}),this.subscribe=r=>{var o,n;this.listeners.add(r);const i=(n=(o=this.options).onSubscribe)==null?void 0:n.call(o,r,this);return()=>{this.listeners.delete(r),i?.()}},this.options=t,this.state=t.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(t=this.options.deps){for(const r of t)if(r instanceof _n)r.registerOnGraph(),this.registerOnGraph(r.options.deps);else if(r instanceof Vs){let o=Cr.get(r);o||(o=new Set,Cr.set(r,o)),o.add(this);let n=Ei.get(this);n||(n=new Set,Ei.set(this,n)),n.add(r)}}unregisterFromGraph(t=this.options.deps){for(const r of t)if(r instanceof _n)this.unregisterFromGraph(r.options.deps);else if(r instanceof Vs){const o=Cr.get(r);o&&o.delete(this);const n=Ei.get(this);n&&n.delete(r)}}}var iN=class{constructor(e,t){this.fn=e,this.options=t,this.lastExecutionTime=0,this.isPending=!1,this.maybeExecute=(...r)=>{const o=Date.now()-this.lastExecutionTime;if(this.options.leading&&o>=this.options.wait)this.execute(...r);else if(this.lastArgs=r,!this.timeoutId&&this.options.trailing){const n=this.options.wait-o;this.isPending=!0,this.timeoutId=setTimeout(()=>{this.lastArgs!==void 0&&this.execute(...this.lastArgs)},n)}},this.execute=(...r)=>{this.fn(...r),this.options.onExecute?.(r,this),this.lastExecutionTime=Date.now(),this.clearTimeout(),this.lastArgs=void 0,this.isPending=!1},this.flush=()=>{this.isPending&&this.lastArgs&&this.execute(...this.lastArgs)},this.cancel=()=>{this.clearTimeout(),this.lastArgs=void 0,this.isPending=!1},this.clearTimeout=()=>{this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=void 0)},this.options.leading===void 0&&this.options.trailing===void 0&&(this.options.leading=!0,this.options.trailing=!0)}};function aN(e,t){return new iN(e,t).maybeExecute}class sN{#n=!0;#e;#t;#r;#o;#a;#i;#s;#p=0;#f=5;#l=!1;#u=()=>{this.debugLog("Connected to event bus"),this.#a=!0,this.#l=!1,this.debugLog("Emitting queued events",this.#o),this.#o.forEach(t=>this.emitEventToBus(t)),this.#o=[],this.stopConnectLoop(),this.#t().removeEventListener("tanstack-connect-success",this.#u)};#c=()=>{if(this.#p<this.#f){this.#p++,this.dispatchCustomEvent("tanstack-connect",{});return}this.#t().removeEventListener("tanstack-connect",this.#c),this.debugLog("Max retries reached, giving up on connection"),this.stopConnectLoop()};#d=()=>{this.#l||(this.#l=!0,this.#t().addEventListener("tanstack-connect-success",this.#u),this.#c())};constructor({pluginId:t,debug:r=!1,enabled:o=!0,reconnectEveryMs:n=300}){this.#e=t,this.#n=o,this.#t=this.getGlobalTarget,this.#r=r,this.debugLog(" Initializing event subscription for plugin",this.#e),this.#o=[],this.#a=!1,this.#i=null,this.#s=n}startConnectLoop(){this.#i!==null||this.#a||(this.debugLog(`Starting connect loop (every ${this.#s}ms)`),this.#i=setInterval(this.#c,this.#s))}stopConnectLoop(){this.#l=!1,this.#i!==null&&(clearInterval(this.#i),this.#i=null,this.debugLog("Stopped connect loop"))}debugLog(...t){this.#r&&console.log(`🌴 [tanstack-devtools:${this.#e}-plugin]`,...t)}getGlobalTarget(){if(typeof globalThis<"u"&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog("Using global event target"),globalThis.__TANSTACK_EVENT_TARGET__;if(typeof window<"u"&&typeof window.addEventListener<"u")return this.debugLog("Using window as event target"),window;const t=typeof EventTarget<"u"?new EventTarget:void 0;return typeof t>"u"||typeof t.addEventListener>"u"?(this.debugLog("No event mechanism available, running in non-web environment"),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog("Using new EventTarget as fallback"),t)}getPluginId(){return this.#e}dispatchCustomEventShim(t,r){try{const o=new Event(t,{detail:r});this.#t().dispatchEvent(o)}catch{this.debugLog("Failed to dispatch shim event")}}dispatchCustomEvent(t,r){try{this.#t().dispatchEvent(new CustomEvent(t,{detail:r}))}catch{this.dispatchCustomEventShim(t,r)}}emitEventToBus(t){this.debugLog("Emitting event to client bus",t),this.dispatchCustomEvent("tanstack-dispatch-event",t)}emit(t,r){if(!this.#n){this.debugLog("Event bus client is disabled, not emitting event",t,r);return}if(!this.#a){this.debugLog("Bus not available, will be pushed as soon as connected"),this.#o.push({type:`${this.#e}:${t}`,payload:r,pluginId:this.#e}),typeof CustomEvent<"u"&&!this.#l&&(this.#d(),this.startConnectLoop());return}return this.emitEventToBus({type:`${this.#e}:${t}`,payload:r,pluginId:this.#e})}on(t,r){const o=`${this.#e}:${t}`;if(!this.#n)return this.debugLog("Event bus client is disabled, not registering event",o),()=>{};const n=i=>{this.debugLog("Received event from bus",i.detail),r(i.detail)};return this.#t().addEventListener(o,n),this.debugLog("Registered event to bus",o),()=>{this.#t().removeEventListener(o,n)}}onAll(t){if(!this.#n)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};const r=o=>{const n=o.detail;t(n)};return this.#t().addEventListener("tanstack-devtools-global",r),()=>this.#t().removeEventListener("tanstack-devtools-global",r)}onAllPluginEvents(t){if(!this.#n)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};const r=o=>{const n=o.detail;this.#e&&n.pluginId!==this.#e||t(n)};return this.#t().addEventListener("tanstack-devtools-global",r),()=>this.#t().removeEventListener("tanstack-devtools-global",r)}}class lN extends sN{constructor(){super({pluginId:"form-devtools",reconnectEveryMs:1e3})}}const Mt=new lN;function Ba(e,t){return typeof e=="function"?e(t):e}function bi(e,t){return Vu(t).reduce((o,n)=>{if(o===null)return null;if(typeof o<"u")return o[n]},e)}function yi(e,t,r){const o=Vu(t);function n(i){if(!o.length)return Ba(r,i);const a=o.shift();if(typeof a=="string"||typeof a=="number"&&!Array.isArray(i))return typeof i=="object"?(i===null&&(i={}),{...i,[a]:n(i[a])}):{[a]:n()};if(Array.isArray(i)&&typeof a=="number"){const s=i.slice(0,a);return[...s.length?s:new Array(a),n(i[a]),...i.slice(a+1)]}return[...new Array(a),n()]}return n(e)}function cN(e,t){const r=Vu(t);function o(n){if(!n)return;if(r.length===1){const a=r[0];if(Array.isArray(n)&&typeof a=="number")return n.filter((c,u)=>u!==a);const{[a]:s,...l}=n;return l}const i=r.shift();if((typeof i=="string"||typeof i=="number"&&!Array.isArray(n))&&typeof n=="object")return{...n,[i]:o(n[i])};if(typeof i=="number"&&Array.isArray(n)){if(i>=n.length)return n;const a=n.slice(0,i);return[...a.length?a:new Array(i),o(n[i]),...n.slice(i+1)]}throw new Error("It seems we have created an infinite loop in deleteBy. ")}return o(e)}const uN=/^(\d+)$/gm,dN=/\.(\d+)(?=\.)/gm,pN=/^(\d+)\./gm,fN=/\.(\d+$)/gm,mN=/\.{2,}/gm,Ws="__int__",xi=`${Ws}$1`;function Vu(e){if(Array.isArray(e))return[...e];if(typeof e!="string")throw new Error("Path must be a string.");return e.replace(/(^\[)|]/gm,"").replace(/\[/g,".").replace(uN,xi).replace(dN,`.${xi}.`).replace(pN,`${xi}.`).replace(fN,`.${xi}`).replace(mN,".").split(".").map(t=>{if(t.startsWith(Ws)){const r=t.substring(Ws.length),o=parseInt(r,10);return String(o)===r?o:r}return t})}function hN(e){return!(Array.isArray(e)&&e.length===0)}function Zs(e,t){const r=o=>o.validators.filter(Boolean).map(n=>({cause:n.cause,validate:n.fn}));return t.validationLogic({form:t.form,validators:t.validators,event:{type:e,async:!1},runValidation:r})}function Gs(e,t){const{asyncDebounceMs:r}=t,{onBlurAsyncDebounceMs:o,onChangeAsyncDebounceMs:n,onDynamicAsyncDebounceMs:i}=t.validators||{},a=r??0,s=l=>l.validators.filter(Boolean).map(c=>{const u=c?.cause||e;let d=a;switch(u){case"change":d=n??a;break;case"blur":d=o??a;break;case"dynamic":d=i??a;break;case"submit":d=0;break}return e==="submit"&&(d=0),{cause:u,validate:c.fn,debounceMs:d}});return t.validationLogic({form:t.form,validators:t.validators,event:{type:e,async:!0},runValidation:s})}const Hs=e=>!!e&&typeof e=="object"&&"fields"in e;function zn(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,i]of e)if(!t.has(n)||!Object.is(i,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(const n of r)if(!o.includes(n)||!zn(e[n],t[n]))return!1;return!0}const rf=({newFormValidatorError:e,isPreviousErrorFromFormValidator:t,previousErrorValue:r})=>e?{newErrorValue:e,newSource:"form"}:t?{newErrorValue:void 0,newSource:void 0}:r?{newErrorValue:r,newSource:"field"}:{newErrorValue:void 0,newSource:void 0},of=({formLevelError:e,fieldLevelError:t})=>t?{newErrorValue:t,newSource:"field"}:e?{newErrorValue:e,newSource:"form"}:{newErrorValue:void 0,newSource:void 0};function kt(e,t){return e==null?t:{...e,...t}}let nr=256;const Pi=[];let Si;for(;nr--;)Pi[nr]=(nr+256).toString(16).substring(1);function Px(){let e=0,t,r="";if(!Si||nr+16>256){for(Si=new Array(256),e=256;e--;)Si[e]=256*Math.random()|0;e=0,nr=0}for(;e<16;e++)t=Si[nr+e],e===6?r+=Pi[t&15|64]:e===8?r+=Pi[t&63|128]:r+=Pi[t],e&1&&e>1&&e<11&&(r+="-");return nr++,r}const gN=aN(e=>Mt.emit("form-state",{id:e.formId,state:e.store.state}),{wait:300}),_r=e=>{if(!e.validators)return e.runValidation({validators:[],form:e.form});const t=e.event.async,r=t?void 0:{fn:e.validators.onMount,cause:"mount"},o={fn:t?e.validators.onChangeAsync:e.validators.onChange,cause:"change"},n={fn:t?e.validators.onBlurAsync:e.validators.onBlur,cause:"blur"},i={fn:t?e.validators.onSubmitAsync:e.validators.onSubmit,cause:"submit"},a=t?void 0:{fn:()=>{},cause:"server"};switch(e.event.type){case"mount":return e.runValidation({validators:[r],form:e.form});case"submit":return e.runValidation({validators:[o,n,i,a],form:e.form});case"server":return e.runValidation({validators:[],form:e.form});case"blur":return e.runValidation({validators:[n,a],form:e.form});case"change":return e.runValidation({validators:[o,a],form:e.form});default:throw new Error(`Unknown validation event type: ${e.event.type}`)}};function vN(e,t){const r=new Map;for(const o of e){const n=o.path??[];let i=t,a="";for(let s=0;s<n.length;s++){const l=n[s];if(l===void 0)continue;const c=typeof l=="object"?l.key:l,u=Number(c);Array.isArray(i)&&!Number.isNaN(u)?a+=`[${u}]`:a+=(s>0?".":"")+String(c),typeof i=="object"&&i!==null?i=i[c]:i=void 0}r.set(a,(r.get(a)??[]).concat(o))}return Object.fromEntries(r)}const af=(e,t)=>{const r=vN(e,t);return{form:r,fields:r}},Er={validate({value:e,validationSource:t},r){const o=r["~standard"].validate(e);if(o instanceof Promise)throw new Error("async function passed to sync validator");if(o.issues)return t==="field"?o.issues:af(o.issues,e)},async validateAsync({value:e,validationSource:t},r){const o=await r["~standard"].validate(e);if(o.issues)return t==="field"?o.issues:af(o.issues,e)}},jx=e=>!!e&&"~standard"in e,oa={isValidating:!1,isTouched:!1,isBlurred:!1,isDirty:!1,isPristine:!0,isValid:!0,isDefaultValue:!0,errors:[],errorMap:{},errorSourceMap:{}};function wi(e){function t(u,d,p){const m=a(u,d,"move",p),h=Math.min(d,p),g=Math.max(d,p);for(let y=h;y<=g;y++)m.push(i(u,y));const v=Object.keys(e.fieldInfo).reduce((y,S)=>(S.startsWith(i(u,d))&&y.set(S,e.getFieldMeta(S)),y),new Map);l(m,d<p?"up":"down"),Object.keys(e.fieldInfo).filter(y=>y.startsWith(i(u,p))).forEach(y=>{const S=y.replace(i(u,p),i(u,d)),w=v.get(S);w&&e.setFieldMeta(y,w)})}function r(u,d){const p=a(u,d,"remove");l(p,"up")}function o(u,d,p){a(u,d,"swap",p).forEach(h=>{if(!h.toString().startsWith(i(u,d)))return;const g=h.toString().replace(i(u,d),i(u,p)),[v,y]=[e.getFieldMeta(h),e.getFieldMeta(g)];v&&e.setFieldMeta(g,v),y&&e.setFieldMeta(h,y)})}function n(u,d){const p=a(u,d,"insert");l(p,"down"),p.forEach(m=>{m.toString().startsWith(i(u,d))&&e.setFieldMeta(m,c())})}function i(u,d){return`${u}[${d}]`}function a(u,d,p,m){const h=[i(u,d)];switch(p){case"swap":h.push(i(u,m));break;case"move":{const[g,v]=[Math.min(d,m),Math.max(d,m)];for(let y=g;y<=v;y++)h.push(i(u,y));break}default:{const g=e.getFieldValue(u),v=Array.isArray(g)?g.length:0;for(let y=d+1;y<v;y++)h.push(i(u,y));break}}return Object.keys(e.fieldInfo).filter(g=>h.some(v=>g.startsWith(v)))}function s(u,d){return u.replace(/\[(\d+)\]/,(p,m)=>{const h=parseInt(m,10);return`[${d==="up"?h+1:Math.max(0,h-1)}]`})}function l(u,d){(d==="up"?u:[...u].reverse()).forEach(m=>{const h=s(m.toString(),d),g=e.getFieldMeta(h);g?e.setFieldMeta(m,g):e.setFieldMeta(m,c())})}const c=()=>oa;return{handleArrayMove:t,handleArrayRemove:r,handleArraySwap:o,handleArrayInsert:n}}function us(e){return{values:e.values??{},errorMap:e.errorMap??{},fieldMetaBase:e.fieldMetaBase??{},isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,isSubmitSuccessful:e.isSubmitSuccessful??!1,validationMetaMap:e.validationMetaMap??{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}}}class sf{constructor(t){this.options={},this.fieldInfo={},this.prevTransformArray=[],this.mount=()=>{const r=this.fieldMetaDerived.mount(),o=this.store.mount(),n=()=>{r(),o(),Mt.emit("form-unmounted",{id:this._formId})};this.options.listeners?.onMount?.({formApi:this});const{onMount:i}=this.options.validators||{};return Mt.emit("form-api",{id:this._formId,state:this.store.state,options:this.options}),i&&this.validateSync("mount"),n},this.update=r=>{if(!r)return;const o=this.options;this.options=r;const n=!!r.transform?.deps?.some((s,l)=>s!==this.prevTransformArray[l]),i=r.defaultValues&&!zn(r.defaultValues,o.defaultValues)&&!this.state.isTouched,a=!zn(r.defaultState,o.defaultState)&&!this.state.isTouched;!i&&!a&&!n||(un(()=>{this.baseStore.setState(()=>us(Object.assign({},this.state,a?r.defaultState:{},i?{values:r.defaultValues}:{},n?{_force_re_eval:!this.state._force_re_eval}:{})))}),Mt.emit("form-api",{id:this._formId,state:this.store.state,options:this.options}))},this.reset=(r,o)=>{const{fieldMeta:n}=this.state,i=this.resetFieldMeta(n);r&&!o?.keepDefaultValues&&(this.options={...this.options,defaultValues:r}),this.baseStore.setState(()=>us({...this.options.defaultState,values:r??this.options.defaultValues??this.options.defaultState?.values,fieldMetaBase:i}))},this.validateAllFields=async r=>{const o=[];return un(()=>{Object.values(this.fieldInfo).forEach(i=>{if(!i.instance)return;const a=i.instance;o.push(Promise.resolve().then(()=>a.validate(r,{skipFormValidation:!0}))),i.instance.state.meta.isTouched||i.instance.setMeta(s=>({...s,isTouched:!0}))})}),(await Promise.all(o)).flat()},this.validateArrayFieldsStartingFrom=async(r,o,n)=>{const i=this.getFieldValue(r),a=Array.isArray(i)?Math.max(i.length-1,0):null,s=[`${r}[${o}]`];for(let d=o+1;d<=(a??0);d++)s.push(`${r}[${d}]`);const l=Object.keys(this.fieldInfo).filter(d=>s.some(p=>d.startsWith(p))),c=[];return un(()=>{l.forEach(d=>{c.push(Promise.resolve().then(()=>this.validateField(d,n)))})}),(await Promise.all(c)).flat()},this.validateField=(r,o)=>{const n=this.fieldInfo[r]?.instance;return n?(n.state.meta.isTouched||n.setMeta(i=>({...i,isTouched:!0})),n.validate(o)):[]},this.validateSync=r=>{const o=Zs(r,{...this.options,form:this,validationLogic:this.options.validationLogic||_r});let n=!1;const i={};return un(()=>{for(const l of o){if(!l.validate)continue;const c=this.runValidator({validate:l.validate,value:{value:this.state.values,formApi:this,validationSource:"form"},type:"validate"}),{formError:u,fieldErrors:d}=ji(c),p=ao(l.cause);for(const m of Object.keys(this.state.fieldMeta)){if(this.baseStore.state.fieldMetaBase[m]===void 0)continue;const h=this.getFieldMeta(m);if(!h)continue;const{errorMap:g,errorSourceMap:v}=h,y=d?.[m],{newErrorValue:S,newSource:w}=rf({newFormValidatorError:y,isPreviousErrorFromFormValidator:v?.[p]==="form",previousErrorValue:g?.[p]});w==="form"&&(i[m]={...i[m],[p]:y}),g?.[p]!==S&&this.setFieldMeta(m,x=>({...x,errorMap:{...x.errorMap,[p]:S},errorSourceMap:{...x.errorSourceMap,[p]:w}}))}this.state.errorMap?.[p]!==u&&this.baseStore.setState(m=>({...m,errorMap:{...m.errorMap,[p]:u}})),(u||d)&&(n=!0)}const a=ao("submit");this.state.errorMap?.[a]&&r!=="submit"&&!n&&this.baseStore.setState(l=>({...l,errorMap:{...l.errorMap,[a]:void 0}}));const s=ao("server");this.state.errorMap?.[s]&&r!=="server"&&!n&&this.baseStore.setState(l=>({...l,errorMap:{...l.errorMap,[s]:void 0}}))}),{hasErrored:n,fieldsErrorMap:i}},this.validateAsync=async r=>{const o=Gs(r,{...this.options,form:this,validationLogic:this.options.validationLogic||_r});this.state.isFormValidating||this.baseStore.setState(l=>({...l,isFormValidating:!0}));const n=[];let i;for(const l of o){if(!l.validate)continue;const c=ao(l.cause);this.state.validationMetaMap[c]?.lastAbortController.abort();const d=new AbortController;this.state.validationMetaMap[c]={lastAbortController:d},n.push(new Promise(async p=>{let m;try{m=await new Promise((y,S)=>{setTimeout(async()=>{if(d.signal.aborted)return y(void 0);try{y(await this.runValidator({validate:l.validate,value:{value:this.state.values,formApi:this,validationSource:"form",signal:d.signal},type:"validateAsync"}))}catch(w){S(w)}},l.debounceMs)})}catch(y){m=y}const{formError:h,fieldErrors:g}=ji(m);g&&(i=i?{...i,...g}:g);const v=ao(l.cause);for(const y of Object.keys(this.state.fieldMeta)){if(this.baseStore.state.fieldMetaBase[y]===void 0)continue;const S=this.getFieldMeta(y);if(!S)continue;const{errorMap:w,errorSourceMap:x}=S,$=i?.[y],{newErrorValue:I,newSource:E}=rf({newFormValidatorError:$,isPreviousErrorFromFormValidator:x?.[v]==="form",previousErrorValue:w?.[v]});w?.[v]!==I&&this.setFieldMeta(y,k=>({...k,errorMap:{...k.errorMap,[v]:I},errorSourceMap:{...k.errorSourceMap,[v]:E}}))}this.baseStore.setState(y=>({...y,errorMap:{...y.errorMap,[v]:h}})),p(i?{fieldErrors:i,errorMapKey:v}:void 0)}))}let a=[];const s={};if(n.length){a=await Promise.all(n);for(const l of a)if(l?.fieldErrors){const{errorMapKey:c}=l;for(const[u,d]of Object.entries(l.fieldErrors)){const m={...s[u]||{},[c]:d};s[u]=m}}}return this.baseStore.setState(l=>({...l,isFormValidating:!1})),s},this.validate=r=>{const{hasErrored:o,fieldsErrorMap:n}=this.validateSync(r);return o&&!this.options.asyncAlways?n:this.validateAsync(r)},this._handleSubmit=async r=>{this.baseStore.setState(i=>({...i,isSubmitted:!1,submissionAttempts:i.submissionAttempts+1,isSubmitSuccessful:!1})),un(()=>{Object.values(this.fieldInfo).forEach(i=>{i.instance&&(i.instance.state.meta.isTouched||i.instance.setMeta(a=>({...a,isTouched:!0})))})});const o=r??this.options.onSubmitMeta;if(!this.state.canSubmit&&!this._devtoolsSubmissionOverride){this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:o});return}this.baseStore.setState(i=>({...i,isSubmitting:!0}));const n=()=>{this.baseStore.setState(i=>({...i,isSubmitting:!1}))};if(await this.validateAllFields("submit"),!this.state.isFieldsValid){n(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:o}),Mt.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:"validateAllFields",errors:Object.values(this.state.fieldMeta).map(i=>i.errors).flat()});return}if(await this.validate("submit"),!this.state.isValid){n(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:o}),Mt.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:"validate",errors:this.state.errors});return}un(()=>{Object.values(this.fieldInfo).forEach(i=>{i.instance?.options.listeners?.onSubmit?.({value:i.instance.state.value,fieldApi:i.instance})})}),this.options.listeners?.onSubmit?.({formApi:this,meta:o});try{await this.options.onSubmit?.({value:this.state.values,formApi:this,meta:o}),un(()=>{this.baseStore.setState(i=>({...i,isSubmitted:!0,isSubmitSuccessful:!0})),Mt.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!0}),n()})}catch(i){throw this.baseStore.setState(a=>({...a,isSubmitSuccessful:!1})),Mt.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:"inflight",onError:i}),n(),i}},this.getFieldValue=r=>bi(this.state.values,r),this.getFieldMeta=r=>this.state.fieldMeta[r],this.getFieldInfo=r=>this.fieldInfo[r]||={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.setFieldMeta=(r,o)=>{this.baseStore.setState(n=>({...n,fieldMetaBase:{...n.fieldMetaBase,[r]:Ba(o,n.fieldMetaBase[r])}}))},this.resetFieldMeta=r=>Object.keys(r).reduce((o,n)=>{const i=n;return o[i]=oa,o},{}),this.setFieldValue=(r,o,n)=>{const i=n?.dontUpdateMeta??!1,a=n?.dontRunListeners??!1,s=n?.dontValidate??!1;un(()=>{i||this.setFieldMeta(r,l=>({...l,isTouched:!0,isDirty:!0,errorMap:{...l?.errorMap,onMount:void 0}})),this.baseStore.setState(l=>({...l,values:yi(l.values,r,o)}))}),a||this.getFieldInfo(r).instance?.triggerOnChangeListener(),s||this.validateField(r,"change")},this.deleteField=r=>{const n=[...Object.keys(this.fieldInfo).filter(i=>{const a=r.toString();return i!==a&&i.startsWith(a)}),r];this.baseStore.setState(i=>{const a={...i};return n.forEach(s=>{a.values=cN(a.values,s),delete this.fieldInfo[s],delete a.fieldMetaBase[s]}),a})},this.pushFieldValue=(r,o,n)=>{this.setFieldValue(r,i=>[...Array.isArray(i)?i:[],o],n)},this.insertFieldValue=async(r,o,n,i)=>{this.setFieldValue(r,s=>[...s.slice(0,o),n,...s.slice(o)],kt(i,{dontValidate:!0}));const a=i?.dontValidate??!1;a||await this.validateField(r,"change"),wi(this).handleArrayInsert(r,o),a||await this.validateArrayFieldsStartingFrom(r,o,"change")},this.replaceFieldValue=async(r,o,n,i)=>{this.setFieldValue(r,s=>s.map((l,c)=>c===o?n:l),kt(i,{dontValidate:!0})),(i?.dontValidate??!1)||(await this.validateField(r,"change"),await this.validateArrayFieldsStartingFrom(r,o,"change"))},this.removeFieldValue=async(r,o,n)=>{const i=this.getFieldValue(r),a=Array.isArray(i)?Math.max(i.length-1,0):null;if(this.setFieldValue(r,l=>l.filter((c,u)=>u!==o),kt(n,{dontValidate:!0})),wi(this).handleArrayRemove(r,o),a!==null){const l=`${r}[${a}]`;this.deleteField(l)}(n?.dontValidate??!1)||(await this.validateField(r,"change"),await this.validateArrayFieldsStartingFrom(r,o,"change"))},this.swapFieldValues=(r,o,n,i)=>{this.setFieldValue(r,s=>{const l=s[o],c=s[n];return yi(yi(s,`${o}`,c),`${n}`,l)},kt(i,{dontValidate:!0})),wi(this).handleArraySwap(r,o,n),(i?.dontValidate??!1)||(this.validateField(r,"change"),this.validateField(`${r}[${o}]`,"change"),this.validateField(`${r}[${n}]`,"change"))},this.moveFieldValues=(r,o,n,i)=>{this.setFieldValue(r,s=>{const l=[...s];return l.splice(n,0,l.splice(o,1)[0]),l},kt(i,{dontValidate:!0})),wi(this).handleArrayMove(r,o,n),(i?.dontValidate??!1)||(this.validateField(r,"change"),this.validateField(`${r}[${o}]`,"change"),this.validateField(`${r}[${n}]`,"change"))},this.clearFieldValues=(r,o)=>{const n=this.getFieldValue(r),i=Array.isArray(n)?Math.max(n.length-1,0):null;if(this.setFieldValue(r,[],kt(o,{dontValidate:!0})),i!==null)for(let s=0;s<=i;s++){const l=`${r}[${s}]`;this.deleteField(l)}(o?.dontValidate??!1)||this.validateField(r,"change")},this.resetField=r=>{this.baseStore.setState(o=>({...o,fieldMetaBase:{...o.fieldMetaBase,[r]:oa},values:this.options.defaultValues?yi(o.values,r,bi(this.options.defaultValues,r)):o.values}))},this.setErrorMap=r=>{un(()=>{Object.entries(r).forEach(([o,n])=>{const i=o;if(Hs(n)){const{formError:a,fieldErrors:s}=ji(n);for(const l of Object.keys(this.fieldInfo))this.getFieldMeta(l)&&this.setFieldMeta(l,u=>({...u,errorMap:{...u.errorMap,[i]:s?.[l]},errorSourceMap:{...u.errorSourceMap,[i]:"form"}}));this.baseStore.setState(l=>({...l,errorMap:{...l.errorMap,[i]:a}}))}else this.baseStore.setState(a=>({...a,errorMap:{...a.errorMap,[i]:n}}))})})},this.getAllErrors=()=>({form:{errors:this.state.errors,errorMap:this.state.errorMap},fields:Object.entries(this.state.fieldMeta).reduce((r,[o,n])=>(Object.keys(n).length&&n.errors.length&&(r[o]={errors:n.errors,errorMap:n.errorMap}),r),{})}),this.parseValuesWithSchema=r=>Er.validate({value:this.state.values,validationSource:"form"},r),this.parseValuesWithSchemaAsync=r=>Er.validateAsync({value:this.state.values,validationSource:"form"},r),this.timeoutIds={validations:{},listeners:{},formListeners:{}},this._formId=t?.formId??Px(),this._devtoolsSubmissionOverride=!1,this.baseStore=new Vs(us({...t?.defaultState,values:t?.defaultValues??t?.defaultState?.values})),this.fieldMetaDerived=new _n({deps:[this.baseStore],fn:({prevDepVals:r,currDepVals:o,prevVal:n})=>{const i=n,a=r?.[0],s=o[0];let l=0;const c={};for(const u of Object.keys(s.fieldMetaBase)){const d=s.fieldMetaBase[u],p=a?.fieldMetaBase[u],m=i?.[u],h=bi(s.values,u);let g=m?.errors;if(!p||d.errorMap!==p.errorMap){g=Object.values(d.errorMap??{}).filter(x=>x!==void 0);const w=this.getFieldInfo(u)?.instance;w&&!w.options.disableErrorFlat&&(g=g.flat(1))}const v=!hN(g),y=!d.isDirty,S=zn(h,bi(this.options.defaultValues,u))||zn(h,this.getFieldInfo(u)?.instance?.options.defaultValue);if(m&&m.isPristine===y&&m.isValid===v&&m.isDefaultValue===S&&m.errors===g&&d===p){c[u]=m,l++;continue}c[u]={...d,errors:g??[],isPristine:y,isValid:v,isDefaultValue:S}}return Object.keys(s.fieldMetaBase).length&&i&&l===Object.keys(s.fieldMetaBase).length?i:c}}),this.store=new _n({deps:[this.baseStore,this.fieldMetaDerived],fn:({prevDepVals:r,currDepVals:o,prevVal:n})=>{const i=n,a=r?.[0],s=o[0],l=o[1],c=Object.values(l).filter(Boolean),u=c.some(O=>O.isValidating),d=c.every(O=>O.isValid),p=c.some(O=>O.isTouched),m=c.some(O=>O.isBlurred),h=c.every(O=>O.isDefaultValue),g=p&&s.errorMap?.onMount,v=c.some(O=>O.isDirty),y=!v,S=!!(s.errorMap?.onMount||c.some(O=>O?.errorMap?.onMount)),w=!!u;let x=i?.errors??[];(!a||s.errorMap!==a.errorMap)&&(x=Object.values(s.errorMap).reduce((O,A)=>A===void 0?O:A&&Hs(A)?(O.push(A.form),O):(O.push(A),O),[]));const $=x.length===0,I=d&&$,E=this.options.canSubmitWhenInvalid??!1,k=s.submissionAttempts===0&&!p&&!S||!w&&!s.isSubmitting&&I||E;let D=s.errorMap;if(g&&(x=x.filter(O=>O!==s.errorMap.onMount),D=Object.assign(D,{onMount:void 0})),i&&a&&i.errorMap===D&&i.fieldMeta===this.fieldMetaDerived.state&&i.errors===x&&i.isFieldsValidating===u&&i.isFieldsValid===d&&i.isFormValid===$&&i.isValid===I&&i.canSubmit===k&&i.isTouched===p&&i.isBlurred===m&&i.isPristine===y&&i.isDefaultValue===h&&i.isDirty===v&&zn(a,s))return i;let j={...s,errorMap:D,fieldMeta:this.fieldMetaDerived.state,errors:x,isFieldsValidating:u,isFieldsValid:d,isFormValid:$,isValid:I,canSubmit:k,isTouched:p,isBlurred:m,isPristine:y,isDefaultValue:h,isDirty:v};const C=this.options.transform?.deps??[];if(C.length!==this.prevTransformArray.length||C.some((O,A)=>O!==this.prevTransformArray[A])){const O=Object.assign({},this,{state:j});this.options.transform?.fn(O),j=O.state,this.prevTransformArray=C}return j}}),this.handleSubmit=this.handleSubmit.bind(this),this.update(t||{}),this.store.subscribe(()=>{gN(this)}),Mt.on("request-form-state",r=>{r.payload.id===this._formId&&Mt.emit("form-api",{id:this._formId,state:this.store.state,options:this.options})}),Mt.on("request-form-reset",r=>{r.payload.id===this._formId&&this.reset()}),Mt.on("request-form-force-submit",r=>{r.payload.id===this._formId&&(this._devtoolsSubmissionOverride=!0,this.handleSubmit(),this._devtoolsSubmissionOverride=!1)})}get state(){return this.store.state}get formId(){return this._formId}runValidator(t){return jx(t.validate)?Er[t.type](t.value,t.validate):t.validate(t.value)}handleSubmit(t){return this._handleSubmit(t)}}function ji(e){if(e){if(Hs(e)){const t=ji(e.form).formError,r=e.fields;return{formError:t,fieldErrors:r}}return{formError:e}}return{formError:void 0}}function ao(e){switch(e){case"submit":return"onSubmit";case"blur":return"onBlur";case"mount":return"onMount";case"server":return"onServer";case"dynamic":return"onDynamic";case"change":default:return"onChange"}}class lf{constructor(t){this.options={},this.mount=()=>{const r=this.store.mount();this.options.defaultValue!==void 0&&!this.getMeta().isTouched&&this.form.setFieldValue(this.name,this.options.defaultValue,{dontUpdateMeta:!0});const o=this.getInfo();o.instance=this,this.update(this.options);const{onMount:n}=this.options.validators||{};if(n){const i=this.runValidator({validate:n,value:{value:this.state.value,fieldApi:this,validationSource:"field"},type:"validate"});i&&this.setMeta(a=>({...a,errorMap:{...a?.errorMap,onMount:i},errorSourceMap:{...a?.errorSourceMap,onMount:"field"}}))}return this.options.listeners?.onMount?.({value:this.state.value,fieldApi:this}),r},this.update=r=>{if(this.options=r,this.name=r.name,!this.state.meta.isTouched&&this.options.defaultValue!==void 0){const o=this.form.getFieldValue(this.name);zn(o,r.defaultValue)||this.form.setFieldValue(this.name,r.defaultValue,{dontUpdateMeta:!0,dontValidate:!0,dontRunListeners:!0})}this.form.getFieldMeta(this.name)||this.form.setFieldMeta(this.name,this.state.meta)},this.getValue=()=>this.form.getFieldValue(this.name),this.setValue=(r,o)=>{this.form.setFieldValue(this.name,r,kt(o,{dontRunListeners:!0,dontValidate:!0})),o?.dontRunListeners||this.triggerOnChangeListener(),o?.dontValidate||this.validate("change")},this.getMeta=()=>this.store.state.meta,this.setMeta=r=>this.form.setFieldMeta(this.name,r),this.getInfo=()=>this.form.getFieldInfo(this.name),this.pushValue=(r,o)=>{this.form.pushFieldValue(this.name,r,kt(o,{dontRunListeners:!0})),o?.dontRunListeners||this.triggerOnChangeListener()},this.insertValue=(r,o,n)=>{this.form.insertFieldValue(this.name,r,o,kt(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.replaceValue=(r,o,n)=>{this.form.replaceFieldValue(this.name,r,o,kt(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.removeValue=(r,o)=>{this.form.removeFieldValue(this.name,r,kt(o,{dontRunListeners:!0})),o?.dontRunListeners||this.triggerOnChangeListener()},this.swapValues=(r,o,n)=>{this.form.swapFieldValues(this.name,r,o,kt(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.moveValue=(r,o,n)=>{this.form.moveFieldValues(this.name,r,o,kt(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.clearValues=r=>{this.form.clearFieldValues(this.name,kt(r,{dontRunListeners:!0})),r?.dontRunListeners||this.triggerOnChangeListener()},this.getLinkedFields=r=>{const o=Object.values(this.form.fieldInfo),n=[];for(const i of o){if(!i.instance)continue;const{onChangeListenTo:a,onBlurListenTo:s}=i.instance.options.validators||{};r==="change"&&a?.includes(this.name)&&n.push(i.instance),r==="blur"&&s?.includes(this.name)&&n.push(i.instance)}return n},this.validateSync=(r,o)=>{const n=Zs(r,{...this.options,form:this.form,validationLogic:this.form.options.validationLogic||_r}),a=this.getLinkedFields(r).reduce((c,u)=>{const d=Zs(r,{...u.options,form:u.form,validationLogic:u.form.options.validationLogic||_r});return d.forEach(p=>{p.field=u}),c.concat(d)},[]);let s=!1;un(()=>{const c=(u,d)=>{const p=$i(d.cause),m=d.validate?cf(u.runValidator({validate:d.validate,value:{value:u.store.state.value,validationSource:"field",fieldApi:u},type:"validate"})):void 0,h=o[p],{newErrorValue:g,newSource:v}=of({formLevelError:h,fieldLevelError:m});u.state.meta.errorMap?.[p]!==g&&u.setMeta(y=>({...y,errorMap:{...y.errorMap,[p]:g},errorSourceMap:{...y.errorSourceMap,[p]:v}})),g&&(s=!0)};for(const u of n)c(this,u);for(const u of a)u.validate&&c(u.field,u)});const l=$i("submit");return this.state.meta.errorMap?.[l]&&r!=="submit"&&!s&&this.setMeta(c=>({...c,errorMap:{...c.errorMap,[l]:void 0},errorSourceMap:{...c.errorSourceMap,[l]:void 0}})),{hasErrored:s}},this.validateAsync=async(r,o)=>{const n=Gs(r,{...this.options,form:this.form,validationLogic:this.form.options.validationLogic||_r}),i=await o,a=this.getLinkedFields(r),s=a.reduce((p,m)=>{const h=Gs(r,{...m.options,form:m.form,validationLogic:m.form.options.validationLogic||_r});return h.forEach(g=>{g.field=m}),p.concat(h)},[]);this.state.meta.isValidating||this.setMeta(p=>({...p,isValidating:!0}));for(const p of a)p.setMeta(m=>({...m,isValidating:!0}));const l=[],c=[],u=(p,m,h)=>{const g=$i(m.cause);p.getInfo().validationMetaMap[g]?.lastAbortController.abort();const y=new AbortController;this.getInfo().validationMetaMap[g]={lastAbortController:y},h.push(new Promise(async S=>{let w;try{w=await new Promise((k,D)=>{this.timeoutIds.validations[m.cause]&&clearTimeout(this.timeoutIds.validations[m.cause]),this.timeoutIds.validations[m.cause]=setTimeout(async()=>{if(y.signal.aborted)return k(void 0);try{k(await this.runValidator({validate:m.validate,value:{value:p.store.state.value,fieldApi:p,signal:y.signal,validationSource:"field"},type:"validateAsync"}))}catch(j){D(j)}},m.debounceMs)})}catch(k){w=k}if(y.signal.aborted)return S(void 0);const x=cf(w),$=i[this.name]?.[g],{newErrorValue:I,newSource:E}=of({formLevelError:$,fieldLevelError:x});p.setMeta(k=>({...k,errorMap:{...k?.errorMap,[g]:I},errorSourceMap:{...k.errorSourceMap,[g]:E}})),S(I)}))};for(const p of n)p.validate&&u(this,p,l);for(const p of s)p.validate&&u(p.field,p,c);let d=[];(l.length||c.length)&&(d=await Promise.all(l),await Promise.all(c)),this.setMeta(p=>({...p,isValidating:!1}));for(const p of a)p.setMeta(m=>({...m,isValidating:!1}));return d.filter(Boolean)},this.validate=(r,o)=>{if(!this.state.meta.isTouched)return[];const{fieldsErrorMap:n}=o?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(r),{hasErrored:i}=this.validateSync(r,n[this.name]??{});if(i&&!this.options.asyncAlways)return this.getInfo().validationMetaMap[$i(r)]?.lastAbortController.abort(),this.state.meta.errors;const a=o?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(r);return this.validateAsync(r,a)},this.handleChange=r=>{this.setValue(r)},this.handleBlur=()=>{this.state.meta.isTouched||this.setMeta(o=>({...o,isTouched:!0})),this.state.meta.isBlurred||this.setMeta(o=>({...o,isBlurred:!0})),this.validate("blur"),this.triggerOnBlurListener()},this.setErrorMap=r=>{this.setMeta(o=>({...o,errorMap:{...o.errorMap,...r}}))},this.parseValueWithSchema=r=>Er.validate({value:this.state.value,validationSource:"field"},r),this.parseValueWithSchemaAsync=r=>Er.validateAsync({value:this.state.value,validationSource:"field"},r),this.triggerOnChangeListener=()=>{const r=this.form.options.listeners?.onChangeDebounceMs;r&&r>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this})},r)):this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this});const o=this.options.listeners?.onChangeDebounceMs;o&&o>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this})},o)):this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this})},this.form=t.form,this.name=t.name,this.options=t,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.store=new _n({deps:[this.form.store],fn:()=>{const r=this.form.getFieldMeta(this.name)??{...oa,...t.defaultMeta};let o=this.form.getFieldValue(this.name);return!r.isTouched&&o===void 0&&this.options.defaultValue!==void 0&&!zn(o,this.options.defaultValue)&&(o=this.options.defaultValue),{value:o,meta:r}}})}get state(){return this.store.state}runValidator(t){return jx(t.validate)?Er[t.type](t.value,t.validate):t.validate(t.value)}triggerOnBlurListener(){const t=this.form.options.listeners?.onBlurDebounceMs;t&&t>0?(this.timeoutIds.formListeners.blur&&clearTimeout(this.timeoutIds.formListeners.blur),this.timeoutIds.formListeners.blur=setTimeout(()=>{this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this})},t)):this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this});const r=this.options.listeners?.onBlurDebounceMs;r&&r>0?(this.timeoutIds.listeners.blur&&clearTimeout(this.timeoutIds.listeners.blur),this.timeoutIds.listeners.blur=setTimeout(()=>{this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},r)):this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})}}function cf(e){if(e)return e}function $i(e){switch(e){case"submit":return"onSubmit";case"blur":return"onBlur";case"mount":return"onMount";case"server":return"onServer";case"dynamic":return"onDynamic";case"change":default:return"onChange"}}const ia=typeof window<"u"?b.useLayoutEffect:b.useEffect;function bN(e){const[t,r]=b.useState(()=>({form:e.form,name:e.name})),[o,n]=b.useState(()=>new lf({...e}));(t.form!==e.form||t.name!==e.name)&&(n(new lf({...e})),r({form:e.form,name:e.name}));const i=Xe(o.store,m=>m.value),a=Xe(o.store,m=>m.meta.isTouched),s=Xe(o.store,m=>m.meta.isBlurred),l=Xe(o.store,m=>m.meta.isDirty),c=Xe(o.store,m=>m.meta.errorMap),u=Xe(o.store,m=>m.meta.errorSourceMap),d=Xe(o.store,m=>m.meta.isValidating),p=b.useMemo(()=>{const h={...o,get state(){return{value:i,get meta(){return{...o.state.meta,isTouched:a,isBlurred:s,isDirty:l,errorMap:c,errorSourceMap:u,isValidating:d}}}}};return h.Field=Ox,h},[o,i,a,s,l,c,u,d]);return ia(o.mount,[o]),ia(()=>{o.update(e)}),Xe(o.store,e.mode==="array"?m=>[m.meta,Object.keys(m.value??[]).length]:void 0),p}const Ox=(({children:e,...t})=>{const r=bN(t),o=b.useMemo(()=>Ba(e,r),[e,r]);return f.jsx(f.Fragment,{children:o})});function yN(){return b.useState(()=>Px())[0]}const xN=b.version.split(".")[0]==="17"?yN:b.useId;function SN({form:e,selector:t,children:r}){const o=Xe(e.store,t);return f.jsx(f.Fragment,{children:Ba(r,o)})}function wN(e){const t=xN(),[r,o]=b.useState(e?.formId),[n,i]=b.useState(()=>new sf({...e,formId:e?.formId??t}));if(r!==e?.formId){const s=e?.formId??t;i(new sf({...e,formId:s})),o(s)}const a=b.useMemo(()=>{const s={...n,handleSubmit:((...l)=>n._handleSubmit(...l)),get formId(){return n._formId},get state(){return n.store.state}};return s.Field=function(c){return f.jsx(Ox,{...c,form:n})},s.Subscribe=function(c){return f.jsx(SN,{form:n,selector:c.selector,children:c.children})},s},[n]);return ia(n.mount,[]),ia(()=>{n.update(e)}),a}const $N=/\{\{\s*([a-zA-Z0-9_.-]+)\s*\}\}/g,Wu=e=>{if(!e)return[];const t=new Set;let r;const o=new RegExp($N);for(;(r=o.exec(e))!==null;)r[1]&&t.add(r[1]);return Array.from(t)},fr=(e,t)=>{const r=t?.required??!1;return({value:o})=>{const n=String(o??"").trim();if(!n)return r?"This field is required":void 0;const i=Wu(n);if(i.length===0)return;const a=e(),s=i.filter(l=>!Object.prototype.hasOwnProperty.call(a,l));if(s.length>0)return`Undefined params: ${s.join(", ")}`}},Zu=Yt().min(0,"Must be 0 or greater");gt().min(1,"This field is required");const Rx=Gt(["up","down"]),IN=Gt(["in","out"]),kN=gt().min(1,"URL is required").regex(/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\/.+$/,"Invalid deeplink format (e.g., myapp://screen)"),vt=e=>e.length?e.map(t=>typeof t=="string"?t:t?.message).filter(Boolean).join(", "):null,_N=({step:e,onSave:t,onCancel:r})=>{const o=b.useCallback(()=>({id:Date.now(),type:"tap",descriptionText:"",optional:!1,timeout:3e3,useLlmOnly:!1,text:"",elementId:"",maxScrolls:15,direction:"down",url:"",instruction:"",path:""}),[]),{data:n}=dn(Uu),{data:i}=dn(_x),a=He.useCallback(()=>({...re.state.test.params,...i??{}}),[i]),s=new Set((n?.files||[]).filter(c=>c.type==="file").map(c=>c.path)),l=wN({defaultValues:{...o(),...e},onSubmit:({value:c})=>{if(c&&(c.type==="tap"||c.type==="assert")&&("x"in c&&delete c.x,"y"in c&&delete c.y),c.type==="fileRef"){const d=(c.path||"").trim();if(!d||n&&!s.has(d)){alert("The specified file does not exist in your tests directory.");return}}let u;switch(c.type){case"tap":u=Cu.parse(c);break;case"assert":u=Eu.parse(c);break;case"type":u=Pu.parse(c);break;case"scroll":u=ju.parse(c);break;case"scrollUntil":u=Ou.parse(c);break;case"deeplink":u=Ru.parse(c);break;case"ai":u=Du.parse(c);break;case"fileRef":u=Tu.parse(c);break;default:u=zu.parse(c)}if(!e)re.setState(d=>({...d,test:{...d.test,steps:[...d.test.steps,u]}}));else{const d=u.id;re.setState(p=>({...p,test:{...p.test,steps:p.test.steps.map(m=>m.id===d?u:m)}}))}t()}});return f.jsxs(MN,{children:[f.jsx(je,{variant:"h6",gutterBottom:!0,children:e?"Edit Step":"Add New Step"}),f.jsx("form",{onSubmit:c=>{c.preventDefault(),c.stopPropagation(),l.handleSubmit()},children:f.jsxs(NN,{children:[f.jsx(l.Field,{name:"type",validators:{onChange:tf},children:c=>{const u=c.state.meta.errors.length>0;return f.jsxs(br,{fullWidth:!0,error:u,children:[f.jsx(Zr,{id:"step-type",children:"Step type"}),f.jsx(yr,{labelId:"step-type",id:"step-type",value:c.state.value,label:"Step type",onChange:d=>{const p=d.target.value,m=l.state.values.id;l.reset(),l.setFieldValue("id",m),l.setFieldValue("type",p)},onBlur:c.handleBlur,children:tf.options.map(d=>f.jsx(Ln,{value:d,children:d},d))}),u&&f.jsx(Lo,{children:vt(c.state.meta.errors)})]})}}),f.jsx(lr,{sx:{mb:1}}),f.jsxs(FN,{children:[f.jsx(tn,{children:"General Settings"}),f.jsx(l.Field,{name:"descriptionText",validators:{onChange:fr(a,{required:!1})},children:c=>f.jsx(ct,{id:"description-text",label:"Description",value:c.state.value??"",onChange:u=>c.handleChange(u.target.value),onBlur:c.handleBlur,placeholder:"Enter a description (you can use {{key}})",helperText:vt(c.state.meta.errors)??"Use {{key}} to insert a param value",error:c.state.meta.errors?.length>0})}),f.jsx(l.Field,{name:"optional",validators:{onChange:ei().optional()},children:c=>f.jsx(ha,{control:f.jsx(dl,{checked:c.state.value??!1,onChange:u=>c.handleChange(u.target.checked)}),label:"Optional"})})]}),f.jsx(l.Subscribe,{selector:c=>c.values.type,children:c=>{switch(c){case"tap":return f.jsx(PN,{form:l});case"assert":return f.jsx(jN,{form:l});case"type":return f.jsx(ON,{form:l,getDefinedParams:a});case"scroll":return f.jsx(RN,{form:l});case"zoom":return f.jsx(DN,{form:l});case"scrollUntil":return f.jsx(TN,{form:l,getDefinedParams:a});case"deeplink":return f.jsx(zN,{form:l,getDefinedParams:a});case"ai":return f.jsx(AN,{form:l,getDefinedParams:a});case"fileRef":return f.jsx(CN,{form:l,getDefinedParams:a});default:return null}}}),f.jsxs(LN,{children:[f.jsx(Et,{startIcon:f.jsx(T_,{}),variant:"contained",type:"submit",children:"Save"}),f.jsx(Et,{startIcon:f.jsx(x_,{}),variant:"outlined",color:"error",onClick:r,children:"Cancel"})]})]})})]})},CN=({form:e,getDefinedParams:t})=>{const{data:r,isLoading:o}=dn(Uu),n=new Set((r?.files||[]).filter(i=>i.type==="file").map(i=>i.path));return f.jsxs(Dn,{children:[f.jsx(tn,{children:"File Reference"}),f.jsx(e.Field,{name:"path",validators:{onChange:({value:i})=>{const a=String(i??"").trim();if(!a)return"This field is required";if(Wu(a).length>0)return fr(t,{required:!0})({value:a});if(!o&&r&&!n.has(a))return"File not found in tests directory"}},children:i=>{const a=i.state.meta.errors?.length>0,s=a?vt(i.state.meta.errors):o?"Checking files...":"Path is relative to your tests directory (supports {{key}})";return f.jsx(ct,{id:"file-path",label:"File path",placeholder:"e.g., test2.json or subfolder/flow.json (you can use {{key}})",value:i.state.value??"",onChange:l=>i.handleChange(l.target.value),onBlur:i.handleBlur,error:a,helperText:s,fullWidth:!0})}}),f.jsx(e.Subscribe,{selector:i=>({path:i.values.path,overrides:i.values.overrides}),children:({path:i,overrides:a})=>f.jsx(EN,{path:i,overrides:a,onChange:s=>e.setFieldValue("overrides",s),validPaths:n})})]})},EN=({path:e,overrides:t,onChange:r,validPaths:o})=>{const[n,i]=He.useState(!1),[a,s]=He.useState({}),l=Ze(Bu);He.useEffect(()=>{let p=!1;return(async()=>{if(!e||!o.has(e)){s({});return}i(!0);try{const g=(await l.mutateAsync({path:e}))?.content;Array.isArray(g)?s({}):s(g&&typeof g=="object"?g.params||{}:{})}catch{s({})}finally{p||i(!1)}})(),()=>{p=!0}},[e]);const c=t||{},u=(p,m)=>{const h={...c};m?h[p]=m:delete h[p],r(h)},d=Object.keys(a);return e?f.jsxs(Ye,{sx:{mt:2},children:[f.jsx(je,{variant:"subtitle2",children:"Param overrides"}),n?f.jsx(je,{variant:"caption",color:"text.secondary",children:"Loading referenced test…"}):d.length===0?f.jsx(je,{variant:"caption",color:"text.secondary",children:"Referenced test has no params"}):f.jsx(Ye,{sx:{display:"flex",flexDirection:"column",gap:1,mt:1},children:d.map(p=>f.jsxs(Ye,{sx:{display:"grid",gridTemplateColumns:"160px 1fr",gap:1,alignItems:"center"},children:[f.jsx(ct,{size:"small",label:"Key",value:p,disabled:!0}),f.jsxs(Ye,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:1},children:[f.jsx(ct,{size:"small",label:"Default",value:a[p]??"",disabled:!0}),f.jsx(ct,{size:"small",label:"Override (optional)",value:c[p]??"",onChange:m=>u(p,m.target.value)})]})]},p))})]}):null},PN=({form:e})=>f.jsxs(Dn,{children:[f.jsx(tn,{children:"Tap Configuration"}),f.jsx(e.Field,{name:"timeout",validators:{onChange:Zu},children:t=>{const r=t.state.meta.errors?.length>0;return f.jsx(ct,{type:"number",id:"timeout",label:"Timeout (ms)",value:t.state.value??0,onChange:o=>t.handleChange(parseInt(o.target.value)||0),onBlur:t.handleBlur,placeholder:"Enter timeout",error:r,helperText:vt(t.state.meta.errors)})}}),f.jsx(e.Field,{name:"elementId",validators:{onChange:gt().optional()},children:t=>{const r=t.state.meta.errors?.length>0;return f.jsx(ct,{id:"tap-element-id",label:"Element Identifier (elementId)",value:t.state.value??"",onChange:o=>t.handleChange(o.target.value),onBlur:t.handleBlur,placeholder:"Android: com.app:id/button | iOS: accessibilityIdentifier/name/label",error:r,helperText:vt(t.state.meta.errors)??(re.state.selectedPlatform==="ios"?"Optional. iOS: prefer accessibilityIdentifier, otherwise name/label. Supports index like value[2].":"Optional. Android: resource-id (e.g., com.app:id/button). Supports index like id[2].")})}}),f.jsx(e.Field,{name:"useLlmOnly",validators:{onChange:ei().optional()},children:t=>f.jsx(ha,{control:f.jsx(dl,{checked:t.state.value??!1,onChange:r=>t.handleChange(r.target.checked)}),label:"Use LLM only"})})]}),jN=({form:e})=>f.jsxs(Dn,{children:[f.jsx(tn,{children:"Assert Configuration"}),f.jsx(e.Field,{name:"timeout",validators:{onChange:Zu},children:t=>{const r=t.state.meta.errors?.length>0;return f.jsx(ct,{type:"number",id:"timeout",label:"Timeout (ms)",value:t.state.value??0,onChange:o=>t.handleChange(parseInt(o.target.value)||0),onBlur:t.handleBlur,placeholder:"Enter timeout",error:r,helperText:vt(t.state.meta.errors)})}}),f.jsx(e.Field,{name:"elementId",validators:{onChange:gt().optional()},children:t=>{const r=t.state.meta.errors?.length>0;return f.jsx(ct,{id:"assert-element-id",label:"Resource ID (elementId)",value:t.state.value??"",onChange:o=>t.handleChange(o.target.value),onBlur:t.handleBlur,placeholder:"e.g. com.app:id/label or com.app:id/label[1]",error:r,helperText:vt(t.state.meta.errors)??"Optional. Android resource-id of the element to assert."})}}),f.jsx(e.Field,{name:"useLlmOnly",validators:{onChange:ei().optional()},children:t=>f.jsx(ha,{control:f.jsx(dl,{checked:t.state.value??!1,onChange:r=>t.handleChange(r.target.checked)}),label:"Use LLM only"})})]}),ON=({form:e,getDefinedParams:t})=>f.jsxs(Dn,{children:[f.jsx(tn,{children:"Type Configuration"}),f.jsx(e.Field,{name:"text",validators:{onChange:fr(t,{required:!0})},children:r=>{const o=r.state.meta.errors?.length>0;return f.jsx(ct,{id:"text",label:"Text to type",value:r.state.value??"",onChange:n=>r.handleChange(n.target.value),onBlur:r.handleBlur,placeholder:"Enter text to type (you can use {{key}})",multiline:!0,rows:3,error:o,helperText:vt(r.state.meta.errors)??"Use {{key}} to insert a param value"})}})]}),RN=({form:e})=>f.jsxs(Dn,{children:[f.jsx(tn,{children:"Scroll Configuration"}),f.jsx(e.Field,{name:"direction",validators:{onChange:Rx},children:t=>{const r=t.state.meta.errors?.length>0;return f.jsxs(br,{fullWidth:!0,error:r,children:[f.jsx(Zr,{id:"scroll-direction",children:"Direction"}),f.jsxs(yr,{labelId:"scroll-direction",id:"scroll-direction",value:t.state.value??"down",label:"Direction",onChange:o=>t.handleChange(o.target.value),onBlur:t.handleBlur,children:[f.jsx(Ln,{value:"up",children:"Up"}),f.jsx(Ln,{value:"down",children:"Down"})]}),r&&f.jsx(Lo,{children:vt(t.state.meta.errors)})]})}})]}),DN=({form:e})=>f.jsxs(Dn,{children:[f.jsx(tn,{children:"Zoom Configuration"}),f.jsx(e.Field,{name:"direction",validators:{onChange:IN},children:t=>{const r=t.state.meta.errors?.length>0;return f.jsxs(br,{fullWidth:!0,error:r,children:[f.jsx(Zr,{id:"zoom-direction",children:"Direction"}),f.jsxs(yr,{labelId:"zoom-direction",id:"zoom-direction",value:t.state.value??"in",label:"Direction",onChange:o=>t.handleChange(o.target.value),onBlur:t.handleBlur,children:[f.jsx(Ln,{value:"in",children:"In (spread)"}),f.jsx(Ln,{value:"out",children:"Out (pinch)"})]}),r&&f.jsx(Lo,{children:vt(t.state.meta.errors)})]})}})]}),TN=({form:e,getDefinedParams:t})=>f.jsxs(Dn,{children:[f.jsx(tn,{children:"Scroll Until Configuration"}),f.jsx(e.Field,{name:"direction",validators:{onChange:Rx},children:r=>{const o=r.state.meta.errors?.length>0;return f.jsxs(br,{fullWidth:!0,error:o,children:[f.jsx(Zr,{id:"scroll-until-direction",children:"Direction"}),f.jsxs(yr,{labelId:"scroll-until-direction",id:"scroll-until-direction",value:r.state.value??"down",label:"Direction",onChange:n=>r.handleChange(n.target.value),onBlur:r.handleBlur,children:[f.jsx(Ln,{value:"up",children:"Up"}),f.jsx(Ln,{value:"down",children:"Down"})]}),o&&f.jsx(Lo,{children:vt(r.state.meta.errors)})]})}}),f.jsx(e.Field,{name:"maxScrolls",validators:{onChange:Zu},children:r=>{const o=r.state.meta.errors?.length>0;return f.jsx(ct,{type:"number",id:"max-scrolls",label:"Max Scrolls",value:r.state.value??15,onChange:n=>r.handleChange(parseInt(n.target.value)||15),onBlur:r.handleBlur,placeholder:"Maximum scroll attempts",error:o,helperText:vt(r.state.meta.errors)??"Maximum number of scroll attempts (default: 15)"})}}),f.jsx(tn,{sx:{mt:1},children:"Stop Condition (at least one)"}),f.jsx(e.Field,{name:"text",validators:{onChange:fr(t,{required:!1})},children:r=>{const o=r.state.meta.errors?.length>0;return f.jsx(ct,{id:"scroll-until-text",label:"Text to find",value:r.state.value??"",onChange:n=>r.handleChange(n.target.value),onBlur:r.handleBlur,placeholder:"Text content to scroll until visible (supports {{key}})",error:o,helperText:vt(r.state.meta.errors)??"Scroll until this text (with params resolved) is visible on screen"})}}),f.jsx(e.Field,{name:"elementId",validators:{onChange:fr(t,{required:!1})},children:r=>{const o=r.state.meta.errors?.length>0;return f.jsx(ct,{id:"scroll-until-element-id",label:"Element ID",value:r.state.value??"",onChange:n=>r.handleChange(n.target.value),onBlur:r.handleBlur,placeholder:"Element ID to scroll until visible (supports {{key}})",error:o,helperText:vt(r.state.meta.errors)??"Scroll until element with this ID (after resolving params) is visible"})}})]}),zN=({form:e,getDefinedParams:t})=>f.jsxs(Dn,{children:[f.jsx(tn,{children:"Deeplink Configuration"}),f.jsx(e.Field,{name:"url",validators:{onChange:({value:r})=>{const o=String(r??"").trim();if(!o)return"URL is required";if(Wu(o).length>0)return fr(t,{required:!0})({value:o});const i=kN.safeParse(o);return i.success?void 0:i.error.issues[0]?.message||"Invalid URL"}},children:r=>{const o=r.state.meta.errors?.length>0;return f.jsx(ct,{id:"url",label:"URL",value:r.state.value??"",onChange:n=>r.handleChange(n.target.value),onBlur:r.handleBlur,placeholder:"Enter deeplink URL (you can use {{key}})",fullWidth:!0,error:o,helperText:vt(r.state.meta.errors)??"Use {{key}} to insert a param value"})}})]}),AN=({form:e,getDefinedParams:t})=>f.jsxs(Dn,{children:[f.jsx(tn,{children:"AI Configuration"}),f.jsx(e.Field,{name:"instruction",validators:{onChange:fr(t,{required:!0})},children:r=>{const o=r.state.meta.errors?.length>0;return f.jsx(ct,{id:"instruction",label:"AI Instruction",value:r.state.value??"",onChange:n=>r.handleChange(n.target.value),onBlur:r.handleBlur,placeholder:"Enter instruction for AI to execute (you can use {{key}})",multiline:!0,rows:4,error:o,helperText:vt(r.state.meta.errors)??"Use {{key}} to insert a param value"})}})]}),MN=N(Ye)`
|
|
196
|
+
padding: 1.5rem;
|
|
197
|
+
margin-bottom: 1.5rem;
|
|
198
|
+
`,NN=N(Ye)`
|
|
199
|
+
display: flex;
|
|
200
|
+
flex-direction: column;
|
|
201
|
+
gap: 1.25rem;
|
|
202
|
+
`,Dx=N(Ye)`
|
|
203
|
+
display: flex;
|
|
204
|
+
flex-direction: column;
|
|
205
|
+
gap: 1rem;
|
|
206
|
+
padding: 1rem;
|
|
207
|
+
border-radius: 6px;
|
|
208
|
+
`,FN=N(Dx)`
|
|
209
|
+
background-color: #fafafa;
|
|
210
|
+
border: 1px solid #e0e0e0;
|
|
211
|
+
`,Dn=N(Dx)`
|
|
212
|
+
background-color: #f5f5f5;
|
|
213
|
+
border: 1px dashed #bdbdbd;
|
|
214
|
+
`,tn=N(je)`
|
|
215
|
+
font-size: 0.75rem;
|
|
216
|
+
color: #757575;
|
|
217
|
+
text-transform: uppercase;
|
|
218
|
+
letter-spacing: 0.5px;
|
|
219
|
+
margin-bottom: 0.5rem;
|
|
220
|
+
`,LN=N(Ye)`
|
|
221
|
+
display: flex;
|
|
222
|
+
gap: 0.5rem;
|
|
223
|
+
justify-content: center;
|
|
224
|
+
`,Tx=48,UN=()=>{const[e,t]=b.useState(!1),[r,o]=b.useState(!1),n=Xe(re,s=>s.executionLog),i=Xe(re,s=>s.isPlaying);if(n.length===0&&!i)return null;const a=()=>{o(!r)};return f.jsxs(BN,{$isMaximized:r,children:[f.jsxs(VN,{onClick:a,children:[f.jsxs(je,{variant:"subtitle2",children:["Execution Log (",n.length," steps)"]}),f.jsx(he,{size:"small",onClick:s=>{s.stopPropagation(),a()},children:r?f.jsx(P_,{}):f.jsx(j_,{})})]}),r&&f.jsx(WN,{children:f.jsx(ZN,{children:n.map(s=>f.jsxs(GN,{children:[f.jsx(HN,{src:s.screenshot,alt:`Step ${s.stepNumber}`}),f.jsxs(KN,{children:[f.jsxs(qN,{children:["#",s.stepNumber]}),f.jsx(JN,{children:s.cacheHit?f.jsx(Mn,{title:"Cache Hit",children:f.jsx(y_,{color:"success",fontSize:"small"})}):f.jsx(Mn,{title:"Cache Miss / Fresh Execution",children:f.jsx(__,{color:"info",fontSize:"small"})})})]})]},s.stepId))})})]})},BN=Re(gr)`
|
|
225
|
+
position: fixed;
|
|
226
|
+
bottom: 0;
|
|
227
|
+
left: 0;
|
|
228
|
+
right: 0;
|
|
229
|
+
z-index: 1300; // High z-index to be on top of everything
|
|
230
|
+
border-top-left-radius: 8px;
|
|
231
|
+
border-top-right-radius: 8px;
|
|
232
|
+
overflow: hidden;
|
|
233
|
+
transition: height 0.3s ease;
|
|
234
|
+
height: ${({$isMaximized:e})=>e?"400px":`${Tx}px`};
|
|
235
|
+
display: flex;
|
|
236
|
+
flex-direction: column;
|
|
237
|
+
background-color: ${({theme:e})=>e.palette?.background?.paper||"#fff"};
|
|
238
|
+
box-shadow: 0px -2px 10px rgba(0,0,0,0.1);
|
|
239
|
+
`,VN=Re.div`
|
|
240
|
+
height: ${Tx}px;
|
|
241
|
+
padding: 0 16px;
|
|
242
|
+
display: flex;
|
|
243
|
+
align-items: center;
|
|
244
|
+
justify-content: space-between;
|
|
245
|
+
cursor: pointer;
|
|
246
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
247
|
+
&:hover {
|
|
248
|
+
background-color: rgba(0, 0, 0, 0.08);
|
|
249
|
+
}
|
|
250
|
+
flex-shrink: 0;
|
|
251
|
+
`,WN=Re.div`
|
|
252
|
+
flex: 1;
|
|
253
|
+
overflow-x: auto;
|
|
254
|
+
overflow-y: hidden;
|
|
255
|
+
padding: 16px;
|
|
256
|
+
background-color: rgba(0,0,0,0.02);
|
|
257
|
+
`,ZN=Re.div`
|
|
258
|
+
display: flex;
|
|
259
|
+
gap: 16px;
|
|
260
|
+
height: 100%;
|
|
261
|
+
align-items: center;
|
|
262
|
+
`,GN=Re.div`
|
|
263
|
+
position: relative;
|
|
264
|
+
height: 100%;
|
|
265
|
+
aspect-ratio: 9/16; // Assumes mobile portrait roughly, will adjust to image
|
|
266
|
+
border-radius: 8px;
|
|
267
|
+
overflow: hidden;
|
|
268
|
+
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
|
|
269
|
+
background: #000;
|
|
270
|
+
flex-shrink: 0;
|
|
271
|
+
`,HN=Re.img`
|
|
272
|
+
width: 100%;
|
|
273
|
+
height: 100%;
|
|
274
|
+
object-fit: contain;
|
|
275
|
+
`,KN=Re.div`
|
|
276
|
+
position: absolute;
|
|
277
|
+
top: 0;
|
|
278
|
+
left: 0;
|
|
279
|
+
right: 0;
|
|
280
|
+
padding: 4px 8px;
|
|
281
|
+
display: flex;
|
|
282
|
+
justify-content: space-between;
|
|
283
|
+
align-items: start;
|
|
284
|
+
background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
|
|
285
|
+
`,qN=Re.span`
|
|
286
|
+
color: white;
|
|
287
|
+
font-weight: bold;
|
|
288
|
+
font-size: 14px;
|
|
289
|
+
text-shadow: 0 1px 2px rgba(0,0,0,0.8);
|
|
290
|
+
`,JN=Re.div`
|
|
291
|
+
display: flex;
|
|
292
|
+
align-items: center;
|
|
293
|
+
justify-content: center;
|
|
294
|
+
background: rgba(255,255,255,0.9);
|
|
295
|
+
border-radius: 50%;
|
|
296
|
+
padding: 2px;
|
|
297
|
+
`,ti=new xf({open:!1,maintainDisplayed:!1});function XN(){ti.setState(e=>({...e,open:!1}))}function Gu(e,t){ti.setState({type:"success",title:t?.title??"Success",description:e,listContent:t?.listContent,open:!0,maintainDisplayed:t?.maintainDisplayed??!1})}function Ks(e,t){ti.setState({type:"error",title:t?.title??"Error",description:e,listContent:t?.listContent,open:!0,maintainDisplayed:t?.maintainDisplayed??!1})}function YN(e,t){ti.setState({type:"info",title:t?.title,description:e,listContent:t?.listContent,open:!0,maintainDisplayed:t?.maintainDisplayed??!1})}const QN=/\{\{\s*([a-zA-Z0-9_.-]+)\s*\}\}/g;function e2(e,t){const r=new Set;return{value:e.replace(QN,(n,i)=>Object.prototype.hasOwnProperty.call(t,i)?t[i]??"":(r.add(i),"")),missing:Array.from(r)}}function wr(e,t){const r={...e},o={},n=i=>{const a=r[i];if(typeof a=="string"&&a.includes("{{")){const{value:s,missing:l}=e2(a,t);r[i]=s,l.length&&(o[i]=l)}};return n("descriptionText"),n("text"),n("elementId"),n("url"),n("instruction"),n("path"),{step:r,missingMap:o}}const t2=({step:e,index:t,onPlay:r,onPlayFromHere:o,onEdit:n,onDelete:i})=>{const a={stepNumber:t+1,onPlay:r,onPlayFromHere:o,onEdit:n,onDelete:i};switch(e.type){case"tap":return f.jsx(DA,{step:e,...a});case"assert":return f.jsx(TA,{step:e,...a});case"type":return f.jsx(zA,{step:e,...a});case"scroll":return f.jsx(AA,{step:e,...a});case"swipe":return f.jsx(MA,{step:e,...a});case"zoom":return f.jsx(NA,{step:e,...a});case"scrollUntil":return f.jsx(FA,{step:e,...a});case"deeplink":return f.jsx(LA,{step:e,...a});case"ai":return f.jsx(UA,{step:e,...a});case"fileRef":return f.jsx(RA,{step:e,...a});default:return null}},n2=({onSave:e,canSave:t})=>{const[r,o]=b.useState(!1),[n,i]=b.useState(void 0),a=Xe(re,_=>_.isRecording),s=Xe(re,_=>_.test.steps),l=Xe(re,_=>_.isPlaying),c=Xe(re,_=>_.selectedPlatform),u=Xe(re,_=>_.selectedDeviceId),{data:d=[]}=dn(kx),p=b.useRef(null),m=()=>{re.setState(_=>({..._,isRecording:!_.isRecording}))},h=Ze(Au),g=Ze(Mu),v=Ze(Nu),y=Ze(rM),S=Ze(cM),w=Ze(aM),x=Ze(Fu);Ze(IM);const $=Ze(vM),I=Ze(TM),E=Ze(Lu),k=Ze(MM),D=Ze(Bu),j=Wr(),C=(_,W,V)=>{re.setState(B=>({...B,test:{...B.test,steps:B.test.steps.map(ne=>ne.id===_?{...ne,status:W,statusColor:V}:ne)}}))},z=_=>{re.setState(W=>({...W,currentStepId:_}))},{data:O}=dn(_x),A=_=>new Promise(W=>setTimeout(W,_)),T=async()=>{try{const _=await $.mutateAsync({platform:c,deviceId:u});if(!_.success||!_.base64)throw new Error(_.error||"Failed to capture screenshot");const V=(_.base64.length*.75/(1024*1024)).toFixed(2);return console.log(`[Editor] Captured screenshot: ~${V} MB (${_.base64.length} chars)`),_.base64}catch(_){throw console.error("Screenshot failed:",_),_}},P=_=>new Promise(W=>{const V=new Image;V.onload=()=>W({width:V.naturalWidth,height:V.naturalHeight}),V.src=_}),M=async(_,W,V,B,ne=[],ce)=>{C(_,"Starting Smart Loop...","purple");try{let oe=0;const ke=15;let ye=[...ne],we,G=!1;const Pe=[];for(;oe<ke;){if(p.current?.signal.aborted)throw new Error("Aborted");let ae="",Fe=[],ze=!1;const Ke=2e3,dt=500,it=Math.floor(Ke/dt);for(let Ee=0;Ee<it;Ee++){if(p.current?.signal.aborted)throw new Error("Aborted");ae=await T();try{const{width:pt,height:Ve}=await P(ae);console.log(`Checking cache (Attempt ${Ee+1}/${it}) with:`,{stepNumber:W,description:V,platform:c,resolution:{width:pt,height:Ve},highest_used_index:we});const J=await I.mutateAsync({stepNumber:W,stepDescription:V,filepath:void 0,screenshot:ae,platform:c,screenResolution:{width:pt,height:Ve},highest_used_index:we});if(console.log("Cache result:",J),J.found&&J.cacheCommands){Fe=J.cacheCommands,we=J.cacheIndex,ze=!0,C(_,`Cache Hit! (${Fe.length} cmds)`,"green");break}}catch(pt){console.warn("Cache check failed:",pt)}Ee<it-1&&(C(_,`Cache miss, retrying... (${Ee+1}/${it})`,"orange"),await A(dt))}re.setState(Ee=>({...Ee,executionLog:[...Ee.executionLog,{stepId:_,stepNumber:W,screenshot:ae,cacheHit:ze,timestamp:Date.now()}]}));let ut=[],me=[];if(!ze){G=!0,C(_,"Cache Miss. Asking AI...","orange");let Ee;if(ce)try{const We=await j.fetchQuery(Ix({enabled:!0}));Ee=tN(We.elements)}catch(We){console.warn("Failed to fetch visible elements for uiHierarchy:",We)}const Ve=await k.mutateAsync({base64_screenshot:ae.replace(/^data:image\/\w+;base64,/,""),instruction:B,action_history:ye,elementId:ce,uiHierarchy:Ee});me=Ve.appetizeCommands||[];const J=Ve.gptCommands?.findIndex(We=>We.startsWith("reasoning:"));if(J!==-1){ut=Ve.gptCommands?.slice(J)||[];const We=ut.filter(It=>It.startsWith("remember:"));We?.length>0&&ne.push(...We),ye=[...ye,...ut]}const Le=Ve.gptCommands||[];Fe=[...me]}Pe.push({screenshot:ae,commands:me.length>0?me:Fe});let Be=!1,nt=!1;Fe.length>0&&(console.log(`[Step ${_}] Executing commands:`,Fe),ze&&C(_,`Executing ${Fe.length} cached commands...`,"blue"));for(const Ee of Fe){if(p.current?.signal.aborted)throw new Error("Aborted");if(Ee.toLowerCase().includes("task complete:")){nt=!0;continue}if(Ee.toLowerCase().includes("error detected:"))throw new Error(`AI Reported Error: ${Ee}`);if(Ee.startsWith("remember:")&&ne.push(Ee),Ee.match(/^t(ap|ab)On:/)){console.log(`Tap Match: ${Ee}`);let Ve,J;const Le=Ee.match(/x=(\d+)/),We=Ee.match(/y=(\d+)/);if(Le&&We)Ve=parseInt(Le[1],10),J=parseInt(We[1],10);else{const It=Ee.split(";");It.length>=3&&(Ve=parseInt(It[1],10),J=parseInt(It[2],10))}console.log(`Tap: ${Ve},${J}`),Ve!==void 0&&J!==void 0&&(C(_,`Exec: Tap ${Ve},${J}`,"blue"),await h.mutateAsync({x:Ve,y:J,platform:c,deviceId:u}),Be=!0)}else if(Ee.startsWith("wait:")){const Ve=Ee.match(/wait:\s*(\d+)/)?.[1];if(Ve){const J=parseInt(Ve,10);C(_,`Exec: Wait ${J}s`,"blue"),await A(J*1e3),Be=!0}}else if(Ee.startsWith("scroll:")){const Ve=Ee.match(/scroll:\s*(up|down)/i)?.[1];Ve&&(C(_,`Scroll ${Ve}`,"blue"),await v.mutateAsync({direction:Ve.toLowerCase(),platform:c,deviceId:u}),Be=!0)}}if(Be&&(ze&&ye.push(...Fe),await A(100)),nt){if(C(_,"Task Completed.","green"),G){C(_,"Populating Cache...","green");try{await E.mutateAsync({stepNumber:W,stepDescription:V,filepath:void 0,executionData:Pe,platform:c,screenResolution:await P(Pe[0].screenshot)}),console.log("Cache populated successfully")}catch(Ee){console.error("Failed to populate cache:",Ee)}}else console.log("Skipping cache population (all actions cached)"),C(_,"Task Completed (Cached)","green");return!0}oe++}throw new Error("Smart Loop Timeout")}catch(oe){throw oe}},F=async(_,W,V,B=[])=>{if(V.aborted)return!1;z(_.id),C(_.id,"Executing...","blue");const ne={platform:c,deviceId:u},ce=Date.now();try{let oe;const ye=()=>re.state.currentScreenshot||void 0;switch(_.type){case"tap":{let G=_.descriptionText;G||(_.elementId&&_.elementId.trim()?G=`tap the element with id "${_.elementId}"`:_.x!==void 0&&_.y!==void 0?G=`tap on the screen at x=${_.x} y=${_.y}`:G="tap on the screen"),await M(_.id,W,_.descriptionText||"tap",G,B,_.elementId);break}case"swipe":{const G=_,Pe=typeof G.duration=="number"?G.duration:500;let ae=1080,Fe=1920;try{const Be=await T(),nt=await P(Be);ae=nt.width,Fe=nt.height}catch(Be){console.warn("Falling back to default screen size for swipe computation",Be)}let ze;typeof G.x=="number"?ze=Math.round(G.x):ze=G.direction==="left"?Math.round(ae*.8):Math.round(ae*.2);let Ke;typeof G.y=="number"?Ke=Math.round(G.y):Ke=Math.round(Fe*.5);const dt=Math.max(80,Math.round(ae*.5));let it=G.direction==="left"?ze-dt:ze+dt,ut=Ke;const me=5;ze=Math.min(Math.max(me,ze),ae-me),Ke=Math.min(Math.max(me,Ke),Fe-me),it=Math.min(Math.max(me,it),ae-me),ut=Math.min(Math.max(me,ut),Fe-me),await x.mutateAsync({x1:ze,y1:Ke,x2:it,y2:ut,duration:Pe,...ne}),C(_.id,"Swipe Performed","green");break}case"assert":{let G=`Verify that: ${_.descriptionText}`;!_.descriptionText&&_.elementId&&(G=`Verify element with id ${_.elementId} exists`),await M(_.id,W,_.descriptionText||"assert",G,B,_.elementId),C(_.id,"Assertion Passed","green");break}case"ai":{const G={...O,...re.state.test.params},{step:Pe,missingMap:ae}=wr(_,G);if(ae.instruction?.length)throw new Error(`Missing params for placeholders -> instruction: ${ae.instruction.join(", ")}`);await M(_.id,W,Pe.instruction,Pe.instruction,B);break}case"type":{oe=ye();const G={...O,...re.state.test.params},{step:Pe,missingMap:ae}=wr(_,G);if(Object.keys(ae).length){const Fe=Object.entries(ae).map(([ze,Ke])=>`${ze}: ${Ke.join(", ")}`).join("; ");throw new Error(`Missing params for placeholders -> ${Fe}`)}await g.mutateAsync({text:Pe.text,...ne}),C(_.id,"Typed","green");break}case"scroll":{oe=ye(),await v.mutateAsync({direction:_.direction,...ne}),C(_.id,"Scrolled","green");break}case"zoom":{oe=ye(),await w.mutateAsync({direction:_.direction,...ne}),C(_.id,"Zoomed","green");break}case"scrollUntil":{oe=ye();const G={...O,...re.state.test.params},{step:Pe,missingMap:ae}=wr(_,G);if(ae.text?.length)throw new Error(`Missing params for placeholders -> text: ${ae.text.join(", ")}`);C(_.id,"Scrolling until found...","blue");const Fe=await y.mutateAsync({text:Pe.text,elementId:Pe.elementId,direction:Pe.direction,maxScrolls:Pe.maxScrolls,...ne});if(Fe.success)C(_.id,`Found after ${Fe.scrolls??0} scrolls`,"green");else throw new Error("Target not found after scrolling");break}case"deeplink":{oe=ye();const G={...O,...re.state.test.params},{step:Pe,missingMap:ae}=wr(_,G);if(ae.url?.length)throw new Error(`Missing params for placeholders -> url: ${ae.url.join(", ")}`);await S.mutateAsync({url:Pe.url,...ne}),C(_.id,"Opened deeplink","green");break}case"fileRef":{C(_.id,"Loading steps from file...","blue");const G={...O,...re.state.test.params},{step:Pe,missingMap:ae}=wr(_,G);if(ae.path?.length)throw new Error(`Missing params for placeholders -> path: ${ae.path.join(", ")}`);const ze=(await D.mutateAsync({path:Pe.path}))?.content;let Ke=[],dt={};if(Array.isArray(ze))Ke=ze;else if(ze&&Array.isArray(ze.steps))Ke=ze.steps,dt=ze.params||{};else throw new Error("Referenced file must be an array or an object with steps");const it={...O,...re.state.test.params,...dt,..._.overrides},me=zu.array().parse(Ke).map((Be,nt)=>{const Ee=typeof Be.id=="number"?Be.id:Date.now()+nt,{step:pt,missingMap:Ve}=wr(Be,it);if(pt.type==="type"&&Ve.text?.length||pt.type==="scrollUntil"&&Ve.text?.length||pt.type==="deeplink"&&Ve.url?.length||pt.type==="ai"&&Ve.instruction?.length){const J=[];for(const[Le,We]of Object.entries(Ve))We.length&&J.push(`${Le}: ${We.join(", ")}`);throw new Error(`Referenced step has missing params -> ${J.join("; ")}`)}return{id:Ee,...pt,originRef:{refId:_.id,path:_.path,descriptionText:_.descriptionText,optional:_.optional,overrides:_.overrides}}});re.setState(Be=>{const nt=Be.test.steps.findIndex(pt=>pt.id===_.id);if(nt===-1)return Be;const Ee=[...Be.test.steps];return Ee.splice(nt,1,...me),{...Be,test:{...Be.test,steps:Ee}}}),C(_.id,"Expanded steps from file","green");break}}await A(100);const we=Date.now()-ce;return console.log(`[Step ${_.id}] Execution Finished. Total Duration: ${we}ms`),oe&&re.setState(G=>({...G,executionLog:[...G.executionLog,{stepId:_.id,stepNumber:W,screenshot:oe,cacheHit:!1,timestamp:Date.now()}]})),!0}catch(oe){const ke=oe instanceof Error?oe.message:"Unknown error";return _.optional?(C(_.id,`Failed (optional): ${ke}`,"orange"),!0):(C(_.id,`Error: ${ke}`,"red"),!1)}},L=()=>{re.setState(_=>{const W=_.test.steps,V=[],B=new Set,ne=new Set;let ce=0;for(;ce<W.length;){const ke=W[ce];if(ke?.type==="fileRef"){const ye=ke.path;if(ne.has(ye)){ce++;continue}B.add(ke.id),ne.add(ye),V.push(ke),ce++;continue}if(ke&&ke.originRef){const ye=ke.originRef.refId,we=ke.originRef.path,G=ke.originRef.descriptionText,Pe=ke.originRef.optional;let ae=ce;for(;ae<W.length&&W[ae]?.originRef?.refId===ye;)ae++;if(B.has(ye)||ne.has(we)){ce=ae;continue}const Fe={id:ye,type:"fileRef",path:we,descriptionText:G,optional:Pe,overrides:ke?.originRef?.overrides};V.some(ze=>ze.id===Fe.id)&&(Fe.id=Date.now()),V.push(Fe),B.add(Fe.id),ne.add(we),ce=ae;continue}V.push(ke),ce++}const oe=[];for(const ke of V){const ye=oe[oe.length-1];ye?.type==="fileRef"&&ke?.type==="fileRef"&&ye.path===ke.path||oe.push(ke)}return{..._,test:{..._.test,steps:oe}}})},X=async(_,W)=>{if(console.log("Running playback from index:",_),re.state.test.steps.length===0){alert("No steps to play!");return}p.current=new AbortController;const B=p.current.signal;re.setState(we=>({...we,isPlaying:!0})),re.setState(we=>({...we,test:{...we.test,steps:we.test.steps.map((G,Pe)=>Pe>=_?{...G,status:"",statusColor:""}:G)},executionLog:[]}));let ne=_;const ce=_+1,oe=[];let ke=!1,ye;for(;!B.aborted;){const we=re.state.test.steps,G=W?ce:we.length;if(ne>=G)break;const Pe=we[ne],ae=Pe.type;if(!await F(Pe,ne+1,B,oe)&&!Pe.optional){ke=!0,ye=re.state.test.steps.find(Ke=>Ke.id===Pe.id)?.status||"Execution failed";break}if(ae==="fileRef"){if(W)break;continue}ne++}await A(500),L(),z(null),re.setState(we=>({...we,isPlaying:!1})),p.current=null,B.aborted||(ke?Ks(ye||"Playback failed",{title:"Execution Failed"}):Gu("Playback finished successfully",{title:"Execution Completed"}))},Q=()=>X(0,!1),pe=_=>{const W=s.findIndex(V=>V.id===_);W!==-1&&X(W,!0)},le=_=>{const W=s.findIndex(V=>V.id===_);W!==-1&&X(W,!1)},be=()=>{p.current?.abort(),L(),re.setState(_=>({..._,isPlaying:!1})),z(null),YN("Playback stopped",{title:"Stopped"})},te=_=>{i(_),o(!1)},q=()=>{o(!1),i(void 0)},se=()=>{o(!1),i(void 0)},Oe=_=>{confirm("Delete this step?")&&re.setState(W=>({...W,test:{...W.test,steps:W.test.steps.filter(V=>V.id!==_)}}))},Se=()=>{confirm("Are you sure you want to clear all steps?")&&re.setState(_=>({..._,test:{..._.test,steps:[]}}))},ie=l||a,de=r||!!n;return f.jsxs(r2,{$hasForm:de,children:[f.jsxs(s2,{children:[f.jsx(ct,{variant:"standard",value:Xe(re,_=>_.test.name),onChange:_=>{re.setState(W=>({...W,test:{...W.test,name:_.target.value}}))},placeholder:"Untitled",InputProps:{disableUnderline:!0,style:{fontSize:"1.5rem",fontWeight:500}},fullWidth:!0,sx:{mr:2}}),e&&f.jsx(Et,{variant:"contained",color:"primary",onClick:e,disabled:!t||l,sx:{flexShrink:0},children:"Save"})]}),f.jsx(lr,{}),f.jsxs(o2,{children:[f.jsx(Et,{variant:a?"contained":"outlined",color:a?"error":"primary",startIcon:a?f.jsx(fm,{}):f.jsx(v_,{}),onClick:m,children:a?"Stop Recording":"Record"}),l?f.jsx(Et,{variant:"contained",color:"error",onClick:be,children:"Stop"}):f.jsx(Et,{variant:"contained",disabled:a||s.length===0,onClick:Q,startIcon:f.jsx(an,{}),children:"Run from start"}),f.jsx(Et,{variant:"outlined",disabled:ie||s.length===0,onClick:Se,children:"Clear All"})]}),f.jsx(pl,{open:r||!!n,onClose:se,maxWidth:"md",fullWidth:!0,children:f.jsx(fl,{children:f.jsx(Ye,{pt:1,children:f.jsx(_N,{step:n,onSave:q,onCancel:se})})})}),f.jsxs(i2,{children:[s.length===0?f.jsx(a2,{children:f.jsx(je,{color:"text.secondary",children:"No steps recorded yet. Enable recording and click on the device screen to add steps."})}):f.jsx(vh,{onDragEnd:_=>{const{source:W,destination:V}=_;if(!V||W.index===V.index)return;const ne=[...re.state.test.steps],[ce]=ne.splice(W.index,1);ne.splice(V.index,0,ce),re.setState(oe=>({...oe,test:{...oe.test,steps:ne}}))},children:f.jsx(Hi,{droppableId:"steps-droppable",children:_=>f.jsxs("div",{ref:_.innerRef,..._.droppableProps,children:[s.map((W,V)=>f.jsx(Bl,{draggableId:String(W.id),index:V,children:(B,ne)=>f.jsx("div",{ref:B.innerRef,...B.draggableProps,...B.dragHandleProps,style:{...B.draggableProps.style,opacity:ne.isDragging?.9:1},children:f.jsx(t2,{step:W,index:V,onPlay:()=>pe(W.id),onPlayFromHere:()=>le(W.id),onEdit:()=>te(W),onDelete:()=>Oe(W.id)})})},W.id)),_.placeholder]})})}),!de&&f.jsx(Ye,{mt:2,display:"flex",justifyContent:"center",children:f.jsx(Et,{variant:"contained",disabled:ie,onClick:()=>o(!0),fullWidth:!0,children:"+ Add Step"})})]}),f.jsx(UN,{})]})},r2=Re(Ua)`
|
|
298
|
+
display: grid;
|
|
299
|
+
grid-template-areas:
|
|
300
|
+
'header'
|
|
301
|
+
'divider'
|
|
302
|
+
'actions'
|
|
303
|
+
'steps';
|
|
304
|
+
grid-template-rows: auto auto auto minmax(0, 1fr);
|
|
305
|
+
row-gap: 0.75rem;
|
|
306
|
+
overflow: hidden;
|
|
307
|
+
`,o2=Re.div`
|
|
308
|
+
display: flex;
|
|
309
|
+
gap: 0.5rem;
|
|
310
|
+
flex-wrap: wrap;
|
|
311
|
+
`,i2=Re.div`
|
|
312
|
+
overflow-y: auto;
|
|
313
|
+
padding-right: 0.5rem;
|
|
314
|
+
`,a2=Re.div`
|
|
315
|
+
display: flex;
|
|
316
|
+
align-items: center;
|
|
317
|
+
justify-content: center;
|
|
318
|
+
height: 100%;
|
|
319
|
+
padding: 2rem;
|
|
320
|
+
text-align: center;
|
|
321
|
+
`,s2=Re.div`
|
|
322
|
+
grid-area: header;
|
|
323
|
+
display: flex;
|
|
324
|
+
justify-content: space-between;
|
|
325
|
+
align-items: center;
|
|
326
|
+
`;function cn(e,t,r,o){const n=b.useRef(r),i=b.useRef(o);b.useEffect(()=>{n.current=r,i.current=o}),b.useEffect(()=>{const a=e&&"current"in e?e.current:e;if(!a)return;let s=0;function l(...u){s||n.current.apply(this,u)}a.addEventListener(t,l);const c=i.current;return()=>{s=1,a.removeEventListener(t,l),c&&c()}},[e,t])}const l2=e=>{const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),t},c2=typeof performance<"u"?performance:Date,u2=()=>c2.now();function $r(e,t=30,r=!1){const o=l2(e),n=1e3/t,i=b.useRef(0),a=b.useRef(),s=()=>a.current&&clearTimeout(a.current),l=[t,r,o];function c(){i.current=0,s()}return b.useEffect(()=>c,l),b.useCallback(function(){const u=arguments,d=u2(),p=()=>{i.current=d,s(),o.current.apply(null,u)},m=i.current;if(r&&m===0)return p();if(d-m>n){if(m>0)return p();i.current=d}s(),a.current=setTimeout(()=>{p(),i.current=0},n)},l)}function d2(e,t){if(typeof window>"u")return e;const{event:r,element:o}=t;let n;"touches"in r?n=r.touches[0]:n=r;const{clientX:i,clientY:a,screenX:s,screenY:l,pageX:c=0,pageY:u=0}=n,d=o.getBoundingClientRect(),p=c-d.left-(window.pageXOffset||window.scrollX),m=u-d.top-(window.pageYOffset||window.scrollY);return"touches"in r&&(p<0||m<0||p>d.width||m>d.height)?{...e,context:{...e.context,hoverStatus:"leave",touchStatus:"end"}}:{context:{...e.context,hoverStatus:"enter"},mouse:{...e.mouse,x:p,y:m,pageX:c,pageY:u,clientX:i,clientY:a,screenX:s,screenY:l,elementWidth:d.width,elementHeight:d.height,isOver:!0,isTouch:"touches"in r}}}function p2(e,t){const{mouse:r,context:o}=e,n=d2;if(t.type==="mousemove")return o.touchStatus==="end"?e:n(e,t);if(t.type==="touchmove"){const i={context:{...o,touchStatus:"start"},mouse:r};return n(i,t)}else if(t.type==="touchdown"){const i={context:{...o,touchStatus:"start"},mouse:{...r,isDown:!0}};return n(i,t)}else{if(t.type==="mousedown")return{context:o,mouse:{...r,isDown:!0}};if(t.type==="mouseup")return{context:o,mouse:{...r,isDown:!1}};if(t.type==="mouseleave")return{context:{...o,hoverStatus:"leave"},mouse:{...r,isOver:!1}};if(t.type==="touchleave")return{context:{...o,hoverStatus:"leave",touchStatus:"end"},mouse:{...r,isOver:!1,isDown:!1}};if(t.type==="activeStatus")return{context:{...o,activeStatus:t.value},mouse:r}}return e}function zx(e,t={}){const{fps:r=30,enterDelay:o=0,leaveDelay:n=0}=t,[i,a]=b.useReducer(p2,{mouse:uf,context:f2}),s=$r(g=>{const v=e&&"current"in e?e.current:e;v&&a({type:"mousemove",event:g,element:v})},r,!0),l=$r(g=>{const v=e&&"current"in e?e.current:e;v&&a({type:"touchmove",event:g,element:v})},r,!0),c=$r(()=>a({type:"mouseleave"}),r,!1),u=$r(g=>{const v=e&&"current"in e?e.current:e;v&&a("touches"in g?{type:"touchdown",element:v,event:g}:{type:"mousedown",element:v,event:g})},r,!0),d=$r(()=>a({type:"mouseup"}),r,!1),p=$r(()=>a({type:"touchleave"}),r,!1);cn(e,"mouseenter",s),cn(e,"mousemove",s),cn(e,"mouseleave",c),cn(e,"mousedown",u),cn(typeof window<"u"?window:null,"mousedown",u),cn(typeof window<"u"?window:null,"mouseup",d),cn(e,"touchstart",u),cn(e,"touchmove",l),cn(e,"touchend",p),cn(e,"touchcancel",p);function m(){return a({type:"activeStatus",value:"active"})}function h(){return a({type:"activeStatus",value:"inactive"})}return b.useEffect(()=>{if(i.context.hoverStatus==="enter"){if(o){const g=setTimeout(m,o);return()=>clearTimeout(g)}a({type:"activeStatus",value:"active"})}else{if(n){const g=setTimeout(h,n);return()=>clearTimeout(g)}a({type:"activeStatus",value:"inactive"})}},[i.context.hoverStatus,o,n]),i.context.activeStatus==="active"?i.mouse:uf}const uf={x:null,y:null,pageX:null,pageY:null,clientX:null,clientY:null,screenX:null,screenY:null,elementWidth:null,elementHeight:null,isOver:!1,isDown:!1,isTouch:!1},f2={hoverStatus:"idle",touchStatus:"idle",activeStatus:"inactive"},m2=(e,t,r,o,n,i)=>n>=e&&n<=e+r&&i>=t&&i<=t+o,h2=({dimensions:e,elements:t,mouse:r})=>{if(t.length===0)return null;const o=t.filter(n=>{const i=n.bounds;if(i==null)return!1;const a=n.text??n.attributes?.text,s=n.resourceId??n.attributes?.["resource-id"],l=n.accessibilityText??n.attributes?.accessibilityText??n.attributes?.["accessibility-text"]??n.attributes?.["content-desc"],c=n.accessibilityIdentifier??n.attributes?.accessibilityIdentifier,u=n.name??n.attributes?.name,d=n.label??n.attributes?.label,p=n.value??n.attributes?.value;if(!a&&!s&&!l&&!c&&!u&&!d&&!p)return!1;const{x:m,y:h,width:g,height:v}=i,{x:y,y:S,elementWidth:w,elementHeight:x}=r;return y===null||S===null||w===null||x===null?!1:m2(m/e.width,h/e.height,g/e.width,v/e.height,y/w,S/x)});return o.length===0?null:o.sort((n,i)=>{if(n.bounds==null&&i.bounds==null)return 0;if(n.bounds==null)return 1;if(i.bounds==null)return-1;const a=n.drawingOrderPath??n.indexPath??[],s=i.drawingOrderPath??i.indexPath??[];for(let l=0;l<Math.min(a.length,s.length);l++){const c=parseInt(a[l]),u=parseInt(s[l]);if(c!==u)return u-c}return a.length!==s.length?s.length-a.length:n.bounds.width*n.bounds.height-i.bounds.width*i.bounds.height})[0]},df=(e,t)=>`${Math.round(100*e/t)}%`,g2=e=>{if(typeof e.x!="number"||typeof e.y!="number"||typeof e.elementWidth!="number"||typeof e.elementHeight!="number")return null;const t=df(e.x,e.elementWidth),r=df(e.y,e.elementHeight);return`${t}, ${r}`},v2=({open:e,handleClose:t,options:r,onAfterCopy:o})=>{const n=b.useMemo(()=>r?typeof r[0]=="string"?r.map(c=>({label:c,value:c})):r:[],[r]),[i,a]=b.useState(""),s=b.useCallback(()=>{a(""),t()},[t]),l=b.useCallback(async()=>{const c=i||(n[0]?.value??"");if(c){try{await navigator.clipboard.writeText(c),Gu("Copied to clipboard")}catch{}o?.(),s()}},[i,n,o,s]);return f.jsxs(pl,{open:e,onClose:s,maxWidth:"md",fullWidth:!0,children:[f.jsx(tm,{children:"Select an attribute"}),f.jsx(fl,{children:f.jsx(br,{children:f.jsx(j1,{name:"attribute-options",children:n.map(c=>f.jsx(ha,{value:c.value,control:f.jsx(C1,{}),label:c.label,onChange:()=>a(c.value)},`${c.label}-${c.value}`))})})}),f.jsxs(em,{children:[f.jsx(Et,{color:"error",onClick:s,children:"Cancel"}),f.jsx(Et,{onClick:l,disabled:!i&&n.length===0,variant:"contained",children:"Copy"})]})]})},b2=et("f8084cb106c8126bb2deaeef7c98992d9ff9475ad3dc85c6ced04f08c3962b6e"),y2=Je({method:"POST"}).handler(b2),Ax={mutationKey:["ai","describe"],mutationFn:e=>y2({data:e})};function x2(e){return e.normalize("NFKC").replace(`
|
|
327
|
+
`,"").replace(/['`´''‚‛′’]/g,"'").replace(/[""„‟″]/g,'"').replace(/[–—]/g,"-").replace(/[\u00A0\u2000-\u200A\u202F\u205F]/g," ").replace(/[\u200B-\u200F\uFEFF]/g,"").replace(/[\uE000-\uF8FF]|[\u{F0000}-\u{FFFFD}]|[\u{100000}-\u{10FFFD}]/gu,"").trim()}const S2=()=>{const e=Xe(re,C=>C.mode),t=Xe(re,C=>C.isRecording),r=Xe(re,C=>C.enableAnimations);Wr();const o=b.useRef(null),[n,i]=b.useState(!1),[a,s]=b.useState(!1),[l,c]=b.useState([]),{data:u=[]}=dn(kx),d=Xe(re,C=>C.selectedDeviceId);Xe(re,C=>C.selectedPlatform),b.useEffect(()=>{if(!d&&u.length>0){const C=u[0];re.setState(z=>({...z,selectedDeviceId:C.id,selectedPlatform:C.platform}))}},[u,d]);const p=u.find(C=>C.id===d),{data:m,isError:h,isLoading:g}=dn({...wx({platform:p?.platform,deviceId:p?.id}),refetchInterval:250,enabled:!!p});b.useEffect(()=>{const C=m?.base64;C&&re.setState(z=>({...z,currentScreenshot:C}))},[m]);const{data:v}=dn({...hM({platform:p?.platform,deviceId:p?.id}),enabled:!!p,refetchInterval:1e3}),y=Ze(pM),{data:S}=dn({...Ix({enabled:n&&!!p}),refetchInterval:n?1e3:!1});b.useEffect(()=>{p?.id&&v?.connected===!1&&!y.isPending&&y.mutate({platform:p.platform,deviceId:p.id})},[p,v?.connected]);const w=m?.success??!1,x=v?.connected??!1,$=w&&x,I=m?.base64,E=Ze(CM);Ze(Au),Ze(Mu),Ze(Nu),Ze(Fu),Ze($x),Ze(Ax),Ze(Lu);const k=async()=>{const C=!r;re.setState(z=>({...z,enableAnimations:C})),C||await E.mutateAsync()},D=()=>{re.setState(C=>({...C,isRecording:!C.isRecording}))},j=g?"Connecting...":h?"Error":$?"Connected":w&&!x?"Starting Appium...":"Disconnected";return f.jsxs(C2,{children:[f.jsxs(E2,{children:[f.jsx(je,{variant:"h5",children:"Device"}),f.jsxs(P2,{children:[f.jsx(Mn,{title:t?"Stop Recording":"Start Recording",children:f.jsx(he,{onClick:D,color:t?"error":"default",size:"small",children:t?f.jsx(fm,{}):f.jsx(I_,{})})}),f.jsx(Mn,{title:n?"Disable UI Inspector":"Enable UI Inspector",children:f.jsx(he,{onClick:()=>i(!n),color:n?"primary":"default",size:"small",children:f.jsx(O_,{})})}),f.jsx(Mn,{title:r?"Disable Animations":"Enable Animations",children:f.jsx(he,{onClick:k,color:r?"primary":"default",size:"small",children:f.jsx(g_,{})})})]})]}),f.jsx(lr,{}),f.jsxs(j2,{children:[f.jsxs(Ye,{display:"flex",alignItems:"center",gap:1,flexGrow:1,children:[f.jsxs(br,{size:"small",sx:{minWidth:150,flex:1},children:[f.jsx(Zr,{children:"Device"}),f.jsx(yr,{value:d||"",label:"Device",onChange:C=>{const z=C.target.value,O=u.find(A=>A.id===z);re.setState(A=>({...A,selectedDeviceId:z,selectedPlatform:O?.platform||"android"}))},children:u.map(C=>f.jsxs(Ln,{value:C.id,children:[C.name," (",C.platform,")"]},C.id))})]}),f.jsx(O2,{connected:$,children:j})]}),t&&f.jsxs(h_,{color:"primary",exclusive:!0,value:e,onChange:(C,z)=>{z&&re.setState(O=>({...O,mode:z}))},"aria-label":"Mode",size:"small",children:[f.jsx(Xd,{value:"interact",children:"Interact"}),f.jsx(Xd,{value:"assert",children:"Assert"})]})]}),f.jsx(R2,{children:I?f.jsxs(z2,{children:[f.jsx(D2,{ref:o,src:I,alt:"Device Screen",draggable:!1,recording:t}),f.jsx(k2,{imgRef:o,uiDisabled:n,platform:p?.platform||"android",deviceId:p?.id,src:I}),n&&S?.elements&&f.jsx(_2,{imgRef:o,deviceWidth:S.width,deviceHeight:S.height,elements:S.elements,onPickAttributes:C=>{c(C),s(!0)}})]}):f.jsx(T2,{children:u.length===0?f.jsx(je,{variant:"body2",color:"text.secondary",children:"No devices found."}):d?f.jsxs(f.Fragment,{children:[f.jsx(la,{}),f.jsx(je,{variant:"body2",color:"text.secondary",children:"Connecting to device..."})]}):f.jsx(je,{variant:"body2",color:"text.secondary",children:"Select a device."})})}),f.jsx(v2,{open:a,handleClose:()=>s(!1),options:l,onAfterCopy:()=>{i(!1)}})]})},w2=50,$2=10,I2=250,k2=({imgRef:e,uiDisabled:t,platform:r,deviceId:o,src:n})=>{const i=b.useRef(null);zx(i,{enterDelay:0,leaveDelay:0});const a=Xe(re,P=>P.isRecording),s=Xe(re,P=>P.mode),l=Ze(Au),c=Ze(Mu),u=Ze(Nu),d=Ze(Fu),p=Ze($x),m=Wr(),h=Ze(Ax),g=Ze(Lu),v=b.useRef(null),y=b.useRef(""),S=b.useRef(null),w=()=>({platform:r||"android",deviceId:o}),x=(P,M)=>{const F=e.current;if(!F)return null;const L=F.getBoundingClientRect(),X=F.naturalWidth/L.width,Q=F.naturalHeight/L.height,pe=Math.round((P-L.left)*X),le=Math.round((M-L.top)*Q);return{x:pe,y:le,rect:L,img:F}},$=(P,M,F,L=500)=>{try{const X={id:Date.now(),type:"swipe",direction:P,x:M,y:F,duration:L,descriptionText:void 0};re.setState(Q=>({...Q,test:{...Q.test,steps:[...Q.test.steps,X]}}))}catch(X){console.warn("Failed to record swipe step",X)}},I=P=>{try{const M={id:Date.now(),type:"scroll",direction:P};re.setState(F=>({...F,test:{...F.test,steps:[...F.test.steps,M]}}))}catch(M){console.warn("Failed to record scroll step",M)}},E=()=>{if(!a)return;const P=y.current;if(!P)return;const M={id:Date.now(),type:"type",text:P};re.setState(F=>({...F,test:{...F.test,steps:[...F.test.steps,M]}})),y.current="",S.current&&(window.clearTimeout(S.current),S.current=null)},k=b.useRef(0),D=b.useRef(null),j=180,C=40,z=P=>{if(t)return;const M=x(P.clientX,P.clientY);M&&(v.current={x:M.x,y:M.y,t:Date.now()},i.current?.focus())},O=async P=>{if(t)return;const M=v.current;v.current=null;const F=x(P.clientX,P.clientY);if(!M||!F)return;const L=F.x-M.x,X=F.y-M.y,Q=Math.hypot(L,X),pe=Date.now()-M.t,le=w();if(Q<=$2&&pe<=I2){const be=n;if(await l.mutateAsync({x:F.x,y:F.y,...le}),a&&F.img){const te=F.img,q=document.createElement("canvas"),se=100;q.width=se,q.height=se;const Oe=q.getContext("2d");let Se;Oe&&(Oe.drawImage(te,F.x-se/2,F.y-se/2,se,se,0,0,se,se),Se=q.toDataURL("image/jpeg",.8));let ie="";try{ie=(await p.mutateAsync({x:F.x,y:F.y}))?.elementId||""}catch{}const de=Date.now();re.setState(_=>({..._,test:{..._.test,steps:[..._.test.steps,{id:de,type:s==="assert"?"assert":"tap",x:F.x,y:F.y,cropBase64:Se,elementId:ie,descriptionText:"Generating description..."}]}})),(async()=>{let _=be;if(s==="interact"&&(await new Promise(W=>setTimeout(W,2e3)),o))try{const W=await m.fetchQuery({...wx({platform:r||"android",deviceId:o}),staleTime:0});W?.base64&&(_=W.base64)}catch(W){console.error("Failed to fetch post-action screenshot",W)}try{const W=await h.mutateAsync({fullImage:be??"",croppedImage:Se,targetImage:_??"",type:s==="assert"?"assert":"interaction"});re.setState(V=>({...V,test:{...V.test,steps:V.test.steps.map(B=>B.id===de?{...B,descriptionText:W.description}:B)}}));try{const V=re.state.test.steps,B=V.findIndex(ce=>ce.id===de),ne=B!==-1?B+1:V.length;g.mutate({stepNumber:ne,stepDescription:W.description,filepath:void 0,executionData:[{screenshot:be,commands:s==="interact"?[`tapOn: x=${F.x} y=${F.y}`,"Task complete:"]:["Task complete:"]}],platform:r||"android",screenResolution:{width:te.naturalWidth,height:te.naturalHeight}})}catch(V){console.error("Error populating cache:",V)}}catch(W){console.error("Failed to describe interaction",W);const V=s==="assert"?"Assert Element":"Tap Interaction";re.setState(B=>({...B,test:{...B.test,steps:B.test.steps.map(ne=>ne.id===de?{...ne,descriptionText:V}:ne)}}));try{const B=re.state.test.steps,ne=B.findIndex(oe=>oe.id===de),ce=ne!==-1?ne+1:B.length;g.mutate({stepNumber:ce,stepDescription:V,filepath:void 0,executionData:[{screenshot:be,commands:s==="interact"?[`tapOn: x=${F.x} y=${F.y}`,"Task complete:"]:["Task complete:"]}],platform:r||"android",screenResolution:{width:te.naturalWidth,height:te.naturalHeight}})}catch(B){console.error("Error populating cache (fallback):",B)}}})()}return}if(Q>=w2){const be=Math.abs(L);if(Math.abs(X)>=be*1.5){const se=X>0?"up":"down";await u.mutateAsync({direction:se,...le}),a&&I(se);return}await d.mutateAsync({x1:M.x,y1:M.y,x2:F.x,y2:F.y,duration:500,...le});const q=F.x-M.x>=0?"right":"left";a&&$(q,M.x,M.y,500)}},A=async P=>{t||(P.preventDefault(),k.current+=P.deltaY,D.current&&(window.clearTimeout(D.current),D.current=null),D.current=window.setTimeout(async()=>{const M=k.current;if(k.current=0,Math.abs(M)<C)return;const F=M>0?"down":"up";await u.mutateAsync({direction:F,...w()}),a&&I(F)},j))},T=async P=>{if(!t){if(P.key.length===1||P.key===" "){await c.mutateAsync({text:P.key,...w()}),a&&(y.current+=P.key,S.current&&window.clearTimeout(S.current),S.current=window.setTimeout(E,400)),P.preventDefault();return}if(P.key==="Backspace"){E(),await c.mutateAsync({text:"",...w()}),P.preventDefault();return}if(P.key==="Enter"){await c.mutateAsync({text:`
|
|
328
|
+
`,...w()}),a&&(y.current+=`
|
|
329
|
+
`,S.current&&window.clearTimeout(S.current),S.current=window.setTimeout(E,400)),P.preventDefault();return}}};return b.useEffect(()=>()=>{E()},[]),f.jsx("div",{ref:i,tabIndex:0,onMouseDown:z,onMouseUp:O,onWheel:A,onKeyDown:T,style:{position:"absolute",inset:0,outline:"none"}})},_2=({imgRef:e,deviceWidth:t,deviceHeight:r,elements:o,onPickAttributes:n})=>{const[i,a]=b.useState(null),s=b.useRef(null),l=zx(s,{enterDelay:100,leaveDelay:100}),c=i!=null?o[i]:null,u=b.useMemo(()=>{const p=c,m=p?.text||p?.attributes?.text||"",h=p?.accessibilityText||p?.attributes?.accessibilityText||p?.attributes?.["accessibility-text"]||p?.attributes?.["content-desc"]||"",g=p?.resourceId||p?.attributes?.["resource-id"]||"",v=p?.accessibilityIdentifier||p?.attributes?.accessibilityIdentifier||"",y=p?.name||p?.attributes?.name||"",S=p?.label||p?.attributes?.label||"",w=p?.value||p?.attributes?.value||"",x=v||y||S||m||h||g||w;return x||g2(l)||""},[c,l]);b.useEffect(()=>{if(l)if(l.isOver){const p=h2({dimensions:{width:t,height:r},elements:o,mouse:l});if(p){let m=o.indexOf(p);if(m<0&&p.bounds){const h=p.bounds;m=o.findIndex(g=>g.bounds&&g.bounds.x===h.x&&g.bounds.y===h.y&&g.bounds.width===h.width&&g.bounds.height===h.height)}a(m>=0?m:null)}else a(null)}else a(null)},[l,t,r,o]);const d=l&&l.isOver&&typeof l.x=="number"&&typeof l.y=="number"&&typeof l.elementWidth=="number"&&typeof l.elementHeight=="number";return f.jsx(Mn,{title:u,followCursor:!0,children:f.jsxs(A2,{ref:s,onClick:()=>{const p=i!=null?o[i]:null;if(!p)return;const m=[],h=p.text??p.attributes?.text,g=p.accessibilityText??p.attributes?.["accessibility-text"]??p.attributes?.["content-desc"],v=p.resourceId??p.attributes?.["resource-id"],y=p.accessibilityIdentifier??p.attributes?.accessibilityIdentifier,S=p.name??p.attributes?.name,w=p.label??p.attributes?.label,x=($,I)=>{const E=typeof I=="string"?x2(I):"";E&&!m.some(k=>k.value===E)&&m.push({label:`${$}: "${E}"`,value:E})};x("accessibility-id",y),x("name",S),x("label",w),x("text",h),x("accessibility-text",g),x("resource-id",v),m.length>0&&n(m)},children:[d&&f.jsxs(f.Fragment,{children:[f.jsx(N2,{style:{left:`${l.x/l.elementWidth*100}%`}}),f.jsx(F2,{style:{top:`${l.y/l.elementHeight*100}%`}})]}),o.map((p,m)=>{if(!p.bounds)return null;const{x:h,y:g,width:v,height:y}=p.bounds,S=h/t*100,w=g/r*100,x=v/t*100,$=y/r*100,I=i===m;return f.jsx(M2,{style:{left:`${S}%`,top:`${w}%`,width:`${x}%`,height:`${$}%`},"data-hovered":I||void 0},m)})]})})},C2=Re(Ua)`
|
|
330
|
+
display: grid;
|
|
331
|
+
grid-template-areas:
|
|
332
|
+
'header'
|
|
333
|
+
'divider'
|
|
334
|
+
'actions'
|
|
335
|
+
'device';
|
|
336
|
+
/* Allow the content row to actually shrink instead of clamping to min-content */
|
|
337
|
+
grid-template-rows: auto auto auto minmax(0, 1fr);
|
|
338
|
+
row-gap: 0.75rem;
|
|
339
|
+
overflow: hidden;
|
|
340
|
+
/* Ensure grid children can shrink horizontally */
|
|
341
|
+
min-width: 0;
|
|
342
|
+
`,E2=Re.div`
|
|
343
|
+
grid-area: header;
|
|
344
|
+
display: flex;
|
|
345
|
+
justify-content: space-between;
|
|
346
|
+
align-items: center;
|
|
347
|
+
`,P2=Re.div`
|
|
348
|
+
display: flex;
|
|
349
|
+
gap: 0.25rem;
|
|
350
|
+
`,j2=Re.div`
|
|
351
|
+
grid-area: actions;
|
|
352
|
+
display: flex;
|
|
353
|
+
gap: 0.5rem;
|
|
354
|
+
flex-wrap: wrap;
|
|
355
|
+
align-items: center;
|
|
356
|
+
justify-content: space-between;
|
|
357
|
+
`,O2=Re(je)`
|
|
358
|
+
font-size: 0.875rem;
|
|
359
|
+
color: ${({connected:e})=>e?"#4caf50":"#f44336"};
|
|
360
|
+
`,R2=Re.div`
|
|
361
|
+
grid-area: device;
|
|
362
|
+
display: flex;
|
|
363
|
+
justify-content: center;
|
|
364
|
+
align-items: flex-start; /* align to the top instead of centering vertically */
|
|
365
|
+
overflow: scroll;
|
|
366
|
+
height: 100%;
|
|
367
|
+
min-height: 0;
|
|
368
|
+
min-width: 0;
|
|
369
|
+
`,D2=Re.img`
|
|
370
|
+
display: block; /* remove inline gaps and let container wrap to image */
|
|
371
|
+
max-width: 100%;
|
|
372
|
+
height: auto; /* keep aspect ratio and define image-driven height */
|
|
373
|
+
border: 2px solid #333;
|
|
374
|
+
border-radius: 8px;
|
|
375
|
+
cursor: crosshair;
|
|
376
|
+
box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
|
|
377
|
+
${({recording:e})=>e&&`
|
|
378
|
+
border-color: #2196f3;
|
|
379
|
+
box-shadow: 0 0 20px rgba(33, 150, 243, 0.4);
|
|
380
|
+
`}
|
|
381
|
+
`,T2=Re(Ye)`
|
|
382
|
+
display: flex;
|
|
383
|
+
flex-direction: column;
|
|
384
|
+
align-items: center;
|
|
385
|
+
gap: 1rem;
|
|
386
|
+
`,z2=Re.div`
|
|
387
|
+
position: relative;
|
|
388
|
+
display: inline-block; /* shrink-wrap to image size */
|
|
389
|
+
max-width: 100%;
|
|
390
|
+
height: auto;
|
|
391
|
+
`,A2=Re.div`
|
|
392
|
+
position: absolute;
|
|
393
|
+
inset: 0;
|
|
394
|
+
pointer-events: auto;
|
|
395
|
+
`,M2=Re.div`
|
|
396
|
+
position: absolute;
|
|
397
|
+
box-sizing: border-box;
|
|
398
|
+
pointer-events: none;
|
|
399
|
+
border: 2px dashed rgba(236, 72, 153, 0.7);
|
|
400
|
+
background: transparent;
|
|
401
|
+
&[data-hovered] {
|
|
402
|
+
border-color: rgba(59, 130, 246, 0.95);
|
|
403
|
+
border-style: solid;
|
|
404
|
+
outline: 2px solid rgba(59, 130, 246, 0.6);
|
|
405
|
+
box-shadow: none;
|
|
406
|
+
}
|
|
407
|
+
`,N2=Re.div`
|
|
408
|
+
position: absolute;
|
|
409
|
+
top: 0;
|
|
410
|
+
bottom: 0;
|
|
411
|
+
width: 1px;
|
|
412
|
+
background: rgba(59, 130, 246, 0.9);
|
|
413
|
+
transform: translateX(-0.5px);
|
|
414
|
+
pointer-events: none;
|
|
415
|
+
`,F2=Re.div`
|
|
416
|
+
position: absolute;
|
|
417
|
+
left: 0;
|
|
418
|
+
right: 0;
|
|
419
|
+
height: 1px;
|
|
420
|
+
background: rgba(59, 130, 246, 0.9);
|
|
421
|
+
transform: translateY(-0.5px);
|
|
422
|
+
pointer-events: none;
|
|
423
|
+
`;function L2(e){const t={};return e.forEach(r=>{const o=r.path.split("/");let n=t,i="";o.forEach((a,s)=>{i=i?`${i}/${a}`:a,n[a]||(n[a]={name:a,fullPath:i,type:s===o.length-1?r.type:"directory",children:{}}),s===o.length-1&&(n[a].type=r.type,n[a].fullPath=i),n=n[a].children})}),t}const Mx=({item:e,level:t,onSelect:r,selectedFile:o,onRename:n})=>{const[i,a]=b.useState(!1),[s,l]=b.useState(!1),[c,u]=b.useState(e.name),d=()=>{c&&c!==e.name&&n(e.fullPath,c),l(!1)},p=Object.keys(e.children).length>0,m=Object.values(e.children).sort((h,g)=>h.type===g.type?h.name.localeCompare(g.name):h.type==="directory"?-1:1);return s?f.jsx(Ka,{sx:{pl:t*2},children:f.jsx(ct,{value:c,onChange:h=>u(h.target.value),size:"small",autoFocus:!0,onBlur:d,onKeyDown:h=>{h.key==="Enter"&&d(),h.key==="Escape"&&l(!1)},InputProps:{endAdornment:f.jsx(bk,{position:"end",children:f.jsx(he,{size:"small",onMouseDown:d,children:f.jsx(b_,{fontSize:"small"})})})}})}):f.jsxs(f.Fragment,{children:[e.type==="directory"?f.jsx(Hi,{droppableId:`FOLDER_ROW::${e.fullPath}`,children:(h,g)=>f.jsxs("div",{ref:h.innerRef,...h.droppableProps,children:[f.jsxs(Ka,{button:!0,onClick:v=>{a(!i)},onDoubleClick:()=>{u(e.name),l(!0)},selected:o===e.fullPath,sx:{pl:t*2,bgcolor:g.isDraggingOver?"action.hover":void 0},children:[f.jsx(Ld,{sx:{minWidth:32},children:f.jsx(k_,{fontSize:"small",color:"primary"})}),f.jsx(Ud,{primary:e.name,primaryTypographyProps:{variant:"body2",noWrap:!0}}),p&&(i?f.jsx(w_,{fontSize:"small"}):f.jsx($_,{fontSize:"small"}))]}),h.placeholder]})}):f.jsxs(Ka,{button:!0,onClick:()=>r(e.fullPath),onDoubleClick:()=>{u(e.name),l(!0)},selected:o===e.fullPath,sx:{pl:t*2},children:[f.jsx(Ld,{sx:{minWidth:32},children:f.jsx(C_,{fontSize:"small",color:"action"})}),f.jsx(Ud,{primary:e.name,primaryTypographyProps:{variant:"body2",noWrap:!0}})]}),e.type==="directory"&&f.jsx(ys,{in:i,timeout:"auto",unmountOnExit:!0,children:f.jsx(Hi,{droppableId:e.fullPath,children:h=>f.jsxs(gl,{component:"div",disablePadding:!0,ref:h.innerRef,...h.droppableProps,children:[m.map((g,v)=>f.jsx(Bl,{draggableId:g.fullPath,index:v,children:(y,S)=>f.jsx("div",{ref:y.innerRef,...y.draggableProps,...y.dragHandleProps,style:{...y.draggableProps.style,opacity:S.isDragging?.9:1},children:f.jsx(Mx,{item:g,level:t+1,onSelect:r,selectedFile:o,onRename:n})})},g.fullPath)),h.placeholder]})})})]})};function U2({files:e,onSelect:t,selectedFile:r,refetch:o}){const n=L2(e),i=Object.values(n).sort((c,u)=>c.type===u.type?c.name.localeCompare(u.name):c.type==="directory"?-1:1),a=Ze(YM),s=async(c,u)=>{try{const d=c.split("/");d.pop();const p=d.join("/"),m=p?`${p}/${u}`:u;await a.mutateAsync({oldPath:c,newPath:m}),o()}catch(d){alert("Rename failed: "+d.message)}},l=async c=>{const{destination:u,draggableId:d}=c;if(!u)return;const p=u.droppableId;let m="";p==="ROOT"?m="":p.startsWith("FOLDER_ROW::")?m=p.slice(12):m=p;const h=d;if(!h||m&&(h===m||m.startsWith(h+"/")))return;const g=h.lastIndexOf("/"),v=g>=0?h.slice(0,g):"";if((m||"")===v)return;const y=g>=0?h.slice(g+1):h,S=m?`${m}/${y}`:y;try{await a.mutateAsync({oldPath:h,newPath:S}),o()}catch(w){alert("Move failed: "+w.message)}};return f.jsx(vh,{onDragEnd:l,children:f.jsx(Hi,{droppableId:"ROOT",children:c=>f.jsxs(gl,{dense:!0,ref:c.innerRef,...c.droppableProps,children:[i.map((u,d)=>f.jsx(Bl,{draggableId:u.fullPath||u.name,index:d,children:(p,m)=>f.jsx("div",{ref:p.innerRef,...p.draggableProps,...p.dragHandleProps,style:{...p.draggableProps.style,opacity:m.isDragging?.9:1},children:f.jsx(Mx,{item:u,level:1,onSelect:t,selectedFile:r,onRename:s})})},u.fullPath||u.name)),c.placeholder]})})})}function B2({onSelectFile:e,selectedFile:t}){const{data:r,isLoading:o,error:n,refetch:i}=dn({...Uu,refetchInterval:2e3}),[a,s]=b.useState(!1),[l,c]=b.useState("file"),[u,d]=b.useState(""),p=Ze(WM),m=async()=>{if(!u)return;let v=u;l==="file"&&!v.endsWith(".json")&&(v+=".json");try{await p.mutateAsync({name:v,type:l}),s(!1),d(""),i()}catch(y){alert("Failed to create: "+y.message)}},h=v=>{c(v),d(""),s(!0)};if(o)return f.jsx(ds,{children:f.jsx(la,{})});if(n)return f.jsx(ds,{children:f.jsx(je,{color:"error",children:"Error loading files"})});const g=r?.files||[];return f.jsxs(ds,{children:[f.jsxs(V2,{children:[f.jsx(je,{variant:"h6",children:"Tests"}),f.jsxs(Ye,{children:[f.jsx(he,{onClick:()=>i(),size:"small",title:"Refresh",children:f.jsx(D_,{})}),f.jsx(he,{onClick:()=>h("directory"),size:"small",title:"New Folder",children:f.jsx(S_,{})}),f.jsx(he,{onClick:()=>h("file"),size:"small",color:"primary",title:"New Test",children:f.jsx(pm,{})})]})]}),f.jsx(lr,{}),f.jsx(W2,{children:g.length===0?f.jsx(je,{variant:"caption",sx:{p:2,display:"block",textAlign:"center",color:"text.secondary"},children:"No tests found"}):f.jsx(U2,{files:g,onSelect:e,selectedFile:t,refetch:i})}),f.jsxs(pl,{open:a,onClose:()=>s(!1),children:[f.jsxs(tm,{children:["Create New ",l==="file"?"Test":"Folder"]}),f.jsx(fl,{children:f.jsx(ct,{autoFocus:!0,margin:"dense",label:"Name",fullWidth:!0,value:u,onChange:v=>d(v.target.value),placeholder:l==="file"?"my-test":"my-folder"})}),f.jsxs(em,{children:[f.jsx(Et,{onClick:()=>s(!1),children:"Cancel"}),f.jsx(Et,{onClick:m,variant:"contained",children:"Create"})]})]})]})}const ds=Re(Ua)`
|
|
424
|
+
display: flex;
|
|
425
|
+
flex-direction: column;
|
|
426
|
+
padding: 0;
|
|
427
|
+
overflow: hidden;
|
|
428
|
+
height: 100%;
|
|
429
|
+
`,V2=Re.div`
|
|
430
|
+
padding: 1rem;
|
|
431
|
+
display: flex;
|
|
432
|
+
align-items: center;
|
|
433
|
+
justify-content: space-between;
|
|
434
|
+
`,W2=Re.div`
|
|
435
|
+
flex: 1;
|
|
436
|
+
overflow-y: auto;
|
|
437
|
+
padding: 0.5rem 0;
|
|
438
|
+
`;function Z2({disabled:e}){const t=Xe(re,c=>c.test.params),[r,o]=b.useState(()=>Object.entries(t||{}).map(([c,u])=>({key:c,value:u})));b.useEffect(()=>{o(Object.entries(t||{}).map(([c,u])=>({key:c,value:u})))},[t]),b.useMemo(()=>new Set(r.map(c=>c.key)),[r]);const n=c=>{const u={};for(const d of c)d.key&&(u[d.key]=d.value);re.setState(d=>({...d,test:{...d.test,params:u}}))},i=()=>{const c=[...r,{key:"",value:""}];o(c)},a=c=>{const u=r.filter((d,p)=>p!==c);o(u),n(u)},s=(c,u)=>{const d=r.map((p,m)=>m===c?{...p,key:u}:p);o(d),n(d)},l=(c,u)=>{const d=r.map((p,m)=>m===c?{...p,value:u}:p);o(d),n(d)};return f.jsxs(G2,{children:[f.jsxs(H2,{children:[f.jsx(je,{variant:"subtitle1",children:"Test Params"}),f.jsx(Mn,{title:e?"Select a test to edit params":"Add parameter",children:f.jsx("span",{children:f.jsx(he,{size:"small",disabled:e,onClick:i,color:"primary",children:f.jsx(pm,{})})})})]}),f.jsx(lr,{}),f.jsxs(K2,{children:[r.length===0&&f.jsx(J2,{children:f.jsx(je,{variant:"caption",color:"text.secondary",children:e?"No test selected":"No params. Click + to add"})}),r.map((c,u)=>{const d=c.key&&r.some((p,m)=>m!==u&&p.key===c.key);return f.jsxs(q2,{children:[f.jsx(ct,{size:"small",label:"Key",value:c.key,onChange:p=>s(u,p.target.value),disabled:e,error:!!d,helperText:d?"Duplicate key":" "}),f.jsx(ct,{size:"small",label:"Value",value:c.value,onChange:p=>l(u,p.target.value),disabled:e}),f.jsx(Mn,{title:e?"":"Remove",children:f.jsx("span",{children:f.jsx(he,{size:"small",disabled:e,onClick:()=>a(u),children:f.jsx(on,{})})})})]},u)})]}),!e&&r.length>0&&f.jsx(Ye,{sx:{p:1,display:"flex",justifyContent:"flex-end"},children:f.jsx(Et,{size:"small",onClick:()=>n(r),children:"Apply"})})]})}const G2=Re(Ua)`
|
|
439
|
+
display: flex;
|
|
440
|
+
flex-direction: column;
|
|
441
|
+
padding: 0;
|
|
442
|
+
height: 100%;
|
|
443
|
+
overflow: hidden;
|
|
444
|
+
`,H2=Re.div`
|
|
445
|
+
padding: 0.75rem 1rem;
|
|
446
|
+
display: flex;
|
|
447
|
+
align-items: center;
|
|
448
|
+
justify-content: space-between;
|
|
449
|
+
`,K2=Re.div`
|
|
450
|
+
padding: 0.5rem 0.75rem;
|
|
451
|
+
display: flex;
|
|
452
|
+
flex-direction: column;
|
|
453
|
+
gap: 0.5rem;
|
|
454
|
+
overflow: auto;
|
|
455
|
+
`,q2=Re.div`
|
|
456
|
+
display: grid;
|
|
457
|
+
grid-template-columns: 1fr 1fr auto;
|
|
458
|
+
gap: 0.5rem;
|
|
459
|
+
align-items: start;
|
|
460
|
+
padding-top: 0.5rem;
|
|
461
|
+
`,J2=Re.div`
|
|
462
|
+
padding: 0.75rem;
|
|
463
|
+
text-align: center;
|
|
464
|
+
`;function X2(){const e=Xe(ti,r=>r),t=b.useCallback(()=>{XN()},[]);return f.jsx(X1,{open:e.open,onClose:t,className:"absolute z-10",style:{maxWidth:"384px"},anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:e.maintainDisplayed?null:3e3,children:f.jsxs(Uw,{severity:e.type,onClose:t,children:[e.title!==void 0&&f.jsx(Jw,{sx:{...e.description==null&&e.listContent==null&&{marginBottom:0}},children:e.title}),e.description!==void 0&&e.description,e.listContent!==void 0&&e.listContent.length>0&&f.jsx("ul",{className:"mt-2 ml-2 list-disc list-inside",children:e.listContent.map((r,o)=>f.jsx("li",{children:r},o))})]})})}function o4(){const[e,t]=b.useState(),r=Ze(Bu),o=Ze(qM),n=Wr(),[i,a]=b.useState("");b.useEffect(()=>{e?r.mutateAsync({path:e}).then(u=>{const d=u.content;let p=[],m={};Array.isArray(d)?(p=d,m={}):d&&Array.isArray(d.steps)&&(p=d.steps,m=d.params||{});const h=p.map((S,w)=>({...S,id:S.id||Date.now()+w})),g={name:u.path,steps:h,params:m};re.setState(S=>({...S,test:g}));const v=re.state.test,y={...v,steps:v.steps.map(S=>{const w={...S};for(const x of Object.keys(ls))delete w[x];return w})};a(JSON.stringify(y))}).catch(u=>{u instanceof Error?u.message:String(u),Ks("Failed to read file",{title:"Read Error"})}):a(JSON.stringify({name:"untitled",steps:[],params:{}}))},[e]);const s=Xe(re,u=>u.test),l=(()=>{const u={...s,steps:s.steps.map(d=>{const p={...d};for(const m of Object.keys(ls))delete p[m];return p})};return JSON.stringify(u)!==i})(),c=async()=>{let u=e;const d=re.state.test,p=d.steps.map(h=>{const g={...h};for(const v of Object.keys(ls))delete g[v];return g}),m={...d,steps:p};if(!u){const h=(d.name||"untitled").replace(/[^a-z0-9_\-\.]/gi,"_");u=h.endsWith(".json")?h:`${h}.json`}try{await o.mutateAsync({path:u,content:m}),a(JSON.stringify(m)),e||(t(u),n.invalidateQueries({queryKey:["files"]})),Gu("File saved",{title:"Saved"})}catch(h){Ks(h?.message?String(h.message):"Failed to save",{title:"Save Error"})}};return f.jsxs(f.Fragment,{children:[f.jsxs(Y2,{children:[f.jsx(Q2,{children:f.jsx(B2,{onSelectFile:t,selectedFile:e})}),f.jsx(e4,{children:f.jsx(Z2,{disabled:!e})}),f.jsx(t4,{children:f.jsx(n2,{onSave:c,canSave:l})}),f.jsx(n4,{children:f.jsx(S2,{})})]}),f.jsx(X2,{})]})}const Y2=Re.div`
|
|
465
|
+
display: grid;
|
|
466
|
+
grid-template-areas:
|
|
467
|
+
'files editor simulator'
|
|
468
|
+
'params editor simulator';
|
|
469
|
+
grid-template-columns: 250px minmax(0, 1fr) 400px;
|
|
470
|
+
grid-template-rows: 1fr minmax(160px, 35%);
|
|
471
|
+
background-color: #f0f2f5;
|
|
472
|
+
height: 100vh;
|
|
473
|
+
padding: 1rem;
|
|
474
|
+
column-gap: 1rem;
|
|
475
|
+
row-gap: 1rem;
|
|
476
|
+
`,Q2=Re.div`
|
|
477
|
+
grid-area: files;
|
|
478
|
+
min-height: 0; /* allow internal scroll */
|
|
479
|
+
`,e4=Re.div`
|
|
480
|
+
grid-area: params;
|
|
481
|
+
min-height: 0;
|
|
482
|
+
`,t4=Re.div`
|
|
483
|
+
grid-area: editor;
|
|
484
|
+
min-height: 0;
|
|
485
|
+
height: 100%;
|
|
486
|
+
overflow-y: auto;
|
|
487
|
+
`,n4=Re.div`
|
|
488
|
+
grid-area: simulator;
|
|
489
|
+
min-height: 0;
|
|
490
|
+
min-width: 0; /* allow child panel to shrink horizontally */
|
|
491
|
+
height: 100%;
|
|
492
|
+
`;export{o4 as component};
|