finform-react-builder 1.8.34 → 1.8.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/FinForm/inputs/FinDragDropList.d.ts +5 -1
- package/dist/components/FinForm/inputs/FinPhaseCard.d.ts +32 -0
- package/dist/components/FinForm/inputs/index.d.ts +1 -0
- package/dist/components/FinForm/types.d.ts +24 -5
- package/dist/index.es.js +5854 -5282
- package/dist/index.js +48 -48
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
"use strict";var Mc=Object.defineProperty;var ps=e=>{throw TypeError(e)};var Ic=(e,t,r)=>t in e?Mc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ln=(e,t,r)=>Ic(e,typeof t!="symbol"?t+"":t,r),Ai=(e,t,r)=>t.has(e)||ps("Cannot "+r);var O=(e,t,r)=>(Ai(e,t,"read from private field"),r?r.call(e):t.get(e)),ye=(e,t,r)=>t.has(e)?ps("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),re=(e,t,r,n)=>(Ai(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),ve=(e,t,r)=>(Ai(e,t,"access private method"),r);var _n=(e,t,r,n)=>({set _(i){re(e,t,i,r)},get _(){return O(e,t,n)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),$=require("react"),x=require("@mui/material"),zc=require("@emotion/styled"),Ar=require("@emotion/react");function Vc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const ne=Vc($);var kn=e=>e.type==="checkbox",mr=e=>e instanceof Date,tt=e=>e==null;const Jo=e=>typeof e=="object";var We=e=>!tt(e)&&!Array.isArray(e)&&Jo(e)&&!mr(e),el=e=>We(e)&&e.target?kn(e.target)?e.target.checked:e.target.value:e,Bc=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,tl=(e,t)=>e.has(Bc(t)),Nc=e=>{const t=e.constructor&&e.constructor.prototype;return We(t)&&t.hasOwnProperty("isPrototypeOf")},Ma=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Me(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Ma&&(e instanceof Blob||n))&&(r||We(e)))if(t=r?[]:{},!r&&!Nc(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=Me(e[i]));else return e;return t}var mi=e=>/^\w*$/.test(e),Re=e=>e===void 0,yi=e=>Array.isArray(e)?e.filter(Boolean):[],Ia=e=>yi(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Z=(e,t,r)=>{if(!t||!We(e))return r;const n=(mi(t)?[t]:Ia(t)).reduce((i,a)=>tt(i)?i:i[a],e);return Re(n)||n===e?Re(e[t])?r:e[t]:n},pt=e=>typeof e=="boolean",we=(e,t,r)=>{let n=-1;const i=mi(t)?[t]:Ia(t),a=i.length,s=a-1;for(;++n<a;){const o=i[n];let l=r;if(n!==s){const d=e[o];l=We(d)||Array.isArray(d)?d:isNaN(+i[n+1])?{}:[]}if(o==="__proto__"||o==="constructor"||o==="prototype")return;e[o]=l,e=e[o]}};const Qn={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},wt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},zt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},rl=$.createContext(null);rl.displayName="HookFormContext";const gi=()=>$.useContext(rl);var nl=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(i,a,{get:()=>{const s=a;return t._proxyFormState[s]!==wt.all&&(t._proxyFormState[s]=!n||wt.all),r&&(r[s]=!0),e[s]}});return i};const xi=typeof window<"u"?ne.useLayoutEffect:ne.useEffect;function Lc(e){const t=gi(),{control:r=t.control,disabled:n,name:i,exact:a}=e||{},[s,o]=$.useState(r._formState),l=$.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return xi(()=>r._subscribe({name:i,formState:l.current,exact:a,callback:d=>{!n&&o({...r._formState,...d})}}),[i,n,a]),$.useEffect(()=>{l.current.isValid&&r._setValid(!0)},[r]),$.useMemo(()=>nl(s,r,l.current,!1),[s,r])}var It=e=>typeof e=="string",il=(e,t,r,n,i)=>It(e)?(n&&t.watch.add(e),Z(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),Z(r,a))):(n&&(t.watchAll=!0),r);function al(e){const t=gi(),{control:r=t.control,name:n,defaultValue:i,disabled:a,exact:s}=e||{},o=$.useRef(i),[l,d]=$.useState(r._getWatch(n,o.current));return xi(()=>r._subscribe({name:n,formState:{values:!0},exact:s,callback:f=>!a&&d(il(n,r._names,f.values||r._formValues,!1,o.current))}),[n,r,a,s]),$.useEffect(()=>r._removeUnmounted()),l}function qc(e){const t=gi(),{name:r,disabled:n,control:i=t.control,shouldUnregister:a}=e,s=tl(i._names.array,r),o=al({control:i,name:r,defaultValue:Z(i._formValues,r,Z(i._defaultValues,r,e.defaultValue)),exact:!0}),l=Lc({control:i,name:r,exact:!0}),d=$.useRef(e),f=$.useRef(i.register(r,{...e.rules,value:o,...pt(e.disabled)?{disabled:e.disabled}:{}})),p=$.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Z(l.errors,r)},isDirty:{enumerable:!0,get:()=>!!Z(l.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!Z(l.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!Z(l.validatingFields,r)},error:{enumerable:!0,get:()=>Z(l.errors,r)}}),[l,r]),m=$.useCallback(C=>f.current.onChange({target:{value:el(C),name:r},type:Qn.CHANGE}),[r]),y=$.useCallback(()=>f.current.onBlur({target:{value:Z(i._formValues,r),name:r},type:Qn.BLUR}),[r,i._formValues]),T=$.useCallback(C=>{const v=Z(i._fields,r);v&&C&&(v._f.ref={focus:()=>C.focus&&C.focus(),select:()=>C.select&&C.select(),setCustomValidity:S=>C.setCustomValidity(S),reportValidity:()=>C.reportValidity()})},[i._fields,r]),h=$.useMemo(()=>({name:r,value:o,...pt(n)||l.disabled?{disabled:l.disabled||n}:{},onChange:m,onBlur:y,ref:T}),[r,n,l.disabled,m,y,T,o]);return $.useEffect(()=>{const C=i._options.shouldUnregister||a;i.register(r,{...d.current.rules,...pt(d.current.disabled)?{disabled:d.current.disabled}:{}});const v=(S,P)=>{const w=Z(i._fields,S);w&&w._f&&(w._f.mount=P)};if(v(r,!0),C){const S=Me(Z(i._options.defaultValues,r));we(i._defaultValues,r,S),Re(Z(i._formValues,r))&&we(i._formValues,r,S)}return!s&&i.register(r),()=>{(s?C&&!i._state.action:C)?i.unregister(r):v(r,!1)}},[r,i,s,a]),$.useEffect(()=>{i._setDisabledField({disabled:n,name:r})},[n,r,i]),$.useMemo(()=>({field:h,formState:l,fieldState:p}),[h,l,p])}const Pe=e=>e.render(qc(e));var sl=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},ct=e=>Array.isArray(e)?e:[e],ds=()=>{let e=[];return{get observers(){return e},next:i=>{for(const a of e)a.next&&a.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(a=>a!==i)}}),unsubscribe:()=>{e=[]}}},ra=e=>tt(e)||!Jo(e);function Yt(e,t){if(ra(e)||ra(t))return e===t;if(mr(e)&&mr(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const i of r){const a=e[i];if(!n.includes(i))return!1;if(i!=="ref"){const s=t[i];if(mr(a)&&mr(s)||We(a)&&We(s)||Array.isArray(a)&&Array.isArray(s)?!Yt(a,s):a!==s)return!1}}return!0}var et=e=>We(e)&&!Object.keys(e).length,za=e=>e.type==="file",jt=e=>typeof e=="function",Yn=e=>{if(!Ma)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ol=e=>e.type==="select-multiple",Va=e=>e.type==="radio",Wc=e=>Va(e)||kn(e),_i=e=>Yn(e)&&e.isConnected;function Uc(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Re(e)?n++:e[t[n++]];return e}function Hc(e){for(const t in e)if(e.hasOwnProperty(t)&&!Re(e[t]))return!1;return!0}function Ke(e,t){const r=Array.isArray(t)?t:mi(t)?[t]:Ia(t),n=r.length===1?e:Uc(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(We(n)&&et(n)||Array.isArray(n)&&Hc(n))&&Ke(e,r.slice(0,-1)),e}var ll=e=>{for(const t in e)if(jt(e[t]))return!0;return!1};function Zn(e,t={}){const r=Array.isArray(e);if(We(e)||r)for(const n in e)Array.isArray(e[n])||We(e[n])&&!ll(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Zn(e[n],t[n])):tt(e[n])||(t[n]=!0);return t}function cl(e,t,r){const n=Array.isArray(e);if(We(e)||n)for(const i in e)Array.isArray(e[i])||We(e[i])&&!ll(e[i])?Re(t)||ra(r[i])?r[i]=Array.isArray(e[i])?Zn(e[i],[]):{...Zn(e[i])}:cl(e[i],tt(t)?{}:t[i],r[i]):r[i]=!Yt(e[i],t[i]);return r}var cn=(e,t)=>cl(e,t,Zn(t));const fs={value:!1,isValid:!1},hs={value:!0,isValid:!0};var ul=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Re(e[0].attributes.value)?Re(e[0].value)||e[0].value===""?hs:{value:e[0].value,isValid:!0}:hs:fs}return fs},pl=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Re(e)?e:t?e===""?NaN:e&&+e:r&&It(e)?new Date(e):n?n(e):e;const ms={isValid:!1,value:null};var dl=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,ms):ms;function ys(e){const t=e.ref;return za(t)?t.files:Va(t)?dl(e.refs).value:ol(t)?[...t.selectedOptions].map(({value:r})=>r):kn(t)?ul(e.refs).value:pl(Re(t.value)?e.ref.value:t.value,e)}var Kc=(e,t,r,n)=>{const i={};for(const a of e){const s=Z(t,a);s&&we(i,a,s._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},Xn=e=>e instanceof RegExp,un=e=>Re(e)?e:Xn(e)?e.source:We(e)?Xn(e.value)?e.value.source:e.value:e,Lr=e=>({isOnSubmit:!e||e===wt.onSubmit,isOnBlur:e===wt.onBlur,isOnChange:e===wt.onChange,isOnAll:e===wt.all,isOnTouch:e===wt.onTouched});const gs="AsyncFunction";var Gc=e=>!!e&&!!e.validate&&!!(jt(e.validate)&&e.validate.constructor.name===gs||We(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===gs)),Qc=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),na=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Wr=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const a=Z(e,i);if(a){const{_f:s,...o}=a;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],i)&&!n)return!0;if(s.ref&&t(s.ref,s.name)&&!n)return!0;if(Wr(o,t))break}else if(We(o)&&Wr(o,t))break}}};function xs(e,t,r){const n=Z(e,r);if(n||mi(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),s=Z(t,a),o=Z(e,a);if(s&&!Array.isArray(s)&&r!==a)return{name:r};if(o&&o.type)return{name:a,error:o};if(o&&o.root&&o.root.type)return{name:`${a}.root`,error:o.root};i.pop()}return{name:r}}var Yc=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return et(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(s=>t[s]===(!n||wt.all))},Zc=(e,t,r)=>!e||!t||e===t||ct(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),Xc=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,Jc=(e,t)=>!yi(Z(e,t)).length&&Ke(e,t),fl=(e,t,r)=>{const n=ct(Z(e,r));return we(n,"root",t[r]),we(e,r,n),e},qn=e=>It(e);function vs(e,t,r="validate"){if(qn(e)||Array.isArray(e)&&e.every(qn)||pt(e)&&!e)return{type:r,message:qn(e)?e:"",ref:t}}var Pr=e=>We(e)&&!Xn(e)?e:{value:e,message:""},ia=async(e,t,r,n,i,a)=>{const{ref:s,refs:o,required:l,maxLength:d,minLength:f,min:p,max:m,pattern:y,validate:T,name:h,valueAsNumber:C,mount:v}=e._f,S=Z(r,h);if(!v||t.has(h))return{};const P=o?o[0]:s,w=N=>{i&&P.reportValidity&&(P.setCustomValidity(pt(N)?"":N||""),P.reportValidity())},b={},_=Va(s),z=kn(s),F=_||z,D=(C||za(s))&&Re(s.value)&&Re(S)||Yn(s)&&s.value===""||S===""||Array.isArray(S)&&!S.length,u=sl.bind(null,h,n,b),M=(N,A,L,G=zt.maxLength,se=zt.minLength)=>{const me=N?A:L;b[h]={type:N?G:se,message:me,ref:s,...u(N?G:se,me)}};if(a?!Array.isArray(S)||!S.length:l&&(!F&&(D||tt(S))||pt(S)&&!S||z&&!ul(o).isValid||_&&!dl(o).isValid)){const{value:N,message:A}=qn(l)?{value:!!l,message:l}:Pr(l);if(N&&(b[h]={type:zt.required,message:A,ref:P,...u(zt.required,A)},!n))return w(A),b}if(!D&&(!tt(p)||!tt(m))){let N,A;const L=Pr(m),G=Pr(p);if(!tt(S)&&!isNaN(S)){const se=s.valueAsNumber||S&&+S;tt(L.value)||(N=se>L.value),tt(G.value)||(A=se<G.value)}else{const se=s.valueAsDate||new Date(S),me=B=>new Date(new Date().toDateString()+" "+B),ue=s.type=="time",K=s.type=="week";It(L.value)&&S&&(N=ue?me(S)>me(L.value):K?S>L.value:se>new Date(L.value)),It(G.value)&&S&&(A=ue?me(S)<me(G.value):K?S<G.value:se<new Date(G.value))}if((N||A)&&(M(!!N,L.message,G.message,zt.max,zt.min),!n))return w(b[h].message),b}if((d||f)&&!D&&(It(S)||a&&Array.isArray(S))){const N=Pr(d),A=Pr(f),L=!tt(N.value)&&S.length>+N.value,G=!tt(A.value)&&S.length<+A.value;if((L||G)&&(M(L,N.message,A.message),!n))return w(b[h].message),b}if(y&&!D&&It(S)){const{value:N,message:A}=Pr(y);if(Xn(N)&&!S.match(N)&&(b[h]={type:zt.pattern,message:A,ref:s,...u(zt.pattern,A)},!n))return w(A),b}if(T){if(jt(T)){const N=await T(S,r),A=vs(N,P);if(A&&(b[h]={...A,...u(zt.validate,A.message)},!n))return w(A.message),b}else if(We(T)){let N={};for(const A in T){if(!et(N)&&!n)break;const L=vs(await T[A](S,r),P,A);L&&(N={...L,...u(A,L.message)},w(L.message),n&&(b[h]=N))}if(!et(N)&&(b[h]={ref:P,...N},!n))return b}}return w(!0),b};const eu={mode:wt.onSubmit,reValidateMode:wt.onChange,shouldFocusError:!0};function tu(e={}){let t={...eu,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:jt(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1};const n={};let i=We(t.defaultValues)||We(t.values)?Me(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:Me(i),s={action:!1,mount:!1,watch:!1},o={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,d=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let p={...f};const m={array:ds(),state:ds()},y=t.criteriaMode===wt.all,T=g=>E=>{clearTimeout(d),d=setTimeout(g,E)},h=async g=>{if(!t.disabled&&(f.isValid||p.isValid||g)){const E=t.resolver?et((await z()).errors):await D(n,!0);E!==r.isValid&&m.state.next({isValid:E})}},C=(g,E)=>{!t.disabled&&(f.isValidating||f.validatingFields||p.isValidating||p.validatingFields)&&((g||Array.from(o.mount)).forEach(j=>{j&&(E?we(r.validatingFields,j,E):Ke(r.validatingFields,j))}),m.state.next({validatingFields:r.validatingFields,isValidating:!et(r.validatingFields)}))},v=(g,E=[],j,U,R=!0,I=!0)=>{if(U&&j&&!t.disabled){if(s.action=!0,I&&Array.isArray(Z(n,g))){const Y=j(Z(n,g),U.argA,U.argB);R&&we(n,g,Y)}if(I&&Array.isArray(Z(r.errors,g))){const Y=j(Z(r.errors,g),U.argA,U.argB);R&&we(r.errors,g,Y),Jc(r.errors,g)}if((f.touchedFields||p.touchedFields)&&I&&Array.isArray(Z(r.touchedFields,g))){const Y=j(Z(r.touchedFields,g),U.argA,U.argB);R&&we(r.touchedFields,g,Y)}(f.dirtyFields||p.dirtyFields)&&(r.dirtyFields=cn(i,a)),m.state.next({name:g,isDirty:M(g,E),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else we(a,g,E)},S=(g,E)=>{we(r.errors,g,E),m.state.next({errors:r.errors})},P=g=>{r.errors=g,m.state.next({errors:r.errors,isValid:!1})},w=(g,E,j,U)=>{const R=Z(n,g);if(R){const I=Z(a,g,Re(j)?Z(i,g):j);Re(I)||U&&U.defaultChecked||E?we(a,g,E?I:ys(R._f)):L(g,I),s.mount&&h()}},b=(g,E,j,U,R)=>{let I=!1,Y=!1;const ie={name:g};if(!t.disabled){if(!j||U){(f.isDirty||p.isDirty)&&(Y=r.isDirty,r.isDirty=ie.isDirty=M(),I=Y!==ie.isDirty);const W=Yt(Z(i,g),E);Y=!!Z(r.dirtyFields,g),W?Ke(r.dirtyFields,g):we(r.dirtyFields,g,!0),ie.dirtyFields=r.dirtyFields,I=I||(f.dirtyFields||p.dirtyFields)&&Y!==!W}if(j){const W=Z(r.touchedFields,g);W||(we(r.touchedFields,g,j),ie.touchedFields=r.touchedFields,I=I||(f.touchedFields||p.touchedFields)&&W!==j)}I&&R&&m.state.next(ie)}return I?ie:{}},_=(g,E,j,U)=>{const R=Z(r.errors,g),I=(f.isValid||p.isValid)&&pt(E)&&r.isValid!==E;if(t.delayError&&j?(l=T(()=>S(g,j)),l(t.delayError)):(clearTimeout(d),l=null,j?we(r.errors,g,j):Ke(r.errors,g)),(j?!Yt(R,j):R)||!et(U)||I){const Y={...U,...I&&pt(E)?{isValid:E}:{},errors:r.errors,name:g};r={...r,...Y},m.state.next(Y)}},z=async g=>{C(g,!0);const E=await t.resolver(a,t.context,Kc(g||o.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return C(g),E},F=async g=>{const{errors:E}=await z(g);if(g)for(const j of g){const U=Z(E,j);U?we(r.errors,j,U):Ke(r.errors,j)}else r.errors=E;return E},D=async(g,E,j={valid:!0})=>{for(const U in g){const R=g[U];if(R){const{_f:I,...Y}=R;if(I){const ie=o.array.has(I.name),W=R._f&&Gc(R._f);W&&f.validatingFields&&C([U],!0);const xe=await ia(R,o.disabled,a,y,t.shouldUseNativeValidation&&!E,ie);if(W&&f.validatingFields&&C([U]),xe[I.name]&&(j.valid=!1,E))break;!E&&(Z(xe,I.name)?ie?fl(r.errors,xe,I.name):we(r.errors,I.name,xe[I.name]):Ke(r.errors,I.name))}!et(Y)&&await D(Y,E,j)}}return j.valid},u=()=>{for(const g of o.unMount){const E=Z(n,g);E&&(E._f.refs?E._f.refs.every(j=>!_i(j)):!_i(E._f.ref))&&ee(g)}o.unMount=new Set},M=(g,E)=>!t.disabled&&(g&&E&&we(a,g,E),!Yt(B(),i)),N=(g,E,j)=>il(g,o,{...s.mount?a:Re(E)?i:It(g)?{[g]:E}:E},j,E),A=g=>yi(Z(s.mount?a:i,g,t.shouldUnregister?Z(i,g,[]):[])),L=(g,E,j={})=>{const U=Z(n,g);let R=E;if(U){const I=U._f;I&&(!I.disabled&&we(a,g,pl(E,I)),R=Yn(I.ref)&&tt(E)?"":E,ol(I.ref)?[...I.ref.options].forEach(Y=>Y.selected=R.includes(Y.value)):I.refs?kn(I.ref)?I.refs.forEach(Y=>{(!Y.defaultChecked||!Y.disabled)&&(Array.isArray(R)?Y.checked=!!R.find(ie=>ie===Y.value):Y.checked=R===Y.value||!!R)}):I.refs.forEach(Y=>Y.checked=Y.value===R):za(I.ref)?I.ref.value="":(I.ref.value=R,I.ref.type||m.state.next({name:g,values:Me(a)})))}(j.shouldDirty||j.shouldTouch)&&b(g,R,j.shouldTouch,j.shouldDirty,!0),j.shouldValidate&&K(g)},G=(g,E,j)=>{for(const U in E){if(!E.hasOwnProperty(U))return;const R=E[U],I=g+"."+U,Y=Z(n,I);(o.array.has(g)||We(R)||Y&&!Y._f)&&!mr(R)?G(I,R,j):L(I,R,j)}},se=(g,E,j={})=>{const U=Z(n,g),R=o.array.has(g),I=Me(E);we(a,g,I),R?(m.array.next({name:g,values:Me(a)}),(f.isDirty||f.dirtyFields||p.isDirty||p.dirtyFields)&&j.shouldDirty&&m.state.next({name:g,dirtyFields:cn(i,a),isDirty:M(g,I)})):U&&!U._f&&!tt(I)?G(g,I,j):L(g,I,j),na(g,o)&&m.state.next({...r}),m.state.next({name:s.mount?g:void 0,values:Me(a)})},me=async g=>{s.mount=!0;const E=g.target;let j=E.name,U=!0;const R=Z(n,j),I=W=>{U=Number.isNaN(W)||mr(W)&&isNaN(W.getTime())||Yt(W,Z(a,j,W))},Y=Lr(t.mode),ie=Lr(t.reValidateMode);if(R){let W,xe;const Te=E.type?ys(R._f):el(g),je=g.type===Qn.BLUR||g.type===Qn.FOCUS_OUT,Ve=!Qc(R._f)&&!t.resolver&&!Z(r.errors,j)&&!R._f.deps||Xc(je,Z(r.touchedFields,j),r.isSubmitted,ie,Y),qe=na(j,o,je);we(a,j,Te),je?(R._f.onBlur&&R._f.onBlur(g),l&&l(0)):R._f.onChange&&R._f.onChange(g);const Ze=b(j,Te,je),Ft=!et(Ze)||qe;if(!je&&m.state.next({name:j,type:g.type,values:Me(a)}),Ve)return(f.isValid||p.isValid)&&(t.mode==="onBlur"?je&&h():je||h()),Ft&&m.state.next({name:j,...qe?{}:Ze});if(!je&&qe&&m.state.next({...r}),t.resolver){const{errors:nt}=await z([j]);if(I(Te),U){const ut=xs(r.errors,n,j),Et=xs(nt,n,ut.name||j);W=Et.error,j=Et.name,xe=et(nt)}}else C([j],!0),W=(await ia(R,o.disabled,a,y,t.shouldUseNativeValidation))[j],C([j]),I(Te),U&&(W?xe=!1:(f.isValid||p.isValid)&&(xe=await D(n,!0)));U&&(R._f.deps&&K(R._f.deps),_(j,xe,W,Ze))}},ue=(g,E)=>{if(Z(r.errors,E)&&g.focus)return g.focus(),1},K=async(g,E={})=>{let j,U;const R=ct(g);if(t.resolver){const I=await F(Re(g)?g:R);j=et(I),U=g?!R.some(Y=>Z(I,Y)):j}else g?(U=(await Promise.all(R.map(async I=>{const Y=Z(n,I);return await D(Y&&Y._f?{[I]:Y}:Y)}))).every(Boolean),!(!U&&!r.isValid)&&h()):U=j=await D(n);return m.state.next({...!It(g)||(f.isValid||p.isValid)&&j!==r.isValid?{}:{name:g},...t.resolver||!g?{isValid:j}:{},errors:r.errors}),E.shouldFocus&&!U&&Wr(n,ue,g?R:o.mount),U},B=g=>{const E={...s.mount?a:i};return Re(g)?E:It(g)?Z(E,g):g.map(j=>Z(E,j))},H=(g,E)=>({invalid:!!Z((E||r).errors,g),isDirty:!!Z((E||r).dirtyFields,g),error:Z((E||r).errors,g),isValidating:!!Z(r.validatingFields,g),isTouched:!!Z((E||r).touchedFields,g)}),de=g=>{g&&ct(g).forEach(E=>Ke(r.errors,E)),m.state.next({errors:g?r.errors:{}})},fe=(g,E,j)=>{const U=(Z(n,g,{_f:{}})._f||{}).ref,R=Z(r.errors,g)||{},{ref:I,message:Y,type:ie,...W}=R;we(r.errors,g,{...W,...E,ref:U}),m.state.next({name:g,errors:r.errors,isValid:!1}),j&&j.shouldFocus&&U&&U.focus&&U.focus()},pe=(g,E)=>jt(g)?m.state.subscribe({next:j=>g(N(void 0,E),j)}):N(g,E,!0),ge=g=>m.state.subscribe({next:E=>{Zc(g.name,E.name,g.exact)&&Yc(E,g.formState||f,ce,g.reRenderRoot)&&g.callback({values:{...a},...r,...E})}}).unsubscribe,q=g=>(s.mount=!0,p={...p,...g.formState},ge({...g,formState:p})),ee=(g,E={})=>{for(const j of g?ct(g):o.mount)o.mount.delete(j),o.array.delete(j),E.keepValue||(Ke(n,j),Ke(a,j)),!E.keepError&&Ke(r.errors,j),!E.keepDirty&&Ke(r.dirtyFields,j),!E.keepTouched&&Ke(r.touchedFields,j),!E.keepIsValidating&&Ke(r.validatingFields,j),!t.shouldUnregister&&!E.keepDefaultValue&&Ke(i,j);m.state.next({values:Me(a)}),m.state.next({...r,...E.keepDirty?{isDirty:M()}:{}}),!E.keepIsValid&&h()},ae=({disabled:g,name:E})=>{(pt(g)&&s.mount||g||o.disabled.has(E))&&(g?o.disabled.add(E):o.disabled.delete(E))},oe=(g,E={})=>{let j=Z(n,g);const U=pt(E.disabled)||pt(t.disabled);return we(n,g,{...j||{},_f:{...j&&j._f?j._f:{ref:{name:g}},name:g,mount:!0,...E}}),o.mount.add(g),j?ae({disabled:pt(E.disabled)?E.disabled:t.disabled,name:g}):w(g,!0,E.value),{...U?{disabled:E.disabled||t.disabled}:{},...t.progressive?{required:!!E.required,min:un(E.min),max:un(E.max),minLength:un(E.minLength),maxLength:un(E.maxLength),pattern:un(E.pattern)}:{},name:g,onChange:me,onBlur:me,ref:R=>{if(R){oe(g,E),j=Z(n,g);const I=Re(R.value)&&R.querySelectorAll&&R.querySelectorAll("input,select,textarea")[0]||R,Y=Wc(I),ie=j._f.refs||[];if(Y?ie.find(W=>W===I):I===j._f.ref)return;we(n,g,{_f:{...j._f,...Y?{refs:[...ie.filter(_i),I,...Array.isArray(Z(i,g))?[{}]:[]],ref:{type:I.type,name:g}}:{ref:I}}}),w(g,!1,void 0,I)}else j=Z(n,g,{}),j._f&&(j._f.mount=!1),(t.shouldUnregister||E.shouldUnregister)&&!(tl(o.array,g)&&s.action)&&o.unMount.add(g)}}},le=()=>t.shouldFocusError&&Wr(n,ue,o.mount),Se=g=>{pt(g)&&(m.state.next({disabled:g}),Wr(n,(E,j)=>{const U=Z(n,j);U&&(E.disabled=U._f.disabled||g,Array.isArray(U._f.refs)&&U._f.refs.forEach(R=>{R.disabled=U._f.disabled||g}))},0,!1))},Q=(g,E)=>async j=>{let U;j&&(j.preventDefault&&j.preventDefault(),j.persist&&j.persist());let R=Me(a);if(m.state.next({isSubmitting:!0}),t.resolver){const{errors:I,values:Y}=await z();r.errors=I,R=Y}else await D(n);if(o.disabled.size)for(const I of o.disabled)we(R,I,void 0);if(Ke(r.errors,"root"),et(r.errors)){m.state.next({errors:{}});try{await g(R,j)}catch(I){U=I}}else E&&await E({...r.errors},j),le(),setTimeout(le);if(m.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:et(r.errors)&&!U,submitCount:r.submitCount+1,errors:r.errors}),U)throw U},De=(g,E={})=>{Z(n,g)&&(Re(E.defaultValue)?se(g,Me(Z(i,g))):(se(g,E.defaultValue),we(i,g,Me(E.defaultValue))),E.keepTouched||Ke(r.touchedFields,g),E.keepDirty||(Ke(r.dirtyFields,g),r.isDirty=E.defaultValue?M(g,Me(Z(i,g))):M()),E.keepError||(Ke(r.errors,g),f.isValid&&h()),m.state.next({...r}))},He=(g,E={})=>{const j=g?Me(g):i,U=Me(j),R=et(g),I=R?i:U;if(E.keepDefaultValues||(i=j),!E.keepValues){if(E.keepDirtyValues){const Y=new Set([...o.mount,...Object.keys(cn(i,a))]);for(const ie of Array.from(Y))Z(r.dirtyFields,ie)?we(I,ie,Z(a,ie)):se(ie,Z(I,ie))}else{if(Ma&&Re(g))for(const Y of o.mount){const ie=Z(n,Y);if(ie&&ie._f){const W=Array.isArray(ie._f.refs)?ie._f.refs[0]:ie._f.ref;if(Yn(W)){const xe=W.closest("form");if(xe){xe.reset();break}}}}for(const Y of o.mount)se(Y,Z(I,Y))}a=Me(I),m.array.next({values:{...I}}),m.state.next({values:{...I}})}o={mount:E.keepDirtyValues?o.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!f.isValid||!!E.keepIsValid||!!E.keepDirtyValues,s.watch=!!t.shouldUnregister,m.state.next({submitCount:E.keepSubmitCount?r.submitCount:0,isDirty:R?!1:E.keepDirty?r.isDirty:!!(E.keepDefaultValues&&!Yt(g,i)),isSubmitted:E.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:R?{}:E.keepDirtyValues?E.keepDefaultValues&&a?cn(i,a):r.dirtyFields:E.keepDefaultValues&&g?cn(i,g):E.keepDirty?r.dirtyFields:{},touchedFields:E.keepTouched?r.touchedFields:{},errors:E.keepErrors?r.errors:{},isSubmitSuccessful:E.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Qe=(g,E)=>He(jt(g)?g(a):g,E),X=(g,E={})=>{const j=Z(n,g),U=j&&j._f;if(U){const R=U.refs?U.refs[0]:U.ref;R.focus&&(R.focus(),E.shouldSelect&&jt(R.select)&&R.select())}},ce=g=>{r={...r,...g}},he={control:{register:oe,unregister:ee,getFieldState:H,handleSubmit:Q,setError:fe,_subscribe:ge,_runSchema:z,_focusError:le,_getWatch:N,_getDirty:M,_setValid:h,_setFieldArray:v,_setDisabledField:ae,_setErrors:P,_getFieldArray:A,_reset:He,_resetDefaultValues:()=>jt(t.defaultValues)&&t.defaultValues().then(g=>{Qe(g,t.resetOptions),m.state.next({isLoading:!1})}),_removeUnmounted:u,_disableForm:Se,_subjects:m,_proxyFormState:f,get _fields(){return n},get _formValues(){return a},get _state(){return s},set _state(g){s=g},get _defaultValues(){return i},get _names(){return o},set _names(g){o=g},get _formState(){return r},get _options(){return t},set _options(g){t={...t,...g}}},subscribe:q,trigger:K,register:oe,handleSubmit:Q,watch:pe,setValue:se,getValues:B,reset:Qe,resetField:De,clearErrors:de,unregister:ee,setError:fe,setFocus:X,getFieldState:H};return{...he,formControl:he}}var Ht=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},Ri=(e,t,r={})=>r.shouldFocus||Re(r.shouldFocus)?r.focusName||`${e}.${Re(r.focusIndex)?t:r.focusIndex}.`:"",$i=(e,t)=>[...e,...ct(t)],Di=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Pi(e,t,r){return[...e.slice(0,t),...ct(r),...e.slice(t)]}var Mi=(e,t,r)=>Array.isArray(e)?(Re(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],Ii=(e,t)=>[...ct(t),...ct(e)];function ru(e,t){let r=0;const n=[...e];for(const i of t)n.splice(i-r,1),r++;return yi(n).length?n:[]}var zi=(e,t)=>Re(t)?[]:ru(e,ct(t).sort((r,n)=>r-n)),Vi=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},bs=(e,t,r)=>(e[t]=r,e);function nu(e){const t=gi(),{control:r=t.control,name:n,keyName:i="id",shouldUnregister:a,rules:s}=e,[o,l]=$.useState(r._getFieldArray(n)),d=$.useRef(r._getFieldArray(n).map(Ht)),f=$.useRef(o),p=$.useRef(n),m=$.useRef(!1);p.current=n,f.current=o,r._names.array.add(n),s&&r.register(n,s),xi(()=>r._subjects.array.subscribe({next:({values:_,name:z})=>{if(z===p.current||!z){const F=Z(_,p.current);Array.isArray(F)&&(l(F),d.current=F.map(Ht))}}}).unsubscribe,[r]);const y=$.useCallback(_=>{m.current=!0,r._setFieldArray(n,_)},[r,n]),T=(_,z)=>{const F=ct(Me(_)),D=$i(r._getFieldArray(n),F);r._names.focus=Ri(n,D.length-1,z),d.current=$i(d.current,F.map(Ht)),y(D),l(D),r._setFieldArray(n,D,$i,{argA:Di(_)})},h=(_,z)=>{const F=ct(Me(_)),D=Ii(r._getFieldArray(n),F);r._names.focus=Ri(n,0,z),d.current=Ii(d.current,F.map(Ht)),y(D),l(D),r._setFieldArray(n,D,Ii,{argA:Di(_)})},C=_=>{const z=zi(r._getFieldArray(n),_);d.current=zi(d.current,_),y(z),l(z),!Array.isArray(Z(r._fields,n))&&we(r._fields,n,void 0),r._setFieldArray(n,z,zi,{argA:_})},v=(_,z,F)=>{const D=ct(Me(z)),u=Pi(r._getFieldArray(n),_,D);r._names.focus=Ri(n,_,F),d.current=Pi(d.current,_,D.map(Ht)),y(u),l(u),r._setFieldArray(n,u,Pi,{argA:_,argB:Di(z)})},S=(_,z)=>{const F=r._getFieldArray(n);Vi(F,_,z),Vi(d.current,_,z),y(F),l(F),r._setFieldArray(n,F,Vi,{argA:_,argB:z},!1)},P=(_,z)=>{const F=r._getFieldArray(n);Mi(F,_,z),Mi(d.current,_,z),y(F),l(F),r._setFieldArray(n,F,Mi,{argA:_,argB:z},!1)},w=(_,z)=>{const F=Me(z),D=bs(r._getFieldArray(n),_,F);d.current=[...D].map((u,M)=>!u||M===_?Ht():d.current[M]),y(D),l([...D]),r._setFieldArray(n,D,bs,{argA:_,argB:F},!0,!1)},b=_=>{const z=ct(Me(_));d.current=z.map(Ht),y([...z]),l([...z]),r._setFieldArray(n,[...z],F=>F,{},!0,!1)};return $.useEffect(()=>{if(r._state.action=!1,na(n,r._names)&&r._subjects.state.next({...r._formState}),m.current&&(!Lr(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!Lr(r._options.reValidateMode).isOnSubmit)if(r._options.resolver)r._runSchema([n]).then(_=>{const z=Z(_.errors,n),F=Z(r._formState.errors,n);(F?!z&&F.type||z&&(F.type!==z.type||F.message!==z.message):z&&z.type)&&(z?we(r._formState.errors,n,z):Ke(r._formState.errors,n),r._subjects.state.next({errors:r._formState.errors}))});else{const _=Z(r._fields,n);_&&_._f&&!(Lr(r._options.reValidateMode).isOnSubmit&&Lr(r._options.mode).isOnSubmit)&&ia(_,r._names.disabled,r._formValues,r._options.criteriaMode===wt.all,r._options.shouldUseNativeValidation,!0).then(z=>!et(z)&&r._subjects.state.next({errors:fl(r._formState.errors,z,n)}))}r._subjects.state.next({name:n,values:Me(r._formValues)}),r._names.focus&&Wr(r._fields,(_,z)=>{if(r._names.focus&&z.startsWith(r._names.focus)&&_.focus)return _.focus(),1}),r._names.focus="",r._setValid(),m.current=!1},[o,n,r]),$.useEffect(()=>(!Z(r._formValues,n)&&r._setFieldArray(n),()=>{const _=(z,F)=>{const D=Z(r._fields,z);D&&D._f&&(D._f.mount=F)};r._options.shouldUnregister||a?r.unregister(n):_(n,!1)}),[n,r,i,a]),{swap:$.useCallback(S,[y,n,r]),move:$.useCallback(P,[y,n,r]),prepend:$.useCallback(h,[y,n,r]),append:$.useCallback(T,[y,n,r]),remove:$.useCallback(C,[y,n,r]),insert:$.useCallback(v,[y,n,r]),update:$.useCallback(w,[y,n,r]),replace:$.useCallback(b,[y,n,r]),fields:$.useMemo(()=>o.map((_,z)=>({..._,[i]:d.current[z]||Ht()})),[o,i])}}function iu(e={}){const t=$.useRef(void 0),r=$.useRef(void 0),[n,i]=$.useState({isDirty:!1,isValidating:!1,isLoading:jt(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:jt(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!jt(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:s,...o}=tu(e);t.current={...o,formState:n}}const a=t.current.control;return a._options=e,xi(()=>{const s=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0});return i(o=>({...o,isReady:!0})),a._formState.isReady=!0,s},[a]),$.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),$.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),$.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),$.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),$.useEffect(()=>{if(a._proxyFormState.isDirty){const s=a._getDirty();s!==n.isDirty&&a._subjects.state.next({isDirty:s})}},[a,n.isDirty]),$.useEffect(()=>{e.values&&!Yt(e.values,r.current)?(a._reset(e.values,a._options.resetOptions),r.current=e.values,i(s=>({...s}))):a._resetDefaultValues()},[a,e.values]),$.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=nl(n,a),t.current}const ws=(e,t,r)=>{if(e&&"reportValidity"in e){const n=Z(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},hl=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?ws(n.ref,r,e):n&&n.refs&&n.refs.forEach(i=>ws(i,r,e))}},au=(e,t)=>{t.shouldUseNativeValidation&&hl(e,t);const r={};for(const n in e){const i=Z(t.fields,n),a=Object.assign(e[n]||{},{ref:i&&i.ref});if(su(t.names||Object.keys(e),n)){const s=Object.assign({},Z(r,n));we(s,"root",a),we(r,n,s)}else we(r,n,a)}return r},su=(e,t)=>{const r=Ss(t);return e.some(n=>Ss(n).match(`^${r}\\.\\d+`))};function Ss(e){return e.replace(/\]|\[/g,"")}function ou(e,t,r){return r===void 0&&(r={}),function(n,i,a){try{return Promise.resolve(function(s,o){try{var l=(t!=null&&t.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e[r.mode==="sync"?"validateSync":"validate"](n,Object.assign({abortEarly:!1},t,{context:i}))).then(function(d){return a.shouldUseNativeValidation&&hl({},a),{values:r.raw?Object.assign({},n):d,errors:{}}}))}catch(d){return o(d)}return l&&l.then?l.then(void 0,o):l}(0,function(s){if(!s.inner)throw s;return{values:{},errors:au((o=s,l=!a.shouldUseNativeValidation&&a.criteriaMode==="all",(o.inner||[]).reduce(function(d,f){if(d[f.path]||(d[f.path]={message:f.message,type:f.type}),l){var p=d[f.path].types,m=p&&p[f.type];d[f.path]=sl(f.path,l,d,f.type,m?[].concat(m,f.message):f.message)}return d},{})),a)};var o,l}))}catch(s){return Promise.reject(s)}}}var Tn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Or=typeof window>"u"||"Deno"in globalThis;function st(){}function lu(e,t){return typeof e=="function"?e(t):e}function aa(e){return typeof e=="number"&&e>=0&&e!==1/0}function ml(e,t){return Math.max(e+(t||0)-Date.now(),0)}function sr(e,t){return typeof e=="function"?e(t):e}function xt(e,t){return typeof e=="function"?e(t):e}function Cs(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(n){if(t.queryHash!==Ba(s,t.options))return!1}else if(!xn(t.queryKey,s))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||i&&i!==t.state.fetchStatus||a&&!a(t))}function Es(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(gn(t.options.mutationKey)!==gn(a))return!1}else if(!xn(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Ba(e,t){return((t==null?void 0:t.queryKeyHashFn)||gn)(e)}function gn(e){return JSON.stringify(e,(t,r)=>la(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function xn(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>xn(e[r],t[r])):!1}function sa(e,t){if(e===t)return e;const r=ks(e)&&ks(t);if(r||la(e)&&la(t)){const n=r?e:Object.keys(e),i=n.length,a=r?t:Object.keys(t),s=a.length,o=r?[]:{},l=new Set(n);let d=0;for(let f=0;f<s;f++){const p=r?f:a[f];(!r&&l.has(p)||r)&&e[p]===void 0&&t[p]===void 0?(o[p]=void 0,d++):(o[p]=sa(e[p],t[p]),o[p]===e[p]&&e[p]!==void 0&&d++)}return i===s&&d===i?e:o}return t}function oa(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function ks(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function la(e){if(!Ts(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Ts(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ts(e){return Object.prototype.toString.call(e)==="[object Object]"}function cu(e){return new Promise(t=>{setTimeout(t,e)})}function ca(e,t,r){if(typeof r.structuralSharing=="function")return r.structuralSharing(e,t);if(r.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return sa(e,t)}catch(n){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${n}`),n}return sa(e,t)}return t}function uu(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function pu(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Jn=Symbol();function yl(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Jn&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Jn?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function du(e,t){return typeof e=="function"?e(...t):!!e}var gr,Zt,Hr,Wo,fu=(Wo=class extends Tn{constructor(){super();ye(this,gr);ye(this,Zt);ye(this,Hr);re(this,Hr,t=>{if(!Or&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){O(this,Zt)||this.setEventListener(O(this,Hr))}onUnsubscribe(){var t;this.hasListeners()||((t=O(this,Zt))==null||t.call(this),re(this,Zt,void 0))}setEventListener(t){var r;re(this,Hr,t),(r=O(this,Zt))==null||r.call(this),re(this,Zt,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){O(this,gr)!==t&&(re(this,gr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof O(this,gr)=="boolean"?O(this,gr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},gr=new WeakMap,Zt=new WeakMap,Hr=new WeakMap,Wo),Na=new fu,Kr,Xt,Gr,Uo,hu=(Uo=class extends Tn{constructor(){super();ye(this,Kr,!0);ye(this,Xt);ye(this,Gr);re(this,Gr,t=>{if(!Or&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){O(this,Xt)||this.setEventListener(O(this,Gr))}onUnsubscribe(){var t;this.hasListeners()||((t=O(this,Xt))==null||t.call(this),re(this,Xt,void 0))}setEventListener(t){var r;re(this,Gr,t),(r=O(this,Xt))==null||r.call(this),re(this,Xt,t(this.setOnline.bind(this)))}setOnline(t){O(this,Kr)!==t&&(re(this,Kr,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return O(this,Kr)}},Kr=new WeakMap,Xt=new WeakMap,Gr=new WeakMap,Uo),ei=new hu;function ua(){let e,t;const r=new Promise((i,a)=>{e=i,t=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}function mu(e){return Math.min(1e3*2**e,3e4)}function gl(e){return(e??"online")==="online"?ei.isOnline():!0}var xl=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Bi(e){return e instanceof xl}function vl(e){let t=!1,r=0,n=!1,i;const a=ua(),s=h=>{var C;n||(m(new xl(h)),(C=e.abort)==null||C.call(e))},o=()=>{t=!0},l=()=>{t=!1},d=()=>Na.isFocused()&&(e.networkMode==="always"||ei.isOnline())&&e.canRun(),f=()=>gl(e.networkMode)&&e.canRun(),p=h=>{var C;n||(n=!0,(C=e.onSuccess)==null||C.call(e,h),i==null||i(),a.resolve(h))},m=h=>{var C;n||(n=!0,(C=e.onError)==null||C.call(e,h),i==null||i(),a.reject(h))},y=()=>new Promise(h=>{var C;i=v=>{(n||d())&&h(v)},(C=e.onPause)==null||C.call(e)}).then(()=>{var h;i=void 0,n||(h=e.onContinue)==null||h.call(e)}),T=()=>{if(n)return;let h;const C=r===0?e.initialPromise:void 0;try{h=C??e.fn()}catch(v){h=Promise.reject(v)}Promise.resolve(h).then(p).catch(v=>{var _;if(n)return;const S=e.retry??(Or?0:3),P=e.retryDelay??mu,w=typeof P=="function"?P(r,v):P,b=S===!0||typeof S=="number"&&r<S||typeof S=="function"&&S(r,v);if(t||!b){m(v);return}r++,(_=e.onFail)==null||_.call(e,r,v),cu(w).then(()=>d()?void 0:y()).then(()=>{t?m(v):T()})})};return{promise:a,cancel:s,continue:()=>(i==null||i(),a),cancelRetry:o,continueRetry:l,canStart:f,start:()=>(f()?T():y().then(T),a)}}var yu=e=>setTimeout(e,0);function gu(){let e=[],t=0,r=o=>{o()},n=o=>{o()},i=yu;const a=o=>{t?e.push(o):i(()=>{r(o)})},s=()=>{const o=e;e=[],o.length&&i(()=>{n(()=>{o.forEach(l=>{r(l)})})})};return{batch:o=>{let l;t++;try{l=o()}finally{t--,t||s()}return l},batchCalls:o=>(...l)=>{a(()=>{o(...l)})},schedule:a,setNotifyFunction:o=>{r=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{i=o}}}var Ge=gu(),xr,Ho,bl=(Ho=class{constructor(){ye(this,xr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),aa(this.gcTime)&&re(this,xr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Or?1/0:5*60*1e3))}clearGcTimeout(){O(this,xr)&&(clearTimeout(O(this,xr)),re(this,xr,void 0))}},xr=new WeakMap,Ho),Qr,vr,gt,br,Ye,wn,wr,kt,qt,Ko,xu=(Ko=class extends bl{constructor(t){super();ye(this,kt);ye(this,Qr);ye(this,vr);ye(this,gt);ye(this,br);ye(this,Ye);ye(this,wn);ye(this,wr);re(this,wr,!1),re(this,wn,t.defaultOptions),this.setOptions(t.options),this.observers=[],re(this,br,t.client),re(this,gt,O(this,br).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,re(this,Qr,vu(this.options)),this.state=t.state??O(this,Qr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=O(this,Ye))==null?void 0:t.promise}setOptions(t){this.options={...O(this,wn),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&O(this,gt).remove(this)}setData(t,r){const n=ca(this.state.data,t,this.options);return ve(this,kt,qt).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){ve(this,kt,qt).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=O(this,Ye))==null?void 0:n.promise;return(i=O(this,Ye))==null||i.cancel(t),r?r.then(st).catch(st):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(O(this,Qr))}isActive(){return this.observers.some(t=>xt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Jn||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>sr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!ml(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=O(this,Ye))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=O(this,Ye))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),O(this,gt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(O(this,Ye)&&(O(this,wr)?O(this,Ye).cancel({revert:!0}):O(this,Ye).cancelRetry()),this.scheduleGc()),O(this,gt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ve(this,kt,qt).call(this,{type:"invalidate"})}fetch(t,r){var d,f,p;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(O(this,Ye))return O(this,Ye).continueRetry(),O(this,Ye).promise}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(y=>y.options.queryFn);m&&this.setOptions(m.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const n=new AbortController,i=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(re(this,wr,!0),n.signal)})},a=()=>{const m=yl(this.options,r),T=(()=>{const h={client:O(this,br),queryKey:this.queryKey,meta:this.meta};return i(h),h})();return re(this,wr,!1),this.options.persister?this.options.persister(m,T,this):m(T)},o=(()=>{const m={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:O(this,br),state:this.state,fetchFn:a};return i(m),m})();(d=this.options.behavior)==null||d.onFetch(o,this),re(this,vr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=o.fetchOptions)==null?void 0:f.meta))&&ve(this,kt,qt).call(this,{type:"fetch",meta:(p=o.fetchOptions)==null?void 0:p.meta});const l=m=>{var y,T,h,C;Bi(m)&&m.silent||ve(this,kt,qt).call(this,{type:"error",error:m}),Bi(m)||((T=(y=O(this,gt).config).onError)==null||T.call(y,m,this),(C=(h=O(this,gt).config).onSettled)==null||C.call(h,this.state.data,m,this)),this.scheduleGc()};return re(this,Ye,vl({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:m=>{var y,T,h,C;if(m===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(m)}catch(v){l(v);return}(T=(y=O(this,gt).config).onSuccess)==null||T.call(y,m,this),(C=(h=O(this,gt).config).onSettled)==null||C.call(h,m,this.state.error,this),this.scheduleGc()},onError:l,onFail:(m,y)=>{ve(this,kt,qt).call(this,{type:"failed",failureCount:m,error:y})},onPause:()=>{ve(this,kt,qt).call(this,{type:"pause"})},onContinue:()=>{ve(this,kt,qt).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),O(this,Ye).start()}},Qr=new WeakMap,vr=new WeakMap,gt=new WeakMap,br=new WeakMap,Ye=new WeakMap,wn=new WeakMap,wr=new WeakMap,kt=new WeakSet,qt=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...wl(n.data,this.options),fetchMeta:t.meta??null};case"success":return re(this,vr,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Bi(i)&&i.revert&&O(this,vr)?{...O(this,vr),fetchStatus:"idle"}:{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Ge.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),O(this,gt).notify({query:this,type:"updated",action:t})})},Ko);function wl(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:gl(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function vu(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var $t,Go,bu=(Go=class extends Tn{constructor(t={}){super();ye(this,$t);this.config=t,re(this,$t,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??Ba(i,r);let s=this.get(a);return s||(s=new xu({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){O(this,$t).has(t.queryHash)||(O(this,$t).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=O(this,$t).get(t.queryHash);r&&(t.destroy(),r===t&&O(this,$t).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ge.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return O(this,$t).get(t)}getAll(){return[...O(this,$t).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Cs(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Cs(t,n)):r}notify(t){Ge.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ge.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ge.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},$t=new WeakMap,Go),Dt,Xe,Sr,Pt,Gt,Qo,wu=(Qo=class extends bl{constructor(t){super();ye(this,Pt);ye(this,Dt);ye(this,Xe);ye(this,Sr);this.mutationId=t.mutationId,re(this,Xe,t.mutationCache),re(this,Dt,[]),this.state=t.state||Su(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){O(this,Dt).includes(t)||(O(this,Dt).push(t),this.clearGcTimeout(),O(this,Xe).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){re(this,Dt,O(this,Dt).filter(r=>r!==t)),this.scheduleGc(),O(this,Xe).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){O(this,Dt).length||(this.state.status==="pending"?this.scheduleGc():O(this,Xe).remove(this))}continue(){var t;return((t=O(this,Sr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,s,o,l,d,f,p,m,y,T,h,C,v,S,P,w,b,_,z,F;const r=()=>{ve(this,Pt,Gt).call(this,{type:"continue"})};re(this,Sr,vl({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(D,u)=>{ve(this,Pt,Gt).call(this,{type:"failed",failureCount:D,error:u})},onPause:()=>{ve(this,Pt,Gt).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>O(this,Xe).canRun(this)}));const n=this.state.status==="pending",i=!O(this,Sr).canStart();try{if(n)r();else{ve(this,Pt,Gt).call(this,{type:"pending",variables:t,isPaused:i}),await((s=(a=O(this,Xe).config).onMutate)==null?void 0:s.call(a,t,this));const u=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t));u!==this.state.context&&ve(this,Pt,Gt).call(this,{type:"pending",context:u,variables:t,isPaused:i})}const D=await O(this,Sr).start();return await((f=(d=O(this,Xe).config).onSuccess)==null?void 0:f.call(d,D,t,this.state.context,this)),await((m=(p=this.options).onSuccess)==null?void 0:m.call(p,D,t,this.state.context)),await((T=(y=O(this,Xe).config).onSettled)==null?void 0:T.call(y,D,null,this.state.variables,this.state.context,this)),await((C=(h=this.options).onSettled)==null?void 0:C.call(h,D,null,t,this.state.context)),ve(this,Pt,Gt).call(this,{type:"success",data:D}),D}catch(D){try{throw await((S=(v=O(this,Xe).config).onError)==null?void 0:S.call(v,D,t,this.state.context,this)),await((w=(P=this.options).onError)==null?void 0:w.call(P,D,t,this.state.context)),await((_=(b=O(this,Xe).config).onSettled)==null?void 0:_.call(b,void 0,D,this.state.variables,this.state.context,this)),await((F=(z=this.options).onSettled)==null?void 0:F.call(z,void 0,D,t,this.state.context)),D}finally{ve(this,Pt,Gt).call(this,{type:"error",error:D})}}finally{O(this,Xe).runNext(this)}}},Dt=new WeakMap,Xe=new WeakMap,Sr=new WeakMap,Pt=new WeakSet,Gt=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Ge.batch(()=>{O(this,Dt).forEach(n=>{n.onMutationUpdate(t)}),O(this,Xe).notify({mutation:this,type:"updated",action:t})})},Qo);function Su(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Wt,Tt,Sn,Yo,Cu=(Yo=class extends Tn{constructor(t={}){super();ye(this,Wt);ye(this,Tt);ye(this,Sn);this.config=t,re(this,Wt,new Set),re(this,Tt,new Map),re(this,Sn,0)}build(t,r,n){const i=new wu({mutationCache:this,mutationId:++_n(this,Sn)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){O(this,Wt).add(t);const r=Rn(t);if(typeof r=="string"){const n=O(this,Tt).get(r);n?n.push(t):O(this,Tt).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(O(this,Wt).delete(t)){const r=Rn(t);if(typeof r=="string"){const n=O(this,Tt).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&O(this,Tt).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Rn(t);if(typeof r=="string"){const n=O(this,Tt).get(r),i=n==null?void 0:n.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=Rn(t);if(typeof r=="string"){const i=(n=O(this,Tt).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ge.batch(()=>{O(this,Wt).forEach(t=>{this.notify({type:"removed",mutation:t})}),O(this,Wt).clear(),O(this,Tt).clear()})}getAll(){return Array.from(O(this,Wt))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Es(r,n))}findAll(t={}){return this.getAll().filter(r=>Es(t,r))}notify(t){Ge.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Ge.batch(()=>Promise.all(t.map(r=>r.continue().catch(st))))}},Wt=new WeakMap,Tt=new WeakMap,Sn=new WeakMap,Yo);function Rn(e){var t;return(t=e.options.scope)==null?void 0:t.id}function js(e){return{onFetch:(t,r)=>{var f,p,m,y,T;const n=t.options,i=(m=(p=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:p.fetchMore)==null?void 0:m.direction,a=((y=t.state.data)==null?void 0:y.pages)||[],s=((T=t.state.data)==null?void 0:T.pageParams)||[];let o={pages:[],pageParams:[]},l=0;const d=async()=>{let h=!1;const C=P=>{Object.defineProperty(P,"signal",{enumerable:!0,get:()=>(t.signal.aborted?h=!0:t.signal.addEventListener("abort",()=>{h=!0}),t.signal)})},v=yl(t.options,t.fetchOptions),S=async(P,w,b)=>{if(h)return Promise.reject();if(w==null&&P.pages.length)return Promise.resolve(P);const z=(()=>{const M={client:t.client,queryKey:t.queryKey,pageParam:w,direction:b?"backward":"forward",meta:t.options.meta};return C(M),M})(),F=await v(z),{maxPages:D}=t.options,u=b?pu:uu;return{pages:u(P.pages,F,D),pageParams:u(P.pageParams,w,D)}};if(i&&a.length){const P=i==="backward",w=P?Eu:Os,b={pages:a,pageParams:s},_=w(n,b);o=await S(b,_,P)}else{const P=e??a.length;do{const w=l===0?s[0]??n.initialPageParam:Os(n,o);if(l>0&&w==null)break;o=await S(o,w),l++}while(l<P)}return o};t.options.persister?t.fetchFn=()=>{var h,C;return(C=(h=t.options).persister)==null?void 0:C.call(h,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=d}}}function Os(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function Eu(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Le,Jt,er,Yr,Zr,tr,Xr,Jr,Zo,ku=(Zo=class{constructor(e={}){ye(this,Le);ye(this,Jt);ye(this,er);ye(this,Yr);ye(this,Zr);ye(this,tr);ye(this,Xr);ye(this,Jr);re(this,Le,e.queryCache||new bu),re(this,Jt,e.mutationCache||new Cu),re(this,er,e.defaultOptions||{}),re(this,Yr,new Map),re(this,Zr,new Map),re(this,tr,0)}mount(){_n(this,tr)._++,O(this,tr)===1&&(re(this,Xr,Na.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,Le).onFocus())})),re(this,Jr,ei.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,Le).onOnline())})))}unmount(){var e,t;_n(this,tr)._--,O(this,tr)===0&&((e=O(this,Xr))==null||e.call(this),re(this,Xr,void 0),(t=O(this,Jr))==null||t.call(this),re(this,Jr,void 0))}isFetching(e){return O(this,Le).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return O(this,Jt).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=O(this,Le).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=O(this,Le).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(sr(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return O(this,Le).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=O(this,Le).get(n.queryHash),a=i==null?void 0:i.state.data,s=lu(t,a);if(s!==void 0)return O(this,Le).build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return Ge.batch(()=>O(this,Le).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=O(this,Le).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=O(this,Le);Ge.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=O(this,Le);return Ge.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Ge.batch(()=>O(this,Le).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(st).catch(st)}invalidateQueries(e,t={}){return Ge.batch(()=>(O(this,Le).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Ge.batch(()=>O(this,Le).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(st)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(st)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=O(this,Le).build(this,t);return r.isStaleByTime(sr(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(st).catch(st)}fetchInfiniteQuery(e){return e.behavior=js(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(st).catch(st)}ensureInfiniteQueryData(e){return e.behavior=js(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ei.isOnline()?O(this,Jt).resumePausedMutations():Promise.resolve()}getQueryCache(){return O(this,Le)}getMutationCache(){return O(this,Jt)}getDefaultOptions(){return O(this,er)}setDefaultOptions(e){re(this,er,e)}setQueryDefaults(e,t){O(this,Yr).set(gn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...O(this,Yr).values()],r={};return t.forEach(n=>{xn(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){O(this,Zr).set(gn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...O(this,Zr).values()],r={};return t.forEach(n=>{xn(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...O(this,er).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ba(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Jn&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...O(this,er).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){O(this,Le).clear(),O(this,Jt).clear()}},Le=new WeakMap,Jt=new WeakMap,er=new WeakMap,Yr=new WeakMap,Zr=new WeakMap,tr=new WeakMap,Xr=new WeakMap,Jr=new WeakMap,Zo),at,be,Cn,Je,Cr,en,rr,nr,En,tn,rn,Er,kr,ir,nn,ke,dn,pa,da,fa,ha,ma,ya,ga,Sl,Xo,Tu=(Xo=class extends Tn{constructor(t,r){super();ye(this,ke);ye(this,at);ye(this,be);ye(this,Cn);ye(this,Je);ye(this,Cr);ye(this,en);ye(this,rr);ye(this,nr);ye(this,En);ye(this,tn);ye(this,rn);ye(this,Er);ye(this,kr);ye(this,ir);ye(this,nn,new Set);this.options=r,re(this,at,t),re(this,nr,null),re(this,rr,ua()),this.options.experimental_prefetchInRender||O(this,rr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(O(this,be).addObserver(this),Fs(O(this,be),this.options)?ve(this,ke,dn).call(this):this.updateResult(),ve(this,ke,ha).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return xa(O(this,be),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return xa(O(this,be),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ve(this,ke,ma).call(this),ve(this,ke,ya).call(this),O(this,be).removeObserver(this)}setOptions(t){const r=this.options,n=O(this,be);if(this.options=O(this,at).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof xt(this.options.enabled,O(this,be))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ve(this,ke,ga).call(this),O(this,be).setOptions(this.options),r._defaulted&&!oa(this.options,r)&&O(this,at).getQueryCache().notify({type:"observerOptionsUpdated",query:O(this,be),observer:this});const i=this.hasListeners();i&&As(O(this,be),n,this.options,r)&&ve(this,ke,dn).call(this),this.updateResult(),i&&(O(this,be)!==n||xt(this.options.enabled,O(this,be))!==xt(r.enabled,O(this,be))||sr(this.options.staleTime,O(this,be))!==sr(r.staleTime,O(this,be)))&&ve(this,ke,pa).call(this);const a=ve(this,ke,da).call(this);i&&(O(this,be)!==n||xt(this.options.enabled,O(this,be))!==xt(r.enabled,O(this,be))||a!==O(this,ir))&&ve(this,ke,fa).call(this,a)}getOptimisticResult(t){const r=O(this,at).getQueryCache().build(O(this,at),t),n=this.createResult(r,t);return Ou(this,n)&&(re(this,Je,n),re(this,en,this.options),re(this,Cr,O(this,be).state)),n}getCurrentResult(){return O(this,Je)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),Reflect.get(n,i))})}trackProp(t){O(this,nn).add(t)}getCurrentQuery(){return O(this,be)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=O(this,at).defaultQueryOptions(t),n=O(this,at).getQueryCache().build(O(this,at),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return ve(this,ke,dn).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),O(this,Je)))}createResult(t,r){var D;const n=O(this,be),i=this.options,a=O(this,Je),s=O(this,Cr),o=O(this,en),d=t!==n?t.state:O(this,Cn),{state:f}=t;let p={...f},m=!1,y;if(r._optimisticResults){const u=this.hasListeners(),M=!u&&Fs(t,r),N=u&&As(t,n,r,i);(M||N)&&(p={...p,...wl(f.data,t.options)}),r._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:T,errorUpdatedAt:h,status:C}=p;y=p.data;let v=!1;if(r.placeholderData!==void 0&&y===void 0&&C==="pending"){let u;a!=null&&a.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData)?(u=a.data,v=!0):u=typeof r.placeholderData=="function"?r.placeholderData((D=O(this,rn))==null?void 0:D.state.data,O(this,rn)):r.placeholderData,u!==void 0&&(C="success",y=ca(a==null?void 0:a.data,u,r),m=!0)}if(r.select&&y!==void 0&&!v)if(a&&y===(s==null?void 0:s.data)&&r.select===O(this,En))y=O(this,tn);else try{re(this,En,r.select),y=r.select(y),y=ca(a==null?void 0:a.data,y,r),re(this,tn,y),re(this,nr,null)}catch(u){re(this,nr,u)}O(this,nr)&&(T=O(this,nr),y=O(this,tn),h=Date.now(),C="error");const S=p.fetchStatus==="fetching",P=C==="pending",w=C==="error",b=P&&S,_=y!==void 0,F={status:C,fetchStatus:p.fetchStatus,isPending:P,isSuccess:C==="success",isError:w,isInitialLoading:b,isLoading:b,data:y,dataUpdatedAt:p.dataUpdatedAt,error:T,errorUpdatedAt:h,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>d.dataUpdateCount||p.errorUpdateCount>d.errorUpdateCount,isFetching:S,isRefetching:S&&!P,isLoadingError:w&&!_,isPaused:p.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:w&&_,isStale:La(t,r),refetch:this.refetch,promise:O(this,rr),isEnabled:xt(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const u=A=>{F.status==="error"?A.reject(F.error):F.data!==void 0&&A.resolve(F.data)},M=()=>{const A=re(this,rr,F.promise=ua());u(A)},N=O(this,rr);switch(N.status){case"pending":t.queryHash===n.queryHash&&u(N);break;case"fulfilled":(F.status==="error"||F.data!==N.value)&&M();break;case"rejected":(F.status!=="error"||F.error!==N.reason)&&M();break}}return F}updateResult(){const t=O(this,Je),r=this.createResult(O(this,be),this.options);if(re(this,Cr,O(this,be).state),re(this,en,this.options),O(this,Cr).data!==void 0&&re(this,rn,O(this,be)),oa(r,t))return;re(this,Je,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!O(this,nn).size)return!0;const s=new Set(a??O(this,nn));return this.options.throwOnError&&s.add("error"),Object.keys(O(this,Je)).some(o=>{const l=o;return O(this,Je)[l]!==t[l]&&s.has(l)})};ve(this,ke,Sl).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ve(this,ke,ha).call(this)}},at=new WeakMap,be=new WeakMap,Cn=new WeakMap,Je=new WeakMap,Cr=new WeakMap,en=new WeakMap,rr=new WeakMap,nr=new WeakMap,En=new WeakMap,tn=new WeakMap,rn=new WeakMap,Er=new WeakMap,kr=new WeakMap,ir=new WeakMap,nn=new WeakMap,ke=new WeakSet,dn=function(t){ve(this,ke,ga).call(this);let r=O(this,be).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(st)),r},pa=function(){ve(this,ke,ma).call(this);const t=sr(this.options.staleTime,O(this,be));if(Or||O(this,Je).isStale||!aa(t))return;const n=ml(O(this,Je).dataUpdatedAt,t)+1;re(this,Er,setTimeout(()=>{O(this,Je).isStale||this.updateResult()},n))},da=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(O(this,be)):this.options.refetchInterval)??!1},fa=function(t){ve(this,ke,ya).call(this),re(this,ir,t),!(Or||xt(this.options.enabled,O(this,be))===!1||!aa(O(this,ir))||O(this,ir)===0)&&re(this,kr,setInterval(()=>{(this.options.refetchIntervalInBackground||Na.isFocused())&&ve(this,ke,dn).call(this)},O(this,ir)))},ha=function(){ve(this,ke,pa).call(this),ve(this,ke,fa).call(this,ve(this,ke,da).call(this))},ma=function(){O(this,Er)&&(clearTimeout(O(this,Er)),re(this,Er,void 0))},ya=function(){O(this,kr)&&(clearInterval(O(this,kr)),re(this,kr,void 0))},ga=function(){const t=O(this,at).getQueryCache().build(O(this,at),this.options);if(t===O(this,be))return;const r=O(this,be);re(this,be,t),re(this,Cn,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},Sl=function(t){Ge.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(O(this,Je))}),O(this,at).getQueryCache().notify({query:O(this,be),type:"observerResultsUpdated"})})},Xo);function ju(e,t){return xt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Fs(e,t){return ju(e,t)||e.state.data!==void 0&&xa(e,t,t.refetchOnMount)}function xa(e,t,r){if(xt(t.enabled,e)!==!1&&sr(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&La(e,t)}return!1}function As(e,t,r,n){return(e!==t||xt(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&La(e,r)}function La(e,t){return xt(t.enabled,e)!==!1&&e.isStaleByTime(sr(t.staleTime,e))}function Ou(e,t){return!oa(e.getCurrentResult(),t)}var Cl=ne.createContext(void 0),Fu=e=>{const t=ne.useContext(Cl);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Au=({client:e,children:t})=>(ne.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),c.jsx(Cl.Provider,{value:e,children:t})),El=ne.createContext(!1),_u=()=>ne.useContext(El);El.Provider;function Ru(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var $u=ne.createContext(Ru()),Du=()=>ne.useContext($u),Pu=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Mu=e=>{ne.useEffect(()=>{e.clearReset()},[e])},Iu=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||du(r,[e.error,n])),zu=e=>{if(e.suspense){const t=n=>n==="static"?n:Math.max(n??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...n)=>t(r(...n)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Vu=(e,t)=>e.isLoading&&e.isFetching&&!t,Bu=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,_s=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function Nu(e,t,r){var p,m,y,T,h;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const n=_u(),i=Du(),a=Fu(),s=a.defaultQueryOptions(e);(m=(p=a.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||m.call(p,s),process.env.NODE_ENV!=="production"&&(s.queryFn||console.error(`[${s.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),s._optimisticResults=n?"isRestoring":"optimistic",zu(s),Pu(s,i),Mu(i);const o=!a.getQueryCache().get(s.queryHash),[l]=ne.useState(()=>new t(a,s)),d=l.getOptimisticResult(s),f=!n&&e.subscribed!==!1;if(ne.useSyncExternalStore(ne.useCallback(C=>{const v=f?l.subscribe(Ge.batchCalls(C)):st;return l.updateResult(),v},[l,f]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),ne.useEffect(()=>{l.setOptions(s)},[s,l]),Bu(s,d))throw _s(s,l,i);if(Iu({result:d,errorResetBoundary:i,throwOnError:s.throwOnError,query:a.getQueryCache().get(s.queryHash),suspense:s.suspense}))throw d.error;if((T=(y=a.getDefaultOptions().queries)==null?void 0:y._experimental_afterQuery)==null||T.call(y,s,d),s.experimental_prefetchInRender&&!Or&&Vu(d,n)){const C=o?_s(s,l,i):(h=a.getQueryCache().get(s.queryHash))==null?void 0:h.promise;C==null||C.catch(st).finally(()=>{l.updateResult()})}return s.notifyOnChangeProps?d:l.trackResult(d)}function Lu(e,t){return Nu(e,Tu)}function qa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $n={exports:{}},Dn={exports:{}},Ce={};/** @license React v16.13.1
|
|
1
|
+
"use strict";var Uc=Object.defineProperty;var ys=e=>{throw TypeError(e)};var Hc=(e,t,r)=>t in e?Uc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var pn=(e,t,r)=>Hc(e,typeof t!="symbol"?t+"":t,r),$i=(e,t,r)=>t.has(e)||ys("Cannot "+r);var F=(e,t,r)=>($i(e,t,"read from private field"),r?r.call(e):t.get(e)),xe=(e,t,r)=>t.has(e)?ys("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ie=(e,t,r,n)=>($i(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),ve=(e,t,r)=>($i(e,t,"access private method"),r);var Dn=(e,t,r,n)=>({set _(i){ie(e,t,i,r)},get _(){return F(e,t,n)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),D=require("react"),x=require("@mui/material"),Kc=require("@emotion/styled"),Pr=require("@emotion/react");function Yc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const ae=Yc(D);var On=e=>e.type==="checkbox",vr=e=>e instanceof Date,it=e=>e==null;const sl=e=>typeof e=="object";var We=e=>!it(e)&&!Array.isArray(e)&&sl(e)&&!vr(e),ol=e=>We(e)&&e.target?On(e.target)?e.target.checked:e.target.value:e,Gc=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,ll=(e,t)=>e.has(Gc(t)),Qc=e=>{const t=e.constructor&&e.constructor.prototype;return We(t)&&t.hasOwnProperty("isPrototypeOf")},Va=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ie(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Va&&(e instanceof Blob||n))&&(r||We(e)))if(t=r?[]:{},!r&&!Qc(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=Ie(e[i]));else return e;return t}var yi=e=>/^\w*$/.test(e),Re=e=>e===void 0,vi=e=>Array.isArray(e)?e.filter(Boolean):[],Na=e=>vi(e.replace(/["|']|\]/g,"").split(/\.|\[/)),J=(e,t,r)=>{if(!t||!We(e))return r;const n=(yi(t)?[t]:Na(t)).reduce((i,a)=>it(i)?i:i[a],e);return Re(n)||n===e?Re(e[t])?r:e[t]:n},ft=e=>typeof e=="boolean",we=(e,t,r)=>{let n=-1;const i=yi(t)?[t]:Na(t),a=i.length,s=a-1;for(;++n<a;){const o=i[n];let l=r;if(n!==s){const d=e[o];l=We(d)||Array.isArray(d)?d:isNaN(+i[n+1])?{}:[]}if(o==="__proto__"||o==="constructor"||o==="prototype")return;e[o]=l,e=e[o]}};const Xn={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ct={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Bt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},cl=D.createContext(null);cl.displayName="HookFormContext";const bi=()=>D.useContext(cl);var ul=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(i,a,{get:()=>{const s=a;return t._proxyFormState[s]!==Ct.all&&(t._proxyFormState[s]=!n||Ct.all),r&&(r[s]=!0),e[s]}});return i};const wi=typeof window<"u"?ae.useLayoutEffect:ae.useEffect;function Zc(e){const t=bi(),{control:r=t.control,disabled:n,name:i,exact:a}=e||{},[s,o]=D.useState(r._formState),l=D.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return wi(()=>r._subscribe({name:i,formState:l.current,exact:a,callback:d=>{!n&&o({...r._formState,...d})}}),[i,n,a]),D.useEffect(()=>{l.current.isValid&&r._setValid(!0)},[r]),D.useMemo(()=>ul(s,r,l.current,!1),[s,r])}var zt=e=>typeof e=="string",pl=(e,t,r,n,i)=>zt(e)?(n&&t.watch.add(e),J(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),J(r,a))):(n&&(t.watchAll=!0),r);function dl(e){const t=bi(),{control:r=t.control,name:n,defaultValue:i,disabled:a,exact:s}=e||{},o=D.useRef(i),[l,d]=D.useState(r._getWatch(n,o.current));return wi(()=>r._subscribe({name:n,formState:{values:!0},exact:s,callback:h=>!a&&d(pl(n,r._names,h.values||r._formValues,!1,o.current))}),[n,r,a,s]),D.useEffect(()=>r._removeUnmounted()),l}function Xc(e){const t=bi(),{name:r,disabled:n,control:i=t.control,shouldUnregister:a}=e,s=ll(i._names.array,r),o=dl({control:i,name:r,defaultValue:J(i._formValues,r,J(i._defaultValues,r,e.defaultValue)),exact:!0}),l=Zc({control:i,name:r,exact:!0}),d=D.useRef(e),h=D.useRef(i.register(r,{...e.rules,value:o,...ft(e.disabled)?{disabled:e.disabled}:{}})),f=D.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!J(l.errors,r)},isDirty:{enumerable:!0,get:()=>!!J(l.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!J(l.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!J(l.validatingFields,r)},error:{enumerable:!0,get:()=>J(l.errors,r)}}),[l,r]),u=D.useCallback(b=>h.current.onChange({target:{value:ol(b),name:r},type:Xn.CHANGE}),[r]),g=D.useCallback(()=>h.current.onBlur({target:{value:J(i._formValues,r),name:r},type:Xn.BLUR}),[r,i._formValues]),k=D.useCallback(b=>{const v=J(i._fields,r);v&&b&&(v._f.ref={focus:()=>b.focus&&b.focus(),select:()=>b.select&&b.select(),setCustomValidity:w=>b.setCustomValidity(w),reportValidity:()=>b.reportValidity()})},[i._fields,r]),m=D.useMemo(()=>({name:r,value:o,...ft(n)||l.disabled?{disabled:l.disabled||n}:{},onChange:u,onBlur:g,ref:k}),[r,n,l.disabled,u,g,k,o]);return D.useEffect(()=>{const b=i._options.shouldUnregister||a;i.register(r,{...d.current.rules,...ft(d.current.disabled)?{disabled:d.current.disabled}:{}});const v=(w,P)=>{const T=J(i._fields,w);T&&T._f&&(T._f.mount=P)};if(v(r,!0),b){const w=Ie(J(i._options.defaultValues,r));we(i._defaultValues,r,w),Re(J(i._formValues,r))&&we(i._formValues,r,w)}return!s&&i.register(r),()=>{(s?b&&!i._state.action:b)?i.unregister(r):v(r,!1)}},[r,i,s,a]),D.useEffect(()=>{i._setDisabledField({disabled:n,name:r})},[n,r,i]),D.useMemo(()=>({field:m,formState:l,fieldState:f}),[m,l,f])}const Pe=e=>e.render(Xc(e));var fl=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},ut=e=>Array.isArray(e)?e:[e],vs=()=>{let e=[];return{get observers(){return e},next:i=>{for(const a of e)a.next&&a.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(a=>a!==i)}}),unsubscribe:()=>{e=[]}}},oa=e=>it(e)||!sl(e);function Jt(e,t){if(oa(e)||oa(t))return e===t;if(vr(e)&&vr(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const i of r){const a=e[i];if(!n.includes(i))return!1;if(i!=="ref"){const s=t[i];if(vr(a)&&vr(s)||We(a)&&We(s)||Array.isArray(a)&&Array.isArray(s)?!Jt(a,s):a!==s)return!1}}return!0}var nt=e=>We(e)&&!Object.keys(e).length,La=e=>e.type==="file",Ft=e=>typeof e=="function",Jn=e=>{if(!Va)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},hl=e=>e.type==="select-multiple",qa=e=>e.type==="radio",Jc=e=>qa(e)||On(e),Pi=e=>Jn(e)&&e.isConnected;function eu(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Re(e)?n++:e[t[n++]];return e}function tu(e){for(const t in e)if(e.hasOwnProperty(t)&&!Re(e[t]))return!1;return!0}function Ke(e,t){const r=Array.isArray(t)?t:yi(t)?[t]:Na(t),n=r.length===1?e:eu(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(We(n)&&nt(n)||Array.isArray(n)&&tu(n))&&Ke(e,r.slice(0,-1)),e}var ml=e=>{for(const t in e)if(Ft(e[t]))return!0;return!1};function ei(e,t={}){const r=Array.isArray(e);if(We(e)||r)for(const n in e)Array.isArray(e[n])||We(e[n])&&!ml(e[n])?(t[n]=Array.isArray(e[n])?[]:{},ei(e[n],t[n])):it(e[n])||(t[n]=!0);return t}function xl(e,t,r){const n=Array.isArray(e);if(We(e)||n)for(const i in e)Array.isArray(e[i])||We(e[i])&&!ml(e[i])?Re(t)||oa(r[i])?r[i]=Array.isArray(e[i])?ei(e[i],[]):{...ei(e[i])}:xl(e[i],it(t)?{}:t[i],r[i]):r[i]=!Jt(e[i],t[i]);return r}var dn=(e,t)=>xl(e,t,ei(t));const bs={value:!1,isValid:!1},ws={value:!0,isValid:!0};var gl=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Re(e[0].attributes.value)?Re(e[0].value)||e[0].value===""?ws:{value:e[0].value,isValid:!0}:ws:bs}return bs},yl=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Re(e)?e:t?e===""?NaN:e&&+e:r&&zt(e)?new Date(e):n?n(e):e;const Ss={isValid:!1,value:null};var vl=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Ss):Ss;function Cs(e){const t=e.ref;return La(t)?t.files:qa(t)?vl(e.refs).value:hl(t)?[...t.selectedOptions].map(({value:r})=>r):On(t)?gl(e.refs).value:yl(Re(t.value)?e.ref.value:t.value,e)}var ru=(e,t,r,n)=>{const i={};for(const a of e){const s=J(t,a);s&&we(i,a,s._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},ti=e=>e instanceof RegExp,fn=e=>Re(e)?e:ti(e)?e.source:We(e)?ti(e.value)?e.value.source:e.value:e,Ur=e=>({isOnSubmit:!e||e===Ct.onSubmit,isOnBlur:e===Ct.onBlur,isOnChange:e===Ct.onChange,isOnAll:e===Ct.all,isOnTouch:e===Ct.onTouched});const Es="AsyncFunction";var nu=e=>!!e&&!!e.validate&&!!(Ft(e.validate)&&e.validate.constructor.name===Es||We(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===Es)),iu=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),la=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Kr=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const a=J(e,i);if(a){const{_f:s,...o}=a;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],i)&&!n)return!0;if(s.ref&&t(s.ref,s.name)&&!n)return!0;if(Kr(o,t))break}else if(We(o)&&Kr(o,t))break}}};function ks(e,t,r){const n=J(e,r);if(n||yi(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),s=J(t,a),o=J(e,a);if(s&&!Array.isArray(s)&&r!==a)return{name:r};if(o&&o.type)return{name:a,error:o};if(o&&o.root&&o.root.type)return{name:`${a}.root`,error:o.root};i.pop()}return{name:r}}var au=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return nt(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(s=>t[s]===(!n||Ct.all))},su=(e,t,r)=>!e||!t||e===t||ut(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),ou=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,lu=(e,t)=>!vi(J(e,t)).length&&Ke(e,t),bl=(e,t,r)=>{const n=ut(J(e,r));return we(n,"root",t[r]),we(e,r,n),e},Hn=e=>zt(e);function Ts(e,t,r="validate"){if(Hn(e)||Array.isArray(e)&&e.every(Hn)||ft(e)&&!e)return{type:r,message:Hn(e)?e:"",ref:t}}var zr=e=>We(e)&&!ti(e)?e:{value:e,message:""},ca=async(e,t,r,n,i,a)=>{const{ref:s,refs:o,required:l,maxLength:d,minLength:h,min:f,max:u,pattern:g,validate:k,name:m,valueAsNumber:b,mount:v}=e._f,w=J(r,m);if(!v||t.has(m))return{};const P=o?o[0]:s,T=z=>{i&&P.reportValidity&&(P.setCustomValidity(ft(z)?"":z||""),P.reportValidity())},C={},$=qa(s),B=On(s),A=$||B,I=(b||La(s))&&Re(s.value)&&Re(w)||Jn(s)&&s.value===""||w===""||Array.isArray(w)&&!w.length,p=fl.bind(null,m,n,C),_=(z,O,N,K=Bt.maxLength,ne=Bt.minLength)=>{const me=z?O:N;C[m]={type:z?K:ne,message:me,ref:s,...p(z?K:ne,me)}};if(a?!Array.isArray(w)||!w.length:l&&(!A&&(I||it(w))||ft(w)&&!w||B&&!gl(o).isValid||$&&!vl(o).isValid)){const{value:z,message:O}=Hn(l)?{value:!!l,message:l}:zr(l);if(z&&(C[m]={type:Bt.required,message:O,ref:P,...p(Bt.required,O)},!n))return T(O),C}if(!I&&(!it(f)||!it(u))){let z,O;const N=zr(u),K=zr(f);if(!it(w)&&!isNaN(w)){const ne=s.valueAsNumber||w&&+w;it(N.value)||(z=ne>N.value),it(K.value)||(O=ne<K.value)}else{const ne=s.valueAsDate||new Date(w),me=L=>new Date(new Date().toDateString()+" "+L),ue=s.type=="time",G=s.type=="week";zt(N.value)&&w&&(z=ue?me(w)>me(N.value):G?w>N.value:ne>new Date(N.value)),zt(K.value)&&w&&(O=ue?me(w)<me(K.value):G?w<K.value:ne<new Date(K.value))}if((z||O)&&(_(!!z,N.message,K.message,Bt.max,Bt.min),!n))return T(C[m].message),C}if((d||h)&&!I&&(zt(w)||a&&Array.isArray(w))){const z=zr(d),O=zr(h),N=!it(z.value)&&w.length>+z.value,K=!it(O.value)&&w.length<+O.value;if((N||K)&&(_(N,z.message,O.message),!n))return T(C[m].message),C}if(g&&!I&&zt(w)){const{value:z,message:O}=zr(g);if(ti(z)&&!w.match(z)&&(C[m]={type:Bt.pattern,message:O,ref:s,...p(Bt.pattern,O)},!n))return T(O),C}if(k){if(Ft(k)){const z=await k(w,r),O=Ts(z,P);if(O&&(C[m]={...O,...p(Bt.validate,O.message)},!n))return T(O.message),C}else if(We(k)){let z={};for(const O in k){if(!nt(z)&&!n)break;const N=Ts(await k[O](w,r),P,O);N&&(z={...N,...p(O,N.message)},T(N.message),n&&(C[m]=z))}if(!nt(z)&&(C[m]={ref:P,...z},!n))return C}}return T(!0),C};const cu={mode:Ct.onSubmit,reValidateMode:Ct.onChange,shouldFocusError:!0};function uu(e={}){let t={...cu,...e},r={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ft(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1};const n={};let i=We(t.defaultValues)||We(t.values)?Ie(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:Ie(i),s={action:!1,mount:!1,watch:!1},o={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,d=0;const h={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let f={...h};const u={array:vs(),state:vs()},g=t.criteriaMode===Ct.all,k=y=>S=>{clearTimeout(d),d=setTimeout(y,S)},m=async y=>{if(!t.disabled&&(h.isValid||f.isValid||y)){const S=t.resolver?nt((await B()).errors):await I(n,!0);S!==r.isValid&&u.state.next({isValid:S})}},b=(y,S)=>{!t.disabled&&(h.isValidating||h.validatingFields||f.isValidating||f.validatingFields)&&((y||Array.from(o.mount)).forEach(E=>{E&&(S?we(r.validatingFields,E,S):Ke(r.validatingFields,E))}),u.state.next({validatingFields:r.validatingFields,isValidating:!nt(r.validatingFields)}))},v=(y,S=[],E,H,R=!0,M=!0)=>{if(H&&E&&!t.disabled){if(s.action=!0,M&&Array.isArray(J(n,y))){const Z=E(J(n,y),H.argA,H.argB);R&&we(n,y,Z)}if(M&&Array.isArray(J(r.errors,y))){const Z=E(J(r.errors,y),H.argA,H.argB);R&&we(r.errors,y,Z),lu(r.errors,y)}if((h.touchedFields||f.touchedFields)&&M&&Array.isArray(J(r.touchedFields,y))){const Z=E(J(r.touchedFields,y),H.argA,H.argB);R&&we(r.touchedFields,y,Z)}(h.dirtyFields||f.dirtyFields)&&(r.dirtyFields=dn(i,a)),u.state.next({name:y,isDirty:_(y,S),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else we(a,y,S)},w=(y,S)=>{we(r.errors,y,S),u.state.next({errors:r.errors})},P=y=>{r.errors=y,u.state.next({errors:r.errors,isValid:!1})},T=(y,S,E,H)=>{const R=J(n,y);if(R){const M=J(a,y,Re(E)?J(i,y):E);Re(M)||H&&H.defaultChecked||S?we(a,y,S?M:Cs(R._f)):N(y,M),s.mount&&m()}},C=(y,S,E,H,R)=>{let M=!1,Z=!1;const X={name:y};if(!t.disabled){if(!E||H){(h.isDirty||f.isDirty)&&(Z=r.isDirty,r.isDirty=X.isDirty=_(),M=Z!==X.isDirty);const U=Jt(J(i,y),S);Z=!!J(r.dirtyFields,y),U?Ke(r.dirtyFields,y):we(r.dirtyFields,y,!0),X.dirtyFields=r.dirtyFields,M=M||(h.dirtyFields||f.dirtyFields)&&Z!==!U}if(E){const U=J(r.touchedFields,y);U||(we(r.touchedFields,y,E),X.touchedFields=r.touchedFields,M=M||(h.touchedFields||f.touchedFields)&&U!==E)}M&&R&&u.state.next(X)}return M?X:{}},$=(y,S,E,H)=>{const R=J(r.errors,y),M=(h.isValid||f.isValid)&&ft(S)&&r.isValid!==S;if(t.delayError&&E?(l=k(()=>w(y,E)),l(t.delayError)):(clearTimeout(d),l=null,E?we(r.errors,y,E):Ke(r.errors,y)),(E?!Jt(R,E):R)||!nt(H)||M){const Z={...H,...M&&ft(S)?{isValid:S}:{},errors:r.errors,name:y};r={...r,...Z},u.state.next(Z)}},B=async y=>{b(y,!0);const S=await t.resolver(a,t.context,ru(y||o.mount,n,t.criteriaMode,t.shouldUseNativeValidation));return b(y),S},A=async y=>{const{errors:S}=await B(y);if(y)for(const E of y){const H=J(S,E);H?we(r.errors,E,H):Ke(r.errors,E)}else r.errors=S;return S},I=async(y,S,E={valid:!0})=>{for(const H in y){const R=y[H];if(R){const{_f:M,...Z}=R;if(M){const X=o.array.has(M.name),U=R._f&&nu(R._f);U&&h.validatingFields&&b([H],!0);const ye=await ca(R,o.disabled,a,g,t.shouldUseNativeValidation&&!S,X);if(U&&h.validatingFields&&b([H]),ye[M.name]&&(E.valid=!1,S))break;!S&&(J(ye,M.name)?X?bl(r.errors,ye,M.name):we(r.errors,M.name,ye[M.name]):Ke(r.errors,M.name))}!nt(Z)&&await I(Z,S,E)}}return E.valid},p=()=>{for(const y of o.unMount){const S=J(n,y);S&&(S._f.refs?S._f.refs.every(E=>!Pi(E)):!Pi(S._f.ref))&&te(y)}o.unMount=new Set},_=(y,S)=>!t.disabled&&(y&&S&&we(a,y,S),!Jt(L(),i)),z=(y,S,E)=>pl(y,o,{...s.mount?a:Re(S)?i:zt(y)?{[y]:S}:S},E,S),O=y=>vi(J(s.mount?a:i,y,t.shouldUnregister?J(i,y,[]):[])),N=(y,S,E={})=>{const H=J(n,y);let R=S;if(H){const M=H._f;M&&(!M.disabled&&we(a,y,yl(S,M)),R=Jn(M.ref)&&it(S)?"":S,hl(M.ref)?[...M.ref.options].forEach(Z=>Z.selected=R.includes(Z.value)):M.refs?On(M.ref)?M.refs.forEach(Z=>{(!Z.defaultChecked||!Z.disabled)&&(Array.isArray(R)?Z.checked=!!R.find(X=>X===Z.value):Z.checked=R===Z.value||!!R)}):M.refs.forEach(Z=>Z.checked=Z.value===R):La(M.ref)?M.ref.value="":(M.ref.value=R,M.ref.type||u.state.next({name:y,values:Ie(a)})))}(E.shouldDirty||E.shouldTouch)&&C(y,R,E.shouldTouch,E.shouldDirty,!0),E.shouldValidate&&G(y)},K=(y,S,E)=>{for(const H in S){if(!S.hasOwnProperty(H))return;const R=S[H],M=y+"."+H,Z=J(n,M);(o.array.has(y)||We(R)||Z&&!Z._f)&&!vr(R)?K(M,R,E):N(M,R,E)}},ne=(y,S,E={})=>{const H=J(n,y),R=o.array.has(y),M=Ie(S);we(a,y,M),R?(u.array.next({name:y,values:Ie(a)}),(h.isDirty||h.dirtyFields||f.isDirty||f.dirtyFields)&&E.shouldDirty&&u.state.next({name:y,dirtyFields:dn(i,a),isDirty:_(y,M)})):H&&!H._f&&!it(M)?K(y,M,E):N(y,M,E),la(y,o)&&u.state.next({...r}),u.state.next({name:s.mount?y:void 0,values:Ie(a)})},me=async y=>{s.mount=!0;const S=y.target;let E=S.name,H=!0;const R=J(n,E),M=U=>{H=Number.isNaN(U)||vr(U)&&isNaN(U.getTime())||Jt(U,J(a,E,U))},Z=Ur(t.mode),X=Ur(t.reValidateMode);if(R){let U,ye;const Te=S.type?Cs(R._f):ol(y),je=y.type===Xn.BLUR||y.type===Xn.FOCUS_OUT,Be=!iu(R._f)&&!t.resolver&&!J(r.errors,E)&&!R._f.deps||ou(je,J(r.touchedFields,E),r.isSubmitted,X,Z),qe=la(E,o,je);we(a,E,Te),je?(R._f.onBlur&&R._f.onBlur(y),l&&l(0)):R._f.onChange&&R._f.onChange(y);const Je=C(E,Te,je),At=!nt(Je)||qe;if(!je&&u.state.next({name:E,type:y.type,values:Ie(a)}),Be)return(h.isValid||f.isValid)&&(t.mode==="onBlur"?je&&m():je||m()),At&&u.state.next({name:E,...qe?{}:Je});if(!je&&qe&&u.state.next({...r}),t.resolver){const{errors:et}=await B([E]);if(M(Te),H){const Ye=ks(r.errors,n,E),dt=ks(et,n,Ye.name||E);U=dt.error,E=dt.name,ye=nt(et)}}else b([E],!0),U=(await ca(R,o.disabled,a,g,t.shouldUseNativeValidation))[E],b([E]),M(Te),H&&(U?ye=!1:(h.isValid||f.isValid)&&(ye=await I(n,!0)));H&&(R._f.deps&&G(R._f.deps),$(E,ye,U,Je))}},ue=(y,S)=>{if(J(r.errors,S)&&y.focus)return y.focus(),1},G=async(y,S={})=>{let E,H;const R=ut(y);if(t.resolver){const M=await A(Re(y)?y:R);E=nt(M),H=y?!R.some(Z=>J(M,Z)):E}else y?(H=(await Promise.all(R.map(async M=>{const Z=J(n,M);return await I(Z&&Z._f?{[M]:Z}:Z)}))).every(Boolean),!(!H&&!r.isValid)&&m()):H=E=await I(n);return u.state.next({...!zt(y)||(h.isValid||f.isValid)&&E!==r.isValid?{}:{name:y},...t.resolver||!y?{isValid:E}:{},errors:r.errors}),S.shouldFocus&&!H&&Kr(n,ue,y?R:o.mount),H},L=y=>{const S={...s.mount?a:i};return Re(y)?S:zt(y)?J(S,y):y.map(E=>J(S,E))},Y=(y,S)=>({invalid:!!J((S||r).errors,y),isDirty:!!J((S||r).dirtyFields,y),error:J((S||r).errors,y),isValidating:!!J(r.validatingFields,y),isTouched:!!J((S||r).touchedFields,y)}),de=y=>{y&&ut(y).forEach(S=>Ke(r.errors,S)),u.state.next({errors:y?r.errors:{}})},fe=(y,S,E)=>{const H=(J(n,y,{_f:{}})._f||{}).ref,R=J(r.errors,y)||{},{ref:M,message:Z,type:X,...U}=R;we(r.errors,y,{...U,...S,ref:H}),u.state.next({name:y,errors:r.errors,isValid:!1}),E&&E.shouldFocus&&H&&H.focus&&H.focus()},pe=(y,S)=>Ft(y)?u.state.subscribe({next:E=>y(z(void 0,S),E)}):z(y,S,!0),ge=y=>u.state.subscribe({next:S=>{su(y.name,S.name,y.exact)&&au(S,y.formState||h,ce,y.reRenderRoot)&&y.callback({values:{...a},...r,...S})}}).unsubscribe,q=y=>(s.mount=!0,f={...f,...y.formState},ge({...y,formState:f})),te=(y,S={})=>{for(const E of y?ut(y):o.mount)o.mount.delete(E),o.array.delete(E),S.keepValue||(Ke(n,E),Ke(a,E)),!S.keepError&&Ke(r.errors,E),!S.keepDirty&&Ke(r.dirtyFields,E),!S.keepTouched&&Ke(r.touchedFields,E),!S.keepIsValidating&&Ke(r.validatingFields,E),!t.shouldUnregister&&!S.keepDefaultValue&&Ke(i,E);u.state.next({values:Ie(a)}),u.state.next({...r,...S.keepDirty?{isDirty:_()}:{}}),!S.keepIsValid&&m()},se=({disabled:y,name:S})=>{(ft(y)&&s.mount||y||o.disabled.has(S))&&(y?o.disabled.add(S):o.disabled.delete(S))},oe=(y,S={})=>{let E=J(n,y);const H=ft(S.disabled)||ft(t.disabled);return we(n,y,{...E||{},_f:{...E&&E._f?E._f:{ref:{name:y}},name:y,mount:!0,...S}}),o.mount.add(y),E?se({disabled:ft(S.disabled)?S.disabled:t.disabled,name:y}):T(y,!0,S.value),{...H?{disabled:S.disabled||t.disabled}:{},...t.progressive?{required:!!S.required,min:fn(S.min),max:fn(S.max),minLength:fn(S.minLength),maxLength:fn(S.maxLength),pattern:fn(S.pattern)}:{},name:y,onChange:me,onBlur:me,ref:R=>{if(R){oe(y,S),E=J(n,y);const M=Re(R.value)&&R.querySelectorAll&&R.querySelectorAll("input,select,textarea")[0]||R,Z=Jc(M),X=E._f.refs||[];if(Z?X.find(U=>U===M):M===E._f.ref)return;we(n,y,{_f:{...E._f,...Z?{refs:[...X.filter(Pi),M,...Array.isArray(J(i,y))?[{}]:[]],ref:{type:M.type,name:y}}:{ref:M}}}),T(y,!1,void 0,M)}else E=J(n,y,{}),E._f&&(E._f.mount=!1),(t.shouldUnregister||S.shouldUnregister)&&!(ll(o.array,y)&&s.action)&&o.unMount.add(y)}}},le=()=>t.shouldFocusError&&Kr(n,ue,o.mount),Se=y=>{ft(y)&&(u.state.next({disabled:y}),Kr(n,(S,E)=>{const H=J(n,E);H&&(S.disabled=H._f.disabled||y,Array.isArray(H._f.refs)&&H._f.refs.forEach(R=>{R.disabled=H._f.disabled||y}))},0,!1))},Q=(y,S)=>async E=>{let H;E&&(E.preventDefault&&E.preventDefault(),E.persist&&E.persist());let R=Ie(a);if(u.state.next({isSubmitting:!0}),t.resolver){const{errors:M,values:Z}=await B();r.errors=M,R=Z}else await I(n);if(o.disabled.size)for(const M of o.disabled)we(R,M,void 0);if(Ke(r.errors,"root"),nt(r.errors)){u.state.next({errors:{}});try{await y(R,E)}catch(M){H=M}}else S&&await S({...r.errors},E),le(),setTimeout(le);if(u.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:nt(r.errors)&&!H,submitCount:r.submitCount+1,errors:r.errors}),H)throw H},De=(y,S={})=>{J(n,y)&&(Re(S.defaultValue)?ne(y,Ie(J(i,y))):(ne(y,S.defaultValue),we(i,y,Ie(S.defaultValue))),S.keepTouched||Ke(r.touchedFields,y),S.keepDirty||(Ke(r.dirtyFields,y),r.isDirty=S.defaultValue?_(y,Ie(J(i,y))):_()),S.keepError||(Ke(r.errors,y),h.isValid&&m()),u.state.next({...r}))},He=(y,S={})=>{const E=y?Ie(y):i,H=Ie(E),R=nt(y),M=R?i:H;if(S.keepDefaultValues||(i=E),!S.keepValues){if(S.keepDirtyValues){const Z=new Set([...o.mount,...Object.keys(dn(i,a))]);for(const X of Array.from(Z))J(r.dirtyFields,X)?we(M,X,J(a,X)):ne(X,J(M,X))}else{if(Va&&Re(y))for(const Z of o.mount){const X=J(n,Z);if(X&&X._f){const U=Array.isArray(X._f.refs)?X._f.refs[0]:X._f.ref;if(Jn(U)){const ye=U.closest("form");if(ye){ye.reset();break}}}}for(const Z of o.mount)ne(Z,J(M,Z))}a=Ie(M),u.array.next({values:{...M}}),u.state.next({values:{...M}})}o={mount:S.keepDirtyValues?o.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!h.isValid||!!S.keepIsValid||!!S.keepDirtyValues,s.watch=!!t.shouldUnregister,u.state.next({submitCount:S.keepSubmitCount?r.submitCount:0,isDirty:R?!1:S.keepDirty?r.isDirty:!!(S.keepDefaultValues&&!Jt(y,i)),isSubmitted:S.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:R?{}:S.keepDirtyValues?S.keepDefaultValues&&a?dn(i,a):r.dirtyFields:S.keepDefaultValues&&y?dn(i,y):S.keepDirty?r.dirtyFields:{},touchedFields:S.keepTouched?r.touchedFields:{},errors:S.keepErrors?r.errors:{},isSubmitSuccessful:S.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Ze=(y,S)=>He(Ft(y)?y(a):y,S),ee=(y,S={})=>{const E=J(n,y),H=E&&E._f;if(H){const R=H.refs?H.refs[0]:H.ref;R.focus&&(R.focus(),S.shouldSelect&&Ft(R.select)&&R.select())}},ce=y=>{r={...r,...y}},he={control:{register:oe,unregister:te,getFieldState:Y,handleSubmit:Q,setError:fe,_subscribe:ge,_runSchema:B,_focusError:le,_getWatch:z,_getDirty:_,_setValid:m,_setFieldArray:v,_setDisabledField:se,_setErrors:P,_getFieldArray:O,_reset:He,_resetDefaultValues:()=>Ft(t.defaultValues)&&t.defaultValues().then(y=>{Ze(y,t.resetOptions),u.state.next({isLoading:!1})}),_removeUnmounted:p,_disableForm:Se,_subjects:u,_proxyFormState:h,get _fields(){return n},get _formValues(){return a},get _state(){return s},set _state(y){s=y},get _defaultValues(){return i},get _names(){return o},set _names(y){o=y},get _formState(){return r},get _options(){return t},set _options(y){t={...t,...y}}},subscribe:q,trigger:G,register:oe,handleSubmit:Q,watch:pe,setValue:ne,getValues:L,reset:Ze,resetField:De,clearErrors:de,unregister:te,setError:fe,setFocus:ee,getFieldState:Y};return{...he,formControl:he}}var Gt=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},Di=(e,t,r={})=>r.shouldFocus||Re(r.shouldFocus)?r.focusName||`${e}.${Re(r.focusIndex)?t:r.focusIndex}.`:"",Ii=(e,t)=>[...e,...ut(t)],Mi=e=>Array.isArray(e)?e.map(()=>{}):void 0;function zi(e,t,r){return[...e.slice(0,t),...ut(r),...e.slice(t)]}var Bi=(e,t,r)=>Array.isArray(e)?(Re(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],Vi=(e,t)=>[...ut(t),...ut(e)];function pu(e,t){let r=0;const n=[...e];for(const i of t)n.splice(i-r,1),r++;return vi(n).length?n:[]}var Ni=(e,t)=>Re(t)?[]:pu(e,ut(t).sort((r,n)=>r-n)),Li=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},js=(e,t,r)=>(e[t]=r,e);function du(e){const t=bi(),{control:r=t.control,name:n,keyName:i="id",shouldUnregister:a,rules:s}=e,[o,l]=D.useState(r._getFieldArray(n)),d=D.useRef(r._getFieldArray(n).map(Gt)),h=D.useRef(o),f=D.useRef(n),u=D.useRef(!1);f.current=n,h.current=o,r._names.array.add(n),s&&r.register(n,s),wi(()=>r._subjects.array.subscribe({next:({values:$,name:B})=>{if(B===f.current||!B){const A=J($,f.current);Array.isArray(A)&&(l(A),d.current=A.map(Gt))}}}).unsubscribe,[r]);const g=D.useCallback($=>{u.current=!0,r._setFieldArray(n,$)},[r,n]),k=($,B)=>{const A=ut(Ie($)),I=Ii(r._getFieldArray(n),A);r._names.focus=Di(n,I.length-1,B),d.current=Ii(d.current,A.map(Gt)),g(I),l(I),r._setFieldArray(n,I,Ii,{argA:Mi($)})},m=($,B)=>{const A=ut(Ie($)),I=Vi(r._getFieldArray(n),A);r._names.focus=Di(n,0,B),d.current=Vi(d.current,A.map(Gt)),g(I),l(I),r._setFieldArray(n,I,Vi,{argA:Mi($)})},b=$=>{const B=Ni(r._getFieldArray(n),$);d.current=Ni(d.current,$),g(B),l(B),!Array.isArray(J(r._fields,n))&&we(r._fields,n,void 0),r._setFieldArray(n,B,Ni,{argA:$})},v=($,B,A)=>{const I=ut(Ie(B)),p=zi(r._getFieldArray(n),$,I);r._names.focus=Di(n,$,A),d.current=zi(d.current,$,I.map(Gt)),g(p),l(p),r._setFieldArray(n,p,zi,{argA:$,argB:Mi(B)})},w=($,B)=>{const A=r._getFieldArray(n);Li(A,$,B),Li(d.current,$,B),g(A),l(A),r._setFieldArray(n,A,Li,{argA:$,argB:B},!1)},P=($,B)=>{const A=r._getFieldArray(n);Bi(A,$,B),Bi(d.current,$,B),g(A),l(A),r._setFieldArray(n,A,Bi,{argA:$,argB:B},!1)},T=($,B)=>{const A=Ie(B),I=js(r._getFieldArray(n),$,A);d.current=[...I].map((p,_)=>!p||_===$?Gt():d.current[_]),g(I),l([...I]),r._setFieldArray(n,I,js,{argA:$,argB:A},!0,!1)},C=$=>{const B=ut(Ie($));d.current=B.map(Gt),g([...B]),l([...B]),r._setFieldArray(n,[...B],A=>A,{},!0,!1)};return D.useEffect(()=>{if(r._state.action=!1,la(n,r._names)&&r._subjects.state.next({...r._formState}),u.current&&(!Ur(r._options.mode).isOnSubmit||r._formState.isSubmitted)&&!Ur(r._options.reValidateMode).isOnSubmit)if(r._options.resolver)r._runSchema([n]).then($=>{const B=J($.errors,n),A=J(r._formState.errors,n);(A?!B&&A.type||B&&(A.type!==B.type||A.message!==B.message):B&&B.type)&&(B?we(r._formState.errors,n,B):Ke(r._formState.errors,n),r._subjects.state.next({errors:r._formState.errors}))});else{const $=J(r._fields,n);$&&$._f&&!(Ur(r._options.reValidateMode).isOnSubmit&&Ur(r._options.mode).isOnSubmit)&&ca($,r._names.disabled,r._formValues,r._options.criteriaMode===Ct.all,r._options.shouldUseNativeValidation,!0).then(B=>!nt(B)&&r._subjects.state.next({errors:bl(r._formState.errors,B,n)}))}r._subjects.state.next({name:n,values:Ie(r._formValues)}),r._names.focus&&Kr(r._fields,($,B)=>{if(r._names.focus&&B.startsWith(r._names.focus)&&$.focus)return $.focus(),1}),r._names.focus="",r._setValid(),u.current=!1},[o,n,r]),D.useEffect(()=>(!J(r._formValues,n)&&r._setFieldArray(n),()=>{const $=(B,A)=>{const I=J(r._fields,B);I&&I._f&&(I._f.mount=A)};r._options.shouldUnregister||a?r.unregister(n):$(n,!1)}),[n,r,i,a]),{swap:D.useCallback(w,[g,n,r]),move:D.useCallback(P,[g,n,r]),prepend:D.useCallback(m,[g,n,r]),append:D.useCallback(k,[g,n,r]),remove:D.useCallback(b,[g,n,r]),insert:D.useCallback(v,[g,n,r]),update:D.useCallback(T,[g,n,r]),replace:D.useCallback(C,[g,n,r]),fields:D.useMemo(()=>o.map(($,B)=>({...$,[i]:d.current[B]||Gt()})),[o,i])}}function fu(e={}){const t=D.useRef(void 0),r=D.useRef(void 0),[n,i]=D.useState({isDirty:!1,isValidating:!1,isLoading:Ft(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Ft(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:n},e.defaultValues&&!Ft(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:s,...o}=uu(e);t.current={...o,formState:n}}const a=t.current.control;return a._options=e,wi(()=>{const s=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0});return i(o=>({...o,isReady:!0})),a._formState.isReady=!0,s},[a]),D.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),D.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),D.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),D.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),D.useEffect(()=>{if(a._proxyFormState.isDirty){const s=a._getDirty();s!==n.isDirty&&a._subjects.state.next({isDirty:s})}},[a,n.isDirty]),D.useEffect(()=>{e.values&&!Jt(e.values,r.current)?(a._reset(e.values,a._options.resetOptions),r.current=e.values,i(s=>({...s}))):a._resetDefaultValues()},[a,e.values]),D.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=ul(n,a),t.current}const Fs=(e,t,r)=>{if(e&&"reportValidity"in e){const n=J(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},wl=(e,t)=>{for(const r in t.fields){const n=t.fields[r];n&&n.ref&&"reportValidity"in n.ref?Fs(n.ref,r,e):n&&n.refs&&n.refs.forEach(i=>Fs(i,r,e))}},hu=(e,t)=>{t.shouldUseNativeValidation&&wl(e,t);const r={};for(const n in e){const i=J(t.fields,n),a=Object.assign(e[n]||{},{ref:i&&i.ref});if(mu(t.names||Object.keys(e),n)){const s=Object.assign({},J(r,n));we(s,"root",a),we(r,n,s)}else we(r,n,a)}return r},mu=(e,t)=>{const r=Os(t);return e.some(n=>Os(n).match(`^${r}\\.\\d+`))};function Os(e){return e.replace(/\]|\[/g,"")}function xu(e,t,r){return r===void 0&&(r={}),function(n,i,a){try{return Promise.resolve(function(s,o){try{var l=(t!=null&&t.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e[r.mode==="sync"?"validateSync":"validate"](n,Object.assign({abortEarly:!1},t,{context:i}))).then(function(d){return a.shouldUseNativeValidation&&wl({},a),{values:r.raw?Object.assign({},n):d,errors:{}}}))}catch(d){return o(d)}return l&&l.then?l.then(void 0,o):l}(0,function(s){if(!s.inner)throw s;return{values:{},errors:hu((o=s,l=!a.shouldUseNativeValidation&&a.criteriaMode==="all",(o.inner||[]).reduce(function(d,h){if(d[h.path]||(d[h.path]={message:h.message,type:h.type}),l){var f=d[h.path].types,u=f&&f[h.type];d[h.path]=fl(h.path,l,d,h.type,u?[].concat(u,h.message):h.message)}return d},{})),a)};var o,l}))}catch(s){return Promise.reject(s)}}}var An=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Rr=typeof window>"u"||"Deno"in globalThis;function lt(){}function gu(e,t){return typeof e=="function"?e(t):e}function ua(e){return typeof e=="number"&&e>=0&&e!==1/0}function Sl(e,t){return Math.max(e+(t||0)-Date.now(),0)}function cr(e,t){return typeof e=="function"?e(t):e}function bt(e,t){return typeof e=="function"?e(t):e}function As(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(n){if(t.queryHash!==Wa(s,t.options))return!1}else if(!Sn(t.queryKey,s))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||i&&i!==t.state.fetchStatus||a&&!a(t))}function _s(e,t){const{exact:r,status:n,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(r){if(wn(t.options.mutationKey)!==wn(a))return!1}else if(!Sn(t.options.mutationKey,a))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Wa(e,t){return((t==null?void 0:t.queryKeyHashFn)||wn)(e)}function wn(e){return JSON.stringify(e,(t,r)=>fa(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Sn(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Sn(e[r],t[r])):!1}function pa(e,t){if(e===t)return e;const r=Rs(e)&&Rs(t);if(r||fa(e)&&fa(t)){const n=r?e:Object.keys(e),i=n.length,a=r?t:Object.keys(t),s=a.length,o=r?[]:{},l=new Set(n);let d=0;for(let h=0;h<s;h++){const f=r?h:a[h];(!r&&l.has(f)||r)&&e[f]===void 0&&t[f]===void 0?(o[f]=void 0,d++):(o[f]=pa(e[f],t[f]),o[f]===e[f]&&e[f]!==void 0&&d++)}return i===s&&d===i?e:o}return t}function da(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function Rs(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function fa(e){if(!$s(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!$s(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function $s(e){return Object.prototype.toString.call(e)==="[object Object]"}function yu(e){return new Promise(t=>{setTimeout(t,e)})}function ha(e,t,r){if(typeof r.structuralSharing=="function")return r.structuralSharing(e,t);if(r.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return pa(e,t)}catch(n){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${n}`),n}return pa(e,t)}return t}function vu(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function bu(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var ri=Symbol();function Cl(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===ri&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ri?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function wu(e,t){return typeof e=="function"?e(...t):!!e}var Sr,er,Gr,Zo,Su=(Zo=class extends An{constructor(){super();xe(this,Sr);xe(this,er);xe(this,Gr);ie(this,Gr,t=>{if(!Rr&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){F(this,er)||this.setEventListener(F(this,Gr))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,er))==null||t.call(this),ie(this,er,void 0))}setEventListener(t){var r;ie(this,Gr,t),(r=F(this,er))==null||r.call(this),ie(this,er,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){F(this,Sr)!==t&&(ie(this,Sr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof F(this,Sr)=="boolean"?F(this,Sr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Sr=new WeakMap,er=new WeakMap,Gr=new WeakMap,Zo),Ua=new Su,Qr,tr,Zr,Xo,Cu=(Xo=class extends An{constructor(){super();xe(this,Qr,!0);xe(this,tr);xe(this,Zr);ie(this,Zr,t=>{if(!Rr&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){F(this,tr)||this.setEventListener(F(this,Zr))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,tr))==null||t.call(this),ie(this,tr,void 0))}setEventListener(t){var r;ie(this,Zr,t),(r=F(this,tr))==null||r.call(this),ie(this,tr,t(this.setOnline.bind(this)))}setOnline(t){F(this,Qr)!==t&&(ie(this,Qr,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return F(this,Qr)}},Qr=new WeakMap,tr=new WeakMap,Zr=new WeakMap,Xo),ni=new Cu;function ma(){let e,t;const r=new Promise((i,a)=>{e=i,t=a});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}function Eu(e){return Math.min(1e3*2**e,3e4)}function El(e){return(e??"online")==="online"?ni.isOnline():!0}var kl=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function qi(e){return e instanceof kl}function Tl(e){let t=!1,r=0,n=!1,i;const a=ma(),s=m=>{var b;n||(u(new kl(m)),(b=e.abort)==null||b.call(e))},o=()=>{t=!0},l=()=>{t=!1},d=()=>Ua.isFocused()&&(e.networkMode==="always"||ni.isOnline())&&e.canRun(),h=()=>El(e.networkMode)&&e.canRun(),f=m=>{var b;n||(n=!0,(b=e.onSuccess)==null||b.call(e,m),i==null||i(),a.resolve(m))},u=m=>{var b;n||(n=!0,(b=e.onError)==null||b.call(e,m),i==null||i(),a.reject(m))},g=()=>new Promise(m=>{var b;i=v=>{(n||d())&&m(v)},(b=e.onPause)==null||b.call(e)}).then(()=>{var m;i=void 0,n||(m=e.onContinue)==null||m.call(e)}),k=()=>{if(n)return;let m;const b=r===0?e.initialPromise:void 0;try{m=b??e.fn()}catch(v){m=Promise.reject(v)}Promise.resolve(m).then(f).catch(v=>{var $;if(n)return;const w=e.retry??(Rr?0:3),P=e.retryDelay??Eu,T=typeof P=="function"?P(r,v):P,C=w===!0||typeof w=="number"&&r<w||typeof w=="function"&&w(r,v);if(t||!C){u(v);return}r++,($=e.onFail)==null||$.call(e,r,v),yu(T).then(()=>d()?void 0:g()).then(()=>{t?u(v):k()})})};return{promise:a,cancel:s,continue:()=>(i==null||i(),a),cancelRetry:o,continueRetry:l,canStart:h,start:()=>(h()?k():g().then(k),a)}}var ku=e=>setTimeout(e,0);function Tu(){let e=[],t=0,r=o=>{o()},n=o=>{o()},i=ku;const a=o=>{t?e.push(o):i(()=>{r(o)})},s=()=>{const o=e;e=[],o.length&&i(()=>{n(()=>{o.forEach(l=>{r(l)})})})};return{batch:o=>{let l;t++;try{l=o()}finally{t--,t||s()}return l},batchCalls:o=>(...l)=>{a(()=>{o(...l)})},schedule:a,setNotifyFunction:o=>{r=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{i=o}}}var Ge=Tu(),Cr,Jo,jl=(Jo=class{constructor(){xe(this,Cr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ua(this.gcTime)&&ie(this,Cr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Rr?1/0:5*60*1e3))}clearGcTimeout(){F(this,Cr)&&(clearTimeout(F(this,Cr)),ie(this,Cr,void 0))}},Cr=new WeakMap,Jo),Xr,Er,yt,kr,Xe,kn,Tr,Tt,Wt,el,ju=(el=class extends jl{constructor(t){super();xe(this,Tt);xe(this,Xr);xe(this,Er);xe(this,yt);xe(this,kr);xe(this,Xe);xe(this,kn);xe(this,Tr);ie(this,Tr,!1),ie(this,kn,t.defaultOptions),this.setOptions(t.options),this.observers=[],ie(this,kr,t.client),ie(this,yt,F(this,kr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ie(this,Xr,Fu(this.options)),this.state=t.state??F(this,Xr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=F(this,Xe))==null?void 0:t.promise}setOptions(t){this.options={...F(this,kn),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&F(this,yt).remove(this)}setData(t,r){const n=ha(this.state.data,t,this.options);return ve(this,Tt,Wt).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){ve(this,Tt,Wt).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=F(this,Xe))==null?void 0:n.promise;return(i=F(this,Xe))==null||i.cancel(t),r?r.then(lt).catch(lt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(F(this,Xr))}isActive(){return this.observers.some(t=>bt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ri||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>cr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Sl(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=F(this,Xe))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=F(this,Xe))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),F(this,yt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(F(this,Xe)&&(F(this,Tr)?F(this,Xe).cancel({revert:!0}):F(this,Xe).cancelRetry()),this.scheduleGc()),F(this,yt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ve(this,Tt,Wt).call(this,{type:"invalidate"})}fetch(t,r){var d,h,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(F(this,Xe))return F(this,Xe).continueRetry(),F(this,Xe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const u=this.observers.find(g=>g.options.queryFn);u&&this.setOptions(u.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const n=new AbortController,i=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(ie(this,Tr,!0),n.signal)})},a=()=>{const u=Cl(this.options,r),k=(()=>{const m={client:F(this,kr),queryKey:this.queryKey,meta:this.meta};return i(m),m})();return ie(this,Tr,!1),this.options.persister?this.options.persister(u,k,this):u(k)},o=(()=>{const u={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:F(this,kr),state:this.state,fetchFn:a};return i(u),u})();(d=this.options.behavior)==null||d.onFetch(o,this),ie(this,Er,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=o.fetchOptions)==null?void 0:h.meta))&&ve(this,Tt,Wt).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const l=u=>{var g,k,m,b;qi(u)&&u.silent||ve(this,Tt,Wt).call(this,{type:"error",error:u}),qi(u)||((k=(g=F(this,yt).config).onError)==null||k.call(g,u,this),(b=(m=F(this,yt).config).onSettled)==null||b.call(m,this.state.data,u,this)),this.scheduleGc()};return ie(this,Xe,Tl({initialPromise:r==null?void 0:r.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:u=>{var g,k,m,b;if(u===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(v){l(v);return}(k=(g=F(this,yt).config).onSuccess)==null||k.call(g,u,this),(b=(m=F(this,yt).config).onSettled)==null||b.call(m,u,this.state.error,this),this.scheduleGc()},onError:l,onFail:(u,g)=>{ve(this,Tt,Wt).call(this,{type:"failed",failureCount:u,error:g})},onPause:()=>{ve(this,Tt,Wt).call(this,{type:"pause"})},onContinue:()=>{ve(this,Tt,Wt).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),F(this,Xe).start()}},Xr=new WeakMap,Er=new WeakMap,yt=new WeakMap,kr=new WeakMap,Xe=new WeakMap,kn=new WeakMap,Tr=new WeakMap,Tt=new WeakSet,Wt=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Fl(n.data,this.options),fetchMeta:t.meta??null};case"success":return ie(this,Er,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return qi(i)&&i.revert&&F(this,Er)?{...F(this,Er),fetchStatus:"idle"}:{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Ge.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),F(this,yt).notify({query:this,type:"updated",action:t})})},el);function Fl(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:El(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Fu(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Pt,tl,Ou=(tl=class extends An{constructor(t={}){super();xe(this,Pt);this.config=t,ie(this,Pt,new Map)}build(t,r,n){const i=r.queryKey,a=r.queryHash??Wa(i,r);let s=this.get(a);return s||(s=new ju({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){F(this,Pt).has(t.queryHash)||(F(this,Pt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=F(this,Pt).get(t.queryHash);r&&(t.destroy(),r===t&&F(this,Pt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ge.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return F(this,Pt).get(t)}getAll(){return[...F(this,Pt).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>As(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>As(t,n)):r}notify(t){Ge.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ge.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ge.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Pt=new WeakMap,tl),Dt,tt,jr,It,Zt,rl,Au=(rl=class extends jl{constructor(t){super();xe(this,It);xe(this,Dt);xe(this,tt);xe(this,jr);this.mutationId=t.mutationId,ie(this,tt,t.mutationCache),ie(this,Dt,[]),this.state=t.state||_u(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){F(this,Dt).includes(t)||(F(this,Dt).push(t),this.clearGcTimeout(),F(this,tt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ie(this,Dt,F(this,Dt).filter(r=>r!==t)),this.scheduleGc(),F(this,tt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){F(this,Dt).length||(this.state.status==="pending"?this.scheduleGc():F(this,tt).remove(this))}continue(){var t;return((t=F(this,jr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,s,o,l,d,h,f,u,g,k,m,b,v,w,P,T,C,$,B,A;const r=()=>{ve(this,It,Zt).call(this,{type:"continue"})};ie(this,jr,Tl({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(I,p)=>{ve(this,It,Zt).call(this,{type:"failed",failureCount:I,error:p})},onPause:()=>{ve(this,It,Zt).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>F(this,tt).canRun(this)}));const n=this.state.status==="pending",i=!F(this,jr).canStart();try{if(n)r();else{ve(this,It,Zt).call(this,{type:"pending",variables:t,isPaused:i}),await((s=(a=F(this,tt).config).onMutate)==null?void 0:s.call(a,t,this));const p=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t));p!==this.state.context&&ve(this,It,Zt).call(this,{type:"pending",context:p,variables:t,isPaused:i})}const I=await F(this,jr).start();return await((h=(d=F(this,tt).config).onSuccess)==null?void 0:h.call(d,I,t,this.state.context,this)),await((u=(f=this.options).onSuccess)==null?void 0:u.call(f,I,t,this.state.context)),await((k=(g=F(this,tt).config).onSettled)==null?void 0:k.call(g,I,null,this.state.variables,this.state.context,this)),await((b=(m=this.options).onSettled)==null?void 0:b.call(m,I,null,t,this.state.context)),ve(this,It,Zt).call(this,{type:"success",data:I}),I}catch(I){try{throw await((w=(v=F(this,tt).config).onError)==null?void 0:w.call(v,I,t,this.state.context,this)),await((T=(P=this.options).onError)==null?void 0:T.call(P,I,t,this.state.context)),await(($=(C=F(this,tt).config).onSettled)==null?void 0:$.call(C,void 0,I,this.state.variables,this.state.context,this)),await((A=(B=this.options).onSettled)==null?void 0:A.call(B,void 0,I,t,this.state.context)),I}finally{ve(this,It,Zt).call(this,{type:"error",error:I})}}finally{F(this,tt).runNext(this)}}},Dt=new WeakMap,tt=new WeakMap,jr=new WeakMap,It=new WeakSet,Zt=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Ge.batch(()=>{F(this,Dt).forEach(n=>{n.onMutationUpdate(t)}),F(this,tt).notify({mutation:this,type:"updated",action:t})})},rl);function _u(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ut,jt,Tn,nl,Ru=(nl=class extends An{constructor(t={}){super();xe(this,Ut);xe(this,jt);xe(this,Tn);this.config=t,ie(this,Ut,new Set),ie(this,jt,new Map),ie(this,Tn,0)}build(t,r,n){const i=new Au({mutationCache:this,mutationId:++Dn(this,Tn)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){F(this,Ut).add(t);const r=In(t);if(typeof r=="string"){const n=F(this,jt).get(r);n?n.push(t):F(this,jt).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(F(this,Ut).delete(t)){const r=In(t);if(typeof r=="string"){const n=F(this,jt).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&F(this,jt).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=In(t);if(typeof r=="string"){const n=F(this,jt).get(r),i=n==null?void 0:n.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=In(t);if(typeof r=="string"){const i=(n=F(this,jt).get(r))==null?void 0:n.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ge.batch(()=>{F(this,Ut).forEach(t=>{this.notify({type:"removed",mutation:t})}),F(this,Ut).clear(),F(this,jt).clear()})}getAll(){return Array.from(F(this,Ut))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>_s(r,n))}findAll(t={}){return this.getAll().filter(r=>_s(t,r))}notify(t){Ge.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Ge.batch(()=>Promise.all(t.map(r=>r.continue().catch(lt))))}},Ut=new WeakMap,jt=new WeakMap,Tn=new WeakMap,nl);function In(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Ps(e){return{onFetch:(t,r)=>{var h,f,u,g,k;const n=t.options,i=(u=(f=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:f.fetchMore)==null?void 0:u.direction,a=((g=t.state.data)==null?void 0:g.pages)||[],s=((k=t.state.data)==null?void 0:k.pageParams)||[];let o={pages:[],pageParams:[]},l=0;const d=async()=>{let m=!1;const b=P=>{Object.defineProperty(P,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},v=Cl(t.options,t.fetchOptions),w=async(P,T,C)=>{if(m)return Promise.reject();if(T==null&&P.pages.length)return Promise.resolve(P);const B=(()=>{const _={client:t.client,queryKey:t.queryKey,pageParam:T,direction:C?"backward":"forward",meta:t.options.meta};return b(_),_})(),A=await v(B),{maxPages:I}=t.options,p=C?bu:vu;return{pages:p(P.pages,A,I),pageParams:p(P.pageParams,T,I)}};if(i&&a.length){const P=i==="backward",T=P?$u:Ds,C={pages:a,pageParams:s},$=T(n,C);o=await w(C,$,P)}else{const P=e??a.length;do{const T=l===0?s[0]??n.initialPageParam:Ds(n,o);if(l>0&&T==null)break;o=await w(o,T),l++}while(l<P)}return o};t.options.persister?t.fetchFn=()=>{var m,b;return(b=(m=t.options).persister)==null?void 0:b.call(m,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=d}}}function Ds(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function $u(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Le,rr,nr,Jr,en,ir,tn,rn,il,Pu=(il=class{constructor(e={}){xe(this,Le);xe(this,rr);xe(this,nr);xe(this,Jr);xe(this,en);xe(this,ir);xe(this,tn);xe(this,rn);ie(this,Le,e.queryCache||new Ou),ie(this,rr,e.mutationCache||new Ru),ie(this,nr,e.defaultOptions||{}),ie(this,Jr,new Map),ie(this,en,new Map),ie(this,ir,0)}mount(){Dn(this,ir)._++,F(this,ir)===1&&(ie(this,tn,Ua.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,Le).onFocus())})),ie(this,rn,ni.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,Le).onOnline())})))}unmount(){var e,t;Dn(this,ir)._--,F(this,ir)===0&&((e=F(this,tn))==null||e.call(this),ie(this,tn,void 0),(t=F(this,rn))==null||t.call(this),ie(this,rn,void 0))}isFetching(e){return F(this,Le).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return F(this,rr).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=F(this,Le).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=F(this,Le).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(cr(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return F(this,Le).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=F(this,Le).get(n.queryHash),a=i==null?void 0:i.state.data,s=gu(t,a);if(s!==void 0)return F(this,Le).build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return Ge.batch(()=>F(this,Le).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=F(this,Le).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=F(this,Le);Ge.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=F(this,Le);return Ge.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Ge.batch(()=>F(this,Le).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(lt).catch(lt)}invalidateQueries(e,t={}){return Ge.batch(()=>(F(this,Le).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Ge.batch(()=>F(this,Le).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,r);return r.throwOnError||(a=a.catch(lt)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(n).then(lt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=F(this,Le).build(this,t);return r.isStaleByTime(cr(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(lt).catch(lt)}fetchInfiniteQuery(e){return e.behavior=Ps(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(lt).catch(lt)}ensureInfiniteQueryData(e){return e.behavior=Ps(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ni.isOnline()?F(this,rr).resumePausedMutations():Promise.resolve()}getQueryCache(){return F(this,Le)}getMutationCache(){return F(this,rr)}getDefaultOptions(){return F(this,nr)}setDefaultOptions(e){ie(this,nr,e)}setQueryDefaults(e,t){F(this,Jr).set(wn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...F(this,Jr).values()],r={};return t.forEach(n=>{Sn(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){F(this,en).set(wn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...F(this,en).values()],r={};return t.forEach(n=>{Sn(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...F(this,nr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Wa(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ri&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...F(this,nr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){F(this,Le).clear(),F(this,rr).clear()}},Le=new WeakMap,rr=new WeakMap,nr=new WeakMap,Jr=new WeakMap,en=new WeakMap,ir=new WeakMap,tn=new WeakMap,rn=new WeakMap,il),ot,be,jn,rt,Fr,nn,ar,sr,Fn,an,sn,Or,Ar,or,on,ke,mn,xa,ga,ya,va,ba,wa,Sa,Ol,al,Du=(al=class extends An{constructor(t,r){super();xe(this,ke);xe(this,ot);xe(this,be);xe(this,jn);xe(this,rt);xe(this,Fr);xe(this,nn);xe(this,ar);xe(this,sr);xe(this,Fn);xe(this,an);xe(this,sn);xe(this,Or);xe(this,Ar);xe(this,or);xe(this,on,new Set);this.options=r,ie(this,ot,t),ie(this,sr,null),ie(this,ar,ma()),this.options.experimental_prefetchInRender||F(this,ar).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(F(this,be).addObserver(this),Is(F(this,be),this.options)?ve(this,ke,mn).call(this):this.updateResult(),ve(this,ke,va).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ca(F(this,be),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ca(F(this,be),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ve(this,ke,ba).call(this),ve(this,ke,wa).call(this),F(this,be).removeObserver(this)}setOptions(t){const r=this.options,n=F(this,be);if(this.options=F(this,ot).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof bt(this.options.enabled,F(this,be))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ve(this,ke,Sa).call(this),F(this,be).setOptions(this.options),r._defaulted&&!da(this.options,r)&&F(this,ot).getQueryCache().notify({type:"observerOptionsUpdated",query:F(this,be),observer:this});const i=this.hasListeners();i&&Ms(F(this,be),n,this.options,r)&&ve(this,ke,mn).call(this),this.updateResult(),i&&(F(this,be)!==n||bt(this.options.enabled,F(this,be))!==bt(r.enabled,F(this,be))||cr(this.options.staleTime,F(this,be))!==cr(r.staleTime,F(this,be)))&&ve(this,ke,xa).call(this);const a=ve(this,ke,ga).call(this);i&&(F(this,be)!==n||bt(this.options.enabled,F(this,be))!==bt(r.enabled,F(this,be))||a!==F(this,or))&&ve(this,ke,ya).call(this,a)}getOptimisticResult(t){const r=F(this,ot).getQueryCache().build(F(this,ot),t),n=this.createResult(r,t);return Mu(this,n)&&(ie(this,rt,n),ie(this,nn,this.options),ie(this,Fr,F(this,be).state)),n}getCurrentResult(){return F(this,rt)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),Reflect.get(n,i))})}trackProp(t){F(this,on).add(t)}getCurrentQuery(){return F(this,be)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=F(this,ot).defaultQueryOptions(t),n=F(this,ot).getQueryCache().build(F(this,ot),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return ve(this,ke,mn).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),F(this,rt)))}createResult(t,r){var I;const n=F(this,be),i=this.options,a=F(this,rt),s=F(this,Fr),o=F(this,nn),d=t!==n?t.state:F(this,jn),{state:h}=t;let f={...h},u=!1,g;if(r._optimisticResults){const p=this.hasListeners(),_=!p&&Is(t,r),z=p&&Ms(t,n,r,i);(_||z)&&(f={...f,...Fl(h.data,t.options)}),r._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:k,errorUpdatedAt:m,status:b}=f;g=f.data;let v=!1;if(r.placeholderData!==void 0&&g===void 0&&b==="pending"){let p;a!=null&&a.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData)?(p=a.data,v=!0):p=typeof r.placeholderData=="function"?r.placeholderData((I=F(this,sn))==null?void 0:I.state.data,F(this,sn)):r.placeholderData,p!==void 0&&(b="success",g=ha(a==null?void 0:a.data,p,r),u=!0)}if(r.select&&g!==void 0&&!v)if(a&&g===(s==null?void 0:s.data)&&r.select===F(this,Fn))g=F(this,an);else try{ie(this,Fn,r.select),g=r.select(g),g=ha(a==null?void 0:a.data,g,r),ie(this,an,g),ie(this,sr,null)}catch(p){ie(this,sr,p)}F(this,sr)&&(k=F(this,sr),g=F(this,an),m=Date.now(),b="error");const w=f.fetchStatus==="fetching",P=b==="pending",T=b==="error",C=P&&w,$=g!==void 0,A={status:b,fetchStatus:f.fetchStatus,isPending:P,isSuccess:b==="success",isError:T,isInitialLoading:C,isLoading:C,data:g,dataUpdatedAt:f.dataUpdatedAt,error:k,errorUpdatedAt:m,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>d.dataUpdateCount||f.errorUpdateCount>d.errorUpdateCount,isFetching:w,isRefetching:w&&!P,isLoadingError:T&&!$,isPaused:f.fetchStatus==="paused",isPlaceholderData:u,isRefetchError:T&&$,isStale:Ha(t,r),refetch:this.refetch,promise:F(this,ar),isEnabled:bt(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const p=O=>{A.status==="error"?O.reject(A.error):A.data!==void 0&&O.resolve(A.data)},_=()=>{const O=ie(this,ar,A.promise=ma());p(O)},z=F(this,ar);switch(z.status){case"pending":t.queryHash===n.queryHash&&p(z);break;case"fulfilled":(A.status==="error"||A.data!==z.value)&&_();break;case"rejected":(A.status!=="error"||A.error!==z.reason)&&_();break}}return A}updateResult(){const t=F(this,rt),r=this.createResult(F(this,be),this.options);if(ie(this,Fr,F(this,be).state),ie(this,nn,this.options),F(this,Fr).data!==void 0&&ie(this,sn,F(this,be)),da(r,t))return;ie(this,rt,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!F(this,on).size)return!0;const s=new Set(a??F(this,on));return this.options.throwOnError&&s.add("error"),Object.keys(F(this,rt)).some(o=>{const l=o;return F(this,rt)[l]!==t[l]&&s.has(l)})};ve(this,ke,Ol).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ve(this,ke,va).call(this)}},ot=new WeakMap,be=new WeakMap,jn=new WeakMap,rt=new WeakMap,Fr=new WeakMap,nn=new WeakMap,ar=new WeakMap,sr=new WeakMap,Fn=new WeakMap,an=new WeakMap,sn=new WeakMap,Or=new WeakMap,Ar=new WeakMap,or=new WeakMap,on=new WeakMap,ke=new WeakSet,mn=function(t){ve(this,ke,Sa).call(this);let r=F(this,be).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(lt)),r},xa=function(){ve(this,ke,ba).call(this);const t=cr(this.options.staleTime,F(this,be));if(Rr||F(this,rt).isStale||!ua(t))return;const n=Sl(F(this,rt).dataUpdatedAt,t)+1;ie(this,Or,setTimeout(()=>{F(this,rt).isStale||this.updateResult()},n))},ga=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(F(this,be)):this.options.refetchInterval)??!1},ya=function(t){ve(this,ke,wa).call(this),ie(this,or,t),!(Rr||bt(this.options.enabled,F(this,be))===!1||!ua(F(this,or))||F(this,or)===0)&&ie(this,Ar,setInterval(()=>{(this.options.refetchIntervalInBackground||Ua.isFocused())&&ve(this,ke,mn).call(this)},F(this,or)))},va=function(){ve(this,ke,xa).call(this),ve(this,ke,ya).call(this,ve(this,ke,ga).call(this))},ba=function(){F(this,Or)&&(clearTimeout(F(this,Or)),ie(this,Or,void 0))},wa=function(){F(this,Ar)&&(clearInterval(F(this,Ar)),ie(this,Ar,void 0))},Sa=function(){const t=F(this,ot).getQueryCache().build(F(this,ot),this.options);if(t===F(this,be))return;const r=F(this,be);ie(this,be,t),ie(this,jn,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},Ol=function(t){Ge.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(F(this,rt))}),F(this,ot).getQueryCache().notify({query:F(this,be),type:"observerResultsUpdated"})})},al);function Iu(e,t){return bt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Is(e,t){return Iu(e,t)||e.state.data!==void 0&&Ca(e,t,t.refetchOnMount)}function Ca(e,t,r){if(bt(t.enabled,e)!==!1&&cr(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Ha(e,t)}return!1}function Ms(e,t,r,n){return(e!==t||bt(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Ha(e,r)}function Ha(e,t){return bt(t.enabled,e)!==!1&&e.isStaleByTime(cr(t.staleTime,e))}function Mu(e,t){return!da(e.getCurrentResult(),t)}var Al=ae.createContext(void 0),zu=e=>{const t=ae.useContext(Al);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Bu=({client:e,children:t})=>(ae.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),c.jsx(Al.Provider,{value:e,children:t})),_l=ae.createContext(!1),Vu=()=>ae.useContext(_l);_l.Provider;function Nu(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Lu=ae.createContext(Nu()),qu=()=>ae.useContext(Lu),Wu=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Uu=e=>{ae.useEffect(()=>{e.clearReset()},[e])},Hu=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||wu(r,[e.error,n])),Ku=e=>{if(e.suspense){const t=n=>n==="static"?n:Math.max(n??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...n)=>t(r(...n)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Yu=(e,t)=>e.isLoading&&e.isFetching&&!t,Gu=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,zs=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function Qu(e,t,r){var f,u,g,k,m;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const n=Vu(),i=qu(),a=zu(),s=a.defaultQueryOptions(e);(u=(f=a.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||u.call(f,s),process.env.NODE_ENV!=="production"&&(s.queryFn||console.error(`[${s.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),s._optimisticResults=n?"isRestoring":"optimistic",Ku(s),Wu(s,i),Uu(i);const o=!a.getQueryCache().get(s.queryHash),[l]=ae.useState(()=>new t(a,s)),d=l.getOptimisticResult(s),h=!n&&e.subscribed!==!1;if(ae.useSyncExternalStore(ae.useCallback(b=>{const v=h?l.subscribe(Ge.batchCalls(b)):lt;return l.updateResult(),v},[l,h]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),ae.useEffect(()=>{l.setOptions(s)},[s,l]),Gu(s,d))throw zs(s,l,i);if(Hu({result:d,errorResetBoundary:i,throwOnError:s.throwOnError,query:a.getQueryCache().get(s.queryHash),suspense:s.suspense}))throw d.error;if((k=(g=a.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||k.call(g,s,d),s.experimental_prefetchInRender&&!Rr&&Yu(d,n)){const b=o?zs(s,l,i):(m=a.getQueryCache().get(s.queryHash))==null?void 0:m.promise;b==null||b.catch(lt).finally(()=>{l.updateResult()})}return s.notifyOnChangeProps?d:l.trackResult(d)}function Zu(e,t){return Qu(e,Du)}function Ka(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mn={exports:{}},zn={exports:{}},Ce={};/** @license React v16.13.1
|
|
2
2
|
* react-is.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
5
5
|
*
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/var
|
|
8
|
+
*/var Bs;function Xu(){if(Bs)return Ce;Bs=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,u=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,k=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function P(C){if(typeof C=="object"&&C!==null){var $=C.$$typeof;switch($){case t:switch(C=C.type,C){case l:case d:case n:case a:case i:case f:return C;default:switch(C=C&&C.$$typeof,C){case o:case h:case k:case g:case s:return C;default:return $}}case r:return $}}}function T(C){return P(C)===d}return Ce.AsyncMode=l,Ce.ConcurrentMode=d,Ce.ContextConsumer=o,Ce.ContextProvider=s,Ce.Element=t,Ce.ForwardRef=h,Ce.Fragment=n,Ce.Lazy=k,Ce.Memo=g,Ce.Portal=r,Ce.Profiler=a,Ce.StrictMode=i,Ce.Suspense=f,Ce.isAsyncMode=function(C){return T(C)||P(C)===l},Ce.isConcurrentMode=T,Ce.isContextConsumer=function(C){return P(C)===o},Ce.isContextProvider=function(C){return P(C)===s},Ce.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===t},Ce.isForwardRef=function(C){return P(C)===h},Ce.isFragment=function(C){return P(C)===n},Ce.isLazy=function(C){return P(C)===k},Ce.isMemo=function(C){return P(C)===g},Ce.isPortal=function(C){return P(C)===r},Ce.isProfiler=function(C){return P(C)===a},Ce.isStrictMode=function(C){return P(C)===i},Ce.isSuspense=function(C){return P(C)===f},Ce.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===n||C===d||C===a||C===i||C===f||C===u||typeof C=="object"&&C!==null&&(C.$$typeof===k||C.$$typeof===g||C.$$typeof===s||C.$$typeof===o||C.$$typeof===h||C.$$typeof===b||C.$$typeof===v||C.$$typeof===w||C.$$typeof===m)},Ce.typeOf=P,Ce}var Ee={};/** @license React v16.13.1
|
|
9
9
|
* react-is.development.js
|
|
10
10
|
*
|
|
11
11
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
12
12
|
*
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
|
-
*/var
|
|
15
|
+
*/var Vs;function Ju(){return Vs||(Vs=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,h=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,u=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,k=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function P(Q){return typeof Q=="string"||typeof Q=="function"||Q===n||Q===d||Q===a||Q===i||Q===f||Q===u||typeof Q=="object"&&Q!==null&&(Q.$$typeof===k||Q.$$typeof===g||Q.$$typeof===s||Q.$$typeof===o||Q.$$typeof===h||Q.$$typeof===b||Q.$$typeof===v||Q.$$typeof===w||Q.$$typeof===m)}function T(Q){if(typeof Q=="object"&&Q!==null){var De=Q.$$typeof;switch(De){case t:var He=Q.type;switch(He){case l:case d:case n:case a:case i:case f:return He;default:var Ze=He&&He.$$typeof;switch(Ze){case o:case h:case k:case g:case s:return Ze;default:return De}}case r:return De}}}var C=l,$=d,B=o,A=s,I=t,p=h,_=n,z=k,O=g,N=r,K=a,ne=i,me=f,ue=!1;function G(Q){return ue||(ue=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),L(Q)||T(Q)===l}function L(Q){return T(Q)===d}function Y(Q){return T(Q)===o}function de(Q){return T(Q)===s}function fe(Q){return typeof Q=="object"&&Q!==null&&Q.$$typeof===t}function pe(Q){return T(Q)===h}function ge(Q){return T(Q)===n}function q(Q){return T(Q)===k}function te(Q){return T(Q)===g}function se(Q){return T(Q)===r}function oe(Q){return T(Q)===a}function le(Q){return T(Q)===i}function Se(Q){return T(Q)===f}Ee.AsyncMode=C,Ee.ConcurrentMode=$,Ee.ContextConsumer=B,Ee.ContextProvider=A,Ee.Element=I,Ee.ForwardRef=p,Ee.Fragment=_,Ee.Lazy=z,Ee.Memo=O,Ee.Portal=N,Ee.Profiler=K,Ee.StrictMode=ne,Ee.Suspense=me,Ee.isAsyncMode=G,Ee.isConcurrentMode=L,Ee.isContextConsumer=Y,Ee.isContextProvider=de,Ee.isElement=fe,Ee.isForwardRef=pe,Ee.isFragment=ge,Ee.isLazy=q,Ee.isMemo=te,Ee.isPortal=se,Ee.isProfiler=oe,Ee.isStrictMode=le,Ee.isSuspense=Se,Ee.isValidElementType=P,Ee.typeOf=T}()),Ee}var Ns;function Rl(){return Ns||(Ns=1,process.env.NODE_ENV==="production"?zn.exports=Xu():zn.exports=Ju()),zn.exports}/*
|
|
16
16
|
object-assign
|
|
17
17
|
(c) Sindre Sorhus
|
|
18
18
|
@license MIT
|
|
19
|
-
*/var
|
|
20
|
-
Valid keys: `+JSON.stringify(Object.keys(
|
|
19
|
+
*/var Wi,Ls;function ep(){if(Ls)return Wi;Ls=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var s={},o=0;o<10;o++)s["_"+String.fromCharCode(o)]=o;var l=Object.getOwnPropertyNames(s).map(function(h){return s[h]});if(l.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(h){d[h]=h}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Wi=i()?Object.assign:function(a,s){for(var o,l=n(a),d,h=1;h<arguments.length;h++){o=Object(arguments[h]);for(var f in o)t.call(o,f)&&(l[f]=o[f]);if(e){d=e(o);for(var u=0;u<d.length;u++)r.call(o,d[u])&&(l[d[u]]=o[d[u]])}}return l},Wi}var Ui,qs;function Ya(){if(qs)return Ui;qs=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ui=e,Ui}var Hi,Ws;function $l(){return Ws||(Ws=1,Hi=Function.call.bind(Object.prototype.hasOwnProperty)),Hi}var Ki,Us;function tp(){if(Us)return Ki;Us=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Ya(),r={},n=$l();e=function(a){var s="Warning: "+a;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function i(a,s,o,l,d){if(process.env.NODE_ENV!=="production"){for(var h in a)if(n(a,h)){var f;try{if(typeof a[h]!="function"){var u=Error((l||"React class")+": "+o+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}f=a[h](s,h,l,o,null,t)}catch(k){f=k}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+o+" `"+h+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in r)){r[f.message]=!0;var g=d?d():"";e("Failed "+o+" type: "+f.message+(g??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Ki=i,Ki}var Yi,Hs;function rp(){if(Hs)return Yi;Hs=1;var e=Rl(),t=ep(),r=Ya(),n=$l(),i=tp(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(o){var l="Warning: "+o;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return Yi=function(o,l){var d=typeof Symbol=="function"&&Symbol.iterator,h="@@iterator";function f(L){var Y=L&&(d&&L[d]||L[h]);if(typeof Y=="function")return Y}var u="<<anonymous>>",g={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:w(),arrayOf:P,element:T(),elementType:C(),instanceOf:$,node:p(),objectOf:A,oneOf:B,oneOfType:I,shape:z,exact:O};function k(L,Y){return L===Y?L!==0||1/L===1/Y:L!==L&&Y!==Y}function m(L,Y){this.message=L,this.data=Y&&typeof Y=="object"?Y:{},this.stack=""}m.prototype=Error.prototype;function b(L){if(process.env.NODE_ENV!=="production")var Y={},de=0;function fe(ge,q,te,se,oe,le,Se){if(se=se||u,le=le||te,Se!==r){if(l){var Q=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Q.name="Invariant Violation",Q}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var De=se+":"+te;!Y[De]&&de<3&&(a("You are manually calling a React.PropTypes validation function for the `"+le+"` prop on `"+se+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),Y[De]=!0,de++)}}return q[te]==null?ge?q[te]===null?new m("The "+oe+" `"+le+"` is marked as required "+("in `"+se+"`, but its value is `null`.")):new m("The "+oe+" `"+le+"` is marked as required in "+("`"+se+"`, but its value is `undefined`.")):null:L(q,te,se,oe,le)}var pe=fe.bind(null,!1);return pe.isRequired=fe.bind(null,!0),pe}function v(L){function Y(de,fe,pe,ge,q,te){var se=de[fe],oe=ne(se);if(oe!==L){var le=me(se);return new m("Invalid "+ge+" `"+q+"` of type "+("`"+le+"` supplied to `"+pe+"`, expected ")+("`"+L+"`."),{expectedType:L})}return null}return b(Y)}function w(){return b(s)}function P(L){function Y(de,fe,pe,ge,q){if(typeof L!="function")return new m("Property `"+q+"` of component `"+pe+"` has invalid PropType notation inside arrayOf.");var te=de[fe];if(!Array.isArray(te)){var se=ne(te);return new m("Invalid "+ge+" `"+q+"` of type "+("`"+se+"` supplied to `"+pe+"`, expected an array."))}for(var oe=0;oe<te.length;oe++){var le=L(te,oe,pe,ge,q+"["+oe+"]",r);if(le instanceof Error)return le}return null}return b(Y)}function T(){function L(Y,de,fe,pe,ge){var q=Y[de];if(!o(q)){var te=ne(q);return new m("Invalid "+pe+" `"+ge+"` of type "+("`"+te+"` supplied to `"+fe+"`, expected a single ReactElement."))}return null}return b(L)}function C(){function L(Y,de,fe,pe,ge){var q=Y[de];if(!e.isValidElementType(q)){var te=ne(q);return new m("Invalid "+pe+" `"+ge+"` of type "+("`"+te+"` supplied to `"+fe+"`, expected a single ReactElement type."))}return null}return b(L)}function $(L){function Y(de,fe,pe,ge,q){if(!(de[fe]instanceof L)){var te=L.name||u,se=G(de[fe]);return new m("Invalid "+ge+" `"+q+"` of type "+("`"+se+"` supplied to `"+pe+"`, expected ")+("instance of `"+te+"`."))}return null}return b(Y)}function B(L){if(!Array.isArray(L))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),s;function Y(de,fe,pe,ge,q){for(var te=de[fe],se=0;se<L.length;se++)if(k(te,L[se]))return null;var oe=JSON.stringify(L,function(Se,Q){var De=me(Q);return De==="symbol"?String(Q):Q});return new m("Invalid "+ge+" `"+q+"` of value `"+String(te)+"` "+("supplied to `"+pe+"`, expected one of "+oe+"."))}return b(Y)}function A(L){function Y(de,fe,pe,ge,q){if(typeof L!="function")return new m("Property `"+q+"` of component `"+pe+"` has invalid PropType notation inside objectOf.");var te=de[fe],se=ne(te);if(se!=="object")return new m("Invalid "+ge+" `"+q+"` of type "+("`"+se+"` supplied to `"+pe+"`, expected an object."));for(var oe in te)if(n(te,oe)){var le=L(te,oe,pe,ge,q+"."+oe,r);if(le instanceof Error)return le}return null}return b(Y)}function I(L){if(!Array.isArray(L))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var Y=0;Y<L.length;Y++){var de=L[Y];if(typeof de!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ue(de)+" at index "+Y+"."),s}function fe(pe,ge,q,te,se){for(var oe=[],le=0;le<L.length;le++){var Se=L[le],Q=Se(pe,ge,q,te,se,r);if(Q==null)return null;Q.data&&n(Q.data,"expectedType")&&oe.push(Q.data.expectedType)}var De=oe.length>0?", expected one of type ["+oe.join(", ")+"]":"";return new m("Invalid "+te+" `"+se+"` supplied to "+("`"+q+"`"+De+"."))}return b(fe)}function p(){function L(Y,de,fe,pe,ge){return N(Y[de])?null:new m("Invalid "+pe+" `"+ge+"` supplied to "+("`"+fe+"`, expected a ReactNode."))}return b(L)}function _(L,Y,de,fe,pe){return new m((L||"React class")+": "+Y+" type `"+de+"."+fe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+pe+"`.")}function z(L){function Y(de,fe,pe,ge,q){var te=de[fe],se=ne(te);if(se!=="object")return new m("Invalid "+ge+" `"+q+"` of type `"+se+"` "+("supplied to `"+pe+"`, expected `object`."));for(var oe in L){var le=L[oe];if(typeof le!="function")return _(pe,ge,q,oe,me(le));var Se=le(te,oe,pe,ge,q+"."+oe,r);if(Se)return Se}return null}return b(Y)}function O(L){function Y(de,fe,pe,ge,q){var te=de[fe],se=ne(te);if(se!=="object")return new m("Invalid "+ge+" `"+q+"` of type `"+se+"` "+("supplied to `"+pe+"`, expected `object`."));var oe=t({},de[fe],L);for(var le in oe){var Se=L[le];if(n(L,le)&&typeof Se!="function")return _(pe,ge,q,le,me(Se));if(!Se)return new m("Invalid "+ge+" `"+q+"` key `"+le+"` supplied to `"+pe+"`.\nBad object: "+JSON.stringify(de[fe],null," ")+`
|
|
20
|
+
Valid keys: `+JSON.stringify(Object.keys(L),null," "));var Q=Se(te,le,pe,ge,q+"."+le,r);if(Q)return Q}return null}return b(Y)}function N(L){switch(typeof L){case"number":case"string":case"undefined":return!0;case"boolean":return!L;case"object":if(Array.isArray(L))return L.every(N);if(L===null||o(L))return!0;var Y=f(L);if(Y){var de=Y.call(L),fe;if(Y!==L.entries){for(;!(fe=de.next()).done;)if(!N(fe.value))return!1}else for(;!(fe=de.next()).done;){var pe=fe.value;if(pe&&!N(pe[1]))return!1}}else return!1;return!0;default:return!1}}function K(L,Y){return L==="symbol"?!0:Y?Y["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Y instanceof Symbol:!1}function ne(L){var Y=typeof L;return Array.isArray(L)?"array":L instanceof RegExp?"object":K(Y,L)?"symbol":Y}function me(L){if(typeof L>"u"||L===null)return""+L;var Y=ne(L);if(Y==="object"){if(L instanceof Date)return"date";if(L instanceof RegExp)return"regexp"}return Y}function ue(L){var Y=me(L);switch(Y){case"array":case"object":return"an "+Y;case"boolean":case"date":case"regexp":return"a "+Y;default:return Y}}function G(L){return!L.constructor||!L.constructor.name?u:L.constructor.name}return g.checkPropTypes=i,g.resetWarningCache=i.resetWarningCache,g.PropTypes=g,g},Yi}var Gi,Ks;function np(){if(Ks)return Gi;Ks=1;var e=Ya();function t(){}function r(){}return r.resetWarningCache=t,Gi=function(){function n(s,o,l,d,h,f){if(f!==e){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}n.isRequired=n;function i(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:t};return a.PropTypes=a,a},Gi}var Ys;function ip(){if(Ys)return Mn.exports;if(Ys=1,process.env.NODE_ENV!=="production"){var e=Rl(),t=!0;Mn.exports=rp()(e.isElement,t)}else Mn.exports=np()();return Mn.exports}var ap=ip();const j=Ka(ap);function Pl(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=Pl(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function at(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=Pl(e))&&(n&&(n+=" "),n+=t);return n}function un(e,t,r=void 0){const n={};for(const i in e){const a=e[i];let s="",o=!0;for(let l=0;l<a.length;l+=1){const d=a[l];d&&(s+=(o===!0?"":" ")+t(d),o=!1,r&&r[d]&&(s+=" "+r[d]))}n[i]=s}return n}function pr(e,...t){const r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${e}; visit ${r} for the full message.`}function ze(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":pr(7));return e.charAt(0).toUpperCase()+e.slice(1)}var Bn={exports:{}},Fe={};/**
|
|
21
21
|
* @license React
|
|
22
22
|
* react-is.production.js
|
|
23
23
|
*
|
|
@@ -25,7 +25,7 @@ Valid keys: `+JSON.stringify(Object.keys(B),null," "));var Q=Se(ee,le,pe,ge,q+"
|
|
|
25
25
|
*
|
|
26
26
|
* This source code is licensed under the MIT license found in the
|
|
27
27
|
* LICENSE file in the root directory of this source tree.
|
|
28
|
-
*/var
|
|
28
|
+
*/var Gs;function sp(){if(Gs)return Fe;Gs=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),s=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),u=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");function k(m){if(typeof m=="object"&&m!==null){var b=m.$$typeof;switch(b){case e:switch(m=m.type,m){case r:case i:case n:case l:case d:case u:return m;default:switch(m=m&&m.$$typeof,m){case s:case o:case f:case h:return m;case a:return m;default:return b}}case t:return b}}}return Fe.ContextConsumer=a,Fe.ContextProvider=s,Fe.Element=e,Fe.ForwardRef=o,Fe.Fragment=r,Fe.Lazy=f,Fe.Memo=h,Fe.Portal=t,Fe.Profiler=i,Fe.StrictMode=n,Fe.Suspense=l,Fe.SuspenseList=d,Fe.isContextConsumer=function(m){return k(m)===a},Fe.isContextProvider=function(m){return k(m)===s},Fe.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},Fe.isForwardRef=function(m){return k(m)===o},Fe.isFragment=function(m){return k(m)===r},Fe.isLazy=function(m){return k(m)===f},Fe.isMemo=function(m){return k(m)===h},Fe.isPortal=function(m){return k(m)===t},Fe.isProfiler=function(m){return k(m)===i},Fe.isStrictMode=function(m){return k(m)===n},Fe.isSuspense=function(m){return k(m)===l},Fe.isSuspenseList=function(m){return k(m)===d},Fe.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===i||m===n||m===l||m===d||typeof m=="object"&&m!==null&&(m.$$typeof===f||m.$$typeof===h||m.$$typeof===s||m.$$typeof===a||m.$$typeof===o||m.$$typeof===g||m.getModuleId!==void 0)},Fe.typeOf=k,Fe}var Oe={};/**
|
|
29
29
|
* @license React
|
|
30
30
|
* react-is.development.js
|
|
31
31
|
*
|
|
@@ -33,23 +33,23 @@ Valid keys: `+JSON.stringify(Object.keys(B),null," "));var Q=Se(ee,le,pe,ge,q+"
|
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the MIT license found in the
|
|
35
35
|
* LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/var
|
|
37
|
-
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:
|
|
36
|
+
*/var Qs;function op(){return Qs||(Qs=1,process.env.NODE_ENV!=="production"&&function(){function e(m){if(typeof m=="object"&&m!==null){var b=m.$$typeof;switch(b){case t:switch(m=m.type,m){case n:case a:case i:case d:case h:case g:return m;default:switch(m=m&&m.$$typeof,m){case o:case l:case u:case f:return m;case s:return m;default:return b}}case r:return b}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),g=Symbol.for("react.view_transition"),k=Symbol.for("react.client.reference");Oe.ContextConsumer=s,Oe.ContextProvider=o,Oe.Element=t,Oe.ForwardRef=l,Oe.Fragment=n,Oe.Lazy=u,Oe.Memo=f,Oe.Portal=r,Oe.Profiler=a,Oe.StrictMode=i,Oe.Suspense=d,Oe.SuspenseList=h,Oe.isContextConsumer=function(m){return e(m)===s},Oe.isContextProvider=function(m){return e(m)===o},Oe.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},Oe.isForwardRef=function(m){return e(m)===l},Oe.isFragment=function(m){return e(m)===n},Oe.isLazy=function(m){return e(m)===u},Oe.isMemo=function(m){return e(m)===f},Oe.isPortal=function(m){return e(m)===r},Oe.isProfiler=function(m){return e(m)===a},Oe.isStrictMode=function(m){return e(m)===i},Oe.isSuspense=function(m){return e(m)===d},Oe.isSuspenseList=function(m){return e(m)===h},Oe.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===a||m===i||m===d||m===h||typeof m=="object"&&m!==null&&(m.$$typeof===u||m.$$typeof===f||m.$$typeof===o||m.$$typeof===s||m.$$typeof===l||m.$$typeof===k||m.getModuleId!==void 0)},Oe.typeOf=e}()),Oe}var Zs;function lp(){return Zs||(Zs=1,process.env.NODE_ENV==="production"?Bn.exports=sp():Bn.exports=op()),Bn.exports}var ii=lp();function Mt(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Dl(e){if(ae.isValidElement(e)||ii.isValidElementType(e)||!Mt(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=Dl(e[r])}),t}function mt(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return Mt(e)&&Mt(t)&&Object.keys(t).forEach(i=>{ae.isValidElement(t[i])||ii.isValidElementType(t[i])?n[i]=t[i]:Mt(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Mt(e[i])?n[i]=mt(e[i],t[i],r):r.clone?n[i]=Mt(t[i])?Dl(t[i]):t[i]:n[i]=t[i]}),n}function bn(e,t){return t?mt(e,t,{clone:!1}):e}const fr=process.env.NODE_ENV!=="production"?j.oneOfType([j.number,j.string,j.object,j.array]):{};function cp(e,t){if(!e.containerQueries)return t;const r=Object.keys(t).filter(n=>n.startsWith("@container")).sort((n,i)=>{var s,o;const a=/min-width:\s*([0-9.]+)/;return+(((s=n.match(a))==null?void 0:s[1])||0)-+(((o=i.match(a))==null?void 0:o[1])||0)});return r.length?r.reduce((n,i)=>{const a=t[i];return delete n[i],n[i]=a,n},{...t}):t}function up(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function pp(e,t){const r=t.match(/^@([^/]+)?\/?(.+)?$/);if(!r){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
|
|
37
|
+
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:pr(18,`(${t})`));return null}const[,n,i]=r,a=Number.isNaN(+n)?n||0:+n;return e.containerQueries(i).up(a)}function dp(e){const t=(a,s)=>a.replace("@media",s?`@container ${s}`:"@container");function r(a,s){a.up=(...o)=>t(e.breakpoints.up(...o),s),a.down=(...o)=>t(e.breakpoints.down(...o),s),a.between=(...o)=>t(e.breakpoints.between(...o),s),a.only=(...o)=>t(e.breakpoints.only(...o),s),a.not=(...o)=>{const l=t(e.breakpoints.not(...o),s);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const n={},i=a=>(r(n,a),n);return r(i),{...e,containerQueries:i}}const Si={xs:0,sm:600,md:900,lg:1200,xl:1536},Xs={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Si[e]}px)`},fp={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:Si[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function Kt(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const a=n.breakpoints||Xs;return t.reduce((s,o,l)=>(s[a.up(a.keys[l])]=r(t[l]),s),{})}if(typeof t=="object"){const a=n.breakpoints||Xs;return Object.keys(t).reduce((s,o)=>{if(up(a.keys,o)){const l=pp(n.containerQueries?n:fp,o);l&&(s[l]=r(t[o],o))}else if(Object.keys(a.values||Si).includes(o)){const l=a.up(o);s[l]=r(t[o],o)}else{const l=o;s[l]=t[l]}return s},{})}return r(t)}function hp(e={}){var r;return((r=e.keys)==null?void 0:r.reduce((n,i)=>{const a=e.up(i);return n[a]={},n},{}))||{}}function mp(e,t){return e.reduce((r,n)=>{const i=r[n];return(!i||Object.keys(i).length===0)&&delete r[n],r},t)}function Ci(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((i,a)=>i&&i[a]?i[a]:null,e);if(n!=null)return n}return t.split(".").reduce((n,i)=>n&&n[i]!=null?n[i]:null,e)}function ai(e,t,r,n=r){let i;return typeof e=="function"?i=e(r):Array.isArray(e)?i=e[r]||n:i=Ci(e,r)||n,t&&(i=t(i,n,e)),i}function Ue(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:i}=e,a=s=>{if(s[t]==null)return null;const o=s[t],l=s.theme,d=Ci(l,n)||{};return Kt(s,o,f=>{let u=ai(d,i,f);return f===u&&typeof f=="string"&&(u=ai(d,i,`${t}${f==="default"?"":ze(f)}`,f)),r===!1?u:{[r]:u}})};return a.propTypes=process.env.NODE_ENV!=="production"?{[t]:fr}:{},a.filterProps=[t],a}function xp(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const gp={m:"margin",p:"padding"},yp={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Js={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},vp=xp(e=>{if(e.length>2)if(Js[e])e=Js[e];else return[e];const[t,r]=e.split(""),n=gp[t],i=yp[r]||"";return Array.isArray(i)?i.map(a=>n+a):[n+i]}),Ei=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],ki=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],bp=[...Ei,...ki];function _n(e,t,r,n){const i=Ci(e,t,!0)??r;return typeof i=="number"||typeof i=="string"?a=>typeof a=="string"?a:(process.env.NODE_ENV!=="production"&&typeof a!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${a}.`),typeof i=="string"?i.startsWith("var(")&&a===0?0:i.startsWith("var(")&&a===1?i:`calc(${a} * ${i})`:i*a):Array.isArray(i)?a=>{if(typeof a=="string")return a;const s=Math.abs(a);process.env.NODE_ENV!=="production"&&(Number.isInteger(s)?s>i.length-1&&console.error([`MUI: The value provided (${s}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${s} > ${i.length-1}, you need to add the missing values.`].join(`
|
|
38
38
|
`)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
|
|
39
39
|
`)));const o=i[s];return a>=0?o:typeof o=="number"?-o:typeof o=="string"&&o.startsWith("var(")?`calc(-1 * ${o})`:`-${o}`}:typeof i=="function"?i:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join(`
|
|
40
|
-
`)),()=>{})}function Ua(e){return jn(e,"spacing",8,"spacing")}function On(e,t){return typeof t=="string"||t==null?t:e(t)}function dp(e,t){return r=>e.reduce((n,i)=>(n[i]=On(t,r),n),{})}function fp(e,t,r,n){if(!t.includes(r))return null;const i=up(r),a=dp(i,n),s=e[r];return Ut(e,s,a)}function Fl(e,t){const r=Ua(e.theme);return Object.keys(e).map(n=>fp(e,t,n,r)).reduce(yn,{})}function Be(e){return Fl(e,wi)}Be.propTypes=process.env.NODE_ENV!=="production"?wi.reduce((e,t)=>(e[t]=ur,e),{}):{};Be.filterProps=wi;function Ne(e){return Fl(e,Si)}Ne.propTypes=process.env.NODE_ENV!=="production"?Si.reduce((e,t)=>(e[t]=ur,e),{}):{};Ne.filterProps=Si;process.env.NODE_ENV!=="production"&&pp.reduce((e,t)=>(e[t]=ur,e),{});function Ci(...e){const t=e.reduce((n,i)=>(i.filterProps.forEach(a=>{n[a]=i}),n),{}),r=n=>Object.keys(n).reduce((i,a)=>t[a]?yn(i,t[a](n)):i,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,i)=>Object.assign(n,i.propTypes),{}):{},r.filterProps=e.reduce((n,i)=>n.concat(i.filterProps),[]),r}function bt(e){return typeof e!="number"?e:`${e}px solid`}function Ct(e,t){return Ue({prop:e,themeKey:"borders",transform:t})}const hp=Ct("border",bt),mp=Ct("borderTop",bt),yp=Ct("borderRight",bt),gp=Ct("borderBottom",bt),xp=Ct("borderLeft",bt),vp=Ct("borderColor"),bp=Ct("borderTopColor"),wp=Ct("borderRightColor"),Sp=Ct("borderBottomColor"),Cp=Ct("borderLeftColor"),Ep=Ct("outline",bt),kp=Ct("outlineColor"),Ei=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=jn(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:On(t,n)});return Ut(e,e.borderRadius,r)}return null};Ei.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:ur}:{};Ei.filterProps=["borderRadius"];Ci(hp,mp,yp,gp,xp,vp,bp,wp,Sp,Cp,Ei,Ep,kp);const ki=e=>{if(e.gap!==void 0&&e.gap!==null){const t=jn(e.theme,"spacing",8,"gap"),r=n=>({gap:On(t,n)});return Ut(e,e.gap,r)}return null};ki.propTypes=process.env.NODE_ENV!=="production"?{gap:ur}:{};ki.filterProps=["gap"];const Ti=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=jn(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:On(t,n)});return Ut(e,e.columnGap,r)}return null};Ti.propTypes=process.env.NODE_ENV!=="production"?{columnGap:ur}:{};Ti.filterProps=["columnGap"];const ji=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=jn(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:On(t,n)});return Ut(e,e.rowGap,r)}return null};ji.propTypes=process.env.NODE_ENV!=="production"?{rowGap:ur}:{};ji.filterProps=["rowGap"];const Tp=Ue({prop:"gridColumn"}),jp=Ue({prop:"gridRow"}),Op=Ue({prop:"gridAutoFlow"}),Fp=Ue({prop:"gridAutoColumns"}),Ap=Ue({prop:"gridAutoRows"}),_p=Ue({prop:"gridTemplateColumns"}),Rp=Ue({prop:"gridTemplateRows"}),$p=Ue({prop:"gridTemplateAreas"}),Dp=Ue({prop:"gridArea"});Ci(ki,Ti,ji,Tp,jp,Op,Fp,Ap,_p,Rp,$p,Dp);function Ur(e,t){return t==="grey"?t:e}const Pp=Ue({prop:"color",themeKey:"palette",transform:Ur}),Mp=Ue({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ur}),Ip=Ue({prop:"backgroundColor",themeKey:"palette",transform:Ur});Ci(Pp,Mp,Ip);function dt(e){return e<=1&&e!==0?`${e*100}%`:e}const zp=Ue({prop:"width",transform:dt}),Ha=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var i,a,s,o,l;const n=((s=(a=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:a.values)==null?void 0:s[r])||vi[r];return n?((l=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:dt(r)}};return Ut(e,e.maxWidth,t)}return null};Ha.filterProps=["maxWidth"];const Vp=Ue({prop:"minWidth",transform:dt}),Bp=Ue({prop:"height",transform:dt}),Np=Ue({prop:"maxHeight",transform:dt}),Lp=Ue({prop:"minHeight",transform:dt});Ue({prop:"size",cssProperty:"width",transform:dt});Ue({prop:"size",cssProperty:"height",transform:dt});const qp=Ue({prop:"boxSizing"});Ci(zp,Ha,Vp,Bp,Np,Lp,qp);const Fn={border:{themeKey:"borders",transform:bt},borderTop:{themeKey:"borders",transform:bt},borderRight:{themeKey:"borders",transform:bt},borderBottom:{themeKey:"borders",transform:bt},borderLeft:{themeKey:"borders",transform:bt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:bt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ei},color:{themeKey:"palette",transform:Ur},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ur},backgroundColor:{themeKey:"palette",transform:Ur},p:{style:Ne},pt:{style:Ne},pr:{style:Ne},pb:{style:Ne},pl:{style:Ne},px:{style:Ne},py:{style:Ne},padding:{style:Ne},paddingTop:{style:Ne},paddingRight:{style:Ne},paddingBottom:{style:Ne},paddingLeft:{style:Ne},paddingX:{style:Ne},paddingY:{style:Ne},paddingInline:{style:Ne},paddingInlineStart:{style:Ne},paddingInlineEnd:{style:Ne},paddingBlock:{style:Ne},paddingBlockStart:{style:Ne},paddingBlockEnd:{style:Ne},m:{style:Be},mt:{style:Be},mr:{style:Be},mb:{style:Be},ml:{style:Be},mx:{style:Be},my:{style:Be},margin:{style:Be},marginTop:{style:Be},marginRight:{style:Be},marginBottom:{style:Be},marginLeft:{style:Be},marginX:{style:Be},marginY:{style:Be},marginInline:{style:Be},marginInlineStart:{style:Be},marginInlineEnd:{style:Be},marginBlock:{style:Be},marginBlockStart:{style:Be},marginBlockEnd:{style:Be},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:ki},rowGap:{style:ji},columnGap:{style:Ti},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:dt},maxWidth:{style:Ha},minWidth:{transform:dt},height:{transform:dt},maxHeight:{transform:dt},minHeight:{transform:dt},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function Wp(...e){const t=e.reduce((n,i)=>n.concat(Object.keys(i)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function Up(e,t){return typeof e=="function"?e(t):e}function Hp(){function e(r,n,i,a){const s={[r]:n,theme:i},o=a[r];if(!o)return{[r]:n};const{cssProperty:l=r,themeKey:d,transform:f,style:p}=o;if(n==null)return null;if(d==="typography"&&n==="inherit")return{[r]:n};const m=bi(i,d)||{};return p?p(s):Ut(s,n,T=>{let h=ri(m,f,T);return T===h&&typeof T=="string"&&(h=ri(m,f,`${r}${T==="default"?"":ze(T)}`,T)),l===!1?h:{[l]:h}})}function t(r){const{sx:n,theme:i={}}=r||{};if(!n)return null;const a=i.unstable_sxConfig??Fn;function s(o){let l=o;if(typeof o=="function")l=o(i);else if(typeof o!="object")return o;if(!l)return null;const d=ap(i.breakpoints),f=Object.keys(d);let p=d;return Object.keys(l).forEach(m=>{const y=Up(l[m],i);if(y!=null)if(typeof y=="object")if(a[m])p=yn(p,e(m,y,i,a));else{const T=Ut({theme:i},y,h=>({[m]:h}));Wp(T,y)?p[m]=t({sx:y,theme:i}):p=yn(p,T)}else p=yn(p,e(m,y,i,a))}),ep(i,sp(f,p))}return Array.isArray(n)?n.map(s):s(n)}return t}const an=Hp();an.filterProps=["sx"];const Kp=e=>{var n;const t={systemProps:{},otherProps:{}},r=((n=e==null?void 0:e.theme)==null?void 0:n.unstable_sxConfig)??Fn;return Object.keys(e).forEach(i=>{r[i]?t.systemProps[i]=e[i]:t.otherProps[i]=e[i]}),t};function Gp(e){const{sx:t,...r}=e,{systemProps:n,otherProps:i}=Kp(r);let a;return Array.isArray(t)?a=[n,...t]:typeof t=="function"?a=(...s)=>{const o=t(...s);return Mt(o)?{...n,...o}:n}:a={...n,...t},{...i,sx:a}}function Qp(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Yp={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Zp(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Xp=/[A-Z]|^ms/g,Jp=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Al=function(t){return t.charCodeAt(1)===45},Ks=function(t){return t!=null&&typeof t!="boolean"},Ki=Zp(function(e){return Al(e)?e:e.replace(Xp,"-$&").toLowerCase()}),Gs=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Jp,function(n,i,a){return ar={name:i,styles:a,next:ar},i})}return Yp[t]!==1&&!Al(t)&&typeof r=="number"&&r!==0?r+"px":r};function ni(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var i=r;if(i.anim===1)return ar={name:i.name,styles:i.styles,next:ar},i.name;var a=r;if(a.styles!==void 0){var s=a.next;if(s!==void 0)for(;s!==void 0;)ar={name:s.name,styles:s.styles,next:ar},s=s.next;var o=a.styles+";";return o}return ed(e,t,r)}}var l=r;return l}function ed(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=ni(e,t,r[i])+";";else for(var a in r){var s=r[a];if(typeof s!="object"){var o=s;Ks(o)&&(n+=Ki(a)+":"+Gs(a,o)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&t==null)for(var l=0;l<s.length;l++)Ks(s[l])&&(n+=Ki(a)+":"+Gs(a,s[l])+";");else{var d=ni(e,t,s);switch(a){case"animation":case"animationName":{n+=Ki(a)+":"+d+";";break}default:n+=a+"{"+d+"}"}}}return n}var Qs=/label:\s*([^\s;{]+)\s*(;|$)/g,ar;function td(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,i="";ar=void 0;var a=e[0];if(a==null||a.raw===void 0)n=!1,i+=ni(r,t,a);else{var s=a;i+=s[0]}for(var o=1;o<e.length;o++)if(i+=ni(r,t,e[o]),n){var l=a;i+=l[o]}Qs.lastIndex=0;for(var d="",f;(f=Qs.exec(i))!==null;)d+="-"+f[1];var p=Qp(i)+d;return{name:p,styles:i,next:ar}}/**
|
|
40
|
+
`)),()=>{})}function Ga(e){return _n(e,"spacing",8,"spacing")}function Rn(e,t){return typeof t=="string"||t==null?t:e(t)}function wp(e,t){return r=>e.reduce((n,i)=>(n[i]=Rn(t,r),n),{})}function Sp(e,t,r,n){if(!t.includes(r))return null;const i=vp(r),a=wp(i,n),s=e[r];return Kt(e,s,a)}function Il(e,t){const r=Ga(e.theme);return Object.keys(e).map(n=>Sp(e,t,n,r)).reduce(bn,{})}function Ve(e){return Il(e,Ei)}Ve.propTypes=process.env.NODE_ENV!=="production"?Ei.reduce((e,t)=>(e[t]=fr,e),{}):{};Ve.filterProps=Ei;function Ne(e){return Il(e,ki)}Ne.propTypes=process.env.NODE_ENV!=="production"?ki.reduce((e,t)=>(e[t]=fr,e),{}):{};Ne.filterProps=ki;process.env.NODE_ENV!=="production"&&bp.reduce((e,t)=>(e[t]=fr,e),{});function Ti(...e){const t=e.reduce((n,i)=>(i.filterProps.forEach(a=>{n[a]=i}),n),{}),r=n=>Object.keys(n).reduce((i,a)=>t[a]?bn(i,t[a](n)):i,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,i)=>Object.assign(n,i.propTypes),{}):{},r.filterProps=e.reduce((n,i)=>n.concat(i.filterProps),[]),r}function St(e){return typeof e!="number"?e:`${e}px solid`}function kt(e,t){return Ue({prop:e,themeKey:"borders",transform:t})}const Cp=kt("border",St),Ep=kt("borderTop",St),kp=kt("borderRight",St),Tp=kt("borderBottom",St),jp=kt("borderLeft",St),Fp=kt("borderColor"),Op=kt("borderTopColor"),Ap=kt("borderRightColor"),_p=kt("borderBottomColor"),Rp=kt("borderLeftColor"),$p=kt("outline",St),Pp=kt("outlineColor"),ji=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=_n(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:Rn(t,n)});return Kt(e,e.borderRadius,r)}return null};ji.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:fr}:{};ji.filterProps=["borderRadius"];Ti(Cp,Ep,kp,Tp,jp,Fp,Op,Ap,_p,Rp,ji,$p,Pp);const Fi=e=>{if(e.gap!==void 0&&e.gap!==null){const t=_n(e.theme,"spacing",8,"gap"),r=n=>({gap:Rn(t,n)});return Kt(e,e.gap,r)}return null};Fi.propTypes=process.env.NODE_ENV!=="production"?{gap:fr}:{};Fi.filterProps=["gap"];const Oi=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=_n(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:Rn(t,n)});return Kt(e,e.columnGap,r)}return null};Oi.propTypes=process.env.NODE_ENV!=="production"?{columnGap:fr}:{};Oi.filterProps=["columnGap"];const Ai=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=_n(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:Rn(t,n)});return Kt(e,e.rowGap,r)}return null};Ai.propTypes=process.env.NODE_ENV!=="production"?{rowGap:fr}:{};Ai.filterProps=["rowGap"];const Dp=Ue({prop:"gridColumn"}),Ip=Ue({prop:"gridRow"}),Mp=Ue({prop:"gridAutoFlow"}),zp=Ue({prop:"gridAutoColumns"}),Bp=Ue({prop:"gridAutoRows"}),Vp=Ue({prop:"gridTemplateColumns"}),Np=Ue({prop:"gridTemplateRows"}),Lp=Ue({prop:"gridTemplateAreas"}),qp=Ue({prop:"gridArea"});Ti(Fi,Oi,Ai,Dp,Ip,Mp,zp,Bp,Vp,Np,Lp,qp);function Yr(e,t){return t==="grey"?t:e}const Wp=Ue({prop:"color",themeKey:"palette",transform:Yr}),Up=Ue({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Yr}),Hp=Ue({prop:"backgroundColor",themeKey:"palette",transform:Yr});Ti(Wp,Up,Hp);function ht(e){return e<=1&&e!==0?`${e*100}%`:e}const Kp=Ue({prop:"width",transform:ht}),Qa=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var i,a,s,o,l;const n=((s=(a=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:a.values)==null?void 0:s[r])||Si[r];return n?((l=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:ht(r)}};return Kt(e,e.maxWidth,t)}return null};Qa.filterProps=["maxWidth"];const Yp=Ue({prop:"minWidth",transform:ht}),Gp=Ue({prop:"height",transform:ht}),Qp=Ue({prop:"maxHeight",transform:ht}),Zp=Ue({prop:"minHeight",transform:ht});Ue({prop:"size",cssProperty:"width",transform:ht});Ue({prop:"size",cssProperty:"height",transform:ht});const Xp=Ue({prop:"boxSizing"});Ti(Kp,Qa,Yp,Gp,Qp,Zp,Xp);const $n={border:{themeKey:"borders",transform:St},borderTop:{themeKey:"borders",transform:St},borderRight:{themeKey:"borders",transform:St},borderBottom:{themeKey:"borders",transform:St},borderLeft:{themeKey:"borders",transform:St},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:St},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:ji},color:{themeKey:"palette",transform:Yr},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Yr},backgroundColor:{themeKey:"palette",transform:Yr},p:{style:Ne},pt:{style:Ne},pr:{style:Ne},pb:{style:Ne},pl:{style:Ne},px:{style:Ne},py:{style:Ne},padding:{style:Ne},paddingTop:{style:Ne},paddingRight:{style:Ne},paddingBottom:{style:Ne},paddingLeft:{style:Ne},paddingX:{style:Ne},paddingY:{style:Ne},paddingInline:{style:Ne},paddingInlineStart:{style:Ne},paddingInlineEnd:{style:Ne},paddingBlock:{style:Ne},paddingBlockStart:{style:Ne},paddingBlockEnd:{style:Ne},m:{style:Ve},mt:{style:Ve},mr:{style:Ve},mb:{style:Ve},ml:{style:Ve},mx:{style:Ve},my:{style:Ve},margin:{style:Ve},marginTop:{style:Ve},marginRight:{style:Ve},marginBottom:{style:Ve},marginLeft:{style:Ve},marginX:{style:Ve},marginY:{style:Ve},marginInline:{style:Ve},marginInlineStart:{style:Ve},marginInlineEnd:{style:Ve},marginBlock:{style:Ve},marginBlockStart:{style:Ve},marginBlockEnd:{style:Ve},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Fi},rowGap:{style:Ai},columnGap:{style:Oi},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:ht},maxWidth:{style:Qa},minWidth:{transform:ht},height:{transform:ht},maxHeight:{transform:ht},minHeight:{transform:ht},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function Jp(...e){const t=e.reduce((n,i)=>n.concat(Object.keys(i)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function ed(e,t){return typeof e=="function"?e(t):e}function td(){function e(r,n,i,a){const s={[r]:n,theme:i},o=a[r];if(!o)return{[r]:n};const{cssProperty:l=r,themeKey:d,transform:h,style:f}=o;if(n==null)return null;if(d==="typography"&&n==="inherit")return{[r]:n};const u=Ci(i,d)||{};return f?f(s):Kt(s,n,k=>{let m=ai(u,h,k);return k===m&&typeof k=="string"&&(m=ai(u,h,`${r}${k==="default"?"":ze(k)}`,k)),l===!1?m:{[l]:m}})}function t(r){const{sx:n,theme:i={}}=r||{};if(!n)return null;const a=i.unstable_sxConfig??$n;function s(o){let l=o;if(typeof o=="function")l=o(i);else if(typeof o!="object")return o;if(!l)return null;const d=hp(i.breakpoints),h=Object.keys(d);let f=d;return Object.keys(l).forEach(u=>{const g=ed(l[u],i);if(g!=null)if(typeof g=="object")if(a[u])f=bn(f,e(u,g,i,a));else{const k=Kt({theme:i},g,m=>({[u]:m}));Jp(k,g)?f[u]=t({sx:g,theme:i}):f=bn(f,k)}else f=bn(f,e(u,g,i,a))}),cp(i,mp(h,f))}return Array.isArray(n)?n.map(s):s(n)}return t}const ln=td();ln.filterProps=["sx"];const rd=e=>{var n;const t={systemProps:{},otherProps:{}},r=((n=e==null?void 0:e.theme)==null?void 0:n.unstable_sxConfig)??$n;return Object.keys(e).forEach(i=>{r[i]?t.systemProps[i]=e[i]:t.otherProps[i]=e[i]}),t};function nd(e){const{sx:t,...r}=e,{systemProps:n,otherProps:i}=rd(r);let a;return Array.isArray(t)?a=[n,...t]:typeof t=="function"?a=(...s)=>{const o=t(...s);return Mt(o)?{...n,...o}:n}:a={...n,...t},{...i,sx:a}}function id(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var ad={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function sd(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var od=/[A-Z]|^ms/g,ld=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ml=function(t){return t.charCodeAt(1)===45},eo=function(t){return t!=null&&typeof t!="boolean"},Qi=sd(function(e){return Ml(e)?e:e.replace(od,"-$&").toLowerCase()}),to=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(ld,function(n,i,a){return lr={name:i,styles:a,next:lr},i})}return ad[t]!==1&&!Ml(t)&&typeof r=="number"&&r!==0?r+"px":r};function si(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var i=r;if(i.anim===1)return lr={name:i.name,styles:i.styles,next:lr},i.name;var a=r;if(a.styles!==void 0){var s=a.next;if(s!==void 0)for(;s!==void 0;)lr={name:s.name,styles:s.styles,next:lr},s=s.next;var o=a.styles+";";return o}return cd(e,t,r)}}var l=r;return l}function cd(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=si(e,t,r[i])+";";else for(var a in r){var s=r[a];if(typeof s!="object"){var o=s;eo(o)&&(n+=Qi(a)+":"+to(a,o)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&t==null)for(var l=0;l<s.length;l++)eo(s[l])&&(n+=Qi(a)+":"+to(a,s[l])+";");else{var d=si(e,t,s);switch(a){case"animation":case"animationName":{n+=Qi(a)+":"+d+";";break}default:n+=a+"{"+d+"}"}}}return n}var ro=/label:\s*([^\s;{]+)\s*(;|$)/g,lr;function ud(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,i="";lr=void 0;var a=e[0];if(a==null||a.raw===void 0)n=!1,i+=si(r,t,a);else{var s=a;i+=s[0]}for(var o=1;o<e.length;o++)if(i+=si(r,t,e[o]),n){var l=a;i+=l[o]}ro.lastIndex=0;for(var d="",h;(h=ro.exec(i))!==null;)d+="-"+h[1];var f=id(i)+d;return{name:f,styles:i,next:lr}}/**
|
|
41
41
|
* @mui/styled-engine v7.1.1
|
|
42
42
|
*
|
|
43
43
|
* @license MIT
|
|
44
44
|
* This source code is licensed under the MIT license found in the
|
|
45
45
|
* LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/function
|
|
47
|
-
`)):n.some(a=>a===void 0)&&console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`),r(...n)}:r}function
|
|
48
|
-
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:
|
|
49
|
-
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:
|
|
50
|
-
`))}return
|
|
51
|
-
The color object needs to have a \`main\` property or a \`${v}\` property.`:
|
|
52
|
-
\`color.main\` should be a string, but \`${JSON.stringify(
|
|
46
|
+
*/function pd(e,t){const r=Kc(e,t);return process.env.NODE_ENV!=="production"?(...n)=>{const i=typeof e=="string"?`"${e}"`:"component";return n.length===0?console.error([`MUI: Seems like you called \`styled(${i})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
47
|
+
`)):n.some(a=>a===void 0)&&console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`),r(...n)}:r}function dd(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const no=[];function io(e){return no[0]=e,ud(no)}const fd=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>({...r,[n.key]:n.val}),{})};function hd(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...i}=e,a=fd(t),s=Object.keys(a);function o(u){return`@media (min-width:${typeof t[u]=="number"?t[u]:u}${r})`}function l(u){return`@media (max-width:${(typeof t[u]=="number"?t[u]:u)-n/100}${r})`}function d(u,g){const k=s.indexOf(g);return`@media (min-width:${typeof t[u]=="number"?t[u]:u}${r}) and (max-width:${(k!==-1&&typeof t[s[k]]=="number"?t[s[k]]:g)-n/100}${r})`}function h(u){return s.indexOf(u)+1<s.length?d(u,s[s.indexOf(u)+1]):o(u)}function f(u){const g=s.indexOf(u);return g===0?o(s[1]):g===s.length-1?l(s[g]):d(u,s[s.indexOf(u)+1]).replace("@media","@media not all and")}return{keys:s,values:a,up:o,down:l,between:d,only:h,not:f,unit:r,...i}}const md={borderRadius:4};function zl(e=8,t=Ga({spacing:e})){if(e.mui)return e;const r=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(a=>{const s=t(a);return typeof s=="number"?`${s}px`:s}).join(" "));return r.mui=!0,r}function xd(e,t){var n;const r=this;if(r.vars){if(!((n=r.colorSchemes)!=null&&n[e])||typeof r.getColorSchemeSelector!="function")return{};let i=r.getColorSchemeSelector(e);return i==="&"?t:((i.includes("data-")||i.includes("."))&&(i=`*:where(${i.replace(/\s*&$/,"")}) &`),{[i]:t})}return r.palette.mode===e?t:{}}function Bl(e={},...t){const{breakpoints:r={},palette:n={},spacing:i,shape:a={},...s}=e,o=hd(r),l=zl(i);let d=mt({breakpoints:o,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:l,shape:{...md,...a}},s);return d=dp(d),d.applyStyles=xd,d=t.reduce((h,f)=>mt(h,f),d),d.unstable_sxConfig={...$n,...s==null?void 0:s.unstable_sxConfig},d.unstable_sx=function(f){return ln({sx:f,theme:this})},d}const ao=e=>e,gd=()=>{let e=ao;return{configure(t){e=t},generate(t){return e(t)},reset(){e=ao}}},yd=gd(),vd={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 hr(e,t,r="Mui"){const n=vd[t];return n?`${r}-${n}`:`${yd.generate(e)}-${t}`}function Dr(e,t,r="Mui"){const n={};return t.forEach(i=>{n[i]=hr(e,i,r)}),n}function Vl(e,t=""){return e.displayName||e.name||t}function so(e,t,r){const n=Vl(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function bd(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Vl(e,"Component");if(typeof e=="object")switch(e.$$typeof){case ii.ForwardRef:return so(e,e.render,"ForwardRef");case ii.Memo:return so(e,e.type,"memo");default:return}}}function Nl(e){const{variants:t,...r}=e,n={variants:t,style:io(r),isProcessed:!0};return n.style===r||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=io(i.style))}),n}const wd=Bl();function Zi(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Sd(e){return e?(t,r)=>r[e]:null}function Cd(e,t,r){e.theme=jd(e.theme)?r:e.theme[t]||e.theme}function Kn(e,t){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>Kn(e,n));if(Array.isArray(r==null?void 0:r.variants)){let n;if(r.isProcessed)n=r.style;else{const{variants:i,...a}=r;n=a}return Ll(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function Ll(e,t,r=[]){var i;let n;e:for(let a=0;a<t.length;a+=1){const s=t[a];if(typeof s.props=="function"){if(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),!s.props(n))continue}else for(const o in s.props)if(e[o]!==s.props[o]&&((i=e.ownerState)==null?void 0:i[o])!==s.props[o])continue e;typeof s.style=="function"?(n??(n={...e,...e.ownerState,ownerState:e.ownerState}),r.push(s.style(n))):r.push(s.style)}return r}function Ed(e={}){const{themeId:t,defaultTheme:r=wd,rootShouldForwardProp:n=Zi,slotShouldForwardProp:i=Zi}=e;function a(o){Cd(o,t,r)}return(o,l={})=>{dd(o,C=>C.filter($=>$!==ln));const{name:d,slot:h,skipVariantsResolver:f,skipSx:u,overridesResolver:g=Sd(ql(h)),...k}=l,m=f!==void 0?f:h&&h!=="Root"&&h!=="root"||!1,b=u||!1;let v=Zi;h==="Root"||h==="root"?v=n:h?v=i:Fd(o)&&(v=void 0);const w=pd(o,{shouldForwardProp:v,label:Td(d,h),...k}),P=C=>{if(C.__emotion_real===C)return C;if(typeof C=="function")return function(B){return Kn(B,C)};if(Mt(C)){const $=Nl(C);return $.variants?function(A){return Kn(A,$)}:$.style}return C},T=(...C)=>{const $=[],B=C.map(P),A=[];if($.push(a),d&&g&&A.push(function(z){var ne,me;const N=(me=(ne=z.theme.components)==null?void 0:ne[d])==null?void 0:me.styleOverrides;if(!N)return null;const K={};for(const ue in N)K[ue]=Kn(z,N[ue]);return g(z,K)}),d&&!m&&A.push(function(z){var K,ne;const O=z.theme,N=(ne=(K=O==null?void 0:O.components)==null?void 0:K[d])==null?void 0:ne.variants;return N?Ll(z,N):null}),b||A.push(ln),Array.isArray(B[0])){const _=B.shift(),z=new Array($.length).fill(""),O=new Array(A.length).fill("");let N;N=[...z,..._,...O],N.raw=[...z,..._.raw,...O],$.unshift(N)}const I=[...$,...B,...A],p=w(...I);return o.muiName&&(p.muiName=o.muiName),process.env.NODE_ENV!=="production"&&(p.displayName=kd(d,h,o)),p};return w.withConfig&&(T.withConfig=w.withConfig),T}}function kd(e,t,r){return e?`${e}${ze(t||"")}`:`Styled(${bd(r)})`}function Td(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${ql(t||"Root")}`),r}function jd(e){for(const t in e)return!1;return!0}function Fd(e){return typeof e=="string"&&e.charCodeAt(0)>96}function ql(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Ea(e,t){const r={...t};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const i=n;if(i==="components"||i==="slots")r[i]={...e[i],...r[i]};else if(i==="componentsProps"||i==="slotProps"){const a=e[i],s=t[i];if(!s)r[i]=a||{};else if(!a)r[i]=s;else{r[i]={...s};for(const o in a)if(Object.prototype.hasOwnProperty.call(a,o)){const l=o;r[i][l]=Ea(a[l],s[l])}}}else r[i]===void 0&&(r[i]=e[i])}return r}const Od=typeof window<"u"?ae.useLayoutEffect:ae.useEffect;function Ad(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function Za(e,t=0,r=1){return process.env.NODE_ENV!=="production"&&(e<t||e>r)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${r}].`),Ad(e,t,r)}function _d(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),r?`rgb${r.length===4?"a":""}(${r.map((n,i)=>i<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function dr(e){if(e.type)return e;if(e.charAt(0)==="#")return dr(_d(e));const t=e.indexOf("("),r=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
|
|
48
|
+
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:pr(9,e));let n=e.substring(t+1,e.length-1),i;if(r==="color"){if(n=n.split(" "),i=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(i))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${i}\` color space.
|
|
49
|
+
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:pr(10,i))}else n=n.split(",");return n=n.map(a=>parseFloat(a)),{type:r,values:n,colorSpace:i}}const Rd=e=>{const t=dr(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},xn=(e,t)=>{try{return Rd(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function _i(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((i,a)=>a<3?parseInt(i,10):i):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function Wl(e){e=dr(e);const{values:t}=e,r=t[0],n=t[1]/100,i=t[2]/100,a=n*Math.min(i,1-i),s=(d,h=(d+r/30)%12)=>i-a*Math.max(Math.min(h-3,9-h,1),-1);let o="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(o+="a",l.push(t[3])),_i({type:o,values:l})}function ka(e){e=dr(e);let t=e.type==="hsl"||e.type==="hsla"?dr(Wl(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function oo(e,t){const r=ka(e),n=ka(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function Et(e,t){return e=dr(e),t=Za(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,_i(e)}function Vn(e,t,r){try{return Et(e,t)}catch{return e}}function Xa(e,t){if(e=dr(e),t=Za(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return _i(e)}function Ae(e,t,r){try{return Xa(e,t)}catch{return e}}function Ja(e,t){if(e=dr(e),t=Za(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return _i(e)}function _e(e,t,r){try{return Ja(e,t)}catch{return e}}function $d(e,t=.15){return ka(e)>.5?Xa(e,t):Ja(e,t)}function Nn(e,t,r){try{return $d(e,t)}catch{return e}}const Pd=ae.createContext(void 0);process.env.NODE_ENV!=="production"&&(j.node,j.object);function Dd(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const i=t.components[r];return i.defaultProps?Ea(i.defaultProps,n):!i.styleOverrides&&!i.variants?Ea(i,n):n}function Id({props:e,name:t}){const r=ae.useContext(Pd);return Dd({props:e,name:t,theme:{components:r}})}const lo={theme:void 0};function Md(e){let t,r;return function(i){let a=t;return(a===void 0||i.theme!==r)&&(lo.theme=i.theme,a=Nl(e(lo)),t=a,r=i.theme),a}}function zd(e=""){function t(...n){if(!n.length)return"";const i=n[0];return typeof i=="string"&&!i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${i}${t(...n.slice(1))})`:`, ${i}`}return(n,...i)=>`var(--${e?`${e}-`:""}${n}${t(...i)})`}const co=(e,t,r,n=[])=>{let i=e;t.forEach((a,s)=>{s===t.length-1?Array.isArray(i)?i[Number(a)]=r:i&&typeof i=="object"&&(i[a]=r):i&&typeof i=="object"&&(i[a]||(i[a]=n.includes(a)?[]:{}),i=i[a])})},Bd=(e,t,r)=>{function n(i,a=[],s=[]){Object.entries(i).forEach(([o,l])=>{(!r||r&&!r([...a,o]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?n(l,[...a,o],Array.isArray(l)?[...s,o]:s):t([...a,o],l,s))})}n(e)},Vd=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>e.includes(n))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Xi(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},i={},a={},s={};return Bd(e,(o,l,d)=>{if((typeof l=="string"||typeof l=="number")&&(!n||!n(o,l))){const h=`--${r?`${r}-`:""}${o.join("-")}`,f=Vd(o,l);Object.assign(i,{[h]:f}),co(a,o,`var(${h})`,d),co(s,o,`var(${h}, ${f})`,d)}},o=>o[0]==="vars"),{css:i,vars:a,varsWithDefaults:s}}function Nd(e,t={}){const{getSelector:r=b,disableCssColorScheme:n,colorSchemeSelector:i}=t,{colorSchemes:a={},components:s,defaultColorScheme:o="light",...l}=e,{vars:d,css:h,varsWithDefaults:f}=Xi(l,t);let u=f;const g={},{[o]:k,...m}=a;if(Object.entries(m||{}).forEach(([P,T])=>{const{vars:C,css:$,varsWithDefaults:B}=Xi(T,t);u=mt(u,B),g[P]={css:$,vars:C}}),k){const{css:P,vars:T,varsWithDefaults:C}=Xi(k,t);u=mt(u,C),g[o]={css:P,vars:T}}function b(P,T){var $,B;let C=i;if(i==="class"&&(C=".%s"),i==="data"&&(C="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(C=`[${i}="%s"]`),P){if(C==="media")return e.defaultColorScheme===P?":root":{[`@media (prefers-color-scheme: ${((B=($=a[P])==null?void 0:$.palette)==null?void 0:B.mode)||P})`]:{":root":T}};if(C)return e.defaultColorScheme===P?`:root, ${C.replace("%s",String(P))}`:C.replace("%s",String(P))}return":root"}return{vars:u,generateThemeVars:()=>{let P={...d};return Object.entries(g).forEach(([,{vars:T}])=>{P=mt(P,T)}),P},generateStyleSheets:()=>{var A,I;const P=[],T=e.defaultColorScheme||"light";function C(p,_){Object.keys(_).length&&P.push(typeof p=="string"?{[p]:{..._}}:p)}C(r(void 0,{...h}),h);const{[T]:$,...B}=g;if($){const{css:p}=$,_=(I=(A=a[T])==null?void 0:A.palette)==null?void 0:I.mode,z=!n&&_?{colorScheme:_,...p}:{...p};C(r(T,{...z}),z)}return Object.entries(B).forEach(([p,{css:_}])=>{var N,K;const z=(K=(N=a[p])==null?void 0:N.palette)==null?void 0:K.mode,O=!n&&z?{colorScheme:z,..._}:{..._};C(r(p,{...O}),O)}),P}}}function Ld(e){return function(r){return e==="media"?(process.env.NODE_ENV!=="production"&&r!=="light"&&r!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${r}'.`),`@media (prefers-color-scheme: ${r})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${r}"] &`:e==="class"?`.${r} &`:e==="data"?`[data-${r}] &`:`${e.replace("%s",r)} &`:"&"}}const Cn={black:"#000",white:"#fff"},qd={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Br={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Vr={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},hn={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Nr={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Lr={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},qr={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Ul(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Cn.white,default:Cn.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Wd=Ul();function Hl(){return{text:{primary:Cn.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Cn.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const uo=Hl();function po(e,t,r,n){const i=n.light||n,a=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=Ja(e.main,i):t==="dark"&&(e.dark=Xa(e.main,a)))}function Ud(e="light"){return e==="dark"?{main:Nr[200],light:Nr[50],dark:Nr[400]}:{main:Nr[700],light:Nr[400],dark:Nr[800]}}function Hd(e="light"){return e==="dark"?{main:Br[200],light:Br[50],dark:Br[400]}:{main:Br[500],light:Br[300],dark:Br[700]}}function Kd(e="light"){return e==="dark"?{main:Vr[500],light:Vr[300],dark:Vr[700]}:{main:Vr[700],light:Vr[400],dark:Vr[800]}}function Yd(e="light"){return e==="dark"?{main:Lr[400],light:Lr[300],dark:Lr[700]}:{main:Lr[700],light:Lr[500],dark:Lr[900]}}function Gd(e="light"){return e==="dark"?{main:qr[400],light:qr[300],dark:qr[700]}:{main:qr[800],light:qr[500],dark:qr[900]}}function Qd(e="light"){return e==="dark"?{main:hn[400],light:hn[300],dark:hn[700]}:{main:"#ed6c02",light:hn[500],dark:hn[900]}}function es(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...i}=e,a=e.primary||Ud(t),s=e.secondary||Hd(t),o=e.error||Kd(t),l=e.info||Yd(t),d=e.success||Gd(t),h=e.warning||Qd(t);function f(m){const b=oo(m,uo.text.primary)>=r?uo.text.primary:Wd.text.primary;if(process.env.NODE_ENV!=="production"){const v=oo(m,b);v<3&&console.error([`MUI: The contrast ratio of ${v}:1 for ${b} on ${m}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
|
|
50
|
+
`))}return b}const u=({color:m,name:b,mainShade:v=500,lightShade:w=300,darkShade:P=700})=>{if(m={...m},!m.main&&m[v]&&(m.main=m[v]),!m.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
|
|
51
|
+
The color object needs to have a \`main\` property or a \`${v}\` property.`:pr(11,b?` (${b})`:"",v));if(typeof m.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid.
|
|
52
|
+
\`color.main\` should be a string, but \`${JSON.stringify(m.main)}\` was provided instead.
|
|
53
53
|
|
|
54
54
|
Did you intend to use one of the following approaches?
|
|
55
55
|
|
|
@@ -61,18 +61,18 @@ const theme1 = createTheme({ palette: {
|
|
|
61
61
|
|
|
62
62
|
const theme2 = createTheme({ palette: {
|
|
63
63
|
primary: { main: green[500] },
|
|
64
|
-
} });`:
|
|
65
|
-
`)),Object.keys(d).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(d).join(",")}].`)}return(Array.isArray(i)?i:[i]).map(
|
|
64
|
+
} });`:pr(12,b?` (${b})`:"",JSON.stringify(m.main)));return po(m,"light",w,n),po(m,"dark",P,n),m.contrastText||(m.contrastText=f(m.main)),m};let g;return t==="light"?g=Ul():t==="dark"&&(g=Hl()),process.env.NODE_ENV!=="production"&&(g||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),mt({common:{...Cn},mode:t,primary:u({color:a,name:"primary"}),secondary:u({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:u({color:o,name:"error"}),warning:u({color:h,name:"warning"}),info:u({color:l,name:"info"}),success:u({color:d,name:"success"}),grey:qd,contrastThreshold:r,getContrastText:f,augmentColor:u,tonalOffset:n,...g},i)}function Zd(e){const t={};return Object.entries(e).forEach(n=>{const[i,a]=n;typeof a=="object"&&(t[i]=`${a.fontStyle?`${a.fontStyle} `:""}${a.fontVariant?`${a.fontVariant} `:""}${a.fontWeight?`${a.fontWeight} `:""}${a.fontStretch?`${a.fontStretch} `:""}${a.fontSize||""}${a.lineHeight?`/${a.lineHeight} `:""}${a.fontFamily||""}`)}),t}function Xd(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function Jd(e){return Math.round(e*1e5)/1e5}const fo={textTransform:"uppercase"},ho='"Roboto", "Helvetica", "Arial", sans-serif';function ef(e,t){const{fontFamily:r=ho,fontSize:n=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:s=500,fontWeightBold:o=700,htmlFontSize:l=16,allVariants:d,pxToRem:h,...f}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof n!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof l!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const u=n/14,g=h||(b=>`${b/l*u}rem`),k=(b,v,w,P,T)=>({fontFamily:r,fontWeight:b,fontSize:g(v),lineHeight:w,...r===ho?{letterSpacing:`${Jd(P/v)}em`}:{},...T,...d}),m={h1:k(i,96,1.167,-1.5),h2:k(i,60,1.2,-.5),h3:k(a,48,1.167,0),h4:k(a,34,1.235,.25),h5:k(a,24,1.334,0),h6:k(s,20,1.6,.15),subtitle1:k(a,16,1.75,.15),subtitle2:k(s,14,1.57,.1),body1:k(a,16,1.5,.15),body2:k(a,14,1.43,.15),button:k(s,14,1.75,.4,fo),caption:k(a,12,1.66,.4),overline:k(a,12,2.66,1,fo),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return mt({htmlFontSize:l,pxToRem:g,fontFamily:r,fontSize:n,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:s,fontWeightBold:o,...m},f,{clone:!1})}const tf=.2,rf=.14,nf=.12;function $e(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${tf})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${rf})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${nf})`].join(",")}const af=["none",$e(0,2,1,-1,0,1,1,0,0,1,3,0),$e(0,3,1,-2,0,2,2,0,0,1,5,0),$e(0,3,3,-2,0,3,4,0,0,1,8,0),$e(0,2,4,-1,0,4,5,0,0,1,10,0),$e(0,3,5,-1,0,5,8,0,0,1,14,0),$e(0,3,5,-1,0,6,10,0,0,1,18,0),$e(0,4,5,-2,0,7,10,1,0,2,16,1),$e(0,5,5,-3,0,8,10,1,0,3,14,2),$e(0,5,6,-3,0,9,12,1,0,3,16,2),$e(0,6,6,-3,0,10,14,1,0,4,18,3),$e(0,6,7,-4,0,11,15,1,0,4,20,3),$e(0,7,8,-4,0,12,17,2,0,5,22,4),$e(0,7,8,-4,0,13,19,2,0,5,24,4),$e(0,7,9,-4,0,14,21,2,0,5,26,4),$e(0,8,9,-5,0,15,22,2,0,6,28,5),$e(0,8,10,-5,0,16,24,2,0,6,30,5),$e(0,8,11,-5,0,17,26,2,0,6,32,5),$e(0,9,11,-5,0,18,28,2,0,7,34,6),$e(0,9,12,-6,0,19,29,2,0,7,36,6),$e(0,10,13,-6,0,20,31,3,0,8,38,7),$e(0,10,13,-6,0,21,33,3,0,8,40,7),$e(0,10,14,-6,0,22,35,3,0,8,42,7),$e(0,11,14,-7,0,23,36,3,0,9,44,8),$e(0,11,15,-7,0,24,38,3,0,9,46,8)],sf={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},of={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function mo(e){return`${Math.round(e)}ms`}function lf(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function cf(e){const t={...sf,...e.easing},r={...of,...e.duration};return{getAutoHeightDuration:lf,create:(i=["all"],a={})=>{const{duration:s=r.standard,easing:o=t.easeInOut,delay:l=0,...d}=a;if(process.env.NODE_ENV!=="production"){const h=u=>typeof u=="string",f=u=>!Number.isNaN(parseFloat(u));!h(i)&&!Array.isArray(i)&&console.error('MUI: Argument "props" must be a string or Array.'),!f(s)&&!h(s)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${s}.`),h(o)||console.error('MUI: Argument "easing" must be a string.'),!f(l)&&!h(l)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof a!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
|
|
65
|
+
`)),Object.keys(d).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(d).join(",")}].`)}return(Array.isArray(i)?i:[i]).map(h=>`${h} ${typeof s=="string"?s:mo(s)} ${o} ${typeof l=="string"?l:mo(l)}`).join(",")},...e,easing:t,duration:r}}const uf={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function pf(e){return Mt(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Kl(e={}){const t={...e};function r(n){const i=Object.entries(n);for(let a=0;a<i.length;a++){const[s,o]=i[a];!pf(o)||s.startsWith("unstable_")?delete n[s]:Mt(o)&&(n[s]={...o},r(n[s]))}}return r(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
66
66
|
|
|
67
67
|
const theme = ${JSON.stringify(t,null,2)};
|
|
68
68
|
|
|
69
69
|
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
70
70
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
71
71
|
|
|
72
|
-
export default theme;`}function
|
|
73
|
-
`))}
|
|
74
|
-
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function uf(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const At=e=>{try{return e()}catch{}},pf=(e="mui")=>Fd(e);function Yi(e,t,r,n){if(!t)return;t=t===!0?{}:t;const i=n==="dark"?"dark":"light";if(!r){e[n]=af({...t,palette:{mode:i,...t==null?void 0:t.palette}});return}const{palette:a,...s}=wa({...r,palette:{mode:i,...t==null?void 0:t.palette}});return e[n]={...t,palette:a,opacity:{...Nl(i),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Ll(i)},s}function df(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:i=!1,cssVarPrefix:a="mui",shouldSkipGeneratingVar:s=sf,colorSchemeSelector:o=r.light&&r.dark?"media":void 0,rootSelector:l=":root",...d}=e,f=Object.keys(r)[0],p=n||(r.light&&f!=="light"?"light":f),m=pf(a),{[p]:y,light:T,dark:h,...C}=r,v={...C};let S=y;if((p==="dark"&&!("dark"in r)||p==="light"&&!("light"in r))&&(S=!0),!S)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${p}\` option is either missing or invalid.`:lr(21,p));const P=Yi(v,S,d,p);T&&!v.light&&Yi(v,T,void 0,"light"),h&&!v.dark&&Yi(v,h,void 0,"dark");let w={defaultColorScheme:p,...P,cssVarPrefix:a,colorSchemeSelector:o,rootSelector:l,getCssVar:m,colorSchemes:v,font:{...Ld(P.typography),...P.font},spacing:uf(d.spacing)};Object.keys(w.colorSchemes).forEach(D=>{const u=w.colorSchemes[D].palette,M=N=>{const A=N.split("-"),L=A[1],G=A[2];return m(N,u[L][G])};if(u.mode==="light"&&(V(u.common,"background","#fff"),V(u.common,"onBackground","#000")),u.mode==="dark"&&(V(u.common,"background","#000"),V(u.common,"onBackground","#fff")),cf(u,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),u.mode==="light"){V(u.Alert,"errorColor",Ae(u.error.light,.6)),V(u.Alert,"infoColor",Ae(u.info.light,.6)),V(u.Alert,"successColor",Ae(u.success.light,.6)),V(u.Alert,"warningColor",Ae(u.warning.light,.6)),V(u.Alert,"errorFilledBg",M("palette-error-main")),V(u.Alert,"infoFilledBg",M("palette-info-main")),V(u.Alert,"successFilledBg",M("palette-success-main")),V(u.Alert,"warningFilledBg",M("palette-warning-main")),V(u.Alert,"errorFilledColor",At(()=>u.getContrastText(u.error.main))),V(u.Alert,"infoFilledColor",At(()=>u.getContrastText(u.info.main))),V(u.Alert,"successFilledColor",At(()=>u.getContrastText(u.success.main))),V(u.Alert,"warningFilledColor",At(()=>u.getContrastText(u.warning.main))),V(u.Alert,"errorStandardBg",_e(u.error.light,.9)),V(u.Alert,"infoStandardBg",_e(u.info.light,.9)),V(u.Alert,"successStandardBg",_e(u.success.light,.9)),V(u.Alert,"warningStandardBg",_e(u.warning.light,.9)),V(u.Alert,"errorIconColor",M("palette-error-main")),V(u.Alert,"infoIconColor",M("palette-info-main")),V(u.Alert,"successIconColor",M("palette-success-main")),V(u.Alert,"warningIconColor",M("palette-warning-main")),V(u.AppBar,"defaultBg",M("palette-grey-100")),V(u.Avatar,"defaultBg",M("palette-grey-400")),V(u.Button,"inheritContainedBg",M("palette-grey-300")),V(u.Button,"inheritContainedHoverBg",M("palette-grey-A100")),V(u.Chip,"defaultBorder",M("palette-grey-400")),V(u.Chip,"defaultAvatarColor",M("palette-grey-700")),V(u.Chip,"defaultIconColor",M("palette-grey-700")),V(u.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),V(u.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),V(u.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),V(u.LinearProgress,"primaryBg",_e(u.primary.main,.62)),V(u.LinearProgress,"secondaryBg",_e(u.secondary.main,.62)),V(u.LinearProgress,"errorBg",_e(u.error.main,.62)),V(u.LinearProgress,"infoBg",_e(u.info.main,.62)),V(u.LinearProgress,"successBg",_e(u.success.main,.62)),V(u.LinearProgress,"warningBg",_e(u.warning.main,.62)),V(u.Skeleton,"bg",`rgba(${M("palette-text-primaryChannel")} / 0.11)`),V(u.Slider,"primaryTrack",_e(u.primary.main,.62)),V(u.Slider,"secondaryTrack",_e(u.secondary.main,.62)),V(u.Slider,"errorTrack",_e(u.error.main,.62)),V(u.Slider,"infoTrack",_e(u.info.main,.62)),V(u.Slider,"successTrack",_e(u.success.main,.62)),V(u.Slider,"warningTrack",_e(u.warning.main,.62));const N=In(u.background.default,.8);V(u.SnackbarContent,"bg",N),V(u.SnackbarContent,"color",At(()=>u.getContrastText(N))),V(u.SpeedDialAction,"fabHoverBg",In(u.background.paper,.15)),V(u.StepConnector,"border",M("palette-grey-400")),V(u.StepContent,"border",M("palette-grey-400")),V(u.Switch,"defaultColor",M("palette-common-white")),V(u.Switch,"defaultDisabledColor",M("palette-grey-100")),V(u.Switch,"primaryDisabledColor",_e(u.primary.main,.62)),V(u.Switch,"secondaryDisabledColor",_e(u.secondary.main,.62)),V(u.Switch,"errorDisabledColor",_e(u.error.main,.62)),V(u.Switch,"infoDisabledColor",_e(u.info.main,.62)),V(u.Switch,"successDisabledColor",_e(u.success.main,.62)),V(u.Switch,"warningDisabledColor",_e(u.warning.main,.62)),V(u.TableCell,"border",_e(Mn(u.divider,1),.88)),V(u.Tooltip,"bg",Mn(u.grey[700],.92))}if(u.mode==="dark"){V(u.Alert,"errorColor",_e(u.error.light,.6)),V(u.Alert,"infoColor",_e(u.info.light,.6)),V(u.Alert,"successColor",_e(u.success.light,.6)),V(u.Alert,"warningColor",_e(u.warning.light,.6)),V(u.Alert,"errorFilledBg",M("palette-error-dark")),V(u.Alert,"infoFilledBg",M("palette-info-dark")),V(u.Alert,"successFilledBg",M("palette-success-dark")),V(u.Alert,"warningFilledBg",M("palette-warning-dark")),V(u.Alert,"errorFilledColor",At(()=>u.getContrastText(u.error.dark))),V(u.Alert,"infoFilledColor",At(()=>u.getContrastText(u.info.dark))),V(u.Alert,"successFilledColor",At(()=>u.getContrastText(u.success.dark))),V(u.Alert,"warningFilledColor",At(()=>u.getContrastText(u.warning.dark))),V(u.Alert,"errorStandardBg",Ae(u.error.light,.9)),V(u.Alert,"infoStandardBg",Ae(u.info.light,.9)),V(u.Alert,"successStandardBg",Ae(u.success.light,.9)),V(u.Alert,"warningStandardBg",Ae(u.warning.light,.9)),V(u.Alert,"errorIconColor",M("palette-error-main")),V(u.Alert,"infoIconColor",M("palette-info-main")),V(u.Alert,"successIconColor",M("palette-success-main")),V(u.Alert,"warningIconColor",M("palette-warning-main")),V(u.AppBar,"defaultBg",M("palette-grey-900")),V(u.AppBar,"darkBg",M("palette-background-paper")),V(u.AppBar,"darkColor",M("palette-text-primary")),V(u.Avatar,"defaultBg",M("palette-grey-600")),V(u.Button,"inheritContainedBg",M("palette-grey-800")),V(u.Button,"inheritContainedHoverBg",M("palette-grey-700")),V(u.Chip,"defaultBorder",M("palette-grey-700")),V(u.Chip,"defaultAvatarColor",M("palette-grey-300")),V(u.Chip,"defaultIconColor",M("palette-grey-300")),V(u.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),V(u.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),V(u.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),V(u.LinearProgress,"primaryBg",Ae(u.primary.main,.5)),V(u.LinearProgress,"secondaryBg",Ae(u.secondary.main,.5)),V(u.LinearProgress,"errorBg",Ae(u.error.main,.5)),V(u.LinearProgress,"infoBg",Ae(u.info.main,.5)),V(u.LinearProgress,"successBg",Ae(u.success.main,.5)),V(u.LinearProgress,"warningBg",Ae(u.warning.main,.5)),V(u.Skeleton,"bg",`rgba(${M("palette-text-primaryChannel")} / 0.13)`),V(u.Slider,"primaryTrack",Ae(u.primary.main,.5)),V(u.Slider,"secondaryTrack",Ae(u.secondary.main,.5)),V(u.Slider,"errorTrack",Ae(u.error.main,.5)),V(u.Slider,"infoTrack",Ae(u.info.main,.5)),V(u.Slider,"successTrack",Ae(u.success.main,.5)),V(u.Slider,"warningTrack",Ae(u.warning.main,.5));const N=In(u.background.default,.98);V(u.SnackbarContent,"bg",N),V(u.SnackbarContent,"color",At(()=>u.getContrastText(N))),V(u.SpeedDialAction,"fabHoverBg",In(u.background.paper,.15)),V(u.StepConnector,"border",M("palette-grey-600")),V(u.StepContent,"border",M("palette-grey-600")),V(u.Switch,"defaultColor",M("palette-grey-300")),V(u.Switch,"defaultDisabledColor",M("palette-grey-600")),V(u.Switch,"primaryDisabledColor",Ae(u.primary.main,.55)),V(u.Switch,"secondaryDisabledColor",Ae(u.secondary.main,.55)),V(u.Switch,"errorDisabledColor",Ae(u.error.main,.55)),V(u.Switch,"infoDisabledColor",Ae(u.info.main,.55)),V(u.Switch,"successDisabledColor",Ae(u.success.main,.55)),V(u.Switch,"warningDisabledColor",Ae(u.warning.main,.55)),V(u.TableCell,"border",Ae(Mn(u.divider,1),.68)),V(u.Tooltip,"bg",Mn(u.grey[700],.92))}Vt(u.background,"default"),Vt(u.background,"paper"),Vt(u.common,"background"),Vt(u.common,"onBackground"),Vt(u,"divider"),Object.keys(u).forEach(N=>{const A=u[N];N!=="tonalOffset"&&A&&typeof A=="object"&&(A.main&&V(u[N],"mainChannel",fn(hn(A.main))),A.light&&V(u[N],"lightChannel",fn(hn(A.light))),A.dark&&V(u[N],"darkChannel",fn(hn(A.dark))),A.contrastText&&V(u[N],"contrastTextChannel",fn(hn(A.contrastText))),N==="text"&&(Vt(u[N],"primary"),Vt(u[N],"secondary")),N==="action"&&(A.active&&Vt(u[N],"active"),A.selected&&Vt(u[N],"selected")))})}),w=t.reduce((D,u)=>ft(D,u),w);const b={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:lf(w)},{vars:_,generateThemeVars:z,generateStyleSheets:F}=Rd(w,b);return w.vars=_,Object.entries(w.colorSchemes[w.defaultColorScheme]).forEach(([D,u])=>{w[D]=u}),w.generateThemeVars=z,w.generateStyleSheets=F,w.generateSpacing=function(){return _l(d.spacing,Ua(this))},w.getColorSchemeSelector=$d(o),w.spacing=w.generateSpacing(),w.shouldSkipGeneratingVar=s,w.unstable_sxConfig={...Fn,...d==null?void 0:d.unstable_sxConfig},w.unstable_sx=function(u){return an({sx:u,theme:this})},w.toRuntimeSource=Bl,w}function lo(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:Ya({...r===!0?{}:r.palette,mode:t})})}function ff(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:i=r?void 0:{light:!0},defaultColorScheme:a=r==null?void 0:r.mode,...s}=e,o=a||"light",l=i==null?void 0:i[o],d={...i,...r?{[o]:{...typeof l!="boolean"&&l,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return wa(e,...t);let f=r;"palette"in e||d[o]&&(d[o]!==!0?f=d[o].palette:o==="dark"&&(f={mode:"dark"}));const p=wa({...e,palette:f},...t);return p.defaultColorScheme=o,p.colorSchemes=d,p.palette.mode==="light"&&(p.colorSchemes.light={...d.light!==!0&&d.light,palette:p.palette},lo(p,"dark",d.dark)),p.palette.mode==="dark"&&(p.colorSchemes.dark={...d.dark!==!0&&d.dark,palette:p.palette},lo(p,"light",d.light)),p}return!r&&!("light"in d)&&o==="light"&&(d.light=!0),df({...s,colorSchemes:d,defaultColorScheme:o,...typeof n!="boolean"&&n},...t)}const hf=ff(),mf="$$material";function yf(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const gf=e=>yf(e)&&e!=="classes",mt=md({themeId:mf,defaultTheme:hf,rootShouldForwardProp:gf});function xf(){return Gp}const Fr=Od;process.env.NODE_ENV!=="production"&&(k.node,k.object.isRequired);function Rr(e){return jd(e)}function vf(e){return typeof e.main=="string"}function bf(e,t=[]){if(!vf(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function ii(e=[]){return([,t])=>t&&bf(t,e)}function wf(e){return pr("MuiTypography",e)}_r("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Sf={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Cf=xf(),Ef=e=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:i,variant:a,classes:s}=e,o={root:["root",a,e.align!=="inherit"&&`align${ze(t)}`,r&&"gutterBottom",n&&"noWrap",i&&"paragraph"]};return on(o,wf,s)},kf=mt("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${ze(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(Fr(({theme:e})=>{var t;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([r,n])=>r!=="inherit"&&n&&typeof n=="object").map(([r,n])=>({props:{variant:r},style:n})),...Object.entries(e.palette).filter(ii()).map(([r])=>({props:{color:r},style:{color:(e.vars||e).palette[r].main}})),...Object.entries(((t=e.palette)==null?void 0:t.text)||{}).filter(([,r])=>typeof r=="string").map(([r])=>({props:{color:`text${ze(r)}`},style:{color:(e.vars||e).palette.text[r]}})),{props:({ownerState:r})=>r.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:r})=>r.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:r})=>r.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:r})=>r.paragraph,style:{marginBottom:16}}]}})),co={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},ql=ne.forwardRef(function(t,r){const{color:n,...i}=Rr({props:t,name:"MuiTypography"}),a=!Sf[n],s=Cf({...i,...a&&{color:n}}),{align:o="inherit",className:l,component:d,gutterBottom:f=!1,noWrap:p=!1,paragraph:m=!1,variant:y="body1",variantMapping:T=co,...h}=s,C={...s,align:o,color:n,className:l,component:d,gutterBottom:f,noWrap:p,paragraph:m,variant:y,variantMapping:T},v=d||(m?"p":T[y]||co[y])||"span",S=Ef(C);return c.jsx(kf,{as:v,ref:r,className:rt(S.root,l),...h,ownerState:C,style:{...o!=="inherit"&&{"--Typography-textAlign":o},...h.style}})});process.env.NODE_ENV!=="production"&&(ql.propTypes={align:k.oneOf(["center","inherit","justify","left","right"]),children:k.node,classes:k.object,className:k.string,color:k.oneOfType([k.oneOf(["primary","secondary","success","error","info","warning","textPrimary","textSecondary","textDisabled"]),k.string]),component:k.elementType,gutterBottom:k.bool,noWrap:k.bool,paragraph:k.bool,style:k.object,sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object]),variant:k.oneOfType([k.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),k.string]),variantMapping:k.object});const Za=ne.createContext(void 0);process.env.NODE_ENV!=="production"&&(Za.displayName="FormControlContext");function Tf(){return ne.useContext(Za)}function jf(e){return pr("MuiInputAdornment",e)}const uo=_r("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var po;const Of=(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${ze(r.position)}`],r.disablePointerEvents===!0&&t.disablePointerEvents,t[r.variant]]},Ff=e=>{const{classes:t,disablePointerEvents:r,hiddenLabel:n,position:i,size:a,variant:s}=e,o={root:["root",r&&"disablePointerEvents",i&&`position${ze(i)}`,s,n&&"hiddenLabel",a&&`size${ze(a)}`]};return on(o,jf,t)},Af=mt("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:Of})(Fr(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${uo.positionStart}&:not(.${uo.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),Wl=ne.forwardRef(function(t,r){const n=Rr({props:t,name:"MuiInputAdornment"}),{children:i,className:a,component:s="div",disablePointerEvents:o=!1,disableTypography:l=!1,position:d,variant:f,...p}=n,m=Tf()||{};let y=f;f&&m.variant&&process.env.NODE_ENV!=="production"&&f===m.variant&&console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."),m&&!y&&(y=m.variant);const T={...n,hiddenLabel:m.hiddenLabel,size:m.size,disablePointerEvents:o,position:d,variant:y},h=Ff(T);return c.jsx(Za.Provider,{value:null,children:c.jsx(Af,{as:s,ownerState:T,className:rt(h.root,a),ref:r,...p,children:typeof i=="string"&&!l?c.jsx(ql,{color:"textSecondary",children:i}):c.jsxs(ne.Fragment,{children:[d==="start"?po||(po=c.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):null,i]})})})});process.env.NODE_ENV!=="production"&&(Wl.propTypes={children:k.node,classes:k.object,className:k.string,component:k.elementType,disablePointerEvents:k.bool,disableTypography:k.bool,position:k.oneOf(["end","start"]).isRequired,sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object]),variant:k.oneOf(["filled","outlined","standard"])});function Xa(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function _f(e){return pr("MuiSvgIcon",e)}_r("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Rf=e=>{const{color:t,fontSize:r,classes:n}=e,i={root:["root",t!=="inherit"&&`color${ze(t)}`,`fontSize${ze(r)}`]};return on(i,_f,n)},$f=mt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${ze(r.color)}`],t[`fontSize${ze(r.fontSize)}`]]}})(Fr(({theme:e})=>{var t,r,n,i,a,s,o,l,d,f,p,m,y,T;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(i=(t=e.transitions)==null?void 0:t.create)==null?void 0:i.call(t,"fill",{duration:(n=(r=(e.vars??e).transitions)==null?void 0:r.duration)==null?void 0:n.shorter}),variants:[{props:h=>!h.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((s=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:s.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(o=e.typography)==null?void 0:o.pxToRem)==null?void 0:l.call(o,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((f=(d=e.typography)==null?void 0:d.pxToRem)==null?void 0:f.call(d,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,h])=>h&&h.main).map(([h])=>{var C,v;return{props:{color:h},style:{color:(v=(C=(e.vars??e).palette)==null?void 0:C[h])==null?void 0:v.main}}}),{props:{color:"action"},style:{color:(m=(p=(e.vars??e).palette)==null?void 0:p.action)==null?void 0:m.active}},{props:{color:"disabled"},style:{color:(T=(y=(e.vars??e).palette)==null?void 0:y.action)==null?void 0:T.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),ai=ne.forwardRef(function(t,r){const n=Rr({props:t,name:"MuiSvgIcon"}),{children:i,className:a,color:s="inherit",component:o="svg",fontSize:l="medium",htmlColor:d,inheritViewBox:f=!1,titleAccess:p,viewBox:m="0 0 24 24",...y}=n,T=ne.isValidElement(i)&&i.type==="svg",h={...n,color:s,component:o,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:m,hasSvgAsChild:T},C={};f||(C.viewBox=m);const v=Rf(h);return c.jsxs($f,{as:o,className:rt(v.root,a),focusable:"false",color:d,"aria-hidden":p?void 0:!0,role:p?"img":void 0,ref:r,...C,...y,...T&&i.props,ownerState:h,children:[T?i.props.children:i,p?c.jsx("title",{children:p}):null]})});process.env.NODE_ENV!=="production"&&(ai.propTypes={children:k.node,classes:k.object,className:k.string,color:k.oneOfType([k.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),k.string]),component:k.elementType,fontSize:k.oneOfType([k.oneOf(["inherit","large","medium","small"]),k.string]),htmlColor:k.string,inheritViewBox:k.bool,shapeRendering:k.string,sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object]),titleAccess:k.string,viewBox:k.string});ai.muiName="SvgIcon";function yt(e,t){function r(n,i){return c.jsx(ai,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:i,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=ai.muiName,ne.memo(ne.forwardRef(r))}let fo=0;function Df(e){const[t,r]=ne.useState(e),n=e||t;return ne.useEffect(()=>{t==null&&(fo+=1,r(`mui-${fo}`))},[t]),n}const Pf={...ne},ho=Pf.useId;function Mf(e){if(ho!==void 0){const t=ho();return e??t}return Df(e)}function Un(e){const t=ne.useRef(e);return bd(()=>{t.current=e}),ne.useRef((...r)=>(0,t.current)(...r)).current}function mo(...e){const t=ne.useRef(void 0),r=ne.useCallback(n=>{const i=e.map(a=>{if(a==null)return null;if(typeof a=="function"){const s=a,o=s(n);return typeof o=="function"?o:()=>{s(null)}}return a.current=n,()=>{a.current=null}});return()=>{i.forEach(a=>a==null?void 0:a())}},e);return ne.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}const If=k.oneOfType([k.func,k.object]);function zf(e){const{prototype:t={}}=e;return!!t.isReactComponent}function Vf(e,t,r,n,i){const a=e[t],s=i||t;if(a==null||typeof window>"u")return null;let o;return typeof a=="function"&&!zf(a)&&(o="Did you accidentally provide a plain function component instead?"),o!==void 0?new Error(`Invalid ${n} \`${s}\` supplied to \`${r}\`. Expected an element type that can hold a ref. ${o} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Bf=Xa(k.elementType,Vf);function yo(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
|
|
75
|
-
`))}return!1}const
|
|
72
|
+
export default theme;`}function Ta(e={},...t){const{breakpoints:r,mixins:n={},spacing:i,palette:a={},transitions:s={},typography:o={},shape:l,...d}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":pr(20));const h=es(a),f=Bl(e);let u=mt(f,{mixins:Xd(f.breakpoints,n),palette:h,shadows:af.slice(),typography:ef(h,o),transitions:cf(s),zIndex:{...uf}});if(u=mt(u,d),u=t.reduce((g,k)=>mt(g,k),u),process.env.NODE_ENV!=="production"){const g=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],k=(m,b)=>{let v;for(v in m){const w=m[v];if(g.includes(v)&&Object.keys(w).length>0){if(process.env.NODE_ENV!=="production"){const P=hr("",v);console.error([`MUI: The \`${b}\` component increases the CSS specificity of the \`${v}\` internal state.`,"You can not override it like this: ",JSON.stringify(m,null,2),"",`Instead, you need to use the '&.${P}' syntax:`,JSON.stringify({root:{[`&.${P}`]:w}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
73
|
+
`))}m[v]={}}}};Object.keys(u.components).forEach(m=>{const b=u.components[m].styleOverrides;b&&m.startsWith("Mui")&&k(b,m)})}return u.unstable_sxConfig={...$n,...d==null?void 0:d.unstable_sxConfig},u.unstable_sx=function(k){return ln({sx:k,theme:this})},u.toRuntimeSource=Kl,u}function df(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const ff=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=df(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function Yl(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Gl(e){return e==="dark"?ff:[]}function hf(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...i}=e,a=es(t);return{palette:a,opacity:{...Yl(a.mode),...r},overlays:n||Gl(a.mode),...i}}function mf(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const xf=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],gf=e=>(t,r)=>{const n=e.rootSelector||":root",i=e.colorSchemeSelector;let a=i;if(i==="class"&&(a=".%s"),i==="data"&&(a="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(a=`[${i}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const s={};return xf(e.cssVarPrefix).forEach(o=>{s[o]=r[o],delete r[o]}),a==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:s}}:a?{[a.replace("%s",t)]:s,[`${n}, ${a.replace("%s",t)}`]:r}:{[n]:{...r,...s}}}if(a&&a!=="media")return`${n}, ${a.replace("%s",String(t))}`}else if(t){if(a==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(a)return a.replace("%s",String(t))}return n};function yf(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function V(e,t,r){!e[t]&&r&&(e[t]=r)}function gn(e){return typeof e!="string"||!e.startsWith("hsl")?e:Wl(e)}function Vt(e,t){`${t}Channel`in e||(e[`${t}Channel`]=xn(gn(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
|
|
74
|
+
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function vf(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const _t=e=>{try{return e()}catch{}},bf=(e="mui")=>zd(e);function Ji(e,t,r,n){if(!t)return;t=t===!0?{}:t;const i=n==="dark"?"dark":"light";if(!r){e[n]=hf({...t,palette:{mode:i,...t==null?void 0:t.palette}});return}const{palette:a,...s}=Ta({...r,palette:{mode:i,...t==null?void 0:t.palette}});return e[n]={...t,palette:a,opacity:{...Yl(i),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Gl(i)},s}function wf(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:i=!1,cssVarPrefix:a="mui",shouldSkipGeneratingVar:s=mf,colorSchemeSelector:o=r.light&&r.dark?"media":void 0,rootSelector:l=":root",...d}=e,h=Object.keys(r)[0],f=n||(r.light&&h!=="light"?"light":h),u=bf(a),{[f]:g,light:k,dark:m,...b}=r,v={...b};let w=g;if((f==="dark"&&!("dark"in r)||f==="light"&&!("light"in r))&&(w=!0),!w)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${f}\` option is either missing or invalid.`:pr(21,f));const P=Ji(v,w,d,f);k&&!v.light&&Ji(v,k,void 0,"light"),m&&!v.dark&&Ji(v,m,void 0,"dark");let T={defaultColorScheme:f,...P,cssVarPrefix:a,colorSchemeSelector:o,rootSelector:l,getCssVar:u,colorSchemes:v,font:{...Zd(P.typography),...P.font},spacing:vf(d.spacing)};Object.keys(T.colorSchemes).forEach(I=>{const p=T.colorSchemes[I].palette,_=z=>{const O=z.split("-"),N=O[1],K=O[2];return u(z,p[N][K])};if(p.mode==="light"&&(V(p.common,"background","#fff"),V(p.common,"onBackground","#000")),p.mode==="dark"&&(V(p.common,"background","#000"),V(p.common,"onBackground","#fff")),yf(p,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),p.mode==="light"){V(p.Alert,"errorColor",Ae(p.error.light,.6)),V(p.Alert,"infoColor",Ae(p.info.light,.6)),V(p.Alert,"successColor",Ae(p.success.light,.6)),V(p.Alert,"warningColor",Ae(p.warning.light,.6)),V(p.Alert,"errorFilledBg",_("palette-error-main")),V(p.Alert,"infoFilledBg",_("palette-info-main")),V(p.Alert,"successFilledBg",_("palette-success-main")),V(p.Alert,"warningFilledBg",_("palette-warning-main")),V(p.Alert,"errorFilledColor",_t(()=>p.getContrastText(p.error.main))),V(p.Alert,"infoFilledColor",_t(()=>p.getContrastText(p.info.main))),V(p.Alert,"successFilledColor",_t(()=>p.getContrastText(p.success.main))),V(p.Alert,"warningFilledColor",_t(()=>p.getContrastText(p.warning.main))),V(p.Alert,"errorStandardBg",_e(p.error.light,.9)),V(p.Alert,"infoStandardBg",_e(p.info.light,.9)),V(p.Alert,"successStandardBg",_e(p.success.light,.9)),V(p.Alert,"warningStandardBg",_e(p.warning.light,.9)),V(p.Alert,"errorIconColor",_("palette-error-main")),V(p.Alert,"infoIconColor",_("palette-info-main")),V(p.Alert,"successIconColor",_("palette-success-main")),V(p.Alert,"warningIconColor",_("palette-warning-main")),V(p.AppBar,"defaultBg",_("palette-grey-100")),V(p.Avatar,"defaultBg",_("palette-grey-400")),V(p.Button,"inheritContainedBg",_("palette-grey-300")),V(p.Button,"inheritContainedHoverBg",_("palette-grey-A100")),V(p.Chip,"defaultBorder",_("palette-grey-400")),V(p.Chip,"defaultAvatarColor",_("palette-grey-700")),V(p.Chip,"defaultIconColor",_("palette-grey-700")),V(p.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),V(p.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),V(p.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),V(p.LinearProgress,"primaryBg",_e(p.primary.main,.62)),V(p.LinearProgress,"secondaryBg",_e(p.secondary.main,.62)),V(p.LinearProgress,"errorBg",_e(p.error.main,.62)),V(p.LinearProgress,"infoBg",_e(p.info.main,.62)),V(p.LinearProgress,"successBg",_e(p.success.main,.62)),V(p.LinearProgress,"warningBg",_e(p.warning.main,.62)),V(p.Skeleton,"bg",`rgba(${_("palette-text-primaryChannel")} / 0.11)`),V(p.Slider,"primaryTrack",_e(p.primary.main,.62)),V(p.Slider,"secondaryTrack",_e(p.secondary.main,.62)),V(p.Slider,"errorTrack",_e(p.error.main,.62)),V(p.Slider,"infoTrack",_e(p.info.main,.62)),V(p.Slider,"successTrack",_e(p.success.main,.62)),V(p.Slider,"warningTrack",_e(p.warning.main,.62));const z=Nn(p.background.default,.8);V(p.SnackbarContent,"bg",z),V(p.SnackbarContent,"color",_t(()=>p.getContrastText(z))),V(p.SpeedDialAction,"fabHoverBg",Nn(p.background.paper,.15)),V(p.StepConnector,"border",_("palette-grey-400")),V(p.StepContent,"border",_("palette-grey-400")),V(p.Switch,"defaultColor",_("palette-common-white")),V(p.Switch,"defaultDisabledColor",_("palette-grey-100")),V(p.Switch,"primaryDisabledColor",_e(p.primary.main,.62)),V(p.Switch,"secondaryDisabledColor",_e(p.secondary.main,.62)),V(p.Switch,"errorDisabledColor",_e(p.error.main,.62)),V(p.Switch,"infoDisabledColor",_e(p.info.main,.62)),V(p.Switch,"successDisabledColor",_e(p.success.main,.62)),V(p.Switch,"warningDisabledColor",_e(p.warning.main,.62)),V(p.TableCell,"border",_e(Vn(p.divider,1),.88)),V(p.Tooltip,"bg",Vn(p.grey[700],.92))}if(p.mode==="dark"){V(p.Alert,"errorColor",_e(p.error.light,.6)),V(p.Alert,"infoColor",_e(p.info.light,.6)),V(p.Alert,"successColor",_e(p.success.light,.6)),V(p.Alert,"warningColor",_e(p.warning.light,.6)),V(p.Alert,"errorFilledBg",_("palette-error-dark")),V(p.Alert,"infoFilledBg",_("palette-info-dark")),V(p.Alert,"successFilledBg",_("palette-success-dark")),V(p.Alert,"warningFilledBg",_("palette-warning-dark")),V(p.Alert,"errorFilledColor",_t(()=>p.getContrastText(p.error.dark))),V(p.Alert,"infoFilledColor",_t(()=>p.getContrastText(p.info.dark))),V(p.Alert,"successFilledColor",_t(()=>p.getContrastText(p.success.dark))),V(p.Alert,"warningFilledColor",_t(()=>p.getContrastText(p.warning.dark))),V(p.Alert,"errorStandardBg",Ae(p.error.light,.9)),V(p.Alert,"infoStandardBg",Ae(p.info.light,.9)),V(p.Alert,"successStandardBg",Ae(p.success.light,.9)),V(p.Alert,"warningStandardBg",Ae(p.warning.light,.9)),V(p.Alert,"errorIconColor",_("palette-error-main")),V(p.Alert,"infoIconColor",_("palette-info-main")),V(p.Alert,"successIconColor",_("palette-success-main")),V(p.Alert,"warningIconColor",_("palette-warning-main")),V(p.AppBar,"defaultBg",_("palette-grey-900")),V(p.AppBar,"darkBg",_("palette-background-paper")),V(p.AppBar,"darkColor",_("palette-text-primary")),V(p.Avatar,"defaultBg",_("palette-grey-600")),V(p.Button,"inheritContainedBg",_("palette-grey-800")),V(p.Button,"inheritContainedHoverBg",_("palette-grey-700")),V(p.Chip,"defaultBorder",_("palette-grey-700")),V(p.Chip,"defaultAvatarColor",_("palette-grey-300")),V(p.Chip,"defaultIconColor",_("palette-grey-300")),V(p.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),V(p.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),V(p.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),V(p.LinearProgress,"primaryBg",Ae(p.primary.main,.5)),V(p.LinearProgress,"secondaryBg",Ae(p.secondary.main,.5)),V(p.LinearProgress,"errorBg",Ae(p.error.main,.5)),V(p.LinearProgress,"infoBg",Ae(p.info.main,.5)),V(p.LinearProgress,"successBg",Ae(p.success.main,.5)),V(p.LinearProgress,"warningBg",Ae(p.warning.main,.5)),V(p.Skeleton,"bg",`rgba(${_("palette-text-primaryChannel")} / 0.13)`),V(p.Slider,"primaryTrack",Ae(p.primary.main,.5)),V(p.Slider,"secondaryTrack",Ae(p.secondary.main,.5)),V(p.Slider,"errorTrack",Ae(p.error.main,.5)),V(p.Slider,"infoTrack",Ae(p.info.main,.5)),V(p.Slider,"successTrack",Ae(p.success.main,.5)),V(p.Slider,"warningTrack",Ae(p.warning.main,.5));const z=Nn(p.background.default,.98);V(p.SnackbarContent,"bg",z),V(p.SnackbarContent,"color",_t(()=>p.getContrastText(z))),V(p.SpeedDialAction,"fabHoverBg",Nn(p.background.paper,.15)),V(p.StepConnector,"border",_("palette-grey-600")),V(p.StepContent,"border",_("palette-grey-600")),V(p.Switch,"defaultColor",_("palette-grey-300")),V(p.Switch,"defaultDisabledColor",_("palette-grey-600")),V(p.Switch,"primaryDisabledColor",Ae(p.primary.main,.55)),V(p.Switch,"secondaryDisabledColor",Ae(p.secondary.main,.55)),V(p.Switch,"errorDisabledColor",Ae(p.error.main,.55)),V(p.Switch,"infoDisabledColor",Ae(p.info.main,.55)),V(p.Switch,"successDisabledColor",Ae(p.success.main,.55)),V(p.Switch,"warningDisabledColor",Ae(p.warning.main,.55)),V(p.TableCell,"border",Ae(Vn(p.divider,1),.68)),V(p.Tooltip,"bg",Vn(p.grey[700],.92))}Vt(p.background,"default"),Vt(p.background,"paper"),Vt(p.common,"background"),Vt(p.common,"onBackground"),Vt(p,"divider"),Object.keys(p).forEach(z=>{const O=p[z];z!=="tonalOffset"&&O&&typeof O=="object"&&(O.main&&V(p[z],"mainChannel",xn(gn(O.main))),O.light&&V(p[z],"lightChannel",xn(gn(O.light))),O.dark&&V(p[z],"darkChannel",xn(gn(O.dark))),O.contrastText&&V(p[z],"contrastTextChannel",xn(gn(O.contrastText))),z==="text"&&(Vt(p[z],"primary"),Vt(p[z],"secondary")),z==="action"&&(O.active&&Vt(p[z],"active"),O.selected&&Vt(p[z],"selected")))})}),T=t.reduce((I,p)=>mt(I,p),T);const C={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:gf(T)},{vars:$,generateThemeVars:B,generateStyleSheets:A}=Nd(T,C);return T.vars=$,Object.entries(T.colorSchemes[T.defaultColorScheme]).forEach(([I,p])=>{T[I]=p}),T.generateThemeVars=B,T.generateStyleSheets=A,T.generateSpacing=function(){return zl(d.spacing,Ga(this))},T.getColorSchemeSelector=Ld(o),T.spacing=T.generateSpacing(),T.shouldSkipGeneratingVar=s,T.unstable_sxConfig={...$n,...d==null?void 0:d.unstable_sxConfig},T.unstable_sx=function(p){return ln({sx:p,theme:this})},T.toRuntimeSource=Kl,T}function xo(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:es({...r===!0?{}:r.palette,mode:t})})}function Sf(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:i=r?void 0:{light:!0},defaultColorScheme:a=r==null?void 0:r.mode,...s}=e,o=a||"light",l=i==null?void 0:i[o],d={...i,...r?{[o]:{...typeof l!="boolean"&&l,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return Ta(e,...t);let h=r;"palette"in e||d[o]&&(d[o]!==!0?h=d[o].palette:o==="dark"&&(h={mode:"dark"}));const f=Ta({...e,palette:h},...t);return f.defaultColorScheme=o,f.colorSchemes=d,f.palette.mode==="light"&&(f.colorSchemes.light={...d.light!==!0&&d.light,palette:f.palette},xo(f,"dark",d.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...d.dark!==!0&&d.dark,palette:f.palette},xo(f,"light",d.light)),f}return!r&&!("light"in d)&&o==="light"&&(d.light=!0),wf({...s,colorSchemes:d,defaultColorScheme:o,...typeof n!="boolean"&&n},...t)}const Cf=Sf(),Ef="$$material";function kf(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Tf=e=>kf(e)&&e!=="classes",gt=Ed({themeId:Ef,defaultTheme:Cf,rootShouldForwardProp:Tf});function jf(){return nd}const $r=Md;process.env.NODE_ENV!=="production"&&(j.node,j.object.isRequired);function Ir(e){return Id(e)}function Ff(e){return typeof e.main=="string"}function Of(e,t=[]){if(!Ff(e))return!1;for(const r of t)if(!e.hasOwnProperty(r)||typeof e[r]!="string")return!1;return!0}function oi(e=[]){return([,t])=>t&&Of(t,e)}function Af(e){return hr("MuiTypography",e)}Dr("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const _f={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Rf=jf(),$f=e=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:i,variant:a,classes:s}=e,o={root:["root",a,e.align!=="inherit"&&`align${ze(t)}`,r&&"gutterBottom",n&&"noWrap",i&&"paragraph"]};return un(o,Af,s)},Pf=gt("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${ze(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})($r(({theme:e})=>{var t;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([r,n])=>r!=="inherit"&&n&&typeof n=="object").map(([r,n])=>({props:{variant:r},style:n})),...Object.entries(e.palette).filter(oi()).map(([r])=>({props:{color:r},style:{color:(e.vars||e).palette[r].main}})),...Object.entries(((t=e.palette)==null?void 0:t.text)||{}).filter(([,r])=>typeof r=="string").map(([r])=>({props:{color:`text${ze(r)}`},style:{color:(e.vars||e).palette.text[r]}})),{props:({ownerState:r})=>r.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:r})=>r.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:r})=>r.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:r})=>r.paragraph,style:{marginBottom:16}}]}})),go={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Ql=ae.forwardRef(function(t,r){const{color:n,...i}=Ir({props:t,name:"MuiTypography"}),a=!_f[n],s=Rf({...i,...a&&{color:n}}),{align:o="inherit",className:l,component:d,gutterBottom:h=!1,noWrap:f=!1,paragraph:u=!1,variant:g="body1",variantMapping:k=go,...m}=s,b={...s,align:o,color:n,className:l,component:d,gutterBottom:h,noWrap:f,paragraph:u,variant:g,variantMapping:k},v=d||(u?"p":k[g]||go[g])||"span",w=$f(b);return c.jsx(Pf,{as:v,ref:r,className:at(w.root,l),...m,ownerState:b,style:{...o!=="inherit"&&{"--Typography-textAlign":o},...m.style}})});process.env.NODE_ENV!=="production"&&(Ql.propTypes={align:j.oneOf(["center","inherit","justify","left","right"]),children:j.node,classes:j.object,className:j.string,color:j.oneOfType([j.oneOf(["primary","secondary","success","error","info","warning","textPrimary","textSecondary","textDisabled"]),j.string]),component:j.elementType,gutterBottom:j.bool,noWrap:j.bool,paragraph:j.bool,style:j.object,sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object]),variant:j.oneOfType([j.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),j.string]),variantMapping:j.object});const ts=ae.createContext(void 0);process.env.NODE_ENV!=="production"&&(ts.displayName="FormControlContext");function Df(){return ae.useContext(ts)}function If(e){return hr("MuiInputAdornment",e)}const yo=Dr("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var vo;const Mf=(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${ze(r.position)}`],r.disablePointerEvents===!0&&t.disablePointerEvents,t[r.variant]]},zf=e=>{const{classes:t,disablePointerEvents:r,hiddenLabel:n,position:i,size:a,variant:s}=e,o={root:["root",r&&"disablePointerEvents",i&&`position${ze(i)}`,s,n&&"hiddenLabel",a&&`size${ze(a)}`]};return un(o,If,t)},Bf=gt("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:Mf})($r(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${yo.positionStart}&:not(.${yo.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),Zl=ae.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiInputAdornment"}),{children:i,className:a,component:s="div",disablePointerEvents:o=!1,disableTypography:l=!1,position:d,variant:h,...f}=n,u=Df()||{};let g=h;h&&u.variant&&process.env.NODE_ENV!=="production"&&h===u.variant&&console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."),u&&!g&&(g=u.variant);const k={...n,hiddenLabel:u.hiddenLabel,size:u.size,disablePointerEvents:o,position:d,variant:g},m=zf(k);return c.jsx(ts.Provider,{value:null,children:c.jsx(Bf,{as:s,ownerState:k,className:at(m.root,a),ref:r,...f,children:typeof i=="string"&&!l?c.jsx(Ql,{color:"textSecondary",children:i}):c.jsxs(ae.Fragment,{children:[d==="start"?vo||(vo=c.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):null,i]})})})});process.env.NODE_ENV!=="production"&&(Zl.propTypes={children:j.node,classes:j.object,className:j.string,component:j.elementType,disablePointerEvents:j.bool,disableTypography:j.bool,position:j.oneOf(["end","start"]).isRequired,sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object]),variant:j.oneOf(["filled","outlined","standard"])});function rs(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function Vf(e){return hr("MuiSvgIcon",e)}Dr("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Nf=e=>{const{color:t,fontSize:r,classes:n}=e,i={root:["root",t!=="inherit"&&`color${ze(t)}`,`fontSize${ze(r)}`]};return un(i,Vf,n)},Lf=gt("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${ze(r.color)}`],t[`fontSize${ze(r.fontSize)}`]]}})($r(({theme:e})=>{var t,r,n,i,a,s,o,l,d,h,f,u,g,k;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(i=(t=e.transitions)==null?void 0:t.create)==null?void 0:i.call(t,"fill",{duration:(n=(r=(e.vars??e).transitions)==null?void 0:r.duration)==null?void 0:n.shorter}),variants:[{props:m=>!m.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((s=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:s.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(o=e.typography)==null?void 0:o.pxToRem)==null?void 0:l.call(o,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((h=(d=e.typography)==null?void 0:d.pxToRem)==null?void 0:h.call(d,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,m])=>m&&m.main).map(([m])=>{var b,v;return{props:{color:m},style:{color:(v=(b=(e.vars??e).palette)==null?void 0:b[m])==null?void 0:v.main}}}),{props:{color:"action"},style:{color:(u=(f=(e.vars??e).palette)==null?void 0:f.action)==null?void 0:u.active}},{props:{color:"disabled"},style:{color:(k=(g=(e.vars??e).palette)==null?void 0:g.action)==null?void 0:k.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),li=ae.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiSvgIcon"}),{children:i,className:a,color:s="inherit",component:o="svg",fontSize:l="medium",htmlColor:d,inheritViewBox:h=!1,titleAccess:f,viewBox:u="0 0 24 24",...g}=n,k=ae.isValidElement(i)&&i.type==="svg",m={...n,color:s,component:o,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:h,viewBox:u,hasSvgAsChild:k},b={};h||(b.viewBox=u);const v=Nf(m);return c.jsxs(Lf,{as:o,className:at(v.root,a),focusable:"false",color:d,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:r,...b,...g,...k&&i.props,ownerState:m,children:[k?i.props.children:i,f?c.jsx("title",{children:f}):null]})});process.env.NODE_ENV!=="production"&&(li.propTypes={children:j.node,classes:j.object,className:j.string,color:j.oneOfType([j.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),j.string]),component:j.elementType,fontSize:j.oneOfType([j.oneOf(["inherit","large","medium","small"]),j.string]),htmlColor:j.string,inheritViewBox:j.bool,shapeRendering:j.string,sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object]),titleAccess:j.string,viewBox:j.string});li.muiName="SvgIcon";function pt(e,t){function r(n,i){return c.jsx(li,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:i,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=li.muiName,ae.memo(ae.forwardRef(r))}let bo=0;function qf(e){const[t,r]=ae.useState(e),n=e||t;return ae.useEffect(()=>{t==null&&(bo+=1,r(`mui-${bo}`))},[t]),n}const Wf={...ae},wo=Wf.useId;function Uf(e){if(wo!==void 0){const t=wo();return e??t}return qf(e)}function Yn(e){const t=ae.useRef(e);return Od(()=>{t.current=e}),ae.useRef((...r)=>(0,t.current)(...r)).current}function So(...e){const t=ae.useRef(void 0),r=ae.useCallback(n=>{const i=e.map(a=>{if(a==null)return null;if(typeof a=="function"){const s=a,o=s(n);return typeof o=="function"?o:()=>{s(null)}}return a.current=n,()=>{a.current=null}});return()=>{i.forEach(a=>a==null?void 0:a())}},e);return ae.useMemo(()=>e.every(n=>n==null)?null:n=>{t.current&&(t.current(),t.current=void 0),n!=null&&(t.current=r(n))},e)}const Hf=j.oneOfType([j.func,j.object]);function Kf(e){const{prototype:t={}}=e;return!!t.isReactComponent}function Yf(e,t,r,n,i){const a=e[t],s=i||t;if(a==null||typeof window>"u")return null;let o;return typeof a=="function"&&!Kf(a)&&(o="Did you accidentally provide a plain function component instead?"),o!==void 0?new Error(`Invalid ${n} \`${s}\` supplied to \`${r}\`. Expected an element type that can hold a ref. ${o} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Gf=rs(j.elementType,Yf);function Co(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
|
|
75
|
+
`))}return!1}const Eo={};function Xl(e,t){const r=ae.useRef(Eo);return r.current===Eo&&(r.current=e(t)),r}class ci{constructor(){pn(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new ci}static use(){const t=Xl(ci.create).current,[r,n]=ae.useState(!1);return t.shouldMount=r,t.setShouldMount=n,ae.useEffect(t.mountEffect,[r]),t}mount(){return this.mounted||(this.mounted=Zf(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>{var r;return(r=this.ref.current)==null?void 0:r.start(...t)})}stop(...t){this.mount().then(()=>{var r;return(r=this.ref.current)==null?void 0:r.stop(...t)})}pulsate(...t){this.mount().then(()=>{var r;return(r=this.ref.current)==null?void 0:r.pulsate(...t)})}}function Qf(){return ci.use()}function Zf(){let e,t;const r=new Promise((n,i)=>{e=n,t=i});return r.resolve=e,r.reject=t,r}function ja(){return ja=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ja.apply(null,arguments)}function Xf(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Fa(e,t){return Fa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Fa(e,t)}function Jf(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Fa(e,t)}const ko=D.createContext(null);function eh(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ns(e,t){var r=function(a){return t&&D.isValidElement(a)?t(a):a},n=Object.create(null);return e&&D.Children.map(e,function(i){return i}).forEach(function(i){n[i.key]=r(i)}),n}function th(e,t){e=e||{},t=t||{};function r(h){return h in t?t[h]:e[h]}var n=Object.create(null),i=[];for(var a in e)a in t?i.length&&(n[a]=i,i=[]):i.push(a);var s,o={};for(var l in t){if(n[l])for(s=0;s<n[l].length;s++){var d=n[l][s];o[n[l][s]]=r(d)}o[l]=r(l)}for(s=0;s<i.length;s++)o[i[s]]=r(i[s]);return o}function br(e,t,r){return r[t]!=null?r[t]:e.props[t]}function rh(e,t){return ns(e.children,function(r){return D.cloneElement(r,{onExited:t.bind(null,r),in:!0,appear:br(r,"appear",e),enter:br(r,"enter",e),exit:br(r,"exit",e)})})}function nh(e,t,r){var n=ns(e.children),i=th(t,n);return Object.keys(i).forEach(function(a){var s=i[a];if(D.isValidElement(s)){var o=a in t,l=a in n,d=t[a],h=D.isValidElement(d)&&!d.props.in;l&&(!o||h)?i[a]=D.cloneElement(s,{onExited:r.bind(null,s),in:!0,exit:br(s,"exit",e),enter:br(s,"enter",e)}):!l&&o&&!h?i[a]=D.cloneElement(s,{in:!1}):l&&o&&D.isValidElement(d)&&(i[a]=D.cloneElement(s,{onExited:r.bind(null,s),in:d.props.in,exit:br(s,"exit",e),enter:br(s,"enter",e)}))}}),i}var ih=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},ah={component:"div",childFactory:function(t){return t}},is=function(e){Jf(t,e);function t(n,i){var a;a=e.call(this,n,i)||this;var s=a.handleExited.bind(eh(a));return a.state={contextValue:{isMounting:!0},handleExited:s,firstRender:!0},a}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(i,a){var s=a.children,o=a.handleExited,l=a.firstRender;return{children:l?rh(i,o):nh(i,s,o),firstRender:!1}},r.handleExited=function(i,a){var s=ns(this.props.children);i.key in s||(i.props.onExited&&i.props.onExited(a),this.mounted&&this.setState(function(o){var l=ja({},o.children);return delete l[i.key],{children:l}}))},r.render=function(){var i=this.props,a=i.component,s=i.childFactory,o=Xf(i,["component","childFactory"]),l=this.state.contextValue,d=ih(this.state.children).map(s);return delete o.appear,delete o.enter,delete o.exit,a===null?D.createElement(ko.Provider,{value:l},d):D.createElement(ko.Provider,{value:l},D.createElement(a,o,d))},t}(D.Component);is.propTypes=process.env.NODE_ENV!=="production"?{component:j.any,children:j.node,appear:j.bool,enter:j.bool,exit:j.bool,childFactory:j.func}:{};is.defaultProps=ah;const sh=[];function oh(e){ae.useEffect(e,sh)}class as{constructor(){pn(this,"currentId",null);pn(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});pn(this,"disposeEffect",()=>this.clear)}static create(){return new as}start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},t)}}function lh(){const e=Xl(as.create).current;return oh(e.disposeEffect),e}function Jl(e){const{className:t,classes:r,pulsate:n=!1,rippleX:i,rippleY:a,rippleSize:s,in:o,onExited:l,timeout:d}=e,[h,f]=ae.useState(!1),u=at(t,r.ripple,r.rippleVisible,n&&r.ripplePulsate),g={width:s,height:s,top:-(s/2)+a,left:-(s/2)+i},k=at(r.child,h&&r.childLeaving,n&&r.childPulsate);return!o&&!h&&f(!0),ae.useEffect(()=>{if(!o&&l!=null){const m=setTimeout(l,d);return()=>{clearTimeout(m)}}},[l,o,d]),c.jsx("span",{className:u,style:g,children:c.jsx("span",{className:k})})}process.env.NODE_ENV!=="production"&&(Jl.propTypes={classes:j.object.isRequired,className:j.string,in:j.bool,onExited:j.func,pulsate:j.bool,rippleSize:j.number,rippleX:j.number,rippleY:j.number,timeout:j.number.isRequired});const wt=Dr("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Oa=550,ch=80,uh=Pr.keyframes`
|
|
76
76
|
0% {
|
|
77
77
|
transform: scale(0);
|
|
78
78
|
opacity: 0.1;
|
|
@@ -82,7 +82,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
82
82
|
transform: scale(1);
|
|
83
83
|
opacity: 0.3;
|
|
84
84
|
}
|
|
85
|
-
`,
|
|
85
|
+
`,ph=Pr.keyframes`
|
|
86
86
|
0% {
|
|
87
87
|
opacity: 1;
|
|
88
88
|
}
|
|
@@ -90,7 +90,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
90
90
|
100% {
|
|
91
91
|
opacity: 0;
|
|
92
92
|
}
|
|
93
|
-
`,
|
|
93
|
+
`,dh=Pr.keyframes`
|
|
94
94
|
0% {
|
|
95
95
|
transform: scale(1);
|
|
96
96
|
}
|
|
@@ -102,23 +102,23 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
102
102
|
100% {
|
|
103
103
|
transform: scale(1);
|
|
104
104
|
}
|
|
105
|
-
`,
|
|
105
|
+
`,fh=gt("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),hh=gt(Jl,{name:"MuiTouchRipple",slot:"Ripple"})`
|
|
106
106
|
opacity: 0;
|
|
107
107
|
position: absolute;
|
|
108
108
|
|
|
109
|
-
&.${
|
|
109
|
+
&.${wt.rippleVisible} {
|
|
110
110
|
opacity: 0.3;
|
|
111
111
|
transform: scale(1);
|
|
112
|
-
animation-name: ${
|
|
113
|
-
animation-duration: ${
|
|
112
|
+
animation-name: ${uh};
|
|
113
|
+
animation-duration: ${Oa}ms;
|
|
114
114
|
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
&.${
|
|
117
|
+
&.${wt.ripplePulsate} {
|
|
118
118
|
animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
& .${
|
|
121
|
+
& .${wt.child} {
|
|
122
122
|
opacity: 1;
|
|
123
123
|
display: block;
|
|
124
124
|
width: 100%;
|
|
@@ -127,25 +127,25 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
127
127
|
background-color: currentColor;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
& .${
|
|
130
|
+
& .${wt.childLeaving} {
|
|
131
131
|
opacity: 0;
|
|
132
|
-
animation-name: ${
|
|
133
|
-
animation-duration: ${
|
|
132
|
+
animation-name: ${ph};
|
|
133
|
+
animation-duration: ${Oa}ms;
|
|
134
134
|
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
& .${
|
|
137
|
+
& .${wt.childPulsate} {
|
|
138
138
|
position: absolute;
|
|
139
139
|
/* @noflip */
|
|
140
140
|
left: 0px;
|
|
141
141
|
top: 0;
|
|
142
|
-
animation-name: ${
|
|
142
|
+
animation-name: ${dh};
|
|
143
143
|
animation-duration: 2500ms;
|
|
144
144
|
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
145
145
|
animation-iteration-count: infinite;
|
|
146
146
|
animation-delay: 200ms;
|
|
147
147
|
}
|
|
148
|
-
`,
|
|
148
|
+
`,ec=ae.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:a={},className:s,...o}=n,[l,d]=ae.useState([]),h=ae.useRef(0),f=ae.useRef(null);ae.useEffect(()=>{f.current&&(f.current(),f.current=null)},[l]);const u=ae.useRef(!1),g=lh(),k=ae.useRef(null),m=ae.useRef(null),b=ae.useCallback(T=>{const{pulsate:C,rippleX:$,rippleY:B,rippleSize:A,cb:I}=T;d(p=>[...p,c.jsx(hh,{classes:{ripple:at(a.ripple,wt.ripple),rippleVisible:at(a.rippleVisible,wt.rippleVisible),ripplePulsate:at(a.ripplePulsate,wt.ripplePulsate),child:at(a.child,wt.child),childLeaving:at(a.childLeaving,wt.childLeaving),childPulsate:at(a.childPulsate,wt.childPulsate)},timeout:Oa,pulsate:C,rippleX:$,rippleY:B,rippleSize:A},h.current)]),h.current+=1,f.current=I},[a]),v=ae.useCallback((T={},C={},$=()=>{})=>{const{pulsate:B=!1,center:A=i||C.pulsate,fakeElement:I=!1}=C;if((T==null?void 0:T.type)==="mousedown"&&u.current){u.current=!1;return}(T==null?void 0:T.type)==="touchstart"&&(u.current=!0);const p=I?null:m.current,_=p?p.getBoundingClientRect():{width:0,height:0,left:0,top:0};let z,O,N;if(A||T===void 0||T.clientX===0&&T.clientY===0||!T.clientX&&!T.touches)z=Math.round(_.width/2),O=Math.round(_.height/2);else{const{clientX:K,clientY:ne}=T.touches&&T.touches.length>0?T.touches[0]:T;z=Math.round(K-_.left),O=Math.round(ne-_.top)}if(A)N=Math.sqrt((2*_.width**2+_.height**2)/3),N%2===0&&(N+=1);else{const K=Math.max(Math.abs((p?p.clientWidth:0)-z),z)*2+2,ne=Math.max(Math.abs((p?p.clientHeight:0)-O),O)*2+2;N=Math.sqrt(K**2+ne**2)}T!=null&&T.touches?k.current===null&&(k.current=()=>{b({pulsate:B,rippleX:z,rippleY:O,rippleSize:N,cb:$})},g.start(ch,()=>{k.current&&(k.current(),k.current=null)})):b({pulsate:B,rippleX:z,rippleY:O,rippleSize:N,cb:$})},[i,b,g]),w=ae.useCallback(()=>{v({},{pulsate:!0})},[v]),P=ae.useCallback((T,C)=>{if(g.clear(),(T==null?void 0:T.type)==="touchend"&&k.current){k.current(),k.current=null,g.start(0,()=>{P(T,C)});return}k.current=null,d($=>$.length>0?$.slice(1):$),f.current=C},[g]);return ae.useImperativeHandle(r,()=>({pulsate:w,start:v,stop:P}),[w,v,P]),c.jsx(fh,{className:at(wt.root,a.root,s),ref:m,...o,children:c.jsx(is,{component:null,exit:!0,children:l})})});process.env.NODE_ENV!=="production"&&(ec.propTypes={center:j.bool,classes:j.object,className:j.string});function mh(e){return hr("MuiButtonBase",e)}const xh=Dr("MuiButtonBase",["root","disabled","focusVisible"]),gh=e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:n,classes:i}=e,s=un({root:["root",t&&"disabled",r&&"focusVisible"]},mh,i);return r&&n&&(s.root+=` ${n}`),s},yh=gt("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"},[`&.${xh.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),tc=ae.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:a=!1,children:s,className:o,component:l="button",disabled:d=!1,disableRipple:h=!1,disableTouchRipple:f=!1,focusRipple:u=!1,focusVisibleClassName:g,LinkComponent:k="a",onBlur:m,onClick:b,onContextMenu:v,onDragLeave:w,onFocus:P,onFocusVisible:T,onKeyDown:C,onKeyUp:$,onMouseDown:B,onMouseLeave:A,onMouseUp:I,onTouchEnd:p,onTouchMove:_,onTouchStart:z,tabIndex:O=0,TouchRippleProps:N,touchRippleRef:K,type:ne,...me}=n,ue=ae.useRef(null),G=Qf(),L=So(G.ref,K),[Y,de]=ae.useState(!1);d&&Y&&de(!1),ae.useImperativeHandle(i,()=>({focusVisible:()=>{de(!0),ue.current.focus()}}),[]);const fe=G.shouldMount&&!h&&!d;ae.useEffect(()=>{Y&&u&&!h&&G.pulsate()},[h,u,Y,G]);const pe=Nt(G,"start",B,f),ge=Nt(G,"stop",v,f),q=Nt(G,"stop",w,f),te=Nt(G,"stop",I,f),se=Nt(G,"stop",E=>{Y&&E.preventDefault(),A&&A(E)},f),oe=Nt(G,"start",z,f),le=Nt(G,"stop",p,f),Se=Nt(G,"stop",_,f),Q=Nt(G,"stop",E=>{Co(E.target)||de(!1),m&&m(E)},!1),De=Yn(E=>{ue.current||(ue.current=E.currentTarget),Co(E.target)&&(de(!0),T&&T(E)),P&&P(E)}),He=()=>{const E=ue.current;return l&&l!=="button"&&!(E.tagName==="A"&&E.href)},Ze=Yn(E=>{u&&!E.repeat&&Y&&E.key===" "&&G.stop(E,()=>{G.start(E)}),E.target===E.currentTarget&&He()&&E.key===" "&&E.preventDefault(),C&&C(E),E.target===E.currentTarget&&He()&&E.key==="Enter"&&!d&&(E.preventDefault(),b&&b(E))}),ee=Yn(E=>{u&&E.key===" "&&Y&&!E.defaultPrevented&&G.stop(E,()=>{G.pulsate(E)}),$&&$(E),b&&E.target===E.currentTarget&&He()&&E.key===" "&&!E.defaultPrevented&&b(E)});let ce=l;ce==="button"&&(me.href||me.to)&&(ce=k);const re={};ce==="button"?(re.type=ne===void 0?"button":ne,re.disabled=d):(!me.href&&!me.to&&(re.role="button"),d&&(re["aria-disabled"]=d));const he=So(r,ue),y={...n,centerRipple:a,component:l,disabled:d,disableRipple:h,disableTouchRipple:f,focusRipple:u,tabIndex:O,focusVisible:Y},S=gh(y);return c.jsxs(yh,{as:ce,className:at(S.root,o),ownerState:y,onBlur:Q,onClick:b,onContextMenu:ge,onFocus:De,onKeyDown:Ze,onKeyUp:ee,onMouseDown:pe,onMouseLeave:se,onMouseUp:te,onDragLeave:q,onTouchEnd:le,onTouchMove:Se,onTouchStart:oe,ref:he,tabIndex:d?-1:O,type:ne,...re,...me,children:[s,fe?c.jsx(ec,{ref:L,center:a,...N}):null]})});function Nt(e,t,r,n=!1){return Yn(i=>(r&&r(i),n||e[t](i),!0))}process.env.NODE_ENV!=="production"&&(tc.propTypes={action:Hf,centerRipple:j.bool,children:j.node,classes:j.object,className:j.string,component:Gf,disabled:j.bool,disableRipple:j.bool,disableTouchRipple:j.bool,focusRipple:j.bool,focusVisibleClassName:j.string,href:j.any,LinkComponent:j.elementType,onBlur:j.func,onClick:j.func,onContextMenu:j.func,onDragLeave:j.func,onFocus:j.func,onFocusVisible:j.func,onKeyDown:j.func,onKeyUp:j.func,onMouseDown:j.func,onMouseLeave:j.func,onMouseUp:j.func,onTouchEnd:j.func,onTouchMove:j.func,onTouchStart:j.func,sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object]),tabIndex:j.number,TouchRippleProps:j.object,touchRippleRef:j.oneOfType([j.func,j.shape({current:j.shape({pulsate:j.func.isRequired,start:j.func.isRequired,stop:j.func.isRequired})})]),type:j.oneOfType([j.oneOf(["button","reset","submit"]),j.string])});function vh(e){return hr("MuiCircularProgress",e)}Dr("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Qt=44,Aa=Pr.keyframes`
|
|
149
149
|
0% {
|
|
150
150
|
transform: rotate(0deg);
|
|
151
151
|
}
|
|
@@ -153,7 +153,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
153
153
|
100% {
|
|
154
154
|
transform: rotate(360deg);
|
|
155
155
|
}
|
|
156
|
-
`,
|
|
156
|
+
`,_a=Pr.keyframes`
|
|
157
157
|
0% {
|
|
158
158
|
stroke-dasharray: 1px, 200px;
|
|
159
159
|
stroke-dashoffset: 0;
|
|
@@ -168,16 +168,16 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
168
168
|
stroke-dasharray: 1px, 200px;
|
|
169
169
|
stroke-dashoffset: -126px;
|
|
170
170
|
}
|
|
171
|
-
`,
|
|
172
|
-
animation: ${
|
|
173
|
-
`:null,
|
|
174
|
-
animation: ${
|
|
175
|
-
`:null,
|
|
176
|
-
`)):null),classes:k.object,className:k.string,color:k.oneOfType([k.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),k.string]),disabled:k.bool,disableFocusRipple:k.bool,disableRipple:k.bool,edge:k.oneOf(["end","start",!1]),id:k.string,loading:k.bool,loadingIndicator:k.node,size:k.oneOfType([k.oneOf(["small","medium","large"]),k.string]),sx:k.oneOfType([k.arrayOf(k.oneOfType([k.func,k.object,k.bool])),k.func,k.object])});const bo=yt(c.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility"),wo=yt(c.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff"),wh=yt(c.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),rs=yt(c.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),oi=yt(c.jsx("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5z"}),"FileUploadOutlined"),Sh=yt(c.jsx("path",{d:"M19 5v14H5V5zm0-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-2m-4.86 8.86-3 3.87L9 13.14 6 17h12z"}),"ImageOutlined"),J={primary:{main:"#2C5EFF",contrastText:"#FFFFFF"},secondary:{main:"#00B894",contrastText:"#FFFFFF"},error:{main:"#E53935"},warning:{main:"#FB8C00"},info:{main:"#1E88E5"},success:{main:"#43A047"},background:{default:"#FFFFFF",paper:"#FFFFFF"},text:{primary:"#111827",secondary:"#6B7280",disabled:"#9CA3AF"},divider:"#E5E7EB"},So=e=>{const t=e.replace("#",""),r=parseInt(t.length===3?t.split("").map(n=>n+n).join(""):t,16);return{r:r>>16&255,g:r>>8&255,b:r&255}},Ch=(e,t,r)=>"#"+[e,t,r].map(n=>{const i=Math.round(Math.min(255,Math.max(0,n))).toString(16);return i.length===1?"0"+i:i}).join(""),Nt=(e,t,r)=>{const n=So(e),i=So(t);return Ch(n.r+(i.r-n.r)*r,n.g+(i.g-n.g)*r,n.b+(i.b-n.b)*r)},ns=e=>{const t="#FFFFFF",r="#000000";return{50:Nt(t,e,.08),100:Nt(t,e,.16),200:Nt(t,e,.28),300:Nt(t,e,.4),400:Nt(t,e,.55),500:e,600:Nt(e,r,.1),700:Nt(e,r,.2),800:Nt(e,r,.3),900:Nt(e,r,.42)}},Eh=ns(J.primary.main),kh=ns(J.secondary.main),lt=ns(J.text.primary),Th={primary:J.primary.main,secondary:J.secondary.main,textPrimary:J.text.primary,textSecondary:J.text.secondary,divider:J.divider,background:J.background},li=({hasError:e,sx:t,labelText:r,labelVariant:n="subtitle2",endAdornment:i,endorsementText:a,endorsementBg:s="#E6E8EC",endorsementColor:o="#111827",endorsementRadius:l="6px",endorsementHeight:d=28,endorsementPaddingX:f="8px",...p})=>{var h,C;const m=!!r,y=a?c.jsx(x.Box,{component:"span",sx:{display:"inline-flex",flex:"0 0 auto",width:"auto",maxWidth:"100%",alignItems:"center",height:d,paddingLeft:f,paddingRight:f,borderRadius:l,backgroundColor:s,color:o,fontSize:12,fontWeight:300,lineHeight:1,whiteSpace:"nowrap"},children:a}):null,T={...p.InputProps,endAdornment:y||i?c.jsxs(x.InputAdornment,{sx:{mr:-1},position:"end",children:[y||i,(h=p.InputProps)==null?void 0:h.endAdornment]}):(C=p.InputProps)==null?void 0:C.endAdornment};return c.jsxs(x.Box,{children:[m&&c.jsx(x.Typography,{variant:n,sx:{color:J.text.primary,mb:.5,fontWeight:500},children:r}),c.jsx(x.TextField,{fullWidth:!0,size:"small",...p,InputProps:T,label:m?void 0:p.label,sx:{"& .MuiOutlinedInput-root":{backgroundColor:J.background.paper,borderRadius:"8px","& fieldset":{borderColor:J.divider},"&:hover fieldset":{borderColor:lt[300]},"&.Mui-focused fieldset":{borderColor:lt[400]},"&.Mui-error fieldset":{borderColor:J.error.main}},"& .MuiInputBase-input":{color:J.text.primary},"& .MuiFormLabel-root":{color:J.text.secondary},"& .MuiFormLabel-root.Mui-focused":{color:J.text.primary},"& .MuiFormHelperText-root":{color:e?J.error.main:J.text.secondary},...t}})]})},is=({labelText:e,label:t,options:r,loading:n,helperText:i,size:a="small",labelVariant:s="subtitle2",placeholder:o,value:l,sx:d,...f})=>{const p=$.useId(),m=l==null||l===""||Array.isArray(l)&&l.length===0,y=T=>c.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...T,children:c.jsx("path",{d:"M6 9l6 6 6-6",stroke:J.text.secondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});return c.jsxs(x.FormControl,{fullWidth:!0,size:a,error:!!f.error,variant:"outlined",children:[e&&c.jsx(x.Typography,{variant:s,sx:{color:J.text.primary,mb:.5,fontWeight:500},children:e}),t&&c.jsx(x.InputLabel,{id:p,shrink:!m||!!o,sx:{color:J.text.secondary,"&.Mui-focused":{color:J.text.primary},"&.Mui-error":{color:J.error.main}},children:t}),c.jsx(x.Select,{...f,value:l,labelId:t?p:void 0,label:t,displayEmpty:!0,input:c.jsx(x.OutlinedInput,{label:t}),IconComponent:y,renderValue:T=>{const h=T;if(m)return c.jsx("span",{style:{color:J.text.secondary},children:o??""});const C=r.find(v=>v.value===h);return(C==null?void 0:C.label)??String(h)},endAdornment:n?c.jsx(x.CircularProgress,{size:20}):void 0,MenuProps:{PaperProps:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${J.divider}`,mt:.5,borderRadius:"8px"}}},sx:{backgroundColor:J.background.paper,boxShadow:"none",borderRadius:"8px",height:"40px","& .MuiSelect-select":{color:J.text.primary,fontSize:14,pr:3},"& .MuiOutlinedInput-notchedOutline":{borderColor:J.divider},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:lt[300]},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:lt[400]},"&.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:J.error.main},"& svg":{right:8,position:"absolute",pointerEvents:"none"},...d},children:n?c.jsx(x.MenuItem,{disabled:!0,children:c.jsx(x.CircularProgress,{size:16})}):r.map(T=>c.jsx(x.MenuItem,{value:T.value,sx:{backgroundColor:J.background.paper,color:J.text.primary,fontSize:14,mx:1,"&:hover":{backgroundColor:lt[50],borderRadius:"4px"},"&.Mui-selected":{backgroundColor:lt[50],borderRadius:"4px"}},children:T.label},T.value))}),i&&c.jsx(x.FormHelperText,{children:i})]})},jh=e=>c.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:c.jsx("path",{d:"M6 9l6 6 6-6",stroke:J.text.secondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Yl=({id:e,options:t,value:r,multiple:n,label:i,labelText:a,placeholder:s,onChange:o,labelVariant:l="subtitle2",disabled:d,loading:f,error:p,helperText:m,onOpen:y,noOptionsText:T,sx:h})=>c.jsxs(x.Box,{children:[a&&c.jsx(x.Typography,{variant:l,sx:{color:J.text.primary,mb:.5,fontWeight:500},children:a}),c.jsx(x.Autocomplete,{id:e,options:t,value:r,multiple:n,size:"small",popupIcon:c.jsx(jh,{}),disabled:d,loading:f,onOpen:y,noOptionsText:T,fullWidth:!0,componentsProps:{paper:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${J.divider}`,mt:.5,borderRadius:"8px"}}},sx:{"& .MuiOutlinedInput-root":{backgroundColor:J.background.paper,borderRadius:"8px",height:"40px","& fieldset":{borderColor:J.divider},"&:hover fieldset":{borderColor:lt[300]},"&.Mui-focused fieldset":{borderColor:lt[400]},"&.Mui-error fieldset":{borderColor:J.error.main}},"& .MuiInputBase-input":{color:J.text.primary,fontSize:14},"& .MuiAutocomplete-popupIndicator":{color:J.text.secondary},"& .MuiAutocomplete-endAdornment svg":{width:16,height:16},...h},getOptionLabel:C=>typeof C=="string"?C:(C==null?void 0:C.label)??"",isOptionEqualToValue:(C,v)=>((C==null?void 0:C.value)??C)===((v==null?void 0:v.value)??v),renderOption:(C,v,{selected:S})=>c.jsxs(x.Box,{component:"li",...C,sx:{backgroundColor:J.background.paper,color:J.text.primary,mx:.5,borderRadius:"4px","&:hover":{backgroundColor:lt[50]},"&.Mui-focused":{backgroundColor:lt[50]},...S?{backgroundColor:lt[50]}:{}},children:[n&&c.jsx(x.Checkbox,{checked:S}),c.jsx(x.Typography,{variant:"body2",sx:{color:J.text.primary,fontSize:14},children:typeof v=="string"?v:v.label})]}),renderInput:C=>c.jsx(x.TextField,{...C,label:i,placeholder:s,size:"small",error:p,helperText:m,InputLabelProps:{shrink:!!r||!!s,sx:{color:J.text.secondary,"&.Mui-focused":{color:J.text.primary},"&.Mui-error":{color:J.error.main}}},InputProps:{...C.InputProps,endAdornment:c.jsxs(c.Fragment,{children:[f?c.jsx(x.CircularProgress,{size:20}):null,C.InputProps.endAdornment]})}}),onChange:(C,v)=>o(v)})]}),Tr=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>c.jsx(x.FormControlLabel,{control:c.jsx(x.Checkbox,{size:"small",checked:t,disabled:r,onChange:(a,s)=>n(s)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),Zl=({labelText:e,label:t,value:r=[],options:n,row:i=!1,onChange:a,labelPosition:s="top",labelVariant:o="subtitle2",helperText:l,error:d,groupPadding:f=1.5,itemGap:p=1,disabled:m=!1})=>{const y=typeof i=="number"&&i>0,T=y?i:12,h=i===!0,C=i===!1&&!y,v=(S,P)=>{const w=Array.isArray(r)?[...r]:[];P?w.includes(S)||a([...w,S]):a(w.filter(b=>b!==S))};return c.jsxs(x.FormControl,{error:d,disabled:m,sx:S=>{var P;return{display:"flex",flexDirection:"column",px:S.spacing(f),borderRadius:((P=S.shape)==null?void 0:P.borderRadius)||8,mx:-2.5,backgroundColor:S.palette.background.paper}},children:[s==="top"&&e&&c.jsx(x.Typography,{variant:o,sx:S=>({color:S.palette.text.primary,mb:.5,fontSize:S.typography.fontSize,fontWeight:500}),children:e}),t&&c.jsx(x.FormLabel,{sx:S=>({color:S.palette.text.secondary,mb:.5,mx:1,fontSize:S.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:S.palette.text.primary},"&.Mui-error":{color:S.palette.error.main}}),children:t}),y&&c.jsx(x.Box,{sx:S=>({display:"grid",gridTemplateColumns:`repeat(${T}, 1fr)`,gap:S.spacing(p),mt:0}),children:n.map(S=>{const P=Array.isArray(r)&&r.includes(S.value);return c.jsx(x.FormControlLabel,{control:c.jsx(x.Checkbox,{size:"small",checked:P,onChange:w=>v(S.value,w.target.checked),disabled:m,sx:w=>({color:w.palette.text.secondary,"&.Mui-checked":{color:w.palette.primary.main}})}),label:S.label,sx:w=>({m:0,"& .MuiFormControlLabel-label":{color:w.palette.text.primary,fontSize:12}})},String(S.value))})}),h&&c.jsx(x.Box,{sx:S=>({display:"flex",flexDirection:"row",flexWrap:"wrap",gap:S.spacing(p),alignItems:"center",mt:0}),children:n.map(S=>{const P=Array.isArray(r)&&r.includes(S.value);return c.jsx(x.FormControlLabel,{control:c.jsx(x.Checkbox,{size:"small",checked:P,onChange:w=>v(S.value,w.target.checked),disabled:m,sx:w=>({color:w.palette.text.secondary,"&.Mui-checked":{color:w.palette.primary.main}})}),label:S.label,sx:w=>({m:0,"& .MuiFormControlLabel-label":{color:w.palette.text.primary,fontSize:12}})},String(S.value))})}),C&&c.jsx(x.Box,{sx:S=>({display:"flex",flexDirection:"column",gap:S.spacing(p),alignItems:"flex-start",mt:0}),children:n.map(S=>{const P=Array.isArray(r)&&r.includes(S.value);return c.jsx(x.FormControlLabel,{control:c.jsx(x.Checkbox,{size:"small",checked:P,onChange:w=>v(S.value,w.target.checked),disabled:m,sx:w=>({color:w.palette.text.secondary,"&.Mui-checked":{color:w.palette.primary.main}})}),label:S.label,sx:w=>({m:0,"& .MuiFormControlLabel-label":{color:w.palette.text.primary,fontSize:12}})},String(S.value))})}),l&&c.jsx(x.FormHelperText,{sx:{mt:.5},children:l})]})},ci=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>c.jsx(x.FormControlLabel,{control:c.jsx(x.Switch,{checked:t,disabled:r,onChange:(a,s)=>n(s)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),ja=({labelText:e,label:t,value:r,options:n,row:i=!1,onChange:a,labelPosition:s="top",labelVariant:o="subtitle2",helperText:l,error:d,groupPadding:f=1.5,itemGap:p=1})=>c.jsxs(x.FormControl,{error:d,sx:m=>{var y;return{display:"flex",flexDirection:"column",px:m.spacing(f),borderRadius:((y=m.shape)==null?void 0:y.borderRadius)||8,mx:-2.5,backgroundColor:m.palette.background.paper}},children:[s==="top"&&e&&c.jsx(x.Typography,{variant:o,sx:m=>({color:m.palette.text.primary,mb:.5,fontSize:m.typography.fontSize,fontWeight:500}),children:e}),t&&c.jsx(x.FormLabel,{sx:m=>({color:m.palette.text.secondary,mb:.5,mx:1,fontSize:m.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:m.palette.text.primary},"&.Mui-error":{color:m.palette.error.main}}),children:t}),c.jsx(x.RadioGroup,{row:i,value:r,onChange:m=>a(m.target.value),sx:m=>({display:"flex",flexDirection:i?"row":"column",gap:m.spacing(p),alignItems:i?"center":"flex-start"}),children:n.map(m=>c.jsx(x.FormControlLabel,{value:m.value,control:c.jsx(x.Radio,{size:"small",sx:y=>({color:y.palette.text.secondary,"&.Mui-checked":{color:y.palette.primary.main}})}),label:c.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",gap:0},children:[c.jsx(x.Typography,{variant:"body2",sx:{color:"#1a1a1a",fontSize:12,fontWeight:400,lineHeight:1.5},children:m.label}),m.description&&c.jsx(x.Typography,{variant:"caption",sx:{color:"#1a1a1a",fontSize:10,fontWeight:300,lineHeight:1.5},children:m.description})]}),sx:{m:0,gap:.5,"& .MuiFormControlLabel-label":{marginLeft:0},"& .MuiRadio-root":{alignSelf:"flex-start",marginTop:0}}},String(m.value)))}),l&&c.jsx(x.FormHelperText,{sx:{mt:.5},children:l})]}),as=({labelPosition:e="inner",labelVariant:t="subtitle2",label:r,sx:n,...i})=>c.jsxs(x.Box,{children:[e==="top"&&r&&c.jsx(x.Typography,{variant:t,sx:{color:"#111827",mb:.5},children:r}),c.jsx(x.TextField,{fullWidth:!0,type:"date",size:"small",label:e==="inner"?r:void 0,InputLabelProps:{shrink:!0},...i,sx:{"& .MuiOutlinedInput-root":{backgroundColor:"#FFFFFF",borderRadius:"8px","& fieldset":{borderColor:"#E5E7EB"},"&:hover fieldset":{borderColor:"#D1D5DB"},"&.Mui-focused fieldset":{borderColor:"#D1D5DB"},"&.Mui-error fieldset":{borderColor:"#E53935"}},"& .MuiInputBase-input":{color:"#111827",fontSize:14},...n}})]}),Xl=({labelText:e,labelVariant:t="subtitle2",hasError:r,sx:n,label:i,...a})=>{const s=!!e;return c.jsxs(x.Box,{children:[s&&c.jsx(x.Typography,{variant:t,sx:{color:J.text.primary,mb:.5,fontWeight:500},children:e}),c.jsx(x.TextField,{fullWidth:!0,multiline:!0,minRows:3,size:"small",...a,label:s?void 0:i,sx:{"& .MuiOutlinedInput-root":{backgroundColor:J.background.paper,borderRadius:"8px","& fieldset":{borderColor:J.divider},"&:hover fieldset":{borderColor:lt[300]},"&.Mui-focused fieldset":{borderColor:lt[400]},"&.Mui-error fieldset":{borderColor:J.error.main}},"& .MuiInputBase-input":{color:J.text.primary,fontSize:14},"& .MuiFormLabel-root":{color:J.text.secondary},"& .MuiFormLabel-root.Mui-focused":{color:J.text.primary},"& .MuiFormHelperText-root":{color:r?J.error.main:J.text.secondary},...n}})]})},Jl=({title:e,subtitle:t,actions:r,align:n="left",sx:i})=>c.jsxs(x.Box,{sx:a=>({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:a.spacing(1),py:a.spacing(1),...i}),children:[c.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",minWidth:0,flex:1,textAlign:n},children:[e&&c.jsx(x.Typography,{variant:"h6",sx:a=>({color:a.palette.text.primary,fontSize:12,fontWeight:600,lineHeight:1.3}),children:e}),t&&c.jsx(x.Typography,{variant:"body2",sx:a=>({color:a.palette.text.secondary,mt:e?.5:0,fontSize:12,fontWeight:300}),children:t})]}),r&&c.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:r})]}),Oh=()=>c.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c.jsx("g",{"clip-path":"url(#clip0_5814_24904)",children:c.jsx("path",{d:"M11 18C11 19.1 10.1 20 9 20C7.9 20 7 19.1 7 18C7 16.9 7.9 16 9 16C10.1 16 11 16.9 11 18ZM9 10C7.9 10 7 10.9 7 12C7 13.1 7.9 14 9 14C10.1 14 11 13.1 11 12C11 10.9 10.1 10 9 10ZM9 4C7.9 4 7 4.9 7 6C7 7.1 7.9 8 9 8C10.1 8 11 7.1 11 6C11 4.9 10.1 4 9 4ZM15 8C16.1 8 17 7.1 17 6C17 4.9 16.1 4 15 4C13.9 4 13 4.9 13 6C13 7.1 13.9 8 15 8ZM15 10C13.9 10 13 10.9 13 12C13 13.1 13.9 14 15 14C16.1 14 17 13.1 17 12C17 10.9 16.1 10 15 10ZM15 16C13.9 16 13 16.9 13 18C13 19.1 13.9 20 15 20C16.1 20 17 19.1 17 18C17 16.9 16.1 16 15 16Z",fill:"#056739","fill-opacity":"0.5"})}),c.jsx("defs",{children:c.jsx("clipPath",{id:"clip0_5814_24904",children:c.jsx("rect",{width:"24",height:"24",fill:"white"})})})]});function Fh({items:e,getId:t,onReorder:r,header:n,disabled:i,sx:a,getText:s,showIndex:o=!0,showLeftIcon:l=!0,renderItem:d,chipText:f,helperText:p}){const[m,y]=$.useState(null),[T,h]=$.useState(null),C=w=>b=>{if(!i){y(w),b.dataTransfer.effectAllowed="move";try{b.dataTransfer.setData("text/plain",String(t(e[w])))}catch{}}},v=w=>b=>{i||(b.preventDefault(),h(w),b.dataTransfer.dropEffect="move")},S=w=>b=>{if(i)return;if(b.preventDefault(),m===null||m===w){y(null),h(null);return}const _=[...e],[z]=_.splice(m,1);_.splice(w,0,z),y(null),h(null),r(_)},P=()=>{y(null),h(null)};return c.jsxs(x.Box,{role:"list",sx:w=>({display:"flex",flexDirection:"column",gap:w.spacing(1),...a}),children:[n,c.jsx(x.Divider,{sx:{mt:-.5,mb:1,dividerColor:"#EBEBEB"}}),e.map((w,b)=>{const _=m===b,z=T===b&&m!==null&&m!==b;return c.jsx(x.Box,{role:"listitem",draggable:!i,onDragStart:C(b),onDragOver:v(b),onDrop:S(b),onDragEnd:P,sx:F=>{var D;return{userSelect:"none",cursor:i?"default":"grab",backgroundColor:"#F8F8FA",border:`1px solid ${z?F.palette.primary.main:"#EBEBEB"}`,borderRadius:((D=F.shape)==null?void 0:D.borderRadius)||"8px",padding:F.spacing(1),opacity:_?.6:1,boxShadow:z?`0 0 0 2px ${F.palette.primary.main}33`:"none"}},children:d?d(w,_):c.jsxs(x.Box,{sx:F=>({display:"flex",alignItems:"center",gap:F.spacing(1),minWidth:0}),children:[l&&c.jsx(Oh,{}),o&&c.jsxs(x.Typography,{variant:"body2",sx:F=>({fontWeight:600,fontSize:14,color:`${F.palette.text.primary}`,flex:"0 0 auto"}),children:[b+1,"."]}),(()=>{const F=typeof f=="function"?f(w,b):f;return F?c.jsx(x.Chip,{label:F,sx:{borderRadius:"4px",p:"12px 3px"},size:"small"}):null})(),c.jsx(x.Typography,{variant:"body2",sx:F=>({fontSize:12,fontWeight:500,color:`${F.palette.text.primary}90`,flex:1,minWidth:0,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),children:s?s(w):""})]})},String(t(w)))}),p?typeof p=="string"?c.jsx(x.Typography,{variant:"caption",sx:w=>({color:`${w.palette.text.primary}60`}),children:p}):p:null]})}const Ah=mt(x.StepConnector)(()=>({[`&.${x.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${x.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,borderColor:"#E8E8E8",transition:"border-color 0.3s ease"},[`&.${x.stepConnectorClasses.completed} .${x.stepConnectorClasses.line}`]:{borderColor:J.primary.main}})),_h=({items:e,activeIndex:t=1,onStepClick:r,sx:n})=>{const i=a=>{const{active:s,completed:o,icon:l}=a;return o?c.jsx(x.Box,{sx:{width:24,height:24,border:`1.2px solid ${J.primary.main}`,borderRadius:"50%",backgroundColor:J.primary.main,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:c.jsx(rs,{sx:{fontSize:16,fontWeight:600}})}):s?c.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${J.primary.main}`,backgroundColor:St(J.primary.main,.2),color:J.primary.main,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:l}):c.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#E8E8E8",color:J.text.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:l})};return c.jsx(x.Stepper,{orientation:"vertical",activeStep:t,connector:c.jsx(Ah,{}),sx:{"& .MuiStepConnector-vertical":{my:-1.1},"& .MuiStepLabel-label":{fontSize:14,color:J.text.primary,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((a,s)=>c.jsxs(x.Step,{onClick:()=>r==null?void 0:r(s),completed:s<t,children:[c.jsx(x.StepLabel,{StepIconComponent:i,children:c.jsx(x.Typography,{sx:{fontSize:12,fontWeight:500,color:s===t?J.primary.main:J.text.primary},children:a.label})}),s!==e.length-1&&c.jsx(x.Divider,{sx:{ml:4.2,borderColor:J.divider}})]},s))})},ec=({colorKey:e="primary",colorHex:t,tone:r="soft",bgAlpha:n=.12,borderAlpha:i=.24,sx:a,...s})=>c.jsx(x.Chip,{...s,sx:o=>({fontWeight:600,borderRadius:"4px",height:18,border:`0.5px solid ${St(t||o.palette.text.primary,.5)}`,backgroundColor:St(t||o.palette.text.primary,.1),"& .MuiChip-label":{p:"8px",color:t||o.palette.text.primary,fontSize:10,fontWeight:500},...a})}),Rh=mt(x.StepConnector)(()=>({[`&.${x.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${x.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,height:"70px",borderColor:"#E8E8E8",transition:"border-color 0.3s ease",zIndex:-1},[`&.${x.stepConnectorClasses.completed} .${x.stepConnectorClasses.line}`]:{borderColor:J.primary.main}})),$h=({items:e,activeIndex:t=1,onStepClick:r,sx:n})=>{const[i,a]=$.useState(null),s=o=>{const{active:l,completed:d,icon:f}=o;return d?c.jsx(x.Box,{sx:{width:24,height:24,border:`1.2px solid ${J.primary.main}`,borderRadius:"50%",backgroundColor:J.primary.main,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},children:c.jsx(rs,{sx:{fontSize:16,fontWeight:600}})}):l?c.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${J.primary.main}`,backgroundColor:St(J.primary.main,.2),color:J.primary.main,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3,overflow:"hidden"},children:f}):c.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#E8E8E8",color:J.text.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3},children:f})};return c.jsx(x.Stepper,{orientation:"vertical",activeStep:t,connector:c.jsx(Rh,{}),sx:{"& .MuiStepConnector-vertical":{my:-3.5},"& .MuiStepLabel-label":{fontSize:14,color:J.text.primary,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((o,l)=>c.jsxs(x.Step,{onMouseEnter:()=>a(l),onMouseLeave:()=>a(null),onClick:()=>r==null?void 0:r(l),completed:l<t,children:[c.jsxs(x.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[c.jsxs(x.StepLabel,{StepIconComponent:s,children:[c.jsxs(x.Box,{sx:{display:"flex",gap:1,alignItems:"center"},children:[c.jsx(x.Typography,{sx:{fontSize:14,fontWeight:500,color:l===t?J.primary.main:J.text.primary},children:o.label}),c.jsx(ec,{size:"small",colorHex:l<t?J.success.main:l===t?"#973B00":J.text.primary,label:l<t?"Completed":l===t?"In progress":"Not started"})]}),c.jsx(x.Typography,{sx:{fontSize:12,fontWeight:400,color:`${J.text.primary}60`,mt:.5,width:"80%"},children:o.description})]}),i===l&&c.jsx(x.Button,{sx:{display:l>t?"none":"block"},variant:l<t?"outlined":"contained",size:"small",color:"primary",children:l<t?"Edit":l===t?"Complete":""})]}),l!==e.length-1&&c.jsx(x.Divider,{sx:{ml:4.2,borderColor:J.divider}})]},l))})},Dh=yt(c.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined"),Ph=({variant:e="list",title:t,subtitle:r,text:n,items:i=[],icon:a,colorHex:s,sx:o})=>{const l=s||J.info.main,d=St(l,.08),f=St(l,.08),p=a??c.jsx(Dh,{sx:{color:l,fontSize:18}});return e==="inlineInfo"?c.jsxs(x.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:d,border:`1px solid ${f}`,boxShadow:"none",...o},children:[c.jsx(x.Box,{sx:{display:"flex",alignItems:"center"},children:p}),c.jsx(x.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:l},children:n})]}):e==="inline"?c.jsx(x.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:d,border:`1px solid ${f}`,boxShadow:"none",...o},children:c.jsx(x.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:l},children:n})}):e==="listWithHeader"?c.jsxs(x.Card,{sx:{p:2,boxShadow:"none",borderRadius:"6px",backgroundColor:d,border:`1px solid ${f}`,...o},children:[c.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[p,c.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:600,color:l,fontSize:14,lineHeight:1.3},children:t})]}),r&&c.jsx(x.Typography,{variant:"body2",sx:{mt:.5,color:l,fontSize:10,lineHeight:1.3},children:r}),c.jsx(x.List,{sx:{pl:5,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:l},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:400,lineHeight:"18px",color:l,my:-.5}},children:i.map((m,y)=>c.jsx(x.ListItem,{sx:{py:0},children:c.jsx(x.ListItemText,{primary:m})},y))})]}):c.jsx(x.Card,{sx:{p:"11px",borderRadius:"8px",backgroundColor:d,border:`0.5px solid ${f}`,boxShadow:"none",...o},children:c.jsx(x.List,{sx:{pl:4,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:l},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:600,lineHeight:"18px",color:l,my:-.5}},children:i.map((m,y)=>c.jsx(x.ListItem,{sx:{py:0},children:c.jsx(x.ListItemText,{primary:m})},y))})})},tc=({value:e,onChange:t,items:r,ariaLabel:n,sx:i,tabSx:a})=>c.jsxs(x.Box,{children:[c.jsx(x.Tabs,{value:e,onChange:(s,o)=>t(o),"aria-label":n||"Fin tabs",sx:{alignItems:"center",borderRadius:"6px",p:"8px 10px",backgroundColor:"#F2F2F2","& .MuiTabs-flexContainer":{gap:1},"& .MuiTabs-indicator":{display:"none"},...i},children:r.map((s,o)=>{const l=typeof s.value=="string"||typeof s.value=="number"?s.value:o;return c.jsx(x.Tab,{value:l,disabled:s.disabled,label:c.jsx(x.Typography,{variant:"body2",children:s.label}),sx:d=>({px:2,textTransform:"none",color:d.palette.primary.main,boxShadow:"none",borderRadius:"3px",border:"0.5px solid #0000001A",backgroundColor:"#E8E8E8","&:hover":{backgroundColor:d.palette.action.hover},"&.Mui-selected":{color:d.palette.common.white,borderColor:d.palette.primary.main,backgroundColor:d.palette.primary.main,fontWeight:600},...a})},String(l))})}),r.map((s,o)=>{const l=typeof s.value=="string"||typeof s.value=="number"?s.value:o,d=s.content??(typeof s.value=="object"?s.value:null);return d&&e===l?c.jsx(x.Box,{sx:{mt:1},children:d},`panel-${l}`):null})]}),zn=yt(c.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),Mh=yt(c.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline"),rc=({name:e,columns:t,initialRow:r,addLabel:n,rowDeletable:i=!0,control:a,sx:s,addActions:o,emptyTitle:l="No items configured",emptySubtitle:d="Click 'Add' to get started.",emptyCardSx:f,setValue:p,rowSelectionMode:m,rowSelectionKey:y})=>{const{fields:T,append:h,remove:C}=nu({control:a,name:e}),v=$.useMemo(()=>{if(y)return y;const D=t.find(u=>u.type==="rowSelect");return D==null?void 0:D.key},[t,y]),S=al({control:a,name:e})||[],P=$.useMemo(()=>{if(!v)return{};const D={};return S.forEach((u,M)=>{D[M]=!!(u!=null&&u[v])}),D},[S,v]),w=$.useCallback(D=>P[D]===!0,[P]),b=$.useCallback((D,u)=>{if(!p||!v)return;const M=`${e}.${D}.${v}`;m==="single"&&u&&S.forEach((N,A)=>{if(A!==D){const L=`${e}.${A}.${v}`;p(L,!1,{shouldDirty:!0})}}),p(M,u,{shouldDirty:!0})},[e,v,m,p,S]),_=D=>{const u={...D||r};t.forEach(M=>{M.value!==void 0&&u[M.key]===void 0&&(u[M.key]=typeof M.value=="function"?M.value(u,T.length):M.value)}),h(u)},z=$.useMemo(()=>t.reduce((u,M)=>{if(M.width==="auto"||M.width===void 0)return u+120;const N=typeof M.width=="number"?M.width:typeof M.width=="string"&&parseInt(M.width)||160;return u+N},0)+(i?100:0),[t,i]),F=D=>D.width==="auto"||D.width===void 0?{width:"auto",minWidth:120,maxWidth:"none"}:typeof D.width=="number"?{width:`${D.width}px`,minWidth:`${D.width}px`,maxWidth:`${D.width}px`}:typeof D.width=="string"?{width:D.width,minWidth:D.width}:{width:"160px",minWidth:"160px"};return c.jsx(x.Card,{sx:{width:"100%",borderRadius:"4px",boxShadow:"0px 0.783px 3.131px 0px rgba(0,0,0,0.16)",backgroundColor:"#FFFFFF",overflow:"hidden",...s},children:T.length===0?c.jsxs(x.Box,{sx:D=>({p:4,textAlign:"center",borderStyle:"dashed",borderColor:St(D.palette.primary.main,.4),backgroundColor:St(D.palette.primary.main,.04),borderWidth:1,borderRadius:"8px",...f}),children:[c.jsx(x.Typography,{variant:"subtitle1",sx:D=>({color:D.palette.primary.main,fontWeight:600,mb:.5,fontSize:14}),children:l}),c.jsx(x.Typography,{variant:"body2",sx:D=>({color:D.palette.primary.main,mb:2,fontSize:12,fontWeight:400}),children:d}),Array.isArray(o)&&o.length>0?o.map((D,u)=>c.jsx(x.Button,{variant:"outlined",size:"small",startIcon:c.jsx(zn,{}),sx:{mr:1,mt:1},onClick:()=>_(D.template),children:D.label},`empty-add-${u}`)):n&&c.jsx(x.Button,{variant:"outlined",size:"small",startIcon:c.jsx(zn,{}),onClick:()=>_(),children:n})]}):c.jsxs(c.Fragment,{children:[c.jsx(x.Box,{sx:{height:"45px",display:"flex",alignItems:"center",px:1.125,gap:1,py:1.25,borderBottom:"1px solid #E5E6EB"},children:Array.isArray(o)&&o.length>0?o.map((D,u)=>c.jsx(x.Button,{variant:u===0?"contained":"outlined",size:"small",startIcon:c.jsx(zn,{}),onClick:()=>_(D.template),sx:{borderRadius:"3px",fontSize:"10.938px",fontWeight:500,textTransform:"none",px:1.17,py:.586,minWidth:"90px","&:hover":{backgroundColor:u===0?"#04502d":void 0}},children:D.label},`add-${u}`)):n&&c.jsx(x.Button,{variant:"contained",size:"small",startIcon:c.jsx(zn,{}),onClick:()=>_(),sx:{backgroundColor:"#056739",color:"#FFFFFF",borderRadius:"3px",fontSize:"10.938px",fontWeight:500,textTransform:"none",px:1.17,py:.586,minWidth:"90px","&:hover":{backgroundColor:"#04502d"}},children:n})}),c.jsx(x.Box,{sx:{width:"100%",overflow:"auto",maxHeight:"600px","&::-webkit-scrollbar":{height:"8px",width:"8px"},"&::-webkit-scrollbar-track":{backgroundColor:"#f1f1f1"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#888",borderRadius:"4px","&:hover":{backgroundColor:"#555"}}},children:c.jsx(x.TableContainer,{sx:{width:"max-content",minWidth:"100%"},children:c.jsxs(x.Table,{stickyHeader:!0,sx:{minWidth:`${z||650}px`},children:[c.jsx(x.TableHead,{children:c.jsxs(x.TableRow,{children:[t.map(D=>c.jsx(x.TableCell,{sx:{backgroundColor:"#F2F3F5",borderBottom:"1.756px solid #E5E6EB",fontWeight:500,fontSize:"12px",color:"#6B7785",whiteSpace:"nowrap",height:"43px",px:1.75,py:0,...F(D)},children:D.header},D.key)),i&&c.jsx(x.TableCell,{sx:{backgroundColor:"#F2F3F5",borderBottom:"1.756px solid #E5E6EB",fontWeight:500,fontSize:"12px",color:"#6B7785",whiteSpace:"nowrap",height:"43px",px:1.75,py:0,width:100,textAlign:"center"},children:"Actions"})]})}),c.jsx(x.TableBody,{children:T.map((D,u)=>{const M=w(u),N=m&&!M;return c.jsxs(x.TableRow,{children:[t.map(A=>{var ue;const L=`${e}.${u}.${A.key}`,G=A.type==="rowSelect"||A.key===v,se=G?!1:N?!0:typeof A.disabled=="function"?A.disabled(D,u):!!A.disabled;if(A.type==="index"){const K=A.indexFormat?A.indexFormat(u):`#${u+1}`;return c.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",textAlign:((ue=A.cellSx)==null?void 0:ue.textAlign)||"center",...F(A),...A.cellSx},children:K},A.key)}if(A.value!==void 0&&A.editable===!1){const K=typeof A.value=="function"?A.value(D,u):A.value;return c.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",...F(A),...A.cellSx},children:K},A.key)}const me=A.endorsementText?typeof A.endorsementText=="function"?A.endorsementText(D,u):A.endorsementText:void 0;return c.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",...F(A),...A.cellSx},children:A.type==="rowSelect"||G&&A.type==="checkbox"?c.jsx(Pe,{name:L,control:a,defaultValue:!1,render:({field:K})=>c.jsx(Tr,{label:"",checked:!!K.value,disabled:!1,onChange:B=>{K.onChange(B),b(u,B)},sx:A.sx})}):A.type==="checkbox"?c.jsx(Pe,{name:L,control:a,render:({field:K})=>c.jsx(Tr,{label:"",checked:!!K.value,disabled:se,onChange:K.onChange,sx:A.sx})}):A.type==="select"?c.jsx(Pe,{name:L,control:a,render:({field:K})=>c.jsx(is,{...K,fullWidth:!0,disabled:se,options:A.options||[],size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...A.sx},helperText:A.helperText,required:A.required})}):A.type==="date"?c.jsx(Pe,{name:L,control:a,defaultValue:A.value!==void 0?typeof A.value=="function"?A.value(D,u):A.value:void 0,render:({field:K})=>($.useEffect(()=>{if(p&&(K.value===void 0||K.value===null||K.value==="")&&A.value!==void 0){const B=typeof A.value=="function"?A.value(D,u):A.value;p(L,B,{shouldValidate:!1})}},[L,K.value,A.value,D,u,p]),c.jsx(as,{...K,fullWidth:!0,disabled:se,size:"small",placeholder:A.placeholder||"DD/MM/YYYY",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...A.sx},helperText:A.helperText,required:A.required}))}):c.jsx(Pe,{name:L,control:a,defaultValue:A.value!==void 0?typeof A.value=="function"?A.value(D,u):A.value:void 0,render:({field:K})=>($.useEffect(()=>{if(p&&(K.value===void 0||K.value===null||K.value==="")&&A.value!==void 0){const B=typeof A.value=="function"?A.value(D,u):A.value;p(L,B,{shouldValidate:!1})}},[L,K.value,A.value,D,u,p]),c.jsx(li,{...K,fullWidth:!0,type:A.type==="number"?"number":"text",placeholder:A.placeholder,disabled:se,size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...A.sx},helperText:A.helperText,required:A.required,endorsementText:me,endorsementBg:A.endorsementBg,endorsementColor:A.endorsementColor,endorsementRadius:A.endorsementRadius,endorsementHeight:A.endorsementHeight,endorsementPaddingX:A.endorsementPaddingX,inputProps:{...A.type==="number"?{min:A.min,max:A.max,step:A.step}:{minLength:A.minLength,maxLength:A.maxLength,pattern:A.pattern}}}))})},A.key)}),i&&c.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",px:1.5,py:0,borderBottom:"1px solid #E5E6EB",textAlign:"center"},children:c.jsx(x.IconButton,{size:"small",color:"error",onClick:()=>C(u),sx:{width:"20px",height:"20px"},children:c.jsx(Mh,{sx:{fontSize:"20px"}})})})]},D.id)})})]})})})]})})},nc=({name:e,control:t,items:r,sx:n,cardSx:i})=>c.jsx(x.Box,{sx:{display:"flex",flexDirection:"column",gap:1,...n},children:r.map(a=>{const s=!!a.leftAction,o=!!a.rightAction,l=!!(a.header||a.chipText),d=a.leftAction,f=a.rightAction;return c.jsxs(x.Box,{sx:{border:"1px solid #DDDDDD",borderRadius:"8px",height:"40px",display:"flex",alignItems:"center",justifyContent:"space-between",px:1,...i},children:[s&&d&&c.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexShrink:0},children:c.jsx(Pe,{name:d.name,control:t,defaultValue:!1,render:({field:p})=>c.jsx(Tr,{label:d.label||"",checked:!!p.value,onChange:p.onChange,sx:{margin:0}})})}),l&&c.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flex:s||o?1:"none",ml:s?1:0},children:[a.header&&c.jsx(x.Typography,{variant:"body2",sx:{fontSize:"12px",color:"rgba(0,0,0,0.87)",fontWeight:400},children:a.header}),a.chipText&&c.jsx(x.Box,{sx:{bgcolor:"rgba(26,26,26,0.1)",px:1.5,py:.375,borderRadius:"4px",fontSize:"12px",color:"rgba(26,26,26,0.8)"},children:a.chipText})]}),o&&f&&c.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexShrink:0,ml:"auto"},children:c.jsx(Pe,{name:f.name,control:t,defaultValue:!1,render:({field:p})=>c.jsx(ci,{label:f.label,checked:!!p.value,onChange:p.onChange,sx:{margin:0}})})}),!s&&!o&&!l&&c.jsx(x.Box,{sx:{width:"100%",height:"100%"}})]},a.id)})});async function ic(e,t,r,n){try{const{endpoint:i,method:a="GET",valueField:s="value",labelField:o="label",headers:l={},params:d={},body:f,transform:p,passThroughFields:m}=e;let y=i;if(t&&!i.startsWith("http")&&(y=`${t}${i.startsWith("/")?i:`/${i}`}`),n){const w=/\{([^}]+)\}/g;y=y.replace(w,(b,_)=>{const z=n[_];return z!=null?encodeURIComponent(String(z)):""}),y=y.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}const T=new URLSearchParams;Object.entries(d).forEach(([w,b])=>{b!=null&&T.append(w,String(b))}),T.toString()&&(y+=`${y.includes("?")?"&":"?"}${T.toString()}`);try{const w=/^https?:\/\//i.test(y),b=new URL(y,w?void 0:"http://local.placeholder"),_=Array.from(b.searchParams.entries());for(const[z,F]of _)(F===""||F==="undefined"||F==="null")&&b.searchParams.delete(z);w?y=b.toString():y=b.pathname+(b.search?b.search:""),y=y.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}catch{}const h={"Content-Type":"application/json",...r,...l},C={method:a,headers:h};(a==="POST"||a==="PUT")&&f&&(C.body=JSON.stringify(f));const v=await fetch(y,C);if(!v.ok)throw new Error(`API request failed: ${v.status} ${v.statusText}`);const S=await v.json();if(p)return p(Array.isArray(S)?S:S.data||S);const P=Array.isArray(S)?S:S.data||S;if(!Array.isArray(P))throw new Error("API response is not an array");return P.map(w=>{const b={label:w[o]||w.name||w.title||String(w[s]||""),value:w[s]||w.id||w.value||""},_=Array.isArray(m)?m:void 0;if(Array.isArray(_))for(const z of _)w[z]!==void 0&&(b[z]=w[z]);return b})}catch(i){throw console.error("API fetch error:",i),new Error(`Failed to fetch data: ${i instanceof Error?i.message:"Unknown error"}`)}}function ac(e,t,r,n,i=!1){const a=$.useMemo(()=>{if(!(e!=null&&e.dependsOn)||!n)return null;const o=n[e.dependsOn];return o!==void 0?o:null},[e==null?void 0:e.dependsOn,n]),s=$.useMemo(()=>["api-data",e==null?void 0:e.endpoint,e==null?void 0:e.method,e==null?void 0:e.valueField,e==null?void 0:e.labelField,t,a,n?JSON.stringify(n):null],[e==null?void 0:e.endpoint,e==null?void 0:e.method,e==null?void 0:e.valueField,e==null?void 0:e.labelField,t,a,n]);return Lu({queryKey:s,queryFn:()=>{if(!e)throw new Error("API config is required");return ic(e,t,r,n)},enabled:i&&!!e,staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:o=>Math.min(1e3*2**o,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0,refetchOnMount:!1})}function fr(e){return!!(e.apiConfig||e.api_endpoint)}function ss(e){return e.apiConfig?e.apiConfig:e.api_endpoint?{endpoint:e.api_endpoint,method:e.api_method||"GET",valueField:e.value_field||"value",labelField:e.label_field||"label",dependsOn:e.depends_on,conditional:e.conditional}:null}function Ih(e,t){const r=ss(e);if(!(r!=null&&r.conditional)&&!e.conditional)return!0;if(r!=null&&r.dependsOn||e.depends_on){const n=(r==null?void 0:r.dependsOn)||e.depends_on;if(n){const i=t[n];return i!=null&&i!==""}}return!0}const os=({field:e,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:s})=>{const o=r[e.name],l=!!o,[d,f]=$.useState(!1),p=$.useRef(!1),[m,y]=$.useState(!1),[T,h]=$.useState(!1),[C,v]=$.useState(!1),S=$.useRef(null),P=$.useRef(null),w=()=>{var q;return e.required!==void 0?e.required:((q=e.validation)==null?void 0:q.required)!==void 0?e.validation.required:!1},b=q=>w()?`${q} *`:q,_=()=>{if(e.value!==void 0){if(typeof e.value=="function")try{return e.value(a||{})}catch{return""}return e.value}return e.type==="checkbox"?!1:e.type==="select"&&e.default?e.default:e.type==="autocomplete"&&e.multiple?[]:""},z=$.useRef(void 0);$.useEffect(()=>{const q=e.value;if(typeof q!="function"||!s)return;let ee;try{ee=q(a||{})}catch{return}const ae=a?a[e.name]:void 0;if(z.current===void 0&&(z.current=ee),ae===void 0||ae===z.current)try{s(e.name,ee,{shouldValidate:!0,shouldDirty:!1}),z.current=ee}catch{}},[JSON.stringify(Array.isArray(e.valueDeps)&&a?e.valueDeps.reduce((q,ee)=>({...q,[ee]:a[ee]}),{}):a||{}),e.name]);const F=$.useMemo(()=>{const q=ss(e);return q&&Array.isArray(e.passThroughFields)&&(q.passThroughFields=e.passThroughFields),q},[e.apiConfig,e.api_endpoint,e.api_method,e.value_field,e.label_field,e.depends_on,e.conditional,e.passThroughFields]),D=$.useRef(null),u=F!=null&&F.dependsOn?a==null?void 0:a[F.dependsOn]:null,M=$.useMemo(()=>{if(!(F!=null&&F.dependsOn))return!1;const q=u,ee=D.current,ae=q!==ee;return ae&&(D.current=q),ae},[F==null?void 0:F.dependsOn,u]),N=$.useMemo(()=>{const q=e.showWhen;if(typeof q=="function")try{return!!q(a||{})}catch{return!0}if(q&&typeof q=="object"){const ee=q.field,ae=q.equals,oe=q.in,le=ee?(a||{})[ee]:void 0;if(ee&&typeof ae<"u")return le===ae;if(ee&&Array.isArray(oe))return oe.includes(le)}return!0},[e.showWhen,a]),A=$.useCallback(()=>{const q=e.dynamicEndorsement;if(typeof q=="function")try{return q(a||{})}catch{return e.endorsementText}return e.endorsementText},[e,a]),L=$.useCallback(()=>{const q=e.endAdornment,ee=e.endAdornmentSwitch,ae=e.endAdornmentCheckbox;if(ee)return c.jsx(Pe,{name:ee,control:t,defaultValue:e.endAdornmentSwitchDefault??!1,render:({field:oe})=>c.jsx(x.Switch,{checked:oe.value||!1,onChange:le=>{oe.onChange(le.target.checked),e.endAdornmentSwitchOnChange&&e.endAdornmentSwitchOnChange(le.target.checked,a,s)},disabled:e.endAdornmentSwitchDisabled,size:e.endAdornmentSwitchSize||"small",sx:e.endAdornmentSwitchSx})});if(ae)return c.jsx(Pe,{name:ae,control:t,defaultValue:e.endAdornmentCheckboxDefault??!1,render:({field:oe})=>c.jsx(Tr,{label:"",checked:oe.value||!1,onChange:oe.onChange,disabled:e.endAdornmentCheckboxDisabled,sx:e.endAdornmentCheckboxSx})});if(typeof q=="function")try{return q(a||{},{control:t,setValue:s})}catch{return}return q},[e,a,t,s]),G=$.useMemo(()=>d&&fr(e)&&(!(F!=null&&F.dependsOn)||u),[d,e,F==null?void 0:F.dependsOn,u]),se=$.useMemo(()=>{const q={};if(!a)return q;const ee=(F==null?void 0:F.endpoint)||(e==null?void 0:e.api_endpoint);if(ee&&typeof ee=="string"){const ae=ee.match(/\{([^}]+)\}/g)||[];for(const oe of ae){const le=oe.slice(1,-1),Se=a[le];Se!==void 0&&(q[le]=Se)}}if(F!=null&&F.dependsOn){const ae=F.dependsOn,oe=a[ae];oe!==void 0&&(q[ae]=oe)}return q},[F==null?void 0:F.endpoint,e==null?void 0:e.api_endpoint,F==null?void 0:F.dependsOn,a]),{data:me=[],isLoading:ue,error:K}=ac(F,n,i,se,G),B=$.useCallback(()=>{fr(e)&&!p.current&&(p.current=!0,f(!0))},[e]),H=$.useCallback(()=>{fr(e)&&!p.current&&(p.current=!0,f(!0))},[e]);$.useEffect(()=>{if(fr(e)&&!p.current){const q=a==null?void 0:a[e.name];q!=null&&q!==""&&(p.current=!0,f(!0))}},[e,a]),$.useEffect(()=>{fr(e)&&(F!=null&&F.dependsOn)&&M&&p.current&&(p.current=!1,f(!1))},[M,F==null?void 0:F.dependsOn]);const de=$.useCallback(()=>fr(e)?me:e.type==="select"||e.type==="toggle"||e.type==="radio"||e.type==="autocomplete"?e.options||[]:[],[e,me]),fe=()=>{var q,ee,ae,oe,le,Se;switch(e.type){case"title":return c.jsx(x.Typography,{variant:e.variant||"h4",component:"h1",color:e.color,align:e.align||"left",sx:{mb:3,fontWeight:600,...e.sx},children:e.label});case"section":return c.jsx(x.Typography,{variant:e.variant||"h6",component:"h3",color:e.color,align:e.align||"left",sx:{mb:2,fontWeight:600,color:"text.primary",...e.sx},children:e.label});case"finuiHeader":const Q=e.actionName,De=e.actionComponent,He=e.actionLabel,Qe=E=>c.jsx(Jl,{title:e.title||e.label,subtitle:e.subtitle,align:e.align||"left",sx:e.sx,actions:E??e.actions}),X=E=>{if(e.cardWrap){const U={...{px:2,py:1,boxShadow:"none",border:"1px solid #DDDDDD"},...e.cardSx};return c.jsx(x.Card,{sx:U,...e.cardProps,children:E})}return E};return X(Q&&De?c.jsx(Pe,{name:Q,control:t,defaultValue:e.value??!1,render:({field:E})=>Qe(De==="switch"?c.jsx(ci,{label:He,checked:!!E.value,onChange:E.onChange}):c.jsx(Tr,{label:He||"",checked:!!E.value,onChange:E.onChange}))}):Qe());case"tabs":return c.jsx(Pe,{name:e.name,control:t,defaultValue:e.defaultValue??(typeof((ee=(q=e.items)==null?void 0:q[0])==null?void 0:ee.value)=="string"||typeof((oe=(ae=e.items)==null?void 0:ae[0])==null?void 0:oe.value)=="number"?(Se=(le=e.items)==null?void 0:le[0])==null?void 0:Se.value:0),render:({field:E})=>{const j=e.items||[],U=j.map((ie,W)=>({label:ie.label,value:typeof ie.value=="string"||typeof ie.value=="number"?ie.value:W,content:ie.content,disabled:ie.disabled})),R=E.value,I=(()=>{if(typeof R=="string"||typeof R=="number"){const ie=j.findIndex((W,xe)=>typeof W.value=="string"||typeof W.value=="number"?W.value===R:xe===R);return ie>=0?ie:0}return Number(R)||0})(),Y=j[I]||{};return c.jsxs(x.Box,{children:[c.jsx(tc,{value:E.value,onChange:E.onChange,items:U,ariaLabel:e.ariaLabel||e.label,sx:e.sx,tabSx:e.tabSx}),Array.isArray(Y.fields)&&Y.fields.length>0&&(()=>{const ie=Y.fields,W=[];let xe=[];for(const je of ie)je.type==="section"&&xe.length>0?(W.push(xe),xe=[je]):xe.push(je);xe.length>0&&W.push(xe);const Te={p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mt:1};return c.jsx(x.Box,{sx:{mt:1},children:W.map((je,Ve)=>{const qe=je.find(nt=>nt.type==="section"),Ze=(qe==null?void 0:qe.cardWrap)!==!1,Ft=c.jsx(c.Fragment,{children:je.map(nt=>{const ut=Math.min(Math.max(nt.col??12,1),12);return c.jsx(x.Box,{sx:{gridColumn:`span ${ut}`},children:c.jsx(os,{field:nt,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:s})},nt.name)})});return Ze?c.jsx(x.Card,{sx:{...Te,...(qe==null?void 0:qe.cardSx)||{}},...(qe==null?void 0:qe.cardProps)||{},children:Ft},`tab-group-${Ve}`):c.jsx(x.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mt:1},children:Ft},`tab-group-${Ve}`)})})})()]})}});case"grid":const ce=e.defaultRows||[];return c.jsx(Pe,{name:e.name,control:t,defaultValue:ce.length>0?ce:_()||[],render:()=>c.jsx(rc,{name:e.name,columns:e.columns||[],initialRow:e.initialRow||{},addLabel:e.addLabel,rowDeletable:e.rowDeletable!==!1,control:t,setValue:s,addActions:e.addActions,emptyTitle:e.emptyTitle,emptySubtitle:e.emptySubtitle,emptyCardSx:e.emptyCardSx,sx:e.sx,rowSelectionMode:e.rowSelectionMode,rowSelectionKey:e.rowSelectionKey})});case"listcards":return c.jsx(nc,{name:e.name,control:t,items:e.items||[],sx:e.sx,cardSx:e.cardSx});case"text":case"email":case"password":case"tel":case"textarea":return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>e.type==="textarea"?c.jsx(Xl,{...E,labelText:e.labelPosition==="top"?b(e.label):void 0,label:e.labelPosition!=="top"?b(e.label):void 0,labelVariant:e.labelVariant,placeholder:e.placeholder,disabled:e.disabled,hasError:l,helperText:(o==null?void 0:o.message)||e.helperText}):c.jsx(li,{...E,id:e.id,labelText:e.labelPosition==="top"?b(e.label):void 0,label:e.labelPosition!=="top"?b(e.label):void 0,endAdornment:L(),endorsementText:A(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:e.type==="password"?m?"text":"password":e.type,placeholder:e.placeholder,disabled:e.disabled,hasError:l,helperText:(o==null?void 0:o.message)||e.helperText,InputProps:e.type==="password"?{endAdornment:c.jsx(Wl,{position:"end",children:c.jsx(Hn,{"aria-label":"toggle password visibility",onClick:()=>y(j=>!j),edge:"end",children:m?c.jsx(wo,{}):c.jsx(bo,{})})})}:void 0})});case"number":return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>c.jsx(li,{...E,id:e.id,labelText:e.labelPosition==="top"?b(e.label):void 0,label:e.labelPosition!=="top"?b(e.label):void 0,endAdornment:L(),endorsementText:A(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:"number",placeholder:e.placeholder,disabled:e.disabled,hasError:l,helperText:(o==null?void 0:o.message)||e.helperText,inputProps:{min:e.min,max:e.max}})});case"select":const te=de();return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>c.jsx(is,{labelText:e.labelPosition==="top"?b(e.label):void 0,label:e.labelPosition!=="top"&&e.labelPosition!=="none"?b(e.label):void 0,labelVariant:e.labelVariant,value:E.value,onChange:E.onChange,options:te,disabled:e.disabled||ue,placeholder:e.labelPosition==="inner"||e.labelPosition==="none"||!e.labelPosition?e.placeholder||(e.labelPosition==="none"?b(e.label):void 0):e.placeholder,loading:ue,error:l||!!K,helperText:(o==null?void 0:o.message)||(K==null?void 0:K.message)||e.helperText,onOpen:B})});case"checkbox":return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>c.jsx(Tr,{label:b(e.label),checked:!!E.value,disabled:e.disabled,onChange:E.onChange})});case"toggle":return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>c.jsx(ja,{label:b(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:E.value,options:e.options||[],row:!0,onChange:E.onChange})});case"radio":return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>c.jsx(ja,{label:b(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:E.value,options:e.options||[],row:e.row===!0,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:E.onChange})});case"checkboxGroup":return c.jsx(Pe,{name:e.name,control:t,defaultValue:_()||[],render:({field:E})=>c.jsx(Zl,{label:b(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:Array.isArray(E.value)?E.value:[],options:e.options||[],row:e.row,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:E.onChange,disabled:e.disabled})});case"switch":return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>c.jsx(ci,{label:b(e.label),checked:!!E.value,disabled:e.disabled,onChange:E.onChange})});case"autocomplete":const he=de(),g=!!(e.disabled||ue||F!=null&&F.dependsOn&&!u);return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>{const j=E.value,U=e.multiple===!0,R=(F==null?void 0:F.valueField)||e.value_field||"value",I=(F==null?void 0:F.labelField)||e.label_field||"label",Y=W=>{if(W!=null){if(typeof W=="string"||typeof W=="number")return W;if(typeof W=="object"){if(W[R]!==void 0)return W[R];if(W.value!==void 0)return W.value;if(W.id!==void 0)return W.id}}},ie=(()=>{if(U)return(Array.isArray(j)?j:[]).map(xe=>{const Te=he.find(je=>{const Ve=Y(je);return Ve!==void 0&&Ve===xe});return Te||{[R]:xe,[I]:`Selected: ${xe}`,value:xe,label:`Selected: ${xe}`}});{if(j==null||j==="")return null;const W=he.find(xe=>{const Te=Y(xe);return Te!==void 0&&Te===j});return W||{[R]:j,[I]:`Selected: ${j}`,value:j,label:`Selected: ${j}`}}})();return c.jsx(Yl,{id:e.id,options:he,value:ie,multiple:U,labelText:e.labelPosition==="top"?b(e.label):void 0,label:e.labelPosition!=="top"?b(e.label):void 0,placeholder:g&&(F!=null&&F.dependsOn)&&!u?`Please select ${F.dependsOn.replace(/_/g," ")} first`:e.placeholder,labelVariant:e.labelVariant,disabled:g,loading:ue,error:l||!!K,helperText:(o==null?void 0:o.message)||(K==null?void 0:K.message)||e.helperText||"",onOpen:H,noOptionsText:g&&(F!=null&&F.dependsOn)&&!u?`Please select ${F.dependsOn.replace(/_/g," ")} first`:ue?"Fetching data...":d&&!ue&&he.length===0?"No options available":"Click to load options",onChange:W=>{const xe=(F==null?void 0:F.valueField)||e.value_field||"value";if(U){const je=(Array.isArray(W)?W:[]).map(Ve=>typeof Ve=="object"&&(Ve[xe]||Ve.value||Ve.id)||Ve);E.onChange(je)}else{let Te;W&&typeof W=="object"?Te=W[xe]||W.value||W.id||W:Te=W,E.onChange(Te);const je=e.selectedAssignments;if(je&&W&&typeof W=="object")for(const[Ve,qe]of Object.entries(je)){const Ze=W[qe];if(Ze!==void 0&&typeof s=="function")try{s(Ve,Ze,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!1})}catch{}}}}})}});case"date":return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>c.jsx(as,{...E,id:e.name,label:b(e.label),labelPosition:e.labelPosition||"inner",labelVariant:e.labelVariant,disabled:e.disabled,error:l,helperText:o==null?void 0:o.message,inputProps:{min:e.minDate,max:e.maxDate}})});case"image":return c.jsx(Pe,{name:e.name,control:t,defaultValue:_(),render:({field:E})=>{const j=E.value||e.defaultValue||e.src;if(j){const W=e.imageUploaded||{},xe=W.previewText||"Preview",Te=W.removeText||"Remove",je=W.saveText||"Save logo",Ve=W.showSave!==void 0?W.showSave:!!(e.onSave||W.saveText),qe=()=>{if(v(!0),typeof e.onPreview=="function")try{e.onPreview(j)}catch{}},Ze=()=>{E.onChange(""),typeof e.onRemove=="function"&&e.onRemove()},Ft=()=>{typeof e.onSave=="function"&&e.onSave({url:j,file:P.current||void 0})},nt=ut=>{const Et=ut.target.files&&ut.target.files[0];if(Et){if(typeof e.onFileSelected=="function")try{e.onFileSelected(Et)}catch{}try{const Fi=URL.createObjectURL(Et);E.onChange(Fi)}catch{}P.current=Et,v(!1)}};return c.jsxs(x.Card,{sx:{display:"flex",alignItems:"center",gap:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",...W.cardSx},children:[c.jsx("input",{type:"file",ref:S,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:nt}),c.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[c.jsx(x.Box,{sx:{width:"30%",height:"10%",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",background:"#FFFFFF",overflow:"hidden",...W.thumbnailSx},children:c.jsx("img",{src:j,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:"100%"}})}),c.jsxs(x.Box,{sx:{flexGrow:1},children:[c.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:500,...W.fileNameSx},children:typeof j=="string"?j.split("/").pop():"Selected image"}),c.jsx(x.Typography,{sx:{fontSize:"10px",...W.fileMetaSx},children:"Image selected"})]}),c.jsxs(x.Box,{sx:{display:"flex",gap:1},children:[c.jsx(x.Button,{type:"button",sx:{...W.previewButtonSx},variant:"outlined",onClick:qe,startIcon:c.jsx(bo,{}),children:xe}),c.jsx(x.Button,{variant:"outlined",color:"error",onClick:Ze,sx:{...W.removeButtonSx},startIcon:c.jsx(wo,{}),children:Te}),Ve&&c.jsx(x.Button,{variant:"contained",onClick:Ft,sx:{...W.saveButtonSx},children:je})]})]}),c.jsxs(x.Dialog,{open:C,onClose:()=>v(!1),maxWidth:"md",fullWidth:!0,children:[c.jsx(x.DialogTitle,{children:W.previewTitle||"Image preview"}),c.jsx(x.DialogContent,{children:c.jsx(x.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",border:"1px solid",borderColor:"divider",backgroundColor:"background.paper",p:1,minHeight:260},children:c.jsx("img",{src:j,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:380}})})}),c.jsxs(x.DialogActions,{children:[c.jsx(x.Button,{type:"button",variant:"outlined",onClick:()=>{var ut;return(ut=S.current)==null?void 0:ut.click()},children:W.replaceText||"Replace logo"}),c.jsx(x.Button,{type:"button",variant:"contained",onClick:()=>v(!1),children:W.closeText||"Close"})]})]})]})}const U=e.imagePlaceholder||{},R=U.icon||"upload",I=S,Y=()=>{var W;try{(W=I.current)==null||W.click()}catch{}},ie=W=>{const xe=W.target.files&&W.target.files[0];if(xe){typeof e.onFileSelected=="function"&&e.onFileSelected(xe);try{const Te=URL.createObjectURL(xe);E.onChange(Te)}catch{}P.current=xe}};return c.jsxs(x.Card,{sx:{border:"1px dashed",borderColor:"#CCCCCC",boxShadow:"none",p:2,textAlign:"center",color:"primary.main",...U.sx},children:[c.jsx("input",{type:"file",ref:I,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:ie}),c.jsx(Hn,{sx:{borderRadius:"8px",...U.iconSx},children:R==="image"?c.jsx(Sh,{sx:{width:36,height:36,color:"primary.main"}}):c.jsx(oi,{sx:{width:36,height:36,color:"primary.main"}})}),c.jsx(x.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main",...U.titleSx},children:U.title||"Drag & Drop the image here"}),c.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main",...U.subtitleSx},children:U.subtitle||""}),c.jsx(x.Button,{onClick:Y,sx:{my:2,...U.buttonSx},startIcon:c.jsx(oi,{}),variant:"contained",disabled:e.disabled,children:U.buttonText||"Upload File"}),c.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,...U.helperTextSx},children:U.helperText||e.helperText||""})]})}});case"component":return c.jsx(x.Box,{children:e.render?typeof e.render=="function"?(()=>{try{return e.render(a||{},{control:t,setValue:s})}catch{try{return e.render({control:t,formData:a,setValue:s})}catch{return e.render()}}})():e.render:e.content});default:return null}},pe=$.useMemo(()=>!e.disabled||e.copyWhenDisabled===!1?!1:!["title","section","image","component"].includes(e.type),[e.disabled,e.copyWhenDisabled,e.type]),ge=$.useCallback(async()=>{try{const q=a?a[e.name]:void 0;let ee="";q==null?ee="":Array.isArray(q)?ee=q.join(", "):typeof q=="object"?ee=JSON.stringify(q):ee=String(q),await navigator.clipboard.writeText(ee),h(!0),window.setTimeout(()=>h(!1),1200)}catch{}},[a,e.name]);return c.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:.3},children:[c.jsx(x.Box,{sx:{flexGrow:1},children:N?fe():null}),pe&&c.jsx(Hn,{"aria-label":`copy ${e.label||e.name}`,onClick:ge,size:"small",children:T?c.jsx(rs,{fontSize:"small"}):c.jsx(wh,{fontSize:"small"})})]})};var Zi,Co;function zh(){if(Co)return Zi;Co=1;function e(v){this._maxSize=v,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(v){return this._values[v]},e.prototype.set=function(v,S){return this._size>=this._maxSize&&this.clear(),v in this._values||this._size++,this._values[v]=S};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,s=512,o=new e(s),l=new e(s),d=new e(s);Zi={Cache:e,split:p,normalizePath:f,setter:function(v){var S=f(v);return l.get(v)||l.set(v,function(w,b){for(var _=0,z=S.length,F=w;_<z-1;){var D=S[_];if(D==="__proto__"||D==="constructor"||D==="prototype")return w;F=F[S[_++]]}F[S[_]]=b})},getter:function(v,S){var P=f(v);return d.get(v)||d.set(v,function(b){for(var _=0,z=P.length;_<z;)if(b!=null||!S)b=b[P[_++]];else return;return b})},join:function(v){return v.reduce(function(S,P){return S+(y(P)||r.test(P)?"["+P+"]":(S?".":"")+P)},"")},forEach:function(v,S,P){m(Array.isArray(v)?v:p(v),S,P)}};function f(v){return o.get(v)||o.set(v,p(v).map(function(S){return S.replace(a,"$2")}))}function p(v){return v.match(t)||[""]}function m(v,S,P){var w=v.length,b,_,z,F;for(_=0;_<w;_++)b=v[_],b&&(C(b)&&(b='"'+b+'"'),F=y(b),z=!F&&/^\d+$/.test(b),S.call(P,b,F,z,_,v))}function y(v){return typeof v=="string"&&v&&["'",'"'].indexOf(v.charAt(0))!==-1}function T(v){return v.match(n)&&!v.match(r)}function h(v){return i.test(v)}function C(v){return!y(v)&&(T(v)||h(v))}return Zi}var jr=zh(),Xi,Eo;function Vh(){if(Eo)return Xi;Eo=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=f=>f.match(e)||[],r=f=>f[0].toUpperCase()+f.slice(1),n=(f,p)=>t(f).join(p).toLowerCase(),i=f=>t(f).reduce((p,m)=>`${p}${p?m[0].toUpperCase()+m.slice(1).toLowerCase():m.toLowerCase()}`,"");return Xi={words:t,upperFirst:r,camelCase:i,pascalCase:f=>r(i(f)),snakeCase:f=>n(f,"_"),kebabCase:f=>n(f,"-"),sentenceCase:f=>r(n(f," ")),titleCase:f=>t(f).map(r).join(" ")},Xi}var Ji=Vh(),Vn={exports:{}},ko;function Bh(){if(ko)return Vn.exports;ko=1,Vn.exports=function(i){return e(t(i),i)},Vn.exports.array=e;function e(i,a){var s=i.length,o=new Array(s),l={},d=s,f=r(a),p=n(i);for(a.forEach(function(y){if(!p.has(y[0])||!p.has(y[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});d--;)l[d]||m(i[d],d,new Set);return o;function m(y,T,h){if(h.has(y)){var C;try{C=", node was:"+JSON.stringify(y)}catch{C=""}throw new Error("Cyclic dependency"+C)}if(!p.has(y))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(y));if(!l[T]){l[T]=!0;var v=f.get(y)||new Set;if(v=Array.from(v),T=v.length){h.add(y);do{var S=v[--T];m(S,p.get(S),h)}while(T);h.delete(y)}o[--s]=y}}}function t(i){for(var a=new Set,s=0,o=i.length;s<o;s++){var l=i[s];a.add(l[0]),a.add(l[1])}return Array.from(a)}function r(i){for(var a=new Map,s=0,o=i.length;s<o;s++){var l=i[s];a.has(l[0])||a.set(l[0],new Set),a.has(l[1])||a.set(l[1],new Set),a.get(l[0]).add(l[1])}return a}function n(i){for(var a=new Map,s=0,o=i.length;s<o;s++)a.set(i[s],s);return a}return Vn.exports}var Nh=Bh();const Lh=qa(Nh),qh=Object.prototype.toString,Wh=Error.prototype.toString,Uh=RegExp.prototype.toString,Hh=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Kh=/^Symbol\((.*)\)(.*)$/;function Gh(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function To(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return Gh(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return Hh.call(e).replace(Kh,"Symbol($1)");const n=qh.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+Wh.call(e)+"]":n==="RegExp"?Uh.call(e):null}function or(e,t){let r=To(e,t);return r!==null?r:JSON.stringify(e,function(n,i){let a=To(this[n],t);return a!==null?a:i},2)}function sc(e){return e==null?[]:[].concat(e)}let oc,lc,cc,Qh=/\$\{\s*(\w+)\s*\}/g;oc=Symbol.toStringTag;class jo{constructor(t,r,n,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[oc]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],sc(t).forEach(a=>{if(ot.isError(a)){this.errors.push(...a.errors);const s=a.inner.length?a.inner:[a];this.inner.push(...s)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}lc=Symbol.hasInstance;cc=Symbol.toStringTag;class ot extends Error{static formatError(t,r){const n=r.label||r.path||"this";return r=Object.assign({},r,{path:n,originalPath:r.path}),typeof t=="string"?t.replace(Qh,(i,a)=>or(r[a])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,i,a){const s=new jo(t,r,n,i);if(a)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[cc]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,ot)}static[lc](t){return jo[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Rt={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:n})=>{const i=n!=null&&n!==r?` (cast from the value \`${or(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${or(r,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${or(r,!0)}\``+i}},it={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Qt={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Oa={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Fa={isValue:"${path} field must be ${value}"},Kn={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Yh={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},Zh={notType:e=>{const{path:t,value:r,spec:n}=e,i=n.types.length;if(Array.isArray(r)){if(r.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${r.length} for value: \`${or(r,!0)}\``;if(r.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${r.length} for value: \`${or(r,!0)}\``}return ot.formatError(Rt.notType,e)}};Object.assign(Object.create(null),{mixed:Rt,string:it,number:Qt,date:Oa,object:Kn,array:Yh,boolean:Fa,tuple:Zh});const ls=e=>e&&e.__isYupSchema__;class ui{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:i,otherwise:a}=r,s=typeof n=="function"?n:(...o)=>o.every(l=>l===n);return new ui(t,(o,l)=>{var d;let f=s(...o)?i:a;return(d=f==null?void 0:f(l))!=null?d:l})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let n=this.refs.map(a=>a.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),i=this.fn(n,t,r);if(i===void 0||i===t)return t;if(!ls(i))throw new TypeError("conditions must return a schema object");return i.resolve(r)}}const Bn={context:"$",value:"."};class $r{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Bn.context,this.isValue=this.key[0]===Bn.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Bn.context:this.isValue?Bn.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&jr.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let i=this.isContext?n:this.isValue?t:r;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,r){return this.getValue(t,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}$r.prototype.__isYupRef=!0;const Ot=e=>e==null;function Nr(e){function t({value:r,path:n="",options:i,originalValue:a,schema:s},o,l){const{name:d,test:f,params:p,message:m,skipAbsent:y}=e;let{parent:T,context:h,abortEarly:C=s.spec.abortEarly,disableStackTrace:v=s.spec.disableStackTrace}=i;function S(M){return $r.isRef(M)?M.getValue(r,T,h):M}function P(M={}){const N=Object.assign({value:r,originalValue:a,label:s.spec.label,path:M.path||n,spec:s.spec,disableStackTrace:M.disableStackTrace||v},p,M.params);for(const L of Object.keys(N))N[L]=S(N[L]);const A=new ot(ot.formatError(M.message||m,N),r,N.path,M.type||d,N.disableStackTrace);return A.params=N,A}const w=C?o:l;let b={path:n,parent:T,type:d,from:i.from,createError:P,resolve:S,options:i,originalValue:a,schema:s};const _=M=>{ot.isError(M)?w(M):M?l(null):w(P())},z=M=>{ot.isError(M)?w(M):o(M)};if(y&&Ot(r))return _(!0);let D;try{var u;if(D=f.call(b,r,b),typeof((u=D)==null?void 0:u.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${b.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(D).then(_,z)}}catch(M){z(M);return}_(D)}return t.OPTIONS=e,t}function Xh(e,t,r,n=r){let i,a,s;return t?(jr.forEach(t,(o,l,d)=>{let f=l?o.slice(1,o.length-1):o;e=e.resolve({context:n,parent:i,value:r});let p=e.type==="tuple",m=d?parseInt(f,10):0;if(e.innerType||p){if(p&&!d)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(r&&m>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${o}, in the path: ${t}. because there is no value at that index. `);i=r,r=r&&r[m],e=p?e.spec.types[m]:e.innerType}if(!d){if(!e.fields||!e.fields[f])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${s} which is a type: "${e.type}")`);i=r,r=r&&r[f],e=e.fields[f]}a=f,s=l?"["+o+"]":"."+o}),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class pi extends Set{describe(){const t=[];for(const r of this.values())t.push($r.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(const n of this.values())r.push(t(n));return r}clone(){return new pi(this.values())}merge(t,r){const n=this.clone();return t.forEach(i=>n.add(i)),r.forEach(i=>n.delete(i)),n}}function qr(e,t=new Map){if(ls(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n<e.length;n++)r[n]=qr(e[n],t)}else if(e instanceof Map){r=new Map,t.set(e,r);for(const[n,i]of e.entries())r.set(n,qr(i,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(qr(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,i]of Object.entries(e))r[n]=qr(i,t)}else throw Error(`Unable to clone ${e}`);return r}class ht{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new pi,this._blacklist=new pi,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Rt.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=qr(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const i=Object.assign({},r.spec,n.spec);return n.spec=i,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(a=>{t.tests.forEach(s=>{a.test(s.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((i,a)=>a.resolve(i,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,i,a;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(a=t.disableStackTrace)!=null?a:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({value:t},r)),i=r.assert==="ignore-optionality",a=n._cast(t,r);if(r.assert!==!1&&!n.isType(a)){if(i&&Ot(a))return a;let s=or(t),o=or(a);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
|
|
171
|
+
`,bh=typeof Aa!="string"?Pr.css`
|
|
172
|
+
animation: ${Aa} 1.4s linear infinite;
|
|
173
|
+
`:null,wh=typeof _a!="string"?Pr.css`
|
|
174
|
+
animation: ${_a} 1.4s ease-in-out infinite;
|
|
175
|
+
`:null,Sh=e=>{const{classes:t,variant:r,color:n,disableShrink:i}=e,a={root:["root",r,`color${ze(n)}`],svg:["svg"],circle:["circle",`circle${ze(r)}`,i&&"circleDisableShrink"]};return un(a,vh,t)},Ch=gt("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`color${ze(r.color)}`]]}})($r(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:bh||{animation:`${Aa} 1.4s linear infinite`}},...Object.entries(e.palette).filter(oi()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),Eh=gt("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),kh=gt("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t[`circle${ze(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})($r(({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:wh||{animation:`${_a} 1.4s ease-in-out infinite`}}]}))),rc=ae.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiCircularProgress"}),{className:i,color:a="primary",disableShrink:s=!1,size:o=40,style:l,thickness:d=3.6,value:h=0,variant:f="indeterminate",...u}=n,g={...n,color:a,disableShrink:s,size:o,thickness:d,value:h,variant:f},k=Sh(g),m={},b={},v={};if(f==="determinate"){const w=2*Math.PI*((Qt-d)/2);m.strokeDasharray=w.toFixed(3),v["aria-valuenow"]=Math.round(h),m.strokeDashoffset=`${((100-h)/100*w).toFixed(3)}px`,b.transform="rotate(-90deg)"}return c.jsx(Ch,{className:at(k.root,i),style:{width:o,height:o,...b,...l},ownerState:g,ref:r,role:"progressbar",...v,...u,children:c.jsx(Eh,{className:k.svg,ownerState:g,viewBox:`${Qt/2} ${Qt/2} ${Qt} ${Qt}`,children:c.jsx(kh,{className:k.circle,style:m,ownerState:g,cx:Qt,cy:Qt,r:(Qt-d)/2,fill:"none",strokeWidth:d})})})});process.env.NODE_ENV!=="production"&&(rc.propTypes={classes:j.object,className:j.string,color:j.oneOfType([j.oneOf(["inherit","primary","secondary","error","info","success","warning"]),j.string]),disableShrink:rs(j.bool,e=>e.disableShrink&&e.variant&&e.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),size:j.oneOfType([j.number,j.string]),style:j.object,sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object]),thickness:j.number,value:j.number,variant:j.oneOf(["determinate","indeterminate"])});function Th(e){return hr("MuiIconButton",e)}const To=Dr("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),jh=e=>{const{classes:t,disabled:r,color:n,edge:i,size:a,loading:s}=e,o={root:["root",s&&"loading",r&&"disabled",n!=="default"&&`color${ze(n)}`,i&&`edge${ze(i)}`,`size${ze(a)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return un(o,Th,t)},Fh=gt(tc,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.loading&&t.loading,r.color!=="default"&&t[`color${ze(r.color)}`],r.edge&&t[`edge${ze(r.edge)}`],t[`size${ze(r.size)}`]]}})($r(({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.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Et(e.palette.action.active,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}}]})),$r(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(oi()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(oi()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Et((e.vars||e).palette[t].main,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)}}],[`&.${To.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${To.loading}`]:{color:"transparent"}}))),Oh=gt("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"}}]})),Gn=ae.forwardRef(function(t,r){const n=Ir({props:t,name:"MuiIconButton"}),{edge:i=!1,children:a,className:s,color:o="default",disabled:l=!1,disableFocusRipple:d=!1,size:h="medium",id:f,loading:u=null,loadingIndicator:g,...k}=n,m=Uf(f),b=g??c.jsx(rc,{"aria-labelledby":m,color:"inherit",size:16}),v={...n,edge:i,color:o,disabled:l,disableFocusRipple:d,loading:u,loadingIndicator:b,size:h},w=jh(v);return c.jsxs(Fh,{id:u?m:f,className:at(w.root,s),centerRipple:!0,focusRipple:!d,disabled:l||u,ref:r,...k,ownerState:v,children:[typeof u=="boolean"&&c.jsx("span",{className:w.loadingWrapper,style:{display:"contents"},children:c.jsx(Oh,{className:w.loadingIndicator,ownerState:v,children:u&&b})}),a]})});process.env.NODE_ENV!=="production"&&(Gn.propTypes={children:rs(j.node,e=>ae.Children.toArray(e.children).some(r=>ae.isValidElement(r)&&r.props.onClick)?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join(`
|
|
176
|
+
`)):null),classes:j.object,className:j.string,color:j.oneOfType([j.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),j.string]),disabled:j.bool,disableFocusRipple:j.bool,disableRipple:j.bool,edge:j.oneOf(["end","start",!1]),id:j.string,loading:j.bool,loadingIndicator:j.node,size:j.oneOfType([j.oneOf(["small","medium","large"]),j.string]),sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object])});const jo=pt(c.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility"),Fo=pt(c.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff"),Ah=pt(c.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),ss=pt(c.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),ui=pt(c.jsx("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5z"}),"FileUploadOutlined"),_h=pt(c.jsx("path",{d:"M19 5v14H5V5zm0-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-2m-4.86 8.86-3 3.87L9 13.14 6 17h12z"}),"ImageOutlined"),W={primary:{main:"#2C5EFF",contrastText:"#FFFFFF"},secondary:{main:"#00B894",contrastText:"#FFFFFF"},error:{main:"#E53935"},warning:{main:"#FB8C00"},info:{main:"#1E88E5"},success:{main:"#43A047"},background:{default:"#FFFFFF",paper:"#FFFFFF"},text:{primary:"#111827",secondary:"#6B7280",disabled:"#9CA3AF"},divider:"#E5E7EB"},Oo=e=>{const t=e.replace("#",""),r=parseInt(t.length===3?t.split("").map(n=>n+n).join(""):t,16);return{r:r>>16&255,g:r>>8&255,b:r&255}},Rh=(e,t,r)=>"#"+[e,t,r].map(n=>{const i=Math.round(Math.min(255,Math.max(0,n))).toString(16);return i.length===1?"0"+i:i}).join(""),Lt=(e,t,r)=>{const n=Oo(e),i=Oo(t);return Rh(n.r+(i.r-n.r)*r,n.g+(i.g-n.g)*r,n.b+(i.b-n.b)*r)},os=e=>{const t="#FFFFFF",r="#000000";return{50:Lt(t,e,.08),100:Lt(t,e,.16),200:Lt(t,e,.28),300:Lt(t,e,.4),400:Lt(t,e,.55),500:e,600:Lt(e,r,.1),700:Lt(e,r,.2),800:Lt(e,r,.3),900:Lt(e,r,.42)}},$h=os(W.primary.main),Ph=os(W.secondary.main),Qe=os(W.text.primary),Dh={primary:W.primary.main,secondary:W.secondary.main,textPrimary:W.text.primary,textSecondary:W.text.secondary,divider:W.divider,background:W.background},vt=({hasError:e,sx:t,labelText:r,labelVariant:n="subtitle2",endAdornment:i,endorsementText:a,endorsementBg:s="#E6E8EC",endorsementColor:o="#111827",endorsementRadius:l="6px",endorsementHeight:d=28,endorsementPaddingX:h="8px",...f})=>{var m,b;const u=!!r,g=a?c.jsx(x.Box,{component:"span",sx:{display:"inline-flex",flex:"0 0 auto",width:"auto",maxWidth:"100%",alignItems:"center",height:d,paddingLeft:h,paddingRight:h,borderRadius:l,backgroundColor:s,color:o,fontSize:12,fontWeight:300,lineHeight:1,whiteSpace:"nowrap"},children:a}):null,k={...f.InputProps,endAdornment:g||i?c.jsxs(x.InputAdornment,{sx:{mr:-1},position:"end",children:[g||i,(m=f.InputProps)==null?void 0:m.endAdornment]}):(b=f.InputProps)==null?void 0:b.endAdornment};return c.jsxs(x.Box,{children:[u&&c.jsx(x.Typography,{variant:n,sx:{color:W.text.primary,mb:.5,fontWeight:500},children:r}),c.jsx(x.TextField,{fullWidth:!0,size:"small",...f,InputProps:k,label:u?void 0:f.label,sx:{"& .MuiOutlinedInput-root":{backgroundColor:W.background.paper,borderRadius:"8px","& fieldset":{borderColor:W.divider},"&:hover fieldset":{borderColor:Qe[300]},"&.Mui-focused fieldset":{borderColor:Qe[400]},"&.Mui-error fieldset":{borderColor:W.error.main}},"& .MuiInputBase-input":{color:W.text.primary},"& .MuiFormLabel-root":{color:W.text.secondary},"& .MuiFormLabel-root.Mui-focused":{color:W.text.primary},"& .MuiFormHelperText-root":{color:e?W.error.main:W.text.secondary},...t}})]})},Ri=({labelText:e,label:t,options:r,loading:n,helperText:i,size:a="small",labelVariant:s="subtitle2",placeholder:o,value:l,sx:d,...h})=>{const f=D.useId(),u=l==null||l===""||Array.isArray(l)&&l.length===0,g=k=>c.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...k,children:c.jsx("path",{d:"M6 9l6 6 6-6",stroke:W.text.secondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});return c.jsxs(x.FormControl,{fullWidth:!0,size:a,error:!!h.error,variant:"outlined",children:[e&&c.jsx(x.Typography,{variant:s,sx:{color:W.text.primary,mb:.5,fontWeight:500},children:e}),t&&c.jsx(x.InputLabel,{id:f,shrink:!u||!!o,sx:{color:W.text.secondary,"&.Mui-focused":{color:W.text.primary},"&.Mui-error":{color:W.error.main}},children:t}),c.jsx(x.Select,{...h,value:l,labelId:t?f:void 0,label:t,displayEmpty:!0,input:c.jsx(x.OutlinedInput,{label:t}),IconComponent:g,renderValue:k=>{const m=k;if(u)return c.jsx("span",{style:{color:W.text.secondary},children:o??""});const b=r.find(v=>v.value===m);return(b==null?void 0:b.label)??String(m)},endAdornment:n?c.jsx(x.CircularProgress,{size:20}):void 0,MenuProps:{PaperProps:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${W.divider}`,mt:.5,borderRadius:"8px"}}},sx:{backgroundColor:W.background.paper,boxShadow:"none",borderRadius:"8px",height:"40px","& .MuiSelect-select":{color:W.text.primary,fontSize:14,pr:3},"& .MuiOutlinedInput-notchedOutline":{borderColor:W.divider},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:Qe[300]},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:Qe[400]},"&.Mui-error .MuiOutlinedInput-notchedOutline":{borderColor:W.error.main},"& svg":{right:8,position:"absolute",pointerEvents:"none"},...d},children:n?c.jsx(x.MenuItem,{disabled:!0,children:c.jsx(x.CircularProgress,{size:16})}):r.map(k=>c.jsx(x.MenuItem,{value:k.value,sx:{backgroundColor:W.background.paper,color:W.text.primary,fontSize:14,mx:1,"&:hover":{backgroundColor:Qe[50],borderRadius:"4px"},"&.Mui-selected":{backgroundColor:Qe[50],borderRadius:"4px"}},children:k.label},k.value))}),i&&c.jsx(x.FormHelperText,{children:i})]})},Ih=e=>c.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:c.jsx("path",{d:"M6 9l6 6 6-6",stroke:W.text.secondary,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),nc=({id:e,options:t,value:r,multiple:n,label:i,labelText:a,placeholder:s,onChange:o,labelVariant:l="subtitle2",disabled:d,loading:h,error:f,helperText:u,onOpen:g,noOptionsText:k,sx:m})=>c.jsxs(x.Box,{children:[a&&c.jsx(x.Typography,{variant:l,sx:{color:W.text.primary,mb:.5,fontWeight:500},children:a}),c.jsx(x.Autocomplete,{id:e,options:t,value:r,multiple:n,size:"small",popupIcon:c.jsx(Ih,{}),disabled:d,loading:h,onOpen:g,noOptionsText:k,fullWidth:!0,componentsProps:{paper:{sx:{boxShadow:"0px 0px 10px 0px rgba(0, 0, 0, 0.1)",border:`1px solid ${W.divider}`,mt:.5,borderRadius:"8px"}}},sx:{"& .MuiOutlinedInput-root":{backgroundColor:W.background.paper,borderRadius:"8px",height:"40px","& fieldset":{borderColor:W.divider},"&:hover fieldset":{borderColor:Qe[300]},"&.Mui-focused fieldset":{borderColor:Qe[400]},"&.Mui-error fieldset":{borderColor:W.error.main}},"& .MuiInputBase-input":{color:W.text.primary,fontSize:14},"& .MuiAutocomplete-popupIndicator":{color:W.text.secondary},"& .MuiAutocomplete-endAdornment svg":{width:16,height:16},...m},getOptionLabel:b=>typeof b=="string"?b:(b==null?void 0:b.label)??"",isOptionEqualToValue:(b,v)=>((b==null?void 0:b.value)??b)===((v==null?void 0:v.value)??v),renderOption:(b,v,{selected:w})=>c.jsxs(x.Box,{component:"li",...b,sx:{backgroundColor:W.background.paper,color:W.text.primary,mx:.5,borderRadius:"4px","&:hover":{backgroundColor:Qe[50]},"&.Mui-focused":{backgroundColor:Qe[50]},...w?{backgroundColor:Qe[50]}:{}},children:[n&&c.jsx(x.Checkbox,{checked:w}),c.jsx(x.Typography,{variant:"body2",sx:{color:W.text.primary,fontSize:14},children:typeof v=="string"?v:v.label})]}),renderInput:b=>c.jsx(x.TextField,{...b,label:i,placeholder:s,size:"small",error:f,helperText:u,InputLabelProps:{shrink:!!r||!!s,sx:{color:W.text.secondary,"&.Mui-focused":{color:W.text.primary},"&.Mui-error":{color:W.error.main}}},InputProps:{...b.InputProps,endAdornment:c.jsxs(c.Fragment,{children:[h?c.jsx(x.CircularProgress,{size:20}):null,b.InputProps.endAdornment]})}}),onChange:(b,v)=>o(v)})]}),Ht=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>c.jsx(x.FormControlLabel,{control:c.jsx(x.Checkbox,{size:"small",checked:t,disabled:r,onChange:(a,s)=>n(s)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),ic=({labelText:e,label:t,value:r=[],options:n,row:i=!1,onChange:a,labelPosition:s="top",labelVariant:o="subtitle2",helperText:l,error:d,groupPadding:h=1.5,itemGap:f=1,disabled:u=!1})=>{const g=typeof i=="number"&&i>0,k=g?i:12,m=i===!0,b=i===!1&&!g,v=(w,P)=>{const T=Array.isArray(r)?[...r]:[];P?T.includes(w)||a([...T,w]):a(T.filter(C=>C!==w))};return c.jsxs(x.FormControl,{error:d,disabled:u,sx:w=>{var P;return{display:"flex",flexDirection:"column",px:w.spacing(h),borderRadius:((P=w.shape)==null?void 0:P.borderRadius)||8,mx:-2.5,backgroundColor:w.palette.background.paper}},children:[s==="top"&&e&&c.jsx(x.Typography,{variant:o,sx:w=>({color:w.palette.text.primary,mb:.5,fontSize:w.typography.fontSize,fontWeight:500}),children:e}),t&&c.jsx(x.FormLabel,{sx:w=>({color:w.palette.text.secondary,mb:.5,mx:1,fontSize:w.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:w.palette.text.primary},"&.Mui-error":{color:w.palette.error.main}}),children:t}),g&&c.jsx(x.Box,{sx:w=>({display:"grid",gridTemplateColumns:`repeat(${k}, 1fr)`,gap:w.spacing(f),mt:0}),children:n.map(w=>{const P=Array.isArray(r)&&r.includes(w.value);return c.jsx(x.FormControlLabel,{control:c.jsx(x.Checkbox,{size:"small",checked:P,onChange:T=>v(w.value,T.target.checked),disabled:u,sx:T=>({color:T.palette.text.secondary,"&.Mui-checked":{color:T.palette.primary.main}})}),label:w.label,sx:T=>({m:0,"& .MuiFormControlLabel-label":{color:T.palette.text.primary,fontSize:12}})},String(w.value))})}),m&&c.jsx(x.Box,{sx:w=>({display:"flex",flexDirection:"row",flexWrap:"wrap",gap:w.spacing(f),alignItems:"center",mt:0}),children:n.map(w=>{const P=Array.isArray(r)&&r.includes(w.value);return c.jsx(x.FormControlLabel,{control:c.jsx(x.Checkbox,{size:"small",checked:P,onChange:T=>v(w.value,T.target.checked),disabled:u,sx:T=>({color:T.palette.text.secondary,"&.Mui-checked":{color:T.palette.primary.main}})}),label:w.label,sx:T=>({m:0,"& .MuiFormControlLabel-label":{color:T.palette.text.primary,fontSize:12}})},String(w.value))})}),b&&c.jsx(x.Box,{sx:w=>({display:"flex",flexDirection:"column",gap:w.spacing(f),alignItems:"flex-start",mt:0}),children:n.map(w=>{const P=Array.isArray(r)&&r.includes(w.value);return c.jsx(x.FormControlLabel,{control:c.jsx(x.Checkbox,{size:"small",checked:P,onChange:T=>v(w.value,T.target.checked),disabled:u,sx:T=>({color:T.palette.text.secondary,"&.Mui-checked":{color:T.palette.primary.main}})}),label:w.label,sx:T=>({m:0,"& .MuiFormControlLabel-label":{color:T.palette.text.primary,fontSize:12}})},String(w.value))})}),l&&c.jsx(x.FormHelperText,{sx:{mt:.5},children:l})]})},pi=({label:e,checked:t,disabled:r,onChange:n,sx:i})=>c.jsx(x.FormControlLabel,{control:c.jsx(x.Switch,{checked:t,disabled:r,onChange:(a,s)=>n(s)}),label:e,sx:a=>({"& .MuiFormControlLabel-label":{color:a.palette.text.primary,fontSize:14},...i})}),wr=({labelText:e,label:t,value:r,options:n,row:i=!1,onChange:a,labelPosition:s="top",labelVariant:o="subtitle2",helperText:l,error:d,groupPadding:h=1.5,itemGap:f=1})=>c.jsxs(x.FormControl,{error:d,sx:u=>{var g;return{display:"flex",flexDirection:"column",px:u.spacing(h),borderRadius:((g=u.shape)==null?void 0:g.borderRadius)||8,mx:-2.5,backgroundColor:u.palette.background.paper}},children:[s==="top"&&e&&c.jsx(x.Typography,{variant:o,sx:u=>({color:u.palette.text.primary,mb:.5,fontSize:u.typography.fontSize,fontWeight:500}),children:e}),t&&c.jsx(x.FormLabel,{sx:u=>({color:u.palette.text.secondary,mb:.5,mx:1,fontSize:u.typography.fontSize||12,fontWeight:500,"&.Mui-focused":{color:u.palette.text.primary},"&.Mui-error":{color:u.palette.error.main}}),children:t}),c.jsx(x.RadioGroup,{row:i,value:r,onChange:u=>a(u.target.value),sx:u=>({display:"flex",flexDirection:i?"row":"column",gap:u.spacing(f),alignItems:i?"center":"flex-start"}),children:n.map(u=>c.jsx(x.FormControlLabel,{value:u.value,control:c.jsx(x.Radio,{size:"small",sx:g=>({color:g.palette.text.secondary,"&.Mui-checked":{color:g.palette.primary.main}})}),label:c.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",gap:0},children:[c.jsx(x.Typography,{variant:"body2",sx:{color:"#1a1a1a",fontSize:12,fontWeight:400,lineHeight:1.5},children:u.label}),u.description&&c.jsx(x.Typography,{variant:"caption",sx:{color:"#1a1a1a",fontSize:10,fontWeight:300,lineHeight:1.5},children:u.description})]}),sx:{m:0,gap:.5,"& .MuiFormControlLabel-label":{marginLeft:0},"& .MuiRadio-root":{alignSelf:"flex-start",marginTop:0}}},String(u.value)))}),l&&c.jsx(x.FormHelperText,{sx:{mt:.5},children:l})]}),ls=({labelPosition:e="inner",labelVariant:t="subtitle2",label:r,sx:n,...i})=>c.jsxs(x.Box,{children:[e==="top"&&r&&c.jsx(x.Typography,{variant:t,sx:{color:"#111827",mb:.5},children:r}),c.jsx(x.TextField,{fullWidth:!0,type:"date",size:"small",label:e==="inner"?r:void 0,InputLabelProps:{shrink:!0},...i,sx:{"& .MuiOutlinedInput-root":{backgroundColor:"#FFFFFF",borderRadius:"8px","& fieldset":{borderColor:"#E5E7EB"},"&:hover fieldset":{borderColor:"#D1D5DB"},"&.Mui-focused fieldset":{borderColor:"#D1D5DB"},"&.Mui-error fieldset":{borderColor:"#E53935"}},"& .MuiInputBase-input":{color:"#111827",fontSize:14},...n}})]}),ac=({labelText:e,labelVariant:t="subtitle2",hasError:r,sx:n,label:i,...a})=>{const s=!!e;return c.jsxs(x.Box,{children:[s&&c.jsx(x.Typography,{variant:t,sx:{color:W.text.primary,mb:.5,fontWeight:500},children:e}),c.jsx(x.TextField,{fullWidth:!0,multiline:!0,minRows:3,size:"small",...a,label:s?void 0:i,sx:{"& .MuiOutlinedInput-root":{backgroundColor:W.background.paper,borderRadius:"8px","& fieldset":{borderColor:W.divider},"&:hover fieldset":{borderColor:Qe[300]},"&.Mui-focused fieldset":{borderColor:Qe[400]},"&.Mui-error fieldset":{borderColor:W.error.main}},"& .MuiInputBase-input":{color:W.text.primary,fontSize:14},"& .MuiFormLabel-root":{color:W.text.secondary},"& .MuiFormLabel-root.Mui-focused":{color:W.text.primary},"& .MuiFormHelperText-root":{color:r?W.error.main:W.text.secondary},...n}})]})},sc=({title:e,subtitle:t,actions:r,align:n="left",sx:i})=>c.jsxs(x.Box,{sx:a=>({display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:a.spacing(1),py:a.spacing(1),...i}),children:[c.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",minWidth:0,flex:1,textAlign:n},children:[e&&c.jsx(x.Typography,{variant:"h6",sx:a=>({color:a.palette.text.primary,fontSize:12,fontWeight:600,lineHeight:1.3}),children:e}),t&&c.jsx(x.Typography,{variant:"body2",sx:a=>({color:a.palette.text.secondary,mt:e?.5:0,fontSize:12,fontWeight:300}),children:t})]}),r&&c.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:r})]}),yn=pt(c.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),oc=()=>c.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c.jsx("g",{"clip-path":"url(#clip0_5814_24904)",children:c.jsx("path",{d:"M11 18C11 19.1 10.1 20 9 20C7.9 20 7 19.1 7 18C7 16.9 7.9 16 9 16C10.1 16 11 16.9 11 18ZM9 10C7.9 10 7 10.9 7 12C7 13.1 7.9 14 9 14C10.1 14 11 13.1 11 12C11 10.9 10.1 10 9 10ZM9 4C7.9 4 7 4.9 7 6C7 7.1 7.9 8 9 8C10.1 8 11 7.1 11 6C11 4.9 10.1 4 9 4ZM15 8C16.1 8 17 7.1 17 6C17 4.9 16.1 4 15 4C13.9 4 13 4.9 13 6C13 7.1 13.9 8 15 8ZM15 10C13.9 10 13 10.9 13 12C13 13.1 13.9 14 15 14C16.1 14 17 13.1 17 12C17 10.9 16.1 10 15 10ZM15 16C13.9 16 13 16.9 13 18C13 19.1 13.9 20 15 20C16.1 20 17 19.1 17 18C17 16.9 16.1 16 15 16Z",fill:"#056739","fill-opacity":"0.5"})}),c.jsx("defs",{children:c.jsx("clipPath",{id:"clip0_5814_24904",children:c.jsx("rect",{width:"24",height:"24",fill:"white"})})})]});function lc({items:e,getId:t,onReorder:r,header:n,disabled:i,sx:a,getText:s,showIndex:o=!0,showLeftIcon:l=!0,renderItem:d,chipText:h,helperText:f,emptyStateText:u,emptyStateButtonText:g="Add Phase",onEmptyStateButtonClick:k,emptyStateSx:m}){const[b,v]=D.useState(null),[w,P]=D.useState(null),T=x.useTheme(),C=_=>z=>{if(!i){v(_),z.dataTransfer.effectAllowed="move";try{z.dataTransfer.setData("text/plain",String(t(e[_])))}catch{}}},$=_=>z=>{i||(z.preventDefault(),P(_),z.dataTransfer.dropEffect="move")},B=_=>z=>{if(i)return;if(z.preventDefault(),b===null||b===_){v(null),P(null);return}const O=[...e],[N]=O.splice(b,1);O.splice(_,0,N),v(null),P(null),r(O)},A=()=>{v(null),P(null)},I=e.length===0,p=I&&(u||k!==void 0);return c.jsxs(x.Box,{role:"list",sx:_=>({display:"flex",flexDirection:"column",gap:_.spacing(1),...a}),children:[n,!I&&c.jsx(x.Divider,{sx:{mt:-.5,mb:1,dividerColor:"#EBEBEB"}}),p?c.jsxs(x.Box,{sx:_=>{var z;return{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"200px",padding:_.spacing(4),backgroundColor:_.palette.mode==="dark"?"#000000":W.background.paper,border:`2px dashed ${_.palette.mode==="dark"?"#FFFFFF":W.divider}`,borderRadius:((z=_.shape)==null?void 0:z.borderRadius)||"8px",textAlign:"center",...m}},children:[u&&c.jsx(x.Typography,{variant:"body1",sx:{color:T.palette.mode==="dark"?W.secondary.main:W.success.main,fontSize:"14px",fontWeight:400,lineHeight:1.5,mb:k?2:0,maxWidth:"400px"},children:u}),k&&c.jsx(x.Button,{variant:"outlined",startIcon:c.jsx(yn,{}),onClick:k,disabled:i,sx:{mt:u?0:2,backgroundColor:T.palette.mode==="dark"?"rgba(0, 184, 148, 0.1)":"#E8F5E9",borderColor:T.palette.mode==="dark"?W.secondary.main:W.success.main,color:T.palette.mode==="dark"?W.secondary.main:W.success.main,"&:hover":{backgroundColor:T.palette.mode==="dark"?"rgba(0, 184, 148, 0.2)":"#C8E6C9",borderColor:T.palette.mode==="dark"?W.secondary.main:W.success.main},borderRadius:"6px",textTransform:"none",fontSize:"14px",fontWeight:500,px:2,py:1},children:g})]}):e.map((_,z)=>{const O=b===z,N=w===z&&b!==null&&b!==z;return c.jsx(x.Box,{role:"listitem",draggable:!i,onDragStart:C(z),onDragOver:$(z),onDrop:B(z),onDragEnd:A,sx:K=>{var ne;return{userSelect:"none",cursor:i?"default":"grab",backgroundColor:"#F8F8FA",border:`1px solid ${N?K.palette.primary.main:"#EBEBEB"}`,borderRadius:((ne=K.shape)==null?void 0:ne.borderRadius)||"8px",padding:K.spacing(1),opacity:O?.6:1,boxShadow:N?`0 0 0 2px ${K.palette.primary.main}33`:"none"}},children:d?d(_,O):c.jsxs(x.Box,{sx:K=>({display:"flex",alignItems:"center",gap:K.spacing(1),minWidth:0}),children:[l&&c.jsx(oc,{}),o&&c.jsxs(x.Typography,{variant:"body2",sx:K=>({fontWeight:600,fontSize:14,color:`${K.palette.text.primary}`,flex:"0 0 auto"}),children:[z+1,"."]}),(()=>{const K=typeof h=="function"?h(_,z):h;return K?c.jsx(x.Chip,{label:K,sx:{borderRadius:"4px",p:"12px 3px"},size:"small"}):null})(),c.jsx(x.Typography,{variant:"body2",sx:K=>({fontSize:12,fontWeight:500,color:`${K.palette.text.primary}90`,flex:1,minWidth:0,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),children:s?s(_):""})]})},String(t(_)))}),!I&&f?typeof f=="string"?c.jsx(x.Typography,{variant:"caption",sx:_=>({color:`${_.palette.text.primary}60`}),children:f}):f:null]})}const Mh=gt(x.StepConnector)(()=>({[`&.${x.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${x.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,borderColor:"#E8E8E8",transition:"border-color 0.3s ease"},[`&.${x.stepConnectorClasses.completed} .${x.stepConnectorClasses.line}`]:{borderColor:W.primary.main}})),zh=({items:e,activeIndex:t=1,onStepClick:r,sx:n})=>{const i=a=>{const{active:s,completed:o,icon:l}=a;return o?c.jsx(x.Box,{sx:{width:24,height:24,border:`1.2px solid ${W.primary.main}`,borderRadius:"50%",backgroundColor:W.primary.main,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:c.jsx(ss,{sx:{fontSize:16,fontWeight:600}})}):s?c.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${W.primary.main}`,backgroundColor:Et(W.primary.main,.2),color:W.primary.main,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:l}):c.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#E8E8E8",color:W.text.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12},children:l})};return c.jsx(x.Stepper,{orientation:"vertical",activeStep:t,connector:c.jsx(Mh,{}),sx:{"& .MuiStepConnector-vertical":{my:-1.1},"& .MuiStepLabel-label":{fontSize:14,color:W.text.primary,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((a,s)=>c.jsxs(x.Step,{onClick:()=>r==null?void 0:r(s),completed:s<t,children:[c.jsx(x.StepLabel,{StepIconComponent:i,children:c.jsx(x.Typography,{sx:{fontSize:12,fontWeight:500,color:s===t?W.primary.main:W.text.primary},children:a.label})}),s!==e.length-1&&c.jsx(x.Divider,{sx:{ml:4.2,borderColor:W.divider}})]},s))})},cs=({colorKey:e="primary",colorHex:t,tone:r="soft",bgAlpha:n=.12,borderAlpha:i=.24,sx:a,...s})=>c.jsx(x.Chip,{...s,sx:o=>({fontWeight:600,borderRadius:"4px",height:18,border:`0.5px solid ${Et(t||o.palette.text.primary,.5)}`,backgroundColor:Et(t||o.palette.text.primary,.1),"& .MuiChip-label":{p:"8px",color:t||o.palette.text.primary,fontSize:10,fontWeight:500},...a})}),Bh=gt(x.StepConnector)(()=>({[`&.${x.stepConnectorClasses.vertical}`]:{marginLeft:11},[`& .${x.stepConnectorClasses.line}`]:{minHeight:28,borderLeftWidth:2,height:"70px",borderColor:"#E8E8E8",transition:"border-color 0.3s ease",zIndex:-1},[`&.${x.stepConnectorClasses.completed} .${x.stepConnectorClasses.line}`]:{borderColor:W.primary.main}})),Vh=({items:e,activeIndex:t=1,onStepClick:r,sx:n})=>{const[i,a]=D.useState(null),s=o=>{const{active:l,completed:d,icon:h}=o;return d?c.jsx(x.Box,{sx:{width:24,height:24,border:`1.2px solid ${W.primary.main}`,borderRadius:"50%",backgroundColor:W.primary.main,color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},children:c.jsx(ss,{sx:{fontSize:16,fontWeight:600}})}):l?c.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:`1.2px solid ${W.primary.main}`,backgroundColor:Et(W.primary.main,.2),color:W.primary.main,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3,overflow:"hidden"},children:h}):c.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",backgroundColor:"#E8E8E8",color:W.text.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:500,fontSize:12,zIndex:1e3},children:h})};return c.jsx(x.Stepper,{orientation:"vertical",activeStep:t,connector:c.jsx(Bh,{}),sx:{"& .MuiStepConnector-vertical":{my:-3.5},"& .MuiStepLabel-label":{fontSize:14,color:W.text.primary,fontWeight:500},"& .MuiStep-root":{cursor:r?"pointer":"default"},...n},children:e.map((o,l)=>c.jsxs(x.Step,{onMouseEnter:()=>a(l),onMouseLeave:()=>a(null),onClick:()=>r==null?void 0:r(l),completed:l<t,children:[c.jsxs(x.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[c.jsxs(x.StepLabel,{StepIconComponent:s,children:[c.jsxs(x.Box,{sx:{display:"flex",gap:1,alignItems:"center"},children:[c.jsx(x.Typography,{sx:{fontSize:14,fontWeight:500,color:l===t?W.primary.main:W.text.primary},children:o.label}),c.jsx(cs,{size:"small",colorHex:l<t?W.success.main:l===t?"#973B00":W.text.primary,label:l<t?"Completed":l===t?"In progress":"Not started"})]}),c.jsx(x.Typography,{sx:{fontSize:12,fontWeight:400,color:`${W.text.primary}60`,mt:.5,width:"80%"},children:o.description})]}),i===l&&c.jsx(x.Button,{sx:{display:l>t?"none":"block"},variant:l<t?"outlined":"contained",size:"small",color:"primary",children:l<t?"Edit":l===t?"Complete":""})]}),l!==e.length-1&&c.jsx(x.Divider,{sx:{ml:4.2,borderColor:W.divider}})]},l))})},Nh=pt(c.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined"),Lh=({variant:e="list",title:t,subtitle:r,text:n,items:i=[],icon:a,colorHex:s,sx:o})=>{const l=s||W.info.main,d=Et(l,.08),h=Et(l,.08),f=a??c.jsx(Nh,{sx:{color:l,fontSize:18}});return e==="inlineInfo"?c.jsxs(x.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:d,border:`1px solid ${h}`,boxShadow:"none",...o},children:[c.jsx(x.Box,{sx:{display:"flex",alignItems:"center"},children:f}),c.jsx(x.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:l},children:n})]}):e==="inline"?c.jsx(x.Card,{sx:{p:1.5,display:"flex",alignItems:"center",gap:1,backgroundColor:d,border:`1px solid ${h}`,boxShadow:"none",...o},children:c.jsx(x.Typography,{variant:"body2",sx:{fontWeight:400,fontSize:12,lineHeight:1.3,color:l},children:n})}):e==="listWithHeader"?c.jsxs(x.Card,{sx:{p:2,boxShadow:"none",borderRadius:"6px",backgroundColor:d,border:`1px solid ${h}`,...o},children:[c.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[f,c.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:600,color:l,fontSize:14,lineHeight:1.3},children:t})]}),r&&c.jsx(x.Typography,{variant:"body2",sx:{mt:.5,color:l,fontSize:10,lineHeight:1.3},children:r}),c.jsx(x.List,{sx:{pl:5,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:l},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:400,lineHeight:"18px",color:l,my:-.5}},children:i.map((u,g)=>c.jsx(x.ListItem,{sx:{py:0},children:c.jsx(x.ListItemText,{primary:u})},g))})]}):c.jsx(x.Card,{sx:{p:"11px",borderRadius:"8px",backgroundColor:d,border:`0.5px solid ${h}`,boxShadow:"none",...o},children:c.jsx(x.List,{sx:{pl:4,"& .MuiListItem-root":{display:"list-item",listStyleType:"disc",color:l},"& .MuiListItemText-primary":{fontSize:"12px",fontWeight:600,lineHeight:"18px",color:l,my:-.5}},children:i.map((u,g)=>c.jsx(x.ListItem,{sx:{py:0},children:c.jsx(x.ListItemText,{primary:u})},g))})})},cc=({value:e,onChange:t,items:r,ariaLabel:n,sx:i,tabSx:a})=>c.jsxs(x.Box,{children:[c.jsx(x.Tabs,{value:e,onChange:(s,o)=>t(o),"aria-label":n||"Fin tabs",sx:{alignItems:"center",borderRadius:"6px",p:"8px 10px",backgroundColor:"#F2F2F2","& .MuiTabs-flexContainer":{gap:1},"& .MuiTabs-indicator":{display:"none"},...i},children:r.map((s,o)=>{const l=typeof s.value=="string"||typeof s.value=="number"?s.value:o;return c.jsx(x.Tab,{value:l,disabled:s.disabled,label:c.jsx(x.Typography,{variant:"body2",children:s.label}),sx:d=>({px:2,textTransform:"none",color:d.palette.primary.main,boxShadow:"none",borderRadius:"3px",border:"0.5px solid #0000001A",backgroundColor:"#E8E8E8","&:hover":{backgroundColor:d.palette.action.hover},"&.Mui-selected":{color:d.palette.common.white,borderColor:d.palette.primary.main,backgroundColor:d.palette.primary.main,fontWeight:600},...a})},String(l))})}),r.map((s,o)=>{const l=typeof s.value=="string"||typeof s.value=="number"?s.value:o,d=s.content??(typeof s.value=="object"?s.value:null);return d&&e===l?c.jsx(x.Box,{sx:{mt:1},children:d},`panel-${l}`):null})]}),qh=pt(c.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline"),uc=({name:e,columns:t,initialRow:r,addLabel:n,rowDeletable:i=!0,control:a,sx:s,addActions:o,emptyTitle:l="No items configured",emptySubtitle:d="Click 'Add' to get started.",emptyCardSx:h,setValue:f,rowSelectionMode:u,rowSelectionKey:g})=>{const{fields:k,append:m,remove:b}=du({control:a,name:e}),v=D.useMemo(()=>{if(g)return g;const I=t.find(p=>p.type==="rowSelect");return I==null?void 0:I.key},[t,g]),w=dl({control:a,name:e})||[],P=D.useMemo(()=>{if(!v)return{};const I={};return w.forEach((p,_)=>{I[_]=!!(p!=null&&p[v])}),I},[w,v]),T=D.useCallback(I=>P[I]===!0,[P]),C=D.useCallback((I,p)=>{if(!f||!v)return;const _=`${e}.${I}.${v}`;u==="single"&&p&&w.forEach((z,O)=>{if(O!==I){const N=`${e}.${O}.${v}`;f(N,!1,{shouldDirty:!0})}}),f(_,p,{shouldDirty:!0})},[e,v,u,f,w]),$=I=>{const p={...I||r};t.forEach(_=>{_.value!==void 0&&p[_.key]===void 0&&(p[_.key]=typeof _.value=="function"?_.value(p,k.length):_.value)}),m(p)},B=D.useMemo(()=>t.reduce((p,_)=>{if(_.width==="auto"||_.width===void 0)return p+120;const z=typeof _.width=="number"?_.width:typeof _.width=="string"&&parseInt(_.width)||160;return p+z},0)+(i?100:0),[t,i]),A=I=>I.width==="auto"||I.width===void 0?{width:"auto",minWidth:120,maxWidth:"none"}:typeof I.width=="number"?{width:`${I.width}px`,minWidth:`${I.width}px`,maxWidth:`${I.width}px`}:typeof I.width=="string"?{width:I.width,minWidth:I.width}:{width:"160px",minWidth:"160px"};return c.jsx(x.Card,{sx:{width:"100%",borderRadius:"4px",boxShadow:"0px 0.783px 3.131px 0px rgba(0,0,0,0.16)",backgroundColor:"#FFFFFF",overflow:"hidden",...s},children:k.length===0?c.jsxs(x.Box,{sx:I=>({p:4,textAlign:"center",borderStyle:"dashed",borderColor:Et(I.palette.primary.main,.4),backgroundColor:Et(I.palette.primary.main,.04),borderWidth:1,borderRadius:"8px",...h}),children:[c.jsx(x.Typography,{variant:"subtitle1",sx:I=>({color:I.palette.primary.main,fontWeight:600,mb:.5,fontSize:14}),children:l}),c.jsx(x.Typography,{variant:"body2",sx:I=>({color:I.palette.primary.main,mb:2,fontSize:12,fontWeight:400}),children:d}),Array.isArray(o)&&o.length>0?o.map((I,p)=>c.jsx(x.Button,{variant:"outlined",size:"small",startIcon:c.jsx(yn,{}),sx:{mr:1,mt:1},onClick:()=>$(I.template),children:I.label},`empty-add-${p}`)):n&&c.jsx(x.Button,{variant:"outlined",size:"small",startIcon:c.jsx(yn,{}),onClick:()=>$(),children:n})]}):c.jsxs(c.Fragment,{children:[c.jsx(x.Box,{sx:{height:"45px",display:"flex",alignItems:"center",px:1.125,gap:1,py:1.25,borderBottom:"1px solid #E5E6EB"},children:Array.isArray(o)&&o.length>0?o.map((I,p)=>c.jsx(x.Button,{variant:p===0?"contained":"outlined",size:"small",startIcon:c.jsx(yn,{}),onClick:()=>$(I.template),sx:{borderRadius:"3px",fontSize:"10.938px",fontWeight:500,textTransform:"none",px:1.17,py:.586,minWidth:"90px","&:hover":{backgroundColor:p===0?"#04502d":void 0}},children:I.label},`add-${p}`)):n&&c.jsx(x.Button,{variant:"contained",size:"small",startIcon:c.jsx(yn,{}),onClick:()=>$(),sx:{backgroundColor:"#056739",color:"#FFFFFF",borderRadius:"3px",fontSize:"10.938px",fontWeight:500,textTransform:"none",px:1.17,py:.586,minWidth:"90px","&:hover":{backgroundColor:"#04502d"}},children:n})}),c.jsx(x.Box,{sx:{width:"100%",overflow:"auto",maxHeight:"600px","&::-webkit-scrollbar":{height:"8px",width:"8px"},"&::-webkit-scrollbar-track":{backgroundColor:"#f1f1f1"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#888",borderRadius:"4px","&:hover":{backgroundColor:"#555"}}},children:c.jsx(x.TableContainer,{sx:{width:"max-content",minWidth:"100%"},children:c.jsxs(x.Table,{stickyHeader:!0,sx:{minWidth:`${B||650}px`},children:[c.jsx(x.TableHead,{children:c.jsxs(x.TableRow,{children:[t.map(I=>c.jsx(x.TableCell,{sx:{backgroundColor:"#F2F3F5",borderBottom:"1.756px solid #E5E6EB",fontWeight:500,fontSize:"12px",color:"#6B7785",whiteSpace:"nowrap",height:"43px",px:1.75,py:0,...A(I)},children:I.header},I.key)),i&&c.jsx(x.TableCell,{sx:{backgroundColor:"#F2F3F5",borderBottom:"1.756px solid #E5E6EB",fontWeight:500,fontSize:"12px",color:"#6B7785",whiteSpace:"nowrap",height:"43px",px:1.75,py:0,width:100,textAlign:"center"},children:"Actions"})]})}),c.jsx(x.TableBody,{children:k.map((I,p)=>{const _=T(p),z=u&&!_;return c.jsxs(x.TableRow,{children:[t.map(O=>{var ue;const N=`${e}.${p}.${O.key}`,K=O.type==="rowSelect"||O.key===v,ne=K?!1:z?!0:typeof O.disabled=="function"?O.disabled(I,p):!!O.disabled;if(O.type==="index"){const G=O.indexFormat?O.indexFormat(p):`#${p+1}`;return c.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",textAlign:((ue=O.cellSx)==null?void 0:ue.textAlign)||"center",...A(O),...O.cellSx},children:G},O.key)}if(O.value!==void 0&&O.editable===!1){const G=typeof O.value=="function"?O.value(I,p):O.value;return c.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",...A(O),...O.cellSx},children:G},O.key)}const me=O.endorsementText?typeof O.endorsementText=="function"?O.endorsementText(I,p):O.endorsementText:void 0;return c.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",p:1,borderBottom:"1px solid #E5E6EB",...A(O),...O.cellSx},children:O.type==="rowSelect"||K&&O.type==="checkbox"?c.jsx(Pe,{name:N,control:a,defaultValue:!1,render:({field:G})=>c.jsx(Ht,{label:"",checked:!!G.value,disabled:!1,onChange:L=>{G.onChange(L),C(p,L)},sx:O.sx})}):O.type==="checkbox"?c.jsx(Pe,{name:N,control:a,render:({field:G})=>c.jsx(Ht,{label:"",checked:!!G.value,disabled:ne,onChange:G.onChange,sx:O.sx})}):O.type==="select"?c.jsx(Pe,{name:N,control:a,render:({field:G})=>c.jsx(Ri,{...G,fullWidth:!0,disabled:ne,options:O.options||[],size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...O.sx},helperText:O.helperText,required:O.required})}):O.type==="date"?c.jsx(Pe,{name:N,control:a,defaultValue:O.value!==void 0?typeof O.value=="function"?O.value(I,p):O.value:void 0,render:({field:G})=>(D.useEffect(()=>{if(f&&(G.value===void 0||G.value===null||G.value==="")&&O.value!==void 0){const L=typeof O.value=="function"?O.value(I,p):O.value;f(N,L,{shouldValidate:!1})}},[N,G.value,O.value,I,p,f]),c.jsx(ls,{...G,fullWidth:!0,disabled:ne,size:"small",placeholder:O.placeholder||"DD/MM/YYYY",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...O.sx},helperText:O.helperText,required:O.required}))}):c.jsx(Pe,{name:N,control:a,defaultValue:O.value!==void 0?typeof O.value=="function"?O.value(I,p):O.value:void 0,render:({field:G})=>(D.useEffect(()=>{if(f&&(G.value===void 0||G.value===null||G.value==="")&&O.value!==void 0){const L=typeof O.value=="function"?O.value(I,p):O.value;f(N,L,{shouldValidate:!1})}},[N,G.value,O.value,I,p,f]),c.jsx(vt,{...G,fullWidth:!0,type:O.type==="number"?"number":"text",placeholder:O.placeholder,disabled:ne,size:"small",sx:{"& .MuiOutlinedInput-input":{py:"7.5px"},...O.sx},helperText:O.helperText,required:O.required,endorsementText:me,endorsementBg:O.endorsementBg,endorsementColor:O.endorsementColor,endorsementRadius:O.endorsementRadius,endorsementHeight:O.endorsementHeight,endorsementPaddingX:O.endorsementPaddingX,inputProps:{...O.type==="number"?{min:O.min,max:O.max,step:O.step}:{minLength:O.minLength,maxLength:O.maxLength,pattern:O.pattern}}}))})},O.key)}),i&&c.jsx(x.TableCell,{sx:{whiteSpace:"nowrap",height:"35px",px:1.5,py:0,borderBottom:"1px solid #E5E6EB",textAlign:"center"},children:c.jsx(x.IconButton,{size:"small",color:"error",onClick:()=>b(p),sx:{width:"20px",height:"20px"},children:c.jsx(qh,{sx:{fontSize:"20px"}})})})]},I.id)})})]})})})]})})},pc=({name:e,control:t,items:r,sx:n,cardSx:i})=>c.jsx(x.Box,{sx:{display:"flex",flexDirection:"column",gap:1,...n},children:r.map(a=>{const s=!!a.leftAction,o=!!a.rightAction,l=!!(a.header||a.chipText),d=a.leftAction,h=a.rightAction;return c.jsxs(x.Box,{sx:{border:"1px solid #DDDDDD",borderRadius:"8px",height:"40px",display:"flex",alignItems:"center",justifyContent:"space-between",px:1,...i},children:[s&&d&&c.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flexShrink:0},children:c.jsx(Pe,{name:d.name,control:t,defaultValue:!1,render:({field:f})=>c.jsx(Ht,{label:d.label||"",checked:!!f.value,onChange:f.onChange,sx:{margin:0}})})}),l&&c.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1,flex:s||o?1:"none",ml:s?1:0},children:[a.header&&c.jsx(x.Typography,{variant:"body2",sx:{fontSize:"12px",color:"rgba(0,0,0,0.87)",fontWeight:400},children:a.header}),a.chipText&&c.jsx(x.Box,{sx:{bgcolor:"rgba(26,26,26,0.1)",px:1.5,py:.375,borderRadius:"4px",fontSize:"12px",color:"rgba(26,26,26,0.8)"},children:a.chipText})]}),o&&h&&c.jsx(x.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexShrink:0,ml:"auto"},children:c.jsx(Pe,{name:h.name,control:t,defaultValue:!1,render:({field:f})=>c.jsx(pi,{label:h.label,checked:!!f.value,onChange:f.onChange,sx:{margin:0}})})}),!s&&!o&&!l&&c.jsx(x.Box,{sx:{width:"100%",height:"100%"}})]},a.id)})}),dc=pt(c.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"}),"Delete"),ea=pt(c.jsx("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutline"),Wh=[{label:"Interest-only",value:"interest-only"},{label:"Principal moratorium",value:"principal-moratorium"},{label:"EMI",value:"emi"},{label:"Equal-principal",value:"equal-principal"},{label:"Balloon",value:"balloon"},{label:"Bullet",value:"bullet"},{label:"Step-up/Down",value:"step-up-down"},{label:"Seasonal skips",value:"seasonal-skips"},{label:"Custom fixed installment",value:"custom-fixed"},{label:"Full payment holiday (no billing)",value:"payment-holiday"}],ta=[{label:"Accrue & capitalize at end of phase",value:"accrue-capitalize"},{label:"Accrue & bill in first period after phase",value:"accrue-bill-next"},{label:"Accrue & forgive at phase end",value:"accrue-forgive"}],Uh=({phase:e,index:t,onUpdate:r,onDelete:n,months:i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],disabled:a=!1,sx:s})=>{const[o,l]=D.useState(e.seasonalMonths||[]),d=u=>{const g=o.includes(u)?o.filter(k=>k!==u):[...o,u];l(g),r(e.id,{seasonalMonths:g})},h=(()=>{const u=e.min||0;return u<0?"Min cannot be negative.":Number.isInteger(u)?null:"Use whole periods."})(),f=(()=>{const u=e.min||0,g=e.max||0;return Number.isInteger(g)?g<u?"Max must be ≥ Min.":null:"Use whole periods."})();return c.jsx(x.Card,{sx:{border:"2px solid",borderColor:W.divider,position:"relative",...s},children:c.jsxs(x.CardContent,{sx:{p:2},children:[c.jsxs(x.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c.jsxs(x.Box,{sx:{display:"flex",gap:.5,alignItems:"center"},children:[c.jsx(x.Box,{children:c.jsx(oc,{})}),c.jsx(cs,{label:t+1,size:"small"})]}),c.jsx(x.IconButton,{onClick:()=>n(e.id),disabled:a,sx:{color:W.error.main,"&:hover":{bgcolor:Qe[50]}},size:"small",children:c.jsx(dc,{fontSize:"small"})})]}),c.jsx(x.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:c.jsxs(x.Box,{sx:{flex:1,display:"grid",gap:1.5},children:[c.jsxs(x.Box,{sx:{display:"flex",gap:2,mb:.5},children:[c.jsx(x.Box,{sx:{flex:.5,display:"grid",gap:1},children:c.jsx(Ri,{labelText:"Phase type",value:e.type,onChange:u=>r(e.id,{type:u.target.value}),options:Wh,disabled:a})}),c.jsxs(x.Box,{sx:{display:"grid",gap:1,flex:.5},children:[c.jsx(x.Typography,{variant:"caption",sx:{fontSize:"12px",color:W.text.secondary},children:"Allocation priority (1–9)"}),c.jsx(vt,{type:"number",value:e.priority||5,onChange:u=>{const g=parseInt(u.target.value)||5;r(e.id,{priority:Math.min(9,Math.max(1,g))})},inputProps:{min:1,max:9},disabled:a,sx:{textAlign:"center"}})]})]}),c.jsxs(x.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[c.jsx(x.Box,{sx:{display:"grid",gap:1},children:c.jsx(vt,{labelText:"Min periods",type:"number",value:e.min||0,onChange:u=>{const g=parseInt(u.target.value)||0;r(e.id,{min:g,...e.lockLength?{max:g}:{}})},inputProps:{min:0},disabled:a,error:!!h,helperText:h||void 0})}),c.jsx(x.Box,{sx:{display:"grid",gap:1},children:c.jsx(vt,{labelText:"Max periods",type:"number",value:e.lockLength?e.min:e.max||0,onChange:u=>r(e.id,{max:parseInt(u.target.value)||0}),inputProps:{min:0},disabled:a||e.lockLength,error:!!f&&!e.lockLength,helperText:e.lockLength?"Locked to Min":f||void 0,sx:e.lockLength?{opacity:.5}:{}})})]}),c.jsxs(x.Box,{sx:{display:"flex",gap:3},children:[c.jsx(Ht,{label:"Lock length (fix to Min)",checked:e.lockLength||!1,onChange:u=>r(e.id,{lockLength:u,...u?{max:e.min}:{}}),disabled:a}),c.jsx(Ht,{label:"Residual fill",checked:e.residualFill||!1,onChange:u=>r(e.id,{residualFill:u}),disabled:a})]}),e.type==="principal-moratorium"&&c.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[c.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[c.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),c.jsx(x.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:c.jsx(ea,{sx:{fontSize:14,color:W.text.secondary,cursor:"help"}})})]}),c.jsx(wr,{value:e.interestPolicy||"accrue-capitalize",onChange:u=>r(e.id,{interestPolicy:u}),options:ta,labelPosition:"none"}),e.interestPolicy==="accrue-forgive"&&c.jsx(x.Typography,{variant:"caption",sx:{color:W.text.secondary,mt:1},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]}),e.type==="balloon"&&c.jsxs(x.Box,{sx:{display:"grid",gap:1.5},children:[c.jsx(wr,{value:e.balloonType||"percent",onChange:u=>r(e.id,{balloonType:u}),options:[{label:"Amount",value:"amount"},{label:"Percent",value:"percent"}],row:!0,labelPosition:"none"}),e.balloonType==="amount"&&c.jsx(vt,{labelText:"Balloon Amount",type:"number",value:e.balloonAmount||"",onChange:u=>r(e.id,{balloonAmount:parseFloat(u.target.value)||0}),placeholder:"Enter amount",disabled:a}),e.balloonType==="percent"&&c.jsx(vt,{labelText:"Balloon Percent",type:"number",value:e.balloonPercent||"",onChange:u=>r(e.id,{balloonPercent:parseFloat(u.target.value)||0}),placeholder:"Enter percent",inputProps:{max:100},disabled:a})]}),e.type==="bullet"&&c.jsx(x.Typography,{variant:"caption",sx:{color:W.text.secondary},children:"Principal at maturity"}),e.type==="step-up-down"&&c.jsxs(x.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2},children:[c.jsx(vt,{labelText:"Step Percent",type:"number",value:e.stepPercent||"",onChange:u=>r(e.id,{stepPercent:parseFloat(u.target.value)||0}),placeholder:"e.g., 10",disabled:a}),c.jsx(vt,{labelText:"Every N periods",type:"number",value:e.stepEveryN||"",onChange:u=>r(e.id,{stepEveryN:parseInt(u.target.value)||0}),placeholder:"e.g., 6",disabled:a})]}),e.type==="seasonal-skips"&&c.jsxs(x.Box,{sx:{display:"grid",gap:1.5},children:[c.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[c.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Skip Months"}),c.jsx(x.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:i.map(u=>c.jsx(x.Chip,{label:u,size:"small",onClick:()=>!a&&d(u),sx:{cursor:a?"default":"pointer",bgcolor:o.includes(u)?W.primary.main:"transparent",color:o.includes(u)?W.primary.contrastText:W.text.primary,border:`1px solid ${W.divider}`,"&:hover":{bgcolor:o.includes(u)?Qe[600]:Qe[50]}}},u))})]}),c.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[c.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[c.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),c.jsx(x.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:c.jsx(ea,{sx:{fontSize:14,color:W.text.secondary,cursor:"help"}})})]}),c.jsx(wr,{value:e.interestPolicy||"accrue-capitalize",onChange:u=>r(e.id,{interestPolicy:u}),options:ta,labelPosition:"none"}),e.interestPolicy==="accrue-forgive"&&c.jsx(x.Typography,{variant:"caption",sx:{color:W.text.secondary},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]})]}),e.type==="custom-fixed"&&c.jsx(vt,{labelText:"Fixed Installment Amount",type:"number",value:e.customAmount||"",onChange:u=>r(e.id,{customAmount:parseFloat(u.target.value)||0}),placeholder:"Enter amount",disabled:a}),e.type==="payment-holiday"&&c.jsxs(x.Box,{sx:{display:"grid",gap:1},children:[c.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[c.jsx(x.Typography,{variant:"subtitle2",sx:{fontWeight:500},children:"Interest policy during phase"}),c.jsx(x.Tooltip,{title:"IFRS: interest is recognized via EIR; to not charge customers, accrue then forgive via waiver journal.",children:c.jsx(ea,{sx:{fontSize:14,color:W.text.secondary,cursor:"help"}})})]}),c.jsx(wr,{value:e.holidayInterestTreatment||"accrue-capitalize",onChange:u=>r(e.id,{holidayInterestTreatment:u}),options:ta,labelPosition:"none"}),e.holidayInterestTreatment==="accrue-forgive"&&c.jsx(x.Typography,{variant:"caption",sx:{color:W.text.secondary},children:"Accruals are recognized daily and waived at phase end as contra-revenue; no capitalization."})]})]})})]})})};async function fc(e,t,r,n){try{const{endpoint:i,method:a="GET",valueField:s="value",labelField:o="label",headers:l={},params:d={},body:h,transform:f,passThroughFields:u}=e;let g=i;if(t&&!i.startsWith("http")&&(g=`${t}${i.startsWith("/")?i:`/${i}`}`),n){const T=/\{([^}]+)\}/g;g=g.replace(T,(C,$)=>{const B=n[$];return B!=null?encodeURIComponent(String(B)):""}),g=g.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}const k=new URLSearchParams;Object.entries(d).forEach(([T,C])=>{C!=null&&k.append(T,String(C))}),k.toString()&&(g+=`${g.includes("?")?"&":"?"}${k.toString()}`);try{const T=/^https?:\/\//i.test(g),C=new URL(g,T?void 0:"http://local.placeholder"),$=Array.from(C.searchParams.entries());for(const[B,A]of $)(A===""||A==="undefined"||A==="null")&&C.searchParams.delete(B);T?g=C.toString():g=C.pathname+(C.search?C.search:""),g=g.replace(/\?&/g,"?").replace(/&&/g,"&").replace(/\?$/g,"")}catch{}const m={"Content-Type":"application/json",...r,...l},b={method:a,headers:m};(a==="POST"||a==="PUT")&&h&&(b.body=JSON.stringify(h));const v=await fetch(g,b);if(!v.ok)throw new Error(`API request failed: ${v.status} ${v.statusText}`);const w=await v.json();if(f)return f(Array.isArray(w)?w:w.data||w);const P=Array.isArray(w)?w:w.data||w;if(!Array.isArray(P))throw new Error("API response is not an array");return P.map(T=>{const C={label:T[o]||T.name||T.title||String(T[s]||""),value:T[s]||T.id||T.value||""},$=Array.isArray(u)?u:void 0;if(Array.isArray($))for(const B of $)T[B]!==void 0&&(C[B]=T[B]);return C})}catch(i){throw console.error("API fetch error:",i),new Error(`Failed to fetch data: ${i instanceof Error?i.message:"Unknown error"}`)}}function hc(e,t,r,n,i=!1){const a=D.useMemo(()=>{if(!(e!=null&&e.dependsOn)||!n)return null;const o=n[e.dependsOn];return o!==void 0?o:null},[e==null?void 0:e.dependsOn,n]),s=D.useMemo(()=>["api-data",e==null?void 0:e.endpoint,e==null?void 0:e.method,e==null?void 0:e.valueField,e==null?void 0:e.labelField,t,a,n?JSON.stringify(n):null],[e==null?void 0:e.endpoint,e==null?void 0:e.method,e==null?void 0:e.valueField,e==null?void 0:e.labelField,t,a,n]);return Zu({queryKey:s,queryFn:()=>{if(!e)throw new Error("API config is required");return fc(e,t,r,n)},enabled:i&&!!e,staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:o=>Math.min(1e3*2**o,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0,refetchOnMount:!1})}function gr(e){return!!(e.apiConfig||e.api_endpoint)}function us(e){return e.apiConfig?e.apiConfig:e.api_endpoint?{endpoint:e.api_endpoint,method:e.api_method||"GET",valueField:e.value_field||"value",labelField:e.label_field||"label",dependsOn:e.depends_on,conditional:e.conditional}:null}function Hh(e,t){const r=us(e);if(!(r!=null&&r.conditional)&&!e.conditional)return!0;if(r!=null&&r.dependsOn||e.depends_on){const n=(r==null?void 0:r.dependsOn)||e.depends_on;if(n){const i=t[n];return i!=null&&i!==""}}return!0}const ps=({field:e,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:s})=>{const o=r[e.name],l=!!o,[d,h]=D.useState(!1),f=D.useRef(!1),[u,g]=D.useState(!1),[k,m]=D.useState(!1),[b,v]=D.useState(!1),w=D.useRef(null),P=D.useRef(null),T=()=>{var q;return e.required!==void 0?e.required:((q=e.validation)==null?void 0:q.required)!==void 0?e.validation.required:!1},C=q=>T()?`${q} *`:q,$=()=>{if(e.value!==void 0){if(typeof e.value=="function")try{return e.value(a||{})}catch{return""}return e.value}return e.type==="checkbox"?!1:e.type==="select"&&e.default?e.default:e.type==="autocomplete"&&e.multiple?[]:""},B=D.useRef(void 0);D.useEffect(()=>{const q=e.value;if(typeof q!="function"||!s)return;let te;try{te=q(a||{})}catch{return}const se=a?a[e.name]:void 0;if(B.current===void 0&&(B.current=te),se===void 0||se===B.current)try{s(e.name,te,{shouldValidate:!0,shouldDirty:!1}),B.current=te}catch{}},[JSON.stringify(Array.isArray(e.valueDeps)&&a?e.valueDeps.reduce((q,te)=>({...q,[te]:a[te]}),{}):a||{}),e.name]);const A=D.useMemo(()=>{const q=us(e);return q&&Array.isArray(e.passThroughFields)&&(q.passThroughFields=e.passThroughFields),q},[e.apiConfig,e.api_endpoint,e.api_method,e.value_field,e.label_field,e.depends_on,e.conditional,e.passThroughFields]),I=D.useRef(null),p=A!=null&&A.dependsOn?a==null?void 0:a[A.dependsOn]:null,_=D.useMemo(()=>{if(!(A!=null&&A.dependsOn))return!1;const q=p,te=I.current,se=q!==te;return se&&(I.current=q),se},[A==null?void 0:A.dependsOn,p]),z=D.useMemo(()=>{const q=e.showWhen;if(typeof q=="function")try{return!!q(a||{})}catch{return!0}if(q&&typeof q=="object"){const te=q.field,se=q.equals,oe=q.in,le=te?(a||{})[te]:void 0;if(te&&typeof se<"u")return le===se;if(te&&Array.isArray(oe))return oe.includes(le)}return!0},[e.showWhen,a]),O=D.useCallback(()=>{const q=e.dynamicEndorsement;if(typeof q=="function")try{return q(a||{})}catch{return e.endorsementText}return e.endorsementText},[e,a]),N=D.useCallback(()=>{const q=e.endAdornment,te=e.endAdornmentSwitch,se=e.endAdornmentCheckbox;if(te)return c.jsx(Pe,{name:te,control:t,defaultValue:e.endAdornmentSwitchDefault??!1,render:({field:oe})=>c.jsx(x.Switch,{checked:oe.value||!1,onChange:le=>{oe.onChange(le.target.checked),e.endAdornmentSwitchOnChange&&e.endAdornmentSwitchOnChange(le.target.checked,a,s)},disabled:e.endAdornmentSwitchDisabled,size:e.endAdornmentSwitchSize||"small",sx:e.endAdornmentSwitchSx})});if(se)return c.jsx(Pe,{name:se,control:t,defaultValue:e.endAdornmentCheckboxDefault??!1,render:({field:oe})=>c.jsx(Ht,{label:"",checked:oe.value||!1,onChange:oe.onChange,disabled:e.endAdornmentCheckboxDisabled,sx:e.endAdornmentCheckboxSx})});if(typeof q=="function")try{return q(a||{},{control:t,setValue:s})}catch{return}return q},[e,a,t,s]),K=D.useMemo(()=>d&&gr(e)&&(!(A!=null&&A.dependsOn)||p),[d,e,A==null?void 0:A.dependsOn,p]),ne=D.useMemo(()=>{const q={};if(!a)return q;const te=(A==null?void 0:A.endpoint)||(e==null?void 0:e.api_endpoint);if(te&&typeof te=="string"){const se=te.match(/\{([^}]+)\}/g)||[];for(const oe of se){const le=oe.slice(1,-1),Se=a[le];Se!==void 0&&(q[le]=Se)}}if(A!=null&&A.dependsOn){const se=A.dependsOn,oe=a[se];oe!==void 0&&(q[se]=oe)}return q},[A==null?void 0:A.endpoint,e==null?void 0:e.api_endpoint,A==null?void 0:A.dependsOn,a]),{data:me=[],isLoading:ue,error:G}=hc(A,n,i,ne,K),L=D.useCallback(()=>{gr(e)&&!f.current&&(f.current=!0,h(!0))},[e]),Y=D.useCallback(()=>{gr(e)&&!f.current&&(f.current=!0,h(!0))},[e]);D.useEffect(()=>{if(gr(e)&&!f.current){const q=a==null?void 0:a[e.name];q!=null&&q!==""&&(f.current=!0,h(!0))}},[e,a]),D.useEffect(()=>{gr(e)&&(A!=null&&A.dependsOn)&&_&&f.current&&(f.current=!1,h(!1))},[_,A==null?void 0:A.dependsOn]);const de=D.useCallback(()=>gr(e)?me:e.type==="select"||e.type==="toggle"||e.type==="radio"||e.type==="autocomplete"?e.options||[]:[],[e,me]),fe=()=>{var q,te,se,oe,le,Se;switch(e.type){case"title":return c.jsx(x.Typography,{variant:e.variant||"h4",component:"h1",color:e.color,align:e.align||"left",sx:{mb:3,fontWeight:600,...e.sx},children:e.label});case"section":return c.jsx(x.Typography,{variant:e.variant||"h6",component:"h3",color:e.color,align:e.align||"left",sx:{mb:2,fontWeight:600,color:"text.primary",...e.sx},children:e.label});case"finuiHeader":const Q=e.actionName,De=e.actionComponent,He=e.actionLabel,Ze=S=>c.jsx(sc,{title:e.title||e.label,subtitle:e.subtitle,align:e.align||"left",sx:e.sx,actions:S??e.actions}),ee=S=>{if(e.cardWrap){const H={...{px:2,py:1,boxShadow:"none",border:"1px solid #DDDDDD"},...e.cardSx};return c.jsx(x.Card,{sx:H,...e.cardProps,children:S})}return S};return ee(Q&&De?c.jsx(Pe,{name:Q,control:t,defaultValue:e.value??!1,render:({field:S})=>Ze(De==="switch"?c.jsx(pi,{label:He,checked:!!S.value,onChange:S.onChange}):c.jsx(Ht,{label:He||"",checked:!!S.value,onChange:S.onChange}))}):Ze());case"tabs":return c.jsx(Pe,{name:e.name,control:t,defaultValue:e.defaultValue??(typeof((te=(q=e.items)==null?void 0:q[0])==null?void 0:te.value)=="string"||typeof((oe=(se=e.items)==null?void 0:se[0])==null?void 0:oe.value)=="number"?(Se=(le=e.items)==null?void 0:le[0])==null?void 0:Se.value:0),render:({field:S})=>{const E=e.items||[],H=E.map((X,U)=>({label:X.label,value:typeof X.value=="string"||typeof X.value=="number"?X.value:U,content:X.content,disabled:X.disabled})),R=S.value,M=(()=>{if(typeof R=="string"||typeof R=="number"){const X=E.findIndex((U,ye)=>typeof U.value=="string"||typeof U.value=="number"?U.value===R:ye===R);return X>=0?X:0}return Number(R)||0})(),Z=E[M]||{};return c.jsxs(x.Box,{children:[c.jsx(cc,{value:S.value,onChange:S.onChange,items:H,ariaLabel:e.ariaLabel||e.label,sx:e.sx,tabSx:e.tabSx}),Array.isArray(Z.fields)&&Z.fields.length>0&&(()=>{const X=Z.fields,U=[];let ye=[];for(const je of X)je.type==="section"&&ye.length>0?(U.push(ye),ye=[je]):ye.push(je);ye.length>0&&U.push(ye);const Te={p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mt:1};return c.jsx(x.Box,{sx:{mt:1},children:U.map((je,Be)=>{const qe=je.find(et=>et.type==="section"),Je=(qe==null?void 0:qe.cardWrap)!==!1,At=c.jsx(c.Fragment,{children:je.map(et=>{const Ye=et.showWhen;if(Ye)try{if(typeof Ye=="function"){if(!Ye(a||{}))return null}else if(typeof Ye=="object"){const Yt=Ye.field,ms=Ye.equals,xs=Ye.in,gs=Yt?(a||{})[Yt]:void 0;if(Yt&&typeof ms<"u"&&gs!==ms||Yt&&Array.isArray(xs)&&!xs.includes(gs))return null}}catch{}const dt=Math.min(Math.max(et.col??12,1),12);return c.jsx(x.Box,{sx:{gridColumn:`span ${dt}`},children:c.jsx(ps,{field:et,control:t,errors:r,baseUrl:n,apiHeaders:i,formData:a,setValue:s})},et.name)})});return Je?c.jsx(x.Card,{sx:{...Te,...(qe==null?void 0:qe.cardSx)||{}},...(qe==null?void 0:qe.cardProps)||{},children:At},`tab-group-${Be}`):c.jsx(x.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mt:1},children:At},`tab-group-${Be}`)})})})()]})}});case"grid":const ce=e.defaultRows||[];return c.jsx(Pe,{name:e.name,control:t,defaultValue:ce.length>0?ce:$()||[],render:()=>c.jsx(uc,{name:e.name,columns:e.columns||[],initialRow:e.initialRow||{},addLabel:e.addLabel,rowDeletable:e.rowDeletable!==!1,control:t,setValue:s,addActions:e.addActions,emptyTitle:e.emptyTitle,emptySubtitle:e.emptySubtitle,emptyCardSx:e.emptyCardSx,sx:e.sx,rowSelectionMode:e.rowSelectionMode,rowSelectionKey:e.rowSelectionKey})});case"listcards":return c.jsx(pc,{name:e.name,control:t,items:e.items||[],sx:e.sx,cardSx:e.cardSx});case"dragdroplist":return c.jsx(Pe,{name:e.name,control:t,defaultValue:e.items||[],render:({field:S})=>{const E=e,H=S.value||E.items||[],R=typeof E.getId=="function"?E.getId:typeof E.getId=="string"?X=>X[E.getId]:X=>X.id??X._id??X.key??String(X),M=typeof E.getText=="function"?E.getText:typeof E.getText=="string"?X=>X[E.getText]??String(X):X=>X.text??X.label??X.name??X.title??String(X),Z=(()=>{if(typeof E.chipText=="function")return E.chipText;if(typeof E.chipText=="string")return H.length>0&&H[0]&&E.chipText in H[0]?(X,U)=>X[E.chipText]??void 0:E.chipText})();return c.jsx(lc,{items:H,getId:R,onReorder:X=>{S.onChange(X)},header:E.header,disabled:e.disabled,sx:E.sx,chipText:Z,helperText:E.helperText||(l?o==null?void 0:o.message:void 0),getText:M,showIndex:E.showIndex!==!1,showLeftIcon:E.showLeftIcon!==!1,renderItem:E.renderItem})}});case"text":case"email":case"password":case"tel":case"textarea":return c.jsx(Pe,{name:e.name,control:t,defaultValue:$(),render:({field:S})=>e.type==="textarea"?c.jsx(ac,{...S,labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"?C(e.label):void 0,labelVariant:e.labelVariant,placeholder:e.placeholder,disabled:e.disabled,hasError:l,helperText:(o==null?void 0:o.message)||e.helperText}):c.jsx(vt,{...S,id:e.id,labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"?C(e.label):void 0,endAdornment:N(),endorsementText:O(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:e.type==="password"?u?"text":"password":e.type,placeholder:e.placeholder,disabled:e.disabled,hasError:l,helperText:(o==null?void 0:o.message)||e.helperText,InputProps:e.type==="password"?{endAdornment:c.jsx(Zl,{position:"end",children:c.jsx(Gn,{"aria-label":"toggle password visibility",onClick:()=>g(E=>!E),edge:"end",children:u?c.jsx(Fo,{}):c.jsx(jo,{})})})}:void 0})});case"number":return c.jsx(Pe,{name:e.name,control:t,defaultValue:$(),render:({field:S})=>c.jsx(vt,{...S,id:e.id,labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"?C(e.label):void 0,endAdornment:N(),endorsementText:O(),endorsementBg:e.endorsementBg,endorsementColor:e.endorsementColor,endorsementRadius:e.endorsementRadius,endorsementHeight:e.endorsementHeight,endorsementPaddingX:e.endorsementPaddingX,labelVariant:e.labelVariant,type:"number",placeholder:e.placeholder,disabled:e.disabled,hasError:l,helperText:(o==null?void 0:o.message)||e.helperText,inputProps:{min:e.min,max:e.max}})});case"select":const re=de();return c.jsx(Pe,{name:e.name,control:t,defaultValue:$(),render:({field:S})=>c.jsx(Ri,{labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"&&e.labelPosition!=="none"?C(e.label):void 0,labelVariant:e.labelVariant,value:S.value,onChange:S.onChange,options:re,disabled:e.disabled||ue,placeholder:e.labelPosition==="inner"||e.labelPosition==="none"||!e.labelPosition?e.placeholder||(e.labelPosition==="none"?C(e.label):void 0):e.placeholder,loading:ue,error:l||!!G,helperText:(o==null?void 0:o.message)||(G==null?void 0:G.message)||e.helperText,onOpen:L})});case"checkbox":return c.jsx(Pe,{name:e.name,control:t,defaultValue:$(),render:({field:S})=>c.jsx(Ht,{label:C(e.label),checked:!!S.value,disabled:e.disabled,onChange:S.onChange})});case"toggle":return c.jsx(Pe,{name:e.name,control:t,defaultValue:$(),render:({field:S})=>c.jsx(wr,{label:C(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:S.value,options:e.options||[],row:!0,onChange:S.onChange})});case"radio":return c.jsx(Pe,{name:e.name,control:t,defaultValue:$(),render:({field:S})=>c.jsx(wr,{label:C(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:S.value,options:e.options||[],row:e.row===!0,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:S.onChange})});case"checkboxGroup":return c.jsx(Pe,{name:e.name,control:t,defaultValue:$()||[],render:({field:S})=>c.jsx(ic,{label:C(e.label),labelPosition:e.labelPosition==="none"?"none":"top",labelVariant:e.labelVariant,value:Array.isArray(S.value)?S.value:[],options:e.options||[],row:e.row,groupPadding:e.groupPadding,itemGap:e.itemGap,helperText:e.helperText,onChange:S.onChange,disabled:e.disabled})});case"switch":return c.jsx(Pe,{name:e.name,control:t,defaultValue:$(),render:({field:S})=>c.jsx(pi,{label:C(e.label),checked:!!S.value,disabled:e.disabled,onChange:S.onChange})});case"autocomplete":const he=de(),y=!!(e.disabled||ue||A!=null&&A.dependsOn&&!p);return c.jsx(Pe,{name:e.name,control:t,defaultValue:$(),render:({field:S})=>{const E=S.value,H=e.multiple===!0,R=(A==null?void 0:A.valueField)||e.value_field||"value",M=(A==null?void 0:A.labelField)||e.label_field||"label",Z=U=>{if(U!=null){if(typeof U=="string"||typeof U=="number")return U;if(typeof U=="object"){if(U[R]!==void 0)return U[R];if(U.value!==void 0)return U.value;if(U.id!==void 0)return U.id}}},X=(()=>{if(H)return(Array.isArray(E)?E:[]).map(ye=>{const Te=he.find(je=>{const Be=Z(je);return Be!==void 0&&Be===ye});return Te||{[R]:ye,[M]:`Selected: ${ye}`,value:ye,label:`Selected: ${ye}`}});{if(E==null||E==="")return null;const U=he.find(ye=>{const Te=Z(ye);return Te!==void 0&&Te===E});return U||{[R]:E,[M]:`Selected: ${E}`,value:E,label:`Selected: ${E}`}}})();return c.jsx(nc,{id:e.id,options:he,value:X,multiple:H,labelText:e.labelPosition==="top"?C(e.label):void 0,label:e.labelPosition!=="top"?C(e.label):void 0,placeholder:y&&(A!=null&&A.dependsOn)&&!p?`Please select ${A.dependsOn.replace(/_/g," ")} first`:e.placeholder,labelVariant:e.labelVariant,disabled:y,loading:ue,error:l||!!G,helperText:(o==null?void 0:o.message)||(G==null?void 0:G.message)||e.helperText||"",onOpen:Y,noOptionsText:y&&(A!=null&&A.dependsOn)&&!p?`Please select ${A.dependsOn.replace(/_/g," ")} first`:ue?"Fetching data...":d&&!ue&&he.length===0?"No options available":"Click to load options",onChange:U=>{const ye=(A==null?void 0:A.valueField)||e.value_field||"value";if(H){const je=(Array.isArray(U)?U:[]).map(Be=>typeof Be=="object"&&(Be[ye]||Be.value||Be.id)||Be);S.onChange(je)}else{let Te;U&&typeof U=="object"?Te=U[ye]||U.value||U.id||U:Te=U,S.onChange(Te);const je=e.selectedAssignments;if(je&&U&&typeof U=="object")for(const[Be,qe]of Object.entries(je)){const Je=U[qe];if(Je!==void 0&&typeof s=="function")try{s(Be,Je,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!1})}catch{}}}}})}});case"date":return c.jsx(Pe,{name:e.name,control:t,defaultValue:$(),render:({field:S})=>c.jsx(ls,{...S,id:e.name,label:C(e.label),labelPosition:e.labelPosition||"inner",labelVariant:e.labelVariant,disabled:e.disabled,error:l,helperText:o==null?void 0:o.message,inputProps:{min:e.minDate,max:e.maxDate}})});case"image":return c.jsx(Pe,{name:e.name,control:t,defaultValue:$(),render:({field:S})=>{const E=S.value||e.defaultValue||e.src;if(E){const U=e.imageUploaded||{},ye=U.previewText||"Preview",Te=U.removeText||"Remove",je=U.saveText||"Save logo",Be=U.showSave!==void 0?U.showSave:!!(e.onSave||U.saveText),qe=()=>{if(v(!0),typeof e.onPreview=="function")try{e.onPreview(E)}catch{}},Je=()=>{S.onChange(""),typeof e.onRemove=="function"&&e.onRemove()},At=()=>{typeof e.onSave=="function"&&e.onSave({url:E,file:P.current||void 0})},et=Ye=>{const dt=Ye.target.files&&Ye.target.files[0];if(dt){if(typeof e.onFileSelected=="function")try{e.onFileSelected(dt)}catch{}try{const Yt=URL.createObjectURL(dt);S.onChange(Yt)}catch{}P.current=dt,v(!1)}};return c.jsxs(x.Card,{sx:{display:"flex",alignItems:"center",gap:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",...U.cardSx},children:[c.jsx("input",{type:"file",ref:w,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:et}),c.jsxs(x.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[c.jsx(x.Box,{sx:{width:"30%",height:"10%",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"6px",background:"#FFFFFF",overflow:"hidden",...U.thumbnailSx},children:c.jsx("img",{src:E,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:"100%"}})}),c.jsxs(x.Box,{sx:{flexGrow:1},children:[c.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:500,...U.fileNameSx},children:typeof E=="string"?E.split("/").pop():"Selected image"}),c.jsx(x.Typography,{sx:{fontSize:"10px",...U.fileMetaSx},children:"Image selected"})]}),c.jsxs(x.Box,{sx:{display:"flex",gap:1},children:[c.jsx(x.Button,{type:"button",sx:{...U.previewButtonSx},variant:"outlined",onClick:qe,startIcon:c.jsx(jo,{}),children:ye}),c.jsx(x.Button,{variant:"outlined",color:"error",onClick:Je,sx:{...U.removeButtonSx},startIcon:c.jsx(Fo,{}),children:Te}),Be&&c.jsx(x.Button,{variant:"contained",onClick:At,sx:{...U.saveButtonSx},children:je})]})]}),c.jsxs(x.Dialog,{open:b,onClose:()=>v(!1),maxWidth:"md",fullWidth:!0,children:[c.jsx(x.DialogTitle,{children:U.previewTitle||"Image preview"}),c.jsx(x.DialogContent,{children:c.jsx(x.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",border:"1px solid",borderColor:"divider",backgroundColor:"background.paper",p:1,minHeight:260},children:c.jsx("img",{src:E,alt:e.alt||e.label,style:{maxWidth:"100%",maxHeight:380}})})}),c.jsxs(x.DialogActions,{children:[c.jsx(x.Button,{type:"button",variant:"outlined",onClick:()=>{var Ye;return(Ye=w.current)==null?void 0:Ye.click()},children:U.replaceText||"Replace logo"}),c.jsx(x.Button,{type:"button",variant:"contained",onClick:()=>v(!1),children:U.closeText||"Close"})]})]})]})}const H=e.imagePlaceholder||{},R=H.icon||"upload",M=w,Z=()=>{var U;try{(U=M.current)==null||U.click()}catch{}},X=U=>{const ye=U.target.files&&U.target.files[0];if(ye){typeof e.onFileSelected=="function"&&e.onFileSelected(ye);try{const Te=URL.createObjectURL(ye);S.onChange(Te)}catch{}P.current=ye}};return c.jsxs(x.Card,{sx:{border:"1px dashed",borderColor:"#CCCCCC",boxShadow:"none",p:2,textAlign:"center",color:"primary.main",...H.sx},children:[c.jsx("input",{type:"file",ref:M,accept:Array.isArray(e.accept)?e.accept.join(","):e.accept||"image/*",style:{display:"none"},onChange:X}),c.jsx(Gn,{sx:{borderRadius:"8px",...H.iconSx},children:R==="image"?c.jsx(_h,{sx:{width:36,height:36,color:"primary.main"}}):c.jsx(ui,{sx:{width:36,height:36,color:"primary.main"}})}),c.jsx(x.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main",...H.titleSx},children:H.title||"Drag & Drop the image here"}),c.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main",...H.subtitleSx},children:H.subtitle||""}),c.jsx(x.Button,{onClick:Z,sx:{my:2,...H.buttonSx},startIcon:c.jsx(ui,{}),variant:"contained",disabled:e.disabled,children:H.buttonText||"Upload File"}),c.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,...H.helperTextSx},children:H.helperText||e.helperText||""})]})}});case"component":return c.jsx(x.Box,{children:e.render?typeof e.render=="function"?(()=>{try{return e.render(a||{},{control:t,setValue:s})}catch{try{return e.render({control:t,formData:a,setValue:s})}catch{return e.render()}}})():e.render:e.content});default:return null}},pe=D.useMemo(()=>!e.disabled||e.copyWhenDisabled===!1?!1:!["title","section","image","component"].includes(e.type),[e.disabled,e.copyWhenDisabled,e.type]),ge=D.useCallback(async()=>{try{const q=a?a[e.name]:void 0;let te="";q==null?te="":Array.isArray(q)?te=q.join(", "):typeof q=="object"?te=JSON.stringify(q):te=String(q),await navigator.clipboard.writeText(te),m(!0),window.setTimeout(()=>m(!1),1200)}catch{}},[a,e.name]);return c.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:.3},children:[c.jsx(x.Box,{sx:{flexGrow:1},children:z?fe():null}),pe&&c.jsx(Gn,{"aria-label":`copy ${e.label||e.name}`,onClick:ge,size:"small",children:k?c.jsx(ss,{fontSize:"small"}):c.jsx(Ah,{fontSize:"small"})})]})};var ra,Ao;function Kh(){if(Ao)return ra;Ao=1;function e(v){this._maxSize=v,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(v){return this._values[v]},e.prototype.set=function(v,w){return this._size>=this._maxSize&&this.clear(),v in this._values||this._size++,this._values[v]=w};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,s=512,o=new e(s),l=new e(s),d=new e(s);ra={Cache:e,split:f,normalizePath:h,setter:function(v){var w=h(v);return l.get(v)||l.set(v,function(T,C){for(var $=0,B=w.length,A=T;$<B-1;){var I=w[$];if(I==="__proto__"||I==="constructor"||I==="prototype")return T;A=A[w[$++]]}A[w[$]]=C})},getter:function(v,w){var P=h(v);return d.get(v)||d.set(v,function(C){for(var $=0,B=P.length;$<B;)if(C!=null||!w)C=C[P[$++]];else return;return C})},join:function(v){return v.reduce(function(w,P){return w+(g(P)||r.test(P)?"["+P+"]":(w?".":"")+P)},"")},forEach:function(v,w,P){u(Array.isArray(v)?v:f(v),w,P)}};function h(v){return o.get(v)||o.set(v,f(v).map(function(w){return w.replace(a,"$2")}))}function f(v){return v.match(t)||[""]}function u(v,w,P){var T=v.length,C,$,B,A;for($=0;$<T;$++)C=v[$],C&&(b(C)&&(C='"'+C+'"'),A=g(C),B=!A&&/^\d+$/.test(C),w.call(P,C,A,B,$,v))}function g(v){return typeof v=="string"&&v&&["'",'"'].indexOf(v.charAt(0))!==-1}function k(v){return v.match(n)&&!v.match(r)}function m(v){return i.test(v)}function b(v){return!g(v)&&(k(v)||m(v))}return ra}var _r=Kh(),na,_o;function Yh(){if(_o)return na;_o=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=h=>h.match(e)||[],r=h=>h[0].toUpperCase()+h.slice(1),n=(h,f)=>t(h).join(f).toLowerCase(),i=h=>t(h).reduce((f,u)=>`${f}${f?u[0].toUpperCase()+u.slice(1).toLowerCase():u.toLowerCase()}`,"");return na={words:t,upperFirst:r,camelCase:i,pascalCase:h=>r(i(h)),snakeCase:h=>n(h,"_"),kebabCase:h=>n(h,"-"),sentenceCase:h=>r(n(h," ")),titleCase:h=>t(h).map(r).join(" ")},na}var ia=Yh(),Ln={exports:{}},Ro;function Gh(){if(Ro)return Ln.exports;Ro=1,Ln.exports=function(i){return e(t(i),i)},Ln.exports.array=e;function e(i,a){var s=i.length,o=new Array(s),l={},d=s,h=r(a),f=n(i);for(a.forEach(function(g){if(!f.has(g[0])||!f.has(g[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});d--;)l[d]||u(i[d],d,new Set);return o;function u(g,k,m){if(m.has(g)){var b;try{b=", node was:"+JSON.stringify(g)}catch{b=""}throw new Error("Cyclic dependency"+b)}if(!f.has(g))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(g));if(!l[k]){l[k]=!0;var v=h.get(g)||new Set;if(v=Array.from(v),k=v.length){m.add(g);do{var w=v[--k];u(w,f.get(w),m)}while(k);m.delete(g)}o[--s]=g}}}function t(i){for(var a=new Set,s=0,o=i.length;s<o;s++){var l=i[s];a.add(l[0]),a.add(l[1])}return Array.from(a)}function r(i){for(var a=new Map,s=0,o=i.length;s<o;s++){var l=i[s];a.has(l[0])||a.set(l[0],new Set),a.has(l[1])||a.set(l[1],new Set),a.get(l[0]).add(l[1])}return a}function n(i){for(var a=new Map,s=0,o=i.length;s<o;s++)a.set(i[s],s);return a}return Ln.exports}var Qh=Gh();const Zh=Ka(Qh),Xh=Object.prototype.toString,Jh=Error.prototype.toString,em=RegExp.prototype.toString,tm=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",rm=/^Symbol\((.*)\)(.*)$/;function nm(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function $o(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return nm(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return tm.call(e).replace(rm,"Symbol($1)");const n=Xh.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+Jh.call(e)+"]":n==="RegExp"?em.call(e):null}function ur(e,t){let r=$o(e,t);return r!==null?r:JSON.stringify(e,function(n,i){let a=$o(this[n],t);return a!==null?a:i},2)}function mc(e){return e==null?[]:[].concat(e)}let xc,gc,yc,im=/\$\{\s*(\w+)\s*\}/g;xc=Symbol.toStringTag;class Po{constructor(t,r,n,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[xc]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],mc(t).forEach(a=>{if(ct.isError(a)){this.errors.push(...a.errors);const s=a.inner.length?a.inner:[a];this.inner.push(...s)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}gc=Symbol.hasInstance;yc=Symbol.toStringTag;class ct extends Error{static formatError(t,r){const n=r.label||r.path||"this";return r=Object.assign({},r,{path:n,originalPath:r.path}),typeof t=="string"?t.replace(im,(i,a)=>ur(r[a])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,i,a){const s=new Po(t,r,n,i);if(a)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[yc]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,ct)}static[gc](t){return Po[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let $t={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:n})=>{const i=n!=null&&n!==r?` (cast from the value \`${ur(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${ur(r,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${ur(r,!0)}\``+i}},st={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Xt={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Ra={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},$a={isValue:"${path} field must be ${value}"},Qn={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},am={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},sm={notType:e=>{const{path:t,value:r,spec:n}=e,i=n.types.length;if(Array.isArray(r)){if(r.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${r.length} for value: \`${ur(r,!0)}\``;if(r.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${r.length} for value: \`${ur(r,!0)}\``}return ct.formatError($t.notType,e)}};Object.assign(Object.create(null),{mixed:$t,string:st,number:Xt,date:Ra,object:Qn,array:am,boolean:$a,tuple:sm});const ds=e=>e&&e.__isYupSchema__;class di{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:i,otherwise:a}=r,s=typeof n=="function"?n:(...o)=>o.every(l=>l===n);return new di(t,(o,l)=>{var d;let h=s(...o)?i:a;return(d=h==null?void 0:h(l))!=null?d:l})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let n=this.refs.map(a=>a.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),i=this.fn(n,t,r);if(i===void 0||i===t)return t;if(!ds(i))throw new TypeError("conditions must return a schema object");return i.resolve(r)}}const qn={context:"$",value:"."};function fi(e,t){return new mr(e,t)}class mr{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===qn.context,this.isValue=this.key[0]===qn.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?qn.context:this.isValue?qn.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&_r.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let i=this.isContext?n:this.isValue?t:r;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,r){return this.getValue(t,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}mr.prototype.__isYupRef=!0;const Ot=e=>e==null;function Wr(e){function t({value:r,path:n="",options:i,originalValue:a,schema:s},o,l){const{name:d,test:h,params:f,message:u,skipAbsent:g}=e;let{parent:k,context:m,abortEarly:b=s.spec.abortEarly,disableStackTrace:v=s.spec.disableStackTrace}=i;function w(_){return mr.isRef(_)?_.getValue(r,k,m):_}function P(_={}){const z=Object.assign({value:r,originalValue:a,label:s.spec.label,path:_.path||n,spec:s.spec,disableStackTrace:_.disableStackTrace||v},f,_.params);for(const N of Object.keys(z))z[N]=w(z[N]);const O=new ct(ct.formatError(_.message||u,z),r,z.path,_.type||d,z.disableStackTrace);return O.params=z,O}const T=b?o:l;let C={path:n,parent:k,type:d,from:i.from,createError:P,resolve:w,options:i,originalValue:a,schema:s};const $=_=>{ct.isError(_)?T(_):_?l(null):T(P())},B=_=>{ct.isError(_)?T(_):o(_)};if(g&&Ot(r))return $(!0);let I;try{var p;if(I=h.call(C,r,C),typeof((p=I)==null?void 0:p.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${C.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(I).then($,B)}}catch(_){B(_);return}$(I)}return t.OPTIONS=e,t}function om(e,t,r,n=r){let i,a,s;return t?(_r.forEach(t,(o,l,d)=>{let h=l?o.slice(1,o.length-1):o;e=e.resolve({context:n,parent:i,value:r});let f=e.type==="tuple",u=d?parseInt(h,10):0;if(e.innerType||f){if(f&&!d)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(r&&u>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${o}, in the path: ${t}. because there is no value at that index. `);i=r,r=r&&r[u],e=f?e.spec.types[u]:e.innerType}if(!d){if(!e.fields||!e.fields[h])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${s} which is a type: "${e.type}")`);i=r,r=r&&r[h],e=e.fields[h]}a=h,s=l?"["+o+"]":"."+o}),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class hi extends Set{describe(){const t=[];for(const r of this.values())t.push(mr.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(const n of this.values())r.push(t(n));return r}clone(){return new hi(this.values())}merge(t,r){const n=this.clone();return t.forEach(i=>n.add(i)),r.forEach(i=>n.delete(i)),n}}function Hr(e,t=new Map){if(ds(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n<e.length;n++)r[n]=Hr(e[n],t)}else if(e instanceof Map){r=new Map,t.set(e,r);for(const[n,i]of e.entries())r.set(n,Hr(i,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(Hr(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,i]of Object.entries(e))r[n]=Hr(i,t)}else throw Error(`Unable to clone ${e}`);return r}class xt{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new hi,this._blacklist=new hi,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError($t.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=Hr(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const i=Object.assign({},r.spec,n.spec);return n.spec=i,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(a=>{t.tests.forEach(s=>{a.test(s.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((i,a)=>a.resolve(i,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,i,a;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(a=t.disableStackTrace)!=null?a:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({value:t},r)),i=r.assert==="ignore-optionality",a=n._cast(t,r);if(r.assert!==!1&&!n.isType(a)){if(i&&Ot(a))return a;let s=ur(t),o=ur(a);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
|
|
177
177
|
|
|
178
178
|
attempted value: ${s}
|
|
179
|
-
`+(o!==s?`result of cast: ${o}`:""))}return a}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((i,a)=>a.call(this,i,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,i){let{path:a,originalValue:s=t,strict:o=this.spec.strict}=r,l=t;o||(l=this._cast(l,Object.assign({assert:!1},r)));let d=[];for(let f of Object.values(this.internalTests))f&&d.push(f);this.runTests({path:a,value:l,originalValue:s,options:r,tests:d},n,f=>{if(f.length)return i(f,l);this.runTests({path:a,value:l,originalValue:s,options:r,tests:this.tests},n,i)})}runTests(t,r,n){let i=!1,{tests:a,value:s,originalValue:o,path:l,options:d}=t,f=h=>{i||(i=!0,r(h,s))},p=h=>{i||(i=!0,n(h,s))},m=a.length,y=[];if(!m)return p([]);let T={value:s,originalValue:o,path:l,options:d,schema:this};for(let h=0;h<a.length;h++){const C=a[h];C(T,f,function(S){S&&(Array.isArray(S)?y.push(...S):y.push(S)),--m<=0&&p(y)})}}asNestedTest({key:t,index:r,parent:n,parentPath:i,originalParent:a,options:s}){const o=t??r;if(o==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof o=="number";let d=n[o];const f=Object.assign({},s,{strict:!0,parent:n,value:d,originalValue:a[o],key:void 0,[l?"index":"key"]:o,path:l||o.includes(".")?`${i||""}[${l?o:`"${o}"`}]`:(i?`${i}.`:"")+t});return(p,m,y)=>this.resolve(f)._validate(d,f,m,y)}validate(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return new Promise((s,o)=>i._validate(t,r,(l,d)=>{ot.isError(l)&&(l.value=d),o(l)},(l,d)=>{l.length?o(new ot(l,d,void 0,void 0,a)):s(d)}))}validateSync(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a,s=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return i._validate(t,Object.assign({},r,{sync:!0}),(o,l)=>{throw ot.isError(o)&&(o.value=l),o},(o,l)=>{if(o.length)throw new ot(o,t,void 0,void 0,s);a=l}),a}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(ot.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(ot.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):qr(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const n=this.clone({nullable:t});return n.internalTests.nullable=Nr({message:r,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=Nr({message:r,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=Rt.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Rt.notNull){return this.nullability(!1,t)}required(t=Rt.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=Rt.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),i=Nr(r),a=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(s=>!(s.OPTIONS.name===r.name&&(a||s.OPTIONS.test===i.OPTIONS.test))),n.tests.push(i),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),i=sc(t).map(a=>new $r(a));return i.forEach(a=>{a.isSibling&&n.deps.push(a.key)}),n.conditions.push(typeof r=="function"?new ui(i,r):ui.fromOptions(i,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=Nr({message:t,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=Rt.oneOf){let n=this.clone();return t.forEach(i=>{n._whitelist.add(i),n._blacklist.delete(i)}),n.internalTests.whiteList=Nr({message:r,name:"oneOf",skipAbsent:!0,test(i){let a=this.schema._whitelist,s=a.resolveAll(this.resolve);return s.includes(i)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:s}})}}),n}notOneOf(t,r=Rt.notOneOf){let n=this.clone();return t.forEach(i=>{n._blacklist.add(i),n._whitelist.delete(i)}),n.internalTests.blacklist=Nr({message:r,name:"notOneOf",test(i){let a=this.schema._blacklist,s=a.resolveAll(this.resolve);return s.includes(i)?this.createError({params:{values:Array.from(a).join(", "),resolved:s}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:i,optional:a,nullable:s}=r.spec;return{meta:i,label:n,optional:a,nullable:s,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,d,f)=>f.findIndex(p=>p.name===l.name)===d)}}}ht.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])ht.prototype[`${e}At`]=function(t,r,n={}){const{parent:i,parentPath:a,schema:s}=Xh(this,t,r,n.context);return s[e](i&&i[a],Object.assign({},n,{parent:i,path:t}))};for(const e of["equals","is"])ht.prototype[e]=ht.prototype.oneOf;for(const e of["not","nope"])ht.prototype[e]=ht.prototype.notOneOf;const Jh=()=>!0;function uc(e){return new pc(e)}class pc extends ht{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Jh},t))}}uc.prototype=pc.prototype;function dc(){return new fc}class fc extends ht{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(n.spec.coerce&&!n.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=Fa.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return Ot(r)||r===!0}})}isFalse(t=Fa.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return Ot(r)||r===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}dc.prototype=fc.prototype;const em=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function tm(e){const t=Aa(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let r=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(r=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}function Aa(e){var t,r;const n=em.exec(e);return n?{year:Lt(n[1]),month:Lt(n[2],1)-1,day:Lt(n[3],1),hour:Lt(n[4]),minute:Lt(n[5]),second:Lt(n[6]),millisecond:n[7]?Lt(n[7].substring(0,3)):0,precision:(t=(r=n[7])==null?void 0:r.length)!=null?t:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:Lt(n[10]),minuteOffset:Lt(n[11])}:null}function Lt(e,t=0){return Number(e)||t}let rm=/^[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])?)*$/,nm=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,im=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,am="^\\d{4}-\\d{2}-\\d{2}",sm="\\d{2}:\\d{2}:\\d{2}",om="(([+-]\\d{2}(:?\\d{2})?)|Z)",lm=new RegExp(`${am}T${sm}(\\.\\d+)?${om}$`),cm=e=>Ot(e)||e===e.trim(),um={}.toString();function mn(){return new hc}class hc extends ht{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce||n.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===um?t:i})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||Rt.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=it.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r=it.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r=it.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}matches(t,r){let n=!1,i,a;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:i,name:a}=r:i=r),this.test({name:a||"matches",message:i||it.matches,params:{regex:t},skipAbsent:!0,test:s=>s===""&&n||s.search(t)!==-1})}email(t=it.email){return this.matches(rm,{name:"email",message:t,excludeEmptyString:!0})}url(t=it.url){return this.matches(nm,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=it.uuid){return this.matches(im,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",n,i;return t&&(typeof t=="object"?{message:r="",allowOffset:n=!1,precision:i=void 0}=t:r=t),this.matches(lm,{name:"datetime",message:r||it.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||it.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:a=>{if(!a||n)return!0;const s=Aa(a);return s?!!s.z:!1}}).test({name:"datetime_precision",message:r||it.datetime_precision,params:{precision:i},skipAbsent:!0,test:a=>{if(!a||i==null)return!0;const s=Aa(a);return s?s.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=it.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:cm})}lowercase(t=it.lowercase){return this.transform(r=>Ot(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Ot(r)||r===r.toLowerCase()})}uppercase(t=it.uppercase){return this.transform(r=>Ot(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Ot(r)||r===r.toUpperCase()})}}mn.prototype=hc.prototype;let pm=e=>e!=+e;function mc(){return new yc}class yc extends ht{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!pm(t)}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce)return t;let i=t;if(typeof i=="string"){if(i=i.replace(/\s/g,""),i==="")return NaN;i=+i}return n.isType(i)||i===null?i:parseFloat(i)})})}min(t,r=Qt.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n>=this.resolve(t)}})}max(t,r=Qt.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n<=this.resolve(t)}})}lessThan(t,r=Qt.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(n){return n<this.resolve(t)}})}moreThan(t,r=Qt.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=Qt.positive){return this.moreThan(0,t)}negative(t=Qt.negative){return this.lessThan(0,t)}integer(t=Qt.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>Ot(t)?t:t|0)}round(t){var r;let n=["ceil","floor","round","trunc"];if(t=((r=t)==null?void 0:r.toLowerCase())||"round",t==="trunc")return this.truncate();if(n.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(i=>Ot(i)?i:Math[t](i))}}mc.prototype=yc.prototype;let gc=new Date(""),dm=e=>Object.prototype.toString.call(e)==="[object Date]";function cs(){return new An}class An extends ht{constructor(){super({type:"date",check(t){return dm(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=tm(t),isNaN(t)?An.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if($r.isRef(t))n=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=i}return n}min(t,r=Oa.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(n)}})}max(t,r=Oa.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(n)}})}}An.INVALID_DATE=gc;cs.prototype=An.prototype;cs.INVALID_DATE=gc;function fm(e,t=[]){let r=[],n=new Set,i=new Set(t.map(([s,o])=>`${s}-${o}`));function a(s,o){let l=jr.split(s)[0];n.add(l),i.has(`${o}-${l}`)||r.push([o,l])}for(const s of Object.keys(e)){let o=e[s];n.add(s),$r.isRef(o)&&o.isSibling?a(o.path,s):ls(o)&&"deps"in o&&o.deps.forEach(l=>a(l,s))}return Lh.array(Array.from(n),r).reverse()}function Oo(e,t){let r=1/0;return e.some((n,i)=>{var a;if((a=t.path)!=null&&a.includes(n))return r=i,!0}),r}function xc(e){return(t,r)=>Oo(e,t)-Oo(e,r)}const hm=(e,t,r)=>{if(typeof e!="string")return e;let n=e;try{n=JSON.parse(e)}catch{}return r.isType(n)?n:e};function Gn(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Gn(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Gn(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Gn)}):"optional"in e?e.optional():e}const mm=(e,t)=>{const r=[...jr.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),i=jr.getter(jr.join(r),!0)(e);return!!(i&&n in i)};let Fo=e=>Object.prototype.toString.call(e)==="[object Object]";function Ao(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const ym=xc([]);function vc(e){return new bc(e)}class bc extends ht{constructor(t){super({type:"object",check(r){return Fo(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=ym,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let i=super._cast(t,r);if(i===void 0)return this.getDefault(r);if(!this._typeCheck(i))return i;let a=this.fields,s=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,o=[].concat(this._nodes,Object.keys(i).filter(p=>!this._nodes.includes(p))),l={},d=Object.assign({},r,{parent:l,__validating:r.__validating||!1}),f=!1;for(const p of o){let m=a[p],y=p in i;if(m){let T,h=i[p];d.path=(r.path?`${r.path}.`:"")+p,m=m.resolve({value:h,context:r.context,parent:l});let C=m instanceof ht?m.spec:void 0,v=C==null?void 0:C.strict;if(C!=null&&C.strip){f=f||p in i;continue}T=!r.__validating||!v?m.cast(i[p],d):i[p],T!==void 0&&(l[p]=T)}else y&&!s&&(l[p]=i[p]);(y!==p in l||l[p]!==i[p])&&(f=!0)}return f?l:i}_validate(t,r={},n,i){let{from:a=[],originalValue:s=t,recursive:o=this.spec.recursive}=r;r.from=[{schema:this,value:s},...a],r.__validating=!0,r.originalValue=s,super._validate(t,r,n,(l,d)=>{if(!o||!Fo(d)){i(l,d);return}s=s||d;let f=[];for(let p of this._nodes){let m=this.fields[p];!m||$r.isRef(m)||f.push(m.asNestedTest({options:r,key:p,parent:d,parentPath:r.path,originalParent:s}))}this.runTests({tests:f,value:d,originalValue:s,options:r},n,p=>{i(p.sort(this._sortErrors).concat(l),d)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[i,a]of Object.entries(this.fields)){const s=n[i];n[i]=s===void 0?a:s}return r.withMutation(i=>i.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var i;const a=this.fields[n];let s=t;(i=s)!=null&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),r[n]=a&&"getDefault"in a?a.getDefault(s):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=fm(t,r),n._sortErrors=xc(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let i=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),i=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),i)})}partial(){const t={};for(const[r,n]of Object.entries(this.fields))t[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return Gn(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,i])=>t.includes(n)&&t.includes(i)))}omit(t){const r=[];for(const n of Object.keys(this.fields))t.includes(n)||r.push(n);return this.pick(r)}from(t,r,n){let i=jr.getter(t,!0);return this.transform(a=>{if(!a)return a;let s=a;return mm(a,t)&&(s=Object.assign({},a),n||delete s[t],s[r]=i(a)),s})}json(){return this.transform(hm)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Kn.exact,test(r){if(r==null)return!0;const n=Ao(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=Kn.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(i){if(i==null)return!0;const a=Ao(this.schema,i);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=Kn.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const i of Object.keys(r))n[t(i)]=r[i];return n})}camelCase(){return this.transformKeys(Ji.camelCase)}snakeCase(){return this.transformKeys(Ji.snakeCase)}constantCase(){return this.transformKeys(t=>Ji.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[a,s]of Object.entries(r.fields)){var i;let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[a]})),n.fields[a]=s.describe(o)}return n}}vc.prototype=bc.prototype;const wc=e=>{const t={};return e.forEach(r=>{var a,s,o;let n;switch(r.type){case"text":case"textarea":case"tel":n=mn(),r.validation?n=dr(n,r,"string"):(r.minLength&&(n=n.min(r.minLength,`${r.label} must be at least ${r.minLength} characters`)),r.maxLength&&(n=n.max(r.maxLength,`${r.label} must be at most ${r.maxLength} characters`)),r.pattern&&(n=n.test("pattern",`${r.label} format is invalid`,l=>l?new RegExp(r.pattern).test(l):!0)));break;case"email":n=mn().email(((a=r.validation)==null?void 0:a.message)||`${r.label} must be a valid email address`),r.validation&&(n=dr(n,r,"string"));break;case"password":n=mn(),r.validation?n=dr(n,r,"string"):(r.minLength&&(n=n.min(r.minLength,`${r.label} must be at least ${r.minLength} characters`)),r.maxLength&&(n=n.max(r.maxLength,`${r.label} must be at most ${r.maxLength} characters`)),r.pattern&&(n=n.test("pattern",`${r.label} format is invalid`,l=>l?new RegExp(r.pattern).test(l):!0)));break;case"number":n=mc().typeError(`${r.label} must be a number`),r.validation?n=dr(n,r,"number"):(r.min!==void 0&&(n=n.min(r.min,`${r.label} must be at least ${r.min}`)),r.max!==void 0&&(n=n.max(r.max,`${r.label} must be at most ${r.max}`)));break;case"select":n=mn(),r.validation&&(n=dr(n,r,"string"));break;case"checkbox":n=dc(),r.validation&&(n=dr(n,r,"boolean"));break;case"date":n=cs().typeError(`${r.label} must be a valid date`),r.validation?n=dr(n,r,"date"):(r.minDate&&(n=n.min(new Date(r.minDate),`${r.label} must be after ${r.minDate}`)),r.maxDate&&(n=n.max(new Date(r.maxDate),`${r.label} must be before ${r.maxDate}`)));break;default:n=uc()}if(((s=r.validation)==null?void 0:s.required)!==void 0?r.validation.required:r.required){const l=((o=r.validation)==null?void 0:o.message)||`${r.label} is required`;n=n.required(l)}t[r.name]=n}),vc().shape(t)},dr=(e,t,r)=>{const n=t.validation;if(!n)return e;if(r==="string"){if(n.minLength!==void 0){const i=n.message||`${t.label} must be at least ${n.minLength} characters`;e=e.min(n.minLength,i)}if(n.maxLength!==void 0){const i=n.message||`${t.label} must be at most ${n.maxLength} characters`;e=e.max(n.maxLength,i)}}if(r==="number"){if(n.min!==void 0){const i=n.message||`${t.label} must be at least ${n.min}`;e=e.min(n.min,i)}if(n.max!==void 0){const i=n.message||`${t.label} must be at most ${n.max}`;e=e.max(n.max,i)}}if(n.pattern){const i=typeof n.pattern=="string"?new RegExp(n.pattern):n.pattern,a=n.message||`${t.label} format is invalid`;e=e.test("pattern",a,s=>s?i.test(s):!0)}return n.custom&&(e=e.test("custom",n.message||`${t.label} is invalid`,i=>{const a=n.custom(i);return typeof a=="boolean"?a:!1})),e},Sc=({currentStep:e,totalSteps:t,onStepChange:r,stepTitles:n=[],showStepTitles:i=!0,completedSteps:a=[]})=>{const s=$.useMemo(()=>Array.from({length:t},(f,p)=>p+1),[t]),o=$.useMemo(()=>Math.round(e/t*100),[e,t]),l=f=>n[f-1]||`Step ${f}`,d=f=>f===e||a.includes(f)||f===e+1&&a.includes(e);return c.jsxs(x.Card,{sx:{mb:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",background:"#F8F8F8",borderRadius:"4px"},children:[c.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[c.jsx(x.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:s.map((f,p)=>{const m=f===e,y=f<e||a.includes(f),T=m||y?"primary.main":"#8F97A4";return c.jsxs(x.Box,{sx:{display:"flex",alignItems:"center"},children:[c.jsxs(x.Box,{onClick:()=>d(f)&&r(f),sx:{display:"flex",alignItems:"center",cursor:d(f)?"pointer":"default"},children:[c.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:m||y?"2px solid":"1px solid",borderColor:m||y?"primary.main":"#8F97A4",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:h=>m||y?St(h.palette.primary.main,.2):"transparent",mr:.5,color:T,fontWeight:m||y?600:500,fontSize:"12px"},children:f}),i&&c.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:600,color:T},children:l(f)})]}),p<s.length-1&&c.jsx(x.Box,{sx:{width:40,height:2,mx:1,borderRadius:1,backgroundColor:f<e?"primary.main":"#DFE3E8"}})]},f)})}),c.jsx(x.Typography,{sx:{color:"#8F97A4",fontSize:"12px",fontWeight:500},children:`Step ${e} of ${t}, ${o}% complete`})]}),c.jsx(x.LinearProgress,{variant:"determinate",value:o,sx:{height:4,borderRadius:"50px",backgroundColor:f=>f.palette.grey[300],"& .MuiLinearProgress-bar":{backgroundColor:"primary.main",borderRadius:5}}})]})},Cc=({buttons:e,disabled:t=!1})=>{const r=o=>{o.onClick&&o.onClick()},n=e.filter(o=>o.position==="left"||!o.position),i=e.filter(o=>o.position==="center"),a=e.filter(o=>o.position==="right"),s=(o,l)=>{const d=(o.text||"").toLowerCase(),f=o.type==="submit"||d.includes("submit")||d.includes("save")||d.includes("next"),p=o.position==="left"||d.includes("cancel")||d.includes("back")||d.includes("draft"),m=o.type?o.type:f?"submit":"button",y=p?"outlined":"contained",T=o.disabled||t,h=C=>C&&["primary","secondary","error","info","success","warning"].includes(C)?C:"primary";return c.jsxs(x.Button,{type:m,variant:y,color:h(o.color),size:o.size||"large",disabled:T,onClick:o.onClick?()=>r(o):void 0,sx:o.sx,children:[o.loading&&c.jsx(x.CircularProgress,{size:20,sx:{mr:1}}),o.text]},`${o.text}-${l}`)};return c.jsxs(x.Box,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c.jsx(x.Box,{sx:{display:"flex",gap:2},children:n.map((o,l)=>s(o,l))}),c.jsx(x.Box,{sx:{display:"flex",gap:2},children:i.map((o,l)=>s(o,l))}),c.jsx(x.Box,{sx:{display:"flex",gap:2},children:a.map((o,l)=>s(o,l))})]})},gm=({config:e,onSubmit:t,onStepChange:r,currentStep:n=1,totalSteps:i=1,isMultiStep:a=!1,formData:s})=>{const{buttons:o,position:l="right",layout:d="horizontal",spacing:f=2,sx:p}=e,m=v=>{let S="button",P="contained";return v.type?S=v.type:v.text.toLowerCase().includes("submit")||v.text.toLowerCase().includes("save")||v.text.toLowerCase().includes("next")?S="submit":(v.text.toLowerCase().includes("reset")||v.text.toLowerCase().includes("clear"))&&(S="reset"),(v.text.toLowerCase().includes("cancel")||v.text.toLowerCase().includes("back")||v.text.toLowerCase().includes("draft"))&&(P="outlined"),{buttonType:S,buttonVariant:P}},y=v=>["primary","secondary","error","warning","info","success"].includes(v||"")?v:"primary",T=v=>{const{buttonType:S}=m(v);v.onClick?v.onClick():S==="submit"&&t?t(s):a&&r&&(v.text.toLowerCase().includes("next")?r(n+1,i):(v.text.toLowerCase().includes("back")||v.text.toLowerCase().includes("previous"))&&r(n-1,i))},h=(v,S)=>{const{buttonType:P,buttonVariant:w}=m(v),b=y(v.color);return c.jsx(x.Button,{type:P,variant:w,color:b,size:v.size||"medium",disabled:v.disabled,onClick:()=>T(v),sx:v.sx,children:v.text},S)},C=()=>{const v={display:"flex",gap:f,...p};switch(l){case"left":return{...v,justifyContent:"flex-start"};case"center":return{...v,justifyContent:"center"};case"right":return{...v,justifyContent:"flex-end"};case"space-between":return{...v,justifyContent:"space-between"};default:return{...v,justifyContent:"flex-end"}}};return d==="vertical"?c.jsx(x.Box,{sx:C(),children:o.map((v,S)=>c.jsx(x.Box,{sx:{width:"100%"},children:h(v,S)},S))}):c.jsx(x.Box,{sx:C(),children:c.jsx(x.ButtonGroup,{variant:"outlined",size:"medium",children:o.map((v,S)=>h(v,S))})})},xm=new ku({defaultOptions:{queries:{staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:e=>Math.min(1e3*2**e,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0}}}),vm=e=>c.jsx(Au,{client:xm,children:c.jsx(bm,{...e})}),bm=({id:e,theme:t,fields:r,onSubmit:n,onChange:i,submitButtonText:a="Submit",onSubmitClick:s,defaultValues:o,showSubmitButton:l=!0,buttons:d,buttonGroup:f,formCardWrap:p,formCardSx:m,formCardProps:y,baseUrl:T,apiHeaders:h,stepNavigationProps:C})=>{var He,Qe;const v=[...new Set(r.map(X=>X.step).filter(X=>X!=null&&X>0))].sort((X,ce)=>(X||0)-(ce||0)),S=v.length>1,P=v.length||1,[w,b]=$.useState(1),_=S?r.filter(X=>X.step===w):r,z=$.useMemo(()=>wc(_),[_]),{control:F,handleSubmit:D,formState:{errors:u},watch:M,setValue:N,resetField:A,trigger:L}=iu({resolver:ou(z),mode:"onChange",defaultValues:o}),G=M(),se=$.useRef({});$.useEffect(()=>{const X=[];for(const ce of r){const te=ce.depends_on;te&&typeof ce.name=="string"&&X.push({dependentField:ce.name,dependencyName:te})}if(X.length!==0)for(const{dependentField:ce,dependencyName:te}of X){const he=se.current[te],g=G==null?void 0:G[te];if(he!==g)try{A(ce)}catch{}se.current[te]=g}},[r,G,A]);const me=$.useRef(i);$.useEffect(()=>{me.current=i},[i]);const ue=$.useMemo(()=>{try{return JSON.stringify(G)}catch{return String(Date.now())}},[G]),K=$.useRef(null);$.useEffect(()=>{me.current&&K.current!==ue&&(K.current=ue,me.current(G))},[ue]);const B=async()=>{if(!S)return!0;const X=r.filter(te=>te.step===w);for(const te of X)if(te.required){const he=G[te.name];let g=!0;if(te.type==="checkbox"?g=he===!0:Array.isArray(he)?g=he.length>0:g=he!=null&&he!=="",!g)return!1}return await L()?!0:Object.keys(u).filter(he=>X.some(g=>g.name===he)).map(he=>{const g=u[he];return typeof(g==null?void 0:g.message)=="string"?g.message:`${he} is invalid`}).length===0},H=$.useMemo(()=>{if(!S)return!0;const X=r.filter(te=>te.step===w);for(const te of X)if(te.required){const he=G[te.name];let g=!0;if(te.type==="checkbox"?g=he===!0:Array.isArray(he)?g=he.length>0:g=he!=null&&he!=="",!g)return!1}return Object.keys(u).filter(te=>X.some(he=>he.name===te)).length===0},[S,w,r,G,u]),de=$.useMemo(()=>{if(S)return H;for(const X of r)if(X.required){const ce=G[X.name];let te=!0;if(X.type==="checkbox"?te=ce===!0:te=ce!=null&&ce!==""&&!(Array.isArray(ce)&&ce.length===0),!te)return!1}return Object.keys(u).length===0},[S,H,r,G,u]),fe=async X=>{X<1||X>P||X>w&&S&&!await B()||b(X)},pe=async X=>{if(S&&w<P){console.warn("Form submission attempted on non-final step");return}s&&s(X),n(X)},ge=async X=>{X&&(X.preventDefault(),X.stopPropagation()),S&&w<P&&await B()&&fe(w+1)},q=X=>{X&&(X.preventDefault(),X.stopPropagation()),S&&w>1&&fe(w-1)},ee=X=>X.col?X.col:(X.xs||X.sm||X.md||X.lg||X.xl)&&(X.xs||X.sm||X.md||X.lg||X.xl)||12,ae=t?x.createTheme({palette:{primary:{main:t.primaryColor||"#1976d2"},secondary:{main:t.secondaryColor||"#dc004e"},background:{default:t.backgroundColor||"#ffffff"},text:{primary:t.textColor||"#000000"}},shape:{borderRadius:t.borderRadius||4},spacing:t.spacing||8,typography:{fontFamily:((He=t.typography)==null?void 0:He.fontFamily)||"Roboto, Arial, sans-serif",fontSize:typeof((Qe=t.typography)==null?void 0:Qe.fontSize)=="number"?t.typography.fontSize:14}}):void 0,oe=()=>{if(f&&f.buttons&&f.buttons.length>0){const X={...f,buttons:f.buttons.map(ce=>{const te=(ce.text||"").toLowerCase(),he=ce.type==="submit"||te.includes("submit")||te.includes("save")||te.includes("finish")||te.includes("complete"),g=te.includes("next");let E=!1;return S?(he||g)&&(E=!H):he&&(E=!de),{...ce,disabled:ce.disabled||E}})};return c.jsx(x.Box,{sx:{mt:3},children:c.jsx(gm,{config:X,onSubmit:pe,onStepChange:fe,currentStep:w,totalSteps:P,isMultiStep:S,formData:G})})}if(d&&d.length>0){const X=d.map(ce=>{const te=(ce.text||"").toLowerCase(),he=ce.type==="submit"||te.includes("submit")||te.includes("save")||te.includes("finish")||te.includes("complete"),g=te.includes("next");let E=!1;return S?(he||g)&&(E=!H):he&&(E=!de),{...ce,disabled:ce.disabled||E}});return c.jsx(Cc,{buttons:X})}return l?c.jsx(x.Box,{sx:{mt:3,display:"flex",justifyContent:"flex-end",flexDirection:"column",alignItems:"flex-end"},children:c.jsxs(x.Box,{sx:{display:"flex",gap:2},children:[S&&w>1&&c.jsx(x.Button,{type:"button",variant:"outlined",onClick:q,children:"Previous"}),S?w<P?c.jsx(x.Button,{type:"button",variant:"contained",color:"primary",size:"large",disabled:!H,onClick:ge,children:"Next"}):c.jsx(x.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!H,children:a}):c.jsx(x.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!de,children:a})]})}):null},le=$.useCallback((X,ce)=>{const te=X.showWhen;if(te){if(typeof te=="function")try{return!!te(ce||{})}catch{return!0}if(te&&typeof te=="object"){const he=te.field,g=te.equals,E=te.in,j=he?(ce||{})[he]:void 0;if(he&&typeof g<"u")return j===g;if(he&&Array.isArray(E))return E.includes(j)}}return!0},[]),Se=$.useMemo(()=>{const X=[];let ce=[];for(const te of _)te.type==="section"&&ce.length>0?(X.push(ce),ce=[te]):ce.push(te);return ce.length>0&&X.push(ce),X},[_]),Q=c.jsxs(x.Box,{component:"form",onSubmit:X=>{if(S&&w<P){X.preventDefault(),X.stopPropagation(),H&&ge();return}D(pe)(X)},id:e,onKeyDown:X=>{X.key==="Enter"&&S&&w<P&&(X.preventDefault(),H&&ge())},children:[S&&c.jsx(Sc,{currentStep:w,totalSteps:P,onStepChange:fe,stepTitles:C==null?void 0:C.stepTitles,showStepTitles:(C==null?void 0:C.showStepTitles)!==!1}),Se.map((X,ce)=>{const te=X.find(U=>U.type==="section");if(te&&!le(te,G))return null;const he=(te==null?void 0:te.cardWrap)!==!1,g={p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},E={display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},j=c.jsx(c.Fragment,{children:X.map(U=>{if(!le(U,G))return null;const R=ee(U);return c.jsx(x.Box,{sx:{gridColumn:`span ${R}`},children:c.jsx(os,{field:U,control:F,errors:u,baseUrl:T,apiHeaders:h,formData:G,setValue:N})},U.name)})});return he?c.jsx(x.Card,{sx:{...g,...(te==null?void 0:te.cardSx)||{}},...(te==null?void 0:te.cardProps)||{},children:j},`group-${ce}`):c.jsx(x.Box,{sx:E,children:j},`group-${ce}`)}),oe()]}),De=p?c.jsx(x.Card,{sx:{p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",...m},...y,children:Q}):Q;return ae?c.jsx(x.ThemeProvider,{theme:ae,children:De}):De},wm=({src:e,alt:t,width:r="100%",height:n="auto",style:i,className:a,onClick:s})=>c.jsx(x.Box,{sx:{textAlign:"center"},children:c.jsx("img",{src:e||"/placeholder-image.png",alt:t||"Image",width:r,height:n,style:{maxWidth:"100%",height:"auto",borderRadius:"8px",cursor:s?"pointer":"default",...i},className:a,onClick:s,onError:o=>{o.currentTarget.src="/placeholder-image.png"}})});function Dr(e,t,r,n){function i(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function o(f){try{d(n.next(f))}catch(p){s(p)}}function l(f){try{d(n.throw(f))}catch(p){s(p)}}function d(f){f.done?a(f.value):i(f.value).then(o,l)}d((n=n.apply(e,t||[])).next())})}const Sm=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function sn(e,t,r){const n=Cm(e),{webkitRelativePath:i}=e,a=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof n.path!="string"&&_o(n,"path",a),_o(n,"relativePath",a),n}function Cm(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const n=t.split(".").pop().toLowerCase(),i=Sm.get(n);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function _o(e,t,r){Object.defineProperty(e,t,{value:r,writable:!1,configurable:!1,enumerable:!0})}const Em=[".DS_Store","Thumbs.db"];function km(e){return Dr(this,void 0,void 0,function*(){return di(e)&&Tm(e.dataTransfer)?Am(e.dataTransfer,e.type):jm(e)?Om(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?Fm(e):[]})}function Tm(e){return di(e)}function jm(e){return di(e)&&di(e.target)}function di(e){return typeof e=="object"&&e!==null}function Om(e){return _a(e.target.files).map(t=>sn(t))}function Fm(e){return Dr(this,void 0,void 0,function*(){return(yield Promise.all(e.map(r=>r.getFile()))).map(r=>sn(r))})}function Am(e,t){return Dr(this,void 0,void 0,function*(){if(e.items){const r=_a(e.items).filter(i=>i.kind==="file");if(t!=="drop")return r;const n=yield Promise.all(r.map(_m));return Ro(Ec(n))}return Ro(_a(e.files).map(r=>sn(r)))})}function Ro(e){return e.filter(t=>Em.indexOf(t.name)===-1)}function _a(e){if(e===null)return[];const t=[];for(let r=0;r<e.length;r++){const n=e[r];t.push(n)}return t}function _m(e){if(typeof e.webkitGetAsEntry!="function")return $o(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?kc(t):$o(e,t)}function Ec(e){return e.reduce((t,r)=>[...t,...Array.isArray(r)?Ec(r):[r]],[])}function $o(e,t){return Dr(this,void 0,void 0,function*(){var r;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const a=yield e.getAsFileSystemHandle();if(a===null)throw new Error(`${e} is not a File`);if(a!==void 0){const s=yield a.getFile();return s.handle=a,sn(s)}}const n=e.getAsFile();if(!n)throw new Error(`${e} is not a File`);return sn(n,(r=t==null?void 0:t.fullPath)!==null&&r!==void 0?r:void 0)})}function Rm(e){return Dr(this,void 0,void 0,function*(){return e.isDirectory?kc(e):$m(e)})}function kc(e){const t=e.createReader();return new Promise((r,n)=>{const i=[];function a(){t.readEntries(s=>Dr(this,void 0,void 0,function*(){if(s.length){const o=Promise.all(s.map(Rm));i.push(o),a()}else try{const o=yield Promise.all(i);r(o)}catch(o){n(o)}}),s=>{n(s)})}a()})}function $m(e){return Dr(this,void 0,void 0,function*(){return new Promise((t,r)=>{e.file(n=>{const i=sn(n,e.fullPath);t(i)},n=>{r(n)})})})}var Nn={},Do;function Dm(){return Do||(Do=1,Nn.__esModule=!0,Nn.default=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(",");if(r.length===0)return!0;var n=e.name||"",i=(e.type||"").toLowerCase(),a=i.replace(/\/.*$/,"");return r.some(function(s){var o=s.trim().toLowerCase();return o.charAt(0)==="."?n.toLowerCase().endsWith(o):o.endsWith("/*")?a===o.replace(/\/.*$/,""):i===o})}return!0}),Nn}var Pm=Dm();const ea=qa(Pm);function Po(e){return zm(e)||Im(e)||jc(e)||Mm()}function Mm(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
180
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
181
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
182
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
183
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rc(e,t){if(e){if(typeof e=="string")return $a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $a(e,t)}}function $a(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function fy(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,a=!1,s,o;try{for(r=r.call(e);!(i=(s=r.next()).done)&&(n.push(s.value),!(t&&n.length===t));i=!0);}catch(l){a=!0,o=l}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw o}}return n}}function hy(e){if(Array.isArray(e))return e}function No(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?No(Object(r),!0).forEach(function(n){Da(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):No(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Da(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hi(e,t){if(e==null)return{};var r=my(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function my(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var us=$.forwardRef(function(e,t){var r=e.children,n=hi(e,iy),i=Dc(n),a=i.open,s=hi(i,ay);return $.useImperativeHandle(t,function(){return{open:a}},[a]),$.createElement($.Fragment,null,r(Ie(Ie({},s),{},{open:a})))});us.displayName="Dropzone";var $c={disabled:!1,getFilesFromEvent:km,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};us.defaultProps=$c;us.propTypes={children:k.func,accept:k.objectOf(k.arrayOf(k.string)),multiple:k.bool,preventDropOnDocument:k.bool,noClick:k.bool,noKeyboard:k.bool,noDrag:k.bool,noDragEventsBubbling:k.bool,minSize:k.number,maxSize:k.number,maxFiles:k.number,disabled:k.bool,getFilesFromEvent:k.func,onFileDialogCancel:k.func,onFileDialogOpen:k.func,useFsAccessApi:k.bool,autoFocus:k.bool,onDragEnter:k.func,onDragLeave:k.func,onDragOver:k.func,onDrop:k.func,onDropAccepted:k.func,onDropRejected:k.func,onError:k.func,validator:k.func};var Pa={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Dc(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Ie(Ie({},$c),e),r=t.accept,n=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,s=t.minSize,o=t.multiple,l=t.maxFiles,d=t.onDragEnter,f=t.onDragLeave,p=t.onDragOver,m=t.onDrop,y=t.onDropAccepted,T=t.onDropRejected,h=t.onFileDialogCancel,C=t.onFileDialogOpen,v=t.useFsAccessApi,S=t.autoFocus,P=t.preventDropOnDocument,w=t.noClick,b=t.noKeyboard,_=t.noDrag,z=t.noDragEventsBubbling,F=t.onError,D=t.validator,u=$.useMemo(function(){return ty(r)},[r]),M=$.useMemo(function(){return ey(r)},[r]),N=$.useMemo(function(){return typeof C=="function"?C:Lo},[C]),A=$.useMemo(function(){return typeof h=="function"?h:Lo},[h]),L=$.useRef(null),G=$.useRef(null),se=$.useReducer(yy,Pa),me=ta(se,2),ue=me[0],K=me[1],B=ue.isFocused,H=ue.isFileDialogActive,de=$.useRef(typeof window<"u"&&window.isSecureContext&&v&&Jm()),fe=function(){!de.current&&H&&setTimeout(function(){if(G.current){var I=G.current.files;I.length||(K({type:"closeDialog"}),A())}},300)};$.useEffect(function(){return window.addEventListener("focus",fe,!1),function(){window.removeEventListener("focus",fe,!1)}},[G,H,A,de]);var pe=$.useRef([]),ge=function(I){L.current&&L.current.contains(I.target)||(I.preventDefault(),pe.current=[])};$.useEffect(function(){return P&&(document.addEventListener("dragover",Bo,!1),document.addEventListener("drop",ge,!1)),function(){P&&(document.removeEventListener("dragover",Bo),document.removeEventListener("drop",ge))}},[L,P]),$.useEffect(function(){return!n&&S&&L.current&&L.current.focus(),function(){}},[L,S,n]);var q=$.useCallback(function(R){F?F(R):console.error(R)},[F]),ee=$.useCallback(function(R){R.preventDefault(),R.persist(),g(R),pe.current=[].concat(ly(pe.current),[R.target]),Ln(R)&&Promise.resolve(i(R)).then(function(I){if(!(fi(R)&&!z)){var Y=I.length,ie=Y>0&&Qm({files:I,accept:u,minSize:s,maxSize:a,multiple:o,maxFiles:l,validator:D}),W=Y>0&&!ie;K({isDragAccept:ie,isDragReject:W,isDragActive:!0,type:"setDraggedFiles"}),d&&d(R)}}).catch(function(I){return q(I)})},[i,d,q,z,u,s,a,o,l,D]),ae=$.useCallback(function(R){R.preventDefault(),R.persist(),g(R);var I=Ln(R);if(I&&R.dataTransfer)try{R.dataTransfer.dropEffect="copy"}catch{}return I&&p&&p(R),!1},[p,z]),oe=$.useCallback(function(R){R.preventDefault(),R.persist(),g(R);var I=pe.current.filter(function(ie){return L.current&&L.current.contains(ie)}),Y=I.indexOf(R.target);Y!==-1&&I.splice(Y,1),pe.current=I,!(I.length>0)&&(K({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ln(R)&&f&&f(R))},[L,f,z]),le=$.useCallback(function(R,I){var Y=[],ie=[];R.forEach(function(W){var xe=Oc(W,u),Te=ta(xe,2),je=Te[0],Ve=Te[1],qe=Fc(W,s,a),Ze=ta(qe,2),Ft=Ze[0],nt=Ze[1],ut=D?D(W):null;if(je&&Ft&&!ut)Y.push(W);else{var Et=[Ve,nt];ut&&(Et=Et.concat(ut)),ie.push({file:W,errors:Et.filter(function(Fi){return Fi})})}}),(!o&&Y.length>1||o&&l>=1&&Y.length>l)&&(Y.forEach(function(W){ie.push({file:W,errors:[Gm]})}),Y.splice(0)),K({acceptedFiles:Y,fileRejections:ie,isDragReject:ie.length>0,type:"setFiles"}),m&&m(Y,ie,I),ie.length>0&&T&&T(ie,I),Y.length>0&&y&&y(Y,I)},[K,o,u,s,a,l,m,y,T,D]),Se=$.useCallback(function(R){R.preventDefault(),R.persist(),g(R),pe.current=[],Ln(R)&&Promise.resolve(i(R)).then(function(I){fi(R)&&!z||le(I,R)}).catch(function(I){return q(I)}),K({type:"reset"})},[i,le,q,z]),Q=$.useCallback(function(){if(de.current){K({type:"openDialog"}),N();var R={multiple:o,types:M};window.showOpenFilePicker(R).then(function(I){return i(I)}).then(function(I){le(I,null),K({type:"closeDialog"})}).catch(function(I){ry(I)?(A(I),K({type:"closeDialog"})):ny(I)?(de.current=!1,G.current?(G.current.value=null,G.current.click()):q(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):q(I)});return}G.current&&(K({type:"openDialog"}),N(),G.current.value=null,G.current.click())},[K,N,A,v,le,q,M,o]),De=$.useCallback(function(R){!L.current||!L.current.isEqualNode(R.target)||(R.key===" "||R.key==="Enter"||R.keyCode===32||R.keyCode===13)&&(R.preventDefault(),Q())},[L,Q]),He=$.useCallback(function(){K({type:"focus"})},[]),Qe=$.useCallback(function(){K({type:"blur"})},[]),X=$.useCallback(function(){w||(Xm()?setTimeout(Q,0):Q())},[w,Q]),ce=function(I){return n?null:I},te=function(I){return b?null:ce(I)},he=function(I){return _?null:ce(I)},g=function(I){z&&I.stopPropagation()},E=$.useMemo(function(){return function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},I=R.refKey,Y=I===void 0?"ref":I,ie=R.role,W=R.onKeyDown,xe=R.onFocus,Te=R.onBlur,je=R.onClick,Ve=R.onDragEnter,qe=R.onDragOver,Ze=R.onDragLeave,Ft=R.onDrop,nt=hi(R,sy);return Ie(Ie(Da({onKeyDown:te(_t(W,De)),onFocus:te(_t(xe,He)),onBlur:te(_t(Te,Qe)),onClick:ce(_t(je,X)),onDragEnter:he(_t(Ve,ee)),onDragOver:he(_t(qe,ae)),onDragLeave:he(_t(Ze,oe)),onDrop:he(_t(Ft,Se)),role:typeof ie=="string"&&ie!==""?ie:"presentation"},Y,L),!n&&!b?{tabIndex:0}:{}),nt)}},[L,De,He,Qe,X,ee,ae,oe,Se,b,_,n]),j=$.useCallback(function(R){R.stopPropagation()},[]),U=$.useMemo(function(){return function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},I=R.refKey,Y=I===void 0?"ref":I,ie=R.onChange,W=R.onClick,xe=hi(R,oy),Te=Da({accept:u,multiple:o,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:ce(_t(ie,Se)),onClick:ce(_t(W,j)),tabIndex:-1},Y,G);return Ie(Ie({},Te),xe)}},[G,r,o,Se,n]);return Ie(Ie({},ue),{},{isFocused:B&&!n,getRootProps:E,getInputProps:U,rootRef:L,inputRef:G,open:ce(Q)})}function yy(e,t){switch(t.type){case"focus":return Ie(Ie({},e),{},{isFocused:!0});case"blur":return Ie(Ie({},e),{},{isFocused:!1});case"openDialog":return Ie(Ie({},Pa),{},{isFileDialogActive:!0});case"closeDialog":return Ie(Ie({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Ie(Ie({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Ie(Ie({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return Ie({},Pa);default:return e}}function Lo(){}const gy=yt(c.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"}),"CheckCircle"),xy=yt(c.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"}),"Delete"),qo=yt(c.jsx("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"}),"Description"),vy=yt(c.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Image"),Pc=({file:e,onRemove:t})=>{const r=()=>e.file.type.startsWith("image/")?c.jsx(vy,{}):e.file.type.includes("pdf")?c.jsx(qo,{}):c.jsx(qo,{}),n=()=>{switch(e.status){case"success":return c.jsx(gy,{color:"success"});case"uploading":return c.jsx(x.CircularProgress,{size:16});default:return null}},i=a=>{if(a===0)return"0 Bytes";const s=1024,o=["Bytes","KB","MB","GB"],l=Math.floor(Math.log(a)/Math.log(s));return parseFloat((a/Math.pow(s,l)).toFixed(2))+" "+o[l]};return c.jsxs(x.Paper,{sx:{p:2,mb:1,display:"flex",alignItems:"center",gap:2,border:"1px solid #e0e0e0"},children:[c.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[r(),n()]}),c.jsxs(x.Box,{sx:{flex:1,minWidth:0},children:[c.jsx(x.Typography,{variant:"body2",noWrap:!0,children:e.file.name}),c.jsxs(x.Typography,{variant:"caption",color:"textSecondary",children:[i(e.file.size)," • ",e.file.type]})]}),c.jsx(x.Tooltip,{title:"Remove file",children:c.jsx(x.IconButton,{size:"small",onClick:()=>t(e.id),color:"error",children:c.jsx(xy,{})})})]})},by=({config:e,value:t=[],onChange:r,onSubmit:n,disabled:i=!1,className:a,style:s,title:o,subtitle:l,buttonText:d,fileSupportedText:f})=>{const[p,m]=$.useState(t),[y,T]=$.useState([]),[h,C]=$.useState(!1),[v,S]=$.useState(!1),[P,w]=$.useState([]),b=$.useRef(null);$.useEffect(()=>{m(t)},[t]);const _=$.useCallback(L=>{var se,me;return((se=e==null?void 0:e.fileTypes)==null?void 0:se.some(ue=>{if(ue.includes("*")){const K=ue.split("/")[0];return L.type.startsWith(K)}return L.type===ue}))?e!=null&&e.maxSize&&L.size>e.maxSize?`File size exceeds maximum limit of ${(e.maxSize/1048576).toFixed(1)}MB`:null:`File type ${L.type} is not allowed. Allowed types: ${(me=e==null?void 0:e.fileTypes)==null?void 0:me.join(", ")}`},[e]),z=$.useCallback(async L=>{console.log("handleFiles called with:",L.length,"files"),C(!0);const G=[],se=[];try{for(const ue of L){let K=null;if(e!=null&&e.multiple&&p.some(H=>H.file.name===ue.name&&H.file.size===ue.size&&H.file.lastModified===ue.lastModified)){se.push(`${ue.name}: File already exists`);continue}if(K=_(ue),!K&&(e!=null&&e.customValidation))try{const B=e.customValidation(ue);B instanceof Promise?K=await B:K=B}catch(B){K=`Custom validation failed: ${B instanceof Error?B.message:"Unknown error"}`}if(K)se.push(`${ue.name}: ${K}`);else{const B={id:`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,file:ue,preview:ue.type.startsWith("image/")?URL.createObjectURL(ue):void 0,progress:0,status:"pending",uploadedAt:new Date};G.push(B)}}const me=e!=null&&e.multiple?[...p,...G]:G;m(me),r==null||r(me),se.length>0?(w(se),T(se)):(w([]),T([]))}catch(me){const ue=`Unexpected error: ${me instanceof Error?me.message:"Unknown error"}`;w([ue]),T([ue])}},[p,e==null?void 0:e.multiple,_,e==null?void 0:e.customValidation,r]),F=$.useCallback(L=>{C(!0);const G=p.filter(se=>se.id!==L);m(G),r==null||r(G),w([]),b.current&&(b.current.value="")},[p,r]),D=$.useCallback(()=>{if(e!=null&&e.required&&p.length===0){T([`${e.title} is required`]);return}w([]),S(!0);const L=p.filter(G=>G.status!=="error");n==null||n(L)},[p,n,e==null?void 0:e.required,e==null?void 0:e.title]),{getRootProps:u,getInputProps:M,isDragActive:N}=Dc({onDrop:z,multiple:e==null?void 0:e.multiple,disabled:i,noClick:!1,noKeyboard:!1});$.useEffect(()=>{if(!h)return;const L=[],G=[...P,...L];G.length>0?T(G):T([])},[p,e==null?void 0:e.required,e==null?void 0:e.title,h,v,P]);const A=()=>{var L;switch(((L=e==null?void 0:e.submitButton)==null?void 0:L.position)||"right"){case"left":return"flex-start";case"center":return"center";case"right":return"flex-end";default:return"flex-end"}};return c.jsxs(x.Box,{className:a,style:s,children:[c.jsxs(x.Typography,{variant:"h6",gutterBottom:!0,children:[e==null?void 0:e.title,(e==null?void 0:e.required)&&c.jsx("span",{style:{color:"red"},children:" *"})]}),(e==null?void 0:e.description)&&c.jsx(x.Typography,{variant:"body2",color:"textSecondary",gutterBottom:!0,children:e==null?void 0:e.description}),$.createElement(x.Card,{...u(),key:`dropzone-${p.length}`,sx:{border:"1px dashed",borderColor:N?"primary.main":"#CCCCCC",backgroundColor:N?"action.hover":"#F5F5F5",boxShadow:"none",p:3,textAlign:"center",cursor:i?"not-allowed":"pointer",transition:"all 0.2s ease","&:hover":{borderColor:i?"grey.300":"primary.main",backgroundColor:i?"background.paper":"action.hover"}}},c.jsx("input",{...M(),ref:b}),c.jsx(x.IconButton,{sx:{borderRadius:"8px"},children:c.jsx(oi,{sx:{width:36,height:36,color:"primary.main"}})}),c.jsx(x.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main"},children:o}),c.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main"},children:l}),c.jsx(x.Button,{onClick:()=>{var L;return(L=b.current)==null?void 0:L.click()},sx:{my:2},startIcon:c.jsx(oi,{}),variant:"contained",children:d}),c.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400},children:f})),y.length>0&&c.jsx(x.Alert,{severity:"error",sx:{mt:2},children:y.map((L,G)=>c.jsx(x.Typography,{variant:"body2",children:L},G))}),p.length>0&&c.jsxs(x.Box,{sx:{mt:2},children:[c.jsxs(x.Typography,{variant:"subtitle1",gutterBottom:!0,children:["Selected Files (",p.length,")"]}),p.map(L=>c.jsx(Pc,{file:L,onRemove:F},L.id))]}),(e==null?void 0:e.helperText)&&c.jsx(x.Typography,{variant:"caption",color:"textSecondary",sx:{mt:1,display:"block"},children:e.helperText}),(e==null?void 0:e.submitButton)&&c.jsx(x.Box,{sx:{mt:3,display:"flex",justifyContent:A()},children:c.jsx(x.Button,{variant:"contained",onClick:D,disabled:i||e.submitButton.disabled||p.length===0,startIcon:e.submitButton.loading?c.jsx(x.CircularProgress,{size:16,color:"inherit"}):void 0,children:e.submitButton.text})})]})};exports.CustomButtons=Cc;exports.DocumentUpload=by;exports.FieldRenderer=os;exports.FilePreview=Pc;exports.FinAutocomplete=Yl;exports.FinCheckbox=Tr;exports.FinCheckboxGroup=Zl;exports.FinChip=ec;exports.FinCustomizedVerticalStepper=$h;exports.FinDateField=as;exports.FinDragDropList=Fh;exports.FinEditableGrid=rc;exports.FinForm=vm;exports.FinInfoCard=Ph;exports.FinListCards=nc;exports.FinRadioGroup=ja;exports.FinSelect=is;exports.FinSwitch=ci;exports.FinTabs=tc;exports.FinTextField=li;exports.FinTextarea=Xl;exports.FinUiHeader=Jl;exports.FinVerticalStepper=_h;exports.ImageComponent=wm;exports.StepNavigation=Sc;exports.brand=Th;exports.fetchApiData=ic;exports.finflowPalette=J;exports.generateSchema=wc;exports.getApiConfig=ss;exports.hasApiConfig=fr;exports.neutral=lt;exports.primary=Eh;exports.secondary=kh;exports.shouldShowField=Ih;exports.useApiData=ac;
|
|
179
|
+
`+(o!==s?`result of cast: ${o}`:""))}return a}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((i,a)=>a.call(this,i,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,i){let{path:a,originalValue:s=t,strict:o=this.spec.strict}=r,l=t;o||(l=this._cast(l,Object.assign({assert:!1},r)));let d=[];for(let h of Object.values(this.internalTests))h&&d.push(h);this.runTests({path:a,value:l,originalValue:s,options:r,tests:d},n,h=>{if(h.length)return i(h,l);this.runTests({path:a,value:l,originalValue:s,options:r,tests:this.tests},n,i)})}runTests(t,r,n){let i=!1,{tests:a,value:s,originalValue:o,path:l,options:d}=t,h=m=>{i||(i=!0,r(m,s))},f=m=>{i||(i=!0,n(m,s))},u=a.length,g=[];if(!u)return f([]);let k={value:s,originalValue:o,path:l,options:d,schema:this};for(let m=0;m<a.length;m++){const b=a[m];b(k,h,function(w){w&&(Array.isArray(w)?g.push(...w):g.push(w)),--u<=0&&f(g)})}}asNestedTest({key:t,index:r,parent:n,parentPath:i,originalParent:a,options:s}){const o=t??r;if(o==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof o=="number";let d=n[o];const h=Object.assign({},s,{strict:!0,parent:n,value:d,originalValue:a[o],key:void 0,[l?"index":"key"]:o,path:l||o.includes(".")?`${i||""}[${l?o:`"${o}"`}]`:(i?`${i}.`:"")+t});return(f,u,g)=>this.resolve(h)._validate(d,h,u,g)}validate(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return new Promise((s,o)=>i._validate(t,r,(l,d)=>{ct.isError(l)&&(l.value=d),o(l)},(l,d)=>{l.length?o(new ct(l,d,void 0,void 0,a)):s(d)}))}validateSync(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),a,s=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return i._validate(t,Object.assign({},r,{sync:!0}),(o,l)=>{throw ct.isError(o)&&(o.value=l),o},(o,l)=>{if(o.length)throw new ct(o,t,void 0,void 0,s);a=l}),a}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(ct.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(ct.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):Hr(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const n=this.clone({nullable:t});return n.internalTests.nullable=Wr({message:r,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=Wr({message:r,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=$t.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=$t.notNull){return this.nullability(!1,t)}required(t=$t.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=$t.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),i=Wr(r),a=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(s=>!(s.OPTIONS.name===r.name&&(a||s.OPTIONS.test===i.OPTIONS.test))),n.tests.push(i),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),i=mc(t).map(a=>new mr(a));return i.forEach(a=>{a.isSibling&&n.deps.push(a.key)}),n.conditions.push(typeof r=="function"?new di(i,r):di.fromOptions(i,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=Wr({message:t,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=$t.oneOf){let n=this.clone();return t.forEach(i=>{n._whitelist.add(i),n._blacklist.delete(i)}),n.internalTests.whiteList=Wr({message:r,name:"oneOf",skipAbsent:!0,test(i){let a=this.schema._whitelist,s=a.resolveAll(this.resolve);return s.includes(i)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:s}})}}),n}notOneOf(t,r=$t.notOneOf){let n=this.clone();return t.forEach(i=>{n._blacklist.add(i),n._whitelist.delete(i)}),n.internalTests.blacklist=Wr({message:r,name:"notOneOf",test(i){let a=this.schema._blacklist,s=a.resolveAll(this.resolve);return s.includes(i)?this.createError({params:{values:Array.from(a).join(", "),resolved:s}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:i,optional:a,nullable:s}=r.spec;return{meta:i,label:n,optional:a,nullable:s,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,d,h)=>h.findIndex(f=>f.name===l.name)===d)}}}xt.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])xt.prototype[`${e}At`]=function(t,r,n={}){const{parent:i,parentPath:a,schema:s}=om(this,t,r,n.context);return s[e](i&&i[a],Object.assign({},n,{parent:i,path:t}))};for(const e of["equals","is"])xt.prototype[e]=xt.prototype.oneOf;for(const e of["not","nope"])xt.prototype[e]=xt.prototype.notOneOf;const lm=()=>!0;function vc(e){return new bc(e)}class bc extends xt{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:lm},t))}}vc.prototype=bc.prototype;function wc(){return new Sc}class Sc extends xt{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(n.spec.coerce&&!n.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=$a.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return Ot(r)||r===!0}})}isFalse(t=$a.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return Ot(r)||r===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}wc.prototype=Sc.prototype;const cm=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function um(e){const t=Pa(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let r=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(r=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}function Pa(e){var t,r;const n=cm.exec(e);return n?{year:qt(n[1]),month:qt(n[2],1)-1,day:qt(n[3],1),hour:qt(n[4]),minute:qt(n[5]),second:qt(n[6]),millisecond:n[7]?qt(n[7].substring(0,3)):0,precision:(t=(r=n[7])==null?void 0:r.length)!=null?t:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:qt(n[10]),minuteOffset:qt(n[11])}:null}function qt(e,t=0){return Number(e)||t}let pm=/^[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])?)*$/,dm=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,fm=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,hm="^\\d{4}-\\d{2}-\\d{2}",mm="\\d{2}:\\d{2}:\\d{2}",xm="(([+-]\\d{2}(:?\\d{2})?)|Z)",gm=new RegExp(`${hm}T${mm}(\\.\\d+)?${xm}$`),ym=e=>Ot(e)||e===e.trim(),vm={}.toString();function vn(){return new Cc}class Cc extends xt{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce||n.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===vm?t:i})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||$t.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=st.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r=st.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r=st.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}matches(t,r){let n=!1,i,a;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:i,name:a}=r:i=r),this.test({name:a||"matches",message:i||st.matches,params:{regex:t},skipAbsent:!0,test:s=>s===""&&n||s.search(t)!==-1})}email(t=st.email){return this.matches(pm,{name:"email",message:t,excludeEmptyString:!0})}url(t=st.url){return this.matches(dm,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=st.uuid){return this.matches(fm,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",n,i;return t&&(typeof t=="object"?{message:r="",allowOffset:n=!1,precision:i=void 0}=t:r=t),this.matches(gm,{name:"datetime",message:r||st.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||st.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:a=>{if(!a||n)return!0;const s=Pa(a);return s?!!s.z:!1}}).test({name:"datetime_precision",message:r||st.datetime_precision,params:{precision:i},skipAbsent:!0,test:a=>{if(!a||i==null)return!0;const s=Pa(a);return s?s.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=st.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:ym})}lowercase(t=st.lowercase){return this.transform(r=>Ot(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Ot(r)||r===r.toLowerCase()})}uppercase(t=st.uppercase){return this.transform(r=>Ot(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Ot(r)||r===r.toUpperCase()})}}vn.prototype=Cc.prototype;let bm=e=>e!=+e;function Ec(){return new kc}class kc extends xt{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!bm(t)}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce)return t;let i=t;if(typeof i=="string"){if(i=i.replace(/\s/g,""),i==="")return NaN;i=+i}return n.isType(i)||i===null?i:parseFloat(i)})})}min(t,r=Xt.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n>=this.resolve(t)}})}max(t,r=Xt.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n<=this.resolve(t)}})}lessThan(t,r=Xt.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(n){return n<this.resolve(t)}})}moreThan(t,r=Xt.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=Xt.positive){return this.moreThan(0,t)}negative(t=Xt.negative){return this.lessThan(0,t)}integer(t=Xt.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>Ot(t)?t:t|0)}round(t){var r;let n=["ceil","floor","round","trunc"];if(t=((r=t)==null?void 0:r.toLowerCase())||"round",t==="trunc")return this.truncate();if(n.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(i=>Ot(i)?i:Math[t](i))}}Ec.prototype=kc.prototype;let Tc=new Date(""),wm=e=>Object.prototype.toString.call(e)==="[object Date]";function fs(){return new Pn}class Pn extends xt{constructor(){super({type:"date",check(t){return wm(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=um(t),isNaN(t)?Pn.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(mr.isRef(t))n=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=i}return n}min(t,r=Ra.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(n)}})}max(t,r=Ra.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(n)}})}}Pn.INVALID_DATE=Tc;fs.prototype=Pn.prototype;fs.INVALID_DATE=Tc;function Sm(e,t=[]){let r=[],n=new Set,i=new Set(t.map(([s,o])=>`${s}-${o}`));function a(s,o){let l=_r.split(s)[0];n.add(l),i.has(`${o}-${l}`)||r.push([o,l])}for(const s of Object.keys(e)){let o=e[s];n.add(s),mr.isRef(o)&&o.isSibling?a(o.path,s):ds(o)&&"deps"in o&&o.deps.forEach(l=>a(l,s))}return Zh.array(Array.from(n),r).reverse()}function Do(e,t){let r=1/0;return e.some((n,i)=>{var a;if((a=t.path)!=null&&a.includes(n))return r=i,!0}),r}function jc(e){return(t,r)=>Do(e,t)-Do(e,r)}const Cm=(e,t,r)=>{if(typeof e!="string")return e;let n=e;try{n=JSON.parse(e)}catch{}return r.isType(n)?n:e};function Zn(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Zn(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Zn(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Zn)}):"optional"in e?e.optional():e}const Em=(e,t)=>{const r=[..._r.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),i=_r.getter(_r.join(r),!0)(e);return!!(i&&n in i)};let Io=e=>Object.prototype.toString.call(e)==="[object Object]";function Mo(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const km=jc([]);function Fc(e){return new Oc(e)}class Oc extends xt{constructor(t){super({type:"object",check(r){return Io(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=km,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let i=super._cast(t,r);if(i===void 0)return this.getDefault(r);if(!this._typeCheck(i))return i;let a=this.fields,s=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,o=[].concat(this._nodes,Object.keys(i).filter(f=>!this._nodes.includes(f))),l={},d=Object.assign({},r,{parent:l,__validating:r.__validating||!1}),h=!1;for(const f of o){let u=a[f],g=f in i;if(u){let k,m=i[f];d.path=(r.path?`${r.path}.`:"")+f,u=u.resolve({value:m,context:r.context,parent:l});let b=u instanceof xt?u.spec:void 0,v=b==null?void 0:b.strict;if(b!=null&&b.strip){h=h||f in i;continue}k=!r.__validating||!v?u.cast(i[f],d):i[f],k!==void 0&&(l[f]=k)}else g&&!s&&(l[f]=i[f]);(g!==f in l||l[f]!==i[f])&&(h=!0)}return h?l:i}_validate(t,r={},n,i){let{from:a=[],originalValue:s=t,recursive:o=this.spec.recursive}=r;r.from=[{schema:this,value:s},...a],r.__validating=!0,r.originalValue=s,super._validate(t,r,n,(l,d)=>{if(!o||!Io(d)){i(l,d);return}s=s||d;let h=[];for(let f of this._nodes){let u=this.fields[f];!u||mr.isRef(u)||h.push(u.asNestedTest({options:r,key:f,parent:d,parentPath:r.path,originalParent:s}))}this.runTests({tests:h,value:d,originalValue:s,options:r},n,f=>{i(f.sort(this._sortErrors).concat(l),d)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[i,a]of Object.entries(this.fields)){const s=n[i];n[i]=s===void 0?a:s}return r.withMutation(i=>i.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var i;const a=this.fields[n];let s=t;(i=s)!=null&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),r[n]=a&&"getDefault"in a?a.getDefault(s):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=Sm(t,r),n._sortErrors=jc(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let i=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),i=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),i)})}partial(){const t={};for(const[r,n]of Object.entries(this.fields))t[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return Zn(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,i])=>t.includes(n)&&t.includes(i)))}omit(t){const r=[];for(const n of Object.keys(this.fields))t.includes(n)||r.push(n);return this.pick(r)}from(t,r,n){let i=_r.getter(t,!0);return this.transform(a=>{if(!a)return a;let s=a;return Em(a,t)&&(s=Object.assign({},a),n||delete s[t],s[r]=i(a)),s})}json(){return this.transform(Cm)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Qn.exact,test(r){if(r==null)return!0;const n=Mo(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=Qn.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(i){if(i==null)return!0;const a=Mo(this.schema,i);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=Qn.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const i of Object.keys(r))n[t(i)]=r[i];return n})}camelCase(){return this.transformKeys(ia.camelCase)}snakeCase(){return this.transformKeys(ia.snakeCase)}constantCase(){return this.transformKeys(t=>ia.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[a,s]of Object.entries(r.fields)){var i;let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[a]})),n.fields[a]=s.describe(o)}return n}}Fc.prototype=Oc.prototype;const Ac=e=>{const t={};return e.forEach(r=>{var a,s,o;let n;switch(r.type){case"text":case"textarea":case"tel":n=vn(),r.validation?n=xr(n,r,"string"):(r.minLength&&(n=n.min(r.minLength,`${r.label} must be at least ${r.minLength} characters`)),r.maxLength&&(n=n.max(r.maxLength,`${r.label} must be at most ${r.maxLength} characters`)),r.pattern&&(n=n.test("pattern",`${r.label} format is invalid`,l=>l?new RegExp(r.pattern).test(l):!0)));break;case"email":n=vn().email(((a=r.validation)==null?void 0:a.message)||`${r.label} must be a valid email address`),r.validation&&(n=xr(n,r,"string"));break;case"password":n=vn(),r.validation?n=xr(n,r,"string"):(r.minLength&&(n=n.min(r.minLength,`${r.label} must be at least ${r.minLength} characters`)),r.maxLength&&(n=n.max(r.maxLength,`${r.label} must be at most ${r.maxLength} characters`)),r.pattern&&(n=n.test("pattern",`${r.label} format is invalid`,l=>l?new RegExp(r.pattern).test(l):!0)));break;case"number":if(n=Ec().typeError(`${r.label} must be a number`),r.validation)n=xr(n,r,"number");else{if(r.min!==void 0){const l=typeof r.min=="object"&&r.min!==null&&"field"in r.min,d=l?fi(r.min.field):r.min,h=l&&r.min.message?r.min.message:`${r.label} must be at least ${l?"the minimum value":r.min}`;n=n.min(d,h)}if(r.max!==void 0){const l=typeof r.max=="object"&&r.max!==null&&"field"in r.max,d=l?fi(r.max.field):r.max,h=l&&r.max.message?r.max.message:`${r.label} must be at most ${l?"the maximum value":r.max}`;n=n.max(d,h)}}break;case"select":n=vn(),r.validation&&(n=xr(n,r,"string"));break;case"checkbox":n=wc(),r.validation&&(n=xr(n,r,"boolean"));break;case"date":n=fs().typeError(`${r.label} must be a valid date`),r.validation?n=xr(n,r,"date"):(r.minDate&&(n=n.min(new Date(r.minDate),`${r.label} must be after ${r.minDate}`)),r.maxDate&&(n=n.max(new Date(r.maxDate),`${r.label} must be before ${r.maxDate}`)));break;default:n=vc()}if(((s=r.validation)==null?void 0:s.required)!==void 0?r.validation.required:r.required){const l=((o=r.validation)==null?void 0:o.message)||`${r.label} is required`;n=n.required(l)}t[r.name]=n}),Fc().shape(t)},xr=(e,t,r,n)=>{const i=t.validation;if(!i)return e;if(r==="string"){if(i.minLength!==void 0){const a=i.message||`${t.label} must be at least ${i.minLength} characters`;e=e.min(i.minLength,a)}if(i.maxLength!==void 0){const a=i.message||`${t.label} must be at most ${i.maxLength} characters`;e=e.max(i.maxLength,a)}}if(r==="number"){if(i.min!==void 0)if(typeof i.min=="object"&&"field"in i.min){const a=fi(i.min.field),s=i.min.message||i.message||`${t.label} must be at least the value of ${i.min.field}`;e=e.min(a,s)}else{const a=i.message||`${t.label} must be at least ${i.min}`;e=e.min(i.min,a)}if(i.max!==void 0)if(typeof i.max=="object"&&"field"in i.max){const a=fi(i.max.field),s=i.max.message||i.message||`${t.label} must be at most the value of ${i.max.field}`;e=e.max(a,s)}else{const a=i.message||`${t.label} must be at most ${i.max}`;e=e.max(i.max,a)}}if(i.pattern){const a=typeof i.pattern=="string"?new RegExp(i.pattern):i.pattern,s=i.message||`${t.label} format is invalid`;e=e.test("pattern",s,o=>o?a.test(o):!0)}return i.custom&&(e=e.test("custom",i.message||`${t.label} is invalid`,function(a){const s=this.parent||{},o=i.custom(a,s);return typeof o=="boolean"?o:!1})),e},_c=({currentStep:e,totalSteps:t,onStepChange:r,stepTitles:n=[],showStepTitles:i=!0,completedSteps:a=[]})=>{const s=D.useMemo(()=>Array.from({length:t},(h,f)=>f+1),[t]),o=D.useMemo(()=>Math.round(e/t*100),[e,t]),l=h=>n[h-1]||`Step ${h}`,d=h=>h===e||a.includes(h)||h===e+1&&a.includes(e);return c.jsxs(x.Card,{sx:{mb:2,p:2,boxShadow:"0px 1px 4px 0px #00000014",background:"#F8F8F8",borderRadius:"4px"},children:[c.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[c.jsx(x.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:s.map((h,f)=>{const u=h===e,g=h<e||a.includes(h),k=u||g?"primary.main":"#8F97A4";return c.jsxs(x.Box,{sx:{display:"flex",alignItems:"center"},children:[c.jsxs(x.Box,{onClick:()=>d(h)&&r(h),sx:{display:"flex",alignItems:"center",cursor:d(h)?"pointer":"default"},children:[c.jsx(x.Box,{sx:{width:24,height:24,borderRadius:"50%",border:u||g?"2px solid":"1px solid",borderColor:u||g?"primary.main":"#8F97A4",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:m=>u||g?Et(m.palette.primary.main,.2):"transparent",mr:.5,color:k,fontWeight:u||g?600:500,fontSize:"12px"},children:h}),i&&c.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:600,color:k},children:l(h)})]}),f<s.length-1&&c.jsx(x.Box,{sx:{width:40,height:2,mx:1,borderRadius:1,backgroundColor:h<e?"primary.main":"#DFE3E8"}})]},h)})}),c.jsx(x.Typography,{sx:{color:"#8F97A4",fontSize:"12px",fontWeight:500},children:`Step ${e} of ${t}, ${o}% complete`})]}),c.jsx(x.LinearProgress,{variant:"determinate",value:o,sx:{height:4,borderRadius:"50px",backgroundColor:h=>h.palette.grey[300],"& .MuiLinearProgress-bar":{backgroundColor:"primary.main",borderRadius:5}}})]})},Rc=({buttons:e,disabled:t=!1})=>{const r=o=>{o.onClick&&o.onClick()},n=e.filter(o=>o.position==="left"||!o.position),i=e.filter(o=>o.position==="center"),a=e.filter(o=>o.position==="right"),s=(o,l)=>{const d=(o.text||"").toLowerCase(),h=o.type==="submit"||d.includes("submit")||d.includes("save")||d.includes("next"),f=o.position==="left"||d.includes("cancel")||d.includes("back")||d.includes("draft"),u=o.type?o.type:h?"submit":"button",g=f?"outlined":"contained",k=o.disabled||t,m=b=>b&&["primary","secondary","error","info","success","warning"].includes(b)?b:"primary";return c.jsxs(x.Button,{type:u,variant:g,color:m(o.color),size:o.size||"large",disabled:k,onClick:o.onClick?()=>r(o):void 0,sx:o.sx,children:[o.loading&&c.jsx(x.CircularProgress,{size:20,sx:{mr:1}}),o.text]},`${o.text}-${l}`)};return c.jsxs(x.Box,{sx:{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c.jsx(x.Box,{sx:{display:"flex",gap:2},children:n.map((o,l)=>s(o,l))}),c.jsx(x.Box,{sx:{display:"flex",gap:2},children:i.map((o,l)=>s(o,l))}),c.jsx(x.Box,{sx:{display:"flex",gap:2},children:a.map((o,l)=>s(o,l))})]})},Tm=({config:e,onSubmit:t,onStepChange:r,currentStep:n=1,totalSteps:i=1,isMultiStep:a=!1,formData:s})=>{const{buttons:o,position:l="right",layout:d="horizontal",spacing:h=2,sx:f}=e,u=v=>{let w="button",P="contained";return v.type?w=v.type:v.text.toLowerCase().includes("submit")||v.text.toLowerCase().includes("save")||v.text.toLowerCase().includes("next")?w="submit":(v.text.toLowerCase().includes("reset")||v.text.toLowerCase().includes("clear"))&&(w="reset"),(v.text.toLowerCase().includes("cancel")||v.text.toLowerCase().includes("back")||v.text.toLowerCase().includes("draft"))&&(P="outlined"),{buttonType:w,buttonVariant:P}},g=v=>["primary","secondary","error","warning","info","success"].includes(v||"")?v:"primary",k=v=>{const{buttonType:w}=u(v);v.onClick?v.onClick():w==="submit"&&t?t(s):a&&r&&(v.text.toLowerCase().includes("next")?r(n+1,i):(v.text.toLowerCase().includes("back")||v.text.toLowerCase().includes("previous"))&&r(n-1,i))},m=(v,w)=>{const{buttonType:P,buttonVariant:T}=u(v),C=g(v.color);return c.jsx(x.Button,{type:P,variant:T,color:C,size:v.size||"medium",disabled:v.disabled,onClick:()=>k(v),sx:v.sx,children:v.text},w)},b=()=>{const v={display:"flex",gap:h,...f};switch(l){case"left":return{...v,justifyContent:"flex-start"};case"center":return{...v,justifyContent:"center"};case"right":return{...v,justifyContent:"flex-end"};case"space-between":return{...v,justifyContent:"space-between"};default:return{...v,justifyContent:"flex-end"}}};return d==="vertical"?c.jsx(x.Box,{sx:b(),children:o.map((v,w)=>c.jsx(x.Box,{sx:{width:"100%"},children:m(v,w)},w))}):c.jsx(x.Box,{sx:b(),children:c.jsx(x.ButtonGroup,{variant:"outlined",size:"medium",children:o.map((v,w)=>m(v,w))})})},jm=new Pu({defaultOptions:{queries:{staleTime:15*60*1e3,gcTime:30*60*1e3,retry:3,retryDelay:e=>Math.min(1e3*2**e,3e4),refetchOnWindowFocus:!1,refetchOnReconnect:!0}}}),Fm=e=>c.jsx(Bu,{client:jm,children:c.jsx(Om,{...e})}),Om=({id:e,theme:t,fields:r,onSubmit:n,onChange:i,submitButtonText:a="Submit",onSubmitClick:s,defaultValues:o,showSubmitButton:l=!0,buttons:d,buttonGroup:h,formCardWrap:f,formCardSx:u,formCardProps:g,baseUrl:k,apiHeaders:m,stepNavigationProps:b})=>{var He,Ze;const v=[...new Set(r.map(ee=>ee.step).filter(ee=>ee!=null&&ee>0))].sort((ee,ce)=>(ee||0)-(ce||0)),w=v.length>1,P=v.length||1,[T,C]=D.useState(1),$=w?r.filter(ee=>ee.step===T):r,B=D.useMemo(()=>Ac($),[$]),{control:A,handleSubmit:I,formState:{errors:p},watch:_,setValue:z,resetField:O,trigger:N}=fu({resolver:xu(B),mode:"onChange",defaultValues:o}),K=_(),ne=D.useRef({});D.useEffect(()=>{const ee=[];for(const ce of r){const re=ce.depends_on;re&&typeof ce.name=="string"&&ee.push({dependentField:ce.name,dependencyName:re})}if(ee.length!==0)for(const{dependentField:ce,dependencyName:re}of ee){const he=ne.current[re],y=K==null?void 0:K[re];if(he!==y)try{O(ce)}catch{}ne.current[re]=y}},[r,K,O]);const me=D.useRef(i);D.useEffect(()=>{me.current=i},[i]);const ue=D.useMemo(()=>{try{return JSON.stringify(K)}catch{return String(Date.now())}},[K]),G=D.useRef(null);D.useEffect(()=>{me.current&&G.current!==ue&&(G.current=ue,me.current(K))},[ue]);const L=async()=>{if(!w)return!0;const ee=r.filter(re=>re.step===T);for(const re of ee)if(re.required){const he=K[re.name];let y=!0;if(re.type==="checkbox"?y=he===!0:Array.isArray(he)?y=he.length>0:y=he!=null&&he!=="",!y)return!1}return await N()?!0:Object.keys(p).filter(he=>ee.some(y=>y.name===he)).map(he=>{const y=p[he];return typeof(y==null?void 0:y.message)=="string"?y.message:`${he} is invalid`}).length===0},Y=D.useMemo(()=>{if(!w)return!0;const ee=r.filter(re=>re.step===T);for(const re of ee)if(re.required){const he=K[re.name];let y=!0;if(re.type==="checkbox"?y=he===!0:Array.isArray(he)?y=he.length>0:y=he!=null&&he!=="",!y)return!1}return Object.keys(p).filter(re=>ee.some(he=>he.name===re)).length===0},[w,T,r,K,p]),de=D.useMemo(()=>{if(w)return Y;for(const ee of r)if(ee.required){const ce=K[ee.name];let re=!0;if(ee.type==="checkbox"?re=ce===!0:re=ce!=null&&ce!==""&&!(Array.isArray(ce)&&ce.length===0),!re)return!1}return Object.keys(p).length===0},[w,Y,r,K,p]),fe=async ee=>{ee<1||ee>P||ee>T&&w&&!await L()||C(ee)},pe=async ee=>{if(w&&T<P){console.warn("Form submission attempted on non-final step");return}s&&s(ee),n(ee)},ge=async ee=>{ee&&(ee.preventDefault(),ee.stopPropagation()),w&&T<P&&await L()&&fe(T+1)},q=ee=>{ee&&(ee.preventDefault(),ee.stopPropagation()),w&&T>1&&fe(T-1)},te=ee=>ee.col?ee.col:(ee.xs||ee.sm||ee.md||ee.lg||ee.xl)&&(ee.xs||ee.sm||ee.md||ee.lg||ee.xl)||12,se=t?x.createTheme({palette:{primary:{main:t.primaryColor||"#1976d2"},secondary:{main:t.secondaryColor||"#dc004e"},background:{default:t.backgroundColor||"#ffffff"},text:{primary:t.textColor||"#000000"}},shape:{borderRadius:t.borderRadius||4},spacing:t.spacing||8,typography:{fontFamily:((He=t.typography)==null?void 0:He.fontFamily)||"Roboto, Arial, sans-serif",fontSize:typeof((Ze=t.typography)==null?void 0:Ze.fontSize)=="number"?t.typography.fontSize:14}}):void 0,oe=()=>{if(h&&h.buttons&&h.buttons.length>0){const ee={...h,buttons:h.buttons.map(ce=>{const re=(ce.text||"").toLowerCase(),he=ce.type==="submit"||re.includes("submit")||re.includes("save")||re.includes("finish")||re.includes("complete"),y=re.includes("next");let S=!1;return w?(he||y)&&(S=!Y):he&&(S=!de),{...ce,disabled:ce.disabled||S}})};return c.jsx(x.Box,{sx:{mt:3},children:c.jsx(Tm,{config:ee,onSubmit:pe,onStepChange:fe,currentStep:T,totalSteps:P,isMultiStep:w,formData:K})})}if(d&&d.length>0){const ee=d.map(ce=>{const re=(ce.text||"").toLowerCase(),he=ce.type==="submit"||re.includes("submit")||re.includes("save")||re.includes("finish")||re.includes("complete"),y=re.includes("next");let S=!1;return w?(he||y)&&(S=!Y):he&&(S=!de),{...ce,disabled:ce.disabled||S}});return c.jsx(Rc,{buttons:ee})}return l?c.jsx(x.Box,{sx:{mt:3,display:"flex",justifyContent:"flex-end",flexDirection:"column",alignItems:"flex-end"},children:c.jsxs(x.Box,{sx:{display:"flex",gap:2},children:[w&&T>1&&c.jsx(x.Button,{type:"button",variant:"outlined",onClick:q,children:"Previous"}),w?T<P?c.jsx(x.Button,{type:"button",variant:"contained",color:"primary",size:"large",disabled:!Y,onClick:ge,children:"Next"}):c.jsx(x.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!Y,children:a}):c.jsx(x.Button,{type:"submit",variant:"contained",color:"primary",size:"large",disabled:!de,children:a})]})}):null},le=D.useCallback((ee,ce)=>{const re=ee.showWhen;if(re){if(typeof re=="function")try{return!!re(ce||{})}catch{return!0}if(re&&typeof re=="object"){const he=re.field,y=re.equals,S=re.in,E=he?(ce||{})[he]:void 0;if(he&&typeof y<"u")return E===y;if(he&&Array.isArray(S))return S.includes(E)}}return!0},[]),Se=D.useMemo(()=>{const ee=[];let ce=[];for(const re of $)re.type==="section"&&ce.length>0?(ee.push(ce),ce=[re]):ce.push(re);return ce.length>0&&ee.push(ce),ee},[$]),Q=c.jsxs(x.Box,{component:"form",onSubmit:ee=>{if(w&&T<P){ee.preventDefault(),ee.stopPropagation(),Y&&ge();return}I(pe)(ee)},id:e,onKeyDown:ee=>{ee.key==="Enter"&&w&&T<P&&(ee.preventDefault(),Y&&ge())},children:[w&&c.jsx(_c,{currentStep:T,totalSteps:P,onStepChange:fe,stepTitles:b==null?void 0:b.stepTitles,showStepTitles:(b==null?void 0:b.showStepTitles)!==!1}),Se.map((ee,ce)=>{const re=ee.find(H=>H.type==="section");if(re&&!le(re,K))return null;const he=(re==null?void 0:re.cardWrap)!==!1,y={p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},S={display:"grid",gridTemplateColumns:"repeat(12, 1fr)",gap:2,width:"100%",mb:2},E=c.jsx(c.Fragment,{children:ee.map(H=>{if(!le(H,K))return null;const R=te(H);return c.jsx(x.Box,{sx:{gridColumn:`span ${R}`},children:c.jsx(ps,{field:H,control:A,errors:p,baseUrl:k,apiHeaders:m,formData:K,setValue:z})},H.name)})});return he?c.jsx(x.Card,{sx:{...y,...(re==null?void 0:re.cardSx)||{}},...(re==null?void 0:re.cardProps)||{},children:E},`group-${ce}`):c.jsx(x.Box,{sx:S,children:E},`group-${ce}`)}),oe()]}),De=f?c.jsx(x.Card,{sx:{p:2,boxShadow:"0px 1px 4px 0px #00000029",background:"#FFFFFF",borderRadius:"6px",...u},...g,children:Q}):Q;return se?c.jsx(x.ThemeProvider,{theme:se,children:De}):De},Am=({src:e,alt:t,width:r="100%",height:n="auto",style:i,className:a,onClick:s})=>c.jsx(x.Box,{sx:{textAlign:"center"},children:c.jsx("img",{src:e||"/placeholder-image.png",alt:t||"Image",width:r,height:n,style:{maxWidth:"100%",height:"auto",borderRadius:"8px",cursor:s?"pointer":"default",...i},className:a,onClick:s,onError:o=>{o.currentTarget.src="/placeholder-image.png"}})});function Mr(e,t,r,n){function i(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function o(h){try{d(n.next(h))}catch(f){s(f)}}function l(h){try{d(n.throw(h))}catch(f){s(f)}}function d(h){h.done?a(h.value):i(h.value).then(o,l)}d((n=n.apply(e,t||[])).next())})}const _m=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function cn(e,t,r){const n=Rm(e),{webkitRelativePath:i}=e,a=typeof t=="string"?t:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof n.path!="string"&&zo(n,"path",a),zo(n,"relativePath",a),n}function Rm(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const n=t.split(".").pop().toLowerCase(),i=_m.get(n);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function zo(e,t,r){Object.defineProperty(e,t,{value:r,writable:!1,configurable:!1,enumerable:!0})}const $m=[".DS_Store","Thumbs.db"];function Pm(e){return Mr(this,void 0,void 0,function*(){return mi(e)&&Dm(e.dataTransfer)?Bm(e.dataTransfer,e.type):Im(e)?Mm(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?zm(e):[]})}function Dm(e){return mi(e)}function Im(e){return mi(e)&&mi(e.target)}function mi(e){return typeof e=="object"&&e!==null}function Mm(e){return Da(e.target.files).map(t=>cn(t))}function zm(e){return Mr(this,void 0,void 0,function*(){return(yield Promise.all(e.map(r=>r.getFile()))).map(r=>cn(r))})}function Bm(e,t){return Mr(this,void 0,void 0,function*(){if(e.items){const r=Da(e.items).filter(i=>i.kind==="file");if(t!=="drop")return r;const n=yield Promise.all(r.map(Vm));return Bo($c(n))}return Bo(Da(e.files).map(r=>cn(r)))})}function Bo(e){return e.filter(t=>$m.indexOf(t.name)===-1)}function Da(e){if(e===null)return[];const t=[];for(let r=0;r<e.length;r++){const n=e[r];t.push(n)}return t}function Vm(e){if(typeof e.webkitGetAsEntry!="function")return Vo(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?Pc(t):Vo(e,t)}function $c(e){return e.reduce((t,r)=>[...t,...Array.isArray(r)?$c(r):[r]],[])}function Vo(e,t){return Mr(this,void 0,void 0,function*(){var r;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const a=yield e.getAsFileSystemHandle();if(a===null)throw new Error(`${e} is not a File`);if(a!==void 0){const s=yield a.getFile();return s.handle=a,cn(s)}}const n=e.getAsFile();if(!n)throw new Error(`${e} is not a File`);return cn(n,(r=t==null?void 0:t.fullPath)!==null&&r!==void 0?r:void 0)})}function Nm(e){return Mr(this,void 0,void 0,function*(){return e.isDirectory?Pc(e):Lm(e)})}function Pc(e){const t=e.createReader();return new Promise((r,n)=>{const i=[];function a(){t.readEntries(s=>Mr(this,void 0,void 0,function*(){if(s.length){const o=Promise.all(s.map(Nm));i.push(o),a()}else try{const o=yield Promise.all(i);r(o)}catch(o){n(o)}}),s=>{n(s)})}a()})}function Lm(e){return Mr(this,void 0,void 0,function*(){return new Promise((t,r)=>{e.file(n=>{const i=cn(n,e.fullPath);t(i)},n=>{r(n)})})})}var Wn={},No;function qm(){return No||(No=1,Wn.__esModule=!0,Wn.default=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(",");if(r.length===0)return!0;var n=e.name||"",i=(e.type||"").toLowerCase(),a=i.replace(/\/.*$/,"");return r.some(function(s){var o=s.trim().toLowerCase();return o.charAt(0)==="."?n.toLowerCase().endsWith(o):o.endsWith("/*")?a===o.replace(/\/.*$/,""):i===o})}return!0}),Wn}var Wm=qm();const aa=Ka(Wm);function Lo(e){return Km(e)||Hm(e)||Ic(e)||Um()}function Um(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
180
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hm(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Km(e){if(Array.isArray(e))return Ia(e)}function qo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Wo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qo(Object(r),!0).forEach(function(n){Dc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qo(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Dc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function En(e,t){return Qm(e)||Gm(e,t)||Ic(e,t)||Ym()}function Ym(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
181
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ic(e,t){if(e){if(typeof e=="string")return Ia(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ia(e,t)}}function Ia(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Gm(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,a=!1,s,o;try{for(r=r.call(e);!(i=(s=r.next()).done)&&(n.push(s.value),!(t&&n.length===t));i=!0);}catch(l){a=!0,o=l}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw o}}return n}}function Qm(e){if(Array.isArray(e))return e}var Zm=typeof aa=="function"?aa:aa.default,Xm="file-invalid-type",Jm="file-too-large",ex="file-too-small",tx="too-many-files",rx=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=t.split(","),n=r.length>1?"one of ".concat(r.join(", ")):r[0];return{code:Xm,message:"File type must be ".concat(n)}},Uo=function(t){return{code:Jm,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Ho=function(t){return{code:ex,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},nx={code:tx,message:"Too many files"};function Mc(e,t){var r=e.type==="application/x-moz-file"||Zm(e,t);return[r,r?null:rx(t)]}function zc(e,t,r){if(yr(e.size))if(yr(t)&&yr(r)){if(e.size>r)return[!1,Uo(r)];if(e.size<t)return[!1,Ho(t)]}else{if(yr(t)&&e.size<t)return[!1,Ho(t)];if(yr(r)&&e.size>r)return[!1,Uo(r)]}return[!0,null]}function yr(e){return e!=null}function ix(e){var t=e.files,r=e.accept,n=e.minSize,i=e.maxSize,a=e.multiple,s=e.maxFiles,o=e.validator;return!a&&t.length>1||a&&s>=1&&t.length>s?!1:t.every(function(l){var d=Mc(l,r),h=En(d,1),f=h[0],u=zc(l,n,i),g=En(u,1),k=g[0],m=o?o(l):null;return f&&k&&!m})}function xi(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Un(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Ko(e){e.preventDefault()}function ax(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function sx(e){return e.indexOf("Edge/")!==-1}function ox(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return ax(e)||sx(e)}function Rt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){for(var i=arguments.length,a=new Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];return t.some(function(o){return!xi(n)&&o&&o.apply(void 0,[n].concat(a)),xi(n)})}}function lx(){return"showOpenFilePicker"in window}function cx(e){if(yr(e)){var t=Object.entries(e).filter(function(r){var n=En(r,2),i=n[0],a=n[1],s=!0;return Bc(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),s=!1),(!Array.isArray(a)||!a.every(Vc))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(r,n){var i=En(n,2),a=i[0],s=i[1];return Wo(Wo({},r),{},Dc({},a,s))},{});return[{description:"Files",accept:t}]}return e}function ux(e){if(yr(e))return Object.entries(e).reduce(function(t,r){var n=En(r,2),i=n[0],a=n[1];return[].concat(Lo(t),[i],Lo(a))},[]).filter(function(t){return Bc(t)||Vc(t)}).join(",")}function px(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function dx(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Bc(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function Vc(e){return/^.*\.[\w]+$/.test(e)}var fx=["children"],hx=["open"],mx=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],xx=["refKey","onChange","onClick"];function gx(e){return bx(e)||vx(e)||Nc(e)||yx()}function yx(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
182
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vx(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function bx(e){if(Array.isArray(e))return Ma(e)}function sa(e,t){return Cx(e)||Sx(e,t)||Nc(e,t)||wx()}function wx(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
183
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nc(e,t){if(e){if(typeof e=="string")return Ma(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ma(e,t)}}function Ma(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Sx(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,a=!1,s,o;try{for(r=r.call(e);!(i=(s=r.next()).done)&&(n.push(s.value),!(t&&n.length===t));i=!0);}catch(l){a=!0,o=l}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw o}}return n}}function Cx(e){if(Array.isArray(e))return e}function Yo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Me(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yo(Object(r),!0).forEach(function(n){za(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yo(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function za(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gi(e,t){if(e==null)return{};var r=Ex(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ex(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var hs=D.forwardRef(function(e,t){var r=e.children,n=gi(e,fx),i=qc(n),a=i.open,s=gi(i,hx);return D.useImperativeHandle(t,function(){return{open:a}},[a]),D.createElement(D.Fragment,null,r(Me(Me({},s),{},{open:a})))});hs.displayName="Dropzone";var Lc={disabled:!1,getFilesFromEvent:Pm,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};hs.defaultProps=Lc;hs.propTypes={children:j.func,accept:j.objectOf(j.arrayOf(j.string)),multiple:j.bool,preventDropOnDocument:j.bool,noClick:j.bool,noKeyboard:j.bool,noDrag:j.bool,noDragEventsBubbling:j.bool,minSize:j.number,maxSize:j.number,maxFiles:j.number,disabled:j.bool,getFilesFromEvent:j.func,onFileDialogCancel:j.func,onFileDialogOpen:j.func,useFsAccessApi:j.bool,autoFocus:j.bool,onDragEnter:j.func,onDragLeave:j.func,onDragOver:j.func,onDrop:j.func,onDropAccepted:j.func,onDropRejected:j.func,onError:j.func,validator:j.func};var Ba={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function qc(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Me(Me({},Lc),e),r=t.accept,n=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,s=t.minSize,o=t.multiple,l=t.maxFiles,d=t.onDragEnter,h=t.onDragLeave,f=t.onDragOver,u=t.onDrop,g=t.onDropAccepted,k=t.onDropRejected,m=t.onFileDialogCancel,b=t.onFileDialogOpen,v=t.useFsAccessApi,w=t.autoFocus,P=t.preventDropOnDocument,T=t.noClick,C=t.noKeyboard,$=t.noDrag,B=t.noDragEventsBubbling,A=t.onError,I=t.validator,p=D.useMemo(function(){return ux(r)},[r]),_=D.useMemo(function(){return cx(r)},[r]),z=D.useMemo(function(){return typeof b=="function"?b:Go},[b]),O=D.useMemo(function(){return typeof m=="function"?m:Go},[m]),N=D.useRef(null),K=D.useRef(null),ne=D.useReducer(kx,Ba),me=sa(ne,2),ue=me[0],G=me[1],L=ue.isFocused,Y=ue.isFileDialogActive,de=D.useRef(typeof window<"u"&&window.isSecureContext&&v&&lx()),fe=function(){!de.current&&Y&&setTimeout(function(){if(K.current){var M=K.current.files;M.length||(G({type:"closeDialog"}),O())}},300)};D.useEffect(function(){return window.addEventListener("focus",fe,!1),function(){window.removeEventListener("focus",fe,!1)}},[K,Y,O,de]);var pe=D.useRef([]),ge=function(M){N.current&&N.current.contains(M.target)||(M.preventDefault(),pe.current=[])};D.useEffect(function(){return P&&(document.addEventListener("dragover",Ko,!1),document.addEventListener("drop",ge,!1)),function(){P&&(document.removeEventListener("dragover",Ko),document.removeEventListener("drop",ge))}},[N,P]),D.useEffect(function(){return!n&&w&&N.current&&N.current.focus(),function(){}},[N,w,n]);var q=D.useCallback(function(R){A?A(R):console.error(R)},[A]),te=D.useCallback(function(R){R.preventDefault(),R.persist(),y(R),pe.current=[].concat(gx(pe.current),[R.target]),Un(R)&&Promise.resolve(i(R)).then(function(M){if(!(xi(R)&&!B)){var Z=M.length,X=Z>0&&ix({files:M,accept:p,minSize:s,maxSize:a,multiple:o,maxFiles:l,validator:I}),U=Z>0&&!X;G({isDragAccept:X,isDragReject:U,isDragActive:!0,type:"setDraggedFiles"}),d&&d(R)}}).catch(function(M){return q(M)})},[i,d,q,B,p,s,a,o,l,I]),se=D.useCallback(function(R){R.preventDefault(),R.persist(),y(R);var M=Un(R);if(M&&R.dataTransfer)try{R.dataTransfer.dropEffect="copy"}catch{}return M&&f&&f(R),!1},[f,B]),oe=D.useCallback(function(R){R.preventDefault(),R.persist(),y(R);var M=pe.current.filter(function(X){return N.current&&N.current.contains(X)}),Z=M.indexOf(R.target);Z!==-1&&M.splice(Z,1),pe.current=M,!(M.length>0)&&(G({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Un(R)&&h&&h(R))},[N,h,B]),le=D.useCallback(function(R,M){var Z=[],X=[];R.forEach(function(U){var ye=Mc(U,p),Te=sa(ye,2),je=Te[0],Be=Te[1],qe=zc(U,s,a),Je=sa(qe,2),At=Je[0],et=Je[1],Ye=I?I(U):null;if(je&&At&&!Ye)Z.push(U);else{var dt=[Be,et];Ye&&(dt=dt.concat(Ye)),X.push({file:U,errors:dt.filter(function(Yt){return Yt})})}}),(!o&&Z.length>1||o&&l>=1&&Z.length>l)&&(Z.forEach(function(U){X.push({file:U,errors:[nx]})}),Z.splice(0)),G({acceptedFiles:Z,fileRejections:X,isDragReject:X.length>0,type:"setFiles"}),u&&u(Z,X,M),X.length>0&&k&&k(X,M),Z.length>0&&g&&g(Z,M)},[G,o,p,s,a,l,u,g,k,I]),Se=D.useCallback(function(R){R.preventDefault(),R.persist(),y(R),pe.current=[],Un(R)&&Promise.resolve(i(R)).then(function(M){xi(R)&&!B||le(M,R)}).catch(function(M){return q(M)}),G({type:"reset"})},[i,le,q,B]),Q=D.useCallback(function(){if(de.current){G({type:"openDialog"}),z();var R={multiple:o,types:_};window.showOpenFilePicker(R).then(function(M){return i(M)}).then(function(M){le(M,null),G({type:"closeDialog"})}).catch(function(M){px(M)?(O(M),G({type:"closeDialog"})):dx(M)?(de.current=!1,K.current?(K.current.value=null,K.current.click()):q(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):q(M)});return}K.current&&(G({type:"openDialog"}),z(),K.current.value=null,K.current.click())},[G,z,O,v,le,q,_,o]),De=D.useCallback(function(R){!N.current||!N.current.isEqualNode(R.target)||(R.key===" "||R.key==="Enter"||R.keyCode===32||R.keyCode===13)&&(R.preventDefault(),Q())},[N,Q]),He=D.useCallback(function(){G({type:"focus"})},[]),Ze=D.useCallback(function(){G({type:"blur"})},[]),ee=D.useCallback(function(){T||(ox()?setTimeout(Q,0):Q())},[T,Q]),ce=function(M){return n?null:M},re=function(M){return C?null:ce(M)},he=function(M){return $?null:ce(M)},y=function(M){B&&M.stopPropagation()},S=D.useMemo(function(){return function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=R.refKey,Z=M===void 0?"ref":M,X=R.role,U=R.onKeyDown,ye=R.onFocus,Te=R.onBlur,je=R.onClick,Be=R.onDragEnter,qe=R.onDragOver,Je=R.onDragLeave,At=R.onDrop,et=gi(R,mx);return Me(Me(za({onKeyDown:re(Rt(U,De)),onFocus:re(Rt(ye,He)),onBlur:re(Rt(Te,Ze)),onClick:ce(Rt(je,ee)),onDragEnter:he(Rt(Be,te)),onDragOver:he(Rt(qe,se)),onDragLeave:he(Rt(Je,oe)),onDrop:he(Rt(At,Se)),role:typeof X=="string"&&X!==""?X:"presentation"},Z,N),!n&&!C?{tabIndex:0}:{}),et)}},[N,De,He,Ze,ee,te,se,oe,Se,C,$,n]),E=D.useCallback(function(R){R.stopPropagation()},[]),H=D.useMemo(function(){return function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=R.refKey,Z=M===void 0?"ref":M,X=R.onChange,U=R.onClick,ye=gi(R,xx),Te=za({accept:p,multiple:o,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:ce(Rt(X,Se)),onClick:ce(Rt(U,E)),tabIndex:-1},Z,K);return Me(Me({},Te),ye)}},[K,r,o,Se,n]);return Me(Me({},ue),{},{isFocused:L&&!n,getRootProps:S,getInputProps:H,rootRef:N,inputRef:K,open:ce(Q)})}function kx(e,t){switch(t.type){case"focus":return Me(Me({},e),{},{isFocused:!0});case"blur":return Me(Me({},e),{},{isFocused:!1});case"openDialog":return Me(Me({},Ba),{},{isFileDialogActive:!0});case"closeDialog":return Me(Me({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Me(Me({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Me(Me({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return Me({},Ba);default:return e}}function Go(){}const Tx=pt(c.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"}),"CheckCircle"),Qo=pt(c.jsx("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"}),"Description"),jx=pt(c.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Image"),Wc=({file:e,onRemove:t})=>{const r=()=>e.file.type.startsWith("image/")?c.jsx(jx,{}):e.file.type.includes("pdf")?c.jsx(Qo,{}):c.jsx(Qo,{}),n=()=>{switch(e.status){case"success":return c.jsx(Tx,{color:"success"});case"uploading":return c.jsx(x.CircularProgress,{size:16});default:return null}},i=a=>{if(a===0)return"0 Bytes";const s=1024,o=["Bytes","KB","MB","GB"],l=Math.floor(Math.log(a)/Math.log(s));return parseFloat((a/Math.pow(s,l)).toFixed(2))+" "+o[l]};return c.jsxs(x.Paper,{sx:{p:2,mb:1,display:"flex",alignItems:"center",gap:2,border:"1px solid #e0e0e0"},children:[c.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[r(),n()]}),c.jsxs(x.Box,{sx:{flex:1,minWidth:0},children:[c.jsx(x.Typography,{variant:"body2",noWrap:!0,children:e.file.name}),c.jsxs(x.Typography,{variant:"caption",color:"textSecondary",children:[i(e.file.size)," • ",e.file.type]})]}),c.jsx(x.Tooltip,{title:"Remove file",children:c.jsx(x.IconButton,{size:"small",onClick:()=>t(e.id),color:"error",children:c.jsx(dc,{})})})]})},Fx=({config:e,value:t=[],onChange:r,onSubmit:n,disabled:i=!1,className:a,style:s,title:o,subtitle:l,buttonText:d,fileSupportedText:h})=>{const[f,u]=D.useState(t),[g,k]=D.useState([]),[m,b]=D.useState(!1),[v,w]=D.useState(!1),[P,T]=D.useState([]),C=D.useRef(null);D.useEffect(()=>{u(t)},[t]);const $=D.useCallback(N=>{var ne,me;return((ne=e==null?void 0:e.fileTypes)==null?void 0:ne.some(ue=>{if(ue.includes("*")){const G=ue.split("/")[0];return N.type.startsWith(G)}return N.type===ue}))?e!=null&&e.maxSize&&N.size>e.maxSize?`File size exceeds maximum limit of ${(e.maxSize/1048576).toFixed(1)}MB`:null:`File type ${N.type} is not allowed. Allowed types: ${(me=e==null?void 0:e.fileTypes)==null?void 0:me.join(", ")}`},[e]),B=D.useCallback(async N=>{console.log("handleFiles called with:",N.length,"files"),b(!0);const K=[],ne=[];try{for(const ue of N){let G=null;if(e!=null&&e.multiple&&f.some(Y=>Y.file.name===ue.name&&Y.file.size===ue.size&&Y.file.lastModified===ue.lastModified)){ne.push(`${ue.name}: File already exists`);continue}if(G=$(ue),!G&&(e!=null&&e.customValidation))try{const L=e.customValidation(ue);L instanceof Promise?G=await L:G=L}catch(L){G=`Custom validation failed: ${L instanceof Error?L.message:"Unknown error"}`}if(G)ne.push(`${ue.name}: ${G}`);else{const L={id:`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,file:ue,preview:ue.type.startsWith("image/")?URL.createObjectURL(ue):void 0,progress:0,status:"pending",uploadedAt:new Date};K.push(L)}}const me=e!=null&&e.multiple?[...f,...K]:K;u(me),r==null||r(me),ne.length>0?(T(ne),k(ne)):(T([]),k([]))}catch(me){const ue=`Unexpected error: ${me instanceof Error?me.message:"Unknown error"}`;T([ue]),k([ue])}},[f,e==null?void 0:e.multiple,$,e==null?void 0:e.customValidation,r]),A=D.useCallback(N=>{b(!0);const K=f.filter(ne=>ne.id!==N);u(K),r==null||r(K),T([]),C.current&&(C.current.value="")},[f,r]),I=D.useCallback(()=>{if(e!=null&&e.required&&f.length===0){k([`${e.title} is required`]);return}T([]),w(!0);const N=f.filter(K=>K.status!=="error");n==null||n(N)},[f,n,e==null?void 0:e.required,e==null?void 0:e.title]),{getRootProps:p,getInputProps:_,isDragActive:z}=qc({onDrop:B,multiple:e==null?void 0:e.multiple,disabled:i,noClick:!1,noKeyboard:!1});D.useEffect(()=>{if(!m)return;const N=[],K=[...P,...N];K.length>0?k(K):k([])},[f,e==null?void 0:e.required,e==null?void 0:e.title,m,v,P]);const O=()=>{var N;switch(((N=e==null?void 0:e.submitButton)==null?void 0:N.position)||"right"){case"left":return"flex-start";case"center":return"center";case"right":return"flex-end";default:return"flex-end"}};return c.jsxs(x.Box,{className:a,style:s,children:[c.jsxs(x.Typography,{variant:"h6",gutterBottom:!0,children:[e==null?void 0:e.title,(e==null?void 0:e.required)&&c.jsx("span",{style:{color:"red"},children:" *"})]}),(e==null?void 0:e.description)&&c.jsx(x.Typography,{variant:"body2",color:"textSecondary",gutterBottom:!0,children:e==null?void 0:e.description}),D.createElement(x.Card,{...p(),key:`dropzone-${f.length}`,sx:{border:"1px dashed",borderColor:z?"primary.main":"#CCCCCC",backgroundColor:z?"action.hover":"#F5F5F5",boxShadow:"none",p:3,textAlign:"center",cursor:i?"not-allowed":"pointer",transition:"all 0.2s ease","&:hover":{borderColor:i?"grey.300":"primary.main",backgroundColor:i?"background.paper":"action.hover"}}},c.jsx("input",{..._(),ref:C}),c.jsx(x.IconButton,{sx:{borderRadius:"8px"},children:c.jsx(ui,{sx:{width:36,height:36,color:"primary.main"}})}),c.jsx(x.Typography,{sx:{fontSize:"16px",fontWeight:600,color:"primary.main"},children:o}),c.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400,color:"primary.main"},children:l}),c.jsx(x.Button,{onClick:()=>{var N;return(N=C.current)==null?void 0:N.click()},sx:{my:2},startIcon:c.jsx(ui,{}),variant:"contained",children:d}),c.jsx(x.Typography,{sx:{fontSize:"12px",fontWeight:400},children:h})),g.length>0&&c.jsx(x.Alert,{severity:"error",sx:{mt:2},children:g.map((N,K)=>c.jsx(x.Typography,{variant:"body2",children:N},K))}),f.length>0&&c.jsxs(x.Box,{sx:{mt:2},children:[c.jsxs(x.Typography,{variant:"subtitle1",gutterBottom:!0,children:["Selected Files (",f.length,")"]}),f.map(N=>c.jsx(Wc,{file:N,onRemove:A},N.id))]}),(e==null?void 0:e.helperText)&&c.jsx(x.Typography,{variant:"caption",color:"textSecondary",sx:{mt:1,display:"block"},children:e.helperText}),(e==null?void 0:e.submitButton)&&c.jsx(x.Box,{sx:{mt:3,display:"flex",justifyContent:O()},children:c.jsx(x.Button,{variant:"contained",onClick:I,disabled:i||e.submitButton.disabled||f.length===0,startIcon:e.submitButton.loading?c.jsx(x.CircularProgress,{size:16,color:"inherit"}):void 0,children:e.submitButton.text})})]})};exports.CustomButtons=Rc;exports.DocumentUpload=Fx;exports.FieldRenderer=ps;exports.FilePreview=Wc;exports.FinAutocomplete=nc;exports.FinCheckbox=Ht;exports.FinCheckboxGroup=ic;exports.FinChip=cs;exports.FinCustomizedVerticalStepper=Vh;exports.FinDateField=ls;exports.FinDragDropList=lc;exports.FinEditableGrid=uc;exports.FinForm=Fm;exports.FinInfoCard=Lh;exports.FinListCards=pc;exports.FinPhaseCard=Uh;exports.FinRadioGroup=wr;exports.FinSelect=Ri;exports.FinSwitch=pi;exports.FinTabs=cc;exports.FinTextField=vt;exports.FinTextarea=ac;exports.FinUiHeader=sc;exports.FinVerticalStepper=zh;exports.ImageComponent=Am;exports.StepNavigation=_c;exports.brand=Dh;exports.fetchApiData=fc;exports.finflowPalette=W;exports.generateSchema=Ac;exports.getApiConfig=us;exports.hasApiConfig=gr;exports.neutral=Qe;exports.primary=$h;exports.secondary=Ph;exports.shouldShowField=Hh;exports.useApiData=hc;
|