mobileboost-cli 0.1.2 → 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 -19
- 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
|
@@ -1,437 +0,0 @@
|
|
|
1
|
-
import{S as Xp,p as Ru,r as Ht,s as Ei,a as po,n as Pi,i as ds,b as zu,t as vx,c as ei,f as bx,d as yx,e as Au,g as ia,h as Mu,j as xx,k as b,l as Yp,u as Hs,m as Qp,o as ps,q as ef,v as Sx,w as f,x as ie,y as Qn,z as $x,A as wx,B as Ix,C as tf,T as Ks,D as we,E as F,F as an,R as Ne,G as oo,_ as qs,H as kx,I as Nu,J as Fu,K as To,L as nf,M as Lr,N as _x,O as Js,P as Xs,Q as Cx,U as rf,V as Ex,W as of,X as Ys,Y as Lu,Z as Px,$ as Ox,a0 as af,a1 as Me,a2 as Uu,a3 as jx,a4 as Dx,a5 as Tx,a6 as Ye,a7 as Xe}from"./main-BOWxdROu.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 Rx(e){return e instanceof Headers?new Headers(e):Array.isArray(e)?new Headers(e):typeof e=="object"?new Headers(e):new Headers}function zx(...e){return e.reduce((t,r)=>{const o=Rx(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 Ax=class extends Xp{constructor(e,t){super(),this.options=t,this.#n=e,this.#s=null,this.#i=Ru(),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),Bu(this.#e,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return fs(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return fs(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 Ht(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#$(),this.#e.setOptions(this.options),t._defaulted&&!Ei(this.options,t)&&this.#n.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const o=this.hasListeners();o&&Vu(this.#e,r,this.options,t)&&this.#m(),this.updateResult(),o&&(this.#e!==r||Ht(this.options.enabled,this.#e)!==Ht(t.enabled,this.#e)||po(this.options.staleTime,this.#e)!==po(t.staleTime,this.#e))&&this.#g();const n=this.#v();o&&(this.#e!==r||Ht(this.options.enabled,this.#e)!==Ht(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 Nx(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.#$();let t=this.#e.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Pi)),t}#g(){this.#x();const e=po(this.options.staleTime,this.#e);if(ds||this.#r.isStale||!zu(e))return;const r=vx(this.#r.dataUpdatedAt,e)+1;this.#u=ei.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,!(ds||Ht(this.options.enabled,this.#e)===!1||!zu(this.#d)||this.#d===0)&&(this.#c=ei.setInterval(()=>{(this.options.refetchIntervalInBackground||bx.isFocused())&&this.#m()},this.#d))}#y(){this.#g(),this.#b(this.#v())}#x(){this.#u&&(ei.clearTimeout(this.#u),this.#u=void 0)}#S(){this.#c&&(ei.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(),P=!k&&Bu(e,t),E=k&&Vu(e,r,t,o);(P||E)&&(u={...u,...yx(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=Au(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=Au(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",$=g==="pending",S=g==="error",x=$&&y,w=p!==void 0,_={status:g,fetchStatus:u.fetchStatus,isPending:$,isSuccess:g==="success",isError:S,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&&!$,isLoadingError:S&&!w,isPaused:u.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:S&&w,isStale:Qs(e,t),refetch:this.refetch,promise:this.#i,isEnabled:Ht(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const k=T=>{_.status==="error"?T.reject(_.error):_.data!==void 0&&T.resolve(_.data)},P=()=>{const T=this.#i=_.promise=Ru();k(T)},E=this.#i;switch(E.status){case"pending":e.queryHash===r.queryHash&&k(E);break;case"fulfilled":(_.status==="error"||_.data!==E.value)&&P();break;case"rejected":(_.status!=="error"||_.error!==E.reason)&&P();break}}return _}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),Ei(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.#w({listeners:r()})}#$(){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()}#w(e){ia.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#r)}),this.#n.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function Mx(e,t){return Ht(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Bu(e,t){return Mx(e,t)||e.state.data!==void 0&&fs(e,t,t.refetchOnMount)}function fs(e,t,r){if(Ht(t.enabled,e)!==!1&&po(t.staleTime,e)!=="static"){const o=typeof r=="function"?r(e):r;return o==="always"||o!==!1&&Qs(e,t)}return!1}function Vu(e,t,r,o){return(e!==t||Ht(o.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Qs(e,r)}function Qs(e,t){return Ht(t.enabled,e)!==!1&&e.isStaleByTime(po(t.staleTime,e))}function Nx(e,t){return!Ei(e.getCurrentResult(),t)}var Fx=class extends Xp{#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),Ei(this.options,t)||this.#n.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),t?.mutationKey&&this.options.mutationKey&&Mu(t.mutationKey)!==Mu(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??xx();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){ia.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)})})}},lf=b.createContext(!1),Lx=()=>b.useContext(lf);lf.Provider;function Ux(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Bx=b.createContext(Ux()),Vx=()=>b.useContext(Bx),Wx=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Zx=e=>{b.useEffect(()=>{e.clearReset()},[e])},Gx=({result:e,errorResetBoundary:t,throwOnError:r,query:o,suspense:n})=>e.isError&&!t.isReset()&&!e.isFetching&&o&&(n&&e.data===void 0||Yp(r,[e.error,o])),Hx=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))}},Kx=(e,t)=>e.isLoading&&e.isFetching&&!t,qx=(e,t)=>e?.suspense&&t.isPending,Wu=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function Jx(e,t,r){const o=Lx(),n=Vx(),i=Hs(),a=i.defaultQueryOptions(e);i.getDefaultOptions().queries?._experimental_beforeQuery?.(a),a._optimisticResults=o?"isRestoring":"optimistic",Hx(a),Wx(a,n),Zx(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(ia.batchCalls(d)):Pi;return l.updateResult(),p},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),b.useEffect(()=>{l.setOptions(a)},[a,l]),qx(a,c))throw Wu(a,l,n);if(Gx({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&&!ds&&Kx(c,o)&&(s?Wu(a,l,n):i.getQueryCache().get(a.queryHash)?.promise)?.catch(Pi).finally(()=>{l.updateResult()}),a.notifyOnChangeProps?c:l.trackResult(c)}function er(e,t){return Jx(e,Ax)}function ot(e,t){const r=Hs(),[o]=b.useState(()=>new Fx(r,e));b.useEffect(()=>{o.setOptions(e)},[o,e]);const n=b.useSyncExternalStore(b.useCallback(a=>o.subscribe(ia.batchCalls(a)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),i=b.useCallback((a,s)=>{o.mutate(a,s).catch(Pi)},[o]);if(n.error&&Yp(o.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:i,mutateAsync:n.mutate}}const Zu=e=>e,Xx=()=>{let e=Zu;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Zu}}},cf=Xx();function Yx(e={}){const{themeId:t,defaultTheme:r,defaultClassName:o="MuiBox-root",generateClassName:n}=e,i=Qp("div",{shouldForwardProp:s=>s!=="theme"&&s!=="sx"&&s!=="as"})(ps);return b.forwardRef(function(l,c){const u=ef(r),{className:d,component:p="div",...m}=Sx(l);return f.jsx(i,{as:p,ref:c,className:ie(d,n?n(o):o),theme:t&&u[t]||u,...m})})}const Qx={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 xe(e,t,r="Mui"){const o=Qx[t];return o?`${r}-${o}`:`${cf.generate(e)}-${t}`}function ve(e,t,r="Mui"){const o={};return t.forEach(n=>{o[n]=xe(e,n,r)}),o}function uf(e){const{variants:t,...r}=e,o={variants:t,style:Qn(r),isProcessed:!0};return o.style===r||t&&t.forEach(n=>{typeof n.style!="function"&&(n.style=Qn(n.style))}),o}const eS=$x();function Va(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Kn(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function tS(e){return e?(t,r)=>r[e]:null}function nS(e,t,r){e.theme=iS(e.theme)?r:e.theme[t]||e.theme}function Si(e,t,r){const o=typeof t=="function"?t(e):t;if(Array.isArray(o))return o.flatMap(n=>Si(e,n,r));if(Array.isArray(o?.variants)){let n;if(o.isProcessed)n=r?Kn(o.style,r):o.style;else{const{variants:i,...a}=o;n=r?Kn(Qn(a),r):a}return df(e,o.variants,[n],r)}return o?.isProcessed?r?Kn(Qn(o.style),r):o.style:r?Kn(Qn(o),r):o}function df(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?Kn(Qn(a.style(n)),o):a.style(n))):r.push(o?Kn(Qn(a.style),o):a.style)}return r}function rS(e={}){const{themeId:t,defaultTheme:r=eS,rootShouldForwardProp:o=Va,slotShouldForwardProp:n=Va}=e;function i(s){nS(s,t,r)}return(s,l={})=>{wx(s,I=>I.filter(_=>_!==ps));const{name:c,slot:u,skipVariantsResolver:d,skipSx:p,overridesResolver:m=tS(sS(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 $=Va;u==="Root"||u==="root"?$=o:u?$=n:aS(s)&&($=void 0);const S=Qp(s,{shouldForwardProp:$,label:oS(),...h}),x=I=>{if(I.__emotion_real===I)return I;if(typeof I=="function")return function(k){return Si(k,I,k.theme.modularCssLayers?g:void 0)};if(Ix(I)){const _=uf(I);return function(P){return _.variants?Si(P,_,P.theme.modularCssLayers?g:void 0):P.theme.modularCssLayers?Kn(_.style,g):_.style}}return I},w=(...I)=>{const _=[],k=I.map(x),P=[];if(_.push(i),c&&m&&P.push(function(j){const D=j.theme.components?.[c]?.styleOverrides;if(!D)return null;const R={};for(const U in D)R[U]=Si(j,D[U],j.theme.modularCssLayers?"theme":void 0);return m(j,R)}),c&&!v&&P.push(function(j){const D=j.theme?.components?.[c]?.variants;return D?df(j,D,[],j.theme.modularCssLayers?"theme":void 0):null}),y||P.push(ps),Array.isArray(k[0])){const z=k.shift(),j=new Array(_.length).fill(""),A=new Array(P.length).fill("");let D;D=[...j,...z,...A],D.raw=[...j,...z.raw,...A],_.unshift(D)}const E=[..._,...k,...P],T=S(...E);return s.muiName&&(T.muiName=s.muiName),T};return S.withConfig&&(w.withConfig=S.withConfig),w}}function oS(e,t){return void 0}function iS(e){for(const t in e)return!1;return!0}function aS(e){return typeof e=="string"&&e.charCodeAt(0)>96}function sS(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const Gu={theme:void 0};function lS(e){let t,r;return function(n){let i=t;return(i===void 0||n.theme!==r)&&(Gu.theme=n.theme,i=uf(e(Gu)),t=i,r=n.theme),i}}function Se(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 $i(e,t){return b.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}function dr(){const e=ef(tf);return e[Ks]||e}function pf(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const _t=e=>pf(e)&&e!=="classes",M=rS({themeId:Ks,defaultTheme:tf,rootShouldForwardProp:_t});function Hu(...e){return e.reduce((t,r)=>r==null?t:function(...n){t.apply(this,n),r.apply(this,n)},()=>{})}const ye=lS;function cS(e){return xe("MuiSvgIcon",e)}ve("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const uS=e=>{const{color:t,fontSize:r,classes:o}=e,n={root:["root",t!=="inherit"&&`color${F(t)}`,`fontSize${F(r)}`]};return Se(n,cS,o)},dS=M("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${F(r.color)}`],t[`fontSize${F(r.fontSize)}`]]}})(ye(({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}}]}))),ms=b.forwardRef(function(t,r){const o=we({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=uS(g);return f.jsxs(dS,{as:s,className:ie(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]})});ms.muiName="SvgIcon";function Fe(e,t){function r(o,n){return f.jsx(ms,{"data-testid":void 0,ref:n,...o,children:e})}return r.muiName=ms.muiName,b.memo(b.forwardRef(r))}function ff(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 mt(e){return e&&e.ownerDocument||document}function hn(e){return mt(e).defaultView||window}function Ku(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Oi(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 Ft(e){const t=b.useRef(e);return an(()=>{t.current=e}),b.useRef((...r)=>(0,t.current)(...r)).current}function tt(...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 pS(e,t){const r=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&r>=65&&r<=90&&typeof t=="function"}function mf(e,t){if(!e)return t;function r(a,s){const l={};return Object.keys(s).forEach(c=>{pS(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=ie(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=ie(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 hf(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 hs(e,t){return hs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},hs(e,t)}function gf(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,hs(e,t)}const qu={disabled:!1},ji=Ne.createContext(null);var fS=function(t){return t.scrollTop},io="unmounted",Zn="exited",Gn="entering",yr="entered",gs="exiting",Qt=(function(e){gf(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=Zn,i.appearStatus=Gn):l=yr:o.unmountOnExit||o.mountOnEnter?l=io:l=Zn,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(n,i){var a=n.in;return a&&i.status===io?{status:Zn}: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!==Gn&&a!==yr&&(i=Gn):(a===Gn||a===yr)&&(i=gs)}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===Gn){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:oo.findDOMNode(this);a&&fS(a)}this.performEnter(n)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Zn&&this.setState({status:io})},r.performEnter=function(n){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:n,l=this.props.nodeRef?[s]:[oo.findDOMNode(this),s],c=l[0],u=l[1],d=this.getTimeouts(),p=s?d.appear:d.enter;if(!n&&!a||qu.disabled){this.safeSetState({status:yr},function(){i.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:Gn},function(){i.props.onEntering(c,u),i.onTransitionEnd(p,function(){i.safeSetState({status:yr},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:oo.findDOMNode(this);if(!i||qu.disabled){this.safeSetState({status:Zn},function(){n.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:gs},function(){n.props.onExiting(s),n.onTransitionEnd(a.exit,function(){n.safeSetState({status:Zn},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:oo.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===io)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=hf(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Ne.createElement(ji.Provider,{value:null},typeof a=="function"?a(n,s):Ne.cloneElement(Ne.Children.only(a),s))},t})(Ne.Component);Qt.contextType=ji;Qt.propTypes={};function br(){}Qt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:br,onEntering:br,onEntered:br,onExit:br,onExiting:br,onExited:br};Qt.UNMOUNTED=io;Qt.EXITED=Zn;Qt.ENTERING=Gn;Qt.ENTERED=yr;Qt.EXITING=gs;function mS(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function el(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 hS(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 gS(e,t){return el(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=el(e.children),n=hS(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 bS=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},yS={component:"div",childFactory:function(t){return t}},tl=(function(e){gf(t,e);function t(o,n){var i;i=e.call(this,o,n)||this;var a=i.handleExited.bind(mS(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?gS(n,s):vS(n,a,s),firstRender:!1}},r.handleExited=function(n,i){var a=el(this.props.children);n.key in a||(n.props.onExited&&n.props.onExited(i),this.mounted&&this.setState(function(s){var l=qs({},s.children);return delete l[n.key],{children:l}}))},r.render=function(){var n=this.props,i=n.component,a=n.childFactory,s=hf(n,["component","childFactory"]),l=this.state.contextValue,c=bS(this.state.children).map(a);return delete s.appear,delete s.enter,delete s.exit,i===null?Ne.createElement(ji.Provider,{value:l},c):Ne.createElement(ji.Provider,{value:l},Ne.createElement(i,s,c))},t})(Ne.Component);tl.propTypes={};tl.defaultProps=yS;const Ju={};function vf(e,t){const r=b.useRef(Ju);return r.current===Ju&&(r.current=e(t)),r}const xS=[];function SS(e){b.useEffect(e,xS)}class aa{static create(){return new aa}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 kn(){const e=vf(aa.create).current;return SS(e.disposeEffect),e}const bf=e=>e.scrollTop;function Ir(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 kr(e){return typeof e=="string"}function yf(e,t,r){return e===void 0||kr(e)?t:{...t,ownerState:{...t.ownerState,...r}}}function xf(e,t,r){return typeof e=="function"?e(t,r):e}function Di(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 Xu(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 Sf(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:o,externalForwardedProps:n,className:i}=e;if(!t){const m=ie(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=Di({...n,...o}),s=Xu(o),l=Xu(n),c=t(a),u=ie(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 ge(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=xf(d[e],n),{props:{component:g,...v},internalRef:y}=Sf({className:r,...l,externalForwardedProps:e==="root"?p:void 0,externalSlotProps:h}),$=tt(y,h?.ref,t.ref),S=e==="root"?g||c:g,x=yf(m,{...e==="root"&&!c&&!u[e]&&a,...e!=="root"&&!u[e]&&a,...v,...S&&!s&&{as:S},...S&&s&&{component:S},ref:$},n);return[m,x]}function $S(e){return xe("MuiCollapse",e)}ve("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const wS=e=>{const{orientation:t,classes:r}=e,o={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return Se(o,$S,r)},IS=M("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]}})(ye(({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"}}]}))),kS=M("div",{name:"MuiCollapse",slot:"Wrapper"})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),_S=M("div",{name:"MuiCollapse",slot:"WrapperInner"})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),vs=b.forwardRef(function(t,r){const o=we({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:$={},slotProps:S={},style:x,timeout:w=kx.standard,TransitionComponent:I=Qt,..._}=o,k={...o,orientation:y,collapsedSize:s},P=wS(k),E=dr(),T=kn(),z=b.useRef(null),j=b.useRef(),A=typeof s=="number"?`${s}px`:s,D=y==="horizontal",R=D?"width":"height",U=b.useRef(null),X=tt(r,U),L=W=>fe=>{if(W){const ae=U.current;fe===void 0?W(ae):W(ae,fe)}},re=()=>z.current?z.current[D?"clientWidth":"clientHeight"]:0,se=L((W,fe)=>{z.current&&D&&(z.current.style.position="absolute"),W.style[R]=A,d&&d(W,fe)}),pe=L((W,fe)=>{const ae=re();z.current&&D&&(z.current.style.position="");const{duration:ee,easing:he}=Ir({style:x,timeout:w,easing:c},{mode:"enter"});if(w==="auto"){const be=E.transitions.getAutoHeightDuration(ae);W.style.transitionDuration=`${be}ms`,j.current=be}else W.style.transitionDuration=typeof ee=="string"?ee:`${ee}ms`;W.style[R]=`${ae}px`,W.style.transitionTimingFunction=he,m&&m(W,fe)}),ce=L((W,fe)=>{W.style[R]="auto",p&&p(W,fe)}),Ie=L(W=>{W.style[R]=`${re()}px`,h&&h(W)}),Q=L(g),V=L(W=>{const fe=re(),{duration:ae,easing:ee}=Ir({style:x,timeout:w,easing:c},{mode:"exit"});if(w==="auto"){const he=E.transitions.getAutoHeightDuration(fe);W.style.transitionDuration=`${he}ms`,j.current=he}else W.style.transitionDuration=typeof ae=="string"?ae:`${ae}ms`;W.style[R]=A,W.style.transitionTimingFunction=ee,v&&v(W)}),C=W=>{w==="auto"&&T.start(j.current||0,W),n&&n(U.current,W)},B={slots:$,slotProps:S,component:l},[q,H]=ge("root",{ref:X,className:ie(P.root,a),elementType:IS,externalForwardedProps:B,ownerState:k,additionalProps:{style:{[D?"minWidth":"minHeight"]:A,...x}}}),[J,te]=ge("wrapper",{ref:z,className:P.wrapper,elementType:kS,externalForwardedProps:B,ownerState:k}),[Y,G]=ge("wrapperInner",{className:P.wrapperInner,elementType:_S,externalForwardedProps:B,ownerState:k});return f.jsx(I,{in:u,onEnter:se,onEntered:ce,onEntering:pe,onExit:Ie,onExited:Q,onExiting:V,addEndListener:C,nodeRef:U,timeout:w==="auto"?null:w,..._,children:(W,{ownerState:fe,...ae})=>{const ee={...k,state:W};return f.jsx(q,{...H,className:ie(H.className,{entered:P.entered,exited:!u&&A==="0px"&&P.hidden}[W]),ownerState:ee,...ae,children:f.jsx(J,{...te,ownerState:ee,children:f.jsx(Y,{...G,ownerState:ee,children:i})})})}})});vs&&(vs.muiSupportAuto=!0);function CS(e){return xe("MuiPaper",e)}ve("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 ES=e=>{const{square:t,elevation:r,variant:o,classes:n}=e,i={root:["root",o,!t&&"rounded",o==="elevation"&&`elevation${r}`]};return Se(i,CS,n)},PS=M("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}`]]}})(ye(({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)"}}]}))),Pn=b.forwardRef(function(t,r){const o=we({props:t,name:"MuiPaper"}),n=dr(),{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=ES(d);return f.jsx(PS,{as:a,ownerState:d,className:ie(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(${Nu("#fff",Fu(s))}, ${Nu("#fff",Fu(s))})`}},...u.style}})});function Ti(e){try{return e.matches(":focus-visible")}catch{}return!1}class Ri{static create(){return new Ri}static use(){const t=vf(Ri.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=jS(),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 OS(){return Ri.use()}function jS(){let e,t;const r=new Promise((o,n)=>{e=o,t=n});return r.resolve=e,r.reject=t,r}function DS(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=ie(t,r.ripple,r.rippleVisible,o&&r.ripplePulsate),m={width:a,height:a,top:-(a/2)+i,left:-(a/2)+n},h=ie(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 Mt=ve("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),bs=550,TS=80,RS=To`
|
|
2
|
-
0% {
|
|
3
|
-
transform: scale(0);
|
|
4
|
-
opacity: 0.1;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
100% {
|
|
8
|
-
transform: scale(1);
|
|
9
|
-
opacity: 0.3;
|
|
10
|
-
}
|
|
11
|
-
`,zS=To`
|
|
12
|
-
0% {
|
|
13
|
-
opacity: 1;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
100% {
|
|
17
|
-
opacity: 0;
|
|
18
|
-
}
|
|
19
|
-
`,AS=To`
|
|
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
|
-
`,MS=M("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),NS=M(DS,{name:"MuiTouchRipple",slot:"Ripple"})`
|
|
32
|
-
opacity: 0;
|
|
33
|
-
position: absolute;
|
|
34
|
-
|
|
35
|
-
&.${Mt.rippleVisible} {
|
|
36
|
-
opacity: 0.3;
|
|
37
|
-
transform: scale(1);
|
|
38
|
-
animation-name: ${RS};
|
|
39
|
-
animation-duration: ${bs}ms;
|
|
40
|
-
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&.${Mt.ripplePulsate} {
|
|
44
|
-
animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
& .${Mt.child} {
|
|
48
|
-
opacity: 1;
|
|
49
|
-
display: block;
|
|
50
|
-
width: 100%;
|
|
51
|
-
height: 100%;
|
|
52
|
-
border-radius: 50%;
|
|
53
|
-
background-color: currentColor;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
& .${Mt.childLeaving} {
|
|
57
|
-
opacity: 0;
|
|
58
|
-
animation-name: ${zS};
|
|
59
|
-
animation-duration: ${bs}ms;
|
|
60
|
-
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
& .${Mt.childPulsate} {
|
|
64
|
-
position: absolute;
|
|
65
|
-
/* @noflip */
|
|
66
|
-
left: 0px;
|
|
67
|
-
top: 0;
|
|
68
|
-
animation-name: ${AS};
|
|
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
|
-
`,FS=b.forwardRef(function(t,r){const o=we({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=kn(),h=b.useRef(null),g=b.useRef(null),v=b.useCallback(x=>{const{pulsate:w,rippleX:I,rippleY:_,rippleSize:k,cb:P}=x;c(E=>[...E,f.jsx(NS,{classes:{ripple:ie(i.ripple,Mt.ripple),rippleVisible:ie(i.rippleVisible,Mt.rippleVisible),ripplePulsate:ie(i.ripplePulsate,Mt.ripplePulsate),child:ie(i.child,Mt.child),childLeaving:ie(i.childLeaving,Mt.childLeaving),childPulsate:ie(i.childPulsate,Mt.childPulsate)},timeout:bs,pulsate:w,rippleX:I,rippleY:_,rippleSize:k},u.current)]),u.current+=1,d.current=P},[i]),y=b.useCallback((x={},w={},I=()=>{})=>{const{pulsate:_=!1,center:k=n||w.pulsate,fakeElement:P=!1}=w;if(x?.type==="mousedown"&&p.current){p.current=!1;return}x?.type==="touchstart"&&(p.current=!0);const E=P?null:g.current,T=E?E.getBoundingClientRect():{width:0,height:0,left:0,top:0};let z,j,A;if(k||x===void 0||x.clientX===0&&x.clientY===0||!x.clientX&&!x.touches)z=Math.round(T.width/2),j=Math.round(T.height/2);else{const{clientX:D,clientY:R}=x.touches&&x.touches.length>0?x.touches[0]:x;z=Math.round(D-T.left),j=Math.round(R-T.top)}if(k)A=Math.sqrt((2*T.width**2+T.height**2)/3),A%2===0&&(A+=1);else{const D=Math.max(Math.abs((E?E.clientWidth:0)-z),z)*2+2,R=Math.max(Math.abs((E?E.clientHeight:0)-j),j)*2+2;A=Math.sqrt(D**2+R**2)}x?.touches?h.current===null&&(h.current=()=>{v({pulsate:_,rippleX:z,rippleY:j,rippleSize:A,cb:I})},m.start(TS,()=>{h.current&&(h.current(),h.current=null)})):v({pulsate:_,rippleX:z,rippleY:j,rippleSize:A,cb:I})},[n,v,m]),$=b.useCallback(()=>{y({},{pulsate:!0})},[y]),S=b.useCallback((x,w)=>{if(m.clear(),x?.type==="touchend"&&h.current){h.current(),h.current=null,m.start(0,()=>{S(x,w)});return}h.current=null,c(I=>I.length>0?I.slice(1):I),d.current=w},[m]);return b.useImperativeHandle(r,()=>({pulsate:$,start:y,stop:S}),[$,y,S]),f.jsx(MS,{className:ie(Mt.root,i.root,a),ref:g,...s,children:f.jsx(tl,{component:null,exit:!0,children:l})})});function LS(e){return xe("MuiButtonBase",e)}const US=ve("MuiButtonBase",["root","disabled","focusVisible"]),BS=e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:o,classes:n}=e,a=Se({root:["root",t&&"disabled",r&&"focusVisible"]},LS,n);return r&&o&&(a.root+=` ${o}`),a},VS=M("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"},[`&.${US.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),or=b.forwardRef(function(t,r){const o=we({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:$,onFocus:S,onFocusVisible:x,onKeyDown:w,onKeyUp:I,onMouseDown:_,onMouseLeave:k,onMouseUp:P,onTouchEnd:E,onTouchMove:T,onTouchStart:z,tabIndex:j=0,TouchRippleProps:A,touchRippleRef:D,type:R,...U}=o,X=b.useRef(null),L=OS(),re=tt(L.ref,D),[se,pe]=b.useState(!1);c&&se&&pe(!1),b.useImperativeHandle(n,()=>({focusVisible:()=>{pe(!0),X.current.focus()}}),[]);const ce=L.shouldMount&&!u&&!c;b.useEffect(()=>{se&&p&&!u&&L.pulsate()},[u,p,se,L]);const Ie=dn(L,"start",_,d),Q=dn(L,"stop",y,d),V=dn(L,"stop",$,d),C=dn(L,"stop",P,d),B=dn(L,"stop",ne=>{se&&ne.preventDefault(),k&&k(ne)},d),q=dn(L,"start",z,d),H=dn(L,"stop",E,d),J=dn(L,"stop",T,d),te=dn(L,"stop",ne=>{Ti(ne.target)||pe(!1),g&&g(ne)},!1),Y=Ft(ne=>{X.current||(X.current=ne.currentTarget),Ti(ne.target)&&(pe(!0),x&&x(ne)),S&&S(ne)}),G=()=>{const ne=X.current;return l&&l!=="button"&&!(ne.tagName==="A"&&ne.href)},W=Ft(ne=>{p&&!ne.repeat&&se&&ne.key===" "&&L.stop(ne,()=>{L.start(ne)}),ne.target===ne.currentTarget&&G()&&ne.key===" "&&ne.preventDefault(),w&&w(ne),ne.target===ne.currentTarget&&G()&&ne.key==="Enter"&&!c&&(ne.preventDefault(),v&&v(ne))}),fe=Ft(ne=>{p&&ne.key===" "&&se&&!ne.defaultPrevented&&L.stop(ne,()=>{L.pulsate(ne)}),I&&I(ne),v&&ne.target===ne.currentTarget&&G()&&ne.key===" "&&!ne.defaultPrevented&&v(ne)});let ae=l;ae==="button"&&(U.href||U.to)&&(ae=h);const ee={};if(ae==="button"){const ne=!!U.formAction;ee.type=R===void 0&&!ne?"button":R,ee.disabled=c}else!U.href&&!U.to&&(ee.role="button"),c&&(ee["aria-disabled"]=c);const he=tt(r,X),be={...o,centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:p,tabIndex:j,focusVisible:se},_e=BS(be);return f.jsxs(VS,{as:ae,className:ie(_e.root,s),ownerState:be,onBlur:te,onClick:v,onContextMenu:Q,onFocus:Y,onKeyDown:W,onKeyUp:fe,onMouseDown:Ie,onMouseLeave:B,onMouseUp:C,onDragLeave:V,onTouchEnd:H,onTouchMove:J,onTouchStart:q,ref:he,tabIndex:c?-1:j,type:R,...ee,...U,children:[a,ce?f.jsx(FS,{ref:re,center:i,...A}):null]})});function dn(e,t,r,o=!1){return Ft(n=>(r&&r(n),o||e[t](n),!0))}function WS(e){return typeof e.main=="string"}function ZS(e,t=[]){if(!WS(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function it(e=[]){return([,t])=>t&&ZS(t,e)}function GS(e){return xe("MuiAlert",e)}const Yu=ve("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 HS(e){return xe("MuiCircularProgress",e)}ve("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","track","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Gt=44,ys=To`
|
|
75
|
-
0% {
|
|
76
|
-
transform: rotate(0deg);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
100% {
|
|
80
|
-
transform: rotate(360deg);
|
|
81
|
-
}
|
|
82
|
-
`,xs=To`
|
|
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
|
-
`,KS=typeof ys!="string"?nf`
|
|
98
|
-
animation: ${ys} 1.4s linear infinite;
|
|
99
|
-
`:null,qS=typeof xs!="string"?nf`
|
|
100
|
-
animation: ${xs} 1.4s ease-in-out infinite;
|
|
101
|
-
`:null,JS=e=>{const{classes:t,variant:r,color:o,disableShrink:n}=e,i={root:["root",r,`color${F(o)}`],svg:["svg"],track:["track"],circle:["circle",`circle${F(r)}`,n&&"circleDisableShrink"]};return Se(i,HS,t)},XS=M("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`color${F(r.color)}`]]}})(ye(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:KS||{animation:`${ys} 1.4s linear infinite`}},...Object.entries(e.palette).filter(it()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),YS=M("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),QS=M("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t[`circle${F(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})(ye(({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:qS||{animation:`${xs} 1.4s ease-in-out infinite`}}]}))),e$=M("circle",{name:"MuiCircularProgress",slot:"Track"})(ye(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),sa=b.forwardRef(function(t,r){const o=we({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=JS(h),v={},y={},$={};if(p==="determinate"){const S=2*Math.PI*((Gt-u)/2);v.strokeDasharray=S.toFixed(3),$["aria-valuenow"]=Math.round(d),v.strokeDashoffset=`${((100-d)/100*S).toFixed(3)}px`,y.transform="rotate(-90deg)"}return f.jsx(XS,{className:ie(g.root,n),style:{width:l,height:l,...y,...c},ownerState:h,ref:r,role:"progressbar",...$,...m,children:f.jsxs(YS,{className:g.svg,ownerState:h,viewBox:`${Gt/2} ${Gt/2} ${Gt} ${Gt}`,children:[s?f.jsx(e$,{className:g.track,ownerState:h,cx:Gt,cy:Gt,r:(Gt-u)/2,fill:"none",strokeWidth:u,"aria-hidden":"true"}):null,f.jsx(QS,{className:g.circle,style:v,ownerState:h,cx:Gt,cy:Gt,r:(Gt-u)/2,fill:"none",strokeWidth:u})]})})});function t$(e){return xe("MuiIconButton",e)}const Qu=ve("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),n$=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${F(o)}`,n&&`edge${F(n)}`,`size${F(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return Se(s,t$,t)},r$=M(or,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.loading&&t.loading,r.color!=="default"&&t[`color${F(r.color)}`],r.edge&&t[`edge${F(r.edge)}`],t[`size${F(r.size)}`]]}})(ye(({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}}]})),ye(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(it()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(it()).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)}}],[`&.${Qu.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${Qu.loading}`]:{color:"transparent"}}))),o$=M("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"}}]})),je=b.forwardRef(function(t,r){const o=we({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=Lr(d),v=m??f.jsx(sa,{"aria-labelledby":g,color:"inherit",size:16}),y={...o,edge:n,color:s,disabled:l,disableFocusRipple:c,loading:p,loadingIndicator:v,size:u},$=n$(y);return f.jsxs(r$,{id:p?g:d,className:ie($.root,a),centerRipple:!0,focusRipple:!c,disabled:l||p,ref:r,...h,ownerState:y,children:[typeof p=="boolean"&&f.jsx("span",{className:$.loadingWrapper,style:{display:"contents"},children:f.jsx(o$,{className:$.loadingIndicator,ownerState:y,children:p&&v})}),i]})}),i$=Fe(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"})),a$=Fe(f.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"})),s$=Fe(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"})),l$=Fe(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"})),c$=Fe(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"})),u$=e=>{const{variant:t,color:r,severity:o,classes:n}=e,i={root:["root",`color${F(r||o)}`,`${t}${F(r||o)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return Se(i,GS,n)},d$=M(Pn,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`${r.variant}${F(r.color||r.severity)}`]]}})(ye(({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(it(["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),[`& .${Yu.icon}`]:e.vars?{color:e.vars.palette.Alert[`${o}IconColor`]}:{color:e.palette[o].main}}})),...Object.entries(e.palette).filter(it(["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}`,[`& .${Yu.icon}`]:e.vars?{color:e.vars.palette.Alert[`${o}IconColor`]}:{color:e.palette[o].main}}})),...Object.entries(e.palette).filter(it(["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)}}}))]}})),p$=M("div",{name:"MuiAlert",slot:"Icon"})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),f$=M("div",{name:"MuiAlert",slot:"Message"})({padding:"8px 0",minWidth:0,overflow:"auto"}),m$=M("div",{name:"MuiAlert",slot:"Action"})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),ed={success:f.jsx(i$,{fontSize:"inherit"}),warning:f.jsx(a$,{fontSize:"inherit"}),error:f.jsx(s$,{fontSize:"inherit"}),info:f.jsx(l$,{fontSize:"inherit"})},h$=b.forwardRef(function(t,r){const o=we({props:t,name:"MuiAlert"}),{action:n,children:i,className:a,closeText:s="Close",color:l,components:c={},componentsProps:u={},icon:d,iconMapping:p=ed,onClose:m,role:h="alert",severity:g="success",slotProps:v={},slots:y={},variant:$="standard",...S}=o,x={...o,color:l,severity:g,variant:$,colorSeverity:l||g},w=u$(x),I={slots:{closeButton:c.CloseButton,closeIcon:c.CloseIcon,...y},slotProps:{...u,...v}},[_,k]=ge("root",{ref:r,shouldForwardComponentProp:!0,className:ie(w.root,a),elementType:d$,externalForwardedProps:{...I,...S},ownerState:x,additionalProps:{role:h,elevation:0}}),[P,E]=ge("icon",{className:w.icon,elementType:p$,externalForwardedProps:I,ownerState:x}),[T,z]=ge("message",{className:w.message,elementType:f$,externalForwardedProps:I,ownerState:x}),[j,A]=ge("action",{className:w.action,elementType:m$,externalForwardedProps:I,ownerState:x}),[D,R]=ge("closeButton",{elementType:je,externalForwardedProps:I,ownerState:x}),[U,X]=ge("closeIcon",{elementType:c$,externalForwardedProps:I,ownerState:x});return f.jsxs(_,{...k,children:[d!==!1?f.jsx(P,{...E,children:d||p[g]||ed[g]}):null,f.jsx(T,{...z,children:i}),n!=null?f.jsx(j,{...A,children:n}):null,n==null&&m?f.jsx(j,{...A,children:f.jsx(D,{size:"small","aria-label":s,title:s,color:"inherit",onClick:m,...R,children:f.jsx(U,{fontSize:"small",...X})})}):null]})});function g$(e){return xe("MuiTypography",e)}const td=ve("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]),v$={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},b$=_x(),y$=e=>{const{align:t,gutterBottom:r,noWrap:o,paragraph:n,variant:i,classes:a}=e,s={root:["root",i,e.align!=="inherit"&&`align${F(t)}`,r&&"gutterBottom",o&&"noWrap",n&&"paragraph"]};return Se(s,g$,a)},x$=M("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${F(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(ye(({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(it()).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${F(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}}]}))),nd={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Ce=b.forwardRef(function(t,r){const{color:o,...n}=we({props:t,name:"MuiTypography"}),i=!v$[o],a=b$({...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=nd,...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]||nd[m])||"span",$=y$(v);return f.jsx(x$,{as:y,ref:r,className:ie($.root,l),...g,ownerState:v,style:{...s!=="inherit"&&{"--Typography-textAlign":s},...g.style}})});function S$(e){return xe("MuiAlertTitle",e)}ve("MuiAlertTitle",["root"]);const $$=e=>{const{classes:t}=e;return Se({root:["root"]},S$,t)},w$=M(Ce,{name:"MuiAlertTitle",slot:"Root"})(ye(({theme:e})=>({fontWeight:e.typography.fontWeightMedium,marginTop:-2}))),I$=b.forwardRef(function(t,r){const o=we({props:t,name:"MuiAlertTitle"}),{className:n,...i}=o,a=o,s=$$(a);return f.jsx(w$,{gutterBottom:!0,component:"div",ownerState:a,ref:r,className:ie(s.root,n),...i})});var It="top",Bt="bottom",Vt="right",kt="left",nl="auto",Ro=[It,Bt,Vt,kt],_r="start",xo="end",k$="clippingParents",$f="viewport",Gr="popper",_$="reference",rd=Ro.reduce(function(e,t){return e.concat([t+"-"+_r,t+"-"+xo])},[]),wf=[].concat(Ro,[nl]).reduce(function(e,t){return e.concat([t,t+"-"+_r,t+"-"+xo])},[]),C$="beforeRead",E$="read",P$="afterRead",O$="beforeMain",j$="main",D$="afterMain",T$="beforeWrite",R$="write",z$="afterWrite",A$=[C$,E$,P$,O$,j$,D$,T$,R$,z$];function sn(e){return e?(e.nodeName||"").toLowerCase():null}function jt(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ir(e){var t=jt(e).Element;return e instanceof t||e instanceof Element}function Lt(e){var t=jt(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function rl(e){if(typeof ShadowRoot>"u")return!1;var t=jt(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function M$(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];!Lt(i)||!sn(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 N$(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},{});!Lt(n)||!sn(n)||(Object.assign(n.style,s),Object.keys(i).forEach(function(l){n.removeAttribute(l)}))})}}const F$={name:"applyStyles",enabled:!0,phase:"write",fn:M$,effect:N$,requires:["computeStyles"]};function rn(e){return e.split("-")[0]}var tr=Math.max,zi=Math.min,Cr=Math.round;function Ss(){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 If(){return!/^((?!chrome|android).)*safari/i.test(Ss())}function Er(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var o=e.getBoundingClientRect(),n=1,i=1;t&&Lt(e)&&(n=e.offsetWidth>0&&Cr(o.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Cr(o.height)/e.offsetHeight||1);var a=ir(e)?jt(e):window,s=a.visualViewport,l=!If()&&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 ol(e){var t=Er(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 kf(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&rl(r)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function gn(e){return jt(e).getComputedStyle(e)}function L$(e){return["table","td","th"].indexOf(sn(e))>=0}function On(e){return((ir(e)?e.ownerDocument:e.document)||window.document).documentElement}function la(e){return sn(e)==="html"?e:e.assignedSlot||e.parentNode||(rl(e)?e.host:null)||On(e)}function od(e){return!Lt(e)||gn(e).position==="fixed"?null:e.offsetParent}function U$(e){var t=/firefox/i.test(Ss()),r=/Trident/i.test(Ss());if(r&&Lt(e)){var o=gn(e);if(o.position==="fixed")return null}var n=la(e);for(rl(n)&&(n=n.host);Lt(n)&&["html","body"].indexOf(sn(n))<0;){var i=gn(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 zo(e){for(var t=jt(e),r=od(e);r&&L$(r)&&gn(r).position==="static";)r=od(r);return r&&(sn(r)==="html"||sn(r)==="body"&&gn(r).position==="static")?t:r||U$(e)||t}function il(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function fo(e,t,r){return tr(e,zi(t,r))}function B$(e,t,r){var o=fo(e,t,r);return o>r?r:o}function _f(){return{top:0,right:0,bottom:0,left:0}}function Cf(e){return Object.assign({},_f(),e)}function Ef(e,t){return t.reduce(function(r,o){return r[o]=e,r},{})}var V$=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,Cf(typeof t!="number"?t:Ef(t,Ro))};function W$(e){var t,r=e.state,o=e.name,n=e.options,i=r.elements.arrow,a=r.modifiersData.popperOffsets,s=rn(r.placement),l=il(s),c=[kt,Vt].indexOf(s)>=0,u=c?"height":"width";if(!(!i||!a)){var d=V$(n.padding,r),p=ol(i),m=l==="y"?It:kt,h=l==="y"?Bt:Vt,g=r.rects.reference[u]+r.rects.reference[l]-a[l]-r.rects.popper[u],v=a[l]-r.rects.reference[l],y=zo(i),$=y?l==="y"?y.clientHeight||0:y.clientWidth||0:0,S=g/2-v/2,x=d[m],w=$-p[u]-d[h],I=$/2-p[u]/2+S,_=fo(x,I,w),k=l;r.modifiersData[o]=(t={},t[k]=_,t.centerOffset=_-I,t)}}function Z$(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)||kf(t.elements.popper,n)&&(t.elements.arrow=n))}const G$={name:"arrow",enabled:!0,phase:"main",fn:W$,effect:Z$,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Pr(e){return e.split("-")[1]}var H$={top:"auto",right:"auto",bottom:"auto",left:"auto"};function K$(e,t){var r=e.x,o=e.y,n=t.devicePixelRatio||1;return{x:Cr(r*n)/n||0,y:Cr(o*n)/n||0}}function id(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"),$=a.hasOwnProperty("y"),S=kt,x=It,w=window;if(c){var I=zo(r),_="clientHeight",k="clientWidth";if(I===jt(r)&&(I=On(r),gn(I).position!=="static"&&s==="absolute"&&(_="scrollHeight",k="scrollWidth")),I=I,n===It||(n===kt||n===Vt)&&i===xo){x=Bt;var P=d&&I===w&&w.visualViewport?w.visualViewport.height:I[_];g-=P-o.height,g*=l?1:-1}if(n===kt||(n===It||n===Bt)&&i===xo){S=Vt;var E=d&&I===w&&w.visualViewport?w.visualViewport.width:I[k];m-=E-o.width,m*=l?1:-1}}var T=Object.assign({position:s},c&&H$),z=u===!0?K$({x:m,y:g},jt(r)):{x:m,y:g};if(m=z.x,g=z.y,l){var j;return Object.assign({},T,(j={},j[x]=$?"0":"",j[S]=y?"0":"",j.transform=(w.devicePixelRatio||1)<=1?"translate("+m+"px, "+g+"px)":"translate3d("+m+"px, "+g+"px, 0)",j))}return Object.assign({},T,(t={},t[x]=$?g+"px":"",t[S]=y?m+"px":"",t.transform="",t))}function q$(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:rn(t.placement),variation:Pr(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,id(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,id(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 J$={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:q$,data:{}};var ti={passive:!0};function X$(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=jt(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",r.update,ti)}),s&&l.addEventListener("resize",r.update,ti),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",r.update,ti)}),s&&l.removeEventListener("resize",r.update,ti)}}const Y$={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:X$,data:{}};var Q$={left:"right",right:"left",bottom:"top",top:"bottom"};function wi(e){return e.replace(/left|right|bottom|top/g,function(t){return Q$[t]})}var ew={start:"end",end:"start"};function ad(e){return e.replace(/start|end/g,function(t){return ew[t]})}function al(e){var t=jt(e),r=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:r,scrollTop:o}}function sl(e){return Er(On(e)).left+al(e).scrollLeft}function tw(e,t){var r=jt(e),o=On(e),n=r.visualViewport,i=o.clientWidth,a=o.clientHeight,s=0,l=0;if(n){i=n.width,a=n.height;var c=If();(c||!c&&t==="fixed")&&(s=n.offsetLeft,l=n.offsetTop)}return{width:i,height:a,x:s+sl(e),y:l}}function nw(e){var t,r=On(e),o=al(e),n=(t=e.ownerDocument)==null?void 0:t.body,i=tr(r.scrollWidth,r.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),a=tr(r.scrollHeight,r.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),s=-o.scrollLeft+sl(e),l=-o.scrollTop;return gn(n||r).direction==="rtl"&&(s+=tr(r.clientWidth,n?n.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}function ll(e){var t=gn(e),r=t.overflow,o=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+n+o)}function Pf(e){return["html","body","#document"].indexOf(sn(e))>=0?e.ownerDocument.body:Lt(e)&&ll(e)?e:Pf(la(e))}function mo(e,t){var r;t===void 0&&(t=[]);var o=Pf(e),n=o===((r=e.ownerDocument)==null?void 0:r.body),i=jt(o),a=n?[i].concat(i.visualViewport||[],ll(o)?o:[]):o,s=t.concat(a);return n?s:s.concat(mo(la(a)))}function $s(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function rw(e,t){var r=Er(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 sd(e,t,r){return t===$f?$s(tw(e,r)):ir(t)?rw(t,r):$s(nw(On(e)))}function ow(e){var t=mo(la(e)),r=["absolute","fixed"].indexOf(gn(e).position)>=0,o=r&&Lt(e)?zo(e):e;return ir(o)?t.filter(function(n){return ir(n)&&kf(n,o)&&sn(n)!=="body"}):[]}function iw(e,t,r,o){var n=t==="clippingParents"?ow(e):[].concat(t),i=[].concat(n,[r]),a=i[0],s=i.reduce(function(l,c){var u=sd(e,c,o);return l.top=tr(u.top,l.top),l.right=zi(u.right,l.right),l.bottom=zi(u.bottom,l.bottom),l.left=tr(u.left,l.left),l},sd(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 Of(e){var t=e.reference,r=e.element,o=e.placement,n=o?rn(o):null,i=o?Pr(o):null,a=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,l;switch(n){case It:l={x:a,y:t.y-r.height};break;case Bt:l={x:a,y:t.y+t.height};break;case Vt:l={x:t.x+t.width,y:s};break;case kt:l={x:t.x-r.width,y:s};break;default:l={x:t.x,y:t.y}}var c=n?il(n):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case _r:l[c]=l[c]-(t[u]/2-r[u]/2);break;case xo:l[c]=l[c]+(t[u]/2-r[u]/2);break}}return l}function So(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?k$:s,c=r.rootBoundary,u=c===void 0?$f:c,d=r.elementContext,p=d===void 0?Gr:d,m=r.altBoundary,h=m===void 0?!1:m,g=r.padding,v=g===void 0?0:g,y=Cf(typeof v!="number"?v:Ef(v,Ro)),$=p===Gr?_$:Gr,S=e.rects.popper,x=e.elements[h?$:p],w=iw(ir(x)?x:x.contextElement||On(e.elements.popper),l,u,a),I=Er(e.elements.reference),_=Of({reference:I,element:S,placement:n}),k=$s(Object.assign({},S,_)),P=p===Gr?k:I,E={top:w.top-P.top+y.top,bottom:P.bottom-w.bottom+y.bottom,left:w.left-P.left+y.left,right:P.right-w.right+y.right},T=e.modifiersData.offset;if(p===Gr&&T){var z=T[n];Object.keys(E).forEach(function(j){var A=[Vt,Bt].indexOf(j)>=0?1:-1,D=[It,Bt].indexOf(j)>=0?"y":"x";E[j]+=z[D]*A})}return E}function aw(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?wf:l,u=Pr(o),d=u?s?rd:rd.filter(function(h){return Pr(h)===u}):Ro,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]=So(e,{placement:g,boundary:n,rootBoundary:i,padding:a})[rn(g)],h},{});return Object.keys(m).sort(function(h,g){return m[h]-m[g]})}function sw(e){if(rn(e)===nl)return[];var t=wi(e);return[ad(e),t,ad(t)]}function lw(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=rn(v),$=y===v,S=l||($||!h?[wi(v)]:sw(v)),x=[v].concat(S).reduce(function(Ie,Q){return Ie.concat(rn(Q)===nl?aw(t,{placement:Q,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:g}):Q)},[]),w=t.rects.reference,I=t.rects.popper,_=new Map,k=!0,P=x[0],E=0;E<x.length;E++){var T=x[E],z=rn(T),j=Pr(T)===_r,A=[It,Bt].indexOf(z)>=0,D=A?"width":"height",R=So(t,{placement:T,boundary:u,rootBoundary:d,altBoundary:p,padding:c}),U=A?j?Vt:kt:j?Bt:It;w[D]>I[D]&&(U=wi(U));var X=wi(U),L=[];if(i&&L.push(R[z]<=0),s&&L.push(R[U]<=0,R[X]<=0),L.every(function(Ie){return Ie})){P=T,k=!1;break}_.set(T,L)}if(k)for(var re=h?3:1,se=function(Q){var V=x.find(function(C){var B=_.get(C);if(B)return B.slice(0,Q).every(function(q){return q})});if(V)return P=V,"break"},pe=re;pe>0;pe--){var ce=se(pe);if(ce==="break")break}t.placement!==P&&(t.modifiersData[o]._skip=!0,t.placement=P,t.reset=!0)}}const cw={name:"flip",enabled:!0,phase:"main",fn:lw,requiresIfExists:["offset"],data:{_skip:!1}};function ld(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 cd(e){return[It,Vt,Bt,kt].some(function(t){return e[t]>=0})}function uw(e){var t=e.state,r=e.name,o=t.rects.reference,n=t.rects.popper,i=t.modifiersData.preventOverflow,a=So(t,{elementContext:"reference"}),s=So(t,{altBoundary:!0}),l=ld(a,o),c=ld(s,n,i),u=cd(l),d=cd(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 dw={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:uw};function pw(e,t,r){var o=rn(e),n=[kt,It].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,[kt,Vt].indexOf(o)>=0?{x:s,y:a}:{x:a,y:s}}function fw(e){var t=e.state,r=e.options,o=e.name,n=r.offset,i=n===void 0?[0,0]:n,a=wf.reduce(function(u,d){return u[d]=pw(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 mw={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:fw};function hw(e){var t=e.state,r=e.name;t.modifiersData[r]=Of({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const gw={name:"popperOffsets",enabled:!0,phase:"read",fn:hw,data:{}};function vw(e){return e==="x"?"y":"x"}function bw(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=So(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),y=rn(t.placement),$=Pr(t.placement),S=!$,x=il(y),w=vw(x),I=t.modifiersData.popperOffsets,_=t.rects.reference,k=t.rects.popper,P=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,E=typeof P=="number"?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,z={x:0,y:0};if(I){if(i){var j,A=x==="y"?It:kt,D=x==="y"?Bt:Vt,R=x==="y"?"height":"width",U=I[x],X=U+v[A],L=U-v[D],re=m?-k[R]/2:0,se=$===_r?_[R]:k[R],pe=$===_r?-k[R]:-_[R],ce=t.elements.arrow,Ie=m&&ce?ol(ce):{width:0,height:0},Q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:_f(),V=Q[A],C=Q[D],B=fo(0,_[R],Ie[R]),q=S?_[R]/2-re-B-V-E.mainAxis:se-B-V-E.mainAxis,H=S?-_[R]/2+re+B+C+E.mainAxis:pe+B+C+E.mainAxis,J=t.elements.arrow&&zo(t.elements.arrow),te=J?x==="y"?J.clientTop||0:J.clientLeft||0:0,Y=(j=T?.[x])!=null?j:0,G=U+q-Y-te,W=U+H-Y,fe=fo(m?zi(X,G):X,U,m?tr(L,W):L);I[x]=fe,z[x]=fe-U}if(s){var ae,ee=x==="x"?It:kt,he=x==="x"?Bt:Vt,be=I[w],_e=w==="y"?"height":"width",ne=be+v[ee],Ee=be-v[he],ue=[It,kt].indexOf(y)!==-1,Pe=(ae=T?.[w])!=null?ae:0,Je=ue?ne:be-_[_e]-k[_e]-Pe+E.altAxis,Ve=ue?be+_[_e]+k[_e]-Pe-E.altAxis:Ee,nt=m&&ue?B$(Je,be,Ve):fo(m?Je:ne,be,m?Ve:Ee);I[w]=nt,z[w]=nt-be}t.modifiersData[o]=z}}const yw={name:"preventOverflow",enabled:!0,phase:"main",fn:bw,requiresIfExists:["offset"]};function xw(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Sw(e){return e===jt(e)||!Lt(e)?al(e):xw(e)}function $w(e){var t=e.getBoundingClientRect(),r=Cr(t.width)/e.offsetWidth||1,o=Cr(t.height)/e.offsetHeight||1;return r!==1||o!==1}function ww(e,t,r){r===void 0&&(r=!1);var o=Lt(t),n=Lt(t)&&$w(t),i=On(t),a=Er(e,n,r),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(o||!o&&!r)&&((sn(t)!=="body"||ll(i))&&(s=Sw(t)),Lt(t)?(l=Er(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=sl(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Iw(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 kw(e){var t=Iw(e);return A$.reduce(function(r,o){return r.concat(t.filter(function(n){return n.phase===o}))},[])}function _w(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function Cw(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 ud={placement:"bottom",modifiers:[],strategy:"absolute"};function dd(){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 Ew(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,o=r===void 0?[]:r,n=t.defaultOptions,i=n===void 0?ud:n;return function(s,l,c){c===void 0&&(c=i);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},ud,i),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],p=!1,m={state:u,setOptions:function(y){var $=typeof y=="function"?y(u.options):y;g(),u.options=Object.assign({},i,u.options,$),u.scrollParents={reference:ir(s)?mo(s):s.contextElement?mo(s.contextElement):[],popper:mo(l)};var S=kw(Cw([].concat(o,u.options.modifiers)));return u.orderedModifiers=S.filter(function(x){return x.enabled}),h(),m.update()},forceUpdate:function(){if(!p){var y=u.elements,$=y.reference,S=y.popper;if(dd($,S)){u.rects={reference:ww($,zo(S),u.options.strategy==="fixed"),popper:ol(S)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(E){return u.modifiersData[E.name]=Object.assign({},E.data)});for(var x=0;x<u.orderedModifiers.length;x++){if(u.reset===!0){u.reset=!1,x=-1;continue}var w=u.orderedModifiers[x],I=w.fn,_=w.options,k=_===void 0?{}:_,P=w.name;typeof I=="function"&&(u=I({state:u,options:k,name:P,instance:m})||u)}}}},update:_w(function(){return new Promise(function(v){m.forceUpdate(),v(u)})}),destroy:function(){g(),p=!0}};if(!dd(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,$=v.options,S=$===void 0?{}:$,x=v.effect;if(typeof x=="function"){var w=x({state:u,name:y,instance:m,options:S}),I=function(){};d.push(w||I)}})}function g(){d.forEach(function(v){return v()}),d=[]}return m}}var Pw=[Y$,gw,J$,F$,mw,cw,yw,G$,dw],Ow=Ew({defaultModifiers:Pw});function jf(e){const{elementType:t,externalSlotProps:r,ownerState:o,skipResolvingSlotProps:n=!1,...i}=e,a=n?{}:xf(r,o),{props:s,internalRef:l}=Sf({...i,externalSlotProps:a}),c=tt(l,a?.ref,e.additionalProps?.ref);return yf(t,{...s,ref:c},o)}function pr(e){return parseInt(b.version,10)>=19?e?.props?.ref||null:e?.ref||null}function jw(e){return typeof e=="function"?e():e}const Df=b.forwardRef(function(t,r){const{children:o,container:n,disablePortal:i=!1}=t,[a,s]=b.useState(null),l=tt(b.isValidElement(o)?pr(o):null,r);if(an(()=>{i||s(jw(n)||document.body)},[n,i]),an(()=>{if(a&&!i)return Ku(r,a),()=>{Ku(r,null)}},[r,a,i]),i){if(b.isValidElement(o)){const c={ref:l};return b.cloneElement(o,c)}return o}return a&&Js.createPortal(o,a)});function Dw(e){return xe("MuiPopper",e)}ve("MuiPopper",["root"]);function Tw(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 ws(e){return typeof e=="function"?e():e}function Rw(e){return e.nodeType!==void 0}const zw=e=>{const{classes:t}=e;return Se({root:["root"]},Dw,t)},Aw={},Mw=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),$=tt(y,r),S=b.useRef(null),x=tt(S,d),w=b.useRef(x);an(()=>{w.current=x},[x]),b.useImperativeHandle(d,()=>S.current,[]);const I=Tw(c,i),[_,k]=b.useState(I),[P,E]=b.useState(ws(o));b.useEffect(()=>{S.current&&S.current.forceUpdate()}),b.useEffect(()=>{o&&E(ws(o))},[o]),an(()=>{if(!P||!l)return;const D=X=>{k(X.placement)};let R=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:X})=>{D(X)}}];s!=null&&(R=R.concat(s)),u&&u.modifiers!=null&&(R=R.concat(u.modifiers));const U=Ow(P,y.current,{placement:I,...u,modifiers:R});return w.current(U),()=>{U.destroy(),w.current(null)}},[P,a,s,l,u,I]);const T={placement:_};h!==null&&(T.TransitionProps=h);const z=zw(t),j=m.root??"div",A=jf({elementType:j,externalSlotProps:p.root,externalForwardedProps:v,additionalProps:{role:"tooltip",ref:$},ownerState:t,className:z.root});return f.jsx(j,{...A,children:typeof n=="function"?n(T):n})}),Nw=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=Aw,popperRef:m,style:h,transition:g=!1,slotProps:v={},slots:y={},...$}=t,[S,x]=b.useState(!0),w=()=>{x(!1)},I=()=>{x(!0)};if(!l&&!u&&(!g||S))return null;let _;if(i)_=i;else if(o){const E=ws(o);_=E&&Rw(E)?mt(E).body:mt(null).body}const k=!u&&l&&(!g||S)?"none":void 0,P=g?{in:u,onEnter:w,onExited:I}:void 0;return f.jsx(Df,{disablePortal:s,container:_,children:f.jsx(Mw,{anchorEl:o,direction:a,disablePortal:s,modifiers:c,ref:r,open:g?!S:u,placement:d,popperOptions:p,popperRef:m,slotProps:v,slots:y,...$,style:{position:"fixed",top:0,left:0,display:k,...h},TransitionProps:P,children:n})})}),Fw=M(Nw,{name:"MuiPopper",slot:"Root"})({}),Tf=b.forwardRef(function(t,r){const o=Xs(),n=we({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:$,slotProps:S,...x}=n,w=$?.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(Fw,{as:a,direction:o?"rtl":"ltr",slots:{root:w},slotProps:S??l,...I,ref:r})}),Lw=Fe(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 Uw(e){return xe("MuiChip",e)}const Re=ve("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"]),Bw=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${F(o)}`,`color${F(n)}`,s&&"clickable",s&&`clickableColor${F(n)}`,a&&"deletable",a&&`deletableColor${F(n)}`,`${l}${F(n)}`],label:["label",`label${F(o)}`],avatar:["avatar",`avatar${F(o)}`,`avatarColor${F(n)}`],icon:["icon",`icon${F(o)}`,`iconColor${F(i)}`],deleteIcon:["deleteIcon",`deleteIcon${F(o)}`,`deleteIconColor${F(n)}`,`deleteIcon${F(l)}Color${F(n)}`]};return Se(c,Uw,t)},Vw=M("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[{[`& .${Re.avatar}`]:t.avatar},{[`& .${Re.avatar}`]:t[`avatar${F(s)}`]},{[`& .${Re.avatar}`]:t[`avatarColor${F(o)}`]},{[`& .${Re.icon}`]:t.icon},{[`& .${Re.icon}`]:t[`icon${F(s)}`]},{[`& .${Re.icon}`]:t[`iconColor${F(n)}`]},{[`& .${Re.deleteIcon}`]:t.deleteIcon},{[`& .${Re.deleteIcon}`]:t[`deleteIcon${F(s)}`]},{[`& .${Re.deleteIcon}`]:t[`deleteIconColor${F(o)}`]},{[`& .${Re.deleteIcon}`]:t[`deleteIcon${F(l)}Color${F(o)}`]},t.root,t[`size${F(s)}`],t[`color${F(o)}`],i&&t.clickable,i&&o!=="default"&&t[`clickableColor${F(o)}`],a&&t.deletable,a&&o!=="default"&&t[`deletableColor${F(o)}`],t[l],t[`${l}${F(o)}`]]}})(ye(({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",[`&.${Re.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Re.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${Re.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Re.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Re.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Re.icon}`]:{marginLeft:5,marginRight:-6},[`& .${Re.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,[`& .${Re.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${Re.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(it(["contrastText"])).map(([r])=>({props:{color:r},style:{backgroundColor:(e.vars||e).palette[r].main,color:(e.vars||e).palette[r].contrastText,[`& .${Re.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:{[`& .${Re.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:r=>r.iconColor===r.color&&r.color!=="default",style:{[`& .${Re.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${Re.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(it(["dark"])).map(([r])=>({props:{color:r,onDelete:!0},style:{[`&.${Re.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}`)},[`&.${Re.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(it(["dark"])).map(([r])=>({props:{color:r,clickable:!0},style:{[`&:hover, &.${Re.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]}`,[`&.${Re.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Re.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Re.avatar}`]:{marginLeft:4},[`& .${Re.avatarSmall}`]:{marginLeft:2},[`& .${Re.icon}`]:{marginLeft:4},[`& .${Re.iconSmall}`]:{marginLeft:2},[`& .${Re.deleteIcon}`]:{marginRight:5},[`& .${Re.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(it()).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)}`,[`&.${Re.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[r].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${Re.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[r].main,(e.vars||e).palette.action.focusOpacity)},[`& .${Re.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[r].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[r].main}}}}))]}})),Ww=M("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:r}=e,{size:o}=r;return[t.label,t[`label${F(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 pd(e){return e.key==="Backspace"||e.key==="Delete"}const on=b.forwardRef(function(t,r){const o=we({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:$="filled",tabIndex:S,skipFocusWhenDisabled:x=!1,slots:w={},slotProps:I={},..._}=o,k=b.useRef(null),P=tt(k,r),E=V=>{V.stopPropagation(),h&&h(V)},T=V=>{V.currentTarget===V.target&&pd(V)&&V.preventDefault(),g&&g(V)},z=V=>{V.currentTarget===V.target&&h&&pd(V)&&h(V),v&&v(V)},j=a!==!1&&m?!0:a,A=j||h?or:l||"div",D={...o,component:A,disabled:u,size:y,color:s,iconColor:b.isValidElement(d)&&d.props.color||s,onDelete:!!h,clickable:j,variant:$},R=Bw(D),U=A===or?{component:l||"div",focusVisibleClassName:R.focusVisible,...h&&{disableRipple:!0}}:{};let X=null;h&&(X=c&&b.isValidElement(c)?b.cloneElement(c,{className:ie(c.props.className,R.deleteIcon),onClick:E}):f.jsx(Lw,{className:R.deleteIcon,onClick:E}));let L=null;n&&b.isValidElement(n)&&(L=b.cloneElement(n,{className:ie(R.avatar,n.props.className)}));let re=null;d&&b.isValidElement(d)&&(re=b.cloneElement(d,{className:ie(R.icon,d.props.className)}));const se={slots:w,slotProps:I},[pe,ce]=ge("root",{elementType:Vw,externalForwardedProps:{...se,..._},ownerState:D,shouldForwardComponentProp:!0,ref:P,className:ie(R.root,i),additionalProps:{disabled:j&&u?!0:void 0,tabIndex:x&&u?-1:S,...U},getSlotProps:V=>({...V,onClick:C=>{V.onClick?.(C),m?.(C)},onKeyDown:C=>{V.onKeyDown?.(C),T(C)},onKeyUp:C=>{V.onKeyUp?.(C),z(C)}})}),[Ie,Q]=ge("label",{elementType:Ww,externalForwardedProps:se,ownerState:D,className:R.label});return f.jsxs(pe,{as:A,...ce,children:[L||re,f.jsx(Ie,{...Q,children:p}),X]})});function ni(e){return parseInt(e,10)||0}const Zw={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function Gw(e){for(const t in e)return!1;return!0}function fd(e){return Gw(e)||e.outerHeightStyle===0&&!e.overflowing}const Hw=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=tt(r,u),p=b.useRef(null),m=b.useRef(null),h=b.useCallback(()=>{const S=u.current,x=m.current;if(!S||!x)return;const I=hn(S).getComputedStyle(S);if(I.width==="0px")return{outerHeightStyle:0,overflowing:!1};x.style.width=I.width,x.value=S.value||t.placeholder||"x",x.value.slice(-1)===`
|
|
102
|
-
`&&(x.value+=" ");const _=I.boxSizing,k=ni(I.paddingBottom)+ni(I.paddingTop),P=ni(I.borderBottomWidth)+ni(I.borderTopWidth),E=x.scrollHeight;x.value="x";const T=x.scrollHeight;let z=E;i&&(z=Math.max(Number(i)*T,z)),n&&(z=Math.min(Number(n)*T,z)),z=Math.max(z,T);const j=z+(_==="border-box"?k+P:0),A=Math.abs(z-E)<=1;return{outerHeightStyle:j,overflowing:A}},[n,i,t.placeholder]),g=Ft(()=>{const S=u.current,x=h();if(!S||!x||fd(x))return!1;const w=x.outerHeightStyle;return p.current!=null&&p.current!==w}),v=b.useCallback(()=>{const S=u.current,x=h();if(!S||!x||fd(x))return;const w=x.outerHeightStyle;p.current!==w&&(p.current=w,S.style.height=`${w}px`),S.style.overflow=x.overflowing?"hidden":""},[h]),y=b.useRef(-1);an(()=>{const S=ff(v),x=u?.current;if(!x)return;const w=hn(x);w.addEventListener("resize",S);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)),()=>{S.clear(),cancelAnimationFrame(y.current),w.removeEventListener("resize",S),I&&I.disconnect()}},[h,v,g]),an(()=>{v()});const $=S=>{c||v();const x=S.target,w=x.value.length,I=x.value.endsWith(`
|
|
103
|
-
`),_=x.selectionStart===w;I&&_&&x.setSelectionRange(w,w),o&&o(S)};return f.jsxs(b.Fragment,{children:[f.jsx("textarea",{value:s,onChange:$,ref:d,rows:i,style:a,...l}),f.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:m,tabIndex:-1,style:{...Zw.shadow,...a,paddingTop:0,paddingBottom:0}})]})});function fr({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 ca=b.createContext(void 0);function bn(){return b.useContext(ca)}function md(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Ai(e,t=!1){return e&&(md(e.value)&&e.value!==""||t&&md(e.defaultValue)&&e.defaultValue!=="")}function Kw(e){return e.startAdornment}function qw(e){return xe("MuiInputBase",e)}const Or=ve("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var hd;const ua=(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${F(r.color)}`],r.fullWidth&&t.fullWidth,r.hiddenLabel&&t.hiddenLabel]},da=(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]},Jw=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${F(r)}`,o&&"disabled",n&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",p&&p!=="medium"&&`size${F(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 Se(g,qw,t)},pa=M("div",{name:"MuiInputBase",slot:"Root",overridesResolver:ua})(ye(({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",[`&.${Or.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%"}}]}))),fa=M("input",{name:"MuiInputBase",slot:"Input",overridesResolver:da})(ye(({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] + .${Or.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},[`&.${Or.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"}}]}})),gd=Cx({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),cl=b.forwardRef(function(t,r){const o=we({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:$="input",inputProps:S={},inputRef:x,margin:w,maxRows:I,minRows:_,multiline:k=!1,name:P,onBlur:E,onChange:T,onClick:z,onFocus:j,onKeyDown:A,onKeyUp:D,placeholder:R,readOnly:U,renderSuffix:X,rows:L,size:re,slotProps:se={},slots:pe={},startAdornment:ce,type:Ie="text",value:Q,...V}=o,C=S.value!=null?S.value:Q,{current:B}=b.useRef(C!=null),q=b.useRef(),H=b.useCallback(Oe=>{},[]),J=tt(q,x,S.ref,H),[te,Y]=b.useState(!1),G=bn(),W=fr({props:o,muiFormControl:G,states:["color","disabled","error","hiddenLabel","size","required","filled"]});W.focused=G?G.focused:te,b.useEffect(()=>{!G&&p&&te&&(Y(!1),E&&E())},[G,p,te,E]);const fe=G&&G.onFilled,ae=G&&G.onEmpty,ee=b.useCallback(Oe=>{Ai(Oe)?fe&&fe():ae&&ae()},[fe,ae]);an(()=>{B&&ee({value:C})},[C,ee,B]);const he=Oe=>{j&&j(Oe),S.onFocus&&S.onFocus(Oe),G&&G.onFocus?G.onFocus(Oe):Y(!0)},be=Oe=>{E&&E(Oe),S.onBlur&&S.onBlur(Oe),G&&G.onBlur?G.onBlur(Oe):Y(!1)},_e=(Oe,...rt)=>{if(!B){const dt=Oe.target||q.current;if(dt==null)throw new Error(rf(1));ee({value:dt.value})}S.onChange&&S.onChange(Oe,...rt),T&&T(Oe,...rt)};b.useEffect(()=>{ee(q.current)},[]);const ne=Oe=>{q.current&&Oe.currentTarget===Oe.target&&q.current.focus(),z&&z(Oe)};let Ee=$,ue=S;k&&Ee==="input"&&(L?ue={type:void 0,minRows:L,maxRows:L,...ue}:ue={type:void 0,maxRows:I,minRows:_,...ue},Ee=Hw);const Pe=Oe=>{ee(Oe.animationName==="mui-auto-fill-cancel"?q.current:{value:"x"})};b.useEffect(()=>{G&&G.setAdornedStart(!!ce)},[G,ce]);const Je={...o,color:W.color||"primary",disabled:W.disabled,endAdornment:h,error:W.error,focused:W.focused,formControl:G,fullWidth:v,hiddenLabel:W.hiddenLabel,multiline:k,size:W.size,startAdornment:ce,type:Ie},Ve=Jw(Je),nt=pe.root||c.Root||pa,Qe=se.root||u.root||{},ct=pe.input||c.Input||fa;return ue={...ue,...se.input??u.input},f.jsxs(b.Fragment,{children:[!m&&typeof gd=="function"&&(hd||(hd=f.jsx(gd,{}))),f.jsxs(nt,{...Qe,ref:r,onClick:ne,...V,...!kr(nt)&&{ownerState:{...Je,...Qe.ownerState}},className:ie(Ve.root,Qe.className,s,U&&"MuiInputBase-readOnly"),children:[ce,f.jsx(ca.Provider,{value:null,children:f.jsx(ct,{"aria-invalid":W.error,"aria-describedby":n,autoComplete:i,autoFocus:a,defaultValue:d,disabled:W.disabled,id:y,onAnimationStart:Pe,name:P,placeholder:R,readOnly:U,required:W.required,rows:L,value:C,onKeyDown:A,onKeyUp:D,type:Ie,...ue,...!kr(ct)&&{as:Ee,ownerState:{...Je,...ue.ownerState}},ref:J,className:ie(Ve.input,ue.className,U&&"MuiInputBase-readOnly"),onBlur:be,onChange:_e,onFocus:he})}),h,X?X({...W,startAdornment:ce}):null]})]})});function Xw(e){return xe("MuiInput",e)}const Hr={...Or,...ve("MuiInput",["root","underline","input"])};function Yw(e){return xe("MuiOutlinedInput",e)}const en={...Or,...ve("MuiOutlinedInput",["root","notchedOutline","input"])};function Qw(e){return xe("MuiFilledInput",e)}const Bn={...Or,...ve("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},eI=Fe(f.jsx("path",{d:"M7 10l5 5 5-5z"})),tI={entering:{opacity:1},entered:{opacity:1}},Is=b.forwardRef(function(t,r){const o=dr(),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:$=Qt,...S}=t,x=b.useRef(null),w=tt(x,pr(s),r),I=A=>D=>{if(A){const R=x.current;D===void 0?A(R):A(R,D)}},_=I(p),k=I((A,D)=>{bf(A);const R=Ir({style:v,timeout:y,easing:l},{mode:"enter"});A.style.webkitTransition=o.transitions.create("opacity",R),A.style.transition=o.transitions.create("opacity",R),u&&u(A,D)}),P=I(d),E=I(g),T=I(A=>{const D=Ir({style:v,timeout:y,easing:l},{mode:"exit"});A.style.webkitTransition=o.transitions.create("opacity",D),A.style.transition=o.transitions.create("opacity",D),m&&m(A)}),z=I(h),j=A=>{i&&i(x.current,A)};return f.jsx($,{appear:a,in:c,nodeRef:x,onEnter:k,onEntered:P,onEntering:_,onExit:T,onExited:z,onExiting:E,addEndListener:j,timeout:y,...S,children:(A,{ownerState:D,...R})=>b.cloneElement(s,{style:{opacity:0,visibility:A==="exited"&&!c?"hidden":void 0,...tI[A],...v,...s.props.style},ref:w,...R})})});function nI(e){return xe("MuiBackdrop",e)}ve("MuiBackdrop",["root","invisible"]);const rI=e=>{const{classes:t,invisible:r}=e;return Se({root:["root",r&&"invisible"]},nI,t)},oI=M("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"}}]}),Rf=b.forwardRef(function(t,r){const o=we({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=rI(v),$={transition:m,root:c.Root,...p},S={...u,...d},x={component:a,slots:$,slotProps:S},[w,I]=ge("root",{elementType:oI,externalForwardedProps:x,className:ie(y.root,i),ownerState:v}),[_,k]=ge("transition",{elementType:Is,externalForwardedProps:x,ownerState:v});return f.jsx(_,{in:l,timeout:h,...g,...k,children:f.jsx(w,{"aria-hidden":!0,...I,classes:y,ref:r,children:n})})}),iI=ve("MuiBox",["root"]),aI=Ex(),pt=Yx({themeId:Ks,defaultTheme:aI,defaultClassName:iI.root,generateClassName:cf.generate});function sI(e){return xe("MuiButton",e)}const Vn=ve("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"]),lI=b.createContext({}),cI=b.createContext(void 0),uI=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}${F(t)}`,`size${F(n)}`,`${i}Size${F(n)}`,`color${F(t)}`,r&&"disableElevation",o&&"fullWidth",a&&`loadingPosition${F(s)}`],startIcon:["icon","startIcon",`iconSize${F(n)}`],endIcon:["icon","endIcon",`iconSize${F(n)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},u=Se(c,sI,l);return{...l,...u}},zf=[{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}}}],dI=M(or,{shouldForwardProp:e=>_t(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`${r.variant}${F(r.color)}`],t[`size${F(r.size)}`],t[`${r.variant}Size${F(r.size)}`],r.color==="inherit"&&t.colorInherit,r.disableElevation&&t.disableElevation,r.fullWidth&&t.fullWidth,r.loading&&t.loading]}})(ye(({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"},[`&.${Vn.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]},[`&.${Vn.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${Vn.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)",[`&.${Vn.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(it()).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"},[`&.${Vn.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Vn.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}),[`&.${Vn.loading}`]:{color:"transparent"}}}]}})),pI=M("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.startIcon,r.loading&&t.startIconLoadingStart,t[`iconSize${F(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}},...zf]})),fI=M("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.endIcon,r.loading&&t.endIconLoadingEnd,t[`iconSize${F(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}},...zf]})),mI=M("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}}]})),vd=M("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),nn=b.forwardRef(function(t,r){const o=b.useContext(lI),n=b.useContext(cI),i=of(o,t),a=we({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:$=null,loadingIndicator:S,loadingPosition:x="center",size:w="medium",startIcon:I,type:_,variant:k="text",...P}=a,E=Lr(y),T=S??f.jsx(sa,{"aria-labelledby":E,color:"inherit",size:16}),z={...a,color:l,component:c,disabled:d,disableElevation:p,disableFocusRipple:m,fullWidth:v,loading:$,loadingIndicator:T,loadingPosition:x,size:w,type:_,variant:k},j=uI(z),A=(I||$&&x==="start")&&f.jsx(pI,{className:j.startIcon,ownerState:z,children:I||f.jsx(vd,{className:j.loadingIconPlaceholder,ownerState:z})}),D=(h||$&&x==="end")&&f.jsx(fI,{className:j.endIcon,ownerState:z,children:h||f.jsx(vd,{className:j.loadingIconPlaceholder,ownerState:z})}),R=n||"",U=typeof $=="boolean"?f.jsx("span",{className:j.loadingWrapper,style:{display:"contents"},children:$&&f.jsx(mI,{className:j.loadingIndicator,ownerState:z,children:T})}):null;return f.jsxs(dI,{ownerState:z,className:ie(o.className,j.root,u,R),component:c,disabled:d||$,focusRipple:!m,focusVisibleClassName:ie(j.focusVisible,g),ref:r,type:_,id:$?E:y,...P,classes:j,children:[A,x!=="end"&&U,s,x==="end"&&U,D]})});function hI(e){return b.Children.toArray(e).filter(t=>b.isValidElement(t))}function gI(e){return xe("PrivateSwitchBase",e)}ve("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const vI=e=>{const{classes:t,checked:r,disabled:o,edge:n}=e,i={root:["root",r&&"checked",o&&"disabled",n&&`edge${F(n)}`],input:["input"]};return Se(i,gI,t)},bI=M(or,{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}}]}),yI=M("input",{name:"MuiSwitchBase",shouldForwardProp:_t})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Af=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:$,required:S=!1,tabIndex:x,type:w,value:I,slots:_={},slotProps:k={},...P}=t,[E,T]=Oi({controlled:n,default:!!a,name:"SwitchBase",state:"checked"}),z=bn(),j=Q=>{y&&y(Q),z&&z.onFocus&&z.onFocus(Q)},A=Q=>{g&&g(Q),z&&z.onBlur&&z.onBlur(Q)},D=Q=>{if(Q.nativeEvent.defaultPrevented)return;const V=Q.target.checked;T(V),v&&v(Q,V)};let R=s;z&&typeof R>"u"&&(R=z.disabled);const U=w==="checkbox"||w==="radio",X={...t,checked:E,disabled:R,disableFocusRipple:l,edge:c},L=vI(X),re={slots:_,slotProps:{input:p,...k}},[se,pe]=ge("root",{ref:r,elementType:bI,className:L.root,shouldForwardComponentProp:!0,externalForwardedProps:{...re,component:"span",...P},getSlotProps:Q=>({...Q,onFocus:V=>{Q.onFocus?.(V),j(V)},onBlur:V=>{Q.onBlur?.(V),A(V)}}),ownerState:X,additionalProps:{centerRipple:!0,focusRipple:!l,disabled:R,role:void 0,tabIndex:null}}),[ce,Ie]=ge("input",{ref:m,elementType:yI,className:L.input,externalForwardedProps:re,getSlotProps:Q=>({...Q,onChange:V=>{Q.onChange?.(V),D(V)}}),ownerState:X,additionalProps:{autoFocus:o,checked:n,defaultChecked:a,disabled:R,id:U?d:void 0,name:h,readOnly:$,required:S,tabIndex:x,type:w,...w==="checkbox"&&I===void 0?{}:{value:I}}});return f.jsxs(se,{...pe,children:[f.jsx(ce,{...Ie}),E?i:u]})}),xI=Fe(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"})),SI=Fe(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"})),$I=Fe(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 wI(e){return xe("MuiCheckbox",e)}const Wa=ve("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),II=e=>{const{classes:t,indeterminate:r,color:o,size:n}=e,i={root:["root",r&&"indeterminate",`color${F(o)}`,`size${F(n)}`]},a=Se(i,wI,t);return{...t,...a}},kI=M(Af,{shouldForwardProp:e=>_t(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.indeterminate&&t.indeterminate,t[`size${F(r.size)}`],r.color!=="default"&&t[`color${F(r.color)}`]]}})(ye(({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(it()).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(it()).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"}}}}]}))),_I=f.jsx(SI,{}),CI=f.jsx(xI,{}),EI=f.jsx($I,{}),Dt=b.forwardRef(function(t,r){const o=we({props:t,name:"MuiCheckbox"}),{checkedIcon:n=_I,color:i="primary",icon:a=CI,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,$={...o,disableRipple:d,color:i,indeterminate:s,size:u},S=II($),x=h.input??c,[w,I]=ge("root",{ref:r,elementType:kI,className:ie(S.root,p),shouldForwardComponentProp:!0,externalForwardedProps:{slots:m,slotProps:h,...g},ownerState:$,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:mf(typeof x=="function"?x($):x,{"data-indeterminate":s})}}});return f.jsx(w,{...I,classes:S})});function bd(e){return e.substring(2).toLowerCase()}function PI(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function OI(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=tt(pr(t),s),d=Ft(h=>{const g=c.current;c.current=!1;const v=mt(s.current);if(!l.current||!s.current||"clientX"in h&&PI(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=bd(i),g=mt(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=bd(o),g=mt(s.current);return g.addEventListener(h,d),()=>{g.removeEventListener(h,d)}}},[d,o]),b.cloneElement(t,m)}function Mf(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function jI(e){const t=mt(e);return t.body===e?hn(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function ho(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function yd(e){return parseInt(hn(e).getComputedStyle(e).paddingRight,10)||0}function DI(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 xd(e,t,r,o,n){const i=[t,r,...o];[].forEach.call(e.children,a=>{const s=!i.includes(a),l=!DI(a);s&&l&&ho(a,n)})}function Za(e,t){let r=-1;return e.some((o,n)=>t(o)?(r=n,!0):!1),r}function TI(e,t){const r=[],o=e.container;if(!t.disableScrollLock){if(jI(o)){const a=Mf(hn(o));r.push({value:o.style.paddingRight,property:"padding-right",el:o}),o.style.paddingRight=`${yd(o)+a}px`;const s=mt(o).querySelectorAll(".mui-fixed");[].forEach.call(s,l=>{r.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${yd(l)+a}px`})}let i;if(o.parentNode instanceof DocumentFragment)i=mt(o).body;else{const a=o.parentElement,s=hn(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 RI(e){const t=[];return[].forEach.call(e.children,r=>{r.getAttribute("aria-hidden")==="true"&&t.push(r)}),t}class zI{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&&ho(t.modalRef,!1);const n=RI(r);xd(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=TI(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&&ho(t.modalRef,r),xd(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&&ho(a.modalRef,!1)}return o}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function ao(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}const AI=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function MI(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 NI(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 FI(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||NI(e))}function LI(e){const t=[],r=[];return Array.from(e.querySelectorAll(AI)).forEach((o,n)=>{const i=MI(o);i===-1||!FI(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 UI(){return!0}function BI(e){const{children:t,disableAutoFocus:r=!1,disableEnforceFocus:o=!1,disableRestoreFocus:n=!1,getTabbable:i=LI,isEnabled:a=UI,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=tt(pr(t),h),v=b.useRef(null);b.useEffect(()=>{!s||!h.current||(m.current=!r)},[r,s]),b.useEffect(()=>{if(!s||!h.current)return;const S=mt(h.current),x=ao(S);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 S=mt(h.current),x=ao(S),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 P=ao(S);if(!S.hasFocus()||!a()||l.current){l.current=!1;return}if(k.contains(P)||o&&P!==c.current&&P!==u.current)return;if(P!==p.current)p.current=null;else if(p.current!==null)return;if(!m.current)return;let E=[];if((P===c.current||P===u.current)&&(E=i(h.current)),E.length>0){const T=!!(v.current?.shiftKey&&v.current?.key==="Tab"),z=E[0],j=E[E.length-1];typeof z!="string"&&typeof j!="string"&&(T?j.focus():z.focus())}else k.focus()};S.addEventListener("focusin",I),S.addEventListener("keydown",w,!0);const _=setInterval(()=>{const k=ao(S);k&&k.tagName==="BODY"&&I()},50);return()=>{clearInterval(_),S.removeEventListener("focusin",I),S.removeEventListener("keydown",w,!0)}},[r,o,n,a,s,i]);const y=S=>{d.current===null&&(d.current=S.relatedTarget),m.current=!0,p.current=S.target;const x=t.props.onFocus;x&&x(S)},$=S=>{d.current===null&&(d.current=S.relatedTarget),m.current=!0};return f.jsxs(b.Fragment,{children:[f.jsx("div",{tabIndex:s?0:-1,onFocus:$,ref:c,"data-testid":"sentinelStart"}),b.cloneElement(t,{ref:g,onFocus:y}),f.jsx("div",{tabIndex:s?0:-1,onFocus:$,ref:u,"data-testid":"sentinelEnd"})]})}function VI(e){return typeof e=="function"?e():e}function WI(e){return e?e.props.hasOwnProperty("in"):!1}const Sd=()=>{},ri=new zI;function ZI(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=tt(m,u),[g,v]=b.useState(!c),y=WI(s);let $=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&($=!1);const S=()=>mt(p.current),x=()=>(d.current.modalRef=m.current,d.current.mount=p.current,d.current),w=()=>{ri.mount(x(),{disableScrollLock:o}),m.current&&(m.current.scrollTop=0)},I=Ft(()=>{const D=VI(t)||S().body;ri.add(x(),D),m.current&&w()}),_=()=>ri.isTopModal(x()),k=Ft(D=>{p.current=D,D&&(c&&_()?w():m.current&&ho(m.current,$))}),P=b.useCallback(()=>{ri.remove(x(),$)},[$]);b.useEffect(()=>()=>{P()},[P]),b.useEffect(()=>{c?I():(!y||!n)&&P()},[c,P,y,n,I]);const E=D=>R=>{D.onKeyDown?.(R),!(R.key!=="Escape"||R.which===229||!_())&&(r||(R.stopPropagation(),l&&l(R,"escapeKeyDown")))},T=D=>R=>{D.onClick?.(R),R.target===R.currentTarget&&l&&l(R,"backdropClick")};return{getRootProps:(D={})=>{const R=Di(e);delete R.onTransitionEnter,delete R.onTransitionExited;const U={...R,...D};return{role:"presentation",...U,onKeyDown:E(U),ref:h}},getBackdropProps:(D={})=>{const R=D;return{"aria-hidden":!0,...R,onClick:T(R),open:c}},getTransitionProps:()=>{const D=()=>{v(!1),i&&i()},R=()=>{v(!0),a&&a(),n&&P()};return{onEnter:Hu(D,s?.props.onEnter??Sd),onExited:Hu(R,s?.props.onExited??Sd)}},rootRef:h,portalRef:k,isTopModal:_,exited:g,hasTransition:y}}function GI(e){return xe("MuiModal",e)}ve("MuiModal",["root","hidden","backdrop"]);const HI=e=>{const{open:t,exited:r,classes:o}=e;return Se({root:["root",!t&&r&&"hidden"],backdrop:["backdrop"]},GI,o)},KI=M("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.open&&r.exited&&t.hidden]}})(ye(({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"}}]}))),qI=M(Rf,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),Nf=b.forwardRef(function(t,r){const o=we({name:"MuiModal",props:t}),{BackdropComponent:n=qI,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:$=!1,disableScrollLock:S=!1,hideBackdrop:x=!1,keepMounted:w=!1,onClose:I,onTransitionEnter:_,onTransitionExited:k,open:P,slotProps:E={},slots:T={},theme:z,...j}=o,A={...o,closeAfterTransition:l,disableAutoFocus:h,disableEnforceFocus:g,disableEscapeKeyDown:v,disablePortal:y,disableRestoreFocus:$,disableScrollLock:S,hideBackdrop:x,keepMounted:w},{getRootProps:D,getBackdropProps:R,getTransitionProps:U,portalRef:X,isTopModal:L,exited:re,hasTransition:se}=ZI({...A,rootRef:r}),pe={...A,exited:re},ce=HI(pe),Ie={};if(c.props.tabIndex===void 0&&(Ie.tabIndex="-1"),se){const{onEnter:H,onExited:J}=U();Ie.onEnter=H,Ie.onExited=J}const Q={slots:{root:p.Root,backdrop:p.Backdrop,...T},slotProps:{...m,...E}},[V,C]=ge("root",{ref:r,elementType:KI,externalForwardedProps:{...Q,...j,component:d},getSlotProps:D,ownerState:pe,className:ie(s,ce?.root,!pe.open&&pe.exited&&ce?.hidden)}),[B,q]=ge("backdrop",{ref:i?.ref,elementType:n,externalForwardedProps:Q,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:H=>R({...H,onClick:J=>{H?.onClick&&H.onClick(J)}}),className:ie(i?.className,ce?.backdrop),ownerState:pe});return!w&&!P&&(!se||re)?null:f.jsx(Df,{ref:X,container:u,disablePortal:y,children:f.jsxs(V,{...C,children:[!x&&n?f.jsx(B,{...q}):null,f.jsx(BI,{disableEnforceFocus:g,disableAutoFocus:h,disableRestoreFocus:$,isEnabled:L,open:P,children:b.cloneElement(c,Ie)})]})})});function JI(e){return xe("MuiDialog",e)}const Ga=ve("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),Ff=b.createContext({}),XI=M(Rf,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),YI=e=>{const{classes:t,scroll:r,maxWidth:o,fullWidth:n,fullScreen:i}=e,a={root:["root"],container:["container",`scroll${F(r)}`],paper:["paper",`paperScroll${F(r)}`,`paperWidth${F(String(o))}`,n&&"paperFullWidth",i&&"paperFullScreen"]};return Se(a,JI,t)},QI=M(Nf,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),e0=M("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.container,t[`scroll${F(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"}}}]}),t0=M(Pn,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.paper,t[`scrollPaper${F(r.scroll)}`],t[`paperWidth${F(String(r.maxWidth))}`],r.fullWidth&&t.paperFullWidth,r.fullScreen&&t.paperFullScreen]}})(ye(({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%"}}}]}))),n0=b.forwardRef(function(t,r){const o=we({props:t,name:"MuiDialog"}),n=dr(),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:$,open:S,PaperComponent:x=Pn,PaperProps:w={},scroll:I="paper",slots:_={},slotProps:k={},TransitionComponent:P=Is,transitionDuration:E=i,TransitionProps:T,...z}=o,j={...o,disableEscapeKeyDown:m,fullScreen:h,fullWidth:g,maxWidth:v,scroll:I},A=YI(j),D=b.useRef(),R=Y=>{D.current=Y.target===Y.currentTarget},U=Y=>{y&&y(Y),D.current&&(D.current=null,$&&$(Y,"backdropClick"))},X=Lr(s),L=b.useMemo(()=>({titleId:X}),[X]),re={transition:P,..._},se={transition:T,paper:w,backdrop:u,...k},pe={slots:re,slotProps:se},[ce,Ie]=ge("root",{elementType:QI,shouldForwardComponentProp:!0,externalForwardedProps:pe,ownerState:j,className:ie(A.root,p),ref:r}),[Q,V]=ge("backdrop",{elementType:XI,shouldForwardComponentProp:!0,externalForwardedProps:pe,ownerState:j}),[C,B]=ge("paper",{elementType:t0,shouldForwardComponentProp:!0,externalForwardedProps:pe,ownerState:j,className:ie(A.paper,w.className)}),[q,H]=ge("container",{elementType:e0,externalForwardedProps:pe,ownerState:j,className:A.container}),[J,te]=ge("transition",{elementType:Is,externalForwardedProps:pe,ownerState:j,additionalProps:{appear:!0,in:S,timeout:E,role:"presentation"}});return f.jsx(ce,{closeAfterTransition:!0,slots:{backdrop:Q},slotProps:{backdrop:{transitionDuration:E,as:c,...V}},disableEscapeKeyDown:m,onClose:$,open:S,onClick:U,...Ie,...z,children:f.jsx(J,{...te,children:f.jsx(q,{onMouseDown:R,...H,children:f.jsx(C,{as:x,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":X,"aria-modal":l,...B,children:f.jsx(Ff.Provider,{value:L,children:d})})})})})});function r0(e){return xe("MuiDialogActions",e)}ve("MuiDialogActions",["root","spacing"]);const o0=e=>{const{classes:t,disableSpacing:r}=e;return Se({root:["root",!r&&"spacing"]},r0,t)},i0=M("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}}}]}),a0=b.forwardRef(function(t,r){const o=we({props:t,name:"MuiDialogActions"}),{className:n,disableSpacing:i=!1,...a}=o,s={...o,disableSpacing:i},l=o0(s);return f.jsx(i0,{className:ie(l.root,n),ownerState:s,ref:r,...a})});function s0(e){return xe("MuiDialogContent",e)}ve("MuiDialogContent",["root","dividers"]);function l0(e){return xe("MuiDialogTitle",e)}const c0=ve("MuiDialogTitle",["root"]),u0=e=>{const{classes:t,dividers:r}=e;return Se({root:["root",r&&"dividers"]},s0,t)},d0=M("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.dividers&&t.dividers]}})(ye(({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:{[`.${c0.root} + &`]:{paddingTop:0}}}]}))),p0=b.forwardRef(function(t,r){const o=we({props:t,name:"MuiDialogContent"}),{className:n,dividers:i=!1,...a}=o,s={...o,dividers:i},l=u0(s);return f.jsx(d0,{className:ie(l.root,n),ownerState:s,ref:r,...a})}),f0=e=>{const{classes:t}=e;return Se({root:["root"]},l0,t)},m0=M(Ce,{name:"MuiDialogTitle",slot:"Root"})({padding:"16px 24px",flex:"0 0 auto"}),h0=b.forwardRef(function(t,r){const o=we({props:t,name:"MuiDialogTitle"}),{className:n,id:i,...a}=o,s=o,l=f0(s),{titleId:c=i}=b.useContext(Ff);return f.jsx(m0,{component:"h2",className:ie(l.root,n),ownerState:s,ref:r,variant:"h6",id:i??c,...a})});function g0(e){return xe("MuiDivider",e)}const $d=ve("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),v0=e=>{const{absolute:t,children:r,classes:o,flexItem:n,light:i,orientation:a,textAlign:s,variant:l}=e;return Se({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"]},g0,o)},b0=M("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]}})(ye(({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%"}}}]}))),y0=M("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.wrapper,r.orientation==="vertical"&&t.wrapperVertical]}})(ye(({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)`}}]}))),ar=b.forwardRef(function(t,r){const o=we({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=v0(g);return f.jsx(b0,{as:l,className:ie(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(y0,{className:v.wrapper,ownerState:g,children:i}):null})});ar&&(ar.muiSkipListHighlight=!0);const x0=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${F(i)}`,a&&"hiddenLabel",s&&"multiline"],input:["input"]},c=Se(l,Qw,t);return{...t,...c}},S0=M(pa,{shouldForwardProp:e=>_t(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[...ua(e,t),!r.disableUnderline&&t.underline]}})(ye(({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}},[`&.${Bn.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:o},[`&.${Bn.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"},[`&.${Bn.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Bn.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(.${Bn.disabled}, .${Bn.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Bn.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(it()).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}}]}})),$0=M(fa,{name:"MuiFilledInput",slot:"Input",overridesResolver:da})(ye(({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}}]}))),ul=b.forwardRef(function(t,r){const o=we({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=x0(o),y={root:{ownerState:g},input:{ownerState:g}},$=d??a?Ys(y,d??a):y,S=p.root??i.Root??S0,x=p.input??i.Input??$0;return f.jsx(cl,{slots:{root:S,input:x},slotProps:$,fullWidth:s,inputComponent:c,multiline:u,ref:r,type:m,...h,classes:v})});ul.muiName="Input";function w0(e){return xe("MuiFormControl",e)}ve("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const I0=e=>{const{classes:t,margin:r,fullWidth:o}=e,n={root:["root",r!=="none"&&`margin${F(r)}`,o&&"fullWidth"]};return Se(n,w0,t)},k0=M("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`margin${F(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%"}}]}),Ao=b.forwardRef(function(t,r){const o=we({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,$={...o,color:a,component:s,disabled:l,error:c,fullWidth:d,hiddenLabel:p,margin:m,required:h,size:g,variant:v},S=I0($),[x,w]=b.useState(()=>{let D=!1;return n&&b.Children.forEach(n,R=>{if(!$i(R,["Input","Select"]))return;const U=$i(R,["Select"])?R.props.input:R;U&&Kw(U.props)&&(D=!0)}),D}),[I,_]=b.useState(()=>{let D=!1;return n&&b.Children.forEach(n,R=>{$i(R,["Input","Select"])&&(Ai(R.props,!0)||Ai(R.props.inputProps,!0))&&(D=!0)}),D}),[k,P]=b.useState(!1);l&&k&&P(!1);const E=u!==void 0&&!l?u:k;let T;b.useRef(!1);const z=b.useCallback(()=>{_(!0)},[]),j=b.useCallback(()=>{_(!1)},[]),A=b.useMemo(()=>({adornedStart:x,setAdornedStart:w,color:a,disabled:l,error:c,filled:I,focused:E,fullWidth:d,hiddenLabel:p,size:g,onBlur:()=>{P(!1)},onFocus:()=>{P(!0)},onEmpty:j,onFilled:z,registerEffect:T,required:h,variant:v}),[x,a,l,c,I,E,d,p,T,j,z,h,g,v]);return f.jsx(ca.Provider,{value:A,children:f.jsx(k0,{as:s,ownerState:$,className:ie(S.root,i),ref:r,...y,children:n})})});function _0(e){return xe("MuiFormControlLabel",e)}const so=ve("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),C0=e=>{const{classes:t,disabled:r,labelPlacement:o,error:n,required:i}=e,a={root:["root",r&&"disabled",`labelPlacement${F(o)}`,n&&"error",i&&"required"],label:["label",r&&"disabled"],asterisk:["asterisk",n&&"error"]};return Se(a,_0,t)},E0=M("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${so.label}`]:t.label},t.root,t[`labelPlacement${F(r.labelPlacement)}`]]}})(ye(({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${so.disabled}`]:{cursor:"default"},[`& .${so.label}`]:{[`&.${so.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}}]}))),P0=M("span",{name:"MuiFormControlLabel",slot:"Asterisk"})(ye(({theme:e})=>({[`&.${so.error}`]:{color:(e.vars||e).palette.error.main}}))),yt=b.forwardRef(function(t,r){const o=we({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}=o,x=bn(),w=l??s.props.disabled??x?.disabled,I=g??s.props.required,_={disabled:w,required:I};["checked","name","onChange","value","inputRef"].forEach(D=>{typeof s.props[D]>"u"&&typeof o[D]<"u"&&(_[D]=o[D])});const k=fr({props:o,muiFormControl:x,states:["error"]}),P={...o,disabled:w,labelPlacement:p,required:I,error:k.error},E=C0(P),T={slots:v,slotProps:{...a,...y}},[z,j]=ge("typography",{elementType:Ce,externalForwardedProps:T,ownerState:P});let A=d;return A!=null&&A.type!==Ce&&!c&&(A=f.jsx(z,{component:"span",...j,className:ie(E.label,j?.className),children:A})),f.jsxs(E0,{className:ie(E.root,i),ownerState:P,ref:r,...S,children:[b.cloneElement(s,_),I?f.jsxs("div",{children:[A,f.jsxs(P0,{ownerState:P,"aria-hidden":!0,className:E.asterisk,children:[" ","*"]})]}):A]})});function O0(e){return xe("MuiFormHelperText",e)}const wd=ve("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var Id;const j0=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${F(o)}`,r&&"contained",s&&"focused",a&&"filled",l&&"required"]};return Se(c,O0,t)},D0=M("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.size&&t[`size${F(r.size)}`],r.contained&&t.contained,r.filled&&t.filled]}})(ye(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${wd.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${wd.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}}]}))),ma=b.forwardRef(function(t,r){const o=we({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=bn(),v=fr({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 $=j0(y);return f.jsx(D0,{as:a,className:ie($.root,i),ref:r,...h,ownerState:y,children:n===" "?Id||(Id=f.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):n})});function T0(e){return xe("MuiFormLabel",e)}const go=ve("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),R0=e=>{const{classes:t,color:r,focused:o,disabled:n,error:i,filled:a,required:s}=e,l={root:["root",`color${F(r)}`,n&&"disabled",i&&"error",a&&"filled",o&&"focused",s&&"required"],asterisk:["asterisk",i&&"error"]};return Se(l,T0,t)},z0=M("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color==="secondary"&&t.colorSecondary,r.filled&&t.filled]}})(ye(({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(it()).map(([t])=>({props:{color:t},style:{[`&.${go.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${go.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${go.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),A0=M("span",{name:"MuiFormLabel",slot:"Asterisk"})(ye(({theme:e})=>({[`&.${go.error}`]:{color:(e.vars||e).palette.error.main}}))),M0=b.forwardRef(function(t,r){const o=we({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=bn(),g=fr({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=R0(v);return f.jsxs(z0,{as:s,ownerState:v,className:ie(y.root,i),ref:r,...m,children:[n,g.required&&f.jsxs(A0,{ownerState:v,"aria-hidden":!0,className:y.asterisk,children:[" ","*"]})]})});function ks(e){return`scale(${e}, ${e**2})`}const N0={entering:{opacity:1,transform:ks(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=Qt,...y}=t,$=kn(),S=b.useRef(),x=dr(),w=b.useRef(null),I=tt(w,pr(i),r),_=D=>R=>{if(D){const U=w.current;R===void 0?D(U):D(U,R)}},k=_(u),P=_((D,R)=>{bf(D);const{duration:U,delay:X,easing:L}=Ir({style:h,timeout:g,easing:a},{mode:"enter"});let re;g==="auto"?(re=x.transitions.getAutoHeightDuration(D.clientHeight),S.current=re):re=U,D.style.transition=[x.transitions.create("opacity",{duration:re,delay:X}),x.transitions.create("transform",{duration:Ha?re:re*.666,delay:X,easing:L})].join(","),l&&l(D,R)}),E=_(c),T=_(m),z=_(D=>{const{duration:R,delay:U,easing:X}=Ir({style:h,timeout:g,easing:a},{mode:"exit"});let L;g==="auto"?(L=x.transitions.getAutoHeightDuration(D.clientHeight),S.current=L):L=R,D.style.transition=[x.transitions.create("opacity",{duration:L,delay:U}),x.transitions.create("transform",{duration:Ha?L:L*.666,delay:Ha?U:U||L*.333,easing:X})].join(","),D.style.opacity=0,D.style.transform=ks(.75),d&&d(D)}),j=_(p),A=D=>{g==="auto"&&$.start(S.current||0,D),o&&o(w.current,D)};return f.jsx(v,{appear:n,in:s,nodeRef:w,onEnter:P,onEntered:E,onEntering:k,onExit:z,onExited:j,onExiting:T,addEndListener:A,timeout:g==="auto"?null:g,...y,children:(D,{ownerState:R,...U})=>b.cloneElement(i,{style:{opacity:0,transform:ks(.75),visibility:D==="exited"&&!s?"hidden":void 0,...N0[D],...h,...i.props.style},ref:I,...U})})});$o&&($o.muiSupportAuto=!0);const F0=e=>{const{classes:t,disableUnderline:r}=e,n=Se({root:["root",!r&&"underline"],input:["input"]},Xw,t);return{...t,...n}},L0=M(pa,{shouldForwardProp:e=>_t(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[...ua(e,t),!r.disableUnderline&&t.underline]}})(ye(({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"},[`&.${Hr.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Hr.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(.${Hr.disabled}, .${Hr.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${Hr.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(it()).map(([o])=>({props:{color:o,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[o].main}`}}}))]}})),U0=M(fa,{name:"MuiInput",slot:"Input",overridesResolver:da})({}),dl=b.forwardRef(function(t,r){const o=we({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=F0(o),v={root:{ownerState:{disableUnderline:n}}},y=u??a?Ys(u??a,v):v,$=d.root??i.Root??L0,S=d.input??i.Input??U0;return f.jsx(cl,{slots:{root:$,input:S},slotProps:y,fullWidth:s,inputComponent:l,multiline:c,ref:r,type:p,...m,classes:h})});dl.muiName="Input";function B0(e){return xe("MuiInputAdornment",e)}const kd=ve("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var _d;const V0=(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${F(r.position)}`],r.disablePointerEvents===!0&&t.disablePointerEvents,t[r.variant]]},W0=e=>{const{classes:t,disablePointerEvents:r,hiddenLabel:o,position:n,size:i,variant:a}=e,s={root:["root",r&&"disablePointerEvents",n&&`position${F(n)}`,a,o&&"hiddenLabel",i&&`size${F(i)}`]};return Se(s,B0,t)},Z0=M("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:V0})(ye(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${kd.positionStart}&:not(.${kd.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),G0=b.forwardRef(function(t,r){const o=we({props:t,name:"MuiInputAdornment"}),{children:n,className:i,component:a="div",disablePointerEvents:s=!1,disableTypography:l=!1,position:c,variant:u,...d}=o,p=bn()||{};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=W0(h);return f.jsx(ca.Provider,{value:null,children:f.jsx(Z0,{as:a,ownerState:h,className:ie(g.root,i),ref:r,...d,children:typeof n=="string"&&!l?f.jsx(Ce,{color:"textSecondary",children:n}):f.jsxs(b.Fragment,{children:[c==="start"?_d||(_d=f.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):null,n]})})})});function H0(e){return xe("MuiInputLabel",e)}ve("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const K0=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${F(o)}`,a],asterisk:[s&&"asterisk"]},c=Se(l,H0,t);return{...t,...c}},q0=M(M0,{shouldForwardProp:e=>_t(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${go.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]]}})(ye(({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)"}}]}))),Mo=b.forwardRef(function(t,r){const o=we({name:"MuiInputLabel",props:t}),{disableAnimation:n=!1,margin:i,shrink:a,variant:s,className:l,...c}=o,u=bn();let d=a;typeof d>"u"&&u&&(d=u.filled||u.focused||u.adornedStart);const p=fr({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=K0(m);return f.jsx(q0,{"data-shrink":d,ref:r,className:ie(h.root,l),...c,ownerState:m,classes:h})}),fn=b.createContext({});function J0(e){return xe("MuiList",e)}ve("MuiList",["root","padding","dense","subheader"]);const X0=e=>{const{classes:t,disablePadding:r,dense:o,subheader:n}=e;return Se({root:["root",!r&&"padding",o&&"dense",n&&"subheader"]},J0,t)},Y0=M("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}}]}),pl=b.forwardRef(function(t,r){const o=we({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=X0(p);return f.jsx(fn.Provider,{value:d,children:f.jsxs(Y0,{as:a,className:ie(m.root,i),ref:r,ownerState:p,...u,children:[c,n]})})});function Q0(e){return xe("MuiListItem",e)}ve("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);const ek=ve("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function tk(e){return xe("MuiListItemSecondaryAction",e)}ve("MuiListItemSecondaryAction",["root","disableGutters"]);const nk=e=>{const{disableGutters:t,classes:r}=e;return Se({root:["root",t&&"disableGutters"]},tk,r)},rk=M("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}}]}),Lf=b.forwardRef(function(t,r){const o=we({props:t,name:"MuiListItemSecondaryAction"}),{className:n,...i}=o,a=b.useContext(fn),s={...o,disableGutters:a.disableGutters},l=nk(s);return f.jsx(rk,{className:ie(l.root,n),ownerState:s,ref:r,...i})});Lf.muiName="ListItemSecondaryAction";const ok=(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]},ik=e=>{const{alignItems:t,classes:r,dense:o,disableGutters:n,disablePadding:i,divider:a,hasSecondaryAction:s}=e;return Se({root:["root",o&&"dense",!n&&"gutters",!i&&"padding",a&&"divider",t==="flex-start"&&"alignItemsFlexStart",s&&"secondaryAction"],container:["container"],secondaryAction:["secondaryAction"]},Q0,r)},ak=M("div",{name:"MuiListItem",slot:"Root",overridesResolver:ok})(ye(({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:{[`& > .${ek.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}}]}))),sk=M("li",{name:"MuiListItem",slot:"Container"})({position:"relative"}),Ka=b.forwardRef(function(t,r){const o=we({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:$={},slots:S={},...x}=o,w=b.useContext(fn),I=b.useMemo(()=>({dense:m||w.dense||!1,alignItems:n,disableGutters:h}),[n,w.dense,m,h]),_=b.useRef(null),k=b.Children.toArray(i),P=k.length&&$i(k[k.length-1],["ListItemSecondaryAction"]),E={...o,alignItems:n,dense:I.dense,disableGutters:h,disablePadding:g,divider:v,hasSecondaryAction:P},T=ik(E),z=tt(_,r),j={slots:S,slotProps:$},[A,D]=ge("secondaryAction",{elementType:Lf,externalForwardedProps:j,ownerState:E,className:T.secondaryAction}),R=S.root||l.Root||ak,U=$.root||c.root||{},X={className:ie(T.root,U.className,a),...x};let L=s||"li";return P?(L=!X.component&&!s?"div":L,u==="li"&&(L==="li"?L="div":X.component==="li"&&(X.component="div")),f.jsx(fn.Provider,{value:I,children:f.jsxs(sk,{as:u,className:ie(T.container,d),ref:z,ownerState:E,...p,children:[f.jsx(R,{...U,...!kr(R)&&{as:L,ownerState:{...E,...U.ownerState}},...X,children:k}),k.pop()]})})):f.jsx(fn.Provider,{value:I,children:f.jsxs(R,{...U,as:L,ref:z,...!kr(R)&&{ownerState:{...E,...U.ownerState}},...X,children:[k,y&&f.jsx(A,{...D,children:y})]})})});function lk(e){return xe("MuiListItemIcon",e)}const Cd=ve("MuiListItemIcon",["root","alignItemsFlexStart"]),ck=e=>{const{alignItems:t,classes:r}=e;return Se({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},lk,r)},uk=M("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(ye(({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),Ed=b.forwardRef(function(t,r){const o=we({props:t,name:"MuiListItemIcon"}),{className:n,...i}=o,a=b.useContext(fn),s={...o,alignItems:a.alignItems},l=ck(s);return f.jsx(uk,{className:ie(l.root,n),ownerState:s,ref:r,...i})});function dk(e){return xe("MuiListItemText",e)}const xr=ve("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),pk=e=>{const{classes:t,inset:r,primary:o,secondary:n,dense:i}=e;return Se({root:["root",r&&"inset",i&&"dense",o&&n&&"multiline"],primary:["primary"],secondary:["secondary"]},dk,t)},fk=M("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${xr.primary}`]:t.primary},{[`& .${xr.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,[`.${td.root}:where(& .${xr.primary})`]:{display:"block"},[`.${td.root}:where(& .${xr.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),Pd=b.forwardRef(function(t,r){const o=we({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(fn);let v=l??n,y=u;const $={...o,disableTypography:a,inset:s,primary:!!v,secondary:!!y,dense:g},S=pk($),x={slots:p,slotProps:{primary:c,secondary:d,...m}},[w,I]=ge("root",{className:ie(S.root,i),elementType:fk,externalForwardedProps:{...x,...h},ownerState:$,ref:r}),[_,k]=ge("primary",{className:S.primary,elementType:Ce,externalForwardedProps:x,ownerState:$}),[P,E]=ge("secondary",{className:S.secondary,elementType:Ce,externalForwardedProps:x,ownerState:$});return v!=null&&v.type!==Ce&&!a&&(v=f.jsx(_,{variant:g?"body2":"body1",component:k?.variant?void 0:"span",...k,children:v})),y!=null&&y.type!==Ce&&!a&&(y=f.jsx(P,{variant:"body2",color:"textSecondary",...E,children:y})),f.jsxs(w,{...I,children:[v,y]})});function qa(e,t,r){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:r?null:e.firstChild}function Od(e,t,r){return e===t?r?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:r?null:e.lastChild}function Uf(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 Kr(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")||!Uf(s,i)||l)s=n(e,s,r);else return s.focus(),!0}return!1}const mk=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});an(()=>{n&&m.current.focus()},[n]),b.useImperativeHandle(o,()=>({adjustStyleForScrollbar:(S,{direction:x})=>{const w=!m.current.style.width;if(S.clientHeight<m.current.clientHeight&&w){const I=`${Mf(hn(S))}px`;m.current.style[x==="rtl"?"paddingLeft":"paddingRight"]=I,m.current.style.width=`calc(100% + ${I})`}return m.current}}),[]);const g=S=>{const x=m.current,w=S.key;if(S.ctrlKey||S.metaKey||S.altKey){u&&u(S);return}const _=ao(mt(x));if(w==="ArrowDown")S.preventDefault(),Kr(x,_,c,l,qa);else if(w==="ArrowUp")S.preventDefault(),Kr(x,_,c,l,Od);else if(w==="Home")S.preventDefault(),Kr(x,null,c,l,qa);else if(w==="End")S.preventDefault(),Kr(x,null,c,l,Od);else if(w.length===1){const k=h.current,P=w.toLowerCase(),E=performance.now();k.keys.length>0&&(E-k.lastTime>500?(k.keys=[],k.repeating=!0,k.previousKeyMatched=!0):k.repeating&&P!==k.keys[0]&&(k.repeating=!1)),k.lastTime=E,k.keys.push(P);const T=_&&!k.repeating&&Uf(_,k);k.previousKeyMatched&&(T||Kr(x,_,!1,l,qa,k))?S.preventDefault():k.previousKeyMatched=!1}u&&u(S)},v=tt(m,r);let y=-1;b.Children.forEach(a,(S,x)=>{if(!b.isValidElement(S)){y===x&&(y+=1,y>=a.length&&(y=-1));return}S.props.disabled||(d==="selectedMenu"&&S.props.selected||y===-1)&&(y=x),y===x&&(S.props.disabled||S.props.muiSkipListHighlight||S.type.muiSkipListHighlight)&&(y+=1,y>=a.length&&(y=-1))});const $=b.Children.map(a,(S,x)=>{if(x===y){const w={};return i&&(w.autoFocus=!0),S.props.tabIndex===void 0&&d==="selectedMenu"&&(w.tabIndex=0),b.cloneElement(S,w)}return S});return f.jsx(pl,{role:"menu",ref:v,className:s,onKeyDown:g,tabIndex:n?0:-1,...p,children:$})});function hk(e){return xe("MuiPopover",e)}ve("MuiPopover",["root","paper"]);function jd(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.height/2:t==="bottom"&&(r=e.height),r}function Dd(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.width/2:t==="right"&&(r=e.width),r}function Td(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function oi(e){return typeof e=="function"?e():e}const gk=e=>{const{classes:t}=e;return Se({root:["root"],paper:["paper"]},hk,t)},vk=M(Nf,{name:"MuiPopover",slot:"Root"})({}),Bf=M(Pn,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),bk=b.forwardRef(function(t,r){const o=we({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:$={vertical:"top",horizontal:"left"},TransitionComponent:S,transitionDuration:x="auto",TransitionProps:w={},disableScrollLock:I=!1,..._}=o,k=b.useRef(),P={...o,anchorOrigin:a,anchorReference:l,elevation:p,marginThreshold:m,transformOrigin:$,TransitionComponent:S,transitionDuration:x,TransitionProps:w},E=gk(P),T=b.useCallback(()=>{if(l==="anchorPosition")return s;const H=oi(i),te=(H&&H.nodeType===1?H:mt(k.current).body).getBoundingClientRect();return{top:te.top+jd(te,a.vertical),left:te.left+Dd(te,a.horizontal)}},[i,a.horizontal,a.vertical,s,l]),z=b.useCallback(H=>({vertical:jd(H,$.vertical),horizontal:Dd(H,$.horizontal)}),[$.horizontal,$.vertical]),j=b.useCallback(H=>{const J={width:H.offsetWidth,height:H.offsetHeight},te=z(J);if(l==="none")return{top:null,left:null,transformOrigin:Td(te)};const Y=T();let G=Y.top-te.vertical,W=Y.left-te.horizontal;const fe=G+J.height,ae=W+J.width,ee=hn(oi(i)),he=ee.innerHeight-m,be=ee.innerWidth-m;if(m!==null&&G<m){const _e=G-m;G-=_e,te.vertical+=_e}else if(m!==null&&fe>he){const _e=fe-he;G-=_e,te.vertical+=_e}if(m!==null&&W<m){const _e=W-m;W-=_e,te.horizontal+=_e}else if(ae>be){const _e=ae-be;W-=_e,te.horizontal+=_e}return{top:`${Math.round(G)}px`,left:`${Math.round(W)}px`,transformOrigin:Td(te)}},[i,l,T,z,m]),[A,D]=b.useState(h),R=b.useCallback(()=>{const H=k.current;if(!H)return;const J=j(H);J.top!==null&&H.style.setProperty("top",J.top),J.left!==null&&(H.style.left=J.left),H.style.transformOrigin=J.transformOrigin,D(!0)},[j]);b.useEffect(()=>(I&&window.addEventListener("scroll",R),()=>window.removeEventListener("scroll",R)),[i,I,R]);const U=()=>{R()},X=()=>{D(!1)};b.useEffect(()=>{h&&R()}),b.useImperativeHandle(n,()=>h?{updatePosition:()=>{R()}}:null,[h,R]),b.useEffect(()=>{if(!h)return;const H=ff(()=>{R()}),J=hn(oi(i));return J.addEventListener("resize",H),()=>{H.clear(),J.removeEventListener("resize",H)}},[i,h,R]);let L=x;const re={slots:{transition:S,...v},slotProps:{transition:w,paper:g,...y}},[se,pe]=ge("transition",{elementType:$o,externalForwardedProps:re,ownerState:P,getSlotProps:H=>({...H,onEntering:(J,te)=>{H.onEntering?.(J,te),U()},onExited:J=>{H.onExited?.(J),X()}}),additionalProps:{appear:!0,in:h}});x==="auto"&&!se.muiSupportAuto&&(L=void 0);const ce=d||(i?mt(oi(i)).body:void 0),[Ie,{slots:Q,slotProps:V,...C}]=ge("root",{ref:r,elementType:vk,externalForwardedProps:{...re,..._},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:v.backdrop},slotProps:{backdrop:mf(typeof y.backdrop=="function"?y.backdrop(P):y.backdrop,{invisible:!0})},container:ce,open:h},ownerState:P,className:ie(E.root,u)}),[B,q]=ge("paper",{ref:k,className:E.paper,elementType:Bf,externalForwardedProps:re,shouldForwardComponentProp:!0,additionalProps:{elevation:p,style:A?void 0:{opacity:0}},ownerState:P});return f.jsx(Ie,{...C,...!kr(Ie)&&{slots:Q,slotProps:V,disableScrollLock:I},children:f.jsx(se,{...pe,timeout:L,children:f.jsx(B,{...q,children:c})})})});function yk(e){return xe("MuiMenu",e)}ve("MuiMenu",["root","paper","list"]);const xk={vertical:"top",horizontal:"right"},Sk={vertical:"top",horizontal:"left"},$k=e=>{const{classes:t}=e;return Se({root:["root"],paper:["paper"],list:["list"]},yk,t)},wk=M(bk,{shouldForwardProp:e=>_t(e)||e==="classes",name:"MuiMenu",slot:"Root"})({}),Ik=M(Bf,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),kk=M(mk,{name:"MuiMenu",slot:"List"})({outline:0}),_k=b.forwardRef(function(t,r){const o=we({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}=o,x=Xs(),w={...o,autoFocus:n,disableAutoFocusItem:s,MenuListProps:l,onEntering:h,PaperProps:d,transitionDuration:m,TransitionProps:g,variant:v},I=$k(w),_=n&&!s&&u,k=b.useRef(null),P=(L,re)=>{k.current&&k.current.adjustStyleForScrollbar(L,{direction:x?"rtl":"ltr"}),h&&h(L,re)},E=L=>{L.key==="Tab"&&(L.preventDefault(),c&&c(L,"tabKeyDown"))};let T=-1;b.Children.map(i,(L,re)=>{b.isValidElement(L)&&(L.props.disabled||(v==="selectedMenu"&&L.props.selected||T===-1)&&(T=re))});const z={slots:y,slotProps:{list:l,transition:g,paper:d,...$}},j=jf({elementType:y.root,externalSlotProps:$.root,ownerState:w,className:[I.root,a]}),[A,D]=ge("paper",{className:I.paper,elementType:Ik,externalForwardedProps:z,shouldForwardComponentProp:!0,ownerState:w}),[R,U]=ge("list",{className:ie(I.list,l.className),elementType:kk,shouldForwardComponentProp:!0,externalForwardedProps:z,getSlotProps:L=>({...L,onKeyDown:re=>{E(re),L.onKeyDown?.(re)}}),ownerState:w}),X=typeof z.slotProps.transition=="function"?z.slotProps.transition(w):z.slotProps.transition;return f.jsx(wk,{onClose:c,anchorOrigin:{vertical:"bottom",horizontal:x?"right":"left"},transformOrigin:x?xk:Sk,slots:{root:y.root,paper:A,backdrop:y.backdrop,...y.transition&&{transition:y.transition}},slotProps:{root:j,paper:D,backdrop:typeof $.backdrop=="function"?$.backdrop(w):$.backdrop,transition:{...X,onEntering:(...L)=>{P(...L),X?.onEntering?.(...L)}}},open:u,ref:r,transitionDuration:m,ownerState:w,...S,classes:p,children:f.jsx(R,{actions:k,autoFocus:n&&(T===-1||s),autoFocusItem:_,variant:v,...U,children:i})})});function Ck(e){return xe("MuiMenuItem",e)}const qr=ve("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Ek=(e,t)=>{const{ownerState:r}=e;return[t.root,r.dense&&t.dense,r.divider&&t.divider,!r.disableGutters&&t.gutters]},Pk=e=>{const{disabled:t,dense:r,divider:o,disableGutters:n,selected:i,classes:a}=e,l=Se({root:["root",r&&"dense",t&&"disabled",!n&&"gutters",o&&"divider",i&&"selected"]},Ck,a);return{...a,...l}},Ok=M(or,{shouldForwardProp:e=>_t(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:Ek})(ye(({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},[`& + .${$d.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${$d.inset}`]:{marginLeft:52},[`& .${xr.root}`]:{marginTop:0,marginBottom:0},[`& .${xr.inset}`]:{paddingLeft:36},[`& .${Cd.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,[`& .${Cd.root} svg`]:{fontSize:"1.25rem"}}}]}))),jr=b.forwardRef(function(t,r){const o=we({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(fn),g=b.useMemo(()=>({dense:a||h.dense||!1,disableGutters:l}),[h.dense,a,l]),v=b.useRef(null);an(()=>{n&&v.current&&v.current.focus()},[n]);const y={...o,dense:g.dense,divider:s,disableGutters:l},$=Pk(o),S=tt(v,r);let x;return o.disabled||(x=d!==void 0?d:-1),f.jsx(fn.Provider,{value:g,children:f.jsx(Ok,{ref:S,role:u,tabIndex:x,component:i,focusVisibleClassName:ie($.focusVisible,c),className:ie($.root,p),...m,ownerState:y,classes:$})})});function jk(e){return xe("MuiNativeSelect",e)}const fl=ve("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Dk=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${F(r)}`,i&&"iconOpen",o&&"disabled"]};return Se(s,jk,t)},Vf=M("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${fl.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}}}]})),Tk=M(Vf,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:_t,overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.select,t[r.variant],r.error&&t.error,{[`&.${fl.multiple}`]:t.multiple}]}})({}),Wf=M("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${fl.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}}]})),Rk=M(Wf,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.icon,r.variant&&t[`icon${F(r.variant)}`],r.open&&t.iconOpen]}})({}),zk=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=Dk(u);return f.jsxs(b.Fragment,{children:[f.jsx(Tk,{ownerState:u,className:ie(d.select,o),disabled:n,ref:s||r,...c}),t.multiple?null:f.jsx(Rk,{as:a,ownerState:u,className:d.icon})]})});var Rd;const Ak=M("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:_t})({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%"}),Mk=M("legend",{name:"MuiNotchedOutlined",shouldForwardProp:_t})(ye(({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 Nk(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(Ak,{"aria-hidden":!0,className:o,ownerState:l,...a,children:f.jsx(Mk,{ownerState:l,children:s?f.jsx("span",{children:n}):Rd||(Rd=f.jsx("span",{className:"notranslate","aria-hidden":!0,children:""}))})})}const Fk=e=>{const{classes:t}=e,o=Se({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Yw,t);return{...t,...o}},Lk=M(pa,{shouldForwardProp:e=>_t(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:ua})(ye(({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 .${en.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${en.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${en.focused} .${en.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(it()).map(([r])=>({props:{color:r},style:{[`&.${en.focused} .${en.notchedOutline}`]:{borderColor:(e.vars||e).palette[r].main}}})),{props:{},style:{[`&.${en.error} .${en.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${en.disabled} .${en.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"}}]}})),Uk=M(Nk,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(ye(({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}})),Bk=M(fa,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:da})(ye(({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}}]}))),ml=b.forwardRef(function(t,r){const o=we({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=Fk(o),g=bn(),v=fr({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},$=u.root??n.Root??Lk,S=u.input??n.Input??Bk,[x,w]=ge("notchedOutline",{elementType:Uk,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(cl,{slots:{root:$,input:S},slotProps:d,renderSuffix:I=>f.jsx(x,{...w,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}})});ml.muiName="Input";function Zf(e){return xe("MuiSelect",e)}const Jr=ve("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var zd;const Vk=M(Vf,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`&.${Jr.select}`]:t.select},{[`&.${Jr.select}`]:t[r.variant]},{[`&.${Jr.error}`]:t.error},{[`&.${Jr.multiple}`]:t.multiple}]}})({[`&.${Jr.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Wk=M(Wf,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.icon,r.variant&&t[`icon${F(r.variant)}`],r.open&&t.iconOpen]}})({}),Zk=M("input",{shouldForwardProp:e=>pf(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function Ad(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function Gk(e){return e==null||typeof e=="string"&&!e.trim()}const Hk=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${F(r)}`,i&&"iconOpen",o&&"disabled"],nativeInput:["nativeInput"]};return Se(s,Zf,t)},Kk=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:$,name:S,onBlur:x,onChange:w,onClose:I,onFocus:_,onKeyDown:k,onMouseDown:P,onOpen:E,open:T,readOnly:z,renderValue:j,required:A,SelectDisplayProps:D={},tabIndex:R,type:U,value:X,variant:L="standard",...re}=t,[se,pe]=Oi({controlled:X,default:u,name:"Select"}),[ce,Ie]=Oi({controlled:T,default:c,name:"Select"}),Q=b.useRef(null),V=b.useRef(null),[C,B]=b.useState(null),{current:q}=b.useRef(T!=null),[H,J]=b.useState(),te=tt(r,g),Y=b.useCallback(me=>{V.current=me,me&&B(me)},[]),G=C?.parentNode;b.useImperativeHandle(te,()=>({focus:()=>{V.current.focus()},node:Q.current,value:se}),[se]),b.useEffect(()=>{c&&ce&&C&&!q&&(J(a?null:G.clientWidth),V.current.focus())},[C,a]),b.useEffect(()=>{i&&V.current.focus()},[i]),b.useEffect(()=>{if(!v)return;const me=mt(V.current).getElementById(v);if(me){const Ue=()=>{getSelection().isCollapsed&&V.current.focus()};return me.addEventListener("click",Ue),()=>{me.removeEventListener("click",Ue)}}},[v]);const W=(me,Ue)=>{me?E&&E(Ue):I&&I(Ue),q||(J(a?null:G.clientWidth),Ie(me))},fe=me=>{P?.(me),me.button===0&&(me.preventDefault(),V.current.focus(),W(!0,me))},ae=me=>{W(!1,me)},ee=b.Children.toArray(s),he=me=>{const Ue=ee.find(at=>at.props.value===me.target.value);Ue!==void 0&&(pe(Ue.props.value),w&&w(me,Ue))},be=me=>Ue=>{let at;if(Ue.currentTarget.hasAttribute("tabindex")){if($){at=Array.isArray(se)?se.slice():[];const Sn=se.indexOf(me.props.value);Sn===-1?at.push(me.props.value):at.splice(Sn,1)}else at=me.props.value;if(me.props.onClick&&me.props.onClick(Ue),se!==at&&(pe(at),w)){const Sn=Ue.nativeEvent||Ue,Qo=new Sn.constructor(Sn.type,Sn);Object.defineProperty(Qo,"target",{writable:!0,value:{value:at,name:S}}),w(Qo,me)}$||W(!1,Ue)}},_e=me=>{z||([" ","ArrowUp","ArrowDown","Enter"].includes(me.key)&&(me.preventDefault(),W(!0,me)),k?.(me))},ne=C!==null&&ce,Ee=me=>{!ne&&x&&(Object.defineProperty(me,"target",{writable:!0,value:{value:se,name:S}}),x(me))};delete re["aria-invalid"];let ue,Pe;const Je=[];let Ve=!1;(Ai({value:se})||p)&&(j?ue=j(se):Ve=!0);const nt=ee.map(me=>{if(!b.isValidElement(me))return null;let Ue;if($){if(!Array.isArray(se))throw new Error(rf(2));Ue=se.some(at=>Ad(at,me.props.value)),Ue&&Ve&&Je.push(me.props.children)}else Ue=Ad(se,me.props.value),Ue&&Ve&&(Pe=me.props.children);return b.cloneElement(me,{"aria-selected":Ue?"true":"false",onClick:be(me),onKeyUp:at=>{at.key===" "&&at.preventDefault(),me.props.onKeyUp&&me.props.onKeyUp(at)},role:"option",selected:Ue,value:void 0,"data-value":me.props.value})});Ve&&($?Je.length===0?ue=null:ue=Je.reduce((me,Ue,at)=>(me.push(Ue),at<Je.length-1&&me.push(", "),me),[]):ue=Pe);let Qe=H;!a&&q&&C&&(Qe=G.clientWidth);let ct;typeof R<"u"?ct=R:ct=d?null:0;const Oe=D.id||(S?`mui-component-select-${S}`:void 0),rt={...t,variant:L,value:se,open:ne,error:m},dt=Hk(rt),Zt={...y.PaperProps,...typeof y.slotProps?.paper=="function"?y.slotProps.paper(rt):y.slotProps?.paper},Ba={...y.MenuListProps,...typeof y.slotProps?.list=="function"?y.slotProps.list(rt):y.slotProps?.list},vr=Lr();return f.jsxs(b.Fragment,{children:[f.jsx(Vk,{as:"div",ref:Y,tabIndex:ct,role:"combobox","aria-controls":ne?vr:void 0,"aria-disabled":d?"true":void 0,"aria-expanded":ne?"true":"false","aria-haspopup":"listbox","aria-label":n,"aria-labelledby":[v,Oe].filter(Boolean).join(" ")||void 0,"aria-describedby":o,"aria-required":A?"true":void 0,"aria-invalid":m?"true":void 0,onKeyDown:_e,onMouseDown:d||z?null:fe,onBlur:Ee,onFocus:_,...D,ownerState:rt,className:ie(D.className,dt.select,l),id:Oe,children:Gk(ue)?zd||(zd=f.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):ue}),f.jsx(Zk,{"aria-invalid":m,value:Array.isArray(se)?se.join(","):se,name:S,ref:Q,"aria-hidden":!0,onChange:he,tabIndex:-1,disabled:d,className:dt.nativeInput,autoFocus:i,required:A,...re,ownerState:rt}),f.jsx(Wk,{as:h,className:dt.icon,ownerState:rt}),f.jsx(_k,{id:`menu-${S||""}`,anchorEl:G,open:ne,onClose:ae,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...y,slotProps:{...y.slotProps,list:{"aria-labelledby":v,role:"listbox","aria-multiselectable":$?"true":void 0,disableListWrap:!0,id:vr,...Ba},paper:{...Zt,style:{minWidth:Qe,...Zt!=null?Zt.style:null}}},children:nt})]})}),qk=e=>{const{classes:t}=e,o=Se({root:["root"]},Zf,t);return{...t,...o}},hl={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>_t(e)&&e!=="variant"},Jk=M(dl,hl)(""),Xk=M(ml,hl)(""),Yk=M(ul,hl)(""),Ur=b.forwardRef(function(t,r){const o=we({name:"MuiSelect",props:t}),{autoWidth:n=!1,children:i,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=eI,id:d,input:p,inputProps:m,label:h,labelId:g,MenuProps:v,multiple:y=!1,native:$=!1,onClose:S,onOpen:x,open:w,renderValue:I,SelectDisplayProps:_,variant:k="outlined",...P}=o,E=$?zk:Kk,T=bn(),z=fr({props:o,muiFormControl:T,states:["variant","error"]}),j=z.variant||k,A={...o,variant:j,classes:a},D=qk(A),{root:R,...U}=D,X=p||{standard:f.jsx(Jk,{ownerState:A}),outlined:f.jsx(Xk,{label:h,ownerState:A}),filled:f.jsx(Yk,{ownerState:A})}[j],L=tt(r,pr(X));return f.jsx(b.Fragment,{children:b.cloneElement(X,{inputComponent:E,inputProps:{children:i,error:z.error,IconComponent:u,variant:j,type:void 0,multiple:y,...$?{id:d}:{autoWidth:n,defaultOpen:l,displayEmpty:c,labelId:g,MenuProps:v,onClose:S,onOpen:x,open:w,renderValue:I,SelectDisplayProps:{id:d,..._}},...m,classes:m?Ys(U,m.classes):U,...p?p.props.inputProps:{}},...(y&&$||c)&&j==="outlined"?{notched:!0}:{},ref:L,className:ie(X.props.className,s,D.root),...!p&&{variant:j},...P})})});Ur.muiName="Select";function Qk(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:r=!1,onClose:o,open:n,resumeHideDuration:i}=e,a=kn();b.useEffect(()=>{if(!n)return;function y($){$.defaultPrevented||$.key==="Escape"&&o?.($,"escapeKeyDown")}return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y)}},[n,o]);const s=Ft((y,$)=>{o?.(y,$)}),l=Ft(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=>$=>{const S=y.onBlur;S?.($),d()},m=y=>$=>{const S=y.onFocus;S?.($),u()},h=y=>$=>{const S=y.onMouseEnter;S?.($),u()},g=y=>$=>{const S=y.onMouseLeave;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 $={...Di(e),...Di(y)};return{role:"presentation",...y,...$,onBlur:p($),onFocus:m($),onMouseEnter:h($),onMouseLeave:g($)}},onClickAway:c}}function e_(e){return xe("MuiSnackbarContent",e)}ve("MuiSnackbarContent",["root","message","action"]);const t_=e=>{const{classes:t}=e;return Se({root:["root"],action:["action"],message:["message"]},e_,t)},n_=M(Pn,{name:"MuiSnackbarContent",slot:"Root"})(ye(({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(Lu(e.palette.background.default,t)),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:Lu(e.palette.background.default,t),display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}}})),r_=M("div",{name:"MuiSnackbarContent",slot:"Message"})({padding:"8px 0"}),o_=M("div",{name:"MuiSnackbarContent",slot:"Action"})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),i_=b.forwardRef(function(t,r){const o=we({props:t,name:"MuiSnackbarContent"}),{action:n,className:i,message:a,role:s="alert",...l}=o,c=o,u=t_(c);return f.jsxs(n_,{role:s,elevation:6,className:ie(u.root,i),ownerState:c,ref:r,...l,children:[f.jsx(r_,{className:u.message,ownerState:c,children:a}),n?f.jsx(o_,{className:u.action,ownerState:c,children:n}):null]})});function a_(e){return xe("MuiSnackbar",e)}ve("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const s_=e=>{const{classes:t,anchorOrigin:r}=e,o={root:["root",`anchorOrigin${F(r.vertical)}${F(r.horizontal)}`]};return Se(o,a_,t)},l_=M("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`anchorOrigin${F(r.anchorOrigin.vertical)}${F(r.anchorOrigin.horizontal)}`]]}})(ye(({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%)"}}}]}))),c_=b.forwardRef(function(t,r){const o=we({props:t,name:"MuiSnackbar"}),n=dr(),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:$,onMouseEnter:S,onMouseLeave:x,open:w,resumeHideDuration:I,slots:_={},slotProps:k={},TransitionComponent:P,transitionDuration:E=i,TransitionProps:{onEnter:T,onExited:z,...j}={},...A}=o,D={...o,anchorOrigin:{vertical:s,horizontal:l},autoHideDuration:c,disableWindowBlurListener:h,TransitionComponent:P,transitionDuration:E},R=s_(D),{getRootProps:U,onClickAway:X}=Qk(D),[L,re]=b.useState(!0),se=Y=>{re(!0),z&&z(Y)},pe=(Y,G)=>{re(!1),T&&T(Y,G)},ce={slots:{transition:P,..._},slotProps:{content:m,clickAwayListener:p,transition:j,...k}},[Ie,Q]=ge("root",{ref:r,className:[R.root,d],elementType:l_,getSlotProps:U,externalForwardedProps:{...ce,...A},ownerState:D}),[V,{ownerState:C,...B}]=ge("clickAwayListener",{elementType:OI,externalForwardedProps:ce,getSlotProps:Y=>({onClickAway:(...G)=>{const W=G[0];Y.onClickAway?.(...G),!W?.defaultMuiPrevented&&X(...G)}}),ownerState:D}),[q,H]=ge("content",{elementType:i_,shouldForwardComponentProp:!0,externalForwardedProps:ce,additionalProps:{message:g,action:a},ownerState:D}),[J,te]=ge("transition",{elementType:$o,externalForwardedProps:ce,getSlotProps:Y=>({onEnter:(...G)=>{Y.onEnter?.(...G),pe(...G)},onExited:(...G)=>{Y.onExited?.(...G),se(...G)}}),additionalProps:{appear:!0,in:w,timeout:E,direction:s==="top"?"down":"up"},ownerState:D});return!w&&L?null:f.jsx(V,{...B,..._.clickAwayListener&&{ownerState:C},children:f.jsx(Ie,{...Q,children:f.jsx(J,{...te,children:u||f.jsx(q,{...H})})})})});function u_(e){return xe("MuiTooltip",e)}const et=ve("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function d_(e){return Math.round(e*1e5)/1e5}const p_=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${F(i.split("-")[0])}`],arrow:["arrow"]};return Se(a,u_,t)},f_=M(Tf,{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]}})(ye(({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"] .${et.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${et.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${et.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${et.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${et.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${et.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${et.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${et.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),m_=M("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${F(r.placement.split("-")[0])}`]]}})(ye(({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,[`.${et.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${et.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${et.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${et.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:`${d_(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${et.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${et.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${et.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${et.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${et.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${et.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${et.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${et.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${et.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${et.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),h_=M("span",{name:"MuiTooltip",slot:"Arrow"})(ye(({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 ii=!1;const Md=new aa;let Xr={x:0,y:0};function ai(e,t){return(r,...o)=>{t&&t(r,...o),e(r,...o)}}const Mi=b.forwardRef(function(t,r){const o=we({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:$,leaveDelay:S=0,leaveTouchDelay:x=1500,onClose:w,onOpen:I,open:_,placement:k="bottom",PopperComponent:P,PopperProps:E={},slotProps:T={},slots:z={},title:j,TransitionComponent:A,TransitionProps:D,...R}=o,U=b.isValidElement(i)?i:f.jsx("span",{children:i}),X=dr(),L=Xs(),[re,se]=b.useState(),[pe,ce]=b.useState(null),Ie=b.useRef(!1),Q=p||y,V=kn(),C=kn(),B=kn(),q=kn(),[H,J]=Oi({controlled:_,default:!1,name:"Tooltip",state:"open"});let te=H;const Y=Lr($),G=b.useRef(),W=Ft(()=>{G.current!==void 0&&(document.body.style.WebkitUserSelect=G.current,G.current=void 0),q.clear()});b.useEffect(()=>W,[W]);const fe=Te=>{Md.clear(),ii=!0,J(!0),I&&!te&&I(Te)},ae=Ft(Te=>{Md.start(800+S,()=>{ii=!1}),J(!1),w&&te&&w(Te),V.start(X.transitions.duration.shortest,()=>{Ie.current=!1})}),ee=Te=>{Ie.current&&Te.type!=="touchstart"||(re&&re.removeAttribute("title"),C.clear(),B.clear(),h||ii&&g?C.start(ii?g:h,()=>{fe(Te)}):fe(Te))},he=Te=>{C.clear(),B.start(S,()=>{ae(Te)})},[,be]=b.useState(!1),_e=Te=>{Ti(Te.target)||(be(!1),he(Te))},ne=Te=>{re||se(Te.currentTarget),Ti(Te.target)&&(be(!0),ee(Te))},Ee=Te=>{Ie.current=!0;const $n=U.props;$n.onTouchStart&&$n.onTouchStart(Te)},ue=Te=>{Ee(Te),B.clear(),V.clear(),W(),G.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",q.start(v,()=>{document.body.style.WebkitUserSelect=G.current,ee(Te)})},Pe=Te=>{U.props.onTouchEnd&&U.props.onTouchEnd(Te),W(),B.start(x,()=>{ae(Te)})};b.useEffect(()=>{if(!te)return;function Te($n){$n.key==="Escape"&&ae($n)}return document.addEventListener("keydown",Te),()=>{document.removeEventListener("keydown",Te)}},[ae,te]);const Je=tt(pr(U),se,r);!j&&j!==0&&(te=!1);const Ve=b.useRef(),nt=Te=>{const $n=U.props;$n.onMouseMove&&$n.onMouseMove(Te),Xr={x:Te.clientX,y:Te.clientY},Ve.current&&Ve.current.update()},Qe={},ct=typeof j=="string";c?(Qe.title=!te&&ct&&!d?j:null,Qe["aria-describedby"]=te?Y:null):(Qe["aria-label"]=ct?j:null,Qe["aria-labelledby"]=te&&!ct?Y:null);const Oe={...Qe,...R,...U.props,className:ie(R.className,U.props.className),onTouchStart:Ee,ref:Je,...y?{onMouseMove:nt}:{}},rt={};m||(Oe.onTouchStart=ue,Oe.onTouchEnd=Pe),d||(Oe.onMouseOver=ai(ee,Oe.onMouseOver),Oe.onMouseLeave=ai(he,Oe.onMouseLeave),Q||(rt.onMouseOver=ee,rt.onMouseLeave=he)),u||(Oe.onFocus=ai(ne,Oe.onFocus),Oe.onBlur=ai(_e,Oe.onBlur),Q||(rt.onFocus=ne,rt.onBlur=_e));const dt={...o,isRtl:L,arrow:n,disableInteractive:Q,placement:k,PopperComponentProp:P,touch:Ie.current},Zt=typeof T.popper=="function"?T.popper(dt):T.popper,Ba=b.useMemo(()=>{let Te=[{name:"arrow",enabled:!!pe,options:{element:pe,padding:4}}];return E.popperOptions?.modifiers&&(Te=Te.concat(E.popperOptions.modifiers)),Zt?.popperOptions?.modifiers&&(Te=Te.concat(Zt.popperOptions.modifiers)),{...E.popperOptions,...Zt?.popperOptions,modifiers:Te}},[pe,E.popperOptions,Zt?.popperOptions]),vr=p_(dt),me=typeof T.transition=="function"?T.transition(dt):T.transition,Ue={slots:{popper:s.Popper,transition:s.Transition??A,tooltip:s.Tooltip,arrow:s.Arrow,...z},slotProps:{arrow:T.arrow??l.arrow,popper:{...E,...Zt??l.popper},tooltip:T.tooltip??l.tooltip,transition:{...D,...me??l.transition}}},[at,Sn]=ge("popper",{elementType:f_,externalForwardedProps:Ue,ownerState:dt,className:ie(vr.popper,E?.className)}),[Qo,px]=ge("transition",{elementType:$o,externalForwardedProps:Ue,ownerState:dt}),[fx,mx]=ge("tooltip",{elementType:m_,className:vr.tooltip,externalForwardedProps:Ue,ownerState:dt}),[hx,gx]=ge("arrow",{elementType:h_,className:vr.arrow,externalForwardedProps:Ue,ownerState:dt,ref:ce});return f.jsxs(b.Fragment,{children:[b.cloneElement(U,Oe),f.jsx(at,{as:P??Tf,placement:k,anchorEl:y?{getBoundingClientRect:()=>({top:Xr.y,left:Xr.x,right:Xr.x,bottom:Xr.y,width:0,height:0})}:re,popperRef:Ve,open:re?te:!1,id:Y,transition:!0,...rt,...Sn,popperOptions:Ba,children:({TransitionProps:Te})=>f.jsx(Qo,{timeout:X.transitions.duration.shorter,...Te,...px,children:f.jsxs(fx,{...mx,children:[j,n?f.jsx(hx,{...gx}):null]})})})]})});function g_(e){return xe("MuiSwitch",e)}const bt=ve("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),v_=e=>{const{classes:t,edge:r,size:o,color:n,checked:i,disabled:a}=e,s={root:["root",r&&`edge${F(r)}`,`size${F(o)}`],switchBase:["switchBase",`color${F(n)}`,i&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=Se(s,g_,t);return{...t,...l}},b_=M("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.edge&&t[`edge${F(r.edge)}`],t[`size${F(r.size)}`]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${bt.thumb}`]:{width:16,height:16},[`& .${bt.switchBase}`]:{padding:4,[`&.${bt.checked}`]:{transform:"translateX(16px)"}}}}]}),y_=M(Af,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.switchBase,{[`& .${bt.input}`]:t.input},r.color!=="default"&&t[`color${F(r.color)}`]]}})(ye(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${bt.checked}`]:{transform:"translateX(20px)"},[`&.${bt.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${bt.checked} + .${bt.track}`]:{opacity:.5},[`&.${bt.disabled} + .${bt.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${bt.input}`]:{left:"-100%",width:"300%"}})),ye(({theme:e})=>({"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(it(["light"])).map(([t])=>({props:{color:t},style:{[`&.${bt.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${bt.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode==="light"?e.lighten(e.palette[t].main,.62):e.darken(e.palette[t].main,.55)}`}},[`&.${bt.checked} + .${bt.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]}))),x_=M("span",{name:"MuiSwitch",slot:"Track"})(ye(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`}))),S_=M("span",{name:"MuiSwitch",slot:"Thumb"})(ye(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),Nd=b.forwardRef(function(t,r){const o=we({props:t,name:"MuiSwitch"}),{className:n,color:i="primary",edge:a=!1,size:s="medium",sx:l,slots:c={},slotProps:u={},...d}=o,p={...o,color:i,edge:a,size:s},m=v_(p),h={slots:c,slotProps:u},[g,v]=ge("root",{className:ie(m.root,n),elementType:b_,externalForwardedProps:h,ownerState:p,additionalProps:{sx:l}}),[y,$]=ge("thumb",{className:m.thumb,elementType:S_,externalForwardedProps:h,ownerState:p}),S=f.jsx(y,{...$}),[x,w]=ge("track",{className:m.track,elementType:x_,externalForwardedProps:h,ownerState:p});return f.jsxs(g,{...v,children:[f.jsx(y_,{type:"checkbox",icon:S,checkedIcon:S,ref:r,ownerState:p,...d,classes:{...m,root:m.switchBase},slots:{...c.switchBase&&{root:c.switchBase},...c.input&&{input:c.input}},slotProps:{...u.switchBase&&{root:typeof u.switchBase=="function"?u.switchBase(p):u.switchBase},input:{role:"switch"},...u.input&&{input:typeof u.input=="function"?u.input(p):u.input}}}),f.jsx(x,{...w})]})});function $_(e){return xe("MuiTextField",e)}ve("MuiTextField",["root"]);const w_={standard:dl,filled:ul,outlined:ml},I_=e=>{const{classes:t}=e;return Se({root:["root"]},$_,t)},k_=M(Ao,{name:"MuiTextField",slot:"Root"})({}),Le=b.forwardRef(function(t,r){const o=we({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:$,inputRef:S,label:x,maxRows:w,minRows:I,multiline:_=!1,name:k,onBlur:P,onChange:E,onFocus:T,placeholder:z,required:j=!1,rows:A,select:D=!1,SelectProps:R,slots:U={},slotProps:X={},type:L,value:re,variant:se="outlined",...pe}=o,ce={...o,autoFocus:i,color:l,disabled:u,error:d,fullWidth:m,multiline:_,required:j,select:D,variant:se},Ie=I_(ce),Q=Lr(g),V=h&&Q?`${Q}-helper-text`:void 0,C=x&&Q?`${Q}-label`:void 0,B=w_[se],q={slots:U,slotProps:{input:$,inputLabel:v,htmlInput:y,formHelperText:p,select:R,...X}},H={},J=q.slotProps.inputLabel;se==="outlined"&&(J&&typeof J.shrink<"u"&&(H.notched=J.shrink),H.label=x),D&&((!R||!R.native)&&(H.id=void 0),H["aria-describedby"]=void 0);const[te,Y]=ge("root",{elementType:k_,shouldForwardComponentProp:!0,externalForwardedProps:{...q,...pe},ownerState:ce,className:ie(Ie.root,s),ref:r,additionalProps:{disabled:u,error:d,fullWidth:m,required:j,color:l,variant:se}}),[G,W]=ge("input",{elementType:B,externalForwardedProps:q,additionalProps:H,ownerState:ce}),[fe,ae]=ge("inputLabel",{elementType:Mo,externalForwardedProps:q,ownerState:ce}),[ee,he]=ge("htmlInput",{elementType:"input",externalForwardedProps:q,ownerState:ce}),[be,_e]=ge("formHelperText",{elementType:ma,externalForwardedProps:q,ownerState:ce}),[ne,Ee]=ge("select",{elementType:Ur,externalForwardedProps:q,ownerState:ce}),ue=f.jsx(G,{"aria-describedby":V,autoComplete:n,autoFocus:i,defaultValue:c,fullWidth:m,multiline:_,name:k,rows:A,maxRows:w,minRows:I,type:L,value:re,id:Q,inputRef:S,onBlur:P,onChange:E,onFocus:T,placeholder:z,inputProps:he,slots:{input:U.htmlInput?ee:void 0},...W});return f.jsxs(te,{...Y,children:[x!=null&&x!==""&&f.jsx(fe,{htmlFor:Q,id:C,...ae,children:x}),D?f.jsx(ne,{"aria-describedby":V,id:Q,labelId:C,value:re,input:ue,...Ee,children:a}):ue,h&&f.jsx(be,{id:V,..._e,children:h})]})});function __(e){return xe("MuiToggleButton",e)}const Jn=ve("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),Gf=b.createContext({}),Hf=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 E_=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${F(i)}`,a]};return Se(s,__,t)},P_=M(or,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`size${F(r.size)}`]]}})(ye(({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,[`&.${Jn.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:{[`&.${Jn.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(it()).map(([t])=>({props:{color:t},style:{[`&.${Jn.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)}}]}))),Fd=b.forwardRef(function(t,r){const{value:o,...n}=b.useContext(Gf),i=b.useContext(Hf),a=of({...n,selected:C_(t.value,o)},t),s=we({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}=s,x={...s,color:u,disabled:d,disableFocusRipple:p,fullWidth:m,size:y},w=E_(x),I=k=>{g&&(g(k,$),k.defaultPrevented)||h&&h(k,$)},_=i||"";return f.jsx(P_,{className:ie(n.className,w.root,c,_),disabled:d,focusRipple:!p,ref:r,onClick:I,onChange:h,value:$,ownerState:x,"aria-pressed":v,...S,children:l})});function O_(e){return xe("MuiToggleButtonGroup",e)}const He=ve("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),j_=e=>{const{classes:t,orientation:r,fullWidth:o,disabled:n}=e,i={root:["root",r,o&&"fullWidth"],grouped:["grouped",`grouped${F(r)}`,n&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return Se(i,O_,t)},D_=M("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${He.grouped}`]:t.grouped},{[`& .${He.grouped}`]:t[`grouped${F(r.orientation)}`]},{[`& .${He.firstButton}`]:t.firstButton},{[`& .${He.lastButton}`]:t.lastButton},{[`& .${He.middleButton}`]:t.middleButton},t.root,r.orientation==="vertical"&&t.vertical,r.fullWidth&&t.fullWidth]}})(ye(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${He.grouped}`]:{[`&.${He.selected} + .${He.grouped}.${He.selected}`]:{borderTop:0,marginTop:0}},[`& .${He.firstButton},& .${He.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${He.lastButton},& .${He.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},[`& .${He.lastButton}.${Jn.disabled},& .${He.middleButton}.${Jn.disabled}`]:{borderTop:"1px solid transparent"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"horizontal"},style:{[`& .${He.grouped}`]:{[`&.${He.selected} + .${He.grouped}.${He.selected}`]:{borderLeft:0,marginLeft:0}},[`& .${He.firstButton},& .${He.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${He.lastButton},& .${He.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},[`& .${He.lastButton}.${Jn.disabled},& .${He.middleButton}.${Jn.disabled}`]:{borderLeft:"1px solid transparent"}}}]}))),T_=b.forwardRef(function(t,r){const o=we({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=j_(g),y=b.useCallback((_,k)=>{if(!u)return;const P=m&&m.indexOf(k);let E;m&&P>=0?(E=m.slice(),E.splice(P,1)):E=m?m.concat(k):[k],u(_,E)},[u,m]),$=b.useCallback((_,k)=>{u&&u(_,m===k?null:k)},[u,m]),S=b.useMemo(()=>({className:v.grouped,onChange:l?$:y,value:m,size:p,fullWidth:c,color:a,disabled:s}),[v.grouped,l,$,y,m,p,c,a,s]),x=hI(n),w=x.length,I=_=>{const k=_===0,P=_===w-1;return k&&P?"":k?v.firstButton:P?v.lastButton:v.middleButton};return f.jsx(D_,{role:"group",className:ie(v.root,i),ref:r,ownerState:g,...h,children:f.jsx(Gf.Provider,{value:S,children:x.map((_,k)=>f.jsx(Hf.Provider,{value:I(k),children:_},k))})})});function vt(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 R_=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ld=R_,Ud=()=>Math.random().toString(36).substring(7).split("").join("."),z_={INIT:`@@redux/INIT${Ud()}`,REPLACE:`@@redux/REPLACE${Ud()}`},Bd=z_;function A_(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 Kf(e,t,r){if(typeof e!="function")throw new Error(vt(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(vt(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(vt(1));return r(Kf)(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(vt(3));return n}function d(v){if(typeof v!="function")throw new Error(vt(4));if(l)throw new Error(vt(5));let y=!0;c();const $=s++;return a.set($,v),function(){if(y){if(l)throw new Error(vt(6));y=!1,c(),a.delete($),i=null}}}function p(v){if(!A_(v))throw new Error(vt(7));if(typeof v.type>"u")throw new Error(vt(8));if(typeof v.type!="string")throw new Error(vt(17));if(l)throw new Error(vt(9));try{l=!0,n=o(n,v)}finally{l=!1}return(i=a).forEach($=>{$()}),v}function m(v){if(typeof v!="function")throw new Error(vt(10));o=v,p({type:Bd.REPLACE})}function h(){const v=d;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(vt(11));function $(){const x=y;x.next&&x.next(u())}return $(),{unsubscribe:v($)}},[Ld](){return this}}}return p({type:Bd.INIT}),{dispatch:p,subscribe:d,getState:u,replaceReducer:m,[Ld]:h}}function Vd(e,t){return function(...r){return t(e.apply(this,r))}}function Wd(e,t){if(typeof e=="function")return Vd(e,t);if(typeof e!="object"||e===null)throw new Error(vt(16));const r={};for(const o in e){const n=e[o];typeof n=="function"&&(r[o]=Vd(n,t))}return r}function qf(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function M_(...e){return t=>(r,o)=>{const n=t(r,o);let i=()=>{throw new Error(vt(15))};const a={getState:n.getState,dispatch:(l,...c)=>i(l,...c)},s=e.map(l=>l(a));return i=qf(...s)(n.dispatch),{...n,dispatch:i}}}var Ja={exports:{}},Xa={};var Zd;function N_(){if(Zd)return Xa;Zd=1;var e=Px();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(w){if(!y){if(y=!0,$=w,w=d(w),p!==void 0&&h.hasValue){var I=h.value;if(p(I,w))return S=I}return S=w}if(I=S,r($,w))return I;var _=d(w);return p!==void 0&&p(I,_)?($=w,I):($=w,S=_)}var y=!1,$,S,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 Gd;function F_(){return Gd||(Gd=1,Ja.exports=N_()),Ja.exports}F_();var L_=b.version.startsWith("19"),U_=Symbol.for(L_?"react.transitional.element":"react.element"),B_=Symbol.for("react.portal"),V_=Symbol.for("react.fragment"),W_=Symbol.for("react.strict_mode"),Z_=Symbol.for("react.profiler"),G_=Symbol.for("react.consumer"),H_=Symbol.for("react.context"),Jf=Symbol.for("react.forward_ref"),K_=Symbol.for("react.suspense"),q_=Symbol.for("react.suspense_list"),gl=Symbol.for("react.memo"),J_=Symbol.for("react.lazy"),X_=Jf,Y_=gl;function Q_(e){if(typeof e=="object"&&e!==null){const{$$typeof:t}=e;switch(t){case U_:switch(e=e.type,e){case V_:case Z_:case W_:case K_:case q_:return e;default:switch(e=e&&e.$$typeof,e){case H_:case Jf:case J_:case gl:return e;case G_:return e;default:return t}}case B_:return t}}}function eC(e){return Q_(e)===gl}function tC(e,t,r,o,{areStatesEqual:n,areOwnPropsEqual:i,areStatePropsEqual:a}){let s=!1,l,c,u,d,p;function m($,S){return l=$,c=S,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 $=e(l,c),S=!a($,u);return u=$,S&&(p=r(u,d,c)),p}function y($,S){const x=!i(S,c),w=!n($,l,S,c);return l=$,c=S,x&&w?h():x?g():w?v():p}return function(S,x){return s?y(S,x):m(S,x)}}function nC(e,{initMapStateToProps:t,initMapDispatchToProps:r,initMergeProps:o,...n}){const i=t(e,n),a=r(e,n),s=o(e,n);return tC(i,a,s,e,n)}function rC(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 _s(e){return function(r){const o=e(r);function n(){return o}return n.dependsOnOwnProps=!1,n}}function Hd(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Xf(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=Hd(e);let c=i(s,l);return typeof c=="function"&&(i.mapToProps=c,i.dependsOnOwnProps=Hd(c),c=i(s,l)),c},i}}function vl(e,t){return(r,o)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${o.wrappedComponentName}.`)}}function oC(e){return e&&typeof e=="object"?_s(t=>rC(e,t)):e?typeof e=="function"?Xf(e):vl(e,"mapDispatchToProps"):_s(t=>({dispatch:t}))}function iC(e){return e?typeof e=="function"?Xf(e):vl(e,"mapStateToProps"):_s(()=>({}))}function aC(e,t,r){return{...r,...e,...t}}function sC(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 lC(e){return e?typeof e=="function"?sC(e):vl(e,"mergeProps"):()=>aC}function cC(e){e()}function uC(){let e=null,t=null;return{clear(){e=null,t=null},notify(){cC(()=>{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 Kd={notify(){},get:()=>[]};function Yf(e,t){let r,o=Kd,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=uC())}function d(){n--,r&&n===0&&(r(),r=void 0,o.clear(),o=Kd)}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 dC=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",pC=dC(),fC=()=>typeof navigator<"u"&&navigator.product==="ReactNative",mC=fC(),hC=()=>pC||mC?b.useLayoutEffect:b.useEffect,Ni=hC();function qd(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Ya(e,t){if(qd(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])||!qd(e[r[n]],t[r[n]]))return!1;return!0}var gC={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},vC={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},bC={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Qf={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},yC={[X_]:bC,[Y_]:Qf};function Jd(e){return eC(e)?Qf:yC[e.$$typeof]||gC}var xC=Object.defineProperty,SC=Object.getOwnPropertyNames,Xd=Object.getOwnPropertySymbols,$C=Object.getOwnPropertyDescriptor,wC=Object.getPrototypeOf,Yd=Object.prototype;function Cs(e,t){if(typeof t!="string"){if(Yd){const i=wC(t);i&&i!==Yd&&Cs(e,i)}let r=SC(t);Xd&&(r=r.concat(Xd(t)));const o=Jd(e),n=Jd(t);for(let i=0;i<r.length;++i){const a=r[i];if(!vC[a]&&!(n&&n[a])&&!(o&&o[a])){const s=$C(t,a);try{xC(e,a,s)}catch{}}}}return e}var IC=Symbol.for("react-redux-context"),kC=typeof globalThis<"u"?globalThis:{};function _C(){if(!b.createContext)return{};const e=kC[IC]??=new Map;let t=e.get(b.createContext);return t||(t=b.createContext(null),e.set(b.createContext,t)),t}var em=_C(),CC=[null,null];function EC(e,t,r){Ni(()=>e(...t),r)}function PC(e,t,r,o,n,i){e.current=o,r.current=!1,n.current&&(n.current=null,i())}function OC(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($){y=$,p=$}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 jC(e,t){return e===t}function DC(e,t,r,{pure:o,areStatesEqual:n=jC,areOwnPropsEqual:i=Ya,areStatePropsEqual:a=Ya,areMergedPropsEqual:s=Ya,forwardRef:l=!1,context:c=em}={}){const u=c,d=iC(e),p=oC(t),m=lC(r),h=!!e;return v=>{const y=v.displayName||v.name||"Component",$=`Connect(${y})`,S={shouldHandleStateChanges:h,displayName:$,wrappedComponentName:y,WrappedComponent:v,initMapStateToProps:d,initMapDispatchToProps:p,initMergeProps:m,areStatesEqual:n,areStatePropsEqual:a,areOwnPropsEqual:i,areMergedPropsEqual:s};function x(_){const[k,P,E]=b.useMemo(()=>{const{reactReduxForwardedRef:te,...Y}=_;return[_.context,te,Y]},[_]),T=b.useMemo(()=>{let te=u;return k?.Consumer,te},[k,u]),z=b.useContext(T),j=!!_.store&&!!_.store.getState&&!!_.store.dispatch,A=!!z&&!!z.store,D=j?_.store:z.store,R=A?z.getServerState:D.getState,U=b.useMemo(()=>nC(D.dispatch,S),[D]),[X,L]=b.useMemo(()=>{if(!h)return CC;const te=Yf(D,j?void 0:z.subscription),Y=te.notifyNestedSubs.bind(te);return[te,Y]},[D,j,z]),re=b.useMemo(()=>j?z:{...z,subscription:X},[j,z,X]),se=b.useRef(void 0),pe=b.useRef(E),ce=b.useRef(void 0),Ie=b.useRef(!1),Q=b.useRef(!1),V=b.useRef(void 0);Ni(()=>(Q.current=!0,()=>{Q.current=!1}),[]);const C=b.useMemo(()=>()=>ce.current&&E===pe.current?ce.current:U(D.getState(),E),[D,E]),B=b.useMemo(()=>Y=>X?OC(h,D,X,U,pe,se,Ie,Q,ce,L,Y):()=>{},[X]);EC(PC,[pe,se,Ie,E,ce,L]);let q;try{q=b.useSyncExternalStore(B,C,R?()=>U(R(),E):C)}catch(te){throw V.current&&(te.message+=`
|
|
104
|
-
The error may be correlated with this previous error:
|
|
105
|
-
${V.current.stack}
|
|
106
|
-
|
|
107
|
-
`),te}Ni(()=>{V.current=void 0,ce.current=void 0,se.current=q});const H=b.useMemo(()=>b.createElement(v,{...q,ref:P}),[P,v,q]);return b.useMemo(()=>h?b.createElement(T.Provider,{value:re},H):H,[T,H,re])}const I=b.memo(x);if(I.WrappedComponent=v,I.displayName=x.displayName=$,l){const k=b.forwardRef(function(E,T){return b.createElement(I,{...E,reactReduxForwardedRef:T})});return k.displayName=$,k.WrappedComponent=v,Cs(k,v)}return Cs(I,v)}}var tm=DC;function TC(e){const{children:t,context:r,serverState:o,store:n}=e,i=b.useMemo(()=>{const l=Yf(n);return{store:n,subscription:l,getServerState:o?()=>o:void 0}},[n,o]),a=b.useMemo(()=>n.getState(),[n]);Ni(()=>{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||em;return b.createElement(s.Provider,{value:i},t)}var RC=TC,Kt=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},bl=function(t,r){return{top:t.top-r.top,left:t.left-r.left,bottom:t.bottom+r.bottom,right:t.right+r.right}},Qd=function(t,r){return{top:t.top+r.top,left:t.left+r.left,bottom:t.bottom-r.bottom,right:t.right-r.right}},zC=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},yl=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=Kt(bl(r,n)),u=Kt(Qd(r,a)),d=Kt(Qd(u,l));return{marginBox:c,borderBox:Kt(r),paddingBox:u,contentBox:d,margin:n,border:a,padding:l}},zt=function(t){var r=t.slice(0,-2),o=t.slice(-2);if(o!=="px")return 0;var n=Number(r);return isNaN(n)&&Ox(!1),n},AC=function(){return{x:window.pageXOffset,y:window.pageYOffset}},Fi=function(t,r){var o=t.borderBox,n=t.border,i=t.margin,a=t.padding,s=zC(o,r);return yl({borderBox:s,border:n,margin:i,padding:a})},Li=function(t,r){return r===void 0&&(r=AC()),Fi(t,r)},nm=function(t,r){var o={top:zt(r.marginTop),right:zt(r.marginRight),bottom:zt(r.marginBottom),left:zt(r.marginLeft)},n={top:zt(r.paddingTop),right:zt(r.paddingRight),bottom:zt(r.paddingBottom),left:zt(r.paddingLeft)},i={top:zt(r.borderTopWidth),right:zt(r.borderRightWidth),bottom:zt(r.borderBottomWidth),left:zt(r.borderLeftWidth)};return yl({borderBox:t,margin:o,padding:n,border:i})},rm=function(t){var r=t.getBoundingClientRect(),o=window.getComputedStyle(t);return nm(r,o)},wo=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 om(e,t){}om.bind(null,"warn");om.bind(null,"error");function _n(){}function MC(e,t){return{...e,...t}}function Nt(e,t,r){const o=t.map(n=>{const i=MC(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 NC="Invariant failed";class Ui extends Error{}Ui.prototype.toString=function(){return this.message};function K(e,t){throw new Ui(NC)}class FC extends Ne.Component{constructor(...t){super(...t),this.callbacks=null,this.unbind=_n,this.onWindowError=r=>{const o=this.getCallbacks();o.isDragging()&&o.tryAbort(),r.error instanceof Ui&&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=Nt(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(t){if(t instanceof Ui){this.setState({});return}throw t}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const LC=`
|
|
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
|
-
`,Bi=e=>e+1,UC=e=>`
|
|
112
|
-
You have lifted an item in position ${Bi(e.source.index)}
|
|
113
|
-
`,im=(e,t)=>{const r=e.droppableId===t.droppableId,o=Bi(e.index),n=Bi(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
|
-
`},am=(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
|
-
`,BC=e=>{const t=e.destination;if(t)return im(e.source,t);const r=e.combine;return r?am(e.draggableId,e.source,r):"You are over an area that cannot be dropped on"},ep=e=>`
|
|
129
|
-
The item has returned to its starting position
|
|
130
|
-
of ${Bi(e.index)}
|
|
131
|
-
`,VC=e=>{if(e.reason==="CANCEL")return`
|
|
132
|
-
Movement cancelled.
|
|
133
|
-
${ep(e.source)}
|
|
134
|
-
`;const t=e.destination,r=e.combine;return t?`
|
|
135
|
-
You have dropped the item.
|
|
136
|
-
${im(e.source,t)}
|
|
137
|
-
`:r?`
|
|
138
|
-
You have dropped the item.
|
|
139
|
-
${am(e.draggableId,e.source,r)}
|
|
140
|
-
`:`
|
|
141
|
-
The item has been dropped while not over a drop area.
|
|
142
|
-
${ep(e.source)}
|
|
143
|
-
`},Ii={dragHandleUsageInstructions:LC,onDragStart:UC,onDragUpdate:BC,onDragEnd:VC};function WC(e,t){return!!(e===t||Number.isNaN(e)&&Number.isNaN(t))}function sm(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!WC(e[r],t[r]))return!1;return!0}function Ae(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&&sm(t,n.current.inputs))?n.current:{inputs:t,result:e()};return b.useEffect(()=>{o.current=!1,n.current=a},[a]),a.result}function le(e,t){return Ae(()=>e,t)}const lt={x:0,y:0},ut=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),Et=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),Cn=(e,t)=>e.x===t.x&&e.y===t.y,Br=e=>({x:e.x!==0?-e.x:0,y:e.y!==0?-e.y:0}),sr=(e,t,r=0)=>e==="x"?{x:t,y:r}:{x:r,y:t},Io=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),tp=(e,t)=>Math.min(...t.map(r=>Io(e,r))),lm=e=>t=>({x:e(t.x),y:e(t.y)});var ZC=(e,t)=>{const r=Kt({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 No=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),np=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}],GC={top:0,right:0,bottom:0,left:0},HC=(e,t)=>t?No(e,t.scroll.diff.displacement):e,KC=(e,t,r)=>r&&r.increasedBy?{...e,[t.end]:e[t.end]+r.increasedBy[t.line]}:e,qC=(e,t)=>t&&t.shouldClipSubject?ZC(t.pageMarginBox,e):Kt(e);var Dr=({page:e,withPlaceholder:t,axis:r,frame:o})=>{const n=HC(e.marginBox,o),i=KC(n,r,t),a=qC(i,o);return{page:e,withPlaceholder:t,active:a}},xl=(e,t)=>{e.frame||K();const r=e.frame,o=Et(t,r.scroll.initial),n=Br(o),i={...r,scroll:{initial:r.scroll.initial,current:t,diff:{value:o,displacement:n},max:r.scroll.max}},a=Dr({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i});return{...e,frame:i,subject:a}};function st(e,t=sm){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 cm=st(e=>e.reduce((t,r)=>(t[r.descriptor.id]=r,t),{})),um=st(e=>e.reduce((t,r)=>(t[r.descriptor.id]=r,t),{})),ha=st(e=>Object.values(e)),JC=st(e=>Object.values(e));var Vr=st((e,t)=>JC(t).filter(o=>e===o.descriptor.droppableId).sort((o,n)=>o.descriptor.index-n.descriptor.index));function Sl(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function ga(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var va=st((e,t)=>t.filter(r=>r.descriptor.id!==e.descriptor.id)),XC=({isMovingForward:e,draggable:t,destination:r,insideDestination:o,previousImpact:n})=>{if(!r.isCombineEnabled||!Sl(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=va(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)},Wr=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const dm={point:lt,value:0},ko={invisible:{},visible:{},all:[]},YC={displaced:ko,displacedBy:dm,at:null};var Ut=(e,t)=>r=>e<=r&&r<=t,pm=e=>{const t=Ut(e.top,e.bottom),r=Ut(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}},QC=e=>{const t=Ut(e.top,e.bottom),r=Ut(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"},fm={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};var e1=e=>t=>{const r=Ut(t.top,t.bottom),o=Ut(t.left,t.right);return n=>e===$l?r(n.top)&&r(n.bottom):o(n.left)&&o(n.right)};const t1=(e,t)=>{const r=t.frame?t.frame.scroll.diff.displacement:lt;return No(e,r)},n1=(e,t,r)=>t.subject.active?r(t.subject.active)(e):!1,r1=(e,t,r)=>r(t)(e),wl=({target:e,destination:t,viewport:r,withDroppableDisplacement:o,isVisibleThroughFrameFn:n})=>{const i=o?t1(e,t):e;return n1(i,t,n)&&r1(i,r,n)},o1=e=>wl({...e,isVisibleThroughFrameFn:pm}),mm=e=>wl({...e,isVisibleThroughFrameFn:QC}),i1=e=>wl({...e,isVisibleThroughFrameFn:e1(e.destination.axis)}),a1=(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 s1(e,t){const r=e.page.marginBox,o={top:t.point.y,right:0,bottom:0,left:t.point.x};return Kt(bl(r,o))}function _o({afterDragging:e,destination:t,displacedBy:r,viewport:o,forceShouldAnimate:n,last:i}){return e.reduce(function(s,l){const c=s1(l,r),u=l.descriptor.id;if(s.all.push(u),!o1({target:c,destination:t,viewport:o,withDroppableDisplacement:!0}))return s.invisible[l.descriptor.id]=!0,s;const p=a1(u,i,n),m={draggableId:u,shouldAnimate:p};return s.visible[u]=m,s},{all:[],visible:{},invisible:{}})}function l1(e,t){if(!e.length)return 0;const r=e[e.length-1].descriptor.index;return t.inHomeList?r:r+1}function rp({insideDestination:e,inHomeList:t,displacedBy:r,destination:o}){const n=l1(e,{inHomeList:t});return{displaced:ko,displacedBy:r,at:{type:"REORDER",destination:{droppableId:o.descriptor.id,index:n}}}}function Vi({draggable:e,insideDestination:t,destination:r,viewport:o,displacedBy:n,last:i,index:a,forceShouldAnimate:s}){const l=Wr(e,r);if(a==null)return rp({insideDestination:t,inHomeList:l,displacedBy:n,destination:r});const c=t.find(h=>h.descriptor.index===a);if(!c)return rp({insideDestination:t,inHomeList:l,displacedBy:n,destination:r});const u=va(e,t),d=t.indexOf(c),p=u.slice(d);return{displaced:_o({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 En(e,t){return!!t.effected[e]}var c1=({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 En(i,n)?e?s:s-1:e?s+1:s},u1=({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},d1=({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=u1({isMovingForward:e,isInHomeList:t,location:c.destination,insideDestination:i});return d==null?null:Vi({draggable:r,insideDestination:i,destination:n,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:d})}const u=c1({isMovingForward:e,destination:n,displaced:a.displaced,draggables:o,combine:c.combine,afterCritical:l});return u==null?null:Vi({draggable:r,insideDestination:i,destination:n,viewport:s,last:a.displaced,displacedBy:a.displacedBy,index:u})},p1=({displaced:e,afterCritical:t,combineWith:r,displacedBy:o})=>{const n=!!(e.visible[r]||e.invisible[r]);return En(r,t)?n?lt:Br(o.point):n?o.point:lt},f1=({afterCritical:e,impact:t,draggables:r})=>{const o=ga(t);o||K();const n=o.draggableId,i=r[n].page.borderBox.center,a=p1({displaced:t.displaced,afterCritical:e,combineWith:n,displacedBy:t.displacedBy});return ut(i,a)};const hm=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,m1=(e,t)=>t.margin[e.end]+t.borderBox[e.size]/2,Il=(e,t,r)=>t[e.crossAxisStart]+r.margin[e.crossAxisStart]+r.borderBox[e.crossAxisSize]/2,op=({axis:e,moveRelativeTo:t,isMoving:r})=>sr(e.line,t.marginBox[e.end]+hm(e,r),Il(e,t.marginBox,r)),ip=({axis:e,moveRelativeTo:t,isMoving:r})=>sr(e.line,t.marginBox[e.start]-m1(e,r),Il(e,t.marginBox,r)),h1=({axis:e,moveInto:t,isMoving:r})=>sr(e.line,t.contentBox[e.start]+hm(e,r),Il(e,t.contentBox,r));var g1=({impact:e,draggable:t,draggables:r,droppable:o,afterCritical:n})=>{const i=Vr(o.descriptor.id,r),a=t.page,s=o.axis;if(!i.length)return h1({axis:s,moveInto:o.page,isMoving:a});const{displaced:l,displacedBy:c}=e,u=l.all[0];if(u){const p=r[u];if(En(u,n))return ip({axis:s,moveRelativeTo:p.page,isMoving:a});const m=Fi(p.page,c.point);return ip({axis:s,moveRelativeTo:m,isMoving:a})}const d=i[i.length-1];if(d.descriptor.id===t.descriptor.id)return a.borderBox.center;if(En(d.descriptor.id,n)){const p=Fi(d.page,Br(n.displacedBy.point));return op({axis:s,moveRelativeTo:p,isMoving:a})}return op({axis:s,moveRelativeTo:d.page,isMoving:a})},Es=(e,t)=>{const r=e.frame;return r?ut(t,r.scroll.diff.displacement):t};const v1=({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"?g1({impact:e,draggable:t,draggables:o,droppable:r,afterCritical:n}):f1({impact:e,draggables:o,afterCritical:n})};var ba=e=>{const t=v1(e),r=e.droppable;return r?Es(r,t):t},gm=(e,t)=>{const r=Et(t,e.scroll.initial),o=Br(r);return{frame:Kt({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 ap(e,t){return e.map(r=>t[r])}function b1(e,t){for(let r=0;r<t.length;r++){const o=t[r].visible[e];if(o)return o}return null}var y1=({impact:e,viewport:t,destination:r,draggables:o,maxScrollChange:n})=>{const i=gm(t,ut(t.scroll.current,n)),a=r.frame?xl(r,ut(r.frame.scroll.current,n)):r,s=e.displaced,l=_o({afterDragging:ap(s.all,o),destination:r,displacedBy:e.displacedBy,viewport:i.frame,last:s,forceShouldAnimate:!1}),c=_o({afterDragging:ap(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=b1(h,p);if(g){d[h]=g;return}u[h]=!0}),{...e,displaced:{all:s.all,invisible:u,visible:d}}},x1=(e,t)=>ut(e.scroll.diff.displacement,t),kl=({pageBorderBoxCenter:e,draggable:t,viewport:r})=>{const o=x1(r,e),n=Et(o,t.page.borderBox.center);return ut(t.client.borderBox.center,n)},vm=({draggable:e,destination:t,newPageBorderBoxCenter:r,viewport:o,withDroppableDisplacement:n,onlyOnMainAxis:i=!1})=>{const a=Et(r,e.page.borderBox.center),l={target:No(e.page.borderBox,a),destination:t,withDroppableDisplacement:n,viewport:o};return i?i1(l):mm(l)},S1=({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=Vr(r.descriptor.id,o),u=Wr(t,r),d=XC({isMovingForward:e,draggable:t,destination:r,insideDestination:c,previousImpact:n})||d1({isMovingForward:e,isInHomeList:u,draggable:t,draggables:o,destination:r,insideDestination:c,previousImpact:n,viewport:i,afterCritical:l});if(!d)return null;const p=ba({impact:d,draggable:t,droppable:r,draggables:o,afterCritical:l});if(vm({draggable:t,destination:r,newPageBorderBoxCenter:p,viewport:i.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:kl({pageBorderBoxCenter:p,draggable:t,viewport:i}),impact:d,scrollJumpRequest:null};const h=Et(p,a),g=y1({impact:d,viewport:i,destination:r,draggables:o,maxScrollChange:h});return{clientSelection:s,impact:g,scrollJumpRequest:h}};const ht=e=>{const t=e.subject.active;return t||K(),t};var $1=({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:o,viewport:n})=>{const i=r.subject.active;if(!i)return null;const a=r.axis,s=Ut(i[a.start],i[a.end]),l=ha(o).filter(u=>u!==r).filter(u=>u.isEnabled).filter(u=>!!u.subject.active).filter(u=>pm(n.frame)(ht(u))).filter(u=>{const d=ht(u);return e?i[a.crossAxisEnd]<d[a.crossAxisEnd]:d[a.crossAxisStart]<i[a.crossAxisStart]}).filter(u=>{const d=ht(u),p=Ut(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=ht(u)[a.crossAxisStart],m=ht(d)[a.crossAxisStart];return e?p-m:m-p}).filter((u,d,p)=>ht(u)[a.crossAxisStart]===ht(p[0])[a.crossAxisStart]);if(!l.length)return null;if(l.length===1)return l[0];const c=l.filter(u=>Ut(ht(u)[a.start],ht(u)[a.end])(t[a.line]));return c.length===1?c[0]:c.length>1?c.sort((u,d)=>ht(u)[a.start]-ht(d)[a.start])[0]:l.sort((u,d)=>{const p=tp(t,np(ht(u))),m=tp(t,np(ht(d)));return p!==m?p-m:ht(u)[a.start]-ht(d)[a.start]})[0]};const sp=(e,t)=>{const r=e.page.borderBox.center;return En(e.descriptor.id,t)?Et(r,t.displacedBy.point):r},w1=(e,t)=>{const r=e.page.borderBox;return En(e.descriptor.id,t)?No(r,Br(t.displacedBy.point)):r};var I1=({pageBorderBoxCenter:e,viewport:t,destination:r,insideDestination:o,afterCritical:n})=>o.filter(a=>mm({target:w1(a,n),destination:r,viewport:t.frame,withDroppableDisplacement:!0})).sort((a,s)=>{const l=Io(e,Es(r,sp(a,n))),c=Io(e,Es(r,sp(s,n)));return l<c?-1:c<l?1:a.descriptor.index-s.descriptor.index})[0]||null,Fo=st(function(t,r){const o=r[t.line];return{value:o,point:sr(t.line,o)}});const k1=(e,t,r)=>{const o=e.axis;if(e.descriptor.mode==="virtual")return sr(o.line,t[o.line]);const n=e.subject.page.contentBox[o.size],l=Vr(e.descriptor.id,r).reduce((c,u)=>c+u.client.marginBox[o.size],0)+t[o.line]-n;return l<=0?null:sr(o.line,l)},bm=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),ym=(e,t,r)=>{const o=e.frame;Wr(t,e)&&K(),e.subject.withPlaceholder&&K();const n=Fo(e.axis,t.displaceBy).point,i=k1(e,n,r),a={placeholderSize:n,increasedBy:i,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!o){const u=Dr({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return{...e,subject:u}}const s=i?ut(o.scroll.max,i):o.scroll.max,l=bm(o,s),c=Dr({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:l});return{...e,subject:c,frame:l}},_1=e=>{const t=e.subject.withPlaceholder;t||K();const r=e.frame;if(!r){const a=Dr({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:a}}const o=t.oldFrameMaxScroll;o||K();const n=bm(r,o),i=Dr({page:e.subject.page,axis:e.axis,frame:n,withPlaceholder:null});return{...e,subject:i,frame:n}};var C1=({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:ko,displacedBy:dm,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:0}}},p=ba({impact:d,draggable:o,droppable:i,draggables:n,afterCritical:s}),m=Wr(o,i)?i:ym(i,o,n);return vm({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=Fo(i.axis,o.displaceBy);return Vi({draggable:o,insideDestination:r,destination:i,viewport:a,displacedBy:u,last:ko,index:c})},E1=({isMovingForward:e,previousPageBorderBoxCenter:t,draggable:r,isOver:o,draggables:n,droppables:i,viewport:a,afterCritical:s})=>{const l=$1({isMovingForward:e,pageBorderBoxCenter:t,source:o,droppables:i,viewport:a});if(!l)return null;const c=Vr(l.descriptor.id,n),u=I1({pageBorderBoxCenter:t,viewport:a,destination:l,insideDestination:c,afterCritical:s}),d=C1({previousPageBorderBoxCenter:t,destination:l,draggable:r,draggables:n,moveRelativeTo:u,insideDestination:c,viewport:a,afterCritical:s});if(!d)return null;const p=ba({impact:d,draggable:r,droppable:l,draggables:n,afterCritical:s});return{clientSelection:kl({pageBorderBoxCenter:p,draggable:r,viewport:a}),impact:d,scrollJumpRequest:null}},Pt=e=>{const t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null};const P1=(e,t)=>{const r=Pt(e);return r?t[r]:null};var O1=({state:e,type:t})=>{const r=P1(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?S1({isMovingForward:l,previousPageBorderBoxCenter:u,draggable:c,destination:i,draggables:d,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,afterCritical:e.afterCritical}):E1({isMovingForward:l,previousPageBorderBoxCenter:u,draggable:c,isOver:i,draggables:d,droppables:p,viewport:e.viewport,afterCritical:e.afterCritical})};function Hn(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function xm(e){const t=Ut(e.top,e.bottom),r=Ut(e.left,e.right);return function(n){return t(n.y)&&r(n.x)}}function j1(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function D1({pageBorderBox:e,draggable:t,candidates:r}){const o=t.page.borderBox.center,n=r.map(i=>{const a=i.axis,s=sr(i.axis.line,e.center[a.line],i.page.borderBox.center[a.crossAxisLine]);return{id:i.descriptor.id,distance:Io(o,s)}}).sort((i,a)=>a.distance-i.distance);return n[0]?n[0].id:null}function T1({pageBorderBox:e,draggable:t,droppables:r}){const o=ha(r).filter(n=>{if(!n.isEnabled)return!1;const i=n.subject.active;if(!i||!j1(e,i))return!1;if(xm(i)(e.center))return!0;const a=n.axis,s=i.center[a.crossAxisLine],l=e[a.crossAxisStart],c=e[a.crossAxisEnd],u=Ut(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:D1({pageBorderBox:e,draggable:t,candidates:o}):null}const Sm=(e,t)=>Kt(No(e,t));var R1=(e,t)=>{const r=e.frame;return r?Sm(t,r.scroll.diff.value):t};function $m({displaced:e,id:t}){return!!(e.visible[t]||e.invisible[t])}function z1({draggable:e,closest:t,inHomeList:r}){return t?r&&t.descriptor.index>e.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}var A1=({pageBorderBoxWithDroppableScroll:e,draggable:t,destination:r,insideDestination:o,last:n,viewport:i,afterCritical:a})=>{const s=r.axis,l=Fo(r.axis,t.displaceBy),c=l.value,u=e[s.start],d=e[s.end],m=va(t,o).find(g=>{const v=g.descriptor.id,y=g.page.borderBox.center[s.line],$=En(v,a),S=$m({displaced:n,id:v});return $?S?d<=y:u<y-c:S?d<=y+c:u<y})||null,h=z1({draggable:t,closest:m,inHomeList:Wr(t,r)});return Vi({draggable:t,insideDestination:o,destination:r,viewport:i,last:n,displacedBy:l,index:h})};const M1=4;var N1=({draggable:e,pageBorderBoxWithDroppableScroll:t,previousImpact:r,destination:o,insideDestination:n,afterCritical:i})=>{if(!o.isCombineEnabled)return null;const a=o.axis,s=Fo(o.axis,e.displaceBy),l=s.value,c=t[a.start],u=t[a.end],p=va(e,n).find(h=>{const g=h.descriptor.id,v=h.page.borderBox,$=v[a.size]/M1,S=En(g,i),x=$m({displaced:r.displaced,id:g});return S?x?u>v[a.start]+$&&u<v[a.end]-$:c>v[a.start]-l+$&&c<v[a.end]-l-$:x?u>v[a.start]+l+$&&u<v[a.end]+l-$:c>v[a.start]+$&&c<v[a.end]-$});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=Sm(t.page.borderBox,e),l=T1({pageBorderBox:s,draggable:t,droppables:o});if(!l)return YC;const c=o[l],u=Vr(c.descriptor.id,r),d=R1(c,s);return N1({pageBorderBoxWithDroppableScroll:d,draggable:t,previousImpact:n,destination:c,insideDestination:u,afterCritical:a})||A1({pageBorderBoxWithDroppableScroll:d,draggable:t,destination:c,insideDestination:u,last:n.displaced,viewport:i,afterCritical:a})},_l=(e,t)=>({...e,[t.descriptor.id]:t});const F1=({previousImpact:e,impact:t,droppables:r})=>{const o=Pt(e),n=Pt(t);if(!o||o===n)return r;const i=r[o];if(!i.subject.withPlaceholder)return r;const a=_1(i);return _l(r,a)};var L1=({draggable:e,draggables:t,droppables:r,previousImpact:o,impact:n})=>{const i=F1({previousImpact:o,impact:n,droppables:r}),a=Pt(n);if(!a)return i;const s=r[a];if(Wr(e,s)||s.subject.withPlaceholder)return i;const l=ym(s,e,t);return _l(i,l)},vo=({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=Et(l,e.initial.client.selection),u={offset:c,selection:l,borderBoxCenter:ut(e.initial.client.borderBoxCenter,c)},d={selection:ut(u.selection,a.scroll.current),borderBoxCenter:ut(u.borderBoxCenter,a.scroll.current),offset:ut(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=L1({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 U1(e,t){return e.map(r=>t[r])}var Im=({impact:e,viewport:t,draggables:r,destination:o,forceShouldAnimate:n})=>{const i=e.displaced,a=U1(i.all,r),s=_o({afterDragging:a,destination:o,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:n,last:i});return{...e,displaced:s}},km=({impact:e,draggable:t,droppable:r,draggables:o,viewport:n,afterCritical:i})=>{const a=ba({impact:e,draggable:t,draggables:o,droppable:r,afterCritical:i});return kl({pageBorderBoxCenter:a,draggable:t,viewport:n})},_m=({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=Pt(o);c||K();const u=s[c],d=Im({impact:o,viewport:n,destination:u,draggables:a}),p=km({impact:d,draggable:l,droppable:u,draggables:a,viewport:n,afterCritical:e.afterCritical});return vo({impact:d,clientSelection:p,state:e,dimensions:i,viewport:n})},B1=e=>({index:e.index,droppableId:e.droppableId}),Cm=({draggable:e,home:t,draggables:r,viewport:o})=>{const n=Fo(t.axis,e.displaceBy),i=Vr(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:_o({afterDragging:s,destination:t,displacedBy:n,last:null,viewport:o.frame,forceShouldAnimate:!1}),displacedBy:n,at:{type:"REORDER",destination:B1(e.descriptor)}},afterCritical:c}},V1=(e,t)=>({draggables:e.draggables,droppables:_l(e.droppables,t)}),W1=({draggable:e,offset:t,initialWindowScroll:r})=>{const o=Fi(e.client,t),n=Li(o,r);return{...e,placeholder:{...e.placeholder,client:o},client:o,page:n}},Z1=e=>{const t=e.frame;return t||K(),t},G1=({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=Z1(a).scroll.diff.value,c=ut(o,l);return W1({draggable:n,offset:c,initialWindowScroll:r.scroll.initial})})},H1=({state:e,published:t})=>{const r=t.modified.map(y=>{const $=e.dimensions.droppables[y.droppableId];return xl($,y.scroll)}),o={...e.dimensions.droppables,...cm(r)},n=um(G1({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=Pt(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}=Cm({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 Ps=e=>e.movementMode==="SNAP",es=(e,t,r)=>{const o=V1(e.dimensions,t);return!Ps(e)||r?vo({state:e,dimensions:o}):_m({state:e,dimensions:o})};function ts(e){return e.isDragging&&e.movementMode==="SNAP"?{...e,scrollJumpRequest:null}:e}const lp={phase:"IDLE",completed:null,shouldFlush:!1};var K1=(e=lp,t)=>{if(t.type==="FLUSH")return{...lp,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:lt},u={client:c,page:{selection:ut(c.selection,n.scroll.initial),borderBoxCenter:ut(c.selection,n.scroll.initial),offset:ut(c.selection,n.scroll.diff.value)}},d=ha(i.droppables).every(g=>!g.isFixedOnPage),{impact:p,afterCritical:m}=Cm({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(),H1({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;Hn(e)||K();const{client:r}=t.payload;return Cn(r,e.current.client.selection)?e:vo({state:e,clientSelection:r,impact:Ps(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return ts(e);Hn(e)||K();const{id:r,newScroll:o}=t.payload,n=e.dimensions.droppables[r];if(!n)return e;const i=xl(n,o);return es(e,i,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;Hn(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;Hn(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;Hn(e)||K(),e.isWindowScrollAllowed||K();const r=t.payload.newScroll;if(Cn(e.viewport.scroll.current,r))return ts(e);const o=gm(e.viewport,r);return Ps(e)?_m({state:e,viewport:o}):vo({state:e,viewport:o})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!Hn(e))return e;const r=t.payload.maxScroll;if(Cn(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=O1({state:e,type:t.type});return r?vo({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 Be(e,t){return e instanceof Object&&"type"in e&&e.type===t}const q1=e=>({type:"BEFORE_INITIAL_CAPTURE",payload:e}),J1=e=>({type:"LIFT",payload:e}),X1=e=>({type:"INITIAL_PUBLISH",payload:e}),Y1=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),Q1=()=>({type:"COLLECTION_STARTING",payload:null}),eE=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),tE=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),nE=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),Em=e=>({type:"MOVE",payload:e}),rE=e=>({type:"MOVE_BY_WINDOW_SCROLL",payload:e}),oE=e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}),iE=()=>({type:"MOVE_UP",payload:null}),aE=()=>({type:"MOVE_DOWN",payload:null}),sE=()=>({type:"MOVE_RIGHT",payload:null}),lE=()=>({type:"MOVE_LEFT",payload:null}),Cl=()=>({type:"FLUSH",payload:null}),cE=e=>({type:"DROP_ANIMATE",payload:e}),El=e=>({type:"DROP_COMPLETE",payload:e}),Pm=e=>({type:"DROP",payload:e}),uE=e=>({type:"DROP_PENDING",payload:e}),Om=()=>({type:"DROP_ANIMATION_FINISHED",payload:null});var dE=e=>({getState:t,dispatch:r})=>o=>n=>{if(!Be(n,"LIFT")){o(n);return}const{id:i,clientSelection:a,movementMode:s}=n.payload,l=t();l.phase==="DROP_ANIMATING"&&r(El({completed:l.completed})),t().phase!=="IDLE"&&K(),r(Cl()),r(q1({draggableId:i,movementMode:s}));const u={draggableId:i,scrollOptions:{shouldPublishImmediately:s==="SNAP"}},{critical:d,dimensions:p,viewport:m}=e.startPublishing(u);r(X1({critical:d,dimensions:p,clientSelection:a,movementMode:s,viewport:m}))},pE=e=>()=>t=>r=>{Be(r,"INITIAL_PUBLISH")&&e.dragging(),Be(r,"DROP_ANIMATE")&&e.dropping(r.payload.completed.result.reason),(Be(r,"FLUSH")||Be(r,"DROP_COMPLETE"))&&e.resting(),t(r)};const Pl={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},Co={opacity:{drop:0,combining:.7},scale:{drop:.75}},jm={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Wn=`${jm.outOfTheWay}s ${Pl.outOfTheWay}`,bo={fluid:`opacity ${Wn}`,snap:`transform ${Wn}, opacity ${Wn}`,drop:e=>{const t=`${e}s ${Pl.drop}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${Wn}`,placeholder:`height ${Wn}, width ${Wn}, margin ${Wn}`},cp=e=>Cn(e,lt)?void 0:`translate(${e.x}px, ${e.y}px)`,Os={moveTo:cp,drop:(e,t)=>{const r=cp(e);if(r)return t?`${r} scale(${Co.scale.drop})`:r}},{minDropTime:js,maxDropTime:Dm}=jm,fE=Dm-js,up=1500,mE=.6;var hE=({current:e,destination:t,reason:r})=>{const o=Io(e,t);if(o<=0)return js;if(o>=up)return Dm;const n=o/up,i=js+fE*n,a=r==="CANCEL"?i*mE:i;return Number(a.toFixed(2))},gE=({impact:e,draggable:t,dimensions:r,viewport:o,afterCritical:n})=>{const{draggables:i,droppables:a}=r,s=Pt(e),l=s?a[s]:null,c=a[t.descriptor.droppableId],u=km({impact:e,draggable:t,draggables:i,afterCritical:n,droppable:l||c,viewport:o});return Et(u,t.client.borderBox.center)},vE=({draggables:e,reason:t,lastImpact:r,home:o,viewport:n,onLiftImpact:i})=>!r.at||t!=="DROP"?{impact:Im({draggables:e,impact:i,destination:o,viewport:n,forceShouldAnimate:!0}),didDropInsideDroppable:!1}:r.at.type==="REORDER"?{impact:r,didDropInsideDroppable:!0}:{impact:{...r,displaced:ko},didDropInsideDroppable:!0};const bE=({getState:e,dispatch:t})=>r=>o=>{if(!Be(o,"DROP")){r(o);return}const n=e(),i=o.payload.reason;if(n.phase==="COLLECTING"){t(uE({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}=vE({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?Sl(u):null,m=d?ga(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=gE({impact:u,draggable:c,dimensions:l,viewport:n.viewport,afterCritical:n.afterCritical}),y={critical:n.critical,afterCritical:n.afterCritical,result:g,impact:u};if(!(!Cn(n.current.client.offset,v)||!!g.combine)){t(El({completed:y}));return}const S=hE({current:n.current.client.offset,destination:v,reason:i});t(cE({newHomeClientOffset:v,dropDuration:S,completed:y}))};var Tm=()=>({x:window.pageXOffset,y:window.pageYOffset});function yE(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}function xE({onWindowScroll:e}){function t(){e(Tm())}const r=wo(t),o=yE(r);let n=_n;function i(){return n!==_n}function a(){i()&&K(),n=Nt(window,[o])}function s(){i()||K(),r.cancel(),n(),n=_n}return{start:a,stop:s,isActive:i}}const SE=e=>Be(e,"DROP_COMPLETE")||Be(e,"DROP_ANIMATE")||Be(e,"FLUSH"),$E=e=>{const t=xE({onWindowScroll:r=>{e.dispatch(rE({newScroll:r}))}});return r=>o=>{!t.isActive()&&Be(o,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&SE(o)&&t.stop(),r(o)}};var wE=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},IE=()=>{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 kE=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.droppableId===t.droppableId&&e.index===t.index,_E=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.draggableId===t.draggableId&&e.droppableId===t.droppableId,CE=(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},Yr=(e,t)=>{t()},si=(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=wE(r);e(t,{announce:n}),n.wasCalled()||r(o(t))}var EE=(e,t)=>{const r=IE();let o=null;const n=(d,p)=>{o&&K(),Yr("onBeforeCapture",()=>{const m=e().onBeforeCapture;m&&m({draggableId:d,mode:p})})},i=(d,p)=>{o&&K(),Yr("onBeforeDragStart",()=>{const m=e().onBeforeDragStart;m&&m(si(d,p))})},a=(d,p)=>{o&&K();const m=si(d,p);o={mode:p,lastCritical:d,lastLocation:m.source,lastCombine:null},r.add(()=>{Yr("onDragStart",()=>ns(e().onDragStart,m,t,Ii.onDragStart))})},s=(d,p)=>{const m=Sl(p),h=ga(p);o||K();const g=!CE(d,o.lastCritical);g&&(o.lastCritical=d);const v=!kE(o.lastLocation,m);v&&(o.lastLocation=m);const y=!_E(o.lastCombine,h);if(y&&(o.lastCombine=h),!g&&!v&&!y)return;const $={...si(d,o.mode),combine:h,destination:m};r.add(()=>{Yr("onDragUpdate",()=>ns(e().onDragUpdate,$,t,Ii.onDragUpdate))})},l=()=>{o||K(),r.flush()},c=d=>{o||K(),o=null,Yr("onDragEnd",()=>ns(e().onDragEnd,d,t,Ii.onDragEnd))};return{beforeCapture:n,beforeStart:i,start:a,update:s,flush:l,drop:c,abort:()=>{if(!o)return;const d={...si(o.lastCritical,o.mode),combine:null,destination:null,reason:"CANCEL"};c(d)}}},PE=(e,t)=>{const r=EE(e,t);return o=>n=>i=>{if(Be(i,"BEFORE_INITIAL_CAPTURE")){r.beforeCapture(i.payload.draggableId,i.payload.movementMode);return}if(Be(i,"INITIAL_PUBLISH")){const s=i.payload.critical;r.beforeStart(s,i.payload.movementMode),n(i),r.start(s,i.payload.movementMode);return}if(Be(i,"DROP_COMPLETE")){const s=i.payload.completed.result;r.flush(),n(i),r.drop(s);return}if(n(i),Be(i,"FLUSH")){r.abort();return}const a=o.getState();a.phase==="DRAGGING"&&r.update(a.critical,a.impact)}};const OE=e=>t=>r=>{if(!Be(r,"DROP_ANIMATION_FINISHED")){t(r);return}const o=e.getState();o.phase!=="DROP_ANIMATING"&&K(),e.dispatch(El({completed:o.completed}))},jE=e=>{let t=null,r=null;function o(){r&&(cancelAnimationFrame(r),r=null),t&&(t(),t=null)}return n=>i=>{if((Be(i,"FLUSH")||Be(i,"DROP_COMPLETE")||Be(i,"DROP_ANIMATION_FINISHED"))&&o(),n(i),!Be(i,"DROP_ANIMATE"))return;const a={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){e.getState().phase==="DROP_ANIMATING"&&e.dispatch(Om())}};r=requestAnimationFrame(()=>{r=null,t=Nt(window,[a])})}};var DE=e=>()=>t=>r=>{(Be(r,"DROP_COMPLETE")||Be(r,"FLUSH")||Be(r,"DROP_ANIMATE"))&&e.stopPublishing(),t(r)},TE=e=>{let t=!1;return()=>r=>o=>{if(Be(o,"INITIAL_PUBLISH")){t=!0,e.tryRecordFocus(o.payload.critical.draggable.id),r(o),e.tryRestoreFocusRecorded();return}if(r(o),!!t){if(Be(o,"FLUSH")){t=!1,e.tryRestoreFocusRecorded();return}if(Be(o,"DROP_COMPLETE")){t=!1;const n=o.payload.completed.result;n.combine&&e.tryShiftRecord(n.draggableId,n.combine.draggableId),e.tryRestoreFocusRecorded()}}}};const RE=e=>Be(e,"DROP_COMPLETE")||Be(e,"DROP_ANIMATE")||Be(e,"FLUSH");var zE=e=>t=>r=>o=>{if(RE(o)){e.stop(),r(o);return}if(Be(o,"INITIAL_PUBLISH")){r(o);const n=t.getState();n.phase!=="DRAGGING"&&K(),e.start(n);return}r(o),e.scroll(t.getState())};const AE=e=>t=>r=>{if(t(r),!Be(r,"PUBLISH_WHILE_DRAGGING"))return;const o=e.getState();o.phase==="DROP_PENDING"&&(o.isWaiting||e.dispatch(Pm({reason:o.reason})))},ME=qf;var NE=({dimensionMarshal:e,focusMarshal:t,styleMarshal:r,getResponders:o,announce:n,autoScroller:i})=>Kf(K1,ME(M_(pE(r),DE(e),dE(e),bE,OE,jE,AE,zE(i),$E,TE(t),PE(o,n))));const rs=()=>({additions:{},removals:{},modified:{}});function FE({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(lt)).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 Rm=({scrollHeight:e,scrollWidth:t,height:r,width:o})=>{const n=Et({x:t,y:e},{x:o,y:r});return{x:Math.max(0,n.x),y:Math.max(0,n.y)}},zm=()=>{const e=document.documentElement;return e||K(),e},Am=()=>{const e=zm();return Rm({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},LE=()=>{const e=Tm(),t=Am(),r=e.y,o=e.x,n=zm(),i=n.clientWidth,a=n.clientHeight,s=o+i,l=r+a;return{frame:Kt({top:r,left:o,right:s,bottom:l}),scroll:{initial:e,current:e,max:t,diff:{value:lt,displacement:lt}}}},UE=({critical:e,scrollOptions:t,registry:r})=>{const o=LE(),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:um(s),droppables:cm(a)},critical:e,viewport:o}};function dp(e,t,r){return!(r.descriptor.id===t.id||r.descriptor.type!==t.type||e.droppable.getById(r.descriptor.droppableId).descriptor.mode!=="virtual")}var BE=(e,t)=>{let r=null;const o=FE({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"&&dp(e,m,p.value)&&o.add(p.value),p.type==="REMOVAL"&&dp(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},UE({critical:g,registry:e,scrollOptions:p.scrollOptions})},stopPublishing:l}},Mm=(e,t)=>e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP",VE=e=>{window.scrollBy(e.x,e.y)};const WE=st(e=>ha(e).filter(t=>!(!t.isEnabled||!t.frame))),ZE=(e,t)=>WE(t).find(o=>(o.frame||K(),xm(o.frame.pageMarginBox)(e)))||null;var GE=({center:e,destination:t,droppables:r})=>{if(t){const n=r[t];return n.frame?n:null}return ZE(e,r)};const Eo={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var HE=(e,t,r=()=>Eo)=>{const o=r(),n=e[t.size]*o.startFromPercentage,i=e[t.size]*o.maxScrollAtPercentage;return{startScrollingFrom:n,maxScrollValueAt:i}},Nm=({startOfRange:e,endOfRange:t,current:r})=>{const o=t-e;return o===0?0:(r-e)/o},Ol=1,KE=(e,t,r=()=>Eo)=>{const o=r();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return o.maxPixelScroll;if(e===t.startScrollingFrom)return Ol;const i=1-Nm({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),a=o.maxPixelScroll*o.ease(i);return Math.ceil(a)},qE=(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 Ol;const u=Nm({startOfRange:n,endOfRange:s,current:c}),d=e*o.ease(u);return Math.ceil(d)},pp=({distanceToEdge:e,thresholds:t,dragStartTime:r,shouldUseTimeDampening:o,getAutoScrollerOptions:n})=>{const i=KE(e,t,n);return i===0?0:o?Math.max(qE(i,r,n),Ol):i},fp=({container:e,distanceToEdges:t,dragStartTime:r,axis:o,shouldUseTimeDampening:n,getAutoScrollerOptions:i})=>{const a=HE(e,o,i);return t[o.end]<t[o.start]?pp({distanceToEdge:t[o.end],thresholds:a,dragStartTime:r,shouldUseTimeDampening:n,getAutoScrollerOptions:i}):-1*pp({distanceToEdge:t[o.start],thresholds:a,dragStartTime:r,shouldUseTimeDampening:n,getAutoScrollerOptions:i})},JE=({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 XE=lm(e=>e===0?0:e);var Fm=({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=fp({container:t,distanceToEdges:a,dragStartTime:e,axis:$l,shouldUseTimeDampening:n,getAutoScrollerOptions:i}),l=fp({container:t,distanceToEdges:a,dragStartTime:e,axis:fm,shouldUseTimeDampening:n,getAutoScrollerOptions:i}),c=XE({x:l,y:s});if(Cn(c,lt))return null;const u=JE({container:t,subject:r,proposedScroll:c});return u?Cn(u,lt)?null:u:null};const YE=lm(e=>e===0?0:e>0?1:-1),jl=(()=>{const e=(t,r)=>t<0?t:t>r?t-r:0;return({current:t,max:r,change:o})=>{const n=ut(t,o),i={x:e(n.x,r.x),y:e(n.y,r.y)};return Cn(i,lt)?null:i}})(),Lm=({max:e,current:t,change:r})=>{const o={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},n=YE(r),i=jl({max:o,current:t,change:n});return!i||n.x!==0&&i.x===0||n.y!==0&&i.y===0},Dl=(e,t)=>Lm({current:e.scroll.current,max:e.scroll.max,change:t}),QE=(e,t)=>{if(!Dl(e,t))return null;const r=e.scroll.max,o=e.scroll.current;return jl({current:o,max:r,change:t})},Tl=(e,t)=>{const r=e.frame;return r?Lm({current:r.scroll.current,max:r.scroll.max,change:t}):!1},eP=(e,t)=>{const r=e.frame;return!r||!Tl(e,t)?null:jl({current:r.scroll.current,max:r.scroll.max,change:t})};var tP=({viewport:e,subject:t,center:r,dragStartTime:o,shouldUseTimeDampening:n,getAutoScrollerOptions:i})=>{const a=Fm({dragStartTime:o,container:e.frame,subject:t,center:r,shouldUseTimeDampening:n,getAutoScrollerOptions:i});return a&&Dl(e,a)?a:null},nP=({droppable:e,subject:t,center:r,dragStartTime:o,shouldUseTimeDampening:n,getAutoScrollerOptions:i})=>{const a=e.frame;if(!a)return null;const s=Fm({dragStartTime:o,container:a.pageMarginBox,subject:t,center:r,shouldUseTimeDampening:n,getAutoScrollerOptions:i});return s&&Tl(e,s)?s:null},mp=({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=tP({dragStartTime:t,viewport:d,subject:l,center:a,shouldUseTimeDampening:r,getAutoScrollerOptions:i});if(p){o(p);return}}const c=GE({center:a,destination:Pt(e.impact),droppables:e.dimensions.droppables});if(!c)return;const u=nP({dragStartTime:t,droppable:c,subject:l,center:a,shouldUseTimeDampening:r,getAutoScrollerOptions:i});u&&n(c.descriptor.id,u)},rP=({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:r=()=>Eo})=>{const o=wo(e),n=wo(t);let i=null;const a=c=>{i||K();const{shouldUseTimeDampening:u,dragStartTime:d}=i;mp({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};mp({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}},oP=({move:e,scrollDroppable:t,scrollWindow:r})=>{const o=(s,l)=>{const c=ut(s.current.client.selection,l);e({client:c})},n=(s,l)=>{if(!Tl(s,l))return l;const c=eP(s,l);if(!c)return t(s.descriptor.id,l),null;const u=Et(l,c);return t(s.descriptor.id,u),Et(l,u)},i=(s,l,c)=>{if(!s||!Dl(l,c))return c;const u=QE(l,c);if(!u)return r(c),null;const d=Et(c,u);return r(d),Et(c,d)};return s=>{const l=s.scrollJumpRequest;if(!l)return;const c=Pt(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)}},iP=({scrollDroppable:e,scrollWindow:t,move:r,getAutoScrollerOptions:o})=>{const n=rP({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:o}),i=oP({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 Tr="data-rfd",Rr=(()=>{const e=`${Tr}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),Ds=(()=>{const e=`${Tr}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),aP=(()=>{const e=`${Tr}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),hp={contextId:`${Tr}-scroll-container-context-id`},sP=e=>t=>`[${t}="${e}"]`,Qr=(e,t)=>e.map(r=>{const o=r.styles[t];return o?`${r.selector} { ${o} }`:""}).join(" "),lP="pointer-events: none;";var cP=e=>{const t=sP(e),r=(()=>{const s=`
|
|
144
|
-
cursor: -webkit-grab;
|
|
145
|
-
cursor: grab;
|
|
146
|
-
`;return{selector:t(Rr.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:lP,dropAnimating:s}}})(),o=(()=>{const s=`
|
|
151
|
-
transition: ${bo.outOfTheWay};
|
|
152
|
-
`;return{selector:t(Ds.contextId),styles:{dragging:s,dropAnimating:s,userCancel:s}}})(),n={selector:t(aP.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:Qr(a,"always"),resting:Qr(a,"resting"),dragging:Qr(a,"dragging"),dropAnimating:Qr(a,"dropAnimating"),userCancel:Qr(a,"userCancel")}};const Ot=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},gp=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function uP(e,t){const r=Ae(()=>cP(e),[e]),o=b.useRef(null),n=b.useRef(null),i=le(st(d=>{const p=n.current;p||K(),p.textContent=d}),[]),a=le(d=>{const p=o.current;p||K(),p.textContent=d},[]);Ot(()=>{!o.current&&!n.current||K();const d=gp(t),p=gp(t);return o.current=d,n.current=p,d.setAttribute(`${Tr}-always`,e),p.setAttribute(`${Tr}-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=le(()=>i(r.dragging),[i,r.dragging]),l=le(d=>{if(d==="DROP"){i(r.dropAnimating);return}i(r.userCancel)},[i,r.dropAnimating,r.userCancel]),c=le(()=>{n.current&&i(r.resting)},[i,r.resting]);return Ae(()=>({dragging:s,dropping:l,resting:c}),[s,l,c])}function Um(e,t){return Array.from(e.querySelectorAll(t))}var Bm=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function ya(e){return e instanceof Bm(e).HTMLElement}function dP(e,t){const r=`[${Rr.contextId}="${e}"]`,o=Um(document,r);if(!o.length)return null;const n=o.find(i=>i.getAttribute(Rr.draggableId)===t);return!n||!ya(n)?null:n}function pP(e){const t=b.useRef({}),r=b.useRef(null),o=b.useRef(null),n=b.useRef(!1),i=le(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=le(function(p){const m=dP(e,p);m&&m!==document.activeElement&&m.focus()},[e]),s=le(function(p,m){r.current===p&&(r.current=m)},[]),l=le(function(){o.current||n.current&&(o.current=requestAnimationFrame(()=>{o.current=null;const p=r.current;p&&a(p)}))},[a]),c=le(function(p){r.current=null;const m=document.activeElement;m&&m.getAttribute(Rr.draggableId)===p&&(r.current=p)},[]);return Ot(()=>(n.current=!0,function(){n.current=!1;const p=o.current;p&&cancelAnimationFrame(p)}),[]),Ae(()=>({register:i,tryRecordFocus:c,tryRestoreFocusRecorded:l,tryShiftRecord:s}),[i,c,l,s])}function fP(){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 mP(){const e=Ae(fP,[]);return b.useEffect(()=>function(){e.clean()},[e]),e}var Rl=Ne.createContext(null),Wi=()=>{const e=document.body;return e||K(),e};const hP={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},gP=e=>`rfd-announcement-${e}`;function vP(e){const t=Ae(()=>gP(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"),qs(i.style,hP),Wi().appendChild(i),function(){setTimeout(function(){const l=Wi();l.contains(i)&&l.removeChild(i),i===r.current&&(r.current=null)})}},[t]),le(n=>{const i=r.current;if(i){i.textContent=n;return}},[])}const bP={separator:"::"};function zl(e,t=bP){const r=Ne.useId();return Ae(()=>`${e}${t.separator}${r}`,[t.separator,e,r])}function yP({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}function xP({contextId:e,text:t}){const r=zl("hidden-text",{separator:"-"}),o=Ae(()=>yP({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",Wi().appendChild(i),function(){const s=Wi();s.contains(i)&&s.removeChild(i)}},[o,t]),o}var xa=Ne.createContext(null);function Vm(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),t}function SP(){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 Po(e){return e.phase==="IDLE"||e.phase==="DROP_ANIMATING"?!1:e.isDragging}const $P=9,wP=13,Al=27,Wm=32,IP=33,kP=34,_P=35,CP=36,EP=37,PP=38,OP=39,jP=40,DP={[wP]:!0,[$P]:!0};var Zm=e=>{DP[e.keyCode]&&e.preventDefault()};const Sa=(()=>{const e="visibilitychange";return typeof document>"u"?e:[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(o=>`on${o}`in document)||e})(),Gm=0,vp=5;function TP(e,t){return Math.abs(t.x-e.x)>=vp||Math.abs(t.y-e.y)>=vp}const bp={type:"IDLE"};function RP({cancel:e,completed:t,getPhase:r,setPhase:o}){return[{eventName:"mousemove",fn:n=>{const{button:i,clientX:a,clientY:s}=n;if(i!==Gm)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(!TP(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===Al){n.preventDefault(),e();return}Zm(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:Sa,fn:e}]}function zP(e){const t=b.useRef(bp),r=b.useRef(_n),o=Ae(()=>({eventName:"mousedown",fn:function(d){if(d.defaultPrevented||d.button!==Gm||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=Ae(()=>({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=le(function(){const d={passive:!1,capture:!0};r.current=Nt(window,[n,o],d)},[n,o]),a=le(()=>{t.current.type!=="IDLE"&&(t.current=bp,r.current(),i())},[i]),s=le(()=>{const u=t.current;a(),u.type==="DRAGGING"&&u.actions.cancel({shouldBlockNextClick:!0}),u.type==="PENDING"&&u.actions.abort()},[a]),l=le(function(){const d={capture:!0,passive:!1},p=RP({cancel:s,completed:a,getPhase:()=>t.current,setPhase:m=>{t.current=m}});r.current=Nt(window,p,d)},[s,a]),c=le(function(d,p){t.current.type!=="IDLE"&&K(),t.current={type:"PENDING",point:p,actions:d},l()},[l]);Ot(function(){return i(),function(){r.current()}},[i])}function AP(){}const MP={[kP]:!0,[IP]:!0,[CP]:!0,[_P]:!0};function NP(e,t){function r(){t(),e.cancel()}function o(){t(),e.drop()}return[{eventName:"keydown",fn:n=>{if(n.keyCode===Al){n.preventDefault(),r();return}if(n.keyCode===Wm){n.preventDefault(),o();return}if(n.keyCode===jP){n.preventDefault(),e.moveDown();return}if(n.keyCode===PP){n.preventDefault(),e.moveUp();return}if(n.keyCode===OP){n.preventDefault(),e.moveRight();return}if(n.keyCode===EP){n.preventDefault(),e.moveLeft();return}if(MP[n.keyCode]){n.preventDefault();return}Zm(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:Sa,fn:r}]}function FP(e){const t=b.useRef(AP),r=Ae(()=>({eventName:"keydown",fn:function(i){if(i.defaultPrevented||i.keyCode!==Wm)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=Nt(window,NP(c,u),{capture:!0,passive:!1})}}),[e]),o=le(function(){const i={passive:!1,capture:!0};t.current=Nt(window,[r],i)},[r]);Ot(function(){return o(),function(){t.current()}},[o])}const is={type:"IDLE"},LP=120,UP=.15;function BP({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===Al&&r.preventDefault(),e()}},{eventName:Sa,fn:e}]}function VP({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>=UP))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:Sa,fn:e}]}function WP(e){const t=b.useRef(is),r=b.useRef(_n),o=le(function(){return t.current},[]),n=le(function(m){t.current=m},[]),i=Ae(()=>({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:$}=v,S={x:y,y:$};r.current(),d(g,S)}}),[e]),a=le(function(){const m={capture:!0,passive:!1};r.current=Nt(window,[i],m)},[i]),s=le(()=>{const p=t.current;p.type!=="IDLE"&&(p.type==="PENDING"&&clearTimeout(p.longPressTimerId),n(is),r.current(),a())},[a,n]),l=le(()=>{const p=t.current;s(),p.type==="DRAGGING"&&p.actions.cancel({shouldBlockNextClick:!0}),p.type==="PENDING"&&p.actions.abort()},[s]),c=le(function(){const m={capture:!0,passive:!1},h={cancel:l,completed:s,getPhase:o},g=Nt(window,VP(h),m),v=Nt(window,BP(h),m);r.current=function(){g(),v()}},[l,o,s]),u=le(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=le(function(m,h){o().type!=="IDLE"&&K();const g=setTimeout(u,LP);n({type:"PENDING",point:h,actions:m,longPressTimerId:g}),c()},[c,o,n,u]);Ot(function(){return a(),function(){r.current();const h=o();h.type==="PENDING"&&(clearTimeout(h.longPressTimerId),n(is))}},[o,a,n]),Ot(function(){return Nt(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}const ZP=["input","button","textarea","select","option","optgroup","video","audio"];function Hm(e,t){if(t==null)return!1;if(ZP.includes(t.tagName.toLowerCase()))return!0;const o=t.getAttribute("contenteditable");return o==="true"||o===""?!0:t===e?!1:Hm(e,t.parentElement)}function GP(e,t){const r=t.target;return ya(r)?Hm(e,r):!1}var HP=e=>Kt(e.getBoundingClientRect()).center;function KP(e){return e instanceof Bm(e).Element}const qP=(()=>{const e="matches";return typeof document>"u"?e:[e,"msMatchesSelector","webkitMatchesSelector"].find(o=>o in Element.prototype)||e})();function Km(e,t){return e==null?null:e[qP](t)?e:Km(e.parentElement,t)}function JP(e,t){return e.closest?e.closest(t):Km(e,t)}function XP(e){return`[${Rr.contextId}="${e}"]`}function YP(e,t){const r=t.target;if(!KP(r))return null;const o=XP(e),n=JP(r,o);return!n||!ya(n)?null:n}function QP(e,t){const r=YP(e,t);return r?r.getAttribute(Rr.draggableId):null}function eO(e,t){const r=`[${Ds.contextId}="${e}"]`,n=Um(document,r).find(i=>i.getAttribute(Ds.id)===t);return!n||!ya(n)?null:n}function tO(e){e.preventDefault()}function li({expected:e,phase:t,isLockActive:r,shouldWarn:o}){return!(!r()||e!==t)}function qm({lockAPI:e,store:t,registry:r,draggableId:o}){if(e.isClaimed())return!1;const n=r.draggable.findById(o);return!(!n||!n.options.isEnabled||!Mm(t.getState(),o))}function nO({lockAPI:e,contextId:t,store:r,registry:o,draggableId:n,forceSensorStop:i,sourceEvent:a}){if(!qm({lockAPI:e,store:r,registry:o,draggableId:n}))return null;const l=o.draggable.getById(n),c=eO(t,l.descriptor.id);if(!c||a&&!l.options.canDragInteractiveElements&&GP(c,a))return null;const u=e.claim(i||_n);let d="PRE_DRAG";function p(){return l.options.shouldRespectForcePress}function m(){return e.isActive(u)}function h(w,I){li({expected:w,phase:d,isLockActive:m,shouldWarn:!0})&&r.dispatch(I())}const g=h.bind(null,"DRAGGING");function v(w){function I(){e.release(),d="COMPLETED"}d!=="PRE_DRAG"&&(I(),K()),r.dispatch(J1(w.liftActionArgs)),d="DRAGGING";function _(k,P={shouldBlockNextClick:!1}){if(w.cleanup(),P.shouldBlockNextClick){const E=Nt(window,[{eventName:"click",fn:tO,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(E)}I(),r.dispatch(Pm({reason:k}))}return{isActive:()=>li({expected:"DRAGGING",phase:d,isLockActive:m,shouldWarn:!1}),shouldRespectForcePress:p,drop:k=>_("DROP",k),cancel:k=>_("CANCEL",k),...w.actions}}function y(w){const I=wo(k=>{g(()=>Em({client:k}))});return{...v({liftActionArgs:{id:n,clientSelection:w,movementMode:"FLUID"},cleanup:()=>I.cancel(),actions:{move:I}}),move:I}}function $(){const w={moveUp:()=>g(iE),moveRight:()=>g(sE),moveDown:()=>g(aE),moveLeft:()=>g(lE)};return v({liftActionArgs:{id:n,clientSelection:HP(c),movementMode:"SNAP"},cleanup:_n,actions:w})}function S(){li({expected:"PRE_DRAG",phase:d,isLockActive:m,shouldWarn:!0})&&e.release()}return{isActive:()=>li({expected:"PRE_DRAG",phase:d,isLockActive:m,shouldWarn:!1}),shouldRespectForcePress:p,fluidLift:y,snapLift:$,abort:S}}const rO=[zP,FP,WP];function oO({contextId:e,store:t,registry:r,customSensors:o,enableDefaultSensors:n}){const i=[...n?rO:[],...o||[]],a=b.useState(()=>SP())[0],s=le(function(v,y){Po(v)&&!Po(y)&&a.tryAbandon()},[a]);Ot(function(){let v=t.getState();return t.subscribe(()=>{const $=t.getState();s(v,$),v=$})},[a,t,s]),Ot(()=>a.tryAbandon,[a.tryAbandon]);const l=le(g=>qm({lockAPI:a,registry:r,store:t,draggableId:g}),[a,r,t]),c=le((g,v,y)=>nO({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=le(g=>QP(e,g),[e]),d=le(g=>{const v=r.draggable.findById(g);return v?v.options:null},[r.draggable]),p=le(function(){a.isClaimed()&&(a.tryAbandon(),t.getState().phase!=="IDLE"&&t.dispatch(Cl()))},[a,t]),m=le(()=>a.isClaimed(),[a]),h=Ae(()=>({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 iO=e=>({onBeforeCapture:t=>{const r=()=>{e.onBeforeCapture&&e.onBeforeCapture(t)};Js.flushSync(r)},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}),aO=e=>({...Eo,...e.autoScrollerOptions,durationDampening:{...Eo.durationDampening,...e.autoScrollerOptions}});function eo(e){return e.current||K(),e.current}function sO(e){const{contextId:t,setCallbacks:r,sensors:o,nonce:n,dragHandleUsageInstructions:i}=e,a=b.useRef(null),s=Vm(e),l=le(()=>iO(s.current),[s]),c=le(()=>aO(s.current),[s]),u=vP(t),d=xP({contextId:t,text:i}),p=uP(t,n),m=le(E=>{eo(a).dispatch(E)},[]),h=Ae(()=>Wd({publishWhileDragging:Y1,updateDroppableScroll:eE,updateDroppableIsEnabled:tE,updateDroppableIsCombineEnabled:nE,collectionStarting:Q1},m),[m]),g=mP(),v=Ae(()=>BE(g,h),[g,h]),y=Ae(()=>iP({scrollWindow:VE,scrollDroppable:v.scrollDroppable,getAutoScrollerOptions:c,...Wd({move:Em},m)}),[v.scrollDroppable,m,c]),$=pP(t),S=Ae(()=>NE({announce:u,autoScroller:y,dimensionMarshal:v,focusMarshal:$,getResponders:l,styleMarshal:p}),[u,y,v,$,l,p]);a.current=S;const x=le(()=>{const E=eo(a);E.getState().phase!=="IDLE"&&E.dispatch(Cl())},[]),w=le(()=>{const E=eo(a).getState();return E.phase==="DROP_ANIMATING"?!0:E.phase==="IDLE"?!1:E.isDragging},[]),I=Ae(()=>({isDragging:w,tryAbort:x}),[w,x]);r(I);const _=le(E=>Mm(eo(a).getState(),E),[]),k=le(()=>Hn(eo(a).getState()),[]),P=Ae(()=>({marshal:v,focus:$,contextId:t,canLift:_,isMovementAllowed:k,dragHandleUsageInstructionsId:d,registry:g}),[t,v,d,$,_,k,g]);return oO({contextId:t,store:S,registry:g,customSensors:o||null,enableDefaultSensors:e.enableDefaultSensors!==!1}),b.useEffect(()=>x,[x]),Ne.createElement(xa.Provider,{value:P},Ne.createElement(RC,{context:Rl,store:S},e.children))}function lO(){return Ne.useId()}function Jm(e){const t=lO(),r=e.dragHandleUsageInstructions||Ii.dragHandleUsageInstructions;return Ne.createElement(FC,null,o=>Ne.createElement(sO,{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 yp={dragging:5e3,dropAnimating:4500},cO=(e,t)=>t?bo.drop(t.duration):e?bo.snap:bo.fluid,uO=(e,t)=>{if(e)return t?Co.opacity.drop:Co.opacity.combining},dO=e=>e.forceShouldAnimate!=null?e.forceShouldAnimate:e.mode==="SNAP";function pO(e){const r=e.dimension.client,{offset:o,combineWith:n,dropping:i}=e,a=!!n,s=dO(e),l=!!i,c=l?Os.drop(o,a):Os.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:cO(s,i),transform:c,opacity:uO(a,l),zIndex:l?yp.dropAnimating:yp.dragging,pointerEvents:"none"}}function fO(e){return{transform:Os.moveTo(e.offset),transition:e.shouldAnimateDisplacement?void 0:"none"}}function mO(e){return e.type==="DRAGGING"?pO(e):fO(e)}function hO(e,t,r=lt){const o=window.getComputedStyle(t),n=t.getBoundingClientRect(),i=nm(n,o),a=Li(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 gO(e){const t=zl("draggable"),{descriptor:r,registry:o,getDraggableRef:n,canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}=e,l=Ae(()=>({canDragInteractiveElements:i,shouldRespectForcePress:a,isEnabled:s}),[i,s,a]),c=le(m=>{const h=n();return h||K(),hO(r,h,m)},[r,n]),u=Ae(()=>({uniqueId:t,descriptor:r,options:l,getDimension:c}),[r,c,l,t]),d=b.useRef(u),p=b.useRef(!0);Ot(()=>(o.draggable.register(d.current),()=>o.draggable.unregister(d.current)),[o.draggable]),Ot(()=>{if(p.current){p.current=!1;return}const m=d.current;d.current=u,o.draggable.update(u,m)},[u,o.draggable])}var Ml=Ne.createContext(null);function Zi(e){const t=b.useContext(e);return t||K(),t}function vO(e){e.preventDefault()}const bO=e=>{const t=b.useRef(null),r=le((I=null)=>{t.current=I},[]),o=le(()=>t.current,[]),{contextId:n,dragHandleUsageInstructionsId:i,registry:a}=Zi(xa),{type:s,droppableId:l}=Zi(Ml),c=Ae(()=>({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=Ae(()=>({descriptor:c,registry:a,getDraggableRef:o,canDragInteractiveElements:h,shouldRespectForcePress:m,isEnabled:p}),[c,a,o,h,m,p]);gO(I)}const $=Ae(()=>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:vO}:null,[n,i,d,p]),S=le(I=>{v.type==="DRAGGING"&&v.dropping&&I.propertyName==="transform"&&Js.flushSync(y)},[y,v]),x=Ae(()=>{const I=mO(v),_=v.type==="DRAGGING"&&v.dropping?S:void 0;return{innerRef:r,draggableProps:{"data-rfd-draggable-context-id":n,"data-rfd-draggable-id":d,style:I,onTransitionEnd:_},dragHandleProps:$}},[n,$,d,v,S,r]),w=Ae(()=>({draggableId:c.id,type:c.type,source:{index:c.index,droppableId:c.droppableId}}),[c.droppableId,c.id,c.index,c.type]);return Ne.createElement(Ne.Fragment,null,u(x,v.snapshot,w))};var Xm=(e,t)=>e===t,Ym=e=>{const{combine:t,destination:r}=e;return r?r.droppableId:t?t.droppableId:null};const yO=e=>e.combine?e.combine.draggableId:null,xO=e=>e.at&&e.at.type==="COMBINE"?e.at.combine.draggableId:null;function SO(){const e=st((n,i)=>({x:n,y:i})),t=st((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=st((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(Po(n)){if(n.critical.draggable.id!==i.draggableId)return null;const a=n.current.client.offset,s=n.dimensions.draggables[i.draggableId],l=Pt(n.impact),c=xO(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=Ym(c),p=yO(c),h={duration:n.dropDuration,curve:Pl.drop,moveTo:n.newHomeClientOffset,opacity:p?Co.opacity.drop:null,scale:p?Co.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 Qm(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:lt,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Qm(null)}};function wO(){const e=st((a,s)=>({x:a,y:s})),t=st(Qm),r=st((a,s=null,l)=>({mapped:{type:"SECONDARY",offset:a,combineTargetFor:s,shouldAnimateDisplacement:l,snapshot:t(s)}})),o=a=>a?r(lt,a,!0):null,n=(a,s,l,c)=>{const u=l.displaced.visible[a],d=!!(c.inVirtualList&&c.effected[a]),p=ga(l),m=p&&p.draggableId===a?s:null;if(!u){if(!d)return o(m);if(l.displaced.invisible[a])return null;const v=Br(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(Po(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 IO=()=>{const e=SO(),t=wO();return(o,n)=>e(o,n)||t(o,n)||$O},kO={dropAnimationFinished:Om},_O=tm(IO,kO,null,{context:Rl,areStatePropsEqual:Xm})(bO);function eh(e){return Zi(Ml).isUsingCloneFor===e.draggableId&&!e.isClone?null:Ne.createElement(_O,e)}function Nl(e){const t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,r=!!e.disableInteractiveElementBlocking,o=!!e.shouldRespectForcePress;return Ne.createElement(eh,qs({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:r,shouldRespectForcePress:o}))}const th=e=>t=>e===t,CO=th("scroll"),EO=th("auto"),xp=(e,t)=>t(e.overflowX)||t(e.overflowY),PO=e=>{const t=window.getComputedStyle(e),r={overflowX:t.overflowX,overflowY:t.overflowY};return xp(r,CO)||xp(r,EO)},OO=()=>!1,nh=e=>e==null?null:e===document.body?OO()?e:null:e===document.documentElement?null:PO(e)?e:nh(e.parentElement);var Ts=e=>({x:e.scrollLeft,y:e.scrollTop});const rh=e=>e?window.getComputedStyle(e).position==="fixed"?!0:rh(e.parentElement):!1;var jO=e=>{const t=nh(e),r=rh(e);return{closestScrollable:t,isFixedOnPage:r}},DO=({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=Rm({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:lt,displacement:lt}}}})(),c=n==="vertical"?$l:fm,u=Dr({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 TO=(e,t)=>{const r=rm(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=bl({top:o,right:a,bottom:i,left:n},r.border);return yl({borderBox:l,margin:r.margin,border:r.border,padding:r.padding})};var RO=({ref:e,descriptor:t,env:r,windowScroll:o,direction:n,isDropDisabled:i,isCombineEnabled:a,shouldClipSubject:s})=>{const l=r.closestScrollable,c=TO(e,l),u=Li(c,o),d=(()=>{if(!l)return null;const m=rm(l),h={scrollHeight:l.scrollHeight,scrollWidth:l.scrollWidth};return{client:m,page:Li(m,o),scroll:Ts(l),scrollSize:h,shouldClipSubject:s}})();return DO({descriptor:t,isEnabled:!i,isCombineEnabled:a,isFixedOnPage:r.isFixedOnPage,direction:n,client:c,page:u,closest:d})};const zO={passive:!1},AO={passive:!0};var Sp=e=>e.shouldPublishImmediately?zO:AO;const ci=e=>e&&e.env.closestScrollable||null;function MO(e){const t=b.useRef(null),r=Zi(xa),o=zl("droppable"),{registry:n,marshal:i}=r,a=Vm(e),s=Ae(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),l=b.useRef(s),c=Ae(()=>st((x,w)=>{t.current||K();const I={x,y:w};i.updateDroppableScroll(s.id,I)}),[s.id,i]),u=le(()=>{const x=t.current;return!x||!x.env.closestScrollable?lt:Ts(x.env.closestScrollable)},[]),d=le(()=>{const x=u();c(x.x,x.y)},[u,c]),p=Ae(()=>wo(d),[d]),m=le(()=>{const x=t.current,w=ci(x);if(x&&w||K(),x.scrollOptions.shouldPublishImmediately){d();return}p()},[p,d]),h=le((x,w)=>{t.current&&K();const I=a.current,_=I.getDroppableRef();_||K();const k=jO(_),P={ref:_,descriptor:s,env:k,scrollOptions:w};t.current=P;const E=RO({ref:_,descriptor:s,env:k,windowScroll:x,direction:I.direction,isDropDisabled:I.isDropDisabled,isCombineEnabled:I.isCombineEnabled,shouldClipSubject:!I.ignoreContainerClipping}),T=k.closestScrollable;return T&&(T.setAttribute(hp.contextId,r.contextId),T.addEventListener("scroll",m,Sp(P.scrollOptions))),E},[r.contextId,s,m,a]),g=le(()=>{const x=t.current,w=ci(x);return x&&w||K(),Ts(w)},[]),v=le(()=>{const x=t.current;x||K();const w=ci(x);t.current=null,w&&(p.cancel(),w.removeAttribute(hp.contextId),w.removeEventListener("scroll",m,Sp(x.scrollOptions)))},[m,p]),y=le(x=>{const w=t.current;w||K();const I=ci(w);I||K(),I.scrollTop+=x.y,I.scrollLeft+=x.x},[]),$=Ae(()=>({getDimensionAndWatchScroll:h,getScrollWhileDragging:g,dragStopped:v,scroll:y}),[v,h,g,y]),S=Ae(()=>({uniqueId:o,descriptor:s,callbacks:$}),[$,s,o]);Ot(()=>(l.current=S.descriptor,n.droppable.register(S),()=>{t.current&&v(),n.droppable.unregister(S)}),[$,s,v,S,i,n.droppable]),Ot(()=>{t.current&&i.updateDroppableIsEnabled(l.current.id,!e.isDropDisabled)},[e.isDropDisabled,i]),Ot(()=>{t.current&&i.updateDroppableIsCombineEnabled(l.current.id,e.isCombineEnabled)},[e.isCombineEnabled,i])}function as(){}const $p={width:0,height:0,margin:GC},NO=({isAnimatingOpenOnMount:e,placeholder:t,animate:r})=>e||r==="close"?$p:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin},FO=({isAnimatingOpenOnMount:e,placeholder:t,animate:r})=>{const o=NO({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"?bo.placeholder:null}},LO=e=>{const t=b.useRef(null),r=le(()=>{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=le(d=>{d.propertyName==="height"&&(n(),o==="close"&&i())},[o,i,n]),u=FO({isAnimatingOpenOnMount:s,animate:e.animate,placeholder:e.placeholder});return Ne.createElement(e.placeholder.tagName,{style:u,"data-rfd-placeholder-context-id":a,onTransitionEnd:c,ref:e.innerRef})};var UO=Ne.memo(LO);class BO extends Ne.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 VO=e=>{const t=b.useContext(xa);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,$=le(()=>n.current,[]),S=le((T=null)=>{n.current=T},[]);le(()=>i.current,[]);const x=le((T=null)=>{i.current=T},[]),w=le(()=>{o()&&v({maxScroll:Am()})},[o,v]);MO({droppableId:s,type:l,mode:c,direction:u,isDropDisabled:p,isCombineEnabled:m,ignoreContainerClipping:d,getDroppableRef:$});const I=Ae(()=>Ne.createElement(BO,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:T,data:z,animate:j})=>Ne.createElement(UO,{placeholder:z,onClose:T,innerRef:x,animate:j,contextId:r,onTransitionEnd:w})),[r,w,e.placeholder,e.shouldAnimatePlaceholder,x]),_=Ae(()=>({innerRef:S,placeholder:I,droppableProps:{"data-rfd-droppable-id":s,"data-rfd-droppable-context-id":r}}),[r,s,I,S]),k=g?g.dragging.draggableId:null,P=Ae(()=>({droppableId:s,type:l,isUsingCloneFor:k}),[s,k,l]);function E(){if(!g)return null;const{dragging:T,render:z}=g,j=Ne.createElement(eh,{draggableId:T.draggableId,index:T.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(A,D)=>z(A,D,T));return oo.createPortal(j,y())}return Ne.createElement(Ml.Provider,{value:P},a(_,h),E())};function WO(){return document.body||K(),document.body}const wp={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:WO},oh=e=>{let t={...e},r;for(r in wp)e[r]===void 0&&(t={...t,[r]:wp[r]});return t},ss=(e,t)=>e===t.droppable.type,Ip=(e,t)=>t.draggables[e.draggable.id],ZO=()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},r=st(i=>({draggableId:i.id,type:i.type,source:{index:i.index,droppableId:i.droppableId}})),o=st((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=oh(a),l=s.droppableId,c=s.type,u=!s.isDropDisabled,d=s.renderClone;if(Po(i)){const p=i.critical;if(!ss(c,p))return t;const m=Ip(p,i.dimensions),h=Pt(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=Ip(p.critical,i.dimensions);return o(l,u,Ym(p.result)===l,Pt(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=Pt(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}},GO={updateViewportMaxScroll:oE},Gi=tm(ZO,GO,(e,t,r)=>({...oh(r),...e,...t}),{context:Rl,areStatePropsEqual:Xm})(VO),ih=Object.freeze({status:"aborted"});function O(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 ah=Symbol("zod_brand");class nr 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 Hi={};function xt(e){return e&&Object.assign(Hi,e),Hi}function HO(e){return e}function KO(e){return e}function qO(e){}function JO(e){throw new Error}function XO(e){}function Fl(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 Z(e,t="|"){return e.map(r=>$e(r)).join(t)}function Ki(e,t){return typeof t=="bigint"?t.toString():t}function Lo(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function mr(e){return e==null}function wa(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function sh(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 kp=Symbol("evaluating");function ze(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==kp)return o===void 0&&(o=kp,o=r()),o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function YO(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function jn(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function yn(...e){const t={};for(const r of e){const o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o)}return Object.defineProperties({},t)}function QO(e){return yn(e._zod.def)}function ej(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function tj(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 nj(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 Rs(e){return JSON.stringify(e)}function lh(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Ll="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function zr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const ch=Lo(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function lr(e){if(zr(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(zr(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Ia(e){return lr(e)?{...e}:Array.isArray(e)?[...e]:e}function rj(e){let t=0;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}const oj=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}`)}},qi=new Set(["string","number","symbol"]),uh=new Set(["string","number","bigint","boolean","symbol","undefined"]);function vn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Wt(e,t,r){const o=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(o._zod.parent=e),o}function N(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 ij(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 dh(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const ph={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]},fh={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function mh(e,t){const r=e._zod.def,o=yn(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 jn(this,"shape",n),n},checks:[]});return Wt(e,o)}function hh(e,t){const r=e._zod.def,o=yn(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 jn(this,"shape",n),n},checks:[]});return Wt(e,o)}function gh(e,t){if(!lr(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=yn(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return jn(this,"shape",i),i},checks:[]});return Wt(e,n)}function vh(e,t){if(!lr(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 jn(this,"shape",o),o},checks:e._zod.def.checks};return Wt(e,r)}function bh(e,t){const r=yn(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t._zod.def.shape};return jn(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return Wt(e,r)}function yh(e,t,r){const o=yn(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 jn(this,"shape",i),i},checks:[]});return Wt(t,o)}function xh(e,t,r){const o=yn(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 jn(this,"shape",i),i},checks:[]});return Wt(t,o)}function Xn(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 qt(e,t){return t.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function lo(e){return typeof e=="string"?e:e?.message}function Yt(e,t,r){const o={...e,path:e.path??[]};if(!e.message){const n=lo(e.inst?._zod.def?.error?.(e))??lo(t?.error?.(e))??lo(r.customError?.(e))??lo(r.localeError?.(e))??"Invalid input";o.message=n}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function ka(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function _a(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ar(...e){const[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function aj(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Sh(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 $h(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function sj(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Sh(t+r)}function lj(e){return $h(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function cj(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 uj(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}class dj{constructor(...t){}}const wh=Object.freeze(Object.defineProperty({__proto__:null,BIGINT_FORMAT_RANGES:fh,Class:dj,NUMBER_FORMAT_RANGES:ph,aborted:Xn,allowsEval:ch,assert:XO,assertEqual:HO,assertIs:qO,assertNever:JO,assertNotEqual:KO,assignProp:jn,base64ToUint8Array:Sh,base64urlToUint8Array:sj,cached:Lo,captureStackTrace:Ll,cleanEnum:aj,cleanRegex:wa,clone:Wt,cloneDef:QO,createTransparentProxy:ij,defineLazy:ze,esc:Rs,escapeRegex:vn,extend:gh,finalizeIssue:Yt,floatSafeRemainder:sh,getElementAtPath:ej,getEnumValues:Fl,getLengthableOrigin:_a,getParsedType:oj,getSizableOrigin:ka,hexToUint8Array:cj,isObject:zr,isPlainObject:lr,issue:Ar,joinValues:Z,jsonStringifyReplacer:Ki,merge:bh,mergeDefs:yn,normalizeParams:N,nullish:mr,numKeys:rj,objectClone:YO,omit:hh,optionalKeys:dh,partial:yh,pick:mh,prefixIssues:qt,primitiveTypes:uh,promiseAllObject:tj,propertyKeyTypes:qi,randomString:nj,required:xh,safeExtend:vh,shallowClone:Ia,slugify:lh,stringifyPrimitive:$e,uint8ArrayToBase64:$h,uint8ArrayToBase64url:lj,uint8ArrayToHex:uj,unwrapMessage:lo},Symbol.toStringTag,{value:"Module"})),Ih=(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,Ki,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ul=O("$ZodError",Ih),Tt=O("$ZodError",Ih,{Parent:Error});function Bl(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 Vl(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 kh(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 _h(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 Ch(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 ${_h(o.path)}`);return t.join(`
|
|
161
|
-
`)}const Uo=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 nr;if(a.issues.length){const s=new(n?.Err??e)(a.issues.map(l=>Yt(l,i,xt())));throw Ll(s,n?.callee),s}return a.value},zs=Uo(Tt),Bo=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=>Yt(l,i,xt())));throw Ll(s,n?.callee),s}return a.value},As=Bo(Tt),Vo=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 nr;return i.issues.length?{success:!1,error:new(e??Ul)(i.issues.map(a=>Yt(a,n,xt())))}:{success:!0,data:i.value}},Eh=Vo(Tt),Wo=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=>Yt(a,n,xt())))}:{success:!0,data:i.value}},Ph=Wo(Tt),Wl=e=>(t,r,o)=>{const n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Uo(e)(t,r,n)},pj=Wl(Tt),Zl=e=>(t,r,o)=>Uo(e)(t,r,o),fj=Zl(Tt),Gl=e=>async(t,r,o)=>{const n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Bo(e)(t,r,n)},mj=Gl(Tt),Hl=e=>async(t,r,o)=>Bo(e)(t,r,o),hj=Hl(Tt),Kl=e=>(t,r,o)=>{const n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Vo(e)(t,r,n)},gj=Kl(Tt),ql=e=>(t,r,o)=>Vo(e)(t,r,o),vj=ql(Tt),Jl=e=>async(t,r,o)=>{const n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Wo(e)(t,r,n)},bj=Jl(Tt),Xl=e=>async(t,r,o)=>Wo(e)(t,r,o),yj=Xl(Tt),Oh=/^[cC][^\s-]{8,}$/,jh=/^[0-9a-z]+$/,Dh=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Th=/^[0-9a-vA-V]{20}$/,Rh=/^[A-Za-z0-9]{27}$/,zh=/^[a-zA-Z0-9_-]{21}$/,Ah=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,xj=/^[-+]?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)?)??$/,Mh=/^([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})$/,Mr=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)$/,Sj=Mr(4),$j=Mr(6),wj=Mr(7),Nh=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ij=/^[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])?)*$/,kj=/^(([^<>()\[\]\\.,;:\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,}))$/,Fh=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,_j=Fh,Cj=/^[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])?)*$/,Ej="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Lh(){return new RegExp(Ej,"u")}const Uh=/^(?:(?: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])$/,Bh=/^(([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}|:))$/,Vh=e=>{const t=vn(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Wh=/^((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])$/,Zh=/^(([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])$/,Gh=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Yl=/^[A-Za-z0-9_-]*$/,Hh=/^(?=.{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])?)*\.?$/,Kh=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,qh=/^\+(?:[0-9]){6,14}[0-9]$/,Jh="(?:(?:\\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])))",Xh=new RegExp(`^${Jh}$`);function Yh(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 Qh(e){return new RegExp(`^${Yh(e)}$`)}function eg(e){const t=Yh({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(`^${Jh}T(?:${o})$`)}const tg=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},ng=/^-?\d+n?$/,rg=/^-?\d+$/,og=/^-?\d+(?:\.\d+)?/,ig=/^(?:true|false)$/i,ag=/^null$/i,sg=/^undefined$/i,lg=/^[^A-Z]*$/,cg=/^[^a-z]*$/,ug=/^[0-9a-fA-F]*$/;function Zo(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Go(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const Pj=/^[0-9a-fA-F]{32}$/,Oj=Zo(22,"=="),jj=Go(22),Dj=/^[0-9a-fA-F]{40}$/,Tj=Zo(27,"="),Rj=Go(27),zj=/^[0-9a-fA-F]{64}$/,Aj=Zo(43,"="),Mj=Go(43),Nj=/^[0-9a-fA-F]{96}$/,Fj=Zo(64,""),Lj=Go(64),Uj=/^[0-9a-fA-F]{128}$/,Bj=Zo(86,"=="),Vj=Go(86),Ql=Object.freeze(Object.defineProperty({__proto__:null,base64:Gh,base64url:Yl,bigint:ng,boolean:ig,browserEmail:Cj,cidrv4:Wh,cidrv6:Zh,cuid:Oh,cuid2:jh,date:Xh,datetime:eg,domain:Kh,duration:Ah,e164:qh,email:Nh,emoji:Lh,extendedDuration:xj,guid:Mh,hex:ug,hostname:Hh,html5Email:Ij,idnEmail:_j,integer:rg,ipv4:Uh,ipv6:Bh,ksuid:Rh,lowercase:lg,mac:Vh,md5_base64:Oj,md5_base64url:jj,md5_hex:Pj,nanoid:zh,null:ag,number:og,rfc5322Email:kj,sha1_base64:Tj,sha1_base64url:Rj,sha1_hex:Dj,sha256_base64:Aj,sha256_base64url:Mj,sha256_hex:zj,sha384_base64:Fj,sha384_base64url:Lj,sha384_hex:Nj,sha512_base64:Bj,sha512_base64url:Vj,sha512_hex:Uj,string:tg,time:Qh,ulid:Dh,undefined:sg,unicodeEmail:Fh,uppercase:cg,uuid:Mr,uuid4:Sj,uuid6:$j,uuid7:wj,xid:Th},Symbol.toStringTag,{value:"Module"})),qe=O("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),dg={number:"number",bigint:"bigint",object:"date"},ec=O("$ZodCheckLessThan",(e,t)=>{qe.init(e,t);const r=dg[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})}}),tc=O("$ZodCheckGreaterThan",(e,t)=>{qe.init(e,t);const r=dg[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})}}),pg=O("$ZodCheckMultipleOf",(e,t)=>{qe.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):sh(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})}}),fg=O("$ZodCheckNumberFormat",(e,t)=>{qe.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),o=r?"int":"number",[n,i]=ph[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=rg)}),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})}}),mg=O("$ZodCheckBigIntFormat",(e,t)=>{qe.init(e,t);const[r,o]=fh[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})}}),hg=O("$ZodCheckMaxSize",(e,t)=>{var r;qe.init(e,t),(r=e._zod.def).when??(r.when=o=>{const n=o.value;return!mr(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:ka(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),gg=O("$ZodCheckMinSize",(e,t)=>{var r;qe.init(e,t),(r=e._zod.def).when??(r.when=o=>{const n=o.value;return!mr(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:ka(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),vg=O("$ZodCheckSizeEquals",(e,t)=>{var r;qe.init(e,t),(r=e._zod.def).when??(r.when=o=>{const n=o.value;return!mr(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:ka(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})}}),bg=O("$ZodCheckMaxLength",(e,t)=>{var r;qe.init(e,t),(r=e._zod.def).when??(r.when=o=>{const n=o.value;return!mr(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=_a(n);o.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),yg=O("$ZodCheckMinLength",(e,t)=>{var r;qe.init(e,t),(r=e._zod.def).when??(r.when=o=>{const n=o.value;return!mr(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=_a(n);o.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),xg=O("$ZodCheckLengthEquals",(e,t)=>{var r;qe.init(e,t),(r=e._zod.def).when??(r.when=o=>{const n=o.value;return!mr(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=_a(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})}}),Ho=O("$ZodCheckStringFormat",(e,t)=>{var r,o;qe.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=()=>{})}),Sg=O("$ZodCheckRegex",(e,t)=>{Ho.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})}}),$g=O("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=lg),Ho.init(e,t)}),wg=O("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=cg),Ho.init(e,t)}),Ig=O("$ZodCheckIncludes",(e,t)=>{qe.init(e,t);const r=vn(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})}}),kg=O("$ZodCheckStartsWith",(e,t)=>{qe.init(e,t);const r=new RegExp(`^${vn(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})}}),_g=O("$ZodCheckEndsWith",(e,t)=>{qe.init(e,t);const r=new RegExp(`.*${vn(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 _p(e,t,r){e.issues.length&&t.issues.push(...qt(r,e.issues))}const Cg=O("$ZodCheckProperty",(e,t)=>{qe.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=>_p(n,r,t.property));_p(o,r,t.property)}}),Eg=O("$ZodCheckMimeType",(e,t)=>{qe.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})}}),Pg=O("$ZodCheckOverwrite",(e,t)=>{qe.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class Og{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 jg={major:4,minor:1,patch:13},ke=O("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=jg;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=Xn(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 nr;if(u||m instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await m,a.issues.length!==p&&(c||(c=Xn(a,p)))});else{if(a.issues.length===p)continue;c||(c=Xn(a,p))}}return u?u.then(()=>a):a},i=(a,s,l)=>{if(Xn(a))return a.aborted=!0,a;const c=n(s,o,l);if(c instanceof Promise){if(l.async===!1)throw new nr;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 nr;return l.then(c=>n(c,o,s))}return n(l,o,s)}}e["~standard"]={validate:n=>{try{const i=Eh(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Ph(e,n).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}}),Ko=O("$ZodString",(e,t)=>{ke.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??tg(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}}),We=O("$ZodStringFormat",(e,t)=>{Ho.init(e,t),Ko.init(e,t)}),Dg=O("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Mh),We.init(e,t)}),Tg=O("$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=Mr(o))}else t.pattern??(t.pattern=Mr());We.init(e,t)}),Rg=O("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Nh),We.init(e,t)}),zg=O("$ZodURL",(e,t)=>{We.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})}}}),Ag=O("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Lh()),We.init(e,t)}),Mg=O("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=zh),We.init(e,t)}),Ng=O("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Oh),We.init(e,t)}),Fg=O("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=jh),We.init(e,t)}),Lg=O("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Dh),We.init(e,t)}),Ug=O("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Th),We.init(e,t)}),Bg=O("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Rh),We.init(e,t)}),Vg=O("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=eg(t)),We.init(e,t)}),Wg=O("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Xh),We.init(e,t)}),Zg=O("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Qh(t)),We.init(e,t)}),Gg=O("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Ah),We.init(e,t)}),Hg=O("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Uh),We.init(e,t),e._zod.bag.format="ipv4"}),Kg=O("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Bh),We.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})}}}),qg=O("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Vh(t.delimiter)),We.init(e,t),e._zod.bag.format="mac"}),Jg=O("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Wh),We.init(e,t)}),Xg=O("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Zh),We.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 nc(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Yg=O("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Gh),We.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{nc(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function Qg(e){if(!Yl.test(e))return!1;const t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return nc(r)}const ev=O("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Yl),We.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{Qg(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),tv=O("$ZodE164",(e,t)=>{t.pattern??(t.pattern=qh),We.init(e,t)});function nv(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 rv=O("$ZodJWT",(e,t)=>{We.init(e,t),e._zod.check=r=>{nv(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),ov=O("$ZodCustomStringFormat",(e,t)=>{We.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})}}),rc=O("$ZodNumber",(e,t)=>{ke.init(e,t),e._zod.pattern=e._zod.bag.pattern??og,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}}),iv=O("$ZodNumberFormat",(e,t)=>{fg.init(e,t),rc.init(e,t)}),oc=O("$ZodBoolean",(e,t)=>{ke.init(e,t),e._zod.pattern=ig,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}}),ic=O("$ZodBigInt",(e,t)=>{ke.init(e,t),e._zod.pattern=ng,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}}),av=O("$ZodBigIntFormat",(e,t)=>{mg.init(e,t),ic.init(e,t)}),sv=O("$ZodSymbol",(e,t)=>{ke.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}}),lv=O("$ZodUndefined",(e,t)=>{ke.init(e,t),e._zod.pattern=sg,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}}),cv=O("$ZodNull",(e,t)=>{ke.init(e,t),e._zod.pattern=ag,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}}),uv=O("$ZodAny",(e,t)=>{ke.init(e,t),e._zod.parse=r=>r}),dv=O("$ZodUnknown",(e,t)=>{ke.init(e,t),e._zod.parse=r=>r}),pv=O("$ZodNever",(e,t)=>{ke.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),fv=O("$ZodVoid",(e,t)=>{ke.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}}),mv=O("$ZodDate",(e,t)=>{ke.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 Cp(e,t,r){e.issues.length&&t.issues.push(...qt(r,e.issues)),t.value[r]=e.value}const hv=O("$ZodArray",(e,t)=>{ke.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=>Cp(c,r,a))):Cp(l,r,a)}return i.length?Promise.all(i).then(()=>r):r}});function Ji(e,t,r,o){e.issues.length&&t.issues.push(...qt(r,e.issues)),e.value===void 0?r in o&&(t.value[r]=void 0):t.value[r]=e.value}function gv(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=dh(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function vv(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=>Ji(p,r,u,t))):Ji(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 bv=O("$ZodObject",(e,t)=>{if(ke.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=Lo(()=>gv(t));ze(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=zr,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=>Ji(g,s,p,c))):Ji(h,s,p,c)}return i?vv(u,c,s,l,o.value,e):u.length?Promise.all(u).then(()=>s):s}}),yv=O("$ZodObjectJIT",(e,t)=>{bv.init(e,t);const r=e._zod.parse,o=Lo(()=>gv(t)),n=p=>{const m=new Og(["shape","payload","ctx"]),h=o.value,g=S=>{const x=Rs(S);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 S of h.keys)v[S]=`key_${y++}`;m.write("const newResult = {};");for(const S of h.keys){const x=v[S],w=Rs(S);m.write(`const ${x} = ${g(S)};`),m.write(`
|
|
164
|
-
if (${x}.issues.length) {
|
|
165
|
-
payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
|
|
166
|
-
...iss,
|
|
167
|
-
path: iss.path ? [${w}, ...iss.path] : [${w}]
|
|
168
|
-
})));
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
if (${x}.value === undefined) {
|
|
173
|
-
if (${w} in input) {
|
|
174
|
-
newResult[${w}] = undefined;
|
|
175
|
-
}
|
|
176
|
-
} else {
|
|
177
|
-
newResult[${w}] = ${x}.value;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
`)}m.write("payload.value = newResult;"),m.write("return payload;");const $=m.compile();return(S,x)=>$(p,S,x)};let i;const a=zr,s=!Hi.jitless,c=s&&ch.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?vv([],h,p,m,d,e):p):r(p,m):(p.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),p)}});function Ep(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=>!Xn(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=>Yt(a,o,xt())))}),t)}const ac=O("$ZodUnion",(e,t)=>{ke.init(e,t),ze(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),ze(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),ze(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),ze(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=>wa(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=>Ep(l,n,e,i)):Ep(s,n,e,i)}}),xv=O("$ZodDiscriminatedUnion",(e,t)=>{ac.init(e,t);const r=e._zod.parse;ze(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=Lo(()=>{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(!zr(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)}}),Sv=O("$ZodIntersection",(e,t)=>{ke.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])=>Pp(r,l,c)):Pp(r,i,a)}});function Ms(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(lr(e)&&lr(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=Ms(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=Ms(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 Pp(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),Xn(e))return e;const o=Ms(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 sc=O("$ZodTuple",(e,t)=>{ke.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=>ui(p,o,c))):ui(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=>ui(m,o,c))):ui(p,o,c)}}return a.length?Promise.all(a).then(()=>o):o}});function ui(e,t,r){e.issues.length&&t.issues.push(...qt(r,e.issues)),t.value[r]=e.value}const $v=O("$ZodRecord",(e,t)=>{ke.init(e,t),e._zod.parse=(r,o)=>{const n=r.value;if(!lr(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(...qt(c,d.issues)),r.value[c]=d.value})):(u.issues.length&&r.issues.push(...qt(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=>Yt(u,o,xt())),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(...qt(s,u.issues)),r.value[l.value]=u.value})):(c.issues.length&&r.issues.push(...qt(s,c.issues)),r.value[l.value]=c.value)}}return i.length?Promise.all(i).then(()=>r):r}}),wv=O("$ZodMap",(e,t)=>{ke.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])=>{Op(u,d,r,a,n,e,o)})):Op(l,c,r,a,n,e,o)}return i.length?Promise.all(i).then(()=>r):r}});function Op(e,t,r,o,n,i,a){e.issues.length&&(qi.has(typeof o)?r.issues.push(...qt(o,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:i,issues:e.issues.map(s=>Yt(s,a,xt()))})),t.issues.length&&(qi.has(typeof o)?r.issues.push(...qt(o,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:i,key:o,issues:t.issues.map(s=>Yt(s,a,xt()))})),r.value.set(e.value,t.value)}const Iv=O("$ZodSet",(e,t)=>{ke.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=>jp(l,r))):jp(s,r)}return i.length?Promise.all(i).then(()=>r):r}});function jp(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const kv=O("$ZodEnum",(e,t)=>{ke.init(e,t);const r=Fl(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(n=>qi.has(typeof n)).map(n=>typeof n=="string"?vn(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}}),_v=O("$ZodLiteral",(e,t)=>{if(ke.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"?vn(o):o?vn(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}}),Cv=O("$ZodFile",(e,t)=>{ke.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}}),Ev=O("$ZodTransform",(e,t)=>{ke.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 nr;return r.value=n,r}});function Dp(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Pv=O("$ZodOptional",(e,t)=>{ke.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ze(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ze(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${wa(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=>Dp(i,r.value)):Dp(n,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,o)}}),Ov=O("$ZodNullable",(e,t)=>{ke.init(e,t),ze(e._zod,"optin",()=>t.innerType._zod.optin),ze(e._zod,"optout",()=>t.innerType._zod.optout),ze(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${wa(r.source)}|null)$`):void 0}),ze(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)}),jv=O("$ZodDefault",(e,t)=>{ke.init(e,t),e._zod.optin="optional",ze(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=>Tp(i,t)):Tp(n,t)}});function Tp(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Dv=O("$ZodPrefault",(e,t)=>{ke.init(e,t),e._zod.optin="optional",ze(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))}),Tv=O("$ZodNonOptional",(e,t)=>{ke.init(e,t),ze(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=>Rp(i,e)):Rp(n,e)}});function Rp(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 Rv=O("$ZodSuccess",(e,t)=>{ke.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)}}),zv=O("$ZodCatch",(e,t)=>{ke.init(e,t),ze(e._zod,"optin",()=>t.innerType._zod.optin),ze(e._zod,"optout",()=>t.innerType._zod.optout),ze(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=>Yt(a,o,xt()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(i=>Yt(i,o,xt()))},input:r.value}),r.issues=[]),r)}}),Av=O("$ZodNaN",(e,t)=>{ke.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)}),Mv=O("$ZodPipe",(e,t)=>{ke.init(e,t),ze(e._zod,"values",()=>t.in._zod.values),ze(e._zod,"optin",()=>t.in._zod.optin),ze(e._zod,"optout",()=>t.out._zod.optout),ze(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=>di(a,t.in,o)):di(i,t.in,o)}const n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>di(i,t.out,o)):di(n,t.out,o)}});function di(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const lc=O("$ZodCodec",(e,t)=>{ke.init(e,t),ze(e._zod,"values",()=>t.in._zod.values),ze(e._zod,"optin",()=>t.in._zod.optin),ze(e._zod,"optout",()=>t.out._zod.optout),ze(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=>pi(a,t,o)):pi(i,t,o)}else{const i=t.out._zod.run(r,o);return i instanceof Promise?i.then(a=>pi(a,t,o)):pi(i,t,o)}}});function pi(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=>fi(e,i,t.out,r)):fi(e,n,t.out,r)}else{const n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(i=>fi(e,i,t.in,r)):fi(e,n,t.in,r)}}function fi(e,t,r,o){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},o)}const Nv=O("$ZodReadonly",(e,t)=>{ke.init(e,t),ze(e._zod,"propValues",()=>t.innerType._zod.propValues),ze(e._zod,"values",()=>t.innerType._zod.values),ze(e._zod,"optin",()=>t.innerType?._zod?.optin),ze(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(zp):zp(n)}});function zp(e){return e.value=Object.freeze(e.value),e}const Fv=O("$ZodTemplateLiteral",(e,t)=>{ke.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||uh.has(typeof o))r.push(vn(`${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)}),Lv=O("$ZodFunction",(e,t)=>(ke.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?zs(e._def.input,o):o,i=Reflect.apply(r,this,n);return e._def.output?zs(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 As(e._def.input,o):o,i=await Reflect.apply(r,this,n);return e._def.output?await As(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 sc({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)),Uv=O("$ZodPromise",(e,t)=>{ke.init(e,t),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},o))}),Bv=O("$ZodLazy",(e,t)=>{ke.init(e,t),ze(e._zod,"innerType",()=>t.getter()),ze(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),ze(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),ze(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),ze(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o)}),Vv=O("$ZodCustom",(e,t)=>{qe.init(e,t),ke.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=>Ap(i,r,o,e));Ap(n,r,o,e)}});function Ap(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(Ar(n))}}const Wj=()=>{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])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${Z(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?"ة":""}: ${Z(n.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${n.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${n.origin}`;default:return"مدخل غير مقبول"}}};function Zj(){return{localeError:Wj()}}const Gj=()=>{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: ${Z(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":""}: ${Z(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 Hj(){return{localeError:Gj()}}function Mp(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 Kj=()=>{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])}`:`Няправільны варыянт: чакаўся адзін з ${Z(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);if(a){const s=Number(n.maximum),l=Mp(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=Mp(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?"ключы":"ключ"}: ${Z(n.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${n.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${n.origin}`;default:return"Няправільны ўвод"}}};function qj(){return{localeError:Kj()}}const Jj=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},Xj=()=>{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}, получен ${Jj(o.input)}`;case"invalid_value":return o.values.length===1?`Невалиден вход: очакван ${$e(o.values[0])}`:`Невалидна опция: очаквано едно от ${Z(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?"ове":""}: ${Z(o.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${o.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${o.origin}`;default:return"Невалиден вход"}}};function Yj(){return{localeError:Xj()}}const Qj=()=>{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 ${Z(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":""}: ${Z(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 eD(){return{localeError:Qj()}}const tD=()=>{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 ${Z(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: ${Z(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 nD(){return{localeError:tD()}}const rD=()=>{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 ${Z(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"}: ${Z(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 oD(){return{localeError:rD()}}const iD=()=>{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 ${Z(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"}: ${Z(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 aD(){return{localeError:iD()}}const sD=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},lD=()=>{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 ${sD(o.input)}`;case"invalid_value":return o.values.length===1?`Invalid input: expected ${$e(o.values[0])}`:`Invalid option: expected one of ${Z(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":""}: ${Z(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 Wv(){return{localeError:lD()}}const cD=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},uD=()=>{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 ${cD(o.input)}`;case"invalid_value":return o.values.length===1?`Nevalida enigo: atendiĝis ${$e(o.values[0])}`:`Nevalida opcio: atendiĝis unu el ${Z(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":""}: ${Z(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 dD(){return{localeError:uD()}}const pD=()=>{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 ${Z(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":""}: ${Z(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 fD(){return{localeError:pD()}}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:"تاریخ و زمان ایزو",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])} میبود`:`گزینه نامعتبر: میبایست یکی از ${Z(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?"های":""} ناشناس: ${Z(n.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${n.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${n.origin}`;default:return"ورودی نامعتبر"}}};function hD(){return{localeError:mD()}}const gD=()=>{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: ${Z(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"}: ${Z(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 vD(){return{localeError:gD()}}const bD=()=>{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 ${Z(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":""} : ${Z(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 yD(){return{localeError:bD()}}const xD=()=>{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 ${Z(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":""} : ${Z(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 SD(){return{localeError:xD()}}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?"ים":"ה"}: ${Z(c.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${n(c.origin??"array")}`;default:return"קלט לא תקין"}}};function wD(){return{localeError:$D()}}const ID=()=>{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 ${Z(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":""}: ${Z(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 kD(){return{localeError:ID()}}const _D=()=>{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 ${Z(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":""}: ${Z(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 CD(){return{localeError:_D()}}const ED=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},PD=()=>{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 ${ED(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 ${Z(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"}: ${Z(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 OD(){return{localeError:PD()}}const jD=()=>{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 ${Z(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"}: ${Z(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 DD(){return{localeError:jD()}}const TD=()=>{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])}が期待されました`:`無効な選択: ${Z(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?"群":""}: ${Z(n.keys,"、")}`;case"invalid_key":return`${n.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${n.origin}内の無効な値`;default:return"無効な入力"}}};function RD(){return{localeError:TD()}}const zD=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},AD=()=>{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}, მიღებული ${zD(o.input)}`;case"invalid_value":return o.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${$e(o.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${Z(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?"ები":"ი"}: ${Z(o.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${o.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${o.origin}-ში`;default:return"არასწორი შეყვანა"}}};function MD(){return{localeError:AD()}}const ND=()=>{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])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${Z(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`រកឃើញសោមិនស្គាល់៖ ${Z(n.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function Zv(){return{localeError:ND()}}function FD(){return Zv()}const LD=()=>{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])} 이어야 합니다`:`잘못된 옵션: ${Z(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`인식할 수 없는 키: ${Z(n.keys,", ")}`;case"invalid_key":return`잘못된 키: ${n.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${n.origin}`;default:return"잘못된 입력"}}};function UD(){return{localeError:LD()}}const BD=e=>co(typeof e,e),co=(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},to=e=>e.charAt(0).toUpperCase()+e.slice(1);function Np(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 VD=()=>{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 ${BD(o.input)}, o tikėtasi - ${co(o.expected)}`;case"invalid_value":return o.values.length===1?`Privalo būti ${$e(o.values[0])}`:`Privalo būti vienas iš ${Z(o.values,"|")} pasirinkimų`;case"too_big":{const n=co(o.origin),i=t(o.origin,Np(Number(o.maximum)),o.inclusive??!1,"smaller");if(i?.verb)return`${to(n??o.origin??"reikšmė")} ${i.verb} ${o.maximum.toString()} ${i.unit??"elementų"}`;const a=o.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${to(n??o.origin??"reikšmė")} turi būti ${a} ${o.maximum.toString()} ${i?.unit}`}case"too_small":{const n=co(o.origin),i=t(o.origin,Np(Number(o.minimum)),o.inclusive??!1,"bigger");if(i?.verb)return`${to(n??o.origin??"reikšmė")} ${i.verb} ${o.minimum.toString()} ${i.unit??"elementų"}`;const a=o.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${to(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"}: ${Z(o.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{const n=co(o.origin);return`${to(n??o.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function WD(){return{localeError:VD()}}const ZD=()=>{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])}`:`Грешана опција: се очекува една ${Z(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?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${Z(n.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${n.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${n.origin}`;default:return"Грешен внес"}}};function GD(){return{localeError:ZD()}}const HD=()=>{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 ${Z(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: ${Z(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 KD(){return{localeError:HD()}}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 ${Z(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":""}: ${Z(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 JD(){return{localeError:qD()}}const XD=()=>{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 ${Z(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"}: ${Z(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 YD(){return{localeError:XD()}}const QD=()=>{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 ${Z(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":""}: ${Z(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 eT(){return{localeError:QD()}}const tT=()=>{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])} وای`:`ناسم انتخاب: باید یو له ${Z(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?"کلیډونه":"کلیډ"}: ${Z(n.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${n.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${n.origin} کې`;default:return"ناسمه ورودي"}}};function nT(){return{localeError:tT()}}const rT=()=>{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 ${Z(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":""}: ${Z(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 oT(){return{localeError:rT()}}const iT=()=>{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 ${Z(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":""}: ${Z(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 aT(){return{localeError:iT()}}function Fp(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 sT=()=>{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])}`:`Неверный вариант: ожидалось одно из ${Z(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);if(a){const s=Number(n.maximum),l=Fp(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=Fp(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?"и":""}: ${Z(n.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${n.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${n.origin}`;default:return"Неверные входные данные"}}};function lT(){return{localeError:sT()}}const cT=()=>{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 ${Z(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č"}: ${Z(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 uT(){return{localeError:cT()}}const dT=()=>{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 ${Z(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"}: ${Z(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 pT(){return{localeError:dT()}}const fT=()=>{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])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${Z(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?"கள்":""}: ${Z(n.keys,", ")}`;case"invalid_key":return`${n.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${n.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function mT(){return{localeError:fT()}}const hT=()=>{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])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${Z(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`พบคีย์ที่ไม่รู้จัก: ${Z(n.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${n.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${n.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function gT(){return{localeError:hT()}}const vT=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},bT=()=>{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 ${vT(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ı: ${Z(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":""}: ${Z(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 yT(){return{localeError:bT()}}const xT=()=>{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])}`:`Неправильна опція: очікується одне з ${Z(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?"і":""}: ${Z(n.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${n.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${n.origin}`;default:return"Неправильні вхідні дані"}}};function Gv(){return{localeError:xT()}}function ST(){return Gv()}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])} متوقع تھا`:`غلط آپشن: ${Z(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?"ز":""}: ${Z(n.keys,"، ")}`;case"invalid_key":return`${n.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${n.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function wT(){return{localeError:$T()}}const IT=()=>{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ị ${Z(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: ${Z(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 kT(){return{localeError:IT()}}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"空值(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])}`:`无效选项:期望以下之一 ${Z(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): ${Z(n.keys,", ")}`;case"invalid_key":return`${n.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${n.origin} 中包含无效值(value)`;default:return"无效输入"}}};function CT(){return{localeError:_T()}}const ET=()=>{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])}`:`無效的選項:預期為以下其中之一 ${Z(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?"們":""}:${Z(n.keys,"、")}`;case"invalid_key":return`${n.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${n.origin} 中有無效的值`;default:return"無效的輸入值"}}};function PT(){return{localeError:ET()}}const OT=()=>{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 ${Z(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ọ̀: ${Z(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 jT(){return{localeError:OT()}}const Hv=Object.freeze(Object.defineProperty({__proto__:null,ar:Zj,az:Hj,be:qj,bg:Yj,ca:eD,cs:nD,da:oD,de:aD,en:Wv,eo:dD,es:fD,fa:hD,fi:vD,fr:yD,frCA:SD,he:wD,hu:kD,id:CD,is:OD,it:DD,ja:RD,ka:MD,kh:FD,km:Zv,ko:UD,lt:WD,mk:GD,ms:KD,nl:JD,no:YD,ota:eT,pl:oT,ps:nT,pt:aT,ru:lT,sl:uT,sv:pT,ta:mT,th:gT,tr:yT,ua:ST,uk:Gv,ur:wT,vi:kT,yo:jT,zhCN:CT,zhTW:PT},Symbol.toStringTag,{value:"Module"}));var Lp;const Kv=Symbol("ZodOutput"),qv=Symbol("ZodInput");class cc{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 uc(){return new cc}(Lp=globalThis).__zod_globalRegistry??(Lp.__zod_globalRegistry=uc());const Jt=globalThis.__zod_globalRegistry;function Jv(e,t){return new e({type:"string",...N(t)})}function Xv(e,t){return new e({type:"string",coerce:!0,...N(t)})}function dc(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...N(t)})}function Xi(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...N(t)})}function pc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...N(t)})}function fc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...N(t)})}function mc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...N(t)})}function hc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...N(t)})}function Ca(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...N(t)})}function gc(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...N(t)})}function vc(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...N(t)})}function bc(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...N(t)})}function yc(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...N(t)})}function xc(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...N(t)})}function Sc(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...N(t)})}function $c(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...N(t)})}function wc(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...N(t)})}function Ic(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...N(t)})}function Yv(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...N(t)})}function kc(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...N(t)})}function _c(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...N(t)})}function Cc(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...N(t)})}function Ec(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...N(t)})}function Pc(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...N(t)})}function Oc(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...N(t)})}const Qv={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function eb(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...N(t)})}function tb(e,t){return new e({type:"string",format:"date",check:"string_format",...N(t)})}function nb(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...N(t)})}function rb(e,t){return new e({type:"string",format:"duration",check:"string_format",...N(t)})}function ob(e,t){return new e({type:"number",checks:[],...N(t)})}function ib(e,t){return new e({type:"number",coerce:!0,checks:[],...N(t)})}function ab(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...N(t)})}function sb(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...N(t)})}function lb(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...N(t)})}function cb(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...N(t)})}function ub(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...N(t)})}function db(e,t){return new e({type:"boolean",...N(t)})}function pb(e,t){return new e({type:"boolean",coerce:!0,...N(t)})}function fb(e,t){return new e({type:"bigint",...N(t)})}function mb(e,t){return new e({type:"bigint",coerce:!0,...N(t)})}function hb(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...N(t)})}function gb(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...N(t)})}function vb(e,t){return new e({type:"symbol",...N(t)})}function bb(e,t){return new e({type:"undefined",...N(t)})}function yb(e,t){return new e({type:"null",...N(t)})}function xb(e){return new e({type:"any"})}function Sb(e){return new e({type:"unknown"})}function $b(e,t){return new e({type:"never",...N(t)})}function wb(e,t){return new e({type:"void",...N(t)})}function Ib(e,t){return new e({type:"date",...N(t)})}function kb(e,t){return new e({type:"date",coerce:!0,...N(t)})}function _b(e,t){return new e({type:"nan",...N(t)})}function cr(e,t){return new ec({check:"less_than",...N(t),value:e,inclusive:!1})}function Xt(e,t){return new ec({check:"less_than",...N(t),value:e,inclusive:!0})}function ur(e,t){return new tc({check:"greater_than",...N(t),value:e,inclusive:!1})}function Ct(e,t){return new tc({check:"greater_than",...N(t),value:e,inclusive:!0})}function Cb(e){return ur(0,e)}function Eb(e){return cr(0,e)}function Pb(e){return Xt(0,e)}function Ob(e){return Ct(0,e)}function Oo(e,t){return new pg({check:"multiple_of",...N(t),value:e})}function Ea(e,t){return new hg({check:"max_size",...N(t),maximum:e})}function jo(e,t){return new gg({check:"min_size",...N(t),minimum:e})}function jc(e,t){return new vg({check:"size_equals",...N(t),size:e})}function Pa(e,t){return new bg({check:"max_length",...N(t),maximum:e})}function Nr(e,t){return new yg({check:"min_length",...N(t),minimum:e})}function Oa(e,t){return new xg({check:"length_equals",...N(t),length:e})}function Dc(e,t){return new Sg({check:"string_format",format:"regex",...N(t),pattern:e})}function Tc(e){return new $g({check:"string_format",format:"lowercase",...N(e)})}function Rc(e){return new wg({check:"string_format",format:"uppercase",...N(e)})}function zc(e,t){return new Ig({check:"string_format",format:"includes",...N(t),includes:e})}function Ac(e,t){return new kg({check:"string_format",format:"starts_with",...N(t),prefix:e})}function Mc(e,t){return new _g({check:"string_format",format:"ends_with",...N(t),suffix:e})}function jb(e,t,r){return new Cg({check:"property",property:e,schema:t,...N(r)})}function Nc(e,t){return new Eg({check:"mime_type",mime:e,...N(t)})}function Dn(e){return new Pg({check:"overwrite",tx:e})}function Fc(e){return Dn(t=>t.normalize(e))}function Lc(){return Dn(e=>e.trim())}function Uc(){return Dn(e=>e.toLowerCase())}function Bc(){return Dn(e=>e.toUpperCase())}function Vc(){return Dn(e=>lh(e))}function Db(e,t,r){return new e({type:"array",element:t,...N(r)})}function DT(e,t,r){return new e({type:"union",options:t,...N(r)})}function TT(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...N(o)})}function RT(e,t,r){return new e({type:"intersection",left:t,right:r})}function zT(e,t,r,o){const n=r instanceof ke,i=n?o:r,a=n?r:null;return new e({type:"tuple",items:t,rest:a,...N(i)})}function AT(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...N(o)})}function MT(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...N(o)})}function NT(e,t,r){return new e({type:"set",valueType:t,...N(r)})}function FT(e,t,r){const o=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:o,...N(r)})}function LT(e,t,r){return new e({type:"enum",entries:t,...N(r)})}function UT(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...N(r)})}function Tb(e,t){return new e({type:"file",...N(t)})}function BT(e,t){return new e({type:"transform",transform:t})}function VT(e,t){return new e({type:"optional",innerType:t})}function WT(e,t){return new e({type:"nullable",innerType:t})}function ZT(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():Ia(r)}})}function GT(e,t,r){return new e({type:"nonoptional",innerType:t,...N(r)})}function HT(e,t){return new e({type:"success",innerType:t})}function KT(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 JT(e,t){return new e({type:"readonly",innerType:t})}function XT(e,t,r){return new e({type:"template_literal",parts:t,...N(r)})}function YT(e,t){return new e({type:"lazy",getter:t})}function QT(e,t){return new e({type:"promise",innerType:t})}function Rb(e,t,r){const o=N(r);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function zb(e,t,r){return new e({type:"custom",check:"custom",fn:t,...N(r)})}function Ab(e){const t=Mb(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(Ar(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(Ar(n))}},e(r.value,r)));return t}function Mb(e,t){const r=new qe({check:"custom",...N(t)});return r._zod.check=e,r}function Nb(e){const t=new qe({check:"describe"});return t._zod.onattach=[r=>{const o=Jt.get(r)??{};Jt.add(r,{...o,description:e})}],t._zod.check=()=>{},t}function Fb(e){const t=new qe({check:"meta"});return t._zod.onattach=[r=>{const o=Jt.get(r)??{};Jt.add(r,{...o,...e})}],t._zod.check=()=>{},t}function Lb(e,t){const r=N(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??lc,l=e.Boolean??oc,c=e.String??Ko,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 qo(e,t,r,o={}){const n=N(o),i={...N(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 Ns{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??Jt,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:$,contentEncoding:S}=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),S&&(h.contentEncoding=S),$&&$.size>0){const x=[...$];x.length===1?h.pattern=x[0].source:x.length>1&&(s.schema.allOf=[...x.map(w=>({...this.target==="draft-7"||this.target==="draft-4"||this.target==="openapi-3.0"?{type:"string"}:{},pattern:w.source}))])}break}case"number":{const h=m,{minimum:g,maximum:v,format:y,multipleOf:$,exclusiveMaximum:S,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 S=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(h.maximum=S,h.exclusiveMaximum=!0):h.exclusiveMaximum=S),typeof v=="number"&&(h.maximum=v,typeof S=="number"&&this.target!=="draft-4"&&(S<=v?delete h.maximum:delete h.exclusiveMaximum)),typeof $=="number"&&(h.multipleOf=$);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 $ in g)h.properties[$]=this.process(g[$],{...d,path:[...d.path,"properties",$]});const v=new Set(Object.keys(g)),y=new Set([...v].filter($=>{const S=n.shape[$]._zod;return this.io==="input"?S.optin===void 0:S.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,$)=>this.process(y,{...d,path:[...d.path,g?"oneOf":"anyOf",$]}));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=S=>"allOf"in S&&Object.keys(S).length===1,$=[...y(g)?g.allOf:[g],...y(v)?v.allOf:[v]];h.allOf=$;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((w,I)=>this.process(w,{...d,path:[...d.path,g,I]})),$=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,$&&(h.items=$)):this.target==="openapi-3.0"?(h.items={anyOf:y},$&&h.items.anyOf.push($),h.minItems=y.length,$||(h.maxItems=y.length)):(h.items=y,$&&(h.additionalItems=$));const{minimum:S,maximum:x}=t._zod.bag;typeof S=="number"&&(h.minItems=S),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=Fl(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:$}=t._zod.bag;v!==void 0&&(g.minLength=v),y!==void 0&&(g.maxLength=y),$?$.length===1?(g.contentMediaType=$[0],Object.assign(h,g)):h.anyOf=$.map(S=>({...g,contentMediaType:S})):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"&>(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??($=>$);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 Ub(e,t){if(e instanceof cc){const o=new Ns(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 Ns(t);return r.process(e),r.emit(e,t)}function gt(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 gt(o.element,r);if(o.type==="set")return gt(o.valueType,r);if(o.type==="lazy")return gt(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 gt(o.innerType,r);if(o.type==="intersection")return gt(o.left,r)||gt(o.right,r);if(o.type==="record"||o.type==="map")return gt(o.keyType,r)||gt(o.valueType,r);if(o.type==="pipe")return gt(o.in,r)||gt(o.out,r);if(o.type==="object"){for(const n in o.shape)if(gt(o.shape[n],r))return!0;return!1}if(o.type==="union"){for(const n of o.options)if(gt(n,r))return!0;return!1}if(o.type==="tuple"){for(const n of o.items)if(gt(n,r))return!0;return!!(o.rest&>(o.rest,r))}return!1}const eR=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),tR=Object.freeze(Object.defineProperty({__proto__:null,$ZodAny:uv,$ZodArray:hv,$ZodAsyncError:nr,$ZodBase64:Yg,$ZodBase64URL:ev,$ZodBigInt:ic,$ZodBigIntFormat:av,$ZodBoolean:oc,$ZodCIDRv4:Jg,$ZodCIDRv6:Xg,$ZodCUID:Ng,$ZodCUID2:Fg,$ZodCatch:zv,$ZodCheck:qe,$ZodCheckBigIntFormat:mg,$ZodCheckEndsWith:_g,$ZodCheckGreaterThan:tc,$ZodCheckIncludes:Ig,$ZodCheckLengthEquals:xg,$ZodCheckLessThan:ec,$ZodCheckLowerCase:$g,$ZodCheckMaxLength:bg,$ZodCheckMaxSize:hg,$ZodCheckMimeType:Eg,$ZodCheckMinLength:yg,$ZodCheckMinSize:gg,$ZodCheckMultipleOf:pg,$ZodCheckNumberFormat:fg,$ZodCheckOverwrite:Pg,$ZodCheckProperty:Cg,$ZodCheckRegex:Sg,$ZodCheckSizeEquals:vg,$ZodCheckStartsWith:kg,$ZodCheckStringFormat:Ho,$ZodCheckUpperCase:wg,$ZodCodec:lc,$ZodCustom:Vv,$ZodCustomStringFormat:ov,$ZodDate:mv,$ZodDefault:jv,$ZodDiscriminatedUnion:xv,$ZodE164:tv,$ZodEmail:Rg,$ZodEmoji:Ag,$ZodEncodeError:$a,$ZodEnum:kv,$ZodError:Ul,$ZodFile:Cv,$ZodFunction:Lv,$ZodGUID:Dg,$ZodIPv4:Hg,$ZodIPv6:Kg,$ZodISODate:Wg,$ZodISODateTime:Vg,$ZodISODuration:Gg,$ZodISOTime:Zg,$ZodIntersection:Sv,$ZodJWT:rv,$ZodKSUID:Bg,$ZodLazy:Bv,$ZodLiteral:_v,$ZodMAC:qg,$ZodMap:wv,$ZodNaN:Av,$ZodNanoID:Mg,$ZodNever:pv,$ZodNonOptional:Tv,$ZodNull:cv,$ZodNullable:Ov,$ZodNumber:rc,$ZodNumberFormat:iv,$ZodObject:bv,$ZodObjectJIT:yv,$ZodOptional:Pv,$ZodPipe:Mv,$ZodPrefault:Dv,$ZodPromise:Uv,$ZodReadonly:Nv,$ZodRealError:Tt,$ZodRecord:$v,$ZodRegistry:cc,$ZodSet:Iv,$ZodString:Ko,$ZodStringFormat:We,$ZodSuccess:Rv,$ZodSymbol:sv,$ZodTemplateLiteral:Fv,$ZodTransform:Ev,$ZodTuple:sc,$ZodType:ke,$ZodULID:Lg,$ZodURL:zg,$ZodUUID:Tg,$ZodUndefined:lv,$ZodUnion:ac,$ZodUnknown:dv,$ZodVoid:fv,$ZodXID:Ug,$brand:ah,$constructor:O,$input:qv,$output:Kv,Doc:Og,JSONSchema:eR,JSONSchemaGenerator:Ns,NEVER:ih,TimePrecision:Qv,_any:xb,_array:Db,_base64:Cc,_base64url:Ec,_bigint:fb,_boolean:db,_catch:KT,_check:Mb,_cidrv4:kc,_cidrv6:_c,_coercedBigint:mb,_coercedBoolean:pb,_coercedDate:kb,_coercedNumber:ib,_coercedString:Xv,_cuid:bc,_cuid2:yc,_custom:Rb,_date:Ib,_decode:Zl,_decodeAsync:Hl,_default:ZT,_discriminatedUnion:TT,_e164:Pc,_email:dc,_emoji:gc,_encode:Wl,_encodeAsync:Gl,_endsWith:Mc,_enum:FT,_file:Tb,_float32:sb,_float64:lb,_gt:ur,_gte:Ct,_guid:Xi,_includes:zc,_int:ab,_int32:cb,_int64:hb,_intersection:RT,_ipv4:wc,_ipv6:Ic,_isoDate:tb,_isoDateTime:eb,_isoDuration:rb,_isoTime:nb,_jwt:Oc,_ksuid:$c,_lazy:YT,_length:Oa,_literal:UT,_lowercase:Tc,_lt:cr,_lte:Xt,_mac:Yv,_map:MT,_max:Xt,_maxLength:Pa,_maxSize:Ea,_mime:Nc,_min:Ct,_minLength:Nr,_minSize:jo,_multipleOf:Oo,_nan:_b,_nanoid:vc,_nativeEnum:LT,_negative:Eb,_never:$b,_nonnegative:Ob,_nonoptional:GT,_nonpositive:Pb,_normalize:Fc,_null:yb,_nullable:WT,_number:ob,_optional:VT,_overwrite:Dn,_parse:Uo,_parseAsync:Bo,_pipe:qT,_positive:Cb,_promise:QT,_property:jb,_readonly:JT,_record:AT,_refine:zb,_regex:Dc,_safeDecode:ql,_safeDecodeAsync:Xl,_safeEncode:Kl,_safeEncodeAsync:Jl,_safeParse:Vo,_safeParseAsync:Wo,_set:NT,_size:jc,_slugify:Vc,_startsWith:Ac,_string:Jv,_stringFormat:qo,_stringbool:Lb,_success:HT,_superRefine:Ab,_symbol:vb,_templateLiteral:XT,_toLowerCase:Uc,_toUpperCase:Bc,_transform:BT,_trim:Lc,_tuple:zT,_uint32:ub,_uint64:gb,_ulid:xc,_undefined:bb,_union:DT,_unknown:Sb,_uppercase:Rc,_url:Ca,_uuid:pc,_uuidv4:fc,_uuidv6:mc,_uuidv7:hc,_void:wb,_xid:Sc,clone:Wt,config:xt,decode:fj,decodeAsync:hj,describe:Nb,encode:pj,encodeAsync:mj,flattenError:Bl,formatError:Vl,globalConfig:Hi,globalRegistry:Jt,isValidBase64:nc,isValidBase64URL:Qg,isValidJWT:nv,locales:Hv,meta:Fb,parse:zs,parseAsync:As,prettifyError:Ch,regexes:Ql,registry:uc,safeDecode:vj,safeDecodeAsync:yj,safeEncode:gj,safeEncodeAsync:bj,safeParse:Eh,safeParseAsync:Ph,toDotPath:_h,toJSONSchema:Ub,treeifyError:kh,util:wh,version:jg},Symbol.toStringTag,{value:"Module"})),Wc=O("ZodISODateTime",(e,t)=>{Vg.init(e,t),Ge.init(e,t)});function Bb(e){return eb(Wc,e)}const Zc=O("ZodISODate",(e,t)=>{Wg.init(e,t),Ge.init(e,t)});function Vb(e){return tb(Zc,e)}const Gc=O("ZodISOTime",(e,t)=>{Zg.init(e,t),Ge.init(e,t)});function Wb(e){return nb(Gc,e)}const Hc=O("ZodISODuration",(e,t)=>{Gg.init(e,t),Ge.init(e,t)});function Zb(e){return rb(Hc,e)}const nR=Object.freeze(Object.defineProperty({__proto__:null,ZodISODate:Zc,ZodISODateTime:Wc,ZodISODuration:Hc,ZodISOTime:Gc,date:Vb,datetime:Bb,duration:Zb,time:Wb},Symbol.toStringTag,{value:"Module"})),Gb=(e,t)=>{Ul.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Vl(e,r)},flatten:{value:r=>Bl(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Ki,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Ki,2)}},isEmpty:{get(){return e.issues.length===0}}})},rR=O("ZodError",Gb),Rt=O("ZodError",Gb,{Parent:Error}),Hb=Uo(Rt),Kb=Bo(Rt),qb=Vo(Rt),Jb=Wo(Rt),Xb=Wl(Rt),Yb=Zl(Rt),Qb=Gl(Rt),ey=Hl(Rt),ty=Kl(Rt),ny=ql(Rt),ry=Jl(Rt),oy=Xl(Rt),De=O("ZodType",(e,t)=>(ke.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(yn(t,{checks:[...t.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]})),e.clone=(r,o)=>Wt(e,r,o),e.brand=()=>e,e.register=((r,o)=>(r.add(e,o),e)),e.parse=(r,o)=>Hb(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>qb(e,r,o),e.parseAsync=async(r,o)=>Kb(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>Jb(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>Xb(e,r,o),e.decode=(r,o)=>Yb(e,r,o),e.encodeAsync=async(r,o)=>Qb(e,r,o),e.decodeAsync=async(r,o)=>ey(e,r,o),e.safeEncode=(r,o)=>ty(e,r,o),e.safeDecode=(r,o)=>ny(e,r,o),e.safeEncodeAsync=async(r,o)=>ry(e,r,o),e.safeDecodeAsync=async(r,o)=>oy(e,r,o),e.refine=(r,o)=>e.check(Vy(r,o)),e.superRefine=r=>e.check(Wy(r)),e.overwrite=r=>e.check(Dn(r)),e.optional=()=>Qi(e),e.nullable=()=>ea(e),e.nullish=()=>Qi(ea(e)),e.nonoptional=r=>jy(e,r),e.array=()=>Aa(e),e.or=r=>Na([e,r]),e.and=r=>vy(e,r),e.transform=r=>ta(e,gu(r)),e.default=r=>Ey(e,r),e.prefault=r=>Oy(e,r),e.catch=r=>Ry(e,r),e.pipe=r=>ta(e,r),e.readonly=()=>My(e),e.describe=r=>{const o=e.clone();return Jt.add(o,{description:r}),o},Object.defineProperty(e,"description",{get(){return Jt.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Jt.get(e);const o=e.clone();return Jt.add(o,r[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Kc=O("_ZodString",(e,t)=>{Ko.init(e,t),De.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(Dc(...o)),e.includes=(...o)=>e.check(zc(...o)),e.startsWith=(...o)=>e.check(Ac(...o)),e.endsWith=(...o)=>e.check(Mc(...o)),e.min=(...o)=>e.check(Nr(...o)),e.max=(...o)=>e.check(Pa(...o)),e.length=(...o)=>e.check(Oa(...o)),e.nonempty=(...o)=>e.check(Nr(1,...o)),e.lowercase=o=>e.check(Tc(o)),e.uppercase=o=>e.check(Rc(o)),e.trim=()=>e.check(Lc()),e.normalize=(...o)=>e.check(Fc(...o)),e.toLowerCase=()=>e.check(Uc()),e.toUpperCase=()=>e.check(Bc()),e.slugify=()=>e.check(Vc())}),ja=O("ZodString",(e,t)=>{Ko.init(e,t),Kc.init(e,t),e.email=r=>e.check(dc(qc,r)),e.url=r=>e.check(Ca(Da,r)),e.jwt=r=>e.check(Oc(uu,r)),e.emoji=r=>e.check(gc(Jc,r)),e.guid=r=>e.check(Xi(Yi,r)),e.uuid=r=>e.check(pc(pn,r)),e.uuidv4=r=>e.check(fc(pn,r)),e.uuidv6=r=>e.check(mc(pn,r)),e.uuidv7=r=>e.check(hc(pn,r)),e.nanoid=r=>e.check(vc(Xc,r)),e.guid=r=>e.check(Xi(Yi,r)),e.cuid=r=>e.check(bc(Yc,r)),e.cuid2=r=>e.check(yc(Qc,r)),e.ulid=r=>e.check(xc(eu,r)),e.base64=r=>e.check(Cc(su,r)),e.base64url=r=>e.check(Ec(lu,r)),e.xid=r=>e.check(Sc(tu,r)),e.ksuid=r=>e.check($c(nu,r)),e.ipv4=r=>e.check(wc(ru,r)),e.ipv6=r=>e.check(Ic(ou,r)),e.cidrv4=r=>e.check(kc(iu,r)),e.cidrv6=r=>e.check(_c(au,r)),e.e164=r=>e.check(Pc(cu,r)),e.datetime=r=>e.check(Bb(r)),e.date=r=>e.check(Vb(r)),e.time=r=>e.check(Wb(r)),e.duration=r=>e.check(Zb(r))});function St(e){return Jv(ja,e)}const Ge=O("ZodStringFormat",(e,t)=>{We.init(e,t),Kc.init(e,t)}),qc=O("ZodEmail",(e,t)=>{Rg.init(e,t),Ge.init(e,t)});function oR(e){return dc(qc,e)}const Yi=O("ZodGUID",(e,t)=>{Dg.init(e,t),Ge.init(e,t)});function iR(e){return Xi(Yi,e)}const pn=O("ZodUUID",(e,t)=>{Tg.init(e,t),Ge.init(e,t)});function aR(e){return pc(pn,e)}function sR(e){return fc(pn,e)}function lR(e){return mc(pn,e)}function cR(e){return hc(pn,e)}const Da=O("ZodURL",(e,t)=>{zg.init(e,t),Ge.init(e,t)});function uR(e){return Ca(Da,e)}function dR(e){return Ca(Da,{protocol:/^https?$/,hostname:Kh,...N(e)})}const Jc=O("ZodEmoji",(e,t)=>{Ag.init(e,t),Ge.init(e,t)});function pR(e){return gc(Jc,e)}const Xc=O("ZodNanoID",(e,t)=>{Mg.init(e,t),Ge.init(e,t)});function fR(e){return vc(Xc,e)}const Yc=O("ZodCUID",(e,t)=>{Ng.init(e,t),Ge.init(e,t)});function mR(e){return bc(Yc,e)}const Qc=O("ZodCUID2",(e,t)=>{Fg.init(e,t),Ge.init(e,t)});function hR(e){return yc(Qc,e)}const eu=O("ZodULID",(e,t)=>{Lg.init(e,t),Ge.init(e,t)});function gR(e){return xc(eu,e)}const tu=O("ZodXID",(e,t)=>{Ug.init(e,t),Ge.init(e,t)});function vR(e){return Sc(tu,e)}const nu=O("ZodKSUID",(e,t)=>{Bg.init(e,t),Ge.init(e,t)});function bR(e){return $c(nu,e)}const ru=O("ZodIPv4",(e,t)=>{Hg.init(e,t),Ge.init(e,t)});function yR(e){return wc(ru,e)}const iy=O("ZodMAC",(e,t)=>{qg.init(e,t),Ge.init(e,t)});function xR(e){return Yv(iy,e)}const ou=O("ZodIPv6",(e,t)=>{Kg.init(e,t),Ge.init(e,t)});function SR(e){return Ic(ou,e)}const iu=O("ZodCIDRv4",(e,t)=>{Jg.init(e,t),Ge.init(e,t)});function $R(e){return kc(iu,e)}const au=O("ZodCIDRv6",(e,t)=>{Xg.init(e,t),Ge.init(e,t)});function wR(e){return _c(au,e)}const su=O("ZodBase64",(e,t)=>{Yg.init(e,t),Ge.init(e,t)});function IR(e){return Cc(su,e)}const lu=O("ZodBase64URL",(e,t)=>{ev.init(e,t),Ge.init(e,t)});function kR(e){return Ec(lu,e)}const cu=O("ZodE164",(e,t)=>{tv.init(e,t),Ge.init(e,t)});function _R(e){return Pc(cu,e)}const uu=O("ZodJWT",(e,t)=>{rv.init(e,t),Ge.init(e,t)});function CR(e){return Oc(uu,e)}const Jo=O("ZodCustomStringFormat",(e,t)=>{ov.init(e,t),Ge.init(e,t)});function ER(e,t,r={}){return qo(Jo,e,t,r)}function PR(e){return qo(Jo,"hostname",Hh,e)}function OR(e){return qo(Jo,"hex",ug,e)}function jR(e,t){const r=t?.enc??"hex",o=`${e}_${r}`,n=Ql[o];if(!n)throw new Error(`Unrecognized hash format: ${o}`);return qo(Jo,o,n,t)}const Ta=O("ZodNumber",(e,t)=>{rc.init(e,t),De.init(e,t),e.gt=(o,n)=>e.check(ur(o,n)),e.gte=(o,n)=>e.check(Ct(o,n)),e.min=(o,n)=>e.check(Ct(o,n)),e.lt=(o,n)=>e.check(cr(o,n)),e.lte=(o,n)=>e.check(Xt(o,n)),e.max=(o,n)=>e.check(Xt(o,n)),e.int=o=>e.check(Fs(o)),e.safe=o=>e.check(Fs(o)),e.positive=o=>e.check(ur(0,o)),e.nonnegative=o=>e.check(Ct(0,o)),e.negative=o=>e.check(cr(0,o)),e.nonpositive=o=>e.check(Xt(0,o)),e.multipleOf=(o,n)=>e.check(Oo(o,n)),e.step=(o,n)=>e.check(Oo(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 wt(e){return ob(Ta,e)}const Zr=O("ZodNumberFormat",(e,t)=>{iv.init(e,t),Ta.init(e,t)});function Fs(e){return ab(Zr,e)}function DR(e){return sb(Zr,e)}function TR(e){return lb(Zr,e)}function RR(e){return cb(Zr,e)}function zR(e){return ub(Zr,e)}const Ra=O("ZodBoolean",(e,t)=>{oc.init(e,t),De.init(e,t)});function Xo(e){return db(Ra,e)}const za=O("ZodBigInt",(e,t)=>{ic.init(e,t),De.init(e,t),e.gte=(o,n)=>e.check(Ct(o,n)),e.min=(o,n)=>e.check(Ct(o,n)),e.gt=(o,n)=>e.check(ur(o,n)),e.gte=(o,n)=>e.check(Ct(o,n)),e.min=(o,n)=>e.check(Ct(o,n)),e.lt=(o,n)=>e.check(cr(o,n)),e.lte=(o,n)=>e.check(Xt(o,n)),e.max=(o,n)=>e.check(Xt(o,n)),e.positive=o=>e.check(ur(BigInt(0),o)),e.negative=o=>e.check(cr(BigInt(0),o)),e.nonpositive=o=>e.check(Xt(BigInt(0),o)),e.nonnegative=o=>e.check(Ct(BigInt(0),o)),e.multipleOf=(o,n)=>e.check(Oo(o,n));const r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function AR(e){return fb(za,e)}const du=O("ZodBigIntFormat",(e,t)=>{av.init(e,t),za.init(e,t)});function MR(e){return hb(du,e)}function NR(e){return gb(du,e)}const ay=O("ZodSymbol",(e,t)=>{sv.init(e,t),De.init(e,t)});function FR(e){return vb(ay,e)}const sy=O("ZodUndefined",(e,t)=>{lv.init(e,t),De.init(e,t)});function LR(e){return bb(sy,e)}const ly=O("ZodNull",(e,t)=>{cv.init(e,t),De.init(e,t)});function cy(e){return yb(ly,e)}const uy=O("ZodAny",(e,t)=>{uv.init(e,t),De.init(e,t)});function UR(){return xb(uy)}const dy=O("ZodUnknown",(e,t)=>{dv.init(e,t),De.init(e,t)});function Fr(){return Sb(dy)}const py=O("ZodNever",(e,t)=>{pv.init(e,t),De.init(e,t)});function pu(e){return $b(py,e)}const fy=O("ZodVoid",(e,t)=>{fv.init(e,t),De.init(e,t)});function BR(e){return wb(fy,e)}const fu=O("ZodDate",(e,t)=>{mv.init(e,t),De.init(e,t),e.min=(o,n)=>e.check(Ct(o,n)),e.max=(o,n)=>e.check(Xt(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 VR(e){return Ib(fu,e)}const my=O("ZodArray",(e,t)=>{hv.init(e,t),De.init(e,t),e.element=t.element,e.min=(r,o)=>e.check(Nr(r,o)),e.nonempty=r=>e.check(Nr(1,r)),e.max=(r,o)=>e.check(Pa(r,o)),e.length=(r,o)=>e.check(Oa(r,o)),e.unwrap=()=>e.element});function Aa(e,t){return Db(my,e,t)}function WR(e){const t=e._zod.def.shape;return un(Object.keys(t))}const Ma=O("ZodObject",(e,t)=>{yv.init(e,t),De.init(e,t),ze(e,"shape",()=>t.shape),e.keyof=()=>un(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Fr()}),e.loose=()=>e.clone({...e._zod.def,catchall:Fr()}),e.strict=()=>e.clone({...e._zod.def,catchall:pu()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>gh(e,r),e.safeExtend=r=>vh(e,r),e.merge=r=>bh(e,r),e.pick=r=>mh(e,r),e.omit=r=>hh(e,r),e.partial=(...r)=>yh(vu,e,r[0]),e.required=(...r)=>xh(bu,e,r[0])});function cn(e,t){const r={type:"object",shape:e??{},...N(t)};return new Ma(r)}function ZR(e,t){return new Ma({type:"object",shape:e,catchall:pu(),...N(t)})}function GR(e,t){return new Ma({type:"object",shape:e,catchall:Fr(),...N(t)})}const mu=O("ZodUnion",(e,t)=>{ac.init(e,t),De.init(e,t),e.options=t.options});function Na(e,t){return new mu({type:"union",options:e,...N(t)})}const hy=O("ZodDiscriminatedUnion",(e,t)=>{mu.init(e,t),xv.init(e,t)});function HR(e,t,r){return new hy({type:"union",options:t,discriminator:e,...N(r)})}const gy=O("ZodIntersection",(e,t)=>{Sv.init(e,t),De.init(e,t)});function vy(e,t){return new gy({type:"intersection",left:e,right:t})}const by=O("ZodTuple",(e,t)=>{sc.init(e,t),De.init(e,t),e.rest=r=>e.clone({...e._zod.def,rest:r})});function yy(e,t,r){const o=t instanceof ke,n=o?r:t,i=o?t:null;return new by({type:"tuple",items:e,rest:i,...N(n)})}const hu=O("ZodRecord",(e,t)=>{$v.init(e,t),De.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function xy(e,t,r){return new hu({type:"record",keyType:e,valueType:t,...N(r)})}function KR(e,t,r){const o=Wt(e);return o._zod.values=void 0,new hu({type:"record",keyType:o,valueType:t,...N(r)})}const Sy=O("ZodMap",(e,t)=>{wv.init(e,t),De.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function qR(e,t,r){return new Sy({type:"map",keyType:e,valueType:t,...N(r)})}const $y=O("ZodSet",(e,t)=>{Iv.init(e,t),De.init(e,t),e.min=(...r)=>e.check(jo(...r)),e.nonempty=r=>e.check(jo(1,r)),e.max=(...r)=>e.check(Ea(...r)),e.size=(...r)=>e.check(jc(...r))});function JR(e,t){return new $y({type:"set",valueType:e,...N(t)})}const Do=O("ZodEnum",(e,t)=>{kv.init(e,t),De.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 Do({...t,checks:[],...N(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 Do({...t,checks:[],...N(n),entries:i})}});function un(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Do({type:"enum",entries:r,...N(t)})}function XR(e,t){return new Do({type:"enum",entries:e,...N(t)})}const wy=O("ZodLiteral",(e,t)=>{_v.init(e,t),De.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 YR(e,t){return new wy({type:"literal",values:Array.isArray(e)?e:[e],...N(t)})}const Iy=O("ZodFile",(e,t)=>{Cv.init(e,t),De.init(e,t),e.min=(r,o)=>e.check(jo(r,o)),e.max=(r,o)=>e.check(Ea(r,o)),e.mime=(r,o)=>e.check(Nc(Array.isArray(r)?r:[r],o))});function QR(e){return Tb(Iy,e)}const ky=O("ZodTransform",(e,t)=>{Ev.init(e,t),De.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(Ar(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(Ar(a))}};const n=t.transform(r.value,r);return n instanceof Promise?n.then(i=>(r.value=i,r)):(r.value=n,r)}});function gu(e){return new ky({type:"transform",transform:e})}const vu=O("ZodOptional",(e,t)=>{Pv.init(e,t),De.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Qi(e){return new vu({type:"optional",innerType:e})}const _y=O("ZodNullable",(e,t)=>{Ov.init(e,t),De.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ea(e){return new _y({type:"nullable",innerType:e})}function ez(e){return Qi(ea(e))}const Cy=O("ZodDefault",(e,t)=>{jv.init(e,t),De.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ey(e,t){return new Cy({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ia(t)}})}const Py=O("ZodPrefault",(e,t)=>{Dv.init(e,t),De.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Oy(e,t){return new Py({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ia(t)}})}const bu=O("ZodNonOptional",(e,t)=>{Tv.init(e,t),De.init(e,t),e.unwrap=()=>e._zod.def.innerType});function jy(e,t){return new bu({type:"nonoptional",innerType:e,...N(t)})}const Dy=O("ZodSuccess",(e,t)=>{Rv.init(e,t),De.init(e,t),e.unwrap=()=>e._zod.def.innerType});function tz(e){return new Dy({type:"success",innerType:e})}const Ty=O("ZodCatch",(e,t)=>{zv.init(e,t),De.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ry(e,t){return new Ty({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const zy=O("ZodNaN",(e,t)=>{Av.init(e,t),De.init(e,t)});function nz(e){return _b(zy,e)}const yu=O("ZodPipe",(e,t)=>{Mv.init(e,t),De.init(e,t),e.in=t.in,e.out=t.out});function ta(e,t){return new yu({type:"pipe",in:e,out:t})}const xu=O("ZodCodec",(e,t)=>{yu.init(e,t),lc.init(e,t)});function rz(e,t,r){return new xu({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}const Ay=O("ZodReadonly",(e,t)=>{Nv.init(e,t),De.init(e,t),e.unwrap=()=>e._zod.def.innerType});function My(e){return new Ay({type:"readonly",innerType:e})}const Ny=O("ZodTemplateLiteral",(e,t)=>{Fv.init(e,t),De.init(e,t)});function oz(e,t){return new Ny({type:"template_literal",parts:e,...N(t)})}const Fy=O("ZodLazy",(e,t)=>{Bv.init(e,t),De.init(e,t),e.unwrap=()=>e._zod.def.getter()});function Ly(e){return new Fy({type:"lazy",getter:e})}const Uy=O("ZodPromise",(e,t)=>{Uv.init(e,t),De.init(e,t),e.unwrap=()=>e._zod.def.innerType});function iz(e){return new Uy({type:"promise",innerType:e})}const By=O("ZodFunction",(e,t)=>{Lv.init(e,t),De.init(e,t)});function Up(e){return new By({type:"function",input:Array.isArray(e?.input)?yy(e?.input):e?.input??Aa(Fr()),output:e?.output??Fr()})}const Fa=O("ZodCustom",(e,t)=>{Vv.init(e,t),De.init(e,t)});function az(e){const t=new qe({check:"custom"});return t._zod.check=e,t}function sz(e,t){return Rb(Fa,e??(()=>!0),t)}function Vy(e,t={}){return zb(Fa,e,t)}function Wy(e){return Ab(e)}const lz=Nb,cz=Fb;function uz(e,t={error:`Input not instance of ${e.name}`}){const r=new Fa({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...N(t)});return r._zod.bag.Class=e,r}const dz=(...e)=>Lb({Codec:xu,Boolean:Ra,String:ja},...e);function pz(e){const t=Ly(()=>Na([St(e),wt(),Xo(),cy(),Aa(t),xy(St(),t)]));return t}function fz(e,t){return ta(gu(e),t)}const mz={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 hz(e){xt({customError:e})}function gz(){return xt().customError}var Ls;Ls||(Ls={});function vz(e){return Xv(ja,e)}function bz(e){return ib(Ta,e)}function yz(e){return pb(Ra,e)}function xz(e){return mb(za,e)}function Sz(e){return kb(fu,e)}const $z=Object.freeze(Object.defineProperty({__proto__:null,bigint:xz,boolean:yz,date:Sz,number:bz,string:vz},Symbol.toStringTag,{value:"Module"}));xt(Wv());const oe=Object.freeze(Object.defineProperty({__proto__:null,$brand:ah,$input:qv,$output:Kv,NEVER:ih,TimePrecision:Qv,ZodAny:uy,ZodArray:my,ZodBase64:su,ZodBase64URL:lu,ZodBigInt:za,ZodBigIntFormat:du,ZodBoolean:Ra,ZodCIDRv4:iu,ZodCIDRv6:au,ZodCUID:Yc,ZodCUID2:Qc,ZodCatch:Ty,ZodCodec:xu,ZodCustom:Fa,ZodCustomStringFormat:Jo,ZodDate:fu,ZodDefault:Cy,ZodDiscriminatedUnion:hy,ZodE164:cu,ZodEmail:qc,ZodEmoji:Jc,ZodEnum:Do,ZodError:rR,ZodFile:Iy,get ZodFirstPartyTypeKind(){return Ls},ZodFunction:By,ZodGUID:Yi,ZodIPv4:ru,ZodIPv6:ou,ZodISODate:Zc,ZodISODateTime:Wc,ZodISODuration:Hc,ZodISOTime:Gc,ZodIntersection:gy,ZodIssueCode:mz,ZodJWT:uu,ZodKSUID:nu,ZodLazy:Fy,ZodLiteral:wy,ZodMAC:iy,ZodMap:Sy,ZodNaN:zy,ZodNanoID:Xc,ZodNever:py,ZodNonOptional:bu,ZodNull:ly,ZodNullable:_y,ZodNumber:Ta,ZodNumberFormat:Zr,ZodObject:Ma,ZodOptional:vu,ZodPipe:yu,ZodPrefault:Py,ZodPromise:Uy,ZodReadonly:Ay,ZodRealError:Rt,ZodRecord:hu,ZodSet:$y,ZodString:ja,ZodStringFormat:Ge,ZodSuccess:Dy,ZodSymbol:ay,ZodTemplateLiteral:Ny,ZodTransform:ky,ZodTuple:by,ZodType:De,ZodULID:eu,ZodURL:Da,ZodUUID:pn,ZodUndefined:sy,ZodUnion:mu,ZodUnknown:dy,ZodVoid:fy,ZodXID:tu,_ZodString:Kc,_default:Ey,_function:Up,any:UR,array:Aa,base64:IR,base64url:kR,bigint:AR,boolean:Xo,catch:Ry,check:az,cidrv4:$R,cidrv6:wR,clone:Wt,codec:rz,coerce:$z,config:xt,core:tR,cuid:mR,cuid2:hR,custom:sz,date:VR,decode:Yb,decodeAsync:ey,describe:lz,discriminatedUnion:HR,e164:_R,email:oR,emoji:pR,encode:Xb,encodeAsync:Qb,endsWith:Mc,enum:un,file:QR,flattenError:Bl,float32:DR,float64:TR,formatError:Vl,function:Up,getErrorMap:gz,globalRegistry:Jt,gt:ur,gte:Ct,guid:iR,hash:jR,hex:OR,hostname:PR,httpUrl:dR,includes:zc,instanceof:uz,int:Fs,int32:RR,int64:MR,intersection:vy,ipv4:yR,ipv6:SR,iso:nR,json:pz,jwt:CR,keyof:WR,ksuid:bR,lazy:Ly,length:Oa,literal:YR,locales:Hv,looseObject:GR,lowercase:Tc,lt:cr,lte:Xt,mac:xR,map:qR,maxLength:Pa,maxSize:Ea,meta:cz,mime:Nc,minLength:Nr,minSize:jo,multipleOf:Oo,nan:nz,nanoid:fR,nativeEnum:XR,negative:Eb,never:pu,nonnegative:Ob,nonoptional:jy,nonpositive:Pb,normalize:Fc,null:cy,nullable:ea,nullish:ez,number:wt,object:cn,optional:Qi,overwrite:Dn,parse:Hb,parseAsync:Kb,partialRecord:KR,pipe:ta,positive:Cb,prefault:Oy,preprocess:fz,prettifyError:Ch,promise:iz,property:jb,readonly:My,record:xy,refine:Vy,regex:Dc,regexes:Ql,registry:uc,safeDecode:ny,safeDecodeAsync:oy,safeEncode:ty,safeEncodeAsync:ry,safeParse:qb,safeParseAsync:Jb,set:JR,setErrorMap:hz,size:jc,slugify:Vc,startsWith:Ac,strictObject:ZR,string:St,stringFormat:ER,stringbool:dz,success:tz,superRefine:Wy,symbol:FR,templateLiteral:oz,toJSONSchema:Ub,toLowerCase:Uc,toUpperCase:Bc,transform:gu,treeifyError:kh,trim:Lc,tuple:yy,uint32:zR,uint64:NR,ulid:gR,undefined:LR,union:Na,unknown:Fr,uppercase:Rc,url:uR,util:wh,uuid:aR,uuidv4:sR,uuidv6:lR,uuidv7:cR,void:BR,xid:vR},Symbol.toStringTag,{value:"Module"})),wz=cn({x:wt(),y:wt(),screenWidth:wt().optional(),screenHeight:wt().optional()}),Su=wz,Zy=cn({text:St()}),Gy=cn({direction:un(["up","down"])}),Iz=cn({x1:wt(),y1:wt(),x2:wt(),y2:wt(),duration:wt().optional().default(500)}),Hy=cn({text:St().optional(),elementId:St().optional(),direction:un(["up","down"]),maxScrolls:wt().optional()}),Ky=cn({url:St()}),kz=cn({elementId:St()}),_z=cn({mode:un(["adb","appium"])});Na([Su,Zy,Gy,Iz,Hy,Ky,kz,_z]);un(["tap","type","scroll","swipe","scrollUntil","deepLink","elementId"]);const hr=oe.object({id:oe.number(),descriptionText:oe.string().optional(),optional:oe.boolean().optional(),status:oe.string().optional(),statusColor:oe.string().optional(),statusDiv:oe.custom().optional(),element:oe.custom().optional(),originRef:oe.object({refId:oe.number(),path:oe.string(),descriptionText:oe.string().optional(),optional:oe.boolean().optional(),overrides:oe.record(oe.string(),oe.string()).optional()}).optional()}),qy=hr.extend({cropBase64:oe.string().optional()}),$u=qy.extend(Su.shape).extend({type:oe.literal("tap"),elementId:oe.string().optional(),timeout:oe.number().optional(),useLlmOnly:oe.boolean().optional()}),wu=qy.extend(Su.shape).extend({type:oe.literal("assert"),cropBase64:oe.string().optional(),elementId:oe.string().optional(),timeout:oe.number().optional(),useLlmOnly:oe.boolean().optional()}),Iu=hr.extend(Zy.shape).extend({type:oe.literal("type")}),ku=hr.extend(Gy.shape).extend({type:oe.literal("scroll")}),_u=hr.extend(Hy.shape).extend({type:oe.literal("scrollUntil")}),Cu=hr.extend(Ky.shape).extend({type:oe.literal("deeplink")}),Eu=hr.extend({type:oe.literal("ai"),instruction:oe.string()}),Pu=hr.extend({type:oe.literal("fileRef"),path:oe.string(),overrides:oe.record(oe.string(),oe.string()).optional()}),wn={statusDiv:!0,element:!0,status:!0,statusColor:!0,originRef:!0},Ou=oe.discriminatedUnion("type",[$u,wu,Iu,ku,_u,Cu,Eu,Pu]),Bp=oe.enum(["tap","assert","type","scroll","scrollUntil","deeplink","ai","fileRef"]),Cz=oe.object({name:oe.string(),steps:oe.array(Ou),params:oe.record(oe.string(),oe.string())});oe.object({isRecording:oe.boolean(),enableAnimations:oe.boolean(),mode:oe.enum(["interact","assert"]),test:Cz,isPlaying:oe.boolean(),isDeviceConnected:oe.boolean(),connectionStatus:oe.string(),currentStepId:oe.number().nullable(),selectedPlatform:oe.enum(["android","ios"]).default("android"),selectedDeviceId:oe.string().optional(),executionLog:oe.array(oe.object({stepId:oe.number(),stepNumber:oe.number(),screenshot:oe.string(),cacheHit:oe.boolean(),timestamp:oe.number()})).default([]),currentScreenshot:oe.string().nullable().default(null)});const Ez=oe.discriminatedUnion("type",[$u.omit(wn),wu.omit(wn),Iu.omit(wn),ku.omit(wn),_u.omit(wn),Cu.omit(wn),Eu.omit(wn),Pu.omit(wn)]);oe.object({name:oe.string(),steps:oe.array(Ez),params:oe.record(oe.string(),oe.string())});const de=new af({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}),La=Me.div`
|
|
183
|
-
overflow-block: auto;
|
|
184
|
-
border-radius: 12px;
|
|
185
|
-
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
186
|
-
background-color: #fff;
|
|
187
|
-
padding: 1.5rem;
|
|
188
|
-
`,Pz=Fe(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"})),Oz=Fe(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"})),jz=Fe(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"})),Dz=Fe(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"})),Tz=Fe(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"})),Tn=Fe(f.jsx("path",{d:"M8 5v14l11-7z"})),Rn=Fe(f.jsx("path",{d:"m4 18 8.5-6L4 6zm9-12v12l8.5-6z"})),zn=Fe(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"})),xn=Fe(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"})),An=M(Pn)(({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)"}}})),Mn=M(Ce)(({theme:e})=>({fontWeight:"bold",fontSize:"1.2em",color:e.palette.primary.main,minWidth:30})),Nn=M(pt)({flexGrow:1}),gr=({path:e})=>f.jsxs(Ce,{variant:"caption",color:"info.main",sx:{display:"block",fontFamily:"monospace"},children:["from ",e]}),Fn=M(Ce)(({statuscolor:e})=>({fontSize:"0.8em",marginTop:4,color:e||"#666",fontWeight:500})),Ln=M(pt)({display:"flex",alignItems:"center",gap:4}),Jy=M("img")(({theme:e})=>({border:`1px solid ${e.palette.divider}`,borderRadius:4,boxShadow:e.shadows[2],width:60,height:60,objectFit:"cover"})),Ke=(e,t)=>{de.setState(r=>({...r,test:{...r.test,steps:r.test.steps.map(o=>o.id===e?{...o,...t}:o)}}))},Rz=({step:e,stepNumber:t,onPlay:r,onPlayFromHere:o,onEdit:n,onDelete:i})=>f.jsxs(An,{elevation:1,children:[f.jsx(Mn,{children:t}),f.jsxs(Nn,{children:[f.jsx(Ce,{variant:"body2",color:"text.secondary",fontFamily:"monospace",children:"📄 File Reference"}),f.jsx(Ce,{fontWeight:"bold",children:e.descriptionText||"Add steps from file"}),f.jsxs(Ce,{variant:"body2",children:["Path: ",e.path]}),e.overrides&&Object.keys(e.overrides).length>0&&f.jsxs(pt,{sx:{mt:.5,display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:[f.jsx(Ce,{variant:"caption",color:"text.secondary",children:"Overrides:"}),Object.keys(e.overrides).map(a=>f.jsx(on,{size:"small",label:`${a}`},a))]}),e.status&&f.jsx(Fn,{statuscolor:e.statusColor,children:e.status}),f.jsx(yt,{control:f.jsx(Dt,{size:"small",checked:e.optional??!1,onChange:(a,s)=>Ke(e.id,{optional:s})}),label:"Optional"}),f.jsx(Le,{size:"small",label:"File path (relative to tests)",value:e.path??"",onChange:a=>Ke(e.id,{path:a.target.value}),fullWidth:!0,margin:"dense"})]}),f.jsxs(Ln,{children:[o&&f.jsx(je,{onClick:o,size:"small","aria-label":"Play",children:f.jsx(Tn,{fontSize:"small"})}),o&&f.jsx(je,{onClick:o,size:"small","aria-label":"Play from here",children:f.jsx(Rn,{fontSize:"small"})}),n&&f.jsx(je,{onClick:n,size:"small","aria-label":"Edit",children:f.jsx(zn,{fontSize:"small"})}),i&&f.jsx(je,{onClick:i,size:"small","aria-label":"Delete",children:f.jsx(xn,{fontSize:"small"})})]})]}),zz=({step:e,stepNumber:t,onPlay:r,onPlayFromHere:o,onEdit:n,onDelete:i})=>f.jsxs(An,{elevation:1,$hasOrigin:!!e.originRef,children:[f.jsx(Mn,{children:t}),e.cropBase64&&f.jsx(Jy,{src:e.cropBase64,alt:"tap target"}),f.jsxs(Nn,{children:[e.originRef?.path&&f.jsx(gr,{path:e.originRef?.path}),f.jsxs(Ce,{variant:"body2",color:"text.secondary",fontFamily:"monospace",children:["👆 X: ",Math.round(e.x),", Y: ",Math.round(e.y)]}),f.jsx(Ce,{fontWeight:"bold",children:e.descriptionText||"Tap Interaction"}),e.status&&f.jsx(Fn,{statuscolor:e.statusColor,children:e.status}),f.jsx(yt,{control:f.jsx(Dt,{size:"small",checked:e.optional??!1,onChange:(a,s)=>Ke(e.id,{optional:s})}),label:"Optional"}),f.jsx(yt,{control:f.jsx(Dt,{size:"small",checked:e.useLlmOnly??!1,onChange:(a,s)=>Ke(e.id,{useLlmOnly:s})}),label:"LLM Only"}),f.jsx(Le,{size:"small",label:"Element ID",value:e.elementId??"",onChange:a=>Ke(e.id,{elementId:a.target.value}),fullWidth:!0,margin:"dense"}),f.jsx(Le,{size:"small",label:"Timeout (ms)",type:"number",value:e.timeout??"",placeholder:"3000",onChange:a=>Ke(e.id,{timeout:a.target.value?parseInt(a.target.value):void 0}),fullWidth:!0,margin:"dense"})]}),f.jsxs(Ln,{children:[f.jsx(je,{size:"small",onClick:r,title:"Play this step",children:f.jsx(Tn,{})}),f.jsx(je,{size:"small",onClick:o,title:"Play from here",children:f.jsx(Rn,{})}),f.jsx(je,{size:"small",onClick:n,title:"Edit",children:f.jsx(zn,{})}),f.jsx(je,{size:"small",onClick:i,title:"Delete",children:f.jsx(xn,{})})]})]}),Az=({step:e,stepNumber:t,onPlay:r,onPlayFromHere:o,onEdit:n,onDelete:i})=>f.jsxs(An,{elevation:1,$hasOrigin:!!e.originRef,children:[f.jsx(Mn,{children:t}),e.cropBase64&&f.jsx(Jy,{src:e.cropBase64,alt:"assert target",sx:{border:2,borderColor:"warning.main"}}),f.jsxs(Nn,{children:[e.originRef?.path&&f.jsx(gr,{path:e.originRef?.path}),f.jsxs(Ce,{variant:"body2",color:"text.secondary",fontFamily:"monospace",children:["👁️ X: ",Math.round(e.x),", Y: ",Math.round(e.y)]}),f.jsx(Ce,{fontWeight:"bold",children:e.descriptionText||"Assert Element"}),e.status&&f.jsx(Fn,{statuscolor:e.statusColor,children:e.status}),f.jsx(yt,{control:f.jsx(Dt,{size:"small",checked:e.optional??!1,onChange:(a,s)=>Ke(e.id,{optional:s})}),label:"Optional"}),f.jsx(yt,{control:f.jsx(Dt,{size:"small",checked:e.useLlmOnly??!1,onChange:(a,s)=>Ke(e.id,{useLlmOnly:s})}),label:"LLM Only"}),f.jsx(Le,{size:"small",label:"Element ID",value:e.elementId??"",onChange:a=>Ke(e.id,{elementId:a.target.value}),fullWidth:!0,margin:"dense"}),f.jsx(Le,{size:"small",label:"Timeout (ms)",type:"number",value:e.timeout??"",placeholder:"3000",onChange:a=>Ke(e.id,{timeout:a.target.value?parseInt(a.target.value):void 0}),fullWidth:!0,margin:"dense"})]}),f.jsxs(Ln,{children:[f.jsx(je,{size:"small",onClick:r,title:"Play this step",children:f.jsx(Tn,{})}),f.jsx(je,{size:"small",onClick:o,title:"Play from here",children:f.jsx(Rn,{})}),f.jsx(je,{size:"small",onClick:n,title:"Edit",children:f.jsx(zn,{})}),f.jsx(je,{size:"small",onClick:i,title:"Delete",children:f.jsx(xn,{})})]})]}),Mz=({step:e,stepNumber:t,onPlay:r,onPlayFromHere:o,onEdit:n,onDelete:i})=>f.jsxs(An,{elevation:1,$hasOrigin:!!e.originRef,children:[f.jsx(Mn,{children:t}),f.jsx(on,{icon:f.jsx(Pz,{}),label:"Type",color:"primary",variant:"outlined"}),f.jsxs(Nn,{children:[e.originRef?.path&&f.jsx(gr,{path:e.originRef?.path}),f.jsx(Ce,{fontWeight:"bold",children:e.descriptionText||`Type "${e.text}"`}),e.status&&f.jsx(Fn,{statuscolor:e.statusColor,children:e.status}),f.jsx(Le,{size:"small",label:"Text to type",value:e.text,onChange:a=>Ke(e.id,{text:a.target.value,descriptionText:`Type "${a.target.value}"`}),fullWidth:!0,margin:"dense"}),f.jsx(yt,{control:f.jsx(Dt,{size:"small",checked:e.optional??!1,onChange:(a,s)=>Ke(e.id,{optional:s})}),label:"Optional"})]}),f.jsxs(Ln,{children:[f.jsx(je,{size:"small",onClick:r,title:"Play this step",children:f.jsx(Tn,{})}),f.jsx(je,{size:"small",onClick:o,title:"Play from here",children:f.jsx(Rn,{})}),f.jsx(je,{size:"small",onClick:n,title:"Edit",children:f.jsx(zn,{})}),f.jsx(je,{size:"small",onClick:i,title:"Delete",children:f.jsx(xn,{})})]})]}),Nz=({step:e,stepNumber:t,onPlay:r,onPlayFromHere:o,onEdit:n,onDelete:i})=>f.jsxs(An,{elevation:1,$hasOrigin:!!e.originRef,children:[f.jsx(Mn,{children:t}),f.jsx(on,{icon:f.jsx(Oz,{}),label:"Scroll",color:"secondary",variant:"outlined"}),f.jsxs(Nn,{children:[e.originRef?.path&&f.jsx(gr,{path:e.originRef?.path}),f.jsx(Ce,{fontWeight:"bold",children:e.descriptionText||`Scroll ${e.direction}`}),e.status&&f.jsx(Fn,{statuscolor:e.statusColor,children:e.status}),f.jsxs(pt,{display:"flex",gap:1,mt:1,children:[f.jsx(on,{label:"↑ Up",size:"small",color:e.direction==="up"?"primary":"default",onClick:()=>Ke(e.id,{direction:"up",descriptionText:"Scroll up"}),sx:{cursor:"pointer"}}),f.jsx(on,{label:"↓ Down",size:"small",color:e.direction==="down"?"primary":"default",onClick:()=>Ke(e.id,{direction:"down",descriptionText:"Scroll down"}),sx:{cursor:"pointer"}})]}),f.jsx(yt,{control:f.jsx(Dt,{size:"small",checked:e.optional??!1,onChange:(a,s)=>Ke(e.id,{optional:s})}),label:"Optional",sx:{display:"block",mt:1}})]}),f.jsxs(Ln,{children:[f.jsx(je,{size:"small",onClick:r,title:"Play this step",children:f.jsx(Tn,{})}),f.jsx(je,{size:"small",onClick:o,title:"Play from here",children:f.jsx(Rn,{})}),f.jsx(je,{size:"small",onClick:n,title:"Edit",children:f.jsx(zn,{})}),f.jsx(je,{size:"small",onClick:i,title:"Delete",children:f.jsx(xn,{})})]})]}),Fz=({step:e,stepNumber:t,onPlay:r,onPlayFromHere:o,onEdit:n,onDelete:i})=>f.jsxs(An,{elevation:1,$hasOrigin:!!e.originRef,children:[f.jsx(Mn,{children:t}),f.jsx(on,{icon:f.jsx(jz,{}),label:"Scroll Until",color:"info",variant:"outlined"}),f.jsxs(Nn,{children:[e.originRef?.path&&f.jsx(gr,{path:e.originRef?.path}),f.jsx(Ce,{fontWeight:"bold",children:e.descriptionText||"Scroll Until Found"}),e.status&&f.jsx(Fn,{statuscolor:e.statusColor,children:e.status}),f.jsx(Le,{size:"small",label:"Find text",value:e.text??"",onChange:a=>Ke(e.id,{text:a.target.value}),fullWidth:!0,margin:"dense"}),f.jsx(Le,{size:"small",label:"Element ID",value:e.elementId??"",onChange:a=>Ke(e.id,{elementId:a.target.value}),fullWidth:!0,margin:"dense"}),f.jsxs(pt,{display:"flex",gap:1,mt:1,alignItems:"center",children:[f.jsx(on,{label:"↑ Up",size:"small",color:e.direction==="up"?"primary":"default",onClick:()=>Ke(e.id,{direction:"up"}),sx:{cursor:"pointer"}}),f.jsx(on,{label:"↓ Down",size:"small",color:e.direction==="down"?"primary":"default",onClick:()=>Ke(e.id,{direction:"down"}),sx:{cursor:"pointer"}}),f.jsx(Le,{size:"small",label:"Max Scrolls",type:"number",value:e.maxScrolls,onChange:a=>Ke(e.id,{maxScrolls:parseInt(a.target.value)||15}),sx:{width:120}})]}),f.jsx(yt,{control:f.jsx(Dt,{size:"small",checked:e.optional??!1,onChange:(a,s)=>Ke(e.id,{optional:s})}),label:"Optional",sx:{display:"block",mt:1}})]}),f.jsxs(Ln,{children:[f.jsx(je,{size:"small",onClick:r,title:"Play this step",children:f.jsx(Tn,{})}),f.jsx(je,{size:"small",onClick:o,title:"Play from here",children:f.jsx(Rn,{})}),f.jsx(je,{size:"small",onClick:n,title:"Edit",children:f.jsx(zn,{})}),f.jsx(je,{size:"small",onClick:i,title:"Delete",children:f.jsx(xn,{})})]})]}),Lz=({step:e,stepNumber:t,onPlay:r,onPlayFromHere:o,onEdit:n,onDelete:i})=>f.jsxs(An,{elevation:1,$hasOrigin:!!e.originRef,children:[f.jsx(Mn,{children:t}),f.jsx(on,{icon:f.jsx(Dz,{}),label:"Deeplink",color:"success",variant:"outlined"}),f.jsxs(Nn,{children:[e.originRef?.path&&f.jsx(gr,{path:e.originRef?.path}),f.jsx(Ce,{fontWeight:"bold",children:e.descriptionText||"Open Deep Link"}),e.status&&f.jsx(Fn,{statuscolor:e.statusColor,children:e.status}),f.jsx(Le,{size:"small",label:"URL",value:e.url,onChange:a=>Ke(e.id,{url:a.target.value,descriptionText:`Open Deep Link: ${a.target.value}`}),fullWidth:!0,margin:"dense",placeholder:"myapp://home"}),f.jsx(yt,{control:f.jsx(Dt,{size:"small",checked:e.optional??!1,onChange:(a,s)=>Ke(e.id,{optional:s})}),label:"Optional",sx:{display:"block"}})]}),f.jsxs(Ln,{children:[f.jsx(je,{size:"small",onClick:r,title:"Play this step",children:f.jsx(Tn,{})}),f.jsx(je,{size:"small",onClick:o,title:"Play from here",children:f.jsx(Rn,{})}),f.jsx(je,{size:"small",onClick:n,title:"Edit",children:f.jsx(zn,{})}),f.jsx(je,{size:"small",onClick:i,title:"Delete",children:f.jsx(xn,{})})]})]}),Uz=({step:e,stepNumber:t,onPlay:r,onPlayFromHere:o,onEdit:n,onDelete:i})=>f.jsxs(An,{elevation:1,$hasOrigin:!!e.originRef,children:[f.jsx(Mn,{children:t}),f.jsx(on,{icon:f.jsx(Tz,{}),label:"AI",color:"secondary"}),f.jsxs(Nn,{children:[e.originRef?.path&&f.jsx(gr,{path:e.originRef?.path}),f.jsx(Ce,{fontWeight:"bold",children:e.descriptionText||"AI Instruction"}),e.status&&f.jsx(Fn,{statuscolor:e.statusColor,children:e.status}),f.jsx(Le,{size:"small",label:"Instruction",value:e.instruction,onChange:a=>Ke(e.id,{instruction:a.target.value,descriptionText:`AI: ${a.target.value}`}),fullWidth:!0,margin:"dense",multiline:!0,rows:2}),f.jsx(yt,{control:f.jsx(Dt,{size:"small",checked:e.optional??!1,onChange:(a,s)=>Ke(e.id,{optional:s})}),label:"Optional",sx:{display:"block"}})]}),f.jsxs(Ln,{children:[f.jsx(je,{size:"small",onClick:r,title:"Play this step",children:f.jsx(Tn,{})}),f.jsx(je,{size:"small",onClick:o,title:"Play from here",children:f.jsx(Rn,{})}),f.jsx(je,{size:"small",onClick:n,title:"Edit",children:f.jsx(zn,{})}),f.jsx(je,{size:"small",onClick:i,title:"Delete",children:f.jsx(xn,{})})]})]}),Bz=()=>{throw new Error("createServerOnlyFn() functions can only be called on the server!")},Ze=(e,t)=>{const r=t||e||{};return typeof r.method>"u"&&(r.method="GET"),Object.assign(i=>{const a={...r,...i};return Ze(void 0,a)},{options:r,middleware:i=>{const a=[...r.middleware||[]];i.map(c=>{Uu in c?c.options.middleware&&a.push(...c.options.middleware):a.push(c)});const s={...r,middleware:a},l=Ze(void 0,s);return l[Uu]=!0,l},inputValidator:i=>{const a={...r,inputValidator:i};return Ze(void 0,a)},handler:(...i)=>{const[a,s]=i,l={...r,extractedFn:a,serverFn:s},c=[...l.middleware||[],Gz(l)];return Object.assign(async u=>Vp(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=Bz(),m=p.contextAfterGlobalMiddlewares,h={...a,...u,context:{...m,...u.context},signal:d,request:p.request};return Vp(c,"server",h).then(g=>({result:g.result,error:g.error,context:g.sendContext}))}})}})};async function Vp(e,t,r){const o=jx()?.functionMiddleware||[],n=Vz([...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 Zz(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?Wz(l,a,async c=>i(c).catch(u=>{if(Dx(u)||Tx(u))return{...c,error:u};throw u})):i(a)};return i({...r,headers:r.headers||{},sendContext:r.sendContext||{},context:r.context||{}})}function Vz(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 Wz=async(e,t,r)=>e({...t,next:(async(o={})=>r({...t,...o,context:{...t.context,...o.context},sendContext:{...t.sendContext,...o.sendContext??{}},headers:zx(t.headers,o.headers),result:o.result!==void 0?o.result:o instanceof Response?o:t.result,error:o.error??t.error}))});function Zz(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 Gz(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 Hz=Ye("605c05774def700303f9889c0f8a28fed026e0b5c36a1563cff2835ee01d26b1"),Kz=Ze({method:"POST"}).handler(Hz),Xy={mutationKey:["device","tap"],mutationFn:e=>Kz({data:e})},qz=Ye("07e23aa87e88d53c6c9e3d8e88de788d27d7b10930150bc4fd510d4447aaf3de"),Jz=Ze({method:"POST"}).handler(qz),Xz={mutationKey:["device","type"],mutationFn:e=>Jz({data:e})},Yz=Ye("5c526b678a7596f28beca76784df0ac58acd292627c5770c0c8029e38e4681ec"),Qz=Ze({method:"POST"}).handler(Yz),eA={mutationKey:["device","scroll"],mutationFn:e=>Qz({data:e})},tA=Ye("2b4a002699960d578addbcf4dd83fedcec62444d7da4bf7c2359be991ed6207e");Ze({method:"POST"}).handler(tA);const nA=Ye("10b616f4aacf11bb275166e4ae03f441f1d7c9a68a670dfadb03b74e1d012900"),rA=Ze({method:"POST"}).handler(nA),oA={mutationKey:["device","scrollUntil"],mutationFn:e=>rA({data:e})},iA=Ye("566ee4344553ab6300f847f5de346e037f92d986cb824ba1c313346e62345fbe"),aA=Ze({method:"POST"}).handler(iA),sA={mutationKey:["device","deepLink"],mutationFn:e=>aA({data:e})},lA=Ye("eea1073a910f7f023004366aafcef05a8c47a3a1a4a09721f71a2efe311ee70f"),cA=Ze({method:"POST"}).handler(lA),uA={mutationKey:["device","appium","start"],mutationFn:e=>cA({data:e})},dA=Ye("6dbdc2968dc27a948c345034d1e55082b86918953b61da020ea8dd5836c79db3"),pA=Ze({method:"GET"}).handler(dA),fA=(e={})=>({queryKey:["device","appium","status",e],queryFn:()=>pA({data:e}),refetchInterval:2e3}),mA=Ye("c5aeaa72b9b3303af5d82ee2fa59e3e90ffef3c3f0fb32707cee49e78ff41066"),Yy=Ze({method:"GET"}).handler(mA),Wp=(e={})=>({queryKey:["device","screenshot",e],queryFn:()=>Yy({data:e}),staleTime:0,gcTime:0}),hA={mutationKey:["device","screenshot_mutation"],mutationFn:e=>Yy({data:e})},gA=Ye("05faf0772038a170c70083fd8de4a8b77a40e4ec46e0bbf6878670f02621b5df"),vA=Ze({method:"POST"}).handler(gA),bA={mutationKey:["device","hierarchy","getElementId"],mutationFn:e=>vA({data:e})},yA=Ye("9bcbf5303827d2a25f347c2054b0121655a82322fa07108653f43246875348f7"),xA=Ze({method:"POST"}).handler(yA),SA={mutationKey:["device","hierarchy","findElementById"],mutationFn:e=>xA({data:e})},$A=Ye("9f335634267a450fc9f34b1ab33c55da00cb1efc709604b2e3114602020075a2"),wA=Ze({method:"POST"}).handler($A),IA={mutationKey:["device","adb","disableAnimations"],mutationFn:()=>wA()},kA=Ye("33557b2fcc5cedc5814d20bca9cd9cde2e45318755de1da4d613e8fa84ee38d1"),_A=Ze({method:"GET"}).handler(kA),Qy={queryKey:["devices"],queryFn:()=>_A()},CA=Ye("fcbe7e11d05240fa28a1dd79ec8c395f6c03682edbaeb19f469bd78d6399cdde"),EA=Ze({method:"POST"}).handler(CA),PA=Ye("7d2aacaab26ab11cdc66f03a4ed01b8b38186abf16ab1f9306801ea7769aaa2a"),OA=Ze({method:"POST"}).handler(PA),jA={mutationFn:e=>OA({data:e})},DA={mutationFn:e=>EA({data:e})},TA=Ye("5918013064f9b88efb265b30a770275d6c9d52bf42318f451bab8a47bc850917"),RA=Ze({method:"POST"}).handler(TA),zA={mutationKey:["ai","executeAgentStep"],mutationFn:e=>RA({data:e})};cn({name:St(),type:un(["file","directory"]),path:St()});const AA=Ye("00fb1fe03e9689cf8c179ba0d5cadc5eeaa6879def224ac38037d70a1a51300d"),MA=Ze({method:"GET"}).handler(AA),ju={queryKey:["files"],queryFn:()=>MA()},NA=Ye("ac7bf7f1d727949cd28713a8f36bb77e7bd8fc0e48854ed8cb1ee93ce80fb6d0"),FA=Ze({method:"POST"}).handler(NA),LA={mutationKey:["createFile"],mutationFn:e=>FA({data:e})},UA=Ye("b41e844ce533c224e7c720e69d821468deffcbf208fc008a7f5af83cb0596b15"),BA=Ze({method:"POST"}).handler(UA),Du={mutationKey:["readFile"],mutationFn:e=>BA({data:e})},VA=Ye("1b2a0d276d9ce90b2a1d72134c1bf95b9f6b7b049a8f415e8f0da3e6fc5ce4ae"),WA=Ze({method:"POST"}).handler(VA),ZA={mutationKey:["saveFile"],mutationFn:e=>WA({data:e})},GA=Ye("098d52adf25ea567d43facba347871f887828c6ab804021bbfa0f2759209c0c6"),HA=Ze({method:"POST"}).handler(GA),KA={mutationKey:["renameFile"],mutationFn:e=>HA({data:e})},qA=Ye("efbbc22c41cf491631b07076417c9ec65d5ac71debfcc00b5a7e0d368772104f");Ze({method:"POST"}).handler(qA);const $r=new WeakMap,ki=new WeakMap,na={current:[]};let ls=!1,yo=0;const uo=new Set,mi=new Map;function ex(e){const t=Array.from(e).sort((r,o)=>r instanceof mn&&r.options.deps.includes(o)?1:o instanceof mn&&o.options.deps.includes(r)?-1:0);for(const r of t){if(na.current.includes(r))continue;na.current.push(r),r.recompute();const o=ki.get(r);if(o)for(const n of o){const i=$r.get(n);i&&ex(i)}}}function JA(e){const t={prevVal:e.prevState,currentVal:e.state};for(const r of e.listeners)r(t)}function XA(e){const t={prevVal:e.prevState,currentVal:e.state};for(const r of e.listeners)r(t)}function tx(e){if(yo>0&&!mi.has(e)&&mi.set(e,e.prevState),uo.add(e),!(yo>0)&&!ls)try{for(ls=!0;uo.size>0;){const t=Array.from(uo);uo.clear();for(const r of t){const o=mi.get(r)??r.prevState;r.prevState=o,JA(r)}for(const r of t){const o=$r.get(r);o&&(na.current.push(r),ex(o))}for(const r of t){const o=$r.get(r);if(o)for(const n of o)XA(n)}}}finally{ls=!1,na.current=[],mi.clear()}}function tn(e){yo++;try{e()}finally{if(yo--,yo===0){const t=uo.values().next().value;t&&tx(t)}}}function YA(e){return typeof e=="function"}class Us{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):YA(t)?this.state=t(this.prevState):this.state=t,(n=(o=this.options)==null?void 0:o.onUpdate)==null||n.call(o),tx(this)}}class mn{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 mn&&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 mn)r.registerOnGraph(),this.registerOnGraph(r.options.deps);else if(r instanceof Us){let o=$r.get(r);o||(o=new Set,$r.set(r,o)),o.add(this);let n=ki.get(this);n||(n=new Set,ki.set(this,n)),n.add(r)}}unregisterFromGraph(t=this.options.deps){for(const r of t)if(r instanceof mn)this.unregisterFromGraph(r.options.deps);else if(r instanceof Us){const o=$r.get(r);o&&o.delete(this);const n=ki.get(this);n&&n.delete(r)}}}var QA=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 eM(e,t){return new QA(e,t).maybeExecute}class tM{#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 nM extends tM{constructor(){super({pluginId:"form-devtools",reconnectEveryMs:1e3})}}const At=new nM;function Ua(e,t){return typeof e=="function"?e(t):e}function hi(e,t){return Tu(t).reduce((o,n)=>{if(o===null)return null;if(typeof o<"u")return o[n]},e)}function gi(e,t,r){const o=Tu(t);function n(i){if(!o.length)return Ua(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 rM(e,t){const r=Tu(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 oM=/^(\d+)$/gm,iM=/\.(\d+)(?=\.)/gm,aM=/^(\d+)\./gm,sM=/\.(\d+$)/gm,lM=/\.{2,}/gm,Bs="__int__",vi=`${Bs}$1`;function Tu(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(oM,vi).replace(iM,`.${vi}.`).replace(aM,`${vi}.`).replace(sM,`.${vi}`).replace(lM,".").split(".").map(t=>{if(t.startsWith(Bs)){const r=t.substring(Bs.length),o=parseInt(r,10);return String(o)===r?o:r}return t})}function cM(e){return!(Array.isArray(e)&&e.length===0)}function Vs(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 Ws(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 Zs=e=>!!e&&typeof e=="object"&&"fields"in e;function In(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)||!In(e[n],t[n]))return!1;return!0}const Zp=({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},Gp=({formLevelError:e,fieldLevelError:t})=>t?{newErrorValue:t,newSource:"field"}:e?{newErrorValue:e,newSource:"form"}:{newErrorValue:void 0,newSource:void 0};function $t(e,t){return e==null?t:{...e,...t}}let Yn=256;const _i=[];let bi;for(;Yn--;)_i[Yn]=(Yn+256).toString(16).substring(1);function nx(){let e=0,t,r="";if(!bi||Yn+16>256){for(bi=new Array(256),e=256;e--;)bi[e]=256*Math.random()|0;e=0,Yn=0}for(;e<16;e++)t=bi[Yn+e],e===6?r+=_i[t&15|64]:e===8?r+=_i[t&63|128]:r+=_i[t],e&1&&e>1&&e<11&&(r+="-");return Yn++,r}const uM=eM(e=>At.emit("form-state",{id:e.formId,state:e.store.state}),{wait:300}),Sr=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 dM(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 Hp=(e,t)=>{const r=dM(e,t);return{form:r,fields:r}},wr={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:Hp(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:Hp(o.issues,e)}},rx=e=>!!e&&"~standard"in e,ra={isValidating:!1,isTouched:!1,isBlurred:!1,isDirty:!1,isPristine:!0,isValid:!0,isDefaultValue:!0,errors:[],errorMap:{},errorSourceMap:{}};function yi(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,$)=>($.startsWith(i(u,d))&&y.set($,e.getFieldMeta($)),y),new Map);l(m,d<p?"up":"down"),Object.keys(e.fieldInfo).filter(y=>y.startsWith(i(u,p))).forEach(y=>{const $=y.replace(i(u,p),i(u,d)),S=v.get($);S&&e.setFieldMeta(y,S)})}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=()=>ra;return{handleArrayMove:t,handleArrayRemove:r,handleArraySwap:o,handleArrayInsert:n}}function cs(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 Kp{constructor(t){this.options={},this.fieldInfo={},this.prevTransformArray=[],this.mount=()=>{const r=this.fieldMetaDerived.mount(),o=this.store.mount(),n=()=>{r(),o(),At.emit("form-unmounted",{id:this._formId})};this.options.listeners?.onMount?.({formApi:this});const{onMount:i}=this.options.validators||{};return At.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&&!In(r.defaultValues,o.defaultValues)&&!this.state.isTouched,a=!In(r.defaultState,o.defaultState)&&!this.state.isTouched;!i&&!a&&!n||(tn(()=>{this.baseStore.setState(()=>cs(Object.assign({},this.state,a?r.defaultState:{},i?{values:r.defaultValues}:{},n?{_force_re_eval:!this.state._force_re_eval}:{})))}),At.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(()=>cs({...this.options.defaultState,values:r??this.options.defaultValues??this.options.defaultState?.values,fieldMetaBase:i}))},this.validateAllFields=async r=>{const o=[];return tn(()=>{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 tn(()=>{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=Vs(r,{...this.options,form:this,validationLogic:this.options.validationLogic||Sr});let n=!1;const i={};return tn(()=>{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}=Ci(c),p=no(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:$,newSource:S}=Zp({newFormValidatorError:y,isPreviousErrorFromFormValidator:v?.[p]==="form",previousErrorValue:g?.[p]});S==="form"&&(i[m]={...i[m],[p]:y}),g?.[p]!==$&&this.setFieldMeta(m,x=>({...x,errorMap:{...x.errorMap,[p]:$},errorSourceMap:{...x.errorSourceMap,[p]:S}}))}this.state.errorMap?.[p]!==u&&this.baseStore.setState(m=>({...m,errorMap:{...m.errorMap,[p]:u}})),(u||d)&&(n=!0)}const a=no("submit");this.state.errorMap?.[a]&&r!=="submit"&&!n&&this.baseStore.setState(l=>({...l,errorMap:{...l.errorMap,[a]:void 0}}));const s=no("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=Ws(r,{...this.options,form:this,validationLogic:this.options.validationLogic||Sr});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=no(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,$)=>{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(S){$(S)}},l.debounceMs)})}catch(y){m=y}const{formError:h,fieldErrors:g}=Ci(m);g&&(i=i?{...i,...g}:g);const v=no(l.cause);for(const y of Object.keys(this.state.fieldMeta)){if(this.baseStore.state.fieldMetaBase[y]===void 0)continue;const $=this.getFieldMeta(y);if(!$)continue;const{errorMap:S,errorSourceMap:x}=$,w=i?.[y],{newErrorValue:I,newSource:_}=Zp({newFormValidatorError:w,isPreviousErrorFromFormValidator:x?.[v]==="form",previousErrorValue:S?.[v]});S?.[v]!==I&&this.setFieldMeta(y,k=>({...k,errorMap:{...k.errorMap,[v]:I},errorSourceMap:{...k.errorSourceMap,[v]:_}}))}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})),tn(()=>{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}),At.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}),At.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:"validate",errors:this.state.errors});return}tn(()=>{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}),tn(()=>{this.baseStore.setState(i=>({...i,isSubmitted:!0,isSubmitSuccessful:!0})),At.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!0}),n()})}catch(i){throw this.baseStore.setState(a=>({...a,isSubmitSuccessful:!1})),At.emit("form-submission",{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:"inflight",onError:i}),n(),i}},this.getFieldValue=r=>hi(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]:Ua(o,n.fieldMetaBase[r])}}))},this.resetFieldMeta=r=>Object.keys(r).reduce((o,n)=>{const i=n;return o[i]=ra,o},{}),this.setFieldValue=(r,o,n)=>{const i=n?.dontUpdateMeta??!1,a=n?.dontRunListeners??!1,s=n?.dontValidate??!1;tn(()=>{i||this.setFieldMeta(r,l=>({...l,isTouched:!0,isDirty:!0,errorMap:{...l?.errorMap,onMount:void 0}})),this.baseStore.setState(l=>({...l,values:gi(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=rM(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)],$t(i,{dontValidate:!0}));const a=i?.dontValidate??!1;a||await this.validateField(r,"change"),yi(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),$t(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),$t(n,{dontValidate:!0})),yi(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 gi(gi(s,`${o}`,c),`${n}`,l)},$t(i,{dontValidate:!0})),yi(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},$t(i,{dontValidate:!0})),yi(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,[],$t(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]:ra},values:this.options.defaultValues?gi(o.values,r,hi(this.options.defaultValues,r)):o.values}))},this.setErrorMap=r=>{tn(()=>{Object.entries(r).forEach(([o,n])=>{const i=o;if(Zs(n)){const{formError:a,fieldErrors:s}=Ci(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=>wr.validate({value:this.state.values,validationSource:"form"},r),this.parseValuesWithSchemaAsync=r=>wr.validateAsync({value:this.state.values,validationSource:"form"},r),this.timeoutIds={validations:{},listeners:{},formListeners:{}},this._formId=t?.formId??nx(),this._devtoolsSubmissionOverride=!1,this.baseStore=new Us(cs({...t?.defaultState,values:t?.defaultValues??t?.defaultState?.values})),this.fieldMetaDerived=new mn({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=hi(s.values,u);let g=m?.errors;if(!p||d.errorMap!==p.errorMap){g=Object.values(d.errorMap??{}).filter(x=>x!==void 0);const S=this.getFieldInfo(u)?.instance;S&&!S.options.disableErrorFlat&&(g=g.flat(1))}const v=!cM(g),y=!d.isDirty,$=In(h,hi(this.options.defaultValues,u))||In(h,this.getFieldInfo(u)?.instance?.options.defaultValue);if(m&&m.isPristine===y&&m.isValid===v&&m.isDefaultValue===$&&m.errors===g&&d===p){c[u]=m,l++;continue}c[u]={...d,errors:g??[],isPristine:y,isValid:v,isDefaultValue:$}}return Object.keys(s.fieldMetaBase).length&&i&&l===Object.keys(s.fieldMetaBase).length?i:c}}),this.store=new mn({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(j=>j.isValidating),d=c.every(j=>j.isValid),p=c.some(j=>j.isTouched),m=c.some(j=>j.isBlurred),h=c.every(j=>j.isDefaultValue),g=p&&s.errorMap?.onMount,v=c.some(j=>j.isDirty),y=!v,$=!!(s.errorMap?.onMount||c.some(j=>j?.errorMap?.onMount)),S=!!u;let x=i?.errors??[];(!a||s.errorMap!==a.errorMap)&&(x=Object.values(s.errorMap).reduce((j,A)=>A===void 0?j:A&&Zs(A)?(j.push(A.form),j):(j.push(A),j),[]));const w=x.length===0,I=d&&w,_=this.options.canSubmitWhenInvalid??!1,k=s.submissionAttempts===0&&!p&&!$||!S&&!s.isSubmitting&&I||_;let P=s.errorMap;if(g&&(x=x.filter(j=>j!==s.errorMap.onMount),P=Object.assign(P,{onMount:void 0})),i&&a&&i.errorMap===P&&i.fieldMeta===this.fieldMetaDerived.state&&i.errors===x&&i.isFieldsValidating===u&&i.isFieldsValid===d&&i.isFormValid===w&&i.isValid===I&&i.canSubmit===k&&i.isTouched===p&&i.isBlurred===m&&i.isPristine===y&&i.isDefaultValue===h&&i.isDirty===v&&In(a,s))return i;let E={...s,errorMap:P,fieldMeta:this.fieldMetaDerived.state,errors:x,isFieldsValidating:u,isFieldsValid:d,isFormValid:w,isValid:I,canSubmit:k,isTouched:p,isBlurred:m,isPristine:y,isDefaultValue:h,isDirty:v};const T=this.options.transform?.deps??[];if(T.length!==this.prevTransformArray.length||T.some((j,A)=>j!==this.prevTransformArray[A])){const j=Object.assign({},this,{state:E});this.options.transform?.fn(j),E=j.state,this.prevTransformArray=T}return E}}),this.handleSubmit=this.handleSubmit.bind(this),this.update(t||{}),this.store.subscribe(()=>{uM(this)}),At.on("request-form-state",r=>{r.payload.id===this._formId&&At.emit("form-api",{id:this._formId,state:this.store.state,options:this.options})}),At.on("request-form-reset",r=>{r.payload.id===this._formId&&this.reset()}),At.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 rx(t.validate)?wr[t.type](t.value,t.validate):t.validate(t.value)}handleSubmit(t){return this._handleSubmit(t)}}function Ci(e){if(e){if(Zs(e)){const t=Ci(e.form).formError,r=e.fields;return{formError:t,fieldErrors:r}}return{formError:e}}return{formError:void 0}}function no(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 qp{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);In(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,$t(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,$t(o,{dontRunListeners:!0})),o?.dontRunListeners||this.triggerOnChangeListener()},this.insertValue=(r,o,n)=>{this.form.insertFieldValue(this.name,r,o,$t(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.replaceValue=(r,o,n)=>{this.form.replaceFieldValue(this.name,r,o,$t(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.removeValue=(r,o)=>{this.form.removeFieldValue(this.name,r,$t(o,{dontRunListeners:!0})),o?.dontRunListeners||this.triggerOnChangeListener()},this.swapValues=(r,o,n)=>{this.form.swapFieldValues(this.name,r,o,$t(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.moveValue=(r,o,n)=>{this.form.moveFieldValues(this.name,r,o,$t(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.clearValues=r=>{this.form.clearFieldValues(this.name,$t(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=Vs(r,{...this.options,form:this.form,validationLogic:this.form.options.validationLogic||Sr}),a=this.getLinkedFields(r).reduce((c,u)=>{const d=Vs(r,{...u.options,form:u.form,validationLogic:u.form.options.validationLogic||Sr});return d.forEach(p=>{p.field=u}),c.concat(d)},[]);let s=!1;tn(()=>{const c=(u,d)=>{const p=xi(d.cause),m=d.validate?Jp(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}=Gp({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=xi("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=Ws(r,{...this.options,form:this.form,validationLogic:this.form.options.validationLogic||Sr}),i=await o,a=this.getLinkedFields(r),s=a.reduce((p,m)=>{const h=Ws(r,{...m.options,form:m.form,validationLogic:m.form.options.validationLogic||Sr});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=xi(m.cause);p.getInfo().validationMetaMap[g]?.lastAbortController.abort();const y=new AbortController;this.getInfo().validationMetaMap[g]={lastAbortController:y},h.push(new Promise(async $=>{let S;try{S=await new Promise((k,P)=>{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(E){P(E)}},m.debounceMs)})}catch(k){S=k}if(y.signal.aborted)return $(void 0);const x=Jp(S),w=i[this.name]?.[g],{newErrorValue:I,newSource:_}=Gp({formLevelError:w,fieldLevelError:x});p.setMeta(k=>({...k,errorMap:{...k?.errorMap,[g]:I},errorSourceMap:{...k.errorSourceMap,[g]:_}})),$(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[xi(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=>wr.validate({value:this.state.value,validationSource:"field"},r),this.parseValueWithSchemaAsync=r=>wr.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 mn({deps:[this.form.store],fn:()=>{const r=this.form.getFieldMeta(this.name)??{...ra,...t.defaultMeta};let o=this.form.getFieldValue(this.name);return!r.isTouched&&o===void 0&&this.options.defaultValue!==void 0&&!In(o,this.options.defaultValue)&&(o=this.options.defaultValue),{value:o,meta:r}}})}get state(){return this.store.state}runValidator(t){return rx(t.validate)?wr[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 Jp(e){if(e)return e}function xi(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 oa=typeof window<"u"?b.useLayoutEffect:b.useEffect;function pM(e){const[t,r]=b.useState(()=>({form:e.form,name:e.name})),[o,n]=b.useState(()=>new qp({...e}));(t.form!==e.form||t.name!==e.name)&&(n(new qp({...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 oa(o.mount,[o]),oa(()=>{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=pM(t),o=b.useMemo(()=>Ua(e,r),[e,r]);return f.jsx(f.Fragment,{children:o})});function fM(){return b.useState(()=>nx())[0]}const mM=b.version.split(".")[0]==="17"?fM:b.useId;function hM({form:e,selector:t,children:r}){const o=Xe(e.store,t);return f.jsx(f.Fragment,{children:Ua(r,o)})}function gM(e){const t=mM(),[r,o]=b.useState(e?.formId),[n,i]=b.useState(()=>new Kp({...e,formId:e?.formId??t}));if(r!==e?.formId){const s=e?.formId??t;i(new Kp({...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(hM,{form:n,selector:c.selector,children:c.children})},s},[n]);return oa(n.mount,[]),oa(()=>{n.update(e)}),a}const vM=Fe(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"})),bM=Fe(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"})),yM=/\{\{\s*([a-zA-Z0-9_.-]+)\s*\}\}/g,xM=e=>{if(!e)return[];const t=new Set;let r;const o=new RegExp(yM);for(;(r=o.exec(e))!==null;)r[1]&&t.add(r[1]);return Array.from(t)};wt({invalid_type_error:"Must be a number"});const rr=wt().min(0,"Must be 0 or greater"),SM=St().min(1,"This field is required");un(["up","down","left","right"],{errorMap:()=>({message:"Invalid direction"})});const ix=un(["up","down"],{errorMap:()=>({message:"Invalid direction"})}),$M=St().min(1,"URL is required").regex(/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\/.+$/,"Invalid deeplink format (e.g., myapp://screen)"),ft=e=>e?.length?e.map(t=>typeof t=="string"?t:t?.message).filter(Boolean).join(", "):null,wM=({step:e,onSave:t,onCancel:r})=>{const o=b.useCallback(()=>({id:Date.now(),type:"tap",descriptionText:"",optional:!1,x:0,y:0,timeout:0,useLlmOnly:!1,text:"",elementId:"",maxScrolls:15,direction:"down",url:"",instruction:"",path:""}),[]),{data:n}=er(ju),i=new Set((n?.files||[]).filter(s=>s.type==="file").map(s=>s.path)),a=gM({defaultValues:e??o(),onSubmit:({value:s})=>{if(s.type==="fileRef"){const c=(s.path||"").trim();if(!c||n&&!i.has(c)){alert("The specified file does not exist in your tests directory.");return}}let l;switch(s.type){case"tap":l=$u.parse(s);break;case"assert":l=wu.parse(s);break;case"type":l=Iu.parse(s);break;case"scroll":l=ku.parse(s);break;case"scrollUntil":l=_u.parse(s);break;case"deeplink":l=Cu.parse(s);break;case"ai":l=Eu.parse(s);break;case"fileRef":l=Pu.parse(s);break;default:l=Ou.parse(s)}if(!e)de.setState(c=>({...c,test:{...c.test,steps:[...c.test.steps,l]}}));else{const c=l.id;de.setState(u=>({...u,test:{...u.test,steps:u.test.steps.map(d=>d.id===c?l:d)}}))}t()}});return f.jsxs(TM,{elevation:2,children:[f.jsx(Ce,{variant:"h6",gutterBottom:!0,children:e?"Edit Step":"Add New Step"}),f.jsx("form",{onSubmit:s=>{s.preventDefault(),s.stopPropagation(),a.handleSubmit()},children:f.jsxs(RM,{children:[f.jsx(a.Field,{name:"type",validators:{onChange:Bp},children:s=>{const l=s.state.meta.errors?.length>0;return f.jsxs(Ao,{fullWidth:!0,error:l,children:[f.jsx(Mo,{id:"step-type",children:"Step type"}),f.jsx(Ur,{labelId:"step-type",id:"step-type",value:s.state.value,label:"Step type",onChange:c=>{const u=c.target.value,d=a.state.values.id;a.reset(),a.setFieldValue("id",d),a.setFieldValue("type",u)},onBlur:s.handleBlur,children:Bp.options.map(c=>f.jsx(jr,{value:c,children:c},c))}),l&&f.jsx(ma,{children:ft(s.state.meta.errors)})]})}}),f.jsx(ar,{sx:{mb:1}}),f.jsxs(zM,{children:[f.jsx(ln,{children:"General Settings"}),f.jsx(a.Field,{name:"descriptionText",validators:{onChange:St().optional()},children:s=>f.jsx(Le,{id:"description-text",label:"Description",value:s.state.value??"",onChange:l=>s.handleChange(l.target.value),onBlur:s.handleBlur,placeholder:"Enter a description"})}),f.jsx(a.Field,{name:"optional",validators:{onChange:Xo().optional()},children:s=>f.jsx(yt,{control:f.jsx(Dt,{checked:s.state.value??!1,onChange:l=>s.handleChange(l.target.checked)}),label:"Optional"})})]}),f.jsx(a.Subscribe,{selector:s=>s.values.type,children:s=>{switch(s){case"tap":return f.jsx(_M,{form:a});case"assert":return f.jsx(CM,{form:a});case"type":return f.jsx(EM,{form:a});case"scroll":return f.jsx(PM,{form:a});case"scrollUntil":return f.jsx(OM,{form:a});case"deeplink":return f.jsx(jM,{form:a});case"ai":return f.jsx(DM,{form:a});case"fileRef":return f.jsx(IM,{form:a});default:return null}}}),f.jsxs(AM,{children:[f.jsx(nn,{startIcon:f.jsx(vM,{}),variant:"contained",type:"submit",children:"Save"}),f.jsx(nn,{startIcon:f.jsx(bM,{}),variant:"outlined",color:"error",onClick:r,children:"Cancel"})]})]})})]})},IM=({form:e})=>{const{data:t,isLoading:r}=er(ju),o=new Set((t?.files||[]).filter(n=>n.type==="file").map(n=>n.path));return f.jsxs(Un,{children:[f.jsx(ln,{children:"File Reference"}),f.jsx(e.Field,{name:"path",validators:{onChange:({value:n})=>{const i=String(n??"").trim();if(!i)return"This field is required";if(!r&&t&&!o.has(i))return"File not found in tests directory"}},children:n=>{const i=n.state.meta.errors?.length>0,a=i?ft(n.state.meta.errors):r?"Checking files...":"Path is relative to your tests directory";return f.jsx(Le,{id:"file-path",label:"File path",placeholder:"e.g., test2.json or subfolder/flow.json",value:n.state.value??"",onChange:s=>n.handleChange(s.target.value),onBlur:n.handleBlur,error:i,helperText:a,fullWidth:!0})}}),f.jsx(e.Subscribe,{selector:n=>({path:n.values.path,overrides:n.values.overrides}),children:({path:n,overrides:i})=>f.jsx(kM,{path:n,overrides:i,onChange:a=>e.setFieldValue("overrides",a),validPaths:o})})]})},kM=({path:e,overrides:t,onChange:r,validPaths:o})=>{const[n,i]=Ne.useState(!1),[a,s]=Ne.useState({}),l=ot(Du);Ne.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(pt,{sx:{mt:2},children:[f.jsx(Ce,{variant:"subtitle2",children:"Param overrides"}),n?f.jsx(Ce,{variant:"caption",color:"text.secondary",children:"Loading referenced test…"}):d.length===0?f.jsx(Ce,{variant:"caption",color:"text.secondary",children:"Referenced test has no params"}):f.jsx(pt,{sx:{display:"flex",flexDirection:"column",gap:1,mt:1},children:d.map(p=>f.jsxs(pt,{sx:{display:"grid",gridTemplateColumns:"160px 1fr",gap:1,alignItems:"center"},children:[f.jsx(Le,{size:"small",label:"Key",value:p,disabled:!0}),f.jsxs(pt,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:1},children:[f.jsx(Le,{size:"small",label:"Default",value:a[p]??"",disabled:!0}),f.jsx(Le,{size:"small",label:"Override (optional)",value:c[p]??"",onChange:m=>u(p,m.target.value)})]})]},p))})]}):null},_M=({form:e})=>f.jsxs(Un,{children:[f.jsx(ln,{children:"Tap Configuration"}),f.jsxs(sx,{children:[f.jsx(e.Field,{name:"x",validators:{onChange:rr},children:t=>{const r=t.state.meta.errors?.length>0;return f.jsx(Le,{sx:{flex:1},type:"number",id:"x",label:"X",value:t.state.value??0,onChange:o=>t.handleChange(parseInt(o.target.value)||0),onBlur:t.handleBlur,placeholder:"X coordinate",error:r,helperText:ft(t.state.meta.errors)})}}),f.jsx(e.Field,{name:"y",validators:{onChange:rr},children:t=>{const r=t.state.meta.errors?.length>0;return f.jsx(Le,{sx:{flex:1},type:"number",id:"y",label:"Y",value:t.state.value??0,onChange:o=>t.handleChange(parseInt(o.target.value)||0),onBlur:t.handleBlur,placeholder:"Y coordinate",error:r,helperText:ft(t.state.meta.errors)})}})]}),f.jsx(e.Field,{name:"timeout",validators:{onChange:rr},children:t=>{const r=t.state.meta.errors?.length>0;return f.jsx(Le,{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:ft(t.state.meta.errors)})}}),f.jsx(e.Field,{name:"useLlmOnly",validators:{onChange:Xo().optional()},children:t=>f.jsx(yt,{control:f.jsx(Dt,{checked:t.state.value??!1,onChange:r=>t.handleChange(r.target.checked)}),label:"Use LLM only"})})]}),CM=({form:e})=>f.jsxs(Un,{children:[f.jsx(ln,{children:"Assert Configuration"}),f.jsxs(sx,{children:[f.jsx(e.Field,{name:"x",validators:{onChange:rr},children:t=>{const r=t.state.meta.errors?.length>0;return f.jsx(Le,{sx:{flex:1},type:"number",id:"x",label:"X",value:t.state.value??0,onChange:o=>t.handleChange(parseInt(o.target.value)||0),onBlur:t.handleBlur,placeholder:"X coordinate",error:r,helperText:ft(t.state.meta.errors)})}}),f.jsx(e.Field,{name:"y",validators:{onChange:rr},children:t=>{const r=t.state.meta.errors?.length>0;return f.jsx(Le,{sx:{flex:1},type:"number",id:"y",label:"Y",value:t.state.value??0,onChange:o=>t.handleChange(parseInt(o.target.value)||0),onBlur:t.handleBlur,placeholder:"Y coordinate",error:r,helperText:ft(t.state.meta.errors)})}})]}),f.jsx(e.Field,{name:"timeout",validators:{onChange:rr},children:t=>{const r=t.state.meta.errors?.length>0;return f.jsx(Le,{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:ft(t.state.meta.errors)})}}),f.jsx(e.Field,{name:"useLlmOnly",validators:{onChange:Xo().optional()},children:t=>f.jsx(yt,{control:f.jsx(Dt,{checked:t.state.value??!1,onChange:r=>t.handleChange(r.target.checked)}),label:"Use LLM only"})})]}),EM=({form:e})=>f.jsxs(Un,{children:[f.jsx(ln,{children:"Type Configuration"}),f.jsx(e.Field,{name:"text",validators:{onChange:({value:t})=>{const r=String(t??"");if(!r||r.trim().length===0)return"This field is required";const o=xM(r);if(o.length===0)return;const n=de.state.test.params||{},i=o.filter(a=>!Object.prototype.hasOwnProperty.call(n,a));if(i.length>0)return`Undefined params: ${i.join(", ")}`}},children:t=>{const r=t.state.meta.errors?.length>0;return f.jsx(Le,{id:"text",label:"Text to type",value:t.state.value??"",onChange:o=>t.handleChange(o.target.value),onBlur:t.handleBlur,placeholder:"Enter text to type (you can use {{param}})",multiline:!0,rows:3,error:r,helperText:ft(t.state.meta.errors)??"Use {{key}} to insert a param value"})}})]}),PM=({form:e})=>f.jsxs(Un,{children:[f.jsx(ln,{children:"Scroll Configuration"}),f.jsx(e.Field,{name:"direction",validators:{onChange:ix},children:t=>{const r=t.state.meta.errors?.length>0;return f.jsxs(Ao,{fullWidth:!0,error:r,children:[f.jsx(Mo,{id:"scroll-direction",children:"Direction"}),f.jsxs(Ur,{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(jr,{value:"up",children:"Up"}),f.jsx(jr,{value:"down",children:"Down"})]}),r&&f.jsx(ma,{children:ft(t.state.meta.errors)})]})}})]}),OM=({form:e})=>f.jsxs(Un,{children:[f.jsx(ln,{children:"Scroll Until Configuration"}),f.jsx(e.Field,{name:"direction",validators:{onChange:ix},children:t=>{const r=t.state.meta.errors?.length>0;return f.jsxs(Ao,{fullWidth:!0,error:r,children:[f.jsx(Mo,{id:"scroll-until-direction",children:"Direction"}),f.jsxs(Ur,{labelId:"scroll-until-direction",id:"scroll-until-direction",value:t.state.value??"down",label:"Direction",onChange:o=>t.handleChange(o.target.value),onBlur:t.handleBlur,children:[f.jsx(jr,{value:"up",children:"Up"}),f.jsx(jr,{value:"down",children:"Down"})]}),r&&f.jsx(ma,{children:ft(t.state.meta.errors)})]})}}),f.jsx(e.Field,{name:"maxScrolls",validators:{onChange:rr},children:t=>{const r=t.state.meta.errors?.length>0;return f.jsx(Le,{type:"number",id:"max-scrolls",label:"Max Scrolls",value:t.state.value??15,onChange:o=>t.handleChange(parseInt(o.target.value)||15),onBlur:t.handleBlur,placeholder:"Maximum scroll attempts",error:r,helperText:ft(t.state.meta.errors)??"Maximum number of scroll attempts (default: 15)"})}}),f.jsx(ln,{sx:{mt:1},children:"Stop Condition (at least one)"}),f.jsx(e.Field,{name:"text",validators:{onChange:St().optional()},children:t=>{const r=t.state.meta.errors?.length>0;return f.jsx(Le,{id:"scroll-until-text",label:"Text to find",value:t.state.value??"",onChange:o=>t.handleChange(o.target.value),onBlur:t.handleBlur,placeholder:"Text content to scroll until visible",error:r,helperText:ft(t.state.meta.errors)??"Scroll until this text is visible on screen"})}}),f.jsx(e.Field,{name:"elementId",validators:{onChange:St().optional()},children:t=>{const r=t.state.meta.errors?.length>0;return f.jsx(Le,{id:"scroll-until-element-id",label:"Element ID",value:t.state.value??"",onChange:o=>t.handleChange(o.target.value),onBlur:t.handleBlur,placeholder:"Element ID to scroll until visible",error:r,helperText:ft(t.state.meta.errors)??"Scroll until element with this ID is visible"})}})]}),jM=({form:e})=>f.jsxs(Un,{children:[f.jsx(ln,{children:"Deeplink Configuration"}),f.jsx(e.Field,{name:"url",validators:{onChange:$M},children:t=>{const r=t.state.meta.errors?.length>0;return f.jsx(Le,{id:"url",label:"URL",value:t.state.value??"",onChange:o=>t.handleChange(o.target.value),onBlur:t.handleBlur,placeholder:"Enter deeplink URL (e.g., myapp://screen)",fullWidth:!0,error:r,helperText:ft(t.state.meta.errors)})}})]}),DM=({form:e})=>f.jsxs(Un,{children:[f.jsx(ln,{children:"AI Configuration"}),f.jsx(e.Field,{name:"instruction",validators:{onChange:SM},children:t=>{const r=t.state.meta.errors?.length>0;return f.jsx(Le,{id:"instruction",label:"AI Instruction",value:t.state.value??"",onChange:o=>t.handleChange(o.target.value),onBlur:t.handleBlur,placeholder:"Enter instruction for AI to execute",multiline:!0,rows:4,error:r,helperText:ft(t.state.meta.errors)})}})]}),TM=M(Pn)`
|
|
189
|
-
padding: 1.5rem;
|
|
190
|
-
margin-bottom: 1.5rem;
|
|
191
|
-
border: 1px solid #e0e0e0;
|
|
192
|
-
border-radius: 8px;
|
|
193
|
-
`,RM=M(pt)`
|
|
194
|
-
display: flex;
|
|
195
|
-
flex-direction: column;
|
|
196
|
-
gap: 1.25rem;
|
|
197
|
-
`,ax=M(pt)`
|
|
198
|
-
display: flex;
|
|
199
|
-
flex-direction: column;
|
|
200
|
-
gap: 1rem;
|
|
201
|
-
padding: 1rem;
|
|
202
|
-
border-radius: 6px;
|
|
203
|
-
`,zM=M(ax)`
|
|
204
|
-
background-color: #fafafa;
|
|
205
|
-
border: 1px solid #e0e0e0;
|
|
206
|
-
`,Un=M(ax)`
|
|
207
|
-
background-color: #f5f5f5;
|
|
208
|
-
border: 1px dashed #bdbdbd;
|
|
209
|
-
`,ln=M(Ce)`
|
|
210
|
-
font-size: 0.75rem;
|
|
211
|
-
color: #757575;
|
|
212
|
-
text-transform: uppercase;
|
|
213
|
-
letter-spacing: 0.5px;
|
|
214
|
-
margin-bottom: 0.5rem;
|
|
215
|
-
`,sx=M(pt)`
|
|
216
|
-
display: flex;
|
|
217
|
-
gap: 1rem;
|
|
218
|
-
& > * {
|
|
219
|
-
flex: 1;
|
|
220
|
-
min-width: 120px;
|
|
221
|
-
}
|
|
222
|
-
`,AM=M(pt)`
|
|
223
|
-
display: flex;
|
|
224
|
-
gap: 0.5rem;
|
|
225
|
-
justify-content: center;
|
|
226
|
-
`,MM=Fe(f.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"})),NM=Fe(f.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"})),FM=Fe(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"})),LM=Fe(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"})),lx=48,UM=()=>{const[e,t]=b.useState(!1),[r,o]=b.useState(!1),n=Xe(de,s=>s.executionLog),i=Xe(de,s=>s.isPlaying);if(n.length===0&&!i)return null;const a=()=>{o(!r)};return f.jsxs(BM,{$isMaximized:r,children:[f.jsxs(VM,{onClick:a,children:[f.jsxs(Ce,{variant:"subtitle2",children:["Execution Log (",n.length," steps)"]}),f.jsx(je,{size:"small",onClick:s=>{s.stopPropagation(),a()},children:r?f.jsx(NM,{}):f.jsx(MM,{})})]}),r&&f.jsx(WM,{children:f.jsx(ZM,{children:n.map(s=>f.jsxs(GM,{children:[f.jsx(HM,{src:s.screenshot,alt:`Step ${s.stepNumber}`}),f.jsxs(KM,{children:[f.jsxs(qM,{children:["#",s.stepNumber]}),f.jsx(JM,{children:s.cacheHit?f.jsx(Mi,{title:"Cache Hit",children:f.jsx(FM,{color:"success",fontSize:"small"})}):f.jsx(Mi,{title:"Cache Miss / Fresh Execution",children:f.jsx(LM,{color:"info",fontSize:"small"})})})]})]},s.stepId))})})]})},BM=Me(Pn)`
|
|
227
|
-
position: fixed;
|
|
228
|
-
bottom: 0;
|
|
229
|
-
left: 0;
|
|
230
|
-
right: 0;
|
|
231
|
-
z-index: 1300; // High z-index to be on top of everything
|
|
232
|
-
border-top-left-radius: 8px;
|
|
233
|
-
border-top-right-radius: 8px;
|
|
234
|
-
overflow: hidden;
|
|
235
|
-
transition: height 0.3s ease;
|
|
236
|
-
height: ${({$isMaximized:e})=>e?"400px":`${lx}px`};
|
|
237
|
-
display: flex;
|
|
238
|
-
flex-direction: column;
|
|
239
|
-
background-color: ${({theme:e})=>e.palette?.background?.paper||"#fff"};
|
|
240
|
-
box-shadow: 0px -2px 10px rgba(0,0,0,0.1);
|
|
241
|
-
`,VM=Me.div`
|
|
242
|
-
height: ${lx}px;
|
|
243
|
-
padding: 0 16px;
|
|
244
|
-
display: flex;
|
|
245
|
-
align-items: center;
|
|
246
|
-
justify-content: space-between;
|
|
247
|
-
cursor: pointer;
|
|
248
|
-
background-color: rgba(0, 0, 0, 0.05);
|
|
249
|
-
&:hover {
|
|
250
|
-
background-color: rgba(0, 0, 0, 0.08);
|
|
251
|
-
}
|
|
252
|
-
flex-shrink: 0;
|
|
253
|
-
`,WM=Me.div`
|
|
254
|
-
flex: 1;
|
|
255
|
-
overflow-x: auto;
|
|
256
|
-
overflow-y: hidden;
|
|
257
|
-
padding: 16px;
|
|
258
|
-
background-color: rgba(0,0,0,0.02);
|
|
259
|
-
`,ZM=Me.div`
|
|
260
|
-
display: flex;
|
|
261
|
-
gap: 16px;
|
|
262
|
-
height: 100%;
|
|
263
|
-
align-items: center;
|
|
264
|
-
`,GM=Me.div`
|
|
265
|
-
position: relative;
|
|
266
|
-
height: 100%;
|
|
267
|
-
aspect-ratio: 9/16; // Assumes mobile portrait roughly, will adjust to image
|
|
268
|
-
border-radius: 8px;
|
|
269
|
-
overflow: hidden;
|
|
270
|
-
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
|
|
271
|
-
background: #000;
|
|
272
|
-
flex-shrink: 0;
|
|
273
|
-
`,HM=Me.img`
|
|
274
|
-
width: 100%;
|
|
275
|
-
height: 100%;
|
|
276
|
-
object-fit: contain;
|
|
277
|
-
`,KM=Me.div`
|
|
278
|
-
position: absolute;
|
|
279
|
-
top: 0;
|
|
280
|
-
left: 0;
|
|
281
|
-
right: 0;
|
|
282
|
-
padding: 4px 8px;
|
|
283
|
-
display: flex;
|
|
284
|
-
justify-content: space-between;
|
|
285
|
-
align-items: start;
|
|
286
|
-
background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
|
|
287
|
-
`,qM=Me.span`
|
|
288
|
-
color: white;
|
|
289
|
-
font-weight: bold;
|
|
290
|
-
font-size: 14px;
|
|
291
|
-
text-shadow: 0 1px 2px rgba(0,0,0,0.8);
|
|
292
|
-
`,JM=Me.div`
|
|
293
|
-
display: flex;
|
|
294
|
-
align-items: center;
|
|
295
|
-
justify-content: center;
|
|
296
|
-
background: rgba(255,255,255,0.9);
|
|
297
|
-
border-radius: 50%;
|
|
298
|
-
padding: 2px;
|
|
299
|
-
`,Yo=new af({open:!1,maintainDisplayed:!1});function XM(){Yo.setState(e=>({...e,open:!1}))}function cx(e,t){Yo.setState({type:"success",title:t?.title??"Success",description:e,listContent:t?.listContent,open:!0,maintainDisplayed:t?.maintainDisplayed??!1})}function Gs(e,t){Yo.setState({type:"error",title:t?.title??"Error",description:e,listContent:t?.listContent,open:!0,maintainDisplayed:t?.maintainDisplayed??!1})}function YM(e,t){Yo.setState({type:"info",title:t?.title,description:e,listContent:t?.listContent,open:!0,maintainDisplayed:t?.maintainDisplayed??!1})}const QM=/\{\{\s*([a-zA-Z0-9_.-]+)\s*\}\}/g;function eN(e,t){const r=new Set;return{value:e.replace(QM,(n,i)=>Object.prototype.hasOwnProperty.call(t,i)?t[i]??"":(r.add(i),"")),missing:Array.from(r)}}function ro(e,t){const r={...e},o={},n=i=>{const a=r[i];if(typeof a=="string"&&a.includes("{{")){const{value:s,missing:l}=eN(a,t);r[i]=s,l.length&&(o[i]=l)}};return n("descriptionText"),n("text"),n("url"),n("instruction"),{step:r,missingMap:o}}const tN=({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(zz,{step:e,...a});case"assert":return f.jsx(Az,{step:e,...a});case"type":return f.jsx(Mz,{step:e,...a});case"scroll":return f.jsx(Nz,{step:e,...a});case"scrollUntil":return f.jsx(Fz,{step:e,...a});case"deeplink":return f.jsx(Lz,{step:e,...a});case"ai":return f.jsx(Uz,{step:e,...a});case"fileRef":return f.jsx(Rz,{step:e,...a});default:return null}},nN=({onSave:e,canSave:t})=>{const[r,o]=b.useState(!1),[n,i]=b.useState(void 0),a=Xe(de,C=>C.isRecording),s=Xe(de,C=>C.test.steps),l=Xe(de,C=>C.isPlaying),c=Xe(de,C=>C.selectedPlatform),u=Xe(de,C=>C.selectedDeviceId),{data:d=[]}=er(Qy),p=b.useRef(null),m=ot(Xy),h=ot(Xz),g=ot(eA),v=ot(oA),y=ot(sA),$=ot(SA),S=ot(hA),x=ot(jA),w=ot(zA),I=ot(Du),_=(C,B,q)=>{de.setState(H=>({...H,test:{...H.test,steps:H.test.steps.map(J=>J.id===C?{...J,status:B,statusColor:q}:J)}}))},k=C=>{de.setState(B=>({...B,currentStepId:C}))},P=C=>new Promise(B=>setTimeout(B,C)),E=async()=>{try{const C=await S.mutateAsync({platform:c,deviceId:u});if(!C.success||!C.base64)throw new Error(C.error||"Failed to capture screenshot");return C.base64}catch(C){throw console.error("Screenshot failed:",C),C}},T=C=>new Promise(B=>{const q=new Image;q.onload=()=>B({width:q.naturalWidth,height:q.naturalHeight}),q.src=C}),z=async(C,B,q,H=[])=>{_(C,"Starting AI Agent Loop...","purple");try{let J=0;const te=5;let Y=[...H];for(;J<te;){if(p.current?.signal.aborted)throw new Error("Aborted");const G=await E();de.setState(Ee=>({...Ee,executionLog:[...Ee.executionLog,{stepId:C,stepNumber:B,screenshot:G,cacheHit:!1,timestamp:Date.now()}]})),_(C,`AI Agent Thinking (${J+1})...`,"purple");const W=await w.mutateAsync({base64_screenshot:G.replace(/^data:image\/\w+;base64,/,""),instruction:q,action_history:Y});console.log("Agent Response:",W);const fe=W;fe.actionHistory&&(Y=fe.actionHistory);const ae=fe.gptCommands||[],ee=fe.appetizeCommands||[],he=ae.findIndex(Ee=>Ee.startsWith("reasoning:"));if(he!==-1){const Ee=ae.slice(he),ue=Ee.filter(Pe=>Pe.startsWith("remember:"));ue.length>0&&H.push(...ue),Y=[...Y,...Ee]}const be=ae.some(Ee=>Ee.toLowerCase().includes("task complete:")),_e=ae.find(Ee=>Ee.toLowerCase().includes("error detected:"));if(_e)throw new Error(`AI reported error: ${_e}`);if(be)return _(C,"AI Task Completed","green"),!0;let ne=!1;if(ee.length>0){for(const Ee of ee){if(p.current?.signal.aborted)throw new Error("Aborted");if(Ee.match(/^t(ap|ab)On:/)){let ue,Pe;const Je=Ee.match(/x=(\d+)/),Ve=Ee.match(/y=(\d+)/);if(Je&&Ve)ue=parseInt(Je[1],10),Pe=parseInt(Ve[1],10);else{const nt=Ee.split(";");if(nt.length>=3){const Qe=parseInt(nt[1],10),ct=parseInt(nt[2],10);!isNaN(Qe)&&!isNaN(ct)&&(ue=Qe,Pe=ct)}}ue!==void 0&&Pe!==void 0&&(_(C,`Exec: Tap ${ue},${Pe}`,"blue"),await m.mutateAsync({x:ue,y:Pe,platform:c,deviceId:u}),ne=!0)}else if(Ee.startsWith("wait:")){const ue=Ee.match(/wait:\s*(\d+)/);if(ue){const Pe=parseInt(ue[1],10);_(C,`Exec: Wait ${Pe}s`,"blue"),await P(Pe*1e3),ne=!0}}else if(Ee.startsWith("scroll:")){const ue=Ee.match(/scroll:\s*(up|down)/i);if(ue){const Pe=ue[1].toLowerCase();_(C,`Exec: Scroll ${Pe}`,"blue"),await g.mutateAsync({direction:Pe,platform:c,deviceId:u}),ne=!0}}}await P(3e3)}!ne&&!be&&(_(C,"AI Thinking...","blue"),await P(2e3)),J++}throw new Error("AI Agent loop timeout")}catch(J){throw J}},j=async(C,B,q,H=[])=>{if(q.aborted)return!1;k(C.id),_(C.id,"Executing...","blue");const J={platform:c,deviceId:u},te=Date.now();try{let Y,G=!1;const W=()=>de.state.currentScreenshot||void 0;switch(C.type){case"tap":{let ae=C.x,ee=C.y;const he=`mobileboost_step_${C.id}_${C.type}`;let be=!1;const _e=Date.now(),ne=C.timeout??3e3;if(C.cropBase64){console.log(`[Step ${C.id}] Cache check start`);let Pe;for(;Date.now()-_e<ne;){if(q.aborted)return!1;const Je=Date.now(),Ve=await E();Y||(Y=Ve);const nt=Date.now()-Je;console.log(`[Step ${C.id}] Screenshot captured in ${nt}ms`);try{const Qe=Date.now(),{width:ct,height:Oe}=await T(Ve),rt=await x.mutateAsync({stepNumber:B,stepDescription:C.descriptionText||C.type,filepath:void 0,screenshot:Ve,platform:c,screenResolution:{width:ct,height:Oe},highest_used_index:Pe}),dt=Date.now()-Qe;if(console.log(`[Step ${C.id}] Cache endpoint responded in ${dt}ms`),rt.found&&rt.interactionCoordinates){ae=rt.interactionCoordinates.x,ee=rt.interactionCoordinates.y,be=!0,G=!0,Pe=rt.cacheIndex;const Zt=Date.now()-_e;console.log(`[Step ${C.id}] Cache Hit! Total cache loop duration: ${Zt}ms`),_(C.id,`Cache Hit! Executing at ${ae},${ee}`,"green");break}}catch(Qe){console.warn("Cache check failed:",Qe)}await P(500)}}if(be||Y||(Y=W()),!be){const Pe=Date.now()-_e;console.log(`[Step ${C.id}] Cache Miss. Duration: ${Pe}ms`)}if(!be&&C.cropBase64){if(console.log("Cache miss"),C.descriptionText){_(C.id,"Cache miss, trying AI fallback...","orange");try{return await z(C.id,B,C.descriptionText,H),!0}catch(Pe){throw new Error(`Cache miss and AI failed: ${Pe.message}`)}}}else if(C.elementId){_(C.id,"Finding element...","blue");try{const Pe=await $.mutateAsync({elementId:C.elementId,...J});Pe.found&&(ae=Pe.x,ee=Pe.y,_(C.id,"Element found, tapping...","blue"))}catch{console.log("Element ID not found, using original coordinates")}}const Ee=Date.now();await m.mutateAsync({x:ae,y:ee,screenWidth:C.screenWidth,screenHeight:C.screenHeight,...J});const ue=Date.now()-Ee;console.log(`[Step ${C.id}] Tap executed in ${ue}ms`),_(C.id,"Tapped","green");break}case"assert":{if(C.cropBase64){let ae=!1,ee;const he=C.timeout??3e3,be=Date.now(),_e=`mobileboost_step_${C.id}_${C.type}`;for(;Date.now()-be<he;){if(q.aborted)return!1;const ne=await E();Y||(Y=ne);try{const{width:Ee,height:ue}=await T(ne),Pe=await x.mutateAsync({stepNumber:B,stepDescription:C.descriptionText||C.type,filepath:void 0,screenshot:ne,platform:c,screenResolution:{width:Ee,height:ue},highest_used_index:ee});if(Pe.found){ae=!0,G=!0,ee=Pe.cacheIndex;break}}catch(Ee){console.warn("Assert cache check failed:",Ee)}await P(500)}if(ae)_(C.id,"Assertion passed (Cache Match)","green");else if(C.descriptionText)await z(C.id,B,`Verify that: ${C.descriptionText}`,H),_(C.id,"Assertion passed (AI)","green");else throw new Error("Assertion failed: Image not found")}if(!Y)Y=W();else if(C.elementId)if(_(C.id,"Checking element...","blue"),(await $.mutateAsync({elementId:C.elementId,...J})).found)_(C.id,"Assertion passed","green");else throw new Error("Element not found");else _(C.id,"Assertion passed (No conditions)","green");break}case"type":{Y=W();const ae=de.state.test.params||{},{step:ee,missingMap:he}=ro(C,ae);if(Object.keys(he).length){const be=Object.entries(he).map(([_e,ne])=>`${_e}: ${ne.join(", ")}`).join("; ");throw new Error(`Missing params for placeholders -> ${be}`)}await h.mutateAsync({text:ee.text,...J}),_(C.id,"Typed","green");break}case"scroll":{Y=W(),await g.mutateAsync({direction:C.direction,...J}),_(C.id,"Scrolled","green");break}case"scrollUntil":{Y=W();const ae=de.state.test.params||{},{step:ee,missingMap:he}=ro(C,ae);if(he.text?.length)throw new Error(`Missing params for placeholders -> text: ${he.text.join(", ")}`);_(C.id,"Scrolling until found...","blue");const be=await v.mutateAsync({text:ee.text,elementId:ee.elementId,direction:ee.direction,maxScrolls:ee.maxScrolls,...J});if(be.success)_(C.id,`Found after ${be.scrolls??0} scrolls`,"green");else throw new Error("Target not found after scrolling");break}case"deeplink":{Y=W();const ae=de.state.test.params||{},{step:ee,missingMap:he}=ro(C,ae);if(he.url?.length)throw new Error(`Missing params for placeholders -> url: ${he.url.join(", ")}`);await y.mutateAsync({url:ee.url,...J}),_(C.id,"Opened deeplink","green");break}case"fileRef":{_(C.id,"Loading steps from file...","blue");const ee=(await I.mutateAsync({path:C.path}))?.content;let he=[],be={};if(Array.isArray(ee))he=ee;else if(ee&&Array.isArray(ee.steps))he=ee.steps,be=ee.params||{};else throw new Error("Referenced file must be an array or an object with steps");const _e={...be,...C.overrides};console.debug("fileRef params",{refParams:be,overrides:C.overrides,effectiveParams:_e});const Ee=Ou.array().parse(he).map((ue,Pe)=>{const Je=typeof ue.id=="number"?ue.id:Date.now()+Pe,{step:Ve,missingMap:nt}=ro(ue,_e);if(Ve.type==="type"&&nt.text?.length||Ve.type==="scrollUntil"&&nt.text?.length||Ve.type==="deeplink"&&nt.url?.length||Ve.type==="ai"&&nt.instruction?.length){const Qe=[];for(const[ct,Oe]of Object.entries(nt))Oe.length&&Qe.push(`${ct}: ${Oe.join(", ")}`);throw new Error(`Referenced step has missing params -> ${Qe.join("; ")}`)}return{id:Je,...Ve,originRef:{refId:C.id,path:C.path,descriptionText:C.descriptionText,optional:C.optional,overrides:C.overrides}}});de.setState(ue=>{const Pe=ue.test.steps.findIndex(Ve=>Ve.id===C.id);if(Pe===-1)return ue;const Je=[...ue.test.steps];return Je.splice(Pe,1,...Ee),{...ue,test:{...ue.test,steps:Je}}}),_(C.id,"Expanded steps from file","green");break}case"ai":{const ae=de.state.test.params||{},{step:ee,missingMap:he}=ro(C,ae);if(he.instruction?.length)throw new Error(`Missing params for placeholders -> instruction: ${he.instruction.join(", ")}`);await z(C.id,B,ee.instruction,H);break}}await P(100);const fe=Date.now()-te;return console.log(`[Step ${C.id}] Execution Finished. Total Duration: ${fe}ms`),Y&&de.setState(ae=>({...ae,executionLog:[...ae.executionLog,{stepId:C.id,stepNumber:B,screenshot:Y,cacheHit:G,timestamp:Date.now()}]})),!0}catch(Y){const G=Y instanceof Error?Y.message:"Unknown error";return C.optional?(_(C.id,`Failed (optional): ${G}`,"orange"),!0):(_(C.id,`Error: ${G}`,"red"),!1)}},A=()=>{de.setState(C=>{const B=C.test.steps,q=[],H=new Set,J=new Set;let te=0;for(;te<B.length;){const G=B[te];if(G?.type==="fileRef"){const W=G.path;if(J.has(W)){te++;continue}H.add(G.id),J.add(W),q.push(G),te++;continue}if(G&&G.originRef){const W=G.originRef.refId,fe=G.originRef.path,ae=G.originRef.descriptionText,ee=G.originRef.optional;let he=te;for(;he<B.length&&B[he]?.originRef?.refId===W;)he++;if(H.has(W)||J.has(fe)){te=he;continue}const be={id:W,type:"fileRef",path:fe,descriptionText:ae,optional:ee,overrides:G?.originRef?.overrides};q.some(_e=>_e.id===be.id)&&(be.id=Date.now()),q.push(be),H.add(be.id),J.add(fe),te=he;continue}q.push(G),te++}const Y=[];for(const G of q){const W=Y[Y.length-1];W?.type==="fileRef"&&G?.type==="fileRef"&&W.path===G.path||Y.push(G)}return{...C,test:{...C.test,steps:Y}}})},D=async(C,B)=>{if(de.state.test.steps.length===0){alert("No steps to play!");return}p.current=new AbortController;const H=p.current.signal;de.setState(fe=>({...fe,isPlaying:!0})),de.setState(fe=>({...fe,test:{...fe.test,steps:fe.test.steps.map((ae,ee)=>ee>=C?{...ae,status:"",statusColor:""}:ae)},executionLog:[]}));let J=C;const te=C+1,Y=[];let G=!1,W;for(;!H.aborted;){const fe=de.state.test.steps,ae=B?te:fe.length;if(J>=ae)break;const ee=fe[J],he=ee.type;if(!await j(ee,J+1,H,Y)&&!ee.optional){G=!0,W=de.state.test.steps.find(ne=>ne.id===ee.id)?.status||"Execution failed";break}if(he==="fileRef"){if(B)break;continue}J++}await P(500),A(),k(null),de.setState(fe=>({...fe,isPlaying:!1})),p.current=null,H.aborted||(G?Gs(W||"Playback failed",{title:"Execution Failed"}):cx("Playback finished successfully",{title:"Execution Completed"}))},R=()=>D(0,!1),U=C=>{const B=s.findIndex(q=>q.id===C);B!==-1&&D(B,!0)},X=C=>{const B=s.findIndex(q=>q.id===C);B!==-1&&D(B,!1)},L=()=>{p.current?.abort(),A(),de.setState(C=>({...C,isPlaying:!1})),k(null),YM("Playback stopped",{title:"Stopped"})},re=C=>{i(C),o(!1)},se=()=>{o(!1),i(void 0)},pe=()=>{o(!1),i(void 0)},ce=C=>{confirm("Delete this step?")&&de.setState(B=>({...B,test:{...B.test,steps:B.test.steps.filter(q=>q.id!==C)}}))},Ie=()=>{confirm("Are you sure you want to clear all steps?")&&de.setState(C=>({...C,test:{...C.test,steps:[]}}))},Q=l||a,V=r||!!n;return f.jsxs(rN,{$hasForm:V,children:[f.jsx(Ce,{variant:"h5",children:"Recorded Steps"}),f.jsx(ar,{}),f.jsxs(oN,{children:[e&&f.jsx(nn,{variant:"contained",color:"primary",onClick:e,disabled:!t||l,children:"Save"}),l?f.jsx(nn,{variant:"contained",color:"error",onClick:L,children:"Stop"}):f.jsx(nn,{variant:"contained",disabled:a||s.length===0,onClick:R,children:"Play Recording"}),f.jsx(nn,{variant:"contained",disabled:Q||V,onClick:()=>o(!0),children:"+ Add Step"}),f.jsx(nn,{variant:"outlined",disabled:Q||s.length===0,onClick:Ie,children:"Clear All"})]}),(n||V)&&f.jsx(aN,{children:f.jsx(wM,{step:n,onSave:se,onCancel:pe})}),f.jsx(iN,{children:s.length===0?f.jsx(sN,{children:f.jsx(Ce,{color:"text.secondary",children:"No steps recorded yet. Enable recording and click on the device screen to add steps."})}):f.jsx(Jm,{onDragEnd:C=>{const{source:B,destination:q}=C;if(!q||B.index===q.index)return;const J=[...de.state.test.steps],[te]=J.splice(B.index,1);J.splice(q.index,0,te),de.setState(Y=>({...Y,test:{...Y.test,steps:J}}))},children:f.jsx(Gi,{droppableId:"steps-droppable",children:C=>f.jsxs("div",{ref:C.innerRef,...C.droppableProps,children:[s.map((B,q)=>f.jsx(Nl,{draggableId:String(B.id),index:q,children:(H,J)=>f.jsx("div",{ref:H.innerRef,...H.draggableProps,...H.dragHandleProps,style:{...H.draggableProps.style,opacity:J.isDragging?.9:1},children:f.jsx(tN,{step:B,index:q,onPlay:()=>U(B.id),onPlayFromHere:()=>X(B.id),onEdit:()=>re(B),onDelete:()=>ce(B.id)})})},B.id)),C.placeholder]})})})}),f.jsx(UM,{})]})},rN=Me(La)`
|
|
300
|
-
display: grid;
|
|
301
|
-
grid-template-areas:
|
|
302
|
-
'title'
|
|
303
|
-
'divider'
|
|
304
|
-
'actions'
|
|
305
|
-
${({$hasForm:e})=>e?"'form'":""}
|
|
306
|
-
'steps';
|
|
307
|
-
grid-template-rows: auto auto auto ${({$hasForm:e})=>e?"auto":""} minmax(0, 1fr);
|
|
308
|
-
row-gap: 0.75rem;
|
|
309
|
-
overflow: hidden;
|
|
310
|
-
`,oN=Me.div`
|
|
311
|
-
display: flex;
|
|
312
|
-
gap: 0.5rem;
|
|
313
|
-
flex-wrap: wrap;
|
|
314
|
-
`,iN=Me.div`
|
|
315
|
-
overflow-y: auto;
|
|
316
|
-
padding-right: 0.5rem;
|
|
317
|
-
`,aN=Me.div`
|
|
318
|
-
grid-area: form;
|
|
319
|
-
max-height: 50vh;
|
|
320
|
-
overflow-y: auto;
|
|
321
|
-
`,sN=Me.div`
|
|
322
|
-
display: flex;
|
|
323
|
-
align-items: center;
|
|
324
|
-
justify-content: center;
|
|
325
|
-
height: 100%;
|
|
326
|
-
padding: 2rem;
|
|
327
|
-
text-align: center;
|
|
328
|
-
`,lN=Ye("f8084cb106c8126bb2deaeef7c98992d9ff9475ad3dc85c6ced04f08c3962b6e"),cN=Ze({method:"POST"}).handler(lN),uN={mutationKey:["ai","describe"],mutationFn:e=>cN({data:e})},dN=()=>{const e=Xe(de,P=>P.mode),t=Xe(de,P=>P.isRecording),r=Xe(de,P=>P.enableAnimations),o=Hs(),n=b.useRef(null),{data:i=[]}=er(Qy),a=Xe(de,P=>P.selectedDeviceId);Xe(de,P=>P.selectedPlatform),b.useEffect(()=>{if(!a&&i.length>0){const P=i[0];de.setState(E=>({...E,selectedDeviceId:P.id,selectedPlatform:P.platform}))}},[i,a]);const s=i.find(P=>P.id===a),{data:l,isError:c,isLoading:u}=er({...Wp({platform:s?.platform,deviceId:s?.id}),refetchInterval:250,enabled:!!s});b.useEffect(()=>{const P=l?.base64;P&&de.setState(E=>({...E,currentScreenshot:P}))},[l]);const{data:d}=er({...fA({platform:s?.platform,deviceId:s?.id}),enabled:!!s,refetchInterval:1e3}),p=ot(uA);b.useEffect(()=>{s?.id&&d?.connected===!1&&!p.isPending&&p.mutate({platform:s.platform,deviceId:s.id})},[s,d?.connected]);const m=l?.success??!1,h=d?.connected??!1,g=m&&h,v=l?.base64,y=ot(IA),$=ot(Xy),S=ot(bA),x=ot(uN),w=ot(DA),I=async(P,E)=>{de.setState(T=>({...T,enableAnimations:E})),E||await y.mutateAsync()},_=async P=>{const E=n.current;if(!E)return;const T=E.getBoundingClientRect(),z=E.naturalWidth/T.width,j=E.naturalHeight/T.height,A=Math.round((P.clientX-T.left)*z),D=Math.round((P.clientY-T.top)*j),R={platform:s?.platform??"android",deviceId:s?.id,screenWidth:E.naturalWidth,screenHeight:E.naturalHeight},U=v;let X=null;if(t){const L=document.createElement("canvas"),re=100;L.width=re,L.height=re;const se=L.getContext("2d");if(se){se.drawImage(E,A-re/2,D-re/2,re,re,0,0,re,re);const pe=L.toDataURL("image/jpeg",.8);let ce="";try{ce=(await S.mutateAsync({x:A,y:D,...R})).elementId||""}catch(Q){console.error("Failed to get element ID:",Q)}X=Date.now();const Ie={id:X,type:e==="assert"?"assert":"tap",x:A,y:D,cropBase64:pe,elementId:ce,descriptionText:"Generating description...",optional:!1,useLlmOnly:!1,...R};de.setState(Q=>({...Q,test:{...Q.test,steps:[...Q.test.steps,Ie]}})),(async()=>{let Q=U;if(e==="interact"&&(await $.mutateAsync({x:A,y:D,...R}),await new Promise(V=>setTimeout(V,2e3)),s?.id))try{const V=await o.fetchQuery({...Wp({platform:s.platform,deviceId:s.id}),staleTime:0});V?.base64&&(Q=V.base64)}catch(V){console.error("Failed to fetch post-action screenshot",V)}try{const V=await x.mutateAsync({fullImage:U??"",croppedImage:pe,targetImage:Q??"",type:e==="assert"?"assert":"interaction"});de.setState(C=>({...C,test:{...C.test,steps:C.test.steps.map(B=>B.id===X?{...B,descriptionText:V.description}:B)}}));try{const C=de.state.test.steps,B=C.findIndex(H=>H.id===X),q=B!==-1?B+1:C.length;w.mutate({stepNumber:q,stepDescription:V.description,filepath:void 0,screenshot:U,interactionCoordinates:{x:A,y:D,action:"tap"},platform:s?.platform,screenResolution:{width:E.naturalWidth,height:E.naturalHeight}})}catch(C){console.error("Error populating cache:",C)}}catch(V){console.error("Failed to describe interaction",V);const C=e==="assert"?"Assert Element":"Tap Interaction";de.setState(B=>({...B,test:{...B.test,steps:B.test.steps.map(q=>q.id===X?{...q,descriptionText:C}:q)}}))}try{const V=de.state.test.steps,C=V.findIndex(H=>H.id===X),B=C!==-1?C+1:V.length,q=e==="assert"?"Assert Element":"Tap Interaction";w.mutate({stepNumber:B,stepDescription:q,filepath:void 0,screenshot:U,interactionCoordinates:{x:A,y:D,action:"tap"},platform:s?.platform,screenResolution:{width:E.naturalWidth,height:E.naturalHeight}})}catch(V){console.error("Error populating cache (fallback):",V)}})()}}else await $.mutateAsync({x:A,y:D,...R})},k=u?"Connecting...":c?"Error":g?"Connected":m&&!h?"Starting Appium...":"Disconnected";return f.jsxs(pN,{children:[f.jsx(Ce,{variant:"h5",children:"Device"}),f.jsx(ar,{}),f.jsxs(fN,{children:[f.jsxs(Ao,{size:"small",sx:{minWidth:150},children:[f.jsx(Mo,{children:"Device"}),f.jsx(Ur,{value:a||"",label:"Device",onChange:P=>{const E=P.target.value,T=i.find(z=>z.id===E);de.setState(z=>({...z,selectedDeviceId:E,selectedPlatform:T?.platform||"android"}))},children:i.map(P=>f.jsxs(jr,{value:P.id,children:[P.name," (",P.platform,")"]},P.id))})]}),f.jsx(yt,{control:f.jsx(Nd,{checked:t}),label:"Recording",onChange:(P,E)=>{de.setState(T=>({...T,isRecording:E}))}}),f.jsx(yt,{control:f.jsx(Nd,{checked:r}),label:"Animations",onChange:I}),f.jsxs(T_,{color:"primary",exclusive:!0,value:e,onChange:(P,E)=>{E&&de.setState(T=>({...T,mode:E}))},"aria-label":"Mode",children:[f.jsx(Fd,{value:"interact",children:"Interact"}),f.jsx(Fd,{value:"assert",children:"Assert"})]}),f.jsx(mN,{connected:g,children:k})]}),f.jsx(hN,{children:v?f.jsx(gN,{ref:n,src:v,alt:"Device Screen",draggable:!1,onClick:_,recording:t}):f.jsx(vN,{children:i.length===0?f.jsx(Ce,{variant:"body2",color:"text.secondary",children:"No devices found."}):a?f.jsxs(f.Fragment,{children:[f.jsx(sa,{}),f.jsx(Ce,{variant:"body2",color:"text.secondary",children:"Connecting to device..."})]}):f.jsx(Ce,{variant:"body2",color:"text.secondary",children:"Select a device."})})})]})},pN=Me(La)`
|
|
329
|
-
display: grid;
|
|
330
|
-
grid-template-areas:
|
|
331
|
-
'title'
|
|
332
|
-
'divider'
|
|
333
|
-
'actions'
|
|
334
|
-
'device';
|
|
335
|
-
grid-template-rows: auto auto auto 1fr;
|
|
336
|
-
row-gap: 0.75rem;
|
|
337
|
-
overflow: hidden;
|
|
338
|
-
`,fN=Me.div`
|
|
339
|
-
display: flex;
|
|
340
|
-
gap: 0.5rem;
|
|
341
|
-
flex-wrap: wrap;
|
|
342
|
-
align-items: center;
|
|
343
|
-
`,mN=Me(Ce)`
|
|
344
|
-
font-size: 0.875rem;
|
|
345
|
-
color: ${({connected:e})=>e?"#4caf50":"#f44336"};
|
|
346
|
-
margin-left: auto;
|
|
347
|
-
`,hN=Me.div`
|
|
348
|
-
display: flex;
|
|
349
|
-
justify-content: center;
|
|
350
|
-
align-items: center;
|
|
351
|
-
overflow: hidden;
|
|
352
|
-
flex: 1;
|
|
353
|
-
min-height: 0;
|
|
354
|
-
`,gN=Me.img`
|
|
355
|
-
max-height: 100%;
|
|
356
|
-
max-width: 100%;
|
|
357
|
-
object-fit: contain;
|
|
358
|
-
border: 2px solid #333;
|
|
359
|
-
border-radius: 8px;
|
|
360
|
-
cursor: crosshair;
|
|
361
|
-
box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
|
|
362
|
-
${({recording:e})=>e&&`
|
|
363
|
-
border-color: #2196f3;
|
|
364
|
-
box-shadow: 0 0 20px rgba(33, 150, 243, 0.4);
|
|
365
|
-
`}
|
|
366
|
-
`,vN=Me(pt)`
|
|
367
|
-
display: flex;
|
|
368
|
-
flex-direction: column;
|
|
369
|
-
align-items: center;
|
|
370
|
-
gap: 1rem;
|
|
371
|
-
`,ux=Fe(f.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"})),bN=Fe(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"})),yN=Fe(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"})),xN=Fe(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"})),SN=Fe(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"})),$N=Fe(f.jsx("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"})),wN=Fe(f.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"})),IN=Fe(f.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}));function kN(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 dx=({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(Le,{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(G0,{position:"end",children:f.jsx(je,{size:"small",onMouseDown:d,children:f.jsx(IN,{fontSize:"small"})})})}})}):f.jsxs(f.Fragment,{children:[e.type==="directory"?f.jsx(Gi,{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(Ed,{sx:{minWidth:32},children:f.jsx(xN,{fontSize:"small",color:"primary"})}),f.jsx(Pd,{primary:e.name,primaryTypographyProps:{variant:"body2",noWrap:!0}}),p&&(i?f.jsx($N,{fontSize:"small"}):f.jsx(wN,{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(Ed,{sx:{minWidth:32},children:f.jsx(SN,{fontSize:"small",color:"action"})}),f.jsx(Pd,{primary:e.name,primaryTypographyProps:{variant:"body2",noWrap:!0}})]}),e.type==="directory"&&f.jsx(vs,{in:i,timeout:"auto",unmountOnExit:!0,children:f.jsx(Gi,{droppableId:e.fullPath,children:h=>f.jsxs(pl,{component:"div",disablePadding:!0,ref:h.innerRef,...h.droppableProps,children:[m.map((g,v)=>f.jsx(Nl,{draggableId:g.fullPath,index:v,children:(y,$)=>f.jsx("div",{ref:y.innerRef,...y.draggableProps,...y.dragHandleProps,style:{...y.draggableProps.style,opacity:$.isDragging?.9:1},children:f.jsx(dx,{item:g,level:t+1,onSelect:r,selectedFile:o,onRename:n})})},g.fullPath)),h.placeholder]})})})]})};function _N({files:e,onSelect:t,selectedFile:r,refetch:o}){const n=kN(e),i=Object.values(n).sort((c,u)=>c.type===u.type?c.name.localeCompare(u.name):c.type==="directory"?-1:1),a=ot(KA),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,$=m?`${m}/${y}`:y;try{await a.mutateAsync({oldPath:h,newPath:$}),o()}catch(S){alert("Move failed: "+S.message)}};return f.jsx(Jm,{onDragEnd:l,children:f.jsx(Gi,{droppableId:"ROOT",children:c=>f.jsxs(pl,{dense:!0,ref:c.innerRef,...c.droppableProps,children:[i.map((u,d)=>f.jsx(Nl,{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(dx,{item:u,level:1,onSelect:t,selectedFile:r,onRename:s})})},u.fullPath||u.name)),c.placeholder]})})})}function CN({onSelectFile:e,selectedFile:t}){const{data:r,isLoading:o,error:n,refetch:i}=er({...ju,refetchInterval:2e3}),[a,s]=b.useState(!1),[l,c]=b.useState("file"),[u,d]=b.useState(""),p=ot(LA),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&&!r)return f.jsx(us,{children:f.jsx(sa,{})});if(n)return f.jsx(us,{children:f.jsx(Ce,{color:"error",children:"Error loading files"})});const g=r?.files||[];return f.jsxs(us,{children:[f.jsxs(EN,{children:[f.jsx(Ce,{variant:"h6",children:"Tests"}),f.jsxs(pt,{children:[f.jsx(je,{onClick:()=>i(),size:"small",title:"Refresh",children:f.jsx(bN,{})}),f.jsx(je,{onClick:()=>h("directory"),size:"small",title:"New Folder",children:f.jsx(yN,{})}),f.jsx(je,{onClick:()=>h("file"),size:"small",color:"primary",title:"New Test",children:f.jsx(ux,{})})]})]}),f.jsx(ar,{}),f.jsx(PN,{children:g.length===0?f.jsx(Ce,{variant:"caption",sx:{p:2,display:"block",textAlign:"center",color:"text.secondary"},children:"No tests found"}):f.jsx(_N,{files:g,onSelect:e,selectedFile:t,refetch:i})}),f.jsxs(n0,{open:a,onClose:()=>s(!1),children:[f.jsxs(h0,{children:["Create New ",l==="file"?"Test":"Folder"]}),f.jsx(p0,{children:f.jsx(Le,{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(a0,{children:[f.jsx(nn,{onClick:()=>s(!1),children:"Cancel"}),f.jsx(nn,{onClick:m,variant:"contained",children:"Create"})]})]})]})}const us=Me(La)`
|
|
372
|
-
display: flex;
|
|
373
|
-
flex-direction: column;
|
|
374
|
-
padding: 0;
|
|
375
|
-
overflow: hidden;
|
|
376
|
-
height: 100%;
|
|
377
|
-
`,EN=Me.div`
|
|
378
|
-
padding: 1rem;
|
|
379
|
-
display: flex;
|
|
380
|
-
align-items: center;
|
|
381
|
-
justify-content: space-between;
|
|
382
|
-
`,PN=Me.div`
|
|
383
|
-
flex: 1;
|
|
384
|
-
overflow-y: auto;
|
|
385
|
-
padding: 0.5rem 0;
|
|
386
|
-
`;function ON({disabled:e}){const t=Xe(de,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);de.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(jN,{children:[f.jsxs(DN,{children:[f.jsx(Ce,{variant:"subtitle1",children:"Test Params"}),f.jsx(Mi,{title:e?"Select a test to edit params":"Add parameter",children:f.jsx("span",{children:f.jsx(je,{size:"small",disabled:e,onClick:i,color:"primary",children:f.jsx(ux,{})})})})]}),f.jsx(ar,{}),f.jsxs(TN,{children:[r.length===0&&f.jsx(zN,{children:f.jsx(Ce,{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(RN,{children:[f.jsx(Le,{size:"small",label:"Key",value:c.key,onChange:p=>s(u,p.target.value),disabled:e,error:!!d,helperText:d?"Duplicate key":" "}),f.jsx(Le,{size:"small",label:"Value",value:c.value,onChange:p=>l(u,p.target.value),disabled:e}),f.jsx(Mi,{title:e?"":"Remove",children:f.jsx("span",{children:f.jsx(je,{size:"small",disabled:e,onClick:()=>a(u),children:f.jsx(xn,{})})})})]},u)})]}),!e&&r.length>0&&f.jsx(pt,{sx:{p:1,display:"flex",justifyContent:"flex-end"},children:f.jsx(nn,{size:"small",onClick:()=>n(r),children:"Apply"})})]})}const jN=Me(La)`
|
|
387
|
-
display: flex;
|
|
388
|
-
flex-direction: column;
|
|
389
|
-
padding: 0;
|
|
390
|
-
height: 100%;
|
|
391
|
-
overflow: hidden;
|
|
392
|
-
`,DN=Me.div`
|
|
393
|
-
padding: 0.75rem 1rem;
|
|
394
|
-
display: flex;
|
|
395
|
-
align-items: center;
|
|
396
|
-
justify-content: space-between;
|
|
397
|
-
`,TN=Me.div`
|
|
398
|
-
padding: 0.5rem 0.75rem;
|
|
399
|
-
display: flex;
|
|
400
|
-
flex-direction: column;
|
|
401
|
-
gap: 0.5rem;
|
|
402
|
-
overflow: auto;
|
|
403
|
-
`,RN=Me.div`
|
|
404
|
-
display: grid;
|
|
405
|
-
grid-template-columns: 1fr 1fr auto;
|
|
406
|
-
gap: 0.5rem;
|
|
407
|
-
align-items: center;
|
|
408
|
-
`,zN=Me.div`
|
|
409
|
-
padding: 0.75rem;
|
|
410
|
-
text-align: center;
|
|
411
|
-
`;function AN(){const e=Xe(Yo,r=>r),t=b.useCallback(()=>{XM()},[]);return f.jsx(c_,{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(h$,{severity:e.type,onClose:t,children:[e.title!==void 0&&f.jsx(I$,{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 VN(){const[e,t]=b.useState(),r=ot(Du),o=ot(ZA);b.useEffect(()=>{e&&r.mutateAsync({path:e}).then(i=>{const a=i.content;let s=[],l={};Array.isArray(a)?(s=a,l={}):a&&Array.isArray(a.steps)&&(s=a.steps,l=a.params||{});const c=s.map((u,d)=>({...u,id:u.id||Date.now()+d}));de.setState(u=>({...u,test:{name:i.path,steps:c,params:l}}))}).catch(i=>{i instanceof Error?i.message:String(i),Gs("Failed to read file",{title:"Read Error"})})},[e]);const n=async()=>{if(e)try{const i=de.state.test.steps.map(({statusDiv:s,element:l,status:c,statusColor:u,originRef:d,...p})=>p),a={...de.state.test,steps:i};await o.mutateAsync({path:e,content:a}),cx("File saved",{title:"Saved"})}catch(i){Gs(i?.message?String(i.message):"Failed to save",{title:"Save Error"})}};return f.jsxs(f.Fragment,{children:[f.jsxs(MN,{children:[f.jsx(NN,{children:f.jsx(CN,{onSelectFile:t,selectedFile:e})}),f.jsx(FN,{children:f.jsx(ON,{disabled:!e})}),f.jsx(LN,{children:f.jsx(nN,{onSave:n,canSave:!!e})}),f.jsx(UN,{children:f.jsx(dN,{})})]}),f.jsx(AN,{})]})}const MN=Me.div`
|
|
412
|
-
display: grid;
|
|
413
|
-
grid-template-areas:
|
|
414
|
-
'files editor simulator'
|
|
415
|
-
'params editor simulator';
|
|
416
|
-
grid-template-columns: 250px minmax(0, 1fr) 350px;
|
|
417
|
-
grid-template-rows: 1fr minmax(160px, 35%);
|
|
418
|
-
background-color: #f0f2f5;
|
|
419
|
-
height: 100vh;
|
|
420
|
-
padding: 1rem;
|
|
421
|
-
column-gap: 1rem;
|
|
422
|
-
row-gap: 1rem;
|
|
423
|
-
`,NN=Me.div`
|
|
424
|
-
grid-area: files;
|
|
425
|
-
min-height: 0; /* allow internal scroll */
|
|
426
|
-
`,FN=Me.div`
|
|
427
|
-
grid-area: params;
|
|
428
|
-
min-height: 0;
|
|
429
|
-
`,LN=Me.div`
|
|
430
|
-
grid-area: editor;
|
|
431
|
-
min-height: 0;
|
|
432
|
-
height: 100%;
|
|
433
|
-
overflow-y: auto;
|
|
434
|
-
`,UN=Me.div`
|
|
435
|
-
grid-area: simulator;
|
|
436
|
-
min-height: 0;
|
|
437
|
-
`;export{VN as component};
|